decocms 4.596.1 → 4.597.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/dist/client/assets/{AlertCircle-CMkbvoeN.js → AlertCircle-BLw7QvfG.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DrvGk31z.js → AreaChart-Cg0oUTGM.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BSDOW4A2.js → ArrowLeft-DH7F9HYx.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DHHBvkVn.js → ArrowRight-DZeVAIN7.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DHOdNryJ.js → ArrowUp-C_Mw0uky.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-iWPgFcA1.js → BookOpen01-9fv3inuR.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-uFA7HvYm.js → CartesianChart-B1PjlPEb.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CQBAXeYw.js → CategoricalChart-CcMGdgiC.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DS6DtxbV.js → CheckCircle--1SXoxG_.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-DS_2vV9U.js → ChevronDown-DwO0ALfW.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-D0NBoFQ0.js → ChevronSelectorVertical-Bj17dUxw.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BsIT1i00.js → ChevronUp-BaiO1bgX.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CtAjK1Nq.js → CreditCard01-D6jLDMwS.js} +1 -1
  14. package/dist/client/assets/{Eye-C17dMApd.js → Eye-DvcGz393.js} +1 -1
  15. package/dist/client/assets/{File02-CbFOjoUb.js → File02-Bes4ATvL.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-8iB0ZMj1.js → Fingerprint04-BpB7HSc7.js} +1 -1
  17. package/dist/client/assets/{Globe04-Bltr8gRw.js → Globe04-BBsqVmHb.js} +1 -1
  18. package/dist/client/assets/{Image01-DO626aWy.js → Image01-D2QOi7x6.js} +1 -1
  19. package/dist/client/assets/{Key01-Cr-iYwx2.js → Key01-CDcaZkCg.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DtCpgUXM.js → LayoutLeft-19qu82-A.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-fV6kVrlJ.js → LinkBroken01-Z9hP4zTf.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-B_IjbkrY.js → MessageCircle01-DjShhQqZ.js} +1 -1
  23. package/dist/client/assets/{Minus-C5_j5JBE.js → Minus-ChoEICrx.js} +1 -1
  24. package/dist/client/assets/{Monitor01-DHsrHXin.js → Monitor01-DtssQiym.js} +1 -1
  25. package/dist/client/assets/{Play-nU4UoQKz.js → Play-DatgPxza.js} +1 -1
  26. package/dist/client/assets/{Plus-Bu8dYjTf.js → Plus-GSWEwEm-.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-C5nRukFs.js → ReferenceLine-Cl-8dOcW.js} +1 -1
  28. package/dist/client/assets/{SearchMd-CSnYUdRx.js → SearchMd-DhrJsmFj.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-DVZF7bHI.js → ShoppingBag01-DQR5ci-Q.js} +1 -1
  30. package/dist/client/assets/{Sun-BywYlyt4.js → Sun-Dpzqhodu.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-j9pFk8iK.js → SwitchHorizontal01-NAHL2C3Y.js} +1 -1
  32. package/dist/client/assets/{Tool01-DAQSjGNg.js → Tool01-DJqLAFcI.js} +1 -1
  33. package/dist/client/assets/{Tooltip-Dp5L1NZc.js → Tooltip-fSWtSvYM.js} +1 -1
  34. package/dist/client/assets/{Trash01-CGA1V9gl.js → Trash01-Br_8Dd8k.js} +1 -1
  35. package/dist/client/assets/{TrendUp01-BGKW0mh6.js → TrendUp01-Dnr3ECEr.js} +1 -1
  36. package/dist/client/assets/{Upload01-Ce7d9Uy2.js → Upload01-B1gnueEL.js} +1 -1
  37. package/dist/client/assets/{UserCheck01-Bm_tmvVG.js → UserCheck01-CpLKejEQ.js} +1 -1
  38. package/dist/client/assets/{UserSquare-kWKevgdv.js → UserSquare-D1HQ9ju8.js} +1 -1
  39. package/dist/client/assets/{Users01-BYfFhtdK.js → Users01-qnd_BT_N.js} +1 -1
  40. package/dist/client/assets/{XClose-aj1J9clf.js → XClose-BbVr5nc7.js} +1 -1
  41. package/dist/client/assets/{Zap-BVwxluJ4.js → Zap-B1JA6VL5.js} +1 -1
  42. package/dist/client/assets/{access-gate-DScvaiQI.js → access-gate-m6QmHtAD.js} +1 -1
  43. package/dist/client/assets/{add-connection-dialog-CVmMnTnu.js → add-connection-dialog-BIOFD97r.js} +1 -1
  44. package/dist/client/assets/agent-app-gA5AyVqP.js +1 -0
  45. package/dist/client/assets/{agent-assets-C1M-73B4.js → agent-assets-CHRKOS2u.js} +1 -1
  46. package/dist/client/assets/{agent-automation-CJuNRjPE.js → agent-automation-to9UMVoQ.js} +1 -1
  47. package/dist/client/assets/{agent-automations-M45BokQz.js → agent-automations-VyCqK5Re.js} +1 -1
  48. package/dist/client/assets/{agent-blog-CDbFysVC.js → agent-blog-CZmmsFZV.js} +2 -2
  49. package/dist/client/assets/{agent-blog-post-BtgU5FUJ.js → agent-blog-post-CB4b_awk.js} +2 -2
  50. package/dist/client/assets/{agent-calendar-Ysm77UBw.js → agent-calendar-Cp5T7Qbr.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-r-GJhT_0.js → agent-capabilities-B8dQ_ZB8.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-CIWMETy6.js → agent-connect-sources-BoFtzsla.js} +1 -1
  53. package/dist/client/assets/agent-deck-ClKs4ShI.js +1 -0
  54. package/dist/client/assets/{agent-e2e-r7rAxMD7.js → agent-e2e-DYM6mhlb.js} +1 -1
  55. package/dist/client/assets/agent-experiments-w6nqO2q9.js +1 -0
  56. package/dist/client/assets/agent-file-DrrOEB-e.js +1 -0
  57. package/dist/client/assets/{agent-hosting-DMdWeVwT.js → agent-hosting-BSxiIsrn.js} +1 -1
  58. package/dist/client/assets/{agent-icon-DFdDsb4O.js → agent-icon-ButaHLCM.js} +1 -1
  59. package/dist/client/assets/agent-library-UPbdmbqv.js +1 -0
  60. package/dist/client/assets/agent-library-file-D6WFOASp.js +1 -0
  61. package/dist/client/assets/agent-overview-BYbm2jhI.js +1 -0
  62. package/dist/client/assets/{agent-releases-D34D3Svq.js → agent-releases-DxZH4Aop.js} +1 -1
  63. package/dist/client/assets/agent-settings-BlXhuK2P.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-DgdfDIJG.js → agent-site-editor-BVDN7iAe.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-BzxDSxJp.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-r61QYhf7.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-BwuXgbhX.js +1 -0
  68. package/dist/client/assets/agent-view-Ba6W0Fqn.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-DH3M23m7.js → agent-view-guard-DgSIx4Rz.js} +1 -1
  70. package/dist/client/assets/{ai-providers-cFUS4tVR.js → ai-providers-BLNPddjm.js} +1 -1
  71. package/dist/client/assets/{alert-pc1Ms3qG.js → alert-B3inZFUT.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-CRlYKtI9.js → analytics-sections-CTzZQv_A.js} +1 -1
  73. package/dist/client/assets/api-keys-BxUV6FZ8.js +1 -0
  74. package/dist/client/assets/{api-keys-uQL0a6MN.js → api-keys-D5yeJ96D.js} +1 -1
  75. package/dist/client/assets/{app-editor-Bggv50md.js → app-editor-2zianuY6.js} +1 -1
  76. package/dist/client/assets/{asset-utils-DmKXdm_k.js → asset-utils-FQrgs53r.js} +1 -1
  77. package/dist/client/assets/{auth-Dee7m2i5.js → auth-DlYbrS5R.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-Lp4En3zi.js → auth-catchall-DovAKkgg.js} +1 -1
  79. package/dist/client/assets/{auth-entry-Blex_eHm.js → auth-entry-BeARMnxr.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-DqNZIMLg.js → auth-split-layout-CnJuCNmk.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-fbN8kdQr.js → authenticate-and-persist-oauth-Da9zgsaC.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-CY66jOSh.js → automation-list-row-Cfemy10y.js} +1 -1
  83. package/dist/client/assets/{automation-runs-C8XowsOe.js → automation-runs-DhXlimIG.js} +1 -1
  84. package/dist/client/assets/{automations-Dfb_nph_.js → automations-BgwFiPYA.js} +1 -1
  85. package/dist/client/assets/{badge-BwjML1Ui.js → badge-CaU7DsCB.js} +1 -1
  86. package/dist/client/assets/{block-document-CLqA1OpC.js → block-document-D8KopzHb.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-7Y5QFm9x.js → blocks-preview-workspace-context-Rebn6SsT.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-DZtXlWh1.js → blocks-tab-states-CrihrdT0.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-oQXPBhGk.js → blog-preview-url-DM-lGGhF.js} +1 -1
  90. package/dist/client/assets/{blog-schema-D3xxOZZL.js → blog-schema-0H53CE3k.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-CFH7RVI2.js → blog-source-gate-B_GOyP5p.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-DigHm4N8.js → blog-view-gate-JzJtOYCL.js} +1 -1
  93. package/dist/client/assets/{buckets-DlSaMEkI.js → buckets-CVXQhalH.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-C1NaZMTH.js → build-improve-prompt-doc-DgQdPFxI.js} +1 -1
  95. package/dist/client/assets/{calendar-khB6XOc2.js → calendar-DZVkXGhA.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-BrEArsQc.js → capability-load-error-p87qKYlk.js} +1 -1
  97. package/dist/client/assets/{category-editor-BViKDLmy.js → category-editor-BEomaUlT.js} +1 -1
  98. package/dist/client/assets/{category-tree-BTRq8RL0.js → category-tree-DUNY9TG8.js} +1 -1
  99. package/dist/client/assets/{chart-BcpbpcAf.js → chart-D6tXreNC.js} +1 -1
  100. package/dist/client/assets/chat-context-DsLpz7ew.js +44 -0
  101. package/dist/client/assets/{chat-draft-DOnB1tr0.js → chat-draft-ODW7kZWh.js} +1 -1
  102. package/dist/client/assets/{checkbox-CmBHLZcQ.js → checkbox-Bo6uhaqm.js} +1 -1
  103. package/dist/client/assets/{choose-editor-B67urVk8.js → choose-editor-CptxA-2o.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-Bz6r5Ycn.js → cli-auth-success-1ibs6VjG.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-DcveNiDE.js → cms-settings-editor-q2PD6d-f.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-DW5tpjoC.js → cms-store-drafts-Da9bgH02.js} +1 -1
  107. package/dist/client/assets/{collapsible-qzwMsYPq.js → collapsible-Cug6Pp5N.js} +1 -1
  108. package/dist/client/assets/{collection-detail-2IToM1X7.js → collection-detail-BFFv8EBD.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-D9tNnAgw.js → collection-display-button-BeCmwRLy.js} +1 -1
  110. package/dist/client/assets/{collection-search-CTpFl_1Y.js → collection-search-EKEj7NYh.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-Cpcu8Oij.js → collection-table-wrapper-QVfey_uk.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-DK7LWBZc.js → collection-tabs-THb2ZDUR.js} +1 -1
  113. package/dist/client/assets/{combobox-A6NsJcol.js → combobox-CkvX9Of3.js} +1 -1
  114. package/dist/client/assets/{command-Bpokkr7D.js → command-BA_BVypg.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-Cj31-W6E.js → companion-mcps-section-mGMTO-21.js} +1 -1
  116. package/dist/client/assets/{config-9LzB-TfV.js → config-DeP83Mjq.js} +1 -1
  117. package/dist/client/assets/{connect-Dzf2XXqW.js → connect-C-ernj3S.js} +1 -1
  118. package/dist/client/assets/{connect-key-DqVRKu6e.js → connect-key-B_1YtIEI.js} +1 -1
  119. package/dist/client/assets/{connect-layout-DO1tbYx8.js → connect-layout-DhcQffyl.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-D-UsGI30.js → connect-source-dialog-DXcG_Psx.js} +1 -1
  121. package/dist/client/assets/{connection-B8_wyLe4.js → connection-DUUZ34Ff.js} +1 -1
  122. package/dist/client/assets/{connection-card-pnI2WwJL.js → connection-card-BbAx38kp.js} +1 -1
  123. package/dist/client/assets/{connection-detail-yMVuGCv9.js → connection-detail-NnYjF1KC.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-DEbbcr0Y.js → connection-form-helpers-DEnW0ORZ.js} +1 -1
  125. package/dist/client/assets/{connection-slug-C1Xw24XJ.js → connection-slug-Wiu7W5Ro.js} +1 -1
  126. package/dist/client/assets/{connections-csdBnjiM.js → connections-Bs7MQX46.js} +1 -1
  127. package/dist/client/assets/{content-tab-C5yeDMy3.js → content-tab-CJmgvKjP.js} +3 -3
  128. package/dist/client/assets/{context-BJDCzssE.js → context-NTAokEvz.js} +1 -1
  129. package/dist/client/assets/{context-menu-BLPuVblK.js → context-menu-BvoelKnM.js} +1 -1
  130. package/dist/client/assets/{context-shell-Dzy86D3N.js → context-shell-BHDXVCRL.js} +3 -3
  131. package/dist/client/assets/{create-organization-dialog-sRuhJ8o6.js → create-organization-dialog-dpA6uSHX.js} +1 -1
  132. package/dist/client/assets/{daily-pulse-DKB2mThR.js → daily-pulse-83GnvMF_.js} +1 -1
  133. package/dist/client/assets/{delete-copy-D60ZiQf5.js → delete-copy-C8ERxzK8.js} +1 -1
  134. package/dist/client/assets/{device-hint-BanhTiD8.js → device-hint-5lkWUASQ.js} +1 -1
  135. package/dist/client/assets/{discover-DNzddiNs.js → discover-C9WBot8k.js} +1 -1
  136. package/dist/client/assets/{domain-settings-YxR2DIWq.js → domain-settings-C7L5I-Ps.js} +1 -1
  137. package/dist/client/assets/{drawer-D3M4u1JQ.js → drawer-Daptw1OQ.js} +1 -1
  138. package/dist/client/assets/{editor-BCeMKV5f.js → editor-CGkWZSA7.js} +1 -1
  139. package/dist/client/assets/{editor-classes-BHlQ8lta.js → editor-classes-eVnt4vp_.js} +1 -1
  140. package/dist/client/assets/{empty-state-DMyh10sW.js → empty-state--1H9mx7y.js} +1 -1
  141. package/dist/client/assets/{empty-state-n7kVRkSm.js → empty-state-Dfjwzagg.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-B3hGOZ0k.js → experiments-tab-choice-BVYrDQR_.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-DCWqImZT.js → extract-connection-data-Csm2LLbI.js} +1 -1
  144. package/dist/client/assets/{feature-gate-DS4JY_b4.js → feature-gate-DP0JLkRq.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-C_Np7j9C.js → feature-paywall-CuECkoDT.js} +1 -1
  146. package/dist/client/assets/{file-explorer-rktoDXiw.js → file-explorer-_xEpPcaK.js} +1 -1
  147. package/dist/client/assets/{file-preview-Dxg_on-h.js → file-preview-J0KlNfCN.js} +1 -1
  148. package/dist/client/assets/{file-share-button-CkE_dkdb.js → file-share-button-1KUHqOgB.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-B-mU4K6I.js → file-type-icon-sxJ1fqoc.js} +1 -1
  150. package/dist/client/assets/{folder-icon-CgXz01Aa.js → folder-icon-DfGo2fIA.js} +1 -1
  151. package/dist/client/assets/{form-D-KzaCY4.js → form-msT-Nxjd.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-CAcIAUua.js → frame-navigation-COhxs0rP.js} +1 -1
  153. package/dist/client/assets/{gateway-client-CZaZgqJJ.js → gateway-client-mrWD5tSx.js} +1 -1
  154. package/dist/client/assets/{general-G-7imp3B.js → general-C0agZL75.js} +1 -1
  155. package/dist/client/assets/{github-icon-DW5OWwA4.js → github-icon-DGEVXZ8I.js} +1 -1
  156. package/dist/client/assets/{held-block-view-CZOwIXZa.js → held-block-view-DUdsae86.js} +1 -1
  157. package/dist/client/assets/{home-DTJxJIJs.js → home-b8Q92l_T.js} +1 -1
  158. package/dist/client/assets/{home-overview-DP1NpjZb.js → home-overview-CC9gx7Fg.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-ChvoCrzB.js → hosted-reconcile-DH-KyBYi.js} +1 -1
  160. package/dist/client/assets/{icon-button-BNUEa7I2.js → icon-button-am6dsn69.js} +1 -1
  161. package/dist/client/assets/{index-Dpk7pb5D.js → index-0yoxovPZ.js} +1 -1
  162. package/dist/client/assets/{index-DItyK843.js → index-4q-RLwEk.js} +1 -1
  163. package/dist/client/assets/{index-Bhd9nKcZ.js → index-B26uWbt_.js} +1 -1
  164. package/dist/client/assets/{index-C0zcxte6.js → index-B2vvUsuK.js} +3 -3
  165. package/dist/client/assets/{index-CNh1ag3h.js → index-BYSU1KyF.js} +1 -1
  166. package/dist/client/assets/{index-B25IM95s.js → index-C0WKaVxy.js} +1 -1
  167. package/dist/client/assets/index-C4wvi2v7.css +1 -0
  168. package/dist/client/assets/{index-DnJw5_hQ.js → index-C9UqnrNB.js} +1 -1
  169. package/dist/client/assets/{index-DDPTx6IX.js → index-CDpTFqpR.js} +1 -1
  170. package/dist/client/assets/{index-Dhko18B8.js → index-CsQM0oHc.js} +1 -1
  171. package/dist/client/assets/{index-Bbk5iS1Z.js → index-D0GEyG42.js} +13 -13
  172. package/dist/client/assets/{index-xplT9JhY.js → index-D8TuIm4d.js} +1 -1
  173. package/dist/client/assets/{index-CKjUtQ_A.js → index-D9zWR22g.js} +1 -1
  174. package/dist/client/assets/{index-BursVqgA.js → index-DETAJcho.js} +1 -1
  175. package/dist/client/assets/{index-Cgox-ACE.js → index-DOrEGYb6.js} +1 -1
  176. package/dist/client/assets/{index-B-HkEC7t.js → index-DeLM7Rkt.js} +1 -1
  177. package/dist/client/assets/{index-QPY6UhxV.js → index-DgVQUrlP.js} +1 -1
  178. package/dist/client/assets/{index-C0QYe6xy.js → index-DjWhIee5.js} +1 -1
  179. package/dist/client/assets/{index-redirect-DTcApHr6.js → index-redirect-uY3IN3rF.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-BQQ9hnSz.js → infiniteQueryObserver-B6MEVTvt.js} +1 -1
  181. package/dist/client/assets/{infra-billing-Cibcdv6G.js → infra-billing-4CjwqMVB.js} +1 -1
  182. package/dist/client/assets/input-Bzo1OCNz.js +1 -0
  183. package/dist/client/assets/{input-DgB3lXqG.js → input-DFHiqhmH.js} +3 -3
  184. package/dist/client/assets/{integration-icon-BW2tUSAw.js → integration-icon-DazsuPNm.js} +1 -1
  185. package/dist/client/assets/{item-actions-BhKgwiA_.js → item-actions-Yc8vcOg0.js} +1 -1
  186. package/dist/client/assets/{jira-icon-BBEhB000.js → jira-icon-CsaUkukk.js} +1 -1
  187. package/dist/client/assets/{label-CBiNPa0x.js → label-BLEP0nH0.js} +1 -1
  188. package/dist/client/assets/{layout-qzIHBMki.js → layout-c8-5uC_O.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-CWsFtMRD.js → legacy-admin-welcome-dialog-DwTePCPF.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-BiV45Zde.js → legacy-agents-deep-DL8ddlj5.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-DEtLBi-B.js → legacy-main-redirect-DjX7qNM7.js} +1 -1
  192. package/dist/client/assets/library-BD-JkXMr.js +1 -0
  193. package/dist/client/assets/{library-tab-C9yzEvtN.js → library-tab-DOE8AqM2.js} +1 -1
  194. package/dist/client/assets/{login-ByzMeE8E.js → login--MYPwAKH.js} +1 -1
  195. package/dist/client/assets/{markdown-CfexGEwm.js → markdown-COcXeIyG.js} +29 -29
  196. package/dist/client/assets/{mcp-app-renderer-HLyo74Ho.js → mcp-app-renderer-CDjvP8t9.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-CutBZZPD.js → mcp-oauth-DESKCBIm.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-_kccjx1r.js → mcp-oauth-ciX7wK5f.js} +1 -1
  199. package/dist/client/assets/{members-J3uF-Kwg.js → members-DKu_OhY9.js} +1 -1
  200. package/dist/client/assets/{memory-CEi93eGU.js → memory-BL_L-Q3R.js} +1 -1
  201. package/dist/client/assets/{mock-board-CqS4kEHW.js → mock-board--Ssgy-f6.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-CWn-gktX.js → monaco-editor-C0bUrX9K.js} +1 -1
  203. package/dist/client/assets/{monitoring-87cYWoHO.js → monitoring-D8_3FcCV.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-Crp3zY71.js → monitoring-stats-row-L0MR9OOK.js} +1 -1
  205. package/dist/client/assets/{multi-select-C6jEIwqf.js → multi-select-VurXcITl.js} +1 -1
  206. package/dist/client/assets/{mustache-cZl45dTs.js → mustache-CSfql4oE.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-CtJSae2g.js → named-rule-step-BfgtyNIr.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-BH1w8o3C.js → named-rule-view-D1pVQoPd.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-BlvriG-i.js → new-project-dialog-CsFe_Ifg.js} +1 -1
  210. package/dist/client/assets/{new-project-store-1bwM_bJw.js → new-project-store-D3tRl8ms.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ai-provider-3k9SJAqE.js → oauth-callback-ai-provider-DYAZYkh4.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-C2wxDzvG.js → oauth-callback-hp7uk30l.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-BgalQs6s.js → oauth-consent-Buw7iq_C.js} +1 -1
  214. package/dist/client/assets/{onboarding-C00xt4jO.js → onboarding-CPK6bWVC.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-BBe7gxWi.js → openai-conversation-naly2gFj.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-DW5MYqhg.js → optimistic-project-sidebar-views-DWktyZnu.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-DgOUhpEv.js → order-monitor-day-lcmZ_W6T.js} +1 -1
  218. package/dist/client/assets/{organization-choice-CqbEtrRk.js → organization-choice-5J7_8tx5.js} +1 -1
  219. package/dist/client/assets/{orgs-BjJvbxSQ.js → orgs-CTAlA2gh.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-B_9BZnKc.js → own-accounts-section-CL-lWHC3.js} +1 -1
  221. package/dist/client/assets/pair-IZ41S3dI.js +48 -0
  222. package/dist/client/assets/{parse-sections-BEt4sL30.js → parse-sections-bc3ugIU6.js} +2 -2
  223. package/dist/client/assets/{plan-DzqKwbY3.js → plan-C-tbQnGr.js} +1 -1
  224. package/dist/client/assets/{plan-ladder-UyXrpMPX.js → plan-ladder-CpzLELQm.js} +1 -1
  225. package/dist/client/assets/{plan-usage-card-D7PtQ-Mg.js → plan-usage-card-Djn1n4Si.js} +1 -1
  226. package/dist/client/assets/{popover-D1tBNoFL.js → popover-BN8yB-gL.js} +1 -1
  227. package/dist/client/assets/{post-calendar-DPse-vQn.js → post-calendar-B4Ra6fFT.js} +1 -1
  228. package/dist/client/assets/{post-editor-CmRLNap2.js → post-editor-k1GseIfg.js} +1 -1
  229. package/dist/client/assets/{preview-content-Bst4Vj1S.js → preview-content-DrUsIXaL.js} +1 -1
  230. package/dist/client/assets/{preview-dialog-CK8jTtFE.js → preview-dialog-Bl4nn6SJ.js} +1 -1
  231. package/dist/client/assets/{preview-panel-2ktfpQ0K.js → preview-panel-CPnrD7jy.js} +1 -1
  232. package/dist/client/assets/{preview-tab-De34UvpX.js → preview-tab-DJCbL8xU.js} +3 -3
  233. package/dist/client/assets/{primitives-Cm0irN0s.js → primitives-7GEzJciO.js} +1 -1
  234. package/dist/client/assets/{product-picker-dialog-Cj_-kR4f.js → product-picker-dialog-BsLtWfxx.js} +1 -1
  235. package/dist/client/assets/{profile-B4bspmYv.js → profile-LVIi9kQl.js} +1 -1
  236. package/dist/client/assets/{project-app-view-rSEufAu3.js → project-app-view-CfT_gJz2.js} +1 -1
  237. package/dist/client/assets/{project-apps-COpRDLe9.js → project-apps-B5076YmV.js} +1 -1
  238. package/dist/client/assets/{project-icon-BhM8uTps.js → project-icon-NAtCd-2E.js} +1 -1
  239. package/dist/client/assets/{project-index-DzyLTscG.js → project-index-BDBvdHSq.js} +1 -1
  240. package/dist/client/assets/project-reports-Cc5D1Wqe.js +1 -0
  241. package/dist/client/assets/project-tasks-BzeYrrtq.js +1 -0
  242. package/dist/client/assets/{projects-MePgIa0t.js → projects-0NQRxQMi.js} +1 -1
  243. package/dist/client/assets/{projects-empty-state-BBKSmo_-.js → projects-empty-state-Bhe-Ul5b.js} +1 -1
  244. package/dist/client/assets/{prompts-CxnVjjNi.js → prompts-fURd1E3_.js} +1 -1
  245. package/dist/client/assets/record-editor-BiyfqDBa.js +1 -0
  246. package/dist/client/assets/{redirect-editor-DC7_swj1.js → redirect-editor-CysPkosR.js} +1 -1
  247. package/dist/client/assets/reports-CuT-F3LQ.js +1 -0
  248. package/dist/client/assets/{reports-Dr22Z_GR.js → reports-K6JrO8c3.js} +1 -1
  249. package/dist/client/assets/{reports-onboarding-CRwOaNzn.js → reports-onboarding-COfLbzIl.js} +1 -1
  250. package/dist/client/assets/{reports-tab-B78-CTws.js → reports-tab-BNdKCtPv.js} +2 -2
  251. package/dist/client/assets/repositories-BcVuKWWr.js +1 -0
  252. package/dist/client/assets/{repositories-B1GBYlk4.js → repositories-noe5N_6-.js} +1 -1
  253. package/dist/client/assets/{repository-binding-BSsS-pLT.js → repository-binding-DC98qYdg.js} +1 -1
  254. package/dist/client/assets/{repository-picker-DRoPGieR.js → repository-picker-BLhEIBPT.js} +1 -1
  255. package/dist/client/assets/{require-capability-De-meIBX.js → require-capability-r0eDYoNg.js} +1 -1
  256. package/dist/client/assets/{required-auth-layout-C3iaEEmL.js → required-auth-layout-Dq6PcaGv.js} +1 -1
  257. package/dist/client/assets/{reset-password-CgYLlNff.js → reset-password-CeDXY3wu.js} +1 -1
  258. package/dist/client/assets/{resizable-Cli16m3H.js → resizable-CDUVHUkS.js} +1 -1
  259. package/dist/client/assets/{resolve-tab-icon-BTWqiqFe.js → resolve-tab-icon-CCnYS1It.js} +1 -1
  260. package/dist/client/assets/{review-settings-BbBTVgei.js → review-settings-Cfg9u4wr.js} +1 -1
  261. package/dist/client/assets/{role-color-Bk9jClz7.js → role-color-j5ZAxcKG.js} +1 -1
  262. package/dist/client/assets/{roles-C1ujMDqv.js → roles-DNr0gwrs.js} +1 -1
  263. package/dist/client/assets/{route-D0TrVFPx.js → route-Bny9Lc4o.js} +1 -1
  264. package/dist/client/assets/route-CpGHqQae.js +1 -0
  265. package/dist/client/assets/{route-page-header-BoSpaJ2l.js → route-page-header-B-0s5BiJ.js} +1 -1
  266. package/dist/client/assets/{route-DmaKuvUr.js → route-zFj6XsMD.js} +1 -1
  267. package/dist/client/assets/{sandbox-git-api-BQA0ksZA.js → sandbox-git-api-CJ3-CkeV.js} +1 -1
  268. package/dist/client/assets/{sandbox-lifecycle-context-DCPdrlj7.js → sandbox-lifecycle-context-DJVkUHOC.js} +1 -1
  269. package/dist/client/assets/{save-status-D-AS_GN9.js → save-status-5VC4rIi2.js} +1 -1
  270. package/dist/client/assets/{schema-ByWYIGUp.js → schema-B5pk7azZ.js} +1 -1
  271. package/dist/client/assets/{schema-CjjCZ6bx.js → schema-CAZOGJTH.js} +1 -1
  272. package/dist/client/assets/{scroll-area-BUivyrPu.js → scroll-area-CXINzzvW.js} +1 -1
  273. package/dist/client/assets/{search-input-3Sn0Ox5l.js → search-input-Dmx6N7Z7.js} +1 -1
  274. package/dist/client/assets/{search-toggle-BgCwR4FW.js → search-toggle-uhoeAt8V.js} +1 -1
  275. package/dist/client/assets/{secret-picker-D8jf7FIH.js → secret-picker-CdBDBcEP.js} +1 -1
  276. package/dist/client/assets/{secrets-C0836Wwg.js → secrets-DdH9QnxK.js} +1 -1
  277. package/dist/client/assets/{section-array-field-CnIV-ruK.js → section-array-field-RxYDyVUT.js} +1 -1
  278. package/dist/client/assets/{sections-vcSyxSdo.js → sections-CvVT6jo9.js} +1 -1
  279. package/dist/client/assets/{sections-editor-DQxa09Jb.js → sections-editor-FJjN0xqY.js} +1 -1
  280. package/dist/client/assets/{select-De2MKx8C.js → select-PhQ1dHUc.js} +1 -1
  281. package/dist/client/assets/{select-model-BJhpOCBC.js → select-model-DsYbAwnw.js} +1 -1
  282. package/dist/client/assets/{seo-editor-Dhccj0TW.js → seo-editor-DTf59Uvx.js} +1 -1
  283. package/dist/client/assets/{separator-KNm6D8Nt.js → separator-BspBySaE.js} +1 -1
  284. package/dist/client/assets/{session-runtime-CEhQCN_A.js → session-runtime-CWUXrNEM.js} +1 -1
  285. package/dist/client/assets/settings-tab-CoHHJ63I.js +1 -0
  286. package/dist/client/assets/{sheet-C0xCH2mH.js → sheet-DsBIaG5c.js} +1 -1
  287. package/dist/client/assets/{shell-layout-KldWhDuy.js → shell-layout-DfpoOTvP.js} +1 -1
  288. package/dist/client/assets/{site-draft-actions-DSBacDkM.js → site-draft-actions-bEXIW2Ci.js} +1 -1
  289. package/dist/client/assets/{site-draft-view-DE-vflKe.js → site-draft-view-DL1xS2bS.js} +1 -1
  290. package/dist/client/assets/site-editor-OTjpPpEJ.js +1 -0
  291. package/dist/client/assets/{site-editor-toast-CvNOL4ms.js → site-editor-toast-DI5QMuI-.js} +1 -1
  292. package/dist/client/assets/{skills-Bobugav3.js → skills-sOnNG6z3.js} +1 -1
  293. package/dist/client/assets/{slider-D6wd7ZjA.js → slider-DiJZup4s.js} +1 -1
  294. package/dist/client/assets/{sortable.esm-nvXi4p48.js → sortable.esm-AH9TOEe6.js} +1 -1
  295. package/dist/client/assets/{sso-DeJx7UXD.js → sso-DJUFzVd6.js} +1 -1
  296. package/dist/client/assets/{suggestion-DqNLuB6A.js → suggestion-BKU1aw0O.js} +1 -1
  297. package/dist/client/assets/{super-agent-icon-Bshs6T-m.js → super-agent-icon-KeQzZLhO.js} +1 -1
  298. package/dist/client/assets/{switch-B00BnZbl.js → switch-CavZ0Td_.js} +1 -1
  299. package/dist/client/assets/{synced-repos-DizABgb9.js → synced-repos-CpobCKuE.js} +1 -1
  300. package/dist/client/assets/{tab-icon-glyph-CfPfvQNB.js → tab-icon-glyph-BQpSs905.js} +1 -1
  301. package/dist/client/assets/{table-Uzyje8VX.js → table-_0cphCuz.js} +1 -1
  302. package/dist/client/assets/{tabs-DP2FyQoi.js → tabs-CB9wyI2L.js} +1 -1
  303. package/dist/client/assets/{task-board-VFa9eWCt.js → task-board-DAlkVSdn.js} +1 -1
  304. package/dist/client/assets/{task-key-Bw-0Xagt.js → task-key-D_de_YB4.js} +1 -1
  305. package/dist/client/assets/{task-route-CAa-BRsr.js → task-route-gaZIOP1Q.js} +1 -1
  306. package/dist/client/assets/{task-status-CJ3X0NFO.js → task-status-Dm8lN6h7.js} +1 -1
  307. package/dist/client/assets/{taskboard-analytics--TWvNVte.js → taskboard-analytics-BRO72FRF.js} +1 -1
  308. package/dist/client/assets/tasks-BjMbQPZT.js +1 -0
  309. package/dist/client/assets/{tasks-BclVV5A-.js → tasks-LD7DAdjg.js} +1 -1
  310. package/dist/client/assets/{textarea-BcZLPwQm.js → textarea-C5yT2rai.js} +1 -1
  311. package/dist/client/assets/{thread-analytics-DfE_3PWw.js → thread-analytics-TKt2gIA9.js} +1 -1
  312. package/dist/client/assets/{thread-button-Czo95-P_.js → thread-button-jA6lXOHW.js} +1 -1
  313. package/dist/client/assets/{thread-intent-BmXJHmce.js → thread-intent-DC5UuPI5.js} +1 -1
  314. package/dist/client/assets/{thread-route-DqTdmfFp.js → thread-route-BmXDes0-.js} +1 -1
  315. package/dist/client/assets/{thread-route-DiGqiNZD.js → thread-route-NC2TJMv2.js} +1 -1
  316. package/dist/client/assets/{thread-sheet-body-DqQKksps.js → thread-sheet-body-BATHVA9a.js} +1 -1
  317. package/dist/client/assets/{time-range-picker-C_oftj3R.js → time-range-picker-BdF4LahQ.js} +1 -1
  318. package/dist/client/assets/{toggle-group-B-toNLb_.js → toggle-group-B2L0Fh-A.js} +1 -1
  319. package/dist/client/assets/{tool-set-selector-DYhntVmY.js → tool-set-selector-sYj6JiLu.js} +1 -1
  320. package/dist/client/assets/{toolbar-icon-button-luClWvkN.js → toolbar-icon-button-BleYd0k2.js} +1 -1
  321. package/dist/client/assets/{tooltip-W9aneKod.js → tooltip-C0XDZQqg.js} +1 -1
  322. package/dist/client/assets/{tooltipContext-BKEerq2t.js → tooltipContext-B5tdv-rH.js} +1 -1
  323. package/dist/client/assets/{track-DfNsDtcS.js → track-DkQvKF_r.js} +1 -1
  324. package/dist/client/assets/{types-D29IqQQn.js → types-BmRTIjW9.js} +1 -1
  325. package/dist/client/assets/{url-slug-C2dy5cTg.js → url-slug-HTy1TIRr.js} +1 -1
  326. package/dist/client/assets/{usage-stats-C4Ju4qoC.js → usage-stats-BbuSELy1.js} +21 -21
  327. package/dist/client/assets/{use-ai-providers-DU-S8Ovj.js → use-ai-providers-CGeOv9zD.js} +1 -1
  328. package/dist/client/assets/{use-api-keys-DI_FBRt6.js → use-api-keys-BBDeQmvb.js} +1 -1
  329. package/dist/client/assets/{use-apply-named-rule-DLAoQ7ZW.js → use-apply-named-rule-c0_gPvLu.js} +1 -1
  330. package/dist/client/assets/use-ask-in-chat-DQt8TEjL.js +1 -0
  331. package/dist/client/assets/{use-automations-DJu_bQMu.js → use-automations-UppgD9x4.js} +1 -1
  332. package/dist/client/assets/{use-autosave-UPILzOGr.js → use-autosave-DP-Xo78G.js} +1 -1
  333. package/dist/client/assets/use-blocks-v8-project-BzyehgAq.js +1 -0
  334. package/dist/client/assets/use-blog-view-BPx89KE1.js +1 -0
  335. package/dist/client/assets/{use-chat-layout-state-DK2Bd_b8.js → use-chat-layout-state-CYDJQho2.js} +1 -1
  336. package/dist/client/assets/{use-cms-publish-actions-6W6G1H2l.js → use-cms-publish-actions-sZFllHA3.js} +1 -1
  337. package/dist/client/assets/{use-connect-companion-DF6vPT8j.js → use-connect-companion-DM6nloeD.js} +1 -1
  338. package/dist/client/assets/{use-connection-BHZBfHKD.js → use-connection-BlQSFvXZ.js} +1 -1
  339. package/dist/client/assets/{use-content-sync-hHSueAd9.js → use-content-sync-CmcdSf-W.js} +1 -1
  340. package/dist/client/assets/{use-copy-CtLHXaYX.js → use-copy-_EjHpFlu.js} +1 -1
  341. package/dist/client/assets/{use-current-view-cqZFu632.js → use-current-view-DJmYWR9r.js} +1 -1
  342. package/dist/client/assets/{use-date-fns-locale-Ca4x-hdx.js → use-date-fns-locale-8kgkXGzy.js} +1 -1
  343. package/dist/client/assets/{use-debounced-autosave-egUuvpyg.js → use-debounced-autosave-43RSVqCJ.js} +1 -1
  344. package/dist/client/assets/{use-debounced-value-C8Gcgh9P.js → use-debounced-value-CtUf9JOP.js} +1 -1
  345. package/dist/client/assets/{use-deco-credits-NqK3j6Uy.js → use-deco-credits-CrAjq5eE.js} +1 -1
  346. package/dist/client/assets/{use-decopilot-events-BdOsPUXO.js → use-decopilot-events-CwyVZVbh.js} +1 -1
  347. package/dist/client/assets/{use-delete-block-Ck_v-_xs.js → use-delete-block-CziQYeFw.js} +1 -1
  348. package/dist/client/assets/{use-delete-connection-PQXZSLGQ.js → use-delete-connection-5KBJh_4H.js} +1 -1
  349. package/dist/client/assets/{use-deployment-admin-06_aP6Ns.js → use-deployment-admin-vod10AYl.js} +1 -1
  350. package/dist/client/assets/{use-entitlements-BUF4fpoq.js → use-entitlements-D-BsJsBn.js} +1 -1
  351. package/dist/client/assets/{use-fast-preview-draft-url-C0yd3ccI.js → use-fast-preview-draft-url-CTybhvJ7.js} +1 -1
  352. package/dist/client/assets/{use-file-configs-BrcDDIBZ.js → use-file-configs-zM1_UDsD.js} +1 -1
  353. package/dist/client/assets/{use-id-selection-vLaYBEH-.js → use-id-selection-B-V9WQKU.js} +1 -1
  354. package/dist/client/assets/{use-in-settings-DfZIpmwh.js → use-in-settings-CKmb_d-Z.js} +1 -1
  355. package/dist/client/assets/{use-inbox-feed-DhlbBV5u.js → use-inbox-feed-BIRoBmxG.js} +1 -1
  356. package/dist/client/assets/{use-infinite-scroll-BqVS1RSu.js → use-infinite-scroll-D0fDDIyn.js} +1 -1
  357. package/dist/client/assets/{use-join-requests-LMl79WAM.js → use-join-requests-C7XAF7yu.js} +1 -1
  358. package/dist/client/assets/{use-main-panel-tabs-BypHuYN5.js → use-main-panel-tabs-CFBnVDX4.js} +1 -1
  359. package/dist/client/assets/{use-mcp-auth-status-Da9KRHgH.js → use-mcp-auth-status-Cvpzf8bf.js} +1 -1
  360. package/dist/client/assets/{use-mcp-client-mPNZ5wA-.js → use-mcp-client-C25DU1dz.js} +1 -1
  361. package/dist/client/assets/{use-mcp-prompts-BgJv8IRF.js → use-mcp-prompts-DFURxOZn.js} +1 -1
  362. package/dist/client/assets/{use-mcp-tools-BcOrFpuk.js → use-mcp-tools-DU4EJz2s.js} +1 -1
  363. package/dist/client/assets/{use-mobile-Dq5jf2f0.js → use-mobile-DFpIEPum.js} +1 -1
  364. package/dist/client/assets/{use-move-blocks-DnHSHuof.js → use-move-blocks-HLsANXZk.js} +1 -1
  365. package/dist/client/assets/{use-navigate-to-agent-C6kz2tf-.js → use-navigate-to-agent-BGA3nmOF.js} +1 -1
  366. package/dist/client/assets/{use-never-published-BmwZStnO.js → use-never-published-BnWhN5r2.js} +1 -1
  367. package/dist/client/assets/{use-org-fs-s_0LIrDS.js → use-org-fs-BrF60Lzy.js} +1 -1
  368. package/dist/client/assets/{use-org-notice-nG8SqftY.js → use-org-notice-BmwTtllY.js} +1 -1
  369. package/dist/client/assets/{use-org-repo-syncs-BxGtCYGM.js → use-org-repo-syncs-Bi8Ut_qX.js} +1 -1
  370. package/dist/client/assets/{use-org-sso-Bz1_bfif.js → use-org-sso-CpaEO6G5.js} +1 -1
  371. package/dist/client/assets/{use-organization-settings-BMe7yDwK.js → use-organization-settings-CeyizmcT.js} +1 -1
  372. package/dist/client/assets/{use-panel-navigate-Cw8nqOIV.js → use-panel-navigate-BvdMbLN8.js} +1 -1
  373. package/dist/client/assets/{use-project-native-view-presence-CAidgxjk.js → use-project-native-view-presence-Cj3jJM1f.js} +1 -1
  374. package/dist/client/assets/{use-project-scope-XjTsfNgl.js → use-project-scope-TiMALD5Y.js} +1 -1
  375. package/dist/client/assets/{use-recent-apps-nWo-QZz2.js → use-recent-apps-CAx2Sj77.js} +1 -1
  376. package/dist/client/assets/{use-reports-diagnostic-CMKEMOUj.js → use-reports-diagnostic-BWUL8kSa.js} +1 -1
  377. package/dist/client/assets/{use-sandbox-events-B_nCM-ka.js → use-sandbox-events-CrjWSBYb.js} +1 -1
  378. package/dist/client/assets/{use-secrets-By8cnQ4b.js → use-secrets-DYs_2mJJ.js} +1 -1
  379. package/dist/client/assets/{use-section-preview-base-DEe57kJn.js → use-section-preview-base-bQf9hU5_.js} +1 -1
  380. package/dist/client/assets/{use-sidebar-collapsed-BWxWuz83.js → use-sidebar-collapsed-Cynyx51j.js} +1 -1
  381. package/dist/client/assets/{use-tags-DsDJUFVu.js → use-tags-Ds4Jpuu1.js} +1 -1
  382. package/dist/client/assets/{use-task-board-analytics-CoIz9pQ4.js → use-task-board-analytics-5UJcKLaD.js} +1 -1
  383. package/dist/client/assets/{use-task-board-item-prs-BjXAaoNm.js → use-task-board-item-prs-C0gHPfb5.js} +1 -1
  384. package/dist/client/assets/{use-task-board-items-BueQ5HqT.js → use-task-board-items-osFWr4F_.js} +1 -1
  385. package/dist/client/assets/{use-task-board-prompts-D-OUTo_-.js → use-task-board-prompts-eYQIzP7F.js} +1 -1
  386. package/dist/client/assets/{use-task-metadata-B11DnfPk.js → use-task-metadata-DqYio8UA.js} +1 -1
  387. package/dist/client/assets/{use-thread-outputs-BwRllZjy.js → use-thread-outputs-DJQKtV2q.js} +1 -1
  388. package/dist/client/assets/{use-view-draft-kind-CT4UyCBZ.js → use-view-draft-kind-BYPtD8MA.js} +1 -1
  389. package/dist/client/assets/{use-voice-input-fsQibllg.js → use-voice-input-wPU7RMRz.js} +1 -1
  390. package/dist/client/assets/useInfiniteQuery-EaWUgCtN.js +1 -0
  391. package/dist/client/assets/{useQueries-Cif9aKm8.js → useQueries-DKbjoyEp.js} +1 -1
  392. package/dist/client/assets/useSuspenseInfiniteQuery-D-KEcWQs.js +1 -0
  393. package/dist/client/assets/{users-DvVhyJaa.js → users-BaX74SiF.js} +1 -1
  394. package/dist/client/assets/{utils-P6Og2u3N.js → utils-C8EWsG3o.js} +1 -1
  395. package/dist/client/assets/{variant-calendar-LeGKEzjI.js → variant-calendar-56I1fIKh.js} +1 -1
  396. package/dist/client/assets/{variant-matcher-override-BB2HbnUa.js → variant-matcher-override-BsSZ5yFL.js} +1 -1
  397. package/dist/client/assets/{view-header-aiCGECzR.js → view-header-B-qrTWpm.js} +1 -1
  398. package/dist/client/assets/{virtual-mcp-q_VEw2Ce.js → virtual-mcp-DeWQ4GR6.js} +1 -1
  399. package/dist/client/assets/{watch-sse-pool-9O-TJMef.js → watch-sse-pool-DSisQksD.js} +1 -1
  400. package/dist/client/index.html +2 -2
  401. package/dist/server/server.js +3 -3
  402. package/package.json +1 -1
  403. package/dist/client/assets/agent-app-DlIXYYf9.js +0 -1
  404. package/dist/client/assets/agent-deck-DqIBoJAu.js +0 -1
  405. package/dist/client/assets/agent-experiments-BiGIVIia.js +0 -1
  406. package/dist/client/assets/agent-file-DsMol7Mm.js +0 -1
  407. package/dist/client/assets/agent-library-Bt1mJaIH.js +0 -1
  408. package/dist/client/assets/agent-library-file-Z3ccrEES.js +0 -1
  409. package/dist/client/assets/agent-overview-DarftbDZ.js +0 -1
  410. package/dist/client/assets/agent-settings-DQjOsh1q.js +0 -1
  411. package/dist/client/assets/agent-site-editor-code-Z3qPYcJC.js +0 -2
  412. package/dist/client/assets/agent-site-editor-content-Djuy4ohp.js +0 -1
  413. package/dist/client/assets/agent-site-editor-preview-DuuRb2k-.js +0 -1
  414. package/dist/client/assets/agent-view-CxcXZ1ps.js +0 -1
  415. package/dist/client/assets/api-keys-qGxl2Ulg.js +0 -1
  416. package/dist/client/assets/chat-context-CWdOGDBM.js +0 -43
  417. package/dist/client/assets/index-yFD0_BNc.css +0 -1
  418. package/dist/client/assets/input-DS9Lcdr7.js +0 -1
  419. package/dist/client/assets/library-73cgD91W.js +0 -1
  420. package/dist/client/assets/pair-COA93ohg.js +0 -48
  421. package/dist/client/assets/project-reports-BIv6b5kg.js +0 -1
  422. package/dist/client/assets/project-tasks-BIO-MOsF.js +0 -1
  423. package/dist/client/assets/record-editor-Cf1AplRD.js +0 -1
  424. package/dist/client/assets/reports-CoJ1Nfwl.js +0 -1
  425. package/dist/client/assets/repositories-CwxbDZ4K.js +0 -1
  426. package/dist/client/assets/route-Cxo8JseM.js +0 -1
  427. package/dist/client/assets/settings-tab-CSqS3qrR.js +0 -1
  428. package/dist/client/assets/site-editor-BT7_G9Vn.js +0 -1
  429. package/dist/client/assets/tasks-B4i5niLh.js +0 -1
  430. package/dist/client/assets/use-ask-in-chat-s9WvcD2m.js +0 -1
  431. package/dist/client/assets/use-blocks-v8-project-DD1up-u3.js +0 -1
  432. package/dist/client/assets/use-blog-view-qeD-Zbnz.js +0 -1
  433. package/dist/client/assets/useInfiniteQuery-kEKcQUWO.js +0 -1
  434. package/dist/client/assets/useSuspenseInfiniteQuery-BpVcZwyx.js +0 -1
