decocms 2.179.0 → 2.179.2
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-DVW9JjHe.js → AlertCircle-QngH9BVd.js} +1 -1
- package/dist/client/assets/{AlignLeft-D_luYgbw.js → AlignLeft-BUW8XsMa.js} +1 -1
- package/dist/client/assets/{ArrowDown-DjR6AtS2.js → ArrowDown-Ba2t7m6d.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DXzT_XO_.js → ArrowLeft-DX2ldnBo.js} +1 -1
- package/dist/client/assets/{ArrowUp-CsoOTX3e.js → ArrowUp-Wy3Qa9X3.js} +1 -1
- package/dist/client/assets/{Building02-BDnC20ph.js → Building02-DW6RLSwU.js} +1 -1
- package/dist/client/assets/{Check-DMs1RV8N.js → Check-CLxUgI8Z.js} +1 -1
- package/dist/client/assets/{CheckCircle-Dgm3JoPw.js → CheckCircle-DDKCxiAn.js} +1 -1
- package/dist/client/assets/{CheckSquare-B28p8IjK.js → CheckSquare-IgZnioYh.js} +1 -1
- package/dist/client/assets/{CheckVerified02-Bip5bRts.js → CheckVerified02-Brnp4Z-Q.js} +1 -1
- package/dist/client/assets/{ChevronDown-1UjCvCvJ.js → ChevronDown-D0b1rvAp.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CU3XMDcg.js → ChevronLeft-BOF7bp9d.js} +1 -1
- package/dist/client/assets/{ChevronRight-BTRAVLe6.js → ChevronRight-BEUO8jhU.js} +1 -1
- package/dist/client/assets/{ChevronUp-vdtknjJN.js → ChevronUp-BWhuIqS7.js} +1 -1
- package/dist/client/assets/{Clock-DxBJbrHB.js → Clock-Aquumu5W.js} +1 -1
- package/dist/client/assets/{Code01-DdhLAVSM.js → Code01-_in0gxFd.js} +1 -1
- package/dist/client/assets/{Container-014scnrD.js → Container-b65PFshp.js} +1 -1
- package/dist/client/assets/{Copy01-BG-9bV8H.js → Copy01-Ds0OKZs5.js} +1 -1
- package/dist/client/assets/{Dataflow03-CWR8TB5R.js → Dataflow03-CE4IJeUz.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CkBNLVJJ.js → DotsHorizontal-EK1-V4Yv.js} +1 -1
- package/dist/client/assets/{DotsVertical-BhRvdXVC.js → DotsVertical-Bo0fAyx-.js} +1 -1
- package/dist/client/assets/{Download01-Cxd8eRxI.js → Download01-CN3AkzFm.js} +1 -1
- package/dist/client/assets/{Edit01-vPNms-Ul.js → Edit01-BeW3IgwV.js} +1 -1
- package/dist/client/assets/{Edit05-BjhO2H2B.js → Edit05-DDQmnS5O.js} +1 -1
- package/dist/client/assets/{Eye-Daag7Wuw.js → Eye-Cqad01Et.js} +1 -1
- package/dist/client/assets/{EyeOff-V56AuRPU.js → EyeOff-rTYDCZUH.js} +1 -1
- package/dist/client/assets/{File02-DnZ2L7A3.js → File02-k_9AZvHT.js} +1 -1
- package/dist/client/assets/{File06-CaxFtwp-.js → File06-BAp2UeVQ.js} +1 -1
- package/dist/client/assets/{FilterLines-sOtsmsdt.js → FilterLines-BQVg1PzI.js} +1 -1
- package/dist/client/assets/{Globe01-VniVod0F.js → Globe01-sBw0ReRO.js} +1 -1
- package/dist/client/assets/{Globe02-CFhZUYqn.js → Globe02-DlxZmkSI.js} +1 -1
- package/dist/client/assets/{Grid01-BFRlSnJR.js → Grid01-B9zEjFyx.js} +1 -1
- package/dist/client/assets/{Home02-DSFDIAkE.js → Home02-DsMimBHw.js} +1 -1
- package/dist/client/assets/{Image01-BidSy2TD.js → Image01-zSA25K9S.js} +1 -1
- package/dist/client/assets/{Inbox01-6qd3ChkE.js → Inbox01-Bcon6dDK.js} +1 -1
- package/dist/client/assets/{InfoCircle-BZrLSJZ9.js → InfoCircle-CA8mfcG6.js} +1 -1
- package/dist/client/assets/{Key01-Be5udFNT.js → Key01-V3zgT2bk.js} +1 -1
- package/dist/client/assets/{LayersTwo01-CTvn8FKF.js → LayersTwo01-D3otbQFN.js} +1 -1
- package/dist/client/assets/{LayoutLeft-jEOuJnNz.js → LayoutLeft-CbUmiI7I.js} +1 -1
- package/dist/client/assets/{Link01-A-Q0Qt3y.js → Link01-VlHez4tu.js} +1 -1
- package/dist/client/assets/{LinkExternal01-4GVeIgvT.js → LinkExternal01-vs3DKlfq.js} +1 -1
- package/dist/client/assets/{List-B5SMHNql.js → List-D6xZGoxJ.js} +1 -1
- package/dist/client/assets/{Loading01-XbSoiB54.js → Loading01-DQphO9Su.js} +1 -1
- package/dist/client/assets/{Lock01-DqGbP2kI.js → Lock01-Cbqd9PVH.js} +1 -1
- package/dist/client/assets/{Play-DvEGcsI_.js → Play-jCDYHrdu.js} +1 -1
- package/dist/client/assets/{Plus-D_LakzQG.js → Plus-CURSuoDd.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Bmf4h56V.js → RefreshCcw01-oV1XFIRn.js} +1 -1
- package/dist/client/assets/{Save01-BRkdIv6W.js → Save01-CpNh-fPw.js} +1 -1
- package/dist/client/assets/{SearchMd-Td6IPzMi.js → SearchMd-C8ADHGFY.js} +1 -1
- package/dist/client/assets/{Settings01-RG0u1Wdw.js → Settings01-B76KnDHb.js} +1 -1
- package/dist/client/assets/{Shield01-fdqYD4kz.js → Shield01-BodC6YjW.js} +1 -1
- package/dist/client/assets/{Terminal-3uOmlQWS.js → Terminal-BHkLJhoR.js} +1 -1
- package/dist/client/assets/{Tool01-Brx04CKd.js → Tool01-DlbILfZg.js} +1 -1
- package/dist/client/assets/{Trash01-CCCMsVx7.js → Trash01-CYMRq_nY.js} +1 -1
- package/dist/client/assets/{Upload01-Dmm5OPDQ.js → Upload01-BQ7z5iC5.js} +1 -1
- package/dist/client/assets/{Users03-CGvxqV0p.js → Users03-DEpvReeu.js} +1 -1
- package/dist/client/assets/{X-C2xYa8Ax.js → X-BT_y3J3a.js} +1 -1
- package/dist/client/assets/{XClose-fSpVWsQE.js → XClose-C-H07PEn.js} +1 -1
- package/dist/client/assets/{Zap-Bz0eF-pk.js → Zap-BY3Hn1l9.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-BA-JLzW1.js → agent-connections-preview-DbwllQSw.js} +1 -1
- package/dist/client/assets/{agent-detail-_7gDPROo.js → agent-detail-DqMa-yjy.js} +1 -1
- package/dist/client/assets/{agents-b6l7lHfB.js → agents-DXD0J3OW.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-B2-g7lTr.js → ai-providers-logos-DGTpC_MW.js} +1 -1
- package/dist/client/assets/{alert-dialog-CF6sz6zk.js → alert-dialog-BqCiJDa8.js} +1 -1
- package/dist/client/assets/{auth-catchall-DCsC3URM.js → auth-catchall-DPwCqyhO.js} +1 -1
- package/dist/client/assets/{automation-detail-B-Fbnwgk.js → automation-detail-bmoX3GK-.js} +1 -1
- package/dist/client/assets/{automations-Bt5wEYBR.js → automations-Dp1WjxxK.js} +1 -1
- package/dist/client/assets/{avatar-DuuaPRPf.js → avatar-BoRF-Me1.js} +1 -1
- package/dist/client/assets/{badge-CLjRXA2D.js → badge-DIWKuwVU.js} +1 -1
- package/dist/client/assets/{binder-Bfb9tEyR.js → binder-CuBUxi11.js} +1 -1
- package/dist/client/assets/{breadcrumb-BanVcbRs.js → breadcrumb-BWfepeob.js} +1 -1
- package/dist/client/assets/{card-B1_APflL.js → card-gfMzoGpr.js} +1 -1
- package/dist/client/assets/{checkbox-C1wB7_gF.js → checkbox-DygphnIU.js} +1 -1
- package/dist/client/assets/{collapsible-Dy4NKeeC.js → collapsible-BJo6q_NJ.js} +1 -1
- package/dist/client/assets/{collection-detail-CrE0G9f8.js → collection-detail-fTigPh-V.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bw7A_jmD.js → collection-display-button-C42ZnuS7.js} +1 -1
- package/dist/client/assets/{collection-search-CTFgB7Lp.js → collection-search-Dzoe9W56.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-lo_8Q6rH.js → collection-table-wrapper-Bka5CUqj.js} +1 -1
- package/dist/client/assets/{collection-tabs-B51ouW-s.js → collection-tabs-D9qLvNTu.js} +1 -1
- package/dist/client/assets/{command-Cv0iMXKh.js → command-D_HBfmpj.js} +1 -1
- package/dist/client/assets/{connection-card-D3FBXf0S.js → connection-card-DuHVLZ35.js} +1 -1
- package/dist/client/assets/{connection-detail-Bi3DTcaP.js → connection-detail-vcbLbssZ.js} +1 -1
- package/dist/client/assets/{connections-CqxjlLEM.js → connections-14pDMsUe.js} +1 -1
- package/dist/client/assets/{constants-D_wdAaOl.js → constants-D5QZg84_.js} +1 -1
- package/dist/client/assets/{context-T68lSRvn.js → context-CGMT963w.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-nf2xtqFA.js → create-organization-dialog-CeMf7qju.js} +1 -1
- package/dist/client/assets/{create-project-dialog-Dwjoqy04.js → create-project-dialog-Bs_mS8aj.js} +1 -1
- package/dist/client/assets/{danger-D_l3xCWv.js → danger-gTdMMqBl.js} +1 -1
- package/dist/client/assets/{danger-zone-BqwRtOa-.js → danger-zone-BE94J4G-.js} +1 -1
- package/dist/client/assets/{dependencies-BhIfj_Mh.js → dependencies-DQ9gMDrw.js} +1 -1
- package/dist/client/assets/{dialog-nvlQa_Xp.js → dialog-B8WS5FOh.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CUiyve49.js → dropdown-menu-DE2pKopg.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Dk3qofvL.js → dynamic-plugin-layout-yMvA298P.js} +1 -1
- package/dist/client/assets/{editable-task-title-BI7B8tuc.js → editable-task-title-oggBOZ_d.js} +1 -1
- package/dist/client/assets/{empty-state-DipJZxfo.js → empty-state-BjCXvoyS.js} +1 -1
- package/dist/client/assets/{empty-state-5rqNijHJ.js → empty-state-Bk9Z7Q-U.js} +1 -1
- package/dist/client/assets/{env-vars-editor-h37BhMbl.js → env-vars-editor-BjeFjhEe.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BT7J0Tij.js → extract-connection-data-CZxT3XNH.js} +1 -1
- package/dist/client/assets/{file-browser-B09oaYS6.js → file-browser-C4MCCicp.js} +2 -2
- package/dist/client/assets/{form-CecOO_Jp.js → form-tOTNzCZe.js} +1 -1
- package/dist/client/assets/{general-DtpKfoJ9.js → general-DOjbT8YE.js} +1 -1
- package/dist/client/assets/{generate-id-5kNQyErh.js → generate-id-kfQDJb0K.js} +1 -1
- package/dist/client/assets/{grid-view-BYb23I1t.js → grid-view-CM2kDBxz.js} +1 -1
- package/dist/client/assets/{home-BqCTon-O.js → home-rO4pkzPH.js} +1 -1
- package/dist/client/assets/{index-BnWERa_y.js → index-B09Yemt1.js} +1 -1
- package/dist/client/assets/{index-B6Ku9roO.js → index-BLtI6TU9.js} +1 -1
- package/dist/client/assets/{index-l2nmjN9p.js → index-Bwlq4qOs.js} +1 -1
- package/dist/client/assets/{index-ZWZxZnmG.js → index-CMImT9Gt.js} +1 -1
- package/dist/client/assets/{index-BVwCZjgy.js → index-D-6rbOIG.js} +1 -1
- package/dist/client/assets/{index-BcgjyTPE.js → index-DiHcYCxZ.js} +1 -1
- package/dist/client/assets/{index-CyHgPymx.js → index-DjVQ8cwy.js} +1 -1
- package/dist/client/assets/{index-BA8pppYm.js → index-DnJ6a24w.js} +3 -3
- package/dist/client/assets/{index-BLiLpmIX.js → index-DyL93sTY.js} +1 -1
- package/dist/client/assets/{index-akdcnE10.js → index-hCeFdkUk.js} +1 -1
- package/dist/client/assets/{index-CFH0OXnH.js → index-qrpgIqks.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-D1nN6BxG.js → infiniteQueryObserver-XS4LWR6q.js} +1 -1
- package/dist/client/assets/{input-CWwUdImu.js → input-BBKBJVKe.js} +1 -1
- package/dist/client/assets/{integration-icon-bimn_V0c.js → integration-icon-C9GR_8Ea.js} +1 -1
- package/dist/client/assets/{label-BPSEc42f.js → label-DJvdRQ2A.js} +1 -1
- package/dist/client/assets/{layout-BAtWCbR2.js → layout-10Sxtyop.js} +1 -1
- package/dist/client/assets/{layout-DJmtFBMT.js → layout-BjyFY_1R.js} +1 -1
- package/dist/client/assets/{login-DvZn3-pa.js → login-ClPbfjlJ.js} +1 -1
- package/dist/client/assets/{logo-upload-Bf5L-Bq4.js → logo-upload-iqCQyRXD.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-B-FxyJ8k.js → mcp-app-renderer-C3qFwvPf.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DTOYo4H_.js → mcp-server-card-DCDS8v4f.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-a-FowR-N.js → mcp-server-detail-lOR_wUNJ.js} +2 -2
- package/dist/client/assets/{members-DoDn5WbR.js → members-CykhAYWe.js} +1 -1
- package/dist/client/assets/{monaco-editor-CzUgVVtD.js → monaco-editor-DQf5JSy_.js} +1 -1
- package/dist/client/assets/{monitoring-Bgwa464O.js → monitoring-BPuhRE0m.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-BhH_9WAU.js → monitoring-dashboard-edit-BVtLOBNe.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-fIsDA1fE.js → monitoring-dashboard-view-CXCG5P_H.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D_ylQ1HM.js → monitoring-stats-row-BfoeteQX.js} +1 -1
- package/dist/client/assets/{oauth-callback-CoUYpMSq.js → oauth-callback-CXrwzvh_.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-b22UrNdp.js → oauth-callback-ai-provider-bQZvbhnr.js} +1 -1
- package/dist/client/assets/{org-ai-providers-BNztZCX5.js → org-ai-providers-4gYTufEL.js} +1 -1
- package/dist/client/assets/{page-Dj4EyeFl.js → page-CCXJyUyN.js} +1 -1
- package/dist/client/assets/{page-BcAinMv5.js → page-DB3QLlpA.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-B9B4uTZe.js → plugin-empty-state-CEvZCNFj.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-D10UXnJW.js → plugin-empty-state-cb7GbeKy.js} +1 -1
- package/dist/client/assets/{plugin-header-DoYwB62G.js → plugin-header-C4ZfQdcs.js} +1 -1
- package/dist/client/assets/{plugin-header-DMvMLBNl.js → plugin-header-Do_HgCfI.js} +1 -1
- package/dist/client/assets/plugins-pEgOY1Nz.js +1 -0
- package/dist/client/assets/{popover-BQCESDW1.js → popover-vDURg2rv.js} +1 -1
- package/dist/client/assets/{project-app-view-C8han8ke.js → project-app-view-DfCIvrF7.js} +1 -1
- package/dist/client/assets/{project-layout-C9lCZplY.js → project-layout-CkMdq05b.js} +1 -1
- package/dist/client/assets/{project-plugins-D3HLEv9w.js → project-plugins-C18qk0lc.js} +1 -1
- package/dist/client/assets/{projects-list-SNQDNaTR.js → projects-list-CtvT2y9h.js} +1 -1
- package/dist/client/assets/{registry-layout-BZlhODlQ.js → registry-layout-Cvu5zKVR.js} +1 -1
- package/dist/client/assets/{registry-utils-CO9REW3F.js → registry-utils-Bx7--rIH.js} +1 -1
- package/dist/client/assets/{reset-password-BzPuN_rH.js → reset-password-CSswd9M3.js} +1 -1
- package/dist/client/assets/{resizable-D8jXXCDX.js → resizable-B0HQ1vuq.js} +1 -1
- package/dist/client/assets/{save-actions-BnLEnZJz.js → save-actions-BxTuQTa4.js} +1 -1
- package/dist/client/assets/{scroll-area-CkVftfiY.js → scroll-area-dsTSFUPi.js} +1 -1
- package/dist/client/assets/{select-DY00D15R.js → select-Bbaj2HCW.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-ImcCDhMn.js → select-virtual-mcp-CZJoA7HG.js} +1 -1
- package/dist/client/assets/{sheet-TosLb8yt.js → sheet-B_-2ygzJ.js} +1 -1
- package/dist/client/assets/{shell-layout-CDsk-Umm.js → shell-layout-Ca5Bbhzi.js} +2 -2
- package/dist/client/assets/{sidebar-settings-C8ElmrHD.js → sidebar-settings-pZmI7pGH.js} +1 -1
- package/dist/client/assets/{skeleton-Gm5DA-8P.js → skeleton-NLo71_Sb.js} +1 -1
- package/dist/client/assets/{spinner-C1mMEiMb.js → spinner-EdHFCjIL.js} +1 -1
- package/dist/client/assets/{store-invite-xUrcBlzX.js → store-invite-CP9PWG-2.js} +1 -1
- package/dist/client/assets/{switch-B14zfEb5.js → switch-bfk4EFAk.js} +1 -1
- package/dist/client/assets/{table-DtXpny3U.js → table-BK1bAac3.js} +1 -1
- package/dist/client/assets/{tabs-A9qGl5Lu.js → tabs-aIY_aIUV.js} +1 -1
- package/dist/client/assets/{task-status-CwMjGfTF.js → task-status-DCsPkppQ.js} +1 -1
- package/dist/client/assets/tasks-Dw1i-69W.js +1 -0
- package/dist/client/assets/{tasks-panel-Bw9YqQ1_.js → tasks-panel-CEAgXi7r.js} +1 -1
- package/dist/client/assets/{textarea-2ogmGtkG.js → textarea-lF0m7xkk.js} +1 -1
- package/dist/client/assets/{time-range-picker-Bygakts1.js → time-range-picker-CEhZhu7c.js} +1 -1
- package/dist/client/assets/{toggle-group-WPtVUYwJ.js → toggle-group-Dak-s1p3.js} +1 -1
- package/dist/client/assets/{tools-list-CLB5XZOj.js → tools-list-DGVVcYEB.js} +1 -1
- package/dist/client/assets/{tooltip-BwvAIIBc.js → tooltip-Csc3oeTz.js} +1 -1
- package/dist/client/assets/{topbar-portal-DSf1d5HJ.js → topbar-portal-DLbOrsQP.js} +1 -1
- package/dist/client/assets/{types-DvobBpvI.js → types-BOmhR0hZ.js} +1 -1
- package/dist/client/assets/{use-automations-BGQlbv1W.js → use-automations-CPlNdxed.js} +1 -1
- package/dist/client/assets/{use-collections-CXZHBPMS.js → use-collections-Le9CzDbY.js} +1 -1
- package/dist/client/assets/{use-connection-oartfPuq.js → use-connection-CNeKPAtP.js} +1 -1
- package/dist/client/assets/{use-copy-BISgLMu4.js → use-copy-CR_0d0zs.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B2tmMqVr.js → use-create-virtual-mcp-BOxl7MdZ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CNsl4fNC.js → use-infinite-scroll-CbBHKCjw.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-8Jf-vPEq.js → use-install-from-registry-Ckutd61H.js} +1 -1
- package/dist/client/assets/{use-list-state-DS3NYHkq.js → use-list-state-DrSbpG8C.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BVySy_Df.js → use-mcp-prompts-D4XXlnov.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-OeB_buKh.js → use-mcp-resources-BueR0w1E.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BD1SdmMk.js → use-mcp-tools-CFyULGGP.js} +1 -1
- package/dist/client/assets/{use-members-k2yssW28.js → use-members-Bgz9FSqE.js} +1 -1
- package/dist/client/assets/{use-mobile-DppT4Zv5.js → use-mobile-Y3tADOOl.js} +1 -1
- package/dist/client/assets/{use-project-DgQNJTfy.js → use-project-RpN1fut9.js} +1 -1
- package/dist/client/assets/{use-store-discovery-B-25KncH.js → use-store-discovery-BS96E_Li.js} +1 -1
- package/dist/client/assets/{use-view-mode-zE3w0aFf.js → use-view-mode-BeRbE5Df.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DSUCQY_R.js → use-virtual-mcp-DGT5zflo.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-ChOuKh6v.js +1 -0
- package/dist/client/assets/{useMutation-BBCyPLav.js → useMutation-Betr8yis.js} +1 -1
- package/dist/client/assets/useQuery-mzOsnjYJ.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DFs2FFlW.js +1 -0
- package/dist/client/assets/{user-SVhF7LgJ.js → user-ChA79mrb.js} +1 -1
- package/dist/client/assets/{workflow-_9jX4O0E.js → workflow-CBDfcQFP.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/plugins-BIAdz3D1.js +0 -1
- package/dist/client/assets/tasks-CU0IwUDf.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CdvsEF9_.js +0 -1
- package/dist/client/assets/useQuery-wtRfgSpz.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CvRHX1aW.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as S,c as O,D as Q,j as t,B as Z,E as fe,ad as Qe,u as de,V as Xe,n as et,v as ce,e as tt,g as st,O as Ge,t as lt,q as ot,Q as nt,U as Be}from"./index-BA8pppYm.js";import{u as rt}from"./context-T68lSRvn.js";import{E as it}from"./empty-state-DipJZxfo.js";import{I as Ie}from"./input-CWwUdImu.js";import{P as at,a as ct,b as dt}from"./popover-BQCESDW1.js";import{S as mt}from"./scroll-area-CkVftfiY.js";import{n as ut}from"./Container-014scnrD.js";import{i as ft}from"./Edit05-BjhO2H2B.js";import{i as xt}from"./Link01-A-Q0Qt3y.js";import{s as pt}from"./XClose-fSpVWsQE.js";import{I as Oe}from"./integration-icon-bimn_V0c.js";import{a as ht}from"./index-BnWERa_y.js";import{B as $e}from"./badge-CLjRXA2D.js";import{C as gt,a as jt}from"./collapsible-Dy4NKeeC.js";import{S as bt}from"./switch-B14zfEb5.js";import{T as Nt}from"./textarea-2ogmGtkG.js";import{a as xe,c as ve,T as pe,b as he}from"./tooltip-BwvAIIBc.js";import{b as vt,u as yt}from"./use-connection-oartfPuq.js";import{u as Ct,a as _t}from"./use-virtual-mcp-DSUCQY_R.js";import{i as Ue}from"./ChevronRight-BTRAVLe6.js";import{n as St}from"./ChevronUp-vdtknjJN.js";import{i as De}from"./File02-DnZ2L7A3.js";import{i as ze}from"./Loading01-XbSoiB54.js";import{i as kt}from"./Play-DvEGcsI_.js";import{s as Ve}from"./Plus-D_LakzQG.js";import{a as Le}from"./Tool01-Brx04CKd.js";import{t as wt}from"./Users03-CGvxqV0p.js";import{B as Tt,a as Et,b as Fe,d as It,e as At,c as Ot}from"./breadcrumb-BanVcbRs.js";import{a as $t,V as Dt}from"./layout-BAtWCbR2.js";import{S as zt}from"./save-actions-BnLEnZJz.js";import{C as Lt}from"./collection-search-CTFgB7Lp.js";import{T as Pt}from"./tools-list-CLB5XZOj.js";import{C as Pe}from"./checkbox-C1wB7_gF.js";import{e as Rt,a as He,D as Ke,b as Mt,c as Bt}from"./dialog-nvlQa_Xp.js";import{T as ye,a as Vt,b as Ce,c as Ft}from"./tabs-A9qGl5Lu.js";import{u as ge,a as Gt}from"./constants-D_wdAaOl.js";import{c as Ut}from"./use-mcp-tools-BD1SdmMk.js";import{a as Ht}from"./use-mcp-resources-OeB_buKh.js";import{u as Kt}from"./use-mcp-prompts-BVySy_Df.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{I as Wt,R as Yt,a as Zt}from"./index-BVwCZjgy.js";import{k as qt}from"./dropdown-menu-CUiyve49.js";import{i as je}from"./Check-DMs1RV8N.js";import{i as Jt}from"./Code01-DdhLAVSM.js";import{a as Re}from"./Copy01-BG-9bV8H.js";import{i as _e}from"./InfoCircle-BZrLSJZ9.js";import{i as Qt}from"./Key01-Be5udFNT.js";import{A as Xt}from"./agent-connections-preview-BA-JLzW1.js";import"./decopilot-events-Brt4gAR6.js";import"./index-l2nmjN9p.js";import"./useQuery-wtRfgSpz.js";import"./useMutation-BBCyPLav.js";import"./index-ZWZxZnmG.js";import"./index-akdcnE10.js";import"./use-collections-CXZHBPMS.js";import"./Save01-BRkdIv6W.js";import"./SearchMd-Td6IPzMi.js";import"./collection-display-button-Bw7A_jmD.js";import"./ArrowDown-DjR6AtS2.js";import"./ArrowUp-CsoOTX3e.js";import"./Grid01-BFRlSnJR.js";import"./List-B5SMHNql.js";import"./collection-table-wrapper-lo_8Q6rH.js";import"./table-DtXpny3U.js";import"./card-B1_APflL.js";import"./types-DvobBpvI.js";import"./Eye-Daag7Wuw.js";import"./Globe02-CFhZUYqn.js";import"./LayersTwo01-CTvn8FKF.js";import"./X-C2xYa8Ax.js";const Ye=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Ye.displayName="ArrowsRight";const be=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));be.displayName="CubeOutline";const Ze=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));Ze.displayName="Lightbulb02";const qe=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m12 5.5-4.638 6.747c-.28.406-.42.609-.41.778a.5.5 0 0 0 .195.373c.135.102.38.102.874.102H12v5l4.638-6.747c.28-.406.42-.609.41-.778a.5.5 0 0 0-.195-.373c-.135-.102-.38-.102-.874-.102H12v-5Z"}),S.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));qe.displayName="ZapCircle";const es=0,ts=38;function ss(){const o=[];for(let e=es;e<=ts;e++)o.push(`/icons/capy-${e}.png`);return o}const ls={sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},os=ss();function ns(o){const e=O.c(53),{value:s,onChange:n,name:l,size:r,className:d,fallbackIcon:c}=o,a=r===void 0?"lg":r,[i,u]=S.useState(""),[g,x]=S.useState(!1);let h;e[0]!==n?(h=E=>{n(E),x(!1),u("")},e[0]=n,e[1]=h):h=e[1];const p=h;let f;e[2]!==i||e[3]!==n?(f=()=>{const E=i.trim();E&&(n(E),x(!1),u(""))},e[2]=i,e[3]=n,e[4]=f):f=e[4];const b=f;let m;e[5]!==n?(m=()=>{n(null),x(!1),u("")},e[5]=n,e[6]=m):m=e[6];const j=m,v=ls[a];let C;e[7]!==d||e[8]!==v?(C=Q("relative group rounded-lg border border-border shrink-0 overflow-hidden cursor-pointer",v,d),e[7]=d,e[8]=v,e[9]=C):C=e[9];const y=s??"no-icon";let P;e[10]!==c||e[11]!==l||e[12]!==y||e[13]!==s?(P=t.jsx(is,{icon:s,name:l,fallbackIcon:c},y),e[10]=c,e[11]=l,e[12]=y,e[13]=s,e[14]=P):P=e[14];let R;e[15]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ft,{size:16,className:"text-white"})}),e[15]=R):R=e[15];let k;e[16]!==C||e[17]!==P?(k=t.jsx(at,{asChild:!0,children:t.jsxs("button",{type:"button",className:C,children:[P,R]})}),e[16]=C,e[17]=P,e[18]=k):k=e[18];let z;e[19]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("span",{className:"text-sm font-medium",children:"Choose icon"}),e[19]=z):z=e[19];let _;e[20]!==j||e[21]!==s?(_=s&&t.jsxs(Z,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs text-muted-foreground",onClick:j,children:[t.jsx(pt,{size:12}),"Remove"]}),e[20]=j,e[21]=s,e[22]=_):_=e[22];let w;e[23]!==_?(w=t.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[z,_]}),e[23]=_,e[24]=w):w=e[24];let $;e[25]!==p||e[26]!==s?($=os.map(E=>t.jsx("button",{type:"button",onClick:()=>p(E),className:Q("h-9 w-9 rounded-md overflow-hidden border transition-colors hover:border-primary cursor-pointer",s===E?"border-primary ring-1 ring-primary":"border-transparent"),children:t.jsx("img",{src:E,alt:"",className:"h-full w-full object-cover",loading:"lazy"})},E)),e[25]=p,e[26]=s,e[27]=$):$=e[27];let A;e[28]!==$?(A=t.jsx(mt,{className:"h-48",children:t.jsx("div",{className:"grid grid-cols-7 gap-1 p-2",children:$})}),e[28]=$,e[29]=A):A=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(xt,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=D):D=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=E=>u(E.target.value),e[31]=L):L=e[31];let I;e[32]!==b?(I=E=>{E.key==="Enter"&&(E.preventDefault(),b())},e[32]=b,e[33]=I):I=e[33];let T;e[34]!==i||e[35]!==I?(T=t.jsx(Ie,{value:i,onChange:L,placeholder:"Paste image URL...",className:"h-7 text-xs",onKeyDown:I}),e[34]=i,e[35]=I,e[36]=T):T=e[36];let M;e[37]!==i?(M=i.trim(),e[37]=i,e[38]=M):M=e[38];const B=!M;let F;e[39]!==b||e[40]!==B?(F=t.jsx(Z,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs shrink-0",onClick:b,disabled:B,children:"Apply"}),e[39]=b,e[40]=B,e[41]=F):F=e[41];let V;e[42]!==T||e[43]!==F?(V=t.jsxs("div",{className:"flex items-center gap-1.5 p-2 border-t border-border",children:[D,T,F]}),e[42]=T,e[43]=F,e[44]=V):V=e[44];let G;e[45]!==w||e[46]!==A||e[47]!==V?(G=t.jsx(ct,{align:"start",className:"w-80 p-0",onOpenAutoFocus:rs,children:t.jsxs("div",{className:"flex flex-col",children:[w,A,V]})}),e[45]=w,e[46]=A,e[47]=V,e[48]=G):G=e[48];let U;return e[49]!==g||e[50]!==k||e[51]!==G?(U=t.jsxs(dt,{open:g,onOpenChange:x,children:[k,G]}),e[49]=g,e[50]=k,e[51]=G,e[52]=U):U=e[52],U}function rs(o){return o.preventDefault()}function is(o){const e=O.c(8),{icon:s,name:n,fallbackIcon:l}=o,[r,d]=S.useState(!1);if(!s||r){let i;e[0]!==l?(i=l??t.jsx(ut,{size:24,className:"text-muted-foreground"}),e[0]=l,e[1]=i):i=e[1];let u;return e[2]!==i?(u=t.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted/20",children:i}),e[2]=i,e[3]=u):u=e[3],u}let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>d(!0),e[4]=c):c=e[4];let a;return e[5]!==s||e[6]!==n?(a=t.jsx("img",{src:s,alt:n,className:"h-full w-full object-cover",onError:c}),e[5]=s,e[6]=n,e[7]=a):a=e[7],a}function Se(o){return o===null?"all":o?.length??0}function as(o,e){const s=o[e];if(!s)return"";const n=[];return s.tools===null?n.push("all tools"):s.tools&&s.tools.length>0&&n.push(`${s.tools.length} tools`),s.resources===null?n.push("all resources"):s.resources&&s.resources.length>0&&n.push(`${s.resources.length} resources`),s.prompts===null?n.push("all prompts"):s.prompts&&s.prompts.length>0&&n.push(`${s.prompts.length} prompts`),n.join(", ")}function cs(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const ds={tools:null,resources:null,prompts:null};function ke(){const o=O.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(ze,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function we(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Qe,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function ms(o){const e=O.c(23),{item:s,isSelected:n,onToggle:l,disabled:r}=o,d=r?"cursor-not-allowed opacity-50":"cursor-pointer",c=n?"bg-accent/25":"hover:bg-muted/50";let a;e[0]!==d||e[1]!==c?(a=Q("flex items-start gap-3 p-4 rounded-lg transition-colors",d,c),e[0]=d,e[1]=c,e[2]=a):a=e[2];let i;e[3]!==s.name?(i=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=i):i=e[4];let u;e[5]!==s.tags?(u=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=u):u=e[6];let g;e[7]!==i||e[8]!==u?(g=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i,u]}),e[7]=i,e[8]=u,e[9]=g):g=e[9];let x;e[10]!==s.description?(x=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=x):x=e[11];let h;e[12]!==g||e[13]!==x?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[g,x]}),e[12]=g,e[13]=x,e[14]=h):h=e[14];let p;e[15]!==r||e[16]!==n||e[17]!==l?(p=t.jsx(Pe,{checked:n,onCheckedChange:l,disabled:r,className:"mt-0.5"}),e[15]=r,e[16]=n,e[17]=l,e[18]=p):p=e[18];let f;return e[19]!==a||e[20]!==h||e[21]!==p?(f=t.jsxs("label",{className:a,children:[h,p]}),e[19]=a,e[20]=h,e[21]=p,e[22]=f):f=e[22],f}function Me(o){const e=O.c(32),{items:s,selections:n,onToggle:l,onToggleAll:r,emptyMessage:d,disabled:c}=o;let a,i,u,g,x;if(e[0]!==c||e[1]!==d||e[2]!==s||e[3]!==l||e[4]!==r||e[5]!==n){x=Symbol.for("react.early_return_sentinel");e:{const f=s.map(us);if(s.length===0){let y;e[11]!==d?(y=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:d})}),e[11]=d,e[12]=y):y=e[12],x=y;break e}u="flex flex-col h-full";const b=c?"cursor-not-allowed opacity-50":"cursor-pointer";let m;e[13]!==b?(m=Q("flex items-start gap-3 p-4",b),e[13]=b,e[14]=m):m=e[14];let j;e[15]!==s.length?(j=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=j):j=e[16];const v=n===null;let C;e[17]!==c||e[18]!==r||e[19]!==v?(C=t.jsx(Pe,{checked:v,onCheckedChange:r,disabled:c,className:"mt-0.5"}),e[17]=c,e[18]=r,e[19]=v,e[20]=C):C=e[20],e[21]!==C||e[22]!==m||e[23]!==j?(g=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:m,children:[j,C]})}),e[21]=C,e[22]=m,e[23]=j,e[24]=g):g=e[24],a="flex-1 overflow-auto px-4 py-3 space-y-1",i=s.map(y=>t.jsx(ms,{item:y,isSelected:n===null||n?.includes(y.id),onToggle:()=>l(y.id,f),disabled:c},y.id))}e[0]=c,e[1]=d,e[2]=s,e[3]=l,e[4]=r,e[5]=n,e[6]=a,e[7]=i,e[8]=u,e[9]=g,e[10]=x}else a=e[6],i=e[7],u=e[8],g=e[9],x=e[10];if(x!==Symbol.for("react.early_return_sentinel"))return x;let h;e[25]!==a||e[26]!==i?(h=t.jsx("div",{className:a,children:i}),e[25]=a,e[26]=i,e[27]=h):h=e[27];let p;return e[28]!==u||e[29]!==g||e[30]!==h?(p=t.jsxs("div",{className:u,children:[g,h]}),e[28]=u,e[29]=g,e[30]=h,e[31]=p):p=e[31],p}function us(o){return o.id}function fs(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Ut(u);let x;e[5]!==g.tools?(x=g.tools.map(xs),e[5]=g.tools,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No tools available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function xs(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(Pt,{annotations:o.annotations,_meta:o._meta})}}function ps(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Ht(u);let x;e[5]!==g.resources?(x=g.resources.map(hs),e[5]=g.resources,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No resources available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function hs(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function gs(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Kt(u);let x;e[5]!==g.prompts?(x=g.prompts.map(js),e[5]=g.prompts,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No prompts available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function js(o){return{id:o.name,name:o.name,description:o.description}}function bs(o){const e=O.c(24),{connection:s,isSelected:n,hasSelections:l,summary:r,onClick:d,onToggleAll:c,disabled:a}=o,i=a?"cursor-not-allowed opacity-50":"cursor-pointer",u=n?"bg-accent":"hover:bg-muted/50";let g;e[0]!==i||e[1]!==u?(g=Q("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",i,u),e[0]=i,e[1]=u,e[2]=g):g=e[2];const x=a?void 0:d;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=h):h=e[5];let p;e[6]!==s.title?(p=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=p):p=e[7];let f;e[8]!==l||e[9]!==r?(f=l&&r&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r}),e[8]=l,e[9]=r,e[10]=f):f=e[10];let b;e[11]!==p||e[12]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[p,f]}),e[11]=p,e[12]=f,e[13]=b):b=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==c?(m=t.jsx(Pe,{checked:l,onCheckedChange:c,onClick:Ns,disabled:a,className:"shrink-0"}),e[14]=a,e[15]=l,e[16]=c,e[17]=m):m=e[17];let j;return e[18]!==g||e[19]!==x||e[20]!==h||e[21]!==b||e[22]!==m?(j=t.jsxs("div",{className:g,onClick:x,children:[h,b,m]}),e[18]=g,e[19]=x,e[20]=h,e[21]=b,e[22]=m,e[23]=j):j=e[23],j}function Ns(o){return o.stopPropagation()}function vs(o){const e=O.c(22),{allConnections:s,searchTerm:n,selectedId:l,hasSelections:r,getSelectionSummary:d,onConnectionClick:c,onToggleAll:a,disabled:i}=o;let u;e[0]!==s||e[1]!==n?(u=n?s.filter(p=>p.title.toLowerCase().includes(n.toLowerCase())||p.description?.toLowerCase().includes(n.toLowerCase())):s,e[0]=s,e[1]=n,e[2]=u):u=e[2];const g=u;if(g.length===0){const p=n?"No connections found":"No connections available";let f;return e[3]!==p?(f=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:p}),e[3]=p,e[4]=f):f=e[4],f}let x;if(e[5]!==i||e[6]!==g||e[7]!==d||e[8]!==r||e[9]!==c||e[10]!==a||e[11]!==l){let p;e[13]!==i||e[14]!==d||e[15]!==r||e[16]!==c||e[17]!==a||e[18]!==l?(p=f=>t.jsx(bs,{connection:f,isSelected:l===f.id,hasSelections:r(f.id),summary:d(f.id),onClick:()=>c(f.id),onToggleAll:()=>a(f.id),disabled:i},f.id),e[13]=i,e[14]=d,e[15]=r,e[16]=c,e[17]=a,e[18]=l,e[19]=p):p=e[19],x=g.map(p),e[5]=i,e[6]=g,e[7]=d,e[8]=r,e[9]=c,e[10]=a,e[11]=l,e[12]=x}else x=e[12];let h;return e[20]!==x?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:x}),e[20]=x,e[21]=h):h=e[21],h}function ys(o){const e=O.c(75),{currentConnection:s,activeTab:n,selectedId:l,formData:r,toggleTool:d,toggleResource:c,togglePrompt:a,toggleAllTools:i,toggleAllResources:u,toggleAllPrompts:g,onTabChange:x}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=h):h=e[2];let p;e[3]!==s.title?(p=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=p):p=e[4];let f;e[5]!==s.description?(f=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=f):f=e[6];let b;e[7]!==p||e[8]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[p,f]}),e[7]=p,e[8]=f,e[9]=b):b=e[9];let m;e[10]!==h||e[11]!==b?(m=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,b]})}),e[10]=h,e[11]=b,e[12]=m):m=e[12];let j;e[13]!==x?(j=K=>x(K),e[13]=x,e[14]=j):j=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(ye,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Le,{size:16}),"Tools"]}),e[15]=v):v=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(ye,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=C):C=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(Vt,{variant:"underline",className:"shrink-0 px-6",children:[v,C,t.jsxs(ye,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(De,{size:16}),"Prompts"]})]}),e[17]=y):y=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=we("Tools not supported by this server"),e[18]=P):P=e[18];let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(ke,{}),e[19]=R):R=e[19];let k;e[20]!==r||e[21]!==l?(k=r[l]?r[l].tools:[],e[20]=r,e[21]=l,e[22]=k):k=e[22];let z;e[23]!==l||e[24]!==d?(z=(K,q)=>d(l,K,q),e[23]=l,e[24]=d,e[25]=z):z=e[25];let _;e[26]!==l||e[27]!==i?(_=()=>i(l),e[26]=l,e[27]=i,e[28]=_):_=e[28];let w;e[29]!==l||e[30]!==k||e[31]!==z||e[32]!==_?(w=t.jsx(Ce,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:P,children:t.jsx(S.Suspense,{fallback:R,children:t.jsx(fs,{connectionId:l,selections:k,onToggle:z,onToggleAll:_})})})}),e[29]=l,e[30]=k,e[31]=z,e[32]=_,e[33]=w):w=e[33];let $;e[34]===Symbol.for("react.memo_cache_sentinel")?($=we("Resources not supported by this server"),e[34]=$):$=e[34];let A;e[35]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ke,{}),e[35]=A):A=e[35];let D;e[36]!==r||e[37]!==l?(D=r[l]?r[l].resources:[],e[36]=r,e[37]=l,e[38]=D):D=e[38];let L;e[39]!==l||e[40]!==c?(L=(K,q)=>c(l,K,q),e[39]=l,e[40]=c,e[41]=L):L=e[41];let I;e[42]!==l||e[43]!==u?(I=()=>u(l),e[42]=l,e[43]=u,e[44]=I):I=e[44];let T;e[45]!==l||e[46]!==D||e[47]!==L||e[48]!==I?(T=t.jsx(Ce,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:$,children:t.jsx(S.Suspense,{fallback:A,children:t.jsx(ps,{connectionId:l,selections:D,onToggle:L,onToggleAll:I})})})}),e[45]=l,e[46]=D,e[47]=L,e[48]=I,e[49]=T):T=e[49];let M;e[50]===Symbol.for("react.memo_cache_sentinel")?(M=we("Prompts not supported by this server"),e[50]=M):M=e[50];let B;e[51]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{}),e[51]=B):B=e[51];let F;e[52]!==r||e[53]!==l?(F=r[l]?r[l].prompts:[],e[52]=r,e[53]=l,e[54]=F):F=e[54];let V;e[55]!==l||e[56]!==a?(V=(K,q)=>a(l,K,q),e[55]=l,e[56]=a,e[57]=V):V=e[57];let G;e[58]!==l||e[59]!==g?(G=()=>g(l),e[58]=l,e[59]=g,e[60]=G):G=e[60];let U;e[61]!==l||e[62]!==F||e[63]!==V||e[64]!==G?(U=t.jsx(Ce,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:M,children:t.jsx(S.Suspense,{fallback:B,children:t.jsx(gs,{connectionId:l,selections:F,onToggle:V,onToggleAll:G})})})}),e[61]=l,e[62]=F,e[63]=V,e[64]=G,e[65]=U):U=e[65];let E;e[66]!==n||e[67]!==w||e[68]!==T||e[69]!==U||e[70]!==j?(E=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(Ft,{value:n,onValueChange:j,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[y,w,T,U]})}),e[66]=n,e[67]=w,e[68]=T,e[69]=U,e[70]=j,e[71]=E):E=e[71];let J;return e[72]!==E||e[73]!==m?(J=t.jsxs(t.Fragment,{children:[m,E]}),e[72]=E,e[73]=m,e[74]=J):J=e[74],J}function Cs(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function Te(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function _s(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const Ss=(o,e)=>o.find(s=>s.id===e)??o[0];function ks(o){const e=O.c(77),{open:s,onOpenChange:n,selectedId:l,form:r,connections:d}=o;let c;e[0]!==l?(c={activeTab:"tools",searchTerm:"",selectedId:l},e[0]=l,e[1]=c):c=e[1];const[a,i]=S.useReducer(_s,c),u=S.useDeferredValue(a.searchTerm);let g;e[2]!==u?(g={searchTerm:u},e[2]=u,e[3]=g):g=e[3];const x=vt(g);let h;e[4]!==d?(h=d??[],e[4]=d,e[5]=h):h=e[5];let p;e[6]!==h?(p=Cs(h),e[6]=h,e[7]=p):p=e[7];const f=p;let b;e[8]!==x||e[9]!==a.selectedId?(b=Ss(x,a.selectedId),e[8]=x,e[9]=a.selectedId,e[10]=b):b=e[10];const m=b,j=m?.id??null;let v;e[11]!==f?(v=N=>cs(f,N),e[11]=f,e[12]=v):v=e[12];const C=v;let y;e[13]!==f?(y=N=>as(f,N),e[13]=f,e[14]=y):y=e[14];const P=y;let R;e[15]!==r||e[16]!==f?(R=(N,H,W,X)=>{const ie=f[N]?.[H];let Y;ie===null?Y=X.filter(Ne=>Ne!==W):ie?.includes(W)?Y=ie.filter(Ne=>Ne!==W):(Y=[...ie??[],W],Y.length===X.length&&(Y=null));const ae={...f};ae[N]?ae[N]={...ae[N]}:ae[N]={tools:null,resources:null,prompts:null},ae[N][H]=Y,r.setValue("connections",Te(ae),{shouldDirty:!0,shouldTouch:!0})},e[15]=r,e[16]=f,e[17]=R):R=e[17];const k=R;let z;e[18]!==r||e[19]!==f?(z=(N,H)=>{const ie=f[N]?.[H]===null?[]:null,Y={...f};Y[N]?Y[N]={...Y[N]}:Y[N]={tools:null,resources:null,prompts:null},Y[N][H]=ie,r.setValue("connections",Te(Y),{shouldDirty:!0,shouldTouch:!0})},e[18]=r,e[19]=f,e[20]=z):z=e[20];const _=z;let w;e[21]!==k?(w=(N,H,W)=>k(N,"tools",H,W),e[21]=k,e[22]=w):w=e[22];const $=w;let A;e[23]!==k?(A=(N,H,W)=>k(N,"resources",H,W),e[23]=k,e[24]=A):A=e[24];const D=A;let L;e[25]!==k?(L=(N,H,W)=>k(N,"prompts",H,W),e[25]=k,e[26]=L):L=e[26];const I=L;let T;e[27]!==_?(T=N=>_(N,"tools"),e[27]=_,e[28]=T):T=e[28];const M=T;let B;e[29]!==_?(B=N=>_(N,"resources"),e[29]=_,e[30]=B):B=e[30];const F=B;let V;e[31]!==_?(V=N=>_(N,"prompts"),e[31]=_,e[32]=V):V=e[32];const G=V;let U;e[33]!==r||e[34]!==f?(U=N=>{const H=f[N],W=H&&H.tools===null&&H.resources===null&&H.prompts===null,X={...f};W?delete X[N]:X[N]=ds,r.setValue("connections",Te(X),{shouldDirty:!0,shouldTouch:!0})},e[33]=r,e[34]=f,e[35]=U):U=e[35];const E=U;let J;e[36]!==x||e[37]!==n||e[38]!==l?(J=N=>{N&&i({type:"RESET",payload:{selectedId:l,firstConnectionId:x[0]?.id??null}}),n(N)},e[36]=x,e[37]=n,e[38]=l,e[39]=J):J=e[39];const K=J;let q;e[40]===Symbol.for("react.memo_cache_sentinel")?(q=N=>{i({type:"SELECT_CONNECTION",payload:N})},e[40]=q):q=e[40];const Je=q;let me;e[41]===Symbol.for("react.memo_cache_sentinel")?(me=N=>i({type:"SET_SEARCH_TERM",payload:N}),e[41]=me):me=e[41];let ee;e[42]!==a.searchTerm?(ee=t.jsx(Lt,{value:a.searchTerm,onChange:me,placeholder:"Search connections..."}),e[42]=a.searchTerm,e[43]=ee):ee=e[43];let te;e[44]!==x||e[45]!==a.searchTerm||e[46]!==j||e[47]!==P||e[48]!==C||e[49]!==E?(te=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(vs,{allConnections:x,searchTerm:a.searchTerm,selectedId:j,hasSelections:C,getSelectionSummary:P,onConnectionClick:Je,onToggleAll:E})}),e[44]=x,e[45]=a.searchTerm,e[46]=j,e[47]=P,e[48]=C,e[49]=E,e[50]=te):te=e[50];let se;e[51]!==ee||e[52]!==te?(se=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[ee,te]}),e[51]=ee,e[52]=te,e[53]=se):se=e[53];let le;e[54]!==m||e[55]!==a.activeTab||e[56]!==j||e[57]!==f||e[58]!==G||e[59]!==F||e[60]!==M||e[61]!==I||e[62]!==D||e[63]!==$?(le=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:m&&j?t.jsx(ys,{currentConnection:m,activeTab:a.activeTab,selectedId:j,formData:f,toggleTool:$,toggleResource:D,togglePrompt:I,toggleAllTools:M,toggleAllResources:F,toggleAllPrompts:G,onTabChange:N=>i({type:"SET_ACTIVE_TAB",payload:N})},j):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[54]=m,e[55]=a.activeTab,e[56]=j,e[57]=f,e[58]=G,e[59]=F,e[60]=M,e[61]=I,e[62]=D,e[63]=$,e[64]=le):le=e[64];let oe;e[65]!==se||e[66]!==le?(oe=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[se,le]}),e[65]=se,e[66]=le,e[67]=oe):oe=e[67];let ne;e[68]!==K?(ne=t.jsx(Rt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(Z,{variant:"outline",onClick:()=>K(!1),children:"Done"})}),e[68]=K,e[69]=ne):ne=e[69];let re;e[70]!==oe||e[71]!==ne?(re=t.jsxs(He,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[oe,ne]}),e[70]=oe,e[71]=ne,e[72]=re):re=e[72];let ue;return e[73]!==K||e[74]!==s||e[75]!==re?(ue=t.jsx(Ke,{open:s,onOpenChange:K,children:re}),e[73]=K,e[74]=s,e[75]=re,e[76]=ue):ue=e[76],ue}const ws=Xe.pick({title:!0,description:!0,icon:!0,status:!0,metadata:!0,connections:!0}).extend({title:et().min(1,"Name is required").max(255)});function Ts(o){const e=O.c(8);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=Q("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx(Yt,{"data-slot":"radio-group",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Ee(o){const e=O.c(9);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=Q("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Zt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(qt,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=r):r=e[5];let d;return e[6]!==n||e[7]!==l?(d=t.jsx(Wt,{"data-slot":"radio-group-item",className:l,...n,children:r}),e[6]=n,e[7]=l,e[8]=d):d=e[8],d}function Es(o){const s=new TextEncoder().encode(o),n=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(n)}function Is(o){const e=O.c(10),{url:s}=o,[n,l]=S.useState(!1);let r;e[0]!==s?(r=async()=>{await navigator.clipboard.writeText(s),l(!0),ce.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=r):r=e[1];const d=r;let c;e[2]!==n?(c=n?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx(Re,{size:20}),e[2]=n,e[3]=c):c=e[3];const a=n?"Copied!":"Copy URL";let i;e[4]!==a?(i=t.jsx("span",{className:"text-xs font-medium",children:a}),e[4]=a,e[5]=i):i=e[5];let u;return e[6]!==d||e[7]!==c||e[8]!==i?(u=t.jsxs(Z,{type:"button",variant:"outline",onClick:d,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[c,i]}),e[6]=d,e[7]=c,e[8]=i,e[9]=u):u=e[9],u}function As(o){const e=O.c(7),{url:s,serverName:n}=o;let l;e[0]!==n||e[1]!==s?(l=()=>{const i=We(n),g=Es(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),x=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(i)}&config=${encodeURIComponent(g)}`;window.open(x,"_blank"),ce.success("Opening Cursor...")},e[0]=n,e[1]=s,e[2]=l):l=e[2];const r=l;let d,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),c=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=d,e[4]=c):(d=e[3],c=e[4]);let a;return e[5]!==r?(a=t.jsxs(Z,{type:"button",variant:"outline",onClick:r,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[d,c]}),e[5]=r,e[6]=a):a=e[6],a}function Os(o){const e=O.c(11),{url:s,serverName:n}=o,[l,r]=S.useState(!1);let d;e[0]!==n||e[1]!==s?(d=async()=>{const x=We(n),p=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),f=`claude mcp add-json "${x}" '${p.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(f),r(!0),ce.success("Claude Code command copied to clipboard"),setTimeout(()=>r(!1),2e3)},e[0]=n,e[1]=s,e[2]=d):d=e[2];const c=d;let a;e[3]!==l?(a=l?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=a):a=e[4];const i=l?"Copied!":"Install on Claude";let u;e[5]!==i?(u=t.jsx("span",{className:"text-xs font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let g;return e[7]!==c||e[8]!==a||e[9]!==u?(g=t.jsxs(Z,{type:"button",variant:"outline",onClick:c,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,u]}),e[7]=c,e[8]=a,e[9]=u,e[10]=g):g=e[10],g}function $s({virtualMcp:o}){const{org:e}=de(),s=ge({connectionId:Gt,orgId:e.id}),[n,l]=S.useState(null),[r,d]=S.useState(!1),[c,a]=S.useState(!1),i=o.id,u=o.title||`agent-${i.slice(0,8)}`,g=n?`bunx @decocms/typegen@latest --mcp ${i} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${i} --key <api-key> --output client.ts`,x=async()=>{d(!0);try{const f=(await s.callTool({name:"API_KEY_CREATE",arguments:{name:`typegen-${u}`,permissions:{[i]:["*"]}}})).structuredContent?.key;if(!f)throw new Error("No key in response");l(f)}catch{ce.error("Failed to generate API key")}finally{d(!1)}},h=async()=>{await navigator.clipboard.writeText(g),a(!0),ce.success("Command copied to clipboard"),setTimeout(()=>a(!1),2e3)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Generate typed client"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Introspects this agent and writes a typed"," ",t.jsx("code",{className:"font-mono",children:"client.ts"})," you can import directly."]})]}),!n&&t.jsxs(Z,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:x,disabled:r,children:[r?t.jsx(ze,{size:14,className:"animate-spin"}):t.jsx(Qt,{size:14}),t.jsx("span",{children:r?"Generating…":"Generate API key"})]})]}),n&&t.jsx("p",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700",children:"Store this key securely — it won't be shown again."}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Generate client"}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:g}),t.jsx(Z,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:h,children:c?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Runtime variables"}),t.jsx(Ds,{apiKey:n})]})}function Ds(o){const e=O.c(19),{apiKey:s}=o,[n,l]=S.useState(!1),r=window.location.origin,d=s?`MESH_API_KEY=${s}`:"MESH_API_KEY=<api-key>",c=`MESH_BASE_URL=${r}`,a=`${d}
|
|
1
|
+
import{r as S,c as O,D as Q,j as t,B as Z,E as fe,ad as Qe,u as de,V as Xe,n as et,v as ce,e as tt,g as st,O as Ge,t as lt,q as ot,Q as nt,U as Be}from"./index-DnJ6a24w.js";import{u as rt}from"./context-CGMT963w.js";import{E as it}from"./empty-state-BjCXvoyS.js";import{I as Ie}from"./input-BBKBJVKe.js";import{P as at,a as ct,b as dt}from"./popover-vDURg2rv.js";import{S as mt}from"./scroll-area-dsTSFUPi.js";import{n as ut}from"./Container-b65PFshp.js";import{i as ft}from"./Edit05-DDQmnS5O.js";import{i as xt}from"./Link01-VlHez4tu.js";import{s as pt}from"./XClose-C-H07PEn.js";import{I as Oe}from"./integration-icon-C9GR_8Ea.js";import{a as ht}from"./index-B09Yemt1.js";import{B as $e}from"./badge-DIWKuwVU.js";import{C as gt,a as jt}from"./collapsible-BJo6q_NJ.js";import{S as bt}from"./switch-bfk4EFAk.js";import{T as Nt}from"./textarea-lF0m7xkk.js";import{a as xe,c as ve,T as pe,b as he}from"./tooltip-Csc3oeTz.js";import{b as vt,u as yt}from"./use-connection-CNeKPAtP.js";import{u as Ct,a as _t}from"./use-virtual-mcp-DGT5zflo.js";import{i as Ue}from"./ChevronRight-BEUO8jhU.js";import{n as St}from"./ChevronUp-BWhuIqS7.js";import{i as De}from"./File02-k_9AZvHT.js";import{i as ze}from"./Loading01-DQphO9Su.js";import{i as kt}from"./Play-jCDYHrdu.js";import{s as Ve}from"./Plus-CURSuoDd.js";import{a as Le}from"./Tool01-DlbILfZg.js";import{t as wt}from"./Users03-DEpvReeu.js";import{B as Tt,a as Et,b as Fe,d as It,e as At,c as Ot}from"./breadcrumb-BWfepeob.js";import{a as $t,V as Dt}from"./layout-10Sxtyop.js";import{S as zt}from"./save-actions-BxTuQTa4.js";import{C as Lt}from"./collection-search-Dzoe9W56.js";import{T as Pt}from"./tools-list-DGVVcYEB.js";import{C as Pe}from"./checkbox-DygphnIU.js";import{e as Rt,a as He,D as Ke,b as Mt,c as Bt}from"./dialog-B8WS5FOh.js";import{T as ye,a as Vt,b as Ce,c as Ft}from"./tabs-aIY_aIUV.js";import{u as ge,a as Gt}from"./constants-D5QZg84_.js";import{c as Ut}from"./use-mcp-tools-CFyULGGP.js";import{a as Ht}from"./use-mcp-resources-BueR0w1E.js";import{u as Kt}from"./use-mcp-prompts-D4XXlnov.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{I as Wt,R as Yt,a as Zt}from"./index-D-6rbOIG.js";import{k as qt}from"./dropdown-menu-DE2pKopg.js";import{i as je}from"./Check-CLxUgI8Z.js";import{i as Jt}from"./Code01-_in0gxFd.js";import{a as Re}from"./Copy01-Ds0OKZs5.js";import{i as _e}from"./InfoCircle-CA8mfcG6.js";import{i as Qt}from"./Key01-V3zgT2bk.js";import{A as Xt}from"./agent-connections-preview-DbwllQSw.js";import"./decopilot-events-Brt4gAR6.js";import"./index-Bwlq4qOs.js";import"./useQuery-mzOsnjYJ.js";import"./useMutation-Betr8yis.js";import"./index-CMImT9Gt.js";import"./index-hCeFdkUk.js";import"./use-collections-Le9CzDbY.js";import"./Save01-CpNh-fPw.js";import"./SearchMd-C8ADHGFY.js";import"./collection-display-button-C42ZnuS7.js";import"./ArrowDown-Ba2t7m6d.js";import"./ArrowUp-Wy3Qa9X3.js";import"./Grid01-B9zEjFyx.js";import"./List-D6xZGoxJ.js";import"./collection-table-wrapper-Bka5CUqj.js";import"./table-BK1bAac3.js";import"./card-gfMzoGpr.js";import"./types-BOmhR0hZ.js";import"./Eye-Cqad01Et.js";import"./Globe02-DlxZmkSI.js";import"./LayersTwo01-D3otbQFN.js";import"./X-BT_y3J3a.js";const Ye=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Ye.displayName="ArrowsRight";const be=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));be.displayName="CubeOutline";const Ze=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));Ze.displayName="Lightbulb02";const qe=({size:o=24,color:e="currentColor",...s})=>S.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},S.createElement("path",{d:"m12 5.5-4.638 6.747c-.28.406-.42.609-.41.778a.5.5 0 0 0 .195.373c.135.102.38.102.874.102H12v5l4.638-6.747c.28-.406.42-.609.41-.778a.5.5 0 0 0-.195-.373c-.135-.102-.38-.102-.874-.102H12v-5Z"}),S.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));qe.displayName="ZapCircle";const es=0,ts=38;function ss(){const o=[];for(let e=es;e<=ts;e++)o.push(`/icons/capy-${e}.png`);return o}const ls={sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},os=ss();function ns(o){const e=O.c(53),{value:s,onChange:n,name:l,size:r,className:d,fallbackIcon:c}=o,a=r===void 0?"lg":r,[i,u]=S.useState(""),[g,x]=S.useState(!1);let h;e[0]!==n?(h=E=>{n(E),x(!1),u("")},e[0]=n,e[1]=h):h=e[1];const p=h;let f;e[2]!==i||e[3]!==n?(f=()=>{const E=i.trim();E&&(n(E),x(!1),u(""))},e[2]=i,e[3]=n,e[4]=f):f=e[4];const b=f;let m;e[5]!==n?(m=()=>{n(null),x(!1),u("")},e[5]=n,e[6]=m):m=e[6];const j=m,v=ls[a];let C;e[7]!==d||e[8]!==v?(C=Q("relative group rounded-lg border border-border shrink-0 overflow-hidden cursor-pointer",v,d),e[7]=d,e[8]=v,e[9]=C):C=e[9];const y=s??"no-icon";let P;e[10]!==c||e[11]!==l||e[12]!==y||e[13]!==s?(P=t.jsx(is,{icon:s,name:l,fallbackIcon:c},y),e[10]=c,e[11]=l,e[12]=y,e[13]=s,e[14]=P):P=e[14];let R;e[15]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ft,{size:16,className:"text-white"})}),e[15]=R):R=e[15];let k;e[16]!==C||e[17]!==P?(k=t.jsx(at,{asChild:!0,children:t.jsxs("button",{type:"button",className:C,children:[P,R]})}),e[16]=C,e[17]=P,e[18]=k):k=e[18];let z;e[19]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("span",{className:"text-sm font-medium",children:"Choose icon"}),e[19]=z):z=e[19];let _;e[20]!==j||e[21]!==s?(_=s&&t.jsxs(Z,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs text-muted-foreground",onClick:j,children:[t.jsx(pt,{size:12}),"Remove"]}),e[20]=j,e[21]=s,e[22]=_):_=e[22];let w;e[23]!==_?(w=t.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[z,_]}),e[23]=_,e[24]=w):w=e[24];let $;e[25]!==p||e[26]!==s?($=os.map(E=>t.jsx("button",{type:"button",onClick:()=>p(E),className:Q("h-9 w-9 rounded-md overflow-hidden border transition-colors hover:border-primary cursor-pointer",s===E?"border-primary ring-1 ring-primary":"border-transparent"),children:t.jsx("img",{src:E,alt:"",className:"h-full w-full object-cover",loading:"lazy"})},E)),e[25]=p,e[26]=s,e[27]=$):$=e[27];let A;e[28]!==$?(A=t.jsx(mt,{className:"h-48",children:t.jsx("div",{className:"grid grid-cols-7 gap-1 p-2",children:$})}),e[28]=$,e[29]=A):A=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(xt,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=D):D=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=E=>u(E.target.value),e[31]=L):L=e[31];let I;e[32]!==b?(I=E=>{E.key==="Enter"&&(E.preventDefault(),b())},e[32]=b,e[33]=I):I=e[33];let T;e[34]!==i||e[35]!==I?(T=t.jsx(Ie,{value:i,onChange:L,placeholder:"Paste image URL...",className:"h-7 text-xs",onKeyDown:I}),e[34]=i,e[35]=I,e[36]=T):T=e[36];let M;e[37]!==i?(M=i.trim(),e[37]=i,e[38]=M):M=e[38];const B=!M;let F;e[39]!==b||e[40]!==B?(F=t.jsx(Z,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs shrink-0",onClick:b,disabled:B,children:"Apply"}),e[39]=b,e[40]=B,e[41]=F):F=e[41];let V;e[42]!==T||e[43]!==F?(V=t.jsxs("div",{className:"flex items-center gap-1.5 p-2 border-t border-border",children:[D,T,F]}),e[42]=T,e[43]=F,e[44]=V):V=e[44];let G;e[45]!==w||e[46]!==A||e[47]!==V?(G=t.jsx(ct,{align:"start",className:"w-80 p-0",onOpenAutoFocus:rs,children:t.jsxs("div",{className:"flex flex-col",children:[w,A,V]})}),e[45]=w,e[46]=A,e[47]=V,e[48]=G):G=e[48];let U;return e[49]!==g||e[50]!==k||e[51]!==G?(U=t.jsxs(dt,{open:g,onOpenChange:x,children:[k,G]}),e[49]=g,e[50]=k,e[51]=G,e[52]=U):U=e[52],U}function rs(o){return o.preventDefault()}function is(o){const e=O.c(8),{icon:s,name:n,fallbackIcon:l}=o,[r,d]=S.useState(!1);if(!s||r){let i;e[0]!==l?(i=l??t.jsx(ut,{size:24,className:"text-muted-foreground"}),e[0]=l,e[1]=i):i=e[1];let u;return e[2]!==i?(u=t.jsx("div",{className:"h-full w-full flex items-center justify-center bg-muted/20",children:i}),e[2]=i,e[3]=u):u=e[3],u}let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>d(!0),e[4]=c):c=e[4];let a;return e[5]!==s||e[6]!==n?(a=t.jsx("img",{src:s,alt:n,className:"h-full w-full object-cover",onError:c}),e[5]=s,e[6]=n,e[7]=a):a=e[7],a}function Se(o){return o===null?"all":o?.length??0}function as(o,e){const s=o[e];if(!s)return"";const n=[];return s.tools===null?n.push("all tools"):s.tools&&s.tools.length>0&&n.push(`${s.tools.length} tools`),s.resources===null?n.push("all resources"):s.resources&&s.resources.length>0&&n.push(`${s.resources.length} resources`),s.prompts===null?n.push("all prompts"):s.prompts&&s.prompts.length>0&&n.push(`${s.prompts.length} prompts`),n.join(", ")}function cs(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const ds={tools:null,resources:null,prompts:null};function ke(){const o=O.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(ze,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function we(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Qe,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function ms(o){const e=O.c(23),{item:s,isSelected:n,onToggle:l,disabled:r}=o,d=r?"cursor-not-allowed opacity-50":"cursor-pointer",c=n?"bg-accent/25":"hover:bg-muted/50";let a;e[0]!==d||e[1]!==c?(a=Q("flex items-start gap-3 p-4 rounded-lg transition-colors",d,c),e[0]=d,e[1]=c,e[2]=a):a=e[2];let i;e[3]!==s.name?(i=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=i):i=e[4];let u;e[5]!==s.tags?(u=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=u):u=e[6];let g;e[7]!==i||e[8]!==u?(g=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i,u]}),e[7]=i,e[8]=u,e[9]=g):g=e[9];let x;e[10]!==s.description?(x=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=x):x=e[11];let h;e[12]!==g||e[13]!==x?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[g,x]}),e[12]=g,e[13]=x,e[14]=h):h=e[14];let p;e[15]!==r||e[16]!==n||e[17]!==l?(p=t.jsx(Pe,{checked:n,onCheckedChange:l,disabled:r,className:"mt-0.5"}),e[15]=r,e[16]=n,e[17]=l,e[18]=p):p=e[18];let f;return e[19]!==a||e[20]!==h||e[21]!==p?(f=t.jsxs("label",{className:a,children:[h,p]}),e[19]=a,e[20]=h,e[21]=p,e[22]=f):f=e[22],f}function Me(o){const e=O.c(32),{items:s,selections:n,onToggle:l,onToggleAll:r,emptyMessage:d,disabled:c}=o;let a,i,u,g,x;if(e[0]!==c||e[1]!==d||e[2]!==s||e[3]!==l||e[4]!==r||e[5]!==n){x=Symbol.for("react.early_return_sentinel");e:{const f=s.map(us);if(s.length===0){let y;e[11]!==d?(y=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:d})}),e[11]=d,e[12]=y):y=e[12],x=y;break e}u="flex flex-col h-full";const b=c?"cursor-not-allowed opacity-50":"cursor-pointer";let m;e[13]!==b?(m=Q("flex items-start gap-3 p-4",b),e[13]=b,e[14]=m):m=e[14];let j;e[15]!==s.length?(j=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=j):j=e[16];const v=n===null;let C;e[17]!==c||e[18]!==r||e[19]!==v?(C=t.jsx(Pe,{checked:v,onCheckedChange:r,disabled:c,className:"mt-0.5"}),e[17]=c,e[18]=r,e[19]=v,e[20]=C):C=e[20],e[21]!==C||e[22]!==m||e[23]!==j?(g=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:m,children:[j,C]})}),e[21]=C,e[22]=m,e[23]=j,e[24]=g):g=e[24],a="flex-1 overflow-auto px-4 py-3 space-y-1",i=s.map(y=>t.jsx(ms,{item:y,isSelected:n===null||n?.includes(y.id),onToggle:()=>l(y.id,f),disabled:c},y.id))}e[0]=c,e[1]=d,e[2]=s,e[3]=l,e[4]=r,e[5]=n,e[6]=a,e[7]=i,e[8]=u,e[9]=g,e[10]=x}else a=e[6],i=e[7],u=e[8],g=e[9],x=e[10];if(x!==Symbol.for("react.early_return_sentinel"))return x;let h;e[25]!==a||e[26]!==i?(h=t.jsx("div",{className:a,children:i}),e[25]=a,e[26]=i,e[27]=h):h=e[27];let p;return e[28]!==u||e[29]!==g||e[30]!==h?(p=t.jsxs("div",{className:u,children:[g,h]}),e[28]=u,e[29]=g,e[30]=h,e[31]=p):p=e[31],p}function us(o){return o.id}function fs(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Ut(u);let x;e[5]!==g.tools?(x=g.tools.map(xs),e[5]=g.tools,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No tools available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function xs(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(Pt,{annotations:o.annotations,_meta:o._meta})}}function ps(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Ht(u);let x;e[5]!==g.resources?(x=g.resources.map(hs),e[5]=g.resources,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No resources available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function hs(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function gs(o){const e=O.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:r,disabled:d}=o,{org:c}=de();let a;e[0]!==s||e[1]!==c.id?(a={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=a):a=e[2];const i=ge(a);let u;e[3]!==i?(u={client:i},e[3]=i,e[4]=u):u=e[4];const{data:g}=Kt(u);let x;e[5]!==g.prompts?(x=g.prompts.map(js),e[5]=g.prompts,e[6]=x):x=e[6];const h=x;let p;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==r||e[11]!==n?(p=t.jsx(Me,{items:h,selections:n,onToggle:l,onToggleAll:r,emptyMessage:"No prompts available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function js(o){return{id:o.name,name:o.name,description:o.description}}function bs(o){const e=O.c(24),{connection:s,isSelected:n,hasSelections:l,summary:r,onClick:d,onToggleAll:c,disabled:a}=o,i=a?"cursor-not-allowed opacity-50":"cursor-pointer",u=n?"bg-accent":"hover:bg-muted/50";let g;e[0]!==i||e[1]!==u?(g=Q("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",i,u),e[0]=i,e[1]=u,e[2]=g):g=e[2];const x=a?void 0:d;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=h):h=e[5];let p;e[6]!==s.title?(p=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=p):p=e[7];let f;e[8]!==l||e[9]!==r?(f=l&&r&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r}),e[8]=l,e[9]=r,e[10]=f):f=e[10];let b;e[11]!==p||e[12]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[p,f]}),e[11]=p,e[12]=f,e[13]=b):b=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==c?(m=t.jsx(Pe,{checked:l,onCheckedChange:c,onClick:Ns,disabled:a,className:"shrink-0"}),e[14]=a,e[15]=l,e[16]=c,e[17]=m):m=e[17];let j;return e[18]!==g||e[19]!==x||e[20]!==h||e[21]!==b||e[22]!==m?(j=t.jsxs("div",{className:g,onClick:x,children:[h,b,m]}),e[18]=g,e[19]=x,e[20]=h,e[21]=b,e[22]=m,e[23]=j):j=e[23],j}function Ns(o){return o.stopPropagation()}function vs(o){const e=O.c(22),{allConnections:s,searchTerm:n,selectedId:l,hasSelections:r,getSelectionSummary:d,onConnectionClick:c,onToggleAll:a,disabled:i}=o;let u;e[0]!==s||e[1]!==n?(u=n?s.filter(p=>p.title.toLowerCase().includes(n.toLowerCase())||p.description?.toLowerCase().includes(n.toLowerCase())):s,e[0]=s,e[1]=n,e[2]=u):u=e[2];const g=u;if(g.length===0){const p=n?"No connections found":"No connections available";let f;return e[3]!==p?(f=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:p}),e[3]=p,e[4]=f):f=e[4],f}let x;if(e[5]!==i||e[6]!==g||e[7]!==d||e[8]!==r||e[9]!==c||e[10]!==a||e[11]!==l){let p;e[13]!==i||e[14]!==d||e[15]!==r||e[16]!==c||e[17]!==a||e[18]!==l?(p=f=>t.jsx(bs,{connection:f,isSelected:l===f.id,hasSelections:r(f.id),summary:d(f.id),onClick:()=>c(f.id),onToggleAll:()=>a(f.id),disabled:i},f.id),e[13]=i,e[14]=d,e[15]=r,e[16]=c,e[17]=a,e[18]=l,e[19]=p):p=e[19],x=g.map(p),e[5]=i,e[6]=g,e[7]=d,e[8]=r,e[9]=c,e[10]=a,e[11]=l,e[12]=x}else x=e[12];let h;return e[20]!==x?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:x}),e[20]=x,e[21]=h):h=e[21],h}function ys(o){const e=O.c(75),{currentConnection:s,activeTab:n,selectedId:l,formData:r,toggleTool:d,toggleResource:c,togglePrompt:a,toggleAllTools:i,toggleAllResources:u,toggleAllPrompts:g,onTabChange:x}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=h):h=e[2];let p;e[3]!==s.title?(p=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=p):p=e[4];let f;e[5]!==s.description?(f=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=f):f=e[6];let b;e[7]!==p||e[8]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[p,f]}),e[7]=p,e[8]=f,e[9]=b):b=e[9];let m;e[10]!==h||e[11]!==b?(m=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,b]})}),e[10]=h,e[11]=b,e[12]=m):m=e[12];let j;e[13]!==x?(j=K=>x(K),e[13]=x,e[14]=j):j=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(ye,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Le,{size:16}),"Tools"]}),e[15]=v):v=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(ye,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=C):C=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(Vt,{variant:"underline",className:"shrink-0 px-6",children:[v,C,t.jsxs(ye,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(De,{size:16}),"Prompts"]})]}),e[17]=y):y=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=we("Tools not supported by this server"),e[18]=P):P=e[18];let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(ke,{}),e[19]=R):R=e[19];let k;e[20]!==r||e[21]!==l?(k=r[l]?r[l].tools:[],e[20]=r,e[21]=l,e[22]=k):k=e[22];let z;e[23]!==l||e[24]!==d?(z=(K,q)=>d(l,K,q),e[23]=l,e[24]=d,e[25]=z):z=e[25];let _;e[26]!==l||e[27]!==i?(_=()=>i(l),e[26]=l,e[27]=i,e[28]=_):_=e[28];let w;e[29]!==l||e[30]!==k||e[31]!==z||e[32]!==_?(w=t.jsx(Ce,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:P,children:t.jsx(S.Suspense,{fallback:R,children:t.jsx(fs,{connectionId:l,selections:k,onToggle:z,onToggleAll:_})})})}),e[29]=l,e[30]=k,e[31]=z,e[32]=_,e[33]=w):w=e[33];let $;e[34]===Symbol.for("react.memo_cache_sentinel")?($=we("Resources not supported by this server"),e[34]=$):$=e[34];let A;e[35]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ke,{}),e[35]=A):A=e[35];let D;e[36]!==r||e[37]!==l?(D=r[l]?r[l].resources:[],e[36]=r,e[37]=l,e[38]=D):D=e[38];let L;e[39]!==l||e[40]!==c?(L=(K,q)=>c(l,K,q),e[39]=l,e[40]=c,e[41]=L):L=e[41];let I;e[42]!==l||e[43]!==u?(I=()=>u(l),e[42]=l,e[43]=u,e[44]=I):I=e[44];let T;e[45]!==l||e[46]!==D||e[47]!==L||e[48]!==I?(T=t.jsx(Ce,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:$,children:t.jsx(S.Suspense,{fallback:A,children:t.jsx(ps,{connectionId:l,selections:D,onToggle:L,onToggleAll:I})})})}),e[45]=l,e[46]=D,e[47]=L,e[48]=I,e[49]=T):T=e[49];let M;e[50]===Symbol.for("react.memo_cache_sentinel")?(M=we("Prompts not supported by this server"),e[50]=M):M=e[50];let B;e[51]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{}),e[51]=B):B=e[51];let F;e[52]!==r||e[53]!==l?(F=r[l]?r[l].prompts:[],e[52]=r,e[53]=l,e[54]=F):F=e[54];let V;e[55]!==l||e[56]!==a?(V=(K,q)=>a(l,K,q),e[55]=l,e[56]=a,e[57]=V):V=e[57];let G;e[58]!==l||e[59]!==g?(G=()=>g(l),e[58]=l,e[59]=g,e[60]=G):G=e[60];let U;e[61]!==l||e[62]!==F||e[63]!==V||e[64]!==G?(U=t.jsx(Ce,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:M,children:t.jsx(S.Suspense,{fallback:B,children:t.jsx(gs,{connectionId:l,selections:F,onToggle:V,onToggleAll:G})})})}),e[61]=l,e[62]=F,e[63]=V,e[64]=G,e[65]=U):U=e[65];let E;e[66]!==n||e[67]!==w||e[68]!==T||e[69]!==U||e[70]!==j?(E=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(Ft,{value:n,onValueChange:j,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[y,w,T,U]})}),e[66]=n,e[67]=w,e[68]=T,e[69]=U,e[70]=j,e[71]=E):E=e[71];let J;return e[72]!==E||e[73]!==m?(J=t.jsxs(t.Fragment,{children:[m,E]}),e[72]=E,e[73]=m,e[74]=J):J=e[74],J}function Cs(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function Te(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function _s(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const Ss=(o,e)=>o.find(s=>s.id===e)??o[0];function ks(o){const e=O.c(77),{open:s,onOpenChange:n,selectedId:l,form:r,connections:d}=o;let c;e[0]!==l?(c={activeTab:"tools",searchTerm:"",selectedId:l},e[0]=l,e[1]=c):c=e[1];const[a,i]=S.useReducer(_s,c),u=S.useDeferredValue(a.searchTerm);let g;e[2]!==u?(g={searchTerm:u},e[2]=u,e[3]=g):g=e[3];const x=vt(g);let h;e[4]!==d?(h=d??[],e[4]=d,e[5]=h):h=e[5];let p;e[6]!==h?(p=Cs(h),e[6]=h,e[7]=p):p=e[7];const f=p;let b;e[8]!==x||e[9]!==a.selectedId?(b=Ss(x,a.selectedId),e[8]=x,e[9]=a.selectedId,e[10]=b):b=e[10];const m=b,j=m?.id??null;let v;e[11]!==f?(v=N=>cs(f,N),e[11]=f,e[12]=v):v=e[12];const C=v;let y;e[13]!==f?(y=N=>as(f,N),e[13]=f,e[14]=y):y=e[14];const P=y;let R;e[15]!==r||e[16]!==f?(R=(N,H,W,X)=>{const ie=f[N]?.[H];let Y;ie===null?Y=X.filter(Ne=>Ne!==W):ie?.includes(W)?Y=ie.filter(Ne=>Ne!==W):(Y=[...ie??[],W],Y.length===X.length&&(Y=null));const ae={...f};ae[N]?ae[N]={...ae[N]}:ae[N]={tools:null,resources:null,prompts:null},ae[N][H]=Y,r.setValue("connections",Te(ae),{shouldDirty:!0,shouldTouch:!0})},e[15]=r,e[16]=f,e[17]=R):R=e[17];const k=R;let z;e[18]!==r||e[19]!==f?(z=(N,H)=>{const ie=f[N]?.[H]===null?[]:null,Y={...f};Y[N]?Y[N]={...Y[N]}:Y[N]={tools:null,resources:null,prompts:null},Y[N][H]=ie,r.setValue("connections",Te(Y),{shouldDirty:!0,shouldTouch:!0})},e[18]=r,e[19]=f,e[20]=z):z=e[20];const _=z;let w;e[21]!==k?(w=(N,H,W)=>k(N,"tools",H,W),e[21]=k,e[22]=w):w=e[22];const $=w;let A;e[23]!==k?(A=(N,H,W)=>k(N,"resources",H,W),e[23]=k,e[24]=A):A=e[24];const D=A;let L;e[25]!==k?(L=(N,H,W)=>k(N,"prompts",H,W),e[25]=k,e[26]=L):L=e[26];const I=L;let T;e[27]!==_?(T=N=>_(N,"tools"),e[27]=_,e[28]=T):T=e[28];const M=T;let B;e[29]!==_?(B=N=>_(N,"resources"),e[29]=_,e[30]=B):B=e[30];const F=B;let V;e[31]!==_?(V=N=>_(N,"prompts"),e[31]=_,e[32]=V):V=e[32];const G=V;let U;e[33]!==r||e[34]!==f?(U=N=>{const H=f[N],W=H&&H.tools===null&&H.resources===null&&H.prompts===null,X={...f};W?delete X[N]:X[N]=ds,r.setValue("connections",Te(X),{shouldDirty:!0,shouldTouch:!0})},e[33]=r,e[34]=f,e[35]=U):U=e[35];const E=U;let J;e[36]!==x||e[37]!==n||e[38]!==l?(J=N=>{N&&i({type:"RESET",payload:{selectedId:l,firstConnectionId:x[0]?.id??null}}),n(N)},e[36]=x,e[37]=n,e[38]=l,e[39]=J):J=e[39];const K=J;let q;e[40]===Symbol.for("react.memo_cache_sentinel")?(q=N=>{i({type:"SELECT_CONNECTION",payload:N})},e[40]=q):q=e[40];const Je=q;let me;e[41]===Symbol.for("react.memo_cache_sentinel")?(me=N=>i({type:"SET_SEARCH_TERM",payload:N}),e[41]=me):me=e[41];let ee;e[42]!==a.searchTerm?(ee=t.jsx(Lt,{value:a.searchTerm,onChange:me,placeholder:"Search connections..."}),e[42]=a.searchTerm,e[43]=ee):ee=e[43];let te;e[44]!==x||e[45]!==a.searchTerm||e[46]!==j||e[47]!==P||e[48]!==C||e[49]!==E?(te=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(vs,{allConnections:x,searchTerm:a.searchTerm,selectedId:j,hasSelections:C,getSelectionSummary:P,onConnectionClick:Je,onToggleAll:E})}),e[44]=x,e[45]=a.searchTerm,e[46]=j,e[47]=P,e[48]=C,e[49]=E,e[50]=te):te=e[50];let se;e[51]!==ee||e[52]!==te?(se=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[ee,te]}),e[51]=ee,e[52]=te,e[53]=se):se=e[53];let le;e[54]!==m||e[55]!==a.activeTab||e[56]!==j||e[57]!==f||e[58]!==G||e[59]!==F||e[60]!==M||e[61]!==I||e[62]!==D||e[63]!==$?(le=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:m&&j?t.jsx(ys,{currentConnection:m,activeTab:a.activeTab,selectedId:j,formData:f,toggleTool:$,toggleResource:D,togglePrompt:I,toggleAllTools:M,toggleAllResources:F,toggleAllPrompts:G,onTabChange:N=>i({type:"SET_ACTIVE_TAB",payload:N})},j):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[54]=m,e[55]=a.activeTab,e[56]=j,e[57]=f,e[58]=G,e[59]=F,e[60]=M,e[61]=I,e[62]=D,e[63]=$,e[64]=le):le=e[64];let oe;e[65]!==se||e[66]!==le?(oe=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[se,le]}),e[65]=se,e[66]=le,e[67]=oe):oe=e[67];let ne;e[68]!==K?(ne=t.jsx(Rt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(Z,{variant:"outline",onClick:()=>K(!1),children:"Done"})}),e[68]=K,e[69]=ne):ne=e[69];let re;e[70]!==oe||e[71]!==ne?(re=t.jsxs(He,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[oe,ne]}),e[70]=oe,e[71]=ne,e[72]=re):re=e[72];let ue;return e[73]!==K||e[74]!==s||e[75]!==re?(ue=t.jsx(Ke,{open:s,onOpenChange:K,children:re}),e[73]=K,e[74]=s,e[75]=re,e[76]=ue):ue=e[76],ue}const ws=Xe.pick({title:!0,description:!0,icon:!0,status:!0,metadata:!0,connections:!0}).extend({title:et().min(1,"Name is required").max(255)});function Ts(o){const e=O.c(8);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=Q("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx(Yt,{"data-slot":"radio-group",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Ee(o){const e=O.c(9);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=Q("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Zt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(qt,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=r):r=e[5];let d;return e[6]!==n||e[7]!==l?(d=t.jsx(Wt,{"data-slot":"radio-group-item",className:l,...n,children:r}),e[6]=n,e[7]=l,e[8]=d):d=e[8],d}function Es(o){const s=new TextEncoder().encode(o),n=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(n)}function Is(o){const e=O.c(10),{url:s}=o,[n,l]=S.useState(!1);let r;e[0]!==s?(r=async()=>{await navigator.clipboard.writeText(s),l(!0),ce.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=r):r=e[1];const d=r;let c;e[2]!==n?(c=n?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx(Re,{size:20}),e[2]=n,e[3]=c):c=e[3];const a=n?"Copied!":"Copy URL";let i;e[4]!==a?(i=t.jsx("span",{className:"text-xs font-medium",children:a}),e[4]=a,e[5]=i):i=e[5];let u;return e[6]!==d||e[7]!==c||e[8]!==i?(u=t.jsxs(Z,{type:"button",variant:"outline",onClick:d,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[c,i]}),e[6]=d,e[7]=c,e[8]=i,e[9]=u):u=e[9],u}function As(o){const e=O.c(7),{url:s,serverName:n}=o;let l;e[0]!==n||e[1]!==s?(l=()=>{const i=We(n),g=Es(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),x=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(i)}&config=${encodeURIComponent(g)}`;window.open(x,"_blank"),ce.success("Opening Cursor...")},e[0]=n,e[1]=s,e[2]=l):l=e[2];const r=l;let d,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),c=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=d,e[4]=c):(d=e[3],c=e[4]);let a;return e[5]!==r?(a=t.jsxs(Z,{type:"button",variant:"outline",onClick:r,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[d,c]}),e[5]=r,e[6]=a):a=e[6],a}function Os(o){const e=O.c(11),{url:s,serverName:n}=o,[l,r]=S.useState(!1);let d;e[0]!==n||e[1]!==s?(d=async()=>{const x=We(n),p=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),f=`claude mcp add-json "${x}" '${p.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(f),r(!0),ce.success("Claude Code command copied to clipboard"),setTimeout(()=>r(!1),2e3)},e[0]=n,e[1]=s,e[2]=d):d=e[2];const c=d;let a;e[3]!==l?(a=l?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=a):a=e[4];const i=l?"Copied!":"Install on Claude";let u;e[5]!==i?(u=t.jsx("span",{className:"text-xs font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let g;return e[7]!==c||e[8]!==a||e[9]!==u?(g=t.jsxs(Z,{type:"button",variant:"outline",onClick:c,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,u]}),e[7]=c,e[8]=a,e[9]=u,e[10]=g):g=e[10],g}function $s({virtualMcp:o}){const{org:e}=de(),s=ge({connectionId:Gt,orgId:e.id}),[n,l]=S.useState(null),[r,d]=S.useState(!1),[c,a]=S.useState(!1),i=o.id,u=o.title||`agent-${i.slice(0,8)}`,g=n?`bunx @decocms/typegen@latest --mcp ${i} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${i} --key <api-key> --output client.ts`,x=async()=>{d(!0);try{const f=(await s.callTool({name:"API_KEY_CREATE",arguments:{name:`typegen-${u}`,permissions:{[i]:["*"]}}})).structuredContent?.key;if(!f)throw new Error("No key in response");l(f)}catch{ce.error("Failed to generate API key")}finally{d(!1)}},h=async()=>{await navigator.clipboard.writeText(g),a(!0),ce.success("Command copied to clipboard"),setTimeout(()=>a(!1),2e3)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Generate typed client"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Introspects this agent and writes a typed"," ",t.jsx("code",{className:"font-mono",children:"client.ts"})," you can import directly."]})]}),!n&&t.jsxs(Z,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:x,disabled:r,children:[r?t.jsx(ze,{size:14,className:"animate-spin"}):t.jsx(Qt,{size:14}),t.jsx("span",{children:r?"Generating…":"Generate API key"})]})]}),n&&t.jsx("p",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700",children:"Store this key securely — it won't be shown again."}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Generate client"}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:g}),t.jsx(Z,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:h,children:c?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Runtime variables"}),t.jsx(Ds,{apiKey:n})]})}function Ds(o){const e=O.c(19),{apiKey:s}=o,[n,l]=S.useState(!1),r=window.location.origin,d=s?`MESH_API_KEY=${s}`:"MESH_API_KEY=<api-key>",c=`MESH_BASE_URL=${r}`,a=`${d}
|
|
2
2
|
${c}`;let i;e[0]!==a?(i=async()=>{await navigator.clipboard.writeText(a),l(!0),setTimeout(()=>l(!1),2e3)},e[0]=a,e[1]=i):i=e[1];const u=i,g=!s;let x;e[2]!==g?(x=Q({"opacity-50":g}),e[2]=g,e[3]=x):x=e[3];let h;e[4]!==d||e[5]!==x?(h=t.jsx("span",{className:x,children:d}),e[4]=d,e[5]=x,e[6]=h):h=e[6];let p,f;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("br",{}),f=t.jsx("span",{children:c}),e[7]=p,e[8]=f):(p=e[7],f=e[8]);let b;e[9]!==h?(b=t.jsxs("code",{className:"min-w-0 flex-1 font-mono text-xs text-muted-foreground",children:[h,p,f]}),e[9]=h,e[10]=b):b=e[10];let m;e[11]!==n?(m=n?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12}),e[11]=n,e[12]=m):m=e[12];let j;e[13]!==u||e[14]!==m?(j=t.jsx(Z,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:u,children:m}),e[13]=u,e[14]=m,e[15]=j):j=e[15];let v;return e[16]!==b||e[17]!==j?(v=t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[b,j]})}),e[16]=b,e[17]=j,e[18]=v):v=e[18],v}function zs(o){const e=O.c(3),{virtualMcp:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"h-20 animate-pulse rounded-md bg-muted"}),e[0]=n):n=e[0];let l;return e[1]!==s?(l=t.jsx(S.Suspense,{fallback:n,children:t.jsx($s,{virtualMcp:s})}),e[1]=s,e[2]=l):l=e[2],l}function Ls(o){const e=O.c(44),{open:s,onOpenChange:n,virtualMcp:l}=o,[r,d]=S.useState("code_execution");let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=B=>{(B==="passthrough"||B==="smart_tool_selection"||B==="code_execution")&&d(B)},e[0]=c):c=e[0];const a=c;let i;e[1]!==r||e[2]!==l.id?(i=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),i.searchParams.set("mode",r),e[1]=r,e[2]=l.id,e[3]=i):i=e[3];let u;e[4]!==l.id||e[5]!==l.title?(u=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=u):u=e[6];const g=u;let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Mt,{children:t.jsx(Bt,{children:"Connect"})}),e[7]=x):x=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=h):h=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Ye,{className:"size-5 text-muted-foreground"})}),e[9]=p):p=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=f):f=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[11]=b):b=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[p,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[f,t.jsx(ve,{children:t.jsxs(pe,{children:[b,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(Ee,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=m):m=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Ze,{className:"size-5 text-muted-foreground"})}),e[13]=j):j=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=v):v=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[15]=C):C=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[j,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[v,t.jsx(ve,{children:t.jsxs(pe,{children:[C,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(Ee,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=y):y=e[16];let P;e[17]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Jt,{className:"size-5 text-muted-foreground"})}),e[17]=P):P=e[17];let R;e[18]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=R):R=e[18];let k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[19]=k):k=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[P,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[R,t.jsx(ve,{children:t.jsxs(pe,{children:[k,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(Ee,{id:"mode-code",value:"code_execution"}),t.jsx($e,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=z):z=e[20];let _;e[21]!==r?(_=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(Ts,{value:r,onValueChange:a,className:"flex flex-col gap-4.5",children:[m,y,z]})]}),e[21]=r,e[22]=_):_=e[22];let w;e[23]!==i.href?(w=t.jsx(Is,{url:i.href}),e[23]=i.href,e[24]=w):w=e[24];let $,A;e[25]!==g||e[26]!==i.href?($=t.jsx(As,{url:i.href,serverName:g}),A=t.jsx(Os,{url:i.href,serverName:g}),e[25]=g,e[26]=i.href,e[27]=$,e[28]=A):($=e[27],A=e[28]);let D;e[29]!==w||e[30]!==$||e[31]!==A?(D=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[w,$,A]})}),e[29]=w,e[30]=$,e[31]=A,e[32]=D):D=e[32];let L;e[33]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("div",{className:"border-t border-border"}),e[33]=L):L=e[33];let I;e[34]!==l?(I=t.jsx(zs,{virtualMcp:l}),e[34]=l,e[35]=I):I=e[35];let T;e[36]!==_||e[37]!==D||e[38]!==I?(T=t.jsxs(He,{className:"max-h-[80vh] overflow-y-auto sm:max-w-2xl",children:[x,t.jsxs("div",{className:"flex flex-col gap-6",children:[_,D,L,I]})]}),e[36]=_,e[37]=D,e[38]=I,e[39]=T):T=e[39];let M;return e[40]!==n||e[41]!==s||e[42]!==T?(M=t.jsx(Ke,{open:s,onOpenChange:n,children:T}),e[40]=n,e[41]=s,e[42]=T,e[43]=M):M=e[43],M}function Ps(o,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...o,shareDialogOpen:e.payload};case"SET_CONNECTION_DIALOG_OPEN":return{...o,connectionDialogOpen:e.payload};case"SET_EDITING_CONNECTION_ID":return{...o,editingConnectionId:e.payload};case"SET_SKILLS_OPEN":return{...o,skillsOpen:e.payload};default:return o}}function Ae(o){const e=O.c(27),{connection_id:s,selected_tools:n,selected_resources:l,selected_prompts:r,onClick:d}=o,c=yt(s);if(!c)return null;let a;e[0]!==n?(a=Se(n),e[0]=n,e[1]=a):a=e[1];const i=a;let u;e[2]!==l?(u=Se(l),e[2]=l,e[3]=u):u=e[3];const g=u;let x;e[4]!==r?(x=Se(r),e[4]=r,e[5]=x):x=e[5];const h=x;let p;e[6]!==c.icon||e[7]!==c.title?(p=t.jsx(Oe,{icon:c.icon,name:c.title,size:"xs"}),e[6]=c.icon,e[7]=c.title,e[8]=p):p=e[8];let f;e[9]!==c.title?(f=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:c.title}),e[9]=c.title,e[10]=f):f=e[10];let b;e[11]!==i?(b=i!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:i==="all"?"all":i}),t.jsx(Le,{size:12})]}),e[11]=i,e[12]=b):b=e[12];let m;e[13]!==g?(m=g!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:g==="all"?"all":g}),t.jsx(be,{size:12})]}),e[13]=g,e[14]=m):m=e[14];let j;e[15]!==h?(j=h!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:h==="all"?"all":h}),t.jsx(De,{size:12})]}),e[15]=h,e[16]=j):j=e[16];let v;e[17]!==b||e[18]!==m||e[19]!==j?(v=t.jsxs($e,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[b,m,j]}),e[17]=b,e[18]=m,e[19]=j,e[20]=v):v=e[20];let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Ue,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=C):C=e[21];let y;return e[22]!==d||e[23]!==p||e[24]!==f||e[25]!==v?(y=t.jsxs("div",{onClick:d,className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border hover:bg-accent/50 transition-colors cursor-pointer",children:[p,f,v,C]}),e[22]=d,e[23]=p,e[24]=f,e[25]=v,e[26]=y):y=e[26],y}Ae.Fallback=function(){return t.jsxs("div",{className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border",children:[t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"flex-1 h-4 rounded bg-muted animate-pulse"}),t.jsxs($e,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Le,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(be,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(De,{size:12})]})]}),t.jsx(Ue,{size:16,className:"text-muted-foreground shrink-0"})]})};function Rs({virtualMcp:o}){const{org:e}=de(),s=_t(),n=lt({resolver:ot(ws),defaultValues:o}),l=n.watch("connections"),[r,d]=S.useReducer(Ps,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,c]=ht(),{setVirtualMcpId:a}=rt();S.useEffect(()=>{c(!0),a(o.id)},[o.id]);const i=()=>{a(o.id),c(!0)},u=n.formState.isDirty,g=async()=>{const m=n.getValues(),j=await s.update.mutateAsync({id:o.id,data:m});n.reset(j)},x=()=>{n.reset(o)},h=()=>{d({type:"SET_EDITING_CONNECTION_ID",payload:null}),d({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},p=m=>{d({type:"SET_EDITING_CONNECTION_ID",payload:m}),d({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},f=s.update.isPending,b=t.jsx(Tt,{children:t.jsxs(Et,{children:[t.jsx(Fe,{children:t.jsx(It,{asChild:!0,children:t.jsx(nt,{to:"/$org/$project/agents",params:{org:e.slug,project:Ge},children:"Agents"})})}),t.jsx(At,{}),t.jsx(Fe,{children:t.jsx(Ot,{children:o.title})})]})});return t.jsxs($t,{breadcrumb:b,children:[t.jsxs(Dt,{children:[t.jsx(zt,{onSave:g,onUndo:x,isDirty:u,isSaving:f}),t.jsxs(pe,{delayDuration:0,children:[t.jsx(xe,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:i,"aria-label":"Test Agent",children:[t.jsx(kt,{size:14}),"Test Agent"]})})}),t.jsx(he,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:()=>d({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),children:[t.jsx(qe,{size:14}),"Connect"]})]}),t.jsx("div",{className:"flex h-full w-full bg-background overflow-auto",children:t.jsxs("div",{className:"flex flex-col w-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4 p-6 shrink-0",children:[t.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[t.jsx(Be,{control:n.control,name:"icon",render:({field:m})=>t.jsx(ns,{value:m.value,onChange:m.onChange,name:n.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(wt,{})})}),t.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[t.jsx(Ie,{...n.register("title"),className:"h-auto py-0.5 text-lg! font-medium leading-7 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Agent Name"}),t.jsx(Ie,{...n.register("description"),className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})]})]}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(bt,{checked:n.watch("status")==="active",onCheckedChange:m=>n.setValue("status",m?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(gt,{open:r.skillsOpen,onOpenChange:m=>d({type:"SET_SKILLS_OPEN",payload:m}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[l.length===0?t.jsxs("div",{className:"px-6 py-4 flex flex-col gap-3",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Connections"}),t.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-border hover:bg-accent/50 transition-colors w-full text-left cursor-pointer overflow-hidden",children:[t.jsxs("div",{className:"relative flex items-center justify-center size-8 rounded-md text-muted-foreground/75 shrink-0",children:[t.jsxs("svg",{className:"absolute inset-0 size-full overflow-hidden",fill:"none",viewBox:"0 0 32 32",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"agent-detail-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[t.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),t.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),t.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),t.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"5.5",stroke:"url(#agent-detail-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),t.jsx(Ve,{size:16})]}),t.jsx("span",{className:"text-sm text-muted-foreground truncate",children:"No connections yet. Add one to get started."})]})]}):t.jsx(jt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Connections"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"ease-(--ease-out-expo)",style:{width:r.skillsOpen?0:"auto",marginRight:r.skillsOpen?0:4,opacity:r.skillsOpen?0:1,pointerEvents:r.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:r.skillsOpen?"0ms":"200ms"},children:t.jsx(Xt,{connectionIds:l.map(m=>m.connection_id),maxVisibleIcons:2})}),t.jsxs("div",{role:"button",tabIndex:0,className:"h-7 inline-flex items-center justify-center rounded-md text-sm text-muted-foreground overflow-hidden transition-all duration-200 ease-(--ease-out-expo) hover:bg-accent hover:text-accent-foreground",style:{width:r.skillsOpen?"auto":28,paddingLeft:r.skillsOpen?8:0,paddingRight:r.skillsOpen?8:0,gap:r.skillsOpen?4:0},onPointerDown:m=>{m.stopPropagation()},onClick:m=>{m.stopPropagation(),m.preventDefault(),h()},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.stopPropagation(),m.preventDefault(),h())},children:[t.jsx(Ve,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:r.skillsOpen?"auto":0,opacity:r.skillsOpen?1:0},children:"Add"})]}),t.jsx("div",{className:"h-7 inline-flex items-center justify-center overflow-hidden transition-all duration-200 ease-(--ease-out-expo)",style:{width:r.skillsOpen?28:0,opacity:r.skillsOpen?1:0},children:t.jsx(St,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:r.skillsOpen?"1fr":"0fr"},children:t.jsx("div",{className:"min-h-0 overflow-hidden",children:t.jsx("div",{className:"overflow-y-auto max-h-[300px] mask-[linear-gradient(to_bottom,black_calc(100%-40px),transparent_100%)]",children:t.jsx("div",{className:"flex flex-col gap-2 px-6 pb-4 pt-2",children:l.map(m=>t.jsx(S.Suspense,{fallback:t.jsx(Ae.Fallback,{}),children:t.jsx(Ae,{connection_id:m.connection_id,selected_tools:m.selected_tools,selected_resources:m.selected_resources,selected_prompts:m.selected_prompts,onClick:()=>p(m.connection_id)})},m.connection_id))})})})})]}),t.jsxs("div",{className:"flex flex-col flex-1 p-6 border-t border-border overflow-auto",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Instructions"}),t.jsx(Be,{name:"metadata.instructions",control:n.control,render:({field:m})=>t.jsx(Nt,{...m,value:m.value??"",placeholder:"Write instructions here...",className:"min-h-[200px] resize-none text-sm placeholder:text-muted-foreground/50 leading-relaxed border-0 rounded-none shadow-none px-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:border-0 bg-transparent"})})]})]})}),t.jsx(ks,{open:r.connectionDialogOpen,onOpenChange:m=>d({type:"SET_CONNECTION_DIALOG_OPEN",payload:m}),selectedId:r.editingConnectionId,form:n,connections:l}),t.jsx(Ls,{open:r.shareDialogOpen,onOpenChange:m=>d({type:"SET_SHARE_DIALOG_OPEN",payload:m}),virtualMcp:o})]})}function Ms(){const o=O.c(6),e=tt();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const n=st(s),{org:l,agentId:r}=n,d=Ct(r);if(!d){let a;return o[1]!==e||o[2]!==l?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(it,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(Z,{variant:"outline",onClick:()=>e({to:"/$org/$project/agents",params:{org:l,project:Ge}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=a):a=o[3],a}let c;return o[4]!==d?(c=t.jsx(Rs,{virtualMcp:d}),o[4]=d,o[5]=c):c=o[5],c}function so(){const o=O.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(fe,{children:t.jsx(S.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ze,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ms,{})})}),o[0]=e):e=o[0],e}export{so as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ve,j as s,E as Nt,r as Q,u as Ct,e as yt,B as U,D as X,v as wt,O as St}from"./index-BA8pppYm.js";import{C as kt}from"./collection-display-button-Bw7A_jmD.js";import{C as _t}from"./collection-search-CTFgB7Lp.js";import{P as Ce}from"./index-BnWERa_y.js";import{B as Dt,a as zt,b as At,c as Mt}from"./breadcrumb-BanVcbRs.js";import{C as gt}from"./connection-card-D3FBXf0S.js";import{B as be}from"./badge-CLjRXA2D.js";import{i as $t}from"./AlertCircle-DVW9JjHe.js";import{i as Tt}from"./CheckCircle-Dgm3JoPw.js";import{E as lt}from"./empty-state-DipJZxfo.js";import{I as Ue}from"./integration-icon-bimn_V0c.js";import{u as Pt}from"./use-list-state-DS3NYHkq.js";import{u as It}from"./use-create-virtual-mcp-B2tmMqVr.js";import{i as ye}from"./constants-D_wdAaOl.js";import{b as Ot,a as Bt}from"./use-virtual-mcp-DSUCQY_R.js";import{c as at,b as rt,d as ot,A as ct,e as dt,h as mt,a as ft,f as ut}from"./alert-dialog-CF6sz6zk.js";import{C as Fe}from"./checkbox-C1wB7_gF.js";import{c as Lt,d as Et,b as Rt,a as Kt,D as Vt}from"./dialog-nvlQa_Xp.js";import{c as Gt,a as Ut,b as Ge,e as te,d as Ft,T as Ht}from"./table-DtXpny3U.js";import{D as et,a as tt,b as st,c as je}from"./dropdown-menu-CUiyve49.js";import{n as qt}from"./ArrowDown-DjR6AtS2.js";import{i as Jt}from"./ArrowUp-CsoOTX3e.js";import{i as Qt}from"./CheckSquare-B28p8IjK.js";import{t as Wt}from"./ChevronDown-1UjCvCvJ.js";import{i as nt}from"./DotsVertical-BhRvdXVC.js";import{s as it}from"./Eye-Daag7Wuw.js";import{i as Xt}from"./Loading01-XbSoiB54.js";import{s as ht}from"./Plus-D_LakzQG.js";import{s as He}from"./Trash01-CCCMsVx7.js";import{t as se}from"./Users03-CGvxqV0p.js";import{s as jt}from"./XClose-fSpVWsQE.js";import{U as we}from"./user-SVhF7LgJ.js";import{A as xt}from"./agent-connections-preview-BA-JLzW1.js";import{f as Se}from"./format-time-CMKyl-GC.js";import"./Check-DMs1RV8N.js";import"./Grid01-BFRlSnJR.js";import"./List-B5SMHNql.js";import"./tooltip-BwvAIIBc.js";import"./index-akdcnE10.js";import"./SearchMd-Td6IPzMi.js";import"./input-CWwUdImu.js";import"./useQuery-wtRfgSpz.js";import"./useMutation-BBCyPLav.js";import"./ChevronRight-BTRAVLe6.js";import"./card-B1_APflL.js";import"./Container-014scnrD.js";import"./use-view-mode-zE3w0aFf.js";import"./use-mobile-DppT4Zv5.js";import"./use-collections-CXZHBPMS.js";import"./X-C2xYa8Ax.js";import"./avatar-DuuaPRPf.js";import"./use-connection-oartfPuq.js";import"./differenceInSeconds-NQ4PDo0z.js";function qe(t){const e=ve.c(3),{status:n}=t;if(n==="active"){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(be,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[s.jsx(Tt,{size:12}),"Active"]}),e[0]=i):i=e[0],i}if(n==="error"){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(be,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[s.jsx($t,{size:12}),"Error"]}),e[1]=i):i=e[1],i}let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(be,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),e[2]=o):o=e[2],o}function pt(t){return t.title.trim().replace(/\s+\(\d+\)$/,"")}function Yt(t){const e=new Map;for(const i of t){const a=pt(i),l=e.get(a);l?l.push(i):e.set(a,[i])}const n=[],o=new Set;for(const i of t){const a=pt(i);if(o.has(a))continue;o.add(a);const l=e.get(a),f=l[0];l.length===1?n.push({type:"single",agent:f}):n.push({type:"group",key:a,icon:f.icon,title:f.title.replace(/\s*\(\d+\)\s*$/,""),agents:l})}return n}function bt(t){const e=new Set,n=[];for(const o of t)o.created_by&&!e.has(o.created_by)&&(e.add(o.created_by),n.push(o.created_by));return n}function Zt(t,e){switch(e.type){case"delete":return{mode:"deleting",virtualMcp:e.virtualMcp};case"close":return{mode:"idle"}}}function es(t){const e=ve.c(107),{group:n,onNavigate:o,onDelete:i,selectionMode:a,selectedIds:l,onToggleSelect:f}=t,[j,g]=Q.useState(!1);let w;if(e[0]!==n.agents||e[1]!==l){let y;e[3]!==l?(y=_=>l.has(_.id),e[3]=l,e[4]=y):y=e[4],w=n.agents.every(y),e[0]=n.agents,e[1]=l,e[2]=w}else w=e[2];const m=w;let D;if(e[5]!==n.agents||e[6]!==l){let y;e[8]!==l?(y=_=>l.has(_.id),e[8]=l,e[9]=y):y=e[9],D=n.agents.some(y),e[5]=n.agents,e[6]=l,e[7]=D}else D=e[7];const c=D;let O,S,d,C,z,P,k,I,A,u,b;if(e[10]!==m||e[11]!==n.agents||e[12]!==n.icon||e[13]!==n.title||e[14]!==f||e[15]!==l||e[16]!==a||e[17]!==c){const y=bt(n.agents),_=n.agents.reduce(is,n.agents[0]),W=_.updated_at??_.created_at;O=gt;const Y=`${n.agents.length} instances`;e[29]!==n.icon||e[30]!==n.title||e[31]!==Y?(A={title:n.title,icon:n.icon,description:Y},e[29]=n.icon,e[30]=n.title,e[31]=Y,e[32]=A):A=e[32],e[33]!==m||e[34]!==n.agents||e[35]!==f||e[36]!==l||e[37]!==a?(u=()=>a?(()=>{for(const E of n.agents)m?l.has(E.id)&&f(E.id):l.has(E.id)||f(E.id)})():g(!0),e[33]=m,e[34]=n.agents,e[35]=f,e[36]=l,e[37]=a,e[38]=u):u=e[38];const q=a&&m&&"ring-2 ring-primary",Z=a&&c&&!m&&"ring-1 ring-primary/50";e[39]!==q||e[40]!==Z?(b=X(q,Z),e[39]=q,e[40]=Z,e[41]=b):b=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(se,{}),e[42]=S):S=e[42],e[43]!==m||e[44]!==n.agents||e[45]!==f||e[46]!==l||e[47]!==a||e[48]!==c?(d=a?s.jsx(Fe,{checked:m?!0:c?"indeterminate":!1,onCheckedChange:()=>{for(const E of n.agents)m?l.has(E.id)&&f(E.id):l.has(E.id)||f(E.id)}}):s.jsxs(be,{variant:"secondary",className:"text-xs tabular-nums",children:["x",n.agents.length]}),e[43]=m,e[44]=n.agents,e[45]=f,e[46]=l,e[47]=a,e[48]=c,e[49]=d):d=e[49];let J;e[50]!==n.agents?(J=n.agents.slice(0,6).map(ns),e[50]=n.agents,e[51]=J):J=e[51],e[52]!==J?(C=s.jsx("div",{className:"flex items-center gap-1",children:J}),e[52]=J,e[53]=C):C=e[53],k="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const ee=y.map(E=>s.jsx(we,{id:E,size:"3xs",avatarOnly:y.length>1},E));e[54]!==ee?(I=s.jsx("div",{className:"flex items-center -space-x-1.5",children:ee}),e[54]=ee,e[55]=I):I=e[55],z="shrink-0 ml-2",P=W?Se(new Date(W)):"—",e[10]=m,e[11]=n.agents,e[12]=n.icon,e[13]=n.title,e[14]=f,e[15]=l,e[16]=a,e[17]=c,e[18]=O,e[19]=S,e[20]=d,e[21]=C,e[22]=z,e[23]=P,e[24]=k,e[25]=I,e[26]=A,e[27]=u,e[28]=b}else O=e[18],S=e[19],d=e[20],C=e[21],z=e[22],P=e[23],k=e[24],I=e[25],A=e[26],u=e[27],b=e[28];let p;e[56]!==z||e[57]!==P?(p=s.jsx("span",{className:z,children:P}),e[56]=z,e[57]=P,e[58]=p):p=e[58];let M;e[59]!==p||e[60]!==k||e[61]!==I?(M=s.jsxs("div",{className:k,children:[I,p]}),e[59]=p,e[60]=k,e[61]=I,e[62]=M):M=e[62];let $;e[63]!==O||e[64]!==S||e[65]!==d||e[66]!==C||e[67]!==M||e[68]!==A||e[69]!==u||e[70]!==b?($=s.jsx(O,{connection:A,onClick:u,className:b,fallbackIcon:S,headerActions:d,body:C,footer:M}),e[63]=O,e[64]=S,e[65]=d,e[66]=C,e[67]=M,e[68]=A,e[69]=u,e[70]=b,e[71]=$):$=e[71];let B;e[72]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(se,{}),e[72]=B):B=e[72];let T;e[73]!==n.icon||e[74]!==n.title?(T=s.jsx(Ue,{icon:n.icon,name:n.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:B}),e[73]=n.icon,e[74]=n.title,e[75]=T):T=e[75];let L;e[76]!==n.agents.length?(L=s.jsxs(be,{variant:"secondary",className:"ml-2 text-xs tabular-nums",children:["x",n.agents.length]}),e[76]=n.agents.length,e[77]=L):L=e[77];let r;e[78]!==n.title||e[79]!==L?(r=s.jsxs(Lt,{children:[n.title,L]}),e[78]=n.title,e[79]=L,e[80]=r):r=e[80];let h;e[81]!==n.agents.length?(h=s.jsxs(Et,{children:[n.agents.length," instances"]}),e[81]=n.agents.length,e[82]=h):h=e[82];let v;e[83]!==r||e[84]!==h?(v=s.jsxs("div",{children:[r,h]}),e[83]=r,e[84]=h,e[85]=v):v=e[85];let K;e[86]!==T||e[87]!==v?(K=s.jsx(Rt,{className:"px-6 pt-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[T,v]})}),e[86]=T,e[87]=v,e[88]=K):K=e[88];let V;if(e[89]!==n.agents||e[90]!==i||e[91]!==o){let y;e[93]!==i||e[94]!==o?(y=_=>s.jsxs("div",{className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>{g(!1),o(_.id)},children:[s.jsx(Ue,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0",fallbackIcon:s.jsx(se,{})}),s.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:_.title}),s.jsx(qe,{status:_.status})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[s.jsx(we,{id:_.created_by,size:"3xs"}),s.jsx("span",{children:_.created_at?Se(new Date(_.created_at)):"—"})]}),s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:ss,children:s.jsx(nt,{size:16})})}),s.jsxs(st,{align:"end",onClick:ts,children:[s.jsxs(je,{onClick:()=>{g(!1),o(_.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(_.id)&&s.jsxs(je,{variant:"destructive",onClick:()=>i(_),children:[s.jsx(He,{size:16}),"Delete"]})]})]})]},_.id),e[93]=i,e[94]=o,e[95]=y):y=e[95],V=n.agents.map(y),e[89]=n.agents,e[90]=i,e[91]=o,e[92]=V}else V=e[92];let F;e[96]!==V?(F=s.jsx("div",{className:"divide-y max-h-80 overflow-auto",children:V}),e[96]=V,e[97]=F):F=e[97];let R;e[98]!==K||e[99]!==F?(R=s.jsxs(Kt,{className:"sm:max-w-lg p-0 gap-0",children:[K,F]}),e[98]=K,e[99]=F,e[100]=R):R=e[100];let G;e[101]!==j||e[102]!==R?(G=s.jsx(Vt,{open:j,onOpenChange:g,children:R}),e[101]=j,e[102]=R,e[103]=G):G=e[103];let H;return e[104]!==$||e[105]!==G?(H=s.jsxs(s.Fragment,{children:[$,G]}),e[104]=$,e[105]=G,e[106]=H):H=e[106],H}function ts(t){return t.stopPropagation()}function ss(t){return t.stopPropagation()}function ns(t){return s.jsx(qe,{status:t.status},t.id)}function is(t,e){const n=e.updated_at??e.created_at,o=t.updated_at??t.created_at;return n?o?new Date(n)>new Date(o)?e:t:e:t}function ls(t){const e=ve.c(21),{count:n,total:o,onSelectAll:i,onDeselectAll:a,onDelete:l,onCancel:f}=t;if(n===0)return null;let j;e[0]!==n?(j=s.jsxs("span",{className:"text-sm font-medium tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=j):j=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-4 w-px bg-border"}),e[2]=g):g=e[2];let w;e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==o?(w=n<o?s.jsxs(U,{variant:"ghost",size:"sm",onClick:i,children:["Select all (",o,")"]}):s.jsx(U,{variant:"ghost",size:"sm",onClick:a,children:"Clear selection"}),e[3]=n,e[4]=a,e[5]=i,e[6]=o,e[7]=w):w=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-4 w-px bg-border"}),e[8]=m):m=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(He,{size:14}),e[9]=D):D=e[9];let c;e[10]!==l?(c=s.jsxs(U,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:l,children:[D,"Delete"]}),e[10]=l,e[11]=c):c=e[11];let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("div",{className:"h-4 w-px bg-border"}),e[12]=O):O=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(jt,{size:14}),e[13]=S):S=e[13];let d;e[14]!==f?(d=s.jsxs(U,{variant:"ghost",size:"sm",onClick:f,children:[S,"Cancel"]}),e[14]=f,e[15]=d):d=e[15];let C;return e[16]!==j||e[17]!==w||e[18]!==c||e[19]!==d?(C=s.jsxs("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 flex items-center gap-3 rounded-xl border border-border bg-background/95 backdrop-blur px-4 py-2.5 shadow-lg",children:[j,g,w,m,c,O,d]}),e[16]=j,e[17]=w,e[18]=c,e[19]=d,e[20]=C):C=e[20],C}function as(t){const e=ve.c(37),{columns:n,grouped:o,sortKey:i,sortDirection:a,onSort:l,onRowClick:f,selectionMode:j,selectedIds:g,onToggleSelect:w,emptyState:m}=t;let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=new Set,e[0]=D):D=e[0];const[c,O]=Q.useState(D);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=u=>{O(b=>{const p=new Set(b);return p.has(u)?p.delete(u):p.add(u),p})},e[1]=S):S=e[1];const d=S;if(o.length===0&&m){let u;return e[2]!==m?(u=s.jsx("div",{className:"flex items-center justify-center h-full",children:m}),e[2]=m,e[3]=u):u=e[3],u}const C=n.length;let z;if(e[4]!==C||e[5]!==n||e[6]!==l||e[7]!==a||e[8]!==i){let u;e[10]!==C||e[11]!==l||e[12]!==a||e[13]!==i?(u=(b,p)=>{const M=i===b.id,$=p===C-1;return s.jsx(Gt,{className:X("px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider",$&&"w-8","group transition-colors select-none",b.sortable&&"hover:bg-accent cursor-pointer",b.cellClassName),onClick:b.sortable&&l?()=>l(b.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[b.header,b.sortable&&s.jsx("span",{className:"w-4 flex items-center justify-center",children:M&&a&&(a==="asc"?s.jsx(Jt,{size:16,className:"text-muted-foreground"}):s.jsx(qt,{size:16,className:"text-muted-foreground"}))})]})},b.id)},e[10]=C,e[11]=l,e[12]=a,e[13]=i,e[14]=u):u=e[14],z=n.map(u),e[4]=C,e[5]=n,e[6]=l,e[7]=a,e[8]=i,e[9]=z}else z=e[9];let P;e[15]!==z?(P=s.jsx(Ut,{className:"border-b-0",children:s.jsx(Ge,{className:"h-9 hover:bg-transparent border-b border-border",children:z})}),e[15]=z,e[16]=P):P=e[16];let k;if(e[17]!==n||e[18]!==c||e[19]!==o||e[20]!==f||e[21]!==w||e[22]!==g||e[23]!==j){let u;e[25]!==n||e[26]!==c||e[27]!==f||e[28]!==w||e[29]!==g||e[30]!==j?(u=b=>{if(b.type==="single"){const r=b.agent;return s.jsx(Ge,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer",j&&g.has(r.id)&&"bg-primary/5"),onClick:()=>f(r),children:n.map(h=>s.jsx(te,{className:X("px-5 py-4 h-16 align-middle text-sm text-foreground",h.cellClassName),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:h.render?h.render(r):null})},h.id))},r.id)}const p=b,M=c.has(p.key),$=p.agents.every(r=>g.has(r.id)),B=p.agents.some(r=>g.has(r.id)),T=bt(p.agents),L=p.agents.reduce(os,p.agents[0]);return s.jsxs(Q.Fragment,{children:[s.jsx(Ge,{className:"border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>d(p.key),children:n.map(r=>{const h=X("px-5 py-3 h-14 align-middle text-sm",r.cellClassName);if(r.id==="select")return s.jsx(te,{className:h,children:s.jsx(Fe,{checked:$?!0:B?"indeterminate":!1,onCheckedChange:()=>{for(const v of p.agents)$?g.has(v.id)&&w(v.id):g.has(v.id)||w(v.id)},onClick:rs})},r.id);if(r.id==="title")return s.jsx(te,{className:h,children:s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ue,{icon:p.icon,name:p.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(se,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:p.title}),s.jsxs(be,{variant:"secondary",className:"text-xs tabular-nums",children:["x",p.agents.length]})]})},r.id);if(r.id==="updated_by")return s.jsx(te,{className:h,children:s.jsx("div",{className:"flex items-center -space-x-1.5",children:T.map(v=>s.jsx(we,{id:v,size:"3xs",avatarOnly:T.length>1},v))})},r.id);if(r.id==="updated_at"){const v=L.updated_at??L.created_at;return s.jsx(te,{className:h,children:s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v?Se(new Date(v)):"—"})},r.id)}return r.id==="actions"?s.jsx(te,{className:h,children:s.jsx(Wt,{size:16,className:X("text-muted-foreground transition-transform",M&&"rotate-180")})},r.id):s.jsx(te,{className:h},r.id)})}),M&&p.agents.map(r=>s.jsx(Ge,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer bg-muted/20",j&&g.has(r.id)&&"bg-primary/5"),onClick:()=>f(r),children:n.map(h=>s.jsx(te,{className:X("px-5 py-3 h-14 align-middle text-sm text-foreground",h.cellClassName,h.id==="title"&&"pl-12"),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:h.render?h.render(r):null})},h.id))},r.id))]},p.key)},e[25]=n,e[26]=c,e[27]=f,e[28]=w,e[29]=g,e[30]=j,e[31]=u):u=e[31],k=o.map(u),e[17]=n,e[18]=c,e[19]=o,e[20]=f,e[21]=w,e[22]=g,e[23]=j,e[24]=k}else k=e[24];let I;e[32]!==k?(I=s.jsx(Ft,{children:k}),e[32]=k,e[33]=I):I=e[33];let A;return e[34]!==P||e[35]!==I?(A=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs(Ht,{className:"w-full border-collapse",children:[P,I]})}),e[34]=P,e[35]=I,e[36]=A):A=e[36],A}function rs(t){return t.stopPropagation()}function os(t,e){const n=e.updated_at??e.created_at,o=t.updated_at??t.created_at;return n?o?new Date(n)>new Date(o)?e:t:e:t}function cs(){const t=ve.c(138),{org:e}=Ct(),n=yt();let o;t[0]!==e.slug?(o={namespace:e.slug,resource:"agents"},t[0]=e.slug,t[1]=o):o=t[1];const i=Pt(o),a=Ot(i);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={navigateOnCreate:!0},t[2]=l):l=t[2];const{createVirtualMCP:f,isCreating:j}=It(l),g=Bt();let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w={mode:"idle"},t[3]=w):w=t[3];const[m,D]=Q.useReducer(Zt,w),[c,O]=Q.useState(!1);let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=new Set,t[4]=S):S=t[4];const[d,C]=Q.useState(S),[z,P]=Q.useState(!1),[k,I]=Q.useState("ALL");let A;t[5]===Symbol.for("react.memo_cache_sentinel")?(A=R=>{C(G=>{const H=new Set(G);return H.has(R)?H.delete(R):H.add(R),H})},t[5]=A):A=t[5];const u=A;let b;t[6]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{O(!1),C(new Set)},t[6]=b):b=t[6];const p=b;let M,$,B,T,L,r,h,v;if(t[7]!==g||t[8]!==z||t[9]!==f||t[10]!==m.mode||t[11]!==m.virtualMcp||t[12]!==j||t[13]!==i||t[14]!==n||t[15]!==e.slug||t[16]!==d||t[17]!==c||t[18]!==k||t[19]!==a){let R;t[28]!==k?(R=x=>!(k!=="ALL"&&x.status!==k),t[28]=k,t[29]=R):R=t[29],B=a.filter(R);const G=Yt(B),H=a.length;let y;t[30]!==a?(y=a.filter(ws),t[30]=a,t[31]=y):y=t[31];const _=y.length;let W;t[32]!==a?(W=a.filter(ys),t[32]=a,t[33]=W):W=t[33];let Y;t[34]!==y.length||t[35]!==W.length||t[36]!==a.length?(Y={total:H,active:_,inactive:W.length},t[34]=y.length,t[35]=W.length,t[36]=a.length,t[37]=Y):Y=t[37];const q=Y;let Z;t[38]!==g||t[39]!==m.mode||t[40]!==m.virtualMcp?(Z=async()=>{if(m.mode!=="deleting")return;const x=m.virtualMcp.id;if(D({type:"close"}),!(!x||ye(x)))try{await g.delete.mutateAsync(x)}catch{}},t[38]=g,t[39]=m.mode,t[40]=m.virtualMcp,t[41]=Z):Z=t[41];const J=Z;let ee;t[42]!==g||t[43]!==d?(ee=async()=>{P(!1);let x=0;for(const N of d)if(!ye(N))try{await g.delete.mutateAsync(N),x++}catch{}wt.success(`Deleted ${x} agent${x!==1?"s":""}`),p()},t[42]=g,t[43]=d,t[44]=ee):ee=t[44];const E=ee;let ke;t[45]!==n||t[46]!==e.slug||t[47]!==c?(ke=x=>{if(c){u(x);return}n({to:"/$org/$project/agents/$agentId",params:{org:e.slug,project:St,agentId:x}})},t[45]=n,t[46]=e.slug,t[47]=c,t[48]=ke):ke=t[48];const ne=ke;let ie;t[49]!==d||t[50]!==c?(ie=c?[{id:"select",header:"",render:x=>s.jsx(Fe,{checked:d.has(x.id),onCheckedChange:()=>u(x.id),onClick:Cs}),cellClassName:"w-10 shrink-0"}]:[],t[49]=d,t[50]=c,t[51]=ie):ie=t[51];let _e,De,ze,Ae,Me,$e;t[52]===Symbol.for("react.memo_cache_sentinel")?(_e={id:"title",header:"Name",render:Ns,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},De={id:"description",header:"Description",render:vs,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},ze={id:"connections",header:"Connections",render:js,cellClassName:"w-28 shrink-0"},Ae={id:"status",header:"Status",render:gs,cellClassName:"w-24 shrink-0"},Me={id:"updated_by",header:"Updated by",render:ps,cellClassName:"w-32 shrink-0",sortable:!0},$e={id:"updated_at",header:"Updated",render:xs,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},t[52]=_e,t[53]=De,t[54]=ze,t[55]=Ae,t[56]=Me,t[57]=$e):(_e=t[52],De=t[53],ze=t[54],Ae=t[55],Me=t[56],$e=t[57]);let le;t[58]!==ne?(le={id:"actions",header:"",render:x=>s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:hs,children:s.jsx(nt,{size:20})})}),s.jsxs(st,{align:"end",onClick:us,children:[s.jsxs(je,{onClick:N=>{N.stopPropagation(),ne(x.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(x.id)&&s.jsxs(je,{variant:"destructive",onClick:N=>{N.stopPropagation(),D({type:"delete",virtualMcp:x})},children:[s.jsx(He,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"},t[58]=ne,t[59]=le):le=t[59];let Te;t[60]!==ie||t[61]!==le?(Te=[...ie,_e,De,ze,Ae,Me,$e,le],t[60]=ie,t[61]=le,t[62]=Te):Te=t[62];const vt=Te;let Pe;t[63]!==f||t[64]!==j||t[65]!==c?(Pe=s.jsx("div",{className:"flex items-center gap-2",children:c?s.jsxs(U,{variant:"ghost",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:p,children:[s.jsx(jt,{size:14}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsxs(U,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:()=>O(!0),children:[s.jsx(Qt,{size:14}),"Select"]}),s.jsx(U,{onClick:f,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:j,children:j?"Creating...":"Create Agent"})]})}),t[63]=f,t[64]=j,t[65]=c,t[66]=Pe):Pe=t[66];const Je=Pe;$=Ce;const Qe=m.mode==="deleting";let Ie;t[67]===Symbol.for("react.memo_cache_sentinel")?(Ie=x=>!x&&D({type:"close"}),t[67]=Ie):Ie=t[67];let Oe;t[68]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(at,{children:"Delete Agent?"}),t[68]=Oe):Oe=t[68];const We=m.mode==="deleting"&&m.virtualMcp.title;let ae;t[69]!==We?(ae=s.jsxs(rt,{children:[Oe,s.jsxs(ot,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:We}),"."]})]}),t[69]=We,t[70]=ae):ae=t[70];let Be;t[71]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(ct,{children:"Cancel"}),t[71]=Be):Be=t[71];let re;t[72]!==J?(re=s.jsxs(dt,{children:[Be,s.jsx(mt,{onClick:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[72]=J,t[73]=re):re=t[73];let oe;t[74]!==ae||t[75]!==re?(oe=s.jsxs(ft,{children:[ae,re]}),t[74]=ae,t[75]=re,t[76]=oe):oe=t[76],t[77]!==Qe||t[78]!==oe?(r=s.jsx(ut,{open:Qe,onOpenChange:Ie,children:oe}),t[77]=Qe,t[78]=oe,t[79]=r):r=t[79];const Xe=d.size!==1?"s":"";let ce;t[80]!==d.size||t[81]!==Xe?(ce=s.jsxs(at,{children:["Delete ",d.size," agent",Xe,"?"]}),t[80]=d.size,t[81]=Xe,t[82]=ce):ce=t[82];let Le;t[83]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(ot,{children:"This action cannot be undone. This will permanently delete the selected agents."}),t[83]=Le):Le=t[83];let de;t[84]!==ce?(de=s.jsxs(rt,{children:[ce,Le]}),t[84]=ce,t[85]=de):de=t[85];let Ee;t[86]===Symbol.for("react.memo_cache_sentinel")?(Ee=s.jsx(ct,{children:"Cancel"}),t[86]=Ee):Ee=t[86];let me;t[87]!==E?(me=s.jsxs(dt,{children:[Ee,s.jsx(mt,{onClick:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[87]=E,t[88]=me):me=t[88];let fe;t[89]!==de||t[90]!==me?(fe=s.jsxs(ft,{children:[de,me]}),t[89]=de,t[90]=me,t[91]=fe):fe=t[91],t[92]!==z||t[93]!==fe?(h=s.jsx(ut,{open:z,onOpenChange:P,children:fe}),t[92]=z,t[93]=fe,t[94]=h):h=t[94];const Ye=q.active>0&&` · ${q.active} active`,Ze=q.inactive>0&&` · ${q.inactive} inactive`;let ue;t[95]!==q.total||t[96]!==Ye||t[97]!==Ze?(ue=s.jsx(Ce.Header.Left,{children:s.jsx(Dt,{children:s.jsx(zt,{children:s.jsx(At,{children:s.jsxs(Mt,{className:"flex items-center gap-2",children:["Agents",s.jsxs("span",{className:"text-xs font-normal text-muted-foreground tabular-nums",children:[q.total," total",Ye,Ze]})]})})})})}),t[95]=q.total,t[96]=Ye,t[97]=Ze,t[98]=ue):ue=t[98];let Re;t[99]===Symbol.for("react.memo_cache_sentinel")?(Re=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],t[99]=Re):Re=t[99];let Ke,Ve;t[100]===Symbol.for("react.memo_cache_sentinel")?(Ke=x=>I(x||"ALL"),Ve=[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}],t[100]=Ke,t[101]=Ve):(Ke=t[100],Ve=t[101]);let he;t[102]!==k?(he=[{label:"Status",value:k,onChange:Ke,options:Ve}],t[102]=k,t[103]=he):he=t[103];let xe;t[104]!==i.handleSort||t[105]!==i.setViewMode||t[106]!==i.sortDirection||t[107]!==i.sortKey||t[108]!==i.viewMode||t[109]!==he?(xe=s.jsx(kt,{viewMode:i.viewMode,onViewModeChange:i.setViewMode,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,sortOptions:Re,filters:he}),t[104]=i.handleSort,t[105]=i.setViewMode,t[106]=i.sortDirection,t[107]=i.sortKey,t[108]=i.viewMode,t[109]=he,t[110]=xe):xe=t[110];let pe;t[111]!==Je||t[112]!==xe?(pe=s.jsxs(Ce.Header.Right,{children:[xe,Je]}),t[111]=Je,t[112]=xe,t[113]=pe):pe=t[113],t[114]!==ue||t[115]!==pe?(v=s.jsxs(Ce.Header,{children:[ue,pe]}),t[114]=ue,t[115]=pe,t[116]=v):v=t[116];let ge;t[117]!==i?(ge=x=>{x.key==="Escape"&&(i.setSearch(""),x.target.blur())},t[117]=i,t[118]=ge):ge=t[118],t[119]!==i.search||t[120]!==i.setSearch||t[121]!==ge?(T=s.jsx("div",{className:"flex items-center gap-3 px-5 pb-0",children:s.jsx("div",{className:"flex-1",children:s.jsx(_t,{value:i.search,onChange:i.setSearch,placeholder:"Search for an agent...",onKeyDown:ge})})}),t[119]=i.search,t[120]=i.setSearch,t[121]=ge,t[122]=T):T=t[122],M=Ce.Content,L=i.viewMode==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:B.length===0?s.jsx("div",{className:"flex items-center h-full",children:s.jsx(lt,{image:s.jsx(se,{size:48,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections.",actions:!i.search&&s.jsxs(U,{size:"sm",onClick:f,disabled:j,children:[s.jsx(ht,{size:14}),j?"Creating...":"Create Agent"]})})}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:G.map(x=>{if(x.type==="group")return s.jsx(es,{group:x,onNavigate:ne,onDelete:Ne=>D({type:"delete",virtualMcp:Ne}),selectionMode:c,selectedIds:d,onToggleSelect:u},x.key);const N=x.agent;return s.jsxs("div",{className:"relative",children:[c&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsx(Fe,{checked:d.has(N.id),onCheckedChange:()=>u(N.id)})}),s.jsx(gt,{connection:{id:N.id??"",title:N.title,description:N.description,icon:N.icon,status:N.status},fallbackIcon:s.jsx(se,{}),onClick:()=>ne(N.id),className:X(c&&d.has(N.id)&&"ring-2 ring-primary"),body:s.jsx(qe,{status:N.status}),footer:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(we,{id:N.updated_by??N.created_by,size:"3xs"})}),s.jsx("span",{className:"shrink-0 ml-2",children:N.updated_at?Se(new Date(N.updated_at)):"—"})]}),headerActions:c?void 0:s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:fs,children:s.jsx(nt,{size:20})})}),s.jsxs(st,{align:"end",onClick:ms,children:[s.jsxs(je,{onClick:Ne=>{Ne.stopPropagation(),ne(N.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(N.id)&&s.jsxs(je,{variant:"destructive",onClick:Ne=>{Ne.stopPropagation(),D({type:"delete",virtualMcp:N})},children:[s.jsx(He,{size:16}),"Delete"]})]})]})})]},N.id)})})}):s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:G.length===0?s.jsx("div",{className:"flex items-center h-full",children:s.jsx(lt,{image:s.jsx(se,{size:48,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections.",actions:!i.search&&s.jsxs(U,{size:"sm",onClick:f,disabled:j,children:[s.jsx(ht,{size:14}),j?"Creating...":"Create Agent"]})})}):s.jsx("div",{className:"min-w-[1000px]",children:s.jsx(as,{columns:vt,grouped:G,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,onRowClick:x=>ne(x.id),selectionMode:c,selectedIds:d,onToggleSelect:u})})})}),t[7]=g,t[8]=z,t[9]=f,t[10]=m.mode,t[11]=m.virtualMcp,t[12]=j,t[13]=i,t[14]=n,t[15]=e.slug,t[16]=d,t[17]=c,t[18]=k,t[19]=a,t[20]=M,t[21]=$,t[22]=B,t[23]=T,t[24]=L,t[25]=r,t[26]=h,t[27]=v}else M=t[20],$=t[21],B=t[22],T=t[23],L=t[24],r=t[25],h=t[26],v=t[27];let K;t[123]!==M||t[124]!==L?(K=s.jsx(M,{children:L}),t[123]=M,t[124]=L,t[125]=K):K=t[125];let V;t[126]!==B||t[127]!==d.size||t[128]!==c?(V=c&&s.jsx(ls,{count:d.size,total:B.length,onSelectAll:()=>C(new Set(B.map(ds))),onDeselectAll:()=>C(new Set),onDelete:()=>P(!0),onCancel:p}),t[126]=B,t[127]=d.size,t[128]=c,t[129]=V):V=t[129];let F;return t[130]!==$||t[131]!==T||t[132]!==K||t[133]!==V||t[134]!==r||t[135]!==h||t[136]!==v?(F=s.jsxs($,{children:[r,h,v,T,K,V]}),t[130]=$,t[131]=T,t[132]=K,t[133]=V,t[134]=r,t[135]=h,t[136]=v,t[137]=F):F=t[137],F}function ds(t){return t.id}function ms(t){return t.stopPropagation()}function fs(t){return t.stopPropagation()}function us(t){return t.stopPropagation()}function hs(t){return t.stopPropagation()}function xs(t){return s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?Se(new Date(t.updated_at)):"—"})}function ps(t){return s.jsx(we,{id:t.updated_by??t.created_by,size:"3xs"})}function gs(t){return s.jsx(qe,{status:t.status})}function js(t){return s.jsx(Q.Suspense,{fallback:s.jsx(xt.Fallback,{}),children:s.jsx(xt,{connectionIds:t.connections.map(bs),maxVisibleIcons:2})})}function bs(t){return t.connection_id}function vs(t){return s.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"})}function Ns(t){return s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ue,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(se,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title})]})}function Cs(t){return t.stopPropagation()}function ys(t){return t.status==="inactive"}function ws(t){return t.status==="active"}function Sn(){const t=ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Nt,{children:s.jsx(Q.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Xt,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(cs,{})})}),t[0]=e):e=t[0],e}export{Sn as default};
|
|
1
|
+
import{c as ve,j as s,E as Nt,r as Q,u as Ct,e as yt,B as U,D as X,v as wt,O as St}from"./index-DnJ6a24w.js";import{C as kt}from"./collection-display-button-C42ZnuS7.js";import{C as _t}from"./collection-search-Dzoe9W56.js";import{P as Ce}from"./index-B09Yemt1.js";import{B as Dt,a as zt,b as At,c as Mt}from"./breadcrumb-BWfepeob.js";import{C as gt}from"./connection-card-DuHVLZ35.js";import{B as be}from"./badge-DIWKuwVU.js";import{i as $t}from"./AlertCircle-QngH9BVd.js";import{i as Tt}from"./CheckCircle-DDKCxiAn.js";import{E as lt}from"./empty-state-BjCXvoyS.js";import{I as Ue}from"./integration-icon-C9GR_8Ea.js";import{u as Pt}from"./use-list-state-DrSbpG8C.js";import{u as It}from"./use-create-virtual-mcp-BOxl7MdZ.js";import{i as ye}from"./constants-D5QZg84_.js";import{b as Ot,a as Bt}from"./use-virtual-mcp-DGT5zflo.js";import{c as at,b as rt,d as ot,A as ct,e as dt,h as mt,a as ft,f as ut}from"./alert-dialog-BqCiJDa8.js";import{C as Fe}from"./checkbox-DygphnIU.js";import{c as Lt,d as Et,b as Rt,a as Kt,D as Vt}from"./dialog-B8WS5FOh.js";import{c as Gt,a as Ut,b as Ge,e as te,d as Ft,T as Ht}from"./table-BK1bAac3.js";import{D as et,a as tt,b as st,c as je}from"./dropdown-menu-DE2pKopg.js";import{n as qt}from"./ArrowDown-Ba2t7m6d.js";import{i as Jt}from"./ArrowUp-Wy3Qa9X3.js";import{i as Qt}from"./CheckSquare-IgZnioYh.js";import{t as Wt}from"./ChevronDown-D0b1rvAp.js";import{i as nt}from"./DotsVertical-Bo0fAyx-.js";import{s as it}from"./Eye-Cqad01Et.js";import{i as Xt}from"./Loading01-DQphO9Su.js";import{s as ht}from"./Plus-CURSuoDd.js";import{s as He}from"./Trash01-CYMRq_nY.js";import{t as se}from"./Users03-DEpvReeu.js";import{s as jt}from"./XClose-C-H07PEn.js";import{U as we}from"./user-ChA79mrb.js";import{A as xt}from"./agent-connections-preview-DbwllQSw.js";import{f as Se}from"./format-time-CMKyl-GC.js";import"./Check-CLxUgI8Z.js";import"./Grid01-B9zEjFyx.js";import"./List-D6xZGoxJ.js";import"./tooltip-Csc3oeTz.js";import"./index-hCeFdkUk.js";import"./SearchMd-C8ADHGFY.js";import"./input-BBKBJVKe.js";import"./useQuery-mzOsnjYJ.js";import"./useMutation-Betr8yis.js";import"./ChevronRight-BEUO8jhU.js";import"./card-gfMzoGpr.js";import"./Container-b65PFshp.js";import"./use-view-mode-BeRbE5Df.js";import"./use-mobile-Y3tADOOl.js";import"./use-collections-Le9CzDbY.js";import"./X-BT_y3J3a.js";import"./avatar-BoRF-Me1.js";import"./use-connection-CNeKPAtP.js";import"./differenceInSeconds-NQ4PDo0z.js";function qe(t){const e=ve.c(3),{status:n}=t;if(n==="active"){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(be,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[s.jsx(Tt,{size:12}),"Active"]}),e[0]=i):i=e[0],i}if(n==="error"){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(be,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[s.jsx($t,{size:12}),"Error"]}),e[1]=i):i=e[1],i}let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(be,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),e[2]=o):o=e[2],o}function pt(t){return t.title.trim().replace(/\s+\(\d+\)$/,"")}function Yt(t){const e=new Map;for(const i of t){const a=pt(i),l=e.get(a);l?l.push(i):e.set(a,[i])}const n=[],o=new Set;for(const i of t){const a=pt(i);if(o.has(a))continue;o.add(a);const l=e.get(a),f=l[0];l.length===1?n.push({type:"single",agent:f}):n.push({type:"group",key:a,icon:f.icon,title:f.title.replace(/\s*\(\d+\)\s*$/,""),agents:l})}return n}function bt(t){const e=new Set,n=[];for(const o of t)o.created_by&&!e.has(o.created_by)&&(e.add(o.created_by),n.push(o.created_by));return n}function Zt(t,e){switch(e.type){case"delete":return{mode:"deleting",virtualMcp:e.virtualMcp};case"close":return{mode:"idle"}}}function es(t){const e=ve.c(107),{group:n,onNavigate:o,onDelete:i,selectionMode:a,selectedIds:l,onToggleSelect:f}=t,[j,g]=Q.useState(!1);let w;if(e[0]!==n.agents||e[1]!==l){let y;e[3]!==l?(y=_=>l.has(_.id),e[3]=l,e[4]=y):y=e[4],w=n.agents.every(y),e[0]=n.agents,e[1]=l,e[2]=w}else w=e[2];const m=w;let D;if(e[5]!==n.agents||e[6]!==l){let y;e[8]!==l?(y=_=>l.has(_.id),e[8]=l,e[9]=y):y=e[9],D=n.agents.some(y),e[5]=n.agents,e[6]=l,e[7]=D}else D=e[7];const c=D;let O,S,d,C,z,P,k,I,A,u,b;if(e[10]!==m||e[11]!==n.agents||e[12]!==n.icon||e[13]!==n.title||e[14]!==f||e[15]!==l||e[16]!==a||e[17]!==c){const y=bt(n.agents),_=n.agents.reduce(is,n.agents[0]),W=_.updated_at??_.created_at;O=gt;const Y=`${n.agents.length} instances`;e[29]!==n.icon||e[30]!==n.title||e[31]!==Y?(A={title:n.title,icon:n.icon,description:Y},e[29]=n.icon,e[30]=n.title,e[31]=Y,e[32]=A):A=e[32],e[33]!==m||e[34]!==n.agents||e[35]!==f||e[36]!==l||e[37]!==a?(u=()=>a?(()=>{for(const E of n.agents)m?l.has(E.id)&&f(E.id):l.has(E.id)||f(E.id)})():g(!0),e[33]=m,e[34]=n.agents,e[35]=f,e[36]=l,e[37]=a,e[38]=u):u=e[38];const q=a&&m&&"ring-2 ring-primary",Z=a&&c&&!m&&"ring-1 ring-primary/50";e[39]!==q||e[40]!==Z?(b=X(q,Z),e[39]=q,e[40]=Z,e[41]=b):b=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(se,{}),e[42]=S):S=e[42],e[43]!==m||e[44]!==n.agents||e[45]!==f||e[46]!==l||e[47]!==a||e[48]!==c?(d=a?s.jsx(Fe,{checked:m?!0:c?"indeterminate":!1,onCheckedChange:()=>{for(const E of n.agents)m?l.has(E.id)&&f(E.id):l.has(E.id)||f(E.id)}}):s.jsxs(be,{variant:"secondary",className:"text-xs tabular-nums",children:["x",n.agents.length]}),e[43]=m,e[44]=n.agents,e[45]=f,e[46]=l,e[47]=a,e[48]=c,e[49]=d):d=e[49];let J;e[50]!==n.agents?(J=n.agents.slice(0,6).map(ns),e[50]=n.agents,e[51]=J):J=e[51],e[52]!==J?(C=s.jsx("div",{className:"flex items-center gap-1",children:J}),e[52]=J,e[53]=C):C=e[53],k="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const ee=y.map(E=>s.jsx(we,{id:E,size:"3xs",avatarOnly:y.length>1},E));e[54]!==ee?(I=s.jsx("div",{className:"flex items-center -space-x-1.5",children:ee}),e[54]=ee,e[55]=I):I=e[55],z="shrink-0 ml-2",P=W?Se(new Date(W)):"—",e[10]=m,e[11]=n.agents,e[12]=n.icon,e[13]=n.title,e[14]=f,e[15]=l,e[16]=a,e[17]=c,e[18]=O,e[19]=S,e[20]=d,e[21]=C,e[22]=z,e[23]=P,e[24]=k,e[25]=I,e[26]=A,e[27]=u,e[28]=b}else O=e[18],S=e[19],d=e[20],C=e[21],z=e[22],P=e[23],k=e[24],I=e[25],A=e[26],u=e[27],b=e[28];let p;e[56]!==z||e[57]!==P?(p=s.jsx("span",{className:z,children:P}),e[56]=z,e[57]=P,e[58]=p):p=e[58];let M;e[59]!==p||e[60]!==k||e[61]!==I?(M=s.jsxs("div",{className:k,children:[I,p]}),e[59]=p,e[60]=k,e[61]=I,e[62]=M):M=e[62];let $;e[63]!==O||e[64]!==S||e[65]!==d||e[66]!==C||e[67]!==M||e[68]!==A||e[69]!==u||e[70]!==b?($=s.jsx(O,{connection:A,onClick:u,className:b,fallbackIcon:S,headerActions:d,body:C,footer:M}),e[63]=O,e[64]=S,e[65]=d,e[66]=C,e[67]=M,e[68]=A,e[69]=u,e[70]=b,e[71]=$):$=e[71];let B;e[72]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(se,{}),e[72]=B):B=e[72];let T;e[73]!==n.icon||e[74]!==n.title?(T=s.jsx(Ue,{icon:n.icon,name:n.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:B}),e[73]=n.icon,e[74]=n.title,e[75]=T):T=e[75];let L;e[76]!==n.agents.length?(L=s.jsxs(be,{variant:"secondary",className:"ml-2 text-xs tabular-nums",children:["x",n.agents.length]}),e[76]=n.agents.length,e[77]=L):L=e[77];let r;e[78]!==n.title||e[79]!==L?(r=s.jsxs(Lt,{children:[n.title,L]}),e[78]=n.title,e[79]=L,e[80]=r):r=e[80];let h;e[81]!==n.agents.length?(h=s.jsxs(Et,{children:[n.agents.length," instances"]}),e[81]=n.agents.length,e[82]=h):h=e[82];let v;e[83]!==r||e[84]!==h?(v=s.jsxs("div",{children:[r,h]}),e[83]=r,e[84]=h,e[85]=v):v=e[85];let K;e[86]!==T||e[87]!==v?(K=s.jsx(Rt,{className:"px-6 pt-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[T,v]})}),e[86]=T,e[87]=v,e[88]=K):K=e[88];let V;if(e[89]!==n.agents||e[90]!==i||e[91]!==o){let y;e[93]!==i||e[94]!==o?(y=_=>s.jsxs("div",{className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>{g(!1),o(_.id)},children:[s.jsx(Ue,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0",fallbackIcon:s.jsx(se,{})}),s.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:_.title}),s.jsx(qe,{status:_.status})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[s.jsx(we,{id:_.created_by,size:"3xs"}),s.jsx("span",{children:_.created_at?Se(new Date(_.created_at)):"—"})]}),s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:ss,children:s.jsx(nt,{size:16})})}),s.jsxs(st,{align:"end",onClick:ts,children:[s.jsxs(je,{onClick:()=>{g(!1),o(_.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(_.id)&&s.jsxs(je,{variant:"destructive",onClick:()=>i(_),children:[s.jsx(He,{size:16}),"Delete"]})]})]})]},_.id),e[93]=i,e[94]=o,e[95]=y):y=e[95],V=n.agents.map(y),e[89]=n.agents,e[90]=i,e[91]=o,e[92]=V}else V=e[92];let F;e[96]!==V?(F=s.jsx("div",{className:"divide-y max-h-80 overflow-auto",children:V}),e[96]=V,e[97]=F):F=e[97];let R;e[98]!==K||e[99]!==F?(R=s.jsxs(Kt,{className:"sm:max-w-lg p-0 gap-0",children:[K,F]}),e[98]=K,e[99]=F,e[100]=R):R=e[100];let G;e[101]!==j||e[102]!==R?(G=s.jsx(Vt,{open:j,onOpenChange:g,children:R}),e[101]=j,e[102]=R,e[103]=G):G=e[103];let H;return e[104]!==$||e[105]!==G?(H=s.jsxs(s.Fragment,{children:[$,G]}),e[104]=$,e[105]=G,e[106]=H):H=e[106],H}function ts(t){return t.stopPropagation()}function ss(t){return t.stopPropagation()}function ns(t){return s.jsx(qe,{status:t.status},t.id)}function is(t,e){const n=e.updated_at??e.created_at,o=t.updated_at??t.created_at;return n?o?new Date(n)>new Date(o)?e:t:e:t}function ls(t){const e=ve.c(21),{count:n,total:o,onSelectAll:i,onDeselectAll:a,onDelete:l,onCancel:f}=t;if(n===0)return null;let j;e[0]!==n?(j=s.jsxs("span",{className:"text-sm font-medium tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=j):j=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-4 w-px bg-border"}),e[2]=g):g=e[2];let w;e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==o?(w=n<o?s.jsxs(U,{variant:"ghost",size:"sm",onClick:i,children:["Select all (",o,")"]}):s.jsx(U,{variant:"ghost",size:"sm",onClick:a,children:"Clear selection"}),e[3]=n,e[4]=a,e[5]=i,e[6]=o,e[7]=w):w=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-4 w-px bg-border"}),e[8]=m):m=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(He,{size:14}),e[9]=D):D=e[9];let c;e[10]!==l?(c=s.jsxs(U,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:l,children:[D,"Delete"]}),e[10]=l,e[11]=c):c=e[11];let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("div",{className:"h-4 w-px bg-border"}),e[12]=O):O=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(jt,{size:14}),e[13]=S):S=e[13];let d;e[14]!==f?(d=s.jsxs(U,{variant:"ghost",size:"sm",onClick:f,children:[S,"Cancel"]}),e[14]=f,e[15]=d):d=e[15];let C;return e[16]!==j||e[17]!==w||e[18]!==c||e[19]!==d?(C=s.jsxs("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 flex items-center gap-3 rounded-xl border border-border bg-background/95 backdrop-blur px-4 py-2.5 shadow-lg",children:[j,g,w,m,c,O,d]}),e[16]=j,e[17]=w,e[18]=c,e[19]=d,e[20]=C):C=e[20],C}function as(t){const e=ve.c(37),{columns:n,grouped:o,sortKey:i,sortDirection:a,onSort:l,onRowClick:f,selectionMode:j,selectedIds:g,onToggleSelect:w,emptyState:m}=t;let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=new Set,e[0]=D):D=e[0];const[c,O]=Q.useState(D);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=u=>{O(b=>{const p=new Set(b);return p.has(u)?p.delete(u):p.add(u),p})},e[1]=S):S=e[1];const d=S;if(o.length===0&&m){let u;return e[2]!==m?(u=s.jsx("div",{className:"flex items-center justify-center h-full",children:m}),e[2]=m,e[3]=u):u=e[3],u}const C=n.length;let z;if(e[4]!==C||e[5]!==n||e[6]!==l||e[7]!==a||e[8]!==i){let u;e[10]!==C||e[11]!==l||e[12]!==a||e[13]!==i?(u=(b,p)=>{const M=i===b.id,$=p===C-1;return s.jsx(Gt,{className:X("px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider",$&&"w-8","group transition-colors select-none",b.sortable&&"hover:bg-accent cursor-pointer",b.cellClassName),onClick:b.sortable&&l?()=>l(b.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[b.header,b.sortable&&s.jsx("span",{className:"w-4 flex items-center justify-center",children:M&&a&&(a==="asc"?s.jsx(Jt,{size:16,className:"text-muted-foreground"}):s.jsx(qt,{size:16,className:"text-muted-foreground"}))})]})},b.id)},e[10]=C,e[11]=l,e[12]=a,e[13]=i,e[14]=u):u=e[14],z=n.map(u),e[4]=C,e[5]=n,e[6]=l,e[7]=a,e[8]=i,e[9]=z}else z=e[9];let P;e[15]!==z?(P=s.jsx(Ut,{className:"border-b-0",children:s.jsx(Ge,{className:"h-9 hover:bg-transparent border-b border-border",children:z})}),e[15]=z,e[16]=P):P=e[16];let k;if(e[17]!==n||e[18]!==c||e[19]!==o||e[20]!==f||e[21]!==w||e[22]!==g||e[23]!==j){let u;e[25]!==n||e[26]!==c||e[27]!==f||e[28]!==w||e[29]!==g||e[30]!==j?(u=b=>{if(b.type==="single"){const r=b.agent;return s.jsx(Ge,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer",j&&g.has(r.id)&&"bg-primary/5"),onClick:()=>f(r),children:n.map(h=>s.jsx(te,{className:X("px-5 py-4 h-16 align-middle text-sm text-foreground",h.cellClassName),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:h.render?h.render(r):null})},h.id))},r.id)}const p=b,M=c.has(p.key),$=p.agents.every(r=>g.has(r.id)),B=p.agents.some(r=>g.has(r.id)),T=bt(p.agents),L=p.agents.reduce(os,p.agents[0]);return s.jsxs(Q.Fragment,{children:[s.jsx(Ge,{className:"border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>d(p.key),children:n.map(r=>{const h=X("px-5 py-3 h-14 align-middle text-sm",r.cellClassName);if(r.id==="select")return s.jsx(te,{className:h,children:s.jsx(Fe,{checked:$?!0:B?"indeterminate":!1,onCheckedChange:()=>{for(const v of p.agents)$?g.has(v.id)&&w(v.id):g.has(v.id)||w(v.id)},onClick:rs})},r.id);if(r.id==="title")return s.jsx(te,{className:h,children:s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ue,{icon:p.icon,name:p.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(se,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:p.title}),s.jsxs(be,{variant:"secondary",className:"text-xs tabular-nums",children:["x",p.agents.length]})]})},r.id);if(r.id==="updated_by")return s.jsx(te,{className:h,children:s.jsx("div",{className:"flex items-center -space-x-1.5",children:T.map(v=>s.jsx(we,{id:v,size:"3xs",avatarOnly:T.length>1},v))})},r.id);if(r.id==="updated_at"){const v=L.updated_at??L.created_at;return s.jsx(te,{className:h,children:s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:v?Se(new Date(v)):"—"})},r.id)}return r.id==="actions"?s.jsx(te,{className:h,children:s.jsx(Wt,{size:16,className:X("text-muted-foreground transition-transform",M&&"rotate-180")})},r.id):s.jsx(te,{className:h},r.id)})}),M&&p.agents.map(r=>s.jsx(Ge,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer bg-muted/20",j&&g.has(r.id)&&"bg-primary/5"),onClick:()=>f(r),children:n.map(h=>s.jsx(te,{className:X("px-5 py-3 h-14 align-middle text-sm text-foreground",h.cellClassName,h.id==="title"&&"pl-12"),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:h.render?h.render(r):null})},h.id))},r.id))]},p.key)},e[25]=n,e[26]=c,e[27]=f,e[28]=w,e[29]=g,e[30]=j,e[31]=u):u=e[31],k=o.map(u),e[17]=n,e[18]=c,e[19]=o,e[20]=f,e[21]=w,e[22]=g,e[23]=j,e[24]=k}else k=e[24];let I;e[32]!==k?(I=s.jsx(Ft,{children:k}),e[32]=k,e[33]=I):I=e[33];let A;return e[34]!==P||e[35]!==I?(A=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs(Ht,{className:"w-full border-collapse",children:[P,I]})}),e[34]=P,e[35]=I,e[36]=A):A=e[36],A}function rs(t){return t.stopPropagation()}function os(t,e){const n=e.updated_at??e.created_at,o=t.updated_at??t.created_at;return n?o?new Date(n)>new Date(o)?e:t:e:t}function cs(){const t=ve.c(138),{org:e}=Ct(),n=yt();let o;t[0]!==e.slug?(o={namespace:e.slug,resource:"agents"},t[0]=e.slug,t[1]=o):o=t[1];const i=Pt(o),a=Ot(i);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={navigateOnCreate:!0},t[2]=l):l=t[2];const{createVirtualMCP:f,isCreating:j}=It(l),g=Bt();let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w={mode:"idle"},t[3]=w):w=t[3];const[m,D]=Q.useReducer(Zt,w),[c,O]=Q.useState(!1);let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=new Set,t[4]=S):S=t[4];const[d,C]=Q.useState(S),[z,P]=Q.useState(!1),[k,I]=Q.useState("ALL");let A;t[5]===Symbol.for("react.memo_cache_sentinel")?(A=R=>{C(G=>{const H=new Set(G);return H.has(R)?H.delete(R):H.add(R),H})},t[5]=A):A=t[5];const u=A;let b;t[6]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{O(!1),C(new Set)},t[6]=b):b=t[6];const p=b;let M,$,B,T,L,r,h,v;if(t[7]!==g||t[8]!==z||t[9]!==f||t[10]!==m.mode||t[11]!==m.virtualMcp||t[12]!==j||t[13]!==i||t[14]!==n||t[15]!==e.slug||t[16]!==d||t[17]!==c||t[18]!==k||t[19]!==a){let R;t[28]!==k?(R=x=>!(k!=="ALL"&&x.status!==k),t[28]=k,t[29]=R):R=t[29],B=a.filter(R);const G=Yt(B),H=a.length;let y;t[30]!==a?(y=a.filter(ws),t[30]=a,t[31]=y):y=t[31];const _=y.length;let W;t[32]!==a?(W=a.filter(ys),t[32]=a,t[33]=W):W=t[33];let Y;t[34]!==y.length||t[35]!==W.length||t[36]!==a.length?(Y={total:H,active:_,inactive:W.length},t[34]=y.length,t[35]=W.length,t[36]=a.length,t[37]=Y):Y=t[37];const q=Y;let Z;t[38]!==g||t[39]!==m.mode||t[40]!==m.virtualMcp?(Z=async()=>{if(m.mode!=="deleting")return;const x=m.virtualMcp.id;if(D({type:"close"}),!(!x||ye(x)))try{await g.delete.mutateAsync(x)}catch{}},t[38]=g,t[39]=m.mode,t[40]=m.virtualMcp,t[41]=Z):Z=t[41];const J=Z;let ee;t[42]!==g||t[43]!==d?(ee=async()=>{P(!1);let x=0;for(const N of d)if(!ye(N))try{await g.delete.mutateAsync(N),x++}catch{}wt.success(`Deleted ${x} agent${x!==1?"s":""}`),p()},t[42]=g,t[43]=d,t[44]=ee):ee=t[44];const E=ee;let ke;t[45]!==n||t[46]!==e.slug||t[47]!==c?(ke=x=>{if(c){u(x);return}n({to:"/$org/$project/agents/$agentId",params:{org:e.slug,project:St,agentId:x}})},t[45]=n,t[46]=e.slug,t[47]=c,t[48]=ke):ke=t[48];const ne=ke;let ie;t[49]!==d||t[50]!==c?(ie=c?[{id:"select",header:"",render:x=>s.jsx(Fe,{checked:d.has(x.id),onCheckedChange:()=>u(x.id),onClick:Cs}),cellClassName:"w-10 shrink-0"}]:[],t[49]=d,t[50]=c,t[51]=ie):ie=t[51];let _e,De,ze,Ae,Me,$e;t[52]===Symbol.for("react.memo_cache_sentinel")?(_e={id:"title",header:"Name",render:Ns,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},De={id:"description",header:"Description",render:vs,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},ze={id:"connections",header:"Connections",render:js,cellClassName:"w-28 shrink-0"},Ae={id:"status",header:"Status",render:gs,cellClassName:"w-24 shrink-0"},Me={id:"updated_by",header:"Updated by",render:ps,cellClassName:"w-32 shrink-0",sortable:!0},$e={id:"updated_at",header:"Updated",render:xs,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},t[52]=_e,t[53]=De,t[54]=ze,t[55]=Ae,t[56]=Me,t[57]=$e):(_e=t[52],De=t[53],ze=t[54],Ae=t[55],Me=t[56],$e=t[57]);let le;t[58]!==ne?(le={id:"actions",header:"",render:x=>s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:hs,children:s.jsx(nt,{size:20})})}),s.jsxs(st,{align:"end",onClick:us,children:[s.jsxs(je,{onClick:N=>{N.stopPropagation(),ne(x.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(x.id)&&s.jsxs(je,{variant:"destructive",onClick:N=>{N.stopPropagation(),D({type:"delete",virtualMcp:x})},children:[s.jsx(He,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"},t[58]=ne,t[59]=le):le=t[59];let Te;t[60]!==ie||t[61]!==le?(Te=[...ie,_e,De,ze,Ae,Me,$e,le],t[60]=ie,t[61]=le,t[62]=Te):Te=t[62];const vt=Te;let Pe;t[63]!==f||t[64]!==j||t[65]!==c?(Pe=s.jsx("div",{className:"flex items-center gap-2",children:c?s.jsxs(U,{variant:"ghost",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:p,children:[s.jsx(jt,{size:14}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsxs(U,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:()=>O(!0),children:[s.jsx(Qt,{size:14}),"Select"]}),s.jsx(U,{onClick:f,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:j,children:j?"Creating...":"Create Agent"})]})}),t[63]=f,t[64]=j,t[65]=c,t[66]=Pe):Pe=t[66];const Je=Pe;$=Ce;const Qe=m.mode==="deleting";let Ie;t[67]===Symbol.for("react.memo_cache_sentinel")?(Ie=x=>!x&&D({type:"close"}),t[67]=Ie):Ie=t[67];let Oe;t[68]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(at,{children:"Delete Agent?"}),t[68]=Oe):Oe=t[68];const We=m.mode==="deleting"&&m.virtualMcp.title;let ae;t[69]!==We?(ae=s.jsxs(rt,{children:[Oe,s.jsxs(ot,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:We}),"."]})]}),t[69]=We,t[70]=ae):ae=t[70];let Be;t[71]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(ct,{children:"Cancel"}),t[71]=Be):Be=t[71];let re;t[72]!==J?(re=s.jsxs(dt,{children:[Be,s.jsx(mt,{onClick:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[72]=J,t[73]=re):re=t[73];let oe;t[74]!==ae||t[75]!==re?(oe=s.jsxs(ft,{children:[ae,re]}),t[74]=ae,t[75]=re,t[76]=oe):oe=t[76],t[77]!==Qe||t[78]!==oe?(r=s.jsx(ut,{open:Qe,onOpenChange:Ie,children:oe}),t[77]=Qe,t[78]=oe,t[79]=r):r=t[79];const Xe=d.size!==1?"s":"";let ce;t[80]!==d.size||t[81]!==Xe?(ce=s.jsxs(at,{children:["Delete ",d.size," agent",Xe,"?"]}),t[80]=d.size,t[81]=Xe,t[82]=ce):ce=t[82];let Le;t[83]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(ot,{children:"This action cannot be undone. This will permanently delete the selected agents."}),t[83]=Le):Le=t[83];let de;t[84]!==ce?(de=s.jsxs(rt,{children:[ce,Le]}),t[84]=ce,t[85]=de):de=t[85];let Ee;t[86]===Symbol.for("react.memo_cache_sentinel")?(Ee=s.jsx(ct,{children:"Cancel"}),t[86]=Ee):Ee=t[86];let me;t[87]!==E?(me=s.jsxs(dt,{children:[Ee,s.jsx(mt,{onClick:E,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[87]=E,t[88]=me):me=t[88];let fe;t[89]!==de||t[90]!==me?(fe=s.jsxs(ft,{children:[de,me]}),t[89]=de,t[90]=me,t[91]=fe):fe=t[91],t[92]!==z||t[93]!==fe?(h=s.jsx(ut,{open:z,onOpenChange:P,children:fe}),t[92]=z,t[93]=fe,t[94]=h):h=t[94];const Ye=q.active>0&&` · ${q.active} active`,Ze=q.inactive>0&&` · ${q.inactive} inactive`;let ue;t[95]!==q.total||t[96]!==Ye||t[97]!==Ze?(ue=s.jsx(Ce.Header.Left,{children:s.jsx(Dt,{children:s.jsx(zt,{children:s.jsx(At,{children:s.jsxs(Mt,{className:"flex items-center gap-2",children:["Agents",s.jsxs("span",{className:"text-xs font-normal text-muted-foreground tabular-nums",children:[q.total," total",Ye,Ze]})]})})})})}),t[95]=q.total,t[96]=Ye,t[97]=Ze,t[98]=ue):ue=t[98];let Re;t[99]===Symbol.for("react.memo_cache_sentinel")?(Re=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],t[99]=Re):Re=t[99];let Ke,Ve;t[100]===Symbol.for("react.memo_cache_sentinel")?(Ke=x=>I(x||"ALL"),Ve=[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}],t[100]=Ke,t[101]=Ve):(Ke=t[100],Ve=t[101]);let he;t[102]!==k?(he=[{label:"Status",value:k,onChange:Ke,options:Ve}],t[102]=k,t[103]=he):he=t[103];let xe;t[104]!==i.handleSort||t[105]!==i.setViewMode||t[106]!==i.sortDirection||t[107]!==i.sortKey||t[108]!==i.viewMode||t[109]!==he?(xe=s.jsx(kt,{viewMode:i.viewMode,onViewModeChange:i.setViewMode,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,sortOptions:Re,filters:he}),t[104]=i.handleSort,t[105]=i.setViewMode,t[106]=i.sortDirection,t[107]=i.sortKey,t[108]=i.viewMode,t[109]=he,t[110]=xe):xe=t[110];let pe;t[111]!==Je||t[112]!==xe?(pe=s.jsxs(Ce.Header.Right,{children:[xe,Je]}),t[111]=Je,t[112]=xe,t[113]=pe):pe=t[113],t[114]!==ue||t[115]!==pe?(v=s.jsxs(Ce.Header,{children:[ue,pe]}),t[114]=ue,t[115]=pe,t[116]=v):v=t[116];let ge;t[117]!==i?(ge=x=>{x.key==="Escape"&&(i.setSearch(""),x.target.blur())},t[117]=i,t[118]=ge):ge=t[118],t[119]!==i.search||t[120]!==i.setSearch||t[121]!==ge?(T=s.jsx("div",{className:"flex items-center gap-3 px-5 pb-0",children:s.jsx("div",{className:"flex-1",children:s.jsx(_t,{value:i.search,onChange:i.setSearch,placeholder:"Search for an agent...",onKeyDown:ge})})}),t[119]=i.search,t[120]=i.setSearch,t[121]=ge,t[122]=T):T=t[122],M=Ce.Content,L=i.viewMode==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:B.length===0?s.jsx("div",{className:"flex items-center h-full",children:s.jsx(lt,{image:s.jsx(se,{size:48,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections.",actions:!i.search&&s.jsxs(U,{size:"sm",onClick:f,disabled:j,children:[s.jsx(ht,{size:14}),j?"Creating...":"Create Agent"]})})}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:G.map(x=>{if(x.type==="group")return s.jsx(es,{group:x,onNavigate:ne,onDelete:Ne=>D({type:"delete",virtualMcp:Ne}),selectionMode:c,selectedIds:d,onToggleSelect:u},x.key);const N=x.agent;return s.jsxs("div",{className:"relative",children:[c&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsx(Fe,{checked:d.has(N.id),onCheckedChange:()=>u(N.id)})}),s.jsx(gt,{connection:{id:N.id??"",title:N.title,description:N.description,icon:N.icon,status:N.status},fallbackIcon:s.jsx(se,{}),onClick:()=>ne(N.id),className:X(c&&d.has(N.id)&&"ring-2 ring-primary"),body:s.jsx(qe,{status:N.status}),footer:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(we,{id:N.updated_by??N.created_by,size:"3xs"})}),s.jsx("span",{className:"shrink-0 ml-2",children:N.updated_at?Se(new Date(N.updated_at)):"—"})]}),headerActions:c?void 0:s.jsxs(et,{children:[s.jsx(tt,{asChild:!0,children:s.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:fs,children:s.jsx(nt,{size:20})})}),s.jsxs(st,{align:"end",onClick:ms,children:[s.jsxs(je,{onClick:Ne=>{Ne.stopPropagation(),ne(N.id)},children:[s.jsx(it,{size:16}),"Open"]}),!ye(N.id)&&s.jsxs(je,{variant:"destructive",onClick:Ne=>{Ne.stopPropagation(),D({type:"delete",virtualMcp:N})},children:[s.jsx(He,{size:16}),"Delete"]})]})]})})]},N.id)})})}):s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:G.length===0?s.jsx("div",{className:"flex items-center h-full",children:s.jsx(lt,{image:s.jsx(se,{size:48,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections.",actions:!i.search&&s.jsxs(U,{size:"sm",onClick:f,disabled:j,children:[s.jsx(ht,{size:14}),j?"Creating...":"Create Agent"]})})}):s.jsx("div",{className:"min-w-[1000px]",children:s.jsx(as,{columns:vt,grouped:G,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,onRowClick:x=>ne(x.id),selectionMode:c,selectedIds:d,onToggleSelect:u})})})}),t[7]=g,t[8]=z,t[9]=f,t[10]=m.mode,t[11]=m.virtualMcp,t[12]=j,t[13]=i,t[14]=n,t[15]=e.slug,t[16]=d,t[17]=c,t[18]=k,t[19]=a,t[20]=M,t[21]=$,t[22]=B,t[23]=T,t[24]=L,t[25]=r,t[26]=h,t[27]=v}else M=t[20],$=t[21],B=t[22],T=t[23],L=t[24],r=t[25],h=t[26],v=t[27];let K;t[123]!==M||t[124]!==L?(K=s.jsx(M,{children:L}),t[123]=M,t[124]=L,t[125]=K):K=t[125];let V;t[126]!==B||t[127]!==d.size||t[128]!==c?(V=c&&s.jsx(ls,{count:d.size,total:B.length,onSelectAll:()=>C(new Set(B.map(ds))),onDeselectAll:()=>C(new Set),onDelete:()=>P(!0),onCancel:p}),t[126]=B,t[127]=d.size,t[128]=c,t[129]=V):V=t[129];let F;return t[130]!==$||t[131]!==T||t[132]!==K||t[133]!==V||t[134]!==r||t[135]!==h||t[136]!==v?(F=s.jsxs($,{children:[r,h,v,T,K,V]}),t[130]=$,t[131]=T,t[132]=K,t[133]=V,t[134]=r,t[135]=h,t[136]=v,t[137]=F):F=t[137],F}function ds(t){return t.id}function ms(t){return t.stopPropagation()}function fs(t){return t.stopPropagation()}function us(t){return t.stopPropagation()}function hs(t){return t.stopPropagation()}function xs(t){return s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?Se(new Date(t.updated_at)):"—"})}function ps(t){return s.jsx(we,{id:t.updated_by??t.created_by,size:"3xs"})}function gs(t){return s.jsx(qe,{status:t.status})}function js(t){return s.jsx(Q.Suspense,{fallback:s.jsx(xt.Fallback,{}),children:s.jsx(xt,{connectionIds:t.connections.map(bs),maxVisibleIcons:2})})}function bs(t){return t.connection_id}function vs(t){return s.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"})}function Ns(t){return s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ue,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(se,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title})]})}function Cs(t){return t.stopPropagation()}function ys(t){return t.status==="inactive"}function ws(t){return t.status==="active"}function Sn(){const t=ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Nt,{children:s.jsx(Q.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Xt,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(cs,{})})}),t[0]=e):e=t[0],e}export{Sn as default};
|
package/dist/client/assets/{ai-providers-logos-B2-g7lTr.js → ai-providers-logos-DGTpC_MW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,u as h,x as P,K as g}from"./index-
|
|
1
|
+
import{c as b,u as h,x as P,K as g}from"./index-DnJ6a24w.js";import{u as w}from"./useQuery-mzOsnjYJ.js";import{a as u,u as _}from"./constants-D5QZg84_.js";function A(){const c=b.c(9),{locator:e,org:i}=h();let o;c[0]!==i.id?(o={connectionId:u,orgId:i.id},c[0]=i.id,c[1]=o):o=c[1];const d=_(o);let a;c[2]!==e?(a=g.aiProviders(e),c[2]=e,c[3]=a):a=c[3];let s;c[4]!==d?(s=async()=>(await d.callTool({name:"AI_PROVIDERS_LIST",arguments:{}})).structuredContent,c[4]=d,c[5]=s):s=c[5];let t;c[6]!==a||c[7]!==s?(t={queryKey:a,staleTime:1/0,queryFn:s},c[6]=a,c[7]=s,c[8]=t):t=c[8];const{data:n}=P(t);return n}function q(){const c=b.c(11),{locator:e,org:i}=h();let o;c[0]!==i.id?(o={connectionId:u,orgId:i.id},c[0]=i.id,c[1]=o):o=c[1];const d=_(o);let a;c[2]!==e?(a=g.aiProviderKeys(e),c[2]=e,c[3]=a):a=c[3];let s;c[4]!==d?(s=async()=>(await d.callTool({name:"AI_PROVIDER_KEY_LIST",arguments:{}})).structuredContent??null,c[4]=d,c[5]=s):s=c[5];let t;c[6]!==a||c[7]!==s?(t={queryKey:a,staleTime:6e4,queryFn:s},c[6]=a,c[7]=s,c[8]=t):t=c[8];const{data:n}=P(t);let m;return c[9]!==n?.keys?(m=n?.keys??[],c[9]=n?.keys,c[10]=m):m=c[10],m}function C(c){const e=b.c(17),{locator:i,org:o}=h();let d;e[0]!==o.id?(d={connectionId:u,orgId:o.id},e[0]=o.id,e[1]=d):d=e[1];const a=_(d);let s;e[2]!==c||e[3]!==i?(s=g.aiProviderModels(i,c??""),e[2]=c,e[3]=i,e[4]=s):s=e[4];const t=!!c;let n;e[5]!==a||e[6]!==c?(n=async()=>(await a.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:c}})).structuredContent??null,e[5]=a,e[6]=c,e[7]=n):n=e[7];let m;e[8]!==s||e[9]!==t||e[10]!==n?(m={queryKey:s,enabled:t,staleTime:6e4,queryFn:n},e[8]=s,e[9]=t,e[10]=n,e[11]=m):m=e[11];const{data:f,isLoading:y}=w(m);let l;e[12]!==f?.models?(l=f?.models??[],e[12]=f?.models,e[13]=l):l=e[13];const v=!!c&&y;let p;return e[14]!==l||e[15]!==v?(p={models:l,isLoading:v},e[14]=l,e[15]=v,e[16]=p):p=e[16],p}function x(c){const e=b.c(13),{locator:i,org:o}=h();let d;e[0]!==o.id?(d={connectionId:u,orgId:o.id},e[0]=o.id,e[1]=d):d=e[1];const a=_(d);let s;e[2]!==c||e[3]!==i?(s=g.aiProviderModels(i,c),e[2]=c,e[3]=i,e[4]=s):s=e[4];let t;e[5]!==a||e[6]!==c?(t=async()=>(await a.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:c}})).structuredContent??null,e[5]=a,e[6]=c,e[7]=t):t=e[7];let n;e[8]!==s||e[9]!==t?(n={queryKey:s,staleTime:6e4,queryFn:t},e[8]=s,e[9]=t,e[10]=n):n=e[10];const{data:m}=P(n);let f;return e[11]!==m?.models?(f=m?.models??[],e[11]=m?.models,e[12]=f):f=e[12],f}const r="https://assets.decocache.com/decocms/bc2ca488-2bae-4aac-8d3e-ead262dad764/agent.png",L="https://assets.decocache.com/decocms/b2e2f64f-6025-45f7-9e8c-3b3ebdd073d8/openrouter_logojpg.jpg",S="https://assets.decocache.com/decocms/4fa4f3ed-1bf3-4e5a-8d05-4f3787df5966/anthropic-icon-tdvkiqisswbrmtkiygb0ia.webp";function D(c){const e=c.modelId.includes("/")?c.modelId.split("/")[0]:null;return e&&I[e]||I[c.providerId]||r}const I={"aion-labs":"https://assets.decocache.com/decocms/6da18da8-0160-4b85-8bca-84eefffebe12/images-(6).png",ai21:"https://assets.decocache.com/decocms/5d8388e9-027b-4b23-b816-90cee1cd28ad/images-(5).png",alfredpros:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",alibaba:"https://assets.decocache.com/decocms/4d113b13-5412-4d3b-96ec-3c2e7c1f7a5f/images-(8).png",allenai:"https://assets.decocache.com/decocms/21d6071a-e0da-4919-9f35-902b1d0b85b8/allen.png",alpindale:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",amazon:"https://assets.decocache.com/decocms/31e7b260-6cf0-4753-bb32-bd062b15c5f1/Amazon_icon.png",anthropic:S,"anthracite-org":r,"arcee-ai":"https://assets.decocache.com/decocms/ee325839-6acc-48dc-8cf7-8bab74698015/126496414.png",baidu:"https://assets.decocache.com/decocms/cf4c19f1-39b5-499e-87b7-e16dc5da2b50/images-(9).png",bytedance:"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png","bytedance-seed":"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png",cognitivecomputations:r,cohere:"https://assets.decocache.com/decocms/c942091b-b3bf-4c46-af37-fc2c1086d9f7/cohere-color.png",deepcogito:"https://assets.decocache.com/decocms/4ee77a8f-a36a-4933-8cdf-d2e8676b88d8/images-(13).png",deepseek:"https://assets.decocache.com/decocms/3611e8ac-4cad-4b0e-a1f8-8f791288ce03/images-(1).png",eleutherai:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",essentialai:"https://assets.decocache.com/decocms/c5afc6de-1e41-457e-a6dd-91810d92541e/images-(1).jpeg",google:"https://assets.decocache.com/webdraw/17df85af-1578-42ef-ae07-4300de0d1723/gemini.svg",gryphe:"https://assets.decocache.com/decocms/a5503d3b-2056-47f2-a76c-611b7416bdc8/6798c7dccaaadd0a1318d66a_66f41d1fd146c3b0b9c76453_gryphe-logo.webp","ibm-granite":"https://assets.decocache.com/decocms/2c50018d-6f70-472d-be30-65a5e8e249f0/images-(10).png",inflection:r,inception:"https://assets.decocache.com/decocms/ff9822b8-a914-482b-bd7d-b0e46b9d5a56/images-(6).jpeg",kwaipilot:"https://assets.decocache.com/decocms/cd576e1d-1184-45ba-8162-cf2bd06d684f/images-(14).png",liquid:r,mancer:"https://assets.decocache.com/decocms/79762356-a0c5-4546-b268-ad4a0b51db51/Screenshot-2026-01-08-at-18.49.42.png",meituan:r,"meta-llama":"https://assets.decocache.com/decocms/56421cb3-488c-4cc3-83a5-16d9a303850e/images-(11).png",microsoft:"https://assets.decocache.com/decocms/0e352a51-4ea5-4f35-802e-fd82bf266683/images-(12).png",minimax:"https://assets.decocache.com/decocms/f362cc4f-7ccc-4317-afda-92e6f348fdfd/images-(2).png",mistralai:"https://assets.decocache.com/decocms/73ab9971-bbbc-40dc-99a3-5fddd9a0f340/images-(3).png",morph:r,moonshotai:"https://assets.decocache.com/decocms/b8abfea7-e8b4-4b72-b653-fdf11c9e3b66/moonshot.png",neversleep:r,"nex-agi":"https://assets.decocache.com/decocms/d2ada265-160d-4959-981d-e90210d71713/241570229.jpeg",nousresearch:"https://assets.decocache.com/decocms/496acb3d-9b5d-4759-b764-16c9ca7eb6b2/nousresearch.png",nvidia:"https://assets.decocache.com/decocms/ecca3238-fa79-4648-bb55-738f13a4293f/nvidia-7.svg",opengvlab:"https://assets.decocache.com/decocms/fb2d0c32-85f1-410a-87f4-9731dfafd248/images-(2).jpeg",openai:"https://assets.decocache.com/webdraw/15dc381c-23b4-4f6b-9ceb-9690f77a7cf5/openai.svg",openrouter:L,perplexity:"https://assets.decocache.com/decocms/3a134746-f370-4089-a3c9-fe545be0441c/images-(15).png","prime-intellect":r,qwen:"https://assets.decocache.com/decocms/ab94208c-4439-4aec-a06c-c51747120e43/Qwen_logo.svg.png",raifle:r,relace:"https://assets.decocache.com/decocms/c5dbae73-3ce0-40ca-8433-c38783fb13a9/Screenshot-2026-01-08-at-18.52.09.png",sao10k:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png","stepfun-ai":"https://assets.decocache.com/decocms/8892b883-4905-444e-b554-648565dc7fab/images-(16).png",switchpoint:"https://assets.decocache.com/decocms/0319d595-e0dd-4d8e-a0a3-b20ff4cbddcb/images-(4).jpeg",tencent:"https://assets.decocache.com/decocms/80f2f7bd-f9ea-4fcf-b89c-c58823a389ed/images-(3).jpeg",thedrummer:"https://assets.decocache.com/decocms/5c6c09fc-cf9d-43a1-a1c3-4a1ef367b824/images-(17).png",thudm:r,tngtech:"https://assets.decocache.com/decocms/5b5648ad-f858-4687-b67b-212cf186b62d/images-(7).png",undi95:r,xiaomi:"https://assets.decocache.com/decocms/2d7191b7-fc80-4867-a431-6d443d691cfc/images-(4).png","x-ai":"https://assets.decocache.com/webdraw/7a8003ff-8f2d-4988-8693-3feb20e87eca/xai.svg","z-ai":"https://assets.decocache.com/decocms/12a0877f-c978-4880-88d1-09097e606e2f/Z.ai_(company_logo).svg.png"};export{r as D,I as P,A as a,q as b,x as c,D as g,C as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,R as w,r as n,a5 as m,bc as O,F as M,a7 as I,T as F,G as z,I as A,bd as D,H as G,b4 as L,aa as H,ah as k,J as V,c as i,D as p,be as v}from"./index-
|
|
1
|
+
import{j as r,R as w,r as n,a5 as m,bc as O,F as M,a7 as I,T as F,G as z,I as A,bd as D,H as G,b4 as L,aa as H,ah as k,J as V,c as i,D as p,be as v}from"./index-DnJ6a24w.js";var x="AlertDialog",[W]=H(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var Y="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});y.displayName=Y;var q="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(G,{...a,...t})};j.displayName=q;var B="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(V,{...o,...a,ref:e})});_.displayName=B;var g="AlertDialogContent",[J,K]=W(g),Q=L("AlertDialogContent"),b=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return r.jsx(O,{contentName:g,titleName:h,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=g;var h="AlertDialogTitle",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(F,{...o,...a,ref:e})});R.displayName=h;var $="AlertDialogDescription",E=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});E.displayName=$;var U="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=U;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(S,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});T.displayName=S;var X=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${g}\` by passing a \`${$}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,g as m,j as t,A as f,S as h,k as x,l as r,m as p,N as u}from"./index-
|
|
1
|
+
import{c as l,g as m,j as t,A as f,S as h,k as x,l as r,m as p,N as u}from"./index-DnJ6a24w.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
|