decocms 2.289.1 → 2.290.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/dist/client/assets/{AlertCircle-DvPnQfC5.js → AlertCircle-BKpPv_ue.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-BKxpVLR_.js → ArrowNarrowLeft-DzI4-MMz.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-CuQjuTVk.js → ArrowUpRight-CgoB9CSG.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-4_rcsB70.js → CheckCircle-_hRmcUCr.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-DfsMdmf4.js → ChevronDown-DgrWziJW.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-CVhRkUc0.js → ChevronRight-DJnGkhn4.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-CD4XJT02.js → ChevronUp-CYzPfn3Y.js} +1 -1
  8. package/dist/client/assets/{Container-BcAiX456.js → Container-CCq3u0Gk.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-e4sJs2sy.js → DotsVertical-om3rzQE9.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-M3Y1_vaI.js → LinkExternal01-DbNOYo2d.js} +1 -1
  11. package/dist/client/assets/{Lock01-_ctwMSEo.js → Lock01-BsLK0x7P.js} +1 -1
  12. package/dist/client/assets/{Palette-BkMTuMlr.js → Palette-CN1aN7Xh.js} +1 -1
  13. package/dist/client/assets/{Play-CrMiqzaH.js → Play-CwsBegSF.js} +1 -1
  14. package/dist/client/assets/{Plus-BR3le3XA.js → Plus-CnK1SC2T.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-BvVeeLFE.js → RefreshCcw01-DESLbhAD.js} +1 -1
  16. package/dist/client/assets/{SearchMd-CnSMs6Gr.js → SearchMd-DlfhE_5j.js} +1 -1
  17. package/dist/client/assets/{Settings02-bYDpmczV.js → Settings02-LVlkEIxI.js} +1 -1
  18. package/dist/client/assets/{Shield01-CMpoeZYl.js → Shield01-DGTwcXqp.js} +1 -1
  19. package/dist/client/assets/{Star01-B5vecVQL.js → Star01-CWHB1ChF.js} +1 -1
  20. package/dist/client/assets/{Sun-wZV-LjB0.js → Sun-1aZYqU86.js} +1 -1
  21. package/dist/client/assets/{Tool01-CuCSRQWJ.js → Tool01-X8GEQ_TP.js} +1 -1
  22. package/dist/client/assets/{Trash01-J7CgYdQ6.js → Trash01-CIUqVsqV.js} +1 -1
  23. package/dist/client/assets/{User01-BgWj-XfO.js → User01-Dds7lT_Z.js} +1 -1
  24. package/dist/client/assets/{Users03-DuJUh6K5.js → Users03-BD0tlSQu.js} +1 -1
  25. package/dist/client/assets/{X-B94SYTq6.js → X-BDxrsCdA.js} +1 -1
  26. package/dist/client/assets/{XCircle-CV0L9GR_.js → XCircle-BJ-0U-0t.js} +1 -1
  27. package/dist/client/assets/{XClose-BDJKoeIM.js → XClose-Bl-2e8QV.js} +1 -1
  28. package/dist/client/assets/{Zap-DbOUQQao.js → Zap-B3a3OZUG.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-BVc4n4iU.js → ZapSquare-Ddm4Ccl_.js} +1 -1
  30. package/dist/client/assets/{accordion-_jHDGcgU.js → accordion-eGw-yxkH.js} +1 -1
  31. package/dist/client/assets/{agent-icon-C6qW6eXG.js → agent-icon-Dhv8pT4N.js} +1 -1
  32. package/dist/client/assets/{agents-list-DQZlBppY.js → agents-list-BoLhMS8b.js} +1 -1
  33. package/dist/client/assets/ai-providers-5Y8Lye7a.js +1 -0
  34. package/dist/client/assets/ai-providers-logos-D6a8kmGH.js +1 -0
  35. package/dist/client/assets/{alert-dialog-DUehP6wO.js → alert-dialog-C5H0at4x.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-Cbr_hZzc.js → auth-catchall-CDaNQLse.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-CE-l0VNu.js → automation-list-row-i8Q9Zh9Z.js} +1 -1
  38. package/dist/client/assets/{automations-C3LxjCxf.js → automations-ulYqPLWi.js} +1 -1
  39. package/dist/client/assets/{avatar-BIm7SPe1.js → avatar-BCAMjlDk.js} +1 -1
  40. package/dist/client/assets/{badge-CtBsPi0r.js → badge-arNIH4S4.js} +1 -1
  41. package/dist/client/assets/{brand-context-CB2HhrLr.js → brand-context-doHsqzeN.js} +1 -1
  42. package/dist/client/assets/{card-BLtPWaiK.js → card-BcKfGMCs.js} +1 -1
  43. package/dist/client/assets/{chat-context-DcUrkBB6.js → chat-context-BgLXGROj.js} +14 -14
  44. package/dist/client/assets/{checkbox-BEdGbH_8.js → checkbox-eCIm2Y45.js} +1 -1
  45. package/dist/client/assets/{collection-detail-CtkPh5nj.js → collection-detail-BIdQmVBg.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-DbKOigBA.js → collection-display-button-31iCSNaH.js} +1 -1
  47. package/dist/client/assets/{collection-search-CEPfUiWA.js → collection-search-CWRKNmnq.js} +1 -1
  48. package/dist/client/assets/{collection-search-BEbLDyCP.js → collection-search-CZEXNAkX.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-B2huksH6.js → collection-table-wrapper-iKnV9U-a.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-QSa5ykeq.js → collection-tabs-BB_C6DLQ.js} +1 -1
  51. package/dist/client/assets/{collections-CF9hrNRd.js → collections-BmZbVrT4.js} +1 -1
  52. package/dist/client/assets/{command-DmhSl-c8.js → command-BXuf0gSd.js} +1 -1
  53. package/dist/client/assets/{connection-card-bmzpIukU.js → connection-card-CaHQAi2l.js} +1 -1
  54. package/dist/client/assets/{connection-detail-DwoYH_6W.js → connection-detail-DtFDjt8X.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-BrmC7SFw.js → connection-form-helpers-D-VsE2HN.js} +1 -1
  56. package/dist/client/assets/{connections-B52vPeyp.js → connections-B0CDxzS1.js} +1 -1
  57. package/dist/client/assets/{constants-DjiHYs3d.js → constants-CBodG1Pl.js} +1 -1
  58. package/dist/client/assets/{constants-Bv-ydthU.js → constants-fZUl7A6B.js} +1 -1
  59. package/dist/client/assets/{dialog-CbDVIhlb.js → dialog-CfIcbBij.js} +1 -1
  60. package/dist/client/assets/{domain-settings-5pXF-wm_.js → domain-settings-Bz-lXZFn.js} +1 -1
  61. package/dist/client/assets/{drawer-BmeDjX1X.js → drawer-D0hdbn63.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-BfGuGlIh.js → dropdown-menu-Cye9zjaV.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout-BodX3cKc.js → dynamic-plugin-layout-DyEJh8Ah.js} +1 -1
  64. package/dist/client/assets/{empty-state-Bmk-UZeD.js → empty-state-Ce0UFiAd.js} +1 -1
  65. package/dist/client/assets/{empty-state-dX7dSbXx.js → empty-state-KsHmVPO4.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-DpnZLfW6.js → extract-connection-data-C_Q81cim.js} +1 -1
  67. package/dist/client/assets/{features-B6zSQU4N.js → features-UEpssbRc.js} +1 -1
  68. package/dist/client/assets/{form-Bp7QYVLp.js → form-Bt1yLlZE.js} +1 -1
  69. package/dist/client/assets/{general-CwdchWiq.js → general-CX6SxsSV.js} +1 -1
  70. package/dist/client/assets/{github-repo-picker-iNFjYstD.js → github-repo-picker-4y_CmSBW.js} +1 -1
  71. package/dist/client/assets/{index-Bren1GGu.js → index-B5IXTINZ.js} +1 -1
  72. package/dist/client/assets/{index-CC820IDY.js → index-BdMwcoDn.js} +1 -1
  73. package/dist/client/assets/{index-EeoXzNpy.js → index-BqvsnDAu.js} +1 -1
  74. package/dist/client/assets/{index-BHs8YvDv.js → index-C1JqC4-z.js} +1 -1
  75. package/dist/client/assets/{index-B0QzmEJF.js → index-Cf59DRJ6.js} +1 -1
  76. package/dist/client/assets/{index-n7SSrZJX.js → index-D7IIXROb.js} +2 -2
  77. package/dist/client/assets/{index-CtxpjU_s.js → index-DP75UHA3.js} +1 -1
  78. package/dist/client/assets/{index-B2N3AyqY.js → index-DTSAQq_o.js} +26 -26
  79. package/dist/client/assets/{index-B5cVztKY.js → index-DU8sxbAO.js} +1 -1
  80. package/dist/client/assets/{index-BsNTGYXY.js → index-DtTftwEv.js} +1 -1
  81. package/dist/client/assets/{infiniteQueryObserver-BvBE16xD.js → infiniteQueryObserver-CYDDJzdR.js} +1 -1
  82. package/dist/client/assets/{input-93auOJA-.js → input-C-zd9-6X.js} +1 -1
  83. package/dist/client/assets/{integration-icon-D1WPsIeS.js → integration-icon-DoWhqWe3.js} +1 -1
  84. package/dist/client/assets/{label-CDWfKnpv.js → label-B9VSuQAr.js} +1 -1
  85. package/dist/client/assets/{layout-ALExO3RM.js → layout-BJjatDlM.js} +1 -1
  86. package/dist/client/assets/{login-Dh8YEJcV.js → login-DMa1Q2q-.js} +1 -1
  87. package/dist/client/assets/{members-B0H2ICnj.js → members-BOugcvjA.js} +1 -1
  88. package/dist/client/assets/{monaco-editor-D2WY7je5.js → monaco-editor-Bo3tZIb0.js} +1 -1
  89. package/dist/client/assets/{monitoring-stats-row-CuznDVqp.js → monitoring-stats-row-B1bACC1V.js} +1 -1
  90. package/dist/client/assets/{oauth-callback-BxmH83JY.js → oauth-callback-CIypIDM5.js} +1 -1
  91. package/dist/client/assets/{oauth-callback-ai-provider-Dji18vK6.js → oauth-callback-ai-provider-Cx6R_dTa.js} +1 -1
  92. package/dist/client/assets/{onboarding-DO-aZIsc.js → onboarding-BqheUOWx.js} +1 -1
  93. package/dist/client/assets/{org-layout-DwQfVG_G.js → org-layout-CZ-JkZR2.js} +1 -1
  94. package/dist/client/assets/{org-plugin-layout-C0Hb_7ZN.js → org-plugin-layout-BrcX-6Wg.js} +1 -1
  95. package/dist/client/assets/{plugin-empty-state-DsKgDNt_.js → plugin-empty-state-DrfwC6PK.js} +1 -1
  96. package/dist/client/assets/{plugin-header-I-VJ7nR-.js → plugin-header-Dv9_QG9M.js} +1 -1
  97. package/dist/client/assets/{plugin-layout-rZ66K3Mj.js → plugin-layout-BYLLm93H.js} +1 -1
  98. package/dist/client/assets/{popover-BlhVdyjC.js → popover-BcJ5dkfy.js} +1 -1
  99. package/dist/client/assets/{profile-ChlGBaRJ.js → profile-BDIFKyuQ.js} +1 -1
  100. package/dist/client/assets/{project-app-view-CxGV0sjn.js → project-app-view-Dmfqsj8y.js} +1 -1
  101. package/dist/client/assets/registry-DWmg34NR.js +2 -0
  102. package/dist/client/assets/{registry-layout-fy1D5wVh.js → registry-layout-CcQfrJPf.js} +1 -1
  103. package/dist/client/assets/{required-auth-layout-D3LKevpJ.js → required-auth-layout-C8vP14ZM.js} +1 -1
  104. package/dist/client/assets/{reset-password-Cl6OUHwF.js → reset-password-Cx8pIjDB.js} +1 -1
  105. package/dist/client/assets/{roles-BZIugQbX.js → roles-V2PuVErH.js} +1 -1
  106. package/dist/client/assets/{scroll-area-DjI8JrA4.js → scroll-area-BJTd57Y3.js} +1 -1
  107. package/dist/client/assets/{search-input-c4tKbop1.js → search-input-o1N12hd4.js} +1 -1
  108. package/dist/client/assets/select-model-i86p2wLu.js +4 -0
  109. package/dist/client/assets/{select-DXPKpbnT.js → select-wye91jBR.js} +1 -1
  110. package/dist/client/assets/{settings-layout-D5262yUh.js → settings-layout-Bre58uB_.js} +1 -1
  111. package/dist/client/assets/{settings-section-BlkGvCu3.js → settings-section-C9gADeUy.js} +1 -1
  112. package/dist/client/assets/{shell-layout-DhpXypjS.js → shell-layout-BkODIfEq.js} +1 -1
  113. package/dist/client/assets/{skeleton-BK_N4aC7.js → skeleton-DRv0yCtF.js} +1 -1
  114. package/dist/client/assets/{sso-BtozqQ30.js → sso-DZp-3maq.js} +1 -1
  115. package/dist/client/assets/{store-DyctnerN.js → store-CN0vQifq.js} +1 -1
  116. package/dist/client/assets/store-registry-BObCKoqP.js +2 -0
  117. package/dist/client/assets/{switch-CrF-gMSq.js → switch-PbUvXBwc.js} +1 -1
  118. package/dist/client/assets/{table-C8OGdLdI.js → table-Vdrlqd3N.js} +1 -1
  119. package/dist/client/assets/{tabs-C_BS-m5A.js → tabs-CMVGP6Nm.js} +1 -1
  120. package/dist/client/assets/{task-status-Cm6Qp7d4.js → task-status-Cc80uZAM.js} +1 -1
  121. package/dist/client/assets/{textarea-Bx9ByRsd.js → textarea-CFCCYt2a.js} +1 -1
  122. package/dist/client/assets/{toggle-group-3sydXp-E.js → toggle-group-C7CndFhA.js} +1 -1
  123. package/dist/client/assets/{tools-list-CBTIdi20.js → tools-list-Kw0AITzg.js} +1 -1
  124. package/dist/client/assets/{types-CZtgPZDT.js → types-CfADcGn6.js} +1 -1
  125. package/dist/client/assets/{use-ai-providers-D498L3pM.js → use-ai-providers-BH0Y2Lij.js} +1 -1
  126. package/dist/client/assets/{use-collections-CtCWr_i-.js → use-collections-BosUNiJP.js} +1 -1
  127. package/dist/client/assets/{use-connection-BNJDlOt9.js → use-connection-BHgGmTOA.js} +1 -1
  128. package/dist/client/assets/{use-copy-CogZRw7t.js → use-copy-D6qOpdpT.js} +1 -1
  129. package/dist/client/assets/{use-create-virtual-mcp-BZbpQ7wy.js → use-create-virtual-mcp-Cx6IqxLi.js} +1 -1
  130. package/dist/client/assets/{use-decopilot-events-CGP9dkEP.js → use-decopilot-events-Bw4kdPRS.js} +1 -1
  131. package/dist/client/assets/{use-delete-connection-DnC4oqeg.js → use-delete-connection-BNbEYahP.js} +1 -1
  132. package/dist/client/assets/{use-infinite-scroll-BDcVHuzE.js → use-infinite-scroll-omTMTmB1.js} +1 -1
  133. package/dist/client/assets/{use-list-state-DhCZMYGi.js → use-list-state-BiBwgFiI.js} +1 -1
  134. package/dist/client/assets/{use-mcp-tools-BtNM-5qj.js → use-mcp-tools-jeaH_mio.js} +1 -1
  135. package/dist/client/assets/{use-members-BhnMtyBX.js → use-members-BR83cmtt.js} +1 -1
  136. package/dist/client/assets/{use-mobile-BP1wV0Dh.js → use-mobile-CrP2KZis.js} +1 -1
  137. package/dist/client/assets/{use-navigate-to-agent-Bl8tivkk.js → use-navigate-to-agent-C3zfnZck.js} +1 -1
  138. package/dist/client/assets/{use-org-sso-BURT85r2.js → use-org-sso-Bp80Qjb5.js} +1 -1
  139. package/dist/client/assets/{use-organization-roles-DFb5kpIb.js → use-organization-roles-BV6xrqqH.js} +1 -1
  140. package/dist/client/assets/{use-organization-settings-DOx6Mt6y.js → use-organization-settings-qZ1AM5bR.js} +1 -1
  141. package/dist/client/assets/{use-registry-connections-BnhgPbEO.js → use-registry-connections-4TVYi7-o.js} +1 -1
  142. package/dist/client/assets/{use-status-sounds-DfEYCKF7.js → use-status-sounds-DOhvVAtI.js} +1 -1
  143. package/dist/client/assets/{use-tasks-CpxN0ye6.js → use-tasks-Cd7MvMgt.js} +1 -1
  144. package/dist/client/assets/{use-view-mode-CXzkxsjO.js → use-view-mode-BtY__6eQ.js} +1 -1
  145. package/dist/client/assets/{use-virtual-mcp-CXDuGiqH.js → use-virtual-mcp-BUyveTe6.js} +1 -1
  146. package/dist/client/assets/useInfiniteQuery-c3E-w9DY.js +1 -0
  147. package/dist/client/assets/useSuspenseInfiniteQuery-D705BqvF.js +1 -0
  148. package/dist/client/assets/{user-DzVhNpqN.js → user-DgdWVRpj.js} +1 -1
  149. package/dist/client/assets/{view-mode-toggle-DPCyIr82.js → view-mode-toggle-D2WG_Euq.js} +1 -1
  150. package/dist/client/assets/{workflow-CdQVYV4Q.js → workflow-DRs0QH0L.js} +1 -1
  151. package/dist/client/assets/workflow-detail-B8_Px7_-.js +1 -0
  152. package/dist/client/index.html +1 -1
  153. package/dist/server/cli.js +393 -393
  154. package/dist/server/migrate.js +132 -132
  155. package/dist/server/node_modules/xtend/.jshintrc +30 -0
  156. package/dist/server/node_modules/{postgres-bytea/license → xtend/LICENSE} +1 -2
  157. package/dist/server/node_modules/xtend/README.md +32 -0
  158. package/dist/server/node_modules/xtend/immutable.js +19 -0
  159. package/dist/server/node_modules/xtend/mutable.js +17 -0
  160. package/dist/server/node_modules/xtend/package.json +55 -0
  161. package/dist/server/node_modules/xtend/test.js +103 -0
  162. package/dist/server/server.js +2 -2
  163. package/package.json +1 -1
  164. package/dist/client/assets/ai-providers-CbLrb_N0.js +0 -1
  165. package/dist/client/assets/ai-providers-logos-CS4PCiqI.js +0 -1
  166. package/dist/client/assets/registry-Fsu61we3.js +0 -2
  167. package/dist/client/assets/select-model-_tj2LEO8.js +0 -4
  168. package/dist/client/assets/store-registry-Iir3u5ll.js +0 -2
  169. package/dist/client/assets/useInfiniteQuery-CJd90n7M.js +0 -1
  170. package/dist/client/assets/useSuspenseInfiniteQuery-CJSBGdra.js +0 -1
  171. package/dist/client/assets/workflow-detail-BXw4DQr0.js +0 -1
  172. package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
  173. package/dist/server/node_modules/mimic-fn/index.js +0 -13
  174. package/dist/server/node_modules/mimic-fn/license +0 -9
  175. package/dist/server/node_modules/mimic-fn/package.json +0 -42
  176. package/dist/server/node_modules/mimic-fn/readme.md +0 -69
  177. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  178. package/dist/server/node_modules/pg-int8/README.md +0 -16
  179. package/dist/server/node_modules/pg-int8/index.js +0 -100
  180. package/dist/server/node_modules/pg-int8/package.json +0 -24
  181. package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
  182. package/dist/server/node_modules/postgres-array/index.js +0 -97
  183. package/dist/server/node_modules/postgres-array/license +0 -21
  184. package/dist/server/node_modules/postgres-array/package.json +0 -35
  185. package/dist/server/node_modules/postgres-array/readme.md +0 -43
  186. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  187. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  188. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  189. package/dist/server/node_modules/postgres-date/index.js +0 -116
  190. package/dist/server/node_modules/postgres-date/license +0 -21
  191. package/dist/server/node_modules/postgres-date/package.json +0 -33
  192. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  193. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  194. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  195. package/dist/server/node_modules/postgres-interval/license +0 -21
  196. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  197. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