@@ -1 +1 @@
1
- import{a as $,c as ce,m as S,j as t,a3 as Ke,a4 as Ge,a5 as ke,r as N,e as te,E as M,B as se,I as ae,b as Fe,h as Ye}from"./index-C0zcxte6.js";import{i as Je}from"./Fingerprint04-8iB0ZMj1.js";import{e as Qe}from"./backoff-CrEUbyZT.js";import{d as Xe}from"./delay-CnY5UFtP.js";class Le extends Error{constructor(e,r){super(`Retrying exceeded the maxAttempts (${r}).`),this.name="RetryError",this.cause=e}}async function Ze(n,e){const{multiplier:r=2,maxTimeout:l=6e4,maxAttempts:g=5,minTimeout:m=1e3,jitter:i=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(g)||g<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${g}`);if(!Number.isFinite(r)||r<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${r}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(m)||m<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${m}`);if(m>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${m}', 'maxTimeout=${l}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let b=0;for(;;){d?.throwIfAborted();try{return await n()}catch(f){if(!u(f))throw f;if(b+1>=g)throw new Le(f,g);const v=Qe(l,m,b,r,i);await Xe(v,d?{signal:d}:void 0)}b++}}const Oe={submitEmailPassword:({mode:n,email:e,password:r,name:l})=>n==="sign_up"?$.signUp.email({email:e,password:r,name:l||""}):$.signIn.email({email:e,password:r}),requestPasswordReset:({email:n,redirectTo:e})=>$.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>$.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>$.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>$.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>$.signIn.sso({providerId:n,callbackURL:e}),passkeySignIn:()=>$.signIn.passkey(),onAuthenticated:n=>{window.location.href=n}};function et(n){const e=ce.c(25);let r,l,g,m,i,u,d,b;e[0]!==n?({length:g,className:r,containerClassName:l,slotClassName:i,pattern:u,inputMode:d,autoComplete:b,...m}=n,e[0]=n,e[1]=r,e[2]=l,e[3]=g,e[4]=m,e[5]=i,e[6]=u,e[7]=d,e[8]=b):(r=e[1],l=e[2],g=e[3],m=e[4],i=e[5],u=e[6],d=e[7],b=e[8]);const f=u===void 0?Ge:u,v=d===void 0?"numeric":d,p=b===void 0?"one-time-code":b;let h;e[9]!==l?(h=S("flex items-center gap-2 has-[:disabled]:opacity-50",l),e[9]=l,e[10]=h):h=e[10];let A;e[11]!==r?(A=S("disabled:cursor-not-allowed",r),e[11]=r,e[12]=A):A=e[12];let y;e[13]!==m||e[14]!==i?(y=x=>{const{slots:j}=x;return t.jsx(t.Fragment,{children:j.map((D,q)=>t.jsx(tt,{...D,invalid:m["aria-invalid"]===!0,className:i},q))})},e[13]=m,e[14]=i,e[15]=y):y=e[15];let w;return e[16]!==p||e[17]!==v||e[18]!==g||e[19]!==f||e[20]!==m||e[21]!==h||e[22]!==A||e[23]!==y?(w=t.jsx(Ke,{"data-slot":"input-otp",maxLength:g,pattern:f,inputMode:v,autoComplete:p,containerClassName:h,className:A,render:y,...m}),e[16]=p,e[17]=v,e[18]=g,e[19]=f,e[20]=m,e[21]=h,e[22]=A,e[23]=y,e[24]=w):w=e[24],w}function tt(n){const e=ce.c(13),{char:r,placeholderChar:l,hasFakeCaret:g,isActive:m,invalid:i,className:u}=n,d=m||void 0,b=i&&"bg-destructive/10 shadow-[inset_0_0_0_1px_var(--destructive)]";let f;e[0]!==u||e[1]!==b?(f=S("relative flex h-12 w-10 flex-1 items-center justify-center text-xl font-medium tabular-nums text-foreground transition-[background-color,box-shadow]","rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] shadow-edge","data-active:shadow-[inset_0_0_0_2px_var(--ring)]",b,u),e[0]=u,e[1]=b,e[2]=f):f=e[2];let v;e[3]!==r||e[4]!==l?(v=r??t.jsx("span",{className:"text-subtle-foreground",children:l}),e[3]=r,e[4]=l,e[5]=v):v=e[5];let p;e[6]!==g?(p=g&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"h-5 w-px animate-pulse bg-foreground"})}),e[6]=g,e[7]=p):p=e[7];let h;return e[8]!==d||e[9]!==f||e[10]!==v||e[11]!==p?(h=t.jsxs("div",{"data-slot":"input-otp-slot","data-active":d,className:f,children:[v,p]}),e[8]=d,e[9]=f,e[10]=v,e[11]=p,e[12]=h):h=e[12],h}const de="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",st={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",verifying:"Verifying...",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code",signInWithPasskey:"Sign in with a passkey"};function at({redirectUrl:n,callbackUrl:e="/",title:r,subtitle:l,brand:g,copy:m,variant:i="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:b,actions:f}){const{emailAndPassword:v,resetPassword:p,emailOtp:h,passkey:A,socialProviders:y}=ke(),w={...Oe,...f},x=s=>{try{b?.(s)}catch{}},j=i==="compact",D=u?y.providers.filter(s=>u.includes(s.name)):y.providers,q=y.enabled&&D.length>0,me=v.enabled&&(d||!h.enabled&&!q),_=y.enabled&&y.providers.length>0&&!q&&!h.enabled&&!me?y.providers:D,T=y.enabled&&_.length>0,k=v.enabled&&(d||!h.enabled&&!T),F=A.enabled&&d&&typeof globalThis.PublicKeyCredential<"u",W=T||F,[c,ne]=N.useState(""),[ie,Re]=N.useState(""),[ue,be]=N.useState(""),[ge,re]=N.useState(""),[Y,he]=N.useState(!1),[pe,$e]=N.useState(()=>h.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[C,B]=N.useState(""),[ve,we]=N.useState(!1),[Me,oe]=N.useState(null),a={...st,...m},z=N.useId(),V=`${z}-email`,H=`${z}-email-error`,ye=`${z}-name`,Ee=`${z}-password`,Se=`${z}-otp`,je=`${z}-otp-status`,I=pe==="signUp",R=pe==="forgotPassword",L=pe==="emailOtp",J=te({mutationFn:async({email:s,password:o,name:O})=>{try{const G=await w.submitEmailPassword({mode:I?"sign_up":"sign_in",email:s,password:o,name:O});if(G.error)throw new Error(G.error.message||(I?a.signUpFailed:a.signInFailed));return G}catch(G){throw G instanceof Error?G:new Error(a.authenticationFailed)}},onMutate:()=>{x({type:"started",method:"email_password",mode:I?"sign_up":"sign_in"})},onSuccess:()=>{x({type:"succeeded",method:"email_password",mode:I?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(n??e)},onError:s=>{x({type:"failed",method:"email_password",mode:I?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),M(I?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),Q=te({mutationFn:async({email:s})=>{const o=await w.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(o.error)throw new Error(o.error.message||a.resetEmailFailed);return o},onSuccess:()=>{M("password_reset_requested"),we(!0)},onError:s=>{M("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),U=te({mutationFn:async({email:s})=>{const o=await w.sendOtp({email:s});if(o.error)throw new Error(o.error.message||a.otpSendFailed);return o},onMutate:()=>{x({type:"started",method:"email_otp"})},onSuccess:()=>{x({type:"otp_sent",method:"email_otp"}),M("email_otp_sent"),he(!0)},onError:s=>{x({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),P=te({mutationFn:async({email:s,otp:o})=>{const O=await w.submitOtp({email:s,otp:o});if(O.error)throw new Error(O.error.message||a.invalidCode);return O},onMutate:()=>{x({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{x({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(n??e)},onError:s=>{re(""),x({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),X=te({mutationFn:async()=>{const s=await w.passkeySignIn();if(s.error){if(s.error.code==="AUTH_CANCELLED")return{cancelled:!0};throw new Error(s.error.message||a.authenticationFailed)}return{cancelled:!1}},onMutate:()=>{x({type:"started",method:"passkey"})},onSuccess:({cancelled:s})=>{s||(x({type:"succeeded",method:"passkey"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(n??e))},onError:s=>{x({type:"failed",method:"passkey",stage:"authenticate",error:s.message}),M("passkey_signin_failed",{error:s.message})}}),le=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),fe=()=>{c.trim()&&!le(c)&&B(a.invalidEmail)},We=s=>{if(s.preventDefault(),!le(c)){B(a.invalidEmail),x({type:"failed",method:"email_password",mode:I?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:ie,name:ue})},Ue=s=>{if(s.preventDefault(),!le(c)){B(a.invalidEmail);return}Q.mutate({email:c})},De=s=>{if(s.preventDefault(),!le(c)){B(a.invalidEmail),x({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}U.mutate({email:c})},Ne=s=>{P.isPending||P.mutate({email:c,otp:s})},qe=s=>{s.preventDefault(),ge.length===h.length&&Ne(ge)},Be=s=>{re(s),xe&&(U.reset(),P.reset())},Z=s=>o=>{s(o.target.value),Ie&&J.reset(),Ce&&Q.reset(),xe&&(U.reset(),P.reset()),s===ne&&C&&B("")},ee=s=>{$e(s),be(""),re(""),he(!1),B(""),we(!1),oe(null),J.reset(),Q.reset(),U.reset(),P.reset(),X.reset()},E=J.isPending||Q.isPending||U.isPending||P.isPending||X.isPending,Ie=J.error,Ce=Q.error,xe=U.error||P.error,K=I?c.trim()&&ie.trim()&&ue.trim():R||L?c.trim():c.trim()&&ie.trim(),ze=s=>{if(!s)return null;const o=s.message.toLowerCase();return o.includes("unauthorized")||o.includes("401")?a.invalidEmailOrPassword:o.includes("already exists")||o.includes("409")?a.accountExists:o.includes("network")||o.includes("fetch")?a.networkError:o.includes("rate limit")||o.includes("429")?a.tooManyAttempts:o.includes("invalid")&&o.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Pe=Ie||Ce||xe||Me||X.error,Ve=async s=>{x({type:"started",method:"social",provider:s}),oe(null),X.reset();try{const o=await w.socialSignIn({provider:s,callbackURL:n??e});if(o.error)throw new Error(o.error.message||a.authenticationFailed)}catch(o){const O=o instanceof Error?o.message:String(o);x({type:"failed",method:"social",provider:s,stage:"redirect",error:O}),M("social_signin_failed",{provider:s,error:O}),oe(o instanceof Error?o:new Error(O))}},He=R?a.resetPasswordTitle:L&&Y?a.verificationCodeTitle:r??a.welcomeTitle,Ae=R?a.resetPasswordSubtitle:L&&Y?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:S("grid w-full",j?"gap-5":"gap-10"),children:[g??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:S("font-medium",j?"text-xl leading-7":"text-2xl leading-8"),children:He}),Ae&&t.jsx("p",{className:S("text-muted-foreground",j?"text-sm leading-5":"text-base leading-6"),children:Ae})]}),Pe&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:ze(Pe)}),ve&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(L&&Y)&&W&&t.jsxs("div",{className:"grid gap-2",children:[T&&_.map(s=>t.jsxs(se,{type:"button",variant:"outline",size:j?"lg":"xl",disabled:E,onClick:()=>{Ve(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:S("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name)),F&&t.jsxs(se,{type:"button",variant:"outline",size:j?"lg":"xl",disabled:E,onClick:()=>{oe(null),X.mutate()},className:"w-full gap-3",children:[t.jsx(Je,{className:"h-5 w-5","aria-hidden":"true"}),a.signInWithPasskey]})]}),!R&&!(L&&Y)&&W&&(k||h.enabled)&&t.jsxs("div",{className:S("flex items-center gap-2.5",j?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:S("text-muted-foreground",j?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),L&&h.enabled&&t.jsx(t.Fragment,{children:Y?t.jsxs("form",{onSubmit:qe,className:"grid gap-2",children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:S("text-sm font-medium text-foreground",j&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(et,{id:Se,length:h.length,value:ge,onChange:Be,onComplete:Ne,autoFocus:!0,"aria-invalid":!!P.error,"aria-describedby":P.isPending?je:void 0}),t.jsx("p",{id:je,role:"status",className:S("text-sm text-muted-foreground",!P.isPending&&"sr-only"),children:P.isPending?a.verifying:""})]}),t.jsx("button",{type:"button",onClick:()=>{he(!1),re(""),U.reset(),P.reset()},disabled:E,className:"mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:De,className:S("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:V,className:S("text-sm font-medium text-foreground",j&&"sr-only"),children:a.emailLabel}),t.jsx(ae,{id:V,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:Z(ne),onBlur:fe,required:!0,disabled:E,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?H:void 0,className:"h-11"}),C&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive",children:C})]}),t.jsx(se,{type:"submit",size:j?"lg":"xl",disabled:E||!K,className:S(j?"sm:w-auto":"w-full"),children:E?a.sending:a.sendCode})]})}),R&&k&&!ve&&t.jsxs("form",{onSubmit:Ue,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:V,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(ae,{id:V,type:"email",placeholder:"you@example.com",value:c,onChange:Z(ne),onBlur:fe,required:!0,disabled:E,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?H:void 0,className:"h-11"}),C&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsx(se,{type:"submit",disabled:E||!K,className:"w-full font-semibold",size:"xl",children:E?a.sending:a.sendResetLink})]}),!R&&!L&&k&&t.jsxs("form",{onSubmit:We,className:"grid gap-5",children:[I&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ye,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(ae,{id:ye,type:"text",placeholder:a.namePlaceholder,value:ue,onChange:Z(be),required:!0,disabled:E,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:V,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(ae,{id:V,type:"email",placeholder:"you@example.com",value:c,onChange:Z(ne),onBlur:fe,required:!0,disabled:E,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?H:void 0,className:"h-11"}),C&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!I&&p.enabled&&t.jsx("button",{type:"button",onClick:()=>ee("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(ae,{id:Ee,type:"password",placeholder:"••••••••",value:ie,onChange:Z(Re),required:!0,disabled:E,autoComplete:I?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:S("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",K?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:S("p-1",!K&&"pointer-events-none"),children:t.jsx(se,{type:"submit",disabled:E||!K,className:S("w-full font-semibold"),size:"xl","aria-hidden":!K,children:E?I?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>ee("signIn"),disabled:E,className:de,children:a.backToSignIn}):L&&k?t.jsx("button",{type:"button",onClick:()=>ee("signIn"),disabled:E,className:de,children:a.signInWithPassword}):!L&&k?t.jsxs(t.Fragment,{children:[I?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>ee(I?"signIn":"signUp"),disabled:E,className:de,children:I?a.signIn:a.signUp}),h.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>ee("emailOtp"),disabled:E,className:de,children:a.signInWithEmailCode})]})]}):null})]})}class _e{constructor(e){this.response=e}response}function nt(n){return n.startsWith("/")&&!n.startsWith("//")&&!n.startsWith("/\\")?n:"/"}function it({redirectTo:n,onAuthEvent:e}){const r=Fe(),[l,g]=N.useState(null),m=N.useEffectEvent(i=>{try{e?.(i)}catch{}});return N.useEffect(()=>{let i=!1;return(async()=>{m({type:"started",method:"local"});try{let u;try{u=await Ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new _e(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Le&&d.cause instanceof _e)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||r("common.authEntry.autoLoginFailed"))}i||(m({type:"succeeded",method:"local"}),window.location.href=nt(n))}catch(u){i||(m({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),g(u instanceof Error?u.message:r("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:r("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:r("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=ce.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ye,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:r,onAuthEvent:l}){const g=N.useEffectEvent(i=>{try{l?.(i)}catch{}}),m=N.useEffectEvent(r);return N.useEffect(()=>{(async()=>{g({type:"started",method:"sso",provider:e});try{const i=await m({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){g({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function mt(n){const e=ce.c(25),{callbackUrl:r,redirectUrl:l,allowAutoLogin:g,title:m,subtitle:i,brand:u,copy:d,variant:b,allowedSocialProviders:f,allowPassword:v,onAuthEvent:p,onAuthenticated:h}=n,A=g===void 0?!0:g,y=Fe(),{sso:w,emailAndPassword:x,magicLink:j,emailOtp:D,socialProviders:q,localMode:me}=ke(),_=l||r;let T;e[0]!==h?(T=h?{onAuthenticated:h}:void 0,e[0]=h,e[1]=T):T=e[1];const k=T;if(me&&A){let c;return e[2]!==p||e[3]!==_?(c=t.jsx(it,{redirectTo:_,onAuthEvent:p}),e[2]=p,e[3]=_,e[4]=c):c=e[4],c}if(w.enabled){let c;return e[5]!==p||e[6]!==_||e[7]!==w.providerId?(c=t.jsx(rt,{callbackURL:_,providerId:w.providerId,ssoSignIn:Oe.ssoSignIn,onAuthEvent:p}),e[5]=p,e[6]=_,e[7]=w.providerId,e[8]=c):c=e[8],c}if(x.enabled||j.enabled||D.enabled||q.enabled){let c;return e[9]!==v||e[10]!==f||e[11]!==u||e[12]!==r||e[13]!==k||e[14]!==d||e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==m||e[19]!==b?(c=t.jsx(at,{redirectUrl:l,callbackUrl:r,title:m,subtitle:i,brand:u,copy:d,variant:b,allowedSocialProviders:f,allowPassword:v,onAuthEvent:p,actions:k}),e[9]=v,e[10]=f,e[11]=u,e[12]=r,e[13]=k,e[14]=d,e[15]=p,e[16]=l,e[17]=i,e[18]=m,e[19]=b,e[20]=c):c=e[20],c}let F;e[21]!==y?(F=y("common.authEntry.noLoginOptions"),e[21]=y,e[22]=F):F=e[22];let W;return e[23]!==F?(W=t.jsx("div",{children:F}),e[23]=F,e[24]=W):W=e[24],W}export{Te as A,mt as a};
1
+ import{a as $,c as ce,m as S,j as t,a3 as Ke,a4 as Ge,a5 as ke,r as N,e as te,E as M,B as se,I as ae,b as Fe,h as Ye}from"./index-B2vvUsuK.js";import{i as Je}from"./Fingerprint04-BpB7HSc7.js";import{e as Qe}from"./backoff-CrEUbyZT.js";import{d as Xe}from"./delay-CnY5UFtP.js";class Le extends Error{constructor(e,r){super(`Retrying exceeded the maxAttempts (${r}).`),this.name="RetryError",this.cause=e}}async function Ze(n,e){const{multiplier:r=2,maxTimeout:l=6e4,maxAttempts:g=5,minTimeout:m=1e3,jitter:i=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(g)||g<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${g}`);if(!Number.isFinite(r)||r<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${r}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(m)||m<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${m}`);if(m>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${m}', 'maxTimeout=${l}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let b=0;for(;;){d?.throwIfAborted();try{return await n()}catch(f){if(!u(f))throw f;if(b+1>=g)throw new Le(f,g);const v=Qe(l,m,b,r,i);await Xe(v,d?{signal:d}:void 0)}b++}}const Oe={submitEmailPassword:({mode:n,email:e,password:r,name:l})=>n==="sign_up"?$.signUp.email({email:e,password:r,name:l||""}):$.signIn.email({email:e,password:r}),requestPasswordReset:({email:n,redirectTo:e})=>$.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>$.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>$.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>$.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>$.signIn.sso({providerId:n,callbackURL:e}),passkeySignIn:()=>$.signIn.passkey(),onAuthenticated:n=>{window.location.href=n}};function et(n){const e=ce.c(25);let r,l,g,m,i,u,d,b;e[0]!==n?({length:g,className:r,containerClassName:l,slotClassName:i,pattern:u,inputMode:d,autoComplete:b,...m}=n,e[0]=n,e[1]=r,e[2]=l,e[3]=g,e[4]=m,e[5]=i,e[6]=u,e[7]=d,e[8]=b):(r=e[1],l=e[2],g=e[3],m=e[4],i=e[5],u=e[6],d=e[7],b=e[8]);const f=u===void 0?Ge:u,v=d===void 0?"numeric":d,p=b===void 0?"one-time-code":b;let h;e[9]!==l?(h=S("flex items-center gap-2 has-[:disabled]:opacity-50",l),e[9]=l,e[10]=h):h=e[10];let A;e[11]!==r?(A=S("disabled:cursor-not-allowed",r),e[11]=r,e[12]=A):A=e[12];let y;e[13]!==m||e[14]!==i?(y=x=>{const{slots:j}=x;return t.jsx(t.Fragment,{children:j.map((D,q)=>t.jsx(tt,{...D,invalid:m["aria-invalid"]===!0,className:i},q))})},e[13]=m,e[14]=i,e[15]=y):y=e[15];let w;return e[16]!==p||e[17]!==v||e[18]!==g||e[19]!==f||e[20]!==m||e[21]!==h||e[22]!==A||e[23]!==y?(w=t.jsx(Ke,{"data-slot":"input-otp",maxLength:g,pattern:f,inputMode:v,autoComplete:p,containerClassName:h,className:A,render:y,...m}),e[16]=p,e[17]=v,e[18]=g,e[19]=f,e[20]=m,e[21]=h,e[22]=A,e[23]=y,e[24]=w):w=e[24],w}function tt(n){const e=ce.c(13),{char:r,placeholderChar:l,hasFakeCaret:g,isActive:m,invalid:i,className:u}=n,d=m||void 0,b=i&&"bg-destructive/10 shadow-[inset_0_0_0_1px_var(--destructive)]";let f;e[0]!==u||e[1]!==b?(f=S("relative flex h-12 w-10 flex-1 items-center justify-center text-xl font-medium tabular-nums text-foreground transition-[background-color,box-shadow]","rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] shadow-edge","data-active:shadow-[inset_0_0_0_2px_var(--ring)]",b,u),e[0]=u,e[1]=b,e[2]=f):f=e[2];let v;e[3]!==r||e[4]!==l?(v=r??t.jsx("span",{className:"text-subtle-foreground",children:l}),e[3]=r,e[4]=l,e[5]=v):v=e[5];let p;e[6]!==g?(p=g&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"h-5 w-px animate-pulse bg-foreground"})}),e[6]=g,e[7]=p):p=e[7];let h;return e[8]!==d||e[9]!==f||e[10]!==v||e[11]!==p?(h=t.jsxs("div",{"data-slot":"input-otp-slot","data-active":d,className:f,children:[v,p]}),e[8]=d,e[9]=f,e[10]=v,e[11]=p,e[12]=h):h=e[12],h}const de="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",st={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",verifying:"Verifying...",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code",signInWithPasskey:"Sign in with a passkey"};function at({redirectUrl:n,callbackUrl:e="/",title:r,subtitle:l,brand:g,copy:m,variant:i="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:b,actions:f}){const{emailAndPassword:v,resetPassword:p,emailOtp:h,passkey:A,socialProviders:y}=ke(),w={...Oe,...f},x=s=>{try{b?.(s)}catch{}},j=i==="compact",D=u?y.providers.filter(s=>u.includes(s.name)):y.providers,q=y.enabled&&D.length>0,me=v.enabled&&(d||!h.enabled&&!q),_=y.enabled&&y.providers.length>0&&!q&&!h.enabled&&!me?y.providers:D,T=y.enabled&&_.length>0,k=v.enabled&&(d||!h.enabled&&!T),F=A.enabled&&d&&typeof globalThis.PublicKeyCredential<"u",W=T||F,[c,ne]=N.useState(""),[ie,Re]=N.useState(""),[ue,be]=N.useState(""),[ge,re]=N.useState(""),[Y,he]=N.useState(!1),[pe,$e]=N.useState(()=>h.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[C,B]=N.useState(""),[ve,we]=N.useState(!1),[Me,oe]=N.useState(null),a={...st,...m},z=N.useId(),V=`${z}-email`,H=`${z}-email-error`,ye=`${z}-name`,Ee=`${z}-password`,Se=`${z}-otp`,je=`${z}-otp-status`,I=pe==="signUp",R=pe==="forgotPassword",L=pe==="emailOtp",J=te({mutationFn:async({email:s,password:o,name:O})=>{try{const G=await w.submitEmailPassword({mode:I?"sign_up":"sign_in",email:s,password:o,name:O});if(G.error)throw new Error(G.error.message||(I?a.signUpFailed:a.signInFailed));return G}catch(G){throw G instanceof Error?G:new Error(a.authenticationFailed)}},onMutate:()=>{x({type:"started",method:"email_password",mode:I?"sign_up":"sign_in"})},onSuccess:()=>{x({type:"succeeded",method:"email_password",mode:I?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(n??e)},onError:s=>{x({type:"failed",method:"email_password",mode:I?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),M(I?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),Q=te({mutationFn:async({email:s})=>{const o=await w.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(o.error)throw new Error(o.error.message||a.resetEmailFailed);return o},onSuccess:()=>{M("password_reset_requested"),we(!0)},onError:s=>{M("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),U=te({mutationFn:async({email:s})=>{const o=await w.sendOtp({email:s});if(o.error)throw new Error(o.error.message||a.otpSendFailed);return o},onMutate:()=>{x({type:"started",method:"email_otp"})},onSuccess:()=>{x({type:"otp_sent",method:"email_otp"}),M("email_otp_sent"),he(!0)},onError:s=>{x({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),P=te({mutationFn:async({email:s,otp:o})=>{const O=await w.submitOtp({email:s,otp:o});if(O.error)throw new Error(O.error.message||a.invalidCode);return O},onMutate:()=>{x({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{x({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(n??e)},onError:s=>{re(""),x({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),X=te({mutationFn:async()=>{const s=await w.passkeySignIn();if(s.error){if(s.error.code==="AUTH_CANCELLED")return{cancelled:!0};throw new Error(s.error.message||a.authenticationFailed)}return{cancelled:!1}},onMutate:()=>{x({type:"started",method:"passkey"})},onSuccess:({cancelled:s})=>{s||(x({type:"succeeded",method:"passkey"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),w.onAuthenticated(n??e))},onError:s=>{x({type:"failed",method:"passkey",stage:"authenticate",error:s.message}),M("passkey_signin_failed",{error:s.message})}}),le=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),fe=()=>{c.trim()&&!le(c)&&B(a.invalidEmail)},We=s=>{if(s.preventDefault(),!le(c)){B(a.invalidEmail),x({type:"failed",method:"email_password",mode:I?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:ie,name:ue})},Ue=s=>{if(s.preventDefault(),!le(c)){B(a.invalidEmail);return}Q.mutate({email:c})},De=s=>{if(s.preventDefault(),!le(c)){B(a.invalidEmail),x({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}U.mutate({email:c})},Ne=s=>{P.isPending||P.mutate({email:c,otp:s})},qe=s=>{s.preventDefault(),ge.length===h.length&&Ne(ge)},Be=s=>{re(s),xe&&(U.reset(),P.reset())},Z=s=>o=>{s(o.target.value),Ie&&J.reset(),Ce&&Q.reset(),xe&&(U.reset(),P.reset()),s===ne&&C&&B("")},ee=s=>{$e(s),be(""),re(""),he(!1),B(""),we(!1),oe(null),J.reset(),Q.reset(),U.reset(),P.reset(),X.reset()},E=J.isPending||Q.isPending||U.isPending||P.isPending||X.isPending,Ie=J.error,Ce=Q.error,xe=U.error||P.error,K=I?c.trim()&&ie.trim()&&ue.trim():R||L?c.trim():c.trim()&&ie.trim(),ze=s=>{if(!s)return null;const o=s.message.toLowerCase();return o.includes("unauthorized")||o.includes("401")?a.invalidEmailOrPassword:o.includes("already exists")||o.includes("409")?a.accountExists:o.includes("network")||o.includes("fetch")?a.networkError:o.includes("rate limit")||o.includes("429")?a.tooManyAttempts:o.includes("invalid")&&o.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Pe=Ie||Ce||xe||Me||X.error,Ve=async s=>{x({type:"started",method:"social",provider:s}),oe(null),X.reset();try{const o=await w.socialSignIn({provider:s,callbackURL:n??e});if(o.error)throw new Error(o.error.message||a.authenticationFailed)}catch(o){const O=o instanceof Error?o.message:String(o);x({type:"failed",method:"social",provider:s,stage:"redirect",error:O}),M("social_signin_failed",{provider:s,error:O}),oe(o instanceof Error?o:new Error(O))}},He=R?a.resetPasswordTitle:L&&Y?a.verificationCodeTitle:r??a.welcomeTitle,Ae=R?a.resetPasswordSubtitle:L&&Y?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:S("grid w-full",j?"gap-5":"gap-10"),children:[g??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:S("font-medium",j?"text-xl leading-7":"text-2xl leading-8"),children:He}),Ae&&t.jsx("p",{className:S("text-muted-foreground",j?"text-sm leading-5":"text-base leading-6"),children:Ae})]}),Pe&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:ze(Pe)}),ve&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(L&&Y)&&W&&t.jsxs("div",{className:"grid gap-2",children:[T&&_.map(s=>t.jsxs(se,{type:"button",variant:"outline",size:j?"lg":"xl",disabled:E,onClick:()=>{Ve(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:S("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name)),F&&t.jsxs(se,{type:"button",variant:"outline",size:j?"lg":"xl",disabled:E,onClick:()=>{oe(null),X.mutate()},className:"w-full gap-3",children:[t.jsx(Je,{className:"h-5 w-5","aria-hidden":"true"}),a.signInWithPasskey]})]}),!R&&!(L&&Y)&&W&&(k||h.enabled)&&t.jsxs("div",{className:S("flex items-center gap-2.5",j?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:S("text-muted-foreground",j?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),L&&h.enabled&&t.jsx(t.Fragment,{children:Y?t.jsxs("form",{onSubmit:qe,className:"grid gap-2",children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:S("text-sm font-medium text-foreground",j&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(et,{id:Se,length:h.length,value:ge,onChange:Be,onComplete:Ne,autoFocus:!0,"aria-invalid":!!P.error,"aria-describedby":P.isPending?je:void 0}),t.jsx("p",{id:je,role:"status",className:S("text-sm text-muted-foreground",!P.isPending&&"sr-only"),children:P.isPending?a.verifying:""})]}),t.jsx("button",{type:"button",onClick:()=>{he(!1),re(""),U.reset(),P.reset()},disabled:E,className:"mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:De,className:S("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:V,className:S("text-sm font-medium text-foreground",j&&"sr-only"),children:a.emailLabel}),t.jsx(ae,{id:V,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:Z(ne),onBlur:fe,required:!0,disabled:E,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?H:void 0,className:"h-11"}),C&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive",children:C})]}),t.jsx(se,{type:"submit",size:j?"lg":"xl",disabled:E||!K,className:S(j?"sm:w-auto":"w-full"),children:E?a.sending:a.sendCode})]})}),R&&k&&!ve&&t.jsxs("form",{onSubmit:Ue,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:V,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(ae,{id:V,type:"email",placeholder:"you@example.com",value:c,onChange:Z(ne),onBlur:fe,required:!0,disabled:E,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?H:void 0,className:"h-11"}),C&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsx(se,{type:"submit",disabled:E||!K,className:"w-full font-semibold",size:"xl",children:E?a.sending:a.sendResetLink})]}),!R&&!L&&k&&t.jsxs("form",{onSubmit:We,className:"grid gap-5",children:[I&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ye,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(ae,{id:ye,type:"text",placeholder:a.namePlaceholder,value:ue,onChange:Z(be),required:!0,disabled:E,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:V,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(ae,{id:V,type:"email",placeholder:"you@example.com",value:c,onChange:Z(ne),onBlur:fe,required:!0,disabled:E,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?H:void 0,className:"h-11"}),C&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!I&&p.enabled&&t.jsx("button",{type:"button",onClick:()=>ee("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(ae,{id:Ee,type:"password",placeholder:"••••••••",value:ie,onChange:Z(Re),required:!0,disabled:E,autoComplete:I?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:S("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",K?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:S("p-1",!K&&"pointer-events-none"),children:t.jsx(se,{type:"submit",disabled:E||!K,className:S("w-full font-semibold"),size:"xl","aria-hidden":!K,children:E?I?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>ee("signIn"),disabled:E,className:de,children:a.backToSignIn}):L&&k?t.jsx("button",{type:"button",onClick:()=>ee("signIn"),disabled:E,className:de,children:a.signInWithPassword}):!L&&k?t.jsxs(t.Fragment,{children:[I?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>ee(I?"signIn":"signUp"),disabled:E,className:de,children:I?a.signIn:a.signUp}),h.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>ee("emailOtp"),disabled:E,className:de,children:a.signInWithEmailCode})]})]}):null})]})}class _e{constructor(e){this.response=e}response}function nt(n){return n.startsWith("/")&&!n.startsWith("//")&&!n.startsWith("/\\")?n:"/"}function it({redirectTo:n,onAuthEvent:e}){const r=Fe(),[l,g]=N.useState(null),m=N.useEffectEvent(i=>{try{e?.(i)}catch{}});return N.useEffect(()=>{let i=!1;return(async()=>{m({type:"started",method:"local"});try{let u;try{u=await Ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new _e(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Le&&d.cause instanceof _e)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||r("common.authEntry.autoLoginFailed"))}i||(m({type:"succeeded",method:"local"}),window.location.href=nt(n))}catch(u){i||(m({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),g(u instanceof Error?u.message:r("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:r("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:r("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=ce.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ye,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:r,onAuthEvent:l}){const g=N.useEffectEvent(i=>{try{l?.(i)}catch{}}),m=N.useEffectEvent(r);return N.useEffect(()=>{(async()=>{g({type:"started",method:"sso",provider:e});try{const i=await m({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){g({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function mt(n){const e=ce.c(25),{callbackUrl:r,redirectUrl:l,allowAutoLogin:g,title:m,subtitle:i,brand:u,copy:d,variant:b,allowedSocialProviders:f,allowPassword:v,onAuthEvent:p,onAuthenticated:h}=n,A=g===void 0?!0:g,y=Fe(),{sso:w,emailAndPassword:x,magicLink:j,emailOtp:D,socialProviders:q,localMode:me}=ke(),_=l||r;let T;e[0]!==h?(T=h?{onAuthenticated:h}:void 0,e[0]=h,e[1]=T):T=e[1];const k=T;if(me&&A){let c;return e[2]!==p||e[3]!==_?(c=t.jsx(it,{redirectTo:_,onAuthEvent:p}),e[2]=p,e[3]=_,e[4]=c):c=e[4],c}if(w.enabled){let c;return e[5]!==p||e[6]!==_||e[7]!==w.providerId?(c=t.jsx(rt,{callbackURL:_,providerId:w.providerId,ssoSignIn:Oe.ssoSignIn,onAuthEvent:p}),e[5]=p,e[6]=_,e[7]=w.providerId,e[8]=c):c=e[8],c}if(x.enabled||j.enabled||D.enabled||q.enabled){let c;return e[9]!==v||e[10]!==f||e[11]!==u||e[12]!==r||e[13]!==k||e[14]!==d||e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==m||e[19]!==b?(c=t.jsx(at,{redirectUrl:l,callbackUrl:r,title:m,subtitle:i,brand:u,copy:d,variant:b,allowedSocialProviders:f,allowPassword:v,onAuthEvent:p,actions:k}),e[9]=v,e[10]=f,e[11]=u,e[12]=r,e[13]=k,e[14]=d,e[15]=p,e[16]=l,e[17]=i,e[18]=m,e[19]=b,e[20]=c):c=e[20],c}let F;e[21]!==y?(F=y("common.authEntry.noLoginOptions"),e[21]=y,e[22]=F):F=e[22];let W;return e[23]!==F?(W=t.jsx("div",{children:F}),e[23]=F,e[24]=W):W=e[24],W}export{Te as A,mt as a};
@@ -1 +1 @@
1
- import{c as g,m as p,j as f}from"./index-C0zcxte6.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
1
+ import{c as g,m as p,j as f}from"./index-B2vvUsuK.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
@@ -1 +1 @@
1
- import{a as u}from"./mcp-oauth-_kccjx1r.js";import{i as p}from"./mcp-oauth-CutBZZPD.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await p({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await u({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
1
+ import{a as u}from"./mcp-oauth-ciX7wK5f.js";import{i as p}from"./mcp-oauth-DESKCBIm.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await p({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await u({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
@@ -1 +1 @@
1
- import{c as Q,b as U,r as ee,m as G,j as t,X as te,B as se,_ as ie,Z as ne,Y as ae,aJ as oe,aK as le,aL as re,aM as ce,b9 as me,aN as ue,aO as de,aP as fe}from"./index-C0zcxte6.js";import{B as ge}from"./badge-BwjML1Ui.js";import{s as xe}from"./UserCheck01-Bm_tmvVG.js";import{a as pe}from"./SwitchHorizontal01-j9pFk8iK.js";import{s as he}from"./Trash01-CGA1V9gl.js";import{i as je}from"./Zap-BVwxluJ4.js";import{a as _e}from"./repository-binding-BSsS-pLT.js";import{A as we}from"./agent-icon-DFdDsb4O.js";import{a as ve}from"./use-automations-DJu_bQMu.js";function Be(c){const e=Q.c(89),{automation:s,showAgent:o,onClick:n}=c,i=U(),{remove:a}=ve(),[r,J]=ee.useState(!1),l=_e(o?s.virtual_mcp_id:void 0);let E;e[0]!==s.id||e[1]!==a?(E=()=>{a.mutate(s.id),J(!1)},e[0]=s.id,e[1]=a,e[2]=E):E=e[2];const V=E;let F;e[3]!==n?(F=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=F):F=e[4];const X=F,Y=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==Y?(u=G("inline-block size-2 rounded-full shrink-0",Y),e[5]=Y,e[6]=u):u=e[6];const Z=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==Z?(d=i(Z),e[7]=i,e[8]=Z,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==l?.icon||e[14]!==l?.title||e[15]!==s.name||e[16]!==o?(g=o&&t.jsx(we,{icon:l?.icon??null,name:l?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=l?.icon,e[14]=l?.title,e[15]=s.name,e[16]=o,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ge,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==l||e[24]!==o?(h=o&&l&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[23]=l,e[24]=o,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let _;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(_=t.jsx(De,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=_):_=e[32];let w;e[33]!==j||e[34]!==_?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,_]}),e[33]=j,e[34]=_,e[35]=w):w=e[35];const q=s.system_key&&"invisible";let v;e[36]!==q?(v=G("shrink-0",q),e[36]=q,e[37]=v):v=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(te,{asChild:!0,children:t.jsx(se,{variant:"ghost",size:"icon",className:"opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(pe,{size:16})})}),e[38]=K):K=e[38];let $,I;e[39]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),J(!0)},I=t.jsx(he,{size:16}),e[39]=$,e[40]=I):($=e[39],I=e[40]);let y;e[41]!==i?(y=i("automations.automationListRow.delete"),e[41]=i,e[42]=y):y=e[42];let A;e[43]!==y?(A=t.jsxs(ie,{children:[K,t.jsx(ne,{align:"end",children:t.jsxs(ae,{variant:"destructive",onClick:$,children:[I,y]})})]}),e[43]=y,e[44]=A):A=e[44];let D;e[45]!==v||e[46]!==A?(D=t.jsx("div",{onClick:Ae,onKeyDown:ye,role:"presentation",className:v,children:A}),e[45]=v,e[46]=A,e[47]=D):D=e[47];let N;e[48]!==X||e[49]!==n||e[50]!==w||e[51]!==D||e[52]!==f||e[53]!==g?(N=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:X,className:"group w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-accent transition-colors cursor-pointer focus-ring",children:[f,g,w,D]}),e[48]=X,e[49]=n,e[50]=w,e[51]=D,e[52]=f,e[53]=g,e[54]=N):N=e[54];let R;e[55]!==i?(R=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=R):R=e[56];let k;e[57]!==R?(k=t.jsx(oe,{children:R}),e[57]=R,e[58]=k):k=e[58];let b;e[59]!==s.name||e[60]!==i?(b=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=b):b=e[61];let L;e[62]!==b?(L=t.jsx(le,{children:b}),e[62]=b,e[63]=L):L=e[63];let C;e[64]!==k||e[65]!==L?(C=t.jsxs(re,{children:[k,L]}),e[64]=k,e[65]=L,e[66]=C):C=e[66];let P;e[67]!==i?(P=i("automations.automationListRow.cancel"),e[67]=i,e[68]=P):P=e[68];let T;e[69]!==P?(T=t.jsx(ce,{children:P}),e[69]=P,e[70]=T):T=e[70];const W=a.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==V||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(me,{onClick:V,disabled:W,variant:"destructive",children:z}),e[73]=V,e[74]=a.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==T||e[78]!==B?(M=t.jsxs(ue,{children:[T,B]}),e[77]=T,e[78]=B,e[79]=M):M=e[79];let O;e[80]!==C||e[81]!==M?(O=t.jsxs(de,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=O):O=e[82];let S;e[83]!==r||e[84]!==O?(S=t.jsx(fe,{open:r,onOpenChange:J,children:O}),e[83]=r,e[84]=O,e[85]=S):S=e[85];let H;return e[86]!==N||e[87]!==S?(H=t.jsxs(t.Fragment,{children:[N,S]}),e[86]=N,e[87]=S,e[88]=H):H=e[88],H}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=Q.c(8),{triggerCount:s,nextRunAt:o}=c,n=U();if(s===0){let a;e[0]!==n?(a=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=r):r=e[3],r}let i;return e[4]!==o||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:o?t.jsxs(t.Fragment,{children:[t.jsx(xe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(o).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(je,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:s===1?n("automations.automationListRow.triggersOne"):n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=o,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Be as A};
1
+ import{c as Q,b as U,r as ee,m as G,j as t,X as te,B as se,_ as ie,Z as ne,Y as ae,aJ as oe,aK as le,aL as re,aM as ce,b9 as me,aN as ue,aO as de,aP as fe}from"./index-B2vvUsuK.js";import{B as ge}from"./badge-CaU7DsCB.js";import{s as xe}from"./UserCheck01-CpLKejEQ.js";import{a as pe}from"./SwitchHorizontal01-NAHL2C3Y.js";import{s as he}from"./Trash01-Br_8Dd8k.js";import{i as je}from"./Zap-B1JA6VL5.js";import{a as _e}from"./repository-binding-DC98qYdg.js";import{A as we}from"./agent-icon-ButaHLCM.js";import{a as ve}from"./use-automations-UppgD9x4.js";function Be(c){const e=Q.c(89),{automation:s,showAgent:o,onClick:n}=c,i=U(),{remove:a}=ve(),[r,J]=ee.useState(!1),l=_e(o?s.virtual_mcp_id:void 0);let E;e[0]!==s.id||e[1]!==a?(E=()=>{a.mutate(s.id),J(!1)},e[0]=s.id,e[1]=a,e[2]=E):E=e[2];const V=E;let F;e[3]!==n?(F=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=F):F=e[4];const X=F,Y=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==Y?(u=G("inline-block size-2 rounded-full shrink-0",Y),e[5]=Y,e[6]=u):u=e[6];const Z=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==Z?(d=i(Z),e[7]=i,e[8]=Z,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==l?.icon||e[14]!==l?.title||e[15]!==s.name||e[16]!==o?(g=o&&t.jsx(we,{icon:l?.icon??null,name:l?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=l?.icon,e[14]=l?.title,e[15]=s.name,e[16]=o,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ge,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==l||e[24]!==o?(h=o&&l&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[23]=l,e[24]=o,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let _;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(_=t.jsx(De,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=_):_=e[32];let w;e[33]!==j||e[34]!==_?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,_]}),e[33]=j,e[34]=_,e[35]=w):w=e[35];const q=s.system_key&&"invisible";let v;e[36]!==q?(v=G("shrink-0",q),e[36]=q,e[37]=v):v=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(te,{asChild:!0,children:t.jsx(se,{variant:"ghost",size:"icon",className:"opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(pe,{size:16})})}),e[38]=K):K=e[38];let $,I;e[39]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),J(!0)},I=t.jsx(he,{size:16}),e[39]=$,e[40]=I):($=e[39],I=e[40]);let y;e[41]!==i?(y=i("automations.automationListRow.delete"),e[41]=i,e[42]=y):y=e[42];let A;e[43]!==y?(A=t.jsxs(ie,{children:[K,t.jsx(ne,{align:"end",children:t.jsxs(ae,{variant:"destructive",onClick:$,children:[I,y]})})]}),e[43]=y,e[44]=A):A=e[44];let D;e[45]!==v||e[46]!==A?(D=t.jsx("div",{onClick:Ae,onKeyDown:ye,role:"presentation",className:v,children:A}),e[45]=v,e[46]=A,e[47]=D):D=e[47];let N;e[48]!==X||e[49]!==n||e[50]!==w||e[51]!==D||e[52]!==f||e[53]!==g?(N=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:X,className:"group w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-accent transition-colors cursor-pointer focus-ring",children:[f,g,w,D]}),e[48]=X,e[49]=n,e[50]=w,e[51]=D,e[52]=f,e[53]=g,e[54]=N):N=e[54];let R;e[55]!==i?(R=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=R):R=e[56];let k;e[57]!==R?(k=t.jsx(oe,{children:R}),e[57]=R,e[58]=k):k=e[58];let b;e[59]!==s.name||e[60]!==i?(b=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=b):b=e[61];let L;e[62]!==b?(L=t.jsx(le,{children:b}),e[62]=b,e[63]=L):L=e[63];let C;e[64]!==k||e[65]!==L?(C=t.jsxs(re,{children:[k,L]}),e[64]=k,e[65]=L,e[66]=C):C=e[66];let P;e[67]!==i?(P=i("automations.automationListRow.cancel"),e[67]=i,e[68]=P):P=e[68];let T;e[69]!==P?(T=t.jsx(ce,{children:P}),e[69]=P,e[70]=T):T=e[70];const W=a.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==V||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(me,{onClick:V,disabled:W,variant:"destructive",children:z}),e[73]=V,e[74]=a.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==T||e[78]!==B?(M=t.jsxs(ue,{children:[T,B]}),e[77]=T,e[78]=B,e[79]=M):M=e[79];let O;e[80]!==C||e[81]!==M?(O=t.jsxs(de,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=O):O=e[82];let S;e[83]!==r||e[84]!==O?(S=t.jsx(fe,{open:r,onOpenChange:J,children:O}),e[83]=r,e[84]=O,e[85]=S):S=e[85];let H;return e[86]!==N||e[87]!==S?(H=t.jsxs(t.Fragment,{children:[N,S]}),e[86]=N,e[87]=S,e[88]=H):H=e[88],H}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=Q.c(8),{triggerCount:s,nextRunAt:o}=c,n=U();if(s===0){let a;e[0]!==n?(a=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=r):r=e[3],r}let i;return e[4]!==o||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:o?t.jsxs(t.Fragment,{children:[t.jsx(xe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(o).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(je,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:s===1?n("automations.automationListRow.triggersOne"):n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=o,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Be as A};
@@ -1 +1 @@
1
- import{c as Y,b as X,a6 as lt,T as it,am as rt,eN as ct,K as tt,j as s,m as ut,i as mt,gG as dt}from"./index-C0zcxte6.js";import{u as ft}from"./useInfiniteQuery-kEKcQUWO.js";import{b as xt}from"./use-connection-BHZBfHKD.js";import{u as pt}from"./use-mcp-client-mPNZ5wA-.js";import{u as gt}from"./repository-binding-BSsS-pLT.js";import{b as ht,a as Rt}from"./sheet-C0xCH2mH.js";import{e as jt,a as Nt,b as st,T as G,d as Tt,c as Q}from"./table-Uzyje8VX.js";import{E as et}from"./empty-state-DMyh10sW.js";import{u as bt}from"./use-id-selection-vLaYBEH-.js";import{u as St}from"./use-infinite-scroll-BqVS1RSu.js";import{g as vt}from"./task-status-CJ3X0NFO.js";import{e as Ct}from"./use-automations-DJu_bQMu.js";import{T as wt,f as at,a as nt}from"./thread-sheet-body-DqQKksps.js";const W=50;function J(m){const t=Y.c(10),{title:r,value:c,subtitle:e}=m;let o;t[0]!==r?(o=s.jsx("span",{className:"text-sm text-foreground/70",children:r}),t[0]=r,t[1]=o):o=t[1];let n;t[2]!==c?(n=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:c}),t[2]=c,t[3]=n):n=t[3];let a;t[4]!==e?(a=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==n||t[8]!==a?(l=s.jsxs(dt,{className:"pt-4 px-4 pb-5 gap-1",children:[o,n,a]}),t[6]=o,t[7]=n,t[8]=a,t[9]=l):l=t[9],l}function yt(m){const t=Y.c(45),{automationId:r,range:c}=m,e=X(),{data:o,isLoading:n}=Ct(r,c),a=o?.runs,l=o?.usage;let P;t[0]!==a?(P=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",t[0]=a,t[1]=P):P=t[1];const C=P;let w;t[2]!==e||t[3]!==l?(w=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=w):w=t[4];const h=w;let b;t[5]!==e?(b=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=b):b=t[6];let d;t[7]!==n||t[8]!==a?.total?(d=n?"…":a?.total.toLocaleString()??"0",t[7]=n,t[8]=a?.total,t[9]=d):d=t[9];let f;t[10]!==a||t[11]!==e?(f=a?`${a.completed} ${e("automations.automationRuns.ok")} · ${a.failed} ${e("automations.automationRuns.failed")}${a.inProgress>0?` · ${a.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=a,t[11]=e,t[12]=f):f=t[12];let x;t[13]!==b||t[14]!==d||t[15]!==f?(x=s.jsx(J,{title:b,value:d,subtitle:f}),t[13]=b,t[14]=d,t[15]=f,t[16]=x):x=t[16];let j;t[17]!==e?(j=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=j):j=t[18];const y=n?"…":C;let S;t[19]!==j||t[20]!==y?(S=s.jsx(J,{title:j,value:y}),t[19]=j,t[20]=y,t[21]=S):S=t[21];let N;t[22]!==e?(N=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=N):N=t[23];let u;t[24]!==n||t[25]!==l?.totalTokens?(u=n?"…":at(l?.totalTokens??0),t[24]=n,t[25]=l?.totalTokens,t[26]=u):u=t[26];let v;t[27]!==N||t[28]!==u||t[29]!==h?(v=s.jsx(J,{title:N,value:u,subtitle:h}),t[27]=N,t[28]=u,t[29]=h,t[30]=v):v=t[30];let i;t[31]!==e?(i=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=i):i=t[32];let p;t[33]!==n||t[34]!==l?(p=n?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=n,t[34]=l,t[35]=p):p=t[35];let T;t[36]!==i||t[37]!==p||t[38]!==h?(T=s.jsx(J,{title:i,value:p,subtitle:h}),t[36]=i,t[37]=p,t[38]=h,t[39]=T):T=t[39];let g;return t[40]!==v||t[41]!==T||t[42]!==x||t[43]!==S?(g=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[x,S,v,T]}),t[40]=v,t[41]=T,t[42]=x,t[43]=S,t[44]=g):g=t[44],g}function It(m){const t=Y.c(57),{run:r,usage:c,onClick:e,lastRowRef:o}=m,n=X();let a,l;if(t[0]!==r.created_at){const k=new Date(r.created_at);a=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=r.created_at,t[1]=a,t[2]=l}else a=t[1],l=t[2];const P=l;let C,w,h,b,d,f,x,j,y,S,N;if(t[3]!==o||t[4]!==e||t[5]!==r.status||t[6]!==r.title||t[7]!==n){const k=vt(r.status),$=k.icon;w=st,y=o,S="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",N=e,t[19]!==r.title?(h=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:r.title})}),t[19]=r.title,t[20]=h):h=t[20],C=Q,j="w-28 px-3",f="flex items-center gap-1.5",x=s.jsx($,{size:14,className:k.iconClassName}),b=ut("text-sm",k.labelColor),d=n(k.labelKey),t[3]=o,t[4]=e,t[5]=r.status,t[6]=r.title,t[7]=n,t[8]=C,t[9]=w,t[10]=h,t[11]=b,t[12]=d,t[13]=f,t[14]=x,t[15]=j,t[16]=y,t[17]=S,t[18]=N}else C=t[8],w=t[9],h=t[10],b=t[11],d=t[12],f=t[13],x=t[14],j=t[15],y=t[16],S=t[17],N=t[18];let u;t[21]!==b||t[22]!==d?(u=s.jsx("span",{className:b,children:d}),t[21]=b,t[22]=d,t[23]=u):u=t[23];let v;t[24]!==u||t[25]!==f||t[26]!==x?(v=s.jsxs("div",{className:f,children:[x,u]}),t[24]=u,t[25]=f,t[26]=x,t[27]=v):v=t[27];let i;t[28]!==C||t[29]!==v||t[30]!==j?(i=s.jsx(C,{className:j,children:v}),t[28]=C,t[29]=v,t[30]=j,t[31]=i):i=t[31];let p;t[32]!==c?(p=c?at(c.totalTokens):"—",t[32]=c,t[33]=p):p=t[33];let T;t[34]!==p?(T=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:p}),t[34]=p,t[35]=T):T=t[35];let g;t[36]!==c?(g=c&&c.costUsd>0?nt(c.costUsd):"—",t[36]=c,t[37]=g):g=t[37];let I;t[38]!==g?(I=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:g}),t[38]=g,t[39]=I):I=t[39];let D;t[40]!==a?(D=s.jsx("div",{children:a}),t[40]=a,t[41]=D):D=t[41];let _;t[42]!==P?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:P}),t[42]=P,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let M;return t[47]!==w||t[48]!==h||t[49]!==i||t[50]!==T||t[51]!==I||t[52]!==E||t[53]!==y||t[54]!==S||t[55]!==N?(M=s.jsxs(w,{ref:y,className:S,onClick:N,children:[h,i,T,I,E]}),t[47]=w,t[48]=h,t[49]=i,t[50]=T,t[51]=I,t[52]=E,t[53]=y,t[54]=S,t[55]=N,t[56]=M):M=t[56],M}function Vt(m){const t=Y.c(73),{automationId:r,triggerIds:c,range:e}=m,o=X(),{org:n,locator:a}=lt();let l;t[0]!==n.id||t[1]!==n.slug?(l={connectionId:it,orgId:n.id,orgSlug:n.slug},t[0]=n.id,t[1]=n.slug,t[2]=l):l=t[2];const P=pt(l),C=rt(),w=xt(),h=gt(),{data:b}=ct(),d=c.length>0;let f;t[3]!==r||t[4]!==n.id||t[5]!==c?(f=tt.automationRuns(n.id,r,c),t[3]=r,t[4]=n.id,t[5]=c,t[6]=f):f=t[6];let x;t[7]!==C||t[8]!==c?(x=async U=>{const{pageParam:z}=U,ot=z===void 0?0:z;return await C.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:c}})},t[7]=C,t[8]=c,t[9]=x):x=t[9];let j;t[10]!==d||t[11]!==f||t[12]!==x?(j={queryKey:f,queryFn:x,initialPageParam:0,getNextPageParam:Dt,enabled:d,staleTime:3e4},t[10]=d,t[11]=f,t[12]=x,t[13]=j):j=t[13];const{data:y,fetchNextPage:S,hasNextPage:N,isFetchingNextPage:u,isLoading:v}=ft(j);let i,p,T,g;t[14]!==y?.pages||t[15]!==a||t[16]!==e?(i=(y?.pages??[]).flatMap(kt),g=i.map(_t),T=mt,p=tt.monitoringThreadUsage(a,JSON.stringify({ids:g,...e})),t[14]=y?.pages,t[15]=a,t[16]=e,t[17]=i,t[18]=p,t[19]=T,t[20]=g):(i=t[17],p=t[18],T=t[19],g=t[20]);let I;t[21]!==e||t[22]!==C||t[23]!==g?(I=async()=>await C.call("MONITORING_THREAD_USAGE",{threadIds:g,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=C,t[23]=g,t[24]=I):I=t[24];const D=g.length>0;let _;t[25]!==p||t[26]!==I||t[27]!==D?(_={queryKey:p,queryFn:I,enabled:D,staleTime:3e4},t[25]=p,t[26]=I,t[27]=D,t[28]=_):_=t[28];const{data:E}=T(_);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(Pt)),t[29]=E?.items,t[30]=M):M=t[30];const k=M;let $;t[31]!==S||t[32]!==N||t[33]!==u?($=()=>{N&&!u&&S()},t[31]=S,t[32]=N,t[33]=u,t[34]=$):$=t[34];const Z=St($,N??!1,u),R=bt(i),V=R.selected;let L;t[35]!==r||t[36]!==e?(L=s.jsx(yt,{automationId:r,range:e}),t[35]=r,t[36]=e,t[37]=L):L=t[37];let A;t[38]!==d||t[39]!==v||t[40]!==Z||t[41]!==i||t[42]!==R||t[43]!==o||t[44]!==k?(A=d?v?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingRuns")}):i.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noRunsTitle"),description:o("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 font-normal text-meta",children:o("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:o("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:o("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:i.map((U,z)=>s.jsx(It,{run:U,usage:k.get(U.id),onClick:()=>R.select(U.id),lastRowRef:z===i.length-1?Z:void 0},U.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noStartersTitle"),description:o("automations.automationRuns.noStartersDescription")})}),t[38]=d,t[39]=v,t[40]=Z,t[41]=i,t[42]=R,t[43]=o,t[44]=k,t[45]=A):A=t[45];let H;t[46]!==u||t[47]!==o?(H=u&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingMore")}),t[46]=u,t[47]=o,t[48]=H):H=t[48];let O;t[49]!==R?(O=U=>{U||R.close()},t[49]=R,t[50]=O):O=t[50];let K;t[51]!==w||t[52]!==h||t[53]!==P||t[54]!==a||t[55]!==b||t[56]!==i||t[57]!==V||t[58]!==R.index||t[59]!==R.next||t[60]!==R.prev?(K=V&&s.jsx(wt,{thread:V,client:P,locator:a,connections:w,virtualMcps:h,members:b,nav:{index:R.index,total:i.length,onPrev:R.prev,onNext:R.next}}),t[51]=w,t[52]=h,t[53]=P,t[54]=a,t[55]=b,t[56]=i,t[57]=V,t[58]=R.index,t[59]=R.next,t[60]=R.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==R.isOpen||t[65]!==O||t[66]!==q?(F=s.jsx(ht,{open:R.isOpen,onOpenChange:O,children:q}),t[64]=R.isOpen,t[65]=O,t[66]=q,t[67]=F):F=t[67];let B;return t[68]!==L||t[69]!==A||t[70]!==H||t[71]!==F?(B=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,A,H,F]}),t[68]=L,t[69]=A,t[70]=H,t[71]=F,t[72]=B):B=t[72],B}function Pt(m){return[m.threadId,{calls:m.calls,inputTokens:m.inputTokens,outputTokens:m.outputTokens,totalTokens:m.totalTokens,costUsd:m.costUsd}]}function _t(m){return m.id}function kt(m){return m.items??[]}function Dt(m,t){const r=m,c=t;if(!((r?.items?.length??0)<W))return c.length*W}export{Vt as A};
1
+ import{c as Y,b as X,a6 as lt,T as it,am as rt,eN as ct,K as tt,j as s,m as ut,i as mt,gG as dt}from"./index-B2vvUsuK.js";import{u as ft}from"./useInfiniteQuery-EaWUgCtN.js";import{b as xt}from"./use-connection-BlQSFvXZ.js";import{u as pt}from"./use-mcp-client-C25DU1dz.js";import{u as gt}from"./repository-binding-DC98qYdg.js";import{b as ht,a as Rt}from"./sheet-DsBIaG5c.js";import{e as jt,a as Nt,b as st,T as G,d as Tt,c as Q}from"./table-_0cphCuz.js";import{E as et}from"./empty-state--1H9mx7y.js";import{u as bt}from"./use-id-selection-B-V9WQKU.js";import{u as St}from"./use-infinite-scroll-D0fDDIyn.js";import{g as vt}from"./task-status-Dm8lN6h7.js";import{e as Ct}from"./use-automations-UppgD9x4.js";import{T as wt,f as at,a as nt}from"./thread-sheet-body-BATHVA9a.js";const W=50;function J(m){const t=Y.c(10),{title:r,value:c,subtitle:e}=m;let o;t[0]!==r?(o=s.jsx("span",{className:"text-sm text-foreground/70",children:r}),t[0]=r,t[1]=o):o=t[1];let n;t[2]!==c?(n=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:c}),t[2]=c,t[3]=n):n=t[3];let a;t[4]!==e?(a=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==n||t[8]!==a?(l=s.jsxs(dt,{className:"pt-4 px-4 pb-5 gap-1",children:[o,n,a]}),t[6]=o,t[7]=n,t[8]=a,t[9]=l):l=t[9],l}function yt(m){const t=Y.c(45),{automationId:r,range:c}=m,e=X(),{data:o,isLoading:n}=Ct(r,c),a=o?.runs,l=o?.usage;let P;t[0]!==a?(P=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",t[0]=a,t[1]=P):P=t[1];const C=P;let w;t[2]!==e||t[3]!==l?(w=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=w):w=t[4];const h=w;let b;t[5]!==e?(b=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=b):b=t[6];let d;t[7]!==n||t[8]!==a?.total?(d=n?"…":a?.total.toLocaleString()??"0",t[7]=n,t[8]=a?.total,t[9]=d):d=t[9];let f;t[10]!==a||t[11]!==e?(f=a?`${a.completed} ${e("automations.automationRuns.ok")} · ${a.failed} ${e("automations.automationRuns.failed")}${a.inProgress>0?` · ${a.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=a,t[11]=e,t[12]=f):f=t[12];let x;t[13]!==b||t[14]!==d||t[15]!==f?(x=s.jsx(J,{title:b,value:d,subtitle:f}),t[13]=b,t[14]=d,t[15]=f,t[16]=x):x=t[16];let j;t[17]!==e?(j=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=j):j=t[18];const y=n?"…":C;let S;t[19]!==j||t[20]!==y?(S=s.jsx(J,{title:j,value:y}),t[19]=j,t[20]=y,t[21]=S):S=t[21];let N;t[22]!==e?(N=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=N):N=t[23];let u;t[24]!==n||t[25]!==l?.totalTokens?(u=n?"…":at(l?.totalTokens??0),t[24]=n,t[25]=l?.totalTokens,t[26]=u):u=t[26];let v;t[27]!==N||t[28]!==u||t[29]!==h?(v=s.jsx(J,{title:N,value:u,subtitle:h}),t[27]=N,t[28]=u,t[29]=h,t[30]=v):v=t[30];let i;t[31]!==e?(i=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=i):i=t[32];let p;t[33]!==n||t[34]!==l?(p=n?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=n,t[34]=l,t[35]=p):p=t[35];let T;t[36]!==i||t[37]!==p||t[38]!==h?(T=s.jsx(J,{title:i,value:p,subtitle:h}),t[36]=i,t[37]=p,t[38]=h,t[39]=T):T=t[39];let g;return t[40]!==v||t[41]!==T||t[42]!==x||t[43]!==S?(g=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[x,S,v,T]}),t[40]=v,t[41]=T,t[42]=x,t[43]=S,t[44]=g):g=t[44],g}function It(m){const t=Y.c(57),{run:r,usage:c,onClick:e,lastRowRef:o}=m,n=X();let a,l;if(t[0]!==r.created_at){const k=new Date(r.created_at);a=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=r.created_at,t[1]=a,t[2]=l}else a=t[1],l=t[2];const P=l;let C,w,h,b,d,f,x,j,y,S,N;if(t[3]!==o||t[4]!==e||t[5]!==r.status||t[6]!==r.title||t[7]!==n){const k=vt(r.status),$=k.icon;w=st,y=o,S="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",N=e,t[19]!==r.title?(h=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:r.title})}),t[19]=r.title,t[20]=h):h=t[20],C=Q,j="w-28 px-3",f="flex items-center gap-1.5",x=s.jsx($,{size:14,className:k.iconClassName}),b=ut("text-sm",k.labelColor),d=n(k.labelKey),t[3]=o,t[4]=e,t[5]=r.status,t[6]=r.title,t[7]=n,t[8]=C,t[9]=w,t[10]=h,t[11]=b,t[12]=d,t[13]=f,t[14]=x,t[15]=j,t[16]=y,t[17]=S,t[18]=N}else C=t[8],w=t[9],h=t[10],b=t[11],d=t[12],f=t[13],x=t[14],j=t[15],y=t[16],S=t[17],N=t[18];let u;t[21]!==b||t[22]!==d?(u=s.jsx("span",{className:b,children:d}),t[21]=b,t[22]=d,t[23]=u):u=t[23];let v;t[24]!==u||t[25]!==f||t[26]!==x?(v=s.jsxs("div",{className:f,children:[x,u]}),t[24]=u,t[25]=f,t[26]=x,t[27]=v):v=t[27];let i;t[28]!==C||t[29]!==v||t[30]!==j?(i=s.jsx(C,{className:j,children:v}),t[28]=C,t[29]=v,t[30]=j,t[31]=i):i=t[31];let p;t[32]!==c?(p=c?at(c.totalTokens):"—",t[32]=c,t[33]=p):p=t[33];let T;t[34]!==p?(T=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:p}),t[34]=p,t[35]=T):T=t[35];let g;t[36]!==c?(g=c&&c.costUsd>0?nt(c.costUsd):"—",t[36]=c,t[37]=g):g=t[37];let I;t[38]!==g?(I=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:g}),t[38]=g,t[39]=I):I=t[39];let D;t[40]!==a?(D=s.jsx("div",{children:a}),t[40]=a,t[41]=D):D=t[41];let _;t[42]!==P?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:P}),t[42]=P,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let M;return t[47]!==w||t[48]!==h||t[49]!==i||t[50]!==T||t[51]!==I||t[52]!==E||t[53]!==y||t[54]!==S||t[55]!==N?(M=s.jsxs(w,{ref:y,className:S,onClick:N,children:[h,i,T,I,E]}),t[47]=w,t[48]=h,t[49]=i,t[50]=T,t[51]=I,t[52]=E,t[53]=y,t[54]=S,t[55]=N,t[56]=M):M=t[56],M}function Vt(m){const t=Y.c(73),{automationId:r,triggerIds:c,range:e}=m,o=X(),{org:n,locator:a}=lt();let l;t[0]!==n.id||t[1]!==n.slug?(l={connectionId:it,orgId:n.id,orgSlug:n.slug},t[0]=n.id,t[1]=n.slug,t[2]=l):l=t[2];const P=pt(l),C=rt(),w=xt(),h=gt(),{data:b}=ct(),d=c.length>0;let f;t[3]!==r||t[4]!==n.id||t[5]!==c?(f=tt.automationRuns(n.id,r,c),t[3]=r,t[4]=n.id,t[5]=c,t[6]=f):f=t[6];let x;t[7]!==C||t[8]!==c?(x=async U=>{const{pageParam:z}=U,ot=z===void 0?0:z;return await C.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:c}})},t[7]=C,t[8]=c,t[9]=x):x=t[9];let j;t[10]!==d||t[11]!==f||t[12]!==x?(j={queryKey:f,queryFn:x,initialPageParam:0,getNextPageParam:Dt,enabled:d,staleTime:3e4},t[10]=d,t[11]=f,t[12]=x,t[13]=j):j=t[13];const{data:y,fetchNextPage:S,hasNextPage:N,isFetchingNextPage:u,isLoading:v}=ft(j);let i,p,T,g;t[14]!==y?.pages||t[15]!==a||t[16]!==e?(i=(y?.pages??[]).flatMap(kt),g=i.map(_t),T=mt,p=tt.monitoringThreadUsage(a,JSON.stringify({ids:g,...e})),t[14]=y?.pages,t[15]=a,t[16]=e,t[17]=i,t[18]=p,t[19]=T,t[20]=g):(i=t[17],p=t[18],T=t[19],g=t[20]);let I;t[21]!==e||t[22]!==C||t[23]!==g?(I=async()=>await C.call("MONITORING_THREAD_USAGE",{threadIds:g,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=C,t[23]=g,t[24]=I):I=t[24];const D=g.length>0;let _;t[25]!==p||t[26]!==I||t[27]!==D?(_={queryKey:p,queryFn:I,enabled:D,staleTime:3e4},t[25]=p,t[26]=I,t[27]=D,t[28]=_):_=t[28];const{data:E}=T(_);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(Pt)),t[29]=E?.items,t[30]=M):M=t[30];const k=M;let $;t[31]!==S||t[32]!==N||t[33]!==u?($=()=>{N&&!u&&S()},t[31]=S,t[32]=N,t[33]=u,t[34]=$):$=t[34];const Z=St($,N??!1,u),R=bt(i),V=R.selected;let L;t[35]!==r||t[36]!==e?(L=s.jsx(yt,{automationId:r,range:e}),t[35]=r,t[36]=e,t[37]=L):L=t[37];let A;t[38]!==d||t[39]!==v||t[40]!==Z||t[41]!==i||t[42]!==R||t[43]!==o||t[44]!==k?(A=d?v?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingRuns")}):i.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noRunsTitle"),description:o("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 font-normal text-meta",children:o("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:o("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:o("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:i.map((U,z)=>s.jsx(It,{run:U,usage:k.get(U.id),onClick:()=>R.select(U.id),lastRowRef:z===i.length-1?Z:void 0},U.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noStartersTitle"),description:o("automations.automationRuns.noStartersDescription")})}),t[38]=d,t[39]=v,t[40]=Z,t[41]=i,t[42]=R,t[43]=o,t[44]=k,t[45]=A):A=t[45];let H;t[46]!==u||t[47]!==o?(H=u&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingMore")}),t[46]=u,t[47]=o,t[48]=H):H=t[48];let O;t[49]!==R?(O=U=>{U||R.close()},t[49]=R,t[50]=O):O=t[50];let K;t[51]!==w||t[52]!==h||t[53]!==P||t[54]!==a||t[55]!==b||t[56]!==i||t[57]!==V||t[58]!==R.index||t[59]!==R.next||t[60]!==R.prev?(K=V&&s.jsx(wt,{thread:V,client:P,locator:a,connections:w,virtualMcps:h,members:b,nav:{index:R.index,total:i.length,onPrev:R.prev,onNext:R.next}}),t[51]=w,t[52]=h,t[53]=P,t[54]=a,t[55]=b,t[56]=i,t[57]=V,t[58]=R.index,t[59]=R.next,t[60]=R.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==R.isOpen||t[65]!==O||t[66]!==q?(F=s.jsx(ht,{open:R.isOpen,onOpenChange:O,children:q}),t[64]=R.isOpen,t[65]=O,t[66]=q,t[67]=F):F=t[67];let B;return t[68]!==L||t[69]!==A||t[70]!==H||t[71]!==F?(B=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,A,H,F]}),t[68]=L,t[69]=A,t[70]=H,t[71]=F,t[72]=B):B=t[72],B}function Pt(m){return[m.threadId,{calls:m.calls,inputTokens:m.inputTokens,outputTokens:m.outputTokens,totalTokens:m.totalTokens,costUsd:m.costUsd}]}function _t(m){return m.id}function kt(m){return m.items??[]}function Dt(m,t){const r=m,c=t;if(!((r?.items?.length??0)<W))return c.length*W}export{Vt as A};
@@ -1 +1 @@
1
- import{c as k,j as e,b as $,a6 as D,d as M,r as q,n as d,B as V,hi as F,E as S}from"./index-C0zcxte6.js";import{s as G}from"./Plus-Bu8dYjTf.js";import{i as b}from"./Zap-BVwxluJ4.js";import{S as H}from"./search-input-3Sn0Ox5l.js";import{E as T}from"./empty-state-DMyh10sW.js";import{u as J}from"./use-automations-DJu_bQMu.js";import{u as K}from"./use-navigate-to-agent-C6kz2tf-.js";import{A as O}from"./automation-list-row-CY66jOSh.js";import{u as Q}from"./repository-binding-BSsS-pLT.js";import{R as U}from"./require-capability-De-meIBX.js";import"./SearchMd-CSnYUdRx.js";import"./use-mcp-client-mPNZ5wA-.js";import"./auth-Dee7m2i5.js";import"./thread-intent-BmXJHmce.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-9O-TJMef.js";import"./task-board-VFa9eWCt.js";import"./schema-CjjCZ6bx.js";import"./session-runtime-CEhQCN_A.js";import"./badge-BwjML1Ui.js";import"./UserCheck01-Bm_tmvVG.js";import"./SwitchHorizontal01-j9pFk8iK.js";import"./Trash01-CGA1V9gl.js";import"./agent-icon-DFdDsb4O.js";import"./AlertCircle-CMkbvoeN.js";import"./Tool01-DAQSjGNg.js";import"./ArrowUp-DHOdNryJ.js";import"./ArrowLeft-BSDOW4A2.js";import"./ArrowRight-DHHBvkVn.js";import"./BookOpen01-iWPgFcA1.js";import"./Globe04-Bltr8gRw.js";import"./CheckCircle-DS6DtxbV.js";import"./TrendUp01-BGKW0mh6.js";import"./ChevronDown-DS_2vV9U.js";import"./ChevronSelectorVertical-D0NBoFQ0.js";import"./ChevronUp-BsIT1i00.js";import"./UserSquare-kWKevgdv.js";import"./LinkBroken01-fV6kVrlJ.js";import"./CreditCard01-CtAjK1Nq.js";import"./File02-CbFOjoUb.js";import"./MessageCircle01-B_IjbkrY.js";import"./Eye-C17dMApd.js";import"./Fingerprint04-8iB0ZMj1.js";import"./Image01-DO626aWy.js";import"./Key01-Cr-iYwx2.js";import"./LayoutLeft-DtCpgUXM.js";import"./Minus-C5_j5JBE.js";import"./Monitor01-DHsrHXin.js";import"./Sun-BywYlyt4.js";import"./Play-nU4UoQKz.js";import"./ShoppingBag01-DVZF7bHI.js";import"./Upload01-Ce7d9Uy2.js";import"./Users01-BYfFhtdK.js";import"./XClose-aj1J9clf.js";import"./access-gate-DScvaiQI.js";import"./capability-load-error-BrEArsQc.js";function W(){const t=k.c(20),o=$(),{org:p}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(X)),N=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=A.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const R=l&&A.has(l)?l:F(p.id);S("automations_list_row_clicked",{automation_id:i,agent_id:R,source:"settings_automations"}),P(R,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==p.slug?(c=()=>{S("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:p.slug}})},t[0]=f,t[1]=p.slug,t[2]=c):c=t[2];const L=c,j=d,v=d,w=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const C=g.length>0&&e.jsx(H,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==C?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,C]}),t[7]=r,t[8]=C,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(b,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(G,{size:14}),o("settings.automations.browseAgentsButton")]})})}):N.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(b,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:N.map(i=>e.jsx(O,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==w.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(w.Container,{children:[n,_]}),t[10]=w.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==v.Content||t[15]!==a?(m=e.jsx(v.Content,{children:a}),t[14]=v.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function te(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{te as default};
1
+ import{c as k,j as e,b as $,a6 as D,d as M,r as q,n as d,B as V,hi as F,E as S}from"./index-B2vvUsuK.js";import{s as G}from"./Plus-GSWEwEm-.js";import{i as b}from"./Zap-B1JA6VL5.js";import{S as H}from"./search-input-Dmx6N7Z7.js";import{E as T}from"./empty-state--1H9mx7y.js";import{u as J}from"./use-automations-UppgD9x4.js";import{u as K}from"./use-navigate-to-agent-BGA3nmOF.js";import{A as O}from"./automation-list-row-Cfemy10y.js";import{u as Q}from"./repository-binding-DC98qYdg.js";import{R as U}from"./require-capability-r0eDYoNg.js";import"./SearchMd-DhrJsmFj.js";import"./use-mcp-client-C25DU1dz.js";import"./auth-DlYbrS5R.js";import"./thread-intent-DC5UuPI5.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DSisQksD.js";import"./task-board-DAlkVSdn.js";import"./schema-CAZOGJTH.js";import"./session-runtime-CWUXrNEM.js";import"./badge-CaU7DsCB.js";import"./UserCheck01-CpLKejEQ.js";import"./SwitchHorizontal01-NAHL2C3Y.js";import"./Trash01-Br_8Dd8k.js";import"./agent-icon-ButaHLCM.js";import"./AlertCircle-BLw7QvfG.js";import"./Tool01-DJqLAFcI.js";import"./ArrowUp-C_Mw0uky.js";import"./ArrowLeft-DH7F9HYx.js";import"./ArrowRight-DZeVAIN7.js";import"./BookOpen01-9fv3inuR.js";import"./Globe04-BBsqVmHb.js";import"./CheckCircle--1SXoxG_.js";import"./TrendUp01-Dnr3ECEr.js";import"./ChevronDown-DwO0ALfW.js";import"./ChevronSelectorVertical-Bj17dUxw.js";import"./ChevronUp-BaiO1bgX.js";import"./UserSquare-D1HQ9ju8.js";import"./LinkBroken01-Z9hP4zTf.js";import"./CreditCard01-D6jLDMwS.js";import"./File02-Bes4ATvL.js";import"./MessageCircle01-DjShhQqZ.js";import"./Eye-DvcGz393.js";import"./Fingerprint04-BpB7HSc7.js";import"./Image01-D2QOi7x6.js";import"./Key01-CDcaZkCg.js";import"./LayoutLeft-19qu82-A.js";import"./Minus-ChoEICrx.js";import"./Monitor01-DtssQiym.js";import"./Sun-Dpzqhodu.js";import"./Play-DatgPxza.js";import"./ShoppingBag01-DQR5ci-Q.js";import"./Upload01-B1gnueEL.js";import"./Users01-qnd_BT_N.js";import"./XClose-BbVr5nc7.js";import"./access-gate-m6QmHtAD.js";import"./capability-load-error-p87qKYlk.js";function W(){const t=k.c(20),o=$(),{org:p}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(X)),N=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=A.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const R=l&&A.has(l)?l:F(p.id);S("automations_list_row_clicked",{automation_id:i,agent_id:R,source:"settings_automations"}),P(R,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==p.slug?(c=()=>{S("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:p.slug}})},t[0]=f,t[1]=p.slug,t[2]=c):c=t[2];const L=c,j=d,v=d,w=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const C=g.length>0&&e.jsx(H,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==C?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,C]}),t[7]=r,t[8]=C,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(b,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(G,{size:14}),o("settings.automations.browseAgentsButton")]})})}):N.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(b,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:N.map(i=>e.jsx(O,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==w.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(w.Container,{children:[n,_]}),t[10]=w.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==v.Content||t[15]!==a?(m=e.jsx(v.Content,{children:a}),t[14]=v.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function te(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{te as default};
@@ -1 +1 @@
1
- import{c as b,m as u,j as l,bZ as c,b_ as p}from"./index-C0zcxte6.js";const v=p("inline-flex items-center justify-center rounded-full text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1.5 [&>svg]:pointer-events-none focus-ring transition-[color,background-color] overflow-hidden",{variants:{variant:{default:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",neutral:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",secondary:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",success:"bg-success/10 text-success [a&]:hover:bg-success/15",warning:"bg-warning/10 text-warning [a&]:hover:bg-warning/15",destructive:"bg-destructive/10 text-destructive [a&]:hover:bg-destructive/15",agent:"bg-brand-purple-tint text-brand-purple-dark dark:bg-brand-purple/20 dark:text-brand-purple",lime:"bg-brand-lime-tint text-brand-green-dark dark:bg-brand/20 dark:text-brand",info:"bg-brand-blue-tint text-brand-blue-dark dark:bg-brand-blue/20 dark:text-brand-blue",outline:"bg-card shadow-edge text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"bg-muted text-muted-foreground [a&]:hover:bg-secondary-hover",brand:"bg-brand/30 text-foreground [a&]:hover:bg-brand/40 [button&]:hover:bg-brand/40"},size:{sm:"h-4 gap-1 px-1.5 text-[0.6875rem]",default:"h-5 px-2",lg:"h-6 px-2.5 text-sm [&>svg]:size-3.5",control:"h-7 gap-1.5 pr-3 pl-1.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg bg-card p-0 shadow-edge"}},defaultVariants:{variant:"default",size:"default"}});function f(g){const e=b.c(14);let t,r,a,s,n;e[0]!==g?({className:t,variant:n,size:a,asChild:s,...r}=g,e[0]=g,e[1]=t,e[2]=r,e[3]=a,e[4]=s,e[5]=n):(t=e[1],r=e[2],a=e[3],s=e[4],n=e[5]);const i=(s===void 0?!1:s)?c:"span";let d;e[6]!==t||e[7]!==a||e[8]!==n?(d=u(v({variant:n,size:a}),t),e[6]=t,e[7]=a,e[8]=n,e[9]=d):d=e[9];let o;return e[10]!==i||e[11]!==r||e[12]!==d?(o=l.jsx(i,{"data-slot":"badge",className:d,...r}),e[10]=i,e[11]=r,e[12]=d,e[13]=o):o=e[13],o}export{f as B};
1
+ import{c as b,m as u,j as l,bZ as c,b_ as p}from"./index-B2vvUsuK.js";const v=p("inline-flex items-center justify-center rounded-full text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1.5 [&>svg]:pointer-events-none focus-ring transition-[color,background-color] overflow-hidden",{variants:{variant:{default:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",neutral:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",secondary:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",success:"bg-success/10 text-success [a&]:hover:bg-success/15",warning:"bg-warning/10 text-warning [a&]:hover:bg-warning/15",destructive:"bg-destructive/10 text-destructive [a&]:hover:bg-destructive/15",agent:"bg-brand-purple-tint text-brand-purple-dark dark:bg-brand-purple/20 dark:text-brand-purple",lime:"bg-brand-lime-tint text-brand-green-dark dark:bg-brand/20 dark:text-brand",info:"bg-brand-blue-tint text-brand-blue-dark dark:bg-brand-blue/20 dark:text-brand-blue",outline:"bg-card shadow-edge text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"bg-muted text-muted-foreground [a&]:hover:bg-secondary-hover",brand:"bg-brand/30 text-foreground [a&]:hover:bg-brand/40 [button&]:hover:bg-brand/40"},size:{sm:"h-4 gap-1 px-1.5 text-[0.6875rem]",default:"h-5 px-2",lg:"h-6 px-2.5 text-sm [&>svg]:size-3.5",control:"h-7 gap-1.5 pr-3 pl-1.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg bg-card p-0 shadow-edge"}},defaultVariants:{variant:"default",size:"default"}});function f(g){const e=b.c(14);let t,r,a,s,n;e[0]!==g?({className:t,variant:n,size:a,asChild:s,...r}=g,e[0]=g,e[1]=t,e[2]=r,e[3]=a,e[4]=s,e[5]=n):(t=e[1],r=e[2],a=e[3],s=e[4],n=e[5]);const i=(s===void 0?!1:s)?c:"span";let d;e[6]!==t||e[7]!==a||e[8]!==n?(d=u(v({variant:n,size:a}),t),e[6]=t,e[7]=a,e[8]=n,e[9]=d):d=e[9];let o;return e[10]!==i||e[11]!==r||e[12]!==d?(o=l.jsx(i,{"data-slot":"badge",className:d,...r}),e[10]=i,e[11]=r,e[12]=d,e[13]=o):o=e[13],o}export{f as B};
@@ -1,3 +1,3 @@
1
- import{c as T,m as ne,j as s,I as Rt,b as D,r as q,K as zt,i as At,aY as Ft,h as Dt,B as Fe}from"./index-C0zcxte6.js";import{u as it,a as $e,n as at,P as ct,D as dt,c as ut,C as ft}from"./task-key-Bw-0Xagt.js";import{s as mt,a as xt,S as pt,r as Ut,u as ht,v as Ot}from"./sortable.esm-nvXi4p48.js";import{s as Ue}from"./Plus-Bu8dYjTf.js";import{b as Ht}from"./delete-copy-D60ZiQf5.js";import{t as Mt,N as qt,ac as gt,ad as bt,ae as Gt,a6 as Vt,af as Kt,ag as vt,ah as Jt}from"./category-tree-BTRq8RL0.js";import{e as Qe,b as Wt,a as Qt,C as Yt,c as Xt,f as Zt}from"./command-Bpokkr7D.js";import{a as el,b as tl,P as ll}from"./popover-D1tBNoFL.js";import{F as sl,aE as ol,aq as nl,a9 as rl,B as Oe,ai as jt,aj as kt,ak as yt,al as il,D as al,e as cl}from"./agent-icon-DFdDsb4O.js";import{b as Nt}from"./MessageCircle01-B_IjbkrY.js";import{s as De}from"./Trash01-CGA1V9gl.js";import{a as He,s as Me,u as qe,E as Ge}from"./usage-stats-C4Ju4qoC.js";import{s as Ve}from"./suggestion-DqNLuB6A.js";import{E as Ke,T as ze,R as Ct}from"./editor-classes-BHlQ8lta.js";import{i as dl}from"./File02-CbFOjoUb.js";import{c as ul,i as fl}from"./UserCheck01-Bm_tmvVG.js";import{f as ml,d as xl}from"./blog-preview-url-oQXPBhGk.js";import{s as R,F as Je,I as ae,p as be,R as ue,A as fe,j as de}from"./primitives-Cm0irN0s.js";import{r as pl,b as hl,i as gl,p as bl,u as Bt,P as St}from"./product-picker-dialog-Cj_-kR4f.js";import{B as vl}from"./index-DItyK843.js";import{i as jl}from"./Zap-BVwxluJ4.js";import{T as kl,a as yl,c as Nl}from"./tooltip-W9aneKod.js";import{a as wt}from"./Image01-DO626aWy.js";import{i as Cl}from"./Monitor01-DHsrHXin.js";import{L as ve}from"./label-CBiNPa0x.js";import{s as Ye,F as Bl}from"./use-never-published-BmwZStnO.js";import{l as Sl,m as wl,Q as Pl,s as _l}from"./save-status-D-AS_GN9.js";import{s as $l}from"./XClose-aj1J9clf.js";import{t as Il,I as Ll}from"./held-block-view-CZOwIXZa.js";import{z as Tl}from"./blocks-tab-states-DZtXlWh1.js";import{S as El}from"./blog-schema-D3xxOZZL.js";function ee(b){const e=T.c(8),{active:t,label:r,onClick:l,children:o}=b,a=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground";let i;e[0]!==a?(i=ne("flex h-7 min-w-7 items-center justify-center px-1.5 text-sm transition-colors cursor-pointer rounded-[var(--studio-control-radius,var(--radius))]",a),e[0]=a,e[1]=i):i=e[1];let m;return e[2]!==t||e[3]!==o||e[4]!==r||e[5]!==l||e[6]!==i?(m=s.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:Rl,onClick:l,className:i,children:o}),e[2]=t,e[3]=o,e[4]=r,e[5]=l,e[6]=i,e[7]=m):m=e[7],m}function Rl(b){return b.preventDefault()}function Xe(){const b=T.c(1);let e;return b[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{"aria-hidden":!0,className:"mx-0.5 h-5 w-px bg-border"}),b[0]=e):e=b[0],e}function zl(b){const e=T.c(17),{draft:t,notice:r,label:l,placeholder:o,onDraftChange:a,onCommit:i,onCancel:m}=b;let f;e[0]!==a?(f=n=>a(n.target.value),e[0]=a,e[1]=f):f=e[1];let u;e[2]!==m||e[3]!==i?(u=n=>{n.key==="Escape"&&m(),n.key==="Enter"&&i()},e[2]=m,e[3]=i,e[4]=u):u=e[4];let p;e[5]!==t||e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==f||e[10]!==u?(p=s.jsx(Rt,{autoFocus:!0,type:"url",value:t,onChange:f,onBlur:i,onKeyDown:u,placeholder:o,spellCheck:!1,"aria-label":l,className:"h-8 w-full text-xs"}),e[5]=t,e[6]=l,e[7]=i,e[8]=o,e[9]=f,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==r?(g=r&&s.jsx("p",{role:"alert",className:"px-1 pb-0.5 pt-1.5 text-xs text-destructive",children:r}),e[12]=r,e[13]=g):g=e[13];let h;return e[14]!==p||e[15]!==g?(h=s.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 w-96 rounded-[var(--studio-surface-radius,var(--radius-md))] bg-popover p-1 shadow-soft",children:[p,g]}),e[14]=p,e[15]=g,e[16]=h):h=e[16],h}function Al(b){const e=T.c(75),{value:t,mobileValue:r,onChange:l,onMobileChange:o,label:a,alt:i,toolbarExtras:m,sandbox:f}=b,u=D(),[p,g]=q.useState(!1),[h,n]=q.useState(!1),[c,d]=q.useState(null),[x,v]=q.useState(null),j=c!==null,[N,k]=q.useState(null),y=Fl,w=y(r),S=p?w:y(t),C=Ye(S),P=!!S&&(N===S||!C),_=Sl(C);let $;e[0]!==p||e[1]!==u?($=u(p?"sectionsEditor.imageField.mobileUrlLabel":"sectionsEditor.imageField.urlLabel"),e[0]=p,e[1]=u,e[2]=$):$=e[2];const B=$;let L;e[3]!==l||e[4]!==p||e[5]!==o?(L=Z=>(p?o:l)(Z||void 0),e[3]=l,e[4]=p,e[5]=o,e[6]=L):L=e[6];const I=L,A=`${p?"mobile":"desktop"}:${S}`,[U,O]=q.useState(A);U!==A&&(O(A),c!==null&&(d(S),v(null)));let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{d(null),v(null)},e[7]=M):M=e[7];const E=M,W=()=>{const Z=c??"",Re=Ye(Z);return!Re&&Z.trim()?(v(u("sectionsEditor.imageField.unsafeUrl")),!1):(Re!==S&&I(Re||void 0),!0)};let K;e[8]!==E||e[9]!==W?(K=()=>{W()&&E()},e[8]=E,e[9]=W,e[10]=K):K=e[10];const Q=K,re=()=>{j?Q():d(S)};let se;e[11]!==W||e[12]!==j?(se=Z=>{j&&!W()||g(Z)},e[11]=W,e[12]=j,e[13]=se):se=e[13];const Y=se,ie=f?.siteSlug,oe=f?.virtualMcpId;let X;e[14]===Symbol.for("react.memo_cache_sentinel")?(X=()=>n(!0),e[14]=X):X=e[14];let H;e[15]!==I||e[16]!==ie||e[17]!==oe?(H={siteSlug:ie,virtualMcpId:oe,onUploaded:I,onNeedsPicker:X},e[15]=I,e[16]=ie,e[17]=oe,e[18]=H):H=e[18];const{isDragging:z,isPending:V,lockedConfigId:F,dropProps:J}=wl(H);let G;e[19]!==a?(G=a&&s.jsx(ve,{className:"text-muted-foreground",children:a}),e[19]=a,e[20]=G):G=e[20];let te;e[21]!==m?(te=m&&s.jsx(Xe,{}),e[21]=m,e[22]=te):te=e[22];const ce=!p;let le;e[23]!==u?(le=u("sectionsEditor.imageField.desktopSlot"),e[23]=u,e[24]=le):le=e[24];let me;e[25]!==Y?(me=()=>Y(!1),e[25]=Y,e[26]=me):me=e[26];let je;e[27]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx(Cl,{size:14}),e[27]=je):je=e[27];let ke;e[28]!==ce||e[29]!==le||e[30]!==me?(ke=s.jsx(ee,{active:ce,label:le,onClick:me,children:je}),e[28]=ce,e[29]=le,e[30]=me,e[31]=ke):ke=e[31];let ye;e[32]!==u?(ye=u("sectionsEditor.imageField.mobileSlot"),e[32]=u,e[33]=ye):ye=e[33];let Ne;e[34]!==Y?(Ne=()=>Y(!0),e[34]=Y,e[35]=Ne):Ne=e[35];let Ce;e[36]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(ol,{size:14}),e[36]=Ce):Ce=e[36];let Be;e[37]!==re||e[38]!==B||e[39]!==j?(Be=s.jsx(ee,{active:j,label:B,onClick:re,children:Ce}),e[37]=re,e[38]=B,e[39]=j,e[40]=Be):Be=e[40];let Se;e[41]!==E||e[42]!==Q||e[43]!==u||e[44]!==c||e[45]!==B||e[46]!==x?(Se=c!==null&&s.jsx(zl,{draft:c,notice:x,label:B,placeholder:u("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:Z=>{v(null),d(Z)},onCommit:Q,onCancel:E}),e[41]=E,e[42]=Q,e[43]=u,e[44]=c,e[45]=B,e[46]=x,e[47]=Se):Se=e[47];let we;e[48]===Symbol.for("react.memo_cache_sentinel")?(we=()=>n(!0),e[48]=we):we=e[48];let xe;e[49]!==u?(xe=u("sectionsEditor.imageField.replaceImage"),e[49]=u,e[50]=xe):xe=e[50];const Le=!S&&"border border-dashed border-border/60 bg-muted/30 hover:bg-accent",Te=z&&"ring-2 ring-primary/40",Ee=V&&"pointer-events-none opacity-60";let pe;e[51]!==Le||e[52]!==Te||e[53]!==Ee?(pe=ne("relative block w-full cursor-pointer overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] transition",Le,Te,Ee),e[51]=Le,e[52]=Te,e[53]=Ee,e[54]=pe):pe=e[54];let he;e[55]!==S||e[56]!==i||e[57]!==P||e[58]!==V||e[59]!==p||e[60]!==C||e[61]!==u?(he=C&&!P?s.jsx("img",{src:C,alt:i??"",onError:()=>k(S),className:"block h-auto w-full"}):s.jsxs("span",{className:"flex h-32 w-full flex-col items-center justify-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(wt,{size:20}),u(V?"sectionsEditor.imageField.uploading":P?"sectionsEditor.imageField.previewUnavailable":p?"sectionsEditor.imageField.dropMobileImage":"sectionsEditor.imageField.dropImageOrClickToBrowse")]}),e[55]=S,e[56]=i,e[57]=P,e[58]=V,e[59]=p,e[60]=C,e[61]=u,e[62]=he):he=e[62];let ge;e[63]!==z||e[64]!==u?(ge=z&&s.jsx("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:s.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:u("sectionsEditor.imageField.dropToUpload")})}),e[63]=z,e[64]=u,e[65]=ge):ge=e[65];let Pe;e[66]!==xe||e[67]!==pe||e[68]!==he||e[69]!==ge?(Pe=s.jsxs("button",{type:"button",onClick:we,"aria-label":xe,className:pe,children:[he,ge]}),e[66]=xe,e[67]=pe,e[68]=he,e[69]=ge,e[70]=Pe):Pe=e[70];let _e;return e[71]!==F||e[72]!==h||e[73]!==I?(_e=s.jsx(Bl,{open:h,onOpenChange:n,mode:"image",onSelect:I,lockedConfigId:F}),e[71]=F,e[72]=h,e[73]=I,e[74]=_e):_e=e[74],s.jsxs("div",{...J,className:"group/image relative space-y-2",children:[G,s.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-2 z-10 flex justify-center",children:s.jsxs("div",{className:"pointer-events-none relative flex items-center gap-0.5 rounded-md bg-popover p-0.5 opacity-0 shadow-soft transition-opacity group-hover/image:pointer-events-auto group-hover/image:opacity-100 group-focus-within/image:pointer-events-auto group-focus-within/image:opacity-100",children:[m,te,ke,s.jsx(ee,{active:p,label:ye,onClick:Ne,children:s.jsx(sl,{size:14,className:ne(w&&"text-primary")})}),Be,C&&!C.toLowerCase().startsWith("data:")&&s.jsxs(s.Fragment,{children:[s.jsx(Xe,{}),Pl.map(Z=>s.jsx(ee,{active:_===Z,label:Z,onClick:()=>I(_l(C,_===Z?void 0:Z)),children:s.jsx("span",{className:"px-0.5 text-xs capitalize",children:Z})},Z))]}),Se]})}),Pe,_e]})}function Fl(b){return typeof b=="string"?b:""}function Pt(b){const e=T.c(12),{iconName:t,iconUrl:r,alt:l,className:o,size:a}=b,i=a===void 0?16:a;let m;e[0]!==t?(m=rl(t)??nl,e[0]=t,e[1]=m):m=e[1];const f=m;let u;e[2]!==o?(u=ne("flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",o),e[2]=o,e[3]=u):u=e[3];let p;e[4]!==f||e[5]!==l||e[6]!==r||e[7]!==i?(p=r?s.jsx("img",{src:r,alt:l,className:"size-5 object-contain"}):s.jsx(f,{size:i,className:"text-muted-foreground"}),e[4]=f,e[5]=l,e[6]=r,e[7]=i,e[8]=p):p=e[8];let g;return e[9]!==u||e[10]!==p?(g=s.jsx("div",{className:u,children:p}),e[9]=u,e[10]=p,e[11]=g):g=e[11],g}const Ze={app:"sandbox.blockPicker.blocksLabel",site:"sandbox.blockPicker.customBlocksLabel"};function et(b){const e=T.c(19),{type:t,onInsert:r}=b,l=`${t.title} ${t.resolveType} ${t.description??""}`;let o;e[0]!==r||e[1]!==t.resolveType?(o=()=>r(t.resolveType),e[0]=r,e[1]=t.resolveType,e[2]=o):o=e[2];let a;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(a=s.jsx(Pt,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=a):a=e[6];let i;e[7]!==t.title?(i=s.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=i):i=e[8];let m;e[9]!==t.description?(m=t.description&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=m):m=e[10];let f;e[11]!==i||e[12]!==m?(f=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[i,m]}),e[11]=i,e[12]=m,e[13]=f):f=e[13];let u;return e[14]!==l||e[15]!==o||e[16]!==a||e[17]!==f?(u=s.jsxs(Wt,{value:l,onSelect:o,className:"flex items-center gap-2.5",children:[a,f]}),e[14]=l,e[15]=o,e[16]=a,e[17]=f,e[18]=u):u=e[18],u}function _t(b){const e=T.c(41),{blockTypes:t,onInsert:r,children:l,align:o}=b,a=o===void 0?"start":o,i=D(),[m,f]=q.useState(!1),[u,p]=q.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=I=>{I&&typeof document<"u"&&p(document.querySelector('[data-slot="dialog-content"][data-state="open"]')),f(I)},e[0]=g):g=e[0];const h=g;let n,c;if(e[1]!==t){n=[],c=[];for(const I of t)(I.source==="site"?c:n).push(I);e[1]=t,e[2]=n,e[3]=c}else n=e[2],c=e[3];let d;e[4]!==r?(d=I=>{r(I),f(!1)},e[4]=r,e[5]=d):d=e[5];const x=d,v=n.length>0&&c.length>0;let j;e[6]!==l?(j=s.jsx(el,{asChild:!0,children:l}),e[6]=l,e[7]=j):j=e[7];const N=u??void 0;let k;e[8]!==i?(k=i("sandbox.blockPicker.searchPlaceholder"),e[8]=i,e[9]=k):k=e[9];let y;e[10]!==k?(y=s.jsx(Qt,{placeholder:k}),e[10]=k,e[11]=y):y=e[11];let w;e[12]!==i?(w=i("sandbox.blockPicker.noBlocksFound"),e[12]=i,e[13]=w):w=e[13];let S;e[14]!==w?(S=s.jsx(Yt,{children:w}),e[14]=w,e[15]=S):S=e[15];let C;e[16]!==x||e[17]!==v||e[18]!==c||e[19]!==i?(C=c.length>0&&s.jsx(Qe,{heading:v?i(Ze.site):void 0,children:c.map(I=>s.jsx(et,{type:I,onInsert:x},I.resolveType))}),e[16]=x,e[17]=v,e[18]=c,e[19]=i,e[20]=C):C=e[20];let P;e[21]!==n||e[22]!==x||e[23]!==v||e[24]!==i?(P=n.length>0&&s.jsx(Qe,{heading:v?i(Ze.app):void 0,children:n.map(I=>s.jsx(et,{type:I,onInsert:x},I.resolveType))}),e[21]=n,e[22]=x,e[23]=v,e[24]=i,e[25]=P):P=e[25];let _;e[26]!==C||e[27]!==P||e[28]!==S?(_=s.jsxs(Xt,{className:"min-h-0 flex-1",children:[S,C,P]}),e[26]=C,e[27]=P,e[28]=S,e[29]=_):_=e[29];let $;e[30]!==_||e[31]!==y?($=s.jsxs(Zt,{className:"min-h-0 flex-1",children:[y,_]}),e[30]=_,e[31]=y,e[32]=$):$=e[32];let B;e[33]!==a||e[34]!==$||e[35]!==N?(B=s.jsx(tl,{container:N,className:"flex max-h-(--radix-popover-content-available-height) w-80 flex-col p-0",align:a,children:$}),e[33]=a,e[34]=$,e[35]=N,e[36]=B):B=e[36];let L;return e[37]!==m||e[38]!==B||e[39]!==j?(L=s.jsxs(ll,{open:m,onOpenChange:h,children:[j,B]}),e[37]=m,e[38]=B,e[39]=j,e[40]=L):L=e[40],L}function $t(b){const e=T.c(12),{value:t,onChange:r,placeholder:l,children:o}=b;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Oe,{size:13,className:"shrink-0 text-muted-foreground"}),e[0]=a):a=e[0];let i;e[1]!==r?(i=p=>r(p.target.value),e[1]=r,e[2]=i):i=e[2];let m;e[3]!==l||e[4]!==i||e[5]!==t?(m=s.jsxs("div",{className:"flex items-center gap-1.5 rounded border px-2",children:[a,s.jsx("input",{autoFocus:!0,type:"text",value:t,placeholder:l,onChange:i,className:"h-7 flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"})]}),e[3]=l,e[4]=i,e[5]=t,e[6]=m):m=e[6];let f;e[7]!==o?(f=s.jsx("div",{className:"max-h-56 overflow-y-auto",children:o}),e[7]=o,e[8]=f):f=e[8];let u;return e[9]!==m||e[10]!==f?(u=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11],u}function It(b){const e=T.c(13),{label:t,sublabel:r,image:l,onPick:o}=b;let a;e[0]!==l?(a=l!==void 0&&s.jsx("img",{src:l,alt:"",className:"h-7 w-7 shrink-0 rounded object-cover"}),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==t?(i=s.jsx("span",{className:"block truncate text-sm",children:t}),e[2]=t,e[3]=i):i=e[3];let m;e[4]!==r?(m=r&&s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:r}),e[4]=r,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f=s.jsxs("span",{className:"min-w-0 flex-1",children:[i,m]}),e[6]=i,e[7]=m,e[8]=f):f=e[8];let u;return e[9]!==o||e[10]!==a||e[11]!==f?(u=s.jsxs("button",{type:"button",onMouseDown:Dl,onClick:o,className:"flex w-full items-center gap-2 rounded px-1.5 py-1.5 text-left transition-colors hover:bg-accent",children:[a,f]}),e[9]=o,e[10]=a,e[11]=f,e[12]=u):u=e[12],u}function Dl(b){return b.preventDefault()}function Ul(b){const e=T.c(7),{decofile:t,onPick:r}=b,l=D(),[o,a]=q.useState("");let i;if(e[0]!==t||e[1]!==r||e[2]!==l||e[3]!==o){const m=ml(t),f=o.trim().toLowerCase(),u=qt(t).filter(h=>!f||h.title.toLowerCase().includes(f)||h.slug.toLowerCase().includes(f)).slice(0,30),p=h=>m?xl(m,{category:h.categorySlugs[0]??"",slug:h.slug}):null;let g;e[5]!==l?(g=l("sandbox.linkPicker.searchPosts"),e[5]=l,e[6]=g):g=e[6],i=s.jsx($t,{value:o,onChange:a,placeholder:g,children:u.length===0?s.jsx("p",{className:"px-1.5 py-3 text-center text-xs text-muted-foreground",children:l("sandbox.linkPicker.noPosts")}):u.map(h=>{const n=p(h);return n?s.jsx(It,{label:h.title||h.slug,sublabel:n,onPick:()=>r(n)},h.key):null})}),e[0]=t,e[1]=r,e[2]=l,e[3]=o,e[4]=i}else i=e[4];return i}function Ol(b){const e=T.c(26),{sandboxRef:t,storeUrl:r,onPick:l}=b,o=D(),[a,i]=q.useState(""),[m,f]=q.useState(""),u=q.useRef(null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=y=>{i(y),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>f(y.trim()),300)},e[0]=p):p=e[0];const g=p;let h;e[1]!==m||e[2]!==t.branch||e[3]!==t.orgSlug||e[4]!==t.virtualMcpId?(h=zt.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`product-link:${m}`),e[1]=m,e[2]=t.branch,e[3]=t.orgSlug,e[4]=t.virtualMcpId,e[5]=h):h=e[5];let n;e[6]!==m||e[7]!==t?(n=async()=>{const[y]=hl("search",m);if(!y)return[];const w=await gl(t,y);return bl(w).filter(Hl)},e[6]=m,e[7]=t,e[8]=n):n=e[8];let c;e[9]!==h||e[10]!==n?(c={queryKey:h,queryFn:n},e[9]=h,e[10]=n,e[11]=c):c=e[11];const d=At(c);let x;e[12]!==d.data?(x=d.data??[],e[12]=d.data,e[13]=x):x=e[13];const v=x;let j;e[14]!==o?(j=o("sandbox.linkPicker.searchProducts"),e[14]=o,e[15]=j):j=e[15];let N;e[16]!==l||e[17]!==v||e[18]!==d.isFetching||e[19]!==r||e[20]!==o?(N=d.isFetching?s.jsxs("p",{className:"flex items-center justify-center gap-1.5 px-1.5 py-3 text-xs text-muted-foreground",children:[s.jsx(fl,{size:12,className:"animate-spin"}),o("sandbox.linkPicker.searching")]}):v.length===0?s.jsx("p",{className:"px-1.5 py-3 text-center text-xs text-muted-foreground",children:o("sandbox.linkPicker.noProducts")}):v.map(y=>s.jsx(It,{label:y.label,image:y.image??"",onPick:()=>{const w=pl(y.url,r);w&&l(w)}},y.id)),e[16]=l,e[17]=v,e[18]=d.isFetching,e[19]=r,e[20]=o,e[21]=N):N=e[21];let k;return e[22]!==j||e[23]!==N||e[24]!==a?(k=s.jsx($t,{value:a,onChange:g,placeholder:j,children:N}),e[22]=j,e[23]=N,e[24]=a,e[25]=k):k=e[25],k}function Hl(b){return b.url}function We(b){const e=T.c(24),{decofile:t,sandboxRef:r}=b,l=D();let o;e[0]!==t?(o=t?R(Mt(t).merged.storeUrl):"",e[0]=t,e[1]=o):o=e[1];const a=o;let i;if(e[2]!==t||e[3]!==r||e[4]!==a||e[5]!==l){if(i=[],t){let m;e[7]!==l?(m=l("sandbox.linkPicker.tabPost"),e[7]=l,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(dl,{size:12}),e[9]=f):f=e[9];let u;e[10]!==t?(u=g=>s.jsx(Ul,{decofile:t,onPick:g}),e[10]=t,e[11]=u):u=e[11];let p;e[12]!==m||e[13]!==u?(p={id:"post",label:m,icon:f,render:u},e[12]=m,e[13]=u,e[14]=p):p=e[14],i.push(p)}if(r){let m;e[15]!==l?(m=l("sandbox.linkPicker.tabProduct"),e[15]=l,e[16]=m):m=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ul,{size:12}),e[17]=f):f=e[17];let u;e[18]!==r||e[19]!==a?(u=g=>s.jsx(Ol,{sandboxRef:r,storeUrl:a,onPick:g}),e[18]=r,e[19]=a,e[20]=u):u=e[20];let p;e[21]!==m||e[22]!==u?(p={id:"product",label:m,icon:f,render:u},e[21]=m,e[22]=u,e[23]=p):p=e[23],i.push(p)}e[2]=t,e[3]=r,e[4]=a,e[5]=l,e[6]=i}else i=e[6];return i}function Ml({html:b,placeholder:e,onChange:t,decofile:r,sandboxRef:l}){const o=q.useRef(t);o.current=t;const[a,i]=q.useState(!1),m=He({extensions:[Me.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),Ve.configure({placeholder:e??"Write something…"})],content:b||"",editorProps:{attributes:{class:ne("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0",Ke)}},onUpdate:({editor:p})=>{const g=p.getHTML();o.current(g==="<p></p>"?"":g)}}),f=qe({editor:m,selector:({editor:p})=>({isFocused:p?.isFocused??!1,bold:p?.isActive("bold")??!1,italic:p?.isActive("italic")??!1,underline:p?.isActive("underline")??!1,link:p?.isActive("link")??!1})}),u=We({decofile:r,sandboxRef:l});return m?s.jsxs("div",{className:"relative",children:[(f.isFocused||a)&&s.jsxs("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md bg-popover p-0.5 shadow-soft",children:[s.jsx(ze,{active:f.bold,label:"Bold",onClick:()=>m.chain().focus().toggleBold().run(),children:s.jsx(jt,{size:14})}),s.jsx(ze,{active:f.italic,label:"Italic",onClick:()=>m.chain().focus().toggleItalic().run(),children:s.jsx(kt,{size:14})}),s.jsx(ze,{active:f.underline,label:"Underline",onClick:()=>m.chain().focus().toggleUnderline().run(),children:s.jsx(yt,{size:14})}),s.jsx(Ct,{editor:m,active:f.link,open:a,onOpenChange:i,sources:u})]}),s.jsx(Ge,{editor:m,className:"text-[15px] text-foreground"})]}):null}function ql(b,e){const t=b.length?b.split(`
1
+ import{c as T,m as ne,j as s,I as Rt,b as D,r as q,K as zt,i as At,aY as Ft,h as Dt,B as Fe}from"./index-B2vvUsuK.js";import{u as it,a as $e,n as at,P as ct,D as dt,c as ut,C as ft}from"./task-key-D_de_YB4.js";import{s as mt,a as xt,S as pt,r as Ut,u as ht,v as Ot}from"./sortable.esm-AH9TOEe6.js";import{s as Ue}from"./Plus-GSWEwEm-.js";import{b as Ht}from"./delete-copy-C8ERxzK8.js";import{t as Mt,N as qt,ac as gt,ad as bt,ae as Gt,a6 as Vt,af as Kt,ag as vt,ah as Jt}from"./category-tree-DUNY9TG8.js";import{e as Qe,b as Wt,a as Qt,C as Yt,c as Xt,f as Zt}from"./command-BA_BVypg.js";import{a as el,b as tl,P as ll}from"./popover-BN8yB-gL.js";import{F as sl,aE as ol,aq as nl,a9 as rl,B as Oe,ai as jt,aj as kt,ak as yt,al as il,D as al,e as cl}from"./agent-icon-ButaHLCM.js";import{b as Nt}from"./MessageCircle01-DjShhQqZ.js";import{s as De}from"./Trash01-Br_8Dd8k.js";import{a as He,s as Me,u as qe,E as Ge}from"./usage-stats-BbuSELy1.js";import{s as Ve}from"./suggestion-BKU1aw0O.js";import{E as Ke,T as ze,R as Ct}from"./editor-classes-eVnt4vp_.js";import{i as dl}from"./File02-Bes4ATvL.js";import{c as ul,i as fl}from"./UserCheck01-CpLKejEQ.js";import{f as ml,d as xl}from"./blog-preview-url-DM-lGGhF.js";import{s as R,F as Je,I as ae,p as be,R as ue,A as fe,j as de}from"./primitives-7GEzJciO.js";import{r as pl,b as hl,i as gl,p as bl,u as Bt,P as St}from"./product-picker-dialog-BsLtWfxx.js";import{B as vl}from"./index-4q-RLwEk.js";import{i as jl}from"./Zap-B1JA6VL5.js";import{T as kl,a as yl,c as Nl}from"./tooltip-C0XDZQqg.js";import{a as wt}from"./Image01-D2QOi7x6.js";import{i as Cl}from"./Monitor01-DtssQiym.js";import{L as ve}from"./label-BLEP0nH0.js";import{s as Ye,F as Bl}from"./use-never-published-BnWhN5r2.js";import{l as Sl,m as wl,Q as Pl,s as _l}from"./save-status-5VC4rIi2.js";import{s as $l}from"./XClose-BbVr5nc7.js";import{t as Il,I as Ll}from"./held-block-view-DUdsae86.js";import{z as Tl}from"./blocks-tab-states-CrihrdT0.js";import{S as El}from"./blog-schema-0H53CE3k.js";function ee(b){const e=T.c(8),{active:t,label:r,onClick:l,children:o}=b,a=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground";let i;e[0]!==a?(i=ne("flex h-7 min-w-7 items-center justify-center px-1.5 text-sm transition-colors cursor-pointer rounded-[var(--studio-control-radius,var(--radius))]",a),e[0]=a,e[1]=i):i=e[1];let m;return e[2]!==t||e[3]!==o||e[4]!==r||e[5]!==l||e[6]!==i?(m=s.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:Rl,onClick:l,className:i,children:o}),e[2]=t,e[3]=o,e[4]=r,e[5]=l,e[6]=i,e[7]=m):m=e[7],m}function Rl(b){return b.preventDefault()}function Xe(){const b=T.c(1);let e;return b[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{"aria-hidden":!0,className:"mx-0.5 h-5 w-px bg-border"}),b[0]=e):e=b[0],e}function zl(b){const e=T.c(17),{draft:t,notice:r,label:l,placeholder:o,onDraftChange:a,onCommit:i,onCancel:m}=b;let f;e[0]!==a?(f=n=>a(n.target.value),e[0]=a,e[1]=f):f=e[1];let u;e[2]!==m||e[3]!==i?(u=n=>{n.key==="Escape"&&m(),n.key==="Enter"&&i()},e[2]=m,e[3]=i,e[4]=u):u=e[4];let p;e[5]!==t||e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==f||e[10]!==u?(p=s.jsx(Rt,{autoFocus:!0,type:"url",value:t,onChange:f,onBlur:i,onKeyDown:u,placeholder:o,spellCheck:!1,"aria-label":l,className:"h-8 w-full text-xs"}),e[5]=t,e[6]=l,e[7]=i,e[8]=o,e[9]=f,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==r?(g=r&&s.jsx("p",{role:"alert",className:"px-1 pb-0.5 pt-1.5 text-xs text-destructive",children:r}),e[12]=r,e[13]=g):g=e[13];let h;return e[14]!==p||e[15]!==g?(h=s.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 w-96 rounded-[var(--studio-surface-radius,var(--radius-md))] bg-popover p-1 shadow-soft",children:[p,g]}),e[14]=p,e[15]=g,e[16]=h):h=e[16],h}function Al(b){const e=T.c(75),{value:t,mobileValue:r,onChange:l,onMobileChange:o,label:a,alt:i,toolbarExtras:m,sandbox:f}=b,u=D(),[p,g]=q.useState(!1),[h,n]=q.useState(!1),[c,d]=q.useState(null),[x,v]=q.useState(null),j=c!==null,[N,k]=q.useState(null),y=Fl,w=y(r),S=p?w:y(t),C=Ye(S),P=!!S&&(N===S||!C),_=Sl(C);let $;e[0]!==p||e[1]!==u?($=u(p?"sectionsEditor.imageField.mobileUrlLabel":"sectionsEditor.imageField.urlLabel"),e[0]=p,e[1]=u,e[2]=$):$=e[2];const B=$;let L;e[3]!==l||e[4]!==p||e[5]!==o?(L=Z=>(p?o:l)(Z||void 0),e[3]=l,e[4]=p,e[5]=o,e[6]=L):L=e[6];const I=L,A=`${p?"mobile":"desktop"}:${S}`,[U,O]=q.useState(A);U!==A&&(O(A),c!==null&&(d(S),v(null)));let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{d(null),v(null)},e[7]=M):M=e[7];const E=M,W=()=>{const Z=c??"",Re=Ye(Z);return!Re&&Z.trim()?(v(u("sectionsEditor.imageField.unsafeUrl")),!1):(Re!==S&&I(Re||void 0),!0)};let K;e[8]!==E||e[9]!==W?(K=()=>{W()&&E()},e[8]=E,e[9]=W,e[10]=K):K=e[10];const Q=K,re=()=>{j?Q():d(S)};let se;e[11]!==W||e[12]!==j?(se=Z=>{j&&!W()||g(Z)},e[11]=W,e[12]=j,e[13]=se):se=e[13];const Y=se,ie=f?.siteSlug,oe=f?.virtualMcpId;let X;e[14]===Symbol.for("react.memo_cache_sentinel")?(X=()=>n(!0),e[14]=X):X=e[14];let H;e[15]!==I||e[16]!==ie||e[17]!==oe?(H={siteSlug:ie,virtualMcpId:oe,onUploaded:I,onNeedsPicker:X},e[15]=I,e[16]=ie,e[17]=oe,e[18]=H):H=e[18];const{isDragging:z,isPending:V,lockedConfigId:F,dropProps:J}=wl(H);let G;e[19]!==a?(G=a&&s.jsx(ve,{className:"text-muted-foreground",children:a}),e[19]=a,e[20]=G):G=e[20];let te;e[21]!==m?(te=m&&s.jsx(Xe,{}),e[21]=m,e[22]=te):te=e[22];const ce=!p;let le;e[23]!==u?(le=u("sectionsEditor.imageField.desktopSlot"),e[23]=u,e[24]=le):le=e[24];let me;e[25]!==Y?(me=()=>Y(!1),e[25]=Y,e[26]=me):me=e[26];let je;e[27]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx(Cl,{size:14}),e[27]=je):je=e[27];let ke;e[28]!==ce||e[29]!==le||e[30]!==me?(ke=s.jsx(ee,{active:ce,label:le,onClick:me,children:je}),e[28]=ce,e[29]=le,e[30]=me,e[31]=ke):ke=e[31];let ye;e[32]!==u?(ye=u("sectionsEditor.imageField.mobileSlot"),e[32]=u,e[33]=ye):ye=e[33];let Ne;e[34]!==Y?(Ne=()=>Y(!0),e[34]=Y,e[35]=Ne):Ne=e[35];let Ce;e[36]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(ol,{size:14}),e[36]=Ce):Ce=e[36];let Be;e[37]!==re||e[38]!==B||e[39]!==j?(Be=s.jsx(ee,{active:j,label:B,onClick:re,children:Ce}),e[37]=re,e[38]=B,e[39]=j,e[40]=Be):Be=e[40];let Se;e[41]!==E||e[42]!==Q||e[43]!==u||e[44]!==c||e[45]!==B||e[46]!==x?(Se=c!==null&&s.jsx(zl,{draft:c,notice:x,label:B,placeholder:u("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:Z=>{v(null),d(Z)},onCommit:Q,onCancel:E}),e[41]=E,e[42]=Q,e[43]=u,e[44]=c,e[45]=B,e[46]=x,e[47]=Se):Se=e[47];let we;e[48]===Symbol.for("react.memo_cache_sentinel")?(we=()=>n(!0),e[48]=we):we=e[48];let xe;e[49]!==u?(xe=u("sectionsEditor.imageField.replaceImage"),e[49]=u,e[50]=xe):xe=e[50];const Le=!S&&"border border-dashed border-border/60 bg-muted/30 hover:bg-accent",Te=z&&"ring-2 ring-primary/40",Ee=V&&"pointer-events-none opacity-60";let pe;e[51]!==Le||e[52]!==Te||e[53]!==Ee?(pe=ne("relative block w-full cursor-pointer overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] transition",Le,Te,Ee),e[51]=Le,e[52]=Te,e[53]=Ee,e[54]=pe):pe=e[54];let he;e[55]!==S||e[56]!==i||e[57]!==P||e[58]!==V||e[59]!==p||e[60]!==C||e[61]!==u?(he=C&&!P?s.jsx("img",{src:C,alt:i??"",onError:()=>k(S),className:"block h-auto w-full"}):s.jsxs("span",{className:"flex h-32 w-full flex-col items-center justify-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(wt,{size:20}),u(V?"sectionsEditor.imageField.uploading":P?"sectionsEditor.imageField.previewUnavailable":p?"sectionsEditor.imageField.dropMobileImage":"sectionsEditor.imageField.dropImageOrClickToBrowse")]}),e[55]=S,e[56]=i,e[57]=P,e[58]=V,e[59]=p,e[60]=C,e[61]=u,e[62]=he):he=e[62];let ge;e[63]!==z||e[64]!==u?(ge=z&&s.jsx("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:s.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:u("sectionsEditor.imageField.dropToUpload")})}),e[63]=z,e[64]=u,e[65]=ge):ge=e[65];let Pe;e[66]!==xe||e[67]!==pe||e[68]!==he||e[69]!==ge?(Pe=s.jsxs("button",{type:"button",onClick:we,"aria-label":xe,className:pe,children:[he,ge]}),e[66]=xe,e[67]=pe,e[68]=he,e[69]=ge,e[70]=Pe):Pe=e[70];let _e;return e[71]!==F||e[72]!==h||e[73]!==I?(_e=s.jsx(Bl,{open:h,onOpenChange:n,mode:"image",onSelect:I,lockedConfigId:F}),e[71]=F,e[72]=h,e[73]=I,e[74]=_e):_e=e[74],s.jsxs("div",{...J,className:"group/image relative space-y-2",children:[G,s.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-2 z-10 flex justify-center",children:s.jsxs("div",{className:"pointer-events-none relative flex items-center gap-0.5 rounded-md bg-popover p-0.5 opacity-0 shadow-soft transition-opacity group-hover/image:pointer-events-auto group-hover/image:opacity-100 group-focus-within/image:pointer-events-auto group-focus-within/image:opacity-100",children:[m,te,ke,s.jsx(ee,{active:p,label:ye,onClick:Ne,children:s.jsx(sl,{size:14,className:ne(w&&"text-primary")})}),Be,C&&!C.toLowerCase().startsWith("data:")&&s.jsxs(s.Fragment,{children:[s.jsx(Xe,{}),Pl.map(Z=>s.jsx(ee,{active:_===Z,label:Z,onClick:()=>I(_l(C,_===Z?void 0:Z)),children:s.jsx("span",{className:"px-0.5 text-xs capitalize",children:Z})},Z))]}),Se]})}),Pe,_e]})}function Fl(b){return typeof b=="string"?b:""}function Pt(b){const e=T.c(12),{iconName:t,iconUrl:r,alt:l,className:o,size:a}=b,i=a===void 0?16:a;let m;e[0]!==t?(m=rl(t)??nl,e[0]=t,e[1]=m):m=e[1];const f=m;let u;e[2]!==o?(u=ne("flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",o),e[2]=o,e[3]=u):u=e[3];let p;e[4]!==f||e[5]!==l||e[6]!==r||e[7]!==i?(p=r?s.jsx("img",{src:r,alt:l,className:"size-5 object-contain"}):s.jsx(f,{size:i,className:"text-muted-foreground"}),e[4]=f,e[5]=l,e[6]=r,e[7]=i,e[8]=p):p=e[8];let g;return e[9]!==u||e[10]!==p?(g=s.jsx("div",{className:u,children:p}),e[9]=u,e[10]=p,e[11]=g):g=e[11],g}const Ze={app:"sandbox.blockPicker.blocksLabel",site:"sandbox.blockPicker.customBlocksLabel"};function et(b){const e=T.c(19),{type:t,onInsert:r}=b,l=`${t.title} ${t.resolveType} ${t.description??""}`;let o;e[0]!==r||e[1]!==t.resolveType?(o=()=>r(t.resolveType),e[0]=r,e[1]=t.resolveType,e[2]=o):o=e[2];let a;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(a=s.jsx(Pt,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=a):a=e[6];let i;e[7]!==t.title?(i=s.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=i):i=e[8];let m;e[9]!==t.description?(m=t.description&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=m):m=e[10];let f;e[11]!==i||e[12]!==m?(f=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[i,m]}),e[11]=i,e[12]=m,e[13]=f):f=e[13];let u;return e[14]!==l||e[15]!==o||e[16]!==a||e[17]!==f?(u=s.jsxs(Wt,{value:l,onSelect:o,className:"flex items-center gap-2.5",children:[a,f]}),e[14]=l,e[15]=o,e[16]=a,e[17]=f,e[18]=u):u=e[18],u}function _t(b){const e=T.c(41),{blockTypes:t,onInsert:r,children:l,align:o}=b,a=o===void 0?"start":o,i=D(),[m,f]=q.useState(!1),[u,p]=q.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=I=>{I&&typeof document<"u"&&p(document.querySelector('[data-slot="dialog-content"][data-state="open"]')),f(I)},e[0]=g):g=e[0];const h=g;let n,c;if(e[1]!==t){n=[],c=[];for(const I of t)(I.source==="site"?c:n).push(I);e[1]=t,e[2]=n,e[3]=c}else n=e[2],c=e[3];let d;e[4]!==r?(d=I=>{r(I),f(!1)},e[4]=r,e[5]=d):d=e[5];const x=d,v=n.length>0&&c.length>0;let j;e[6]!==l?(j=s.jsx(el,{asChild:!0,children:l}),e[6]=l,e[7]=j):j=e[7];const N=u??void 0;let k;e[8]!==i?(k=i("sandbox.blockPicker.searchPlaceholder"),e[8]=i,e[9]=k):k=e[9];let y;e[10]!==k?(y=s.jsx(Qt,{placeholder:k}),e[10]=k,e[11]=y):y=e[11];let w;e[12]!==i?(w=i("sandbox.blockPicker.noBlocksFound"),e[12]=i,e[13]=w):w=e[13];let S;e[14]!==w?(S=s.jsx(Yt,{children:w}),e[14]=w,e[15]=S):S=e[15];let C;e[16]!==x||e[17]!==v||e[18]!==c||e[19]!==i?(C=c.length>0&&s.jsx(Qe,{heading:v?i(Ze.site):void 0,children:c.map(I=>s.jsx(et,{type:I,onInsert:x},I.resolveType))}),e[16]=x,e[17]=v,e[18]=c,e[19]=i,e[20]=C):C=e[20];let P;e[21]!==n||e[22]!==x||e[23]!==v||e[24]!==i?(P=n.length>0&&s.jsx(Qe,{heading:v?i(Ze.app):void 0,children:n.map(I=>s.jsx(et,{type:I,onInsert:x},I.resolveType))}),e[21]=n,e[22]=x,e[23]=v,e[24]=i,e[25]=P):P=e[25];let _;e[26]!==C||e[27]!==P||e[28]!==S?(_=s.jsxs(Xt,{className:"min-h-0 flex-1",children:[S,C,P]}),e[26]=C,e[27]=P,e[28]=S,e[29]=_):_=e[29];let $;e[30]!==_||e[31]!==y?($=s.jsxs(Zt,{className:"min-h-0 flex-1",children:[y,_]}),e[30]=_,e[31]=y,e[32]=$):$=e[32];let B;e[33]!==a||e[34]!==$||e[35]!==N?(B=s.jsx(tl,{container:N,className:"flex max-h-(--radix-popover-content-available-height) w-80 flex-col p-0",align:a,children:$}),e[33]=a,e[34]=$,e[35]=N,e[36]=B):B=e[36];let L;return e[37]!==m||e[38]!==B||e[39]!==j?(L=s.jsxs(ll,{open:m,onOpenChange:h,children:[j,B]}),e[37]=m,e[38]=B,e[39]=j,e[40]=L):L=e[40],L}function $t(b){const e=T.c(12),{value:t,onChange:r,placeholder:l,children:o}=b;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Oe,{size:13,className:"shrink-0 text-muted-foreground"}),e[0]=a):a=e[0];let i;e[1]!==r?(i=p=>r(p.target.value),e[1]=r,e[2]=i):i=e[2];let m;e[3]!==l||e[4]!==i||e[5]!==t?(m=s.jsxs("div",{className:"flex items-center gap-1.5 rounded border px-2",children:[a,s.jsx("input",{autoFocus:!0,type:"text",value:t,placeholder:l,onChange:i,className:"h-7 flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"})]}),e[3]=l,e[4]=i,e[5]=t,e[6]=m):m=e[6];let f;e[7]!==o?(f=s.jsx("div",{className:"max-h-56 overflow-y-auto",children:o}),e[7]=o,e[8]=f):f=e[8];let u;return e[9]!==m||e[10]!==f?(u=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11],u}function It(b){const e=T.c(13),{label:t,sublabel:r,image:l,onPick:o}=b;let a;e[0]!==l?(a=l!==void 0&&s.jsx("img",{src:l,alt:"",className:"h-7 w-7 shrink-0 rounded object-cover"}),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==t?(i=s.jsx("span",{className:"block truncate text-sm",children:t}),e[2]=t,e[3]=i):i=e[3];let m;e[4]!==r?(m=r&&s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:r}),e[4]=r,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f=s.jsxs("span",{className:"min-w-0 flex-1",children:[i,m]}),e[6]=i,e[7]=m,e[8]=f):f=e[8];let u;return e[9]!==o||e[10]!==a||e[11]!==f?(u=s.jsxs("button",{type:"button",onMouseDown:Dl,onClick:o,className:"flex w-full items-center gap-2 rounded px-1.5 py-1.5 text-left transition-colors hover:bg-accent",children:[a,f]}),e[9]=o,e[10]=a,e[11]=f,e[12]=u):u=e[12],u}function Dl(b){return b.preventDefault()}function Ul(b){const e=T.c(7),{decofile:t,onPick:r}=b,l=D(),[o,a]=q.useState("");let i;if(e[0]!==t||e[1]!==r||e[2]!==l||e[3]!==o){const m=ml(t),f=o.trim().toLowerCase(),u=qt(t).filter(h=>!f||h.title.toLowerCase().includes(f)||h.slug.toLowerCase().includes(f)).slice(0,30),p=h=>m?xl(m,{category:h.categorySlugs[0]??"",slug:h.slug}):null;let g;e[5]!==l?(g=l("sandbox.linkPicker.searchPosts"),e[5]=l,e[6]=g):g=e[6],i=s.jsx($t,{value:o,onChange:a,placeholder:g,children:u.length===0?s.jsx("p",{className:"px-1.5 py-3 text-center text-xs text-muted-foreground",children:l("sandbox.linkPicker.noPosts")}):u.map(h=>{const n=p(h);return n?s.jsx(It,{label:h.title||h.slug,sublabel:n,onPick:()=>r(n)},h.key):null})}),e[0]=t,e[1]=r,e[2]=l,e[3]=o,e[4]=i}else i=e[4];return i}function Ol(b){const e=T.c(26),{sandboxRef:t,storeUrl:r,onPick:l}=b,o=D(),[a,i]=q.useState(""),[m,f]=q.useState(""),u=q.useRef(null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=y=>{i(y),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>f(y.trim()),300)},e[0]=p):p=e[0];const g=p;let h;e[1]!==m||e[2]!==t.branch||e[3]!==t.orgSlug||e[4]!==t.virtualMcpId?(h=zt.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`product-link:${m}`),e[1]=m,e[2]=t.branch,e[3]=t.orgSlug,e[4]=t.virtualMcpId,e[5]=h):h=e[5];let n;e[6]!==m||e[7]!==t?(n=async()=>{const[y]=hl("search",m);if(!y)return[];const w=await gl(t,y);return bl(w).filter(Hl)},e[6]=m,e[7]=t,e[8]=n):n=e[8];let c;e[9]!==h||e[10]!==n?(c={queryKey:h,queryFn:n},e[9]=h,e[10]=n,e[11]=c):c=e[11];const d=At(c);let x;e[12]!==d.data?(x=d.data??[],e[12]=d.data,e[13]=x):x=e[13];const v=x;let j;e[14]!==o?(j=o("sandbox.linkPicker.searchProducts"),e[14]=o,e[15]=j):j=e[15];let N;e[16]!==l||e[17]!==v||e[18]!==d.isFetching||e[19]!==r||e[20]!==o?(N=d.isFetching?s.jsxs("p",{className:"flex items-center justify-center gap-1.5 px-1.5 py-3 text-xs text-muted-foreground",children:[s.jsx(fl,{size:12,className:"animate-spin"}),o("sandbox.linkPicker.searching")]}):v.length===0?s.jsx("p",{className:"px-1.5 py-3 text-center text-xs text-muted-foreground",children:o("sandbox.linkPicker.noProducts")}):v.map(y=>s.jsx(It,{label:y.label,image:y.image??"",onPick:()=>{const w=pl(y.url,r);w&&l(w)}},y.id)),e[16]=l,e[17]=v,e[18]=d.isFetching,e[19]=r,e[20]=o,e[21]=N):N=e[21];let k;return e[22]!==j||e[23]!==N||e[24]!==a?(k=s.jsx($t,{value:a,onChange:g,placeholder:j,children:N}),e[22]=j,e[23]=N,e[24]=a,e[25]=k):k=e[25],k}function Hl(b){return b.url}function We(b){const e=T.c(24),{decofile:t,sandboxRef:r}=b,l=D();let o;e[0]!==t?(o=t?R(Mt(t).merged.storeUrl):"",e[0]=t,e[1]=o):o=e[1];const a=o;let i;if(e[2]!==t||e[3]!==r||e[4]!==a||e[5]!==l){if(i=[],t){let m;e[7]!==l?(m=l("sandbox.linkPicker.tabPost"),e[7]=l,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(dl,{size:12}),e[9]=f):f=e[9];let u;e[10]!==t?(u=g=>s.jsx(Ul,{decofile:t,onPick:g}),e[10]=t,e[11]=u):u=e[11];let p;e[12]!==m||e[13]!==u?(p={id:"post",label:m,icon:f,render:u},e[12]=m,e[13]=u,e[14]=p):p=e[14],i.push(p)}if(r){let m;e[15]!==l?(m=l("sandbox.linkPicker.tabProduct"),e[15]=l,e[16]=m):m=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ul,{size:12}),e[17]=f):f=e[17];let u;e[18]!==r||e[19]!==a?(u=g=>s.jsx(Ol,{sandboxRef:r,storeUrl:a,onPick:g}),e[18]=r,e[19]=a,e[20]=u):u=e[20];let p;e[21]!==m||e[22]!==u?(p={id:"product",label:m,icon:f,render:u},e[21]=m,e[22]=u,e[23]=p):p=e[23],i.push(p)}e[2]=t,e[3]=r,e[4]=a,e[5]=l,e[6]=i}else i=e[6];return i}function Ml({html:b,placeholder:e,onChange:t,decofile:r,sandboxRef:l}){const o=q.useRef(t);o.current=t;const[a,i]=q.useState(!1),m=He({extensions:[Me.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),Ve.configure({placeholder:e??"Write something…"})],content:b||"",editorProps:{attributes:{class:ne("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0",Ke)}},onUpdate:({editor:p})=>{const g=p.getHTML();o.current(g==="<p></p>"?"":g)}}),f=qe({editor:m,selector:({editor:p})=>({isFocused:p?.isFocused??!1,bold:p?.isActive("bold")??!1,italic:p?.isActive("italic")??!1,underline:p?.isActive("underline")??!1,link:p?.isActive("link")??!1})}),u=We({decofile:r,sandboxRef:l});return m?s.jsxs("div",{className:"relative",children:[(f.isFocused||a)&&s.jsxs("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md bg-popover p-0.5 shadow-soft",children:[s.jsx(ze,{active:f.bold,label:"Bold",onClick:()=>m.chain().focus().toggleBold().run(),children:s.jsx(jt,{size:14})}),s.jsx(ze,{active:f.italic,label:"Italic",onClick:()=>m.chain().focus().toggleItalic().run(),children:s.jsx(kt,{size:14})}),s.jsx(ze,{active:f.underline,label:"Underline",onClick:()=>m.chain().focus().toggleUnderline().run(),children:s.jsx(yt,{size:14})}),s.jsx(Ct,{editor:m,active:f.link,open:a,onOpenChange:i,sources:u})]}),s.jsx(Ge,{editor:m,className:"text-[15px] text-foreground"})]}):null}function ql(b,e){const t=b.length?b.split(`
2
2
  `):[""],r=e?"ol":"ul",l=t.map(o=>`<li><p>${o}</p></li>`).join("");return`<${r}>${l}</${r}>`}function Gl(b){const e=new DOMParser().parseFromString(b,"text/html").body,t=Array.from(e.querySelectorAll(":scope > ul > li, :scope > ol > li")),r=t.length?t:Array.from(e.children);return r.length===0?[""]:r.map(l=>{const o=l.children.length===1?l.children[0]:null;return(o?.tagName==="P"?o.innerHTML:l.innerHTML).trim()})}const Vl=({editor:b,state:e})=>b.isEditable&&(b.isFocused||!e.selection.empty),Kl={placement:"bottom-start",offset:8};function Lt(b){const e=T.c(11),{editor:t,appendTo:r,sources:l}=b,o=D(),[a,i]=q.useState(!1),[m,f]=q.useState(null),u=r??m;let p;e[0]!==t?(p={editor:t,selector:Jl},e[0]=t,e[1]=p):p=e[1];const g=qe(p);let h;e[2]!==t||e[3]!==a||e[4]!==g||e[5]!==l||e[6]!==o||e[7]!==u?(h=u&&s.jsxs(vl,{editor:t,appendTo:u,shouldShow:Vl,options:Kl,className:"z-50 flex items-center gap-0.5 rounded-md bg-popover p-0.5 shadow-soft",children:[s.jsx(ee,{active:g.bold,label:o("sectionsEditor.richTextField.bold"),onClick:()=>t.chain().focus().toggleBold().run(),children:s.jsx(jt,{size:14})}),s.jsx(ee,{active:g.italic,label:o("sectionsEditor.richTextField.italic"),onClick:()=>t.chain().focus().toggleItalic().run(),children:s.jsx(kt,{size:14})}),s.jsx(ee,{active:g.underline,label:o("sectionsEditor.richTextField.underline"),onClick:()=>t.chain().focus().toggleUnderline().run(),children:s.jsx(yt,{size:14})}),s.jsx(ee,{active:g.strike,label:o("sectionsEditor.richTextField.strikethrough"),onClick:()=>t.chain().focus().toggleStrike().run(),children:s.jsx(il,{size:14})}),s.jsx(Ct,{editor:t,active:g.link,open:a,onOpenChange:i,sources:l})]}),e[2]=t,e[3]=a,e[4]=g,e[5]=l,e[6]=o,e[7]=u,e[8]=h):h=e[8];let n;return e[9]!==h?(n=s.jsx("div",{ref:f,className:"relative z-20",children:h}),e[9]=h,e[10]=n):n=e[10],n}function Jl(b){const{editor:e}=b;return{bold:e.isActive("bold"),italic:e.isActive("italic"),underline:e.isActive("underline"),strike:e.isActive("strike"),link:e.isActive("link")}}const Wl=["1","2","3","4"],Ql={1:"sandbox.plainBlocks.headingLevel1",2:"sandbox.plainBlocks.headingLevel2",3:"sandbox.plainBlocks.headingLevel3",4:"sandbox.plainBlocks.headingLevel4"},tt={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function Yl(b){const e=T.c(23),{text:t,level:r,onChange:l}=b,[o,a]=q.useState(!1),i=D(),m=r||"2";let f;e[0]!==o||e[1]!==m||e[2]!==l||e[3]!==i||e[4]!==t?(f=o&&s.jsx(Je,{children:Wl.map(v=>s.jsxs(ee,{active:m===v,label:i(Ql[v]),onClick:()=>l({text:t,level:v}),children:["H",v]},v))}),e[0]=o,e[1]=m,e[2]=l,e[3]=i,e[4]=t,e[5]=f):f=e[5];let u;e[6]!==m||e[7]!==l?(u=v=>l({text:v,level:m}),e[6]=m,e[7]=l,e[8]=u):u=e[8];let p,g;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),g=()=>a(!1),e[9]=p,e[10]=g):(p=e[9],g=e[10]);let h;e[11]!==i?(h=i("sandbox.plainBlocks.headingPlaceholder"),e[11]=i,e[12]=h):h=e[12];const n=tt[m]??tt[2];let c;e[13]!==n?(c=ne("text-foreground",n),e[13]=n,e[14]=c):c=e[14];let d;e[15]!==u||e[16]!==h||e[17]!==c||e[18]!==t?(d=s.jsx(ae,{value:t,onChange:u,onFocus:p,onBlur:g,placeholder:h,className:c}),e[15]=u,e[16]=h,e[17]=c,e[18]=t,e[19]=d):d=e[19];let x;return e[20]!==f||e[21]!==d?(x=s.jsxs("div",{className:"relative",children:[f,d]}),e[20]=f,e[21]=d,e[22]=x):x=e[22],x}function Xl(b){const e=T.c(6),{quote:t,onChange:r}=b,l=D();let o;e[0]!==l?(o=l("sandbox.plainBlocks.quotePlaceholder"),e[0]=l,e[1]=o):o=e[1];let a;return e[2]!==r||e[3]!==t||e[4]!==o?(a=s.jsx("div",{className:"border-l-2 border-foreground/30 pl-4",children:s.jsx(ae,{value:t,onChange:r,placeholder:o,className:"text-lg italic text-foreground/90"})}),e[2]=r,e[3]=t,e[4]=o,e[5]=a):a=e[5],a}function Zl(b){const e=T.c(21),{code:t,language:r,onChange:l}=b,o=D();let a;e[0]!==t||e[1]!==l?(a=h=>l({code:t,language:h.target.value}),e[0]=t,e[1]=l,e[2]=a):a=e[2];let i;e[3]!==o?(i=o("sandbox.plainBlocks.languagePlaceholder"),e[3]=o,e[4]=i):i=e[4];let m;e[5]!==r||e[6]!==a||e[7]!==i?(m=s.jsx("input",{value:r,onChange:a,placeholder:i,className:"w-full border-b bg-transparent px-3 py-1.5 font-mono text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50"}),e[5]=r,e[6]=a,e[7]=i,e[8]=m):m=e[8];let f;e[9]!==r||e[10]!==l?(f=h=>l({code:h,language:r}),e[9]=r,e[10]=l,e[11]=f):f=e[11];let u;e[12]!==o?(u=o("sandbox.plainBlocks.codePlaceholder"),e[12]=o,e[13]=u):u=e[13];let p;e[14]!==t||e[15]!==f||e[16]!==u?(p=s.jsx(ae,{value:t,onChange:f,placeholder:u,spellCheck:!1,className:"px-3 py-2.5 font-mono text-sm text-foreground"}),e[14]=t,e[15]=f,e[16]=u,e[17]=p):p=e[17];let g;return e[18]!==m||e[19]!==p?(g=s.jsxs("div",{className:"overflow-hidden rounded-md border bg-muted/50",children:[m,p]}),e[18]=m,e[19]=p,e[20]=g):g=e[20],g}function es({items:b,style:e,onChange:t,decofile:r,sandboxRef:l}){const o=D(),a=We({decofile:r,sandboxRef:l}),i=q.useRef(t);i.current=t;const m=q.useRef(e);m.current=e;const f=He({extensions:[Me.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1,gapcursor:!1}),Ve.configure({placeholder:o("sandbox.plainBlocks.listItemPlaceholder")})],content:ql(b,e==="ordered"),editorProps:{attributes:{class:ne("focus:outline-none text-[15px] leading-relaxed","[&_ul]:list-disc [&_ol]:list-decimal [&_ul]:pl-7 [&_ol]:pl-7","[&_ul]:my-0 [&_ol]:my-0 [&_li]:pl-1.5 [&_li]:my-1 [&_p]:my-0","marker:text-muted-foreground marker:tabular-nums",Ke)},handleKeyDown:(p,g)=>g.key==="Tab"},onUpdate:({editor:p})=>{i.current({items:Gl(p.getHTML()).join(`
3
3
  `),style:p.isActive("orderedList")?"ordered":p.isActive("bulletList")?"unordered":m.current})}}),u=qe({editor:f,selector:({editor:p})=>({isFocused:p?.isFocused??!1,bullet:p?.isActive("bulletList")??!1,ordered:p?.isActive("orderedList")??!1})});return f?s.jsxs("div",{className:"relative",children:[u.isFocused&&s.jsxs(Je,{children:[s.jsx(ee,{active:u.bullet,label:o("sandbox.plainBlocks.bulletedLabel"),onClick:()=>!u.bullet&&f.chain().focus().toggleBulletList().run(),children:"•"}),s.jsx(ee,{active:u.ordered,label:o("sandbox.plainBlocks.numberedLabel"),onClick:()=>!u.ordered&&f.chain().focus().toggleOrderedList().run(),children:"1."})]}),s.jsx(Lt,{editor:f,sources:a}),s.jsx(Ge,{editor:f,className:"text-foreground"})]}):null}function ts(b){const e=b.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]{11})/);if(e)return`https://www.youtube.com/embed/${e[1]}`;const t=b.match(/vimeo\.com\/(\d+)/);return t?`https://player.vimeo.com/video/${t[1]}`:null}function ls(b){const e=T.c(28),{url:t,caption:r,onChange:l}=b,o=D();let a;e[0]!==t?(a=ts(t),e[0]=t,e[1]=a):a=e[1];const i=a;let m;e[2]!==r||e[3]!==i||e[4]!==o?(m=i?s.jsx("div",{className:"relative aspect-video overflow-hidden rounded-md border bg-muted",children:s.jsx("iframe",{src:i,title:r||o("sandbox.mediaBlocks.video"),sandbox:"allow-scripts allow-same-origin allow-presentation",className:"absolute inset-0 h-full w-full border-0",allowFullScreen:!0})}):s.jsx("div",{className:"flex aspect-video items-center justify-center rounded-md border border-dashed bg-muted/40 text-xs text-muted-foreground",children:o("sandbox.mediaBlocks.pasteVideoUrl")}),e[2]=r,e[3]=i,e[4]=o,e[5]=m):m=e[5];let f;e[6]!==r||e[7]!==l?(f=d=>l({url:d.target.value,caption:r}),e[6]=r,e[7]=l,e[8]=f):f=e[8];let u;e[9]!==o?(u=o("sandbox.mediaBlocks.videoUrlPlaceholder"),e[9]=o,e[10]=u):u=e[10];let p;e[11]!==f||e[12]!==u||e[13]!==t?(p=s.jsx("input",{value:t,onChange:f,placeholder:u,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[11]=f,e[12]=u,e[13]=t,e[14]=p):p=e[14];let g;e[15]!==l||e[16]!==t?(g=d=>l({url:t,caption:d}),e[15]=l,e[16]=t,e[17]=g):g=e[17];let h;e[18]!==o?(h=o("sandbox.mediaBlocks.addCaption"),e[18]=o,e[19]=h):h=e[19];let n;e[20]!==r||e[21]!==g||e[22]!==h?(n=s.jsx(ae,{value:r,onChange:g,placeholder:h,className:"text-center text-sm italic text-muted-foreground"}),e[20]=r,e[21]=g,e[22]=h,e[23]=n):n=e[23];let c;return e[24]!==m||e[25]!==p||e[26]!==n?(c=s.jsxs("div",{className:"space-y-2",children:[m,p,n]}),e[24]=m,e[25]=p,e[26]=n,e[27]=c):c=e[27],c}function ss(){const b=T.c(5),e=D();let t;b[0]!==e?(t=e("sandbox.mediaBlocks.divider"),b[0]=e,b[1]=t):t=b[1];let r;b[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("span",{className:"h-px flex-1 bg-border"}),b[2]=r):r=b[2];let l;return b[3]!==t?(l=s.jsx("div",{className:"flex items-center py-3","aria-label":t,children:r}),b[3]=t,b[4]=l):l=b[4],l}function os(b){const e=T.c(22),{text:t,href:r,onChange:l}=b,o=D();let a;e[0]!==r||e[1]!==l?(a=n=>l({text:n.target.value,href:r}),e[0]=r,e[1]=l,e[2]=a):a=e[2];let i;e[3]!==o?(i=o("sandbox.mediaBlocks.buttonLabel"),e[3]=o,e[4]=i):i=e[4];const m=Math.max(t.length||11,8);let f;e[5]!==a||e[6]!==i||e[7]!==m||e[8]!==t?(f=s.jsx("div",{className:"inline-flex items-center rounded-full bg-primary px-6 py-2 text-sm font-semibold text-primary-foreground",children:s.jsx("input",{value:t,onChange:a,placeholder:i,size:m,className:"border-0 bg-transparent p-0 text-center text-sm font-semibold text-primary-foreground outline-none placeholder:text-primary-foreground/60 focus:ring-0"})}),e[5]=a,e[6]=i,e[7]=m,e[8]=t,e[9]=f):f=e[9];let u;e[10]!==l||e[11]!==t?(u=n=>l({text:t,href:n.target.value}),e[10]=l,e[11]=t,e[12]=u):u=e[12];let p;e[13]!==o?(p=o("sandbox.mediaBlocks.destinationUrlPlaceholder"),e[13]=o,e[14]=p):p=e[14];let g;e[15]!==r||e[16]!==u||e[17]!==p?(g=s.jsx("input",{value:r,onChange:u,placeholder:p,className:"w-full max-w-sm border-0 bg-transparent p-0 text-center text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[15]=r,e[16]=u,e[17]=p,e[18]=g):g=e[18];let h;return e[19]!==f||e[20]!==g?(h=s.jsxs("div",{className:"flex flex-col items-center gap-2 py-2",children:[f,g]}),e[19]=f,e[20]=g,e[21]=h):h=e[21],h}const Ae=[{value:"info",icon:"ℹ",color:"oklch(0.62 0.19 250)"},{value:"tip",icon:"✓",color:"oklch(0.65 0.17 150)"},{value:"warning",icon:"⚠",color:"oklch(0.75 0.15 75)"},{value:"product",icon:"★",color:"oklch(0.62 0.21 300)"}];function ns(b){const e=T.c(51),{title:t,body:r,variant:l,onChange:o}=b,a=D(),[i,m]=q.useState(!1);let f;e[0]!==l?(f=Ae.find(B=>B.value===l)??Ae[0],e[0]=l,e[1]=f):f=e[1];const u=f;let p,g;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>m(!0),g=B=>{B.currentTarget.contains(B.relatedTarget)||m(!1)},e[2]=p,e[3]=g):(p=e[2],g=e[3]);let h;e[4]!==r||e[5]!==i||e[6]!==o||e[7]!==t||e[8]!==u.value?(h=i&&s.jsx(Je,{children:Ae.map(B=>s.jsx(ee,{active:u.value===B.value,label:B.value,onClick:()=>o({title:t,body:r,variant:B.value}),children:s.jsx("span",{style:{color:B.color},children:B.icon})},B.value))}),e[4]=r,e[5]=i,e[6]=o,e[7]=t,e[8]=u.value,e[9]=h):h=e[9];const n=`3px solid ${u.color}`,c=`color-mix(in oklch, ${u.color} 8%, transparent)`;let d;e[10]!==n||e[11]!==c?(d={borderLeft:n,backgroundColor:c},e[10]=n,e[11]=c,e[12]=d):d=e[12];let x;e[13]!==u.color?(x={color:u.color},e[13]=u.color,e[14]=x):x=e[14];let v;e[15]!==u.icon?(v=s.jsx("span",{"aria-hidden":!0,className:"text-sm font-bold leading-none",children:u.icon}),e[15]=u.icon,e[16]=v):v=e[16];let j;e[17]!==r||e[18]!==o||e[19]!==l?(j=B=>o({title:B.target.value,body:r,variant:l}),e[17]=r,e[18]=o,e[19]=l,e[20]=j):j=e[20];let N;e[21]!==a?(N=a("sandbox.mediaBlocks.calloutTitle"),e[21]=a,e[22]=N):N=e[22];let k;e[23]!==u.color?(k={color:u.color},e[23]=u.color,e[24]=k):k=e[24];let y;e[25]!==j||e[26]!==N||e[27]!==k||e[28]!==t?(y=s.jsx("input",{value:t,onChange:j,placeholder:N,className:"flex-1 border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none focus:ring-0",style:k}),e[25]=j,e[26]=N,e[27]=k,e[28]=t,e[29]=y):y=e[29];let w;e[30]!==y||e[31]!==x||e[32]!==v?(w=s.jsxs("div",{className:"mb-1.5 flex items-center gap-2",style:x,children:[v,y]}),e[30]=y,e[31]=x,e[32]=v,e[33]=w):w=e[33];let S;e[34]!==o||e[35]!==t||e[36]!==l?(S=B=>o({title:t,body:B,variant:l}),e[34]=o,e[35]=t,e[36]=l,e[37]=S):S=e[37];let C;e[38]!==a?(C=a("sandbox.mediaBlocks.calloutText"),e[38]=a,e[39]=C):C=e[39];let P;e[40]!==r||e[41]!==S||e[42]!==C?(P=s.jsx(ae,{value:r,onChange:S,placeholder:C,className:"text-[15px] leading-relaxed text-foreground"}),e[40]=r,e[41]=S,e[42]=C,e[43]=P):P=e[43];let _;e[44]!==w||e[45]!==P||e[46]!==d?(_=s.jsxs("div",{className:"rounded-md py-4 pl-5 pr-4",style:d,children:[w,P]}),e[44]=w,e[45]=P,e[46]=d,e[47]=_):_=e[47];let $;return e[48]!==_||e[49]!==h?($=s.jsxs("div",{className:"relative",onFocus:p,onBlur:g,children:[h,_]}),e[48]=_,e[49]=h,e[50]=$):$=e[50],$}function rs(b){const e=T.c(34),{value:t,label:r,description:l,onChange:o}=b,a=D();let i;e[0]!==l||e[1]!==r||e[2]!==o?(i=x=>o({value:x.target.value,label:r,description:l}),e[0]=l,e[1]=r,e[2]=o,e[3]=i):i=e[3];let m;e[4]!==a?(m=a("sandbox.mediaBlocks.statValuePlaceholder"),e[4]=a,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m||e[8]!==t?(f=s.jsx("input",{value:t,onChange:i,placeholder:m,className:"w-full border-0 bg-transparent p-0 text-center text-4xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[6]=i,e[7]=m,e[8]=t,e[9]=f):f=e[9];let u;e[10]!==l||e[11]!==o||e[12]!==t?(u=x=>o({value:t,label:x.target.value,description:l}),e[10]=l,e[11]=o,e[12]=t,e[13]=u):u=e[13];let p;e[14]!==a?(p=a("sandbox.mediaBlocks.label"),e[14]=a,e[15]=p):p=e[15];let g;e[16]!==r||e[17]!==u||e[18]!==p?(g=s.jsx("input",{value:r,onChange:u,placeholder:p,className:"w-full border-0 bg-transparent p-0 text-center text-xs font-semibold uppercase tracking-wide text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[16]=r,e[17]=u,e[18]=p,e[19]=g):g=e[19];let h;e[20]!==r||e[21]!==o||e[22]!==t?(h=x=>o({value:t,label:r,description:x}),e[20]=r,e[21]=o,e[22]=t,e[23]=h):h=e[23];let n;e[24]!==a?(n=a("sandbox.mediaBlocks.optionalDescription"),e[24]=a,e[25]=n):n=e[25];let c;e[26]!==l||e[27]!==h||e[28]!==n?(c=s.jsx(ae,{value:l,onChange:h,placeholder:n,className:"max-w-md text-center text-sm text-muted-foreground"}),e[26]=l,e[27]=h,e[28]=n,e[29]=c):c=e[29];let d;return e[30]!==f||e[31]!==g||e[32]!==c?(d=s.jsxs("div",{className:"flex flex-col items-center gap-1.5 border-y border-border/60 py-8 text-center",children:[f,g,c]}),e[30]=f,e[31]=g,e[32]=c,e[33]=d):d=e[33],d}function is(b){const e=T.c(74),{block:t,onChange:r}=b,l=D();let o;e[0]!==t.size?(o=R(t.size)||"normal",e[0]=t.size,e[1]=o):o=e[1];const a=o,i=t.url,m=t.mobileUrl;let f,u;e[2]!==t||e[3]!==r?(f=E=>r({...t,url:E}),u=E=>r({...t,mobileUrl:E}),e[2]=t,e[3]=r,e[4]=f,e[5]=u):(f=e[4],u=e[5]);let p;e[6]!==t.alt?(p=R(t.alt),e[6]=t.alt,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=["normal","full"],e[8]=g):g=e[8];let h;e[9]!==t||e[10]!==r||e[11]!==a||e[12]!==l?(h=g.map(E=>s.jsx(ee,{active:a===E,label:E,onClick:()=>r({...t,size:E}),children:s.jsx("span",{className:"px-0.5 text-xs",children:l(E==="full"?"sandbox.mediaBlocks.fullWidth":"sandbox.mediaBlocks.normal")})},E)),e[9]=t,e[10]=r,e[11]=a,e[12]=l,e[13]=h):h=e[13];const n=t.highPriority===!0;let c;e[14]!==l?(c=l("sandbox.mediaBlocks.highPriority"),e[14]=l,e[15]=c):c=e[15];let d;e[16]!==t||e[17]!==r?(d=()=>r({...t,highPriority:t.highPriority?void 0:!0}),e[16]=t,e[17]=r,e[18]=d):d=e[18];let x;e[19]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(jl,{size:14}),e[19]=x):x=e[19];let v;e[20]!==c||e[21]!==d||e[22]!==n?(v=s.jsx(kl,{asChild:!0,children:s.jsx("span",{children:s.jsx(ee,{active:n,label:c,onClick:d,children:x})})}),e[20]=c,e[21]=d,e[22]=n,e[23]=v):v=e[23];let j;e[24]!==l?(j=l("sandbox.mediaBlocks.highPriorityHint"),e[24]=l,e[25]=j):j=e[25];let N;e[26]!==j?(N=s.jsx(yl,{className:"max-w-64",children:j}),e[26]=j,e[27]=N):N=e[27];let k;e[28]!==v||e[29]!==N?(k=s.jsxs(Nl,{children:[v,N]}),e[28]=v,e[29]=N,e[30]=k):k=e[30];let y;e[31]!==k||e[32]!==h?(y=s.jsxs(s.Fragment,{children:[h,k]}),e[31]=k,e[32]=h,e[33]=y):y=e[33];let w;e[34]!==t.mobileUrl||e[35]!==t.url||e[36]!==y||e[37]!==f||e[38]!==u||e[39]!==p?(w=s.jsx(Al,{value:i,mobileValue:m,onChange:f,onMobileChange:u,alt:p,toolbarExtras:y}),e[34]=t.mobileUrl,e[35]=t.url,e[36]=y,e[37]=f,e[38]=u,e[39]=p,e[40]=w):w=e[40];let S;e[41]!==t.caption?(S=R(t.caption),e[41]=t.caption,e[42]=S):S=e[42];let C;e[43]!==t||e[44]!==r?(C=E=>r({...t,caption:E}),e[43]=t,e[44]=r,e[45]=C):C=e[45];let P;e[46]!==l?(P=l("sandbox.mediaBlocks.addCaption"),e[46]=l,e[47]=P):P=e[47];let _;e[48]!==S||e[49]!==C||e[50]!==P?(_=s.jsx(ae,{value:S,onChange:C,placeholder:P,className:"text-center text-sm italic text-muted-foreground"}),e[48]=S,e[49]=C,e[50]=P,e[51]=_):_=e[51];let $;e[52]!==l?($=l("sandbox.mediaBlocks.altLabel"),e[52]=l,e[53]=$):$=e[53];let B;e[54]!==$?(B=s.jsx("span",{className:"shrink-0 font-medium",children:$}),e[54]=$,e[55]=B):B=e[55];let L;e[56]!==t.alt?(L=R(t.alt),e[56]=t.alt,e[57]=L):L=e[57];let I;e[58]!==t||e[59]!==r?(I=E=>r({...t,alt:E}),e[58]=t,e[59]=r,e[60]=I):I=e[60];let A;e[61]!==l?(A=l("sandbox.mediaBlocks.altText"),e[61]=l,e[62]=A):A=e[62];let U;e[63]!==L||e[64]!==I||e[65]!==A?(U=s.jsx(ae,{value:L,onChange:I,placeholder:A,className:"text-xs"}),e[63]=L,e[64]=I,e[65]=A,e[66]=U):U=e[66];let O;e[67]!==B||e[68]!==U?(O=s.jsxs("div",{className:"flex items-baseline gap-1.5 text-xs text-muted-foreground",children:[B,U]}),e[67]=B,e[68]=U,e[69]=O):O=e[69];let M;return e[70]!==w||e[71]!==_||e[72]!==O?(M=s.jsxs("div",{className:"space-y-2",children:[w,_,O]}),e[70]=w,e[71]=_,e[72]=O,e[73]=M):M=e[73],M}function as(b){const e=T.c(21),{cards:t,onChange:r}=b,l=D();let o,a,i,m,f;if(e[0]!==t||e[1]!==r||e[2]!==l){a=be(t);let h;e[8]!==r?(h=c=>r(JSON.stringify(c)),e[8]=r,e[9]=h):h=e[9],o=h;const n=(c,d)=>o(a.map((x,v)=>v===c?{...x,...d}:x));f="space-y-2",i="grid grid-cols-1 gap-3 sm:grid-cols-3",m=a.slice(0,3).map((c,d)=>s.jsxs("div",{className:"group/item relative flex flex-col gap-2 rounded-lg border bg-card p-4",children:[s.jsx("div",{className:"absolute right-1 top-1",children:s.jsx(ue,{label:l("sandbox.listBlocks.removeCard"),onClick:()=>o(a.filter((x,v)=>v!==d))})}),s.jsx("input",{value:R(c.icon),onChange:x=>n(d,{icon:x.target.value}),placeholder:"🎴",className:"flex h-9 w-9 items-center justify-center rounded-md border bg-background text-center text-lg outline-none focus:ring-0"}),s.jsx("input",{value:R(c.title),onChange:x=>n(d,{title:x.target.value}),placeholder:l("sandbox.listBlocks.cardTitle"),className:"border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(ae,{value:R(c.body),onChange:x=>n(d,{body:x}),placeholder:l("sandbox.listBlocks.cardBody"),className:"text-sm text-muted-foreground"})]},d)),e[0]=t,e[1]=r,e[2]=l,e[3]=o,e[4]=a,e[5]=i,e[6]=m,e[7]=f}else o=e[3],a=e[4],i=e[5],m=e[6],f=e[7];let u;e[10]!==i||e[11]!==m?(u=s.jsx("div",{className:i,children:m}),e[10]=i,e[11]=m,e[12]=u):u=e[12];let p;e[13]!==o||e[14]!==a||e[15]!==l?(p=a.length<3&&s.jsx(fe,{label:l("sandbox.listBlocks.addCard"),onClick:()=>o([...a,{title:"",body:""}])}),e[13]=o,e[14]=a,e[15]=l,e[16]=p):p=e[16];let g;return e[17]!==f||e[18]!==u||e[19]!==p?(g=s.jsxs("div",{className:f,children:[u,p]}),e[17]=f,e[18]=u,e[19]=p,e[20]=g):g=e[20],g}function cs(b){const e=T.c(36),{title:t,items:r,onChange:l}=b,o=D();let a,i,m,f,u;if(e[0]!==r||e[1]!==l||e[2]!==o||e[3]!==t){i=be(r);let d;e[9]!==l||e[10]!==t?(d=j=>l({title:t,items:JSON.stringify(j)}),e[9]=l,e[10]=t,e[11]=d):d=e[11],a=d,f="space-y-2";let x;e[12]!==r||e[13]!==l?(x=j=>l({title:j.target.value,items:r}),e[12]=r,e[13]=l,e[14]=x):x=e[14];let v;e[15]!==o?(v=o("sandbox.listBlocks.checklistTitle"),e[15]=o,e[16]=v):v=e[16],e[17]!==x||e[18]!==v||e[19]!==t?(u=s.jsx("input",{value:t,onChange:x,placeholder:v,className:"w-full border-0 bg-transparent p-0 text-lg font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[17]=x,e[18]=v,e[19]=t,e[20]=u):u=e[20],m=i.map((j,N)=>s.jsxs("li",{className:"group/item flex items-start gap-3 border-b border-border/50 py-2.5",children:[s.jsx("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center text-primary",children:s.jsx(Ft,{size:15})}),s.jsx(ae,{value:j,onChange:k=>a(i.map((y,w)=>w===N?k:y)),placeholder:o("sandbox.listBlocks.checklistItem"),className:"text-[15px] text-foreground"}),s.jsx(ue,{label:o("sandbox.listBlocks.removeItem"),onClick:()=>a(i.filter((k,y)=>y!==N))})]},N)),e[0]=r,e[1]=l,e[2]=o,e[3]=t,e[4]=a,e[5]=i,e[6]=m,e[7]=f,e[8]=u}else a=e[4],i=e[5],m=e[6],f=e[7],u=e[8];let p;e[21]!==m?(p=s.jsx("ul",{children:m}),e[21]=m,e[22]=p):p=e[22];let g;e[23]!==o?(g=o("sandbox.listBlocks.addItem"),e[23]=o,e[24]=g):g=e[24];let h;e[25]!==a||e[26]!==i?(h=()=>a([...i,""]),e[25]=a,e[26]=i,e[27]=h):h=e[27];let n;e[28]!==g||e[29]!==h?(n=s.jsx(fe,{label:g,onClick:h}),e[28]=g,e[29]=h,e[30]=n):n=e[30];let c;return e[31]!==f||e[32]!==u||e[33]!==p||e[34]!==n?(c=s.jsxs("div",{className:f,children:[u,p,n]}),e[31]=f,e[32]=u,e[33]=p,e[34]=n,e[35]=c):c=e[35],c}function ds(b){const e=T.c(21),{stats:t,onChange:r}=b,l=D();let o,a,i,m,f;if(e[0]!==r||e[1]!==t||e[2]!==l){a=be(t);let h;e[8]!==r?(h=c=>r(JSON.stringify(c)),e[8]=r,e[9]=h):h=e[9],o=h;const n=(c,d)=>o(a.map((x,v)=>v===c?{...x,...d}:x));f="space-y-2",i="grid grid-cols-1 gap-3 sm:grid-cols-3",m=a.slice(0,3).map((c,d)=>s.jsxs("div",{className:"group/item relative rounded-lg border p-5 text-center",children:[s.jsx("div",{className:"absolute right-1 top-1",children:s.jsx(ue,{label:l("sandbox.listBlocks.removeStat"),onClick:()=>o(a.filter((x,v)=>v!==d))})}),s.jsx("input",{value:R(c.value),onChange:x=>n(d,{value:x.target.value}),placeholder:l("sandbox.listBlocks.statValuePlaceholder"),className:"w-full border-0 bg-transparent p-0 text-center text-3xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),s.jsx("input",{value:R(c.label),onChange:x=>n(d,{label:x.target.value}),placeholder:l("sandbox.listBlocks.label"),className:"mt-1 w-full border-0 bg-transparent p-0 text-center text-sm text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"})]},d)),e[0]=r,e[1]=t,e[2]=l,e[3]=o,e[4]=a,e[5]=i,e[6]=m,e[7]=f}else o=e[3],a=e[4],i=e[5],m=e[6],f=e[7];let u;e[10]!==i||e[11]!==m?(u=s.jsx("div",{className:i,children:m}),e[10]=i,e[11]=m,e[12]=u):u=e[12];let p;e[13]!==o||e[14]!==a||e[15]!==l?(p=a.length<3&&s.jsx(fe,{label:l("sandbox.listBlocks.addStat"),onClick:()=>o([...a,{value:"",label:""}])}),e[13]=o,e[14]=a,e[15]=l,e[16]=p):p=e[16];let g;return e[17]!==f||e[18]!==u||e[19]!==p?(g=s.jsxs("div",{className:f,children:[u,p]}),e[17]=f,e[18]=u,e[19]=p,e[20]=g):g=e[20],g}function us(b){const e=T.c(38),{title:t,steps:r,onChange:l}=b,o=D();let a,i,m,f,u,p;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==t){i=be(r);let x;e[10]!==l||e[11]!==t?(x=k=>l({title:t,steps:JSON.stringify(k)}),e[10]=l,e[11]=t,e[12]=x):x=e[12],a=x;const v=(k,y)=>a(i.map((w,S)=>S===k?{...w,...y}:w));u="space-y-2";let j;e[13]!==l||e[14]!==r?(j=k=>l({title:k.target.value,steps:r}),e[13]=l,e[14]=r,e[15]=j):j=e[15];let N;e[16]!==o?(N=o("sandbox.listBlocks.stepsTitle"),e[16]=o,e[17]=N):N=e[17],e[18]!==j||e[19]!==N||e[20]!==t?(p=s.jsx("input",{value:t,onChange:j,placeholder:N,className:"w-full border-0 bg-transparent p-0 text-lg font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[18]=j,e[19]=N,e[20]=t,e[21]=p):p=e[21],m="space-y-3",f=i.map((k,y)=>s.jsxs("li",{className:"group/item flex gap-4",children:[s.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border text-sm font-semibold text-muted-foreground",children:y+1}),s.jsxs("div",{className:"min-w-0 flex-1 space-y-1 pt-0.5",children:[s.jsx("input",{value:R(k.title),onChange:w=>v(y,{title:w.target.value}),placeholder:o("sandbox.listBlocks.stepTitle"),className:"w-full border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(ae,{value:R(k.description),onChange:w=>v(y,{description:w}),placeholder:o("sandbox.listBlocks.stepDescription"),className:"text-sm text-muted-foreground"})]}),s.jsx(ue,{label:o("sandbox.listBlocks.removeStep"),onClick:()=>a(i.filter((w,S)=>S!==y))})]},y)),e[0]=l,e[1]=r,e[2]=o,e[3]=t,e[4]=a,e[5]=i,e[6]=m,e[7]=f,e[8]=u,e[9]=p}else a=e[4],i=e[5],m=e[6],f=e[7],u=e[8],p=e[9];let g;e[22]!==m||e[23]!==f?(g=s.jsx("ol",{className:m,children:f}),e[22]=m,e[23]=f,e[24]=g):g=e[24];let h;e[25]!==o?(h=o("sandbox.listBlocks.addStep"),e[25]=o,e[26]=h):h=e[26];let n;e[27]!==a||e[28]!==i?(n=()=>a([...i,{title:"",description:""}]),e[27]=a,e[28]=i,e[29]=n):n=e[29];let c;e[30]!==h||e[31]!==n?(c=s.jsx(fe,{label:h,onClick:n}),e[30]=h,e[31]=n,e[32]=c):c=e[32];let d;return e[33]!==u||e[34]!==p||e[35]!==g||e[36]!==c?(d=s.jsxs("div",{className:u,children:[p,g,c]}),e[33]=u,e[34]=p,e[35]=g,e[36]=c,e[37]=d):d=e[37],d}function lt(b,e){try{const t=JSON.parse(b||"{}");return{title:typeof t?.title=="string"?t.title:e,items:Array.isArray(t?.items)?t.items.map(R):[]}}catch{return{title:e,items:[]}}}function fs(b){const e=T.c(13),{left:t,right:r,onChange:l}=b,o=D();let a;if(e[0]!==t||e[1]!==l||e[2]!==r||e[3]!==o){const i={left:lt(t,o("sandbox.listBlocks.optionA")),right:lt(r,o("sandbox.listBlocks.optionB"))};let m;e[5]!==t||e[6]!==l||e[7]!==r?(m=(h,n)=>l({left:h==="left"?JSON.stringify(n):t,right:h==="right"?JSON.stringify(n):r}),e[5]=t,e[6]=l,e[7]=r,e[8]=m):m=e[8];const f=m;let u;e[9]!==f||e[10]!==o?(u=(h,n,c)=>{const d=n.items??[];return s.jsxs("div",{className:"space-y-2 rounded-lg border p-4",children:[s.jsx("input",{value:R(n.title),onChange:x=>f(h,{...n,title:x.target.value}),placeholder:o("sandbox.listBlocks.columnTitle"),className:"w-full border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx("ul",{className:"space-y-1.5",children:d.map((x,v)=>s.jsxs("li",{className:"group/item flex items-start gap-2",children:[s.jsx("span",{"aria-hidden":!0,className:"mt-0.5 shrink-0 text-sm font-bold",style:{color:c},children:"✓"}),s.jsx(ae,{value:x,onChange:j=>f(h,{...n,items:d.map((N,k)=>k===v?j:N)}),placeholder:o("sandbox.listBlocks.item"),className:"text-sm text-foreground"}),s.jsx(ue,{label:o("sandbox.listBlocks.removeItem"),onClick:()=>f(h,{...n,items:d.filter((j,N)=>N!==v)})})]},v))}),s.jsx(fe,{label:o("sandbox.listBlocks.addItem"),onClick:()=>f(h,{...n,items:[...d,""]})})]})},e[9]=f,e[10]=o,e[11]=u):u=e[11];const p=u;let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=ne("grid grid-cols-1 gap-3 sm:grid-cols-2"),e[12]=g):g=e[12],a=s.jsxs("div",{className:g,children:[p("left",i.left,"oklch(0.65 0.17 150)"),p("right",i.right,"oklch(0.75 0.15 75)")]}),e[0]=t,e[1]=l,e[2]=r,e[3]=o,e[4]=a}else a=e[4];return a}const ms=["normal","h1","h2","h3"],xs=/^<(h[1-3])>([\s\S]*)<\/\1>$/i;function ps(b){const e=b.match(xs);return e?{level:e[1].toLowerCase(),text:e[2]}:{level:"normal",text:b}}function st(b,e){return e?b==="normal"?e:`<${b}>${e}</${b}>`:""}const ot={normal:"sandbox.productBlocks.headingNormal",h1:"sandbox.productBlocks.headingH1",h2:"sandbox.productBlocks.headingH2",h3:"sandbox.productBlocks.headingH3"},hs={normal:"text-lg font-semibold",h1:"text-3xl font-bold",h2:"text-2xl font-bold",h3:"text-xl font-semibold"};function gs(b){const e=T.c(27),{value:t,onChange:r}=b,l=D();let o,a,i,m,f;e[0]!==r||e[1]!==l||e[2]!==t?({level:o,text:f}=ps(t),m="space-y-1.5",a="flex items-center gap-0.5",i=ms.map(x=>s.jsx(ee,{active:o===x,label:l(ot[x]),onClick:()=>r(st(x,f)),children:l(ot[x])},x)),e[0]=r,e[1]=l,e[2]=t,e[3]=o,e[4]=a,e[5]=i,e[6]=m,e[7]=f):(o=e[3],a=e[4],i=e[5],m=e[6],f=e[7]);let u;e[8]!==a||e[9]!==i?(u=s.jsx("div",{className:a,children:i}),e[8]=a,e[9]=i,e[10]=u):u=e[10];let p;e[11]!==o||e[12]!==r?(p=x=>r(st(o,x.target.value)),e[11]=o,e[12]=r,e[13]=p):p=e[13];let g;e[14]!==l?(g=l("sandbox.productBlocks.shelfTitlePlaceholder"),e[14]=l,e[15]=g):g=e[15];const h=hs[o];let n;e[16]!==h?(n=ne("w-full border-0 bg-transparent p-0 outline-none placeholder:text-muted-foreground/50 focus:ring-0",h),e[16]=h,e[17]=n):n=e[17];let c;e[18]!==p||e[19]!==g||e[20]!==n||e[21]!==f?(c=s.jsx("input",{value:f,onChange:p,placeholder:g,className:n}),e[18]=p,e[19]=g,e[20]=n,e[21]=f,e[22]=c):c=e[22];let d;return e[23]!==m||e[24]!==u||e[25]!==c?(d=s.jsxs("div",{className:m,children:[u,c]}),e[23]=m,e[24]=u,e[25]=c,e[26]=d):d=e[26],d}function Tt(b){const e=T.c(4),{label:t,onClick:r}=b;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Oe,{size:13}),e[0]=l):l=e[0];let o;return e[1]!==t||e[2]!==r?(o=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[l,t]}),e[1]=t,e[2]=r,e[3]=o):o=e[3],o}function Et(b){const e=T.c(9),{option:t,loading:r,className:l,iconSize:o}=b,a=o===void 0?18:o;let i;e[0]!==l?(i=ne("flex items-center justify-center overflow-hidden bg-muted text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let m;e[2]!==a||e[3]!==r||e[4]!==t?(m=t?.image?s.jsx("img",{src:t.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-contain p-1.5"}):r?s.jsx(Dt,{size:"xs"}):s.jsx(wt,{size:a}),e[2]=a,e[3]=r,e[4]=t,e[5]=m):m=e[5];let f;return e[6]!==i||e[7]!==m?(f=s.jsx("span",{className:i,children:m}),e[6]=i,e[7]=m,e[8]=f):f=e[8],f}function bs(b){const e=T.c(50),{id:t,option:r,loading:l,onRemove:o}=b,a=D();let i;e[0]!==t?(i={id:t},e[0]=t,e[1]=i):i=e[1];const{attributes:m,listeners:f,setNodeRef:u,transform:p,transition:g,isDragging:h}=ht(i);let n;e[2]!==p?(n=ft.Transform.toString(p),e[2]=p,e[3]=n):n=e[3];let c;e[4]!==n||e[5]!==g?(c={transform:n,transition:g},e[4]=n,e[5]=g,e[6]=c):c=e[6];const d=h&&"z-10 opacity-60";let x;e[7]!==d?(x=ne("group/card relative flex flex-col overflow-hidden rounded-md border bg-background",d),e[7]=d,e[8]=x):x=e[8];let v;e[9]!==l||e[10]!==r?(v=s.jsx(Et,{option:r,loading:l,className:"h-full w-full"}),e[9]=l,e[10]=r,e[11]=v):v=e[11];let j;e[12]!==a?(j=a("sandbox.productBlocks.dragToReorderLabel"),e[12]=a,e[13]=j):j=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Nt,{size:13}),e[14]=N):N=e[14];let k;e[15]!==m||e[16]!==f||e[17]!==j?(k=s.jsx("button",{type:"button","aria-label":j,...m,...f,className:"absolute left-1 top-1 flex h-6 w-6 cursor-grab items-center justify-center bg-background/80 text-muted-foreground opacity-0 backdrop-blur-sm transition-opacity hover:text-foreground active:cursor-grabbing group-hover/card:opacity-100 rounded-lg",children:N}),e[15]=m,e[16]=f,e[17]=j,e[18]=k):k=e[18];let y;e[19]!==a?(y=a("sandbox.productBlocks.removeProductLabel"),e[19]=a,e[20]=y):y=e[20];let w;e[21]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx($l,{size:13}),e[21]=w):w=e[21];let S;e[22]!==o||e[23]!==y?(S=s.jsx("button",{type:"button","aria-label":y,onClick:o,className:"absolute right-1 top-1 flex h-6 w-6 items-center justify-center bg-background/80 text-muted-foreground opacity-0 backdrop-blur-sm transition-opacity hover:text-destructive group-hover/card:opacity-100 cursor-pointer rounded-lg",children:w}),e[22]=o,e[23]=y,e[24]=S):S=e[24];let C;e[25]!==S||e[26]!==v||e[27]!==k?(C=s.jsxs("div",{className:"relative aspect-square",children:[v,k,S]}),e[25]=S,e[26]=v,e[27]=k,e[28]=C):C=e[28];let P;e[29]!==t||e[30]!==l||e[31]!==r?.label||e[32]!==a?(P=r?.label??(l?a("sandbox.productBlocks.loadingEllipsis"):a("sandbox.productBlocks.productWithId",{id:t})),e[29]=t,e[30]=l,e[31]=r?.label,e[32]=a,e[33]=P):P=e[33];let _;e[34]!==P?(_=s.jsx("p",{className:"line-clamp-2 text-xs leading-tight text-foreground",children:P}),e[34]=P,e[35]=_):_=e[35];let $;e[36]!==t||e[37]!==a?($=a("sandbox.productBlocks.idLabel",{id:t}),e[36]=t,e[37]=a,e[38]=$):$=e[38];let B;e[39]!==$?(B=s.jsx("p",{className:"text-2xs text-muted-foreground",children:$}),e[39]=$,e[40]=B):B=e[40];let L;e[41]!==_||e[42]!==B?(L=s.jsxs("div",{className:"flex flex-col gap-0.5 p-2",children:[_,B]}),e[41]=_,e[42]=B,e[43]=L):L=e[43];let I;return e[44]!==u||e[45]!==C||e[46]!==L||e[47]!==c||e[48]!==x?(I=s.jsxs("div",{ref:u,style:c,className:x,children:[C,L]}),e[44]=u,e[45]=C,e[46]=L,e[47]=c,e[48]=x,e[49]=I):I=e[49],I}function vs(b){const e=T.c(21),{ids:t,lookup:r,onReorder:l,onRemove:o}=b;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={activationConstraint:{distance:6}},e[0]=a):a=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={coordinateGetter:mt},e[1]=i):i=e[1];const m=it($e(ct,a),$e(at,i));let f;e[2]!==t||e[3]!==l?(f=c=>{const{active:d,over:x}=c;if(!x||d.id===x.id)return;const v=t.indexOf(String(d.id)),j=t.indexOf(String(x.id));v===-1||j===-1||l(xt(t,v,j))},e[2]=t,e[3]=l,e[4]=f):f=e[4];const u=f;let p;if(e[5]!==t||e[6]!==r||e[7]!==o){let c;e[9]!==r||e[10]!==o?(c=d=>s.jsx(bs,{id:d,option:r.byId.get(d),loading:r.isLoading&&!r.byId.get(d),onRemove:()=>o(d)},d),e[9]=r,e[10]=o,e[11]=c):c=e[11],p=t.map(c),e[5]=t,e[6]=r,e[7]=o,e[8]=p}else p=e[8];let g;e[12]!==p?(g=s.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:p}),e[12]=p,e[13]=g):g=e[13];let h;e[14]!==t||e[15]!==g?(h=s.jsx(pt,{items:t,strategy:Ut,children:g}),e[14]=t,e[15]=g,e[16]=h):h=e[16];let n;return e[17]!==u||e[18]!==m||e[19]!==h?(n=s.jsx(dt,{sensors:m,collisionDetection:ut,onDragEnd:u,children:h}),e[17]=u,e[18]=m,e[19]=h,e[20]=n):n=e[20],n}function js(b){const e=T.c(13),{onBrowse:t}=b,r=D();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx(al,{size:16})}),e[0]=l):l=e[0];let o;e[1]!==r?(o=r("sandbox.productBlocks.addProductsButton"),e[1]=r,e[2]=o):o=e[2];let a;e[3]!==o?(a=s.jsx("span",{className:"text-sm font-medium text-foreground",children:o}),e[3]=o,e[4]=a):a=e[4];let i;e[5]!==r?(i=r("sandbox.productBlocks.addProductsDescription"),e[5]=r,e[6]=i):i=e[6];let m;e[7]!==i?(m=s.jsx("span",{className:"text-xs text-muted-foreground",children:i}),e[7]=i,e[8]=m):m=e[8];let f;return e[9]!==t||e[10]!==a||e[11]!==m?(f=s.jsxs("button",{type:"button",onClick:t,className:"flex w-full flex-col items-center justify-center gap-1.5 rounded-lg border border-dashed py-8 text-center transition-colors hover:border-foreground/30 hover:bg-accent cursor-pointer",children:[l,a,m]}),e[9]=t,e[10]=a,e[11]=m,e[12]=f):f=e[12],f}function ks(b){const e=T.c(30),{ids:t,onChange:r}=b,l=D();let o;e[0]!==t||e[1]!==r?(o=(d,x)=>r(t.map((v,j)=>j===d?x:v)),e[0]=t,e[1]=r,e[2]=o):o=e[2];const a=o;let i;e[3]!==l?(i=l("sandbox.productBlocks.vtexProductIds"),e[3]=l,e[4]=i):i=e[4];let m;e[5]!==i?(m=s.jsx(ve,{className:"text-xs text-muted-foreground",children:i}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==t.length||e[8]!==l?(f=t.length===0&&s.jsx("p",{className:"text-xs text-muted-foreground",children:l("sandbox.productBlocks.startDevServerDescription")}),e[7]=t.length,e[8]=l,e[9]=f):f=e[9];let u;e[10]!==t||e[11]!==r||e[12]!==a||e[13]!==l?(u=t.map((d,x)=>s.jsxs("li",{className:"group/item flex items-center gap-3",children:[s.jsx("input",{value:d,onChange:v=>a(x,v.target.value),placeholder:l("sandbox.productBlocks.skuIdPlaceholder"),className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(ue,{label:l("sandbox.productBlocks.removeProductIdButton"),onClick:()=>r(t.filter((v,j)=>j!==x))})]},x)),e[10]=t,e[11]=r,e[12]=a,e[13]=l,e[14]=u):u=e[14];let p;e[15]!==u?(p=s.jsx("ul",{className:"space-y-2",children:u}),e[15]=u,e[16]=p):p=e[16];let g;e[17]!==l?(g=l("sandbox.productBlocks.addProductIdButton"),e[17]=l,e[18]=g):g=e[18];let h;e[19]!==t||e[20]!==r?(h=()=>r([...t,""]),e[19]=t,e[20]=r,e[21]=h):h=e[21];let n;e[22]!==g||e[23]!==h?(n=s.jsx(fe,{label:g,onClick:h}),e[22]=g,e[23]=h,e[24]=n):n=e[24];let c;return e[25]!==m||e[26]!==f||e[27]!==p||e[28]!==n?(c=s.jsxs("div",{className:"space-y-2",children:[m,f,p,n]}),e[25]=m,e[26]=f,e[27]=p,e[28]=n,e[29]=c):c=e[29],c}function ys(b){const e=T.c(32),{block:t,onChange:r,sandboxRef:l}=b,o=D();let a,i;e[0]!==t.products?(a=gt(t.products),i=new Set(a.filter(Boolean)),e[0]=t.products,e[1]=a,e[2]=i):(a=e[1],i=e[2]);let m;e[3]!==i?(m=[...i],e[3]=i,e[4]=m):m=e[4];const f=m,[u,p]=q.useState(!1),g=Bt(l,f);let h;e[5]!==t||e[6]!==r?(h=k=>r({...t,products:bt(t.products,k)}),e[5]=t,e[6]=r,e[7]=h):h=e[7];const n=h;let c;e[8]!==t.title?(c=R(t.title),e[8]=t.title,e[9]=c):c=e[9];let d;e[10]!==t||e[11]!==r?(d=k=>r({...t,title:k}),e[10]=t,e[11]=r,e[12]=d):d=e[12];let x;e[13]!==c||e[14]!==d?(x=s.jsx(gs,{value:c,onChange:d}),e[13]=c,e[14]=d,e[15]=x):x=e[15];let v;e[16]!==f||e[17]!==g||e[18]!==a||e[19]!==l||e[20]!==n||e[21]!==o?(v=l?s.jsxs("div",{className:"space-y-3",children:[f.length>0&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:[f.length," ",o(f.length===1?"sandbox.productBlocks.productSingular":"sandbox.productBlocks.productPlural")]}),s.jsx(Tt,{label:o("sandbox.productBlocks.browseProductsButton"),onClick:()=>p(!0)})]}),f.length===0?s.jsx(js,{onBrowse:()=>p(!0)}):s.jsx(vs,{ids:f,lookup:g,onReorder:n,onRemove:k=>n(f.filter(y=>y!==k))})]}):s.jsx(ks,{ids:a,onChange:n}),e[16]=f,e[17]=g,e[18]=a,e[19]=l,e[20]=n,e[21]=o,e[22]=v):v=e[22];let j;e[23]!==f||e[24]!==u||e[25]!==l||e[26]!==n?(j=l&&s.jsx(St,{open:u,onOpenChange:p,sandboxRef:l,selectedIds:f,onChange:n}),e[23]=f,e[24]=u,e[25]=l,e[26]=n,e[27]=j):j=e[27];let N;return e[28]!==x||e[29]!==v||e[30]!==j?(N=s.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[x,v,j]}),e[28]=x,e[29]=v,e[30]=j,e[31]=N):N=e[31],N}function Ns(b){const e=T.c(27),{id:t,option:r,loading:l,onRemove:o}=b,a=D();let i;e[0]!==l||e[1]!==r?(i=s.jsx(Et,{option:r,loading:l,className:"h-11 w-11 shrink-0 rounded",iconSize:16}),e[0]=l,e[1]=r,e[2]=i):i=e[2];let m;e[3]!==t||e[4]!==l||e[5]!==r?.label||e[6]!==a?(m=r?.label??(l?a("sandbox.productBlocks.loadingEllipsis"):a("sandbox.productBlocks.productWithId",{id:t})),e[3]=t,e[4]=l,e[5]=r?.label,e[6]=a,e[7]=m):m=e[7];let f;e[8]!==m?(f=s.jsx("p",{className:"truncate text-sm text-foreground",children:m}),e[8]=m,e[9]=f):f=e[9];let u;e[10]!==t||e[11]!==a?(u=a("sandbox.productBlocks.idLabel",{id:t}),e[10]=t,e[11]=a,e[12]=u):u=e[12];let p;e[13]!==u?(p=s.jsx("p",{className:"text-xs text-muted-foreground",children:u}),e[13]=u,e[14]=p):p=e[14];let g;e[15]!==f||e[16]!==p?(g=s.jsxs("div",{className:"min-w-0 flex-1",children:[f,p]}),e[15]=f,e[16]=p,e[17]=g):g=e[17];let h;e[18]!==a?(h=a("sandbox.productBlocks.removeProductButton"),e[18]=a,e[19]=h):h=e[19];let n;e[20]!==o||e[21]!==h?(n=s.jsx(ue,{label:h,onClick:o}),e[20]=o,e[21]=h,e[22]=n):n=e[22];let c;return e[23]!==i||e[24]!==g||e[25]!==n?(c=s.jsxs("div",{className:"group/item flex items-center gap-3 rounded-md border bg-background p-2",children:[i,g,n]}),e[23]=i,e[24]=g,e[25]=n,e[26]=c):c=e[26],c}function Cs(b){const e=T.c(78),{block:t,onChange:r,sandboxRef:l}=b,o=D();let a;e[0]!==t.product?(a=gt(t.product).filter(Boolean)[0]??"",e[0]=t.product,e[1]=a):a=e[1];const i=a,[m,f]=q.useState(!1);let u;e[2]!==i?(u=i?[i]:[],e[2]=i,e[3]=u):u=e[3];const p=Bt(l,u);let g;e[4]!==t||e[5]!==r?(g=K=>r({...t,product:bt(t.product,K)}),e[4]=t,e[5]=r,e[6]=g):g=e[6];const h=g;let n;e[7]!==o?(n=o("sandbox.productBlocks.productCardLabel"),e[7]=o,e[8]=n):n=e[8];let c;e[9]!==n?(c=s.jsx("div",{className:"text-xs font-semibold text-muted-foreground",children:n}),e[9]=n,e[10]=c):c=e[10];let d;e[11]!==o?(d=o("sandbox.productBlocks.ctaLabelField"),e[11]=o,e[12]=d):d=e[12];let x;e[13]!==d?(x=s.jsx(ve,{htmlFor:"product-card-cta",className:"text-xs text-muted-foreground",children:d}),e[13]=d,e[14]=x):x=e[14];let v;e[15]!==t.textCta?(v=R(t.textCta),e[15]=t.textCta,e[16]=v):v=e[16];let j;e[17]!==t||e[18]!==r?(j=K=>r({...t,textCta:K.target.value}),e[17]=t,e[18]=r,e[19]=j):j=e[19];let N;e[20]!==o?(N=o("sandbox.productBlocks.ctaLabelPlaceholder"),e[20]=o,e[21]=N):N=e[21];let k;e[22]!==N||e[23]!==v||e[24]!==j?(k=s.jsx("input",{id:"product-card-cta",value:v,onChange:j,placeholder:N,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[22]=N,e[23]=v,e[24]=j,e[25]=k):k=e[25];let y;e[26]!==k||e[27]!==x?(y=s.jsxs("div",{className:"space-y-2",children:[x,k]}),e[26]=k,e[27]=x,e[28]=y):y=e[28];let w;e[29]!==o?(w=o("sandbox.productBlocks.productSlugField"),e[29]=o,e[30]=w):w=e[30];let S;e[31]!==w?(S=s.jsx(ve,{htmlFor:"product-card-slug",className:"text-xs text-muted-foreground",children:w}),e[31]=w,e[32]=S):S=e[32];let C;e[33]!==t.productSlug?(C=R(t.productSlug),e[33]=t.productSlug,e[34]=C):C=e[34];let P;e[35]!==t||e[36]!==r?(P=K=>r({...t,productSlug:K.target.value}),e[35]=t,e[36]=r,e[37]=P):P=e[37];let _;e[38]!==o?(_=o("sandbox.productBlocks.productSlugPlaceholder"),e[38]=o,e[39]=_):_=e[39];let $;e[40]!==C||e[41]!==P||e[42]!==_?($=s.jsx("input",{id:"product-card-slug",value:C,onChange:P,placeholder:_,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[40]=C,e[41]=P,e[42]=_,e[43]=$):$=e[43];let B;e[44]!==S||e[45]!==$?(B=s.jsxs("div",{className:"space-y-2",children:[S,$]}),e[44]=S,e[45]=$,e[46]=B):B=e[46];let L;e[47]!==o?(L=o("sandbox.productBlocks.productField"),e[47]=o,e[48]=L):L=e[48];let I;e[49]!==L?(I=s.jsx(ve,{className:"text-xs text-muted-foreground",children:L}),e[49]=L,e[50]=I):I=e[50];let A;e[51]!==i||e[52]!==l||e[53]!==o?(A=l&&i&&s.jsx(Tt,{label:o("sandbox.productBlocks.changeButton"),onClick:()=>f(!0)}),e[51]=i,e[52]=l,e[53]=o,e[54]=A):A=e[54];let U;e[55]!==I||e[56]!==A?(U=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[I,A]}),e[55]=I,e[56]=A,e[57]=U):U=e[57];let O;e[58]!==p||e[59]!==i||e[60]!==l||e[61]!==h||e[62]!==o?(O=l?i?s.jsx(Ns,{id:i,option:p.byId.get(i),loading:p.isLoading,onRemove:()=>h([])}):s.jsxs("button",{type:"button",onClick:()=>f(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed py-3 text-sm text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[s.jsx(Oe,{size:14}),o("sandbox.productBlocks.chooseProductButton")]}):s.jsx("input",{value:i,onChange:K=>h(K.target.value?[K.target.value]:[]),placeholder:o("sandbox.productBlocks.vtexProductIdPlaceholder"),className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[58]=p,e[59]=i,e[60]=l,e[61]=h,e[62]=o,e[63]=O):O=e[63];let M;e[64]!==U||e[65]!==O?(M=s.jsxs("div",{className:"space-y-2",children:[U,O]}),e[64]=U,e[65]=O,e[66]=M):M=e[66];let E;e[67]!==m||e[68]!==i||e[69]!==l||e[70]!==h?(E=l&&s.jsx(St,{open:m,onOpenChange:f,sandboxRef:l,selectedIds:i?[i]:[],onChange:h,multiple:!1}),e[67]=m,e[68]=i,e[69]=l,e[70]=h,e[71]=E):E=e[71];let W;return e[72]!==y||e[73]!==B||e[74]!==M||e[75]!==E||e[76]!==c?(W=s.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[c,y,B,M,E]}),e[72]=y,e[73]=B,e[74]=M,e[75]=E,e[76]=c,e[77]=W):W=e[77],W}const Bs=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground/40","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function nt({value:b,onChange:e,placeholder:t,className:r,menuHost:l,sources:o}){const a=q.useRef(e);a.current=e;const i=He({extensions:[Me.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),...t?[Ve.configure({placeholder:t})]:[]],content:b||"",editorProps:{attributes:{class:ne("focus:outline-none",Ke,Bs,r)},handleKeyDown:(m,f)=>f.key==="Enter"},onUpdate:({editor:m})=>a.current(Il(m.getHTML()))});return i?s.jsxs("div",{className:"relative",children:[s.jsx(Lt,{editor:i,appendTo:l??void 0,sources:o}),s.jsx(Ge,{editor:i})]}):null}const Ss=2,ws=2;function Ps(b){return be(b).map(R)}function _s(b){return be(b).map(e=>Array.isArray(e)?e.map(R):[])}function rt(b){return Array.from({length:b},()=>"")}function $s(b,e){return e.reduce((t,r)=>Math.max(t,r.length),b.length)||1}function Is(b){const e=T.c(56),{headers:t,rows:r,onChange:l,decofile:o,sandboxRef:a}=b,i=D();let m;e[0]!==o||e[1]!==a?(m={decofile:o,sandboxRef:a},e[0]=o,e[1]=a,e[2]=m):m=e[2];const f=We(m),[u,p]=q.useState(null);let g,h,n,c,d,x,v,j,N;if(e[3]!==t||e[4]!==f||e[5]!==u||e[6]!==l||e[7]!==r||e[8]!==i){const U=Ps(t),O=_s(r),M=U.length===0&&O.length===0;n=M?Ss:$s(U,O);const E=Array.from({length:n},(H,z)=>U[z]??"");c=M?Array.from({length:ws},()=>rt(n)):O.map(H=>Array.from({length:n},(z,V)=>H[V]??""));const W=`${c.length}x${n}`;let K;e[18]!==l?(K=(H,z)=>l({headers:JSON.stringify(H.some(Ts)?H:[]),rows:JSON.stringify(z)}),e[18]=l,e[19]=K):K=e[19];const Q=K,re=(H,z)=>Q(E.map((V,F)=>F===H?z:V),c),se=(H,z,V)=>Q(E,c.map((F,J)=>J===H?F.map((G,te)=>te===z?V:G):F));h=()=>Q(E,[...c,rt(n)]);const Y=H=>Q(E,c.filter((z,V)=>V!==H));g=()=>Q([...E,""],c.map(Ls));const ie=H=>Q(E.filter((z,V)=>V!==H),c.map(z=>z.filter((V,F)=>F!==H)));N="relative space-y-2",j="overflow-x-auto rounded-lg border",x="w-full border-collapse";let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx("th",{className:"w-8 border-b"}),e[20]=oe):oe=e[20];const X=s.jsxs("tr",{className:"bg-muted/40",children:[E.map((H,z)=>s.jsxs("th",{className:"group/col relative border-b border-r p-0 last:border-r-0 text-left align-top",children:[s.jsx(nt,{value:H,onChange:V=>re(z,V),placeholder:i("sandbox.tableBlock.headerPlaceholder",{n:z+1}),className:"py-2 pl-7 pr-3 text-xs font-semibold uppercase tracking-wide [&_p]:my-0 focus:bg-background",menuHost:u,sources:f}),n>1&&s.jsx("button",{type:"button","aria-label":i("sandbox.tableBlock.removeColumn",{n:z+1}),onClick:()=>ie(z),className:"absolute left-0.5 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center text-muted-foreground/50 opacity-0 transition-opacity hover:text-destructive group-hover/col:opacity-100 cursor-pointer rounded-lg",children:s.jsx(De,{size:12})})]},`${W}-h-${z}`)),oe]});e[21]!==X?(v=s.jsx("thead",{children:X}),e[21]=X,e[22]=v):v=e[22],d=c.map((H,z)=>s.jsxs("tr",{className:"group/item border-b last:border-b-0",children:[H.map((V,F)=>s.jsx("td",{className:"border-r p-0 last:border-r-0 align-top",children:s.jsx(nt,{value:V,onChange:J=>se(z,F,J),placeholder:"—",className:"px-3 py-2 text-sm [&_p]:my-0 focus:bg-muted/30",menuHost:u,sources:f})},`${W}-${z}-${F}`)),s.jsx("td",{className:"w-8 text-center align-middle",children:c.length>1&&s.jsx(Fe,{variant:"ghost-destructive",size:"icon-xs",type:"button","aria-label":i("sandbox.tableBlock.removeRow",{n:z+1}),onClick:()=>Y(z),className:"opacity-0 transition-opacity group-hover/item:opacity-100",children:s.jsx(De,{className:"size-3.25"})})})]},`${W}-${z}`)),e[3]=t,e[4]=f,e[5]=u,e[6]=l,e[7]=r,e[8]=i,e[9]=g,e[10]=h,e[11]=n,e[12]=c,e[13]=d,e[14]=x,e[15]=v,e[16]=j,e[17]=N}else g=e[9],h=e[10],n=e[11],c=e[12],d=e[13],x=e[14],v=e[15],j=e[16],N=e[17];let k;e[23]!==n||e[24]!==c.length||e[25]!==i?(k=c.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:n+1,className:"px-3 py-4 text-center text-xs text-muted-foreground",children:i("sandbox.tableBlock.noRowsYet")})}),e[23]=n,e[24]=c.length,e[25]=i,e[26]=k):k=e[26];let y;e[27]!==d||e[28]!==k?(y=s.jsxs("tbody",{children:[d,k]}),e[27]=d,e[28]=k,e[29]=y):y=e[29];let w;e[30]!==x||e[31]!==v||e[32]!==y?(w=s.jsxs("table",{className:x,children:[v,y]}),e[30]=x,e[31]=v,e[32]=y,e[33]=w):w=e[33];let S;e[34]!==j||e[35]!==w?(S=s.jsx("div",{className:j,children:w}),e[34]=j,e[35]=w,e[36]=S):S=e[36];let C;e[37]!==i?(C=i("sandbox.tableBlock.addRow"),e[37]=i,e[38]=C):C=e[38];let P;e[39]!==h||e[40]!==C?(P=s.jsx(fe,{label:C,onClick:h}),e[39]=h,e[40]=C,e[41]=P):P=e[41];let _;e[42]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ue,{size:13}),e[42]=_):_=e[42];let $;e[43]!==i?($=i("sandbox.tableBlock.addColumn"),e[43]=i,e[44]=$):$=e[44];let B;e[45]!==g||e[46]!==$?(B=s.jsxs("button",{type:"button",onClick:g,className:"flex items-center gap-1.5 rounded-lg border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[_,$]}),e[45]=g,e[46]=$,e[47]=B):B=e[47];let L;e[48]!==P||e[49]!==B?(L=s.jsxs("div",{className:"flex gap-2",children:[P,B]}),e[48]=P,e[49]=B,e[50]=L):L=e[50];let I;e[51]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("div",{ref:p,className:"absolute z-20"}),e[51]=I):I=e[51];let A;return e[52]!==S||e[53]!==L||e[54]!==N?(A=s.jsxs("div",{className:N,children:[S,L,I]}),e[52]=S,e[53]=L,e[54]=N,e[55]=A):A=e[55],A}function Ls(b){return[...b,""]}function Ts(b){return b.trim()!==""}function Es(b){const e=T.c(50),{block:t,meta:r,onChange:l,decofile:o,sandbox:a,previewBaseUrl:i,onSaveReferencedBlock:m}=b,f=D();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[0]=u):u=e[0];const[p,g]=q.useState(u),h=t.__resolveType??"";let n;e[1]!==r||e[2]!==h?(n=h?Tl(h,r):null,e[1]=r,e[2]=h,e[3]=n):n=e[3];const c=n;if(!c){let B;e[4]!==h||e[5]!==f?(B=f("sandbox.blockRegistry.unknownBlockType",{type:h}),e[4]=h,e[5]=f,e[6]=B):B=e[6];let L;return e[7]!==B?(L=s.jsx("p",{className:"text-xs text-muted-foreground",children:B}),e[7]=B,e[8]=L):L=e[8],L}let d;e[9]!==r||e[10]!==h?(d=Gt(h,r),e[9]=r,e[10]=h,e[11]=d):d=e[11];const x=d;let v;e[12]!==x.iconName||e[13]!==x.iconUrl||e[14]!==x.title?(v=s.jsx(Pt,{iconName:x.iconName,iconUrl:x.iconUrl,alt:x.title,className:"size-7",size:14}),e[12]=x.iconName,e[13]=x.iconUrl,e[14]=x.title,e[15]=v):v=e[15];let j;e[16]!==x.title?(j=s.jsx("span",{className:"truncate text-sm font-medium",children:x.title}),e[16]=x.title,e[17]=j):j=e[17];let N;e[18]!==x.description?(N=x.description&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:x.description}),e[18]=x.description,e[19]=N):N=e[19];let k;e[20]!==j||e[21]!==N?(k=s.jsxs("div",{className:"flex min-w-0 flex-col",children:[j,N]}),e[20]=j,e[21]=N,e[22]=k):k=e[22];let y;e[23]!==v||e[24]!==k?(y=s.jsxs("div",{className:"flex items-center gap-2.5",children:[v,k]}),e[23]=v,e[24]=k,e[25]=y):y=e[25];let w;e[26]!==f?(w=f("sandbox.blockRegistry.breadcrumbLabel"),e[26]=f,e[27]=w):w=e[27];let S;e[28]!==f?(S=f("sandbox.blockRegistry.backToFields"),e[28]=f,e[29]=S):S=e[29];let C;e[30]!==p||e[31]!==S||e[32]!==w?(C=s.jsx(Ll,{path:p,onNavigate:g,label:w,backTitle:S}),e[30]=p,e[31]=S,e[32]=w,e[33]=C):C=e[33];let P;e[34]!==l?(P=B=>l(B),e[34]=l,e[35]=P):P=e[35];let _;e[36]!==t||e[37]!==p||e[38]!==o||e[39]!==r||e[40]!==m||e[41]!==i||e[42]!==a||e[43]!==c||e[44]!==P?(_=s.jsx(El,{schema:c,value:t,onChange:P,basePath:"",breadcrumbPath:p,onBreadcrumbChange:g,meta:r,decofile:o,sandbox:a,previewBaseUrl:i,onSaveReferencedBlock:m}),e[36]=t,e[37]=p,e[38]=o,e[39]=r,e[40]=m,e[41]=i,e[42]=a,e[43]=c,e[44]=P,e[45]=_):_=e[45];let $;return e[46]!==C||e[47]!==_||e[48]!==y?($=s.jsxs("div",{className:"space-y-3 rounded-lg border bg-background p-3",children:[y,C,_]}),e[46]=C,e[47]=_,e[48]=y,e[49]=$):$=e[49],$}function Rs(b){const e=T.c(188),{block:t,meta:r,onChange:l,decofile:o,sandboxRef:a,previewBaseUrl:i,onSaveReferencedBlock:m}=b,f=D(),u=t.__resolveType??"",p=Vt(u);if(Kt(u,o?vt(o):[]))switch(p){case"Paragraph":{let n;e[0]!==t.html?(n=R(t.html),e[0]=t.html,e[1]=n):n=e[1];let c;e[2]!==f?(c=f("sandbox.blockRegistry.writeSomethingPlaceholder"),e[2]=f,e[3]=c):c=e[3];let d;e[4]!==t||e[5]!==l?(d=v=>l({...t,html:v}),e[4]=t,e[5]=l,e[6]=d):d=e[6];let x;return e[7]!==o||e[8]!==a||e[9]!==n||e[10]!==c||e[11]!==d?(x=s.jsx(Ml,{html:n,placeholder:c,onChange:d,decofile:o,sandboxRef:a}),e[7]=o,e[8]=a,e[9]=n,e[10]=c,e[11]=d,e[12]=x):x=e[12],x}case"Heading":{let n;e[13]!==t.text?(n=R(t.text),e[13]=t.text,e[14]=n):n=e[14];let c;e[15]!==t.level?(c=R(t.level),e[15]=t.level,e[16]=c):c=e[16];let d;e[17]!==t||e[18]!==l?(d=v=>l({...t,...v}),e[17]=t,e[18]=l,e[19]=d):d=e[19];let x;return e[20]!==n||e[21]!==c||e[22]!==d?(x=s.jsx(Yl,{text:n,level:c,onChange:d}),e[20]=n,e[21]=c,e[22]=d,e[23]=x):x=e[23],x}case"Quote":{let n;e[24]!==t.quote?(n=R(t.quote),e[24]=t.quote,e[25]=n):n=e[25];let c;e[26]!==t||e[27]!==l?(c=x=>l({...t,quote:x}),e[26]=t,e[27]=l,e[28]=c):c=e[28];let d;return e[29]!==n||e[30]!==c?(d=s.jsx(Xl,{quote:n,onChange:c}),e[29]=n,e[30]=c,e[31]=d):d=e[31],d}case"Code":{let n;e[32]!==t.code?(n=R(t.code),e[32]=t.code,e[33]=n):n=e[33];let c;e[34]!==t.language?(c=R(t.language),e[34]=t.language,e[35]=c):c=e[35];let d;e[36]!==t||e[37]!==l?(d=v=>l({...t,...v}),e[36]=t,e[37]=l,e[38]=d):d=e[38];let x;return e[39]!==n||e[40]!==c||e[41]!==d?(x=s.jsx(Zl,{code:n,language:c,onChange:d}),e[39]=n,e[40]=c,e[41]=d,e[42]=x):x=e[42],x}case"List":{let n;e[43]!==t.items?(n=R(t.items),e[43]=t.items,e[44]=n):n=e[44];let c;e[45]!==t.style?(c=R(t.style),e[45]=t.style,e[46]=c):c=e[46];let d;e[47]!==t||e[48]!==l?(d=v=>l({...t,...v}),e[47]=t,e[48]=l,e[49]=d):d=e[49];let x;return e[50]!==o||e[51]!==a||e[52]!==n||e[53]!==c||e[54]!==d?(x=s.jsx(es,{items:n,style:c,onChange:d,decofile:o,sandboxRef:a}),e[50]=o,e[51]=a,e[52]=n,e[53]=c,e[54]=d,e[55]=x):x=e[55],x}case"BlockImage":{let n;return e[56]!==t||e[57]!==l?(n=s.jsx(is,{block:t,onChange:l}),e[56]=t,e[57]=l,e[58]=n):n=e[58],n}case"Video":{let n;e[59]!==t.url?(n=R(t.url),e[59]=t.url,e[60]=n):n=e[60];let c;e[61]!==t.caption?(c=R(t.caption),e[61]=t.caption,e[62]=c):c=e[62];let d;e[63]!==t||e[64]!==l?(d=v=>l({...t,...v}),e[63]=t,e[64]=l,e[65]=d):d=e[65];let x;return e[66]!==n||e[67]!==c||e[68]!==d?(x=s.jsx(ls,{url:n,caption:c,onChange:d}),e[66]=n,e[67]=c,e[68]=d,e[69]=x):x=e[69],x}case"Divider":{let n;return e[70]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ss,{}),e[70]=n):n=e[70],n}case"Cta":{let n;e[71]!==t.text?(n=R(t.text),e[71]=t.text,e[72]=n):n=e[72];let c;e[73]!==t.href?(c=R(t.href),e[73]=t.href,e[74]=c):c=e[74];let d;e[75]!==t||e[76]!==l?(d=v=>l({...t,...v}),e[75]=t,e[76]=l,e[77]=d):d=e[77];let x;return e[78]!==n||e[79]!==c||e[80]!==d?(x=s.jsx(os,{text:n,href:c,onChange:d}),e[78]=n,e[79]=c,e[80]=d,e[81]=x):x=e[81],x}case"Callout":{let n;e[82]!==t.title?(n=R(t.title),e[82]=t.title,e[83]=n):n=e[83];let c;e[84]!==t.body?(c=R(t.body),e[84]=t.body,e[85]=c):c=e[85];let d;e[86]!==t.variant?(d=R(t.variant),e[86]=t.variant,e[87]=d):d=e[87];let x;e[88]!==t||e[89]!==l?(x=j=>l({...t,...j}),e[88]=t,e[89]=l,e[90]=x):x=e[90];let v;return e[91]!==n||e[92]!==c||e[93]!==d||e[94]!==x?(v=s.jsx(ns,{title:n,body:c,variant:d,onChange:x}),e[91]=n,e[92]=c,e[93]=d,e[94]=x,e[95]=v):v=e[95],v}case"Stat":{let n;e[96]!==t.value?(n=R(t.value),e[96]=t.value,e[97]=n):n=e[97];let c;e[98]!==t.label?(c=R(t.label),e[98]=t.label,e[99]=c):c=e[99];let d;e[100]!==t.description?(d=R(t.description),e[100]=t.description,e[101]=d):d=e[101];let x;e[102]!==t||e[103]!==l?(x=j=>l({...t,...j}),e[102]=t,e[103]=l,e[104]=x):x=e[104];let v;return e[105]!==n||e[106]!==c||e[107]!==d||e[108]!==x?(v=s.jsx(rs,{value:n,label:c,description:d,onChange:x}),e[105]=n,e[106]=c,e[107]=d,e[108]=x,e[109]=v):v=e[109],v}case"StatGroup":{let n;e[110]!==t.stats?(n=de(t.stats),e[110]=t.stats,e[111]=n):n=e[111];let c;e[112]!==t||e[113]!==l?(c=x=>l({...t,stats:x}),e[112]=t,e[113]=l,e[114]=c):c=e[114];let d;return e[115]!==n||e[116]!==c?(d=s.jsx(ds,{stats:n,onChange:c}),e[115]=n,e[116]=c,e[117]=d):d=e[117],d}case"CardGroup":{let n;e[118]!==t.cards?(n=de(t.cards),e[118]=t.cards,e[119]=n):n=e[119];let c;e[120]!==t||e[121]!==l?(c=x=>l({...t,cards:x}),e[120]=t,e[121]=l,e[122]=c):c=e[122];let d;return e[123]!==n||e[124]!==c?(d=s.jsx(as,{cards:n,onChange:c}),e[123]=n,e[124]=c,e[125]=d):d=e[125],d}case"Checklist":{let n;e[126]!==t.title?(n=R(t.title),e[126]=t.title,e[127]=n):n=e[127];let c;e[128]!==t.items?(c=de(t.items),e[128]=t.items,e[129]=c):c=e[129];let d;e[130]!==t||e[131]!==l?(d=v=>l({...t,...v}),e[130]=t,e[131]=l,e[132]=d):d=e[132];let x;return e[133]!==n||e[134]!==c||e[135]!==d?(x=s.jsx(cs,{title:n,items:c,onChange:d}),e[133]=n,e[134]=c,e[135]=d,e[136]=x):x=e[136],x}case"Steps":{let n;e[137]!==t.title?(n=R(t.title),e[137]=t.title,e[138]=n):n=e[138];let c;e[139]!==t.steps?(c=de(t.steps),e[139]=t.steps,e[140]=c):c=e[140];let d;e[141]!==t||e[142]!==l?(d=v=>l({...t,...v}),e[141]=t,e[142]=l,e[143]=d):d=e[143];let x;return e[144]!==n||e[145]!==c||e[146]!==d?(x=s.jsx(us,{title:n,steps:c,onChange:d}),e[144]=n,e[145]=c,e[146]=d,e[147]=x):x=e[147],x}case"Comparison":{let n;e[148]!==t.left?(n=de(t.left,{}),e[148]=t.left,e[149]=n):n=e[149];let c;e[150]!==t.right?(c=de(t.right,{}),e[150]=t.right,e[151]=c):c=e[151];let d;e[152]!==t||e[153]!==l?(d=v=>l({...t,...v}),e[152]=t,e[153]=l,e[154]=d):d=e[154];let x;return e[155]!==n||e[156]!==c||e[157]!==d?(x=s.jsx(fs,{left:n,right:c,onChange:d}),e[155]=n,e[156]=c,e[157]=d,e[158]=x):x=e[158],x}case"Table":{let n;e[159]!==t.headers?(n=de(t.headers),e[159]=t.headers,e[160]=n):n=e[160];let c;e[161]!==t.rows?(c=de(t.rows),e[161]=t.rows,e[162]=c):c=e[162];let d;e[163]!==t||e[164]!==l?(d=v=>l({...t,...v}),e[163]=t,e[164]=l,e[165]=d):d=e[165];let x;return e[166]!==o||e[167]!==a||e[168]!==n||e[169]!==c||e[170]!==d?(x=s.jsx(Is,{headers:n,rows:c,onChange:d,decofile:o,sandboxRef:a}),e[166]=o,e[167]=a,e[168]=n,e[169]=c,e[170]=d,e[171]=x):x=e[171],x}case"ProductCard":{let n;return e[172]!==t||e[173]!==l||e[174]!==a?(n=s.jsx(Cs,{block:t,onChange:l,sandboxRef:a}),e[172]=t,e[173]=l,e[174]=a,e[175]=n):n=e[175],n}case"ProductShelf":{let n;return e[176]!==t||e[177]!==l||e[178]!==a?(n=s.jsx(ys,{block:t,onChange:l,sandboxRef:a}),e[176]=t,e[177]=l,e[178]=a,e[179]=n):n=e[179],n}}let h;return e[180]!==t||e[181]!==o||e[182]!==r||e[183]!==l||e[184]!==m||e[185]!==i||e[186]!==a?(h=s.jsx(Es,{block:t,meta:r,onChange:l,decofile:o,sandbox:a,previewBaseUrl:i,onSaveReferencedBlock:m}),e[180]=t,e[181]=o,e[182]=r,e[183]=l,e[184]=m,e[185]=i,e[186]=a,e[187]=h):h=e[187],h}function zs(b){const e=T.c(46),{id:t,block:r,meta:l,onChange:o,onDelete:a,onDuplicate:i,decofile:m,sandboxRef:f,previewBaseUrl:u,onSaveReferencedBlock:p}=b,g=D();let h;e[0]!==t?(h={id:t},e[0]=t,e[1]=h):h=e[1];const{attributes:n,listeners:c,setNodeRef:d,transform:x,transition:v,isDragging:j}=ht(h);let N;e[2]!==x?(N=ft.Transform.toString(x),e[2]=x,e[3]=N):N=e[3];let k;e[4]!==N||e[5]!==v?(k={transform:N,transition:v},e[4]=N,e[5]=v,e[6]=k):k=e[6];const y=j&&"opacity-50";let w;e[7]!==y?(w=ne("group/row relative rounded-md py-1.5 pl-12 pr-2 transition-colors hover:bg-accent",y),e[7]=y,e[8]=w):w=e[8];let S;e[9]!==g?(S=g("sandbox.blockRow.dragToReorder"),e[9]=g,e[10]=S):S=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Nt,{size:14}),e[11]=C):C=e[11];let P;e[12]!==n||e[13]!==c||e[14]!==S?(P=s.jsx("button",{type:"button","aria-label":S,className:"absolute left-1 top-1.5 flex h-6 w-6 cursor-grab items-center justify-center text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground active:cursor-grabbing group-hover/row:opacity-100 rounded-lg",...n,...c,children:C}),e[12]=n,e[13]=c,e[14]=S,e[15]=P):P=e[15];let _;e[16]!==g?(_=g("sandbox.blockRow.duplicateBlock"),e[16]=g,e[17]=_):_=e[17];let $;e[18]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(cl,{className:"size-3.5"}),e[18]=$):$=e[18];let B;e[19]!==i||e[20]!==_?(B=s.jsx(Fe,{variant:"ghost",size:"icon-xs",type:"button","aria-label":_,onClick:i,children:$}),e[19]=i,e[20]=_,e[21]=B):B=e[21];let L;e[22]!==g?(L=g("sandbox.blockRow.deleteBlock"),e[22]=g,e[23]=L):L=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(De,{className:"size-3.5"}),e[24]=I):I=e[24];let A;e[25]!==a||e[26]!==L?(A=s.jsx(Fe,{variant:"ghost-destructive",size:"icon-xs",type:"button","aria-label":L,onClick:a,children:I}),e[25]=a,e[26]=L,e[27]=A):A=e[27];let U;e[28]!==B||e[29]!==A?(U=s.jsxs("div",{className:"absolute right-1 top-1 z-10 flex flex-row gap-0.5 rounded-md bg-background/80 opacity-0 backdrop-blur-sm transition-opacity group-hover/row:opacity-100",children:[B,A]}),e[28]=B,e[29]=A,e[30]=U):U=e[30];let O;e[31]!==r||e[32]!==m||e[33]!==l||e[34]!==o||e[35]!==p||e[36]!==u||e[37]!==f?(O=s.jsx(Rs,{block:r,meta:l,onChange:o,decofile:m,sandboxRef:f,previewBaseUrl:u,onSaveReferencedBlock:p}),e[31]=r,e[32]=m,e[33]=l,e[34]=o,e[35]=p,e[36]=u,e[37]=f,e[38]=O):O=e[38];let M;return e[39]!==d||e[40]!==U||e[41]!==O||e[42]!==k||e[43]!==w||e[44]!==P?(M=s.jsxs("div",{ref:d,style:k,className:w,children:[P,U,O]}),e[39]=d,e[40]=U,e[41]=O,e[42]=k,e[43]=w,e[44]=P,e[45]=M):M=e[45],M}function Ie(){return crypto.randomUUID()}function As(b){return b.map(e=>({id:Ie(),block:e}))}function Fs(b,e){return e.map((t,r)=>{const l=b[r];return{id:l?l.id:Ie(),block:t}})}function ko(b){return Array.isArray(b)?b:[]}function Ds(b){const e=T.c(10),{blockTypes:t,onInsert:r}=b,l=D();let o;e[0]!==l?(o=l("sandbox.blockPicker.insertBlockButton"),e[0]=l,e[1]=o):o=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"absolute inset-x-10 top-1/2 h-px -translate-y-1/2 bg-primary/30"}),e[2]=a):a=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"relative z-10 flex h-5 w-5 items-center justify-center rounded-lg border bg-background text-muted-foreground",children:s.jsx(Ue,{size:12})}),e[3]=i):i=e[3];let m;e[4]!==o?(m=s.jsxs("button",{type:"button","aria-label":o,className:"group/ins relative flex h-2.5 w-full items-center justify-center opacity-0 transition-opacity hover:opacity-100 cursor-pointer",children:[a,i]}),e[4]=o,e[5]=m):m=e[5];let f;return e[6]!==t||e[7]!==r||e[8]!==m?(f=s.jsx(_t,{blockTypes:t,onInsert:r,align:"center",children:m}),e[6]=t,e[7]=r,e[8]=m,e[9]=f):f=e[9],f}function yo(b){const e=T.c(78),{value:t,onChange:r,meta:l,decofile:o,sandboxRef:a,previewBaseUrl:i,onSaveReferencedBlock:m,emptyMessage:f}=b,u=f===void 0?"No content yet. Add your first block below.":f,p=D(),g=Ht();let h;e[0]!==o||e[1]!==g||e[2]!==l?(h=Jt(l,{hideDefaults:g,customPaths:o?vt(o):[]}),e[0]=o,e[1]=g,e[2]=l,e[3]=h):h=e[3];const n=h;let c;e[4]!==t?(c=()=>As(t),e[4]=t,e[5]=c):c=e[5];const[d,x]=q.useState(c),[v,j]=q.useState(t);t!==v&&(j(t),x(Fs(d,t)));let N;e[6]!==d?(N=d.map(Hs),e[6]=d,e[7]=N):N=e[7];const k=N;let y;e[8]!==d?(y=d.map(Os),e[8]=d,e[9]=y):y=e[9];const w=y;let S;e[10]!==r?(S=F=>{x(F);const J=F.map(Us);j(J),r(J)},e[10]=r,e[11]=S):S=e[11];const C=S;let P;e[12]!==d||e[13]!==C?(P=(F,J)=>{const G=[...d];G.splice(F,0,{id:Ie(),block:{__resolveType:J}}),C(G)},e[12]=d,e[13]=C,e[14]=P):P=e[14];const _=P;let $;e[15]!==d||e[16]!==C?($=(F,J)=>{C(d.map((G,te)=>te===F?{...G,block:J}:G))},e[15]=d,e[16]=C,e[17]=$):$=e[17];const B=$;let L;e[18]!==d||e[19]!==C?(L=F=>{C(d.filter((J,G)=>G!==F))},e[18]=d,e[19]=C,e[20]=L):L=e[20];const I=L;let A;e[21]!==d||e[22]!==C?(A=F=>{const J=d[F];if(!J)return;const G=[...d];G.splice(F+1,0,{id:Ie(),block:structuredClone(J.block)}),C(G)},e[21]=d,e[22]=C,e[23]=A):A=e[23];const U=A;let O;e[24]===Symbol.for("react.memo_cache_sentinel")?(O={activationConstraint:{distance:6}},e[24]=O):O=e[24];let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M={coordinateGetter:mt},e[25]=M):M=e[25];const E=it($e(ct,O),$e(at,M));let W;e[26]!==d||e[27]!==C?(W=F=>{const{active:J,over:G}=F;if(!G||J.id===G.id)return;const te=d.findIndex(le=>le.id===String(J.id)),ce=d.findIndex(le=>le.id===String(G.id));te===-1||ce===-1||C(xt(d,te,ce))},e[26]=d,e[27]=C,e[28]=W):W=e[28];const K=W;let Q;if(e[29]!==d||e[30]!==n||e[31]!==o||e[32]!==U||e[33]!==_||e[34]!==l||e[35]!==m||e[36]!==i||e[37]!==I||e[38]!==a||e[39]!==B){let F;e[41]!==n||e[42]!==o||e[43]!==U||e[44]!==_||e[45]!==l||e[46]!==m||e[47]!==i||e[48]!==I||e[49]!==a||e[50]!==B?(F=(J,G)=>{const{id:te,block:ce}=J;return s.jsxs("div",{children:[s.jsx(Ds,{blockTypes:n,onInsert:le=>_(G,le)}),s.jsx(zs,{id:te,block:ce,meta:l,onChange:le=>B(G,le),onDelete:()=>I(G),onDuplicate:()=>U(G),decofile:o,sandboxRef:a,previewBaseUrl:i,onSaveReferencedBlock:m})]},te)},e[41]=n,e[42]=o,e[43]=U,e[44]=_,e[45]=l,e[46]=m,e[47]=i,e[48]=I,e[49]=a,e[50]=B,e[51]=F):F=e[51],Q=d.map(F),e[29]=d,e[30]=n,e[31]=o,e[32]=U,e[33]=_,e[34]=l,e[35]=m,e[36]=i,e[37]=I,e[38]=a,e[39]=B,e[40]=Q}else Q=e[40];let re;e[52]!==k||e[53]!==Q?(re=s.jsx(pt,{items:k,strategy:Ot,children:Q}),e[52]=k,e[53]=Q,e[54]=re):re=e[54];let se;e[55]!==K||e[56]!==E||e[57]!==re?(se=s.jsx(dt,{sensors:E,collisionDetection:ut,onDragEnd:K,children:re}),e[55]=K,e[56]=E,e[57]=re,e[58]=se):se=e[58];let Y;e[59]!==w.length||e[60]!==u?(Y=w.length===0&&s.jsx("p",{className:"px-3 pb-1 pt-2 text-sm text-muted-foreground",children:u}),e[59]=w.length,e[60]=u,e[61]=Y):Y=e[61];let ie;e[62]!==d.length||e[63]!==_?(ie=F=>_(d.length,F),e[62]=d.length,e[63]=_,e[64]=ie):ie=e[64];let oe;e[65]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(Ue,{size:16}),e[65]=oe):oe=e[65];let X;e[66]!==p?(X=p("sandbox.blockDocument.addBlock"),e[66]=p,e[67]=X):X=e[67];let H;e[68]!==X?(H=s.jsxs("button",{type:"button",className:"mt-1 flex w-full items-center gap-2 rounded-md py-2 pl-14 pr-2 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[oe,X]}),e[68]=X,e[69]=H):H=e[69];let z;e[70]!==n||e[71]!==ie||e[72]!==H?(z=s.jsx(_t,{blockTypes:n,onInsert:ie,children:H}),e[70]=n,e[71]=ie,e[72]=H,e[73]=z):z=e[73];let V;return e[74]!==se||e[75]!==Y||e[76]!==z?(V=s.jsxs("div",{className:"mt-2",children:[se,Y,z]}),e[74]=se,e[75]=Y,e[76]=z,e[77]=V):V=e[77],V}function Us(b){return b.block}function Os(b){return b.block}function Hs(b){return b.id}export{yo as B,zl as I,Al as R,ko as a,We as u};
@@ -1 +1 @@
1
- import{c as O,r as g,j as S}from"./index-C0zcxte6.js";const P={target:null,editSeoPageKey:null,variantOverride:null,focusedBlockKey:null};function W(t,e){switch(e.type){case"select":return{...t,target:e.target,variantOverride:null,editSeoPageKey:null,focusedBlockKey:null};case"edit-seo":return{...t,target:e.target,editSeoPageKey:e.target.key,variantOverride:null,focusedBlockKey:null};case"consume-edit-seo":return{...t,editSeoPageKey:null};case"variant-override":return{...t,variantOverride:e.params};case"preview-as":return t.variantOverride===null?t:{...t,variantOverride:null};case"focus-block":return{...t,focusedBlockKey:e.key}}}const K=g.createContext(null);function E(t){const e=O.c(22),{resetKey:s,children:y}=t;let v;e[0]!==s?(v={key:s,state:P},e[0]=s,e[1]=v):v=e[1];const[w,m]=g.useState(v),f=w.key===s?w.state:P;let k;e[2]!==s?(k=r=>m(B=>({key:s,state:W(B.key===s?B.state:P,r)})),e[2]=s,e[3]=k):k=e[3];const o=k;let l,c,a,i,n,u;e[4]!==o?(l=r=>o({type:"select",target:r}),c=r=>o({type:"edit-seo",target:r}),a=()=>o({type:"consume-edit-seo"}),i=r=>o({type:"variant-override",params:r}),n=()=>o({type:"preview-as"}),u=r=>o({type:"focus-block",key:r}),e[4]=o,e[5]=l,e[6]=c,e[7]=a,e[8]=i,e[9]=n,e[10]=u):(l=e[5],c=e[6],a=e[7],i=e[8],n=e[9],u=e[10]);let d;e[11]!==f||e[12]!==l||e[13]!==c||e[14]!==a||e[15]!==i||e[16]!==n||e[17]!==u?(d={state:f,selectTarget:l,editSeo:c,consumeEditSeo:a,setVariantOverride:i,previewAsChanged:n,setFocusedBlock:u},e[11]=f,e[12]=l,e[13]=c,e[14]=a,e[15]=i,e[16]=n,e[17]=u,e[18]=d):d=e[18];let p;return e[19]!==y||e[20]!==d?(p=S.jsx(K,{value:d,children:y}),e[19]=y,e[20]=d,e[21]=p):p=e[21],p}function h(){const t=g.use(K);if(!t)throw new Error("useBlocksPreviewWorkspace must be used inside BlocksPreviewWorkspaceProvider");return t}export{E as B,h as u};
1
+ import{c as O,r as g,j as S}from"./index-B2vvUsuK.js";const P={target:null,editSeoPageKey:null,variantOverride:null,focusedBlockKey:null};function W(t,e){switch(e.type){case"select":return{...t,target:e.target,variantOverride:null,editSeoPageKey:null,focusedBlockKey:null};case"edit-seo":return{...t,target:e.target,editSeoPageKey:e.target.key,variantOverride:null,focusedBlockKey:null};case"consume-edit-seo":return{...t,editSeoPageKey:null};case"variant-override":return{...t,variantOverride:e.params};case"preview-as":return t.variantOverride===null?t:{...t,variantOverride:null};case"focus-block":return{...t,focusedBlockKey:e.key}}}const K=g.createContext(null);function E(t){const e=O.c(22),{resetKey:s,children:y}=t;let v;e[0]!==s?(v={key:s,state:P},e[0]=s,e[1]=v):v=e[1];const[w,m]=g.useState(v),f=w.key===s?w.state:P;let k;e[2]!==s?(k=r=>m(B=>({key:s,state:W(B.key===s?B.state:P,r)})),e[2]=s,e[3]=k):k=e[3];const o=k;let l,c,a,i,n,u;e[4]!==o?(l=r=>o({type:"select",target:r}),c=r=>o({type:"edit-seo",target:r}),a=()=>o({type:"consume-edit-seo"}),i=r=>o({type:"variant-override",params:r}),n=()=>o({type:"preview-as"}),u=r=>o({type:"focus-block",key:r}),e[4]=o,e[5]=l,e[6]=c,e[7]=a,e[8]=i,e[9]=n,e[10]=u):(l=e[5],c=e[6],a=e[7],i=e[8],n=e[9],u=e[10]);let d;e[11]!==f||e[12]!==l||e[13]!==c||e[14]!==a||e[15]!==i||e[16]!==n||e[17]!==u?(d={state:f,selectTarget:l,editSeo:c,consumeEditSeo:a,setVariantOverride:i,previewAsChanged:n,setFocusedBlock:u},e[11]=f,e[12]=l,e[13]=c,e[14]=a,e[15]=i,e[16]=n,e[17]=u,e[18]=d):d=e[18];let p;return e[19]!==y||e[20]!==d?(p=S.jsx(K,{value:d,children:y}),e[19]=y,e[20]=d,e[21]=p):p=e[21],p}function h(){const t=g.use(K);if(!t)throw new Error("useBlocksPreviewWorkspace must be used inside BlocksPreviewWorkspaceProvider");return t}export{E as B,h as u};