@templatical/editor 0.56.0 → 0.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/{AiAltTextPopover-DdsvhE78.js → AiAltTextPopover-CpZ7UeAZ.js} +3 -3
  2. package/dist/{AiAltTextReview-P6to1_0t.js → AiAltTextReview-LYxvn7Qe.js} +4 -4
  3. package/dist/{AiChatPanel-BSlmzMRC.js → AiChatPanel-Cy05P-iO.js} +53 -53
  4. package/dist/{AiPanels-DAsnX-a3.js → AiPanels-CwKmXzyr.js} +1 -1
  5. package/dist/{AiRewriteMenu-DIISOR6U.js → AiRewriteMenu-DgqJHnza.js} +8 -8
  6. package/dist/{BlockIssueBadge-Bmtc50BQ.js → BlockIssueBadge-CxHJmuOh.js} +3 -3
  7. package/dist/{BlockPreviewCanvas-BYIzNn-9.js → BlockPreviewCanvas-DEmNZkEG.js} +44 -44
  8. package/dist/{CloudPanels-w34W8_BP.js → CloudPanels-Bmlf05Il.js} +11 -11
  9. package/dist/{CollaborationNotices-HTbCebjV.js → CollaborationNotices-C27GCMvK.js} +7 -7
  10. package/dist/{CommentsPanel-C5qG17Ki.js → CommentsPanel-B5NqPMmY.js} +1 -1
  11. package/dist/{CommentsSidebar-C7CWcUYZ.js → CommentsSidebar-BDrcrDxS.js} +42 -42
  12. package/dist/{CountdownBlock-BTXcCvjZ.js → CountdownBlock-D8dqjm3F.js} +6 -6
  13. package/dist/{CountdownToolbar-CP-pkntQ.js → CountdownToolbar-IjpCOjCd.js} +30 -30
  14. package/dist/{IssuesPanel-CiiNBzH0.js → IssuesPanel-uwuzeMSW.js} +87 -87
  15. package/dist/LanguageMenu-C-eQ0lFy.js +403 -0
  16. package/dist/{LocaleNotices-CTCZ7BYv.js → LocaleNotices-CDK_9D7P.js} +8 -8
  17. package/dist/{LogicTagInsertButton-DEOPc4RC.js → LogicTagInsertButton-BSolF7Fd.js} +3 -3
  18. package/dist/{MediaEditModal-DJsPLTwP.js → MediaEditModal-C8yc9dxt.js} +7 -7
  19. package/dist/{MediaPanels-D2WD2aE2.js → MediaPanels-FI4I8asn.js} +1 -1
  20. package/dist/{MergeTagInput-C9icdxw7.js → MergeTagInput-B1nl2ZMT.js} +12 -12
  21. package/dist/{MergeTagTextarea-CrAcmT3A.js → MergeTagTextarea-DJlf3VbS.js} +1 -1
  22. package/dist/{ParagraphEditor-BWBQ3jKz.js → ParagraphEditor-Dqco128s.js} +156 -156
  23. package/dist/{RestoreVersionDialog-CqAp16yQ.js → RestoreVersionDialog-hqLCuGV5.js} +12 -12
  24. package/dist/{RichTextEditorContent-xbBjVPVQ.js → RichTextEditorContent-xIEF0Y3Z.js} +2 -2
  25. package/dist/{SaveBlockDialog-pebNJBTc.js → SaveBlockDialog-CQlCP_XC.js} +46 -46
  26. package/dist/{SavedBlocksBrowserModal-CvagMcv7.js → SavedBlocksBrowserModal-BXA32Fx6.js} +23 -23
  27. package/dist/{SavedBlocksPanels-B9AAVBDm.js → SavedBlocksPanels-BKUzbamj.js} +1 -1
  28. package/dist/{SavedBlocksPickBar-BIANWe3i.js → SavedBlocksPickBar-BlvF-4UF.js} +9 -9
  29. package/dist/{TemplateSettings-ORq4PbCN.js → TemplateSettings-CYFtR8zv.js} +41 -41
  30. package/dist/{TestEmailModal-DRjCpcPl.js → TestEmailModal-BbaL17HO.js} +20 -20
  31. package/dist/{TestEmailPanel-H0v8El__.js → TestEmailPanel-DhB1CSpg.js} +1 -1
  32. package/dist/{TitleEditor-CEGbJXeU.js → TitleEditor-3BRl8u5l.js} +21 -21
  33. package/dist/{Toolbar-XT-uGA9J.js → Toolbar-pzNIakGM.js} +656 -656
  34. package/dist/{TplModal-7NQq5-VW.js → TplModal-WNuWhHZm.js} +4 -4
  35. package/dist/{VersionHistoryMenu-C8BE3Pr-.js → VersionHistoryMenu--T-Qp_mH.js} +15 -15
  36. package/dist/{VersionHistoryPanels-CuKuOSJG.js → VersionHistoryPanels-BPubvYIE.js} +1 -1
  37. package/dist/{VersionPreviewBanner-BVFBkveR.js → VersionPreviewBanner-ClL3Wkln.js} +7 -7
  38. package/dist/{WrapperBlock-Bdw-072t.js → WrapperBlock-CjfCPceb.js} +11 -11
  39. package/dist/{blockTypeIcons-CGplGmmr.js → blockTypeIcons-12OMwVyN.js} +1 -1
  40. package/dist/bundle-stats.json +6 -6
  41. package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js → AiAltTextPopover-PFjTrl0y.js} +4 -4
  42. package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js.map → AiAltTextPopover-PFjTrl0y.js.map} +1 -1
  43. package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js → AiAltTextReview-BMjzvApH.js} +5 -5
  44. package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js.map → AiAltTextReview-BMjzvApH.js.map} +1 -1
  45. package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js → AiChatPanel-C2gpq4kP.js} +107 -107
  46. package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js.map → AiChatPanel-C2gpq4kP.js.map} +1 -1
  47. package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js → AiPanels-Cx3PE2mE.js} +2 -2
  48. package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js.map → AiPanels-Cx3PE2mE.js.map} +1 -1
  49. package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js → AiRewriteMenu-CnkyjPEu.js} +11 -11
  50. package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js.map → AiRewriteMenu-CnkyjPEu.js.map} +1 -1
  51. package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js → BlockIssueBadge-DncZ-HDf.js} +4 -4
  52. package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js.map → BlockIssueBadge-DncZ-HDf.js.map} +1 -1
  53. package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js +156 -0
  54. package/dist/cdn/chunks/{BlockPreviewCanvas-B3HkuENF.js.map → BlockPreviewCanvas-CCSEzL46.js.map} +1 -1
  55. package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js → CloudPanels-CRztnw4M.js} +2 -2
  56. package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js.map → CloudPanels-CRztnw4M.js.map} +1 -1
  57. package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js → CollaborationNotices-IuLYT2x7.js} +8 -8
  58. package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js.map → CollaborationNotices-IuLYT2x7.js.map} +1 -1
  59. package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js → CommentsPanel-lgjJNrrY.js} +2 -2
  60. package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js.map → CommentsPanel-lgjJNrrY.js.map} +1 -1
  61. package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js → CommentsSidebar-DTold7iy.js} +214 -214
  62. package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js.map → CommentsSidebar-DTold7iy.js.map} +1 -1
  63. package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js → CountdownBlock-8aPSExrv.js} +7 -7
  64. package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js.map → CountdownBlock-8aPSExrv.js.map} +1 -1
  65. package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js → CountdownToolbar-CnWQEW5g.js} +50 -50
  66. package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js.map → CountdownToolbar-CnWQEW5g.js.map} +1 -1
  67. package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js → IssuesPanel-CrplCzo8.js} +11 -11
  68. package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js.map → IssuesPanel-CrplCzo8.js.map} +1 -1
  69. package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js → LanguageMenu-B6MNInCL.js} +110 -110
  70. package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js.map → LanguageMenu-B6MNInCL.js.map} +1 -1
  71. package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js → LocaleNotices-TxeAl8Iq.js} +9 -9
  72. package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js.map → LocaleNotices-TxeAl8Iq.js.map} +1 -1
  73. package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js → LogicTagInsertButton-DvSVx2DB.js} +4 -4
  74. package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js.map → LogicTagInsertButton-DvSVx2DB.js.map} +1 -1
  75. package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js → MediaEditModal-tGK6htBl.js} +8 -8
  76. package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js.map → MediaEditModal-tGK6htBl.js.map} +1 -1
  77. package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js → MediaPanels-BVrQYz2C.js} +2 -2
  78. package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js.map → MediaPanels-BVrQYz2C.js.map} +1 -1
  79. package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js → MergeTagInput-DeuNH3re.js} +13 -13
  80. package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js.map → MergeTagInput-DeuNH3re.js.map} +1 -1
  81. package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js → MergeTagTextarea-B2xxIU3e.js} +2 -2
  82. package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js.map → MergeTagTextarea-B2xxIU3e.js.map} +1 -1
  83. package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js → ParagraphEditor-Bx_Hlw8d.js} +106 -106
  84. package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js.map → ParagraphEditor-Bx_Hlw8d.js.map} +1 -1
  85. package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js → RestoreVersionDialog-CPrrWTsT.js} +12 -12
  86. package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js.map → RestoreVersionDialog-CPrrWTsT.js.map} +1 -1
  87. package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js → RichTextEditorContent-Dze4C9VI.js} +3 -3
  88. package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js.map → RichTextEditorContent-Dze4C9VI.js.map} +1 -1
  89. package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js → SaveBlockDialog-CXVwnfsy.js} +51 -51
  90. package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js.map → SaveBlockDialog-CXVwnfsy.js.map} +1 -1
  91. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js → SavedBlocksBrowserModal-BDTmenOE.js} +23 -23
  92. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js.map → SavedBlocksBrowserModal-BDTmenOE.js.map} +1 -1
  93. package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js → SavedBlocksPanels-B41Rk_v1.js} +2 -2
  94. package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js.map → SavedBlocksPanels-B41Rk_v1.js.map} +1 -1
  95. package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js → SavedBlocksPickBar-B97z_rFH.js} +11 -11
  96. package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js.map → SavedBlocksPickBar-B97z_rFH.js.map} +1 -1
  97. package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js → TemplateSettings-YwwRbxPc.js} +102 -102
  98. package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js.map → TemplateSettings-YwwRbxPc.js.map} +1 -1
  99. package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js → TestEmailModal-BiFP2Cbx.js} +20 -20
  100. package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js.map → TestEmailModal-BiFP2Cbx.js.map} +1 -1
  101. package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js → TestEmailPanel-BrivPMk2.js} +2 -2
  102. package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js.map → TestEmailPanel-BrivPMk2.js.map} +1 -1
  103. package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js → TitleEditor-CzPkkL2s.js} +19 -19
  104. package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js.map → TitleEditor-CzPkkL2s.js.map} +1 -1
  105. package/dist/cdn/chunks/{Toolbar-C_Hfsher.js → Toolbar-VH07SzX7.js} +550 -550
  106. package/dist/cdn/chunks/{Toolbar-C_Hfsher.js.map → Toolbar-VH07SzX7.js.map} +1 -1
  107. package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js → TplModal-DMe6J811.js} +6 -6
  108. package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js.map → TplModal-DMe6J811.js.map} +1 -1
  109. package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js → VersionHistoryMenu-DkwbKhBl.js} +15 -15
  110. package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js.map → VersionHistoryMenu-DkwbKhBl.js.map} +1 -1
  111. package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js → VersionHistoryPanels-CgxhMRAl.js} +2 -2
  112. package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js.map → VersionHistoryPanels-CgxhMRAl.js.map} +1 -1
  113. package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js → VersionPreviewBanner-WVBDBrwQ.js} +8 -8
  114. package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js.map → VersionPreviewBanner-WVBDBrwQ.js.map} +1 -1
  115. package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js → WrapperBlock-CCCIcqe2.js} +12 -12
  116. package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js.map → WrapperBlock-CCCIcqe2.js.map} +1 -1
  117. package/dist/cdn/chunks/{composables-CsfQlmcf.js → composables-D3lsO7Io.js} +925 -925
  118. package/dist/cdn/chunks/composables-D3lsO7Io.js.map +1 -0
  119. package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js → createCloudRuntime-CE79GB1H.js} +15 -15
  120. package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js.map → createCloudRuntime-CE79GB1H.js.map} +1 -1
  121. package/dist/cdn/chunks/dist-Cf1pSluo.js +405 -0
  122. package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-Cf1pSluo.js.map} +1 -1
  123. package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js → editor-modal-CN69NlOK.js} +170 -170
  124. package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js.map → editor-modal-CN69NlOK.js.map} +1 -1
  125. package/dist/cdn/chunks/en-Bcz4gS9U.js +1 -0
  126. package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js → extensions-8dlM-fU4.js} +96 -96
  127. package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js.map → extensions-8dlM-fU4.js.map} +1 -1
  128. package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js → sanitizeHtml-B3njfkSy.js} +11 -11
  129. package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js.map → sanitizeHtml-B3njfkSy.js.map} +1 -1
  130. package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js → socialIcons-BFgc3qqJ.js} +2 -2
  131. package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js.map → socialIcons-BFgc3qqJ.js.map} +1 -1
  132. package/dist/cdn/chunks/{src-Bfj1jHnn.js → src-GgKlXNxy.js} +2 -2
  133. package/dist/cdn/chunks/{src-Bfj1jHnn.js.map → src-GgKlXNxy.js.map} +1 -1
  134. package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-C940SvId.js} +3 -3
  135. package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js.map → tiptap-C940SvId.js.map} +1 -1
  136. package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js → useLogicTag-B0PDeDxl.js} +4 -4
  137. package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js.map → useLogicTag-B0PDeDxl.js.map} +1 -1
  138. package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js → useMergeTag-BSU75bKk.js} +7 -7
  139. package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js.map → useMergeTag-BSU75bKk.js.map} +1 -1
  140. package/dist/cdn/editor.js +325 -325
  141. package/dist/cdn/editor.js.map +1 -1
  142. package/dist/{composables-CRX6rncm.js → composables-DreAt_0A.js} +1031 -1031
  143. package/dist/{createCloudRuntime-DplyIlsy.js → createCloudRuntime-CL4tUlDC.js} +14 -14
  144. package/dist/{dist-ChOb5XHW.js → dist-0GWMyHtM.js} +1 -1
  145. package/dist/{dist-6DU0me3E.js → dist-B_0FPmoy.js} +1 -1
  146. package/dist/{dist-B8dY8drK.js → dist-BjzK1g4Z.js} +1 -1
  147. package/dist/{dist-54VCNoC0.js → dist-BsumKKh9.js} +1 -1
  148. package/dist/{dist-BWflWcpW.js → dist-C3avsUq9.js} +2 -2
  149. package/dist/{dist-fqSers8_.js → dist-CCLRTtJP.js} +197 -197
  150. package/dist/dist-CiYotUR8.js +406 -0
  151. package/dist/{dist-C3hu_C3w.js → dist-Cr1CLCmx.js} +1 -1
  152. package/dist/{dist-D_XrUEET.js → dist-CsknfjrZ.js} +3 -3
  153. package/dist/{dist-TAv500j6.js → dist-DDytHU_6.js} +1 -1
  154. package/dist/{dist-CcOn7WCo.js → dist-DKV9m4Uu.js} +1 -1
  155. package/dist/{dist-B9a7iVye.js → dist-Dq9VnANT.js} +1 -1
  156. package/dist/{dist-DZ3X-uB8.js → dist-ZrT0vAB6.js} +1 -1
  157. package/dist/{editor-modal-D9HT9bD6.js → editor-modal-BD32TXws.js} +106 -106
  158. package/dist/en-Dgs_-NBw.js +1 -0
  159. package/dist/{extensions-Cm6K4SRX.js → extensions-DKxHlSd7.js} +179 -179
  160. package/dist/{socialIcons-CJD6OsI7.js → socialIcons-oo4uL16Y.js} +1 -1
  161. package/dist/templatical-editor.js +526 -526
  162. package/dist/{useLogicTag-DLkYos2Q.js → useLogicTag-B4Zpk3eo.js} +3 -3
  163. package/dist/{useMergeTag-IoWOO679.js → useMergeTag-B5qlq8px.js} +7 -7
  164. package/package.json +7 -7
  165. package/dist/LanguageMenu-B981Av-6.js +0 -403
  166. package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js +0 -156
  167. package/dist/cdn/chunks/composables-CsfQlmcf.js.map +0 -1
  168. package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
  169. package/dist/cdn/chunks/en-CVxNoHww.js +0 -1
  170. package/dist/dist-0alKVRc_.js +0 -406
  171. package/dist/en-De3uAutQ.js +0 -1
@@ -1,65 +1,65 @@
1
- import { A as e, B as t, C as n, E as r, F as i, G as a, H as o, I as s, K as c, L as l, M as u, N as d, O as f, P as p, Q as m, R as h, S as g, W as _, X as v, Y as y, _ as b, b as x, c as S, ct as C, dt as w, f as T, g as E, h as D, j as O, l as k, m as A, mt as j, ot as M, p as N, pt as P, rt as F, s as I, st as L, t as R, tt as z, u as B, x as V } from "./draggable-DepKdldn.js";
2
- import { $ as H, A as U, B as W, C as G, Cn as K, D as ee, E as q, G as J, H as te, I as ne, K as re, Kt as ie, L as Y, M as X, N as ae, O as oe, P as se, Q as ce, Qt as Z, R as le, S as ue, Sn as de, T as fe, W as pe, X as me, Y as he, Z as ge, Zt as _e, a as ve, at as ye, b as be, bn as xe, cn as Se, ct as Ce, d as we, dt as Te, et as Ee, hn as De, ht as Oe, i as ke, it as Ae, j as je, jt as Me, lt as Ne, mn as Pe, mt as Fe, nt as Ie, on as Le, p as Re, pt as ze, q as Be, rn as Ve, rt as He, sn as Ue, st as We, t as Ge, tt as Ke, u as qe, un as Je, vn as Ye, vt as Xe, w as Ze, x as Qe, xn as $e, y as et, yn as tt } from "./src-mXG-Of9A.js";
3
- import { B as nt, C as rt, F as it, I as at, P as ot, R as st, T as ct, _ as lt, a as ut, f as dt, h as ft, n as pt, o as mt, t as ht, u as gt, v as _t, w as vt, x as yt, y as bt, z as xt } from "./socialIcons-Qw9rHc8C.js";
4
- import { t as St } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
5
- import { At as Ct, G as wt, Mt as Tt, Nt as Et, Ot as Dt, St as Ot, Ut as kt, V as At, Wt as jt, X as Mt, _t as Nt, d as Pt, f as Ft, k as It, mt as Lt, nt as Rt, o as zt, y as Bt, yt as Vt } from "./icons-DHExFLlT.js";
6
- import { $ as Ht, A as Ut, B as Wt, C as Gt, D as Kt, F as qt, G as Jt, H as Yt, I as Xt, J as Zt, K as Qt, L as $t, M as en, N as tn, O as nn, P as rn, R as an, S as on, T as sn, U as cn, V as ln, W as un, Y as dn, Z as fn, _ as pn, a as mn, at as hn, b as gn, c as _n, d as vn, et as yn, g as bn, h as xn, i as Sn, it as Cn, j as wn, k as Tn, l as En, m as Dn, nt as On, ot as kn, p as An, q as jn, r as Mn, rt as Nn, s as Pn, st as Fn, tt as In, u as Ln, v as Rn, w as zn, x as Bn, y as Vn, z as Hn } from "./keys-BUmIvYy3.js";
7
- import { t as Q } from "./useI18n-D8s7HtTn.js";
8
- import { n as Un } from "./useLocalizedDisplay-Bgg4qpev.js";
9
- import { t as Wn } from "./plural-CyxrJXL1.js";
10
- import { t as Gn } from "./languageName-DEEOhDWI.js";
11
- import { m as Kn, w as qn, x as Jn } from "./styleConstants-CgiNKdnc.js";
12
- import { _ as Yn, h as Xn, v as Zn, y as Qn } from "./dist-BzXULHvI.js";
13
- import { a as $n, c as er, i as tr, l as nr } from "./dist-DqGgijFI.js";
14
- import { t as rr } from "./useEditorRoot-Beau2Z_T.js";
1
+ import { a as e, c as t, i as n, l as r } from "./dist-Cf1pSluo.js";
2
+ import { A as i, B as a, C as o, E as s, F as c, G as l, H as u, I as d, K as f, L as p, M as m, N as h, O as g, P as _, Q as v, R as y, S as b, W as x, X as S, Y as C, _ as w, b as T, c as E, ct as D, dt as O, f as ee, g as k, h as A, j, l as M, m as N, mt as P, ot as F, p as I, pt as L, rt as R, s as z, st as B, t as te, tt as V, u as H, x as U } from "./draggable-DepKdldn.js";
3
+ import { t as ne } from "./useEditorRoot-Beau2Z_T.js";
4
+ import { t as W } from "./useI18n-D8s7HtTn.js";
15
5
  import "./useCloudI18n-Xsih9yRH.js";
16
- import { t as ir } from "./useMergeTag-B4FHCGGm.js";
6
+ import { t as G } from "./useMergeTag-BSU75bKk.js";
7
+ import { _ as re, h as K, v as ie, y as ae } from "./dist-BzXULHvI.js";
8
+ import { $ as oe, A as se, B as q, C as J, Cn as Y, D as X, E as ce, G as le, H as ue, I as de, K as Z, Kt as fe, L as pe, M as me, N as Q, O as he, P as ge, Q as _e, Qt as ve, R as ye, S as be, Sn as xe, T as Se, W as Ce, X as we, Y as Te, Z as Ee, Zt as De, a as Oe, at as ke, b as Ae, bn as je, cn as Me, ct as Ne, d as Pe, dt as Fe, et as Ie, hn as Le, ht as Re, i as ze, it as Be, j as Ve, jt as He, lt as Ue, mn as We, mt as Ge, nt as Ke, on as qe, p as Je, pt as Ye, q as Xe, rn as Ze, rt as Qe, sn as $e, st as et, t as tt, tt as nt, u as rt, un as it, vn as at, vt as ot, w as st, x as ct, xn as lt, y as ut, yn as dt } from "./src-mXG-Of9A.js";
17
9
  import { t as $ } from "./logger-CqQTfJGx.js";
