@decocms/mesh 2.115.0 → 2.116.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 (180) hide show
  1. package/dist/client/assets/{AlertCircle-DiL2HrFE.js → AlertCircle-BeDT_HtY.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-2d8rAOd4.js → AlertOctagon-QuXKgQ4Q.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-VgUX_bsB.js → AlertTriangle-CpeNmzLj.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-Br1qiDir.js → ArrowLeft-C9FgjUgL.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BjfCYJa6.js → ArrowUp-CA_4TfDf.js} +1 -1
  6. package/dist/client/assets/{Check-B14Bp2E0.js → Check-CNueXKa4.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-qs5k2cFp.js → CheckCircle-B30C7Ky0.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-COU71F1q.js → CheckDone01-DqdhuyiI.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-C_h0QKPV.js → CheckVerified02-DMYVFl8x.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-DmZAA_RH.js → ChevronDown-Dee8Rzkh.js} +1 -1
  11. package/dist/client/assets/{ChevronRight-IL2oOJI2.js → ChevronRight-BFKyuaLR.js} +1 -1
  12. package/dist/client/assets/{Clock-BeB-7xuQ.js → Clock-DcOt9vBU.js} +1 -1
  13. package/dist/client/assets/{Code01-DnUALMy9.js → Code01-DIVdUEEy.js} +1 -1
  14. package/dist/client/assets/{Container-BGGgIzJh.js → Container-Bdkg5Azu.js} +1 -1
  15. package/dist/client/assets/{Copy01-BZzZvWHY.js → Copy01-3VuAEFqa.js} +1 -1
  16. package/dist/client/assets/{Dataflow03-BnILNUas.js → Dataflow03-DkdReOLA.js} +1 -1
  17. package/dist/client/assets/{DotsHorizontal-C1qTqyiq.js → DotsHorizontal-Cm6mqww1.js} +1 -1
  18. package/dist/client/assets/{DotsVertical-B-SoXTlv.js → DotsVertical-By9o8N3R.js} +1 -1
  19. package/dist/client/assets/{Download01-CW2ve7I5.js → Download01-CxQx0CfH.js} +1 -1
  20. package/dist/client/assets/{Edit01-CA_byL8x.js → Edit01-Dn0qA4Fa.js} +1 -1
  21. package/dist/client/assets/{Eye-DuHzxuzN.js → Eye-DKDxswcA.js} +1 -1
  22. package/dist/client/assets/{File02-HWzOQAS5.js → File02-DH9hOxy4.js} +1 -1
  23. package/dist/client/assets/{File06-6ostm09J.js → File06-VYjQ2z3_.js} +1 -1
  24. package/dist/client/assets/{FilterLines-n9w8nbRb.js → FilterLines-ynIeikqw.js} +1 -1
  25. package/dist/client/assets/{Globe01-C7OLr5gu.js → Globe01-DVxgQyR0.js} +1 -1
  26. package/dist/client/assets/{Globe02-DCQdCg-U.js → Globe02-b9LENZ6B.js} +1 -1
  27. package/dist/client/assets/{Grid01--gwdVXxp.js → Grid01-DUtda9uA.js} +1 -1
  28. package/dist/client/assets/{Hash02-B3ztCRZG.js → Hash02-Dw_08A1w.js} +1 -1
  29. package/dist/client/assets/{Home02-5xEMThw1.js → Home02-ClPXGhcI.js} +1 -1
  30. package/dist/client/assets/{Image01-CHvGzt2y.js → Image01-C4HZ4Zao.js} +1 -1
  31. package/dist/client/assets/{Inbox01-D__eEiRp.js → Inbox01-nMEKh3cP.js} +1 -1
  32. package/dist/client/assets/{InfoCircle-BaJSxaGK.js → InfoCircle-CpJ9JrRf.js} +1 -1
  33. package/dist/client/assets/{Key01-CAUAOxiV.js → Key01-ChuPC-p3.js} +1 -1
  34. package/dist/client/assets/{LinkExternal01-UC_M5qWQ.js → LinkExternal01-PWzAqpnw.js} +1 -1
  35. package/dist/client/assets/{List-BJooyaoM.js → List-CKLUZ_VW.js} +1 -1
  36. package/dist/client/assets/{Loading01-1Zu_WpPr.js → Loading01-CamudhzM.js} +1 -1
  37. package/dist/client/assets/{Lock01-DPYIJ_nA.js → Lock01-BeTJRb0k.js} +1 -1
  38. package/dist/client/assets/{Pin01-DJanT9uS.js → Pin01-Dz4KJ15m.js} +1 -1
  39. package/dist/client/assets/{Play-CahYnURS.js → Play-BGL_a2LJ.js} +1 -1
  40. package/dist/client/assets/{Plus-CRFHrfK2.js → Plus-SyEjnSE4.js} +1 -1
  41. package/dist/client/assets/{RefreshCcw01-DuNb9sh9.js → RefreshCcw01-CqYyfJ9G.js} +1 -1
  42. package/dist/client/assets/{RefreshCw01-CppBn3YV.js → RefreshCw01-BSYC0kIK.js} +1 -1
  43. package/dist/client/assets/{Rows03-CjT39fIX.js → Rows03-CVpC9rtk.js} +1 -1
  44. package/dist/client/assets/{Save01-_XMAksec.js → Save01-DO1hEhxi.js} +1 -1
  45. package/dist/client/assets/{SearchMd-CZA5t4_M.js → SearchMd-CcOZ3J1s.js} +1 -1
  46. package/dist/client/assets/{Settings01-CmfD9-kk.js → Settings01-CVcrQdKI.js} +1 -1
  47. package/dist/client/assets/{Share07-tPlC5hop.js → Share07-CiXbTaKB.js} +1 -1
  48. package/dist/client/assets/{Shield01-BTe6K6H4.js → Shield01-ySArJjMl.js} +1 -1
  49. package/dist/client/assets/{Terminal-JVvp8Qza.js → Terminal-_VxivQ1F.js} +1 -1
  50. package/dist/client/assets/{Tool01-BY8zBv5Q.js → Tool01-kjwZ_DfI.js} +1 -1
  51. package/dist/client/assets/{Trash01-uafi7Ilf.js → Trash01-CthEEWHa.js} +1 -1
  52. package/dist/client/assets/{Upload01-j9dbqfwl.js → Upload01-DGHq-B-f.js} +1 -1
  53. package/dist/client/assets/{Users03-DcEKYrkA.js → Users03-C6wtpaWA.js} +1 -1
  54. package/dist/client/assets/{XCircle-BUqdRo4A.js → XCircle-CGrbp9z_.js} +1 -1
  55. package/dist/client/assets/{XClose-BmynBvu4.js → XClose-Ce3sBI6M.js} +1 -1
  56. package/dist/client/assets/{agent-connections-preview-PbH9WU_0.js → agent-connections-preview-DKNowgRk.js} +1 -1
  57. package/dist/client/assets/{agent-detail-Cq0CB4eM.js → agent-detail-JmY0Uz4k.js} +1 -1
  58. package/dist/client/assets/{agents-6ayYcmP9.js → agents-CLA3FmYC.js} +1 -1
  59. package/dist/client/assets/{alert-dialog-BXLdEhYw.js → alert-dialog-EoSV6_8V.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-BmN6aGyF.js → auth-catchall-DKx2Jejf.js} +1 -1
  61. package/dist/client/assets/{avatar-Bc7s3LEL.js → avatar-L1PL1ayJ.js} +1 -1
  62. package/dist/client/assets/{badge-D4AHLMOm.js → badge-CCE1KaWc.js} +1 -1
  63. package/dist/client/assets/{binder-c0e82ZKj.js → binder-BC9Wv1Ge.js} +1 -1
  64. package/dist/client/assets/{breadcrumb-DM1tOdpW.js → breadcrumb-DNYA-_ij.js} +1 -1
  65. package/dist/client/assets/{button-DlMEAXru.js → button-B7HyH-Uh.js} +1 -1
  66. package/dist/client/assets/{card-BJlwqw9P.js → card-C-0_lNug.js} +1 -1
  67. package/dist/client/assets/{checkbox-2ZZDRGKg.js → checkbox-B2exkiKb.js} +1 -1
  68. package/dist/client/assets/{circle-alert-BU4aPU4k.js → circle-alert-t4DeJ--d.js} +1 -1
  69. package/dist/client/assets/{collection-detail-CcvsZ6SX.js → collection-detail-B_yaQHdx.js} +1 -1
  70. package/dist/client/assets/{collection-tab-D1U8qcC9.js → collection-tab-WrGrhfbg.js} +1 -1
  71. package/dist/client/assets/{collection-table-wrapper-CTR1SyIy.js → collection-table-wrapper-D0tfp6ae.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-DX49JXWl.js → collection-tabs-C97wMcMs.js} +1 -1
  73. package/dist/client/assets/{command-CZie2XvG.js → command-BICIAkBj.js} +1 -1
  74. package/dist/client/assets/{connect-BuwxUgJG.js → connect-DobII6wG.js} +1 -1
  75. package/dist/client/assets/{connection-card-CI7L8iKE.js → connection-card-DKiGEKqq.js} +1 -1
  76. package/dist/client/assets/{connection-detail-CRaZ-Ye2.js → connection-detail-Czc0gPl-.js} +1 -1
  77. package/dist/client/assets/{connections-B0wIwXTZ.js → connections-CEzrYp9r.js} +1 -1
  78. package/dist/client/assets/constants-CG86Kieu.js +1 -0
  79. package/dist/client/assets/{constants-4GzD41KM.js → constants-zTlTQ-s2.js} +1 -1
  80. package/dist/client/assets/{create-organization-dialog-CfW7SB8o.js → create-organization-dialog-D3inyChm.js} +1 -1
  81. package/dist/client/assets/{create-project-dialog-dfuHufiJ.js → create-project-dialog-DStWDJyz.js} +1 -1
  82. package/dist/client/assets/{dialog-Cwnz3LEA.js → dialog-DZwwYB-k.js} +1 -1
  83. package/dist/client/assets/{dropdown-menu-BJqdu9io.js → dropdown-menu-CjCphUtO.js} +1 -1
  84. package/dist/client/assets/{dynamic-plugin-layout-aRox8LyK.js → dynamic-plugin-layout-Do3oxBVH.js} +1 -1
  85. package/dist/client/assets/{empty-state-BkmlXyqb.js → empty-state-DkqG8Hqu.js} +1 -1
  86. package/dist/client/assets/{empty-state-BlBaHJ3u.js → empty-state-uNOuiWjX.js} +1 -1
  87. package/dist/client/assets/{env-vars-editor-qzHFuA5w.js → env-vars-editor-D67dFx2L.js} +1 -1
  88. package/dist/client/assets/{error-boundary-Dk3_bHxS.js → error-boundary-nhHtbH_I.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-Cl1h0kax.js → extract-connection-data-BQcu6O4w.js} +1 -1
  90. package/dist/client/assets/{file-browser-BpuuoaOY.js → file-browser--5zfCt9I.js} +2 -2
  91. package/dist/client/assets/{form-B3bK9lhs.js → form-C__Se-gc.js} +1 -1
  92. package/dist/client/assets/{grid-view-tbrO-yA3.js → grid-view-DricZUwu.js} +1 -1
  93. package/dist/client/assets/{home-DEEFTVc1.js → home-CScbql-9.js} +1 -1
  94. package/dist/client/assets/{index-DGrxQVii.js → index-BdZpvmLN.js} +1 -1
  95. package/dist/client/assets/{index-oUlshpJJ.js → index-Bi-e0xzQ.js} +3 -3
  96. package/dist/client/assets/{index-MzZr0KB3.js → index-BlyVvX4m.js} +1 -1
  97. package/dist/client/assets/{index-1CQrZ9Zl.js → index-CZLAI6LF.js} +1 -1
  98. package/dist/client/assets/{index-DjF4GflS.js → index-D1HsOBPx.js} +1 -1
  99. package/dist/client/assets/{index-2jF2yJ2o.js → index-DCz2-LM2.js} +1 -1
  100. package/dist/client/assets/{index-CeXKeP7Z.js → index-KAr3Peh7.js} +1 -1
  101. package/dist/client/assets/{index-BPtZHCt5.js → index-W9sjhIH3.js} +1 -1
  102. package/dist/client/assets/{infiniteQueryObserver-CzTbTGuU.js → infiniteQueryObserver-DNS00oad.js} +1 -1
  103. package/dist/client/assets/{input-BTxNeBOO.js → input-CV0IyHA1.js} +1 -1
  104. package/dist/client/assets/{integration-icon-CTPrN73-.js → integration-icon-DbBoUTfS.js} +1 -1
  105. package/dist/client/assets/{label-bLbRV7ZJ.js → label-DJlc-dCS.js} +1 -1
  106. package/dist/client/assets/{layout-D-svMqBO.js → layout-BzWZWsG1.js} +1 -1
  107. package/dist/client/assets/{localstorage-keys-z-WZ22Zi.js → localstorage-keys-kUhSSpkB.js} +1 -1
  108. package/dist/client/assets/{login-D0xu4-Fa.js → login-Bsyucgz_.js} +1 -1
  109. package/dist/client/assets/{markdown-CgNryeyO.js → markdown-CLjWTZQW.js} +1 -1
  110. package/dist/client/assets/{mcp-oauth-Dj71M6pS.js → mcp-oauth-Cv-Vv7lB.js} +1 -1
  111. package/dist/client/assets/{mcp-server-card-Bc5AS-wf.js → mcp-server-card-DsdRkuUr.js} +1 -1
  112. package/dist/client/assets/{mcp-server-detail-D02AsVR7.js → mcp-server-detail-D0UXP2Wf.js} +2 -2
  113. package/dist/client/assets/{members-EmtbbMjC.js → members-BetVYd73.js} +1 -1
  114. package/dist/client/assets/{monitoring-C-93CV4C.js → monitoring-DYNNygWn.js} +1 -1
  115. package/dist/client/assets/{monitoring-dashboard-edit-Bdp6e51N.js → monitoring-dashboard-edit-Dz9ATxct.js} +1 -1
  116. package/dist/client/assets/{monitoring-dashboard-view-Bx7z2_z0.js → monitoring-dashboard-view-CufWZm2V.js} +1 -1
  117. package/dist/client/assets/{oauth-callback-CkkG9d7v.js → oauth-callback-DcETJDHX.js} +1 -1
  118. package/dist/client/assets/{page-ITQU-Zp8.js → page-BAolWY3l.js} +1 -1
  119. package/dist/client/assets/{page-BGugjR0I.js → page-CwE-GYdz.js} +1 -1
  120. package/dist/client/assets/{plugin-empty-state-AgNFTQ0u.js → plugin-empty-state-C3ceUkNb.js} +1 -1
  121. package/dist/client/assets/{plugin-empty-state-DlghdeMy.js → plugin-empty-state-LXKnqiIZ.js} +1 -1
  122. package/dist/client/assets/{plugin-header-DxI4kgNA.js → plugin-header-Bs_1_ZLf.js} +1 -1
  123. package/dist/client/assets/{plugin-header-BiKI-0GN.js → plugin-header-DPngncJX.js} +1 -1
  124. package/dist/client/assets/{popover-DK0-mkfJ.js → popover-Doa2WmZx.js} +1 -1
  125. package/dist/client/assets/{project-layout-ClSoqo8C.js → project-layout-Chzqn7a8.js} +1 -1
  126. package/dist/client/assets/{projects-list-78EdWnMz.js → projects-list-DbbdsKoZ.js} +1 -1
  127. package/dist/client/assets/{ranking-layout-BipS-5d4.js → ranking-layout-B9w-IUcw.js} +1 -1
  128. package/dist/client/assets/{readme-viewer-CYVu4zA3.js → readme-viewer-B1hfMMDA.js} +1 -1
  129. package/dist/client/assets/{registry-layout-DuUFYDsK.js → registry-layout-pmNuLEj-.js} +1 -1
  130. package/dist/client/assets/{registry-utils-BJco7Nso.js → registry-utils-DUuNgxkO.js} +1 -1
  131. package/dist/client/assets/{reports-layout-DWL4B4XL.js → reports-layout-C_VEjY7i.js} +1 -1
  132. package/dist/client/assets/{reset-password-C7TFy7aQ.js → reset-password-DJ9buaXu.js} +1 -1
  133. package/dist/client/assets/{resizable-zYSMb8PO.js → resizable-DF5zct6_.js} +1 -1
  134. package/dist/client/assets/{save-actions-BdnWXMVf.js → save-actions-CQgOAn_J.js} +1 -1
  135. package/dist/client/assets/{scroll-area-30X2y975.js → scroll-area-4enWoJt2.js} +1 -1
  136. package/dist/client/assets/{select-Duopl7P2.js → select-DWD0v1iQ.js} +1 -1
  137. package/dist/client/assets/{shell-layout-CI23YHUg.js → shell-layout-QL6x_YTa.js} +1 -1
  138. package/dist/client/assets/{skeleton-CmCa76Pe.js → skeleton-Bl8OldYy.js} +1 -1
  139. package/dist/client/assets/{spinner--6L1PAKk.js → spinner-BLmAgQjq.js} +1 -1
  140. package/dist/client/assets/{store-invite-DNBT5DzD.js → store-invite-hWU0qPjn.js} +1 -1
  141. package/dist/client/assets/{switch-CzMTfJyd.js → switch-Bbs0hJSB.js} +1 -1
  142. package/dist/client/assets/{table-DPbr8gQl.js → table-qdWaG6rv.js} +1 -1
  143. package/dist/client/assets/{tasks-CqaWmm56.js → tasks-43KwpcUr.js} +1 -1
  144. package/dist/client/assets/{textarea-BNPURYr9.js → textarea-BM9yIjbb.js} +1 -1
  145. package/dist/client/assets/{time-range-picker-C-sEn-dP.js → time-range-picker-BJw7emBI.js} +1 -1
  146. package/dist/client/assets/{toggle-group-bVqu9tww.js → toggle-group-CBPaAms8.js} +1 -1
  147. package/dist/client/assets/{tools-list-D2XTdfAR.js → tools-list-BZbKPMXf.js} +1 -1
  148. package/dist/client/assets/{tooltip-BnwJ5PQp.js → tooltip-BRqbDzB0.js} +1 -1
  149. package/dist/client/assets/{topbar-portal-CrFEl7XT.js → topbar-portal-DFVDwZxt.js} +1 -1
  150. package/dist/client/assets/{typewriter-title-Dh7JaY-s.js → typewriter-title-DIjNHGtY.js} +1 -1
  151. package/dist/client/assets/{use-binding-CSl5A5cE.js → use-binding-BmXtAx4J.js} +1 -1
  152. package/dist/client/assets/{use-connection-CJPryUMd.js → use-connection-CClYhvEQ.js} +1 -1
  153. package/dist/client/assets/{use-copy-DELXo_w6.js → use-copy-CTf1Ucv_.js} +1 -1
  154. package/dist/client/assets/{use-create-virtual-mcp-CEbxqW61.js → use-create-virtual-mcp-K3AM9Z5N.js} +1 -1
  155. package/dist/client/assets/{use-deco-chat-open-Bj4jxMD7.js → use-deco-chat-open-BMBO3145.js} +6 -6
  156. package/dist/client/assets/{use-install-from-registry-Vj4wJ4IH.js → use-install-from-registry-BAWt0mcG.js} +1 -1
  157. package/dist/client/assets/{use-list-state-cJ107QPf.js → use-list-state-CCBTDGCJ.js} +1 -1
  158. package/dist/client/assets/{use-llm-us82LJMh.js → use-llm-mBHjR_7D.js} +1 -1
  159. package/dist/client/assets/{use-mcp-prompts-Sqkswu5s.js → use-mcp-prompts-CBDcBX2M.js} +1 -1
  160. package/dist/client/assets/{use-mcp-tools-Dj4ni5D7.js → use-mcp-tools-BavCvJJV.js} +1 -1
  161. package/dist/client/assets/{use-mobile-EmqlWdQN.js → use-mobile-DrHpoELT.js} +1 -1
  162. package/dist/client/assets/{use-organization-settings-CMrztk0j.js → use-organization-settings-CKyDGiTk.js} +1 -1
  163. package/dist/client/assets/{use-project-BYeZMfFI.js → use-project-96IUPhFg.js} +1 -1
  164. package/dist/client/assets/{use-settings-modal-tvp-XYtD.js → use-settings-modal-D7JjTvmt.js} +1 -1
  165. package/dist/client/assets/{use-view-mode-Dg_d9_Oy.js → use-view-mode-BshQz6D5.js} +1 -1
  166. package/dist/client/assets/{use-virtual-mcp-BzAB1Jwk.js → use-virtual-mcp-B-Bh55kx.js} +1 -1
  167. package/dist/client/assets/useInfiniteQuery-DkHP58UU.js +1 -0
  168. package/dist/client/assets/{useMutation-kpLmB8S8.js → useMutation-aO9r1_oG.js} +1 -1
  169. package/dist/client/assets/useQuery-BBSKX1go.js +1 -0
  170. package/dist/client/assets/useSuspenseInfiniteQuery-CHxgAZWb.js +1 -0
  171. package/dist/client/assets/{workflow-DbuBBxB5.js → workflow-Bo8vs7Cf.js} +1 -1
  172. package/dist/client/index.html +1 -1
  173. package/dist/server/cli.js +224 -224
  174. package/dist/server/migrate.js +186 -186
  175. package/dist/server/server.js +198 -198
  176. package/package.json +1 -1
  177. package/dist/client/assets/constants-PL5hL4qd.js +0 -1
  178. package/dist/client/assets/useInfiniteQuery-DS7Rp5Du.js +0 -1
  179. package/dist/client/assets/useQuery-Do4lYH9e.js +0 -1
  180. package/dist/client/assets/useSuspenseInfiniteQuery-8nf2pI1w.js +0 -1
