decocms 2.290.0 → 2.290.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Dy6WQ5ge.js → AlertCircle-BKpPv_ue.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-DyXfpAXl.js → ArrowNarrowLeft-DzI4-MMz.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CnIoXxER.js → ArrowUpRight-CgoB9CSG.js} +1 -1
- package/dist/client/assets/{CheckCircle-BZH7SpHU.js → CheckCircle-_hRmcUCr.js} +1 -1
- package/dist/client/assets/{ChevronDown-BjTzGWO3.js → ChevronDown-DgrWziJW.js} +1 -1
- package/dist/client/assets/{ChevronRight-CYmVBoc2.js → ChevronRight-DJnGkhn4.js} +1 -1
- package/dist/client/assets/{ChevronUp-Cw4IUx4c.js → ChevronUp-CYzPfn3Y.js} +1 -1
- package/dist/client/assets/{Container-9mToJ-Hm.js → Container-CCq3u0Gk.js} +1 -1
- package/dist/client/assets/{DotsVertical-CbfHiscK.js → DotsVertical-om3rzQE9.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Kt8lGWbQ.js → LinkExternal01-DbNOYo2d.js} +1 -1
- package/dist/client/assets/{Lock01-BhhALBsJ.js → Lock01-BsLK0x7P.js} +1 -1
- package/dist/client/assets/{Palette-6WmqQOED.js → Palette-CN1aN7Xh.js} +1 -1
- package/dist/client/assets/{Play-B-Yf_e00.js → Play-CwsBegSF.js} +1 -1
- package/dist/client/assets/{Plus-C4wuRIjK.js → Plus-CnK1SC2T.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-KsYBIYgq.js → RefreshCcw01-DESLbhAD.js} +1 -1
- package/dist/client/assets/{SearchMd-BhWG7TtE.js → SearchMd-DlfhE_5j.js} +1 -1
- package/dist/client/assets/{Settings02-C0B8JYoO.js → Settings02-LVlkEIxI.js} +1 -1
- package/dist/client/assets/{Shield01-vr0RTpPH.js → Shield01-DGTwcXqp.js} +1 -1
- package/dist/client/assets/{Star01-BRTO8Wcg.js → Star01-CWHB1ChF.js} +1 -1
- package/dist/client/assets/{Sun-DD9THIbp.js → Sun-1aZYqU86.js} +1 -1
- package/dist/client/assets/{Tool01-CzK8v2e2.js → Tool01-X8GEQ_TP.js} +1 -1
- package/dist/client/assets/{Trash01-Cqpb-tl4.js → Trash01-CIUqVsqV.js} +1 -1
- package/dist/client/assets/{User01-CHqQvVRk.js → User01-Dds7lT_Z.js} +1 -1
- package/dist/client/assets/{Users03-DQHeHtuJ.js → Users03-BD0tlSQu.js} +1 -1
- package/dist/client/assets/{X-Cz2VwWbK.js → X-BDxrsCdA.js} +1 -1
- package/dist/client/assets/{XCircle-D7CLzAA2.js → XCircle-BJ-0U-0t.js} +1 -1
- package/dist/client/assets/{XClose-xVgTKp3y.js → XClose-Bl-2e8QV.js} +1 -1
- package/dist/client/assets/{Zap-eM4vJ-Od.js → Zap-B3a3OZUG.js} +1 -1
- package/dist/client/assets/{ZapSquare-DAasimGP.js → ZapSquare-Ddm4Ccl_.js} +1 -1
- package/dist/client/assets/{accordion-BM20EgNo.js → accordion-eGw-yxkH.js} +1 -1
- package/dist/client/assets/{agent-icon-CPrrz1CF.js → agent-icon-Dhv8pT4N.js} +1 -1
- package/dist/client/assets/{agents-list-bLyTwxOp.js → agents-list-BoLhMS8b.js} +1 -1
- package/dist/client/assets/ai-providers-5Y8Lye7a.js +1 -0
- package/dist/client/assets/{alert-dialog-D6BTsTie.js → alert-dialog-C5H0at4x.js} +1 -1
- package/dist/client/assets/{auth-catchall-DrwBfvc7.js → auth-catchall-CDaNQLse.js} +1 -1
- package/dist/client/assets/{automation-list-row-BAkKDhdt.js → automation-list-row-i8Q9Zh9Z.js} +1 -1
- package/dist/client/assets/{automations-DsHMII0n.js → automations-ulYqPLWi.js} +1 -1
- package/dist/client/assets/{avatar-B5MfJTPB.js → avatar-BCAMjlDk.js} +1 -1
- package/dist/client/assets/{badge-C3ltiwQz.js → badge-arNIH4S4.js} +1 -1
- package/dist/client/assets/{brand-context-DdXBk5wZ.js → brand-context-doHsqzeN.js} +1 -1
- package/dist/client/assets/{card-DXc1-cjm.js → card-BcKfGMCs.js} +1 -1
- package/dist/client/assets/{chat-context-BM3OkNBp.js → chat-context-BgLXGROj.js} +14 -14
- package/dist/client/assets/{checkbox-CXSt-qCU.js → checkbox-eCIm2Y45.js} +1 -1
- package/dist/client/assets/{collection-detail-PiEvUvyY.js → collection-detail-BIdQmVBg.js} +1 -1
- package/dist/client/assets/{collection-display-button-CbF3FIKJ.js → collection-display-button-31iCSNaH.js} +1 -1
- package/dist/client/assets/{collection-search-BD7TaK50.js → collection-search-CWRKNmnq.js} +1 -1
- package/dist/client/assets/{collection-search-D9OTGkON.js → collection-search-CZEXNAkX.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C_wGPjYd.js → collection-table-wrapper-iKnV9U-a.js} +1 -1
- package/dist/client/assets/{collection-tabs-B5kXhLnr.js → collection-tabs-BB_C6DLQ.js} +1 -1
- package/dist/client/assets/{collections-uRCOIhF1.js → collections-BmZbVrT4.js} +1 -1
- package/dist/client/assets/{command-_aeZDxv4.js → command-BXuf0gSd.js} +1 -1
- package/dist/client/assets/{connection-card-CG4RgzFA.js → connection-card-CaHQAi2l.js} +1 -1
- package/dist/client/assets/{connection-detail-CPj5tV8W.js → connection-detail-DtFDjt8X.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CF_hDkTW.js → connection-form-helpers-D-VsE2HN.js} +1 -1
- package/dist/client/assets/{connections-BFVESmsw.js → connections-B0CDxzS1.js} +1 -1
- package/dist/client/assets/{constants-BXPLSYK0.js → constants-CBodG1Pl.js} +1 -1
- package/dist/client/assets/{constants-fisX-szF.js → constants-fZUl7A6B.js} +1 -1
- package/dist/client/assets/{dialog-DgIfLmkz.js → dialog-CfIcbBij.js} +1 -1
- package/dist/client/assets/{domain-settings-Da9TCjdO.js → domain-settings-Bz-lXZFn.js} +1 -1
- package/dist/client/assets/{drawer-DcXb-dIX.js → drawer-D0hdbn63.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CpKKd4KR.js → dropdown-menu-Cye9zjaV.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-5YDFJfrE.js → dynamic-plugin-layout-DyEJh8Ah.js} +1 -1
- package/dist/client/assets/{empty-state-7OQh5AG_.js → empty-state-Ce0UFiAd.js} +1 -1
- package/dist/client/assets/{empty-state-BNoYs1pG.js → empty-state-KsHmVPO4.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C1fjt67g.js → extract-connection-data-C_Q81cim.js} +1 -1
- package/dist/client/assets/{features-DlbqWaud.js → features-UEpssbRc.js} +1 -1
- package/dist/client/assets/{form-B9N1Oecs.js → form-Bt1yLlZE.js} +1 -1
- package/dist/client/assets/{general-BRrfSAHw.js → general-CX6SxsSV.js} +1 -1
- package/dist/client/assets/{github-repo-picker-xqXMF4Z2.js → github-repo-picker-4y_CmSBW.js} +1 -1
- package/dist/client/assets/{index-CdcT6o1u.js → index-B5IXTINZ.js} +1 -1
- package/dist/client/assets/{index-nPLW8S1n.js → index-BdMwcoDn.js} +1 -1
- package/dist/client/assets/{index-B1ENCl_P.js → index-BqvsnDAu.js} +1 -1
- package/dist/client/assets/{index-BNDDAuFY.js → index-C1JqC4-z.js} +1 -1
- package/dist/client/assets/{index-PDe7t-Zh.js → index-Cf59DRJ6.js} +1 -1
- package/dist/client/assets/{index-Bjw9mABo.js → index-D7IIXROb.js} +2 -2
- package/dist/client/assets/{index-RUiHYhDy.js → index-DP75UHA3.js} +1 -1
- package/dist/client/assets/{index-D4HJx8LE.js → index-DTSAQq_o.js} +26 -26
- package/dist/client/assets/{index-DFbeaR6v.js → index-DU8sxbAO.js} +1 -1
- package/dist/client/assets/{index-Bdy-Zxd0.js → index-DtTftwEv.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-D6FVOZDT.js → infiniteQueryObserver-CYDDJzdR.js} +1 -1
- package/dist/client/assets/{input-B0Th2JQ1.js → input-C-zd9-6X.js} +1 -1
- package/dist/client/assets/{integration-icon-BlpgeQ99.js → integration-icon-DoWhqWe3.js} +1 -1
- package/dist/client/assets/{label-DuAMprL4.js → label-B9VSuQAr.js} +1 -1
- package/dist/client/assets/{layout-RImR4U5w.js → layout-BJjatDlM.js} +1 -1
- package/dist/client/assets/{login-BfxCAW1K.js → login-DMa1Q2q-.js} +1 -1
- package/dist/client/assets/{members-DUXCSlLM.js → members-BOugcvjA.js} +1 -1
- package/dist/client/assets/{monaco-editor-LE71GrBO.js → monaco-editor-Bo3tZIb0.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bu8i_dr0.js → monitoring-stats-row-B1bACC1V.js} +1 -1
- package/dist/client/assets/{oauth-callback-CHnueJxo.js → oauth-callback-CIypIDM5.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BqIWE2za.js → oauth-callback-ai-provider-Cx6R_dTa.js} +1 -1
- package/dist/client/assets/{onboarding-Bvfd_deQ.js → onboarding-BqheUOWx.js} +1 -1
- package/dist/client/assets/{org-layout-D8HwQgZC.js → org-layout-CZ-JkZR2.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-Dlrq-WhH.js → org-plugin-layout-BrcX-6Wg.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-FtnIU00p.js → plugin-empty-state-DrfwC6PK.js} +1 -1
- package/dist/client/assets/{plugin-header-CFqdNjHj.js → plugin-header-Dv9_QG9M.js} +1 -1
- package/dist/client/assets/{plugin-layout-BAtMOLNI.js → plugin-layout-BYLLm93H.js} +1 -1
- package/dist/client/assets/{popover-E3qdo7hr.js → popover-BcJ5dkfy.js} +1 -1
- package/dist/client/assets/{profile-D53qb-aC.js → profile-BDIFKyuQ.js} +1 -1
- package/dist/client/assets/{project-app-view-CPYOBF6b.js → project-app-view-Dmfqsj8y.js} +1 -1
- package/dist/client/assets/registry-DWmg34NR.js +2 -0
- package/dist/client/assets/{registry-layout-DDDh6l1Z.js → registry-layout-CcQfrJPf.js} +1 -1
- package/dist/client/assets/{required-auth-layout-0ZrPtRX5.js → required-auth-layout-C8vP14ZM.js} +1 -1
- package/dist/client/assets/{reset-password-CF8xZipJ.js → reset-password-Cx8pIjDB.js} +1 -1
- package/dist/client/assets/{roles-2DmhU_lO.js → roles-V2PuVErH.js} +1 -1
- package/dist/client/assets/{scroll-area-CV58Sm3r.js → scroll-area-BJTd57Y3.js} +1 -1
- package/dist/client/assets/{search-input-CiJD1zmQ.js → search-input-o1N12hd4.js} +1 -1
- package/dist/client/assets/{select-model-CgAdbxOF.js → select-model-i86p2wLu.js} +1 -1
- package/dist/client/assets/{select-C0BTO_VN.js → select-wye91jBR.js} +1 -1
- package/dist/client/assets/{settings-layout-B5g5nOFG.js → settings-layout-Bre58uB_.js} +1 -1
- package/dist/client/assets/{settings-section-BEc6_hxC.js → settings-section-C9gADeUy.js} +1 -1
- package/dist/client/assets/{shell-layout-DhVFCecl.js → shell-layout-BkODIfEq.js} +1 -1
- package/dist/client/assets/{skeleton-CqLjEim6.js → skeleton-DRv0yCtF.js} +1 -1
- package/dist/client/assets/{sso-CLQ0WAZ4.js → sso-DZp-3maq.js} +1 -1
- package/dist/client/assets/{store-DXpPzjGX.js → store-CN0vQifq.js} +1 -1
- package/dist/client/assets/store-registry-BObCKoqP.js +2 -0
- package/dist/client/assets/{switch-r_J-E_R6.js → switch-PbUvXBwc.js} +1 -1
- package/dist/client/assets/{table-BLW1fb71.js → table-Vdrlqd3N.js} +1 -1
- package/dist/client/assets/{tabs-OaMhPT1S.js → tabs-CMVGP6Nm.js} +1 -1
- package/dist/client/assets/{task-status-BYU1JOas.js → task-status-Cc80uZAM.js} +1 -1
- package/dist/client/assets/{textarea-CB4EPwI8.js → textarea-CFCCYt2a.js} +1 -1
- package/dist/client/assets/{toggle-group-BK2Eyxb9.js → toggle-group-C7CndFhA.js} +1 -1
- package/dist/client/assets/{tools-list-D0-t6r7P.js → tools-list-Kw0AITzg.js} +1 -1
- package/dist/client/assets/{types-DV1fT4jg.js → types-CfADcGn6.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DuAykeEv.js → use-ai-providers-BH0Y2Lij.js} +1 -1
- package/dist/client/assets/{use-collections-Cp0FTIw2.js → use-collections-BosUNiJP.js} +1 -1
- package/dist/client/assets/{use-connection-CwwdEwVq.js → use-connection-BHgGmTOA.js} +1 -1
- package/dist/client/assets/{use-copy-I5xIu5vL.js → use-copy-D6qOpdpT.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D9eK4uEY.js → use-create-virtual-mcp-Cx6IqxLi.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BnOlrQOP.js → use-decopilot-events-Bw4kdPRS.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DgzyKP3C.js → use-delete-connection-BNbEYahP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DVe1Fk7x.js → use-infinite-scroll-omTMTmB1.js} +1 -1
- package/dist/client/assets/{use-list-state-BK8f1wO4.js → use-list-state-BiBwgFiI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B2JuhhY2.js → use-mcp-tools-jeaH_mio.js} +1 -1
- package/dist/client/assets/{use-members-BpPuDkhN.js → use-members-BR83cmtt.js} +1 -1
- package/dist/client/assets/{use-mobile-BY3ZRSKc.js → use-mobile-CrP2KZis.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CL1nPgsu.js → use-navigate-to-agent-C3zfnZck.js} +1 -1
- package/dist/client/assets/{use-org-sso-CNjY_Yrf.js → use-org-sso-Bp80Qjb5.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DjWvKcNS.js → use-organization-roles-BV6xrqqH.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DqQLKHYU.js → use-organization-settings-qZ1AM5bR.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Du2J1Ki6.js → use-registry-connections-4TVYi7-o.js} +1 -1
- package/dist/client/assets/{use-status-sounds-9eY_nA5Y.js → use-status-sounds-DOhvVAtI.js} +1 -1
- package/dist/client/assets/{use-tasks-HeJD0lAu.js → use-tasks-Cd7MvMgt.js} +1 -1
- package/dist/client/assets/{use-view-mode-CimRH_Z1.js → use-view-mode-BtY__6eQ.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Dyx_89bN.js → use-virtual-mcp-BUyveTe6.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-c3E-w9DY.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-D705BqvF.js +1 -0
- package/dist/client/assets/{user-DwSGRsb4.js → user-DgdWVRpj.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-B7tN1U0U.js → view-mode-toggle-D2WG_Euq.js} +1 -1
- package/dist/client/assets/{workflow-BSnZsZNr.js → workflow-DRs0QH0L.js} +1 -1
- package/dist/client/assets/workflow-detail-B8_Px7_-.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/ansi-escapes/base.d.ts +307 -0
- package/dist/server/node_modules/ansi-escapes/base.js +202 -0
- package/dist/server/node_modules/ansi-escapes/index.d.ts +2 -0
- package/dist/server/node_modules/ansi-escapes/index.js +2 -0
- package/dist/server/node_modules/ansi-escapes/package.json +70 -0
- package/dist/server/node_modules/ansi-escapes/readme.md +296 -0
- package/dist/server/node_modules/ansi-regex/index.d.ts +33 -0
- package/dist/server/node_modules/ansi-regex/index.js +14 -0
- package/dist/server/node_modules/ansi-regex/license +9 -0
- package/dist/server/node_modules/ansi-regex/package.json +61 -0
- package/dist/server/node_modules/ansi-regex/readme.md +66 -0
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/license +9 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/auto-bind/index.d.ts +50 -0
- package/dist/server/node_modules/auto-bind/index.js +41 -0
- package/dist/server/node_modules/auto-bind/license +9 -0
- package/dist/server/node_modules/auto-bind/package.json +51 -0
- package/dist/server/node_modules/auto-bind/react.d.ts +26 -0
- package/dist/server/node_modules/auto-bind/react.js +28 -0
- package/dist/server/node_modules/auto-bind/readme.md +92 -0
- package/dist/server/node_modules/chalk/license +9 -0
- package/dist/server/node_modules/chalk/package.json +83 -0
- package/dist/server/node_modules/chalk/readme.md +297 -0
- package/dist/server/node_modules/chalk/source/index.d.ts +325 -0
- package/dist/server/node_modules/chalk/source/index.js +225 -0
- package/dist/server/node_modules/chalk/source/utilities.js +33 -0
- package/dist/server/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/dist/server/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/dist/server/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/dist/server/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/dist/server/node_modules/cli-cursor/index.d.ts +47 -0
- package/dist/server/node_modules/cli-cursor/index.js +39 -0
- package/dist/server/node_modules/cli-cursor/license +9 -0
- package/dist/server/node_modules/cli-cursor/package.json +49 -0
- package/dist/server/node_modules/cli-cursor/readme.md +51 -0
- package/dist/server/node_modules/cli-truncate/index.d.ts +118 -0
- package/dist/server/node_modules/cli-truncate/index.js +168 -0
- package/dist/server/node_modules/cli-truncate/license +9 -0
- package/dist/server/node_modules/cli-truncate/package.json +52 -0
- package/dist/server/node_modules/cli-truncate/readme.md +154 -0
- package/dist/server/node_modules/deepmerge/.editorconfig +7 -0
- package/dist/server/node_modules/deepmerge/.eslintcache +1 -0
- package/dist/server/node_modules/deepmerge/changelog.md +167 -0
- package/dist/server/node_modules/deepmerge/dist/cjs.js +133 -0
- package/dist/server/node_modules/deepmerge/dist/umd.js +139 -0
- package/dist/server/node_modules/deepmerge/index.d.ts +20 -0
- package/dist/server/node_modules/deepmerge/index.js +106 -0
- package/dist/server/node_modules/deepmerge/license.txt +21 -0
- package/dist/server/node_modules/deepmerge/package.json +42 -0
- package/dist/server/node_modules/deepmerge/readme.md +264 -0
- package/dist/server/node_modules/deepmerge/rollup.config.js +22 -0
- package/dist/server/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/dist/server/node_modules/emoji-regex/README.md +107 -0
- package/dist/server/node_modules/emoji-regex/index.d.ts +3 -0
- package/dist/server/node_modules/emoji-regex/index.js +4 -0
- package/dist/server/node_modules/emoji-regex/index.mjs +4 -0
- package/dist/server/node_modules/emoji-regex/package.json +45 -0
- package/dist/server/node_modules/environment/index.d.ts +74 -0
- package/dist/server/node_modules/environment/index.js +47 -0
- package/dist/server/node_modules/environment/license +9 -0
- package/dist/server/node_modules/environment/package.json +74 -0
- package/dist/server/node_modules/environment/readme.md +94 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/license +9 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/indent-string/index.d.ts +38 -0
- package/dist/server/node_modules/indent-string/index.js +38 -0
- package/dist/server/node_modules/indent-string/license +9 -0
- package/dist/server/node_modules/indent-string/package.json +40 -0
- package/dist/server/node_modules/indent-string/readme.md +73 -0
- package/dist/server/node_modules/ink/build/ansi-tokenizer.d.ts +38 -0
- package/dist/server/node_modules/ink/build/ansi-tokenizer.js +316 -0
- package/dist/server/node_modules/ink/build/ansi-tokenizer.js.map +1 -0
- package/dist/server/node_modules/ink/build/apply-styles.js +175 -0
- package/dist/server/node_modules/ink/build/build-layout.js +77 -0
- package/dist/server/node_modules/ink/build/calculate-wrapped-text.js +53 -0
- package/dist/server/node_modules/ink/build/colorize.d.ts +3 -0
- package/dist/server/node_modules/ink/build/colorize.js +48 -0
- package/dist/server/node_modules/ink/build/colorize.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.d.ts +3 -0
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.js +5 -0
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/App.d.ts +18 -0
- package/dist/server/node_modules/ink/build/components/App.js +351 -0
- package/dist/server/node_modules/ink/build/components/App.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/AppContext.d.ts +15 -0
- package/dist/server/node_modules/ink/build/components/AppContext.js +11 -0
- package/dist/server/node_modules/ink/build/components/AppContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/BackgroundContext.d.ts +4 -0
- package/dist/server/node_modules/ink/build/components/BackgroundContext.js +3 -0
- package/dist/server/node_modules/ink/build/components/BackgroundContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Box.d.ts +117 -0
- package/dist/server/node_modules/ink/build/components/Box.js +34 -0
- package/dist/server/node_modules/ink/build/components/Box.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Color.js +62 -0
- package/dist/server/node_modules/ink/build/components/Cursor.d.ts +83 -0
- package/dist/server/node_modules/ink/build/components/Cursor.js +53 -0
- package/dist/server/node_modules/ink/build/components/Cursor.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/CursorContext.d.ts +11 -0
- package/dist/server/node_modules/ink/build/components/CursorContext.js +8 -0
- package/dist/server/node_modules/ink/build/components/CursorContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.d.ts +18 -0
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.js +23 -0
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/ErrorOverview.d.ts +6 -0
- package/dist/server/node_modules/ink/build/components/ErrorOverview.js +84 -0
- package/dist/server/node_modules/ink/build/components/ErrorOverview.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/FocusContext.d.ts +16 -0
- package/dist/server/node_modules/ink/build/components/FocusContext.js +17 -0
- package/dist/server/node_modules/ink/build/components/FocusContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Newline.d.ts +13 -0
- package/dist/server/node_modules/ink/build/components/Newline.js +8 -0
- package/dist/server/node_modules/ink/build/components/Newline.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Spacer.d.ts +7 -0
- package/dist/server/node_modules/ink/build/components/Spacer.js +11 -0
- package/dist/server/node_modules/ink/build/components/Spacer.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Static.d.ts +24 -0
- package/dist/server/node_modules/ink/build/components/Static.js +28 -0
- package/dist/server/node_modules/ink/build/components/Static.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/StderrContext.d.ts +15 -0
- package/dist/server/node_modules/ink/build/components/StderrContext.js +13 -0
- package/dist/server/node_modules/ink/build/components/StderrContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/StdinContext.d.ts +22 -0
- package/dist/server/node_modules/ink/build/components/StdinContext.js +19 -0
- package/dist/server/node_modules/ink/build/components/StdinContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/StdoutContext.d.ts +15 -0
- package/dist/server/node_modules/ink/build/components/StdoutContext.js +13 -0
- package/dist/server/node_modules/ink/build/components/StdoutContext.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Text.d.ts +55 -0
- package/dist/server/node_modules/ink/build/components/Text.js +50 -0
- package/dist/server/node_modules/ink/build/components/Text.js.map +1 -0
- package/dist/server/node_modules/ink/build/components/Transform.d.ts +16 -0
- package/dist/server/node_modules/ink/build/components/Transform.js +15 -0
- package/dist/server/node_modules/ink/build/components/Transform.js.map +1 -0
- package/dist/server/node_modules/ink/build/cursor-helpers.d.ts +38 -0
- package/dist/server/node_modules/ink/build/cursor-helpers.js +56 -0
- package/dist/server/node_modules/ink/build/cursor-helpers.js.map +1 -0
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.d.ts +1 -0
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.js +65 -0
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.js.map +1 -0
- package/dist/server/node_modules/ink/build/devtools.d.ts +1 -0
- package/dist/server/node_modules/ink/build/devtools.js +11 -0
- package/dist/server/node_modules/ink/build/devtools.js.map +1 -0
- package/dist/server/node_modules/ink/build/dom.d.ts +56 -0
- package/dist/server/node_modules/ink/build/dom.js +124 -0
- package/dist/server/node_modules/ink/build/dom.js.map +1 -0
- package/dist/server/node_modules/ink/build/experimental/apply-style.js +140 -0
- package/dist/server/node_modules/ink/build/experimental/dom.js +123 -0
- package/dist/server/node_modules/ink/build/experimental/output.js +91 -0
- package/dist/server/node_modules/ink/build/experimental/reconciler.js +141 -0
- package/dist/server/node_modules/ink/build/experimental/renderer.js +81 -0
- package/dist/server/node_modules/ink/build/get-max-width.d.ts +3 -0
- package/dist/server/node_modules/ink/build/get-max-width.js +10 -0
- package/dist/server/node_modules/ink/build/get-max-width.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-app.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-app.js +8 -0
- package/dist/server/node_modules/ink/build/hooks/use-app.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-cursor.d.ts +12 -0
- package/dist/server/node_modules/ink/build/hooks/use-cursor.js +29 -0
- package/dist/server/node_modules/ink/build/hooks/use-cursor.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.d.ts +28 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js +17 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus.d.ts +29 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus.js +42 -0
- package/dist/server/node_modules/ink/build/hooks/use-focus.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-input.d.ts +131 -0
- package/dist/server/node_modules/ink/build/hooks/use-input.js +124 -0
- package/dist/server/node_modules/ink/build/hooks/use-input.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +11 -0
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-stderr.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-stderr.js +8 -0
- package/dist/server/node_modules/ink/build/hooks/use-stderr.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdin.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdin.js +8 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdin.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdout.d.ts +5 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdout.js +8 -0
- package/dist/server/node_modules/ink/build/hooks/use-stdout.js.map +1 -0
- package/dist/server/node_modules/ink/build/hooks/useInput.js +38 -0
- package/dist/server/node_modules/ink/build/index.d.ts +34 -0
- package/dist/server/node_modules/ink/build/index.js +20 -0
- package/dist/server/node_modules/ink/build/index.js.map +1 -0
- package/dist/server/node_modules/ink/build/ink.d.ts +90 -0
- package/dist/server/node_modules/ink/build/ink.js +637 -0
- package/dist/server/node_modules/ink/build/ink.js.map +1 -0
- package/dist/server/node_modules/ink/build/input-parser.d.ts +7 -0
- package/dist/server/node_modules/ink/build/input-parser.js +154 -0
- package/dist/server/node_modules/ink/build/input-parser.js.map +1 -0
- package/dist/server/node_modules/ink/build/instance.js +205 -0
- package/dist/server/node_modules/ink/build/instances.d.ts +3 -0
- package/dist/server/node_modules/ink/build/instances.js +8 -0
- package/dist/server/node_modules/ink/build/instances.js.map +1 -0
- package/dist/server/node_modules/ink/build/kitty-keyboard.d.ts +23 -0
- package/dist/server/node_modules/ink/build/kitty-keyboard.js +32 -0
- package/dist/server/node_modules/ink/build/kitty-keyboard.js.map +1 -0
- package/dist/server/node_modules/ink/build/layout.d.ts +7 -0
- package/dist/server/node_modules/ink/build/layout.js +33 -0
- package/dist/server/node_modules/ink/build/layout.js.map +1 -0
- package/dist/server/node_modules/ink/build/log-update.d.ts +19 -0
- package/dist/server/node_modules/ink/build/log-update.js +242 -0
- package/dist/server/node_modules/ink/build/log-update.js.map +1 -0
- package/dist/server/node_modules/ink/build/measure-element.d.ts +16 -0
- package/dist/server/node_modules/ink/build/measure-element.js +9 -0
- package/dist/server/node_modules/ink/build/measure-element.js.map +1 -0
- package/dist/server/node_modules/ink/build/measure-text.d.ts +6 -0
- package/dist/server/node_modules/ink/build/measure-text.js +21 -0
- package/dist/server/node_modules/ink/build/measure-text.js.map +1 -0
- package/dist/server/node_modules/ink/build/options.d.ts +52 -0
- package/dist/server/node_modules/ink/build/options.js +2 -0
- package/dist/server/node_modules/ink/build/options.js.map +1 -0
- package/dist/server/node_modules/ink/build/output.d.ts +35 -0
- package/dist/server/node_modules/ink/build/output.js +183 -0
- package/dist/server/node_modules/ink/build/output.js.map +1 -0
- package/dist/server/node_modules/ink/build/parse-keypress.d.ts +22 -0
- package/dist/server/node_modules/ink/build/parse-keypress.js +493 -0
- package/dist/server/node_modules/ink/build/parse-keypress.js.map +1 -0
- package/dist/server/node_modules/ink/build/reconciler.d.ts +4 -0
- package/dist/server/node_modules/ink/build/reconciler.js +274 -0
- package/dist/server/node_modules/ink/build/reconciler.js.map +1 -0
- package/dist/server/node_modules/ink/build/render-background.d.ts +4 -0
- package/dist/server/node_modules/ink/build/render-background.js +25 -0
- package/dist/server/node_modules/ink/build/render-background.js.map +1 -0
- package/dist/server/node_modules/ink/build/render-border.d.ts +4 -0
- package/dist/server/node_modules/ink/build/render-border.js +73 -0
- package/dist/server/node_modules/ink/build/render-border.js.map +1 -0
- package/dist/server/node_modules/ink/build/render-node-to-output.d.ts +14 -0
- package/dist/server/node_modules/ink/build/render-node-to-output.js +147 -0
- package/dist/server/node_modules/ink/build/render-node-to-output.js.map +1 -0
- package/dist/server/node_modules/ink/build/render-to-string.d.ts +38 -0
- package/dist/server/node_modules/ink/build/render-to-string.js +115 -0
- package/dist/server/node_modules/ink/build/render-to-string.js.map +1 -0
- package/dist/server/node_modules/ink/build/render.d.ts +121 -0
- package/dist/server/node_modules/ink/build/render.js +55 -0
- package/dist/server/node_modules/ink/build/render.js.map +1 -0
- package/dist/server/node_modules/ink/build/renderer.d.ts +8 -0
- package/dist/server/node_modules/ink/build/renderer.js +55 -0
- package/dist/server/node_modules/ink/build/renderer.js.map +1 -0
- package/dist/server/node_modules/ink/build/sanitize-ansi.d.ts +2 -0
- package/dist/server/node_modules/ink/build/sanitize-ansi.js +27 -0
- package/dist/server/node_modules/ink/build/sanitize-ansi.js.map +1 -0
- package/dist/server/node_modules/ink/build/screen-reader-update.d.ts +13 -0
- package/dist/server/node_modules/ink/build/screen-reader-update.js +38 -0
- package/dist/server/node_modules/ink/build/screen-reader-update.js.map +1 -0
- package/dist/server/node_modules/ink/build/squash-text-nodes.d.ts +3 -0
- package/dist/server/node_modules/ink/build/squash-text-nodes.js +36 -0
- package/dist/server/node_modules/ink/build/squash-text-nodes.js.map +1 -0
- package/dist/server/node_modules/ink/build/styles.d.ts +240 -0
- package/dist/server/node_modules/ink/build/styles.js +232 -0
- package/dist/server/node_modules/ink/build/styles.js.map +1 -0
- package/dist/server/node_modules/ink/build/utils.d.ts +2 -0
- package/dist/server/node_modules/ink/build/utils.js +4 -0
- package/dist/server/node_modules/ink/build/utils.js.map +1 -0
- package/dist/server/node_modules/ink/build/wrap-text.d.ts +3 -0
- package/dist/server/node_modules/ink/build/wrap-text.js +31 -0
- package/dist/server/node_modules/ink/build/wrap-text.js.map +1 -0
- package/dist/server/node_modules/ink/build/write-synchronized.d.ts +4 -0
- package/dist/server/node_modules/ink/build/write-synchronized.js +7 -0
- package/dist/server/node_modules/ink/build/write-synchronized.js.map +1 -0
- package/dist/server/node_modules/ink/license +10 -0
- package/dist/server/node_modules/ink/package.json +201 -0
- package/dist/server/node_modules/ink/readme.md +2636 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/is-in-ci/cli.js +5 -0
- package/dist/server/node_modules/is-in-ci/index.d.ts +15 -0
- package/dist/server/node_modules/is-in-ci/index.js +7 -0
- package/dist/server/node_modules/is-in-ci/license +9 -0
- package/dist/server/node_modules/is-in-ci/package.json +49 -0
- package/dist/server/node_modules/is-in-ci/readme.md +44 -0
- package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
- package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
- package/dist/server/node_modules/is-unicode-supported/license +9 -0
- package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
- package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
- package/dist/server/node_modules/onetime/index.d.ts +64 -0
- package/dist/server/node_modules/onetime/index.js +44 -0
- package/dist/server/node_modules/onetime/license +9 -0
- package/dist/server/node_modules/onetime/package.json +43 -0
- package/dist/server/node_modules/onetime/readme.md +94 -0
- package/dist/server/node_modules/patch-console/dist/index.d.ts +4 -0
- package/dist/server/node_modules/patch-console/dist/index.js +45 -0
- package/dist/server/node_modules/patch-console/dist/index.js.map +1 -0
- package/dist/server/node_modules/patch-console/license +9 -0
- package/dist/server/node_modules/patch-console/package.json +53 -0
- package/dist/server/node_modules/patch-console/readme.md +62 -0
- package/dist/server/node_modules/{pg → react-reconciler}/LICENSE +1 -1
- package/dist/server/node_modules/react-reconciler/README.md +353 -0
- package/dist/server/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js +19 -0
- package/dist/server/node_modules/react-reconciler/cjs/react-reconciler-constants.production.js +18 -0
- package/dist/server/node_modules/react-reconciler/cjs/react-reconciler-reflection.development.js +394 -0
- package/dist/server/node_modules/react-reconciler/cjs/react-reconciler-reflection.production.js +382 -0
- package/dist/server/node_modules/react-reconciler/cjs/react-reconciler.development.js +19736 -0
- package/dist/server/node_modules/react-reconciler/cjs/react-reconciler.production.js +11594 -0
- package/dist/server/node_modules/react-reconciler/cjs/react-reconciler.profiling.js +13427 -0
- package/dist/server/node_modules/react-reconciler/constants.js +7 -0
- package/dist/server/node_modules/react-reconciler/index.js +7 -0
- package/dist/server/node_modules/react-reconciler/package.json +34 -0
- package/dist/server/node_modules/react-reconciler/reflection.js +7 -0
- package/dist/server/node_modules/restore-cursor/index.d.ts +11 -0
- package/dist/server/node_modules/restore-cursor/index.js +11 -0
- package/dist/server/node_modules/restore-cursor/license +9 -0
- package/dist/server/node_modules/restore-cursor/package.json +55 -0
- package/dist/server/node_modules/restore-cursor/readme.md +31 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/node_modules/string-width/index.d.ts +39 -0
- package/dist/server/node_modules/string-width/index.js +82 -0
- package/dist/server/node_modules/string-width/license +9 -0
- package/dist/server/node_modules/string-width/package.json +64 -0
- package/dist/server/node_modules/string-width/readme.md +66 -0
- package/dist/server/node_modules/terminal-size/index.d.ts +17 -0
- package/dist/server/node_modules/terminal-size/index.js +139 -0
- package/dist/server/node_modules/terminal-size/license +9 -0
- package/dist/server/node_modules/terminal-size/package.json +49 -0
- package/dist/server/node_modules/terminal-size/readme.md +32 -0
- package/dist/server/node_modules/widest-line/index.d.ts +12 -0
- package/dist/server/node_modules/widest-line/index.js +11 -0
- package/dist/server/node_modules/widest-line/license +9 -0
- package/dist/server/node_modules/widest-line/package.json +60 -0
- package/dist/server/node_modules/widest-line/readme.md +26 -0
- package/dist/server/node_modules/wrap-ansi/index.d.ts +41 -0
- package/dist/server/node_modules/wrap-ansi/index.js +222 -0
- package/dist/server/node_modules/wrap-ansi/license +9 -0
- package/dist/server/node_modules/wrap-ansi/package.json +69 -0
- package/dist/server/node_modules/wrap-ansi/readme.md +75 -0
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/xtend/LICENSE +20 -0
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/dist/server/node_modules/yoga-layout/README.md +40 -0
- package/dist/server/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js +75 -0
- package/dist/server/node_modules/yoga-layout/dist/src/generated/YGEnums.d.ts +189 -0
- package/dist/server/node_modules/yoga-layout/dist/src/generated/YGEnums.js +211 -0
- package/dist/server/node_modules/yoga-layout/dist/src/generated/YGEnums.js.map +1 -0
- package/dist/server/node_modules/yoga-layout/dist/src/index.d.ts +12 -0
- package/dist/server/node_modules/yoga-layout/dist/src/index.js +16 -0
- package/dist/server/node_modules/yoga-layout/dist/src/index.js.map +1 -0
- package/dist/server/node_modules/yoga-layout/dist/src/load.d.ts +11 -0
- package/dist/server/node_modules/yoga-layout/dist/src/load.js +17 -0
- package/dist/server/node_modules/yoga-layout/dist/src/load.js.map +1 -0
- package/dist/server/node_modules/yoga-layout/dist/src/wrapAssembly.d.ts +155 -0
- package/dist/server/node_modules/yoga-layout/dist/src/wrapAssembly.js +125 -0
- package/dist/server/node_modules/yoga-layout/dist/src/wrapAssembly.js.map +1 -0
- package/dist/server/node_modules/yoga-layout/package.json +53 -0
- package/dist/server/node_modules/yoga-layout/src/Config.cpp +54 -0
- package/dist/server/node_modules/yoga-layout/src/Config.h +44 -0
- package/dist/server/node_modules/yoga-layout/src/Layout.h +19 -0
- package/dist/server/node_modules/yoga-layout/src/Node.cpp +507 -0
- package/dist/server/node_modules/yoga-layout/src/Node.h +239 -0
- package/dist/server/node_modules/yoga-layout/src/Size.h +17 -0
- package/dist/server/node_modules/yoga-layout/src/Value.h +23 -0
- package/dist/server/node_modules/yoga-layout/src/embind.cpp +207 -0
- package/dist/server/node_modules/yoga-layout/src/generated/YGEnums.ts +210 -0
- package/dist/server/node_modules/yoga-layout/src/index.ts +23 -0
- package/dist/server/node_modules/yoga-layout/src/load.ts +25 -0
- package/dist/server/node_modules/yoga-layout/src/wrapAssembly.ts +336 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-D-IR9UZj.js +0 -1
- package/dist/client/assets/registry-RhRTyf-3.js +0 -2
- package/dist/client/assets/store-registry-Fp0RwcQv.js +0 -2
- package/dist/client/assets/useInfiniteQuery-ch_R3hWu.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BU66AZeq.js +0 -1
- package/dist/client/assets/workflow-detail-DR2tbuTB.js +0 -1
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
- package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
- package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
- package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
- package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
- /package/dist/server/node_modules/{get-east-asian-width → ansi-escapes}/license +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as Ke,y as te,e as b,j as t,E as Te,r as C,s as le,x as Ge,c as U,aX as Qe,aY as Xe,l as ie,d as Ye,ay as G,B as q,z as Ze,g as ae,aZ as ke}from"./index-Bjw9mABo.js";import{E as Pe}from"./empty-state-BNoYs1pG.js";import{u as et,a as Ee}from"./use-collections-Cp0FTIw2.js";import{u as ce}from"./constants-fisX-szF.js";import{a as se,F as tt,b as de,d as me}from"./form-B9N1Oecs.js";import{I as ue}from"./input-B0Th2JQ1.js";import{T as re}from"./textarea-CB4EPwI8.js";import{a as st,b as nt,V as xe}from"./layout-RImR4U5w.js";import{S as ot,W as rt,a as lt}from"./index-nPLW8S1n.js";import{g as it,M as at,b as je}from"./types-DV1fT4jg.js";import{a as be,c as Ne,d as ve,S as Se,b as ne}from"./select-C0BTO_VN.js";import{T as ct,c as ye,a as we,b as Ce}from"./use-mobile-BY3ZRSKc.js";import{i as dt}from"./AlertCircle-Dy6WQ5ge.js";import{L as mt,N as ut,U as xt,V as pt,W as ft,X as Ie}from"./agent-icon-CPrrz1CF.js";import{f as ht}from"./XCircle-D7CLzAA2.js";import{i as gt}from"./Play-B-Yf_e00.js";import{i as jt}from"./ChevronRight-CYmVBoc2.js";import{O as bt,M as Nt}from"./index-RUiHYhDy.js";import{g as vt}from"./connection-slug-eyAPH6o3.js";import{u as St,T as yt}from"./tools-list-D0-t6r7P.js";import{b as _e,u as Ae}from"./use-connection-CwwdEwVq.js";import{b as wt}from"./use-mcp-tools-B2JuhhY2.js";import{c as Ct}from"./content-blocks-o63cs2vh.js";import{I as $e}from"./integration-icon-BlpgeQ99.js";import{a as It,g as $t}from"./chat-context-BM3OkNBp.js";import{u as Tt}from"./shell-layout-DhVFCecl.js";import{M as kt}from"./monaco-editor-LE71GrBO.js";import{E as Pt}from"./empty-state-7OQh5AG_.js";import{n as Et}from"./Container-9mToJ-Hm.js";import"./label-DuAMprL4.js";import"./index-DFbeaR6v.js";import"./X-Cz2VwWbK.js";import"./index-CdcT6o1u.js";import"./collections-uRCOIhF1.js";import"./index-PDe7t-Zh.js";import"./use-virtual-mcp-Dyx_89bN.js";import"./accordion-BM20EgNo.js";import"./scroll-area-CV58Sm3r.js";import"./badge-C3ltiwQz.js";import"./view-mode-toggle-B7tN1U0U.js";import"./dialog-DgIfLmkz.js";import"./dropdown-menu-CpKKd4KR.js";import"./ChevronDown-BjTzGWO3.js";import"./DotsVertical-CbfHiscK.js";import"./Plus-C4wuRIjK.js";import"./Tool01-CzK8v2e2.js";import"./XClose-xVgTKp3y.js";import"./index-Bdy-Zxd0.js";import"./create-sse-subscription-CxkOgzKf.js";import"./ChevronUp-Cw4IUx4c.js";import"./RefreshCcw01-KsYBIYgq.js";import"./ArrowNarrowLeft-DyXfpAXl.js";import"./ArrowUpRight-CnIoXxER.js";import"./ZapSquare-DAasimGP.js";import"./Users03-DQHeHtuJ.js";import"./CheckCircle-BZH7SpHU.js";import"./Star01-BRTO8Wcg.js";import"./Palette-6WmqQOED.js";import"./SearchMd-BhWG7TtE.js";import"./LinkExternal01-Kt8lGWbQ.js";import"./Lock01-BhhALBsJ.js";import"./Sun-DD9THIbp.js";import"./Settings02-C0B8JYoO.js";import"./Shield01-vr0RTpPH.js";import"./Trash01-Cqpb-tl4.js";import"./User01-CHqQvVRk.js";import"./Zap-eM4vJ-Od.js";import"./extract-connection-data-C1fjt67g.js";import"./constants-BXPLSYK0.js";import"./use-registry-connections-Du2J1Ki6.js";import"./use-organization-settings-DqQLKHYU.js";import"./index-B1ENCl_P.js";import"./popover-E3qdo7hr.js";import"./use-create-virtual-mcp-D9eK4uEY.js";import"./use-navigate-to-agent-CL1nPgsu.js";import"./use-ai-providers-DuAykeEv.js";import"./use-decopilot-events-BnOlrQOP.js";import"./use-tasks-HeJD0lAu.js";import"./required-auth-layout-0ZrPtRX5.js";import"./use-org-sso-CNjY_Yrf.js";Ke({title:te().min(1),description:te().nullable(),body:te()});function oe(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function _t(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function At(s){const e=b.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let r;e[1]!==o.control?(r=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(se,{control:o.control,name:"title",render:Dt}),t.jsx(se,{control:o.control,name:"description",render:Rt})]})]}),e[1]=o.control,e[2]=r):r=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),i=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,i,t.jsx(se,{control:o.control,name:"body",render:Ot})]}),e[5]=o.control,e[6]=c):c=e[6];let a;e[7]!==r||e[8]!==c?(a=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[r,c]}),e[7]=r,e[8]=c,e[9]=a):a=e[9];let x;return e[10]!==o||e[11]!==a?(x=t.jsx(tt,{...o,children:a}),e[10]=o,e[11]=a,e[12]=x):x=e[12],x}function Ot(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Rt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Mt(s){const e=b.c(35),{providerId:o,promptId:n}=s,{org:r}=le(),l=o||null;let i;e[0]!==r.id||e[1]!==l?(i={connectionId:l,orgId:r.id},e[0]=r.id,e[1]=l,e[2]=i):i=e[2];const c=ce(i),a=et(o,"PROMPT",n,c),x=Ee(o,"PROMPT",c),f=x.update.isPending;let u;e[3]!==a?(u=a?{title:a.title,description:a.description??null,body:oe(a)}:void 0,e[3]=a,e[4]=u):u=e[4];let h;e[5]!==u?(h={values:u},e[5]=u,e[6]=h):h=e[6];const N=Ge(h);let T;e[7]!==N||e[8]!==a?(T=()=>{a&&N.reset({title:a.title,description:a.description??null,body:oe(a)})},e[7]=N,e[8]=a,e[9]=T):T=e[9];const _=T;let A;e[10]!==x.update||e[11]!==N||e[12]!==n?(A=N.handleSubmit(async v=>{const P=await x.update.mutateAsync({id:n,data:{title:v.title,description:v.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:v.body}}]}});N.reset({title:P.title,description:P.description??null,body:oe(P)})}),e[10]=x.update,e[11]=N,e[12]=n,e[13]=A):A=e[13];const O=A;if(!a){let v;return e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=v):v=e[14],v}let y;e[15]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[15]=a.title,e[16]=y):y=e[16];let k;e[17]!==a.description?(k=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[17]=a.description,e[18]=k):k=e[18];let I;e[19]!==y||e[20]!==k?(I=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,k]})}),e[19]=y,e[20]=k,e[21]=I):I=e[21];let g;e[22]!==O?(g=()=>{O()},e[22]=O,e[23]=g):g=e[23];let S;e[24]!==N.formState.isDirty||e[25]!==f||e[26]!==_||e[27]!==g?(S=t.jsx(st,{children:t.jsx(ot,{onSave:g,onUndo:_,isDirty:N.formState.isDirty,isSaving:f})}),e[24]=N.formState.isDirty,e[25]=f,e[26]=_,e[27]=g,e[28]=S):S=e[28];let w;e[29]!==N?(w=t.jsx("div",{className:"h-full",children:t.jsx(At,{form:N})}),e[29]=N,e[30]=w):w=e[30];let $;return e[31]!==S||e[32]!==w||e[33]!==I?($=t.jsxs(xe,{children:[I,S,w]}),e[31]=S,e[32]=w,e[33]=I,e[34]=$):$=e[34],$}function zt(s){const e=b.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=_t(),e[0]=n):n=e[0];const r=n;if(!r){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=i):i=e[1],i}let l;return e[2]!==o?(l=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:r,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}const Ut=Qe("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Lt(s){const e=b.c(10);let o,n,r;e[0]!==s?({className:o,variant:r,...n}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==o||e[5]!==r?(l=U(Ut({variant:r}),o),e[4]=o,e[5]=r,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=t.jsx("div",{"data-slot":"alert",role:"alert",className:l,...n}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function Vt(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("line-clamp-1 min-h-4 font-medium tracking-tight",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-title",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Bt(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("text-muted-foreground leading-relaxed",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-description",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Oe(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("min-w-0 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Re(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function J(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Q(s){const e=b.c(10);let o,n,r;e[0]!==s?({asChild:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);const l=o?Xe:"a";let i;e[4]!==n?(i=U("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=i):i=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==i?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:i,...r}),e[6]=l,e[7]=r,e[8]=i,e[9]=c):c=e[9],c}function De(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("text-foreground font-medium truncate",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function X(s){const e=b.c(12);let o,n,r;e[0]!==s?({children:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==n?(l=U("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let i;e[6]!==o?(i=o??t.jsx(jt,{}),e[6]=o,e[7]=i):i=e[7];let c;return e[8]!==r||e[9]!==l||e[10]!==i?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...r,children:i}),e[8]=r,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}const Ft=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Jt(s){const e=b.c(11),{toolName:o,connectionId:n,siblings:r,onSelectInstance:l,onBack:i}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const a=St(c);if(!a.isAuthenticated){let u;return e[2]!==a.supportsOAuth||e[3]!==i?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(bt,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):t.jsx(Nt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=i,e[4]=u):u=e[4],u}const x=`${n}:${o}`;let f;return e[5]!==n||e[6]!==l||e[7]!==r||e[8]!==x||e[9]!==o?(f=t.jsx(Wt,{toolName:o,connectionId:n,siblings:r,onSelectInstance:l},x),e[5]=n,e[6]=l,e[7]=r,e[8]=x,e[9]=o,e[10]=f):f=e[10],f}function Wt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:r}=Ye({strict:!1}),l=(()=>{if(!r)return null;const d=`replay-${r}`,m=sessionStorage.getItem(d);if(!m)return null;sessionStorage.removeItem(d);try{return JSON.parse(m)}catch{return null}})(),i=(()=>{if(!l)return null;const d={};for(const[m,j]of Object.entries(l))j!==null&&typeof j=="object"?d[m]=JSON.stringify(j,null,2):d[m]=j;return d})(),[c,a]=C.useState(i??{}),[x,f]=C.useState(l?JSON.stringify(l,null,2):"{}"),[u,h]=C.useState(null),[N,T]=C.useState(null),[_,A]=C.useState(null),[O,y]=C.useState(null),[k,I]=C.useState(!1),[g,S]=C.useState(null),{org:w}=le(),$=_e(e),{sendMessage:v}=It(),P=$t(),{setChatOpen:L}=Tt(),M=`${e}:${s}`,R=ce({connectionId:e,orgId:w.id}),z=wt({client:R}),p=z.data?.tools?.find(d=>d.name===s),E=it(p?._meta),V=d=>{const m=Ct(d.content);m.content.length>0&&(L(!0),v({tiptapDoc:m}))},[D,Y]=C.useState("json"),[Me,ze]=C.useState(!1);E&&!Me&&(Y("ui"),ze(!0));const pe=p?.inputSchema?.properties,fe=pe?Object.keys(pe):[],W=fe.length>0,H={};if(W&&p?.inputSchema?.properties)for(const d of fe)H[d]=p.inputSchema.required?.includes(d)?"":void 0;const Z=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{I(!0),y(null),h(null),T(null),A(null),S(null);const d=performance.now();try{if(!R)throw new Error("MCP client is not available");const m=W?{...H,...c}:(()=>{const B=x.trim();if(!B)return{};const F=JSON.parse(B);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();W&&p?.inputSchema?.properties&&Object.entries(p.inputSchema.properties).forEach(([B,F])=>{if((F.type==="object"||F.type==="array")&&typeof m[B]=="string")try{m[B]=JSON.parse(m[B])}catch{}});const j=await R.callTool({name:s,arguments:m}),K=j.structuredContent??j,We=performance.now(),qe=Math.round(We-d);h(K),T(j),A(m);const He=JSON.stringify(K),ge=new TextEncoder().encode(He).length;S({duration:`${qe}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(m){const j=m instanceof Error?m.message:String(m);y(j||"Unknown error occurred");const K=performance.now();S({duration:`${Math.round(K-d)}ms`})}finally{I(!1)}},ee=(d,m)=>{a(j=>({...j,[d]:m}))},Le=()=>{h(null),T(null),A(null),y(null),S(null)},Ve=p?.name??Ft(s),Be=t.jsx(Oe,{children:t.jsxs(Re,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:w.slug},children:"Connections"})})}),t.jsx(X,{}),$&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:w.slug,appSlug:vt($)},search:{tab:"tools"},children:$.title})})}),t.jsx(X,{})]}),t.jsx(J,{children:t.jsx(De,{children:Ve})})]})}),he=o.length>1&&t.jsxs(be,{value:e,onValueChange:n,children:[t.jsx(Ne,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ve,{})}),t.jsx(Se,{children:o.map(d=>t.jsx(ne,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx($e,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Fe=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),p?.inputSchema?.required&&p.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:W&&p?.inputSchema?.properties?Object.entries(p.inputSchema.properties).map(([d,m])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,p.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:m.type})]}),m.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:m.description}),m.type==="object"||m.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:Z(d)?c[d]??"":H[d]??"",onChange:j=>ee(d,j.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):m.type==="boolean"?t.jsxs(be,{value:Z(d)?String(c[d]??""):"",onValueChange:j=>ee(d,j==="true"),children:[t.jsx(Ne,{children:t.jsx(ve,{placeholder:"Select true or false..."})}),t.jsxs(Se,{children:[t.jsx(ne,{value:"true",children:"true"}),t.jsx(ne,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:Z(d)?c[d]??"":H[d]??"",onChange:j=>ee(d,j.target.value),placeholder:`Enter ${d}...`})]},d)):p?.inputSchema&&!W?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:d=>f(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:k?t.jsxs(q,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Le,children:[t.jsx(mt,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(q,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(gt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),Je=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[g&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.duration})]}),g.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.tokens})]}),g.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.bytes})]}),g.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:g.cost})})]}),E&&t.jsx(ct,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Y("ui"),children:t.jsx(ft,{size:14})})}),t.jsx(Ce,{children:"Interactive view"})]}),t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Y("json"),children:t.jsx(Ie,{size:14})})}),t.jsx(Ce,{children:"JSON view"})]})]})})]})]}),O&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(Lt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(dt,{className:"h-4 w-4"}),t.jsx(Vt,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(Bt,{className:"text-xs text-destructive",children:O})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:E&&D==="ui"&&R?t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(at,{resourceURI:E,toolInfo:p?{tool:p}:void 0,toolInput:_??void 0,toolResult:N??void 0,displayMode:"fullscreen",minHeight:je.view.minHeight,maxHeight:je.view.maxHeight,client:R,onMessage:V,onUpdateModelContext:d=>P?.setAppContext(M,d),onTeardown:()=>P?.clearAppContext(M),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(kt,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(q,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(ht,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ie,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Be,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx($e,{icon:$?.icon||null,name:$?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[z.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):z.isLoading?t.jsx(ie,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:z.isSuccess?"ready":z.isLoading?"connecting":"error"})]}),t.jsx(yt,{annotations:p?.annotations,_meta:p?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Fe}),Je]})})]})})}function qt(s){const e=b.c(10),{itemId:o,siblings:n,onBack:r}=s,[l,i]=C.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(h=>h.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const a=c;if(!_e(a||void 0)||!a){let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=h):h=e[3],h}let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=f):f=e[4];let u;return e[5]!==a||e[6]!==r||e[7]!==n||e[8]!==o?(u=t.jsx(C.Suspense,{fallback:f,children:t.jsx(Jt,{toolName:o,connectionId:a,siblings:n,onSelectInstance:i,onBack:r})}),e[5]=a,e[6]=r,e[7]=n,e[8]=o,e[9]=u):u=e[9],u}const Ht={workflow:lt,workflow_execution:rt,prompt:zt};function Kt(){const s=b.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const i=Ae(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const a=c,x=Gt;let f;return s[5]!==a||s[6]!==r||s[7]!==i?(f=t.jsx(qt,{itemId:r,siblings:i,onBack:a,onUpdate:x}),s[5]=a,s[6]=r,s[7]=i,s[8]=f):f=s[8],f}async function Gt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Xt(){const s=b.c(40),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let i;s[1]!==e.history?(i=()=>{e.history.back()},s[1]=e.history,s[2]=i):i=s[2];const c=i,{org:a}=le();let x;s[3]!==n.appSlug?(x={slug:n.appSlug},s[3]=n.appSlug,s[4]=x):x=s[4];const u=Ae(x)[0]??null,h=u?.id??"",N=h||"no-connection",T=h??null;let _;s[5]!==a.id||s[6]!==T?(_={connectionId:T,orgId:a.id},s[5]=a.id,s[6]=T,s[7]=_):_=s[7];const A=ce(_),O=Ee(N,r,A);let y;s[8]!==O||s[9]!==l?(y=async D=>{l&&await O.update.mutateAsync({id:l,data:D})},s[8]=O,s[9]=l,s[10]=y):y=s[10];const k=y;let I;s[11]!==r?(I=r?.toLowerCase(),s[11]=r,s[12]=I):I=s[12];const g=I,S=g&&Ht[g];let w;s[13]!==r?(w=Qt(r),s[13]=r,s[14]=w):w=s[14];const $=w;let v;s[15]!==a.slug?(v=t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[15]=a.slug,s[16]=v):v=s[16];let P;s[17]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(X,{}),s[17]=P):P=s[17];let L;s[18]!==r||s[19]!==u||s[20]!==a.slug||s[21]!==n.appSlug?(L=u&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:n.appSlug},search:{tab:r},children:u.title})})}),t.jsx(X,{})]}),s[18]=r,s[19]=u,s[20]=a.slug,s[21]=n.appSlug,s[22]=L):L=s[22];let M;s[23]!==$?(M=t.jsx(J,{children:t.jsx(De,{children:$})}),s[23]=$,s[24]=M):M=s[24];let R;s[25]!==L||s[26]!==M||s[27]!==v?(R=t.jsx(Oe,{children:t.jsxs(Re,{children:[v,P,L,M]})}),s[25]=L,s[26]=M,s[27]=v,s[28]=R):R=s[28];const z=R;if(S){let D;return s[29]!==S||s[30]!==c||s[31]!==k||s[32]!==l?(D=t.jsx(S,{itemId:l,onBack:c,onUpdate:k}),s[29]=S,s[30]=c,s[31]=k,s[32]=l,s[33]=D):D=s[33],D}let p;s[34]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Et,{size:36,className:"text-muted-foreground"}),s[34]=p):p=s[34];let E;s[35]!==c?(E=t.jsx(Pt,{icon:p,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[35]=c,s[36]=E):E=s[36];let V;return s[37]!==z||s[38]!==E?(V=t.jsx(xe,{breadcrumb:z,children:E}),s[37]=z,s[38]=E,s[39]=V):V=s[39],V}function Yt(){const s=b.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let i;return s[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Kt,{}),s[1]=i):i=s[1],i}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Xt,{}),s[2]=l):l=s[2],l}function In(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{In as default};
|
|
1
|
+
import{v as Ke,y as te,e as b,j as t,E as Te,r as C,s as le,x as Ge,c as U,aX as Qe,aY as Xe,l as ie,d as Ye,ay as G,B as q,z as Ze,g as ae,aZ as ke}from"./index-D7IIXROb.js";import{E as Pe}from"./empty-state-KsHmVPO4.js";import{u as et,a as Ee}from"./use-collections-BosUNiJP.js";import{u as ce}from"./constants-fZUl7A6B.js";import{a as se,F as tt,b as de,d as me}from"./form-Bt1yLlZE.js";import{I as ue}from"./input-C-zd9-6X.js";import{T as re}from"./textarea-CFCCYt2a.js";import{a as st,b as nt,V as xe}from"./layout-BJjatDlM.js";import{S as ot,W as rt,a as lt}from"./index-BdMwcoDn.js";import{g as it,M as at,b as je}from"./types-CfADcGn6.js";import{a as be,c as Ne,d as ve,S as Se,b as ne}from"./select-wye91jBR.js";import{T as ct,c as ye,a as we,b as Ce}from"./use-mobile-CrP2KZis.js";import{i as dt}from"./AlertCircle-BKpPv_ue.js";import{L as mt,N as ut,U as xt,V as pt,W as ft,X as Ie}from"./agent-icon-Dhv8pT4N.js";import{f as ht}from"./XCircle-BJ-0U-0t.js";import{i as gt}from"./Play-CwsBegSF.js";import{i as jt}from"./ChevronRight-DJnGkhn4.js";import{O as bt,M as Nt}from"./index-DP75UHA3.js";import{g as vt}from"./connection-slug-eyAPH6o3.js";import{u as St,T as yt}from"./tools-list-Kw0AITzg.js";import{b as _e,u as Ae}from"./use-connection-BHgGmTOA.js";import{b as wt}from"./use-mcp-tools-jeaH_mio.js";import{c as Ct}from"./content-blocks-o63cs2vh.js";import{I as $e}from"./integration-icon-DoWhqWe3.js";import{a as It,g as $t}from"./chat-context-BgLXGROj.js";import{u as Tt}from"./shell-layout-BkODIfEq.js";import{M as kt}from"./monaco-editor-Bo3tZIb0.js";import{E as Pt}from"./empty-state-Ce0UFiAd.js";import{n as Et}from"./Container-CCq3u0Gk.js";import"./label-B9VSuQAr.js";import"./index-DU8sxbAO.js";import"./X-BDxrsCdA.js";import"./index-B5IXTINZ.js";import"./collections-BmZbVrT4.js";import"./index-Cf59DRJ6.js";import"./use-virtual-mcp-BUyveTe6.js";import"./accordion-eGw-yxkH.js";import"./scroll-area-BJTd57Y3.js";import"./badge-arNIH4S4.js";import"./view-mode-toggle-D2WG_Euq.js";import"./dialog-CfIcbBij.js";import"./dropdown-menu-Cye9zjaV.js";import"./ChevronDown-DgrWziJW.js";import"./DotsVertical-om3rzQE9.js";import"./Plus-CnK1SC2T.js";import"./Tool01-X8GEQ_TP.js";import"./XClose-Bl-2e8QV.js";import"./index-DtTftwEv.js";import"./create-sse-subscription-CxkOgzKf.js";import"./ChevronUp-CYzPfn3Y.js";import"./RefreshCcw01-DESLbhAD.js";import"./ArrowNarrowLeft-DzI4-MMz.js";import"./ArrowUpRight-CgoB9CSG.js";import"./ZapSquare-Ddm4Ccl_.js";import"./Users03-BD0tlSQu.js";import"./CheckCircle-_hRmcUCr.js";import"./Star01-CWHB1ChF.js";import"./Palette-CN1aN7Xh.js";import"./SearchMd-DlfhE_5j.js";import"./LinkExternal01-DbNOYo2d.js";import"./Lock01-BsLK0x7P.js";import"./Sun-1aZYqU86.js";import"./Settings02-LVlkEIxI.js";import"./Shield01-DGTwcXqp.js";import"./Trash01-CIUqVsqV.js";import"./User01-Dds7lT_Z.js";import"./Zap-B3a3OZUG.js";import"./extract-connection-data-C_Q81cim.js";import"./constants-CBodG1Pl.js";import"./use-registry-connections-4TVYi7-o.js";import"./use-organization-settings-qZ1AM5bR.js";import"./index-BqvsnDAu.js";import"./popover-BcJ5dkfy.js";import"./use-create-virtual-mcp-Cx6IqxLi.js";import"./use-navigate-to-agent-C3zfnZck.js";import"./use-ai-providers-BH0Y2Lij.js";import"./use-decopilot-events-Bw4kdPRS.js";import"./use-tasks-Cd7MvMgt.js";import"./required-auth-layout-C8vP14ZM.js";import"./use-org-sso-Bp80Qjb5.js";Ke({title:te().min(1),description:te().nullable(),body:te()});function oe(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function _t(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function At(s){const e=b.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let r;e[1]!==o.control?(r=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(se,{control:o.control,name:"title",render:Dt}),t.jsx(se,{control:o.control,name:"description",render:Rt})]})]}),e[1]=o.control,e[2]=r):r=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),i=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,i,t.jsx(se,{control:o.control,name:"body",render:Ot})]}),e[5]=o.control,e[6]=c):c=e[6];let a;e[7]!==r||e[8]!==c?(a=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[r,c]}),e[7]=r,e[8]=c,e[9]=a):a=e[9];let x;return e[10]!==o||e[11]!==a?(x=t.jsx(tt,{...o,children:a}),e[10]=o,e[11]=a,e[12]=x):x=e[12],x}function Ot(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Rt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Mt(s){const e=b.c(35),{providerId:o,promptId:n}=s,{org:r}=le(),l=o||null;let i;e[0]!==r.id||e[1]!==l?(i={connectionId:l,orgId:r.id},e[0]=r.id,e[1]=l,e[2]=i):i=e[2];const c=ce(i),a=et(o,"PROMPT",n,c),x=Ee(o,"PROMPT",c),f=x.update.isPending;let u;e[3]!==a?(u=a?{title:a.title,description:a.description??null,body:oe(a)}:void 0,e[3]=a,e[4]=u):u=e[4];let h;e[5]!==u?(h={values:u},e[5]=u,e[6]=h):h=e[6];const N=Ge(h);let T;e[7]!==N||e[8]!==a?(T=()=>{a&&N.reset({title:a.title,description:a.description??null,body:oe(a)})},e[7]=N,e[8]=a,e[9]=T):T=e[9];const _=T;let A;e[10]!==x.update||e[11]!==N||e[12]!==n?(A=N.handleSubmit(async v=>{const P=await x.update.mutateAsync({id:n,data:{title:v.title,description:v.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:v.body}}]}});N.reset({title:P.title,description:P.description??null,body:oe(P)})}),e[10]=x.update,e[11]=N,e[12]=n,e[13]=A):A=e[13];const O=A;if(!a){let v;return e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=v):v=e[14],v}let y;e[15]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[15]=a.title,e[16]=y):y=e[16];let k;e[17]!==a.description?(k=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[17]=a.description,e[18]=k):k=e[18];let I;e[19]!==y||e[20]!==k?(I=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,k]})}),e[19]=y,e[20]=k,e[21]=I):I=e[21];let g;e[22]!==O?(g=()=>{O()},e[22]=O,e[23]=g):g=e[23];let S;e[24]!==N.formState.isDirty||e[25]!==f||e[26]!==_||e[27]!==g?(S=t.jsx(st,{children:t.jsx(ot,{onSave:g,onUndo:_,isDirty:N.formState.isDirty,isSaving:f})}),e[24]=N.formState.isDirty,e[25]=f,e[26]=_,e[27]=g,e[28]=S):S=e[28];let w;e[29]!==N?(w=t.jsx("div",{className:"h-full",children:t.jsx(At,{form:N})}),e[29]=N,e[30]=w):w=e[30];let $;return e[31]!==S||e[32]!==w||e[33]!==I?($=t.jsxs(xe,{children:[I,S,w]}),e[31]=S,e[32]=w,e[33]=I,e[34]=$):$=e[34],$}function zt(s){const e=b.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=_t(),e[0]=n):n=e[0];const r=n;if(!r){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=i):i=e[1],i}let l;return e[2]!==o?(l=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:r,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}const Ut=Qe("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Lt(s){const e=b.c(10);let o,n,r;e[0]!==s?({className:o,variant:r,...n}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==o||e[5]!==r?(l=U(Ut({variant:r}),o),e[4]=o,e[5]=r,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=t.jsx("div",{"data-slot":"alert",role:"alert",className:l,...n}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function Vt(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("line-clamp-1 min-h-4 font-medium tracking-tight",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-title",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Bt(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("text-muted-foreground leading-relaxed",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-description",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Oe(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("min-w-0 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Re(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function J(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Q(s){const e=b.c(10);let o,n,r;e[0]!==s?({asChild:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);const l=o?Xe:"a";let i;e[4]!==n?(i=U("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=i):i=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==i?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:i,...r}),e[6]=l,e[7]=r,e[8]=i,e[9]=c):c=e[9],c}function De(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("text-foreground font-medium truncate",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function X(s){const e=b.c(12);let o,n,r;e[0]!==s?({children:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==n?(l=U("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let i;e[6]!==o?(i=o??t.jsx(jt,{}),e[6]=o,e[7]=i):i=e[7];let c;return e[8]!==r||e[9]!==l||e[10]!==i?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...r,children:i}),e[8]=r,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}const Ft=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Jt(s){const e=b.c(11),{toolName:o,connectionId:n,siblings:r,onSelectInstance:l,onBack:i}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const a=St(c);if(!a.isAuthenticated){let u;return e[2]!==a.supportsOAuth||e[3]!==i?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(bt,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):t.jsx(Nt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=i,e[4]=u):u=e[4],u}const x=`${n}:${o}`;let f;return e[5]!==n||e[6]!==l||e[7]!==r||e[8]!==x||e[9]!==o?(f=t.jsx(Wt,{toolName:o,connectionId:n,siblings:r,onSelectInstance:l},x),e[5]=n,e[6]=l,e[7]=r,e[8]=x,e[9]=o,e[10]=f):f=e[10],f}function Wt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:r}=Ye({strict:!1}),l=(()=>{if(!r)return null;const d=`replay-${r}`,m=sessionStorage.getItem(d);if(!m)return null;sessionStorage.removeItem(d);try{return JSON.parse(m)}catch{return null}})(),i=(()=>{if(!l)return null;const d={};for(const[m,j]of Object.entries(l))j!==null&&typeof j=="object"?d[m]=JSON.stringify(j,null,2):d[m]=j;return d})(),[c,a]=C.useState(i??{}),[x,f]=C.useState(l?JSON.stringify(l,null,2):"{}"),[u,h]=C.useState(null),[N,T]=C.useState(null),[_,A]=C.useState(null),[O,y]=C.useState(null),[k,I]=C.useState(!1),[g,S]=C.useState(null),{org:w}=le(),$=_e(e),{sendMessage:v}=It(),P=$t(),{setChatOpen:L}=Tt(),M=`${e}:${s}`,R=ce({connectionId:e,orgId:w.id}),z=wt({client:R}),p=z.data?.tools?.find(d=>d.name===s),E=it(p?._meta),V=d=>{const m=Ct(d.content);m.content.length>0&&(L(!0),v({tiptapDoc:m}))},[D,Y]=C.useState("json"),[Me,ze]=C.useState(!1);E&&!Me&&(Y("ui"),ze(!0));const pe=p?.inputSchema?.properties,fe=pe?Object.keys(pe):[],W=fe.length>0,H={};if(W&&p?.inputSchema?.properties)for(const d of fe)H[d]=p.inputSchema.required?.includes(d)?"":void 0;const Z=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{I(!0),y(null),h(null),T(null),A(null),S(null);const d=performance.now();try{if(!R)throw new Error("MCP client is not available");const m=W?{...H,...c}:(()=>{const B=x.trim();if(!B)return{};const F=JSON.parse(B);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();W&&p?.inputSchema?.properties&&Object.entries(p.inputSchema.properties).forEach(([B,F])=>{if((F.type==="object"||F.type==="array")&&typeof m[B]=="string")try{m[B]=JSON.parse(m[B])}catch{}});const j=await R.callTool({name:s,arguments:m}),K=j.structuredContent??j,We=performance.now(),qe=Math.round(We-d);h(K),T(j),A(m);const He=JSON.stringify(K),ge=new TextEncoder().encode(He).length;S({duration:`${qe}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(m){const j=m instanceof Error?m.message:String(m);y(j||"Unknown error occurred");const K=performance.now();S({duration:`${Math.round(K-d)}ms`})}finally{I(!1)}},ee=(d,m)=>{a(j=>({...j,[d]:m}))},Le=()=>{h(null),T(null),A(null),y(null),S(null)},Ve=p?.name??Ft(s),Be=t.jsx(Oe,{children:t.jsxs(Re,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:w.slug},children:"Connections"})})}),t.jsx(X,{}),$&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:w.slug,appSlug:vt($)},search:{tab:"tools"},children:$.title})})}),t.jsx(X,{})]}),t.jsx(J,{children:t.jsx(De,{children:Ve})})]})}),he=o.length>1&&t.jsxs(be,{value:e,onValueChange:n,children:[t.jsx(Ne,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ve,{})}),t.jsx(Se,{children:o.map(d=>t.jsx(ne,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx($e,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Fe=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),p?.inputSchema?.required&&p.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:W&&p?.inputSchema?.properties?Object.entries(p.inputSchema.properties).map(([d,m])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,p.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:m.type})]}),m.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:m.description}),m.type==="object"||m.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:Z(d)?c[d]??"":H[d]??"",onChange:j=>ee(d,j.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):m.type==="boolean"?t.jsxs(be,{value:Z(d)?String(c[d]??""):"",onValueChange:j=>ee(d,j==="true"),children:[t.jsx(Ne,{children:t.jsx(ve,{placeholder:"Select true or false..."})}),t.jsxs(Se,{children:[t.jsx(ne,{value:"true",children:"true"}),t.jsx(ne,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:Z(d)?c[d]??"":H[d]??"",onChange:j=>ee(d,j.target.value),placeholder:`Enter ${d}...`})]},d)):p?.inputSchema&&!W?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:d=>f(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:k?t.jsxs(q,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Le,children:[t.jsx(mt,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(q,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(gt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),Je=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[g&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.duration})]}),g.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.tokens})]}),g.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.bytes})]}),g.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:g.cost})})]}),E&&t.jsx(ct,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Y("ui"),children:t.jsx(ft,{size:14})})}),t.jsx(Ce,{children:"Interactive view"})]}),t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Y("json"),children:t.jsx(Ie,{size:14})})}),t.jsx(Ce,{children:"JSON view"})]})]})})]})]}),O&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(Lt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(dt,{className:"h-4 w-4"}),t.jsx(Vt,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(Bt,{className:"text-xs text-destructive",children:O})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:E&&D==="ui"&&R?t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(at,{resourceURI:E,toolInfo:p?{tool:p}:void 0,toolInput:_??void 0,toolResult:N??void 0,displayMode:"fullscreen",minHeight:je.view.minHeight,maxHeight:je.view.maxHeight,client:R,onMessage:V,onUpdateModelContext:d=>P?.setAppContext(M,d),onTeardown:()=>P?.clearAppContext(M),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(kt,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(q,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(ht,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ie,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Be,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx($e,{icon:$?.icon||null,name:$?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[z.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):z.isLoading?t.jsx(ie,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:z.isSuccess?"ready":z.isLoading?"connecting":"error"})]}),t.jsx(yt,{annotations:p?.annotations,_meta:p?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Fe}),Je]})})]})})}function qt(s){const e=b.c(10),{itemId:o,siblings:n,onBack:r}=s,[l,i]=C.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(h=>h.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const a=c;if(!_e(a||void 0)||!a){let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=h):h=e[3],h}let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=f):f=e[4];let u;return e[5]!==a||e[6]!==r||e[7]!==n||e[8]!==o?(u=t.jsx(C.Suspense,{fallback:f,children:t.jsx(Jt,{toolName:o,connectionId:a,siblings:n,onSelectInstance:i,onBack:r})}),e[5]=a,e[6]=r,e[7]=n,e[8]=o,e[9]=u):u=e[9],u}const Ht={workflow:lt,workflow_execution:rt,prompt:zt};function Kt(){const s=b.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const i=Ae(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const a=c,x=Gt;let f;return s[5]!==a||s[6]!==r||s[7]!==i?(f=t.jsx(qt,{itemId:r,siblings:i,onBack:a,onUpdate:x}),s[5]=a,s[6]=r,s[7]=i,s[8]=f):f=s[8],f}async function Gt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Xt(){const s=b.c(40),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let i;s[1]!==e.history?(i=()=>{e.history.back()},s[1]=e.history,s[2]=i):i=s[2];const c=i,{org:a}=le();let x;s[3]!==n.appSlug?(x={slug:n.appSlug},s[3]=n.appSlug,s[4]=x):x=s[4];const u=Ae(x)[0]??null,h=u?.id??"",N=h||"no-connection",T=h??null;let _;s[5]!==a.id||s[6]!==T?(_={connectionId:T,orgId:a.id},s[5]=a.id,s[6]=T,s[7]=_):_=s[7];const A=ce(_),O=Ee(N,r,A);let y;s[8]!==O||s[9]!==l?(y=async D=>{l&&await O.update.mutateAsync({id:l,data:D})},s[8]=O,s[9]=l,s[10]=y):y=s[10];const k=y;let I;s[11]!==r?(I=r?.toLowerCase(),s[11]=r,s[12]=I):I=s[12];const g=I,S=g&&Ht[g];let w;s[13]!==r?(w=Qt(r),s[13]=r,s[14]=w):w=s[14];const $=w;let v;s[15]!==a.slug?(v=t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[15]=a.slug,s[16]=v):v=s[16];let P;s[17]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(X,{}),s[17]=P):P=s[17];let L;s[18]!==r||s[19]!==u||s[20]!==a.slug||s[21]!==n.appSlug?(L=u&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:n.appSlug},search:{tab:r},children:u.title})})}),t.jsx(X,{})]}),s[18]=r,s[19]=u,s[20]=a.slug,s[21]=n.appSlug,s[22]=L):L=s[22];let M;s[23]!==$?(M=t.jsx(J,{children:t.jsx(De,{children:$})}),s[23]=$,s[24]=M):M=s[24];let R;s[25]!==L||s[26]!==M||s[27]!==v?(R=t.jsx(Oe,{children:t.jsxs(Re,{children:[v,P,L,M]})}),s[25]=L,s[26]=M,s[27]=v,s[28]=R):R=s[28];const z=R;if(S){let D;return s[29]!==S||s[30]!==c||s[31]!==k||s[32]!==l?(D=t.jsx(S,{itemId:l,onBack:c,onUpdate:k}),s[29]=S,s[30]=c,s[31]=k,s[32]=l,s[33]=D):D=s[33],D}let p;s[34]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Et,{size:36,className:"text-muted-foreground"}),s[34]=p):p=s[34];let E;s[35]!==c?(E=t.jsx(Pt,{icon:p,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[35]=c,s[36]=E):E=s[36];let V;return s[37]!==z||s[38]!==E?(V=t.jsx(xe,{breadcrumb:z,children:E}),s[37]=z,s[38]=E,s[39]=V):V=s[39],V}function Yt(){const s=b.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let i;return s[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Kt,{}),s[1]=i):i=s[1],i}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Xt,{}),s[2]=l):l=s[2],l}function In(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{In as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as B,j as s,c as M,B as V}from"./index-
|
|
1
|
+
import{e as B,j as s,c as M,B as V}from"./index-D7IIXROb.js";import{D as z,d as _,e as $,c as E}from"./dropdown-menu-Cye9zjaV.js";import{i as L,n as O,b as R,d as A,c as F}from"./XClose-Bl-2e8QV.js";import{i as S}from"./ChevronDown-DgrWziJW.js";import{a as I,b as K,T as P,c as W}from"./use-mobile-CrP2KZis.js";import{V as q}from"./view-mode-toggle-D2WG_Euq.js";import{B as G}from"./badge-arNIH4S4.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,bc as P,J as Oe,e as En,c as Ot,j as Ne,l as Mn}from"./index-
|
|
1
|
+
import{r as c,bc as P,J as Oe,e as En,c as Ot,j as Ne,l as Mn}from"./index-D7IIXROb.js";import{i as In}from"./SearchMd-DlfhE_5j.js";function An(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function we(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?we(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Fe(e){return we(e)?!1:e instanceof B(e).HTMLElement}function Kt(e){return e instanceof B(e).SVGElement}function ye(e){return e?we(e)?e.document:bt(e)?mt(e)?e:Fe(e)||Kt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Nn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ze(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function $e(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function je(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const me=Ht(1),Pe=Ht(-1);function On(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Tn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Tn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return On(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ln(e){return e.matches(Tt)?e:e.querySelector(Tt)}const kn={display:"none"};function zn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:kn},n)}function Pn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Vt=c.createContext(null);function Fn(e){const t=c.useContext(Vt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function $n(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const jn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as v,c as b,j as n,l as w}from"./index-
|
|
1
|
+
import{e as v,c as b,j as n,l as w}from"./index-D7IIXROb.js";import{i as C}from"./SearchMd-DlfhE_5j.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=n.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as k,j as s,c as C}from"./index-
|
|
1
|
+
import{e as k,j as s,c as C}from"./index-D7IIXROb.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-Vdrlqd3N.js";import{i as D,n as E}from"./XClose-Bl-2e8QV.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as f,c as u,j as m}from"./index-
|
|
1
|
+
import{e as f,c as u,j as m}from"./index-D7IIXROb.js";import{B as g}from"./badge-arNIH4S4.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as t,y as i,aJ as p,_ as r,aK as a,bR as m,bl as h,aC as c,a_ as b}from"./index-
|
|
1
|
+
import{v as t,y as i,aJ as p,_ as r,aK as a,bR as m,bl as h,aC as c,a_ as b}from"./index-D7IIXROb.js";const N=t({id:i().describe("Unique identifier for the entity"),title:i().describe("Human-readable title for the entity"),description:i().nullish().describe("Description of the entity"),created_at:i().datetime(),updated_at:i().datetime(),created_by:i().optional(),updated_by:i().optional()}),f=t({field:a(i()),operator:r(["eq","gt","gte","lt","lte","in","like","contains"]),value:p()}),l=m(()=>h([f,t({operator:r(["and","or","not"]),conditions:a(l)})])),C=t({field:a(i()),direction:r(["asc","desc"]),nulls:r(["first","last"]).optional()}),S=t({where:l.optional().describe("Filter expression"),orderBy:a(C).optional().describe("Sort expressions"),limit:c().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:c().int().min(0).optional().describe("Number of items to skip")});function O(e){return t({items:a(e).describe("Array of collection items"),totalCount:c().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:b().optional().describe("Whether there are more items available")})}const y=t({id:i().describe("ID of the entity to retrieve")});function _(e){return t({item:e.nullable().describe("The retrieved item, or null if not found")})}function E(e){return t({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function I(e){return t({item:e.describe("The created entity with generated id")})}function T(e){return t({id:i().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function L(e){return t({item:e.describe("The updated entity")})}const D=t({id:i().describe("ID of the entity to delete")});function g(e){return t({item:e.describe("The deleted entity")})}function v(e,n,u){const o=e.toUpperCase(),d=u?.readOnly??!1,s=[{name:`COLLECTION_${o}_LIST`,inputSchema:S,outputSchema:O(n)},{name:`COLLECTION_${o}_GET`,inputSchema:y,outputSchema:_(n)}];return d||s.push({name:`COLLECTION_${o}_CREATE`,inputSchema:E(n),outputSchema:I(n),opt:!0},{name:`COLLECTION_${o}_UPDATE`,inputSchema:T(n),outputSchema:L(n),opt:!0},{name:`COLLECTION_${o}_DELETE`,inputSchema:D,outputSchema:g(n),opt:!0}),s}export{N as B,v as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,c as m,j as n}from"./index-
|
|
1
|
+
import{e as r,c as m,j as n}from"./index-D7IIXROb.js";import{_ as d}from"./index-BqvsnDAu.js";import{i}from"./SearchMd-DlfhE_5j.js";function x(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function g(l){const e=r.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(i,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let a;e[4]!==t?(a=m("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=a):a=e[5];let c;return e[6]!==s||e[7]!==a?(c=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(d.Input,{"data-slot":"command-input",className:a,...s})]}),e[6]=s,e[7]=a,e[8]=c):c=e[8],c}function h(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function N(l){const e=r.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(d.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function b(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function _(l){const e=r.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=m("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}export{N as C,v as a,_ as b,b as c,g as d,h as e,x as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as _}from"./connection-slug-eyAPH6o3.js";import{e as R,s as $,aH as A,K as L,c as E,j as x}from"./index-
|
|
1
|
+
import{g as _}from"./connection-slug-eyAPH6o3.js";import{e as R,s as $,aH as A,K as L,c as E,j as x}from"./index-D7IIXROb.js";import{u as D}from"./use-registry-connections-4TVYi7-o.js";import{a as K}from"./use-organization-settings-qZ1AM5bR.js";import{S as w,c as H}from"./constants-fZUl7A6B.js";import{u as Q}from"./useInfiniteQuery-c3E-w9DY.js";import{i as F,f as q}from"./extract-connection-data-C_Q81cim.js";import{C as G}from"./card-BcKfGMCs.js";import{I as U}from"./integration-icon-DoWhqWe3.js";function ae(s){const e=new Map;for(const o of s){const l=_(o),n=e.get(l);n?n.push(o):e.set(l,[o])}const t=[],f=new Set;for(const o of s){const l=_(o);if(f.has(l))continue;f.add(l);const n=e.get(l),m=n[0];n.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:l,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:n})}return t}function le(){const s=R.c(6),e=D(),t=K(),f=$().project.enabledPlugins??[];let o;if(s[0]!==f||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=n=>t(n.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(V),f.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=f,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function V(s){return{id:s.id,title:s.title,icon:s.icon}}const X=24,S=3;function k(s){return s.id.includes("community-registry")}function Y(s){const e=s?.trim();if(e)return{operator:"or",conditions:[{field:["title"],operator:"contains",value:e},{field:["description"],operator:"contains",value:e},{field:["name"],operator:"contains",value:e},{field:["server","title"],operator:"contains",value:e}]}}function T(s,e,t,f){const o=s.map(u=>u.id).sort().join(","),l=Y(f),{data:n,fetchNextPage:m,hasNextPage:c,isFetchingNextPage:v,isLoading:p}=Q({queryKey:L.storeDiscovery(e,`${o}:${f??""}`),queryFn:async({pageParam:u})=>{const r=u??{};return await Promise.all(s.map(async i=>{const g=r[i.id];if(g==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const I=F(i.id,e);let b;for(let N=0;N<S;N++){let y=null;try{y=await H({connectionId:i.id,orgId:e});const d={limit:X};g&&(d.cursor=g),l&&(d.where=l);const C=await y.callTool({name:I,arguments:d}),P=C.structuredContent??C,j=P.nextCursor||P.cursor||void 0,M=q(P?[P]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:M,nextCursor:j}}catch(d){b=d}finally{await y?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,b),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:u=>{const r={};let a=!1;for(const i of u)i.registryId&&(i.nextCursor?(r[i.registryId]=i.nextCursor,a=!0):r[i.registryId]="EXHAUSTED");return a?r:void 0},staleTime:3600*1e3,placeholderData:A,retry:!1,enabled:t&&s.length>0}),h=[];if(n?.pages)for(const u of n.pages)for(const r of u)for(const a of r.items)h.push({...a,_sourceName:a._sourceName??r.registryTitle,_sourceIcon:a._sourceIcon??r.registryIcon,_registryId:a._registryId??r.registryId});return{items:h,hasMore:c??!1,isLoadingMore:v,isInitialLoading:p,fetchNextPage:()=>{c&&!v&&m()}}}function ce(s,e){const t=R.c(17),{org:f}=$();let o;t[0]!==s?(o=s.filter(W),t[0]=s,t[1]=o):o=t[1];const l=o;let n;t[2]!==s?(n=s.filter(z),t[2]=s,t[3]=n):n=t[3];const m=n,c=T(l,f.id,!0,e),v=!c.hasMore&&!c.isInitialLoading,p=T(m,f.id,v,e);let h;if(t[4]!==v||t[5]!==p||t[6]!==c.items){const N=new Set;h=[];const y=[...c.items];v&&y.push(...p.items);for(const d of y){const C=`${d._registryId}:${d.id}`;N.has(C)||(N.add(C),h.push(d))}t[4]=v,t[5]=p,t[6]=c.items,t[7]=h}else h=t[7];const u=c.isInitialLoading,r=c.isLoadingMore||p.isLoadingMore;let a;e:{if(c.hasMore){a=!0;break e}if(m.length>0){if(!v){a=!0;break e}a=p.hasMore;break e}a=!1}const i=a;let g;t[8]!==p||t[9]!==c?(g=()=>{if(c.hasMore){c.fetchNextPage();return}p.hasMore&&p.fetchNextPage()},t[8]=p,t[9]=c,t[10]=g):g=t[10];const I=g;let b;return t[11]!==i||t[12]!==u||t[13]!==r||t[14]!==h||t[15]!==I?(b={items:h,hasMore:i,isLoadingMore:r,isInitialLoading:u,loadMore:I},t[11]=i,t[12]=u,t[13]=r,t[14]=h,t[15]=I,t[16]=b):b=t[16],b}function z(s){return k(s)}function W(s){return!k(s)}function ue(s){const e=R.c(37),{connection:t,onClick:f,headerActions:o,headerActionsAlwaysVisible:l,body:n,footer:m,className:c,fallbackIcon:v}=s,p=l===void 0?!1:l,h=f&&"hover:bg-muted/50";let u;e[0]!==c||e[1]!==h?(u=E("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",h,c),e[0]=c,e[1]=h,e[2]=u):u=e[2];let r;e[3]!==t.icon||e[4]!==t.title||e[5]!==v?(r=x.jsx(U,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:v}),e[3]=t.icon,e[4]=t.title,e[5]=v,e[6]=r):r=e[6];let a;e[7]!==o||e[8]!==p?(a=o&&x.jsx("div",{className:E("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:B,children:o}),e[7]=o,e[8]=p,e[9]=a):a=e[9];let i;e[10]!==a?(i=x.jsx("div",{className:"relative",children:a}),e[10]=a,e[11]=i):i=e[11];let g;e[12]!==r||e[13]!==i?(g=x.jsxs("div",{className:"flex items-start justify-between",children:[r,i]}),e[12]=r,e[13]=i,e[14]=g):g=e[14];let I;e[15]!==t.title?(I=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=I):I=e[16];const b=t.description||"No description";let N;e[17]!==b?(N=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b}),e[17]=b,e[18]=N):N=e[18];let y;e[19]!==N||e[20]!==I?(y=x.jsxs("div",{className:"flex flex-col gap-1",children:[I,N]}),e[19]=N,e[20]=I,e[21]=y):y=e[21];let d;e[22]!==n?(d=n&&x.jsx("div",{children:n}),e[22]=n,e[23]=d):d=e[23];let C;e[24]!==y||e[25]!==d||e[26]!==g?(C=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[g,y,d]}),e[24]=y,e[25]=d,e[26]=g,e[27]=C):C=e[27];let P;e[28]!==m?(P=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:Z,children:m})}),e[28]=m,e[29]=P):P=e[29];let j;e[30]!==C||e[31]!==P?(j=x.jsxs("div",{className:"flex flex-col flex-1",children:[C,P]}),e[30]=C,e[31]=P,e[32]=j):j=e[32];let M;return e[33]!==f||e[34]!==j||e[35]!==u?(M=x.jsx(G,{className:u,onClick:f,children:j}),e[33]=f,e[34]=j,e[35]=u,e[36]=M):M=e[36],M}function Z(s){return s.stopPropagation()}function B(s){return s.stopPropagation()}export{ue as C,ce as a,ae as g,le as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as he,aI as Te,aJ as Ie,y as le,aK as Ae,e as $,j as t,l as ge,B as H,r as G,c as je,s as te,V as De,K as oe,f as Q,aL as ce,u as $e,aM as Pe,E as Oe,g as Me,o as ze,x as Ve,w as Ee,a0 as Ue,aN as Fe,z as q,a1 as Le}from"./index-Bjw9mABo.js";import{g as Re}from"./constants-BXPLSYK0.js";import{E as ve}from"./empty-state-BNoYs1pG.js";import{E as Be,c as He,r as We,b as Xe,d as Ge}from"./connection-form-helpers-CF_hDkTW.js";import{c as Ke,S as qe}from"./index-RUiHYhDy.js";import{u as be,T as Qe}from"./tools-list-D0-t6r7P.js";import{u as Je}from"./use-members-BpPuDkhN.js";import{A as Ye}from"./avatar-B5MfJTPB.js";import{b as Ne,a as ye,u as Ze}from"./use-connection-CwwdEwVq.js";import{u as ie,S as et}from"./constants-fisX-szF.js";import{b as tt}from"./use-mcp-tools-B2JuhhY2.js";import{g as ae,M as st,a as nt}from"./types-DV1fT4jg.js";import{b as Y,c as ot,a as Z,T as it,d as at}from"./tabs-OaMhPT1S.js";import{I as se}from"./integration-icon-BlpgeQ99.js";import{s as rt}from"./Plus-C4wuRIjK.js";import{a as _e}from"./Settings02-C0B8JYoO.js";import{s as re}from"./Trash01-Cqpb-tl4.js";import{p as lt,o as ct,r as dt,n as mt,s as ut}from"./index-DFbeaR6v.js";import{a as U,b as F,c as R,d as V,e as B,f as xt,F as pt}from"./form-B9N1Oecs.js";import{I as X}from"./input-B0Th2JQ1.js";import{u as ft,D as ht}from"./use-delete-connection-DgzyKP3C.js";import{V as gt}from"./layout-RImR4U5w.js";import{c as jt,C as vt,B as bt,a as Nt,b as yt,d as _t,e as Ct}from"./monitoring-stats-row-Bu8i_dr0.js";import{u as St}from"./use-virtual-mcp-Dyx_89bN.js";import{i as Ce}from"./ChevronRight-CYmVBoc2.js";import{a as Se}from"./Users03-DQHeHtuJ.js";import{g as we}from"./connection-slug-eyAPH6o3.js";import{n as wt}from"./ZapSquare-DAasimGP.js";import{T as kt,b as Tt}from"./agent-icon-CPrrz1CF.js";import{b as It}from"./Tool01-CzK8v2e2.js";import{C as At}from"./collection-search-D9OTGkON.js";import{C as Dt}from"./card-DXc1-cjm.js";import{B as $t}from"./badge-C3ltiwQz.js";import{c as Pt,d as Ot,e as Mt,D as de}from"./dropdown-menu-CpKKd4KR.js";import{a as me,c as ue,d as xe,S as pe,b as E}from"./select-C0BTO_VN.js";import{i as zt}from"./CheckCircle-BZH7SpHU.js";import{t as Vt}from"./ChevronDown-BjTzGWO3.js";import{n as Et}from"./Container-9mToJ-Hm.js";import{s as ee}from"./Star01-BRTO8Wcg.js";import{a as Ut}from"./RefreshCcw01-KsYBIYgq.js";import{s as Ft}from"./XClose-xVgTKp3y.js";import"./collections-uRCOIhF1.js";import"./SearchMd-BhWG7TtE.js";import"./index-CdcT6o1u.js";import"./index-PDe7t-Zh.js";import"./extract-connection-data-C1fjt67g.js";import"./use-registry-connections-Du2J1Ki6.js";import"./use-organization-settings-DqQLKHYU.js";import"./index-B1ENCl_P.js";import"./popover-E3qdo7hr.js";import"./use-mobile-BY3ZRSKc.js";import"./use-create-virtual-mcp-D9eK4uEY.js";import"./use-navigate-to-agent-CL1nPgsu.js";import"./User01-CHqQvVRk.js";import"./use-collections-Cp0FTIw2.js";import"./X-Cz2VwWbK.js";import"./label-DuAMprL4.js";import"./alert-dialog-D6BTsTie.js";import"./AlertCircle-Dy6WQ5ge.js";import"./ArrowNarrowLeft-DyXfpAXl.js";import"./XCircle-D7CLzAA2.js";import"./ArrowUpRight-CnIoXxER.js";import"./ChevronUp-Cw4IUx4c.js";import"./DotsVertical-CbfHiscK.js";import"./Palette-6WmqQOED.js";import"./LinkExternal01-Kt8lGWbQ.js";import"./Lock01-BhhALBsJ.js";import"./Sun-DD9THIbp.js";import"./Play-B-Yf_e00.js";import"./Shield01-vr0RTpPH.js";import"./Zap-eM4vJ-Od.js";const Lt=he({scopes:Ae(le()).describe("List of scopes available"),stateSchema:Te(le(),Ie()).describe("JSON Schema (draft-07) defining the state structure")}),Rt=[{name:"MCP_CONFIGURATION",inputSchema:he({}),outputSchema:Lt}];function Bt(s){const e=$.c(39),{instance:n,onConfigure:i,onAuthenticate:r,onDelete:o}=s;let c;e[0]!==n.id?(c={connectionId:n.id},e[0]=n.id,e[1]=c):c=e[1];const d=be(c),l=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,u=l?"border-destructive/50 bg-destructive/5":"border-transparent";let p;e[2]!==u?(p=je("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=p):p=e[3];let a;e[4]!==n.icon||e[5]!==n.title?(a=t.jsx(se,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=a):a=e[6];let f;e[7]!==n.title?(f=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=f):f=e[8];let h;e[9]!==l?(h=l&&t.jsx("span",{className:"text-xs text-destructive font-medium",children:"Needs authorization"}),e[9]=l,e[10]=h):h=e[10];let b;e[11]!==f||e[12]!==h?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[f,h]}),e[11]=f,e[12]=h,e[13]=b):b=e[13];let j;e[14]!==n||e[15]!==l||e[16]!==r?(j=l&&t.jsx(H,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>r(n),children:"Authorize"}),e[14]=n,e[15]=l,e[16]=r,e[17]=j):j=e[17];let v;e[18]!==n||e[19]!==i?(v=()=>i(n),e[18]=n,e[19]=i,e[20]=v):v=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(_e,{size:13}),e[21]=S):S=e[21];let I;e[22]!==v?(I=t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:v,title:"Configure",children:S}),e[22]=v,e[23]=I):I=e[23];let N;e[24]!==n||e[25]!==o?(N=()=>o(n),e[24]=n,e[25]=o,e[26]=N):N=e[26];let w;e[27]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(re,{size:13}),e[27]=w):w=e[27];let k;e[28]!==N?(k=t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:N,title:"Delete",children:w}),e[28]=N,e[29]=k):k=e[29];let _;e[30]!==I||e[31]!==k||e[32]!==j?(_=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j,I,k]}),e[30]=I,e[31]=k,e[32]=j,e[33]=_):_=e[33];let T;return e[34]!==_||e[35]!==p||e[36]!==a||e[37]!==b?(T=t.jsxs("div",{className:p,children:[a,b,_]}),e[34]=_,e[35]=p,e[36]=a,e[37]=b,e[38]=T):T=e[38],T}function Ht(s){const e=$.c(15),{instance:n,onConfigure:i}=s;let r;e[0]!==n.icon||e[1]!==n.title?(r=t.jsx(se,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=r):r=e[2];let o;e[3]!==n.title?(o=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=o):o=e[4];let c;e[5]!==n||e[6]!==i?(c=()=>i(n),e[5]=n,e[6]=i,e[7]=c):c=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(_e,{size:13}),e[8]=d):d=e[8];let m;e[9]!==c?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:c,title:"Configure",children:d})}),e[9]=c,e[10]=m):m=e[10];let l;return e[11]!==r||e[12]!==o||e[13]!==m?(l=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[r,o,m]}),e[11]=r,e[12]=o,e[13]=m,e[14]=l):l=e[14],l}function Wt(s){const e=$.c(25),{instances:n,onConfigure:i,onAuthenticate:r,onDelete:o,onAdd:c,isAdding:d}=s;if(n.length===0)return null;const m=n.length===1?"Instance":"Instances";let l;e[0]!==m?(l=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m}),e[0]=m,e[1]=l):l=e[1];let u;e[2]!==d?(u=d?t.jsx(ge,{size:13,className:"animate-spin"}):t.jsx(rt,{size:13}),e[2]=d,e[3]=u):u=e[3];let p;e[4]!==d||e[5]!==c||e[6]!==u?(p=t.jsxs(H,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:c,disabled:d,children:[u,"Add instance"]}),e[4]=d,e[5]=c,e[6]=u,e[7]=p):p=e[7];let a;e[8]!==l||e[9]!==p?(a=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[l,p]}),e[8]=l,e[9]=p,e[10]=a):a=e[10];let f;if(e[11]!==n||e[12]!==r||e[13]!==i||e[14]!==o){let j;e[16]!==r||e[17]!==i||e[18]!==o?(j=v=>t.jsx(G.Suspense,{fallback:t.jsx(Ht,{instance:v,onConfigure:i}),children:t.jsx(Bt,{instance:v,onConfigure:i,onAuthenticate:r,onDelete:o})},v.id),e[16]=r,e[17]=i,e[18]=o,e[19]=j):j=e[19],f=n.map(j),e[11]=n,e[12]=r,e[13]=i,e[14]=o,e[15]=f}else f=e[15];let h;e[20]!==f?(h=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:f}),e[20]=f,e[21]=h):h=e[21];let b;return e[22]!==a||e[23]!==h?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[a,h]}),e[22]=a,e[23]=h,e[24]=b):b=e[24],b}const Xt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Gt(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const Kt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function qt(s){const e=$.c(3),{connectionId:n,orgId:i,timeframe:r}=s;let o;e[0]!==i?(o={connectionId:et,orgId:i},e[0]=i,e[1]=o):o=e[1];const c=ie(o),d=Gt(r),{data:m}=De({queryKey:oe.connectionActivity(n,r,i),queryFn:async()=>{const f=await c.callTool({name:"MONITORING_LOGS_LIST",arguments:{startDate:d.startDate.toISOString(),endDate:d.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}});return f.structuredContent??f},staleTime:3e5}),l=jt(m?.logs??[],d),u=l.data,p=l.totalCalls>0;let a;return e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[2]=a):a=e[2],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:l.totalCalls.toLocaleString()}),a]}),l.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:l.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),l.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(l.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),p?t.jsxs("div",{children:[t.jsx(vt,{config:Kt,className:"h-16 w-full",children:t.jsxs(bt,{data:u,barCategoryGap:"4%",children:[t.jsx(Nt,{content:t.jsx(yt,{labelFormatter:Jt}),cursor:{fill:"var(--muted)"}}),t.jsx(_t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:u.map(Qt)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[u.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No activity in this period"})})]})}function Qt(s,e){return t.jsx(Ct,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function Jt(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function Yt(){const s=$.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function Zt(s){const e=$.c(13),{connectionId:n}=s,[i,r]=G.useState("14d"),{org:o}=te();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=c):c=e[0];let d;e[1]!==i?(d=Xt.map(a=>t.jsx("button",{type:"button",onClick:()=>r(a.value),className:je("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",i===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a.label},a.value)),e[1]=i,e[2]=d):d=e[2];let m;e[3]!==d?(m=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[c,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:d})]}),e[3]=d,e[4]=m):m=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Yt,{}),e[5]=l):l=e[5];let u;e[6]!==n||e[7]!==o.id||e[8]!==i?(u=t.jsx(G.Suspense,{fallback:l,children:t.jsx(qt,{connectionId:n,orgId:o.id,timeframe:i})}),e[6]=n,e[7]=o.id,e[8]=i,e[9]=u):u=e[9];let p;return e[10]!==m||e[11]!==u?(p=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[m,u]}),e[10]=m,e[11]=u,e[12]=p):p=e[12],p}function es(s){const e=$.c(15),{virtualMcp:n,org:i}=s,r=Q();let o;e[0]!==r||e[1]!==i||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:i,taskId:p},search:{virtualmcpid:n.id}})},e[0]=r,e[1]=i,e[2]=n.id,e[3]=o):o=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Se,{size:16}),e[4]=c):c=e[4];let d;e[5]!==n.icon||e[6]!==n.title?(d=t.jsx(se,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:c}),e[5]=n.icon,e[6]=n.title,e[7]=d):d=e[7];let m;e[8]!==n.title?(m=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=m):m=e[9];let l;e[10]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=l):l=e[10];let u;return e[11]!==o||e[12]!==d||e[13]!==m?(u=t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[d,m,l]}),e[11]=o,e[12]=d,e[13]=m,e[14]=u):u=e[14],u}function ts(s){const e=$.c(7),{virtualMcps:n,org:i}=s;let r;if(e[0]!==i||e[1]!==n){let c;e[3]!==i?(c=d=>t.jsx(es,{virtualMcp:d,org:i},d.id),e[3]=i,e[4]=c):c=e[4],r=n.map(c),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let o;return e[5]!==r?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:r})}),e[5]=r,e[6]=o):o=e[6],o}function ss(s){const e=$.c(7),{connection:n}=s,{org:i}=te();let r;e[0]!==n.id?(r={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=r):r=e[1];const o=St(r);if(!(o.length>0)){let l;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(t.Fragment,{}),e[2]=l):l=e[2],l}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=d):d=e[3];let m;return e[4]!==i.slug||e[5]!==o?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,t.jsx("div",{className:"px-5 py-4",children:t.jsx(ts,{virtualMcps:o,org:i.slug})})]}),e[4]=i.slug,e[5]=o,e[6]=m):m=e[6],m}function ns(s){const e=$.c(30),{tools:n,connectionId:i,org:r}=s,o=Q(),{org:c}=te();let d;e[0]!==i||e[1]!==c.id?(d={connectionId:i,orgId:c.id},e[0]=i,e[1]=c.id,e[2]=d):d=e[2];const m=ie(d),l=Ne(i);let u;e[3]!==l||e[4]!==i?(u=l?we(l):i,e[3]=l,e[4]=i,e[5]=u):u=e[5];const p=u,[a,f]=G.useState("");let h,b,j,v;if(e[6]!==p||e[7]!==m||e[8]!==o||e[9]!==r||e[10]!==a||e[11]!==n){const N=(n??[]).filter(os),w=a.toLowerCase().trim(),k=w?N.filter(g=>g.name.toLowerCase().includes(w)||g.description&&g.description.toLowerCase().includes(w)):N;let _;e[16]!==p||e[17]!==o||e[18]!==r?(_=g=>{o({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(g.name)}})},e[16]=p,e[17]=o,e[18]=r,e[19]=_):_=e[19];const T=_;j="flex flex-col h-full overflow-hidden";let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=g=>{g.key==="Escape"&&(f(""),g.target.blur())},e[20]=y):y=e[20],e[21]!==a?(v=t.jsx(At,{value:a,onChange:f,placeholder:"Search apps...",onKeyDown:y}),e[21]=a,e[22]=v):v=e[22],h="flex-1 overflow-auto p-5",b=k.length===0?t.jsx(ve,{image:null,title:a?"No apps found":"No apps available",description:a?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:k.map(g=>{const P=ae(g._meta);return t.jsxs(Dt,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>T(g),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(st,{resourceURI:P,toolInfo:{tool:g},displayMode:"inline",minHeight:200,maxHeight:200,client:m})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:g.name}),t.jsx(Qe,{annotations:g.annotations,_meta:g._meta})]}),g.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:g.description})]})]},g.name)})}),e[6]=p,e[7]=m,e[8]=o,e[9]=r,e[10]=a,e[11]=n,e[12]=h,e[13]=b,e[14]=j,e[15]=v}else h=e[12],b=e[13],j=e[14],v=e[15];let S;e[23]!==h||e[24]!==b?(S=t.jsx("div",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=S):S=e[25];let I;return e[26]!==j||e[27]!==v||e[28]!==S?(I=t.jsxs("div",{className:j,children:[v,S]}),e[26]=j,e[27]=v,e[28]=S,e[29]=I):I=e[29],I}function os(s){return!!ae(s._meta)}function ke(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=c=>c.charAt(0).toUpperCase()+c.slice(1),i=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),r=e.map(n),o=e[e.length-1];return r.length>=2&&o&&i.has(o)?[r.pop(),...r].join(" "):r.join(" ")}function ne(s){const e=$.c(2),{label:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=i):i=e[1],i}function is(s){const e=$.c(50),{tools:n,prompts:i,resources:r,connectionId:o,org:c}=s;let d;e[0]!==i?(d=i===void 0?[]:i,e[0]=i,e[1]=d):d=e[1];const m=d;let l;e[2]!==r?(l=r===void 0?[]:r,e[2]=r,e[3]=l):l=e[3];const u=l,p=Q(),a=Ne(o??"");let f;e[4]!==a||e[5]!==o?(f=a?we(a):o,e[4]=a,e[5]=o,e[6]=f):f=e[6];const h=f;let b;e[7]!==h||e[8]!==o||e[9]!==p||e[10]!==c?(b=function(A){!o||!c||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:c,appSlug:h,collectionName:"tools",itemId:encodeURIComponent(A)}})},e[7]=h,e[8]=o,e[9]=p,e[10]=c,e[11]=b):b=e[11];const j=b;let v;e[12]!==o||e[13]!==c||e[14]!==n?(v=o&&c&&n.some(ls),e[12]=o,e[13]=c,e[14]=n,e[15]=v):v=e[15];const S=v;if(n.length+m.length+u.length===0){let C;return e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[16]=C):C=e[16],C}let N;e[17]!==n.length?(N=t.jsxs(Y,{value:"tools",variant:"underline",children:["Tools (",n.length,")"]}),e[17]=n.length,e[18]=N):N=e[18];let w;e[19]!==S?(w=S&&t.jsx(Y,{value:"apps",variant:"underline",children:"UI"}),e[19]=S,e[20]=w):w=e[20];let k,_;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Y,{value:"prompts",variant:"underline",children:"Prompts"}),_=t.jsx(Y,{value:"resources",variant:"underline",children:"Resources"}),e[21]=k,e[22]=_):(k=e[21],_=e[22]);let T;e[23]!==N||e[24]!==w?(T=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(ot,{variant:"underline",className:"gap-1",children:[N,w,k,_]})}),e[23]=N,e[24]=w,e[25]=T):T=e[25];let y;e[26]!==j||e[27]!==n?(y=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>j(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(It,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:ke(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(ne,{label:"tools"}),e[26]=j,e[27]=n,e[28]=y):y=e[28];let g;e[29]!==y?(g=t.jsx(Z,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:y})}),e[29]=y,e[30]=g):g=e[30];let P;e[31]!==o||e[32]!==S||e[33]!==c||e[34]!==n?(P=S&&t.jsx(Z,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ns,{tools:n,connectionId:o,org:c})}),e[31]=o,e[32]=S,e[33]=c,e[34]=n,e[35]=P):P=e[35];let M;e[36]!==m?(M=m.length>0?m.map(rs):t.jsx(ne,{label:"prompts"}),e[36]=m,e[37]=M):M=e[37];let O;e[38]!==M?(O=t.jsx(Z,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:M})}),e[38]=M,e[39]=O):O=e[39];let D;e[40]!==u?(D=u.length>0?u.map(as):t.jsx(ne,{label:"resources"}),e[40]=u,e[41]=D):D=e[41];let z;e[42]!==D?(z=t.jsx(Z,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:D})}),e[42]=D,e[43]=z):z=e[43];let x;return e[44]!==T||e[45]!==g||e[46]!==P||e[47]!==O||e[48]!==z?(x=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(it,{defaultValue:"tools",variant:"underline",children:[T,g,P,O,z]})}),e[44]=T,e[45]=g,e[46]=P,e[47]=O,e[48]=z,e[49]=x):x=e[49],x}function as(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(kt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function rs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(wt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:ke(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function ls(s){return ae(s._meta)}function cs(s){const e=$.c(13),{connection:n,displayTitle:i}=s,r=i??n.title;let o;e[0]!==n.icon||e[1]!==r?(o=t.jsx(se,{icon:n.icon,name:r,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=r,e[2]=o):o=e[2];let c;e[3]!==r?(c=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:r})}),e[3]=r,e[4]=c):c=e[4];let d;e[5]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=d):d=e[6];let m;e[7]!==c||e[8]!==d?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,d]}),e[7]=c,e[8]=d,e[9]=m):m=e[9];let l;return e[10]!==o||e[11]!==m?(l=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[o,m]}),e[10]=o,e[11]=m,e[12]=l):l=e[12],l}function ds({form:s,connection:e,hasOAuthToken:n,onReauthenticate:i,onRemoveOAuth:r}){const o=ce({control:s.control,name:"ui_type"}),c=ce({control:s.control,name:"connection_url"}),{stdioEnabled:d}=$e(),m=(()=>{if(typeof c!="string"||!c)return!1;try{const a=new URL(c);return a.hostname==="api.githubcopilot.com"&&a.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),l=d||e.connection_type==="STDIO",u=e.connection_type==="VIRTUAL",p=u?Pe(e.connection_url):null;return u?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Se,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(U,{control:s.control,name:"ui_type",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(me,{value:a.value,onValueChange:a.onChange,children:[t.jsx(V,{children:t.jsxs(ue,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ee,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(xe,{})]})}),t.jsxs(pe,{children:[t.jsx(E,{value:"HTTP",children:"HTTP"}),t.jsx(E,{value:"SSE",children:"SSE"}),t.jsx(E,{value:"Websocket",children:"Websocket"}),l&&t.jsxs(t.Fragment,{children:[t.jsx(E,{value:"NPX",children:"NPX Package"}),t.jsx(E,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(U,{control:s.control,name:"connection_url",render:({field:f})=>t.jsx(F,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(X,{placeholder:"https://example.com/mcp",...f,value:f.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(me,{value:a.value,onValueChange:a.onChange,children:[t.jsx(V,{children:t.jsx(ue,{className:"h-10",children:t.jsx(xe,{})})}),t.jsxs(pe,{children:[t.jsx(E,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ee,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(E,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ee,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(E,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ee,{className:"w-4 h-4"}),"Websocket"]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(E,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(E,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Tt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(B,{})]})}),o==="NPX"&&t.jsx(U,{control:s.control,name:"npx_package",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(V,{children:t.jsx(X,{placeholder:"@perplexity-ai/mcp-server",...a,value:a.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(U,{control:s.control,name:"stdio_command",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(V,{children:t.jsx(X,{placeholder:"node, bun, python...",...a,value:a.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})}),t.jsx(U,{control:s.control,name:"stdio_args",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(V,{children:t.jsx(X,{placeholder:"arg1 arg2 --flag value",...a,value:a.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(B,{})]})})]}),t.jsx(U,{control:s.control,name:"stdio_cwd",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(V,{children:t.jsx(X,{placeholder:"/path/to/project (optional)",...a,value:a.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(U,{control:s.control,name:"env_vars",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(V,{children:t.jsx(Be,{value:a.value??[],onChange:a.onChange})}),t.jsx(B,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(U,{control:s.control,name:"connection_token",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:m?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Pt,{children:[t.jsx(Ot,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs($t,{variant:"success",className:"gap-1.5",children:[t.jsx(zt,{size:12}),"Authenticated via OAuth",t.jsx(Vt,{size:12})]})})}),t.jsxs(Mt,{align:"start",children:[t.jsxs(de,{onClick:i,children:[t.jsx(Ut,{size:16}),"Re-authenticate"]}),t.jsxs(de,{variant:"destructive",onClick:r,children:[t.jsx(re,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&a.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>a.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Ft,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(X,{type:"password",placeholder:m?"Paste your GitHub PAT":"Enter access token...",...a,value:a.value||"",className:"h-10 rounded-lg"})}),m&&t.jsxs(xt,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(B,{})]})})]})}function ms(s){return s.command==="npx"}function us(s){return s.args?.find(e=>!e.startsWith("-"))??""}function xs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function fe(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Fe(s.connection_headers)){const i=s.connection_headers,r=We(i.envVars);if(ms(i)){const c=us(i);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:c,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const o=xs(i);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:r}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function ps(s){let e,n=null,i=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=Ge(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",i=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...i&&{connection_token:i},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function fs({connection:s,connectionId:e,org:n,isUpdating:i,tools:r,prompts:o,resources:c,siblings:d}){const m=Q({from:"/$org/settings/connections/$appSlug"}),l=ze(),u=ye(),p=ft({onSuccess:()=>{d.length<=1&&m({to:"/$org/settings/connections",params:{org:n}})}}),[a,f]=G.useState(null),[h,b]=G.useState(!1),j=be({connectionId:e}),{data:v}=Je(),S=v?.data?.members??[],I=a??s,N=S.find(x=>x.userId===I.created_by),k=s?.connection_type==="VIRTUAL"||j.isAuthenticated,_={...s,tools:r},T=Ke(_,Rt),y=Ve({resolver:Ee(He),values:fe(a??s)}),g=y.formState.isDirty,P=async()=>{if(!await y.trigger())return;const C=y.getValues(),A=ps(C),W=a?.id??e;await u.update.mutateAsync({id:W,data:A}),y.reset(C)},M=()=>{y.reset(fe(a??s))},O=async x=>{const{token:C,tokenInfo:A,error:W}=await Le({connectionId:x,scope:"offline_access"});if(W||!C){q.error(`Authentication failed: ${W}`);return}if(A)try{const K=await fetch(`/api/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:A.accessToken,refreshToken:A.refreshToken,expiresIn:A.expiresIn,scope:A.scope,clientId:A.clientId,clientSecret:A.clientSecret,tokenEndpoint:A.tokenEndpoint})});if(!K.ok)console.error("Failed to save OAuth token:",await K.text()),await u.update.mutateAsync({id:x,data:{connection_token:C}});else try{await u.update.mutateAsync({id:x,data:{}})}catch(J){console.warn("Failed to refresh connection tools after OAuth:",J)}}catch(K){console.error("Error saving OAuth token:",K),await u.update.mutateAsync({id:x,data:{connection_token:C}})}else await u.update.mutateAsync({id:x,data:{connection_token:C}});const L=new URL(`/mcp/${x}`,window.location.origin);await l.invalidateQueries({queryKey:oe.isMCPAuthenticated(L.href,null)}),q.success("Authentication successful")},D=()=>O(s.id),z=async()=>{try{const x=await fetch(`/api/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const A=await x.text();q.error(`Failed to remove OAuth: ${A}`);return}const C=new URL(`/mcp/${s.id}`,window.location.origin);await l.invalidateQueries({queryKey:oe.isMCPAuthenticated(C.href,null)}),q.success("OAuth removed. You can now re-authenticate with a different account.")}catch(x){console.error("Error removing OAuth token:",x),q.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(ht,{...p}),t.jsx(lt,{open:a!==null,onOpenChange:x=>{x||f(null)},children:t.jsxs(ct,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(dt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(mt,{className:"text-base",children:a?.title??s.title}),t.jsx(ut,{className:"text-xs",children:"Update URL, authentication, and other settings"}),N&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected by"}),t.jsx(Ye,{url:N.user?.image??void 0,fallback:N.user?.name??N.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:N.user?.name||N.user?.email})]})]}),t.jsxs(pt,{...y,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(U,{control:y.control,name:"title",render:({field:x})=>t.jsxs(F,{children:[t.jsx(R,{children:"Name"}),t.jsx(V,{children:t.jsx(X,{...x})}),t.jsx(B,{})]})}),t.jsx(U,{control:y.control,name:"description",render:({field:x})=>t.jsxs(F,{children:[t.jsx(R,{children:"Description"}),t.jsx(V,{children:t.jsx(X,{...x,value:x.value||""})}),t.jsx(B,{})]})})]}),t.jsx(ds,{form:y,connection:a??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:D,onRemoveOAuth:z}),t.jsx(qe,{connection:a??s,form:y,hasMcpBinding:T,isMCPAuthenticated:k,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:D,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(H,{onClick:P,disabled:!g||i,className:"flex-1",children:i?"Saving…":"Save changes"}),g&&t.jsx(H,{variant:"outline",onClick:M,children:"Undo"}),t.jsxs(H,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=a??s;f(null),p.requestDelete(x)},children:[t.jsx(re,{size:15}),"Delete"]})]})]},a?.id??s.id)]})}),t.jsx(gt,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(cs,{connection:s,displayTitle:(()=>{const x=d[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(Zt,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Wt,{instances:d,onConfigure:x=>f(x),onAuthenticate:x=>O(x.id),onDelete:x=>p.requestDelete(x),isAdding:h,onAdd:async()=>{b(!0);try{const x=d[0]??s,C=x.title.replace(/\s*\(\d+\)\s*$/,""),A=d.length+1,W=`${C} (${A})`,L=Re("conn");await u.create.mutateAsync({id:L,title:W,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const K=new URL(`/mcp/${L}`,window.location.origin),J=await Ue({url:K.href,token:null});J.supportsOAuth&&!J.isAuthenticated&&await O(L)}finally{b(!1)}}}),t.jsx(ss,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(is,{tools:r,prompts:o,resources:c,connectionId:e,org:n})})]})})]})})]})}function hs(){const s=$.c(38);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/settings/connections/$appSlug"},s[0]=e):e=s[0];const n=Q(e);let i;s[1]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/settings/connections/$appSlug"},s[1]=i):i=s[1];const{appSlug:r,org:o}=Me(i),{org:c}=te(),d=ye();let m;s[2]!==r?(m={slug:r},s[2]=r,s[3]=m):m=s[3];const l=Ze(m),u=l[0]??null,p=u?.id??"",a=p||null;let f;s[4]!==c.id||s[5]!==a?(f={connectionId:a,orgId:c.id},s[4]=c.id,s[5]=a,s[6]=f):f=s[6];const h=ie(f);let b;s[7]!==h?(b={client:h},s[7]=h,s[8]=b):b=s[8];const{data:j}=tt(b);let v;if(s[9]!==u?.tools||s[10]!==p||s[11]!==l||s[12]!==j){const D=j?j.tools.map(ys):(u?.tools??[]).map(Ns);e:{if(l.length<=1){v=D;break e}const z=new Set,x=[],C=vs;for(const A of l){const W=A.id===p?D:C(A.tools);for(const L of W)z.has(L.name)||(z.add(L.name),x.push(L))}v=x.length>0?x:D}s[9]=u?.tools,s[10]=p,s[11]=l,s[12]=j,s[13]=v}else v=s[13];const S=v;let I;s[14]!==h?(I={client:h},s[14]=h,s[15]=I):I=s[15];const{data:N}=at(I);let w;s[16]!==h?(w={client:h},s[16]=h,s[17]=w):w=s[17];const{data:k}=nt(w);let _;s[18]!==N?.prompts?(_=N?.prompts??[],s[18]=N?.prompts,s[19]=_):_=s[19];let T;s[20]!==_?(T=_.map(js),s[20]=_,s[21]=T):T=s[21];const y=T;let g;s[22]!==k?.resources?(g=k?.resources??[],s[22]=k?.resources,s[23]=g):g=s[23];let P;s[24]!==g?(P=g.map(gs),s[24]=g,s[25]=P):P=s[25];const M=P;if(!u){let D;return s[26]!==n||s[27]!==o?(D=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ve,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(H,{variant:"outline",onClick:()=>n({to:"/$org/settings/connections",params:{org:o}}),children:"Back to connections"})})}),s[26]=n,s[27]=o,s[28]=D):D=s[28],D}let O;return s[29]!==d.update.isPending||s[30]!==S||s[31]!==u||s[32]!==p||s[33]!==o||s[34]!==y||s[35]!==M||s[36]!==l?(O=t.jsx(fs,{org:o,connection:u,connectionId:p,isUpdating:d.update.isPending,tools:S,prompts:y,resources:M,siblings:l}),s[29]=d.update.isPending,s[30]=S,s[31]=u,s[32]=p,s[33]=o,s[34]=y,s[35]=M,s[36]=l,s[37]=O):O=s[37],O}function gs(s){return{name:s.name,description:s.description,uri:s.uri}}function js(s){return{name:s.name,description:s.description}}function vs(s){return(s??[]).map(bs)}function bs(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ns(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ys(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function _s(){const s=$.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Oe,{children:t.jsx(G.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(hs,{})})}),s[0]=e):e=s[0],e}function Rn(){const s=$.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(_s,{}),s[0]=e):e=s[0],e}export{Rn as default};
|
|
1
|
+
import{v as he,aI as Te,aJ as Ie,y as le,aK as Ae,e as $,j as t,l as ge,B as H,r as G,c as je,s as te,V as De,K as oe,f as Q,aL as ce,u as $e,aM as Pe,E as Oe,g as Me,o as ze,x as Ve,w as Ee,a0 as Ue,aN as Fe,z as q,a1 as Le}from"./index-D7IIXROb.js";import{g as Re}from"./constants-CBodG1Pl.js";import{E as ve}from"./empty-state-KsHmVPO4.js";import{E as Be,c as He,r as We,b as Xe,d as Ge}from"./connection-form-helpers-D-VsE2HN.js";import{c as Ke,S as qe}from"./index-DP75UHA3.js";import{u as be,T as Qe}from"./tools-list-Kw0AITzg.js";import{u as Je}from"./use-members-BR83cmtt.js";import{A as Ye}from"./avatar-BCAMjlDk.js";import{b as Ne,a as ye,u as Ze}from"./use-connection-BHgGmTOA.js";import{u as ie,S as et}from"./constants-fZUl7A6B.js";import{b as tt}from"./use-mcp-tools-jeaH_mio.js";import{g as ae,M as st,a as nt}from"./types-CfADcGn6.js";import{b as Y,c as ot,a as Z,T as it,d as at}from"./tabs-CMVGP6Nm.js";import{I as se}from"./integration-icon-DoWhqWe3.js";import{s as rt}from"./Plus-CnK1SC2T.js";import{a as _e}from"./Settings02-LVlkEIxI.js";import{s as re}from"./Trash01-CIUqVsqV.js";import{p as lt,o as ct,r as dt,n as mt,s as ut}from"./index-DU8sxbAO.js";import{a as U,b as F,c as R,d as V,e as B,f as xt,F as pt}from"./form-Bt1yLlZE.js";import{I as X}from"./input-C-zd9-6X.js";import{u as ft,D as ht}from"./use-delete-connection-BNbEYahP.js";import{V as gt}from"./layout-BJjatDlM.js";import{c as jt,C as vt,B as bt,a as Nt,b as yt,d as _t,e as Ct}from"./monitoring-stats-row-B1bACC1V.js";import{u as St}from"./use-virtual-mcp-BUyveTe6.js";import{i as Ce}from"./ChevronRight-DJnGkhn4.js";import{a as Se}from"./Users03-BD0tlSQu.js";import{g as we}from"./connection-slug-eyAPH6o3.js";import{n as wt}from"./ZapSquare-Ddm4Ccl_.js";import{T as kt,b as Tt}from"./agent-icon-Dhv8pT4N.js";import{b as It}from"./Tool01-X8GEQ_TP.js";import{C as At}from"./collection-search-CZEXNAkX.js";import{C as Dt}from"./card-BcKfGMCs.js";import{B as $t}from"./badge-arNIH4S4.js";import{c as Pt,d as Ot,e as Mt,D as de}from"./dropdown-menu-Cye9zjaV.js";import{a as me,c as ue,d as xe,S as pe,b as E}from"./select-wye91jBR.js";import{i as zt}from"./CheckCircle-_hRmcUCr.js";import{t as Vt}from"./ChevronDown-DgrWziJW.js";import{n as Et}from"./Container-CCq3u0Gk.js";import{s as ee}from"./Star01-CWHB1ChF.js";import{a as Ut}from"./RefreshCcw01-DESLbhAD.js";import{s as Ft}from"./XClose-Bl-2e8QV.js";import"./collections-BmZbVrT4.js";import"./SearchMd-DlfhE_5j.js";import"./index-B5IXTINZ.js";import"./index-Cf59DRJ6.js";import"./extract-connection-data-C_Q81cim.js";import"./use-registry-connections-4TVYi7-o.js";import"./use-organization-settings-qZ1AM5bR.js";import"./index-BqvsnDAu.js";import"./popover-BcJ5dkfy.js";import"./use-mobile-CrP2KZis.js";import"./use-create-virtual-mcp-Cx6IqxLi.js";import"./use-navigate-to-agent-C3zfnZck.js";import"./User01-Dds7lT_Z.js";import"./use-collections-BosUNiJP.js";import"./X-BDxrsCdA.js";import"./label-B9VSuQAr.js";import"./alert-dialog-C5H0at4x.js";import"./AlertCircle-BKpPv_ue.js";import"./ArrowNarrowLeft-DzI4-MMz.js";import"./XCircle-BJ-0U-0t.js";import"./ArrowUpRight-CgoB9CSG.js";import"./ChevronUp-CYzPfn3Y.js";import"./DotsVertical-om3rzQE9.js";import"./Palette-CN1aN7Xh.js";import"./LinkExternal01-DbNOYo2d.js";import"./Lock01-BsLK0x7P.js";import"./Sun-1aZYqU86.js";import"./Play-CwsBegSF.js";import"./Shield01-DGTwcXqp.js";import"./Zap-B3a3OZUG.js";const Lt=he({scopes:Ae(le()).describe("List of scopes available"),stateSchema:Te(le(),Ie()).describe("JSON Schema (draft-07) defining the state structure")}),Rt=[{name:"MCP_CONFIGURATION",inputSchema:he({}),outputSchema:Lt}];function Bt(s){const e=$.c(39),{instance:n,onConfigure:i,onAuthenticate:r,onDelete:o}=s;let c;e[0]!==n.id?(c={connectionId:n.id},e[0]=n.id,e[1]=c):c=e[1];const d=be(c),l=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,u=l?"border-destructive/50 bg-destructive/5":"border-transparent";let p;e[2]!==u?(p=je("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=p):p=e[3];let a;e[4]!==n.icon||e[5]!==n.title?(a=t.jsx(se,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=a):a=e[6];let f;e[7]!==n.title?(f=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=f):f=e[8];let h;e[9]!==l?(h=l&&t.jsx("span",{className:"text-xs text-destructive font-medium",children:"Needs authorization"}),e[9]=l,e[10]=h):h=e[10];let b;e[11]!==f||e[12]!==h?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[f,h]}),e[11]=f,e[12]=h,e[13]=b):b=e[13];let j;e[14]!==n||e[15]!==l||e[16]!==r?(j=l&&t.jsx(H,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>r(n),children:"Authorize"}),e[14]=n,e[15]=l,e[16]=r,e[17]=j):j=e[17];let v;e[18]!==n||e[19]!==i?(v=()=>i(n),e[18]=n,e[19]=i,e[20]=v):v=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(_e,{size:13}),e[21]=S):S=e[21];let I;e[22]!==v?(I=t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:v,title:"Configure",children:S}),e[22]=v,e[23]=I):I=e[23];let N;e[24]!==n||e[25]!==o?(N=()=>o(n),e[24]=n,e[25]=o,e[26]=N):N=e[26];let w;e[27]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(re,{size:13}),e[27]=w):w=e[27];let k;e[28]!==N?(k=t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:N,title:"Delete",children:w}),e[28]=N,e[29]=k):k=e[29];let _;e[30]!==I||e[31]!==k||e[32]!==j?(_=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j,I,k]}),e[30]=I,e[31]=k,e[32]=j,e[33]=_):_=e[33];let T;return e[34]!==_||e[35]!==p||e[36]!==a||e[37]!==b?(T=t.jsxs("div",{className:p,children:[a,b,_]}),e[34]=_,e[35]=p,e[36]=a,e[37]=b,e[38]=T):T=e[38],T}function Ht(s){const e=$.c(15),{instance:n,onConfigure:i}=s;let r;e[0]!==n.icon||e[1]!==n.title?(r=t.jsx(se,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=r):r=e[2];let o;e[3]!==n.title?(o=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=o):o=e[4];let c;e[5]!==n||e[6]!==i?(c=()=>i(n),e[5]=n,e[6]=i,e[7]=c):c=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(_e,{size:13}),e[8]=d):d=e[8];let m;e[9]!==c?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:c,title:"Configure",children:d})}),e[9]=c,e[10]=m):m=e[10];let l;return e[11]!==r||e[12]!==o||e[13]!==m?(l=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[r,o,m]}),e[11]=r,e[12]=o,e[13]=m,e[14]=l):l=e[14],l}function Wt(s){const e=$.c(25),{instances:n,onConfigure:i,onAuthenticate:r,onDelete:o,onAdd:c,isAdding:d}=s;if(n.length===0)return null;const m=n.length===1?"Instance":"Instances";let l;e[0]!==m?(l=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m}),e[0]=m,e[1]=l):l=e[1];let u;e[2]!==d?(u=d?t.jsx(ge,{size:13,className:"animate-spin"}):t.jsx(rt,{size:13}),e[2]=d,e[3]=u):u=e[3];let p;e[4]!==d||e[5]!==c||e[6]!==u?(p=t.jsxs(H,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:c,disabled:d,children:[u,"Add instance"]}),e[4]=d,e[5]=c,e[6]=u,e[7]=p):p=e[7];let a;e[8]!==l||e[9]!==p?(a=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[l,p]}),e[8]=l,e[9]=p,e[10]=a):a=e[10];let f;if(e[11]!==n||e[12]!==r||e[13]!==i||e[14]!==o){let j;e[16]!==r||e[17]!==i||e[18]!==o?(j=v=>t.jsx(G.Suspense,{fallback:t.jsx(Ht,{instance:v,onConfigure:i}),children:t.jsx(Bt,{instance:v,onConfigure:i,onAuthenticate:r,onDelete:o})},v.id),e[16]=r,e[17]=i,e[18]=o,e[19]=j):j=e[19],f=n.map(j),e[11]=n,e[12]=r,e[13]=i,e[14]=o,e[15]=f}else f=e[15];let h;e[20]!==f?(h=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:f}),e[20]=f,e[21]=h):h=e[21];let b;return e[22]!==a||e[23]!==h?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[a,h]}),e[22]=a,e[23]=h,e[24]=b):b=e[24],b}const Xt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Gt(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const Kt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function qt(s){const e=$.c(3),{connectionId:n,orgId:i,timeframe:r}=s;let o;e[0]!==i?(o={connectionId:et,orgId:i},e[0]=i,e[1]=o):o=e[1];const c=ie(o),d=Gt(r),{data:m}=De({queryKey:oe.connectionActivity(n,r,i),queryFn:async()=>{const f=await c.callTool({name:"MONITORING_LOGS_LIST",arguments:{startDate:d.startDate.toISOString(),endDate:d.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}});return f.structuredContent??f},staleTime:3e5}),l=jt(m?.logs??[],d),u=l.data,p=l.totalCalls>0;let a;return e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[2]=a):a=e[2],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:l.totalCalls.toLocaleString()}),a]}),l.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:l.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),l.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(l.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),p?t.jsxs("div",{children:[t.jsx(vt,{config:Kt,className:"h-16 w-full",children:t.jsxs(bt,{data:u,barCategoryGap:"4%",children:[t.jsx(Nt,{content:t.jsx(yt,{labelFormatter:Jt}),cursor:{fill:"var(--muted)"}}),t.jsx(_t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:u.map(Qt)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[u.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No activity in this period"})})]})}function Qt(s,e){return t.jsx(Ct,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function Jt(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function Yt(){const s=$.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function Zt(s){const e=$.c(13),{connectionId:n}=s,[i,r]=G.useState("14d"),{org:o}=te();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=c):c=e[0];let d;e[1]!==i?(d=Xt.map(a=>t.jsx("button",{type:"button",onClick:()=>r(a.value),className:je("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",i===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a.label},a.value)),e[1]=i,e[2]=d):d=e[2];let m;e[3]!==d?(m=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[c,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:d})]}),e[3]=d,e[4]=m):m=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Yt,{}),e[5]=l):l=e[5];let u;e[6]!==n||e[7]!==o.id||e[8]!==i?(u=t.jsx(G.Suspense,{fallback:l,children:t.jsx(qt,{connectionId:n,orgId:o.id,timeframe:i})}),e[6]=n,e[7]=o.id,e[8]=i,e[9]=u):u=e[9];let p;return e[10]!==m||e[11]!==u?(p=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[m,u]}),e[10]=m,e[11]=u,e[12]=p):p=e[12],p}function es(s){const e=$.c(15),{virtualMcp:n,org:i}=s,r=Q();let o;e[0]!==r||e[1]!==i||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:i,taskId:p},search:{virtualmcpid:n.id}})},e[0]=r,e[1]=i,e[2]=n.id,e[3]=o):o=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Se,{size:16}),e[4]=c):c=e[4];let d;e[5]!==n.icon||e[6]!==n.title?(d=t.jsx(se,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:c}),e[5]=n.icon,e[6]=n.title,e[7]=d):d=e[7];let m;e[8]!==n.title?(m=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=m):m=e[9];let l;e[10]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=l):l=e[10];let u;return e[11]!==o||e[12]!==d||e[13]!==m?(u=t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[d,m,l]}),e[11]=o,e[12]=d,e[13]=m,e[14]=u):u=e[14],u}function ts(s){const e=$.c(7),{virtualMcps:n,org:i}=s;let r;if(e[0]!==i||e[1]!==n){let c;e[3]!==i?(c=d=>t.jsx(es,{virtualMcp:d,org:i},d.id),e[3]=i,e[4]=c):c=e[4],r=n.map(c),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let o;return e[5]!==r?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:r})}),e[5]=r,e[6]=o):o=e[6],o}function ss(s){const e=$.c(7),{connection:n}=s,{org:i}=te();let r;e[0]!==n.id?(r={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=r):r=e[1];const o=St(r);if(!(o.length>0)){let l;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(t.Fragment,{}),e[2]=l):l=e[2],l}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=d):d=e[3];let m;return e[4]!==i.slug||e[5]!==o?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,t.jsx("div",{className:"px-5 py-4",children:t.jsx(ts,{virtualMcps:o,org:i.slug})})]}),e[4]=i.slug,e[5]=o,e[6]=m):m=e[6],m}function ns(s){const e=$.c(30),{tools:n,connectionId:i,org:r}=s,o=Q(),{org:c}=te();let d;e[0]!==i||e[1]!==c.id?(d={connectionId:i,orgId:c.id},e[0]=i,e[1]=c.id,e[2]=d):d=e[2];const m=ie(d),l=Ne(i);let u;e[3]!==l||e[4]!==i?(u=l?we(l):i,e[3]=l,e[4]=i,e[5]=u):u=e[5];const p=u,[a,f]=G.useState("");let h,b,j,v;if(e[6]!==p||e[7]!==m||e[8]!==o||e[9]!==r||e[10]!==a||e[11]!==n){const N=(n??[]).filter(os),w=a.toLowerCase().trim(),k=w?N.filter(g=>g.name.toLowerCase().includes(w)||g.description&&g.description.toLowerCase().includes(w)):N;let _;e[16]!==p||e[17]!==o||e[18]!==r?(_=g=>{o({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(g.name)}})},e[16]=p,e[17]=o,e[18]=r,e[19]=_):_=e[19];const T=_;j="flex flex-col h-full overflow-hidden";let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=g=>{g.key==="Escape"&&(f(""),g.target.blur())},e[20]=y):y=e[20],e[21]!==a?(v=t.jsx(At,{value:a,onChange:f,placeholder:"Search apps...",onKeyDown:y}),e[21]=a,e[22]=v):v=e[22],h="flex-1 overflow-auto p-5",b=k.length===0?t.jsx(ve,{image:null,title:a?"No apps found":"No apps available",description:a?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:k.map(g=>{const P=ae(g._meta);return t.jsxs(Dt,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>T(g),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(st,{resourceURI:P,toolInfo:{tool:g},displayMode:"inline",minHeight:200,maxHeight:200,client:m})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:g.name}),t.jsx(Qe,{annotations:g.annotations,_meta:g._meta})]}),g.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:g.description})]})]},g.name)})}),e[6]=p,e[7]=m,e[8]=o,e[9]=r,e[10]=a,e[11]=n,e[12]=h,e[13]=b,e[14]=j,e[15]=v}else h=e[12],b=e[13],j=e[14],v=e[15];let S;e[23]!==h||e[24]!==b?(S=t.jsx("div",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=S):S=e[25];let I;return e[26]!==j||e[27]!==v||e[28]!==S?(I=t.jsxs("div",{className:j,children:[v,S]}),e[26]=j,e[27]=v,e[28]=S,e[29]=I):I=e[29],I}function os(s){return!!ae(s._meta)}function ke(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=c=>c.charAt(0).toUpperCase()+c.slice(1),i=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),r=e.map(n),o=e[e.length-1];return r.length>=2&&o&&i.has(o)?[r.pop(),...r].join(" "):r.join(" ")}function ne(s){const e=$.c(2),{label:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=i):i=e[1],i}function is(s){const e=$.c(50),{tools:n,prompts:i,resources:r,connectionId:o,org:c}=s;let d;e[0]!==i?(d=i===void 0?[]:i,e[0]=i,e[1]=d):d=e[1];const m=d;let l;e[2]!==r?(l=r===void 0?[]:r,e[2]=r,e[3]=l):l=e[3];const u=l,p=Q(),a=Ne(o??"");let f;e[4]!==a||e[5]!==o?(f=a?we(a):o,e[4]=a,e[5]=o,e[6]=f):f=e[6];const h=f;let b;e[7]!==h||e[8]!==o||e[9]!==p||e[10]!==c?(b=function(A){!o||!c||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:c,appSlug:h,collectionName:"tools",itemId:encodeURIComponent(A)}})},e[7]=h,e[8]=o,e[9]=p,e[10]=c,e[11]=b):b=e[11];const j=b;let v;e[12]!==o||e[13]!==c||e[14]!==n?(v=o&&c&&n.some(ls),e[12]=o,e[13]=c,e[14]=n,e[15]=v):v=e[15];const S=v;if(n.length+m.length+u.length===0){let C;return e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[16]=C):C=e[16],C}let N;e[17]!==n.length?(N=t.jsxs(Y,{value:"tools",variant:"underline",children:["Tools (",n.length,")"]}),e[17]=n.length,e[18]=N):N=e[18];let w;e[19]!==S?(w=S&&t.jsx(Y,{value:"apps",variant:"underline",children:"UI"}),e[19]=S,e[20]=w):w=e[20];let k,_;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Y,{value:"prompts",variant:"underline",children:"Prompts"}),_=t.jsx(Y,{value:"resources",variant:"underline",children:"Resources"}),e[21]=k,e[22]=_):(k=e[21],_=e[22]);let T;e[23]!==N||e[24]!==w?(T=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(ot,{variant:"underline",className:"gap-1",children:[N,w,k,_]})}),e[23]=N,e[24]=w,e[25]=T):T=e[25];let y;e[26]!==j||e[27]!==n?(y=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>j(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(It,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:ke(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(ne,{label:"tools"}),e[26]=j,e[27]=n,e[28]=y):y=e[28];let g;e[29]!==y?(g=t.jsx(Z,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:y})}),e[29]=y,e[30]=g):g=e[30];let P;e[31]!==o||e[32]!==S||e[33]!==c||e[34]!==n?(P=S&&t.jsx(Z,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ns,{tools:n,connectionId:o,org:c})}),e[31]=o,e[32]=S,e[33]=c,e[34]=n,e[35]=P):P=e[35];let M;e[36]!==m?(M=m.length>0?m.map(rs):t.jsx(ne,{label:"prompts"}),e[36]=m,e[37]=M):M=e[37];let O;e[38]!==M?(O=t.jsx(Z,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:M})}),e[38]=M,e[39]=O):O=e[39];let D;e[40]!==u?(D=u.length>0?u.map(as):t.jsx(ne,{label:"resources"}),e[40]=u,e[41]=D):D=e[41];let z;e[42]!==D?(z=t.jsx(Z,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:D})}),e[42]=D,e[43]=z):z=e[43];let x;return e[44]!==T||e[45]!==g||e[46]!==P||e[47]!==O||e[48]!==z?(x=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(it,{defaultValue:"tools",variant:"underline",children:[T,g,P,O,z]})}),e[44]=T,e[45]=g,e[46]=P,e[47]=O,e[48]=z,e[49]=x):x=e[49],x}function as(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(kt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function rs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(wt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:ke(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function ls(s){return ae(s._meta)}function cs(s){const e=$.c(13),{connection:n,displayTitle:i}=s,r=i??n.title;let o;e[0]!==n.icon||e[1]!==r?(o=t.jsx(se,{icon:n.icon,name:r,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=r,e[2]=o):o=e[2];let c;e[3]!==r?(c=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:r})}),e[3]=r,e[4]=c):c=e[4];let d;e[5]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=d):d=e[6];let m;e[7]!==c||e[8]!==d?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,d]}),e[7]=c,e[8]=d,e[9]=m):m=e[9];let l;return e[10]!==o||e[11]!==m?(l=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[o,m]}),e[10]=o,e[11]=m,e[12]=l):l=e[12],l}function ds({form:s,connection:e,hasOAuthToken:n,onReauthenticate:i,onRemoveOAuth:r}){const o=ce({control:s.control,name:"ui_type"}),c=ce({control:s.control,name:"connection_url"}),{stdioEnabled:d}=$e(),m=(()=>{if(typeof c!="string"||!c)return!1;try{const a=new URL(c);return a.hostname==="api.githubcopilot.com"&&a.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),l=d||e.connection_type==="STDIO",u=e.connection_type==="VIRTUAL",p=u?Pe(e.connection_url):null;return u?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Se,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(U,{control:s.control,name:"ui_type",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(me,{value:a.value,onValueChange:a.onChange,children:[t.jsx(V,{children:t.jsxs(ue,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ee,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(xe,{})]})}),t.jsxs(pe,{children:[t.jsx(E,{value:"HTTP",children:"HTTP"}),t.jsx(E,{value:"SSE",children:"SSE"}),t.jsx(E,{value:"Websocket",children:"Websocket"}),l&&t.jsxs(t.Fragment,{children:[t.jsx(E,{value:"NPX",children:"NPX Package"}),t.jsx(E,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(U,{control:s.control,name:"connection_url",render:({field:f})=>t.jsx(F,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(X,{placeholder:"https://example.com/mcp",...f,value:f.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(me,{value:a.value,onValueChange:a.onChange,children:[t.jsx(V,{children:t.jsx(ue,{className:"h-10",children:t.jsx(xe,{})})}),t.jsxs(pe,{children:[t.jsx(E,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ee,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(E,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ee,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(E,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ee,{className:"w-4 h-4"}),"Websocket"]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(E,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(E,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Tt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(B,{})]})}),o==="NPX"&&t.jsx(U,{control:s.control,name:"npx_package",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(V,{children:t.jsx(X,{placeholder:"@perplexity-ai/mcp-server",...a,value:a.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(U,{control:s.control,name:"stdio_command",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(V,{children:t.jsx(X,{placeholder:"node, bun, python...",...a,value:a.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})}),t.jsx(U,{control:s.control,name:"stdio_args",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(V,{children:t.jsx(X,{placeholder:"arg1 arg2 --flag value",...a,value:a.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(B,{})]})})]}),t.jsx(U,{control:s.control,name:"stdio_cwd",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(V,{children:t.jsx(X,{placeholder:"/path/to/project (optional)",...a,value:a.value||"",className:"h-10 rounded-lg"})}),t.jsx(B,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(U,{control:s.control,name:"env_vars",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(V,{children:t.jsx(Be,{value:a.value??[],onChange:a.onChange})}),t.jsx(B,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(U,{control:s.control,name:"connection_token",render:({field:a})=>t.jsxs(F,{className:"flex flex-col gap-3",children:[t.jsx(R,{className:"text-xs text-muted-foreground font-medium",children:m?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Pt,{children:[t.jsx(Ot,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs($t,{variant:"success",className:"gap-1.5",children:[t.jsx(zt,{size:12}),"Authenticated via OAuth",t.jsx(Vt,{size:12})]})})}),t.jsxs(Mt,{align:"start",children:[t.jsxs(de,{onClick:i,children:[t.jsx(Ut,{size:16}),"Re-authenticate"]}),t.jsxs(de,{variant:"destructive",onClick:r,children:[t.jsx(re,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&a.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>a.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Ft,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(X,{type:"password",placeholder:m?"Paste your GitHub PAT":"Enter access token...",...a,value:a.value||"",className:"h-10 rounded-lg"})}),m&&t.jsxs(xt,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(B,{})]})})]})}function ms(s){return s.command==="npx"}function us(s){return s.args?.find(e=>!e.startsWith("-"))??""}function xs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function fe(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Fe(s.connection_headers)){const i=s.connection_headers,r=We(i.envVars);if(ms(i)){const c=us(i);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:c,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const o=xs(i);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:r}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function ps(s){let e,n=null,i=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=Ge(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",i=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...i&&{connection_token:i},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function fs({connection:s,connectionId:e,org:n,isUpdating:i,tools:r,prompts:o,resources:c,siblings:d}){const m=Q({from:"/$org/settings/connections/$appSlug"}),l=ze(),u=ye(),p=ft({onSuccess:()=>{d.length<=1&&m({to:"/$org/settings/connections",params:{org:n}})}}),[a,f]=G.useState(null),[h,b]=G.useState(!1),j=be({connectionId:e}),{data:v}=Je(),S=v?.data?.members??[],I=a??s,N=S.find(x=>x.userId===I.created_by),k=s?.connection_type==="VIRTUAL"||j.isAuthenticated,_={...s,tools:r},T=Ke(_,Rt),y=Ve({resolver:Ee(He),values:fe(a??s)}),g=y.formState.isDirty,P=async()=>{if(!await y.trigger())return;const C=y.getValues(),A=ps(C),W=a?.id??e;await u.update.mutateAsync({id:W,data:A}),y.reset(C)},M=()=>{y.reset(fe(a??s))},O=async x=>{const{token:C,tokenInfo:A,error:W}=await Le({connectionId:x,scope:"offline_access"});if(W||!C){q.error(`Authentication failed: ${W}`);return}if(A)try{const K=await fetch(`/api/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:A.accessToken,refreshToken:A.refreshToken,expiresIn:A.expiresIn,scope:A.scope,clientId:A.clientId,clientSecret:A.clientSecret,tokenEndpoint:A.tokenEndpoint})});if(!K.ok)console.error("Failed to save OAuth token:",await K.text()),await u.update.mutateAsync({id:x,data:{connection_token:C}});else try{await u.update.mutateAsync({id:x,data:{}})}catch(J){console.warn("Failed to refresh connection tools after OAuth:",J)}}catch(K){console.error("Error saving OAuth token:",K),await u.update.mutateAsync({id:x,data:{connection_token:C}})}else await u.update.mutateAsync({id:x,data:{connection_token:C}});const L=new URL(`/mcp/${x}`,window.location.origin);await l.invalidateQueries({queryKey:oe.isMCPAuthenticated(L.href,null)}),q.success("Authentication successful")},D=()=>O(s.id),z=async()=>{try{const x=await fetch(`/api/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const A=await x.text();q.error(`Failed to remove OAuth: ${A}`);return}const C=new URL(`/mcp/${s.id}`,window.location.origin);await l.invalidateQueries({queryKey:oe.isMCPAuthenticated(C.href,null)}),q.success("OAuth removed. You can now re-authenticate with a different account.")}catch(x){console.error("Error removing OAuth token:",x),q.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(ht,{...p}),t.jsx(lt,{open:a!==null,onOpenChange:x=>{x||f(null)},children:t.jsxs(ct,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(dt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(mt,{className:"text-base",children:a?.title??s.title}),t.jsx(ut,{className:"text-xs",children:"Update URL, authentication, and other settings"}),N&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected by"}),t.jsx(Ye,{url:N.user?.image??void 0,fallback:N.user?.name??N.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:N.user?.name||N.user?.email})]})]}),t.jsxs(pt,{...y,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(U,{control:y.control,name:"title",render:({field:x})=>t.jsxs(F,{children:[t.jsx(R,{children:"Name"}),t.jsx(V,{children:t.jsx(X,{...x})}),t.jsx(B,{})]})}),t.jsx(U,{control:y.control,name:"description",render:({field:x})=>t.jsxs(F,{children:[t.jsx(R,{children:"Description"}),t.jsx(V,{children:t.jsx(X,{...x,value:x.value||""})}),t.jsx(B,{})]})})]}),t.jsx(ds,{form:y,connection:a??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:D,onRemoveOAuth:z}),t.jsx(qe,{connection:a??s,form:y,hasMcpBinding:T,isMCPAuthenticated:k,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:D,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(H,{onClick:P,disabled:!g||i,className:"flex-1",children:i?"Saving…":"Save changes"}),g&&t.jsx(H,{variant:"outline",onClick:M,children:"Undo"}),t.jsxs(H,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=a??s;f(null),p.requestDelete(x)},children:[t.jsx(re,{size:15}),"Delete"]})]})]},a?.id??s.id)]})}),t.jsx(gt,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(cs,{connection:s,displayTitle:(()=>{const x=d[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(Zt,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Wt,{instances:d,onConfigure:x=>f(x),onAuthenticate:x=>O(x.id),onDelete:x=>p.requestDelete(x),isAdding:h,onAdd:async()=>{b(!0);try{const x=d[0]??s,C=x.title.replace(/\s*\(\d+\)\s*$/,""),A=d.length+1,W=`${C} (${A})`,L=Re("conn");await u.create.mutateAsync({id:L,title:W,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const K=new URL(`/mcp/${L}`,window.location.origin),J=await Ue({url:K.href,token:null});J.supportsOAuth&&!J.isAuthenticated&&await O(L)}finally{b(!1)}}}),t.jsx(ss,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(is,{tools:r,prompts:o,resources:c,connectionId:e,org:n})})]})})]})})]})}function hs(){const s=$.c(38);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/settings/connections/$appSlug"},s[0]=e):e=s[0];const n=Q(e);let i;s[1]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/settings/connections/$appSlug"},s[1]=i):i=s[1];const{appSlug:r,org:o}=Me(i),{org:c}=te(),d=ye();let m;s[2]!==r?(m={slug:r},s[2]=r,s[3]=m):m=s[3];const l=Ze(m),u=l[0]??null,p=u?.id??"",a=p||null;let f;s[4]!==c.id||s[5]!==a?(f={connectionId:a,orgId:c.id},s[4]=c.id,s[5]=a,s[6]=f):f=s[6];const h=ie(f);let b;s[7]!==h?(b={client:h},s[7]=h,s[8]=b):b=s[8];const{data:j}=tt(b);let v;if(s[9]!==u?.tools||s[10]!==p||s[11]!==l||s[12]!==j){const D=j?j.tools.map(ys):(u?.tools??[]).map(Ns);e:{if(l.length<=1){v=D;break e}const z=new Set,x=[],C=vs;for(const A of l){const W=A.id===p?D:C(A.tools);for(const L of W)z.has(L.name)||(z.add(L.name),x.push(L))}v=x.length>0?x:D}s[9]=u?.tools,s[10]=p,s[11]=l,s[12]=j,s[13]=v}else v=s[13];const S=v;let I;s[14]!==h?(I={client:h},s[14]=h,s[15]=I):I=s[15];const{data:N}=at(I);let w;s[16]!==h?(w={client:h},s[16]=h,s[17]=w):w=s[17];const{data:k}=nt(w);let _;s[18]!==N?.prompts?(_=N?.prompts??[],s[18]=N?.prompts,s[19]=_):_=s[19];let T;s[20]!==_?(T=_.map(js),s[20]=_,s[21]=T):T=s[21];const y=T;let g;s[22]!==k?.resources?(g=k?.resources??[],s[22]=k?.resources,s[23]=g):g=s[23];let P;s[24]!==g?(P=g.map(gs),s[24]=g,s[25]=P):P=s[25];const M=P;if(!u){let D;return s[26]!==n||s[27]!==o?(D=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ve,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(H,{variant:"outline",onClick:()=>n({to:"/$org/settings/connections",params:{org:o}}),children:"Back to connections"})})}),s[26]=n,s[27]=o,s[28]=D):D=s[28],D}let O;return s[29]!==d.update.isPending||s[30]!==S||s[31]!==u||s[32]!==p||s[33]!==o||s[34]!==y||s[35]!==M||s[36]!==l?(O=t.jsx(fs,{org:o,connection:u,connectionId:p,isUpdating:d.update.isPending,tools:S,prompts:y,resources:M,siblings:l}),s[29]=d.update.isPending,s[30]=S,s[31]=u,s[32]=p,s[33]=o,s[34]=y,s[35]=M,s[36]=l,s[37]=O):O=s[37],O}function gs(s){return{name:s.name,description:s.description,uri:s.uri}}function js(s){return{name:s.name,description:s.description}}function vs(s){return(s??[]).map(bs)}function bs(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ns(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ys(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function _s(){const s=$.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Oe,{children:t.jsx(G.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(hs,{})})}),s[0]=e):e=s[0],e}function Rn(){const s=$.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(_s,{}),s[0]=e):e=s[0],e}export{Rn as default};
|