decocms 4.367.7 → 4.368.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/dist/client/assets/{AlertCircle-CMdkAjxQ.js → AlertCircle-BKchbppf.js} +1 -1
  2. package/dist/client/assets/{AreaChart-jIv2Q0sS.js → AreaChart-y2C6FBRO.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DGJWLWaL.js → ArrowLeft-BxcCVSsO.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-D_1DZN2N.js → ArrowRight-M0oFo16p.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Bx3jqyJU.js → ArrowUp-DPPS6QAz.js} +1 -1
  6. package/dist/client/assets/{Check-HvrCGvlV.js → Check-ZxK4xe7F.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CQTpywHl.js → CheckCircle-CXCmqtXe.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-dkkIYuGe.js → ChevronRight-B1q4aRdE.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BANcOZ09.js → ChevronUp-Lw2r8wDj.js} +1 -1
  10. package/dist/client/assets/{Copy01-D4tr9F1r.js → Copy01-BdfG_e2R.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-CX8hLF54.js → CreditCard01-C0eii6cH.js} +1 -1
  12. package/dist/client/assets/{Database01-C6v3VKBC.js → Database01-D9xiMFRQ.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-DEpQR8Rs.js → DotsVertical-BHpLZzPU.js} +1 -1
  14. package/dist/client/assets/{Download01-G8ZhNqF3.js → Download01-DAPCTBrh.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-DNwZJRAX.js → ErrorBarContext-B7gfjXfw.js} +1 -1
  16. package/dist/client/assets/{Eye-wRiP-IKY.js → Eye-Bwli19bO.js} +1 -1
  17. package/dist/client/assets/{File02-C5Axd7Wg.js → File02-Bk1dmRy_.js} +1 -1
  18. package/dist/client/assets/{GitBranch01-xiI7ahmy.js → GitBranch01-fGQefizx.js} +1 -1
  19. package/dist/client/assets/{Globe01-BJfrzyV2.js → Globe01-B4gNbsCg.js} +1 -1
  20. package/dist/client/assets/{HardDrive-BtlNN50l.js → HardDrive-D_aROQkn.js} +1 -1
  21. package/dist/client/assets/{Image01-ZQpSr40Q.js → Image01-DTFvmUXj.js} +1 -1
  22. package/dist/client/assets/{Key01-TUQZiePT.js → Key01-CVWwYajp.js} +1 -1
  23. package/dist/client/assets/{Link01-Dubdh0XV.js → Link01-CZbhj0_0.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-DsoIvXMf.js → LinkExternal01-BKxoqAo_.js} +1 -1
  25. package/dist/client/assets/{MessageCircle01-DrVOv17x.js → MessageCircle01-bLbPG2BY.js} +1 -1
  26. package/dist/client/assets/{Monitor01-8akol8yD.js → Monitor01-BPvejB1C.js} +1 -1
  27. package/dist/client/assets/{Package-6pCyxdj-.js → Package-aFD4MTA7.js} +1 -1
  28. package/dist/client/assets/{Palette-8_jSprTt.js → Palette-CPUNhPQw.js} +1 -1
  29. package/dist/client/assets/{Play-B2WDpGm-.js → Play-CIReceJE.js} +1 -1
  30. package/dist/client/assets/{Plus-B6iViyXP.js → Plus-7oGWv8-d.js} +1 -1
  31. package/dist/client/assets/{Printer-1AF1IGx9.js → Printer-DhW8UOTN.js} +1 -1
  32. package/dist/client/assets/{SearchLg-o3jjSP_H.js → SearchLg-gMgT6qJL.js} +1 -1
  33. package/dist/client/assets/{SearchMd-BFooCWLz.js → SearchMd-DBxEPxbW.js} +1 -1
  34. package/dist/client/assets/{Sector-D27lvJUl.js → Sector-BObjIYQg.js} +1 -1
  35. package/dist/client/assets/{Settings02-11lXkxuh.js → Settings02-2akNrypo.js} +1 -1
  36. package/dist/client/assets/{Share07-2izyqHpD.js → Share07-Bl1oEFtE.js} +1 -1
  37. package/dist/client/assets/{Shield01-C_NSoVzs.js → Shield01-D26ePB5X.js} +1 -1
  38. package/dist/client/assets/{Stars01-dQ6_BPZ3.js → Stars01-Dja9PZ8p.js} +1 -1
  39. package/dist/client/assets/{Sun-DqCbyuBS.js → Sun-49v3fDGt.js} +1 -1
  40. package/dist/client/assets/{SwitchHorizontal01-Chrl4_cZ.js → SwitchHorizontal01-1bzMkj1j.js} +1 -1
  41. package/dist/client/assets/{Tool01-DekOr9OW.js → Tool01-DXg-697p.js} +1 -1
  42. package/dist/client/assets/{Tool02-CgXadMFZ.js → Tool02-BZbYKRFW.js} +1 -1
  43. package/dist/client/assets/{Trash01-DwLqZ5iv.js → Trash01-BUixXtcj.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-BJ6ZxGib.js → TrendUp01-WeYCREkX.js} +1 -1
  45. package/dist/client/assets/{Upload01-zIaNWjGg.js → Upload01-51uW4MtH.js} +1 -1
  46. package/dist/client/assets/{User01-Cuc8TQ2e.js → User01-B4JBmtbe.js} +1 -1
  47. package/dist/client/assets/{UserSquare-DO483pcO.js → UserSquare-DXP9QUC0.js} +1 -1
  48. package/dist/client/assets/{Users01-C_FX7NZW.js → Users01-DxH5OmOp.js} +1 -1
  49. package/dist/client/assets/{Users03-CBIUviMz.js → Users03-BNcMDmHT.js} +1 -1
  50. package/dist/client/assets/{X-BbEHf0ox.js → X-BdugDRJ_.js} +1 -1
  51. package/dist/client/assets/{XCircle-CIpucXWN.js → XCircle-frgB9vHw.js} +1 -1
  52. package/dist/client/assets/{XClose-D9lEUPrO.js → XClose-DdmRkPdn.js} +1 -1
  53. package/dist/client/assets/{Zap-FJBBk1lb.js → Zap-BOBZbKzr.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-DR5p3Py1.js → ZoomOut-CG3Sk2c2.js} +1 -1
  55. package/dist/client/assets/{access-gate-BGLq5_fD.js → access-gate-u19iYegA.js} +1 -1
  56. package/dist/client/assets/{add-connection-dialog-CP-mB4l0.js → add-connection-dialog-BMRrs0Iv.js} +1 -1
  57. package/dist/client/assets/{agent-analytics-CwkHNxxG.js → agent-analytics-x1RXtEfy.js} +1 -1
  58. package/dist/client/assets/agent-app-DmoPEJGX.js +1 -0
  59. package/dist/client/assets/agent-assets-BZB74Oo0.js +1 -0
  60. package/dist/client/assets/agent-automation-CLUkoEJi.js +20 -0
  61. package/dist/client/assets/{agent-automations-BUDch-j3.js → agent-automations-S_NNW-G8.js} +1 -1
  62. package/dist/client/assets/{agent-connect-sources-LY53id1I.js → agent-connect-sources-FrFq6kgZ.js} +1 -1
  63. package/dist/client/assets/agent-deck-CmrG0VVN.js +1 -0
  64. package/dist/client/assets/{agent-e2e-CnVObhl4.js → agent-e2e-BftBTu-r.js} +1 -1
  65. package/dist/client/assets/agent-file-C9BmMguw.js +1 -0
  66. package/dist/client/assets/{agent-git-C-KtJQOB.js → agent-git-CUfmHf_3.js} +2 -2
  67. package/dist/client/assets/{agent-hosting-Dr-g2CXP.js → agent-hosting-DYMDraLb.js} +1 -1
  68. package/dist/client/assets/{agent-icon-CL_nl9mo.js → agent-icon-CJ74PZ5u.js} +1 -1
  69. package/dist/client/assets/agent-library-file-BoVX_vwF.js +1 -0
  70. package/dist/client/assets/{agent-monitor-SvCw0nUy.js → agent-monitor-BWVjQWIl.js} +1 -1
  71. package/dist/client/assets/{agent-overview-lLErih75.js → agent-overview-DnPnksSV.js} +1 -1
  72. package/dist/client/assets/agent-settings-B_cAMSa0.js +1 -0
  73. package/dist/client/assets/{agent-site-editor-BukowFNy.js → agent-site-editor-BnZTwUPY.js} +2 -2
  74. package/dist/client/assets/agent-site-editor-code-Dzl6qE-Z.js +2 -0
  75. package/dist/client/assets/{agent-site-editor-content-DtzkoDLB.js → agent-site-editor-content-_eLWfu3Q.js} +2 -2
  76. package/dist/client/assets/{agent-site-editor-preview-DX7U6V5V.js → agent-site-editor-preview-DLXhmiWT.js} +3 -3
  77. package/dist/client/assets/agent-view-Xhiyf05f.js +1 -0
  78. package/dist/client/assets/{agent-view-guard-BMN6ThUt.js → agent-view-guard-CUaQwEO2.js} +1 -1
  79. package/dist/client/assets/{agents-list-C6ZSW07I.js → agents-list-BXNTO5vo.js} +1 -1
  80. package/dist/client/assets/{ai-providers-D2C1qlv0.js → ai-providers-DbzV8bxo.js} +2 -2
  81. package/dist/client/assets/{alert-0Lc8v4N7.js → alert-DXUzroby.js} +1 -1
  82. package/dist/client/assets/{alert-dialog-BcLnZa7A.js → alert-dialog-92GutrH9.js} +1 -1
  83. package/dist/client/assets/{api-keys-Cf6bK86U.js → api-keys-B2Xef8ny.js} +1 -1
  84. package/dist/client/assets/api-keys-Cb3SKZFn.js +1 -0
  85. package/dist/client/assets/app-editor-xKEqzK0v.js +1 -0
  86. package/dist/client/assets/{asset-utils-DIsXFmtL.js → asset-utils-B5fY-BSK.js} +1 -1
  87. package/dist/client/assets/{auth-DqeCOVzg.js → auth-BrGex7FY.js} +1 -1
  88. package/dist/client/assets/{auth-catchall-BNIBQ_XR.js → auth-catchall-BIV239MQ.js} +1 -1
  89. package/dist/client/assets/{auth-entry-Bq32N4lt.js → auth-entry-CFDXzmrD.js} +1 -1
  90. package/dist/client/assets/{auth-split-layout-DliwYz65.js → auth-split-layout-CBVOXOwN.js} +1 -1
  91. package/dist/client/assets/{authenticate-and-persist-oauth-Eoth2qMz.js → authenticate-and-persist-oauth-CUN-wLn1.js} +1 -1
  92. package/dist/client/assets/{automation-list-row-CpdfZzhf.js → automation-list-row-Co6ffDdp.js} +1 -1
  93. package/dist/client/assets/{automation-runs-DIEXu2AA.js → automation-runs-BNk-ou9m.js} +1 -1
  94. package/dist/client/assets/{automations-BpBth9hu.js → automations-COrNd8f4.js} +1 -1
  95. package/dist/client/assets/{autosend-2Y4HgA_T.js → autosend-mHJRckjC.js} +1 -1
  96. package/dist/client/assets/{avatar-YOwDvuCo.js → avatar-ubLaXORO.js} +1 -1
  97. package/dist/client/assets/{badge-CKy1DnEV.js → badge-DyIAknWc.js} +1 -1
  98. package/dist/client/assets/{block-document-aP19FM_M.js → block-document-WjNTO6O1.js} +1 -1
  99. package/dist/client/assets/{blocks-preview-workspace-context-DP5_u2Xp.js → blocks-preview-workspace-context-XPDRiBEY.js} +1 -1
  100. package/dist/client/assets/{breadcrumb-BY8W5NfH.js → breadcrumb-D0FcEht9.js} +1 -1
  101. package/dist/client/assets/{buckets-Bhe2phyM.js → buckets-D4XExOV7.js} +1 -1
  102. package/dist/client/assets/{build-improve-prompt-doc-DVZMfB_k.js → build-improve-prompt-doc-BmggPsYr.js} +1 -1
  103. package/dist/client/assets/{bulk-category-panel-dbBPINFu.js → bulk-category-panel-D_4Fv25D.js} +1 -1
  104. package/dist/client/assets/{calendar-O0niDXgD.js → calendar-B1_9FUxA.js} +1 -1
  105. package/dist/client/assets/{capability-load-error-JtYpAIDC.js → capability-load-error-CfjThErO.js} +1 -1
  106. package/dist/client/assets/{cards-CljnVFGF.js → cards-DzbRsseW.js} +1 -1
  107. package/dist/client/assets/category-editor-DkUyXLbS.js +1 -0
  108. package/dist/client/assets/{chart-DjxuH9z1.js → chart-Ei5Re4Wl.js} +1 -1
  109. package/dist/client/assets/{chat-context-DT13Ns9e.js → chat-context-CwBa4iNq.js} +1 -1
  110. package/dist/client/assets/{chat-draft-Bp7WKsio.js → chat-draft-DNmqFUGc.js} +1 -1
  111. package/dist/client/assets/{checkbox-BAc6ON84.js → checkbox-BzsCo22G.js} +1 -1
  112. package/dist/client/assets/{choose-editor-Db-m1tPL.js → choose-editor-GkG7SXyC.js} +1 -1
  113. package/dist/client/assets/{cli-auth-success-ORnUB4EZ.js → cli-auth-success-CMF0dFZs.js} +1 -1
  114. package/dist/client/assets/{client-icons-DH-s5V8p.js → client-icons-BwjZD78C.js} +1 -1
  115. package/dist/client/assets/{collapsible-Cfc5GOq6.js → collapsible-C1favzij.js} +1 -1
  116. package/dist/client/assets/{collection-detail-tLNt3mFd.js → collection-detail-BqWAJ7EW.js} +1 -1
  117. package/dist/client/assets/{collection-display-button-Q83lUSRW.js → collection-display-button-BJZ15cTd.js} +1 -1
  118. package/dist/client/assets/{collection-search-DOotlcr-.js → collection-search-aDCUzq7X.js} +1 -1
  119. package/dist/client/assets/{collection-table-wrapper-L7fq3Ewq.js → collection-table-wrapper-B8I7NupJ.js} +1 -1
  120. package/dist/client/assets/{collection-tabs-77YTqRx_.js → collection-tabs-CCTSLIp7.js} +1 -1
  121. package/dist/client/assets/{command-BbfSNpjK.js → command-Bp6cp4pI.js} +1 -1
  122. package/dist/client/assets/{command-palette-store-CDXRiKfb.js → command-palette-store-DOa5piDf.js} +1 -1
  123. package/dist/client/assets/{companion-mcps-section-B3OT3fvW.js → companion-mcps-section-DEio5Adg.js} +1 -1
  124. package/dist/client/assets/{connect-DYMJSd71.js → connect-BY6uXdow.js} +2 -2
  125. package/dist/client/assets/{connect-layout-Cb-8wVa_.js → connect-layout-CP69O37i.js} +1 -1
  126. package/dist/client/assets/{connection-C0h_riCe.js → connection-BZn_3MEZ.js} +1 -1
  127. package/dist/client/assets/{connection-card-BnHVqPYb.js → connection-card-COXej074.js} +1 -1
  128. package/dist/client/assets/{connection-detail-BukOET2K.js → connection-detail-DHx2IRY4.js} +1 -1
  129. package/dist/client/assets/{connection-form-helpers-BGarejHH.js → connection-form-helpers-bnj5C_pO.js} +1 -1
  130. package/dist/client/assets/{connections-C94wvfI_.js → connections-H2nz3ZOT.js} +1 -1
  131. package/dist/client/assets/{create-organization-dialog-BeMHfEec.js → create-organization-dialog-Dhjwuvqa.js} +1 -1
  132. package/dist/client/assets/{decofile-api-D5P6O-Yb.js → decofile-api-BEtZILgN.js} +1 -1
  133. package/dist/client/assets/{decopilot-DEim_pMB.js → decopilot-B6xCVEQX.js} +1 -1
  134. package/dist/client/assets/{dialog-DIO2BT5L.js → dialog-BCc5hlgI.js} +1 -1
  135. package/dist/client/assets/{discover-zXR45UVE.js → discover-Djoq-knv.js} +1 -1
  136. package/dist/client/assets/{domain-settings-CoxAhG8y.js → domain-settings-B68OapeG.js} +1 -1
  137. package/dist/client/assets/{download-app-dialog-B-5SSg-B.js → download-app-dialog-CS9xCo3l.js} +1 -1
  138. package/dist/client/assets/{drawer-Dp27hT9C.js → drawer-CQ6YvWyB.js} +1 -1
  139. package/dist/client/assets/{dropdown-menu-BzAnwSL0.js → dropdown-menu-tx6OX4aA.js} +1 -1
  140. package/dist/client/assets/{editor-Dm21YC6a.js → editor-BpQ5Scxi.js} +3 -3
  141. package/dist/client/assets/{empty-state-CvrLm3VU.js → empty-state-BTjMWx5H.js} +1 -1
  142. package/dist/client/assets/{empty-state-F709JYnF.js → empty-state-ClkrHYmJ.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-Cfd0L2y0.js → extract-connection-data-QX25cgiT.js} +1 -1
  144. package/dist/client/assets/{feature-gate-CSQct_zD.js → feature-gate-DqjkAi9M.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-Cd5ZGlWk.js → feature-paywall-b3qZoNCL.js} +1 -1
  146. package/dist/client/assets/{file-explorer-B6MMR_br.js → file-explorer-vmaCniEv.js} +1 -1
  147. package/dist/client/assets/{file-preview-B3un6Sja.js → file-preview-9280F33a.js} +1 -1
  148. package/dist/client/assets/{file-share-button-BXZcNnFk.js → file-share-button-Cqn5Q-hj.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-CzM4dKXx.js → file-type-icon-Dxp-Ok2P.js} +1 -1
  150. package/dist/client/assets/{folder-icon-Bjs4wWQI.js → folder-icon-DfnI9Lc8.js} +1 -1
  151. package/dist/client/assets/{form-DGoweIp4.js → form-CCEoicAR.js} +1 -1
  152. package/dist/client/assets/{gateway-client-BKFdOqFV.js → gateway-client-CgyUBlgw.js} +1 -1
  153. package/dist/client/assets/{general-BER62NBk.js → general-BlaLbOSk.js} +1 -1
  154. package/dist/client/assets/{github-icon-D5mzGkJ1.js → github-icon-BWfLdLT4.js} +1 -1
  155. package/dist/client/assets/home-sj-ZTRkz.js +1 -0
  156. package/dist/client/assets/{hooks-DOi6gVdi.js → hooks-BsQ1zp8y.js} +2 -2
  157. package/dist/client/assets/{hooks-DW28Wv6W.js → hooks-CBQzxxCh.js} +1 -1
  158. package/dist/client/assets/{index-kzbDuxts.js → index-CUJMnria.js} +1 -1
  159. package/dist/client/assets/{index-C7nGODiq.js → index-CYsKkgvq.js} +1 -1
  160. package/dist/client/assets/{index-DDHop146.js → index-CZJ5G35_.js} +1 -1
  161. package/dist/client/assets/{index-DX88U1Fe.js → index-C_lmrR_C.js} +2 -2
  162. package/dist/client/assets/{index-BKjzqVX4.js → index-CalU-CTh.js} +1 -1
  163. package/dist/client/assets/{index-BqEX4CxD.js → index-CuNhd5EW.js} +1 -1
  164. package/dist/client/assets/{index-D3hBrAe3.js → index-Cw7IXwLo.js} +1 -1
  165. package/dist/client/assets/{index-BiIMwVbK.js → index-Cze73w-G.js} +1 -1
  166. package/dist/client/assets/{index-D9Pa20nR.js → index-D4pBLhg9.js} +1 -1
  167. package/dist/client/assets/{index-C9jQATHx.js → index-D9SZCEna.js} +5 -5
  168. package/dist/client/assets/{index-ebCjSNwh.js → index-DXfPYL8S.js} +39 -39
  169. package/dist/client/assets/{index-CLBWHxV4.js → index-DaYZAl9-.js} +1 -1
  170. package/dist/client/assets/{index-Ch3pSh1a.js → index-nvVwQgfX.js} +1 -1
  171. package/dist/client/assets/{index-26VXD9YQ.js → index-p-pFkjAj.js} +1 -1
  172. package/dist/client/assets/{index-redirect-bdPeOdFP.js → index-redirect-CPyK66Hq.js} +1 -1
  173. package/dist/client/assets/{index-BVdPTogP.js → index-unCC-6KL.js} +1 -1
  174. package/dist/client/assets/{infiniteQueryObserver-CrlFqUXS.js → infiniteQueryObserver-D3qec4tz.js} +1 -1
  175. package/dist/client/assets/{infra-billing-DBRnO5Xv.js → infra-billing-B8nXBSDz.js} +1 -1
  176. package/dist/client/assets/{input-BfoQkl5k.js → input-5SO3LEdl.js} +1 -1
  177. package/dist/client/assets/{input-DxpPAL6X.js → input-AeTUfj6S.js} +2 -2
  178. package/dist/client/assets/{input-DCAbperr.js → input-DMN2ylja.js} +1 -1
  179. package/dist/client/assets/{integration-icon-DLbXRirx.js → integration-icon-B1sz4SeY.js} +1 -1
  180. package/dist/client/assets/{label-BZvBRfsC.js → label-Dh9EjnVS.js} +1 -1
  181. package/dist/client/assets/{last-preview-page-DgNuT4mN.js → last-preview-page-D52M-8kD.js} +1 -1
  182. package/dist/client/assets/{layout-D_2jgeSQ.js → layout-DSbF9Fai.js} +1 -1
  183. package/dist/client/assets/{legacy-agents-deep-D9-8wOwe.js → legacy-agents-deep-CO4Cj3Kz.js} +1 -1
  184. package/dist/client/assets/{legacy-main-redirect-U48xVXg3.js → legacy-main-redirect-DyjtdITZ.js} +1 -1
  185. package/dist/client/assets/{library-DCHuYHcg.js → library-rJr5R-_-.js} +2 -2
  186. package/dist/client/assets/{login-DLU4Kv--.js → login-ByroOa_7.js} +1 -1
  187. package/dist/client/assets/{markdown-BxIxTFHX.js → markdown-08bGGv35.js} +33 -33
  188. package/dist/client/assets/{mcp-app-renderer-C5_SSFlp.js → mcp-app-renderer-BrDqPGAT.js} +1 -1
  189. package/dist/client/assets/{mcp-oauth-Cj16tOMc.js → mcp-oauth-DssHToM4.js} +1 -1
  190. package/dist/client/assets/{members-B8ghL5vq.js → members-1ss87Nz0.js} +1 -1
  191. package/dist/client/assets/{message-templates-C0k0djOm.js → message-templates-BTVMJzpL.js} +1 -1
  192. package/dist/client/assets/{mini-report-page-DPr8miDS.js → mini-report-page-CX7HMNh4.js} +1 -1
  193. package/dist/client/assets/{mock-board-CLCjiMWY.js → mock-board-jgxOM55G.js} +3 -3
  194. package/dist/client/assets/{monaco-editor-D7KtEG80.js → monaco-editor-DJxPzejh.js} +1 -1
  195. package/dist/client/assets/{monitoring-stats-row-C8qE8vIX.js → monitoring-stats-row-wjNhJJbD.js} +1 -1
  196. package/dist/client/assets/{multi-select-PUmjNPLo.js → multi-select-7rs5llE7.js} +1 -1
  197. package/dist/client/assets/{mustache-DoPKkDOt.js → mustache-vWrD4L5A.js} +1 -1
  198. package/dist/client/assets/{oauth-callback-yzNiiBZS.js → oauth-callback-Dh7kJbIE.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-ai-provider-BkPGppSA.js → oauth-callback-ai-provider-BR4KOwpH.js} +1 -1
  200. package/dist/client/assets/{onboarding-DNDx-VJt.js → onboarding-NaMysfKu.js} +1 -1
  201. package/dist/client/assets/{optimistic-project-sidebar-views-DQAcmOUC.js → optimistic-project-sidebar-views-CnXa40yZ.js} +1 -1
  202. package/dist/client/assets/org-file-open-context-GfBe4Lpi.js +1 -0
  203. package/dist/client/assets/{organization-choice-X5fcp7VC.js → organization-choice-BKxMxoJn.js} +1 -1
  204. package/dist/client/assets/{orgs-C71bHZfS.js → orgs-BvzvadNE.js} +1 -1
  205. package/dist/client/assets/{page-seo-form-CJ5C4DO5.js → page-seo-form-D3Ps7cZw.js} +1 -1
  206. package/dist/client/assets/{pair-D4JmcK-t.js → pair-kWiwbnho.js} +1 -1
  207. package/dist/client/assets/{plan-ladder-CQ1a44li.js → plan-ladder-CY-Z8Ivq.js} +1 -1
  208. package/dist/client/assets/{popover-cYfVOF_J.js → popover-BGd36YgB.js} +1 -1
  209. package/dist/client/assets/post-calendar-DYYzvYLc.js +1 -0
  210. package/dist/client/assets/post-editor-CaCmWj6J.js +1 -0
  211. package/dist/client/assets/{preview-content-DlgGWAMY.js → preview-content-Boo_eVop.js} +1 -1
  212. package/dist/client/assets/{preview-dialog-DMVdVz_V.js → preview-dialog-DHXJPLGL.js} +1 -1
  213. package/dist/client/assets/{primitives-7Kw_jkKz.js → primitives-CKaN1rNH.js} +1 -1
  214. package/dist/client/assets/{profile-fIXgfLVj.js → profile-N__YV02p.js} +1 -1
  215. package/dist/client/assets/{project-app-view-DpkzCjxR.js → project-app-view-DNS5eCSn.js} +1 -1
  216. package/dist/client/assets/{project-feed-D1Rnls8q.js → project-feed-5BgkxnYg.js} +1 -1
  217. package/dist/client/assets/{project-icon-CWg_rHTZ.js → project-icon-DQkQSxZw.js} +1 -1
  218. package/dist/client/assets/project-reports-CqxK4fWT.js +1 -0
  219. package/dist/client/assets/project-tasks-IgbELLeD.js +1 -0
  220. package/dist/client/assets/{prompts-D1i8e1V8.js → prompts-Dl4z55pl.js} +1 -1
  221. package/dist/client/assets/record-editor-DsEcUGgo.js +1 -0
  222. package/dist/client/assets/redirect-editor-kShoD3Wd.js +1 -0
  223. package/dist/client/assets/{registry-layout-r2D039nl.js → registry-layout-DI-hF5m1.js} +1 -1
  224. package/dist/client/assets/registry-yh_1oSSj.js +2 -0
  225. package/dist/client/assets/reports-C1ta3Pms.js +1 -0
  226. package/dist/client/assets/{reports-TdOY4KuN.js → reports-gEiYrZM5.js} +1 -1
  227. package/dist/client/assets/{reports-onboarding-s05s2vjv.js → reports-onboarding-DHaOLYgm.js} +1 -1
  228. package/dist/client/assets/{reports-tab-D0Xwzbct.js → reports-tab-Cz8M-Vq9.js} +2 -2
  229. package/dist/client/assets/{repositories-JDvNAhI8.js → repositories-B1iivH6M.js} +1 -1
  230. package/dist/client/assets/{repository-import-picker-BNluAY2V.js → repository-import-picker-JrKf0rR5.js} +1 -1
  231. package/dist/client/assets/{repository-picker-D9agNhNi.js → repository-picker-CV4V7DF8.js} +1 -1
  232. package/dist/client/assets/{require-capability-DjYcyxbJ.js → require-capability-Td9HSP5v.js} +1 -1
  233. package/dist/client/assets/{required-auth-layout-C3o3t9X1.js → required-auth-layout-O-2fosqz.js} +1 -1
  234. package/dist/client/assets/{reset-password-DOQza5N6.js → reset-password-DMz0UAEt.js} +1 -1
  235. package/dist/client/assets/{resizable-BHYHfZY5.js → resizable-hHcftR57.js} +1 -1
  236. package/dist/client/assets/{review-settings-zUGfHLOe.js → review-settings-CkVsqJxm.js} +1 -1
  237. package/dist/client/assets/{rich-text-link-control-BMZBKHAS.js → rich-text-link-control-xyc77eAl.js} +1 -1
  238. package/dist/client/assets/{roles-CbYdUx8a.js → roles-DRF0sXxE.js} +1 -1
  239. package/dist/client/assets/{route--XOZLXQj.js → route-CG8hkNwT.js} +1 -1
  240. package/dist/client/assets/{route-BMqM-gRN.js → route-Cy-w3Fp7.js} +1 -1
  241. package/dist/client/assets/route-DOgOyrYA.js +1 -0
  242. package/dist/client/assets/{runnable-block-editor-eIl1ZAUD.js → runnable-block-editor-Db5dXcSl.js} +1 -1
  243. package/dist/client/assets/{sandbox-lifecycle-context-dIh2VE9T.js → sandbox-lifecycle-context-YzrdyqTe.js} +1 -1
  244. package/dist/client/assets/{schema-DLCqAhaO.js → schema-DobnB1YS.js} +1 -1
  245. package/dist/client/assets/{scroll-area-B6yfQzTQ.js → scroll-area-lKTlOT_0.js} +1 -1
  246. package/dist/client/assets/{search-input-B9FxoKon.js → search-input-BsvR49ic.js} +1 -1
  247. package/dist/client/assets/{secrets-Ckg8Rd0M.js → secrets-CvmXb4jS.js} +1 -1
  248. package/dist/client/assets/{sections-editor-DfusxW9l.js → sections-editor-BL8f9i5C.js} +2 -2
  249. package/dist/client/assets/{select-BemZ3-RS.js → select-D8neBfTB.js} +1 -1
  250. package/dist/client/assets/{select-model-Dt_mcRLi.js → select-model-Ckl_Fui7.js} +1 -1
  251. package/dist/client/assets/seo-editor-kdZ3qtF5.js +1 -0
  252. package/dist/client/assets/{settings-tab-W9gLVP9Y.js → settings-tab-DHNqjcoa.js} +1 -1
  253. package/dist/client/assets/{sheet-CAYJdNnO.js → sheet-CgrtO55N.js} +1 -1
  254. package/dist/client/assets/{shell-layout-BZ9RU057.js → shell-layout-BJKVf96_.js} +1 -1
  255. package/dist/client/assets/{sidebar-kfvz7bzl.js → sidebar-CiHAL8Wu.js} +1 -1
  256. package/dist/client/assets/{skill-preview-DKoageod.js → skill-preview-mcEHLHpL.js} +1 -1
  257. package/dist/client/assets/skills-DqE-vPtp.js +1 -0
  258. package/dist/client/assets/{sso-aIkFrBYs.js → sso-CMeXDyDr.js} +1 -1
  259. package/dist/client/assets/{store-PyPRbE--.js → store-BjgehfaI.js} +1 -1
  260. package/dist/client/assets/store-registry-W_KtCEiD.js +2 -0
  261. package/dist/client/assets/{switch-CwYc17c1.js → switch-fMRKTd8o.js} +1 -1
  262. package/dist/client/assets/{synced-repos-LBwJXWce.js → synced-repos-D08q7iIK.js} +1 -1
  263. package/dist/client/assets/{table-Dk8JamWN.js → table-Clh8UGCw.js} +1 -1
  264. package/dist/client/assets/{tabs-CScSsCn-.js → tabs-BSBLIBXv.js} +1 -1
  265. package/dist/client/assets/{task-board-WxptS5oC.js → task-board-Cw7pQ9f8.js} +1 -1
  266. package/dist/client/assets/{task-route-CgUDYaF5.js → task-route-BcG-Y9vh.js} +1 -1
  267. package/dist/client/assets/{task-status-DYV2rHq2.js → task-status-BVBWAfWD.js} +1 -1
  268. package/dist/client/assets/tasks-CrfaMYqW.js +1 -0
  269. package/dist/client/assets/{tasks-Dyp4w1ZL.js → tasks-x1afrsv8.js} +4 -4
  270. package/dist/client/assets/{textarea-C-rDHIo4.js → textarea-DRjwrMCJ.js} +1 -1
  271. package/dist/client/assets/{thread-intent-Dqbb6tX6.js → thread-intent-CC6uL69b.js} +1 -1
  272. package/dist/client/assets/{thread-route-B7ApJPMo.js → thread-route-BGLKWWbA.js} +1 -1
  273. package/dist/client/assets/{thread-route-DGpNj7En.js → thread-route-DvFwa34h.js} +1 -1
  274. package/dist/client/assets/{thread-sheet-body-CXERmuvO.js → thread-sheet-body-DtBk50q_.js} +1 -1
  275. package/dist/client/assets/{toggle-group-BwAc-516.js → toggle-group-CFBKi1GU.js} +1 -1
  276. package/dist/client/assets/{toolbar-icon-button-D5CIjxUn.js → toolbar-icon-button-C8vKnpxW.js} +1 -1
  277. package/dist/client/assets/{tooltip-D5dIOzcQ.js → tooltip-BM4MyYtx.js} +1 -1
  278. package/dist/client/assets/{track-CfasnexS.js → track-BnjuU_Aa.js} +1 -1
  279. package/dist/client/assets/{types-BKgDxdgt.js → types-OTmzvENk.js} +1 -1
  280. package/dist/client/assets/{usage-stats-CzjkHtFz.js → usage-stats-BtXxJtjV.js} +1 -1
  281. package/dist/client/assets/{use-ai-providers-DHpBr525.js → use-ai-providers-D3pmon60.js} +1 -1
  282. package/dist/client/assets/{use-automations-D8fUWM0i.js → use-automations-DToyPFV1.js} +1 -1
  283. package/dist/client/assets/{use-autosave-BcXFrygg.js → use-autosave-BU_qHXev.js} +1 -1
  284. package/dist/client/assets/{use-connect-companion-BI8_ITvf.js → use-connect-companion-BpCoDO4S.js} +1 -1
  285. package/dist/client/assets/{use-connection-1DEAzFaJ.js → use-connection-B3V4uZfg.js} +1 -1
  286. package/dist/client/assets/{use-copy-CrTQ1bFc.js → use-copy-KnHqebR6.js} +1 -1
  287. package/dist/client/assets/{use-create-virtual-mcp-6onzYx_V.js → use-create-virtual-mcp-2UYwG6y3.js} +1 -1
  288. package/dist/client/assets/{use-date-fns-locale-CKJk6bHw.js → use-date-fns-locale-BWw8dghC.js} +1 -1
  289. package/dist/client/assets/{use-debounced-autosave-CscEX7LB.js → use-debounced-autosave-BHeNLff-.js} +1 -1
  290. package/dist/client/assets/{use-debounced-value-Cd1Twr6w.js → use-debounced-value-BGWej6mZ.js} +1 -1
  291. package/dist/client/assets/{use-deco-credits-DXbh8RF9.js → use-deco-credits-D-Neva26.js} +1 -1
  292. package/dist/client/assets/{use-decopilot-events-BorkAE1x.js → use-decopilot-events-DkwYxfvc.js} +1 -1
  293. package/dist/client/assets/{use-delete-connection-D14lo6hH.js → use-delete-connection-CzgqXCsw.js} +1 -1
  294. package/dist/client/assets/{use-deployment-admin-CnWMkexv.js → use-deployment-admin-BD8J4rzi.js} +1 -1
  295. package/dist/client/assets/{use-entitlements-CW1G9reZ.js → use-entitlements-TTRAg4gu.js} +1 -1
  296. package/dist/client/assets/{use-fast-preview-draft-url-C6GlSiLC.js → use-fast-preview-draft-url-CiAYOF7M.js} +1 -1
  297. package/dist/client/assets/{use-file-configs-CIuxe_Ni.js → use-file-configs-Ckmsn28x.js} +1 -1
  298. package/dist/client/assets/{use-infinite-scroll-C3V6bChR.js → use-infinite-scroll-gZkFm8Rv.js} +1 -1
  299. package/dist/client/assets/{use-join-requests-D9RxS7KW.js → use-join-requests-FhpmlLIv.js} +1 -1
  300. package/dist/client/assets/{use-main-panel-tabs-DXkaeHMV.js → use-main-panel-tabs-IpsUP9Wl.js} +1 -1
  301. package/dist/client/assets/{use-mcp-auth-status-BH9IDFQ1.js → use-mcp-auth-status-C9YFSjt7.js} +1 -1
  302. package/dist/client/assets/{use-mcp-client-2uEIRhaM.js → use-mcp-client-DSGHqAYD.js} +1 -1
  303. package/dist/client/assets/{use-mcp-prompts-CoIIHF5C.js → use-mcp-prompts-Dne6CipL.js} +1 -1
  304. package/dist/client/assets/{use-mcp-tools-BEXh2Dal.js → use-mcp-tools-5LthbFq_.js} +1 -1
  305. package/dist/client/assets/{use-members-B9Bp6K2N.js → use-members-vJs6czuz.js} +1 -1
  306. package/dist/client/assets/{use-mobile-CpN-x3jP.js → use-mobile-C5k18fP1.js} +1 -1
  307. package/dist/client/assets/{use-navigate-to-agent-D91bju80.js → use-navigate-to-agent-qRyehLE-.js} +1 -1
  308. package/dist/client/assets/{use-open-billing-url-BerGO0rw.js → use-open-billing-url-Bn4c7bA3.js} +1 -1
  309. package/dist/client/assets/{use-org-auth-client-r5wiYH2P.js → use-org-auth-client-BfT_gcIU.js} +1 -1
  310. package/dist/client/assets/{use-org-fs-Bts9OSaP.js → use-org-fs-CY3ClF__.js} +1 -1
  311. package/dist/client/assets/{use-org-notice-CoJcS75H.js → use-org-notice-DXInzY6B.js} +1 -1
  312. package/dist/client/assets/{use-org-sso-dhAsVLFb.js → use-org-sso-D6OOHL4I.js} +1 -1
  313. package/dist/client/assets/{use-organization-roles-kAP23ZDQ.js → use-organization-roles-C6CqS3Hl.js} +1 -1
  314. package/dist/client/assets/{use-organization-settings-OP1vKLQc.js → use-organization-settings-H5G4XpWU.js} +1 -1
  315. package/dist/client/assets/{use-panel-navigate-DArr9jKh.js → use-panel-navigate-EBQ6GmN1.js} +1 -1
  316. package/dist/client/assets/{use-project-native-view-presence-7Bqoz-C1.js → use-project-native-view-presence-DY4DPkNa.js} +1 -1
  317. package/dist/client/assets/{use-project-scope-DUmb12wa.js → use-project-scope-De26TkyD.js} +1 -1
  318. package/dist/client/assets/{use-registry-connections-T5KGR_Hv.js → use-registry-connections-DOOOhGq6.js} +1 -1
  319. package/dist/client/assets/{use-releases-C3yM6r03.js → use-releases-Cd85Ra1l.js} +1 -1
  320. package/dist/client/assets/{use-reports-diagnostic-vTs5yUh0.js → use-reports-diagnostic-C3Z-hnHf.js} +1 -1
  321. package/dist/client/assets/{use-route-default-main-D6cfsdMd.js → use-route-default-main-CwM8UwOB.js} +1 -1
  322. package/dist/client/assets/{use-secrets-CVFKBXHe.js → use-secrets-B7F5FjB9.js} +1 -1
  323. package/dist/client/assets/{use-section-preview-base-YyD8NP1s.js → use-section-preview-base-CMoIrJO-.js} +1 -1
  324. package/dist/client/assets/{use-session-runtime-Dg7Dw6FF.js → use-session-runtime-aoBCs__S.js} +1 -1
  325. package/dist/client/assets/{use-tags-yE947YEK.js → use-tags-pjxdPmb5.js} +1 -1
  326. package/dist/client/assets/{use-task-metadata-Cxd6otqh.js → use-task-metadata-mJK-YnBs.js} +1 -1
  327. package/dist/client/assets/{use-thread-outputs-HjlkcFr2.js → use-thread-outputs-B9W8oYCz.js} +1 -1
  328. package/dist/client/assets/{use-view-mode-BsvAwGGR.js → use-view-mode-BA4qSq0B.js} +1 -1
  329. package/dist/client/assets/{use-virtual-mcp-De5-1hZU.js → use-virtual-mcp-Dr5NTd9r.js} +1 -1
  330. package/dist/client/assets/useInfiniteQuery-n-cIQ6QW.js +1 -0
  331. package/dist/client/assets/{useQueries-Dg8jJOK1.js → useQueries-Dg4q1uaA.js} +1 -1
  332. package/dist/client/assets/useSuspenseInfiniteQuery-BwUl7I8i.js +1 -0
  333. package/dist/client/assets/{users-DmBfcg5F.js → users-CGIgpUaK.js} +1 -1
  334. package/dist/client/assets/{utils-Bx7x03n7.js → utils-BS6roSoG.js} +1 -1
  335. package/dist/client/assets/variant-calendar-Mc1lG7f-.js +1 -0
  336. package/dist/client/assets/{variant-matcher-override-DyHDH8Wv.js → variant-matcher-override-D3DFoTTd.js} +1 -1
  337. package/dist/client/assets/{view-mode-toggle-Cr1ou40b.js → view-mode-toggle-DE0VcNBJ.js} +1 -1
  338. package/dist/client/assets/{virtual-mcp-BvoWP1mU.js → virtual-mcp-B9qKMF6v.js} +1 -1
  339. package/dist/client/index.html +1 -1
  340. package/dist/server/cli.js +1 -1
  341. package/dist/server/server.js +1 -1
  342. package/package.json +1 -1
  343. package/dist/client/assets/agent-app-DOZj_KNh.js +0 -1
  344. package/dist/client/assets/agent-assets-COVC5lPr.js +0 -1
  345. package/dist/client/assets/agent-automation-BWSPNjim.js +0 -20
  346. package/dist/client/assets/agent-deck-Ci4o3-Qm.js +0 -1
  347. package/dist/client/assets/agent-file-cFbD0OqV.js +0 -1
  348. package/dist/client/assets/agent-library-file-DXMpRwGw.js +0 -1
  349. package/dist/client/assets/agent-settings-BDT_wIMj.js +0 -1
  350. package/dist/client/assets/agent-site-editor-code-CaFMcCwi.js +0 -2
  351. package/dist/client/assets/agent-view-BOmW_Ep_.js +0 -1
  352. package/dist/client/assets/api-keys-C2lfrWiE.js +0 -1
  353. package/dist/client/assets/app-editor-Cbs0w-F0.js +0 -1
  354. package/dist/client/assets/category-editor-B984VME1.js +0 -1
  355. package/dist/client/assets/home-9LhFhaJr.js +0 -1
  356. package/dist/client/assets/post-calendar-DW1nVDLh.js +0 -1
  357. package/dist/client/assets/post-editor-C5j6zvkW.js +0 -1
  358. package/dist/client/assets/project-reports-BcpuMQY2.js +0 -1
  359. package/dist/client/assets/project-tasks-Cbu0gYbc.js +0 -1
  360. package/dist/client/assets/record-editor-CQeidmi2.js +0 -1
  361. package/dist/client/assets/redirect-editor-BL101gtT.js +0 -1
  362. package/dist/client/assets/registry-Dkgi61cL.js +0 -2
  363. package/dist/client/assets/reports-StG6MJZE.js +0 -1
  364. package/dist/client/assets/route-DJ7DRiHo.js +0 -1
  365. package/dist/client/assets/seo-editor-BEgFLCyp.js +0 -1
  366. package/dist/client/assets/skills-DZXynXjf.js +0 -1
  367. package/dist/client/assets/store-registry-mk4k386L.js +0 -2
  368. package/dist/client/assets/tasks-CwnRPaEK.js +0 -1
  369. package/dist/client/assets/useInfiniteQuery-TmIWCfQ-.js +0 -1
  370. package/dist/client/assets/useSuspenseInfiniteQuery-C8wrcyHJ.js +0 -1
  371. package/dist/client/assets/variant-calendar-DPR_CnEY.js +0 -1
