decocms 4.385.0 → 4.386.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 (349) hide show
  1. package/dist/client/assets/{AlertCircle-DH2lw5dl.js → AlertCircle-Cwl0Vup2.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DtVoiRvF.js → AreaChart-B4QXNZyj.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B1xVCNCj.js → ArrowLeft-BS1ddrpm.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DTgQrVQL.js → ArrowRight-CCNkzW9Y.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BaG4Z2PX.js → ArrowUp-rfVFZ40K.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-CWEAR5gD.js → CartesianChart-CDsQOuRz.js} +1 -1
  7. package/dist/client/assets/{Check-n2s3oQPA.js → Check-Chl3DDqT.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BKtapvSB.js → CheckCircle-5QB6sfVV.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-Dn4qDwuF.js → ChevronUp-BuAMP7GQ.js} +1 -1
  10. package/dist/client/assets/{Copy01-TOTRJp0v.js → Copy01-BwsqBYnE.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-DBrRzFpv.js → CreditCard01-BPHmR5OY.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-D5OZPED4.js → DotsVertical-Bv4-YScE.js} +1 -1
  13. package/dist/client/assets/{Download01-BcX9OtGe.js → Download01-DyVswBhh.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-DsST4iCp.js → ErrorBarContext-L3hqxsjo.js} +1 -1
  15. package/dist/client/assets/{Eye-CRgbpXwm.js → Eye-BGOdKOA7.js} +1 -1
  16. package/dist/client/assets/{Globe04-BC-77atS.js → Globe04-BkqSUJiA.js} +1 -1
  17. package/dist/client/assets/{Image01-ciXnDKCW.js → Image01-DXUl1blo.js} +1 -1
  18. package/dist/client/assets/{Key01-B66GpQfK.js → Key01-CTlB38YG.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-BHw5lVXR.js → LayoutLeft-BIWXERKW.js} +1 -1
  20. package/dist/client/assets/{Line-DD3Yqtl9.js → Line-zqIQ0PvH.js} +1 -1
  21. package/dist/client/assets/{Link01-C-2vKCHa.js → Link01-7UJLIg0N.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-D3lqFyPy.js → LinkExternal01-DsBKvM3k.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DE6CWqFd.js → Monitor01-D3pXjo5b.js} +1 -1
  24. package/dist/client/assets/{Package-C_VoKlDc.js → Package-ImRUZcy3.js} +1 -1
  25. package/dist/client/assets/{Palette-D4fQxVbj.js → Palette-B0nQwQuz.js} +1 -1
  26. package/dist/client/assets/{Plus-tNGOLWnu.js → Plus-DxM0fEC4.js} +1 -1
  27. package/dist/client/assets/{SearchLg-D_XECWKC.js → SearchLg-DCjPeF5h.js} +1 -1
  28. package/dist/client/assets/{SearchMd-SaWfMl2E.js → SearchMd-tkECPV7l.js} +1 -1
  29. package/dist/client/assets/{Sector-JPxukctn.js → Sector-BqmE_gpQ.js} +1 -1
  30. package/dist/client/assets/{Share07-DUM8HDz5.js → Share07-fkd7xmY6.js} +1 -1
  31. package/dist/client/assets/{Stars01-eQtDXwcg.js → Stars01-BoztdLAd.js} +1 -1
  32. package/dist/client/assets/{Sun-BkbXJIwK.js → Sun-CTx2w4hs.js} +1 -1
  33. package/dist/client/assets/{Tool01-O3QS0Upe.js → Tool01-DUJdCnDK.js} +1 -1
  34. package/dist/client/assets/{Trash01-D4CNvDEa.js → Trash01-B-_Oqcf7.js} +1 -1
  35. package/dist/client/assets/{Upload01-BlLNj5y4.js → Upload01-alz3omvs.js} +1 -1
  36. package/dist/client/assets/{User01-DIn8OmU1.js → User01-DwcV_kyF.js} +1 -1
  37. package/dist/client/assets/{UserSquare-aCnYY5vK.js → UserSquare-CsgvAwaQ.js} +1 -1
  38. package/dist/client/assets/{Users01-CdvCFvf1.js → Users01-DAeXmo2u.js} +1 -1
  39. package/dist/client/assets/{X-DbiRP14Q.js → X-BEAR-IcH.js} +1 -1
  40. package/dist/client/assets/{XCircle-D-XpkSz0.js → XCircle-BBqXvE8C.js} +1 -1
  41. package/dist/client/assets/{XClose-BBd4kqxu.js → XClose-Ca9S5aZc.js} +1 -1
  42. package/dist/client/assets/{Zap-dyClsvaS.js → Zap-thqSL15H.js} +1 -1
  43. package/dist/client/assets/{ZoomOut-CL9Otcbh.js → ZoomOut-DnIqLBGF.js} +1 -1
  44. package/dist/client/assets/{access-gate-B2v8iIju.js → access-gate-5gX8wxGV.js} +1 -1
  45. package/dist/client/assets/{add-connection-dialog-Cp_W_xzn.js → add-connection-dialog-BdL2dPAr.js} +1 -1
  46. package/dist/client/assets/{agent-analytics-OI4_M96W.js → agent-analytics-BIxeEB_F.js} +1 -1
  47. package/dist/client/assets/agent-app-GfCF7MBj.js +1 -0
  48. package/dist/client/assets/{agent-assets-CRyPpu8K.js → agent-assets-DdAbXfi1.js} +1 -1
  49. package/dist/client/assets/{agent-automation-b-ZAA2UI.js → agent-automation-Bef81mY6.js} +1 -1
  50. package/dist/client/assets/{agent-automations-oSsWo5hH.js → agent-automations-1PVmd792.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-LewKQmEH.js → agent-connect-sources-BisHTH6n.js} +1 -1
  52. package/dist/client/assets/agent-deck-DbiPFNhm.js +1 -0
  53. package/dist/client/assets/{agent-e2e-BIfYq3S8.js → agent-e2e-DTfzR2qE.js} +1 -1
  54. package/dist/client/assets/{agent-experiments-CZaWuisW.js → agent-experiments-BHDRViXO.js} +1 -1
  55. package/dist/client/assets/agent-file-BW6-wgKu.js +1 -0
  56. package/dist/client/assets/{agent-git-BPhnnPIu.js → agent-git-DHxCuZd4.js} +1 -1
  57. package/dist/client/assets/{agent-hosting-aNpT7uQ4.js → agent-hosting-Ckq3R_8_.js} +1 -1
  58. package/dist/client/assets/{agent-icon-DsMxtuPs.js → agent-icon-CP0I3VVA.js} +1 -1
  59. package/dist/client/assets/agent-library-file-ByVGh_GJ.js +1 -0
  60. package/dist/client/assets/{agent-monitor-CBrJZkOw.js → agent-monitor-CYjn5ov-.js} +1 -1
  61. package/dist/client/assets/{agent-overview-D00LjxKy.js → agent-overview-CQfoY9eA.js} +1 -1
  62. package/dist/client/assets/agent-settings-alMz04MP.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-D6T_D6gE.js → agent-site-editor-CmVIWUTI.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-D_3n5lRh.js +2 -0
  65. package/dist/client/assets/{agent-site-editor-content-CR5fjeWn.js → agent-site-editor-content-q6dSRjGp.js} +2 -2
  66. package/dist/client/assets/{agent-site-editor-preview-Dtf_1Npa.js → agent-site-editor-preview-CYdEZwyJ.js} +3 -3
  67. package/dist/client/assets/agent-view-B0WlAVRK.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-79CMeGMh.js → agent-view-guard-DClgQS_E.js} +1 -1
  69. package/dist/client/assets/{agents-list-DubmiCeJ.js → agents-list-x9nDr_UM.js} +1 -1
  70. package/dist/client/assets/{ai-providers-DI3exSN0.js → ai-providers-BLLOHjvZ.js} +1 -1
  71. package/dist/client/assets/{alert-DaWyZsW8.js → alert-DWLTyUNd.js} +1 -1
  72. package/dist/client/assets/{alert-dialog-D21XY4Kh.js → alert-dialog-BCnbMjLm.js} +1 -1
  73. package/dist/client/assets/api-keys-BSvKgDby.js +1 -0
  74. package/dist/client/assets/{api-keys-BPoZWvQG.js → api-keys-C8x1m95I.js} +1 -1
  75. package/dist/client/assets/app-editor-D0xnTpyR.js +1 -0
  76. package/dist/client/assets/{asset-utils-C2CAxd4s.js → asset-utils-CxMWm-Q0.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-DZVV0SMo.js → auth-catchall-zbWwf6nX.js} +1 -1
  78. package/dist/client/assets/{auth-entry-CDfVLJW4.js → auth-entry-BnSKshlv.js} +1 -1
  79. package/dist/client/assets/{auth-B30FL8Dl.js → auth-fkwwQuGR.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-8EMSHlCM.js → auth-split-layout-DAvJosau.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-DPfhIV55.js → authenticate-and-persist-oauth-BogPKDev.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-D_Ep542X.js → automation-list-row-BHuKh4jN.js} +1 -1
  83. package/dist/client/assets/{automation-runs-BK_rDYnz.js → automation-runs-Cg4f9PTn.js} +1 -1
  84. package/dist/client/assets/{automations-Cmvbai85.js → automations-Bly1_hA4.js} +1 -1
  85. package/dist/client/assets/{autosend-DCiZpnYL.js → autosend-Du7-oKR0.js} +1 -1
  86. package/dist/client/assets/{avatar-DtsApuf_.js → avatar-DvLLRJ7_.js} +1 -1
  87. package/dist/client/assets/{badge-DIi7Tq2w.js → badge-jSVR8IKO.js} +1 -1
  88. package/dist/client/assets/{block-document-7svTTpPG.js → block-document-DDK0W4Gk.js} +1 -1
  89. package/dist/client/assets/{blocks-preview-workspace-context-BedctEwm.js → blocks-preview-workspace-context-wIvRUegF.js} +1 -1
  90. package/dist/client/assets/{breadcrumb-C5JiVY52.js → breadcrumb-BcN7LEPN.js} +1 -1
  91. package/dist/client/assets/{buckets-Bk7BcZd8.js → buckets-Cws0X-ao.js} +1 -1
  92. package/dist/client/assets/{build-improve-prompt-doc-CdF1mPbn.js → build-improve-prompt-doc-CIZv76q4.js} +1 -1
  93. package/dist/client/assets/{bulk-category-panel-CkYPffHt.js → bulk-category-panel--mTH44nT.js} +1 -1
  94. package/dist/client/assets/{calendar-pihqrn4r.js → calendar-DL1g-R6I.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-Cmcx9spT.js → capability-load-error-O16y38Ak.js} +1 -1
  96. package/dist/client/assets/{category-editor-BA0rkVMR.js → category-editor-DeXj55lm.js} +1 -1
  97. package/dist/client/assets/{chart-D44VX9BP.js → chart-XotQAjm8.js} +1 -1
  98. package/dist/client/assets/{chat-context-aPhEigBR.js → chat-context-bQBeY2t1.js} +1 -1
  99. package/dist/client/assets/{chat-draft-4HMzHsTd.js → chat-draft-Dw5lkxkv.js} +1 -1
  100. package/dist/client/assets/{checkbox-Dogqs7i6.js → checkbox-C70qRnxL.js} +1 -1
  101. package/dist/client/assets/{choose-editor-__AlDEdY.js → choose-editor-Bz0n65rr.js} +1 -1
  102. package/dist/client/assets/{cli-auth-success-ugr1nCyo.js → cli-auth-success-B6YdLpZk.js} +1 -1
  103. package/dist/client/assets/{client-icons-BDqexBpT.js → client-icons-Cz9Mab30.js} +1 -1
  104. package/dist/client/assets/{collapsible-D8iSTAH_.js → collapsible-CBOJskaw.js} +1 -1
  105. package/dist/client/assets/{collection-detail-CRarQmA3.js → collection-detail-BcWKItse.js} +1 -1
  106. package/dist/client/assets/{collection-display-button-DcHpb_oL.js → collection-display-button-D4M61Icm.js} +1 -1
  107. package/dist/client/assets/{collection-search-BNy-V_tB.js → collection-search-CKFQt3zo.js} +1 -1
  108. package/dist/client/assets/{collection-table-wrapper-CVcfw0Np.js → collection-table-wrapper-nOJd7tk7.js} +1 -1
  109. package/dist/client/assets/{collection-tabs-BqZXL6zx.js → collection-tabs-nLUzyG3L.js} +1 -1
  110. package/dist/client/assets/{combobox-D-JNGqRo.js → combobox-D4piYhGL.js} +1 -1
  111. package/dist/client/assets/{command-Bz8F763k.js → command-SQ6iukKb.js} +1 -1
  112. package/dist/client/assets/{companion-mcps-section-Bepk__5X.js → companion-mcps-section-YzjKtKLp.js} +1 -1
  113. package/dist/client/assets/{connect-B4fXe6kn.js → connect-BxPVUdhh.js} +1 -1
  114. package/dist/client/assets/{connect-layout-BgPFJw_i.js → connect-layout-CrrPleYY.js} +1 -1
  115. package/dist/client/assets/{connection-CK0XhbAM.js → connection-DdQElG6t.js} +1 -1
  116. package/dist/client/assets/{connection-card-D-JUsFAS.js → connection-card-BS_OpxON.js} +1 -1
  117. package/dist/client/assets/{connection-detail-_YkgX7Zi.js → connection-detail-DCDkcs1Y.js} +1 -1
  118. package/dist/client/assets/{connection-form-helpers-Df703i6A.js → connection-form-helpers-DZC7DBzw.js} +1 -1
  119. package/dist/client/assets/{connections-BB01I8RG.js → connections-DF9tLWxn.js} +1 -1
  120. package/dist/client/assets/{create-organization-dialog-DmyE3BcX.js → create-organization-dialog-BuDkvaJX.js} +1 -1
  121. package/dist/client/assets/{decofile-api-BeQfKyua.js → decofile-api-DyGAd2r4.js} +1 -1
  122. package/dist/client/assets/{decopilot-B8CVeRJC.js → decopilot-CYIi3WEs.js} +1 -1
  123. package/dist/client/assets/{dialog-BdtMvx6K.js → dialog-RGKICG4s.js} +1 -1
  124. package/dist/client/assets/{discover-BLXFOWCF.js → discover-DQgdsihh.js} +1 -1
  125. package/dist/client/assets/{domain-settings-BgvmbMpe.js → domain-settings-DcP3rGWU.js} +1 -1
  126. package/dist/client/assets/{download-app-dialog-DC564RLD.js → download-app-dialog-DPWfpRBg.js} +1 -1
  127. package/dist/client/assets/{drawer-CG_0cmT9.js → drawer-B4Z-ExBx.js} +1 -1
  128. package/dist/client/assets/{editor-DOuy1RZg.js → editor-Do7ruOhn.js} +1 -1
  129. package/dist/client/assets/{empty-state-DVXonEzp.js → empty-state-B7gXx_Yh.js} +1 -1
  130. package/dist/client/assets/{empty-state-B69Y96aL.js → empty-state-BmmdOg75.js} +1 -1
  131. package/dist/client/assets/{extract-connection-data-b5VGTnti.js → extract-connection-data-BZ3x_jRc.js} +1 -1
  132. package/dist/client/assets/{feature-gate-8qM3QBh4.js → feature-gate-nddpwuFB.js} +1 -1
  133. package/dist/client/assets/{feature-paywall-Ca9BQ6PR.js → feature-paywall-D-5vciMm.js} +1 -1
  134. package/dist/client/assets/{file-explorer-BfkgDKkV.js → file-explorer-CkwFRkGO.js} +2 -2
  135. package/dist/client/assets/{file-preview-DaN3V2NN.js → file-preview-DOetwKct.js} +1 -1
  136. package/dist/client/assets/{file-share-button-B12-7Qsu.js → file-share-button-D0sR8ZJX.js} +1 -1
  137. package/dist/client/assets/{file-type-icon-JPJzXzk7.js → file-type-icon-DdSZ0ia4.js} +1 -1
  138. package/dist/client/assets/{folder-icon-DSZU5vzM.js → folder-icon-CKLDN3FF.js} +1 -1
  139. package/dist/client/assets/{form-CLIutyXx.js → form-CNnZbB2s.js} +1 -1
  140. package/dist/client/assets/{gateway-client-DftcWqmb.js → gateway-client-Bn4ALbwj.js} +1 -1
  141. package/dist/client/assets/{general-F0UdOGRP.js → general-CQLFQc2y.js} +1 -1
  142. package/dist/client/assets/{github-icon-BFSDbAjJ.js → github-icon-ZhItaKRN.js} +1 -1
  143. package/dist/client/assets/{home-DMBPpp0K.js → home-BbJ11nz4.js} +1 -1
  144. package/dist/client/assets/{hooks-C-KzZKic.js → hooks-CdPo1Znu.js} +1 -1
  145. package/dist/client/assets/{hooks-1xw_MZ0J.js → hooks-DEf7SAIB.js} +1 -1
  146. package/dist/client/assets/{icon-button-BEZjj29z.js → icon-button-BBfdKkxm.js} +1 -1
  147. package/dist/client/assets/{index-B7jLNIpa.js → index-0l2SUkGD.js} +1 -1
  148. package/dist/client/assets/{index-z0K97gOw.js → index-B-yd3uye.js} +1 -1
  149. package/dist/client/assets/{index-_EFsb_Tn.js → index-B2xKtish.js} +1 -1
  150. package/dist/client/assets/{index-aYaPe2f3.js → index-BkqcEh_k.js} +1 -1
  151. package/dist/client/assets/{index-r5-6H5AW.js → index-CFyHGgGO.js} +4 -4
  152. package/dist/client/assets/{index-CRDxekvr.js → index-CJazvqGq.js} +1 -1
  153. package/dist/client/assets/{index-Mz11PO9C.js → index-CUVOFMQ0.js} +1 -1
  154. package/dist/client/assets/{index-Qqe8EVwE.js → index-CeM0-Jf1.js} +1 -1
  155. package/dist/client/assets/{index-eoJGIcAq.js → index-DVjR6OZ0.js} +1 -1
  156. package/dist/client/assets/{index-BoJi5VZX.js → index-Dbhl3fMQ.js} +1 -1
  157. package/dist/client/assets/{index-Bjjm7uST.js → index-Dk3gb-bB.js} +1 -1
  158. package/dist/client/assets/{index-BAz5scMh.js → index-DrGKKl-C.js} +1 -1
  159. package/dist/client/assets/{index-K276FEfg.js → index-Dv6121Hz.js} +1 -1
  160. package/dist/client/assets/{index-B8VWFqc6.js → index-mOfnLvd1.js} +1 -1
  161. package/dist/client/assets/{index-redirect-Cnbs4Nrk.js → index-redirect-BuCFkWnW.js} +1 -1
  162. package/dist/client/assets/{index-BZxYSJ0c.css → index-xA_kfo6T.css} +1 -1
  163. package/dist/client/assets/{infiniteQueryObserver-D2okpX0O.js → infiniteQueryObserver-B4v_iRrA.js} +1 -1
  164. package/dist/client/assets/{infra-billing-DFUgfJMc.js → infra-billing-B4de5HCu.js} +1 -1
  165. package/dist/client/assets/{input-C2g1j_kV.js → input-BXe2-JP2.js} +1 -1
  166. package/dist/client/assets/{input-Zrw2SDBu.js → input-Cx-TB157.js} +1 -1
  167. package/dist/client/assets/{input-CFfUiNZ7.js → input-DWLaMaA_.js} +1 -1
  168. package/dist/client/assets/{integration-icon-CceXxFa_.js → integration-icon-DRK9pjva.js} +1 -1
  169. package/dist/client/assets/{label-CjNgDGiH.js → label-BKtkcOfE.js} +1 -1
  170. package/dist/client/assets/{last-preview-page-Bolgbh1C.js → last-preview-page-Bg8E-AYl.js} +1 -1
  171. package/dist/client/assets/{layout-NnZj3dpp.js → layout-DZRZAwg6.js} +1 -1
  172. package/dist/client/assets/{legacy-agents-deep-oTDn-uBS.js → legacy-agents-deep-BdEkG-e3.js} +1 -1
  173. package/dist/client/assets/{legacy-main-redirect-Cr3YUpIQ.js → legacy-main-redirect-C-Ov90Nk.js} +1 -1
  174. package/dist/client/assets/{library-BGkOJAwy.js → library-B03FDNrJ.js} +1 -1
  175. package/dist/client/assets/{login-DAZjhtYO.js → login-Cfe6-PZw.js} +1 -1
  176. package/dist/client/assets/{markdown-D3o6wysq.js → markdown-B9hrSGqM.js} +1 -1
  177. package/dist/client/assets/{mcp-app-renderer-D0hQoGLx.js → mcp-app-renderer-hpUMUqH2.js} +1 -1
  178. package/dist/client/assets/{mcp-oauth-_j9FyBuM.js → mcp-oauth-wOINJv40.js} +1 -1
  179. package/dist/client/assets/{members-iG0buUNv.js → members-B06BrVk5.js} +1 -1
  180. package/dist/client/assets/{message-templates-IR5FNyLl.js → message-templates-DU9l-F4Q.js} +1 -1
  181. package/dist/client/assets/{mini-report-page-Bv-G-V_E.js → mini-report-page-rgtxxMJ3.js} +1 -1
  182. package/dist/client/assets/mock-board-CKOC8D-U.js +92 -0
  183. package/dist/client/assets/{monaco-editor-Hrz9Z8CB.js → monaco-editor-EmJk9YYb.js} +1 -1
  184. package/dist/client/assets/{monitoring-stats-row-Dobim66v.js → monitoring-stats-row-D7CBnFwq.js} +1 -1
  185. package/dist/client/assets/{multi-select-Btej0uuv.js → multi-select-C-ELmy86.js} +1 -1
  186. package/dist/client/assets/{mustache-ByJrol09.js → mustache-DAjB40dp.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-Cxrx8bdZ.js → oauth-callback-BWXvJmGd.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-DmS81OnI.js → oauth-callback-ai-provider-BqevP8FM.js} +1 -1
  189. package/dist/client/assets/{onboarding-DCvMs9UO.js → onboarding-DJrrwT4H.js} +1 -1
  190. package/dist/client/assets/{optimistic-project-sidebar-views-Dl27c_it.js → optimistic-project-sidebar-views-CwNqyPwJ.js} +1 -1
  191. package/dist/client/assets/{org-file-open-context-Dj6iGo9D.js → org-file-open-context-CmQ30gJ0.js} +1 -1
  192. package/dist/client/assets/{organization-choice-CV0pmXrA.js → organization-choice-BGgXGTHR.js} +1 -1
  193. package/dist/client/assets/{orgs-Bb3t7neE.js → orgs-BU7FeLyY.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-C2Me_O-p.js → page-seo-form-DEYu0i8V.js} +1 -1
  195. package/dist/client/assets/{pair-B41Ucc_5.js → pair-Cj72V51B.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-DcFTtKDH.js → plan-ladder-D66BgqbO.js} +1 -1
  197. package/dist/client/assets/{popover-nFUkosPX.js → popover-DcrAVb5K.js} +1 -1
  198. package/dist/client/assets/{post-calendar-DZ52dRue.js → post-calendar-DQJqqdYQ.js} +1 -1
  199. package/dist/client/assets/{post-editor-v5lirigx.js → post-editor-CnuSsn5o.js} +1 -1
  200. package/dist/client/assets/{preview-content-fEw2bpnl.js → preview-content-BkDU3n_6.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-D-wJF7FA.js → preview-dialog-BEV5NAsU.js} +1 -1
  202. package/dist/client/assets/{primitives-CA7hroDN.js → primitives-BKiteFSN.js} +1 -1
  203. package/dist/client/assets/{profile-BKdwNagr.js → profile-DNhI3M1I.js} +1 -1
  204. package/dist/client/assets/{project-app-view-CLTppsnY.js → project-app-view-yhcKhzKq.js} +1 -1
  205. package/dist/client/assets/{project-feed-DLgEdJT9.js → project-feed-N5qYzpK3.js} +1 -1
  206. package/dist/client/assets/{project-icon-BIB3aHzm.js → project-icon-Bqg6xA8a.js} +1 -1
  207. package/dist/client/assets/project-reports-DWBu_Poi.js +1 -0
  208. package/dist/client/assets/project-tasks-C9ZL-q35.js +1 -0
  209. package/dist/client/assets/{prompts-lyitLXFg.js → prompts-BHzDLPr-.js} +1 -1
  210. package/dist/client/assets/record-editor-3Mx7odY3.js +1 -0
  211. package/dist/client/assets/{redirect-editor-B5CP8xxv.js → redirect-editor-C3yLM9GS.js} +1 -1
  212. package/dist/client/assets/reports-9-hk10-8.js +1 -0
  213. package/dist/client/assets/{reports-sCoaFaqt.js → reports-CZ22PHjO.js} +1 -1
  214. package/dist/client/assets/{reports-onboarding-BtKQhVml.js → reports-onboarding-O5OWivlS.js} +1 -1
  215. package/dist/client/assets/{reports-tab-CXS5XK7r.js → reports-tab-D06j41C-.js} +2 -2
  216. package/dist/client/assets/{repositories-oS_-X5Et.js → repositories-DNHhpOIv.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-BuCSpU4n.js → repository-import-picker-C-ngL2qG.js} +1 -1
  218. package/dist/client/assets/{repository-picker-BzruxhKw.js → repository-picker-B8J8aCKh.js} +1 -1
  219. package/dist/client/assets/{require-capability-bTSAtNh_.js → require-capability-B_Hqq5xX.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-BNA2Zc3R.js → required-auth-layout-kiGhn0Fl.js} +1 -1
  221. package/dist/client/assets/{reset-password-EBaiFSIR.js → reset-password-CYenWslr.js} +1 -1
  222. package/dist/client/assets/{resizable-qpo2Yu9H.js → resizable-Bz43PogG.js} +1 -1
  223. package/dist/client/assets/{review-settings-nUJpzYAG.js → review-settings-BH7SICgo.js} +1 -1
  224. package/dist/client/assets/{rich-text-link-control-BbOK01t4.js → rich-text-link-control-BLDmy_gB.js} +1 -1
  225. package/dist/client/assets/{roles-Bx3Fc0sM.js → roles-CwOV4v2C.js} +1 -1
  226. package/dist/client/assets/{route-Bu6DMG9s.js → route--7-PGBU_.js} +1 -1
  227. package/dist/client/assets/{route-DEE5FKXT.js → route-CQHOnOna.js} +1 -1
  228. package/dist/client/assets/{route-COxPjarc.js → route-D0YaB0fj.js} +1 -1
  229. package/dist/client/assets/{route-page-header-uZ1WvgiY.js → route-page-header-BuGOTt8l.js} +1 -1
  230. package/dist/client/assets/{runnable-block-editor-CoucCkyd.js → runnable-block-editor-CW2Atb2y.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-CcKXyvdi.js → sandbox-lifecycle-context-B1H1oa0w.js} +1 -1
  232. package/dist/client/assets/{schema-rAddMSjd.js → schema-GryfzY0i.js} +1 -1
  233. package/dist/client/assets/{scroll-area-B1pUV42O.js → scroll-area-DzZiCQPZ.js} +1 -1
  234. package/dist/client/assets/{search-input-CHqcB1-X.js → search-input-SHiTlnCE.js} +1 -1
  235. package/dist/client/assets/{search-toggle-YlQabs1C.js → search-toggle-D4N3AzPW.js} +1 -1
  236. package/dist/client/assets/{secrets-DHB5vmKg.js → secrets-Ctzc3HXv.js} +1 -1
  237. package/dist/client/assets/{sections-editor-d1LArMD3.js → sections-editor-DXtafrXa.js} +1 -1
  238. package/dist/client/assets/{select-model-DtQEqfFf.js → select-model-DHG0nuQY.js} +1 -1
  239. package/dist/client/assets/{select-DTYo-xWa.js → select-rL7p93dx.js} +1 -1
  240. package/dist/client/assets/{seo-editor-BBb4CuK2.js → seo-editor-B7c6S06X.js} +1 -1
  241. package/dist/client/assets/{separator-BGTHxBXx.js → separator-D8sL6zYz.js} +1 -1
  242. package/dist/client/assets/{settings-tab-Dvg8uIn0.js → settings-tab-Cn070EFz.js} +1 -1
  243. package/dist/client/assets/{sheet-XSyOfLSY.js → sheet-Dq_EWs2W.js} +1 -1
  244. package/dist/client/assets/{shell-layout-BJIfCkSE.js → shell-layout-D1F8kHl9.js} +1 -1
  245. package/dist/client/assets/{sidebar-B7NB-xw1.js → sidebar-D43DhIwE.js} +1 -1
  246. package/dist/client/assets/{skill-preview-ChLmiMsB.js → skill-preview-B97-mTZP.js} +1 -1
  247. package/dist/client/assets/{skills-_EqOAXmn.js → skills-Cx3kWc9A.js} +1 -1
  248. package/dist/client/assets/{sso-QqGPMeRj.js → sso-BnGi7SX9.js} +1 -1
  249. package/dist/client/assets/{switch-CXpdGkl4.js → switch-DLx_1rQF.js} +1 -1
  250. package/dist/client/assets/{synced-repos-Dv04vkGX.js → synced-repos-B4EDqgTE.js} +1 -1
  251. package/dist/client/assets/{table-BU5SQqZk.js → table-wc_V6Osx.js} +1 -1
  252. package/dist/client/assets/{tabs-Boo8T0HI.js → tabs-CQkW3bOH.js} +1 -1
  253. package/dist/client/assets/{task-board-CExmv-E5.js → task-board-BjqJ_zE6.js} +1 -1
  254. package/dist/client/assets/{task-route-CzrYHdg5.js → task-route-b5zDQpw0.js} +1 -1
  255. package/dist/client/assets/{task-status-COMntCwU.js → task-status-B7fE_9za.js} +1 -1
  256. package/dist/client/assets/{taskboard-analytics-CC-4nYs7.js → taskboard-analytics-K9sDH74m.js} +1 -1
  257. package/dist/client/assets/{tasks-C7kXTStY.js → tasks-B1yh0s0B.js} +1 -1
  258. package/dist/client/assets/tasks-DLhzd-p7.js +1 -0
  259. package/dist/client/assets/{textarea-DOFtu_i2.js → textarea-BaPpC4Bd.js} +1 -1
  260. package/dist/client/assets/{thread-button-D_wtx4Nt.js → thread-button-Ch4zKk0N.js} +1 -1
  261. package/dist/client/assets/{thread-intent-DAJ_HNeY.js → thread-intent-XcHSP8zW.js} +1 -1
  262. package/dist/client/assets/{thread-route-BmIfxqCS.js → thread-route-C-J8Dvgz.js} +1 -1
  263. package/dist/client/assets/{thread-route-C3RIHj8w.js → thread-route-CGP_k3DO.js} +1 -1
  264. package/dist/client/assets/{thread-sheet-body-rPMilxjL.js → thread-sheet-body-D8_23FE-.js} +1 -1
  265. package/dist/client/assets/{toggle-group-Dq2H4rHL.js → toggle-group-D9KWjWLm.js} +1 -1
  266. package/dist/client/assets/{toolbar-icon-button-DQQVHEDE.js → toolbar-icon-button-BB2_W4d6.js} +1 -1
  267. package/dist/client/assets/{tooltip-DSbyRPdu.js → tooltip-DRlnzIQm.js} +1 -1
  268. package/dist/client/assets/{track-BuyQH-Eh.js → track-CXrvs8hW.js} +1 -1
  269. package/dist/client/assets/{types-BJVErkzZ.js → types-D4W-t3kf.js} +1 -1
  270. package/dist/client/assets/{usage-stats-Cpw6az0l.js → usage-stats-Fyuoa0E1.js} +1 -1
  271. package/dist/client/assets/{use-ai-providers-_Y5hFqHw.js → use-ai-providers-C4dXO9Yz.js} +1 -1
  272. package/dist/client/assets/{use-automations-CYLhsS7u.js → use-automations-9dsFC6Pt.js} +1 -1
  273. package/dist/client/assets/{use-autosave-C20aGd_5.js → use-autosave-CriUkKcO.js} +1 -1
  274. package/dist/client/assets/{use-connect-companion-C_Kr4lwD.js → use-connect-companion-DE-jLyCh.js} +1 -1
  275. package/dist/client/assets/{use-connection-DQuFsHZm.js → use-connection-By40b12N.js} +1 -1
  276. package/dist/client/assets/{use-copy-BxbAgUTq.js → use-copy-BLJCJFHS.js} +1 -1
  277. package/dist/client/assets/{use-create-virtual-mcp-BV3tbDpf.js → use-create-virtual-mcp-D0AahD2t.js} +1 -1
  278. package/dist/client/assets/{use-date-fns-locale-B9sUlaN2.js → use-date-fns-locale-CNRPcj9k.js} +1 -1
  279. package/dist/client/assets/{use-debounced-autosave-CcxGifiF.js → use-debounced-autosave-BzX7iQl5.js} +1 -1
  280. package/dist/client/assets/{use-debounced-value-BC8WZjNP.js → use-debounced-value-DQiu0Px1.js} +1 -1
  281. package/dist/client/assets/{use-deco-credits-CgqHzWY6.js → use-deco-credits-1r5nuYBd.js} +1 -1
  282. package/dist/client/assets/{use-decopilot-events-DH8OtbLR.js → use-decopilot-events-DwM9-jMb.js} +1 -1
  283. package/dist/client/assets/{use-delete-connection-DoiHfxoZ.js → use-delete-connection-huvoW3MI.js} +1 -1
  284. package/dist/client/assets/{use-deployment-admin-DLx3fYXb.js → use-deployment-admin-BZm5KCvv.js} +1 -1
  285. package/dist/client/assets/{use-entitlements-BHSK7OQU.js → use-entitlements-Bvz6_GHn.js} +1 -1
  286. package/dist/client/assets/{use-fast-preview-draft-url-CIy5-L85.js → use-fast-preview-draft-url-ITLFeGjr.js} +1 -1
  287. package/dist/client/assets/{use-file-configs-DWEtONQO.js → use-file-configs-Dc750_n6.js} +1 -1
  288. package/dist/client/assets/{use-in-settings-CWM0u3-W.js → use-in-settings-Nr5h58Dc.js} +1 -1
  289. package/dist/client/assets/{use-infinite-scroll-SSKfcc6X.js → use-infinite-scroll-5IN_AQUC.js} +1 -1
  290. package/dist/client/assets/{use-join-requests-gGG5CadF.js → use-join-requests-BUruBjE6.js} +1 -1
  291. package/dist/client/assets/{use-main-panel-tabs-DtFHHCKT.js → use-main-panel-tabs-CE7T9zOX.js} +1 -1
  292. package/dist/client/assets/{use-mcp-auth-status-C65tV0X5.js → use-mcp-auth-status-DQ1IMcVT.js} +1 -1
  293. package/dist/client/assets/{use-mcp-client-Dcdh62QN.js → use-mcp-client-Cgrjx403.js} +1 -1
  294. package/dist/client/assets/{use-mcp-prompts-C3jCksiZ.js → use-mcp-prompts-PD_QSplo.js} +1 -1
  295. package/dist/client/assets/{use-mcp-tools-Dvo5yh4L.js → use-mcp-tools-CbiwxQvl.js} +1 -1
  296. package/dist/client/assets/{use-members-DxjVAAba.js → use-members-DXD-dNoi.js} +1 -1
  297. package/dist/client/assets/{use-mobile-BYeAeIA8.js → use-mobile-B90d5ZlF.js} +1 -1
  298. package/dist/client/assets/{use-navigate-to-agent-BuhJIIwZ.js → use-navigate-to-agent-CUne0-cI.js} +1 -1
  299. package/dist/client/assets/{use-open-billing-url-TMTuXlUq.js → use-open-billing-url-nDZTfkQK.js} +1 -1
  300. package/dist/client/assets/{use-org-auth-client-Dqyt-QDJ.js → use-org-auth-client-PQEXc1yD.js} +1 -1
  301. package/dist/client/assets/{use-org-fs-nkAGDkJq.js → use-org-fs-DeO5Vs7G.js} +1 -1
  302. package/dist/client/assets/{use-org-repo-syncs-rUFGHayc.js → use-org-repo-syncs-DF_-QyL3.js} +1 -1
  303. package/dist/client/assets/{use-org-sso-tDYE-lfL.js → use-org-sso-DXBbBboL.js} +1 -1
  304. package/dist/client/assets/{use-organization-roles-DggYT7W3.js → use-organization-roles-CFSRd1jc.js} +1 -1
  305. package/dist/client/assets/{use-organization-settings-DrVA8Dee.js → use-organization-settings-ALMIpIdG.js} +1 -1
  306. package/dist/client/assets/{use-panel-navigate-BCslg8Vu.js → use-panel-navigate-BHrQSu9h.js} +1 -1
  307. package/dist/client/assets/{use-project-native-view-presence-DRoYxFZD.js → use-project-native-view-presence-Y2wkBJMs.js} +1 -1
  308. package/dist/client/assets/{use-project-scope-BpN8DHUI.js → use-project-scope-FsdoI9gD.js} +1 -1
  309. package/dist/client/assets/{use-releases-d7vakbKz.js → use-releases-xo3RYWEP.js} +1 -1
  310. package/dist/client/assets/{use-reports-diagnostic-B46E9lKV.js → use-reports-diagnostic-CtQFcqBI.js} +1 -1
  311. package/dist/client/assets/{use-route-default-main-DuOJfspa.js → use-route-default-main-BqmVu7AG.js} +1 -1
  312. package/dist/client/assets/{use-secrets-Cr1Kpc-T.js → use-secrets-DxDq4D6_.js} +1 -1
  313. package/dist/client/assets/{use-section-preview-base-BmRuRZWQ.js → use-section-preview-base-DaZur2dM.js} +1 -1
  314. package/dist/client/assets/{use-session-runtime-Cz4PfdcP.js → use-session-runtime-C4wBDVOy.js} +1 -1
  315. package/dist/client/assets/{use-tags-BYEtXqg6.js → use-tags-c1eddqqE.js} +1 -1
  316. package/dist/client/assets/{use-task-board-analytics-Ctm7E9WR.js → use-task-board-analytics-DJ3wBWjU.js} +1 -1
  317. package/dist/client/assets/{use-task-metadata-DkabNxB2.js → use-task-metadata-Bf-ipBBx.js} +1 -1
  318. package/dist/client/assets/{use-thread-outputs-CUgoskOk.js → use-thread-outputs-B5BUO9_U.js} +1 -1
  319. package/dist/client/assets/{use-virtual-mcp-CkPT-P6s.js → use-virtual-mcp-DbjQS13M.js} +1 -1
  320. package/dist/client/assets/useInfiniteQuery-C9Zty0xS.js +1 -0
  321. package/dist/client/assets/{useQueries-Ct7vzxRZ.js → useQueries-QDBruPdh.js} +1 -1
  322. package/dist/client/assets/useSuspenseInfiniteQuery-CaUQs7Ct.js +1 -0
  323. package/dist/client/assets/{users-OFnmE21N.js → users-CvddDmkv.js} +1 -1
  324. package/dist/client/assets/{utils-CKDo0rTz.js → utils-Do-NKG3l.js} +1 -1
  325. package/dist/client/assets/{variant-calendar-Y5WxXmYr.js → variant-calendar-BkV-nx_1.js} +1 -1
  326. package/dist/client/assets/{variant-matcher-override-itmFdczb.js → variant-matcher-override-DGI26buK.js} +1 -1
  327. package/dist/client/assets/{view-mode-toggle-Bfw6uHD6.js → view-mode-toggle-DsUGHBIV.js} +1 -1
  328. package/dist/client/assets/{virtual-mcp-BAAilWBi.js → virtual-mcp-CPXCNlcx.js} +1 -1
  329. package/dist/client/index.html +2 -2
  330. package/dist/server/cli.js +70 -70
  331. package/dist/server/server.js +68 -68
  332. package/package.json +1 -1
  333. package/dist/client/assets/agent-app-Bo_ubt7z.js +0 -1
  334. package/dist/client/assets/agent-deck-Dd2NRnhk.js +0 -1
  335. package/dist/client/assets/agent-file-ZcNHjqCt.js +0 -1
  336. package/dist/client/assets/agent-library-file-DIqQMq-g.js +0 -1
  337. package/dist/client/assets/agent-settings-BHIK3ZUi.js +0 -1
  338. package/dist/client/assets/agent-site-editor-code-DUsPBVkM.js +0 -2
  339. package/dist/client/assets/agent-view-Cuu386nI.js +0 -1
  340. package/dist/client/assets/api-keys-VM7wXF9S.js +0 -1
  341. package/dist/client/assets/app-editor-CCiymBYy.js +0 -1
  342. package/dist/client/assets/mock-board-B7bmGxyk.js +0 -90
  343. package/dist/client/assets/project-reports-U46-26iJ.js +0 -1
  344. package/dist/client/assets/project-tasks-CKdrXmkM.js +0 -1
  345. package/dist/client/assets/record-editor-DQ4fHRue.js +0 -1
  346. package/dist/client/assets/reports-BAn9AOfZ.js +0 -1
  347. package/dist/client/assets/tasks-CGWBXBtw.js +0 -1
  348. package/dist/client/assets/useInfiniteQuery-BSu4iAJA.js +0 -1
  349. package/dist/client/assets/useSuspenseInfiniteQuery-gyjx-2Eq.js +0 -1
