@templatical/editor 0.54.2 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/{AiAltTextPopover-BBKVJ6HA.js → AiAltTextPopover-D5QosKvB.js} +1 -1
  2. package/dist/{AiAltTextReview-BuVbeQh-.js → AiAltTextReview-D1W_lrI_.js} +1 -1
  3. package/dist/{AiRewriteMenu-ZpYJfm-O.js → AiRewriteMenu-BwztoMov.js} +4 -4
  4. package/dist/{BlockPreviewCanvas-DtOo5y3U.js → BlockPreviewCanvas-C23A6FRm.js} +4 -4
  5. package/dist/{CloudPanels-DQRWMc59.js → CloudPanels-Baoaj6Xf.js} +1 -1
  6. package/dist/{CountdownToolbar-DTpMEDyh.js → CountdownToolbar-CA_gDIdZ.js} +4 -4
  7. package/dist/{IssuesPanel-BZn7-p9e.js → IssuesPanel-nmFhWG1p.js} +1 -1
  8. package/dist/{LanguageMenu-OOmQWVzO.js → LanguageMenu-DcABUYop.js} +3 -3
  9. package/dist/{LogicTagInsertButton-XESwnJia.js → LogicTagInsertButton-qZ82VMFx.js} +284 -279
  10. package/dist/{MergeTagInput-CAsBRoSm.js → MergeTagInput-JJeZbFkD.js} +1 -1
  11. package/dist/{MergeTagModeToggle-bOf27Hg1.js → MergeTagModeToggle-DDucd1eC.js} +1 -1
  12. package/dist/{MergeTagTextarea-DH_6JFui.js → MergeTagTextarea-dQ2LRrNB.js} +2 -2
  13. package/dist/{ParagraphEditor-XGUkV5Uw.js → ParagraphEditor-VXYwGoz_.js} +8 -8
  14. package/dist/{RestoreVersionDialog-C72kWccI.js → RestoreVersionDialog-BibNvAaJ.js} +1 -1
  15. package/dist/{RichTextEditorContent-BZN8KRvR.js → RichTextEditorContent-CU5EOlM_.js} +2 -2
  16. package/dist/{SaveBlockDialog-CKOnTMTU.js → SaveBlockDialog-S9aFi0cy.js} +4 -4
  17. package/dist/{SavedBlocksBrowserModal-BrlNxqDH.js → SavedBlocksBrowserModal-DIdn6B0J.js} +4 -4
  18. package/dist/{SavedBlocksPanels--lPR6gdh.js → SavedBlocksPanels-Cme2M6u8.js} +1 -1
  19. package/dist/{SavedBlocksPickBar-4ON4_KKl.js → SavedBlocksPickBar-BDmA7r3m.js} +1 -1
  20. package/dist/{TemplateSettings-BE0jZmRJ.js → TemplateSettings-C_LHLm5M.js} +4 -4
  21. package/dist/{TestEmailModal-BKmNGrZN.js → TestEmailModal-CLIRn7eL.js} +5 -5
  22. package/dist/{TestEmailPanel-DT1wllX3.js → TestEmailPanel-frdtjC8h.js} +1 -1
  23. package/dist/{TitleEditor-HjVZuUTB.js → TitleEditor-D5kC56Jl.js} +4 -4
  24. package/dist/{Toolbar-BppchV2k.js → Toolbar-D904Yw_R.js} +551 -503
  25. package/dist/{TplModal-BFWOoK8l.js → TplModal-BBdotDf1.js} +1 -1
  26. package/dist/{VersionHistoryPanels-D4yNVLvq.js → VersionHistoryPanels-DhagEgOk.js} +1 -1
  27. package/dist/{WrapperBlock-BUzQTZuu.js → WrapperBlock-BAT3T0Cz.js} +3 -3
  28. package/dist/{blockTypeIcons-D91v9k0x.js → blockTypeIcons-CoRQV_hP.js} +1 -1
  29. package/dist/bundle-stats.json +6 -6
  30. package/dist/{cdn/chunks/ca-DOuIxWRv.js → ca-DIkMxYCN.js} +10 -3
  31. package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js → AiAltTextPopover-CUGOPuRo.js} +2 -2
  32. package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js.map → AiAltTextPopover-CUGOPuRo.js.map} +1 -1
  33. package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js → AiAltTextReview-B9vm_L-8.js} +2 -2
  34. package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js.map → AiAltTextReview-B9vm_L-8.js.map} +1 -1
  35. package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js → AiRewriteMenu-BvV_7tNZ.js} +7 -7
  36. package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js.map → AiRewriteMenu-BvV_7tNZ.js.map} +1 -1
  37. package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js → BlockPreviewCanvas-Dr-xGq6v.js} +7 -7
  38. package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js.map → BlockPreviewCanvas-Dr-xGq6v.js.map} +1 -1
  39. package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js → CloudPanels-CQ0vNgsH.js} +2 -2
  40. package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js.map → CloudPanels-CQ0vNgsH.js.map} +1 -1
  41. package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js → CountdownToolbar-BxW-J7DX.js} +5 -5
  42. package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js.map → CountdownToolbar-BxW-J7DX.js.map} +1 -1
  43. package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js → IssuesPanel-BoHeIjvw.js} +3 -3
  44. package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js.map → IssuesPanel-BoHeIjvw.js.map} +1 -1
  45. package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js → LanguageMenu-BnYN5N1h.js} +7 -7
  46. package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js.map → LanguageMenu-BnYN5N1h.js.map} +1 -1
  47. package/dist/cdn/chunks/{LogicTagInsertButton-PDKuo2J3.js → LogicTagInsertButton-Bt2PXbQ0.js} +255 -250
  48. package/dist/cdn/chunks/LogicTagInsertButton-Bt2PXbQ0.js.map +1 -0
  49. package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js → MergeTagInput-BELdMRni.js} +2 -2
  50. package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js.map → MergeTagInput-BELdMRni.js.map} +1 -1
  51. package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js → MergeTagModeToggle-DKfMDIEF.js} +2 -2
  52. package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js.map → MergeTagModeToggle-DKfMDIEF.js.map} +1 -1
  53. package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js → MergeTagTextarea-w6xen3Xh.js} +5 -5
  54. package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js.map → MergeTagTextarea-w6xen3Xh.js.map} +1 -1
  55. package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js → ParagraphEditor-Cal9hY3U.js} +9 -9
  56. package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js.map → ParagraphEditor-Cal9hY3U.js.map} +1 -1
  57. package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js → RestoreVersionDialog-f_ulmASY.js} +2 -2
  58. package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js.map → RestoreVersionDialog-f_ulmASY.js.map} +1 -1
  59. package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js → RichTextEditorContent-C_v0kS4A.js} +3 -3
  60. package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js.map → RichTextEditorContent-C_v0kS4A.js.map} +1 -1
  61. package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js → SaveBlockDialog-C6N9RFls.js} +5 -5
  62. package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js.map → SaveBlockDialog-C6N9RFls.js.map} +1 -1
  63. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js → SavedBlocksBrowserModal-Bl2sl09D.js} +4 -4
  64. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js.map → SavedBlocksBrowserModal-Bl2sl09D.js.map} +1 -1
  65. package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js → SavedBlocksPanels-DqVcmEUK.js} +2 -2
  66. package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js.map → SavedBlocksPanels-DqVcmEUK.js.map} +1 -1
  67. package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js → SavedBlocksPickBar-DE-J1JVL.js} +2 -2
  68. package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js.map → SavedBlocksPickBar-DE-J1JVL.js.map} +1 -1
  69. package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js → TemplateSettings-CpoKZ8oV.js} +5 -5
  70. package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js.map → TemplateSettings-CpoKZ8oV.js.map} +1 -1
  71. package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js → TestEmailModal-DI3z__Bd.js} +8 -8
  72. package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js.map → TestEmailModal-DI3z__Bd.js.map} +1 -1
  73. package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js → TestEmailPanel-Cp5d2YGn.js} +2 -2
  74. package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js.map → TestEmailPanel-Cp5d2YGn.js.map} +1 -1
  75. package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js → TitleEditor-C2syRLdZ.js} +4 -4
  76. package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js.map → TitleEditor-C2syRLdZ.js.map} +1 -1
  77. package/dist/cdn/chunks/{Toolbar-Cv6Rv1S-.js → Toolbar-NEE8qxYh.js} +754 -706
  78. package/dist/cdn/chunks/Toolbar-NEE8qxYh.js.map +1 -0
  79. package/dist/cdn/chunks/{TplModal-DGpGdwgf.js → TplModal-B1MgvtX8.js} +2 -2
  80. package/dist/cdn/chunks/{TplModal-DGpGdwgf.js.map → TplModal-B1MgvtX8.js.map} +1 -1
  81. package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js → VersionHistoryPanels-Cefd8i_e.js} +2 -2
  82. package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js.map → VersionHistoryPanels-Cefd8i_e.js.map} +1 -1
  83. package/dist/cdn/chunks/{WrapperBlock-C_uE5rPJ.js → WrapperBlock-DFY-7YSs.js} +4 -4
  84. package/dist/cdn/chunks/{WrapperBlock-C_uE5rPJ.js.map → WrapperBlock-DFY-7YSs.js.map} +1 -1
  85. package/dist/{ca-DOuIxWRv.js → cdn/chunks/ca-DIkMxYCN.js} +12 -1
  86. package/dist/cdn/chunks/{ca-DOuIxWRv.js.map → ca-DIkMxYCN.js.map} +1 -1
  87. package/dist/cdn/chunks/{composables-BxikPuC1.js → composables-nyxwrM27.js} +610 -594
  88. package/dist/cdn/chunks/composables-nyxwrM27.js.map +1 -0
  89. package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js → createCloudRuntime-DJkDGKQ_.js} +3 -3
  90. package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js.map → createCloudRuntime-DJkDGKQ_.js.map} +1 -1
  91. package/dist/{de-DaOUfYBX.js → cdn/chunks/de-Cc6Ue0UD.js} +12 -1
  92. package/dist/cdn/chunks/de-Cc6Ue0UD.js.map +1 -0
  93. package/dist/cdn/chunks/{en-C0pHHMiR.js → en-BX4FujAQ.js} +11 -2
  94. package/dist/cdn/chunks/en-BX4FujAQ.js.map +1 -0
  95. package/dist/{es-CxyEKr6n.js → cdn/chunks/es-Do5b-MKU.js} +12 -1
  96. package/dist/cdn/chunks/es-Do5b-MKU.js.map +1 -0
  97. package/dist/cdn/chunks/{extensions-DuDWpKo7.js → extensions-BcwkOjVq.js} +76 -70
  98. package/dist/cdn/chunks/extensions-BcwkOjVq.js.map +1 -0
  99. package/dist/{fr-CYbamiI6.js → cdn/chunks/fr-S1n2Ebzp.js} +12 -1
  100. package/dist/cdn/chunks/fr-S1n2Ebzp.js.map +1 -0
  101. package/dist/cdn/chunks/{ja-DfaIAoGI.js → ja-DLwcq4bA.js} +11 -2
  102. package/dist/cdn/chunks/ja-DLwcq4bA.js.map +1 -0
  103. package/dist/{nl-DkrB-VKZ.js → cdn/chunks/nl-0JSWaZpT.js} +12 -1
  104. package/dist/cdn/chunks/nl-0JSWaZpT.js.map +1 -0
  105. package/dist/cdn/chunks/{normalizeMergeTagMarkup-Bn_hl4jd.js → normalizeMergeTagMarkup-BrGw5jxk.js} +99 -89
  106. package/dist/cdn/chunks/normalizeMergeTagMarkup-BrGw5jxk.js.map +1 -0
  107. package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js → preRenderCustomBlocks-Cj0XYwuh.js} +4 -4
  108. package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js.map → preRenderCustomBlocks-Cj0XYwuh.js.map} +1 -1
  109. package/dist/{pt-BR-CY5Ye7eP.js → cdn/chunks/pt-BR-D3VlIMDZ.js} +12 -1
  110. package/dist/cdn/chunks/pt-BR-D3VlIMDZ.js.map +1 -0
  111. package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js → sanitizeHtml-GxJCxKcP.js} +3 -3
  112. package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js.map → sanitizeHtml-GxJCxKcP.js.map} +1 -1
  113. package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js → socialIcons-B5zrrV8-.js} +387 -386
  114. package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js.map → socialIcons-B5zrrV8-.js.map} +1 -1
  115. package/dist/cdn/chunks/{src-712f3ofG.js → src-Diw9SLIe.js} +673 -554
  116. package/dist/cdn/chunks/src-Diw9SLIe.js.map +1 -0
  117. package/dist/cdn/chunks/{src-B2tQbzf6.js → src-UR3AQocX.js} +221 -215
  118. package/dist/cdn/chunks/src-UR3AQocX.js.map +1 -0
  119. package/dist/cdn/chunks/{src-ZFw5fg_z.js → src-v47QHNmB.js} +809 -659
  120. package/dist/cdn/chunks/src-v47QHNmB.js.map +1 -0
  121. package/dist/cdn/chunks/useLocalizedDisplay-DekV8qar.js +33 -0
  122. package/dist/cdn/chunks/{useLocalizedDisplay-DiNjT22M.js.map → useLocalizedDisplay-DekV8qar.js.map} +1 -1
  123. package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js → useLogicTag-Cbp3I7UN.js} +2 -2
  124. package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js.map → useLogicTag-Cbp3I7UN.js.map} +1 -1
  125. package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js → useMergeTag-1lrpNyR5.js} +4 -4
  126. package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js.map → useMergeTag-1lrpNyR5.js.map} +1 -1
  127. package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js → withCurrentFont-DZfmiv8V.js} +2 -2
  128. package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js.map → withCurrentFont-DZfmiv8V.js.map} +1 -1
  129. package/dist/cdn/editor.js +284 -284
  130. package/dist/cdn/editor.js.map +1 -1
  131. package/dist/{composables-BbPFRlBf.js → composables-DPgNn9GZ.js} +929 -913
  132. package/dist/{createCloudRuntime-Dlrg88gS.js → createCloudRuntime-Bw8TLmQ8.js} +2 -2
  133. package/dist/{cdn/chunks/de-DaOUfYBX.js → de-Cc6Ue0UD.js} +10 -3
  134. package/dist/{dist-C34cYI5S.js → dist-CBdk1Vcb.js} +963 -813
  135. package/dist/{en-C0pHHMiR.js → en-BX4FujAQ.js} +10 -1
  136. package/dist/{cdn/chunks/es-CxyEKr6n.js → es-Do5b-MKU.js} +10 -3
  137. package/dist/{extensions-xCiyqSg7.js → extensions-QFAARrjF.js} +338 -332
  138. package/dist/{cdn/chunks/fr-CYbamiI6.js → fr-S1n2Ebzp.js} +10 -3
  139. package/dist/index.d.ts +14 -1
  140. package/dist/{ja-DfaIAoGI.js → ja-DLwcq4bA.js} +10 -1
  141. package/dist/{cdn/chunks/nl-DkrB-VKZ.js → nl-0JSWaZpT.js} +10 -3
  142. package/dist/{normalizeMergeTagMarkup-C7FGNURu.js → normalizeMergeTagMarkup-BS0nRvhq.js} +89 -79
  143. package/dist/{preRenderCustomBlocks-DvbRa3L3.js → preRenderCustomBlocks-CiKvKd8V.js} +1 -1
  144. package/dist/{cdn/chunks/pt-BR-CY5Ye7eP.js → pt-BR-D3VlIMDZ.js} +10 -3
  145. package/dist/{sanitizeHtml-D_ab7dD6.js → sanitizeHtml-USjTyALR.js} +1 -1
  146. package/dist/{socialIcons-DhAolBjt.js → socialIcons-NvIg5ahU.js} +338 -337
  147. package/dist/templatical-editor.js +41 -41
  148. package/dist/{useLocalizedDisplay-C9MBFUr4.js → useLocalizedDisplay-LdjosX4w.js} +1 -1
  149. package/dist/{useLogicTag-BmuakZBd.js → useLogicTag-D8zgkXfb.js} +1 -1
  150. package/dist/{useMergeTag-DC4a8b_v.js → useMergeTag-k7Kr0nMd.js} +1 -1
  151. package/dist/{withCurrentFont-BSxJai99.js → withCurrentFont-Bzeg_gfH.js} +1 -1
  152. package/package.json +7 -7
  153. package/dist/cdn/chunks/LogicTagInsertButton-PDKuo2J3.js.map +0 -1
  154. package/dist/cdn/chunks/Toolbar-Cv6Rv1S-.js.map +0 -1
  155. package/dist/cdn/chunks/composables-BxikPuC1.js.map +0 -1
  156. package/dist/cdn/chunks/de-DaOUfYBX.js.map +0 -1
  157. package/dist/cdn/chunks/en-C0pHHMiR.js.map +0 -1
  158. package/dist/cdn/chunks/es-CxyEKr6n.js.map +0 -1
  159. package/dist/cdn/chunks/extensions-DuDWpKo7.js.map +0 -1
  160. package/dist/cdn/chunks/fr-CYbamiI6.js.map +0 -1
  161. package/dist/cdn/chunks/ja-DfaIAoGI.js.map +0 -1
  162. package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +0 -1
  163. package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js.map +0 -1
  164. package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +0 -1
  165. package/dist/cdn/chunks/src-712f3ofG.js.map +0 -1
  166. package/dist/cdn/chunks/src-B2tQbzf6.js.map +0 -1
  167. package/dist/cdn/chunks/src-ZFw5fg_z.js.map +0 -1
  168. package/dist/cdn/chunks/useLocalizedDisplay-DiNjT22M.js +0 -33
