decocms 4.523.2 → 4.524.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (518) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-BiggFcjT.js → ActiveShapeUtils-Bp4fmUBo.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-DuL_FFHx.js → AlertCircle-Bq5T03B8.js} +1 -1
  3. package/dist/client/assets/{AreaChart-CwzHmgIC.js → AreaChart-CCyND0Jp.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-D94SnK45.js → ArrowLeft-Bwi_Jr7f.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Dn7IgtbA.js → ArrowUp-CzX0fTk7.js} +1 -1
  6. package/dist/client/assets/{BarChart-cNHCiDCi.js → BarChart-wLDzzyOQ.js} +1 -1
  7. package/dist/client/assets/{Building02-BmRvdezs.js → Building02-A_MT9tNO.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-iNB7Klro.js → CartesianChart-B0qX_dpC.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-C1fCYXI1.js → CategoricalChart-BDZ_2Tmn.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-BCzuQhZn.js → CheckCircle-BE1i_X4b.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-CxqUMZg6.js → ChevronSelectorVertical-DNrt0MHW.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-DWUYL4oz.js → ChevronUp-RlBkcpdd.js} +1 -1
  13. package/dist/client/assets/{Copy01-B5Qm_DvO.js → Copy01-B9x501ud.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-8EhoJBRm.js → CreditCard01-Bu_qRR36.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-BmVaGWAg.js → DotsVertical-D9231JAc.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-7FUCCj8N.js → ErrorBarContext-PGp8cmoe.js} +1 -1
  17. package/dist/client/assets/{Globe04-KfEeo3Pn.js → Globe04-DQlP6Nhr.js} +1 -1
  18. package/dist/client/assets/{Image01-KdUybmWt.js → Image01-ClayPF_a.js} +1 -1
  19. package/dist/client/assets/{Key01-6z52NoNj.js → Key01-CxKYO-oQ.js} +1 -1
  20. package/dist/client/assets/{Link01-oKshySD_.js → Link01-B7BHRxIW.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-edPm2SIJ.js → LinkBroken01-XqJUgSE7.js} +1 -1
  22. package/dist/client/assets/{Minus-BvqQFZHP.js → Minus-Bh6ogRng.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DZmeiH6p.js → Monitor01-BpzvJnXA.js} +1 -1
  24. package/dist/client/assets/{Play-3WH9Ikap.js → Play-w4omVTRa.js} +1 -1
  25. package/dist/client/assets/{Plus-D3sv1Vc5.js → Plus-CcJNnBya.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-D2o1nZW0.js → ReferenceLine-CI6ZmeJ0.js} +1 -1
  27. package/dist/client/assets/{SearchMd-DzFzOALq.js → SearchMd-5lGv5a5H.js} +1 -1
  28. package/dist/client/assets/{Sector-DlWxPN8J.js → Sector-gkUUnvA4.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-B1nTczbE.js → ShoppingBag01-C82UeRR9.js} +1 -1
  30. package/dist/client/assets/{Sun-D5qn9wPg.js → Sun-IvvKZ51n.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DQQsmdwN.js → SwitchHorizontal01-B1MoYKPo.js} +1 -1
  32. package/dist/client/assets/{Tool01-Bhj-QHDu.js → Tool01-BvlRH5Ln.js} +1 -1
  33. package/dist/client/assets/{Trash01-DT07olaT.js → Trash01-C9E8l_mI.js} +1 -1
  34. package/dist/client/assets/{Upload01-BocTk920.js → Upload01-mlw10ZK-.js} +1 -1
  35. package/dist/client/assets/{UserSquare-zP4-JvXz.js → UserSquare-DwNuAluZ.js} +1 -1
  36. package/dist/client/assets/{Users01-DfLHZjoX.js → Users01-DcHPIKgH.js} +1 -1
  37. package/dist/client/assets/{XClose-1FEelrZ4.js → XClose-BBReaSBA.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-DH4NDKgS.js → ZoomOut-CnbxUNSo.js} +1 -1
  39. package/dist/client/assets/access-gate-BNOWXoYR.js +1 -0
  40. package/dist/client/assets/{add-connection-dialog-B9X2bENr.js → add-connection-dialog-CEj8kbGq.js} +1 -1
  41. package/dist/client/assets/agent-analytics-DcqQcnI_.js +1 -0
  42. package/dist/client/assets/agent-app-BWM9EEcJ.js +1 -0
  43. package/dist/client/assets/agent-assets-CppO2yKd.js +1 -0
  44. package/dist/client/assets/agent-automation-BtSTyUKu.js +20 -0
  45. package/dist/client/assets/agent-automations-Bf-0_57T.js +1 -0
  46. package/dist/client/assets/agent-calendar-Bp6Y1tPy.js +1 -0
  47. package/dist/client/assets/agent-connect-sources-C_0x6Udu.js +1 -0
  48. package/dist/client/assets/agent-deck-BOaej8yV.js +1 -0
  49. package/dist/client/assets/agent-e2e-DokyQFgS.js +1 -0
  50. package/dist/client/assets/agent-experiments-7O17P9sC.js +1 -0
  51. package/dist/client/assets/agent-file-B5Z-mSXW.js +1 -0
  52. package/dist/client/assets/agent-hosting-v3_GHpmO.js +1 -0
  53. package/dist/client/assets/agent-icon-KvVT3fA8.js +1 -0
  54. package/dist/client/assets/agent-library-B3W6CGJl.js +1 -0
  55. package/dist/client/assets/agent-library-file-CHgoG2j3.js +1 -0
  56. package/dist/client/assets/agent-monitor-C9pMT5KA.js +1 -0
  57. package/dist/client/assets/agent-overview-9FhsI0nk.js +1 -0
  58. package/dist/client/assets/agent-releases-CRh6y5DW.js +2 -0
  59. package/dist/client/assets/agent-settings-CfNarIdW.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-Ccqk13sk.js → agent-site-editor-BALtgla6.js} +2 -2
  61. package/dist/client/assets/agent-site-editor-code-D6BBbIl8.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-DAMOp9X5.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-B0IbykqU.js +1 -0
  64. package/dist/client/assets/agent-view-B5q0EqmS.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-BQQDslge.js → agent-view-guard-bPXLqLsK.js} +1 -1
  66. package/dist/client/assets/agents-list-DrT_0gVh.js +1 -0
  67. package/dist/client/assets/{ai-providers-DZoJeRvf.js → ai-providers-DorJXBZe.js} +2 -2
  68. package/dist/client/assets/{alert-SHlQi_f5.js → alert-DEw5BVAh.js} +1 -1
  69. package/dist/client/assets/analytics-sections-g9foqwY5.js +1 -0
  70. package/dist/client/assets/analytics-tab-D5KshkAH.js +2 -0
  71. package/dist/client/assets/api-keys-B-qwgNok.js +1 -0
  72. package/dist/client/assets/api-keys-CIPiPSYY.js +1 -0
  73. package/dist/client/assets/app-editor-ChUXEXt-.js +1 -0
  74. package/dist/client/assets/{asset-utils-B48ApnSg.js → asset-utils-DRJP317P.js} +1 -1
  75. package/dist/client/assets/{auth--QyNLTbP.js → auth-Dqt9menC.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-9FBGni3X.js → auth-catchall-B5Em8iaq.js} +1 -1
  77. package/dist/client/assets/{auth-entry-Bb0XRefn.js → auth-entry-CNtzQsix.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-aJ5w9glJ.js → auth-split-layout-BoWG-no5.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-D2Ooe96m.js → authenticate-and-persist-oauth-BziZaG_M.js} +1 -1
  80. package/dist/client/assets/automation-list-row-BRtPLrxX.js +1 -0
  81. package/dist/client/assets/automation-runs-C0-BhIZn.js +1 -0
  82. package/dist/client/assets/automations-CXOQ5gKM.js +1 -0
  83. package/dist/client/assets/{autosend-CUttN5XY.js → autosend-BRUzWk70.js} +1 -1
  84. package/dist/client/assets/{badge-DVaine1x.js → badge-Ckz5LqgP.js} +1 -1
  85. package/dist/client/assets/{block-document-Dsg6Fb4A.js → block-document-BPaZQC5L.js} +3 -3
  86. package/dist/client/assets/{blocks-preview-workspace-context-DrgIe1RS.js → blocks-preview-workspace-context-C-uj3YG0.js} +1 -1
  87. package/dist/client/assets/blocks-tab-states-BcxrQPOR.js +1 -0
  88. package/dist/client/assets/blog-schema-Du7ILh7Q.js +1 -0
  89. package/dist/client/assets/buckets-CKZYh6Ij.js +1 -0
  90. package/dist/client/assets/build-improve-prompt-doc-DJhZN8lj.js +2 -0
  91. package/dist/client/assets/{calendar-CpwMOIuL.js → calendar-DkZz5VlH.js} +1 -1
  92. package/dist/client/assets/campaigns-view-Dc88Zs16.js +1 -0
  93. package/dist/client/assets/{capability-load-error-DvFhO1Pk.js → capability-load-error-CRB9otZt.js} +1 -1
  94. package/dist/client/assets/category-editor-CSPe0t_-.js +1 -0
  95. package/dist/client/assets/{cdn-tab-9Pvplnml.js → cdn-tab-KPAxnC3T.js} +1 -1
  96. package/dist/client/assets/{chart-DMJIFNic.js → chart-Bp6om7lj.js} +1 -1
  97. package/dist/client/assets/{chat-context-DwIrrO5r.js → chat-context-CIOqAIIy.js} +7 -7
  98. package/dist/client/assets/{chat-draft-stAhUvyw.js → chat-draft-OR83_S8w.js} +1 -1
  99. package/dist/client/assets/{checkbox-aTYJ3HOV.js → checkbox-BQ7Ebuar.js} +1 -1
  100. package/dist/client/assets/choose-editor-CspgtGFS.js +1 -0
  101. package/dist/client/assets/{cli-auth-success-CuJJaXpQ.js → cli-auth-success-CGyir_iF.js} +1 -1
  102. package/dist/client/assets/{client-icons-Du3qqcxN.js → client-icons-BOMFh2QS.js} +1 -1
  103. package/dist/client/assets/cms-settings-editor-DbU_3ksB.js +1 -0
  104. package/dist/client/assets/{collapsible-Btd20NT7.js → collapsible-BB8_usPT.js} +1 -1
  105. package/dist/client/assets/collection-detail-H-UqYky8.js +1 -0
  106. package/dist/client/assets/collection-display-button-CulG1s8m.js +1 -0
  107. package/dist/client/assets/{collection-search-C3Qx3Y9p.js → collection-search-Cf4li4kg.js} +1 -1
  108. package/dist/client/assets/{collection-table-wrapper-BzK9w_p-.js → collection-table-wrapper-DnZHa5Lt.js} +1 -1
  109. package/dist/client/assets/{collection-tabs-D5iCdwPv.js → collection-tabs-x8ccQUAC.js} +1 -1
  110. package/dist/client/assets/{column-rules-UU8JLygo.js → column-rules-C_DWUbCh.js} +2 -2
  111. package/dist/client/assets/{combobox-PWtcP6b2.js → combobox-BZoZToki.js} +1 -1
  112. package/dist/client/assets/{command-Dqne3j1N.js → command-MmMDew8i.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-kvftD547.js → companion-mcps-section-By8_AO07.js} +1 -1
  114. package/dist/client/assets/{config-CJdQI2Ik.js → config-DBn3iCC3.js} +1 -1
  115. package/dist/client/assets/{connect-CaOmDTIh.js → connect-DbK_vN0J.js} +3 -3
  116. package/dist/client/assets/{connect-layout-Dx_3veD9.js → connect-layout-9tsE00M7.js} +1 -1
  117. package/dist/client/assets/connect-source-dialog-DqWilbbC.js +1 -0
  118. package/dist/client/assets/{connection-DJp1XqBL.js → connection-QGwhnKZn.js} +1 -1
  119. package/dist/client/assets/{connection-card-CwHoa3H_.js → connection-card-DEMVrMsW.js} +1 -1
  120. package/dist/client/assets/connection-detail-4PyaBO0_.js +1 -0
  121. package/dist/client/assets/{connection-form-helpers-BThulWcJ.js → connection-form-helpers-DCRY9s0M.js} +1 -1
  122. package/dist/client/assets/connections-CpcdB3jc.js +1 -0
  123. package/dist/client/assets/content-tab-YME7HMCb.js +22 -0
  124. package/dist/client/assets/{context-menu-Bsyqk_Km.js → context-menu-Cpvztbef.js} +1 -1
  125. package/dist/client/assets/context-oSwYvz9P.js +1 -0
  126. package/dist/client/assets/{context-shell-DFZc3RTT.js → context-shell-BVBpRdKB.js} +5 -5
  127. package/dist/client/assets/{core.esm-BRS9Ks9b.js → core.esm-B2cbbV3O.js} +1 -1
  128. package/dist/client/assets/create-organization-dialog-NLldLLor.js +1 -0
  129. package/dist/client/assets/{daily-pulse-BqDvmnPn.js → daily-pulse-ClSeB_Ta.js} +1 -1
  130. package/dist/client/assets/discover-DmBynuR0.js +1 -0
  131. package/dist/client/assets/{domain-settings-jCTqOxdl.js → domain-settings-Cu3Pj63v.js} +1 -1
  132. package/dist/client/assets/{drawer-DePU4o02.js → drawer-GssD8cb3.js} +1 -1
  133. package/dist/client/assets/{editor-wUI_HNkS.js → editor-BTovmEAS.js} +1 -1
  134. package/dist/client/assets/{editor-classes-B3UoGQQP.js → editor-classes-CcPgajKG.js} +1 -1
  135. package/dist/client/assets/{empty-state-cJTBr2cU.js → empty-state-D86P1Giw.js} +1 -1
  136. package/dist/client/assets/{empty-state-W9_vBymb.js → empty-state-DLNzdrwg.js} +1 -1
  137. package/dist/client/assets/experiments-tab-CjpJzYQ9.js +1 -0
  138. package/dist/client/assets/experiments-tab-choice-pVOiMOWe.js +1 -0
  139. package/dist/client/assets/{extract-connection-data-DFv9Bgl-.js → extract-connection-data-DwkOg2rJ.js} +1 -1
  140. package/dist/client/assets/{feature-gate-B4srxCCI.js → feature-gate-BIwsQPiQ.js} +1 -1
  141. package/dist/client/assets/{feature-paywall-CnDJ3rvy.js → feature-paywall-DpVlsq5a.js} +1 -1
  142. package/dist/client/assets/file-explorer-B9Wz0lPl.js +2 -0
  143. package/dist/client/assets/{file-preview-bA4ayYHL.js → file-preview-CX5xfaHR.js} +1 -1
  144. package/dist/client/assets/{file-share-button-BLIlQQod.js → file-share-button-Cx66riM5.js} +2 -2
  145. package/dist/client/assets/{file-type-icon-DTTBg-Cp.js → file-type-icon-tAeiI9_2.js} +1 -1
  146. package/dist/client/assets/{folder-icon-I00h66JN.js → folder-icon-C25vLo5g.js} +2 -2
  147. package/dist/client/assets/{form-KgHP-Hpi.js → form-CKF06Eu0.js} +1 -1
  148. package/dist/client/assets/general-CA7uhFzP.js +1 -0
  149. package/dist/client/assets/held-block-view-CU5t1B8c.js +20 -0
  150. package/dist/client/assets/home-BuPVKVzx.js +1 -0
  151. package/dist/client/assets/{icon-button-uPrtYnSE.js → icon-button-5JlhYc9R.js} +1 -1
  152. package/dist/client/assets/{index-Cbee4-AB.js → index-AY0yzUAx.js} +3 -3
  153. package/dist/client/assets/{index-XCP5r1I_.js → index-B0Hb2bUK.js} +1 -1
  154. package/dist/client/assets/{index-BfC50J0F.js → index-B8bCJ3Gm.js} +1 -1
  155. package/dist/client/assets/{index-BX1aT4SZ.js → index-BLRFIWph.js} +6 -6
  156. package/dist/client/assets/index-BerfNxBu.js +1 -0
  157. package/dist/client/assets/{index-D4ru75Fc.js → index-Bz0XRw1e.js} +1 -1
  158. package/dist/client/assets/index-C4tYnNih.js +253 -0
  159. package/dist/client/assets/{index-CDrRsU-I.js → index-CDfG-oXn.js} +1 -1
  160. package/dist/client/assets/{index-CvNALbEH.js → index-CJ8-jtJ3.js} +2 -2
  161. package/dist/client/assets/{index-DKUcI8bc.js → index-CMXP-HlZ.js} +1 -1
  162. package/dist/client/assets/index-CieIETkx.js +4 -0
  163. package/dist/client/assets/{index-DL_9Zurb.js → index-D8kI0oe2.js} +1 -1
  164. package/dist/client/assets/{index-WWkbzoL4.js → index-DG_Aoo8H.js} +1 -1
  165. package/dist/client/assets/{index-DqOQgVM6.js → index-DMcUJv3F.js} +1 -1
  166. package/dist/client/assets/{index-DdXWXy9i.js → index-DQ4MCRAi.js} +9 -9
  167. package/dist/client/assets/{index-redirect-BQkqIeGD.js → index-redirect-DSkhUiz1.js} +1 -1
  168. package/dist/client/assets/{infiniteQueryObserver-6MK6GS3o.js → infiniteQueryObserver-CyNcT3qz.js} +1 -1
  169. package/dist/client/assets/{infra-billing-3yuTy4Pj.js → infra-billing-OmwhvZsy.js} +1 -1
  170. package/dist/client/assets/{input-BY2tBiEb.js → input-C0IBlV9i.js} +7 -7
  171. package/dist/client/assets/{input-BUcDagSA.js → input-Drj3v1Rm.js} +1 -1
  172. package/dist/client/assets/{integration-icon-BwzO3Wq9.js → integration-icon-wG7mou98.js} +1 -1
  173. package/dist/client/assets/{jira-icon-g2GVH5bw.js → jira-icon-Ct9neMH3.js} +1 -1
  174. package/dist/client/assets/{label-CG_DMVpg.js → label-Kngegn1Y.js} +1 -1
  175. package/dist/client/assets/{layout-CsbDSI6l.js → layout-D1PXm8wr.js} +1 -1
  176. package/dist/client/assets/legacy-agents-deep-CqqR00U7.js +1 -0
  177. package/dist/client/assets/{legacy-main-redirect-CS4Abpwd.js → legacy-main-redirect-j5rWQTR7.js} +1 -1
  178. package/dist/client/assets/library-BB_eexuL.js +1 -0
  179. package/dist/client/assets/{login-DW5wI5H0.js → login-dCZC1OIS.js} +1 -1
  180. package/dist/client/assets/{markdown-D5ryQAkZ.js → markdown-C-J5-sTt.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-BYcHi_da.js → mcp-app-renderer-vHEVQIZL.js} +2 -2
  182. package/dist/client/assets/{mcp-oauth-Bn5p4oSU.js → mcp-oauth-5QMuPFQa.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-4UvGlLYO.js → mcp-oauth-CnB7EPe0.js} +1 -1
  184. package/dist/client/assets/members-D62Ns7xb.js +1 -0
  185. package/dist/client/assets/{memory-FU3t5-1z.js → memory-BRnI6IWM.js} +2 -2
  186. package/dist/client/assets/{mini-report-page-BBST8cjq.js → mini-report-page-RV5HcY13.js} +1 -1
  187. package/dist/client/assets/{mock-board-igDH_YVZ.js → mock-board-C5ljPU5m.js} +5 -5
  188. package/dist/client/assets/{monaco-editor-eDEJF7LD.js → monaco-editor-CG1RPml4.js} +2 -2
  189. package/dist/client/assets/monitoring-kGWQYp7Z.js +1 -0
  190. package/dist/client/assets/{monitoring-stats-row-D5LuoYp3.js → monitoring-stats-row-BpfaRq5_.js} +1 -1
  191. package/dist/client/assets/{multi-select-DYiX5KEM.js → multi-select-D79TIC6v.js} +1 -1
  192. package/dist/client/assets/mustache-BdHuXtQC.js +4 -0
  193. package/dist/client/assets/{named-rule-uses-BrQiTKM3.js → named-rule-uses-DDsPTKwP.js} +1 -1
  194. package/dist/client/assets/named-rule-view-CelDjugE.js +1 -0
  195. package/dist/client/assets/{new-project-dialog-B9qWs4Pr.js → new-project-dialog-DQPlctqf.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-Dtw5ILTB.js → oauth-callback-ah6cR8xQ.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-ai-provider-BSRRr6Yq.js → oauth-callback-ai-provider-C5jhPG9E.js} +1 -1
  198. package/dist/client/assets/onboarding-BPgxXbEy.js +1 -0
  199. package/dist/client/assets/openai-conversation-COLqoqqY.js +3 -0
  200. package/dist/client/assets/{optimistic-project-sidebar-views-CU6JI5UK.js → optimistic-project-sidebar-views-BXm7Dv06.js} +1 -1
  201. package/dist/client/assets/{order-monitor-day-D7HisKzI.js → order-monitor-day-DzTTlxAw.js} +1 -1
  202. package/dist/client/assets/organization-choice-CMYQUq77.js +1 -0
  203. package/dist/client/assets/orgs-Cb-j6SHO.js +1 -0
  204. package/dist/client/assets/page-seo-form-CCa1Xirx.js +1 -0
  205. package/dist/client/assets/{pair-9h1O_BO7.js → pair-CRFLUGB-.js} +8 -8
  206. package/dist/client/assets/parse-sections-CBOr5TcU.js +1 -0
  207. package/dist/client/assets/plan-CZiCKWsL.js +1 -0
  208. package/dist/client/assets/{plan-ladder-Dz8bCoAd.js → plan-ladder-Clu_D1dM.js} +1 -1
  209. package/dist/client/assets/{popover-Cdz7pgAQ.js → popover-7hw0_Cgu.js} +1 -1
  210. package/dist/client/assets/post-calendar-oSfCtk_Z.js +1 -0
  211. package/dist/client/assets/post-editor-DqdLoENq.js +2 -0
  212. package/dist/client/assets/{preview-content-BNxnqe7O.js → preview-content-tpqwn9DV.js} +1 -1
  213. package/dist/client/assets/{preview-dialog-tDLXXdPQ.js → preview-dialog-DDUA3zbn.js} +1 -1
  214. package/dist/client/assets/{preview-panel-D04CDEWQ.js → preview-panel-B7KDfk34.js} +1 -1
  215. package/dist/client/assets/preview-tab-CwHbL-uL.js +551 -0
  216. package/dist/client/assets/{product-picker-dialog-B9YEPxMK.js → product-picker-dialog-q_j-OMur.js} +1 -1
  217. package/dist/client/assets/profile--UpTdMEW.js +1 -0
  218. package/dist/client/assets/project-app-view-BDtUwetx.js +1 -0
  219. package/dist/client/assets/{project-apps-nQXtEtz0.js → project-apps-M24hPHW2.js} +1 -1
  220. package/dist/client/assets/project-feed-Dm5w30sM.js +1 -0
  221. package/dist/client/assets/{project-icon-BqAOVSaG.js → project-icon-BlULUcrw.js} +1 -1
  222. package/dist/client/assets/project-reports-BXESPzCU.js +1 -0
  223. package/dist/client/assets/project-tasks-CRajXa6Z.js +1 -0
  224. package/dist/client/assets/projects-C9fr3jni.js +1 -0
  225. package/dist/client/assets/{projects-empty-state-dd0PXzD2.js → projects-empty-state-DRas-7X9.js} +1 -1
  226. package/dist/client/assets/{prompts-C-zf2EeW.js → prompts-CiGgpCOz.js} +1 -1
  227. package/dist/client/assets/record-editor-Dw_A1nYV.js +1 -0
  228. package/dist/client/assets/redirect-editor-DbPiIIKk.js +1 -0
  229. package/dist/client/assets/releases-api-DA_Oz9WG.js +1 -0
  230. package/dist/client/assets/{reports-Dvk3psp8.js → reports-Czva0tSD.js} +1 -1
  231. package/dist/client/assets/reports-I3thcjRj.js +1 -0
  232. package/dist/client/assets/reports-onboarding-BsOWdPaY.js +1 -0
  233. package/dist/client/assets/reports-tab-C2STfD1k.js +2 -0
  234. package/dist/client/assets/repositories-B5BeE82u.js +1 -0
  235. package/dist/client/assets/repositories-Dp2o7kK8.js +1 -0
  236. package/dist/client/assets/repository-binding-C7GXruB1.js +1 -0
  237. package/dist/client/assets/{repository-import-picker-B0yxPI2j.js → repository-import-picker-BIFRKH2H.js} +1 -1
  238. package/dist/client/assets/repository-picker-D6fEwnOk.js +1 -0
  239. package/dist/client/assets/{require-capability-BFyuzPqV.js → require-capability-DSeRbn1u.js} +1 -1
  240. package/dist/client/assets/{required-auth-layout--9OrAOrr.js → required-auth-layout-D4yn4VOg.js} +1 -1
  241. package/dist/client/assets/{reset-password-C3K9ZZ2t.js → reset-password-CLlk4Qyg.js} +1 -1
  242. package/dist/client/assets/{resizable-BqY6-uYR.js → resizable-B3zVq59U.js} +1 -1
  243. package/dist/client/assets/{resolve-tab-icon-H3Wty7u7.js → resolve-tab-icon-NGCKQk4u.js} +1 -1
  244. package/dist/client/assets/review-settings-ChOJMpqj.js +1 -0
  245. package/dist/client/assets/roles-034YEIy0.js +1 -0
  246. package/dist/client/assets/route-B9sbaFmI.js +1 -0
  247. package/dist/client/assets/route-D3_kGiYP.js +1 -0
  248. package/dist/client/assets/route-DixoE7S2.js +1 -0
  249. package/dist/client/assets/{sandbox-lifecycle-context-CXn37zMt.js → sandbox-lifecycle-context-DS1zxfZb.js} +1 -1
  250. package/dist/client/assets/{schema-D2gJoNK3.js → schema-DIZqRcY2.js} +1 -1
  251. package/dist/client/assets/{schema-D5kxh02n.js → schema-DXQBt-Da.js} +1 -1
  252. package/dist/client/assets/{scroll-area-DvfamsPF.js → scroll-area-BYOXOcFm.js} +1 -1
  253. package/dist/client/assets/search-input-CM9T7koR.js +1 -0
  254. package/dist/client/assets/{search-toggle-CdGIHwQK.js → search-toggle-BA_oiAdj.js} +1 -1
  255. package/dist/client/assets/secret-picker-D2Cr-oRZ.js +1 -0
  256. package/dist/client/assets/secrets-BRbaixQo.js +1 -0
  257. package/dist/client/assets/section-array-field-TQFJqwVV.js +1 -0
  258. package/dist/client/assets/{sections-p-TiUqOZ.js → sections-05hBo9NL.js} +1 -1
  259. package/dist/client/assets/sections-editor-BR_A8Bqr.js +1 -0
  260. package/dist/client/assets/{select-DAagAjcm.js → select-BZ2tKCpr.js} +1 -1
  261. package/dist/client/assets/{select-model-DMBmIlHh.js → select-model-DskJe0jJ.js} +1 -1
  262. package/dist/client/assets/seo-editor-DWsRiK1b.js +1 -0
  263. package/dist/client/assets/{separator-Caw0JVLD.js → separator-DdBbm1xl.js} +1 -1
  264. package/dist/client/assets/settings-tab-5QV5D7iT.js +1 -0
  265. package/dist/client/assets/{sheet-BHsKOUfF.js → sheet-DYw2VD7L.js} +1 -1
  266. package/dist/client/assets/shell-layout-DQPoLlFW.js +1 -0
  267. package/dist/client/assets/site-draft-actions-dD4jyBUz.js +12 -0
  268. package/dist/client/assets/site-draft-view-Ds5aQAqU.js +2 -0
  269. package/dist/client/assets/site-editor-D8vmphjE.js +1 -0
  270. package/dist/client/assets/site-editor-toast-gO0geSY6.js +1 -0
  271. package/dist/client/assets/skills-BG0VOLIN.js +1 -0
  272. package/dist/client/assets/{slider-D9yxsjlo.js → slider-ApiojjsY.js} +1 -1
  273. package/dist/client/assets/{sortable.esm-B7h1ef6s.js → sortable.esm-DPfgkRcd.js} +1 -1
  274. package/dist/client/assets/sso-CfSDpa9Z.js +1 -0
  275. package/dist/client/assets/{suggestion-CMN-fEG6.js → suggestion-DTo0Z5su.js} +2 -2
  276. package/dist/client/assets/{switch-DpD3lo_J.js → switch-B3v6apDN.js} +1 -1
  277. package/dist/client/assets/{symbol-Hd-wRYbC.js → symbol-pDh9bf5z.js} +1 -1
  278. package/dist/client/assets/synced-repos-oiGV5Ihu.js +1 -0
  279. package/dist/client/assets/{tab-icon-glyph-XxQjDugr.js → tab-icon-glyph-BzFDI553.js} +1 -1
  280. package/dist/client/assets/{table-Cc4crfQ0.js → table-CANIhtsr.js} +1 -1
  281. package/dist/client/assets/{tabs-BpLvUwhr.js → tabs-B5O9VNwn.js} +1 -1
  282. package/dist/client/assets/task-assignee-avatar-BOAf_3H_.js +1 -0
  283. package/dist/client/assets/{task-board-M_bY8eys.js → task-board-CBBaN9ua.js} +1 -1
  284. package/dist/client/assets/{task-route-Cz8IMljw.js → task-route-1lojPQeZ.js} +1 -1
  285. package/dist/client/assets/{task-status-D4WkmdQN.js → task-status-DM1NBqlc.js} +1 -1
  286. package/dist/client/assets/taskboard-analytics-DK79qp1-.js +1 -0
  287. package/dist/client/assets/tasks--LaoDxg8.js +1 -0
  288. package/dist/client/assets/tasks-Czi5B_ZB.js +4 -0
  289. package/dist/client/assets/{textarea--yDYOLyf.js → textarea-CAZh8Kr5.js} +1 -1
  290. package/dist/client/assets/thread-analytics-K9PkKnHr.js +1 -0
  291. package/dist/client/assets/{thread-intent-DSZI851P.js → thread-intent-B9ceQWmI.js} +6 -6
  292. package/dist/client/assets/{thread-route-BLXCdzrT.js → thread-route-_-Jo9yAq.js} +1 -1
  293. package/dist/client/assets/thread-route-gmMlW4oz.js +1 -0
  294. package/dist/client/assets/thread-sheet-body-ClyiLZhS.js +1 -0
  295. package/dist/client/assets/{time-range-picker-C3BbzoOH.js → time-range-picker-m7OMfbU0.js} +1 -1
  296. package/dist/client/assets/toggle-group-8XrNtMoS.js +1 -0
  297. package/dist/client/assets/{tool-namespace-CzQWuXDV.js → tool-namespace-cn6zTT0m.js} +1 -1
  298. package/dist/client/assets/{toolbar-icon-button-7gQeG_XH.js → toolbar-icon-button-fBm5AosV.js} +1 -1
  299. package/dist/client/assets/{tooltip-rhtdmPcj.js → tooltip-B1eS9Khq.js} +1 -1
  300. package/dist/client/assets/{tooltipContext-Db2Lu1qi.js → tooltipContext-DMiC5t9-.js} +1 -1
  301. package/dist/client/assets/track-BcscPlt3.js +1 -0
  302. package/dist/client/assets/{types-s41XNAq6.js → types-C_LaIhQe.js} +9 -9
  303. package/dist/client/assets/{url-slug-DQ6KErQd.js → url-slug-BEmF9qH1.js} +1 -1
  304. package/dist/client/assets/{usage-stats-DBiTgJdn.js → usage-stats-DtO_zGwF.js} +7 -7
  305. package/dist/client/assets/{use-ai-providers-DeyDa8Td.js → use-ai-providers-C315xBlf.js} +1 -1
  306. package/dist/client/assets/use-apply-named-rule-9ihG8ELj.js +1 -0
  307. package/dist/client/assets/{use-automations-CAga8LHD.js → use-automations-BpSvam4M.js} +1 -1
  308. package/dist/client/assets/use-autosave-CRCl3eTr.js +1 -0
  309. package/dist/client/assets/{use-chat-layout-state-P4eOAh0Q.js → use-chat-layout-state-ByIICjWr.js} +1 -1
  310. package/dist/client/assets/{use-clock-tick-DKd3Khi0.js → use-clock-tick-QAJndZ00.js} +1 -1
  311. package/dist/client/assets/{use-connect-companion-CXaOPPYN.js → use-connect-companion-rEYy0Kcd.js} +1 -1
  312. package/dist/client/assets/use-connection-CBlLT-Gl.js +1 -0
  313. package/dist/client/assets/{use-content-sync-D83lTU1r.js → use-content-sync-TKItZ8SP.js} +1 -1
  314. package/dist/client/assets/{use-copy-D2ar5QXj.js → use-copy-C9NYM8DB.js} +1 -1
  315. package/dist/client/assets/{use-create-virtual-mcp-C5_jirS7.js → use-create-virtual-mcp-DFsMYI92.js} +1 -1
  316. package/dist/client/assets/use-date-fns-locale-bL-I5mOj.js +1 -0
  317. package/dist/client/assets/{use-debounced-autosave-QgHKWEfB.js → use-debounced-autosave-DfJudaYl.js} +1 -1
  318. package/dist/client/assets/{use-debounced-value-CNkh6EY5.js → use-debounced-value-DOPKXMfX.js} +1 -1
  319. package/dist/client/assets/use-deco-credits-DL_DG4I5.js +1 -0
  320. package/dist/client/assets/{use-decopilot-events-DGj-wEwB.js → use-decopilot-events-4yDcDH2I.js} +1 -1
  321. package/dist/client/assets/use-delete-connection-3ef0jZgj.js +1 -0
  322. package/dist/client/assets/{use-deployment-admin-CR9n1OEp.js → use-deployment-admin-C2GaZpz9.js} +1 -1
  323. package/dist/client/assets/{use-fast-preview-draft-url-DKL4b1dE.js → use-fast-preview-draft-url-CN-8cYCq.js} +1 -1
  324. package/dist/client/assets/{use-file-configs-D3Cv6-L2.js → use-file-configs-Dfr8whNN.js} +1 -1
  325. package/dist/client/assets/{use-inbox-feed-CVakZcHF.js → use-inbox-feed-UXhkZ9eS.js} +1 -1
  326. package/dist/client/assets/{use-infinite-scroll-DcjLDU4h.js → use-infinite-scroll-WEv8wBk9.js} +1 -1
  327. package/dist/client/assets/use-join-requests-Bf1nx4BW.js +1 -0
  328. package/dist/client/assets/use-main-panel-tabs-CnvhH3AB.js +1 -0
  329. package/dist/client/assets/{use-mcp-auth-status-DX7pkWco.js → use-mcp-auth-status-Dxn8Kcei.js} +1 -1
  330. package/dist/client/assets/{use-mcp-client-BYbk6jXo.js → use-mcp-client-BkBWhGyj.js} +10 -10
  331. package/dist/client/assets/{use-mcp-prompts-B78UkAZ_.js → use-mcp-prompts-DWjSk3XQ.js} +1 -1
  332. package/dist/client/assets/{use-mcp-tools-COs5QQOc.js → use-mcp-tools-Cq-ES3mk.js} +1 -1
  333. package/dist/client/assets/{use-mobile-19frZVl2.js → use-mobile-BADuLdb7.js} +1 -1
  334. package/dist/client/assets/use-move-blocks-Ds_0OJ4H.js +1 -0
  335. package/dist/client/assets/{use-navigate-to-agent-Bh4JZJoL.js → use-navigate-to-agent-B3bMlZK-.js} +1 -1
  336. package/dist/client/assets/{use-open-billing-url-CUDKmO6U.js → use-open-billing-url-Dfpg8Tio.js} +1 -1
  337. package/dist/client/assets/{use-org-fs-BFFpcHJy.js → use-org-fs-Dt6mQNyr.js} +1 -1
  338. package/dist/client/assets/{use-org-repo-syncs-C29Ouwht.js → use-org-repo-syncs-D2j2_BKY.js} +1 -1
  339. package/dist/client/assets/{use-org-sso-BlWFmoCA.js → use-org-sso-CWvWEDQk.js} +1 -1
  340. package/dist/client/assets/use-organization-roles-DsjUZx1i.js +1 -0
  341. package/dist/client/assets/{use-organization-settings-XPH6XBPi.js → use-organization-settings-DBQ6GIch.js} +1 -1
  342. package/dist/client/assets/{use-panel-navigate-BKTq-N_H.js → use-panel-navigate-DZO4-0o6.js} +1 -1
  343. package/dist/client/assets/{use-project-native-view-presence-aJpFnShz.js → use-project-native-view-presence-Y3Sopx8q.js} +1 -1
  344. package/dist/client/assets/{use-project-scope-hi480z1p.js → use-project-scope-CKNjz3VB.js} +1 -1
  345. package/dist/client/assets/{use-recent-apps-DII4SRHf.js → use-recent-apps-TrfPEwKE.js} +1 -1
  346. package/dist/client/assets/{use-releases-GaRydy_l.js → use-releases-DSFeRsP3.js} +1 -1
  347. package/dist/client/assets/use-reports-diagnostic-YBAEN0Wc.js +1 -0
  348. package/dist/client/assets/{use-sandbox-events-CsNrKmda.js → use-sandbox-events-C6ionJ0p.js} +2 -2
  349. package/dist/client/assets/{use-secrets-DJcOfixK.js → use-secrets-xwuuJgHg.js} +1 -1
  350. package/dist/client/assets/use-section-preview-base-BdMX2uY9.js +1 -0
  351. package/dist/client/assets/use-session-runtime-CtTWKH1c.js +1 -0
  352. package/dist/client/assets/{use-sidebar-collapsed-8USbBI0-.js → use-sidebar-collapsed-DXyrU3VA.js} +1 -1
  353. package/dist/client/assets/{use-tags-DvW8yrHX.js → use-tags-CwZHa3pE.js} +1 -1
  354. package/dist/client/assets/use-task-board-analytics-BzPvlYE9.js +1 -0
  355. package/dist/client/assets/{use-task-board-events-De3JY1Pe.js → use-task-board-events-qI_skUMm.js} +1 -1
  356. package/dist/client/assets/{use-task-board-item-prs-CXzTAmMM.js → use-task-board-item-prs-CiXpN6jW.js} +1 -1
  357. package/dist/client/assets/{use-task-metadata-9cyD8qGI.js → use-task-metadata-E8aNM85o.js} +1 -1
  358. package/dist/client/assets/{use-thread-analytics-DltmG-kv.js → use-thread-analytics-DKupwFaR.js} +1 -1
  359. package/dist/client/assets/{use-thread-outputs-BKCBvLqB.js → use-thread-outputs-Di1RSISN.js} +1 -1
  360. package/dist/client/assets/useInfiniteQuery-CtWUiDbh.js +1 -0
  361. package/dist/client/assets/useQueries-BOzKsoXi.js +1 -0
  362. package/dist/client/assets/useSuspenseInfiniteQuery-Diw12fEI.js +1 -0
  363. package/dist/client/assets/users-Cup6bGNw.js +1 -0
  364. package/dist/client/assets/{utils-BnP8cv1B.js → utils-wTX1Gyo-.js} +1 -1
  365. package/dist/client/assets/variant-calendar-Doi5lHFb.js +1 -0
  366. package/dist/client/assets/variant-matcher-override-LGFgaSJn.js +1 -0
  367. package/dist/client/assets/{virtual-mcp-B8cZ7VfA.js → virtual-mcp-DO56RLOP.js} +1 -1
  368. package/dist/client/assets/{watch-sse-pool-DYaS1vyu.js → watch-sse-pool-BBTCM7MS.js} +1 -1
  369. package/dist/client/index.html +1 -1
  370. package/dist/server/server.js +713 -713
  371. package/package.json +2 -2
  372. package/dist/client/assets/User01-BqHvPhUP.js +0 -1
  373. package/dist/client/assets/access-gate-DyUtzmE9.js +0 -1
  374. package/dist/client/assets/agent-analytics-vIfEsYvC.js +0 -1
  375. package/dist/client/assets/agent-app-BrsqSpps.js +0 -1
  376. package/dist/client/assets/agent-assets-Cmwamjo6.js +0 -1
  377. package/dist/client/assets/agent-automation-DTP-nUve.js +0 -20
  378. package/dist/client/assets/agent-automations-DMzq_O24.js +0 -1
  379. package/dist/client/assets/agent-calendar-XJ6NXM0R.js +0 -1
  380. package/dist/client/assets/agent-connect-sources-BcRlDvxt.js +0 -1
  381. package/dist/client/assets/agent-deck-DDf8uIAO.js +0 -1
  382. package/dist/client/assets/agent-e2e-C9yo2VIy.js +0 -1
  383. package/dist/client/assets/agent-experiments-CBXMu_zo.js +0 -1
  384. package/dist/client/assets/agent-file-NVbz9x8-.js +0 -1
  385. package/dist/client/assets/agent-hosting--zgA3Vth.js +0 -1
  386. package/dist/client/assets/agent-icon-B_vqhfDt.js +0 -1
  387. package/dist/client/assets/agent-library-DnuSkP9c.js +0 -1
  388. package/dist/client/assets/agent-library-file-BvLizRc3.js +0 -1
  389. package/dist/client/assets/agent-monitor-rNkT_MKe.js +0 -1
  390. package/dist/client/assets/agent-overview-5SBfPz9h.js +0 -1
  391. package/dist/client/assets/agent-releases-Ln3sIMtS.js +0 -2
  392. package/dist/client/assets/agent-settings-D6bOK1ga.js +0 -1
  393. package/dist/client/assets/agent-site-editor-code-0Vxgov65.js +0 -2
  394. package/dist/client/assets/agent-site-editor-content-CoS3vIfM.js +0 -1
  395. package/dist/client/assets/agent-site-editor-preview-7txrWBOo.js +0 -1
  396. package/dist/client/assets/agent-view-C8DZj3zZ.js +0 -1
  397. package/dist/client/assets/agents-list-CUtOSk6b.js +0 -1
  398. package/dist/client/assets/alert-dialog-Bjihy8X7.js +0 -7
  399. package/dist/client/assets/analytics-sections-B_qn34eY.js +0 -1
  400. package/dist/client/assets/analytics-tab-DluP6EHx.js +0 -2
  401. package/dist/client/assets/api-keys-B5pbeuIW.js +0 -1
  402. package/dist/client/assets/api-keys-DRbQ6j-D.js +0 -1
  403. package/dist/client/assets/app-editor-l5QnxgXk.js +0 -1
  404. package/dist/client/assets/automation-list-row-DfibF1_j.js +0 -1
  405. package/dist/client/assets/automation-runs-CzCUPkiw.js +0 -1
  406. package/dist/client/assets/automations-CEr5Md2h.js +0 -1
  407. package/dist/client/assets/avatar-C5-kxiV_.js +0 -1
  408. package/dist/client/assets/blocks-tab-states-DSvvcfKU.js +0 -1
  409. package/dist/client/assets/blog-schema-7PNm5SA8.js +0 -1
  410. package/dist/client/assets/buckets-B99EVfxO.js +0 -1
  411. package/dist/client/assets/build-improve-prompt-doc-Dx-5MdwQ.js +0 -2
  412. package/dist/client/assets/campaigns-view-_4Aj2Qex.js +0 -1
  413. package/dist/client/assets/category-editor-Bz5Ohuf6.js +0 -1
  414. package/dist/client/assets/choose-editor-BpBHfKld.js +0 -1
  415. package/dist/client/assets/cms-settings-editor-DgOpqRn9.js +0 -1
  416. package/dist/client/assets/collection-detail-B4JsebMy.js +0 -1
  417. package/dist/client/assets/collection-display-button-BFEeUD4b.js +0 -1
  418. package/dist/client/assets/connect-source-dialog-BucnBQV1.js +0 -1
  419. package/dist/client/assets/connection-detail-BUrc4tQa.js +0 -1
  420. package/dist/client/assets/connections-UgNbDD55.js +0 -1
  421. package/dist/client/assets/content-tab-BzJzqdaq.js +0 -22
  422. package/dist/client/assets/context-BQ17H5cY.js +0 -1
  423. package/dist/client/assets/create-organization-dialog-4e3oT20D.js +0 -1
  424. package/dist/client/assets/differenceInSeconds-C3x8sHUj.js +0 -1
  425. package/dist/client/assets/discover-Du9d6I7b.js +0 -1
  426. package/dist/client/assets/experiments-tab-BGSl9C7j.js +0 -1
  427. package/dist/client/assets/experiments-tab-choice-C5L5-OKs.js +0 -1
  428. package/dist/client/assets/file-explorer-CSFyTcCU.js +0 -2
  429. package/dist/client/assets/format-time-Cq80KKvY.js +0 -1
  430. package/dist/client/assets/general-DDniHgaA.js +0 -1
  431. package/dist/client/assets/home-BRa0QePQ.js +0 -1
  432. package/dist/client/assets/index-BSPqDg2b.js +0 -243
  433. package/dist/client/assets/index-BV9YjMM8.js +0 -4
  434. package/dist/client/assets/index-CoCFpkNq.js +0 -1
  435. package/dist/client/assets/legacy-agents-deep-D4dQPRbz.js +0 -1
  436. package/dist/client/assets/library-CvZRvu0t.js +0 -1
  437. package/dist/client/assets/members-DV5nm69j.js +0 -1
  438. package/dist/client/assets/monitoring-L8Ph-qIO.js +0 -1
  439. package/dist/client/assets/mustache-DcAMNVPe.js +0 -4
  440. package/dist/client/assets/named-rule-view-DPJVdujZ.js +0 -1
  441. package/dist/client/assets/onboarding-CJ1-Q27q.js +0 -1
  442. package/dist/client/assets/openai-conversation-rJmL2Chq.js +0 -3
  443. package/dist/client/assets/organization-choice-B3HKKRFg.js +0 -1
  444. package/dist/client/assets/orgs-BGahARMX.js +0 -1
  445. package/dist/client/assets/page-seo-form-BiLzLwOU.js +0 -1
  446. package/dist/client/assets/parse-sections-DS7cH63b.js +0 -1
  447. package/dist/client/assets/plan-TS8UDjIx.js +0 -1
  448. package/dist/client/assets/post-calendar-BVj47Msq.js +0 -1
  449. package/dist/client/assets/post-editor-C7Epq6Gf.js +0 -2
  450. package/dist/client/assets/preview-tab-CstRd2P8.js +0 -551
  451. package/dist/client/assets/profile-HCYVLr3x.js +0 -1
  452. package/dist/client/assets/project-app-view-CsgTKaq6.js +0 -1
  453. package/dist/client/assets/project-feed-CSKm059T.js +0 -1
  454. package/dist/client/assets/project-reports-N6Np5HVd.js +0 -1
  455. package/dist/client/assets/project-tasks-hQ8mdw3x.js +0 -1
  456. package/dist/client/assets/projects-BR95BuCh.js +0 -1
  457. package/dist/client/assets/record-editor-gFz45d56.js +0 -1
  458. package/dist/client/assets/redirect-editor-DPpKBLYS.js +0 -1
  459. package/dist/client/assets/releases-api-CSVCy8ox.js +0 -1
  460. package/dist/client/assets/reports-BVHdd1DX.js +0 -1
  461. package/dist/client/assets/reports-onboarding-UQrdSX_1.js +0 -1
  462. package/dist/client/assets/reports-tab-ppUXZsCY.js +0 -2
  463. package/dist/client/assets/repositories-5RxDBg9o.js +0 -1
  464. package/dist/client/assets/repositories-DZ7Jj2ky.js +0 -1
  465. package/dist/client/assets/repository-binding-BPraGDH6.js +0 -1
  466. package/dist/client/assets/repository-picker-C8ArkEMp.js +0 -1
  467. package/dist/client/assets/review-settings-CdVHPED2.js +0 -1
  468. package/dist/client/assets/roles-OamyC7La.js +0 -1
  469. package/dist/client/assets/route-C9Fxdgiw.js +0 -1
  470. package/dist/client/assets/route-CwPF8ORe.js +0 -1
  471. package/dist/client/assets/route-u0GAyBX0.js +0 -1
  472. package/dist/client/assets/runnable-block-editor-Bp72FsGX.js +0 -20
  473. package/dist/client/assets/search-input-5CsF8kzc.js +0 -1
  474. package/dist/client/assets/secret-ciphertext-DjJJ47rv.js +0 -1
  475. package/dist/client/assets/secret-picker-BO4uK8to.js +0 -1
  476. package/dist/client/assets/secrets-D1oNMOlx.js +0 -1
  477. package/dist/client/assets/sections-editor-DR2QTs_8.js +0 -4
  478. package/dist/client/assets/seo-editor-_CrgKo3u.js +0 -1
  479. package/dist/client/assets/settings-tab-CXub7dpW.js +0 -1
  480. package/dist/client/assets/shell-layout-CnFOD7IR.js +0 -1
  481. package/dist/client/assets/site-draft-actions-DahX0dKS.js +0 -12
  482. package/dist/client/assets/site-draft-view-D6OUnR3H.js +0 -2
  483. package/dist/client/assets/site-editor-FcBrQD_V.js +0 -1
  484. package/dist/client/assets/site-editor-toast-CrL8-myE.js +0 -1
  485. package/dist/client/assets/skills-dBhtb1Gn.js +0 -1
  486. package/dist/client/assets/sso-K3rjig-T.js +0 -1
  487. package/dist/client/assets/synced-repos-Dnzg3gpT.js +0 -1
  488. package/dist/client/assets/task-assignee-avatar-ZgHLf6ou.js +0 -1
  489. package/dist/client/assets/taskboard-analytics-BkUf4gRJ.js +0 -1
  490. package/dist/client/assets/tasks-CAS-CTER.js +0 -4
  491. package/dist/client/assets/tasks-qaZFyecx.js +0 -1
  492. package/dist/client/assets/thread-analytics-DUGo9IpI.js +0 -1
  493. package/dist/client/assets/thread-route-GuSmOAXN.js +0 -1
  494. package/dist/client/assets/thread-sheet-body-BFLCqyyQ.js +0 -1
  495. package/dist/client/assets/toggle-group-6nw88m-B.js +0 -1
  496. package/dist/client/assets/track-CZFERlEy.js +0 -1
  497. package/dist/client/assets/use-apply-named-rule-CTNrtoG8.js +0 -1
  498. package/dist/client/assets/use-autosave-BhBt5LM5.js +0 -1
  499. package/dist/client/assets/use-connection-CjozY_rG.js +0 -1
  500. package/dist/client/assets/use-date-fns-locale-QW50a7Gw.js +0 -1
  501. package/dist/client/assets/use-deco-credits-B57v3A_1.js +0 -1
  502. package/dist/client/assets/use-delete-connection-C8eU1V0w.js +0 -1
  503. package/dist/client/assets/use-join-requests-Cbj3PHUb.js +0 -1
  504. package/dist/client/assets/use-main-panel-tabs-CO8s8ZiU.js +0 -1
  505. package/dist/client/assets/use-members-Dyl3oSqD.js +0 -1
  506. package/dist/client/assets/use-move-blocks-DJK_Y1io.js +0 -1
  507. package/dist/client/assets/use-org-auth-client-Dw_o5R0I.js +0 -1
  508. package/dist/client/assets/use-organization-roles-DaU1N-it.js +0 -1
  509. package/dist/client/assets/use-reports-diagnostic-BCaZjPYS.js +0 -1
  510. package/dist/client/assets/use-section-preview-base-BqthfvXx.js +0 -1
  511. package/dist/client/assets/use-session-runtime-GSil35TM.js +0 -1
  512. package/dist/client/assets/use-task-board-analytics-CzI79mN4.js +0 -1
  513. package/dist/client/assets/useInfiniteQuery-BMw5-0ES.js +0 -1
  514. package/dist/client/assets/useQueries-MmC9BfTO.js +0 -1
  515. package/dist/client/assets/useSuspenseInfiniteQuery-BzZNrnpe.js +0 -1
  516. package/dist/client/assets/users-DwCtEgjJ.js +0 -1
  517. package/dist/client/assets/variant-calendar-2sbluJx7.js +0 -1
  518. package/dist/client/assets/variant-matcher-override-BuVYz4je.js +0 -1
