decocms 3.97.3 → 3.97.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CiYXjBCp.js → AlertCircle-BY01IebW.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D62C8hBG.js → ArrowUpRight-CrNpVXJQ.js} +1 -1
- package/dist/client/assets/{CheckCircle-B0cHPrPi.js → CheckCircle-UPyj94ce.js} +1 -1
- package/dist/client/assets/{ChevronDown-Ep-T2bbc.js → ChevronDown-DuS1gosF.js} +1 -1
- package/dist/client/assets/{ChevronLeft-Cn3JRl7K.js → ChevronLeft-DNoBDBkQ.js} +1 -1
- package/dist/client/assets/{ChevronRight-BB8PtdU_.js → ChevronRight-DUYBaJAA.js} +1 -1
- package/dist/client/assets/{ChevronUp-BCrNzv-A.js → ChevronUp-Bj5wnP8v.js} +1 -1
- package/dist/client/assets/{DotsVertical-21OsfYko.js → DotsVertical-BoWHOZg-.js} +1 -1
- package/dist/client/assets/{Eye-vPozEeRC.js → Eye-BN8eZd3q.js} +1 -1
- package/dist/client/assets/{FilterLines-BcHnc4HO.js → FilterLines-BcDA53T2.js} +1 -1
- package/dist/client/assets/{Globe01-eAXhqoKJ.js → Globe01-CtRTi-q3.js} +1 -1
- package/dist/client/assets/{Globe04-8G7DaJlX.js → Globe04-DcqSH090.js} +1 -1
- package/dist/client/assets/{HardDrive-BJ-lnZmp.js → HardDrive-LcockCRx.js} +1 -1
- package/dist/client/assets/{Key01-qC4LCntt.js → Key01-BcXniqTr.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DiBhmi5f.js → LayoutLeft-DIu4qlvA.js} +1 -1
- package/dist/client/assets/{LinkExternal01-k2q6wU7l.js → LinkExternal01-Dyt9zIKA.js} +1 -1
- package/dist/client/assets/{Monitor01-DvPP6kPt.js → Monitor01-BY0WhsQY.js} +1 -1
- package/dist/client/assets/{Palette-BaoaCY0h.js → Palette-D0tFYq6o.js} +1 -1
- package/dist/client/assets/{Play-CMo8plFz.js → Play-Ds_dyiCJ.js} +1 -1
- package/dist/client/assets/{Plus-CexM6aI0.js → Plus-CXJQYPWf.js} +1 -1
- package/dist/client/assets/{SearchMd-BT6OYA0s.js → SearchMd--1Uwo-4h.js} +1 -1
- package/dist/client/assets/{Settings02-CtG2aS1_.js → Settings02-Qog-9BW9.js} +1 -1
- package/dist/client/assets/{Shield01-Dwjpxvd-.js → Shield01-BjGAptDu.js} +1 -1
- package/dist/client/assets/{Star01-Ccb8Hi5b.js → Star01-BNPre7m8.js} +1 -1
- package/dist/client/assets/{Stars01-Dsl5vjAD.js → Stars01-CUSSCI6Q.js} +1 -1
- package/dist/client/assets/{Stars02-kHQQc3aX.js → Stars02--YU8wF8-.js} +1 -1
- package/dist/client/assets/{Sun-BjBDYy_F.js → Sun-DF1tmwEc.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-YTEahx81.js → SwitchHorizontal01-C-d9B1Pc.js} +1 -1
- package/dist/client/assets/{Tool01-DaG15Hqa.js → Tool01-Cbity1uu.js} +1 -1
- package/dist/client/assets/{Trash01-B5-ciNMB.js → Trash01-Csom-OmK.js} +1 -1
- package/dist/client/assets/{Upload01-DWdtOJ5u.js → Upload01-BKLWvYK3.js} +1 -1
- package/dist/client/assets/{User01-4kOfLZMN.js → User01-rB66Yp8m.js} +1 -1
- package/dist/client/assets/{Users01-dV9sT0dy.js → Users01-CSjiAX-B.js} +1 -1
- package/dist/client/assets/{Users03-D9C5BM7D.js → Users03-CzMI4hYk.js} +1 -1
- package/dist/client/assets/{X-BKm6Fw1t.js → X-C23kraKx.js} +1 -1
- package/dist/client/assets/{XCircle-CAZvEkjb.js → XCircle-DAQ6sXs1.js} +1 -1
- package/dist/client/assets/{XClose-ssDuFEQg.js → XClose-CD3EJbwD.js} +1 -1
- package/dist/client/assets/{Zap-C-erO5Sh.js → Zap-BKA-au81.js} +1 -1
- package/dist/client/assets/{ZapSquare-DbVR4h30.js → ZapSquare-JpoS_XnR.js} +1 -1
- package/dist/client/assets/{ZoomOut-BNzpzje_.js → ZoomOut-B5vLZpoX.js} +1 -1
- package/dist/client/assets/{access-gate-BkA2GKhf.js → access-gate-hq7UmdZv.js} +1 -1
- package/dist/client/assets/{add-section-modal-DxQ_2Wd2.js → add-section-modal-DPGYUmmW.js} +1 -1
- package/dist/client/assets/{agent-icon-DC15QH5N.js → agent-icon-B_lvSp90.js} +1 -1
- package/dist/client/assets/{agents-list-DcKbuDjZ.js → agents-list-BuiqFvDD.js} +1 -1
- package/dist/client/assets/{ai-providers-Je5PimJe.js → ai-providers-igMP4uEw.js} +1 -1
- package/dist/client/assets/{alert-Dl9mLaEt.js → alert-B6tz0cqs.js} +1 -1
- package/dist/client/assets/{alert-dialog-DgcsfpwV.js → alert-dialog-CsikfeuV.js} +1 -1
- package/dist/client/assets/{app-editor-9i48Z1mN.js → app-editor-DA7fDqIP.js} +1 -1
- package/dist/client/assets/{auth-fUaquGnI.js → auth-CdNUf-u6.js} +1 -1
- package/dist/client/assets/{auth-catchall-C-nIq0-D.js → auth-catchall-DTkC1khj.js} +1 -1
- package/dist/client/assets/{auth-entry-BRIrNXJW.js → auth-entry-ChKD6XAl.js} +1 -1
- package/dist/client/assets/{auth-split-layout-MeF5ymWQ.js → auth-split-layout-CUgDVzOC.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DJxmh0FS.js → authenticate-and-persist-oauth-B-HUI4Rh.js} +1 -1
- package/dist/client/assets/{automation-list-row-BE7UAA7m.js → automation-list-row-DqslLX8-.js} +1 -1
- package/dist/client/assets/{automation-runs-KROcbEKJ.js → automation-runs-C-ImxLWq.js} +1 -1
- package/dist/client/assets/{automations-M_nP8Dw1.js → automations-BIUDKFSY.js} +1 -1
- package/dist/client/assets/{avatar-VLg8_8qy.js → avatar-CjYG3-98.js} +1 -1
- package/dist/client/assets/{badge-CXqt8LsO.js → badge-yqmEwWNw.js} +1 -1
- package/dist/client/assets/{block-document-gRQauTZI.js → block-document-Ddmw8MXB.js} +1 -1
- package/dist/client/assets/{brand-context-BBxDnkt1.js → brand-context-b43I5gSL.js} +1 -1
- package/dist/client/assets/{buckets-BMjr1jEe.js → buckets-dtFdBXmS.js} +1 -1
- package/dist/client/assets/{capability-load-error-BssWdjEJ.js → capability-load-error-CFrsagBh.js} +1 -1
- package/dist/client/assets/{card-c1tDYTHP.js → card-CZci2Ked.js} +1 -1
- package/dist/client/assets/{category-editor-DsdVSDFi.js → category-editor-CufMmbEd.js} +1 -1
- package/dist/client/assets/{chat-context-DAyh5sec.js → chat-context-hue9xev7.js} +1 -1
- package/dist/client/assets/{checkbox-BZ4Cev3m.js → checkbox-CnyL8XHl.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DIR-u7k3.js → cli-auth-success-DEWC2vv9.js} +1 -1
- package/dist/client/assets/{collection-detail-xnmDLTC2.js → collection-detail-BmiSLLei.js} +1 -1
- package/dist/client/assets/{collection-display-button-5E1VxEVW.js → collection-display-button-DA3BZFv2.js} +1 -1
- package/dist/client/assets/{collection-search-BHxcuieJ.js → collection-search-BaiviTLW.js} +1 -1
- package/dist/client/assets/{collection-tabs-BMqIu2hn.js → collection-tabs-gJzAs0-U.js} +1 -1
- package/dist/client/assets/{command-hmVb9nzj.js → command-BtIUrGW9.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BPECsSVR.js → commerce-onboarding-B6X46OGL.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-M8mQpyYi.js → connect-desktop-dialog-lLRzH9Wf.js} +1 -1
- package/dist/client/assets/{connection-card-DwO2q63k.js → connection-card-BvZozJYf.js} +1 -1
- package/dist/client/assets/{connection-detail-DlzvyCLX.js → connection-detail--FRkiCAU.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-_UdmyYSC.js → connection-form-helpers-BXpJ-39p.js} +1 -1
- package/dist/client/assets/{connections-BzsSZkKz.js → connections-B8tGIqm6.js} +1 -1
- package/dist/client/assets/{context-menu-ClXPOkdV.js → context-menu-DdUP1nvw.js} +1 -1
- package/dist/client/assets/{decopilot-BZ76gfhX.js → decopilot-D6Us63Iz.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DF7I7n1i.js → decopilot-sse-pool-Cn1O82-8.js} +1 -1
- package/dist/client/assets/{dialog-CaTEiJVO.js → dialog-Djo11OZ8.js} +1 -1
- package/dist/client/assets/{domain-settings-Dy-h970m.js → domain-settings-Qv_TUecy.js} +1 -1
- package/dist/client/assets/{drawer-BAJPoLOE.js → drawer-CGy7XhOb.js} +1 -1
- package/dist/client/assets/{dropdown-menu-oCs7Iiv2.js → dropdown-menu-CuiF-07J.js} +1 -1
- package/dist/client/assets/{empty-state-wZACnL2J.js → empty-state-CFMrMwNK.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bmmw_I_H.js → extract-connection-data-HZVgcUqH.js} +1 -1
- package/dist/client/assets/{file-explorer-DYFMt1oY.js → file-explorer-d1r4yEtA.js} +1 -1
- package/dist/client/assets/{file-type-icon-DHG3dnn1.js → file-type-icon-9Eew51_j.js} +1 -1
- package/dist/client/assets/{files-BjRJXW0l.js → files-BX2R4Hdg.js} +1 -1
- package/dist/client/assets/{form-BWIorvmY.js → form-Bws9hvDL.js} +1 -1
- package/dist/client/assets/{general-CFBr5HF3.js → general-BfDLAR84.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Bqmm5RYY.js → github-repo-picker-DgsWIyrn.js} +1 -1
- package/dist/client/assets/{hooks-DGQm848Q.js → hooks-BFhhtb2P.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-z9TrSbfs.js → import-from-deco-dialog-B_FF9twl.js} +1 -1
- package/dist/client/assets/{index-AltTReR4.js → index-BQpSQsx-.js} +1 -1
- package/dist/client/assets/{index-DHFxvk5e.js → index-Bbr4phoV.js} +1 -1
- package/dist/client/assets/{index-6BQORbvL.js → index-Bfc1Ah6s.js} +1 -1
- package/dist/client/assets/{index-C4Z0gT1h.js → index-BolwlNK6.js} +1 -1
- package/dist/client/assets/{index-DLQ4JwZN.js → index-BwVMeD3q.js} +3 -3
- package/dist/client/assets/{index-DIk1O_Dr.js → index-C5p4XFGO.js} +1 -1
- package/dist/client/assets/{index-qjVbGUv9.js → index-CM09tGUK.js} +1 -1
- package/dist/client/assets/{index-B83rPo9I.js → index-CNHawUWP.js} +1 -1
- package/dist/client/assets/{index-DY2Xseue.js → index-Cb0xFHoO.js} +1 -1
- package/dist/client/assets/{index-17QLTZMM.js → index-CxFZHubh.js} +5 -5
- package/dist/client/assets/{index-DFanLV1X.js → index-Cyi-U3f4.js} +1 -1
- package/dist/client/assets/{index-ZWBhZDHA.js → index-D6bagO5K.js} +1 -1
- package/dist/client/assets/{index-CqwvSop6.js → index-DgHQzdnZ.js} +1 -1
- package/dist/client/assets/{index-redirect-2HTXFJkp.js → index-redirect-CEK3pBZ_.js} +1 -1
- package/dist/client/assets/{index-CVhJkkBU.js → index-zLeBpb-e.js} +1 -1
- package/dist/client/assets/{input-BFLS6IB9.js → input-C8pdmexi.js} +1 -1
- package/dist/client/assets/{integration-icon-DD9LcA1t.js → integration-icon-BYt__tsS.js} +1 -1
- package/dist/client/assets/{label-TS_o46fE.js → label-6fUzynqC.js} +1 -1
- package/dist/client/assets/{login-jqUZykUn.js → login-RzsGUcw2.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DyPHEZc0.js → mcp-oauth-DOYfP2o1.js} +1 -1
- package/dist/client/assets/{members-Oku2ILxU.js → members-C8QsS2ME.js} +1 -1
- package/dist/client/assets/{monaco-editor-D0BeTcV-.js → monaco-editor-DGlh_VCI.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BkORDVIl.js → monitoring-stats-row-tBQqJwnX.js} +1 -1
- package/dist/client/assets/{oauth-callback-BgIbnfWn.js → oauth-callback-C7HO5sjA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DnNDJyNh.js → oauth-callback-ai-provider-C2ZKRasi.js} +1 -1
- package/dist/client/assets/{onboarding-Df5Y7dbu.js → onboarding-Pxz11AYs.js} +1 -1
- package/dist/client/assets/{org-install-C9pyMts_.js → org-install-Fk_fo4EG.js} +1 -1
- package/dist/client/assets/{org-layout-Bl_9Td80.js → org-layout-BYDLh4Da.js} +1 -1
- package/dist/client/assets/{organization-choice-vRlqbiOV.js → organization-choice-D91Z6ihZ.js} +1 -1
- package/dist/client/assets/{page-seo-form-BlSVNC9f.js → page-seo-form-Dw_-ajyz.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CFP5LBzL.js +1 -0
- package/dist/client/assets/{popover-BSP7ejLc.js → popover-cxXkvARj.js} +1 -1
- package/dist/client/assets/{post-editor-CXXGCGJD.js → post-editor-CqZVJyys.js} +1 -1
- package/dist/client/assets/{preview-dialog-CSsWWs5M.js → preview-dialog-C1XBzik_.js} +1 -1
- package/dist/client/assets/{primitives-DhSbPHiR.js → primitives-C8RGsHih.js} +1 -1
- package/dist/client/assets/{profile-BZTAS1CN.js → profile-RQBuJ0-C.js} +1 -1
- package/dist/client/assets/project-app-view-BUDCdtfR.js +1 -0
- package/dist/client/assets/record-editor-x3p3WRWl.js +1 -0
- package/dist/client/assets/registry-DUN-rzpb.js +2 -0
- package/dist/client/assets/{registry-layout-BRvslRVV.js → registry-layout-JxXagtmN.js} +1 -1
- package/dist/client/assets/{require-capability-CikSO1sK.js → require-capability-D8wtdjJA.js} +1 -1
- package/dist/client/assets/{required-auth-layout-1Q0s2bde.js → required-auth-layout-Bni9Lv8T.js} +1 -1
- package/dist/client/assets/{reset-password-e6G_i6Vq.js → reset-password-CDD1X47u.js} +1 -1
- package/dist/client/assets/{roles-BKbJv76K.js → roles-BmFGLWBQ.js} +1 -1
- package/dist/client/assets/{save-status-DJMZw4Ff.js → save-status-Ap0tRvUu.js} +1 -1
- package/dist/client/assets/{scroll-area-bUXD_r58.js → scroll-area-BFIPKXPy.js} +1 -1
- package/dist/client/assets/{search-input-Cw_P0J35.js → search-input-DqD8geWF.js} +1 -1
- package/dist/client/assets/{secrets-DH2hlPoO.js → secrets-CUG9brF8.js} +1 -1
- package/dist/client/assets/{sections-editor-D2ALK4En.js → sections-editor-2XAp7iDT.js} +1 -1
- package/dist/client/assets/{select-C0lOOEoK.js → select-UKSqIIxL.js} +1 -1
- package/dist/client/assets/{select-model-vYCpp3x3.js → select-model-Duntt4sG.js} +1 -1
- package/dist/client/assets/{seo-editor-CkygDS8T.js → seo-editor-sJTA698t.js} +1 -1
- package/dist/client/assets/{settings-layout-BXYPwJV4.js → settings-layout-D4PyBfZX.js} +1 -1
- package/dist/client/assets/{settings-section-Bk_k5SKB.js → settings-section-uysJimh1.js} +1 -1
- package/dist/client/assets/{sheet-DAwn9AHA.js → sheet-DaEm5-cm.js} +1 -1
- package/dist/client/assets/{shell-controls-HZ3369Yf.js → shell-controls-D-FZtlw4.js} +1 -1
- package/dist/client/assets/{shell-layout-DOpUjfn5.js → shell-layout-BU2Eo26M.js} +1 -1
- package/dist/client/assets/{shell-route-loading-xptU08tM.js → shell-route-loading-k31lp-sb.js} +1 -1
- package/dist/client/assets/{sidebar-g2qAal9U.js → sidebar-CDHrQeMJ.js} +1 -1
- package/dist/client/assets/{skeleton-D4R3a4o-.js → skeleton-CjN5A6XL.js} +1 -1
- package/dist/client/assets/{sortable.esm-BnJIYE_Z.js → sortable.esm-DWhmpOCs.js} +1 -1
- package/dist/client/assets/{sso-qEodk6g6.js → sso-CWuDaOKP.js} +1 -1
- package/dist/client/assets/{store-C4B_G2oW.js → store-DMU35qQr.js} +1 -1
- package/dist/client/assets/store-registry-DE3B_JjR.js +2 -0
- package/dist/client/assets/{studio-tools-COOhA4uQ.js → studio-tools-Cj1fBaXp.js} +1 -1
- package/dist/client/assets/{switch-B56_YQh-.js → switch-BlhCItPG.js} +1 -1
- package/dist/client/assets/{table-C_RjqUn4.js → table-Bt_fbenL.js} +1 -1
- package/dist/client/assets/{tabs-DWit868K.js → tabs-DLLYyT_4.js} +1 -1
- package/dist/client/assets/{task-status-ANvwNzqA.js → task-status-DG_3CCeu.js} +1 -1
- package/dist/client/assets/{textarea-DUeOU9F3.js → textarea-LTBnL6Dv.js} +1 -1
- package/dist/client/assets/{toggle-group-BJd6ihxO.js → toggle-group-DLR6cnlJ.js} +1 -1
- package/dist/client/assets/{toolbar-CqV98Xz1.js → toolbar-BuAJdBWi.js} +1 -1
- package/dist/client/assets/{tooltip-BBVKuVWA.js → tooltip-_TcC7QSJ.js} +1 -1
- package/dist/client/assets/{types-CFybozjb.js → types-C9zbfwjF.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BI7Dx3UD.js → use-ai-providers-Mmhw_1Og.js} +1 -1
- package/dist/client/assets/{use-automations-BlPG5Nag.js → use-automations-Cw5ubZKL.js} +1 -1
- package/dist/client/assets/{use-capability-GDRaaPxs.js → use-capability-CP1V4i_3.js} +1 -1
- package/dist/client/assets/{use-clock-tick-10nS2wAD.js → use-clock-tick-BbDdy2cM.js} +1 -1
- package/dist/client/assets/{use-collections-olSa4--l.js → use-collections-DDwKLwWC.js} +1 -1
- package/dist/client/assets/{use-connection-n2su9fBK.js → use-connection-bj-QmeCF.js} +1 -1
- package/dist/client/assets/{use-copy-CV2s0Bln.js → use-copy-TPlwZ6aA.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-G5bEKswL.js → use-create-virtual-mcp-CoJdf93N.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-3i25sE_n.js → use-debounced-autosave-D_Bc7lE0.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C1BvcpjL.js → use-delete-connection-0kzxSS_1.js} +1 -1
- package/dist/client/assets/{use-file-configs-fW8ExhxC.js → use-file-configs-BumxkY1W.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DEtplhmh.js → use-infinite-scroll-B0LwAHpI.js} +1 -1
- package/dist/client/assets/{use-join-requests-CPgAASRp.js → use-join-requests-BVChfrSN.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CNXUneAa.js → use-mcp-client-DjnQKDkF.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Dp1bbbjz.js → use-mcp-prompts-7fCwwbYc.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dp1oFDkR.js → use-mcp-tools-CbjkHt5p.js} +1 -1
- package/dist/client/assets/{use-members-CbHGf6Jg.js → use-members-DPAHG5Sy.js} +1 -1
- package/dist/client/assets/{use-mobile-D49EcQdA.js → use-mobile-7oYhfh2a.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-m-7qnjdO.js → use-navigate-to-agent-C1cPyWif.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-FC6WdH_x.js → use-org-auth-client-CywDmsAy.js} +1 -1
- package/dist/client/assets/{use-org-sso-BFPLcR8G.js → use-org-sso-BRBxUiX-.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CEdyJBDf.js → use-organization-roles-Bk3e4nqx.js} +1 -1
- package/dist/client/assets/{use-organization-settings-I56W3q4b.js → use-organization-settings-DeAexlNB.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DeVqfCCu.js → use-registry-connections-B0D0ZFPH.js} +1 -1
- package/dist/client/assets/{use-secrets-DfdiWPHB.js → use-secrets-COBbdB1z.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DBMDawLF.js → use-status-sounds-CwxWlyu5.js} +1 -1
- package/dist/client/assets/{use-view-mode-CVarJF55.js → use-view-mode-DY00qIDT.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-37EwEzlF.js → use-virtual-mcp-Bn261I3R.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CbK39j5Y.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-HNqdvvLG.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-DlzLq1Lb.js → useSuspenseQueries-BZYHmjMQ.js} +1 -1
- package/dist/client/assets/{variant-calendar-D1ngj2k8.js → variant-calendar-Ds28F-NA.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CoFBmpiz.js → view-mode-toggle-e9BSYjzY.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-B4lXhQN9.js +0 -1
- package/dist/client/assets/project-app-view-zNAcdk0L.js +0 -1
- package/dist/client/assets/record-editor-CTIyv7ob.js +0 -1
- package/dist/client/assets/registry-eX771F2z.js +0 -2
- package/dist/client/assets/store-registry-BYI63lgN.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Do3-OeIV.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-7BcKLQOb.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,l as w,j as r,r as T,bg as A,bF as H,B as P}from"./index-DLQ4JwZN.js";import{i as R}from"./LayoutLeft-DiBhmi5f.js";import{u as V}from"./use-mobile-D49EcQdA.js";import{d as W,b as F,S as G,a as L,c as q}from"./sheet-DAwn9AHA.js";import{c as D,b as B,a as E,T as z}from"./tooltip-BBVKuVWA.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(F,{className:"sr-only",children:[r.jsx(G,{children:"Sidebar"}),r.jsx(L,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(q,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{xe as S,he as a,pe as b,be as c,me as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
1
|
+
import{c as S,l as w,j as r,r as T,bg as A,bF as H,B as P}from"./index-BwVMeD3q.js";import{i as R}from"./LayoutLeft-DIu4qlvA.js";import{u as V}from"./use-mobile-7oYhfh2a.js";import{d as W,b as F,S as G,a as L,c as q}from"./sheet-DaEm5-cm.js";import{c as D,b as B,a as E,T as z}from"./tooltip-_TcC7QSJ.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function le(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function re(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(F,{className:"sr-only",children:[r.jsx(G,{children:"Sidebar"}),r.jsx(L,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(q,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function ne(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function xe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function he(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{xe as S,he as a,pe as b,be as c,me as d,fe as e,ue as f,re as g,de as h,ce as i,oe as j,le as k,ie as l,ne as m,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as c,j as i}from"./index-
|
|
1
|
+
import{c as n,l as c,j as i}from"./index-BwVMeD3q.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as Ft,a as Tn,z as pr,p as vr,n as mr,j as i,B as Ye,t as Le,r as u,m as br,b as xr,i as At,w as J,K as ht,c as yr,C as wr,L as Cr,l as Sr,k as Dr,ah as z,aQ as ft}from"./index-DLQ4JwZN.js";import{g as Rr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as kn,g as jr,C as Ht}from"./connection-card-DwO2q63k.js";import{C as Nr}from"./collection-search-BHxcuieJ.js";import{C as Ir}from"./collection-tabs-BMqIu2hn.js";import{a as Ar,b as Er,e as Tr,g as _r}from"./extract-connection-data-Bmmw_I_H.js";import{a as Mn,b as On,c as Pn,d as Ln,e as kr,D as Mr}from"./dialog-CaTEiJVO.js";import{D as Or,a as Pr,c as Lr,b as Fr,d as zr,e as Br,f as $r}from"./drawer-BAJPoLOE.js";import{u as Vr}from"./use-mobile-D49EcQdA.js";import{F as De,b as Re,c as je,d as Ne,e as Ie,a as fn}from"./form-BWIorvmY.js";import{I as He}from"./input-BFLS6IB9.js";import{d as Xr,b as Kr,c as Ur,S as Hr,a as ut}from"./select-C0lOOEoK.js";import{T as Yr}from"./textarea-DUeOU9F3.js";import{b as Fn}from"./use-connection-n2su9fBK.js";import{n as Et,c as Yt}from"./XCircle-CAZvEkjb.js";import{s as Wt}from"./Star01-Ccb8Hi5b.js";import{a5 as Wr}from"./agent-icon-DC15QH5N.js";import{s as qr}from"./XClose-ssDuFEQg.js";import{c as Gr,i as Dt,a as hn,E as Jr,p as Qr,b as Zr,d as eo}from"./connection-form-helpers-_UdmyYSC.js";import{u as gn}from"./use-infinite-scroll-DEtplhmh.js";import{a as qt}from"./authenticate-and-persist-oauth-DJxmh0FS.js";import{B as Rt}from"./badge-CXqt8LsO.js";import{T as Gt,a as Jt,b as Qt}from"./tooltip-BBVKuVWA.js";import{u as to}from"./useSuspenseInfiniteQuery-7BcKLQOb.js";import{S as no,u as ro}from"./use-mcp-client-CNXUneAa.js";import{i as pn}from"./ChevronUp-BCrNzv-A.js";import{s as oo}from"./Plus-CexM6aI0.js";import{u as so}from"./studio-tools-COOhA4uQ.js";import{u as io}from"./use-ai-providers-BI7Dx3UD.js";function ao(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function Pi(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function co(t){return!!ao(t??null)?.connectionId}function Li(t){return co(t)}function Fi(t){const e=new Set;for(const n of t??[]){const r=n.metadata?.liveAgentId;typeof r=="string"&&r&&e.add(n.id)}return e}function zi(t){const e=new Map,n=new Map;for(const r of t??[]){const o=r.metadata?.liveAgentId;typeof o=="string"&&o&&(n.set(r.id,o),e.set(o,r.id))}return{liveToDev:e,devToLive:n}}function Bi(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return{mode:"dev",targetId:n};const r=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return r?{mode:"live",targetId:r.id}:null}function $i(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}function lo({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Ft(),{data:o}=Tn.useSession(),{stdioEnabled:s}=pr(),a=Vr(),c=Fn(),l=_n(),h=kn(l,"").items,d=vr({resolver:mr(Gr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),m=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:m??"",npxPackage:N??""})??hn({uiType:g,connectionUrl:m??"",registryItems:h}),v=p=>{const y=p.trim();if(!y)return;const b=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,O=E=>{if(E&&(!b&&!d.getValues("title").trim()&&E.title&&d.setValue("title",E.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&E.description&&d.setValue("description",E.description,{shouldDirty:!1}),!I&&E.envVarKeys?.length)){const B=d.getValues("env_vars")??[],ae=new Set(B.map(Y=>Y.key)),X=E.envVarKeys.filter(Y=>!ae.has(Y));X.length>0&&d.setValue("env_vars",[...B,...X.map(Y=>({key:Y,value:""}))],{shouldDirty:!0})}},k=Qr(y);if(k&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),O(Dt({uiType:"NPX",npxPackage:k.packageName}));return}if(y.startsWith("http://")||y.startsWith("https://")){const E=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",E,{shouldDirty:!0}),d.setValue("connection_url",y,{shouldDirty:!0}),O(Dt({uiType:E,connectionUrl:y})??hn({uiType:E,connectionUrl:y,registryItems:h}));return}g==="NPX"&&O(Dt({uiType:"NPX",npxPackage:y}))},R=p=>{p||d.reset(),e(p)},C=async p=>{let y,b=null,w=null,I=null;p.ui_type==="NPX"?(y="STDIO",b="",I=Zr(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(y="STDIO",b="",I=eo(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(y=p.ui_type,b=p.connection_url||"",w=p.connection_token||null);const O=Ar("conn");try{await c.create.mutateAsync({id:O,title:p.title,description:p.description||null,connection_type:y,connection_url:b,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(O)}catch{Le.error("Failed to create connection")}},S="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",T=d.formState.isSubmitting?"Saving...":"Create Connection",A=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Type *"}),i.jsxs(Xr,{value:p.value,onValueChange:p.onChange,children:[i.jsx(Ne,{children:i.jsx(Kr,{children:i.jsx(Ur,{})})}),i.jsxs(Hr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"@perplexity-ai/mcp-server",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("npx_package",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"node, bun, python...",...p,value:p.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"arg1 arg2 --flag value",...p,value:p.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"/path/to/project (optional)",...p,value:p.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Jr,{value:p.value??[],onChange:p.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"https://example.com/mcp",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("connection_url",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(He,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...p,value:p.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"My Connection",...p})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Yr,{placeholder:"A brief description of this connection",rows:3,...p,value:p.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(Or,{open:t,onOpenChange:R,children:i.jsxs(Pr,{className:"max-h-[90vh]",children:[i.jsx(Lr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Fr,{children:S}),i.jsx(zr,{className:"mt-1",children:j})]}),i.jsx(Br,{asChild:!0,children:i.jsx(Ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(qr,{size:16})})})]})}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:A}),i.jsx($r,{children:i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:T})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:R,children:i.jsxs(On,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:S}),i.jsx(kr,{children:j})]}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"py-4",children:A}),i.jsxs(Mr,{children:[i.jsx(Ye,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:T})]})]})})]})})}function uo(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,m=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Ft(),v=u.useDeferredValue(f),R=f!==v,C=v.trim().toLowerCase();let S;e[0]!==N?(S=D=>D??N,e[0]=N,e[1]=S):S=e[1];const[j,T]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),S);let A;e[2]!==j||e[3]!==T?(A=D=>{D!==j&&J("connections_dialog_tab_changed",{to_tab:D}),T(D)},e[2]=j,e[3]=T,e[4]=A):A=e[4];const p=A;let y;e[5]!==x.id||e[6]!==x.slug?(y={connectionId:no,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=y):y=e[7];const b=ro(y);let w,I,O;if(e[8]!==b||e[9]!==v||e[10]!==x.id){O=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},P=JSON.stringify(D);I=to,w=ht.collectionListInfinite(b,x.id,"","CONNECTIONS",P),e[8]=b,e[9]=v,e[10]=x.id,e[11]=w,e[12]=I,e[13]=O}else w=e[11],I=e[12],O=e[13];let k;e[14]!==b||e[15]!==O?(k=async D=>{const{pageParam:P}=D,de=P===void 0?0:P;return(await b.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=b,e[15]=O,e[16]=k):k=e[16];let E;e[17]!==w||e[18]!==k?(E={queryKey:w,queryFn:k,initialPageParam:0,getNextPageParam:mo,staleTime:3e4},e[17]=w,e[18]=k,e[19]=E):E=e[19];const{data:B,fetchNextPage:ae,hasNextPage:X,isFetchingNextPage:Y}=I(E),ce=B?.pages.flatMap(vo)??[],xe=jr(ce),qe=new Set(ce.filter(po).map(go)),$=_n(),U=kn($,v),he=gn(U.loadMore,U.hasMore,U.isLoadingMore),Ae=gn(ae,X??!1,Y),L=j==="all"||!!C,Ue=L?U.items.filter(D=>{const P=Er(D);if(P&&qe.has(P))return!1;if(!C)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(C)}):[],Z=Ue.filter(ho),W=Ue.filter(fo);let M;e[20]!==o?(M=D=>D.some(P=>o.has(P.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let q;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==m||e[27]!==s||e[28]!==d||e[29]!==a?(q=(D,P,de,ze,ve)=>{const Ze=Ee(ve),Be=ve.find(F=>!o.has(F.id)),te=ve[0];if(m==="browse"){const F=Rr(te);return i.jsx(Ht,{connection:{title:P,icon:de,description:ve.length>1?`${ve.length} instances`:ze??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Connected"]}),onClick:()=>{J("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:ve.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:P,icon:de,description:ze},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Added"]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),Be?(J("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:Be.id}),r&&J("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:te.app_name??null,mode:"existing"}),s(Be.id)):(J("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=m,e[27]=s,e[28]=d,e[29]=a,e[30]=q):q=e[30];const ge=q;let ee;e[31]!==l||e[32]!==m||e[33]!==c?(ee=D=>{const P=D._meta?.["mcp.mesh"],de=P?.friendlyName||P?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,ve=D.server?.icons?.[0]?.src||_r(D.server?.repository)||null,Ze=P?.official===!0,Be=P?.verified===!0,te=P?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:ze,icon:ve},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Qt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Yt,{})})}),i.jsx(Qt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&Be&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Yt,{})})}),i.jsx(Qt,{children:"Verified by the Deco team"})]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),J("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:P?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(At,{size:14,className:"animate-spin"}):m==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=m,e[33]=c,e[34]=ee):ee=e[34];const Te=ee,ye=!C&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ir,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>p(D)}),i.jsxs(Ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{J("connections_dialog_custom_clicked"),h()},children:[i.jsx(oo,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let _e;e[35]!==Ge?(_e=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=_e):_e=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ne;e[37]!==ge?(ne=D=>{if(D.type==="group")return ge(D.key,D.title,D.icon,null,D.connections);const P=D.connection;return ge(P.id,P.title,P.icon,P.description??null,[P])},e[37]=ge,e[38]=ne):ne=e[38];const Fe=xe.map(ne);let pe;e[39]!==Ae?(pe=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=pe):pe=e[40];let ke;e[41]!==Y?(ke=Y&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=Y,e[42]=ke):ke=e[42];const Je=L&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Yt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=L&&Z.map(Te),at=L&&W.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=L&&W.map(Te);let re;e[43]!==he||e[44]!==$||e[45]!==L?(re=L&&$.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=$,e[45]=L,e[46]=re):re=e[46];let le;e[47]!==U.isLoadingMore||e[48]!==L?(le=L&&U.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=U.isLoadingMore,e[48]=L,e[49]=le):le=e[49];let Me;e[50]!==Fe||e[51]!==pe||e[52]!==ke||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==re||e[58]!==le?(Me=i.jsxs("div",{className:st,children:[Fe,pe,ke,Je,it,at,we,re,le]}),e[50]=Fe,e[51]=pe,e[52]=ke,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=re,e[58]=le,e[59]=Me):Me=e[59];let G;e[60]!==j||e[61]!==xe.length||e[62]!==W||e[63]!==f||e[64]!==Z?(G=xe.length===0&&Z.length===0&&W.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=W,e[63]=f,e[64]=Z,e[65]=G):G=e[65];let Oe;e[66]!==_e||e[67]!==Me||e[68]!==G?(Oe=i.jsxs("div",{className:_e,children:[Me,G]}),e[66]=_e,e[67]=Me,e[68]=G,e[69]=Oe):Oe=e[69];let Qe;return e[70]!==ye||e[71]!==Oe?(Qe=i.jsxs(i.Fragment,{children:[ye,Oe]}),e[70]=ye,e[71]=Oe,e[72]=Qe):Qe=e[72],Qe}function fo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function ho(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function go(t){return t.app_name}function po(t){return t.app_name}function vo(t){return t?.items??[]}function mo(t,e){if(t?.hasMore)return e.reduce(bo,0)}function bo(t,e){return t+(e?.items?.length??0)}function Vi({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:b=>{},f=(b,w,I)=>{a&&J("agent_connection_attached",{agent_id:a,connection_id:b,app_name:w,mode:I})},[h,d]=u.useState(null),[g,m]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Ft(),{data:R}=Tn.useSession(),C=Fn(),S=br(),j=xr(),T=b=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},A=()=>{S.invalidateQueries({predicate:b=>{const w=b.queryKey;return w[1]===v.id&&w[3]==="collection"&&w[4]==="CONNECTIONS"}})},p=async b=>{d(b.app_name??b.id);try{const I=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,k=(await C.create.mutateAsync({title:I,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,E=await qt({connectionId:k,orgId:v.id,orgSlug:v.slug,persistFallback:B=>C.update.mutateAsync({id:k,data:{connection_token:B}}).then(()=>{})});if(E.ran&&!E.ok){J("connection_oauth_failed",{connection_id:k,flow:"clone",error:E.error??"no_token"}),Le.error(`Authentication failed: ${E.error??"no token received"}`),await C.delete.mutateAsync(k);return}if(E.ran){J("connection_oauth_succeeded",{connection_id:k,flow:"clone"});const B=new URL(`/api/${v.slug}/mcp/${k}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(B.href,null)}),A()}f(k,b.app_name??null,"clone"),l(k)}catch(w){console.error("Failed to add connection:",w),Le.error("Failed to add connection")}finally{d(null)}},y=async b=>{if(!(!v||!R?.user?.id)){d(b.id);try{const w=Tr(b,v.id,R.user.id,{remoteIndex:0}),I=w.connection_type==="STDIO",O=!!w.connection_url,k=I&&w.connection_headers&&typeof w.connection_headers=="object"&&"command"in w.connection_headers;if(!O&&!k){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:E}=await C.create.mutateAsync(w),B=await qt({connectionId:E,orgId:v.id,orgSlug:v.slug,persistFallback:ae=>C.update.mutateAsync({id:E,data:{connection_token:ae}}).then(()=>{})});if(B.ran&&!B.ok){J("connection_oauth_failed",{connection_id:E,flow:"connect_new",error:B.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${B.error??"no token received"})`}),f(E,w.app_name??null,"new"),l(E);return}if(B.ran){J("connection_oauth_succeeded",{connection_id:E,flow:"connect_new"});const ae=new URL(`/api/${v.slug}/mcp/${E}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(ae.href,null)}),A(),Le.success("Connected and authenticated")}else Le.success("Connected");f(E,w.app_name??null,"new"),l(E)}catch(w){console.error("Failed to connect:",w),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(On,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Nr,{value:g,onChange:m,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(uo,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:p,onConnectAndAdd:y,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:T,defaultTab:n})})]}),i.jsx(lo,{open:N,onOpenChange:x,onCreated:async b=>{x(!1);const w=await qt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:I=>C.update.mutateAsync({id:b,data:{connection_token:I}}).then(()=>{})});if(w.ran&&!w.ok){J("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:w.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),f(b,null,"custom"),l(b),e(!1);return}if(w.ran){J("connection_oauth_succeeded",{connection_id:b,flow:"custom_create"});const I=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(I.href,null)}),A()}f(b,null,"custom"),l(b),e(!1)}})]})}const vn=new Map;function Xi(){const{org:t}=Ft(),e=so(),n=io(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Dr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&J("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,m=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:m,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function xo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function an(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:an(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function cn(t){const{Document:e}=Q(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function zn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:an(t)?cn(t)?t:yt(t)||zn(t)?t.ownerDocument:document:document:document}const me=zt?u.useLayoutEffect:u.useEffect;function Bt(t){const e=u.useRef(t);return me(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function yo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return me(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function _t(t){const e=Bt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function kt(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function Bn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=Bn(1),bt=Bn(-1);function wo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function Co(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Mt(t){if(Co(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return wo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),mn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function So(t){return t.matches(mn)?t:t.querySelector(mn)}const Do={display:"none"};function Ro(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:Do},n)}function jo(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function No(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const $n=u.createContext(null);function Io(t){const e=u.useContext($n);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Ao(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Eo={draggable:`
|
|
1
|
+
import{D as Ft,a as Tn,z as pr,p as vr,n as mr,j as i,B as Ye,t as Le,r as u,m as br,b as xr,i as At,w as J,K as ht,c as yr,C as wr,L as Cr,l as Sr,k as Dr,ah as z,aQ as ft}from"./index-BwVMeD3q.js";import{g as Rr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as kn,g as jr,C as Ht}from"./connection-card-BvZozJYf.js";import{C as Nr}from"./collection-search-BaiviTLW.js";import{C as Ir}from"./collection-tabs-gJzAs0-U.js";import{a as Ar,b as Er,e as Tr,g as _r}from"./extract-connection-data-HZVgcUqH.js";import{a as Mn,b as On,c as Pn,d as Ln,e as kr,D as Mr}from"./dialog-Djo11OZ8.js";import{D as Or,a as Pr,c as Lr,b as Fr,d as zr,e as Br,f as $r}from"./drawer-CGy7XhOb.js";import{u as Vr}from"./use-mobile-7oYhfh2a.js";import{F as De,b as Re,c as je,d as Ne,e as Ie,a as fn}from"./form-Bws9hvDL.js";import{I as He}from"./input-C8pdmexi.js";import{d as Xr,b as Kr,c as Ur,S as Hr,a as ut}from"./select-UKSqIIxL.js";import{T as Yr}from"./textarea-LTBnL6Dv.js";import{b as Fn}from"./use-connection-bj-QmeCF.js";import{n as Et,c as Yt}from"./XCircle-DAQ6sXs1.js";import{s as Wt}from"./Star01-BNPre7m8.js";import{a5 as Wr}from"./agent-icon-B_lvSp90.js";import{s as qr}from"./XClose-CD3EJbwD.js";import{c as Gr,i as Dt,a as hn,E as Jr,p as Qr,b as Zr,d as eo}from"./connection-form-helpers-BXpJ-39p.js";import{u as gn}from"./use-infinite-scroll-B0LwAHpI.js";import{a as qt}from"./authenticate-and-persist-oauth-B-HUI4Rh.js";import{B as Rt}from"./badge-yqmEwWNw.js";import{T as Gt,a as Jt,b as Qt}from"./tooltip-_TcC7QSJ.js";import{u as to}from"./useSuspenseInfiniteQuery-HNqdvvLG.js";import{S as no,u as ro}from"./use-mcp-client-DjnQKDkF.js";import{i as pn}from"./ChevronUp-Bj5wnP8v.js";import{s as oo}from"./Plus-CXJQYPWf.js";import{u as so}from"./studio-tools-Cj1fBaXp.js";import{u as io}from"./use-ai-providers-Mmhw_1Og.js";function ao(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function Pi(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function co(t){return!!ao(t??null)?.connectionId}function Li(t){return co(t)}function Fi(t){const e=new Set;for(const n of t??[]){const r=n.metadata?.liveAgentId;typeof r=="string"&&r&&e.add(n.id)}return e}function zi(t){const e=new Map,n=new Map;for(const r of t??[]){const o=r.metadata?.liveAgentId;typeof o=="string"&&o&&(n.set(r.id,o),e.set(o,r.id))}return{liveToDev:e,devToLive:n}}function Bi(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return{mode:"dev",targetId:n};const r=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return r?{mode:"live",targetId:r.id}:null}function $i(t){return t.online?t.capabilities.includes("claude-code")||t.capabilities.includes("codex"):!1}function lo({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Ft(),{data:o}=Tn.useSession(),{stdioEnabled:s}=pr(),a=Vr(),c=Fn(),l=_n(),h=kn(l,"").items,d=vr({resolver:mr(Gr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),m=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:m??"",npxPackage:N??""})??hn({uiType:g,connectionUrl:m??"",registryItems:h}),v=p=>{const y=p.trim();if(!y)return;const b=!!d.formState.dirtyFields.title,w=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,O=E=>{if(E&&(!b&&!d.getValues("title").trim()&&E.title&&d.setValue("title",E.title,{shouldDirty:!1}),!w&&!(d.getValues("description")??"").trim()&&E.description&&d.setValue("description",E.description,{shouldDirty:!1}),!I&&E.envVarKeys?.length)){const B=d.getValues("env_vars")??[],ae=new Set(B.map(Y=>Y.key)),X=E.envVarKeys.filter(Y=>!ae.has(Y));X.length>0&&d.setValue("env_vars",[...B,...X.map(Y=>({key:Y,value:""}))],{shouldDirty:!0})}},k=Qr(y);if(k&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",k.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),O(Dt({uiType:"NPX",npxPackage:k.packageName}));return}if(y.startsWith("http://")||y.startsWith("https://")){const E=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",E,{shouldDirty:!0}),d.setValue("connection_url",y,{shouldDirty:!0}),O(Dt({uiType:E,connectionUrl:y})??hn({uiType:E,connectionUrl:y,registryItems:h}));return}g==="NPX"&&O(Dt({uiType:"NPX",npxPackage:y}))},R=p=>{p||d.reset(),e(p)},C=async p=>{let y,b=null,w=null,I=null;p.ui_type==="NPX"?(y="STDIO",b="",I=Zr(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(y="STDIO",b="",I=eo(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(y=p.ui_type,b=p.connection_url||"",w=p.connection_token||null);const O=Ar("conn");try{await c.create.mutateAsync({id:O,title:p.title,description:p.description||null,connection_type:y,connection_url:b,connection_token:w,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(O)}catch{Le.error("Failed to create connection")}},S="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",T=d.formState.isSubmitting?"Saving...":"Create Connection",A=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Type *"}),i.jsxs(Xr,{value:p.value,onValueChange:p.onChange,children:[i.jsx(Ne,{children:i.jsx(Kr,{children:i.jsx(Ur,{})})}),i.jsxs(Hr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Wr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"@perplexity-ai/mcp-server",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("npx_package",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"node, bun, python...",...p,value:p.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"arg1 arg2 --flag value",...p,value:p.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"/path/to/project (optional)",...p,value:p.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Jr,{value:p.value??[],onChange:p.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"https://example.com/mcp",...p,value:p.value??"",onPaste:y=>{const b=y.clipboardData.getData("text");b&&(y.preventDefault(),d.setValue("connection_url",b.trim(),{shouldDirty:!0}),v(b))},onBlur:y=>{v(y.target.value),p.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(He,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...p,value:p.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(He,{placeholder:"My Connection",...p})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:p})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Yr,{placeholder:"A brief description of this connection",rows:3,...p,value:p.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(Or,{open:t,onOpenChange:R,children:i.jsxs(Pr,{className:"max-h-[90vh]",children:[i.jsx(Lr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Fr,{children:S}),i.jsx(zr,{className:"mt-1",children:j})]}),i.jsx(Br,{asChild:!0,children:i.jsx(Ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(qr,{size:16})})})]})}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:A}),i.jsx($r,{children:i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:T})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:R,children:i.jsxs(On,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:S}),i.jsx(kr,{children:j})]}),i.jsx(fn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(C),children:[i.jsx("div",{className:"py-4",children:A}),i.jsxs(Mr,{children:[i.jsx(Ye,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(Ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:T})]})]})})]})})}function uo(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,m=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Ft(),v=u.useDeferredValue(f),R=f!==v,C=v.trim().toLowerCase();let S;e[0]!==N?(S=D=>D??N,e[0]=N,e[1]=S):S=e[1];const[j,T]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),S);let A;e[2]!==j||e[3]!==T?(A=D=>{D!==j&&J("connections_dialog_tab_changed",{to_tab:D}),T(D)},e[2]=j,e[3]=T,e[4]=A):A=e[4];const p=A;let y;e[5]!==x.id||e[6]!==x.slug?(y={connectionId:no,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=y):y=e[7];const b=ro(y);let w,I,O;if(e[8]!==b||e[9]!==v||e[10]!==x.id){O=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},P=JSON.stringify(D);I=to,w=ht.collectionListInfinite(b,x.id,"","CONNECTIONS",P),e[8]=b,e[9]=v,e[10]=x.id,e[11]=w,e[12]=I,e[13]=O}else w=e[11],I=e[12],O=e[13];let k;e[14]!==b||e[15]!==O?(k=async D=>{const{pageParam:P}=D,de=P===void 0?0:P;return(await b.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...O&&{where:O},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=b,e[15]=O,e[16]=k):k=e[16];let E;e[17]!==w||e[18]!==k?(E={queryKey:w,queryFn:k,initialPageParam:0,getNextPageParam:mo,staleTime:3e4},e[17]=w,e[18]=k,e[19]=E):E=e[19];const{data:B,fetchNextPage:ae,hasNextPage:X,isFetchingNextPage:Y}=I(E),ce=B?.pages.flatMap(vo)??[],xe=jr(ce),qe=new Set(ce.filter(po).map(go)),$=_n(),U=kn($,v),he=gn(U.loadMore,U.hasMore,U.isLoadingMore),Ae=gn(ae,X??!1,Y),L=j==="all"||!!C,Ue=L?U.items.filter(D=>{const P=Er(D);if(P&&qe.has(P))return!1;if(!C)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(C)}):[],Z=Ue.filter(ho),W=Ue.filter(fo);let M;e[20]!==o?(M=D=>D.some(P=>o.has(P.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let q;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==m||e[27]!==s||e[28]!==d||e[29]!==a?(q=(D,P,de,ze,ve)=>{const Ze=Ee(ve),Be=ve.find(F=>!o.has(F.id)),te=ve[0];if(m==="browse"){const F=Rr(te);return i.jsx(Ht,{connection:{title:P,icon:de,description:ve.length>1?`${ve.length} instances`:ze??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Connected"]}),onClick:()=>{J("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:ve.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:P,icon:de,description:ze},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(pn,{size:11})," Added"]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),Be?(J("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:Be.id}),r&&J("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:te.app_name??null,mode:"existing"}),s(Be.id)):(J("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=m,e[27]=s,e[28]=d,e[29]=a,e[30]=q):q=e[30];const ge=q;let ee;e[31]!==l||e[32]!==m||e[33]!==c?(ee=D=>{const P=D._meta?.["mcp.mesh"],de=P?.friendlyName||P?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,ve=D.server?.icons?.[0]?.src||_r(D.server?.repository)||null,Ze=P?.official===!0,Be=P?.verified===!0,te=P?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:ze,icon:ve},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Qt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Yt,{})})}),i.jsx(Qt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&Be&&i.jsxs(Gt,{children:[i.jsx(Jt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Yt,{})})}),i.jsx(Qt,{children:"Verified by the Deco team"})]}),i.jsx(Ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),J("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:P?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(At,{size:14,className:"animate-spin"}):m==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=m,e[33]=c,e[34]=ee):ee=e[34];const Te=ee,ye=!C&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ir,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>p(D)}),i.jsxs(Ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{J("connections_dialog_custom_clicked"),h()},children:[i.jsx(oo,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let _e;e[35]!==Ge?(_e=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=_e):_e=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ne;e[37]!==ge?(ne=D=>{if(D.type==="group")return ge(D.key,D.title,D.icon,null,D.connections);const P=D.connection;return ge(P.id,P.title,P.icon,P.description??null,[P])},e[37]=ge,e[38]=ne):ne=e[38];const Fe=xe.map(ne);let pe;e[39]!==Ae?(pe=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=pe):pe=e[40];let ke;e[41]!==Y?(ke=Y&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=Y,e[42]=ke):ke=e[42];const Je=L&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Yt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=L&&Z.map(Te),at=L&&W.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=L&&W.map(Te);let re;e[43]!==he||e[44]!==$||e[45]!==L?(re=L&&$.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=$,e[45]=L,e[46]=re):re=e[46];let le;e[47]!==U.isLoadingMore||e[48]!==L?(le=L&&U.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=U.isLoadingMore,e[48]=L,e[49]=le):le=e[49];let Me;e[50]!==Fe||e[51]!==pe||e[52]!==ke||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==re||e[58]!==le?(Me=i.jsxs("div",{className:st,children:[Fe,pe,ke,Je,it,at,we,re,le]}),e[50]=Fe,e[51]=pe,e[52]=ke,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=re,e[58]=le,e[59]=Me):Me=e[59];let G;e[60]!==j||e[61]!==xe.length||e[62]!==W||e[63]!==f||e[64]!==Z?(G=xe.length===0&&Z.length===0&&W.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=W,e[63]=f,e[64]=Z,e[65]=G):G=e[65];let Oe;e[66]!==_e||e[67]!==Me||e[68]!==G?(Oe=i.jsxs("div",{className:_e,children:[Me,G]}),e[66]=_e,e[67]=Me,e[68]=G,e[69]=Oe):Oe=e[69];let Qe;return e[70]!==ye||e[71]!==Oe?(Qe=i.jsxs(i.Fragment,{children:[ye,Oe]}),e[70]=ye,e[71]=Oe,e[72]=Qe):Qe=e[72],Qe}function fo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function ho(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function go(t){return t.app_name}function po(t){return t.app_name}function vo(t){return t?.items??[]}function mo(t,e){if(t?.hasMore)return e.reduce(bo,0)}function bo(t,e){return t+(e?.items?.length??0)}function Vi({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:b=>{},f=(b,w,I)=>{a&&J("agent_connection_attached",{agent_id:a,connection_id:b,app_name:w,mode:I})},[h,d]=u.useState(null),[g,m]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Ft(),{data:R}=Tn.useSession(),C=Fn(),S=br(),j=xr(),T=b=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},A=()=>{S.invalidateQueries({predicate:b=>{const w=b.queryKey;return w[1]===v.id&&w[3]==="collection"&&w[4]==="CONNECTIONS"}})},p=async b=>{d(b.app_name??b.id);try{const I=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,k=(await C.create.mutateAsync({title:I,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,E=await qt({connectionId:k,orgId:v.id,orgSlug:v.slug,persistFallback:B=>C.update.mutateAsync({id:k,data:{connection_token:B}}).then(()=>{})});if(E.ran&&!E.ok){J("connection_oauth_failed",{connection_id:k,flow:"clone",error:E.error??"no_token"}),Le.error(`Authentication failed: ${E.error??"no token received"}`),await C.delete.mutateAsync(k);return}if(E.ran){J("connection_oauth_succeeded",{connection_id:k,flow:"clone"});const B=new URL(`/api/${v.slug}/mcp/${k}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(B.href,null)}),A()}f(k,b.app_name??null,"clone"),l(k)}catch(w){console.error("Failed to add connection:",w),Le.error("Failed to add connection")}finally{d(null)}},y=async b=>{if(!(!v||!R?.user?.id)){d(b.id);try{const w=Tr(b,v.id,R.user.id,{remoteIndex:0}),I=w.connection_type==="STDIO",O=!!w.connection_url,k=I&&w.connection_headers&&typeof w.connection_headers=="object"&&"command"in w.connection_headers;if(!O&&!k){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:E}=await C.create.mutateAsync(w),B=await qt({connectionId:E,orgId:v.id,orgSlug:v.slug,persistFallback:ae=>C.update.mutateAsync({id:E,data:{connection_token:ae}}).then(()=>{})});if(B.ran&&!B.ok){J("connection_oauth_failed",{connection_id:E,flow:"connect_new",error:B.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${B.error??"no token received"})`}),f(E,w.app_name??null,"new"),l(E);return}if(B.ran){J("connection_oauth_succeeded",{connection_id:E,flow:"connect_new"});const ae=new URL(`/api/${v.slug}/mcp/${E}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(ae.href,null)}),A(),Le.success("Connected and authenticated")}else Le.success("Connected");f(E,w.app_name??null,"new"),l(E)}catch(w){console.error("Failed to connect:",w),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(On,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Nr,{value:g,onChange:m,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(uo,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:p,onConnectAndAdd:y,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:T,defaultTab:n})})]}),i.jsx(lo,{open:N,onOpenChange:x,onCreated:async b=>{x(!1);const w=await qt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:I=>C.update.mutateAsync({id:b,data:{connection_token:I}}).then(()=>{})});if(w.ran&&!w.ok){J("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:w.error??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),f(b,null,"custom"),l(b),e(!1);return}if(w.ran){J("connection_oauth_succeeded",{connection_id:b,flow:"custom_create"});const I=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await S.invalidateQueries({queryKey:ht.isMCPAuthenticated(I.href,null)}),A()}f(b,null,"custom"),l(b),e(!1)}})]})}const vn=new Map;function Xi(){const{org:t}=Ft(),e=so(),n=io(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Dr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&J("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,m=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:m,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function xo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function an(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:an(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function cn(t){const{Document:e}=Q(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function zn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:an(t)?cn(t)?t:yt(t)||zn(t)?t.ownerDocument:document:document:document}const me=zt?u.useLayoutEffect:u.useEffect;function Bt(t){const e=u.useRef(t);return me(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function yo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return me(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function _t(t){const e=Bt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function kt(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function Bn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=Bn(1),bt=Bn(-1);function wo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function Co(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Mt(t){if(Co(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return wo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),mn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function So(t){return t.matches(mn)?t:t.querySelector(mn)}const Do={display:"none"};function Ro(t){let{id:e,value:n}=t;return z.createElement("div",{id:e,style:Do},n)}function jo(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function No(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const $n=u.createContext(null);function Io(t){const e=u.useContext($n);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Ao(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Eo={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as _,r as v,j as e,B as p,w as S,t as c,c as N}from"./index-
|
|
1
|
+
import{D as _,r as v,j as e,B as p,w as S,t as c,c as N}from"./index-BwVMeD3q.js";import{D as k}from"./domain-settings-Qv_TUecy.js";import{P as f}from"./index-Cyi-U3f4.js";import{I as l}from"./input-C8pdmexi.js";import{S as z}from"./switch-BlhCItPG.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-BRBxUiX-.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-uysJimh1.js";import{s as L}from"./Trash01-Csom-OmK.js";import{R as q}from"./require-capability-D8wtdjJA.js";import"./studio-tools-Cj1fBaXp.js";import"./badge-yqmEwWNw.js";import"./select-UKSqIIxL.js";import"./tooltip-_TcC7QSJ.js";import"./ChevronUp-Bj5wnP8v.js";import"./ChevronDown-DuS1gosF.js";import"./sidebar-CDHrQeMJ.js";import"./LayoutLeft-DIu4qlvA.js";import"./use-mobile-7oYhfh2a.js";import"./sheet-DaEm5-cm.js";import"./X-C23kraKx.js";import"./card-CZci2Ked.js";import"./ArrowUpRight-CrNpVXJQ.js";import"./use-capability-CP1V4i_3.js";import"./access-gate-hq7UmdZv.js";import"./capability-load-error-CFrsagBh.js";function B(){const{org:s}=_(),{data:a,isLoading:E}=P(s.id,s.slug),x=R(s.id,s.slug),h=A(s.id,s.slug),j=T(s.id,s.slug),[t,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},w=async()=>{if(!t.issuer||!t.clientId||!t.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!t.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:t.issuer,clientId:t.clientId,clientSecret:t.clientSecret,discoveryEndpoint:t.discoveryEndpoint||void 0,scopes:t.scopes.split(/\s+/).filter(Boolean),domain:t.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:s.id,email_domain:t.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},b=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:s.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},D=async i=>{try{await j.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:s.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:D,disabled:j.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:b,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${s.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:t.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:t.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:t.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:t.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:t.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:t.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:w,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ue(){const s=N.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),s[0]=a):a=s[0],a}export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,w as te,K as fe,d as ge,t as ie}from"./index-DLQ4JwZN.js";import{i as ue}from"./AlertCircle-CiYXjBCp.js";import{i as pe}from"./ChevronRight-BB8PtdU_.js";import{s as xe}from"./Plus-CexM6aI0.js";import{s as he}from"./Trash01-B5-ciNMB.js";import{I as X}from"./input-BFLS6IB9.js";import{S as oe}from"./switch-B56_YQh-.js";import{S as ye}from"./skeleton-D4R3a4o-.js";import{A as ne}from"./avatar-VLg8_8qy.js";import{P as je,a as Ce,b as Se}from"./popover-BSP7ejLc.js";import{b as re}from"./use-connection-n2su9fBK.js";import{W as Z}from"./use-mcp-client-CNXUneAa.js";import{P as G}from"./index-DFanLV1X.js";import{u as ve}from"./use-registry-connections-DeVqfCCu.js";import{f as _e,g as be}from"./use-organization-settings-I56W3q4b.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-Bk_k5SKB.js";import{R as Re}from"./require-capability-CikSO1sK.js";import"./User01-4kOfLZMN.js";import"./use-collections-olSa4--l.js";import"./auth-fUaquGnI.js";import"./sidebar-g2qAal9U.js";import"./LayoutLeft-DiBhmi5f.js";import"./use-mobile-D49EcQdA.js";import"./sheet-DAwn9AHA.js";import"./X-BKm6Fw1t.js";import"./tooltip-BBVKuVWA.js";import"./studio-tools-COOhA4uQ.js";import"./card-c1tDYTHP.js";import"./ArrowUpRight-D62C8hBG.js";import"./use-capability-GDRaaPxs.js";import"./access-gate-BkA2GKhf.js";import"./capability-load-error-BssWdjEJ.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
|
|
1
|
+
import{c as D,j as s,E as le,r as K,D as ae,m as ce,b as de,e as me,B as Y,w as te,K as fe,d as ge,t as ie}from"./index-BwVMeD3q.js";import{i as ue}from"./AlertCircle-BY01IebW.js";import{i as pe}from"./ChevronRight-DUYBaJAA.js";import{s as xe}from"./Plus-CXJQYPWf.js";import{s as he}from"./Trash01-Csom-OmK.js";import{I as X}from"./input-C8pdmexi.js";import{S as oe}from"./switch-BlhCItPG.js";import{S as ye}from"./skeleton-CjN5A6XL.js";import{A as ne}from"./avatar-CjYG3-98.js";import{P as je,a as Ce,b as Se}from"./popover-cxXkvARj.js";import{b as re}from"./use-connection-bj-QmeCF.js";import{W as Z}from"./use-mcp-client-DjnQKDkF.js";import{P as G}from"./index-Cyi-U3f4.js";import{u as ve}from"./use-registry-connections-B0D0ZFPH.js";import{f as _e,g as be}from"./use-organization-settings-DeAexlNB.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-uysJimh1.js";import{R as Re}from"./require-capability-D8wtdjJA.js";import"./User01-rB66Yp8m.js";import"./use-collections-DDwKLwWC.js";import"./auth-CdNUf-u6.js";import"./sidebar-CDHrQeMJ.js";import"./LayoutLeft-DIu4qlvA.js";import"./use-mobile-7oYhfh2a.js";import"./sheet-DaEm5-cm.js";import"./X-C23kraKx.js";import"./tooltip-_TcC7QSJ.js";import"./studio-tools-Cj1fBaXp.js";import"./card-CZci2Ked.js";import"./ArrowUpRight-CrNpVXJQ.js";import"./use-capability-CP1V4i_3.js";import"./access-gate-hq7UmdZv.js";import"./capability-load-error-CFrsagBh.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-JxXagtmN.js","assets/index-BwVMeD3q.js","assets/index-NVhaWgyE.css","assets/XCircle-DAQ6sXs1.js","assets/CheckCircle-UPyj94ce.js","assets/Settings02-Qog-9BW9.js","assets/use-mcp-client-DjnQKDkF.js","assets/auth-CdNUf-u6.js","assets/useInfiniteQuery-CbK39j5Y.js","assets/use-infinite-scroll-B0LwAHpI.js","assets/studio-tools-Cj1fBaXp.js","assets/badge-yqmEwWNw.js","assets/input-C8pdmexi.js","assets/dropdown-menu-CuiF-07J.js","assets/ChevronUp-Bj5wnP8v.js","assets/ChevronRight-DUYBaJAA.js","assets/DotsVertical-BoWHOZg-.js","assets/table-Bt_fbenL.js","assets/toggle-group-DLR6cnlJ.js","assets/use-view-mode-DY00qIDT.js","assets/use-mobile-7oYhfh2a.js","assets/FilterLines-BcDA53T2.js","assets/Globe01-CtRTi-q3.js","assets/SearchMd--1Uwo-4h.js","assets/dialog-Djo11OZ8.js","assets/X-C23kraKx.js","assets/AlertCircle-BY01IebW.js","assets/Upload01-BKLWvYK3.js","assets/alert-dialog-CsikfeuV.js","assets/card-CZci2Ked.js","assets/Trash01-Csom-OmK.js","assets/label-6fUzynqC.js","assets/select-UKSqIIxL.js","assets/tooltip-_TcC7QSJ.js","assets/ChevronDown-DuS1gosF.js","assets/switch-BlhCItPG.js","assets/textarea-LTBnL6Dv.js","assets/checkbox-CnyL8XHl.js","assets/Eye-BN8eZd3q.js","assets/LinkExternal01-Dyt9zIKA.js","assets/use-copy-TPlwZ6aA.js","assets/Key01-BcXniqTr.js","assets/Plus-CXJQYPWf.js","assets/mcp-oauth-DOYfP2o1.js","assets/Play-Ds_dyiCJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as m,b as n,e as c,j as t,i as p,r as l,am as f}from"./index-BwVMeD3q.js";import{R as u}from"./require-capability-D8wtdjJA.js";import"./use-capability-CP1V4i_3.js";import"./access-gate-hq7UmdZv.js";import"./capability-load-error-CFrsagBh.js";const g=l.lazy(()=>f(()=>import("./registry-layout-JxXagtmN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,D as i}from"./index-
|
|
1
|
+
import{c,D as i}from"./index-BwVMeD3q.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,V as C,_ as y,a3 as T,W as I,bK as M,bJ as H,Y as z,c as A,l as g}from"./index-
|
|
1
|
+
import{r as c,j as i,V as C,_ as y,a3 as T,W as I,bK as M,bJ as H,Y as z,c as A,l as g}from"./index-BwVMeD3q.js";var m="Switch",[U]=z(m),[q,L]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",_=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});_.displayName=P;var O="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=O;function j(a){return a?"checked":"unchecked"}var W=E,$=_;function F(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(W,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{F as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,l as i,j as r}from"./index-
|
|
1
|
+
import{c,l as i,j as r}from"./index-BwVMeD3q.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,f as d,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as d,bb as k,V as p,W as T,bc as y,Y as M,aj as P,a3 as S,ak as V,bd as F,Z as D,c as x,l as g}from"./index-
|
|
1
|
+
import{r as v,j as d,bb as k,V as p,W as T,bc as y,Y as M,aj as P,a3 as S,ak as V,bd as F,Z as D,c as x,l as g}from"./index-BwVMeD3q.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(F,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function W(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Y(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Z(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Y as T,W as a,Z as b,O as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as o}from"./AlertCircle-
|
|
1
|
+
import{i as o}from"./AlertCircle-BY01IebW.js";import{i as t}from"./CheckCircle-UPyj94ce.js";import{i as r}from"./DotsVertical-BoWHOZg-.js";import{al as a}from"./agent-icon-B_lvSp90.js";import{i as l}from"./index-BwVMeD3q.js";import{a as n}from"./XCircle-DAQ6sXs1.js";const i={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:o,iconClassName:"text-orange-500",labelColor:"text-orange-600 dark:text-orange-400"},failed:{label:"Failed",verb:"Something went wrong",icon:n,iconClassName:"text-red-500",labelColor:"text-red-600 dark:text-red-400"},expired:{label:"Timed out",verb:"Stopped responding",icon:a,iconClassName:"text-amber-500",labelColor:"text-amber-600 dark:text-amber-400"},in_progress:{label:"Running",verb:"Agent is working",icon:l,iconClassName:"text-blue-500",labelColor:"text-blue-600 dark:text-blue-400"},completed:{label:"Done",verb:"Completed",icon:t,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},m={label:"Unknown",verb:"Unknown status",icon:r,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function x(e){return i[e??"completed"]??m}export{i as S,x as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l,j as n}from"./index-
|
|
1
|
+
import{c as o,l,j as n}from"./index-BwVMeD3q.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,a3 as b,j as c,V as m,W as k,ah as p,bb as M,bc as T,aj as S,bd as A,Y as F,bF as $,c as P,l as C}from"./index-
|
|
1
|
+
import{r as x,a3 as b,j as c,V as m,W as k,ah as p,bb as M,bc as T,aj as S,bd as A,Y as F,bF as $,c as P,l as C}from"./index-BwVMeD3q.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(E=>E!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});h.displayName=v;var[O,H]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=H(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),L=h,U=N;const W=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),V=x.createContext({size:"default",variant:"default"});function q(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(V.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function J(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(V),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(W({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(U,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{q as T,J as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,l as p,j as r,r as d,e as N,aQ as T,G as S,F as $,H as y}from"./index-
|
|
1
|
+
import{c as i,l as p,j as r,r as d,e as N,aQ as T,G as S,F as $,H as y}from"./index-BwVMeD3q.js";import{n as w}from"./ChevronLeft-DNoBDBkQ.js";import{i as C}from"./ChevronRight-DUYBaJAA.js";function j(t){const e=i.c(14);let s,o,l,n,c;e[0]!==t?({active:s,className:o,ref:n,type:c,...l}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=l,e[4]=n,e[5]=c):(s=e[1],o=e[2],l=e[3],n=e[4],c=e[5]);const f=c===void 0?"button":c,h=s?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let u;e[6]!==o||e[7]!==h?(u=p("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",h,o),e[6]=o,e[7]=h,e[8]=u):u=e[8];let g;return e[9]!==l||e[10]!==n||e[11]!==u||e[12]!==f?(g=r.jsx("button",{ref:n,type:f,className:u,...l}),e[9]=l,e[10]=n,e[11]=u,e[12]=f,e[13]=g):g=e[13],g}const k=d.createContext(null);function m(){const t=d.use(k);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=i.c(8),{children:s}=t,[o,l]=d.useState(null),[n,c]=d.useState(null),[f,h]=d.useState(null),[u,g]=d.useState(null);let b;e[0]!==f||e[1]!==u||e[2]!==n||e[3]!==o?(b={togglesEl:o,setTogglesEl:l,tabsEl:n,setTabsEl:c,centerEl:f,setCenterEl:h,rightEl:u,setRightEl:g},e[0]=f,e[1]=u,e[2]=n,e[3]=o,e[4]=b):b=e[4];let x;return e[5]!==s||e[6]!==b?(x=r.jsx(k,{value:b,children:s}),e[5]=s,e[6]=b,e[7]=x):x=e[7],x}function a(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx(v,{children:r.jsx("div",{className:"flex flex-col h-full min-h-0",children:s})}),e[0]=s,e[1]=o):o=e[1],o}function L(t){const e=i.c(10);let s,o,l;e[0]!==t?({children:s,className:o,...l}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=l):(s=e[1],o=e[2],l=e[3]);let n;e[4]!==o?(n=p("app-titlebar wco-drag shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12 bg-sidebar",o),e[4]=o,e[5]=n):n=e[5];let c;return e[6]!==s||e[7]!==l||e[8]!==n?(c=r.jsx("div",{className:n,...l,children:s}),e[6]=s,e[7]=l,e[8]=n,e[9]=c):c=e[9],c}function _(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=o):o=e[1],o}function R(t){const e=i.c(2),{children:s}=t;let o;return e[0]!==s?(o=r.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=o):o=e[1],o}function z(){const t=i.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(j,{onClick:G,"aria-label":"Go back",title:"Go back",children:r.jsx(w,{size:16})}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsxs(r.Fragment,{children:[e,r.jsx(j,{onClick:P,"aria-label":"Go forward",title:"Go forward",children:r.jsx(C,{size:16})})]}),t[1]=s):s=t[1],s}function P(){return window.history.forward()}function G(){return window.history.back()}function B(){const t=i.c(7),s=$().logo??y,o=typeof s=="string"?s:s.light,l=typeof s=="string"?s:s.dark;let n;t[0]!==o?(n=r.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=o,t[1]=n):n=t[1];let c;t[2]!==l?(c=r.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=l,t[3]=c):c=t[3];let f;return t[4]!==n||t[5]!==c?(f=r.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[n,c]}),t[4]=n,t[5]=c,t[6]=f):f=t[6],f}function E(){const t=i.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(d.Suspense,{fallback:r.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:r.jsx(B,{})}),t[0]=e):e=t[0],e}function F(){const t=i.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=N(e);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(E,{}),t[3]=l):l=t[3];let n;return t[4]!==o?(n=r.jsx(S,{to:"/$org",params:o,"aria-label":"Back to home",title:"Back to home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:l}),t[4]=o,t[5]=n):n=t[5],n}function H(){const t=i.c(2),{setCenterEl:e}=m();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function I(t){const e=i.c(3),{children:s}=t,{centerEl:o}=m();if(!o)return null;let l;return e[0]!==o||e[1]!==s?(l=T.createPortal(s,o),e[0]=o,e[1]=s,e[2]=l):l=e[2],l}function D(t){const e=i.c(5),{className:s}=t,{setTabsEl:o}=m();let l;e[0]!==s?(l=p("shrink-0 flex items-center",s),e[0]=s,e[1]=l):l=e[1];let n;return e[2]!==o||e[3]!==l?(n=r.jsx("div",{ref:o,className:l}),e[2]=o,e[3]=l,e[4]=n):n=e[4],n}function O(t){const e=i.c(3),{children:s}=t,{tabsEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}function A(t){const e=i.c(5),{className:s}=t,{setTogglesEl:o}=m();let l;e[0]!==s?(l=p("contents",s),e[0]=s,e[1]=l):l=e[1];let n;return e[2]!==o||e[3]!==l?(n=r.jsx("div",{ref:o,className:l}),e[2]=o,e[3]=l,e[4]=n):n=e[4],n}function Q(t){const e=i.c(3),{children:s}=t,{togglesEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}function U(){const t=i.c(2),{setRightEl:e}=m();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function q(t){const e=i.c(3),{children:s}=t,{rightEl:o}=m();if(!o)return null;let l;return e[0]!==s||e[1]!==o?(l=T.createPortal(s,o),e[0]=s,e[1]=o,e[2]=l):l=e[2],l}a.Provider=v;a.Header=L;a.LeftColumn=_;a.RightColumn=R;a.Nav=z;a.Logo=E;a.LogoLink=F;a.CenterSlot=H;a.Center=I;a.TabsSlot=D;a.Tabs=O;a.TogglesSlot=A;a.Toggles=Q;a.RightSlot=U;a.Right=q;export{j as T,a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as c,V as S,ak as Z,a3 as J,a4 as Q,_ as H,U as ee,W as C,Z as $,a2 as te,X as G,$ as oe,a0 as re,Y as ne,dy as se,a1 as ae,c as j,l as ie}from"./index-
|
|
1
|
+
import{r as a,j as c,V as S,ak as Z,a3 as J,a4 as Q,_ as H,U as ee,W as C,Z as $,a2 as te,X as G,$ as oe,a0 as re,Y as ne,dy as se,a1 as ae,c as j,l as ie}from"./index-BwVMeD3q.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(S.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=ne("Tooltip",[G]),D=G(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=Z(),f=a.useRef(0),h=l??i.disableHoverableContent,T=d??i.delayDuration,g=a.useRef(!1),[m,y]=J({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(M)},caller:R}),w=a.useMemo(()=>m?g.current?"delayed-open":"instant-open":"closed",[m]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,y(!0)},[y]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y(!1)},[y]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,y(!0),f.current=0},T)},[T,y]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(Q,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:m,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=H(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(ee,{asChild:!0,...l,children:c.jsx(S.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),B=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx($,{present:t||s.open,children:c.jsx(te,{asChild:!0,container:n,children:r})})})};B.displayName=N;var b="TooltipContent",W=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx($,{present:r||l.open,children:l.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=H(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,T)=>{const g=h.currentTarget,m={x:h.clientX,y:h.clientY},y=me(m,g.getBoundingClientRect()),w=Ce(m,y),E=be(T.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),T=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=T=>{const g=T.target,m={x:T.clientX,y:T.clientY},y=i?.contains(g)||u?.contains(g),w=!we(m,l);y?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(X,{...o,ref:s})}),[ge,Te]=O(R,{isInside:!1}),ye=se("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(re,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(ye,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var q="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return Te(q,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=q;function me(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=U,Oe=B,De=W,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ne(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Ne as T,le as V,Ie as a,Me as b,Ae as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bl as p,bm as t,aF as y,s as a,c5 as q,o as s,aG as g,aD as u,al as m,b7 as x,bj as O,c6 as ge,c7 as fe,c8 as B,c9 as j,ca as be,cb as ye,cc as $,cd as Se,ce as _e,cf as He,cg as Me,ch as ke,ci as Pe,cj as qe,ck as Te,bx as Ie,cl as Ee,cm as Le,cn as ze,co as De,cp as Ae,cq as Ue,cr as Ne,bw as Oe,r as te,c as F,j as b,cs as je,ct as Be,w as $e,l as oe}from"./index-
|
|
1
|
+
import{bl as p,bm as t,aF as y,s as a,c5 as q,o as s,aG as g,aD as u,al as m,b7 as x,bj as O,c6 as ge,c7 as fe,c8 as B,c9 as j,ca as be,cb as ye,cc as $,cd as Se,ce as _e,cf as He,cg as Me,ch as ke,ci as Pe,cj as qe,ck as Te,bx as Ie,cl as Ee,cm as Le,cn as ze,co as De,cp as Ae,cq as Ue,cr as Ne,bw as Oe,r as te,c as F,j as b,cs as je,ct as Be,w as $e,l as oe}from"./index-BwVMeD3q.js";import{P as Fe}from"./use-mcp-client-DjnQKDkF.js";const le=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ve(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ke(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,l=r.match(n);if(l){const f=(l.index??0)+l[0].length;return r.slice(0,f)+`
|
|
2
2
|
`+i+r.slice(f)}const c=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,d=r.match(c);if(d){const f=(d.index??0)+d[0].length;return r.slice(0,f)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,D as f,q as P,K as m,k as K}from"./index-
|
|
1
|
+
import{c as d,D as f,q as P,K as m,k as K}from"./index-BwVMeD3q.js";import{u as S,c as T}from"./studio-tools-Cj1fBaXp.js";function g(s,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await T(s,"AI_PROVIDER_KEY_LIST",{})}}function E(){const s=d.c(7),{org:e}=f(),o=S();let i;s[0]!==e.id?(i=m.aiProviders(e.id),s[0]=e.id,s[1]=i):i=s[1];let t;s[2]!==o?(t=async()=>await o.call("AI_PROVIDERS_LIST",{}),s[2]=o,s[3]=t):t=s[3];let l;s[4]!==i||s[5]!==t?(l={queryKey:i,staleTime:1/0,queryFn:t},s[4]=i,s[5]=t,s[6]=l):l=s[6];const{data:r}=P(l);return r}function R(){const s=d.c(5),{org:e}=f();let o;s[0]!==e.id||s[1]!==e.slug?(o=g(e.slug,e.id),s[0]=e.id,s[1]=e.slug,s[2]=o):o=s[2];const{data:i}=P(o);let t;return s[3]!==i?.keys?(t=i?.keys??[],s[3]=i?.keys,s[4]=t):t=s[4],t}function p(s){const e=d.c(15),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s??""),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];const l=!!s;let r;e[3]!==s||e[4]!==i?(r=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s??""}),e[3]=s,e[4]=i,e[5]=r):r=e[5];let n;e[6]!==t||e[7]!==l||e[8]!==r?(n={queryKey:t,enabled:l,staleTime:6e4,queryFn:r},e[6]=t,e[7]=l,e[8]=r,e[9]=n):n=e[9];const{data:a,isLoading:_}=K(n);let u;e[10]!==a?.models?(u=a?.models??[],e[10]=a?.models,e[11]=u):u=e[11];const y=!!s&&_;let c;return e[12]!==u||e[13]!==y?(c={models:u,isLoading:y},e[12]=u,e[13]=y,e[14]=c):c=e[14],c}function A(s){const e=d.c(11),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];let l;e[3]!==s||e[4]!==i?(l=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let r;e[6]!==t||e[7]!==l?(r={queryKey:t,staleTime:6e4,queryFn:l},e[6]=t,e[7]=l,e[8]=r):r=e[8];const{data:n}=P(r);let a;return e[9]!==n?.models?(a=n?.models??[],e[9]=n?.models,e[10]=a):a=e[10],a}export{g as a,p as b,E as c,A as d,R as u};
|