@@ -1,31 +1,31 @@
1
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, V as _, Y as v, _ as y, b, c as x, ct as S, dt as C, g as w, h as T, it as E, j as D, k as O, l as k, m as A, mt as j, n as M, nt as N, o as ee, p as P, pt as F, r as I, rt as L, s as te, t as R, tt as z, u as B, v as V, x as H, y as U } from "./chunks/draggable-DepKdldn.js";
2
- import { $t as ne, A as W, At as G, H as K, L as q, Lt as J, M as re, N as ie, Nt as ae, O as oe, Ot as se, P as ce, Qt as Y, Rt as X, St as le, Ut as Z, W as ue, X as de, Yt as Q, ct as fe, en as pe, et as me, i as he, j as ge, jt as _e, k as ve, kt as ye, lt as be, n as xe, nt as Se, tt as Ce, u as we, zt as Te } from "./chunks/src-ZFw5fg_z.js";
3
- import { A as Ee, D as De, E as Oe, M as ke, N as Ae, O as je, V as Me, _ as Ne, b as Pe, c as Fe, j as Ie, k as Le, l as Re } from "./chunks/socialIcons-DPwkrn5v.js";
2
+ import { At as W, B as G, Bt as K, D as q, F as J, Ft as Y, Gt as ne, H as re, Mt as ie, Nt as ae, S as oe, V as se, Vt as ce, W as le, X, Zt as ue, _ as Z, dt as de, en as Q, g as fe, h as pe, jt as me, k as he, m as ge, nn as _e, p as ve, tn as ye, ut as be, v as xe, wt as Se, y as Ce, z as we, zt as Te } from "./chunks/src-v47QHNmB.js";
3
+ import { A as Ee, D as De, E as Oe, M as ke, N as Ae, O as je, V as Me, _ as Ne, b as Pe, c as Fe, j as Ie, k as Le, l as Re } from "./chunks/socialIcons-B5zrrV8-.js";
4
4
  import { t as ze } from "./chunks/_plugin-vue_export-helper-Djzt4Yr7.js";
5
5
  import { $ as Be, A as Ve, Bt as He, D as Ue, Dt as We, E as Ge, F as Ke, It as qe, M as Je, Ot as Ye, P as Xe, Q as Ze, Vt as Qe, Y as $e, at as et, ct as tt, ft as nt, j as rt, mt as it, nt as at, q as ot, t as st, vt as ct, x as lt } from "./chunks/icons-Da9GKjPx.js";
6
6
  import { $ as ut, B as dt, E as ft, G as pt, I as mt, M as ht, O as gt, Q as _t, R as vt, Y as yt, Z as bt, a as xt, at as St, b as Ct, c as wt, d as Tt, et as Et, g as Dt, h as Ot, it as kt, k as At, l as jt, m as Mt, n as Nt, nt as Pt, ot as Ft, q as It, rt as Lt, t as Rt, v as zt, z as Bt } from "./chunks/keys-CoQtCqNv.js";
7
7
  import { t as $ } from "./chunks/useI18n-BnJYydPv.js";
8
- import { n as Vt, t as Ht } from "./chunks/useLocalizedDisplay-DiNjT22M.js";
8
+ import { n as Vt, t as Ht } from "./chunks/useLocalizedDisplay-DekV8qar.js";
9
9
  import { t as Ut } from "./chunks/plural-CyxrJXL1.js";
10
10
  import { t as Wt } from "./chunks/languageName-DEEOhDWI.js";
11
11
  import { C as Gt, T as Kt, b as qt, h as Jt, m as Yt, w as Xt, x as Zt } from "./chunks/styleConstants-CgiNKdnc.js";
12
12
  import { _ as Qt, d as $t, g as en } from "./chunks/dist-BzXULHvI.js";
13
13
  import { a as tn } from "./chunks/dist-DqGgijFI.js";
14
- import { A as nn, D as rn, E as an, F as on, M as sn, N as cn, O as ln, R as un, _ as dn, a as fn, b as pn, c as mn, d as hn, f as gn, g as _n, h as vn, i as yn, j as bn, k as xn, l as Sn, m as Cn, n as wn, o as Tn, p as En, r as Dn, s as On, t as kn, u as An, v as jn, w as Mn, y as Nn } from "./chunks/composables-BxikPuC1.js";
14
+ import { A as nn, D as rn, E as an, F as on, M as sn, N as cn, O as ln, R as un, _ as dn, a as fn, b as pn, c as mn, d as hn, f as gn, g as _n, h as vn, i as yn, j as bn, k as xn, l as Sn, m as Cn, n as wn, o as Tn, p as En, r as Dn, s as On, t as kn, u as An, v as jn, w as Mn, y as Nn } from "./chunks/composables-nyxwrM27.js";
15
15
  import { t as Pn } from "./chunks/logger-CqQTfJGx.js";
16
16
  import { t as Fn } from "./chunks/templateSettingsFields-cjlP-jdw.js";
17
- import { t as In } from "./chunks/sanitizeHtml-DfXoetOm.js";
18
- import { t as Ln } from "./chunks/TplModal-DGpGdwgf.js";
19
- import { a as Rn, i as zn, n as Bn, o as Vn, t as Hn } from "./chunks/normalizeMergeTagMarkup-Bn_hl4jd.js";
17
+ import { t as In } from "./chunks/sanitizeHtml-GxJCxKcP.js";
18
+ import { t as Ln } from "./chunks/TplModal-B1MgvtX8.js";
19
+ import { a as Rn, i as zn, n as Bn, o as Vn, t as Hn } from "./chunks/normalizeMergeTagMarkup-BrGw5jxk.js";
20
20
  import { t as Un } from "./chunks/aiErrors-C3QEMB0x.js";
21
21
  import { t as Wn } from "./chunks/formatAbsoluteDateTime-Ck2_zXra.js";
22
22
  import { n as Gn, t as Kn } from "./chunks/aiImageContext-BQ5mQ6B5.js";
23
23
  import { i as qn, n as Jn, r as Yn, t as Xn } from "./chunks/useScrollToBlock-Ct1AwLD-.js";
24
- import { t as Zn } from "./chunks/WrapperBlock-C_uE5rPJ.js";
24
+ import { t as Zn } from "./chunks/WrapperBlock-DFY-7YSs.js";
25
25
  import { t as Qn } from "./chunks/blockTypeIcons-Cc6RJ27V.js";
26
- import { n as $n, t as er } from "./chunks/MergeTagModeToggle-Ct5IG4VW.js";
26
+ import { n as $n, t as er } from "./chunks/MergeTagModeToggle-DKfMDIEF.js";
27
27
  import { t as tr } from "./chunks/formatRelativeTime-BTD8Ktt-.js";
28
- import { t as nr } from "./chunks/preRenderCustomBlocks-C9oavydG.js";
28
+ import { t as nr } from "./chunks/preRenderCustomBlocks-Cj0XYwuh.js";
29
29
  // src/utils/resolveTemplateDefaults.ts
30
30
  var rr = /^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i;