@@ -1 +1 @@
1
- import{c as k,j as r,l as C,b as S}from"./index-C9jQATHx.js";import{T as R,a as H,b as T,c as I,d as W,e as z}from"./table-Dk8JamWN.js";import{i as D,n as E}from"./ArrowUp-Bx3jqyJU.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===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]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.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(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
1
+ import{c as k,j as r,l as C,b as S}from"./index-D9SZCEna.js";import{T as R,a as H,b as T,c as I,d as W,e as z}from"./table-Clh8UGCw.js";import{i as D,n as E}from"./ArrowUp-DPPS6QAz.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===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]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.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(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
@@ -1 +1 @@
1
- import{c as f,l as u,j as m}from"./index-C9jQATHx.js";import{B as g}from"./badge-CKy1DnEV.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{c as f,l as u,j as m}from"./index-D9SZCEna.js";import{B as g}from"./badge-DyIAknWc.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{c as d,l as i,j as n}from"./index-C9jQATHx.js";import{_ as m}from"./index-kzbDuxts.js";import{D as j,d as b,h as w,c as y,b as C}from"./dialog-DIO2BT5L.js";import{i as D}from"./SearchMd-BFooCWLz.js";function $(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function G(a){const e=d.c(28);let t,s,o,l,r,h,_;e[0]!==a?({title:h,description:_,children:t,className:s,filter:o,shouldFilter:r,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h,e[7]=_):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6],_=e[7]);const k=h===void 0?"Command Palette":h,N=_===void 0?"Search for a command to run...":_;let c;e[8]!==k?(c=n.jsx(b,{children:k}),e[8]=k,e[9]=c):c=e[9];let p;e[10]!==N?(p=n.jsx(w,{children:N}),e[10]=N,e[11]=p):p=e[11];let u;e[12]!==c||e[13]!==p?(u=n.jsxs(y,{className:"sr-only",children:[c,p]}),e[12]=c,e[13]=p,e[14]=u):u=e[14];let f;e[15]!==s?(f=i("overflow-hidden p-0",s),e[15]=s,e[16]=f):f=e[16];let x;e[17]!==t||e[18]!==o||e[19]!==r?(x=n.jsx($,{filter:o,shouldFilter:r,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=o,e[19]=r,e[20]=x):x=e[20];let g;e[21]!==f||e[22]!==x?(g=n.jsx(C,{className:f,closeButtonClassName:"hidden",children:x}),e[21]=f,e[22]=x,e[23]=g):g=e[23];let v;return e[24]!==l||e[25]!==u||e[26]!==g?(v=n.jsxs(j,{...l,children:[u,g]}),e[24]=l,e[25]=u,e[26]=g,e[27]=v):v=e[27],v}function L(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function P(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{B as C,F as a,P as b,R as c,$ as d,L as e,G as f,H as g};
1
+ import{c as d,l as i,j as n}from"./index-D9SZCEna.js";import{_ as m}from"./index-CUJMnria.js";import{D as j,d as b,h as w,c as y,b as C}from"./dialog-BCc5hlgI.js";import{i as D}from"./SearchMd-DBxEPxbW.js";function $(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function G(a){const e=d.c(28);let t,s,o,l,r,h,_;e[0]!==a?({title:h,description:_,children:t,className:s,filter:o,shouldFilter:r,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h,e[7]=_):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6],_=e[7]);const k=h===void 0?"Command Palette":h,N=_===void 0?"Search for a command to run...":_;let c;e[8]!==k?(c=n.jsx(b,{children:k}),e[8]=k,e[9]=c):c=e[9];let p;e[10]!==N?(p=n.jsx(w,{children:N}),e[10]=N,e[11]=p):p=e[11];let u;e[12]!==c||e[13]!==p?(u=n.jsxs(y,{className:"sr-only",children:[c,p]}),e[12]=c,e[13]=p,e[14]=u):u=e[14];let f;e[15]!==s?(f=i("overflow-hidden p-0",s),e[15]=s,e[16]=f):f=e[16];let x;e[17]!==t||e[18]!==o||e[19]!==r?(x=n.jsx($,{filter:o,shouldFilter:r,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=o,e[19]=r,e[20]=x):x=e[20];let g;e[21]!==f||e[22]!==x?(g=n.jsx(C,{className:f,closeButtonClassName:"hidden",children:x}),e[21]=f,e[22]=x,e[23]=g):g=e[23];let v;return e[24]!==l||e[25]!==u||e[26]!==g?(v=n.jsxs(j,{...l,children:[u,g]}),e[24]=l,e[25]=u,e[26]=g,e[27]=v):v=e[27],v}function L(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function P(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{B as C,F as a,P as b,R as c,$ as d,L as e,G as f,H as g};
@@ -1 +1 @@
1
- import{c as r,r as c}from"./index-C9jQATHx.js";import{S as l}from"./hooks-DW28Wv6W.js";const i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),s=i?"⌘":"Ctrl",e={commandPalette:{keys:[s,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[s,"["],description:"Back to previous"},focusChatInput:{keys:[s,"L"],description:"Focus chat input"},saveAndFormat:{keys:[s,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[s,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[s,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",s,"S"],description:"New task"},toggleDaemon:{keys:[s,"D"],description:"Toggle daemon logs"}},u=[{label:"General",shortcuts:[e.commandPalette,e.keyboardShortcuts,e.back,e.newTask,e.toggleDaemon]},{label:"Editor",shortcuts:[e.saveAndFormat]},{label:"Chat",shortcuts:[e.focusChatInput,e.togglePlanMode,e.sendMessage,e.newLine]},{label:"Questions",shortcuts:[e.selectOption]},{label:"Monitoring",shortcuts:[e.applyFilter]}];function m(t){return i?t.metaKey:t.ctrlKey}function f(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const o=t.tagName;return o==="INPUT"||o==="TEXTAREA"||o==="SELECT"}const n=new l(!1);function y(){n.set(!0)}function g(){n.set(!1)}function k(){const t=r.c(2),o=c.useSyncExternalStore(n.subscribe,n.get);let a;return t[0]!==o?(a=[o,n.set],t[0]=o,t[1]=a):a=t[1],a}export{e as K,u as S,f as a,g as c,m as i,y as o,k as u};
1
+ import{c as r,r as c}from"./index-D9SZCEna.js";import{S as l}from"./hooks-CBQzxxCh.js";const i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),s=i?"⌘":"Ctrl",e={commandPalette:{keys:[s,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[s,"["],description:"Back to previous"},focusChatInput:{keys:[s,"L"],description:"Focus chat input"},saveAndFormat:{keys:[s,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[s,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[s,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",s,"S"],description:"New task"},toggleDaemon:{keys:[s,"D"],description:"Toggle daemon logs"}},u=[{label:"General",shortcuts:[e.commandPalette,e.keyboardShortcuts,e.back,e.newTask,e.toggleDaemon]},{label:"Editor",shortcuts:[e.saveAndFormat]},{label:"Chat",shortcuts:[e.focusChatInput,e.togglePlanMode,e.sendMessage,e.newLine]},{label:"Questions",shortcuts:[e.selectOption]},{label:"Monitoring",shortcuts:[e.applyFilter]}];function m(t){return i?t.metaKey:t.ctrlKey}function f(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const o=t.tagName;return o==="INPUT"||o==="TEXTAREA"||o==="SELECT"}const n=new l(!1);function y(){n.set(!0)}function g(){n.set(!1)}function k(){const t=r.c(2),o=c.useSyncExternalStore(n.subscribe,n.get);let a;return t[0]!==o?(a=[o,n.set],t[0]=o,t[1]=a):a=t[1],a}export{e as K,u as S,f as a,g as c,m as i,y as o,k as u};
@@ -1 +1 @@
1
- import{c as _,r as U,l as Q,j as s,Q as Y,E as Z,b as z,a as ee,x as te,B as ne}from"./index-C9jQATHx.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-2uEIRhaM.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-BI8_ITvf.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=U.useState(!0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=u=>{if(!u)return;const y=()=>{const j=u.scrollHeight-u.scrollTop-u.clientHeight<8;c(j)};y(),u.addEventListener("scroll",y,{passive:!0});const b=new ResizeObserver(y);b.observe(u);for(const j of Array.from(u.children))b.observe(j);return()=>{u.removeEventListener("scroll",y),b.disconnect()}},e[0]=f):f=e[0];const p=f;let l;e[1]!==r?(l=Q("relative",r),e[1]=r,e[2]=l):l=e[2];let i;e[3]!==n||e[4]!==o?(i=s.jsx("div",{ref:p,className:o,children:n}),e[3]=n,e[4]=o,e[5]=i):i=e[5];const a=d?"opacity-0":"opacity-100";let x;e[6]!==a?(x=Q("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",a),e[6]=a,e[7]=x):x=e[7];let m;e[8]!==x?(m=s.jsx("div",{"aria-hidden":!0,className:x}),e[8]=x,e[9]=m):m=e[9];let g;return e[10]!==l||e[11]!==i||e[12]!==m?(g=s.jsxs("div",{className:l,children:[i,m]}),e[10]=l,e[11]=i,e[12]=m,e[13]=g):g=e[13],g}const H="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-6";function q(){const t=_.c(4),e=z();let n;t[0]!==e?(n=e("routes.reportsOnboarding.companionSection.title"),t[0]=e,t[1]=n):n=t[1];let o;return t[2]!==n?(o=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-xl lg:leading-7",children:n}),t[2]=n,t[3]=o):o=t[3],o}function de(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2,3].map(me)}),t[0]=e):e=t[0],e}function me(t){return s.jsx(ae,{},t)}function fe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:H,children:[s.jsx(q,{}),s.jsx(de,{})]}),t[0]=e):e=t[0],e}function ue(t){const e=_.c(18),{onRetry:n}=t,o=z();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{}),e[0]=r):r=e[0];let d;e[1]!==o?(d=o("routes.reportsOnboarding.companionSection.loadError"),e[1]=o,e[2]=d):d=e[2];let c;e[3]!==d?(c=s.jsx("p",{className:"text-sm text-foreground",children:d}),e[3]=d,e[4]=c):c=e[4];let f;e[5]!==o?(f=o("routes.reportsOnboarding.companionSection.loadErrorDescription"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),e[7]=f,e[8]=p):p=e[8];let l;e[9]!==o?(l=o("routes.reportsOnboarding.companionSection.retry"),e[9]=o,e[10]=l):l=e[10];let i;e[11]!==n||e[12]!==l?(i=s.jsx(ne,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:l}),e[11]=n,e[12]=l,e[13]=i):i=e[13];let a;return e[14]!==c||e[15]!==p||e[16]!==i?(a=s.jsxs("div",{className:H,children:[r,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[c,p,i]})]}),e[14]=c,e[15]=p,e[16]=i,e[17]=a):a=e[17],a}function ve(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Y,{children:o=>{const{reset:r}=o;return s.jsx(Z,{fallback:d=>{const{resetError:c}=d;return s.jsx(ue,{onRetry:()=>{r(),c()}})},children:s.jsx(U.Suspense,{fallback:s.jsx(fe,{}),children:s.jsx(pe,{...t})})})}}),e[0]=t,e[1]=n):n=e[1],n}function pe(t){const e=_.c(60),{org:n,cdConnectionId:o,siteUrl:r,onReadinessChange:d}=t,c=z(),{data:f}=ee.useSession(),p=f?.user?.id??"";let l;if(e[0]!==r){const $=r?se(r):null;if($?.ok)try{l=new URL($.value).hostname}catch{l=void 0}e[0]=r,e[1]=l}else l=e[1];let i;e[2]!==n.id||e[3]!==n.slug?(i={connectionId:te,orgId:n.id,orgSlug:n.slug},e[2]=n.id,e[3]=n.slug,e[4]=i):i=e[4];const a=oe(i);let x;e[5]!==o||e[6]!==n||e[7]!==a||e[8]!==r?(x={selfClient:a,org:n,cdConnectionId:o,siteUrl:r},e[5]=o,e[6]=n,e[7]=a,e[8]=r,e[9]=x):x=e[9];const{cards:m,saStatusUnavailable:g}=re(x);let u;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==r||e[15]!==p?(u={selfClient:a,org:n,userId:p,cdConnectionId:o,domain:l,siteUrl:r},e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=r,e[15]=p,e[16]=u):u=e[16];const{connect:y,connectingFieldKey:b,disconnect:j,disconnectingFieldKey:L,error:N}=le(u),[F,D]=U.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==F||e[18]!==m||e[19]!==y||e[20]!==N||e[21]!==b||e[22]!==j||e[23]!==L||e[24]!==d||e[25]!==n||e[26]!==g||e[27]!==a||e[28]!==r||e[29]!==c){k=Symbol.for("react.early_return_sentinel");e:{const $=m.filter(ge),G=m.filter(xe),J=g||($.length>0?$.every(P):m.length===0||m.some(P));if(d?.(J),m.length===0){k=null;break e}const V=b!==null||L!==null,W=h=>{const X=async()=>{await y(h)&&D(h.fieldKey)};return s.jsx(ie,{card:h,connecting:b===h.fieldKey,disconnecting:L===h.fieldKey,disabled:V&&b!==h.fieldKey&&L!==h.fieldKey,org:n,selfClient:a,siteUrl:r,autoOpenConfigFieldKey:F,onAutoOpenConfigHandled:()=>D(T=>T===h.fieldKey?null:T),onConnect:()=>{X()},onDisconnect:()=>{j(h)}},h.fieldKey)};R=H,e[40]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(q,{}),e[40]=C):C=e[40],E=ce,I="flex min-h-0 flex-1 flex-col md:block",w="-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",e[41]!==N?(S=N&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:N}),e[41]=N,e[42]=S):S=e[42],e[43]!==g||e[44]!==c?(v=g&&s.jsx("p",{role:"status",className:"mb-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-foreground",children:c("routes.reportsOnboarding.companionSection.statusUnavailable")}),e[43]=g,e[44]=c,e[45]=v):v=e[45],K="flex flex-col gap-4 pt-3",O=[...$,...G].map(W)}e[17]=F,e[18]=m,e[19]=y,e[20]=N,e[21]=b,e[22]=j,e[23]=L,e[24]=d,e[25]=n,e[26]=g,e[27]=a,e[28]=r,e[29]=c,e[30]=E,e[31]=R,e[32]=C,e[33]=k,e[34]=K,e[35]=O,e[36]=I,e[37]=w,e[38]=S,e[39]=v}else E=e[30],R=e[31],C=e[32],k=e[33],K=e[34],O=e[35],I=e[36],w=e[37],S=e[38],v=e[39];if(k!==Symbol.for("react.early_return_sentinel"))return k;let A;e[46]!==K||e[47]!==O?(A=s.jsx("div",{className:K,children:O}),e[46]=K,e[47]=O,e[48]=A):A=e[48];let B;e[49]!==E||e[50]!==A||e[51]!==I||e[52]!==w||e[53]!==S||e[54]!==v?(B=s.jsxs(E,{wrapperClassName:I,className:w,children:[S,v,A]}),e[49]=E,e[50]=A,e[51]=I,e[52]=w,e[53]=S,e[54]=v,e[55]=B):B=e[55];let M;return e[56]!==R||e[57]!==C||e[58]!==B?(M=s.jsxs("div",{className:R,children:[C,B]}),e[56]=R,e[57]=C,e[58]=B,e[59]=M):M=e[59],M}function xe(t){return!t.required}function ge(t){return t.required}function he(t){return t.satisfied&&t.configured}export{fe as C,ce as S,ve as a};
1
+ import{c as _,r as U,l as Q,j as s,Q as Y,E as Z,b as z,a as ee,x as te,B as ne}from"./index-D9SZCEna.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-DSGHqAYD.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-BpCoDO4S.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=U.useState(!0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=u=>{if(!u)return;const y=()=>{const j=u.scrollHeight-u.scrollTop-u.clientHeight<8;c(j)};y(),u.addEventListener("scroll",y,{passive:!0});const b=new ResizeObserver(y);b.observe(u);for(const j of Array.from(u.children))b.observe(j);return()=>{u.removeEventListener("scroll",y),b.disconnect()}},e[0]=f):f=e[0];const p=f;let l;e[1]!==r?(l=Q("relative",r),e[1]=r,e[2]=l):l=e[2];let i;e[3]!==n||e[4]!==o?(i=s.jsx("div",{ref:p,className:o,children:n}),e[3]=n,e[4]=o,e[5]=i):i=e[5];const a=d?"opacity-0":"opacity-100";let x;e[6]!==a?(x=Q("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",a),e[6]=a,e[7]=x):x=e[7];let m;e[8]!==x?(m=s.jsx("div",{"aria-hidden":!0,className:x}),e[8]=x,e[9]=m):m=e[9];let g;return e[10]!==l||e[11]!==i||e[12]!==m?(g=s.jsxs("div",{className:l,children:[i,m]}),e[10]=l,e[11]=i,e[12]=m,e[13]=g):g=e[13],g}const H="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-6";function q(){const t=_.c(4),e=z();let n;t[0]!==e?(n=e("routes.reportsOnboarding.companionSection.title"),t[0]=e,t[1]=n):n=t[1];let o;return t[2]!==n?(o=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-xl lg:leading-7",children:n}),t[2]=n,t[3]=o):o=t[3],o}function de(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2,3].map(me)}),t[0]=e):e=t[0],e}function me(t){return s.jsx(ae,{},t)}function fe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:H,children:[s.jsx(q,{}),s.jsx(de,{})]}),t[0]=e):e=t[0],e}function ue(t){const e=_.c(18),{onRetry:n}=t,o=z();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{}),e[0]=r):r=e[0];let d;e[1]!==o?(d=o("routes.reportsOnboarding.companionSection.loadError"),e[1]=o,e[2]=d):d=e[2];let c;e[3]!==d?(c=s.jsx("p",{className:"text-sm text-foreground",children:d}),e[3]=d,e[4]=c):c=e[4];let f;e[5]!==o?(f=o("routes.reportsOnboarding.companionSection.loadErrorDescription"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),e[7]=f,e[8]=p):p=e[8];let l;e[9]!==o?(l=o("routes.reportsOnboarding.companionSection.retry"),e[9]=o,e[10]=l):l=e[10];let i;e[11]!==n||e[12]!==l?(i=s.jsx(ne,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:l}),e[11]=n,e[12]=l,e[13]=i):i=e[13];let a;return e[14]!==c||e[15]!==p||e[16]!==i?(a=s.jsxs("div",{className:H,children:[r,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[c,p,i]})]}),e[14]=c,e[15]=p,e[16]=i,e[17]=a):a=e[17],a}function ve(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Y,{children:o=>{const{reset:r}=o;return s.jsx(Z,{fallback:d=>{const{resetError:c}=d;return s.jsx(ue,{onRetry:()=>{r(),c()}})},children:s.jsx(U.Suspense,{fallback:s.jsx(fe,{}),children:s.jsx(pe,{...t})})})}}),e[0]=t,e[1]=n):n=e[1],n}function pe(t){const e=_.c(60),{org:n,cdConnectionId:o,siteUrl:r,onReadinessChange:d}=t,c=z(),{data:f}=ee.useSession(),p=f?.user?.id??"";let l;if(e[0]!==r){const $=r?se(r):null;if($?.ok)try{l=new URL($.value).hostname}catch{l=void 0}e[0]=r,e[1]=l}else l=e[1];let i;e[2]!==n.id||e[3]!==n.slug?(i={connectionId:te,orgId:n.id,orgSlug:n.slug},e[2]=n.id,e[3]=n.slug,e[4]=i):i=e[4];const a=oe(i);let x;e[5]!==o||e[6]!==n||e[7]!==a||e[8]!==r?(x={selfClient:a,org:n,cdConnectionId:o,siteUrl:r},e[5]=o,e[6]=n,e[7]=a,e[8]=r,e[9]=x):x=e[9];const{cards:m,saStatusUnavailable:g}=re(x);let u;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==r||e[15]!==p?(u={selfClient:a,org:n,userId:p,cdConnectionId:o,domain:l,siteUrl:r},e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=r,e[15]=p,e[16]=u):u=e[16];const{connect:y,connectingFieldKey:b,disconnect:j,disconnectingFieldKey:L,error:N}=le(u),[F,D]=U.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==F||e[18]!==m||e[19]!==y||e[20]!==N||e[21]!==b||e[22]!==j||e[23]!==L||e[24]!==d||e[25]!==n||e[26]!==g||e[27]!==a||e[28]!==r||e[29]!==c){k=Symbol.for("react.early_return_sentinel");e:{const $=m.filter(ge),G=m.filter(xe),J=g||($.length>0?$.every(P):m.length===0||m.some(P));if(d?.(J),m.length===0){k=null;break e}const V=b!==null||L!==null,W=h=>{const X=async()=>{await y(h)&&D(h.fieldKey)};return s.jsx(ie,{card:h,connecting:b===h.fieldKey,disconnecting:L===h.fieldKey,disabled:V&&b!==h.fieldKey&&L!==h.fieldKey,org:n,selfClient:a,siteUrl:r,autoOpenConfigFieldKey:F,onAutoOpenConfigHandled:()=>D(T=>T===h.fieldKey?null:T),onConnect:()=>{X()},onDisconnect:()=>{j(h)}},h.fieldKey)};R=H,e[40]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(q,{}),e[40]=C):C=e[40],E=ce,I="flex min-h-0 flex-1 flex-col md:block",w="-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",e[41]!==N?(S=N&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:N}),e[41]=N,e[42]=S):S=e[42],e[43]!==g||e[44]!==c?(v=g&&s.jsx("p",{role:"status",className:"mb-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-foreground",children:c("routes.reportsOnboarding.companionSection.statusUnavailable")}),e[43]=g,e[44]=c,e[45]=v):v=e[45],K="flex flex-col gap-4 pt-3",O=[...$,...G].map(W)}e[17]=F,e[18]=m,e[19]=y,e[20]=N,e[21]=b,e[22]=j,e[23]=L,e[24]=d,e[25]=n,e[26]=g,e[27]=a,e[28]=r,e[29]=c,e[30]=E,e[31]=R,e[32]=C,e[33]=k,e[34]=K,e[35]=O,e[36]=I,e[37]=w,e[38]=S,e[39]=v}else E=e[30],R=e[31],C=e[32],k=e[33],K=e[34],O=e[35],I=e[36],w=e[37],S=e[38],v=e[39];if(k!==Symbol.for("react.early_return_sentinel"))return k;let A;e[46]!==K||e[47]!==O?(A=s.jsx("div",{className:K,children:O}),e[46]=K,e[47]=O,e[48]=A):A=e[48];let B;e[49]!==E||e[50]!==A||e[51]!==I||e[52]!==w||e[53]!==S||e[54]!==v?(B=s.jsxs(E,{wrapperClassName:I,className:w,children:[S,v,A]}),e[49]=E,e[50]=A,e[51]=I,e[52]=w,e[53]=S,e[54]=v,e[55]=B):B=e[55];let M;return e[56]!==R||e[57]!==C||e[58]!==B?(M=s.jsxs("div",{className:R,children:[C,B]}),e[56]=R,e[57]=C,e[58]=B,e[59]=M):M=e[59],M}function xe(t){return!t.required}function ge(t){return t.required}function he(t){return t.satisfied&&t.configured}export{fe as C,ce as S,ve as a};
@@ -1,8 +1,8 @@
1
- import{c as _,b as B,r as G,l as ee,j as s,fi as te,M as se,ao as ne,F as ie,B as U,t as J,eD as oe,dP as le}from"./index-C9jQATHx.js";import{b as ae,a as re}from"./alert-0Lc8v4N7.js";import{a as ce,b as de,c as V,d as ue,S as me}from"./select-BemZ3-RS.js";import{T as fe,c as pe,a as xe,b as ge}from"./tabs-CScSsCn-.js";import{u as X}from"./use-copy-CrTQ1bFc.js";import{i as Y}from"./Check-HvrCGvlV.js";import{i as he}from"./ChevronRight-dkkIYuGe.js";import{a as Q}from"./Copy01-D4tr9F1r.js";import{i as ye}from"./Key01-TUQZiePT.js";import{i as Ce}from"./Link01-Dubdh0XV.js";import{C as be,a as je,b as ve}from"./client-icons-DH-s5V8p.js";import{u as we,a as Ne,A as $e}from"./api-keys-Cf6bK86U.js";import{R as ke}from"./require-capability-DjYcyxbJ.js";import"./index-BVdPTogP.js";import"./ChevronUp-BANcOZ09.js";import"./AlertCircle-CMdkAjxQ.js";import"./Plus-B6iViyXP.js";import"./Trash01-DwLqZ5iv.js";import"./alert-dialog-BcLnZa7A.js";import"./dialog-DIO2BT5L.js";import"./X-BbEHf0ox.js";import"./input-DCAbperr.js";import"./label-BZvBRfsC.js";import"./use-mcp-client-2uEIRhaM.js";import"./auth-DqeCOVzg.js";import"./access-gate-BGLq5_fD.js";import"./capability-load-error-JtYpAIDC.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
1
+ import{c as _,b as D,r as G,l as ee,j as s,fi as te,M as se,ao as ne,F as ie,B as U,t as J,eC as oe,dN as le}from"./index-D9SZCEna.js";import{b as ae,a as re}from"./alert-DXUzroby.js";import{a as ce,b as de,c as V,d as ue,S as me}from"./select-D8neBfTB.js";import{T as fe,c as pe,a as xe,b as ge}from"./tabs-BSBLIBXv.js";import{u as X}from"./use-copy-KnHqebR6.js";import{i as Y}from"./Check-ZxK4xe7F.js";import{i as he}from"./ChevronRight-B1q4aRdE.js";import{a as Q}from"./Copy01-BdfG_e2R.js";import{i as ye}from"./Key01-CVWwYajp.js";import{i as Ce}from"./Link01-CZbhj0_0.js";import{C as be,a as je,b as ve}from"./client-icons-BwjZD78C.js";import{u as we,a as Ne,A as $e}from"./api-keys-B2Xef8ny.js";import{R as ke}from"./require-capability-Td9HSP5v.js";import"./index-unCC-6KL.js";import"./ChevronUp-Lw2r8wDj.js";import"./AlertCircle-BKchbppf.js";import"./Plus-7oGWv8-d.js";import"./Trash01-BUixXtcj.js";import"./alert-dialog-92GutrH9.js";import"./dialog-BCc5hlgI.js";import"./X-BdugDRJ_.js";import"./input-DMN2ylja.js";import"./label-Dh9EjnVS.js";import"./use-mcp-client-DSGHqAYD.js";import"./auth-BrGex7FY.js";import"./access-gate-u19iYegA.js";import"./capability-load-error-CfjThErO.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
2
2
  --header "Authorization: Bearer ${i}"`};if(t==="cursor"){const n={url:r};return e==="api-key"&&(n.headers={Authorization:`Bearer ${i}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[a]:n}},null,2)}}if(t==="codex"){const n=[`[mcp_servers.${a}]`,`url = "${r}"`];return e==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${i}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
3
3
  `)}}return e==="oauth"?{language:"text",code:`${r}
4
4
 
5
5
  # OAuth: clients that support MCP OAuth 2.1 will discover
6
6
  # the auth flow via the WWW-Authenticate header on 401.`}:{language:"text",code:`${r}
7
7
 
8
- Authorization: Bearer ${i}`}}function ze(t){const e=_.c(32),{client:r,mode:c,url:i,apiKey:a}=t,n=B();let d;e[0]!==a||e[1]!==r||e[2]!==c||e[3]!==i?(d=_e({client:r,mode:c,url:i,apiKey:a}),e[0]=a,e[1]=r,e[2]=c,e[3]=i,e[4]=d):d=e[4];const o=d,{handleCopy:u,copied:l}=X(),m=G.useId(),f=G.useId();let p;e[5]!==u||e[6]!==o.code?(p=()=>u(o.code),e[5]=u,e[6]=o.code,e[7]=p):p=e[7];const C=`${m} ${f}`;let x;e[8]!==n?(x=n("settings.connectClients.copy"),e[8]=n,e[9]=x):x=e[9];let h;e[10]!==m||e[11]!==x?(h=s.jsx("span",{id:m,className:"sr-only",children:x}),e[10]=m,e[11]=x,e[12]=h):h=e[12];const y=o.pathHint??o.language;let b;e[13]!==y?(b=s.jsx("span",{className:"min-w-0 truncate font-mono text-[11px] leading-none text-muted-foreground",children:y}),e[13]=y,e[14]=b):b=e[14];const S=l?"text-success":"group-hover:border-foreground/30 group-hover:text-foreground";let K;e[15]!==S?(K=ee("flex size-6 shrink-0 items-center justify-center self-start rounded-md border border-border text-muted-foreground transition-colors",S),e[15]=S,e[16]=K):K=e[16];let v;e[17]!==l?(v=l?s.jsx(Y,{size:13}):s.jsx(Q,{size:13}),e[17]=l,e[18]=v):v=e[18];let N;e[19]!==v||e[20]!==K?(N=s.jsx("span",{"aria-hidden":"true",className:K,children:v}),e[19]=v,e[20]=K,e[21]=N):N=e[21];let j;e[22]!==f||e[23]!==o.code?(j=s.jsx("pre",{className:"overflow-x-auto pt-2 font-mono text-xs leading-relaxed",children:s.jsx("code",{id:f,children:o.code})}),e[22]=f,e[23]=o.code,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j||e[27]!==p||e[28]!==C||e[29]!==h||e[30]!==b?(w=s.jsxs("button",{type:"button",onClick:p,"aria-labelledby":C,className:"group relative grid w-full cursor-pointer grid-cols-[minmax(0,1fr)_auto] items-start gap-x-3 rounded-md p-3 text-left transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[h,b,N,j]}),e[25]=N,e[26]=j,e[27]=p,e[28]=C,e[29]=h,e[30]=b,e[31]=w):w=e[31],w}const q="Connect: ",F=[{id:"claude-code",label:"Claude",Icon:be},{id:"cursor",label:"Cursor",Icon:je},{id:"codex",label:"Codex",Icon:ve},{id:"raw",label:"Other client",labelKey:"settings.connectClients.otherClient",Icon:Ce}];function Z(t){return F.find(e=>e.id===t)?.label??t}function Ae(){return typeof window>"u"?"unknown":window.location.hostname}function Ie(t){const e=_.c(11),{text:r}=t,c=B(),{handleCopy:i,copied:a}=X();let n;e[0]!==i||e[1]!==r?(n=()=>i(r),e[0]=i,e[1]=r,e[2]=n):n=e[2];let d;e[3]!==c?(d=c("settings.connectClients.copy"),e[3]=c,e[4]=d):d=e[4];let o;e[5]!==a?(o=a?s.jsx(Y,{size:14}):s.jsx(Q,{size:14}),e[5]=a,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==d||e[9]!==o?(u=s.jsx(U,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:n,"aria-label":d,children:o}),e[7]=n,e[8]=d,e[9]=o,e[10]=u):u=e[10],u}function Oe(t){const e=_.c(17),{url:r}=t,c=B(),i=`${r}/.well-known/oauth-protected-resource`;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(he,{size:12,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=a):a=e[0];let n;e[1]!==c?(n=c("settings.connectClients.oauthDiscoveryDetails"),e[1]=c,e[2]=n):n=e[2];let d;e[3]!==n?(d=s.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[a,n]}),e[3]=n,e[4]=d):d=e[4];let o;e[5]!==c?(o=c("settings.connectClients.oauthMetadataHint"),e[5]=c,e[6]=o):o=e[6];let u;e[7]!==o?(u=s.jsx("p",{children:o}),e[7]=o,e[8]=u):u=e[8];let l;e[9]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5",children:[s.jsx("code",{className:"flex-1 truncate font-mono text-[11px]",children:i}),s.jsx(Ie,{text:i})]}),e[9]=i,e[10]=l):l=e[10];let m;e[11]!==u||e[12]!==l?(m=s.jsxs("div",{className:"mt-2 space-y-1 pl-[18px]",children:[u,l]}),e[11]=u,e[12]=l,e[13]=m):m=e[13];let f;return e[14]!==d||e[15]!==m?(f=s.jsxs("details",{className:"group text-xs text-muted-foreground",children:[d,m]}),e[14]=d,e[15]=m,e[16]=f):f=e[16],f}function Me(t){const e=_.c(23),{mode:r,onModeChange:c}=t,i=B();let a;e[0]!==c?(a=x=>{(x==="oauth"||x==="api-key")&&c(x)},e[0]=c,e[1]=a):a=e[1];let n;e[2]!==i?(n=i("settings.connectClients.installMethod"),e[2]=i,e[3]=n):n=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ce,{}),e[4]=d):d=e[4];let o;e[5]!==n?(o=s.jsx(de,{size:"sm",className:"text-xs","aria-label":n,children:d}),e[5]=n,e[6]=o):o=e[6];let u;e[7]!==i?(u=i("settings.connectClients.oauthOption"),e[7]=i,e[8]=u):u=e[8];let l;e[9]!==u?(l=s.jsx(V,{value:"oauth",className:"text-xs",children:u}),e[9]=u,e[10]=l):l=e[10];let m;e[11]!==i?(m=i("settings.connectClients.apiKeyOption"),e[11]=i,e[12]=m):m=e[12];let f;e[13]!==m?(f=s.jsx(V,{value:"api-key",className:"text-xs",children:m}),e[13]=m,e[14]=f):f=e[14];let p;e[15]!==l||e[16]!==f?(p=s.jsxs(ue,{children:[l,f]}),e[15]=l,e[16]=f,e[17]=p):p=e[17];let C;return e[18]!==r||e[19]!==a||e[20]!==o||e[21]!==p?(C=s.jsxs(me,{value:r,onValueChange:a,children:[o,p]}),e[18]=r,e[19]=a,e[20]=o,e[21]=p,e[22]=C):C=e[22],C}function Te(t){const e=_.c(26),{client:r,url:c,mode:i,newKey:a,canManageKeys:n,onGenerate:d,isGenerating:o,onClearNewKey:u}=t,l=B(),m=i==="api-key"&&a!==null,f=r==="raw";let p;e[0]!==m||e[1]!==l?(p=m&&s.jsxs(ae,{variant:"warning",className:"text-xs",children:[s.jsx(ie,{}),s.jsx(re,{children:l("settings.connectClients.snippetOneTimeWarning")})]}),e[0]=m,e[1]=l,e[2]=p):p=e[2];const C=m&&a?a:void 0;let x;e[3]!==r||e[4]!==i||e[5]!==C||e[6]!==c?(x=s.jsx(ze,{client:r,mode:i,url:c,apiKey:C}),e[3]=r,e[4]=i,e[5]=C,e[6]=c,e[7]=x):x=e[7];let h;e[8]!==f||e[9]!==c?(h=f&&s.jsx(Oe,{url:c}),e[8]=f,e[9]=c,e[10]=h):h=e[10];let y;e[11]!==n||e[12]!==r||e[13]!==o||e[14]!==f||e[15]!==i||e[16]!==u||e[17]!==d||e[18]!==m||e[19]!==l?(y=i==="api-key"&&n&&s.jsx("div",{children:m?s.jsx(U,{variant:"ghost",size:"sm",onClick:u,className:"text-xs",children:l("settings.connectClients.doneHideKey")}):s.jsxs(U,{size:"sm",onClick:d,disabled:o,className:"gap-1.5",children:[s.jsx(ye,{size:14}),o?l("settings.connectClients.generatingKey"):f?l("settings.connectClients.generateKey"):l("settings.connectClients.generateKeyFor",{client:Z(r)})]})}),e[11]=n,e[12]=r,e[13]=o,e[14]=f,e[15]=i,e[16]=u,e[17]=d,e[18]=m,e[19]=l,e[20]=y):y=e[20];let b;return e[21]!==p||e[22]!==x||e[23]!==h||e[24]!==y?(b=s.jsxs("div",{className:"flex flex-col gap-3",children:[p,x,h,y]}),e[21]=p,e[22]=x,e[23]=h,e[24]=y,e[25]=b):b=e[25],b}function Ee(){const t=_.c(51),e=B(),{org:r}=se();let c;t[0]!==r.slug?(c=Ke(r.slug),t[0]=r.slug,t[1]=c):c=t[1];const i=c,a=we(),{granted:n}=ne("api-keys:manage");let d;t[2]!==n?(d={enabled:n},t[2]=n,t[3]=d):d=t[3];const{data:o,dataUpdatedAt:u}=Ne(d),[l,m]=G.useState("oauth");let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f={},t[4]=f):f=t[4];const[p,C]=G.useState(f);let x;t[5]!==u||t[6]!==p||t[7]!==o?(x=$=>{const g=p[$];return g&&(!o||u<g.at||o.some(k=>k.id===g.id))?g.key:null},t[5]=u,t[6]=p,t[7]=o,t[8]=x):x=t[8];const h=x,[y,b]=G.useState("claude-code");let S;t[9]===Symbol.for("react.memo_cache_sentinel")?(S=$=>{const g=F.find(k=>k.id===$);g&&b(g.id)},t[9]=S):S=t[9];const K=S;let v;t[10]!==a||t[11]!==e?(v=$=>{const g=`${q}${Z($)} on ${Ae()}`;a.mutate({name:g,permissions:{"*":["*"]}},{onSuccess:k=>{C(H=>({...H,[$]:{id:k.id,key:k.key,at:Date.now()}})),J.success(e("settings.connectClients.keyCreated"))},onError:Pe})},t[10]=a,t[11]=e,t[12]=v):v=t[12];const N=v;let j;t[13]!==e?(j=e("settings.connectClients.connectAClient"),t[13]=e,t[14]=j):j=t[14];let w;t[15]!==e?(w=F.map($=>{const{id:g,label:k,labelKey:H,Icon:W}=$;return s.jsxs(fe,{value:g,variant:"underline",className:"gap-2",children:[s.jsx(W,{size:16}),H?e(H):k]},g)}),t[15]=e,t[16]=w):w=t[16];let z;t[17]!==w?(z=s.jsx(xe,{variant:"underline",className:"h-10 min-w-0 flex-1 gap-1 overflow-x-auto border-b-0",children:w}),t[17]=w,t[18]=z):z=t[18];let A;t[19]!==l?(A=s.jsx(Me,{mode:l,onModeChange:m}),t[19]=l,t[20]=A):A=t[20];let I;t[21]!==z||t[22]!==A?(I=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1",children:[z,A]}),t[21]=z,t[22]=A,t[23]=I):I=t[23];let O;t[24]!==n||t[25]!==a||t[26]!==N||t[27]!==h||t[28]!==l||t[29]!==i?(O=F.map($=>{const{id:g,label:k}=$;return s.jsx(pe,{value:g,className:"p-2",children:s.jsx(Te,{client:g,url:i,mode:l,newKey:h(g),canManageKeys:n,onGenerate:()=>N(g),isGenerating:a.isPending&&a.variables?.name?.startsWith(`${q}${k}`)===!0,onClearNewKey:()=>C(H=>{const W={...H};return delete W[g],W})})},g)}),t[24]=n,t[25]=a,t[26]=N,t[27]=h,t[28]=l,t[29]=i,t[30]=O):O=t[30];let M;t[31]!==y||t[32]!==I||t[33]!==O?(M=s.jsx(oe,{className:"gap-0 overflow-hidden p-0",children:s.jsxs(ge,{value:y,onValueChange:K,variant:"underline",className:"gap-0",children:[I,O]})}),t[31]=y,t[32]=I,t[33]=O,t[34]=M):M=t[34];let T;t[35]!==l||t[36]!==e?(T=e(l==="oauth"?"settings.connectClients.oauthKeyHint":"settings.connectClients.headlessKeyHint"),t[35]=l,t[36]=e,t[37]=T):T=t[37];let E;t[38]!==T?(E=s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:T}),t[38]=T,t[39]=E):E=t[39];let P;t[40]!==y||t[41]!==e?(P=y==="raw"&&s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:e("settings.connectClients.anyOtherClientDescription")}),t[40]=y,t[41]=e,t[42]=P):P=t[42];let D;t[43]!==M||t[44]!==E||t[45]!==P||t[46]!==j?(D=s.jsxs(le,{headerClassName:"px-0",title:j,children:[M,E,P]}),t[43]=M,t[44]=E,t[45]=P,t[46]=j,t[47]=D):D=t[47];let L;t[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ke,{capability:"api-keys:manage",area:"api-keys",children:s.jsx($e,{})}),t[48]=L):L=t[48];let R;return t[49]!==D?(R=s.jsxs(s.Fragment,{children:[D,L]}),t[49]=D,t[50]=R):R=t[50],R}function Pe(t){return J.error(t.message)}function De(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{group:"connect",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function mt(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(De,{}),t[0]=e):e=t[0],e}export{mt as default};
8
+ Authorization: Bearer ${i}`}}function ze(t){const e=_.c(32),{client:r,mode:c,url:i,apiKey:a}=t,n=D();let d;e[0]!==a||e[1]!==r||e[2]!==c||e[3]!==i?(d=_e({client:r,mode:c,url:i,apiKey:a}),e[0]=a,e[1]=r,e[2]=c,e[3]=i,e[4]=d):d=e[4];const o=d,{handleCopy:u,copied:l}=X(),m=G.useId(),f=G.useId();let p;e[5]!==u||e[6]!==o.code?(p=()=>u(o.code),e[5]=u,e[6]=o.code,e[7]=p):p=e[7];const C=`${m} ${f}`;let x;e[8]!==n?(x=n("settings.connectClients.copy"),e[8]=n,e[9]=x):x=e[9];let h;e[10]!==m||e[11]!==x?(h=s.jsx("span",{id:m,className:"sr-only",children:x}),e[10]=m,e[11]=x,e[12]=h):h=e[12];const y=o.pathHint??o.language;let b;e[13]!==y?(b=s.jsx("span",{className:"min-w-0 truncate font-mono text-[11px] leading-none text-muted-foreground",children:y}),e[13]=y,e[14]=b):b=e[14];const S=l?"text-success":"group-hover:border-foreground/30 group-hover:text-foreground";let K;e[15]!==S?(K=ee("flex size-6 shrink-0 items-center justify-center self-start rounded-md border border-border text-muted-foreground transition-colors",S),e[15]=S,e[16]=K):K=e[16];let v;e[17]!==l?(v=l?s.jsx(Y,{size:13}):s.jsx(Q,{size:13}),e[17]=l,e[18]=v):v=e[18];let N;e[19]!==v||e[20]!==K?(N=s.jsx("span",{"aria-hidden":"true",className:K,children:v}),e[19]=v,e[20]=K,e[21]=N):N=e[21];let j;e[22]!==f||e[23]!==o.code?(j=s.jsx("pre",{className:"overflow-x-auto pt-2 font-mono text-xs leading-relaxed",children:s.jsx("code",{id:f,children:o.code})}),e[22]=f,e[23]=o.code,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j||e[27]!==p||e[28]!==C||e[29]!==h||e[30]!==b?(w=s.jsxs("button",{type:"button",onClick:p,"aria-labelledby":C,className:"group relative grid w-full cursor-pointer grid-cols-[minmax(0,1fr)_auto] items-start gap-x-3 rounded-md p-3 text-left transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[h,b,N,j]}),e[25]=N,e[26]=j,e[27]=p,e[28]=C,e[29]=h,e[30]=b,e[31]=w):w=e[31],w}const q="Connect: ",F=[{id:"claude-code",label:"Claude",Icon:be},{id:"cursor",label:"Cursor",Icon:je},{id:"codex",label:"Codex",Icon:ve},{id:"raw",label:"Other client",labelKey:"settings.connectClients.otherClient",Icon:Ce}];function Z(t){return F.find(e=>e.id===t)?.label??t}function Ae(){return typeof window>"u"?"unknown":window.location.hostname}function Ie(t){const e=_.c(11),{text:r}=t,c=D(),{handleCopy:i,copied:a}=X();let n;e[0]!==i||e[1]!==r?(n=()=>i(r),e[0]=i,e[1]=r,e[2]=n):n=e[2];let d;e[3]!==c?(d=c("settings.connectClients.copy"),e[3]=c,e[4]=d):d=e[4];let o;e[5]!==a?(o=a?s.jsx(Y,{size:14}):s.jsx(Q,{size:14}),e[5]=a,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==d||e[9]!==o?(u=s.jsx(U,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:n,"aria-label":d,children:o}),e[7]=n,e[8]=d,e[9]=o,e[10]=u):u=e[10],u}function Oe(t){const e=_.c(17),{url:r}=t,c=D(),i=`${r}/.well-known/oauth-protected-resource`;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(he,{size:12,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=a):a=e[0];let n;e[1]!==c?(n=c("settings.connectClients.oauthDiscoveryDetails"),e[1]=c,e[2]=n):n=e[2];let d;e[3]!==n?(d=s.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[a,n]}),e[3]=n,e[4]=d):d=e[4];let o;e[5]!==c?(o=c("settings.connectClients.oauthMetadataHint"),e[5]=c,e[6]=o):o=e[6];let u;e[7]!==o?(u=s.jsx("p",{children:o}),e[7]=o,e[8]=u):u=e[8];let l;e[9]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5",children:[s.jsx("code",{className:"flex-1 truncate font-mono text-[11px]",children:i}),s.jsx(Ie,{text:i})]}),e[9]=i,e[10]=l):l=e[10];let m;e[11]!==u||e[12]!==l?(m=s.jsxs("div",{className:"mt-2 space-y-1 pl-[18px]",children:[u,l]}),e[11]=u,e[12]=l,e[13]=m):m=e[13];let f;return e[14]!==d||e[15]!==m?(f=s.jsxs("details",{className:"group text-xs text-muted-foreground",children:[d,m]}),e[14]=d,e[15]=m,e[16]=f):f=e[16],f}function Me(t){const e=_.c(23),{mode:r,onModeChange:c}=t,i=D();let a;e[0]!==c?(a=x=>{(x==="oauth"||x==="api-key")&&c(x)},e[0]=c,e[1]=a):a=e[1];let n;e[2]!==i?(n=i("settings.connectClients.installMethod"),e[2]=i,e[3]=n):n=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ce,{}),e[4]=d):d=e[4];let o;e[5]!==n?(o=s.jsx(de,{size:"sm",className:"text-xs","aria-label":n,children:d}),e[5]=n,e[6]=o):o=e[6];let u;e[7]!==i?(u=i("settings.connectClients.oauthOption"),e[7]=i,e[8]=u):u=e[8];let l;e[9]!==u?(l=s.jsx(V,{value:"oauth",className:"text-xs",children:u}),e[9]=u,e[10]=l):l=e[10];let m;e[11]!==i?(m=i("settings.connectClients.apiKeyOption"),e[11]=i,e[12]=m):m=e[12];let f;e[13]!==m?(f=s.jsx(V,{value:"api-key",className:"text-xs",children:m}),e[13]=m,e[14]=f):f=e[14];let p;e[15]!==l||e[16]!==f?(p=s.jsxs(ue,{children:[l,f]}),e[15]=l,e[16]=f,e[17]=p):p=e[17];let C;return e[18]!==r||e[19]!==a||e[20]!==o||e[21]!==p?(C=s.jsxs(me,{value:r,onValueChange:a,children:[o,p]}),e[18]=r,e[19]=a,e[20]=o,e[21]=p,e[22]=C):C=e[22],C}function Te(t){const e=_.c(26),{client:r,url:c,mode:i,newKey:a,canManageKeys:n,onGenerate:d,isGenerating:o,onClearNewKey:u}=t,l=D(),m=i==="api-key"&&a!==null,f=r==="raw";let p;e[0]!==m||e[1]!==l?(p=m&&s.jsxs(ae,{variant:"warning",className:"text-xs",children:[s.jsx(ie,{}),s.jsx(re,{children:l("settings.connectClients.snippetOneTimeWarning")})]}),e[0]=m,e[1]=l,e[2]=p):p=e[2];const C=m&&a?a:void 0;let x;e[3]!==r||e[4]!==i||e[5]!==C||e[6]!==c?(x=s.jsx(ze,{client:r,mode:i,url:c,apiKey:C}),e[3]=r,e[4]=i,e[5]=C,e[6]=c,e[7]=x):x=e[7];let h;e[8]!==f||e[9]!==c?(h=f&&s.jsx(Oe,{url:c}),e[8]=f,e[9]=c,e[10]=h):h=e[10];let y;e[11]!==n||e[12]!==r||e[13]!==o||e[14]!==f||e[15]!==i||e[16]!==u||e[17]!==d||e[18]!==m||e[19]!==l?(y=i==="api-key"&&n&&s.jsx("div",{children:m?s.jsx(U,{variant:"ghost",size:"sm",onClick:u,className:"text-xs",children:l("settings.connectClients.doneHideKey")}):s.jsxs(U,{size:"sm",onClick:d,disabled:o,className:"gap-1.5",children:[s.jsx(ye,{size:14}),o?l("settings.connectClients.generatingKey"):f?l("settings.connectClients.generateKey"):l("settings.connectClients.generateKeyFor",{client:Z(r)})]})}),e[11]=n,e[12]=r,e[13]=o,e[14]=f,e[15]=i,e[16]=u,e[17]=d,e[18]=m,e[19]=l,e[20]=y):y=e[20];let b;return e[21]!==p||e[22]!==x||e[23]!==h||e[24]!==y?(b=s.jsxs("div",{className:"flex flex-col gap-3",children:[p,x,h,y]}),e[21]=p,e[22]=x,e[23]=h,e[24]=y,e[25]=b):b=e[25],b}function Ee(){const t=_.c(51),e=D(),{org:r}=se();let c;t[0]!==r.slug?(c=Ke(r.slug),t[0]=r.slug,t[1]=c):c=t[1];const i=c,a=we(),{granted:n}=ne("api-keys:manage");let d;t[2]!==n?(d={enabled:n},t[2]=n,t[3]=d):d=t[3];const{data:o,dataUpdatedAt:u}=Ne(d),[l,m]=G.useState("oauth");let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f={},t[4]=f):f=t[4];const[p,C]=G.useState(f);let x;t[5]!==u||t[6]!==p||t[7]!==o?(x=$=>{const g=p[$];return g&&(!o||u<g.at||o.some(k=>k.id===g.id))?g.key:null},t[5]=u,t[6]=p,t[7]=o,t[8]=x):x=t[8];const h=x,[y,b]=G.useState("claude-code");let S;t[9]===Symbol.for("react.memo_cache_sentinel")?(S=$=>{const g=F.find(k=>k.id===$);g&&b(g.id)},t[9]=S):S=t[9];const K=S;let v;t[10]!==a||t[11]!==e?(v=$=>{const g=`${q}${Z($)} on ${Ae()}`;a.mutate({name:g,permissions:{"*":["*"]}},{onSuccess:k=>{C(B=>({...B,[$]:{id:k.id,key:k.key,at:Date.now()}})),J.success(e("settings.connectClients.keyCreated"))},onError:He})},t[10]=a,t[11]=e,t[12]=v):v=t[12];const N=v;let j;t[13]!==e?(j=e("settings.connectClients.connectAClient"),t[13]=e,t[14]=j):j=t[14];let w;t[15]!==e?(w=F.map($=>{const{id:g,label:k,labelKey:B,Icon:W}=$;return s.jsxs(fe,{value:g,variant:"underline",className:"gap-2",children:[s.jsx(W,{size:16}),B?e(B):k]},g)}),t[15]=e,t[16]=w):w=t[16];let z;t[17]!==w?(z=s.jsx(xe,{variant:"underline",className:"h-10 min-w-0 flex-1 gap-1 overflow-x-auto border-b-0",children:w}),t[17]=w,t[18]=z):z=t[18];let A;t[19]!==l?(A=s.jsx(Me,{mode:l,onModeChange:m}),t[19]=l,t[20]=A):A=t[20];let I;t[21]!==z||t[22]!==A?(I=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-1",children:[z,A]}),t[21]=z,t[22]=A,t[23]=I):I=t[23];let O;t[24]!==n||t[25]!==a||t[26]!==N||t[27]!==h||t[28]!==l||t[29]!==i?(O=F.map($=>{const{id:g,label:k}=$;return s.jsx(pe,{value:g,className:"p-2",children:s.jsx(Te,{client:g,url:i,mode:l,newKey:h(g),canManageKeys:n,onGenerate:()=>N(g),isGenerating:a.isPending&&a.variables?.name?.startsWith(`${q}${k}`)===!0,onClearNewKey:()=>C(B=>{const W={...B};return delete W[g],W})})},g)}),t[24]=n,t[25]=a,t[26]=N,t[27]=h,t[28]=l,t[29]=i,t[30]=O):O=t[30];let M;t[31]!==y||t[32]!==I||t[33]!==O?(M=s.jsx(oe,{className:"gap-0 overflow-hidden p-0",children:s.jsxs(ge,{value:y,onValueChange:K,variant:"underline",className:"gap-0",children:[I,O]})}),t[31]=y,t[32]=I,t[33]=O,t[34]=M):M=t[34];let T;t[35]!==l||t[36]!==e?(T=e(l==="oauth"?"settings.connectClients.oauthKeyHint":"settings.connectClients.headlessKeyHint"),t[35]=l,t[36]=e,t[37]=T):T=t[37];let E;t[38]!==T?(E=s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:T}),t[38]=T,t[39]=E):E=t[39];let H;t[40]!==y||t[41]!==e?(H=y==="raw"&&s.jsx("p",{className:"text-xs leading-snug text-muted-foreground",children:e("settings.connectClients.anyOtherClientDescription")}),t[40]=y,t[41]=e,t[42]=H):H=t[42];let P;t[43]!==M||t[44]!==E||t[45]!==H||t[46]!==j?(P=s.jsxs(le,{headerClassName:"px-0",title:j,children:[M,E,H]}),t[43]=M,t[44]=E,t[45]=H,t[46]=j,t[47]=P):P=t[47];let L;t[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ke,{capability:"api-keys:manage",area:"api-keys",children:s.jsx($e,{})}),t[48]=L):L=t[48];let R;return t[49]!==P?(R=s.jsxs(s.Fragment,{children:[P,L]}),t[49]=P,t[50]=R):R=t[50],R}function He(t){return J.error(t.message)}function Pe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{group:"connect",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function mt(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Pe,{}),t[0]=e):e=t[0],e}export{mt as default};
@@ -1 +1 @@
1
- import{c as v,b as N,j as s,D as w,B as k}from"./index-C9jQATHx.js";import{i as y}from"./ChevronRight-dkkIYuGe.js";import{i as z}from"./X-BbEHf0ox.js";import{an as _,ae as C}from"./agent-icon-CL_nl9mo.js";const S="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function $(){const t=v.c(13),e=N();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.reportsOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("routes.reportsOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let i;t[8]!==r?(i=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[a,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let c;return t[10]!==o||t[11]!==i?(c=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=c):c=t[12],c}function M(){const t=v.c(19),e=N();let l;t[0]!==e?(l=e("routes.reportsOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:_,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.reportsOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let a;t[6]!==o?(a={Icon:w,label:o},t[6]=o,t[7]=a):a=t[7];let r;t[8]!==e?(r=e("routes.reportsOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=r):r=t[9];let i;t[10]!==r?(i={Icon:C,label:r},t[10]=r,t[11]=i):i=t[11];let c;t[12]!==n||t[13]!==a||t[14]!==i?(c=[n,a,i],t[12]=n,t[13]=a,t[14]=i,t[15]=c):c=t[15];const m=c;let f;t[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=f):f=t[16];let d;return t[17]!==m?(d=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(q)})]}),t[17]=m,t[18]=d):d=t[18],d}function q(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function I(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:a}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let c;e[0]!==o||e[1]!==r?(c=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.reportsOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(z,{size:18})}),e[0]=o,e[1]=r,e[2]=c):c=e[2];let m,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=f):(m=e[3],f=e[4]);let d;e[5]!==i||e[6]!==l?(d=l&&s.jsxs(s.Fragment,{children:[s.jsx(y,{size:16,className:"shrink-0 text-foreground/25"}),i&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:i,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let x;e[8]!==d?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,f,d]}),e[8]=d,e[9]=x):x=e[9];let g;e[10]!==n?(g=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=g):g=e[11];let h;e[12]!==a||e[13]!==x||e[14]!==g?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[x,a,g]}),e[12]=a,e[13]=x,e[14]=g,e[15]=h):h=e[15];let u,b;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),b=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=u,e[17]=b):(u=e[16],b=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[u,b,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx($,{}),s.jsx("div",{className:"flex-1"}),s.jsx(M,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==c||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,h,p]}),e[19]=c,e[20]=h,e[21]=j):j=e[21],j}function B(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:a,children:r}=t,i=n||!l,c=l&&!n?r:null;let m;return e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==c?(m=s.jsxs(k,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:a,disabled:i,children:[o,c]}),e[0]=o,e[1]=a,e[2]=i,e[3]=c,e[4]=m):m=e[4],m}export{I as C,B as a};
1
+ import{c as v,b as N,j as s,D as w,B as k}from"./index-D9SZCEna.js";import{i as y}from"./ChevronRight-B1q4aRdE.js";import{i as z}from"./X-BdugDRJ_.js";import{an as _,ae as C}from"./agent-icon-CJ74PZ5u.js";const S="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function $(){const t=v.c(13),e=N();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.reportsOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("routes.reportsOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let i;t[8]!==r?(i=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[a,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let c;return t[10]!==o||t[11]!==i?(c=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=c):c=t[12],c}function M(){const t=v.c(19),e=N();let l;t[0]!==e?(l=e("routes.reportsOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:_,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.reportsOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let a;t[6]!==o?(a={Icon:w,label:o},t[6]=o,t[7]=a):a=t[7];let r;t[8]!==e?(r=e("routes.reportsOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=r):r=t[9];let i;t[10]!==r?(i={Icon:C,label:r},t[10]=r,t[11]=i):i=t[11];let c;t[12]!==n||t[13]!==a||t[14]!==i?(c=[n,a,i],t[12]=n,t[13]=a,t[14]=i,t[15]=c):c=t[15];const m=c;let f;t[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=f):f=t[16];let d;return t[17]!==m?(d=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(q)})]}),t[17]=m,t[18]=d):d=t[18],d}function q(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function I(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:a}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let c;e[0]!==o||e[1]!==r?(c=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.reportsOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(z,{size:18})}),e[0]=o,e[1]=r,e[2]=c):c=e[2];let m,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=f):(m=e[3],f=e[4]);let d;e[5]!==i||e[6]!==l?(d=l&&s.jsxs(s.Fragment,{children:[s.jsx(y,{size:16,className:"shrink-0 text-foreground/25"}),i&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:i,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let x;e[8]!==d?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,f,d]}),e[8]=d,e[9]=x):x=e[9];let g;e[10]!==n?(g=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=g):g=e[11];let h;e[12]!==a||e[13]!==x||e[14]!==g?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[x,a,g]}),e[12]=a,e[13]=x,e[14]=g,e[15]=h):h=e[15];let u,b;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),b=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=u,e[17]=b):(u=e[16],b=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[u,b,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx($,{}),s.jsx("div",{className:"flex-1"}),s.jsx(M,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==c||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,h,p]}),e[19]=c,e[20]=h,e[21]=j):j=e[21],j}function B(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:a,children:r}=t,i=n||!l,c=l&&!n?r:null;let m;return e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==c?(m=s.jsxs(k,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:a,disabled:i,children:[o,c]}),e[0]=o,e[1]=a,e[2]=i,e[3]=c,e[4]=m):m=e[4],m}export{I as C,B as a};
@@ -1 +1 @@
1
- import{aa as o,bs as a,bq as n,ab as e,br as i,bt as r,cy as b,dq as p,ct as m}from"./index-C9jQATHx.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:n(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:b("object"),properties:i(e(),r()).optional(),required:n(e()).optional()}).catchall(r()),_=p.extend({inputSchema:s,outputSchema:s.optional()}),f=o({headers:i(e(),e()).optional()}),g=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:n(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),d=256*1024;function l(t){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${t} must serialize to at most ${d} bytes`})}const u=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([g,f]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:h.nullable().describe("OAuth configuration"),configuration_state:l("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:n(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:n(_).nullable().describe("Discovered tools from MCP"),bindings:n(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});u.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});u.partial();function T(t){return t!=null&&"command"in t}function y(t){return!t||!t.startsWith("virtual://")?null:t.replace("virtual://","")}export{h as O,T as i,y as p};
1
+ import{aa as o,bs as a,bq as n,ab as e,br as i,bt as r,cy as b,dq as p,ct as m}from"./index-D9SZCEna.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:n(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:b("object"),properties:i(e(),r()).optional(),required:n(e()).optional()}).catchall(r()),_=p.extend({inputSchema:s,outputSchema:s.optional()}),f=o({headers:i(e(),e()).optional()}),g=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:n(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),d=256*1024;function l(t){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${t} must serialize to at most ${d} bytes`})}const u=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([g,f]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:h.nullable().describe("OAuth configuration"),configuration_state:l("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:n(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:n(_).nullable().describe("Discovered tools from MCP"),bindings:n(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});u.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});u.partial();function T(t){return t!=null&&"command"in t}function y(t){return!t||!t.startsWith("virtual://")?null:t.replace("virtual://","")}export{h as O,T as i,y as p};
@@ -1 +1 @@
1
- import{c as $,M as K,x as k,a0 as F,K as H,b as q,l as A,j as x,eD as G}from"./index-C9jQATHx.js";import{u as U}from"./use-registry-connections-T5KGR_Hv.js";import{e as V}from"./use-organization-settings-OP1vKLQc.js";import{u as X}from"./useInfiniteQuery-TmIWCfQ-.js";import{c as Y}from"./use-mcp-client-2uEIRhaM.js";import{i as z,f as B}from"./extract-connection-data-Cfd0L2y0.js";import{r as W,R as Z}from"./retry-i8LvYSZg.js";import{g as S}from"./connection-slug-CITJ0kGN.js";import{I as J}from"./integration-icon-DLbXRirx.js";function ge(){const s=$.c(6),e=U(),t=V(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,D=3;function Q(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function L(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:N}=X({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=z(i.id,e);try{return await W(async()=>{let u=null;try{u=await Y({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const b=await u.callTool({name:C,arguments:h}),v=b.structuredContent??b,P=v.nextCursor||v.cursor||void 0,M=B(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:M,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:D,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${D} attempts:`,u instanceof Z?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:F,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{d&&!g&&f()}}}function ye(s,e){const t=$.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=L(a,o.id,o.slug,!0,e),d=L(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const N=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==N||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:N,loadMore:m},t[10]=l,t[11]=N,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return Q(s)}function ie(s){return!Q(s)}function he(s){const e=new Map;for(const n of s){const a=S(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=S(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function xe(s){const e=$.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,N=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=A("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:A("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let b;e[14]!==h||e[15]!==C?(b=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=b):b=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==N?(P=t.description||N("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=N,e[21]=P):P=e[21];let M;e[22]!==P?(M=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=M):M=e[23];let R;e[24]!==v||e[25]!==M?(R=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,M]}),e[24]=v,e[25]=M,e[26]=R):R=e[26];let j;e[27]!==b||e[28]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[b,R]}),e[27]=b,e[28]=R,e[29]=j):j=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==j||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[j,w]}),e[32]=j,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(G,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{xe as C,ye as a,he as g,ge as u};
1
+ import{c as $,M as K,x as k,a0 as F,K as H,b as q,l as A,j as x,eC as G}from"./index-D9SZCEna.js";import{u as U}from"./use-registry-connections-DOOOhGq6.js";import{e as V}from"./use-organization-settings-H5G4XpWU.js";import{u as X}from"./useInfiniteQuery-n-cIQ6QW.js";import{c as Y}from"./use-mcp-client-DSGHqAYD.js";import{i as z,f as B}from"./extract-connection-data-QX25cgiT.js";import{r as W,R as Z}from"./retry-i8LvYSZg.js";import{g as S}from"./connection-slug-CITJ0kGN.js";import{I as J}from"./integration-icon-B1sz4SeY.js";function ge(){const s=$.c(6),e=U(),t=V(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,L=3;function Q(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function D(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:N}=X({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=z(i.id,e);try{return await W(async()=>{let u=null;try{u=await Y({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const b=await u.callTool({name:C,arguments:h}),v=b.structuredContent??b,P=v.nextCursor||v.cursor||void 0,M=B(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:M,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:L,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${L} attempts:`,u instanceof Z?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:F,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{d&&!g&&f()}}}function ye(s,e){const t=$.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=D(a,o.id,o.slug,!0,e),d=D(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const N=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==N||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:N,loadMore:m},t[10]=l,t[11]=N,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return Q(s)}function ie(s){return!Q(s)}function he(s){const e=new Map;for(const n of s){const a=S(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=S(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function xe(s){const e=$.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,N=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=A("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:A("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let b;e[14]!==h||e[15]!==C?(b=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=b):b=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==N?(P=t.description||N("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=N,e[21]=P):P=e[21];let M;e[22]!==P?(M=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=M):M=e[23];let R;e[24]!==v||e[25]!==M?(R=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,M]}),e[24]=v,e[25]=M,e[26]=R):R=e[26];let j;e[27]!==b||e[28]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[b,R]}),e[27]=b,e[28]=R,e[29]=j):j=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==j||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[j,w]}),e[32]=j,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(G,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{xe as C,ye as a,he as g,ge as u};
@@ -1 +1 @@
1
- import{aa as ve,br as $e,bt as Oe,ab as me,bq as Me,c as U,b as L,j as t,h as Ne,B as q,r as Z,l as Se,M as se,_ as ze,z as ue,K as te,d as ne,eD as Ee,eW as xe,H as Re,E as Ue,f as Fe,f4 as Ve,n as Le,ad as Be,ac as qe,t as J}from"./index-C9jQATHx.js";import{g as Ge}from"./extract-connection-data-Cfd0L2y0.js";import{E as ye}from"./empty-state-F709JYnF.js";import{E as He,c as Ke,r as Qe,b as We,d as Xe}from"./connection-form-helpers-BGarejHH.js";import{c as Ye,S as Je,D as Ze}from"./index-DDHop146.js";import{u as Ce,T as et}from"./use-mcp-auth-status-BH9IDFQ1.js";import{a as tt}from"./use-members-B9Bp6K2N.js";import{A as st}from"./avatar-YOwDvuCo.js";import{a as _e,b as we,u as nt}from"./use-connection-1DEAzFaJ.js";import{u as Ie}from"./use-mcp-client-2uEIRhaM.js";import{u as it}from"./use-mcp-tools-BEXh2Dal.js";import{a as ot}from"./use-mcp-prompts-CoIIHF5C.js";import{i as at,a as rt}from"./mcp-oauth-Cj16tOMc.js";import{I as re}from"./integration-icon-DLbXRirx.js";import{s as lt}from"./Plus-B6iViyXP.js";import{aY as ct,ae as dt,I as mt,b9 as ut,g as ie}from"./agent-icon-CL_nl9mo.js";import{a as ke,s as xt}from"./Settings02-11lXkxuh.js";import{s as ce}from"./Trash01-DwLqZ5iv.js";import{b as pt,a as ft,c as ht,S as gt,d as jt}from"./sheet-CAYJdNnO.js";import{F as K,b as Q,c as W,d as B,f as X,e as bt,a as vt}from"./form-DGoweIp4.js";import{I as Y}from"./input-DCAbperr.js";import{u as Nt,D as St}from"./use-delete-connection-D14lo6hH.js";import{c as yt,B as Ct,a as _t,C as wt}from"./monitoring-stats-row-C8qE8vIX.js";import{b as It,c as kt,d as Tt}from"./chart-DjxuH9z1.js";import{b as At}from"./use-virtual-mcp-De5-1hZU.js";import{i as Te}from"./ChevronRight-dkkIYuGe.js";import{b as Ae}from"./Users03-CBIUviMz.js";import{T as oe,a as Dt,c as ae,b as Pt}from"./tabs-CScSsCn-.js";import{g as De}from"./connection-slug-CITJ0kGN.js";import{d as $t}from"./Tool01-DekOr9OW.js";import{g as de}from"./types-BKgDxdgt.js";import{M as Ot}from"./mcp-app-renderer-C5_SSFlp.js";import{C as Mt}from"./collection-search-DOotlcr-.js";import{B as zt}from"./badge-CKy1DnEV.js";import{c as Et,D as Rt,b as Ut,a as pe}from"./dropdown-menu-BzAnwSL0.js";import{S as fe,b as he,a as ge,d as je,c as H}from"./select-BemZ3-RS.js";import{i as Ft}from"./CheckCircle-CQTpywHl.js";import{t as Vt}from"./ChevronUp-BANcOZ09.js";import{n as Lt}from"./Tool02-CgXadMFZ.js";import{a as Bt}from"./UserSquare-DO483pcO.js";import{s as qt}from"./XClose-D9lEUPrO.js";import{p as Gt,i as Ht}from"./connection-C0h_riCe.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./sidebar-kfvz7bzl.js";import"./Printer-1AF1IGx9.js";import"./use-mobile-CpN-x3jP.js";import"./tooltip-D5dIOzcQ.js";import"./index-BVdPTogP.js";import"./index-D3hBrAe3.js";import"./Key01-TUQZiePT.js";import"./auth-DqeCOVzg.js";import"./use-registry-connections-T5KGR_Hv.js";import"./use-organization-settings-OP1vKLQc.js";import"./schema-DLCqAhaO.js";import"./task-board-WxptS5oC.js";import"./index-BqEX4CxD.js";import"./index-BiIMwVbK.js";import"./index-Ch3pSh1a.js";import"./index-kzbDuxts.js";import"./popover-cYfVOF_J.js";import"./Check-HvrCGvlV.js";import"./SearchMd-BFooCWLz.js";import"./use-create-virtual-mcp-6onzYx_V.js";import"./use-navigate-to-agent-D91bju80.js";import"./hooks-DW28Wv6W.js";import"./backoff-8mStPHYB.js";import"./thread-intent-Dqbb6tX6.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Eye-wRiP-IKY.js";import"./use-org-auth-client-r5wiYH2P.js";import"./User01-Cuc8TQ2e.js";import"./AlertCircle-CMdkAjxQ.js";import"./ArrowUp-Bx3jqyJU.js";import"./ArrowLeft-DGJWLWaL.js";import"./ArrowRight-D_1DZN2N.js";import"./TrendUp01-BJ6ZxGib.js";import"./ZoomOut-DR5p3Py1.js";import"./DotsVertical-DEpQR8Rs.js";import"./Copy01-D4tr9F1r.js";import"./CreditCard01-CX8hLF54.js";import"./Database01-C6v3VKBC.js";import"./MessageCircle01-DrVOv17x.js";import"./Download01-G8ZhNqF3.js";import"./File02-C5Axd7Wg.js";import"./Share07-2izyqHpD.js";import"./GitBranch01-xiI7ahmy.js";import"./Globe01-BJfrzyV2.js";import"./SwitchHorizontal01-Chrl4_cZ.js";import"./HardDrive-BtlNN50l.js";import"./Image01-ZQpSr40Q.js";import"./Link01-Dubdh0XV.js";import"./LinkExternal01-DsoIvXMf.js";import"./Monitor01-8akol8yD.js";import"./Sun-DqCbyuBS.js";import"./Package-6pCyxdj-.js";import"./Palette-8_jSprTt.js";import"./Play-B2WDpGm-.js";import"./SearchLg-o3jjSP_H.js";import"./Shield01-C_NSoVzs.js";import"./Stars01-dQ6_BPZ3.js";import"./Upload01-zIaNWjGg.js";import"./Users01-C_FX7NZW.js";import"./XCircle-CIpucXWN.js";import"./X-BbEHf0ox.js";import"./Zap-FJBBk1lb.js";import"./label-BZvBRfsC.js";import"./alert-dialog-BcLnZa7A.js";import"./AreaChart-jIv2Q0sS.js";import"./ErrorBarContext-DNwZJRAX.js";import"./Sector-D27lvJUl.js";const Kt=ve({scopes:Me(me()).describe("List of scopes available"),stateSchema:$e(me(),Oe()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Kt}];function Wt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r}=s,a=L();let d;e[0]!==n.id?(d={connectionId:n.id},e[0]=n.id,e[1]=d):d=e[1];const p=Ce(d),l=!(n.connection_type==="VIRTUAL")&&p.supportsOAuth&&!p.isAuthenticated,f=n.status!=="active",u=l||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==u?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let S;e[9]!==n.status||e[10]!==f||e[11]!==l||e[12]!==a?(S=l?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=l,e[12]=a,e[13]=S):S=e[13];let v;e[14]!==j||e[15]!==S?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==l||e[19]!==o||e[20]!==a?(y=l&&t.jsx(q,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=l,e[19]=o,e[20]=a,e[21]=y):y=e[21];let D;e[22]!==n||e[23]!==f||e[24]!==r||e[25]!==a?(D=f?t.jsxs(q,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>r(n,"active"),children:[t.jsx(ct,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(dt,{size:13})}),e[22]=n,e[23]=f,e[24]=r,e[25]=a,e[26]=D):D=e[26];let P;e[27]!==n||e[28]!==c?(P=()=>c(n),e[27]=n,e[28]=c,e[29]=P):P=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]!==a?(M=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=M):M=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(ke,{size:13}),e[34]=T):T=e[34];let $;e[35]!==P||e[36]!==_||e[37]!==M?($=t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:P,title:_,"aria-label":M,children:T}),e[35]=P,e[36]=_,e[37]=M,e[38]=$):$=e[38];let k;e[39]!==n||e[40]!==i?(k=()=>i(n),e[39]=n,e[40]=i,e[41]=k):k=e[41];let N;e[42]!==a?(N=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=N):N=e[43];let b;e[44]!==a?(b=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(ce,{size:13}),e[46]=E):E=e[46];let z;e[47]!==k||e[48]!==N||e[49]!==b?(z=t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:k,title:N,"aria-label":b,children:E}),e[47]=k,e[48]=N,e[49]=b,e[50]=z):z=e[50];let I;e[51]!==$||e[52]!==z||e[53]!==y||e[54]!==D?(I=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,D,$,z]}),e[51]=$,e[52]=z,e[53]=y,e[54]=D,e[55]=I):I=e[55];let A;return e[56]!==I||e[57]!==h||e[58]!==g||e[59]!==v?(A=t.jsxs("div",{className:h,children:[g,v,I]}),e[56]=I,e[57]=h,e[58]=g,e[59]=v,e[60]=A):A=e[60],A}function Xt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=L();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let r;e[3]!==n.title?(r=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]=r):r=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let d;e[8]!==o?(d=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=d):d=e[9];let p;e[10]!==o?(p=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=p):p=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ke,{size:13}),e[12]=m):m=e[12];let l;e[13]!==a||e[14]!==d||e[15]!==p?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:d,"aria-label":p,children:m})}),e[13]=a,e[14]=d,e[15]=p,e[16]=l):l=e[16];let f;return e[17]!==i||e[18]!==r||e[19]!==l?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,r,l]}),e[17]=i,e[18]=r,e[19]=l,e[20]=f):f=e[20],f}function Yt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r,onAdd:a,isAdding:d}=s,p=L();if(n.length===0)return null;let m;e[0]!==n.length||e[1]!==p?(m=n.length===1?p("details.connectionInstancesPanel.instance"):p("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=p,e[2]=m):m=e[2];let l;e[3]!==m?(l=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m}),e[3]=m,e[4]=l):l=e[4];let f;e[5]!==d?(f=d?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(lt,{size:13}),e[5]=d,e[6]=f):f=e[6];let u;e[7]!==p?(u=p("details.connectionInstancesPanel.addInstance"),e[7]=p,e[8]=u):u=e[8];let h;e[9]!==d||e[10]!==a||e[11]!==f||e[12]!==u?(h=t.jsxs(q,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:d,children:[f,u]}),e[9]=d,e[10]=a,e[11]=f,e[12]=u,e[13]=h):h=e[13];let g;e[14]!==l||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[l,h]}),e[14]=l,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==r){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==r?(y=D=>t.jsx(Z.Suspense,{fallback:t.jsx(Xt,{instance:D,onConfigure:c}),children:t.jsx(Wt,{instance:D,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r})},D.id),e[23]=o,e[24]=c,e[25]=i,e[26]=r,e[27]=y):y=e[27],j=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=r,e[22]=j}else j=e[22];let S;e[28]!==j?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=S):S=e[29];let v;return e[30]!==g||e[31]!==S?(v=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=v):v=e[32],v}function Jt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(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 ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=L(),r=ze(),a=es(o),{data:d}=ue({queryKey:te.connectionActivity(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:p}=ue({queryKey:te.connectionActivityErrors(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),m=yt(d?.logs??[],a,void 0,d?.total,p?.total),l=m.data,f=m.totalCalls>0,u=Jt(d?.logs??[]),h=m.totalCalls>0?Math.round(m.totalErrors/m.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],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:m.totalCalls.toLocaleString()}),j]}),m.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:m.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),m.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(m.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),f?t.jsxs("div",{children:[t.jsx(It,{config:ts,className:"h-16 w-full",children:t.jsxs(Ct,{data:l,barCategoryGap:"4%",children:[t.jsx(kt,{content:t.jsx(Tt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(_t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:l.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:l[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:l[l.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:i("details.connectionActivity.noActivityInThisPeriod")})}),u.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:u.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=U.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 rs(s){const e=U.c(22),{connectionId:n}=s,c=L(),[o,i]=Z.useState("14d"),{org:r}=se();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let d;e[2]!==a?(d=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=d):d=e[3];let p;e[4]!==c?(p=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=p):p=e[5];let m;e[6]!==o?(m=Zt.map(j=>t.jsx("button",{type:"button","aria-pressed":o===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=o,e[7]=m):m=e[7];let l;e[8]!==p||e[9]!==m?(l=t.jsx("div",{role:"group","aria-label":p,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:m}),e[8]=p,e[9]=m,e[10]=l):l=e[10];let f;e[11]!==d||e[12]!==l?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[d,l]}),e[11]=d,e[12]=l,e[13]=f):f=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(as,{}),e[14]=u):u=e[14];let h;e[15]!==n||e[16]!==r.id||e[17]!==o?(h=t.jsx(Z.Suspense,{fallback:u,children:t.jsx(ss,{connectionId:n,orgId:r.id,timeframe:o})}),e[15]=n,e[16]=r.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function ls(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=ne();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const l=crypto.randomUUID();o({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:l}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ae,{size:16}),e[4]=r):r=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let d;e[8]!==n.title?(d=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=d):d=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Te,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=p):p=e[10];let m;return e[11]!==i||e[12]!==a||e[13]!==d?(m=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,d,p]}),e[11]=i,e[12]=a,e[13]=d,e[14]=m):m=e[14],m}function cs(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let r;e[3]!==c?(r=a=>t.jsx(ls,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=r):r=e[4],o=n.map(r),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=U.c(13),{connection:n}=s,c=L(),{org:o}=se();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const r=At(i);if(!(r.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}let d;e[3]!==c?(d=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=d):d=e[4];let p;e[5]!==d?(p=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:d})}),e[5]=d,e[6]=p):p=e[6];let m;e[7]!==o.slug||e[8]!==r?(m=t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:r,org:o.slug})}),e[7]=o.slug,e[8]=r,e[9]=m):m=e[9];let l;return e[10]!==p||e[11]!==m?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,m]}),e[10]=p,e[11]=m,e[12]=l):l=e[12],l}function ms(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=L(),r=ne(),{org:a}=se();let d;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(d={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=d):d=e[3];const p=Ie(d),m=_e(c);let l;e[4]!==m||e[5]!==c?(l=m?De(m):c,e[4]=m,e[5]=c,e[6]=l):l=e[6];const f=l,[u,h]=Z.useState("");let g,j,S,v;if(e[7]!==f||e[8]!==p||e[9]!==r||e[10]!==o||e[11]!==u||e[12]!==i||e[13]!==n){const P=(n??[]).filter(us),_=u.toLowerCase().trim(),M=_?P.filter(b=>b.name.toLowerCase().includes(_)||b.description&&b.description.toLowerCase().includes(_)):P;let T;e[18]!==f||e[19]!==r||e[20]!==o?(T=b=>{r({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=f,e[19]=r,e[20]=o,e[21]=T):T=e[21];const $=T;S="flex flex-col h-full overflow-hidden";let k;e[22]!==i?(k=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=k):k=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=N):N=e[24],e[25]!==u||e[26]!==k?(v=t.jsx(Mt,{value:u,onChange:h,placeholder:k,onKeyDown:N}),e[25]=u,e[26]=k,e[27]=v):v=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(ye,{image:null,title:i(u?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(u?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(b=>{const E=de(b._meta);return t.jsxs(Ee,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>$(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ot,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:p})}),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:b.annotations?.title??b.name}),t.jsx(et,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=f,e[8]=p,e[9]=r,e[10]=o,e[11]=u,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=v}else g=e[14],j=e[15],S=e[16],v=e[17];let y;e[28]!==g||e[29]!==j?(y=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=y):y=e[30];let D;return e[31]!==S||e[32]!==v||e[33]!==y?(D=t.jsxs("div",{className:S,children:[v,y]}),e[31]=S,e[32]=v,e[33]=y,e[34]=D):D=e[34],D}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=r=>r.charAt(0).toUpperCase()+r.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=L();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=U.c(72),{tools:n,prompts:c,resources:o,connectionId:i,org:r}=s;let a;e[0]!==c?(a=c===void 0?[]:c,e[0]=c,e[1]=a):a=e[1];const d=a;let p;e[2]!==o?(p=o===void 0?[]:o,e[2]=o,e[3]=p):p=e[3];const m=p,l=L(),f=ne(),u=_e(i??"");let h;e[4]!==u||e[5]!==i?(h=u?De(u):i,e[4]=u,e[5]=i,e[6]=h):h=e[6];const g=h;let j;e[7]!==g||e[8]!==i||e[9]!==f||e[10]!==r?(j=function(F){!i||!r||f({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(F)}})},e[7]=g,e[8]=i,e[9]=f,e[10]=r,e[11]=j):j=e[11];const S=j;let v;e[12]!==i||e[13]!==r||e[14]!==n?(v=i&&r&&n.some(hs),e[12]=i,e[13]=r,e[14]=n,e[15]=v):v=e[15];const y=v;if(n.length+d.length+m.length===0){let C;e[16]!==l?(C=l("details.connectionCapabilities.capabilities"),e[16]=l,e[17]=C):C=e[17];let F;e[18]!==C?(F=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=F):F=e[19];let G;e[20]!==l?(G=l("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=l,e[21]=G):G=e[21];let V;e[22]!==G?(V=t.jsx("p",{className:"text-sm text-muted-foreground",children:G}),e[22]=G,e[23]=V):V=e[23];let ee;return e[24]!==V||e[25]!==F?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[F,V]}),e[24]=V,e[25]=F,e[26]=ee):ee=e[26],ee}let P;e[27]!==l||e[28]!==n.length?(P=l("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=l,e[28]=n.length,e[29]=P):P=e[29];let _;e[30]!==P?(_=t.jsx(oe,{value:"tools",variant:"underline",children:P}),e[30]=P,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==l?(M=y&&t.jsx(oe,{value:"apps",variant:"underline",children:l("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=l,e[34]=M):M=e[34];let T;e[35]!==l?(T=l("details.connectionCapabilities.promptsTab"),e[35]=l,e[36]=T):T=e[36];let $;e[37]!==T?($=t.jsx(oe,{value:"prompts",variant:"underline",children:T}),e[37]=T,e[38]=$):$=e[38];let k;e[39]!==l?(k=l("details.connectionCapabilities.resourcesTab"),e[39]=l,e[40]=k):k=e[40];let N;e[41]!==k?(N=t.jsx(oe,{value:"resources",variant:"underline",children:k}),e[41]=k,e[42]=N):N=e[42];let b;e[43]!==M||e[44]!==$||e[45]!==N||e[46]!==_?(b=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Dt,{variant:"underline",className:"gap-1",children:[_,M,$,N]})}),e[43]=M,e[44]=$,e[45]=N,e[46]=_,e[47]=b):b=e[47];let E;e[48]!==S||e[49]!==n?(E=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:()=>S(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($t,{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:Pe(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(Te,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(le,{label:"tools"}),e[48]=S,e[49]=n,e[50]=E):E=e[50];let z;e[51]!==E?(z=t.jsx(ae,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[51]=E,e[52]=z):z=e[52];let I;e[53]!==i||e[54]!==y||e[55]!==r||e[56]!==n?(I=y&&t.jsx(ae,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:r})}),e[53]=i,e[54]=y,e[55]=r,e[56]=n,e[57]=I):I=e[57];let A;e[58]!==d?(A=d.length>0?d.map(fs):t.jsx(le,{label:"prompts"}),e[58]=d,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(ae,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let x;e[62]!==m?(x=m.length>0?m.map(ps):t.jsx(le,{label:"resources"}),e[62]=m,e[63]=x):x=e[63];let w;e[64]!==x?(w=t.jsx(ae,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:x})}),e[64]=x,e[65]=w):w=e[65];let O;return e[66]!==b||e[67]!==z||e[68]!==I||e[69]!==R||e[70]!==w?(O=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Pt,{defaultValue:"tools",variant:"underline",children:[b,z,I,R,w]})}),e[66]=b,e[67]=z,e[68]=I,e[69]=R,e[70]=w,e[71]=O):O=e[71],O}function ps(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(ut,{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 fs(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(mt,{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:Pe(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 hs(s){return de(s._meta)}function gs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(re,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let r;e[3]!==o?(r=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:o})}),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==n.description?(a=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]=a):a=e[6];let d;e[7]!==r||e[8]!==a?(d=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,a]}),e[7]=r,e[8]=a,e[9]=d):d=e[9];let p;return e[10]!==i||e[11]!==d?(p=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:[i,d]}),e[10]=i,e[11]=d,e[12]=p):p=e[12],p}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=L(),r=xe({control:s.control,name:"ui_type"}),a=xe({control:s.control,name:"connection_url"}),{stdioEnabled:d}=Re(),p=(()=>{if(typeof a!="string"||!a)return!1;try{const u=new URL(a);return u.hostname==="api.githubcopilot.com"&&u.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),m=d||e.connection_type==="STDIO",l=e.connection_type==="VIRTUAL",f=l?Gt(e.connection_url):null;return l?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:i("details.connectionSidebar.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(Ae,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),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:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),r!=="NPX"&&r!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(fe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsxs(he,{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(ie,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(ge,{})]})}),t.jsxs(je,{children:[t.jsx(H,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(H,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(H,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(H,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(fe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsx(he,{className:"h-10",children:t.jsx(ge,{})})}),t.jsxs(je,{children:[t.jsx(H,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(H,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(H,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(H,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Bt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),r==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),r==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(X,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(r==="NPX"||r==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(B,{children:t.jsx(He,{value:u.value??[],onChange:u.onChange})}),t.jsx(X,{})]})}),r!=="NPX"&&r!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i(p?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Et,{children:[t.jsx(Rt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(zt,{variant:"success",className:"gap-1.5",children:[t.jsx(Ft,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Vt,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(pe,{onClick:c,children:[t.jsx(xt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(pe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&u.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:()=>u.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:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(qt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(B,{children:t.jsx(Y,{type:"password",placeholder:i(p?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),p&&t.jsxs(bt,{children:[i("details.connectionSidebar.createAPatAt")," ",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(X,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(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"&&Ht(s.connection_headers)){const c=s.connection_headers,o=Qe(c.envVars);if(bs(c)){const r=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:r,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}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 Ss(s){let e,n=null,c=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=We(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=Xe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:r,siblings:a}){const d=L(),p=ne({from:"/$org/settings/connections/$appSlug"}),m=Le(),l=we(),{org:f}=se(),u=Nt({onSuccess:()=>{a.length<=1&&p({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),v=Ce({connectionId:e}),{data:y}=tt(),D=y?.data?.members??[],P=h??s,_=D.find(x=>x.userId===P.created_by),T=s?.connection_type==="VIRTUAL"||v.isAuthenticated,$={...s,tools:o},k=Ye($,Qt),N=Be({resolver:qe(Ke),values:be(h??s)}),b=N.formState.isDirty,E=async()=>{if(!await N.trigger())return;const w=N.getValues(),O=Ss(w),C=h?.id??e;await l.update.mutateAsync({id:C,data:O}),N.reset(w)},z=()=>{N.reset(be(h??s))},I=async x=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:O,tokenInfo:C,error:F}=await rt({connectionId:x,orgSlug:f.slug,...w?{scope:w}:{}});if(F||!O){J.error(d("details.connection.authFailed",{error:F??""}));return}if(C)try{const V=await fetch(`/api/${f.slug}/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})});if(!V.ok)console.error("Failed to save OAuth token:",await V.text()),await l.update.mutateAsync({id:x,data:{connection_token:O}});else try{await l.update.mutateAsync({id:x,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(V){console.error("Error saving OAuth token:",V),await l.update.mutateAsync({id:x,data:{connection_token:O}})}else await l.update.mutateAsync({id:x,data:{connection_token:O}});const G=new URL(`/api/${f.slug}/mcp/${x}`,window.location.origin);await m.invalidateQueries({queryKey:te.isMCPAuthenticated(G.href,null)}),await m.invalidateQueries({queryKey:te.mcpClientPrefix()}),J.success(d("details.connection.authSuccess"))},A=()=>I(s.id),R=async()=>{try{const x=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const O=await x.text();J.error(d("details.connection.failedRemoveOAuth",{error:O}));return}const w=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await m.invalidateQueries({queryKey:te.isMCPAuthenticated(w.href,null)}),J.success(d("details.connection.oauthRemoved"))}catch(x){console.error("Error removing OAuth token:",x),J.error(d("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(St,{...u}),t.jsx(pt,{open:h!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(ft,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(ht,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(gt,{className:"text-base",children:h?.title??s.title}),t.jsx(jt,{className:"text-xs",children:d("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:d("details.connection.connectedBy")}),t.jsx(st,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(vt,{...N,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(K,{control:N.control,name:"title",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(W,{children:d("details.connection.nameLabel")}),t.jsx(B,{children:t.jsx(Y,{...x})}),t.jsx(X,{})]})}),t.jsx(K,{control:N.control,name:"description",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(W,{children:d("details.connection.descriptionLabel")}),t.jsx(B,{children:t.jsx(Y,{...x,value:x.value||""})}),t.jsx(X,{})]})})]}),t.jsx(js,{form:N,connection:h??s,hasOAuthToken:v.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(Je,{connection:h??s,form:N,hasMcpBinding:k,isMCPAuthenticated:T,supportsOAuth:v.supportsOAuth,isServerError:v.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(q,{onClick:E,disabled:!b||c,className:"flex-1",children:d(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(q,{variant:"outline",onClick:z,children:d("details.connection.undoButton")}),t.jsxs(q,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=h??s;g(null),u.requestDelete(x)},children:[t.jsx(ce,{size:15}),d("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(Ze,{hideTopbar:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const x=a[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(rs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Yt,{instances:a,onConfigure:x=>g(x),onAuthenticate:x=>I(x.id),onDelete:x=>u.requestDelete(x),onToggleStatus:async(x,w)=>{try{await l.update.mutateAsync({id:x.id,data:{status:w}}),J.success(d(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(d("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const x=a[0]??s,w=x.title.replace(/\s*\(\d+\)\s*$/,""),O=a.length+1,C=`${w} (${O})`,F=Ge("conn");await l.create.mutateAsync({id:F,title:C,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 G=new URL(`/api/${f.slug}/mcp/${F}`,window.location.origin),V=await at({url:G.href,token:null,orgId:f.id});V.supportsOAuth&&!V.isAuthenticated&&await I(F)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:r,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=U.c(52),e=L();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=ne(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:r}=Fe(o),{org:a}=se(),d=we();let p;s[2]!==i?(p={slug:i},s[2]=i,s[3]=p):p=s[3];const m=nt(p),l=m[0]??null,f=l?.id??"",u=f||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==u?(h={connectionId:u,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=u,s[7]=h):h=s[7];const g=Ie(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=it(j);let v;if(s[10]!==l?.tools||s[11]!==f||s[12]!==m||s[13]!==S){const I=S?S.tools.map(As):(l?.tools??[]).map(Ts);e:{if(m.length<=1){v=I;break e}const A=new Set,R=[],x=Is;for(const w of m){const O=w.id===f?I:x(w.tools);for(const C of O)A.has(C.name)||(A.add(C.name),R.push(C))}v=R.length>0?R:I}s[10]=l?.tools,s[11]=f,s[12]=m,s[13]=S,s[14]=v}else v=s[14];const y=v;let D;s[15]!==g?(D={client:g},s[15]=g,s[16]=D):D=s[16];const{data:P}=ot(D);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Ve(_);let T;s[19]!==P?.prompts?(T=P?.prompts??[],s[19]=P?.prompts,s[20]=T):T=s[20];let $;s[21]!==T?($=T.map(ws),s[21]=T,s[22]=$):$=s[22];const k=$;let N;s[23]!==M?.resources?(N=M?.resources??[],s[23]=M?.resources,s[24]=N):N=s[24];let b;s[25]!==N?(b=N.map(_s),s[25]=N,s[26]=b):b=s[26];const E=b;if(!l){let I;s[27]!==e?(I=e("details.connection.notFoundTitle"),s[27]=e,s[28]=I):I=s[28];let A;s[29]!==e?(A=e("details.connection.notFoundDescription"),s[29]=e,s[30]=A):A=s[30];let R;s[31]!==c||s[32]!==r?(R=()=>c({to:"/$org/settings/connections",params:{org:r}}),s[31]=c,s[32]=r,s[33]=R):R=s[33];let x;s[34]!==e?(x=e("details.connection.backButton"),s[34]=e,s[35]=x):x=s[35];let w;s[36]!==R||s[37]!==x?(w=t.jsx(q,{variant:"outline",onClick:R,children:x}),s[36]=R,s[37]=x,s[38]=w):w=s[38];let O;return s[39]!==I||s[40]!==A||s[41]!==w?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ye,{title:I,description:A,actions:w})}),s[39]=I,s[40]=A,s[41]=w,s[42]=O):O=s[42],O}let z;return s[43]!==d.update.isPending||s[44]!==y||s[45]!==l||s[46]!==f||s[47]!==r||s[48]!==k||s[49]!==E||s[50]!==m?(z=t.jsx(ys,{org:r,connection:l,connectionId:f,isUpdating:d.update.isPending,tools:y,prompts:k,resources:E,siblings:m}),s[43]=d.update.isPending,s[44]=y,s[45]=l,s[46]=f,s[47]=r,s[48]=k,s[49]=E,s[50]=m,s[51]=z):z=s[51],z}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function Is(s){return(s??[]).map(ks)}function ks(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function Ei(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ds,{}),s[0]=e):e=s[0],e}export{Ei as default};
1
+ import{aa as ve,br as $e,bt as Oe,ab as me,bq as Me,c as U,b as L,j as t,h as Ne,B as q,r as Z,l as Se,M as se,_ as ze,z as ue,K as te,d as ne,eC as Ee,eW as xe,H as Re,E as Ue,f as Fe,f4 as Ve,n as Le,ad as Be,ac as qe,t as J}from"./index-D9SZCEna.js";import{g as Ge}from"./extract-connection-data-QX25cgiT.js";import{E as ye}from"./empty-state-ClkrHYmJ.js";import{E as He,c as Ke,r as Qe,b as We,d as Xe}from"./connection-form-helpers-bnj5C_pO.js";import{c as Ye,S as Je,D as Ze}from"./index-CZJ5G35_.js";import{u as Ce,T as et}from"./use-mcp-auth-status-C9YFSjt7.js";import{a as tt}from"./use-members-vJs6czuz.js";import{A as st}from"./avatar-ubLaXORO.js";import{a as _e,b as we,u as nt}from"./use-connection-B3V4uZfg.js";import{u as Ie}from"./use-mcp-client-DSGHqAYD.js";import{u as it}from"./use-mcp-tools-5LthbFq_.js";import{a as ot}from"./use-mcp-prompts-Dne6CipL.js";import{i as at,a as rt}from"./mcp-oauth-DssHToM4.js";import{I as re}from"./integration-icon-B1sz4SeY.js";import{s as lt}from"./Plus-7oGWv8-d.js";import{aY as ct,ae as dt,I as mt,b9 as ut,g as ie}from"./agent-icon-CJ74PZ5u.js";import{a as ke,s as xt}from"./Settings02-2akNrypo.js";import{s as ce}from"./Trash01-BUixXtcj.js";import{b as pt,a as ft,c as ht,S as gt,d as jt}from"./sheet-CgrtO55N.js";import{F as K,b as Q,c as W,d as B,f as X,e as bt,a as vt}from"./form-CCEoicAR.js";import{I as Y}from"./input-DMN2ylja.js";import{u as Nt,D as St}from"./use-delete-connection-CzgqXCsw.js";import{c as yt,B as Ct,a as _t,C as wt}from"./monitoring-stats-row-wjNhJJbD.js";import{b as It,c as kt,d as Tt}from"./chart-Ei5Re4Wl.js";import{b as At}from"./use-virtual-mcp-Dr5NTd9r.js";import{i as Te}from"./ChevronRight-B1q4aRdE.js";import{b as Ae}from"./Users03-BNcMDmHT.js";import{T as oe,a as Dt,c as ae,b as Pt}from"./tabs-BSBLIBXv.js";import{g as De}from"./connection-slug-CITJ0kGN.js";import{d as $t}from"./Tool01-DXg-697p.js";import{g as de}from"./types-OTmzvENk.js";import{M as Ot}from"./mcp-app-renderer-BrDqPGAT.js";import{C as Mt}from"./collection-search-aDCUzq7X.js";import{B as zt}from"./badge-DyIAknWc.js";import{c as Et,D as Rt,b as Ut,a as pe}from"./dropdown-menu-tx6OX4aA.js";import{S as fe,b as he,a as ge,d as je,c as H}from"./select-D8neBfTB.js";import{i as Ft}from"./CheckCircle-CXCmqtXe.js";import{t as Vt}from"./ChevronUp-Lw2r8wDj.js";import{n as Lt}from"./Tool02-BZbYKRFW.js";import{a as Bt}from"./UserSquare-DXP9QUC0.js";import{s as qt}from"./XClose-DdmRkPdn.js";import{p as Gt,i as Ht}from"./connection-BZn_3MEZ.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./sidebar-CiHAL8Wu.js";import"./Printer-DhW8UOTN.js";import"./use-mobile-C5k18fP1.js";import"./tooltip-BM4MyYtx.js";import"./index-unCC-6KL.js";import"./index-Cw7IXwLo.js";import"./Key01-CVWwYajp.js";import"./auth-BrGex7FY.js";import"./use-registry-connections-DOOOhGq6.js";import"./use-organization-settings-H5G4XpWU.js";import"./schema-DobnB1YS.js";import"./task-board-Cw7pQ9f8.js";import"./index-CuNhd5EW.js";import"./index-Cze73w-G.js";import"./index-nvVwQgfX.js";import"./index-CUJMnria.js";import"./popover-BGd36YgB.js";import"./Check-ZxK4xe7F.js";import"./SearchMd-DBxEPxbW.js";import"./use-create-virtual-mcp-2UYwG6y3.js";import"./use-navigate-to-agent-qRyehLE-.js";import"./hooks-CBQzxxCh.js";import"./backoff-8mStPHYB.js";import"./thread-intent-CC6uL69b.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Eye-Bwli19bO.js";import"./use-org-auth-client-BfT_gcIU.js";import"./User01-B4JBmtbe.js";import"./AlertCircle-BKchbppf.js";import"./ArrowUp-DPPS6QAz.js";import"./ArrowLeft-BxcCVSsO.js";import"./ArrowRight-M0oFo16p.js";import"./TrendUp01-WeYCREkX.js";import"./ZoomOut-CG3Sk2c2.js";import"./DotsVertical-BHpLZzPU.js";import"./Copy01-BdfG_e2R.js";import"./CreditCard01-C0eii6cH.js";import"./Database01-D9xiMFRQ.js";import"./MessageCircle01-bLbPG2BY.js";import"./Download01-DAPCTBrh.js";import"./File02-Bk1dmRy_.js";import"./Share07-Bl1oEFtE.js";import"./GitBranch01-fGQefizx.js";import"./Globe01-B4gNbsCg.js";import"./SwitchHorizontal01-1bzMkj1j.js";import"./HardDrive-D_aROQkn.js";import"./Image01-DTFvmUXj.js";import"./Link01-CZbhj0_0.js";import"./LinkExternal01-BKxoqAo_.js";import"./Monitor01-BPvejB1C.js";import"./Sun-49v3fDGt.js";import"./Package-aFD4MTA7.js";import"./Palette-CPUNhPQw.js";import"./Play-CIReceJE.js";import"./SearchLg-gMgT6qJL.js";import"./Shield01-D26ePB5X.js";import"./Stars01-Dja9PZ8p.js";import"./Upload01-51uW4MtH.js";import"./Users01-DxH5OmOp.js";import"./XCircle-frgB9vHw.js";import"./X-BdugDRJ_.js";import"./Zap-BOBZbKzr.js";import"./label-Dh9EjnVS.js";import"./alert-dialog-92GutrH9.js";import"./AreaChart-y2C6FBRO.js";import"./ErrorBarContext-B7gfjXfw.js";import"./Sector-BObjIYQg.js";const Kt=ve({scopes:Me(me()).describe("List of scopes available"),stateSchema:$e(me(),Oe()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Kt}];function Wt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r}=s,a=L();let d;e[0]!==n.id?(d={connectionId:n.id},e[0]=n.id,e[1]=d):d=e[1];const p=Ce(d),l=!(n.connection_type==="VIRTUAL")&&p.supportsOAuth&&!p.isAuthenticated,f=n.status!=="active",u=l||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==u?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let S;e[9]!==n.status||e[10]!==f||e[11]!==l||e[12]!==a?(S=l?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=l,e[12]=a,e[13]=S):S=e[13];let v;e[14]!==j||e[15]!==S?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==l||e[19]!==o||e[20]!==a?(y=l&&t.jsx(q,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=l,e[19]=o,e[20]=a,e[21]=y):y=e[21];let D;e[22]!==n||e[23]!==f||e[24]!==r||e[25]!==a?(D=f?t.jsxs(q,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>r(n,"active"),children:[t.jsx(ct,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(dt,{size:13})}),e[22]=n,e[23]=f,e[24]=r,e[25]=a,e[26]=D):D=e[26];let P;e[27]!==n||e[28]!==c?(P=()=>c(n),e[27]=n,e[28]=c,e[29]=P):P=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]!==a?(M=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=M):M=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(ke,{size:13}),e[34]=T):T=e[34];let $;e[35]!==P||e[36]!==_||e[37]!==M?($=t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:P,title:_,"aria-label":M,children:T}),e[35]=P,e[36]=_,e[37]=M,e[38]=$):$=e[38];let k;e[39]!==n||e[40]!==i?(k=()=>i(n),e[39]=n,e[40]=i,e[41]=k):k=e[41];let N;e[42]!==a?(N=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=N):N=e[43];let b;e[44]!==a?(b=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(ce,{size:13}),e[46]=E):E=e[46];let z;e[47]!==k||e[48]!==N||e[49]!==b?(z=t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:k,title:N,"aria-label":b,children:E}),e[47]=k,e[48]=N,e[49]=b,e[50]=z):z=e[50];let I;e[51]!==$||e[52]!==z||e[53]!==y||e[54]!==D?(I=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,D,$,z]}),e[51]=$,e[52]=z,e[53]=y,e[54]=D,e[55]=I):I=e[55];let A;return e[56]!==I||e[57]!==h||e[58]!==g||e[59]!==v?(A=t.jsxs("div",{className:h,children:[g,v,I]}),e[56]=I,e[57]=h,e[58]=g,e[59]=v,e[60]=A):A=e[60],A}function Xt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=L();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let r;e[3]!==n.title?(r=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]=r):r=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let d;e[8]!==o?(d=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=d):d=e[9];let p;e[10]!==o?(p=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=p):p=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ke,{size:13}),e[12]=m):m=e[12];let l;e[13]!==a||e[14]!==d||e[15]!==p?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:d,"aria-label":p,children:m})}),e[13]=a,e[14]=d,e[15]=p,e[16]=l):l=e[16];let f;return e[17]!==i||e[18]!==r||e[19]!==l?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,r,l]}),e[17]=i,e[18]=r,e[19]=l,e[20]=f):f=e[20],f}function Yt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r,onAdd:a,isAdding:d}=s,p=L();if(n.length===0)return null;let m;e[0]!==n.length||e[1]!==p?(m=n.length===1?p("details.connectionInstancesPanel.instance"):p("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=p,e[2]=m):m=e[2];let l;e[3]!==m?(l=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m}),e[3]=m,e[4]=l):l=e[4];let f;e[5]!==d?(f=d?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(lt,{size:13}),e[5]=d,e[6]=f):f=e[6];let u;e[7]!==p?(u=p("details.connectionInstancesPanel.addInstance"),e[7]=p,e[8]=u):u=e[8];let h;e[9]!==d||e[10]!==a||e[11]!==f||e[12]!==u?(h=t.jsxs(q,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:d,children:[f,u]}),e[9]=d,e[10]=a,e[11]=f,e[12]=u,e[13]=h):h=e[13];let g;e[14]!==l||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[l,h]}),e[14]=l,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==r){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==r?(y=D=>t.jsx(Z.Suspense,{fallback:t.jsx(Xt,{instance:D,onConfigure:c}),children:t.jsx(Wt,{instance:D,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r})},D.id),e[23]=o,e[24]=c,e[25]=i,e[26]=r,e[27]=y):y=e[27],j=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=r,e[22]=j}else j=e[22];let S;e[28]!==j?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=S):S=e[29];let v;return e[30]!==g||e[31]!==S?(v=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=v):v=e[32],v}function Jt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(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 ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=L(),r=ze(),a=es(o),{data:d}=ue({queryKey:te.connectionActivity(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:p}=ue({queryKey:te.connectionActivityErrors(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),m=yt(d?.logs??[],a,void 0,d?.total,p?.total),l=m.data,f=m.totalCalls>0,u=Jt(d?.logs??[]),h=m.totalCalls>0?Math.round(m.totalErrors/m.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],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:m.totalCalls.toLocaleString()}),j]}),m.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:m.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),m.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(m.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),f?t.jsxs("div",{children:[t.jsx(It,{config:ts,className:"h-16 w-full",children:t.jsxs(Ct,{data:l,barCategoryGap:"4%",children:[t.jsx(kt,{content:t.jsx(Tt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(_t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:l.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:l[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:l[l.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:i("details.connectionActivity.noActivityInThisPeriod")})}),u.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:u.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=U.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 rs(s){const e=U.c(22),{connectionId:n}=s,c=L(),[o,i]=Z.useState("14d"),{org:r}=se();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let d;e[2]!==a?(d=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=d):d=e[3];let p;e[4]!==c?(p=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=p):p=e[5];let m;e[6]!==o?(m=Zt.map(j=>t.jsx("button",{type:"button","aria-pressed":o===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=o,e[7]=m):m=e[7];let l;e[8]!==p||e[9]!==m?(l=t.jsx("div",{role:"group","aria-label":p,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:m}),e[8]=p,e[9]=m,e[10]=l):l=e[10];let f;e[11]!==d||e[12]!==l?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[d,l]}),e[11]=d,e[12]=l,e[13]=f):f=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(as,{}),e[14]=u):u=e[14];let h;e[15]!==n||e[16]!==r.id||e[17]!==o?(h=t.jsx(Z.Suspense,{fallback:u,children:t.jsx(ss,{connectionId:n,orgId:r.id,timeframe:o})}),e[15]=n,e[16]=r.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function ls(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=ne();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const l=crypto.randomUUID();o({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:l}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ae,{size:16}),e[4]=r):r=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let d;e[8]!==n.title?(d=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=d):d=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Te,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=p):p=e[10];let m;return e[11]!==i||e[12]!==a||e[13]!==d?(m=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,d,p]}),e[11]=i,e[12]=a,e[13]=d,e[14]=m):m=e[14],m}function cs(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let r;e[3]!==c?(r=a=>t.jsx(ls,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=r):r=e[4],o=n.map(r),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=U.c(13),{connection:n}=s,c=L(),{org:o}=se();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const r=At(i);if(!(r.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}let d;e[3]!==c?(d=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=d):d=e[4];let p;e[5]!==d?(p=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:d})}),e[5]=d,e[6]=p):p=e[6];let m;e[7]!==o.slug||e[8]!==r?(m=t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:r,org:o.slug})}),e[7]=o.slug,e[8]=r,e[9]=m):m=e[9];let l;return e[10]!==p||e[11]!==m?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,m]}),e[10]=p,e[11]=m,e[12]=l):l=e[12],l}function ms(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=L(),r=ne(),{org:a}=se();let d;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(d={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=d):d=e[3];const p=Ie(d),m=_e(c);let l;e[4]!==m||e[5]!==c?(l=m?De(m):c,e[4]=m,e[5]=c,e[6]=l):l=e[6];const f=l,[u,h]=Z.useState("");let g,j,S,v;if(e[7]!==f||e[8]!==p||e[9]!==r||e[10]!==o||e[11]!==u||e[12]!==i||e[13]!==n){const P=(n??[]).filter(us),_=u.toLowerCase().trim(),M=_?P.filter(b=>b.name.toLowerCase().includes(_)||b.description&&b.description.toLowerCase().includes(_)):P;let T;e[18]!==f||e[19]!==r||e[20]!==o?(T=b=>{r({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=f,e[19]=r,e[20]=o,e[21]=T):T=e[21];const $=T;S="flex flex-col h-full overflow-hidden";let k;e[22]!==i?(k=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=k):k=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=N):N=e[24],e[25]!==u||e[26]!==k?(v=t.jsx(Mt,{value:u,onChange:h,placeholder:k,onKeyDown:N}),e[25]=u,e[26]=k,e[27]=v):v=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(ye,{image:null,title:i(u?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(u?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(b=>{const E=de(b._meta);return t.jsxs(Ee,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>$(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ot,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:p})}),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:b.annotations?.title??b.name}),t.jsx(et,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=f,e[8]=p,e[9]=r,e[10]=o,e[11]=u,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=v}else g=e[14],j=e[15],S=e[16],v=e[17];let y;e[28]!==g||e[29]!==j?(y=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=y):y=e[30];let D;return e[31]!==S||e[32]!==v||e[33]!==y?(D=t.jsxs("div",{className:S,children:[v,y]}),e[31]=S,e[32]=v,e[33]=y,e[34]=D):D=e[34],D}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=r=>r.charAt(0).toUpperCase()+r.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=L();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=U.c(72),{tools:n,prompts:c,resources:o,connectionId:i,org:r}=s;let a;e[0]!==c?(a=c===void 0?[]:c,e[0]=c,e[1]=a):a=e[1];const d=a;let p;e[2]!==o?(p=o===void 0?[]:o,e[2]=o,e[3]=p):p=e[3];const m=p,l=L(),f=ne(),u=_e(i??"");let h;e[4]!==u||e[5]!==i?(h=u?De(u):i,e[4]=u,e[5]=i,e[6]=h):h=e[6];const g=h;let j;e[7]!==g||e[8]!==i||e[9]!==f||e[10]!==r?(j=function(F){!i||!r||f({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(F)}})},e[7]=g,e[8]=i,e[9]=f,e[10]=r,e[11]=j):j=e[11];const S=j;let v;e[12]!==i||e[13]!==r||e[14]!==n?(v=i&&r&&n.some(hs),e[12]=i,e[13]=r,e[14]=n,e[15]=v):v=e[15];const y=v;if(n.length+d.length+m.length===0){let C;e[16]!==l?(C=l("details.connectionCapabilities.capabilities"),e[16]=l,e[17]=C):C=e[17];let F;e[18]!==C?(F=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=F):F=e[19];let G;e[20]!==l?(G=l("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=l,e[21]=G):G=e[21];let V;e[22]!==G?(V=t.jsx("p",{className:"text-sm text-muted-foreground",children:G}),e[22]=G,e[23]=V):V=e[23];let ee;return e[24]!==V||e[25]!==F?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[F,V]}),e[24]=V,e[25]=F,e[26]=ee):ee=e[26],ee}let P;e[27]!==l||e[28]!==n.length?(P=l("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=l,e[28]=n.length,e[29]=P):P=e[29];let _;e[30]!==P?(_=t.jsx(oe,{value:"tools",variant:"underline",children:P}),e[30]=P,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==l?(M=y&&t.jsx(oe,{value:"apps",variant:"underline",children:l("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=l,e[34]=M):M=e[34];let T;e[35]!==l?(T=l("details.connectionCapabilities.promptsTab"),e[35]=l,e[36]=T):T=e[36];let $;e[37]!==T?($=t.jsx(oe,{value:"prompts",variant:"underline",children:T}),e[37]=T,e[38]=$):$=e[38];let k;e[39]!==l?(k=l("details.connectionCapabilities.resourcesTab"),e[39]=l,e[40]=k):k=e[40];let N;e[41]!==k?(N=t.jsx(oe,{value:"resources",variant:"underline",children:k}),e[41]=k,e[42]=N):N=e[42];let b;e[43]!==M||e[44]!==$||e[45]!==N||e[46]!==_?(b=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Dt,{variant:"underline",className:"gap-1",children:[_,M,$,N]})}),e[43]=M,e[44]=$,e[45]=N,e[46]=_,e[47]=b):b=e[47];let E;e[48]!==S||e[49]!==n?(E=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:()=>S(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($t,{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:Pe(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(Te,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(le,{label:"tools"}),e[48]=S,e[49]=n,e[50]=E):E=e[50];let z;e[51]!==E?(z=t.jsx(ae,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[51]=E,e[52]=z):z=e[52];let I;e[53]!==i||e[54]!==y||e[55]!==r||e[56]!==n?(I=y&&t.jsx(ae,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:r})}),e[53]=i,e[54]=y,e[55]=r,e[56]=n,e[57]=I):I=e[57];let A;e[58]!==d?(A=d.length>0?d.map(fs):t.jsx(le,{label:"prompts"}),e[58]=d,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(ae,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let x;e[62]!==m?(x=m.length>0?m.map(ps):t.jsx(le,{label:"resources"}),e[62]=m,e[63]=x):x=e[63];let w;e[64]!==x?(w=t.jsx(ae,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:x})}),e[64]=x,e[65]=w):w=e[65];let O;return e[66]!==b||e[67]!==z||e[68]!==I||e[69]!==R||e[70]!==w?(O=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Pt,{defaultValue:"tools",variant:"underline",children:[b,z,I,R,w]})}),e[66]=b,e[67]=z,e[68]=I,e[69]=R,e[70]=w,e[71]=O):O=e[71],O}function ps(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(ut,{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 fs(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(mt,{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:Pe(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 hs(s){return de(s._meta)}function gs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(re,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let r;e[3]!==o?(r=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:o})}),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==n.description?(a=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]=a):a=e[6];let d;e[7]!==r||e[8]!==a?(d=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,a]}),e[7]=r,e[8]=a,e[9]=d):d=e[9];let p;return e[10]!==i||e[11]!==d?(p=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:[i,d]}),e[10]=i,e[11]=d,e[12]=p):p=e[12],p}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=L(),r=xe({control:s.control,name:"ui_type"}),a=xe({control:s.control,name:"connection_url"}),{stdioEnabled:d}=Re(),p=(()=>{if(typeof a!="string"||!a)return!1;try{const u=new URL(a);return u.hostname==="api.githubcopilot.com"&&u.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),m=d||e.connection_type==="STDIO",l=e.connection_type==="VIRTUAL",f=l?Gt(e.connection_url):null;return l?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:i("details.connectionSidebar.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(Ae,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),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:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),r!=="NPX"&&r!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(fe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsxs(he,{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(ie,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(ge,{})]})}),t.jsxs(je,{children:[t.jsx(H,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(H,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(H,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(H,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(fe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsx(he,{className:"h-10",children:t.jsx(ge,{})})}),t.jsxs(je,{children:[t.jsx(H,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(H,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(H,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(H,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Bt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),r==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),r==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(X,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(B,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(r==="NPX"||r==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(B,{children:t.jsx(He,{value:u.value??[],onChange:u.onChange})}),t.jsx(X,{})]})}),r!=="NPX"&&r!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i(p?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Et,{children:[t.jsx(Rt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(zt,{variant:"success",className:"gap-1.5",children:[t.jsx(Ft,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Vt,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(pe,{onClick:c,children:[t.jsx(xt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(pe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&u.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:()=>u.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:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(qt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(B,{children:t.jsx(Y,{type:"password",placeholder:i(p?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),p&&t.jsxs(bt,{children:[i("details.connectionSidebar.createAPatAt")," ",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(X,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(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"&&Ht(s.connection_headers)){const c=s.connection_headers,o=Qe(c.envVars);if(bs(c)){const r=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:r,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}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 Ss(s){let e,n=null,c=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=We(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=Xe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:r,siblings:a}){const d=L(),p=ne({from:"/$org/settings/connections/$appSlug"}),m=Le(),l=we(),{org:f}=se(),u=Nt({onSuccess:()=>{a.length<=1&&p({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),v=Ce({connectionId:e}),{data:y}=tt(),D=y?.data?.members??[],P=h??s,_=D.find(x=>x.userId===P.created_by),T=s?.connection_type==="VIRTUAL"||v.isAuthenticated,$={...s,tools:o},k=Ye($,Qt),N=Be({resolver:qe(Ke),values:be(h??s)}),b=N.formState.isDirty,E=async()=>{if(!await N.trigger())return;const w=N.getValues(),O=Ss(w),C=h?.id??e;await l.update.mutateAsync({id:C,data:O}),N.reset(w)},z=()=>{N.reset(be(h??s))},I=async x=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:O,tokenInfo:C,error:F}=await rt({connectionId:x,orgSlug:f.slug,...w?{scope:w}:{}});if(F||!O){J.error(d("details.connection.authFailed",{error:F??""}));return}if(C)try{const V=await fetch(`/api/${f.slug}/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})});if(!V.ok)console.error("Failed to save OAuth token:",await V.text()),await l.update.mutateAsync({id:x,data:{connection_token:O}});else try{await l.update.mutateAsync({id:x,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(V){console.error("Error saving OAuth token:",V),await l.update.mutateAsync({id:x,data:{connection_token:O}})}else await l.update.mutateAsync({id:x,data:{connection_token:O}});const G=new URL(`/api/${f.slug}/mcp/${x}`,window.location.origin);await m.invalidateQueries({queryKey:te.isMCPAuthenticated(G.href,null)}),await m.invalidateQueries({queryKey:te.mcpClientPrefix()}),J.success(d("details.connection.authSuccess"))},A=()=>I(s.id),R=async()=>{try{const x=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const O=await x.text();J.error(d("details.connection.failedRemoveOAuth",{error:O}));return}const w=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await m.invalidateQueries({queryKey:te.isMCPAuthenticated(w.href,null)}),J.success(d("details.connection.oauthRemoved"))}catch(x){console.error("Error removing OAuth token:",x),J.error(d("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(St,{...u}),t.jsx(pt,{open:h!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(ft,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(ht,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(gt,{className:"text-base",children:h?.title??s.title}),t.jsx(jt,{className:"text-xs",children:d("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:d("details.connection.connectedBy")}),t.jsx(st,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(vt,{...N,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(K,{control:N.control,name:"title",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(W,{children:d("details.connection.nameLabel")}),t.jsx(B,{children:t.jsx(Y,{...x})}),t.jsx(X,{})]})}),t.jsx(K,{control:N.control,name:"description",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(W,{children:d("details.connection.descriptionLabel")}),t.jsx(B,{children:t.jsx(Y,{...x,value:x.value||""})}),t.jsx(X,{})]})})]}),t.jsx(js,{form:N,connection:h??s,hasOAuthToken:v.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(Je,{connection:h??s,form:N,hasMcpBinding:k,isMCPAuthenticated:T,supportsOAuth:v.supportsOAuth,isServerError:v.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(q,{onClick:E,disabled:!b||c,className:"flex-1",children:d(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(q,{variant:"outline",onClick:z,children:d("details.connection.undoButton")}),t.jsxs(q,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=h??s;g(null),u.requestDelete(x)},children:[t.jsx(ce,{size:15}),d("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(Ze,{hideTopbar:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const x=a[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(rs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Yt,{instances:a,onConfigure:x=>g(x),onAuthenticate:x=>I(x.id),onDelete:x=>u.requestDelete(x),onToggleStatus:async(x,w)=>{try{await l.update.mutateAsync({id:x.id,data:{status:w}}),J.success(d(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(d("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const x=a[0]??s,w=x.title.replace(/\s*\(\d+\)\s*$/,""),O=a.length+1,C=`${w} (${O})`,F=Ge("conn");await l.create.mutateAsync({id:F,title:C,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 G=new URL(`/api/${f.slug}/mcp/${F}`,window.location.origin),V=await at({url:G.href,token:null,orgId:f.id});V.supportsOAuth&&!V.isAuthenticated&&await I(F)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:r,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=U.c(52),e=L();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=ne(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:r}=Fe(o),{org:a}=se(),d=we();let p;s[2]!==i?(p={slug:i},s[2]=i,s[3]=p):p=s[3];const m=nt(p),l=m[0]??null,f=l?.id??"",u=f||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==u?(h={connectionId:u,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=u,s[7]=h):h=s[7];const g=Ie(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=it(j);let v;if(s[10]!==l?.tools||s[11]!==f||s[12]!==m||s[13]!==S){const I=S?S.tools.map(As):(l?.tools??[]).map(Ts);e:{if(m.length<=1){v=I;break e}const A=new Set,R=[],x=Is;for(const w of m){const O=w.id===f?I:x(w.tools);for(const C of O)A.has(C.name)||(A.add(C.name),R.push(C))}v=R.length>0?R:I}s[10]=l?.tools,s[11]=f,s[12]=m,s[13]=S,s[14]=v}else v=s[14];const y=v;let D;s[15]!==g?(D={client:g},s[15]=g,s[16]=D):D=s[16];const{data:P}=ot(D);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Ve(_);let T;s[19]!==P?.prompts?(T=P?.prompts??[],s[19]=P?.prompts,s[20]=T):T=s[20];let $;s[21]!==T?($=T.map(ws),s[21]=T,s[22]=$):$=s[22];const k=$;let N;s[23]!==M?.resources?(N=M?.resources??[],s[23]=M?.resources,s[24]=N):N=s[24];let b;s[25]!==N?(b=N.map(_s),s[25]=N,s[26]=b):b=s[26];const E=b;if(!l){let I;s[27]!==e?(I=e("details.connection.notFoundTitle"),s[27]=e,s[28]=I):I=s[28];let A;s[29]!==e?(A=e("details.connection.notFoundDescription"),s[29]=e,s[30]=A):A=s[30];let R;s[31]!==c||s[32]!==r?(R=()=>c({to:"/$org/settings/connections",params:{org:r}}),s[31]=c,s[32]=r,s[33]=R):R=s[33];let x;s[34]!==e?(x=e("details.connection.backButton"),s[34]=e,s[35]=x):x=s[35];let w;s[36]!==R||s[37]!==x?(w=t.jsx(q,{variant:"outline",onClick:R,children:x}),s[36]=R,s[37]=x,s[38]=w):w=s[38];let O;return s[39]!==I||s[40]!==A||s[41]!==w?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ye,{title:I,description:A,actions:w})}),s[39]=I,s[40]=A,s[41]=w,s[42]=O):O=s[42],O}let z;return s[43]!==d.update.isPending||s[44]!==y||s[45]!==l||s[46]!==f||s[47]!==r||s[48]!==k||s[49]!==E||s[50]!==m?(z=t.jsx(ys,{org:r,connection:l,connectionId:f,isUpdating:d.update.isPending,tools:y,prompts:k,resources:E,siblings:m}),s[43]=d.update.isPending,s[44]=y,s[45]=l,s[46]=f,s[47]=r,s[48]=k,s[49]=E,s[50]=m,s[51]=z):z=s[51],z}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function Is(s){return(s??[]).map(ks)}function ks(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function Ei(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ds,{}),s[0]=e):e=s[0],e}export{Ei as default};