decocms 3.30.0 → 3.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/dist/client/assets/{AlertCircle-C2JPSNIc.js → AlertCircle-A2M1Yk61.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-Dtm-fMoi.js → ArrowUpRight-CjvxrowT.js} +1 -1
  3. package/dist/client/assets/{Check-CJuLJZRg.js → Check-Cl07asRj.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-B1gk6AbW.js → CheckCircle-Ck9u9W7w.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BbO00aHm.js → ChevronDown-Ce3UdjOo.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-CyC6kPhn.js → ChevronLeft-SeayBU0G.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-D4rmSZYg.js → ChevronRight-C8KzXj8H.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-DC9Fz2he.js → ChevronUp-zA2iz0JQ.js} +1 -1
  9. package/dist/client/assets/{Container-Ck07PAMh.js → Container-B3y5dlGc.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-DVI2JfBT.js → DotsVertical-_g_anHKb.js} +1 -1
  11. package/dist/client/assets/{Eye-8SpX7ax1.js → Eye-lcuSJE4l.js} +1 -1
  12. package/dist/client/assets/{FilterLines-DXoB5fi6.js → FilterLines-EpjZnXUA.js} +1 -1
  13. package/dist/client/assets/{Globe01-_Gozs0-K.js → Globe01-CfZP4vCY.js} +1 -1
  14. package/dist/client/assets/{HardDrive-D6YFkngp.js → HardDrive-75MAycL-.js} +1 -1
  15. package/dist/client/assets/{Key01-DtPyr_d4.js → Key01-DyeMqFvi.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-zPlWqXYO.js → LayoutLeft-DwKLO_V_.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-CMKC3Ppc.js → LinkExternal01-r7kaLetr.js} +1 -1
  18. package/dist/client/assets/{Monitor01-Dg9LYm9U.js → Monitor01-C_pzVd4h.js} +1 -1
  19. package/dist/client/assets/{Palette-DvOu8iad.js → Palette-DdA_ILd6.js} +1 -1
  20. package/dist/client/assets/{Play-BGgNLf1z.js → Play-CnkDDouZ.js} +1 -1
  21. package/dist/client/assets/{Plus-D3Yt_klI.js → Plus-Dx1SIiMT.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-De11YcWY.js → RefreshCcw01-C3I3Y9Tu.js} +1 -1
  23. package/dist/client/assets/{SearchMd-CkwYmYFX.js → SearchMd-DFhUmylG.js} +1 -1
  24. package/dist/client/assets/{Settings02-RkWi-oHt.js → Settings02-CWkfxXGQ.js} +1 -1
  25. package/dist/client/assets/{Shield01-BkzImfUK.js → Shield01-CbvWDrmE.js} +1 -1
  26. package/dist/client/assets/{Star01-CROTt7h-.js → Star01-DkpG4lGE.js} +1 -1
  27. package/dist/client/assets/{Stars01-BZ01dqEy.js → Stars01-CJ8FecuG.js} +1 -1
  28. package/dist/client/assets/{Stars02-Bb_Lb3Iw.js → Stars02-bH2-rrrk.js} +1 -1
  29. package/dist/client/assets/{Sun--jg0YyzU.js → Sun-CLmK6D64.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-uOesGvrj.js → SwitchHorizontal01-CDVzg25U.js} +1 -1
  31. package/dist/client/assets/{Tool01-CHRhaVsB.js → Tool01-Cm1sVqXs.js} +1 -1
  32. package/dist/client/assets/{Trash01-D9jT6VSX.js → Trash01-CA4jg9ww.js} +1 -1
  33. package/dist/client/assets/{Upload01-B6COGlQo.js → Upload01-BbVOBYlS.js} +1 -1
  34. package/dist/client/assets/{User01-CWJ4O2R8.js → User01-CMz2xYx2.js} +1 -1
  35. package/dist/client/assets/{Users01-Bsb338aB.js → Users01-DBOuOgB6.js} +1 -1
  36. package/dist/client/assets/{Users03-BZnIYCM1.js → Users03-DIxLvYmx.js} +1 -1
  37. package/dist/client/assets/{X-CH7nrxK3.js → X-8-D5pATw.js} +1 -1
  38. package/dist/client/assets/{XCircle-DSNLgcsz.js → XCircle-D0Uf6feY.js} +1 -1
  39. package/dist/client/assets/{XClose-B2Xxw9ZV.js → XClose-Cnj8fI9u.js} +1 -1
  40. package/dist/client/assets/{Zap-CtPT7vkQ.js → Zap-mYMK3ZBL.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-B7LKxpnQ.js → ZapSquare-qMfSZ8L9.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-BhGMK1ir.js → ZoomOut-aYAC7hBe.js} +1 -1
  43. package/dist/client/assets/{access-gate-CBfdxByI.js → access-gate-daLhvTar.js} +1 -1
  44. package/dist/client/assets/{accordion-CMUFrLXB.js → accordion-Cm248afD.js} +1 -1
  45. package/dist/client/assets/add-section-modal-BEtlbcy-.js +1 -0
  46. package/dist/client/assets/{agent-capabilities-v4Rwjpb1.js → agent-capabilities-CFuGvMed.js} +1 -1
  47. package/dist/client/assets/{agent-icon-BL0Zyuef.js → agent-icon-cetEWq0Z.js} +1 -1
  48. package/dist/client/assets/{agent-icons-AMlXFz_9.js → agent-icons-CK-xDflz.js} +1 -1
  49. package/dist/client/assets/{agents-list-D6JCtAI6.js → agents-list-Da1iRt5l.js} +1 -1
  50. package/dist/client/assets/ai-providers-BJhgs18P.js +1 -0
  51. package/dist/client/assets/{alert-Br2JNJoK.js → alert-BBTJrkK5.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-DzLqwXYd.js → alert-dialog-DokKbPq-.js} +1 -1
  53. package/dist/client/assets/app-editor-DqK_iwlT.js +1 -0
  54. package/dist/client/assets/{auth-catchall-Bh2wbrjs.js → auth-catchall-CVFro2W9.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-CKbPPfx6.js → auth-split-layout-Bsctr1_-.js} +1 -1
  56. package/dist/client/assets/{automation-list-row-6z14sJQm.js → automation-list-row-D23Bvwkx.js} +1 -1
  57. package/dist/client/assets/{automation-runs-DAMwdbwt.js → automation-runs-BMMJyRtq.js} +1 -1
  58. package/dist/client/assets/{automations-oTAQWsS7.js → automations-DoosX3yK.js} +1 -1
  59. package/dist/client/assets/{avatar-BL6j7EM4.js → avatar-Bg8Fajzf.js} +1 -1
  60. package/dist/client/assets/{badge-Cc4XouWa.js → badge-CWyTrVve.js} +1 -1
  61. package/dist/client/assets/{brand-context-BCHQoNph.js → brand-context-D5dCbA6y.js} +1 -1
  62. package/dist/client/assets/{buckets-CLBLkzZh.js → buckets-C3jVEHjb.js} +1 -1
  63. package/dist/client/assets/{calendar-DXmim9-f.js → calendar-D2buY6we.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-S5ghjE3y.js → capability-load-error-Co02--jW.js} +1 -1
  65. package/dist/client/assets/{card-OOIE0uKL.js → card-BVDRUeiB.js} +1 -1
  66. package/dist/client/assets/{chat-context-C10uFg_9.js → chat-context-CpxV-LEc.js} +1 -1
  67. package/dist/client/assets/{checkbox-EJ-FS6-O.js → checkbox-C0OD5DTK.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-BYusj1Yo.js → cli-auth-success-pLKti1nS.js} +1 -1
  69. package/dist/client/assets/collection-detail-Bx5cx6Tv.js +1 -0
  70. package/dist/client/assets/{collection-display-button-B9EwJigp.js → collection-display-button-Dpa_fFcT.js} +1 -1
  71. package/dist/client/assets/{collection-search-CVFFSy0S.js → collection-search-DHln9QoJ.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-C1Fi6DAM.js → collection-table-wrapper-CTiIT2dF.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-CArtFM6T.js → collection-tabs-BaiyS1az.js} +1 -1
  74. package/dist/client/assets/{collections-BMUil3in.js → collections-Deko--Yp.js} +1 -1
  75. package/dist/client/assets/{command-BeSVNuhP.js → command-3qLn4P52.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-nMepiraO.js → connect-desktop-dialog-BoRQM4OA.js} +1 -1
  77. package/dist/client/assets/{connection-card-BAVVkgt5.js → connection-card-ZCt-smg_.js} +1 -1
  78. package/dist/client/assets/{connection-detail-BTh_x2Hu.js → connection-detail-DipDTh4H.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-C7w-EHHd.js → connection-form-helpers-B6JNJh-A.js} +1 -1
  80. package/dist/client/assets/{connections-CrTg-ish.js → connections-DzNM9iR8.js} +1 -1
  81. package/dist/client/assets/decopilot-sse-pool-8baykh62.js +1 -0
  82. package/dist/client/assets/{dialog-DlK91HiY.js → dialog-BnOLdErK.js} +1 -1
  83. package/dist/client/assets/{domain-settings-B7UAGOxI.js → domain-settings-CwC_r-qt.js} +1 -1
  84. package/dist/client/assets/{drawer-We__DvM1.js → drawer-Be_zu0QX.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-9oUOEimm.js → dropdown-menu-mHDT-XH7.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-D7rRlhnh.js → dynamic-plugin-layout-BGkekAkH.js} +1 -1
  87. package/dist/client/assets/{empty-state-CwB2rEHC.js → empty-state-CeDRg4Pp.js} +1 -1
  88. package/dist/client/assets/{empty-state-DWre-pls.js → empty-state-CpfaS4oL.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-Deygnaxj.js → extract-connection-data-bN8kltS6.js} +1 -1
  90. package/dist/client/assets/{features-C1SyNqJm.js → features-4Hsf4UEQ.js} +1 -1
  91. package/dist/client/assets/file-explorer-Bm3G3AJO.js +2 -0
  92. package/dist/client/assets/{file-type-icon-g69R8oLw.js → file-type-icon-DHQvk0za.js} +1 -1
  93. package/dist/client/assets/{files-C6FoCY_v.js → files-Bp_B54JG.js} +1 -1
  94. package/dist/client/assets/{form-8fnZRdSd.js → form-C_FOfVah.js} +1 -1
  95. package/dist/client/assets/{general-XtW1kUDP.js → general-Dwpcwhzc.js} +1 -1
  96. package/dist/client/assets/{generate-id-DHU56BsF.js → generate-id-CQZwmjfI.js} +1 -1
  97. package/dist/client/assets/github-repo-picker-Cd_kXw_v.js +4 -0
  98. package/dist/client/assets/{header-tab-button-B8CWwAih.js → header-tab-button-yQ_OLTia.js} +1 -1
  99. package/dist/client/assets/{hover-card-DwcwURxp.js → hover-card-CHj7OURi.js} +1 -1
  100. package/dist/client/assets/{image-field-DmhpoXrw.js → image-field-D7PJzfsZ.js} +1 -1
  101. package/dist/client/assets/{index-PvfjkUpw.js → index-Bq-oI4jf.js} +1 -1
  102. package/dist/client/assets/{index-oexgDee9.js → index-C93oJ98C.js} +1 -1
  103. package/dist/client/assets/{index-BZ_pIRwf.js → index-CR5thpY0.js} +1 -1
  104. package/dist/client/assets/{index-Daxt8Oww.js → index-CVroQ5fV.js} +1 -1
  105. package/dist/client/assets/{index-DBE0AwRo.js → index-CXrzfY3D.js} +1 -1
  106. package/dist/client/assets/{index-Cxw5N6xu.js → index-Cvm5sLsh.js} +1 -1
  107. package/dist/client/assets/{index-C5kgHpFv.js → index-D0AW3RJr.js} +1 -1
  108. package/dist/client/assets/{index-DxEUOQQs.js → index-DHxOddsj.js} +3 -3
  109. package/dist/client/assets/{index-C2l1dIiW.js → index-DdL0ZJ74.js} +1 -1
  110. package/dist/client/assets/index-DeWy5Ckp.js +1 -0
  111. package/dist/client/assets/{index-BATH3mQn.js → index-DhrBeRkU.js} +1 -1
  112. package/dist/client/assets/{index-CFHtQMhz.js → index-Dw2PpfWw.js} +2 -2
  113. package/dist/client/assets/{index-ZOhZPSgS.js → index-bcXz_XDV.js} +1 -1
  114. package/dist/client/assets/{index-DnaxJsHb.js → index-fYs9lCK5.js} +4 -4
  115. package/dist/client/assets/index-jA2TneF4.js +1 -0
  116. package/dist/client/assets/{index-redirect-HOxoe50M.js → index-redirect-CNjnlL2S.js} +1 -1
  117. package/dist/client/assets/{infiniteQueryObserver-_wx8vha2.js → infiniteQueryObserver-Da-l1Mrb.js} +1 -1
  118. package/dist/client/assets/{input-CzgGcI3V.js → input-C3YblD3D.js} +1 -1
  119. package/dist/client/assets/{integration-icon-TXgAkIpf.js → integration-icon-DNnbE81S.js} +1 -1
  120. package/dist/client/assets/{label-Bz4-Isgq.js → label-g7a72jJD.js} +1 -1
  121. package/dist/client/assets/{layout-CJmh1JYB.js → layout-Bac2NmXP.js} +1 -1
  122. package/dist/client/assets/{login-CqLFGKun.js → login-Dy8BMo_0.js} +1 -1
  123. package/dist/client/assets/{members-CkjIPrxM.js → members-DnAomETO.js} +1 -1
  124. package/dist/client/assets/{monaco-editor-H7pARgsv.js → monaco-editor-CVjkFUXK.js} +1 -1
  125. package/dist/client/assets/{monitoring-stats-row-DS1hvbdH.js → monitoring-stats-row-BXLdNMMZ.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-HUP2iLBH.js → oauth-callback-1VcaC9dS.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-ai-provider-Dd9lClDY.js → oauth-callback-ai-provider-MiK5yD8w.js} +1 -1
  128. package/dist/client/assets/{onboarding-CkoQ7XPG.js → onboarding-BGq8QKH-.js} +1 -1
  129. package/dist/client/assets/{org-install-BXFenQeY.js → org-install-DZd3jGKm.js} +1 -1
  130. package/dist/client/assets/{org-layout-CWtH4lkJ.js → org-layout-BsR_SirN.js} +1 -1
  131. package/dist/client/assets/{org-plugin-layout-3y1WMApX.js → org-plugin-layout-DiqJAM1g.js} +1 -1
  132. package/dist/client/assets/{page-seo-form-S_9vd5c_.js → page-seo-form-D30yiy8Q.js} +1 -1
  133. package/dist/client/assets/page-seo-sheet-DHjVYqZY.js +1 -0
  134. package/dist/client/assets/{pair-Dqpt4Jli.js → pair-CV7DGW5V.js} +1 -1
  135. package/dist/client/assets/{plugin-empty-state-LQMx4SEB.js → plugin-empty-state-rraryswS.js} +1 -1
  136. package/dist/client/assets/{plugin-header-BZ1oWLb9.js → plugin-header-B1uUxTrr.js} +1 -1
  137. package/dist/client/assets/{plugin-layout-BY7Ar40U.js → plugin-layout-DmiyMdB_.js} +1 -1
  138. package/dist/client/assets/{popover-7ZV_x738.js → popover-8cVh6gq0.js} +1 -1
  139. package/dist/client/assets/{post-editor-CbtQkJeo.js → post-editor-C7P1dXNH.js} +1 -1
  140. package/dist/client/assets/{primitives-B1fkoae3.js → primitives-BsgolKyl.js} +1 -1
  141. package/dist/client/assets/{profile-BIgGVZDN.js → profile-D4w-Z3ol.js} +1 -1
  142. package/dist/client/assets/project-app-view-MmHyDgpb.js +1 -0
  143. package/dist/client/assets/record-editor-LCb43Ehs.js +1 -0
  144. package/dist/client/assets/registry-DRQ1oW7y.js +2 -0
  145. package/dist/client/assets/{registry-layout-Bp8ThmJv.js → registry-layout-C-3QWp3D.js} +1 -1
  146. package/dist/client/assets/{require-capability-Cu6FsDEP.js → require-capability-skg99hPH.js} +1 -1
  147. package/dist/client/assets/{required-auth-layout-s-nnIbb3.js → required-auth-layout-Cidb--Hk.js} +1 -1
  148. package/dist/client/assets/{reset-password-BfEM853p.js → reset-password-CNhRvj5g.js} +1 -1
  149. package/dist/client/assets/{resizable-D2JXsfXz.js → resizable-BT48Uzms.js} +1 -1
  150. package/dist/client/assets/{roles-cALq3Qwx.js → roles-9lGr_fMG.js} +1 -1
  151. package/dist/client/assets/save-referenced-block-Uk3HPmEZ.js +1 -0
  152. package/dist/client/assets/{save-status-BcFNfyWL.js → save-status-DsIS1sld.js} +1 -1
  153. package/dist/client/assets/{schema-form-B407z7tS.js → schema-form-oJE4kcAX.js} +1 -1
  154. package/dist/client/assets/{scroll-area-ChPJ-NEF.js → scroll-area-D2NfEZKG.js} +1 -1
  155. package/dist/client/assets/{search-input-Cray-A1q.js → search-input-wg0ktmKr.js} +1 -1
  156. package/dist/client/assets/{secrets-CSi3922A.js → secrets-YPZEWZE9.js} +1 -1
  157. package/dist/client/assets/{sections-editor-Dn33QM0Q.js → sections-editor-CDk8QiTt.js} +1 -1
  158. package/dist/client/assets/{select-BhUuCBjD.js → select-LvZkQCcv.js} +1 -1
  159. package/dist/client/assets/{select-model-C941S1nf.js → select-model-Bvdn_l3a.js} +1 -1
  160. package/dist/client/assets/seo-editor-CZ4NCpV7.js +1 -0
  161. package/dist/client/assets/settings-layout-Cn8PAm-f.js +1 -0
  162. package/dist/client/assets/{settings-section-BmqyawBS.js → settings-section-BiebCtcC.js} +1 -1
  163. package/dist/client/assets/{sheet-Devtg9cX.js → sheet-4GES45T2.js} +1 -1
  164. package/dist/client/assets/{shell-controls-3zx-sXr7.js → shell-controls-pFVNS2Vn.js} +1 -1
  165. package/dist/client/assets/{shell-layout-DRNHZhhH.js → shell-layout-DtkuyxW9.js} +1 -1
  166. package/dist/client/assets/{shell-route-loading-CDKyU1Jg.js → shell-route-loading-B6fsTD_h.js} +1 -1
  167. package/dist/client/assets/{sidebar-D_Yb-5nE.js → sidebar-BY-0S2nV.js} +1 -1
  168. package/dist/client/assets/{skeleton-DU4Yk3QQ.js → skeleton-B2rX4p4v.js} +1 -1
  169. package/dist/client/assets/{sortable.esm-DLnTPF68.js → sortable.esm-C0tZpwHI.js} +1 -1
  170. package/dist/client/assets/{spinner-DJudGYoz.js → spinner-WtoCvpNX.js} +1 -1
  171. package/dist/client/assets/{sso-Bc1ESWi6.js → sso-4MYeJHQK.js} +1 -1
  172. package/dist/client/assets/{store-Ble4KI2L.js → store-BTeo8TpT.js} +1 -1
  173. package/dist/client/assets/store-registry-B8aDVYEg.js +2 -0
  174. package/dist/client/assets/{studio-tools-CdiIGNug.js → studio-tools-CH7dZ7HT.js} +1 -1
  175. package/dist/client/assets/{switch-CbDNpyYj.js → switch-BOtiDaPh.js} +1 -1
  176. package/dist/client/assets/{tab-id-CixUfikt.js → tab-id-DaQY5Du1.js} +3 -3
  177. package/dist/client/assets/{table-C7al_g9w.js → table-kq85oeWE.js} +1 -1
  178. package/dist/client/assets/{tabs-DpPbTcOX.js → tabs-D_XRbq3N.js} +1 -1
  179. package/dist/client/assets/{task-status-B4xhXa10.js → task-status-BlpPmTT-.js} +1 -1
  180. package/dist/client/assets/{textarea-CHCvnh_8.js → textarea-CxRmk2pV.js} +1 -1
  181. package/dist/client/assets/{toggle-group-DUH3UCsh.js → toggle-group-B_ZhC8rH.js} +1 -1
  182. package/dist/client/assets/{toolbar-Dje6lkWt.js → toolbar-BptUton3.js} +1 -1
  183. package/dist/client/assets/{tools-list-BYNSxX2E.js → tools-list-BXxC0BJ6.js} +1 -1
  184. package/dist/client/assets/{tooltip-BIymZbyc.js → tooltip-6OktDyzD.js} +1 -1
  185. package/dist/client/assets/{types-CmWRxh2O.js → types-k3mlT_jb.js} +1 -1
  186. package/dist/client/assets/{use-ai-providers-i1tqdzqX.js → use-ai-providers-Czs3LwMV.js} +1 -1
  187. package/dist/client/assets/{use-automations-DGwM8rjk.js → use-automations-6FHnA6mT.js} +1 -1
  188. package/dist/client/assets/{use-capability-C6m2-0Ci.js → use-capability-B2GMKCxl.js} +1 -1
  189. package/dist/client/assets/{use-clock-tick-B8zeuW9S.js → use-clock-tick-DRfafiJJ.js} +1 -1
  190. package/dist/client/assets/{use-collections-CPla-8Z_.js → use-collections-3gcbdMo5.js} +1 -1
  191. package/dist/client/assets/{use-connection-7yE-FpPg.js → use-connection-Cygt3JAU.js} +1 -1
  192. package/dist/client/assets/{use-copy-CMgaIgR7.js → use-copy-BzO5OLbn.js} +1 -1
  193. package/dist/client/assets/{use-create-virtual-mcp-BWWSVfRV.js → use-create-virtual-mcp-BJIgmNjf.js} +1 -1
  194. package/dist/client/assets/{use-debounced-autosave-DtXHyjU0.js → use-debounced-autosave-rTdfYQSA.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-v7_IOcbu.js → use-delete-connection-BwHDAibo.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-BmBPsN9j.js → use-file-configs-C_uUU82K.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-COS9eomA.js → use-infinite-scroll-D7Lz32GP.js} +1 -1
  198. package/dist/client/assets/{use-list-state-Cl12C-eO.js → use-list-state-CAT0PD89.js} +1 -1
  199. package/dist/client/assets/{use-mcp-client-BW6MR0tW.js → use-mcp-client-Bbkq-Btq.js} +1 -1
  200. package/dist/client/assets/{use-mcp-prompts-DauhYIMV.js → use-mcp-prompts-C2IR7B-B.js} +1 -1
  201. package/dist/client/assets/{use-mcp-tools-BdvRRDeD.js → use-mcp-tools-BiO0x3bS.js} +1 -1
  202. package/dist/client/assets/{use-members-UnrPTEyo.js → use-members-Ct7TKvLy.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-7tEptzcr.js → use-navigate-to-agent-7jnPTeCV.js} +1 -1
  204. package/dist/client/assets/{use-org-auth-client-D_nAk9Nf.js → use-org-auth-client-DwSMx4xq.js} +1 -1
  205. package/dist/client/assets/{use-org-sso-BZSKGD_q.js → use-org-sso-HULZXLZY.js} +1 -1
  206. package/dist/client/assets/{use-organization-roles-DDLxus16.js → use-organization-roles-C24SP1RJ.js} +1 -1
  207. package/dist/client/assets/{use-organization-settings-Ds8za6ZV.js → use-organization-settings-6ykeD7wG.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-Bo5wHKtk.js → use-registry-connections-Cw0Uu9HN.js} +1 -1
  209. package/dist/client/assets/{use-secrets-3j7bfIX7.js → use-secrets-Dn7Z2olr.js} +1 -1
  210. package/dist/client/assets/use-status-sounds-BMl-h7wF.js +1 -0
  211. package/dist/client/assets/{use-view-mode-CdHjt_dk.js → use-view-mode-DS8kaEq4.js} +1 -1
  212. package/dist/client/assets/{use-virtual-mcp-C5aNldwS.js → use-virtual-mcp-C6pMpGrR.js} +1 -1
  213. package/dist/client/assets/useInfiniteQuery-DnxNK7B2.js +1 -0
  214. package/dist/client/assets/{useRouterState-CKqJqhNS.js → useRouterState-Dnb9kW5z.js} +1 -1
  215. package/dist/client/assets/useSuspenseInfiniteQuery-Bdpr4GcQ.js +1 -0
  216. package/dist/client/assets/{user-D4kiCnS_.js → user-TO91q8is.js} +1 -1
  217. package/dist/client/assets/{view-mode-toggle-D6mTnqbc.js → view-mode-toggle-X2TTOWIg.js} +1 -1
  218. package/dist/client/assets/watch-sse-pool-CuN8_Ws2.js +1 -0
  219. package/dist/client/assets/{workflow-YStE-9Wj.js → workflow-Bof_Hi_L.js} +1 -1
  220. package/dist/client/assets/workflow-detail-xblJkXWm.js +1 -0
  221. package/dist/client/index.html +1 -1
  222. package/dist/server/cli.js +421 -421
  223. package/dist/server/server.js +282 -282
  224. package/package.json +1 -1
  225. package/dist/client/assets/add-section-modal-BCNLSlG_.js +0 -1
  226. package/dist/client/assets/ai-providers-DwCvc_zL.js +0 -1
  227. package/dist/client/assets/app-editor-DUutwvll.js +0 -1
  228. package/dist/client/assets/collection-detail-jnv2JHtL.js +0 -1
  229. package/dist/client/assets/create-sse-subscription-BS5983N4.js +0 -1
  230. package/dist/client/assets/decopilot-sse-pool-C9YWBszR.js +0 -1
  231. package/dist/client/assets/file-explorer-B31Paeha.js +0 -2
  232. package/dist/client/assets/github-repo-picker-CA1Lsyag.js +0 -4
  233. package/dist/client/assets/index-Beg4zk5F.js +0 -1
  234. package/dist/client/assets/index-Dlen5TT1.js +0 -1
  235. package/dist/client/assets/page-seo-sheet-A616YBcI.js +0 -1
  236. package/dist/client/assets/project-app-view-C7vmMA1u.js +0 -1
  237. package/dist/client/assets/record-editor-Sic5IUJ0.js +0 -1
  238. package/dist/client/assets/registry-CNVAuq_t.js +0 -2
  239. package/dist/client/assets/save-referenced-block-CL_4PMgI.js +0 -1
  240. package/dist/client/assets/seo-editor-CSQJAMXP.js +0 -1
  241. package/dist/client/assets/settings-layout-mUcXrMvm.js +0 -1
  242. package/dist/client/assets/store-registry-Csepzf8q.js +0 -2
  243. package/dist/client/assets/use-status-sounds-TuoDiwSP.js +0 -1
  244. package/dist/client/assets/useInfiniteQuery-CMP19UQ8.js +0 -1
  245. package/dist/client/assets/useSuspenseInfiniteQuery-Dsr82JBj.js +0 -1
  246. package/dist/client/assets/workflow-detail-Vo_71HSM.js +0 -1