31
31
  function ir(e) {
@@ -71,7 +71,7 @@ var cr = /*#__PURE__*/ ze(ar, [["render", sr]]), lr = {
71
71
  change: {}
72
72
  },
73
73
  setup(e) {
74
- let t = e, { t: n, format: r } = $(), s = f(Lt, void 0) ?? "en", c = f(Ot, []), l = P(() => X(t.editor.content.value)), u = P(() => t.editor.activeLocale?.value ?? l.value), d = P(() => t.locales.includes(u.value)), p = f(Rt, null) ?? Ht(t.editor, c), m = P(() => d.value ? !p.value?.missing.length && !p.value?.stale.length ? n.localization.complete : r(n.localization.gapTooltip, {
74
+ let t = e, { t: n, format: r } = $(), s = f(Lt, void 0) ?? "en", c = f(Ot, []), l = P(() => K(t.editor.content.value)), u = P(() => t.editor.activeLocale?.value ?? l.value), d = P(() => t.locales.includes(u.value)), p = f(Rt, null) ?? Ht(t.editor, c), m = P(() => d.value ? !p.value?.missing.length && !p.value?.stale.length ? n.localization.complete : r(n.localization.gapTooltip, {
75
75
  missing: p.value.missing.length,
76
76
  stale: p.value.stale.length
77
77
  }) : r(n.localization.languageReadOnly, { language: Wt(u.value) })), h = P(() => {
@@ -196,9 +196,9 @@ function Or(e) {
196
196
  return { setDefaultLocale(n) {
197
197
  let r;
198
198
  try {
199
- r = [t.createSetDefaultLocaleOperation(n)], e.collaboration || G(t.content.value, r);
199
+ r = [t.createSetDefaultLocaleOperation(n)], e.collaboration || ie(t.content.value, r);
200
200
  } catch (e) {
201
- if (e instanceof _e) return {
201
+ if (e instanceof ae) return {
202
202
  applied: !1,
203
203
  error: e
204
204
  };
@@ -207,7 +207,7 @@ function Or(e) {
207
207
  if (e.collaboration) {
208
208
  let t = e.collaboration.core.applyOperations(r, {});
209
209
  if (!t.applied) return t;
210
- } else e.history().record(), ae(t.content.value, r), t.markDirty();
210
+ } else e.history().record(), Y(t.content.value, r), t.markDirty();
211
211
  return t.setActiveLocale(n), { applied: !0 };
212
212
  } };
213
213
  }
@@ -252,13 +252,13 @@ async function Nr(e, t) {
252
252
  function Pr(e) {
253
253
  let { editor: t } = e, n = L(null), r = L(null), i = null, a = L(!1), s = P(() => {
254
254
  let n = t.activeLocale.value;
255
- return !a.value && !!n && n !== X(t.content.value) && !!e.localization?.locales.includes(n) && !!t.content.value.settings.locales?.includes(n);
255
+ return !a.value && !!n && n !== K(t.content.value) && !!e.localization?.locales.includes(n) && !!t.content.value.settings.locales?.includes(n);
256
256
  }), c = P(() => {
257
257
  if (!s.value) return {
258
258
  gaps: 0,
259
259
  all: 0
260
260
  };
261
- let n = t.activeLocale.value, r = e.definitions(), i = e.coverage?.() ?? Z(t.content.value, n, r), a = /* @__PURE__ */ new Set([...i.missing, ...i.stale]), { strings: o } = Ce(t.content.value, n, {
261
+ let n = t.activeLocale.value, r = e.definitions(), i = e.coverage?.() ?? ne(t.content.value, n, r), a = /* @__PURE__ */ new Set([...i.missing, ...i.stale]), { strings: o } = G(t.content.value, n, {
262
262
  definitions: r,
263
263
  syntax: e.syntax(),
264
264
  doNotTranslate: e.localization?.doNotTranslate,
@@ -285,11 +285,11 @@ function Pr(e) {
285
285
  a.value = !0, u();
286
286
  });
287
287
  async function d(a) {
288
- if (i) throw new Y("A translation is already running.", 409, "translation_running");
289
- if (!s.value) throw new Y("Translation isn't available in this language.", 403, "feature_unavailable");
288
+ if (i) throw new Q("A translation is already running.", 409, "translation_running");
289
+ if (!s.value) throw new Q("Translation isn't available in this language.", 403, "feature_unavailable");
290
290
  let o = e.collaboration?.core;
291
291
  o?.flush();
292
- let c = t.activeLocale.value, l = t.state.template?.id ?? null, u = X(t.content.value), d = pe(E([...e.definitions()])), f = e.syntax(), p = e.localization?.doNotTranslate?.slice(), m = Ce(t.content.value, c, {
292
+ let c = t.activeLocale.value, l = t.state.template?.id ?? null, u = K(t.content.value), d = _e(E([...e.definitions()])), f = e.syntax(), p = e.localization?.doNotTranslate?.slice(), m = G(t.content.value, c, {
293
293
  ...a,
294
294
  definitions: d,
295
295
  syntax: f,
@@ -348,8 +348,8 @@ function Pr(e) {
348
348
  h.missing.push(e.id);
349
349
  continue;
350
350
  }
351
- let n = m.tokens[e.id], r = Se(t.text, n);
352
- r === null || e.format === "html" && !jr(r, Se(e.source, n)) ? h.tagsChanged.push(e.id) : _.push({
351
+ let n = m.tokens[e.id], r = se(t.text, n);
352
+ r === null || e.format === "html" && !jr(r, se(e.source, n)) ? h.tagsChanged.push(e.id) : _.push({
353
353
  id: e.id,
354
354
  text: e.format === "html" ? Mr(t.text) : t.text,
355
355
  sourceHash: e.sourceHash
@@ -369,7 +369,7 @@ function Pr(e) {
369
369
  try {
370
370
  if (!g.discarded) {
371
371
  o?.flush();
372
- let n = me(t.content.value, c, _, {
372
+ let n = we(t.content.value, c, _, {
373
373
  definitions: d,
374
374
  syntax: f,
375
375
  doNotTranslate: p,
@@ -392,7 +392,7 @@ function Pr(e) {
392
392
  let t = o.locksOf(e.blockId).some((e) => e.holder.sessionId !== o.sessionId && (e.locale == null || e.locale === c));
393
393
  return t && h.skippedLocked.push(...Object.keys(e.text ?? {}).map((t) => `${e.blockId}/${t}`)), !t;
394
394
  });
395
- s.length && (G(E(t.content.value), s), e.history().record(), ae(t.content.value, s), t.markDirty(), o?.flush(), h.translated = s.reduce((e, t) => e + (t.op === "updateBlockLocale" || t.op === "updateSettingsLocale" ? Object.keys(t.text ?? {}).length : 0), 0)), t.activeLocale.value === c && (r.value = h);
395
+ s.length && (ie(E(t.content.value), s), e.history().record(), Y(t.content.value, s), t.markDirty(), o?.flush(), h.translated = s.reduce((e, t) => e + (t.op === "updateBlockLocale" || t.op === "updateSettingsLocale" ? Object.keys(t.text ?? {}).length : 0), 0)), t.activeLocale.value === c && (r.value = h);
396
396
  }
397
397
  } finally {
398
398
  i = null, n.value = null;
@@ -637,7 +637,7 @@ function Br(e) {
637
637
  // src/composables/useAiFeature.ts
638
638
  var Vr = 3e3, Hr = 1e3;
639
639
  function Ur(e) {
640
- return pe(E(e));
640
+ return _e(E(e));
641
641
  }
642
642
  var Wr = (e) => e instanceof Error && e.name === "AbortError";
643
643
  function Gr(e) {
@@ -768,7 +768,7 @@ function Yr(e) {
768
768
  recoveries: /* @__PURE__ */ new Map()
769
769
  }, c.set(e, t)), t;
770
770
  }
771
- function K(e, t, n) {
771
+ function G(e, t, n) {
772
772
  let r = setTimeout(() => {
773
773
  e.timers.delete(r), t();
774
774
  }, n);
@@ -785,18 +785,18 @@ function Yr(e) {
785
785
  }
786
786
  let n = ++e.highlightSequence, i = new Map(e.highlights.value);
787
787
  for (let e of t) i.set(e, n);
788
- e.highlights.value = i, K(e, () => {
788
+ e.highlights.value = i, G(e, () => {
789
789
  let r = new Map(e.highlights.value);
790
790
  for (let e of t) r.get(e) === n && r.delete(e);
791
791
  e.highlights.value = r;
792
792
  }, Ir);
793
793
  }
794
- async function re(e) {
795
- r && await Promise.race([r.core.settle().catch(() => {}), new Promise((t) => K(e, t, Vr))]);
794
+ async function ne(e) {
795
+ r && await Promise.race([r.core.settle().catch(() => {}), new Promise((t) => G(e, t, Vr))]);
796
796
  }
797
- function ie(t) {
798
- let i = E(n.content.value), o = n.activeLocale?.value ?? null, s = Q(i, o ?? X(i));
799
- if (o === null && i.settings.locale === void 0 && delete s.settings.locale, new TextEncoder().encode(JSON.stringify(s)).length > 2e5) throw new Y("This template is too large for AI.", 413, "content_too_large");
797
+ function re(t) {
798
+ let i = E(n.content.value), o = n.activeLocale?.value ?? null, s = ue(i, o ?? K(i));
799
+ if (o === null && i.settings.locale === void 0 && delete s.settings.locale, new TextEncoder().encode(JSON.stringify(s)).length > 2e5) throw new Q("This template is too large for AI.", 413, "content_too_large");
800
800
  return {
801
801
  templateId: t,
802
802
  locale: o,
@@ -819,7 +819,7 @@ function Yr(e) {
819
819
  try {
820
820
  o = e.normalize(t, E(n.content.value));
821
821
  } catch (e) {
822
- if (e instanceof _e) return Jr(e);
822
+ if (e instanceof ae) return Jr(e);
823
823
  throw e;
824
824
  }
825
825
  if (o.length === 0) return {
@@ -839,14 +839,14 @@ function Yr(e) {
839
839
  }
840
840
  let c;
841
841
  try {
842
- c = G(E(n.content.value), o);
842
+ c = ie(E(n.content.value), o);
843
843
  } catch (e) {
844
- if (e instanceof _e) return Jr(e);
844
+ if (e instanceof ae) return Jr(e);
845
845
  throw e;
846
846
  }
847
847
  a.lastRecordedTurn !== i && (e.history().record(), a.lastRecordedTurn = i), d = !0;
848
848
  try {
849
- ae(n.content.value, pe(o)), n.markDirty();
849
+ Y(n.content.value, _e(o)), n.markDirty();
850
850
  } finally {
851
851
  d = !1;
852
852
  }
@@ -860,11 +860,11 @@ function Yr(e) {
860
860
  let o = t;
861
861
  try {
862
862
  if (a !== null) {
863
- if (e.localization && !e.localization.locales.includes(a)) throw new _e("invalid_operation", 0, `Locale "${a}" is not enabled.`);
863
+ if (e.localization && !e.localization.locales.includes(a)) throw new ae("invalid_operation", 0, `Locale "${a}" is not enabled.`);
864
864
  o = Ae(E(n.content.value), a, t, e.customBlockDefinitions?.());
865
865
  }
866
866
  } catch (e) {
867
- if (e instanceof _e) return Jr(e);
867
+ if (e instanceof ae) return Jr(e);
868
868
  throw e;
869
869
  }
870
870
  let s = se(o, r, i);
@@ -878,11 +878,11 @@ function Yr(e) {
878
878
  function le(e, t) {
879
879
  if (!r || !T(t)) return;
880
880
  let n = r.core;
881
- n.revision.value >= e || (n.connection.value === "connected" ? K(t, () => {
881
+ n.revision.value >= e || (n.connection.value === "connected" ? G(t, () => {
882
882
  T(t) && n.revision.value < e && n.catchUp();
883
883
  }, Hr) : n.catchUp());
884
884
  }
885
- function Z(e, t, n) {
885
+ function X(e, t, n) {
886
886
  let r = e.memory;
887
887
  r.items = r.items.map((e) => {
888
888
  if (e.id !== t) return e;
@@ -892,13 +892,13 @@ function Yr(e) {
892
892
  };
893
893
  return {
894
894
  ...i,
895
- ...ue(i, r)
895
+ ...Z(i, r)
896
896
  };
897
897
  });
898
898
  for (let e of r.recoveries.values()) e.item.id === t && (e.item = r.items.find((e) => e.id === (n.id ?? t)) ?? e.item);
899
899
  e.messages.value = r.items;
900
900
  }
901
- function ue(e, t) {
901
+ function Z(e, t) {
902
902
  let n = e.role === "assistant" && e.operationCount > 0;
903
903
  if (t.storedIds.has(e.id)) return {
904
904
  canUndo: n && !e.undone && typeof i?.undo == "function",
@@ -924,7 +924,7 @@ function Yr(e) {
924
924
  redo: null,
925
925
  serverApplied: !1,
926
926
  batchIds: /* @__PURE__ */ new Set()
927
- }, C, w = !1, E = !1, D = (e) => Z(u, g, e), O = () => {
927
+ }, C, w = !1, E = !1, D = (e) => X(u, g, e), O = () => {
928
928
  let e = p.items.find((e) => e.id === g);
929
929
  i && e && p.recoveries.set(m, {
930
930
  item: e,
@@ -953,11 +953,11 @@ function Yr(e) {
953
953
  onOperations: async (e) => {
954
954
  V(d), S(c);
955
955
  let t = r ? Ur(n.content.value) : null, i = ce(e, m, u, l);
956
- return i.applied && i.inverse.length > 0 && (x.inverse = [...i.inverse, ...x.inverse], r && (x.view = x.view === void 0 || x.view !== null && ne(x.view, t) ? Ur(n.content.value) : null), _ += e.length, D({ operationCount: _ })), i;
956
+ return i.applied && i.inverse.length > 0 && (x.inverse = [...i.inverse, ...x.inverse], r && (x.view = x.view === void 0 || x.view !== null && ye(x.view, t) ? Ur(n.content.value) : null), _ += e.length, D({ operationCount: _ })), i;
957
957
  },
958
958
  onApplied: (t) => {
959
959
  if (!T(u)) throw new DOMException("The template changed.", "AbortError");
960
- if (!r && !e.reload) throw b ??= new Y(Un, 502, "ai_provider_error"), b;
960
+ if (!r && !e.reload) throw b ??= new Q(Un, 502, "ai_provider_error"), b;
961
961
  x.serverApplied = !0, x.batchIds.add(t.batchId), _ += t.operationCount, D({ operationCount: _ }), le(t.revision, u), w && (O(), k());
962
962
  }
963
963
  };
@@ -998,12 +998,12 @@ function Yr(e) {
998
998
  createdAt: e,
999
999
  status: "streaming"
1000
1000
  }
1001
- ], u.messages.value = p.items, await H(re(u), d.controller.signal), V(d), S(c);
1002
- let n = await H(o(ie(u.id), A, f.signal), f.signal);
1001
+ ], u.messages.value = p.items, await H(ne(u), d.controller.signal), V(d), S(c);
1002
+ let n = await H(o(re(u.id), A, f.signal), f.signal);
1003
1003
  if (V(d), b) throw b;
1004
1004
  if (n.text !== "" && (v = n.text), n.messageId !== null && i) {
1005
1005
  let e = g;
1006
- g = n.messageId, p.storedIds.add(g), p.records.delete(e), p.records.set(g, x), Z(u, e, { id: g });
1006
+ g = n.messageId, p.storedIds.add(g), p.records.delete(e), p.records.set(g, x), X(u, e, { id: g });
1007
1007
  }
1008
1008
  D({
1009
1009
  text: v,
@@ -1054,7 +1054,7 @@ function Yr(e) {
1054
1054
  }
1055
1055
  }, de);
1056
1056
  }
1057
- function me(t, o) {
1057
+ function pe(t, o) {
1058
1058
  let s = w();
1059
1059
  return !s || s.busy.value ? Promise.resolve() : R("replay", s, async (c) => {
1060
1060
  let l = s.memory, u = l.items.find((e) => e.id === t);
@@ -1062,14 +1062,14 @@ function Yr(e) {
1062
1062
  let d = i?.[o], f = l.records.get(t);
1063
1063
  try {
1064
1064
  if (V(c), l.storedIds.has(t)) {
1065
- if (typeof d != "function") throw new Y(`This AI backend does not support ${o}.`, 403, "feature_unavailable");
1065
+ if (typeof d != "function") throw new Q(`This AI backend does not support ${o}.`, 403, "feature_unavailable");
1066
1066
  if (u.undone !== (o === "redo")) return;
1067
1067
  let n = await H(d(s.id, t, { sessionId: r ? r.core.sessionId : a }), s.lifetime.signal);
1068
1068
  if (!T(s)) return;
1069
1069
  if ("operations" in n) {
1070
1070
  if (c.controller.signal.aborted) return;
1071
1071
  let e = ce(n.operations, `${o}:${t}:${crypto.randomUUID()}`, s, u.locale ?? null);
1072
- e.applied && Z(s, t, {
1072
+ e.applied && X(s, t, {
1073
1073
  undone: o === "undo",
1074
1074
  failure: void 0
1075
1075
  });
@@ -1082,45 +1082,45 @@ function Yr(e) {
1082
1082
  }), s.lifetime.signal);
1083
1083
  } catch (e) {
1084
1084
  if (!T(s)) return;
1085
- q(e), Z(s, t, { failure: {
1085
+ q(e), X(s, t, { failure: {
1086
1086
  error: Gr(e),
1087
1087
  context: o
1088
1088
  } });
1089
1089
  }
1090
1090
  if (!T(s)) return;
1091
- if (!e.applied) throw new ye(e.message, {
1091
+ if (!e.applied) throw new me(e.message, {
1092
1092
  code: e.code,
1093
1093
  opIndex: e.opIndex
1094
1094
  });
1095
1095
  return;
1096
1096
  }
1097
- if (Z(s, t, {
1097
+ if (X(s, t, {
1098
1098
  undone: o === "undo",
1099
1099
  failure: void 0
1100
1100
  }), r) le(n.applied.revision, s);
1101
1101
  else if (e.reload) await U(c, !0);
1102
- else throw new Y(Un, 502, "ai_provider_error");
1102
+ else throw new Q(Un, 502, "ai_provider_error");
1103
1103
  return;
1104
1104
  }
1105
1105
  {
1106
1106
  if (u.undone !== (o === "redo")) return;
1107
1107
  let e = o === "undo" ? f?.inverse : f?.redo;
1108
1108
  if (!f || f.serverApplied || !e || e.length === 0) return;
1109
- if (r && e.some((e) => e.op === "setContent") && (!f.view || !ne(f.view, E(n.content.value)))) throw new ye(`The template changed since this message's changes, so ${o === "undo" ? "undoing" : "redoing"} them would overwrite that.`, { code: "precondition_failed" });
1109
+ if (r && e.some((e) => e.op === "setContent") && (!f.view || !ye(f.view, E(n.content.value)))) throw new me(`The template changed since this message's changes, so ${o === "undo" ? "undoing" : "redoing"} them would overwrite that.`, { code: "precondition_failed" });
1110
1110
  let i = se(e, `${o}:${t}:${crypto.randomUUID()}`, s);
1111
- if (!i.applied) throw new ye(i.message, {
1111
+ if (!i.applied) throw new me(i.message, {
1112
1112
  code: i.code,
1113
1113
  opIndex: i.opIndex
1114
1114
  });
1115
1115
  o === "undo" ? f.redo = i.inverse : f.inverse = i.inverse, r && (f.view = Ur(n.content.value));
1116
1116
  }
1117
- Z(s, t, {
1117
+ X(s, t, {
1118
1118
  undone: o === "undo",
1119
1119
  failure: void 0
1120
1120
  });
1121
1121
  } catch (e) {
1122
1122
  if (!T(s) || Wr(e)) return;
1123
- q(e), Z(s, t, { failure: {
1123
+ q(e), X(s, t, { failure: {
1124
1124
  error: Gr(e),
1125
1125
  context: o
1126
1126
  } });
@@ -1144,7 +1144,7 @@ function Yr(e) {
1144
1144
  };
1145
1145
  return {
1146
1146
  ...n,
1147
- ...ue(n, t)
1147
+ ...Z(n, t)
1148
1148
  };
1149
1149
  }
1150
1150
  function ge(e, t) {
@@ -1169,7 +1169,7 @@ function Yr(e) {
1169
1169
  n.item = e, r = r.map((t) => t.id === s.id ? e : t);
1170
1170
  } else n.user && !r.some((e) => e.id === n.user.id) && r.push(n.user), r.push({
1171
1171
  ...i,
1172
- ...ue(i, t)
1172
+ ...Z(i, t)
1173
1173
  });
1174
1174
  }
1175
1175
  return r;
@@ -1281,9 +1281,9 @@ function Yr(e) {
1281
1281
  async function Me(i, o) {
1282
1282
  let s = b, c = w(), l = t.altText, u = new AbortController(), d = () => u.abort(o?.reason), f = () => u.abort();
1283
1283
  try {
1284
- if (o?.throwIfAborted(), !c || typeof l != "function") throw new Y("This AI feature isn't available.", 403, "feature_unavailable");
1285
- let t = E(n.content.value), p = n.activeLocale?.value ?? null, m = Q(t, p ?? X(t)), h = Kn(m, i);
1286
- if (!h) throw new Y("The image is no longer available.", 409, "block_missing");
1284
+ if (o?.throwIfAborted(), !c || typeof l != "function") throw new Q("This AI feature isn't available.", 403, "feature_unavailable");
1285
+ let t = E(n.content.value), p = n.activeLocale?.value ?? null, m = ue(t, p ?? K(t)), h = Kn(m, i);
1286
+ if (!h) throw new Q("The image is no longer available.", 409, "block_missing");
1287
1287
  o?.addEventListener("abort", d, { once: !0 }), c.lifetime.signal.addEventListener("abort", f, { once: !0 });
1288
1288
  let { url: g, ..._ } = h, v = await H(l({
1289
1289
  templateId: c.id,
@@ -1305,7 +1305,7 @@ function Yr(e) {
1305
1305
  function Ne(e) {
1306
1306
  let t = b, r = w();
1307
1307
  if (!r || e.length === 0) return Promise.resolve();
1308
- let i = n.activeLocale?.value ?? null, a = E(n.content.value), o = Q(a, i ?? X(a)), s = e.map(({ blockId: e, alt: t, decorative: n, expect: r }) => ({
1308
+ let i = n.activeLocale?.value ?? null, a = E(n.content.value), o = ue(a, i ?? K(a)), s = e.map(({ blockId: e, alt: t, decorative: n, expect: r }) => ({
1309
1309
  op: "updateBlock",
1310
1310
  blockId: e,
1311
1311
  expect: { ...r ?? Gn(o, e) ?? {
@@ -1325,7 +1325,7 @@ function Yr(e) {
1325
1325
  for (let t = 0; t < s.length; t += 100) {
1326
1326
  V(e);
1327
1327
  let a = ce(s.slice(t, t + 100), n, r, i);
1328
- if (!a.applied) throw new ye(a.message, {
1328
+ if (!a.applied) throw new me(a.message, {
1329
1329
  code: a.code,
1330
1330
  opIndex: a.opIndex
1331
1331
  });
@@ -1399,8 +1399,8 @@ function Yr(e) {
1399
1399
  },
1400
1400
  stop: De,
1401
1401
  newChat: xe,
1402
- undoMessage: (e) => me(e, "undo"),
1403
- redoMessage: (e) => me(e, "redo"),
1402
+ undoMessage: (e) => pe(e, "undo"),
1403
+ redoMessage: (e) => pe(e, "redo"),
1404
1404
  rewrite: (e, n, r) => {
1405
1405
  let i = b, a = w(), o = t.rewrite;
1406
1406
  return !a || typeof o != "function" ? Promise.reject(/* @__PURE__ */ Error("Rewrite isn't available.")) : R("read", a, async (t) => {
@@ -1409,7 +1409,7 @@ function Yr(e) {
1409
1409
  try {
1410
1410
  r.throwIfAborted(), V(t), S(i);
1411
1411
  let s = await H(o({
1412
- ...ie(a.id),
1412
+ ...re(a.id),
1413
1413
  ...e
1414
1414
  }, { onText: (e) => {
1415
1415
  V(t), S(i), n(e);
@@ -1449,8 +1449,8 @@ function Zr(e, t) {
1449
1449
  return n.length > t ? n.slice(0, t).join("") : e;
1450
1450
  }
1451
1451
  function Qr(e) {
1452
- for (let t of Object.keys(xe)) {
1453
- let n = xe[t];
1452
+ for (let t of Object.keys(re)) {
1453
+ let n = re[t];
1454
1454
  if (n.value.source === e.value.source && n.logic.source === e.logic.source) return t;
1455
1455
  }
1456
1456
  return "custom";
@@ -1580,7 +1580,7 @@ function ii(e) {
1580
1580
  }
1581
1581
  function b(e, t) {
1582
1582
  for (let r = 0; r < e.content.length; r++) {
1583
- let i = ie(e.content[r]), a = t === void 0 ? void 0 : t + r;
1583
+ let i = xe(e.content[r]), a = t === void 0 ? void 0 : t + r;
1584
1584
  n.addBlock(i, void 0, void 0, a);
1585
1585
  }
1586
1586
  a.value = !1;
@@ -1729,7 +1729,7 @@ function oi(e) {
1729
1729
  // src/utils/toMjml.ts
1730
1730
  async function si() {
1731
1731
  try {
1732
- return await import("./chunks/src-B2tQbzf6.js");
1732
+ return await import("./chunks/src-UR3AQocX.js");
1733
1733
  } catch {
1734
1734
  return null;
1735
1735
  }
@@ -1861,7 +1861,7 @@ function fi(e) {
1861
1861
  return;
1862
1862
  }
1863
1863
  let t = await s.resolveContent(e);
1864
- f || (l.value = pe(n.content.value), a?.pause(), o?.suspend(), c.value = e, n.setContent(t, !1));
1864
+ f || (l.value = _e(n.content.value), a?.pause(), o?.suspend(), c.value = e, n.setContent(t, !1));
1865
1865
  }
1866
1866
  async function E() {
1867
1867
  c.value && (n.state.isDirty ? u.value = !0 : await A());
@@ -2054,35 +2054,35 @@ var _i = ["aria-label"], vi = ["lang", "dir"], yi = {
2054
2054
  let L = f(xt, null), V = P({
2055
2055
  get: () => u.content.blocks,
2056
2056
  set: (e) => gn(m, e)
2057
- }), U = P(() => Re(g.value, u.viewport)), ne = P(() => U.value + 192), W = P(() => Mn(g.value, _.resolveFontFamily)), G = P(() => g.value?.locale?.trim() || void 0), K = P(() => fe(g.value)), q = P(() => V.value.length === 0 && !u.previewMode), J = z(0), re = P(() => q.value && J.value > 0);
2057
+ }), U = P(() => Re(g.value, u.viewport)), W = P(() => U.value + 192), G = P(() => Mn(g.value, _.resolveFontFamily)), K = P(() => g.value?.locale?.trim() || void 0), q = P(() => be(g.value)), J = P(() => V.value.length === 0 && !u.previewMode), Y = z(0), ne = P(() => J.value && Y.value > 0);
2058
+ function re() {
2059
+ J.value && (Y.value += 1);
2060
+ }
2058
2061
  function ie() {
2059
- q.value && (J.value += 1);
2062
+ J.value && (Y.value = Math.max(0, Y.value - 1));
2060
2063
  }
2061
2064
  function ae() {
2062
- q.value && (J.value = Math.max(0, J.value - 1));
2063
- }
2064
- function oe() {
2065
- J.value = 0;
2065
+ Y.value = 0;
2066
2066
  }
2067
- function se(e) {
2067
+ function oe(e) {
2068
2068
  u.previewMode || E.savedBlocks?.isPicking.value || e.target === e.currentTarget && d("select-block", null);
2069
2069
  }
2070
- function ce(e) {
2070
+ function se(e) {
2071
2071
  return an(e, x, o);
2072
2072
  }
2073
- function Y(e) {
2073
+ function ce(e) {
2074
2074
  return E.collaboration?.lockOf(e) != null;
2075
2075
  }
2076
- function X(e) {
2077
- if (u.previewMode || Y(e)) return;
2076
+ function le(e) {
2077
+ if (u.previewMode || ce(e)) return;
2078
2078
  let t = E.savedBlocks;
2079
2079
  t?.isPicking.value ? t.togglePick(e) : d("select-block", e);
2080
2080
  }
2081
- function le(e) {
2081
+ function X(e) {
2082
2082
  return E.savedBlocks?.isPicked(e) ?? !1;
2083
2083
  }
2084
- let Z = P(() => E.savedBlocks?.isPicking.value === !0);
2085
- function ue(e, t) {
2084
+ let ue = P(() => E.savedBlocks?.isPicking.value === !0);
2085
+ function Z(e, t) {
2086
2086
  e.type === "custom" && m.updateBlock(e.id, {
2087
2087
  fieldValues: t.fieldValues,
2088
2088
  dataSourceFetched: t.dataSourceFetched
@@ -2091,7 +2091,7 @@ var _i = ["aria-label"], vi = ["lang", "dir"], yi = {
2091
2091
  return (r, o) => (i(), y("div", {
2092
2092
  class: "tpl-canvas-stage tpl:relative tpl:mx-auto tpl:flex tpl:justify-center tpl:rounded-lg",
2093
2093
  style: F({
2094
- width: `${ne.value}px`,
2094
+ width: `${W.value}px`,
2095
2095
  maxWidth: "calc(100% - 4 * var(--tpl-base-size))",
2096
2096
  minWidth: "min-content",
2097
2097
  boxShadow: n.darkMode ? "none" : "var(--tpl-shadow-xl)",
@@ -2118,10 +2118,10 @@ var _i = ["aria-label"], vi = ["lang", "dir"], yi = {
2118
2118
  "tpl-canvas--dark-mode": n.darkMode,
2119
2119
  "tpl-preview-mode": n.previewMode
2120
2120
  }]),
2121
- lang: G.value,
2122
- dir: K.value,
2123
- style: F(W.value),
2124
- onClick: se
2121
+ lang: K.value,
2122
+ dir: q.value,
2123
+ style: F(G.value),
2124
+ onClick: oe
2125
2125
  }, [S(O)?.isInitialResolve.value ? (i(), y("div", yi, [A("span", bi, j(S(p).previewResolution.resolving), 1), (i(), y(B, null, l(3, (e) => A("div", {
2126
2126
  key: e,
2127
2127
  "aria-hidden": "true",
@@ -2141,16 +2141,16 @@ var _i = ["aria-label"], vi = ["lang", "dir"], yi = {
2141
2141
  "force-fallback": !0,
2142
2142
  class: C([
2143
2143
  "tpl-canvas-blocks",
2144
- q.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors" : "",
2145
- q.value && re.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
2146
- q.value && !re.value ? "tpl:border-[var(--tpl-primary)]" : ""
2144
+ J.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors" : "",
2145
+ J.value && ne.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
2146
+ J.value && !ne.value ? "tpl:border-[var(--tpl-primary)]" : ""
2147
2147
  ]),
2148
2148
  onUpdate: o[2] ||= (e) => S(gn)(S(m), V.value, void 0, 0, e),
2149
- onDragenter: ie,
2150
- onDragleave: ae,
2151
- onDrop: oe
2149
+ onDragenter: re,
2150
+ onDragleave: ie,
2151
+ onDrop: ae
2152
2152
  }, {
2153
- default: a(() => [q.value ? (i(), y("div", Si, [
2153
+ default: a(() => [J.value ? (i(), y("div", Si, [
2154
2154
  A("div", Ci, [H(S(Ge), {
2155
2155
  size: 48,
2156
2156
  "stroke-width": 1
@@ -2196,7 +2196,7 @@ var _i = ["aria-label"], vi = ["lang", "dir"], yi = {
2196
2196
  ])) : w("", !0), (i(!0), y(B, null, l(V.value, (r) => c((i(), y("div", {
2197
2197
  key: r.id,
2198
2198
  class: "tpl-block-item"
2199
- }, [A("div", Oi, [r.type === "wrapper" ? (i(), T(t(ce(r)), {
2199
+ }, [A("div", Oi, [r.type === "wrapper" ? (i(), T(t(se(r)), {
2200
2200
  key: 0,
2201
2201
  block: r,
2202
2202
  viewport: n.viewport
@@ -2204,15 +2204,15 @@ var _i = ["aria-label"], vi = ["lang", "dir"], yi = {
2204
2204
  key: 1,
2205
2205
  block: r,
2206
2206
  "display-block": S(h)(r),
2207
- "is-selected": !n.previewMode && !Z.value && n.selectedBlockId === r.id && !Y(r.id),
2208
- picked: le(r.id),
2207
+ "is-selected": !n.previewMode && !ue.value && n.selectedBlockId === r.id && !ce(r.id),
2208
+ picked: X(r.id),
2209
2209
  viewport: n.viewport,
2210
2210
  "preview-mode": n.previewMode,
2211
- onSelect: (e) => X(r.id)
2211
+ onSelect: (e) => le(r.id)
2212
2212
  }, {
2213
- default: a(() => [(i(), T(t(ce(r)), e({ block: S(h)(r) }, { ref_for: !0 }, r.type === "section" ? { sourceBlock: r } : {}, {
2213
+ default: a(() => [(i(), T(t(se(r)), e({ block: S(h)(r) }, { ref_for: !0 }, r.type === "section" ? { sourceBlock: r } : {}, {
2214
2214
  viewport: n.viewport,
2215
- onFetchData: (e) => ue(r, e),
2215
+ onFetchData: (e) => Z(r, e),
2216
2216
  onUpdate: (e) => S(m).updateBlock(r.id, e)
2217
2217
  }), null, 16, [
2218
2218
  "block",
@@ -2351,26 +2351,26 @@ var Mi = ["aria-label"], Ni = {
2351
2351
  label: e.name,
2352
2352
  isCustom: !0,
2353
2353
  icon: e.icon
2354
- }))), U = P(() => [...te.value, ...V.value]), ne = P(() => ji(U.value, c)), W = P(() => ne.value.items), G = /* @__PURE__ */ new Set();
2355
- o(() => ne.value.unknown, (e) => {
2356
- for (let t of e) G.has(t) || (G.add(t), Pn.warn(`config.paletteBlocks: "${t}" is not a built-in or registered custom block (use the "custom:" prefix for custom blocks) — skipping it in the palette.`));
2354
+ }))), U = P(() => [...te.value, ...V.value]), W = P(() => ji(U.value, c)), G = P(() => W.value.items), K = /* @__PURE__ */ new Set();
2355
+ o(() => W.value.unknown, (e) => {
2356
+ for (let t of e) K.has(t) || (K.add(t), Pn.warn(`config.paletteBlocks: "${t}" is not a built-in or registered custom block (use the "custom:" prefix for custom blocks) — skipping it in the palette.`));
2357
2357
  }, { immediate: !0 });
2358
- function K(e) {
2358
+ function q(e) {
2359
2359
  if (e.isCustom) {
2360
2360
  let t = e.type.replace("custom:", ""), n = s.find((e) => e.type === t);
2361
- if (n) return q(n);
2361
+ if (n) return oe(n);
2362
2362
  }
2363
- return e.type === "hero" ? Sn(u?.value, n.blockDefaults.paragraph) : ce(e.type, u?.value);
2363
+ return e.type === "hero" ? Sn(u?.value, n.blockDefaults.paragraph) : Ce(e.type, u?.value);
2364
2364
  }
2365
2365
  function J(e) {
2366
2366
  if (!d) return;
2367
- let t = K(e);
2367
+ let t = q(e);
2368
2368
  hi(d, t) && p(t.id);
2369
2369
  }
2370
- function re(e) {
2370
+ function Y(e) {
2371
2371
  x || J(e);
2372
2372
  }
2373
- function ie(e, t) {
2373
+ function ne(e, t) {
2374
2374
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), J(t));
2375
2375
  }
2376
2376
  return (e, o) => (i(), y("aside", {
@@ -2400,13 +2400,13 @@ var Mi = ["aria-label"], Ni = {
2400
2400
  "stroke-width": 1.5,
2401
2401
  class: "tpl:shrink-0"
2402
2402
  }), _.value ? (i(), y("span", Fi, j(S(n).savedBlocks.title), 1)) : w("", !0)], 12, Pi)])) : w("", !0), H(S(R), {
2403
- "model-value": W.value,
2403
+ "model-value": G.value,
2404
2404
  group: {
2405
2405
  name: "blocks",
2406
2406
  pull: "clone",
2407
2407
  put: !1
2408
2408
  },
2409
- clone: K,
2409
+ clone: q,
2410
2410
  sort: !1,
2411
2411
  animation: 150,
2412
2412
  "force-fallback": !0,
@@ -2417,15 +2417,15 @@ var Mi = ["aria-label"], Ni = {
2417
2417
  onUnchoose: k,
2418
2418
  onEnd: I
2419
2419
  }, {
2420
- default: a(() => [(i(!0), y(B, null, l(W.value, (e) => (i(), y("button", {
2420
+ default: a(() => [(i(!0), y(B, null, l(G.value, (e) => (i(), y("button", {
2421
2421
  key: e.type,
2422
2422
  type: "button",
2423
2423
  "data-palette-type": e.type,
2424
2424
  "aria-label": S(r)(S(n).sidebarNav.insertBlock, { block: e.label }),
2425
2425
  class: "tpl:flex tpl:h-10 tpl:w-full tpl:shrink-0 tpl:cursor-grab tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:active:cursor-grabbing",
2426
2426
  style: F({ justifyContent: _.value ? "flex-start" : "center" }),
2427
- onClick: (t) => re(e),
2428
- onKeydown: (t) => ie(t, e)
2427
+ onClick: (t) => Y(e),
2428
+ onKeydown: (t) => ne(t, e)
2429
2429
  }, [A("div", Li, [S(Qn)[e.type] ? (i(), T(t(S(Qn)[e.type]), {
2430
2430
  key: 0,
2431
2431
  size: 20,
@@ -2494,7 +2494,7 @@ var Mi = ["aria-label"], Ni = {
2494
2494
  "update-settings"
2495
2495
  ], ["update:tab"]),
2496
2496
  setup(e, { emit: t }) {
2497
- let n = g(() => import("./chunks/Toolbar-Cv6Rv1S-.js").then((e) => e.t)), r = g(() => import("./chunks/TemplateSettings-SaV2UVh_.js")), a = g(() => import("./chunks/IssuesPanel-LyjMBDok.js")), s = e, c = t, { t: l } = $(), u = _(e, "tab"), d = f(_t, null), p = P(() => d !== null && !d.unavailable.value), m = P(() => d?.issues.value.length ?? 0), h = f(ut, new Set(Fn)), v = P(() => h.size > 0);
2497
+ let n = g(() => import("./chunks/Toolbar-NEE8qxYh.js").then((e) => e.t)), r = g(() => import("./chunks/TemplateSettings-CpoKZ8oV.js")), a = g(() => import("./chunks/IssuesPanel-BoHeIjvw.js")), s = e, c = t, { t: l } = $(), u = _(e, "tab"), d = f(_t, null), p = P(() => d !== null && !d.unavailable.value), m = P(() => d?.issues.value.length ?? 0), h = f(ut, new Set(Fn)), v = P(() => h.size > 0);
2498
2498
  function b(e) {
2499
2499
  return u.value === e ? "tpl:flex-1 tpl:text-[var(--tpl-primary)]" : "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)]";
2500
2500
  }
@@ -2985,7 +2985,7 @@ var ma = [
2985
2985
  ai: {}
2986
2986
  },
2987
2987
  setup(e) {
2988
- let t = g(() => import("./chunks/VersionHistoryMenu-CZury5gU.js")), n = g(() => import("./chunks/LanguageMenu-CGwMCOQ5.js")), r = g(() => import("./chunks/CollaboratorBar-0OEH3hrj.js")), a = L(null), o = L(null), { compact: s, fullWidth: c } = pa(a, o);
2988
+ let t = g(() => import("./chunks/VersionHistoryMenu-CZury5gU.js")), n = g(() => import("./chunks/LanguageMenu-BnYN5N1h.js")), r = g(() => import("./chunks/CollaboratorBar-0OEH3hrj.js")), a = L(null), o = L(null), { compact: s, fullWidth: c } = pa(a, o);
2989
2989
  return (l, u) => (i(), y("div", {
2990
2990
  ref_key: "containerElement",
2991
2991
  ref: a,
@@ -3232,51 +3232,51 @@ var ma = [
3232
3232
  }
3233
3233
  return a;
3234
3234
  }), V = P(() => R.value.flatMap((e) => e.kind === "tag" ? [e.tag] : [])), U = !1;
3235
- function ne(e) {
3235
+ function W(e) {
3236
3236
  let n = t.current.value;
3237
3237
  if (!n) return !1;
3238
3238
  let r = e.findIndex((e) => e.value === n.value);
3239
3239
  return r !== -1 && (E.value = r, !0);
3240
3240
  }
3241
- function W(e) {
3241
+ function G(e) {
3242
3242
  U = !1, E.value = e;
3243
3243
  }
3244
3244
  o(() => t.isOpen.value, (e) => {
3245
- e ? (g.value = "", E.value = 0, M.value = /* @__PURE__ */ new Set(), U = !ne(V.value), D(() => {
3245
+ e ? (g.value = "", E.value = 0, M.value = /* @__PURE__ */ new Set(), U = !W(V.value), D(() => {
3246
3246
  v.value?.focus();
3247
3247
  })) : U = !1;
3248
3248
  }), o(V, (e) => {
3249
- U && ne(e) ? U = !1 : E.value >= e.length && (E.value = Math.max(0, e.length - 1));
3249
+ U && W(e) ? U = !1 : E.value >= e.length && (E.value = Math.max(0, e.length - 1));
3250
3250
  });
3251
- function G(e) {
3251
+ function K(e) {
3252
3252
  t.resolve(e);
3253
3253
  }
3254
- function K() {
3254
+ function q() {
3255
3255
  t.resolve(null);
3256
3256
  }
3257
- function q(e) {
3257
+ function J(e) {
3258
3258
  if (V.value.length === 0) return;
3259
3259
  U = !1;
3260
3260
  let t = E.value + e;
3261
- E.value = Math.max(0, Math.min(V.value.length - 1, t)), ae();
3261
+ E.value = Math.max(0, Math.min(V.value.length - 1, t)), ie();
3262
3262
  }
3263
- let J = z(null), re = z({});
3264
- function ie(e, t) {
3265
- re.value[e] = t ?? null;
3263
+ let Y = z(null), ne = z({});
3264
+ function re(e, t) {
3265
+ ne.value[e] = t ?? null;
3266
3266
  }
3267
- function ae() {
3267
+ function ie() {
3268
3268
  D(() => {
3269
- let e = J.value;
3269
+ let e = Y.value;
3270
3270
  e && e.querySelector(`[data-merge-tag-index="${E.value}"]`)?.scrollIntoView({ block: "nearest" });
3271
3271
  });
3272
3272
  }
3273
- function oe(e) {
3273
+ function ae(e) {
3274
3274
  if (M.value.has(e)) {
3275
3275
  let t = new Set(M.value);
3276
3276
  t.delete(e), M.value = t;
3277
3277
  }
3278
3278
  D(() => {
3279
- let t = J.value;
3279
+ let t = Y.value;
3280
3280
  if (!t) return;
3281
3281
  let n = 0, r = !1;
3282
3282
  for (let i of Array.from(t.children)) {
@@ -3292,26 +3292,26 @@ var ma = [
3292
3292
  });
3293
3293
  });
3294
3294
  }
3295
- function se(e) {
3296
- if (e.key === "ArrowDown") e.preventDefault(), q(1);
3297
- else if (e.key === "ArrowUp") e.preventDefault(), q(-1);
3295
+ function oe(e) {
3296
+ if (e.key === "ArrowDown") e.preventDefault(), J(1);
3297
+ else if (e.key === "ArrowUp") e.preventDefault(), J(-1);
3298
3298
  else if (e.key === "Enter") {
3299
3299
  e.preventDefault();
3300
3300
  let t = V.value[E.value];
3301
- t && G(t);
3301
+ t && K(t);
3302
3302
  }
3303
3303
  }
3304
- function ce() {
3304
+ function se() {
3305
3305
  if (V.value.length !== 0) return `${oo}-opt-${E.value}`;
3306
3306
  }
3307
- function Y(e) {
3307
+ function ce(e) {
3308
3308
  return `${oo}-opt-${e}`;
3309
3309
  }
3310
- let X = P(() => t.tags.value.length === 0), le = P(() => !X.value && L.value.length === 0), Z = P(() => O.value && te.value.length > 1 && !b.value);
3310
+ let le = P(() => t.tags.value.length === 0), X = P(() => !le.value && L.value.length === 0), ue = P(() => O.value && te.value.length > 1 && !b.value);
3311
3311
  return (e, o) => (i(), T(Ln, {
3312
3312
  visible: S(t).isOpen.value,
3313
- onClose: K,
3314
- onKeydown: se
3313
+ onClose: q,
3314
+ onKeydown: oe
3315
3315
  }, {
3316
3316
  default: a(() => [A("div", {
3317
3317
  role: "dialog",
@@ -3330,7 +3330,7 @@ var ma = [
3330
3330
  class: "tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
3331
3331
  "aria-label": S(n).mergeTag.picker.close,
3332
3332
  "data-testid": "merge-tag-picker-close",
3333
- onClick: K
3333
+ onClick: q
3334
3334
  }, [H(S(st), {
3335
3335
  size: 16,
3336
3336
  "stroke-width": 2
@@ -3349,30 +3349,30 @@ var ma = [
3349
3349
  placeholder: S(n).mergeTag.picker.searchPlaceholder,
3350
3350
  "aria-label": S(n).mergeTag.picker.searchAriaLabel,
3351
3351
  "aria-controls": oo,
3352
- "aria-activedescendant": ce(),
3352
+ "aria-activedescendant": se(),
3353
3353
  "data-testid": "merge-tag-picker-search",
3354
3354
  onKeydown: o[1] ||= x(k(() => {}, ["prevent"]), ["enter"])
3355
3355
  }, null, 40, qa), [[ee, g.value]])]),
3356
- Z.value ? (i(), y("div", Ja, [(i(!0), y(B, null, l(te.value, (e) => (i(), y("button", {
3356
+ ue.value ? (i(), y("div", Ja, [(i(!0), y(B, null, l(te.value, (e) => (i(), y("button", {
3357
3357
  key: e,
3358
3358
  type: "button",
3359
3359
  class: "tpl:flex tpl:flex-shrink-0 tpl:cursor-pointer tpl:items-center tpl:rounded-full tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-2.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
3360
3360
  "data-testid": "merge-tag-picker-group-pill",
3361
3361
  "data-group-name": e,
3362
- onClick: (t) => oe(e)
3362
+ onClick: (t) => ae(e)
3363
3363
  }, j(e), 9, Ya))), 128))])) : w("", !0),
3364
3364
  A("div", {
3365
3365
  id: oo,
3366
3366
  ref_key: "listRef",
3367
- ref: J,
3367
+ ref: Y,
3368
3368
  class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
3369
3369
  role: "listbox",
3370
3370
  "aria-label": m.value,
3371
3371
  "data-testid": "merge-tag-picker-list"
3372
- }, [X.value ? (i(), y("div", Za, j(S(n).mergeTag.picker.empty), 1)) : le.value ? (i(), y("div", Qa, j(S(n).mergeTag.picker.noResults), 1)) : (i(!0), y(B, { key: 2 }, l(R.value, (e, a) => (i(), y(B, { key: a }, [e.kind === "header" ? (i(), y("button", {
3372
+ }, [le.value ? (i(), y("div", Za, j(S(n).mergeTag.picker.empty), 1)) : X.value ? (i(), y("div", Qa, j(S(n).mergeTag.picker.noResults), 1)) : (i(!0), y(B, { key: 2 }, l(R.value, (e, a) => (i(), y(B, { key: a }, [e.kind === "header" ? (i(), y("button", {
3373
3373
  key: 0,
3374
3374
  ref_for: !0,
3375
- ref: (t) => ie(e.group, t),
3375
+ ref: (t) => re(e.group, t),
3376
3376
  type: "button",
3377
3377
  "aria-expanded": !N(e.group),
3378
3378
  "aria-controls": oo,
@@ -3391,7 +3391,7 @@ var ma = [
3391
3391
  A("span", eo, " (" + j(S(r)(S(n).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
3392
3392
  ], 8, $a)) : (i(), y("button", {
3393
3393
  key: 1,
3394
- id: Y(e.index),
3394
+ id: ce(e.index),
3395
3395
  type: "button",
3396
3396
  role: "option",
3397
3397
  "aria-selected": e.index === E.value,
@@ -3402,8 +3402,8 @@ var ma = [
3402
3402
  title: h(e.tag),
3403
3403
  class: C(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === E.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
3404
3404
  "data-testid": "merge-tag-picker-item",
3405
- onMousemove: (t) => W(e.index),
3406
- onClick: (t) => G(e.tag)
3405
+ onMousemove: (t) => G(e.index),
3406
+ onClick: (t) => K(e.tag)
3407
3407
  }, [
3408
3408
  A("span", no, j(e.tag.label), 1),
3409
3409
  A("span", ro, j(e.tag.value), 1),
@@ -3421,7 +3421,7 @@ var ma = [
3421
3421
  syntax: {}
3422
3422
  },
3423
3423
  setup(e) {
3424
- let t = e, n = P(() => we(t.value, t.syntax)), r = P(() => he(t.value, t.syntax));
3424
+ let t = e, n = P(() => X(t.value, t.syntax)), r = P(() => le(t.value, t.syntax));
3425
3425
  return (e, t) => n.value ? (i(), y("span", {
3426
3426
  key: 0,
3427
3427
  class: "tpl:inline-flex tpl:flex-shrink-0 tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:leading-none tpl:font-bold tpl:tracking-wide tpl:uppercase",
@@ -3466,7 +3466,7 @@ var ma = [
3466
3466
  }, Oo = "tpl-logic-picker-list", ko = /* @__PURE__ */ n({
3467
3467
  __name: "LogicTagPickerModal",
3468
3468
  setup(e) {
3469
- let t = Ft(ht, "LogicTagPickerModal"), { t: n } = $(), r = f(dt, xe.liquid), s = f(Et, null), u = f(kt, null), d = z(""), p = $t(d, 200), m = z(null), h = P(() => p.value.trim().length > 0), g = z(0);
3469
+ let t = Ft(ht, "LogicTagPickerModal"), { t: n } = $(), r = f(dt, re.liquid), s = f(Et, null), u = f(kt, null), d = z(""), p = $t(d, 200), m = z(null), h = P(() => p.value.trim().length > 0), g = z(0);
3470
3470
  function _(e) {
3471
3471
  let t = p.value.trim().toLowerCase();
3472
3472
  return !t || e.filter(Boolean).join(" ").toLowerCase().includes(t);
@@ -3534,30 +3534,30 @@ var ma = [
3534
3534
  function U() {
3535
3535
  t.resolve(null);
3536
3536
  }
3537
- function ne(e) {
3537
+ function W(e) {
3538
3538
  I.value.length !== 0 && (g.value = Math.max(0, Math.min(I.value.length - 1, g.value + e)), D(() => {
3539
3539
  R.value?.querySelector(`[data-logic-index="${g.value}"]`)?.scrollIntoView({ block: "nearest" });
3540
3540
  }));
3541
3541
  }
3542
- function W(e) {
3543
- if (e.key === "ArrowDown") e.preventDefault(), ne(1);
3544
- else if (e.key === "ArrowUp") e.preventDefault(), ne(-1);
3542
+ function G(e) {
3543
+ if (e.key === "ArrowDown") e.preventDefault(), W(1);
3544
+ else if (e.key === "ArrowUp") e.preventDefault(), W(-1);
3545
3545
  else if (e.key === "Enter") {
3546
3546
  e.preventDefault();
3547
3547
  let t = I.value[g.value];
3548
3548
  t && V(t);
3549
3549
  }
3550
3550
  }
3551
- function G(e) {
3551
+ function K(e) {
3552
3552
  return `${Oo}-opt-${e}`;
3553
3553
  }
3554
- function K() {
3554
+ function q() {
3555
3555
  return I.value.length === 0 ? void 0 : `${Oo}-opt-${g.value}`;
3556
3556
  }
3557
3557
  return (e, o) => (i(), T(Ln, {
3558
3558
  visible: S(t).isOpen.value,
3559
3559
  onClose: U,
3560
- onKeydown: W
3560
+ onKeydown: G
3561
3561
  }, {
3562
3562
  default: a(() => [A("div", {
3563
3563
  role: "dialog",
@@ -3595,7 +3595,7 @@ var ma = [
3595
3595
  placeholder: S(n).logicTag.picker.searchPlaceholder,
3596
3596
  "aria-label": S(n).logicTag.picker.searchAriaLabel,
3597
3597
  "aria-controls": Oo,
3598
- "aria-activedescendant": K(),
3598
+ "aria-activedescendant": q(),
3599
3599
  "data-testid": "logic-picker-search",
3600
3600
  onKeydown: o[1] ||= x(k(() => {}, ["prevent"]), ["enter"])
3601
3601
  }, null, 40, go), [[ee, d.value]])]),
@@ -3614,7 +3614,7 @@ var ma = [
3614
3614
  "data-group-name": e.label
3615
3615
  }, j(e.label), 9, bo)) : (i(), y("button", {
3616
3616
  key: 1,
3617
- id: G(e.index),
3617
+ id: K(e.index),
3618
3618
  type: "button",
3619
3619
  role: "option",
3620
3620
  "aria-selected": e.index === g.value,
@@ -3674,10 +3674,10 @@ var ma = [
3674
3674
  });
3675
3675
  let r = {
3676
3676
  get tags() {
3677
- return Q.mergeTags.value;
3677
+ return Z.mergeTags.value;
3678
3678
  },
3679
3679
  get syntax() {
3680
- return Q.mergeTagSyntax;
3680
+ return Z.mergeTagSyntax;
3681
3681
  }
3682
3682
  }, l = n.config.templates ? Vn(n.config.templates, r) : void 0;
3683
3683
  n.config.collaboration && !l && Pn.warn("config.collaboration needs config.templates: collaboration runs on a loaded template, and only a templates provider loads one. Collaboration is off.");
@@ -3692,7 +3692,7 @@ var ma = [
3692
3692
  let e = h.state.template;
3693
3693
  return e ? {
3694
3694
  ...E(e),
3695
- content: pe(E(h.content.value))
3695
+ content: _e(E(h.content.value))
3696
3696
  } : null;
3697
3697
  }) : l, m = z(0);
3698
3698
  s(gt, n.config.localization);
@@ -3724,7 +3724,7 @@ var ma = [
3724
3724
  editor: h,
3725
3725
  onError: n.config.onError,
3726
3726
  isAvailable: n.cloud ? () => n.cloud.isSavedBlocksAvailable() : void 0
3727
- }) : null, N = g(() => import("./chunks/SavedBlocksPanels-jfkYWtss.js")), ee = n.config.media || n.config.onRequestMedia ? ni({
3727
+ }) : null, N = g(() => import("./chunks/SavedBlocksPanels-DqVcmEUK.js")), ee = n.config.media || n.config.onRequestMedia ? ni({
3728
3728
  provider: n.config.media,
3729
3729
  onRequestMedia: n.config.onRequestMedia,
3730
3730
  getTemplateId: () => h.state.template?.id,
@@ -3736,7 +3736,7 @@ var ma = [
3736
3736
  usesLocalRenderer: n.usesLocalRenderer,
3737
3737
  onError: n.config.onError,
3738
3738
  isAvailable: n.cloud ? () => n.cloud.isTestEmailAvailable() : void 0
3739
- }) : null, R = g(() => import("./chunks/TestEmailPanel-CfzpqpDs.js")), B = n.config.comments ? Br({
3739
+ }) : null, R = g(() => import("./chunks/TestEmailPanel-Cp5d2YGn.js")), B = n.config.comments ? Br({
3740
3740
  provider: n.config.comments,
3741
3741
  editor: h,
3742
3742
  user: n.config.user,
@@ -3744,7 +3744,7 @@ var ma = [
3744
3744
  onError: n.config.onError,
3745
3745
  isAvailable: n.cloud ? () => n.cloud.isCommentsAvailable() : void 0,
3746
3746
  isBlockSaved: n.cloud ? (e) => n.cloud.isBlockSaved(e) : void 0
3747
- }) : null, U = g(() => import("./chunks/CommentsPanel-tZZswofV.js")), ne = g(() => import("./chunks/AiPanels-BblCSkQy.js")), W = n.config.ai ? Yr({
3747
+ }) : null, U = g(() => import("./chunks/CommentsPanel-tZZswofV.js")), W = g(() => import("./chunks/AiPanels-BblCSkQy.js")), G = n.config.ai ? Yr({
3748
3748
  provider: n.config.ai,
3749
3749
  editor: h,
3750
3750
  localization: n.config.localization ?? { locales: [] },
@@ -3753,62 +3753,62 @@ var ma = [
3753
3753
  m.value++;
3754
3754
  },
3755
3755
  collaboration: u,
3756
- history: () => Q.history,
3756
+ history: () => Z.history,
3757
3757
  reload: x ? (e, t) => x.load(e, t) : null,
3758
3758
  altMaxLength: () => qn(on(n.config)),
3759
- mergeTags: () => $r(Q.mergeTags.value, Q.mergeTagSyntax),
3759
+ mergeTags: () => $r(Z.mergeTags.value, Z.mergeTagSyntax),
3760
3760
  normalize: (e, t) => zn(e, t, r),
3761
3761
  commentsOpen: B?.isOpen ?? null,
3762
3762
  onError: n.config.onError
3763
3763
  }) : null;
3764
- W && s(Nt, W);
3765
- let G = Ht(h, n.config.customBlocks ?? []);
3766
- s(Rt, G);
3767
- let K = n.config.translation ? Pr({
3764
+ G && s(Nt, G);
3765
+ let q = Ht(h, n.config.customBlocks ?? []);
3766
+ s(Rt, q);
3767
+ let J = n.config.translation ? Pr({
3768
3768
  provider: n.config.translation,
3769
3769
  editor: h,
3770
3770
  localization: n.config.localization,
3771
3771
  collaboration: u,
3772
- history: () => Q.history,
3772
+ history: () => Z.history,
3773
3773
  definitions: () => n.config.customBlocks ?? [],
3774
- syntax: () => Q.mergeTagSyntax,
3775
- coverage: () => G.value
3774
+ syntax: () => Z.mergeTagSyntax,
3775
+ coverage: () => q.value
3776
3776
  }) : null;
3777
- K && s(Pt, K);
3778
- let q = z(null);
3777
+ J && s(Pt, J);
3778
+ let Y = z(null);
3779
3779
  o([() => h.state.template?.id ?? null, h.loadVersion], () => {
3780
- q.value = null;
3781
- }, { flush: "sync" }), o(() => X(h.content.value), (e) => {
3782
- q.value && q.value.language !== e && (q.value = null);
3780
+ Y.value = null;
3781
+ }, { flush: "sync" }), o(() => K(h.content.value), (e) => {
3782
+ Y.value && Y.value.language !== e && (Y.value = null);
3783
3783
  }, { flush: "sync" });
3784
- let re = Or({
3784
+ let ne = Or({
3785
3785
  editor: h,
3786
- history: () => Q.history,
3786
+ history: () => Z.history,
3787
3787
  collaboration: u
3788
3788
  });
3789
3789
  s(ft, { setDefaultLocale(e) {
3790
3790
  let t = {
3791
3791
  language: e,
3792
- old: X(h.content.value),
3793
- count: J(h.content.value, e, n.config.customBlocks).length
3794
- }, r = re.setDefaultLocale(e);
3795
- return r.applied && (q.value = t), r;
3792
+ old: K(h.content.value),
3793
+ count: Te(h.content.value, e, n.config.customBlocks).length
3794
+ }, r = ne.setDefaultLocale(e);
3795
+ return r.applied && (Y.value = t), r;
3796
3796
  } });
3797
- let ae = g(() => import("./chunks/LocaleNotices-8J2DRWeg.js")), oe = g(() => import("./chunks/CollaborationNotices-DraFUhyo.js")), se = g(() => import("./chunks/CloudPanels-BGwDb0jB.js")), ce = g(() => import("./chunks/CloudHeaderExtras-BtqdN777.js")), Y = g(() => import("./chunks/VersionHistoryPanels-BJnHCMAH.js")), le = pi(n.config.templates?.autoSave, !1), Z = le && x !== null;
3798
- le && x !== null && !x.canSave.value && Pn.warn("config.templates.autoSave is on but this provider's save is false — there is nothing to persist to. Give it a real save function, or use `onChange` to persist the content yourself."), n.config.changeDebounce !== void 0 && x !== null && n.config.templates?.autoSave === void 0 && !n.config.onChange && Pn.warn("config.changeDebounce is set but nothing will use it — config.templates.autoSave is unset and there is no onChange either, so the timer has no consumer. Set config.templates.autoSave, or add onChange, so the debounce takes effect.");
3799
- let ue = n.config.onChange || Z ? {
3797
+ let re = g(() => import("./chunks/LocaleNotices-8J2DRWeg.js")), ie = g(() => import("./chunks/CollaborationNotices-DraFUhyo.js")), ae = g(() => import("./chunks/CloudPanels-CQ0vNgsH.js")), oe = g(() => import("./chunks/CloudHeaderExtras-BtqdN777.js")), se = g(() => import("./chunks/VersionHistoryPanels-Cefd8i_e.js")), ce = pi(n.config.templates?.autoSave, !1), le = ce && x !== null;
3798
+ ce && x !== null && !x.canSave.value && Pn.warn("config.templates.autoSave is on but this provider's save is false — there is nothing to persist to. Give it a real save function, or use `onChange` to persist the content yourself."), n.config.changeDebounce !== void 0 && x !== null && n.config.templates?.autoSave === void 0 && !n.config.onChange && Pn.warn("config.changeDebounce is set but nothing will use it — config.templates.autoSave is unset and there is no onChange either, so the timer has no consumer. Set config.templates.autoSave, or add onChange, so the debounce takes effect.");
3799
+ let X = n.config.onChange || le ? {
3800
3800
  onChange: () => {
3801
- n.config.onChange?.(JSON.parse(JSON.stringify(h.state.content))), Z && x.requestAutoSave();
3801
+ n.config.onChange?.(JSON.parse(JSON.stringify(h.state.content))), le && x.requestAutoSave();
3802
3802
  },
3803
3803
  ...n.config.changeDebounce === void 0 ? {} : { debounce: n.config.changeDebounce }
3804
- } : null, de = {
3804
+ } : null, ue = {
3805
3805
  ...O ? { savedBlocks: O.capability } : {},
3806
3806
  ...x ? { templates: x.capability } : {},
3807
3807
  ...L ? { testEmail: L.capability } : {},
3808
3808
  ...B ? { comments: B.capability } : {},
3809
3809
  ...u ? { collaboration: u.capability } : {},
3810
- ...W ? { ai: W.capability } : {}
3811
- }, Q = wn({
3810
+ ...G ? { ai: G.capability } : {}
3811
+ }, Z = wn({
3812
3812
  editor: h,
3813
3813
  containerEl: D,
3814
3814
  config: {
@@ -3835,23 +3835,23 @@ var ma = [
3835
3835
  },
3836
3836
  translations: n.translations,
3837
3837
  fontsManager: n.fontsManager,
3838
- autoSaveOptions: ue,
3839
- capabilities: de,
3838
+ autoSaveOptions: X,
3839
+ capabilities: ue,
3840
3840
  editorRoot: n.shadowRoot,
3841
3841
  history: u?.history
3842
- }), fe = z("content");
3842
+ }), de = z("content");
3843
3843
  o(() => h.state.template?.id, () => {
3844
- h.selectedBlock.value && (fe.value = "content");
3844
+ h.selectedBlock.value && (de.value = "content");
3845
3845
  });
3846
- let me = n.cloud && v ? n.cloud.ready({
3847
- core: Q,
3848
- capabilities: de
3849
- }) : null, he = n.config.versionHistory ? fi({
3846
+ let Q = n.cloud && v ? n.cloud.ready({
3847
+ core: Z,
3848
+ capabilities: ue
3849
+ }) : null, fe = n.config.versionHistory ? fi({
3850
3850
  provider: n.config.versionHistory,
3851
3851
  editor: Rn(h, r),
3852
- history: Q.history,
3853
- conditionPreview: Q.conditionPreview,
3854
- autoSave: Q.autoSave,
3852
+ history: Z.history,
3853
+ conditionPreview: Z.conditionPreview,
3854
+ autoSave: Z.autoSave,
3855
3855
  collaboration: u ? {
3856
3856
  suspend: u.core.suspend,
3857
3857
  resume: u.core.resume,
@@ -3864,44 +3864,44 @@ var ma = [
3864
3864
  } : null,
3865
3865
  onError: n.config.onError
3866
3866
  }) : null;
3867
- he && (de.versionHistory = he.capability);
3868
- let ge = P(() => B?.isOpen.value === !0 || W !== null && W.panel.value !== null || v?.panelState.rightPanelOpen.value === !0), _e = P(() => h.state.previewMode ? "tpl:left-0 tpl:right-0" : ge.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"), ve = z(null), ye = z(0), be = P(() => ({ top: `calc(3.5 * var(--tpl-base-size) + ${ye.value}px)` })), xe;
3867
+ fe && (ue.versionHistory = fe.capability);
3868
+ let pe = P(() => B?.isOpen.value === !0 || G !== null && G.panel.value !== null || v?.panelState.rightPanelOpen.value === !0), me = P(() => h.state.previewMode ? "tpl:left-0 tpl:right-0" : pe.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"), he = z(null), ge = z(0), ve = P(() => ({ top: `calc(3.5 * var(--tpl-base-size) + ${ge.value}px)` })), ye;
3869
3869
  d(() => {
3870
- ye.value = ve.value?.offsetHeight ?? 0, ve.value && typeof ResizeObserver < "u" && (xe = new ResizeObserver(([e]) => {
3871
- e && (ye.value = e.borderBoxSize?.[0]?.blockSize ?? e.contentRect.height);
3872
- }), xe.observe(ve.value));
3873
- }), p(() => xe?.disconnect());
3874
- let { showNotice: Se } = kn(() => n.config.smallScreenNotice);
3870
+ ge.value = he.value?.offsetHeight ?? 0, he.value && typeof ResizeObserver < "u" && (ye = new ResizeObserver(([e]) => {
3871
+ e && (ge.value = e.borderBoxSize?.[0]?.blockSize ?? e.contentRect.height);
3872
+ }), ye.observe(he.value));
3873
+ }), p(() => ye?.disconnect());
3874
+ let { showNotice: be } = kn(() => n.config.smallScreenNotice);
3875
3875
  d(async () => {
3876
3876
  await n.fontsManager.loadCustomFonts();
3877
3877
  }), p(() => {
3878
- n.fontsManager.cleanupFontLinks(), W?.destroy(), n.cloud?.destroy(), Q.destroy();
3878
+ n.fontsManager.cleanupFontLinks(), G?.destroy(), n.cloud?.destroy(), Z.destroy();
3879
3879
  });
3880
- let Ce = x ?? h, we = Xn(Q.editorRoot);
3880
+ let Se = x ?? h, Ce = Xn(Z.editorRoot);
3881
3881
  return t({
3882
- getLocale: () => h.activeLocale.value ?? X(h.content.value),
3882
+ getLocale: () => h.activeLocale.value ?? K(h.content.value),
3883
3883
  setLocale: (e) => h.setActiveLocale(e),
3884
3884
  getContent: () => h.content.value,
3885
3885
  setContent: (e) => h.setContent(e),
3886
3886
  insertBlock: (e) => {
3887
3887
  if (h.state.previewMode) return Pn.warn("insertBlock() does nothing in preview mode."), null;
3888
- let t = ie(e);
3889
- return hi(h, t) ? (we(t.id), t.id) : null;
3888
+ let t = xe(e);
3889
+ return hi(h, t) ? (Ce(t.id), t.id) : null;
3890
3890
  },
3891
3891
  setTheme: (e) => h.setUiTheme(e),
3892
- setMergeTags: Q.setMergeTags,
3892
+ setMergeTags: Z.setMergeTags,
3893
3893
  isDirty: () => h.state.isDirty,
3894
- create: Ce.create,
3895
- load: Ce.load,
3896
- save: Ce.save,
3897
- renderCustomBlock: Q.registry.renderCustomBlock,
3898
- getCustomBlockStylesheet: (e) => Q.registry.getDefinition(e)?.stylesheet
3894
+ create: Se.create,
3895
+ load: Se.load,
3896
+ save: Se.save,
3897
+ renderCustomBlock: Z.registry.renderCustomBlock,
3898
+ getCustomBlockStylesheet: (e) => Z.registry.getDefinition(e)?.stylesheet
3899
3899
  }), (t, r) => (i(), y("div", {
3900
3900
  ref_key: "rootEl",
3901
3901
  ref: D,
3902
3902
  class: C(["tpl tpl:relative tpl:h-full", { "tpl:dark": S(h).state.darkMode }]),
3903
- "data-tpl-theme": S(Q).resolvedTheme.value,
3904
- style: F(S(Q).themeStyles.value),
3903
+ "data-tpl-theme": S(Z).resolvedTheme.value,
3904
+ style: F(S(Z).themeStyles.value),
3905
3905
  onDragover: r[8] ||= k(() => {}, ["prevent"]),
3906
3906
  onDrop: r[9] ||= k(() => {}, ["prevent"])
3907
3907
  }, [
@@ -3910,24 +3910,24 @@ var ma = [
3910
3910
  H(Va, {
3911
3911
  editor: S(h),
3912
3912
  localization: n.config.localization,
3913
- core: S(Q),
3913
+ core: S(Z),
3914
3914
  templates: S(x),
3915
3915
  "show-template-name": e.config.templates?.nameField !== !1,
3916
3916
  "test-email": S(L),
3917
- "version-history": S(he),
3917
+ "version-history": S(fe),
3918
3918
  comments: S(B),
3919
3919
  collaboration: S(u),
3920
- ai: S(W)
3920
+ ai: S(G)
3921
3921
  }, V({ _: 2 }, [S(v) ? {
3922
3922
  name: "left-extras",
3923
- fn: a(() => [H(S(ce), {
3923
+ fn: a(() => [H(S(oe), {
3924
3924
  part: "left",
3925
3925
  cloud: S(v)
3926
3926
  }, null, 8, ["cloud"])]),
3927
3927
  key: "0"
3928
3928
  } : void 0, S(v) ? {
3929
3929
  name: "right-extras",
3930
- fn: a(() => [H(S(ce), {
3930
+ fn: a(() => [H(S(oe), {
3931
3931
  part: "right",
3932
3932
  cloud: S(v)
3933
3933
  }, null, 8, ["cloud"])]),
@@ -3944,31 +3944,31 @@ var ma = [
3944
3944
  "collaboration",
3945
3945
  "ai"
3946
3946
  ]),
3947
- c(H(Bi, { style: F(be.value) }, null, 8, ["style"]), [[te, !S(h).state.previewMode]]),
3947
+ c(H(Bi, { style: F(ve.value) }, null, 8, ["style"]), [[te, !S(h).state.previewMode]]),
3948
3948
  A("div", {
3949
- class: C(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", _e.value]),
3950
- style: F([{ transition: "left var(--tpl-transition),\n right var(--tpl-transition)" }, be.value])
3949
+ class: C(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", me.value]),
3950
+ style: F([{ transition: "left var(--tpl-transition),\n right var(--tpl-transition)" }, ve.value])
3951
3951
  }, [A("div", Mo, [A("div", No, [H(M, { name: "tpl-preview-pill" }, {
3952
- default: a(() => [S(h).state.previewMode && !S(Q).previewResolution.supersedesSamples.value ? (i(), y("div", Po, [H(er, {
3953
- "sample-mode": S(Q).mergeTagSampleMode.value,
3954
- onChange: r[0] ||= (e) => S(Q).mergeTagSampleMode.value = e
3952
+ default: a(() => [S(h).state.previewMode && !S(Z).previewResolution.supersedesSamples.value ? (i(), y("div", Po, [H(er, {
3953
+ "sample-mode": S(Z).mergeTagSampleMode.value,
3954
+ onChange: r[0] ||= (e) => S(Z).mergeTagSampleMode.value = e
3955
3955
  }, null, 8, ["sample-mode"])])) : w("", !0)]),
3956
3956
  _: 1
3957
3957
  }), H(M, { name: "tpl-preview-pill" }, {
3958
- default: a(() => [S(Q).conditionPreview.hasHiddenBlocks.value && S(Q).appliesConditionFilter.value ? (i(), y("button", {
3958
+ default: a(() => [S(Z).conditionPreview.hasHiddenBlocks.value && S(Z).appliesConditionFilter.value ? (i(), y("button", {
3959
3959
  key: 0,
3960
3960
  type: "button",
3961
3961
  class: C([S(Kt), "tpl:shadow-[var(--tpl-shadow-md)]"]),
3962
3962
  "data-testid": "restore-hidden-blocks",
3963
- onClick: r[1] ||= (e) => S(Q).conditionPreview.reset()
3963
+ onClick: r[1] ||= (e) => S(Z).conditionPreview.reset()
3964
3964
  }, [H(S(Ke), {
3965
3965
  size: 16,
3966
3966
  "stroke-width": 2
3967
- }), b(" " + j(S(Q).t.blockSettings.restoreHiddenBlocks), 1)], 2)) : w("", !0)]),
3967
+ }), b(" " + j(S(Z).t.blockSettings.restoreHiddenBlocks), 1)], 2)) : w("", !0)]),
3968
3968
  _: 1
3969
3969
  })])]), A("main", Fo, [H(ki, {
3970
3970
  viewport: S(h).state.viewport,
3971
- content: S(Q).previewResolution.content.value,
3971
+ content: S(Z).previewResolution.content.value,
3972
3972
  "selected-block-id": S(h).state.selectedBlockId,
3973
3973
  "dark-mode": S(h).state.darkMode,
3974
3974
  "preview-mode": S(h).state.previewMode,
@@ -3983,28 +3983,28 @@ var ma = [
3983
3983
  ])])], 6),
3984
3984
  e.config.branding === !1 ? w("", !0) : (i(), T(ua, {
3985
3985
  key: 0,
3986
- "position-class": [_e.value]
3986
+ "position-class": [me.value]
3987
3987
  }, null, 8, ["position-class"])),
3988
3988
  A("div", {
3989
3989
  class: "tpl-sr-only",
3990
3990
  role: "status",
3991
3991
  "aria-live": "polite",
3992
3992
  "aria-atomic": "true",
3993
- "aria-label": S(Q).t.landmarks.reorderAnnouncements
3994
- }, j(S(Q).keyboardReorder.announcement.value), 9, Io),
3993
+ "aria-label": S(Z).t.landmarks.reorderAnnouncements
3994
+ }, j(S(Z).keyboardReorder.announcement.value), 9, Io),
3995
3995
  c(H(ra, {
3996
- tab: fe.value,
3997
- "onUpdate:tab": r[2] ||= (e) => fe.value = e,
3998
- style: F([be.value, { "transition-property": "right" }]),
3996
+ tab: de.value,
3997
+ "onUpdate:tab": r[2] ||= (e) => de.value = e,
3998
+ style: F([ve.value, { "transition-property": "right" }]),
3999
3999
  "selected-block": S(h).selectedBlock.value ? S(_).displayBlock(S(h).selectedBlock.value) : null,
4000
4000
  settings: S(_).settings.value,
4001
- "shifted-left": ge.value,
4001
+ "shifted-left": pe.value,
4002
4002
  onUpdateBlock: r[3] ||= (e) => S(h).updateBlock(S(h).state.selectedBlockId, e),
4003
4003
  onDeleteBlock: r[4] ||= () => {
4004
- S(h).state.selectedBlockId && S(Q).blockActions.deleteBlock(S(h).state.selectedBlockId);
4004
+ S(h).state.selectedBlockId && S(Z).blockActions.deleteBlock(S(h).state.selectedBlockId);
4005
4005
  },
4006
4006
  onDuplicateBlock: r[5] ||= () => {
4007
- S(h).selectedBlock.value && S(Q).blockActions.duplicateBlock(S(h).selectedBlock.value);
4007
+ S(h).selectedBlock.value && S(Z).blockActions.duplicateBlock(S(h).selectedBlock.value);
4008
4008
  },
4009
4009
  onUpdateSettings: r[6] ||= (e) => S(h).updateSettings(e)
4010
4010
  }, null, 8, [
@@ -4016,16 +4016,16 @@ var ma = [
4016
4016
  ]), [[te, !S(h).state.previewMode]]),
4017
4017
  A("div", {
4018
4018
  ref_key: "topChrome",
4019
- ref: ve,
4019
+ ref: he,
4020
4020
  class: "tpl-top-chrome tpl:absolute tpl:top-14 tpl:right-0 tpl:left-0 tpl:z-40"
4021
- }, [S(he)?.isAvailable.value ? (i(), T(S(Y), {
4021
+ }, [S(fe)?.isAvailable.value ? (i(), T(S(se), {
4022
4022
  key: 0,
4023
- feature: S(he)
4023
+ feature: S(fe)
4024
4024
  }, null, 8, ["feature"])) : w("", !0), e.config.localization ? (i(), T(Dr, {
4025
4025
  key: 1,
4026
4026
  editor: S(h),
4027
4027
  locales: e.config.localization.locales,
4028
- feature: S(K),
4028
+ feature: S(J),
4029
4029
  change: m.value
4030
4030
  }, null, 8, [
4031
4031
  "editor",
@@ -4035,7 +4035,7 @@ var ma = [
4035
4035
  ])) : w("", !0)], 512)
4036
4036
  ]),
4037
4037
  A("div", {
4038
- ref: (e) => S(Q).popoverRoot.value = e,
4038
+ ref: (e) => S(Z).popoverRoot.value = e,
4039
4039
  class: "tpl-popover-root"
4040
4040
  }, null, 512),
4041
4041
  H(so),
@@ -4049,8 +4049,8 @@ var ma = [
4049
4049
  feature: S(ee),
4050
4050
  provider: e.config.media,
4051
4051
  locale: e.config.locale,
4052
- "ui-theme": S(Q).resolvedTheme.value,
4053
- "popover-target": S(Q).popoverRoot.value
4052
+ "ui-theme": S(Z).resolvedTheme.value,
4053
+ "popover-target": S(Z).popoverRoot.value
4054
4054
  }, null, 8, [
4055
4055
  "feature",
4056
4056
  "provider",
@@ -4066,28 +4066,28 @@ var ma = [
4066
4066
  key: 3,
4067
4067
  feature: S(B)
4068
4068
  }, null, 8, ["feature"])) : w("", !0),
4069
- S(W) ? (i(), T(S(ne), {
4069
+ S(G) ? (i(), T(S(W), {
4070
4070
  key: 4,
4071
- feature: S(W)
4071
+ feature: S(G)
4072
4072
  }, null, 8, ["feature"])) : w("", !0),
4073
- S(u) || q.value ? (i(), T(cr, { key: 5 }, {
4074
- default: a(() => [S(u) ? (i(), T(S(oe), {
4073
+ S(u) || Y.value ? (i(), T(cr, { key: 5 }, {
4074
+ default: a(() => [S(u) ? (i(), T(S(ie), {
4075
4075
  key: 0,
4076
4076
  feature: S(u)
4077
- }, null, 8, ["feature"])) : w("", !0), q.value ? (i(), T(S(ae), {
4077
+ }, null, 8, ["feature"])) : w("", !0), Y.value ? (i(), T(S(re), {
4078
4078
  key: 1,
4079
- notice: q.value,
4080
- onDismiss: r[7] ||= (e) => q.value = null
4079
+ notice: Y.value,
4080
+ onDismiss: r[7] ||= (e) => Y.value = null
4081
4081
  }, null, 8, ["notice"])) : w("", !0)]),
4082
4082
  _: 1
4083
4083
  })) : w("", !0),
4084
- e.cloud && S(v) && S(me) ? (i(), T(S(se), {
4084
+ e.cloud && S(v) && S(Q) ? (i(), T(S(ae), {
4085
4085
  key: 6,
4086
4086
  editor: S(h),
4087
- core: S(Q),
4087
+ core: S(Z),
4088
4088
  runtime: e.cloud,
4089
4089
  cloud: S(v),
4090
- ready: S(me)
4090
+ ready: S(Q)
4091
4091
  }, null, 8, [
4092
4092
  "editor",
4093
4093
  "core",
@@ -4095,7 +4095,7 @@ var ma = [
4095
4095
  "cloud",
4096
4096
  "ready"
4097
4097
  ])) : w("", !0),
4098
- S(Se) ? (i(), T(ca, { key: 7 })) : w("", !0)
4098
+ S(be) ? (i(), T(ca, { key: 7 })) : w("", !0)
4099
4099
  ], 46, Ao));
4100
4100
  }
4101
4101
  }), [["__scopeId", "data-v-87f85584"]]), Ro = /@import\s*(?:url\(\s*(?:"[^"]*"|'[^']*'|[^)]*)\s*\)|"[^"]*"|'[^']*')[^;]*;/g;
@@ -4110,8 +4110,8 @@ function Bo(e) {
4110
4110
  };
4111
4111
  }
4112
4112
  async function Vo(e, t) {
4113
- let n = pe(e.getContent()), r = t?.locale ?? X(n), i = t?.locale !== void 0 || n.settings?.locales?.length ? Q(n, r) : n, a = e.getLayout?.(), o = a ? oe(Q(a, r, { missing: "default" }), i) : i;
4114
- return a || (ve(o), W(o)), await nr(o, {
4113
+ let n = _e(e.getContent()), r = t?.locale ?? K(n), i = t?.locale !== void 0 || n.settings?.locales?.length ? ue(n, r) : n, a = e.getLayout?.(), o = a ? ve(ue(a, r, { missing: "default" }), i) : i;
4114
+ return a || (ge(o), pe(o)), await nr(o, {
4115
4115
  renderCustomBlock: e.renderCustomBlock,
4116
4116
  getCustomBlockStylesheet: e.getCustomBlockStylesheet
4117
4117
  }), {
@@ -4186,14 +4186,14 @@ function $o(e, t) {
4186
4186
  n && (t && n.app !== t || (n.cleanup(), n.app.unmount(), Jo.delete(e), Yo === e && (Yo = null)));
4187
4187
  }
4188
4188
  function es(e) {
4189
- e.layout && (e.layout = Bn(e.layout, e.mergeTags), re(e.layout)), e.content && (e.content = Bn(e.content, e.mergeTags), ve(e.content), W(e.content));
4189
+ e.layout && (e.layout = Bn(e.layout, e.mergeTags), Z(e.layout)), e.content && (e.content = Bn(e.content, e.mergeTags), ge(e.content), pe(e.content));
4190
4190
  }
4191
4191
  async function ts(e) {
4192
4192
  let t = { ...e };
4193
- if (t.translation !== void 0 && (t.translation === null || typeof t.translation != "object" || typeof t.translation.translate != "function")) throw new Y("translation must be an object with a translate function.");
4194
- for (let e of t.localization?.locales ?? []) if (!Te(e)) throw new Y(`Invalid localization locale "${e}".`);
4193
+ if (t.translation !== void 0 && (t.translation === null || typeof t.translation != "object" || typeof t.translation.translate != "function")) throw new Q("translation must be an object with a translate function.");
4194
+ for (let e of t.localization?.locales ?? []) if (!ce(e)) throw new Q(`Invalid localization locale "${e}".`);
4195
4195
  let n = t.localization?.doNotTranslate;
4196
- if (n !== void 0 && (!Array.isArray(n) || n.length > 500 || n.some((e) => typeof e != "string" || e.trim().length < 1 || e.trim().length > 100))) throw new Y("localization.doNotTranslate must be an array of at most 500 terms, each 1–100 characters.");
4196
+ if (n !== void 0 && (!Array.isArray(n) || n.length > 500 || n.some((e) => typeof e != "string" || e.trim().length < 1 || e.trim().length > 100))) throw new Q("localization.doNotTranslate must be an array of at most 500 terms, each 1–100 characters.");
4197
4197
  return es(t), ns(t, Qo(t.container));
4198
4198
  }
4199
4199
  async function ns(e, { container: t, token: n }, i) {
@@ -4236,14 +4236,14 @@ async function ns(e, { container: t, token: n }, i) {
4236
4236
  function rs({ config: e, editorRef: t, fontsManager: n, unmount: r }) {
4237
4237
  let i = {
4238
4238
  getContent() {
4239
- return pe(t.value ? t.value.getContent() : e.content ?? be(e.fonts?.defaultFont, ir(e)));
4239
+ return _e(t.value ? t.value.getContent() : e.content ?? de(e.fonts?.defaultFont, ir(e)));
4240
4240
  },
4241
4241
  getLocale() {
4242
- return t.value?.getLocale() ?? X(i.getContent());
4242
+ return t.value?.getLocale() ?? K(i.getContent());
4243
4243
  },
4244
4244
  setLocale(n) {
4245
4245
  let r = i.getContent();
4246
- if (n !== X(r) && (!e.localization || !r.settings.locales?.includes(n))) throw new Y(`This template has no "${n}" version.`, void 0, "unknown_locale");
4246
+ if (n !== K(r) && (!e.localization || !r.settings.locales?.includes(n))) throw new Q(`This template has no "${n}" version.`, void 0, "unknown_locale");
4247
4247
  t.value?.setLocale(n);
4248
4248
  },
4249
4249
  setContent(n) {
@@ -4252,7 +4252,7 @@ function rs({ config: e, editorRef: t, fontsManager: n, unmount: r }) {
4252
4252
  },
4253
4253
  insertBlock(n) {
4254
4254
  let r = { blocks: [n] };
4255
- return ve(r), W(r), t.value ? t.value.insertBlock(Hn(n, e.mergeTags)) : null;
4255
+ return ge(r), pe(r), t.value ? t.value.insertBlock(Hn(n, e.mergeTags)) : null;
4256
4256
  },
4257
4257
  setTheme(e) {
4258
4258
  t.value && t.value.setTheme(e);
@@ -4317,7 +4317,7 @@ async function is(e) {
4317
4317
  mergeTags: e.mergeTags
4318
4318
  };
4319
4319
  es(t);
4320
- let n = Qo(e.container), [{ bootstrapCloud: r }, i] = await Promise.all([import("./chunks/createCloudRuntime-D2DUaudp.js"), sn(e.locale ?? "en")]), { runtime: a, providers: o, user: s } = await r({
4320
+ let n = Qo(e.container), [{ bootstrapCloud: r }, i] = await Promise.all([import("./chunks/createCloudRuntime-DJkDGKQ_.js"), sn(e.locale ?? "en")]), { runtime: a, providers: o, user: s } = await r({
4321
4321
  config: e,
4322
4322
  cloudTranslations: i
4323
4323
  });
@@ -4368,6 +4368,6 @@ async function is(e) {
4368
4368
  function as() {
4369
4369
  Yo && $o(Yo);
4370
4370
  }
4371
- export { Jn as AI_ALT_TEXT_RULES, Yn as AI_FIXABLE_RULES, oe as applyLayout, be as createDefaultTemplateContent, Le as createLocalStorageMediaProvider, Ee as createLocalStorageSavedBlocksProvider, K as createParagraphBlock, ue as createSlotBlock, de as createWrapperBlock, rn as getBaseLocale, ln as getSupportedCloudLocales, xn as getSupportedLocales, ts as init, is as initCloud, nn as isCloudLocaleSupported, bn as isLocaleSupported, le as isSlot, se as isWrapper, ge as layoutWrapsSlot, as as unmount, re as validateLayout };
4371
+ export { Jn as AI_ALT_TEXT_RULES, Yn as AI_FIXABLE_RULES, ve as applyLayout, de as createDefaultTemplateContent, Le as createLocalStorageMediaProvider, Ee as createLocalStorageSavedBlocksProvider, q as createParagraphBlock, he as createSlotBlock, J as createWrapperBlock, rn as getBaseLocale, ln as getSupportedCloudLocales, xn as getSupportedLocales, ts as init, is as initCloud, nn as isCloudLocaleSupported, bn as isLocaleSupported, Se as isSlot, W as isWrapper, fe as layoutWrapsSlot, as as unmount, Z as validateLayout };
4372
4372
 
4373
4373
  //# sourceMappingURL=editor.js.map