@@ -1 +1 @@
1
- import{r as z,c as T,j as t,u as xe,V as Ye,s as qe,t as Ee,b as Ke,e as Ze,O as Be,by as Qe,l as Xe,k as et,aE as tt,n as st}from"./index-oUlshpJJ.js";import{T as be,a as lt,b as Ne,c as ot,i as nt,d as it,e as rt,u as at,C as ct,f as dt}from"./use-deco-chat-open-Bj4jxMD7.js";import{C as mt,E as ut}from"./empty-state-BlBaHJ3u.js";import{E as pe}from"./error-boundary-Dk3_bHxS.js";import{I as he}from"./integration-icon-CTPrN73-.js";import{I as ft,R as pt,a as xt,P as ht}from"./index-MzZr0KB3.js";import{B as Ie}from"./badge-D4AHLMOm.js";import{B as Q,c as me}from"./button-DlMEAXru.js";import{I as Re}from"./input-BTxNeBOO.js";import{S as gt}from"./switch-CzMTfJyd.js";import{T as jt}from"./textarea-BNPURYr9.js";import{a as ae,c as ve,T as ce,b as de}from"./tooltip-BnwJ5PQp.js";import{h as bt,f as Nt}from"./use-connection-CJPryUMd.js";import{u as vt,a as yt}from"./use-virtual-mcp-BzAB1Jwk.js";import{i as Me}from"./ChevronRight-IL2oOJI2.js";import{n as Ct}from"./select-Duopl7P2.js";import{i as Oe}from"./File02-HWzOQAS5.js";import{i as Fe}from"./Loading01-1Zu_WpPr.js";import{i as _t}from"./Play-CahYnURS.js";import{s as ze}from"./Plus-CRFHrfK2.js";import{i as St}from"./Share07-tPlC5hop.js";import{a as Ae}from"./Tool01-BY8zBv5Q.js";import{t as Tt}from"./Users03-DcEKYrkA.js";import{B as kt,a as wt,b as Pe,d as Et,e as It,c as Ot}from"./breadcrumb-DM1tOdpW.js";import{a as At,V as Dt}from"./layout-D-svMqBO.js";import{S as $t}from"./save-actions-BdnWXMVf.js";import{T as Lt}from"./tools-list-D2XTdfAR.js";import{C as De}from"./checkbox-2ZZDRGKg.js";import{e as Rt,a as Ge,D as Ue,b as zt,c as Pt}from"./dialog-Cwnz3LEA.js";import{u as $e}from"./constants-4GzD41KM.js";import{c as Vt}from"./use-mcp-tools-Dj4ni5D7.js";import{c as Bt,u as Mt}from"./use-mcp-prompts-Sqkswu5s.js";import{i as Ft}from"./AlertTriangle-VgUX_bsB.js";import{s as He}from"./slugify-CEUa2lfQ.js";import{i as We}from"./Check-B14Bp2E0.js";import{i as Gt}from"./Code01-DnUALMy9.js";import{a as Ut}from"./Copy01-BZzZvWHY.js";import{i as ye}from"./InfoCircle-BaJSxaGK.js";import{A as Ht}from"./agent-connections-preview-PbH9WU_0.js";import"./use-llm-us82LJMh.js";import"./use-binding-CSl5A5cE.js";import"./binder-c0e82ZKj.js";import"./useQuery-Do4lYH9e.js";import"./localstorage-keys-z-WZ22Zi.js";import"./useMutation-kpLmB8S8.js";import"./skeleton-CmCa76Pe.js";import"./popover-DK0-mkfJ.js";import"./ChevronDown-DmZAA_RH.js";import"./File06-6ostm09J.js";import"./Grid01--gwdVXxp.js";import"./Image01-CHvGzt2y.js";import"./RefreshCcw01-DuNb9sh9.js";import"./SearchMd-CZA5t4_M.js";import"./Settings01-CmfD9-kk.js";import"./useSuspenseInfiniteQuery-8nf2pI1w.js";import"./infiniteQueryObserver-CzTbTGuU.js";import"./Container-BGGgIzJh.js";import"./Pin01-DJanT9uS.js";import"./use-organization-settings-CMrztk0j.js";import"./index-CeXKeP7Z.js";import"./use-mobile-EmqlWdQN.js";import"./Save01-_XMAksec.js";import"./collection-table-wrapper-CTR1SyIy.js";import"./dropdown-menu-BJqdu9io.js";import"./ArrowUp-BjfCYJa6.js";import"./List-BJooyaoM.js";import"./table-DPbr8gQl.js";import"./card-BJlwqw9P.js";import"./Eye-DuHzxuzN.js";import"./Globe02-DCQdCg-U.js";import"./RefreshCw01-CppBn3YV.js";const Je=({size:o=24,color:e="currentColor",...s})=>z.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},z.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Je.displayName="Circle";const ge=({size:o=24,color:e="currentColor",...s})=>z.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},z.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));ge.displayName="CubeOutline";function Ce(o){return o===null?"all":o?.length??0}function Wt(o,e){const s=o[e];if(!s)return"";const a=[];return s.tools===null?a.push("all tools"):s.tools&&s.tools.length>0&&a.push(`${s.tools.length} tools`),s.resources===null?a.push("all resources"):s.resources&&s.resources.length>0&&a.push(`${s.resources.length} resources`),s.prompts===null?a.push("all prompts"):s.prompts&&s.prompts.length>0&&a.push(`${s.prompts.length} prompts`),a.join(", ")}function Jt(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const Yt={tools:null,resources:null,prompts:null};function _e(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(Fe,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function Se(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Ft,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function qt(o){const e=T.c(23),{item:s,isSelected:a,onToggle:l,disabled:n}=o,f=n?"cursor-not-allowed opacity-50":"cursor-pointer",i=a?"bg-accent/25":"hover:bg-muted/50";let r;e[0]!==f||e[1]!==i?(r=me("flex items-start gap-3 p-4 rounded-lg transition-colors",f,i),e[0]=f,e[1]=i,e[2]=r):r=e[2];let d;e[3]!==s.name?(d=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=d):d=e[4];let p;e[5]!==s.tags?(p=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=p):p=e[6];let c;e[7]!==d||e[8]!==p?(c=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,p]}),e[7]=d,e[8]=p,e[9]=c):c=e[9];let h;e[10]!==s.description?(h=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=h):h=e[11];let x;e[12]!==c||e[13]!==h?(x=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[c,h]}),e[12]=c,e[13]=h,e[14]=x):x=e[14];let m;e[15]!==n||e[16]!==a||e[17]!==l?(m=t.jsx(De,{checked:a,onCheckedChange:l,disabled:n,className:"mt-0.5"}),e[15]=n,e[16]=a,e[17]=l,e[18]=m):m=e[18];let u;return e[19]!==r||e[20]!==x||e[21]!==m?(u=t.jsxs("label",{className:r,children:[x,m]}),e[19]=r,e[20]=x,e[21]=m,e[22]=u):u=e[22],u}function Le(o){const e=T.c(32),{items:s,selections:a,onToggle:l,onToggleAll:n,emptyMessage:f,disabled:i}=o;let r,d,p,c,h;if(e[0]!==i||e[1]!==f||e[2]!==s||e[3]!==l||e[4]!==n||e[5]!==a){h=Symbol.for("react.early_return_sentinel");e:{const u=s.map(Kt);if(s.length===0){let C;e[11]!==f?(C=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:f})}),e[11]=f,e[12]=C):C=e[12],h=C;break e}p="flex flex-col h-full";const v=i?"cursor-not-allowed opacity-50":"cursor-pointer";let b;e[13]!==v?(b=me("flex items-start gap-3 p-4",v),e[13]=v,e[14]=b):b=e[14];let N;e[15]!==s.length?(N=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=N):N=e[16];const g=a===null;let y;e[17]!==i||e[18]!==n||e[19]!==g?(y=t.jsx(De,{checked:g,onCheckedChange:n,disabled:i,className:"mt-0.5"}),e[17]=i,e[18]=n,e[19]=g,e[20]=y):y=e[20],e[21]!==y||e[22]!==b||e[23]!==N?(c=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:b,children:[N,y]})}),e[21]=y,e[22]=b,e[23]=N,e[24]=c):c=e[24],r="flex-1 overflow-auto px-4 py-3 space-y-1",d=s.map(C=>t.jsx(qt,{item:C,isSelected:a===null||a?.includes(C.id),onToggle:()=>l(C.id,u),disabled:i},C.id))}e[0]=i,e[1]=f,e[2]=s,e[3]=l,e[4]=n,e[5]=a,e[6]=r,e[7]=d,e[8]=p,e[9]=c,e[10]=h}else r=e[6],d=e[7],p=e[8],c=e[9],h=e[10];if(h!==Symbol.for("react.early_return_sentinel"))return h;let x;e[25]!==r||e[26]!==d?(x=t.jsx("div",{className:r,children:d}),e[25]=r,e[26]=d,e[27]=x):x=e[27];let m;return e[28]!==p||e[29]!==c||e[30]!==x?(m=t.jsxs("div",{className:p,children:[c,x]}),e[28]=p,e[29]=c,e[30]=x,e[31]=m):m=e[31],m}function Kt(o){return o.id}function Zt(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Vt(p);let h;e[5]!==c.tools?(h=c.tools.map(Qt),e[5]=c.tools,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No tools available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function Qt(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(Lt,{annotations:o.annotations})}}function Xt(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Bt(p);let h;e[5]!==c.resources?(h=c.resources.map(es),e[5]=c.resources,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No resources available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function es(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function ts(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Mt(p);let h;e[5]!==c.prompts?(h=c.prompts.map(ss),e[5]=c.prompts,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No prompts available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function ss(o){return{id:o.name,name:o.name,description:o.description}}function ls(o){const e=T.c(24),{connection:s,isSelected:a,hasSelections:l,summary:n,onClick:f,onToggleAll:i,disabled:r}=o,d=r?"cursor-not-allowed opacity-50":"cursor-pointer",p=a?"bg-accent":"hover:bg-muted/50";let c;e[0]!==d||e[1]!==p?(c=me("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",d,p),e[0]=d,e[1]=p,e[2]=c):c=e[2];const h=r?void 0:f;let x;e[3]!==s.icon||e[4]!==s.title?(x=t.jsx(he,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=x):x=e[5];let m;e[6]!==s.title?(m=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=m):m=e[7];let u;e[8]!==l||e[9]!==n?(u=l&&n&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),e[8]=l,e[9]=n,e[10]=u):u=e[10];let v;e[11]!==m||e[12]!==u?(v=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[m,u]}),e[11]=m,e[12]=u,e[13]=v):v=e[13];let b;e[14]!==r||e[15]!==l||e[16]!==i?(b=t.jsx(De,{checked:l,onCheckedChange:i,onClick:os,disabled:r,className:"shrink-0"}),e[14]=r,e[15]=l,e[16]=i,e[17]=b):b=e[17];let N;return e[18]!==c||e[19]!==h||e[20]!==x||e[21]!==v||e[22]!==b?(N=t.jsxs("div",{className:c,onClick:h,children:[x,v,b]}),e[18]=c,e[19]=h,e[20]=x,e[21]=v,e[22]=b,e[23]=N):N=e[23],N}function os(o){return o.stopPropagation()}function ns(o){const e=T.c(22),{allConnections:s,searchTerm:a,selectedId:l,hasSelections:n,getSelectionSummary:f,onConnectionClick:i,onToggleAll:r,disabled:d}=o;let p;e[0]!==s||e[1]!==a?(p=a?s.filter(m=>m.title.toLowerCase().includes(a.toLowerCase())||m.description?.toLowerCase().includes(a.toLowerCase())):s,e[0]=s,e[1]=a,e[2]=p):p=e[2];const c=p;if(c.length===0){const m=a?"No connections found":"No connections available";let u;return e[3]!==m?(u=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:m}),e[3]=m,e[4]=u):u=e[4],u}let h;if(e[5]!==d||e[6]!==c||e[7]!==f||e[8]!==n||e[9]!==i||e[10]!==r||e[11]!==l){let m;e[13]!==d||e[14]!==f||e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==l?(m=u=>t.jsx(ls,{connection:u,isSelected:l===u.id,hasSelections:n(u.id),summary:f(u.id),onClick:()=>i(u.id),onToggleAll:()=>r(u.id),disabled:d},u.id),e[13]=d,e[14]=f,e[15]=n,e[16]=i,e[17]=r,e[18]=l,e[19]=m):m=e[19],h=c.map(m),e[5]=d,e[6]=c,e[7]=f,e[8]=n,e[9]=i,e[10]=r,e[11]=l,e[12]=h}else h=e[12];let x;return e[20]!==h?(x=t.jsx("div",{className:"flex flex-col gap-0.5",children:h}),e[20]=h,e[21]=x):x=e[21],x}function is(o){const e=T.c(75),{currentConnection:s,activeTab:a,selectedId:l,formData:n,toggleTool:f,toggleResource:i,togglePrompt:r,toggleAllTools:d,toggleAllResources:p,toggleAllPrompts:c,onTabChange:h}=o;let x;e[0]!==s.icon||e[1]!==s.title?(x=t.jsx(he,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=x):x=e[2];let m;e[3]!==s.title?(m=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=m):m=e[4];let u;e[5]!==s.description?(u=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=u):u=e[6];let v;e[7]!==m||e[8]!==u?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[m,u]}),e[7]=m,e[8]=u,e[9]=v):v=e[9];let b;e[10]!==x||e[11]!==v?(b=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[x,v]})}),e[10]=x,e[11]=v,e[12]=b):b=e[12];let N;e[13]!==h?(N=M=>h(M),e[13]=h,e[14]=N):N=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsxs(be,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Ae,{size:16}),"Tools"]}),e[15]=g):g=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(be,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(ge,{size:16}),"Resources"]}),e[16]=y):y=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(lt,{variant:"underline",className:"shrink-0 px-6",children:[g,y,t.jsxs(be,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(Oe,{size:16}),"Prompts"]})]}),e[17]=C):C=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=Se("Tools not supported by this server"),e[18]=P):P=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(_e,{}),e[19]=S):S=e[19];let O;e[20]!==n||e[21]!==l?(O=n[l]?n[l].tools:[],e[20]=n,e[21]=l,e[22]=O):O=e[22];let _;e[23]!==l||e[24]!==f?(_=(M,K)=>f(l,M,K),e[23]=l,e[24]=f,e[25]=_):_=e[25];let k;e[26]!==l||e[27]!==d?(k=()=>d(l),e[26]=l,e[27]=d,e[28]=k):k=e[28];let E;e[29]!==l||e[30]!==O||e[31]!==_||e[32]!==k?(E=t.jsx(Ne,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:P,children:t.jsx(z.Suspense,{fallback:S,children:t.jsx(Zt,{connectionId:l,selections:O,onToggle:_,onToggleAll:k})})})}),e[29]=l,e[30]=O,e[31]=_,e[32]=k,e[33]=E):E=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=Se("Resources not supported by this server"),e[34]=A):A=e[34];let L;e[35]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(_e,{}),e[35]=L):L=e[35];let w;e[36]!==n||e[37]!==l?(w=n[l]?n[l].resources:[],e[36]=n,e[37]=l,e[38]=w):w=e[38];let I;e[39]!==l||e[40]!==i?(I=(M,K)=>i(l,M,K),e[39]=l,e[40]=i,e[41]=I):I=e[41];let D;e[42]!==l||e[43]!==p?(D=()=>p(l),e[42]=l,e[43]=p,e[44]=D):D=e[44];let R;e[45]!==l||e[46]!==w||e[47]!==I||e[48]!==D?(R=t.jsx(Ne,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:A,children:t.jsx(z.Suspense,{fallback:L,children:t.jsx(Xt,{connectionId:l,selections:w,onToggle:I,onToggleAll:D})})})}),e[45]=l,e[46]=w,e[47]=I,e[48]=D,e[49]=R):R=e[49];let Y;e[50]===Symbol.for("react.memo_cache_sentinel")?(Y=Se("Prompts not supported by this server"),e[50]=Y):Y=e[50];let q;e[51]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(_e,{}),e[51]=q):q=e[51];let F;e[52]!==n||e[53]!==l?(F=n[l]?n[l].prompts:[],e[52]=n,e[53]=l,e[54]=F):F=e[54];let W;e[55]!==l||e[56]!==r?(W=(M,K)=>r(l,M,K),e[55]=l,e[56]=r,e[57]=W):W=e[57];let G;e[58]!==l||e[59]!==c?(G=()=>c(l),e[58]=l,e[59]=c,e[60]=G):G=e[60];let J;e[61]!==l||e[62]!==F||e[63]!==W||e[64]!==G?(J=t.jsx(Ne,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:Y,children:t.jsx(z.Suspense,{fallback:q,children:t.jsx(ts,{connectionId:l,selections:F,onToggle:W,onToggleAll:G})})})}),e[61]=l,e[62]=F,e[63]=W,e[64]=G,e[65]=J):J=e[65];let U;e[66]!==a||e[67]!==E||e[68]!==R||e[69]!==J||e[70]!==N?(U=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(ot,{value:a,onValueChange:N,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[C,E,R,J]})}),e[66]=a,e[67]=E,e[68]=R,e[69]=J,e[70]=N,e[71]=U):U=e[71];let H;return e[72]!==U||e[73]!==b?(H=t.jsxs(t.Fragment,{children:[b,U]}),e[72]=U,e[73]=b,e[74]=H):H=e[74],H}function rs(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function Te(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function as(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const Ve=(o,e)=>o.find(s=>s.id===e)??o[0];function cs(o){const e=T.c(79),{open:s,onOpenChange:a,selectedId:l,form:n,connections:f}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const r=bt(i);let d;e[1]!==r||e[2]!==l?(d=Ve(r,l)?.id??null,e[1]=r,e[2]=l,e[3]=d):d=e[3];let p;e[4]!==d?(p={activeTab:"tools",searchTerm:"",selectedId:d},e[4]=d,e[5]=p):p=e[5];const[c,h]=z.useReducer(as,p);let x;e[6]!==f?(x=f??[],e[6]=f,e[7]=x):x=e[7];let m;e[8]!==x?(m=rs(x),e[8]=x,e[9]=m):m=e[9];const u=m;let v;e[10]!==r||e[11]!==c.selectedId?(v=Ve(r,c.selectedId),e[10]=r,e[11]=c.selectedId,e[12]=v):v=e[12];const b=v;let N;e[13]!==u?(N=j=>Jt(u,j),e[13]=u,e[14]=N):N=e[14];const g=N;let y;e[15]!==u?(y=j=>Wt(u,j),e[15]=u,e[16]=y):y=e[16];const C=y;let P;e[17]!==n||e[18]!==u?(P=(j,$,V,Z)=>{const ie=u[j]?.[$];let B;ie===null?B=Z.filter(je=>je!==V):ie?.includes(V)?B=ie.filter(je=>je!==V):(B=[...ie??[],V],B.length===Z.length&&(B=null));const re={...u};re[j]?re[j]={...re[j]}:re[j]={tools:null,resources:null,prompts:null},re[j][$]=B,n.setValue("connections",Te(re),{shouldDirty:!0,shouldTouch:!0})},e[17]=n,e[18]=u,e[19]=P):P=e[19];const S=P;let O;e[20]!==n||e[21]!==u?(O=(j,$)=>{const ie=u[j]?.[$]===null?[]:null,B={...u};B[j]?B[j]={...B[j]}:B[j]={tools:null,resources:null,prompts:null},B[j][$]=ie,n.setValue("connections",Te(B),{shouldDirty:!0,shouldTouch:!0})},e[20]=n,e[21]=u,e[22]=O):O=e[22];const _=O;let k;e[23]!==S?(k=(j,$,V)=>S(j,"tools",$,V),e[23]=S,e[24]=k):k=e[24];const E=k;let A;e[25]!==S?(A=(j,$,V)=>S(j,"resources",$,V),e[25]=S,e[26]=A):A=e[26];const L=A;let w;e[27]!==S?(w=(j,$,V)=>S(j,"prompts",$,V),e[27]=S,e[28]=w):w=e[28];const I=w;let D;e[29]!==_?(D=j=>_(j,"tools"),e[29]=_,e[30]=D):D=e[30];const R=D;let Y;e[31]!==_?(Y=j=>_(j,"resources"),e[31]=_,e[32]=Y):Y=e[32];const q=Y;let F;e[33]!==_?(F=j=>_(j,"prompts"),e[33]=_,e[34]=F):F=e[34];const W=F;let G;e[35]!==n||e[36]!==u?(G=j=>{const $=u[j],V=$&&$.tools===null&&$.resources===null&&$.prompts===null,Z={...u};V?delete Z[j]:Z[j]=Yt,n.setValue("connections",Te(Z),{shouldDirty:!0,shouldTouch:!0})},e[35]=n,e[36]=u,e[37]=G):G=e[37];const J=G;let U;e[38]!==r||e[39]!==a||e[40]!==l?(U=j=>{j&&h({type:"RESET",payload:{selectedId:l,firstConnectionId:r[0]?.id??null}}),a(j)},e[38]=r,e[39]=a,e[40]=l,e[41]=U):U=e[41];const H=U;let M;e[42]===Symbol.for("react.memo_cache_sentinel")?(M=j=>{h({type:"SELECT_CONNECTION",payload:j})},e[42]=M):M=e[42];const K=M;let ue;e[43]===Symbol.for("react.memo_cache_sentinel")?(ue=j=>h({type:"SET_SEARCH_TERM",payload:j}),e[43]=ue):ue=e[43];let X;e[44]!==c.searchTerm?(X=t.jsx(mt,{value:c.searchTerm,onChange:ue,placeholder:"Search connections..."}),e[44]=c.searchTerm,e[45]=X):X=e[45];let ee;e[46]!==r||e[47]!==c.searchTerm||e[48]!==c.selectedId||e[49]!==C||e[50]!==g||e[51]!==J?(ee=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(ns,{allConnections:r,searchTerm:c.searchTerm,selectedId:c.selectedId,hasSelections:g,getSelectionSummary:C,onConnectionClick:K,onToggleAll:J})}),e[46]=r,e[47]=c.searchTerm,e[48]=c.selectedId,e[49]=C,e[50]=g,e[51]=J,e[52]=ee):ee=e[52];let te;e[53]!==X||e[54]!==ee?(te=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[X,ee]}),e[53]=X,e[54]=ee,e[55]=te):te=e[55];let se;e[56]!==b||e[57]!==c.activeTab||e[58]!==c.selectedId||e[59]!==u||e[60]!==W||e[61]!==q||e[62]!==R||e[63]!==I||e[64]!==L||e[65]!==E?(se=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:b&&c.selectedId?t.jsx(is,{currentConnection:b,activeTab:c.activeTab,selectedId:c.selectedId,formData:u,toggleTool:E,toggleResource:L,togglePrompt:I,toggleAllTools:R,toggleAllResources:q,toggleAllPrompts:W,onTabChange:j=>h({type:"SET_ACTIVE_TAB",payload:j})},c.selectedId):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[56]=b,e[57]=c.activeTab,e[58]=c.selectedId,e[59]=u,e[60]=W,e[61]=q,e[62]=R,e[63]=I,e[64]=L,e[65]=E,e[66]=se):se=e[66];let le;e[67]!==te||e[68]!==se?(le=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[te,se]}),e[67]=te,e[68]=se,e[69]=le):le=e[69];let oe;e[70]!==H?(oe=t.jsx(Rt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(Q,{variant:"outline",onClick:()=>H(!1),children:"Done"})}),e[70]=H,e[71]=oe):oe=e[71];let ne;e[72]!==le||e[73]!==oe?(ne=t.jsxs(Ge,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[le,oe]}),e[72]=le,e[73]=oe,e[74]=ne):ne=e[74];let fe;return e[75]!==H||e[76]!==s||e[77]!==ne?(fe=t.jsx(Ue,{open:s,onOpenChange:H,children:ne}),e[75]=H,e[76]=s,e[77]=ne,e[78]=fe):fe=e[78],fe}const ds=Ye.pick({title:!0,description:!0,status:!0,metadata:!0,connections:!0}).extend({title:qe().min(1,"Name is required").max(255)});function ms(o){const e=T.c(8);let s,a;e[0]!==o?({className:s,...a}=o,e[0]=o,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=me("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let n;return e[5]!==a||e[6]!==l?(n=t.jsx(pt,{"data-slot":"radio-group",className:l,...a}),e[5]=a,e[6]=l,e[7]=n):n=e[7],n}function ke(o){const e=T.c(9);let s,a;e[0]!==o?({className:s,...a}=o,e[0]=o,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=me("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(xt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Je,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=n):n=e[5];let f;return e[6]!==a||e[7]!==l?(f=t.jsx(ft,{"data-slot":"radio-group-item",className:l,...a,children:n}),e[6]=a,e[7]=l,e[8]=f):f=e[8],f}function us(o){const s=new TextEncoder().encode(o),a=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(a)}function fs(o){const e=T.c(10),{url:s}=o,[a,l]=z.useState(!1);let n;e[0]!==s?(n=async()=>{await navigator.clipboard.writeText(s),l(!0),Ee.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=n):n=e[1];const f=n;let i;e[2]!==a?(i=a?t.jsx(We,{size:20,className:"text-green-600"}):t.jsx(Ut,{size:20}),e[2]=a,e[3]=i):i=e[3];const r=a?"Copied!":"Copy URL";let d;e[4]!==r?(d=t.jsx("span",{className:"text-xs font-medium",children:r}),e[4]=r,e[5]=d):d=e[5];let p;return e[6]!==f||e[7]!==i||e[8]!==d?(p=t.jsxs(Q,{type:"button",variant:"outline",onClick:f,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[i,d]}),e[6]=f,e[7]=i,e[8]=d,e[9]=p):p=e[9],p}function ps(o){const e=T.c(7),{url:s,serverName:a}=o;let l;e[0]!==a||e[1]!==s?(l=()=>{const d=He(a),c=us(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),h=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(d)}&config=${encodeURIComponent(c)}`;window.open(h,"_blank"),Ee.success("Opening Cursor...")},e[0]=a,e[1]=s,e[2]=l):l=e[2];const n=l;let f,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),i=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=f,e[4]=i):(f=e[3],i=e[4]);let r;return e[5]!==n?(r=t.jsxs(Q,{type:"button",variant:"outline",onClick:n,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[f,i]}),e[5]=n,e[6]=r):r=e[6],r}function xs(o){const e=T.c(11),{url:s,serverName:a}=o,[l,n]=z.useState(!1);let f;e[0]!==a||e[1]!==s?(f=async()=>{const h=He(a),m=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),u=`claude mcp add-json "${h}" '${m.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(u),n(!0),Ee.success("Claude Code command copied to clipboard"),setTimeout(()=>n(!1),2e3)},e[0]=a,e[1]=s,e[2]=f):f=e[2];const i=f;let r;e[3]!==l?(r=l?t.jsx(We,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=r):r=e[4];const d=l?"Copied!":"Install on Claude";let p;e[5]!==d?(p=t.jsx("span",{className:"text-xs font-medium",children:d}),e[5]=d,e[6]=p):p=e[6];let c;return e[7]!==i||e[8]!==r||e[9]!==p?(c=t.jsxs(Q,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[r,p]}),e[7]=i,e[8]=r,e[9]=p,e[10]=c):c=e[10],c}function hs(o){const e=T.c(40),{open:s,onOpenChange:a,virtualMcp:l}=o,[n,f]=z.useState("code_execution");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=R=>{(R==="passthrough"||R==="smart_tool_selection"||R==="code_execution")&&f(R)},e[0]=i):i=e[0];const r=i;let d;e[1]!==n||e[2]!==l.id?(d=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),d.searchParams.set("mode",n),e[1]=n,e[2]=l.id,e[3]=d):d=e[3];let p;e[4]!==l.id||e[5]!==l.title?(p=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=p):p=e[6];const c=p;let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(zt,{children:t.jsx(Pt,{children:"Share Agent"})}),e[7]=h):h=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=x):x=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(nt,{className:"size-5 text-muted-foreground"})}),e[9]=m):m=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=u):u=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[11]=v):v=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[m,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[u,t.jsx(ve,{children:t.jsxs(ce,{children:[v,t.jsx(de,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(ke,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=b):b=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(it,{className:"size-5 text-muted-foreground"})}),e[13]=N):N=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=g):g=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[15]=y):y=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[N,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[g,t.jsx(ve,{children:t.jsxs(ce,{children:[y,t.jsx(de,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(ke,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=C):C=e[16];let P;e[17]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Gt,{className:"size-5 text-muted-foreground"})}),e[17]=P):P=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=S):S=e[18];let O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[19]=O):O=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[P,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[S,t.jsx(ve,{children:t.jsxs(ce,{children:[O,t.jsx(de,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(ke,{id:"mode-code",value:"code_execution"}),t.jsx(Ie,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=_):_=e[20];let k;e[21]!==n?(k=t.jsxs("div",{className:"flex flex-col gap-3",children:[x,t.jsxs(ms,{value:n,onValueChange:r,className:"flex flex-col gap-4.5",children:[b,C,_]})]}),e[21]=n,e[22]=k):k=e[22];let E;e[23]!==d.href?(E=t.jsx(fs,{url:d.href}),e[23]=d.href,e[24]=E):E=e[24];let A,L;e[25]!==c||e[26]!==d.href?(A=t.jsx(ps,{url:d.href,serverName:c}),L=t.jsx(xs,{url:d.href,serverName:c}),e[25]=c,e[26]=d.href,e[27]=A,e[28]=L):(A=e[27],L=e[28]);let w;e[29]!==E||e[30]!==A||e[31]!==L?(w=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[E,A,L]})}),e[29]=E,e[30]=A,e[31]=L,e[32]=w):w=e[32];let I;e[33]!==k||e[34]!==w?(I=t.jsxs(Ge,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[h,t.jsxs("div",{className:"flex flex-col gap-6",children:[k,w]})]}),e[33]=k,e[34]=w,e[35]=I):I=e[35];let D;return e[36]!==a||e[37]!==s||e[38]!==I?(D=t.jsx(Ue,{open:s,onOpenChange:a,children:I}),e[36]=a,e[37]=s,e[38]=I,e[39]=D):D=e[39],D}function gs(o,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...o,shareDialogOpen:e.payload};case"SET_CONNECTION_DIALOG_OPEN":return{...o,connectionDialogOpen:e.payload};case"SET_EDITING_CONNECTION_ID":return{...o,editingConnectionId:e.payload};case"SET_SKILLS_OPEN":return{...o,skillsOpen:e.payload};default:return o}}function we(o){const e=T.c(27),{connection_id:s,selected_tools:a,selected_resources:l,selected_prompts:n,onClick:f}=o,i=Nt(s);if(!i)return null;let r;e[0]!==a?(r=Ce(a),e[0]=a,e[1]=r):r=e[1];const d=r;let p;e[2]!==l?(p=Ce(l),e[2]=l,e[3]=p):p=e[3];const c=p;let h;e[4]!==n?(h=Ce(n),e[4]=n,e[5]=h):h=e[5];const x=h;let m;e[6]!==i.icon||e[7]!==i.title?(m=t.jsx(he,{icon:i.icon,name:i.title,size:"xs"}),e[6]=i.icon,e[7]=i.title,e[8]=m):m=e[8];let u;e[9]!==i.title?(u=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:i.title}),e[9]=i.title,e[10]=u):u=e[10];let v;e[11]!==d?(v=d!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:d==="all"?"all":d}),t.jsx(Ae,{size:12})]}),e[11]=d,e[12]=v):v=e[12];let b;e[13]!==c?(b=c!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:c==="all"?"all":c}),t.jsx(ge,{size:12})]}),e[13]=c,e[14]=b):b=e[14];let N;e[15]!==x?(N=x!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:x==="all"?"all":x}),t.jsx(Oe,{size:12})]}),e[15]=x,e[16]=N):N=e[16];let g;e[17]!==v||e[18]!==b||e[19]!==N?(g=t.jsxs(Ie,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[v,b,N]}),e[17]=v,e[18]=b,e[19]=N,e[20]=g):g=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=y):y=e[21];let C;return e[22]!==f||e[23]!==m||e[24]!==u||e[25]!==g?(C=t.jsxs("div",{onClick:f,className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border hover:bg-accent/50 transition-colors cursor-pointer",children:[m,u,g,y]}),e[22]=f,e[23]=m,e[24]=u,e[25]=g,e[26]=C):C=e[26],C}we.Fallback=function(){return t.jsxs("div",{className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border",children:[t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"flex-1 h-4 rounded bg-muted animate-pulse"}),t.jsxs(Ie,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Ae,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(ge,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Oe,{size:12})]})]}),t.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"})]})};function js({virtualMcp:o}){const{org:e}=xe(),a=Qe().location.href,l=yt(),n=Xe({resolver:et(ds),defaultValues:o}),f=n.watch("connections"),[i,r]=z.useReducer(gs,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,d]=rt(),{setVirtualMcpId:p}=at();z.useEffect(()=>{d(!0),p(o.id)},[o.id]);const c=()=>{p(o.id),d(!0)},h=n.formState.isDirty,x=async()=>{const g=n.getValues(),y=await l.update.mutateAsync({id:o.id,data:g});n.reset(y)},m=()=>{n.reset(o)},u=()=>{r({type:"SET_EDITING_CONNECTION_ID",payload:null}),r({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},v=g=>{r({type:"SET_EDITING_CONNECTION_ID",payload:g}),r({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},b=l.update.isPending,N=t.jsx(kt,{children:t.jsxs(wt,{children:[t.jsx(Pe,{children:t.jsx(Et,{asChild:!0,children:t.jsx(tt,{to:"/$org/$project/agents",params:{org:e.slug,project:Be},children:"Agents"})})}),t.jsx(It,{}),t.jsx(Pe,{children:t.jsx(Ot,{children:o.title})})]})});return t.jsxs(At,{breadcrumb:N,children:[t.jsxs(Dt,{children:[t.jsx($t,{onSave:x,onUndo:m,isDirty:h,isSaving:b}),t.jsxs(ce,{delayDuration:0,children:[t.jsx(ae,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(Q,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:c,"aria-label":"Test Agent",children:[t.jsx(_t,{size:14}),"Test Agent"]})})}),t.jsx(de,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(ce,{delayDuration:0,children:[t.jsx(ae,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(Q,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:()=>r({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),"aria-label":"Share",children:t.jsx(St,{size:14})})})}),t.jsx(de,{side:"bottom",children:"Share"})]}),t.jsx(ht,{title:o.title,url:a,icon:o.icon??"cpu_chip"})]}),t.jsx("div",{className:"flex h-full w-full bg-background overflow-auto",children:t.jsxs("div",{className:"flex flex-col w-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4 p-6 shrink-0",children:[t.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[t.jsx(he,{icon:o.icon,name:n.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(Tt,{})}),t.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[t.jsx(Re,{...n.register("title"),className:"h-auto py-0.5 text-lg! font-medium leading-7 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Agent Name"}),t.jsx(Re,{...n.register("description"),className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})]})]}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(gt,{checked:n.watch("status")==="active",onCheckedChange:g=>n.setValue("status",g?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(ct,{open:i.skillsOpen,onOpenChange:g=>r({type:"SET_SKILLS_OPEN",payload:g}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[f.length===0?t.jsxs("button",{type:"button",onClick:u,className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"h-7 px-2 inline-flex items-center justify-center gap-1 rounded-md text-sm text-muted-foreground",children:[t.jsx(ze,{size:14}),"Add"]})]}):t.jsx(dt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"ease-(--ease-out-expo)",style:{width:i.skillsOpen?0:"auto",marginRight:i.skillsOpen?0:4,opacity:i.skillsOpen?0:1,pointerEvents:i.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:i.skillsOpen?"0ms":"200ms"},children:t.jsx(Ht,{connectionIds:f.map(g=>g.connection_id),maxVisibleIcons:2})}),t.jsxs("div",{role:"button",tabIndex:0,className:"h-7 inline-flex items-center justify-center rounded-md text-sm text-muted-foreground overflow-hidden transition-all duration-200 ease-(--ease-out-expo) hover:bg-accent hover:text-accent-foreground",style:{width:i.skillsOpen?"auto":28,paddingLeft:i.skillsOpen?8:0,paddingRight:i.skillsOpen?8:0,gap:i.skillsOpen?4:0},onPointerDown:g=>{g.stopPropagation()},onClick:g=>{g.stopPropagation(),g.preventDefault(),u()},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),g.preventDefault(),u())},children:[t.jsx(ze,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?"auto":0,opacity:i.skillsOpen?1:0},children:"Add"})]}),t.jsx("div",{className:"h-7 inline-flex items-center justify-center overflow-hidden transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?28:0,opacity:i.skillsOpen?1:0},children:t.jsx(Ct,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:i.skillsOpen?"1fr":"0fr"},children:t.jsx("div",{className:"min-h-0 overflow-hidden",children:t.jsx("div",{className:"overflow-y-auto max-h-[300px] mask-[linear-gradient(to_bottom,black_calc(100%-40px),transparent_100%)]",children:t.jsx("div",{className:"flex flex-col gap-2 px-6 pb-4 pt-2",children:f.map(g=>t.jsx(z.Suspense,{fallback:t.jsx(we.Fallback,{}),children:t.jsx(we,{connection_id:g.connection_id,selected_tools:g.selected_tools,selected_resources:g.selected_resources,selected_prompts:g.selected_prompts,onClick:()=>v(g.connection_id)})},g.connection_id))})})})})]}),t.jsxs("div",{className:"flex flex-col flex-1 p-6 border-t border-border overflow-auto",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Instructions"}),t.jsx(st,{name:"metadata.instructions",control:n.control,render:({field:g})=>t.jsx(jt,{...g,value:g.value??"",placeholder:"Write instructions here...",className:"min-h-[200px] resize-none text-sm placeholder:text-muted-foreground/50 leading-relaxed border-0 rounded-none shadow-none px-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:border-0 bg-transparent"})})]})]})}),t.jsx(cs,{open:i.connectionDialogOpen,onOpenChange:g=>r({type:"SET_CONNECTION_DIALOG_OPEN",payload:g}),selectedId:i.editingConnectionId,form:n,connections:f}),t.jsx(hs,{open:i.shareDialogOpen,onOpenChange:g=>r({type:"SET_SHARE_DIALOG_OPEN",payload:g}),virtualMcp:o})]})}function bs(){const o=T.c(6),e=Ke();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const a=Ze(s),{org:l,agentId:n}=a,f=vt(n);if(!f){let r;return o[1]!==e||o[2]!==l?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ut,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(Q,{variant:"outline",onClick:()=>e({to:"/$org/$project/agents",params:{org:l,project:Be}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=r):r=o[3],r}let i;return o[4]!==f?(i=t.jsx(js,{virtualMcp:f}),o[4]=f,o[5]=i):i=o[5],i}function zl(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(pe,{children:t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Fe,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(bs,{})})}),o[0]=e):e=o[0],e}export{zl as default};
1
+ import{r as z,c as T,j as t,u as xe,V as Ye,s as qe,t as Ee,b as Ke,e as Ze,O as Be,by as Qe,l as Xe,k as et,aE as tt,n as st}from"./index-Bi-e0xzQ.js";import{T as be,a as lt,b as Ne,c as ot,i as nt,d as it,e as rt,u as at,C as ct,f as dt}from"./use-deco-chat-open-BMBO3145.js";import{C as mt,E as ut}from"./empty-state-uNOuiWjX.js";import{E as pe}from"./error-boundary-nhHtbH_I.js";import{I as he}from"./integration-icon-DbBoUTfS.js";import{I as ft,R as pt,a as xt,P as ht}from"./index-BlyVvX4m.js";import{B as Ie}from"./badge-CCE1KaWc.js";import{B as Q,c as me}from"./button-B7HyH-Uh.js";import{I as Re}from"./input-CV0IyHA1.js";import{S as gt}from"./switch-Bbs0hJSB.js";import{T as jt}from"./textarea-BM9yIjbb.js";import{a as ae,c as ve,T as ce,b as de}from"./tooltip-BRqbDzB0.js";import{h as bt,f as Nt}from"./use-connection-CClYhvEQ.js";import{u as vt,a as yt}from"./use-virtual-mcp-B-Bh55kx.js";import{i as Me}from"./ChevronRight-BFKyuaLR.js";import{n as Ct}from"./select-DWD0v1iQ.js";import{i as Oe}from"./File02-DH9hOxy4.js";import{i as Fe}from"./Loading01-CamudhzM.js";import{i as _t}from"./Play-BGL_a2LJ.js";import{s as ze}from"./Plus-SyEjnSE4.js";import{i as St}from"./Share07-CiXbTaKB.js";import{a as Ae}from"./Tool01-kjwZ_DfI.js";import{t as Tt}from"./Users03-C6wtpaWA.js";import{B as kt,a as wt,b as Pe,d as Et,e as It,c as Ot}from"./breadcrumb-DNYA-_ij.js";import{a as At,V as Dt}from"./layout-BzWZWsG1.js";import{S as $t}from"./save-actions-CQgOAn_J.js";import{T as Lt}from"./tools-list-BZbKPMXf.js";import{C as De}from"./checkbox-B2exkiKb.js";import{e as Rt,a as Ge,D as Ue,b as zt,c as Pt}from"./dialog-DZwwYB-k.js";import{u as $e}from"./constants-zTlTQ-s2.js";import{c as Vt}from"./use-mcp-tools-BavCvJJV.js";import{c as Bt,u as Mt}from"./use-mcp-prompts-CBDcBX2M.js";import{i as Ft}from"./AlertTriangle-CpeNmzLj.js";import{s as He}from"./slugify-CEUa2lfQ.js";import{i as We}from"./Check-CNueXKa4.js";import{i as Gt}from"./Code01-DIVdUEEy.js";import{a as Ut}from"./Copy01-3VuAEFqa.js";import{i as ye}from"./InfoCircle-CpJ9JrRf.js";import{A as Ht}from"./agent-connections-preview-DKNowgRk.js";import"./use-llm-mBHjR_7D.js";import"./use-binding-BmXtAx4J.js";import"./binder-BC9Wv1Ge.js";import"./useQuery-BBSKX1go.js";import"./localstorage-keys-kUhSSpkB.js";import"./useMutation-aO9r1_oG.js";import"./skeleton-Bl8OldYy.js";import"./popover-Doa2WmZx.js";import"./ChevronDown-Dee8Rzkh.js";import"./File06-VYjQ2z3_.js";import"./Grid01-DUtda9uA.js";import"./Image01-C4HZ4Zao.js";import"./RefreshCcw01-CqYyfJ9G.js";import"./SearchMd-CcOZ3J1s.js";import"./Settings01-CVcrQdKI.js";import"./useSuspenseInfiniteQuery-CHxgAZWb.js";import"./infiniteQueryObserver-DNS00oad.js";import"./Container-Bdkg5Azu.js";import"./Pin01-Dz4KJ15m.js";import"./use-organization-settings-CKyDGiTk.js";import"./index-KAr3Peh7.js";import"./use-mobile-DrHpoELT.js";import"./Save01-DO1hEhxi.js";import"./collection-table-wrapper-D0tfp6ae.js";import"./dropdown-menu-CjCphUtO.js";import"./ArrowUp-CA_4TfDf.js";import"./List-CKLUZ_VW.js";import"./table-qdWaG6rv.js";import"./card-C-0_lNug.js";import"./Eye-DKDxswcA.js";import"./Globe02-b9LENZ6B.js";import"./RefreshCw01-BSYC0kIK.js";const Je=({size:o=24,color:e="currentColor",...s})=>z.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},z.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Je.displayName="Circle";const ge=({size:o=24,color:e="currentColor",...s})=>z.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},z.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));ge.displayName="CubeOutline";function Ce(o){return o===null?"all":o?.length??0}function Wt(o,e){const s=o[e];if(!s)return"";const a=[];return s.tools===null?a.push("all tools"):s.tools&&s.tools.length>0&&a.push(`${s.tools.length} tools`),s.resources===null?a.push("all resources"):s.resources&&s.resources.length>0&&a.push(`${s.resources.length} resources`),s.prompts===null?a.push("all prompts"):s.prompts&&s.prompts.length>0&&a.push(`${s.prompts.length} prompts`),a.join(", ")}function Jt(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const Yt={tools:null,resources:null,prompts:null};function _e(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(Fe,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function Se(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Ft,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function qt(o){const e=T.c(23),{item:s,isSelected:a,onToggle:l,disabled:n}=o,f=n?"cursor-not-allowed opacity-50":"cursor-pointer",i=a?"bg-accent/25":"hover:bg-muted/50";let r;e[0]!==f||e[1]!==i?(r=me("flex items-start gap-3 p-4 rounded-lg transition-colors",f,i),e[0]=f,e[1]=i,e[2]=r):r=e[2];let d;e[3]!==s.name?(d=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=d):d=e[4];let p;e[5]!==s.tags?(p=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=p):p=e[6];let c;e[7]!==d||e[8]!==p?(c=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,p]}),e[7]=d,e[8]=p,e[9]=c):c=e[9];let h;e[10]!==s.description?(h=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=h):h=e[11];let x;e[12]!==c||e[13]!==h?(x=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[c,h]}),e[12]=c,e[13]=h,e[14]=x):x=e[14];let m;e[15]!==n||e[16]!==a||e[17]!==l?(m=t.jsx(De,{checked:a,onCheckedChange:l,disabled:n,className:"mt-0.5"}),e[15]=n,e[16]=a,e[17]=l,e[18]=m):m=e[18];let u;return e[19]!==r||e[20]!==x||e[21]!==m?(u=t.jsxs("label",{className:r,children:[x,m]}),e[19]=r,e[20]=x,e[21]=m,e[22]=u):u=e[22],u}function Le(o){const e=T.c(32),{items:s,selections:a,onToggle:l,onToggleAll:n,emptyMessage:f,disabled:i}=o;let r,d,p,c,h;if(e[0]!==i||e[1]!==f||e[2]!==s||e[3]!==l||e[4]!==n||e[5]!==a){h=Symbol.for("react.early_return_sentinel");e:{const u=s.map(Kt);if(s.length===0){let C;e[11]!==f?(C=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:f})}),e[11]=f,e[12]=C):C=e[12],h=C;break e}p="flex flex-col h-full";const v=i?"cursor-not-allowed opacity-50":"cursor-pointer";let b;e[13]!==v?(b=me("flex items-start gap-3 p-4",v),e[13]=v,e[14]=b):b=e[14];let N;e[15]!==s.length?(N=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=N):N=e[16];const g=a===null;let y;e[17]!==i||e[18]!==n||e[19]!==g?(y=t.jsx(De,{checked:g,onCheckedChange:n,disabled:i,className:"mt-0.5"}),e[17]=i,e[18]=n,e[19]=g,e[20]=y):y=e[20],e[21]!==y||e[22]!==b||e[23]!==N?(c=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:b,children:[N,y]})}),e[21]=y,e[22]=b,e[23]=N,e[24]=c):c=e[24],r="flex-1 overflow-auto px-4 py-3 space-y-1",d=s.map(C=>t.jsx(qt,{item:C,isSelected:a===null||a?.includes(C.id),onToggle:()=>l(C.id,u),disabled:i},C.id))}e[0]=i,e[1]=f,e[2]=s,e[3]=l,e[4]=n,e[5]=a,e[6]=r,e[7]=d,e[8]=p,e[9]=c,e[10]=h}else r=e[6],d=e[7],p=e[8],c=e[9],h=e[10];if(h!==Symbol.for("react.early_return_sentinel"))return h;let x;e[25]!==r||e[26]!==d?(x=t.jsx("div",{className:r,children:d}),e[25]=r,e[26]=d,e[27]=x):x=e[27];let m;return e[28]!==p||e[29]!==c||e[30]!==x?(m=t.jsxs("div",{className:p,children:[c,x]}),e[28]=p,e[29]=c,e[30]=x,e[31]=m):m=e[31],m}function Kt(o){return o.id}function Zt(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Vt(p);let h;e[5]!==c.tools?(h=c.tools.map(Qt),e[5]=c.tools,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No tools available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function Qt(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(Lt,{annotations:o.annotations})}}function Xt(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Bt(p);let h;e[5]!==c.resources?(h=c.resources.map(es),e[5]=c.resources,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No resources available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function es(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function ts(o){const e=T.c(13),{connectionId:s,selections:a,onToggle:l,onToggleAll:n,disabled:f}=o,{org:i}=xe();let r;e[0]!==s||e[1]!==i.id?(r={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=r):r=e[2];const d=$e(r);let p;e[3]!==d?(p={client:d},e[3]=d,e[4]=p):p=e[4];const{data:c}=Mt(p);let h;e[5]!==c.prompts?(h=c.prompts.map(ss),e[5]=c.prompts,e[6]=h):h=e[6];const x=h;let m;return e[7]!==f||e[8]!==x||e[9]!==l||e[10]!==n||e[11]!==a?(m=t.jsx(Le,{items:x,selections:a,onToggle:l,onToggleAll:n,emptyMessage:"No prompts available",disabled:f}),e[7]=f,e[8]=x,e[9]=l,e[10]=n,e[11]=a,e[12]=m):m=e[12],m}function ss(o){return{id:o.name,name:o.name,description:o.description}}function ls(o){const e=T.c(24),{connection:s,isSelected:a,hasSelections:l,summary:n,onClick:f,onToggleAll:i,disabled:r}=o,d=r?"cursor-not-allowed opacity-50":"cursor-pointer",p=a?"bg-accent":"hover:bg-muted/50";let c;e[0]!==d||e[1]!==p?(c=me("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",d,p),e[0]=d,e[1]=p,e[2]=c):c=e[2];const h=r?void 0:f;let x;e[3]!==s.icon||e[4]!==s.title?(x=t.jsx(he,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=x):x=e[5];let m;e[6]!==s.title?(m=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=m):m=e[7];let u;e[8]!==l||e[9]!==n?(u=l&&n&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),e[8]=l,e[9]=n,e[10]=u):u=e[10];let v;e[11]!==m||e[12]!==u?(v=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[m,u]}),e[11]=m,e[12]=u,e[13]=v):v=e[13];let b;e[14]!==r||e[15]!==l||e[16]!==i?(b=t.jsx(De,{checked:l,onCheckedChange:i,onClick:os,disabled:r,className:"shrink-0"}),e[14]=r,e[15]=l,e[16]=i,e[17]=b):b=e[17];let N;return e[18]!==c||e[19]!==h||e[20]!==x||e[21]!==v||e[22]!==b?(N=t.jsxs("div",{className:c,onClick:h,children:[x,v,b]}),e[18]=c,e[19]=h,e[20]=x,e[21]=v,e[22]=b,e[23]=N):N=e[23],N}function os(o){return o.stopPropagation()}function ns(o){const e=T.c(22),{allConnections:s,searchTerm:a,selectedId:l,hasSelections:n,getSelectionSummary:f,onConnectionClick:i,onToggleAll:r,disabled:d}=o;let p;e[0]!==s||e[1]!==a?(p=a?s.filter(m=>m.title.toLowerCase().includes(a.toLowerCase())||m.description?.toLowerCase().includes(a.toLowerCase())):s,e[0]=s,e[1]=a,e[2]=p):p=e[2];const c=p;if(c.length===0){const m=a?"No connections found":"No connections available";let u;return e[3]!==m?(u=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:m}),e[3]=m,e[4]=u):u=e[4],u}let h;if(e[5]!==d||e[6]!==c||e[7]!==f||e[8]!==n||e[9]!==i||e[10]!==r||e[11]!==l){let m;e[13]!==d||e[14]!==f||e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==l?(m=u=>t.jsx(ls,{connection:u,isSelected:l===u.id,hasSelections:n(u.id),summary:f(u.id),onClick:()=>i(u.id),onToggleAll:()=>r(u.id),disabled:d},u.id),e[13]=d,e[14]=f,e[15]=n,e[16]=i,e[17]=r,e[18]=l,e[19]=m):m=e[19],h=c.map(m),e[5]=d,e[6]=c,e[7]=f,e[8]=n,e[9]=i,e[10]=r,e[11]=l,e[12]=h}else h=e[12];let x;return e[20]!==h?(x=t.jsx("div",{className:"flex flex-col gap-0.5",children:h}),e[20]=h,e[21]=x):x=e[21],x}function is(o){const e=T.c(75),{currentConnection:s,activeTab:a,selectedId:l,formData:n,toggleTool:f,toggleResource:i,togglePrompt:r,toggleAllTools:d,toggleAllResources:p,toggleAllPrompts:c,onTabChange:h}=o;let x;e[0]!==s.icon||e[1]!==s.title?(x=t.jsx(he,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=x):x=e[2];let m;e[3]!==s.title?(m=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=m):m=e[4];let u;e[5]!==s.description?(u=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=u):u=e[6];let v;e[7]!==m||e[8]!==u?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[m,u]}),e[7]=m,e[8]=u,e[9]=v):v=e[9];let b;e[10]!==x||e[11]!==v?(b=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[x,v]})}),e[10]=x,e[11]=v,e[12]=b):b=e[12];let N;e[13]!==h?(N=M=>h(M),e[13]=h,e[14]=N):N=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsxs(be,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Ae,{size:16}),"Tools"]}),e[15]=g):g=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(be,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(ge,{size:16}),"Resources"]}),e[16]=y):y=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(lt,{variant:"underline",className:"shrink-0 px-6",children:[g,y,t.jsxs(be,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(Oe,{size:16}),"Prompts"]})]}),e[17]=C):C=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=Se("Tools not supported by this server"),e[18]=P):P=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(_e,{}),e[19]=S):S=e[19];let O;e[20]!==n||e[21]!==l?(O=n[l]?n[l].tools:[],e[20]=n,e[21]=l,e[22]=O):O=e[22];let _;e[23]!==l||e[24]!==f?(_=(M,K)=>f(l,M,K),e[23]=l,e[24]=f,e[25]=_):_=e[25];let k;e[26]!==l||e[27]!==d?(k=()=>d(l),e[26]=l,e[27]=d,e[28]=k):k=e[28];let E;e[29]!==l||e[30]!==O||e[31]!==_||e[32]!==k?(E=t.jsx(Ne,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:P,children:t.jsx(z.Suspense,{fallback:S,children:t.jsx(Zt,{connectionId:l,selections:O,onToggle:_,onToggleAll:k})})})}),e[29]=l,e[30]=O,e[31]=_,e[32]=k,e[33]=E):E=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=Se("Resources not supported by this server"),e[34]=A):A=e[34];let L;e[35]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(_e,{}),e[35]=L):L=e[35];let w;e[36]!==n||e[37]!==l?(w=n[l]?n[l].resources:[],e[36]=n,e[37]=l,e[38]=w):w=e[38];let I;e[39]!==l||e[40]!==i?(I=(M,K)=>i(l,M,K),e[39]=l,e[40]=i,e[41]=I):I=e[41];let D;e[42]!==l||e[43]!==p?(D=()=>p(l),e[42]=l,e[43]=p,e[44]=D):D=e[44];let R;e[45]!==l||e[46]!==w||e[47]!==I||e[48]!==D?(R=t.jsx(Ne,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:A,children:t.jsx(z.Suspense,{fallback:L,children:t.jsx(Xt,{connectionId:l,selections:w,onToggle:I,onToggleAll:D})})})}),e[45]=l,e[46]=w,e[47]=I,e[48]=D,e[49]=R):R=e[49];let Y;e[50]===Symbol.for("react.memo_cache_sentinel")?(Y=Se("Prompts not supported by this server"),e[50]=Y):Y=e[50];let q;e[51]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(_e,{}),e[51]=q):q=e[51];let F;e[52]!==n||e[53]!==l?(F=n[l]?n[l].prompts:[],e[52]=n,e[53]=l,e[54]=F):F=e[54];let W;e[55]!==l||e[56]!==r?(W=(M,K)=>r(l,M,K),e[55]=l,e[56]=r,e[57]=W):W=e[57];let G;e[58]!==l||e[59]!==c?(G=()=>c(l),e[58]=l,e[59]=c,e[60]=G):G=e[60];let J;e[61]!==l||e[62]!==F||e[63]!==W||e[64]!==G?(J=t.jsx(Ne,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:Y,children:t.jsx(z.Suspense,{fallback:q,children:t.jsx(ts,{connectionId:l,selections:F,onToggle:W,onToggleAll:G})})})}),e[61]=l,e[62]=F,e[63]=W,e[64]=G,e[65]=J):J=e[65];let U;e[66]!==a||e[67]!==E||e[68]!==R||e[69]!==J||e[70]!==N?(U=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(ot,{value:a,onValueChange:N,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[C,E,R,J]})}),e[66]=a,e[67]=E,e[68]=R,e[69]=J,e[70]=N,e[71]=U):U=e[71];let H;return e[72]!==U||e[73]!==b?(H=t.jsxs(t.Fragment,{children:[b,U]}),e[72]=U,e[73]=b,e[74]=H):H=e[74],H}function rs(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function Te(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function as(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const Ve=(o,e)=>o.find(s=>s.id===e)??o[0];function cs(o){const e=T.c(79),{open:s,onOpenChange:a,selectedId:l,form:n,connections:f}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const r=bt(i);let d;e[1]!==r||e[2]!==l?(d=Ve(r,l)?.id??null,e[1]=r,e[2]=l,e[3]=d):d=e[3];let p;e[4]!==d?(p={activeTab:"tools",searchTerm:"",selectedId:d},e[4]=d,e[5]=p):p=e[5];const[c,h]=z.useReducer(as,p);let x;e[6]!==f?(x=f??[],e[6]=f,e[7]=x):x=e[7];let m;e[8]!==x?(m=rs(x),e[8]=x,e[9]=m):m=e[9];const u=m;let v;e[10]!==r||e[11]!==c.selectedId?(v=Ve(r,c.selectedId),e[10]=r,e[11]=c.selectedId,e[12]=v):v=e[12];const b=v;let N;e[13]!==u?(N=j=>Jt(u,j),e[13]=u,e[14]=N):N=e[14];const g=N;let y;e[15]!==u?(y=j=>Wt(u,j),e[15]=u,e[16]=y):y=e[16];const C=y;let P;e[17]!==n||e[18]!==u?(P=(j,$,V,Z)=>{const ie=u[j]?.[$];let B;ie===null?B=Z.filter(je=>je!==V):ie?.includes(V)?B=ie.filter(je=>je!==V):(B=[...ie??[],V],B.length===Z.length&&(B=null));const re={...u};re[j]?re[j]={...re[j]}:re[j]={tools:null,resources:null,prompts:null},re[j][$]=B,n.setValue("connections",Te(re),{shouldDirty:!0,shouldTouch:!0})},e[17]=n,e[18]=u,e[19]=P):P=e[19];const S=P;let O;e[20]!==n||e[21]!==u?(O=(j,$)=>{const ie=u[j]?.[$]===null?[]:null,B={...u};B[j]?B[j]={...B[j]}:B[j]={tools:null,resources:null,prompts:null},B[j][$]=ie,n.setValue("connections",Te(B),{shouldDirty:!0,shouldTouch:!0})},e[20]=n,e[21]=u,e[22]=O):O=e[22];const _=O;let k;e[23]!==S?(k=(j,$,V)=>S(j,"tools",$,V),e[23]=S,e[24]=k):k=e[24];const E=k;let A;e[25]!==S?(A=(j,$,V)=>S(j,"resources",$,V),e[25]=S,e[26]=A):A=e[26];const L=A;let w;e[27]!==S?(w=(j,$,V)=>S(j,"prompts",$,V),e[27]=S,e[28]=w):w=e[28];const I=w;let D;e[29]!==_?(D=j=>_(j,"tools"),e[29]=_,e[30]=D):D=e[30];const R=D;let Y;e[31]!==_?(Y=j=>_(j,"resources"),e[31]=_,e[32]=Y):Y=e[32];const q=Y;let F;e[33]!==_?(F=j=>_(j,"prompts"),e[33]=_,e[34]=F):F=e[34];const W=F;let G;e[35]!==n||e[36]!==u?(G=j=>{const $=u[j],V=$&&$.tools===null&&$.resources===null&&$.prompts===null,Z={...u};V?delete Z[j]:Z[j]=Yt,n.setValue("connections",Te(Z),{shouldDirty:!0,shouldTouch:!0})},e[35]=n,e[36]=u,e[37]=G):G=e[37];const J=G;let U;e[38]!==r||e[39]!==a||e[40]!==l?(U=j=>{j&&h({type:"RESET",payload:{selectedId:l,firstConnectionId:r[0]?.id??null}}),a(j)},e[38]=r,e[39]=a,e[40]=l,e[41]=U):U=e[41];const H=U;let M;e[42]===Symbol.for("react.memo_cache_sentinel")?(M=j=>{h({type:"SELECT_CONNECTION",payload:j})},e[42]=M):M=e[42];const K=M;let ue;e[43]===Symbol.for("react.memo_cache_sentinel")?(ue=j=>h({type:"SET_SEARCH_TERM",payload:j}),e[43]=ue):ue=e[43];let X;e[44]!==c.searchTerm?(X=t.jsx(mt,{value:c.searchTerm,onChange:ue,placeholder:"Search connections..."}),e[44]=c.searchTerm,e[45]=X):X=e[45];let ee;e[46]!==r||e[47]!==c.searchTerm||e[48]!==c.selectedId||e[49]!==C||e[50]!==g||e[51]!==J?(ee=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(ns,{allConnections:r,searchTerm:c.searchTerm,selectedId:c.selectedId,hasSelections:g,getSelectionSummary:C,onConnectionClick:K,onToggleAll:J})}),e[46]=r,e[47]=c.searchTerm,e[48]=c.selectedId,e[49]=C,e[50]=g,e[51]=J,e[52]=ee):ee=e[52];let te;e[53]!==X||e[54]!==ee?(te=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[X,ee]}),e[53]=X,e[54]=ee,e[55]=te):te=e[55];let se;e[56]!==b||e[57]!==c.activeTab||e[58]!==c.selectedId||e[59]!==u||e[60]!==W||e[61]!==q||e[62]!==R||e[63]!==I||e[64]!==L||e[65]!==E?(se=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:b&&c.selectedId?t.jsx(is,{currentConnection:b,activeTab:c.activeTab,selectedId:c.selectedId,formData:u,toggleTool:E,toggleResource:L,togglePrompt:I,toggleAllTools:R,toggleAllResources:q,toggleAllPrompts:W,onTabChange:j=>h({type:"SET_ACTIVE_TAB",payload:j})},c.selectedId):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[56]=b,e[57]=c.activeTab,e[58]=c.selectedId,e[59]=u,e[60]=W,e[61]=q,e[62]=R,e[63]=I,e[64]=L,e[65]=E,e[66]=se):se=e[66];let le;e[67]!==te||e[68]!==se?(le=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[te,se]}),e[67]=te,e[68]=se,e[69]=le):le=e[69];let oe;e[70]!==H?(oe=t.jsx(Rt,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(Q,{variant:"outline",onClick:()=>H(!1),children:"Done"})}),e[70]=H,e[71]=oe):oe=e[71];let ne;e[72]!==le||e[73]!==oe?(ne=t.jsxs(Ge,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[le,oe]}),e[72]=le,e[73]=oe,e[74]=ne):ne=e[74];let fe;return e[75]!==H||e[76]!==s||e[77]!==ne?(fe=t.jsx(Ue,{open:s,onOpenChange:H,children:ne}),e[75]=H,e[76]=s,e[77]=ne,e[78]=fe):fe=e[78],fe}const ds=Ye.pick({title:!0,description:!0,status:!0,metadata:!0,connections:!0}).extend({title:qe().min(1,"Name is required").max(255)});function ms(o){const e=T.c(8);let s,a;e[0]!==o?({className:s,...a}=o,e[0]=o,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=me("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let n;return e[5]!==a||e[6]!==l?(n=t.jsx(pt,{"data-slot":"radio-group",className:l,...a}),e[5]=a,e[6]=l,e[7]=n):n=e[7],n}function ke(o){const e=T.c(9);let s,a;e[0]!==o?({className:s,...a}=o,e[0]=o,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=me("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(xt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Je,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=n):n=e[5];let f;return e[6]!==a||e[7]!==l?(f=t.jsx(ft,{"data-slot":"radio-group-item",className:l,...a,children:n}),e[6]=a,e[7]=l,e[8]=f):f=e[8],f}function us(o){const s=new TextEncoder().encode(o),a=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(a)}function fs(o){const e=T.c(10),{url:s}=o,[a,l]=z.useState(!1);let n;e[0]!==s?(n=async()=>{await navigator.clipboard.writeText(s),l(!0),Ee.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=n):n=e[1];const f=n;let i;e[2]!==a?(i=a?t.jsx(We,{size:20,className:"text-green-600"}):t.jsx(Ut,{size:20}),e[2]=a,e[3]=i):i=e[3];const r=a?"Copied!":"Copy URL";let d;e[4]!==r?(d=t.jsx("span",{className:"text-xs font-medium",children:r}),e[4]=r,e[5]=d):d=e[5];let p;return e[6]!==f||e[7]!==i||e[8]!==d?(p=t.jsxs(Q,{type:"button",variant:"outline",onClick:f,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[i,d]}),e[6]=f,e[7]=i,e[8]=d,e[9]=p):p=e[9],p}function ps(o){const e=T.c(7),{url:s,serverName:a}=o;let l;e[0]!==a||e[1]!==s?(l=()=>{const d=He(a),c=us(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),h=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(d)}&config=${encodeURIComponent(c)}`;window.open(h,"_blank"),Ee.success("Opening Cursor...")},e[0]=a,e[1]=s,e[2]=l):l=e[2];const n=l;let f,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),i=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=f,e[4]=i):(f=e[3],i=e[4]);let r;return e[5]!==n?(r=t.jsxs(Q,{type:"button",variant:"outline",onClick:n,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[f,i]}),e[5]=n,e[6]=r):r=e[6],r}function xs(o){const e=T.c(11),{url:s,serverName:a}=o,[l,n]=z.useState(!1);let f;e[0]!==a||e[1]!==s?(f=async()=>{const h=He(a),m=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),u=`claude mcp add-json "${h}" '${m.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(u),n(!0),Ee.success("Claude Code command copied to clipboard"),setTimeout(()=>n(!1),2e3)},e[0]=a,e[1]=s,e[2]=f):f=e[2];const i=f;let r;e[3]!==l?(r=l?t.jsx(We,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=r):r=e[4];const d=l?"Copied!":"Install on Claude";let p;e[5]!==d?(p=t.jsx("span",{className:"text-xs font-medium",children:d}),e[5]=d,e[6]=p):p=e[6];let c;return e[7]!==i||e[8]!==r||e[9]!==p?(c=t.jsxs(Q,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[r,p]}),e[7]=i,e[8]=r,e[9]=p,e[10]=c):c=e[10],c}function hs(o){const e=T.c(40),{open:s,onOpenChange:a,virtualMcp:l}=o,[n,f]=z.useState("code_execution");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=R=>{(R==="passthrough"||R==="smart_tool_selection"||R==="code_execution")&&f(R)},e[0]=i):i=e[0];const r=i;let d;e[1]!==n||e[2]!==l.id?(d=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),d.searchParams.set("mode",n),e[1]=n,e[2]=l.id,e[3]=d):d=e[3];let p;e[4]!==l.id||e[5]!==l.title?(p=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=p):p=e[6];const c=p;let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(zt,{children:t.jsx(Pt,{children:"Share Agent"})}),e[7]=h):h=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=x):x=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(nt,{className:"size-5 text-muted-foreground"})}),e[9]=m):m=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=u):u=e[10];let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[11]=v):v=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[m,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[u,t.jsx(ve,{children:t.jsxs(ce,{children:[v,t.jsx(de,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(ke,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=b):b=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(it,{className:"size-5 text-muted-foreground"})}),e[13]=N):N=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=g):g=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[15]=y):y=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[N,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[g,t.jsx(ve,{children:t.jsxs(ce,{children:[y,t.jsx(de,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(ke,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=C):C=e[16];let P;e[17]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Gt,{className:"size-5 text-muted-foreground"})}),e[17]=P):P=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=S):S=e[18];let O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ae,{asChild:!0,children:t.jsx(ye,{className:"size-3.5 text-muted-foreground"})}),e[19]=O):O=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[P,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[S,t.jsx(ve,{children:t.jsxs(ce,{children:[O,t.jsx(de,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(ke,{id:"mode-code",value:"code_execution"}),t.jsx(Ie,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=_):_=e[20];let k;e[21]!==n?(k=t.jsxs("div",{className:"flex flex-col gap-3",children:[x,t.jsxs(ms,{value:n,onValueChange:r,className:"flex flex-col gap-4.5",children:[b,C,_]})]}),e[21]=n,e[22]=k):k=e[22];let E;e[23]!==d.href?(E=t.jsx(fs,{url:d.href}),e[23]=d.href,e[24]=E):E=e[24];let A,L;e[25]!==c||e[26]!==d.href?(A=t.jsx(ps,{url:d.href,serverName:c}),L=t.jsx(xs,{url:d.href,serverName:c}),e[25]=c,e[26]=d.href,e[27]=A,e[28]=L):(A=e[27],L=e[28]);let w;e[29]!==E||e[30]!==A||e[31]!==L?(w=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[E,A,L]})}),e[29]=E,e[30]=A,e[31]=L,e[32]=w):w=e[32];let I;e[33]!==k||e[34]!==w?(I=t.jsxs(Ge,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[h,t.jsxs("div",{className:"flex flex-col gap-6",children:[k,w]})]}),e[33]=k,e[34]=w,e[35]=I):I=e[35];let D;return e[36]!==a||e[37]!==s||e[38]!==I?(D=t.jsx(Ue,{open:s,onOpenChange:a,children:I}),e[36]=a,e[37]=s,e[38]=I,e[39]=D):D=e[39],D}function gs(o,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...o,shareDialogOpen:e.payload};case"SET_CONNECTION_DIALOG_OPEN":return{...o,connectionDialogOpen:e.payload};case"SET_EDITING_CONNECTION_ID":return{...o,editingConnectionId:e.payload};case"SET_SKILLS_OPEN":return{...o,skillsOpen:e.payload};default:return o}}function we(o){const e=T.c(27),{connection_id:s,selected_tools:a,selected_resources:l,selected_prompts:n,onClick:f}=o,i=Nt(s);if(!i)return null;let r;e[0]!==a?(r=Ce(a),e[0]=a,e[1]=r):r=e[1];const d=r;let p;e[2]!==l?(p=Ce(l),e[2]=l,e[3]=p):p=e[3];const c=p;let h;e[4]!==n?(h=Ce(n),e[4]=n,e[5]=h):h=e[5];const x=h;let m;e[6]!==i.icon||e[7]!==i.title?(m=t.jsx(he,{icon:i.icon,name:i.title,size:"xs"}),e[6]=i.icon,e[7]=i.title,e[8]=m):m=e[8];let u;e[9]!==i.title?(u=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:i.title}),e[9]=i.title,e[10]=u):u=e[10];let v;e[11]!==d?(v=d!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:d==="all"?"all":d}),t.jsx(Ae,{size:12})]}),e[11]=d,e[12]=v):v=e[12];let b;e[13]!==c?(b=c!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:c==="all"?"all":c}),t.jsx(ge,{size:12})]}),e[13]=c,e[14]=b):b=e[14];let N;e[15]!==x?(N=x!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:x==="all"?"all":x}),t.jsx(Oe,{size:12})]}),e[15]=x,e[16]=N):N=e[16];let g;e[17]!==v||e[18]!==b||e[19]!==N?(g=t.jsxs(Ie,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[v,b,N]}),e[17]=v,e[18]=b,e[19]=N,e[20]=g):g=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=y):y=e[21];let C;return e[22]!==f||e[23]!==m||e[24]!==u||e[25]!==g?(C=t.jsxs("div",{onClick:f,className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border hover:bg-accent/50 transition-colors cursor-pointer",children:[m,u,g,y]}),e[22]=f,e[23]=m,e[24]=u,e[25]=g,e[26]=C):C=e[26],C}we.Fallback=function(){return t.jsxs("div",{className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border",children:[t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"flex-1 h-4 rounded bg-muted animate-pulse"}),t.jsxs(Ie,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Ae,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(ge,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Oe,{size:12})]})]}),t.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"})]})};function js({virtualMcp:o}){const{org:e}=xe(),a=Qe().location.href,l=yt(),n=Xe({resolver:et(ds),defaultValues:o}),f=n.watch("connections"),[i,r]=z.useReducer(gs,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,d]=rt(),{setVirtualMcpId:p}=at();z.useEffect(()=>{d(!0),p(o.id)},[o.id]);const c=()=>{p(o.id),d(!0)},h=n.formState.isDirty,x=async()=>{const g=n.getValues(),y=await l.update.mutateAsync({id:o.id,data:g});n.reset(y)},m=()=>{n.reset(o)},u=()=>{r({type:"SET_EDITING_CONNECTION_ID",payload:null}),r({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},v=g=>{r({type:"SET_EDITING_CONNECTION_ID",payload:g}),r({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},b=l.update.isPending,N=t.jsx(kt,{children:t.jsxs(wt,{children:[t.jsx(Pe,{children:t.jsx(Et,{asChild:!0,children:t.jsx(tt,{to:"/$org/$project/agents",params:{org:e.slug,project:Be},children:"Agents"})})}),t.jsx(It,{}),t.jsx(Pe,{children:t.jsx(Ot,{children:o.title})})]})});return t.jsxs(At,{breadcrumb:N,children:[t.jsxs(Dt,{children:[t.jsx($t,{onSave:x,onUndo:m,isDirty:h,isSaving:b}),t.jsxs(ce,{delayDuration:0,children:[t.jsx(ae,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(Q,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:c,"aria-label":"Test Agent",children:[t.jsx(_t,{size:14}),"Test Agent"]})})}),t.jsx(de,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(ce,{delayDuration:0,children:[t.jsx(ae,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(Q,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:()=>r({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),"aria-label":"Share",children:t.jsx(St,{size:14})})})}),t.jsx(de,{side:"bottom",children:"Share"})]}),t.jsx(ht,{title:o.title,url:a,icon:o.icon??"cpu_chip"})]}),t.jsx("div",{className:"flex h-full w-full bg-background overflow-auto",children:t.jsxs("div",{className:"flex flex-col w-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4 p-6 shrink-0",children:[t.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[t.jsx(he,{icon:o.icon,name:n.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(Tt,{})}),t.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[t.jsx(Re,{...n.register("title"),className:"h-auto py-0.5 text-lg! font-medium leading-7 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Agent Name"}),t.jsx(Re,{...n.register("description"),className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})]})]}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(gt,{checked:n.watch("status")==="active",onCheckedChange:g=>n.setValue("status",g?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(ct,{open:i.skillsOpen,onOpenChange:g=>r({type:"SET_SKILLS_OPEN",payload:g}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[f.length===0?t.jsxs("button",{type:"button",onClick:u,className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"h-7 px-2 inline-flex items-center justify-center gap-1 rounded-md text-sm text-muted-foreground",children:[t.jsx(ze,{size:14}),"Add"]})]}):t.jsx(dt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"ease-(--ease-out-expo)",style:{width:i.skillsOpen?0:"auto",marginRight:i.skillsOpen?0:4,opacity:i.skillsOpen?0:1,pointerEvents:i.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:i.skillsOpen?"0ms":"200ms"},children:t.jsx(Ht,{connectionIds:f.map(g=>g.connection_id),maxVisibleIcons:2})}),t.jsxs("div",{role:"button",tabIndex:0,className:"h-7 inline-flex items-center justify-center rounded-md text-sm text-muted-foreground overflow-hidden transition-all duration-200 ease-(--ease-out-expo) hover:bg-accent hover:text-accent-foreground",style:{width:i.skillsOpen?"auto":28,paddingLeft:i.skillsOpen?8:0,paddingRight:i.skillsOpen?8:0,gap:i.skillsOpen?4:0},onPointerDown:g=>{g.stopPropagation()},onClick:g=>{g.stopPropagation(),g.preventDefault(),u()},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),g.preventDefault(),u())},children:[t.jsx(ze,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?"auto":0,opacity:i.skillsOpen?1:0},children:"Add"})]}),t.jsx("div",{className:"h-7 inline-flex items-center justify-center overflow-hidden transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?28:0,opacity:i.skillsOpen?1:0},children:t.jsx(Ct,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:i.skillsOpen?"1fr":"0fr"},children:t.jsx("div",{className:"min-h-0 overflow-hidden",children:t.jsx("div",{className:"overflow-y-auto max-h-[300px] mask-[linear-gradient(to_bottom,black_calc(100%-40px),transparent_100%)]",children:t.jsx("div",{className:"flex flex-col gap-2 px-6 pb-4 pt-2",children:f.map(g=>t.jsx(z.Suspense,{fallback:t.jsx(we.Fallback,{}),children:t.jsx(we,{connection_id:g.connection_id,selected_tools:g.selected_tools,selected_resources:g.selected_resources,selected_prompts:g.selected_prompts,onClick:()=>v(g.connection_id)})},g.connection_id))})})})})]}),t.jsxs("div",{className:"flex flex-col flex-1 p-6 border-t border-border overflow-auto",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Instructions"}),t.jsx(st,{name:"metadata.instructions",control:n.control,render:({field:g})=>t.jsx(jt,{...g,value:g.value??"",placeholder:"Write instructions here...",className:"min-h-[200px] resize-none text-sm placeholder:text-muted-foreground/50 leading-relaxed border-0 rounded-none shadow-none px-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:border-0 bg-transparent"})})]})]})}),t.jsx(cs,{open:i.connectionDialogOpen,onOpenChange:g=>r({type:"SET_CONNECTION_DIALOG_OPEN",payload:g}),selectedId:i.editingConnectionId,form:n,connections:f}),t.jsx(hs,{open:i.shareDialogOpen,onOpenChange:g=>r({type:"SET_SHARE_DIALOG_OPEN",payload:g}),virtualMcp:o})]})}function bs(){const o=T.c(6),e=Ke();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const a=Ze(s),{org:l,agentId:n}=a,f=vt(n);if(!f){let r;return o[1]!==e||o[2]!==l?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ut,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(Q,{variant:"outline",onClick:()=>e({to:"/$org/$project/agents",params:{org:l,project:Be}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=r):r=o[3],r}let i;return o[4]!==f?(i=t.jsx(js,{virtualMcp:f}),o[4]=f,o[5]=i):i=o[5],i}function zl(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(pe,{children:t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Fe,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(bs,{})})}),o[0]=e):e=o[0],e}export{zl as default};
@@ -1 +1 @@
1
- import{c as ie,j as t,r as X,u as ne,b as ae,O as V}from"./index-oUlshpJJ.js";import{C as le,a as ce}from"./collection-table-wrapper-CTR1SyIy.js";import{C as de,E as q}from"./empty-state-BlBaHJ3u.js";import{P as j}from"./index-CeXKeP7Z.js";import{B as me,a as pe,b as ue,c as ge}from"./breadcrumb-DM1tOdpW.js";import{C as he}from"./connection-card-CI7L8iKE.js";import{E as fe}from"./error-boundary-Dk3_bHxS.js";import{I as xe}from"./integration-icon-CTPrN73-.js";import{u as je,U as Ce}from"./use-list-state-cJ107QPf.js";import{u as be}from"./use-create-virtual-mcp-CEbxqW61.js";import{i as ye}from"./constants-4GzD41KM.js";import{b as we,a as Ne}from"./use-virtual-mcp-BzAB1Jwk.js";import{c as De,b as Se,d as _e,A as ke,e as ve,g as Ae,a as Ie,f as Pe}from"./alert-dialog-BXLdEhYw.js";import{B as Q}from"./button-DlMEAXru.js";import{D as Y,a as Z,b as ee,c as R}from"./dropdown-menu-BJqdu9io.js";import{i as te}from"./DotsVertical-B-SoXTlv.js";import{s as se}from"./Eye-DuHzxuzN.js";import{i as $e}from"./Loading01-1Zu_WpPr.js";import{s as oe}from"./Trash01-uafi7Ilf.js";import{t as C}from"./Users03-DcEKYrkA.js";import{A as re}from"./agent-connections-preview-PbH9WU_0.js";import{f as ze}from"./format-time-CMKyl-GC.js";import"./ArrowUp-BjfCYJa6.js";import"./Check-B14Bp2E0.js";import"./Grid01--gwdVXxp.js";import"./List-BJooyaoM.js";import"./tooltip-BnwJ5PQp.js";import"./table-DPbr8gQl.js";import"./SearchMd-CZA5t4_M.js";import"./input-BTxNeBOO.js";import"./use-mobile-EmqlWdQN.js";import"./ChevronRight-IL2oOJI2.js";import"./card-BJlwqw9P.js";import"./AlertTriangle-VgUX_bsB.js";import"./Container-BGGgIzJh.js";import"./avatar-Bc7s3LEL.js";import"./useQuery-Do4lYH9e.js";import"./use-view-mode-Dg_d9_Oy.js";import"./use-connection-CJPryUMd.js";import"./useMutation-kpLmB8S8.js";import"./differenceInSeconds-NQ4PDo0z.js";function Me(e,r){switch(r.type){case"delete":return{mode:"deleting",virtualMcp:r.virtualMcp};case"close":return{mode:"idle"}}}function Be(){const e=ie.c(65),{org:r}=ne(),n=ae();let b;e[0]!==r.slug?(b={namespace:r.slug,resource:"agents"},e[0]=r.slug,e[1]=b):b=e[1];const s=je(b),x=we(s);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},e[2]=y):y=e[2];const{createVirtualMCP:T,isCreating:w}=be(y),U=Ne();let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N={mode:"idle"},e[3]=N):N=e[3];const[i,D]=X.useReducer(Me,N);let S;e[4]!==U||e[5]!==i.mode||e[6]!==i.virtualMcp?(S=async()=>{if(i.mode!=="deleting")return;const o=i.virtualMcp.id;if(D({type:"close"}),!(!o||ye(o)))try{await U.delete.mutateAsync(o)}catch{}},e[4]=U,e[5]=i.mode,e[6]=i.virtualMcp,e[7]=S):S=e[7];const L=S;let _,k,v,A,I;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Fe,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:He,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},v={id:"connections",header:"Connections",render:Ue,cellClassName:"w-28 shrink-0"},A={id:"updated_by",header:"Updated by",render:Te,cellClassName:"w-32 shrink-0",sortable:!0},I={id:"updated_at",header:"Updated",render:Re,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=v,e[11]=A,e[12]=I):(_=e[8],k=e[9],v=e[10],A=e[11],I=e[12]);let P;e[13]!==n||e[14]!==r.slug?(P=[_,k,v,A,I,{id:"actions",header:"",render:o=>t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ve,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Ke,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}})},children:[t.jsx(se,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),D({type:"delete",virtualMcp:o})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=n,e[14]=r.slug,e[15]=P):P=e[15];const H=P,F=w?"Creating...":"Create Agent";let $;e[16]!==T||e[17]!==w||e[18]!==F?($=t.jsx(Q,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:F}),e[16]=T,e[17]=w,e[18]=F,e[19]=$):$=e[19];const G=$,J=i.mode==="deleting";let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=o=>!o&&D({type:"close"}),e[20]=z):z=e[20];let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(De,{children:"Delete Agent?"}),e[21]=M):M=e[21];const W=i.mode==="deleting"&&i.virtualMcp.title;let l;e[22]!==W?(l=t.jsxs(Se,{children:[M,t.jsxs(_e,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[22]=W,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==L?(c=t.jsxs(ve,{children:[B,t.jsx(Ae,{onClick:L,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=L,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ie,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==J||e[31]!==d?(m=t.jsx(Pe,{open:J,onOpenChange:z,children:d}),e[30]=J,e[31]=d,e[32]=m):m=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(j.Header.Left,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ue,{children:t.jsx(ge,{children:"Agents"})})})})}),e[33]=O):O=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=E):E=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(le,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:E}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let u;e[41]!==G||e[42]!==p?(u=t.jsxs(j.Header,{children:[O,t.jsxs(j.Header.Right,{children:[p,G]})]}),e[41]=G,e[42]=p,e[43]=u):u=e[43];let g;e[44]!==s?(g=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[44]=s,e[45]=g):g=e[45];let h;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==g?(h=t.jsx(de,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:g}),e[46]=s.search,e[47]=s.setSearch,e[48]=g,e[49]=h):h=e[49];let f;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==n||e[57]!==r.slug||e[58]!==x?(f=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:x.map(o=>t.jsx(he,{connection:{id:o.id??"",title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(C,{}),onClick:()=>n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ee,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Oe,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}})},children:[t.jsx(se,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),D({type:"delete",virtualMcp:o})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]})},o.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(ce,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=n,e[57]=r.slug,e[58]=x,e[59]=f):f=e[59];let K;return e[60]!==m||e[61]!==u||e[62]!==h||e[63]!==f?(K=t.jsxs(j,{children:[m,u,h,f]}),e[60]=m,e[61]=u,e[62]=h,e[63]=f,e[64]=K):K=e[64],K}function Oe(e){return e.stopPropagation()}function Ee(e){return e.stopPropagation()}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Re(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?ze(new Date(e.updated_at)):"—"})}function Te(e){return t.jsx(Ce,{id:e.updated_by??e.created_by,size:"3xs"})}function Ue(e){return t.jsx(X.Suspense,{fallback:t.jsx(re.Fallback,{}),children:t.jsx(re,{connectionIds:e.connections.map(Le),maxVisibleIcons:2})})}function Le(e){return e.connection_id}function He(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Fe(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(xe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function zt(){const e=ie.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(fe,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx($e,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Be,{})})}),e[0]=r):r=e[0],r}export{zt as default};
1
+ import{c as ie,j as t,r as X,u as ne,b as ae,O as V}from"./index-Bi-e0xzQ.js";import{C as le,a as ce}from"./collection-table-wrapper-D0tfp6ae.js";import{C as de,E as q}from"./empty-state-uNOuiWjX.js";import{P as j}from"./index-KAr3Peh7.js";import{B as me,a as pe,b as ue,c as ge}from"./breadcrumb-DNYA-_ij.js";import{C as he}from"./connection-card-DKiGEKqq.js";import{E as fe}from"./error-boundary-nhHtbH_I.js";import{I as xe}from"./integration-icon-DbBoUTfS.js";import{u as je,U as Ce}from"./use-list-state-CCBTDGCJ.js";import{u as be}from"./use-create-virtual-mcp-K3AM9Z5N.js";import{i as ye}from"./constants-zTlTQ-s2.js";import{b as we,a as Ne}from"./use-virtual-mcp-B-Bh55kx.js";import{c as De,b as Se,d as _e,A as ke,e as ve,g as Ae,a as Ie,f as Pe}from"./alert-dialog-EoSV6_8V.js";import{B as Q}from"./button-B7HyH-Uh.js";import{D as Y,a as Z,b as ee,c as R}from"./dropdown-menu-CjCphUtO.js";import{i as te}from"./DotsVertical-By9o8N3R.js";import{s as se}from"./Eye-DKDxswcA.js";import{i as $e}from"./Loading01-CamudhzM.js";import{s as oe}from"./Trash01-CthEEWHa.js";import{t as C}from"./Users03-C6wtpaWA.js";import{A as re}from"./agent-connections-preview-DKNowgRk.js";import{f as ze}from"./format-time-CMKyl-GC.js";import"./ArrowUp-CA_4TfDf.js";import"./Check-CNueXKa4.js";import"./Grid01-DUtda9uA.js";import"./List-CKLUZ_VW.js";import"./tooltip-BRqbDzB0.js";import"./table-qdWaG6rv.js";import"./SearchMd-CcOZ3J1s.js";import"./input-CV0IyHA1.js";import"./use-mobile-DrHpoELT.js";import"./ChevronRight-BFKyuaLR.js";import"./card-C-0_lNug.js";import"./AlertTriangle-CpeNmzLj.js";import"./Container-Bdkg5Azu.js";import"./avatar-L1PL1ayJ.js";import"./useQuery-BBSKX1go.js";import"./use-view-mode-BshQz6D5.js";import"./use-connection-CClYhvEQ.js";import"./useMutation-aO9r1_oG.js";import"./differenceInSeconds-NQ4PDo0z.js";function Me(e,r){switch(r.type){case"delete":return{mode:"deleting",virtualMcp:r.virtualMcp};case"close":return{mode:"idle"}}}function Be(){const e=ie.c(65),{org:r}=ne(),n=ae();let b;e[0]!==r.slug?(b={namespace:r.slug,resource:"agents"},e[0]=r.slug,e[1]=b):b=e[1];const s=je(b),x=we(s);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},e[2]=y):y=e[2];const{createVirtualMCP:T,isCreating:w}=be(y),U=Ne();let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N={mode:"idle"},e[3]=N):N=e[3];const[i,D]=X.useReducer(Me,N);let S;e[4]!==U||e[5]!==i.mode||e[6]!==i.virtualMcp?(S=async()=>{if(i.mode!=="deleting")return;const o=i.virtualMcp.id;if(D({type:"close"}),!(!o||ye(o)))try{await U.delete.mutateAsync(o)}catch{}},e[4]=U,e[5]=i.mode,e[6]=i.virtualMcp,e[7]=S):S=e[7];const L=S;let _,k,v,A,I;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Fe,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:He,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},v={id:"connections",header:"Connections",render:Ue,cellClassName:"w-28 shrink-0"},A={id:"updated_by",header:"Updated by",render:Te,cellClassName:"w-32 shrink-0",sortable:!0},I={id:"updated_at",header:"Updated",render:Re,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=v,e[11]=A,e[12]=I):(_=e[8],k=e[9],v=e[10],A=e[11],I=e[12]);let P;e[13]!==n||e[14]!==r.slug?(P=[_,k,v,A,I,{id:"actions",header:"",render:o=>t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ve,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Ke,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}})},children:[t.jsx(se,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),D({type:"delete",virtualMcp:o})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=n,e[14]=r.slug,e[15]=P):P=e[15];const H=P,F=w?"Creating...":"Create Agent";let $;e[16]!==T||e[17]!==w||e[18]!==F?($=t.jsx(Q,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:F}),e[16]=T,e[17]=w,e[18]=F,e[19]=$):$=e[19];const G=$,J=i.mode==="deleting";let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=o=>!o&&D({type:"close"}),e[20]=z):z=e[20];let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(De,{children:"Delete Agent?"}),e[21]=M):M=e[21];const W=i.mode==="deleting"&&i.virtualMcp.title;let l;e[22]!==W?(l=t.jsxs(Se,{children:[M,t.jsxs(_e,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[22]=W,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==L?(c=t.jsxs(ve,{children:[B,t.jsx(Ae,{onClick:L,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=L,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ie,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==J||e[31]!==d?(m=t.jsx(Pe,{open:J,onOpenChange:z,children:d}),e[30]=J,e[31]=d,e[32]=m):m=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(j.Header.Left,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ue,{children:t.jsx(ge,{children:"Agents"})})})})}),e[33]=O):O=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=E):E=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(le,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:E}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let u;e[41]!==G||e[42]!==p?(u=t.jsxs(j.Header,{children:[O,t.jsxs(j.Header.Right,{children:[p,G]})]}),e[41]=G,e[42]=p,e[43]=u):u=e[43];let g;e[44]!==s?(g=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[44]=s,e[45]=g):g=e[45];let h;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==g?(h=t.jsx(de,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:g}),e[46]=s.search,e[47]=s.setSearch,e[48]=g,e[49]=h):h=e[49];let f;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==n||e[57]!==r.slug||e[58]!==x?(f=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:x.map(o=>t.jsx(he,{connection:{id:o.id??"",title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(C,{}),onClick:()=>n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ee,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Oe,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}})},children:[t.jsx(se,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),D({type:"delete",virtualMcp:o})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]})},o.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(ce,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>n({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:V,agentId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=n,e[57]=r.slug,e[58]=x,e[59]=f):f=e[59];let K;return e[60]!==m||e[61]!==u||e[62]!==h||e[63]!==f?(K=t.jsxs(j,{children:[m,u,h,f]}),e[60]=m,e[61]=u,e[62]=h,e[63]=f,e[64]=K):K=e[64],K}function Oe(e){return e.stopPropagation()}function Ee(e){return e.stopPropagation()}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Re(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?ze(new Date(e.updated_at)):"—"})}function Te(e){return t.jsx(Ce,{id:e.updated_by??e.created_by,size:"3xs"})}function Ue(e){return t.jsx(X.Suspense,{fallback:t.jsx(re.Fallback,{}),children:t.jsx(re,{connectionIds:e.connections.map(Le),maxVisibleIcons:2})})}function Le(e){return e.connection_id}function He(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Fe(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(xe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function zt(){const e=ie.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(fe,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx($e,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Be,{})})}),e[0]=r):r=e[0],r}export{zt as default};
@@ -1,4 +1,4 @@
1
- import{j as r,I as w,r as n,as as m,aS as O,J as M,au as I,T as z,M as F,W as A,aT as D,Q as L,aU as G,ax as W,X as k,U as H,c as i}from"./index-oUlshpJJ.js";import{c as p,b as v}from"./button-DlMEAXru.js";var x="AlertDialog",[U]=W(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});y.displayName=V;var Y="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t})};j.displayName=Y;var q="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=q;var g="AlertDialogContent",[B,J]=U(g),Q=G("AlertDialogContent"),h=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return r.jsx(O,{contentName:g,titleName:b,docsSlug:"alert-dialog",children:r.jsx(B,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(K,{contentRef:c})]})})})});h.displayName=g;var b="AlertDialogTitle",$=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});$.displayName=b;var E="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(F,{...o,...a,ref:e})});R.displayName=E;var X="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=X;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=J(S,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});T.displayName=S;var K=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.
1
+ import{j as r,I as w,r as n,as as m,aS as O,J as M,au as I,T as z,M as F,W as A,aT as D,Q as L,aU as G,ax as W,X as k,U as H,c as i}from"./index-Bi-e0xzQ.js";import{c as p,b as v}from"./button-B7HyH-Uh.js";var x="AlertDialog",[U]=W(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});y.displayName=V;var Y="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t})};j.displayName=Y;var q="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=q;var g="AlertDialogContent",[B,J]=U(g),Q=G("AlertDialogContent"),h=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return r.jsx(O,{contentName:g,titleName:b,docsSlug:"alert-dialog",children:r.jsx(B,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(K,{contentRef:c})]})})})});h.displayName=g;var b="AlertDialogTitle",$=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});$.displayName=b;var E="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(F,{...o,...a,ref:e})});R.displayName=E;var X="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=X;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=J(S,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});T.displayName=S;var K=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${g}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1 +1 @@
1
- import{c as l,e as m,j as t,A as f,S as h,f as x,g as r,h as p,N as u}from"./index-oUlshpJJ.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
1
+ import{c as l,e as m,j as t,A as f,S as h,f as x,g as r,h as p,N as u}from"./index-Bi-e0xzQ.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
@@ -1 +1 @@
1
- import{r as R,c as j,j as i,x as I,aA as $,aB as L,aC as M}from"./index-oUlshpJJ.js";import{c as f}from"./button-DlMEAXru.js";const V=({size:a=24,color:e="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let o,t;e[0]!==a?({className:o,...t}=a,e[0]=a,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=i.jsx(M,{"data-slot":"avatar",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function B(a){const e=j.c(8);let o,t;e[0]!==a?({className:o,...t}=a,e[0]=a,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=f("aspect-square size-full",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=i.jsx($,{"data-slot":"avatar-image",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let o,t;e[0]!==a?({className:o,...t}=a,e[0]=a,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=f("bg-muted flex size-full items-center justify-center rounded-full",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=i.jsx(L,{"data-slot":"avatar-fallback",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],W="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function _(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const o=Math.abs(e)%S.length;return S[o]}const U=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),Z=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function G(a){const e=j.c(35);let o,t,s,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:o,muted:g,...s}=a,e[0]=a,e[1]=o,e[2]=t,e[3]=s,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(o=e[1],t=e[2],s=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[m,x]=R.useState(!1);let C;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],C=c;break e}C=t}const F=C;let z;e:{if(k){z=W;break e}if(typeof t=="string"){let c;e[11]!==t?(c=_(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==o||e[19]!==b||e[20]!==h?(w=f(U({shape:b,size:h}),o),e[18]=o,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==F||e[24]!==E||e[25]!==m||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:Z(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(B,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(T,{className:f(y,"rounded-none"),children:F})]}),e[22]=y,e[23]=F,e[24]=E,e[25]=m,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==s||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...s,children:v}),e[31]=s,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(a){const e=j.c(18);let o,t,s,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:o,muted:g,...s}=a,e[0]=a,e[1]=o,e[2]=t,e[3]=s,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(o=e[1],t=e[2],s=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,m=h??"base";let x;return e[9]!==o||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==s||e[14]!==b||e[15]!==m||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:m,objectFit:u,className:o,muted:k,...s}),e[9]=o,e[10]=t,e[11]=k,e[12]=u,e[13]=s,e[14]=b,e[15]=m,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:o="base",className:t}){return i.jsx("div",{className:f(U({shape:e,size:o}),"bg-muted animate-pulse",t)})};export{H as A};
1
+ import{r as R,c as j,j as i,x as I,aA as $,aB as L,aC as M}from"./index-Bi-e0xzQ.js";import{c as f}from"./button-B7HyH-Uh.js";const V=({size:a=24,color:e="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let o,t;e[0]!==a?({className:o,...t}=a,e[0]=a,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=i.jsx(M,{"data-slot":"avatar",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function B(a){const e=j.c(8);let o,t;e[0]!==a?({className:o,...t}=a,e[0]=a,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=f("aspect-square size-full",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=i.jsx($,{"data-slot":"avatar-image",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let o,t;e[0]!==a?({className:o,...t}=a,e[0]=a,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=f("bg-muted flex size-full items-center justify-center rounded-full",o),e[3]=o,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=i.jsx(L,{"data-slot":"avatar-fallback",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],W="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function _(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const o=Math.abs(e)%S.length;return S[o]}const U=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),Z=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function G(a){const e=j.c(35);let o,t,s,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:o,muted:g,...s}=a,e[0]=a,e[1]=o,e[2]=t,e[3]=s,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(o=e[1],t=e[2],s=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[m,x]=R.useState(!1);let C;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],C=c;break e}C=t}const F=C;let z;e:{if(k){z=W;break e}if(typeof t=="string"){let c;e[11]!==t?(c=_(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==o||e[19]!==b||e[20]!==h?(w=f(U({shape:b,size:h}),o),e[18]=o,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==F||e[24]!==E||e[25]!==m||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:Z(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(B,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(T,{className:f(y,"rounded-none"),children:F})]}),e[22]=y,e[23]=F,e[24]=E,e[25]=m,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==s||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...s,children:v}),e[31]=s,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(a){const e=j.c(18);let o,t,s,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:o,muted:g,...s}=a,e[0]=a,e[1]=o,e[2]=t,e[3]=s,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(o=e[1],t=e[2],s=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,m=h??"base";let x;return e[9]!==o||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==s||e[14]!==b||e[15]!==m||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:m,objectFit:u,className:o,muted:k,...s}),e[9]=o,e[10]=t,e[11]=k,e[12]=u,e[13]=s,e[14]=b,e[15]=m,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:o="base",className:t}){return i.jsx("div",{className:f(U({shape:e,size:o}),"bg-muted animate-pulse",t)})};export{H as A};
@@ -1 +1 @@
1
- import{c as d,j as u,q as l,x as v}from"./index-oUlshpJJ.js";import{c as g}from"./button-DlMEAXru.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
1
+ import{c as d,j as u,q as l,x as v}from"./index-Bi-e0xzQ.js";import{c as g}from"./button-B7HyH-Uh.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
@@ -1 +1 @@
1
- import"./index-oUlshpJJ.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
1
+ import"./index-Bi-e0xzQ.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
@@ -1 +1 @@
1
- import{c as n,j as c,q as u}from"./index-oUlshpJJ.js";import{i as d}from"./ChevronRight-IL2oOJI2.js";import{c as m}from"./button-DlMEAXru.js";function x(r){const e=n.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=c.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=n.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=c.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=n.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=c.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=n.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?u:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=c.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=n.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-medium truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=c.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=n.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??c.jsx(d,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=c.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,h as c,j as d,B as e};
1
+ import{c as n,j as c,q as u}from"./index-Bi-e0xzQ.js";import{i as d}from"./ChevronRight-BFKyuaLR.js";import{c as m}from"./button-B7HyH-Uh.js";function x(r){const e=n.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=c.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=n.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=c.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=n.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=c.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=n.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?u:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=c.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=n.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-medium truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=c.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=n.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??c.jsx(d,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=c.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,h as c,j as d,B as e};
@@ -1 +1 @@
1
- import{b0 as u,b1 as l,c as g,j as v,q as p,x as b}from"./index-oUlshpJJ.js";function x(...n){return u(l(n))}const f=b("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function k(n){const e=g.c(14);let t,r,s,o,i;e[0]!==n?({className:t,variant:i,size:s,asChild:o,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(t=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const c=(o===void 0?!1:o)?p:"button";let a;e[6]!==t||e[7]!==s||e[8]!==i?(a=x(f({variant:i,size:s,className:t})),e[6]=t,e[7]=s,e[8]=i,e[9]=a):a=e[9];let d;return e[10]!==c||e[11]!==r||e[12]!==a?(d=v.jsx(c,{"data-slot":"button",className:a,...r}),e[10]=c,e[11]=r,e[12]=a,e[13]=d):d=e[13],d}export{k as B,f as b,x as c};
1
+ import{b0 as u,b1 as l,c as g,j as v,q as p,x as b}from"./index-Bi-e0xzQ.js";function x(...n){return u(l(n))}const f=b("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function k(n){const e=g.c(14);let t,r,s,o,i;e[0]!==n?({className:t,variant:i,size:s,asChild:o,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(t=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const c=(o===void 0?!1:o)?p:"button";let a;e[6]!==t||e[7]!==s||e[8]!==i?(a=x(f({variant:i,size:s,className:t})),e[6]=t,e[7]=s,e[8]=i,e[9]=a):a=e[9];let d;return e[10]!==c||e[11]!==r||e[12]!==a?(d=v.jsx(c,{"data-slot":"button",className:a,...r}),e[10]=c,e[11]=r,e[12]=a,e[13]=d):d=e[13],d}export{k as B,f as b,x as c};
@@ -1 +1 @@
1
- import{c as o,j as c}from"./index-oUlshpJJ.js";import{c as d}from"./button-DlMEAXru.js";function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75 shadow-xs",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function x(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{f as C,x as a,m as b,u as c,p as d};
1
+ import{c as o,j as c}from"./index-Bi-e0xzQ.js";import{c as d}from"./button-B7HyH-Uh.js";function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75 shadow-xs",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function x(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{f as C,x as a,m as b,u as c,p as d};
@@ -1 +1 @@
1
- import{c as d,j as c,ag as n,ah as l}from"./index-oUlshpJJ.js";import{i as m}from"./Check-B14Bp2E0.js";import{c as b}from"./button-DlMEAXru.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
1
+ import{c as d,j as c,ag as n,ah as l}from"./index-Bi-e0xzQ.js";import{i as m}from"./Check-CNueXKa4.js";import{c as b}from"./button-B7HyH-Uh.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
@@ -1 +1 @@
1
- import{r as c}from"./index-oUlshpJJ.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
1
+ import{r as c}from"./index-Bi-e0xzQ.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};