@@ -0,0 +1 @@
1
+ import{aK as be,dY as Oe,dW as Me,aL as de,cT as ze,c as U,b as V,j as t,h as Ne,B,r as Q,l as Se,a4 as te,aq as Ee,U as me,K as ee,d as se,z as ye,ay as _e,gn as Re,bA as Ue,n as Fe,hb as ue,a3 as Ve,I as J,Z as Le,V as Be,Y as qe,X as xe,M as Ge,f as Ke,ht as He,q as Xe,gT as Qe,aJ as We,aI as Ye,o as Je,t as Y}from"./index-C4tYnNih.js";import{g as Ze}from"./extract-connection-data-DwkOg2rJ.js";import{E as Ce}from"./empty-state-D86P1Giw.js";import{E as et,r as tt,b as st,c as nt}from"./connection-form-helpers-DCRY9s0M.js";import{c as it,S as ot,D as at}from"./index-DQ4MCRAi.js";import{u as we,T as lt}from"./use-mcp-auth-status-Dxn8Kcei.js";import{a as rt}from"./mcp-oauth-CnB7EPe0.js";import{I as ae}from"./integration-icon-wG7mou98.js";import{s as ct}from"./Plus-CcJNnBya.js";import{bi as dt,aD as mt,az as ut,v as ne}from"./agent-icon-KvVT3fA8.js";import{a as Ie,d as xt,s as pt}from"./Tool01-BvlRH5Ln.js";import{s as re}from"./Trash01-C9E8l_mI.js";import{b as ft,a as ht,c as gt,S as jt,d as vt}from"./sheet-DYw2VD7L.js";import{F as G,b as K,c as H,d as L,f as X,e as bt,a as Nt}from"./form-CKF06Eu0.js";import{a as ke,b as Te,u as St}from"./use-connection-CBlLT-Gl.js";import{u as Ae}from"./use-mcp-client-BkBWhGyj.js";import{u as yt}from"./use-mcp-tools-Cq-ES3mk.js";import{a as _t}from"./use-mcp-prompts-DWjSk3XQ.js";import{i as Ct}from"./mcp-oauth-5QMuPFQa.js";import{u as wt,D as It}from"./use-delete-connection-3ef0jZgj.js";import{c as kt}from"./monitoring-stats-row-BpfaRq5_.js";import{b as Tt,C as At,a as Pt}from"./chart-Bp6om7lj.js";import{a as Dt,B as $t}from"./BarChart-wLDzzyOQ.js";import{C as Ot}from"./tooltipContext-DMiC5t9-.js";import{b as Mt}from"./repository-binding-C7GXruB1.js";import{T as ie,a as zt,b as oe,c as Et}from"./tabs-B5O9VNwn.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{n as Rt}from"./ShoppingBag01-C82UeRR9.js";import{g as ce}from"./types-C_LaIhQe.js";import{M as Ut}from"./mcp-app-renderer-vHEVQIZL.js";import{C as Ft}from"./collection-search-Cf4li4kg.js";import{B as Vt}from"./badge-Ckz5LqgP.js";import{S as pe,b as fe,a as he,d as ge,c as q}from"./select-BZ2tKCpr.js";import{i as Lt}from"./CheckCircle-BE1i_X4b.js";import{t as Bt}from"./ChevronUp-RlBkcpdd.js";import{n as qt}from"./LinkBroken01-XqJUgSE7.js";import{c as Gt}from"./UserSquare-DwNuAluZ.js";import{s as Kt}from"./XClose-BBReaSBA.js";import{p as Ht,i as Xt}from"./connection-QGwhnKZn.js";import{c as Qt}from"./schema-DIZqRcY2.js";import"./metadata-D72DunRR.js";import"./Key01-CxKYO-oQ.js";import"./auth-Dqt9menC.js";import"./index-DMcUJv3F.js";import"./index-B8bCJ3Gm.js";import"./index-BdQq_4o_.js";import"./index-DG_Aoo8H.js";import"./popover-7hw0_Cgu.js";import"./tooltip-B1eS9Khq.js";import"./index-B0Hb2bUK.js";import"./SearchMd-5lGv5a5H.js";import"./use-mobile-BADuLdb7.js";import"./use-create-virtual-mcp-DFsMYI92.js";import"./use-navigate-to-agent-B3bMlZK-.js";import"./thread-intent-B9ceQWmI.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BBTCM7MS.js";import"./task-board-CBBaN9ua.js";import"./schema-DXQBt-Da.js";import"./slugify-CEUa2lfQ.js";import"./Image01-ClayPF_a.js";import"./AlertCircle-Bq5T03B8.js";import"./ArrowUp-CzX0fTk7.js";import"./ArrowLeft-Bwi_Jr7f.js";import"./ZoomOut-CnbxUNSo.js";import"./Building02-A_MT9tNO.js";import"./ChevronSelectorVertical-DNrt0MHW.js";import"./Copy01-B9x501ud.js";import"./CreditCard01-Bu_qRR36.js";import"./DotsVertical-D9231JAc.js";import"./Globe04-DQlP6Nhr.js";import"./SwitchHorizontal01-B1MoYKPo.js";import"./Link01-B7BHRxIW.js";import"./Minus-Bh6ogRng.js";import"./Monitor01-BpzvJnXA.js";import"./Sun-IvvKZ51n.js";import"./Play-w4omVTRa.js";import"./Upload01-mlw10ZK-.js";import"./Users01-DcHPIKgH.js";import"./label-Kngegn1Y.js";import"./CartesianChart-B0qX_dpC.js";import"./CategoricalChart-BDZ_2Tmn.js";import"./AreaChart-CCyND0Jp.js";import"./symbol-pDh9bf5z.js";import"./ActiveShapeUtils-Bp4fmUBo.js";import"./Sector-gkUUnvA4.js";import"./ErrorBarContext-PGp8cmoe.js";import"./active-indicator-CCMhAsc_.js";import"./url-slug-BEmF9qH1.js";const Wt=be({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:be({}),outputSchema:Wt}];function Jt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l}=s,a=V();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=we(r),x=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,f=n.status!=="active",m=x||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==m?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",m),e[2]=m,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 N;e[9]!==n.status||e[10]!==f||e[11]!==x||e[12]!==a?(N=x?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=x,e[12]=a,e[13]=N):N=e[13];let _;e[14]!==j||e[15]!==N?(_=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,N]}),e[14]=j,e[15]=N,e[16]=_):_=e[16];let y;e[17]!==n||e[18]!==x||e[19]!==o||e[20]!==a?(y=x&&t.jsx(B,{variant:"outline",size:"sm",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=x,e[19]=o,e[20]=a,e[21]=y):y=e[21];let C;e[22]!==n||e[23]!==f||e[24]!==l||e[25]!==a?(C=f?t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(dt,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground",onClick:()=>l(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(mt,{size:13})}),e[22]=n,e[23]=f,e[24]=l,e[25]=a,e[26]=C):C=e[26];let D;e[27]!==n||e[28]!==c?(D=()=>c(n),e[27]=n,e[28]=c,e[29]=D):D=e[29];let w;e[30]!==a?(w=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=w):w=e[31];let $;e[32]!==a?($=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=$):$=e[33];let O;e[34]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Ie,{size:13}),e[34]=O):O=e[34];let P;e[35]!==D||e[36]!==w||e[37]!==$?(P=t.jsx(B,{variant:"ghost",size:"icon-sm",onClick:D,title:w,"aria-label":$,children:O}),e[35]=D,e[36]=w,e[37]=$,e[38]=P):P=e[38];let T;e[39]!==n||e[40]!==i?(T=()=>i(n),e[39]=n,e[40]=i,e[41]=T):T=e[41];let S;e[42]!==a?(S=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=S):S=e[43];let v;e[44]!==a?(v=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=v):v=e[45];let z;e[46]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(re,{size:13}),e[46]=z):z=e[46];let E;e[47]!==T||e[48]!==S||e[49]!==v?(E=t.jsx(B,{variant:"ghost-destructive",size:"icon-sm",onClick:T,title:S,"aria-label":v,children:z}),e[47]=T,e[48]=S,e[49]=v,e[50]=E):E=e[50];let M;e[51]!==P||e[52]!==E||e[53]!==y||e[54]!==C?(M=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,C,P,E]}),e[51]=P,e[52]=E,e[53]=y,e[54]=C,e[55]=M):M=e[55];let A;return e[56]!==M||e[57]!==h||e[58]!==g||e[59]!==_?(A=t.jsxs("div",{className:h,children:[g,_,M]}),e[56]=M,e[57]=h,e[58]=g,e[59]=_,e[60]=A):A=e[60],A}function Zt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=V();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 a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let r;e[8]!==o?(r=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=r):r=e[9];let d;e[10]!==o?(d=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ie,{size:13}),e[12]=u):u=e[12];let x;e[13]!==a||e[14]!==r||e[15]!==d?(x=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon-sm",onClick:a,title:r,"aria-label":d,children:u})}),e[13]=a,e[14]=r,e[15]=d,e[16]=x):x=e[16];let f;return e[17]!==i||e[18]!==l||e[19]!==x?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,x]}),e[17]=i,e[18]=l,e[19]=x,e[20]=f):f=e[20],f}function es(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l,onAdd:a,isAdding:r}=s,d=V();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 x;e[3]!==u?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=x):x=e[4];let f;e[5]!==r?(f=r?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(ct,{size:13}),e[5]=r,e[6]=f):f=e[6];let m;e[7]!==d?(m=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=m):m=e[8];let h;e[9]!==r||e[10]!==a||e[11]!==f||e[12]!==m?(h=t.jsxs(B,{variant:"default",size:"sm",className:"gap-1.5",onClick:a,disabled:r,children:[f,m]}),e[9]=r,e[10]=a,e[11]=f,e[12]=m,e[13]=h):h=e[13];let g;e[14]!==x||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,h]}),e[14]=x,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==l){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==l?(y=C=>t.jsx(Q.Suspense,{fallback:t.jsx(Zt,{instance:C,onConfigure:c}),children:t.jsx(Jt,{instance:C,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l})},C.id),e[23]=o,e[24]=c,e[25]=i,e[26]=l,e[27]=y):y=e[27],j=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=l,e[22]=j}else j=e[22];let N;e[28]!==j?(N=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=N):N=e[29];let _;return e[30]!==g||e[31]!==N?(_=t.jsxs("div",{className:"surface overflow-hidden",children:[g,N]}),e[30]=g,e[31]=N,e[32]=_):_=e[32],_}function ts(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const 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:o}=s,i=V(),l=Ee(),a=ns(o),{data:r}=me({queryKey:ee.connectionActivity(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=kt(r?.logs??[],a,void 0,r?.total,d?.total),x=u.data,f=u.totalCalls>0,m=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")})]})]}),f?t.jsxs("div",{children:[t.jsx(Tt,{config:is,className:"h-16 w-full",children:t.jsxs(Dt,{data:x,barCategoryGap:"4%",children:[t.jsx(At,{content:t.jsx(Pt,{labelFormatter:rs}),cursor:{fill:"var(--muted)"}}),t.jsx($t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:x.map(ls)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-2xs text-muted-foreground",children:x[0]?.label}),t.jsx("span",{className:"text-2xs text-muted-foreground",children:x[x.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")})}),m.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:m.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=V(),[o,i]=Q.useState("14d"),{org:l}=te();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let r;e[2]!==a?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,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]!==o?(u=ss.map(j=>t.jsx("button",{type:"button","aria-pressed":o===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium rounded-lg transition-colors",o===j.value?"bg-card text-foreground shadow-edge":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=o,e[7]=u):u=e[7];let x;e[8]!==d||e[9]!==u?(x=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]=x):x=e[10];let f;e[11]!==r||e[12]!==x?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,x]}),e[11]=r,e[12]=x,e[13]=f):f=e[13];let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(cs,{}),e[14]=m):m=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==o?(h=t.jsx(Q.Suspense,{fallback:m,children:t.jsx(os,{connectionId:n,orgId:l.id,timeframe:o})}),e[15]=n,e[16]=l.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"surface overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function ms(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=se();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const x=crypto.randomUUID();o({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:x}})},e[0]=o,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 a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=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(_e,{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]!==a||e[13]!==r?(u=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-accent transition-colors group text-left w-full",children:[a,r,d]}),e[11]=i,e[12]=a,e[13]=r,e[14]=u):u=e[14],u}function us(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=a=>t.jsx(ms,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=l):l=e[4],o=n.map(l),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function xs(s){const e=U.c(13),{connection:n}=s,c=V(),{org:o}=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=Mt(i);if(!(l.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}let 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]!==o.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(us,{virtualMcps:l,org:o.slug})}),e[7]=o.slug,e[8]=l,e[9]=u):u=e[9];let x;return e[10]!==d||e[11]!==u?(x=t.jsxs("div",{className:"surface overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=x):x=e[12],x}function ps(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=V(),l=se(),{org:a}=te();let r;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(r={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=r):r=e[3];const d=Ae(r),u=ke(c);let x;e[4]!==u||e[5]!==c?(x=u?Pe(u):c,e[4]=u,e[5]=c,e[6]=x):x=e[6];const f=x,[m,h]=Q.useState("");let g,j,N,_;if(e[7]!==f||e[8]!==d||e[9]!==l||e[10]!==o||e[11]!==m||e[12]!==i||e[13]!==n){const D=(n??[]).filter(fs),w=m.toLowerCase().trim(),$=w?D.filter(v=>v.name.toLowerCase().includes(w)||v.description&&v.description.toLowerCase().includes(w)):D;let O;e[18]!==f||e[19]!==l||e[20]!==o?(O=v=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(v.name)}})},e[18]=f,e[19]=l,e[20]=o,e[21]=O):O=e[21];const P=O;N="flex flex-col h-full overflow-hidden";let T;e[22]!==i?(T=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=T):T=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=v=>{v.key==="Escape"&&(h(""),v.target.blur())},e[24]=S):S=e[24],e[25]!==m||e[26]!==T?(_=t.jsx(Ft,{value:m,onChange:h,placeholder:T,onKeyDown:S}),e[25]=m,e[26]=T,e[27]=_):_=e[27],g="flex-1 overflow-auto p-5",j=$.length===0?t.jsx(Ce,{image:null,title:i(m?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(m?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:$.map(v=>{const z=ce(v._meta);return t.jsxs(Re,{size:"flush",className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>P(v),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Q.Suspense,{fallback:t.jsx(Ue,{className:"h-full w-full"}),children:t.jsx(Ut,{resourceURI:z,toolInfo:{tool:v},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:v.annotations?.title??v.name}),t.jsx(lt,{annotations:v.annotations,_meta:v._meta})]}),v.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:v.description})]})]},v.name)})}),e[7]=f,e[8]=d,e[9]=l,e[10]=o,e[11]=m,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=N,e[17]=_}else g=e[14],j=e[15],N=e[16],_=e[17];let y;e[28]!==g||e[29]!==j?(y=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=y):y=e[30];let C;return e[31]!==N||e[32]!==_||e[33]!==y?(C=t.jsxs("div",{className:N,children:[_,y]}),e[31]=N,e[32]=_,e[33]=y,e[34]=C):C=e[34],C}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"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=V();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function hs(s){const e=U.c(68),{tools:n,prompts:c,resources:o,connectionId:i,org:l}=s,a=c===void 0?je:c,r=o===void 0?je:o,d=V(),u=se(),x=ke(i??"");let f;e[0]!==x||e[1]!==i?(f=x?Pe(x):i,e[0]=x,e[1]=i,e[2]=f):f=e[2];const m=f;let h;e[3]!==m||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(I){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:m,collectionName:"tools",itemId:encodeURIComponent(I)}})},e[3]=m,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(vs),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const N=j;if(n.length+a.length+r.length===0){let b;e[12]!==d?(b=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=b):b=e[13];let I;e[14]!==b?(I=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:b}),e[14]=b,e[15]=I):I=e[15];let k;e[16]!==d?(k=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=k):k=e[17];let F;e[18]!==k?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:k}),e[18]=k,e[19]=F):F=e[19];let W;return e[20]!==I||e[21]!==F?(W=t.jsxs("div",{className:"surface p-5",children:[I,F]}),e[20]=I,e[21]=F,e[22]=W):W=e[22],W}let y;e[23]!==d||e[24]!==n.length?(y=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=y):y=e[25];let C;e[26]!==y?(C=t.jsx(ie,{value:"tools",variant:"underline",children:y}),e[26]=y,e[27]=C):C=e[27];let D;e[28]!==N||e[29]!==d?(D=N&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=N,e[29]=d,e[30]=D):D=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let $;e[33]!==w?($=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=$):$=e[34];let O;e[35]!==d?(O=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=O):O=e[36];let P;e[37]!==O?(P=t.jsx(ie,{value:"resources",variant:"underline",children:O}),e[37]=O,e[38]=P):P=e[38];let T;e[39]!==$||e[40]!==P||e[41]!==C||e[42]!==D?(T=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(zt,{variant:"underline",className:"gap-1",children:[C,D,$,P]})}),e[39]=$,e[40]=P,e[41]=C,e[42]=D,e[43]=T):T=e[43];let S;e[44]!==g||e[45]!==n?(S=n.length>0?n.map(b=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-accent transition-colors cursor-pointer",onClick:()=>g(b.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(xt,{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(b.name)}),b.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:b.description})]}),t.jsx(_e,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},b.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=S):S=e[46];let v;e[47]!==S?(v=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:S})}),e[47]=S,e[48]=v):v=e[48];let z;e[49]!==i||e[50]!==N||e[51]!==l||e[52]!==n?(z=N&&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]=N,e[51]=l,e[52]=n,e[53]=z):z=e[53];let E;e[54]!==a?(E=a.length>0?a.map(js):t.jsx(le,{label:"prompts"}),e[54]=a,e[55]=E):E=e[55];let M;e[56]!==E?(M=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[56]=E,e[57]=M):M=e[57];let A;e[58]!==r?(A=r.length>0?r.map(gs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let p;return e[62]!==T||e[63]!==v||e[64]!==z||e[65]!==M||e[66]!==R?(p=t.jsx("div",{className:"surface overflow-hidden",children:t.jsxs(Et,{defaultValue:"tools",variant:"underline",children:[T,v,z,M,R]})}),e[62]=T,e[63]=v,e[64]=z,e[65]=M,e[66]=R,e[67]=p):p=e[67],p}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(ut,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function 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(Rt,{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 vs(s){return ce(s._meta)}function bs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(ae,{icon:n.icon,name:o,size:"md",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let l;e[3]!==o?(l=t.jsx(Fe.Title,{children:o}),e[3]=o,e[4]=l):l=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let r;e[7]!==l||e[8]!==a?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[7]=l,e[8]=a,e[9]=r):r=e[9];let d;return e[10]!==i||e[11]!==r?(d=t.jsxs("div",{className:"flex items-center px-4 md:px-8 bg-background border-b border-border shrink-0 gap-3 py-4",children:[i,r]}),e[10]=i,e[11]=r,e[12]=d):d=e[12],d}function Ns({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=V(),l=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Ve(),d=(()=>{if(typeof a!="string"||!a)return!1;try{const m=new URL(a);return m.hostname==="api.githubcopilot.com"&&m.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",f=x?Ht(e.connection_url):null;return x?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")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(G,{control:s.control,name:"ui_type",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(H,{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:m.value,onValueChange:m.onChange,children:[t.jsx(L,{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(K,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(J,{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:m.value,onValueChange:m.onChange,children:[t.jsx(L,{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(qt,{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(Gt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),l==="NPX"&&t.jsx(G,{control:s.control,name:"npx_package",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...m,value:m.value||"",className:"h-10"})}),t.jsx(X,{})]})}),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:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...m,value:m.value||"",className:"h-10"})}),t.jsx(X,{})]})}),t.jsx(G,{control:s.control,name:"stdio_args",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...m,value:m.value||"",className:"h-10"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(X,{})]})})]}),t.jsx(G,{control:s.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...m,value:m.value||"",className:"h-10"})}),t.jsx(X,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(G,{control:s.control,name:"env_vars",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(L,{children:t.jsx(et,{value:m.value??[],onChange:m.onChange})}),t.jsx(X,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(G,{control:s.control,name:"connection_token",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(H,{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(Le,{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(Vt,{variant:"success",className:"gap-1.5",children:[t.jsx(Lt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Bt,{size:12})]})})}),t.jsxs(qe,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(pt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&m.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:()=>m.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-accent opacity-0 group-hover:opacity-100 transition-opacity 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(L,{children:t.jsx(J,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...m,value:m.value||"",className:"h-10"})}),d&&t.jsxs(bt,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(X,{})]})})]})}function Ss(s){return s.command==="npx"}function ys(s){return s.args?.find(e=>!e.startsWith("-"))??""}function _s(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function ve(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,o=tt(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:o}}const i=_s(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Cs(s){let e,n=null,c=!1,o=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=st(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=nt(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&&s.connection_token!==void 0,o=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:o},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ws({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:l,siblings:a}){const r=V(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Xe(),x=Te(),{org:f}=te(),m=wt({onSuccess:()=>{a.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Q.useState(null),[j,N]=Q.useState(!1),_=we({connectionId:e}),{data:y}=Qe(),C=y?.data?.members??[],D=h??s,w=C.find(p=>p.userId===D.created_by),O=s?.connection_type==="VIRTUAL"||_.isAuthenticated,P={...s,tools:o},T=it(P,Yt),S=We({resolver:Ye(Qt),values:ve(h??s)}),v=S.formState.isDirty,z=async()=>{if(!await S.trigger())return;const b=S.getValues(),I=Cs(b),k=h?.id??e;await x.update.mutateAsync({id:k,data:I}),S.reset(b)},E=()=>{S.reset(ve(h??s))},M=async p=>{const b=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:I,tokenInfo:k,error:F}=await rt({connectionId:p,orgSlug:f.slug,...b?{scope:b}:{}});if(F||!I){Y.error(r("details.connection.authFailed",{error:F??""}));return}if(k)try{const Z=await fetch(`/api/${f.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:k.accessToken,refreshToken:k.refreshToken,expiresIn:k.expiresIn,scope:k.scope,clientId:k.clientId,clientSecret:k.clientSecret,tokenEndpoint:k.tokenEndpoint})});if(!Z.ok)console.error("Failed to save OAuth token:",await Z.text()),await x.update.mutateAsync({id:p,data:{connection_token:I}});else try{await x.update.mutateAsync({id:p,data:{}})}catch($e){console.warn("Failed to refresh connection tools after OAuth:",$e)}}catch(Z){console.error("Error saving OAuth token:",Z),await x.update.mutateAsync({id:p,data:{connection_token:I}})}else await x.update.mutateAsync({id:p,data:{connection_token:I}});const W=new URL(`/api/${f.slug}/mcp/${p}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(W.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),Y.success(r("details.connection.authSuccess"))},A=()=>M(s.id),R=async()=>{try{const p=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!p.ok){const I=await p.text();Y.error(r("details.connection.failedRemoveOAuth",{error:I}));return}const b=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(b.href,null)}),Y.success(r("details.connection.oauthRemoved"))}catch(p){console.error("Error removing OAuth token:",p),Y.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(It,{...m}),t.jsx(ft,{open:h!==null,onOpenChange:p=>{p||g(null)},children:t.jsxs(ht,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(gt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(jt,{className:"text-base",children:h?.title??s.title}),t.jsx(vt,{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(Je,{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(Nt,{...S,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:S.control,name:"title",render:({field:p})=>t.jsxs(K,{children:[t.jsx(H,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...p})}),t.jsx(X,{})]})}),t.jsx(G,{control:S.control,name:"description",render:({field:p})=>t.jsxs(K,{children:[t.jsx(H,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(J,{...p,value:p.value||""})}),t.jsx(X,{})]})})]}),t.jsx(Ns,{form:S,connection:h??s,hasOAuthToken:_.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(ot,{connection:h??s,form:S,hasMcpBinding:T,isMCPAuthenticated:O,supportsOAuth:_.supportsOAuth,isServerError:_.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:z,disabled:!v||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),v&&t.jsx(B,{variant:"outline",onClick:E,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive",onClick:()=>{const p=h??s;g(null),m.requestDelete(p)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(at,{children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(bs,{connection:s,displayTitle:(()=>{const p=a[0]??s;return p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.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:a,onConfigure:p=>g(p),onAuthenticate:p=>M(p.id),onDelete:p=>m.requestDelete(p),onToggleStatus:async(p,b)=>{try{await x.update.mutateAsync({id:p.id,data:{status:b}}),Y.success(r(b==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{N(!0);try{const p=a[0]??s,b=p.title.replace(/\s*\(\d+\)\s*$/,""),I=a.length+1,k=`${b} (${I})`,F=Ze("conn");await x.create.mutateAsync({id:F,title:k,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p.created_by,organization_id:p.organization_id,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null,oauth_config:null,configuration_state:p.configuration_state??null,metadata:null,tools:null,bindings:null});const W=new URL(`/api/${f.slug}/mcp/${F}`,window.location.origin),Z=await Ct({url:W.href,token:null,orgId:f.id});Z.supportsOAuth&&!Z.isAuthenticated&&await M(F)}catch(p){console.error("Failed to add connection instance:",p),Y.error(r("details.connection.failedAddInstance"))}finally{N(!1)}}}),t.jsx(xs,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(hs,{tools:o,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Is(){const s=U.c(43),e=V();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 o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:l}=Ke(o),{org:a}=te(),r=Te();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=St(d),[x,f]=Q.useState(null),m=u.find(A=>A.id===x)??u[0]??null;m&&m.id!==x&&f(m.id);const h=m?.id??"",g=Ae({connectionId:h||null,orgId:a.id,orgSlug:a.slug});let j;s[4]!==g?(j={client:g},s[4]=g,s[5]=j):j=s[5];const{data:N}=yt(j),_=N?N.tools.map($s):(m?.tools??[]).map(Ds);let y;e:{if(u.length<=1){y=_;break e}const A=new Set,R=[],p=As;for(const b of u){const I=b.id===h?_:p(b.tools);for(const k of I)A.has(k.name)||(A.add(k.name),R.push(k))}y=R.length>0?R:_}const C=y;let D;s[6]!==g?(D={client:g},s[6]=g,s[7]=D):D=s[7];const{data:w}=_t(D);let $;s[8]!==g?($={client:g},s[8]=g,s[9]=$):$=s[9];const{data:O}=He($);let P;s[10]!==w?.prompts?(P=w?.prompts??[],s[10]=w?.prompts,s[11]=P):P=s[11];let T;s[12]!==P?(T=P.map(Ts),s[12]=P,s[13]=T):T=s[13];const S=T;let v;s[14]!==O?.resources?(v=O?.resources??[],s[14]=O?.resources,s[15]=v):v=s[15];let z;s[16]!==v?(z=v.map(ks),s[16]=v,s[17]=z):z=s[17];const E=z;if(!m){let A;s[18]!==e?(A=e("details.connection.notFoundTitle"),s[18]=e,s[19]=A):A=s[19];let R;s[20]!==e?(R=e("details.connection.notFoundDescription"),s[20]=e,s[21]=R):R=s[21];let p;s[22]!==c||s[23]!==l?(p=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[22]=c,s[23]=l,s[24]=p):p=s[24];let b;s[25]!==e?(b=e("details.connection.backButton"),s[25]=e,s[26]=b):b=s[26];let I;s[27]!==p||s[28]!==b?(I=t.jsx(B,{variant:"outline",onClick:p,children:b}),s[27]=p,s[28]=b,s[29]=I):I=s[29];let k;return s[30]!==A||s[31]!==R||s[32]!==I?(k=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ce,{title:A,description:R,actions:I})}),s[30]=A,s[31]=R,s[32]=I,s[33]=k):k=s[33],k}let M;return s[34]!==r.update.isPending||s[35]!==C||s[36]!==m||s[37]!==h||s[38]!==l||s[39]!==S||s[40]!==E||s[41]!==u?(M=t.jsx(ws,{org:l,connection:m,connectionId:h,isUpdating:r.update.isPending,tools:C,prompts:S,resources:E,siblings:u}),s[34]=r.update.isPending,s[35]=C,s[36]=m,s[37]=h,s[38]=l,s[39]=S,s[40]=E,s[41]=u,s[42]=M):M=s[42],M}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(Q.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 ji(){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{ji as default};
@@ -1 +1 @@
1
- import{c as z,j as c,I as T,B as N}from"./index-BSPqDg2b.js";import{s as A}from"./Plus-D3sv1Vc5.js";import{s as H}from"./Trash01-DT07olaT.js";function S(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(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function $(n){const e=z.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:k}=n,p=o===void 0?"VARIABLE_NAME":o,h=s===void 0?"value...":s;let _;e[0]!==r||e[1]!==t?(_=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=_):_=e[2];const C=_;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((u,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let b;e[6]!==r||e[7]!==t?(b=(l,u)=>{const i=[...t],a=i[l];a&&(i[l]={key:u,value:a.value},r(i))},e[6]=r,e[7]=t,e[8]=b):b=e[8];const v=b;let P;e[9]!==r||e[10]!==t?(P=(l,u)=>{const i=[...t],a=i[l];a&&(i[l]={key:a.key,value:u},r(i))},e[9]=r,e[10]=t,e[11]=P):P=e[11];const g=P;let f;if(e[12]!==v||e[13]!==y||e[14]!==g||e[15]!==p||e[16]!==t||e[17]!==h){let l;e[19]!==v||e[20]!==y||e[21]!==g||e[22]!==p||e[23]!==h?(l=(u,i)=>c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx(T,{placeholder:p,value:u.key,onChange:a=>v(i,a.target.value),className:"h-10 flex-1 font-mono"}),c.jsx(T,{type:S(u.key)?"password":"text",placeholder:h,value:u.value,onChange:a=>g(i,a.target.value),className:"h-10 flex-1"}),c.jsx(N,{type:"button",variant:"ghost-destructive",size:"icon",className:"size-10 shrink-0",onClick:()=>y(i),children:c.jsx(H,{size:16})})]},i),e[19]=v,e[20]=y,e[21]=g,e[22]=p,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=v,e[13]=y,e[14]=g,e[15]=p,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=c.jsx(A,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let m;e[26]!==C?(m=c.jsxs(N,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:C,children:[w,"Add Environment Variable"]}),e[26]=C,e[27]=m):m=e[27];let d;e[28]!==f||e[29]!==m?(d=c.jsxs("div",{className:"flex flex-col gap-2",children:[f,m]}),e[28]=f,e[29]=m,e[30]=d):d=e[30];let E;return e[31]!==k||e[32]!==d?(E=c.jsx("div",{className:k,children:d}),e[31]=k,e[32]=d,e[33]=E):E=e[33],E}function R(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function K(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function j(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 W(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 o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function B(n){const{uiType:e}=n,t=j(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===j("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 G(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=j(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(p=>j(p.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function U(n,e){const t={command:"npx",args:["-y",n]},r=R(e);return Object.keys(r).length>0&&(t.envVars=r),t}function M(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=R(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{$ as E,G as a,U as b,M as c,B as i,W as p,K as r};
1
+ import{c as z,j as c,I as T,B as N}from"./index-C4tYnNih.js";import{s as A}from"./Plus-CcJNnBya.js";import{s as H}from"./Trash01-C9E8l_mI.js";function S(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(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function $(n){const e=z.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:k}=n,p=o===void 0?"VARIABLE_NAME":o,h=s===void 0?"value...":s;let _;e[0]!==r||e[1]!==t?(_=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=_):_=e[2];const C=_;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((u,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let b;e[6]!==r||e[7]!==t?(b=(l,u)=>{const i=[...t],a=i[l];a&&(i[l]={key:u,value:a.value},r(i))},e[6]=r,e[7]=t,e[8]=b):b=e[8];const v=b;let P;e[9]!==r||e[10]!==t?(P=(l,u)=>{const i=[...t],a=i[l];a&&(i[l]={key:a.key,value:u},r(i))},e[9]=r,e[10]=t,e[11]=P):P=e[11];const g=P;let f;if(e[12]!==v||e[13]!==y||e[14]!==g||e[15]!==p||e[16]!==t||e[17]!==h){let l;e[19]!==v||e[20]!==y||e[21]!==g||e[22]!==p||e[23]!==h?(l=(u,i)=>c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx(T,{placeholder:p,value:u.key,onChange:a=>v(i,a.target.value),className:"h-10 flex-1 font-mono"}),c.jsx(T,{type:S(u.key)?"password":"text",placeholder:h,value:u.value,onChange:a=>g(i,a.target.value),className:"h-10 flex-1"}),c.jsx(N,{type:"button",variant:"ghost-destructive",size:"icon",className:"size-10 shrink-0",onClick:()=>y(i),children:c.jsx(H,{size:16})})]},i),e[19]=v,e[20]=y,e[21]=g,e[22]=p,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=v,e[13]=y,e[14]=g,e[15]=p,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=c.jsx(A,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let m;e[26]!==C?(m=c.jsxs(N,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:C,children:[w,"Add Environment Variable"]}),e[26]=C,e[27]=m):m=e[27];let d;e[28]!==f||e[29]!==m?(d=c.jsxs("div",{className:"flex flex-col gap-2",children:[f,m]}),e[28]=f,e[29]=m,e[30]=d):d=e[30];let E;return e[31]!==k||e[32]!==d?(E=c.jsx("div",{className:k,children:d}),e[31]=k,e[32]=d,e[33]=E):E=e[33],E}function R(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function K(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function j(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 W(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 o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function B(n){const{uiType:e}=n,t=j(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===j("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 G(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=j(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(p=>j(p.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function U(n,e){const t={command:"npx",args:["-y",n]},r=R(e);return Object.keys(r).length>0&&(t.envVars=r),t}function M(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=R(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{$ as E,G as a,U as b,M as c,B as i,W as p,K as r};
@@ -0,0 +1 @@
1
+ import{r as z,c as G,b as se,j as t,aM as We,aN as Xe,aO as Ge,aP as Qe,bl as qe,aQ as Ye,aR as Je,aS as Ze,B as L,h as ge,l as he,X as ce,x as ke,aY as Te,w as we,y as Ae,v as Ie,D as Pe,V as et,Z as tt,Y as nt,M as st,a4 as Me,d as $e,u as ot,a as Fe,a3 as it,ap as ye,ad as ct,ax as lt,az as rt,aJ as at,aI as dt,n as ae,I as oe,C as ne,q as ut,aq as gt,t as X,eb as pt,K as mt,g3 as ft}from"./index-C4tYnNih.js";import{a as Oe,g as ht,e as xt}from"./extract-connection-data-DwkOg2rJ.js";import{C as jt}from"./collection-display-button-CulG1s8m.js";import{S as St}from"./search-input-CM9T7koR.js";import{S as yt}from"./search-toggle-BA_oiAdj.js";import{C as Ct}from"./collection-tabs-x8ccQUAC.js";import{C as Ce,u as Ue,g as vt}from"./connection-card-DEMVrMsW.js";import{E as bt}from"./empty-state-D86P1Giw.js";import{u as _t,D as Dt}from"./use-delete-connection-3ef0jZgj.js";import{u as Nt}from"./use-infinite-scroll-WEv8wBk9.js";import{u as Ve}from"./use-mobile-BADuLdb7.js";import{g as ue}from"./connection-slug-CITJ0kGN.js";import{n as xe}from"./LinkBroken01-XqJUgSE7.js";import{g as kt,a as Tt}from"./metadata-D72DunRR.js";import{D as wt,a as At,d as It,b as Pt,e as Mt,f as $t,g as Ft}from"./drawer-GssD8cb3.js";import{F as q,b as Y,c as J,d as Z,f as ee,a as De}from"./form-CKF06Eu0.js";import{S as Ot,b as Ut,a as Vt,d as zt,c as de}from"./select-BZ2tKCpr.js";import{T as Lt}from"./textarea-CAZh8Kr5.js";import{b as ze,u as Et}from"./use-connection-CBlLT-Gl.js";import{m as Bt}from"./use-mcp-client-BkBWhGyj.js";import{b as Kt}from"./repository-binding-C7GXruB1.js";import{g as Ht}from"./types-C_LaIhQe.js";import{A as Rt,bL as Wt,aD as Xt,bi as Gt,v as Se}from"./agent-icon-KvVT3fA8.js";import{s as Le}from"./Plus-CcJNnBya.js";import{c as Qt}from"./UserSquare-DwNuAluZ.js";import{s as Ee}from"./XClose-BBReaSBA.js";import{s as qt}from"./use-project-scope-CKNjz3VB.js";import{c as Yt}from"./schema-DIZqRcY2.js";import{i as fe,a as Ne,E as Jt,p as Zt,b as en,c as tn}from"./connection-form-helpers-DCRY9s0M.js";import{a as nn}from"./authenticate-and-persist-oauth-BziZaG_M.js";import{I as sn}from"./integration-icon-wG7mou98.js";import{C as Be}from"./checkbox-BQ7Ebuar.js";import{i as on}from"./DotsVertical-D9231JAc.js";import{s as Ke}from"./Image01-ClayPF_a.js";import{s as He}from"./Trash01-C9E8l_mI.js";import"./connection-QGwhnKZn.js";import"./url-slug-BEmF9qH1.js";import"./ArrowUp-CzX0fTk7.js";import"./SwitchHorizontal01-B1MoYKPo.js";import"./tooltip-B1eS9Khq.js";import"./index-B0Hb2bUK.js";import"./toggle-group-8XrNtMoS.js";import"./active-indicator-CCMhAsc_.js";import"./badge-Ckz5LqgP.js";import"./SearchMd-5lGv5a5H.js";import"./icon-button-5JlhYc9R.js";import"./useInfiniteQuery-CtWUiDbh.js";import"./infiniteQueryObserver-CyNcT3qz.js";import"./slugify-CEUa2lfQ.js";import"./label-Kngegn1Y.js";import"./index-BdQq_4o_.js";import"./ChevronUp-RlBkcpdd.js";import"./auth-Dqt9menC.js";import"./AlertCircle-Bq5T03B8.js";import"./Tool01-BvlRH5Ln.js";import"./ArrowLeft-Bwi_Jr7f.js";import"./ShoppingBag01-C82UeRR9.js";import"./ZoomOut-CnbxUNSo.js";import"./Building02-A_MT9tNO.js";import"./CheckCircle-BE1i_X4b.js";import"./ChevronSelectorVertical-DNrt0MHW.js";import"./Copy01-B9x501ud.js";import"./CreditCard01-Bu_qRR36.js";import"./Globe04-DQlP6Nhr.js";import"./Key01-CxKYO-oQ.js";import"./Link01-B7BHRxIW.js";import"./Minus-Bh6ogRng.js";import"./Monitor01-BpzvJnXA.js";import"./Sun-IvvKZ51n.js";import"./Play-w4omVTRa.js";import"./Upload01-mlw10ZK-.js";import"./Users01-DcHPIKgH.js";import"./mcp-oauth-CnB7EPe0.js";import"./mcp-oauth-5QMuPFQa.js";function cn(s){const e=`deco-filters-${s}`,[n,g]=z.useState(()=>{try{const i=globalThis.localStorage?.getItem(e);if(i)return JSON.parse(i)}catch(i){console.error("Failed to parse stored filters:",i)}return[]});return[n,i=>{g(i);try{globalThis.localStorage?.setItem(e,JSON.stringify(i))}catch(c){console.error("Failed to save filters:",c)}}]}function ln(s){const e=G.c(7),[n,g]=z.useState(s),[o,i]=z.useState(s?"desc":null);let c;e[0]!==o||e[1]!==n?(c=m=>{n!==m?(g(m),i("asc")):o==="asc"?i("desc"):o==="desc"&&(g(void 0),i(null))},e[0]=o,e[1]=n,e[2]=c):c=e[2];const a=c;let r;return e[3]!==a||e[4]!==o||e[5]!==n?(r={sortKey:n,sortDirection:o,handleSort:a},e[3]=a,e[4]=o,e[5]=n,e[6]=r):r=e[6],r}function rn(s,e){const n=G.c(12),g=e===void 0?"cards":e,o=Ve(),i=z.useRef(o),c=s?`deco-view-mode-${s}`:"deco-view-mode";let a;n[0]!==g||n[1]!==c?(a=()=>{const x=globalThis.localStorage?.getItem(c);return x==="cards"||x==="table"?x:g},n[0]=g,n[1]=c,n[2]=a):a=n[2];const[r,m]=z.useState(a);let p;n[3]!==c?(p=x=>{m(x),globalThis.localStorage?.setItem(c,x)},n[3]=c,n[4]=p):p=n[4];const u=p;let d,f;n[5]!==o||n[6]!==r?(d=()=>{!i.current&&o&&r==="table"&&m("cards"),i.current=o},f=[o,r],n[5]=o,n[6]=r,n[7]=d,n[8]=f):(d=n[7],f=n[8]),z.useEffect(d,f);let h;return n[9]!==u||n[10]!==r?(h=[r,u],n[9]=u,n[10]=r,n[11]=h):h=n[11],h}function an(s){const e=G.c(20),{namespace:n,resource:g,defaultSortKey:o,defaultViewMode:i}=s,c=o===void 0?"title":o,a=i===void 0?"table":i,[r,m]=z.useState(""),p=z.useDeferredValue(r),u=`${n}-${g}`,[d,f]=cn(u),h=`studio-${g}-filter-visible-${n}`;let x;e[0]!==h?(x=()=>globalThis.localStorage?.getItem(h)==="true",e[0]=h,e[1]=x):x=e[1];const[j,b]=z.useState(x);let C;e[2]!==h?(C=M=>{b(M),globalThis.localStorage?.setItem(h,String(M))},e[2]=h,e[3]=C):C=e[3];const S=C;let l;e[4]!==j||e[5]!==S?(l=()=>{S(!j)},e[4]=j,e[5]=S,e[6]=l):l=e[6];const D=l,[T,I]=rn(`studio-${g}-${n}`,a),{sortKey:A,sortDirection:w,handleSort:F}=ln(c),P=A;let k;return e[7]!==j||e[8]!==d||e[9]!==F||e[10]!==r||e[11]!==p||e[12]!==S||e[13]!==f||e[14]!==I||e[15]!==w||e[16]!==P||e[17]!==D||e[18]!==T?(k={search:r,searchTerm:p,setSearch:m,filters:d,setFilters:f,filterBarVisible:j,setFilterBarVisible:S,toggleFilterBar:D,viewMode:T,setViewMode:I,sortKey:P,sortDirection:w,handleSort:F},e[7]=j,e[8]=d,e[9]=F,e[10]=r,e[11]=p,e[12]=S,e[13]=f,e[14]=I,e[15]=w,e[16]=P,e[17]=D,e[18]=T,e[19]=k):k=e[19],k}function dn(s){const e=G.c(35),{open:n,onOpenChange:g,count:o,onConfirm:i}=s,c=se(),a=o===1?"orgs.bulkDeleteDialog.deleteTitleSingular":"orgs.bulkDeleteDialog.deleteTitlePlural";let r;e[0]!==o||e[1]!==c||e[2]!==a?(r=c(a,{count:o}),e[0]=o,e[1]=c,e[2]=a,e[3]=r):r=e[3];let m;e[4]!==r?(m=t.jsx(We,{children:r}),e[4]=r,e[5]=m):m=e[5];const p=o===1?"orgs.bulkDeleteDialog.deleteDescriptionSingular":"orgs.bulkDeleteDialog.deleteDescriptionPlural";let u;e[6]!==c||e[7]!==p?(u=c(p),e[6]=c,e[7]=p,e[8]=u):u=e[8];let d;e[9]!==u?(d=t.jsx(Xe,{children:u}),e[9]=u,e[10]=d):d=e[10];let f;e[11]!==m||e[12]!==d?(f=t.jsxs(Ge,{children:[m,d]}),e[11]=m,e[12]=d,e[13]=f):f=e[13];let h;e[14]!==c?(h=c("orgs.bulkDeleteDialog.cancelButton"),e[14]=c,e[15]=h):h=e[15];let x;e[16]!==h?(x=t.jsx(Qe,{children:h}),e[16]=h,e[17]=x):x=e[17];const j=o===1?"orgs.bulkDeleteDialog.deleteButtonSingular":"orgs.bulkDeleteDialog.deleteButtonPlural";let b;e[18]!==o||e[19]!==c||e[20]!==j?(b=c(j,{count:o}),e[18]=o,e[19]=c,e[20]=j,e[21]=b):b=e[21];let C;e[22]!==i||e[23]!==b?(C=t.jsx(qe,{onClick:i,variant:"destructive",children:b}),e[22]=i,e[23]=b,e[24]=C):C=e[24];let S;e[25]!==C||e[26]!==x?(S=t.jsxs(Ye,{children:[x,C]}),e[25]=C,e[26]=x,e[27]=S):S=e[27];let l;e[28]!==S||e[29]!==f?(l=t.jsxs(Je,{children:[f,S]}),e[28]=S,e[29]=f,e[30]=l):l=e[30];let D;return e[31]!==g||e[32]!==n||e[33]!==l?(D=t.jsx(Ze,{open:n,onOpenChange:g,children:l}),e[31]=g,e[32]=n,e[33]=l,e[34]=D):D=e[34],D}function un(s){const e=G.c(39),{item:n,canManage:g,allConnections:o,connectedAppNames:i,connectingItemId:c,onNavigateConnected:a,onConnect:r}=s,m=se();let p,u;e[0]!==i||e[1]!==n?(p=Oe(n)??"",u=i.has(p),e[0]=i,e[1]=n,e[2]=p,e[3]=u):(p=e[2],u=e[3]);const d=u;let f;e[4]!==n._meta?(f=kt(n._meta),e[4]=n._meta,e[5]=f):f=e[5];const h=f,x=h?.friendlyName||h?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",j=n.server?.description||n.description||null;let b;e[6]!==n.server?.icons?.[0]?.src||e[7]!==n.server?.repository?(b=n.server?.icons?.[0]?.src||Tt(n.server?.repository)||null,e[6]=n.server?.icons?.[0]?.src,e[7]=n.server?.repository,e[8]=b):b=e[8];const C=b;let S;if(e[9]!==o||e[10]!==p){let O;e[12]!==p?(O=R=>R.connection_type!=="VIRTUAL"&&R.app_name===p,e[12]=p,e[13]=O):O=e[13],S=o.filter(O),e[9]=o,e[10]=p,e[11]=S}else S=e[11];const l=S,D=d||g;let T,I;e[14]!==l||e[15]!==d||e[16]!==n||e[17]!==r||e[18]!==a?(T=()=>{if(d){const O=l[0];O&&a(O);return}I()},I=()=>r(n),e[14]=l,e[15]=d,e[16]=n,e[17]=r,e[18]=a,e[19]=T,e[20]=I):(T=e[19],I=e[20]);let A;e[21]!==j||e[22]!==C||e[23]!==x?(A={title:x,description:j,icon:C},e[21]=j,e[22]=C,e[23]=x,e[24]=A):A=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(xe,{}),e[25]=w):w=e[25];const F=D?T:void 0;let P;e[26]!==g||e[27]!==c||e[28]!==I||e[29]!==d||e[30]!==n.id||e[31]!==m?(P=d?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:m("orgs.catalogItemCard.connected")}):g&&t.jsx(L,{variant:"outline",size:"sm",disabled:c!==null,onClick:O=>{O.stopPropagation(),I()},children:c===n.id?t.jsx(ge,{className:"size-3.5"}):m("orgs.catalogItemCard.connect")}),e[26]=g,e[27]=c,e[28]=I,e[29]=d,e[30]=n.id,e[31]=m,e[32]=P):P=e[32];let k;e[33]!==P?(k=t.jsx("div",{className:"flex items-center gap-2",children:P}),e[33]=P,e[34]=k):k=e[34];let M;return e[35]!==A||e[36]!==F||e[37]!==k?(M=t.jsx(Ce,{connection:A,fallbackIcon:w,onClick:F,headerActionsAlwaysVisible:!0,headerActions:k}),e[35]=A,e[36]=F,e[37]=k,e[38]=M):M=e[38],M}function gn(s){return s?.length?{appToolName:s.find(n=>!!Ht(n._meta))?.name??null}:null}const pn=3;function mn(s){const e=new Map;for(const n of s)for(const g of n.connections??[]){const o=e.get(g.connection_id)??[];o.push(n),e.set(g.connection_id,o)}return e}function fn(s){const e=G.c(21),{projects:n}=s,g=se();if(n.length===0){let u;e[0]!==g?(u=g("projects.connections.orgWide"),e[0]=g,e[1]=u):u=e[1];let d;return e[2]!==u?(d=t.jsx("span",{className:"text-xs text-muted-foreground",children:u}),e[2]=u,e[3]=d):d=e[3],d}let o,i,c;if(e[4]!==n){const u=n.slice(0,pn);c="flex min-w-0 items-center gap-2",o="flex shrink-0 -space-x-1.5",i=u.map(hn),e[4]=n,e[5]=o,e[6]=i,e[7]=c}else o=e[5],i=e[6],c=e[7];let a;e[8]!==o||e[9]!==i?(a=t.jsx("div",{className:o,children:i}),e[8]=o,e[9]=i,e[10]=a):a=e[10];let r;e[11]!==n[0]?.title||e[12]!==n.length||e[13]!==g?(r=n.length===1?n[0]?.title:g("projects.connections.usedBy",{count:n.length}),e[11]=n[0]?.title,e[12]=n.length,e[13]=g,e[14]=r):r=e[14];let m;e[15]!==r?(m=t.jsx("span",{className:"truncate text-xs text-muted-foreground",children:r}),e[15]=r,e[16]=m):m=e[16];let p;return e[17]!==c||e[18]!==a||e[19]!==m?(p=t.jsxs("div",{className:c,children:[a,m]}),e[17]=c,e[18]=a,e[19]=m,e[20]=p):p=e[20],p}function hn(s){return t.jsx("span",{className:"rounded-md ring-2 ring-card",title:s.title,children:t.jsx(Rt,{icon:s.icon,name:s.title,size:"xs"})},s.id)}function Re(s){const e=G.c(8),{selectionMode:n,children:g}=s,o=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let i;e[0]!==o?(i=he("overflow-hidden transition-all duration-150 ease-out",o),e[0]=o,e[1]=i):i=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(et,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:jn,children:t.jsx(on,{size:20})})}),e[2]=c):c=e[2];let a;e[3]!==g?(a=t.jsxs(tt,{children:[c,t.jsx(nt,{align:"end",onClick:xn,children:g})]}),e[3]=g,e[4]=a):a=e[4];let r;return e[5]!==i||e[6]!==a?(r=t.jsx("div",{className:i,children:a}),e[5]=i,e[6]=a,e[7]=r):r=e[7],r}function xn(s){return s.stopPropagation()}function jn(s){return s.stopPropagation()}function Sn(s){const e=G.c(57),{group:n,onOpen:g,selectionMode:o,selectedIds:i,onToggleSelect:c}=s,a=se();let r;if(e[0]!==n.connections||e[1]!==i){let U;e[3]!==i?(U=y=>i.has(y.id),e[3]=i,e[4]=U):U=e[4],r=n.connections.every(U),e[0]=n.connections,e[1]=i,e[2]=r}else r=e[2];const m=r;let p;if(e[5]!==n.connections||e[6]!==i){let U;e[8]!==i?(U=y=>i.has(y.id),e[8]=i,e[9]=U):U=e[9],p=n.connections.some(U),e[5]=n.connections,e[6]=i,e[7]=p}else p=e[7];const u=p;let d;e[10]!==m||e[11]!==n.connections||e[12]!==c||e[13]!==i?(d=()=>{for(const U of n.connections)m?i.has(U.id)&&c(U.id):i.has(U.id)||c(U.id)},e[10]=m,e[11]=n.connections,e[12]=c,e[13]=i,e[14]=d):d=e[14];const f=d,h=n.title,x=n.icon;let j;e[15]!==n.connections.length||e[16]!==a?(j=a("orgs.connectionSelectionUi.instancesCount",{count:n.connections.length}),e[15]=n.connections.length,e[16]=a,e[17]=j):j=e[17];let b;e[18]!==n.icon||e[19]!==n.title||e[20]!==j?(b={title:h,icon:x,description:j},e[18]=n.icon,e[19]=n.title,e[20]=j,e[21]=b):b=e[21];let C;e[22]!==g||e[23]!==o||e[24]!==f?(C=()=>o?f():g(),e[22]=g,e[23]=o,e[24]=f,e[25]=C):C=e[25];const S=o&&m&&"ring-2 ring-primary",l=o&&u&&!m&&"ring-1 ring-primary/50";let D;e[26]!==l||e[27]!==S?(D=he(S,l),e[26]=l,e[27]=S,e[28]=D):D=e[28];const T=o?m?!0:u&&"mixed":void 0;let I;e[29]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(xe,{}),e[29]=I):I=e[29];let A;e[30]!==m||e[31]!==n.connections.length||e[32]!==o||e[33]!==u||e[34]!==a||e[35]!==f?(A=o?t.jsx(Be,{checked:m?!0:u?"indeterminate":!1,onCheckedChange:f}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:a("orgs.connectionSelectionUi.connected")}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[30]=m,e[31]=n.connections.length,e[32]=o,e[33]=u,e[34]=a,e[35]=f,e[36]=A):A=e[36];let w;e[37]!==g?(w=U=>{U.stopPropagation(),g()},e[37]=g,e[38]=w):w=e[38];let F;e[39]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(Ke,{size:16}),e[39]=F):F=e[39];let P;e[40]!==a?(P=a("orgs.connectionSelectionUi.open"),e[40]=a,e[41]=P):P=e[41];let k;e[42]!==w||e[43]!==P?(k=t.jsxs(ce,{onClick:w,children:[F,P]}),e[42]=w,e[43]=P,e[44]=k):k=e[44];let M;e[45]!==o||e[46]!==k?(M=t.jsx(Re,{selectionMode:o,children:k}),e[45]=o,e[46]=k,e[47]=M):M=e[47];let O;e[48]!==A||e[49]!==M?(O=t.jsxs("div",{className:"flex items-center gap-1",children:[A,M]}),e[48]=A,e[49]=M,e[50]=O):O=e[50];let R;return e[51]!==D||e[52]!==T||e[53]!==O||e[54]!==b||e[55]!==C?(R=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:b,onClick:C,className:D,selected:T,fallbackIcon:I,headerActionsAlwaysVisible:!0,headerActions:O})}),e[51]=D,e[52]=T,e[53]=O,e[54]=b,e[55]=C,e[56]=R):R=e[56],R}function yn(s){const e=G.c(36),{connection:n,isSelected:g,selectionMode:o,canManage:i,canManageAgents:c,onToggleSelect:a,onOpen:r,onToggleStatus:m,onDelete:p}=s,u=se();let d;e[0]!==g||e[1]!==a||e[2]!==o||e[3]!==u?(d=o?t.jsx(Be,{checked:g,onCheckedChange:a,onClick:Cn}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:u("orgs.connectionSelectionUi.connected")}),e[0]=g,e[1]=a,e[2]=o,e[3]=u,e[4]=d):d=e[4];let f;e[5]!==r?(f=T=>{T.stopPropagation(),r()},e[5]=r,e[6]=f):f=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Ke,{size:16}),e[7]=h):h=e[7];let x;e[8]!==u?(x=u("orgs.connectionSelectionUi.open"),e[8]=u,e[9]=x):x=e[9];let j;e[10]!==f||e[11]!==x?(j=t.jsxs(ce,{onClick:f,children:[h,x]}),e[10]=f,e[11]=x,e[12]=j):j=e[12];let b;e[13]!==i||e[14]!==c||e[15]!==a||e[16]!==u?(b=(i||c)&&t.jsxs(ce,{onClick:T=>{T.stopPropagation(),a()},children:[t.jsx(Wt,{size:16}),u("orgs.connectionSelectionUi.select")]}),e[13]=i,e[14]=c,e[15]=a,e[16]=u,e[17]=b):b=e[17];let C;e[18]!==i||e[19]!==n||e[20]!==m||e[21]!==u?(C=i&&(n.status==="active"?t.jsxs(ce,{onClick:T=>{T.stopPropagation(),m("inactive")},children:[t.jsx(Xt,{size:16}),u("orgs.connectionSelectionUi.disable")]}):t.jsxs(ce,{onClick:T=>{T.stopPropagation(),m("active")},children:[t.jsx(Gt,{size:16}),u("orgs.connectionSelectionUi.enable")]})),e[18]=i,e[19]=n,e[20]=m,e[21]=u,e[22]=C):C=e[22];let S;e[23]!==i||e[24]!==p||e[25]!==u?(S=i&&t.jsxs(ce,{variant:"destructive",onClick:T=>{T.stopPropagation(),p()},children:[t.jsx(He,{size:16}),u("orgs.connectionSelectionUi.delete")]}),e[23]=i,e[24]=p,e[25]=u,e[26]=S):S=e[26];let l;e[27]!==o||e[28]!==j||e[29]!==b||e[30]!==C||e[31]!==S?(l=t.jsxs(Re,{selectionMode:o,children:[j,b,C,S]}),e[27]=o,e[28]=j,e[29]=b,e[30]=C,e[31]=S,e[32]=l):l=e[32];let D;return e[33]!==d||e[34]!==l?(D=t.jsxs("div",{className:"flex items-center gap-1",children:[d,l]}),e[33]=d,e[34]=l,e[35]=D):D=e[35],D}function Cn(s){return s.stopPropagation()}function vn(s){const e=G.c(29),{count:n,total:g,canManage:o,canManageAgents:i,onSelectAll:c,onDeselectAll:a,onDelete:r,onAddToAgent:m,onToggleStatus:p,onCancel:u}=s,d=se();if(n===0)return null;let f;e[0]!==n||e[1]!==d?(f=d("orgs.connectionSelectionUi.selectedCount",{count:n}),e[0]=n,e[1]=d,e[2]=f):f=e[2];let h;e[3]!==f?(h=t.jsx("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:f}),e[3]=f,e[4]=h):h=e[4];let x;e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==d||e[9]!==g?(x=n<g?t.jsx(L,{variant:"outline",size:"sm",onClick:c,children:d("orgs.connectionSelectionUi.selectAll",{total:g})}):t.jsx(L,{variant:"outline",size:"sm",onClick:a,children:d("orgs.connectionSelectionUi.clearSelection")}),e[5]=n,e[6]=a,e[7]=c,e[8]=d,e[9]=g,e[10]=x):x=e[10];let j;e[11]!==i||e[12]!==m||e[13]!==d?(j=i&&t.jsxs(L,{variant:"outline",size:"sm",onClick:m,children:[t.jsx(Le,{size:13}),d("orgs.connectionSelectionUi.addToAgent")]}),e[11]=i,e[12]=m,e[13]=d,e[14]=j):j=e[14];let b;e[15]!==o||e[16]!==r||e[17]!==p||e[18]!==d?(b=o&&t.jsxs(t.Fragment,{children:[t.jsx(L,{variant:"outline",size:"sm",onClick:()=>p("active"),children:d("orgs.connectionSelectionUi.enable")}),t.jsx(L,{variant:"outline",size:"sm",onClick:()=>p("inactive"),children:d("orgs.connectionSelectionUi.disable")}),t.jsxs(L,{variant:"destructive",size:"sm",onClick:r,children:[t.jsx(He,{size:13}),d("orgs.connectionSelectionUi.delete")]})]}),e[15]=o,e[16]=r,e[17]=p,e[18]=d,e[19]=b):b=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Ee,{size:13}),e[20]=C):C=e[20];let S;e[21]!==u?(S=t.jsx(L,{variant:"ghost",size:"sm",onClick:u,children:C}),e[21]=u,e[22]=S):S=e[22];let l;return e[23]!==h||e[24]!==x||e[25]!==j||e[26]!==b||e[27]!==S?(l=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl glass px-3 py-2 flex items-center gap-2",children:[h,x,j,b,S]})}),e[23]=h,e[24]=x,e[25]=j,e[26]=b,e[27]=S,e[28]=l):l=e[28],l}function bn(s){const e=G.c(47),{open:n,onOpenChange:g,agents:o,onConfirm:i}=s,c=se(),[a,r]=z.useState(null);let m;e[0]!==g?(m=k=>{k||r(null),g(k)},e[0]=g,e[1]=m):m=e[1];const p=m;let u;e[2]!==c?(u=c("orgs.connectionSelectionUi.addToAgentTitle"),e[2]=c,e[3]=u):u=e[3];let d;e[4]!==u?(d=t.jsx(ke,{children:u}),e[4]=u,e[5]=d):d=e[5];let f;e[6]!==c?(f=c("orgs.connectionSelectionUi.addToAgentDescription"),e[6]=c,e[7]=f):f=e[7];let h;e[8]!==f?(h=t.jsx(Te,{children:f}),e[8]=f,e[9]=h):h=e[9];let x;e[10]!==d||e[11]!==h?(x=t.jsxs(we,{children:[d,h]}),e[10]=d,e[11]=h,e[12]=x):x=e[12];let j;e[13]!==o||e[14]!==a||e[15]!==c?(j=o.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:c("orgs.connectionSelectionUi.noAgentsFound")}):o.map(k=>t.jsxs("button",{type:"button",onClick:()=>r(k.id),className:he("flex items-center gap-3 w-full rounded-lg px-3 py-2 text-left transition-colors",a===k.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-accent"),children:[t.jsx(sn,{icon:k.icon,name:k.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.title}),k.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.description})]})]},k.id)),e[13]=o,e[14]=a,e[15]=c,e[16]=j):j=e[16];let b;e[17]!==j?(b=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:j}),e[17]=j,e[18]=b):b=e[18];let C;e[19]!==p?(C=()=>p(!1),e[19]=p,e[20]=C):C=e[20];let S;e[21]!==c?(S=c("orgs.connectionSelectionUi.cancel"),e[21]=c,e[22]=S):S=e[22];let l;e[23]!==S||e[24]!==C?(l=t.jsx(L,{variant:"outline",onClick:C,children:S}),e[23]=S,e[24]=C,e[25]=l):l=e[25];const D=!a;let T;e[26]!==p||e[27]!==i||e[28]!==a?(T=()=>{a&&(i(a),p(!1))},e[26]=p,e[27]=i,e[28]=a,e[29]=T):T=e[29];let I;e[30]!==c?(I=c("orgs.connectionSelectionUi.add"),e[30]=c,e[31]=I):I=e[31];let A;e[32]!==D||e[33]!==T||e[34]!==I?(A=t.jsx(L,{disabled:D,onClick:T,children:I}),e[32]=D,e[33]=T,e[34]=I,e[35]=A):A=e[35];let w;e[36]!==l||e[37]!==A?(w=t.jsxs(Ae,{children:[l,A]}),e[36]=l,e[37]=A,e[38]=w):w=e[38];let F;e[39]!==w||e[40]!==x||e[41]!==b?(F=t.jsxs(Ie,{className:"sm:max-w-[400px]",children:[x,b,w]}),e[39]=w,e[40]=x,e[41]=b,e[42]=F):F=e[42];let P;return e[43]!==p||e[44]!==n||e[45]!==F?(P=t.jsx(Pe,{open:n,onOpenChange:p,children:F}),e[43]=p,e[44]=n,e[45]=F,e[46]=P):P=e[46],P}function _n({listState:s,activeTab:e,typeFilter:n,statusFilter:g}){const o=se(),{org:i}=Me(),c=ut(),a=$e(),{data:r}=Fe.useSession(),m=ze(),p=Et(s),u=_t(),{granted:d}=ye("connections:manage"),{granted:f}=ye("agents:manage"),[h,x]=z.useState(new Set),j=h.size>0,[b,C]=z.useState(!1),[S,l]=z.useState(!1),[D,T]=z.useState(null),I=Kt(),A=mn(qt(I)),w=p.filter(_=>!(n!=="ALL"&&_.connection_type!==n||g!=="ALL"&&_.status!==g)),F=vt(w),P=_=>{x(v=>{const B=new Set(v);return B.has(_)?B.delete(_):B.add(_),B})},k=()=>{x(new Set)},M=Ue(s.searchTerm),O=M.items,R=Nt(M.loadMore,M.hasMore,M.isLoadingMore),U=new Set(p.filter(_=>_.app_name).map(_=>_.app_name)),y=s.search.length>0,$=e==="all"||y?O.filter(_=>{if(y){const v=Oe(_);if(v&&U.has(v))return!1}return!0}):[],W=e==="connected"||y?F:[],te=async _=>{if(!(!i||!r?.user?.id)){ne("connection_add_clicked",{action:"connect_new",registry_item_id:_.id,source:"connections_page"}),T(_.id);try{const v=xt(_,i.id,r.user.id,{remoteIndex:0}),B=v.connection_type==="STDIO",K=!!v.connection_url,H=B&&v.connection_headers&&typeof v.connection_headers=="object"&&"command"in v.connection_headers;if(!K&&!H){X.error(o("orgs.connections.cannotConnectNoMethod")),T(null);return}const ve=await m.create.mutateAsync(v),{id:ie}=ve,le=await nn({connectionId:ie,orgId:i.id,orgSlug:i.slug,persistFallback:re=>m.update.mutateAsync({id:ie,data:{connection_token:re}}).then(()=>{})});if(le.ran&&!le.ok){ne("connection_oauth_failed",{connection_id:ie,flow:"connections_page_connect",error:le.error??"no_token"}),X.error(o("orgs.connections.authenticationFailed",{error:le.error??"no token received"}));return}if(le.ran){ne("connection_oauth_succeeded",{connection_id:ie,flow:"connections_page_connect"});const re=new URL(`/api/${i.slug}/mcp/${ie}`,window.location.origin);await c.invalidateQueries({queryKey:mt.isMCPAuthenticated(re.href,null)}),N(),X.success(o("orgs.connections.authenticationSuccessful"))}let me=null;try{const re=await c.fetchQuery(Bt({connectionId:ie,orgId:i.id,orgSlug:i.slug}));me=gn((await re.listTools()).tools)}catch{}const be=ue(ve),_e=me?me.appToolName?{to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:i.slug,appSlug:be,collectionName:"tools",itemId:encodeURIComponent(me.appToolName)}}:{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:be}}:null;X.success(o("orgs.connections.connectedSuccessfully"),_e?{action:{label:o("orgs.connections.openConnection"),onClick:()=>a(_e)}}:void 0)}catch(v){X.error(o("orgs.connections.failedToConnect",{error:v instanceof Error?v.message:String(v)}))}finally{T(null)}}},Q=gt(),N=()=>{ft(c,i.id)},E=async()=>{C(!1);const _=[...h];ne("connections_bulk_delete",{count:_.length});const B=(await Promise.allSettled(_.map(K=>Q.call("COLLECTION_CONNECTIONS_DELETE",{id:K,force:!0})))).filter(K=>K.status==="fulfilled").length;N(),X.success(o("orgs.connections.deletedConnections",{count:B})),k()},V=async(_,v)=>{try{await m.update.mutateAsync({id:_,data:{status:v}}),N(),X.success(o(v==="active"?"orgs.connections.connectionEnabled":"orgs.connections.connectionDisabled"))}catch{X.error(o("orgs.connections.failedToUpdateConnection"))}},pe=async _=>{const v=[...h];ne("connections_bulk_status_toggled",{count:v.length,to_status:_});const K=(await Promise.allSettled(v.map(H=>m.update.mutateAsync({id:H,data:{status:_}})))).filter(H=>H.status==="fulfilled").length;N(),X.success(_==="active"?o("orgs.connections.enabledConnections",{count:K}):o("orgs.connections.disabledConnections",{count:K})),k()},je=async _=>{const v=I.find(H=>H.id===_);if(!v)return;ne("connections_bulk_add_to_agent",{agent_id:_,count:h.size});const B=new Set(v.connections.map(H=>H.connection_id)),K=[...h].filter(H=>!B.has(H)).map(H=>({connection_id:H,selected_tools:null,selected_resources:null,selected_prompts:null}));if(K.length===0){X.info(o("orgs.connections.allConnectionsAlreadyInAgent"));return}try{await Q.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:_,data:{connections:[...v.connections,...K]}}),pt(c,i.id),X.success(o("orgs.connections.addedConnectionsToAgent",{count:K.length,agentTitle:v.title})),k()}catch{X.error(o("orgs.connections.failedToAddConnectionsToAgent"))}};return t.jsxs(t.Fragment,{children:[t.jsx(Dt,{...u}),t.jsx(dn,{open:b,onOpenChange:C,count:h.size,onConfirm:E}),t.jsx(bn,{open:S,onOpenChange:l,agents:I,onConfirm:je}),M.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{className:"size-8 text-muted-foreground"})}):t.jsx("div",{children:(y?$.length===0&&w.length===0:e==="all"?$.length===0:w.length===0)?t.jsx(bt,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:o("orgs.connections.noConnectionsFound"),description:s.search?o("orgs.connections.noConnectionsMatchSearch",{search:s.search}):o(d?"orgs.connections.createConnectionToGetStarted":"orgs.connections.askAdminToAddConnection")}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[W.map(_=>{if(_.type==="group")return t.jsx(Sn,{group:_,onOpen:()=>{a({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:_.key}})},selectionMode:j,selectedIds:h,onToggleSelect:P},_.key);const v=_.connection,B=h.has(v.id);return t.jsx(Ce,{connection:v,fallbackIcon:t.jsx(xe,{}),onClick:()=>j?P(v.id):a({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ue(v)}}),className:he(B&&"ring-2 ring-primary bg-primary/5"),selected:j?B:void 0,footer:t.jsx(fn,{projects:A.get(v.id)??[]}),headerActionsAlwaysVisible:!0,headerActions:t.jsx(yn,{connection:v,isSelected:B,selectionMode:j,canManage:d,canManageAgents:f,onToggleSelect:()=>P(v.id),onOpen:()=>a({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ue(v)}}),onToggleStatus:K=>V(v.id,K),onDelete:()=>u.requestDelete(v)})},v.id)}),$.map(_=>t.jsx(un,{item:_,canManage:d,allConnections:p,connectedAppNames:U,connectingItemId:D,onNavigateConnected:v=>a({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ue(v)}}),onConnect:te},_.id)),(e==="all"||y)&&t.jsx("div",{ref:R,className:"col-span-full h-4"}),(e==="all"||y)&&M.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ge,{className:"size-6 text-muted-foreground"})})]})}),j&&t.jsx(vn,{count:h.size,total:w.length,canManage:d,canManageAgents:f,onSelectAll:()=>{x(new Set(w.map(_=>_.id)))},onDeselectAll:()=>x(new Set),onDelete:()=>C(!0),onAddToAgent:()=>l(!0),onToggleStatus:pe,onCancel:k})]})}function Dn(){const s=se(),{org:e}=Me(),n=$e(),g=ot({strict:!1}),{data:o}=Fe.useSession(),{stdioEnabled:i}=it(),c=Ve(),{granted:a}=ye("connections:manage"),r=an({namespace:e.slug,resource:"connections"}),m=ze(),p=ct(),[u,d]=lt(rt.connectionsTab(e.slug),y=>g.tab==="all"||g.tab==="connected"?g.tab:y??"all"),[f,h]=z.useState("ALL"),[x,j]=z.useState("ALL"),C=Ue(r.searchTerm).items,S=r.search!==r.searchTerm,l=at({resolver:dt(Yt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),D=l.watch("ui_type"),T=l.watch("connection_url"),I=l.watch("npx_package"),A=fe({uiType:D,connectionUrl:T??"",npxPackage:I??""})??Ne({uiType:D,connectionUrl:T??"",registryItems:C}),w=a&&g.action==="create",F=()=>{ne("connections_custom_dialog_opened",{source:"connections_page"}),n({to:".",search:y=>({...y,action:"create"})})},P=()=>{n({to:".",search:y=>({...y,action:void 0})})},k=async y=>{let $,W=null,te=null,Q=null;y.ui_type==="NPX"?($="STDIO",W="",Q=en(y.npx_package||"",y.env_vars||[])):y.ui_type==="STDIO"?($="STDIO",W="",Q=tn(y.stdio_command||"",y.stdio_args||"",y.stdio_cwd,y.env_vars||[])):($=y.ui_type,W=y.connection_url||"",te=y.connection_token||null);const N=ht("conn");ne("connection_custom_created",{connection_type:$,ui_type:y.ui_type}),await m.create.mutateAsync({id:N,title:y.title,description:y.description||null,connection_type:$,connection_url:W,connection_token:te,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:e.id,icon:y.icon??null,app_name:null,app_id:null,connection_headers:Q,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null}),P(),l.reset(),n({to:"/$org/settings/connections/$appSlug",params:{org:e.slug,appSlug:ue({app_name:null,connection_url:W,title:y.title,id:N})}})},M=y=>{y||(w&&P(),l.reset())},O=y=>{const $=y.trim();if(!$)return;const W=!!l.formState.dirtyFields.title,te=!!l.formState.dirtyFields.description,Q=!!l.formState.dirtyFields.env_vars,N=V=>{if(V&&(!W&&!l.getValues("title").trim()&&V.title&&l.setValue("title",V.title,{shouldDirty:!1}),!te&&!(l.getValues("description")??"").trim()&&V.description&&l.setValue("description",V.description,{shouldDirty:!1}),!Q&&V.envVarKeys?.length)){const pe=l.getValues("env_vars")??[],je=new Set(pe.map(v=>v.key)),_=V.envVarKeys.filter(v=>!je.has(v));_.length>0&&l.setValue("env_vars",[...pe,..._.map(v=>({key:v,value:""}))],{shouldDirty:!0})}},E=Zt($);if(E&&i){l.setValue("ui_type","NPX",{shouldDirty:!0}),l.setValue("npx_package",E.packageName,{shouldDirty:!0}),l.setValue("connection_url","",{shouldDirty:!0}),l.setValue("connection_token",null,{shouldDirty:!0}),N(fe({uiType:"NPX",npxPackage:E.packageName}));return}if($.startsWith("http://")||$.startsWith("https://")){const V=D==="HTTP"||D==="SSE"||D==="Websocket"?D:"HTTP";l.setValue("ui_type",V,{shouldDirty:!0}),l.setValue("connection_url",$,{shouldDirty:!0}),N(fe({uiType:V,connectionUrl:$})??Ne({uiType:V,connectionUrl:$,registryItems:C}));return}D==="NPX"&&N(fe({uiType:"NPX",npxPackage:$}))},R=a?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(L,{size:"sm",variant:"default",onClick:F,children:[t.jsx(Le,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:s("orgs.connections.customConnection")})]})}):null,U=t.jsx(jt,{sortKey:r.sortKey,sortDirection:r.sortDirection,onSort:r.handleSort,sortOptions:[{id:"title",label:s("orgs.connections.sortName")},{id:"description",label:s("orgs.connections.sortDescription")},{id:"connection_type",label:s("orgs.connections.sortType")},{id:"updated_by",label:s("orgs.connections.sortUpdatedBy")},{id:"updated_at",label:s("orgs.connections.sortUpdated")}],filters:[{label:s("orgs.connections.filterType"),value:f,onChange:y=>h(y||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:s("orgs.connections.filterStatus"),value:x,onChange:y=>j(y||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"active",label:s("orgs.connections.filterActive")},{id:"inactive",label:s("orgs.connections.filterInactive")},{id:"error",label:s("orgs.connections.filterError")}]}]});return t.jsx(t.Fragment,{children:t.jsxs(ae,{children:[(()=>{const y=s("orgs.connections.createConnection"),$=s("orgs.connections.createConnectionDescription"),W=l.formState.isSubmitting?s("orgs.connections.saving"):s("orgs.connections.createConnection"),te=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(q,{control:l.control,name:"ui_type",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.type")}),t.jsxs(Ot,{value:N.value,onValueChange:N.onChange,children:[t.jsx(Z,{children:t.jsx(Ut,{children:t.jsx(Vt,{})})}),t.jsxs(zt,{children:[t.jsx(de,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(de,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(de,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"Websocket"]})}),i&&t.jsxs(t.Fragment,{children:[t.jsx(de,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(xe,{className:"w-4 h-4"}),s("orgs.connections.npxPackage")]})}),t.jsx(de,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Qt,{className:"w-4 h-4"}),s("orgs.connections.customCommand")]})})]})]})]}),t.jsx(ee,{})]})}),D==="NPX"&&t.jsx(q,{control:l.control,name:"npx_package",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.npmPackage")}),t.jsx(Z,{children:t.jsx(oe,{placeholder:s("orgs.connections.npmPackagePlaceholder"),...N,value:N.value??"",onPaste:E=>{const V=E.clipboardData.getData("text");V&&(E.preventDefault(),l.setValue("npx_package",V.trim(),{shouldDirty:!0}),O(V))},onBlur:E=>{O(E.target.value),N.onBlur()}})}),t.jsx(ee,{})]})}),D==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(q,{control:l.control,name:"stdio_command",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.command")}),t.jsx(Z,{children:t.jsx(oe,{placeholder:s("orgs.connections.commandPlaceholder"),...N,value:N.value??""})}),t.jsx(ee,{})]})}),t.jsx(q,{control:l.control,name:"stdio_args",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.arguments")}),t.jsx(Z,{children:t.jsx(oe,{placeholder:s("orgs.connections.argumentsPlaceholder"),...N,value:N.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(q,{control:l.control,name:"stdio_cwd",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.workingDirectory")}),t.jsx(Z,{children:t.jsx(oe,{placeholder:s("orgs.connections.workingDirectoryPlaceholder"),...N,value:N.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("orgs.connections.directoryExecutionNote")}),t.jsx(ee,{})]})})]}),(D==="NPX"||D==="STDIO")&&t.jsx(q,{control:l.control,name:"env_vars",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.environmentVariables")}),t.jsx(Z,{children:t.jsx(Jt,{value:N.value??[],onChange:N.onChange})}),t.jsx(ee,{})]})}),D!=="NPX"&&D!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(q,{control:l.control,name:"connection_url",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.url")}),t.jsx(Z,{children:t.jsx(oe,{placeholder:s("orgs.connections.urlPlaceholder"),...N,value:N.value??"",onPaste:E=>{const V=E.clipboardData.getData("text");V&&(E.preventDefault(),l.setValue("connection_url",V.trim(),{shouldDirty:!0}),O(V))},onBlur:E=>{O(E.target.value),N.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(q,{control:l.control,name:"connection_token",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:A?.token?.label??s("orgs.connections.tokenOptional")}),t.jsx(Z,{children:t.jsx(oe,{type:"password",placeholder:A?.token?.placeholder??s("orgs.connections.tokenPlaceholder"),...N,value:N.value??""})}),A?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[A.token.helperText,A.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:s("orgs.connections.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(q,{control:l.control,name:"title",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.name")}),t.jsx(Z,{children:t.jsx(oe,{placeholder:s("orgs.connections.namePlaceholder"),...N})}),t.jsx(ee,{})]})}),t.jsx(q,{control:l.control,name:"description",render:({field:N})=>t.jsxs(Y,{children:[t.jsx(J,{children:s("orgs.connections.description")}),t.jsx(Z,{children:t.jsx(Lt,{placeholder:s("orgs.connections.descriptionPlaceholder"),rows:3,...N,value:N.value??""})}),t.jsx(ee,{})]})})]}),Q=w;return c?t.jsx(wt,{open:Q,onOpenChange:M,children:t.jsxs(At,{className:"max-h-[90vh]",children:[t.jsx(It,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Pt,{children:y}),t.jsx(Mt,{className:"mt-1",children:$})]}),t.jsx($t,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":s("orgs.connections.close"),children:t.jsx(Ee,{size:16})})})]})}),t.jsx(De,{...l,children:t.jsxs("form",{onSubmit:l.handleSubmit(k),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:te}),t.jsx(Ft,{children:t.jsx(L,{type:"submit",disabled:l.formState.isSubmitting,className:"w-full",children:W})})]})})]})}):t.jsx(Pe,{open:Q,onOpenChange:M,children:t.jsxs(Ie,{className:"sm:max-w-[525px]",children:[t.jsxs(we,{children:[t.jsx(ke,{children:y}),t.jsx(Te,{children:$})]}),t.jsx(De,{...l,children:t.jsxs("form",{onSubmit:l.handleSubmit(k),children:[t.jsx("div",{className:"py-4",children:te}),t.jsxs(Ae,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>M(!1),children:s("orgs.connections.cancel")}),t.jsx(L,{type:"submit",disabled:l.formState.isSubmitting,className:"min-w-40",children:W})]})]})})]})})})(),t.jsx(ae.Content,{children:t.jsx(ae.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[p?t.jsx(ae.Actions,{secondary:t.jsxs(t.Fragment,{children:[t.jsx(yt,{value:r.search,onChange:r.setSearch,label:s("library.context.search"),placeholder:s("orgs.connections.searchPlaceholder"),clearLabel:s("library.library.clearSearch")}),U]}),children:R}):t.jsx(ae.Title,{actions:R,children:s("orgs.connections.pageTitle")}),t.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3 empty:hidden",children:!p&&t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(St,{value:r.search,onChange:r.setSearch,placeholder:s("orgs.connections.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:y=>{y.key==="Escape"&&(r.setSearch(""),y.target.blur())}}),U]})}),t.jsx(Ct,{placement:"page",tabs:[{id:"all",label:s("orgs.connections.tabAll")},{id:"connected",label:s("orgs.connections.tabConnected")}],activeTab:u,onTabChange:y=>{const $=y;$!==u&&ne("connections_page_tab_changed",{to_tab:$}),d($)}}),t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{className:"size-8 text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:S?.5:1,transition:S?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:S?"none":"auto"},children:t.jsx(_n,{listState:r,activeTab:u,typeFilter:f,statusFilter:x})})})]})})})]})})}function Ws(){const s=G.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(st,{children:t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Dn,{})})}),s[0]=e):e=s[0],e}export{Ws as default};