decocms 4.579.0 → 4.579.2

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 (406) hide show
  1. package/dist/client/assets/{AlertCircle-GXBIxFcm.js → AlertCircle-CTbjWy6O.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BliO7z1O.js → AreaChart-DwuVDkrD.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BbqwGy0e.js → ArrowLeft-XFXQyKrg.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DBkhb8Yz.js → ArrowUp-BGhmN6Zx.js} +1 -1
  5. package/dist/client/assets/{BookOpen01-1fjc61Mm.js → BookOpen01-BPEekJOY.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-D_ikhSur.js → CartesianChart-CyLm4xQH.js} +1 -1
  7. package/dist/client/assets/{CategoricalChart-DFr--lUX.js → CategoricalChart-BaZiYgxE.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-B_eEhqJR.js → CheckCircle-D_eKfCyb.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-D-7E5GYT.js → ChevronSelectorVertical-B8yNz6I1.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-FDrusEQ7.js → ChevronUp-DJytO9gL.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-KjySk-5G.js → CreditCard01-D8vcOfs6.js} +1 -1
  12. package/dist/client/assets/{Globe04-CYg8V2eL.js → Globe04-B6PnEpLB.js} +1 -1
  13. package/dist/client/assets/{Key01-DY2gyLvd.js → Key01-CqlMd8Tp.js} +1 -1
  14. package/dist/client/assets/{LinkBroken01-CzDrAWsX.js → LinkBroken01-BrTHjhI6.js} +1 -1
  15. package/dist/client/assets/{Minus-CMxaDSgl.js → Minus-O-Diijsb.js} +1 -1
  16. package/dist/client/assets/{Monitor01-3IwLMf0Q.js → Monitor01-CNesz7Zi.js} +1 -1
  17. package/dist/client/assets/{Play-BOARoASB.js → Play-DLBGORyf.js} +1 -1
  18. package/dist/client/assets/{Plus-D452i-ki.js → Plus-D93afoay.js} +1 -1
  19. package/dist/client/assets/{ReferenceLine-BCPouREj.js → ReferenceLine-DP5lPOEm.js} +1 -1
  20. package/dist/client/assets/{SearchMd-D9VvymBK.js → SearchMd-BMSOzTwj.js} +1 -1
  21. package/dist/client/assets/{ShoppingBag01-DrNjYHL1.js → ShoppingBag01-BjOh6InC.js} +1 -1
  22. package/dist/client/assets/{Sun-BvPiksd_.js → Sun-Dwiv3SBK.js} +1 -1
  23. package/dist/client/assets/{SwitchHorizontal01-BzX5npS9.js → SwitchHorizontal01-TvywMML0.js} +1 -1
  24. package/dist/client/assets/{Tool01-DoE3EsIZ.js → Tool01-BR0iTy6Z.js} +1 -1
  25. package/dist/client/assets/{Tooltip-z7WiBKoc.js → Tooltip-CMzIdphO.js} +1 -1
  26. package/dist/client/assets/{Trash01-_1ewPMOO.js → Trash01-DcgAZcrm.js} +1 -1
  27. package/dist/client/assets/{Upload01-D11ZXRKj.js → Upload01-C4wCuUx0.js} +1 -1
  28. package/dist/client/assets/{UserSquare-DHrzs2xN.js → UserSquare-dl1oayK_.js} +1 -1
  29. package/dist/client/assets/{Users01-DdipP4E2.js → Users01-Bfq6gAwi.js} +1 -1
  30. package/dist/client/assets/{XClose-CR92HpkN.js → XClose-DN30jgS9.js} +1 -1
  31. package/dist/client/assets/{Zap-D5X_AlHR.js → Zap-C1Evk-yy.js} +1 -1
  32. package/dist/client/assets/{access-gate-CpF5setC.js → access-gate-pZVUht52.js} +1 -1
  33. package/dist/client/assets/{add-connection-dialog-DB2eDzSO.js → add-connection-dialog-Z992qi1w.js} +1 -1
  34. package/dist/client/assets/agent-app-DzDciOTO.js +1 -0
  35. package/dist/client/assets/{agent-assets-CynthE6_.js → agent-assets-CFZFbPFI.js} +1 -1
  36. package/dist/client/assets/{agent-automation-1MlsXRHC.js → agent-automation-CK-VV9xP.js} +1 -1
  37. package/dist/client/assets/{agent-automations-Dol9sHiV.js → agent-automations-csn7BO9I.js} +1 -1
  38. package/dist/client/assets/{agent-blog-Db3MOHTb.js → agent-blog-DPGRYnCY.js} +2 -2
  39. package/dist/client/assets/{agent-blog-post-BWxagJWC.js → agent-blog-post-Cx_KL21T.js} +2 -2
  40. package/dist/client/assets/{agent-calendar-DgGhw5pC.js → agent-calendar-DHfOCkRQ.js} +1 -1
  41. package/dist/client/assets/{agent-capabilities-CtbwhlqH.js → agent-capabilities-4_vEEVov.js} +1 -1
  42. package/dist/client/assets/{agent-connect-sources-ByKpOl5Z.js → agent-connect-sources-HdEFSoEU.js} +1 -1
  43. package/dist/client/assets/agent-deck-BXpuyyHV.js +1 -0
  44. package/dist/client/assets/{agent-e2e-CmmnhpPI.js → agent-e2e-D3d1Qsqd.js} +1 -1
  45. package/dist/client/assets/agent-experiments-BL62SJmo.js +1 -0
  46. package/dist/client/assets/{agent-file-BwXd7p-8.js → agent-file-SpdJvvC2.js} +1 -1
  47. package/dist/client/assets/{agent-hosting-FxuGCE-9.js → agent-hosting-BZxtmZl8.js} +1 -1
  48. package/dist/client/assets/{agent-icon-DPgCnEV1.js → agent-icon-BLhMgLPf.js} +1 -1
  49. package/dist/client/assets/agent-library-BFYPXgq1.js +1 -0
  50. package/dist/client/assets/agent-library-file-DKeb8aqf.js +1 -0
  51. package/dist/client/assets/agent-overview-D5jCjQVj.js +1 -0
  52. package/dist/client/assets/{agent-releases-CkbrqRyS.js → agent-releases-DL4F9_VB.js} +1 -1
  53. package/dist/client/assets/agent-settings-ESG9192X.js +1 -0
  54. package/dist/client/assets/{agent-site-editor-ClFcVY3S.js → agent-site-editor-CqV30Rul.js} +1 -1
  55. package/dist/client/assets/agent-site-editor-code-BQnTQU7w.js +2 -0
  56. package/dist/client/assets/agent-site-editor-content-qd-na2CD.js +1 -0
  57. package/dist/client/assets/agent-site-editor-preview-BXjMAtak.js +1 -0
  58. package/dist/client/assets/agent-view-BLgY0MfR.js +1 -0
  59. package/dist/client/assets/{agent-view-guard-BCiwIORn.js → agent-view-guard-DZvQvKvl.js} +1 -1
  60. package/dist/client/assets/{ai-providers-bDAV58Mn.js → ai-providers-RlxMy215.js} +1 -1
  61. package/dist/client/assets/{alert-DXhGyLVy.js → alert-B5Ykyt3T.js} +1 -1
  62. package/dist/client/assets/{analytics-sections-DBGqAepm.js → analytics-sections-CrpfbEYH.js} +1 -1
  63. package/dist/client/assets/{api-keys-BNfyNQ7I.js → api-keys-CSc7sP_x.js} +1 -1
  64. package/dist/client/assets/api-keys-vIp11w3k.js +1 -0
  65. package/dist/client/assets/{app-editor-BiIR6cEw.js → app-editor-DghRfIjT.js} +1 -1
  66. package/dist/client/assets/{asset-utils-C4P9UMw5.js → asset-utils-BmMj5wge.js} +1 -1
  67. package/dist/client/assets/{auth-DET1t4rk.js → auth-U9K5aFal.js} +1 -1
  68. package/dist/client/assets/{auth-catchall-Ds0jCVCs.js → auth-catchall-D48r6PhG.js} +1 -1
  69. package/dist/client/assets/{auth-entry-CcoroHhc.js → auth-entry-C6mHpqQT.js} +1 -1
  70. package/dist/client/assets/{auth-split-layout-DyPur8S6.js → auth-split-layout-DZ8IOzfV.js} +1 -1
  71. package/dist/client/assets/{authenticate-and-persist-oauth-BcQblp8z.js → authenticate-and-persist-oauth-DX8Wh7d9.js} +1 -1
  72. package/dist/client/assets/{automation-list-row-CUs_NzLP.js → automation-list-row-DFyb04uK.js} +1 -1
  73. package/dist/client/assets/{automation-runs-CwfQCxx5.js → automation-runs-Bq3l9enC.js} +1 -1
  74. package/dist/client/assets/{automations-aHGSwKcI.js → automations-B2SGyI95.js} +1 -1
  75. package/dist/client/assets/{badge-CPdAi539.js → badge-C5mneqKN.js} +1 -1
  76. package/dist/client/assets/{block-document-Bbw2FP3P.js → block-document-DtjqDxVH.js} +1 -1
  77. package/dist/client/assets/{blocks-preview-workspace-context-CZpRdqcZ.js → blocks-preview-workspace-context-BddxrpRg.js} +1 -1
  78. package/dist/client/assets/blocks-tab-states-BJKt49qf.js +1 -0
  79. package/dist/client/assets/{blog-preview-url-D9nceA8-.js → blog-preview-url-DPwtQPzJ.js} +1 -1
  80. package/dist/client/assets/{blog-schema-CxC8Q-yf.js → blog-schema-CMQLhziN.js} +1 -1
  81. package/dist/client/assets/{blog-source-gate-SOnwSY-u.js → blog-source-gate-WyoFGgE-.js} +1 -1
  82. package/dist/client/assets/{blog-view-gate-CbpRy_w3.js → blog-view-gate-CS668Ila.js} +1 -1
  83. package/dist/client/assets/{buckets-sxg53sM-.js → buckets-DeXHPgox.js} +1 -1
  84. package/dist/client/assets/{build-improve-prompt-doc-D_rPYtI9.js → build-improve-prompt-doc-DnDGx5OC.js} +1 -1
  85. package/dist/client/assets/{calendar-HFJ5axO1.js → calendar-DbxCxf92.js} +1 -1
  86. package/dist/client/assets/{capability-load-error-BCoAaz36.js → capability-load-error-DCozEloC.js} +1 -1
  87. package/dist/client/assets/{category-editor-BIsXNtK9.js → category-editor-BmGhOvZr.js} +1 -1
  88. package/dist/client/assets/{category-tree-BwBGBNEZ.js → category-tree-5dEhPnK2.js} +1 -1
  89. package/dist/client/assets/{chart-_XV_ZGbS.js → chart-Cy7LFFBX.js} +1 -1
  90. package/dist/client/assets/{chat-context-DmIaWG0i.js → chat-context-BOjsomdh.js} +1 -1
  91. package/dist/client/assets/{chat-draft-D5guZJ-Z.js → chat-draft-CYhwlCHc.js} +1 -1
  92. package/dist/client/assets/{checkbox-C6L9-jtU.js → checkbox-Bv8PV_aY.js} +1 -1
  93. package/dist/client/assets/{choose-editor-D-ClYTuz.js → choose-editor-DoyVAhj6.js} +1 -1
  94. package/dist/client/assets/{cli-auth-success-CMqt_C6d.js → cli-auth-success-DaytSyrs.js} +1 -1
  95. package/dist/client/assets/{client-icons-BrNyP8bx.js → client-icons-CiAKjxAC.js} +1 -1
  96. package/dist/client/assets/{cms-settings-editor-Cm7lJgYR.js → cms-settings-editor-Cuu4FHx1.js} +1 -1
  97. package/dist/client/assets/{cms-store-drafts-CTNFCbln.js → cms-store-drafts-B9MSaBY6.js} +1 -1
  98. package/dist/client/assets/{collapsible-SBMmc8E3.js → collapsible-DdHbUgH7.js} +1 -1
  99. package/dist/client/assets/{collection-detail-VM7vyobJ.js → collection-detail-DyddcB5w.js} +1 -1
  100. package/dist/client/assets/{collection-display-button-DNT54OXz.js → collection-display-button-DVJBx_vT.js} +1 -1
  101. package/dist/client/assets/{collection-search-DXnQxUGL.js → collection-search-CwqvBBm4.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-BtWWhOUa.js → collection-table-wrapper-DRrebKp3.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-BPEGrrum.js → collection-tabs-81bsUeqm.js} +1 -1
  104. package/dist/client/assets/{combobox-B8oSfLQg.js → combobox-BrOkSbhh.js} +1 -1
  105. package/dist/client/assets/{command-ARXYIBtk.js → command-woRMyGZF.js} +1 -1
  106. package/dist/client/assets/{companion-mcps-section-CrDXFS6p.js → companion-mcps-section-B5-NAK1i.js} +1 -1
  107. package/dist/client/assets/{config-FNjB2KQg.js → config-CuCmBQuJ.js} +1 -1
  108. package/dist/client/assets/{connect-D7SeHA4r.js → connect-HLDiwDO_.js} +1 -1
  109. package/dist/client/assets/{connect-layout-ByVGILi-.js → connect-layout-CWZCwH8X.js} +1 -1
  110. package/dist/client/assets/{connect-source-dialog-Di53RqvY.js → connect-source-dialog-CBKuqqHC.js} +1 -1
  111. package/dist/client/assets/{connection-BTlRsp1B.js → connection-BIE1Vidl.js} +1 -1
  112. package/dist/client/assets/{connection-card-DFMJTK3o.js → connection-card-gYm1H9XQ.js} +1 -1
  113. package/dist/client/assets/{connection-detail-C-BChkKr.js → connection-detail-QqFuUNuZ.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-B9Yi82ri.js → connection-form-helpers-DA9irt8S.js} +1 -1
  115. package/dist/client/assets/{connection-slug-COimMHkq.js → connection-slug-B8jXAB0J.js} +1 -1
  116. package/dist/client/assets/{connections-fJDsaPLw.js → connections-JyCHdBZv.js} +1 -1
  117. package/dist/client/assets/{content-tab-BV39A4DC.js → content-tab-DRXqlCUR.js} +3 -3
  118. package/dist/client/assets/{context-DHTHUOqh.js → context-C-ghWKlt.js} +1 -1
  119. package/dist/client/assets/{context-menu-B-hlKiE1.js → context-menu-DZcVKhkc.js} +1 -1
  120. package/dist/client/assets/{context-shell-BGKkeMCB.js → context-shell-Bemo51hp.js} +3 -3
  121. package/dist/client/assets/{core.esm-Hiw5xlkT.js → core.esm-Z0qYqKj9.js} +1 -1
  122. package/dist/client/assets/{create-organization-dialog-EtzNyw9E.js → create-organization-dialog-D0g-fdvV.js} +1 -1
  123. package/dist/client/assets/{delete-copy-Bt51Emir.js → delete-copy-DJ_GOWB2.js} +1 -1
  124. package/dist/client/assets/{device-hint-DcULIlAN.js → device-hint-DfKyeTjV.js} +1 -1
  125. package/dist/client/assets/{discover-B7EzX3Z4.js → discover-D7XfOvTK.js} +1 -1
  126. package/dist/client/assets/{domain-settings-CYdry1vA.js → domain-settings-DLWYAbIO.js} +1 -1
  127. package/dist/client/assets/{drawer-BUu3Urhv.js → drawer-BBqyYfPx.js} +1 -1
  128. package/dist/client/assets/{editor-Dc6skLlO.js → editor-D97Qyzcp.js} +1 -1
  129. package/dist/client/assets/{editor-classes-BRb8pzNp.js → editor-classes-szltcTWs.js} +1 -1
  130. package/dist/client/assets/{empty-message-uyJw_GDm.js → empty-message-DEKaeblB.js} +1 -1
  131. package/dist/client/assets/{empty-state-CQ-naxDO.js → empty-state-DpGHzg8-.js} +1 -1
  132. package/dist/client/assets/{empty-state-yinauESn.js → empty-state-wwy36dTA.js} +1 -1
  133. package/dist/client/assets/{experiments-tab-choice-n7UpEKSe.js → experiments-tab-choice-CbqEz4gO.js} +1 -1
  134. package/dist/client/assets/{extract-connection-data-UTX_3j8w.js → extract-connection-data-CXg3fi8w.js} +1 -1
  135. package/dist/client/assets/{feature-gate-Caiq88-a.js → feature-gate-CveHfcPr.js} +1 -1
  136. package/dist/client/assets/{feature-paywall-CgY8XcJe.js → feature-paywall-DFIdKSLH.js} +1 -1
  137. package/dist/client/assets/{file-explorer-Dt28l_Zt.js → file-explorer-OW5FLgme.js} +1 -1
  138. package/dist/client/assets/{file-preview-B_OweD07.js → file-preview-BFUDJsk9.js} +1 -1
  139. package/dist/client/assets/{file-share-button-GtMerxGo.js → file-share-button-E0fcfsBv.js} +1 -1
  140. package/dist/client/assets/{file-type-icon-5sEsvuio.js → file-type-icon-hPTLm32j.js} +1 -1
  141. package/dist/client/assets/{folder-icon-BkVkbSXN.js → folder-icon-DxENQi9B.js} +1 -1
  142. package/dist/client/assets/{form-DQshgY6C.js → form-Bz_uprQc.js} +1 -1
  143. package/dist/client/assets/{frame-navigation-DCO55Sf7.js → frame-navigation-EV-98oaL.js} +1 -1
  144. package/dist/client/assets/{general-BaBNqFUU.js → general-DmOZe5tS.js} +1 -1
  145. package/dist/client/assets/{github-icon-CsOyvsM3.js → github-icon-CR8sfoo5.js} +1 -1
  146. package/dist/client/assets/{held-block-view-CZDHkd7I.js → held-block-view-DW-NjX-S.js} +1 -1
  147. package/dist/client/assets/{home-Csg3jJI1.js → home-C-1mJg3e.js} +1 -1
  148. package/dist/client/assets/{home-overview-BWPQ5B3f.js → home-overview-DZ5M4FB8.js} +1 -1
  149. package/dist/client/assets/{hosted-reconcile-BVY_PuHB.js → hosted-reconcile-JJSMDis4.js} +1 -1
  150. package/dist/client/assets/{icon-button-DTP_l7w5.js → icon-button-DqWSrNSZ.js} +1 -1
  151. package/dist/client/assets/{index-Chdoy1DO.js → index-2LsnM_Ir.js} +1 -1
  152. package/dist/client/assets/{index-BUzNTivf.js → index-7-4YhBZz.js} +1 -1
  153. package/dist/client/assets/{index-PfzOl7J6.js → index-B0kMZVmC.js} +5 -5
  154. package/dist/client/assets/{index-D9OoYQHh.js → index-B2FeU0Zw.js} +1 -1
  155. package/dist/client/assets/{index-TayDSkqp.js → index-BdtGqzV_.js} +1 -1
  156. package/dist/client/assets/{index-B_-7lo18.js → index-BlRhFO8i.js} +1 -1
  157. package/dist/client/assets/{index-CoDU2Q4W.js → index-CUuWKDNH.js} +1 -1
  158. package/dist/client/assets/{index-DThhcUFE.js → index-CeHQIaZQ.js} +1 -1
  159. package/dist/client/assets/{index-xX6vrZ6Z.js → index-CfMRfSbP.js} +1 -1
  160. package/dist/client/assets/{index-DpynbW7T.js → index-CguuJrFu.js} +1 -1
  161. package/dist/client/assets/{index-BxZUC_i-.js → index-CyzY-fLE.js} +1 -1
  162. package/dist/client/assets/{index-D8htcGU7.js → index-D3FgkNbL.js} +1 -1
  163. package/dist/client/assets/{index-Cwblfb1K.js → index-DE9SDic3.js} +1 -1
  164. package/dist/client/assets/{index-BtBKqC_9.js → index-DJq5XMUI.js} +1 -1
  165. package/dist/client/assets/{index-COp-j3NW.js → index-Dpqgfi8_.js} +1 -1
  166. package/dist/client/assets/{index-yk7iwtzd.js → index-aeiz-c5N.js} +1 -1
  167. package/dist/client/assets/{index--NX8xaba.js → index-lrnn1LFo.js} +1 -1
  168. package/dist/client/assets/{index-redirect-BkFuXXfk.js → index-redirect-Tqe_ugUp.js} +1 -1
  169. package/dist/client/assets/{infiniteQueryObserver-BSITs4kU.js → infiniteQueryObserver-Bpp7Nde9.js} +1 -1
  170. package/dist/client/assets/{infra-billing-BoDxU99n.js → infra-billing-BVZxcUBX.js} +1 -1
  171. package/dist/client/assets/{input-CHXvb5rt.js → input-ClzrEMuy.js} +3 -3
  172. package/dist/client/assets/{input-D81euCkI.js → input-D3CQKUJv.js} +1 -1
  173. package/dist/client/assets/{integration-icon-Cypf7ART.js → integration-icon-BNTOj8TI.js} +1 -1
  174. package/dist/client/assets/{item-actions-8EnEtcgh.js → item-actions-DT1aQMAA.js} +1 -1
  175. package/dist/client/assets/{jira-icon-QIwPAzLK.js → jira-icon-CUdm8f26.js} +1 -1
  176. package/dist/client/assets/{label-C3bFtEDk.js → label-C8wqUUzx.js} +1 -1
  177. package/dist/client/assets/{layout-BQNYAbQM.js → layout-BrcEe09L.js} +1 -1
  178. package/dist/client/assets/{legacy-admin-welcome-dialog-BndvejSa.js → legacy-admin-welcome-dialog-5GoRU8S5.js} +1 -1
  179. package/dist/client/assets/{legacy-agents-deep-Dl3vADCo.js → legacy-agents-deep-Bf1vCfoJ.js} +1 -1
  180. package/dist/client/assets/{legacy-main-redirect-ChiwiSS2.js → legacy-main-redirect-Bh63rUhQ.js} +1 -1
  181. package/dist/client/assets/library-CdyTGa2g.js +1 -0
  182. package/dist/client/assets/{library-tab-CrYnUaco.js → library-tab-BVzgC-sN.js} +1 -1
  183. package/dist/client/assets/{login-rcDgqa7Z.js → login-DppNfiAq.js} +1 -1
  184. package/dist/client/assets/{markdown-sfCsYKJ3.js → markdown-ChQfidu_.js} +1 -1
  185. package/dist/client/assets/{mcp-app-renderer-D149puyc.js → mcp-app-renderer-Cqipo_fr.js} +1 -1
  186. package/dist/client/assets/{mcp-oauth-jwlMSPw2.js → mcp-oauth-BW9RlFd8.js} +1 -1
  187. package/dist/client/assets/{mcp-oauth-CSBTsyXo.js → mcp-oauth-C3I9E6hK.js} +1 -1
  188. package/dist/client/assets/{members-CelJ91W8.js → members-BPvSGNqH.js} +1 -1
  189. package/dist/client/assets/{memory-78oDfUbY.js → memory-CQAa3mHm.js} +1 -1
  190. package/dist/client/assets/{mock-board-1wwE7bgl.js → mock-board-BMaXmonr.js} +3 -3
  191. package/dist/client/assets/{monaco-editor-CdzTj7u7.js → monaco-editor-GCVIle1A.js} +1 -1
  192. package/dist/client/assets/{monitoring-CMxjfhWD.js → monitoring-RTFaXjle.js} +1 -1
  193. package/dist/client/assets/{monitoring-stats-row-DQq79-Av.js → monitoring-stats-row-h4pC7kD6.js} +1 -1
  194. package/dist/client/assets/{multi-select-DuhSvGkq.js → multi-select-sZG2voKq.js} +1 -1
  195. package/dist/client/assets/{mustache-7iPTegv4.js → mustache-BXaNyEgZ.js} +1 -1
  196. package/dist/client/assets/{named-rule-step-osjl7ntJ.js → named-rule-step-EI_qv23D.js} +1 -1
  197. package/dist/client/assets/{named-rule-view-BLodRfDS.js → named-rule-view-DcHqSDt-.js} +1 -1
  198. package/dist/client/assets/{new-project-dialog-ddGWO7oU.js → new-project-dialog-B8ntXRJU.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-ai-provider-lqjcXm4x.js → oauth-callback-ai-provider-of2OYrpv.js} +1 -1
  200. package/dist/client/assets/{oauth-callback-O0HaoPhW.js → oauth-callback-p3ywWjTz.js} +1 -1
  201. package/dist/client/assets/{oauth-consent-N41ISlqj.js → oauth-consent-DpXLchYG.js} +1 -1
  202. package/dist/client/assets/{onboarding-5wyvG1ND.js → onboarding-DKqNWZqa.js} +1 -1
  203. package/dist/client/assets/{openai-conversation-CHwDAykX.js → openai-conversation-CFoe4Qa0.js} +1 -1
  204. package/dist/client/assets/{optimistic-project-sidebar-views-1aPoGedf.js → optimistic-project-sidebar-views-B5MpSmQi.js} +1 -1
  205. package/dist/client/assets/{order-monitor-day-BETRE7hY.js → order-monitor-day-DEpjybnZ.js} +1 -1
  206. package/dist/client/assets/{organization-choice-xEY1ZwIn.js → organization-choice-DP7th0jj.js} +1 -1
  207. package/dist/client/assets/{orgs-BV4-A9Pr.js → orgs-DPHlMXcd.js} +1 -1
  208. package/dist/client/assets/{own-accounts-section-DY9RNK5U.js → own-accounts-section-DwQLTK3b.js} +1 -1
  209. package/dist/client/assets/{pair-4_jIXzEz.js → pair-BXQ1AL58.js} +1 -1
  210. package/dist/client/assets/{parse-sections-Crm8e-1O.js → parse-sections-CW6TmrTp.js} +2 -2
  211. package/dist/client/assets/{plan-TSt9lDnY.js → plan-DzDjgwtt.js} +1 -1
  212. package/dist/client/assets/{plan-ladder-6lanq0kZ.js → plan-ladder-B0kBPdzm.js} +1 -1
  213. package/dist/client/assets/{plan-usage-card-qPS6Eqeb.js → plan-usage-card-hmzG52qo.js} +1 -1
  214. package/dist/client/assets/{popover-BBhzRgR6.js → popover-CLUI-WCq.js} +1 -1
  215. package/dist/client/assets/{post-calendar-XeIGYeqg.js → post-calendar-DGbwtgLH.js} +1 -1
  216. package/dist/client/assets/{post-editor-Cuw86g74.js → post-editor-Cb57gZLf.js} +1 -1
  217. package/dist/client/assets/{preview-content-CdaarV-M.js → preview-content-YsDfk6M3.js} +1 -1
  218. package/dist/client/assets/{preview-dialog-eUjd7KAO.js → preview-dialog-Bz6A7RNp.js} +1 -1
  219. package/dist/client/assets/{preview-panel-DOASEmB8.js → preview-panel-4Ms4IncO.js} +1 -1
  220. package/dist/client/assets/{preview-tab-DHUmCnt8.js → preview-tab-DEm7tkhA.js} +3 -3
  221. package/dist/client/assets/{product-picker-dialog-z_7jLJp3.js → product-picker-dialog-CNlHID1U.js} +1 -1
  222. package/dist/client/assets/{profile-Q_Uil_2O.js → profile-Bt00wkq5.js} +1 -1
  223. package/dist/client/assets/{project-app-view-B_pnPMK9.js → project-app-view-BTWft0P3.js} +1 -1
  224. package/dist/client/assets/{project-apps-DOmYqPIW.js → project-apps-XmfSXScr.js} +1 -1
  225. package/dist/client/assets/{project-icon-DdcX-1Cu.js → project-icon-BkeJc-xp.js} +1 -1
  226. package/dist/client/assets/{project-index-CvnWioTG.js → project-index-C3tTBxDV.js} +1 -1
  227. package/dist/client/assets/project-reports-CWeaaEZO.js +1 -0
  228. package/dist/client/assets/project-tasks-jNfpaaGU.js +1 -0
  229. package/dist/client/assets/{projects-BnupWVNC.js → projects-D_tybxDG.js} +1 -1
  230. package/dist/client/assets/{projects-empty-state-BBAZx24q.js → projects-empty-state-BN5sLjWv.js} +1 -1
  231. package/dist/client/assets/{prompts-CtCcnkuf.js → prompts-CBKakZB5.js} +1 -1
  232. package/dist/client/assets/{record-editor-kAlyd6wn.js → record-editor-DF0JyxbJ.js} +1 -1
  233. package/dist/client/assets/{redirect-editor-G5HzKFY7.js → redirect-editor-DCz9NXOZ.js} +1 -1
  234. package/dist/client/assets/reports-CffaUFeU.js +1 -0
  235. package/dist/client/assets/{reports-CCeLAtH1.js → reports-Df9PLvuX.js} +1 -1
  236. package/dist/client/assets/{reports-onboarding-CihuSs_4.js → reports-onboarding-DCAmw-bq.js} +1 -1
  237. package/dist/client/assets/{reports-tab-CxCo6ljz.js → reports-tab-RfuGKaQ3.js} +2 -2
  238. package/dist/client/assets/{repositories-Cr0Vmqsy.js → repositories-B40Xay0b.js} +1 -1
  239. package/dist/client/assets/repositories-B_3cIxMq.js +1 -0
  240. package/dist/client/assets/{repository-binding-BjyWZpYn.js → repository-binding-DqsJn1Sb.js} +1 -1
  241. package/dist/client/assets/{repository-picker-BQKFq3La.js → repository-picker-DjmqKxQp.js} +1 -1
  242. package/dist/client/assets/{require-capability-Ca04y4iT.js → require-capability-11VEza5N.js} +1 -1
  243. package/dist/client/assets/{required-auth-layout-rj346c5-.js → required-auth-layout-CnCT_9Qk.js} +1 -1
  244. package/dist/client/assets/{reset-password-CJ8Ib39J.js → reset-password-DhGtg5RA.js} +1 -1
  245. package/dist/client/assets/{resizable-BWGQtKDK.js → resizable-DqI16h9r.js} +1 -1
  246. package/dist/client/assets/{resolve-tab-icon--gm9VDQf.js → resolve-tab-icon-SqRc32_W.js} +1 -1
  247. package/dist/client/assets/{review-settings-DKHV4WWw.js → review-settings-DsCgah9j.js} +1 -1
  248. package/dist/client/assets/{role-color-h7pbmUj8.js → role-color-Bsnv2ruh.js} +1 -1
  249. package/dist/client/assets/{roles-33JtztJp.js → roles-CfgNfQ5D.js} +1 -1
  250. package/dist/client/assets/{route-esSEnbHB.js → route-CF7rRyVo.js} +1 -1
  251. package/dist/client/assets/route-DJv7Nx6V.js +1 -0
  252. package/dist/client/assets/{route-B2mhSQ66.js → route-YS6zinDQ.js} +1 -1
  253. package/dist/client/assets/{sandbox-lifecycle-context-ciVvS_mf.js → sandbox-lifecycle-context-Cm_5q5SF.js} +1 -1
  254. package/dist/client/assets/{save-status-YxsSW2Rs.js → save-status-DQIuewYI.js} +1 -1
  255. package/dist/client/assets/{schema-CWJkmqKK.js → schema-BtSfTK7H.js} +1 -1
  256. package/dist/client/assets/{schema-MF7uKk3F.js → schema-CMu2qDHJ.js} +1 -1
  257. package/dist/client/assets/{scroll-area-D0b5TYGa.js → scroll-area-CNyj4Q1_.js} +1 -1
  258. package/dist/client/assets/{search-input-CfjxHAmm.js → search-input-DfFZA2x_.js} +1 -1
  259. package/dist/client/assets/{search-toggle-CvrrivM1.js → search-toggle-BMP-t51j.js} +1 -1
  260. package/dist/client/assets/{secret-picker-Bh-9Okys.js → secret-picker-Cia0fA6k.js} +1 -1
  261. package/dist/client/assets/{secrets-BpaSArcv.js → secrets-Db72b1dr.js} +1 -1
  262. package/dist/client/assets/{section-array-field-YpT7n9vG.js → section-array-field-CItEGXFU.js} +1 -1
  263. package/dist/client/assets/{sections-BDOnV4mD.js → sections-BnvGhIDh.js} +1 -1
  264. package/dist/client/assets/{sections-editor-e-APM9PR.js → sections-editor-8kOnY41Y.js} +1 -1
  265. package/dist/client/assets/{select-DbxUTGle.js → select-B-QXEyVH.js} +1 -1
  266. package/dist/client/assets/{select-model-B_SYZDlx.js → select-model-BM57OK8a.js} +1 -1
  267. package/dist/client/assets/{seo-editor-BAb4_SVN.js → seo-editor-DUVQDKfJ.js} +1 -1
  268. package/dist/client/assets/{separator-C0AfeS3O.js → separator-CZVEZSKr.js} +1 -1
  269. package/dist/client/assets/settings-tab-B9XpN8jX.js +1 -0
  270. package/dist/client/assets/{sheet-BeOc3FAs.js → sheet-DFpCUkzK.js} +1 -1
  271. package/dist/client/assets/{shell-layout-QlUCYlok.js → shell-layout-3tQDWFJU.js} +1 -1
  272. package/dist/client/assets/{site-draft-actions-BsBc3-Kf.js → site-draft-actions-BT56hEH5.js} +1 -1
  273. package/dist/client/assets/{site-draft-view-B2Uxv1of.js → site-draft-view-DaVZ51CU.js} +1 -1
  274. package/dist/client/assets/site-editor-DhUm8vlF.js +1 -0
  275. package/dist/client/assets/{site-editor-toast-Bw0qMl-K.js → site-editor-toast-DrPEsDU7.js} +1 -1
  276. package/dist/client/assets/{skills-DK12dTU3.js → skills-Bh8g9zPx.js} +1 -1
  277. package/dist/client/assets/{slider-DWOCTsGO.js → slider-D5-tjvxC.js} +1 -1
  278. package/dist/client/assets/{sortable.esm-Bcfqg7Xt.js → sortable.esm-CD7Wn3a-.js} +1 -1
  279. package/dist/client/assets/{sso-BK-CwpIa.js → sso-CgVuMvqq.js} +1 -1
  280. package/dist/client/assets/{suggestion-DpDJqics.js → suggestion-BjK1ijWQ.js} +1 -1
  281. package/dist/client/assets/{super-agent-icon-DSWf_C0v.js → super-agent-icon-D1UApnZ8.js} +1 -1
  282. package/dist/client/assets/{switch-CdoFqihq.js → switch-YFmb691t.js} +1 -1
  283. package/dist/client/assets/{synced-repos-BBp6YhqW.js → synced-repos-QaqG0EO3.js} +1 -1
  284. package/dist/client/assets/{tab-icon-glyph-BA-Ya2gQ.js → tab-icon-glyph-CjjddmUR.js} +1 -1
  285. package/dist/client/assets/{table-DBeLX30i.js → table-EoWRqCf0.js} +1 -1
  286. package/dist/client/assets/{tabs-BwIUi1Ro.js → tabs-BPfd6mHK.js} +1 -1
  287. package/dist/client/assets/{task-board-Dt94BxWj.js → task-board-CjAeUa_m.js} +1 -1
  288. package/dist/client/assets/{task-route-BLTj-Kt_.js → task-route-Br2Lpz0h.js} +1 -1
  289. package/dist/client/assets/{task-status-COZT_U35.js → task-status-e2bwwrq0.js} +1 -1
  290. package/dist/client/assets/{taskboard-analytics-DTwKCUBR.js → taskboard-analytics-Dz_bNdVa.js} +1 -1
  291. package/dist/client/assets/{tasks-BSIA3XNt.js → tasks-B4uBSKBg.js} +1 -1
  292. package/dist/client/assets/tasks-CwupKgpp.js +1 -0
  293. package/dist/client/assets/{textarea-0zeG6rdh.js → textarea-BDeCVCG_.js} +1 -1
  294. package/dist/client/assets/{thread-analytics-e-DAlOc7.js → thread-analytics-DhaZl6TQ.js} +1 -1
  295. package/dist/client/assets/{thread-intent-k_EWWvIp.js → thread-intent-oRL32U-K.js} +1 -1
  296. package/dist/client/assets/{thread-route-bIv-22ov.js → thread-route-Be5LHqPZ.js} +1 -1
  297. package/dist/client/assets/{thread-route-T4ycKium.js → thread-route-tkHuy51W.js} +1 -1
  298. package/dist/client/assets/{thread-sheet-body-D5ENmZN2.js → thread-sheet-body-De3nDIYw.js} +1 -1
  299. package/dist/client/assets/{time-range-picker-l-A1yfsB.js → time-range-picker-RqJkhR4f.js} +1 -1
  300. package/dist/client/assets/{toggle-group-BR3YjLpg.js → toggle-group-Dyg7Y_bS.js} +1 -1
  301. package/dist/client/assets/{tool-namespace-nlvRAMHv.js → tool-namespace-pd4DYce0.js} +1 -1
  302. package/dist/client/assets/{tool-set-selector-iLTKI2dh.js → tool-set-selector-BxflvD5s.js} +1 -1
  303. package/dist/client/assets/{toolbar-icon-button-C1sAn-5j.js → toolbar-icon-button-T_NjCrYE.js} +1 -1
  304. package/dist/client/assets/{tooltip-7oUFzrc9.js → tooltip-BTKQq4Sy.js} +1 -1
  305. package/dist/client/assets/{tooltipContext-BnluVbPZ.js → tooltipContext-B3whzr3K.js} +1 -1
  306. package/dist/client/assets/{track-ClTfqB2h.js → track-hg2uNpQa.js} +1 -1
  307. package/dist/client/assets/{types-CT2b_f_n.js → types-DD9MvS2H.js} +1 -1
  308. package/dist/client/assets/{url-slug-DlwXWMoY.js → url-slug-CAaHyqrT.js} +1 -1
  309. package/dist/client/assets/{usage-stats-DXQh2ym6.js → usage-stats-LrxjpMvT.js} +1 -1
  310. package/dist/client/assets/{use-ai-providers-BV-M-wTR.js → use-ai-providers-BnCLnm6i.js} +1 -1
  311. package/dist/client/assets/{use-apply-named-rule-DVA8503u.js → use-apply-named-rule-CQGJ9Q6I.js} +1 -1
  312. package/dist/client/assets/use-ask-in-chat-Bn7rwpYM.js +1 -0
  313. package/dist/client/assets/{use-automations-CkOHisGI.js → use-automations-CRCU5rUU.js} +1 -1
  314. package/dist/client/assets/{use-autosave-CMjKQ8gr.js → use-autosave-HJouXCY9.js} +1 -1
  315. package/dist/client/assets/use-blocks-v8-project-Dd6JSEDd.js +1 -0
  316. package/dist/client/assets/{use-chat-layout-state-DYxnWGXI.js → use-chat-layout-state-DZgmLot0.js} +1 -1
  317. package/dist/client/assets/{use-cms-publish-actions-BRuQD-xn.js → use-cms-publish-actions-CQn8AjkF.js} +1 -1
  318. package/dist/client/assets/{use-connect-companion-Bz03TbqD.js → use-connect-companion-DgTOfpzN.js} +1 -1
  319. package/dist/client/assets/{use-connection-b1ZFdIKu.js → use-connection-jMnM0Hiq.js} +1 -1
  320. package/dist/client/assets/{use-content-sync-J1DOMeIV.js → use-content-sync-DvjyB8U-.js} +1 -1
  321. package/dist/client/assets/{use-copy-MGOjhapZ.js → use-copy-B36-QB7R.js} +1 -1
  322. package/dist/client/assets/{use-date-fns-locale-Db1-0fqy.js → use-date-fns-locale-CVz_yaSt.js} +1 -1
  323. package/dist/client/assets/{use-debounced-autosave-0ckPn95E.js → use-debounced-autosave-BCwvmx_C.js} +1 -1
  324. package/dist/client/assets/{use-debounced-value-L8Mvr3Qf.js → use-debounced-value-Be2K3Tgl.js} +1 -1
  325. package/dist/client/assets/{use-deco-credits-CXHEdY4g.js → use-deco-credits-B5uE_Z9G.js} +1 -1
  326. package/dist/client/assets/{use-decopilot-events-CExfz_YN.js → use-decopilot-events-144aPqKs.js} +1 -1
  327. package/dist/client/assets/{use-delete-block-C4Fd-0fO.js → use-delete-block-BSTpS7wO.js} +1 -1
  328. package/dist/client/assets/{use-delete-connection-CiHyt6_e.js → use-delete-connection-BIASpF84.js} +1 -1
  329. package/dist/client/assets/{use-deployment-admin-D6ysmdql.js → use-deployment-admin-CK9MBH_P.js} +1 -1
  330. package/dist/client/assets/{use-entitlements-DKzKnO7t.js → use-entitlements-D0Sb8QlP.js} +1 -1
  331. package/dist/client/assets/{use-fast-preview-draft-url-Rhzecu_l.js → use-fast-preview-draft-url-D9g7iX8I.js} +1 -1
  332. package/dist/client/assets/{use-file-configs-FzJwNbFB.js → use-file-configs-Tkt_AHql.js} +1 -1
  333. package/dist/client/assets/{use-id-selection-DV-7Zfn_.js → use-id-selection-Cpsai2fK.js} +1 -1
  334. package/dist/client/assets/{use-inbox-feed-P-dmKrll.js → use-inbox-feed-CUpQJBQD.js} +1 -1
  335. package/dist/client/assets/{use-infinite-scroll-D4cD1T3_.js → use-infinite-scroll-C-wdmvlm.js} +1 -1
  336. package/dist/client/assets/{use-join-requests-BZyMQ0xJ.js → use-join-requests-D6nkHBhc.js} +1 -1
  337. package/dist/client/assets/{use-main-panel-tabs-DTyQot8D.js → use-main-panel-tabs-DTIYfLGl.js} +1 -1
  338. package/dist/client/assets/{use-mcp-auth-status-BzTNOh9a.js → use-mcp-auth-status-C3bL-6Ja.js} +1 -1
  339. package/dist/client/assets/{use-mcp-client-CVGnTbnR.js → use-mcp-client-Cp7itm-S.js} +1 -1
  340. package/dist/client/assets/{use-mcp-prompts-C72FS5ih.js → use-mcp-prompts-CF2bE4L8.js} +1 -1
  341. package/dist/client/assets/{use-mcp-tools-DQ6qPp-q.js → use-mcp-tools-DqfH77AW.js} +1 -1
  342. package/dist/client/assets/{use-mobile-Box5tF93.js → use-mobile-CMr55W3O.js} +1 -1
  343. package/dist/client/assets/{use-move-blocks-D_Vs6N9H.js → use-move-blocks-vAC3BNbO.js} +1 -1
  344. package/dist/client/assets/{use-navigate-to-agent-BFXAaVqR.js → use-navigate-to-agent-Bc47TXuM.js} +1 -1
  345. package/dist/client/assets/{use-never-published-D5jr8ByQ.js → use-never-published-622FRxP4.js} +1 -1
  346. package/dist/client/assets/{use-org-fs-DhEmmAqR.js → use-org-fs-CnKWtsx6.js} +1 -1
  347. package/dist/client/assets/{use-org-repo-syncs-D4_eFcdp.js → use-org-repo-syncs-CWan9UEi.js} +1 -1
  348. package/dist/client/assets/{use-org-sso-PK2UdKUD.js → use-org-sso-Dx6waIv3.js} +1 -1
  349. package/dist/client/assets/{use-organization-settings-1gniuS7P.js → use-organization-settings-C44OxrrF.js} +1 -1
  350. package/dist/client/assets/{use-project-native-view-presence-CWUPdvlx.js → use-project-native-view-presence-BOiBdd4j.js} +1 -1
  351. package/dist/client/assets/{use-project-scope-RvpHL0s_.js → use-project-scope-BpnU42cL.js} +1 -1
  352. package/dist/client/assets/{use-recent-apps-B7zKTjxf.js → use-recent-apps-DIc0b7h6.js} +1 -1
  353. package/dist/client/assets/{use-reports-diagnostic-Df9ZgP2V.js → use-reports-diagnostic-l8XSuOVG.js} +1 -1
  354. package/dist/client/assets/{use-sandbox-events-BV2Y1Vu8.js → use-sandbox-events-BTC_EPGc.js} +1 -1
  355. package/dist/client/assets/{use-secrets-DE7J5I_l.js → use-secrets-CFtisZrp.js} +1 -1
  356. package/dist/client/assets/{use-section-preview-base-BJE9UobB.js → use-section-preview-base-C9SoEJn0.js} +1 -1
  357. package/dist/client/assets/{use-sidebar-collapsed-BFQg4qhu.js → use-sidebar-collapsed-V5_gd1MI.js} +1 -1
  358. package/dist/client/assets/{use-tags-CV-rF5OD.js → use-tags-Cxhud9Xt.js} +1 -1
  359. package/dist/client/assets/{use-task-board-analytics-BFgtA0eR.js → use-task-board-analytics-CpAa6pHW.js} +1 -1
  360. package/dist/client/assets/{use-task-board-events-DMey0obH.js → use-task-board-events-DspRxQsF.js} +1 -1
  361. package/dist/client/assets/{use-task-board-item-prs-B52UpU_u.js → use-task-board-item-prs-CZVWQT5i.js} +1 -1
  362. package/dist/client/assets/{use-task-board-items-BxTPwb-L.js → use-task-board-items-CzVlUMOO.js} +1 -1
  363. package/dist/client/assets/{use-task-board-prompts-BRQWf9Pf.js → use-task-board-prompts-ngKSI_fY.js} +1 -1
  364. package/dist/client/assets/{use-task-metadata-CX5mjd3k.js → use-task-metadata-DiPyoyq1.js} +1 -1
  365. package/dist/client/assets/{use-thread-outputs-NzO2uf9T.js → use-thread-outputs-BT9YWT4X.js} +1 -1
  366. package/dist/client/assets/{use-view-draft-kind-Czb3VJ2z.js → use-view-draft-kind-BTxfGo3P.js} +1 -1
  367. package/dist/client/assets/{use-voice-input-CJwxrnH4.js → use-voice-input-D66t9nvu.js} +1 -1
  368. package/dist/client/assets/useInfiniteQuery-BLIxG3uZ.js +1 -0
  369. package/dist/client/assets/{useQueries-BTKHF006.js → useQueries-M4myONOE.js} +1 -1
  370. package/dist/client/assets/useSuspenseInfiniteQuery-BJmR9zYx.js +1 -0
  371. package/dist/client/assets/{users-C1cmyiHr.js → users-BRGauFES.js} +1 -1
  372. package/dist/client/assets/{utils-dLgjLO-5.js → utils-CZf0WW3u.js} +1 -1
  373. package/dist/client/assets/{variant-calendar-BFvdqyOs.js → variant-calendar-MTIN2TYC.js} +1 -1
  374. package/dist/client/assets/{variant-matcher-override-uOKZ9bIk.js → variant-matcher-override-yvSV8zF4.js} +1 -1
  375. package/dist/client/assets/{view-header-g_I-xUvY.js → view-header-D_yXL60l.js} +1 -1
  376. package/dist/client/assets/{virtual-mcp-CIFm7Ktp.js → virtual-mcp-D2YHeobd.js} +1 -1
  377. package/dist/client/assets/{watch-sse-pool-Cs81gduQ.js → watch-sse-pool-DDOa1h_t.js} +1 -1
  378. package/dist/client/index.html +1 -1
  379. package/dist/server/server.js +1 -1
  380. package/package.json +1 -1
  381. package/dist/client/assets/agent-app-FoPCQlJh.js +0 -1
  382. package/dist/client/assets/agent-deck-CYqAnEDO.js +0 -1
  383. package/dist/client/assets/agent-experiments-C0HV4Igp.js +0 -1
  384. package/dist/client/assets/agent-library-CZViQovH.js +0 -1
  385. package/dist/client/assets/agent-library-file-DC-34Ulj.js +0 -1
  386. package/dist/client/assets/agent-overview-DIMIEsnS.js +0 -1
  387. package/dist/client/assets/agent-settings-Ct-2qeci.js +0 -1
  388. package/dist/client/assets/agent-site-editor-code-B_iiio_B.js +0 -2
  389. package/dist/client/assets/agent-site-editor-content-XnR2gN3f.js +0 -1
  390. package/dist/client/assets/agent-site-editor-preview-DuB0qtlm.js +0 -1
  391. package/dist/client/assets/agent-view-B8ACan0R.js +0 -1
  392. package/dist/client/assets/api-keys-BHoBmIeA.js +0 -1
  393. package/dist/client/assets/blocks-tab-states-B3rnTo7L.js +0 -1
  394. package/dist/client/assets/library-BRiige9x.js +0 -1
  395. package/dist/client/assets/project-reports-CjkBj3OZ.js +0 -1
  396. package/dist/client/assets/project-tasks-BR7DB76X.js +0 -1
  397. package/dist/client/assets/reports-BZMzVdGj.js +0 -1
  398. package/dist/client/assets/repositories-xVxXVGUl.js +0 -1
  399. package/dist/client/assets/route-L9WJSo8Z.js +0 -1
  400. package/dist/client/assets/settings-tab-BdJ07iEH.js +0 -1
  401. package/dist/client/assets/site-editor-CkLwv4jN.js +0 -1
  402. package/dist/client/assets/tasks-CbzokKrd.js +0 -1
  403. package/dist/client/assets/use-ask-in-chat-BNelLcsB.js +0 -1
  404. package/dist/client/assets/use-blocks-v8-project-DwFetary.js +0 -1
  405. package/dist/client/assets/useInfiniteQuery-BVraOGoC.js +0 -1
  406. package/dist/client/assets/useSuspenseInfiniteQuery-Ta5X_y4e.js +0 -1
