decocms 2.343.5 → 2.343.6

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 (208) hide show
  1. package/dist/client/assets/{AlertCircle-DMn4ErF7.js → AlertCircle-B2eHj7e1.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-DRMMU-Rx.js → ArrowNarrowLeft-CxcqihTL.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-BG1qVEu5.js → ArrowUpRight-Bmxv_5f2.js} +1 -1
  4. package/dist/client/assets/{Building02-DXFrqtM4.js → Building02-DhlHp14j.js} +1 -1
  5. package/dist/client/assets/{Check-CgJkW5mO.js → Check-DKPiDw0v.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BhQF3J-G.js → CheckCircle-BS-i9SgB.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-C6CmTT2m.js → ChevronDown-C2svK15b.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-9ST8kRHp.js → ChevronRight-D_jXf5Kp.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DYBcJQJI.js → ChevronUp-CVfkcqtl.js} +1 -1
  10. package/dist/client/assets/{Container-DvJcXzPK.js → Container-BkK0DB__.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-BWVeD_Nu.js → DotsVertical-C0edSuvc.js} +1 -1
  12. package/dist/client/assets/{Key01-CToqdwOF.js → Key01-CRTO9Eqv.js} +1 -1
  13. package/dist/client/assets/{LayoutLeft-msnP7LxF.js → LayoutLeft-PSosyh8W.js} +1 -1
  14. package/dist/client/assets/{LinkExternal01-BYFbxPa2.js → LinkExternal01-8dkTfrKr.js} +1 -1
  15. package/dist/client/assets/{Lock01-Br965pCK.js → Lock01-D3HzAQHN.js} +1 -1
  16. package/dist/client/assets/{Monitor01-CeCWg7Jm.js → Monitor01-CE0kuy60.js} +1 -1
  17. package/dist/client/assets/{Palette-CTxrzTV6.js → Palette-K4YZYTyg.js} +1 -1
  18. package/dist/client/assets/{Play-Y01bx8MI.js → Play-DfLpvTAf.js} +1 -1
  19. package/dist/client/assets/{Plus-DZMvWlgN.js → Plus-DUbqF6rK.js} +1 -1
  20. package/dist/client/assets/{RefreshCcw01-STdDbh6L.js → RefreshCcw01-B-Cq3kpB.js} +1 -1
  21. package/dist/client/assets/{SearchLg-tmO6QRl-.js → SearchLg-CWYSpRcF.js} +1 -1
  22. package/dist/client/assets/{SearchMd-i7Gp8R_i.js → SearchMd-Dpur_ahX.js} +1 -1
  23. package/dist/client/assets/{Settings02-Ca5SX90W.js → Settings02-CJ09Har8.js} +1 -1
  24. package/dist/client/assets/{Shield01-56gTI-65.js → Shield01-CnFfMzTJ.js} +1 -1
  25. package/dist/client/assets/{Star01-B7Wf0BA4.js → Star01-f02R5Lt3.js} +1 -1
  26. package/dist/client/assets/{Sun-JMAHaccL.js → Sun-GgIgazyF.js} +1 -1
  27. package/dist/client/assets/{Tool01-Ck4wzkil.js → Tool01-CIld76-5.js} +1 -1
  28. package/dist/client/assets/{Trash01-DZil92Jh.js → Trash01-cTgn14Wa.js} +1 -1
  29. package/dist/client/assets/{Upload01-B0HbOxqP.js → Upload01-HhDlaYLd.js} +1 -1
  30. package/dist/client/assets/{User01-Bb_7ado6.js → User01-CUr_vH6R.js} +1 -1
  31. package/dist/client/assets/{Users01-CCKc6ep2.js → Users01-DfpmcJ6n.js} +1 -1
  32. package/dist/client/assets/{Users03-9Msw3sAO.js → Users03-DFib9kg8.js} +1 -1
  33. package/dist/client/assets/{X-DDsITeaO.js → X-KaP-9Zgp.js} +1 -1
  34. package/dist/client/assets/{XCircle-zMGNHwa8.js → XCircle-CmRYIXoV.js} +1 -1
  35. package/dist/client/assets/{XClose-BfGe8XlD.js → XClose-BTeq1oZe.js} +1 -1
  36. package/dist/client/assets/{Zap-D1hcdQQV.js → Zap-BuqS_qna.js} +1 -1
  37. package/dist/client/assets/{ZapSquare-DbH77Z5v.js → ZapSquare-BNz1wDNr.js} +1 -1
  38. package/dist/client/assets/{accordion-BJxZ1Mun.js → accordion-f3g-k3lM.js} +1 -1
  39. package/dist/client/assets/{agent-icon-sU9yNgMj.js → agent-icon-DhO8qmda.js} +1 -1
  40. package/dist/client/assets/{agent-models-B_Glgacf.js → agent-models-DuOluvdI.js} +1 -1
  41. package/dist/client/assets/{agents-list-DH1mAh-Z.js → agents-list-CGNMOYSa.js} +1 -1
  42. package/dist/client/assets/{ai-providers-C-PBt61H.js → ai-providers-Cktx7Vm2.js} +1 -1
  43. package/dist/client/assets/{alert-dialog-CsOiC1Gz.js → alert-dialog-6PLIDXks.js} +1 -1
  44. package/dist/client/assets/{auth-catchall-BNUhQHYq.js → auth-catchall-Ccm8W1GX.js} +1 -1
  45. package/dist/client/assets/{auth-split-layout-i-geOrIj.js → auth-split-layout-CMVWo7nP.js} +1 -1
  46. package/dist/client/assets/{automation-list-row-Cvf312NN.js → automation-list-row-Brz_krF-.js} +1 -1
  47. package/dist/client/assets/{automations-iqMyNrX4.js → automations-_NK1-A6q.js} +1 -1
  48. package/dist/client/assets/{avatar-Ds0wPNKF.js → avatar-B8vNPMYL.js} +1 -1
  49. package/dist/client/assets/{badge-C2JMvH6Q.js → badge--5VL1-K0.js} +1 -1
  50. package/dist/client/assets/{brand-context-B-0ozW8j.js → brand-context-CUPYEhfL.js} +1 -1
  51. package/dist/client/assets/{card-mSB2lAWB.js → card-BAPVTNeM.js} +1 -1
  52. package/dist/client/assets/{chat-context-DR6dQnLy.js → chat-context-0IKLT4wq.js} +1 -1
  53. package/dist/client/assets/{checkbox-DPaoVVrP.js → checkbox-BQ4sRBrQ.js} +1 -1
  54. package/dist/client/assets/{collection-detail-CMmWJSl9.js → collection-detail-BFyVunit.js} +1 -1
  55. package/dist/client/assets/{collection-display-button-C0IyjKMk.js → collection-display-button-YhJUEiHz.js} +1 -1
  56. package/dist/client/assets/{collection-search-Dbo118DH.js → collection-search-C_-yILXl.js} +1 -1
  57. package/dist/client/assets/{collection-search-DcWbN0tR.js → collection-search-DD55_3nh.js} +1 -1
  58. package/dist/client/assets/{collection-table-wrapper-iHZqG4EL.js → collection-table-wrapper-TX9-kk8m.js} +1 -1
  59. package/dist/client/assets/{collection-tabs-xlUwBk7w.js → collection-tabs-y0cy_oLu.js} +1 -1
  60. package/dist/client/assets/{collections-D64xxjNO.js → collections-38BsWSzW.js} +1 -1
  61. package/dist/client/assets/{command-0hO6Is11.js → command-D0zg2xR7.js} +1 -1
  62. package/dist/client/assets/{connection-card-Dmpozita.js → connection-card-BmgME3nF.js} +1 -1
  63. package/dist/client/assets/{connection-detail-Be6icjyq.js → connection-detail-CBouLj3k.js} +1 -1
  64. package/dist/client/assets/{connection-form-helpers-DIYVQOJo.js → connection-form-helpers-mYM6wAEh.js} +1 -1
  65. package/dist/client/assets/{connections-CGtSBpA-.js → connections-DN5RucSd.js} +1 -1
  66. package/dist/client/assets/{constants-DPVM1Ytu.js → constants-CPVZA0XC.js} +1 -1
  67. package/dist/client/assets/{constants-DG2sk_0H.js → constants-dLpaUsN8.js} +1 -1
  68. package/dist/client/assets/{decopilot-sse-pool-BMdviN8X.js → decopilot-sse-pool-XfO9dGEQ.js} +1 -1
  69. package/dist/client/assets/{dialog-xU6O08Hz.js → dialog-DeF_jmhK.js} +1 -1
  70. package/dist/client/assets/{domain-settings-CmWnBxMx.js → domain-settings-CuhYxhnp.js} +1 -1
  71. package/dist/client/assets/{drawer-Bftoew7Y.js → drawer-VlebDb69.js} +1 -1
  72. package/dist/client/assets/{dropdown-menu-37ioHY85.js → dropdown-menu-roylZYWc.js} +1 -1
  73. package/dist/client/assets/{dynamic-plugin-layout-BdEqqluD.js → dynamic-plugin-layout-B4eJnbCb.js} +1 -1
  74. package/dist/client/assets/{empty-state-DTkqsJki.js → empty-state-B_coEY2P.js} +1 -1
  75. package/dist/client/assets/{empty-state-_qOVtH-p.js → empty-state-wVlFUTuL.js} +1 -1
  76. package/dist/client/assets/{extract-connection-data-_i5LkZhQ.js → extract-connection-data-G78XYV45.js} +1 -1
  77. package/dist/client/assets/{features-BuQRTHY7.js → features-Dvg6m_Tb.js} +1 -1
  78. package/dist/client/assets/{file-explorer-pKhIdo3a.js → file-explorer-BV9f-kke.js} +1 -1
  79. package/dist/client/assets/{form-CgjywpPp.js → form-jI6P-pAp.js} +1 -1
  80. package/dist/client/assets/{general-DcrhKepf.js → general-DLcUgbha.js} +1 -1
  81. package/dist/client/assets/{hooks-C0RpcvT-.js → hooks-CKWLlFdn.js} +1 -1
  82. package/dist/client/assets/{index-DSfns5B0.js → index-BB1deX0d.js} +1 -1
  83. package/dist/client/assets/{index-C76W7tLb.js → index-BRgCAhHs.js} +1 -1
  84. package/dist/client/assets/{index-C9UEm0aF.js → index-Bf4UxK2Z.js} +2 -2
  85. package/dist/client/assets/{index-DKSThpY5.js → index-Bgfr6sPE.js} +1 -1
  86. package/dist/client/assets/{index-BtcuhRkM.js → index-BiK2ANK0.js} +1 -1
  87. package/dist/client/assets/{index-C5OHYX2D.js → index-CJ06re6J.js} +1 -1
  88. package/dist/client/assets/{index-w6-egSGC.js → index-CrCKLCTE.js} +1 -1
  89. package/dist/client/assets/{index-BwxPkxWQ.js → index-Cti5aHML.js} +1 -1
  90. package/dist/client/assets/{index-CAWr5v6I.js → index-Cxq_1hW7.js} +1 -1
  91. package/dist/client/assets/{index-CkNEQt0t.js → index-DSWBpg1D.js} +1 -1
  92. package/dist/client/assets/{index-ycinRUyU.js → index-Dq89w-TY.js} +1 -1
  93. package/dist/client/assets/{index-R7WmRLsq.js → index-Dql3mibq.js} +1 -1
  94. package/dist/client/assets/{index-CuoKNiBk.js → index-SC5A95WZ.js} +1 -1
  95. package/dist/client/assets/{index-CsN1f6Mf.js → index-gLjKW_GL.js} +4 -4
  96. package/dist/client/assets/{index-BTF4JQ6R.js → index-jDo3raIY.js} +1 -1
  97. package/dist/client/assets/{index-guSlXYnQ.js → index-rkrd3EG7.js} +1 -1
  98. package/dist/client/assets/{infiniteQueryObserver-D-LVR76l.js → infiniteQueryObserver-D1AxhsFP.js} +1 -1
  99. package/dist/client/assets/{input-Cdi9gxjc.js → input-D3wLBcw1.js} +1 -1
  100. package/dist/client/assets/{integration-icon-DcWsEICc.js → integration-icon-CDsyJjsh.js} +1 -1
  101. package/dist/client/assets/{label-BuSjhBby.js → label-e0eIq6aZ.js} +1 -1
  102. package/dist/client/assets/{layout-xI0NTaVa.js → layout-B3Vav8lm.js} +1 -1
  103. package/dist/client/assets/{lean-canvas-recruit-modal-C1eNHtBl.js → lean-canvas-recruit-modal-DOlgcgzL.js} +1 -1
  104. package/dist/client/assets/{login-D9UPVEj4.js → login-bAEXzx2H.js} +1 -1
  105. package/dist/client/assets/{members-Bc3j8vYC.js → members-CrGJoeDh.js} +1 -1
  106. package/dist/client/assets/{monaco-editor-CatlVtHe.js → monaco-editor-DRSPGhbT.js} +1 -1
  107. package/dist/client/assets/{monitoring-stats-row-BIhzNtTb.js → monitoring-stats-row-BDJ_Q-sT.js} +1 -1
  108. package/dist/client/assets/{oauth-callback-CYlYmz7U.js → oauth-callback-DVRyNcmj.js} +1 -1
  109. package/dist/client/assets/{oauth-callback-ai-provider-DeHId1DV.js → oauth-callback-ai-provider-DxdNkPgW.js} +1 -1
  110. package/dist/client/assets/{onboarding-BVlqY8oG.js → onboarding-D8s2ns87.js} +1 -1
  111. package/dist/client/assets/{org-layout-B9V1WKRL.js → org-layout-CpcOioMH.js} +1 -1
  112. package/dist/client/assets/{org-plugin-layout-Dc7_BxQD.js → org-plugin-layout-CYGUkkkR.js} +1 -1
  113. package/dist/client/assets/{pair-CeEq9T2O.js → pair-BOolv6CG.js} +1 -1
  114. package/dist/client/assets/{plugin-empty-state-CpS42-ME.js → plugin-empty-state-DBV3odzo.js} +1 -1
  115. package/dist/client/assets/{plugin-header-BJfFFNRP.js → plugin-header-BJPzRt2a.js} +1 -1
  116. package/dist/client/assets/{plugin-layout-D_Iqj8CD.js → plugin-layout-Dsi7k6R5.js} +1 -1
  117. package/dist/client/assets/{popover-B8_iKHLU.js → popover-BeXnf11b.js} +1 -1
  118. package/dist/client/assets/{profile-BJX5q_hw.js → profile-CDV7JIt-.js} +1 -1
  119. package/dist/client/assets/{project-app-view-D-lV6K7b.js → project-app-view-CjRV_NRv.js} +1 -1
  120. package/dist/client/assets/registry-CrgBbUgM.js +2 -0
  121. package/dist/client/assets/{registry-layout-C5yxWOxu.js → registry-layout-CNpEHraq.js} +1 -1
  122. package/dist/client/assets/{required-auth-layout-BkADLVGr.js → required-auth-layout-CA4fYSwK.js} +1 -1
  123. package/dist/client/assets/{reset-password-6dG3DUO1.js → reset-password-eDFtZmm0.js} +1 -1
  124. package/dist/client/assets/{roles-BGdUO_ZL.js → roles-C2lU9lYy.js} +1 -1
  125. package/dist/client/assets/{search-input-BcTGkVm4.js → search-input-D3FhG3of.js} +1 -1
  126. package/dist/client/assets/{secrets-DGUwetu-.js → secrets-BS-lOU1C.js} +1 -1
  127. package/dist/client/assets/{sections-editor-ylnmXhOn.js → sections-editor-x8uPPz4j.js} +1 -1
  128. package/dist/client/assets/{select-B4d2U3-e.js → select-CuHr5fXM.js} +1 -1
  129. package/dist/client/assets/{settings-layout-CJaDzYgG.js → settings-layout-Buet0SmG.js} +1 -1
  130. package/dist/client/assets/{settings-section-Dk6rz76H.js → settings-section-DiHCwxw2.js} +1 -1
  131. package/dist/client/assets/{shell-layout-C2Sdv8NG.js → shell-layout-JnQ2O1U7.js} +1 -1
  132. package/dist/client/assets/{sidebar-CGPsmcjg.js → sidebar-B_4prYx4.js} +1 -1
  133. package/dist/client/assets/{skeleton-COUipQ4Q.js → skeleton-AGBsesGc.js} +1 -1
  134. package/dist/client/assets/{spinner-CIoX-SxH.js → spinner-DsACT7El.js} +1 -1
  135. package/dist/client/assets/{sso-B80o0s1k.js → sso-Dhyd6ZiO.js} +1 -1
  136. package/dist/client/assets/{store-0QX3bjMs.js → store-CcesFZmy.js} +1 -1
  137. package/dist/client/assets/store-registry-CnUEYKl7.js +2 -0
  138. package/dist/client/assets/{switch-_JN6WXfk.js → switch-BGE9cJht.js} +1 -1
  139. package/dist/client/assets/{table-Dcd3qce4.js → table-DgPM3Urg.js} +1 -1
  140. package/dist/client/assets/{tabs-qbu5aXP5.js → tabs-BOTzf805.js} +1 -1
  141. package/dist/client/assets/{task-status-7EvHcXhA.js → task-status-DtPctv4c.js} +1 -1
  142. package/dist/client/assets/{textarea-ezBAh-ci.js → textarea-BF_TKrea.js} +1 -1
  143. package/dist/client/assets/{toggle-group-fa9ptW_Z.js → toggle-group-DnWWdySD.js} +1 -1
  144. package/dist/client/assets/{tools-list-8krv5h-3.js → tools-list-BRIP5RmH.js} +1 -1
  145. package/dist/client/assets/{tooltip-CaQjUma3.js → tooltip-DM9palzE.js} +1 -1
  146. package/dist/client/assets/{types-C4e-LRxV.js → types-BtPcm-7P.js} +1 -1
  147. package/dist/client/assets/{use-ai-providers-C3VHCF8p.js → use-ai-providers-OUW6JMOp.js} +1 -1
  148. package/dist/client/assets/{use-collections-DNvmDnbN.js → use-collections-nufxZlf_.js} +1 -1
  149. package/dist/client/assets/{use-connection-BGdZGnmu.js → use-connection-BNmoIwQg.js} +1 -1
  150. package/dist/client/assets/{use-copy-RYe2lXz3.js → use-copy-D6zGnSRk.js} +1 -1
  151. package/dist/client/assets/{use-create-virtual-mcp-ChO4_kNB.js → use-create-virtual-mcp-Ckr2pYgU.js} +1 -1
  152. package/dist/client/assets/{use-create-website-agent-3oryguME.js → use-create-website-agent-CKFqK76s.js} +1 -1
  153. package/dist/client/assets/{use-debounced-autosave-BY5sGeW6.js → use-debounced-autosave-BBwvvwih.js} +1 -1
  154. package/dist/client/assets/{use-delete-connection-C6AmsDRy.js → use-delete-connection-CPao9B1A.js} +1 -1
  155. package/dist/client/assets/{use-infinite-scroll-BihNiDcY.js → use-infinite-scroll-BDKH-Wtf.js} +1 -1
  156. package/dist/client/assets/{use-list-state-0oP6RkcN.js → use-list-state-BqW4uQqC.js} +1 -1
  157. package/dist/client/assets/{use-mcp-tools-BDMB9XmW.js → use-mcp-tools-VZ9Hpxff.js} +1 -1
  158. package/dist/client/assets/{use-members-CkjLUYIV.js → use-members-B7HW_JBz.js} +1 -1
  159. package/dist/client/assets/{use-navigate-to-agent-Bcv_R7xe.js → use-navigate-to-agent-BEpwKNsB.js} +1 -1
  160. package/dist/client/assets/{use-org-auth-client-R-on2rxL.js → use-org-auth-client-bVHLT2YP.js} +1 -1
  161. package/dist/client/assets/{use-org-sso-B8VnAMoS.js → use-org-sso-ZXpwOerI.js} +1 -1
  162. package/dist/client/assets/{use-organization-roles-v9JQk9hP.js → use-organization-roles-CgtYHR9C.js} +1 -1
  163. package/dist/client/assets/{use-organization-settings-DKdHITUe.js → use-organization-settings-DsFVMR9y.js} +1 -1
  164. package/dist/client/assets/{use-registry-connections-BxKGYdQr.js → use-registry-connections-DPX7EH3p.js} +1 -1
  165. package/dist/client/assets/{use-secrets-3AqFLOQx.js → use-secrets-BqmvCE0c.js} +1 -1
  166. package/dist/client/assets/{use-status-sounds-Cmw5K0Ch.js → use-status-sounds-DmU4jspw.js} +1 -1
  167. package/dist/client/assets/{use-view-mode-CBIh242S.js → use-view-mode-BLjEDO9D.js} +1 -1
  168. package/dist/client/assets/{use-virtual-mcp-B0ez_suv.js → use-virtual-mcp-CfSWiyjb.js} +1 -1
  169. package/dist/client/assets/useInfiniteQuery-1PtmuLfG.js +1 -0
  170. package/dist/client/assets/{useRouterState-EoWY4nHO.js → useRouterState-zGUMzA-3.js} +1 -1
  171. package/dist/client/assets/useSuspenseInfiniteQuery-B87PMcER.js +1 -0
  172. package/dist/client/assets/{user-C3gZLtHM.js → user-BObMSYhv.js} +1 -1
  173. package/dist/client/assets/{view-mode-toggle-ChtVPtKo.js → view-mode-toggle-BFP9EFGX.js} +1 -1
  174. package/dist/client/assets/{workflow-gp1Gi9YH.js → workflow-B3swyRIG.js} +1 -1
  175. package/dist/client/assets/workflow-detail-BzwgoTIj.js +1 -0
  176. package/dist/client/index.html +1 -1
  177. package/dist/server/cli.js +2 -2
  178. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  179. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  180. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  181. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  182. package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
  183. package/dist/server/node_modules/pg-connection-string/README.md +105 -0
  184. package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
  185. package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
  186. package/dist/server/node_modules/pg-connection-string/index.js +231 -0
  187. package/dist/server/node_modules/pg-connection-string/package.json +52 -0
  188. package/dist/server/node_modules/xtend/.jshintrc +30 -0
  189. package/dist/server/node_modules/xtend/LICENSE +20 -0
  190. package/dist/server/node_modules/xtend/README.md +32 -0
  191. package/dist/server/node_modules/xtend/immutable.js +19 -0
  192. package/dist/server/node_modules/xtend/mutable.js +17 -0
  193. package/dist/server/node_modules/xtend/package.json +55 -0
  194. package/dist/server/node_modules/xtend/test.js +103 -0
  195. package/package.json +2 -2
  196. package/dist/client/assets/registry-BY1Ukj0z.js +0 -2
  197. package/dist/client/assets/store-registry-BaAH1vXo.js +0 -2
  198. package/dist/client/assets/useInfiniteQuery-ghEPKCL5.js +0 -1
  199. package/dist/client/assets/useSuspenseInfiniteQuery-DfSMBOfj.js +0 -1
  200. package/dist/client/assets/workflow-detail-DNKrM4Su.js +0 -1
  201. package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
  202. package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
  203. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
  204. package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
  205. package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
  206. package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
  207. package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
  208. /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