@@ -1 +1 @@
1
- import{e as S,c as w,j as r,r as T,bn as A,bt as H,B as P}from"./index-DxEUOQQs.js";import{i as R}from"./LayoutLeft-zPlWqXYO.js";import{u as V,c as D,a as B,T as E,b as z}from"./tooltip-BIymZbyc.js";import{b as W,d as G,S as L,c as q,a as F}from"./sheet-Devtg9cX.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function se(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function ie(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function le(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function re(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function ne(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xe(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ne as S,ie as a,se as b,me as c,xe as d,ue as e,pe as f,be as g,ce as h,fe as i,le as j,oe as k,de as l,re as m,O as u};
1
+ import{e as S,c as w,j as r,r as T,bn as A,bt as H,B as P}from"./index-DHxOddsj.js";import{i as R}from"./LayoutLeft-DwKLO_V_.js";import{u as V,c as D,a as B,T as E,b as z}from"./tooltip-6OktDyzD.js";import{b as W,d as G,S as L,c as q,a as F}from"./sheet-4GES45T2.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function se(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function ie(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function le(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function re(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function ne(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xe(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ne as S,ie as a,se as b,me as c,xe as d,ue as e,pe as f,be as g,ce as h,fe as i,le as j,oe as k,de as l,re as m,O as u};
@@ -1 +1 @@
1
- import{e as n,c,j as i}from"./index-DxEUOQQs.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
1
+ import{e as n,c,j as i}from"./index-DHxOddsj.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
@@ -1,4 +1,4 @@
1
- import{q as an,b as kn,u as gr,H as mr,I as vr,j as i,B as He,o as Le,r as u,G as br,f as xr,l as It,M as Kt,J as Yt,t as ne,K as At,e as yr,p as wr,L as Cr,c as Sr,b5 as $,aU as ft}from"./index-DxEUOQQs.js";import{g as Dr}from"./connection-slug-eyAPH6o3.js";import{u as Tn,a as _n,g as jr,C as Ht}from"./connection-card-BAVVkgt5.js";import{C as Rr}from"./collection-search-CVFFSy0S.js";import{C as Nr}from"./collection-tabs-CArtFM6T.js";import{g as Ir}from"./generate-id-DHU56BsF.js";import{D as On,a as Mn,b as Pn,c as Ln,e as Ar,d as Er}from"./dialog-DlK91HiY.js";import{b as kr,a as Tr,c as _r,D as Or,d as Mr,e as Pr,f as Lr}from"./drawer-We__DvM1.js";import{u as zr,b as Wt,T as qt,a as Gt}from"./tooltip-BIymZbyc.js";import{F as De,b as je,c as Re,d as Ne,f as Ie,a as hn}from"./form-8fnZRdSd.js";import{I as Ye}from"./input-CzgGcI3V.js";import{d as Fr,S as $r,a as Br,b as Vr,c as ut}from"./select-BhUuCBjD.js";import{T as Xr}from"./textarea-CHCvnh_8.js";import{b as zn}from"./use-connection-7yE-FpPg.js";import{n as Et}from"./Container-Ck07PAMh.js";import{s as Jt}from"./Star01-CROTt7h-.js";import{S as Ur}from"./agent-icon-BL0Zyuef.js";import{s as Kr}from"./XClose-B2Xxw9ZV.js";import{c as Yr,i as St,a as pn,E as Hr,p as Wr,b as qr,d as Gr}from"./connection-form-helpers-C7w-EHHd.js";import{u as gn}from"./use-infinite-scroll-COS9eomA.js";import{u as Jr}from"./useSuspenseInfiniteQuery-Dsr82JBj.js";import{a as Qr,u as Zr}from"./use-mcp-client-BW6MR0tW.js";import{g as eo,e as to,a as no}from"./extract-connection-data-Deygnaxj.js";import{B as Dt}from"./badge-Cc4XouWa.js";import{c as Qt}from"./XCircle-DSNLgcsz.js";import{i as mn}from"./Check-CJuLJZRg.js";import{s as ro}from"./Plus-D3Yt_klI.js";function oo({open:t,onOpenChange:e,onCreated:n}){const{org:r}=an(),{data:o}=kn.useSession(),{stdioEnabled:s}=gr(),a=zr(),c=zn(),l=Tn(),h=_n(l,"").items,d=mr({resolver:vr(Yr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=d.watch("ui_type"),v=d.watch("connection_url"),N=d.watch("npx_package"),x=St({uiType:m,connectionUrl:v??"",npxPackage:N??""})??pn({uiType:m,connectionUrl:v??"",registryItems:h}),b=g=>{const p=g.trim();if(!p)return;const y=!!d.formState.dirtyFields.title,T=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,S=O=>{if(O&&(!y&&!d.getValues("title").trim()&&O.title&&d.setValue("title",O.title,{shouldDirty:!1}),!T&&!(d.getValues("description")??"").trim()&&O.description&&d.setValue("description",O.description,{shouldDirty:!1}),!I&&O.envVarKeys?.length)){const K=d.getValues("env_vars")??[],B=new Set(K.map(V=>V.key)),P=O.envVarKeys.filter(V=>!B.has(V));P.length>0&&d.setValue("env_vars",[...K,...P.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},A=Wr(p);if(A&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(St({uiType:"NPX",npxPackage:A.packageName}));return}if(p.startsWith("http://")||p.startsWith("https://")){const O=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";d.setValue("ui_type",O,{shouldDirty:!0}),d.setValue("connection_url",p,{shouldDirty:!0}),S(St({uiType:O,connectionUrl:p})??pn({uiType:O,connectionUrl:p,registryItems:h}));return}m==="NPX"&&S(St({uiType:"NPX",npxPackage:p}))},R=g=>{g||d.reset(),e(g)},w=async g=>{let p,y=null,T=null,I=null;g.ui_type==="NPX"?(p="STDIO",y="",I=qr(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(p="STDIO",y="",I=Gr(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(p=g.ui_type,y=g.connection_url||"",T=g.connection_token||null);const S=Ir("conn");try{await c.create.mutateAsync({id:S,title:g.title,description:g.description||null,connection_type:p,connection_url:y,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(S)}catch{Le.error("Failed to create connection")}},C="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",k=d.formState.isSubmitting?"Saving...":"Create Connection",E=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Fr,{value:g.value,onValueChange:g.onChange,children:[i.jsx(Ne,{children:i.jsx($r,{children:i.jsx(Br,{})})}),i.jsxs(Vr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Ur,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),m==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"@perplexity-ai/mcp-server",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("npx_package",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),m==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"node, bun, python...",...g,value:g.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"arg1 arg2 --flag value",...g,value:g.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"/path/to/project (optional)",...g,value:g.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(m==="NPX"||m==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Hr,{value:g.value??[],onChange:g.onChange})}),i.jsx(Ie,{})]})}),m!=="NPX"&&m!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"https://example.com/mcp",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("connection_url",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(Ye,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...g,value:g.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"My Connection",...g})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Xr,{placeholder:"A brief description of this connection",rows:3,...g,value:g.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(kr,{open:t,onOpenChange:R,children:i.jsxs(Tr,{className:"max-h-[90vh]",children:[i.jsx(_r,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Or,{children:C}),i.jsx(Mr,{className:"mt-1",children:j})]}),i.jsx(Pr,{asChild:!0,children:i.jsx(He,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Kr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),i.jsx(Lr,{children:i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):i.jsx(On,{open:t,onOpenChange:R,children:i.jsxs(Mn,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:C}),i.jsx(Ar,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"py-4",children:E}),i.jsxs(Er,{children:[i.jsx(He,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function so(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:m}=t,v=n===void 0?"add":n,N=m===void 0?"connected":m,{org:x}=an(),b=u.useDeferredValue(f),R=f!==b,w=b.trim().toLowerCase();let C;e[0]!==N?(C=D=>D??N,e[0]=N,e[1]=C):C=e[1];const[j,k]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),C);let E;e[2]!==j||e[3]!==k?(E=D=>{D!==j&&ne("connections_dialog_tab_changed",{to_tab:D}),k(D)},e[2]=j,e[3]=k,e[4]=E):E=e[4];const g=E;let p;e[5]!==x.id||e[6]!==x.slug?(p={connectionId:Qr,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=p):p=e[7];const y=Zr(p);let T,I,S;if(e[8]!==y||e[9]!==b||e[10]!==x.id){S=b?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:b.trim()},{field:["description"],operator:"contains",value:b.trim()}]}:void 0;const D={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},L=JSON.stringify(D);I=Jr,T=At.collectionListInfinite(y,x.id,"","CONNECTIONS",L),e[8]=y,e[9]=b,e[10]=x.id,e[11]=T,e[12]=I,e[13]=S}else T=e[11],I=e[12],S=e[13];let A;e[14]!==y||e[15]!==S?(A=async D=>{const{pageParam:L}=D,de=L===void 0?0:L;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=y,e[15]=S,e[16]=A):A=e[16];let O;e[17]!==T||e[18]!==A?(O={queryKey:T,queryFn:A,initialPageParam:0,getNextPageParam:fo,staleTime:3e4},e[17]=T,e[18]=A,e[19]=O):O=e[19];const{data:K,fetchNextPage:B,hasNextPage:P,isFetchingNextPage:V}=I(O),re=K?.pages.flatMap(uo)??[],xe=jr(re),qe=new Set(re.filter(lo).map(co)),X=Tn(),H=_n(X,b),he=gn(H.loadMore,H.hasMore,H.isLoadingMore),Ae=gn(B,P??!1,V),z=j==="all"||!!w,Ke=z?H.items.filter(D=>{const L=eo(D);if(L&&qe.has(L))return!1;if(!w)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(w)}):[],Z=Ke.filter(ao),q=Ke.filter(io);let M;e[20]!==o?(M=D=>D.some(L=>o.has(L.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let G;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==v||e[27]!==s||e[28]!==d||e[29]!==a?(G=(D,L,de,Fe,me)=>{const Ze=Ee(me),$e=me.find(F=>!o.has(F.id)),te=me[0];if(v==="browse"){const F=Dr(te);return i.jsx(Ht,{connection:{title:L,icon:de,description:me.length>1?`${me.length} instances`:Fe??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Connected"]}),onClick:()=>{ne("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:me.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:L,icon:de,description:Fe},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Added"]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),$e?(ne("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:$e.id}),r&&ne("agent_connection_attached",{agent_id:r,connection_id:$e.id,app_name:te.app_name??null,mode:"existing"}),s($e.id)):(ne("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=v,e[27]=s,e[28]=d,e[29]=a,e[30]=G):G=e[30];const pe=G;let ee;e[31]!==l||e[32]!==v||e[33]!==c?(ee=D=>{const L=D._meta?.["mcp.mesh"],de=L?.friendlyName||L?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",Fe=D.server?.description||D.description||null,me=D.server?.icons?.[0]?.src||no(D.server?.repository)||null,Ze=L?.official===!0,$e=L?.verified===!0,te=L?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:Fe,icon:me},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Gt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&$e&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Verified by the Deco team"})]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),ne("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:L?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):v==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=v,e[33]=c,e[34]=ee):ee=e[34];const ke=ee,ye=!w&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Nr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>g(D)}),i.jsxs(He,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{ne("connections_dialog_custom_clicked"),h()},children:[i.jsx(ro,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let Te;e[35]!==Ge?(Te=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=Te):Te=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let oe;e[37]!==pe?(oe=D=>{if(D.type==="group")return pe(D.key,D.title,D.icon,null,D.connections);const L=D.connection;return pe(L.id,L.title,L.icon,L.description??null,[L])},e[37]=pe,e[38]=oe):oe=e[38];const ze=xe.map(oe);let ge;e[39]!==Ae?(ge=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=ge):ge=e[40];let _e;e[41]!==V?(_e=V&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=_e):_e=e[42];const Je=z&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Qt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=z&&Z.map(ke),at=z&&q.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=z&&q.map(ke);let se;e[43]!==he||e[44]!==X||e[45]!==z?(se=z&&X.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=X,e[45]=z,e[46]=se):se=e[46];let le;e[47]!==H.isLoadingMore||e[48]!==z?(le=z&&H.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=z,e[49]=le):le=e[49];let Oe;e[50]!==ze||e[51]!==ge||e[52]!==_e||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==se||e[58]!==le?(Oe=i.jsxs("div",{className:st,children:[ze,ge,_e,Je,it,at,we,se,le]}),e[50]=ze,e[51]=ge,e[52]=_e,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=se,e[58]=le,e[59]=Oe):Oe=e[59];let J;e[60]!==j||e[61]!==xe.length||e[62]!==q||e[63]!==f||e[64]!==Z?(J=xe.length===0&&Z.length===0&&q.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=q,e[63]=f,e[64]=Z,e[65]=J):J=e[65];let Me;e[66]!==Te||e[67]!==Oe||e[68]!==J?(Me=i.jsxs("div",{className:Te,children:[Oe,J]}),e[66]=Te,e[67]=Oe,e[68]=J,e[69]=Me):Me=e[69];let Qe;return e[70]!==ye||e[71]!==Me?(Qe=i.jsxs(i.Fragment,{children:[ye,Me]}),e[70]=ye,e[71]=Me,e[72]=Qe):Qe=e[72],Qe}function io(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function ao(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function co(t){return t.app_name}function lo(t){return t.app_name}function uo(t){return t?.items??[]}function fo(t,e){if(t?.hasMore)return e.reduce(ho,0)}function ho(t,e){return t+(e?.items?.length??0)}function Ai({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:p=>{},f=(p,y,T)=>{a&&ne("agent_connection_attached",{agent_id:a,connection_id:p,app_name:y,mode:T})},[h,d]=u.useState(null),[m,v]=u.useState(r),[N,x]=u.useState(!1),{org:b}=an(),{data:R}=kn.useSession(),w=zn(),C=br(),j=xr(),k=p=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:b.slug,appSlug:p}})},E=async p=>{d(p.app_name??p.id);try{const T=`${p.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,S=(await w.create.mutateAsync({title:T,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null})).id,A=new URL(`/api/${b.slug}/mcp/${S}`,window.location.origin),O=await Kt({url:A.href,token:null,orgId:b.id});if(O.supportsOAuth&&!O.isAuthenticated){const{token:K,tokenInfo:B,error:P}=await Yt({connectionId:S,orgSlug:b.slug,scope:"offline_access"});if(P||!K){ne("connection_oauth_failed",{connection_id:S,flow:"clone",error:P??"no_token"}),Le.error(`Authentication failed: ${P??"no token received"}`),await w.delete.mutateAsync(S);return}if(ne("connection_oauth_succeeded",{connection_id:S,flow:"clone"}),B)try{(await fetch(`/api/${b.slug}/connections/${S}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:B.accessToken,refreshToken:B.refreshToken,expiresIn:B.expiresIn,scope:B.scope,clientId:B.clientId,clientSecret:B.clientSecret,tokenEndpoint:B.tokenEndpoint})})).ok?await w.update.mutateAsync({id:S,data:{}}):await w.update.mutateAsync({id:S,data:{connection_token:K}})}catch{await w.update.mutateAsync({id:S,data:{connection_token:K}})}else await w.update.mutateAsync({id:S,data:{connection_token:K}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(A.href,null)})}f(S,p.app_name??null,"clone"),l(S)}catch(y){console.error("Failed to add connection:",y),Le.error("Failed to add connection")}finally{d(null)}},g=async p=>{if(!(!b||!R?.user?.id)){d(p.id);try{const y=to(p,b.id,R.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,S=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!S){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:A}=await w.create.mutateAsync(y),O=new URL(`/api/${b.slug}/mcp/${A}`,window.location.origin),K=await Kt({url:O.href,token:null,orgId:b.id});if(K.supportsOAuth&&!K.isAuthenticated){const{token:B,tokenInfo:P,error:V}=await Yt({connectionId:A,orgSlug:b.slug,scope:"offline_access"});if(V||!B){ne("connection_oauth_failed",{connection_id:A,flow:"connect_new",error:V??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${V??"no token received"})`}),f(A,y.app_name??null,"new"),l(A);return}if(ne("connection_oauth_succeeded",{connection_id:A,flow:"connect_new"}),P)try{(await fetch(`/api/${b.slug}/connections/${A}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:P.accessToken,refreshToken:P.refreshToken,expiresIn:P.expiresIn,scope:P.scope,clientId:P.clientId,clientSecret:P.clientSecret,tokenEndpoint:P.tokenEndpoint})})).ok?await w.update.mutateAsync({id:A,data:{}}):await w.update.mutateAsync({id:A,data:{connection_token:B}})}catch{await w.update.mutateAsync({id:A,data:{connection_token:B}})}else await w.update.mutateAsync({id:A,data:{connection_token:B}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(O.href,null)}),Le.success("Connected and authenticated")}else Le.success("Connected");f(A,y.app_name??null,"new"),l(A)}catch(y){console.error("Failed to connect:",y),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(On,{open:t,onOpenChange:e,children:[i.jsxs(Mn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Rr,{value:m,onChange:v,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(so,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:E,onConnectAndAdd:g,connectingItemId:h,search:m,onCreateConnection:()=>x(!0),onBrowseNavigate:k,defaultTab:n})})]}),i.jsx(oo,{open:N,onOpenChange:x,onCreated:async p=>{x(!1);const y=new URL(`/api/${b.slug}/mcp/${p}`,window.location.origin),T=await Kt({url:y.href,token:null,orgId:b.id});if(T.supportsOAuth&&!T.isAuthenticated){const{token:I,tokenInfo:S,error:A}=await Yt({connectionId:p,orgSlug:b.slug,scope:"offline_access"});if(A||!I){ne("connection_oauth_failed",{connection_id:p,flow:"custom_create",error:A??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${A??"no token received"})`}),f(p,null,"custom"),l(p),e(!1);return}if(ne("connection_oauth_succeeded",{connection_id:p,flow:"custom_create"}),S)try{(await fetch(`/api/${b.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:S.accessToken,refreshToken:S.refreshToken,expiresIn:S.expiresIn,scope:S.scope,clientId:S.clientId,clientSecret:S.clientSecret,tokenEndpoint:S.tokenEndpoint})})).ok?await w.update.mutateAsync({id:p,data:{}}):await w.update.mutateAsync({id:p,data:{connection_token:I}})}catch{await w.update.mutateAsync({id:p,data:{connection_token:I}})}else await w.update.mutateAsync({id:p,data:{connection_token:I}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(y.href,null)})}f(p,null,"custom"),l(p),e(!1)}})]})}function Ei(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function po(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Q(t);return t instanceof e}function xt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function Fn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:xt(t)||Fn(t)?t.ownerDocument:document:document:document}const ve=zt?u.useLayoutEffect:u.useEffect;function Ft(t){const e=u.useRef(t);return ve(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function go(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function yt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=Ft(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function wt(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),vt=$n(-1);function mo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function vo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Ot(t){if(vo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return mo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),vn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bo(t){return t.matches(vn)?t:t.querySelector(vn)}const xo={display:"none"};function yo(t){let{id:e,value:n}=t;return $.createElement("div",{id:e,style:xo},n)}function wo(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return $.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Co(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Bn=u.createContext(null);function So(t){const e=u.useContext(Bn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Do(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const jo={draggable:`
1
+ import{q as an,b as kn,u as gr,H as mr,I as vr,j as i,B as He,o as Le,r as u,G as br,f as xr,l as It,M as Kt,J as Yt,t as ne,K as At,e as yr,p as wr,L as Cr,c as Sr,b5 as $,aU as ft}from"./index-DHxOddsj.js";import{g as Dr}from"./connection-slug-eyAPH6o3.js";import{u as Tn,a as _n,g as jr,C as Ht}from"./connection-card-ZCt-smg_.js";import{C as Rr}from"./collection-search-DHln9QoJ.js";import{C as Nr}from"./collection-tabs-BaiyS1az.js";import{g as Ir}from"./generate-id-CQZwmjfI.js";import{D as On,a as Mn,b as Pn,c as Ln,e as Ar,d as Er}from"./dialog-BnOLdErK.js";import{b as kr,a as Tr,c as _r,D as Or,d as Mr,e as Pr,f as Lr}from"./drawer-Be_zu0QX.js";import{u as zr,b as Wt,T as qt,a as Gt}from"./tooltip-6OktDyzD.js";import{F as De,b as je,c as Re,d as Ne,f as Ie,a as hn}from"./form-C_FOfVah.js";import{I as Ye}from"./input-C3YblD3D.js";import{d as Fr,S as $r,a as Br,b as Vr,c as ut}from"./select-LvZkQCcv.js";import{T as Xr}from"./textarea-CxRmk2pV.js";import{b as zn}from"./use-connection-Cygt3JAU.js";import{n as Et}from"./Container-B3y5dlGc.js";import{s as Jt}from"./Star01-DkpG4lGE.js";import{S as Ur}from"./agent-icon-cetEWq0Z.js";import{s as Kr}from"./XClose-Cnj8fI9u.js";import{c as Yr,i as St,a as pn,E as Hr,p as Wr,b as qr,d as Gr}from"./connection-form-helpers-B6JNJh-A.js";import{u as gn}from"./use-infinite-scroll-D7Lz32GP.js";import{u as Jr}from"./useSuspenseInfiniteQuery-Bdpr4GcQ.js";import{a as Qr,u as Zr}from"./use-mcp-client-Bbkq-Btq.js";import{g as eo,e as to,a as no}from"./extract-connection-data-bN8kltS6.js";import{B as Dt}from"./badge-CWyTrVve.js";import{c as Qt}from"./XCircle-D0Uf6feY.js";import{i as mn}from"./Check-Cl07asRj.js";import{s as ro}from"./Plus-Dx1SIiMT.js";function oo({open:t,onOpenChange:e,onCreated:n}){const{org:r}=an(),{data:o}=kn.useSession(),{stdioEnabled:s}=gr(),a=zr(),c=zn(),l=Tn(),h=_n(l,"").items,d=mr({resolver:vr(Yr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=d.watch("ui_type"),v=d.watch("connection_url"),N=d.watch("npx_package"),x=St({uiType:m,connectionUrl:v??"",npxPackage:N??""})??pn({uiType:m,connectionUrl:v??"",registryItems:h}),b=g=>{const p=g.trim();if(!p)return;const y=!!d.formState.dirtyFields.title,T=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,S=O=>{if(O&&(!y&&!d.getValues("title").trim()&&O.title&&d.setValue("title",O.title,{shouldDirty:!1}),!T&&!(d.getValues("description")??"").trim()&&O.description&&d.setValue("description",O.description,{shouldDirty:!1}),!I&&O.envVarKeys?.length)){const K=d.getValues("env_vars")??[],B=new Set(K.map(V=>V.key)),P=O.envVarKeys.filter(V=>!B.has(V));P.length>0&&d.setValue("env_vars",[...K,...P.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},A=Wr(p);if(A&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(St({uiType:"NPX",npxPackage:A.packageName}));return}if(p.startsWith("http://")||p.startsWith("https://")){const O=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";d.setValue("ui_type",O,{shouldDirty:!0}),d.setValue("connection_url",p,{shouldDirty:!0}),S(St({uiType:O,connectionUrl:p})??pn({uiType:O,connectionUrl:p,registryItems:h}));return}m==="NPX"&&S(St({uiType:"NPX",npxPackage:p}))},R=g=>{g||d.reset(),e(g)},w=async g=>{let p,y=null,T=null,I=null;g.ui_type==="NPX"?(p="STDIO",y="",I=qr(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(p="STDIO",y="",I=Gr(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(p=g.ui_type,y=g.connection_url||"",T=g.connection_token||null);const S=Ir("conn");try{await c.create.mutateAsync({id:S,title:g.title,description:g.description||null,connection_type:p,connection_url:y,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(S)}catch{Le.error("Failed to create connection")}},C="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",k=d.formState.isSubmitting?"Saving...":"Create Connection",E=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Fr,{value:g.value,onValueChange:g.onChange,children:[i.jsx(Ne,{children:i.jsx($r,{children:i.jsx(Br,{})})}),i.jsxs(Vr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Ur,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),m==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"@perplexity-ai/mcp-server",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("npx_package",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),m==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"node, bun, python...",...g,value:g.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"arg1 arg2 --flag value",...g,value:g.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"/path/to/project (optional)",...g,value:g.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(m==="NPX"||m==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Hr,{value:g.value??[],onChange:g.onChange})}),i.jsx(Ie,{})]})}),m!=="NPX"&&m!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"https://example.com/mcp",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("connection_url",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(Ye,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...g,value:g.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"My Connection",...g})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Xr,{placeholder:"A brief description of this connection",rows:3,...g,value:g.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(kr,{open:t,onOpenChange:R,children:i.jsxs(Tr,{className:"max-h-[90vh]",children:[i.jsx(_r,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Or,{children:C}),i.jsx(Mr,{className:"mt-1",children:j})]}),i.jsx(Pr,{asChild:!0,children:i.jsx(He,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Kr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),i.jsx(Lr,{children:i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):i.jsx(On,{open:t,onOpenChange:R,children:i.jsxs(Mn,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:C}),i.jsx(Ar,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"py-4",children:E}),i.jsxs(Er,{children:[i.jsx(He,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function so(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:m}=t,v=n===void 0?"add":n,N=m===void 0?"connected":m,{org:x}=an(),b=u.useDeferredValue(f),R=f!==b,w=b.trim().toLowerCase();let C;e[0]!==N?(C=D=>D??N,e[0]=N,e[1]=C):C=e[1];const[j,k]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),C);let E;e[2]!==j||e[3]!==k?(E=D=>{D!==j&&ne("connections_dialog_tab_changed",{to_tab:D}),k(D)},e[2]=j,e[3]=k,e[4]=E):E=e[4];const g=E;let p;e[5]!==x.id||e[6]!==x.slug?(p={connectionId:Qr,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=p):p=e[7];const y=Zr(p);let T,I,S;if(e[8]!==y||e[9]!==b||e[10]!==x.id){S=b?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:b.trim()},{field:["description"],operator:"contains",value:b.trim()}]}:void 0;const D={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},L=JSON.stringify(D);I=Jr,T=At.collectionListInfinite(y,x.id,"","CONNECTIONS",L),e[8]=y,e[9]=b,e[10]=x.id,e[11]=T,e[12]=I,e[13]=S}else T=e[11],I=e[12],S=e[13];let A;e[14]!==y||e[15]!==S?(A=async D=>{const{pageParam:L}=D,de=L===void 0?0:L;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=y,e[15]=S,e[16]=A):A=e[16];let O;e[17]!==T||e[18]!==A?(O={queryKey:T,queryFn:A,initialPageParam:0,getNextPageParam:fo,staleTime:3e4},e[17]=T,e[18]=A,e[19]=O):O=e[19];const{data:K,fetchNextPage:B,hasNextPage:P,isFetchingNextPage:V}=I(O),re=K?.pages.flatMap(uo)??[],xe=jr(re),qe=new Set(re.filter(lo).map(co)),X=Tn(),H=_n(X,b),he=gn(H.loadMore,H.hasMore,H.isLoadingMore),Ae=gn(B,P??!1,V),z=j==="all"||!!w,Ke=z?H.items.filter(D=>{const L=eo(D);if(L&&qe.has(L))return!1;if(!w)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(w)}):[],Z=Ke.filter(ao),q=Ke.filter(io);let M;e[20]!==o?(M=D=>D.some(L=>o.has(L.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let G;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==v||e[27]!==s||e[28]!==d||e[29]!==a?(G=(D,L,de,Fe,me)=>{const Ze=Ee(me),$e=me.find(F=>!o.has(F.id)),te=me[0];if(v==="browse"){const F=Dr(te);return i.jsx(Ht,{connection:{title:L,icon:de,description:me.length>1?`${me.length} instances`:Fe??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Connected"]}),onClick:()=>{ne("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:me.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:L,icon:de,description:Fe},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Added"]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),$e?(ne("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:$e.id}),r&&ne("agent_connection_attached",{agent_id:r,connection_id:$e.id,app_name:te.app_name??null,mode:"existing"}),s($e.id)):(ne("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=v,e[27]=s,e[28]=d,e[29]=a,e[30]=G):G=e[30];const pe=G;let ee;e[31]!==l||e[32]!==v||e[33]!==c?(ee=D=>{const L=D._meta?.["mcp.mesh"],de=L?.friendlyName||L?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",Fe=D.server?.description||D.description||null,me=D.server?.icons?.[0]?.src||no(D.server?.repository)||null,Ze=L?.official===!0,$e=L?.verified===!0,te=L?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:Fe,icon:me},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Gt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&$e&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Verified by the Deco team"})]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),ne("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:L?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):v==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=v,e[33]=c,e[34]=ee):ee=e[34];const ke=ee,ye=!w&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Nr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>g(D)}),i.jsxs(He,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{ne("connections_dialog_custom_clicked"),h()},children:[i.jsx(ro,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let Te;e[35]!==Ge?(Te=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=Te):Te=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let oe;e[37]!==pe?(oe=D=>{if(D.type==="group")return pe(D.key,D.title,D.icon,null,D.connections);const L=D.connection;return pe(L.id,L.title,L.icon,L.description??null,[L])},e[37]=pe,e[38]=oe):oe=e[38];const ze=xe.map(oe);let ge;e[39]!==Ae?(ge=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=ge):ge=e[40];let _e;e[41]!==V?(_e=V&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=_e):_e=e[42];const Je=z&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Qt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=z&&Z.map(ke),at=z&&q.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=z&&q.map(ke);let se;e[43]!==he||e[44]!==X||e[45]!==z?(se=z&&X.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=X,e[45]=z,e[46]=se):se=e[46];let le;e[47]!==H.isLoadingMore||e[48]!==z?(le=z&&H.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=z,e[49]=le):le=e[49];let Oe;e[50]!==ze||e[51]!==ge||e[52]!==_e||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==se||e[58]!==le?(Oe=i.jsxs("div",{className:st,children:[ze,ge,_e,Je,it,at,we,se,le]}),e[50]=ze,e[51]=ge,e[52]=_e,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=se,e[58]=le,e[59]=Oe):Oe=e[59];let J;e[60]!==j||e[61]!==xe.length||e[62]!==q||e[63]!==f||e[64]!==Z?(J=xe.length===0&&Z.length===0&&q.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=q,e[63]=f,e[64]=Z,e[65]=J):J=e[65];let Me;e[66]!==Te||e[67]!==Oe||e[68]!==J?(Me=i.jsxs("div",{className:Te,children:[Oe,J]}),e[66]=Te,e[67]=Oe,e[68]=J,e[69]=Me):Me=e[69];let Qe;return e[70]!==ye||e[71]!==Me?(Qe=i.jsxs(i.Fragment,{children:[ye,Me]}),e[70]=ye,e[71]=Me,e[72]=Qe):Qe=e[72],Qe}function io(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function ao(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function co(t){return t.app_name}function lo(t){return t.app_name}function uo(t){return t?.items??[]}function fo(t,e){if(t?.hasMore)return e.reduce(ho,0)}function ho(t,e){return t+(e?.items?.length??0)}function Ai({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:p=>{},f=(p,y,T)=>{a&&ne("agent_connection_attached",{agent_id:a,connection_id:p,app_name:y,mode:T})},[h,d]=u.useState(null),[m,v]=u.useState(r),[N,x]=u.useState(!1),{org:b}=an(),{data:R}=kn.useSession(),w=zn(),C=br(),j=xr(),k=p=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:b.slug,appSlug:p}})},E=async p=>{d(p.app_name??p.id);try{const T=`${p.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,S=(await w.create.mutateAsync({title:T,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null})).id,A=new URL(`/api/${b.slug}/mcp/${S}`,window.location.origin),O=await Kt({url:A.href,token:null,orgId:b.id});if(O.supportsOAuth&&!O.isAuthenticated){const{token:K,tokenInfo:B,error:P}=await Yt({connectionId:S,orgSlug:b.slug,scope:"offline_access"});if(P||!K){ne("connection_oauth_failed",{connection_id:S,flow:"clone",error:P??"no_token"}),Le.error(`Authentication failed: ${P??"no token received"}`),await w.delete.mutateAsync(S);return}if(ne("connection_oauth_succeeded",{connection_id:S,flow:"clone"}),B)try{(await fetch(`/api/${b.slug}/connections/${S}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:B.accessToken,refreshToken:B.refreshToken,expiresIn:B.expiresIn,scope:B.scope,clientId:B.clientId,clientSecret:B.clientSecret,tokenEndpoint:B.tokenEndpoint})})).ok?await w.update.mutateAsync({id:S,data:{}}):await w.update.mutateAsync({id:S,data:{connection_token:K}})}catch{await w.update.mutateAsync({id:S,data:{connection_token:K}})}else await w.update.mutateAsync({id:S,data:{connection_token:K}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(A.href,null)})}f(S,p.app_name??null,"clone"),l(S)}catch(y){console.error("Failed to add connection:",y),Le.error("Failed to add connection")}finally{d(null)}},g=async p=>{if(!(!b||!R?.user?.id)){d(p.id);try{const y=to(p,b.id,R.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,S=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!S){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:A}=await w.create.mutateAsync(y),O=new URL(`/api/${b.slug}/mcp/${A}`,window.location.origin),K=await Kt({url:O.href,token:null,orgId:b.id});if(K.supportsOAuth&&!K.isAuthenticated){const{token:B,tokenInfo:P,error:V}=await Yt({connectionId:A,orgSlug:b.slug,scope:"offline_access"});if(V||!B){ne("connection_oauth_failed",{connection_id:A,flow:"connect_new",error:V??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${V??"no token received"})`}),f(A,y.app_name??null,"new"),l(A);return}if(ne("connection_oauth_succeeded",{connection_id:A,flow:"connect_new"}),P)try{(await fetch(`/api/${b.slug}/connections/${A}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:P.accessToken,refreshToken:P.refreshToken,expiresIn:P.expiresIn,scope:P.scope,clientId:P.clientId,clientSecret:P.clientSecret,tokenEndpoint:P.tokenEndpoint})})).ok?await w.update.mutateAsync({id:A,data:{}}):await w.update.mutateAsync({id:A,data:{connection_token:B}})}catch{await w.update.mutateAsync({id:A,data:{connection_token:B}})}else await w.update.mutateAsync({id:A,data:{connection_token:B}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(O.href,null)}),Le.success("Connected and authenticated")}else Le.success("Connected");f(A,y.app_name??null,"new"),l(A)}catch(y){console.error("Failed to connect:",y),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(On,{open:t,onOpenChange:e,children:[i.jsxs(Mn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Rr,{value:m,onChange:v,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(so,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:E,onConnectAndAdd:g,connectingItemId:h,search:m,onCreateConnection:()=>x(!0),onBrowseNavigate:k,defaultTab:n})})]}),i.jsx(oo,{open:N,onOpenChange:x,onCreated:async p=>{x(!1);const y=new URL(`/api/${b.slug}/mcp/${p}`,window.location.origin),T=await Kt({url:y.href,token:null,orgId:b.id});if(T.supportsOAuth&&!T.isAuthenticated){const{token:I,tokenInfo:S,error:A}=await Yt({connectionId:p,orgSlug:b.slug,scope:"offline_access"});if(A||!I){ne("connection_oauth_failed",{connection_id:p,flow:"custom_create",error:A??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${A??"no token received"})`}),f(p,null,"custom"),l(p),e(!1);return}if(ne("connection_oauth_succeeded",{connection_id:p,flow:"custom_create"}),S)try{(await fetch(`/api/${b.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:S.accessToken,refreshToken:S.refreshToken,expiresIn:S.expiresIn,scope:S.scope,clientId:S.clientId,clientSecret:S.clientSecret,tokenEndpoint:S.tokenEndpoint})})).ok?await w.update.mutateAsync({id:p,data:{}}):await w.update.mutateAsync({id:p,data:{connection_token:I}})}catch{await w.update.mutateAsync({id:p,data:{connection_token:I}})}else await w.update.mutateAsync({id:p,data:{connection_token:I}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(y.href,null)})}f(p,null,"custom"),l(p),e(!1)}})]})}function Ei(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function po(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Q(t);return t instanceof e}function xt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function Fn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:xt(t)||Fn(t)?t.ownerDocument:document:document:document}const ve=zt?u.useLayoutEffect:u.useEffect;function Ft(t){const e=u.useRef(t);return ve(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function go(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function yt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=Ft(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function wt(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),vt=$n(-1);function mo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function vo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Ot(t){if(vo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return mo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),vn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bo(t){return t.matches(vn)?t:t.querySelector(vn)}const xo={display:"none"};function yo(t){let{id:e,value:n}=t;return $.createElement("div",{id:e,style:xo},n)}function wo(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return $.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Co(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Bn=u.createContext(null);function So(t){const e=u.useContext(Bn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Do(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const jo={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -1 +1 @@
1
- import{e as C,c as d,bt as u,j as l}from"./index-DxEUOQQs.js";const m=u("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(m({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=a,e[4]=i):(a=e[3],i=e[4]);let s;e[5]!==t?(s=l.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=l.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
1
+ import{e as C,c as d,bt as u,j as l}from"./index-DHxOddsj.js";const m=u("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(m({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=a,e[4]=i):(a=e[3],i=e[4]);let s;e[5]!==t?(s=l.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=l.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
@@ -1 +1 @@
1
- import{q as D,r as v,j as e,B as p,t as S,o as c,e as N}from"./index-DxEUOQQs.js";import{D as k}from"./domain-settings-B7UAGOxI.js";import{P as f}from"./index-Daxt8Oww.js";import{I as l}from"./input-CzgGcI3V.js";import{S as z}from"./switch-CbDNpyYj.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-BZSKGD_q.js";import{c as q,S as y,a as C,b as r,d as O}from"./settings-section-BmqyawBS.js";import{s as F}from"./Trash01-D9jT6VSX.js";import{R as L}from"./require-capability-Cu6FsDEP.js";import"./studio-tools-CdiIGNug.js";import"./sidebar-D_Yb-5nE.js";import"./LayoutLeft-zPlWqXYO.js";import"./tooltip-BIymZbyc.js";import"./sheet-Devtg9cX.js";import"./X-CH7nrxK3.js";import"./card-OOIE0uKL.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./use-capability-C6m2-0Ci.js";import"./access-gate-CBfdxByI.js";import"./capability-load-error-S5ghjE3y.js";function B(){const{org:t}=D(),{data:a,isLoading:E}=P(t.id,t.slug),x=R(t.id,t.slug),h=A(t.id,t.slug),j=T(t.id,t.slug),[s,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!s.issuer||!s.clientId||!s.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!s.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:s.issuer,clientId:s.clientId,clientSecret:s.clientSecret,discoveryEndpoint:s.discoveryEndpoint||void 0,scopes:s.scopes.split(/\s+/).filter(Boolean),domain:s.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:t.id,email_domain:s.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:t.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},_=async i=>{try{await j.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:t.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(q,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:_,disabled:j.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(F,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${t.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:s.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:s.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:s.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:s.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:s.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:s.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ae(){const t=N.c(1);let a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(L,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),t[0]=a):a=t[0],a}export{ae as default};
1
+ import{q as D,r as v,j as e,B as p,t as S,o as c,e as N}from"./index-DHxOddsj.js";import{D as k}from"./domain-settings-CwC_r-qt.js";import{P as f}from"./index-CVroQ5fV.js";import{I as l}from"./input-C3YblD3D.js";import{S as z}from"./switch-BOtiDaPh.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-HULZXLZY.js";import{c as q,S as y,a as C,b as r,d as O}from"./settings-section-BiebCtcC.js";import{s as F}from"./Trash01-CA4jg9ww.js";import{R as L}from"./require-capability-skg99hPH.js";import"./studio-tools-CH7dZ7HT.js";import"./sidebar-BY-0S2nV.js";import"./LayoutLeft-DwKLO_V_.js";import"./tooltip-6OktDyzD.js";import"./sheet-4GES45T2.js";import"./X-8-D5pATw.js";import"./card-BVDRUeiB.js";import"./ArrowUpRight-CjvxrowT.js";import"./use-capability-B2GMKCxl.js";import"./access-gate-daLhvTar.js";import"./capability-load-error-Co02--jW.js";function B(){const{org:t}=D(),{data:a,isLoading:E}=P(t.id,t.slug),x=R(t.id,t.slug),h=A(t.id,t.slug),j=T(t.id,t.slug),[s,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!s.issuer||!s.clientId||!s.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!s.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:s.issuer,clientId:s.clientId,clientSecret:s.clientSecret,discoveryEndpoint:s.discoveryEndpoint||void 0,scopes:s.scopes.split(/\s+/).filter(Boolean),domain:s.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:t.id,email_domain:s.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:t.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},_=async i=>{try{await j.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:t.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(q,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:_,disabled:j.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(F,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${t.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:s.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:s.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:s.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:s.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:s.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:s.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ae(){const t=N.c(1);let a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(L,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),t[0]=a):a=t[0],a}export{ae as default};
@@ -1 +1 @@
1
- import{e as D,j as s,E as le,r as K,q as ae,G as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,o as ie}from"./index-DxEUOQQs.js";import{i as ue}from"./AlertCircle-C2JPSNIc.js";import{i as pe}from"./ChevronRight-D4rmSZYg.js";import{s as xe}from"./Plus-D3Yt_klI.js";import{s as he}from"./Trash01-D9jT6VSX.js";import{I as X}from"./input-CzgGcI3V.js";import{S as oe}from"./switch-CbDNpyYj.js";import{S as ye}from"./skeleton-DU4Yk3QQ.js";import{A as ne}from"./avatar-BL6j7EM4.js";import{P as je,a as Ce,b as Se}from"./popover-7ZV_x738.js";import{b as re}from"./use-connection-7yE-FpPg.js";import{W as Z}from"./use-mcp-client-BW6MR0tW.js";import{P as G}from"./index-Daxt8Oww.js";import{u as ve}from"./use-registry-connections-Bo5wHKtk.js";import{g as _e,h as be}from"./use-organization-settings-Ds8za6ZV.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-BmqyawBS.js";import{R as Re}from"./require-capability-Cu6FsDEP.js";import"./User01-CWJ4O2R8.js";import"./use-collections-CPla-8Z_.js";import"./sidebar-D_Yb-5nE.js";import"./LayoutLeft-zPlWqXYO.js";import"./tooltip-BIymZbyc.js";import"./sheet-Devtg9cX.js";import"./X-CH7nrxK3.js";import"./card-OOIE0uKL.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./use-capability-C6m2-0Ci.js";import"./access-gate-CBfdxByI.js";import"./capability-load-error-S5ghjE3y.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let q;t[20]!==n||t[21]!==r?(q=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=q):q=t[22];const H=q,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let U;t[37]!==W||t[38]!==P||t[39]!==l?(U=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=U):U=t[40];const V=A.map(U);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function mt(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{mt as default};
1
+ import{e as D,j as s,E as le,r as K,q as ae,G as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,o as ie}from"./index-DHxOddsj.js";import{i as ue}from"./AlertCircle-A2M1Yk61.js";import{i as pe}from"./ChevronRight-C8KzXj8H.js";import{s as xe}from"./Plus-Dx1SIiMT.js";import{s as he}from"./Trash01-CA4jg9ww.js";import{I as X}from"./input-C3YblD3D.js";import{S as oe}from"./switch-BOtiDaPh.js";import{S as ye}from"./skeleton-B2rX4p4v.js";import{A as ne}from"./avatar-Bg8Fajzf.js";import{P as je,a as Ce,b as Se}from"./popover-8cVh6gq0.js";import{b as re}from"./use-connection-Cygt3JAU.js";import{W as Z}from"./use-mcp-client-Bbkq-Btq.js";import{P as G}from"./index-CVroQ5fV.js";import{u as ve}from"./use-registry-connections-Cw0Uu9HN.js";import{g as _e,h as be}from"./use-organization-settings-6ykeD7wG.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-BiebCtcC.js";import{R as Re}from"./require-capability-skg99hPH.js";import"./User01-CMz2xYx2.js";import"./use-collections-3gcbdMo5.js";import"./sidebar-BY-0S2nV.js";import"./LayoutLeft-DwKLO_V_.js";import"./tooltip-6OktDyzD.js";import"./sheet-4GES45T2.js";import"./X-8-D5pATw.js";import"./card-BVDRUeiB.js";import"./ArrowUpRight-CjvxrowT.js";import"./use-capability-B2GMKCxl.js";import"./access-gate-daLhvTar.js";import"./capability-load-error-Co02--jW.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let q;t[20]!==n||t[21]!==r?(q=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=q):q=t[22];const H=q,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let U;t[37]!==W||t[38]!==P||t[39]!==l?(U=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=U):U=t[40];const V=A.map(U);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function mt(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{mt as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C-3QWp3D.js","assets/index-DHxOddsj.js","assets/index-DfYyH4IW.css","assets/XCircle-D0Uf6feY.js","assets/CheckCircle-Ck9u9W7w.js","assets/Container-B3y5dlGc.js","assets/Settings02-CWkfxXGQ.js","assets/use-mcp-client-Bbkq-Btq.js","assets/useInfiniteQuery-DnxNK7B2.js","assets/infiniteQueryObserver-Da-l1Mrb.js","assets/studio-tools-CH7dZ7HT.js","assets/badge-CWyTrVve.js","assets/input-C3YblD3D.js","assets/dropdown-menu-mHDT-XH7.js","assets/Check-Cl07asRj.js","assets/ChevronRight-C8KzXj8H.js","assets/DotsVertical-_g_anHKb.js","assets/table-kq85oeWE.js","assets/toggle-group-B_ZhC8rH.js","assets/use-view-mode-DS8kaEq4.js","assets/tooltip-6OktDyzD.js","assets/FilterLines-EpjZnXUA.js","assets/Globe01-CfZP4vCY.js","assets/SearchMd-DFhUmylG.js","assets/dialog-BnOLdErK.js","assets/X-8-D5pATw.js","assets/AlertCircle-A2M1Yk61.js","assets/Upload01-BbVOBYlS.js","assets/alert-dialog-DokKbPq-.js","assets/card-BVDRUeiB.js","assets/Trash01-CA4jg9ww.js","assets/label-g7a72jJD.js","assets/select-LvZkQCcv.js","assets/ChevronDown-Ce3UdjOo.js","assets/ChevronUp-zA2iz0JQ.js","assets/switch-BOtiDaPh.js","assets/textarea-CxRmk2pV.js","assets/RefreshCcw01-C3I3Y9Tu.js","assets/checkbox-C0OD5DTK.js","assets/Eye-lcuSJE4l.js","assets/LinkExternal01-r7kaLetr.js","assets/use-copy-BzO5OLbn.js","assets/Key01-DyeMqFvi.js","assets/Plus-Dx1SIiMT.js","assets/Play-CnkDDouZ.js"])))=>i.map(i=>d[i]);
2
+ import{e as m,f as n,g as c,j as t,l as f,r as l,_ as p}from"./index-DHxOddsj.js";import{R as u}from"./require-capability-skg99hPH.js";import"./use-capability-B2GMKCxl.js";import"./access-gate-daLhvTar.js";import"./capability-load-error-Co02--jW.js";const g=l.lazy(()=>p(()=>import("./registry-layout-C-3QWp3D.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +1 @@
1
- import{e as i,q as c}from"./index-DxEUOQQs.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=i.c(5),{org:r}=c(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{p as u};
1
+ import{e as i,q as c}from"./index-DHxOddsj.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=i.c(5),{org:r}=c(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{p as u};
@@ -1 +1 @@
1
- import{r as c,j as i,a7 as C,bx as y,bh as T,a8 as I,by as M,bz as z,ag as H,e as A,c as g}from"./index-DxEUOQQs.js";var m="Switch",[U]=H(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:a,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:a,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...a}=r,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:a=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:a});h.call(l,t),l.dispatchEvent(v)}},[u,t,a]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=A.c(9);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==a||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...a,children:n}),e[6]=a,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
1
+ import{r as c,j as i,a7 as C,bx as y,bh as T,a8 as I,by as M,bz as z,ag as H,e as A,c as g}from"./index-DHxOddsj.js";var m="Switch",[U]=H(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:a,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:a,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...a}=r,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:a=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:a});h.call(l,t),l.dispatchEvent(v)}},[u,t,a]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=A.c(9);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==a||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...a,children:n}),e[6]=a,e[7]=s,e[8]=o):o=e[8],o}export{W as S};