decocms 4.92.1 → 4.92.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-Clv-C2np.js → AlertCircle-Cvc_10Uv.js} +1 -1
- package/dist/client/assets/{AreaChart-C4-p1gQK.js → AreaChart-D4PMIsMV.js} +1 -1
- package/dist/client/assets/{ArrowUp-DCJUk93H.js → ArrowUp-Dq6JgHsq.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DwUunkDC.js → ArrowUpRight-DgI9ki5h.js} +1 -1
- package/dist/client/assets/{CheckCircle-BHKn_v25.js → CheckCircle-B5oIKeSF.js} +1 -1
- package/dist/client/assets/{ChevronDown-DDT8b8rP.js → ChevronDown-D_W2bIqv.js} +1 -1
- package/dist/client/assets/{ChevronRight-HnufFvB9.js → ChevronRight-BnIvJcIZ.js} +1 -1
- package/dist/client/assets/{ChevronUp-D-P6SBrW.js → ChevronUp-Ci-XiWb6.js} +1 -1
- package/dist/client/assets/{Copy01-CyfFXTKR.js → Copy01-Q4xZmPKp.js} +1 -1
- package/dist/client/assets/{DotsVertical-4aFvnFGK.js → DotsVertical-Bcfqjiks.js} +1 -1
- package/dist/client/assets/{Eye-DTlsPxh1.js → Eye-BuukW7MV.js} +1 -1
- package/dist/client/assets/{FilterLines-CDNj37OS.js → FilterLines-Do4UgzmV.js} +1 -1
- package/dist/client/assets/{Globe01-7xljr_EC.js → Globe01-qjaQZUfN.js} +1 -1
- package/dist/client/assets/{Globe04-ljGt4Lg6.js → Globe04-CqIGMVDi.js} +1 -1
- package/dist/client/assets/{HardDrive-BroB03OF.js → HardDrive-DrLvUMYg.js} +1 -1
- package/dist/client/assets/{Image01-CPHpxpf1.js → Image01-BWotytID.js} +1 -1
- package/dist/client/assets/{Key01-BMPHkbEG.js → Key01-BPZUhUcV.js} +1 -1
- package/dist/client/assets/{LayoutLeft-1eHZDH0T.js → LayoutLeft-COV7zlIC.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CNmFDmgO.js → LinkExternal01-CyMOdGfe.js} +1 -1
- package/dist/client/assets/{Monitor01-6Irz93Em.js → Monitor01-dLHbd0CB.js} +1 -1
- package/dist/client/assets/{Package-Cy8-91a-.js → Package-B7Qii2Tl.js} +1 -1
- package/dist/client/assets/{Palette-C1a_XOsl.js → Palette-tVNOj7Ym.js} +1 -1
- package/dist/client/assets/{Play-CwA4-KOo.js → Play-BE8nTtBp.js} +1 -1
- package/dist/client/assets/{Plus-us-N9JUq.js → Plus-5VWQJEkS.js} +1 -1
- package/dist/client/assets/{SearchLg-BUP3ozF2.js → SearchLg-BiyFAMx0.js} +1 -1
- package/dist/client/assets/{SearchMd-Dd7ZGI56.js → SearchMd-LbMkvaPD.js} +1 -1
- package/dist/client/assets/{Settings02-DrOPo3mj.js → Settings02-CU2rilKq.js} +1 -1
- package/dist/client/assets/{Shield01-BI58H8tV.js → Shield01-7KT2UKvg.js} +1 -1
- package/dist/client/assets/{Star01-BTYXST43.js → Star01-D4LxiizA.js} +1 -1
- package/dist/client/assets/{Stars01-B6N3EY9X.js → Stars01-HAbkffzq.js} +1 -1
- package/dist/client/assets/{Stars02-BY1cpg45.js → Stars02-CdgckoDr.js} +1 -1
- package/dist/client/assets/{Sun-CeoIcGEC.js → Sun-Ca3eslhz.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DSaA1AAh.js → SwitchHorizontal01-DNcPUv7P.js} +1 -1
- package/dist/client/assets/{Tool01-Cg68N3nA.js → Tool01-DBXzU6aR.js} +1 -1
- package/dist/client/assets/{Tool02-DED34rla.js → Tool02-rl8XhSPG.js} +1 -1
- package/dist/client/assets/{Trash01-CKx7yRIc.js → Trash01-DxXosbkh.js} +1 -1
- package/dist/client/assets/{TrendUp01-CW6Njakg.js → TrendUp01-BmzCTIbp.js} +1 -1
- package/dist/client/assets/{Upload01-BEXZOkzx.js → Upload01-CXsTipbe.js} +1 -1
- package/dist/client/assets/{User01-WL7UxAwC.js → User01-CZgThaZQ.js} +1 -1
- package/dist/client/assets/{Users01-BVVqJkbL.js → Users01-IdyAszrF.js} +1 -1
- package/dist/client/assets/{Users03-kQPt9_XZ.js → Users03-3HXi1aia.js} +1 -1
- package/dist/client/assets/{X-B4leRLqf.js → X-CLG08ht8.js} +1 -1
- package/dist/client/assets/{XCircle-Di8Uo4pL.js → XCircle-pZ6nD22L.js} +1 -1
- package/dist/client/assets/{XClose-DMc7p4CW.js → XClose-BYq2BBpT.js} +1 -1
- package/dist/client/assets/{Zap-Zy5e7I3t.js → Zap-C6tkfs5m.js} +1 -1
- package/dist/client/assets/{ZapSquare-DiRNwHBE.js → ZapSquare-DdKvM81Z.js} +1 -1
- package/dist/client/assets/{ZoomOut-tXRohD9g.js → ZoomOut-DAAhtu2Z.js} +1 -1
- package/dist/client/assets/{access-gate-AwksVSKW.js → access-gate-B8spscer.js} +1 -1
- package/dist/client/assets/add-section-modal-De0GxBTc.js +1 -0
- package/dist/client/assets/agent-icon-BIj6WxKp.js +1 -0
- package/dist/client/assets/{agents-list-C5V-ldBY.js → agents-list-Cc-986WT.js} +1 -1
- package/dist/client/assets/{ai-providers-D_fbUUoy.js → ai-providers-Ck_-NP1I.js} +1 -1
- package/dist/client/assets/{alert-fgtNa48Y.js → alert-CI7flGPF.js} +1 -1
- package/dist/client/assets/{alert-dialog-De7Jj0Gd.js → alert-dialog-D2oa47X8.js} +1 -1
- package/dist/client/assets/{app-editor-C5o42oU3.js → app-editor-Cn-tT-ug.js} +1 -1
- package/dist/client/assets/{auth-Ta6fwTa4.js → auth-Kymy4xkz.js} +1 -1
- package/dist/client/assets/{auth-catchall-BINtcQPS.js → auth-catchall-B0gQyYvu.js} +1 -1
- package/dist/client/assets/{auth-entry-CMZVqZD1.js → auth-entry-Crrd0hkP.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BE16rQGL.js → auth-split-layout-BO4l9cCp.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BWqn4KLF.js → authenticate-and-persist-oauth-DAAmwSgR.js} +1 -1
- package/dist/client/assets/{automation-list-row-BcxbDbRm.js → automation-list-row-D-cT9rxb.js} +1 -1
- package/dist/client/assets/{automation-runs-eB3UxPqQ.js → automation-runs-_XAGR1m2.js} +1 -1
- package/dist/client/assets/{automations-BfGGsIrT.js → automations-Bh1OF4xf.js} +1 -1
- package/dist/client/assets/{autosend-BhmTfxCS.js → autosend-D-JHJKNK.js} +1 -1
- package/dist/client/assets/{avatar-B8_a8C3S.js → avatar-1o2VQKTj.js} +1 -1
- package/dist/client/assets/{badge-BZilNB5D.js → badge-dHBIjKyY.js} +1 -1
- package/dist/client/assets/{block-document-CU_R1go5.js → block-document-nemKITlN.js} +1 -1
- package/dist/client/assets/{brand-context-nl5okTqp.js → brand-context-DSZ7O9_c.js} +1 -1
- package/dist/client/assets/{buckets-CWGAX4Op.js → buckets-BDkQllTH.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CgSvwA00.js → bulk-category-panel-Cn58Io0u.js} +1 -1
- package/dist/client/assets/{calendar-CM0d8cf3.js → calendar-C9b1I5Xh.js} +1 -1
- package/dist/client/assets/{capability-load-error-DyXw79vO.js → capability-load-error-DI4Ww9LY.js} +1 -1
- package/dist/client/assets/{card-DNiOb8C_.js → card-CoG27DVs.js} +1 -1
- package/dist/client/assets/{category-editor-omUhw8hw.js → category-editor-BmpcIx1s.js} +1 -1
- package/dist/client/assets/{chat-context-CaE1IrMD.js → chat-context-glCfFIWX.js} +1 -1
- package/dist/client/assets/{checkbox-BiboLXsd.js → checkbox-BOAToSlJ.js} +1 -1
- package/dist/client/assets/{cli-auth-success-hGSoasXF.js → cli-auth-success-CqzQrYb8.js} +1 -1
- package/dist/client/assets/collection-detail-I0O1ME9a.js +1 -0
- package/dist/client/assets/{collection-display-button-CINCvS0U.js → collection-display-button-Bw2bFMNm.js} +1 -1
- package/dist/client/assets/{collection-search-DkaBDE88.js → collection-search-DuPY-s4R.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B31K-mZy.js → collection-table-wrapper-BOKHq7cp.js} +1 -1
- package/dist/client/assets/{collection-tabs-CjttU7gV.js → collection-tabs-CcN3J070.js} +1 -1
- package/dist/client/assets/{command-DtXbWX2t.js → command-BB6Oir8o.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DSEpOAMV.js → commerce-onboarding-DejhsIyX.js} +1 -1
- package/dist/client/assets/{companions-core-DU4JOcgk.js → companions-core-C-kZqiTC.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-rRtqIhuV.js → connect-desktop-dialog-CUGIAU17.js} +1 -1
- package/dist/client/assets/{connection-card-DH9eHpgr.js → connection-card-7gBTmFox.js} +1 -1
- package/dist/client/assets/{connection-detail-BPx_l57r.js → connection-detail-BB0rtYjx.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-9cIttTn5.js → connection-form-helpers-CJKig9hy.js} +1 -1
- package/dist/client/assets/{connections-AVIhTzcp.js → connections-E7mextbc.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BD-E8GML.js → decopilot-sse-pool-DEJZ4gJu.js} +1 -1
- package/dist/client/assets/{dialog-CEJEmlAZ.js → dialog-ChJw5xnr.js} +1 -1
- package/dist/client/assets/{domain-settings-BkzI_Z14.js → domain-settings-B6Co6UtW.js} +1 -1
- package/dist/client/assets/{drawer-B16UsJ9z.js → drawer-_WfOhyRU.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Bohi0euR.js → dropdown-menu-B7HOgSu8.js} +1 -1
- package/dist/client/assets/{empty-state-DAC9lF38.js → empty-state-kSEyPCAz.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BOVpLxWL.js → extract-connection-data-oUFnwuwD.js} +1 -1
- package/dist/client/assets/{file-explorer-C83rSApL.js → file-explorer-CnTvRnvj.js} +1 -1
- package/dist/client/assets/{file-type-icon-CA2uuZ7F.js → file-type-icon-CeQVzqDu.js} +1 -1
- package/dist/client/assets/{files-Cgp73tmq.js → files-CCxNqj9u.js} +1 -1
- package/dist/client/assets/{form-xwt17q8h.js → form-BUM27CLj.js} +1 -1
- package/dist/client/assets/{general-CWptcVqJ.js → general-BjF2DfAd.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Ce0749m3.js → github-repo-picker-4TIPzYjR.js} +1 -1
- package/dist/client/assets/{hooks-9fTm-ZdN.js → hooks-CJqrF4BQ.js} +1 -1
- package/dist/client/assets/{index-CXnbxDhA.js → index-BHqz24vm.js} +1 -1
- package/dist/client/assets/{index-BIBRA2uz.js → index-B_qFi_-_.js} +28 -28
- package/dist/client/assets/{index-DsTc8yYr.js → index-BderZvBT.js} +1 -1
- package/dist/client/assets/{index--Rru8MRb.js → index-Bj_MaVUP.js} +1 -1
- package/dist/client/assets/{index-BE6hzuPl.js → index-C8rlFaFO.js} +3 -3
- package/dist/client/assets/{index-CdhReIUf.js → index-CHWLrEqX.js} +1 -1
- package/dist/client/assets/{index-BqyYrFv3.js → index-CQwS9Ezr.js} +1 -1
- package/dist/client/assets/{index-Jz0CuEFl.js → index-CR0rMz7E.js} +1 -1
- package/dist/client/assets/{index-CCMPN7OD.js → index-CWGwstEz.js} +1 -1
- package/dist/client/assets/{index-DEAM6UpC.js → index-CWlzI7M3.js} +2 -2
- package/dist/client/assets/{index-BaUSa1j3.js → index-D6ixbRYa.js} +1 -1
- package/dist/client/assets/{index-BQh3gSSP.js → index-DVotD2Sm.js} +1 -1
- package/dist/client/assets/{index-C6Xwww_u.js → index-DyXd0E61.js} +1 -1
- package/dist/client/assets/{index-DLt5Gc69.js → index-WDnleR3r.js} +1 -1
- package/dist/client/assets/{index-redirect-DAbgHTCC.js → index-redirect-CZuVtK8Y.js} +1 -1
- package/dist/client/assets/{input-BgHT8C_Y.js → input-CWExGH7j.js} +1 -1
- package/dist/client/assets/{integration-icon-GEOjw9nA.js → integration-icon-BXEpLE2r.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Bn-S9yCN.js → invite-member-dialog-Cj35CA_W.js} +1 -1
- package/dist/client/assets/{label-BUEwzrLz.js → label-BbLr7wPS.js} +1 -1
- package/dist/client/assets/{layout-C6WVIkZ1.js → layout-yKsHfaYu.js} +1 -1
- package/dist/client/assets/{login-DxawahhV.js → login-g6Yf2A86.js} +1 -1
- package/dist/client/assets/{mcp-oauth-y10dB3OG.js → mcp-oauth-B2KaqQoI.js} +1 -1
- package/dist/client/assets/{members-BekqX_Ri.js → members-yX31omZQ.js} +1 -1
- package/dist/client/assets/{monaco-editor-Bh8y4XGF.js → monaco-editor-CJKnQM68.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CmNpuSe3.js → monitoring-stats-row-DTqvYy56.js} +1 -1
- package/dist/client/assets/{multi-select-AV0FE5T3.js → multi-select-C9lH7lr4.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dsy_qURW.js → oauth-callback-DPu8Jv31.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DxmqFpZS.js → oauth-callback-ai-provider-DXhgROtl.js} +1 -1
- package/dist/client/assets/{onboarding-DZ--Mi0J.js → onboarding-b8UESLyK.js} +1 -1
- package/dist/client/assets/{org-install-CLR3-44w.js → org-install-DFTAzRMO.js} +1 -1
- package/dist/client/assets/{org-layout-kthKrGx0.js → org-layout-BbjFIQ-M.js} +1 -1
- package/dist/client/assets/{organization-choice-BRPibyv7.js → organization-choice-DjVV9MCZ.js} +1 -1
- package/dist/client/assets/{orgs-DBHsCjWx.js → orgs-B1jGApXW.js} +1 -1
- package/dist/client/assets/{page-seo-form-BytIEBTv.js → page-seo-form-DeD_2a8R.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BWnl0tVz.js +1 -0
- package/dist/client/assets/{popover-BEGdNmUQ.js → popover-kOy_asOa.js} +1 -1
- package/dist/client/assets/{post-editor-CEMsCtDO.js → post-editor-BZQdhdwo.js} +1 -1
- package/dist/client/assets/{primitives-DrykBhU_.js → primitives-Cyz_TV23.js} +1 -1
- package/dist/client/assets/{profile-DnMb85h-.js → profile-D5HUGTyF.js} +1 -1
- package/dist/client/assets/project-app-view-Bsaa-6LK.js +1 -0
- package/dist/client/assets/record-editor-Bjgurgfp.js +1 -0
- package/dist/client/assets/redirect-editor-DnT7ef0C.js +1 -0
- package/dist/client/assets/registry-DHjmo34d.js +2 -0
- package/dist/client/assets/{registry-layout-DZNagoau.js → registry-layout-JPmaR-tb.js} +1 -1
- package/dist/client/assets/{reports-GLGMCsVS.js → reports-Btc-1oN-.js} +1 -1
- package/dist/client/assets/{require-capability-BvIdOAAp.js → require-capability-BBszzyH9.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DN9CNJ17.js → required-auth-layout-CR5_YK6W.js} +1 -1
- package/dist/client/assets/{reset-password-C1pIm0Iv.js → reset-password-u9Nbv0bS.js} +1 -1
- package/dist/client/assets/{roles-DokzsAwQ.js → roles-B7bUsR2h.js} +1 -1
- package/dist/client/assets/{search-input-B-DY-xf1.js → search-input-B6akQV4Y.js} +1 -1
- package/dist/client/assets/{secrets-BXnB__ih.js → secrets-Dsj3iy5H.js} +1 -1
- package/dist/client/assets/{sections-editor-Dpco23Fg.js → sections-editor-CvIj0bPs.js} +2 -2
- package/dist/client/assets/{select-_BdZTxPS.js → select-4-vdHbLT.js} +1 -1
- package/dist/client/assets/{select-model-CdCA5sAQ.js → select-model-CVcEVUsi.js} +1 -1
- package/dist/client/assets/{self-tool-result-DxwgmlEg.js → self-tool-result-Cwdk21K_.js} +1 -1
- package/dist/client/assets/{seo-editor-pHkOR1VP.js → seo-editor-B0_qMHl0.js} +1 -1
- package/dist/client/assets/{settings-layout-Bay6czqP.js → settings-layout-BURikhtl.js} +1 -1
- package/dist/client/assets/{settings-section-WJlRZThP.js → settings-section-DxqR9iml.js} +1 -1
- package/dist/client/assets/{shell-controls-BVv8dxtB.js → shell-controls-DYq3DSuV.js} +1 -1
- package/dist/client/assets/{shell-layout-BzSeIhlb.js → shell-layout-DvMdeukx.js} +1 -1
- package/dist/client/assets/{sidebar-D06GkkF0.js → sidebar-AfeWMY1r.js} +1 -1
- package/dist/client/assets/{skeleton-peXMJuH3.js → skeleton-DraYvTQP.js} +1 -1
- package/dist/client/assets/{sso-CX3xGBAk.js → sso-DWBNvY6X.js} +1 -1
- package/dist/client/assets/{store-Dk-YRB6l.js → store-BFhYLhoT.js} +1 -1
- package/dist/client/assets/store-registry-C50_5LUp.js +2 -0
- package/dist/client/assets/{studio-tools-BccAxrVu.js → studio-tools-B3FHZXsQ.js} +1 -1
- package/dist/client/assets/{switch-DYnCFD5-.js → switch-CyZjNvfZ.js} +1 -1
- package/dist/client/assets/{table-BjiI-gaG.js → table-iG6kCmeS.js} +1 -1
- package/dist/client/assets/{tabs-Dwdnv16R.js → tabs-C1LpzuaJ.js} +1 -1
- package/dist/client/assets/{textarea-BE7D_QqU.js → textarea-B8dhUfp9.js} +1 -1
- package/dist/client/assets/{toggle-group-CmVcJdNh.js → toggle-group-c5TjS6xS.js} +1 -1
- package/dist/client/assets/{toolbar-kZcoGdr4.js → toolbar-Daz4jqLs.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CSOZwc8p.js → toolbar-icon-button-Bbbo7hyv.js} +1 -1
- package/dist/client/assets/{tooltip-XFj2xRwa.js → tooltip-DE_gqCm3.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bc2W8TAS.js → use-ai-providers-CGzSWtp7.js} +1 -1
- package/dist/client/assets/{use-automations-5XmapDED.js → use-automations-Btiu7Z09.js} +1 -1
- package/dist/client/assets/{use-autosave-iqnZwi6W.js → use-autosave-DphOvxb9.js} +1 -1
- package/dist/client/assets/{use-capability-BMD-Q3c_.js → use-capability-BNcFOggs.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Bs8YFyZt.js → use-clock-tick-Dw7sAB29.js} +1 -1
- package/dist/client/assets/{use-collections-D0Q6wvcH.js → use-collections-u5tkBX1a.js} +1 -1
- package/dist/client/assets/{use-connection-1A7IHNnw.js → use-connection-CcmTBTY-.js} +1 -1
- package/dist/client/assets/{use-copy-Ddqaz7gu.js → use-copy-CveeH2p4.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DT1cqpNs.js → use-create-virtual-mcp-jvSmQNTU.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DA0Wn7VJ.js → use-debounced-autosave-DFle-8Sb.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DBDdUa8t.js → use-debounced-value-D1xFGN32.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Mofa-D5b.js → use-deco-credits-CV7sw9Em.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-XyNhQjC6.js → use-decopilot-events-VInARyiN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CihVR_F9.js → use-delete-connection-DDV7XY4a.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CyJ5Uxw6.js → use-deployment-admin-h9tth1Ey.js} +1 -1
- package/dist/client/assets/{use-file-configs-BtA47JHd.js → use-file-configs-BEHJ-b8Q.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-ZPVDShE1.js → use-infinite-scroll-BI8YTyTt.js} +1 -1
- package/dist/client/assets/{use-join-requests-CULFkSOG.js → use-join-requests-V5rMqfIc.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-C9suHuMS.js → use-mcp-auth-status-DINFEYgi.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DS0Emn8e.js → use-mcp-client-PcphUWIj.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BAfp0q-e.js → use-mcp-tools-CakNulXp.js} +1 -1
- package/dist/client/assets/{use-members-NR_NeOoj.js → use-members-JooO5O_z.js} +1 -1
- package/dist/client/assets/{use-mobile-DSBAMYJF.js → use-mobile-C57pT7o9.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DvIjbi8Z.js → use-navigate-to-agent-DVHUkqpb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Brlf7KHt.js → use-org-auth-client-C0qPMRhc.js} +1 -1
- package/dist/client/assets/{use-org-sso-D_69Sai0.js → use-org-sso-BaYh30WC.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D5oSFijj.js → use-organization-roles-BG6jMK7e.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B09wmnaH.js → use-organization-settings-DBhnNnJm.js} +1 -1
- package/dist/client/assets/{use-registry-app-lYXnJYv0.js → use-registry-app-Dyfesgrg.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CK8Y9s5Q.js → use-registry-connections-CTtHQqlB.js} +1 -1
- package/dist/client/assets/{use-secrets-CrZ0-Hfb.js → use-secrets-BYzFSfMf.js} +1 -1
- package/dist/client/assets/{use-status-sounds-xXWp62ox.js → use-status-sounds-DJxvpKl9.js} +1 -1
- package/dist/client/assets/{use-t-CzC_cXLB.js → use-t-BeHordU2.js} +1 -1
- package/dist/client/assets/{use-view-mode-CyGc5cDF.js → use-view-mode-C0yNdLzJ.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CSfbKXoe.js → use-virtual-mcp-BtFe5DoR.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-mNPfD3Pk.js +1 -0
- package/dist/client/assets/{useRouterState-Cz3yhvXr.js → useRouterState-C6jzqArr.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DIVSilzv.js +1 -0
- package/dist/client/assets/{users-VpBU_WzK.js → users-C0dY9LVq.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bhk3fwgs.js → variant-calendar-FpbApEV2.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DVDSH_UO.js → view-mode-toggle-DwdmtuKb.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/add-section-modal-IG-4jW3o.js +0 -1
- package/dist/client/assets/agent-icon-n_DJILEj.js +0 -1
- package/dist/client/assets/collection-detail-_5X_l9MF.js +0 -1
- package/dist/client/assets/page-seo-sheet-mJW0tAP8.js +0 -1
- package/dist/client/assets/project-app-view-Cag9gDj3.js +0 -1
- package/dist/client/assets/record-editor-BEQrV1d8.js +0 -1
- package/dist/client/assets/redirect-editor-Bh-8Ulfx.js +0 -1
- package/dist/client/assets/registry-CvS_UwLO.js +0 -2
- package/dist/client/assets/store-registry-D31ldEYe.js +0 -2
- package/dist/client/assets/useInfiniteQuery-MB3W9wV7.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D5GJvpsH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J,j as i,r as V,E as pe,C as ue,n as Se,B as X,b as xe,e as he,p as ae,K as ye,d as je,t as ge}from"./index-BE6hzuPl.js";import{i as ve}from"./AlertCircle-Clv-C2np.js";import{i as Ce}from"./ChevronRight-HnufFvB9.js";import{s as be}from"./Plus-us-N9JUq.js";import{s as _e}from"./Trash01-CKx7yRIc.js";import{I as re}from"./input-BgHT8C_Y.js";import{S as de}from"./switch-DYnCFD5-.js";import{S as Re}from"./skeleton-peXMJuH3.js";import{A as me}from"./avatar-B8_a8C3S.js";import{b as ke,P as Ne,a as Pe}from"./popover-BEGdNmUQ.js";import{b as fe}from"./use-connection-1A7IHNnw.js";import{W as ne}from"./use-mcp-client-DS0Emn8e.js";import{P as te}from"./index--Rru8MRb.js";import{u as Te}from"./use-registry-connections-CK8Y9s5Q.js";import{g as we,h as Ae}from"./use-organization-settings-B09wmnaH.js";import{u as Z}from"./use-t-CzC_cXLB.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-WJlRZThP.js";import{R as Ee}from"./require-capability-BvIdOAAp.js";import"./User01-WL7UxAwC.js";import"./use-collections-D0Q6wvcH.js";import"./auth-Ta6fwTa4.js";import"./sidebar-D06GkkF0.js";import"./LayoutLeft-1eHZDH0T.js";import"./use-mobile-DSBAMYJF.js";import"./X-B4leRLqf.js";import"./tooltip-XFj2xRwa.js";import"./studio-tools-BccAxrVu.js";import"./card-DNiOb8C_.js";import"./ArrowUpRight-DwUunkDC.js";import"./use-capability-BMD-Q3c_.js";import"./access-gate-AwksVSKW.js";import"./capability-load-error-DyXw79vO.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(ve,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,u]=V.useState(""),[a,A]=V.useState(""),[S,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==S||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:S||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=S,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let x;e[9]!==s?(x=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=x):x=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==x?(m={mutationFn:j,onSuccess:d,onError:x},e[11]=j,e[12]=d,e[13]=x,e[14]=m):m=e[14];const{mutate:v,isPending:g}=je(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=y=>u(y.target.value),e[19]=p):p=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(re,{placeholder:f,value:r,onChange:p,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let q;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=y=>A(y.target.value),e[30]=q):q=e[30];let B;e[31]!==U||e[32]!==a?(B=i.jsx(re,{placeholder:U,value:a,onChange:q,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=B):B=e[33];let O;e[34]!==F||e[35]!==B?(O=i.jsx(H,{title:F,action:B}),e[34]=F,e[35]=B,e[36]=O):O=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let Y;e[43]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>_(y.target.value),e[43]=Y):Y=e[43];let M;e[44]!==E||e[45]!==S?(M=i.jsx(re,{type:"password",placeholder:E,value:S,onChange:Y,className:"w-[280px]"}),e[44]=E,e[45]=S,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==O||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,O,I,w]}),e[69]=O,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:u,href:a}=t,A=Z(),S=xe();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=he(_);let d;e[1]!==o||e[2]!==a||e[3]!==S||e[4]!==r||e[5]!==j?(d=()=>{a?S({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=S,e[4]=r,e[5]=j,e[6]=d):d=e[6];const x=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==A?(v=u&&i.jsxs(ke,{children:[i.jsx(Ne,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(_e,{size:14})})}),i.jsx(Pe,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),u()},children:A("settings.orgStore.remove")})]})})]}),e[10]=u,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(Ce,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let p;e[20]!==v||e[21]!==h||e[22]!==f?(p=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=p):p=e[23];let C;return e[24]!==c||e[25]!==x||e[26]!==l||e[27]!==m||e[28]!==p?(C=i.jsx(H,{title:l,description:c,onClick:x,icon:m,action:p}),e[24]=c,e[25]=x,e[26]=l,e[27]=m,e[28]=p,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=ue(),c=Te(),s=fe(),o=we(),{mutateAsync:r}=Ae(),u=Se(),[a,A]=V.useState(!1);let S,_,j,d,x,m;if(t[0]!==s||t[1]!==l.id||t[2]!==u||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=ne.REGISTRY(l.id),p=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=ne.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,q=ne.SELF(l.id),B=new Set([f,C,"community-registry",q]),O=c.filter(n=>!B.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==u?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),u.invalidateQueries({queryKey:ye.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=u,t[20]=E):E=t[20];const Y=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:p(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(x=i.jsx(le,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=x):x=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(be,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==p?(y=p("self"),t[43]=p,t[44]=y):y=t[44];let G;t[45]!==b?(G=n=>b("self",n),t[45]=b,t[46]=G):G=t[46];let Q;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(Q=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=Q):Q=t[51];let ee;t[52]!==Y||t[53]!==b||t[54]!==p||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:p(n.id),onToggle:K=>b(n.id,K),onDelete:()=>Y(n.id)},n.id),t[52]=Y,t[53]=b,t[54]=p,t[55]=e,t[56]=ee):ee=t[56];const oe=O.map(ee);let W;t[57]!==Q||t[58]!==oe?(W=i.jsxs(ie,{children:[Q,oe]}),t[57]=Q,t[58]=oe,t[59]=W):W=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==W?(m=i.jsxs(le,{title:L,actions:P,children:[T,W]}),t[60]=L,t[61]=P,t[62]=T,t[63]=W,t[64]=m):m=t[64],_=le,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],S=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:p(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=u,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=S,t[9]=_,t[10]=j,t[11]=d,t[12]=x,t[13]=m}else S=t[8],_=t[9],j=t[10],d=t[11],x=t[12],m=t[13];let v;t[67]!==S||t[68]!==j?(v=i.jsx(S,{children:j}),t[67]=S,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==x||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[x,m,g]}),t[74]=x,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:S}=A;return i.jsx(Me,{error:S??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Re,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let u;t[8]!==o?(u=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ze,{children:[o,r]})})})})}),t[8]=o,t[9]=u):u=t[9];let a;return t[10]!==l||t[11]!==u?(a=i.jsx(pe,{fallback:l,children:u}),t[10]=l,t[11]=u,t[12]=a):a=t[12],a}function yt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{yt as default};
|
|
1
|
+
import{c as J,j as i,r as V,E as pe,C as ue,n as Se,B as X,b as xe,e as he,p as ae,K as ye,d as je,t as ge}from"./index-C8rlFaFO.js";import{i as ve}from"./AlertCircle-Cvc_10Uv.js";import{i as Ce}from"./ChevronRight-BnIvJcIZ.js";import{s as be}from"./Plus-5VWQJEkS.js";import{s as _e}from"./Trash01-DxXosbkh.js";import{I as re}from"./input-CWExGH7j.js";import{S as de}from"./switch-CyZjNvfZ.js";import{S as Re}from"./skeleton-DraYvTQP.js";import{A as me}from"./avatar-1o2VQKTj.js";import{b as ke,P as Ne,a as Pe}from"./popover-kOy_asOa.js";import{b as fe}from"./use-connection-CcmTBTY-.js";import{W as ne}from"./use-mcp-client-PcphUWIj.js";import{P as te}from"./index-Bj_MaVUP.js";import{u as Te}from"./use-registry-connections-CTtHQqlB.js";import{g as we,h as Ae}from"./use-organization-settings-DBhnNnJm.js";import{u as Z}from"./use-t-BeHordU2.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-DxqR9iml.js";import{R as Ee}from"./require-capability-BBszzyH9.js";import"./User01-CZgThaZQ.js";import"./use-collections-u5tkBX1a.js";import"./auth-Kymy4xkz.js";import"./sidebar-AfeWMY1r.js";import"./LayoutLeft-COV7zlIC.js";import"./use-mobile-C57pT7o9.js";import"./X-CLG08ht8.js";import"./tooltip-DE_gqCm3.js";import"./studio-tools-B3FHZXsQ.js";import"./card-CoG27DVs.js";import"./ArrowUpRight-DgI9ki5h.js";import"./use-capability-BNcFOggs.js";import"./access-gate-B8spscer.js";import"./capability-load-error-DI4Ww9LY.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(ve,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,u]=V.useState(""),[a,A]=V.useState(""),[S,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==S||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:S||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=S,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let x;e[9]!==s?(x=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=x):x=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==x?(m={mutationFn:j,onSuccess:d,onError:x},e[11]=j,e[12]=d,e[13]=x,e[14]=m):m=e[14];const{mutate:v,isPending:g}=je(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=y=>u(y.target.value),e[19]=p):p=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(re,{placeholder:f,value:r,onChange:p,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let q;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=y=>A(y.target.value),e[30]=q):q=e[30];let B;e[31]!==U||e[32]!==a?(B=i.jsx(re,{placeholder:U,value:a,onChange:q,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=B):B=e[33];let O;e[34]!==F||e[35]!==B?(O=i.jsx(H,{title:F,action:B}),e[34]=F,e[35]=B,e[36]=O):O=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let Y;e[43]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>_(y.target.value),e[43]=Y):Y=e[43];let M;e[44]!==E||e[45]!==S?(M=i.jsx(re,{type:"password",placeholder:E,value:S,onChange:Y,className:"w-[280px]"}),e[44]=E,e[45]=S,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==O||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,O,I,w]}),e[69]=O,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:u,href:a}=t,A=Z(),S=xe();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=he(_);let d;e[1]!==o||e[2]!==a||e[3]!==S||e[4]!==r||e[5]!==j?(d=()=>{a?S({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=S,e[4]=r,e[5]=j,e[6]=d):d=e[6];const x=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==A?(v=u&&i.jsxs(ke,{children:[i.jsx(Ne,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(_e,{size:14})})}),i.jsx(Pe,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),u()},children:A("settings.orgStore.remove")})]})})]}),e[10]=u,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(Ce,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let p;e[20]!==v||e[21]!==h||e[22]!==f?(p=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=p):p=e[23];let C;return e[24]!==c||e[25]!==x||e[26]!==l||e[27]!==m||e[28]!==p?(C=i.jsx(H,{title:l,description:c,onClick:x,icon:m,action:p}),e[24]=c,e[25]=x,e[26]=l,e[27]=m,e[28]=p,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=ue(),c=Te(),s=fe(),o=we(),{mutateAsync:r}=Ae(),u=Se(),[a,A]=V.useState(!1);let S,_,j,d,x,m;if(t[0]!==s||t[1]!==l.id||t[2]!==u||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=ne.REGISTRY(l.id),p=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=ne.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,q=ne.SELF(l.id),B=new Set([f,C,"community-registry",q]),O=c.filter(n=>!B.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==u?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),u.invalidateQueries({queryKey:ye.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=u,t[20]=E):E=t[20];const Y=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:p(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(x=i.jsx(le,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=x):x=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(be,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==p?(y=p("self"),t[43]=p,t[44]=y):y=t[44];let G;t[45]!==b?(G=n=>b("self",n),t[45]=b,t[46]=G):G=t[46];let Q;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(Q=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=Q):Q=t[51];let ee;t[52]!==Y||t[53]!==b||t[54]!==p||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:p(n.id),onToggle:K=>b(n.id,K),onDelete:()=>Y(n.id)},n.id),t[52]=Y,t[53]=b,t[54]=p,t[55]=e,t[56]=ee):ee=t[56];const oe=O.map(ee);let W;t[57]!==Q||t[58]!==oe?(W=i.jsxs(ie,{children:[Q,oe]}),t[57]=Q,t[58]=oe,t[59]=W):W=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==W?(m=i.jsxs(le,{title:L,actions:P,children:[T,W]}),t[60]=L,t[61]=P,t[62]=T,t[63]=W,t[64]=m):m=t[64],_=le,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],S=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:p(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=u,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=S,t[9]=_,t[10]=j,t[11]=d,t[12]=x,t[13]=m}else S=t[8],_=t[9],j=t[10],d=t[11],x=t[12],m=t[13];let v;t[67]!==S||t[68]!==j?(v=i.jsx(S,{children:j}),t[67]=S,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==x||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[x,m,g]}),t[74]=x,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:S}=A;return i.jsx(Me,{error:S??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Re,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let u;t[8]!==o?(u=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ze,{children:[o,r]})})})})}),t[8]=o,t[9]=u):u=t[9];let a;return t[10]!==l||t[11]!==u?(a=i.jsx(pe,{fallback:l,children:u}),t[10]=l,t[11]=u,t[12]=a):a=t[12],a}function yt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{yt as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-JPmaR-tb.js","assets/index-C8rlFaFO.js","assets/index-DxTnZ0Oo.css","assets/Tool02-rl8XhSPG.js","assets/CheckCircle-B5oIKeSF.js","assets/Settings02-CU2rilKq.js","assets/use-mcp-client-PcphUWIj.js","assets/auth-Kymy4xkz.js","assets/useInfiniteQuery-mNPfD3Pk.js","assets/use-infinite-scroll-BI8YTyTt.js","assets/studio-tools-B3FHZXsQ.js","assets/badge-dHBIjKyY.js","assets/input-CWExGH7j.js","assets/dropdown-menu-B7HOgSu8.js","assets/ChevronUp-Ci-XiWb6.js","assets/ChevronRight-BnIvJcIZ.js","assets/DotsVertical-Bcfqjiks.js","assets/table-iG6kCmeS.js","assets/toggle-group-c5TjS6xS.js","assets/use-view-mode-C0yNdLzJ.js","assets/use-mobile-C57pT7o9.js","assets/FilterLines-Do4UgzmV.js","assets/Globe01-qjaQZUfN.js","assets/SearchMd-LbMkvaPD.js","assets/dialog-ChJw5xnr.js","assets/X-CLG08ht8.js","assets/AlertCircle-Cvc_10Uv.js","assets/Upload01-CXsTipbe.js","assets/alert-dialog-D2oa47X8.js","assets/card-CoG27DVs.js","assets/Trash01-DxXosbkh.js","assets/label-BbLr7wPS.js","assets/select-4-vdHbLT.js","assets/tooltip-DE_gqCm3.js","assets/ChevronDown-D_W2bIqv.js","assets/switch-CyZjNvfZ.js","assets/textarea-B8dhUfp9.js","assets/XCircle-pZ6nD22L.js","assets/checkbox-BOAToSlJ.js","assets/Eye-BuukW7MV.js","assets/LinkExternal01-CyMOdGfe.js","assets/use-copy-CveeH2p4.js","assets/Copy01-Q4xZmPKp.js","assets/Key01-BPZUhUcV.js","assets/Plus-5VWQJEkS.js","assets/mcp-oauth-B2KaqQoI.js","assets/Play-BE8nTtBp.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as m,b as n,e as c,j as t,i as p,r as l,aX as f}from"./index-C8rlFaFO.js";import{R as u}from"./require-capability-BBszzyH9.js";import"./use-capability-BNcFOggs.js";import"./access-gate-B8spscer.js";import"./capability-load-error-DI4Ww9LY.js";const g=l.lazy(()=>f(()=>import("./registry-layout-JPmaR-tb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,C as i}from"./index-
|
|
1
|
+
import{c,C as i}from"./index-C8rlFaFO.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,aO as C,aS as y,aR as T,aU as I,bH as H,bG as M,aQ as U,c as z,l as g}from"./index-
|
|
1
|
+
import{r as c,j as i,aO as C,aS as y,aR as T,aU as I,bH as H,bG as M,aQ as U,c as z,l as g}from"./index-C8rlFaFO.js";var m="Switch",[A]=U(m),[O,q]=A(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),S=c.useRef(!1),x=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(O,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),x&&(S.current=b.isPropagationStopped(),S.current||b.stopPropagation())})}),x&&i.jsx(_,{control:p,bubbles:!S.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=q(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=H(t),k=M(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function G(r){const e=z.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==s||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{G as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,l as i,j as r}from"./index-
|
|
1
|
+
import{c,l as i,j as r}from"./index-C8rlFaFO.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,f as d,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as d,b7 as k,aO as p,aU as T,b8 as y,aQ as M,aT as P,aR as S,aV as V,b9 as F,ba as D,c as x,l as g}from"./index-
|
|
1
|
+
import{r as v,j as d,b7 as k,aO as p,aU as T,b8 as y,aQ as M,aT as P,aR as S,aV as V,b9 as F,ba as D,c as x,l as g}from"./index-C8rlFaFO.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(F,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,O=A;function H(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function J(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(O,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{J as T,H as a,Q as b,U as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l,j as n}from"./index-
|
|
1
|
+
import{c as o,l,j as n}from"./index-C8rlFaFO.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,aR as b,j as c,aO as m,aU as k,aM as p,b7 as M,b8 as T,aT as S,b9 as A,aQ as F,bB as $,c as P,l as C}from"./index-
|
|
1
|
+
import{r as x,aR as b,j as c,aO as m,aU as k,aM as p,b7 as M,b8 as T,aT as S,b9 as A,aQ as F,bB as $,c as P,l as C}from"./index-C8rlFaFO.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,R]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(y,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(y,{...r,ref:e})})});h.displayName=v;var[O,U]=w(v),y=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=R(f,a.__scopeToggleGroup),s=U(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=R(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),H=h,L=N;const Q=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function J(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function K(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(Q({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{K as T,J as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,r as m,j as r,l as x,e as $,at as h,L as k,am as N,b0 as L}from"./index-
|
|
1
|
+
import{c,r as m,j as r,l as x,e as $,at as h,L as k,am as N,b0 as L}from"./index-C8rlFaFO.js";const T=m.createContext(null);function u(){const t=m.use(T);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function j(t){const e=c.c(8),{children:s}=t,[l,o]=m.useState(null),[n,a]=m.useState(null),[f,E]=m.useState(null),[b,S]=m.useState(null);let g;e[0]!==f||e[1]!==b||e[2]!==n||e[3]!==l?(g={togglesEl:l,setTogglesEl:o,tabsEl:n,setTabsEl:a,centerEl:f,setCenterEl:E,rightEl:b,setRightEl:S},e[0]=f,e[1]=b,e[2]=n,e[3]=l,e[4]=g):g=e[4];let d;return e[5]!==s||e[6]!==g?(d=r.jsx(T,{value:g,children:s}),e[5]=s,e[6]=g,e[7]=d):d=e[7],d}function i(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx(j,{children:r.jsx("div",{className:"flex flex-col h-full min-h-0",children:s})}),e[0]=s,e[1]=l):l=e[1],l}function C(t){const e=c.c(10);let s,l,o;e[0]!==t?({children:s,className:l,...o}=t,e[0]=t,e[1]=s,e[2]=l,e[3]=o):(s=e[1],l=e[2],o=e[3]);let n;e[4]!==l?(n=x("app-titlebar wco-drag relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",l),e[4]=l,e[5]=n):n=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=r.jsx("div",{className:n,...o,children:s}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a}function v(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=l):l=e[1],l}function y(t){const e=c.c(2),{children:s}=t;let l;return e[0]!==s?(l=r.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=l):l=e[1],l}function R(){const t=c.c(7),s=N().logo??L,l=typeof s=="string"?s:s.light,o=typeof s=="string"?s:s.dark;let n;t[0]!==l?(n=r.jsx("img",{src:l,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=l,t[1]=n):n=t[1];let a;t[2]!==o?(a=r.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=o,t[3]=a):a=t[3];let f;return t[4]!==n||t[5]!==a?(f=r.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[n,a]}),t[4]=n,t[5]=a,t[6]=f):f=t[6],f}function p(){const t=c.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(m.Suspense,{fallback:r.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:r.jsx(R,{})}),t[0]=e):e=t[0],e}function w(){const t=c.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=$(e);let l;t[1]!==s?(l={org:s},t[1]=s,t[2]=l):l=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(p,{}),t[3]=o):o=t[3];let n;return t[4]!==l?(n=r.jsx(k,{to:"/$org",params:l,"aria-label":"Back to home",title:"Back to home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:o}),t[4]=l,t[5]=n):n=t[5],n}function P(){const t=c.c(2),{setCenterEl:e}=u();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function _(t){const e=c.c(3),{children:s}=t,{centerEl:l}=u();if(!l)return null;let o;return e[0]!==l||e[1]!==s?(o=h.createPortal(s,l),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function z(t){const e=c.c(5),{className:s}=t,{setTabsEl:l}=u();let o;e[0]!==s?(o=x("shrink-0 flex items-center",s),e[0]=s,e[1]=o):o=e[1];let n;return e[2]!==l||e[3]!==o?(n=r.jsx("div",{ref:l,className:o}),e[2]=l,e[3]=o,e[4]=n):n=e[4],n}function B(t){const e=c.c(3),{children:s}=t,{tabsEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function D(t){const e=c.c(5),{className:s}=t,{setTogglesEl:l}=u();let o;e[0]!==s?(o=x("contents",s),e[0]=s,e[1]=o):o=e[1];let n;return e[2]!==l||e[3]!==o?(n=r.jsx("div",{ref:l,className:o}),e[2]=l,e[3]=o,e[4]=n):n=e[4],n}function H(t){const e=c.c(3),{children:s}=t,{togglesEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function I(){const t=c.c(2),{setRightEl:e}=u();let s;return t[0]!==e?(s=r.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function O(t){const e=c.c(3),{children:s}=t,{rightEl:l}=u();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=h.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}i.Provider=j;i.Header=C;i.LeftColumn=v;i.RightColumn=y;i.Logo=p;i.LogoLink=w;i.CenterSlot=P;i.Center=_;i.TabsSlot=z;i.Tabs=B;i.TogglesSlot=D;i.Toggles=H;i.RightSlot=I;i.Right=O;export{i as T};
|
package/dist/client/assets/{toolbar-icon-button-CSOZwc8p.js → toolbar-icon-button-Bbbo7hyv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,l as f,j as b}from"./index-
|
|
1
|
+
import{c as d,l as f,j as b}from"./index-C8rlFaFO.js";function x(l){const e=d.c(14);let n,t,s,o,r;e[0]!==l?({active:n,className:t,ref:o,type:r,...s}=l,e[0]=l,e[1]=n,e[2]=t,e[3]=s,e[4]=o,e[5]=r):(n=e[1],t=e[2],s=e[3],o=e[4],r=e[5]);const a=r===void 0?"button":r,u=n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let i;e[6]!==t||e[7]!==u?(i=f("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",u,t),e[6]=t,e[7]=u,e[8]=i):i=e[8];let c;return e[9]!==s||e[10]!==o||e[11]!==i||e[12]!==a?(c=b.jsx("button",{ref:o,type:a,className:i,...s}),e[9]=s,e[10]=o,e[11]=i,e[12]=a,e[13]=c):c=e[13],c}export{x as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as c,aO as M,aV as K,aR as J,cQ as Z,aS as H,cR as ee,aU as C,ba as V,cS as te,cT as $,cU as oe,cV as re,aQ as ne,cW as se,cX as ae,c as j,l as ie}from"./index-
|
|
1
|
+
import{r as a,j as c,aO as M,aV as K,aR as J,cQ as Z,aS as H,cR as ee,aU as C,ba as V,cS as te,cT as $,cU as oe,cV as re,aQ as ne,cW as se,cX as ae,c as j,l as ie}from"./index-C8rlFaFO.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",G=a.forwardRef((o,e)=>c.jsx(M.span,{...o,ref:e,style:{...le,...o.style}}));G.displayName=ce;var ue=G,[O]=ne("Tooltip",[$]),D=$(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),U=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=K(),f=a.useRef(0),h=l??i.disableHoverableContent,T=d??i.delayDuration,g=a.useRef(!1),[y,m]=J({prop:r,defaultProp:n??!1,onChange:I=>{I?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(I)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,m(!0)},[m]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m(!1)},[m]),S=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,m(!0),f.current=0},T)},[T,m]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(Z,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?S():E()},[i.isOpenDelayedRef,S,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};U.displayName=R;var A="TooltipTrigger",Y=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=H(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(ee,{asChild:!0,...l,children:c.jsx(M.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});Y.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),B=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx(V,{present:t||s.open,children:c.jsx(te,{asChild:!0,container:n,children:r})})})};B.displayName=N;var b="TooltipContent",W=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx(V,{present:r||l.open,children:l.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=H(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,T)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},m=ye(y,g.getBoundingClientRect()),w=Ce(y,m),E=be(T.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),T=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=T=>{const g=T.target,y={x:T.clientX,y:T.clientY},m=i?.contains(g)||u?.contains(g),w=!we(y,l);m?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(X,{...o,ref:s})}),[ge,Te]=O(R,{isInside:!1}),me=se("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(re,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(me,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var q="TooltipArrow",Q=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return Te(q,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});Q.displayName=q;function ye(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=U,je=Y,Oe=B,De=W,Le=Q;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ne(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Se(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Ie(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Se as T,le as V,Ie as a,Ne as b,Ae as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,C as f,v as P,K as m,m as v}from"./index-
|
|
1
|
+
import{c as d,C as f,v as P,K as m,m as v}from"./index-C8rlFaFO.js";import{u as S,c as K}from"./studio-tools-B3FHZXsQ.js";function T(s,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await K(s,"AI_PROVIDER_KEY_LIST",{})}}function R(){const s=d.c(7),{org:e}=f(),o=S();let i;s[0]!==e.id?(i=m.aiProviders(e.id),s[0]=e.id,s[1]=i):i=s[1];let t;s[2]!==o?(t=async()=>await o.call("AI_PROVIDERS_LIST",{}),s[2]=o,s[3]=t):t=s[3];let l;s[4]!==i||s[5]!==t?(l={queryKey:i,staleTime:1/0,queryFn:t},s[4]=i,s[5]=t,s[6]=l):l=s[6];const{data:r}=P(l);return r}function p(){const s=d.c(5),{org:e}=f();let o;s[0]!==e.id||s[1]!==e.slug?(o=T(e.slug,e.id),s[0]=e.id,s[1]=e.slug,s[2]=o):o=s[2];const{data:i}=P(o);let t;return s[3]!==i?.keys?(t=i?.keys??[],s[3]=i?.keys,s[4]=t):t=s[4],t}function q(s){const e=d.c(15),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s??""),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];const l=!!s;let r;e[3]!==s||e[4]!==i?(r=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s??""}),e[3]=s,e[4]=i,e[5]=r):r=e[5];let n;e[6]!==t||e[7]!==l||e[8]!==r?(n={queryKey:t,enabled:l,staleTime:6e4,queryFn:r},e[6]=t,e[7]=l,e[8]=r,e[9]=n):n=e[9];const{data:a,isLoading:_}=v(n);let u;e[10]!==a?.models?(u=a?.models??[],e[10]=a?.models,e[11]=u):u=e[11];const y=!!s&&_;let c;return e[12]!==u||e[13]!==y?(c={models:u,isLoading:y},e[12]=u,e[13]=y,e[14]=c):c=e[14],c}function A(s){const e=d.c(11),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];let l;e[3]!==s||e[4]!==i?(l=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let r;e[6]!==t||e[7]!==l?(r={queryKey:t,staleTime:6e4,queryFn:l},e[6]=t,e[7]=l,e[8]=r):r=e[8];const{data:n}=P(r);let a;return e[9]!==n?.models?(a=n?.models??[],e[9]=n?.models,e[10]=a):a=e[10],a}export{q as a,R as b,A as c,p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as U,C as q,K as T,m as I,n as x,d as y,t as m}from"./index-
|
|
1
|
+
import{c as U,C as q,K as T,m as I,n as x,d as y,t as m}from"./index-C8rlFaFO.js";import{S as z,u as J}from"./use-mcp-client-PcphUWIj.js";import{u as Q}from"./studio-tools-B3FHZXsQ.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=U.c(12),{org:s}=q(),l=t??z;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=J(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],I(r)}function it(t){const e=U.c(9),{org:s}=q(),l=Q();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],I(n)}function ot(t){const e=U.c(10),{org:s}=q(),l=Q();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],I(o)}function at(t,e){const s=U.c(12),{org:l}=q(),a=Q();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],I(c)}function nt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function lt(){const t=U.c(64),{org:e}=q(),s=Q(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let A;t[13]!==s?(A=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=A):A=t[14];let p;t[15]!==i||t[16]!==o?(p=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=p):p=t[17];let G;t[18]!==A||t[19]!==p?(G={mutationFn:A,onSuccess:p,onError:W},t[18]=A,t[19]=p,t[20]=G):G=t[20];const j=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const k=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let C;t[35]!==S||t[36]!==E?(C={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=C):C=t[37];const P=y(C);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let K;t[43]!==O||t[44]!==R?(K={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=K):K=t[45];const h=y(K);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==D||t[57]!==k||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==j?(M={create:D,update:j,remove:k,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=D,t[57]=k,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=j,t[63]=M):M=t[63],M}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,it as c,nt as d,at as e,lt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as T,r as o}from"./index-
|
|
1
|
+
import{c as T,r as o}from"./index-C8rlFaFO.js";const y=700;function x(r,l,_){const e=T.c(7),f=y,[a,m]=o.useState(r),[i,S]=o.useState(r),[A,d]=o.useState(!1),t=o.useRef(null);r!==i&&(S(r),A||m(r));let s;e[0]!==f||e[1]!==l?(s=u=>{m(u),d(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,d(!1),l(u)},f)},e[0]=f,e[1]=l,e[2]=s):s=e[2];const p=s;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u=>{m(u),t.current&&clearTimeout(t.current),t.current=null,d(!1)},e[3]=c):c=e[3];const E=c;let n;return e[4]!==a||e[5]!==p?(n=[a,p,E],e[4]=a,e[5]=p,e[6]=n):n=e[6],n}export{x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,C as m,m as g,K as p}from"./index-
|
|
1
|
+
import{c as u,C as m,m as g,K as p}from"./index-C8rlFaFO.js";const b=new Set(["owner","admin"]);function d(){const e=u.c(11),{org:r,locator:c}=m();let o;e[0]!==c?(o=p.myCapabilities(c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==r?(a=async()=>{const f=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(r.slug)}`,{credentials:"include"});if(!f.ok)throw new Error(`my-capabilities request failed: ${f.status}`);return await f.json()},e[2]=r,e[3]=a):a=e[3];let i;e[4]!==o||e[5]!==a?(i={queryKey:o,queryFn:a,staleTime:3e4,retry:2},e[4]=o,e[5]=a,e[6]=i):i=e[6];const{data:s,isLoading:l,isError:n}=g(i);let t;return e[7]!==s||e[8]!==n||e[9]!==l?(t={data:s,loading:l,error:n},e[7]=s,e[8]=n,e[9]=l,e[10]=t):t=e[10],t}function _(e){const r=u.c(8),{data:c,loading:o,error:a}=d();if(o){let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!0,error:!1,reason:"loading"},r[0]=t):t=r[0],t}if(a){let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!0,reason:"error"},r[1]=t):t=r[1],t}const i=c?.role??null;if(!i){let t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!1,reason:"denied"},r[2]=t):t=r[2],t}if(i==="owner"){let t;return r[3]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"owner"},r[3]=t):t=r[3],t}if(i==="admin"){let t;return r[4]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"admin"},r[4]=t):t=r[4],t}const s=c?.capabilities?.[e]===!0,l=s?"role":"denied";let n;return r[5]!==s||r[6]!==l?(n={granted:s,loading:!1,error:!1,reason:l},r[5]=s,r[6]=l,r[7]=n):n=r[7],n}function S(){const e=u.c(10),{data:r,loading:c,error:o}=d(),a=r?.role??void 0;let i;e[0]!==a?(i=a?b.has(a):!1,e[0]=a,e[1]=i):i=e[1];const s=i;let l;e[2]!==r?.capabilities?(l=r?.capabilities??{},e[2]=r?.capabilities,e[3]=l):l=e[3];const n=l;let t;return e[4]!==o||e[5]!==s||e[6]!==c||e[7]!==a||e[8]!==n?(t={capabilities:n,loading:c,error:o,isPrivileged:s,roleSlug:a},e[4]=o,e[5]=s,e[6]=c,e[7]=a,e[8]=n,e[9]=t):t=e[9],t}export{S as a,_ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as a}from"./AlertCircle-
|
|
1
|
+
import{i as a}from"./AlertCircle-Cvc_10Uv.js";import{i as c}from"./CheckCircle-B5oIKeSF.js";import{a as u}from"./DotsVertical-Bcfqjiks.js";import{aJ as m}from"./agent-icon-BIj6WxKp.js";import{i as b,c as d,r as f}from"./index-C8rlFaFO.js";import{a as p}from"./XCircle-pZ6nD22L.js";const g={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:a,iconClassName:"text-warning",labelColor:"text-warning"},failed:{label:"Failed",verb:"Something went wrong",icon:p,iconClassName:"text-destructive",labelColor:"text-destructive"},expired:{label:"Timed out",verb:"Stopped responding",icon:m,iconClassName:"text-warning",labelColor:"text-warning"},in_progress:{label:"Running",verb:"Agent is working",icon:b,iconClassName:"text-primary",labelColor:"text-primary"},completed:{label:"Done",verb:"Completed",icon:c,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},v={label:"Unknown",verb:"Unknown status",icon:u,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function y(r){return g[r??"completed"]??v}const i=new Map;function s(r){let t=i.get(r);return t||(t={tick:0,subscribers:new Set,intervalId:null},i.set(r,t)),t}function x(r,t){const e=s(r);return e.subscribers.add(t),e.intervalId===null&&(e.intervalId=setInterval(()=>{e.tick+=1;for(const o of e.subscribers)o()},r)),()=>{e.subscribers.delete(t),e.subscribers.size===0&&e.intervalId!==null&&(clearInterval(e.intervalId),e.intervalId=null)}}function T(r){const t=d.c(3),e=r===void 0?6e4:r;let o,n;return t[0]!==e?(o=l=>x(e,l),n=()=>s(e).tick,t[0]=e,t[1]=o,t[2]=n):(o=t[1],n=t[2]),f.useSyncExternalStore(o,n,C)}function C(){return 0}export{g as S,y as g,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as F,c as x,n as b,d as A,al as q,t as _}from"./index-
|
|
1
|
+
import{v as F,c as x,n as b,d as A,al as q,t as _}from"./index-C8rlFaFO.js";function Q(e,s,o){const t=[];if(e?.trim()){const n=e.trim(),r=o.map(a=>({field:[String(a)],operator:"contains",value:n}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const n of s)t.push({field:[n.column],operator:"eq",value:n.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function k(e,s,o){const t=e??o,n=s??"desc";return[{field:[String(t)],direction:n}]}function O(e){if(!e||typeof e!="object")throw new Error("Invalid result");if("isError"in e&&e.isError)throw new Error("content"in e&&Array.isArray(e.content)&&e.content[0]?.type==="text"?e.content[0].text:"Unknown error");if("structuredContent"in e)return e.structuredContent;throw new Error("No structured content found")}function D(e,s,o,t){const n=s.toUpperCase(),r=`COLLECTION_${n}_GET`;return{queryKey:q.collectionItem(t,e,"",n,o??""),queryFn:async()=>{if(!o)return{item:null};const a=await t.callTool({name:r,arguments:{id:o}});return O(a)},staleTime:6e4}}function j(e,s,o,t){const n=x.c(5);let r;n[0]!==t||n[1]!==s||n[2]!==o||n[3]!==e?(r=D(e,s,o,t),n[0]=t,n[1]=s,n[2]=o,n[3]=e,n[4]=r):r=n[4];const{data:a}=F(r);return a?.item??null}const K={structuredContent:{items:[]},isError:!1};function z(e,s,o,t={}){const{searchTerm:n,filters:r,sortKey:a,sortDirection:L,searchFields:S=["title","description"],defaultSortKey:h="updated_at",pageSize:g=100,additionalToolArgs:c}=t,l=s.toUpperCase(),f=`COLLECTION_${l}_LIST`,p=Q(n,r,S),T=k(a,L,h),u={...p&&{where:p},...T&&{orderBy:T},limit:g,offset:0,...c},m=JSON.stringify(u),C=q.collectionList(o,e,"",l,m),{data:w}=F({queryKey:C,queryFn:async()=>o?await o.callTool({name:f,arguments:u}):K,staleTime:3e4,retry:!1,select:d=>O(d??{})?.items??[]});return w}function G(e,s,o){const t=x.c(34),n=b();let r;t[0]!==s?(r=s.toUpperCase(),t[0]=s,t[1]=r):r=t[1];const a=r,L=`COLLECTION_${a}_CREATE`,S=`COLLECTION_${a}_UPDATE`,h=`COLLECTION_${a}_DELETE`;let g;t[2]!==n||t[3]!==e||t[4]!==a?(g=()=>{n.invalidateQueries({predicate:E=>{const i=E.queryKey;return i[1]===e&&i[3]==="collection"&&i[4]===a}})},t[2]=n,t[3]=e,t[4]=a,t[5]=g):g=t[5];const c=g;let l;t[6]!==o||t[7]!==L?(l=async E=>{const i=await o.callTool({name:L,arguments:{data:E}});if(i.isError)throw new Error(Array.isArray(i.content)?i.content[0]?.text:String(i.content));return O(i).item},t[6]=o,t[7]=L,t[8]=l):l=t[8];let f;t[9]!==c?(f=()=>{c(),_.success("Item created successfully")},t[9]=c,t[10]=f):f=t[10];let p;t[11]!==l||t[12]!==f?(p={mutationFn:l,onSuccess:f,onError:B},t[11]=l,t[12]=f,t[13]=p):p=t[13];const T=A(p);let u;t[14]!==o||t[15]!==S?(u=async E=>{const{id:i,data:v}=E,U=await o.callTool({name:S,arguments:{id:i,data:v}});return O(U).item},t[14]=o,t[15]=S,t[16]=u):u=t[16];let m;t[17]!==c?(m=()=>{c(),_.success("Item updated successfully")},t[17]=c,t[18]=m):m=t[18];let C;t[19]!==u||t[20]!==m?(C={mutationFn:u,onSuccess:m,onError:R},t[19]=u,t[20]=m,t[21]=C):C=t[21];const w=A(C);let d;t[22]!==o||t[23]!==h?(d=async E=>{const i=await o.callTool({name:h,arguments:{id:E}});return O(i).item.id},t[22]=o,t[23]=h,t[24]=d):d=t[24];let y;t[25]!==c?(y=()=>{c(),_.success("Item deleted successfully")},t[25]=c,t[26]=y):y=t[26];let N;t[27]!==d||t[28]!==y?(N={mutationFn:d,onSuccess:y,onError:P},t[27]=d,t[28]=y,t[29]=N):N=t[29];const $=A(N);let I;return t[30]!==T||t[31]!==$||t[32]!==w?(I={create:T,update:w,delete:$},t[30]=T,t[31]=$,t[32]=w,t[33]=I):I=t[33],I}function P(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to delete item: ${s}`)}function R(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to update item: ${s}`)}function B(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to create item: ${s}`)}export{G as a,z as b,j as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,C}from"./index-
|
|
1
|
+
import{c as f,C}from"./index-C8rlFaFO.js";import{b as N,a as O,u as S}from"./use-collections-u5tkBX1a.js";import{S as I,u as m}from"./use-mcp-client-PcphUWIj.js";function E(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:I,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=m(a);return N(u.id,"CONNECTIONS",A,p)}function _(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:I,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=m(n);return S(i.id,"CONNECTIONS",t,l)}function x(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:I,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=m(i);return O(o.id,"CONNECTIONS",n)}export{_ as a,x as b,E as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,r as n}from"./index-
|
|
1
|
+
import{c as i,r as n}from"./index-C8rlFaFO.js";function p(){const e=i.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async c=>{await navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
|
package/dist/client/assets/{use-create-virtual-mcp-DT1cqpNs.js → use-create-virtual-mcp-jvSmQNTU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g}from"./index-
|
|
1
|
+
import{c as g}from"./index-C8rlFaFO.js";import{b as f}from"./use-virtual-mcp-BtFe5DoR.js";import{c as p}from"./use-navigate-to-agent-DVHUkqpb.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=f(),r=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&r(l.id,{search:{main:"instructions"}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=r,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
|
package/dist/client/assets/{use-debounced-autosave-DA0Wn7VJ.js → use-debounced-autosave-DFle-8Sb.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./index-
|
|
1
|
+
import{r as u}from"./index-C8rlFaFO.js";function l({save:t,delayMs:n=1e3}){const e=u.useRef(t);e.current=t;const r=u.useRef(null),c=()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,e.current()},n)},o=()=>(r.current&&(clearTimeout(r.current),r.current=null),e.current());return u.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null,e.current())},[]),{schedule:c,flush:o}}export{l as u};
|
package/dist/client/assets/{use-debounced-value-DBDdUa8t.js → use-debounced-value-D1xFGN32.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r as n}from"./index-
|
|
1
|
+
import{c as m,r as n}from"./index-C8rlFaFO.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as Ie,a as en,z as un,M as mn,J as pn,j as e,B as J,t as U,c as hn,r as de,G as fn,D as xn,K as Ke,l as gn,i as we,p as S,n as jn,b as vn,m as yn}from"./index-BE6hzuPl.js";import{C as _n}from"./collection-search-DkaBDE88.js";import{g as Cn,a as bn,b as Nn,e as wn}from"./extract-connection-data-BOVpLxWL.js";import{u as nn,a as tn,g as Sn,C as Me}from"./connection-card-DH9eHpgr.js";import{e as sn,d as on,D as an,a as rn,h as In,c as kn}from"./dialog-CEJEmlAZ.js";import{D as An,a as Dn,c as Tn,b as Pn,d as Fn,e as Vn,f as Bn}from"./drawer-B16UsJ9z.js";import{u as On}from"./use-mobile-DSBAMYJF.js";import{F as O,b as M,c as L,d as E,f as z,a as We}from"./form-xwt17q8h.js";import{I as Y}from"./input-BgHT8C_Y.js";import{S as Mn,a as Ln,b as En,c as zn,d as pe}from"./select-_BdZTxPS.js";import{T as Rn}from"./textarea-BE7D_QqU.js";import{b as cn}from"./use-connection-1A7IHNnw.js";import{n as Se,i as Le}from"./Tool02-DED34rla.js";import{s as Ee}from"./Star01-BTYXST43.js";import{ao as $n}from"./agent-icon-n_DJILEj.js";import{s as Hn}from"./XClose-DMc7p4CW.js";import{c as Kn,i as be,a as Qe,E as Un,p as Xn,b as Gn,d as qn}from"./connection-form-helpers-9cIttTn5.js";import{a as ze}from"./authenticate-and-persist-oauth-BWqn4KLF.js";import{g as Wn}from"./connection-slug-eyAPH6o3.js";import{C as Qn}from"./collection-tabs-CjttU7gV.js";import{u as Ye}from"./use-infinite-scroll-ZPVDShE1.js";import{B as Ne}from"./badge-BZilNB5D.js";import{b as Re,T as $e,a as He}from"./tooltip-XFj2xRwa.js";import{u as Yn}from"./useSuspenseInfiniteQuery-D5GJvpsH.js";import{S as Jn,u as Zn}from"./use-mcp-client-DS0Emn8e.js";import{i as Je}from"./ChevronUp-D-P6SBrW.js";import{s as et}from"./Plus-us-N9JUq.js";import{u as nt}from"./studio-tools-BccAxrVu.js";import{u as tt}from"./use-ai-providers-Bc2W8TAS.js";function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const u=n.connectionId;return!!u&&!!s?.connections?.some(N=>N.connection_id===u)?{status:"attached",repo:n,connectionId:u}:!!u||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function $t(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Ht(s){if(typeof s!="object"||s===null)return!1;const u=s.githubRepo?.url;return typeof u=="string"&&u.length>0}function Kt(s){return Ue(s).status==="attached"}function Ut(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function Xt(s){const n=new Set;for(const u of s??[]){const v=u.metadata?.liveAgentId;typeof v=="string"&&v&&n.add(u.id)}return n}function Gt(s,n){if(!s)return null;const u=s.metadata?.liveAgentId;if(typeof u=="string"&&u)return{mode:"dev",targetId:u};const v=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return v?{mode:"live",targetId:v.id}:null}function st({open:s,onOpenChange:n,onCreated:u}){const{org:v}=Ie(),{data:h}=en.useSession(),{stdioEnabled:N}=un(),k=On(),R=cn(),l=nn(),A=tn(l,"").items,o=mn({resolver:pn(Kn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),w=o.watch("connection_url"),F=o.watch("npx_package"),j=be({uiType:f,connectionUrl:w??"",npxPackage:F??""})??Qe({uiType:f,connectionUrl:w??"",registryItems:A}),c=t=>{const d=t.trim();if(!d)return;const x=!!o.formState.dirtyFields.title,i=!!o.formState.dirtyFields.description,r=!!o.formState.dirtyFields.env_vars,g=m=>{if(m&&(!x&&!o.getValues("title").trim()&&m.title&&o.setValue("title",m.title,{shouldDirty:!1}),!i&&!(o.getValues("description")??"").trim()&&m.description&&o.setValue("description",m.description,{shouldDirty:!1}),!r&&m.envVarKeys?.length)){const y=o.getValues("env_vars")??[],T=new Set(y.map(V=>V.key)),Z=m.envVarKeys.filter(V=>!T.has(V));Z.length>0&&o.setValue("env_vars",[...y,...Z.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},G=Xn(d);if(G&&N){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",G.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),g(be({uiType:"NPX",npxPackage:G.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const m=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",m,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),g(be({uiType:m,connectionUrl:d})??Qe({uiType:m,connectionUrl:d,registryItems:A}));return}f==="NPX"&&g(be({uiType:"NPX",npxPackage:d}))},$=t=>{t||o.reset(),n(t)},b=async t=>{let d,x=null,i=null,r=null;t.ui_type==="NPX"?(d="STDIO",x="",r=Gn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",x="",r=qn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,x=t.connection_url||"",i=t.connection_token||null);const g=Cn("conn");try{await R.create.mutateAsync({id:g,title:t.title,description:t.description||null,connection_type:d,connection_url:x,connection_token:i,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:v.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:r,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),u?.(g)}catch{U.error("Failed to create connection")}},D="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",C=o.formState.isSubmitting?"Saving...":"Create Connection",X=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Type *"}),e.jsxs(Mn,{value:t.value,onValueChange:t.onChange,children:[e.jsx(E,{children:e.jsx(Ln,{children:e.jsx(En,{})})}),e.jsxs(zn,{children:[e.jsx(pe,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(pe,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(pe,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"Websocket"]})}),N&&e.jsxs(e.Fragment,{children:[e.jsx(pe,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(pe,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($n,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(z,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"NPM Package *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const x=d.clipboardData.getData("text");x&&(d.preventDefault(),o.setValue("npx_package",x.trim(),{shouldDirty:!0}),c(x))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(z,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Command *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Arguments"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(z,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Working Directory"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(z,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Environment Variables"}),e.jsx(E,{children:e.jsx(Un,{value:t.value??[],onChange:t.onChange})}),e.jsx(z,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"URL *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const x=d.clipboardData.getData("text");x&&(d.preventDefault(),o.setValue("connection_url",x.trim(),{shouldDirty:!0}),c(x))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:j?.token?.label??"Token (optional)"}),e.jsx(E,{children:e.jsx(Y,{type:"password",placeholder:j?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),j?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.token.helperText,j.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(z,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Name *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Description"}),e.jsx(E,{children:e.jsx(Rn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(z,{})]})})]});return k?e.jsx(An,{open:s,onOpenChange:$,children:e.jsxs(Dn,{className:"max-h-[90vh]",children:[e.jsx(Tn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Pn,{children:D}),e.jsx(Fn,{className:"mt-1",children:H})]}),e.jsx(Vn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Hn,{size:16})})})]})}),e.jsx(We,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:X}),e.jsx(Bn,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:$,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(rn,{children:D}),e.jsx(In,{children:H})]}),e.jsx(We,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:X}),e.jsxs(kn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>$(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function ot(s){const n=hn.c(68),{mode:u,agentId:v,addedConnectionIds:h,onAdd:N,onCloneAndAdd:k,onConnectAndAdd:R,connectingItemId:l,search:_,onCreateConnection:A,onBrowseNavigate:o,defaultTab:f}=s,w=u===void 0?"add":u,F=f===void 0?"connected":f,{org:j}=Ie(),c=de.useDeferredValue(_),$=_!==c;let b;n[0]!==c?(b=c.trim().toLowerCase(),n[0]=c,n[1]=b):b=n[1];const D=b;let H;n[2]!==F?(H=a=>a??F,n[2]=F,n[3]=H):H=n[3];const[C,X]=fn(xn.connectionsTab(j.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==C||n[5]!==X?(t=a=>{a!==C&&S("connections_dialog_tab_changed",{to_tab:a}),X(a)},n[4]=C,n[5]=X,n[6]=t):t=n[6];const d=t;let x;n[7]!==j.id||n[8]!==j.slug?(x={connectionId:Jn,orgId:j.id,orgSlug:j.slug},n[7]=j.id,n[8]=j.slug,n[9]=x):x=n[9];const i=Zn(x),r=c?.trim().split(/\s+/).filter(Boolean)??[],g=r.length>0?{operator:"or",conditions:r.flatMap(mt)}:void 0,G={...g&&{where:g},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},m=JSON.stringify(G),{data:y,fetchNextPage:T,hasNextPage:Z,isFetchingNextPage:V}=Yn({queryKey:Ke.collectionListInfinite(i,j.id,"","CONNECTIONS",m),queryFn:async a=>{const{pageParam:p}=a,K=p===void 0?0:p;return(await i.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...g&&{where:g},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:K}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=y?.pages.flatMap(lt)??[],he=Sn(Xe),ln=new Set(Xe.filter(ct).map(rt)),fe=nn(),q=tn(fe,c),ke=Ye(q.loadMore,q.hasMore,q.isLoadingMore),Ae=Ye(T,Z??!1,V),P=C==="all"||!!D,Ge=P?q.items.filter(a=>{const p=bn(a);if(p&&ln.has(p))return!1;if(!D)return!0;const K=a._meta?.["mcp.mesh"],W=[a.title,a.description,a.name,a.server?.title,a.server?.description,a.server?.name,K?.friendly_name,K?.friendlyName].filter(Boolean).join(" ").toLowerCase();return r.some(B=>W.includes(B.toLowerCase()))}):[],ue=Ge.filter(it),me=Ge.filter(at);let xe;n[10]!==h?(xe=a=>a.some(p=>h.has(p.id)),n[10]=h,n[11]=xe):xe=n[11];const De=xe;let ge;n[12]!==h||n[13]!==v||n[14]!==l||n[15]!==De||n[16]!==w||n[17]!==N||n[18]!==o||n[19]!==k?(ge=(a,p,K,W,B)=>{const Ce=De(B),le=B.find(Q=>!h.has(Q.id)),I=B[0];if(w==="browse"){const Q=Wn(I);return e.jsx(Me,{connection:{title:p,icon:K,description:B.length>1?`${B.length} instances`:W??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{S("connection_browse_clicked",{app_name:I.app_name??null,connection_id:I.id,instances_count:B.length}),o?.(Q)}},a)}return e.jsx(Me,{connection:{title:p,icon:K,description:W},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce&&e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Q=>{Q.stopPropagation(),le?(S("connection_add_clicked",{action:"use_existing",app_name:I.app_name??null,connection_id:le.id}),v&&S("agent_connection_attached",{agent_id:v,connection_id:le.id,app_name:I.app_name??null,mode:"existing"}),N(le.id)):(S("connection_add_clicked",{action:"clone",app_name:I.app_name??null,base_connection_id:I.id}),k(I))},children:"Add"})]})},a)},n[12]=h,n[13]=v,n[14]=l,n[15]=De,n[16]=w,n[17]=N,n[18]=o,n[19]=k,n[20]=ge):ge=n[20];const je=ge;let ve;n[21]!==l||n[22]!==w||n[23]!==R?(ve=a=>{const p=a._meta?.["mcp.mesh"],K=p?.friendlyName||p?.friendly_name||a.server?.title||a.title||a.server?.name||a.name||a.id||"",W=a.server?.description||a.description||null,B=a.server?.icons?.[0]?.src||Nn(a.server?.repository)||null,Ce=p?.official===!0,le=p?.verified===!0,I=p?.owner==="deco";return e.jsx(Me,{connection:{title:K,description:W,icon:B},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[I&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!I&&Ce&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Le,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!I&&!Ce&&le&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Le,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Q=>{Q.stopPropagation(),S("connection_add_clicked",{action:"connect_new",registry_item_id:a.id,app_name:p?.friendlyName||a.server?.name||a.name||null}),R(a)},children:l===a.id?e.jsx(we,{size:14,className:"animate-spin"}):w==="browse"?"Connect":"Add"})]})},`catalog-${a.id}`)},n[21]=l,n[22]=w,n[23]=R,n[24]=ve):ve=n[24];const qe=ve;let ee;n[25]!==C||n[26]!==d||n[27]!==A||n[28]!==D?(ee=!D&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Qn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:C,onTabChange:a=>d(a)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{S("connections_dialog_custom_clicked"),A()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=C,n[26]=d,n[27]=A,n[28]=D,n[29]=ee):ee=n[29];const Te=$&&"opacity-50 pointer-events-none";let ne;n[30]!==Te?(ne=gn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ne):ne=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;n[32]!==je?(ye=a=>{if(a.type==="group")return je(a.key,a.title,a.icon,null,a.connections);const p=a.connection;return je(p.id,p.title,p.icon,p.description??null,[p])},n[32]=je,n[33]=ye):ye=n[33];const Pe=he.map(ye);let te;n[34]!==Ae?(te=e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[34]=Ae,n[35]=te):te=n[35];let se;n[36]!==V?(se=V&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=V,n[37]=se):se=n[37];const Fe=P&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Le,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ve=P&&ue.map(qe),Be=P&&me.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=P&&me.map(qe);let oe;n[38]!==ke||n[39]!==fe||n[40]!==P?(oe=P&&fe.length>0&&e.jsx("div",{ref:ke,className:"col-span-full h-1"}),n[38]=ke,n[39]=fe,n[40]=P,n[41]=oe):oe=n[41];let ae;n[42]!==q.isLoadingMore||n[43]!==P?(ae=P&&q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=q.isLoadingMore,n[43]=P,n[44]=ae):ae=n[44];let ie;n[45]!==Pe||n[46]!==te||n[47]!==se||n[48]!==Fe||n[49]!==Ve||n[50]!==Be||n[51]!==Oe||n[52]!==oe||n[53]!==ae?(ie=e.jsxs("div",{className:dn,children:[Pe,te,se,Fe,Ve,Be,Oe,oe,ae]}),n[45]=Pe,n[46]=te,n[47]=se,n[48]=Fe,n[49]=Ve,n[50]=Be,n[51]=Oe,n[52]=oe,n[53]=ae,n[54]=ie):ie=n[54];let re;n[55]!==C||n[56]!==he.length||n[57]!==me||n[58]!==_||n[59]!==ue?(re=he.length===0&&ue.length===0&&me.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?`No connections match "${_}"`:C==="connected"?"No connections yet":"No connections available"}),n[55]=C,n[56]=he.length,n[57]=me,n[58]=_,n[59]=ue,n[60]=re):re=n[60];let ce;n[61]!==ne||n[62]!==ie||n[63]!==re?(ce=e.jsxs("div",{className:ne,children:[ie,re]}),n[61]=ne,n[62]=ie,n[63]=re,n[64]=ce):ce=n[64];let _e;return n[65]!==ee||n[66]!==ce?(_e=e.jsxs(e.Fragment,{children:[ee,ce]}),n[65]=ee,n[66]=ce,n[67]=_e):_e=n[67],_e}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function rt(s){return s.app_name}function ct(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function qt({open:s,onOpenChange:n,defaultTab:u,initialSearch:v="",...h}){const N=h.mode??"add",k="agentId"in h?h.agentId:void 0,R="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:i=>{},_=(i,r,g)=>{k&&S("agent_connection_attached",{agent_id:k,connection_id:i,app_name:r,mode:g})},[A,o]=de.useState(null),[f,w]=de.useState(v),[F,j]=de.useState(!1),{org:c}=Ie(),{data:$}=en.useSession(),b=cn(),D=jn(),H=vn(),C=i=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:i}})},X=()=>{D.invalidateQueries({predicate:i=>{const r=i.queryKey;return r[1]===c.id&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})},t=async(i,r)=>{S("connection_oauth_succeeded",{connection_id:i,flow:r});const g=new URL(`/api/${c.slug}/mcp/${i}`,window.location.origin);await D.invalidateQueries({queryKey:Ke.isMCPAuthenticated(g.href,null)}),X()},d=async i=>{o(i.app_name??i.id);try{const g=`${i.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,m=(await b.create.mutateAsync({title:g,description:i.description??null,connection_type:i.connection_type,connection_url:i.connection_url??null,connection_token:null,icon:i.icon??null,app_name:i.app_name??null,app_id:i.app_id??null,connection_headers:i.connection_headers??null})).id,y=await ze({connectionId:m,orgId:c.id,orgSlug:c.slug,persistFallback:T=>b.update.mutateAsync({id:m,data:{connection_token:T}}).then(()=>{})});if(y.ran&&!y.ok){S("connection_oauth_failed",{connection_id:m,flow:"clone",error:y.error??"no_token"}),U.error(`Authentication failed: ${y.error??"no token received"}`),await b.delete.mutateAsync(m);return}y.ran&&await t(m,"clone"),_(m,i.app_name??null,"clone"),l(m)}catch(r){console.error("Failed to add connection:",r),U.error("Failed to add connection")}finally{o(null)}},x=async i=>{if(!(!c||!$?.user?.id)){o(i.id);try{const r=wn(i,c.id,$.user.id,{remoteIndex:0}),g=r.connection_type==="STDIO",G=!!r.connection_url,m=g&&r.connection_headers&&typeof r.connection_headers=="object"&&"command"in r.connection_headers;if(!G&&!m){U.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:y}=await b.create.mutateAsync(r),T=await ze({connectionId:y,orgId:c.id,orgSlug:c.slug,persistFallback:Z=>b.update.mutateAsync({id:y,data:{connection_token:Z}}).then(()=>{})});if(T.ran&&!T.ok){S("connection_oauth_failed",{connection_id:y,flow:"connect_new",error:T.error??"no_token"}),U.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${T.error??"no token received"})`}),_(y,r.app_name??null,"new"),l(y);return}T.ran?(await t(y,"connect_new"),U.success("Connected and authenticated")):U.success("Connected"),_(y,r.app_name??null,"new"),l(y)}catch(r){console.error("Failed to connect:",r),U.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(rn,{className:"text-base font-semibold",children:N==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(_n,{value:f,onChange:w,placeholder:"Search connections..."})}),e.jsx(de.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:N,agentId:k,addedConnectionIds:R,onAdd:l,onCloneAndAdd:d,onConnectAndAdd:x,connectingItemId:A,search:f,onCreateConnection:()=>j(!0),onBrowseNavigate:C,defaultTab:u})})]}),e.jsx(st,{open:F,onOpenChange:j,onCreated:async i=>{j(!1);const r=await ze({connectionId:i,orgId:c.id,orgSlug:c.slug,persistFallback:g=>b.update.mutateAsync({id:i,data:{connection_token:g}}).then(()=>{})});if(r.ran&&!r.ok){S("connection_oauth_failed",{connection_id:i,flow:"custom_create",error:r.error??"no_token"}),U.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${r.error??"no token received"})`}),_(i,null,"custom"),l(i),n(!1);return}r.ran&&await t(i,"custom_create"),_(i,null,"custom"),l(i),n(!1)}})]})}const Ze=new Map;function Wt(){const{org:s}=Ie(),n=nt(),u=tt(),v=u.find(c=>c.providerId==="deco"),{data:h,isLoading:N,refetch:k,isFetching:R}=yn({queryKey:Ke.aiProviderCredits(s.id,"deco"),enabled:!!v,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,_=l!=null?l/100:null,A=de.useRef(new Map);if(l!=null){const c=Ze.get(s.id);A.current.get(s.id)&&c!=null&&l>c&&S("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-c,previous_balance_cents:c,new_balance_cents:l}),Ze.set(s.id,l),A.current.set(s.id,!0)}const o=!!v,f=l!=null&&l>0,w=l!=null&&l===0,F=l!=null&&l===200,j=u.length>0&&u.every(c=>c.providerId==="deco");return{hasDecoKey:o,decoKeyId:v?.id??null,balanceCents:l,balanceDollars:_,hasCredits:f,isZeroBalance:w,isInitialFreeCredit:F,hasOnlyDecoProvider:j,isLoading:N,isFetching:R,refetch:k}}export{qt as A,Ht as a,$t as b,Kt as c,Ut as d,Gt as f,Xt as g,Ue as r,Wt as u};
|
|
1
|
+
import{C as Ie,a as en,z as un,M as mn,J as pn,j as e,B as J,t as U,c as hn,r as de,G as fn,D as xn,K as Ke,l as gn,i as we,p as S,n as jn,b as vn,m as yn}from"./index-C8rlFaFO.js";import{C as _n}from"./collection-search-DuPY-s4R.js";import{g as Cn,a as bn,b as Nn,e as wn}from"./extract-connection-data-oUFnwuwD.js";import{u as nn,a as tn,g as Sn,C as Me}from"./connection-card-7gBTmFox.js";import{e as sn,d as on,D as an,a as rn,h as In,c as kn}from"./dialog-ChJw5xnr.js";import{D as An,a as Dn,c as Tn,b as Pn,d as Fn,e as Vn,f as Bn}from"./drawer-_WfOhyRU.js";import{u as On}from"./use-mobile-C57pT7o9.js";import{F as O,b as M,c as L,d as E,f as z,a as We}from"./form-BUM27CLj.js";import{I as Y}from"./input-CWExGH7j.js";import{S as Mn,a as Ln,b as En,c as zn,d as pe}from"./select-4-vdHbLT.js";import{T as Rn}from"./textarea-B8dhUfp9.js";import{b as cn}from"./use-connection-CcmTBTY-.js";import{n as Se,i as Le}from"./Tool02-rl8XhSPG.js";import{s as Ee}from"./Star01-D4LxiizA.js";import{ap as $n}from"./agent-icon-BIj6WxKp.js";import{s as Hn}from"./XClose-BYq2BBpT.js";import{c as Kn,i as be,a as Qe,E as Un,p as Xn,b as Gn,d as qn}from"./connection-form-helpers-CJKig9hy.js";import{a as ze}from"./authenticate-and-persist-oauth-DAAmwSgR.js";import{g as Wn}from"./connection-slug-eyAPH6o3.js";import{C as Qn}from"./collection-tabs-CcN3J070.js";import{u as Ye}from"./use-infinite-scroll-BI8YTyTt.js";import{B as Ne}from"./badge-dHBIjKyY.js";import{b as Re,T as $e,a as He}from"./tooltip-DE_gqCm3.js";import{u as Yn}from"./useSuspenseInfiniteQuery-DIVSilzv.js";import{S as Jn,u as Zn}from"./use-mcp-client-PcphUWIj.js";import{i as Je}from"./ChevronUp-Ci-XiWb6.js";import{s as et}from"./Plus-5VWQJEkS.js";import{u as nt}from"./studio-tools-B3FHZXsQ.js";import{u as tt}from"./use-ai-providers-CGzSWtp7.js";function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const u=n.connectionId;return!!u&&!!s?.connections?.some(N=>N.connection_id===u)?{status:"attached",repo:n,connectionId:u}:!!u||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function $t(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Ht(s){if(typeof s!="object"||s===null)return!1;const u=s.githubRepo?.url;return typeof u=="string"&&u.length>0}function Kt(s){return Ue(s).status==="attached"}function Ut(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function Xt(s){const n=new Set;for(const u of s??[]){const v=u.metadata?.liveAgentId;typeof v=="string"&&v&&n.add(u.id)}return n}function Gt(s,n){if(!s)return null;const u=s.metadata?.liveAgentId;if(typeof u=="string"&&u)return{mode:"dev",targetId:u};const v=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return v?{mode:"live",targetId:v.id}:null}function st({open:s,onOpenChange:n,onCreated:u}){const{org:v}=Ie(),{data:h}=en.useSession(),{stdioEnabled:N}=un(),k=On(),R=cn(),l=nn(),A=tn(l,"").items,o=mn({resolver:pn(Kn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),w=o.watch("connection_url"),F=o.watch("npx_package"),j=be({uiType:f,connectionUrl:w??"",npxPackage:F??""})??Qe({uiType:f,connectionUrl:w??"",registryItems:A}),c=t=>{const d=t.trim();if(!d)return;const x=!!o.formState.dirtyFields.title,i=!!o.formState.dirtyFields.description,r=!!o.formState.dirtyFields.env_vars,g=m=>{if(m&&(!x&&!o.getValues("title").trim()&&m.title&&o.setValue("title",m.title,{shouldDirty:!1}),!i&&!(o.getValues("description")??"").trim()&&m.description&&o.setValue("description",m.description,{shouldDirty:!1}),!r&&m.envVarKeys?.length)){const y=o.getValues("env_vars")??[],T=new Set(y.map(V=>V.key)),Z=m.envVarKeys.filter(V=>!T.has(V));Z.length>0&&o.setValue("env_vars",[...y,...Z.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},G=Xn(d);if(G&&N){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",G.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),g(be({uiType:"NPX",npxPackage:G.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const m=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",m,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),g(be({uiType:m,connectionUrl:d})??Qe({uiType:m,connectionUrl:d,registryItems:A}));return}f==="NPX"&&g(be({uiType:"NPX",npxPackage:d}))},$=t=>{t||o.reset(),n(t)},b=async t=>{let d,x=null,i=null,r=null;t.ui_type==="NPX"?(d="STDIO",x="",r=Gn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",x="",r=qn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,x=t.connection_url||"",i=t.connection_token||null);const g=Cn("conn");try{await R.create.mutateAsync({id:g,title:t.title,description:t.description||null,connection_type:d,connection_url:x,connection_token:i,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:v.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:r,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),u?.(g)}catch{U.error("Failed to create connection")}},D="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",C=o.formState.isSubmitting?"Saving...":"Create Connection",X=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Type *"}),e.jsxs(Mn,{value:t.value,onValueChange:t.onChange,children:[e.jsx(E,{children:e.jsx(Ln,{children:e.jsx(En,{})})}),e.jsxs(zn,{children:[e.jsx(pe,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(pe,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(pe,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"Websocket"]})}),N&&e.jsxs(e.Fragment,{children:[e.jsx(pe,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(pe,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($n,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(z,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"NPM Package *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const x=d.clipboardData.getData("text");x&&(d.preventDefault(),o.setValue("npx_package",x.trim(),{shouldDirty:!0}),c(x))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(z,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Command *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Arguments"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(z,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Working Directory"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(z,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Environment Variables"}),e.jsx(E,{children:e.jsx(Un,{value:t.value??[],onChange:t.onChange})}),e.jsx(z,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"URL *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const x=d.clipboardData.getData("text");x&&(d.preventDefault(),o.setValue("connection_url",x.trim(),{shouldDirty:!0}),c(x))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:j?.token?.label??"Token (optional)"}),e.jsx(E,{children:e.jsx(Y,{type:"password",placeholder:j?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),j?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.token.helperText,j.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(z,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Name *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Description"}),e.jsx(E,{children:e.jsx(Rn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(z,{})]})})]});return k?e.jsx(An,{open:s,onOpenChange:$,children:e.jsxs(Dn,{className:"max-h-[90vh]",children:[e.jsx(Tn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Pn,{children:D}),e.jsx(Fn,{className:"mt-1",children:H})]}),e.jsx(Vn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Hn,{size:16})})})]})}),e.jsx(We,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:X}),e.jsx(Bn,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:$,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(rn,{children:D}),e.jsx(In,{children:H})]}),e.jsx(We,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:X}),e.jsxs(kn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>$(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function ot(s){const n=hn.c(68),{mode:u,agentId:v,addedConnectionIds:h,onAdd:N,onCloneAndAdd:k,onConnectAndAdd:R,connectingItemId:l,search:_,onCreateConnection:A,onBrowseNavigate:o,defaultTab:f}=s,w=u===void 0?"add":u,F=f===void 0?"connected":f,{org:j}=Ie(),c=de.useDeferredValue(_),$=_!==c;let b;n[0]!==c?(b=c.trim().toLowerCase(),n[0]=c,n[1]=b):b=n[1];const D=b;let H;n[2]!==F?(H=a=>a??F,n[2]=F,n[3]=H):H=n[3];const[C,X]=fn(xn.connectionsTab(j.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==C||n[5]!==X?(t=a=>{a!==C&&S("connections_dialog_tab_changed",{to_tab:a}),X(a)},n[4]=C,n[5]=X,n[6]=t):t=n[6];const d=t;let x;n[7]!==j.id||n[8]!==j.slug?(x={connectionId:Jn,orgId:j.id,orgSlug:j.slug},n[7]=j.id,n[8]=j.slug,n[9]=x):x=n[9];const i=Zn(x),r=c?.trim().split(/\s+/).filter(Boolean)??[],g=r.length>0?{operator:"or",conditions:r.flatMap(mt)}:void 0,G={...g&&{where:g},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},m=JSON.stringify(G),{data:y,fetchNextPage:T,hasNextPage:Z,isFetchingNextPage:V}=Yn({queryKey:Ke.collectionListInfinite(i,j.id,"","CONNECTIONS",m),queryFn:async a=>{const{pageParam:p}=a,K=p===void 0?0:p;return(await i.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...g&&{where:g},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:K}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=y?.pages.flatMap(lt)??[],he=Sn(Xe),ln=new Set(Xe.filter(ct).map(rt)),fe=nn(),q=tn(fe,c),ke=Ye(q.loadMore,q.hasMore,q.isLoadingMore),Ae=Ye(T,Z??!1,V),P=C==="all"||!!D,Ge=P?q.items.filter(a=>{const p=bn(a);if(p&&ln.has(p))return!1;if(!D)return!0;const K=a._meta?.["mcp.mesh"],W=[a.title,a.description,a.name,a.server?.title,a.server?.description,a.server?.name,K?.friendly_name,K?.friendlyName].filter(Boolean).join(" ").toLowerCase();return r.some(B=>W.includes(B.toLowerCase()))}):[],ue=Ge.filter(it),me=Ge.filter(at);let xe;n[10]!==h?(xe=a=>a.some(p=>h.has(p.id)),n[10]=h,n[11]=xe):xe=n[11];const De=xe;let ge;n[12]!==h||n[13]!==v||n[14]!==l||n[15]!==De||n[16]!==w||n[17]!==N||n[18]!==o||n[19]!==k?(ge=(a,p,K,W,B)=>{const Ce=De(B),le=B.find(Q=>!h.has(Q.id)),I=B[0];if(w==="browse"){const Q=Wn(I);return e.jsx(Me,{connection:{title:p,icon:K,description:B.length>1?`${B.length} instances`:W??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{S("connection_browse_clicked",{app_name:I.app_name??null,connection_id:I.id,instances_count:B.length}),o?.(Q)}},a)}return e.jsx(Me,{connection:{title:p,icon:K,description:W},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce&&e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Q=>{Q.stopPropagation(),le?(S("connection_add_clicked",{action:"use_existing",app_name:I.app_name??null,connection_id:le.id}),v&&S("agent_connection_attached",{agent_id:v,connection_id:le.id,app_name:I.app_name??null,mode:"existing"}),N(le.id)):(S("connection_add_clicked",{action:"clone",app_name:I.app_name??null,base_connection_id:I.id}),k(I))},children:"Add"})]})},a)},n[12]=h,n[13]=v,n[14]=l,n[15]=De,n[16]=w,n[17]=N,n[18]=o,n[19]=k,n[20]=ge):ge=n[20];const je=ge;let ve;n[21]!==l||n[22]!==w||n[23]!==R?(ve=a=>{const p=a._meta?.["mcp.mesh"],K=p?.friendlyName||p?.friendly_name||a.server?.title||a.title||a.server?.name||a.name||a.id||"",W=a.server?.description||a.description||null,B=a.server?.icons?.[0]?.src||Nn(a.server?.repository)||null,Ce=p?.official===!0,le=p?.verified===!0,I=p?.owner==="deco";return e.jsx(Me,{connection:{title:K,description:W,icon:B},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[I&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!I&&Ce&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Le,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!I&&!Ce&&le&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Le,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Q=>{Q.stopPropagation(),S("connection_add_clicked",{action:"connect_new",registry_item_id:a.id,app_name:p?.friendlyName||a.server?.name||a.name||null}),R(a)},children:l===a.id?e.jsx(we,{size:14,className:"animate-spin"}):w==="browse"?"Connect":"Add"})]})},`catalog-${a.id}`)},n[21]=l,n[22]=w,n[23]=R,n[24]=ve):ve=n[24];const qe=ve;let ee;n[25]!==C||n[26]!==d||n[27]!==A||n[28]!==D?(ee=!D&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Qn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:C,onTabChange:a=>d(a)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{S("connections_dialog_custom_clicked"),A()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=C,n[26]=d,n[27]=A,n[28]=D,n[29]=ee):ee=n[29];const Te=$&&"opacity-50 pointer-events-none";let ne;n[30]!==Te?(ne=gn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ne):ne=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;n[32]!==je?(ye=a=>{if(a.type==="group")return je(a.key,a.title,a.icon,null,a.connections);const p=a.connection;return je(p.id,p.title,p.icon,p.description??null,[p])},n[32]=je,n[33]=ye):ye=n[33];const Pe=he.map(ye);let te;n[34]!==Ae?(te=e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[34]=Ae,n[35]=te):te=n[35];let se;n[36]!==V?(se=V&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=V,n[37]=se):se=n[37];const Fe=P&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Le,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ve=P&&ue.map(qe),Be=P&&me.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=P&&me.map(qe);let oe;n[38]!==ke||n[39]!==fe||n[40]!==P?(oe=P&&fe.length>0&&e.jsx("div",{ref:ke,className:"col-span-full h-1"}),n[38]=ke,n[39]=fe,n[40]=P,n[41]=oe):oe=n[41];let ae;n[42]!==q.isLoadingMore||n[43]!==P?(ae=P&&q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=q.isLoadingMore,n[43]=P,n[44]=ae):ae=n[44];let ie;n[45]!==Pe||n[46]!==te||n[47]!==se||n[48]!==Fe||n[49]!==Ve||n[50]!==Be||n[51]!==Oe||n[52]!==oe||n[53]!==ae?(ie=e.jsxs("div",{className:dn,children:[Pe,te,se,Fe,Ve,Be,Oe,oe,ae]}),n[45]=Pe,n[46]=te,n[47]=se,n[48]=Fe,n[49]=Ve,n[50]=Be,n[51]=Oe,n[52]=oe,n[53]=ae,n[54]=ie):ie=n[54];let re;n[55]!==C||n[56]!==he.length||n[57]!==me||n[58]!==_||n[59]!==ue?(re=he.length===0&&ue.length===0&&me.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?`No connections match "${_}"`:C==="connected"?"No connections yet":"No connections available"}),n[55]=C,n[56]=he.length,n[57]=me,n[58]=_,n[59]=ue,n[60]=re):re=n[60];let ce;n[61]!==ne||n[62]!==ie||n[63]!==re?(ce=e.jsxs("div",{className:ne,children:[ie,re]}),n[61]=ne,n[62]=ie,n[63]=re,n[64]=ce):ce=n[64];let _e;return n[65]!==ee||n[66]!==ce?(_e=e.jsxs(e.Fragment,{children:[ee,ce]}),n[65]=ee,n[66]=ce,n[67]=_e):_e=n[67],_e}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function rt(s){return s.app_name}function ct(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function qt({open:s,onOpenChange:n,defaultTab:u,initialSearch:v="",...h}){const N=h.mode??"add",k="agentId"in h?h.agentId:void 0,R="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:i=>{},_=(i,r,g)=>{k&&S("agent_connection_attached",{agent_id:k,connection_id:i,app_name:r,mode:g})},[A,o]=de.useState(null),[f,w]=de.useState(v),[F,j]=de.useState(!1),{org:c}=Ie(),{data:$}=en.useSession(),b=cn(),D=jn(),H=vn(),C=i=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:i}})},X=()=>{D.invalidateQueries({predicate:i=>{const r=i.queryKey;return r[1]===c.id&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})},t=async(i,r)=>{S("connection_oauth_succeeded",{connection_id:i,flow:r});const g=new URL(`/api/${c.slug}/mcp/${i}`,window.location.origin);await D.invalidateQueries({queryKey:Ke.isMCPAuthenticated(g.href,null)}),X()},d=async i=>{o(i.app_name??i.id);try{const g=`${i.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,m=(await b.create.mutateAsync({title:g,description:i.description??null,connection_type:i.connection_type,connection_url:i.connection_url??null,connection_token:null,icon:i.icon??null,app_name:i.app_name??null,app_id:i.app_id??null,connection_headers:i.connection_headers??null})).id,y=await ze({connectionId:m,orgId:c.id,orgSlug:c.slug,persistFallback:T=>b.update.mutateAsync({id:m,data:{connection_token:T}}).then(()=>{})});if(y.ran&&!y.ok){S("connection_oauth_failed",{connection_id:m,flow:"clone",error:y.error??"no_token"}),U.error(`Authentication failed: ${y.error??"no token received"}`),await b.delete.mutateAsync(m);return}y.ran&&await t(m,"clone"),_(m,i.app_name??null,"clone"),l(m)}catch(r){console.error("Failed to add connection:",r),U.error("Failed to add connection")}finally{o(null)}},x=async i=>{if(!(!c||!$?.user?.id)){o(i.id);try{const r=wn(i,c.id,$.user.id,{remoteIndex:0}),g=r.connection_type==="STDIO",G=!!r.connection_url,m=g&&r.connection_headers&&typeof r.connection_headers=="object"&&"command"in r.connection_headers;if(!G&&!m){U.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:y}=await b.create.mutateAsync(r),T=await ze({connectionId:y,orgId:c.id,orgSlug:c.slug,persistFallback:Z=>b.update.mutateAsync({id:y,data:{connection_token:Z}}).then(()=>{})});if(T.ran&&!T.ok){S("connection_oauth_failed",{connection_id:y,flow:"connect_new",error:T.error??"no_token"}),U.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${T.error??"no token received"})`}),_(y,r.app_name??null,"new"),l(y);return}T.ran?(await t(y,"connect_new"),U.success("Connected and authenticated")):U.success("Connected"),_(y,r.app_name??null,"new"),l(y)}catch(r){console.error("Failed to connect:",r),U.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(rn,{className:"text-base font-semibold",children:N==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(_n,{value:f,onChange:w,placeholder:"Search connections..."})}),e.jsx(de.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:N,agentId:k,addedConnectionIds:R,onAdd:l,onCloneAndAdd:d,onConnectAndAdd:x,connectingItemId:A,search:f,onCreateConnection:()=>j(!0),onBrowseNavigate:C,defaultTab:u})})]}),e.jsx(st,{open:F,onOpenChange:j,onCreated:async i=>{j(!1);const r=await ze({connectionId:i,orgId:c.id,orgSlug:c.slug,persistFallback:g=>b.update.mutateAsync({id:i,data:{connection_token:g}}).then(()=>{})});if(r.ran&&!r.ok){S("connection_oauth_failed",{connection_id:i,flow:"custom_create",error:r.error??"no_token"}),U.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${r.error??"no token received"})`}),_(i,null,"custom"),l(i),n(!1);return}r.ran&&await t(i,"custom_create"),_(i,null,"custom"),l(i),n(!1)}})]})}const Ze=new Map;function Wt(){const{org:s}=Ie(),n=nt(),u=tt(),v=u.find(c=>c.providerId==="deco"),{data:h,isLoading:N,refetch:k,isFetching:R}=yn({queryKey:Ke.aiProviderCredits(s.id,"deco"),enabled:!!v,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,_=l!=null?l/100:null,A=de.useRef(new Map);if(l!=null){const c=Ze.get(s.id);A.current.get(s.id)&&c!=null&&l>c&&S("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-c,previous_balance_cents:c,new_balance_cents:l}),Ze.set(s.id,l),A.current.set(s.id,!0)}const o=!!v,f=l!=null&&l>0,w=l!=null&&l===0,F=l!=null&&l===200,j=u.length>0&&u.every(c=>c.providerId==="deco");return{hasDecoKey:o,decoKeyId:v?.id??null,balanceCents:l,balanceDollars:_,hasCredits:f,isZeroBalance:w,isInitialFreeCredit:F,hasOnlyDecoProvider:j,isLoading:N,isFetching:R,refetch:k}}export{qt as A,Ht as a,$t as b,Kt as c,Ut as d,Gt as f,Xt as g,Ue as r,Wt as u};
|
package/dist/client/assets/{use-decopilot-events-XyNhQjC6.js → use-decopilot-events-VInARyiN.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-C8rlFaFO.js";import{d as R,D as u}from"./decopilot-sse-pool-DEJZ4gJu.js";const f=()=>0;function g(E){const{orgSlug:t,taskId:a,enabled:n=!0,onStep:o,onFinish:S,onTaskStatus:i}=E,l=s.useRef({taskId:a,onStep:o,onFinish:S,onTaskStatus:i});l.current={taskId:a,onStep:o,onFinish:S,onTaskStatus:i};const c=s.useRef(null),p=s.useRef(n),b=s.useRef(t);(!c.current||p.current!==n||b.current!==t)&&(p.current=n,b.current=t,c.current=d=>{if(!n||!t)return()=>{};const k=T=>{let e;try{e=JSON.parse(T.data)}catch{return}const r=l.current;if(!(r.taskId&&e.subject!==r.taskId)){switch(e.type){case u.STEP:r.onStep?.(e);break;case u.FINISH:r.onFinish?.(e);break;case u.THREAD_STATUS:r.onTaskStatus?.(e);break}d()}};return R.subscribe(t,k)}),s.useSyncExternalStore(c.current,f,f)}export{g as u};
|