@decocms/mesh 2.114.5 → 2.115.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 (207) hide show
  1. package/dist/client/assets/{AlertCircle-D4527ICU.js → AlertCircle-DiL2HrFE.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-COPWzaf0.js → AlertOctagon-2d8rAOd4.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-DCH5pYxh.js → AlertTriangle-VgUX_bsB.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-LkHGsmHm.js → ArrowLeft-Br1qiDir.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CDfQ8pyb.js → ArrowUp-BjfCYJa6.js} +1 -1
  6. package/dist/client/assets/{Check-CjRTK1W3.js → Check-B14Bp2E0.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-D8HwQ_vF.js → CheckCircle-qs5k2cFp.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-03ijxcax.js → CheckDone01-COU71F1q.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-CtD1r3r9.js → CheckVerified02-C_h0QKPV.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-_RktpP9c.js → ChevronDown-DmZAA_RH.js} +1 -1
  11. package/dist/client/assets/{ChevronRight-CXCT1lCM.js → ChevronRight-IL2oOJI2.js} +1 -1
  12. package/dist/client/assets/{Clock-Bmdb1TRN.js → Clock-BeB-7xuQ.js} +1 -1
  13. package/dist/client/assets/{Code01-7zAo2TKF.js → Code01-DnUALMy9.js} +1 -1
  14. package/dist/client/assets/{Container-CX-RbvCV.js → Container-BGGgIzJh.js} +1 -1
  15. package/dist/client/assets/{Copy01-DH2d5VIk.js → Copy01-BZzZvWHY.js} +1 -1
  16. package/dist/client/assets/{Dataflow03-C0pv0bfM.js → Dataflow03-BnILNUas.js} +1 -1
  17. package/dist/client/assets/{DotsHorizontal-idJQgrR0.js → DotsHorizontal-C1qTqyiq.js} +1 -1
  18. package/dist/client/assets/{DotsVertical-CeT-zlQ9.js → DotsVertical-B-SoXTlv.js} +1 -1
  19. package/dist/client/assets/{Download01-C6sOPnkz.js → Download01-CW2ve7I5.js} +1 -1
  20. package/dist/client/assets/{Edit01-LXqrrmB1.js → Edit01-CA_byL8x.js} +1 -1
  21. package/dist/client/assets/{Eye-VVPfHR4D.js → Eye-DuHzxuzN.js} +1 -1
  22. package/dist/client/assets/{File02-7lPfhcb8.js → File02-HWzOQAS5.js} +1 -1
  23. package/dist/client/assets/{File06-BMp646T6.js → File06-6ostm09J.js} +1 -1
  24. package/dist/client/assets/{FilterLines-BHBNEtwf.js → FilterLines-n9w8nbRb.js} +1 -1
  25. package/dist/client/assets/{Globe01-Kkx6XQlj.js → Globe01-C7OLr5gu.js} +1 -1
  26. package/dist/client/assets/{Globe02-BqaVWXob.js → Globe02-DCQdCg-U.js} +1 -1
  27. package/dist/client/assets/{Grid01-BHI_ERnP.js → Grid01--gwdVXxp.js} +1 -1
  28. package/dist/client/assets/{Hash02-CgVI0A1g.js → Hash02-B3ztCRZG.js} +1 -1
  29. package/dist/client/assets/{Home02-BTAwhHo8.js → Home02-5xEMThw1.js} +1 -1
  30. package/dist/client/assets/{Image01-CC_Iyvd-.js → Image01-CHvGzt2y.js} +1 -1
  31. package/dist/client/assets/{Inbox01-C0b_GP1p.js → Inbox01-D__eEiRp.js} +1 -1
  32. package/dist/client/assets/{InfoCircle-DuvmlJAv.js → InfoCircle-BaJSxaGK.js} +1 -1
  33. package/dist/client/assets/{Key01-DCtZGi5S.js → Key01-CAUAOxiV.js} +1 -1
  34. package/dist/client/assets/{LinkExternal01-B_y3HiQu.js → LinkExternal01-UC_M5qWQ.js} +1 -1
  35. package/dist/client/assets/{List-BM1ULKxF.js → List-BJooyaoM.js} +1 -1
  36. package/dist/client/assets/{Loading01-1snKai6N.js → Loading01-1Zu_WpPr.js} +1 -1
  37. package/dist/client/assets/{Lock01-C6ZOoLqK.js → Lock01-DPYIJ_nA.js} +1 -1
  38. package/dist/client/assets/{Pin01-DpYa83SH.js → Pin01-DJanT9uS.js} +1 -1
  39. package/dist/client/assets/{Play-CgqvBg2y.js → Play-CahYnURS.js} +1 -1
  40. package/dist/client/assets/{Plus-DP2vmrEk.js → Plus-CRFHrfK2.js} +1 -1
  41. package/dist/client/assets/{RefreshCcw01-CYXSIN1J.js → RefreshCcw01-DuNb9sh9.js} +1 -1
  42. package/dist/client/assets/{RefreshCw01-nnfUzBDg.js → RefreshCw01-CppBn3YV.js} +1 -1
  43. package/dist/client/assets/{Rows03-DWahBVYP.js → Rows03-CjT39fIX.js} +1 -1
  44. package/dist/client/assets/{Save01-Bqg14Jsn.js → Save01-_XMAksec.js} +1 -1
  45. package/dist/client/assets/{SearchMd-DrKsMuei.js → SearchMd-CZA5t4_M.js} +1 -1
  46. package/dist/client/assets/{Settings01-DJTSpTEO.js → Settings01-CmfD9-kk.js} +1 -1
  47. package/dist/client/assets/{Share07-E1brkTmr.js → Share07-tPlC5hop.js} +1 -1
  48. package/dist/client/assets/{Shield01-Cpp9zCrW.js → Shield01-BTe6K6H4.js} +1 -1
  49. package/dist/client/assets/{Terminal-BsKlphFd.js → Terminal-JVvp8Qza.js} +1 -1
  50. package/dist/client/assets/{Tool01-NJWs-WhI.js → Tool01-BY8zBv5Q.js} +1 -1
  51. package/dist/client/assets/{Trash01-lACkPNMB.js → Trash01-uafi7Ilf.js} +1 -1
  52. package/dist/client/assets/{Upload01-Daxvc3MZ.js → Upload01-j9dbqfwl.js} +1 -1
  53. package/dist/client/assets/{Users03-NwL7-0U5.js → Users03-DcEKYrkA.js} +1 -1
  54. package/dist/client/assets/{XCircle-BI-IxNLe.js → XCircle-BUqdRo4A.js} +1 -1
  55. package/dist/client/assets/{XClose-BAk7dT8G.js → XClose-BmynBvu4.js} +1 -1
  56. package/dist/client/assets/{agent-connections-preview-CAewQIAH.js → agent-connections-preview-PbH9WU_0.js} +1 -1
  57. package/dist/client/assets/agent-detail-Cq0CB4eM.js +1 -0
  58. package/dist/client/assets/agents-6ayYcmP9.js +1 -0
  59. package/dist/client/assets/alert-dialog-BXLdEhYw.js +7 -0
  60. package/dist/client/assets/{auth-catchall-GmhyR443.js → auth-catchall-BmN6aGyF.js} +1 -1
  61. package/dist/client/assets/{avatar-CtRXPznJ.js → avatar-Bc7s3LEL.js} +1 -1
  62. package/dist/client/assets/{badge-CjnLH2lI.js → badge-D4AHLMOm.js} +1 -1
  63. package/dist/client/assets/{binder-Dt_u4Ovx.js → binder-c0e82ZKj.js} +1 -1
  64. package/dist/client/assets/{breadcrumb-LjVmMbX-.js → breadcrumb-DM1tOdpW.js} +1 -1
  65. package/dist/client/assets/{button-B5dhenVQ.js → button-DlMEAXru.js} +1 -1
  66. package/dist/client/assets/{card-BMSXwRZK.js → card-BJlwqw9P.js} +1 -1
  67. package/dist/client/assets/{checkbox-B3V3lNLc.js → checkbox-2ZZDRGKg.js} +1 -1
  68. package/dist/client/assets/{circle-alert-B6KuKG9n.js → circle-alert-BU4aPU4k.js} +1 -1
  69. package/dist/client/assets/{collection-detail-D3hf0Jbk.js → collection-detail-CcvsZ6SX.js} +2 -2
  70. package/dist/client/assets/{collection-tab-BOEDXnQR.js → collection-tab-D1U8qcC9.js} +1 -1
  71. package/dist/client/assets/{collection-table-wrapper-aNY90kKS.js → collection-table-wrapper-CTR1SyIy.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-BO5PAHk4.js → collection-tabs-DX49JXWl.js} +1 -1
  73. package/dist/client/assets/{command-yCoqBOON.js → command-CZie2XvG.js} +1 -1
  74. package/dist/client/assets/{connect-CQwVcgEv.js → connect-BuwxUgJG.js} +1 -1
  75. package/dist/client/assets/{connection-card-BhlZU1pr.js → connection-card-CI7L8iKE.js} +1 -1
  76. package/dist/client/assets/connection-detail-CRaZ-Ye2.js +1 -0
  77. package/dist/client/assets/connections-B0wIwXTZ.js +1 -0
  78. package/dist/client/assets/constants-4GzD41KM.js +1 -0
  79. package/dist/client/assets/constants-PL5hL4qd.js +1 -0
  80. package/dist/client/assets/{create-organization-dialog-DutMRH55.js → create-organization-dialog-CfW7SB8o.js} +1 -1
  81. package/dist/client/assets/{create-project-dialog-DRsHceJD.js → create-project-dialog-dfuHufiJ.js} +1 -1
  82. package/dist/client/assets/dialog-Cwnz3LEA.js +1 -0
  83. package/dist/client/assets/dropdown-menu-BJqdu9io.js +1 -0
  84. package/dist/client/assets/dynamic-plugin-layout-aRox8LyK.js +1 -0
  85. package/dist/client/assets/{empty-state-C2LxutXw.js → empty-state-BkmlXyqb.js} +1 -1
  86. package/dist/client/assets/{empty-state-DNFU252E.js → empty-state-BlBaHJ3u.js} +1 -1
  87. package/dist/client/assets/{env-vars-editor-CqAf8U3A.js → env-vars-editor-qzHFuA5w.js} +1 -1
  88. package/dist/client/assets/{error-boundary-BmYrMabK.js → error-boundary-Dk3_bHxS.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-BRcwDsGF.js → extract-connection-data-Cl1h0kax.js} +1 -1
  90. package/dist/client/assets/{file-browser-CvXUou5l.js → file-browser-BpuuoaOY.js} +2 -2
  91. package/dist/client/assets/form-B3bK9lhs.js +1 -0
  92. package/dist/client/assets/{grid-view-CRcbOk5V.js → grid-view-tbrO-yA3.js} +1 -1
  93. package/dist/client/assets/{home-7gGufnUB.js → home-DEEFTVc1.js} +1 -1
  94. package/dist/client/assets/{index-x_TnqT5B.js → index-1CQrZ9Zl.js} +1 -1
  95. package/dist/client/assets/{index-DbAkcs1f.js → index-2jF2yJ2o.js} +1 -1
  96. package/dist/client/assets/{index-C8kkzFPl.js → index-BPtZHCt5.js} +2 -2
  97. package/dist/client/assets/index-CeXKeP7Z.js +1 -0
  98. package/dist/client/assets/{index-CGZdgHcu.js → index-DGrxQVii.js} +1 -1
  99. package/dist/client/assets/{index-BTp0980Q.js → index-DjF4GflS.js} +1 -1
  100. package/dist/client/assets/{index-DWibhftK.js → index-MzZr0KB3.js} +1 -1
  101. package/dist/client/assets/index-Pglfh9Lp.css +1 -0
  102. package/dist/client/assets/{index-Bunb17vv.js → index-oUlshpJJ.js} +30 -30
  103. package/dist/client/assets/{infiniteQueryObserver-BXks7odB.js → infiniteQueryObserver-CzTbTGuU.js} +1 -1
  104. package/dist/client/assets/{input-Mr1OFJyo.js → input-BTxNeBOO.js} +1 -1
  105. package/dist/client/assets/{integration-icon-D9Lac1Wz.js → integration-icon-CTPrN73-.js} +1 -1
  106. package/dist/client/assets/{label-BG1T_p3q.js → label-bLbRV7ZJ.js} +1 -1
  107. package/dist/client/assets/{layout-D99bjGJH.js → layout-D-svMqBO.js} +1 -1
  108. package/dist/client/assets/{localstorage-keys-COeOMfeR.js → localstorage-keys-z-WZ22Zi.js} +1 -1
  109. package/dist/client/assets/{login-JX4XQrOX.js → login-D0xu4-Fa.js} +1 -1
  110. package/dist/client/assets/{markdown-DmUzq0fW.js → markdown-CgNryeyO.js} +1 -1
  111. package/dist/client/assets/{mcp-oauth-D6uou3Tk.js → mcp-oauth-Dj71M6pS.js} +1 -1
  112. package/dist/client/assets/{mcp-server-card-DcmKpSBn.js → mcp-server-card-Bc5AS-wf.js} +1 -1
  113. package/dist/client/assets/mcp-server-detail-D02AsVR7.js +2 -0
  114. package/dist/client/assets/members-EmtbbMjC.js +3 -0
  115. package/dist/client/assets/{monitoring-CUWH3-yc.js → monitoring-C-93CV4C.js} +1 -1
  116. package/dist/client/assets/monitoring-dashboard-edit-Bdp6e51N.js +1 -0
  117. package/dist/client/assets/{monitoring-dashboard-view-BpqD12ZC.js → monitoring-dashboard-view-Bx7z2_z0.js} +2 -2
  118. package/dist/client/assets/{oauth-callback-CA72LutH.js → oauth-callback-CkkG9d7v.js} +1 -1
  119. package/dist/client/assets/page-BGugjR0I.js +1 -0
  120. package/dist/client/assets/page-ITQU-Zp8.js +1 -0
  121. package/dist/client/assets/{plugin-empty-state-CQXNVuX5.js → plugin-empty-state-AgNFTQ0u.js} +1 -1
  122. package/dist/client/assets/{plugin-empty-state-WYiH6sc2.js → plugin-empty-state-DlghdeMy.js} +1 -1
  123. package/dist/client/assets/{plugin-header-B84nx02H.js → plugin-header-BiKI-0GN.js} +1 -1
  124. package/dist/client/assets/{plugin-header-BHGQDET9.js → plugin-header-DxI4kgNA.js} +1 -1
  125. package/dist/client/assets/{popover-D1pzNMOP.js → popover-DK0-mkfJ.js} +1 -1
  126. package/dist/client/assets/project-layout-ClSoqo8C.js +1 -0
  127. package/dist/client/assets/projects-list-78EdWnMz.js +1 -0
  128. package/dist/client/assets/ranking-layout-BipS-5d4.js +1 -0
  129. package/dist/client/assets/{readme-viewer-DatdJZvZ.js → readme-viewer-CYVu4zA3.js} +1 -1
  130. package/dist/client/assets/{registry-layout-BUPa9s1k.js → registry-layout-DuUFYDsK.js} +3 -3
  131. package/dist/client/assets/{registry-utils-qr99zc3y.js → registry-utils-BJco7Nso.js} +1 -1
  132. package/dist/client/assets/{reports-layout-BEeAVx6X.js → reports-layout-DWL4B4XL.js} +2 -2
  133. package/dist/client/assets/{reset-password-B7QTemHG.js → reset-password-C7TFy7aQ.js} +1 -1
  134. package/dist/client/assets/{resizable-DVFWStNI.js → resizable-zYSMb8PO.js} +1 -1
  135. package/dist/client/assets/{save-actions-C1hqEO2Q.js → save-actions-BdnWXMVf.js} +1 -1
  136. package/dist/client/assets/{scroll-area-B96z0OJW.js → scroll-area-30X2y975.js} +1 -1
  137. package/dist/client/assets/select-Duopl7P2.js +1 -0
  138. package/dist/client/assets/shell-layout-CI23YHUg.js +3 -0
  139. package/dist/client/assets/skeleton-CmCa76Pe.js +1 -0
  140. package/dist/client/assets/{spinner-IfgQRFqp.js → spinner--6L1PAKk.js} +1 -1
  141. package/dist/client/assets/{store-invite-BhzFqpM6.js → store-invite-DNBT5DzD.js} +1 -1
  142. package/dist/client/assets/{switch-DGp6vNcC.js → switch-CzMTfJyd.js} +1 -1
  143. package/dist/client/assets/{table-CMMXy5Nr.js → table-DPbr8gQl.js} +1 -1
  144. package/dist/client/assets/tasks-CqaWmm56.js +1 -0
  145. package/dist/client/assets/{textarea-BmDkS1nd.js → textarea-BNPURYr9.js} +1 -1
  146. package/dist/client/assets/{time-range-picker-TrkvnH9b.js → time-range-picker-C-sEn-dP.js} +1 -1
  147. package/dist/client/assets/{toggle-group-BX6pY9Pe.js → toggle-group-bVqu9tww.js} +1 -1
  148. package/dist/client/assets/{tools-list-De4BYXHg.js → tools-list-D2XTdfAR.js} +1 -1
  149. package/dist/client/assets/tooltip-BnwJ5PQp.js +1 -0
  150. package/dist/client/assets/{topbar-portal-AI9OKodd.js → topbar-portal-CrFEl7XT.js} +1 -1
  151. package/dist/client/assets/{typewriter-title-BtVgakQ8.js → typewriter-title-Dh7JaY-s.js} +1 -1
  152. package/dist/client/assets/{use-binding-B9wXdfeU.js → use-binding-CSl5A5cE.js} +1 -1
  153. package/dist/client/assets/{use-connection-CP6jP6nm.js → use-connection-CJPryUMd.js} +1 -1
  154. package/dist/client/assets/{use-copy-0wW0qGhT.js → use-copy-DELXo_w6.js} +1 -1
  155. package/dist/client/assets/{use-create-virtual-mcp-Cywd7YYe.js → use-create-virtual-mcp-CEbxqW61.js} +1 -1
  156. package/dist/client/assets/use-deco-chat-open-Bj4jxMD7.js +23 -0
  157. package/dist/client/assets/{use-install-from-registry-CiGE-z-O.js → use-install-from-registry-Vj4wJ4IH.js} +1 -1
  158. package/dist/client/assets/{use-list-state-D5zjpWht.js → use-list-state-cJ107QPf.js} +1 -1
  159. package/dist/client/assets/{use-llm-C4Bry7oS.js → use-llm-us82LJMh.js} +1 -1
  160. package/dist/client/assets/{use-mcp-prompts-BKi3cw-d.js → use-mcp-prompts-Sqkswu5s.js} +1 -1
  161. package/dist/client/assets/{use-mcp-tools-Cr0Y8gRI.js → use-mcp-tools-Dj4ni5D7.js} +1 -1
  162. package/dist/client/assets/use-mobile-EmqlWdQN.js +1 -0
  163. package/dist/client/assets/{use-organization-settings-CcELpryj.js → use-organization-settings-CMrztk0j.js} +1 -1
  164. package/dist/client/assets/{use-project-C6-m-oFo.js → use-project-BYeZMfFI.js} +1 -1
  165. package/dist/client/assets/use-settings-modal-tvp-XYtD.js +1 -0
  166. package/dist/client/assets/use-view-mode-Dg_d9_Oy.js +1 -0
  167. package/dist/client/assets/{use-virtual-mcp-XvCSSoaL.js → use-virtual-mcp-BzAB1Jwk.js} +1 -1
  168. package/dist/client/assets/useInfiniteQuery-DS7Rp5Du.js +1 -0
  169. package/dist/client/assets/{useMutation-BOvwy9IK.js → useMutation-kpLmB8S8.js} +1 -1
  170. package/dist/client/assets/useQuery-Do4lYH9e.js +1 -0
  171. package/dist/client/assets/useSuspenseInfiniteQuery-8nf2pI1w.js +1 -0
  172. package/dist/client/assets/workflow-DbuBBxB5.js +1 -0
  173. package/dist/client/index.html +2 -2
  174. package/package.json +1 -1
  175. package/dist/client/assets/agent-detail-BJ7e6hVZ.js +0 -1
  176. package/dist/client/assets/agents-BayHH4eE.js +0 -1
  177. package/dist/client/assets/alert-dialog-DXvpuu2v.js +0 -7
  178. package/dist/client/assets/connection-detail-qYhiAtw2.js +0 -1
  179. package/dist/client/assets/connections-B8mrWQPE.js +0 -1
  180. package/dist/client/assets/constants-CvNkH2U9.js +0 -1
  181. package/dist/client/assets/constants-DPkAIN6Z.js +0 -1
  182. package/dist/client/assets/dialog-D2hO-7NL.js +0 -1
  183. package/dist/client/assets/dropdown-menu-DTV9aWPi.js +0 -1
  184. package/dist/client/assets/dynamic-plugin-layout-Bo1D4pyt.js +0 -1
  185. package/dist/client/assets/form-DTE57Ssv.js +0 -1
  186. package/dist/client/assets/index-Fc-7NN6M.js +0 -1
  187. package/dist/client/assets/index-QsCquYg-.css +0 -1
  188. package/dist/client/assets/index-wFCrgWrj.js +0 -1
  189. package/dist/client/assets/mcp-server-detail-RQTYqb1-.js +0 -2
  190. package/dist/client/assets/members-BeOTjUuL.js +0 -3
  191. package/dist/client/assets/monitoring-dashboard-edit-B2Vjinzp.js +0 -1
  192. package/dist/client/assets/page-CUSTLK_m.js +0 -1
  193. package/dist/client/assets/page-CvZFXv7u.js +0 -1
  194. package/dist/client/assets/project-layout-C8NT4ALB.js +0 -1
  195. package/dist/client/assets/project-settings-Cha270fD.js +0 -1
  196. package/dist/client/assets/projects-list-CcpUdUj6.js +0 -1
  197. package/dist/client/assets/ranking-layout-BGN2gmsx.js +0 -1
  198. package/dist/client/assets/select-DltKl0vA.js +0 -1
  199. package/dist/client/assets/shell-layout-BEAbkctA.js +0 -3
  200. package/dist/client/assets/tasks-DjEN_dgb.js +0 -1
  201. package/dist/client/assets/tooltip-BOvHNvKx.js +0 -1
  202. package/dist/client/assets/use-deco-chat-open-Jl2cvCiJ.js +0 -23
  203. package/dist/client/assets/use-view-mode-qnYxn17S.js +0 -1
  204. package/dist/client/assets/useInfiniteQuery-BA8HdwgM.js +0 -1
  205. package/dist/client/assets/useQuery-Bp4CuU6A.js +0 -1
  206. package/dist/client/assets/useSuspenseInfiniteQuery-CYNigxjg.js +0 -1
  207. package/dist/client/assets/workflow-WgVMIyEN.js +0 -1