@@ -1 +1 @@
1
- import{c as S,j as n,l as y,b as D}from"./index-r5-6H5AW.js";import{T as I,a as R,b as T,c as E,d as H,e as K}from"./table-BU5SQqZk.js";import{i as W,n as z}from"./ArrowUp-BaG4Z2PX.js";function L(C){const e=S.c(31),{columns:o,data:u,sortKey:x,sortDirection:i,onSort:c,onRowClick:l,rowClassName:m}=C;let p;e[0]!==i?(p=function(t,b){return n.jsx("div",{className:"w-4 flex items-center justify-center",children:b&&i&&(i==="asc"?n.jsx(W,{size:16,className:"text-muted-foreground transition-colors"}):n.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=i,e[1]=p):p=e[1];const h=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,b){let g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===b-1&&(g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),g},e[2]=d):d=e[2];const v=d;let s;if(e[3]!==o||e[4]!==c||e[5]!==h||e[6]!==i||e[7]!==x){let f;e[9]!==o.length||e[10]!==c||e[11]!==h||e[12]!==i||e[13]!==x?(f=(t,b)=>{const g=x===t.id,r=t.sortable&&c;return n.jsx(I,{className:y(v(b,o.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),"aria-sort":g&&i?i==="asc"?"ascending":"descending":t.sortable?"none":void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r?()=>c(t.id):void 0,onKeyDown:r?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(t.id))}:void 0,children:n.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&h(t.id,g)]})},t.id)},e[9]=o.length,e[10]=c,e[11]=h,e[12]=i,e[13]=x,e[14]=f):f=e[14],s=o.map(f),e[3]=o,e[4]=c,e[5]=h,e[6]=i,e[7]=x,e[8]=s}else s=e[8];let a;e[15]!==s?(a=n.jsx(R,{className:"border-b-0",children:n.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:s})}),e[15]=s,e[16]=a):a=e[16];let j;if(e[17]!==o||e[18]!==u||e[19]!==l||e[20]!==m){let f;e[22]!==o||e[23]!==l||e[24]!==m?(f=(t,b)=>{const g=m?.(t);return n.jsx(T,{"data-row-index":b,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",l?"cursor-pointer":"",g),role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l?()=>l(t):void 0,onKeyDown:l?r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),l(t))}:void 0,children:o.map(r=>n.jsx(E,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",r.cellClassName,r.wrap?"whitespace-normal wrap-break-word":""),children:n.jsx("div",{className:y(r.wrap?"w-full":"min-w-0 w-full",!r.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:r.render?r.render(t):r.accessor?r.accessor(t):null})},r.id))},b)},e[22]=o,e[23]=l,e[24]=m,e[25]=f):f=e[25],j=u.map(f),e[17]=o,e[18]=u,e[19]=l,e[20]=m,e[21]=j}else j=e[21];let w;e[26]!==j?(w=n.jsx(H,{children:j}),e[26]=j,e[27]=w):w=e[27];let N;return e[28]!==a||e[29]!==w?(N=n.jsxs(K,{className:"w-full border-collapse",children:[a,w]}),e[28]=a,e[29]=w,e[30]=N):N=e[30],N}function F(C){const e=S.c(16),{columns:o,data:u,isLoading:x,sortKey:i,sortDirection:c,onSort:l,onRowClick:m,emptyState:p}=C,h=x===void 0?!1:x,d=D();if(h){let s;e[0]!==d?(s=d("collections.collectionTableWrapper.loading"),e[0]=d,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-muted-foreground",children:s})}),e[2]=s,e[3]=a):a=e[3],a}if(u.length===0){let s;e[4]!==p||e[5]!==d?(s=p||n.jsx("div",{className:"text-center py-12 text-muted-foreground",children:d("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=d,e[6]=s):s=e[6];let a;return e[7]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:s}),e[7]=s,e[8]=a):a=e[8],a}let v;return e[9]!==o||e[10]!==u||e[11]!==m||e[12]!==l||e[13]!==c||e[14]!==i?(v=n.jsx("div",{className:"flex-1",children:n.jsx(L,{columns:o,data:u,sortKey:i,sortDirection:c,onSort:l,onRowClick:m})}),e[9]=o,e[10]=u,e[11]=m,e[12]=l,e[13]=c,e[14]=i,e[15]=v):v=e[15],v}export{F as C};
1
+ import{c as S,j as n,l as y,b as D}from"./index-CFyHGgGO.js";import{T as I,a as R,b as T,c as E,d as H,e as K}from"./table-wc_V6Osx.js";import{i as W,n as z}from"./ArrowUp-rfVFZ40K.js";function L(C){const e=S.c(31),{columns:o,data:u,sortKey:x,sortDirection:i,onSort:c,onRowClick:l,rowClassName:m}=C;let p;e[0]!==i?(p=function(t,b){return n.jsx("div",{className:"w-4 flex items-center justify-center",children:b&&i&&(i==="asc"?n.jsx(W,{size:16,className:"text-muted-foreground transition-colors"}):n.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=i,e[1]=p):p=e[1];const h=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,b){let g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===b-1&&(g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),g},e[2]=d):d=e[2];const v=d;let s;if(e[3]!==o||e[4]!==c||e[5]!==h||e[6]!==i||e[7]!==x){let f;e[9]!==o.length||e[10]!==c||e[11]!==h||e[12]!==i||e[13]!==x?(f=(t,b)=>{const g=x===t.id,r=t.sortable&&c;return n.jsx(I,{className:y(v(b,o.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),"aria-sort":g&&i?i==="asc"?"ascending":"descending":t.sortable?"none":void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r?()=>c(t.id):void 0,onKeyDown:r?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(t.id))}:void 0,children:n.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&h(t.id,g)]})},t.id)},e[9]=o.length,e[10]=c,e[11]=h,e[12]=i,e[13]=x,e[14]=f):f=e[14],s=o.map(f),e[3]=o,e[4]=c,e[5]=h,e[6]=i,e[7]=x,e[8]=s}else s=e[8];let a;e[15]!==s?(a=n.jsx(R,{className:"border-b-0",children:n.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:s})}),e[15]=s,e[16]=a):a=e[16];let j;if(e[17]!==o||e[18]!==u||e[19]!==l||e[20]!==m){let f;e[22]!==o||e[23]!==l||e[24]!==m?(f=(t,b)=>{const g=m?.(t);return n.jsx(T,{"data-row-index":b,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",l?"cursor-pointer":"",g),role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l?()=>l(t):void 0,onKeyDown:l?r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),l(t))}:void 0,children:o.map(r=>n.jsx(E,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",r.cellClassName,r.wrap?"whitespace-normal wrap-break-word":""),children:n.jsx("div",{className:y(r.wrap?"w-full":"min-w-0 w-full",!r.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:r.render?r.render(t):r.accessor?r.accessor(t):null})},r.id))},b)},e[22]=o,e[23]=l,e[24]=m,e[25]=f):f=e[25],j=u.map(f),e[17]=o,e[18]=u,e[19]=l,e[20]=m,e[21]=j}else j=e[21];let w;e[26]!==j?(w=n.jsx(H,{children:j}),e[26]=j,e[27]=w):w=e[27];let N;return e[28]!==a||e[29]!==w?(N=n.jsxs(K,{className:"w-full border-collapse",children:[a,w]}),e[28]=a,e[29]=w,e[30]=N):N=e[30],N}function F(C){const e=S.c(16),{columns:o,data:u,isLoading:x,sortKey:i,sortDirection:c,onSort:l,onRowClick:m,emptyState:p}=C,h=x===void 0?!1:x,d=D();if(h){let s;e[0]!==d?(s=d("collections.collectionTableWrapper.loading"),e[0]=d,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-muted-foreground",children:s})}),e[2]=s,e[3]=a):a=e[3],a}if(u.length===0){let s;e[4]!==p||e[5]!==d?(s=p||n.jsx("div",{className:"text-center py-12 text-muted-foreground",children:d("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=d,e[6]=s):s=e[6];let a;return e[7]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:s}),e[7]=s,e[8]=a):a=e[8],a}let v;return e[9]!==o||e[10]!==u||e[11]!==m||e[12]!==l||e[13]!==c||e[14]!==i?(v=n.jsx("div",{className:"flex-1",children:n.jsx(L,{columns:o,data:u,sortKey:i,sortDirection:c,onSort:l,onRowClick:m})}),e[9]=o,e[10]=u,e[11]=m,e[12]=l,e[13]=c,e[14]=i,e[15]=v):v=e[15],v}export{F as C};
@@ -1 +1 @@
1
- import{c as g,Z as j,j as u,n as h,P as T,b as C,l as b}from"./index-r5-6H5AW.js";import{B as v}from"./badge-DIi7Tq2w.js";function y(f){const e=g.c(13),{tabs:o,activeTab:t,onTabChange:s,className:m,placement:x}=f,i=x===void 0?"inline":x;let n;if(e[0]!==t||e[1]!==s||e[2]!==o){let l;e[4]!==t||e[5]!==s?(l=c=>{const p=t===c.id;return u.jsxs(h.Tab,{active:p,onClick:()=>s(c.id),children:[c.label,c.count!==void 0&&u.jsx(v,{variant:"secondary",className:b("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",p?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:c.count})]},c.id)},e[4]=t,e[5]=s,e[6]=l):l=e[6],n=o.map(l),e[0]=t,e[1]=s,e[2]=o,e[3]=n}else n=e[3];let r;e[7]!==m||e[8]!==n?(r=u.jsx(h.Tabs,{className:m,children:n}),e[7]=m,e[8]=n,e[9]=r):r=e[9];const a=r;let d;return e[10]!==a||e[11]!==i?(d=i==="page"?u.jsx(T.Toolbar.Left.Portal,{fallback:a,children:a}):a,e[10]=a,e[11]=i,e[12]=d):d=e[12],d}function N(f){const e=g.c(15),{tabs:o,activeTab:t,onTabChange:s,className:m}=f,x=C();let i;e[0]!==x?(i=x("collections.collectionTabs.tabList"),e[0]=x,e[1]=i):i=e[1];let n;e[2]!==m?(n=b("flex items-center gap-2 overflow-x-auto no-scrollbar",m),e[2]=m,e[3]=n):n=e[3];let r;if(e[4]!==t||e[5]!==s||e[6]!==o){let d;e[8]!==t||e[9]!==s?(d=l=>{const c=t===l.id;return u.jsxs("button",{type:"button","aria-pressed":c,onClick:()=>s(l.id),className:b("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",c&&"bg-accent border-border text-foreground",!c&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[l.label,l.count!==void 0&&u.jsx(v,{variant:"secondary",className:b("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",c?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:l.count})]},l.id)},e[8]=t,e[9]=s,e[10]=d):d=e[10],r=o.map(d),e[4]=t,e[5]=s,e[6]=o,e[7]=r}else r=e[7];let a;return e[11]!==i||e[12]!==n||e[13]!==r?(a=u.jsx("nav",{"aria-label":i,className:n,children:r}),e[11]=i,e[12]=n,e[13]=r,e[14]=a):a=e[14],a}function w(f){const e=g.c(3),o=j();let t;return e[0]!==o||e[1]!==f?(t=o?u.jsx(y,{...f}):u.jsx(N,{...f}),e[0]=o,e[1]=f,e[2]=t):t=e[2],t}export{w as C};
1
+ import{c as g,Z as j,j as u,n as h,P as T,b as C,l as b}from"./index-CFyHGgGO.js";import{B as v}from"./badge-jSVR8IKO.js";function y(f){const e=g.c(13),{tabs:o,activeTab:t,onTabChange:s,className:m,placement:x}=f,i=x===void 0?"inline":x;let n;if(e[0]!==t||e[1]!==s||e[2]!==o){let l;e[4]!==t||e[5]!==s?(l=c=>{const p=t===c.id;return u.jsxs(h.Tab,{active:p,onClick:()=>s(c.id),children:[c.label,c.count!==void 0&&u.jsx(v,{variant:"secondary",className:b("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",p?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:c.count})]},c.id)},e[4]=t,e[5]=s,e[6]=l):l=e[6],n=o.map(l),e[0]=t,e[1]=s,e[2]=o,e[3]=n}else n=e[3];let r;e[7]!==m||e[8]!==n?(r=u.jsx(h.Tabs,{className:m,children:n}),e[7]=m,e[8]=n,e[9]=r):r=e[9];const a=r;let d;return e[10]!==a||e[11]!==i?(d=i==="page"?u.jsx(T.Toolbar.Left.Portal,{fallback:a,children:a}):a,e[10]=a,e[11]=i,e[12]=d):d=e[12],d}function N(f){const e=g.c(15),{tabs:o,activeTab:t,onTabChange:s,className:m}=f,x=C();let i;e[0]!==x?(i=x("collections.collectionTabs.tabList"),e[0]=x,e[1]=i):i=e[1];let n;e[2]!==m?(n=b("flex items-center gap-2 overflow-x-auto no-scrollbar",m),e[2]=m,e[3]=n):n=e[3];let r;if(e[4]!==t||e[5]!==s||e[6]!==o){let d;e[8]!==t||e[9]!==s?(d=l=>{const c=t===l.id;return u.jsxs("button",{type:"button","aria-pressed":c,onClick:()=>s(l.id),className:b("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",c&&"bg-accent border-border text-foreground",!c&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[l.label,l.count!==void 0&&u.jsx(v,{variant:"secondary",className:b("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",c?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:l.count})]},l.id)},e[8]=t,e[9]=s,e[10]=d):d=e[10],r=o.map(d),e[4]=t,e[5]=s,e[6]=o,e[7]=r}else r=e[7];let a;return e[11]!==i||e[12]!==n||e[13]!==r?(a=u.jsx("nav",{"aria-label":i,className:n,children:r}),e[11]=i,e[12]=n,e[13]=r,e[14]=a):a=e[14],a}function w(f){const e=g.c(3),o=j();let t;return e[0]!==o||e[1]!==f?(t=o?u.jsx(y,{...f}):u.jsx(N,{...f}),e[0]=o,e[1]=f,e[2]=t):t=e[2],t}export{w as C};
@@ -1 +1 @@
1
- import{c as D,r as H,j as s,l as b,B as J}from"./index-r5-6H5AW.js";import{i as K}from"./Check-n2s3oQPA.js";import{i as Q}from"./Tool01-O3QS0Upe.js";import{e as U,C as V,b as W,a as X,c as Y,d as Z}from"./command-Bz8F763k.js";import{a as _,P as ee,b as se}from"./popover-nFUkosPX.js";function ie(k){const e=D.c(41),{options:v,value:t,onChange:x,placeholder:B,triggerClassName:M,contentClassName:y,width:R,renderTrigger:$,renderItem:o,emptyMessage:F,searchPlaceholder:G,filter:N}=k,q=B===void 0?"Select...":B,z=R===void 0?"w-[200px]":R,w=F===void 0?"No results found.":F,P=G===void 0?"Search...":G;let j;e[0]!==t?(j=u=>u.value===t,e[0]=t,e[1]=j):j=e[1];const S=v.find(j),[E,l]=H.useState(!1),T=ee,I=_,A=!0,O=$?s.jsx("div",{className:b("cursor-pointer",M),children:$(S)}):s.jsxs(J,{variant:"outline",role:"combobox",className:b("justify-between",z,M),children:[S?S.label:q,s.jsx(Q,{className:"opacity-50"})]});let r;e[2]!==I||e[3]!==O?(r=s.jsx(I,{asChild:A,children:O}),e[2]=I,e[3]=O,e[4]=r):r=e[4];let i;e[5]!==y?(i=b("p-0",y),e[5]=y,e[6]=i):i=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C={width:"var(--radix-popover-trigger-width)"},e[7]=C):C=e[7];let c;e[8]!==P?(c=s.jsx(U,{placeholder:P,className:"h-9"}),e[8]=P,e[9]=c):c=e[9];let n;e[10]!==w?(n=s.jsx(V,{children:w}),e[10]=w,e[11]=n):n=e[11];let m;if(e[12]!==x||e[13]!==v||e[14]!==o||e[15]!==l||e[16]!==t){let u;e[18]!==x||e[19]!==o||e[20]!==l||e[21]!==t?(u=a=>{const L=t===a.value;return s.jsx(W,{value:a.label,onSelect:()=>{x(a.value===t?"":a.value),l(!1)},children:o?o(a,L):s.jsxs(s.Fragment,{children:[a.label,s.jsx(K,{className:b("ml-auto",L?"opacity-100":"opacity-0")})]})},a.value)},e[18]=x,e[19]=o,e[20]=l,e[21]=t,e[22]=u):u=e[22],m=v.map(u),e[12]=x,e[13]=v,e[14]=o,e[15]=l,e[16]=t,e[17]=m}else m=e[17];let d;e[23]!==m?(d=s.jsx(X,{children:m}),e[23]=m,e[24]=d):d=e[24];let p;e[25]!==n||e[26]!==d?(p=s.jsxs(Y,{children:[n,d]}),e[25]=n,e[26]=d,e[27]=p):p=e[27];let h;e[28]!==N||e[29]!==c||e[30]!==p?(h=s.jsxs(Z,{filter:N,children:[c,p]}),e[28]=N,e[29]=c,e[30]=p,e[31]=h):h=e[31];let f;e[32]!==h||e[33]!==i?(f=s.jsx(se,{className:i,style:C,children:h}),e[32]=h,e[33]=i,e[34]=f):f=e[34];let g;return e[35]!==T||e[36]!==E||e[37]!==l||e[38]!==f||e[39]!==r?(g=s.jsxs(T,{open:E,onOpenChange:l,children:[r,f]}),e[35]=T,e[36]=E,e[37]=l,e[38]=f,e[39]=r,e[40]=g):g=e[40],g}export{ie as C};
1
+ import{c as D,r as H,j as s,l as b,B as J}from"./index-CFyHGgGO.js";import{i as K}from"./Check-Chl3DDqT.js";import{i as Q}from"./Tool01-DUJdCnDK.js";import{e as U,C as V,b as W,a as X,c as Y,d as Z}from"./command-SQ6iukKb.js";import{a as _,P as ee,b as se}from"./popover-DcrAVb5K.js";function ie(k){const e=D.c(41),{options:v,value:t,onChange:x,placeholder:B,triggerClassName:M,contentClassName:y,width:R,renderTrigger:$,renderItem:o,emptyMessage:F,searchPlaceholder:G,filter:N}=k,q=B===void 0?"Select...":B,z=R===void 0?"w-[200px]":R,w=F===void 0?"No results found.":F,P=G===void 0?"Search...":G;let j;e[0]!==t?(j=u=>u.value===t,e[0]=t,e[1]=j):j=e[1];const S=v.find(j),[E,l]=H.useState(!1),T=ee,I=_,A=!0,O=$?s.jsx("div",{className:b("cursor-pointer",M),children:$(S)}):s.jsxs(J,{variant:"outline",role:"combobox",className:b("justify-between",z,M),children:[S?S.label:q,s.jsx(Q,{className:"opacity-50"})]});let r;e[2]!==I||e[3]!==O?(r=s.jsx(I,{asChild:A,children:O}),e[2]=I,e[3]=O,e[4]=r):r=e[4];let i;e[5]!==y?(i=b("p-0",y),e[5]=y,e[6]=i):i=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C={width:"var(--radix-popover-trigger-width)"},e[7]=C):C=e[7];let c;e[8]!==P?(c=s.jsx(U,{placeholder:P,className:"h-9"}),e[8]=P,e[9]=c):c=e[9];let n;e[10]!==w?(n=s.jsx(V,{children:w}),e[10]=w,e[11]=n):n=e[11];let m;if(e[12]!==x||e[13]!==v||e[14]!==o||e[15]!==l||e[16]!==t){let u;e[18]!==x||e[19]!==o||e[20]!==l||e[21]!==t?(u=a=>{const L=t===a.value;return s.jsx(W,{value:a.label,onSelect:()=>{x(a.value===t?"":a.value),l(!1)},children:o?o(a,L):s.jsxs(s.Fragment,{children:[a.label,s.jsx(K,{className:b("ml-auto",L?"opacity-100":"opacity-0")})]})},a.value)},e[18]=x,e[19]=o,e[20]=l,e[21]=t,e[22]=u):u=e[22],m=v.map(u),e[12]=x,e[13]=v,e[14]=o,e[15]=l,e[16]=t,e[17]=m}else m=e[17];let d;e[23]!==m?(d=s.jsx(X,{children:m}),e[23]=m,e[24]=d):d=e[24];let p;e[25]!==n||e[26]!==d?(p=s.jsxs(Y,{children:[n,d]}),e[25]=n,e[26]=d,e[27]=p):p=e[27];let h;e[28]!==N||e[29]!==c||e[30]!==p?(h=s.jsxs(Z,{filter:N,children:[c,p]}),e[28]=N,e[29]=c,e[30]=p,e[31]=h):h=e[31];let f;e[32]!==h||e[33]!==i?(f=s.jsx(se,{className:i,style:C,children:h}),e[32]=h,e[33]=i,e[34]=f):f=e[34];let g;return e[35]!==T||e[36]!==E||e[37]!==l||e[38]!==f||e[39]!==r?(g=s.jsxs(T,{open:E,onOpenChange:l,children:[r,f]}),e[35]=T,e[36]=E,e[37]=l,e[38]=f,e[39]=r,e[40]=g):g=e[40],g}export{ie as C};
@@ -1 +1 @@
1
- import{c as f,l as u,j as n,aE as j}from"./index-r5-6H5AW.js";import{_ as g}from"./index-CRDxekvr.js";import{D as b,d as w,h as y,c as C,b as z}from"./dialog-BdtMvx6K.js";import{i as D}from"./SearchMd-SaWfMl2E.js";function $(a){const e=f.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 l;e[3]!==t?(l=u("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g,{"data-slot":"command",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function R(a){const e=f.c(28);let t,s,l,o,r,i,c;e[0]!==a?({title:i,description:c,children:t,className:s,filter:l,shouldFilter:r,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o,e[5]=r,e[6]=i,e[7]=c):(t=e[1],s=e[2],l=e[3],o=e[4],r=e[5],i=e[6],c=e[7]);const m=i===void 0?"Command Palette":i,p=c===void 0?"Search for a command to run...":c;let d;e[8]!==m?(d=n.jsx(w,{children:m}),e[8]=m,e[9]=d):d=e[9];let x;e[10]!==p?(x=n.jsx(y,{children:p}),e[10]=p,e[11]=x):x=e[11];let h;e[12]!==d||e[13]!==x?(h=n.jsxs(C,{className:"sr-only",children:[d,x]}),e[12]=d,e[13]=x,e[14]=h):h=e[14];let _;e[15]!==s?(_=u("overflow-hidden p-0",s),e[15]=s,e[16]=_):_=e[16];let v;e[17]!==t||e[18]!==l||e[19]!==r?(v=n.jsx($,{filter:l,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]=l,e[19]=r,e[20]=v):v=e[20];let k;e[21]!==_||e[22]!==v?(k=n.jsx(z,{className:_,closeButtonClassName:"hidden",children:v}),e[21]=_,e[22]=v,e[23]=k):k=e[23];let N;return e[24]!==o||e[25]!==h||e[26]!==k?(N=n.jsxs(b,{...o,children:[h,k]}),e[24]=o,e[25]=h,e[26]=k,e[27]=N):N=e[27],N}function V(a){const e=f.c(16);let t,s,l;e[0]!==a?({className:t,size:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);const r=(l===void 0?"default":l)==="sm"?"h-9":"h-10";let i;e[4]!==r?(i=u("flex items-center gap-2 border-b px-3",r),e[4]=r,e[5]=i):i=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[6]=c):c=e[6];let m;e[7]!==t||e[8]!==r?(m=u("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent classic:py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",r,t),e[7]=t,e[8]=r,e[9]=m):m=e[9];let p;e[10]!==s||e[11]!==m?(p=n.jsx(g.Input,{"data-slot":"command-input",className:m,...s}),e[10]=s,e[11]=m,e[12]=p):p=e[12];let d;return e[13]!==i||e[14]!==p?(d=n.jsxs("div",{"data-slot":"command-input-wrapper",className:i,children:[c,p]}),e[13]=i,e[14]=p,e[15]=d):d=e[15],d}function B(a){const e=f.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 l;e[3]!==t?(l=u("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.List,{"data-slot":"command-list",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function F(a){const e=f.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(g.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 H(a){const e=f.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 l;e[3]!==t?(l=u("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]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Group,{"data-slot":"command-group",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function P(a){const e=f.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 l;e[3]!==t?(l=u("bg-border -mx-1 h-px",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Separator,{"data-slot":"command-separator",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}const E=j("[&_svg:not([class*='text-'])]:text-muted-foreground relative flex compact:min-h-8 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",{variants:{highlight:{selected:"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",hover:"w-full hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{highlight:"selected"}});function T(a){const e=f.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 l;e[3]!==t?(l=u(E(),t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Item,{"data-slot":"command-item",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}export{F as C,H as a,T as b,B as c,$ as d,V as e,R as f,E as g,P as h};
1
+ import{c as f,l as u,j as n,aE as j}from"./index-CFyHGgGO.js";import{_ as g}from"./index-CJazvqGq.js";import{D as b,d as w,h as y,c as C,b as z}from"./dialog-RGKICG4s.js";import{i as D}from"./SearchMd-tkECPV7l.js";function $(a){const e=f.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 l;e[3]!==t?(l=u("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g,{"data-slot":"command",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function R(a){const e=f.c(28);let t,s,l,o,r,i,c;e[0]!==a?({title:i,description:c,children:t,className:s,filter:l,shouldFilter:r,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o,e[5]=r,e[6]=i,e[7]=c):(t=e[1],s=e[2],l=e[3],o=e[4],r=e[5],i=e[6],c=e[7]);const m=i===void 0?"Command Palette":i,p=c===void 0?"Search for a command to run...":c;let d;e[8]!==m?(d=n.jsx(w,{children:m}),e[8]=m,e[9]=d):d=e[9];let x;e[10]!==p?(x=n.jsx(y,{children:p}),e[10]=p,e[11]=x):x=e[11];let h;e[12]!==d||e[13]!==x?(h=n.jsxs(C,{className:"sr-only",children:[d,x]}),e[12]=d,e[13]=x,e[14]=h):h=e[14];let _;e[15]!==s?(_=u("overflow-hidden p-0",s),e[15]=s,e[16]=_):_=e[16];let v;e[17]!==t||e[18]!==l||e[19]!==r?(v=n.jsx($,{filter:l,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]=l,e[19]=r,e[20]=v):v=e[20];let k;e[21]!==_||e[22]!==v?(k=n.jsx(z,{className:_,closeButtonClassName:"hidden",children:v}),e[21]=_,e[22]=v,e[23]=k):k=e[23];let N;return e[24]!==o||e[25]!==h||e[26]!==k?(N=n.jsxs(b,{...o,children:[h,k]}),e[24]=o,e[25]=h,e[26]=k,e[27]=N):N=e[27],N}function V(a){const e=f.c(16);let t,s,l;e[0]!==a?({className:t,size:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);const r=(l===void 0?"default":l)==="sm"?"h-9":"h-10";let i;e[4]!==r?(i=u("flex items-center gap-2 border-b px-3",r),e[4]=r,e[5]=i):i=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[6]=c):c=e[6];let m;e[7]!==t||e[8]!==r?(m=u("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent classic:py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",r,t),e[7]=t,e[8]=r,e[9]=m):m=e[9];let p;e[10]!==s||e[11]!==m?(p=n.jsx(g.Input,{"data-slot":"command-input",className:m,...s}),e[10]=s,e[11]=m,e[12]=p):p=e[12];let d;return e[13]!==i||e[14]!==p?(d=n.jsxs("div",{"data-slot":"command-input-wrapper",className:i,children:[c,p]}),e[13]=i,e[14]=p,e[15]=d):d=e[15],d}function B(a){const e=f.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 l;e[3]!==t?(l=u("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.List,{"data-slot":"command-list",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function F(a){const e=f.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(g.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 H(a){const e=f.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 l;e[3]!==t?(l=u("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]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Group,{"data-slot":"command-group",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function P(a){const e=f.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 l;e[3]!==t?(l=u("bg-border -mx-1 h-px",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Separator,{"data-slot":"command-separator",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}const E=j("[&_svg:not([class*='text-'])]:text-muted-foreground relative flex compact:min-h-8 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",{variants:{highlight:{selected:"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",hover:"w-full hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{highlight:"selected"}});function T(a){const e=f.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 l;e[3]!==t?(l=u(E(),t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Item,{"data-slot":"command-item",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}export{F as C,H as a,T as b,B as c,$ as d,V as e,R as f,E as g,P as h};
@@ -1 +1 @@
1
- import{c as _,r as T,l as Q,j as s,Q as Y,E as Z,b as U,a as ee,z as te,B as ne}from"./index-r5-6H5AW.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-Dcdh62QN.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-C_Kr4lwD.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=T.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=U();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=U();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(T.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=U(),{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),[z,D]=T.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==z||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:z,onAutoOpenConfigHandled:()=>D(F=>F===h.fieldKey?null:F),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]=z,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 T,l as Q,j as s,Q as Y,E as Z,b as U,a as ee,z as te,B as ne}from"./index-CFyHGgGO.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-Cgrjx403.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-DE-jLyCh.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=T.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=U();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=U();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(T.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=U(),{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),[z,D]=T.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==z||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:z,onAutoOpenConfigHandled:()=>D(F=>F===h.fieldKey?null:F),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]=z,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,4 +1,4 @@
1
- import{c as _,b as B,r as D,l as ee,j as s,fr as te,a0 as se,ae as ne,T as ie,B as F,t as q,eL as oe,dX as le,am as ae}from"./index-r5-6H5AW.js";import{a as re,A as ce}from"./alert-DaWyZsW8.js";import{a as de,b as ue,c as V,d as me,S as pe}from"./select-DTYo-xWa.js";import{T as fe,c as xe,a as ge,b as he}from"./tabs-Boo8T0HI.js";import{u as J}from"./use-copy-BxbAgUTq.js";import{i as Y}from"./Check-n2s3oQPA.js";import{a as Q}from"./Copy01-TOTRJp0v.js";import{i as ye}from"./Key01-B66GpQfK.js";import{i as Ce}from"./Link01-C-2vKCHa.js";import{C as je,a as be,b as ve}from"./client-icons-BDqexBpT.js";import{u as we,a as Ne,A as $e}from"./api-keys-BPoZWvQG.js";import{R as ke}from"./require-capability-bTSAtNh_.js";import"./index-K276FEfg.js";import"./ChevronUp-Dn4qDwuF.js";import"./AlertCircle-DH2lw5dl.js";import"./Plus-tNGOLWnu.js";import"./Trash01-D4CNvDEa.js";import"./alert-dialog-D21XY4Kh.js";import"./dialog-BdtMvx6K.js";import"./X-DbiRP14Q.js";import"./input-C2g1j_kV.js";import"./label-CjNgDGiH.js";import"./use-mcp-client-Dcdh62QN.js";import"./auth-B30FL8Dl.js";import"./access-gate-B2v8iIju.js";import"./capability-load-error-Cmcx9spT.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 B,r as D,l as ee,j as s,fr as te,a0 as se,ae as ne,T as ie,B as F,t as q,eL as oe,dX as le,am as ae}from"./index-CFyHGgGO.js";import{a as re,A as ce}from"./alert-DWLTyUNd.js";import{a as de,b as ue,c as V,d as me,S as pe}from"./select-rL7p93dx.js";import{T as fe,c as xe,a as ge,b as he}from"./tabs-CQkW3bOH.js";import{u as J}from"./use-copy-BLJCJFHS.js";import{i as Y}from"./Check-Chl3DDqT.js";import{a as Q}from"./Copy01-BwsqBYnE.js";import{i as ye}from"./Key01-CTlB38YG.js";import{i as Ce}from"./Link01-7UJLIg0N.js";import{C as je,a as be,b as ve}from"./client-icons-Cz9Mab30.js";import{u as we,a as Ne,A as $e}from"./api-keys-C8x1m95I.js";import{R as ke}from"./require-capability-B_Hqq5xX.js";import"./index-Dv6121Hz.js";import"./ChevronUp-BuAMP7GQ.js";import"./AlertCircle-Cwl0Vup2.js";import"./Plus-DxM0fEC4.js";import"./Trash01-B-_Oqcf7.js";import"./alert-dialog-BCnbMjLm.js";import"./dialog-RGKICG4s.js";import"./X-BEAR-IcH.js";import"./input-BXe2-JP2.js";import"./label-BKtkcOfE.js";import"./use-mcp-client-Cgrjx403.js";import"./auth-fkwwQuGR.js";import"./access-gate-5gX8wxGV.js";import"./capability-load-error-O16y38Ak.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
 
@@ -1 +1 @@
1
- import{c as v,b as N,j as s,R as w,am as k,B as y}from"./index-r5-6H5AW.js";import{i as z}from"./X-DbiRP14Q.js";import{ar as _,ai as C}from"./agent-icon-DsMxtuPs.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 A(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(k,{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 I(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(y,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal classic: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{A as C,I as a};
1
+ import{c as v,b as N,j as s,R as w,am as k,B as y}from"./index-CFyHGgGO.js";import{i as z}from"./X-BEAR-IcH.js";import{ar as _,ai as C}from"./agent-icon-CP0I3VVA.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 A(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(k,{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 I(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(y,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal classic: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{A as C,I as a};
@@ -1 +1 @@
1
- import{an as o,bM as a,bN as t,ao as e,bO as i,bP as r,cV as p,dA as b,cR as m}from"./index-r5-6H5AW.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:p("object"),properties:i(e(),r()).optional(),required:t(e()).optional()}).catchall(r()),_=b.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:t(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(n){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${n} 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:t(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:t(_).nullable().describe("Discovered tools from MCP"),bindings:t(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(n){return n!=null&&"command"in n}function y(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{h as O,T as i,y as p};
1
+ import{an as o,bM as a,bN as t,ao as e,bO as i,bP as r,cV as p,dA as b,cR as m}from"./index-CFyHGgGO.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:p("object"),properties:i(e(),r()).optional(),required:t(e()).optional()}).catchall(r()),_=b.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:t(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(n){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${n} 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:t(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:t(_).nullable().describe("Discovered tools from MCP"),bindings:t(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(n){return n!=null&&"command"in n}function y(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{h as O,T as i,y as p};
@@ -1 +1 @@
1
- import{c as M,a0 as S,a6 as $,K as F,a8 as R,b as K,l as A,j as c,eL as q}from"./index-r5-6H5AW.js";import{u as O}from"./useInfiniteQuery-BSu4iAJA.js";import{g as D}from"./connection-slug-CITJ0kGN.js";import{I as V}from"./integration-icon-CceXxFa_.js";function X(t){const e=M.c(21),{org:s}=S(),o=$();let l;e[0]!==t?(l=t?.trim().split(/\s+/).filter(Boolean)??[],e[0]=t,e[1]=l):l=e[1];const r=l;let n;e[2]!==s.id||e[3]!==t?(n=F.storeDiscovery(s.id,`deco-json:${t??""}`),e[2]=s.id,e[3]=t,e[4]=n):n=e[4];let a;e[5]!==o||e[6]!==r?(a=I=>{const{pageParam:L}=I;return o.call("COLLECTION_REGISTRY_APP_LIST",{limit:24,cursor:L,where:r.length?{operator:"or",conditions:r.flatMap(B)}:void 0})},e[5]=o,e[6]=r,e[7]=a):a=e[7];let u;e[8]!==n||e[9]!==a?(u={queryKey:n,queryFn:a,initialPageParam:void 0,getNextPageParam:z,staleTime:3e5,placeholderData:R,throwOnError:!0},e[8]=n,e[9]=a,e[10]=u):u=e[10];const i=O(u);let p;e[11]!==i.data?.pages?(p=i.data?.pages.flatMap(Y)??[],e[11]=i.data?.pages,e[12]=p):p=e[12];const m=p;let f;e[13]!==i?(f=()=>{i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},e[13]=i,e[14]=f):f=e[14];let d;return e[15]!==m||e[16]!==i.hasNextPage||e[17]!==i.isFetchingNextPage||e[18]!==i.isLoading||e[19]!==f?(d={items:m,hasMore:i.hasNextPage,isLoadingMore:i.isFetchingNextPage,isInitialLoading:i.isLoading,loadMore:f},e[15]=m,e[16]=i.hasNextPage,e[17]=i.isFetchingNextPage,e[18]=i.isLoading,e[19]=f,e[20]=d):d=e[20],d}function Y(t){return t.items}function z(t){return t.nextCursor}function B(t){return[["title"],["description"],["id"],["server","name"]].map(e=>({field:e,operator:"contains",value:t}))}function Z(t){const e=new Map;for(const l of t){const r=D(l),n=e.get(r);n?n.push(l):e.set(r,[l])}const s=[],o=new Set;for(const l of t){const r=D(l);if(o.has(r))continue;o.add(r);const n=e.get(r),a=n[0];n.length===1?s.push({type:"single",connection:a}):s.push({type:"group",key:r,icon:a.icon,title:a.app_name?a.title.replace(/\s*\(\d+\)\s*$/,""):a.title,connections:n})}return s}function ee(t){const e=M.c(43),{connection:s,onClick:o,headerActions:l,headerActionsAlwaysVisible:r,footer:n,className:a,fallbackIcon:u,selected:i}=t,p=r===void 0?!1:r,m=K(),f=o&&"cursor-pointer hover:bg-muted/50";let d;e[0]!==a||e[1]!==f?(d=A("transition-colors group overflow-hidden flex flex-col h-full",f,a),e[0]=a,e[1]=f,e[2]=d):d=e[2];const I=o?"button":void 0,L=o?0:void 0,T=o&&i!==void 0?i:void 0;let g;e[3]!==o?(g=o?_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),o())}:void 0,e[3]=o,e[4]=g):g=e[4];let x;e[5]!==s.icon||e[6]!==s.title||e[7]!==u?(x=c.jsx(V,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:u}),e[5]=s.icon,e[6]=s.title,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==p?(h=l&&c.jsx("div",{className:A("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:Q,children:l}),e[9]=l,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==h?(v=c.jsx("div",{className:"relative",children:h}),e[12]=h,e[13]=v):v=e[13];let N;e[14]!==v||e[15]!==x?(N=c.jsxs("div",{className:"flex items-start justify-between",children:[x,v]}),e[14]=v,e[15]=x,e[16]=N):N=e[16];let y;e[17]!==s.title?(y=c.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[17]=s.title,e[18]=y):y=e[18];let P;e[19]!==s.description||e[20]!==m?(P=s.description||m("connections.connectionCard.noDescription"),e[19]=s.description,e[20]=m,e[21]=P):P=e[21];let j;e[22]!==P?(j=c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=j):j=e[23];let C;e[24]!==y||e[25]!==j?(C=c.jsxs("div",{className:"flex flex-col gap-1",children:[y,j]}),e[24]=y,e[25]=j,e[26]=C):C=e[26];let b;e[27]!==N||e[28]!==C?(b=c.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,C]}),e[27]=N,e[28]=C,e[29]=b):b=e[29];let k;e[30]!==n?(k=n&&c.jsx("div",{className:"border-t border-border mt-auto",children:c.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:G,children:n})}),e[30]=n,e[31]=k):k=e[31];let w;e[32]!==b||e[33]!==k?(w=c.jsxs("div",{className:"flex flex-col flex-1",children:[b,k]}),e[32]=b,e[33]=k,e[34]=w):w=e[34];let E;return e[35]!==o||e[36]!==w||e[37]!==d||e[38]!==I||e[39]!==L||e[40]!==T||e[41]!==g?(E=c.jsx(q,{className:d,onClick:o,role:I,tabIndex:L,"aria-pressed":T,onKeyDown:g,children:w}),e[35]=o,e[36]=w,e[37]=d,e[38]=I,e[39]=L,e[40]=T,e[41]=g,e[42]=E):E=e[42],E}function G(t){return t.stopPropagation()}function Q(t){return t.stopPropagation()}export{ee as C,Z as g,X as u};
1
+ import{c as M,a0 as S,a6 as $,K as F,a8 as R,b as K,l as A,j as c,eL as q}from"./index-CFyHGgGO.js";import{u as O}from"./useInfiniteQuery-C9Zty0xS.js";import{g as D}from"./connection-slug-CITJ0kGN.js";import{I as V}from"./integration-icon-DRK9pjva.js";function X(t){const e=M.c(21),{org:s}=S(),o=$();let l;e[0]!==t?(l=t?.trim().split(/\s+/).filter(Boolean)??[],e[0]=t,e[1]=l):l=e[1];const r=l;let n;e[2]!==s.id||e[3]!==t?(n=F.storeDiscovery(s.id,`deco-json:${t??""}`),e[2]=s.id,e[3]=t,e[4]=n):n=e[4];let a;e[5]!==o||e[6]!==r?(a=I=>{const{pageParam:L}=I;return o.call("COLLECTION_REGISTRY_APP_LIST",{limit:24,cursor:L,where:r.length?{operator:"or",conditions:r.flatMap(B)}:void 0})},e[5]=o,e[6]=r,e[7]=a):a=e[7];let u;e[8]!==n||e[9]!==a?(u={queryKey:n,queryFn:a,initialPageParam:void 0,getNextPageParam:z,staleTime:3e5,placeholderData:R,throwOnError:!0},e[8]=n,e[9]=a,e[10]=u):u=e[10];const i=O(u);let p;e[11]!==i.data?.pages?(p=i.data?.pages.flatMap(Y)??[],e[11]=i.data?.pages,e[12]=p):p=e[12];const m=p;let f;e[13]!==i?(f=()=>{i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},e[13]=i,e[14]=f):f=e[14];let d;return e[15]!==m||e[16]!==i.hasNextPage||e[17]!==i.isFetchingNextPage||e[18]!==i.isLoading||e[19]!==f?(d={items:m,hasMore:i.hasNextPage,isLoadingMore:i.isFetchingNextPage,isInitialLoading:i.isLoading,loadMore:f},e[15]=m,e[16]=i.hasNextPage,e[17]=i.isFetchingNextPage,e[18]=i.isLoading,e[19]=f,e[20]=d):d=e[20],d}function Y(t){return t.items}function z(t){return t.nextCursor}function B(t){return[["title"],["description"],["id"],["server","name"]].map(e=>({field:e,operator:"contains",value:t}))}function Z(t){const e=new Map;for(const l of t){const r=D(l),n=e.get(r);n?n.push(l):e.set(r,[l])}const s=[],o=new Set;for(const l of t){const r=D(l);if(o.has(r))continue;o.add(r);const n=e.get(r),a=n[0];n.length===1?s.push({type:"single",connection:a}):s.push({type:"group",key:r,icon:a.icon,title:a.app_name?a.title.replace(/\s*\(\d+\)\s*$/,""):a.title,connections:n})}return s}function ee(t){const e=M.c(43),{connection:s,onClick:o,headerActions:l,headerActionsAlwaysVisible:r,footer:n,className:a,fallbackIcon:u,selected:i}=t,p=r===void 0?!1:r,m=K(),f=o&&"cursor-pointer hover:bg-muted/50";let d;e[0]!==a||e[1]!==f?(d=A("transition-colors group overflow-hidden flex flex-col h-full",f,a),e[0]=a,e[1]=f,e[2]=d):d=e[2];const I=o?"button":void 0,L=o?0:void 0,T=o&&i!==void 0?i:void 0;let g;e[3]!==o?(g=o?_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),o())}:void 0,e[3]=o,e[4]=g):g=e[4];let x;e[5]!==s.icon||e[6]!==s.title||e[7]!==u?(x=c.jsx(V,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:u}),e[5]=s.icon,e[6]=s.title,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==p?(h=l&&c.jsx("div",{className:A("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:Q,children:l}),e[9]=l,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==h?(v=c.jsx("div",{className:"relative",children:h}),e[12]=h,e[13]=v):v=e[13];let N;e[14]!==v||e[15]!==x?(N=c.jsxs("div",{className:"flex items-start justify-between",children:[x,v]}),e[14]=v,e[15]=x,e[16]=N):N=e[16];let y;e[17]!==s.title?(y=c.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[17]=s.title,e[18]=y):y=e[18];let P;e[19]!==s.description||e[20]!==m?(P=s.description||m("connections.connectionCard.noDescription"),e[19]=s.description,e[20]=m,e[21]=P):P=e[21];let j;e[22]!==P?(j=c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=j):j=e[23];let C;e[24]!==y||e[25]!==j?(C=c.jsxs("div",{className:"flex flex-col gap-1",children:[y,j]}),e[24]=y,e[25]=j,e[26]=C):C=e[26];let b;e[27]!==N||e[28]!==C?(b=c.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,C]}),e[27]=N,e[28]=C,e[29]=b):b=e[29];let k;e[30]!==n?(k=n&&c.jsx("div",{className:"border-t border-border mt-auto",children:c.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:G,children:n})}),e[30]=n,e[31]=k):k=e[31];let w;e[32]!==b||e[33]!==k?(w=c.jsxs("div",{className:"flex flex-col flex-1",children:[b,k]}),e[32]=b,e[33]=k,e[34]=w):w=e[34];let E;return e[35]!==o||e[36]!==w||e[37]!==d||e[38]!==I||e[39]!==L||e[40]!==T||e[41]!==g?(E=c.jsx(q,{className:d,onClick:o,role:I,tabIndex:L,"aria-pressed":T,onKeyDown:g,children:w}),e[35]=o,e[36]=w,e[37]=d,e[38]=I,e[39]=L,e[40]=T,e[41]=g,e[42]=E):E=e[42],E}function G(t){return t.stopPropagation()}function Q(t){return t.stopPropagation()}export{ee as C,Z as g,X as u};
@@ -1 +1 @@
1
- import{an as ve,bO as Oe,bP as Me,ao as de,bN as ze,c as U,b as F,j as t,h as Ne,B,r as Z,l as Se,a0 as te,a6 as Ee,D as me,K as ee,d as se,p as ye,am as Ce,eL as Re,Z as Ue,n as Le,f5 as ue,Y as Fe,I as Ve,F as Be,H as qe,G as xe,E as Ge,f as He,fe as Ke,o as Qe,aq as Xe,ap as We,t as J}from"./index-r5-6H5AW.js";import{g as Ye}from"./extract-connection-data-b5VGTnti.js";import{E as _e}from"./empty-state-DVXonEzp.js";import{E as Je,c as Ze,r as et,b as tt,d as st}from"./connection-form-helpers-Df703i6A.js";import{c as nt,S as it,D as ot}from"./index-BoJi5VZX.js";import{u as we,T as at}from"./use-mcp-auth-status-C65tV0X5.js";import{a as lt}from"./use-members-DxjVAAba.js";import{A as rt}from"./avatar-DtsApuf_.js";import{a as Ie,b as ke,u as ct}from"./use-connection-DQuFsHZm.js";import{u as Te}from"./use-mcp-client-Dcdh62QN.js";import{u as dt}from"./use-mcp-tools-Dvo5yh4L.js";import{a as mt}from"./use-mcp-prompts-C3jCksiZ.js";import{i as ut,a as xt}from"./mcp-oauth-_j9FyBuM.js";import{I as ae}from"./integration-icon-CceXxFa_.js";import{s as pt}from"./Plus-tNGOLWnu.js";import{b5 as ft,ai as ht,L as gt,bj as jt,j as ne,ah as bt}from"./agent-icon-DsMxtuPs.js";import{a as Ae,f as vt,s as Nt}from"./Tool01-O3QS0Upe.js";import{s as re}from"./Trash01-D4CNvDEa.js";import{b as St,a as yt,c as Ct,S as _t,d as wt}from"./sheet-XSyOfLSY.js";import{F as G,b as H,c as K,d as V,f as Q,e as It,a as kt}from"./form-CLIutyXx.js";import{I as W}from"./input-C2g1j_kV.js";import{u as Tt,D as At}from"./use-delete-connection-DoiHfxoZ.js";import{c as Pt,B as Dt,a as $t,C as Ot}from"./monitoring-stats-row-Dobim66v.js";import{b as Mt,c as zt,d as Et}from"./chart-D44VX9BP.js";import{b as Rt}from"./use-virtual-mcp-CkPT-P6s.js";import{T as ie,a as Ut,c as oe,b as Lt}from"./tabs-Boo8T0HI.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{g as ce}from"./types-BJVErkzZ.js";import{M as Ft}from"./mcp-app-renderer-D0hQoGLx.js";import{C as Vt}from"./collection-search-BNy-V_tB.js";import{B as Bt}from"./badge-DIi7Tq2w.js";import{S as pe,b as fe,a as he,d as ge,c as q}from"./select-DTYo-xWa.js";import{i as qt}from"./CheckCircle-BKtapvSB.js";import{t as Gt}from"./ChevronUp-Dn4qDwuF.js";import{a as Ht}from"./UserSquare-aCnYY5vK.js";import{s as Kt}from"./XClose-BBd4kqxu.js";import{p as Qt,i as Xt}from"./connection-CK0XhbAM.js";import"./metadata-D72DunRR.js";import"./sidebar-B7NB-xw1.js";import"./LayoutLeft-BHw5lVXR.js";import"./use-mobile-BYeAeIA8.js";import"./tooltip-DSbyRPdu.js";import"./index-K276FEfg.js";import"./Key01-B66GpQfK.js";import"./auth-B30FL8Dl.js";import"./index-Bjjm7uST.js";import"./index-eoJGIcAq.js";import"./index-Qqe8EVwE.js";import"./index-CRDxekvr.js";import"./popover-nFUkosPX.js";import"./Check-n2s3oQPA.js";import"./SearchMd-SaWfMl2E.js";import"./use-create-virtual-mcp-BV3tbDpf.js";import"./use-navigate-to-agent-BuhJIIwZ.js";import"./hooks-1xw_MZ0J.js";import"./backoff-8mStPHYB.js";import"./task-board-CExmv-E5.js";import"./schema-rAddMSjd.js";import"./thread-intent-DAJ_HNeY.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Eye-CRgbpXwm.js";import"./use-org-auth-client-Dqyt-QDJ.js";import"./User01-DIn8OmU1.js";import"./AlertCircle-DH2lw5dl.js";import"./ArrowUp-BaG4Z2PX.js";import"./ArrowLeft-B1xVCNCj.js";import"./ArrowRight-DTgQrVQL.js";import"./XCircle-D-XpkSz0.js";import"./ZoomOut-CL9Otcbh.js";import"./Globe04-BC-77atS.js";import"./Copy01-TOTRJp0v.js";import"./CreditCard01-DBrRzFpv.js";import"./DotsVertical-D5OZPED4.js";import"./Download01-BcX9OtGe.js";import"./Share07-DUM8HDz5.js";import"./Image01-ciXnDKCW.js";import"./Link01-C-2vKCHa.js";import"./LinkExternal01-D3lqFyPy.js";import"./Monitor01-DE6CWqFd.js";import"./Sun-BkbXJIwK.js";import"./Package-C_VoKlDc.js";import"./Palette-D4fQxVbj.js";import"./SearchLg-D_XECWKC.js";import"./Stars01-eQtDXwcg.js";import"./Upload01-BlLNj5y4.js";import"./Users01-CdvCFvf1.js";import"./X-DbiRP14Q.js";import"./Zap-dyClsvaS.js";import"./label-CjNgDGiH.js";import"./alert-dialog-D21XY4Kh.js";import"./CartesianChart-CWEAR5gD.js";import"./AreaChart-DtVoiRvF.js";import"./ErrorBarContext-DsST4iCp.js";import"./Sector-JPxukctn.js";const Wt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Yt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Wt}];function Jt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=F();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=we(r),m=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,p=n.status!=="active",x=m||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==x?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",x),e[2]=x,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(ae,{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]!==p||e[11]!==m||e[12]!==o?(S=m?t.jsx("span",{className:"text-xs text-destructive font-medium",children:o("details.connectionInstancesPanel.needsAuthorization")}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?o("details.connectionInstancesPanel.disabledError"):o("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=p,e[11]=m,e[12]=o,e[13]=S):S=e[13];let y;e[14]!==j||e[15]!==S?(y=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=y):y=e[16];let C;e[17]!==n||e[18]!==m||e[19]!==a||e[20]!==o?(C=m&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>a(n),children:o("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=m,e[19]=a,e[20]=o,e[21]=C):C=e[21];let _;e[22]!==n||e[23]!==p||e[24]!==l||e[25]!==o?(_=p?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(ft,{size:13}),o("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:o("details.connectionInstancesPanel.disable"),"aria-label":o("details.connectionInstancesPanel.disable"),children:t.jsx(ht,{size:13})}),e[22]=n,e[23]=p,e[24]=l,e[25]=o,e[26]=_):_=e[26];let $;e[27]!==n||e[28]!==c?($=()=>c(n),e[27]=n,e[28]=c,e[29]=$):$=e[29];let w;e[30]!==o?(w=o("details.connectionInstancesPanel.configure"),e[30]=o,e[31]=w):w=e[31];let M;e[32]!==o?(M=o("details.connectionInstancesPanel.configure"),e[32]=o,e[33]=M):M=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Ae,{size:13}),e[34]=A):A=e[34];let O;e[35]!==$||e[36]!==w||e[37]!==M?(O=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:w,"aria-label":M,children:A}),e[35]=$,e[36]=w,e[37]=M,e[38]=O):O=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 v;e[42]!==o?(v=o("details.connectionInstancesPanel.delete"),e[42]=o,e[43]=v):v=e[43];let b;e[44]!==o?(b=o("details.connectionInstancesPanel.delete"),e[44]=o,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(re,{size:13}),e[46]=E):E=e[46];let z;e[47]!==k||e[48]!==v||e[49]!==b?(z=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:k,title:v,"aria-label":b,children:E}),e[47]=k,e[48]=v,e[49]=b,e[50]=z):z=e[50];let I;e[51]!==O||e[52]!==z||e[53]!==C||e[54]!==_?(I=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[C,_,O,z]}),e[51]=O,e[52]=z,e[53]=C,e[54]=_,e[55]=I):I=e[55];let P;return e[56]!==I||e[57]!==h||e[58]!==g||e[59]!==y?(P=t.jsxs("div",{className:h,children:[g,y,I]}),e[56]=I,e[57]=h,e[58]=g,e[59]=y,e[60]=P):P=e[60],P}function Zt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,a=F();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(ae,{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 l;e[3]!==n.title?(l=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]=l):l=e[4];let o;e[5]!==n||e[6]!==c?(o=()=>c(n),e[5]=n,e[6]=c,e[7]=o):o=e[7];let r;e[8]!==a?(r=a("details.connectionInstancesPanel.configure"),e[8]=a,e[9]=r):r=e[9];let d;e[10]!==a?(d=a("details.connectionInstancesPanel.configure"),e[10]=a,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ae,{size:13}),e[12]=u):u=e[12];let m;e[13]!==o||e[14]!==r||e[15]!==d?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:o,title:r,"aria-label":d,children:u})}),e[13]=o,e[14]=r,e[15]=d,e[16]=m):m=e[16];let p;return e[17]!==i||e[18]!==l||e[19]!==m?(p=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,m]}),e[17]=i,e[18]=l,e[19]=m,e[20]=p):p=e[20],p}function es(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,d=F();if(n.length===0)return null;let u;e[0]!==n.length||e[1]!==d?(u=n.length===1?d("details.connectionInstancesPanel.instance"):d("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=d,e[2]=u):u=e[2];let m;e[3]!==u?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(pt,{size:13}),e[5]=r,e[6]=p):p=e[6];let x;e[7]!==d?(x=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=x):x=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==p||e[12]!==x?(h=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:o,disabled:r,children:[p,x]}),e[9]=r,e[10]=o,e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;e[14]!==m||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[m,h]}),e[14]=m,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==a||e[19]!==c||e[20]!==i||e[21]!==l){let C;e[23]!==a||e[24]!==c||e[25]!==i||e[26]!==l?(C=_=>t.jsx(Z.Suspense,{fallback:t.jsx(Zt,{instance:_,onConfigure:c}),children:t.jsx(Jt,{instance:_,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l})},_.id),e[23]=a,e[24]=c,e[25]=i,e[26]=l,e[27]=C):C=e[27],j=n.map(C),e[17]=n,e[18]=a,e[19]=c,e[20]=i,e[21]=l,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 y;return e[30]!==g||e[31]!==S?(y=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=y):y=e[32],y}function ts(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const a=(c.errorMessage??"").trim()||"Unknown error";n.set(a,(n.get(a)??0)+1)}return[...n.entries()].map(([c,a])=>({message:c,count:a})).sort((c,a)=>a.count-c.count).slice(0,e)}const ss=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ns(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 is={calls:{label:"Tool calls"},errors:{label:"Errors"}};function os(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=F(),l=Ee(),o=ns(a),{data:r}=me({queryKey:ee.connectionActivity(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=Pt(r?.logs??[],o,void 0,r?.total,d?.total),m=u.data,p=u.totalCalls>0,x=ts(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.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:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),p?t.jsxs("div",{children:[t.jsx(Mt,{config:is,className:"h-16 w-full",children:t.jsxs(Dt,{data:m,barCategoryGap:"4%",children:[t.jsx(zt,{content:t.jsx(Et,{labelFormatter:rs}),cursor:{fill:"var(--muted)"}}),t.jsx($t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:m.map(ls)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[m.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")})}),x.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:x.map(as)})]})]})}function as(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 ls(s,e){return t.jsx(Ot,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function rs(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function cs(){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 ds(s){const e=U.c(22),{connectionId:n}=s,c=F(),[a,i]=Z.useState("14d"),{org:l}=te();let o;e[0]!==c?(o=c("details.connectionActivity.activity"),e[0]=c,e[1]=o):o=e[1];let r;e[2]!==o?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o})}),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==c?(d=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==a?(u=ss.map(j=>t.jsx("button",{type:"button","aria-pressed":a===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium classic:rounded-md compact:rounded-lg transition-colors",a===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=a,e[7]=u):u=e[7];let m;e[8]!==d||e[9]!==u?(m=t.jsx("div",{role:"group","aria-label":d,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[8]=d,e[9]=u,e[10]=m):m=e[10];let p;e[11]!==r||e[12]!==m?(p=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,m]}),e[11]=r,e[12]=m,e[13]=p):p=e[13];let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(cs,{}),e[14]=x):x=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==a?(h=t.jsx(Z.Suspense,{fallback:x,children:t.jsx(os,{connectionId:n,orgId:l.id,timeframe:a})}),e[15]=n,e[16]=l.id,e[17]=a,e[18]=h):h=e[18];let g;return e[19]!==p||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,h]}),e[19]=p,e[20]=h,e[21]=g):g=e[21],g}function ms(s){const e=U.c(15),{virtualMcp:n,org:c}=s,a=se();let i;e[0]!==a||e[1]!==c||e[2]!==n.id?(i=()=>{const m=crypto.randomUUID();a({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:m}})},e[0]=a,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ye,{size:16}),e[4]=l):l=e[4];let o;e[5]!==n.icon||e[6]!==n.title?(o=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=o):o=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=d):d=e[10];let u;return e[11]!==i||e[12]!==o||e[13]!==r?(u=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:[o,r,d]}),e[11]=i,e[12]=o,e[13]=r,e[14]=u):u=e[14],u}function us(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let a;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=o=>t.jsx(ms,{virtualMcp:o,org:c},o.id),e[3]=c,e[4]=l):l=e[4],a=n.map(l),e[0]=c,e[1]=n,e[2]=a}else a=e[2];let i;return e[5]!==a?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:a})}),e[5]=a,e[6]=i):i=e[6],i}function xs(s){const e=U.c(13),{connection:n}=s,c=F(),{org:a}=te();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 l=Rt(i);if(!(l.length>0)){let p;return e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(t.Fragment,{}),e[2]=p):p=e[2],p}let r;e[3]!==c?(r=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=r):r=e[4];let d;e[5]!==r?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==a.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(us,{virtualMcps:l,org:a.slug})}),e[7]=a.slug,e[8]=l,e[9]=u):u=e[9];let m;return e[10]!==d||e[11]!==u?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=m):m=e[12],m}function ps(s){const e=U.c(35),{tools:n,connectionId:c,org:a}=s,i=F(),l=se(),{org:o}=te();let r;e[0]!==c||e[1]!==o.id||e[2]!==o.slug?(r={connectionId:c,orgId:o.id,orgSlug:o.slug},e[0]=c,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const d=Te(r),u=Ie(c);let m;e[4]!==u||e[5]!==c?(m=u?Pe(u):c,e[4]=u,e[5]=c,e[6]=m):m=e[6];const p=m,[x,h]=Z.useState("");let g,j,S,y;if(e[7]!==p||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==x||e[12]!==i||e[13]!==n){const $=(n??[]).filter(fs),w=x.toLowerCase().trim(),M=w?$.filter(b=>b.name.toLowerCase().includes(w)||b.description&&b.description.toLowerCase().includes(w)):$;let A;e[18]!==p||e[19]!==l||e[20]!==a?(A=b=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=p,e[19]=l,e[20]=a,e[21]=A):A=e[21];const O=A;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 v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=v):v=e[24],e[25]!==x||e[26]!==k?(y=t.jsx(Vt,{value:x,onChange:h,placeholder:k,onKeyDown:v}),e[25]=x,e[26]=k,e[27]=y):y=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(_e,{image:null,title:i(x?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(x?"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=ce(b._meta);return t.jsxs(Re,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>O(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ft,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:d})}),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(at,{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]=p,e[8]=d,e[9]=l,e[10]=a,e[11]=x,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=y}else g=e[14],j=e[15],S=e[16],y=e[17];let C;e[28]!==g||e[29]!==j?(C=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=C):C=e[30];let _;return e[31]!==S||e[32]!==y||e[33]!==C?(_=t.jsxs("div",{className:S,children:[y,C]}),e[31]=S,e[32]=y,e[33]=C,e[34]=_):_=e[34],_}function fs(s){return!!ce(s._meta)}const je=[];function De(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),a=e.map(n),i=e[e.length-1];return a.length>=2&&i&&c.has(i)?[a.pop(),...a].join(" "):a.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=F();let a;e[0]!==n||e[1]!==c?(a=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=a):a=e[2];let i;return e[3]!==a?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:a})}),e[3]=a,e[4]=i):i=e[4],i}function hs(s){const e=U.c(68),{tools:n,prompts:c,resources:a,connectionId:i,org:l}=s,o=c===void 0?je:c,r=a===void 0?je:a,d=F(),u=se(),m=Ie(i??"");let p;e[0]!==m||e[1]!==i?(p=m?Pe(m):i,e[0]=m,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==x||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(T){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:x,collectionName:"tools",itemId:encodeURIComponent(T)}})},e[3]=x,e[4]=i,e[5]=u,e[6]=l,e[7]=h):h=e[7];const g=h;let j;e[8]!==i||e[9]!==l||e[10]!==n?(j=i&&l&&n.some(bs),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const S=j;if(n.length+o.length+r.length===0){let N;e[12]!==d?(N=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=N):N=e[13];let T;e[14]!==N?(T=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:N}),e[14]=N,e[15]=T):T=e[15];let D;e[16]!==d?(D=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=D):D=e[17];let L;e[18]!==D?(L=t.jsx("p",{className:"text-sm text-muted-foreground",children:D}),e[18]=D,e[19]=L):L=e[19];let X;return e[20]!==T||e[21]!==L?(X=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[T,L]}),e[20]=T,e[21]=L,e[22]=X):X=e[22],X}let C;e[23]!==d||e[24]!==n.length?(C=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=C):C=e[25];let _;e[26]!==C?(_=t.jsx(ie,{value:"tools",variant:"underline",children:C}),e[26]=C,e[27]=_):_=e[27];let $;e[28]!==S||e[29]!==d?($=S&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=S,e[29]=d,e[30]=$):$=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let M;e[33]!==w?(M=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=M):M=e[34];let A;e[35]!==d?(A=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=A):A=e[36];let O;e[37]!==A?(O=t.jsx(ie,{value:"resources",variant:"underline",children:A}),e[37]=A,e[38]=O):O=e[38];let k;e[39]!==M||e[40]!==O||e[41]!==_||e[42]!==$?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Ut,{variant:"underline",className:"gap-1",children:[_,$,M,O]})}),e[39]=M,e[40]=O,e[41]=_,e[42]=$,e[43]=k):k=e[43];let v;e[44]!==g||e[45]!==n?(v=n.length>0?n.map(N=>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:()=>g(N.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(vt,{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:De(N.name)}),N.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:N.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},N.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=v):v=e[46];let b;e[47]!==v?(b=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:v})}),e[47]=v,e[48]=b):b=e[48];let E;e[49]!==i||e[50]!==S||e[51]!==l||e[52]!==n?(E=S&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ps,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=S,e[51]=l,e[52]=n,e[53]=E):E=e[53];let z;e[54]!==o?(z=o.length>0?o.map(js):t.jsx(le,{label:"prompts"}),e[54]=o,e[55]=z):z=e[55];let I;e[56]!==z?(I=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[56]=z,e[57]=I):I=e[57];let P;e[58]!==r?(P=r.length>0?r.map(gs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=P):P=e[59];let R;e[60]!==P?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:P})}),e[60]=P,e[61]=R):R=e[61];let f;return e[62]!==k||e[63]!==b||e[64]!==E||e[65]!==I||e[66]!==R?(f=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Lt,{defaultValue:"tools",variant:"underline",children:[k,b,E,I,R]})}),e[62]=k,e[63]=b,e[64]=E,e[65]=I,e[66]=R,e[67]=f):f=e[67],f}function gs(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(jt,{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 js(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(gt,{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:De(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 bs(s){return ce(s._meta)}function vs(s){const e=U.c(15),{connection:n,displayTitle:c}=s,a=Ue(),i=c??n.title,l=a?"md":"xl";let o;e[0]!==n.icon||e[1]!==l||e[2]!==i?(o=t.jsx(ae,{icon:n.icon,name:i,size:l,className:"shrink-0"}),e[0]=n.icon,e[1]=l,e[2]=i,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==i?(r=a?t.jsx(Le.Title,{children:i}):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:i})}),e[4]=a,e[5]=i,e[6]=r):r=e[6];let d;e[7]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[7]=n.description,e[8]=d):d=e[8];let u;e[9]!==r||e[10]!==d?(u=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,d]}),e[9]=r,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==o||e[13]!==u?(m=t.jsxs("div",{className:"flex items-center classic:gap-4 classic:md:gap-6 classic:py-5 classic:md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0 compact:gap-3 compact:py-4",children:[o,u]}),e[12]=o,e[13]=u,e[14]=m):m=e[14],m}function Ns({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=F(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Fe(),d=(()=>{if(typeof o!="string"||!o)return!1;try{const x=new URL(o);return x.hostname==="api.githubcopilot.com"&&x.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",m=e.connection_type==="VIRTUAL",p=m?Qt(e.connection_url):null;return m?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(ye,{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")})]}),p&&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:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(G,{control:s.control,name:"ui_type",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(V,{children:t.jsxs(fe,{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(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(G,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(W,{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(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(V,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(bt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ht,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(Q,{})]})}),l==="NPX"&&t.jsx(G,{control:s.control,name:"npx_package",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(G,{control:s.control,name:"stdio_command",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),t.jsx(G,{control:s.control,name:"stdio_args",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(Q,{})]})})]}),t.jsx(G,{control:s.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(G,{control:s.control,name:"env_vars",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(V,{children:t.jsx(Je,{value:x.value??[],onChange:x.onChange})}),t.jsx(Q,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(G,{control:s.control,name:"connection_token",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i(d?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Ve,{children:[t.jsx(Be,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Bt,{variant:"success",className:"gap-1.5",children:[t.jsx(qt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Gt,{size:12})]})})}),t.jsxs(qe,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(Nt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:a,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&x.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:()=>x.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 classic:rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity compact:rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Kt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(W,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),d&&t.jsxs(It,{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(Q,{})]})})]})}function Ss(s){return s.command==="npx"}function ys(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Cs(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"&&Xt(s.connection_headers)){const c=s.connection_headers,a=et(c.envVars);if(Ss(c)){const l=ys(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:a}}const i=Cs(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:a}}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 _s(s){let e,n=null,c=null,a=null;return s.ui_type==="NPX"?(e="STDIO",n="",a=tt(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",a=st(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},...a&&{connection_headers:a},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ws({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=F(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Qe(),m=ke(),{org:p}=te(),x=Tt({onSuccess:()=>{o.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),y=we({connectionId:e}),{data:C}=lt(),_=C?.data?.members??[],$=h??s,w=_.find(f=>f.userId===$.created_by),A=s?.connection_type==="VIRTUAL"||y.isAuthenticated,O={...s,tools:a},k=nt(O,Yt),v=Xe({resolver:We(Ze),values:be(h??s)}),b=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const N=v.getValues(),T=_s(N),D=h?.id??e;await m.update.mutateAsync({id:D,data:T}),v.reset(N)},z=()=>{v.reset(be(h??s))},I=async f=>{const N=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:T,tokenInfo:D,error:L}=await xt({connectionId:f,orgSlug:p.slug,...N?{scope:N}:{}});if(L||!T){J.error(r("details.connection.authFailed",{error:L??""}));return}if(D)try{const Y=await fetch(`/api/${p.slug}/connections/${f}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!Y.ok)console.error("Failed to save OAuth token:",await Y.text()),await m.update.mutateAsync({id:f,data:{connection_token:T}});else try{await m.update.mutateAsync({id:f,data:{}})}catch($e){console.warn("Failed to refresh connection tools after OAuth:",$e)}}catch(Y){console.error("Error saving OAuth token:",Y),await m.update.mutateAsync({id:f,data:{connection_token:T}})}else await m.update.mutateAsync({id:f,data:{connection_token:T}});const X=new URL(`/api/${p.slug}/mcp/${f}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(X.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),J.success(r("details.connection.authSuccess"))},P=()=>I(s.id),R=async()=>{try{const f=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!f.ok){const T=await f.text();J.error(r("details.connection.failedRemoveOAuth",{error:T}));return}const N=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(N.href,null)}),J.success(r("details.connection.oauthRemoved"))}catch(f){console.error("Error removing OAuth token:",f),J.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(At,{...x}),t.jsx(St,{open:h!==null,onOpenChange:f=>{f||g(null)},children:t.jsxs(yt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(Ct,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(_t,{className:"text-base",children:h?.title??s.title}),t.jsx(wt,{className:"text-xs",children:r("details.connection.settingsDescription")}),w&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(rt,{url:w.user?.image??void 0,fallback:w.user?.name??w.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:w.user?.name||w.user?.email})]})]}),t.jsxs(kt,{...v,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(G,{control:v.control,name:"title",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(V,{children:t.jsx(W,{...f})}),t.jsx(Q,{})]})}),t.jsx(G,{control:v.control,name:"description",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(V,{children:t.jsx(W,{...f,value:f.value||""})}),t.jsx(Q,{})]})})]}),t.jsx(Ns,{form:v,connection:h??s,hasOAuthToken:y.hasOAuthToken,onReauthenticate:P,onRemoveOAuth:R}),t.jsx(it,{connection:h??s,form:v,hasMcpBinding:k,isMCPAuthenticated:A,supportsOAuth:y.supportsOAuth,isServerError:y.isServerError,onAuthenticate:P,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:E,disabled:!b||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(B,{variant:"outline",onClick:z,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const f=h??s;g(null),x.requestDelete(f)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(ot,{hideTopbar:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(vs,{connection:s,displayTitle:(()=>{const f=o[0]??s;return f.app_name?f.title.replace(/\s*\(\d+\)\s*$/,""):f.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(ds,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(es,{instances:o,onConfigure:f=>g(f),onAuthenticate:f=>I(f.id),onDelete:f=>x.requestDelete(f),onToggleStatus:async(f,N)=>{try{await m.update.mutateAsync({id:f.id,data:{status:N}}),J.success(r(N==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const f=o[0]??s,N=f.title.replace(/\s*\(\d+\)\s*$/,""),T=o.length+1,D=`${N} (${T})`,L=Ye("conn");await m.create.mutateAsync({id:L,title:D,description:f.description??null,connection_type:f.connection_type,connection_url:f.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:f.created_by,organization_id:f.organization_id,icon:f.icon??null,app_name:f.app_name??null,app_id:f.app_id??null,connection_headers:f.connection_headers??null,oauth_config:null,configuration_state:f.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const X=new URL(`/api/${p.slug}/mcp/${L}`,window.location.origin),Y=await ut({url:X.href,token:null,orgId:p.id});Y.supportsOAuth&&!Y.isAuthenticated&&await I(L)}finally{S(!1)}}}),t.jsx(xs,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(hs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Is(){const s=U.c(52),e=F();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:i,org:l}=He(a),{org:o}=te(),r=ke();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=ct(d),m=u[0]??null,p=m?.id??"",x=p||null;let h;s[4]!==o.id||s[5]!==o.slug||s[6]!==x?(h={connectionId:x,orgId:o.id,orgSlug:o.slug},s[4]=o.id,s[5]=o.slug,s[6]=x,s[7]=h):h=s[7];const g=Te(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=dt(j);let y;if(s[10]!==m?.tools||s[11]!==p||s[12]!==u||s[13]!==S){const I=S?S.tools.map($s):(m?.tools??[]).map(Ds);e:{if(u.length<=1){y=I;break e}const P=new Set,R=[],f=As;for(const N of u){const T=N.id===p?I:f(N.tools);for(const D of T)P.has(D.name)||(P.add(D.name),R.push(D))}y=R.length>0?R:I}s[10]=m?.tools,s[11]=p,s[12]=u,s[13]=S,s[14]=y}else y=s[14];const C=y;let _;s[15]!==g?(_={client:g},s[15]=g,s[16]=_):_=s[16];const{data:$}=mt(_);let w;s[17]!==g?(w={client:g},s[17]=g,s[18]=w):w=s[18];const{data:M}=Ke(w);let A;s[19]!==$?.prompts?(A=$?.prompts??[],s[19]=$?.prompts,s[20]=A):A=s[20];let O;s[21]!==A?(O=A.map(Ts),s[21]=A,s[22]=O):O=s[22];const k=O;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let b;s[25]!==v?(b=v.map(ks),s[25]=v,s[26]=b):b=s[26];const E=b;if(!m){let I;s[27]!==e?(I=e("details.connection.notFoundTitle"),s[27]=e,s[28]=I):I=s[28];let P;s[29]!==e?(P=e("details.connection.notFoundDescription"),s[29]=e,s[30]=P):P=s[30];let R;s[31]!==c||s[32]!==l?(R=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[31]=c,s[32]=l,s[33]=R):R=s[33];let f;s[34]!==e?(f=e("details.connection.backButton"),s[34]=e,s[35]=f):f=s[35];let N;s[36]!==R||s[37]!==f?(N=t.jsx(B,{variant:"outline",onClick:R,children:f}),s[36]=R,s[37]=f,s[38]=N):N=s[38];let T;return s[39]!==I||s[40]!==P||s[41]!==N?(T=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(_e,{title:I,description:P,actions:N})}),s[39]=I,s[40]=P,s[41]=N,s[42]=T):T=s[42],T}let z;return s[43]!==r.update.isPending||s[44]!==C||s[45]!==m||s[46]!==p||s[47]!==l||s[48]!==k||s[49]!==E||s[50]!==u?(z=t.jsx(ws,{org:l,connection:m,connectionId:p,isUpdating:r.update.isPending,tools:C,prompts:k,resources:E,siblings:u}),s[43]=r.update.isPending,s[44]=C,s[45]=m,s[46]=p,s[47]=l,s[48]=k,s[49]=E,s[50]=u,s[51]=z):z=s[51],z}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Ts(s){return{name:s.name,description:s.description}}function As(s){return(s??[]).map(Ps)}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Os(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ge,{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(Is,{})})}),s[0]=e):e=s[0],e}function yi(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Os,{}),s[0]=e):e=s[0],e}export{yi as default};
1
+ import{an as ve,bO as Oe,bP as Me,ao as de,bN as ze,c as U,b as F,j as t,h as Ne,B,r as Z,l as Se,a0 as te,a6 as Ee,D as me,K as ee,d as se,p as ye,am as Ce,eL as Re,Z as Ue,n as Le,f5 as ue,Y as Fe,I as Ve,F as Be,H as qe,G as xe,E as Ge,f as He,fe as Ke,o as Qe,aq as Xe,ap as We,t as J}from"./index-CFyHGgGO.js";import{g as Ye}from"./extract-connection-data-BZ3x_jRc.js";import{E as _e}from"./empty-state-B7gXx_Yh.js";import{E as Je,c as Ze,r as et,b as tt,d as st}from"./connection-form-helpers-DZC7DBzw.js";import{c as nt,S as it,D as ot}from"./index-Dbhl3fMQ.js";import{u as we,T as at}from"./use-mcp-auth-status-DQ1IMcVT.js";import{a as lt}from"./use-members-DXD-dNoi.js";import{A as rt}from"./avatar-DvLLRJ7_.js";import{a as Ie,b as ke,u as ct}from"./use-connection-By40b12N.js";import{u as Te}from"./use-mcp-client-Cgrjx403.js";import{u as dt}from"./use-mcp-tools-CbiwxQvl.js";import{a as mt}from"./use-mcp-prompts-PD_QSplo.js";import{i as ut,a as xt}from"./mcp-oauth-wOINJv40.js";import{I as ae}from"./integration-icon-DRK9pjva.js";import{s as pt}from"./Plus-DxM0fEC4.js";import{b4 as ft,ai as ht,L as gt,bi as jt,j as ne,ah as bt}from"./agent-icon-CP0I3VVA.js";import{a as Ae,f as vt,s as Nt}from"./Tool01-DUJdCnDK.js";import{s as re}from"./Trash01-B-_Oqcf7.js";import{b as St,a as yt,c as Ct,S as _t,d as wt}from"./sheet-Dq_EWs2W.js";import{F as G,b as H,c as K,d as V,f as Q,e as It,a as kt}from"./form-CNnZbB2s.js";import{I as W}from"./input-BXe2-JP2.js";import{u as Tt,D as At}from"./use-delete-connection-huvoW3MI.js";import{c as Pt,B as Dt,a as $t,C as Ot}from"./monitoring-stats-row-D7CBnFwq.js";import{b as Mt,c as zt,d as Et}from"./chart-XotQAjm8.js";import{b as Rt}from"./use-virtual-mcp-DbjQS13M.js";import{T as ie,a as Ut,c as oe,b as Lt}from"./tabs-CQkW3bOH.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{g as ce}from"./types-D4W-t3kf.js";import{M as Ft}from"./mcp-app-renderer-hpUMUqH2.js";import{C as Vt}from"./collection-search-CKFQt3zo.js";import{B as Bt}from"./badge-jSVR8IKO.js";import{S as pe,b as fe,a as he,d as ge,c as q}from"./select-rL7p93dx.js";import{i as qt}from"./CheckCircle-5QB6sfVV.js";import{t as Gt}from"./ChevronUp-BuAMP7GQ.js";import{a as Ht}from"./UserSquare-CsgvAwaQ.js";import{s as Kt}from"./XClose-Ca9S5aZc.js";import{p as Qt,i as Xt}from"./connection-DdQElG6t.js";import"./metadata-D72DunRR.js";import"./sidebar-D43DhIwE.js";import"./LayoutLeft-BIWXERKW.js";import"./use-mobile-B90d5ZlF.js";import"./tooltip-DRlnzIQm.js";import"./index-Dv6121Hz.js";import"./Key01-CTlB38YG.js";import"./auth-fkwwQuGR.js";import"./index-Dk3gb-bB.js";import"./index-DVjR6OZ0.js";import"./index-CeM0-Jf1.js";import"./index-CJazvqGq.js";import"./popover-DcrAVb5K.js";import"./Check-Chl3DDqT.js";import"./SearchMd-tkECPV7l.js";import"./use-create-virtual-mcp-D0AahD2t.js";import"./use-navigate-to-agent-CUne0-cI.js";import"./hooks-DEf7SAIB.js";import"./backoff-8mStPHYB.js";import"./task-board-BjqJ_zE6.js";import"./schema-GryfzY0i.js";import"./thread-intent-XcHSP8zW.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Eye-BGOdKOA7.js";import"./use-org-auth-client-PQEXc1yD.js";import"./User01-DwcV_kyF.js";import"./AlertCircle-Cwl0Vup2.js";import"./ArrowUp-rfVFZ40K.js";import"./ArrowLeft-BS1ddrpm.js";import"./ArrowRight-CCNkzW9Y.js";import"./XCircle-BBqXvE8C.js";import"./ZoomOut-DnIqLBGF.js";import"./Globe04-BkqSUJiA.js";import"./Copy01-BwsqBYnE.js";import"./CreditCard01-BPHmR5OY.js";import"./DotsVertical-Bv4-YScE.js";import"./Download01-DyVswBhh.js";import"./Share07-fkd7xmY6.js";import"./Image01-DXUl1blo.js";import"./Link01-7UJLIg0N.js";import"./LinkExternal01-DsBKvM3k.js";import"./Monitor01-D3pXjo5b.js";import"./Sun-CTx2w4hs.js";import"./Package-ImRUZcy3.js";import"./Palette-B0nQwQuz.js";import"./SearchLg-DCjPeF5h.js";import"./Stars01-BoztdLAd.js";import"./Upload01-alz3omvs.js";import"./Users01-DAeXmo2u.js";import"./X-BEAR-IcH.js";import"./Zap-thqSL15H.js";import"./label-BKtkcOfE.js";import"./alert-dialog-BCnbMjLm.js";import"./CartesianChart-CDsQOuRz.js";import"./AreaChart-B4QXNZyj.js";import"./ErrorBarContext-L3hqxsjo.js";import"./Sector-BqmE_gpQ.js";const Wt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Yt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Wt}];function Jt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=F();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=we(r),m=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,p=n.status!=="active",x=m||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==x?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",x),e[2]=x,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(ae,{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]!==p||e[11]!==m||e[12]!==o?(S=m?t.jsx("span",{className:"text-xs text-destructive font-medium",children:o("details.connectionInstancesPanel.needsAuthorization")}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?o("details.connectionInstancesPanel.disabledError"):o("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=p,e[11]=m,e[12]=o,e[13]=S):S=e[13];let y;e[14]!==j||e[15]!==S?(y=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=y):y=e[16];let C;e[17]!==n||e[18]!==m||e[19]!==a||e[20]!==o?(C=m&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>a(n),children:o("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=m,e[19]=a,e[20]=o,e[21]=C):C=e[21];let _;e[22]!==n||e[23]!==p||e[24]!==l||e[25]!==o?(_=p?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(ft,{size:13}),o("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:o("details.connectionInstancesPanel.disable"),"aria-label":o("details.connectionInstancesPanel.disable"),children:t.jsx(ht,{size:13})}),e[22]=n,e[23]=p,e[24]=l,e[25]=o,e[26]=_):_=e[26];let $;e[27]!==n||e[28]!==c?($=()=>c(n),e[27]=n,e[28]=c,e[29]=$):$=e[29];let w;e[30]!==o?(w=o("details.connectionInstancesPanel.configure"),e[30]=o,e[31]=w):w=e[31];let M;e[32]!==o?(M=o("details.connectionInstancesPanel.configure"),e[32]=o,e[33]=M):M=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Ae,{size:13}),e[34]=A):A=e[34];let O;e[35]!==$||e[36]!==w||e[37]!==M?(O=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:w,"aria-label":M,children:A}),e[35]=$,e[36]=w,e[37]=M,e[38]=O):O=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 v;e[42]!==o?(v=o("details.connectionInstancesPanel.delete"),e[42]=o,e[43]=v):v=e[43];let b;e[44]!==o?(b=o("details.connectionInstancesPanel.delete"),e[44]=o,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(re,{size:13}),e[46]=E):E=e[46];let z;e[47]!==k||e[48]!==v||e[49]!==b?(z=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:k,title:v,"aria-label":b,children:E}),e[47]=k,e[48]=v,e[49]=b,e[50]=z):z=e[50];let I;e[51]!==O||e[52]!==z||e[53]!==C||e[54]!==_?(I=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[C,_,O,z]}),e[51]=O,e[52]=z,e[53]=C,e[54]=_,e[55]=I):I=e[55];let P;return e[56]!==I||e[57]!==h||e[58]!==g||e[59]!==y?(P=t.jsxs("div",{className:h,children:[g,y,I]}),e[56]=I,e[57]=h,e[58]=g,e[59]=y,e[60]=P):P=e[60],P}function Zt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,a=F();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(ae,{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 l;e[3]!==n.title?(l=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]=l):l=e[4];let o;e[5]!==n||e[6]!==c?(o=()=>c(n),e[5]=n,e[6]=c,e[7]=o):o=e[7];let r;e[8]!==a?(r=a("details.connectionInstancesPanel.configure"),e[8]=a,e[9]=r):r=e[9];let d;e[10]!==a?(d=a("details.connectionInstancesPanel.configure"),e[10]=a,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ae,{size:13}),e[12]=u):u=e[12];let m;e[13]!==o||e[14]!==r||e[15]!==d?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:o,title:r,"aria-label":d,children:u})}),e[13]=o,e[14]=r,e[15]=d,e[16]=m):m=e[16];let p;return e[17]!==i||e[18]!==l||e[19]!==m?(p=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,m]}),e[17]=i,e[18]=l,e[19]=m,e[20]=p):p=e[20],p}function es(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,d=F();if(n.length===0)return null;let u;e[0]!==n.length||e[1]!==d?(u=n.length===1?d("details.connectionInstancesPanel.instance"):d("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=d,e[2]=u):u=e[2];let m;e[3]!==u?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(pt,{size:13}),e[5]=r,e[6]=p):p=e[6];let x;e[7]!==d?(x=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=x):x=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==p||e[12]!==x?(h=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:o,disabled:r,children:[p,x]}),e[9]=r,e[10]=o,e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;e[14]!==m||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[m,h]}),e[14]=m,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==a||e[19]!==c||e[20]!==i||e[21]!==l){let C;e[23]!==a||e[24]!==c||e[25]!==i||e[26]!==l?(C=_=>t.jsx(Z.Suspense,{fallback:t.jsx(Zt,{instance:_,onConfigure:c}),children:t.jsx(Jt,{instance:_,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l})},_.id),e[23]=a,e[24]=c,e[25]=i,e[26]=l,e[27]=C):C=e[27],j=n.map(C),e[17]=n,e[18]=a,e[19]=c,e[20]=i,e[21]=l,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 y;return e[30]!==g||e[31]!==S?(y=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=y):y=e[32],y}function ts(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const a=(c.errorMessage??"").trim()||"Unknown error";n.set(a,(n.get(a)??0)+1)}return[...n.entries()].map(([c,a])=>({message:c,count:a})).sort((c,a)=>a.count-c.count).slice(0,e)}const ss=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ns(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 is={calls:{label:"Tool calls"},errors:{label:"Errors"}};function os(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=F(),l=Ee(),o=ns(a),{data:r}=me({queryKey:ee.connectionActivity(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=Pt(r?.logs??[],o,void 0,r?.total,d?.total),m=u.data,p=u.totalCalls>0,x=ts(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.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:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),p?t.jsxs("div",{children:[t.jsx(Mt,{config:is,className:"h-16 w-full",children:t.jsxs(Dt,{data:m,barCategoryGap:"4%",children:[t.jsx(zt,{content:t.jsx(Et,{labelFormatter:rs}),cursor:{fill:"var(--muted)"}}),t.jsx($t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:m.map(ls)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[m.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")})}),x.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:x.map(as)})]})]})}function as(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 ls(s,e){return t.jsx(Ot,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function rs(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function cs(){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 ds(s){const e=U.c(22),{connectionId:n}=s,c=F(),[a,i]=Z.useState("14d"),{org:l}=te();let o;e[0]!==c?(o=c("details.connectionActivity.activity"),e[0]=c,e[1]=o):o=e[1];let r;e[2]!==o?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o})}),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==c?(d=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==a?(u=ss.map(j=>t.jsx("button",{type:"button","aria-pressed":a===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium classic:rounded-md compact:rounded-lg transition-colors",a===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=a,e[7]=u):u=e[7];let m;e[8]!==d||e[9]!==u?(m=t.jsx("div",{role:"group","aria-label":d,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[8]=d,e[9]=u,e[10]=m):m=e[10];let p;e[11]!==r||e[12]!==m?(p=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,m]}),e[11]=r,e[12]=m,e[13]=p):p=e[13];let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(cs,{}),e[14]=x):x=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==a?(h=t.jsx(Z.Suspense,{fallback:x,children:t.jsx(os,{connectionId:n,orgId:l.id,timeframe:a})}),e[15]=n,e[16]=l.id,e[17]=a,e[18]=h):h=e[18];let g;return e[19]!==p||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,h]}),e[19]=p,e[20]=h,e[21]=g):g=e[21],g}function ms(s){const e=U.c(15),{virtualMcp:n,org:c}=s,a=se();let i;e[0]!==a||e[1]!==c||e[2]!==n.id?(i=()=>{const m=crypto.randomUUID();a({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:m}})},e[0]=a,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ye,{size:16}),e[4]=l):l=e[4];let o;e[5]!==n.icon||e[6]!==n.title?(o=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=o):o=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=d):d=e[10];let u;return e[11]!==i||e[12]!==o||e[13]!==r?(u=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:[o,r,d]}),e[11]=i,e[12]=o,e[13]=r,e[14]=u):u=e[14],u}function us(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let a;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=o=>t.jsx(ms,{virtualMcp:o,org:c},o.id),e[3]=c,e[4]=l):l=e[4],a=n.map(l),e[0]=c,e[1]=n,e[2]=a}else a=e[2];let i;return e[5]!==a?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:a})}),e[5]=a,e[6]=i):i=e[6],i}function xs(s){const e=U.c(13),{connection:n}=s,c=F(),{org:a}=te();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 l=Rt(i);if(!(l.length>0)){let p;return e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(t.Fragment,{}),e[2]=p):p=e[2],p}let r;e[3]!==c?(r=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=r):r=e[4];let d;e[5]!==r?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==a.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(us,{virtualMcps:l,org:a.slug})}),e[7]=a.slug,e[8]=l,e[9]=u):u=e[9];let m;return e[10]!==d||e[11]!==u?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=m):m=e[12],m}function ps(s){const e=U.c(35),{tools:n,connectionId:c,org:a}=s,i=F(),l=se(),{org:o}=te();let r;e[0]!==c||e[1]!==o.id||e[2]!==o.slug?(r={connectionId:c,orgId:o.id,orgSlug:o.slug},e[0]=c,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const d=Te(r),u=Ie(c);let m;e[4]!==u||e[5]!==c?(m=u?Pe(u):c,e[4]=u,e[5]=c,e[6]=m):m=e[6];const p=m,[x,h]=Z.useState("");let g,j,S,y;if(e[7]!==p||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==x||e[12]!==i||e[13]!==n){const $=(n??[]).filter(fs),w=x.toLowerCase().trim(),M=w?$.filter(b=>b.name.toLowerCase().includes(w)||b.description&&b.description.toLowerCase().includes(w)):$;let A;e[18]!==p||e[19]!==l||e[20]!==a?(A=b=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=p,e[19]=l,e[20]=a,e[21]=A):A=e[21];const O=A;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 v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=v):v=e[24],e[25]!==x||e[26]!==k?(y=t.jsx(Vt,{value:x,onChange:h,placeholder:k,onKeyDown:v}),e[25]=x,e[26]=k,e[27]=y):y=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(_e,{image:null,title:i(x?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(x?"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=ce(b._meta);return t.jsxs(Re,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>O(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ft,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:d})}),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(at,{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]=p,e[8]=d,e[9]=l,e[10]=a,e[11]=x,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=y}else g=e[14],j=e[15],S=e[16],y=e[17];let C;e[28]!==g||e[29]!==j?(C=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=C):C=e[30];let _;return e[31]!==S||e[32]!==y||e[33]!==C?(_=t.jsxs("div",{className:S,children:[y,C]}),e[31]=S,e[32]=y,e[33]=C,e[34]=_):_=e[34],_}function fs(s){return!!ce(s._meta)}const je=[];function De(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),a=e.map(n),i=e[e.length-1];return a.length>=2&&i&&c.has(i)?[a.pop(),...a].join(" "):a.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=F();let a;e[0]!==n||e[1]!==c?(a=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=a):a=e[2];let i;return e[3]!==a?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:a})}),e[3]=a,e[4]=i):i=e[4],i}function hs(s){const e=U.c(68),{tools:n,prompts:c,resources:a,connectionId:i,org:l}=s,o=c===void 0?je:c,r=a===void 0?je:a,d=F(),u=se(),m=Ie(i??"");let p;e[0]!==m||e[1]!==i?(p=m?Pe(m):i,e[0]=m,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==x||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(T){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:x,collectionName:"tools",itemId:encodeURIComponent(T)}})},e[3]=x,e[4]=i,e[5]=u,e[6]=l,e[7]=h):h=e[7];const g=h;let j;e[8]!==i||e[9]!==l||e[10]!==n?(j=i&&l&&n.some(bs),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const S=j;if(n.length+o.length+r.length===0){let N;e[12]!==d?(N=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=N):N=e[13];let T;e[14]!==N?(T=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:N}),e[14]=N,e[15]=T):T=e[15];let D;e[16]!==d?(D=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=D):D=e[17];let L;e[18]!==D?(L=t.jsx("p",{className:"text-sm text-muted-foreground",children:D}),e[18]=D,e[19]=L):L=e[19];let X;return e[20]!==T||e[21]!==L?(X=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[T,L]}),e[20]=T,e[21]=L,e[22]=X):X=e[22],X}let C;e[23]!==d||e[24]!==n.length?(C=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=C):C=e[25];let _;e[26]!==C?(_=t.jsx(ie,{value:"tools",variant:"underline",children:C}),e[26]=C,e[27]=_):_=e[27];let $;e[28]!==S||e[29]!==d?($=S&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=S,e[29]=d,e[30]=$):$=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let M;e[33]!==w?(M=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=M):M=e[34];let A;e[35]!==d?(A=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=A):A=e[36];let O;e[37]!==A?(O=t.jsx(ie,{value:"resources",variant:"underline",children:A}),e[37]=A,e[38]=O):O=e[38];let k;e[39]!==M||e[40]!==O||e[41]!==_||e[42]!==$?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Ut,{variant:"underline",className:"gap-1",children:[_,$,M,O]})}),e[39]=M,e[40]=O,e[41]=_,e[42]=$,e[43]=k):k=e[43];let v;e[44]!==g||e[45]!==n?(v=n.length>0?n.map(N=>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:()=>g(N.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(vt,{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:De(N.name)}),N.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:N.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},N.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=v):v=e[46];let b;e[47]!==v?(b=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:v})}),e[47]=v,e[48]=b):b=e[48];let E;e[49]!==i||e[50]!==S||e[51]!==l||e[52]!==n?(E=S&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ps,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=S,e[51]=l,e[52]=n,e[53]=E):E=e[53];let z;e[54]!==o?(z=o.length>0?o.map(js):t.jsx(le,{label:"prompts"}),e[54]=o,e[55]=z):z=e[55];let I;e[56]!==z?(I=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[56]=z,e[57]=I):I=e[57];let P;e[58]!==r?(P=r.length>0?r.map(gs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=P):P=e[59];let R;e[60]!==P?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:P})}),e[60]=P,e[61]=R):R=e[61];let f;return e[62]!==k||e[63]!==b||e[64]!==E||e[65]!==I||e[66]!==R?(f=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Lt,{defaultValue:"tools",variant:"underline",children:[k,b,E,I,R]})}),e[62]=k,e[63]=b,e[64]=E,e[65]=I,e[66]=R,e[67]=f):f=e[67],f}function gs(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(jt,{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 js(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(gt,{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:De(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 bs(s){return ce(s._meta)}function vs(s){const e=U.c(15),{connection:n,displayTitle:c}=s,a=Ue(),i=c??n.title,l=a?"md":"xl";let o;e[0]!==n.icon||e[1]!==l||e[2]!==i?(o=t.jsx(ae,{icon:n.icon,name:i,size:l,className:"shrink-0"}),e[0]=n.icon,e[1]=l,e[2]=i,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==i?(r=a?t.jsx(Le.Title,{children:i}):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:i})}),e[4]=a,e[5]=i,e[6]=r):r=e[6];let d;e[7]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[7]=n.description,e[8]=d):d=e[8];let u;e[9]!==r||e[10]!==d?(u=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,d]}),e[9]=r,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==o||e[13]!==u?(m=t.jsxs("div",{className:"flex items-center classic:gap-4 classic:md:gap-6 classic:py-5 classic:md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0 compact:gap-3 compact:py-4",children:[o,u]}),e[12]=o,e[13]=u,e[14]=m):m=e[14],m}function Ns({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=F(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Fe(),d=(()=>{if(typeof o!="string"||!o)return!1;try{const x=new URL(o);return x.hostname==="api.githubcopilot.com"&&x.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",m=e.connection_type==="VIRTUAL",p=m?Qt(e.connection_url):null;return m?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(ye,{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")})]}),p&&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:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(G,{control:s.control,name:"ui_type",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(V,{children:t.jsxs(fe,{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(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(G,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(W,{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(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(V,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(bt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ht,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(Q,{})]})}),l==="NPX"&&t.jsx(G,{control:s.control,name:"npx_package",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(G,{control:s.control,name:"stdio_command",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),t.jsx(G,{control:s.control,name:"stdio_args",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(Q,{})]})})]}),t.jsx(G,{control:s.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(G,{control:s.control,name:"env_vars",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(V,{children:t.jsx(Je,{value:x.value??[],onChange:x.onChange})}),t.jsx(Q,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(G,{control:s.control,name:"connection_token",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i(d?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Ve,{children:[t.jsx(Be,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Bt,{variant:"success",className:"gap-1.5",children:[t.jsx(qt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Gt,{size:12})]})})}),t.jsxs(qe,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(Nt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:a,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&x.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:()=>x.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 classic:rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity compact:rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Kt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(W,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),d&&t.jsxs(It,{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(Q,{})]})})]})}function Ss(s){return s.command==="npx"}function ys(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Cs(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"&&Xt(s.connection_headers)){const c=s.connection_headers,a=et(c.envVars);if(Ss(c)){const l=ys(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:a}}const i=Cs(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:a}}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 _s(s){let e,n=null,c=null,a=null;return s.ui_type==="NPX"?(e="STDIO",n="",a=tt(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",a=st(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},...a&&{connection_headers:a},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ws({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=F(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Qe(),m=ke(),{org:p}=te(),x=Tt({onSuccess:()=>{o.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),y=we({connectionId:e}),{data:C}=lt(),_=C?.data?.members??[],$=h??s,w=_.find(f=>f.userId===$.created_by),A=s?.connection_type==="VIRTUAL"||y.isAuthenticated,O={...s,tools:a},k=nt(O,Yt),v=Xe({resolver:We(Ze),values:be(h??s)}),b=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const N=v.getValues(),T=_s(N),D=h?.id??e;await m.update.mutateAsync({id:D,data:T}),v.reset(N)},z=()=>{v.reset(be(h??s))},I=async f=>{const N=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:T,tokenInfo:D,error:L}=await xt({connectionId:f,orgSlug:p.slug,...N?{scope:N}:{}});if(L||!T){J.error(r("details.connection.authFailed",{error:L??""}));return}if(D)try{const Y=await fetch(`/api/${p.slug}/connections/${f}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!Y.ok)console.error("Failed to save OAuth token:",await Y.text()),await m.update.mutateAsync({id:f,data:{connection_token:T}});else try{await m.update.mutateAsync({id:f,data:{}})}catch($e){console.warn("Failed to refresh connection tools after OAuth:",$e)}}catch(Y){console.error("Error saving OAuth token:",Y),await m.update.mutateAsync({id:f,data:{connection_token:T}})}else await m.update.mutateAsync({id:f,data:{connection_token:T}});const X=new URL(`/api/${p.slug}/mcp/${f}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(X.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),J.success(r("details.connection.authSuccess"))},P=()=>I(s.id),R=async()=>{try{const f=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!f.ok){const T=await f.text();J.error(r("details.connection.failedRemoveOAuth",{error:T}));return}const N=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(N.href,null)}),J.success(r("details.connection.oauthRemoved"))}catch(f){console.error("Error removing OAuth token:",f),J.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(At,{...x}),t.jsx(St,{open:h!==null,onOpenChange:f=>{f||g(null)},children:t.jsxs(yt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(Ct,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(_t,{className:"text-base",children:h?.title??s.title}),t.jsx(wt,{className:"text-xs",children:r("details.connection.settingsDescription")}),w&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(rt,{url:w.user?.image??void 0,fallback:w.user?.name??w.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:w.user?.name||w.user?.email})]})]}),t.jsxs(kt,{...v,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(G,{control:v.control,name:"title",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(V,{children:t.jsx(W,{...f})}),t.jsx(Q,{})]})}),t.jsx(G,{control:v.control,name:"description",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(V,{children:t.jsx(W,{...f,value:f.value||""})}),t.jsx(Q,{})]})})]}),t.jsx(Ns,{form:v,connection:h??s,hasOAuthToken:y.hasOAuthToken,onReauthenticate:P,onRemoveOAuth:R}),t.jsx(it,{connection:h??s,form:v,hasMcpBinding:k,isMCPAuthenticated:A,supportsOAuth:y.supportsOAuth,isServerError:y.isServerError,onAuthenticate:P,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:E,disabled:!b||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(B,{variant:"outline",onClick:z,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const f=h??s;g(null),x.requestDelete(f)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(ot,{hideTopbar:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(vs,{connection:s,displayTitle:(()=>{const f=o[0]??s;return f.app_name?f.title.replace(/\s*\(\d+\)\s*$/,""):f.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(ds,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(es,{instances:o,onConfigure:f=>g(f),onAuthenticate:f=>I(f.id),onDelete:f=>x.requestDelete(f),onToggleStatus:async(f,N)=>{try{await m.update.mutateAsync({id:f.id,data:{status:N}}),J.success(r(N==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const f=o[0]??s,N=f.title.replace(/\s*\(\d+\)\s*$/,""),T=o.length+1,D=`${N} (${T})`,L=Ye("conn");await m.create.mutateAsync({id:L,title:D,description:f.description??null,connection_type:f.connection_type,connection_url:f.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:f.created_by,organization_id:f.organization_id,icon:f.icon??null,app_name:f.app_name??null,app_id:f.app_id??null,connection_headers:f.connection_headers??null,oauth_config:null,configuration_state:f.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const X=new URL(`/api/${p.slug}/mcp/${L}`,window.location.origin),Y=await ut({url:X.href,token:null,orgId:p.id});Y.supportsOAuth&&!Y.isAuthenticated&&await I(L)}finally{S(!1)}}}),t.jsx(xs,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(hs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Is(){const s=U.c(52),e=F();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:i,org:l}=He(a),{org:o}=te(),r=ke();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=ct(d),m=u[0]??null,p=m?.id??"",x=p||null;let h;s[4]!==o.id||s[5]!==o.slug||s[6]!==x?(h={connectionId:x,orgId:o.id,orgSlug:o.slug},s[4]=o.id,s[5]=o.slug,s[6]=x,s[7]=h):h=s[7];const g=Te(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=dt(j);let y;if(s[10]!==m?.tools||s[11]!==p||s[12]!==u||s[13]!==S){const I=S?S.tools.map($s):(m?.tools??[]).map(Ds);e:{if(u.length<=1){y=I;break e}const P=new Set,R=[],f=As;for(const N of u){const T=N.id===p?I:f(N.tools);for(const D of T)P.has(D.name)||(P.add(D.name),R.push(D))}y=R.length>0?R:I}s[10]=m?.tools,s[11]=p,s[12]=u,s[13]=S,s[14]=y}else y=s[14];const C=y;let _;s[15]!==g?(_={client:g},s[15]=g,s[16]=_):_=s[16];const{data:$}=mt(_);let w;s[17]!==g?(w={client:g},s[17]=g,s[18]=w):w=s[18];const{data:M}=Ke(w);let A;s[19]!==$?.prompts?(A=$?.prompts??[],s[19]=$?.prompts,s[20]=A):A=s[20];let O;s[21]!==A?(O=A.map(Ts),s[21]=A,s[22]=O):O=s[22];const k=O;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let b;s[25]!==v?(b=v.map(ks),s[25]=v,s[26]=b):b=s[26];const E=b;if(!m){let I;s[27]!==e?(I=e("details.connection.notFoundTitle"),s[27]=e,s[28]=I):I=s[28];let P;s[29]!==e?(P=e("details.connection.notFoundDescription"),s[29]=e,s[30]=P):P=s[30];let R;s[31]!==c||s[32]!==l?(R=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[31]=c,s[32]=l,s[33]=R):R=s[33];let f;s[34]!==e?(f=e("details.connection.backButton"),s[34]=e,s[35]=f):f=s[35];let N;s[36]!==R||s[37]!==f?(N=t.jsx(B,{variant:"outline",onClick:R,children:f}),s[36]=R,s[37]=f,s[38]=N):N=s[38];let T;return s[39]!==I||s[40]!==P||s[41]!==N?(T=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(_e,{title:I,description:P,actions:N})}),s[39]=I,s[40]=P,s[41]=N,s[42]=T):T=s[42],T}let z;return s[43]!==r.update.isPending||s[44]!==C||s[45]!==m||s[46]!==p||s[47]!==l||s[48]!==k||s[49]!==E||s[50]!==u?(z=t.jsx(ws,{org:l,connection:m,connectionId:p,isUpdating:r.update.isPending,tools:C,prompts:k,resources:E,siblings:u}),s[43]=r.update.isPending,s[44]=C,s[45]=m,s[46]=p,s[47]=l,s[48]=k,s[49]=E,s[50]=u,s[51]=z):z=s[51],z}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Ts(s){return{name:s.name,description:s.description}}function As(s){return(s??[]).map(Ps)}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Os(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ge,{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(Is,{})})}),s[0]=e):e=s[0],e}function yi(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Os,{}),s[0]=e):e=s[0],e}export{yi as default};
@@ -1 +1 @@
1
- import{an as R,bO as A,bP as I,ao as o,bN as j,bM as z,c as L,j as u,B as C}from"./index-r5-6H5AW.js";import{I as H}from"./input-C2g1j_kV.js";import{s as W}from"./Plus-tNGOLWnu.js";import{s as q}from"./Trash01-D4CNvDEa.js";const K=R({key:o().min(1,"Key is required"),value:o()}),G=R({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:j(K).optional(),configuration_scopes:j(o()).nullable().optional(),configuration_state:A(o(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(n=>(n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket")&&n.connection_url?.trim()?o().url().safeParse(n.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function O(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(i=>e.includes(i))||["sk_","rk_","whsec_","pk_live","sk_live"].some(i=>e.startsWith(i))||["_key","_secret","_token","_password","_auth","_pat"].some(i=>e.endsWith(i)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:a,valuePlaceholder:i,className:v}=n,m=a===void 0?"VARIABLE_NAME":a,h=i===void 0?"value...":i;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,s)=>s!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:p,value:c.value},r(s))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const g=P;let T;e[9]!==r||e[10]!==t?(T=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:c.key,value:p},r(s))},e[9]=r,e[10]=t,e[11]=T):T=e[11];const k=T;let f;if(e[12]!==g||e[13]!==y||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==h){let l;e[19]!==g||e[20]!==y||e[21]!==k||e[22]!==m||e[23]!==h?(l=(p,s)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>g(s,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:O(p.key)?"password":"text",placeholder:h,value:p.value,onChange:c=>k(s,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>y(s),children:u.jsx(q,{size:16})})]},s),e[19]=g,e[20]=y,e[21]=k,e[22]=m,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=g,e[13]=y,e[14]=k,e[15]=m,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=u.jsx(W,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let d;e[26]!==S?(d=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[w,"Add Environment Variable"]}),e[26]=S,e[27]=d):d=e[27];let _;e[28]!==f||e[29]!==d?(_=u.jsxs("div",{className:"flex flex-col gap-2",children:[f,d]}),e[28]=f,e[29]=d,e[30]=_):_=e[30];let E;return e[31]!==v||e[32]!==_?(E=u.jsx("div",{className:v,children:_}),e[31]=v,e[32]=_,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const a=e.slice(1).find(i=>!i.startsWith("-"));return a?{packageName:a}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(i=>(i.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",a=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:a}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const a={command:n};e.trim()&&(a.args=e.trim().split(/\s+/)),t?.trim()&&(a.cwd=t.trim());const i=V(r);return Object.keys(i).length>0&&(a.envVars=i),a}export{X as E,J as a,Q as b,G as c,Z as d,Y as i,F as p,D as r};
1
+ import{an as R,bO as A,bP as I,ao as o,bN as j,bM as z,c as L,j as u,B as C}from"./index-CFyHGgGO.js";import{I as H}from"./input-BXe2-JP2.js";import{s as W}from"./Plus-DxM0fEC4.js";import{s as q}from"./Trash01-B-_Oqcf7.js";const K=R({key:o().min(1,"Key is required"),value:o()}),G=R({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:j(K).optional(),configuration_scopes:j(o()).nullable().optional(),configuration_state:A(o(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(n=>(n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket")&&n.connection_url?.trim()?o().url().safeParse(n.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function O(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(i=>e.includes(i))||["sk_","rk_","whsec_","pk_live","sk_live"].some(i=>e.startsWith(i))||["_key","_secret","_token","_password","_auth","_pat"].some(i=>e.endsWith(i)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:a,valuePlaceholder:i,className:v}=n,m=a===void 0?"VARIABLE_NAME":a,h=i===void 0?"value...":i;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,s)=>s!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:p,value:c.value},r(s))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const g=P;let T;e[9]!==r||e[10]!==t?(T=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:c.key,value:p},r(s))},e[9]=r,e[10]=t,e[11]=T):T=e[11];const k=T;let f;if(e[12]!==g||e[13]!==y||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==h){let l;e[19]!==g||e[20]!==y||e[21]!==k||e[22]!==m||e[23]!==h?(l=(p,s)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>g(s,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:O(p.key)?"password":"text",placeholder:h,value:p.value,onChange:c=>k(s,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>y(s),children:u.jsx(q,{size:16})})]},s),e[19]=g,e[20]=y,e[21]=k,e[22]=m,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=g,e[13]=y,e[14]=k,e[15]=m,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=u.jsx(W,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let d;e[26]!==S?(d=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[w,"Add Environment Variable"]}),e[26]=S,e[27]=d):d=e[27];let _;e[28]!==f||e[29]!==d?(_=u.jsxs("div",{className:"flex flex-col gap-2",children:[f,d]}),e[28]=f,e[29]=d,e[30]=_):_=e[30];let E;return e[31]!==v||e[32]!==_?(E=u.jsx("div",{className:v,children:_}),e[31]=v,e[32]=_,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const a=e.slice(1).find(i=>!i.startsWith("-"));return a?{packageName:a}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(i=>(i.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",a=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:a}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const a={command:n};e.trim()&&(a.args=e.trim().split(/\s+/)),t?.trim()&&(a.cwd=t.trim());const i=V(r);return Object.keys(i).length>0&&(a.envVars=i),a}export{X as E,J as a,Q as b,G as c,Z as d,Y as i,F as p,D as r};