@@ -1 +1 @@
1
- import{e as ge,C as ke,j as s,B as pe,s as Ae,r as P,t as w,z as we}from"./index-n7SSrZJX.js";import{D as U,e as Ce,d as ue,c as xe}from"./dropdown-menu-BfGuGlIh.js";import{a as Pe}from"./Users03-DuJUh6K5.js";import{b as Te,G as Me,I as Oe,S as ze,L as Le,a as Ie}from"./github-repo-picker-iNFjYstD.js";import{W as Ee,a as Ge}from"./constants-Bv-ydthU.js";import{u as Be,b as He}from"./use-virtual-mcp-CXDuGiqH.js";import{P as ne}from"./index-B5cVztKY.js";import{i as $e}from"./DotsVertical-e4sJs2sy.js";import{a as Re}from"./Settings02-bYDpmczV.js";import{s as Fe}from"./Trash01-J7CgYdQ6.js";import{A as ve,ag as Ve}from"./agent-icon-C6qW6eXG.js";import{u as be}from"./use-navigate-to-agent-Bl8tivkk.js";import{C as Ne}from"./card-BLtPWaiK.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-dX7dSbXx.js";import{u as qe}from"./use-create-virtual-mcp-BZbpQ7wy.js";import{c as Je,b as Qe,d as Ue,A as Xe,e as Ye,g as Ze,a as et,f as tt}from"./alert-dialog-DUehP6wO.js";import{S as st}from"./search-input-c4tKbop1.js";import{s as je}from"./Plus-BR3le3XA.js";import"./ChevronDown-DfsMdmf4.js";import"./ChevronRight-CVhRkUc0.js";import"./dialog-CbDVIhlb.js";import"./X-B94SYTq6.js";import"./RefreshCcw01-BvVeeLFE.js";import"./collection-search-BEbLDyCP.js";import"./SearchMd-CnSMs6Gr.js";import"./drawer-BmeDjX1X.js";import"./use-mobile-BP1wV0Dh.js";import"./integration-icon-D1WPsIeS.js";import"./Container-BcAiX456.js";import"./use-connection-BNJDlOt9.js";import"./use-collections-CtCWr_i-.js";import"./use-mcp-tools-BtNM-5qj.js";import"./checkbox-BEdGbH_8.js";import"./Lock01-_ctwMSEo.js";import"./extract-connection-data-DpnZLfW6.js";import"./constants-DjiHYs3d.js";import"./collections-CF9hrNRd.js";import"./AlertCircle-DvPnQfC5.js";import"./Tool01-CuCSRQWJ.js";import"./XClose-BDJKoeIM.js";import"./ArrowNarrowLeft-BKxpVLR_.js";import"./XCircle-CV0L9GR_.js";import"./ArrowUpRight-CuQjuTVk.js";import"./ZapSquare-BVc4n4iU.js";import"./CheckCircle-4_rcsB70.js";import"./ChevronUp-CD4XJT02.js";import"./Star01-B5vecVQL.js";import"./Palette-BkMTuMlr.js";import"./LinkExternal01-M3Y1_vaI.js";import"./Sun-wZV-LjB0.js";import"./Play-CrMiqzaH.js";import"./Shield01-CMpoeZYl.js";import"./User01-BgWj-XfO.js";import"./Zap-DbOUQQao.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,a=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let r;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(r=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=r):r=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==a||t[12]!==f||t[13]!==c||t[14]!==r||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:a,className:"w-48",children:[c,r,m]}),t[11]=a,t[12]=f,t[13]=c,t[14]=r,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let a;t[10]!==d||t[11]!==i.id?(a=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=a):a=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==a?(u=s.jsxs(U,{onClick:a,children:[n,"Settings"]}),t[14]=a,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let r;t[18]!==u||t[19]!==c?(r=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=r):r=t[20];let x;t[21]!==f||t[22]!==r?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,r]}),t[21]=f,t[22]=r,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function cs(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:a}=qe(f),[n,u]=P.useState(null),[c,r]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==a||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(rt),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?r(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let re,ae;e[30]===Symbol.for("react.memo_cache_sentinel")?(re=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),r(!0)},e[30]=re,e[31]=ae):(re=e[30],ae=e[31]);let J;e[32]!==a||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:re,onImportDeco:ae,isCreating:a,align:"end"})]}),e[32]=a,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),r(!0)},isCreating:a,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=a,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:r}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function rt(e){return Ge(e.id)}export{cs as default};
1
+ import{e as ge,C as ke,j as s,B as pe,s as Ae,r as P,t as w,z as we}from"./index-D7IIXROb.js";import{D as U,e as Ce,d as ue,c as xe}from"./dropdown-menu-Cye9zjaV.js";import{a as Pe}from"./Users03-BD0tlSQu.js";import{b as Te,G as Me,I as Oe,S as ze,L as Le,a as Ie}from"./github-repo-picker-4y_CmSBW.js";import{W as Ee,a as Ge}from"./constants-fZUl7A6B.js";import{u as Be,b as He}from"./use-virtual-mcp-BUyveTe6.js";import{P as ne}from"./index-DU8sxbAO.js";import{i as $e}from"./DotsVertical-om3rzQE9.js";import{a as Re}from"./Settings02-LVlkEIxI.js";import{s as Fe}from"./Trash01-CIUqVsqV.js";import{A as ve,ag as Ve}from"./agent-icon-Dhv8pT4N.js";import{u as be}from"./use-navigate-to-agent-C3zfnZck.js";import{C as Ne}from"./card-BcKfGMCs.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-KsHmVPO4.js";import{u as qe}from"./use-create-virtual-mcp-Cx6IqxLi.js";import{c as Je,b as Qe,d as Ue,A as Xe,e as Ye,g as Ze,a as et,f as tt}from"./alert-dialog-C5H0at4x.js";import{S as st}from"./search-input-o1N12hd4.js";import{s as je}from"./Plus-CnK1SC2T.js";import"./ChevronDown-DgrWziJW.js";import"./ChevronRight-DJnGkhn4.js";import"./dialog-CfIcbBij.js";import"./X-BDxrsCdA.js";import"./RefreshCcw01-DESLbhAD.js";import"./collection-search-CZEXNAkX.js";import"./SearchMd-DlfhE_5j.js";import"./drawer-D0hdbn63.js";import"./use-mobile-CrP2KZis.js";import"./integration-icon-DoWhqWe3.js";import"./Container-CCq3u0Gk.js";import"./use-connection-BHgGmTOA.js";import"./use-collections-BosUNiJP.js";import"./use-mcp-tools-jeaH_mio.js";import"./checkbox-eCIm2Y45.js";import"./Lock01-BsLK0x7P.js";import"./extract-connection-data-C_Q81cim.js";import"./constants-CBodG1Pl.js";import"./collections-BmZbVrT4.js";import"./AlertCircle-BKpPv_ue.js";import"./Tool01-X8GEQ_TP.js";import"./XClose-Bl-2e8QV.js";import"./ArrowNarrowLeft-DzI4-MMz.js";import"./XCircle-BJ-0U-0t.js";import"./ArrowUpRight-CgoB9CSG.js";import"./ZapSquare-Ddm4Ccl_.js";import"./CheckCircle-_hRmcUCr.js";import"./ChevronUp-CYzPfn3Y.js";import"./Star01-CWHB1ChF.js";import"./Palette-CN1aN7Xh.js";import"./LinkExternal01-DbNOYo2d.js";import"./Sun-1aZYqU86.js";import"./Play-CwsBegSF.js";import"./Shield01-DGTwcXqp.js";import"./User01-Dds7lT_Z.js";import"./Zap-B3a3OZUG.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,a=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let r;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(r=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=r):r=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==a||t[12]!==f||t[13]!==c||t[14]!==r||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:a,className:"w-48",children:[c,r,m]}),t[11]=a,t[12]=f,t[13]=c,t[14]=r,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let a;t[10]!==d||t[11]!==i.id?(a=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=a):a=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==a?(u=s.jsxs(U,{onClick:a,children:[n,"Settings"]}),t[14]=a,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let r;t[18]!==u||t[19]!==c?(r=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=r):r=t[20];let x;t[21]!==f||t[22]!==r?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,r]}),t[21]=f,t[22]=r,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function cs(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:a}=qe(f),[n,u]=P.useState(null),[c,r]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==a||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(rt),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?r(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let re,ae;e[30]===Symbol.for("react.memo_cache_sentinel")?(re=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),r(!0)},e[30]=re,e[31]=ae):(re=e[30],ae=e[31]);let J;e[32]!==a||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:re,onImportDeco:ae,isCreating:a,align:"end"})]}),e[32]=a,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),r(!0)},isCreating:a,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=a,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:r}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function rt(e){return Ge(e.id)}export{cs as default};
@@ -0,0 +1 @@
1
+ import{e as t,j as i}from"./index-D7IIXROb.js";import{O as m}from"./select-model-i86p2wLu.js";import"./checkbox-eCIm2Y45.js";import"./ChevronDown-DgrWziJW.js";import"./input-C-zd9-6X.js";import"./dialog-CfIcbBij.js";import"./X-BDxrsCdA.js";import"./drawer-D0hdbn63.js";import"./use-mobile-CrP2KZis.js";import"./select-wye91jBR.js";import"./ChevronUp-CYzPfn3Y.js";import"./skeleton-DRv0yCtF.js";import"./Tool01-X8GEQ_TP.js";import"./RefreshCcw01-DESLbhAD.js";import"./SearchMd-DlfhE_5j.js";import"./Settings02-LVlkEIxI.js";import"./use-ai-providers-BH0Y2Lij.js";import"./constants-fZUl7A6B.js";import"./chat-context-BgLXGROj.js";import"./use-virtual-mcp-BUyveTe6.js";import"./use-collections-BosUNiJP.js";import"./use-decopilot-events-Bw4kdPRS.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-Cd7MvMgt.js";import"./use-organization-settings-qZ1AM5bR.js";import"./ai-providers-logos-D6a8kmGH.js";import"./Zap-B3a3OZUG.js";import"./AlertCircle-BKpPv_ue.js";import"./CheckCircle-_hRmcUCr.js";import"./Trash01-CIUqVsqV.js";import"./index-DU8sxbAO.js";import"./settings-section-C9gADeUy.js";import"./card-BcKfGMCs.js";import"./ArrowUpRight-CgoB9CSG.js";import"./switch-PbUvXBwc.js";import"./toggle-group-C7CndFhA.js";import"./avatar-BCAMjlDk.js";import"./User01-Dds7lT_Z.js";import"./alert-dialog-C5H0at4x.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function T(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{T as default};
@@ -0,0 +1 @@
1
+ const c="https://assets.decocache.com/decocms/bc2ca488-2bae-4aac-8d3e-ead262dad764/agent.png",t="https://assets.decocache.com/decocms/b2e2f64f-6025-45f7-9e8c-3b3ebdd073d8/openrouter_logojpg.jpg",d="https://assets.decocache.com/decocms/51a209ae-14bc-4b6f-8216-8eb670695bd7/Anthropic-Icon--Streamline-Svg-Logos.svg";function o(s){const e=s.toLowerCase();return e.startsWith("gpt-")||e.startsWith("o1")||e.startsWith("o3")?"openai":e.startsWith("claude-")||e.startsWith("claude.")?"anthropic":e.startsWith("gemini")?"google":e.startsWith("llama")?"meta-llama":e.startsWith("mistral")||e.startsWith("mixtral")?"mistralai":e.startsWith("qwen")?"qwen":e.startsWith("deepseek")?"deepseek":e.startsWith("grok")?"x-ai":e.startsWith("command-")?"cohere":e.startsWith("phi-")?"microsoft":null}function m(s){const e=s.modelId.includes("/")?s.modelId.split("/")[0]:o(s.modelId);return e&&a[e]||a[s.providerId]||c}const a={"aion-labs":"https://assets.decocache.com/decocms/6da18da8-0160-4b85-8bca-84eefffebe12/images-(6).png",ai21:"https://assets.decocache.com/decocms/5d8388e9-027b-4b23-b816-90cee1cd28ad/images-(5).png",alfredpros:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",alibaba:"https://assets.decocache.com/decocms/4d113b13-5412-4d3b-96ec-3c2e7c1f7a5f/images-(8).png",allenai:"https://assets.decocache.com/decocms/21d6071a-e0da-4919-9f35-902b1d0b85b8/allen.png",alpindale:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",amazon:"https://assets.decocache.com/decocms/31e7b260-6cf0-4753-bb32-bd062b15c5f1/Amazon_icon.png",anthropic:d,"claude-code":"https://assets.decocache.com/decocms/2b91e6f8-5151-4b4f-bdf9-037ee769e6ff/Claude_AI_symbol.svg.png",codex:"https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png","anthracite-org":c,"arcee-ai":"https://assets.decocache.com/decocms/ee325839-6acc-48dc-8cf7-8bab74698015/126496414.png",baidu:"https://assets.decocache.com/decocms/cf4c19f1-39b5-499e-87b7-e16dc5da2b50/images-(9).png",bytedance:"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png","bytedance-seed":"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png",cognitivecomputations:c,cohere:"https://assets.decocache.com/decocms/c942091b-b3bf-4c46-af37-fc2c1086d9f7/cohere-color.png",deepcogito:"https://assets.decocache.com/decocms/4ee77a8f-a36a-4933-8cdf-d2e8676b88d8/images-(13).png",deepseek:"https://assets.decocache.com/decocms/3611e8ac-4cad-4b0e-a1f8-8f791288ce03/images-(1).png",eleutherai:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",essentialai:"https://assets.decocache.com/decocms/c5afc6de-1e41-457e-a6dd-91810d92541e/images-(1).jpeg",google:"https://assets.decocache.com/webdraw/17df85af-1578-42ef-ae07-4300de0d1723/gemini.svg",gryphe:"https://assets.decocache.com/decocms/a5503d3b-2056-47f2-a76c-611b7416bdc8/6798c7dccaaadd0a1318d66a_66f41d1fd146c3b0b9c76453_gryphe-logo.webp","ibm-granite":"https://assets.decocache.com/decocms/2c50018d-6f70-472d-be30-65a5e8e249f0/images-(10).png",inflection:c,inception:"https://assets.decocache.com/decocms/ff9822b8-a914-482b-bd7d-b0e46b9d5a56/images-(6).jpeg",kwaipilot:"https://assets.decocache.com/decocms/cd576e1d-1184-45ba-8162-cf2bd06d684f/images-(14).png",liquid:c,mancer:"https://assets.decocache.com/decocms/79762356-a0c5-4546-b268-ad4a0b51db51/Screenshot-2026-01-08-at-18.49.42.png",meituan:c,"meta-llama":"https://assets.decocache.com/decocms/56421cb3-488c-4cc3-83a5-16d9a303850e/images-(11).png",microsoft:"https://assets.decocache.com/decocms/0e352a51-4ea5-4f35-802e-fd82bf266683/images-(12).png",minimax:"https://assets.decocache.com/decocms/f362cc4f-7ccc-4317-afda-92e6f348fdfd/images-(2).png",mistralai:"https://assets.decocache.com/decocms/73ab9971-bbbc-40dc-99a3-5fddd9a0f340/images-(3).png",morph:c,moonshotai:"https://assets.decocache.com/decocms/b8abfea7-e8b4-4b72-b653-fdf11c9e3b66/moonshot.png",neversleep:c,"nex-agi":"https://assets.decocache.com/decocms/d2ada265-160d-4959-981d-e90210d71713/241570229.jpeg",nousresearch:"https://assets.decocache.com/decocms/496acb3d-9b5d-4759-b764-16c9ca7eb6b2/nousresearch.png",nvidia:"https://assets.decocache.com/decocms/ecca3238-fa79-4648-bb55-738f13a4293f/nvidia-7.svg",opengvlab:"https://assets.decocache.com/decocms/fb2d0c32-85f1-410a-87f4-9731dfafd248/images-(2).jpeg",openai:"https://assets.decocache.com/webdraw/15dc381c-23b4-4f6b-9ceb-9690f77a7cf5/openai.svg",openrouter:t,perplexity:"https://assets.decocache.com/decocms/3a134746-f370-4089-a3c9-fe545be0441c/images-(15).png","prime-intellect":c,qwen:"https://assets.decocache.com/decocms/ab94208c-4439-4aec-a06c-c51747120e43/Qwen_logo.svg.png",raifle:c,relace:"https://assets.decocache.com/decocms/c5dbae73-3ce0-40ca-8433-c38783fb13a9/Screenshot-2026-01-08-at-18.52.09.png",sao10k:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png","stepfun-ai":"https://assets.decocache.com/decocms/8892b883-4905-444e-b554-648565dc7fab/images-(16).png",switchpoint:"https://assets.decocache.com/decocms/0319d595-e0dd-4d8e-a0a3-b20ff4cbddcb/images-(4).jpeg",tencent:"https://assets.decocache.com/decocms/80f2f7bd-f9ea-4fcf-b89c-c58823a389ed/images-(3).jpeg",thedrummer:"https://assets.decocache.com/decocms/5c6c09fc-cf9d-43a1-a1c3-4a1ef367b824/images-(17).png",thudm:c,tngtech:"https://assets.decocache.com/decocms/5b5648ad-f858-4687-b67b-212cf186b62d/images-(7).png",undi95:c,xiaomi:"https://assets.decocache.com/decocms/2d7191b7-fc80-4867-a431-6d443d691cfc/images-(4).png","x-ai":"https://assets.decocache.com/webdraw/7a8003ff-8f2d-4988-8693-3feb20e87eca/xai.svg","z-ai":"https://assets.decocache.com/decocms/12a0877f-c978-4880-88d1-09097e606e2f/Z.ai_(company_logo).svg.png"};export{c as D,a as P,m as g};
@@ -1,4 +1,4 @@
1
- import{r as i,b6 as m,j as r,cK as A,cI as w,cJ as T,du as O,be as M,ai as I,b_ as L,dv as v,b$ as z,df as F,ao as G,cL as k,c0 as H,e as n,c as p,ba as D}from"./index-n7SSrZJX.js";var x="AlertDialog",[V]=G(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=F("AlertDialogContent"),b=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:j,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=f;var j="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=j;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=U;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
1
+ import{r as i,b6 as m,j as r,cK as A,cI as w,cJ as T,du as O,be as M,ai as I,b_ as L,dv as v,b$ as z,df as F,ao as G,cL as k,c0 as H,e as n,c as p,ba as D}from"./index-D7IIXROb.js";var x="AlertDialog",[V]=G(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=F("AlertDialogContent"),b=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:j,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=f;var j="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=j;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=U;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1 +1 @@
1
- import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-n7SSrZJX.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{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-D7IIXROb.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{e as P,s as q,K as k,n as G,o as U,a as K,z as L,r as M,c as Q,j as o,B}from"./index-n7SSrZJX.js";import{b as V,d as H,e as Y,g as J,c as W,A as X,a as Z,f as ee}from"./alert-dialog-DUehP6wO.js";import{d as te,c as ne,e as se,D as ie}from"./dropdown-menu-BfGuGlIh.js";import{A as oe,N as re}from"./agent-icon-C6qW6eXG.js";import{i as ae}from"./DotsVertical-e4sJs2sy.js";import{s as le}from"./Trash01-J7CgYdQ6.js";import{i as ce}from"./Zap-DbOUQQao.js";import{a as ue}from"./use-virtual-mcp-CXDuGiqH.js";import{S as $,u as z}from"./constants-Bv-ydthU.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const n of t.params)e[n.name]={type:n.type,description:n.description,enum:n.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ee(t){const e=P.c(11),{org:n}=q(),s=t??$;let r;e[0]!==n.id||e[1]!==s?(r={connectionId:s,orgId:n.id},e[0]=n.id,e[1]=s,e[2]=r):r=e[2];const a=z(r);let i;e[3]!==t?(i=k.toolCall(t??"","TRIGGER_LIST",""),e[3]=t,e[4]=i):i=e[4];let u;e[5]!==a?(u=async()=>{const f=await a.callTool({name:"TRIGGER_LIST",arguments:{}});return(f.structuredContent??f).triggers.map(me)},e[5]=a,e[6]=u):u=e[6];const l=!!t;let d;return e[7]!==i||e[8]!==u||e[9]!==l?(d={queryKey:i,queryFn:u,enabled:l,staleTime:3e4},e[7]=i,e[8]=u,e[9]=l,e[10]=d):d=e[10],G(d)}function Se(t){const e=P.c(11),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=z(s);let a;e[2]!==n.id||e[3]!==t?(a=k.automations(n.id,t),e[2]=n.id,e[3]=t,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await r.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[5]=r,e[6]=t,e[7]=i):i=e[7];let u;return e[8]!==a||e[9]!==i?(u={queryKey:a,queryFn:i,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u):u=e[10],G(u)}function Oe(t){const e=P.c(12),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=z(s);let a;e[2]!==t||e[3]!==n.id?(a=k.automation(n.id,t),e[2]=t,e[3]=n.id,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const d=await r.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[5]=r,e[6]=t,e[7]=i):i=e[7];const u=!!t;let l;return e[8]!==a||e[9]!==i||e[10]!==u?(l={queryKey:a,queryFn:i,enabled:u,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u,e[11]=l):l=e[11],G(l)}function we(t){return{name:"New Automation",agent:t?{id:t}:void 0,messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(54),{org:e}=q();let n;t[0]!==e.id?(n={connectionId:$,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const s=z(n),r=U();let a;t[2]!==e.id||t[3]!==r?(a=()=>r.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[2]=e.id,t[3]=r,t[4]=a):a=t[4];const i=a;let u;t[5]!==e.id||t[6]!==r?(u=m=>r.invalidateQueries({queryKey:k.automation(e.id,m)}),t[5]=e.id,t[6]=r,t[7]=u):u=t[7];const l=u;let d;t[8]!==s?(d=async m=>{const c=await s.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[8]=s,t[9]=d):d=t[9];let f;t[10]!==i?(f=()=>{i()},t[10]=i,t[11]=f):f=t[11];let b;t[12]!==d||t[13]!==f?(b={mutationFn:d,onSuccess:f,onError:pe},t[12]=d,t[13]=f,t[14]=b):b=t[14];const F=K(b);let D;t[15]!==s?(D=async m=>{const c=await s.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[15]=s,t[16]=D):D=t[16];let g;t[17]!==i||t[18]!==l?(g=(m,c)=>{i(),typeof c.id=="string"&&l(c.id)},t[17]=i,t[18]=l,t[19]=g):g=t[19];let S;t[20]!==D||t[21]!==g?(S={mutationFn:D,onSuccess:g,onError:ge},t[20]=D,t[21]=g,t[22]=S):S=t[22];const N=K(S);let p;t[23]!==s?(p=async m=>{const c=await s.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[23]=s,t[24]=p):p=t[24];let x;t[25]!==i||t[26]!==e.id||t[27]!==r?(x=(m,c)=>{r.removeQueries({queryKey:k.automation(e.id,c)}),i()},t[25]=i,t[26]=e.id,t[27]=r,t[28]=x):x=t[28];let A;t[29]!==x||t[30]!==p?(A={mutationFn:p,onSuccess:x,onError:fe},t[29]=x,t[30]=p,t[31]=A):A=t[31];const v=K(A);let _;t[32]!==s?(_=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const I=c.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return c.structuredContent??c},t[32]=s,t[33]=_):_=t[33];let y;t[34]!==i||t[35]!==l?(y=m=>{i(),l(m.automation_id)},t[34]=i,t[35]=l,t[36]=y):y=t[36];let E;t[37]!==_||t[38]!==y?(E={mutationFn:_,onSuccess:y},t[37]=_,t[38]=y,t[39]=E):E=t[39];const O=K(E);let h;t[40]!==s?(h=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[40]=s,t[41]=h):h=t[41];let T;t[42]!==i||t[43]!==l?(T=(m,c)=>{i(),l(c.automation_id)},t[42]=i,t[43]=l,t[44]=T):T=t[44];let j;t[45]!==h||t[46]!==T?(j={mutationFn:h,onSuccess:T},t[45]=h,t[46]=T,t[47]=j):j=t[47];const w=K(j);let C;return t[48]!==F||t[49]!==v||t[50]!==O||t[51]!==w||t[52]!==N?(C={create:F,update:N,remove:v,triggerAdd:O,triggerRemove:w},t[48]=F,t[49]=v,t[50]=O,t[51]=w,t[52]=N,t[53]=C):C=t[53],C}function fe(t){L.error(t instanceof Error?t.message:"Failed to delete automation")}function ge(t){L.error(t instanceof Error?t.message:"Failed to update automation")}function pe(t){L.error(t instanceof Error?t.message:"Failed to create automation")}function Fe(t){const e=P.c(51),{automation:n,showAgent:s,onClick:r}=t,{remove:a}=de(),[i,u]=M.useState(!1),l=ue(s?n.agent?.id??void 0:void 0);let d;e[0]!==n.id||e[1]!==a?(d=()=>{a.mutate(n.id),u(!1)},e[0]=n.id,e[1]=a,e[2]=d):d=e[2];const f=d;let b;e[3]!==r?(b=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[3]=r,e[4]=b):b=e[4];const F=b,D=n.active&&n.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let g;e[5]!==D?(g=Q("inline-block size-2 rounded-full shrink-0",D),e[5]=D,e[6]=g):g=e[6];const S=n.active&&n.trigger_count>0?"Active":n.active?"No triggers configured":"Paused";let N;e[7]!==g||e[8]!==S?(N=o.jsx("span",{className:g,"aria-label":S}),e[7]=g,e[8]=S,e[9]=N):N=e[9];let p;e[10]!==l||e[11]!==s?(p=s&&l&&o.jsx(oe,{icon:l.icon??null,name:l.title,size:"xs",className:"shrink-0"}),e[10]=l,e[11]=s,e[12]=p):p=e[12];let x;e[13]!==n.name?(x=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.name}),e[13]=n.name,e[14]=x):x=e[14];let A;e[15]!==l||e[16]!==s?(A=s&&l&&o.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[15]=l,e[16]=s,e[17]=A):A=e[17];let v;e[18]!==x||e[19]!==A?(v=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[18]=x,e[19]=A,e[20]=v):v=e[20];let _;e[21]!==n.nearest_next_run_at||e[22]!==n.trigger_count?(_=o.jsx(ye,{triggerCount:n.trigger_count,nextRunAt:n.nearest_next_run_at}),e[21]=n.nearest_next_run_at,e[22]=n.trigger_count,e[23]=_):_=e[23];let y;e[24]!==v||e[25]!==_?(y=o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[24]=v,e[25]=_,e[26]=y):y=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(te,{asChild:!0,children:o.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:o.jsx(ae,{size:16})})}),e[27]=E):E=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:o.jsxs(ne,{children:[E,o.jsx(se,{align:"end",children:o.jsxs(ie,{variant:"destructive",onClick:R=>{R.stopPropagation(),u(!0)},children:[o.jsx(le,{size:16}),"Delete"]})})]})}),e[28]=O):O=e[28];let h;e[29]!==F||e[30]!==r||e[31]!==y||e[32]!==N||e[33]!==p?(h=o.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[N,p,y,O]}),e[29]=F,e[30]=r,e[31]=y,e[32]=N,e[33]=p,e[34]=h):h=e[34];let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(W,{children:"Delete automation?"}),e[35]=T):T=e[35];let j;e[36]!==n.name?(j=o.jsxs(V,{children:[T,o.jsxs(H,{children:["This removes"," ",o.jsx("span",{className:"font-medium text-foreground",children:n.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[36]=n.name,e[37]=j):j=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(X,{children:"Cancel"}),e[38]=w):w=e[38];let C;e[39]!==f||e[40]!==a.isPending?(C=o.jsxs(Y,{children:[w,o.jsx(J,{onClick:f,disabled:a.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[39]=f,e[40]=a.isPending,e[41]=C):C=e[41];let m;e[42]!==j||e[43]!==C?(m=o.jsxs(Z,{children:[j,C]}),e[42]=j,e[43]=C,e[44]=m):m=e[44];let c;e[45]!==i||e[46]!==m?(c=o.jsx(ee,{open:i,onOpenChange:u,children:m}),e[45]=i,e[46]=m,e[47]=c):c=e[47];let I;return e[48]!==h||e[49]!==c?(I=o.jsxs(o.Fragment,{children:[h,c]}),e[48]=h,e[49]=c,e[50]=I):I=e[50],I}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:n,nextRunAt:s}=t;if(n===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=a):a=e[0],a}let r;return e[1]!==s||e[2]!==n?(r=o.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:s?o.jsxs(o.Fragment,{children:[o.jsx(re,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:["Next run ",new Date(s).toLocaleString()]})]}):o.jsxs(o.Fragment,{children:[o.jsx(ce,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:[n," trigger",n===1?"":"s"]})]})}),e[1]=s,e[2]=n,e[3]=r):r=e[3],r}export{Fe as A,Ee as a,Oe as b,Se as c,we as d,de as u};
1
+ import{e as P,s as q,K as k,n as G,o as U,a as K,z as L,r as M,c as Q,j as o,B}from"./index-D7IIXROb.js";import{b as V,d as H,e as Y,g as J,c as W,A as X,a as Z,f as ee}from"./alert-dialog-C5H0at4x.js";import{d as te,c as ne,e as se,D as ie}from"./dropdown-menu-Cye9zjaV.js";import{A as oe,N as re}from"./agent-icon-Dhv8pT4N.js";import{i as ae}from"./DotsVertical-om3rzQE9.js";import{s as le}from"./Trash01-CIUqVsqV.js";import{i as ce}from"./Zap-B3a3OZUG.js";import{a as ue}from"./use-virtual-mcp-BUyveTe6.js";import{S as $,u as z}from"./constants-fZUl7A6B.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const n of t.params)e[n.name]={type:n.type,description:n.description,enum:n.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ee(t){const e=P.c(11),{org:n}=q(),s=t??$;let r;e[0]!==n.id||e[1]!==s?(r={connectionId:s,orgId:n.id},e[0]=n.id,e[1]=s,e[2]=r):r=e[2];const a=z(r);let i;e[3]!==t?(i=k.toolCall(t??"","TRIGGER_LIST",""),e[3]=t,e[4]=i):i=e[4];let u;e[5]!==a?(u=async()=>{const f=await a.callTool({name:"TRIGGER_LIST",arguments:{}});return(f.structuredContent??f).triggers.map(me)},e[5]=a,e[6]=u):u=e[6];const l=!!t;let d;return e[7]!==i||e[8]!==u||e[9]!==l?(d={queryKey:i,queryFn:u,enabled:l,staleTime:3e4},e[7]=i,e[8]=u,e[9]=l,e[10]=d):d=e[10],G(d)}function Se(t){const e=P.c(11),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=z(s);let a;e[2]!==n.id||e[3]!==t?(a=k.automations(n.id,t),e[2]=n.id,e[3]=t,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await r.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[5]=r,e[6]=t,e[7]=i):i=e[7];let u;return e[8]!==a||e[9]!==i?(u={queryKey:a,queryFn:i,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u):u=e[10],G(u)}function Oe(t){const e=P.c(12),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=z(s);let a;e[2]!==t||e[3]!==n.id?(a=k.automation(n.id,t),e[2]=t,e[3]=n.id,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const d=await r.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[5]=r,e[6]=t,e[7]=i):i=e[7];const u=!!t;let l;return e[8]!==a||e[9]!==i||e[10]!==u?(l={queryKey:a,queryFn:i,enabled:u,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u,e[11]=l):l=e[11],G(l)}function we(t){return{name:"New Automation",agent:t?{id:t}:void 0,messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(54),{org:e}=q();let n;t[0]!==e.id?(n={connectionId:$,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const s=z(n),r=U();let a;t[2]!==e.id||t[3]!==r?(a=()=>r.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[2]=e.id,t[3]=r,t[4]=a):a=t[4];const i=a;let u;t[5]!==e.id||t[6]!==r?(u=m=>r.invalidateQueries({queryKey:k.automation(e.id,m)}),t[5]=e.id,t[6]=r,t[7]=u):u=t[7];const l=u;let d;t[8]!==s?(d=async m=>{const c=await s.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[8]=s,t[9]=d):d=t[9];let f;t[10]!==i?(f=()=>{i()},t[10]=i,t[11]=f):f=t[11];let b;t[12]!==d||t[13]!==f?(b={mutationFn:d,onSuccess:f,onError:pe},t[12]=d,t[13]=f,t[14]=b):b=t[14];const F=K(b);let D;t[15]!==s?(D=async m=>{const c=await s.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[15]=s,t[16]=D):D=t[16];let g;t[17]!==i||t[18]!==l?(g=(m,c)=>{i(),typeof c.id=="string"&&l(c.id)},t[17]=i,t[18]=l,t[19]=g):g=t[19];let S;t[20]!==D||t[21]!==g?(S={mutationFn:D,onSuccess:g,onError:ge},t[20]=D,t[21]=g,t[22]=S):S=t[22];const N=K(S);let p;t[23]!==s?(p=async m=>{const c=await s.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[23]=s,t[24]=p):p=t[24];let x;t[25]!==i||t[26]!==e.id||t[27]!==r?(x=(m,c)=>{r.removeQueries({queryKey:k.automation(e.id,c)}),i()},t[25]=i,t[26]=e.id,t[27]=r,t[28]=x):x=t[28];let A;t[29]!==x||t[30]!==p?(A={mutationFn:p,onSuccess:x,onError:fe},t[29]=x,t[30]=p,t[31]=A):A=t[31];const v=K(A);let _;t[32]!==s?(_=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const I=c.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return c.structuredContent??c},t[32]=s,t[33]=_):_=t[33];let y;t[34]!==i||t[35]!==l?(y=m=>{i(),l(m.automation_id)},t[34]=i,t[35]=l,t[36]=y):y=t[36];let E;t[37]!==_||t[38]!==y?(E={mutationFn:_,onSuccess:y},t[37]=_,t[38]=y,t[39]=E):E=t[39];const O=K(E);let h;t[40]!==s?(h=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[40]=s,t[41]=h):h=t[41];let T;t[42]!==i||t[43]!==l?(T=(m,c)=>{i(),l(c.automation_id)},t[42]=i,t[43]=l,t[44]=T):T=t[44];let j;t[45]!==h||t[46]!==T?(j={mutationFn:h,onSuccess:T},t[45]=h,t[46]=T,t[47]=j):j=t[47];const w=K(j);let C;return t[48]!==F||t[49]!==v||t[50]!==O||t[51]!==w||t[52]!==N?(C={create:F,update:N,remove:v,triggerAdd:O,triggerRemove:w},t[48]=F,t[49]=v,t[50]=O,t[51]=w,t[52]=N,t[53]=C):C=t[53],C}function fe(t){L.error(t instanceof Error?t.message:"Failed to delete automation")}function ge(t){L.error(t instanceof Error?t.message:"Failed to update automation")}function pe(t){L.error(t instanceof Error?t.message:"Failed to create automation")}function Fe(t){const e=P.c(51),{automation:n,showAgent:s,onClick:r}=t,{remove:a}=de(),[i,u]=M.useState(!1),l=ue(s?n.agent?.id??void 0:void 0);let d;e[0]!==n.id||e[1]!==a?(d=()=>{a.mutate(n.id),u(!1)},e[0]=n.id,e[1]=a,e[2]=d):d=e[2];const f=d;let b;e[3]!==r?(b=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[3]=r,e[4]=b):b=e[4];const F=b,D=n.active&&n.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let g;e[5]!==D?(g=Q("inline-block size-2 rounded-full shrink-0",D),e[5]=D,e[6]=g):g=e[6];const S=n.active&&n.trigger_count>0?"Active":n.active?"No triggers configured":"Paused";let N;e[7]!==g||e[8]!==S?(N=o.jsx("span",{className:g,"aria-label":S}),e[7]=g,e[8]=S,e[9]=N):N=e[9];let p;e[10]!==l||e[11]!==s?(p=s&&l&&o.jsx(oe,{icon:l.icon??null,name:l.title,size:"xs",className:"shrink-0"}),e[10]=l,e[11]=s,e[12]=p):p=e[12];let x;e[13]!==n.name?(x=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.name}),e[13]=n.name,e[14]=x):x=e[14];let A;e[15]!==l||e[16]!==s?(A=s&&l&&o.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[15]=l,e[16]=s,e[17]=A):A=e[17];let v;e[18]!==x||e[19]!==A?(v=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[18]=x,e[19]=A,e[20]=v):v=e[20];let _;e[21]!==n.nearest_next_run_at||e[22]!==n.trigger_count?(_=o.jsx(ye,{triggerCount:n.trigger_count,nextRunAt:n.nearest_next_run_at}),e[21]=n.nearest_next_run_at,e[22]=n.trigger_count,e[23]=_):_=e[23];let y;e[24]!==v||e[25]!==_?(y=o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[24]=v,e[25]=_,e[26]=y):y=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(te,{asChild:!0,children:o.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:o.jsx(ae,{size:16})})}),e[27]=E):E=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:o.jsxs(ne,{children:[E,o.jsx(se,{align:"end",children:o.jsxs(ie,{variant:"destructive",onClick:R=>{R.stopPropagation(),u(!0)},children:[o.jsx(le,{size:16}),"Delete"]})})]})}),e[28]=O):O=e[28];let h;e[29]!==F||e[30]!==r||e[31]!==y||e[32]!==N||e[33]!==p?(h=o.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[N,p,y,O]}),e[29]=F,e[30]=r,e[31]=y,e[32]=N,e[33]=p,e[34]=h):h=e[34];let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(W,{children:"Delete automation?"}),e[35]=T):T=e[35];let j;e[36]!==n.name?(j=o.jsxs(V,{children:[T,o.jsxs(H,{children:["This removes"," ",o.jsx("span",{className:"font-medium text-foreground",children:n.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[36]=n.name,e[37]=j):j=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(X,{children:"Cancel"}),e[38]=w):w=e[38];let C;e[39]!==f||e[40]!==a.isPending?(C=o.jsxs(Y,{children:[w,o.jsx(J,{onClick:f,disabled:a.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[39]=f,e[40]=a.isPending,e[41]=C):C=e[41];let m;e[42]!==j||e[43]!==C?(m=o.jsxs(Z,{children:[j,C]}),e[42]=j,e[43]=C,e[44]=m):m=e[44];let c;e[45]!==i||e[46]!==m?(c=o.jsx(ee,{open:i,onOpenChange:u,children:m}),e[45]=i,e[46]=m,e[47]=c):c=e[47];let I;return e[48]!==h||e[49]!==c?(I=o.jsxs(o.Fragment,{children:[h,c]}),e[48]=h,e[49]=c,e[50]=I):I=e[50],I}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:n,nextRunAt:s}=t;if(n===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=a):a=e[0],a}let r;return e[1]!==s||e[2]!==n?(r=o.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:s?o.jsxs(o.Fragment,{children:[o.jsx(re,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:["Next run ",new Date(s).toLocaleString()]})]}):o.jsxs(o.Fragment,{children:[o.jsx(ce,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:[n," trigger",n===1?"":"s"]})]})}),e[1]=s,e[2]=n,e[3]=r):r=e[3],r}export{Fe as A,Ee as a,Oe as b,Se as c,we as d,de as u};
@@ -1 +1 @@
1
- import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-n7SSrZJX.js";import{s as O}from"./Plus-BR3le3XA.js";import{i as _}from"./Zap-DbOUQQao.js";import{S as V}from"./search-input-c4tKbop1.js";import{P as p}from"./index-B5cVztKY.js";import{E as B}from"./empty-state-dX7dSbXx.js";import{c as q,A as D}from"./automation-list-row-CE-l0VNu.js";import{u as F}from"./use-navigate-to-agent-Bl8tivkk.js";import{u as G}from"./use-virtual-mcp-CXDuGiqH.js";import"./SearchMd-CnSMs6Gr.js";import"./use-mobile-BP1wV0Dh.js";import"./X-B94SYTq6.js";import"./alert-dialog-DUehP6wO.js";import"./dropdown-menu-BfGuGlIh.js";import"./ChevronDown-DfsMdmf4.js";import"./ChevronRight-CVhRkUc0.js";import"./DotsVertical-e4sJs2sy.js";import"./agent-icon-C6qW6eXG.js";import"./AlertCircle-DvPnQfC5.js";import"./Tool01-CuCSRQWJ.js";import"./XClose-BDJKoeIM.js";import"./RefreshCcw01-BvVeeLFE.js";import"./ArrowNarrowLeft-BKxpVLR_.js";import"./XCircle-CV0L9GR_.js";import"./ArrowUpRight-CuQjuTVk.js";import"./ZapSquare-BVc4n4iU.js";import"./Users03-DuJUh6K5.js";import"./CheckCircle-4_rcsB70.js";import"./ChevronUp-CD4XJT02.js";import"./Container-BcAiX456.js";import"./Star01-B5vecVQL.js";import"./Palette-BkMTuMlr.js";import"./LinkExternal01-M3Y1_vaI.js";import"./Lock01-_ctwMSEo.js";import"./Sun-wZV-LjB0.js";import"./Play-CrMiqzaH.js";import"./Settings02-bYDpmczV.js";import"./Shield01-CMpoeZYl.js";import"./Trash01-J7CgYdQ6.js";import"./User01-BgWj-XfO.js";import"./constants-Bv-ydthU.js";import"./use-collections-CtCWr_i-.js";function Lt(){const t=L.c(18),{org:u}=R(),{data:y}=q(void 0),d=y===void 0?[]:y,b=G(),f=F(),g=T(),[x,k]=M.useState(""),h=x.toLowerCase(),E=new Map(b.map(H)),A=d.filter(o=>{if(!h||o.name.toLowerCase().includes(h))return!0;const n=o.agent?E.get(o.agent.id):void 0;return!!(n&&n.title.toLowerCase().includes(h))});let a;t[0]!==f?(a=(o,n)=>{n&&(S("automations_list_row_clicked",{automation_id:o,agent_id:n,source:"settings_automations"}),f(n,{search:{main:"automation:"+o}}))},t[0]=f,t[1]=a):a=t[1];const P=a;let m;t[2]!==g||t[3]!==u.slug?(m=()=>{S("automations_empty_state_browse_agents_clicked"),g({to:"/$org/settings/agents",params:{org:u.slug}})},t[2]=g,t[3]=u.slug,t[4]=m):m=t[4];const z=m,j=p,w=p,v=p;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsx(p.Title,{children:"Automations"}),t[5]=c):c=t[5];const C=d.length>0&&e.jsx(V,{value:x,onChange:k,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let s;t[6]!==C?(s=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,C]}),t[6]=C,t[7]=s):s=t[7];const N=d.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(B,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:e.jsxs($,{size:"sm",onClick:z,children:[e.jsx(O,{size:14}),"Browse agents"]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(B,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${x}"`})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(o=>e.jsx(D,{automation:o,showAgent:!0,onClick:()=>P(o.id,o.agent?.id??null)},o.id))});let i;t[8]!==v.Body||t[9]!==s||t[10]!==N?(i=e.jsxs(v.Body,{children:[s,N]}),t[8]=v.Body,t[9]=s,t[10]=N,t[11]=i):i=t[11];let r;t[12]!==w.Content||t[13]!==i?(r=e.jsx(w.Content,{children:i}),t[12]=w.Content,t[13]=i,t[14]=r):r=t[14];let l;return t[15]!==j||t[16]!==r?(l=e.jsx(j,{children:r}),t[15]=j,t[16]=r,t[17]=l):l=t[17],l}function H(t){return[t.id,t]}export{Lt as default};
1
+ import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-D7IIXROb.js";import{s as O}from"./Plus-CnK1SC2T.js";import{i as _}from"./Zap-B3a3OZUG.js";import{S as V}from"./search-input-o1N12hd4.js";import{P as p}from"./index-DU8sxbAO.js";import{E as B}from"./empty-state-KsHmVPO4.js";import{c as q,A as D}from"./automation-list-row-i8Q9Zh9Z.js";import{u as F}from"./use-navigate-to-agent-C3zfnZck.js";import{u as G}from"./use-virtual-mcp-BUyveTe6.js";import"./SearchMd-DlfhE_5j.js";import"./use-mobile-CrP2KZis.js";import"./X-BDxrsCdA.js";import"./alert-dialog-C5H0at4x.js";import"./dropdown-menu-Cye9zjaV.js";import"./ChevronDown-DgrWziJW.js";import"./ChevronRight-DJnGkhn4.js";import"./DotsVertical-om3rzQE9.js";import"./agent-icon-Dhv8pT4N.js";import"./AlertCircle-BKpPv_ue.js";import"./Tool01-X8GEQ_TP.js";import"./XClose-Bl-2e8QV.js";import"./RefreshCcw01-DESLbhAD.js";import"./ArrowNarrowLeft-DzI4-MMz.js";import"./XCircle-BJ-0U-0t.js";import"./ArrowUpRight-CgoB9CSG.js";import"./ZapSquare-Ddm4Ccl_.js";import"./Users03-BD0tlSQu.js";import"./CheckCircle-_hRmcUCr.js";import"./ChevronUp-CYzPfn3Y.js";import"./Container-CCq3u0Gk.js";import"./Star01-CWHB1ChF.js";import"./Palette-CN1aN7Xh.js";import"./LinkExternal01-DbNOYo2d.js";import"./Lock01-BsLK0x7P.js";import"./Sun-1aZYqU86.js";import"./Play-CwsBegSF.js";import"./Settings02-LVlkEIxI.js";import"./Shield01-DGTwcXqp.js";import"./Trash01-CIUqVsqV.js";import"./User01-Dds7lT_Z.js";import"./constants-fZUl7A6B.js";import"./use-collections-BosUNiJP.js";function Lt(){const t=L.c(18),{org:u}=R(),{data:y}=q(void 0),d=y===void 0?[]:y,b=G(),f=F(),g=T(),[x,k]=M.useState(""),h=x.toLowerCase(),E=new Map(b.map(H)),A=d.filter(o=>{if(!h||o.name.toLowerCase().includes(h))return!0;const n=o.agent?E.get(o.agent.id):void 0;return!!(n&&n.title.toLowerCase().includes(h))});let a;t[0]!==f?(a=(o,n)=>{n&&(S("automations_list_row_clicked",{automation_id:o,agent_id:n,source:"settings_automations"}),f(n,{search:{main:"automation:"+o}}))},t[0]=f,t[1]=a):a=t[1];const P=a;let m;t[2]!==g||t[3]!==u.slug?(m=()=>{S("automations_empty_state_browse_agents_clicked"),g({to:"/$org/settings/agents",params:{org:u.slug}})},t[2]=g,t[3]=u.slug,t[4]=m):m=t[4];const z=m,j=p,w=p,v=p;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsx(p.Title,{children:"Automations"}),t[5]=c):c=t[5];const C=d.length>0&&e.jsx(V,{value:x,onChange:k,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let s;t[6]!==C?(s=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,C]}),t[6]=C,t[7]=s):s=t[7];const N=d.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(B,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:e.jsxs($,{size:"sm",onClick:z,children:[e.jsx(O,{size:14}),"Browse agents"]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(B,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${x}"`})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(o=>e.jsx(D,{automation:o,showAgent:!0,onClick:()=>P(o.id,o.agent?.id??null)},o.id))});let i;t[8]!==v.Body||t[9]!==s||t[10]!==N?(i=e.jsxs(v.Body,{children:[s,N]}),t[8]=v.Body,t[9]=s,t[10]=N,t[11]=i):i=t[11];let r;t[12]!==w.Content||t[13]!==i?(r=e.jsx(w.Content,{children:i}),t[12]=w.Content,t[13]=i,t[14]=r):r=t[14];let l;return t[15]!==j||t[16]!==r?(l=e.jsx(j,{children:r}),t[15]=j,t[16]=r,t[17]=l):l=t[17],l}function H(t){return[t.id,t]}export{Lt as default};
@@ -1 +1 @@
1
- import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-n7SSrZJX.js";import{s as L}from"./User01-BgWj-XfO.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["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"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("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"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function G(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let F;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],F=c;break e}F=t}const C=F;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[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]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
1
+ import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-D7IIXROb.js";import{s as L}from"./User01-Dds7lT_Z.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["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"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("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"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function G(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let F;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],F=c;break e}F=t}const C=F;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[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]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
@@ -1 +1 @@
1
- import{e as d,c as g,j as u,aY as l,aX as v}from"./index-n7SSrZJX.js";const b=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/20 focus-visible:ring-[2px] 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",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,i;e[0]!==o?({className:r,variant:i,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=i):(r=e[1],s=e[2],a=e[3],i=e[4]);const c=(a===void 0?!1:a)?l:"span";let t;e[5]!==r||e[6]!==i?(t=g(b({variant:i}),r),e[5]=r,e[6]=i,e[7]=t):t=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==t?(n=u.jsx(c,{"data-slot":"badge",className:t,...s}),e[8]=c,e[9]=s,e[10]=t,e[11]=n):n=e[11],n}export{x as B};
1
+ import{e as d,c as g,j as u,aY as l,aX as v}from"./index-D7IIXROb.js";const b=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/20 focus-visible:ring-[2px] 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",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,i;e[0]!==o?({className:r,variant:i,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=i):(r=e[1],s=e[2],a=e[3],i=e[4]);const c=(a===void 0?!1:a)?l:"span";let t;e[5]!==r||e[6]!==i?(t=g(b({variant:i}),r),e[5]=r,e[6]=i,e[7]=t):t=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==t?(n=u.jsx(c,{"data-slot":"badge",className:t,...s}),e[8]=c,e[9]=s,e[10]=t,e[11]=n):n=e[11],n}export{x as B};
@@ -1 +1 @@
1
- import{e as q,a9 as ke,s as we,o as Se,K as je,n as Ee,a as ce,j as n,B as ve,t as Y,z as K,r as C,c as xe}from"./index-n7SSrZJX.js";import{S as De,u as Ae}from"./constants-Bv-ydthU.js";import{t as Be,i as Oe}from"./ChevronDown-DfsMdmf4.js";import{i as Te}from"./ChevronRight-CVhRkUc0.js";import{s as Ie,t as Fe,i as Pe}from"./Star01-B5vecVQL.js";import{n as ze}from"./LinkExternal01-M3Y1_vaI.js";import{s as ye}from"./Plus-BR3le3XA.js";import{s as Re}from"./Trash01-J7CgYdQ6.js";import{i as Le}from"./X-B94SYTq6.js";import{i as $e}from"./Zap-DbOUQQao.js";import{c as Ue,b as Ke,d as Xe,A as qe,g as Ge,e as Me,a as He,f as Qe}from"./alert-dialog-DUehP6wO.js";import{I as M}from"./input-93auOJA-.js";import{T as Ye}from"./textarea-Bx9ByRsd.js";import{P as ue}from"./index-B5cVztKY.js";import{u as Ne}from"./unwrap-tool-result-BYXdCQMg.js";import"./use-mobile-BP1wV0Dh.js";function ge(s){const e=q.c(17),{title:t,children:m,onEdit:o,editing:f,onSave:u,onCancel:l,className:p}=s,v=f&&"ring-2 ring-ring/30";let c;e[0]!==p||e[1]!==v?(c=xe("group relative rounded-2xl border border-border/60 bg-background p-5",v,p),e[0]=p,e[1]=v,e[2]=c):c=e[2];let h;e[3]!==t?(h=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let d;e[5]!==f||e[6]!==l||e[7]!==o||e[8]!==u?(d=f?n.jsxs("div",{className:"flex gap-1",children:[n.jsx("button",{type:"button",onClick:l,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:n.jsx(Le,{size:13,className:"text-muted-foreground"})}),n.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:n.jsx(Oe,{size:13,className:"text-primary"})})]}):o&&n.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:n.jsx(Pe,{size:13,className:"text-muted-foreground"})}),e[5]=f,e[6]=l,e[7]=o,e[8]=u,e[9]=d):d=e[9];let a;e[10]!==h||e[11]!==d?(a=n.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,d]}),e[10]=h,e[11]=d,e[12]=a):a=e[12];let x;return e[13]!==m||e[14]!==c||e[15]!==a?(x=n.jsxs("div",{className:c,children:[a,m]}),e[13]=m,e[14]=c,e[15]=a,e[16]=x):x=e[16],x}function Je(s){const e=q.c(25),{onExtract:t,isExtracting:m}=s,[o,f]=C.useState("");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx($e,{size:18,className:"text-primary"})}),e[0]=u):u=e[0];let l,p;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),p=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=l,e[2]=p):(l=e[1],p=e[2]);let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=r=>f(r.target.value),e[3]=v):v=e[3];let c;e[4]!==o||e[5]!==m||e[6]!==t?(c=r=>{r.key==="Enter"&&o.trim()&&!m&&t(o.trim())},e[4]=o,e[5]=m,e[6]=t,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==c?(h=n.jsx(M,{placeholder:"acme.com",value:o,onChange:v,className:"max-w-xs",onKeyDown:c}),e[8]=o,e[9]=c,e[10]=h):h=e[10];let d;e[11]!==o||e[12]!==m?(d=!o.trim()||m,e[11]=o,e[12]=m,e[13]=d):d=e[13];let a;e[14]!==o||e[15]!==t?(a=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ie,{size:14}),e[17]=x):x=e[17];const j=m?"Extracting...":"Extract";let b;e[18]!==j||e[19]!==d||e[20]!==a?(b=n.jsxs(ve,{variant:"outline",disabled:d,onClick:a,children:[x,j]}),e[18]=j,e[19]=d,e[20]=a,e[21]=b):b=e[21];let g;return e[22]!==b||e[23]!==h?(g=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[u,n.jsxs("div",{className:"flex-1",children:[l,p,n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,b]})]})]})}),e[22]=b,e[23]=h,e[24]=g):g=e[24],g}function Ve(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.name??""),[p,v]=C.useState(t.domain??""),[c,h]=C.useState(t.overview??"");let d;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(d=()=>{l(t.name??""),v(t.domain??""),h(t.overview??""),f(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==m||e[7]!==c?(x=()=>{m({name:u,domain:p,overview:c}),f(!1)},e[4]=p,e[5]=u,e[6]=m,e[7]=c,e[8]=x):x=e[8];const j=x,b=!t.name&&!t.domain&&!t.overview;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==p||e[14]!==o||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"Acme Corp"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"acme.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),n.jsx(Ye,{value:c,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):b?n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[n.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&n.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[n.jsx(ze,{size:11}),t.domain]})]}),t.overview&&n.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=p,e[14]=o,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Company Overview",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}function We(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.logo??""),[p,v]=C.useState(t.favicon??""),[c,h]=C.useState(t.ogImage??"");let d;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(d=()=>{l(t.logo??""),v(t.favicon??""),h(t.ogImage??""),f(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==c||e[7]!==m?(x=()=>{m({logo:u||null,favicon:p||null,ogImage:c||null}),f(!1)},e[4]=p,e[5]=u,e[6]=c,e[7]=m,e[8]=x):x=e[8];const j=x,b=t.logo||t.favicon||t.ogImage;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==p||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),n.jsx(M,{value:c,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):b?n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.logo?n.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-3"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No logo"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.favicon?n.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-12 w-12 object-contain"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No favicon"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Favicon"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.ogImage?n.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-contain",loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No SEO image"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"SEO / OG image"})]})]}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=p,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Logos & Images",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}const _e=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ze(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.fonts?(u=t.fonts??{},e[0]=t.fonts,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.fonts?(v=()=>{p(t.fonts??{}),f(!0)},e[2]=t.fonts,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(tt);m({fonts:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.fonts?(a=t.fonts&&Object.values(t.fonts).some(et),e[7]=t.fonts,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.fonts||e[11]!==o||e[12]!==l||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:_e.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},i)})}):x?n.jsx("div",{className:"space-y-3",children:_e.filter(r=>{const{key:i}=r;return t.fonts?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[i]}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=l,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Fonts",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function et(s){return s?.trim()}function tt(s){return s?.trim()}const Ce=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function st(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.colors?(u=t.colors??{},e[0]=t.colors,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.colors?(v=()=>{p(t.colors??{}),f(!0)},e[2]=t.colors,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(ot);m({colors:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.colors?(a=t.colors&&Object.values(t.colors).some(nt),e[7]=t.colors,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.colors||e[11]!==l||e[12]!==o||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:Ce.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:l[i]??"#000000",onChange:_=>p({...l,[i]:_.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},i)})}):x?n.jsx("div",{className:"flex flex-wrap gap-4",children:Ce.filter(r=>{const{key:i}=r;return t.colors?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[i],border:t.colors[i]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),n.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[i]}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=l,e[12]=o,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Colors",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function nt(s){return s?.trim()}function ot(s){return s?.trim()}function at(s){const e=q.c(123),{brand:t,client:m,onChanged:o}=s,[f,u]=C.useState(t.isDefault??!1),[l,p]=C.useState(!1);let v;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==m?(v=async N=>{const be={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:be})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=m,e[11]=v):v=e[11];let c;e[12]!==t.id||e[13]!==o?(c=(N,be)=>{Y("brand_updated",{brand_id:t.id,fields:Object.keys(be)}),o(),K.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=c):c=e[14];let h;e[15]!==v||e[16]!==c?(h={mutationFn:v,onSuccess:c,onError:ut},e[15]=v,e[16]=c,e[17]=h):h=e[17];const{mutate:d}=ce(h);let a;e[18]!==t.id||e[19]!==m?(a=async()=>{await m.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=t.id,e[19]=m,e[20]=a):a=e[20];let x;e[21]!==t.id||e[22]!==o?(x=()=>{Y("brand_deleted",{brand_id:t.id}),p(!1),o(),K.success("Brand deleted")},e[21]=t.id,e[22]=o,e[23]=x):x=e[23];let j;e[24]!==a||e[25]!==x?(j={mutationFn:a,onSuccess:x,onError:ft},e[24]=a,e[25]=x,e[26]=j):j=e[26];const{mutate:b,isPending:g}=ce(j);let r;e[27]!==t.id||e[28]!==t.isDefault||e[29]!==m?(r=async()=>{await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!t.isDefault}})},e[27]=t.id,e[28]=t.isDefault,e[29]=m,e[30]=r):r=e[30];let i;e[31]!==t.id||e[32]!==t.isDefault||e[33]!==o?(i=()=>{Y(t.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:t.id}),o(),K.success(t.isDefault?"Removed as default brand":"Set as default brand")},e[31]=t.id,e[32]=t.isDefault,e[33]=o,e[34]=i):i=e[34];let y;e[35]!==r||e[36]!==i?(y={mutationFn:r,onSuccess:i,onError:mt},e[35]=r,e[36]=i,e[37]=y):y=e[37];const{mutate:_}=ce(y),H=t.isDefault?"border-primary/30":"border-border/60";let F;e[38]!==H?(F=xe("rounded-2xl border bg-background",H),e[38]=H,e[39]=F):F=e[39];let P;e[40]!==f?(P=()=>u(!f),e[40]=f,e[41]=P):P=e[41];let z;e[42]!==f?(z=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f?n.jsx(Be,{size:14}):n.jsx(Te,{size:14})}),e[42]=f,e[43]=z):z=e[43];let R;e[44]!==t.logo||e[45]!==t.name?(R=t.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:dt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[44]=t.logo,e[45]=t.name,e[46]=R):R=e[46];const ie=t.name||"Untitled Brand";let B;e[47]!==ie?(B=n.jsx("span",{className:"text-sm font-medium text-foreground",children:ie}),e[47]=ie,e[48]=B):B=e[48];let w;e[49]!==t.domain?(w=t.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[49]=t.domain,e[50]=w):w=e[50];let O;e[51]!==B||e[52]!==w?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[B,w]}),e[51]=B,e[52]=w,e[53]=O):O=e[53];let S;e[54]!==t.colors||e[55]!==f?(S=!f&&t.colors&&Object.values(t.colors).some(ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(it).map(rt)}),e[54]=t.colors,e[55]=f,e[56]=S):S=e[56];let E;e[57]!==t.fonts||e[58]!==f?(E=!f&&t.fonts&&Object.values(t.fonts).some(lt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[57]=t.fonts,e[58]=f,e[59]=E):E=e[59];const Q=t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[60]!==Q?(G=xe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",Q),e[60]=Q,e[61]=G):G=e[61];let T,L;e[62]!==_?(T=N=>{N.stopPropagation(),_()},L=N=>{N.key==="Enter"&&(N.stopPropagation(),_())},e[62]=_,e[63]=T,e[64]=L):(T=e[63],L=e[64]);const $=t.isDefault?"Unset as default":"Set as default",U=t.isDefault?"text-primary fill-primary":"text-muted-foreground";let D;e[65]!==U?(D=xe(U),e[65]=U,e[66]=D):D=e[66];let A;e[67]!==D?(A=n.jsx(Fe,{size:13,className:D}),e[67]=D,e[68]=A):A=e[68];let I;e[69]!==G||e[70]!==T||e[71]!==L||e[72]!==$||e[73]!==A?(I=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:T,onKeyDown:L,title:$,children:A}),e[69]=G,e[70]=T,e[71]=L,e[72]=$,e[73]=A,e[74]=I):I=e[74];let k,X;e[75]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.stopPropagation(),p(!0)},X=N=>{N.key==="Enter"&&(N.stopPropagation(),p(!0))},e[75]=k,e[76]=X):(k=e[75],X=e[76]);let de;e[77]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:k,onKeyDown:X,title:"Delete brand",children:n.jsx(Re,{size:13,className:"text-muted-foreground"})}),e[77]=de):de=e[77];let J;e[78]!==P||e[79]!==z||e[80]!==R||e[81]!==O||e[82]!==S||e[83]!==E||e[84]!==I?(J=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[z,R,O,S,E,I,de]}),e[78]=P,e[79]=z,e[80]=R,e[81]=O,e[82]=S,e[83]=E,e[84]=I,e[85]=J):J=e[85];let V;e[86]!==t||e[87]!==f||e[88]!==d?(V=f&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(Ve,{brand:t,onSave:d}),n.jsx(We,{brand:t,onSave:d}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(st,{brand:t,onSave:d}),n.jsx(Ze,{brand:t,onSave:d})]})]}),e[86]=t,e[87]=f,e[88]=d,e[89]=V):V=e[89];let W;e[90]!==g?(W=N=>{!N&&!g&&p(!1)},e[90]=g,e[91]=W):W=e[91];let me;e[92]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Ue,{children:"Delete brand?"}),e[92]=me):me=e[92];const pe=t.name||"this brand";let Z;e[93]!==pe?(Z=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:pe}),". This action cannot be undone."]}),e[93]=pe,e[94]=Z):Z=e[94];let ee;e[95]!==t.isDefault?(ee=t.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[95]=t.isDefault,e[96]=ee):ee=e[96];let te;e[97]!==Z||e[98]!==ee?(te=n.jsxs(Ke,{children:[me,n.jsx(Xe,{asChild:!0,children:n.jsxs("div",{children:[Z,ee]})})]}),e[97]=Z,e[98]=ee,e[99]=te):te=e[99];let se;e[100]!==g?(se=n.jsx(qe,{disabled:g,children:"Cancel"}),e[100]=g,e[101]=se):se=e[101];let ne;e[102]!==b?(ne=N=>{N.preventDefault(),b()},e[102]=b,e[103]=ne):ne=e[103];const he=g?"Deleting...":"Delete";let oe;e[104]!==g||e[105]!==ne||e[106]!==he?(oe=n.jsx(Ge,{onClick:ne,disabled:g,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:he}),e[104]=g,e[105]=ne,e[106]=he,e[107]=oe):oe=e[107];let ae;e[108]!==se||e[109]!==oe?(ae=n.jsxs(Me,{children:[se,oe]}),e[108]=se,e[109]=oe,e[110]=ae):ae=e[110];let le;e[111]!==te||e[112]!==ae?(le=n.jsxs(He,{children:[te,ae]}),e[111]=te,e[112]=ae,e[113]=le):le=e[113];let re;e[114]!==l||e[115]!==W||e[116]!==le?(re=n.jsx(Qe,{open:l,onOpenChange:W,children:le}),e[114]=l,e[115]=W,e[116]=le,e[117]=re):re=e[117];let fe;return e[118]!==F||e[119]!==J||e[120]!==V||e[121]!==re?(fe=n.jsxs("div",{className:F,children:[J,V,re]}),e[118]=F,e[119]=J,e[120]=V,e[121]=re,e[122]=fe):fe=e[122],fe}function lt(s){return s}function rt(s){const[e,t]=s;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function it(s){const[,e]=s;return e}function ct(s){return s}function dt(s){s.target.style.display="none"}function mt(){return K.error("Failed to update default brand")}function ft(){return K.error("Failed to delete brand")}function ut(){return K.error("Failed to save brand context")}function xt(){const s=q.c(56),{brandExtractEnabled:e}=ke(),{org:t}=we();let m;s[0]!==t.id?(m={connectionId:De,orgId:t.id},s[0]=t.id,s[1]=m):m=s[1];const o=Ae(m),f=Se();let u;s[2]!==t.id?(u=je.brandContext(t.id),s[2]=t.id,s[3]=u):u=s[3];let l;s[4]!==o?(l=async()=>{const k=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),X=Ne(k);return Array.isArray(X?.items)?X.items:[]},s[4]=o,s[5]=l):l=s[5];let p;s[6]!==u||s[7]!==l?(p={queryKey:u,queryFn:l},s[6]=u,s[7]=l,s[8]=p):p=s[8];const{data:v}=Ee(p),h=(v===void 0?[]:v).filter(ht);let d;s[9]!==t.id||s[10]!==f?(d=()=>f.invalidateQueries({queryKey:je.brandContext(t.id),refetchType:"all"}),s[9]=t.id,s[10]=f,s[11]=d):d=s[11];const a=d;let x;s[12]!==o?(x=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},s[12]=o,s[13]=x):x=s[13];let j;s[14]!==a?(j=()=>{Y("brand_created"),a(),K.success("Brand created")},s[14]=a,s[15]=j):j=s[15];let b;s[16]!==x||s[17]!==j?(b={mutationFn:x,onSuccess:j,onError:pt},s[16]=x,s[17]=j,s[18]=b):b=s[18];const{mutate:g,isPending:r}=ce(b);let i;s[19]!==o?(i=async k=>{Y("brand_extract_started",{domain:k});const X=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:k}});Ne(X)},s[19]=o,s[20]=i):i=s[20];let y;s[21]!==a?(y=()=>{Y("brand_extract_succeeded"),a(),K.success("Brand extracted successfully")},s[21]=a,s[22]=y):y=s[22];let _;s[23]!==y||s[24]!==i?(_={mutationFn:i,onSuccess:y,onError:gt},s[23]=y,s[24]=i,s[25]=_):_=s[25];const{mutate:H,isPending:F}=ce(_),P=ue,z=ue,R=ue,ie="flex flex-col gap-6";let B;s[26]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{children:[n.jsx(ue.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),s[26]=B):B=s[26];let w;s[27]!==g?(w=()=>g(),s[27]=g,s[28]=w):w=s[28];let O;s[29]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ye,{size:14}),s[29]=O):O=s[29];let S;s[30]!==r||s[31]!==w?(S=n.jsxs("div",{className:"flex items-center justify-between",children:[B,n.jsxs(ve,{variant:"outline",onClick:w,disabled:r,children:[O,"Add Brand"]})]}),s[30]=r,s[31]=w,s[32]=S):S=s[32];let E;s[33]!==e||s[34]!==H||s[35]!==F?(E=e&&n.jsx(Je,{onExtract:k=>H(k),isExtracting:F}),s[33]=e,s[34]=H,s[35]=F,s[36]=E):E=s[36];const Q=h.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(ve,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>g(),disabled:r,children:[n.jsx(ye,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let T;s[37]!==o||s[38]!==a?(T=k=>n.jsx(at,{brand:k,client:o,onChanged:a},k.id),s[37]=o,s[38]=a,s[39]=T):T=s[39];const L=h.map(T);let $;s[40]!==L?($=n.jsx("div",{className:G,children:L}),s[40]=L,s[41]=$):$=s[41];let U;s[42]!==S||s[43]!==E||s[44]!==Q||s[45]!==$?(U=n.jsxs("div",{className:ie,children:[S,E,Q,$]}),s[42]=S,s[43]=E,s[44]=Q,s[45]=$,s[46]=U):U=s[46];let D;s[47]!==R.Body||s[48]!==U?(D=n.jsx(R.Body,{children:U}),s[47]=R.Body,s[48]=U,s[49]=D):D=s[49];let A;s[50]!==z.Content||s[51]!==D?(A=n.jsx(z.Content,{children:D}),s[50]=z.Content,s[51]=D,s[52]=A):A=s[52];let I;return s[53]!==P||s[54]!==A?(I=n.jsx(P,{children:A}),s[53]=P,s[54]=A,s[55]=I):I=s[55],I}function gt(s){Y("brand_extract_failed",{error:s instanceof Error?s.message:"unknown"}),K.error(s instanceof Error?s.message:"Failed to extract brand")}function pt(){return K.error("Failed to create brand")}function ht(s){return!s.archivedAt}function It(){const s=q.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{}),s[0]=e):e=s[0],e}export{It as default};
1
+ import{e as q,a9 as ke,s as we,o as Se,K as je,n as Ee,a as ce,j as n,B as ve,t as Y,z as K,r as C,c as xe}from"./index-D7IIXROb.js";import{S as De,u as Ae}from"./constants-fZUl7A6B.js";import{t as Be,i as Oe}from"./ChevronDown-DgrWziJW.js";import{i as Te}from"./ChevronRight-DJnGkhn4.js";import{s as Ie,t as Fe,i as Pe}from"./Star01-CWHB1ChF.js";import{n as ze}from"./LinkExternal01-DbNOYo2d.js";import{s as ye}from"./Plus-CnK1SC2T.js";import{s as Re}from"./Trash01-CIUqVsqV.js";import{i as Le}from"./X-BDxrsCdA.js";import{i as $e}from"./Zap-B3a3OZUG.js";import{c as Ue,b as Ke,d as Xe,A as qe,g as Ge,e as Me,a as He,f as Qe}from"./alert-dialog-C5H0at4x.js";import{I as M}from"./input-C-zd9-6X.js";import{T as Ye}from"./textarea-CFCCYt2a.js";import{P as ue}from"./index-DU8sxbAO.js";import{u as Ne}from"./unwrap-tool-result-BYXdCQMg.js";import"./use-mobile-CrP2KZis.js";function ge(s){const e=q.c(17),{title:t,children:m,onEdit:o,editing:f,onSave:u,onCancel:l,className:p}=s,v=f&&"ring-2 ring-ring/30";let c;e[0]!==p||e[1]!==v?(c=xe("group relative rounded-2xl border border-border/60 bg-background p-5",v,p),e[0]=p,e[1]=v,e[2]=c):c=e[2];let h;e[3]!==t?(h=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let d;e[5]!==f||e[6]!==l||e[7]!==o||e[8]!==u?(d=f?n.jsxs("div",{className:"flex gap-1",children:[n.jsx("button",{type:"button",onClick:l,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:n.jsx(Le,{size:13,className:"text-muted-foreground"})}),n.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:n.jsx(Oe,{size:13,className:"text-primary"})})]}):o&&n.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:n.jsx(Pe,{size:13,className:"text-muted-foreground"})}),e[5]=f,e[6]=l,e[7]=o,e[8]=u,e[9]=d):d=e[9];let a;e[10]!==h||e[11]!==d?(a=n.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,d]}),e[10]=h,e[11]=d,e[12]=a):a=e[12];let x;return e[13]!==m||e[14]!==c||e[15]!==a?(x=n.jsxs("div",{className:c,children:[a,m]}),e[13]=m,e[14]=c,e[15]=a,e[16]=x):x=e[16],x}function Je(s){const e=q.c(25),{onExtract:t,isExtracting:m}=s,[o,f]=C.useState("");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx($e,{size:18,className:"text-primary"})}),e[0]=u):u=e[0];let l,p;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),p=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=l,e[2]=p):(l=e[1],p=e[2]);let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=r=>f(r.target.value),e[3]=v):v=e[3];let c;e[4]!==o||e[5]!==m||e[6]!==t?(c=r=>{r.key==="Enter"&&o.trim()&&!m&&t(o.trim())},e[4]=o,e[5]=m,e[6]=t,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==c?(h=n.jsx(M,{placeholder:"acme.com",value:o,onChange:v,className:"max-w-xs",onKeyDown:c}),e[8]=o,e[9]=c,e[10]=h):h=e[10];let d;e[11]!==o||e[12]!==m?(d=!o.trim()||m,e[11]=o,e[12]=m,e[13]=d):d=e[13];let a;e[14]!==o||e[15]!==t?(a=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ie,{size:14}),e[17]=x):x=e[17];const j=m?"Extracting...":"Extract";let b;e[18]!==j||e[19]!==d||e[20]!==a?(b=n.jsxs(ve,{variant:"outline",disabled:d,onClick:a,children:[x,j]}),e[18]=j,e[19]=d,e[20]=a,e[21]=b):b=e[21];let g;return e[22]!==b||e[23]!==h?(g=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[u,n.jsxs("div",{className:"flex-1",children:[l,p,n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,b]})]})]})}),e[22]=b,e[23]=h,e[24]=g):g=e[24],g}function Ve(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.name??""),[p,v]=C.useState(t.domain??""),[c,h]=C.useState(t.overview??"");let d;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(d=()=>{l(t.name??""),v(t.domain??""),h(t.overview??""),f(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==m||e[7]!==c?(x=()=>{m({name:u,domain:p,overview:c}),f(!1)},e[4]=p,e[5]=u,e[6]=m,e[7]=c,e[8]=x):x=e[8];const j=x,b=!t.name&&!t.domain&&!t.overview;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==p||e[14]!==o||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"Acme Corp"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"acme.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),n.jsx(Ye,{value:c,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):b?n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[n.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&n.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[n.jsx(ze,{size:11}),t.domain]})]}),t.overview&&n.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=p,e[14]=o,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Company Overview",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}function We(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.logo??""),[p,v]=C.useState(t.favicon??""),[c,h]=C.useState(t.ogImage??"");let d;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(d=()=>{l(t.logo??""),v(t.favicon??""),h(t.ogImage??""),f(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==c||e[7]!==m?(x=()=>{m({logo:u||null,favicon:p||null,ogImage:c||null}),f(!1)},e[4]=p,e[5]=u,e[6]=c,e[7]=m,e[8]=x):x=e[8];const j=x,b=t.logo||t.favicon||t.ogImage;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==p||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),n.jsx(M,{value:c,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):b?n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.logo?n.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-3"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No logo"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.favicon?n.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-12 w-12 object-contain"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No favicon"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Favicon"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.ogImage?n.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-contain",loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No SEO image"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"SEO / OG image"})]})]}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=p,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Logos & Images",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}const _e=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ze(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.fonts?(u=t.fonts??{},e[0]=t.fonts,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.fonts?(v=()=>{p(t.fonts??{}),f(!0)},e[2]=t.fonts,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(tt);m({fonts:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.fonts?(a=t.fonts&&Object.values(t.fonts).some(et),e[7]=t.fonts,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.fonts||e[11]!==o||e[12]!==l||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:_e.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},i)})}):x?n.jsx("div",{className:"space-y-3",children:_e.filter(r=>{const{key:i}=r;return t.fonts?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[i]}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=l,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Fonts",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function et(s){return s?.trim()}function tt(s){return s?.trim()}const Ce=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function st(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.colors?(u=t.colors??{},e[0]=t.colors,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.colors?(v=()=>{p(t.colors??{}),f(!0)},e[2]=t.colors,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(ot);m({colors:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.colors?(a=t.colors&&Object.values(t.colors).some(nt),e[7]=t.colors,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.colors||e[11]!==l||e[12]!==o||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:Ce.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:l[i]??"#000000",onChange:_=>p({...l,[i]:_.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},i)})}):x?n.jsx("div",{className:"flex flex-wrap gap-4",children:Ce.filter(r=>{const{key:i}=r;return t.colors?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[i],border:t.colors[i]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),n.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[i]}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=l,e[12]=o,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Colors",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function nt(s){return s?.trim()}function ot(s){return s?.trim()}function at(s){const e=q.c(123),{brand:t,client:m,onChanged:o}=s,[f,u]=C.useState(t.isDefault??!1),[l,p]=C.useState(!1);let v;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==m?(v=async N=>{const be={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:be})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=m,e[11]=v):v=e[11];let c;e[12]!==t.id||e[13]!==o?(c=(N,be)=>{Y("brand_updated",{brand_id:t.id,fields:Object.keys(be)}),o(),K.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=c):c=e[14];let h;e[15]!==v||e[16]!==c?(h={mutationFn:v,onSuccess:c,onError:ut},e[15]=v,e[16]=c,e[17]=h):h=e[17];const{mutate:d}=ce(h);let a;e[18]!==t.id||e[19]!==m?(a=async()=>{await m.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=t.id,e[19]=m,e[20]=a):a=e[20];let x;e[21]!==t.id||e[22]!==o?(x=()=>{Y("brand_deleted",{brand_id:t.id}),p(!1),o(),K.success("Brand deleted")},e[21]=t.id,e[22]=o,e[23]=x):x=e[23];let j;e[24]!==a||e[25]!==x?(j={mutationFn:a,onSuccess:x,onError:ft},e[24]=a,e[25]=x,e[26]=j):j=e[26];const{mutate:b,isPending:g}=ce(j);let r;e[27]!==t.id||e[28]!==t.isDefault||e[29]!==m?(r=async()=>{await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!t.isDefault}})},e[27]=t.id,e[28]=t.isDefault,e[29]=m,e[30]=r):r=e[30];let i;e[31]!==t.id||e[32]!==t.isDefault||e[33]!==o?(i=()=>{Y(t.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:t.id}),o(),K.success(t.isDefault?"Removed as default brand":"Set as default brand")},e[31]=t.id,e[32]=t.isDefault,e[33]=o,e[34]=i):i=e[34];let y;e[35]!==r||e[36]!==i?(y={mutationFn:r,onSuccess:i,onError:mt},e[35]=r,e[36]=i,e[37]=y):y=e[37];const{mutate:_}=ce(y),H=t.isDefault?"border-primary/30":"border-border/60";let F;e[38]!==H?(F=xe("rounded-2xl border bg-background",H),e[38]=H,e[39]=F):F=e[39];let P;e[40]!==f?(P=()=>u(!f),e[40]=f,e[41]=P):P=e[41];let z;e[42]!==f?(z=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f?n.jsx(Be,{size:14}):n.jsx(Te,{size:14})}),e[42]=f,e[43]=z):z=e[43];let R;e[44]!==t.logo||e[45]!==t.name?(R=t.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:dt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[44]=t.logo,e[45]=t.name,e[46]=R):R=e[46];const ie=t.name||"Untitled Brand";let B;e[47]!==ie?(B=n.jsx("span",{className:"text-sm font-medium text-foreground",children:ie}),e[47]=ie,e[48]=B):B=e[48];let w;e[49]!==t.domain?(w=t.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[49]=t.domain,e[50]=w):w=e[50];let O;e[51]!==B||e[52]!==w?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[B,w]}),e[51]=B,e[52]=w,e[53]=O):O=e[53];let S;e[54]!==t.colors||e[55]!==f?(S=!f&&t.colors&&Object.values(t.colors).some(ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(it).map(rt)}),e[54]=t.colors,e[55]=f,e[56]=S):S=e[56];let E;e[57]!==t.fonts||e[58]!==f?(E=!f&&t.fonts&&Object.values(t.fonts).some(lt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[57]=t.fonts,e[58]=f,e[59]=E):E=e[59];const Q=t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[60]!==Q?(G=xe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",Q),e[60]=Q,e[61]=G):G=e[61];let T,L;e[62]!==_?(T=N=>{N.stopPropagation(),_()},L=N=>{N.key==="Enter"&&(N.stopPropagation(),_())},e[62]=_,e[63]=T,e[64]=L):(T=e[63],L=e[64]);const $=t.isDefault?"Unset as default":"Set as default",U=t.isDefault?"text-primary fill-primary":"text-muted-foreground";let D;e[65]!==U?(D=xe(U),e[65]=U,e[66]=D):D=e[66];let A;e[67]!==D?(A=n.jsx(Fe,{size:13,className:D}),e[67]=D,e[68]=A):A=e[68];let I;e[69]!==G||e[70]!==T||e[71]!==L||e[72]!==$||e[73]!==A?(I=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:T,onKeyDown:L,title:$,children:A}),e[69]=G,e[70]=T,e[71]=L,e[72]=$,e[73]=A,e[74]=I):I=e[74];let k,X;e[75]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.stopPropagation(),p(!0)},X=N=>{N.key==="Enter"&&(N.stopPropagation(),p(!0))},e[75]=k,e[76]=X):(k=e[75],X=e[76]);let de;e[77]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:k,onKeyDown:X,title:"Delete brand",children:n.jsx(Re,{size:13,className:"text-muted-foreground"})}),e[77]=de):de=e[77];let J;e[78]!==P||e[79]!==z||e[80]!==R||e[81]!==O||e[82]!==S||e[83]!==E||e[84]!==I?(J=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[z,R,O,S,E,I,de]}),e[78]=P,e[79]=z,e[80]=R,e[81]=O,e[82]=S,e[83]=E,e[84]=I,e[85]=J):J=e[85];let V;e[86]!==t||e[87]!==f||e[88]!==d?(V=f&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(Ve,{brand:t,onSave:d}),n.jsx(We,{brand:t,onSave:d}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(st,{brand:t,onSave:d}),n.jsx(Ze,{brand:t,onSave:d})]})]}),e[86]=t,e[87]=f,e[88]=d,e[89]=V):V=e[89];let W;e[90]!==g?(W=N=>{!N&&!g&&p(!1)},e[90]=g,e[91]=W):W=e[91];let me;e[92]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Ue,{children:"Delete brand?"}),e[92]=me):me=e[92];const pe=t.name||"this brand";let Z;e[93]!==pe?(Z=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:pe}),". This action cannot be undone."]}),e[93]=pe,e[94]=Z):Z=e[94];let ee;e[95]!==t.isDefault?(ee=t.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[95]=t.isDefault,e[96]=ee):ee=e[96];let te;e[97]!==Z||e[98]!==ee?(te=n.jsxs(Ke,{children:[me,n.jsx(Xe,{asChild:!0,children:n.jsxs("div",{children:[Z,ee]})})]}),e[97]=Z,e[98]=ee,e[99]=te):te=e[99];let se;e[100]!==g?(se=n.jsx(qe,{disabled:g,children:"Cancel"}),e[100]=g,e[101]=se):se=e[101];let ne;e[102]!==b?(ne=N=>{N.preventDefault(),b()},e[102]=b,e[103]=ne):ne=e[103];const he=g?"Deleting...":"Delete";let oe;e[104]!==g||e[105]!==ne||e[106]!==he?(oe=n.jsx(Ge,{onClick:ne,disabled:g,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:he}),e[104]=g,e[105]=ne,e[106]=he,e[107]=oe):oe=e[107];let ae;e[108]!==se||e[109]!==oe?(ae=n.jsxs(Me,{children:[se,oe]}),e[108]=se,e[109]=oe,e[110]=ae):ae=e[110];let le;e[111]!==te||e[112]!==ae?(le=n.jsxs(He,{children:[te,ae]}),e[111]=te,e[112]=ae,e[113]=le):le=e[113];let re;e[114]!==l||e[115]!==W||e[116]!==le?(re=n.jsx(Qe,{open:l,onOpenChange:W,children:le}),e[114]=l,e[115]=W,e[116]=le,e[117]=re):re=e[117];let fe;return e[118]!==F||e[119]!==J||e[120]!==V||e[121]!==re?(fe=n.jsxs("div",{className:F,children:[J,V,re]}),e[118]=F,e[119]=J,e[120]=V,e[121]=re,e[122]=fe):fe=e[122],fe}function lt(s){return s}function rt(s){const[e,t]=s;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function it(s){const[,e]=s;return e}function ct(s){return s}function dt(s){s.target.style.display="none"}function mt(){return K.error("Failed to update default brand")}function ft(){return K.error("Failed to delete brand")}function ut(){return K.error("Failed to save brand context")}function xt(){const s=q.c(56),{brandExtractEnabled:e}=ke(),{org:t}=we();let m;s[0]!==t.id?(m={connectionId:De,orgId:t.id},s[0]=t.id,s[1]=m):m=s[1];const o=Ae(m),f=Se();let u;s[2]!==t.id?(u=je.brandContext(t.id),s[2]=t.id,s[3]=u):u=s[3];let l;s[4]!==o?(l=async()=>{const k=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),X=Ne(k);return Array.isArray(X?.items)?X.items:[]},s[4]=o,s[5]=l):l=s[5];let p;s[6]!==u||s[7]!==l?(p={queryKey:u,queryFn:l},s[6]=u,s[7]=l,s[8]=p):p=s[8];const{data:v}=Ee(p),h=(v===void 0?[]:v).filter(ht);let d;s[9]!==t.id||s[10]!==f?(d=()=>f.invalidateQueries({queryKey:je.brandContext(t.id),refetchType:"all"}),s[9]=t.id,s[10]=f,s[11]=d):d=s[11];const a=d;let x;s[12]!==o?(x=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},s[12]=o,s[13]=x):x=s[13];let j;s[14]!==a?(j=()=>{Y("brand_created"),a(),K.success("Brand created")},s[14]=a,s[15]=j):j=s[15];let b;s[16]!==x||s[17]!==j?(b={mutationFn:x,onSuccess:j,onError:pt},s[16]=x,s[17]=j,s[18]=b):b=s[18];const{mutate:g,isPending:r}=ce(b);let i;s[19]!==o?(i=async k=>{Y("brand_extract_started",{domain:k});const X=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:k}});Ne(X)},s[19]=o,s[20]=i):i=s[20];let y;s[21]!==a?(y=()=>{Y("brand_extract_succeeded"),a(),K.success("Brand extracted successfully")},s[21]=a,s[22]=y):y=s[22];let _;s[23]!==y||s[24]!==i?(_={mutationFn:i,onSuccess:y,onError:gt},s[23]=y,s[24]=i,s[25]=_):_=s[25];const{mutate:H,isPending:F}=ce(_),P=ue,z=ue,R=ue,ie="flex flex-col gap-6";let B;s[26]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{children:[n.jsx(ue.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),s[26]=B):B=s[26];let w;s[27]!==g?(w=()=>g(),s[27]=g,s[28]=w):w=s[28];let O;s[29]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ye,{size:14}),s[29]=O):O=s[29];let S;s[30]!==r||s[31]!==w?(S=n.jsxs("div",{className:"flex items-center justify-between",children:[B,n.jsxs(ve,{variant:"outline",onClick:w,disabled:r,children:[O,"Add Brand"]})]}),s[30]=r,s[31]=w,s[32]=S):S=s[32];let E;s[33]!==e||s[34]!==H||s[35]!==F?(E=e&&n.jsx(Je,{onExtract:k=>H(k),isExtracting:F}),s[33]=e,s[34]=H,s[35]=F,s[36]=E):E=s[36];const Q=h.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(ve,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>g(),disabled:r,children:[n.jsx(ye,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let T;s[37]!==o||s[38]!==a?(T=k=>n.jsx(at,{brand:k,client:o,onChanged:a},k.id),s[37]=o,s[38]=a,s[39]=T):T=s[39];const L=h.map(T);let $;s[40]!==L?($=n.jsx("div",{className:G,children:L}),s[40]=L,s[41]=$):$=s[41];let U;s[42]!==S||s[43]!==E||s[44]!==Q||s[45]!==$?(U=n.jsxs("div",{className:ie,children:[S,E,Q,$]}),s[42]=S,s[43]=E,s[44]=Q,s[45]=$,s[46]=U):U=s[46];let D;s[47]!==R.Body||s[48]!==U?(D=n.jsx(R.Body,{children:U}),s[47]=R.Body,s[48]=U,s[49]=D):D=s[49];let A;s[50]!==z.Content||s[51]!==D?(A=n.jsx(z.Content,{children:D}),s[50]=z.Content,s[51]=D,s[52]=A):A=s[52];let I;return s[53]!==P||s[54]!==A?(I=n.jsx(P,{children:A}),s[53]=P,s[54]=A,s[55]=I):I=s[55],I}function gt(s){Y("brand_extract_failed",{error:s instanceof Error?s.message:"unknown"}),K.error(s instanceof Error?s.message:"Failed to extract brand")}function pt(){return K.error("Failed to create brand")}function ht(s){return!s.archivedAt}function It(){const s=q.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{}),s[0]=e):e=s[0],e}export{It as default};
@@ -1 +1 @@
1
- import{e as l,c as n,j as c}from"./index-n7SSrZJX.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
1
+ import{e as l,c as n,j as c}from"./index-D7IIXROb.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};