@@ -0,0 +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};
@@ -0,0 +1,7 @@
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.
2
+
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
+
5
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${g}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
+
7
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return n.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},Z=N,ee=y,te=j,ae=_,oe=h,le=C,se=T,re=$,ie=R;function ge(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(Z,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function fe(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(ee,{"data-slot":"alert-dialog-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(te,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ce(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(ae,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ue(l){const e=i.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ce,{}),e[3]=o):o=e[3];let s;e[4]!==t?(s=p("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=s):s=e[5];let c;return e[6]!==a||e[7]!==s?(c=r.jsxs(ne,{children:[o,r.jsx(oe,{"data-slot":"alert-dialog-content",className:s,...a})]}),e[6]=a,e[7]=s,e[8]=c):c=e[8],c}function me(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function Ae(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function De(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(re,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ve(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(ie,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function xe(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v(),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function Ne(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(se,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}export{Ne as A,ue as a,me as b,De as c,ve as d,Ae as e,ge as f,xe as g,fe as h};
@@ -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-Bunb17vv.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-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 +1 @@
1
- import{r as R,c as j,j as i,y as I,aB as $,aC as L,aD as M}from"./index-Bunb17vv.js";import{c as f}from"./button-B5dhenVQ.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 D(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"],T="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(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"}}),_=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 y;e:{if(k){y=T;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=S[0]}const z=y;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]!==z||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",z),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(_({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(D,{className:f(z,"rounded-none"),children:F})]}),e[22]=z,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-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 +1 @@
1
- import{c as d,j as u,v as l,y as v}from"./index-Bunb17vv.js";import{c as g}from"./button-B5dhenVQ.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-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 +1 @@
1
- import"./index-Bunb17vv.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-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 +1 @@
1
- import{c as n,j as c,v as u}from"./index-Bunb17vv.js";import{i as d}from"./ChevronRight-CXCT1lCM.js";import{c as m}from"./button-B5dhenVQ.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-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 +1 @@
1
- import{b0 as u,b1 as l,c as g,j as v,v as p,y as b}from"./index-Bunb17vv.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-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 +1 @@
1
- import{c as o,j as c}from"./index-Bunb17vv.js";import{c as d}from"./button-B5dhenVQ.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-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 +1 @@
1
- import{c as d,j as c,ai as n,aj as l}from"./index-Bunb17vv.js";import{i as m}from"./Check-CjRTK1W3.js";import{c as b}from"./button-B5dhenVQ.js";function f(o){const e=d.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=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]=a):a=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]!==i||e[7]!==a?(s=c.jsx(n,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,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-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 +1 @@
1
- import{r as c}from"./index-Bunb17vv.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-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,4 +1,4 @@
1
- import{b4 as te,r as k,o as Zs,s as kt,c as C,j as o,bz as Wt,u as G,l as Ys,y as eo,e as pe,a as to,aE as Ye,O as et,t as On,bm as q,bP as no,bQ as so,aH as oo,a9 as Ft,av as de,ax as Rn,aI as ro,ar as Ht,aG as io,aJ as An,at as Mn,aP as lo,aQ as co,ay as Pn,aR as ao,bR as Vt,bS as uo,an as fo,bo as mo,aq as po,z as xo,bT as ho,bU as go,bV as Ln}from"./index-Bunb17vv.js";import{E as Dn}from"./empty-state-DNFU252E.js";import{E as zn}from"./error-boundary-BmYrMabK.js";import{d as Ut,u as Bt,f as lt,h as bo}from"./use-connection-CP6jP6nm.js";import{u as ne,g as Ve,i as jo}from"./constants-DPkAIN6Z.js";import{P as qt}from"./index-DWibhftK.js";import{F as It,a as vo,b as Kt,d as Jt}from"./form-DTE57Ssv.js";import{I as Gt}from"./input-Mr1OFJyo.js";import{T as At}from"./textarea-BmDkS1nd.js";import{b as Wn,V as Xt,a as he}from"./layout-D99bjGJH.js";import{S as Fn}from"./save-actions-C1hqEO2Q.js";import{c as M,B as Y}from"./button-B5dhenVQ.js";import{S as Hn,a as Vn,b as Un,c as Bn,d as tt}from"./select-DltKl0vA.js";import{c as Qt,T as Zt,a as Yt,b as en,i as qn}from"./tooltip-BOvHNvKx.js";import{i as yo}from"./AlertCircle-D4527ICU.js";import{s as So}from"./Clock-Bmdb1TRN.js";import{i as wo}from"./Code01-7zAo2TKF.js";import{a as No}from"./Copy01-DH2d5VIk.js";import{i as He}from"./Loading01-1snKai6N.js";import{i as tn}from"./Play-CgqvBg2y.js";import{s as ct}from"./XClose-BAk7dT8G.js";import{B as Kn,a as Jn,b as Pe,d as nt,e as st,c as Gn}from"./breadcrumb-LjVmMbX-.js";import{u as Co,O as ko,M as Io,F as _o,v as To}from"./index-BTp0980Q.js";import{d as nn,b as sn,a as on}from"./use-mcp-tools-Cr0Y8gRI.js";import{I as at}from"./integration-icon-D9Lac1Wz.js";import{M as Le,n as Eo,S as $o,a as Oo}from"./scroll-area-B96z0OJW.js";import{E as rn}from"./empty-state-C2LxutXw.js";import{n as Ro}from"./Container-CX-RbvCV.js";import{b as Xn}from"./use-virtual-mcp-XvCSSoaL.js";import{b as Ao,a as jn,R as Mo}from"./resizable-DVFWStNI.js";import{B as me}from"./badge-CjnLH2lI.js";import{S as dt}from"./spinner-IfgQRFqp.js";import{V as Po}from"./collection-table-wrapper-aNY90kKS.js";import{N as Lo,S as Do,a as zo,c as Wo,m as Ge,P as Fo,i as Ho,R as Vo,u as Uo,b as Bo,d as vn,E as qo,e as Ko}from"./index-C8kkzFPl.js";import{a as Jo}from"./use-binding-B9wXdfeU.js";import{b as Go,c as Xo,d as Qo,e as Zo,a as Yo,D as er}from"./dialog-D2hO-7NL.js";import"./index-x_TnqT5B.js";import{s as Qn}from"./Plus-DP2vmrEk.js";import{c as Zn}from"./AlertOctagon-COPWzaf0.js";import{i as ut}from"./Check-CjRTK1W3.js";import{i as tr}from"./DotsHorizontal-idJQgrR0.js";import{a as nr}from"./Tool01-NJWs-WhI.js";import{D as sr,a as or,b as rr,c as yn}from"./dropdown-menu-DTV9aWPi.js";import{k as ir,R as lr,l as cr,m as Yn}from"./use-deco-chat-open-Jl2cvCiJ.js";import{i as ar}from"./ChevronRight-CXCT1lCM.js";import"./SearchMd-DrKsMuei.js";import"./AlertTriangle-DCH5pYxh.js";import"./useMutation-BOvwy9IK.js";import"./Pin01-DpYa83SH.js";import"./use-organization-settings-CcELpryj.js";import"./label-BG1T_p3q.js";import"./index-wFCrgWrj.js";import"./Save01-Bqg14Jsn.js";import"./index-Fc-7NN6M.js";import"./ChevronDown-_RktpP9c.js";import"./mcp-oauth-D6uou3Tk.js";import"./File06-BMp646T6.js";import"./Key01-DCtZGi5S.js";import"./constants-CvNkH2U9.js";import"./registry-utils-qr99zc3y.js";import"./extract-connection-data-BRcwDsGF.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-CiGE-z-O.js";import"./circle-alert-B6KuKG9n.js";import"./index-DbAkcs1f.js";import"./useQuery-Bp4CuU6A.js";import"./ArrowUp-CDfQ8pyb.js";import"./Grid01-BHI_ERnP.js";import"./List-BM1ULKxF.js";import"./table-CMMXy5Nr.js";import"./popover-D1pzNMOP.js";import"./use-mcp-prompts-BKi3cw-d.js";import"./usage-B8eRkRZY.js";import"./Edit01-LXqrrmB1.js";import"./Users03-NwL7-0U5.js";import"./XCircle-BI-IxNLe.js";import"./ArrowLeft-LkHGsmHm.js";import"./use-copy-0wW0qGhT.js";import"./use-create-virtual-mcp-Cywd7YYe.js";import"./marked.esm-BaswSlok.js";import"./markdown-DmUzq0fW.js";import"./tools-list-De4BYXHg.js";import"./card-BMSXwRZK.js";import"./Eye-VVPfHR4D.js";import"./Globe02-BqaVWXob.js";import"./RefreshCw01-nnfUzBDg.js";import"./Trash01-lACkPNMB.js";import"./binder-Dt_u4Ovx.js";import"./use-llm-C4Bry7oS.js";import"./localstorage-keys-COeOMfeR.js";import"./Image01-CC_Iyvd-.js";import"./RefreshCcw01-CYXSIN1J.js";import"./Settings01-DJTSpTEO.js";import"./useSuspenseInfiniteQuery-CYNigxjg.js";import"./infiniteQueryObserver-BXks7odB.js";const es=te("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const ts=te("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ln=te("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const cn=te("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const dr=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const ur=te("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const fr=te("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ns=te("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ss=te("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const os=te("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const mr=te("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const rs=te("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const is=te("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),ls=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));ls.displayName="Box";const cs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));cs.displayName="ClockFastForward";const as=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));as.displayName="Code02";const Xe=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Xe.displayName="Columns01";const ds=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));ds.displayName="CornerDownRight";const us=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));us.displayName="Database01";const fs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));fs.displayName="GitBranch01";const ms=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));ms.displayName="Repeat03";Zs({title:kt().min(1),description:kt().nullable(),body:kt()});function _t(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function pr(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function xr(t){const e=C.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(It,{control:n.control,name:"title",render:br}),o.jsx(It,{control:n.control,name:"description",render:gr})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(It,{control:n.control,name:"body",render:hr})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let d;return e[10]!==n||e[11]!==a?(d=o.jsx(vo,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function hr(t){const{field:e}=t;return o.jsx(Kt,{children:o.jsx(Jt,{children:o.jsx(At,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function gr(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function br(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function jr(t){const e=C.c(41),{providerId:n,promptId:s}=t,r=Wt().location.href,{org:l}=G(),c=n||null;let a;e[0]!==l.id||e[1]!==c?(a={connectionId:c,orgId:l.id},e[0]=l.id,e[1]=c,e[2]=a):a=e[2];const d=ne(a),u=Ut(n,"PROMPT",s,d),f=Bt(n,"PROMPT",d),m=f.update.isPending;let h;e[3]!==u?(h=u?{title:u.title,description:u.description??null,body:_t(u)}:void 0,e[3]=u,e[4]=h):h=e[4];let p;e[5]!==h?(p={values:h},e[5]=h,e[6]=p):p=e[6];const x=Ys(p);let g;e[7]!==x||e[8]!==u?(g=()=>{u&&x.reset({title:u.title,description:u.description??null,body:_t(u)})},e[7]=x,e[8]=u,e[9]=g):g=e[9];const b=g;let j;e[10]!==f.update||e[11]!==x||e[12]!==s?(j=x.handleSubmit(async I=>{const A=await f.update.mutateAsync({id:s,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});x.reset({title:A.title,description:A.description??null,body:_t(A)})}),e[10]=f.update,e[11]=x,e[12]=s,e[13]=j):j=e[13];const y=j;if(!u){let I;return e[14]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=I):I=e[14],I}let S;e[15]!==u.title?(S=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[15]=u.title,e[16]=S):S=e[16];let v;e[17]!==u.description?(v=u.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[17]=u.description,e[18]=v):v=e[18];let w;e[19]!==S||e[20]!==v?(w=o.jsx(Wn,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[S,v]})}),e[19]=S,e[20]=v,e[21]=w):w=e[21];let N;e[22]!==y?(N=()=>{y()},e[22]=y,e[23]=N):N=e[23];let T;e[24]!==x.formState.isDirty||e[25]!==m||e[26]!==b||e[27]!==N?(T=o.jsx(Fn,{onSave:N,onUndo:b,isDirty:x.formState.isDirty,isSaving:m}),e[24]=x.formState.isDirty,e[25]=m,e[26]=b,e[27]=N,e[28]=T):T=e[28];let E;e[29]!==u.title||e[30]!==r?(E=o.jsx(qt,{title:u.title,url:r,icon:"description"}),e[29]=u.title,e[30]=r,e[31]=E):E=e[31];let $;e[32]!==T||e[33]!==E?($=o.jsxs(Xt,{children:[T,E]}),e[32]=T,e[33]=E,e[34]=$):$=e[34];let R;e[35]!==x?(R=o.jsx("div",{className:"h-full",children:o.jsx(xr,{form:x})}),e[35]=x,e[36]=R):R=e[36];let L;return e[37]!==$||e[38]!==R||e[39]!==w?(L=o.jsxs(he,{children:[w,$,R]}),e[37]=$,e[38]=R,e[39]=w,e[40]=L):L=e[40],L}function vr(t){const e=C.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=pr(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx(zn,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(jr,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const yr=eo("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Sr(t){const e=C.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=M(yr({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function wr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=M("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function Nr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=M("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const Sn=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Cr(t){const e=C.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=Co(r);if(!l.isAuthenticated){let d;return e[2]!==l.supportsOAuth||e[3]!==i?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(ko,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(Io,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=d):d=e[4],d}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx(kr,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function kr({toolName:t,connectionId:e}){const s=Wt().location.href,{replayId:i}=to({strict:!1}),r=(()=>{if(!i)return null;const _=`replay-${i}`,O=sessionStorage.getItem(_);if(!O)return null;sessionStorage.removeItem(_);try{return JSON.parse(O)}catch{return null}})(),l=(()=>{if(!r)return null;const _={};for(const[O,P]of Object.entries(r))P!==null&&typeof P=="object"?_[O]=JSON.stringify(P,null,2):_[O]=P;return _})(),[c,a]=k.useState(l??{}),[d,u]=k.useState(r?JSON.stringify(r,null,2):"{}"),[f,m]=k.useState(null),[h,p]=k.useState(null),[x,g]=k.useState(!1),[b,j]=k.useState(null),{org:y}=G(),S=lt(e),v=ne({connectionId:e,orgId:y.id}),w=nn({client:v}),N=w.data?.tools?.find(_=>_.name===t),T=N?.inputSchema?.properties,E=T?Object.keys(T):[],$=E.length>0,R={};if($&&N?.inputSchema?.properties)for(const _ of E)R[_]=N.inputSchema.required?.includes(_)?"":void 0;const L=_=>Object.prototype.hasOwnProperty.call(c,_),I=async()=>{g(!0),p(null),m(null),j(null);const _=performance.now();try{if(!v)throw new Error("MCP client is not available");const O=$?{...R,...c}:(()=>{const H=d.trim();if(!H)return{};const J=JSON.parse(H);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();$&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([H,J])=>{if((J.type==="object"||J.type==="array")&&typeof O[H]=="string")try{O[H]=JSON.parse(O[H])}catch{}});const P=await v.callTool({name:t,arguments:O}),Q=P.structuredContent??P,Z=performance.now(),F=Math.round(Z-_);m(Q);const K=JSON.stringify(Q),B=new TextEncoder().encode(K).length;j({duration:`${F}ms`,bytes:`${B} bytes`,tokens:`~${Math.ceil(B/4)} tokens`,cost:"$0.0000"})}catch(O){const P=O instanceof Error?O.message:String(O);p(P||"Unknown error occurred");const Q=performance.now();j({duration:`${Math.round(Q-_)}ms`})}finally{g(!1)}},A=(_,O)=>{a(P=>({...P,[_]:O}))},W=()=>{m(null),p(null),j(null)},z=N?.name??Sn(t),X=o.jsx(Kn,{children:o.jsxs(Jn,{children:[o.jsx(Pe,{children:o.jsx(nt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps",params:{org:y.slug,project:et},children:"Connections"})})}),o.jsx(st,{}),S&&o.jsxs(o.Fragment,{children:[o.jsx(Pe,{children:o.jsx(nt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps/$connectionId",params:{org:y.slug,project:et,connectionId:e},search:{tab:"tools"},children:S.title})})}),o.jsx(st,{})]}),o.jsx(Pe,{children:o.jsx(Gn,{children:z})})]})});return o.jsxs(he,{breadcrumb:X,children:[o.jsx(Xt,{children:o.jsx(qt,{title:N?.name??Sn(t),url:s,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(at,{icon:S?.icon||null,name:S?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.isLoading?o.jsx(He,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.isSuccess?"ready":w.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:$&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([_,O])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[_,N.inputSchema?.required?.includes(_)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:O.type})]}),O.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:O.description}),O.type==="object"||O.type==="array"?o.jsx(At,{className:"font-mono text-xs",value:L(_)?c[_]??"":R[_]??"",onChange:P=>A(_,P.target.value),placeholder:`Enter ${_} as JSON...`,rows:3}):O.type==="boolean"?o.jsxs(Hn,{value:L(_)?String(c[_]??""):"",onValueChange:P=>A(_,P==="true"),children:[o.jsx(Vn,{children:o.jsx(Un,{placeholder:"Select true or false..."})}),o.jsxs(Bn,{children:[o.jsx(tt,{value:"true",children:"true"}),o.jsx(tt,{value:"false",children:"false"})]})]}):o.jsx(Gt,{value:L(_)?c[_]??"":R[_]??"",onChange:P=>A(_,P.target.value),placeholder:`Enter ${_}...`})]},_)):N?.inputSchema&&!$?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(At,{className:"font-mono text-xs min-h-[120px]",value:d,onChange:_=>u(_.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),b&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(So,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ls,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(us,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(Y,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:I,disabled:x,children:x?o.jsxs(o.Fragment,{children:[o.jsx(He,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(tn,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(Qt,{children:o.jsxs(Zt,{children:[o.jsx(Yt,{asChild:!0,children:o.jsx(Y,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:W,disabled:!f&&!h,children:o.jsx(ct,{size:14})})}),o.jsx(en,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),h&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(Sr,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(yo,{className:"h-4 w-4"}),o.jsx(wr,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(Nr,{className:"text-xs text-destructive",children:h})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:f?o.jsxs(o.Fragment,{children:[o.jsx(Le,{code:JSON.stringify(f,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(Y,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(f,null,2)),On.success("Copied to clipboard")},children:o.jsx(No,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(wo,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function Ir(t){const e=C.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=pe(i).connectionId;if(!lt(l)||!l){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(He,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let d;return e[3]!==l||e[4]!==s||e[5]!==n?(d=o.jsx(k.Suspense,{fallback:a,children:o.jsx(Cr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const wn=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(h=>h(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},an=(t=>t?wn(t):wn),_r=t=>t;function Mt(t,e=_r){const n=q.useSyncExternalStore(t.subscribe,q.useCallback(()=>e(t.getState()),[t,e]),q.useCallback(()=>e(t.getInitialState()),[t,e]));return q.useDebugValue(n),n}const Tr=t=>{const e=an(t),n=s=>Mt(e,s);return Object.assign(n,e),n},Er=(t=>Tr);function ps(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Pt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Pt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Pt(s)(n)}}}},$r=(t,e)=>(n,s,i)=>{let r={storage:ps(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const h=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>h;let p;const x=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(S=>{var v;return S((v=s())!=null?v:h)});const y=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:h))||void 0;return Pt(u.getItem.bind(u))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const v=r.migrate(S.state,S.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var v;if(j!==c)return;const[w,N]=S;if(p=r.merge(N,(v=s())!=null?v:h),n(p,!0),w)return f()}).then(()=>{j===c&&(y?.(p,void 0),p=s(),l=!0,d.forEach(S=>S(p)))}).catch(S=>{j===c&&y?.(void 0,S)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>x(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||x(),p||h},xs=$r,{useSyncExternalStoreWithSelector:Or}=no,Rr=t=>t;function Ar(t,e=Rr,n){const s=Or(t.subscribe,t.getState,t.getInitialState,e,n);return q.useDebugValue(s),s}const Nn=t=>Symbol.iterator in t,Cn=t=>"entries"in t,kn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Pr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Nn(t)&&Nn(e)?Cn(t)&&Cn(e)?kn(t,e):Mr(t,e):kn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Lr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{b4 as te,r as k,o as Zs,s as kt,c as C,j as o,by as Wt,u as G,l as Ys,x as eo,e as pe,a as to,aE as Ye,O as et,t as On,bm as q,bP as no,bQ as so,aH as oo,ar as Ft,au as de,aw as Rn,aI as ro,ap as Ht,aG as io,aJ as An,as as Mn,aP as lo,aQ as co,ax as Pn,aR as ao,bR as Vt,bS as uo,al as fo,bo as mo,ao as po,y as xo,bT as ho,bU as go,bV as Ln}from"./index-oUlshpJJ.js";import{E as Dn}from"./empty-state-BlBaHJ3u.js";import{E as zn}from"./error-boundary-Dk3_bHxS.js";import{d as Ut,u as Bt,f as lt,h as bo}from"./use-connection-CJPryUMd.js";import{u as ne,g as Ve,i as jo}from"./constants-4GzD41KM.js";import{P as qt}from"./index-MzZr0KB3.js";import{F as It,a as vo,b as Kt,d as Jt}from"./form-B3bK9lhs.js";import{I as Gt}from"./input-BTxNeBOO.js";import{T as At}from"./textarea-BNPURYr9.js";import{b as Wn,V as Xt,a as he}from"./layout-D-svMqBO.js";import{S as Fn}from"./save-actions-BdnWXMVf.js";import{c as M,B as Y}from"./button-DlMEAXru.js";import{S as Hn,a as Vn,b as Un,c as Bn,d as tt}from"./select-Duopl7P2.js";import{c as Qt,T as Zt,a as Yt,b as en,i as qn}from"./tooltip-BnwJ5PQp.js";import{i as yo}from"./AlertCircle-DiL2HrFE.js";import{s as So}from"./Clock-BeB-7xuQ.js";import{i as wo}from"./Code01-DnUALMy9.js";import{a as No}from"./Copy01-BZzZvWHY.js";import{i as He}from"./Loading01-1Zu_WpPr.js";import{i as tn}from"./Play-CahYnURS.js";import{s as ct}from"./XClose-BmynBvu4.js";import{B as Kn,a as Jn,b as Pe,d as nt,e as st,c as Gn}from"./breadcrumb-DM1tOdpW.js";import{u as Co,O as ko,M as Io,F as _o,v as To}from"./index-DjF4GflS.js";import{d as nn,b as sn,a as on}from"./use-mcp-tools-Dj4ni5D7.js";import{I as at}from"./integration-icon-CTPrN73-.js";import{M as Le,n as Eo,S as $o,a as Oo}from"./scroll-area-30X2y975.js";import{E as rn}from"./empty-state-BkmlXyqb.js";import{n as Ro}from"./Container-BGGgIzJh.js";import{b as Xn}from"./use-virtual-mcp-BzAB1Jwk.js";import{b as Ao,a as jn,R as Mo}from"./resizable-zYSMb8PO.js";import{B as me}from"./badge-D4AHLMOm.js";import{S as dt}from"./spinner--6L1PAKk.js";import{V as Po}from"./collection-table-wrapper-CTR1SyIy.js";import{N as Lo,S as Do,a as zo,c as Wo,m as Ge,P as Fo,i as Ho,R as Vo,u as Uo,b as Bo,d as vn,E as qo,e as Ko}from"./index-BPtZHCt5.js";import{a as Jo}from"./use-binding-CSl5A5cE.js";import{b as Go,c as Xo,d as Qo,e as Zo,a as Yo,D as er}from"./dialog-Cwnz3LEA.js";import"./index-1CQrZ9Zl.js";import{s as Qn}from"./Plus-CRFHrfK2.js";import{c as Zn}from"./AlertOctagon-2d8rAOd4.js";import{i as ut}from"./Check-B14Bp2E0.js";import{i as tr}from"./DotsHorizontal-C1qTqyiq.js";import{a as nr}from"./Tool01-BY8zBv5Q.js";import{D as sr,a as or,b as rr,c as yn}from"./dropdown-menu-BJqdu9io.js";import{j as ir,R as lr,k as cr,l as Yn}from"./use-deco-chat-open-Bj4jxMD7.js";import{i as ar}from"./ChevronRight-IL2oOJI2.js";import"./SearchMd-CZA5t4_M.js";import"./AlertTriangle-VgUX_bsB.js";import"./useMutation-kpLmB8S8.js";import"./Pin01-DJanT9uS.js";import"./use-organization-settings-CMrztk0j.js";import"./label-bLbRV7ZJ.js";import"./index-CeXKeP7Z.js";import"./use-mobile-EmqlWdQN.js";import"./Save01-_XMAksec.js";import"./ChevronDown-DmZAA_RH.js";import"./mcp-oauth-Dj71M6pS.js";import"./File06-6ostm09J.js";import"./Key01-CAUAOxiV.js";import"./constants-PL5hL4qd.js";import"./registry-utils-BJco7Nso.js";import"./extract-connection-data-Cl1h0kax.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-Vj4wJ4IH.js";import"./circle-alert-BU4aPU4k.js";import"./index-2jF2yJ2o.js";import"./useQuery-Do4lYH9e.js";import"./ArrowUp-BjfCYJa6.js";import"./Grid01--gwdVXxp.js";import"./List-BJooyaoM.js";import"./table-DPbr8gQl.js";import"./popover-DK0-mkfJ.js";import"./skeleton-CmCa76Pe.js";import"./localstorage-keys-z-WZ22Zi.js";import"./use-mcp-prompts-Sqkswu5s.js";import"./usage-B8eRkRZY.js";import"./Edit01-CA_byL8x.js";import"./Users03-DcEKYrkA.js";import"./XCircle-BUqdRo4A.js";import"./ArrowLeft-Br1qiDir.js";import"./use-copy-DELXo_w6.js";import"./use-create-virtual-mcp-CEbxqW61.js";import"./marked.esm-BaswSlok.js";import"./markdown-CgNryeyO.js";import"./tools-list-D2XTdfAR.js";import"./card-BJlwqw9P.js";import"./Eye-DuHzxuzN.js";import"./Globe02-DCQdCg-U.js";import"./RefreshCw01-CppBn3YV.js";import"./Trash01-uafi7Ilf.js";import"./binder-c0e82ZKj.js";import"./use-llm-us82LJMh.js";import"./Image01-CHvGzt2y.js";import"./RefreshCcw01-DuNb9sh9.js";import"./Settings01-CmfD9-kk.js";import"./useSuspenseInfiniteQuery-8nf2pI1w.js";import"./infiniteQueryObserver-CzTbTGuU.js";const es=te("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const ts=te("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ln=te("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const cn=te("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const dr=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const ur=te("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const fr=te("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ns=te("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ss=te("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const os=te("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const mr=te("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const rs=te("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const is=te("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),ls=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));ls.displayName="Box";const cs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));cs.displayName="ClockFastForward";const as=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));as.displayName="Code02";const Xe=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Xe.displayName="Columns01";const ds=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));ds.displayName="CornerDownRight";const us=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));us.displayName="Database01";const fs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));fs.displayName="GitBranch01";const ms=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));ms.displayName="Repeat03";Zs({title:kt().min(1),description:kt().nullable(),body:kt()});function _t(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function pr(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function xr(t){const e=C.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(It,{control:n.control,name:"title",render:br}),o.jsx(It,{control:n.control,name:"description",render:gr})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(It,{control:n.control,name:"body",render:hr})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let d;return e[10]!==n||e[11]!==a?(d=o.jsx(vo,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function hr(t){const{field:e}=t;return o.jsx(Kt,{children:o.jsx(Jt,{children:o.jsx(At,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function gr(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function br(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function jr(t){const e=C.c(41),{providerId:n,promptId:s}=t,r=Wt().location.href,{org:l}=G(),c=n||null;let a;e[0]!==l.id||e[1]!==c?(a={connectionId:c,orgId:l.id},e[0]=l.id,e[1]=c,e[2]=a):a=e[2];const d=ne(a),u=Ut(n,"PROMPT",s,d),f=Bt(n,"PROMPT",d),m=f.update.isPending;let h;e[3]!==u?(h=u?{title:u.title,description:u.description??null,body:_t(u)}:void 0,e[3]=u,e[4]=h):h=e[4];let p;e[5]!==h?(p={values:h},e[5]=h,e[6]=p):p=e[6];const x=Ys(p);let g;e[7]!==x||e[8]!==u?(g=()=>{u&&x.reset({title:u.title,description:u.description??null,body:_t(u)})},e[7]=x,e[8]=u,e[9]=g):g=e[9];const b=g;let j;e[10]!==f.update||e[11]!==x||e[12]!==s?(j=x.handleSubmit(async I=>{const A=await f.update.mutateAsync({id:s,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});x.reset({title:A.title,description:A.description??null,body:_t(A)})}),e[10]=f.update,e[11]=x,e[12]=s,e[13]=j):j=e[13];const y=j;if(!u){let I;return e[14]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=I):I=e[14],I}let S;e[15]!==u.title?(S=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[15]=u.title,e[16]=S):S=e[16];let v;e[17]!==u.description?(v=u.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[17]=u.description,e[18]=v):v=e[18];let w;e[19]!==S||e[20]!==v?(w=o.jsx(Wn,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[S,v]})}),e[19]=S,e[20]=v,e[21]=w):w=e[21];let N;e[22]!==y?(N=()=>{y()},e[22]=y,e[23]=N):N=e[23];let T;e[24]!==x.formState.isDirty||e[25]!==m||e[26]!==b||e[27]!==N?(T=o.jsx(Fn,{onSave:N,onUndo:b,isDirty:x.formState.isDirty,isSaving:m}),e[24]=x.formState.isDirty,e[25]=m,e[26]=b,e[27]=N,e[28]=T):T=e[28];let E;e[29]!==u.title||e[30]!==r?(E=o.jsx(qt,{title:u.title,url:r,icon:"description"}),e[29]=u.title,e[30]=r,e[31]=E):E=e[31];let $;e[32]!==T||e[33]!==E?($=o.jsxs(Xt,{children:[T,E]}),e[32]=T,e[33]=E,e[34]=$):$=e[34];let R;e[35]!==x?(R=o.jsx("div",{className:"h-full",children:o.jsx(xr,{form:x})}),e[35]=x,e[36]=R):R=e[36];let L;return e[37]!==$||e[38]!==R||e[39]!==w?(L=o.jsxs(he,{children:[w,$,R]}),e[37]=$,e[38]=R,e[39]=w,e[40]=L):L=e[40],L}function vr(t){const e=C.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=pr(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx(zn,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(jr,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const yr=eo("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Sr(t){const e=C.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=M(yr({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function wr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=M("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function Nr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=M("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const Sn=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Cr(t){const e=C.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=Co(r);if(!l.isAuthenticated){let d;return e[2]!==l.supportsOAuth||e[3]!==i?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(ko,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(Io,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=d):d=e[4],d}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx(kr,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function kr({toolName:t,connectionId:e}){const s=Wt().location.href,{replayId:i}=to({strict:!1}),r=(()=>{if(!i)return null;const _=`replay-${i}`,O=sessionStorage.getItem(_);if(!O)return null;sessionStorage.removeItem(_);try{return JSON.parse(O)}catch{return null}})(),l=(()=>{if(!r)return null;const _={};for(const[O,P]of Object.entries(r))P!==null&&typeof P=="object"?_[O]=JSON.stringify(P,null,2):_[O]=P;return _})(),[c,a]=k.useState(l??{}),[d,u]=k.useState(r?JSON.stringify(r,null,2):"{}"),[f,m]=k.useState(null),[h,p]=k.useState(null),[x,g]=k.useState(!1),[b,j]=k.useState(null),{org:y}=G(),S=lt(e),v=ne({connectionId:e,orgId:y.id}),w=nn({client:v}),N=w.data?.tools?.find(_=>_.name===t),T=N?.inputSchema?.properties,E=T?Object.keys(T):[],$=E.length>0,R={};if($&&N?.inputSchema?.properties)for(const _ of E)R[_]=N.inputSchema.required?.includes(_)?"":void 0;const L=_=>Object.prototype.hasOwnProperty.call(c,_),I=async()=>{g(!0),p(null),m(null),j(null);const _=performance.now();try{if(!v)throw new Error("MCP client is not available");const O=$?{...R,...c}:(()=>{const H=d.trim();if(!H)return{};const J=JSON.parse(H);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();$&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([H,J])=>{if((J.type==="object"||J.type==="array")&&typeof O[H]=="string")try{O[H]=JSON.parse(O[H])}catch{}});const P=await v.callTool({name:t,arguments:O}),Q=P.structuredContent??P,Z=performance.now(),F=Math.round(Z-_);m(Q);const K=JSON.stringify(Q),B=new TextEncoder().encode(K).length;j({duration:`${F}ms`,bytes:`${B} bytes`,tokens:`~${Math.ceil(B/4)} tokens`,cost:"$0.0000"})}catch(O){const P=O instanceof Error?O.message:String(O);p(P||"Unknown error occurred");const Q=performance.now();j({duration:`${Math.round(Q-_)}ms`})}finally{g(!1)}},A=(_,O)=>{a(P=>({...P,[_]:O}))},W=()=>{m(null),p(null),j(null)},z=N?.name??Sn(t),X=o.jsx(Kn,{children:o.jsxs(Jn,{children:[o.jsx(Pe,{children:o.jsx(nt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps",params:{org:y.slug,project:et},children:"Connections"})})}),o.jsx(st,{}),S&&o.jsxs(o.Fragment,{children:[o.jsx(Pe,{children:o.jsx(nt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps/$connectionId",params:{org:y.slug,project:et,connectionId:e},search:{tab:"tools"},children:S.title})})}),o.jsx(st,{})]}),o.jsx(Pe,{children:o.jsx(Gn,{children:z})})]})});return o.jsxs(he,{breadcrumb:X,children:[o.jsx(Xt,{children:o.jsx(qt,{title:N?.name??Sn(t),url:s,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(at,{icon:S?.icon||null,name:S?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.isLoading?o.jsx(He,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.isSuccess?"ready":w.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:$&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([_,O])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[_,N.inputSchema?.required?.includes(_)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:O.type})]}),O.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:O.description}),O.type==="object"||O.type==="array"?o.jsx(At,{className:"font-mono text-xs",value:L(_)?c[_]??"":R[_]??"",onChange:P=>A(_,P.target.value),placeholder:`Enter ${_} as JSON...`,rows:3}):O.type==="boolean"?o.jsxs(Hn,{value:L(_)?String(c[_]??""):"",onValueChange:P=>A(_,P==="true"),children:[o.jsx(Vn,{children:o.jsx(Un,{placeholder:"Select true or false..."})}),o.jsxs(Bn,{children:[o.jsx(tt,{value:"true",children:"true"}),o.jsx(tt,{value:"false",children:"false"})]})]}):o.jsx(Gt,{value:L(_)?c[_]??"":R[_]??"",onChange:P=>A(_,P.target.value),placeholder:`Enter ${_}...`})]},_)):N?.inputSchema&&!$?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(At,{className:"font-mono text-xs min-h-[120px]",value:d,onChange:_=>u(_.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),b&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(So,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ls,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(us,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(Y,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:I,disabled:x,children:x?o.jsxs(o.Fragment,{children:[o.jsx(He,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(tn,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(Qt,{children:o.jsxs(Zt,{children:[o.jsx(Yt,{asChild:!0,children:o.jsx(Y,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:W,disabled:!f&&!h,children:o.jsx(ct,{size:14})})}),o.jsx(en,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),h&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(Sr,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(yo,{className:"h-4 w-4"}),o.jsx(wr,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(Nr,{className:"text-xs text-destructive",children:h})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:f?o.jsxs(o.Fragment,{children:[o.jsx(Le,{code:JSON.stringify(f,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(Y,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(f,null,2)),On.success("Copied to clipboard")},children:o.jsx(No,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(wo,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function Ir(t){const e=C.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=pe(i).connectionId;if(!lt(l)||!l){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(He,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let d;return e[3]!==l||e[4]!==s||e[5]!==n?(d=o.jsx(k.Suspense,{fallback:a,children:o.jsx(Cr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const wn=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(h=>h(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},an=(t=>t?wn(t):wn),_r=t=>t;function Mt(t,e=_r){const n=q.useSyncExternalStore(t.subscribe,q.useCallback(()=>e(t.getState()),[t,e]),q.useCallback(()=>e(t.getInitialState()),[t,e]));return q.useDebugValue(n),n}const Tr=t=>{const e=an(t),n=s=>Mt(e,s);return Object.assign(n,e),n},Er=(t=>Tr);function ps(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Pt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Pt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Pt(s)(n)}}}},$r=(t,e)=>(n,s,i)=>{let r={storage:ps(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const h=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>h;let p;const x=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(S=>{var v;return S((v=s())!=null?v:h)});const y=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:h))||void 0;return Pt(u.getItem.bind(u))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const v=r.migrate(S.state,S.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var v;if(j!==c)return;const[w,N]=S;if(p=r.merge(N,(v=s())!=null?v:h),n(p,!0),w)return f()}).then(()=>{j===c&&(y?.(p,void 0),p=s(),l=!0,d.forEach(S=>S(p)))}).catch(S=>{j===c&&y?.(void 0,S)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>x(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||x(),p||h},xs=$r,{useSyncExternalStoreWithSelector:Or}=no,Rr=t=>t;function Ar(t,e=Rr,n){const s=Or(t.subscribe,t.getState,t.getInitialState,e,n);return q.useDebugValue(s),s}const Nn=t=>Symbol.iterator in t,Cn=t=>"entries"in t,kn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Pr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Nn(t)&&Nn(e)?Cn(t)&&Cn(e)?kn(t,e):Mr(t,e):kn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Lr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([d,u])=>{const f=c.has(d)?"":"?";return`${u.description?` /** ${u.description} */
3
3
  `:""} ${d}${f}: ${n(u)};`}).join(`
4
4
  `)}
@@ -23,4 +23,4 @@ export default async function(input: Input): Promise<Output> {
23
23
  return {
24
24
  result: input,
25
25
  };
26
- }`;s(n.name,{action:{...n.action,transformCode:E}}),l(lc)},e[2]=m,e[3]=n.action,e[4]=n.name,e[5]=s,e[6]=h):h=e[6];const p=h;let x;e[7]!==n.action||e[8]!==n.name||e[9]!==s?(x=(T,E)=>{s(n.name,{action:{...n.action,transformCode:T},...E?{outputSchema:E}:{}})},e[7]=n.action,e[8]=n.name,e[9]=s,e[10]=x):x=e[10];const g=x;if("code"in n.action&&n.action.code)return null;const b=r?"flex-1 min-h-0 overflow-hidden":"shrink-0";let j;e[11]!==b?(j=M("flex flex-col flex-1 min-h-0 overflow-hidden border-b border-border",b),e[11]=b,e[12]=j):j=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Transform Code"}),e[13]=y):y=e[13];let S;e[14]!==r?(S=o.jsxs("div",{className:"flex items-center justify-between",children:[y,r?o.jsx(cn,{size:14,className:"text-muted-foreground"}):o.jsx(ln,{size:14,className:"text-muted-foreground"})]}),e[14]=r,e[15]=S):S=e[15];let v;e[16]!==S||e[17]!==p?(v=o.jsx("div",{className:"p-5 shrink-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:p,children:S}),e[16]=S,e[17]=p,e[18]=v):v=e[18];let w;e[19]!==g||e[20]!==r||e[21]!==n.name||e[22]!==i||e[23]!==u?(w=r&&o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(Le,{code:u,language:"typescript",readOnly:i!==void 0,onSave:g,height:"100%"},`transform-code-${n.name}-${i}`)}),e[19]=g,e[20]=r,e[21]=n.name,e[22]=i,e[23]=u,e[24]=w):w=e[24];let N;return e[25]!==j||e[26]!==v||e[27]!==w?(N=o.jsxs("div",{className:j,children:[v,w]}),e[25]=j,e[26]=v,e[27]=w,e[28]=N):N=e[28],N}function lc(t){return!t}function cc(t){return!t}function ac(t){const e=C.c(24),{step:n}=t,[s,i]=k.useState(!1),{updateStep:r}=ee(),l="code"in n.action&&n.action.code?n.action.code:null,c=U();let a;e[0]!==n.action||e[1]!==n.name||e[2]!==r?(a=(j,y)=>{r(n.name,{action:{...n.action,code:j},...y?{outputSchema:y}:{}})},e[0]=n.action,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const d=a;if(!l)return null;const u=s?"flex-1 min-h-0 overflow-hidden":"shrink-0";let f;e[4]!==u?(f=M("flex flex-col border-b border-border",u),e[4]=u,e[5]=f):f=e[5];let m;e[6]!==s?(m=()=>i(!s),e[6]=s,e[7]=m):m=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Step Code"}),e[8]=h):h=e[8];let p;e[9]!==s?(p=o.jsxs("div",{className:"flex items-center justify-between",children:[h,s?o.jsx(cn,{size:14,className:"text-muted-foreground"}):o.jsx(ln,{size:14,className:"text-muted-foreground"})]}),e[9]=s,e[10]=p):p=e[10];let x;e[11]!==m||e[12]!==p?(x=o.jsx("div",{className:"p-5 shrink-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:m,children:p}),e[11]=m,e[12]=p,e[13]=x):x=e[13];let g;e[14]!==l||e[15]!==d||e[16]!==s||e[17]!==n.name||e[18]!==c?(g=s&&o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(Le,{onSave:(j,y)=>d(j,y),code:l,language:"typescript",height:"100%",readOnly:c!==void 0},`step-code-${n.name}-${c}`)}),e[14]=l,e[15]=d,e[16]=s,e[17]=n.name,e[18]=c,e[19]=g):g=e[19];let b;return e[20]!==f||e[21]!==x||e[22]!==g?(b=o.jsxs("div",{className:f,children:[x,g]}),e[20]=f,e[21]=x,e[22]=g,e[23]=b):b=e[23],b}function Qe(t){if(Array.isArray(t.type))return t.type.map(n=>Qe({...t,type:n})).join(" | ");switch(t.type){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"array":return t.items?`${Qe(t.items)}[]`:"unknown[]";case"object":return t.properties?`{ ${Object.entries(t.properties).map(([s,i])=>{const r=Qe(i),l=!t.required?.includes(s);return`${s}${l?"?":""}: ${r}`}).join("; ")} }`:"Record<string, unknown>";case"null":return"null";default:return"unknown"}}function dc(t){switch(t){case"success":return o.jsxs(me,{variant:"success",className:"gap-1",children:[o.jsx(ut,{size:11}),"Success"]});case"error":case"failed":return o.jsxs(me,{variant:"destructive",className:"gap-1",children:[o.jsx(Zn,{size:11}),"Error"]});case"running":return o.jsxs(me,{variant:"secondary",className:"gap-1",children:[o.jsx(Xe,{size:11}),"Running"]});case"enqueued":return o.jsxs(me,{variant:"secondary",className:"gap-1",children:[o.jsx(Xe,{size:11}),"On hold"]});case"cancelled":return o.jsxs(me,{variant:"secondary",className:"gap-1",children:[o.jsx(qn,{size:11}),"Cancelled"]});default:return o.jsxs(me,{variant:"secondary",className:"gap-1",children:[o.jsx(Xe,{size:11}),t]})}}function uc(t){return`Run #${t.slice(-4).toUpperCase()}`}function fc(t){const e=C.c(21),{className:n}=t,{executions:s,isLoading:i}=Qr(),{setShowExecutionsList:r}=dn(),{setTrackingExecutionId:l}=ee(),c=U();let a;e[0]!==l?(a=y=>{l(y)},e[0]=l,e[1]=a):a=e[1];const d=a;let u;e[2]!==r?(u=()=>{r(!1)},e[2]=r,e[3]=u):u=e[3];const f=u;let m;e[4]!==n?(m=M("flex flex-col h-full bg-sidebar border-l border-border",n),e[4]=n,e[5]=m):m=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("p",{className:"flex-1 text-base font-medium text-foreground",children:"Runs"}),e[6]=h):h=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(qn,{size:11}),e[7]=p):p=e[7];let x;e[8]!==f?(x=o.jsxs("div",{className:"flex items-center h-12 px-5 border-b border-border shrink-0",children:[h,o.jsx(Y,{variant:"ghost",size:"icon",className:"size-7",onClick:f,children:p})]}),e[8]=f,e[9]=x):x=e[9];let g;e[10]!==s||e[11]!==d||e[12]!==i||e[13]!==c?(g=i?o.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Loading executions..."}):s.map((y,S)=>o.jsx(mc,{execution:y,isSelected:y.id===c,isFirst:S===0,onSelect:()=>d(y.id)},y.id)),e[10]=s,e[11]=d,e[12]=i,e[13]=c,e[14]=g):g=e[14];let b;e[15]!==g?(b=o.jsx("div",{className:"flex-1 overflow-auto",children:g}),e[15]=g,e[16]=b):b=e[16];let j;return e[17]!==m||e[18]!==x||e[19]!==b?(j=o.jsxs("div",{className:m,children:[x,b]}),e[17]=m,e[18]=x,e[19]=b,e[20]=j):j=e[20],j}function mc(t){const e=C.c(17),{execution:n,isSelected:s,isFirst:i,onSelect:r}=t,l=s&&"bg-accent/50",c=i&&s&&"bg-accent/50",a=!s&&"hover:bg-accent/30";let d;e[0]!==l||e[1]!==c||e[2]!==a?(d=M("flex flex-col justify-center h-[60px] px-4 border-b border-border cursor-pointer transition-colors",l,c,a),e[0]=l,e[1]=c,e[2]=a,e[3]=d):d=e[3];let u;e[4]!==n.status?(u=dc(n.status),e[4]=n.status,e[5]=u):u=e[5];let f;e[6]!==n.id?(f=uc(n.id),e[6]=n.id,e[7]=f):f=e[7];let m;e[8]!==f?(m=o.jsx("p",{className:"flex-1 text-base font-medium text-foreground",children:f}),e[8]=f,e[9]=m):m=e[9];let h;e[10]!==u||e[11]!==m?(h=o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[u,m]}),e[10]=u,e[11]=m,e[12]=h):h=e[12];let p;return e[13]!==r||e[14]!==d||e[15]!==h?(p=o.jsx("div",{className:d,onClick:r,children:h}),e[13]=r,e[14]=d,e[15]=h,e[16]=p):p=e[16],p}const Ze=new Map,pc=["COLLECTION_WORKFLOW_EXECUTION_LIST","COLLECTION_WORKFLOW_EXECUTION_GET","COLLECTION_WORKFLOW_EXECUTION_GET_STEP_RESULT"],zt=["workflow.execution.created","workflow.execution.resumed","workflow.step.execute","workflow.step.completed"],xc=500;function hc(t){for(const e of t.queryClients)e.invalidateQueries({predicate:n=>n.queryKey.some(s=>typeof s=="string"&&pc.includes(s))})}function gc(t){t.debounceTimer===null&&(t.debounceTimer=setTimeout(()=>{t.debounceTimer=null,hc(t)},xc))}function bc(t){let e=Ze.get(t);if(!e){const n=`/org/${t}/watch?types=workflow.*`,s=new EventSource(n);e={es:s,refCount:0,queryClients:new Set,debounceTimer:null},Ze.set(t,e);const i=()=>gc(e);for(const r of zt)s.addEventListener(r,i);s.onerror=()=>{s.readyState===EventSource.CLOSED&&(e.debounceTimer!==null&&clearTimeout(e.debounceTimer),Ze.delete(t))}}return e}const $n=()=>0;function jc(){const t=C.c(3),{org:e}=G(),n=xo(),s=e.id;let i;t[0]!==s||t[1]!==n?(i=l=>{const c=bc(s);c.refCount=c.refCount+1,c.queryClients.add(n);const a=()=>l();for(const d of zt)c.es.addEventListener(d,a);return()=>{for(const d of zt)c.es.removeEventListener(d,a);c.queryClients.delete(n),c.refCount=c.refCount-1,c.refCount<=0&&(c.debounceTimer!==null&&clearTimeout(c.debounceTimer),c.es.close(),Ze.delete(s))}},t[0]=s,t[1]=n,t[2]=i):i=t[2];const r=i;k.useSyncExternalStore(r,$n,$n)}function qs(t){const e=C.c(11),{itemId:n}=t,[s,i]=k.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},e[0]=r):r=e[0];const{connectionId:l}=pe(r),c=l??"no-connection",{org:a}=G(),d=l??null;let u;e[1]!==a.id||e[2]!==d?(u={connectionId:d,orgId:a.id},e[1]=a.id,e[2]=d,e[3]=u):u=e[3];const f=ne(u),m=Ut(c,"WORKFLOW",n,f),h=Bt(c,"WORKFLOW",f);let p;e[4]!==h||e[5]!==n?(p=async b=>{i(!0),await h.update.mutateAsync({id:n,data:b}).finally(()=>{i(!1)})},e[4]=h,e[5]=n,e[6]=p):p=e[6];const x=p;let g;return e[7]!==s||e[8]!==m||e[9]!==x?(g={item:m,update:x,isUpdating:s},e[7]=s,e[8]=m,e[9]=x,e[10]=g):g=e[10],g}function vc(t){const e=C.c(18),{workflow:n,onUpdate:s}=t,{setWorkflow:i}=ee();let r,l,c,a;if(e[0]!==n.description||e[1]!==n.id||e[2]!==n.steps||e[3]!==n.title){const f={title:n.title,description:n.description,steps:n.steps};r=Le,l=`workflow-${n.id}`,c="100%",a=JSON.stringify(f,null,2),e[0]=n.description,e[1]=n.id,e[2]=n.steps,e[3]=n.title,e[4]=r,e[5]=l,e[6]=c,e[7]=a}else r=e[4],l=e[5],c=e[6],a=e[7];let d;e[8]!==s||e[9]!==i||e[10]!==n?(d=f=>{const m=JSON.parse(f);i({...n,...m}),s(m)},e[8]=s,e[9]=i,e[10]=n,e[11]=d):d=e[11];let u;return e[12]!==r||e[13]!==l||e[14]!==c||e[15]!==a||e[16]!==d?(u=o.jsx(r,{height:c,code:a,language:"json",onSave:d},l),e[12]=r,e[13]=l,e[14]=c,e[15]=a,e[16]=d,e[17]=u):u=e[17],u}function yc(){const t=C.c(9),e=U(),{item:n}=fe(e),s=n?.start_at_epoch_ms,i=n?.completed_at_epoch_ms,r=n?.status==="running"&&s&&!i;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=Date.now(),t[0]=l):l=t[0];const c=k.useRef(l);let a;t[1]!==r?(a=x=>{if(!r)return Sc;const g=setInterval(()=>{c.current=Date.now(),x()},50);return()=>clearInterval(g)},t[1]=r,t[2]=a):a=t[2];const d=a;let u;t[3]!==r?(u=()=>r?c.current:0,t[3]=r,t[4]=u):u=t[4];const f=u,m=k.useSyncExternalStore(d,f,f),h=i&&s?Math.max(0,i-s):null;let p=null;if(s){let x;t[5]!==s?(x=new Date(s).getTime(),t[5]=s,t[6]=x):x=t[6];const g=x;if(i){let b;t[7]!==i?(b=new Date(i).getTime(),t[7]=i,t[8]=b):b=t[8],p=Math.max(0,b-g)}else r&&(p=Math.max(0,m-g))}return p??h}function Sc(){}function wc(t){if(t<1e3)return`${t}ms`;const e=t/1e3,n=e%60,s=Math.floor(e/60),i=s%60,r=Math.floor(s/60);return r>0?`${r}h ${i}m ${n.toFixed(3)}s`:i>0?`${i}m ${n.toFixed(3)}s`:`${n.toFixed(3)}s`}function Nc(){const t=C.c(26),{setTrackingExecutionId:e}=ee(),n=U(),{item:s}=fe(n),i=yc();let r;t[0]!==i?(r=i!=null?wc(i):null,t[0]=i,t[1]=r):r=t[1];const l=r,c=s?.status,a=c==="error"||c==="failed",d=c==="success";let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex items-center justify-center h-full w-12",children:o.jsx(ho,{className:"w-4 h-4 text-muted-foreground"})}),t[2]=u):u=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("strong",{className:"text-base text-foreground",children:"Run"}),t[3]=f):f=t[3];let m;t[4]!==n?(m=o.jsxs("p",{className:"flex gap-3 items-center h-full",children:[f,o.jsxs("span",{className:"text-sm text-muted-foreground",children:["#",n]})]}),t[4]=n,t[5]=m):m=t[5];let h;t[6]!==d?(h=d&&o.jsxs(me,{variant:"success",className:"gap-1 ml-3",children:[o.jsx(go,{size:11}),"Success"]}),t[6]=d,t[7]=h):h=t[7];let p;t[8]!==a?(p=a&&o.jsxs(me,{variant:"destructive",className:"gap-1 ml-3",children:[o.jsx(mr,{size:11}),"Failed"]}),t[8]=a,t[9]=p):p=t[9];let x;t[10]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(dr,{className:"w-4 h-4 text-muted-foreground"}),t[10]=x):x=t[10];let g;t[11]!==l?(g=o.jsxs("div",{className:"flex items-center gap-1 ml-6",children:[x,o.jsx("span",{className:"text-sm text-muted-foreground",children:l})]}),t[11]=l,t[12]=g):g=t[12];let b;t[13]!==m||t[14]!==h||t[15]!==p||t[16]!==g?(b=o.jsxs("div",{className:"flex items-center h-full",children:[u,m,h,p,g]}),t[13]=m,t[14]=h,t[15]=p,t[16]=g,t[17]=b):b=t[17];let j;t[18]!==e?(j=()=>e(void 0),t[18]=e,t[19]=j):j=t[19];let y;t[20]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(Vt,{className:"w-4 h-4 text-muted-foreground"}),t[20]=y):y=t[20];let S;t[21]!==j?(S=o.jsx(Y,{variant:"ghost",size:"xs",onClick:j,children:y}),t[21]=j,t[22]=S):S=t[22];let v;return t[23]!==S||t[24]!==b?(v=o.jsx("div",{className:"flex flex-col border-b border-border",children:o.jsxs("div",{className:"h-10 bg-accent flex items-center justify-between",children:[b,S]})}),t[23]=S,t[24]=b,t[25]=v):v=t[25],v}function Cc(){const t=C.c(15);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const{itemId:n}=pe(e);let s;t[1]!==n?(s={itemId:n},t[1]=n,t[2]=s):s=t[2];const{item:i,update:r,isUpdating:l}=qs(s);let c;t[3]!==i?(c=JSON.stringify(i),t[3]=i,t[4]=c):c=t[4];const a=c;if(!i){let m;return t[5]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(he,{children:o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(rn,{icon:o.jsx(ss,{className:"w-10 h-10 text-muted-foreground"}),title:"Workflow not found",description:"This workflow may have been deleted or you may not have access to it."})})}),t[5]=m):m=t[5],m}let d;t[6]!==i?(d={workflow:i,trackingExecutionId:void 0,currentStepTab:"input"},t[6]=i,t[7]=d):d=t[7];let u;t[8]!==l||t[9]!==r?(u=o.jsx(kc,{onUpdate:r,isUpdating:l}),t[8]=l,t[9]=r,t[10]=u):u=t[10];let f;return t[11]!==a||t[12]!==d||t[13]!==u?(f=o.jsx(Wr,{initialState:d,children:u},a),t[11]=a,t[12]=d,t[13]=u,t[14]=f):f=t[14],f}function kc(t){const e=C.c(21),{onUpdate:n,isUpdating:s}=t;jc();const i=De(),r=U(),{viewMode:l,showExecutionsList:c}=dn(),a=Be();let d;e[0]!==n||e[1]!==i?(d=async()=>{await n(i)},e[0]=n,e[1]=i,e[2]=d):d=e[2];const u=d,f=a&&"toolName"in a.action,m=f?a.action.toolName:null,h=f&&!m&&!r,p=!h&&(a||r||!c);let x;e[3]!==u||e[4]!==s||e[5]!==i.description||e[6]!==i.title?(x=o.jsx(sl,{title:i.title,description:i.description,onSave:u,isSaving:s}),e[3]=u,e[4]=s,e[5]=i.description,e[6]=i.title,e[7]=x):x=e[7];let g;e[8]!==r?(g=r&&o.jsx(Nc,{}),e[8]=r,e[9]=g):g=e[9];let b;e[10]!==n||e[11]!==c||e[12]!==p||e[13]!==h||e[14]!==l||e[15]!==i?(b=o.jsx("div",{className:"flex-1 overflow-hidden",children:l==="code"?o.jsx(vc,{workflow:i,onUpdate:n}):o.jsxs(Ao,{direction:"horizontal",className:"flex w-full h-full",children:[o.jsx(jn,{defaultSize:50,minSize:30,children:o.jsx(Sl,{})}),o.jsx(Mo,{}),o.jsxs(jn,{defaultSize:50,minSize:25,children:[h&&o.jsx(Cl,{className:"border-l border-border"}),c&&o.jsx(fc,{}),p&&o.jsx(Gl,{className:"border-l border-border"})]})]})}),e[10]=n,e[11]=c,e[12]=p,e[13]=h,e[14]=l,e[15]=i,e[16]=b):b=e[16];let j;return e[17]!==x||e[18]!==g||e[19]!==b?(j=o.jsx(he,{children:o.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:[x,g,b]})}),e[17]=x,e[18]=g,e[19]=b,e[20]=j):j=e[20],j}function Ic(t){const e=C.c(6),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},e[0]=s):s=e[0];const{connectionId:i}=pe(s),r=i??"no-connection",{org:l}=G(),c=i??null;let a;e[1]!==l.id||e[2]!==c?(a={connectionId:c,orgId:l.id},e[1]=l.id,e[2]=c,e[3]=a):a=e[3];const d=ne(a),u=Ut(r,"WORKFLOW_EXECUTION",n,d);let f;return e[4]!==u?(f={item:u},e[4]=u,e[5]=f):f=e[5],f}function _c(){const t=C.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const{itemId:n}=pe(e);let s;t[1]!==n?(s={itemId:n},t[1]=n,t[2]=s):s=t[2];const{item:i}=Ic(s);if(!i){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(he,{children:o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(rn,{icon:o.jsx(ss,{className:"w-10 h-10 text-muted-foreground"}),title:"Workflow execution not found",description:"This workflow execution may have been deleted or you may not have access to it."})})}),t[3]=c):c=t[3],c}let r;t[4]!==i?(r=JSON.stringify(i,null,2),t[4]=i,t[5]=r):r=t[5];let l;return t[6]!==r?(l=o.jsx(he,{children:o.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:o.jsx(Le,{height:"100%",code:r,language:"json",readOnly:!0})})}),t[6]=r,t[7]=l):l=t[7],l}const Tc={workflow:Cc,workflow_execution:_c,prompt:vr};function Ec(){const t=C.c(6),e=Ln();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=n):n=t[0];const s=pe(n),i=decodeURIComponent(s.itemId);let r;t[1]!==e.history?(r=()=>{e.history.back()},t[1]=e.history,t[2]=r):r=t[2];const l=r,c=$c;let a;return t[3]!==l||t[4]!==i?(a=o.jsx(Ir,{itemId:i,onBack:l,onUpdate:c}),t[3]=l,t[4]=i,t[5]=a):a=t[5],a}async function $c(t){return Promise.resolve()}function Oc(t){return t.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Rc(){const t=C.c(38),e=Ln();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=n):n=t[0];const s=pe(n),i=s.connectionId,r=decodeURIComponent(s.collectionName),l=decodeURIComponent(s.itemId);let c;t[1]!==e.history?(c=()=>{e.history.back()},t[1]=e.history,t[2]=c):c=t[2];const a=c,d=i??"no-connection",{org:u}=G(),f=lt(i),m=i??null;let h;t[3]!==u.id||t[4]!==m?(h={connectionId:m,orgId:u.id},t[3]=u.id,t[4]=m,t[5]=h):h=t[5];const p=ne(h),x=Bt(d,r,p);let g;t[6]!==x||t[7]!==l?(g=async z=>{l&&await x.update.mutateAsync({id:l,data:z})},t[6]=x,t[7]=l,t[8]=g):g=t[8];const b=g;let j;t[9]!==r?(j=r?.toLowerCase(),t[9]=r,t[10]=j):j=t[10];const y=j,S=y&&Tc[y];let v;t[11]!==r?(v=Oc(r),t[11]=r,t[12]=v):v=t[12];const w=v;let N;t[13]!==u.slug?(N=o.jsx(Pe,{children:o.jsx(nt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps",params:{org:u.slug,project:et},children:"Connections"})})}),t[13]=u.slug,t[14]=N):N=t[14];let T;t[15]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(st,{}),t[15]=T):T=t[15];let E;t[16]!==r||t[17]!==f||t[18]!==i||t[19]!==u.slug?(E=f&&o.jsxs(o.Fragment,{children:[o.jsx(Pe,{children:o.jsx(nt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps/$connectionId",params:{org:u.slug,project:et,connectionId:i},search:{tab:r},children:f.title})})}),o.jsx(st,{})]}),t[16]=r,t[17]=f,t[18]=i,t[19]=u.slug,t[20]=E):E=t[20];let $;t[21]!==w?($=o.jsx(Pe,{children:o.jsx(Gn,{children:w})}),t[21]=w,t[22]=$):$=t[22];let R;t[23]!==$||t[24]!==N||t[25]!==E?(R=o.jsx(Kn,{children:o.jsxs(Jn,{children:[N,T,E,$]})}),t[23]=$,t[24]=N,t[25]=E,t[26]=R):R=t[26];const L=R;if(S){let z;return t[27]!==S||t[28]!==a||t[29]!==b||t[30]!==l?(z=o.jsx(S,{itemId:l,onBack:a,onUpdate:b}),t[27]=S,t[28]=a,t[29]=b,t[30]=l,t[31]=z):z=t[31],z}let I;t[32]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx(Ro,{size:36,className:"text-muted-foreground"}),t[32]=I):I=t[32];let A;t[33]!==a?(A=o.jsx(rn,{icon:I,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:a,children:"Go back"}}),t[33]=a,t[34]=A):A=t[34];let W;return t[35]!==L||t[36]!==A?(W=o.jsx(he,{breadcrumb:L,children:A}),t[35]=L,t[36]=A,t[37]=W):W=t[37],W}function Ac(){const t=C.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const n=pe(e);if(decodeURIComponent(n.collectionName)==="tools"){let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Ec,{}),t[1]=l):l=t[1],l}let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Rc,{}),t[2]=r):r=t[2],r}function Nd(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(zn,{children:o.jsx(k.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(He,{size:32,className:"animate-spin text-muted-foreground"})}),children:o.jsx(Ac,{})})}),t[0]=e):e=t[0],e}export{Nd as default};
26
+ }`;s(n.name,{action:{...n.action,transformCode:E}}),l(lc)},e[2]=m,e[3]=n.action,e[4]=n.name,e[5]=s,e[6]=h):h=e[6];const p=h;let x;e[7]!==n.action||e[8]!==n.name||e[9]!==s?(x=(T,E)=>{s(n.name,{action:{...n.action,transformCode:T},...E?{outputSchema:E}:{}})},e[7]=n.action,e[8]=n.name,e[9]=s,e[10]=x):x=e[10];const g=x;if("code"in n.action&&n.action.code)return null;const b=r?"flex-1 min-h-0 overflow-hidden":"shrink-0";let j;e[11]!==b?(j=M("flex flex-col flex-1 min-h-0 overflow-hidden border-b border-border",b),e[11]=b,e[12]=j):j=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Transform Code"}),e[13]=y):y=e[13];let S;e[14]!==r?(S=o.jsxs("div",{className:"flex items-center justify-between",children:[y,r?o.jsx(cn,{size:14,className:"text-muted-foreground"}):o.jsx(ln,{size:14,className:"text-muted-foreground"})]}),e[14]=r,e[15]=S):S=e[15];let v;e[16]!==S||e[17]!==p?(v=o.jsx("div",{className:"p-5 shrink-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:p,children:S}),e[16]=S,e[17]=p,e[18]=v):v=e[18];let w;e[19]!==g||e[20]!==r||e[21]!==n.name||e[22]!==i||e[23]!==u?(w=r&&o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(Le,{code:u,language:"typescript",readOnly:i!==void 0,onSave:g,height:"100%"},`transform-code-${n.name}-${i}`)}),e[19]=g,e[20]=r,e[21]=n.name,e[22]=i,e[23]=u,e[24]=w):w=e[24];let N;return e[25]!==j||e[26]!==v||e[27]!==w?(N=o.jsxs("div",{className:j,children:[v,w]}),e[25]=j,e[26]=v,e[27]=w,e[28]=N):N=e[28],N}function lc(t){return!t}function cc(t){return!t}function ac(t){const e=C.c(24),{step:n}=t,[s,i]=k.useState(!1),{updateStep:r}=ee(),l="code"in n.action&&n.action.code?n.action.code:null,c=U();let a;e[0]!==n.action||e[1]!==n.name||e[2]!==r?(a=(j,y)=>{r(n.name,{action:{...n.action,code:j},...y?{outputSchema:y}:{}})},e[0]=n.action,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const d=a;if(!l)return null;const u=s?"flex-1 min-h-0 overflow-hidden":"shrink-0";let f;e[4]!==u?(f=M("flex flex-col border-b border-border",u),e[4]=u,e[5]=f):f=e[5];let m;e[6]!==s?(m=()=>i(!s),e[6]=s,e[7]=m):m=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Step Code"}),e[8]=h):h=e[8];let p;e[9]!==s?(p=o.jsxs("div",{className:"flex items-center justify-between",children:[h,s?o.jsx(cn,{size:14,className:"text-muted-foreground"}):o.jsx(ln,{size:14,className:"text-muted-foreground"})]}),e[9]=s,e[10]=p):p=e[10];let x;e[11]!==m||e[12]!==p?(x=o.jsx("div",{className:"p-5 shrink-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:m,children:p}),e[11]=m,e[12]=p,e[13]=x):x=e[13];let g;e[14]!==l||e[15]!==d||e[16]!==s||e[17]!==n.name||e[18]!==c?(g=s&&o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(Le,{onSave:(j,y)=>d(j,y),code:l,language:"typescript",height:"100%",readOnly:c!==void 0},`step-code-${n.name}-${c}`)}),e[14]=l,e[15]=d,e[16]=s,e[17]=n.name,e[18]=c,e[19]=g):g=e[19];let b;return e[20]!==f||e[21]!==x||e[22]!==g?(b=o.jsxs("div",{className:f,children:[x,g]}),e[20]=f,e[21]=x,e[22]=g,e[23]=b):b=e[23],b}function Qe(t){if(Array.isArray(t.type))return t.type.map(n=>Qe({...t,type:n})).join(" | ");switch(t.type){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"array":return t.items?`${Qe(t.items)}[]`:"unknown[]";case"object":return t.properties?`{ ${Object.entries(t.properties).map(([s,i])=>{const r=Qe(i),l=!t.required?.includes(s);return`${s}${l?"?":""}: ${r}`}).join("; ")} }`:"Record<string, unknown>";case"null":return"null";default:return"unknown"}}function dc(t){switch(t){case"success":return o.jsxs(me,{variant:"success",className:"gap-1",children:[o.jsx(ut,{size:11}),"Success"]});case"error":case"failed":return o.jsxs(me,{variant:"destructive",className:"gap-1",children:[o.jsx(Zn,{size:11}),"Error"]});case"running":return o.jsxs(me,{variant:"secondary",className:"gap-1",children:[o.jsx(Xe,{size:11}),"Running"]});case"enqueued":return o.jsxs(me,{variant:"secondary",className:"gap-1",children:[o.jsx(Xe,{size:11}),"On hold"]});case"cancelled":return o.jsxs(me,{variant:"secondary",className:"gap-1",children:[o.jsx(qn,{size:11}),"Cancelled"]});default:return o.jsxs(me,{variant:"secondary",className:"gap-1",children:[o.jsx(Xe,{size:11}),t]})}}function uc(t){return`Run #${t.slice(-4).toUpperCase()}`}function fc(t){const e=C.c(21),{className:n}=t,{executions:s,isLoading:i}=Qr(),{setShowExecutionsList:r}=dn(),{setTrackingExecutionId:l}=ee(),c=U();let a;e[0]!==l?(a=y=>{l(y)},e[0]=l,e[1]=a):a=e[1];const d=a;let u;e[2]!==r?(u=()=>{r(!1)},e[2]=r,e[3]=u):u=e[3];const f=u;let m;e[4]!==n?(m=M("flex flex-col h-full bg-sidebar border-l border-border",n),e[4]=n,e[5]=m):m=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("p",{className:"flex-1 text-base font-medium text-foreground",children:"Runs"}),e[6]=h):h=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(qn,{size:11}),e[7]=p):p=e[7];let x;e[8]!==f?(x=o.jsxs("div",{className:"flex items-center h-12 px-5 border-b border-border shrink-0",children:[h,o.jsx(Y,{variant:"ghost",size:"icon",className:"size-7",onClick:f,children:p})]}),e[8]=f,e[9]=x):x=e[9];let g;e[10]!==s||e[11]!==d||e[12]!==i||e[13]!==c?(g=i?o.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Loading executions..."}):s.map((y,S)=>o.jsx(mc,{execution:y,isSelected:y.id===c,isFirst:S===0,onSelect:()=>d(y.id)},y.id)),e[10]=s,e[11]=d,e[12]=i,e[13]=c,e[14]=g):g=e[14];let b;e[15]!==g?(b=o.jsx("div",{className:"flex-1 overflow-auto",children:g}),e[15]=g,e[16]=b):b=e[16];let j;return e[17]!==m||e[18]!==x||e[19]!==b?(j=o.jsxs("div",{className:m,children:[x,b]}),e[17]=m,e[18]=x,e[19]=b,e[20]=j):j=e[20],j}function mc(t){const e=C.c(17),{execution:n,isSelected:s,isFirst:i,onSelect:r}=t,l=s&&"bg-accent/50",c=i&&s&&"bg-accent/50",a=!s&&"hover:bg-accent/30";let d;e[0]!==l||e[1]!==c||e[2]!==a?(d=M("flex flex-col justify-center h-[60px] px-4 border-b border-border cursor-pointer transition-colors",l,c,a),e[0]=l,e[1]=c,e[2]=a,e[3]=d):d=e[3];let u;e[4]!==n.status?(u=dc(n.status),e[4]=n.status,e[5]=u):u=e[5];let f;e[6]!==n.id?(f=uc(n.id),e[6]=n.id,e[7]=f):f=e[7];let m;e[8]!==f?(m=o.jsx("p",{className:"flex-1 text-base font-medium text-foreground",children:f}),e[8]=f,e[9]=m):m=e[9];let h;e[10]!==u||e[11]!==m?(h=o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[u,m]}),e[10]=u,e[11]=m,e[12]=h):h=e[12];let p;return e[13]!==r||e[14]!==d||e[15]!==h?(p=o.jsx("div",{className:d,onClick:r,children:h}),e[13]=r,e[14]=d,e[15]=h,e[16]=p):p=e[16],p}const Ze=new Map,pc=["COLLECTION_WORKFLOW_EXECUTION_LIST","COLLECTION_WORKFLOW_EXECUTION_GET","COLLECTION_WORKFLOW_EXECUTION_GET_STEP_RESULT"],zt=["workflow.execution.created","workflow.execution.resumed","workflow.step.execute","workflow.step.completed"],xc=500;function hc(t){for(const e of t.queryClients)e.invalidateQueries({predicate:n=>n.queryKey.some(s=>typeof s=="string"&&pc.includes(s))})}function gc(t){t.debounceTimer===null&&(t.debounceTimer=setTimeout(()=>{t.debounceTimer=null,hc(t)},xc))}function bc(t){let e=Ze.get(t);if(!e){const n=`/org/${t}/watch?types=workflow.*`,s=new EventSource(n);e={es:s,refCount:0,queryClients:new Set,debounceTimer:null},Ze.set(t,e);const i=()=>gc(e);for(const r of zt)s.addEventListener(r,i);s.onerror=()=>{s.readyState===EventSource.CLOSED&&(e.debounceTimer!==null&&clearTimeout(e.debounceTimer),Ze.delete(t))}}return e}const $n=()=>0;function jc(){const t=C.c(3),{org:e}=G(),n=xo(),s=e.id;let i;t[0]!==s||t[1]!==n?(i=l=>{const c=bc(s);c.refCount=c.refCount+1,c.queryClients.add(n);const a=()=>l();for(const d of zt)c.es.addEventListener(d,a);return()=>{for(const d of zt)c.es.removeEventListener(d,a);c.queryClients.delete(n),c.refCount=c.refCount-1,c.refCount<=0&&(c.debounceTimer!==null&&clearTimeout(c.debounceTimer),c.es.close(),Ze.delete(s))}},t[0]=s,t[1]=n,t[2]=i):i=t[2];const r=i;k.useSyncExternalStore(r,$n,$n)}function qs(t){const e=C.c(11),{itemId:n}=t,[s,i]=k.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},e[0]=r):r=e[0];const{connectionId:l}=pe(r),c=l??"no-connection",{org:a}=G(),d=l??null;let u;e[1]!==a.id||e[2]!==d?(u={connectionId:d,orgId:a.id},e[1]=a.id,e[2]=d,e[3]=u):u=e[3];const f=ne(u),m=Ut(c,"WORKFLOW",n,f),h=Bt(c,"WORKFLOW",f);let p;e[4]!==h||e[5]!==n?(p=async b=>{i(!0),await h.update.mutateAsync({id:n,data:b}).finally(()=>{i(!1)})},e[4]=h,e[5]=n,e[6]=p):p=e[6];const x=p;let g;return e[7]!==s||e[8]!==m||e[9]!==x?(g={item:m,update:x,isUpdating:s},e[7]=s,e[8]=m,e[9]=x,e[10]=g):g=e[10],g}function vc(t){const e=C.c(18),{workflow:n,onUpdate:s}=t,{setWorkflow:i}=ee();let r,l,c,a;if(e[0]!==n.description||e[1]!==n.id||e[2]!==n.steps||e[3]!==n.title){const f={title:n.title,description:n.description,steps:n.steps};r=Le,l=`workflow-${n.id}`,c="100%",a=JSON.stringify(f,null,2),e[0]=n.description,e[1]=n.id,e[2]=n.steps,e[3]=n.title,e[4]=r,e[5]=l,e[6]=c,e[7]=a}else r=e[4],l=e[5],c=e[6],a=e[7];let d;e[8]!==s||e[9]!==i||e[10]!==n?(d=f=>{const m=JSON.parse(f);i({...n,...m}),s(m)},e[8]=s,e[9]=i,e[10]=n,e[11]=d):d=e[11];let u;return e[12]!==r||e[13]!==l||e[14]!==c||e[15]!==a||e[16]!==d?(u=o.jsx(r,{height:c,code:a,language:"json",onSave:d},l),e[12]=r,e[13]=l,e[14]=c,e[15]=a,e[16]=d,e[17]=u):u=e[17],u}function yc(){const t=C.c(9),e=U(),{item:n}=fe(e),s=n?.start_at_epoch_ms,i=n?.completed_at_epoch_ms,r=n?.status==="running"&&s&&!i;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=Date.now(),t[0]=l):l=t[0];const c=k.useRef(l);let a;t[1]!==r?(a=x=>{if(!r)return Sc;const g=setInterval(()=>{c.current=Date.now(),x()},50);return()=>clearInterval(g)},t[1]=r,t[2]=a):a=t[2];const d=a;let u;t[3]!==r?(u=()=>r?c.current:0,t[3]=r,t[4]=u):u=t[4];const f=u,m=k.useSyncExternalStore(d,f,f),h=i&&s?Math.max(0,i-s):null;let p=null;if(s){let x;t[5]!==s?(x=new Date(s).getTime(),t[5]=s,t[6]=x):x=t[6];const g=x;if(i){let b;t[7]!==i?(b=new Date(i).getTime(),t[7]=i,t[8]=b):b=t[8],p=Math.max(0,b-g)}else r&&(p=Math.max(0,m-g))}return p??h}function Sc(){}function wc(t){if(t<1e3)return`${t}ms`;const e=t/1e3,n=e%60,s=Math.floor(e/60),i=s%60,r=Math.floor(s/60);return r>0?`${r}h ${i}m ${n.toFixed(3)}s`:i>0?`${i}m ${n.toFixed(3)}s`:`${n.toFixed(3)}s`}function Nc(){const t=C.c(26),{setTrackingExecutionId:e}=ee(),n=U(),{item:s}=fe(n),i=yc();let r;t[0]!==i?(r=i!=null?wc(i):null,t[0]=i,t[1]=r):r=t[1];const l=r,c=s?.status,a=c==="error"||c==="failed",d=c==="success";let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex items-center justify-center h-full w-12",children:o.jsx(ho,{className:"w-4 h-4 text-muted-foreground"})}),t[2]=u):u=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("strong",{className:"text-base text-foreground",children:"Run"}),t[3]=f):f=t[3];let m;t[4]!==n?(m=o.jsxs("p",{className:"flex gap-3 items-center h-full",children:[f,o.jsxs("span",{className:"text-sm text-muted-foreground",children:["#",n]})]}),t[4]=n,t[5]=m):m=t[5];let h;t[6]!==d?(h=d&&o.jsxs(me,{variant:"success",className:"gap-1 ml-3",children:[o.jsx(go,{size:11}),"Success"]}),t[6]=d,t[7]=h):h=t[7];let p;t[8]!==a?(p=a&&o.jsxs(me,{variant:"destructive",className:"gap-1 ml-3",children:[o.jsx(mr,{size:11}),"Failed"]}),t[8]=a,t[9]=p):p=t[9];let x;t[10]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(dr,{className:"w-4 h-4 text-muted-foreground"}),t[10]=x):x=t[10];let g;t[11]!==l?(g=o.jsxs("div",{className:"flex items-center gap-1 ml-6",children:[x,o.jsx("span",{className:"text-sm text-muted-foreground",children:l})]}),t[11]=l,t[12]=g):g=t[12];let b;t[13]!==m||t[14]!==h||t[15]!==p||t[16]!==g?(b=o.jsxs("div",{className:"flex items-center h-full",children:[u,m,h,p,g]}),t[13]=m,t[14]=h,t[15]=p,t[16]=g,t[17]=b):b=t[17];let j;t[18]!==e?(j=()=>e(void 0),t[18]=e,t[19]=j):j=t[19];let y;t[20]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(Vt,{className:"w-4 h-4 text-muted-foreground"}),t[20]=y):y=t[20];let S;t[21]!==j?(S=o.jsx(Y,{variant:"ghost",size:"xs",onClick:j,children:y}),t[21]=j,t[22]=S):S=t[22];let v;return t[23]!==S||t[24]!==b?(v=o.jsx("div",{className:"flex flex-col border-b border-border",children:o.jsxs("div",{className:"h-10 bg-accent flex items-center justify-between",children:[b,S]})}),t[23]=S,t[24]=b,t[25]=v):v=t[25],v}function Cc(){const t=C.c(15);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const{itemId:n}=pe(e);let s;t[1]!==n?(s={itemId:n},t[1]=n,t[2]=s):s=t[2];const{item:i,update:r,isUpdating:l}=qs(s);let c;t[3]!==i?(c=JSON.stringify(i),t[3]=i,t[4]=c):c=t[4];const a=c;if(!i){let m;return t[5]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(he,{children:o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(rn,{icon:o.jsx(ss,{className:"w-10 h-10 text-muted-foreground"}),title:"Workflow not found",description:"This workflow may have been deleted or you may not have access to it."})})}),t[5]=m):m=t[5],m}let d;t[6]!==i?(d={workflow:i,trackingExecutionId:void 0,currentStepTab:"input"},t[6]=i,t[7]=d):d=t[7];let u;t[8]!==l||t[9]!==r?(u=o.jsx(kc,{onUpdate:r,isUpdating:l}),t[8]=l,t[9]=r,t[10]=u):u=t[10];let f;return t[11]!==a||t[12]!==d||t[13]!==u?(f=o.jsx(Wr,{initialState:d,children:u},a),t[11]=a,t[12]=d,t[13]=u,t[14]=f):f=t[14],f}function kc(t){const e=C.c(21),{onUpdate:n,isUpdating:s}=t;jc();const i=De(),r=U(),{viewMode:l,showExecutionsList:c}=dn(),a=Be();let d;e[0]!==n||e[1]!==i?(d=async()=>{await n(i)},e[0]=n,e[1]=i,e[2]=d):d=e[2];const u=d,f=a&&"toolName"in a.action,m=f?a.action.toolName:null,h=f&&!m&&!r,p=!h&&(a||r||!c);let x;e[3]!==u||e[4]!==s||e[5]!==i.description||e[6]!==i.title?(x=o.jsx(sl,{title:i.title,description:i.description,onSave:u,isSaving:s}),e[3]=u,e[4]=s,e[5]=i.description,e[6]=i.title,e[7]=x):x=e[7];let g;e[8]!==r?(g=r&&o.jsx(Nc,{}),e[8]=r,e[9]=g):g=e[9];let b;e[10]!==n||e[11]!==c||e[12]!==p||e[13]!==h||e[14]!==l||e[15]!==i?(b=o.jsx("div",{className:"flex-1 overflow-hidden",children:l==="code"?o.jsx(vc,{workflow:i,onUpdate:n}):o.jsxs(Ao,{direction:"horizontal",className:"flex w-full h-full",children:[o.jsx(jn,{defaultSize:50,minSize:30,children:o.jsx(Sl,{})}),o.jsx(Mo,{}),o.jsxs(jn,{defaultSize:50,minSize:25,children:[h&&o.jsx(Cl,{className:"border-l border-border"}),c&&o.jsx(fc,{}),p&&o.jsx(Gl,{className:"border-l border-border"})]})]})}),e[10]=n,e[11]=c,e[12]=p,e[13]=h,e[14]=l,e[15]=i,e[16]=b):b=e[16];let j;return e[17]!==x||e[18]!==g||e[19]!==b?(j=o.jsx(he,{children:o.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:[x,g,b]})}),e[17]=x,e[18]=g,e[19]=b,e[20]=j):j=e[20],j}function Ic(t){const e=C.c(6),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},e[0]=s):s=e[0];const{connectionId:i}=pe(s),r=i??"no-connection",{org:l}=G(),c=i??null;let a;e[1]!==l.id||e[2]!==c?(a={connectionId:c,orgId:l.id},e[1]=l.id,e[2]=c,e[3]=a):a=e[3];const d=ne(a),u=Ut(r,"WORKFLOW_EXECUTION",n,d);let f;return e[4]!==u?(f={item:u},e[4]=u,e[5]=f):f=e[5],f}function _c(){const t=C.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const{itemId:n}=pe(e);let s;t[1]!==n?(s={itemId:n},t[1]=n,t[2]=s):s=t[2];const{item:i}=Ic(s);if(!i){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(he,{children:o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(rn,{icon:o.jsx(ss,{className:"w-10 h-10 text-muted-foreground"}),title:"Workflow execution not found",description:"This workflow execution may have been deleted or you may not have access to it."})})}),t[3]=c):c=t[3],c}let r;t[4]!==i?(r=JSON.stringify(i,null,2),t[4]=i,t[5]=r):r=t[5];let l;return t[6]!==r?(l=o.jsx(he,{children:o.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:o.jsx(Le,{height:"100%",code:r,language:"json",readOnly:!0})})}),t[6]=r,t[7]=l):l=t[7],l}const Tc={workflow:Cc,workflow_execution:_c,prompt:vr};function Ec(){const t=C.c(6),e=Ln();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=n):n=t[0];const s=pe(n),i=decodeURIComponent(s.itemId);let r;t[1]!==e.history?(r=()=>{e.history.back()},t[1]=e.history,t[2]=r):r=t[2];const l=r,c=$c;let a;return t[3]!==l||t[4]!==i?(a=o.jsx(Ir,{itemId:i,onBack:l,onUpdate:c}),t[3]=l,t[4]=i,t[5]=a):a=t[5],a}async function $c(t){return Promise.resolve()}function Oc(t){return t.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Rc(){const t=C.c(38),e=Ln();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=n):n=t[0];const s=pe(n),i=s.connectionId,r=decodeURIComponent(s.collectionName),l=decodeURIComponent(s.itemId);let c;t[1]!==e.history?(c=()=>{e.history.back()},t[1]=e.history,t[2]=c):c=t[2];const a=c,d=i??"no-connection",{org:u}=G(),f=lt(i),m=i??null;let h;t[3]!==u.id||t[4]!==m?(h={connectionId:m,orgId:u.id},t[3]=u.id,t[4]=m,t[5]=h):h=t[5];const p=ne(h),x=Bt(d,r,p);let g;t[6]!==x||t[7]!==l?(g=async z=>{l&&await x.update.mutateAsync({id:l,data:z})},t[6]=x,t[7]=l,t[8]=g):g=t[8];const b=g;let j;t[9]!==r?(j=r?.toLowerCase(),t[9]=r,t[10]=j):j=t[10];const y=j,S=y&&Tc[y];let v;t[11]!==r?(v=Oc(r),t[11]=r,t[12]=v):v=t[12];const w=v;let N;t[13]!==u.slug?(N=o.jsx(Pe,{children:o.jsx(nt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps",params:{org:u.slug,project:et},children:"Connections"})})}),t[13]=u.slug,t[14]=N):N=t[14];let T;t[15]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(st,{}),t[15]=T):T=t[15];let E;t[16]!==r||t[17]!==f||t[18]!==i||t[19]!==u.slug?(E=f&&o.jsxs(o.Fragment,{children:[o.jsx(Pe,{children:o.jsx(nt,{asChild:!0,children:o.jsx(Ye,{to:"/$org/$project/mcps/$connectionId",params:{org:u.slug,project:et,connectionId:i},search:{tab:r},children:f.title})})}),o.jsx(st,{})]}),t[16]=r,t[17]=f,t[18]=i,t[19]=u.slug,t[20]=E):E=t[20];let $;t[21]!==w?($=o.jsx(Pe,{children:o.jsx(Gn,{children:w})}),t[21]=w,t[22]=$):$=t[22];let R;t[23]!==$||t[24]!==N||t[25]!==E?(R=o.jsx(Kn,{children:o.jsxs(Jn,{children:[N,T,E,$]})}),t[23]=$,t[24]=N,t[25]=E,t[26]=R):R=t[26];const L=R;if(S){let z;return t[27]!==S||t[28]!==a||t[29]!==b||t[30]!==l?(z=o.jsx(S,{itemId:l,onBack:a,onUpdate:b}),t[27]=S,t[28]=a,t[29]=b,t[30]=l,t[31]=z):z=t[31],z}let I;t[32]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx(Ro,{size:36,className:"text-muted-foreground"}),t[32]=I):I=t[32];let A;t[33]!==a?(A=o.jsx(rn,{icon:I,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:a,children:"Go back"}}),t[33]=a,t[34]=A):A=t[34];let W;return t[35]!==L||t[36]!==A?(W=o.jsx(he,{breadcrumb:L,children:A}),t[35]=L,t[36]=A,t[37]=W):W=t[37],W}function Ac(){const t=C.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const n=pe(e);if(decodeURIComponent(n.collectionName)==="tools"){let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Ec,{}),t[1]=l):l=t[1],l}let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Rc,{}),t[2]=r):r=t[2],r}function Cd(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(zn,{children:o.jsx(k.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(He,{size:32,className:"animate-spin text-muted-foreground"})}),children:o.jsx(Ac,{})})}),t[0]=e):e=t[0],e}export{Cd as default};
@@ -1 +1 @@
1
- import{c as Ae,j as t,b as Ye,d as Ze,u as et,r as tt,O as $e,t as st}from"./index-Bunb17vv.js";import{g as Oe}from"./generate-id-Dyweu44Y.js";import{a as ot,C as Fe}from"./collection-table-wrapper-aNY90kKS.js";import{C as it,E as nt}from"./empty-state-DNFU252E.js";import{C as rt}from"./card-BMSXwRZK.js";import{I as ke}from"./integration-icon-D9Lac1Wz.js";import{D as Ke,a as Ue,b as Le,c as k}from"./dropdown-menu-DTV9aWPi.js";import{B as Ie}from"./button-B5dhenVQ.js";import{a as Be}from"./Copy01-DH2d5VIk.js";import{i as Re}from"./DotsVertical-CeT-zlQ9.js";import{i as Ve}from"./Edit01-LXqrrmB1.js";import{s as Ge}from"./Eye-VVPfHR4D.js";import{s as Je}from"./Trash01-lACkPNMB.js";import{E as ze}from"./empty-state-C2LxutXw.js";import{n as Ee}from"./Inbox01-C0b_GP1p.js";import{U as lt,u as at}from"./use-list-state-D5zjpWht.js";import{B as ct}from"./constants-CvNkH2U9.js";import{A as dt,g as pt,c as mt,b as ut,d as ft,e as ht,a as xt,f as gt}from"./alert-dialog-DXvpuu2v.js";import{u as jt,e as Ct}from"./use-connection-CP6jP6nm.js";import{u as vt}from"./constants-DPkAIN6Z.js";import{s as bt}from"./Plus-DP2vmrEk.js";import{V as yt}from"./layout-D99bjGJH.js";function Nt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function wt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=Nt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(ke,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:At,onMouseDown:_t,children:t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Dt,children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:St,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Ge,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(rt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}function At(n){return n.stopPropagation()}const It=["icon","avatar","logo"],Me=["created_at","created_by","id"];function Pt(n){return Object.keys(n).find(e=>It.includes(e.toLowerCase()))}function We(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Tt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Mt:l,x=j===void 0?"asc":j,P=o===void 0?Et:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?zt:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter(Ot).filter(M=>!w||w.includes(M.id)).map($t):We(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Fe,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(wt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(ot,{columns:Kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function $t(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Ot(n){return n.sortable!==!1}function zt(){}function Et(){}function Mt(){}function Ft(n){return{id:"actions",header:"",render:e=>t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ge,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function kt(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=Pt(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Me.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Me)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(ke,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(lt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function Kt(n,e,s,r){const i=n||kt(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Ft(r)]:i}function cs(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??ct,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Ye(),{data:f}=Ze.useSession(),d=f?.user?.id||"unknown",{org:c}=et();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=vt(C),a=jt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=at(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=Ct(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:Oe("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=tt.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const qe=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:qe},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){st.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:Oe("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=We(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,Qe=p&&Pe,Xe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(bt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Fe,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=Qe&&Te;let R;e[55]!==B||e[56]!==je?(R=t.jsxs(yt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=R):R=e[57];const Ce=`Search ${l}...`;let V;e[58]!==v?(V=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=V):V=e[59];let G;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==V?(G=t.jsx(it,{value:x,onChange:v,placeholder:Ce,onKeyDown:V}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=V,e[64]=G):G=e[64];let J;e[65]!==F?(J=F??[],e[65]=F,e[66]=J):J=e[66];const ve=z;let W;e[67]!==$?(W=g=>$(g),e[67]=$,e[68]=W):W=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Xe?Te:void 0;let H;e[69]!==be||e[70]!==ye||e[71]!==Ne?(H=t.jsx(nt,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=H):H=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==J||e[82]!==ve||e[83]!==W||e[84]!==H||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Tt,{hideToolbar:!0,data:J,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:W,readOnly:w,emptyState:H})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=J,e[82]=ve,e[83]=W,e[84]=H,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==G||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,q]}),e[87]=G,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(mt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(ut,{children:[de,t.jsxs(ft,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(dt,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(pt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ht,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(xt,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(gt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==R||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[R,Q,se]}),e[109]=R,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{cs as C};
1
+ import{c as Ae,j as t,b as Ye,d as Ze,u as et,r as tt,O as $e,t as st}from"./index-oUlshpJJ.js";import{g as Oe}from"./generate-id-Dyweu44Y.js";import{a as ot,C as Fe}from"./collection-table-wrapper-CTR1SyIy.js";import{C as it,E as nt}from"./empty-state-BlBaHJ3u.js";import{C as rt}from"./card-BJlwqw9P.js";import{I as ke}from"./integration-icon-CTPrN73-.js";import{D as Ke,a as Ue,b as Le,c as k}from"./dropdown-menu-BJqdu9io.js";import{B as Ie}from"./button-DlMEAXru.js";import{a as Be}from"./Copy01-BZzZvWHY.js";import{i as Re}from"./DotsVertical-B-SoXTlv.js";import{i as Ve}from"./Edit01-CA_byL8x.js";import{s as Ge}from"./Eye-DuHzxuzN.js";import{s as Je}from"./Trash01-uafi7Ilf.js";import{E as ze}from"./empty-state-BkmlXyqb.js";import{n as Ee}from"./Inbox01-D__eEiRp.js";import{U as lt,u as at}from"./use-list-state-cJ107QPf.js";import{B as ct}from"./constants-PL5hL4qd.js";import{A as dt,g as pt,c as mt,b as ut,d as ft,e as ht,a as xt,f as gt}from"./alert-dialog-BXLdEhYw.js";import{u as jt,e as Ct}from"./use-connection-CJPryUMd.js";import{u as vt}from"./constants-4GzD41KM.js";import{s as bt}from"./Plus-CRFHrfK2.js";import{V as yt}from"./layout-D-svMqBO.js";function Nt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function wt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=Nt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(ke,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:At,onMouseDown:_t,children:t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Dt,children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:St,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Ge,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(rt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}function At(n){return n.stopPropagation()}const It=["icon","avatar","logo"],Me=["created_at","created_by","id"];function Pt(n){return Object.keys(n).find(e=>It.includes(e.toLowerCase()))}function We(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Tt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Mt:l,x=j===void 0?"asc":j,P=o===void 0?Et:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?zt:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter(Ot).filter(M=>!w||w.includes(M.id)).map($t):We(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Fe,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(wt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(ot,{columns:Kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function $t(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Ot(n){return n.sortable!==!1}function zt(){}function Et(){}function Mt(){}function Ft(n){return{id:"actions",header:"",render:e=>t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ge,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function kt(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=Pt(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Me.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Me)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(ke,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(lt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function Kt(n,e,s,r){const i=n||kt(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Ft(r)]:i}function cs(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??ct,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Ye(),{data:f}=Ze.useSession(),d=f?.user?.id||"unknown",{org:c}=et();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=vt(C),a=jt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=at(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=Ct(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:Oe("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=tt.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const qe=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:qe},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){st.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:Oe("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=We(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,Qe=p&&Pe,Xe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(bt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Fe,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=Qe&&Te;let R;e[55]!==B||e[56]!==je?(R=t.jsxs(yt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=R):R=e[57];const Ce=`Search ${l}...`;let V;e[58]!==v?(V=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=V):V=e[59];let G;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==V?(G=t.jsx(it,{value:x,onChange:v,placeholder:Ce,onKeyDown:V}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=V,e[64]=G):G=e[64];let J;e[65]!==F?(J=F??[],e[65]=F,e[66]=J):J=e[66];const ve=z;let W;e[67]!==$?(W=g=>$(g),e[67]=$,e[68]=W):W=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Xe?Te:void 0;let H;e[69]!==be||e[70]!==ye||e[71]!==Ne?(H=t.jsx(nt,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=H):H=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==J||e[82]!==ve||e[83]!==W||e[84]!==H||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Tt,{hideToolbar:!0,data:J,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:W,readOnly:w,emptyState:H})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=J,e[82]=ve,e[83]=W,e[84]=H,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==G||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,q]}),e[87]=G,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(mt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(ut,{children:[de,t.jsxs(ft,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(dt,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(pt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ht,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(xt,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(gt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==R||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[R,Q,se]}),e[109]=R,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{cs as C};