@@ -1 +1 @@
1
- import{e as P,p as z,f as B,r as E,j as t,B as w,t as f}from"./index-C9UEm0aF.js";import{s as v}from"./Plus-DZMvWlgN.js";import{i as A}from"./Zap-D1hcdQQV.js";import{S as L}from"./search-input-BcTGkVm4.js";import{P as c}from"./index-guSlXYnQ.js";import{E as C}from"./empty-state-DTkqsJki.js";import{c as T,u as R,A as M,e as $}from"./automation-list-row-Cvf312NN.js";import{a as D}from"./use-navigate-to-agent-Bcv_R7xe.js";import{e as O}from"./constants-DG2sk_0H.js";import{b as V}from"./use-virtual-mcp-B0ez_suv.js";import"./SearchMd-i7Gp8R_i.js";import"./sidebar-CGPsmcjg.js";import"./LayoutLeft-msnP7LxF.js";import"./tooltip-CaQjUma3.js";import"./X-DDsITeaO.js";import"./alert-dialog-CsOiC1Gz.js";import"./dropdown-menu-37ioHY85.js";import"./Check-CgJkW5mO.js";import"./ChevronRight-9ST8kRHp.js";import"./DotsVertical-BWVeD_Nu.js";import"./agent-icon-sU9yNgMj.js";import"./AlertCircle-DMn4ErF7.js";import"./Tool01-Ck4wzkil.js";import"./SearchLg-tmO6QRl-.js";import"./XClose-BfGe8XlD.js";import"./RefreshCcw01-STdDbh6L.js";import"./ArrowNarrowLeft-DRMMU-Rx.js";import"./XCircle-zMGNHwa8.js";import"./ArrowUpRight-BG1qVEu5.js";import"./ZapSquare-DbH77Z5v.js";import"./Building02-DXFrqtM4.js";import"./CheckCircle-BhQF3J-G.js";import"./ChevronDown-C6CmTT2m.js";import"./ChevronUp-DYBcJQJI.js";import"./Container-DvJcXzPK.js";import"./Star01-B7Wf0BA4.js";import"./Palette-CTxrzTV6.js";import"./Key01-CToqdwOF.js";import"./LinkExternal01-BYFbxPa2.js";import"./Lock01-Br965pCK.js";import"./Monitor01-CeCWg7Jm.js";import"./Sun-JMAHaccL.js";import"./Play-Y01bx8MI.js";import"./Settings02-Ca5SX90W.js";import"./Shield01-56gTI-65.js";import"./Trash01-DZil92Jh.js";import"./Upload01-B0HbOxqP.js";import"./User01-Bb_7ado6.js";import"./Users01-CCKc6ep2.js";import"./Users03-9Msw3sAO.js";import"./use-collections-DNvmDnbN.js";function Ot(){const e=P.c(5),{org:s}=z(),{data:g}=T(void 0),r=g===void 0?[]:g,N=V(),y=D(),p=B(),[u,b]=E.useState(""),{create:d}=R(),S=async()=>{if(d.isPending)return;f("automations_new_tool_call_clicked",{existing_count:r.length});const o=await d.mutateAsync($());j(o.id,null)},a=u.toLowerCase(),x=new Map(N.map(q)),h=r.filter(o=>{if(!a||o.name.toLowerCase().includes(a))return!0;if(o.virtual_mcp_id){const i=x.get(o.virtual_mcp_id);if(i&&i.title.toLowerCase().includes(a))return!0}return!!o.tool_name?.toLowerCase().includes(a)}),j=(o,i)=>{const _=i&&x.has(i)?i:O(s.id);f("automations_list_row_clicked",{automation_id:o,agent_id:_,source:"settings_automations"}),y(_,{search:{main:"automation:"+o}})};let n;e[0]!==p||e[1]!==s.slug?(n=()=>{f("automations_empty_state_browse_agents_clicked"),p({to:"/$org/settings/agents",params:{org:s.slug}})},e[0]=p,e[1]=s.slug,e[2]=n):n=e[2];const k=n;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(c.Title,{children:"Automations"}),e[3]=m):m=e[3];let l;return e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(v,{size:14}),e[4]=l):l=e[4],t.jsx(c,{children:t.jsx(c.Content,{children:t.jsxs(c.Body,{children:[t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[m,t.jsxs(w,{size:"sm",variant:"outline",onClick:S,disabled:d.isPending,children:[l,"New tool-call automation"]})]}),r.length>0&&t.jsx(L,{value:u,onChange:b,placeholder:"Search automations...",className:"w-full md:w-[375px]"})]}),r.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(C,{image:t.jsx(A,{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:t.jsxs(w,{size:"sm",onClick:k,children:[t.jsx(v,{size:14}),"Browse agents"]})})}):h.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(C,{image:t.jsx(A,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${u}"`})}):t.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:h.map(o=>t.jsx(M,{automation:o,showAgent:!0,onClick:()=>j(o.id,o.virtual_mcp_id)},o.id))})]})})})}function q(e){return[e.id,e]}export{Ot as default};
1
+ import{e as P,p as z,f as B,r as E,j as t,B as w,t as f}from"./index-Bf4UxK2Z.js";import{s as v}from"./Plus-DUbqF6rK.js";import{i as A}from"./Zap-BuqS_qna.js";import{S as L}from"./search-input-D3FhG3of.js";import{P as c}from"./index-rkrd3EG7.js";import{E as C}from"./empty-state-B_coEY2P.js";import{c as T,u as R,A as M,e as $}from"./automation-list-row-Brz_krF-.js";import{a as D}from"./use-navigate-to-agent-BEpwKNsB.js";import{e as O}from"./constants-dLpaUsN8.js";import{b as V}from"./use-virtual-mcp-CfSWiyjb.js";import"./SearchMd-Dpur_ahX.js";import"./sidebar-B_4prYx4.js";import"./LayoutLeft-PSosyh8W.js";import"./tooltip-DM9palzE.js";import"./X-KaP-9Zgp.js";import"./alert-dialog-6PLIDXks.js";import"./dropdown-menu-roylZYWc.js";import"./Check-DKPiDw0v.js";import"./ChevronRight-D_jXf5Kp.js";import"./DotsVertical-C0edSuvc.js";import"./agent-icon-DhO8qmda.js";import"./AlertCircle-B2eHj7e1.js";import"./Tool01-CIld76-5.js";import"./SearchLg-CWYSpRcF.js";import"./XClose-BTeq1oZe.js";import"./RefreshCcw01-B-Cq3kpB.js";import"./ArrowNarrowLeft-CxcqihTL.js";import"./XCircle-CmRYIXoV.js";import"./ArrowUpRight-Bmxv_5f2.js";import"./ZapSquare-BNz1wDNr.js";import"./Building02-DhlHp14j.js";import"./CheckCircle-BS-i9SgB.js";import"./ChevronDown-C2svK15b.js";import"./ChevronUp-CVfkcqtl.js";import"./Container-BkK0DB__.js";import"./Star01-f02R5Lt3.js";import"./Palette-K4YZYTyg.js";import"./Key01-CRTO9Eqv.js";import"./LinkExternal01-8dkTfrKr.js";import"./Lock01-D3HzAQHN.js";import"./Monitor01-CE0kuy60.js";import"./Sun-GgIgazyF.js";import"./Play-DfLpvTAf.js";import"./Settings02-CJ09Har8.js";import"./Shield01-CnFfMzTJ.js";import"./Trash01-cTgn14Wa.js";import"./Upload01-HhDlaYLd.js";import"./User01-CUr_vH6R.js";import"./Users01-DfpmcJ6n.js";import"./Users03-DFib9kg8.js";import"./use-collections-nufxZlf_.js";function Ot(){const e=P.c(5),{org:s}=z(),{data:g}=T(void 0),r=g===void 0?[]:g,N=V(),y=D(),p=B(),[u,b]=E.useState(""),{create:d}=R(),S=async()=>{if(d.isPending)return;f("automations_new_tool_call_clicked",{existing_count:r.length});const o=await d.mutateAsync($());j(o.id,null)},a=u.toLowerCase(),x=new Map(N.map(q)),h=r.filter(o=>{if(!a||o.name.toLowerCase().includes(a))return!0;if(o.virtual_mcp_id){const i=x.get(o.virtual_mcp_id);if(i&&i.title.toLowerCase().includes(a))return!0}return!!o.tool_name?.toLowerCase().includes(a)}),j=(o,i)=>{const _=i&&x.has(i)?i:O(s.id);f("automations_list_row_clicked",{automation_id:o,agent_id:_,source:"settings_automations"}),y(_,{search:{main:"automation:"+o}})};let n;e[0]!==p||e[1]!==s.slug?(n=()=>{f("automations_empty_state_browse_agents_clicked"),p({to:"/$org/settings/agents",params:{org:s.slug}})},e[0]=p,e[1]=s.slug,e[2]=n):n=e[2];const k=n;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(c.Title,{children:"Automations"}),e[3]=m):m=e[3];let l;return e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(v,{size:14}),e[4]=l):l=e[4],t.jsx(c,{children:t.jsx(c.Content,{children:t.jsxs(c.Body,{children:[t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[m,t.jsxs(w,{size:"sm",variant:"outline",onClick:S,disabled:d.isPending,children:[l,"New tool-call automation"]})]}),r.length>0&&t.jsx(L,{value:u,onChange:b,placeholder:"Search automations...",className:"w-full md:w-[375px]"})]}),r.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(C,{image:t.jsx(A,{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:t.jsxs(w,{size:"sm",onClick:k,children:[t.jsx(v,{size:14}),"Browse agents"]})})}):h.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(C,{image:t.jsx(A,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${u}"`})}):t.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:h.map(o=>t.jsx(M,{automation:o,showAgent:!0,onClick:()=>j(o.id,o.virtual_mcp_id)},o.id))})]})})})}function q(e){return[e.id,e]}export{Ot as default};
@@ -1 +1 @@
1
- import{e as j,j as i,c as f,b0 as R,ck as V,cl as I,cm as $}from"./index-C9UEm0aF.js";import{s as O}from"./User01-Bb_7ado6.js";function U(r){const e=j.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=f("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($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=j.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=f("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(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=j.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=f("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(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["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"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("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"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=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 W(r){const e=j.c(34);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,k=g===void 0?!1:g;let x;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],x=c;break e}x=t}const m=x;let y;e:{if(k){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(S({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==m||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:m})]}),e[22]=z,e[23]=m,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(r){const e=j.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,k=g===void 0?!1:g,x=h??"base";let m;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(m=i.jsx(W,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=m):m=e[17],m}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
1
+ import{e as j,j as i,c as f,b0 as R,ck as V,cl as I,cm as $}from"./index-Bf4UxK2Z.js";import{s as O}from"./User01-CUr_vH6R.js";function U(r){const e=j.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=f("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($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=j.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=f("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(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=j.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=f("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(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["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"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("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"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=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 W(r){const e=j.c(34);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,k=g===void 0?!1:g;let x;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],x=c;break e}x=t}const m=x;let y;e:{if(k){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(S({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==m||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:m})]}),e[22]=z,e[23]=m,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(r){const e=j.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,k=g===void 0?!1:g,x=h??"base";let m;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(m=i.jsx(W,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=m):m=e[17],m}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
@@ -1 +1 @@
1
- import{e as u,c as l,j as g,b1 as v,b0 as b}from"./index-C9UEm0aF.js";const f=b("inline-flex items-center justify-center rounded-full border 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"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
1
+ import{e as u,c as l,j as g,b1 as v,b0 as b}from"./index-Bf4UxK2Z.js";const f=b("inline-flex items-center justify-center rounded-full border 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"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
@@ -1 +1 @@
1
- import{e as X,a0 as Ie,p as ze,z as Le,K as Pe,n as Ke,a as ge,j as n,B as Te,t as V,o as U,r as Oe,D as Ue,c as _e,C as fe}from"./index-C9UEm0aF.js";import{S as Xe,u as He}from"./constants-DG2sk_0H.js";import{t as Me}from"./ChevronDown-C6CmTT2m.js";import{i as qe}from"./ChevronRight-9ST8kRHp.js";import{s as Ve,t as Qe}from"./Star01-B7Wf0BA4.js";import{n as Ge}from"./LinkExternal01-BYFbxPa2.js";import{s as Re}from"./Plus-DZMvWlgN.js";import{s as Ye}from"./Trash01-DZil92Jh.js";import{i as Je}from"./Zap-D1hcdQQV.js";import{c as We,b as Ze,d as et,f as tt,g as st,e as nt,a as lt,A as ot}from"./alert-dialog-CsOiC1Gz.js";import{I as ue}from"./input-Cdi9gxjc.js";import{T as rt}from"./textarea-ezBAh-ci.js";import{P as Ne}from"./index-guSlXYnQ.js";import{u as $e}from"./unwrap-tool-result-BYXdCQMg.js";import{u as at}from"./use-debounced-autosave-BY5sGeW6.js";import"./sidebar-CGPsmcjg.js";import"./LayoutLeft-msnP7LxF.js";import"./tooltip-CaQjUma3.js";import"./X-DDsITeaO.js";function we(t){const e=X.c(8),{title:s,children:o,className:l}=t;let r;e[0]!==l?(r=_e("rounded-2xl border border-border/60 bg-background p-5",l),e[0]=l,e[1]=r):r=e[1];let i;e[2]!==s?(i=n.jsx("div",{className:"mb-4",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s})}),e[2]=s,e[3]=i):i=e[3];let d;return e[4]!==o||e[5]!==r||e[6]!==i?(d=n.jsxs("div",{className:r,children:[i,o]}),e[4]=o,e[5]=r,e[6]=i,e[7]=d):d=e[7],d}function it(t){const e=X.c(25),{onExtract:s,isExtracting:o}=t,[l,r]=Oe.useState("");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(Je,{size:18,className:"text-primary"})}),e[0]=i):i=e[0];let d,u;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),u=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]=d,e[2]=u):(d=e[1],u=e[2]);let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=f=>r(f.target.value),e[3]=p):p=e[3];let b;e[4]!==l||e[5]!==o||e[6]!==s?(b=f=>{f.key==="Enter"&&l.trim()&&!o&&s(l.trim())},e[4]=l,e[5]=o,e[6]=s,e[7]=b):b=e[7];let m;e[8]!==l||e[9]!==b?(m=n.jsx(ue,{placeholder:"acme.com",value:l,onChange:p,className:"max-w-xs",onKeyDown:b}),e[8]=l,e[9]=b,e[10]=m):m=e[10];let c;e[11]!==l||e[12]!==o?(c=!l.trim()||o,e[11]=l,e[12]=o,e[13]=c):c=e[13];let a;e[14]!==l||e[15]!==s?(a=()=>s(l.trim()),e[14]=l,e[15]=s,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ve,{size:14}),e[17]=x):x=e[17];const g=o?"Extracting...":"Extract";let h;e[18]!==g||e[19]!==c||e[20]!==a?(h=n.jsxs(Te,{variant:"outline",disabled:c,onClick:a,children:[x,g]}),e[18]=g,e[19]=c,e[20]=a,e[21]=h):h=e[21];let v;return e[22]!==h||e[23]!==m?(v=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:[i,n.jsxs("div",{className:"flex-1",children:[d,u,n.jsxs("div",{className:"mt-3 flex gap-2",children:[m,h]})]})]})}),e[22]=h,e[23]=m,e[24]=v):v=e[24],v}function ct(t){const e=X.c(36),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s?(r=s.watch("domain"),e[0]=s,e[1]=r):r=e[1];const i=r;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),e[2]=d):d=e[2];let u;e[3]!==o||e[4]!==l?(u=D=>{const{field:y}=D;return n.jsx(ue,{...y,onChange:N=>{y.onChange(N),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"Acme Corp"})},e[3]=o,e[4]=l,e[5]=u):u=e[5];let p;e[6]!==s.control||e[7]!==u?(p=n.jsxs("div",{children:[d,n.jsx(fe,{control:s.control,name:"name",render:u})]}),e[6]=s.control,e[7]=u,e[8]=p):p=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("span",{children:"Domain"}),e[9]=b):b=e[9];let m;e[10]!==i?(m=i&&n.jsxs("a",{href:`https://${i}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 transition-colors hover:text-foreground",children:[n.jsx(Ge,{size:10}),"open"]}),e[10]=i,e[11]=m):m=e[11];let c;e[12]!==m?(c=n.jsxs("label",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[b,m]}),e[12]=m,e[13]=c):c=e[13];let a;e[14]!==o||e[15]!==l?(a=D=>{const{field:y}=D;return n.jsx(ue,{...y,onChange:N=>{y.onChange(N),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"acme.com"})},e[14]=o,e[15]=l,e[16]=a):a=e[16];let x;e[17]!==s.control||e[18]!==a?(x=n.jsx(fe,{control:s.control,name:"domain",render:a}),e[17]=s.control,e[18]=a,e[19]=x):x=e[19];let g;e[20]!==c||e[21]!==x?(g=n.jsxs("div",{children:[c,x]}),e[20]=c,e[21]=x,e[22]=g):g=e[22];let h;e[23]!==g||e[24]!==p?(h=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[p,g]}),e[23]=g,e[24]=p,e[25]=h):h=e[25];let v;e[26]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),e[26]=v):v=e[26];let f;e[27]!==o||e[28]!==l?(f=D=>{const{field:y}=D;return n.jsx(rt,{...y,onChange:N=>{y.onChange(N),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"Brief description of what the company does...",rows:3})},e[27]=o,e[28]=l,e[29]=f):f=e[29];let C;e[30]!==s.control||e[31]!==f?(C=n.jsxs("div",{children:[v,n.jsx(fe,{control:s.control,name:"overview",render:f})]}),e[30]=s.control,e[31]=f,e[32]=C):C=e[32];let w;return e[33]!==h||e[34]!==C?(w=n.jsx(we,{title:"Company Overview",children:n.jsxs("div",{className:"space-y-3",children:[h,C]})}),e[33]=h,e[34]=C,e[35]=w):w=e[35],w}const dt={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"};function Ae(t){const e=X.c(22),{form:s,name:o,label:l,imgClassName:r,onFieldChange:i,onFieldCommit:d}=t,u=r===void 0?"h-full w-full object-contain p-3":r;let p;e[0]!==s||e[1]!==o?(p=s.watch(o),e[0]=s,e[1]=o,e[2]=p):p=e[2];const b=p;let m;e[3]!==u||e[4]!==l||e[5]!==b?(m=n.jsx("div",{className:"flex aspect-video w-28 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:dt,children:b?n.jsx("img",{src:b,alt:l,className:u,loading:"lazy"}):n.jsxs("span",{className:"text-[10px] text-muted-foreground/70",children:["No ",l.toLowerCase()]})}),e[3]=u,e[4]=l,e[5]=b,e[6]=m):m=e[6];let c;e[7]!==l?(c=n.jsxs("label",{className:"mb-1 block text-xs text-muted-foreground",children:[l," URL"]}),e[7]=l,e[8]=c):c=e[8];let a;e[9]!==i||e[10]!==d?(a=v=>{const{field:f}=v;return n.jsx(ue,{...f,onChange:C=>{f.onChange(C),i()},onBlur:()=>{f.onBlur(),d()},placeholder:"https://..."})},e[9]=i,e[10]=d,e[11]=a):a=e[11];let x;e[12]!==s.control||e[13]!==o||e[14]!==a?(x=n.jsx(fe,{control:s.control,name:o,render:a}),e[12]=s.control,e[13]=o,e[14]=a,e[15]=x):x=e[15];let g;e[16]!==c||e[17]!==x?(g=n.jsxs("div",{className:"flex-1",children:[c,x]}),e[16]=c,e[17]=x,e[18]=g):g=e[18];let h;return e[19]!==m||e[20]!==g?(h=n.jsxs("div",{className:"flex items-start gap-3",children:[m,g]}),e[19]=m,e[20]=g,e[21]=h):h=e[21],h}function mt(t){const e=X.c(4),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;return e[0]!==s||e[1]!==o||e[2]!==l?(r=n.jsx(we,{title:"Logos & Images",children:n.jsxs("div",{className:"space-y-3",children:[n.jsx(Ae,{form:s,name:"logo",label:"Logo",onFieldChange:o,onFieldCommit:l}),n.jsx(Ae,{form:s,name:"favicon",label:"Favicon",imgClassName:"h-12 w-12 object-contain",onFieldChange:o,onFieldCommit:l}),n.jsx(Ae,{form:s,name:"ogImage",label:"SEO / OG image",imgClassName:"h-full w-full object-contain",onFieldChange:o,onFieldCommit:l})]})}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3],r}const ft=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function ut(t){const e=X.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=ft.map(d=>{const{key:u,label:p}=d,b=`fonts.${u}`,m=s.watch(b);return n.jsxs("div",{children:[n.jsxs("label",{className:"mb-1 flex items-center gap-3 text-xs text-muted-foreground",children:[n.jsx("span",{className:"w-7 text-base font-medium leading-none text-foreground",children:"Aa"}),n.jsx("span",{children:p}),m&&n.jsx("span",{className:"ml-auto truncate text-foreground",style:{fontFamily:m},children:m})]}),n.jsx(fe,{control:s.control,name:b,render:c=>{const{field:a}=c;return n.jsx(ue,{...a,value:a.value??"",onChange:x=>{a.onChange(x),o()},onBlur:()=>{a.onBlur(),l()},placeholder:`Font family for ${p.toLowerCase()}`})}})]},u)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let i;return e[4]!==r?(i=n.jsx(we,{title:"Fonts",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=i):i=e[5],i}const xt=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function gt(t){const e=X.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=xt.map(d=>{const{key:u,label:p}=d,b=`colors.${u}`;return n.jsx(fe,{control:s.control,name:b,render:m=>{const{field:c}=m;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:c.value??"#000000",onChange:a=>{c.onChange(a.target.value),o()},onBlur:()=>{c.onBlur(),l()},className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(ue,{value:c.value??"",onChange:a=>{c.onChange(a.target.value),o()},onBlur:()=>{c.onBlur(),l()},placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:p})]})}},u)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let i;return e[4]!==r?(i=n.jsx(we,{title:"Colors",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=i):i=e[5],i}function ht(t){const e=X.c(128),{brand:s,client:o,onChanged:l}=t,[r,i]=Oe.useState(s.isDefault??!1),[d,u]=Oe.useState(!1),p=s.name??"",b=s.domain??"",m=s.overview??"",c=s.logo??"",a=s.favicon??"",x=s.ogImage??"";let g;e[0]!==s.fonts?(g=s.fonts??{},e[0]=s.fonts,e[1]=g):g=e[1];let h;e[2]!==s.colors?(h=s.colors??{},e[2]=s.colors,e[3]=h):h=e[3];let v;e[4]!==p||e[5]!==b||e[6]!==m||e[7]!==c||e[8]!==a||e[9]!==x||e[10]!==g||e[11]!==h?(v={values:{name:p,domain:b,overview:m,logo:c,favicon:a,ogImage:x,fonts:g,colors:h}},e[4]=p,e[5]=b,e[6]=m,e[7]=c,e[8]=a,e[9]=x,e[10]=g,e[11]=h,e[12]=v):v=e[12];const f=Ue(v);let C;e[13]!==s.id||e[14]!==s.images||e[15]!==o?(C={mutationFn:async j=>{const ve=Object.values(j.fonts).some(Dt),Ce=Object.values(j.colors).some(wt),Se={id:s.id,name:j.name,domain:j.domain,overview:j.overview,logo:j.logo||null,favicon:j.favicon||null,ogImage:j.ogImage||null,fonts:ve?j.fonts:null,colors:Ce?j.colors:null,images:s.images};await o.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:Se})},onError:_t},e[13]=s.id,e[14]=s.images,e[15]=o,e[16]=C):C=e[16];const w=ge(C);let D;e[17]!==s.id||e[18]!==f||e[19]!==l||e[20]!==w?(D={delayMs:500,save:async()=>{const j=f.control._formState.dirtyFields,ve=Object.keys(j);if(ve.length===0)return;const Ce=f.getValues(),Se=f.control._defaultValues;f.reset(Ce,{keepValues:!0});try{await w.mutateAsync(Ce),V("brand_updated",{brand_id:s.id,fields:ve}),U.success("Brand context updated successfully"),l()}catch{f.reset(Se,{keepValues:!0})}}},e[17]=s.id,e[18]=f,e[19]=l,e[20]=w,e[21]=D):D=e[21];const{schedule:y,flush:N}=at(D);let I;e[22]!==s.id||e[23]!==o?(I=async()=>{await o.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:s.id}})},e[22]=s.id,e[23]=o,e[24]=I):I=e[24];let z;e[25]!==s.id||e[26]!==l?(z=()=>{V("brand_deleted",{brand_id:s.id}),u(!1),l(),U.success("Brand deleted")},e[25]=s.id,e[26]=l,e[27]=z):z=e[27];let H;e[28]!==I||e[29]!==z?(H={mutationFn:I,onSuccess:z,onError:Nt},e[28]=I,e[29]=z,e[30]=H):H=e[30];const{mutate:xe,isPending:k}=ge(H);let B;e[31]!==s.id||e[32]!==s.isDefault||e[33]!==o?(B=async()=>{await o.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:s.id,isDefault:!s.isDefault}})},e[31]=s.id,e[32]=s.isDefault,e[33]=o,e[34]=B):B=e[34];let A;e[35]!==s.id||e[36]!==s.isDefault||e[37]!==l?(A=()=>{V(s.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:s.id}),l(),U.success(s.isDefault?"Removed as default brand":"Set as default brand")},e[35]=s.id,e[36]=s.isDefault,e[37]=l,e[38]=A):A=e[38];let T;e[39]!==B||e[40]!==A?(T={mutationFn:B,onSuccess:A,onError:Ct},e[39]=B,e[40]=A,e[41]=T):T=e[41];const{mutate:O}=ge(T),q=s.isDefault?"border-primary/30":"border-border/60";let M;e[42]!==q?(M=_e("rounded-2xl border bg-background",q),e[42]=q,e[43]=M):M=e[43];let P;e[44]!==r?(P=()=>i(!r),e[44]=r,e[45]=P):P=e[45];let L;e[46]!==r?(L=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:r?n.jsx(Me,{size:14}):n.jsx(qe,{size:14})}),e[46]=r,e[47]=L):L=e[47];let E;e[48]!==s.logo||e[49]!==s.name?(E=s.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:s.logo,alt:"",className:"h-full w-full object-contain p-1",onError:vt})}):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:s.name?.charAt(0)?.toUpperCase()||"?"})}),e[48]=s.logo,e[49]=s.name,e[50]=E):E=e[50];const K=s.name||"Untitled Brand";let F;e[51]!==K?(F=n.jsx("span",{className:"text-sm font-medium text-foreground",children:K}),e[51]=K,e[52]=F):F=e[52];let S;e[53]!==s.domain?(S=s.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s.domain}),e[53]=s.domain,e[54]=S):S=e[54];let R;e[55]!==F||e[56]!==S?(R=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[F,S]}),e[55]=F,e[56]=S,e[57]=R):R=e[57];let _;e[58]!==s.colors||e[59]!==r?(_=!r&&s.colors&&Object.values(s.colors).some(yt)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(s.colors).filter(jt).map(bt)}),e[58]=s.colors,e[59]=r,e[60]=_):_=e[60];let $;e[61]!==s.fonts||e[62]!==r?($=!r&&s.fonts&&Object.values(s.fonts).some(pt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(s.fonts).filter(Boolean).join(", ")}),e[61]=s.fonts,e[62]=r,e[63]=$):$=e[63];const De=s.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let Q;e[64]!==De?(Q=_e("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",De),e[64]=De,e[65]=Q):Q=e[65];let G,Y;e[66]!==O?(G=j=>{j.stopPropagation(),O()},Y=j=>{j.key==="Enter"&&(j.stopPropagation(),O())},e[66]=O,e[67]=G,e[68]=Y):(G=e[67],Y=e[68]);const ke=s.isDefault?"Unset as default":"Set as default",Be=s.isDefault?"text-primary fill-primary":"text-muted-foreground";let J;e[69]!==Be?(J=_e(Be),e[69]=Be,e[70]=J):J=e[70];let W;e[71]!==J?(W=n.jsx(Qe,{size:13,className:J}),e[71]=J,e[72]=W):W=e[72];let Z;e[73]!==Q||e[74]!==G||e[75]!==Y||e[76]!==ke||e[77]!==W?(Z=n.jsx("span",{role:"button",tabIndex:0,className:Q,onClick:G,onKeyDown:Y,title:ke,children:W}),e[73]=Q,e[74]=G,e[75]=Y,e[76]=ke,e[77]=W,e[78]=Z):Z=e[78];let he,pe;e[79]===Symbol.for("react.memo_cache_sentinel")?(he=j=>{j.stopPropagation(),u(!0)},pe=j=>{j.key==="Enter"&&(j.stopPropagation(),u(!0))},e[79]=he,e[80]=pe):(he=e[79],pe=e[80]);let be;e[81]===Symbol.for("react.memo_cache_sentinel")?(be=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:he,onKeyDown:pe,title:"Delete brand",children:n.jsx(Ye,{size:13,className:"text-muted-foreground"})}),e[81]=be):be=e[81];let ee;e[82]!==P||e[83]!==L||e[84]!==E||e[85]!==R||e[86]!==_||e[87]!==$||e[88]!==Z?(ee=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[L,E,R,_,$,Z,be]}),e[82]=P,e[83]=L,e[84]=E,e[85]=R,e[86]=_,e[87]=$,e[88]=Z,e[89]=ee):ee=e[89];let te;e[90]!==r||e[91]!==N||e[92]!==f||e[93]!==y?(te=r&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(ct,{form:f,onFieldChange:y,onFieldCommit:N}),n.jsx(mt,{form:f,onFieldChange:y,onFieldCommit:N}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(gt,{form:f,onFieldChange:y,onFieldCommit:N}),n.jsx(ut,{form:f,onFieldChange:y,onFieldCommit:N})]})]}),e[90]=r,e[91]=N,e[92]=f,e[93]=y,e[94]=te):te=e[94];let se;e[95]!==k?(se=j=>{!j&&!k&&u(!1)},e[95]=k,e[96]=se):se=e[96];let je;e[97]===Symbol.for("react.memo_cache_sentinel")?(je=n.jsx(We,{children:"Delete brand?"}),e[97]=je):je=e[97];const Ee=s.name||"this brand";let ne;e[98]!==Ee?(ne=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:Ee}),". This action cannot be undone."]}),e[98]=Ee,e[99]=ne):ne=e[99];let le;e[100]!==s.isDefault?(le=s.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[100]=s.isDefault,e[101]=le):le=e[101];let oe;e[102]!==ne||e[103]!==le?(oe=n.jsxs(Ze,{children:[je,n.jsx(et,{asChild:!0,children:n.jsxs("div",{children:[ne,le]})})]}),e[102]=ne,e[103]=le,e[104]=oe):oe=e[104];let re;e[105]!==k?(re=n.jsx(tt,{disabled:k,children:"Cancel"}),e[105]=k,e[106]=re):re=e[106];let ae;e[107]!==xe?(ae=j=>{j.preventDefault(),xe()},e[107]=xe,e[108]=ae):ae=e[108];const Fe=k?"Deleting...":"Delete";let ie;e[109]!==k||e[110]!==ae||e[111]!==Fe?(ie=n.jsx(st,{onClick:ae,disabled:k,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Fe}),e[109]=k,e[110]=ae,e[111]=Fe,e[112]=ie):ie=e[112];let ce;e[113]!==re||e[114]!==ie?(ce=n.jsxs(nt,{children:[re,ie]}),e[113]=re,e[114]=ie,e[115]=ce):ce=e[115];let de;e[116]!==oe||e[117]!==ce?(de=n.jsxs(lt,{children:[oe,ce]}),e[116]=oe,e[117]=ce,e[118]=de):de=e[118];let me;e[119]!==d||e[120]!==se||e[121]!==de?(me=n.jsx(ot,{open:d,onOpenChange:se,children:de}),e[119]=d,e[120]=se,e[121]=de,e[122]=me):me=e[122];let ye;return e[123]!==M||e[124]!==ee||e[125]!==te||e[126]!==me?(ye=n.jsxs("div",{className:M,children:[ee,te,me]}),e[123]=M,e[124]=ee,e[125]=te,e[126]=me,e[127]=ye):ye=e[127],ye}function pt(t){return t}function bt(t){const[e,s]=t;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:s},title:`${e}: ${s}`},e)}function jt(t){const[,e]=t;return e}function yt(t){return t}function vt(t){t.target.style.display="none"}function Ct(){return U.error("Failed to update default brand")}function Nt(){return U.error("Failed to delete brand")}function _t(){return U.error("Failed to save brand context")}function wt(t){return t?.trim()}function Dt(t){return t?.trim()}function kt(){const t=X.c(57),{brandExtractEnabled:e}=Ie(),{org:s}=ze();let o;t[0]!==s.id||t[1]!==s.slug?(o={connectionId:Xe,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=o):o=t[2];const l=He(o),r=Le();let i;t[3]!==s.id?(i=Pe.brandContext(s.id),t[3]=s.id,t[4]=i):i=t[4];let d;t[5]!==l?(d=async()=>{const _=await l.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),$=$e(_);return Array.isArray($?.items)?$.items:[]},t[5]=l,t[6]=d):d=t[6];let u;t[7]!==i||t[8]!==d?(u={queryKey:i,queryFn:d},t[7]=i,t[8]=d,t[9]=u):u=t[9];const{data:p}=Ke(u),m=(p===void 0?[]:p).filter(Ft);let c;t[10]!==s.id||t[11]!==r?(c=()=>r.invalidateQueries({queryKey:Pe.brandContext(s.id),refetchType:"all"}),t[10]=s.id,t[11]=r,t[12]=c):c=t[12];const a=c;let x;t[13]!==l?(x=async()=>{await l.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},t[13]=l,t[14]=x):x=t[14];let g;t[15]!==a?(g=()=>{V("brand_created"),a(),U.success("Brand created")},t[15]=a,t[16]=g):g=t[16];let h;t[17]!==x||t[18]!==g?(h={mutationFn:x,onSuccess:g,onError:Et},t[17]=x,t[18]=g,t[19]=h):h=t[19];const{mutate:v,isPending:f}=ge(h);let C;t[20]!==l?(C=async _=>{V("brand_extract_started",{domain:_});const $=await l.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:_}});$e($)},t[20]=l,t[21]=C):C=t[21];let w;t[22]!==a?(w=()=>{V("brand_extract_succeeded"),a(),U.success("Brand extracted successfully")},t[22]=a,t[23]=w):w=t[23];let D;t[24]!==w||t[25]!==C?(D={mutationFn:C,onSuccess:w,onError:Bt},t[24]=w,t[25]=C,t[26]=D):D=t[26];const{mutate:y,isPending:N}=ge(D),I=Ne,z=Ne,H=Ne,xe="flex flex-col gap-6";let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs("div",{children:[n.jsx(Ne.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."})]}),t[27]=k):k=t[27];let B;t[28]!==v?(B=()=>v(),t[28]=v,t[29]=B):B=t[29];let A;t[30]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(Re,{size:14}),t[30]=A):A=t[30];let T;t[31]!==f||t[32]!==B?(T=n.jsxs("div",{className:"flex items-center justify-between",children:[k,n.jsxs(Te,{variant:"outline",onClick:B,disabled:f,children:[A,"Add Brand"]})]}),t[31]=f,t[32]=B,t[33]=T):T=t[33];let O;t[34]!==e||t[35]!==y||t[36]!==N?(O=e&&n.jsx(it,{onExtract:_=>y(_),isExtracting:N}),t[34]=e,t[35]=y,t[36]=N,t[37]=O):O=t[37];const q=m.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(Te,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>v(),disabled:f,children:[n.jsx(Re,{size:14}),"Add your first brand"]})]}),M="group space-y-3";let P;t[38]!==l||t[39]!==a?(P=_=>n.jsx(ht,{brand:_,client:l,onChanged:a},_.id),t[38]=l,t[39]=a,t[40]=P):P=t[40];const L=m.map(P);let E;t[41]!==L?(E=n.jsx("div",{className:M,children:L}),t[41]=L,t[42]=E):E=t[42];let K;t[43]!==T||t[44]!==O||t[45]!==q||t[46]!==E?(K=n.jsxs("div",{className:xe,children:[T,O,q,E]}),t[43]=T,t[44]=O,t[45]=q,t[46]=E,t[47]=K):K=t[47];let F;t[48]!==H.Body||t[49]!==K?(F=n.jsx(H.Body,{children:K}),t[48]=H.Body,t[49]=K,t[50]=F):F=t[50];let S;t[51]!==z.Content||t[52]!==F?(S=n.jsx(z.Content,{children:F}),t[51]=z.Content,t[52]=F,t[53]=S):S=t[53];let R;return t[54]!==I||t[55]!==S?(R=n.jsx(I,{children:S}),t[54]=I,t[55]=S,t[56]=R):R=t[56],R}function Bt(t){V("brand_extract_failed",{error:t instanceof Error?t.message:"unknown"}),U.error(t instanceof Error?t.message:"Failed to extract brand")}function Et(){return U.error("Failed to create brand")}function Ft(t){return!t.archivedAt}function Yt(){const t=X.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(kt,{}),t[0]=e):e=t[0],e}export{Yt as default};
1
+ import{e as X,a0 as Ie,p as ze,z as Le,K as Pe,n as Ke,a as ge,j as n,B as Te,t as V,o as U,r as Oe,D as Ue,c as _e,C as fe}from"./index-Bf4UxK2Z.js";import{S as Xe,u as He}from"./constants-dLpaUsN8.js";import{t as Me}from"./ChevronDown-C2svK15b.js";import{i as qe}from"./ChevronRight-D_jXf5Kp.js";import{s as Ve,t as Qe}from"./Star01-f02R5Lt3.js";import{n as Ge}from"./LinkExternal01-8dkTfrKr.js";import{s as Re}from"./Plus-DUbqF6rK.js";import{s as Ye}from"./Trash01-cTgn14Wa.js";import{i as Je}from"./Zap-BuqS_qna.js";import{c as We,b as Ze,d as et,f as tt,g as st,e as nt,a as lt,A as ot}from"./alert-dialog-6PLIDXks.js";import{I as ue}from"./input-D3wLBcw1.js";import{T as rt}from"./textarea-BF_TKrea.js";import{P as Ne}from"./index-rkrd3EG7.js";import{u as $e}from"./unwrap-tool-result-BYXdCQMg.js";import{u as at}from"./use-debounced-autosave-BBwvvwih.js";import"./sidebar-B_4prYx4.js";import"./LayoutLeft-PSosyh8W.js";import"./tooltip-DM9palzE.js";import"./X-KaP-9Zgp.js";function we(t){const e=X.c(8),{title:s,children:o,className:l}=t;let r;e[0]!==l?(r=_e("rounded-2xl border border-border/60 bg-background p-5",l),e[0]=l,e[1]=r):r=e[1];let i;e[2]!==s?(i=n.jsx("div",{className:"mb-4",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s})}),e[2]=s,e[3]=i):i=e[3];let d;return e[4]!==o||e[5]!==r||e[6]!==i?(d=n.jsxs("div",{className:r,children:[i,o]}),e[4]=o,e[5]=r,e[6]=i,e[7]=d):d=e[7],d}function it(t){const e=X.c(25),{onExtract:s,isExtracting:o}=t,[l,r]=Oe.useState("");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(Je,{size:18,className:"text-primary"})}),e[0]=i):i=e[0];let d,u;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),u=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]=d,e[2]=u):(d=e[1],u=e[2]);let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=f=>r(f.target.value),e[3]=p):p=e[3];let b;e[4]!==l||e[5]!==o||e[6]!==s?(b=f=>{f.key==="Enter"&&l.trim()&&!o&&s(l.trim())},e[4]=l,e[5]=o,e[6]=s,e[7]=b):b=e[7];let m;e[8]!==l||e[9]!==b?(m=n.jsx(ue,{placeholder:"acme.com",value:l,onChange:p,className:"max-w-xs",onKeyDown:b}),e[8]=l,e[9]=b,e[10]=m):m=e[10];let c;e[11]!==l||e[12]!==o?(c=!l.trim()||o,e[11]=l,e[12]=o,e[13]=c):c=e[13];let a;e[14]!==l||e[15]!==s?(a=()=>s(l.trim()),e[14]=l,e[15]=s,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ve,{size:14}),e[17]=x):x=e[17];const g=o?"Extracting...":"Extract";let h;e[18]!==g||e[19]!==c||e[20]!==a?(h=n.jsxs(Te,{variant:"outline",disabled:c,onClick:a,children:[x,g]}),e[18]=g,e[19]=c,e[20]=a,e[21]=h):h=e[21];let v;return e[22]!==h||e[23]!==m?(v=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:[i,n.jsxs("div",{className:"flex-1",children:[d,u,n.jsxs("div",{className:"mt-3 flex gap-2",children:[m,h]})]})]})}),e[22]=h,e[23]=m,e[24]=v):v=e[24],v}function ct(t){const e=X.c(36),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s?(r=s.watch("domain"),e[0]=s,e[1]=r):r=e[1];const i=r;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),e[2]=d):d=e[2];let u;e[3]!==o||e[4]!==l?(u=D=>{const{field:y}=D;return n.jsx(ue,{...y,onChange:N=>{y.onChange(N),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"Acme Corp"})},e[3]=o,e[4]=l,e[5]=u):u=e[5];let p;e[6]!==s.control||e[7]!==u?(p=n.jsxs("div",{children:[d,n.jsx(fe,{control:s.control,name:"name",render:u})]}),e[6]=s.control,e[7]=u,e[8]=p):p=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("span",{children:"Domain"}),e[9]=b):b=e[9];let m;e[10]!==i?(m=i&&n.jsxs("a",{href:`https://${i}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 transition-colors hover:text-foreground",children:[n.jsx(Ge,{size:10}),"open"]}),e[10]=i,e[11]=m):m=e[11];let c;e[12]!==m?(c=n.jsxs("label",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[b,m]}),e[12]=m,e[13]=c):c=e[13];let a;e[14]!==o||e[15]!==l?(a=D=>{const{field:y}=D;return n.jsx(ue,{...y,onChange:N=>{y.onChange(N),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"acme.com"})},e[14]=o,e[15]=l,e[16]=a):a=e[16];let x;e[17]!==s.control||e[18]!==a?(x=n.jsx(fe,{control:s.control,name:"domain",render:a}),e[17]=s.control,e[18]=a,e[19]=x):x=e[19];let g;e[20]!==c||e[21]!==x?(g=n.jsxs("div",{children:[c,x]}),e[20]=c,e[21]=x,e[22]=g):g=e[22];let h;e[23]!==g||e[24]!==p?(h=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[p,g]}),e[23]=g,e[24]=p,e[25]=h):h=e[25];let v;e[26]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),e[26]=v):v=e[26];let f;e[27]!==o||e[28]!==l?(f=D=>{const{field:y}=D;return n.jsx(rt,{...y,onChange:N=>{y.onChange(N),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"Brief description of what the company does...",rows:3})},e[27]=o,e[28]=l,e[29]=f):f=e[29];let C;e[30]!==s.control||e[31]!==f?(C=n.jsxs("div",{children:[v,n.jsx(fe,{control:s.control,name:"overview",render:f})]}),e[30]=s.control,e[31]=f,e[32]=C):C=e[32];let w;return e[33]!==h||e[34]!==C?(w=n.jsx(we,{title:"Company Overview",children:n.jsxs("div",{className:"space-y-3",children:[h,C]})}),e[33]=h,e[34]=C,e[35]=w):w=e[35],w}const dt={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"};function Ae(t){const e=X.c(22),{form:s,name:o,label:l,imgClassName:r,onFieldChange:i,onFieldCommit:d}=t,u=r===void 0?"h-full w-full object-contain p-3":r;let p;e[0]!==s||e[1]!==o?(p=s.watch(o),e[0]=s,e[1]=o,e[2]=p):p=e[2];const b=p;let m;e[3]!==u||e[4]!==l||e[5]!==b?(m=n.jsx("div",{className:"flex aspect-video w-28 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:dt,children:b?n.jsx("img",{src:b,alt:l,className:u,loading:"lazy"}):n.jsxs("span",{className:"text-[10px] text-muted-foreground/70",children:["No ",l.toLowerCase()]})}),e[3]=u,e[4]=l,e[5]=b,e[6]=m):m=e[6];let c;e[7]!==l?(c=n.jsxs("label",{className:"mb-1 block text-xs text-muted-foreground",children:[l," URL"]}),e[7]=l,e[8]=c):c=e[8];let a;e[9]!==i||e[10]!==d?(a=v=>{const{field:f}=v;return n.jsx(ue,{...f,onChange:C=>{f.onChange(C),i()},onBlur:()=>{f.onBlur(),d()},placeholder:"https://..."})},e[9]=i,e[10]=d,e[11]=a):a=e[11];let x;e[12]!==s.control||e[13]!==o||e[14]!==a?(x=n.jsx(fe,{control:s.control,name:o,render:a}),e[12]=s.control,e[13]=o,e[14]=a,e[15]=x):x=e[15];let g;e[16]!==c||e[17]!==x?(g=n.jsxs("div",{className:"flex-1",children:[c,x]}),e[16]=c,e[17]=x,e[18]=g):g=e[18];let h;return e[19]!==m||e[20]!==g?(h=n.jsxs("div",{className:"flex items-start gap-3",children:[m,g]}),e[19]=m,e[20]=g,e[21]=h):h=e[21],h}function mt(t){const e=X.c(4),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;return e[0]!==s||e[1]!==o||e[2]!==l?(r=n.jsx(we,{title:"Logos & Images",children:n.jsxs("div",{className:"space-y-3",children:[n.jsx(Ae,{form:s,name:"logo",label:"Logo",onFieldChange:o,onFieldCommit:l}),n.jsx(Ae,{form:s,name:"favicon",label:"Favicon",imgClassName:"h-12 w-12 object-contain",onFieldChange:o,onFieldCommit:l}),n.jsx(Ae,{form:s,name:"ogImage",label:"SEO / OG image",imgClassName:"h-full w-full object-contain",onFieldChange:o,onFieldCommit:l})]})}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3],r}const ft=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function ut(t){const e=X.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=ft.map(d=>{const{key:u,label:p}=d,b=`fonts.${u}`,m=s.watch(b);return n.jsxs("div",{children:[n.jsxs("label",{className:"mb-1 flex items-center gap-3 text-xs text-muted-foreground",children:[n.jsx("span",{className:"w-7 text-base font-medium leading-none text-foreground",children:"Aa"}),n.jsx("span",{children:p}),m&&n.jsx("span",{className:"ml-auto truncate text-foreground",style:{fontFamily:m},children:m})]}),n.jsx(fe,{control:s.control,name:b,render:c=>{const{field:a}=c;return n.jsx(ue,{...a,value:a.value??"",onChange:x=>{a.onChange(x),o()},onBlur:()=>{a.onBlur(),l()},placeholder:`Font family for ${p.toLowerCase()}`})}})]},u)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let i;return e[4]!==r?(i=n.jsx(we,{title:"Fonts",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=i):i=e[5],i}const xt=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function gt(t){const e=X.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=xt.map(d=>{const{key:u,label:p}=d,b=`colors.${u}`;return n.jsx(fe,{control:s.control,name:b,render:m=>{const{field:c}=m;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:c.value??"#000000",onChange:a=>{c.onChange(a.target.value),o()},onBlur:()=>{c.onBlur(),l()},className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(ue,{value:c.value??"",onChange:a=>{c.onChange(a.target.value),o()},onBlur:()=>{c.onBlur(),l()},placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:p})]})}},u)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let i;return e[4]!==r?(i=n.jsx(we,{title:"Colors",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=i):i=e[5],i}function ht(t){const e=X.c(128),{brand:s,client:o,onChanged:l}=t,[r,i]=Oe.useState(s.isDefault??!1),[d,u]=Oe.useState(!1),p=s.name??"",b=s.domain??"",m=s.overview??"",c=s.logo??"",a=s.favicon??"",x=s.ogImage??"";let g;e[0]!==s.fonts?(g=s.fonts??{},e[0]=s.fonts,e[1]=g):g=e[1];let h;e[2]!==s.colors?(h=s.colors??{},e[2]=s.colors,e[3]=h):h=e[3];let v;e[4]!==p||e[5]!==b||e[6]!==m||e[7]!==c||e[8]!==a||e[9]!==x||e[10]!==g||e[11]!==h?(v={values:{name:p,domain:b,overview:m,logo:c,favicon:a,ogImage:x,fonts:g,colors:h}},e[4]=p,e[5]=b,e[6]=m,e[7]=c,e[8]=a,e[9]=x,e[10]=g,e[11]=h,e[12]=v):v=e[12];const f=Ue(v);let C;e[13]!==s.id||e[14]!==s.images||e[15]!==o?(C={mutationFn:async j=>{const ve=Object.values(j.fonts).some(Dt),Ce=Object.values(j.colors).some(wt),Se={id:s.id,name:j.name,domain:j.domain,overview:j.overview,logo:j.logo||null,favicon:j.favicon||null,ogImage:j.ogImage||null,fonts:ve?j.fonts:null,colors:Ce?j.colors:null,images:s.images};await o.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:Se})},onError:_t},e[13]=s.id,e[14]=s.images,e[15]=o,e[16]=C):C=e[16];const w=ge(C);let D;e[17]!==s.id||e[18]!==f||e[19]!==l||e[20]!==w?(D={delayMs:500,save:async()=>{const j=f.control._formState.dirtyFields,ve=Object.keys(j);if(ve.length===0)return;const Ce=f.getValues(),Se=f.control._defaultValues;f.reset(Ce,{keepValues:!0});try{await w.mutateAsync(Ce),V("brand_updated",{brand_id:s.id,fields:ve}),U.success("Brand context updated successfully"),l()}catch{f.reset(Se,{keepValues:!0})}}},e[17]=s.id,e[18]=f,e[19]=l,e[20]=w,e[21]=D):D=e[21];const{schedule:y,flush:N}=at(D);let I;e[22]!==s.id||e[23]!==o?(I=async()=>{await o.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:s.id}})},e[22]=s.id,e[23]=o,e[24]=I):I=e[24];let z;e[25]!==s.id||e[26]!==l?(z=()=>{V("brand_deleted",{brand_id:s.id}),u(!1),l(),U.success("Brand deleted")},e[25]=s.id,e[26]=l,e[27]=z):z=e[27];let H;e[28]!==I||e[29]!==z?(H={mutationFn:I,onSuccess:z,onError:Nt},e[28]=I,e[29]=z,e[30]=H):H=e[30];const{mutate:xe,isPending:k}=ge(H);let B;e[31]!==s.id||e[32]!==s.isDefault||e[33]!==o?(B=async()=>{await o.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:s.id,isDefault:!s.isDefault}})},e[31]=s.id,e[32]=s.isDefault,e[33]=o,e[34]=B):B=e[34];let A;e[35]!==s.id||e[36]!==s.isDefault||e[37]!==l?(A=()=>{V(s.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:s.id}),l(),U.success(s.isDefault?"Removed as default brand":"Set as default brand")},e[35]=s.id,e[36]=s.isDefault,e[37]=l,e[38]=A):A=e[38];let T;e[39]!==B||e[40]!==A?(T={mutationFn:B,onSuccess:A,onError:Ct},e[39]=B,e[40]=A,e[41]=T):T=e[41];const{mutate:O}=ge(T),q=s.isDefault?"border-primary/30":"border-border/60";let M;e[42]!==q?(M=_e("rounded-2xl border bg-background",q),e[42]=q,e[43]=M):M=e[43];let P;e[44]!==r?(P=()=>i(!r),e[44]=r,e[45]=P):P=e[45];let L;e[46]!==r?(L=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:r?n.jsx(Me,{size:14}):n.jsx(qe,{size:14})}),e[46]=r,e[47]=L):L=e[47];let E;e[48]!==s.logo||e[49]!==s.name?(E=s.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:s.logo,alt:"",className:"h-full w-full object-contain p-1",onError:vt})}):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:s.name?.charAt(0)?.toUpperCase()||"?"})}),e[48]=s.logo,e[49]=s.name,e[50]=E):E=e[50];const K=s.name||"Untitled Brand";let F;e[51]!==K?(F=n.jsx("span",{className:"text-sm font-medium text-foreground",children:K}),e[51]=K,e[52]=F):F=e[52];let S;e[53]!==s.domain?(S=s.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s.domain}),e[53]=s.domain,e[54]=S):S=e[54];let R;e[55]!==F||e[56]!==S?(R=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[F,S]}),e[55]=F,e[56]=S,e[57]=R):R=e[57];let _;e[58]!==s.colors||e[59]!==r?(_=!r&&s.colors&&Object.values(s.colors).some(yt)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(s.colors).filter(jt).map(bt)}),e[58]=s.colors,e[59]=r,e[60]=_):_=e[60];let $;e[61]!==s.fonts||e[62]!==r?($=!r&&s.fonts&&Object.values(s.fonts).some(pt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(s.fonts).filter(Boolean).join(", ")}),e[61]=s.fonts,e[62]=r,e[63]=$):$=e[63];const De=s.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let Q;e[64]!==De?(Q=_e("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",De),e[64]=De,e[65]=Q):Q=e[65];let G,Y;e[66]!==O?(G=j=>{j.stopPropagation(),O()},Y=j=>{j.key==="Enter"&&(j.stopPropagation(),O())},e[66]=O,e[67]=G,e[68]=Y):(G=e[67],Y=e[68]);const ke=s.isDefault?"Unset as default":"Set as default",Be=s.isDefault?"text-primary fill-primary":"text-muted-foreground";let J;e[69]!==Be?(J=_e(Be),e[69]=Be,e[70]=J):J=e[70];let W;e[71]!==J?(W=n.jsx(Qe,{size:13,className:J}),e[71]=J,e[72]=W):W=e[72];let Z;e[73]!==Q||e[74]!==G||e[75]!==Y||e[76]!==ke||e[77]!==W?(Z=n.jsx("span",{role:"button",tabIndex:0,className:Q,onClick:G,onKeyDown:Y,title:ke,children:W}),e[73]=Q,e[74]=G,e[75]=Y,e[76]=ke,e[77]=W,e[78]=Z):Z=e[78];let he,pe;e[79]===Symbol.for("react.memo_cache_sentinel")?(he=j=>{j.stopPropagation(),u(!0)},pe=j=>{j.key==="Enter"&&(j.stopPropagation(),u(!0))},e[79]=he,e[80]=pe):(he=e[79],pe=e[80]);let be;e[81]===Symbol.for("react.memo_cache_sentinel")?(be=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:he,onKeyDown:pe,title:"Delete brand",children:n.jsx(Ye,{size:13,className:"text-muted-foreground"})}),e[81]=be):be=e[81];let ee;e[82]!==P||e[83]!==L||e[84]!==E||e[85]!==R||e[86]!==_||e[87]!==$||e[88]!==Z?(ee=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[L,E,R,_,$,Z,be]}),e[82]=P,e[83]=L,e[84]=E,e[85]=R,e[86]=_,e[87]=$,e[88]=Z,e[89]=ee):ee=e[89];let te;e[90]!==r||e[91]!==N||e[92]!==f||e[93]!==y?(te=r&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(ct,{form:f,onFieldChange:y,onFieldCommit:N}),n.jsx(mt,{form:f,onFieldChange:y,onFieldCommit:N}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(gt,{form:f,onFieldChange:y,onFieldCommit:N}),n.jsx(ut,{form:f,onFieldChange:y,onFieldCommit:N})]})]}),e[90]=r,e[91]=N,e[92]=f,e[93]=y,e[94]=te):te=e[94];let se;e[95]!==k?(se=j=>{!j&&!k&&u(!1)},e[95]=k,e[96]=se):se=e[96];let je;e[97]===Symbol.for("react.memo_cache_sentinel")?(je=n.jsx(We,{children:"Delete brand?"}),e[97]=je):je=e[97];const Ee=s.name||"this brand";let ne;e[98]!==Ee?(ne=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:Ee}),". This action cannot be undone."]}),e[98]=Ee,e[99]=ne):ne=e[99];let le;e[100]!==s.isDefault?(le=s.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[100]=s.isDefault,e[101]=le):le=e[101];let oe;e[102]!==ne||e[103]!==le?(oe=n.jsxs(Ze,{children:[je,n.jsx(et,{asChild:!0,children:n.jsxs("div",{children:[ne,le]})})]}),e[102]=ne,e[103]=le,e[104]=oe):oe=e[104];let re;e[105]!==k?(re=n.jsx(tt,{disabled:k,children:"Cancel"}),e[105]=k,e[106]=re):re=e[106];let ae;e[107]!==xe?(ae=j=>{j.preventDefault(),xe()},e[107]=xe,e[108]=ae):ae=e[108];const Fe=k?"Deleting...":"Delete";let ie;e[109]!==k||e[110]!==ae||e[111]!==Fe?(ie=n.jsx(st,{onClick:ae,disabled:k,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Fe}),e[109]=k,e[110]=ae,e[111]=Fe,e[112]=ie):ie=e[112];let ce;e[113]!==re||e[114]!==ie?(ce=n.jsxs(nt,{children:[re,ie]}),e[113]=re,e[114]=ie,e[115]=ce):ce=e[115];let de;e[116]!==oe||e[117]!==ce?(de=n.jsxs(lt,{children:[oe,ce]}),e[116]=oe,e[117]=ce,e[118]=de):de=e[118];let me;e[119]!==d||e[120]!==se||e[121]!==de?(me=n.jsx(ot,{open:d,onOpenChange:se,children:de}),e[119]=d,e[120]=se,e[121]=de,e[122]=me):me=e[122];let ye;return e[123]!==M||e[124]!==ee||e[125]!==te||e[126]!==me?(ye=n.jsxs("div",{className:M,children:[ee,te,me]}),e[123]=M,e[124]=ee,e[125]=te,e[126]=me,e[127]=ye):ye=e[127],ye}function pt(t){return t}function bt(t){const[e,s]=t;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:s},title:`${e}: ${s}`},e)}function jt(t){const[,e]=t;return e}function yt(t){return t}function vt(t){t.target.style.display="none"}function Ct(){return U.error("Failed to update default brand")}function Nt(){return U.error("Failed to delete brand")}function _t(){return U.error("Failed to save brand context")}function wt(t){return t?.trim()}function Dt(t){return t?.trim()}function kt(){const t=X.c(57),{brandExtractEnabled:e}=Ie(),{org:s}=ze();let o;t[0]!==s.id||t[1]!==s.slug?(o={connectionId:Xe,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=o):o=t[2];const l=He(o),r=Le();let i;t[3]!==s.id?(i=Pe.brandContext(s.id),t[3]=s.id,t[4]=i):i=t[4];let d;t[5]!==l?(d=async()=>{const _=await l.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),$=$e(_);return Array.isArray($?.items)?$.items:[]},t[5]=l,t[6]=d):d=t[6];let u;t[7]!==i||t[8]!==d?(u={queryKey:i,queryFn:d},t[7]=i,t[8]=d,t[9]=u):u=t[9];const{data:p}=Ke(u),m=(p===void 0?[]:p).filter(Ft);let c;t[10]!==s.id||t[11]!==r?(c=()=>r.invalidateQueries({queryKey:Pe.brandContext(s.id),refetchType:"all"}),t[10]=s.id,t[11]=r,t[12]=c):c=t[12];const a=c;let x;t[13]!==l?(x=async()=>{await l.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},t[13]=l,t[14]=x):x=t[14];let g;t[15]!==a?(g=()=>{V("brand_created"),a(),U.success("Brand created")},t[15]=a,t[16]=g):g=t[16];let h;t[17]!==x||t[18]!==g?(h={mutationFn:x,onSuccess:g,onError:Et},t[17]=x,t[18]=g,t[19]=h):h=t[19];const{mutate:v,isPending:f}=ge(h);let C;t[20]!==l?(C=async _=>{V("brand_extract_started",{domain:_});const $=await l.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:_}});$e($)},t[20]=l,t[21]=C):C=t[21];let w;t[22]!==a?(w=()=>{V("brand_extract_succeeded"),a(),U.success("Brand extracted successfully")},t[22]=a,t[23]=w):w=t[23];let D;t[24]!==w||t[25]!==C?(D={mutationFn:C,onSuccess:w,onError:Bt},t[24]=w,t[25]=C,t[26]=D):D=t[26];const{mutate:y,isPending:N}=ge(D),I=Ne,z=Ne,H=Ne,xe="flex flex-col gap-6";let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs("div",{children:[n.jsx(Ne.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."})]}),t[27]=k):k=t[27];let B;t[28]!==v?(B=()=>v(),t[28]=v,t[29]=B):B=t[29];let A;t[30]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(Re,{size:14}),t[30]=A):A=t[30];let T;t[31]!==f||t[32]!==B?(T=n.jsxs("div",{className:"flex items-center justify-between",children:[k,n.jsxs(Te,{variant:"outline",onClick:B,disabled:f,children:[A,"Add Brand"]})]}),t[31]=f,t[32]=B,t[33]=T):T=t[33];let O;t[34]!==e||t[35]!==y||t[36]!==N?(O=e&&n.jsx(it,{onExtract:_=>y(_),isExtracting:N}),t[34]=e,t[35]=y,t[36]=N,t[37]=O):O=t[37];const q=m.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(Te,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>v(),disabled:f,children:[n.jsx(Re,{size:14}),"Add your first brand"]})]}),M="group space-y-3";let P;t[38]!==l||t[39]!==a?(P=_=>n.jsx(ht,{brand:_,client:l,onChanged:a},_.id),t[38]=l,t[39]=a,t[40]=P):P=t[40];const L=m.map(P);let E;t[41]!==L?(E=n.jsx("div",{className:M,children:L}),t[41]=L,t[42]=E):E=t[42];let K;t[43]!==T||t[44]!==O||t[45]!==q||t[46]!==E?(K=n.jsxs("div",{className:xe,children:[T,O,q,E]}),t[43]=T,t[44]=O,t[45]=q,t[46]=E,t[47]=K):K=t[47];let F;t[48]!==H.Body||t[49]!==K?(F=n.jsx(H.Body,{children:K}),t[48]=H.Body,t[49]=K,t[50]=F):F=t[50];let S;t[51]!==z.Content||t[52]!==F?(S=n.jsx(z.Content,{children:F}),t[51]=z.Content,t[52]=F,t[53]=S):S=t[53];let R;return t[54]!==I||t[55]!==S?(R=n.jsx(I,{children:S}),t[54]=I,t[55]=S,t[56]=R):R=t[56],R}function Bt(t){V("brand_extract_failed",{error:t instanceof Error?t.message:"unknown"}),U.error(t instanceof Error?t.message:"Failed to extract brand")}function Et(){return U.error("Failed to create brand")}function Ft(t){return!t.archivedAt}function Yt(){const t=X.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(kt,{}),t[0]=e):e=t[0],e}export{Yt as default};
@@ -1 +1 @@
1
- import{e as l,c as n,j as c}from"./index-C9UEm0aF.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-Bf4UxK2Z.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,4 +1,4 @@
1
- import{U as ee,e as re,a2 as Ie,z as xe,p as X,K as Se,o as Te,T as ae,f as Re,d as Ce,g as Pe,r as u,j as te,t as _e,b as $e,R as De,ay as Oe}from"./index-C9UEm0aF.js";import{u as Ne,c as Le,a as je}from"./hooks-C0RpcvT-.js";import{g as Ue,u as Fe,S as Ve}from"./constants-DG2sk_0H.js";import{u as Ke}from"./use-virtual-mcp-B0ez_suv.js";import{u as qe,a as oe}from"./use-ai-providers-C3VHCF8p.js";import{e as Be}from"./use-organization-settings-DKdHITUe.js";const He={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.4-mini"]},Ge={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.4"]},We={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.5"]},Qe={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},Xe={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function J(t,e,s,n){for(const o of s){const a=t.find(r=>r.modelId===o);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}for(const o of s){const a=t.find(r=>r.modelId.includes(o));if(a)return{keyId:e,modelId:a.modelId,title:a.title}}if(n){const o=t.find(n);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}return null}function ze(t,e){const s={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const n of t){const o=e[n.id]??[],a=n.providerId;s.chat.fast||(s.chat.fast=J(o,n.id,He[a]??[])),s.chat.smart||(s.chat.smart=J(o,n.id,Ge[a]??[])),s.chat.thinking||(s.chat.thinking=J(o,n.id,We[a]??[])),s.image||(s.image=J(o,n.id,Qe[a]??[],r=>r.capabilities?.includes("image")===!0)),s.webResearch||(s.webResearch=J(o,n.id,Xe[a]??[],r=>{const c=r.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return c.includes("sonar")||c.includes("deepresearch")}))}return s}function Je(t,e){const{mimeType:s,data:n}=t;if(s.startsWith("text/"))try{const o=new TextDecoder().decode(Uint8Array.from(atob(n),a=>a.charCodeAt(0)));return[{type:"text",text:`${e}
1
+ import{U as ee,e as re,a2 as Ie,z as xe,p as X,K as Se,o as Te,T as ae,f as Re,d as Ce,g as Pe,r as u,j as te,t as _e,b as $e,R as De,ay as Oe}from"./index-Bf4UxK2Z.js";import{u as Ne,c as Le,a as je}from"./hooks-CKWLlFdn.js";import{g as Ue,u as Fe,S as Ve}from"./constants-dLpaUsN8.js";import{u as Ke}from"./use-virtual-mcp-CfSWiyjb.js";import{u as qe,a as oe}from"./use-ai-providers-OUW6JMOp.js";import{e as Be}from"./use-organization-settings-DsFVMR9y.js";const He={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.4-mini"]},Ge={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.4"]},We={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.5"]},Qe={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},Xe={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function J(t,e,s,n){for(const o of s){const a=t.find(r=>r.modelId===o);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}for(const o of s){const a=t.find(r=>r.modelId.includes(o));if(a)return{keyId:e,modelId:a.modelId,title:a.title}}if(n){const o=t.find(n);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}return null}function ze(t,e){const s={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const n of t){const o=e[n.id]??[],a=n.providerId;s.chat.fast||(s.chat.fast=J(o,n.id,He[a]??[])),s.chat.smart||(s.chat.smart=J(o,n.id,Ge[a]??[])),s.chat.thinking||(s.chat.thinking=J(o,n.id,We[a]??[])),s.image||(s.image=J(o,n.id,Qe[a]??[],r=>r.capabilities?.includes("image")===!0)),s.webResearch||(s.webResearch=J(o,n.id,Xe[a]??[],r=>{const c=r.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return c.includes("sonar")||c.includes("deepresearch")}))}return s}function Je(t,e){const{mimeType:s,data:n}=t;if(s.startsWith("text/"))try{const o=new TextDecoder().decode(Uint8Array.from(atob(n),a=>a.charCodeAt(0)));return[{type:"text",text:`${e}
2
2
  ${o}`}]}catch(o){console.error("Failed to decode text file:",o)}return[{type:"file",url:`data:${s};base64,${n}`,filename:e,mediaType:s}]}function ge(t,e){const s=[];for(const n of t)"text"in n&&n.text?s.push({type:"text",text:`[${e}]
3
3
  ${n.text}`}):"blob"in n&&n.blob&&n.mimeType&&s.push({type:"file",url:`data:${n.mimeType};base64,${n.blob}`,filename:String(n.uri),mediaType:String(n.mimeType)});return s}function Ye(t,e){const s=[];for(const n of t){if(n.role!=="user"||!n.content)continue;const o=Array.isArray(n.content)?n.content:[n.content];for(const a of o)switch(a.type){case"text":{const r=a.text?.trim();if(!r)continue;s.push({type:"text",text:`[${e}]
4
4
  ${r}`});break}case"image":case"audio":{if(!a.data||!a.mimeType)continue;s.push({type:"file",url:`data:${a.mimeType};base64,${a.data}`,mediaType:a.mimeType});break}case"resource":{const r=a.resource;if(!r||!r.mimeType)continue;r&&("text"in r&&r.text?s.push({type:"text",text:`[${e}]
@@ -1 +1 @@
1
- import{e as n,c as d,j as c,b7 as l,b8 as b}from"./index-C9UEm0aF.js";import{i as m}from"./Check-CgJkW5mO.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
1
+ import{e as n,c as d,j as c,b7 as l,b8 as b}from"./index-Bf4UxK2Z.js";import{i as m}from"./Check-DKPiDw0v.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
@@ -1 +1 @@
1
- import{I as Ke,M as te,e as N,j as t,E as Te,r as C,p as le,D as Ge,c as z,b0 as Qe,b1 as Ye,l as ie,d as Xe,L as G,B as q,o as Ze,g as ae,b2 as ke}from"./index-C9UEm0aF.js";import{E as Pe}from"./empty-state-DTkqsJki.js";import{u as et,a as Ee}from"./use-collections-DNvmDnbN.js";import{u as ce}from"./constants-DG2sk_0H.js";import{F as se,a as tt,b as de,d as me}from"./form-CgjywpPp.js";import{I as ue}from"./input-Cdi9gxjc.js";import{T as re}from"./textarea-ezBAh-ci.js";import{a as st,b as nt,V as pe}from"./layout-xI0NTaVa.js";import{S as ot,W as rt,a as lt}from"./index-CkNEQt0t.js";import{g as it,M as at,b as je}from"./types-C4e-LRxV.js";import{S as be,a as Ne,b as ve,c as Se,d as ne}from"./select-B4d2U3-e.js";import{c as ct,b as ye,T as we,a as Ce}from"./tooltip-CaQjUma3.js";import{i as dt}from"./AlertCircle-DMn4ErF7.js";import{v as mt,B as ut,T as pt,U as xt,V as ft,W as Ie}from"./agent-icon-sU9yNgMj.js";import{a as ht}from"./RefreshCcw01-STdDbh6L.js";import{i as gt}from"./Play-Y01bx8MI.js";import{i as jt}from"./ChevronRight-9ST8kRHp.js";import{O as bt,M as Nt}from"./index-CAWr5v6I.js";import{g as vt}from"./connection-slug-eyAPH6o3.js";import{u as St,T as yt}from"./tools-list-8krv5h-3.js";import{a as _e,u as Oe}from"./use-connection-BGdZGnmu.js";import{b as wt}from"./use-mcp-tools-BDMB9XmW.js";import{c as Ct}from"./content-blocks-o63cs2vh.js";import{I as $e}from"./integration-icon-DcWsEICc.js";import{c as It,j as $t}from"./chat-context-DR6dQnLy.js";import{u as Tt}from"./shell-layout-C2Sdv8NG.js";import{M as kt}from"./monaco-editor-CatlVtHe.js";import{E as Pt}from"./empty-state-_qOVtH-p.js";import{n as Et}from"./Container-DvJcXzPK.js";import"./label-BuSjhBby.js";import"./index-guSlXYnQ.js";import"./sidebar-CGPsmcjg.js";import"./LayoutLeft-msnP7LxF.js";import"./X-DDsITeaO.js";import"./index-ycinRUyU.js";import"./collections-D64xxjNO.js";import"./index-DKSThpY5.js";import"./use-virtual-mcp-B0ez_suv.js";import"./accordion-BJxZ1Mun.js";import"./index-C5OHYX2D.js";import"./badge-C2JMvH6Q.js";import"./spinner-CIoX-SxH.js";import"./view-mode-toggle-ChtVPtKo.js";import"./dialog-xU6O08Hz.js";import"./index-BtcuhRkM.js";import"./dropdown-menu-37ioHY85.js";import"./Check-CgJkW5mO.js";import"./DotsVertical-BWVeD_Nu.js";import"./Plus-DZMvWlgN.js";import"./Tool01-Ck4wzkil.js";import"./XClose-BfGe8XlD.js";import"./index-R7WmRLsq.js";import"./create-sse-subscription-CjI9SUTI.js";import"./ChevronDown-C6CmTT2m.js";import"./ChevronUp-DYBcJQJI.js";import"./SearchLg-tmO6QRl-.js";import"./ArrowNarrowLeft-DRMMU-Rx.js";import"./XCircle-zMGNHwa8.js";import"./ArrowUpRight-BG1qVEu5.js";import"./ZapSquare-DbH77Z5v.js";import"./Building02-DXFrqtM4.js";import"./CheckCircle-BhQF3J-G.js";import"./Star01-B7Wf0BA4.js";import"./Palette-CTxrzTV6.js";import"./Key01-CToqdwOF.js";import"./LinkExternal01-BYFbxPa2.js";import"./Lock01-Br965pCK.js";import"./Monitor01-CeCWg7Jm.js";import"./Sun-JMAHaccL.js";import"./SearchMd-i7Gp8R_i.js";import"./Settings02-Ca5SX90W.js";import"./Shield01-56gTI-65.js";import"./Trash01-DZil92Jh.js";import"./Upload01-B0HbOxqP.js";import"./User01-Bb_7ado6.js";import"./Users01-CCKc6ep2.js";import"./Users03-9Msw3sAO.js";import"./Zap-D1hcdQQV.js";import"./extract-connection-data-_i5LkZhQ.js";import"./constants-DPVM1Ytu.js";import"./use-registry-connections-BxKGYdQr.js";import"./use-organization-settings-DKdHITUe.js";import"./index-w6-egSGC.js";import"./popover-B8_iKHLU.js";import"./use-create-virtual-mcp-ChO4_kNB.js";import"./use-navigate-to-agent-Bcv_R7xe.js";import"./hooks-C0RpcvT-.js";import"./decopilot-sse-pool-BMdviN8X.js";import"./use-ai-providers-C3VHCF8p.js";import"./avatar-Ds0wPNKF.js";import"./required-auth-layout-BkADLVGr.js";import"./useRouterState-EoWY4nHO.js";import"./use-org-sso-B8VnAMoS.js";Ke({title:te().min(1),description:te().nullable(),body:te()});function oe(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function _t(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function Ot(s){const e=N.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let r;e[1]!==o.control?(r=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(se,{control:o.control,name:"title",render:Dt}),t.jsx(se,{control:o.control,name:"description",render:Rt})]})]}),e[1]=o.control,e[2]=r):r=e[2];let l,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=a):(l=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,a,t.jsx(se,{control:o.control,name:"body",render:At})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==r||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[r,c]}),e[7]=r,e[8]=c,e[9]=i):i=e[9];let p;return e[10]!==o||e[11]!==i?(p=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=p):p=e[12],p}function At(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Rt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Mt(s){const e=N.c(36),{providerId:o,promptId:n}=s,{org:r}=le(),l=o||null;let a;e[0]!==r.id||e[1]!==r.slug||e[2]!==l?(a={connectionId:l,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=l,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),p=Ee(o,"PROMPT",c),f=p.update.isPending;let u;e[4]!==i?(u=i?{title:i.title,description:i.description??null,body:oe(i)}:void 0,e[4]=i,e[5]=u):u=e[5];let h;e[6]!==u?(h={values:u},e[6]=u,e[7]=h):h=e[7];const v=Ge(h);let T;e[8]!==v||e[9]!==i?(T=()=>{i&&v.reset({title:i.title,description:i.description??null,body:oe(i)})},e[8]=v,e[9]=i,e[10]=T):T=e[10];const _=T;let O;e[11]!==p.update||e[12]!==v||e[13]!==n?(O=v.handleSubmit(async j=>{const P=await p.update.mutateAsync({id:n,data:{title:j.title,description:j.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:j.body}}]}});v.reset({title:P.title,description:P.description??null,body:oe(P)})}),e[11]=p.update,e[12]=v,e[13]=n,e[14]=O):O=e[14];const A=O;if(!i){let j;return e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=j):j=e[15],j}let w;e[16]!==i.title?(w=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=w):w=e[17];let k;e[18]!==i.description?(k=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=k):k=e[19];let I;e[20]!==w||e[21]!==k?(I=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[w,k]})}),e[20]=w,e[21]=k,e[22]=I):I=e[22];let g;e[23]!==A?(g=()=>{A()},e[23]=A,e[24]=g):g=e[24];let S;e[25]!==v.formState.isDirty||e[26]!==f||e[27]!==_||e[28]!==g?(S=t.jsx(st,{children:t.jsx(ot,{onSave:g,onUndo:_,isDirty:v.formState.isDirty,isSaving:f})}),e[25]=v.formState.isDirty,e[26]=f,e[27]=_,e[28]=g,e[29]=S):S=e[29];let y;e[30]!==v?(y=t.jsx("div",{className:"h-full",children:t.jsx(Ot,{form:v})}),e[30]=v,e[31]=y):y=e[31];let $;return e[32]!==S||e[33]!==y||e[34]!==I?($=t.jsxs(pe,{children:[I,S,y]}),e[32]=S,e[33]=y,e[34]=I,e[35]=$):$=e[35],$}function Ut(s){const e=N.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=_t(),e[0]=n):n=e[0];const r=n;if(!r){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==o?(l=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:r,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}const zt=Qe("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Bt(s){const e=N.c(10);let o,n,r;e[0]!==s?({className:o,variant:r,...n}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==o||e[5]!==r?(l=z(zt({variant:r}),o),e[4]=o,e[5]=r,e[6]=l):l=e[6];let a;return e[7]!==n||e[8]!==l?(a=t.jsx("div",{"data-slot":"alert",role:"alert",className:l,...n}),e[7]=n,e[8]=l,e[9]=a):a=e[9],a}function Lt(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("line-clamp-1 min-h-4 font-medium tracking-tight",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-title",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Vt(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("text-muted-foreground leading-relaxed",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-description",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Ae(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("min-w-0 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Re(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function J(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Q(s){const e=N.c(10);let o,n,r;e[0]!==s?({asChild:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);const l=o?Ye:"a";let a;e[4]!==n?(a=z("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==a?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:a,...r}),e[6]=l,e[7]=r,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("text-foreground font-medium truncate",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Y(s){const e=N.c(12);let o,n,r;e[0]!==s?({children:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==n?(l=z("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let a;e[6]!==o?(a=o??t.jsx(jt,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==r||e[9]!==l||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...r,children:a}),e[8]=r,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}const Ft=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Jt(s){const e=N.c(11),{toolName:o,connectionId:n,siblings:r,onSelectInstance:l,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=St(c);if(!i.isAuthenticated){let u;return e[2]!==i.supportsOAuth||e[3]!==a?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(bt,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(Nt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=u):u=e[4],u}const p=`${n}:${o}`;let f;return e[5]!==n||e[6]!==l||e[7]!==r||e[8]!==p||e[9]!==o?(f=t.jsx(Wt,{toolName:o,connectionId:n,siblings:r,onSelectInstance:l},p),e[5]=n,e[6]=l,e[7]=r,e[8]=p,e[9]=o,e[10]=f):f=e[10],f}function Wt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:r}=Xe({strict:!1}),l=(()=>{if(!r)return null;const d=`replay-${r}`,m=sessionStorage.getItem(d);if(!m)return null;sessionStorage.removeItem(d);try{return JSON.parse(m)}catch{return null}})(),a=(()=>{if(!l)return null;const d={};for(const[m,b]of Object.entries(l))b!==null&&typeof b=="object"?d[m]=JSON.stringify(b,null,2):d[m]=b;return d})(),[c,i]=C.useState(a??{}),[p,f]=C.useState(l?JSON.stringify(l,null,2):"{}"),[u,h]=C.useState(null),[v,T]=C.useState(null),[_,O]=C.useState(null),[A,w]=C.useState(null),[k,I]=C.useState(!1),[g,S]=C.useState(null),{org:y}=le(),$=_e(e),j=It(),P=$t(),{setChatOpen:B}=Tt(),M=`${e}:${s}`,R=ce({connectionId:e,orgId:y.id,orgSlug:y.slug}),U=wt({client:R}),x=U.data?.tools?.find(d=>d.name===s),E=it(x?._meta),L=d=>{if(!j)return;const m=Ct(d.content);m.content.length>0&&(B(!0),j.sendMessage({tiptapDoc:m}))},[D,X]=C.useState("json"),[Me,Ue]=C.useState(!1);E&&!Me&&(X("ui"),Ue(!0));const xe=x?.inputSchema?.properties,fe=xe?Object.keys(xe):[],W=fe.length>0,H={};if(W&&x?.inputSchema?.properties)for(const d of fe)H[d]=x.inputSchema.required?.includes(d)?"":void 0;const Z=d=>Object.prototype.hasOwnProperty.call(c,d),ze=async()=>{I(!0),w(null),h(null),T(null),O(null),S(null);const d=performance.now();try{if(!R)throw new Error("MCP client is not available");const m=W?{...H,...c}:(()=>{const V=p.trim();if(!V)return{};const F=JSON.parse(V);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();W&&x?.inputSchema?.properties&&Object.entries(x.inputSchema.properties).forEach(([V,F])=>{if((F.type==="object"||F.type==="array")&&typeof m[V]=="string")try{m[V]=JSON.parse(m[V])}catch{}});const b=await R.callTool({name:s,arguments:m}),K=b.structuredContent??b,We=performance.now(),qe=Math.round(We-d);h(K),T(b),O(m);const He=JSON.stringify(K),ge=new TextEncoder().encode(He).length;S({duration:`${qe}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(m){const b=m instanceof Error?m.message:String(m);w(b||"Unknown error occurred");const K=performance.now();S({duration:`${Math.round(K-d)}ms`})}finally{I(!1)}},ee=(d,m)=>{i(b=>({...b,[d]:m}))},Be=()=>{h(null),T(null),O(null),w(null),S(null)},Le=x?.name??Ft(s),Ve=t.jsx(Ae,{children:t.jsxs(Re,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:y.slug},children:"Connections"})})}),t.jsx(Y,{}),$&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:y.slug,appSlug:vt($)},search:{tab:"tools"},children:$.title})})}),t.jsx(Y,{})]}),t.jsx(J,{children:t.jsx(De,{children:Le})})]})}),he=o.length>1&&t.jsxs(be,{value:e,onValueChange:n,children:[t.jsx(Ne,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ve,{})}),t.jsx(Se,{children:o.map(d=>t.jsx(ne,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx($e,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Fe=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),x?.inputSchema?.required&&x.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:W&&x?.inputSchema?.properties?Object.entries(x.inputSchema.properties).map(([d,m])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,x.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:m.type})]}),m.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:m.description}),m.type==="object"||m.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:Z(d)?c[d]??"":H[d]??"",onChange:b=>ee(d,b.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):m.type==="boolean"?t.jsxs(be,{value:Z(d)?String(c[d]??""):"",onValueChange:b=>ee(d,b==="true"),children:[t.jsx(Ne,{children:t.jsx(ve,{placeholder:"Select true or false..."})}),t.jsxs(Se,{children:[t.jsx(ne,{value:"true",children:"true"}),t.jsx(ne,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:Z(d)?c[d]??"":H[d]??"",onChange:b=>ee(d,b.target.value),placeholder:`Enter ${d}...`})]},d)):x?.inputSchema&&!W?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:p,onChange:d=>f(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:k?t.jsxs(q,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(mt,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(q,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:ze,children:[t.jsx(gt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),Je=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[g&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.duration})]}),g.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.tokens})]}),g.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.bytes})]}),g.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:g.cost})})]}),E&&t.jsx(ct,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(ft,{size:14})})}),t.jsx(Ce,{children:"Interactive view"})]}),t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(Ie,{size:14})})}),t.jsx(Ce,{children:"JSON view"})]})]})})]})]}),A&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(Bt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(dt,{className:"h-4 w-4"}),t.jsx(Lt,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(Vt,{className:"text-xs text-destructive",children:A})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:E&&D==="ui"&&R?t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(at,{resourceURI:E,toolInfo:x?{tool:x}:void 0,toolInput:_??void 0,toolResult:v??void 0,displayMode:"fullscreen",minHeight:je.view.minHeight,maxHeight:je.view.maxHeight,client:R,onMessage:L,onUpdateModelContext:d=>P?.setAppContext(M,d),onTeardown:()=>P?.clearAppContext(M),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(kt,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(q,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(ht,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ie,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx($e,{icon:$?.icon||null,name:$?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[U.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):U.isLoading?t.jsx(ie,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:U.isSuccess?"ready":U.isLoading?"connecting":"error"})]}),t.jsx(yt,{annotations:x?.annotations,_meta:x?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:x?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Fe}),Je]})})]})})}function qt(s){const e=N.c(10),{itemId:o,siblings:n,onBack:r}=s,[l,a]=C.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(h=>h.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const i=c;if(!_e(i||void 0)||!i){let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=h):h=e[3],h}let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=f):f=e[4];let u;return e[5]!==i||e[6]!==r||e[7]!==n||e[8]!==o?(u=t.jsx(C.Suspense,{fallback:f,children:t.jsx(Jt,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:r})}),e[5]=i,e[6]=r,e[7]=n,e[8]=o,e[9]=u):u=e[9],u}const Ht={workflow:lt,workflow_execution:rt,prompt:Ut};function Kt(){const s=N.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const a=Oe(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,p=Gt;let f;return s[5]!==i||s[6]!==r||s[7]!==a?(f=t.jsx(qt,{itemId:r,siblings:a,onBack:i,onUpdate:p}),s[5]=i,s[6]=r,s[7]=a,s[8]=f):f=s[8],f}async function Gt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Yt(){const s=N.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=le();let p;s[3]!==n.appSlug?(p={slug:n.appSlug},s[3]=n.appSlug,s[4]=p):p=s[4];const u=Oe(p)[0]??null,h=u?.id??"",v=h||"no-connection",T=h??null;let _;s[5]!==i.id||s[6]!==i.slug||s[7]!==T?(_={connectionId:T,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=T,s[8]=_):_=s[8];const O=ce(_),A=Ee(v,r,O);let w;s[9]!==A||s[10]!==l?(w=async D=>{l&&await A.update.mutateAsync({id:l,data:D})},s[9]=A,s[10]=l,s[11]=w):w=s[11];const k=w;let I;s[12]!==r?(I=r?.toLowerCase(),s[12]=r,s[13]=I):I=s[13];const g=I,S=g&&Ht[g];let y;s[14]!==r?(y=Qt(r),s[14]=r,s[15]=y):y=s[15];const $=y;let j;s[16]!==i.slug?(j=t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=j):j=s[17];let P;s[18]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Y,{}),s[18]=P):P=s[18];let B;s[19]!==r||s[20]!==u||s[21]!==i.slug||s[22]!==n.appSlug?(B=u&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:r},children:u.title})})}),t.jsx(Y,{})]}),s[19]=r,s[20]=u,s[21]=i.slug,s[22]=n.appSlug,s[23]=B):B=s[23];let M;s[24]!==$?(M=t.jsx(J,{children:t.jsx(De,{children:$})}),s[24]=$,s[25]=M):M=s[25];let R;s[26]!==B||s[27]!==M||s[28]!==j?(R=t.jsx(Ae,{children:t.jsxs(Re,{children:[j,P,B,M]})}),s[26]=B,s[27]=M,s[28]=j,s[29]=R):R=s[29];const U=R;if(S){let D;return s[30]!==S||s[31]!==c||s[32]!==k||s[33]!==l?(D=t.jsx(S,{itemId:l,onBack:c,onUpdate:k}),s[30]=S,s[31]=c,s[32]=k,s[33]=l,s[34]=D):D=s[34],D}let x;s[35]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Et,{size:36,className:"text-muted-foreground"}),s[35]=x):x=s[35];let E;s[36]!==c?(E=t.jsx(Pt,{icon:x,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=E):E=s[37];let L;return s[38]!==U||s[39]!==E?(L=t.jsx(pe,{breadcrumb:U,children:E}),s[38]=U,s[39]=E,s[40]=L):L=s[40],L}function Xt(){const s=N.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Yt,{}),s[2]=l):l=s[2],l}function zn(){const s=N.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Xt,{})})}),s[0]=e):e=s[0],e}export{zn as default};
1
+ import{I as Ke,M as te,e as N,j as t,E as Te,r as C,p as le,D as Ge,c as z,b0 as Qe,b1 as Ye,l as ie,d as Xe,L as G,B as q,o as Ze,g as ae,b2 as ke}from"./index-Bf4UxK2Z.js";import{E as Pe}from"./empty-state-B_coEY2P.js";import{u as et,a as Ee}from"./use-collections-nufxZlf_.js";import{u as ce}from"./constants-dLpaUsN8.js";import{F as se,a as tt,b as de,d as me}from"./form-jI6P-pAp.js";import{I as ue}from"./input-D3wLBcw1.js";import{T as re}from"./textarea-BF_TKrea.js";import{a as st,b as nt,V as pe}from"./layout-B3Vav8lm.js";import{S as ot,W as rt,a as lt}from"./index-DSWBpg1D.js";import{g as it,M as at,b as je}from"./types-BtPcm-7P.js";import{S as be,a as Ne,b as ve,c as Se,d as ne}from"./select-CuHr5fXM.js";import{c as ct,b as ye,T as we,a as Ce}from"./tooltip-DM9palzE.js";import{i as dt}from"./AlertCircle-B2eHj7e1.js";import{v as mt,B as ut,T as pt,U as xt,V as ft,W as Ie}from"./agent-icon-DhO8qmda.js";import{a as ht}from"./RefreshCcw01-B-Cq3kpB.js";import{i as gt}from"./Play-DfLpvTAf.js";import{i as jt}from"./ChevronRight-D_jXf5Kp.js";import{O as bt,M as Nt}from"./index-Cxq_1hW7.js";import{g as vt}from"./connection-slug-eyAPH6o3.js";import{u as St,T as yt}from"./tools-list-BRIP5RmH.js";import{a as _e,u as Oe}from"./use-connection-BNmoIwQg.js";import{b as wt}from"./use-mcp-tools-VZ9Hpxff.js";import{c as Ct}from"./content-blocks-o63cs2vh.js";import{I as $e}from"./integration-icon-CDsyJjsh.js";import{c as It,j as $t}from"./chat-context-0IKLT4wq.js";import{u as Tt}from"./shell-layout-JnQ2O1U7.js";import{M as kt}from"./monaco-editor-DRSPGhbT.js";import{E as Pt}from"./empty-state-wVlFUTuL.js";import{n as Et}from"./Container-BkK0DB__.js";import"./label-e0eIq6aZ.js";import"./index-rkrd3EG7.js";import"./sidebar-B_4prYx4.js";import"./LayoutLeft-PSosyh8W.js";import"./X-KaP-9Zgp.js";import"./index-Dq89w-TY.js";import"./collections-38BsWSzW.js";import"./index-Bgfr6sPE.js";import"./use-virtual-mcp-CfSWiyjb.js";import"./accordion-f3g-k3lM.js";import"./index-CJ06re6J.js";import"./badge--5VL1-K0.js";import"./spinner-DsACT7El.js";import"./view-mode-toggle-BFP9EFGX.js";import"./dialog-DeF_jmhK.js";import"./index-BiK2ANK0.js";import"./dropdown-menu-roylZYWc.js";import"./Check-DKPiDw0v.js";import"./DotsVertical-C0edSuvc.js";import"./Plus-DUbqF6rK.js";import"./Tool01-CIld76-5.js";import"./XClose-BTeq1oZe.js";import"./index-Dql3mibq.js";import"./create-sse-subscription-CjI9SUTI.js";import"./ChevronDown-C2svK15b.js";import"./ChevronUp-CVfkcqtl.js";import"./SearchLg-CWYSpRcF.js";import"./ArrowNarrowLeft-CxcqihTL.js";import"./XCircle-CmRYIXoV.js";import"./ArrowUpRight-Bmxv_5f2.js";import"./ZapSquare-BNz1wDNr.js";import"./Building02-DhlHp14j.js";import"./CheckCircle-BS-i9SgB.js";import"./Star01-f02R5Lt3.js";import"./Palette-K4YZYTyg.js";import"./Key01-CRTO9Eqv.js";import"./LinkExternal01-8dkTfrKr.js";import"./Lock01-D3HzAQHN.js";import"./Monitor01-CE0kuy60.js";import"./Sun-GgIgazyF.js";import"./SearchMd-Dpur_ahX.js";import"./Settings02-CJ09Har8.js";import"./Shield01-CnFfMzTJ.js";import"./Trash01-cTgn14Wa.js";import"./Upload01-HhDlaYLd.js";import"./User01-CUr_vH6R.js";import"./Users01-DfpmcJ6n.js";import"./Users03-DFib9kg8.js";import"./Zap-BuqS_qna.js";import"./extract-connection-data-G78XYV45.js";import"./constants-CPVZA0XC.js";import"./use-registry-connections-DPX7EH3p.js";import"./use-organization-settings-DsFVMR9y.js";import"./index-CrCKLCTE.js";import"./popover-BeXnf11b.js";import"./use-create-virtual-mcp-Ckr2pYgU.js";import"./use-navigate-to-agent-BEpwKNsB.js";import"./hooks-CKWLlFdn.js";import"./decopilot-sse-pool-XfO9dGEQ.js";import"./use-ai-providers-OUW6JMOp.js";import"./avatar-B8vNPMYL.js";import"./required-auth-layout-CA4fYSwK.js";import"./useRouterState-zGUMzA-3.js";import"./use-org-sso-ZXpwOerI.js";Ke({title:te().min(1),description:te().nullable(),body:te()});function oe(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function _t(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function Ot(s){const e=N.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let r;e[1]!==o.control?(r=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(se,{control:o.control,name:"title",render:Dt}),t.jsx(se,{control:o.control,name:"description",render:Rt})]})]}),e[1]=o.control,e[2]=r):r=e[2];let l,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=a):(l=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,a,t.jsx(se,{control:o.control,name:"body",render:At})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==r||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[r,c]}),e[7]=r,e[8]=c,e[9]=i):i=e[9];let p;return e[10]!==o||e[11]!==i?(p=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=p):p=e[12],p}function At(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Rt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Mt(s){const e=N.c(36),{providerId:o,promptId:n}=s,{org:r}=le(),l=o||null;let a;e[0]!==r.id||e[1]!==r.slug||e[2]!==l?(a={connectionId:l,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=l,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),p=Ee(o,"PROMPT",c),f=p.update.isPending;let u;e[4]!==i?(u=i?{title:i.title,description:i.description??null,body:oe(i)}:void 0,e[4]=i,e[5]=u):u=e[5];let h;e[6]!==u?(h={values:u},e[6]=u,e[7]=h):h=e[7];const v=Ge(h);let T;e[8]!==v||e[9]!==i?(T=()=>{i&&v.reset({title:i.title,description:i.description??null,body:oe(i)})},e[8]=v,e[9]=i,e[10]=T):T=e[10];const _=T;let O;e[11]!==p.update||e[12]!==v||e[13]!==n?(O=v.handleSubmit(async j=>{const P=await p.update.mutateAsync({id:n,data:{title:j.title,description:j.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:j.body}}]}});v.reset({title:P.title,description:P.description??null,body:oe(P)})}),e[11]=p.update,e[12]=v,e[13]=n,e[14]=O):O=e[14];const A=O;if(!i){let j;return e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=j):j=e[15],j}let w;e[16]!==i.title?(w=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=w):w=e[17];let k;e[18]!==i.description?(k=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=k):k=e[19];let I;e[20]!==w||e[21]!==k?(I=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[w,k]})}),e[20]=w,e[21]=k,e[22]=I):I=e[22];let g;e[23]!==A?(g=()=>{A()},e[23]=A,e[24]=g):g=e[24];let S;e[25]!==v.formState.isDirty||e[26]!==f||e[27]!==_||e[28]!==g?(S=t.jsx(st,{children:t.jsx(ot,{onSave:g,onUndo:_,isDirty:v.formState.isDirty,isSaving:f})}),e[25]=v.formState.isDirty,e[26]=f,e[27]=_,e[28]=g,e[29]=S):S=e[29];let y;e[30]!==v?(y=t.jsx("div",{className:"h-full",children:t.jsx(Ot,{form:v})}),e[30]=v,e[31]=y):y=e[31];let $;return e[32]!==S||e[33]!==y||e[34]!==I?($=t.jsxs(pe,{children:[I,S,y]}),e[32]=S,e[33]=y,e[34]=I,e[35]=$):$=e[35],$}function Ut(s){const e=N.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=_t(),e[0]=n):n=e[0];const r=n;if(!r){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==o?(l=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:r,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}const zt=Qe("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Bt(s){const e=N.c(10);let o,n,r;e[0]!==s?({className:o,variant:r,...n}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==o||e[5]!==r?(l=z(zt({variant:r}),o),e[4]=o,e[5]=r,e[6]=l):l=e[6];let a;return e[7]!==n||e[8]!==l?(a=t.jsx("div",{"data-slot":"alert",role:"alert",className:l,...n}),e[7]=n,e[8]=l,e[9]=a):a=e[9],a}function Lt(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("line-clamp-1 min-h-4 font-medium tracking-tight",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-title",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Vt(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("text-muted-foreground leading-relaxed",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-description",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Ae(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("min-w-0 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Re(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function J(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Q(s){const e=N.c(10);let o,n,r;e[0]!==s?({asChild:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);const l=o?Ye:"a";let a;e[4]!==n?(a=z("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==a?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:a,...r}),e[6]=l,e[7]=r,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=z("text-foreground font-medium truncate",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Y(s){const e=N.c(12);let o,n,r;e[0]!==s?({children:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==n?(l=z("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let a;e[6]!==o?(a=o??t.jsx(jt,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==r||e[9]!==l||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...r,children:a}),e[8]=r,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}const Ft=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Jt(s){const e=N.c(11),{toolName:o,connectionId:n,siblings:r,onSelectInstance:l,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=St(c);if(!i.isAuthenticated){let u;return e[2]!==i.supportsOAuth||e[3]!==a?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(bt,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(Nt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=u):u=e[4],u}const p=`${n}:${o}`;let f;return e[5]!==n||e[6]!==l||e[7]!==r||e[8]!==p||e[9]!==o?(f=t.jsx(Wt,{toolName:o,connectionId:n,siblings:r,onSelectInstance:l},p),e[5]=n,e[6]=l,e[7]=r,e[8]=p,e[9]=o,e[10]=f):f=e[10],f}function Wt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:r}=Xe({strict:!1}),l=(()=>{if(!r)return null;const d=`replay-${r}`,m=sessionStorage.getItem(d);if(!m)return null;sessionStorage.removeItem(d);try{return JSON.parse(m)}catch{return null}})(),a=(()=>{if(!l)return null;const d={};for(const[m,b]of Object.entries(l))b!==null&&typeof b=="object"?d[m]=JSON.stringify(b,null,2):d[m]=b;return d})(),[c,i]=C.useState(a??{}),[p,f]=C.useState(l?JSON.stringify(l,null,2):"{}"),[u,h]=C.useState(null),[v,T]=C.useState(null),[_,O]=C.useState(null),[A,w]=C.useState(null),[k,I]=C.useState(!1),[g,S]=C.useState(null),{org:y}=le(),$=_e(e),j=It(),P=$t(),{setChatOpen:B}=Tt(),M=`${e}:${s}`,R=ce({connectionId:e,orgId:y.id,orgSlug:y.slug}),U=wt({client:R}),x=U.data?.tools?.find(d=>d.name===s),E=it(x?._meta),L=d=>{if(!j)return;const m=Ct(d.content);m.content.length>0&&(B(!0),j.sendMessage({tiptapDoc:m}))},[D,X]=C.useState("json"),[Me,Ue]=C.useState(!1);E&&!Me&&(X("ui"),Ue(!0));const xe=x?.inputSchema?.properties,fe=xe?Object.keys(xe):[],W=fe.length>0,H={};if(W&&x?.inputSchema?.properties)for(const d of fe)H[d]=x.inputSchema.required?.includes(d)?"":void 0;const Z=d=>Object.prototype.hasOwnProperty.call(c,d),ze=async()=>{I(!0),w(null),h(null),T(null),O(null),S(null);const d=performance.now();try{if(!R)throw new Error("MCP client is not available");const m=W?{...H,...c}:(()=>{const V=p.trim();if(!V)return{};const F=JSON.parse(V);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();W&&x?.inputSchema?.properties&&Object.entries(x.inputSchema.properties).forEach(([V,F])=>{if((F.type==="object"||F.type==="array")&&typeof m[V]=="string")try{m[V]=JSON.parse(m[V])}catch{}});const b=await R.callTool({name:s,arguments:m}),K=b.structuredContent??b,We=performance.now(),qe=Math.round(We-d);h(K),T(b),O(m);const He=JSON.stringify(K),ge=new TextEncoder().encode(He).length;S({duration:`${qe}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(m){const b=m instanceof Error?m.message:String(m);w(b||"Unknown error occurred");const K=performance.now();S({duration:`${Math.round(K-d)}ms`})}finally{I(!1)}},ee=(d,m)=>{i(b=>({...b,[d]:m}))},Be=()=>{h(null),T(null),O(null),w(null),S(null)},Le=x?.name??Ft(s),Ve=t.jsx(Ae,{children:t.jsxs(Re,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:y.slug},children:"Connections"})})}),t.jsx(Y,{}),$&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:y.slug,appSlug:vt($)},search:{tab:"tools"},children:$.title})})}),t.jsx(Y,{})]}),t.jsx(J,{children:t.jsx(De,{children:Le})})]})}),he=o.length>1&&t.jsxs(be,{value:e,onValueChange:n,children:[t.jsx(Ne,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ve,{})}),t.jsx(Se,{children:o.map(d=>t.jsx(ne,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx($e,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Fe=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),x?.inputSchema?.required&&x.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:W&&x?.inputSchema?.properties?Object.entries(x.inputSchema.properties).map(([d,m])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,x.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:m.type})]}),m.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:m.description}),m.type==="object"||m.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:Z(d)?c[d]??"":H[d]??"",onChange:b=>ee(d,b.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):m.type==="boolean"?t.jsxs(be,{value:Z(d)?String(c[d]??""):"",onValueChange:b=>ee(d,b==="true"),children:[t.jsx(Ne,{children:t.jsx(ve,{placeholder:"Select true or false..."})}),t.jsxs(Se,{children:[t.jsx(ne,{value:"true",children:"true"}),t.jsx(ne,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:Z(d)?c[d]??"":H[d]??"",onChange:b=>ee(d,b.target.value),placeholder:`Enter ${d}...`})]},d)):x?.inputSchema&&!W?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:p,onChange:d=>f(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:k?t.jsxs(q,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(mt,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(q,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:ze,children:[t.jsx(gt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),Je=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[g&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.duration})]}),g.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.tokens})]}),g.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.bytes})]}),g.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:g.cost})})]}),E&&t.jsx(ct,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(ft,{size:14})})}),t.jsx(Ce,{children:"Interactive view"})]}),t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(Ie,{size:14})})}),t.jsx(Ce,{children:"JSON view"})]})]})})]})]}),A&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(Bt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(dt,{className:"h-4 w-4"}),t.jsx(Lt,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(Vt,{className:"text-xs text-destructive",children:A})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:E&&D==="ui"&&R?t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(at,{resourceURI:E,toolInfo:x?{tool:x}:void 0,toolInput:_??void 0,toolResult:v??void 0,displayMode:"fullscreen",minHeight:je.view.minHeight,maxHeight:je.view.maxHeight,client:R,onMessage:L,onUpdateModelContext:d=>P?.setAppContext(M,d),onTeardown:()=>P?.clearAppContext(M),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(kt,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(q,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(ht,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ie,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx($e,{icon:$?.icon||null,name:$?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[U.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):U.isLoading?t.jsx(ie,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:U.isSuccess?"ready":U.isLoading?"connecting":"error"})]}),t.jsx(yt,{annotations:x?.annotations,_meta:x?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:x?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Fe}),Je]})})]})})}function qt(s){const e=N.c(10),{itemId:o,siblings:n,onBack:r}=s,[l,a]=C.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(h=>h.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const i=c;if(!_e(i||void 0)||!i){let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=h):h=e[3],h}let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=f):f=e[4];let u;return e[5]!==i||e[6]!==r||e[7]!==n||e[8]!==o?(u=t.jsx(C.Suspense,{fallback:f,children:t.jsx(Jt,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:r})}),e[5]=i,e[6]=r,e[7]=n,e[8]=o,e[9]=u):u=e[9],u}const Ht={workflow:lt,workflow_execution:rt,prompt:Ut};function Kt(){const s=N.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const a=Oe(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,p=Gt;let f;return s[5]!==i||s[6]!==r||s[7]!==a?(f=t.jsx(qt,{itemId:r,siblings:a,onBack:i,onUpdate:p}),s[5]=i,s[6]=r,s[7]=a,s[8]=f):f=s[8],f}async function Gt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Yt(){const s=N.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=le();let p;s[3]!==n.appSlug?(p={slug:n.appSlug},s[3]=n.appSlug,s[4]=p):p=s[4];const u=Oe(p)[0]??null,h=u?.id??"",v=h||"no-connection",T=h??null;let _;s[5]!==i.id||s[6]!==i.slug||s[7]!==T?(_={connectionId:T,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=T,s[8]=_):_=s[8];const O=ce(_),A=Ee(v,r,O);let w;s[9]!==A||s[10]!==l?(w=async D=>{l&&await A.update.mutateAsync({id:l,data:D})},s[9]=A,s[10]=l,s[11]=w):w=s[11];const k=w;let I;s[12]!==r?(I=r?.toLowerCase(),s[12]=r,s[13]=I):I=s[13];const g=I,S=g&&Ht[g];let y;s[14]!==r?(y=Qt(r),s[14]=r,s[15]=y):y=s[15];const $=y;let j;s[16]!==i.slug?(j=t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=j):j=s[17];let P;s[18]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Y,{}),s[18]=P):P=s[18];let B;s[19]!==r||s[20]!==u||s[21]!==i.slug||s[22]!==n.appSlug?(B=u&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:r},children:u.title})})}),t.jsx(Y,{})]}),s[19]=r,s[20]=u,s[21]=i.slug,s[22]=n.appSlug,s[23]=B):B=s[23];let M;s[24]!==$?(M=t.jsx(J,{children:t.jsx(De,{children:$})}),s[24]=$,s[25]=M):M=s[25];let R;s[26]!==B||s[27]!==M||s[28]!==j?(R=t.jsx(Ae,{children:t.jsxs(Re,{children:[j,P,B,M]})}),s[26]=B,s[27]=M,s[28]=j,s[29]=R):R=s[29];const U=R;if(S){let D;return s[30]!==S||s[31]!==c||s[32]!==k||s[33]!==l?(D=t.jsx(S,{itemId:l,onBack:c,onUpdate:k}),s[30]=S,s[31]=c,s[32]=k,s[33]=l,s[34]=D):D=s[34],D}let x;s[35]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Et,{size:36,className:"text-muted-foreground"}),s[35]=x):x=s[35];let E;s[36]!==c?(E=t.jsx(Pt,{icon:x,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=E):E=s[37];let L;return s[38]!==U||s[39]!==E?(L=t.jsx(pe,{breadcrumb:U,children:E}),s[38]=U,s[39]=E,s[40]=L):L=s[40],L}function Xt(){const s=N.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Yt,{}),s[2]=l):l=s[2],l}function zn(){const s=N.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Xt,{})})}),s[0]=e):e=s[0],e}export{zn as default};
@@ -1 +1 @@
1
- import{e as B,j as s,c as M,B as V}from"./index-C9UEm0aF.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-37ioHY85.js";import{i as L,n as O,b as R,d as A,c as F}from"./XClose-BfGe8XlD.js";import{i as S}from"./Check-CgJkW5mO.js";import{T as I,a as K,c as P,b as W}from"./tooltip-CaQjUma3.js";import{V as q}from"./view-mode-toggle-ChtVPtKo.js";import{B as G}from"./badge-C2JMvH6Q.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
1
+ import{e as B,j as s,c as M,B as V}from"./index-Bf4UxK2Z.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-roylZYWc.js";import{i as L,n as O,b as R,d as A,c as F}from"./XClose-BTeq1oZe.js";import{i as S}from"./Check-DKPiDw0v.js";import{T as I,a as K,c as P,b as W}from"./tooltip-DM9palzE.js";import{V as q}from"./view-mode-toggle-BFP9EFGX.js";import{B as G}from"./badge--5VL1-K0.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
@@ -1 +1 @@
1
- import{e as v,c as b,j as n,l as w}from"./index-C9UEm0aF.js";import{i as C}from"./SearchMd-i7Gp8R_i.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=n.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
1
+ import{e as v,c as b,j as n,l as w}from"./index-Bf4UxK2Z.js";import{i as C}from"./SearchMd-Dpur_ahX.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=n.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
@@ -1,4 +1,4 @@
1
- import{r as c,bg as P,ap as Oe,e as En,c as Ot,j as Ne,l as Mn}from"./index-C9UEm0aF.js";import{i as In}from"./SearchMd-i7Gp8R_i.js";function An(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function we(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?we(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Fe(e){return we(e)?!1:e instanceof B(e).HTMLElement}function Kt(e){return e instanceof B(e).SVGElement}function ye(e){return e?we(e)?e.document:bt(e)?mt(e)?e:Fe(e)||Kt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Nn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ze(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function $e(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function je(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const me=Ht(1),Pe=Ht(-1);function On(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Tn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Tn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return On(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ln(e){return e.matches(Tt)?e:e.querySelector(Tt)}const kn={display:"none"};function zn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:kn},n)}function Pn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Vt=c.createContext(null);function Fn(e){const t=c.useContext(Vt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function $n(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const jn={draggable:`
1
+ import{r as c,bg as P,ap as Oe,e as En,c as Ot,j as Ne,l as Mn}from"./index-Bf4UxK2Z.js";import{i as In}from"./SearchMd-Dpur_ahX.js";function An(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function we(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?we(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Fe(e){return we(e)?!1:e instanceof B(e).HTMLElement}function Kt(e){return e instanceof B(e).SVGElement}function ye(e){return e?we(e)?e.document:bt(e)?mt(e)?e:Fe(e)||Kt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Nn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ze(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function $e(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function je(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const me=Ht(1),Pe=Ht(-1);function On(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Tn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Tn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return On(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ln(e){return e.matches(Tt)?e:e.querySelector(Tt)}const kn={display:"none"};function zn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:kn},n)}function Pn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Vt=c.createContext(null);function Fn(e){const t=c.useContext(Vt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function $n(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const jn={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -1 +1 @@
1
- import{e as k,j as s,c as C}from"./index-C9UEm0aF.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-Dcd3qce4.js";import{i as D,n as E}from"./XClose-BfGe8XlD.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
1
+ import{e as k,j as s,c as C}from"./index-Bf4UxK2Z.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-DgPM3Urg.js";import{i as D,n as E}from"./XClose-BTeq1oZe.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
@@ -1 +1 @@
1
- import{e as f,c as u,j as m}from"./index-C9UEm0aF.js";import{B as g}from"./badge-C2JMvH6Q.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{e as f,c as u,j as m}from"./index-Bf4UxK2Z.js";import{B as g}from"./badge--5VL1-K0.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{I as t,M as i,aQ as p,at as r,as as a,bW as m,bq as h,J as c,av as b}from"./index-C9UEm0aF.js";const N=t({id:i().describe("Unique identifier for the entity"),title:i().describe("Human-readable title for the entity"),description:i().nullish().describe("Description of the entity"),created_at:i().datetime(),updated_at:i().datetime(),created_by:i().optional(),updated_by:i().optional()}),f=t({field:a(i()),operator:r(["eq","gt","gte","lt","lte","in","like","contains"]),value:p()}),u=m(()=>h([f,t({operator:r(["and","or","not"]),conditions:a(u)})])),C=t({field:a(i()),direction:r(["asc","desc"]),nulls:r(["first","last"]).optional()}),S=t({where:u.optional().describe("Filter expression"),orderBy:a(C).optional().describe("Sort expressions"),limit:c().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:c().int().min(0).optional().describe("Number of items to skip")});function O(e){return t({items:a(e).describe("Array of collection items"),totalCount:c().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:b().optional().describe("Whether there are more items available")})}const I=t({id:i().describe("ID of the entity to retrieve")});function y(e){return t({item:e.nullable().describe("The retrieved item, or null if not found")})}function E(e){return t({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function T(e){return t({item:e.describe("The created entity with generated id")})}function _(e){return t({id:i().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function L(e){return t({item:e.describe("The updated entity")})}const D=t({id:i().describe("ID of the entity to delete")});function g(e){return t({item:e.describe("The deleted entity")})}function v(e,n,l){const o=e.toUpperCase(),d=l?.readOnly??!1,s=[{name:`COLLECTION_${o}_LIST`,inputSchema:S,outputSchema:O(n)},{name:`COLLECTION_${o}_GET`,inputSchema:I,outputSchema:y(n)}];return d||s.push({name:`COLLECTION_${o}_CREATE`,inputSchema:E(n),outputSchema:T(n),opt:!0},{name:`COLLECTION_${o}_UPDATE`,inputSchema:_(n),outputSchema:L(n),opt:!0},{name:`COLLECTION_${o}_DELETE`,inputSchema:D,outputSchema:g(n),opt:!0}),s}export{N as B,v as c};
1
+ import{I as t,M as i,aQ as p,at as r,as as a,bW as m,bq as h,J as c,av as b}from"./index-Bf4UxK2Z.js";const N=t({id:i().describe("Unique identifier for the entity"),title:i().describe("Human-readable title for the entity"),description:i().nullish().describe("Description of the entity"),created_at:i().datetime(),updated_at:i().datetime(),created_by:i().optional(),updated_by:i().optional()}),f=t({field:a(i()),operator:r(["eq","gt","gte","lt","lte","in","like","contains"]),value:p()}),u=m(()=>h([f,t({operator:r(["and","or","not"]),conditions:a(u)})])),C=t({field:a(i()),direction:r(["asc","desc"]),nulls:r(["first","last"]).optional()}),S=t({where:u.optional().describe("Filter expression"),orderBy:a(C).optional().describe("Sort expressions"),limit:c().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:c().int().min(0).optional().describe("Number of items to skip")});function O(e){return t({items:a(e).describe("Array of collection items"),totalCount:c().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:b().optional().describe("Whether there are more items available")})}const I=t({id:i().describe("ID of the entity to retrieve")});function y(e){return t({item:e.nullable().describe("The retrieved item, or null if not found")})}function E(e){return t({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function T(e){return t({item:e.describe("The created entity with generated id")})}function _(e){return t({id:i().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function L(e){return t({item:e.describe("The updated entity")})}const D=t({id:i().describe("ID of the entity to delete")});function g(e){return t({item:e.describe("The deleted entity")})}function v(e,n,l){const o=e.toUpperCase(),d=l?.readOnly??!1,s=[{name:`COLLECTION_${o}_LIST`,inputSchema:S,outputSchema:O(n)},{name:`COLLECTION_${o}_GET`,inputSchema:I,outputSchema:y(n)}];return d||s.push({name:`COLLECTION_${o}_CREATE`,inputSchema:E(n),outputSchema:T(n),opt:!0},{name:`COLLECTION_${o}_UPDATE`,inputSchema:_(n),outputSchema:L(n),opt:!0},{name:`COLLECTION_${o}_DELETE`,inputSchema:D,outputSchema:g(n),opt:!0}),s}export{N as B,v as c};
@@ -1 +1 @@
1
- import{e as d,c as i,j as n}from"./index-C9UEm0aF.js";import{_ as m}from"./index-w6-egSGC.js";import{b as k,d as N,e as j,c as b,a as w}from"./dialog-xU6O08Hz.js";import{i as y}from"./SearchMd-i7Gp8R_i.js";function C(a){const e=d.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 o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);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 o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.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 o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.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=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.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 o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.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 o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.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 o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{R as C,H as a,B as b,z as c,L as d,G as e,C as f,S as g};
1
+ import{e as d,c as i,j as n}from"./index-Bf4UxK2Z.js";import{_ as m}from"./index-CrCKLCTE.js";import{b as k,d as N,e as j,c as b,a as w}from"./dialog-DeF_jmhK.js";import{i as y}from"./SearchMd-Dpur_ahX.js";function C(a){const e=d.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 o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);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 o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.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 o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.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=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.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 o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.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 o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.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 o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{R as C,H as a,B as b,z as c,L as d,G as e,C as f,S as g};