18
- import { a as ar, c as or, i as sr, n as cr, o as lr, t as ur } from "./usePopoverPosition-esO6wjvU.js";
19
- import { t as dr } from "./useLogicTag-DLvWzWsp.js";
20
- import { r as fr, t as pr } from "./templateSettingsFields-cjlP-jdw.js";
21
- import { n as mr, t as hr } from "./sanitizeHtml-DJI7vvET.js";
22
- import { t as gr } from "./LoadingTrack-DUYcDHOV.js";
10
+ import { a as ft, c as pt, i as mt, n as ht, o as gt, t as _t } from "./usePopoverPosition-esO6wjvU.js";
11
+ import { n as vt } from "./useLocalizedDisplay-Bgg4qpev.js";
12
+ import { $ as yt, A as bt, B as xt, C as St, D as Ct, F as wt, G as Tt, H as Et, I as Dt, J as Ot, K as kt, L as At, M as jt, N as Mt, O as Nt, P as Pt, R as Ft, S as It, T as Lt, U as Rt, V as zt, W as Bt, Y as Vt, Z as Ht, _ as Ut, a as Wt, at as Gt, b as Kt, c as qt, d as Jt, et as Yt, g as Xt, h as Zt, i as Qt, it as $t, j as en, k as tn, l as nn, m as rn, nt as an, ot as on, p as sn, q as cn, r as ln, rt as un, s as dn, st as fn, tt as pn, u as mn, v as hn, w as gn, x as _n, y as vn, z as yn } from "./keys-BUmIvYy3.js";
13
+ import { t as bn } from "./useLogicTag-B0PDeDxl.js";
14
+ import { B as xn, C as Sn, F as Cn, I as wn, P as Tn, R as En, T as Dn, _ as On, a as kn, f as An, h as jn, n as Mn, o as Nn, t as Pn, u as Fn, v as In, w as Ln, x as Rn, y as zn, z as Bn } from "./socialIcons-BFgc3qqJ.js";
15
+ import { r as Vn, t as Hn } from "./templateSettingsFields-cjlP-jdw.js";
16
+ import { n as Un, t as Wn } from "./sanitizeHtml-B3njfkSy.js";
17
+ import { At as Gn, G as Kn, Mt as qn, Nt as Jn, Ot as Yn, St as Xn, Ut as Zn, V as Qn, Wt as $n, X as er, _t as tr, d as nr, f as rr, k as ir, mt as ar, nt as or, o as sr, y as cr, yt as lr } from "./icons-DHExFLlT.js";
18
+ import { t as ur } from "./LoadingTrack-DUYcDHOV.js";
19
+ import { t as dr } from "./languageName-DEEOhDWI.js";
20
+ import { t as fr } from "./plural-CyxrJXL1.js";
21
+ import { m as pr, w as mr, x as hr } from "./styleConstants-CgiNKdnc.js";
22
+ import { t as gr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
23
23
  import { t as _r } from "./readableTextColor-BfZUGnVj.js";
24
24
  // src/composables/useFocusTrap.ts
25
25
  var vr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
26
- function yr(e, t) {
27
- let n = rr(), r = null, i = null, a = null;
26
+ function yr(t, n) {
27
+ let r = ne(), i = null, a = null, o = null;
28
28
  function s() {
29
- return e.value ? Array.from(e.value.querySelectorAll(vr)).filter((e) => e.offsetParent !== null) : [];
29
+ return t.value ? Array.from(t.value.querySelectorAll(vr)).filter((e) => e.offsetParent !== null) : [];
30
30
  }
31
31
  function c(e) {
32
32
  if (e.key !== "Tab") return;
33
33
  let t = s();
34
34
  if (t.length === 0) return;
35
- let r = t[0], i = t[t.length - 1];
36
- e.shiftKey ? n.activeElement === r && (e.preventDefault(), i.focus()) : n.activeElement === i && (e.preventDefault(), r.focus());
35
+ let n = t[0], i = t[t.length - 1];
36
+ e.shiftKey ? r.activeElement === n && (e.preventDefault(), i.focus()) : r.activeElement === i && (e.preventDefault(), n.focus());
37
37
  }
38
38
  function l() {
39
- let t = i !== null || a !== null;
40
- t && u({ restoreFocus: !1 }), t || (r = n.activeElement), a = requestAnimationFrame(() => {
41
- a = null;
42
- let t = s();
43
- t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
44
- }), i = $n(e, "keydown", c);
45
- }
46
- function u(e = {}) {
39
+ let n = a !== null || o !== null;
40
+ n && d({ restoreFocus: !1 }), n || (i = r.activeElement), o = requestAnimationFrame(() => {
41
+ o = null;
42
+ let e = s();
43
+ e.length > 0 && (t.value?.querySelector("[autofocus], input:not([disabled])") ?? e[0]).focus();
44
+ }), a = e(t, "keydown", c);
45
+ }
46
+ function d(e = {}) {
47
47
  let t = e.restoreFocus !== !1;
48
- a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
48
+ o !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(o), o = null), a?.(), a = null, t && i && i.focus && (i.focus(), i = null);
49
49
  }
50
- let d = o([t, e], ([e, t]) => {
51
- e && t ? l() : u();
50
+ let f = u([n, t], ([e, t]) => {
51
+ e && t ? l() : d();
52
52
  }, { flush: "post" });
53
- m(() => {
54
- d(), u();
53
+ v(() => {
54
+ f(), d();
55
55
  });
56
56
  }
57
57
  // src/composables/useEmoji.ts
58
58
  function br() {
59
- let [e, t] = Zn(!1), n = F([]), r = !1;
60
- m(() => {
59
+ let [e, t] = ie(!1), n = R([]), r = !1;
60
+ v(() => {
61
61
  r = !0;
62
- }), o(e, async (e) => {
62
+ }), u(e, async (e) => {
63
63
  if (e && n.value.length === 0) {
64
64
  let { emojiCategories: e } = await import("./emojiData-CBNuCfum.js");
65
65
  if (r) return;
@@ -81,17 +81,17 @@ function br() {
81
81
  }
82
82
  // src/composables/useBlockRegistry.ts
83
83
  function xr() {
84
- let e = F(/* @__PURE__ */ new Map());
84
+ let e = R(/* @__PURE__ */ new Map());
85
85
  function t(t, n) {
86
- e.value.set(t, n), L(e);
86
+ e.value.set(t, n), B(e);
87
87
  }
88
88
  function n(t, n) {
89
89
  let r = `custom:${t.type}`;
90
90
  e.value.set(r, {
91
91
  component: n,
92
- createBlock: () => ue(t),
92
+ createBlock: () => be(t),
93
93
  definition: t
94
- }), L(e);
94
+ }), B(e);
95
95
  }
96
96
  function r(t) {
97
97
  if (t.type === "custom") {
@@ -114,7 +114,7 @@ function xr() {
114
114
  let t = a(e.customType);
115
115
  if (!t) return o("Block definition not found");
116
116
  try {
117
- return await Y(await import("./liquid.browser-rubac0VA.js")).parseAndRender(t.template, e.fieldValues);
117
+ return await pe(await import("./liquid.browser-rubac0VA.js")).parseAndRender(t.template, e.fieldValues);
118
118
  } catch (t) {
119
119
  return $.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
120
120
  }
@@ -174,7 +174,7 @@ function wr(e) {
174
174
  return t;
175
175
  }
176
176
  function Tr(e) {
177
- let t = z(e?.customFonts ?? []), n = z(!1), r = wr(e?.builtIns), i = N(() => e?.defaultFallback ?? Cr), a = N(() => {
177
+ let t = V(e?.customFonts ?? []), n = V(!1), r = wr(e?.builtIns), i = I(() => e?.defaultFallback ?? Cr), a = I(() => {
178
178
  let e = [...r], n = t.value.map((e) => ({
179
179
  value: e.name,
180
180
  label: e.name,
@@ -194,9 +194,9 @@ function Tr(e) {
194
194
  }
195
195
  return Cr;
196
196
  }
197
- let l = N(() => c());
197
+ let l = I(() => c());
198
198
  function u(e) {
199
- return ke(e, {
199
+ return ze(e, {
200
200
  customFonts: t.value,
201
201
  defaultFallback: i.value
202
202
  });
@@ -218,14 +218,14 @@ function Tr(e) {
218
218
  $.warn(`Failed to load custom font "${e.name}":`, t);
219
219
  }
220
220
  });
221
- await Promise.allSettled(e), !f && (n.value = !0);
221
+ await Promise.allSettled(e), f || (n.value = !0);
222
222
  }
223
- function h() {
223
+ function m() {
224
224
  for (let e of d) e.remove();
225
225
  d.length = 0;
226
226
  }
227
- return y() && m(() => {
228
- f = !0, h();
227
+ return C() && v(() => {
228
+ f = !0, m();
229
229
  }), {
230
230
  fonts: a,
231
231
  defaultFont: l,
@@ -233,7 +233,7 @@ function Tr(e) {
233
233
  customFonts: t,
234
234
  isLoaded: n,
235
235
  loadCustomFonts: p,
236
- cleanupFontLinks: h,
236
+ cleanupFontLinks: m,
237
237
  resolveFontFamily: u,
238
238
  getDefaultFont: c
239
239
  };
@@ -264,7 +264,7 @@ var Er = {
264
264
  canvasBg: "--tpl-canvas-bg"
265
265
  };
266
266
  function Dr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
267
- return { themeStyles: N(() => {
267
+ return { themeStyles: I(() => {
268
268
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
269
269
  if (a) for (let [e, t] of Object.entries(Er)) {
270
270
  let n = a[e];
@@ -275,11 +275,11 @@ function Dr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
275
275
  }
276
276
  // src/utils/mergeTagNodeSpec.ts
277
277
  function Or(e, t, n) {
278
- return ge(e, n) ? {
278
+ return Ee(e, n) ? {
279
279
  type: "logicMergeTagNode",
280
280
  attrs: {
281
281
  value: e,
282
- keyword: J(e, n)
282
+ keyword: le(e, n)
283
283
  }
284
284
  } : {
285
285
  type: "mergeTagNode",
@@ -313,7 +313,7 @@ function Mr(e) {
313
313
  ...this.parent?.(),
314
314
  color: {
315
315
  default: null,
316
- parseHTML: (e) => jr(lr(e.style.color)),
316
+ parseHTML: (e) => jr(gt(e.style.color)),
317
317
  renderHTML: (e) => {
318
318
  let t = jr(e.color);
319
319
  return t ? { style: `color: ${t}` } : {};
@@ -323,8 +323,8 @@ function Mr(e) {
323
323
  } });
324
324
  }
325
325
  // src/composables/useRichTextLinkDialog.ts
326
- function Nr(e, t = te.liquid, n = () => !0) {
327
- let r = z(!1), i = z(""), a = z(""), o = z(null);
326
+ function Nr(e, t = ue.liquid, n = () => !0) {
327
+ let r = V(!1), i = V(""), a = V(""), o = V(null);
328
328
  yr(o, r);
329
329
  function s() {
330
330
  if (!n()) return;
@@ -353,8 +353,8 @@ function Nr(e, t = te.liquid, n = () => !0) {
353
353
  if (t.startsWith("#")) return t;
354
354
  if (t.startsWith("//")) return `https:${t}`;
355
355
  if (l.test(t)) return t;
356
- let n = we(t);
357
- return n ? qe.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
356
+ let n = Pe(t);
357
+ return n ? rt.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
358
358
  }
359
359
  function f() {
360
360
  n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
@@ -378,109 +378,109 @@ function Nr(e, t = te.liquid, n = () => !0) {
378
378
  };
379
379
  }
380
380
  // src/composables/useRichTextEditor.ts
381
- function Pr(e) {
382
- let t = f(Rn, null), n = or(), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: s, syntax: c, autocomplete: l } = ir(), { canInsertLogicTag: d, isRequesting: p, requestLogicTag: m } = dr(), h = f(On, null), g = (v(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = he(c), y = F(null), b = t?.content ? Un(t) : null, x = () => Te(b?.settings.value ?? { locale: "en" });
383
- o(x, (e) => {
381
+ function Pr(t) {
382
+ let n = g(hn, null), r = pt(), { mergeTags: i, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: c, autocomplete: l } = G(), { canInsertLogicTag: d, isRequesting: f, requestLogicTag: p } = bn(), h = g(an, null), _ = (S(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = Te(c), y = R(null), b = n?.content ? vt(n) : null, x = () => Fe(b?.settings.value ?? { locale: "en" });
383
+ u(x, (e) => {
384
384
  let t = y.value?.view.dom;
385
385
  t && t.setAttribute("dir", e);
386
386
  });
387
- let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } = Nr(y, c, () => n.value);
388
- o(n, (e) => {
387
+ let { showLinkDialog: C, linkUrl: w, linkColor: T, linkDialogRef: E, openLinkDialog: D, insertLink: O, removeLink: ee, closeLinkDialog: k, handleLinkKeydown: A } = Nr(y, c, () => r.value);
388
+ u(r, (e) => {
389
389
  if (y.value?.setEditable(e, !1), !e) {
390
390
  k();
391
391
  let e = y.value;
392
392
  e && e.view.dispatch(e.state.tr);
393
393
  }
394
394
  });
395
- let { start: j, stop: M } = Yn(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), N = F(null), P = z(!0), I = z(null), L = !1, R = null;
396
- async function B() {
397
- I.value = null, P.value = !0;
395
+ let { start: j, stop: M } = re(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), N = R(null), P = V(!0), F = V(null), I = !1, L = null;
396
+ async function z() {
397
+ F.value = null, P.value = !0;
398
398
  try {
399
- let { TiptapEditor: i, EC: a, extensions: o } = await e.loadExtensions({
400
- mergeTags: r,
399
+ let { TiptapEditor: e, EC: a, extensions: o } = await t.loadExtensions({
400
+ mergeTags: i,
401
401
  syntax: c,
402
- triggerChar: _,
402
+ triggerChar: v,
403
403
  autocompleteEnabled: l,
404
- suggestionEmptyText: g
404
+ suggestionEmptyText: _
405
405
  });
406
- if (L) return;
406
+ if (I) return;
407
407
  N.value = a;
408
408
  let s = /* @__PURE__ */ new Map();
409
409
  o.forEach((e, t) => s.set(e.name, t));
410
- let u = new i({
410
+ let u = new e({
411
411
  extensions: o.filter((e, t) => s.get(e.name) === t),
412
- content: e.blockContent(),
413
- editable: n.value,
412
+ content: t.blockContent(),
413
+ editable: r.value,
414
414
  editorProps: { attributes: { dir: x() } },
415
- onUpdate: ({ editor: r }) => {
416
- !L && n.value && t && (R = r.getHTML(), t.updateBlock(e.blockId(), { content: R }));
415
+ onUpdate: ({ editor: e }) => {
416
+ !I && r.value && n && (L = e.getHTML(), n.updateBlock(t.blockId(), { content: L }));
417
417
  }
418
418
  });
419
- if (L) {
419
+ if (I) {
420
420
  u.destroy();
421
421
  return;
422
422
  }
423
423
  y.value = u, P.value = !1, j();
424
- } catch (t) {
425
- if (L) return;
426
- $.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), I.value = t instanceof Error ? t.message : "Failed to load editor", P.value = !1;
424
+ } catch (e) {
425
+ if (I) return;
426
+ $.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
427
427
  }
428
428
  }
429
- function V() {
430
- y.value?.destroy(), y.value = null, B();
429
+ function B() {
430
+ y.value?.destroy(), y.value = null, z();
431
431
  }
432
- B();
433
- let H = o(() => e.blockContent(), (e) => {
434
- y.value && e !== R && (R = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
432
+ z();
433
+ let te = u(() => t.blockContent(), (e) => {
434
+ y.value && e !== L && (L = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
435
435
  });
436
- function U(t) {
437
- if (a.value || p.value) return;
438
- let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
436
+ function H(e) {
437
+ if (o.value || f.value) return;
438
+ let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
439
439
  if (!r) return;
440
- e.onClickOutsideSideEffect?.(r);
440
+ t.onClickOutsideSideEffect?.(r);
441
441
  let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
442
- r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
442
+ r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
443
443
  }
444
- $n(document, "mousedown", U), u(() => {
445
- L = !0, H(), M(), y.value?.destroy();
444
+ e(document, "mousedown", H), m(() => {
445
+ I = !0, te(), M(), y.value?.destroy();
446
446
  });
447
- async function W() {
448
- if (!n.value) return;
447
+ async function U() {
448
+ if (!r.value) return;
449
449
  let e = await s();
450
- !L && n.value && (e && y.value ? y.value.chain().focus().insertMergeTag({
450
+ !I && r.value && (e && y.value ? y.value.chain().focus().insertMergeTag({
451
451
  label: e.label,
452
452
  value: e.value
453
453
  }).run() : y.value?.commands.focus());
454
454
  }
455
- async function G() {
456
- if (!n.value) return;
457
- let e = await m();
458
- !L && n.value && (e && y.value ? Ar(y.value, e, c) : y.value?.commands.focus());
455
+ async function ne() {
456
+ if (!r.value) return;
457
+ let e = await p();
458
+ !I && r.value && (e && y.value ? Ar(y.value, e, c) : y.value?.commands.focus());
459
459
  }
460
460
  return {
461
461
  editor: y,
462
462
  EditorContent: N,
463
463
  isLoading: P,
464
- isEditable: n,
465
- initError: I,
466
- retry: V,
467
- showLinkDialog: S,
468
- linkUrl: C,
469
- linkColor: w,
470
- linkDialogRef: T,
471
- mergeTags: r,
472
- canRequestMergeTag: i,
473
- isRequestingMergeTag: a,
464
+ isEditable: r,
465
+ initError: F,
466
+ retry: B,
467
+ showLinkDialog: C,
468
+ linkUrl: w,
469
+ linkColor: T,
470
+ linkDialogRef: E,
471
+ mergeTags: i,
472
+ canRequestMergeTag: a,
473
+ isRequestingMergeTag: o,
474
474
  syntax: c,
475
475
  canInsertLogicTag: d,
476
- isRequestingLogicTag: p,
477
- openLinkDialog: E,
478
- insertLink: D,
479
- removeLink: O,
476
+ isRequestingLogicTag: f,
477
+ openLinkDialog: D,
478
+ insertLink: O,
479
+ removeLink: ee,
480
480
  closeLinkDialog: k,
481
481
  handleLinkKeydown: A,
482
- handleAddMergeTag: W,
483
- handleAddLogicTag: G
482
+ handleAddMergeTag: U,
483
+ handleAddLogicTag: ne
484
484
  };
485
485
  }
486
486
  // src/utils/activeEditorTracker.ts
@@ -513,23 +513,23 @@ function zr(e) {
513
513
  // src/composables/usePreviewResolution.ts
514
514
  var Br = 500;
515
515
  function Vr(e) {
516
- let t = typeof e.resolvePreview == "function", n = z(null), r = z(!1), i = z(!1), a = 0, s = null;
517
- function c() {
518
- s !== null && (clearTimeout(s), s = null);
516
+ let t = typeof e.resolvePreview == "function", n = V(null), r = V(!1), i = V(!1), a = 0, o = null;
517
+ function s() {
518
+ o !== null && (clearTimeout(o), o = null);
519
519
  }
520
- async function l() {
520
+ async function c() {
521
521
  let t = e.resolvePreview;
522
522
  if (!t) return;
523
523
  let o = ++a;
524
524
  r.value = !0;
525
525
  let s = {
526
- content: Ve(e.getContent()),
526
+ content: Ze(e.getContent()),
527
527
  ...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
528
528
  };
529
529
  try {
530
530
  let e = await t(s);
531
531
  if (o !== a) return;
532
- if (!Ge(e)) {
532
+ if (!tt(e)) {
533
533
  i.value = !0;
534
534
  return;
535
535
  }
@@ -541,34 +541,34 @@ function Vr(e) {
541
541
  o === a && (r.value = !1);
542
542
  }
543
543
  }
544
- function u() {
545
- t && (c(), n.value === null ? l() : s = setTimeout(() => {
546
- s = null, l();
544
+ function l() {
545
+ t && (s(), n.value === null ? c() : o = setTimeout(() => {
546
+ o = null, c();
547
547
  }, Br));
548
548
  }
549
- return o(() => [
549
+ return u(() => [
550
550
  e.isActive(),
551
551
  e.getRecipient?.(),
552
552
  e.getLocale?.()
553
553
  ], ([e, , t], o) => {
554
- o && t !== o[2] && (c(), a++, n.value = null, r.value = !1, i.value = !1), e ? u() : (c(), a++, r.value = !1, n.value = null, i.value = !1);
554
+ o && t !== o[2] && (s(), a++, n.value = null, r.value = !1, i.value = !1), e ? l() : (s(), a++, r.value = !1, n.value = null, i.value = !1);
555
555
  }, {
556
556
  immediate: !0,
557
557
  flush: "sync"
558
- }), m(() => {
559
- c(), a++;
558
+ }), v(() => {
559
+ s(), a++;
560
560
  }), {
561
561
  isConfigured: t,
562
- content: N(() => n.value ?? e.getContent()),
562
+ content: I(() => n.value ?? e.getContent()),
563
563
  isResolving: r,
564
- isInitialResolve: N(() => r.value && n.value === null),
564
+ isInitialResolve: I(() => r.value && n.value === null),
565
565
  hasFailed: i,
566
- supersedesSamples: N(() => t)
566
+ supersedesSamples: I(() => t)
567
567
  };
568
568
  }
569
569
  // src/composables/useMergeTagPicker.ts
570
570
  function Hr() {
571
- let e = z(!1), t = z([]), n = z(null), r = null;
571
+ let e = V(!1), t = V([]), n = V(null), r = null;
572
572
  function i(i, a) {
573
573
  if (r) {
574
574
  let e = r;
@@ -582,7 +582,7 @@ function Hr() {
582
582
  let a = r;
583
583
  r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
584
584
  }
585
- return y() && m(() => {
585
+ return C() && v(() => {
586
586
  if (r) {
587
587
  let e = r;
588
588
  r = null, e(null);
@@ -598,7 +598,7 @@ function Hr() {
598
598
  }
599
599
  // src/composables/useLogicTagPicker.ts
600
600
  function Ur() {
601
- let e = z(!1), t = z([]), n = z([]), r = null;
601
+ let e = V(!1), t = V([]), n = V([]), r = null;
602
602
  function i(i, a) {
603
603
  if (r) {
604
604
  let e = r;
@@ -612,7 +612,7 @@ function Ur() {
612
612
  let a = r;
613
613
  r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
614
614
  }
615
- return y() && m(() => {
615
+ return C() && v(() => {
616
616
  if (r) {
617
617
  let e = r;
618
618
  r = null, e(null);
@@ -632,31 +632,31 @@ function Wr(e) {
632
632
  }
633
633
  var Gr = !1;
634
634
  function Kr(e) {
635
- let t = z([]), n = z(0), r = z(-1), i = o(e.content, () => {
635
+ let t = V([]), n = V(0), r = V(-1), i = u(e.content, () => {
636
636
  n.value++;
637
- }, { deep: !0 }), a = z(!1), s = z(!1), c = F(null), l = Wr(e.options), u = null, d = !1;
638
- l || f();
637
+ }, { deep: !0 }), a = V(!1), o = V(!1), s = R(null), c = Wr(e.options), l = null, d = !1;
638
+ c || f();
639
639
  async function f() {
640
640
  try {
641
641
  let t = await import("./src-C9JWWxAk.js");
642
642
  if (d) return;
643
- c.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u = Qn(n, p, { debounce: e.debounce ?? 500 });
643
+ s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l = ae(n, p, { debounce: e.debounce ?? 500 });
644
644
  } catch {
645
645
  if (d) return;
646
- s.value = !0, Gr || (Gr = !0, $.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
646
+ o.value = !0, Gr || (Gr = !0, $.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
647
647
  }
648
648
  }
649
649
  function p() {
650
- if (!c.value) return;
651
- let i = c.value.lintTemplate(e.content.value, {
650
+ if (!s.value) return;
651
+ let i = s.value.lintTemplate(e.content.value, {
652
652
  ...e.options,
653
653
  ...e.customBlocks === void 0 ? {} : { customBlocks: e.customBlocks },
654
654
  ...e.mergeTagSyntax === void 0 ? {} : { mergeTagSyntax: e.mergeTagSyntax }
655
655
  });
656
656
  r.value = n.value, t.value = i;
657
657
  }
658
- let m = o(() => e.options, () => {
659
- c.value && p();
658
+ let m = u(() => e.options, () => {
659
+ s.value && p();
660
660
  }, { deep: !0 });
661
661
  function h(t) {
662
662
  t.fix && t.fix.apply({
@@ -669,21 +669,21 @@ function Kr(e) {
669
669
  });
670
670
  }
671
671
  function g() {
672
- d = !0, u?.(), i(), m();
672
+ d = !0, l?.(), i(), m();
673
673
  }
674
674
  return {
675
675
  issues: t,
676
676
  contentVersion: n,
677
677
  lintVersion: r,
678
678
  ready: a,
679
- unavailable: s,
679
+ unavailable: o,
680
680
  applyFix: h,
681
681
  destroy: g
682
682
  };
683
683
  }
684
684
  // src/composables/useKeyboardReorder.ts
685
685
  function qr(e, t, n = []) {
686
- let r = z(null), i = z(""), a = null;
686
+ let r = V(null), i = V(""), a = null;
687
687
  function o(t) {
688
688
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
689
689
  if (r !== -1) return {
@@ -709,7 +709,7 @@ function qr(e, t, n = []) {
709
709
  let i = o(r);
710
710
  if (!i) return "";
711
711
  let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
712
- return a ? bt(a, t.t, n) : "";
712
+ return a ? zn(a, t.t, n) : "";
713
713
  }
714
714
  function c(t, n) {
715
715
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
@@ -778,12 +778,12 @@ function qr(e, t, n = []) {
778
778
  }
779
779
  // src/composables/useUiTheme.ts
780
780
  function Jr(e) {
781
- let t = er("(prefers-color-scheme: dark)");
782
- return { resolvedTheme: N(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
781
+ let n = t("(prefers-color-scheme: dark)");
782
+ return { resolvedTheme: I(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
783
783
  }
784
784
  // src/composables/useCustomBlockStylesheets.ts
785
785
  function Yr(e, t) {
786
- return N(() => {
786
+ return I(() => {
787
787
  let n = Xr(e.value.blocks);
788
788
  if (n.size === 0) return [];
789
789
  let r = /* @__PURE__ */ new Set(), i = [];
@@ -801,66 +801,66 @@ function Xr(e) {
801
801
  return Zr(e, t), t;
802
802
  }
803
803
  function Zr(e, t) {
804
- for (let n of e) if (Xe(n)) t.add(n.customType);
804
+ for (let n of e) if (ot(n)) t.add(n.customType);
805
805
  else if (n.type === "section") {
806
806
  let e = n.children;
807
807
  if (!e) continue;
808
808
  for (let n of e) Zr(n, t);
809
- } else Me(n) && Zr(n.children, t);
809
+ } else He(n) && Zr(n.children, t);
810
810
  }
811
811
  // src/utils/registerBuiltInBlocks.ts
812
812
  var Qr = [
813
813
  {
814
814
  type: "section",
815
- createBlock: oe
815
+ createBlock: he
816
816
  },
817
817
  {
818
818
  type: "title",
819
- createBlock: ae
819
+ createBlock: Q
820
820
  },
821
821
  {
822
822
  type: "paragraph",
823
- createBlock: ee
823
+ createBlock: X
824
824
  },
825
825
  {
826
826
  type: "image",
827
- createBlock: fe
827
+ createBlock: Se
828
828
  },
829
829
  {
830
830
  type: "button",
831
- createBlock: be
831
+ createBlock: Ae
832
832
  },
833
833
  {
834
834
  type: "divider",
835
- createBlock: G
835
+ createBlock: J
836
836
  },
837
837
  {
838
838
  type: "video",
839
- createBlock: se
839
+ createBlock: ge
840
840
  },
841
841
  {
842
842
  type: "social",
843
- createBlock: U
843
+ createBlock: se
844
844
  },
845
845
  {
846
846
  type: "menu",
847
- createBlock: q
847
+ createBlock: ce
848
848
  },
849
849
  {
850
850
  type: "table",
851
- createBlock: X
851
+ createBlock: me
852
852
  },
853
853
  {
854
854
  type: "spacer",
855
- createBlock: je
855
+ createBlock: Ve
856
856
  },
857
857
  {
858
858
  type: "html",
859
- createBlock: Ze
859
+ createBlock: st
860
860
  },
861
861
  {
862
862
  type: "countdown",
863
- createBlock: Qe
863
+ createBlock: ct
864
864
  }
865
865
  ];
866
866
  function $r(e, t) {
@@ -881,10 +881,10 @@ function ti(e) {
881
881
  return typeof e == "object" && !!e && !Array.isArray(e);
882
882
  }
883
883
  function ni(e, t, n) {
884
- let r = new Set(e.map((e) => ar(e))), i = [], a = (e, t) => {
885
- for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(ar(o)) && i.push(`${t}.${n}: ${o}`) : ti(o) && a(o, `${t}.${n}`);
884
+ let r = new Set(e.map((e) => ft(e))), i = [], a = (e, t) => {
885
+ for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(ft(o)) && i.push(`${t}.${n}: ${o}`) : ti(o) && a(o, `${t}.${n}`);
886
886
  }, o = t;
887
- for (let [e, t] of Object.entries(ze)) {
887
+ for (let [e, t] of Object.entries(Ye)) {
888
888
  let n = o?.[e];
889
889
  a({
890
890
  ...t,
@@ -892,7 +892,7 @@ function ni(e, t, n) {
892
892
  }, e);
893
893
  }
894
894
  return a({
895
- ...Fe,
895
+ ...Ge,
896
896
  ...n ?? {}
897
897
  }, "template"), i;
898
898
  }
@@ -1049,7 +1049,7 @@ function Ci(e) {
1049
1049
  // src/utils/collectColorFieldIssues.ts
1050
1050
  function wi(e, t) {
1051
1051
  let n = [], r = (r, i) => {
1052
- let a = _t(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1052
+ let a = In(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1053
1053
  if (a.invalidPresets.length > 0 && n.push({
1054
1054
  id: s("invalid-presets"),
1055
1055
  message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
@@ -1060,8 +1060,8 @@ function wi(e, t) {
1060
1060
  id: s("allow-custom-ignored"),
1061
1061
  message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
1062
1062
  }), !a.allowCustom && a.presets.length > 0) {
1063
- let e = r.default ?? "", t = new Set(a.presets.map((e) => ar(e)));
1064
- e !== "" && !t.has(ar(e)) && n.push({
1063
+ let e = r.default ?? "", t = new Set(a.presets.map((e) => ft(e)));
1064
+ e !== "" && !t.has(ft(e)) && n.push({
1065
1065
  id: s("off-palette-default"),
1066
1066
  message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
1067
1067
  });
@@ -1120,9 +1120,9 @@ function Oi(e, t, n) {
1120
1120
  var ki = "--tpl-block-bg-layer", Ai = "--tpl-email-frame-width", ji = "tpl-has-bg-image";
1121
1121
  function Mi(e, t) {
1122
1122
  if (t === null) return {};
1123
- let n = De(e);
1123
+ let n = Le(e);
1124
1124
  if (n === null) return {};
1125
- let r = t?.trim(), i = r ? Pe(r) : n.url;
1125
+ let r = t?.trim(), i = r ? We(r) : n.url;
1126
1126
  return {
1127
1127
  backgroundImage: `url("${i}")`,
1128
1128
  backgroundSize: n.size,
@@ -1158,10 +1158,10 @@ function Li(e, t = {}) {
1158
1158
  padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
1159
1159
  backgroundColor: r || "transparent"
1160
1160
  };
1161
- if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? tt.paragraphGap : tt.paragraphGap}px`), e.type === "section") {
1162
- let n = K(e.borderRadius);
1161
+ if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? dt.paragraphGap : dt.paragraphGap}px`), e.type === "section") {
1162
+ let n = Y(e.borderRadius);
1163
1163
  n !== null && (i.borderRadius = n);
1164
- let r = Je(e);
1164
+ let r = it(e);
1165
1165
  r?.applied && e.backgroundImage ? (Object.assign(i, Fi(r, t.heroBoxWidth)), Object.assign(i, Mi({
1166
1166
  ...e.backgroundImage,
1167
1167
  size: "cover",
@@ -1172,13 +1172,13 @@ function Li(e, t = {}) {
1172
1172
  }
1173
1173
  function Ri(e, t, n, r) {
1174
1174
  return e.type === "section" ? Li(e, {
1175
- backgroundImageUrl: rt(t, e.backgroundImage, n),
1175
+ backgroundImageUrl: Sn(t, e.backgroundImage, n),
1176
1176
  heroBoxWidth: r
1177
1177
  }) : Li(e);
1178
1178
  }
1179
1179
  function zi(e) {
1180
1180
  let t = {};
1181
- for (let [n, r] of Object.entries(de(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
1181
+ for (let [n, r] of Object.entries(xe(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
1182
1182
  return t;
1183
1183
  }
1184
1184
  var Bi = {
@@ -1203,7 +1203,7 @@ function Ui(e, t = {}) {
1203
1203
  if (e.type !== "section" || !e.wrapper) return null;
1204
1204
  let n = e.wrapper, r = {};
1205
1205
  if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = Vi(n.padding)), !n.fullWidth) {
1206
- let e = K(n.borderRadius);
1206
+ let e = Y(n.borderRadius);
1207
1207
  e !== null && (r.borderRadius = e);
1208
1208
  }
1209
1209
  return Object.assign(r, Mi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, Bi), r;
@@ -1217,24 +1217,24 @@ function Wi(e, t = {}) {
1217
1217
  function Gi(e, t, n, r = !1) {
1218
1218
  if (!e) return [];
1219
1219
  let i = [], a = 0;
1220
- for (let o of Ie(e, n)) {
1220
+ for (let o of Ke(e, n)) {
1221
1221
  o.index > a && i.push({
1222
1222
  type: "text",
1223
1223
  value: e.slice(a, o.index)
1224
1224
  });
1225
1225
  let s = o.value;
1226
- if (ce(s, n)) {
1227
- let e = r ? Be(s, t) : void 0;
1226
+ if (_e(s, n)) {
1227
+ let e = r ? Xe(s, t) : void 0;
1228
1228
  i.push(e === void 0 ? {
1229
1229
  type: "tag",
1230
- value: re(s, t)
1230
+ value: Z(s, t)
1231
1231
  } : {
1232
1232
  type: "text",
1233
1233
  value: e
1234
1234
  });
1235
- } else ge(s, n) ? i.push({
1235
+ } else Ee(s, n) ? i.push({
1236
1236
  type: "tag",
1237
- value: J(s, n)
1237
+ value: le(s, n)
1238
1238
  }) : i.push({
1239
1239
  type: "text",
1240
1240
  value: s
@@ -1247,31 +1247,31 @@ function Gi(e, t, n, r = !1) {
1247
1247
  }), i;
1248
1248
  }
1249
1249
  // src/components/MergeTagPreviewText.vue
1250
- var Ki = n({
1250
+ var Ki = o({
1251
1251
  name: "MergeTagPreviewText",
1252
1252
  props: { text: {
1253
1253
  type: String,
1254
1254
  required: !0
1255
1255
  } },
1256
1256
  setup(e) {
1257
- let t = f(rn, ln), n = f(Wt, te.liquid), i = f(kn, null), a = N(() => Gi(e.text, t.value, n, i?.value ?? !1));
1258
- return () => a.value.map((e, t) => e.type === "tag" ? r("span", {
1257
+ let t = g(Pt, zt), n = g(xt, ue.liquid), r = g(on, null), i = I(() => Gi(e.text, t.value, n, r?.value ?? !1));
1258
+ return () => i.value.map((e, t) => e.type === "tag" ? s("span", {
1259
1259
  key: t,
1260
1260
  class: "tpl-merge-tag-label"
1261
1261
  }, e.value) : e.value);
1262
1262
  }
1263
- }), qi = ["href"], Ji = /* @__PURE__ */ n({
1263
+ }), qi = ["href"], Ji = /* @__PURE__ */ o({
1264
1264
  __name: "ButtonBlock",
1265
1265
  props: {
1266
1266
  block: {},
1267
1267
  viewport: {}
1268
1268
  },
1269
1269
  setup(e) {
1270
- let t = e, n = Fn(gn, "ButtonBlock");
1270
+ let t = e, n = fn(Kt, "ButtonBlock");
1271
1271
  function r(e) {
1272
1272
  return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
1273
1273
  }
1274
- let a = N(() => {
1274
+ let i = I(() => {
1275
1275
  let e = {
1276
1276
  display: "inline-block",
1277
1277
  padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
@@ -1280,46 +1280,46 @@ var Ki = n({
1280
1280
  fontSize: `${t.block.fontSize}px`,
1281
1281
  fontWeight: r(t.block.fontWeight),
1282
1282
  textDecoration: "none",
1283
- borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : K(t.block.borderRadius) ?? "0px",
1283
+ borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : Y(t.block.borderRadius) ?? "0px",
1284
1284
  textAlign: "center"
1285
1285
  };
1286
1286
  return Object.assign(e, zi(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
1287
- }), o = N(() => ({ textAlign: t.block.align ?? "center" }));
1288
- return (t, n) => (i(), b("div", { style: P(o.value) }, [A("a", {
1287
+ }), a = I(() => ({ textAlign: t.block.align ?? "center" }));
1288
+ return (t, n) => (c(), w("div", { style: L(a.value) }, [N("a", {
1289
1289
  href: e.block.url || "#",
1290
- style: P(a.value),
1290
+ style: L(i.value),
1291
1291
  class: "tpl:cursor-default",
1292
- onClick: n[0] ||= k(() => {}, ["prevent"])
1293
- }, [V(Ki, { text: e.block.text }, null, 8, ["text"])], 12, qi)], 4));
1292
+ onClick: n[0] ||= M(() => {}, ["prevent"])
1293
+ }, [U(Ki, { text: e.block.text }, null, 8, ["text"])], 12, qi)], 4));
1294
1294
  }
1295
1295
  }), Yi = ["innerHTML"], Xi = [
1296
1296
  "src",
1297
1297
  "width",
1298
1298
  "height"
1299
- ], Zi = /* @__PURE__ */ n({
1299
+ ], Zi = /* @__PURE__ */ o({
1300
1300
  __name: "CustomBlockIcon",
1301
1301
  props: {
1302
1302
  icon: {},
1303
1303
  size: {}
1304
1304
  },
1305
1305
  setup(e) {
1306
- let t = e, n = N(() => t.size ?? 20), r = N(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), a = N(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), o = N(() => r.value ? mr(t.icon ?? "") : "");
1307
- return (t, s) => r.value ? (i(), b("span", {
1306
+ let t = e, n = I(() => t.size ?? 20), r = I(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = I(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = I(() => r.value ? Un(t.icon ?? "") : "");
1307
+ return (t, o) => r.value ? (c(), w("span", {
1308
1308
  key: 0,
1309
1309
  class: "tpl:inline-flex tpl:items-center tpl:justify-center",
1310
- style: P({
1310
+ style: L({
1311
1311
  width: `${n.value}px`,
1312
1312
  height: `${n.value}px`
1313
1313
  }),
1314
- innerHTML: o.value
1315
- }, null, 12, Yi)) : a.value ? (i(), b("img", {
1314
+ innerHTML: a.value
1315
+ }, null, 12, Yi)) : i.value ? (c(), w("img", {
1316
1316
  key: 1,
1317
1317
  src: e.icon,
1318
1318
  width: n.value,
1319
1319
  height: n.value,
1320
1320
  class: "tpl:inline-block",
1321
1321
  alt: ""
1322
- }, null, 8, Xi)) : (i(), D(C(kt), {
1322
+ }, null, 8, Xi)) : (c(), A(D(Zn), {
1323
1323
  key: 2,
1324
1324
  size: n.value,
1325
1325
  "stroke-width": 1.5
@@ -1338,7 +1338,7 @@ var Ki = n({
1338
1338
  key: 0,
1339
1339
  class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
1340
1340
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
1341
- }, oa = /* @__PURE__ */ n({
1341
+ }, oa = /* @__PURE__ */ o({
1342
1342
  __name: "CustomBlock",
1343
1343
  props: {
1344
1344
  block: {},
@@ -1346,77 +1346,77 @@ var Ki = n({
1346
1346
  },
1347
1347
  emits: ["fetchData"],
1348
1348
  setup(e, { emit: t }) {
1349
- let n = e, r = t, { t: a } = Q(), s = f(En, null), c = z(""), l = N(() => hr(c.value)), u = z(!1), p = N(() => s?.getDefinition(n.block.customType)), m = N(() => !!p.value), h = N(() => n.block), { isFetching: g, fetch: _, needsFetch: v, hasDataSource: y } = it({
1350
- definition: p,
1351
- block: h,
1349
+ let n = e, r = t, { t: i } = W(), a = g(nn, null), o = V(""), s = I(() => Wn(o.value)), l = V(!1), d = I(() => a?.getDefinition(n.block.customType)), f = I(() => !!d.value), p = I(() => n.block), { isFetching: m, fetch: _, needsFetch: v, hasDataSource: y } = Cn({
1350
+ definition: d,
1351
+ block: p,
1352
1352
  onUpdate: (e, t) => {
1353
1353
  r("fetchData", {
1354
1354
  fieldValues: e,
1355
1355
  dataSourceFetched: t
1356
1356
  });
1357
1357
  }
1358
- }), S = f(rn, ln), w = f(kn, null), T = N(() => {
1359
- if (!w?.value) return n.block;
1358
+ }), b = g(Pt, zt), x = g(on, null), S = I(() => {
1359
+ if (!x?.value) return n.block;
1360
1360
  let e = {};
1361
- for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? ye(r, S.value) : r;
1361
+ for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? ke(r, b.value) : r;
1362
1362
  return {
1363
1363
  ...n.block,
1364
1364
  fieldValues: e
1365
1365
  };
1366
1366
  });
1367
- async function O() {
1368
- if (s) {
1369
- u.value = !1;
1367
+ async function C() {
1368
+ if (a) {
1369
+ l.value = !1;
1370
1370
  try {
1371
- let e = await s.renderCustomBlock(T.value);
1372
- e.includes("Template render error:") && (u.value = !0), c.value = e;
1371
+ let e = await a.renderCustomBlock(S.value);
1372
+ e.includes("Template render error:") && (l.value = !0), o.value = e;
1373
1373
  } catch {
1374
- u.value = !0, c.value = "";
1374
+ l.value = !0, o.value = "";
1375
1375
  }
1376
1376
  }
1377
1377
  }
1378
- let M = Xn(O, 150);
1379
- return d(() => {
1380
- O();
1381
- }), o(() => n.block.fieldValues, () => {
1382
- M();
1383
- }, { deep: !0 }), o(() => w?.value, () => {
1384
- M();
1385
- }), (e, t) => (i(), b("div", Qi, [m.value ? u.value ? (i(), b("div", ta, [V(C(Pt), {
1378
+ let E = K(C, 150);
1379
+ return h(() => {
1380
+ C();
1381
+ }), u(() => n.block.fieldValues, () => {
1382
+ E();
1383
+ }, { deep: !0 }), u(() => x?.value, () => {
1384
+ E();
1385
+ }), (e, t) => (c(), w("div", Qi, [f.value ? l.value ? (c(), w("div", ta, [U(D(nr), {
1386
1386
  size: 24,
1387
1387
  class: "tpl:text-[var(--tpl-danger)]"
1388
- }), A("span", na, j(C(a).customBlocks.renderError), 1)])) : (i(), b("div", ra, [A("div", { innerHTML: l.value }, null, 8, ia), C(y) && C(v) ? (i(), b("div", aa, [C(g) ? (i(), D(gr, {
1388
+ }), N("span", na, P(D(i).customBlocks.renderError), 1)])) : (c(), w("div", ra, [N("div", { innerHTML: s.value }, null, 8, ia), D(y) && D(v) ? (c(), w("div", aa, [D(m) ? (c(), A(ur, {
1389
1389
  key: 1,
1390
1390
  class: "tpl:w-48"
1391
- })) : (i(), b("button", {
1391
+ })) : (c(), w("button", {
1392
1392
  key: 0,
1393
1393
  type: "button",
1394
1394
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
1395
- onClick: t[0] ||= k((...e) => C(_) && C(_)(...e), ["stop"])
1396
- }, [p.value?.icon ? (i(), D(Zi, {
1395
+ onClick: t[0] ||= M((...e) => D(_) && D(_)(...e), ["stop"])
1396
+ }, [d.value?.icon ? (c(), A(Zi, {
1397
1397
  key: 0,
1398
- icon: p.value.icon,
1398
+ icon: d.value.icon,
1399
1399
  size: 16
1400
- }, null, 8, ["icon"])) : E("", !0), x(" " + j(p.value?.dataSource?.label || C(a).customBlocks.dataSource.fetchButton), 1)]))])) : E("", !0)])) : (i(), b("div", $i, [V(C(At), {
1400
+ }, null, 8, ["icon"])) : k("", !0), T(" " + P(d.value?.dataSource?.label || D(i).customBlocks.dataSource.fetchButton), 1)]))])) : k("", !0)])) : (c(), w("div", $i, [U(D(Qn), {
1401
1401
  size: 24,
1402
1402
  class: "tpl:text-[var(--tpl-warning)]"
1403
- }), A("span", ea, j(C(a).customBlocks.definitionNotFound), 1)]))]));
1403
+ }), N("span", ea, P(D(i).customBlocks.definitionNotFound), 1)]))]));
1404
1404
  }
1405
- }), sa = { class: "tpl:w-full" }, ca = /* @__PURE__ */ n({
1405
+ }), sa = { class: "tpl:w-full" }, ca = /* @__PURE__ */ o({
1406
1406
  __name: "DividerBlock",
1407
1407
  props: {
1408
1408
  block: {},
1409
1409
  viewport: {}
1410
1410
  },
1411
1411
  setup(e) {
1412
- let t = e, n = N(() => ({
1412
+ let t = e, n = I(() => ({
1413
1413
  borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
1414
1414
  width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
1415
1415
  margin: t.block.width === "full" ? "0" : "0 auto"
1416
1416
  }));
1417
- return (e, t) => (i(), b("div", sa, [A("hr", {
1417
+ return (e, t) => (c(), w("div", sa, [N("hr", {
1418
1418
  class: "tpl:m-0 tpl:border-none",
1419
- style: P(n.value)
1419
+ style: L(n.value)
1420
1420
  }, null, 4)]));
1421
1421
  }
1422
1422
  }), la = { class: "tpl:w-full" }, ua = ["srcdoc", "title"], da = {
@@ -1428,41 +1428,41 @@ var Ki = n({
1428
1428
  }, pa = {
1429
1429
  key: 1,
1430
1430
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
1431
- }, ma = /* @__PURE__ */ n({
1431
+ }, ma = /* @__PURE__ */ o({
1432
1432
  __name: "HtmlBlock",
1433
1433
  props: {
1434
1434
  block: {},
1435
1435
  viewport: {}
1436
1436
  },
1437
1437
  setup(e) {
1438
- let t = e, { t: n } = Q(), r = f(on, !1), a = N(() => t.block.content.trim().length > 0), s = N(() => r && a.value), c = f(rn, ln), l = f(kn, null), d = N(() => l?.value ? ye(t.block.content, c.value) : t.block.content), p = z(null), m = z(60), h = null;
1439
- function g() {
1440
- let e = p.value?.contentDocument;
1441
- e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
1438
+ let t = e, { t: n } = W(), r = g(It, !1), i = I(() => t.block.content.trim().length > 0), a = I(() => r && i.value), o = g(Pt, zt), s = g(on, null), l = I(() => s?.value ? ke(t.block.content, o.value) : t.block.content), d = V(null), f = V(60), p = null;
1439
+ function h() {
1440
+ let e = d.value?.contentDocument;
1441
+ e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
1442
1442
  }
1443
1443
  function _() {
1444
- h?.disconnect(), h = null, g();
1445
- let e = p.value?.contentDocument?.documentElement;
1446
- e && typeof ResizeObserver < "u" && (h = new ResizeObserver(() => g()), h.observe(e));
1447
- }
1448
- return o(s, (e) => {
1449
- e || (h?.disconnect(), h = null);
1450
- }), u(() => {
1451
- h?.disconnect(), h = null;
1452
- }), (e, t) => (i(), b("div", la, [s.value ? (i(), b("iframe", {
1444
+ p?.disconnect(), p = null, h();
1445
+ let e = d.value?.contentDocument?.documentElement;
1446
+ e && typeof ResizeObserver < "u" && (p = new ResizeObserver(() => h()), p.observe(e));
1447
+ }
1448
+ return u(a, (e) => {
1449
+ e || (p?.disconnect(), p = null);
1450
+ }), m(() => {
1451
+ p?.disconnect(), p = null;
1452
+ }), (e, t) => (c(), w("div", la, [a.value ? (c(), w("iframe", {
1453
1453
  key: 0,
1454
1454
  ref_key: "iframeRef",
1455
- ref: p,
1456
- srcdoc: d.value,
1455
+ ref: d,
1456
+ srcdoc: l.value,
1457
1457
  sandbox: "allow-same-origin",
1458
- title: C(n).html.preview,
1458
+ title: D(n).html.preview,
1459
1459
  class: "tpl:block tpl:w-full tpl:border-0",
1460
- style: P({ height: `${m.value}px` }),
1460
+ style: L({ height: `${f.value}px` }),
1461
1461
  onLoad: _
1462
- }, null, 44, ua)) : (i(), b("div", da, [V(C(Tt), {
1462
+ }, null, 44, ua)) : (c(), w("div", da, [U(D(qn), {
1463
1463
  size: 24,
1464
1464
  class: "tpl:text-[var(--tpl-text-dim)]"
1465
- }), a.value ? (i(), b("span", fa, j(C(n).html.preview), 1)) : (i(), b("span", pa, j(C(n).html.empty), 1))]))]));
1465
+ }), i.value ? (c(), w("span", fa, P(D(n).html.preview), 1)) : (c(), w("span", pa, P(D(n).html.empty), 1))]))]));
1466
1466
  }
1467
1467
  }), ha = ["data-drop-enabled"], ga = ["href"], _a = ["src", "alt"], va = ["src", "alt"], ya = {
1468
1468
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
@@ -1470,7 +1470,7 @@ var Ki = n({
1470
1470
  }, ba = ["href"], xa = ["src", "alt"], Sa = ["src", "alt"], Ca = {
1471
1471
  key: 4,
1472
1472
  class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
1473
- }, wa = ["aria-label"], Ta = { key: 1 }, Ea = /* @__PURE__ */ n({
1473
+ }, wa = ["aria-label"], Ta = { key: 1 }, Ea = /* @__PURE__ */ o({
1474
1474
  __name: "ImageBlock",
1475
1475
  props: {
1476
1476
  block: {},
@@ -1478,111 +1478,111 @@ var Ki = n({
1478
1478
  },
1479
1479
  emits: ["update"],
1480
1480
  setup(e, { emit: t }) {
1481
- let n = e, r = t, { t: a } = Q(), { syntax: o } = ir(), s = N(() => pe(n.block.src, o));
1482
- function c(e) {
1481
+ let n = e, r = t, { t: i } = W(), { syntax: a } = G(), o = I(() => Ce(n.block.src, a));
1482
+ function s(e) {
1483
1483
  let t = {
1484
1484
  src: e.url,
1485
- ...ft(lt(e.width, e.height))
1485
+ ...jn(On(e.width, e.height))
1486
1486
  };
1487
1487
  e.alt && (t.alt = e.alt), r("update", t);
1488
1488
  }
1489
- let l = z(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } = gt({
1489
+ let l = V(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } = Fn({
1490
1490
  target: l,
1491
- blocked: s,
1492
- apply: c
1493
- }), h = N(() => ({ textAlign: n.block.align })), g = N(() => {
1494
- let e = n.block.border, t = ["left", "right"].map((t) => $e(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
1491
+ blocked: o,
1492
+ apply: s
1493
+ }), h = I(() => ({ textAlign: n.block.align })), g = I(() => {
1494
+ let e = n.block.border, t = ["left", "right"].map((t) => lt(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
1495
1495
  return t > 0 ? `calc(100% - ${t}px)` : "100%";
1496
- }), _ = N(() => {
1496
+ }), _ = I(() => {
1497
1497
  let e = n.block.align;
1498
1498
  return {
1499
1499
  maxWidth: "100%",
1500
1500
  width: n.block.width === "full" ? g.value : `${n.block.width}px`,
1501
1501
  height: n.block.height ? `${n.block.height}px` : void 0,
1502
- borderRadius: K(n.block.borderRadius) ?? void 0,
1502
+ borderRadius: Y(n.block.borderRadius) ?? void 0,
1503
1503
  ...zi(n.block.border),
1504
1504
  display: "block",
1505
1505
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
1506
1506
  marginRight: e === "center" ? "auto" : void 0
1507
1507
  };
1508
- }), v = ct(() => s.value ? void 0 : n.block.src), y = ct(() => s.value ? n.block.placeholderUrl : void 0);
1509
- return (t, n) => (i(), b("div", {
1508
+ }), v = Dn(() => o.value ? void 0 : n.block.src), y = Dn(() => o.value ? n.block.placeholderUrl : void 0);
1509
+ return (t, n) => (c(), w("div", {
1510
1510
  ref_key: "dropZoneRef",
1511
1511
  ref: l,
1512
1512
  "data-testid": "image-drop-zone",
1513
- "data-drop-enabled": C(d),
1513
+ "data-drop-enabled": D(d),
1514
1514
  class: "tpl:relative tpl:w-full",
1515
- style: P(h.value)
1516
- }, [C(p) ? (i(), D(dt, {
1515
+ style: L(h.value)
1516
+ }, [D(p) ? (c(), A(An, {
1517
1517
  key: 0,
1518
- uploading: C(f),
1518
+ uploading: D(f),
1519
1519
  size: "canvas"
1520
- }, null, 8, ["uploading"])) : E("", !0), e.block.src && s.value && e.block.placeholderUrl ? (i(), b(B, { key: 1 }, [e.block.linkUrl ? (i(), b("a", {
1520
+ }, null, 8, ["uploading"])) : k("", !0), e.block.src && o.value && e.block.placeholderUrl ? (c(), w(H, { key: 1 }, [e.block.linkUrl ? (c(), w("a", {
1521
1521
  key: 0,
1522
1522
  href: e.block.linkUrl,
1523
1523
  target: "_blank",
1524
1524
  rel: "noopener noreferrer",
1525
- onClick: n[0] ||= k(() => {}, ["prevent"])
1526
- }, [A("img", {
1525
+ onClick: n[0] ||= M(() => {}, ["prevent"])
1526
+ }, [N("img", {
1527
1527
  class: "tpl:border-0",
1528
1528
  loading: "lazy",
1529
- src: C(y),
1530
- alt: e.block.alt || C(a).image.altTextPlaceholder,
1531
- style: P(_.value)
1532
- }, null, 12, _a)], 8, ga)) : (i(), b("img", {
1529
+ src: D(y),
1530
+ alt: e.block.alt || D(i).image.altTextPlaceholder,
1531
+ style: L(_.value)
1532
+ }, null, 12, _a)], 8, ga)) : (c(), w("img", {
1533
1533
  key: 1,
1534
1534
  class: "tpl:border-0",
1535
- src: C(y),
1535
+ src: D(y),
1536
1536
  alt: e.block.alt,
1537
- style: P(_.value)
1538
- }, null, 12, va))], 64)) : e.block.src && s.value ? (i(), b("div", {
1537
+ style: L(_.value)
1538
+ }, null, 12, va))], 64)) : e.block.src && o.value ? (c(), w("div", {
1539
1539
  key: 2,
1540
1540
  class: "tpl:!flex tpl:box-border tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
1541
- style: P([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
1542
- }, [V(C(Nt), {
1541
+ style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
1542
+ }, [U(D(tr), {
1543
1543
  size: 32,
1544
1544
  "stroke-width": 1.5,
1545
1545
  class: "tpl:text-[var(--tpl-primary)]",
1546
1546
  style: { opacity: "0.5" }
1547
- }), A("span", ya, [V(Ki, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (i(), b(B, { key: 3 }, [e.block.linkUrl ? (i(), b("a", {
1547
+ }), N("span", ya, [U(Ki, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (c(), w(H, { key: 3 }, [e.block.linkUrl ? (c(), w("a", {
1548
1548
  key: 0,
1549
1549
  href: e.block.linkUrl,
1550
1550
  target: "_blank",
1551
1551
  rel: "noopener noreferrer",
1552
- onClick: n[1] ||= k(() => {}, ["prevent"])
1553
- }, [A("img", {
1552
+ onClick: n[1] ||= M(() => {}, ["prevent"])
1553
+ }, [N("img", {
1554
1554
  class: "tpl:border-0",
1555
1555
  loading: "lazy",
1556
- src: C(v),
1557
- alt: e.block.alt || C(a).image.altTextPlaceholder,
1558
- style: P(_.value)
1559
- }, null, 12, xa)], 8, ba)) : (i(), b("img", {
1556
+ src: D(v),
1557
+ alt: e.block.alt || D(i).image.altTextPlaceholder,
1558
+ style: L(_.value)
1559
+ }, null, 12, xa)], 8, ba)) : (c(), w("img", {
1560
1560
  key: 1,
1561
1561
  class: "tpl:border-0",
1562
- src: C(v),
1562
+ src: D(v),
1563
1563
  alt: e.block.alt,
1564
- style: P(_.value)
1565
- }, null, 12, Sa))], 64)) : (i(), b("div", Ca, [C(u) ? (i(), b("button", {
1564
+ style: L(_.value)
1565
+ }, null, 12, Sa))], 64)) : (c(), w("div", Ca, [D(u) ? (c(), w("button", {
1566
1566
  key: 0,
1567
- "aria-label": C(a).image.browseMedia,
1567
+ "aria-label": D(i).image.browseMedia,
1568
1568
  class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
1569
- onClick: n[2] ||= k((...e) => C(m) && C(m)(...e), ["stop"])
1570
- }, [V(C(Nt), {
1569
+ onClick: n[2] ||= M((...e) => D(m) && D(m)(...e), ["stop"])
1570
+ }, [U(D(tr), {
1571
1571
  size: 14,
1572
1572
  "stroke-width": 1.5
1573
- }), x(" " + j(C(a).image.browseMedia), 1)], 8, wa)) : (i(), b("span", Ta, j(C(a).image.clickToAdd), 1))]))], 12, ha));
1573
+ }), T(" " + P(D(i).image.browseMedia), 1)], 8, wa)) : (c(), w("span", Ta, P(D(i).image.clickToAdd), 1))]))], 12, ha));
1574
1574
  }
1575
1575
  }), Da = { class: "tpl:w-full" }, Oa = ["href"], ka = {
1576
1576
  key: 1,
1577
1577
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
1578
- }, Aa = /* @__PURE__ */ n({
1578
+ }, Aa = /* @__PURE__ */ o({
1579
1579
  __name: "MenuBlock",
1580
1580
  props: {
1581
1581
  block: {},
1582
1582
  viewport: {}
1583
1583
  },
1584
1584
  setup(e) {
1585
- let t = e, { t: n } = Q(), r = Fn(gn, "MenuBlock"), a = N(() => ({
1585
+ let t = e, { t: n } = W(), r = fn(Kt, "MenuBlock"), i = I(() => ({
1586
1586
  display: "flex",
1587
1587
  flexWrap: "wrap",
1588
1588
  gap: `0 ${t.block.spacing}px`,
@@ -1590,79 +1590,79 @@ var Ki = n({
1590
1590
  fontSize: `${t.block.fontSize}px`,
1591
1591
  fontFamily: t.block.fontFamily ? r.resolveFontFamily(t.block.fontFamily) : "inherit",
1592
1592
  alignItems: "center"
1593
- })), o = N(() => t.block.items.length > 0);
1594
- function s(e) {
1593
+ })), a = I(() => t.block.items.length > 0);
1594
+ function o(e) {
1595
1595
  return e || t.block.linkColor || t.block.color;
1596
1596
  }
1597
- return (t, r) => (i(), b("div", Da, [o.value ? (i(), b("div", {
1597
+ return (t, r) => (c(), w("div", Da, [a.value ? (c(), w("div", {
1598
1598
  key: 0,
1599
- style: P(a.value)
1600
- }, [(i(!0), b(B, null, l(e.block.items, (t, n) => (i(), b(B, { key: t.id }, [A("a", {
1599
+ style: L(i.value)
1600
+ }, [(c(!0), w(H, null, p(e.block.items, (t, n) => (c(), w(H, { key: t.id }, [N("a", {
1601
1601
  href: t.url || "#",
1602
1602
  class: "tpl:cursor-default tpl:no-underline",
1603
- style: P({
1604
- color: s(t.color),
1603
+ style: L({
1604
+ color: o(t.color),
1605
1605
  fontWeight: t.bold ? "bold" : "normal",
1606
1606
  textDecoration: t.underline ? "underline" : "none"
1607
1607
  }),
1608
- onClick: r[0] ||= k(() => {}, ["prevent"])
1609
- }, [V(Ki, { text: t.text || "..." }, null, 8, ["text"])], 12, Oa), n < e.block.items.length - 1 ? (i(), b("span", {
1608
+ onClick: r[0] ||= M(() => {}, ["prevent"])
1609
+ }, [U(Ki, { text: t.text || "..." }, null, 8, ["text"])], 12, Oa), n < e.block.items.length - 1 ? (c(), w("span", {
1610
1610
  key: 0,
1611
- style: P({
1611
+ style: L({
1612
1612
  color: e.block.separatorColor,
1613
1613
  padding: `0 ${e.block.spacing}px`
1614
1614
  })
1615
- }, j(e.block.separator), 5)) : E("", !0)], 64))), 128))], 4)) : (i(), b("div", ka, [V(C(Mt), { size: 16 }), A("span", null, j(C(n).menu.addLinks), 1)]))]));
1615
+ }, P(e.block.separator), 5)) : k("", !0)], 64))), 128))], 4)) : (c(), w("div", ka, [U(D(er), { size: 16 }), N("span", null, P(D(n).menu.addLinks), 1)]))]));
1616
1616
  }
1617
1617
  });
1618
1618
  // src/composables/useEditableTextBlock.ts
1619
1619
  function ja(e) {
1620
- let t = f(rn, ln), n = f(kn, null), { syntax: r } = ir(), i = N(() => n?.value ? Ae(e(), t.value) : Ee(e(), t.value)), a = N(() => ve(hr(H(i.value, r)))), o = z(!1), s = z(null), { top: c, left: l } = tr(s), { toLocal: u } = ur(), d = N(() => u({
1621
- top: c.value - 8,
1622
- left: l.value
1620
+ let t = g(Pt, zt), r = g(on, null), { syntax: i } = G(), a = I(() => r?.value ? Be(e(), t.value) : Ie(e(), t.value)), o = I(() => Oe(Wn(oe(a.value, i)))), s = V(!1), c = V(null), { top: l, left: u } = n(c), { toLocal: d } = _t(), f = I(() => d({
1621
+ top: l.value - 8,
1622
+ left: u.value
1623
1623
  }));
1624
1624
  function p() {
1625
- o.value = !0;
1625
+ s.value = !0;
1626
1626
  }
1627
1627
  function m() {
1628
- o.value = !1;
1628
+ s.value = !1;
1629
1629
  }
1630
1630
  return {
1631
- isEditing: o,
1632
- blockRef: s,
1633
- toolbarPosition: d,
1634
- resolvedContent: a,
1631
+ isEditing: s,
1632
+ blockRef: c,
1633
+ toolbarPosition: f,
1634
+ resolvedContent: o,
1635
1635
  handleDoubleClick: p,
1636
1636
  handleEditorDone: m
1637
1637
  };
1638
1638
  }
1639
1639
  // src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
1640
- var Ma = ["innerHTML"], Na = /* @__PURE__ */ n({
1640
+ var Ma = ["innerHTML"], Na = /* @__PURE__ */ o({
1641
1641
  __name: "ParagraphBlock",
1642
1642
  props: {
1643
1643
  block: {},
1644
1644
  viewport: {}
1645
1645
  },
1646
1646
  setup(e) {
1647
- let t = e, n = g(() => import("./ParagraphEditor-I9lbKaPk.js").then((e) => e.t)), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = ja(() => t.block.content);
1648
- return (t, u) => (i(), b("div", {
1647
+ let t = e, n = b(() => import("./ParagraphEditor-Bx_Hlw8d.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = ja(() => t.block.content);
1648
+ return (t, u) => (c(), w("div", {
1649
1649
  ref_key: "blockRef",
1650
- ref: a,
1650
+ ref: i,
1651
1651
  class: "tpl:min-h-[1em] tpl:w-full",
1652
- onDblclick: u[0] ||= (...e) => C(c) && C(c)(...e)
1653
- }, [C(r) ? (i(), D(C(n), {
1652
+ onDblclick: u[0] ||= (...e) => D(s) && D(s)(...e)
1653
+ }, [D(r) ? (c(), A(D(n), {
1654
1654
  key: 0,
1655
1655
  block: e.block,
1656
- "toolbar-position": C(o),
1657
- onDone: C(l)
1656
+ "toolbar-position": D(a),
1657
+ onDone: D(l)
1658
1658
  }, null, 8, [
1659
1659
  "block",
1660
1660
  "toolbar-position",
1661
1661
  "onDone"
1662
- ])) : (i(), b("div", {
1662
+ ])) : (c(), w("div", {
1663
1663
  key: 1,
1664
1664
  class: "tpl-text-content tpl:outline-none",
1665
- innerHTML: C(s)
1665
+ innerHTML: D(o)
1666
1666
  }, null, 8, Ma))], 544));
1667
1667
  }
1668
1668
  });
@@ -1683,16 +1683,16 @@ function Pa(e, t, n, r = 0, i) {
1683
1683
  function Fa(e, t, n) {
1684
1684
  let r = [], i = "\0MT";
1685
1685
  for (; e.includes(i);) i += "_";
1686
- let a = n === "html" ? We(e, (e) => {
1686
+ let a = n === "html" ? et(e, (e) => {
1687
1687
  let t = r.push(e) - 1;
1688
1688
  return `${i}${t}\u0000`;
1689
1689
  }) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
1690
1690
  start: e.index,
1691
1691
  end: e.index + e[0].length
1692
- })), s = [], c = He(a, t, "logic"), l = [], u = 0;
1692
+ })), s = [], c = Qe(a, t, "logic"), l = [], u = 0;
1693
1693
  for (let e of ["logic", "value"]) {
1694
1694
  let r = 0;
1695
- for (let i of e === "logic" ? c : He(a, t, "value")) {
1695
+ for (let i of e === "logic" ? c : Qe(a, t, "value")) {
1696
1696
  let t = i.index, a = t + i.value.length;
1697
1697
  for (; o[r]?.end <= t;) r++;
1698
1698
  let c = o[r];
@@ -1708,7 +1708,7 @@ function Fa(e, t, n) {
1708
1708
  }), s.push({
1709
1709
  start: t,
1710
1710
  end: a,
1711
- value: n === "html" ? Ce(i.value) : i.value
1711
+ value: n === "html" ? Ne(i.value) : i.value
1712
1712
  });
1713
1713
  }
1714
1714
  }
@@ -1752,7 +1752,7 @@ var La = [
1752
1752
  }, Za = ["onClick"], Qa = {
1753
1753
  key: 7,
1754
1754
  class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
1755
- }, $a = ["data-testid", "disabled"], eo = /*#__PURE__*/ St(/* @__PURE__ */ n({
1755
+ }, $a = ["data-testid", "disabled"], eo = /*#__PURE__*/ gr(/* @__PURE__ */ o({
1756
1756
  __name: "LocaleStatusChip",
1757
1757
  props: {
1758
1758
  blockId: {},
@@ -1771,233 +1771,233 @@ var La = [
1771
1771
  editable: { type: Boolean }
1772
1772
  },
1773
1773
  emits: ["target"],
1774
- setup(e, { emit: n }) {
1775
- let r = e, a = n, s = f(Rn, null), c = f(Nn, null), u = f(Kt, null), d = f(Cn, "en") ?? "en", { t: m, format: h } = Q(), g = rr(), _ = cr(), { toLocal: v } = ur(), y = z(null), x = z(null), M = z(!1), F = z(!1), I = z(null), L = z(null), R = null, V = z({
1774
+ setup(e, { emit: t }) {
1775
+ let n = e, r = t, i = g(hn, null), o = g(un, null), s = g(Ct, null), l = g($t, "en") ?? "en", { t: d, format: f } = W(), m = ne(), h = ht(), { toLocal: v } = _t(), y = V(null), b = V(null), x = V(!1), S = V(!1), C = V(null), T = V(null), F = null, R = V({
1776
1776
  top: 0,
1777
1777
  left: 0
1778
- }), H = z({
1778
+ }), z = V({
1779
1779
  maxHeight: 0,
1780
1780
  maxWidth: 0
1781
- }), U = `tpl-locale-popover-${ne()}`, W = N(() => Gn(s?.activeLocale?.value ?? "")), G = N(() => Gn(s?.content.value.settings.locale ?? "en"));
1782
- function K(e, t) {
1781
+ }), B = `tpl-locale-popover-${de()}`, te = I(() => dr(i?.activeLocale?.value ?? "")), U = I(() => dr(i?.content.value.settings.locale ?? "en"));
1782
+ function G(e, t) {
1783
1783
  switch (e) {
1784
- case "tags-differ": return m.localization.tagsDiffer;
1785
- case "hidden": return h(m.localization.hidden, { language: W.value });
1786
- case "changed": return h(m.localization.changed, { language: W.value });
1787
- case "default-stale": return Wn(m.localization.staleLanguages, t, d);
1788
- case "missing": return t === 1 ? m.localization.notTranslated : Wn(m.localization.notTranslatedCount, t, d);
1789
- default: return t === 1 ? m.localization.outOfDate : Wn(m.localization.staleCount, t, d);
1784
+ case "tags-differ": return d.localization.tagsDiffer;
1785
+ case "hidden": return f(d.localization.hidden, { language: te.value });
1786
+ case "changed": return f(d.localization.changed, { language: te.value });
1787
+ case "default-stale": return fr(d.localization.staleLanguages, t, l);
1788
+ case "missing": return t === 1 ? d.localization.notTranslated : fr(d.localization.notTranslatedCount, t, l);
1789
+ default: return t === 1 ? d.localization.outOfDate : fr(d.localization.staleCount, t, l);
1790
1790
  }
1791
1791
  }
1792
- let ee = N(() => K(r.state, r.count)), q = N(() => r.popoverState ?? r.state), J = N(() => r.popoverCount ?? r.count), te = N(() => K(q.value, J.value)), re = N(() => r.state === "hidden" ? Dt : r.state === "changed" ? wt : r.state === "default-stale" ? Lt : r.state === "stale" ? Et : Pt), ie = N(() => q.value === "default-stale" || (q.value === "missing" || q.value === "stale") && J.value > 1), Y = N(() => r.editable && r.eligibleGaps && c?.isAvailable.value);
1793
- function X(e = !1) {
1794
- M.value = !1, F.value = !1, R = null, e && y.value?.focus({ preventScroll: !0 });
1792
+ let re = I(() => G(n.state, n.count)), K = I(() => n.popoverState ?? n.state), ie = I(() => n.popoverCount ?? n.count), ae = I(() => G(K.value, ie.value)), oe = I(() => n.state === "hidden" ? Yn : n.state === "changed" ? Kn : n.state === "default-stale" ? ar : n.state === "stale" ? Jn : nr), se = I(() => K.value === "default-stale" || (K.value === "missing" || K.value === "stale") && ie.value > 1), q = I(() => n.editable && n.eligibleGaps && o?.isAvailable.value);
1793
+ function J(e = !1) {
1794
+ x.value = !1, S.value = !1, F = null, e && y.value?.focus({ preventScroll: !0 });
1795
1795
  }
1796
- async function ae() {
1797
- if (M.value) return X();
1798
- _.value && (M.value = !0, await oe());
1796
+ async function Y() {
1797
+ if (x.value) return J();
1798
+ h.value && (x.value = !0, await X());
1799
1799
  }
1800
- async function oe() {
1801
- let e = _.value;
1802
- if (!e || !M.value) return;
1800
+ async function X() {
1801
+ let e = h.value;
1802
+ if (!e || !x.value) return;
1803
1803
  let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
1804
- H.value = {
1804
+ z.value = {
1805
1805
  maxHeight: u - c,
1806
1806
  maxWidth: d - l
1807
1807
  };
1808
1808
  let f = y.value.getBoundingClientRect();
1809
- if (R = f, V.value = v({
1809
+ if (F = f, R.value = v({
1810
1810
  top: c,
1811
1811
  left: l
1812
- }), await O(), !M.value || !x.value) return;
1813
- let p = x.value.getBoundingClientRect(), m = Math.min(p.height, H.value.maxHeight), h = Math.min(p.width, H.value.maxWidth), g = f.bottom + 4, b = g + m <= u ? g : f.top - m - 4;
1814
- V.value = v({
1815
- top: Math.max(c, Math.min(b, u - m)),
1816
- left: Math.max(l, Math.min(f.left, d - h))
1817
- }), await O(), M.value && (F.value ? L.value : x.value)?.focus({ preventScroll: !0 });
1818
- }
1819
- o(F, async () => {
1820
- M.value && (await oe(), M.value && !F.value && I.value?.focus({ preventScroll: !0 }));
1812
+ }), await j(), !x.value || !b.value) return;
1813
+ let p = b.value.getBoundingClientRect(), m = Math.min(p.height, z.value.maxHeight), g = Math.min(p.width, z.value.maxWidth), _ = f.bottom + 4, C = _ + m <= u ? _ : f.top - m - 4;
1814
+ R.value = v({
1815
+ top: Math.max(c, Math.min(C, u - m)),
1816
+ left: Math.max(l, Math.min(f.left, d - g))
1817
+ }), await j(), x.value && (S.value ? T.value : b.value)?.focus({ preventScroll: !0 });
1818
+ }
1819
+ u(S, async () => {
1820
+ x.value && (await X(), x.value && !S.value && C.value?.focus({ preventScroll: !0 }));
1821
1821
  });
1822
- function se(e) {
1822
+ function ce(e) {
1823
1823
  let t = e.composedPath();
1824
- !t.includes(y.value) && !t.includes(x.value) && X();
1824
+ !t.includes(y.value) && !t.includes(b.value) && J();
1825
1825
  }
1826
- function ce(e) {
1827
- if (e.composedPath().includes(x.value)) return;
1826
+ function le(e) {
1827
+ if (e.composedPath().includes(b.value)) return;
1828
1828
  let t = y.value?.getBoundingClientRect();
1829
- t && R && t.top === R.top && t.right === R.right || X();
1830
- }
1831
- function Z() {
1832
- g.removeEventListener("click", se, !0), g.removeEventListener("scroll", ce, !0);
1833
- }
1834
- o(M, (e) => {
1835
- Z(), e ? (g.addEventListener("click", se, !0), g.addEventListener("scroll", ce, !0)) : a("target", null);
1836
- }, { flush: "sync" }), o(q, () => {
1837
- F.value = !1, M.value && oe();
1838
- }), o([
1839
- () => r.blockId,
1840
- () => r.state,
1841
- () => s?.activeLocale?.value,
1842
- () => s?.state.template?.id,
1843
- () => s?.loadVersion?.value
1844
- ], () => X()), p(Z);
1845
- let le = (e) => {
1846
- (M.value || _.value) && (a("target", e ?? null), M.value || ae());
1829
+ t && F && t.top === F.top && t.right === F.right || J();
1830
+ }
1831
+ function ue() {
1832
+ m.removeEventListener("click", ce, !0), m.removeEventListener("scroll", le, !0);
1833
+ }
1834
+ u(x, (e) => {
1835
+ ue(), e ? (m.addEventListener("click", ce, !0), m.addEventListener("scroll", le, !0)) : r("target", null);
1836
+ }, { flush: "sync" }), u(K, () => {
1837
+ S.value = !1, x.value && X();
1838
+ }), u([
1839
+ () => n.blockId,
1840
+ () => n.state,
1841
+ () => i?.activeLocale?.value,
1842
+ () => i?.state.template?.id,
1843
+ () => i?.loadVersion?.value
1844
+ ], () => J()), _(ue);
1845
+ let Z = (e) => {
1846
+ (x.value || h.value) && (r("target", e ?? null), x.value || Y());
1847
1847
  };
1848
- o(() => r.blockId, (e, t) => {
1849
- t && u?.get(t) === le && u.delete(t), u?.set(e, le);
1850
- }, { immediate: !0 }), p(() => {
1851
- u?.get(r.blockId) === le && u.delete(r.blockId);
1848
+ u(() => n.blockId, (e, t) => {
1849
+ t && s?.get(t) === Z && s.delete(t), s?.set(e, Z);
1850
+ }, { immediate: !0 }), _(() => {
1851
+ s?.get(n.blockId) === Z && s.delete(n.blockId);
1852
1852
  });
1853
- function ue() {
1854
- s?.keepTranslations?.(r.blockId, r.stale), X(!0);
1855
- }
1856
- function de(e) {
1857
- s?.resetLocaleFields?.(r.blockId, e), X(!0);
1858
- }
1859
1853
  function fe() {
1860
- s?.setBlockHidden?.(r.blockId, !1), X(!0);
1854
+ i?.keepTranslations?.(n.blockId, n.stale), J(!0);
1861
1855
  }
1862
1856
  function pe(e) {
1863
- s?.setActiveLocale?.(e), X();
1857
+ i?.resetLocaleFields?.(n.blockId, e), J(!0);
1864
1858
  }
1865
1859
  function me() {
1866
- Y.value && !c?.running.value && (q.value === "tags-differ" && r.replacesCurrent ? F.value = !0 : c?.translate({
1867
- only: q.value === "tags-differ" ? "all" : "gaps",
1868
- blockId: r.blockId
1869
- }));
1860
+ i?.setBlockHidden?.(n.blockId, !1), J(!0);
1861
+ }
1862
+ function Q(e) {
1863
+ i?.setActiveLocale?.(e), J();
1870
1864
  }
1871
1865
  function he() {
1872
- F.value = !1;
1866
+ q.value && !o?.running.value && (K.value === "tags-differ" && n.replacesCurrent ? S.value = !0 : o?.translate({
1867
+ only: K.value === "tags-differ" ? "all" : "gaps",
1868
+ blockId: n.blockId
1869
+ }));
1873
1870
  }
1874
1871
  function ge() {
1875
- F.value ? he() : X(!0);
1872
+ S.value = !1;
1876
1873
  }
1877
1874
  function _e() {
1878
- Y.value && !c?.running.value && r.translationCount && (F.value = !1, c?.translate({
1875
+ S.value ? ge() : J(!0);
1876
+ }
1877
+ function ve() {
1878
+ q.value && !o?.running.value && n.translationCount && (S.value = !1, o?.translate({
1879
1879
  only: "all",
1880
- blockId: r.blockId
1880
+ blockId: n.blockId
1881
1881
  }));
1882
1882
  }
1883
- return (n, r) => (i(), b(B, null, [A("button", {
1883
+ return (t, n) => (c(), w(H, null, [N("button", {
1884
1884
  ref_key: "trigger",
1885
1885
  ref: y,
1886
1886
  type: "button",
1887
1887
  "data-testid": "locale-chip",
1888
1888
  "data-state": e.state,
1889
- "aria-label": ee.value,
1890
- title: ee.value,
1891
- "aria-expanded": M.value,
1892
- "aria-controls": M.value ? U : void 0,
1889
+ "aria-label": re.value,
1890
+ title: re.value,
1891
+ "aria-expanded": x.value,
1892
+ "aria-controls": x.value ? B : void 0,
1893
1893
  "aria-haspopup": "dialog",
1894
1894
  class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
1895
- onClick: k(ae, ["stop"]),
1896
- onKeydown: [S(k(ae, ["stop", "prevent"]), ["enter"]), S(k(ge, ["stop", "prevent"]), ["esc"])]
1897
- }, [(i(), D(t(re.value), {
1895
+ onClick: M(Y, ["stop"]),
1896
+ onKeydown: [E(M(Y, ["stop", "prevent"]), ["enter"]), E(M(_e, ["stop", "prevent"]), ["esc"])]
1897
+ }, [(c(), A(a(oe.value), {
1898
1898
  size: 12,
1899
1899
  "stroke-width": 2,
1900
1900
  "aria-hidden": "true"
1901
- }))], 40, La), C(_) && M.value ? (i(), D(T, {
1901
+ }))], 40, La), D(h) && x.value ? (c(), A(ee, {
1902
1902
  key: 0,
1903
- to: C(_)
1904
- }, [A("div", {
1905
- id: U,
1903
+ to: D(h)
1904
+ }, [N("div", {
1905
+ id: B,
1906
1906
  ref_key: "popover",
1907
- ref: x,
1907
+ ref: b,
1908
1908
  role: "dialog",
1909
- "aria-label": F.value ? void 0 : te.value,
1910
- "aria-labelledby": F.value ? `${U}-question` : void 0,
1911
- "aria-describedby": F.value ? `${U}-warning` : void 0,
1909
+ "aria-label": S.value ? void 0 : ae.value,
1910
+ "aria-labelledby": S.value ? `${B}-question` : void 0,
1911
+ "aria-describedby": S.value ? `${B}-warning` : void 0,
1912
1912
  tabindex: "-1",
1913
1913
  "data-testid": "locale-popover",
1914
1914
  class: "tpl-locale-popover tpl:absolute tpl:z-[10000] tpl:w-[300px] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-sm tpl:text-[var(--tpl-chrome-text)] tpl:shadow-[var(--tpl-shadow-md)] tpl:outline-none",
1915
- style: P({
1916
- top: `${V.value.top}px`,
1917
- left: `${V.value.left}px`,
1918
- maxHeight: `${H.value.maxHeight}px`,
1919
- maxWidth: `${H.value.maxWidth}px`
1915
+ style: L({
1916
+ top: `${R.value.top}px`,
1917
+ left: `${R.value.left}px`,
1918
+ maxHeight: `${z.value.maxHeight}px`,
1919
+ maxWidth: `${z.value.maxWidth}px`
1920
1920
  }),
1921
- onClick: r[2] ||= k(() => {}, ["stop"]),
1922
- onKeydown: S(k(ge, ["stop", "prevent"]), ["esc"])
1923
- }, [F.value ? (i(), b(B, { key: 0 }, [
1924
- A("h3", {
1925
- id: `${U}-question`,
1921
+ onClick: n[2] ||= M(() => {}, ["stop"]),
1922
+ onKeydown: E(M(_e, ["stop", "prevent"]), ["esc"])
1923
+ }, [S.value ? (c(), w(H, { key: 0 }, [
1924
+ N("h3", {
1925
+ id: `${B}-question`,
1926
1926
  class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
1927
- }, j(C(Wn)(C(m).localization.translationConfirmation, e.translationCount ?? 0, C(d))), 9, za),
1928
- A("p", {
1929
- id: `${U}-warning`,
1927
+ }, P(D(fr)(D(d).localization.translationConfirmation, e.translationCount ?? 0, D(l))), 9, za),
1928
+ N("p", {
1929
+ id: `${B}-warning`,
1930
1930
  class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
1931
- }, j(C(h)(C(m).localization.translationDescription, { language: W.value })), 9, Ba),
1932
- A("div", Va, [A("button", {
1931
+ }, P(D(f)(D(d).localization.translationDescription, { language: te.value })), 9, Ba),
1932
+ N("div", Va, [N("button", {
1933
1933
  ref_key: "confirmationCancel",
1934
- ref: L,
1934
+ ref: T,
1935
1935
  type: "button",
1936
1936
  "data-testid": "translation-confirm-cancel",
1937
- class: w(C(qn)),
1938
- onClick: he
1939
- }, j(C(m).localization.cancel), 3), A("button", {
1937
+ class: O(D(mr)),
1938
+ onClick: ge
1939
+ }, P(D(d).localization.cancel), 3), N("button", {
1940
1940
  type: "button",
1941
1941
  "data-testid": "translation-confirm",
1942
- class: w(C(Jn)),
1943
- disabled: !Y.value || !!C(c)?.running.value || !e.translationCount,
1944
- onClick: _e
1945
- }, j(C(Wn)(C(m).localization.translateAllFields, e.translationCount ?? 0, C(d))), 11, Ha)])
1946
- ], 64)) : (i(), b(B, { key: 1 }, [
1947
- ie.value ? (i(), b("p", Ua, j(te.value), 1)) : E("", !0),
1948
- q.value === "missing" ? (i(), b("p", Wa, j(C(h)(C(m).localization.missingExplanation, { default: G.value })), 1)) : q.value === "stale" ? (i(), b(B, { key: 2 }, [A("p", Ga, j(C(h)(C(m).localization.staleExplanation, { default: G.value })), 1), A("p", Ka, j(C(h)(C(m).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : q.value === "tags-differ" ? (i(), b("p", qa, j(C(h)(C(m).localization.tagsDifferExplanation, { default: G.value })), 1)) : q.value === "changed" ? (i(), b("p", Ja, j(C(Wn)(C(m).localization.changedProperties, J.value, C(d), { default: G.value })), 1)) : q.value === "hidden" ? (i(), b("p", Ya, j(C(h)(C(m).localization.hiddenExplanation, { language: W.value })), 1)) : (i(), b("ul", Xa, [(i(!0), b(B, null, l(e.staleLocales, (e) => (i(), b("li", {
1942
+ class: O(D(hr)),
1943
+ disabled: !q.value || !!D(o)?.running.value || !e.translationCount,
1944
+ onClick: ve
1945
+ }, P(D(fr)(D(d).localization.translateAllFields, e.translationCount ?? 0, D(l))), 11, Ha)])
1946
+ ], 64)) : (c(), w(H, { key: 1 }, [
1947
+ se.value ? (c(), w("p", Ua, P(ae.value), 1)) : k("", !0),
1948
+ K.value === "missing" ? (c(), w("p", Wa, P(D(f)(D(d).localization.missingExplanation, { default: U.value })), 1)) : K.value === "stale" ? (c(), w(H, { key: 2 }, [N("p", Ga, P(D(f)(D(d).localization.staleExplanation, { default: U.value })), 1), N("p", Ka, P(D(f)(D(d).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : K.value === "tags-differ" ? (c(), w("p", qa, P(D(f)(D(d).localization.tagsDifferExplanation, { default: U.value })), 1)) : K.value === "changed" ? (c(), w("p", Ja, P(D(fr)(D(d).localization.changedProperties, ie.value, D(l), { default: U.value })), 1)) : K.value === "hidden" ? (c(), w("p", Ya, P(D(f)(D(d).localization.hiddenExplanation, { language: te.value })), 1)) : (c(), w("ul", Xa, [(c(!0), w(H, null, p(e.staleLocales, (e) => (c(), w("li", {
1949
1949
  key: e,
1950
1950
  class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
1951
- }, [A("span", null, j(C(Gn)(e)), 1), A("button", {
1951
+ }, [N("span", null, P(D(dr)(e)), 1), N("button", {
1952
1952
  type: "button",
1953
- class: w(C(Kn)),
1954
- onClick: (t) => pe(e)
1955
- }, j(C(m).localization.open), 11, Za)]))), 128))])),
1956
- e.editable && q.value !== "default-stale" ? (i(), b("div", Qa, [
1957
- Y.value && (q.value === "missing" || q.value === "stale" || q.value === "tags-differ") ? (i(), b("button", {
1953
+ class: O(D(pr)),
1954
+ onClick: (t) => Q(e)
1955
+ }, P(D(d).localization.open), 11, Za)]))), 128))])),
1956
+ e.editable && K.value !== "default-stale" ? (c(), w("div", Qa, [
1957
+ q.value && (K.value === "missing" || K.value === "stale" || K.value === "tags-differ") ? (c(), w("button", {
1958
1958
  key: 0,
1959
1959
  type: "button",
1960
1960
  ref_key: "retranslate",
1961
- ref: I,
1962
- "data-testid": q.value === "missing" ? "locale-translate" : "locale-retranslate",
1963
- class: w(C(qn)),
1964
- disabled: !!C(c)?.running.value,
1965
- onClick: me
1966
- }, j(q.value === "missing" ? C(m).localization.translate : C(m).localization.retranslate), 11, $a)) : E("", !0),
1967
- q.value === "stale" || q.value === "tags-differ" ? (i(), b(B, { key: 1 }, [q.value === "stale" ? (i(), b("button", {
1961
+ ref: C,
1962
+ "data-testid": K.value === "missing" ? "locale-translate" : "locale-retranslate",
1963
+ class: O(D(mr)),
1964
+ disabled: !!D(o)?.running.value,
1965
+ onClick: he
1966
+ }, P(K.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11, $a)) : k("", !0),
1967
+ K.value === "stale" || K.value === "tags-differ" ? (c(), w(H, { key: 1 }, [K.value === "stale" ? (c(), w("button", {
1968
1968
  key: 0,
1969
1969
  type: "button",
1970
1970
  "data-testid": "locale-keep",
1971
- class: w(C(Y.value ? Kn : qn)),
1972
- onClick: ue
1973
- }, j(C(m).localization.keep), 3)) : E("", !0), A("button", {
1971
+ class: O(D(q.value ? pr : mr)),
1972
+ onClick: fe
1973
+ }, P(D(d).localization.keep), 3)) : k("", !0), N("button", {
1974
1974
  type: "button",
1975
1975
  "data-testid": "locale-use-default",
1976
- class: w(C(q.value === "tags-differ" && !Y.value ? qn : Kn)),
1977
- onClick: r[0] ||= (t) => de(q.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
1978
- }, j(C(h)(C(m).localization.useDefaultLanguage, { default: G.value })), 3)], 64)) : E("", !0),
1979
- q.value === "changed" ? (i(), b("button", {
1976
+ class: O(D(K.value === "tags-differ" && !q.value ? mr : pr)),
1977
+ onClick: n[0] ||= (t) => pe(K.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
1978
+ }, P(D(f)(D(d).localization.useDefaultLanguage, { default: U.value })), 3)], 64)) : k("", !0),
1979
+ K.value === "changed" ? (c(), w("button", {
1980
1980
  key: 2,
1981
1981
  type: "button",
1982
1982
  "data-testid": "locale-reset",
1983
- class: w(C(qn)),
1984
- onClick: r[1] ||= (t) => de(e.setPaths)
1985
- }, j(C(m).localization.resetChanges), 3)) : E("", !0),
1986
- q.value === "hidden" ? (i(), b("button", {
1983
+ class: O(D(mr)),
1984
+ onClick: n[1] ||= (t) => pe(e.setPaths)
1985
+ }, P(D(d).localization.resetChanges), 3)) : k("", !0),
1986
+ K.value === "hidden" ? (c(), w("button", {
1987
1987
  key: 3,
1988
1988
  type: "button",
1989
1989
  "data-testid": "locale-show",
1990
- class: w(C(qn)),
1991
- onClick: fe
1992
- }, j(C(m).localization.show), 3)) : E("", !0)
1993
- ])) : E("", !0)
1994
- ], 64))], 44, Ra)], 8, ["to"])) : E("", !0)], 64));
1990
+ class: O(D(mr)),
1991
+ onClick: me
1992
+ }, P(D(d).localization.show), 3)) : k("", !0)
1993
+ ])) : k("", !0)
1994
+ ], 64))], 44, Ra)], 8, ["to"])) : k("", !0)], 64));
1995
1995
  }
1996
- }), [["__scopeId", "data-v-3343ae7d"]]), to = /* @__PURE__ */ n({
1996
+ }), [["__scopeId", "data-v-3343ae7d"]]), to = /* @__PURE__ */ o({
1997
1997
  __name: "LocaleMarkers",
1998
1998
  props: { block: {} },
1999
1999
  setup(e) {
2000
- let t = e, n = f(Rn, null), r = f(nn, void 0), a = f(xn, []), s = f(Wt, te.liquid), c = f(Sn, N(() => /* @__PURE__ */ new Set())), l = N(() => n?.activeLocale?.value), u = N(() => l.value ? t.block.l10n?.[l.value] : void 0), d = N(() => ({
2000
+ let t = e, n = g(hn, null), r = g(Nt, void 0), i = g(Zt, []), a = g(xt, ue.liquid), o = g(Qt, I(() => /* @__PURE__ */ new Set())), s = I(() => n?.activeLocale?.value), l = I(() => s.value ? t.block.l10n?.[s.value] : void 0), d = I(() => ({
2001
2001
  blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
2002
2002
  ...t.block,
2003
2003
  children: []
@@ -2006,56 +2006,56 @@ var La = [
2006
2006
  locale: n.content.value.settings.locale,
2007
2007
  locales: n.content.value.settings.locales
2008
2008
  }
2009
- })), p = N(() => n && l.value && !c.value.has(l.value) ? ie(d.value, l.value, a) : {
2009
+ })), f = I(() => n && s.value && !o.value.has(s.value) ? fe(d.value, s.value, i) : {
2010
2010
  missing: [],
2011
2011
  stale: [],
2012
2012
  translated: []
2013
- }), m = N(() => p.value.stale.map((e) => e.slice(t.block.id.length + 1))), h = N(() => p.value.translated.flatMap((e) => {
2014
- let n = e.slice(t.block.id.length + 1), r = _e(t.block, n), i = u.value?.text?.[n]?.value, a = t.block.type === "html" || le[t.block.type]?.includes(n) ? "html" : "text";
2015
- return typeof r == "string" && i !== void 0 && Ia(r, i, s, a) ? [n] : [];
2016
- })), g = z(null), _ = N(() => n && l.value && !c.value.has(l.value) ? W(d.value, l.value, {
2017
- syntax: s,
2018
- definitions: a,
2013
+ }), p = I(() => f.value.stale.map((e) => e.slice(t.block.id.length + 1))), m = I(() => f.value.translated.flatMap((e) => {
2014
+ let n = e.slice(t.block.id.length + 1), r = De(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || ye[t.block.type]?.includes(n) ? "html" : "text";
2015
+ return typeof r == "string" && i !== void 0 && Ia(r, i, a, o) ? [n] : [];
2016
+ })), h = V(null), _ = I(() => n && s.value && !o.value.has(s.value) ? q(d.value, s.value, {
2017
+ syntax: a,
2018
+ definitions: i,
2019
2019
  doNotTranslate: r?.doNotTranslate,
2020
2020
  blockId: t.block.id,
2021
- only: T.value === "tags-differ" ? "all" : "gaps"
2022
- }).strings : []), v = N(() => _.value.some(({ id: e }) => {
2021
+ only: w.value === "tags-differ" ? "all" : "gaps"
2022
+ }).strings : []), v = I(() => _.value.some(({ id: e }) => {
2023
2023
  let n = e.slice(t.block.id.length + 1);
2024
- return p.value.translated.includes(e) && !h.value.includes(n);
2025
- })), y = N(() => Object.keys(u.value?.set ?? {}).filter((e) => {
2026
- let n = e.split("."), r = n.pop(), i = n.length ? _e(t.block, n.join(".")) : t.block;
2027
- return Array.isArray(i) ? _e(i, r) !== void 0 : i !== void 0;
2028
- })), b = N(() => !l.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !c.value.has(e) && ie(d.value, e, a).stale.length > 0) : []), x = N(() => l.value ? c.value.has(l.value) ? null : u.value?.hidden ? "hidden" : p.value.missing.length ? "missing" : m.value.length ? "stale" : h.value.length ? "tags-differ" : y.value.length ? "changed" : null : b.value.length ? "default-stale" : null);
2024
+ return f.value.translated.includes(e) && !m.value.includes(n);
2025
+ })), y = I(() => Object.keys(l.value?.set ?? {}).filter((e) => {
2026
+ let n = e.split("."), r = n.pop(), i = n.length ? De(t.block, n.join(".")) : t.block;
2027
+ return Array.isArray(i) ? De(i, r) !== void 0 : i !== void 0;
2028
+ })), b = I(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && fe(d.value, e, i).stale.length > 0) : []), x = I(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : f.value.missing.length ? "missing" : p.value.length ? "stale" : m.value.length ? "tags-differ" : y.value.length ? "changed" : null : b.value.length ? "default-stale" : null);
2029
2029
  function S(e) {
2030
- return e === "missing" ? p.value.missing.length : e === "stale" ? m.value.length : e === "tags-differ" ? h.value.length : e === "default-stale" ? b.value.length : y.value.length;
2030
+ return e === "missing" ? f.value.missing.length : e === "stale" ? p.value.length : e === "tags-differ" ? m.value.length : e === "default-stale" ? b.value.length : y.value.length;
2031
2031
  }
2032
- let w = N(() => S(x.value)), T = N(() => g.value && S(g.value) > 0 ? g.value : x.value), O = N(() => S(T.value));
2033
- o([x, () => T.value !== (g.value ?? x.value)], () => {
2034
- g.value = null;
2032
+ let C = I(() => S(x.value)), w = I(() => h.value && S(h.value) > 0 ? h.value : x.value), T = I(() => S(w.value));
2033
+ u([x, () => w.value !== (h.value ?? x.value)], () => {
2034
+ h.value = null;
2035
2035
  });
2036
- let k = N(() => {
2037
- let e = _e(t.block, m.value[0] ?? "");
2036
+ let E = I(() => {
2037
+ let e = De(t.block, p.value[0] ?? "");
2038
2038
  if (typeof e != "string") return "";
2039
2039
  let n = e.split(/<[^>]*>/).join("");
2040
2040
  return Array.from(n).slice(0, 60).join("");
2041
2041
  });
2042
- return (t, n) => C(r) && x.value ? (i(), D(eo, {
2042
+ return (t, n) => D(r) && x.value ? (c(), A(eo, {
2043
2043
  key: 0,
2044
2044
  "block-id": e.block.id,
2045
2045
  state: x.value,
2046
- count: w.value,
2047
- "popover-state": T.value ?? void 0,
2048
- "popover-count": O.value,
2049
- stale: m.value,
2050
- "tags-differ": h.value,
2046
+ count: C.value,
2047
+ "popover-state": w.value ?? void 0,
2048
+ "popover-count": T.value,
2049
+ stale: p.value,
2050
+ "tags-differ": m.value,
2051
2051
  "set-paths": y.value,
2052
2052
  "stale-locales": b.value,
2053
- excerpt: k.value,
2053
+ excerpt: E.value,
2054
2054
  "eligible-gaps": _.value.length > 0,
2055
2055
  "translation-count": _.value.length,
2056
2056
  "replaces-current": v.value,
2057
- editable: !!l.value && C(r).locales.includes(l.value),
2058
- onTarget: n[0] ||= (e) => g.value = e
2057
+ editable: !!s.value && D(r).locales.includes(s.value),
2058
+ onTarget: n[0] ||= (e) => h.value = e
2059
2059
  }, null, 8, [
2060
2060
  "block-id",
2061
2061
  "state",
@@ -2071,7 +2071,7 @@ var La = [
2071
2071
  "translation-count",
2072
2072
  "replaces-current",
2073
2073
  "editable"
2074
- ])) : E("", !0);
2074
+ ])) : k("", !0);
2075
2075
  }
2076
2076
  }), no = [
2077
2077
  "data-block-id",
@@ -2087,7 +2087,7 @@ var La = [
2087
2087
  }, fo = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, po = {
2088
2088
  key: 4,
2089
2089
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
2090
- }, mo = ["aria-label", "title"], ho = /*#__PURE__*/ St(/* @__PURE__ */ n({
2090
+ }, mo = ["aria-label", "title"], ho = /*#__PURE__*/ gr(/* @__PURE__ */ o({
2091
2091
  __name: "BlockWrapper",
2092
2092
  props: {
2093
2093
  block: {},
@@ -2099,34 +2099,34 @@ var La = [
2099
2099
  picked: { type: Boolean }
2100
2100
  },
2101
2101
  emits: ["select"],
2102
- setup(e, { emit: t }) {
2103
- let n = g(() => import("./BlockIssueBadge-Bnmq_M4G.js")), r = e, a = N(() => r.displayBlock ?? r.block), s = t, { t: c, format: l } = Q(), u = f(zn, null), d = z(null), p = N(() => u?.liftedBlockId.value === r.block.id), m = N(() => p.value ? l(c.blockActions.dragLifted, { block: r.block.type }) : c.blockActions.drag);
2104
- async function v() {
2105
- await O(), d.value?.focus();
2106
- }
2107
- function y(e) {
2108
- u && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), p.value ? u.drop(r.block.id) : u.lift(r.block.id)) : p.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), u.cancel(), v()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), u.moveUp(r.block.id), v()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), u.moveDown(r.block.id), v())));
2109
- }
2110
- let S = N(() => !r.viewport || !a.value.visibility ? !1 : a.value.visibility[r.viewport] === !1), T = N(() => !!(Z?.activeLocale?.value && r.block.l10n?.[Z.activeLocale.value]?.hidden)), M = N(() => r.previewMode === !0 && (S.value || T.value)), F = N(() => r.viewport ? {
2111
- desktop: c.viewport.desktop,
2112
- mobile: c.viewport.mobile
2113
- }[r.viewport] ?? r.viewport : ""), I = N(() => !!a.value.displayCondition), L = f(Pn, null), R = f(Dn, null), B = f(vn, {}), H = N(() => B.savedBlocks?.isPicking.value === !0), U = N(() => !r.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), W = N(() => r.isSelected && !H.value), G = N(() => B.comments?.getBlockCount(r.block.id) ?? 0), K = z(null), ee = z(null), q = z(null), J = z(null), te = z({
2102
+ setup(t, { emit: n }) {
2103
+ let i = b(() => import("./BlockIssueBadge-DncZ-HDf.js")), a = t, o = I(() => a.displayBlock ?? a.block), s = n, { t: l, format: d } = W(), f = g(gn, null), p = V(null), m = I(() => f?.liftedBlockId.value === a.block.id), h = I(() => m.value ? d(l.blockActions.dragLifted, { block: a.block.type }) : l.blockActions.drag);
2104
+ async function _() {
2105
+ await j(), p.value?.focus();
2106
+ }
2107
+ function v(e) {
2108
+ f && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), m.value ? f.drop(a.block.id) : f.lift(a.block.id)) : m.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f.cancel(), _()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), f.moveUp(a.block.id), _()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), f.moveDown(a.block.id), _())));
2109
+ }
2110
+ let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(Z?.activeLocale?.value && a.block.l10n?.[Z.activeLocale.value]?.hidden)), E = I(() => a.previewMode === !0 && (S.value || C.value)), ee = I(() => a.viewport ? {
2111
+ desktop: l.viewport.desktop,
2112
+ mobile: l.viewport.mobile
2113
+ }[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(dn, null), z = g(rn, null), B = g(Jt, {}), te = I(() => B.savedBlocks?.isPicking.value === !0), H = I(() => !a.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), ne = I(() => a.isSelected && !te.value), G = I(() => B.comments?.getBlockCount(a.block.id) ?? 0), re = V(null), K = V(null), ie = V(null), ae = V(null), oe = V({
2114
2114
  left: "calc(100% + 8px)",
2115
2115
  top: "50%"
2116
- }), ne = z(!1), re = N(() => ee.value ?? J.value), ie = N(() => re.value?.closest(".tpl-body"));
2116
+ }), se = V(!1), q = I(() => K.value ?? ae.value), J = I(() => q.value?.closest(".tpl-body"));
2117
2117
  function Y() {
2118
- let e = ne.value, t = ee.value, n = J.value, r = K.value;
2118
+ let e = se.value, t = K.value, n = ae.value, r = re.value;
2119
2119
  if (!t && !n || !r?.offsetWidth) return;
2120
- let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = ie.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
2120
+ let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = J.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
2121
2121
  if (n?.offsetWidth) {
2122
2122
  let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
2123
2123
  if (e === i) {
2124
- ne.value = !i, O(Y);
2124
+ se.value = !i, j(Y);
2125
2125
  return;
2126
2126
  }
2127
2127
  }
2128
2128
  if (!t?.offsetWidth) return;
2129
- let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = q.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
2129
+ let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = ie.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
2130
2130
  if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
2131
2131
  let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
2132
2132
  e > r.offsetHeight / 2 && (m = `${e}px`);
@@ -2138,187 +2138,187 @@ var La = [
2138
2138
  u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
2139
2139
  }
2140
2140
  }
2141
- (te.value.left !== `${u}px` || te.value.top !== m) && (te.value = {
2141
+ (oe.value.left !== `${u}px` || oe.value.top !== m) && (oe.value = {
2142
2142
  left: `${u}px`,
2143
2143
  top: m
2144
2144
  });
2145
2145
  }
2146
- _(Y), nr(N(() => re.value ? [
2146
+ x(Y), r(I(() => q.value ? [
2147
+ re.value,
2147
2148
  K.value,
2148
- ee.value,
2149
- q.value,
2150
- J.value,
2151
- ie.value
2152
- ].filter((e) => !!e) : []), Y), $n(ie, "scroll", Y, { passive: !0 });
2153
- let X = N(() => B.collaboration?.lockOf(r.block.id) ?? null), ae = N(() => X.value?.holder.type === "guest" ? c.collaboration.guest : X.value?.holder.name ?? ""), oe = N(() => B.collaboration?.agentHighlightOf(r.block.id) ?? B.ai?.highlightOf(r.block.id) ?? null), se = vt(() => a.value.type === "section" ? a.value.backgroundImage : void 0), ce = vt(() => a.value.type === "section" ? a.value.wrapper?.backgroundImage : void 0), Z = f(Rn, null), le = Z ? Un(Z) : null, ue = f(Tn, null) ?? le?.content ?? null;
2154
- o([() => Z?.activeLocale?.value, () => le && Te(le.settings.value)], Y, { flush: "post" });
2155
- let de = f(sn, void 0), fe = N(() => Li(a.value, {
2156
- backgroundImageUrl: se.value,
2157
- heroBoxWidth: ut(a.value) ? mt(a.value, ue?.value, de) : void 0
2158
- })), pe = N(() => Ui(a.value, { backgroundImageUrl: ce.value })), me = N(() => {
2159
- let e = a.value;
2149
+ ie.value,
2150
+ ae.value,
2151
+ J.value
2152
+ ].filter((e) => !!e) : []), Y), e(J, "scroll", Y, { passive: !0 });
2153
+ let X = I(() => B.collaboration?.lockOf(a.block.id) ?? null), ce = I(() => X.value?.holder.type === "guest" ? l.collaboration.guest : X.value?.holder.name ?? ""), le = I(() => B.collaboration?.agentHighlightOf(a.block.id) ?? B.ai?.highlightOf(a.block.id) ?? null), ue = Ln(() => o.value.type === "section" ? o.value.backgroundImage : void 0), de = Ln(() => o.value.type === "section" ? o.value.wrapper?.backgroundImage : void 0), Z = g(hn, null), fe = Z ? vt(Z) : null, pe = g(tn, null) ?? fe?.content ?? null;
2154
+ u([() => Z?.activeLocale?.value, () => fe && Fe(fe.settings.value)], Y, { flush: "post" });
2155
+ let me = g(Lt, void 0), Q = I(() => Li(o.value, {
2156
+ backgroundImageUrl: ue.value,
2157
+ heroBoxWidth: kn(o.value) ? Nn(o.value, pe?.value, me) : void 0
2158
+ })), he = I(() => Ui(o.value, { backgroundImageUrl: de.value })), ge = I(() => {
2159
+ let e = o.value;
2160
2160
  return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
2161
- }), he = N(() => Hi(me.value?.wrapper?.padding));
2162
- function ge(e) {
2163
- r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
2164
- }
2165
- function _e() {
2166
- L?.deleteBlock(r.block.id);
2167
- }
2168
- function ve() {
2169
- L?.duplicateBlock(r.block);
2161
+ }), _e = I(() => Hi(ge.value?.wrapper?.padding));
2162
+ function ve(e) {
2163
+ a.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
2170
2164
  }
2171
2165
  function ye() {
2172
- B.savedBlocks?.startPicking(r.block.id);
2166
+ R?.deleteBlock(a.block.id);
2173
2167
  }
2174
2168
  function be() {
2175
- R?.toggleBlock(r.block.id);
2169
+ R?.duplicateBlock(a.block);
2176
2170
  }
2177
- return (t, r) => M.value ? E("", !0) : (i(), b("div", {
2171
+ function xe() {
2172
+ B.savedBlocks?.startPicking(a.block.id);
2173
+ }
2174
+ function Se() {
2175
+ z?.toggleBlock(a.block.id);
2176
+ }
2177
+ return (e, n) => E.value ? k("", !0) : (c(), w("div", {
2178
2178
  key: 0,
2179
2179
  ref_key: "blockElement",
2180
- ref: K,
2181
- class: w(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
2182
- "tpl-block--selected": e.isSelected,
2183
- "tpl-block--locale-hidden": T.value,
2184
- "tpl-block--picked": e.picked,
2185
- "tpl-block--idle": !e.isSelected && !e.picked,
2186
- "tpl-block--lifted": p.value
2180
+ ref: re,
2181
+ class: O(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
2182
+ "tpl-block--selected": t.isSelected,
2183
+ "tpl-block--locale-hidden": C.value,
2184
+ "tpl-block--picked": t.picked,
2185
+ "tpl-block--idle": !t.isSelected && !t.picked,
2186
+ "tpl-block--lifted": m.value
2187
2187
  }]),
2188
- "data-block-id": e.block.id,
2189
- "data-block-type": e.block.type,
2190
- "data-tpl-picked": e.picked || void 0,
2191
- onClick: ge
2188
+ "data-block-id": t.block.id,
2189
+ "data-block-type": t.block.type,
2190
+ "data-tpl-picked": t.picked || void 0,
2191
+ onClick: ve
2192
2192
  }, [
2193
- A("div", {
2193
+ N("div", {
2194
2194
  ref_key: "badgesElement",
2195
- ref: q,
2195
+ ref: ie,
2196
2196
  class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
2197
2197
  }, [
2198
- G.value > 0 && !S.value ? (i(), b("button", {
2198
+ G.value > 0 && !S.value ? (c(), w("button", {
2199
2199
  key: 0,
2200
2200
  ref_key: "commentElement",
2201
- ref: J,
2202
- class: w(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", ne.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
2203
- "aria-label": C(l)(C(c).blockActions.comments, { count: String(G.value) }),
2204
- onClick: r[0] ||= k((t) => C(B).comments?.openForBlock(e.block.id), ["stop"])
2205
- }, [V(C(Rt), {
2201
+ ref: ae,
2202
+ class: O(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", se.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
2203
+ "aria-label": D(d)(D(l).blockActions.comments, { count: String(G.value) }),
2204
+ onClick: n[0] ||= M((e) => D(B).comments?.openForBlock(t.block.id), ["stop"])
2205
+ }, [U(D(or), {
2206
2206
  size: 12,
2207
2207
  "stroke-width": 2.5
2208
- }), x(" " + j(G.value), 1)], 10, ro)) : E("", !0),
2209
- V(C(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
2210
- e.previewMode ? E("", !0) : (i(), D(to, {
2208
+ }), T(" " + P(G.value), 1)], 10, ro)) : k("", !0),
2209
+ U(D(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
2210
+ t.previewMode ? k("", !0) : (c(), A(to, {
2211
2211
  key: 1,
2212
- block: e.block
2212
+ block: t.block
2213
2213
  }, null, 8, ["block"]))
2214
2214
  ], 512),
2215
- X.value ? (i(), b("div", {
2215
+ X.value ? (c(), w("div", {
2216
2216
  key: 0,
2217
2217
  "data-testid": "block-lock",
2218
2218
  "data-lock-holder": X.value.holder.sessionId,
2219
2219
  class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
2220
- style: P({
2220
+ style: L({
2221
2221
  outline: `2px solid ${X.value.holder.color}`,
2222
2222
  outlineOffset: "-1px"
2223
2223
  })
2224
- }, [A("span", {
2224
+ }, [N("span", {
2225
2225
  class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
2226
- style: P({
2226
+ style: L({
2227
2227
  backgroundColor: X.value.holder.color,
2228
- color: C(_r)(X.value.holder.color)
2228
+ color: D(_r)(X.value.holder.color)
2229
2229
  })
2230
- }, j(C(l)(C(c).collaboration.editing, { name: ae.value })), 5)], 12, io)) : E("", !0),
2231
- oe.value === null ? E("", !0) : (i(), b("div", {
2232
- key: oe.value,
2230
+ }, P(D(d)(D(l).collaboration.editing, { name: ce.value })), 5)], 12, io)) : k("", !0),
2231
+ le.value === null ? k("", !0) : (c(), w("div", {
2232
+ key: le.value,
2233
2233
  "data-testid": "block-agent-highlight",
2234
2234
  "aria-hidden": "true",
2235
2235
  class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
2236
2236
  })),
2237
- W.value ? (i(), b("div", {
2237
+ ne.value ? (c(), w("div", {
2238
2238
  key: 2,
2239
2239
  ref_key: "actionsElement",
2240
- ref: ee,
2241
- style: P(te.value),
2240
+ ref: K,
2241
+ style: L(oe.value),
2242
2242
  role: "toolbar",
2243
- "aria-label": C(c).blockActions.drag,
2243
+ "aria-label": D(l).blockActions.drag,
2244
2244
  class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
2245
2245
  }, [
2246
- A("button", {
2246
+ N("button", {
2247
2247
  ref_key: "dragButtonRef",
2248
- ref: d,
2248
+ ref: p,
2249
2249
  class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
2250
- "aria-label": m.value,
2251
- "aria-pressed": p.value,
2250
+ "aria-label": h.value,
2251
+ "aria-pressed": m.value,
2252
2252
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
2253
- title: C(c).blockActions.drag,
2254
- onKeydown: y
2255
- }, [V(C(Vt), {
2253
+ title: D(l).blockActions.drag,
2254
+ onKeydown: v
2255
+ }, [U(D(lr), {
2256
2256
  size: 14,
2257
2257
  "stroke-width": 1.5
2258
2258
  })], 40, oo),
2259
- A("button", {
2259
+ N("button", {
2260
2260
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
2261
- "aria-label": C(c).blockActions.duplicate,
2262
- title: C(c).blockActions.duplicate,
2263
- onClick: k(ve, ["stop"])
2264
- }, [V(C(Ct), {
2261
+ "aria-label": D(l).blockActions.duplicate,
2262
+ title: D(l).blockActions.duplicate,
2263
+ onClick: M(be, ["stop"])
2264
+ }, [U(D(Gn), {
2265
2265
  size: 14,
2266
2266
  "stroke-width": 1.5
2267
2267
  })], 8, so),
2268
- U.value ? (i(), b("button", {
2268
+ H.value ? (c(), w("button", {
2269
2269
  key: 0,
2270
2270
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
2271
- "aria-label": C(c).blockActions.saveAsBlock,
2272
- title: C(c).blockActions.saveAsBlock,
2273
- onClick: k(ye, ["stop"])
2274
- }, [V(C(jt), {
2271
+ "aria-label": D(l).blockActions.saveAsBlock,
2272
+ title: D(l).blockActions.saveAsBlock,
2273
+ onClick: M(xe, ["stop"])
2274
+ }, [U(D($n), {
2275
2275
  size: 14,
2276
2276
  "stroke-width": 1.5
2277
- })], 8, co)) : E("", !0),
2278
- A("button", {
2277
+ })], 8, co)) : k("", !0),
2278
+ N("button", {
2279
2279
  class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
2280
- "aria-label": C(c).blockActions.delete,
2281
- title: C(c).blockActions.delete,
2282
- onClick: k(_e, ["stop"])
2283
- }, [V(C(Ft), {
2280
+ "aria-label": D(l).blockActions.delete,
2281
+ title: D(l).blockActions.delete,
2282
+ onClick: M(ye, ["stop"])
2283
+ }, [U(D(rr), {
2284
2284
  size: 14,
2285
2285
  "stroke-width": 1.5
2286
2286
  })], 8, lo)
2287
- ], 12, ao)) : E("", !0),
2288
- S.value ? (i(), b("div", uo, [A("span", fo, [V(C(Dt), {
2287
+ ], 12, ao)) : k("", !0),
2288
+ S.value ? (c(), w("div", uo, [N("span", fo, [U(D(Yn), {
2289
2289
  size: 12,
2290
2290
  "stroke-width": 1.5
2291
- }), x(" " + j(C(l)(C(c).blockActions.hiddenOnViewport, { viewport: F.value })), 1)])])) : E("", !0),
2292
- I.value && !S.value ? (i(), b("div", po, [A("button", {
2291
+ }), T(" " + P(D(d)(D(l).blockActions.hiddenOnViewport, { viewport: ee.value })), 1)])])) : k("", !0),
2292
+ F.value && !S.value ? (c(), w("div", po, [N("button", {
2293
2293
  "data-testid": "condition-toggle",
2294
2294
  class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
2295
- "aria-label": C(c).blockActions.conditionToggle,
2296
- title: e.block.displayCondition?.label,
2297
- onClick: k(be, ["stop"])
2298
- }, [V(C(Ot), {
2295
+ "aria-label": D(l).blockActions.conditionToggle,
2296
+ title: t.block.displayCondition?.label,
2297
+ onClick: M(Se, ["stop"])
2298
+ }, [U(D(Xn), {
2299
2299
  size: 12,
2300
2300
  "stroke-width": 2
2301
- })], 8, mo)])) : E("", !0),
2302
- pe.value ? (i(), b("div", {
2301
+ })], 8, mo)])) : k("", !0),
2302
+ he.value ? (c(), w("div", {
2303
2303
  key: 5,
2304
- class: w(["tpl-section-wrapper tpl-email-surface", C(Ni)(pe.value)]),
2305
- style: P(pe.value)
2306
- }, [me.value ? (i(), b("div", {
2304
+ class: O(["tpl-section-wrapper tpl-email-surface", D(Ni)(he.value)]),
2305
+ style: L(he.value)
2306
+ }, [ge.value ? (c(), w("div", {
2307
2307
  key: 0,
2308
2308
  class: "tpl-band-frame",
2309
- style: P(he.value)
2310
- }, [A("div", {
2311
- class: w(["tpl-block-content tpl-email-surface", C(Ni)(fe.value)]),
2312
- style: P(fe.value)
2313
- }, [h(t.$slots, "default", {}, void 0, !0)], 6)], 4)) : (i(), b("div", {
2309
+ style: L(_e.value)
2310
+ }, [N("div", {
2311
+ class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
2312
+ style: L(Q.value)
2313
+ }, [y(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (c(), w("div", {
2314
2314
  key: 1,
2315
- class: w(["tpl-block-content tpl-email-surface", C(Ni)(fe.value)]),
2316
- style: P(fe.value)
2317
- }, [h(t.$slots, "default", {}, void 0, !0)], 6))], 6)) : (i(), b("div", {
2315
+ class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
2316
+ style: L(Q.value)
2317
+ }, [y(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (c(), w("div", {
2318
2318
  key: 6,
2319
- class: w(["tpl-block-content tpl-email-surface", C(Ni)(fe.value)]),
2320
- style: P(fe.value)
2321
- }, [h(t.$slots, "default", {}, void 0, !0)], 6))
2319
+ class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
2320
+ style: L(Q.value)
2321
+ }, [y(e.$slots, "default", {}, void 0, !0)], 6))
2322
2322
  ], 10, no));
2323
2323
  }
2324
2324
  }), [["__scopeId", "data-v-872194d3"]]);
@@ -2326,7 +2326,7 @@ var La = [
2326
2326
  function go(e) {
2327
2327
  let t = /^\s*<p\b/.exec(e);
2328
2328
  if (!t) return e;
2329
- let n = Ne(e, t[0].length);
2329
+ let n = Ue(e, t[0].length);
2330
2330
  if (n === -1) return e;
2331
2331
  let r = /<\/p>\s*$/.exec(e);
2332
2332
  if (!r || r.index <= n) return e;
@@ -2334,38 +2334,38 @@ function go(e) {
2334
2334
  return /<\/p>\s*<p\b/i.test(i) ? e : i;
2335
2335
  }
2336
2336
  // src/components/blocks/TitleBlock.vue
2337
- var _o = /* @__PURE__ */ n({
2337
+ var _o = /* @__PURE__ */ o({
2338
2338
  __name: "TitleBlock",
2339
2339
  props: {
2340
2340
  block: {},
2341
2341
  viewport: {}
2342
2342
  },
2343
2343
  setup(e) {
2344
- let n = e, r = g(() => import("./TitleEditor-D04vvbUc.js")), a = Fn(gn, "TitleBlock"), { isEditing: o, blockRef: s, toolbarPosition: c, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = ja(() => n.block.content), f = N(() => {
2344
+ let t = e, n = b(() => import("./TitleEditor-CzPkkL2s.js")), r = fn(Kt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = ja(() => t.block.content), f = I(() => {
2345
2345
  let e = {
2346
- fontSize: `${Ye[n.block.level]}px`,
2347
- lineHeight: String(xe),
2346
+ fontSize: `${at[t.block.level]}px`,
2347
+ lineHeight: String(je),
2348
2348
  fontWeight: "700",
2349
- textAlign: n.block.textAlign
2349
+ textAlign: t.block.textAlign
2350
2350
  };
2351
- return n.block.color && (e.color = n.block.color), n.block.fontFamily && (e.fontFamily = a.resolveFontFamily(n.block.fontFamily)), e;
2352
- }), p = N(() => `h${n.block.level}`), m = N(() => hr(go(l.value)));
2353
- return (n, a) => (i(), b("div", {
2351
+ return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
2352
+ }), p = I(() => `h${t.block.level}`), m = I(() => Wn(go(l.value)));
2353
+ return (t, r) => (c(), w("div", {
2354
2354
  ref_key: "blockRef",
2355
- ref: s,
2355
+ ref: o,
2356
2356
  class: "tpl:min-h-[1em] tpl:w-full",
2357
- style: P(f.value),
2358
- onDblclick: a[0] ||= (...e) => C(u) && C(u)(...e)
2359
- }, [C(o) ? (i(), D(C(r), {
2357
+ style: L(f.value),
2358
+ onDblclick: r[0] ||= (...e) => D(u) && D(u)(...e)
2359
+ }, [D(i) ? (c(), A(D(n), {
2360
2360
  key: 0,
2361
2361
  block: e.block,
2362
- "toolbar-position": C(c),
2363
- onDone: C(d)
2362
+ "toolbar-position": D(s),
2363
+ onDone: D(d)
2364
2364
  }, null, 8, [
2365
2365
  "block",
2366
2366
  "toolbar-position",
2367
2367
  "onDone"
2368
- ])) : (i(), D(t(p.value), {
2368
+ ])) : (c(), A(a(p.value), {
2369
2369
  key: 1,
2370
2370
  class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
2371
2371
  style: {
@@ -2377,12 +2377,12 @@ var _o = /* @__PURE__ */ n({
2377
2377
  }
2378
2378
  }), vo = "hero", yo = "#1f2937", bo = "#ffffff";
2379
2379
  function xo(e, t) {
2380
- let n = et("title", e);
2380
+ let n = ut("title", e);
2381
2381
  n.color = bo, n.textAlign = "center";
2382
- let r = et("paragraph", e);
2382
+ let r = ut("paragraph", e);
2383
2383
  r.content = `<p style="text-align: center"><span style="color: ${bo}">${So(t)}</span></p>`;
2384
- let i = et("button", e);
2385
- return i.align = "center", oe({
2384
+ let i = ut("button", e);
2385
+ return i.align = "center", he({
2386
2386
  columns: "1",
2387
2387
  children: [[
2388
2388
  n,
@@ -2421,30 +2421,30 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2421
2421
  key: 0,
2422
2422
  "data-testid": "section-drop-hint",
2423
2423
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
2424
- }, Oo = /* @__PURE__ */ n({
2424
+ }, Oo = /* @__PURE__ */ o({
2425
2425
  __name: "SectionBlock",
2426
2426
  props: {
2427
2427
  block: {},
2428
2428
  sourceBlock: {},
2429
2429
  viewport: {}
2430
2430
  },
2431
- setup(n) {
2432
- let r = {
2431
+ setup(e) {
2432
+ let t = {
2433
2433
  title: _o,
2434
2434
  paragraph: Na,
2435
2435
  image: Ea,
2436
2436
  button: Ji,
2437
2437
  divider: ca,
2438
2438
  custom: oa
2439
- }, o = n, { t: u } = Q(), d = Fn(Rn, "SectionBlock"), { displayBlock: p } = Un(d), m = N(() => o.sourceBlock ?? o.block), h = f(Sn, N(() => /* @__PURE__ */ new Set()));
2440
- s(Sn, N(() => /* @__PURE__ */ new Set([...h.value, ...Object.entries(m.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
2441
- let g = f(Dn, null), _ = f(En, null), v = f(vn, {}), y = f(mn, null);
2442
- function x(e) {
2439
+ }, n = e, { t: r } = W(), o = fn(hn, "SectionBlock"), { displayBlock: s } = vt(o), u = I(() => n.sourceBlock ?? n.block), m = g(Qt, I(() => /* @__PURE__ */ new Set()));
2440
+ d(Qt, I(() => /* @__PURE__ */ new Set([...m.value, ...Object.entries(u.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
2441
+ let h = g(rn, null), _ = g(nn, null), v = g(Jt, {}), y = g(Wt, null);
2442
+ function b(e) {
2443
2443
  let t = v.savedBlocks;
2444
- t?.isPicking.value ? t.togglePick(o.block.id) : d.selectBlock(e);
2444
+ t?.isPicking.value ? t.togglePick(n.block.id) : o.selectBlock(e);
2445
2445
  }
2446
- let S = N(() => {
2447
- switch (o.block.columns) {
2446
+ let x = I(() => {
2447
+ switch (n.block.columns) {
2448
2448
  case "2": return ["50%", "50%"];
2449
2449
  case "3": return [
2450
2450
  "33.33%",
@@ -2468,57 +2468,57 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2468
2468
  ];
2469
2469
  default: return ["100%"];
2470
2470
  }
2471
- }), T = N(() => {
2472
- let e = S.value.length, t = [...(d.state.previewMode ? o.block : m.value).children];
2471
+ }), S = I(() => {
2472
+ let e = x.value.length, t = [...(o.state.previewMode ? n.block : u.value).children];
2473
2473
  for (; t.length < e;) t.push([]);
2474
2474
  return t.slice(0, e);
2475
- }), O = N(() => o.viewport === "mobile" && o.block.stackOnMobile !== !1);
2476
- function k(e) {
2477
- return T.value[e] || [];
2475
+ }), C = I(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
2476
+ function T(e) {
2477
+ return S.value[e] || [];
2478
2478
  }
2479
- function M(e) {
2480
- return y?.value === !1 || !g?.isHidden(e);
2479
+ function E(e) {
2480
+ return y?.value === !1 || !h?.isHidden(e);
2481
2481
  }
2482
- function F(e) {
2483
- return !k(e).some((e) => M(e.id));
2482
+ function ee(e) {
2483
+ return !T(e).some((e) => E(e.id));
2484
2484
  }
2485
- let L = z(null);
2486
- function H(e) {
2487
- return d.state.previewMode ? !1 : F(e) ? !0 : L.value === e && k(e).filter((e) => M(e.id)).length <= 1;
2485
+ let j = V(null);
2486
+ function M(e) {
2487
+ return o.state.previewMode ? !1 : ee(e) ? !0 : j.value === e && T(e).filter((e) => E(e.id)).length <= 1;
2488
2488
  }
2489
- let U = N(() => {
2490
- if (d.state.previewMode) return !1;
2491
- let e = Je(o.block);
2489
+ let F = I(() => {
2490
+ if (o.state.previewMode) return !1;
2491
+ let e = it(n.block);
2492
2492
  return e !== null && !e.applied && e.reason === "image";
2493
2493
  });
2494
- function W(e) {
2495
- return k(e).length === 0 && !d.state.previewMode;
2494
+ function R(e) {
2495
+ return T(e).length === 0 && !o.state.previewMode;
2496
2496
  }
2497
- function G(e) {
2498
- return k(e).length === 0 && d.state.previewMode;
2497
+ function B(e) {
2498
+ return T(e).length === 0 && o.state.previewMode;
2499
2499
  }
2500
- function K(e, t) {
2501
- Pa(d, t, o.block.id, e);
2500
+ function ne(e, t) {
2501
+ Pa(o, t, n.block.id, e);
2502
2502
  }
2503
- function ee(e) {
2504
- return Oi(e, _, r);
2503
+ function G(e) {
2504
+ return Oi(e, _, t);
2505
2505
  }
2506
- function q(e, t) {
2507
- e.type === "custom" && d.updateBlock(e.id, {
2506
+ function re(e, t) {
2507
+ e.type === "custom" && o.updateBlock(e.id, {
2508
2508
  fieldValues: t.fieldValues,
2509
2509
  dataSourceFetched: t.dataSourceFetched
2510
2510
  });
2511
2511
  }
2512
- return (r, s) => (i(), b("div", To, [U.value ? (i(), b("div", Eo, [A("span", null, j(C(u).section.heroAddImage), 1)])) : E("", !0), A("div", { class: w(["tpl:flex tpl:gap-0", { "tpl:flex-col": O.value }]) }, [(i(!0), b(B, null, l(T.value, (r, f) => (i(), b("div", {
2513
- key: f,
2514
- class: w(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", W(f) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
2515
- style: P({ width: O.value ? "100%" : S.value[f] })
2516
- }, [V(C(R), {
2517
- "model-value": k(f),
2512
+ return (t, u) => (c(), w("div", To, [F.value ? (c(), w("div", Eo, [N("span", null, P(D(r).section.heroAddImage), 1)])) : k("", !0), N("div", { class: O(["tpl:flex tpl:gap-0", { "tpl:flex-col": C.value }]) }, [(c(!0), w(H, null, p(S.value, (t, d) => (c(), w("div", {
2513
+ key: d,
2514
+ class: O(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", R(d) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
2515
+ style: L({ width: C.value ? "100%" : x.value[d] })
2516
+ }, [U(D(te), {
2517
+ "model-value": T(d),
2518
2518
  group: {
2519
2519
  name: "blocks",
2520
2520
  pull: !0,
2521
- put: (e, t, n) => C(wo)(n)
2521
+ put: (e, t, n) => D(wo)(n)
2522
2522
  },
2523
2523
  animation: 150,
2524
2524
  "ghost-class": "tpl-ghost",
@@ -2528,28 +2528,28 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2528
2528
  "inverted-swap-threshold": .65,
2529
2529
  "empty-insert-threshold": 20,
2530
2530
  "force-fallback": !0,
2531
- class: w(["tpl:grow", {
2532
- "tpl:min-h-[60px]": H(f),
2533
- "tpl:min-h-[34px]": G(f)
2531
+ class: O(["tpl:grow", {
2532
+ "tpl:min-h-[60px]": M(d),
2533
+ "tpl:min-h-[34px]": B(d)
2534
2534
  }]),
2535
- onUpdate: (e) => C(Pa)(C(d), k(f), o.block.id, f, e),
2536
- onStart: (e) => L.value = f,
2537
- onEnd: s[0] ||= (e) => L.value = null,
2538
- "onUpdate:modelValue": (e) => K(f, e)
2535
+ onUpdate: (e) => D(Pa)(D(o), T(d), n.block.id, d, e),
2536
+ onStart: (e) => j.value = d,
2537
+ onEnd: u[0] ||= (e) => j.value = null,
2538
+ "onUpdate:modelValue": (e) => ne(d, e)
2539
2539
  }, {
2540
- default: a(() => [(i(!0), b(B, null, l(k(f), (r) => c((i(), b("div", { key: r.id }, [V(ho, {
2541
- block: r,
2542
- "display-block": C(p)(r),
2543
- "is-selected": C(d).state.selectedBlockId === r.id,
2544
- viewport: n.viewport,
2545
- "preview-mode": C(d).state.previewMode,
2540
+ default: l(() => [(c(!0), w(H, null, p(T(d), (t) => f((c(), w("div", { key: t.id }, [U(ho, {
2541
+ block: t,
2542
+ "display-block": D(s)(t),
2543
+ "is-selected": D(o).state.selectedBlockId === t.id,
2544
+ viewport: e.viewport,
2545
+ "preview-mode": D(o).state.previewMode,
2546
2546
  nested: "",
2547
- onSelect: (e) => x(r.id)
2547
+ onSelect: (e) => b(t.id)
2548
2548
  }, {
2549
- default: a(() => [(i(), D(t(ee(r)), e({ block: C(p)(r) }, { ref_for: !0 }, r.type === "section" ? { sourceBlock: r } : {}, {
2550
- viewport: n.viewport,
2551
- onFetchData: (e) => q(r, e),
2552
- onUpdate: (e) => C(d).updateBlock(r.id, e)
2549
+ default: l(() => [(c(), A(a(G(t)), i({ block: D(s)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
2550
+ viewport: e.viewport,
2551
+ onFetchData: (e) => re(t, e),
2552
+ onUpdate: (e) => D(o).updateBlock(t.id, e)
2553
2553
  }), null, 16, [
2554
2554
  "block",
2555
2555
  "viewport",
@@ -2564,7 +2564,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2564
2564
  "viewport",
2565
2565
  "preview-mode",
2566
2566
  "onSelect"
2567
- ])])), [[I, M(r.id)]])), 128))]),
2567
+ ])])), [[z, E(t.id)]])), 128))]),
2568
2568
  _: 2
2569
2569
  }, 1032, [
2570
2570
  "model-value",
@@ -2573,14 +2573,14 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2573
2573
  "onUpdate",
2574
2574
  "onStart",
2575
2575
  "onUpdate:modelValue"
2576
- ]), W(f) ? (i(), b("div", Do, [A("span", null, j(C(u).section.dropHere), 1)])) : E("", !0)], 6))), 128))], 2)]));
2576
+ ]), R(d) ? (c(), w("div", Do, [N("span", null, P(D(r).section.dropHere), 1)])) : k("", !0)], 6))), 128))], 2)]));
2577
2577
  }
2578
2578
  }), ko = ["width", "height"], Ao = [
2579
2579
  "d",
2580
2580
  "stroke",
2581
2581
  "stroke-opacity",
2582
2582
  "stroke-width"
2583
- ], jo = ["d", "fill"], Mo = /* @__PURE__ */ n({
2583
+ ], jo = ["d", "fill"], Mo = /* @__PURE__ */ o({
2584
2584
  __name: "SocialIconSvg",
2585
2585
  props: {
2586
2586
  platform: {},
@@ -2589,14 +2589,14 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2589
2589
  iconSize: {}
2590
2590
  },
2591
2591
  setup(e) {
2592
- let t = e, n = N(() => pt[t.platform]), r = N(() => ht[t.iconSize]), a = N(() => Le(t.platform, t.iconTone)), o = N(() => Se(t.iconStyle, t.iconTone)), s = N(() => {
2592
+ let t = e, n = I(() => Mn[t.platform]), r = I(() => Pn[t.iconSize]), i = I(() => qe(t.platform, t.iconTone)), a = I(() => Me(t.iconStyle, t.iconTone)), o = I(() => {
2593
2593
  let e = {
2594
2594
  display: "inline-flex",
2595
2595
  alignItems: "center",
2596
2596
  justifyContent: "center",
2597
2597
  width: `${r.value}px`,
2598
2598
  height: `${r.value}px`
2599
- }, n = a.value.fill;
2599
+ }, n = i.value.fill;
2600
2600
  switch (t.iconStyle) {
2601
2601
  case "solid": return {
2602
2602
  ...e,
@@ -2608,7 +2608,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2608
2608
  backgroundColor: "transparent",
2609
2609
  border: `2px solid ${n}`,
2610
2610
  borderRadius: "4px",
2611
- ...o.value && { boxShadow: u(o.value) }
2611
+ ...a.value && { boxShadow: u(a.value) }
2612
2612
  };
2613
2613
  case "rounded": return {
2614
2614
  ...e,
@@ -2627,28 +2627,28 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2627
2627
  };
2628
2628
  default: return e;
2629
2629
  }
2630
- }), c = N(() => Ue(t.iconStyle)), l = N(() => Math.floor(r.value * c.value));
2630
+ }), s = I(() => $e(t.iconStyle)), l = I(() => Math.floor(r.value * s.value));
2631
2631
  function u(e) {
2632
2632
  let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
2633
2633
  return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
2634
2634
  }
2635
- let d = N(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? a.value.fill : a.value.onFill);
2636
- return (e, t) => (i(), b("span", { style: P(s.value) }, [(i(), b("svg", {
2635
+ let d = I(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
2636
+ return (e, t) => (c(), w("span", { style: L(o.value) }, [(c(), w("svg", {
2637
2637
  width: l.value,
2638
2638
  height: l.value,
2639
2639
  viewBox: "0 0 24 24",
2640
2640
  overflow: "visible",
2641
2641
  xmlns: "http://www.w3.org/2000/svg"
2642
- }, [o.value ? (i(), b("path", {
2642
+ }, [a.value ? (c(), w("path", {
2643
2643
  key: 0,
2644
2644
  "data-testid": "social-icon-halo",
2645
2645
  d: n.value.path,
2646
2646
  fill: "none",
2647
- stroke: o.value.color,
2648
- "stroke-opacity": o.value.opacity,
2649
- "stroke-width": o.value.width / c.value,
2647
+ stroke: a.value.color,
2648
+ "stroke-opacity": a.value.opacity,
2649
+ "stroke-width": a.value.width / s.value,
2650
2650
  "stroke-linejoin": "round"
2651
- }, null, 8, Ao)) : E("", !0), A("path", {
2651
+ }, null, 8, Ao)) : k("", !0), N("path", {
2652
2652
  d: n.value.path,
2653
2653
  fill: d.value
2654
2654
  }, null, 8, jo)], 8, ko))], 4));
@@ -2656,28 +2656,28 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2656
2656
  }), No = { class: "tpl:w-full" }, Po = ["href"], Fo = {
2657
2657
  key: 1,
2658
2658
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
2659
- }, Io = /* @__PURE__ */ n({
2659
+ }, Io = /* @__PURE__ */ o({
2660
2660
  __name: "SocialIconsBlock",
2661
2661
  props: {
2662
2662
  block: {},
2663
2663
  viewport: {}
2664
2664
  },
2665
2665
  setup(e) {
2666
- let t = e, { t: n } = Q(), r = N(() => ({
2666
+ let t = e, { t: n } = W(), r = I(() => ({
2667
2667
  display: "flex",
2668
2668
  flexWrap: "wrap",
2669
2669
  gap: `${t.block.spacing}px`,
2670
2670
  justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
2671
- })), a = N(() => t.block.icons.length > 0);
2672
- return (t, o) => (i(), b("div", No, [a.value ? (i(), b("div", {
2671
+ })), i = I(() => t.block.icons.length > 0);
2672
+ return (t, a) => (c(), w("div", No, [i.value ? (c(), w("div", {
2673
2673
  key: 0,
2674
- style: P(r.value)
2675
- }, [(i(!0), b(B, null, l(e.block.icons, (t) => (i(), b("a", {
2674
+ style: L(r.value)
2675
+ }, [(c(!0), w(H, null, p(e.block.icons, (t) => (c(), w("a", {
2676
2676
  key: t.id,
2677
2677
  href: t.url || "#",
2678
2678
  class: "tpl:cursor-default",
2679
- onClick: o[0] ||= k(() => {}, ["prevent"])
2680
- }, [V(Mo, {
2679
+ onClick: a[0] ||= M(() => {}, ["prevent"])
2680
+ }, [U(Mo, {
2681
2681
  platform: t.platform,
2682
2682
  "icon-style": e.block.iconStyle,
2683
2683
  "icon-tone": e.block.iconTone,
@@ -2687,7 +2687,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2687
2687
  "icon-style",
2688
2688
  "icon-tone",
2689
2689
  "icon-size"
2690
- ])], 8, Po))), 128))], 4)) : (i(), b("div", Fo, [V(C(It), { size: 16 }), A("span", null, j(C(n).social.addIcons), 1)]))]));
2690
+ ])], 8, Po))), 128))], 4)) : (c(), w("div", Fo, [U(D(ir), { size: 16 }), N("span", null, P(D(n).social.addIcons), 1)]))]));
2691
2691
  }
2692
2692
  }), Lo = { class: "tpl:w-full" }, Ro = {
2693
2693
  key: 0,
@@ -2696,22 +2696,22 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2696
2696
  "background-color": "var(--tpl-bg-hover)",
2697
2697
  color: "var(--tpl-text-dim)"
2698
2698
  }
2699
- }, zo = /* @__PURE__ */ n({
2699
+ }, zo = /* @__PURE__ */ o({
2700
2700
  __name: "SpacerBlock",
2701
2701
  props: {
2702
2702
  block: {},
2703
2703
  viewport: {}
2704
2704
  },
2705
2705
  setup(e) {
2706
- let t = e, n = Fn(Rn, "SpacerBlock"), r = N(() => ({
2706
+ let t = e, n = fn(hn, "SpacerBlock"), r = I(() => ({
2707
2707
  height: `${t.block.height}px`,
2708
2708
  minHeight: `${t.block.height}px`,
2709
2709
  ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
2710
2710
  }));
2711
- return (t, a) => (i(), b("div", Lo, [A("div", {
2712
- style: P(r.value),
2713
- class: w(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !C(n).state.previewMode }])
2714
- }, [C(n).state.previewMode ? E("", !0) : (i(), b("span", Ro, j(e.block.height) + "px ", 1))], 6)]));
2711
+ return (t, i) => (c(), w("div", Lo, [N("div", {
2712
+ style: L(r.value),
2713
+ class: O(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !D(n).state.previewMode }])
2714
+ }, [D(n).state.previewMode ? k("", !0) : (c(), w("span", Ro, P(e.block.height) + "px ", 1))], 6)]));
2715
2715
  }
2716
2716
  }), Bo = { class: "tpl:w-full" }, Vo = { key: 0 }, Ho = [
2717
2717
  "aria-label",
@@ -2724,7 +2724,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2724
2724
  ], Wo = {
2725
2725
  key: 1,
2726
2726
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
2727
- }, Go = /*#__PURE__*/ St(/* @__PURE__ */ n({
2727
+ }, Go = /*#__PURE__*/ gr(/* @__PURE__ */ o({
2728
2728
  __name: "TableBlock",
2729
2729
  props: {
2730
2730
  block: {},
@@ -2738,75 +2738,75 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
2738
2738
  updated(e, t) {
2739
2739
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
2740
2740
  }
2741
- }, n = e, { t: r } = Q(), a = Fn(Rn, "TableBlock"), o = Fn(gn, "TableBlock"), s = N(() => n.block.rows.length > 0), u = N(() => {
2741
+ }, n = e, { t: r } = W(), i = fn(hn, "TableBlock"), a = fn(Kt, "TableBlock"), o = I(() => n.block.rows.length > 0), s = I(() => {
2742
2742
  let e = {
2743
2743
  width: "100%",
2744
2744
  borderCollapse: "collapse",
2745
2745
  fontSize: `${n.block.fontSize}px`,
2746
2746
  textAlign: n.block.textAlign,
2747
- fontFamily: n.block.fontFamily ? o.resolveFontFamily(n.block.fontFamily) : "inherit"
2747
+ fontFamily: n.block.fontFamily ? a.resolveFontFamily(n.block.fontFamily) : "inherit"
2748
2748
  };
2749
2749
  return n.block.color && (e.color = n.block.color), e;
2750
- }), d = N(() => ({
2750
+ }), l = I(() => ({
2751
2751
  border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
2752
2752
  padding: `${n.block.cellPadding}px`,
2753
2753
  textAlign: n.block.textAlign
2754
- })), f = N(() => ({
2755
- ...d.value,
2754
+ })), u = I(() => ({
2755
+ ...l.value,
2756
2756
  fontWeight: "bold",
2757
2757
  backgroundColor: n.block.headerBackgroundColor || "transparent"
2758
- })), p = N(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), m = N(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
2758
+ })), d = I(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), m = I(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
2759
2759
  function h() {
2760
- a.selectBlock(n.block.id);
2760
+ i.selectBlock(n.block.id);
2761
2761
  }
2762
2762
  function g(e, t, r) {
2763
- let i = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
2763
+ let a = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
2764
2764
  ...n,
2765
2765
  cells: n.cells.map((e) => e.id === t ? {
2766
2766
  ...e,
2767
- content: i
2767
+ content: a
2768
2768
  } : e)
2769
2769
  } : n);
2770
- a.updateBlock(n.block.id, { rows: o });
2770
+ i.updateBlock(n.block.id, { rows: o });
2771
2771
  }
2772
- return (e, n) => (i(), b("div", Bo, [s.value ? (i(), b("table", {
2772
+ return (e, n) => (c(), w("div", Bo, [o.value ? (c(), w("table", {
2773
2773
  key: 0,
2774
- style: P(u.value),
2774
+ style: L(s.value),
2775
2775
  class: "tpl-table-editable"
2776
- }, [p.value ? (i(), b("thead", Vo, [A("tr", null, [(i(!0), b(B, null, l(p.value.cells, (e) => c((i(), b("th", {
2776
+ }, [d.value ? (c(), w("thead", Vo, [N("tr", null, [(c(!0), w(H, null, p(d.value.cells, (e) => f((c(), w("th", {
2777
2777
  key: e.id,
2778
- style: P(f.value),
2779
- "aria-label": C(r).table.cellPlaceholder,
2778
+ style: L(u.value),
2779
+ "aria-label": D(r).table.cellPlaceholder,
2780
2780
  contenteditable: "true",
2781
- "data-placeholder": C(r).table.cellPlaceholder,
2782
- onBlur: (t) => g(p.value.id, e.id, t),
2783
- onKeydown: n[0] ||= S(k((e) => e.target.blur(), ["prevent"]), ["enter"]),
2784
- onClick: k(h, ["stop"])
2785
- }, null, 44, Ho)), [[t, e.content]])), 128))])])) : E("", !0), A("tbody", null, [(i(!0), b(B, null, l(m.value, (e) => (i(), b("tr", { key: e.id }, [(i(!0), b(B, null, l(e.cells, (a) => c((i(), b("td", {
2786
- key: a.id,
2787
- style: P(d.value),
2788
- "aria-label": C(r).table.cellPlaceholder,
2781
+ "data-placeholder": D(r).table.cellPlaceholder,
2782
+ onBlur: (t) => g(d.value.id, e.id, t),
2783
+ onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
2784
+ onClick: M(h, ["stop"])
2785
+ }, null, 44, Ho)), [[t, e.content]])), 128))])])) : k("", !0), N("tbody", null, [(c(!0), w(H, null, p(m.value, (e) => (c(), w("tr", { key: e.id }, [(c(!0), w(H, null, p(e.cells, (i) => f((c(), w("td", {
2786
+ key: i.id,
2787
+ style: L(l.value),
2788
+ "aria-label": D(r).table.cellPlaceholder,
2789
2789
  contenteditable: "true",
2790
- "data-placeholder": C(r).table.cellPlaceholder,
2791
- onBlur: (t) => g(e.id, a.id, t),
2792
- onKeydown: n[1] ||= S(k((e) => e.target.blur(), ["prevent"]), ["enter"]),
2793
- onClick: k(h, ["stop"])
2794
- }, null, 44, Uo)), [[t, a.content]])), 128))]))), 128))])], 4)) : (i(), b("div", Wo, [V(C(Bt), { size: 16 }), A("span", null, j(C(r).table.empty), 1)]))]));
2790
+ "data-placeholder": D(r).table.cellPlaceholder,
2791
+ onBlur: (t) => g(e.id, i.id, t),
2792
+ onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
2793
+ onClick: M(h, ["stop"])
2794
+ }, null, 44, Uo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (c(), w("div", Wo, [U(D(cr), { size: 16 }), N("span", null, P(D(r).table.empty), 1)]))]));
2795
2795
  }
2796
- }), [["__scopeId", "data-v-6751d456"]]), Ko = /* @__PURE__ */ n({
2796
+ }), [["__scopeId", "data-v-6751d456"]]), Ko = /* @__PURE__ */ o({
2797
2797
  __name: "VideoPlayButton",
2798
2798
  props: { hoverEffect: {
2799
2799
  type: Boolean,
2800
2800
  default: !1
2801
2801
  } },
2802
2802
  setup(e) {
2803
- return (t, n) => (i(), b("div", { class: w(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [A("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [A("svg", {
2803
+ return (t, n) => (c(), w("div", { class: O(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [N("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [N("svg", {
2804
2804
  class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
2805
2805
  width: "28",
2806
2806
  height: "28",
2807
2807
  viewBox: "0 0 24 24",
2808
2808
  fill: "currentColor"
2809
- }, [A("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
2809
+ }, [N("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
2810
2810
  }
2811
2811
  });
2812
2812
  // src/utils/videoThumbnail.ts
@@ -2852,14 +2852,14 @@ var Yo = ["src", "alt"], Xo = {
2852
2852
  }, Zo = ["href"], Qo = ["src", "alt"], $o = ["src", "alt"], es = {
2853
2853
  key: 3,
2854
2854
  class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
2855
- }, ts = /* @__PURE__ */ n({
2855
+ }, ts = /* @__PURE__ */ o({
2856
2856
  __name: "VideoBlock",
2857
2857
  props: {
2858
2858
  block: {},
2859
2859
  viewport: {}
2860
2860
  },
2861
2861
  setup(e) {
2862
- let t = e, { t: n } = Q(), { syntax: r } = ir(), a = N(() => pe(t.block.url, r) || pe(t.block.thumbnailUrl, r)), o = ct(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = ct(() => a.value ? t.block.placeholderUrl : void 0), c = N(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : Jo(t.block.url)), l = N(() => ({ textAlign: t.block.align })), u = N(() => {
2862
+ let t = e, { t: n } = W(), { syntax: r } = G(), i = I(() => Ce(t.block.url, r) || Ce(t.block.thumbnailUrl, r)), a = Dn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Dn(() => i.value ? t.block.placeholderUrl : void 0), s = I(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Jo(t.block.url)), l = I(() => ({ textAlign: t.block.align })), u = I(() => {
2863
2863
  let e = t.block.align;
2864
2864
  return {
2865
2865
  maxWidth: "100%",
@@ -2869,55 +2869,55 @@ var Yo = ["src", "alt"], Xo = {
2869
2869
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
2870
2870
  marginRight: e === "center" ? "auto" : void 0
2871
2871
  };
2872
- }), d = N(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = N(() => pe(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
2873
- return (t, r) => (i(), b("div", {
2872
+ }), d = I(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = I(() => Ce(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
2873
+ return (t, r) => (c(), w("div", {
2874
2874
  class: "tpl:w-full",
2875
- style: P(l.value)
2876
- }, [a.value && e.block.placeholderUrl ? (i(), b("div", {
2875
+ style: L(l.value)
2876
+ }, [i.value && e.block.placeholderUrl ? (c(), w("div", {
2877
2877
  key: 0,
2878
2878
  class: "tpl:relative tpl:inline-block",
2879
- style: P(u.value)
2880
- }, [A("img", {
2879
+ style: L(u.value)
2880
+ }, [N("img", {
2881
2881
  class: "tpl:block tpl:w-full tpl:border-0",
2882
- src: C(s),
2882
+ src: D(o),
2883
2883
  alt: e.block.alt,
2884
- style: P(d.value)
2885
- }, null, 12, Yo), V(Ko)], 4)) : a.value ? (i(), b("div", {
2884
+ style: L(d.value)
2885
+ }, null, 12, Yo), U(Ko)], 4)) : i.value ? (c(), w("div", {
2886
2886
  key: 1,
2887
2887
  class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
2888
- style: P([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
2889
- }, [V(C(zt), {
2888
+ style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
2889
+ }, [U(D(sr), {
2890
2890
  size: 36,
2891
2891
  "stroke-width": 1.5,
2892
2892
  class: "tpl:text-[var(--tpl-primary)]",
2893
2893
  style: { opacity: "0.5" }
2894
- }), A("span", Xo, [V(Ki, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (i(), b(B, { key: 2 }, [e.block.url ? (i(), b("a", {
2894
+ }), N("span", Xo, [U(Ki, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (c(), w(H, { key: 2 }, [e.block.url ? (c(), w("a", {
2895
2895
  key: 0,
2896
2896
  href: e.block.url,
2897
2897
  target: "_blank",
2898
2898
  rel: "noopener noreferrer",
2899
2899
  class: "tpl:group tpl:relative tpl:inline-block",
2900
- style: P(u.value),
2901
- onClick: r[0] ||= k(() => {}, ["prevent"])
2902
- }, [A("img", {
2900
+ style: L(u.value),
2901
+ onClick: r[0] ||= M(() => {}, ["prevent"])
2902
+ }, [N("img", {
2903
2903
  class: "tpl:block tpl:w-full tpl:border-0",
2904
- src: c.value,
2904
+ src: s.value,
2905
2905
  alt: e.block.alt,
2906
- style: P(d.value)
2907
- }, null, 12, Qo), V(Ko, { "hover-effect": "" })], 12, Zo)) : (i(), b("div", {
2906
+ style: L(d.value)
2907
+ }, null, 12, Qo), U(Ko, { "hover-effect": "" })], 12, Zo)) : (c(), w("div", {
2908
2908
  key: 1,
2909
2909
  class: "tpl:relative tpl:inline-block",
2910
- style: P(u.value)
2911
- }, [A("img", {
2910
+ style: L(u.value)
2911
+ }, [N("img", {
2912
2912
  class: "tpl:block tpl:w-full tpl:border-0",
2913
- src: c.value,
2913
+ src: s.value,
2914
2914
  alt: e.block.alt,
2915
- style: P(d.value)
2916
- }, null, 12, $o), V(Ko)], 4))], 64)) : (i(), b("div", es, [V(C(zt), {
2915
+ style: L(d.value)
2916
+ }, null, 12, $o), U(Ko)], 4))], 64)) : (c(), w("div", es, [U(D(sr), {
2917
2917
  size: 40,
2918
2918
  "stroke-width": 1.5,
2919
2919
  class: "tpl:text-[var(--tpl-border-light)]"
2920
- }), A("span", null, j(C(n).video.addVideo), 1)]))], 4));
2920
+ }), N("span", null, P(D(n).video.addVideo), 1)]))], 4));
2921
2921
  }
2922
2922
  }), ns = {
2923
2923
  section: Oo,
@@ -2932,170 +2932,170 @@ var Yo = ["src", "alt"], Xo = {
2932
2932
  table: Go,
2933
2933
  spacer: zo,
2934
2934
  html: ma,
2935
- countdown: g(() => import("./CountdownBlock-DyGsh92b.js"))
2935
+ countdown: b(() => import("./CountdownBlock-8aPSExrv.js"))
2936
2936
  };
2937
- function rs(e) {
2938
- let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: c } = Q(r), l = N(() => Oe(Oe(Oe(ri(r), Ci(t.content.value.settings?.locale)), Te(t.content.value.settings) === "rtl" ? {
2937
+ function rs(t) {
2938
+ let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = W(i), c = I(() => Re(Re(Re(ri(i), Ci(n.content.value.settings?.locale)), Fe(n.content.value.settings) === "rtl" ? {
2939
2939
  title: { textAlign: "right" },
2940
2940
  table: { textAlign: "right" }
2941
- } : {}), n.blockDefaults ?? {}));
2942
- t.setUiTheme(n.uiTheme ?? "auto");
2943
- let { resolvedTheme: u } = Jr(N(() => t.state.uiTheme)), d = z(n.theme ?? {}), { themeStyles: f } = Dr({
2944
- themeOverrides: d,
2945
- resolvedTheme: u,
2941
+ } : {}), r.blockDefaults ?? {}));
2942
+ n.setUiTheme(r.uiTheme ?? "auto");
2943
+ let { resolvedTheme: l } = Jr(I(() => n.state.uiTheme)), f = V(r.theme ?? {}), { themeStyles: p } = Dr({
2944
+ themeOverrides: f,
2945
+ resolvedTheme: l,
2946
2946
  extraStyles: () => ({
2947
- "--tpl-drop-text": `"${r.canvas.dropHere}"`,
2948
- ...e.themeExtraStyles?.()
2947
+ "--tpl-drop-text": `"${i.canvas.dropHere}"`,
2948
+ ...t.themeExtraStyles?.()
2949
2949
  })
2950
- }), p = e.history ?? nt({
2951
- content: t.content,
2952
- setContent: (e, n) => t.setContent(e, n)
2950
+ }), m = t.history ?? xn({
2951
+ content: n.content,
2952
+ setContent: (e, t) => n.setContent(e, t)
2953
2953
  });
2954
- e.history || ot(t, p);
2955
- let h = xt({
2956
- addBlock: t.addBlock,
2957
- removeBlock: t.removeBlock,
2958
- updateBlock: t.updateBlock,
2959
- selectBlock: t.selectBlock,
2960
- findBlockLocation: t.findBlockLocation,
2961
- blockDefaults: () => l.value
2962
- }), g = at(t), _ = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? st({
2963
- content: t.content,
2964
- isDirty: () => t.state.isDirty,
2965
- ...e.autoSaveOptions
2966
- }) : null, v = null;
2967
- _ && (v = o(p.isNavigating, (e) => {
2954
+ t.history || Tn(n, m);
2955
+ let h = Bn({
2956
+ addBlock: n.addBlock,
2957
+ removeBlock: n.removeBlock,
2958
+ updateBlock: n.updateBlock,
2959
+ selectBlock: n.selectBlock,
2960
+ findBlockLocation: n.findBlockLocation,
2961
+ blockDefaults: () => c.value
2962
+ }), g = wn(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? En({
2963
+ content: n.content,
2964
+ isDirty: () => n.state.isDirty,
2965
+ ...t.autoSaveOptions
2966
+ }) : null, y = null;
2967
+ _ && (y = u(m.isNavigating, (e) => {
2968
2968
  e ? _.pause() : _.resume();
2969
2969
  }));
2970
- let b = qr(t, {
2971
- t: a,
2972
- format: c
2973
- }, n.customBlocks ?? []), x = sr(n.colors);
2970
+ let b = qr(n, {
2971
+ t: o,
2972
+ format: s
2973
+ }, r.customBlocks ?? []), x = mt(r.colors);
2974
2974
  if (x.allowCustomIgnored && $.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), x.invalidPresets.length > 0 && $.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
2975
- let e = ni(x.presets, n.blockDefaults, n.templateDefaults);
2975
+ let e = ni(x.presets, r.blockDefaults, r.templateDefaults);
2976
2976
  e.length > 0 && $.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
2977
2977
  }
2978
- let S = fr(n.templateSettings);
2979
- for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${pr.join(", ")}) — skipping it.`);
2980
- let C = xr();
2981
- $r(C, ns);
2982
- let w = /* @__PURE__ */ new Set();
2983
- function T(e) {
2978
+ let S = Vn(r.templateSettings);
2979
+ for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Hn.join(", ")}) — skipping it.`);
2980
+ let w = xr();
2981
+ $r(w, ns);
2982
+ let T = /* @__PURE__ */ new Set();
2983
+ function E(e) {
2984
2984
  for (let t of e) {
2985
- C.registerCustom(t, oa);
2986
- for (let e of wi(t, x)) w.has(e.id) || (w.add(e.id), $.warn(e.message));
2985
+ w.registerCustom(t, oa);
2986
+ for (let e of wi(t, x)) T.has(e.id) || (T.add(e.id), $.warn(e.message));
2987
2987
  }
2988
2988
  }
2989
- n.customBlocks?.length && T(n.customBlocks);
2990
- let E = Rr();
2991
- if (y() && m(E.dispose), e.containerEl) {
2992
- let t = e.containerEl;
2993
- $n(document, "pointerdown", (e) => {
2994
- let n = t.value;
2995
- n && (e.composedPath?.() ?? []).includes(n) && E.claim();
2989
+ r.customBlocks?.length && E(r.customBlocks);
2990
+ let D = Rr();
2991
+ if (C() && v(D.dispose), t.containerEl) {
2992
+ let n = t.containerEl;
2993
+ e(document, "pointerdown", (e) => {
2994
+ let t = n.value;
2995
+ t && (e.composedPath?.() ?? []).includes(t) && D.claim();
2996
2996
  }, { capture: !0 });
2997
2997
  }
2998
- function D() {
2999
- let t = e.capabilities?.templates;
3000
- t ? t.save() : _?.flush();
3001
- }
3002
- function O(n) {
3003
- E.isActive() && Ei(n, {
3004
- history: p,
3005
- selectBlock: (e) => t.selectBlock(e),
3006
- getSelectedBlockId: () => t.state.selectedBlockId,
3007
- removeBlock: (e) => t.removeBlock(e),
3008
- onSave: D,
3009
- isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
3010
- onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
3011
- onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
2998
+ function O() {
2999
+ let e = t.capabilities?.templates;
3000
+ e ? e.save() : _?.flush();
3001
+ }
3002
+ function ee(e) {
3003
+ D.isActive() && Ei(e, {
3004
+ history: m,
3005
+ selectBlock: (e) => n.selectBlock(e),
3006
+ getSelectedBlockId: () => n.state.selectedBlockId,
3007
+ removeBlock: (e) => n.removeBlock(e),
3008
+ onSave: O,
3009
+ isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
3010
+ onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
3011
+ onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
3012
3012
  });
3013
3013
  }
3014
- $n(document, "keydown", O);
3015
- let k = z(null), A = e.editorRoot ?? document;
3016
- s(Vn, A), s(jn, k), s(Kt, /* @__PURE__ */ new Map()), s(On, r), s(Rn, t), s(Bn, p), s(Pn, h), s(Dn, g), s(gn, i), s(In, f), s(hn, u), s(_n, l), s(Cn, n.locale), s(En, C), s(xn, n.customBlocks ?? []), s(Qt, n.paletteBlocks), s(on, ei(n.htmlBlockPreview)), s(sn, n.layout), s(fn, n.sectionWrapper), s(An, x), s(yn, S.fields), s(bn, Yr(t.content, C));
3017
- let j = Ke(n.mergeTags?.syntax);
3014
+ e(document, "keydown", ee);
3015
+ let k = V(null), A = t.editorRoot ?? document;
3016
+ d(vn, A), d(cn, k), d(Ct, /* @__PURE__ */ new Map()), d(an, i), d(hn, n), d(_n, m), d(dn, h), d(rn, g), d(Kt, a), d(pn, p), d(Gt, l), d(qt, c), d($t, r.locale), d(nn, w), d(Zt, r.customBlocks ?? []), d(kt, r.paletteBlocks), d(It, ei(r.htmlBlockPreview)), d(Lt, r.layout), d(Ht, r.sectionWrapper), d(sn, x), d(Yt, S.fields), d(Xt, Yr(n.content, w));
3017
+ let j = nt(r.mergeTags?.syntax);
3018
3018
  for (let e of ["opener", "closer"]) {
3019
3019
  let t = j[e];
3020
3020
  typeof t == "string" && t.trim() === "" && $.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
3021
3021
  }
3022
- typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && he(j) === null && $.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
3023
- let M = F(n.mergeTags?.tags ?? []);
3024
- function P(e) {
3022
+ typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && Te(j) === null && $.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
3023
+ let M = R(r.mergeTags?.tags ?? []);
3024
+ function N(e) {
3025
3025
  Array.isArray(e) ? M.value = e : $.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
3026
3026
  }
3027
- s(rn, M), s(Wt, j), s(Jt, n.mergeTags?.onRequest ?? null), s(qt, n.mergeTags?.autocomplete !== !1), s(Hn, n.mergeTags?.showRawValue !== !1);
3028
- let I = z(me(n.mergeTags?.tags ?? []));
3029
- s(an, I);
3030
- let L = Vr({
3031
- resolvePreview: n.resolvePreview,
3027
+ d(Pt, M), d(xt, j), d(Tt, r.mergeTags?.onRequest ?? null), d(wt, r.mergeTags?.autocomplete !== !1), d(yn, r.mergeTags?.showRawValue !== !1);
3028
+ let P = V(we(r.mergeTags?.tags ?? []));
3029
+ d(Ft, P);
3030
+ let F = Vr({
3031
+ resolvePreview: r.resolvePreview,
3032
3032
  getContent: () => {
3033
- let e = t.content.value;
3034
- if (!t.state.previewMode) return e;
3035
- let r = t.activeLocale?.value ?? e.settings.locale ?? "en", i = Z(e, r);
3036
- return n.layout ? Re(Z(n.layout, r, { missing: "default" }), i) : i;
3033
+ let e = n.content.value;
3034
+ if (!n.state.previewMode) return e;
3035
+ let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = ve(e, t);
3036
+ return r.layout ? Je(ve(r.layout, t, { missing: "default" }), i) : i;
3037
3037
  },
3038
- isActive: () => t.state.previewMode,
3039
- getLocale: () => t.activeLocale?.value ?? t.content.value.settings.locale
3038
+ isActive: () => n.state.previewMode,
3039
+ getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
3040
3040
  });
3041
- s(Zt, L), s(dn, n.resolvePreview);
3042
- let R = N(() => !(t.state.previewMode && L.isConfigured));
3043
- s(mn, R);
3044
- let B = Hr();
3045
- s(Xt, B), s($t, z(!1)), s(tn, z(!1)), s(wn, n.logicTags?.tags ?? []), s(Ut, n.logicTags?.pairs ?? []), s(cn, n.logicTags?.onRequest ?? null), s(en, Ur()), s(un, n.onRequestMedia ?? null), s(Ln, n.canDropMedia ?? null), s(Gt, n.resolveImageUrl ? yt(n.resolveImageUrl) : null), n.displayConditions?.onRequest && (n.displayConditions.conditions !== void 0 || n.displayConditions.allowCustom !== void 0) && $.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), s(pn, n.displayConditions?.conditions ?? []), s(Mn, n.displayConditions?.allowCustom ?? !1), s(Yt, n.displayConditions?.onRequest ?? null), s(vn, e.capabilities ?? {}), s(zn, b);
3046
- let V = Wr(n.lint) ? null : Kr({
3047
- content: t.content,
3041
+ d(Ot, F), d(Vt, r.resolvePreview);
3042
+ let L = I(() => !(n.state.previewMode && F.isConfigured));
3043
+ d(Wt, L);
3044
+ let z = Hr();
3045
+ d(Dt, z), d(At, V(!1)), d(Mt, V(!1)), d(en, r.logicTags?.tags ?? []), d(bt, r.logicTags?.pairs ?? []), d(Rt, r.logicTags?.onRequest ?? null), d(jt, Ur()), d(Bt, r.onRequestMedia ?? null), d(mn, r.canDropMedia ?? null), d(St, r.resolveImageUrl ? Rn(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && $.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), d(Ut, r.displayConditions?.conditions ?? []), d(ln, r.displayConditions?.allowCustom ?? !1), d(Et, r.displayConditions?.onRequest ?? null), d(Jt, t.capabilities ?? {}), d(gn, b);
3046
+ let B = Wr(r.lint) ? null : Kr({
3047
+ content: n.content,
3048
3048
  get options() {
3049
3049
  return zr({
3050
- ...n,
3051
- content: t.content.value,
3052
- contentLocale: t.activeLocale?.value ?? void 0
3050
+ ...r,
3051
+ content: n.content.value,
3052
+ contentLocale: n.activeLocale?.value ?? void 0
3053
3053
  });
3054
3054
  },
3055
- customBlocks: n.customBlocks,
3055
+ customBlocks: r.customBlocks,
3056
3056
  mergeTagSyntax: j,
3057
- updateBlock: t.updateBlock,
3058
- updateSettings: t.updateSettings,
3059
- removeBlock: t.removeBlock
3057
+ updateBlock: n.updateBlock,
3058
+ updateSettings: n.updateSettings,
3059
+ removeBlock: n.removeBlock
3060
3060
  });
3061
- s(Ht, V);
3062
- function H() {
3063
- v?.(), V?.destroy(), _?.destroy(), p.destroy();
3061
+ d(yt, B);
3062
+ function te() {
3063
+ y?.(), B?.destroy(), _?.destroy(), m.destroy();
3064
3064
  }
3065
3065
  return {
3066
- t: a,
3067
- format: c,
3066
+ t: o,
3067
+ format: s,
3068
3068
  editorRoot: A,
3069
- history: p,
3069
+ history: m,
3070
3070
  blockActions: h,
3071
3071
  conditionPreview: g,
3072
3072
  autoSave: _,
3073
- resolvedTheme: u,
3074
- themeStyles: f,
3075
- themeOverrides: d,
3076
- registry: C,
3073
+ resolvedTheme: l,
3074
+ themeStyles: p,
3075
+ themeOverrides: f,
3076
+ registry: w,
3077
3077
  keyboardReorder: b,
3078
- templateLint: V,
3078
+ templateLint: B,
3079
3079
  popoverRoot: k,
3080
- mergeTagSampleMode: I,
3081
- previewResolution: L,
3082
- appliesConditionFilter: R,
3083
- registerCustomBlocks: T,
3084
- setMergeTags: P,
3080
+ mergeTagSampleMode: P,
3081
+ previewResolution: F,
3082
+ appliesConditionFilter: L,
3083
+ registerCustomBlocks: E,
3084
+ setMergeTags: N,
3085
3085
  mergeTags: M,
3086
3086
  mergeTagSyntax: j,
3087
- destroy: H
3087
+ destroy: te
3088
3088
  };
3089
3089
  }
3090
3090
  // src/composables/useSmallScreenNotice.ts
3091
3091
  var is = "(max-width: 767px)";
3092
3092
  function as(e) {
3093
- let t = er(is);
3093
+ let n = t(is);
3094
3094
  return {
3095
- isSmallScreen: t,
3096
- showNotice: N(() => (M(e) ?? !0) && t.value)
3095
+ isSmallScreen: n,
3096
+ showNotice: I(() => (F(e) ?? !0) && n.value)
3097
3097
  };
3098
3098
  }
3099
3099
  export { yi as A, Tr as B, Hi as C, Wi as D, Di as E, mi as F, yr as H, Vr as I, zr as L, _i as M, gi as N, Oi as O, hi as P, Pr as R, Ni as S, Ri as T, br as V, ca as _, zo as a, Ji as b, vo as c, ho as d, Pa as f, ma as g, Ea as h, Go as i, vi as j, di as k, xo as l, Aa as m, rs as n, Io as o, Na as p, ts as r, Oo as s, as as t, _o as u, oa as v, Li as w, Ai as x, Zi as y, Mr as z };
3100
3100
 
3101
- //# sourceMappingURL=composables-CsfQlmcf.js.map
3101
+ //# sourceMappingURL=composables-D3lsO7Io.js.map