@@ -1 +1 @@
1
- import{c as g,m as p,j as f}from"./index-PfzOl7J6.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-B0kMZVmC.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-CSBTsyXo.js";import{i as p}from"./mcp-oauth-jwlMSPw2.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-C3I9E6hK.js";import{i as p}from"./mcp-oauth-BW9RlFd8.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 G,b as Q,r as ee,m as q,j as t,X as te,B as se,_ as ie,Z as ne,Y as ae,aH as oe,aI as le,aJ as re,aK as ce,b5 as me,aL as ue,aM as de,aN as fe}from"./index-PfzOl7J6.js";import{B as ge}from"./badge-CPdAi539.js";import{A as xe,W as pe}from"./agent-icon-DPgCnEV1.js";import{a as he}from"./SwitchHorizontal01-BzX5npS9.js";import{s as je}from"./Trash01-_1ewPMOO.js";import{i as _e}from"./Zap-D5X_AlHR.js";import{b as we}from"./repository-binding-BjyWZpYn.js";import{a as ve}from"./use-automations-CkOHisGI.js";function ze(c){const e=G.c(89),{automation:s,showAgent:o,onClick:n}=c,i=Q(),{remove:a}=ve(),[r,J]=ee.useState(!1),l=we(o?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==a?(F=()=>{a.mutate(s.id),J(!1)},e[0]=s.id,e[1]=a,e[2]=F):F=e[2];const V=F;let K;e[3]!==n?(K=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=K):K=e[4];const W=K,X=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==X?(u=q("inline-block size-2 rounded-full shrink-0",X),e[5]=X,e[6]=u):u=e[6];const Y=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==Y?(d=i(Y),e[7]=i,e[8]=Y,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(xe,{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 Z=s.system_key&&"invisible";let v;e[36]!==Z?(v=q("shrink-0",Z),e[36]=Z,e[37]=v):v=e[37];let O;e[38]===Symbol.for("react.memo_cache_sentinel")?(O=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(he,{size:16})})}),e[38]=O):O=e[38];let $,I;e[39]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),J(!0)},I=t.jsx(je,{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:[O,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]!==W||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:W,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]=W,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 U=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:U,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 S;e[80]!==C||e[81]!==M?(S=t.jsxs(de,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==r||e[84]!==S?(E=t.jsx(fe,{open:r,onOpenChange:J,children:S}),e[83]=r,e[84]=S,e[85]=E):E=e[85];let H;return e[86]!==N||e[87]!==E?(H=t.jsxs(t.Fragment,{children:[N,E]}),e[86]=N,e[87]=E,e[88]=H):H=e[88],H}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=G.c(8),{triggerCount:s,nextRunAt:o}=c,n=Q();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(pe,{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(_e,{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{ze as A};
1
+ import{c as G,b as Q,r as ee,m as q,j as t,X as te,B as se,_ as ie,Z as ne,Y as ae,aH as oe,aI as le,aJ as re,aK as ce,b5 as me,aL as ue,aM as de,aN as fe}from"./index-B0kMZVmC.js";import{B as ge}from"./badge-C5mneqKN.js";import{A as xe,W as pe}from"./agent-icon-BLhMgLPf.js";import{a as he}from"./SwitchHorizontal01-TvywMML0.js";import{s as je}from"./Trash01-DcgAZcrm.js";import{i as _e}from"./Zap-C1Evk-yy.js";import{b as we}from"./repository-binding-DqsJn1Sb.js";import{a as ve}from"./use-automations-CRCU5rUU.js";function ze(c){const e=G.c(89),{automation:s,showAgent:o,onClick:n}=c,i=Q(),{remove:a}=ve(),[r,J]=ee.useState(!1),l=we(o?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==a?(F=()=>{a.mutate(s.id),J(!1)},e[0]=s.id,e[1]=a,e[2]=F):F=e[2];const V=F;let K;e[3]!==n?(K=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=K):K=e[4];const W=K,X=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==X?(u=q("inline-block size-2 rounded-full shrink-0",X),e[5]=X,e[6]=u):u=e[6];const Y=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==Y?(d=i(Y),e[7]=i,e[8]=Y,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(xe,{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 Z=s.system_key&&"invisible";let v;e[36]!==Z?(v=q("shrink-0",Z),e[36]=Z,e[37]=v):v=e[37];let O;e[38]===Symbol.for("react.memo_cache_sentinel")?(O=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(he,{size:16})})}),e[38]=O):O=e[38];let $,I;e[39]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),J(!0)},I=t.jsx(je,{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:[O,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]!==W||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:W,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]=W,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 U=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:U,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 S;e[80]!==C||e[81]!==M?(S=t.jsxs(de,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==r||e[84]!==S?(E=t.jsx(fe,{open:r,onOpenChange:J,children:S}),e[83]=r,e[84]=S,e[85]=E):E=e[85];let H;return e[86]!==N||e[87]!==E?(H=t.jsxs(t.Fragment,{children:[N,E]}),e[86]=N,e[87]=E,e[88]=H):H=e[88],H}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=G.c(8),{triggerCount:s,nextRunAt:o}=c,n=Q();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(pe,{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(_e,{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{ze as A};
@@ -1 +1 @@
1
- import{c as Y,b as X,a4 as lt,T as it,ak as rt,eJ as ct,K as tt,j as s,m as ut,i as mt,gD as dt}from"./index-PfzOl7J6.js";import{u as ft}from"./useInfiniteQuery-BVraOGoC.js";import{b as xt}from"./use-connection-b1ZFdIKu.js";import{u as pt}from"./use-mcp-client-CVGnTbnR.js";import{a as gt}from"./repository-binding-BjyWZpYn.js";import{b as ht,a as Rt}from"./sheet-BeOc3FAs.js";import{e as jt,a as Nt,b as st,T as G,d as Tt,c as Q}from"./table-DBeLX30i.js";import{E as et}from"./empty-state-CQ-naxDO.js";import{u as bt}from"./use-id-selection-DV-7Zfn_.js";import{u as St}from"./use-infinite-scroll-D4cD1T3_.js";import{g as vt}from"./task-status-COZT_U35.js";import{e as Ct}from"./use-automations-CkOHisGI.js";import{T as wt,f as at,a as nt}from"./thread-sheet-body-D5ENmZN2.js";const W=50;function z(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 k;t[0]!==a?(k=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",t[0]=a,t[1]=k):k=t[1];const C=k;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(z,{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(z,{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(z,{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(z,{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 _=new Date(r.created_at);a=_.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=_.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 k=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 _=vt(r.status),$=_.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:_.iconClassName}),b=ut("text-sm",_.labelColor),d=n(_.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 P;t[42]!==k?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:k}),t[42]=k,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,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 k=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:J}=U,ot=J===void 0?0:J;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(_t),g=i.map(Pt),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 P;t[25]!==p||t[26]!==I||t[27]!==D?(P={queryKey:p,queryFn:I,enabled:D,staleTime:3e4},t[25]=p,t[26]=I,t[27]=D,t[28]=P):P=t[28];const{data:E}=T(P);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(kt)),t[29]=E?.items,t[30]=M):M=t[30];const _=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]!==_?(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,J)=>s.jsx(It,{run:U,usage:_.get(U.id),onClick:()=>R.select(U.id),lastRowRef:J===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]=_,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]!==k||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:k,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]=k,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 kt(m){return[m.threadId,{calls:m.calls,inputTokens:m.inputTokens,outputTokens:m.outputTokens,totalTokens:m.totalTokens,costUsd:m.costUsd}]}function Pt(m){return m.id}function _t(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,a4 as lt,T as it,ak as rt,eJ as ct,K as tt,j as s,m as ut,i as mt,gD as dt}from"./index-B0kMZVmC.js";import{u as ft}from"./useInfiniteQuery-BLIxG3uZ.js";import{b as xt}from"./use-connection-jMnM0Hiq.js";import{u as pt}from"./use-mcp-client-Cp7itm-S.js";import{a as gt}from"./repository-binding-DqsJn1Sb.js";import{b as ht,a as Rt}from"./sheet-DFpCUkzK.js";import{e as jt,a as Nt,b as st,T as G,d as Tt,c as Q}from"./table-EoWRqCf0.js";import{E as et}from"./empty-state-DpGHzg8-.js";import{u as bt}from"./use-id-selection-Cpsai2fK.js";import{u as St}from"./use-infinite-scroll-C-wdmvlm.js";import{g as vt}from"./task-status-e2bwwrq0.js";import{e as Ct}from"./use-automations-CRCU5rUU.js";import{T as wt,f as at,a as nt}from"./thread-sheet-body-De3nDIYw.js";const W=50;function z(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 k;t[0]!==a?(k=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",t[0]=a,t[1]=k):k=t[1];const C=k;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(z,{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(z,{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(z,{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(z,{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 _=new Date(r.created_at);a=_.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=_.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 k=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 _=vt(r.status),$=_.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:_.iconClassName}),b=ut("text-sm",_.labelColor),d=n(_.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 P;t[42]!==k?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:k}),t[42]=k,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,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 k=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:J}=U,ot=J===void 0?0:J;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(_t),g=i.map(Pt),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 P;t[25]!==p||t[26]!==I||t[27]!==D?(P={queryKey:p,queryFn:I,enabled:D,staleTime:3e4},t[25]=p,t[26]=I,t[27]=D,t[28]=P):P=t[28];const{data:E}=T(P);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(kt)),t[29]=E?.items,t[30]=M):M=t[30];const _=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]!==_?(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,J)=>s.jsx(It,{run:U,usage:_.get(U.id),onClick:()=>R.select(U.id),lastRowRef:J===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]=_,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]!==k||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:k,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]=k,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 kt(m){return[m.threadId,{calls:m.calls,inputTokens:m.inputTokens,outputTokens:m.outputTokens,totalTokens:m.totalTokens,costUsd:m.costUsd}]}function Pt(m){return m.id}function _t(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 $,a4 as D,d as M,r as q,n as d,B as V,hh as F,E as S}from"./index-PfzOl7J6.js";import{s as G}from"./Plus-D452i-ki.js";import{i as b}from"./Zap-D5X_AlHR.js";import{S as H}from"./search-input-CfjxHAmm.js";import{E as T}from"./empty-state-CQ-naxDO.js";import{u as J}from"./use-automations-CkOHisGI.js";import{u as K}from"./use-navigate-to-agent-BFXAaVqR.js";import{A as O}from"./automation-list-row-CUs_NzLP.js";import{a as Q}from"./repository-binding-BjyWZpYn.js";import{R as U}from"./require-capability-Ca04y4iT.js";import"./SearchMd-D9VvymBK.js";import"./use-mcp-client-CVGnTbnR.js";import"./auth-DET1t4rk.js";import"./thread-intent-k_EWWvIp.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cs81gduQ.js";import"./task-board-Dt94BxWj.js";import"./schema-MF7uKk3F.js";import"./badge-CPdAi539.js";import"./agent-icon-DPgCnEV1.js";import"./AlertCircle-GXBIxFcm.js";import"./Tool01-DoE3EsIZ.js";import"./ArrowUp-DBkhb8Yz.js";import"./ArrowLeft-BbqwGy0e.js";import"./LinkBroken01-CzDrAWsX.js";import"./BookOpen01-1fjc61Mm.js";import"./Globe04-CYg8V2eL.js";import"./CheckCircle-B_eEhqJR.js";import"./ChevronUp-FDrusEQ7.js";import"./ChevronSelectorVertical-D-7E5GYT.js";import"./UserSquare-DHrzs2xN.js";import"./CreditCard01-KjySk-5G.js";import"./SwitchHorizontal01-BzX5npS9.js";import"./Key01-DY2gyLvd.js";import"./Minus-CMxaDSgl.js";import"./Monitor01-3IwLMf0Q.js";import"./Sun-BvPiksd_.js";import"./Play-BOARoASB.js";import"./ShoppingBag01-DrNjYHL1.js";import"./Trash01-_1ewPMOO.js";import"./Upload01-D11ZXRKj.js";import"./Users01-DdipP4E2.js";import"./XClose-CR92HpkN.js";import"./access-gate-CpF5setC.js";import"./capability-load-error-BCoAaz36.js";function W(){const t=k.c(20),o=$(),{org:c}=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(c.id);S("automations_list_row_clicked",{automation_id:i,agent_id:R,source:"settings_automations"}),P(R,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{S("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,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 Ht(){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{Ht as default};
1
+ import{c as k,j as e,b as $,a4 as D,d as M,r as q,n as d,B as V,hh as F,E as S}from"./index-B0kMZVmC.js";import{s as G}from"./Plus-D93afoay.js";import{i as b}from"./Zap-C1Evk-yy.js";import{S as H}from"./search-input-DfFZA2x_.js";import{E as T}from"./empty-state-DpGHzg8-.js";import{u as J}from"./use-automations-CRCU5rUU.js";import{u as K}from"./use-navigate-to-agent-Bc47TXuM.js";import{A as O}from"./automation-list-row-DFyb04uK.js";import{a as Q}from"./repository-binding-DqsJn1Sb.js";import{R as U}from"./require-capability-11VEza5N.js";import"./SearchMd-BMSOzTwj.js";import"./use-mcp-client-Cp7itm-S.js";import"./auth-U9K5aFal.js";import"./thread-intent-oRL32U-K.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DDOa1h_t.js";import"./task-board-CjAeUa_m.js";import"./schema-CMu2qDHJ.js";import"./badge-C5mneqKN.js";import"./agent-icon-BLhMgLPf.js";import"./AlertCircle-CTbjWy6O.js";import"./Tool01-BR0iTy6Z.js";import"./ArrowUp-BGhmN6Zx.js";import"./ArrowLeft-XFXQyKrg.js";import"./LinkBroken01-BrTHjhI6.js";import"./BookOpen01-BPEekJOY.js";import"./Globe04-B6PnEpLB.js";import"./CheckCircle-D_eKfCyb.js";import"./ChevronUp-DJytO9gL.js";import"./ChevronSelectorVertical-B8yNz6I1.js";import"./UserSquare-dl1oayK_.js";import"./CreditCard01-D8vcOfs6.js";import"./SwitchHorizontal01-TvywMML0.js";import"./Key01-CqlMd8Tp.js";import"./Minus-O-Diijsb.js";import"./Monitor01-CNesz7Zi.js";import"./Sun-Dwiv3SBK.js";import"./Play-DLBGORyf.js";import"./ShoppingBag01-BjOh6InC.js";import"./Trash01-DcgAZcrm.js";import"./Upload01-C4wCuUx0.js";import"./Users01-Bfq6gAwi.js";import"./XClose-DN30jgS9.js";import"./access-gate-pZVUht52.js";import"./capability-load-error-DCozEloC.js";function W(){const t=k.c(20),o=$(),{org:c}=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(c.id);S("automations_list_row_clicked",{automation_id:i,agent_id:R,source:"settings_automations"}),P(R,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{S("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,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 Ht(){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{Ht as default};
@@ -1 +1 @@
1
- import{c as b,m as u,j as l,bW as c,bX as p}from"./index-PfzOl7J6.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,bW as c,bX as p}from"./index-B0kMZVmC.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 Et,b as D,r as q,K as Rt,i as zt,bu as At,h as Dt,B as Ae}from"./index-PfzOl7J6.js";import{u as rt,a as _e,n as it,P as at,D as ct,c as dt,C as ut}from"./core.esm-Hiw5xlkT.js";import{s as ft,a as mt,S as xt,r as Ft,u as pt,v as Ut}from"./sortable.esm-Bcfqg7Xt.js";import{s as Fe}from"./Plus-D452i-ki.js";import{b as Ot}from"./delete-copy-Bt51Emir.js";import{j as R,t as Ht,M as Mt,a7 as Ue,a8 as ae,a9 as ge,a4 as ue,a6 as fe,aa as ht,ab as gt,ac as qt,Z as Gt,ad as Kt,ae as bt,af as de,ag as Vt}from"./category-tree-BwBGBNEZ.js";import{e as We,b as Jt,a as Wt,C as Qt,c as Yt,f as Zt}from"./command-ARXYIBtk.js";import{a as Xt,b as el,P as tl}from"./popover-BBhzRgR6.js";import{S as ll,aY as sl,aJ as ol,ar as nl,P as rl,Q as il,aa as al,K as Oe,aB as vt,aC as jt,aD as kt,aE as cl,N as dl,as as yt,e as ul}from"./agent-icon-DPgCnEV1.js";import{s as De}from"./Trash01-_1ewPMOO.js";import{a as He,s as Me,u as qe,E as Ge}from"./usage-stats-DXQh2ym6.js";import{s as Ke}from"./suggestion-DpDJqics.js";import{E as Ve,T as Re,R as Nt}from"./editor-classes-BRb8pzNp.js";import{f as fl,a as ml}from"./blog-preview-url-D9nceA8-.js";import{r as xl,b as pl,i as hl,p as gl,u as Ct,P as Bt}from"./product-picker-dialog-z_7jLJp3.js";import{B as bl}from"./index-TayDSkqp.js";import{i as vl}from"./Zap-D5X_AlHR.js";import{T as jl,a as kl,c as yl}from"./tooltip-7oUFzrc9.js";import{b as St}from"./Tool01-DoE3EsIZ.js";import{i as Nl}from"./Monitor01-3IwLMf0Q.js";import{L as be}from"./label-C3bFtEDk.js";import{s as Qe,F as Cl}from"./use-never-published-D5jr8ByQ.js";import{l as Bl,m as Sl,Q as wl,s as Pl}from"./save-status-YxsSW2Rs.js";import{s as _l}from"./XClose-CR92HpkN.js";import{t as $l,I as Il}from"./held-block-view-CZDHkd7I.js";import{y as Ll}from"./blocks-tab-states-B3rnTo7L.js";import{S as Tl}from"./blog-schema-CxC8Q-yf.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:El,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 El(b){return b.preventDefault()}function Ye(){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 Rl(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(Et,{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 zl(b){const e=T.c(74),{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=Al,w=y(r),S=p?w:y(t),C=Qe(S),P=!!S&&(N===S||!C),_=Bl(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=X=>(p?o:l)(X||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}`,[F,O]=q.useState(A);F!==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 X=c??"",Ee=Qe(X);return!Ee&&X.trim()?(v(u("sectionsEditor.imageField.unsafeUrl")),!1):(Ee!==S&&I(Ee||void 0),!0)};let J;e[8]!==E||e[9]!==W?(J=()=>{W()&&E()},e[8]=E,e[9]=W,e[10]=J):J=e[10];const Q=J,re=()=>{j?Q():d(S)};let se;e[11]!==W||e[12]!==j?(se=X=>{j&&!W()||g(X)},e[11]=W,e[12]=j,e[13]=se):se=e[13];const Y=se,ie=f?.siteSlug;let te;e[14]===Symbol.for("react.memo_cache_sentinel")?(te=()=>n(!0),e[14]=te):te=e[14];let Z;e[15]!==I||e[16]!==ie?(Z={siteSlug:ie,onUploaded:I,onNeedsPicker:te},e[15]=I,e[16]=ie,e[17]=Z):Z=e[17];const{isDragging:H,isPending:z,lockedConfigId:V,dropProps:U}=Sl(Z);let K;e[18]!==a?(K=a&&s.jsx(be,{className:"text-muted-foreground",children:a}),e[18]=a,e[19]=K):K=e[19];let G;e[20]!==m?(G=m&&s.jsx(Ye,{}),e[20]=m,e[21]=G):G=e[21];const oe=!p;let ce;e[22]!==u?(ce=u("sectionsEditor.imageField.desktopSlot"),e[22]=u,e[23]=ce):ce=e[23];let le;e[24]!==Y?(le=()=>Y(!1),e[24]=Y,e[25]=le):le=e[25];let ve;e[26]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(Nl,{size:14}),e[26]=ve):ve=e[26];let je;e[27]!==oe||e[28]!==ce||e[29]!==le?(je=s.jsx(ee,{active:oe,label:ce,onClick:le,children:ve}),e[27]=oe,e[28]=ce,e[29]=le,e[30]=je):je=e[30];let ke;e[31]!==u?(ke=u("sectionsEditor.imageField.mobileSlot"),e[31]=u,e[32]=ke):ke=e[32];let ye;e[33]!==Y?(ye=()=>Y(!0),e[33]=Y,e[34]=ye):ye=e[34];let Ne;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(sl,{size:14}),e[35]=Ne):Ne=e[35];let Ce;e[36]!==re||e[37]!==B||e[38]!==j?(Ce=s.jsx(ee,{active:j,label:B,onClick:re,children:Ne}),e[36]=re,e[37]=B,e[38]=j,e[39]=Ce):Ce=e[39];let Be;e[40]!==E||e[41]!==Q||e[42]!==u||e[43]!==c||e[44]!==B||e[45]!==x?(Be=c!==null&&s.jsx(Rl,{draft:c,notice:x,label:B,placeholder:u("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:X=>{v(null),d(X)},onCommit:Q,onCancel:E}),e[40]=E,e[41]=Q,e[42]=u,e[43]=c,e[44]=B,e[45]=x,e[46]=Be):Be=e[46];let Se;e[47]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>n(!0),e[47]=Se):Se=e[47];let me;e[48]!==u?(me=u("sectionsEditor.imageField.replaceImage"),e[48]=u,e[49]=me):me=e[49];const Ie=!S&&"border border-dashed border-border/60 bg-muted/30 hover:bg-accent",Le=H&&"ring-2 ring-primary/40",Te=z&&"pointer-events-none opacity-60";let xe;e[50]!==Ie||e[51]!==Le||e[52]!==Te?(xe=ne("relative block w-full cursor-pointer overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] transition",Ie,Le,Te),e[50]=Ie,e[51]=Le,e[52]=Te,e[53]=xe):xe=e[53];let pe;e[54]!==S||e[55]!==i||e[56]!==P||e[57]!==z||e[58]!==p||e[59]!==C||e[60]!==u?(pe=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(St,{size:20}),u(z?"sectionsEditor.imageField.uploading":P?"sectionsEditor.imageField.previewUnavailable":p?"sectionsEditor.imageField.dropMobileImage":"sectionsEditor.imageField.dropImageOrClickToBrowse")]}),e[54]=S,e[55]=i,e[56]=P,e[57]=z,e[58]=p,e[59]=C,e[60]=u,e[61]=pe):pe=e[61];let he;e[62]!==H||e[63]!==u?(he=H&&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[62]=H,e[63]=u,e[64]=he):he=e[64];let we;e[65]!==me||e[66]!==xe||e[67]!==pe||e[68]!==he?(we=s.jsxs("button",{type:"button",onClick:Se,"aria-label":me,className:xe,children:[pe,he]}),e[65]=me,e[66]=xe,e[67]=pe,e[68]=he,e[69]=we):we=e[69];let Pe;return e[70]!==V||e[71]!==h||e[72]!==I?(Pe=s.jsx(Cl,{open:h,onOpenChange:n,mode:"image",onSelect:I,lockedConfigId:V}),e[70]=V,e[71]=h,e[72]=I,e[73]=Pe):Pe=e[73],s.jsxs("div",{...U,className:"group/image relative space-y-2",children:[K,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,G,je,s.jsx(ee,{active:p,label:ke,onClick:ye,children:s.jsx(ll,{size:14,className:ne(w&&"text-primary")})}),Ce,C&&!C.toLowerCase().startsWith("data:")&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{}),wl.map(X=>s.jsx(ee,{active:_===X,label:X,onClick:()=>I(Pl(C,_===X?void 0:X)),children:s.jsx("span",{className:"px-0.5 text-xs capitalize",children:X})},X))]}),Be]})}),we,Pe]})}function Al(b){return typeof b=="string"?b:""}function wt(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=nl(t)??ol,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 Xe(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(wt,{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(Jt,{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 Pt(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(Xt,{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(Wt,{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(Qt,{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(We,{heading:v?i(Ze.site):void 0,children:c.map(I=>s.jsx(Xe,{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(We,{heading:v?i(Ze.app):void 0,children:n.map(I=>s.jsx(Xe,{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(Yt,{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(el,{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(tl,{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 $t(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 Fl(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=fl(t),f=o.trim().toLowerCase(),u=Mt(t).filter(h=>!f||h.title.toLowerCase().includes(f)||h.slug.toLowerCase().includes(f)).slice(0,30),p=h=>m?ml(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($t,{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 Ul(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=Rt.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]=pl("search",m);if(!y)return[];const w=await hl(t,y);return gl(w).filter(Ol)},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=zt(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(al,{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($t,{label:y.label,image:y.image??"",onPick:()=>{const w=xl(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 Ol(b){return b.url}function Je(b){const e=T.c(24),{decofile:t,sandboxRef:r}=b,l=D();let o;e[0]!==t?(o=t?R(Ht(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(rl,{size:12}),e[9]=f):f=e[9];let u;e[10]!==t?(u=g=>s.jsx(Fl,{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(il,{size:12}),e[17]=f):f=e[17];let u;e[18]!==r||e[19]!==a?(u=g=>s.jsx(Ul,{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 Hl({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}),Ke.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",Ve)}},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=Je({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(Re,{active:f.bold,label:"Bold",onClick:()=>m.chain().focus().toggleBold().run(),children:s.jsx(vt,{size:14})}),s.jsx(Re,{active:f.italic,label:"Italic",onClick:()=>m.chain().focus().toggleItalic().run(),children:s.jsx(jt,{size:14})}),s.jsx(Re,{active:f.underline,label:"Underline",onClick:()=>m.chain().focus().toggleUnderline().run(),children:s.jsx(kt,{size:14})}),s.jsx(Nt,{editor:m,active:f.link,open:a,onOpenChange:i,sources:u})]}),s.jsx(Ge,{editor:m,className:"text-[15px] text-foreground"})]}):null}function Ml(b,e){const t=b.length?b.split(`
1
+ import{c as T,m as ne,j as s,I as Et,b as D,r as q,K as Rt,i as zt,bu as At,h as Dt,B as Ae}from"./index-B0kMZVmC.js";import{u as rt,a as _e,n as it,P as at,D as ct,c as dt,C as ut}from"./core.esm-Z0qYqKj9.js";import{s as ft,a as mt,S as xt,r as Ft,u as pt,v as Ut}from"./sortable.esm-CD7Wn3a-.js";import{s as Fe}from"./Plus-D93afoay.js";import{b as Ot}from"./delete-copy-DJ_GOWB2.js";import{j as R,t as Ht,M as Mt,a7 as Ue,a8 as ae,a9 as ge,a4 as ue,a6 as fe,aa as ht,ab as gt,ac as qt,Z as Gt,ad as Kt,ae as bt,af as de,ag as Vt}from"./category-tree-5dEhPnK2.js";import{e as We,b as Jt,a as Wt,C as Qt,c as Yt,f as Zt}from"./command-woRMyGZF.js";import{a as Xt,b as el,P as tl}from"./popover-CLUI-WCq.js";import{S as ll,aY as sl,aJ as ol,ar as nl,P as rl,Q as il,aa as al,K as Oe,aB as vt,aC as jt,aD as kt,aE as cl,N as dl,as as yt,e as ul}from"./agent-icon-BLhMgLPf.js";import{s as De}from"./Trash01-DcgAZcrm.js";import{a as He,s as Me,u as qe,E as Ge}from"./usage-stats-LrxjpMvT.js";import{s as Ke}from"./suggestion-BjK1ijWQ.js";import{E as Ve,T as Re,R as Nt}from"./editor-classes-szltcTWs.js";import{f as fl,a as ml}from"./blog-preview-url-DPwtQPzJ.js";import{r as xl,b as pl,i as hl,p as gl,u as Ct,P as Bt}from"./product-picker-dialog-CNlHID1U.js";import{B as bl}from"./index-BdtGqzV_.js";import{i as vl}from"./Zap-C1Evk-yy.js";import{T as jl,a as kl,c as yl}from"./tooltip-BTKQq4Sy.js";import{b as St}from"./Tool01-BR0iTy6Z.js";import{i as Nl}from"./Monitor01-CNesz7Zi.js";import{L as be}from"./label-C8wqUUzx.js";import{s as Qe,F as Cl}from"./use-never-published-622FRxP4.js";import{l as Bl,m as Sl,Q as wl,s as Pl}from"./save-status-DQIuewYI.js";import{s as _l}from"./XClose-DN30jgS9.js";import{t as $l,I as Il}from"./held-block-view-DW-NjX-S.js";import{y as Ll}from"./blocks-tab-states-BJKt49qf.js";import{S as Tl}from"./blog-schema-CMQLhziN.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:El,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 El(b){return b.preventDefault()}function Ye(){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 Rl(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(Et,{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 zl(b){const e=T.c(74),{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=Al,w=y(r),S=p?w:y(t),C=Qe(S),P=!!S&&(N===S||!C),_=Bl(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=X=>(p?o:l)(X||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}`,[F,O]=q.useState(A);F!==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 X=c??"",Ee=Qe(X);return!Ee&&X.trim()?(v(u("sectionsEditor.imageField.unsafeUrl")),!1):(Ee!==S&&I(Ee||void 0),!0)};let J;e[8]!==E||e[9]!==W?(J=()=>{W()&&E()},e[8]=E,e[9]=W,e[10]=J):J=e[10];const Q=J,re=()=>{j?Q():d(S)};let se;e[11]!==W||e[12]!==j?(se=X=>{j&&!W()||g(X)},e[11]=W,e[12]=j,e[13]=se):se=e[13];const Y=se,ie=f?.siteSlug;let te;e[14]===Symbol.for("react.memo_cache_sentinel")?(te=()=>n(!0),e[14]=te):te=e[14];let Z;e[15]!==I||e[16]!==ie?(Z={siteSlug:ie,onUploaded:I,onNeedsPicker:te},e[15]=I,e[16]=ie,e[17]=Z):Z=e[17];const{isDragging:H,isPending:z,lockedConfigId:V,dropProps:U}=Sl(Z);let K;e[18]!==a?(K=a&&s.jsx(be,{className:"text-muted-foreground",children:a}),e[18]=a,e[19]=K):K=e[19];let G;e[20]!==m?(G=m&&s.jsx(Ye,{}),e[20]=m,e[21]=G):G=e[21];const oe=!p;let ce;e[22]!==u?(ce=u("sectionsEditor.imageField.desktopSlot"),e[22]=u,e[23]=ce):ce=e[23];let le;e[24]!==Y?(le=()=>Y(!1),e[24]=Y,e[25]=le):le=e[25];let ve;e[26]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(Nl,{size:14}),e[26]=ve):ve=e[26];let je;e[27]!==oe||e[28]!==ce||e[29]!==le?(je=s.jsx(ee,{active:oe,label:ce,onClick:le,children:ve}),e[27]=oe,e[28]=ce,e[29]=le,e[30]=je):je=e[30];let ke;e[31]!==u?(ke=u("sectionsEditor.imageField.mobileSlot"),e[31]=u,e[32]=ke):ke=e[32];let ye;e[33]!==Y?(ye=()=>Y(!0),e[33]=Y,e[34]=ye):ye=e[34];let Ne;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(sl,{size:14}),e[35]=Ne):Ne=e[35];let Ce;e[36]!==re||e[37]!==B||e[38]!==j?(Ce=s.jsx(ee,{active:j,label:B,onClick:re,children:Ne}),e[36]=re,e[37]=B,e[38]=j,e[39]=Ce):Ce=e[39];let Be;e[40]!==E||e[41]!==Q||e[42]!==u||e[43]!==c||e[44]!==B||e[45]!==x?(Be=c!==null&&s.jsx(Rl,{draft:c,notice:x,label:B,placeholder:u("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:X=>{v(null),d(X)},onCommit:Q,onCancel:E}),e[40]=E,e[41]=Q,e[42]=u,e[43]=c,e[44]=B,e[45]=x,e[46]=Be):Be=e[46];let Se;e[47]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>n(!0),e[47]=Se):Se=e[47];let me;e[48]!==u?(me=u("sectionsEditor.imageField.replaceImage"),e[48]=u,e[49]=me):me=e[49];const Ie=!S&&"border border-dashed border-border/60 bg-muted/30 hover:bg-accent",Le=H&&"ring-2 ring-primary/40",Te=z&&"pointer-events-none opacity-60";let xe;e[50]!==Ie||e[51]!==Le||e[52]!==Te?(xe=ne("relative block w-full cursor-pointer overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] transition",Ie,Le,Te),e[50]=Ie,e[51]=Le,e[52]=Te,e[53]=xe):xe=e[53];let pe;e[54]!==S||e[55]!==i||e[56]!==P||e[57]!==z||e[58]!==p||e[59]!==C||e[60]!==u?(pe=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(St,{size:20}),u(z?"sectionsEditor.imageField.uploading":P?"sectionsEditor.imageField.previewUnavailable":p?"sectionsEditor.imageField.dropMobileImage":"sectionsEditor.imageField.dropImageOrClickToBrowse")]}),e[54]=S,e[55]=i,e[56]=P,e[57]=z,e[58]=p,e[59]=C,e[60]=u,e[61]=pe):pe=e[61];let he;e[62]!==H||e[63]!==u?(he=H&&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[62]=H,e[63]=u,e[64]=he):he=e[64];let we;e[65]!==me||e[66]!==xe||e[67]!==pe||e[68]!==he?(we=s.jsxs("button",{type:"button",onClick:Se,"aria-label":me,className:xe,children:[pe,he]}),e[65]=me,e[66]=xe,e[67]=pe,e[68]=he,e[69]=we):we=e[69];let Pe;return e[70]!==V||e[71]!==h||e[72]!==I?(Pe=s.jsx(Cl,{open:h,onOpenChange:n,mode:"image",onSelect:I,lockedConfigId:V}),e[70]=V,e[71]=h,e[72]=I,e[73]=Pe):Pe=e[73],s.jsxs("div",{...U,className:"group/image relative space-y-2",children:[K,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,G,je,s.jsx(ee,{active:p,label:ke,onClick:ye,children:s.jsx(ll,{size:14,className:ne(w&&"text-primary")})}),Ce,C&&!C.toLowerCase().startsWith("data:")&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{}),wl.map(X=>s.jsx(ee,{active:_===X,label:X,onClick:()=>I(Pl(C,_===X?void 0:X)),children:s.jsx("span",{className:"px-0.5 text-xs capitalize",children:X})},X))]}),Be]})}),we,Pe]})}function Al(b){return typeof b=="string"?b:""}function wt(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=nl(t)??ol,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 Xe(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(wt,{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(Jt,{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 Pt(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(Xt,{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(Wt,{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(Qt,{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(We,{heading:v?i(Ze.site):void 0,children:c.map(I=>s.jsx(Xe,{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(We,{heading:v?i(Ze.app):void 0,children:n.map(I=>s.jsx(Xe,{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(Yt,{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(el,{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(tl,{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 $t(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 Fl(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=fl(t),f=o.trim().toLowerCase(),u=Mt(t).filter(h=>!f||h.title.toLowerCase().includes(f)||h.slug.toLowerCase().includes(f)).slice(0,30),p=h=>m?ml(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($t,{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 Ul(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=Rt.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]=pl("search",m);if(!y)return[];const w=await hl(t,y);return gl(w).filter(Ol)},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=zt(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(al,{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($t,{label:y.label,image:y.image??"",onPick:()=>{const w=xl(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 Ol(b){return b.url}function Je(b){const e=T.c(24),{decofile:t,sandboxRef:r}=b,l=D();let o;e[0]!==t?(o=t?R(Ht(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(rl,{size:12}),e[9]=f):f=e[9];let u;e[10]!==t?(u=g=>s.jsx(Fl,{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(il,{size:12}),e[17]=f):f=e[17];let u;e[18]!==r||e[19]!==a?(u=g=>s.jsx(Ul,{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 Hl({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}),Ke.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",Ve)}},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=Je({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(Re,{active:f.bold,label:"Bold",onClick:()=>m.chain().focus().toggleBold().run(),children:s.jsx(vt,{size:14})}),s.jsx(Re,{active:f.italic,label:"Italic",onClick:()=>m.chain().focus().toggleItalic().run(),children:s.jsx(jt,{size:14})}),s.jsx(Re,{active:f.underline,label:"Underline",onClick:()=>m.chain().focus().toggleUnderline().run(),children:s.jsx(kt,{size:14})}),s.jsx(Nt,{editor:m,active:f.link,open:a,onOpenChange:i,sources:u})]}),s.jsx(Ge,{editor:m,className:"text-[15px] text-foreground"})]}):null}function Ml(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 ql(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 Gl=({editor:b,state:e})=>b.isEditable&&(b.isFocused||!e.selection.empty),Kl={placement:"bottom-start",offset:8};function It(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:Vl},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(bl,{editor:t,appendTo:u,shouldShow:Gl,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(vt,{size:14})}),s.jsx(ee,{active:g.italic,label:o("sectionsEditor.richTextField.italic"),onClick:()=>t.chain().focus().toggleItalic().run(),children:s.jsx(jt,{size:14})}),s.jsx(ee,{active:g.underline,label:o("sectionsEditor.richTextField.underline"),onClick:()=>t.chain().focus().toggleUnderline().run(),children:s.jsx(kt,{size:14})}),s.jsx(ee,{active:g.strike,label:o("sectionsEditor.richTextField.strikethrough"),onClick:()=>t.chain().focus().toggleStrike().run(),children:s.jsx(cl,{size:14})}),s.jsx(Nt,{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 Vl(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 Jl=["1","2","3","4"],Wl={1:"sandbox.plainBlocks.headingLevel1",2:"sandbox.plainBlocks.headingLevel2",3:"sandbox.plainBlocks.headingLevel3",4:"sandbox.plainBlocks.headingLevel4"},et={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 Ql(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(Ue,{children:Jl.map(v=>s.jsxs(ee,{active:m===v,label:i(Wl[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=et[m]??et[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 Yl(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 Xl({items:b,style:e,onChange:t,decofile:r,sandboxRef:l}){const o=D(),a=Je({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}),Ke.configure({placeholder:o("sandbox.plainBlocks.listItemPlaceholder")})],content:Ml(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",Ve)},handleKeyDown:(p,g)=>g.key==="Tab"},onUpdate:({editor:p})=>{i.current({items:ql(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(Ue,{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(It,{editor:f,sources:a}),s.jsx(Ge,{editor:f,className:"text-foreground"})]}):null}function es(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 ts(b){const e=T.c(28),{url:t,caption:r,onChange:l}=b,o=D();let a;e[0]!==t?(a=es(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 ls(){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 ss(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 ze=[{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 os(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=ze.find(B=>B.value===l)??ze[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(Ue,{children:ze.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 ns(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 rs(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(vl,{size:14}),e[19]=x):x=e[19];let v;e[20]!==c||e[21]!==d||e[22]!==n?(v=s.jsx(jl,{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(kl,{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(yl,{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(zl,{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 F;e[63]!==L||e[64]!==I||e[65]!==A?(F=s.jsx(ae,{value:L,onChange:I,placeholder:A,className:"text-xs"}),e[63]=L,e[64]=I,e[65]=A,e[66]=F):F=e[66];let O;e[67]!==B||e[68]!==F?(O=s.jsxs("div",{className:"flex items-baseline gap-1.5 text-xs text-muted-foreground",children:[B,F]}),e[67]=B,e[68]=F,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 is(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=ge(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 as(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=ge(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(At,{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 cs(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=ge(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 ds(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=ge(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 tt(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 us(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:tt(t,o("sandbox.listBlocks.optionA")),right:tt(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 fs=["normal","h1","h2","h3"],ms=/^<(h[1-3])>([\s\S]*)<\/\1>$/i;function xs(b){const e=b.match(ms);return e?{level:e[1].toLowerCase(),text:e[2]}:{level:"normal",text:b}}function lt(b,e){return e?b==="normal"?e:`<${b}>${e}</${b}>`:""}const st={normal:"sandbox.productBlocks.headingNormal",h1:"sandbox.productBlocks.headingH1",h2:"sandbox.productBlocks.headingH2",h3:"sandbox.productBlocks.headingH3"},ps={normal:"text-lg font-semibold",h1:"text-3xl font-bold",h2:"text-2xl font-bold",h3:"text-xl font-semibold"};function hs(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}=xs(t),m="space-y-1.5",a="flex items-center gap-0.5",i=fs.map(x=>s.jsx(ee,{active:o===x,label:l(st[x]),onClick:()=>r(lt(x,f)),children:l(st[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(lt(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=ps[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 Lt(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 Tt(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(St,{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 gs(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}=pt(i);let n;e[2]!==p?(n=ut.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(Tt,{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(yt,{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 bs(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:ft},e[1]=i):i=e[1];const m=rt(_e(at,a),_e(it,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(mt(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(gs,{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(xt,{items:t,strategy:Ft,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(ct,{sensors:m,collisionDetection:dt,onDragEnd:u,children:h}),e[17]=u,e[18]=m,e[19]=h,e[20]=n):n=e[20],n}function vs(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(dl,{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 js(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(be,{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 ks(b){const e=T.c(32),{block:t,onChange:r,sandboxRef:l}=b,o=D();let a,i;e[0]!==t.products?(a=ht(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=Ct(l,f);let h;e[5]!==t||e[6]!==r?(h=k=>r({...t,products:gt(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(hs,{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(Lt,{label:o("sandbox.productBlocks.browseProductsButton"),onClick:()=>p(!0)})]}),f.length===0?s.jsx(vs,{onBrowse:()=>p(!0)}):s.jsx(bs,{ids:f,lookup:g,onReorder:n,onRemove:k=>n(f.filter(y=>y!==k))})]}):s.jsx(js,{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(Bt,{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 ys(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(Tt,{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 Ns(b){const e=T.c(78),{block:t,onChange:r,sandboxRef:l}=b,o=D();let a;e[0]!==t.product?(a=ht(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=Ct(l,u);let g;e[4]!==t||e[5]!==r?(g=J=>r({...t,product:gt(t.product,J)}),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(be,{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=J=>r({...t,textCta:J.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(be,{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=J=>r({...t,productSlug:J.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(be,{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(Lt,{label:o("sandbox.productBlocks.changeButton"),onClick:()=>f(!0)}),e[51]=i,e[52]=l,e[53]=o,e[54]=A):A=e[54];let F;e[55]!==I||e[56]!==A?(F=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[I,A]}),e[55]=I,e[56]=A,e[57]=F):F=e[57];let O;e[58]!==p||e[59]!==i||e[60]!==l||e[61]!==h||e[62]!==o?(O=l?i?s.jsx(ys,{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:J=>h(J.target.value?[J.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]!==F||e[65]!==O?(M=s.jsxs("div",{className:"space-y-2",children:[F,O]}),e[64]=F,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(Bt,{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 Cs=["[&_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 ot({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?[Ke.configure({placeholder:t})]:[]],content:b||"",editorProps:{attributes:{class:ne("focus:outline-none",Ve,Cs,r)},handleKeyDown:(m,f)=>f.key==="Enter"},onUpdate:({editor:m})=>a.current($l(m.getHTML()))});return i?s.jsxs("div",{className:"relative",children:[s.jsx(It,{editor:i,appendTo:l??void 0,sources:o}),s.jsx(Ge,{editor:i})]}):null}const Bs=2,Ss=2;function ws(b){return ge(b).map(R)}function Ps(b){return ge(b).map(e=>Array.isArray(e)?e.map(R):[])}function nt(b){return Array.from({length:b},()=>"")}function _s(b,e){return e.reduce((t,r)=>Math.max(t,r.length),b.length)||1}function $s(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=Je(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 F=ws(t),O=Ps(r),M=F.length===0&&O.length===0;n=M?Bs:_s(F,O);const E=Array.from({length:n},(H,z)=>F[z]??"");c=M?Array.from({length:Ss},()=>nt(n)):O.map(H=>Array.from({length:n},(z,V)=>H[V]??""));const W=`${c.length}x${n}`;let J;e[18]!==l?(J=(H,z)=>l({headers:JSON.stringify(H.some(Ls)?H:[]),rows:JSON.stringify(z)}),e[18]=l,e[19]=J):J=e[19];const Q=J,re=(H,z)=>Q(E.map((V,U)=>U===H?z:V),c),se=(H,z,V)=>Q(E,c.map((U,K)=>K===H?U.map((G,oe)=>oe===z?V:G):U));h=()=>Q(E,[...c,nt(n)]);const Y=H=>Q(E,c.filter((z,V)=>V!==H));g=()=>Q([...E,""],c.map(Is));const ie=H=>Q(E.filter((z,V)=>V!==H),c.map(z=>z.filter((V,U)=>U!==H)));N="relative space-y-2",j="overflow-x-auto rounded-lg border",x="w-full border-collapse";let te;e[20]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx("th",{className:"w-8 border-b"}),e[20]=te):te=e[20];const Z=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(ot,{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}`)),te]});e[21]!==Z?(v=s.jsx("thead",{children:Z}),e[21]=Z,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,U)=>s.jsx("td",{className:"border-r p-0 last:border-r-0 align-top",children:s.jsx(ot,{value:V,onChange:K=>se(z,U,K),placeholder:"—",className:"px-3 py-2 text-sm [&_p]:my-0 focus:bg-muted/30",menuHost:u,sources:f})},`${W}-${z}-${U}`)),s.jsx("td",{className:"w-8 text-center align-middle",children:c.length>1&&s.jsx(Ae,{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(Fe,{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 Is(b){return[...b,""]}function Ls(b){return b.trim()!==""}function Ts(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?Ll(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=qt(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(wt,{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(Il,{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(Tl,{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 Es(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=Gt(u);if(Kt(u,o?bt(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(Hl,{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(Ql,{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(Yl,{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(Xl,{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(rs,{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(ts,{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(ls,{}),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(ss,{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(os,{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(ns,{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(cs,{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(is,{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(as,{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(ds,{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(us,{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($s,{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(Ns,{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(ks,{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(Ts,{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 Rs(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}=pt(h);let N;e[2]!==x?(N=ut.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(yt,{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(ul,{className:"size-3.5"}),e[18]=$):$=e[18];let B;e[19]!==i||e[20]!==_?(B=s.jsx(Ae,{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(Ae,{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 F;e[28]!==B||e[29]!==A?(F=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]=F):F=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(Es,{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]!==F||e[41]!==O||e[42]!==k||e[43]!==w||e[44]!==P?(M=s.jsxs("div",{ref:d,style:k,className:w,children:[P,F,O]}),e[39]=d,e[40]=F,e[41]=O,e[42]=k,e[43]=w,e[44]=P,e[45]=M):M=e[45],M}function $e(){return crypto.randomUUID()}function zs(b){return b.map(e=>({id:$e(),block:e}))}function As(b,e){return e.map((t,r)=>{const l=b[r];return{id:l?l.id:$e(),block:t}})}function ho(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(Fe,{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(Pt,{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 go(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=Ot();let h;e[0]!==o||e[1]!==g||e[2]!==l?(h=Vt(l,{hideDefaults:g,customPaths:o?bt(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=()=>zs(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(As(d,t)));let N;e[6]!==d?(N=d.map(Os),e[6]=d,e[7]=N):N=e[7];const k=N;let y;e[8]!==d?(y=d.map(Us),e[8]=d,e[9]=y):y=e[9];const w=y;let S;e[10]!==r?(S=U=>{x(U);const K=U.map(Fs);j(K),r(K)},e[10]=r,e[11]=S):S=e[11];const C=S;let P;e[12]!==d||e[13]!==C?(P=(U,K)=>{const G=[...d];G.splice(U,0,{id:$e(),block:{__resolveType:K}}),C(G)},e[12]=d,e[13]=C,e[14]=P):P=e[14];const _=P;let $;e[15]!==d||e[16]!==C?($=(U,K)=>{C(d.map((G,oe)=>oe===U?{...G,block:K}:G))},e[15]=d,e[16]=C,e[17]=$):$=e[17];const B=$;let L;e[18]!==d||e[19]!==C?(L=U=>{C(d.filter((K,G)=>G!==U))},e[18]=d,e[19]=C,e[20]=L):L=e[20];const I=L;let A;e[21]!==d||e[22]!==C?(A=U=>{const K=d[U];if(!K)return;const G=[...d];G.splice(U+1,0,{id:$e(),block:structuredClone(K.block)}),C(G)},e[21]=d,e[22]=C,e[23]=A):A=e[23];const F=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:ft},e[25]=M):M=e[25];const E=rt(_e(at,O),_e(it,M));let W;e[26]!==d||e[27]!==C?(W=U=>{const{active:K,over:G}=U;if(!G||K.id===G.id)return;const oe=d.findIndex(le=>le.id===String(K.id)),ce=d.findIndex(le=>le.id===String(G.id));oe===-1||ce===-1||C(mt(d,oe,ce))},e[26]=d,e[27]=C,e[28]=W):W=e[28];const J=W;let Q;if(e[29]!==d||e[30]!==n||e[31]!==o||e[32]!==F||e[33]!==_||e[34]!==l||e[35]!==m||e[36]!==i||e[37]!==I||e[38]!==a||e[39]!==B){let U;e[41]!==n||e[42]!==o||e[43]!==F||e[44]!==_||e[45]!==l||e[46]!==m||e[47]!==i||e[48]!==I||e[49]!==a||e[50]!==B?(U=(K,G)=>{const{id:oe,block:ce}=K;return s.jsxs("div",{children:[s.jsx(Ds,{blockTypes:n,onInsert:le=>_(G,le)}),s.jsx(Rs,{id:oe,block:ce,meta:l,onChange:le=>B(G,le),onDelete:()=>I(G),onDuplicate:()=>F(G),decofile:o,sandboxRef:a,previewBaseUrl:i,onSaveReferencedBlock:m})]},oe)},e[41]=n,e[42]=o,e[43]=F,e[44]=_,e[45]=l,e[46]=m,e[47]=i,e[48]=I,e[49]=a,e[50]=B,e[51]=U):U=e[51],Q=d.map(U),e[29]=d,e[30]=n,e[31]=o,e[32]=F,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(xt,{items:k,strategy:Ut,children:Q}),e[52]=k,e[53]=Q,e[54]=re):re=e[54];let se;e[55]!==J||e[56]!==E||e[57]!==re?(se=s.jsx(ct,{sensors:E,collisionDetection:dt,onDragEnd:J,children:re}),e[55]=J,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=U=>_(d.length,U),e[62]=d.length,e[63]=_,e[64]=ie):ie=e[64];let te;e[65]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Fe,{size:16}),e[65]=te):te=e[65];let Z;e[66]!==p?(Z=p("sandbox.blockDocument.addBlock"),e[66]=p,e[67]=Z):Z=e[67];let H;e[68]!==Z?(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:[te,Z]}),e[68]=Z,e[69]=H):H=e[69];let z;e[70]!==n||e[71]!==ie||e[72]!==H?(z=s.jsx(Pt,{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 Fs(b){return b.block}function Us(b){return b.block}function Os(b){return b.id}export{go as B,Rl as I,zl as R,ho as a,Je as u};
@@ -1 +1 @@
1
- import{c as O,r as g,j as S}from"./index-PfzOl7J6.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-B0kMZVmC.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};
@@ -0,0 +1 @@
1
+ import{bn as z,c as ae,q as xt,K as rt,i as Lt,fC as Ct,f7 as Mt,fl as Xe,fn as It,bw as ne,bx as it,fD as Be,bj as Ut,bk as ot,ff as Dt,f8 as Nt,by as st,bz as Kt,fE as Vt,e8 as Ft,b as ye,a4 as qt,j as L,B as xe,L as Wt,h as Yt,a7 as zt}from"./index-B0kMZVmC.js";import{c as Qt,x as Gt,u as Ht,v as Xt,af as Zt,am as Jt,an as en,ao as tn,ap as nn,C as rn,y as on}from"./site-editor-toast-DrPEsDU7.js";import{b as sn}from"./sandbox-url-D3mC8qhT.js";import{u as cn}from"./use-voice-input-D66t9nvu.js";import{i as an}from"./AlertCircle-CTbjWy6O.js";import{aJ as ct}from"./agent-icon-BLhMgLPf.js";import{E as Le}from"./empty-state-DpGHzg8-.js";const K={experiments:{kind:"experiments",blockKey:"experiments",resolveType:"split-traffic",matcher:"experiment",field:"name"},campaigns:{kind:"campaigns",blockKey:"campaigns",resolveType:"calendar",matcher:"campaign",field:"name"}},de=["experiments","campaigns"];function pr(e){return K[e]}const yr=de.map(e=>K[e].blockKey);function fn(e){for(const t of de)if(K[t].matcher===e)return t;return null}function dr(e){for(const t of de)if(K[t].resolveType===e)return t;return null}function mr(e){for(const t of de)if(K[t].blockKey===e)return t;return null}const ln="deco";function gr(e,t){if(!z(e))return"missing";const n=K[t],r=Ze(e,n.resolveType),i=Ze(e,n.matcher);if(!r||!i)return"missing";const o=c=>c.namespace===void 0||c.namespace===ln;return o(r)&&o(i)?"available":"replaced"}function Ze(e,t){const n=e?.manifest?.blocks??{};for(const r of Object.values(n))if(r&&Object.hasOwn(r,t))return r[t]??{};return null}function Je(e,t){const n=K[t],r=Object.hasOwn(e,n.blockKey)?e[n.blockKey]:void 0;if(r==null)return{kind:"absent",block:{__resolveType:n.resolveType},values:Object.create(null),invalid:[]};const i=me(r)?r.__resolveType:void 0;if(i!==n.resolveType)return{kind:"conflict",resolveType:typeof i=="string"?i:""};const o=r,c=Object.create(null),f=[];for(const[l,A]of Object.entries(o)){if(l==="__resolveType")continue;const R=t==="experiments"?un(A):pn(A);R===null?f.push(l):c[l]=R}return{kind:"saved",block:o,values:c,invalid:f}}function hr(e,t){return e.kind!=="conflict"&&Object.hasOwn(e.values,t)}function _r(e){const t=Je(e,"experiments"),n=Je(e,"campaigns");return{experiments:t.kind==="conflict"?{}:t.values,campaigns:n.kind==="conflict"?{}:n.values}}function un(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<=100?e:null}function pn(e){if(!me(e))return null;const t={};for(const n of["start","end"]){const r=e[n];if(!(r==null||r==="")){if(typeof r!="string")return null;t[n]=r}}return t}function vr(e){return e<=0?"off":e>=100?"everyone":"running"}function br(e){if(!me(e))return null;const t=fn(e.__resolveType);if(!t)return null;const n=e[K[t].field];return typeof n=="string"?{kind:t,name:n}:null}function Tr(e,t){const n=K[e];return{__resolveType:n.matcher,[n.field]:t}}const yn="date";function Ar(e){return me(e)&&e.__resolveType===yn&&(Object.hasOwn(e,"start")||Object.hasOwn(e,"end"))}function Sr(e,t,n,r){return{...e,__resolveType:K[t].resolveType,[n]:r}}function Rr(e,t){if(t==="__resolveType")return e;const{[t]:n,...r}=e;return r}function me(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function dn(e){const t=[];return e.fastPreviewActive?t.push({kind:"committed"}):(e.fetchEnabled&&e.previewUrl&&t.push({kind:"live",baseUrl:e.previewUrl}),t.push({kind:"committed"})),e.productionUrl&&t.push({kind:"production",baseUrl:e.productionUrl}),t}const mn=5e3;function gn(e,t){return e.kind==="live"?new URL("/live/_meta",e.baseUrl).href:sn(t,"site-meta")}const hn=new Map;async function _n(e,t,n=hn){const r=n.get(e),i=r==="refused"?void 0:t?.etag,o=await fetch(e,{cache:"no-store",headers:i?{"If-None-Match":i}:{}}).catch(()=>null),c=!o&&!!i&&r===void 0,f=c?await fetch(e,{cache:"no-store",headers:{}}).catch(()=>null):o;if(i&&(c&&f?n.set(e,"refused"):o&&n.set(e,"ok")),t&&(!f||f.status===304))return t;if(!f?.ok)return null;try{return await f.json()}catch{return null}}function vn(e){return rt.liveMeta(e.orgSlug,e.virtualMcpId,e.branch,e.previewUrl??"",e.productionUrl??"")}function Or(e,t){const n=ae.c(30),{url:r}=Qt(e?.virtualMcpId),i=!!r,o=i||(t?.fetchEnabled??!0),c=r??e?.previewUrl,f=Gt(e?.virtualMcpId),{previewServerUrl:l,runtime:A}=cn(e?.virtualMcpId),R=!i&&A==="cms",O=Ht(e?.virtualMcpId,e?.branch),P=O.kind==="protocol"?O:null,Q=xt(),V=Xt(e??null);let q;n[0]!==e||n[1]!==c||n[2]!==l||n[3]!==P?(q=e?P?Zt(e,P):vn({...e,previewUrl:c,productionUrl:l}):rt.liveMeta(""),n[0]=e,n[1]=c,n[2]=l,n[3]=P,n[4]=q):q=n[4];const j=q;let I;n[5]!==O.kind||n[6]!==V||n[7]!==R||n[8]!==o||n[9]!==i||n[10]!==f||n[11]!==e||n[12]!==c||n[13]!==l||n[14]!==P||n[15]!==Q||n[16]!==j?(I=async()=>{if(P){const{meta:d}=await Jt(Q,P,e,V);if(d instanceof Error)throw d;return d}if(O.kind==="unavailable")throw en("live meta");const G=()=>R?nn(e):rn(e,on(f,".deco/meta.gen.json")),s=i&&c?[{kind:"live",baseUrl:c}]:dn({fetchEnabled:o,previewUrl:c,productionUrl:l,fastPreviewActive:R});for(const d of s){if(d.kind==="committed"){const E=await G();if(E.kind==="data")return E.data;continue}const a=Q.getQueryData(j),$=await _n(gn(d,e),i||a?.etag?a:void 0);if($)return $}const y=new Error("live meta unavailable (dev server down, no committed snapshot, no production fallback)");throw y.status=502,y},n[5]=O.kind,n[6]=V,n[7]=R,n[8]=o,n[9]=i,n[10]=f,n[11]=e,n[12]=c,n[13]=l,n[14]=P,n[15]=Q,n[16]=j,n[17]=I):I=n[17];const W=!!e&&O.kind!=="pending",B=P?!1:i?mn:t?.refetchInterval,ee=P?!1:void 0,ie=P?P.describe.pollIntervalMs:3e5;let F;n[18]!==R||n[19]!==i||n[20]!==P?(F=(G,s)=>(P||R||i||s.status!==502)&&G<3,n[18]=R,n[19]=i,n[20]=P,n[21]=F):F=n[21];let Y;return n[22]!==j||n[23]!==I||n[24]!==W||n[25]!==B||n[26]!==ee||n[27]!==ie||n[28]!==F?(Y={queryKey:j,queryFn:I,enabled:W,refetchInterval:B,refetchIntervalInBackground:!1,refetchOnWindowFocus:ee,staleTime:ie,retry:F,retryDelay:tn},n[22]=j,n[23]=I,n[24]=W,n[25]=B,n[26]=ee,n[27]=ie,n[28]=F,n[29]=Y):Y=n[29],Lt(Y)}const bn=new Set(["split-traffic","calendar"]);function Tn(e){const n=e.properties?.__resolveType?.enum;return Array.isArray(n)&&typeof n[0]=="string"?n[0]:""}const An=12,Sn=8,Ee=32,Rn=40,et="__SECTION_REF__";function se(e){const t=e.type;return t==="array"||Array.isArray(t)&&t.includes("array")}function tt(e,t){let n=e.items;if(!n)return!1;if(typeof n.$ref=="string"&&(n=t(n.$ref)),Array.isArray(n.anyOf)||Array.isArray(n.oneOf))return!0;const i=n.properties?.__resolveType?.enum;return Array.isArray(i)&&typeof i[0]=="string"}const On="VideoWidget";function J(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function at(e){return typeof btoa=="function"?btoa(e):Buffer.from(e).toString("base64")}function Ce(e){const t=e.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Me(e){const t=e.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function ft(e,t){return[`site/apps/${e}/${t}.ts`,`site/apps/${e}/${t}.tsx`,`${e}/apps/${t}.ts`,`${e}/apps/${t}.tsx`]}function ge(e,t){const n=t.manifest?.blocks??{};for(const f of Object.values(n))if(f[e])return f[e];const r=Ce(e)??Me(e);if(r){for(const f of ft(r.vendor,r.app))for(const l of Object.values(n))if(l[f])return l[f]}const i=at(e);for(const f of Object.values(n))if(f[i])return f[i];const o=t.schema??{};return(o.$defs??o.definitions??{})[i]?{$ref:`#/definitions/${i}`}:{}}function Er(e,t){return Object.keys(ge(e,t)).length>0}function lt(e,t){if(Ct(e,t))return!0;const n=Ce(t)??Me(t);if(!n)return!1;const r=e.manifest?.blocks?.apps??{};if(ft(n.vendor,n.app).some(c=>c in r))return!0;const i=at(t),o=e.schema?.$defs??e.schema?.definitions??{};return i in o}function En(e){return e==="site/apps/site.ts"?!1:Ce(e)!==null||Me(e)!==null}function kn(e,t){return ut(t,{resolveType:e})}function kr(e,t){return ut(t,{ref:e})}function ut(e,t){const n=e.schema??{},r="resolveType"in t?ge(t.resolveType,e):{},i=n.$defs??n.definitions??{},o=n.root??{},c=s=>{if(s.startsWith("#/root/")){const a=s.slice(7);return o[a]??{}}const y=s.split("/").pop()??"",d=i[y];return d||(y===et?o.sections??{}:{})};let f;typeof r.$ref=="string"?f=c(r.$ref):Object.keys(r).length>0?f=r:f=n;const l=s=>typeof s.$ref=="string"?c(s.$ref):s,A=s=>{const d=l(s).properties?.type;if(d){if(typeof d.const=="string")return d.const;if(typeof d.default=="string")return d.default;if(Array.isArray(d.enum)&&typeof d.enum[0]=="string")return d.enum[0]}},R=(s,y)=>{const d=l(s);return typeof d.title=="string"&&!d.title.startsWith("#")?d.title:y},O=(s,y=new Set)=>{if(typeof s.$ref!="string"||s.properties||s.anyOf||s.allOf||s.oneOf||s.type)return s;const d=s.$ref.split("/").pop()??"";return!d||y.has(d)?s:O(c(s.$ref),new Set([...y,d]))},P=(s,y=new Set)=>{if(typeof s.$ref!="string")return!1;const d=s.$ref.split("/").pop()??"";return s.$ref==="#/root/sections"||d===et?!0:!d||y.has(d)?!1:P(c(s.$ref),new Set([...y,d]))},Q=s=>{const y=s.properties?.__resolveType?.enum;return Array.isArray(y)&&typeof y[0]=="string"?y[0]:void 0},V=s=>Q(s)!==void 0,q=(s,y=new Set)=>{if(typeof s.$ref!="string")return[];const d=s.$ref.split("/").pop()??"";if(!d||y.has(d))return[];const a=c(s.$ref),$=a.anyOf??a.oneOf;if(!Array.isArray($))return[];const E=new Set([...y,d]);return $.flatMap(x=>V(x)?[x]:q(x,E))},j=s=>{const y=s.hide;return y===!0||y==="true"},I=s=>typeof s=="string"&&(s.includes("://")||!/\s/.test(s)&&(s.includes("|")||s.includes("&")||s.includes("@"))),W=(s,y=new Set,d=0)=>{if(d>An)return{};if(typeof s.$ref=="string"){const $=s.$ref.split("/").pop()??"";return y.has($)?{}:W(c(s.$ref),new Set([...y,$]),d+1)}let a={};s.properties&&typeof s.properties=="object"&&(a={...a,...s.properties}),Array.isArray(s.required)&&(a.__required=[...J(a.__required),...J(s.required)]);for(const $ of["allOf","anyOf","oneOf"]){const E=s[$];if(Array.isArray(E))for(const x of E){const U=J(a.__required),H=W(x,y,d+1);a={...a,...H};const C=$==="allOf"?[...U,...J(H.__required)]:U;C.length>0?a.__required=C:delete a.__required}}return a},B=(s,y=0,d=new Set)=>{let a=s,$;if(typeof s.$ref=="string"){a=c(s.$ref);const k=s.$ref.split("/").pop()??"";$=k,k===On&&!a.format&&(a={...a,format:"video-uri"})}a=O(a);const E=$!==void 0&&d.has($),x=$!==void 0?new Set([...d,$]):d,U=(k,m,v,T=!0)=>!E&&(!T||v<=Rn)&&m<Sn?B(k,m,x):void 0;let H;{const k=a.anyOf??a.oneOf;if(Array.isArray(k)){const m=k.filter(T=>!(T.type==="null"||T.type===null)),v=T=>{if(typeof T.const=="string"||typeof T.const=="number")return T.const;if(Array.isArray(T.enum)&&T.enum.length===1&&(typeof T.enum[0]=="string"||typeof T.enum[0]=="number"))return T.enum[0]};m.length>0&&m.every(T=>v(T)!==void 0)&&(H=m.map(T=>v(T)))}}let C,oe,Fe,qe=!1;if(a.type)C=Array.isArray(a.type)?String(a.type.find(k=>k!=="null")??a.type[0]):String(a.type);else if(a.anyOf||a.oneOf){const m=(a.anyOf??a.oneOf).filter(v=>!(v.type==="null"||v.type===null));if(m.length===0)C="null";else if(m.length===1){const v=m[0];oe=v;const T=O(v);typeof v.$ref=="string"&&se(T)?(C="array",Fe=T.items):C=v.type?Array.isArray(v.type)?String(v.type[0]):String(v.type):typeof v.$ref=="string"?"object":"string"}else{if(H){const u=p=>typeof s[p]=="string"?s[p]:typeof a[p]=="string"?a[p]:void 0;return{type:"string",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,enum:H,format:u("format"),options:u("options")}}const v=m.filter(V),T=P(s)||m.some(u=>P(u))||void 0,D=m.map(u=>O(u)).find(se),Ae=u=>{if(typeof u.$ref!="string")return;const p=O(u),g=p.anyOf??p.oneOf;if(!Array.isArray(g))return;const h=[...g.filter(V),...g.filter(_=>!V(_)).flatMap(_=>q(_))],w=g.filter(_=>{if(V(_)||_.type==="null")return!1;const M=l(_),N=M.properties;return!N?.__resolveType&&!M.anyOf&&!M.oneOf&&(M.type==="object"||!!N)});return h.length>0&&w.length>0?{data:w,loaders:h}:void 0},le=m.flatMap(u=>{const p=Ae(u);return p?[p]:[]}),Pt=le.length===0&&m.filter(u=>!se(O(u))).every(u=>typeof u.$ref=="string"||v.includes(u)),jt=v.some(u=>{const p=u.properties?.__resolveType?.enum;return Array.isArray(p)&&(p[0]===Mt||z(e)&&p[0]==="multivariate")}),Se=(u=[])=>{const p=new Map;for(const S of[...v,...m.filter(b=>!v.includes(b)).flatMap(b=>q(b)),...u]){const b=Q(S);b&&!p.has(b)&&p.set(b,S)}const g=[...p].map(([S,b])=>({resolveType:S,title:typeof b.title=="string"?b.title:ne(S),description:typeof b.description=="string"?b.description:void 0,schema:U(b,y+1,p.size)})),h=[];for(const S of m){if(v.includes(S)||typeof S.$ref!="string")continue;const b=c(S.$ref);let X;const Z=b.properties?.__resolveType;if(Array.isArray(Z?.enum)&&typeof Z.enum[0]=="string"&&(X=Z.enum[0]),!X&&Array.isArray(b.allOf))for(const Bt of b.allOf){const Oe=Bt.properties?.__resolveType?.enum;if(Array.isArray(Oe)&&typeof Oe[0]=="string"){X=Oe[0];break}}X&&h.push({resolveType:X,title:typeof b.title=="string"&&!b.title.startsWith("#")?b.title:ne(X),description:typeof b.description=="string"?b.description:void 0,schema:U(b,y+1,m.length)})}const w=new Set(g.map(S=>S.resolveType)),_=[...g,...h.filter(S=>!w.has(S.resolveType))],M=m.filter(S=>!v.includes(S)),N=M.length===1&&!E?B(M[0],y+1,x):void 0;return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,anyOfRefs:_,acceptsAnySection:T,plainSchema:N,hidden:j(a)||j(s)?!0:void 0}};if(D){const u=!tt(D,c);if(u&&le.length>0){const p=typeof s.title=="string"?s.title:typeof a.title=="string"&&!I(a.title)?a.title:void 0,g=typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,h=m.find(_=>se(O(_))),w=le.flatMap(_=>_.data);return{type:"inline-union",title:p,description:g,inlineUnionBranches:[...w.map((_,M)=>({title:R(_,`Option ${M+1}`),schema:B(_,y+1,x)})),{title:R(h,`Option ${w.length+1}`),schema:B(D,y+1,x)}],loaderRef:{...Se(le.flatMap(_=>_.loaders)),title:p,description:g},hidden:j(a)||j(s)?!0:void 0}}if(u&&m.length>1&&Pt){const p=B(D,y+1,x),g=typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:p.title,h=typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:p.description;return{...p,type:"array",title:g,description:h,loaderRef:v.length>0?{...Se(),title:g,description:h}:void 0}}if(jt){const p=B(D,y+1,x);return{...p,type:"array",title:typeof a.title=="string"?a.title:p.title,description:typeof a.description=="string"?a.description:p.description}}}if(v.length>0)return Se();const ze=u=>{const p=l(u);if(typeof p.title=="string"&&Xe(p.title))return!0;const g=p.properties?.__resolveType?.enum;if(Array.isArray(g)&&typeof g[0]=="string")return!0;if(Array.isArray(p.allOf))for(const h of p.allOf){const w=h.properties?.__resolveType?.enum;if(Array.isArray(w)&&typeof w[0]=="string")return!0}return!1},Qe=m.map(u=>A(u));if(m.length>1&&Qe.every(u=>typeof u=="string")&&!m.some(ze)){const u=m.map((p,g)=>{const h=l(p),w=Qe[g];return{resolveType:w,title:R(p,w),description:typeof h.description=="string"?h.description:void 0,discriminatorValue:w,discriminatorRequired:[h,...h.allOf??[]].some(_=>J(_.required).includes("type")),schema:U(h,y+1,m.length,!1)}});return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,discriminatorKey:"type",anyOfRefs:u,hidden:j(a)||j(s)?!0:void 0}}const Re=u=>{if(ze(u))return!1;const p=l(u);return p.type==="object"||!!p.properties},wt=u=>{const p=O(u);return se(p)?!tt(p,c):!1},Ge=y<Ee&&m.every(u=>Re(u)||wt(u))&&m.some(Re),He=m.every(u=>typeof u.$ref=="string"),$t=z(e)&&!He&&m.some(u=>typeof u.$ref=="string"&&bn.has(Tn(c(u.$ref))))&&m.every(u=>typeof u.$ref=="string"||Re(u));if((He||$t)&&!Ge){const u=[];for(const p of m){if(typeof p.$ref!="string")continue;const g=c(p.$ref);let h,w,_=!1;if(typeof g.title=="string"){const S=Xe(g.title);S&&(h=S.blockId,w=S.blockId)}if(!h&&Array.isArray(g.allOf))for(const S of g.allOf){const Z=((S.properties??{}).__resolveType??{}).enum;if(Array.isArray(Z)&&typeof Z[0]=="string"){h=Z[0],_=!0;break}}if(!h){const b=g.properties?.__resolveType?.enum;Array.isArray(b)&&typeof b[0]=="string"&&(h=b[0],_=!0)}h||(h=p.$ref.split("/").pop()??"");const M=h.includes("/")||_&&!It(h),N=M?void 0:A(p);!N&&!M||_&&h==="lazy"||u.push({resolveType:N??h,title:w??(typeof g.title=="string"&&!g.title.startsWith("#")?g.title:ne(h)),description:typeof g.description=="string"?g.description:void 0,discriminatorValue:N,schema:U(g,y+1,m.length)})}return{type:"block-ref",acceptsAnySection:T,title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,anyOfRefs:u,hidden:j(a)||j(s)?!0:void 0}}if(Ge){const u=g=>{if(typeof g.const=="string"||typeof g.const=="number"||typeof g.const=="boolean")return g.const;if(Array.isArray(g.enum)&&g.enum.length===1&&(typeof g.enum[0]=="string"||typeof g.enum[0]=="number"||typeof g.enum[0]=="boolean"))return g.enum[0]},p=m.map((g,h)=>{const w=l(g).properties??{},_={};for(const[M,N]of Object.entries(w)){const S=u(N);S!==void 0&&(_[M]=S)}return{title:R(g,`Option ${h+1}`),schema:B(g,y+1),discriminators:Object.keys(_).length?_:void 0}});return{type:"inline-union",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,inlineUnionBranches:p,hidden:j(a)||j(s)?!0:void 0}}C="object"}}else a.allOf?(C="object",qe=I(a.title)):typeof s.$ref=="string"&&(C="object");let fe,We,Ye=!1;if(y<Ee&&!E){const k=W(a),m=k.__resolveType?.enum;Ye=Array.isArray(m)&&m.length===1&&m[0]==="lazy";const v=J(k.__required);v.length>0&&(We=v);const T=Object.entries(k).filter(([D])=>!D.startsWith("__")&&D!=="@type");if(T.length>0){fe={};for(const[D,Ae]of T)fe[D]=B(Ae,y+1,x)}}let Te;if((C==="array"||a.type==="array")&&y<Ee&&!E){const k=a.items??Fe;if(k){Te=B(k,y+1,x);const m=l(k);typeof m.title=="string"&&m.title.includes("{{")&&(Te.titleBy=m.title)}}const te=k=>{const m=oe?.[k];return typeof m=="string"?m:void 0},kt=()=>{if("default"in s)return s.default;if("default"in a)return a.default;if(oe&&"default"in oe)return oe.default};return{type:C??"string",title:typeof s.title=="string"?s.title:!qe&&typeof a.title=="string"?a.title:te("title"),description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:te("description"),default:kt(),enum:Array.isArray(a.enum)?a.enum:H??void 0,format:typeof s.format=="string"?s.format:typeof a.format=="string"?a.format:te("format"),properties:fe,required:We,items:Te,lazy:Ye&&fe?.value?!0:void 0,recursiveRef:E&&typeof s.$ref=="string"&&(C==="object"||C==="array"||a.type==="array")?s.$ref:void 0,hidden:j(a)||j(s)?!0:void 0,titleBy:typeof a.titleBy=="string"?a.titleBy:te("titleBy"),image:typeof a.image=="string"?a.image:te("image"),options:typeof s.options=="string"?s.options:typeof a.options=="string"?a.options:te("options")}};if("ref"in t)return B({$ref:t.ref});const ee=f.properties??{},ie=Object.keys(ee).every(s=>s.startsWith("__"));if(Array.isArray(f.allOf)&&f.allOf.length===1&&ie){const s=ee.__resolveType,y=Array.isArray(s?.enum)&&typeof s.enum[0]=="string"?s.enum[0]:typeof s?.const=="string"?s.const:typeof s?.default=="string"?s.default:void 0;for(const d of f.allOf){const a=O(d);if(!(Array.isArray(a.anyOf)||Array.isArray(a.oneOf))||a.properties)continue;const E=B(a,0);if(E.type==="inline-union"&&E.inlineUnionBranches){const x=I(E.title);return{...E,title:x?void 0:E.title,inlineUnionBranches:y?E.inlineUnionBranches.map(U=>({...U,discriminators:{...U.discriminators??{},__resolveType:y}})):E.inlineUnionBranches}}}}const F=W(f),Y={};for(const[s,y]of Object.entries(F))s.startsWith("__")||s==="@type"||(Y[s]=B(y,0));if(Object.keys(Y).length===0)return null;const G=J(F.__required);return{type:"object",title:typeof f.title=="string"?f.title:void 0,properties:Y,required:G.length>0?G:void 0}}function Pr(e,t){const n=t.schema??{},r=ge(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:r,c=o.properties??{};if(Object.keys(c).some(A=>!A.startsWith("__")))return!1;if(o.additionalProperties===!0)return!0;const l=c.__resolveType;return!!l&&Array.isArray(l.enum)&&l.enum[0]===e}function jr(e){const t=r=>{switch(typeof r){case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"object":{if(r===null)return{type:"string"};if(Array.isArray(r))return{type:"array",items:t(r[0])};const i={};for(const[o,c]of Object.entries(r))o.startsWith("__")||(i[o]=t(c));return{type:"object",properties:i}}default:return{type:"string"}}},n={};for(const[r,i]of Object.entries(e))r.startsWith("__")||(n[r]=t(i));return Object.keys(n).length===0?null:{type:"object",properties:n}}function Ie(e,t){const n=t.schema??{},r=ge(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:Object.keys(r).length>0?r:{...n,...r},c=o.icon,f=o.logo,l=o,A=O=>O===!0||O==="true",R=A(l.hide)||A(l.ignore)||A(l.unlisted);return{title:typeof o.title=="string"?o.title:void 0,description:typeof o.description=="string"?o.description:void 0,icon:typeof c=="string"?c:void 0,logo:typeof f=="string"?f:void 0,hidden:R||void 0}}const pt=["website/pages/Page.tsx","$live/pages/LivePage.tsx"],Pn=new Set(pt);function Ue(e){return Pn.has(e)}function De(e,t){return Ue(e)?!0:Object.hasOwn(t?.manifest?.blocks?.pages??{},e)}function wr(e,t){return De(e,z(t)?t:void 0)}function Ne(e){return e.replace(/\/+$/,"")||"/"}function $r(e){return e.trim().replace(/^\/+|\/+$/g,"")}function jn(e){const t=e.trim();return!(!t.startsWith("/")||t.startsWith("//")||t.includes("..")||t.includes("\\"))}function Br(e){const t=e.trim();return t?jn(t)?null:"Path must start with / and must not contain .. or //.":"Path is required."}const Ke=/:([A-Za-z0-9_-]+)|\*/g;function xr(e){const t=[];for(const n of e.matchAll(Ke)){const r=n[1]??"*";t.includes(r)||t.push(r)}return t}function yt(e){return e.replace(/\{([^{}]*)\}\?/g,"$1")}function Lr(e){e=yt(e);const t=[];let n=0;for(const r of e.matchAll(Ke))r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"param",name:r[1]??"*"}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function Cr(e,t){return yt(e).replace(Ke,(n,r)=>{const i=t[r??"*"]?.trim();return i?r!==void 0?encodeURIComponent(i):i.split("/").filter(Boolean).map(encodeURIComponent).join("/")||n:n})}const dt=pt[0],wn=new Set(["site/sections/Theme/Theme.tsx"]);function $n(e,t){return wn.has(e)?!0:t&&!e.includes("/")&&e.toLowerCase()==="theme"}function he(e,t){return!!($n(e,z(t))||ot(e)||e.toLowerCase().includes("preview"))}function mt(e){const t=e.manifest?.blocks??{};for(const n of Object.values(t))for(const r of Object.keys(n))if(Ue(r))return r;return Object.hasOwn(t.pages??{},"page")?"page":dt}function Bn(e){return z(e)?Object.hasOwn(e?.manifest?.blocks?.pages??{},"page"):!1}function Mr(e){return e?Bn(e)?"page":mt(e):dt}function ke(e){if(!e)return[];if(e.anyOfRefs?.length)return e.anyOfRefs;if(e.items)return ke(e.items);if(e.properties){const t=[];for(const n of Object.values(e.properties))t.push(...ke(n));return t}return[]}function xn(e){const t=e.manifest?.blocks??{},n=[];for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i)){if(he(o,e))continue;const c=Ie(o,e);n.push({resolveType:o,title:c.title??ne(o),description:c.description,previewBlock:o,isSavedBlock:!1})}return n}function Ir(e){const t=e.manifest?.blocks??{},n=new Map;for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i))he(o,e)||n.has(o)||n.set(o,{resolveType:o,title:ne(o)});return[...n.values()].sort((r,i)=>r.title.localeCompare(i.title))}function gt(e,t){const n=t.__resolveType;if(typeof n!="string")return"";const r=z(e);if(!ht(n,r))return n;const i=t.variants;if(!Array.isArray(i))return n;for(const o of i){const c=Ut(o,r);if(!c||typeof c!="object")continue;let f=c.__resolveType;if(typeof f=="string"&&ot(f)&&(f=c.section?.__resolveType??f),typeof f=="string"&&Be(e,f))return f}return n}function ht(e,t){return e===Dt||t&&e===Nt}function Ln(e,t){return gt(e,t)!==t.__resolveType}function _t(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||it(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c!="string"||Ue(c)||typeof o.path=="string"||he(c,e)||!(Be(e,c)||ht(c,z(e))&&Ln(e,o))||n.push({resolveType:r,title:r,description:typeof o.name=="string"?o.name:void 0,previewBlock:r,isSavedBlock:!0})}return n}function Cn(e,t){const n=st(t.resolveType,e),r=n?{}:Ie(t.resolveType,e);return{resolveType:t.resolveType,title:t.title||r.title||ne(t.resolveType),description:t.description??r.description,previewBlock:t.resolveType,isSavedBlock:n}}function Ur(e,t){const n=mt(e),r=kn(n,e),i=ke(r?.properties?.sections),o=new Map,c=f=>{if(!he(f.resolveType,e)){if(st(f.resolveType,e)){it(f.resolveType)||o.set(f.resolveType,f);return}Be(e,f.resolveType)&&(o.has(f.resolveType)||o.set(f.resolveType,f))}};for(const f of xn(e))c(f);for(const f of i)c(Cn(e,f));for(const f of _t(e,t))c(f);return[...o.values()].sort((f,l)=>f.title.localeCompare(l.title))}function Dr(e){const t=e.site;if(!t||typeof t!="object"||Array.isArray(t))return;const n=t.theme;if(!(!n||typeof n!="object"||Array.isArray(n)))return n}const _e="website/loaders/redirect.ts",Nr=new Set([_e,"website/loaders/redirects.ts"]),ve="redirect",Mn=[301,302,307,308],In={temporary:307,permanent:301};function Kr(e){return e.flat&&e.status||In[e.type]}const ue=e=>typeof e=="string"?e:"",Un=e=>e==="permanent"?"permanent":"temporary",Dn=e=>Mn.find(t=>t===e);function vt(e){const t=Dn(e.status);return{from:ue(e.from),to:ue(e.to),type:e.permanent===!0?"permanent":"temporary",discardQueryParameters:e.discardQueryParameters===!0,flat:!0,...t?{status:t}:{}}}function be(e){if(e?.__resolveType===ve)return vt(e);const t=e&&typeof e.redirect=="object"&&e.redirect!==null&&!Array.isArray(e.redirect)?e.redirect:{};return{from:ue(t.from),to:ue(t.to),type:Un(t.type),discardQueryParameters:t.discardQueryParameters===!0}}function Nn(e){const t=[];for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;const i=r;i.__resolveType!==_e&&i.__resolveType!==ve||t.push({key:n,...be(i)})}return t}function Vr(e){return be(e)}function Kn(e,t){if(e.flat){const{status:r,discardQueryParameters:i,...o}=t??{};return{...o,__resolveType:ve,from:e.from,to:e.to,permanent:e.type==="permanent",...e.status?{status:e.status}:{},...e.discardQueryParameters?{discardQueryParameters:!0}:{}}}const n={from:e.from,to:e.to,type:e.type};return e.discardQueryParameters&&(n.discardQueryParameters=!0),{redirect:n,__resolveType:_e}}function Vn(e){return(e.split(/[?#]/)[0]??"").replace(/^\/+/,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"redirect"}const Fn=1e3;function Fr(e,t){const n=Vn(t);for(let r=0;r<Fn;r++){const i=`redirects-${n}-${crypto.randomUUID()}`;if(!Object.hasOwn(e,i))return i}throw new Error("Could not generate a unique redirect block key")}const qn="Redirects",bt="redirects";function Tt(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&e.__resolveType===bt}function Wn(e){return Object.keys(e).filter(n=>Tt(e[n])).sort()[0]??qn}function qr(e,t){const n=e.lastIndexOf("#");if(n<=0)return null;const r=e.slice(0,n),i=e.slice(n+1);return!/^\d+$/.test(i)||!Object.hasOwn(t,r)||!Tt(t[r])?null:{block:r,index:Number(i)}}function re(e){if(!e||typeof e!="object"||Array.isArray(e))return[];const t=e.redirects;return Array.isArray(t)?t.filter(n=>!!n&&typeof n=="object"&&!Array.isArray(n)):[]}function At(e){return"redirect"in e?be(e):vt({...e})}function St(e,t){const{__resolveType:n,...r}=Kn(e,{...t});return r}function Wr(e,t){return re(t).map((n,r)=>[`${e}#${r}`,"redirect"in n?{...n,__resolveType:_e}:{...n,__resolveType:ve}])}function Yr(e,t=Wn(e)){return re(e[t]).map((n,r)=>({key:`${t}#${r}`,...At(n)}))}function zr(e,t){const n=re(e)[t];return n?At(n):be(void 0)}function Ve(e,t){return{...e&&typeof e=="object"&&!Array.isArray(e)?e:{},__resolveType:bt,redirects:t}}function Qr(e,t){return Ve(e,[...re(e),St(t)])}function Gr(e,t,n){const r=re(e),i=r.slice();return i[t]=St(n,r[t]),Ve(e,i)}function Hr(e,t){return Ve(e,re(e).filter((n,r)=>r!==t))}function Yn(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6)),t=t.replace(/-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,""),t=t.replace(/-[0-9a-f]{8,}$/i,""),t=t.replace(/-\d{5,}$/,"");try{return decodeURIComponent(t)}catch{return t}}function Xr(e,t){const{pageId:n,path:r,pathTemplate:i}=t;if(n){const o=e.find(f=>f.key===n);if(o)return o;const c=e.find(f=>f.key.endsWith(`-${n}`));if(c)return c}if(r){const o=Pe(e,r);if(o)return o}if(i){const o=Pe(e,i);if(o)return o}return null}function Pe(e,t,n){const r=Ne;if(n){const o=e.find(c=>c.key===n);if(o)return o}const i=e.filter(o=>r(o.path)===r(t));return i.length===0?null:i.length===1?i[0]??null:[...i].sort((o,c)=>o.key.localeCompare(c.key))[0]??null}function Zr(e,t,n){const r=Pe(e,t,n);return r||Ne(t)!=="/"?r:e[0]??null}const ce="site",Rt="site/apps/site.ts";function je(e,t){return e===ce?!0:t.__resolveType===Rt}function Jr(e,t){return e?Ot(e,t).length>0||Nn(e).length>0?!0:t?Zn(e,t).length>0||Hn(e,t)?!0:Xn(e,t).length>0:!1:!1}function zn(e,t,n){if(!t||typeof t!="object"||Array.isArray(t))return null;const r=t;return typeof r.__resolveType!="string"||!De(r.__resolveType,n)||typeof r.path!="string"?null:{key:e,name:typeof r.name=="string"?r.name:Yn(e),path:r.path}}function Ot(e,t){const n=[];for(const[r,i]of Object.entries(e)){const o=zn(r,i,t);o&&n.push(o)}return n}function we(e,t,n=0){if(n>64||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(i=>we(i,t,n+1));const r=e;return typeof r.__resolveType=="string"&&t.has(r.__resolveType)?!0:Object.values(r).some(i=>we(i,t,n+1))}function nt(e,t){return Kt(e)?Vt(e).some(n=>t.has(n)):we(e,t)}function Qn(e,t,n){const r=Ot(e,n),i=new Set(r.map(c=>c.key)),o=new Set([t]);for(let c=!0;c;){c=!1;for(const[f,l]of Object.entries(e))o.has(f)||i.has(f)||nt(l,o)&&(o.add(f),c=!0)}return r.filter(c=>c.key!==t&&nt(e[c.key],o))}function ei(e,t,n){const r=o=>Ne(o.path)==="/"?0:/:[A-Za-z0-9_-]|\*/.test(o.path)?2:1,[i]=Qn(e,t,n).sort((o,c)=>r(o)-r(c)||(o.path<c.path?-1:o.path>c.path?1:0));return i??null}function Gn(e,t){if(typeof t.name=="string"){const n=t.name.trim();if(n)return n}return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function $e(e,t,n){const r=typeof t.__resolveType=="string"?t.__resolveType:"",i=r?Ie(r,n):{};if(i.title)return i.title;if(typeof t.name=="string"){const o=t.name.trim();if(o)return o}return e.replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase())}function Hn(e,t){const n=e[ce];if(n&&typeof n=="object"&&!Array.isArray(n)){const r=n,i=r.__resolveType;if(typeof i=="string"&&(je(ce,r)||lt(t,i)))return{key:ce,name:$e(ce,r,t),resolveType:i}}for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;if(!je(r,o))continue;const c=typeof o.__resolveType=="string"?o.__resolveType:Rt;return{key:r,name:$e(r,o,t),resolveType:c}}return null}function Xn(e,t){const n=[];for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c=="string"&&(De(c,t)||typeof o.path!="string"&&(je(r,o)||!lt(t,c)&&!En(c)||n.push({key:r,name:$e(r,o,t),resolveType:c})))}return n.sort((r,i)=>r.name.localeCompare(i.name))}function Zn(e,t){return _t(t,e).map(n=>{const r=e[n.resolveType],i=gt(t,r);return{key:n.resolveType,name:n.description??Gn(n.resolveType,r),resolveType:i}}).sort((n,r)=>n.name.localeCompare(r.name))}const Jn=/^(?:collections\/blog|blog-manager)\/(posts|categories|authors)\//,er={posts:"post",categories:"category",authors:"author"},Et=["post","category","author"];function pe(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function ti(e,...t){const n=e?Jn.exec(e)?.[1]:void 0;if(n)return er[n]??null;for(const r of t){if(!pe(r))continue;const i=r.__resolveType;if(typeof i!="string"||!i.startsWith("blog/"))continue;const o=Et.find(c=>pe(r[c]));if(o)return o}return null}function tr(...e){for(const t of e)if(pe(t))for(const n of Et){const r=t[n];if(pe(r))for(const i of["title","name"]){const o=r[i];if(typeof o=="string"&&o.trim())return o.trim()}}return null}function nr(e,t=Ft){return t(`sectionsEditor.blogKind.${e}`)}function ni(e,t,n){return tr(...t)??nr(e,n)}const rr="https://github.com/decocms/blocks";function ri(){const e=ae.c(14),t=ye();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=L.jsx(ct,{size:48,className:"text-muted-foreground"}),e[0]=n):n=e[0];let r;e[1]!==t?(r=t("mainPanelTabs.blocksTabStates.emptyStateTitle"),e[1]=t,e[2]=r):r=e[2];let i;e[3]!==t?(i=t("mainPanelTabs.blocksTabStates.emptyStateDescription"),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=t("mainPanelTabs.blocksTabStates.setupContentEditing"),e[5]=t,e[6]=o):o=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=L.jsx(zt,{size:14}),e[7]=c):c=e[7];let f;e[8]!==o?(f=L.jsx(xe,{size:"sm",asChild:!0,children:L.jsxs("a",{href:rr,target:"_blank",rel:"noreferrer",children:[o,c]})}),e[8]=o,e[9]=f):f=e[9];let l;return e[10]!==r||e[11]!==i||e[12]!==f?(l=L.jsx(Le,{className:"h-full w-full",image:n,title:r,description:i,actions:f}),e[10]=r,e[11]=i,e[12]=f,e[13]=l):l=e[13],l}function ii(e){const t=ae.c(15),{source:n,onRetry:r}=e,i=ye();let o;t[0]!==n||t[1]!==i?(o=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),t[0]=n,t[1]=i,t[2]=o):o=t[2];const c=o;let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=L.jsx(an,{size:48,className:"text-muted-foreground"}),t[3]=f):f=t[3];let l;t[4]!==i?(l=i("mainPanelTabs.blocksTabStates.errorStateTitle"),t[4]=i,t[5]=l):l=t[5];let A;t[6]!==i?(A=i("mainPanelTabs.blocksTabStates.retry"),t[6]=i,t[7]=A):A=t[7];let R;t[8]!==r||t[9]!==A?(R=L.jsx(xe,{variant:"outline",size:"sm",onClick:r,children:A}),t[8]=r,t[9]=A,t[10]=R):R=t[10];let O;return t[11]!==c||t[12]!==l||t[13]!==R?(O=L.jsx(Le,{image:f,title:l,description:c,actions:R}),t[11]=c,t[12]=l,t[13]=R,t[14]=O):O=t[14],O}function oi(e){return e.kind==="unavailable"&&e.siteNotOwned===!0}function si(){const e=ae.c(16),t=ye(),{org:n}=qt();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=L.jsx(ct,{size:48,className:"text-muted-foreground"}),e[0]=r):r=e[0];let i;e[1]!==t?(i=t("siteEditor.siteNotOwned.title"),e[1]=t,e[2]=i):i=e[2];let o;e[3]!==t?(o=t("siteEditor.siteNotOwned.body"),e[3]=t,e[4]=o):o=e[4];let c;e[5]!==n.slug?(c={org:n.slug},e[5]=n.slug,e[6]=c):c=e[6];let f;e[7]!==t?(f=t("siteEditor.siteNotOwned.openProjects"),e[7]=t,e[8]=f):f=e[8];let l;e[9]!==c||e[10]!==f?(l=L.jsx(xe,{size:"sm",variant:"outline",asChild:!0,children:L.jsx(Wt,{to:"/$org/projects",params:c,"data-testid":"site-not-owned-projects",children:f})}),e[9]=c,e[10]=f,e[11]=l):l=e[11];let A;return e[12]!==i||e[13]!==o||e[14]!==l?(A=L.jsx(Le,{className:"h-full w-full",image:r,title:i,description:o,actions:l}),e[12]=i,e[13]=o,e[14]=l,e[15]=A):A=e[15],A}function ci(e){const t=ae.c(6),{backend:n}=e,r=ye(),i=n.kind==="pending"?n.retrying:void 0;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=L.jsx(Yt,{className:"size-5 text-muted-foreground"}),t[0]=o):o=t[0];let c;t[1]!==i||t[2]!==r?(c=i&&L.jsx("p",{className:"max-w-xs text-center text-sm text-muted-foreground",children:r("siteEditor.retrying.sandbox")}),t[1]=i,t[2]=r,t[3]=c):c=t[3];let f;return t[4]!==c?(f=L.jsxs("div",{"data-testid":"content-backend-waiting",className:"flex h-full w-full flex-col items-center justify-center gap-3",children:[o,c]}),t[4]=c,t[5]=f):f=t[5],f}export{jr as $,bt as A,ii as B,ci as C,Wr as D,dr as E,gt as F,Vr as G,qr as H,Xr as I,Hn as J,Nn as K,Ir as L,Nr as M,de as N,Wn as O,Hr as P,Yr as Q,In as R,si as S,Fr as T,Kn as U,Qr as V,xr as W,he as X,Mr as Y,Ue as Z,Pr as _,$r as a,wr as a0,Bn as a1,ke as a2,zn as a3,Yn as a4,ti as a5,ni as a6,mr as a7,nr as a8,dt as a9,me as aa,kr as ab,Ur as ac,br as ad,Je as ae,Ar as af,Tr as ag,hr as ah,Sr as ai,pr as aj,tr as ak,vr as al,Rr as am,Dr as an,Pe as ao,zr as ap,Mn as aq,Gr as ar,ri as b,Zn as c,Zr as d,Ot as e,Cr as f,gr as g,Jr as h,oi as i,yr as j,mt as k,Er as l,Rt as m,Ne as n,je as o,ei as p,En as q,_r as r,Lr as s,$e as t,Or as u,Br as v,Ie as w,Kr as x,kn as y,Gn as z};
@@ -1 +1 @@
1
- import{N as y}from"./site-editor-toast-Bw0qMl-K.js";import{a0 as h,W as _}from"./blocks-tab-states-B3rnTo7L.js";import{s as R,X as B,Y as T}from"./category-tree-BwBGBNEZ.js";const s=t=>typeof t=="string"?t:"";function p(t,r){for(const e of T(t)){const o=s(e[r]);if(o)return o}return null}function b(t,r){if(!t||typeof t!="object"||Array.isArray(t))return null;const e=t;return typeof e.__resolveType!="string"||!h(e.__resolveType,r)?null:typeof e.path=="string"?e.path:null}function C(t){return _(t).filter(r=>r!=="*").length}function P(t,r,e){let o=null,a=Number.POSITIVE_INFINITY;for(const u of Object.values(t)){const n=b(u,e);if(!n||!r.test(JSON.stringify(u)))continue;const l=C(n);l<a&&(o=n,a=l)}return o}const O=/blogpostpage/i,E=/blogcategorypage/i;function m(t,r){return p(t,"pageSlug")??P(t,O,r)}function G(t,r){return p(t,"categorySlug")??P(t,E,r)}function I(t){const r=t.categories;if(!Array.isArray(r)||r.length===0)return"";const e=r[0];return s(e?.slug)}function L(t,r){let e=t;if(/:category[*?]?/.test(e)){if(!r.category)return null;e=e.replace(/:category[*?]?/g,g(r.category))}if(/:slug[*?]?/.test(e)){if(!r.slug)return null;e=e.replace(/:slug[*?]?/g,encodeURIComponent(r.slug))}return e}const f=/:(?:categorySlug|categoria|category|slug)[*?]?/,d=/:(?:categorySlug|categoria|category|slug)[*?]?/g;function A(t,r=!1){return/:(?:categorySlug|categoria|category)\*|\/\*$/.test(t)?!0:r&&/:slug\*/.test(t)&&!/:(?:categorySlug|categoria|category)[*?]?/.test(t)}function g(t){return t.split("/").filter(r=>r!=="."&&r!=="..").map(encodeURIComponent).join("/")}function S(t,r){if(!r)return"";const e=R(t).categories;return B(r,e).join("/")}function M(t,r){return/\/\*$/.test(t)&&!f.test(t)?r?t.replace(/\/\*$/,`/${g(r)}`):null:f.test(t)?r?t.replace(d,g(r)):null:t}function v({decofile:t,category:r,previewBaseUrl:e,draftPointer:o,meta:a}){if(!e)return null;const u=G(t,a);if(!u)return null;const n=s(r.slug),l=M(u,A(u,!0)?S(t,n):n);if(!l)return null;try{return y(new URL(l,e).href,o)}catch{return null}}const j="draft";function U({decofile:t,post:r,previewBaseUrl:e,draftPointer:o,meta:a,planning:u=!1}){if(!e)return null;const n=m(t,a);if(!n)return null;const l=I(r),c=L(n,{category:A(n)?S(t,l):l,slug:s(r.slug)});if(!c)return null;try{const i=new URL(c,e);return u&&i.searchParams.set(j,"true"),y(i.href,o)}catch{return null}}export{L as a,U as b,v as c,m as f};
1
+ import{N as y}from"./site-editor-toast-DrPEsDU7.js";import{a0 as h,W as _}from"./blocks-tab-states-BJKt49qf.js";import{s as R,X as B,Y as T}from"./category-tree-5dEhPnK2.js";const s=t=>typeof t=="string"?t:"";function p(t,r){for(const e of T(t)){const o=s(e[r]);if(o)return o}return null}function b(t,r){if(!t||typeof t!="object"||Array.isArray(t))return null;const e=t;return typeof e.__resolveType!="string"||!h(e.__resolveType,r)?null:typeof e.path=="string"?e.path:null}function C(t){return _(t).filter(r=>r!=="*").length}function P(t,r,e){let o=null,a=Number.POSITIVE_INFINITY;for(const u of Object.values(t)){const n=b(u,e);if(!n||!r.test(JSON.stringify(u)))continue;const l=C(n);l<a&&(o=n,a=l)}return o}const O=/blogpostpage/i,E=/blogcategorypage/i;function m(t,r){return p(t,"pageSlug")??P(t,O,r)}function G(t,r){return p(t,"categorySlug")??P(t,E,r)}function I(t){const r=t.categories;if(!Array.isArray(r)||r.length===0)return"";const e=r[0];return s(e?.slug)}function L(t,r){let e=t;if(/:category[*?]?/.test(e)){if(!r.category)return null;e=e.replace(/:category[*?]?/g,g(r.category))}if(/:slug[*?]?/.test(e)){if(!r.slug)return null;e=e.replace(/:slug[*?]?/g,encodeURIComponent(r.slug))}return e}const f=/:(?:categorySlug|categoria|category|slug)[*?]?/,d=/:(?:categorySlug|categoria|category|slug)[*?]?/g;function A(t,r=!1){return/:(?:categorySlug|categoria|category)\*|\/\*$/.test(t)?!0:r&&/:slug\*/.test(t)&&!/:(?:categorySlug|categoria|category)[*?]?/.test(t)}function g(t){return t.split("/").filter(r=>r!=="."&&r!=="..").map(encodeURIComponent).join("/")}function S(t,r){if(!r)return"";const e=R(t).categories;return B(r,e).join("/")}function M(t,r){return/\/\*$/.test(t)&&!f.test(t)?r?t.replace(/\/\*$/,`/${g(r)}`):null:f.test(t)?r?t.replace(d,g(r)):null:t}function v({decofile:t,category:r,previewBaseUrl:e,draftPointer:o,meta:a}){if(!e)return null;const u=G(t,a);if(!u)return null;const n=s(r.slug),l=M(u,A(u,!0)?S(t,n):n);if(!l)return null;try{return y(new URL(l,e).href,o)}catch{return null}}const j="draft";function U({decofile:t,post:r,previewBaseUrl:e,draftPointer:o,meta:a,planning:u=!1}){if(!e)return null;const n=m(t,a);if(!n)return null;const l=I(r),c=L(n,{category:A(n)?S(t,l):l,slug:s(r.slug)});if(!c)return null;try{const i=new URL(c,e);return u&&i.searchParams.set(j,"true"),y(i.href,o)}catch{return null}}export{L as a,U as b,v as c,m as f};
@@ -1 +1 @@
1
- import{c as N,j as i,r as _,m as R,b as T}from"./index-PfzOl7J6.js";import{l as v}from"./agent-icon-DPgCnEV1.js";import{O as P,S as K,I as D,g as I}from"./held-block-view-CZDHkd7I.js";import{t as y}from"./ChevronUp-FDrusEQ7.js";import{C as W,a as Y,b as w}from"./collapsible-SBMmc8E3.js";import{ah as B,ai as L}from"./category-tree-BwBGBNEZ.js";function $(l){const e=N.c(2);let t;return e[0]!==l?(t=i.jsx(P,{children:i.jsx(K,{...l})}),e[0]=l,e[1]=t):t=e[1],t}function A(l){const e=N.c(18),{icon:t,title:o,defaultOpen:c,children:d}=l,j=c===void 0?!1:c,[f,C]=_.useState(j);let m;e[0]!==t?(m=i.jsx(t,{size:15}),e[0]=t,e[1]=m):m=e[1];let s;e[2]!==o?(s=i.jsx("span",{className:"flex-1 text-left",children:o}),e[2]=o,e[3]=s):s=e[3];const b=f&&"rotate-180";let n;e[4]!==b?(n=R("transition-transform",b),e[4]=b,e[5]=n):n=e[5];let p;e[6]!==n?(p=i.jsx(y,{size:15,className:n}),e[6]=n,e[7]=p):p=e[7];let r;e[8]!==m||e[9]!==s||e[10]!==p?(r=i.jsx(W,{asChild:!0,children:i.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[m,s,p]})}),e[8]=m,e[9]=s,e[10]=p,e[11]=r):r=e[11];let a;e[12]!==d?(a=i.jsx(Y,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=a):a=e[13];let u;return e[14]!==f||e[15]!==r||e[16]!==a?(u=i.jsxs(w,{open:f,onOpenChange:C,className:"mt-4",children:[r,a]}),e[14]=f,e[15]=r,e[16]=a,e[17]=u):u=e[17],u}function Z(l){const e=N.c(32),{schema:t,value:o,onChange:c,basePath:d,meta:j,decofile:f,sandbox:C,onSaveReferencedBlock:m}=l,s=T();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0];const[n,p]=_.useState(b);if(!t)return null;let r;e[1]!==s?(r=s("sandbox.blogCustomFields.title"),e[1]=s,e[2]=r):r=e[2];let a;e[3]!==s?(a=s("sandbox.blogCustomFields.description"),e[3]=s,e[4]=a):a=e[4];let u;e[5]!==a?(u=i.jsx("p",{className:"mb-4 text-xs text-muted-foreground",children:a}),e[5]=a,e[6]=u):u=e[6];let x;e[7]!==s?(x=s("sandbox.blogCustomFields.breadcrumbLabel"),e[7]=s,e[8]=x):x=e[8];let h;e[9]!==s?(h=s("sandbox.blogCustomFields.backToFields"),e[9]=s,e[10]=h):h=e[10];let g;e[11]!==n||e[12]!==x||e[13]!==h?(g=i.jsx(D,{path:n,onNavigate:p,label:x,backTitle:h}),e[11]=n,e[12]=x,e[13]=h,e[14]=g):g=e[14];let S;e[15]!==c?(S=F=>c(F),e[15]=c,e[16]=S):S=e[16];let E;e[17]!==d||e[18]!==n||e[19]!==f||e[20]!==j||e[21]!==m||e[22]!==C||e[23]!==t||e[24]!==S||e[25]!==o?(E=i.jsx($,{schema:t,value:o,onChange:S,basePath:d,breadcrumbPath:n,onBreadcrumbChange:p,meta:j,decofile:f,sandbox:C,onSaveReferencedBlock:m}),e[17]=d,e[18]=n,e[19]=f,e[20]=j,e[21]=m,e[22]=C,e[23]=t,e[24]=S,e[25]=o,e[26]=E):E=e[26];let O;return e[27]!==r||e[28]!==u||e[29]!==g||e[30]!==E?(O=i.jsxs(A,{icon:v,title:r,children:[u,g,E]}),e[27]=r,e[28]=u,e[29]=g,e[30]=E,e[31]=O):O=e[31],O}function k(l,e){if(!e)return null;const o=I(B[l],e)?.properties?.[L[l]];if(!o)return null;const c=o.properties?o:o.plainSchema;return c?.properties?c:null}const z=new Set(["__resolveType","@type"]);function G(l,e){const t=l?.properties;if(!t)return null;const o=Object.fromEntries(Object.entries(t).filter(([c,d])=>!e.has(c)&&!z.has(c)&&d.hidden!==!0));return Object.keys(o).length===0?null:{type:"object",properties:o}}function ee(l,e,t){return G(k(l,e),t)}const V=["title","slug","excerpt","date","readTime","image","mobileImage","alt","authors","categories","sections","seo","extraProps","scheduledDatetime","status","dateModified","planning","content"],te=new Set(V),M=["name","slug","parentSlug","description","sections"],se=new Set(M);export{Z as C,te as K,$ as S,A as a,ee as b,se as c};
1
+ import{c as N,j as i,r as _,m as R,b as T}from"./index-B0kMZVmC.js";import{l as v}from"./agent-icon-BLhMgLPf.js";import{O as P,S as K,I as D,g as I}from"./held-block-view-DW-NjX-S.js";import{t as y}from"./ChevronUp-DJytO9gL.js";import{C as W,a as Y,b as w}from"./collapsible-DdHbUgH7.js";import{ah as B,ai as L}from"./category-tree-5dEhPnK2.js";function $(l){const e=N.c(2);let t;return e[0]!==l?(t=i.jsx(P,{children:i.jsx(K,{...l})}),e[0]=l,e[1]=t):t=e[1],t}function A(l){const e=N.c(18),{icon:t,title:o,defaultOpen:c,children:d}=l,j=c===void 0?!1:c,[f,C]=_.useState(j);let m;e[0]!==t?(m=i.jsx(t,{size:15}),e[0]=t,e[1]=m):m=e[1];let s;e[2]!==o?(s=i.jsx("span",{className:"flex-1 text-left",children:o}),e[2]=o,e[3]=s):s=e[3];const b=f&&"rotate-180";let n;e[4]!==b?(n=R("transition-transform",b),e[4]=b,e[5]=n):n=e[5];let p;e[6]!==n?(p=i.jsx(y,{size:15,className:n}),e[6]=n,e[7]=p):p=e[7];let r;e[8]!==m||e[9]!==s||e[10]!==p?(r=i.jsx(W,{asChild:!0,children:i.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[m,s,p]})}),e[8]=m,e[9]=s,e[10]=p,e[11]=r):r=e[11];let a;e[12]!==d?(a=i.jsx(Y,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=a):a=e[13];let u;return e[14]!==f||e[15]!==r||e[16]!==a?(u=i.jsxs(w,{open:f,onOpenChange:C,className:"mt-4",children:[r,a]}),e[14]=f,e[15]=r,e[16]=a,e[17]=u):u=e[17],u}function Z(l){const e=N.c(32),{schema:t,value:o,onChange:c,basePath:d,meta:j,decofile:f,sandbox:C,onSaveReferencedBlock:m}=l,s=T();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0];const[n,p]=_.useState(b);if(!t)return null;let r;e[1]!==s?(r=s("sandbox.blogCustomFields.title"),e[1]=s,e[2]=r):r=e[2];let a;e[3]!==s?(a=s("sandbox.blogCustomFields.description"),e[3]=s,e[4]=a):a=e[4];let u;e[5]!==a?(u=i.jsx("p",{className:"mb-4 text-xs text-muted-foreground",children:a}),e[5]=a,e[6]=u):u=e[6];let x;e[7]!==s?(x=s("sandbox.blogCustomFields.breadcrumbLabel"),e[7]=s,e[8]=x):x=e[8];let h;e[9]!==s?(h=s("sandbox.blogCustomFields.backToFields"),e[9]=s,e[10]=h):h=e[10];let g;e[11]!==n||e[12]!==x||e[13]!==h?(g=i.jsx(D,{path:n,onNavigate:p,label:x,backTitle:h}),e[11]=n,e[12]=x,e[13]=h,e[14]=g):g=e[14];let S;e[15]!==c?(S=F=>c(F),e[15]=c,e[16]=S):S=e[16];let E;e[17]!==d||e[18]!==n||e[19]!==f||e[20]!==j||e[21]!==m||e[22]!==C||e[23]!==t||e[24]!==S||e[25]!==o?(E=i.jsx($,{schema:t,value:o,onChange:S,basePath:d,breadcrumbPath:n,onBreadcrumbChange:p,meta:j,decofile:f,sandbox:C,onSaveReferencedBlock:m}),e[17]=d,e[18]=n,e[19]=f,e[20]=j,e[21]=m,e[22]=C,e[23]=t,e[24]=S,e[25]=o,e[26]=E):E=e[26];let O;return e[27]!==r||e[28]!==u||e[29]!==g||e[30]!==E?(O=i.jsxs(A,{icon:v,title:r,children:[u,g,E]}),e[27]=r,e[28]=u,e[29]=g,e[30]=E,e[31]=O):O=e[31],O}function k(l,e){if(!e)return null;const o=I(B[l],e)?.properties?.[L[l]];if(!o)return null;const c=o.properties?o:o.plainSchema;return c?.properties?c:null}const z=new Set(["__resolveType","@type"]);function G(l,e){const t=l?.properties;if(!t)return null;const o=Object.fromEntries(Object.entries(t).filter(([c,d])=>!e.has(c)&&!z.has(c)&&d.hidden!==!0));return Object.keys(o).length===0?null:{type:"object",properties:o}}function ee(l,e,t){return G(k(l,e),t)}const V=["title","slug","excerpt","date","readTime","image","mobileImage","alt","authors","categories","sections","seo","extraProps","scheduledDatetime","status","dateModified","planning","content"],te=new Set(V),M=["name","slug","parentSlug","description","sections"],se=new Set(M);export{Z as C,te as K,$ as S,A as a,ee as b,se as c};