@templatical/editor 0.34.3 → 0.36.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 (290) hide show
  1. package/dist/{AiChatSidebar-CkHJ28sf.js → AiChatSidebar-tu4eLcf_.js} +78 -70
  2. package/dist/{AiFeatureMenu-DWdKguDN.js → AiFeatureMenu-BF0i0vA4.js} +17 -17
  3. package/dist/{BlockIssueBadge-DcyHTAqw.js → BlockIssueBadge-DT-FqKeC.js} +9 -9
  4. package/dist/BlockPreviewCanvas-DDCmMram.js +131 -0
  5. package/dist/CloudHeaderExtras-NPhudovT.js +59 -0
  6. package/dist/{CloudPanels-BGz9ygo6.js → CloudPanels-Iwnky0iA.js} +78 -108
  7. package/dist/CollaboratorBar-DAITu0hz.js +103 -0
  8. package/dist/{ColorPicker-C6EOwtHC.js → ColorPicker-BqlZ_TqG.js} +193 -193
  9. package/dist/{CommentsPanel-DmWh8f08.js → CommentsPanel-CDvgmWP1.js} +3 -3
  10. package/dist/{CommentsSidebar-CL_tffzT.js → CommentsSidebar-X_xqM3dR.js} +182 -173
  11. package/dist/{CountdownBlock-D1fsNsyS.js → CountdownBlock-ZFJIdbP6.js} +12 -12
  12. package/dist/{CountdownToolbar-B8J4i5Xp.js → CountdownToolbar-DBFoG3a6.js} +67 -67
  13. package/dist/{DesignReferenceSidebar-BDhEeaAh.js → DesignReferenceSidebar--QtXjLrw.js} +103 -95
  14. package/dist/{FieldRow-BWt7ECqo.js → FieldRow-C8nOknr_.js} +39 -39
  15. package/dist/IssuesPanel-BLbNFMSX.js +117 -0
  16. package/dist/{LoadingTrack-SQXoZVf2.js → LoadingTrack-BlTL4zFv.js} +2 -2
  17. package/dist/MediaPanels-CMTAhDXB.js +43 -0
  18. package/dist/{MergeTagInput-RytOlh1A.js → MergeTagInput-BEjzj4Iu.js} +153 -144
  19. package/dist/{MergeTagModeToggle-Bi-FydXj.js → MergeTagModeToggle-DKN6ihI5.js} +108 -96
  20. package/dist/{MergeTagSuggestion-CoCuzEmW.js → MergeTagSuggestion-DKoLEeoj.js} +21 -21
  21. package/dist/ParagraphEditor-1E9yzOfk.js +782 -0
  22. package/dist/{RestoreVersionDialog-Db5rZRMA.js → RestoreVersionDialog-BMGUkcd8.js} +28 -28
  23. package/dist/RichTextEditorContent-BnxbQUV9.js +154 -0
  24. package/dist/{SaveBlockDialog-CDCzx6Bo.js → SaveBlockDialog-WKASpCCT.js} +78 -78
  25. package/dist/SavedBlocksBrowserModal-AYEXTMtQ.js +323 -0
  26. package/dist/{SavedBlocksPanels-DFzV0CRD.js → SavedBlocksPanels-D_CpacTl.js} +6 -6
  27. package/dist/{SavedBlocksPickBar-XyXmnSnO.js → SavedBlocksPickBar-BHMwg-1G.js} +11 -11
  28. package/dist/TemplateScoringPanel-CSin43YM.js +267 -0
  29. package/dist/{TestEmailModal-DIfJy9eE.js → TestEmailModal-BxizsRCd.js} +59 -59
  30. package/dist/{TestEmailPanel-C8Wx5yPS.js → TestEmailPanel-vd2e5HzT.js} +3 -3
  31. package/dist/TitleEditor-CLJ68Ty4.js +199 -0
  32. package/dist/TplModal-Q9fDgS1M.js +51 -0
  33. package/dist/{VersionHistoryMenu-CV90OhXs.js → VersionHistoryMenu-eGYVhM4H.js} +48 -46
  34. package/dist/{VersionHistoryPanels-BE3pplJG.js → VersionHistoryPanels-C7Ntrrfq.js} +4 -4
  35. package/dist/{VersionPreviewBanner-BwUWBtlH.js → VersionPreviewBanner-BbQXnR0M.js} +9 -9
  36. package/dist/blockTypeIcons-5qD4bB76.js +163 -0
  37. package/dist/bundle-stats.json +8 -8
  38. package/dist/{ca-C0hfqt4U.js → ca-D9S-UCfZ.js} +2 -0
  39. package/dist/ca-Jx2CDwtn.js +83 -0
  40. package/dist/cdn/chunks/{AiChatSidebar-BEnIWn6s.js → AiChatSidebar-dyqqHAcI.js} +4 -4
  41. package/dist/cdn/chunks/{AiChatSidebar-BEnIWn6s.js.map → AiChatSidebar-dyqqHAcI.js.map} +1 -1
  42. package/dist/cdn/chunks/{AiFeatureMenu-DMl23akc.js → AiFeatureMenu-BjVMwhW8.js} +5 -5
  43. package/dist/cdn/chunks/{AiFeatureMenu-DMl23akc.js.map → AiFeatureMenu-BjVMwhW8.js.map} +1 -1
  44. package/dist/cdn/chunks/{BlockIssueBadge-CloK4k3M.js → BlockIssueBadge-BJ__oEtm.js} +4 -4
  45. package/dist/cdn/chunks/{BlockIssueBadge-CloK4k3M.js.map → BlockIssueBadge-BJ__oEtm.js.map} +1 -1
  46. package/dist/cdn/chunks/BlockPreviewCanvas-B5f26eLE.js +133 -0
  47. package/dist/cdn/chunks/BlockPreviewCanvas-B5f26eLE.js.map +1 -0
  48. package/dist/cdn/chunks/{CloudHeaderExtras-b4KpVeUN.js → CloudHeaderExtras-D5P5IEKA.js} +4 -4
  49. package/dist/cdn/chunks/{CloudHeaderExtras-b4KpVeUN.js.map → CloudHeaderExtras-D5P5IEKA.js.map} +1 -1
  50. package/dist/cdn/chunks/{CloudPanels-DzwOq9lp.js → CloudPanels-DkmR05nB.js} +15 -45
  51. package/dist/cdn/chunks/{CloudPanels-DzwOq9lp.js.map → CloudPanels-DkmR05nB.js.map} +1 -1
  52. package/dist/cdn/chunks/{CollaboratorBar-WXKvpoGK.js → CollaboratorBar-Yn7KSpt4.js} +4 -4
  53. package/dist/cdn/chunks/{CollaboratorBar-WXKvpoGK.js.map → CollaboratorBar-Yn7KSpt4.js.map} +1 -1
  54. package/dist/cdn/chunks/{ColorPicker-BubTDiS1.js → ColorPicker-LcrzgMoW.js} +7 -7
  55. package/dist/cdn/chunks/{ColorPicker-BubTDiS1.js.map → ColorPicker-LcrzgMoW.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-DAA2VqX4.js → CommentsPanel-CntwwocI.js} +2 -2
  57. package/dist/cdn/chunks/{CommentsPanel-DAA2VqX4.js.map → CommentsPanel-CntwwocI.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-Ci0M2ePp.js → CommentsSidebar-BLDKnKy7.js} +4 -4
  59. package/dist/cdn/chunks/{CommentsSidebar-Ci0M2ePp.js.map → CommentsSidebar-BLDKnKy7.js.map} +1 -1
  60. package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js → CountdownBlock-B4AfqJwb.js} +2 -2
  61. package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js.map → CountdownBlock-B4AfqJwb.js.map} +1 -1
  62. package/dist/cdn/chunks/{CountdownToolbar-CzZq26Vp.js → CountdownToolbar-CA1dpuOI.js} +3 -3
  63. package/dist/cdn/chunks/{CountdownToolbar-CzZq26Vp.js.map → CountdownToolbar-CA1dpuOI.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-C_ehdX5C.js → DesignReferenceSidebar-D1Y9Hswe.js} +5 -5
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-C_ehdX5C.js.map → DesignReferenceSidebar-D1Y9Hswe.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-BXAN2_al.js → IssuesPanel-Q62LTqvd.js} +5 -5
  67. package/dist/cdn/chunks/{IssuesPanel-BXAN2_al.js.map → IssuesPanel-Q62LTqvd.js.map} +1 -1
  68. package/dist/cdn/chunks/MediaPanels-D21M6shx.js +45 -0
  69. package/dist/cdn/chunks/MediaPanels-D21M6shx.js.map +1 -0
  70. package/dist/cdn/chunks/{MergeTagInput-1vcI9uQH.js → MergeTagInput-l7paaAml.js} +8 -8
  71. package/dist/cdn/chunks/{MergeTagInput-1vcI9uQH.js.map → MergeTagInput-l7paaAml.js.map} +1 -1
  72. package/dist/cdn/chunks/{MergeTagModeToggle-B_mUYJo4.js → MergeTagModeToggle-DYxkAGtA.js} +5 -5
  73. package/dist/cdn/chunks/{MergeTagModeToggle-B_mUYJo4.js.map → MergeTagModeToggle-DYxkAGtA.js.map} +1 -1
  74. package/dist/cdn/chunks/{ParagraphEditor-DCDHMcmx.js → ParagraphEditor-Bd-GQXee.js} +176 -172
  75. package/dist/cdn/chunks/{ParagraphEditor-DCDHMcmx.js.map → ParagraphEditor-Bd-GQXee.js.map} +1 -1
  76. package/dist/cdn/chunks/{RestoreVersionDialog-BkSSwf-Q.js → RestoreVersionDialog-2X9RpM9A.js} +4 -4
  77. package/dist/cdn/chunks/{RestoreVersionDialog-BkSSwf-Q.js.map → RestoreVersionDialog-2X9RpM9A.js.map} +1 -1
  78. package/dist/cdn/chunks/{RichTextEditorContent-S4KogjIj.js → RichTextEditorContent-D_rb0rmU.js} +8 -8
  79. package/dist/cdn/chunks/{RichTextEditorContent-S4KogjIj.js.map → RichTextEditorContent-D_rb0rmU.js.map} +1 -1
  80. package/dist/cdn/chunks/{SaveBlockDialog-BH774Nt0.js → SaveBlockDialog-CufdTomT.js} +15 -15
  81. package/dist/cdn/chunks/{SaveBlockDialog-BH774Nt0.js.map → SaveBlockDialog-CufdTomT.js.map} +1 -1
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CSUqw_dD.js → SavedBlocksBrowserModal-CqpaNsk7.js} +8 -8
  83. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CSUqw_dD.js.map → SavedBlocksBrowserModal-CqpaNsk7.js.map} +1 -1
  84. package/dist/cdn/chunks/{SavedBlocksPanels-B6ApbCjG.js → SavedBlocksPanels-DpxYxddo.js} +2 -2
  85. package/dist/cdn/chunks/{SavedBlocksPanels-B6ApbCjG.js.map → SavedBlocksPanels-DpxYxddo.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-C9MXSRcR.js → SavedBlocksPickBar-Drpoav1B.js} +4 -4
  87. package/dist/cdn/chunks/{SavedBlocksPickBar-C9MXSRcR.js.map → SavedBlocksPickBar-Drpoav1B.js.map} +1 -1
  88. package/dist/cdn/chunks/{TemplateScoringPanel-QVOxc9TZ.js → TemplateScoringPanel-DBjUNULq.js} +5 -5
  89. package/dist/cdn/chunks/{TemplateScoringPanel-QVOxc9TZ.js.map → TemplateScoringPanel-DBjUNULq.js.map} +1 -1
  90. package/dist/cdn/chunks/{TestEmailModal-_CZvaO58.js → TestEmailModal-BTNlSW6f.js} +11 -11
  91. package/dist/cdn/chunks/{TestEmailModal-_CZvaO58.js.map → TestEmailModal-BTNlSW6f.js.map} +1 -1
  92. package/dist/cdn/chunks/{TestEmailPanel-DXLxvyrD.js → TestEmailPanel-D0A9Zgxr.js} +2 -2
  93. package/dist/cdn/chunks/{TestEmailPanel-DXLxvyrD.js.map → TestEmailPanel-D0A9Zgxr.js.map} +1 -1
  94. package/dist/cdn/chunks/{TitleEditor-BuCOahW3.js → TitleEditor-CrnuIq62.js} +9 -9
  95. package/dist/cdn/chunks/{TitleEditor-BuCOahW3.js.map → TitleEditor-CrnuIq62.js.map} +1 -1
  96. package/dist/cdn/chunks/{TplModal-CqY8R3hn.js → TplModal-DYXrTz42.js} +5 -5
  97. package/dist/cdn/chunks/{TplModal-CqY8R3hn.js.map → TplModal-DYXrTz42.js.map} +1 -1
  98. package/dist/cdn/chunks/{VersionHistoryMenu-DDjIBvad.js → VersionHistoryMenu-bDGnE4hb.js} +6 -6
  99. package/dist/cdn/chunks/VersionHistoryMenu-bDGnE4hb.js.map +1 -0
  100. package/dist/cdn/chunks/{VersionHistoryPanels-BuTw04T5.js → VersionHistoryPanels-82P0Q0HM.js} +2 -2
  101. package/dist/cdn/chunks/{VersionHistoryPanels-BuTw04T5.js.map → VersionHistoryPanels-82P0Q0HM.js.map} +1 -1
  102. package/dist/cdn/chunks/{VersionPreviewBanner-fGAv20qI.js → VersionPreviewBanner-BJiwKkVC.js} +3 -3
  103. package/dist/cdn/chunks/{VersionPreviewBanner-fGAv20qI.js.map → VersionPreviewBanner-BJiwKkVC.js.map} +1 -1
  104. package/dist/cdn/chunks/{blockTypeIcons-ZEzEpCti.js → blockTypeIcons-CNjJSFun.js} +2 -2
  105. package/dist/cdn/chunks/{blockTypeIcons-ZEzEpCti.js.map → blockTypeIcons-CNjJSFun.js.map} +1 -1
  106. package/dist/cdn/chunks/{ca-C0hfqt4U.js → ca-D9S-UCfZ.js} +3 -1
  107. package/dist/cdn/chunks/{ca-C0hfqt4U.js.map → ca-D9S-UCfZ.js.map} +1 -1
  108. package/dist/cdn/chunks/{ca-CNRWAMHI.js → ca-Jx2CDwtn.js} +2 -6
  109. package/dist/cdn/chunks/ca-Jx2CDwtn.js.map +1 -0
  110. package/dist/cdn/chunks/{cloud-BP5-6__d.js → cloud-BLgCKP7Z.js} +453 -228
  111. package/dist/cdn/chunks/cloud-BLgCKP7Z.js.map +1 -0
  112. package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js +385 -0
  113. package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js.map +1 -0
  114. package/dist/{de-C6J2Iae8.js → cdn/chunks/de-BUPszLpi.js} +4 -0
  115. package/dist/cdn/chunks/{de-C6J2Iae8.js.map → de-BUPszLpi.js.map} +1 -1
  116. package/dist/cdn/chunks/{de-DFYCT4QU.js → de-Ck0pBGHu.js} +2 -6
  117. package/dist/cdn/chunks/de-Ck0pBGHu.js.map +1 -0
  118. package/dist/cdn/chunks/{src-Cxl-9O-L.js → editor-modal-MXgtarMl.js} +1473 -1934
  119. package/dist/cdn/chunks/editor-modal-MXgtarMl.js.map +1 -0
  120. package/dist/cdn/chunks/{en-BaUYOQi8.js → en-BbOC5x3w.js} +3 -1
  121. package/dist/cdn/chunks/en-BbOC5x3w.js.map +1 -0
  122. package/dist/cdn/chunks/en-C9U7N77n.js +2 -0
  123. package/dist/cdn/chunks/{es-CKDYfJYn.js → es-0bCDcT9p.js} +3 -1
  124. package/dist/cdn/chunks/{es-CKDYfJYn.js.map → es-0bCDcT9p.js.map} +1 -1
  125. package/dist/cdn/chunks/{es-OgkdMZGX.js → es-lagTvUfX.js} +2 -6
  126. package/dist/cdn/chunks/es-lagTvUfX.js.map +1 -0
  127. package/dist/cdn/chunks/{extensions-7z04EIGg.js → extensions-B8_jnIkD.js} +4 -4
  128. package/dist/cdn/chunks/{extensions-7z04EIGg.js.map → extensions-B8_jnIkD.js.map} +1 -1
  129. package/dist/{fr-L8DR73mK.js → cdn/chunks/fr-Brr8mJ9e.js} +4 -0
  130. package/dist/cdn/chunks/fr-Brr8mJ9e.js.map +1 -0
  131. package/dist/cdn/chunks/{fr-Dswns199.js → fr-C4hVl5Lk.js} +2 -6
  132. package/dist/cdn/chunks/fr-C4hVl5Lk.js.map +1 -0
  133. package/dist/cdn/chunks/icons-BUlqGSgd.js +1675 -0
  134. package/dist/cdn/chunks/icons-BUlqGSgd.js.map +1 -0
  135. package/dist/cdn/chunks/{keys-DQp8x7Nx.js → keys-DBFhDFng.js} +4 -4
  136. package/dist/cdn/chunks/{keys-DQp8x7Nx.js.map → keys-DBFhDFng.js.map} +1 -1
  137. package/dist/cdn/chunks/{nl-CbcPJlrL.js → nl-CReD7Apd.js} +2 -6
  138. package/dist/cdn/chunks/nl-CReD7Apd.js.map +1 -0
  139. package/dist/{nl-GDWeuX18.js → cdn/chunks/nl-Co3_RL0M.js} +4 -0
  140. package/dist/cdn/chunks/nl-Co3_RL0M.js.map +1 -0
  141. package/dist/cdn/chunks/{preRenderCustomBlocks-LFB-e-0m.js → preRenderCustomBlocks-Bdpiiw4A.js} +2 -2
  142. package/dist/cdn/chunks/{preRenderCustomBlocks-LFB-e-0m.js.map → preRenderCustomBlocks-Bdpiiw4A.js.map} +1 -1
  143. package/dist/cdn/chunks/{pt-BR-B1AVVhWj.js → pt-BR-BECez5b0.js} +3 -1
  144. package/dist/cdn/chunks/{pt-BR-B1AVVhWj.js.map → pt-BR-BECez5b0.js.map} +1 -1
  145. package/dist/cdn/chunks/{pt-BR-BibOQm-o.js → pt-BR-BRA0-vGP.js} +2 -6
  146. package/dist/cdn/chunks/pt-BR-BRA0-vGP.js.map +1 -0
  147. package/dist/cdn/chunks/{src-BM3f9I7t.js → src-CUvZWL6Y.js} +83 -83
  148. package/dist/cdn/chunks/src-CUvZWL6Y.js.map +1 -0
  149. package/dist/cdn/chunks/{src-BDvZrpFH.js → src-DZ0C9mH7.js} +161 -160
  150. package/dist/cdn/chunks/src-DZ0C9mH7.js.map +1 -0
  151. package/dist/cdn/chunks/{src-CLoCCDfs.js → src-Dwgq7hf4.js} +71 -48
  152. package/dist/cdn/chunks/src-Dwgq7hf4.js.map +1 -0
  153. package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js → useCloudI18n-DSWSGj-A.js} +2 -2
  154. package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js.map → useCloudI18n-DSWSGj-A.js.map} +1 -1
  155. package/dist/cdn/chunks/{useEditorCore-ehUSEsbw.js → useEditorCore-Cs7rYVBo.js} +614 -522
  156. package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +1 -0
  157. package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js → useEditorRoot-B0zW2nT4.js} +2 -2
  158. package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js.map → useEditorRoot-B0zW2nT4.js.map} +1 -1
  159. package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js → useI18n-Dlo7R9RA.js} +2 -2
  160. package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js.map → useI18n-Dlo7R9RA.js.map} +1 -1
  161. package/dist/cdn/chunks/{useMergeTag-TLhF2fGK.js → useMergeTag-BYAifvh8.js} +4 -4
  162. package/dist/cdn/chunks/{useMergeTag-TLhF2fGK.js.map → useMergeTag-BYAifvh8.js.map} +1 -1
  163. package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js → usePopoverPosition-ElP3ABaV.js} +2 -2
  164. package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js.map → usePopoverPosition-ElP3ABaV.js.map} +1 -1
  165. package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js → useScrollToBlock-nTbWkgaU.js} +2 -2
  166. package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js.map → useScrollToBlock-nTbWkgaU.js.map} +1 -1
  167. package/dist/cdn/editor.css +1 -1
  168. package/dist/cdn/editor.js +1195 -1095
  169. package/dist/cdn/editor.js.map +1 -1
  170. package/dist/check-DWtkBzBU.js +11 -0
  171. package/dist/chevron-down-C-Fjxcqj.js +11 -0
  172. package/dist/chevron-right-SOkn2d4P.js +11 -0
  173. package/dist/chevron-up-lntU1ypp.js +11 -0
  174. package/dist/circle-alert-CjzUTwy3.js +30 -0
  175. package/dist/clock-pB2QKPsJ.js +16 -0
  176. package/dist/{cloud-BMzRKCbk.js → cloud-DdidMW6f.js} +446 -201
  177. package/dist/copy-CId1E038.js +19 -0
  178. package/dist/createCloudRuntime-x5WZm3p8.js +383 -0
  179. package/dist/createLucideIcon-Cwf_nTzE.js +96 -0
  180. package/dist/{cdn/chunks/de-C6J2Iae8.js → de-BUPszLpi.js} +2 -2
  181. package/dist/de-Ck0pBGHu.js +83 -0
  182. package/dist/{dist-BxFbxpgW.js → dist-BVqAYoRB.js} +125 -125
  183. package/dist/dist-D8i1ixHK.js +177 -0
  184. package/dist/dist-DBirAJIs.js +410 -0
  185. package/dist/{dist-PL6vP4SC.js → dist-tGkjkX-v.js} +143 -122
  186. package/dist/editor-modal-B_LaQf0s.js +5998 -0
  187. package/dist/{en-BaUYOQi8.js → en-BbOC5x3w.js} +2 -0
  188. package/dist/en-DcmpWV53.js +2 -0
  189. package/dist/{es-CKDYfJYn.js → es-0bCDcT9p.js} +2 -0
  190. package/dist/es-lagTvUfX.js +83 -0
  191. package/dist/{extensions-Mf8iHey9.js → extensions-CHOBZRab.js} +43 -43
  192. package/dist/eye-BuGtFUoJ.js +16 -0
  193. package/dist/{cdn/chunks/fr-L8DR73mK.js → fr-Brr8mJ9e.js} +2 -2
  194. package/dist/fr-C4hVl5Lk.js +83 -0
  195. package/dist/image-up-gH4JEpU5.js +27 -0
  196. package/dist/index.d.ts +77 -11
  197. package/dist/info-BQ60P82u.js +23 -0
  198. package/dist/{keys-C3P1yxnr.js → keys-DQA2i1k1.js} +4 -4
  199. package/dist/link-3R8it3J7.js +14 -0
  200. package/dist/list-Ccdgj46T.js +33 -0
  201. package/dist/loader-circle-B_tAD4k6.js +12 -0
  202. package/dist/message-circle-P-KSc6V0.js +11 -0
  203. package/dist/nl-CReD7Apd.js +83 -0
  204. package/dist/{cdn/chunks/nl-GDWeuX18.js → nl-Co3_RL0M.js} +2 -2
  205. package/dist/pencil-9ZiwqS4r.js +14 -0
  206. package/dist/plus-BwJEzCaO.js +14 -0
  207. package/dist/{preRenderCustomBlocks-CSIF-HyJ.js → preRenderCustomBlocks-DFXH54Zr.js} +1 -1
  208. package/dist/{pt-BR-B1AVVhWj.js → pt-BR-BECez5b0.js} +2 -0
  209. package/dist/pt-BR-BRA0-vGP.js +83 -0
  210. package/dist/refresh-cw-DEgfb2FK.js +25 -0
  211. package/dist/{runtime-dom.esm-bundler-BuG03jBM.js → runtime-dom.esm-bundler-PnoZU512.js} +106 -106
  212. package/dist/search-DqQ8Li5E.js +16 -0
  213. package/dist/send-CE6uvqop.js +14 -0
  214. package/dist/shield-check-DhD1Z3rd.js +14 -0
  215. package/dist/sparkles-R0ZQHa6F.js +28 -0
  216. package/dist/style.css +1 -1
  217. package/dist/templatical-editor.js +2742 -2590
  218. package/dist/text-align-start-DSux2UNn.js +58 -0
  219. package/dist/trash-Cf_SqsER.js +30 -0
  220. package/dist/triangle-alert-C6tGa6jw.js +22 -0
  221. package/dist/upload-DusKjpVr.js +21 -0
  222. package/dist/{useAliveFlag-PVmp95MT.js → useAliveFlag-oyByIcjy.js} +1 -1
  223. package/dist/{useCloudI18n-BKoiYsWZ.js → useCloudI18n-BLyh_e2T.js} +2 -2
  224. package/dist/{useEditorCore-DdkQuTHl.js → useEditorCore-DhlKOYwe.js} +1780 -1651
  225. package/dist/{useEditorRoot-DkRGTQRs.js → useEditorRoot-ds57-l6F.js} +2 -2
  226. package/dist/{useI18n-CL6RfPzK.js → useI18n-BbdxxpOE.js} +2 -2
  227. package/dist/{useMergeTag-gSuYus-M.js → useMergeTag-DlvOBW_B.js} +4 -4
  228. package/dist/{usePopoverPosition-CWxaIWd3.js → usePopoverPosition-CprM5p-c.js} +2 -2
  229. package/dist/useScrollToBlock-BTFw0b9O.js +48 -0
  230. package/dist/{vue.runtime.esm-bundler-D9JUcKrV.js → vue.runtime.esm-bundler-DShF3P6k.js} +1192 -1181
  231. package/dist/x-D_-42Ukq.js +14 -0
  232. package/package.json +9 -12
  233. package/dist/BlockPreviewCanvas-B621ANn9.js +0 -129
  234. package/dist/CloudHeaderExtras-BJ3Cebhv.js +0 -59
  235. package/dist/CollaboratorBar-KphmSQeZ.js +0 -95
  236. package/dist/IssuesPanel-CiOjeRFI.js +0 -109
  237. package/dist/ParagraphEditor-C87tkmtE.js +0 -767
  238. package/dist/RichTextEditorContent-BmTcV2-a.js +0 -152
  239. package/dist/SavedBlocksBrowserModal-DQR6kJB1.js +0 -322
  240. package/dist/TemplateScoringPanel-CpyEKMzC.js +0 -257
  241. package/dist/TitleEditor-iNFOisr4.js +0 -198
  242. package/dist/TplModal-CowM3o_F.js +0 -51
  243. package/dist/blockTypeIcons-DQsKtHik.js +0 -134
  244. package/dist/cdn/chunks/BlockPreviewCanvas-DSiJFJa0.js +0 -131
  245. package/dist/cdn/chunks/BlockPreviewCanvas-DSiJFJa0.js.map +0 -1
  246. package/dist/cdn/chunks/VersionHistoryMenu-DDjIBvad.js.map +0 -1
  247. package/dist/cdn/chunks/ca-CNRWAMHI.js.map +0 -1
  248. package/dist/cdn/chunks/cloud-BP5-6__d.js.map +0 -1
  249. package/dist/cdn/chunks/createCloudRuntime-JFE-sxbT.js +0 -443
  250. package/dist/cdn/chunks/createCloudRuntime-JFE-sxbT.js.map +0 -1
  251. package/dist/cdn/chunks/de-DFYCT4QU.js.map +0 -1
  252. package/dist/cdn/chunks/en-BaUYOQi8.js.map +0 -1
  253. package/dist/cdn/chunks/en-mEKGL1PX.js +0 -2
  254. package/dist/cdn/chunks/es-OgkdMZGX.js.map +0 -1
  255. package/dist/cdn/chunks/fr-Dswns199.js.map +0 -1
  256. package/dist/cdn/chunks/fr-L8DR73mK.js.map +0 -1
  257. package/dist/cdn/chunks/icons-SP5Itd-A.js +0 -1218
  258. package/dist/cdn/chunks/icons-SP5Itd-A.js.map +0 -1
  259. package/dist/cdn/chunks/nl-CbcPJlrL.js.map +0 -1
  260. package/dist/cdn/chunks/nl-GDWeuX18.js.map +0 -1
  261. package/dist/cdn/chunks/pt-BR-BibOQm-o.js.map +0 -1
  262. package/dist/cdn/chunks/src-BDvZrpFH.js.map +0 -1
  263. package/dist/cdn/chunks/src-BM3f9I7t.js.map +0 -1
  264. package/dist/cdn/chunks/src-CLoCCDfs.js.map +0 -1
  265. package/dist/cdn/chunks/src-Cxl-9O-L.js.map +0 -1
  266. package/dist/cdn/chunks/useEditorCore-ehUSEsbw.js.map +0 -1
  267. package/dist/check-JK8Uacq0.js +0 -7
  268. package/dist/chevron-down-a-fb_Ijn.js +0 -7
  269. package/dist/chevron-up-x4l0et_Y.js +0 -7
  270. package/dist/circle-alert-CJDW5LZo.js +0 -25
  271. package/dist/clock-BW6rXk2f.js +0 -12
  272. package/dist/createCloudRuntime-DbTFm1ES.js +0 -441
  273. package/dist/createLucideIcon-Bvw1Zx56.js +0 -43
  274. package/dist/dist-dNiknO7j.js +0 -251
  275. package/dist/dist-heatwAdo.js +0 -150
  276. package/dist/image-up-CuzFc1mu.js +0 -23
  277. package/dist/info-DybAwcA3.js +0 -19
  278. package/dist/loader-circle-t-SVgmJ3.js +0 -7
  279. package/dist/message-circle-DtwKrlhN.js +0 -7
  280. package/dist/pencil-2qhC-Y4q.js +0 -10
  281. package/dist/refresh-cw-C8SBuPdg.js +0 -29
  282. package/dist/send-BoqJliF6.js +0 -10
  283. package/dist/shield-check-D0dMaHtE.js +0 -10
  284. package/dist/sparkles-Dy2BJjiX.js +0 -23
  285. package/dist/text-align-start-DrxjxvIy.js +0 -43
  286. package/dist/trash-rYMzzHZd.js +0 -25
  287. package/dist/triangle-alert-DxnFj4-B.js +0 -17
  288. package/dist/upload-DZu1adQz.js +0 -17
  289. package/dist/useScrollToBlock-CdI8fGqt.js +0 -44
  290. package/dist/x-DJOd1hS4.js +0 -10
@@ -1,39 +1,39 @@
1
- import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c, Q as l, R as u, S as d, U as f, W as p, X as m, Y as h, Z as g, at as _, b as v, c as y, ct as b, et as x, f as S, g as C, h as w, it as T, j as E, k as D, l as O, lt as k, m as A, ot as j, p as M, q as N, rt as P, s as F, t as I, u as L, ut as R, w as ee, x as z, y as B } from "./draggable-kbOhCgnk.js";
2
- import { A as te, B as ne, C as re, D as ie, E as ae, F as oe, I as se, L as V, M as ce, N as le, O as ue, P as de, R as fe, S as pe, T as me, U as he, V as ge, _ as _e, a as ve, b as ye, d as be, f as xe, g as Se, h as Ce, i as H, j as we, k as Te, l as Ee, m as De, n as Oe, nt as ke, o as Ae, p as je, r as Me, rt as Ne, s as Pe, t as U, tt as Fe, u as Ie, w as Le, z as Re } from "./src-CLoCCDfs.js";
3
- import { _ as ze, h as Be, v as Ve, y as He } from "./dist-BW6Y49zE.js";
4
- import { a as W, c as Ue, i as We, r as Ge } from "./dist-CAFTQ6Y2.js";
5
- import { A as Ke, C as qe, D as Je, E as G, F as Ye, G as Xe, H as Ze, I as Qe, J as $e, K as et, L as tt, M as nt, N as rt, O as it, P as at, R as ot, S as st, T as ct, U as lt, V as ut, W as dt, _ as ft, a as pt, b as mt, c as ht, d as gt, f as _t, g as vt, h as K, j as yt, k as bt, m as xt, n as St, o as Ct, p as wt, q, r as Tt, s as Et, u as Dt, v as Ot, w as kt, x as At, y as jt } from "./keys-DQp8x7Nx.js";
1
+ import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c, Q as l, R as u, S as d, U as f, W as p, X as m, Y as h, Z as g, at as _, b as v, c as y, ct as b, et as x, f as S, g as C, h as w, it as T, j as E, k as D, l as O, lt as k, m as A, ot as j, p as M, q as N, rt as P, s as F, t as I, u as L, ut as R, w as z, x as B, y as V } from "./draggable-kbOhCgnk.js";
2
+ import { A as H, B as ee, C as te, D as ne, E as re, F as ie, H as ae, I as oe, L as U, M as se, N as ce, O as le, P as ue, R as de, S as fe, T as pe, V as me, W as he, _ as ge, a as _e, b as ve, d as ye, f as be, g as xe, h as Se, i as W, it as Ce, j as we, k as Te, l as Ee, m as De, n as Oe, nt as ke, o as Ae, p as je, r as Me, rt as Ne, s as Pe, t as G, u as Fe, w as Ie, z as Le } from "./src-Dwgq7hf4.js";
3
+ import { _ as Re, h as ze, v as Be, y as Ve } from "./dist-BW6Y49zE.js";
4
+ import { a as K, c as He, i as Ue, r as We } from "./dist-CAFTQ6Y2.js";
5
+ import { A as Ge, C as Ke, D as q, E as qe, F as Je, G as Ye, H as Xe, I as Ze, J, K as Qe, L as $e, M as et, N as tt, O as nt, P as rt, R as it, S as at, T as ot, U as st, W as ct, Y as lt, _ as ut, a as dt, b as ft, c as pt, d as mt, f as ht, g as Y, h as gt, j as _t, k as vt, l as yt, m as bt, n as xt, o as St, p as Ct, q as wt, r as Tt, s as Et, v as Dt, w as Ot, x as kt, y as At, z as jt } from "./keys-DBFhDFng.js";
6
6
  import "./timeouts-DHPZQ0G3.js";
7
- import { t as J } from "./useI18n-Ct1VIFcf.js";
8
- import { t as Y } from "./logger-ByvdoAwq.js";
9
- import { a as Mt, i as Nt, o as Pt, r as X, t as Ft } from "./usePopoverPosition-BxVWE5_0.js";
10
- import { A as It, Bt as Lt, Et as Rt, H as zt, Ot as Bt, Tt as Vt, X as Ht, d as Ut, ft as Wt, ht as Gt, it as Kt, o as qt, s as Jt, tt as Yt, u as Xt, v as Zt, vt as Qt, zt as $t } from "./icons-SP5Itd-A.js";
11
- import { t as en } from "./LoadingTrack-Cm3TDKb3.js";
12
- import { t as tn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
- import { t as nn } from "./useEditorRoot-CteADR3y.js";
14
- import "./useCloudI18n-MxgHWrV6.js";
15
- import { t as Z } from "./useMergeTag-TLhF2fGK.js";
16
- import { t as rn } from "./useAliveFlag-CT9gjvO_.js";
7
+ import { t as X } from "./useI18n-Dlo7R9RA.js";
8
+ import { t as Z } from "./logger-ByvdoAwq.js";
9
+ import { a as Mt, i as Nt, o as Pt, r as Ft, t as It } from "./usePopoverPosition-ElP3ABaV.js";
10
+ import { A as Lt, Bt as Rt, Et as zt, H as Bt, Ot as Vt, Tt as Ht, X as Ut, d as Wt, ft as Gt, ht as Kt, it as qt, o as Jt, s as Yt, tt as Xt, u as Zt, v as Qt, vt as $t, zt as en } from "./icons-BUlqGSgd.js";
11
+ import { t as tn } from "./LoadingTrack-Cm3TDKb3.js";
12
+ import { t as nn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
+ import { t as rn } from "./useEditorRoot-B0zW2nT4.js";
14
+ import "./useCloudI18n-DSWSGj-A.js";
15
+ import { t as an } from "./useMergeTag-BYAifvh8.js";
16
+ import { t as on } from "./useAliveFlag-CT9gjvO_.js";
17
17
  //#region ../core/src/error-reporting.ts
18
- function an(e) {
18
+ function sn(e) {
19
19
  return e instanceof Error ? e : Error(String(e), { cause: e });
20
20
  }
21
- function on(e, t) {
21
+ function cn(e, t) {
22
22
  try {
23
23
  t();
24
24
  } catch (t) {
25
- e?.(an(t));
25
+ e?.(sn(t));
26
26
  }
27
27
  }
28
28
  //#endregion
29
29
  //#region ../core/src/editor.ts
30
- function sn(e) {
30
+ function ln(e) {
31
31
  return e === "1" ? 1 : e === "3" ? 3 : 2;
32
32
  }
33
- function cn(e) {
33
+ function un(e) {
34
34
  let t = m({
35
35
  template: null,
36
- content: e.content ?? fe(e.defaultFontFamily, e.templateDefaults),
36
+ content: e.content ?? Le(e.defaultFontFamily, e.templateDefaults),
37
37
  selectedBlockId: null,
38
38
  viewport: "desktop",
39
39
  darkMode: !1,
@@ -128,7 +128,7 @@ function cn(e) {
128
128
  if (l(n)) return;
129
129
  let r = o(t.content.blocks, n);
130
130
  if (r && r.type === "section") {
131
- if (i < 0 || i >= sn(r.columns)) return;
131
+ if (i < 0 || i >= ln(r.columns)) return;
132
132
  r.children[i] = r.children[i] || [];
133
133
  let t = r.children[i];
134
134
  a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
@@ -161,7 +161,7 @@ function cn(e) {
161
161
  let d;
162
162
  if (i) {
163
163
  let e = o(t.content.blocks, i);
164
- if (!e || e.type !== "section" || a < 0 || a >= sn(e.columns)) return;
164
+ if (!e || e.type !== "section" || a < 0 || a >= ln(e.columns)) return;
165
165
  e.children[a] = e.children[a] || [], d = e.children[a];
166
166
  } else d = t.content.blocks;
167
167
  let [f] = s.blocks.splice(u, 1);
@@ -171,10 +171,10 @@ function cn(e) {
171
171
  r();
172
172
  }
173
173
  function E(e, t) {
174
- throw new U(`[Templatical] Templates: ${e} ${t}`);
174
+ throw new G(`[Templatical] Templates: ${e} ${t}`);
175
175
  }
176
176
  function D(t) {
177
- on(e.onError, t);
177
+ cn(e.onError, t);
178
178
  }
179
179
  function O(t) {
180
180
  let { templates: n } = e;
@@ -274,11 +274,11 @@ function cn(e) {
274
274
  }
275
275
  //#endregion
276
276
  //#region ../core/src/history.ts
277
- var ln = 50, un = 300, dn = 1500;
278
- function fn(e) {
279
- let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = ln } = e, a = l([]), o = l([]), s = l(!1), c = null, u = null, d = p(() => a.value.length > 0), f = p(() => o.value.length > 0);
277
+ var dn = 50, fn = 300, pn = 1500;
278
+ function mn(e) {
279
+ let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = dn } = e, a = l([]), o = l([]), s = l(!1), c = null, u = null, d = p(() => a.value.length > 0), f = p(() => o.value.length > 0);
280
280
  function m() {
281
- return ye(t.value);
281
+ return ve(t.value);
282
282
  }
283
283
  function h(e) {
284
284
  a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
@@ -294,21 +294,21 @@ function fn(e) {
294
294
  if (u && u.blockId === e) {
295
295
  clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
296
296
  u = null;
297
- }, un);
297
+ }, fn);
298
298
  return;
299
299
  }
300
300
  g(), h(m()), o.value = [], u = {
301
301
  blockId: e,
302
302
  timeoutId: setTimeout(() => {
303
303
  u = null;
304
- }, un)
304
+ }, fn)
305
305
  };
306
306
  }
307
307
  }
308
308
  function y() {
309
309
  s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
310
310
  s.value = !1, c = null;
311
- }, dn);
311
+ }, pn);
312
312
  }
313
313
  function b() {
314
314
  if (a.value.length === 0) return;
@@ -342,33 +342,33 @@ function fn(e) {
342
342
  }
343
343
  //#endregion
344
344
  //#region ../core/src/block-actions.ts
345
- function pn(e) {
345
+ function hn(e) {
346
346
  e.type === "table" ? e.rows = e.rows.map((e) => ({
347
347
  ...e,
348
- id: V(),
348
+ id: U(),
349
349
  cells: e.cells.map((e) => ({
350
350
  ...e,
351
- id: V()
351
+ id: U()
352
352
  }))
353
353
  })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
354
354
  ...e,
355
- id: V()
355
+ id: U()
356
356
  })) : e.type === "menu" && (e.items = e.items.map((e) => ({
357
357
  ...e,
358
- id: V()
358
+ id: U()
359
359
  })));
360
360
  }
361
- function mn(e) {
361
+ function gn(e) {
362
362
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
363
363
  function o(n, r, a) {
364
- let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = pe(n, o);
364
+ let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = fe(n, o);
365
365
  return t(s, r, a), i(s.id), s;
366
366
  }
367
367
  function s(e, n, r) {
368
368
  let o = JSON.parse(JSON.stringify(e));
369
- if (o.id = V(), pn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
369
+ if (o.id = U(), hn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
370
370
  let t = JSON.parse(JSON.stringify(e));
371
- return t.id = V(), pn(t), t;
371
+ return t.id = U(), hn(t), t;
372
372
  }))), n !== void 0 || r !== void 0) t(o, n, r);
373
373
  else {
374
374
  let i = a?.(e.id) ?? null;
@@ -391,9 +391,9 @@ function mn(e) {
391
391
  }
392
392
  //#endregion
393
393
  //#region ../core/src/auto-save.ts
394
- var hn = 2e3;
395
- function gn(e) {
396
- let { content: t, isDirty: n, onChange: r, debounce: i = hn, enabled: a = !0 } = e, o = null, s = !1;
394
+ var _n = 2e3;
395
+ function vn(e) {
396
+ let { content: t, isDirty: n, onChange: r, debounce: i = _n, enabled: a = !0 } = e, o = null, s = !1;
397
397
  function c() {
398
398
  return typeof a == "function" ? a() : a;
399
399
  }
@@ -430,7 +430,7 @@ function gn(e) {
430
430
  }
431
431
  //#endregion
432
432
  //#region ../core/src/condition-preview.ts
433
- function _n(e) {
433
+ function yn(e) {
434
434
  let t = m(/* @__PURE__ */ new Set()), n = p(() => t.size > 0);
435
435
  function r(e) {
436
436
  return t.has(e);
@@ -450,7 +450,7 @@ function _n(e) {
450
450
  }
451
451
  //#endregion
452
452
  //#region ../core/src/data-source-fetch.ts
453
- function vn(e) {
453
+ function bn(e) {
454
454
  let t = l(!1), n = l(!1), r = p(() => !!e.definition.value?.dataSource), i = p(() => r.value && !e.block.value.dataSourceFetched);
455
455
  async function a() {
456
456
  let r = e.definition.value;
@@ -482,7 +482,7 @@ function vn(e) {
482
482
  }
483
483
  //#endregion
484
484
  //#region ../core/src/history-interceptor.ts
485
- function yn(e, t) {
485
+ function xn(e, t) {
486
486
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
487
487
  e.addBlock = (r, i, a, o) => {
488
488
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -498,7 +498,7 @@ function yn(e, t) {
498
498
  }
499
499
  //#endregion
500
500
  //#region ../core/src/saved-blocks.ts
501
- function bn(e) {
501
+ function Sn(e) {
502
502
  let { provider: t } = e, n = l([]), r = l(!1), i = S(() => {
503
503
  let e = /* @__PURE__ */ new Set();
504
504
  for (let t of n.value) {
@@ -514,10 +514,10 @@ function bn(e) {
514
514
  return s.value && e.canDelete !== !1;
515
515
  }
516
516
  function d(e, t) {
517
- throw new U(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
517
+ throw new G(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
518
518
  }
519
519
  function f(t) {
520
- on(e.onError, t);
520
+ cn(e.onError, t);
521
521
  }
522
522
  async function p(i) {
523
523
  r.value = !0;
@@ -586,9 +586,9 @@ function bn(e) {
586
586
  }
587
587
  //#endregion
588
588
  //#region ../core/src/saved-blocks-local.ts
589
- var xn = "templatical:saved-blocks";
590
- function Sn(e = {}) {
591
- let t = e.key ?? xn;
589
+ var Cn = "templatical:saved-blocks";
590
+ function wn(e = {}) {
591
+ let t = e.key ?? Cn;
592
592
  function n() {
593
593
  if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
594
594
  return localStorage;
@@ -613,7 +613,7 @@ function Sn(e = {}) {
613
613
  },
614
614
  async create(e) {
615
615
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
616
- id: V(),
616
+ id: U(),
617
617
  name: e.name,
618
618
  content: e.content,
619
619
  ...e.category ? { category: e.category } : {},
@@ -640,19 +640,100 @@ function Sn(e = {}) {
640
640
  };
641
641
  }
642
642
  //#endregion
643
+ //#region ../core/src/media-local.ts
644
+ var Tn = "templatical:media", En = 50;
645
+ function Dn(e = {}) {
646
+ let t = e.key ?? Tn;
647
+ function n() {
648
+ if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with localStorage. Supply your own MediaProvider for server-side or non-browser use.");
649
+ return localStorage;
650
+ }
651
+ function r() {
652
+ let e = n().getItem(t);
653
+ if (!e) return [];
654
+ try {
655
+ let t = JSON.parse(e);
656
+ return Array.isArray(t) ? t : [];
657
+ } catch {
658
+ return [];
659
+ }
660
+ }
661
+ function i(e) {
662
+ n().setItem(t, JSON.stringify(e));
663
+ }
664
+ function a(e) {
665
+ return typeof FileReader > "u" ? Promise.reject(/* @__PURE__ */ Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with FileReader.")) : new Promise((t, n) => {
666
+ let r = new FileReader();
667
+ r.onload = () => {
668
+ if (typeof r.result != "string") {
669
+ n(/* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
670
+ return;
671
+ }
672
+ t(r.result);
673
+ }, r.onerror = () => {
674
+ n(r.error ?? /* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
675
+ }, r.readAsDataURL(e);
676
+ });
677
+ }
678
+ return {
679
+ async list(e) {
680
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
681
+ let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
682
+ return t.includes(n) || r.includes(n);
683
+ }) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + En), c = { items: s }, l = o + s.length;
684
+ return l < i.length && (c.nextCursor = String(l)), c;
685
+ },
686
+ async create(e) {
687
+ let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
688
+ id: U(),
689
+ url: t,
690
+ filename: e.filename || e.file.name,
691
+ createdAt: n,
692
+ updatedAt: n,
693
+ size: e.file.size
694
+ };
695
+ return e.alt !== void 0 && (o.alt = e.alt), e.file.type && (o.mimeType = e.file.type), e.folderId !== void 0 && (o.folderId = e.folderId), i([o, ...r()]), o;
696
+ },
697
+ async update(e, t) {
698
+ let n = r(), a = n.findIndex((t) => t.id === e);
699
+ if (a === -1) throw Error(`[Templatical] Media asset not found: ${e}`);
700
+ let o = n[a], s = {
701
+ ...o,
702
+ ...t,
703
+ id: o.id,
704
+ url: o.url,
705
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
706
+ }, c = [...n];
707
+ return c[a] = s, i(c), s;
708
+ },
709
+ async delete(e) {
710
+ let t = r();
711
+ for (let n of e) if (!t.some((e) => e.id === n)) throw Error(`[Templatical] Media asset not found: ${n}`);
712
+ let n = new Set(e);
713
+ i(t.filter((e) => !n.has(e.id)));
714
+ },
715
+ folders: !1,
716
+ replace: !1,
717
+ importFromUrl: !1,
718
+ checkUsage: !1,
719
+ frequentlyUsed: !1,
720
+ storage: !1
721
+ };
722
+ }
723
+ //#endregion
643
724
  //#region ../core/src/version-history.ts
644
- function Cn(e) {
725
+ function On(e) {
645
726
  let { provider: t, getTemplateId: n } = e, r = l([]), i = l(!1), a = l(void 0), o = l(!1), s = /* @__PURE__ */ new Map(), c = S(() => typeof t.create == "function"), u = S(() => typeof t.restore == "function");
646
727
  function d(e) {
647
728
  let t = n();
648
- if (!t) throw new U(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
729
+ if (!t) throw new G(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
649
730
  return t;
650
731
  }
651
732
  function f(e) {
652
- throw new U(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
733
+ throw new G(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
653
734
  }
654
735
  function p(t) {
655
- on(e.onError, t);
736
+ cn(e.onError, t);
656
737
  }
657
738
  async function m(n) {
658
739
  let o = d("list");
@@ -721,7 +802,7 @@ function Cn(e) {
721
802
  }
722
803
  //#endregion
723
804
  //#region ../core/src/comments.ts
724
- function wn(e) {
805
+ function kn(e) {
725
806
  let { provider: t, getTemplateId: n, getUser: r } = e, i = l([]), a = l(!1), o = l(!1), s = S(() => typeof t.create == "function"), c = S(() => typeof t.update == "function"), u = S(() => typeof t.delete == "function"), d = S(() => typeof t.setResolved == "function"), f = S(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), p = S(() => i.value.filter((e) => !e.resolvedAt).length), m = S(() => {
726
807
  let e = /* @__PURE__ */ new Map();
727
808
  for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
@@ -729,16 +810,16 @@ function wn(e) {
729
810
  });
730
811
  function h(e) {
731
812
  let t = n();
732
- if (!t) throw new U(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
813
+ if (!t) throw new G(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
733
814
  return t;
734
815
  }
735
816
  function g(e) {
736
817
  let t = r();
737
- if (!t) throw new U(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
818
+ if (!t) throw new G(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
738
819
  return t;
739
820
  }
740
821
  function _(e) {
741
- throw new U(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
822
+ throw new G(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
742
823
  }
743
824
  function v(e) {
744
825
  for (let t of i.value) {
@@ -752,11 +833,11 @@ function wn(e) {
752
833
  return t !== null && e.author.id === t.id;
753
834
  }
754
835
  function b(t) {
755
- let n = an(t);
836
+ let n = sn(t);
756
837
  throw e.onError?.(n), n;
757
838
  }
758
839
  function x(t) {
759
- on(e.onError, t);
840
+ cn(e.onError, t);
760
841
  }
761
842
  function C(e, t, n) {
762
843
  return [
@@ -896,7 +977,7 @@ function wn(e) {
896
977
  applyRemoteDelete: P
897
978
  };
898
979
  }
899
- function Tn(e) {
980
+ function An(e) {
900
981
  let { comments: n, provider: r, getTemplateId: i } = e, { subscribe: a } = r;
901
982
  if (typeof a != "function") return;
902
983
  let o = null;
@@ -919,18 +1000,18 @@ function Tn(e) {
919
1000
  }
920
1001
  //#endregion
921
1002
  //#region src/utils/activeEditorTracker.ts
922
- var En = /* @__PURE__ */ new Set(), Q = 0, Dn = 0;
923
- function On() {
924
- let e = ++Dn;
925
- return En.add(e), Q === 0 && (Q = e), {
1003
+ var jn = /* @__PURE__ */ new Set(), Q = 0, Mn = 0;
1004
+ function Nn() {
1005
+ let e = ++Mn;
1006
+ return jn.add(e), Q === 0 && (Q = e), {
926
1007
  id: e,
927
- isActive: () => En.size <= 1 || Q === e,
1008
+ isActive: () => jn.size <= 1 || Q === e,
928
1009
  claim: () => {
929
1010
  Q = e;
930
1011
  },
931
1012
  dispose: () => {
932
- if (En.delete(e), Q === e) {
933
- let e = Array.from(En);
1013
+ if (jn.delete(e), Q === e) {
1014
+ let e = Array.from(jn);
934
1015
  Q = e[e.length - 1] ?? 0;
935
1016
  }
936
1017
  }
@@ -938,8 +1019,8 @@ function On() {
938
1019
  }
939
1020
  //#endregion
940
1021
  //#region src/composables/usePreviewResolution.ts
941
- var kn = 500;
942
- function An(e) {
1022
+ var Pn = 500;
1023
+ function Fn(e) {
943
1024
  let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
944
1025
  function c() {
945
1026
  s !== null && (clearTimeout(s), s = null);
@@ -950,7 +1031,7 @@ function An(e) {
950
1031
  let n = ++o;
951
1032
  i.value = !0;
952
1033
  let s = {
953
- content: ye(e.getContent()),
1034
+ content: ve(e.getContent()),
954
1035
  ...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
955
1036
  };
956
1037
  try {
@@ -976,7 +1057,7 @@ function An(e) {
976
1057
  }
977
1058
  s = setTimeout(() => {
978
1059
  s = null, u();
979
- }, kn);
1060
+ }, Pn);
980
1061
  }
981
1062
  }
982
1063
  return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
@@ -998,7 +1079,7 @@ function An(e) {
998
1079
  }
999
1080
  //#endregion
1000
1081
  //#region src/composables/useImageUrlResolver.ts
1001
- function jn(e) {
1082
+ function In(e) {
1002
1083
  let t = m(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
1003
1084
  function r(e) {
1004
1085
  return t.get(e);
@@ -1031,8 +1112,8 @@ function jn(e) {
1031
1112
  lookup: a
1032
1113
  };
1033
1114
  }
1034
- function Mn(e) {
1035
- let r = n(mt, null), i = S(e);
1115
+ function Ln(e) {
1116
+ let r = n(kt, null), i = S(e);
1036
1117
  if (!r) return i;
1037
1118
  let a;
1038
1119
  function s() {
@@ -1061,7 +1142,7 @@ function Mn(e) {
1061
1142
  }
1062
1143
  //#endregion
1063
1144
  //#region src/composables/useMergeTagPicker.ts
1064
- function Nn() {
1145
+ function Rn() {
1065
1146
  let e = l(!1), t = l([]), n = null;
1066
1147
  function r(r) {
1067
1148
  if (n) {
@@ -1091,7 +1172,7 @@ function Nn() {
1091
1172
  }
1092
1173
  //#endregion
1093
1174
  //#region src/composables/useLogicTagPicker.ts
1094
- function Pn() {
1175
+ function zn() {
1095
1176
  let e = l(!1), t = l([]), n = l([]), r = null;
1096
1177
  function i(i, a) {
1097
1178
  if (r) {
@@ -1122,17 +1203,17 @@ function Pn() {
1122
1203
  }
1123
1204
  //#endregion
1124
1205
  //#region src/composables/useTemplateLint.ts
1125
- function Fn(e) {
1206
+ function Bn(e) {
1126
1207
  return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
1127
1208
  }
1128
- function In(e) {
1129
- let n = l([]), r = l(!1), i = l(!1), a = x(null), o = Fn(e.options), s = null, c = !1;
1209
+ function Vn(e) {
1210
+ let n = l([]), r = l(!1), i = l(!1), a = x(null), o = Bn(e.options), s = null, c = !1;
1130
1211
  o || u();
1131
1212
  async function u() {
1132
1213
  try {
1133
- let t = await import("./src-BM3f9I7t.js");
1214
+ let t = await import("./src-CUvZWL6Y.js");
1134
1215
  if (c) return;
1135
- a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = He(e.content, d, {
1216
+ a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = Ve(e.content, d, {
1136
1217
  debounce: e.debounce ?? 500,
1137
1218
  deep: !0
1138
1219
  });
@@ -1167,17 +1248,17 @@ function In(e) {
1167
1248
  }
1168
1249
  //#endregion
1169
1250
  //#region src/utils/blockTypeLabels.ts
1170
- function Ln(e, t) {
1251
+ function Hn(e, t) {
1171
1252
  return t.blocks[e] ?? e;
1172
1253
  }
1173
- function Rn(e, t, n = []) {
1174
- if (e.type !== "custom") return Ln(e.type, t);
1254
+ function Un(e, t, n = []) {
1255
+ if (e.type !== "custom") return Hn(e.type, t);
1175
1256
  let { customType: r } = e;
1176
1257
  return n.find((e) => e.type === r)?.name ?? r;
1177
1258
  }
1178
1259
  //#endregion
1179
1260
  //#region src/composables/useKeyboardReorder.ts
1180
- function zn(e, t, n = []) {
1261
+ function Wn(e, t, n = []) {
1181
1262
  let r = l(null), i = l(""), a = null;
1182
1263
  function o(t) {
1183
1264
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
@@ -1204,7 +1285,7 @@ function zn(e, t, n = []) {
1204
1285
  let i = o(r);
1205
1286
  if (!i) return "";
1206
1287
  let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
1207
- return a ? Rn(a, t.t, n) : "";
1288
+ return a ? Un(a, t.t, n) : "";
1208
1289
  }
1209
1290
  function c(t, n) {
1210
1291
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
@@ -1273,13 +1354,13 @@ function zn(e, t, n = []) {
1273
1354
  }
1274
1355
  //#endregion
1275
1356
  //#region src/composables/useUiTheme.ts
1276
- function Bn(e) {
1277
- let t = Ue("(prefers-color-scheme: dark)");
1357
+ function Gn(e) {
1358
+ let t = He("(prefers-color-scheme: dark)");
1278
1359
  return { resolvedTheme: S(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
1279
1360
  }
1280
1361
  //#endregion
1281
1362
  //#region src/composables/useThemeStyles.ts
1282
- var Vn = {
1363
+ var Kn = {
1283
1364
  bg: "--tpl-bg",
1284
1365
  bgElevated: "--tpl-bg-elevated",
1285
1366
  bgHover: "--tpl-bg-hover",
@@ -1303,10 +1384,10 @@ var Vn = {
1303
1384
  dangerLight: "--tpl-danger-light",
1304
1385
  canvasBg: "--tpl-canvas-bg"
1305
1386
  };
1306
- function Hn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1387
+ function qn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1307
1388
  return { themeStyles: S(() => {
1308
1389
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
1309
- if (a) for (let [e, t] of Object.entries(Vn)) {
1390
+ if (a) for (let [e, t] of Object.entries(Kn)) {
1310
1391
  let n = a[e];
1311
1392
  n && (r[t] = n);
1312
1393
  }
@@ -1315,7 +1396,7 @@ function Hn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1315
1396
  }
1316
1397
  //#endregion
1317
1398
  //#region src/composables/useBlockRegistry.ts
1318
- function Un() {
1399
+ function Jn() {
1319
1400
  let e = x(/* @__PURE__ */ new Map());
1320
1401
  function t(t, n) {
1321
1402
  e.value.set(t, n), T(e);
@@ -1324,7 +1405,7 @@ function Un() {
1324
1405
  let r = `custom:${t.type}`;
1325
1406
  e.value.set(r, {
1326
1407
  component: n,
1327
- createBlock: () => me(t),
1408
+ createBlock: () => pe(t),
1328
1409
  definition: t
1329
1410
  }), T(e);
1330
1411
  }
@@ -1355,7 +1436,7 @@ function Un() {
1355
1436
  strictFilters: !1
1356
1437
  }).parseAndRender(t.template, e.fieldValues);
1357
1438
  } catch (t) {
1358
- return Y.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
1439
+ return Z.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
1359
1440
  }
1360
1441
  }
1361
1442
  function c(t) {
@@ -1373,9 +1454,9 @@ function Un() {
1373
1454
  }
1374
1455
  //#endregion
1375
1456
  //#region src/composables/useCustomBlockStylesheets.ts
1376
- function Wn(e, t) {
1457
+ function Yn(e, t) {
1377
1458
  return S(() => {
1378
- let n = Gn(e.value.blocks);
1459
+ let n = Xn(e.value.blocks);
1379
1460
  if (n.size === 0) return [];
1380
1461
  let r = /* @__PURE__ */ new Set(), i = [];
1381
1462
  for (let e of n) {
@@ -1387,11 +1468,11 @@ function Wn(e, t) {
1387
1468
  return i;
1388
1469
  });
1389
1470
  }
1390
- function Gn(e) {
1471
+ function Xn(e) {
1391
1472
  let t = /* @__PURE__ */ new Set();
1392
- return Kn(e, t), t;
1473
+ return Zn(e, t), t;
1393
1474
  }
1394
- function Kn(e, t) {
1475
+ function Zn(e, t) {
1395
1476
  for (let n of e) {
1396
1477
  if (he(n)) {
1397
1478
  t.add(n.customType);
@@ -1400,44 +1481,44 @@ function Kn(e, t) {
1400
1481
  if (n.type === "section") {
1401
1482
  let e = n.children;
1402
1483
  if (!e) continue;
1403
- for (let n of e) Kn(n, t);
1484
+ for (let n of e) Zn(n, t);
1404
1485
  }
1405
1486
  }
1406
1487
  }
1407
1488
  //#endregion
1408
1489
  //#region src/utils/registerBuiltInBlocks.ts
1409
- var qn = [
1490
+ var Qn = [
1410
1491
  {
1411
1492
  type: "section",
1412
1493
  createBlock: we
1413
1494
  },
1414
1495
  {
1415
1496
  type: "title",
1416
- createBlock: oe
1497
+ createBlock: ie
1417
1498
  },
1418
1499
  {
1419
1500
  type: "paragraph",
1420
- createBlock: te
1501
+ createBlock: H
1421
1502
  },
1422
1503
  {
1423
1504
  type: "image",
1424
- createBlock: ue
1505
+ createBlock: le
1425
1506
  },
1426
1507
  {
1427
1508
  type: "button",
1428
- createBlock: re
1509
+ createBlock: te
1429
1510
  },
1430
1511
  {
1431
1512
  type: "divider",
1432
- createBlock: ae
1513
+ createBlock: re
1433
1514
  },
1434
1515
  {
1435
1516
  type: "video",
1436
- createBlock: se
1517
+ createBlock: oe
1437
1518
  },
1438
1519
  {
1439
1520
  type: "social",
1440
- createBlock: ce
1521
+ createBlock: se
1441
1522
  },
1442
1523
  {
1443
1524
  type: "menu",
@@ -1445,23 +1526,23 @@ var qn = [
1445
1526
  },
1446
1527
  {
1447
1528
  type: "table",
1448
- createBlock: de
1529
+ createBlock: ue
1449
1530
  },
1450
1531
  {
1451
1532
  type: "spacer",
1452
- createBlock: le
1533
+ createBlock: ce
1453
1534
  },
1454
1535
  {
1455
1536
  type: "html",
1456
- createBlock: ie
1537
+ createBlock: ne
1457
1538
  },
1458
1539
  {
1459
1540
  type: "countdown",
1460
- createBlock: Le
1541
+ createBlock: Ie
1461
1542
  }
1462
1543
  ];
1463
- function Jn(e, t) {
1464
- for (let n of qn) {
1544
+ function $n(e, t) {
1545
+ for (let n of Qn) {
1465
1546
  let r = t[n.type];
1466
1547
  r && e.registerBuiltIn(n.type, {
1467
1548
  component: r,
@@ -1471,12 +1552,12 @@ function Jn(e, t) {
1471
1552
  }
1472
1553
  //#endregion
1473
1554
  //#region src/utils/resolveHtmlBlockPreview.ts
1474
- function Yn(e) {
1555
+ function er(e) {
1475
1556
  return typeof e == "boolean" ? e : e?.enabled ?? !1;
1476
1557
  }
1477
1558
  //#endregion
1478
1559
  //#region src/utils/templateSettingsFields.ts
1479
- var Xn = {
1560
+ var tr = {
1480
1561
  width: "layout",
1481
1562
  backgroundColor: "appearance",
1482
1563
  textColor: "appearance",
@@ -1484,15 +1565,16 @@ var Xn = {
1484
1565
  linkUnderline: "appearance",
1485
1566
  fontFamily: "appearance",
1486
1567
  locale: "language",
1568
+ direction: "language",
1487
1569
  preheaderText: "preheader"
1488
- }, Zn = Object.keys(Xn);
1489
- function Qn(e) {
1490
- return Object.prototype.hasOwnProperty.call(Xn, e);
1570
+ }, nr = Object.keys(tr);
1571
+ function rr(e) {
1572
+ return Object.prototype.hasOwnProperty.call(tr, e);
1491
1573
  }
1492
- function $n(e) {
1574
+ function ir(e) {
1493
1575
  let t = e?.fields;
1494
1576
  if (t === void 0 || t === !0) return {
1495
- fields: new Set(Zn),
1577
+ fields: new Set(nr),
1496
1578
  unknown: []
1497
1579
  };
1498
1580
  if (t === !1) return {
@@ -1500,7 +1582,7 @@ function $n(e) {
1500
1582
  unknown: []
1501
1583
  };
1502
1584
  let n = /* @__PURE__ */ new Set(), r = [];
1503
- for (let e of t) Qn(e) ? n.add(e) : r.push(String(e));
1585
+ for (let e of t) rr(e) ? n.add(e) : r.push(String(e));
1504
1586
  return {
1505
1587
  fields: n,
1506
1588
  unknown: r
@@ -1508,28 +1590,28 @@ function $n(e) {
1508
1590
  }
1509
1591
  //#endregion
1510
1592
  //#region src/utils/collectOffPaletteDefaults.ts
1511
- function er(e) {
1593
+ function ar(e) {
1512
1594
  return typeof e == "object" && !!e && !Array.isArray(e);
1513
1595
  }
1514
- function tr(e, t, n) {
1515
- let r = new Set(e.map((e) => X(e))), i = [], a = (e, t) => {
1516
- for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(X(o)) && i.push(`${t}.${n}: ${o}`) : er(o) && a(o, `${t}.${n}`);
1596
+ function or(e, t, n) {
1597
+ let r = new Set(e.map((e) => Ft(e))), i = [], a = (e, t) => {
1598
+ 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}`) : ar(o) && a(o, `${t}.${n}`);
1517
1599
  }, o = t;
1518
- for (let [e, t] of Object.entries(Re)) {
1600
+ for (let [e, t] of Object.entries(ee)) {
1519
1601
  let n = o?.[e];
1520
1602
  a({
1521
1603
  ...t,
1522
- ...er(n) ? n : {}
1604
+ ...ar(n) ? n : {}
1523
1605
  }, e);
1524
1606
  }
1525
1607
  return a({
1526
- ...ne,
1608
+ ...me,
1527
1609
  ...n ?? {}
1528
1610
  }, "template"), i;
1529
1611
  }
1530
1612
  //#endregion
1531
1613
  //#region src/utils/localizedBlockDefaults.ts
1532
- function nr(e) {
1614
+ function sr(e) {
1533
1615
  return {
1534
1616
  title: { content: `<p>${e.blockDefaults.title}</p>` },
1535
1617
  paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
@@ -1538,58 +1620,58 @@ function nr(e) {
1538
1620
  }
1539
1621
  //#endregion
1540
1622
  //#region src/i18n/index.ts
1541
- var rr = /* #__PURE__ */ Object.assign({
1542
- "./locales/ca.ts": () => import("./ca-C0hfqt4U.js"),
1543
- "./locales/de.ts": () => import("./de-C6J2Iae8.js"),
1544
- "./locales/en.ts": () => import("./en-BaUYOQi8.js"),
1545
- "./locales/es.ts": () => import("./es-CKDYfJYn.js"),
1546
- "./locales/fr.ts": () => import("./fr-L8DR73mK.js"),
1547
- "./locales/nl.ts": () => import("./nl-GDWeuX18.js"),
1548
- "./locales/pt-BR.ts": () => import("./pt-BR-B1AVVhWj.js")
1549
- }), ir = /* #__PURE__ */ Object.assign({
1623
+ var cr = /* #__PURE__ */ Object.assign({
1624
+ "./locales/ca.ts": () => import("./ca-D9S-UCfZ.js"),
1625
+ "./locales/de.ts": () => import("./de-BUPszLpi.js"),
1626
+ "./locales/en.ts": () => import("./en-BbOC5x3w.js"),
1627
+ "./locales/es.ts": () => import("./es-0bCDcT9p.js"),
1628
+ "./locales/fr.ts": () => import("./fr-Brr8mJ9e.js"),
1629
+ "./locales/nl.ts": () => import("./nl-Co3_RL0M.js"),
1630
+ "./locales/pt-BR.ts": () => import("./pt-BR-BECez5b0.js")
1631
+ }), lr = /* #__PURE__ */ Object.assign({
1550
1632
  "./locales/cloud/de.ts": () => import("./de-BytZwgn6.js"),
1551
1633
  "./locales/cloud/en.ts": () => import("./en-DyOSV0lY.js"),
1552
1634
  "./locales/cloud/pt-BR.ts": () => import("./pt-BR-C1WLSGDh.js")
1553
1635
  });
1554
- function ar(e) {
1636
+ function ur(e) {
1555
1637
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
1556
1638
  }
1557
- var or = ar(rr), sr = ar(ir);
1558
- function cr(e) {
1639
+ var dr = ur(cr), fr = ur(lr);
1640
+ function pr(e) {
1559
1641
  return e.trim().replace(/_/g, "-").toLowerCase();
1560
1642
  }
1561
- function lr(e, t) {
1562
- let n = cr(e);
1563
- return t.find((e) => cr(e) === n);
1643
+ function mr(e, t) {
1644
+ let n = pr(e);
1645
+ return t.find((e) => pr(e) === n);
1564
1646
  }
1565
- function ur(e) {
1566
- return cr(e).split("-")[0];
1647
+ function hr(e) {
1648
+ return pr(e).split("-")[0];
1567
1649
  }
1568
- function dr(e, t) {
1569
- return lr(e, t) ?? lr(ur(e), t);
1650
+ function gr(e, t) {
1651
+ return mr(e, t) ?? mr(hr(e), t);
1570
1652
  }
1571
- function fr(e, t) {
1572
- return dr(e, t) ?? "en";
1653
+ function _r(e, t) {
1654
+ return gr(e, t) ?? "en";
1573
1655
  }
1574
- async function pr(e) {
1575
- let t = rr[`./locales/${fr(e, or)}.ts`];
1656
+ async function vr(e) {
1657
+ let t = cr[`./locales/${_r(e, dr)}.ts`];
1576
1658
  return (await t()).default;
1577
1659
  }
1578
- async function mr(e) {
1579
- let t = ir[`./locales/cloud/${fr(e, sr)}.ts`];
1660
+ async function yr(e) {
1661
+ let t = lr[`./locales/cloud/${_r(e, fr)}.ts`];
1580
1662
  return (await t()).default;
1581
1663
  }
1582
- function hr(e) {
1583
- return dr(e, or) !== void 0;
1664
+ function br(e) {
1665
+ return gr(e, dr) !== void 0;
1584
1666
  }
1585
- function gr(e) {
1586
- return dr(e, sr) !== void 0;
1667
+ function xr(e) {
1668
+ return gr(e, fr) !== void 0;
1587
1669
  }
1588
- function _r() {
1589
- return [...or];
1670
+ function Sr() {
1671
+ return [...dr];
1590
1672
  }
1591
- function vr() {
1592
- return [...sr];
1673
+ function Cr() {
1674
+ return [...fr];
1593
1675
  }
1594
1676
  //#endregion
1595
1677
  //#region src/i18n/contentDefaults.ts
@@ -1650,16 +1732,16 @@ var $ = {
1650
1732
  seconds: "Segons",
1651
1733
  expired: "Aquesta oferta ha caducat"
1652
1734
  }
1653
- }, yr = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
1654
- function br(e) {
1735
+ }, wr = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
1736
+ function Tr(e) {
1655
1737
  if (!e) return $.en;
1656
- let t = e.trim().replace(/_/g, "-").toLowerCase(), n = yr.get(t);
1738
+ let t = e.trim().replace(/_/g, "-").toLowerCase(), n = wr.get(t);
1657
1739
  if (n) return $[n];
1658
- let r = yr.get(ur(t));
1740
+ let r = wr.get(hr(t));
1659
1741
  return r ? $[r] : $.en;
1660
1742
  }
1661
- function xr(e) {
1662
- let t = br(e);
1743
+ function Er(e) {
1744
+ let t = Tr(e);
1663
1745
  return {
1664
1746
  video: { alt: t.video },
1665
1747
  countdown: {
@@ -1673,7 +1755,7 @@ function xr(e) {
1673
1755
  }
1674
1756
  //#endregion
1675
1757
  //#region src/utils/resolveFieldColors.ts
1676
- function Sr(e, t) {
1758
+ function Dr(e, t) {
1677
1759
  let n = Pt({ presets: e.presets }, Mt), r = n.presets.length === 0;
1678
1760
  return {
1679
1761
  presets: r ? t.presets : n.presets,
@@ -1686,9 +1768,9 @@ function Sr(e, t) {
1686
1768
  }
1687
1769
  //#endregion
1688
1770
  //#region src/utils/collectColorFieldIssues.ts
1689
- function Cr(e, t) {
1771
+ function Or(e, t) {
1690
1772
  let n = [], r = (r, i) => {
1691
- let a = Sr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1773
+ let a = Dr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1692
1774
  if (a.invalidPresets.length > 0 && n.push({
1693
1775
  id: s("invalid-presets"),
1694
1776
  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." : "")
@@ -1699,8 +1781,8 @@ function Cr(e, t) {
1699
1781
  id: s("allow-custom-ignored"),
1700
1782
  message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
1701
1783
  }), !a.allowCustom && a.presets.length > 0) {
1702
- let e = r.default ?? "", t = new Set(a.presets.map((e) => X(e)));
1703
- e !== "" && !t.has(X(e)) && n.push({
1784
+ let e = r.default ?? "", t = new Set(a.presets.map((e) => Ft(e)));
1785
+ e !== "" && !t.has(Ft(e)) && n.push({
1704
1786
  id: s("off-palette-default"),
1705
1787
  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.`
1706
1788
  });
@@ -1712,7 +1794,7 @@ function Cr(e, t) {
1712
1794
  }
1713
1795
  //#endregion
1714
1796
  //#region src/utils/keyboardShortcuts.ts
1715
- function wr(e) {
1797
+ function kr(e) {
1716
1798
  for (let t of e.composedPath()) {
1717
1799
  if (!(t instanceof HTMLElement)) continue;
1718
1800
  if (t.isContentEditable) return !0;
@@ -1721,18 +1803,18 @@ function wr(e) {
1721
1803
  }
1722
1804
  return !1;
1723
1805
  }
1724
- function Tr(e, t) {
1806
+ function Ar(e, t) {
1725
1807
  let n = e.metaKey || e.ctrlKey;
1726
1808
  if (n && e.key.toLowerCase() === "s") {
1727
1809
  e.preventDefault(), t.onSave?.();
1728
1810
  return;
1729
1811
  }
1730
1812
  if (n && e.key.toLowerCase() === "z") {
1731
- if (wr(e)) return;
1813
+ if (kr(e)) return;
1732
1814
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
1733
1815
  return;
1734
1816
  }
1735
- if (t.isPicking?.() && !wr(e)) {
1817
+ if (t.isPicking?.() && !kr(e)) {
1736
1818
  if (e.key === "Escape") {
1737
1819
  e.preventDefault(), t.onCancelPick?.();
1738
1820
  return;
@@ -1750,11 +1832,11 @@ function Tr(e, t) {
1750
1832
  t.selectBlock(null);
1751
1833
  return;
1752
1834
  }
1753
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !wr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1835
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !kr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1754
1836
  }
1755
1837
  //#endregion
1756
1838
  //#region src/utils/mergeTagLabelSegments.ts
1757
- function Er(e, t, n, r = !1) {
1839
+ function jr(e, t, n, r = !1) {
1758
1840
  if (!e) return [];
1759
1841
  let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
1760
1842
  for (; (s = i.exec(e)) !== null;) {
@@ -1763,7 +1845,7 @@ function Er(e, t, n, r = !1) {
1763
1845
  value: e.slice(o, s.index)
1764
1846
  });
1765
1847
  let i = s[0];
1766
- if (xe(i, n)) {
1848
+ if (be(i, n)) {
1767
1849
  let e = r ? Pe(i, t) : void 0;
1768
1850
  a.push(e === void 0 ? {
1769
1851
  type: "tag",
@@ -1772,9 +1854,9 @@ function Er(e, t, n, r = !1) {
1772
1854
  type: "text",
1773
1855
  value: e
1774
1856
  });
1775
- } else be(i, n) ? a.push({
1857
+ } else ye(i, n) ? a.push({
1776
1858
  type: "tag",
1777
- value: ve(i, n)
1859
+ value: _e(i, n)
1778
1860
  }) : a.push({
1779
1861
  type: "text",
1780
1862
  value: i
@@ -1788,20 +1870,20 @@ function Er(e, t, n, r = !1) {
1788
1870
  }
1789
1871
  //#endregion
1790
1872
  //#region src/components/MergeTagPreviewText.vue
1791
- var Dr = d({
1873
+ var Mr = d({
1792
1874
  name: "MergeTagPreviewText",
1793
1875
  props: { text: {
1794
1876
  type: String,
1795
1877
  required: !0
1796
1878
  } },
1797
1879
  setup(e) {
1798
- let t = n(G, []), r = n(yt, Me.liquid), i = n(q, null), a = S(() => Er(e.text, t, r, i?.value ?? !1));
1799
- return () => a.value.map((e, t) => e.type === "tag" ? ee("span", {
1880
+ let t = n(q, []), r = n(et, Me.liquid), i = n(J, null), a = S(() => jr(e.text, t, r, i?.value ?? !1));
1881
+ return () => a.value.map((e, t) => e.type === "tag" ? z("span", {
1800
1882
  key: t,
1801
1883
  class: "tpl-merge-tag-label"
1802
1884
  }, e.value) : e.value);
1803
1885
  }
1804
- }), Or = ["href"], kr = /* @__PURE__ */ d({
1886
+ }), Nr = ["href"], Pr = /* @__PURE__ */ d({
1805
1887
  __name: "ButtonBlock",
1806
1888
  props: {
1807
1889
  block: {},
@@ -1827,13 +1909,13 @@ var Dr = d({
1827
1909
  style: k(n.value),
1828
1910
  class: "tpl:cursor-default",
1829
1911
  onClick: i[0] ||= O(() => {}, ["prevent"])
1830
- }, [v(Dr, { text: e.block.text }, null, 8, ["text"])], 12, Or)], 4));
1912
+ }, [v(Mr, { text: e.block.text }, null, 8, ["text"])], 12, Nr)], 4));
1831
1913
  }
1832
- }), Ar = ["innerHTML"], jr = [
1914
+ }), Fr = ["innerHTML"], Ir = [
1833
1915
  "src",
1834
1916
  "width",
1835
1917
  "height"
1836
- ], Mr = /* @__PURE__ */ d({
1918
+ ], Lr = /* @__PURE__ */ d({
1837
1919
  __name: "CustomBlockIcon",
1838
1920
  props: {
1839
1921
  icon: {},
@@ -1849,24 +1931,24 @@ var Dr = d({
1849
1931
  height: `${n.value}px`
1850
1932
  }),
1851
1933
  innerHTML: e.icon
1852
- }, null, 12, Ar)) : i.value ? (s(), C("img", {
1934
+ }, null, 12, Fr)) : i.value ? (s(), C("img", {
1853
1935
  key: 1,
1854
1936
  src: e.icon,
1855
1937
  width: n.value,
1856
1938
  height: n.value,
1857
1939
  class: "tpl:inline-block",
1858
1940
  alt: ""
1859
- }, null, 8, jr)) : (s(), A(_($t), {
1941
+ }, null, 8, Ir)) : (s(), A(_(en), {
1860
1942
  key: 2,
1861
1943
  size: n.value,
1862
1944
  "stroke-width": 1.5
1863
1945
  }, null, 8, ["size"]));
1864
1946
  }
1865
- }), Nr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1866
- function Pr(e, n) {
1867
- let r = nn(), i = null, a = null, o = null;
1947
+ }), Rr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1948
+ function zr(e, n) {
1949
+ let r = rn(), i = null, a = null, o = null;
1868
1950
  function s() {
1869
- return e.value ? Array.from(e.value.querySelectorAll(Nr)).filter((e) => e.offsetParent !== null) : [];
1951
+ return e.value ? Array.from(e.value.querySelectorAll(Rr)).filter((e) => e.offsetParent !== null) : [];
1870
1952
  }
1871
1953
  function c(e) {
1872
1954
  if (e.key !== "Tab") return;
@@ -1881,7 +1963,7 @@ function Pr(e, n) {
1881
1963
  o = null;
1882
1964
  let t = s();
1883
1965
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
1884
- }), a = W(e, "keydown", c);
1966
+ }), a = K(e, "keydown", c);
1885
1967
  }
1886
1968
  function u(e = {}) {
1887
1969
  let t = e.restoreFocus !== !1;
@@ -1896,8 +1978,8 @@ function Pr(e, n) {
1896
1978
  }
1897
1979
  //#endregion
1898
1980
  //#region src/composables/useEmoji.ts
1899
- function Fr() {
1900
- let [e, n] = Ve(!1), r = x([]), i = !1;
1981
+ function Br() {
1982
+ let [e, n] = Be(!1), r = x([]), i = !1;
1901
1983
  h(() => {
1902
1984
  i = !0;
1903
1985
  }), t(e, async (e) => {
@@ -1922,7 +2004,7 @@ function Fr() {
1922
2004
  }
1923
2005
  //#endregion
1924
2006
  //#region src/composables/useFonts.ts
1925
- var Ir = [
2007
+ var Vr = [
1926
2008
  {
1927
2009
  value: "Arial",
1928
2010
  label: "Arial"
@@ -1951,7 +2033,7 @@ var Ir = [
1951
2033
  value: "Courier New",
1952
2034
  label: "Courier New"
1953
2035
  }
1954
- ], Lr = {
2036
+ ], Hr = {
1955
2037
  arial: "Arial, sans-serif",
1956
2038
  helvetica: "Helvetica, sans-serif",
1957
2039
  georgia: "Georgia, serif",
@@ -1959,23 +2041,23 @@ var Ir = [
1959
2041
  verdana: "Verdana, sans-serif",
1960
2042
  "trebuchet ms": "'Trebuchet MS', sans-serif",
1961
2043
  "courier new": "'Courier New', monospace"
1962
- }, Rr = "Arial, sans-serif";
1963
- function zr(e) {
1964
- if (e === void 0 || e === !0) return [...Ir];
2044
+ }, Ur = "Arial, sans-serif";
2045
+ function Wr(e) {
2046
+ if (e === void 0 || e === !0) return [...Vr];
1965
2047
  if (e === !1) return [];
1966
2048
  let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
1967
2049
  for (let i of e) {
1968
- let e = i.toLowerCase(), a = Ir.find((t) => t.value.toLowerCase() === e);
2050
+ let e = i.toLowerCase(), a = Vr.find((t) => t.value.toLowerCase() === e);
1969
2051
  if (!a) {
1970
- r.has(e) || (r.add(e), Y.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Ir.map((e) => e.value).join(", ")}.`));
2052
+ r.has(e) || (r.add(e), Z.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Vr.map((e) => e.value).join(", ")}.`));
1971
2053
  continue;
1972
2054
  }
1973
2055
  n.has(a.value) || (n.add(a.value), t.push(a));
1974
2056
  }
1975
2057
  return t;
1976
2058
  }
1977
- function Br(e) {
1978
- let t = l(e?.customFonts ?? []), n = l(!1), r = zr(e?.builtIns), i = S(() => e?.defaultFallback ?? Rr), a = S(() => {
2059
+ function Gr(e) {
2060
+ let t = l(e?.customFonts ?? []), n = l(!1), r = Wr(e?.builtIns), i = S(() => e?.defaultFallback ?? Ur), a = S(() => {
1979
2061
  let e = [...r], n = t.value.map((e) => ({
1980
2062
  value: e.name,
1981
2063
  label: e.name,
@@ -1986,20 +2068,20 @@ function Br(e) {
1986
2068
  function s(e) {
1987
2069
  return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1988
2070
  }
1989
- let c = e?.defaultFont ?? Rr.split(",")[0].trim();
1990
- s(c) || Y.warn(`config.fonts: new templates seed "${c}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
2071
+ let c = e?.defaultFont ?? Ur.split(",")[0].trim();
2072
+ s(c) || Z.warn(`config.fonts: new templates seed "${c}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
1991
2073
  function u() {
1992
2074
  if (e?.defaultFont && s(e.defaultFont)) {
1993
2075
  let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1994
2076
  if (t) return t.value;
1995
2077
  }
1996
- return Rr;
2078
+ return Ur;
1997
2079
  }
1998
2080
  let d = S(() => u());
1999
2081
  function f(e) {
2000
2082
  if (!e) return i.value;
2001
2083
  let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
2002
- return n ? `'${n.name}', ${n.fallback ?? i.value}` : Lr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
2084
+ return n ? `'${n.name}', ${n.fallback ?? i.value}` : Hr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
2003
2085
  }
2004
2086
  let p = [], m = !1;
2005
2087
  async function g() {
@@ -2015,7 +2097,7 @@ function Br(e) {
2015
2097
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
2016
2098
  });
2017
2099
  } catch (t) {
2018
- Y.warn(`Failed to load custom font "${e.name}":`, t);
2100
+ Z.warn(`Failed to load custom font "${e.name}":`, t);
2019
2101
  }
2020
2102
  });
2021
2103
  await Promise.allSettled(e), !m && (n.value = !0);
@@ -2040,8 +2122,8 @@ function Br(e) {
2040
2122
  }
2041
2123
  //#endregion
2042
2124
  //#region src/composables/useLogicTag.ts
2043
- function Vr() {
2044
- let e = n(qe, []), t = n(st, []), r = n(yt, Me.liquid), i = n(nt, null), a = n(kt, null), o = n(ct, null) ?? l(!1), s = !!i || e.length > 0 || t.length > 0, c = e.length > 0 || t.length > 0;
2125
+ function Kr() {
2126
+ let e = n(Ot, []), t = n(Ke, []), r = n(et, Me.liquid), i = n(tt, null), a = n(ot, null), o = n(qe, null) ?? l(!1), s = !!i || e.length > 0 || t.length > 0, c = e.length > 0 || t.length > 0;
2045
2127
  async function u() {
2046
2128
  if (i) {
2047
2129
  o.value = !0;
@@ -2072,12 +2154,12 @@ function Vr() {
2072
2154
  }
2073
2155
  //#endregion
2074
2156
  //#region src/utils/mergeTagNodeSpec.ts
2075
- function Hr(e, t, n) {
2076
- return be(e, n) ? {
2157
+ function qr(e, t, n) {
2158
+ return ye(e, n) ? {
2077
2159
  type: "logicMergeTagNode",
2078
2160
  attrs: {
2079
2161
  value: e,
2080
- keyword: ve(e, n)
2162
+ keyword: _e(e, n)
2081
2163
  }
2082
2164
  } : {
2083
2165
  type: "mergeTagNode",
@@ -2089,15 +2171,15 @@ function Hr(e, t, n) {
2089
2171
  }
2090
2172
  //#endregion
2091
2173
  //#region src/utils/insertLogicTag.ts
2092
- function Ur(e) {
2174
+ function Jr(e) {
2093
2175
  return "before" in e && "after" in e;
2094
2176
  }
2095
- function Wr(e, t, n) {
2096
- if (!Ur(t)) {
2097
- e.chain().focus().insertContent(Hr(t.value, t.label, n)).run();
2177
+ function Yr(e, t, n) {
2178
+ if (!Jr(t)) {
2179
+ e.chain().focus().insertContent(qr(t.value, t.label, n)).run();
2098
2180
  return;
2099
2181
  }
2100
- let r = Hr(t.before, t.label, n), i = Hr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
2182
+ let r = qr(t.before, t.label, n), i = qr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
2101
2183
  if (a !== o) {
2102
2184
  e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
2103
2185
  return;
@@ -2106,20 +2188,20 @@ function Wr(e, t, n) {
2106
2188
  }
2107
2189
  //#endregion
2108
2190
  //#region src/utils/linkColorExtension.ts
2109
- function Gr(e) {
2191
+ function Xr(e) {
2110
2192
  if (!e) return null;
2111
2193
  let t = e.trim();
2112
2194
  return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
2113
2195
  }
2114
- function Kr(e) {
2196
+ function Zr(e) {
2115
2197
  return e.extend({ addAttributes() {
2116
2198
  return {
2117
2199
  ...this.parent?.(),
2118
2200
  color: {
2119
2201
  default: null,
2120
- parseHTML: (e) => Gr(Nt(e.style.color)),
2202
+ parseHTML: (e) => Xr(Nt(e.style.color)),
2121
2203
  renderHTML: (e) => {
2122
- let t = Gr(e.color);
2204
+ let t = Xr(e.color);
2123
2205
  return t ? { style: `color: ${t}` } : {};
2124
2206
  }
2125
2207
  }
@@ -2128,9 +2210,9 @@ function Kr(e) {
2128
2210
  }
2129
2211
  //#endregion
2130
2212
  //#region src/composables/useRichTextLinkDialog.ts
2131
- function qr(e, t = Me.liquid) {
2213
+ function Qr(e, t = Me.liquid) {
2132
2214
  let n = l(!1), r = l(""), i = l(""), a = l(null);
2133
- Pr(a, n);
2215
+ zr(a, n);
2134
2216
  function o() {
2135
2217
  let t = e.value?.getAttributes("link") ?? {};
2136
2218
  r.value = t.href || "", i.value = t.color || "", n.value = !0;
@@ -2139,7 +2221,7 @@ function qr(e, t = Me.liquid) {
2139
2221
  if (r.value) {
2140
2222
  let t = d(r.value);
2141
2223
  if (t !== null) {
2142
- let n = Gr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
2224
+ let n = Xr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
2143
2225
  n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
2144
2226
  }
2145
2227
  }
@@ -2189,10 +2271,15 @@ function qr(e, t = Me.liquid) {
2189
2271
  }
2190
2272
  //#endregion
2191
2273
  //#region src/composables/useRichTextEditor.ts
2192
- function Jr(r) {
2193
- let i = n(K, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = Z(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Vr(), h = n(dt, null), g = (N(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = Ee(u), v = x(null), { showLinkDialog: y, linkUrl: b, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = qr(v, u), { start: k, stop: A } = ze(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), j = x(null), M = l(!0), P = l(null), F = !1;
2194
- async function I() {
2195
- P.value = null, M.value = !0;
2274
+ function $r(r) {
2275
+ let i = n(Y, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = an(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Kr(), h = n(Ye, null), g = (N(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = Ee(u), v = x(null), y = () => de(i?.content?.value?.settings ?? { locale: "en" });
2276
+ t(y, (e) => {
2277
+ let t = v.value?.view.dom;
2278
+ t && t.setAttribute("dir", e);
2279
+ });
2280
+ let { showLinkDialog: b, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Qr(v, u), { start: A, stop: j } = Re(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), M = x(null), P = l(!0), F = l(null), I = !1;
2281
+ async function L() {
2282
+ F.value = null, P.value = !0;
2196
2283
  try {
2197
2284
  let { TiptapEditor: e, EC: t, extensions: n } = await r.loadExtensions({
2198
2285
  mergeTags: a,
@@ -2201,36 +2288,37 @@ function Jr(r) {
2201
2288
  autocompleteEnabled: d,
2202
2289
  suggestionEmptyText: g
2203
2290
  });
2204
- if (F) return;
2205
- j.value = t;
2291
+ if (I) return;
2292
+ M.value = t;
2206
2293
  let o = /* @__PURE__ */ new Map();
2207
2294
  n.forEach((e, t) => o.set(e.name, t));
2208
2295
  let s = new e({
2209
2296
  extensions: n.filter((e, t) => o.get(e.name) === t),
2210
2297
  content: r.blockContent(),
2211
2298
  editable: !0,
2299
+ editorProps: { attributes: { dir: y() } },
2212
2300
  onUpdate: ({ editor: e }) => {
2213
- F || i && i.updateBlock(r.blockId(), { content: e.getHTML() });
2301
+ I || i && i.updateBlock(r.blockId(), { content: e.getHTML() });
2214
2302
  }
2215
2303
  });
2216
- if (F) {
2304
+ if (I) {
2217
2305
  s.destroy();
2218
2306
  return;
2219
2307
  }
2220
- v.value = s, M.value = !1, k();
2308
+ v.value = s, P.value = !1, A();
2221
2309
  } catch (e) {
2222
- if (F) return;
2223
- Y.error(`[${r.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), P.value = e instanceof Error ? e.message : "Failed to load editor", M.value = !1;
2310
+ if (I) return;
2311
+ Z.error(`[${r.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
2224
2312
  }
2225
2313
  }
2226
- function L() {
2227
- v.value?.destroy(), v.value = null, I();
2314
+ function R() {
2315
+ v.value?.destroy(), v.value = null, L();
2228
2316
  }
2229
- I();
2230
- let R = t(() => r.blockContent(), (e) => {
2317
+ L();
2318
+ let z = t(() => r.blockContent(), (e) => {
2231
2319
  v.value && v.value.getHTML() !== e && v.value.commands.setContent(e, { emitUpdate: !1 });
2232
2320
  });
2233
- function ee(e) {
2321
+ function B(e) {
2234
2322
  if (s.value || p.value) return;
2235
2323
  let t = e.composedPath(), n = t.find((e) => e instanceof HTMLElement);
2236
2324
  if (!n) return;
@@ -2238,50 +2326,50 @@ function Jr(r) {
2238
2326
  let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
2239
2327
  n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
2240
2328
  }
2241
- W(document, "mousedown", ee), e(() => {
2242
- F = !0, R(), A(), v.value?.destroy();
2329
+ K(document, "mousedown", B), e(() => {
2330
+ I = !0, z(), j(), v.value?.destroy();
2243
2331
  });
2244
- async function z() {
2332
+ async function V() {
2245
2333
  let e = await c();
2246
- F || (e && v.value ? v.value.chain().focus().insertMergeTag({
2334
+ I || (e && v.value ? v.value.chain().focus().insertMergeTag({
2247
2335
  label: e.label,
2248
2336
  value: e.value
2249
2337
  }).run() : v.value?.commands.focus());
2250
2338
  }
2251
- async function B() {
2339
+ async function H() {
2252
2340
  let e = await m();
2253
- F || (e && v.value ? Wr(v.value, e, u) : v.value?.commands.focus());
2341
+ I || (e && v.value ? Yr(v.value, e, u) : v.value?.commands.focus());
2254
2342
  }
2255
2343
  return {
2256
2344
  editor: v,
2257
- EditorContent: j,
2258
- isLoading: M,
2259
- initError: P,
2260
- retry: L,
2261
- showLinkDialog: y,
2262
- linkUrl: b,
2263
- linkColor: S,
2264
- linkDialogRef: C,
2345
+ EditorContent: M,
2346
+ isLoading: P,
2347
+ initError: F,
2348
+ retry: R,
2349
+ showLinkDialog: b,
2350
+ linkUrl: S,
2351
+ linkColor: C,
2352
+ linkDialogRef: w,
2265
2353
  mergeTags: a,
2266
2354
  canRequestMergeTag: o,
2267
2355
  isRequestingMergeTag: s,
2268
2356
  syntax: u,
2269
2357
  canInsertLogicTag: f,
2270
2358
  isRequestingLogicTag: p,
2271
- openLinkDialog: w,
2272
- insertLink: T,
2273
- removeLink: E,
2274
- closeLinkDialog: D,
2275
- handleLinkKeydown: O,
2276
- handleAddMergeTag: z,
2277
- handleAddLogicTag: B
2359
+ openLinkDialog: T,
2360
+ insertLink: E,
2361
+ removeLink: D,
2362
+ closeLinkDialog: O,
2363
+ handleLinkKeydown: k,
2364
+ handleAddMergeTag: V,
2365
+ handleAddLogicTag: H
2278
2366
  };
2279
2367
  }
2280
2368
  //#endregion
2281
2369
  //#region src/composables/useSmallScreenNotice.ts
2282
- var Yr = "(max-width: 767px)";
2283
- function Xr(e) {
2284
- let t = Ue(Yr);
2370
+ var ei = "(max-width: 767px)";
2371
+ function ti(e) {
2372
+ let t = He(ei);
2285
2373
  return {
2286
2374
  isSmallScreen: t,
2287
2375
  showNotice: S(() => (P(e) ?? !0) && t.value)
@@ -2289,20 +2377,20 @@ function Xr(e) {
2289
2377
  }
2290
2378
  //#endregion
2291
2379
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
2292
- var Zr = { class: "tpl:w-full" }, Qr = {
2380
+ var ni = { class: "tpl:w-full" }, ri = {
2293
2381
  key: 0,
2294
2382
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
2295
- }, $r = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ei = {
2383
+ }, ii = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ai = {
2296
2384
  key: 1,
2297
2385
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
2298
- }, ti = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ni = {
2386
+ }, oi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, si = {
2299
2387
  key: 2,
2300
2388
  class: "tpl:relative"
2301
- }, ri = ["innerHTML"], ii = {
2389
+ }, ci = ["innerHTML"], li = {
2302
2390
  key: 0,
2303
2391
  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]",
2304
2392
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
2305
- }, ai = /* @__PURE__ */ d({
2393
+ }, ui = /* @__PURE__ */ d({
2306
2394
  __name: "CustomBlock",
2307
2395
  props: {
2308
2396
  block: {},
@@ -2310,7 +2398,7 @@ var Zr = { class: "tpl:w-full" }, Qr = {
2310
2398
  },
2311
2399
  emits: ["fetchData"],
2312
2400
  setup(e, { emit: r }) {
2313
- let i = e, a = r, { t: o } = J(), c = n(Et, null), u = l(""), d = l(!1), f = S(() => c?.getDefinition(i.block.customType)), p = S(() => !!f.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: y } = vn({
2401
+ let i = e, a = r, { t: o } = X(), c = n(Et, null), u = l(""), d = l(!1), f = S(() => c?.getDefinition(i.block.customType)), p = S(() => !!f.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: y } = bn({
2314
2402
  definition: f,
2315
2403
  block: S(() => i.block),
2316
2404
  onUpdate: (e, t) => {
@@ -2319,10 +2407,10 @@ var Zr = { class: "tpl:w-full" }, Qr = {
2319
2407
  dataSourceFetched: t
2320
2408
  });
2321
2409
  }
2322
- }), b = n(G, []), x = n(q, null), T = S(() => {
2410
+ }), b = n(q, []), x = n(J, null), T = S(() => {
2323
2411
  if (!x?.value) return i.block;
2324
2412
  let e = {};
2325
- for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? _e(n, b) : n;
2413
+ for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ge(n, b) : n;
2326
2414
  return {
2327
2415
  ...i.block,
2328
2416
  fieldValues: e
@@ -2339,17 +2427,17 @@ var Zr = { class: "tpl:w-full" }, Qr = {
2339
2427
  }
2340
2428
  }
2341
2429
  }
2342
- let k = Be(D, 150);
2430
+ let k = ze(D, 150);
2343
2431
  return E(() => {
2344
2432
  D();
2345
2433
  }), t(() => i.block.fieldValues, () => {
2346
2434
  k();
2347
2435
  }, { deep: !0 }), t(() => x?.value, () => {
2348
2436
  k();
2349
- }), (e, t) => (s(), C("div", Zr, [p.value ? d.value ? (s(), C("div", ei, [v(_(Xt), {
2437
+ }), (e, t) => (s(), C("div", ni, [p.value ? d.value ? (s(), C("div", ai, [v(_(Zt), {
2350
2438
  size: 24,
2351
2439
  class: "tpl:text-[var(--tpl-danger)]"
2352
- }), M("span", ti, R(_(o).customBlocks.renderError), 1)])) : (s(), C("div", ni, [M("div", { innerHTML: u.value }, null, 8, ri), _(y) && _(g) ? (s(), C("div", ii, [_(m) ? (s(), A(en, {
2440
+ }), M("span", oi, R(_(o).customBlocks.renderError), 1)])) : (s(), C("div", si, [M("div", { innerHTML: u.value }, null, 8, ci), _(y) && _(g) ? (s(), C("div", li, [_(m) ? (s(), A(tn, {
2353
2441
  key: 1,
2354
2442
  class: "tpl:w-48"
2355
2443
  })) : (s(), C("button", {
@@ -2357,16 +2445,16 @@ var Zr = { class: "tpl:w-full" }, Qr = {
2357
2445
  type: "button",
2358
2446
  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)]",
2359
2447
  onClick: t[0] ||= O((...e) => _(h) && _(h)(...e), ["stop"])
2360
- }, [f.value?.icon ? (s(), A(Mr, {
2448
+ }, [f.value?.icon ? (s(), A(Lr, {
2361
2449
  key: 0,
2362
2450
  icon: f.value.icon,
2363
2451
  size: 16
2364
- }, null, 8, ["icon"])) : w("", !0), B(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div", Qr, [v(_(zt), {
2452
+ }, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div", ri, [v(_(Bt), {
2365
2453
  size: 24,
2366
2454
  class: "tpl:text-[var(--tpl-warning)]"
2367
- }), M("span", $r, R(_(o).customBlocks.definitionNotFound), 1)]))]));
2455
+ }), M("span", ii, R(_(o).customBlocks.definitionNotFound), 1)]))]));
2368
2456
  }
2369
- }), oi = { class: "tpl:w-full" }, si = /* @__PURE__ */ d({
2457
+ }), di = { class: "tpl:w-full" }, fi = /* @__PURE__ */ d({
2370
2458
  __name: "DividerBlock",
2371
2459
  props: {
2372
2460
  block: {},
@@ -2378,28 +2466,28 @@ var Zr = { class: "tpl:w-full" }, Qr = {
2378
2466
  width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
2379
2467
  margin: t.block.width === "full" ? "0" : "0 auto"
2380
2468
  }));
2381
- return (e, t) => (s(), C("div", oi, [M("hr", {
2469
+ return (e, t) => (s(), C("div", di, [M("hr", {
2382
2470
  class: "tpl:m-0 tpl:border-none",
2383
2471
  style: k(n.value)
2384
2472
  }, null, 4)]));
2385
2473
  }
2386
- }), ci = { class: "tpl:w-full" }, li = ["srcdoc", "title"], ui = {
2474
+ }), pi = { class: "tpl:w-full" }, mi = ["srcdoc", "title"], hi = {
2387
2475
  key: 1,
2388
2476
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
2389
- }, di = {
2477
+ }, gi = {
2390
2478
  key: 0,
2391
2479
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
2392
- }, fi = {
2480
+ }, _i = {
2393
2481
  key: 1,
2394
2482
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
2395
- }, pi = /* @__PURE__ */ d({
2483
+ }, vi = /* @__PURE__ */ d({
2396
2484
  __name: "HtmlBlock",
2397
2485
  props: {
2398
2486
  block: {},
2399
2487
  viewport: {}
2400
2488
  },
2401
2489
  setup(r) {
2402
- let i = r, { t: a } = J(), o = n(jt, !1), c = S(() => i.block.content.trim().length > 0), u = S(() => o && c.value), d = n(G, []), f = n(q, null), p = S(() => f?.value ? _e(i.block.content, d) : i.block.content), m = l(null), h = l(60), g = null;
2490
+ let i = r, { t: a } = X(), o = n(ft, !1), c = S(() => i.block.content.trim().length > 0), u = S(() => o && c.value), d = n(q, []), f = n(J, null), p = S(() => f?.value ? ge(i.block.content, d) : i.block.content), m = l(null), h = l(60), g = null;
2403
2491
  function y() {
2404
2492
  let e = m.value?.contentDocument;
2405
2493
  e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
@@ -2413,7 +2501,7 @@ var Zr = { class: "tpl:w-full" }, Qr = {
2413
2501
  e || (g?.disconnect(), g = null);
2414
2502
  }), e(() => {
2415
2503
  g?.disconnect(), g = null;
2416
- }), (e, t) => (s(), C("div", ci, [u.value ? (s(), C("iframe", {
2504
+ }), (e, t) => (s(), C("div", pi, [u.value ? (s(), C("iframe", {
2417
2505
  key: 0,
2418
2506
  ref_key: "iframeRef",
2419
2507
  ref: m,
@@ -2423,18 +2511,18 @@ var Zr = { class: "tpl:w-full" }, Qr = {
2423
2511
  class: "tpl:block tpl:w-full tpl:border-0",
2424
2512
  style: k({ height: `${h.value}px` }),
2425
2513
  onLoad: b
2426
- }, null, 44, li)) : (s(), C("div", ui, [v(_(Bt), {
2514
+ }, null, 44, mi)) : (s(), C("div", hi, [v(_(Vt), {
2427
2515
  size: 24,
2428
2516
  class: "tpl:text-[var(--tpl-text-dim)]"
2429
- }), c.value ? (s(), C("span", di, R(_(a).html.preview), 1)) : (s(), C("span", fi, R(_(a).html.empty), 1))]))]));
2517
+ }), c.value ? (s(), C("span", gi, R(_(a).html.preview), 1)) : (s(), C("span", _i, R(_(a).html.empty), 1))]))]));
2430
2518
  }
2431
- }), mi = "image/";
2432
- function hi(e) {
2433
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = Ge(t, {
2519
+ }), yi = "image/";
2520
+ function bi(e) {
2521
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = We(t, {
2434
2522
  preventDefaultForUnhandled: !0,
2435
2523
  onDrop: (e) => {
2436
2524
  if (!i()) return;
2437
- let t = (e ?? []).filter((e) => e.type.startsWith(mi));
2525
+ let t = (e ?? []).filter((e) => e.type.startsWith(yi));
2438
2526
  t.length > 0 && n([t[0]]);
2439
2527
  }
2440
2528
  });
@@ -2442,17 +2530,17 @@ function hi(e) {
2442
2530
  }
2443
2531
  //#endregion
2444
2532
  //#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
2445
- var gi = {
2533
+ var xi = ["data-drop-enabled"], Si = {
2446
2534
  key: 0,
2447
2535
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
2448
2536
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
2449
- }, _i = ["href"], vi = ["src", "alt"], yi = ["src", "alt"], bi = {
2537
+ }, Ci = ["href"], wi = ["src", "alt"], Ti = ["src", "alt"], Ei = {
2450
2538
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
2451
2539
  style: { opacity: "0.7" }
2452
- }, xi = ["href"], Si = ["src", "alt"], Ci = ["src", "alt"], wi = {
2540
+ }, Di = ["href"], Oi = ["src", "alt"], ki = ["src", "alt"], Ai = {
2453
2541
  key: 4,
2454
2542
  class: "tpl:flex 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)]"
2455
- }, Ti = ["aria-label"], Ei = { key: 1 }, Di = /* @__PURE__ */ d({
2543
+ }, ji = ["aria-label"], Mi = { key: 1 }, Ni = /* @__PURE__ */ d({
2456
2544
  __name: "ImageBlock",
2457
2545
  props: {
2458
2546
  block: {},
@@ -2460,38 +2548,38 @@ var gi = {
2460
2548
  },
2461
2549
  emits: ["update"],
2462
2550
  setup(e, { emit: t }) {
2463
- let r = e, i = t, { t: a } = J(), { syntax: o } = Z(), c = n(rt, null), u = S(() => !!c), d = rn();
2464
- async function f() {
2551
+ let r = e, i = t, { t: a } = X(), { syntax: o } = an(), c = n(rt, null), u = n(pt, null), d = S(() => !!c), f = on();
2552
+ async function p() {
2465
2553
  let e = await c?.({ accept: ["images"] });
2466
- if (d.alive && e) {
2554
+ if (f.alive && e) {
2467
2555
  let t = { src: e.url };
2468
2556
  e.alt && (t.alt = e.alt), i("update", t);
2469
2557
  }
2470
2558
  }
2471
- let p = l(), m = l(!1), h = S(() => u.value && !m.value && !T.value);
2472
- async function g(e) {
2559
+ let m = l(), h = l(!1), g = S(() => (u?.value ?? !!c) && !h.value && !E.value);
2560
+ async function y(e) {
2473
2561
  if (c) {
2474
- m.value = !0;
2562
+ h.value = !0;
2475
2563
  try {
2476
2564
  let t = await c({
2477
2565
  accept: ["images"],
2478
2566
  files: e
2479
2567
  });
2480
- if (!d.alive) return;
2568
+ if (!f.alive) return;
2481
2569
  if (t) {
2482
2570
  let e = { src: t.url };
2483
2571
  t.alt && (e.alt = t.alt), i("update", e);
2484
2572
  }
2485
2573
  } finally {
2486
- d.alive && (m.value = !1);
2574
+ f.alive && (h.value = !1);
2487
2575
  }
2488
2576
  }
2489
2577
  }
2490
- let { isOver: y } = hi({
2491
- target: p,
2492
- enabled: h,
2493
- onFiles: g
2494
- }), b = S(() => ({ textAlign: r.block.align })), x = S(() => {
2578
+ let { isOver: b } = bi({
2579
+ target: m,
2580
+ enabled: g,
2581
+ onFiles: y
2582
+ }), x = S(() => ({ textAlign: r.block.align })), T = S(() => {
2495
2583
  let e = r.block.align;
2496
2584
  return {
2497
2585
  maxWidth: "100%",
@@ -2502,21 +2590,22 @@ var gi = {
2502
2590
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
2503
2591
  marginRight: e === "center" ? "auto" : void 0
2504
2592
  };
2505
- }), T = S(() => H(r.block.src, o)), E = Mn(() => T.value ? void 0 : r.block.src), D = Mn(() => T.value ? r.block.placeholderUrl : void 0);
2593
+ }), E = S(() => W(r.block.src, o)), D = Ln(() => E.value ? void 0 : r.block.src), A = Ln(() => E.value ? r.block.placeholderUrl : void 0);
2506
2594
  return (t, n) => (s(), C("div", {
2507
2595
  ref_key: "dropZoneRef",
2508
- ref: p,
2596
+ ref: m,
2509
2597
  "data-testid": "image-drop-zone",
2598
+ "data-drop-enabled": g.value,
2510
2599
  class: "tpl:relative tpl:w-full",
2511
- style: k(b.value)
2512
- }, [h.value && (_(y) || m.value) ? (s(), C("div", gi, [m.value ? (s(), C(L, { key: 0 }, [v(_(Kt), {
2600
+ style: k(x.value)
2601
+ }, [g.value && (_(b) || h.value) ? (s(), C("div", Si, [h.value ? (s(), C(L, { key: 0 }, [v(_(qt), {
2513
2602
  class: "tpl-spinner",
2514
2603
  size: 20,
2515
2604
  "stroke-width": 2
2516
- }), B(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(Jt), {
2605
+ }), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(Yt), {
2517
2606
  size: 20,
2518
2607
  "stroke-width": 1.5
2519
- }), B(" " + R(_(a).image.dropToUpload), 1)], 64))])) : w("", !0), e.block.src && T.value && e.block.placeholderUrl ? (s(), C(L, { key: 1 }, [e.block.linkUrl ? (s(), C("a", {
2608
+ }), V(" " + R(_(a).image.dropToUpload), 1)], 64))])) : w("", !0), e.block.src && E.value && e.block.placeholderUrl ? (s(), C(L, { key: 1 }, [e.block.linkUrl ? (s(), C("a", {
2520
2609
  key: 0,
2521
2610
  href: e.block.linkUrl,
2522
2611
  target: "_blank",
@@ -2525,25 +2614,25 @@ var gi = {
2525
2614
  }, [M("img", {
2526
2615
  class: "tpl:border-0",
2527
2616
  loading: "lazy",
2528
- src: _(D),
2617
+ src: _(A),
2529
2618
  alt: e.block.alt || _(a).image.altTextPlaceholder,
2530
- style: k(x.value)
2531
- }, null, 12, vi)], 8, _i)) : (s(), C("img", {
2619
+ style: k(T.value)
2620
+ }, null, 12, wi)], 8, Ci)) : (s(), C("img", {
2532
2621
  key: 1,
2533
2622
  class: "tpl:border-0",
2534
- src: _(D),
2623
+ src: _(A),
2535
2624
  alt: e.block.alt,
2536
- style: k(x.value)
2537
- }, null, 12, yi))], 64)) : e.block.src && T.value ? (s(), C("div", {
2625
+ style: k(T.value)
2626
+ }, null, 12, Ti))], 64)) : e.block.src && E.value ? (s(), C("div", {
2538
2627
  key: 2,
2539
2628
  class: "tpl:!flex 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)]",
2540
- style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, x.value])
2541
- }, [v(_(Wt), {
2629
+ style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, T.value])
2630
+ }, [v(_(Gt), {
2542
2631
  size: 32,
2543
2632
  "stroke-width": 1.5,
2544
2633
  class: "tpl:text-[var(--tpl-primary)]",
2545
2634
  style: { opacity: "0.5" }
2546
- }), M("span", bi, [v(Dr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), C(L, { key: 3 }, [e.block.linkUrl ? (s(), C("a", {
2635
+ }), M("span", Ei, [v(Mr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), C(L, { key: 3 }, [e.block.linkUrl ? (s(), C("a", {
2547
2636
  key: 0,
2548
2637
  href: e.block.linkUrl,
2549
2638
  target: "_blank",
@@ -2552,36 +2641,36 @@ var gi = {
2552
2641
  }, [M("img", {
2553
2642
  class: "tpl:border-0",
2554
2643
  loading: "lazy",
2555
- src: _(E),
2644
+ src: _(D),
2556
2645
  alt: e.block.alt || _(a).image.altTextPlaceholder,
2557
- style: k(x.value)
2558
- }, null, 12, Si)], 8, xi)) : (s(), C("img", {
2646
+ style: k(T.value)
2647
+ }, null, 12, Oi)], 8, Di)) : (s(), C("img", {
2559
2648
  key: 1,
2560
2649
  class: "tpl:border-0",
2561
- src: _(E),
2650
+ src: _(D),
2562
2651
  alt: e.block.alt,
2563
- style: k(x.value)
2564
- }, null, 12, Ci))], 64)) : (s(), C("div", wi, [u.value ? (s(), C("button", {
2652
+ style: k(T.value)
2653
+ }, null, 12, ki))], 64)) : (s(), C("div", Ai, [d.value ? (s(), C("button", {
2565
2654
  key: 0,
2566
2655
  "aria-label": _(a).image.browseMedia,
2567
2656
  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)]",
2568
- onClick: O(f, ["stop"])
2569
- }, [v(_(Wt), {
2657
+ onClick: O(p, ["stop"])
2658
+ }, [v(_(Gt), {
2570
2659
  size: 14,
2571
2660
  "stroke-width": 1.5
2572
- }), B(" " + R(_(a).image.browseMedia), 1)], 8, Ti)) : (s(), C("span", Ei, R(_(a).image.clickToAdd), 1))]))], 4));
2661
+ }), V(" " + R(_(a).image.browseMedia), 1)], 8, ji)) : (s(), C("span", Mi, R(_(a).image.clickToAdd), 1))]))], 12, xi));
2573
2662
  }
2574
- }), Oi = { class: "tpl:w-full" }, ki = ["href"], Ai = {
2663
+ }), Pi = { class: "tpl:w-full" }, Fi = ["href"], Ii = {
2575
2664
  key: 1,
2576
2665
  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)]"
2577
- }, ji = /* @__PURE__ */ d({
2666
+ }, Li = /* @__PURE__ */ d({
2578
2667
  __name: "MenuBlock",
2579
2668
  props: {
2580
2669
  block: {},
2581
2670
  viewport: {}
2582
2671
  },
2583
2672
  setup(e) {
2584
- let t = e, { t: n } = J(), i = S(() => ({
2673
+ let t = e, { t: n } = X(), i = S(() => ({
2585
2674
  display: "flex",
2586
2675
  flexWrap: "wrap",
2587
2676
  gap: `0 ${t.block.spacing}px`,
@@ -2593,7 +2682,7 @@ var gi = {
2593
2682
  function o(e) {
2594
2683
  return e || t.block.linkColor || t.block.color;
2595
2684
  }
2596
- return (t, c) => (s(), C("div", Oi, [a.value ? (s(), C("div", {
2685
+ return (t, c) => (s(), C("div", Pi, [a.value ? (s(), C("div", {
2597
2686
  key: 0,
2598
2687
  style: k(i.value)
2599
2688
  }, [(s(!0), C(L, null, r(e.block.items, (t, n) => (s(), C(L, { key: t.id }, [M("a", {
@@ -2605,15 +2694,15 @@ var gi = {
2605
2694
  textDecoration: t.underline ? "underline" : "none"
2606
2695
  }),
2607
2696
  onClick: c[0] ||= O(() => {}, ["prevent"])
2608
- }, [v(Dr, { text: t.text || "..." }, null, 8, ["text"])], 12, ki), n < e.block.items.length - 1 ? (s(), C("span", {
2697
+ }, [v(Mr, { text: t.text || "..." }, null, 8, ["text"])], 12, Fi), n < e.block.items.length - 1 ? (s(), C("span", {
2609
2698
  key: 0,
2610
2699
  style: k({
2611
2700
  color: e.block.separatorColor,
2612
2701
  padding: `0 ${e.block.spacing}px`
2613
2702
  })
2614
- }, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div", Ai, [v(_(Ht), { size: 16 }), M("span", null, R(_(n).menu.addLinks), 1)]))]));
2703
+ }, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div", Ii, [v(_(Ut), { size: 16 }), M("span", null, R(_(n).menu.addLinks), 1)]))]));
2615
2704
  }
2616
- }), Mi = /* @__PURE__ */ new Set([
2705
+ }), Ri = /* @__PURE__ */ new Set([
2617
2706
  "http",
2618
2707
  "https",
2619
2708
  "mailto",
@@ -2623,7 +2712,7 @@ var gi = {
2623
2712
  "sms",
2624
2713
  "xmpp",
2625
2714
  "cid"
2626
- ]), Ni = /* @__PURE__ */ new Set([
2715
+ ]), zi = /* @__PURE__ */ new Set([
2627
2716
  "SCRIPT",
2628
2717
  "STYLE",
2629
2718
  "IFRAME",
@@ -2633,7 +2722,7 @@ var gi = {
2633
2722
  "META",
2634
2723
  "BASE",
2635
2724
  "FORM"
2636
- ]), Pi = /* @__PURE__ */ new Set([
2725
+ ]), Bi = /* @__PURE__ */ new Set([
2637
2726
  "href",
2638
2727
  "xlink:href",
2639
2728
  "formaction",
@@ -2642,16 +2731,16 @@ var gi = {
2642
2731
  "background",
2643
2732
  "poster"
2644
2733
  ]);
2645
- function Fi(e, t) {
2734
+ function Vi(e, t) {
2646
2735
  let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
2647
2736
  if (!n || n.startsWith("#")) return !0;
2648
2737
  let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
2649
2738
  if (!r) return !0;
2650
2739
  let i = r[1].toLowerCase();
2651
- return Mi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2740
+ return Ri.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2652
2741
  }
2653
- function Ii(e) {
2654
- if (Ni.has(e.tagName)) {
2742
+ function Hi(e) {
2743
+ if (zi.has(e.tagName)) {
2655
2744
  e.remove();
2656
2745
  return;
2657
2746
  }
@@ -2663,29 +2752,29 @@ function Ii(e) {
2663
2752
  e.removeAttribute(n);
2664
2753
  continue;
2665
2754
  }
2666
- if (Pi.has(t)) {
2667
- Fi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2755
+ if (Bi.has(t)) {
2756
+ Vi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2668
2757
  continue;
2669
2758
  }
2670
2759
  if (t === "src") {
2671
- Fi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2760
+ Vi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2672
2761
  continue;
2673
2762
  }
2674
2763
  t === "srcdoc" && e.removeAttribute(n);
2675
2764
  }
2676
2765
  let n = Array.from(e.children);
2677
- for (let e of n) Ii(e);
2766
+ for (let e of n) Hi(e);
2678
2767
  }
2679
- function Li(e) {
2768
+ function Ui(e) {
2680
2769
  if (typeof DOMParser > "u") return e;
2681
2770
  let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
2682
- for (let e of n) Ii(e);
2771
+ for (let e of n) Hi(e);
2683
2772
  return t.innerHTML;
2684
2773
  }
2685
2774
  //#endregion
2686
2775
  //#region src/composables/useEditableTextBlock.ts
2687
- function Ri(e) {
2688
- let t = n(G, []), r = n(q, null), { syntax: i } = Z(), a = S(() => r?.value ? Se(e(), t) : De(e(), t)), o = S(() => Li(je(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = We(c), { toLocal: f } = Ft(), p = S(() => f({
2776
+ function Wi(e) {
2777
+ let t = n(q, []), r = n(J, null), { syntax: i } = an(), a = S(() => r?.value ? xe(e(), t) : De(e(), t)), o = S(() => Ui(je(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = Ue(c), { toLocal: f } = It(), p = S(() => f({
2689
2778
  top: u.value - 8,
2690
2779
  left: d.value
2691
2780
  }));
@@ -2706,14 +2795,14 @@ function Ri(e) {
2706
2795
  }
2707
2796
  //#endregion
2708
2797
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
2709
- var zi = ["innerHTML"], Bi = /* @__PURE__ */ d({
2798
+ var Gi = ["innerHTML"], Ki = /* @__PURE__ */ d({
2710
2799
  __name: "ParagraphBlock",
2711
2800
  props: {
2712
2801
  block: {},
2713
2802
  viewport: {}
2714
2803
  },
2715
2804
  setup(e) {
2716
- let t = e, n = z(() => import("./ParagraphEditor-DCDHMcmx.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ri(() => t.block.content);
2805
+ let t = e, n = B(() => import("./ParagraphEditor-Bd-GQXee.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Wi(() => t.block.content);
2717
2806
  return (t, u) => (s(), C("div", {
2718
2807
  ref_key: "blockRef",
2719
2808
  ref: i,
@@ -2732,54 +2821,54 @@ var zi = ["innerHTML"], Bi = /* @__PURE__ */ d({
2732
2821
  key: 1,
2733
2822
  class: "tpl-text-content tpl:outline-none",
2734
2823
  innerHTML: _(o)
2735
- }, null, 8, zi))], 544));
2824
+ }, null, 8, Gi))], 544));
2736
2825
  }
2737
2826
  });
2738
2827
  //#endregion
2739
2828
  //#region src/utils/blockComponentResolver.ts
2740
- function Vi(e) {
2829
+ function qi(e) {
2741
2830
  let t = { fontFamily: e.fontFamily };
2742
2831
  return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
2743
2832
  }
2744
- function Hi(e, t, n) {
2833
+ function Ji(e, t, n) {
2745
2834
  if (t) {
2746
2835
  let n = t.getComponent(e);
2747
2836
  if (n) return n;
2748
2837
  }
2749
2838
  return n[e.type] ?? null;
2750
2839
  }
2751
- function Ui(e) {
2840
+ function Yi(e) {
2752
2841
  let { padding: t, backgroundColor: n } = e.styles, r = {
2753
2842
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
2754
2843
  backgroundColor: n || "transparent"
2755
2844
  };
2756
- return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ne.paragraphGap : Ne.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
2845
+ return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ce.paragraphGap : Ce.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
2757
2846
  }
2758
- function Wi(e) {
2847
+ function Xi(e) {
2759
2848
  if (e.type !== "section" || !e.wrapper) return null;
2760
2849
  let t = e.wrapper, n = {};
2761
2850
  return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
2762
2851
  }
2763
2852
  //#endregion
2764
2853
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
2765
- var Gi = [
2854
+ var Zi = [
2766
2855
  "data-block-id",
2767
2856
  "data-block-type",
2768
2857
  "data-tpl-picked"
2769
- ], Ki = ["aria-label"], qi = [
2858
+ ], Qi = ["aria-label"], $i = [
2770
2859
  "aria-label",
2771
2860
  "aria-pressed",
2772
2861
  "title"
2773
- ], Ji = ["aria-label", "title"], Yi = ["aria-label", "title"], Xi = ["aria-label", "title"], Zi = {
2862
+ ], ea = ["aria-label", "title"], ta = ["aria-label", "title"], na = ["aria-label", "title"], ra = {
2774
2863
  key: 1,
2775
2864
  class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
2776
- }, Qi = { 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)]" }, $i = {
2865
+ }, ia = { 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)]" }, aa = {
2777
2866
  key: 2,
2778
2867
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
2779
- }, ea = ["aria-label", "title"], ta = {
2868
+ }, oa = ["aria-label", "title"], sa = {
2780
2869
  key: 3,
2781
2870
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
2782
- }, na = ["aria-label"], ra = /*#__PURE__*/ tn(/* @__PURE__ */ d({
2871
+ }, ca = ["aria-label"], la = /*#__PURE__*/ nn(/* @__PURE__ */ d({
2783
2872
  __name: "BlockWrapper",
2784
2873
  props: {
2785
2874
  block: {},
@@ -2791,7 +2880,7 @@ var Gi = [
2791
2880
  },
2792
2881
  emits: ["select"],
2793
2882
  setup(e, { emit: t }) {
2794
- let r = z(() => import("./BlockIssueBadge-CloK4k3M.js")), i = e, o = t, { t: c, format: u } = J(), d = n(At, null), f = l(null), p = S(() => d?.liftedBlockId.value === i.block.id), m = S(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
2883
+ let r = B(() => import("./BlockIssueBadge-BJ__oEtm.js")), i = e, o = t, { t: c, format: u } = X(), d = n(at, null), f = l(null), p = S(() => d?.liftedBlockId.value === i.block.id), m = S(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
2795
2884
  async function h() {
2796
2885
  await D(), f.value?.focus();
2797
2886
  }
@@ -2817,20 +2906,20 @@ var Gi = [
2817
2906
  let y = S(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), x = S(() => i.previewMode === !0 && y.value), T = S(() => i.viewport ? {
2818
2907
  desktop: c.viewport.desktop,
2819
2908
  mobile: c.viewport.mobile
2820
- }[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(pt, null), j = n(gt, null), N = n(ht, {}), P = S(() => N.savedBlocks?.isPicking.value === !0), F = S(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = S(() => i.isSelected && !P.value), L = S(() => N.comments?.getBlockCount(i.block.id) ?? 0), ee = S(() => Ui(i.block)), te = S(() => Wi(i.block));
2821
- function ne(e) {
2909
+ }[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(dt, null), j = n(ht, null), N = n(yt, {}), P = S(() => N.savedBlocks?.isPicking.value === !0), F = S(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = S(() => i.isSelected && !P.value), L = S(() => N.comments?.getBlockCount(i.block.id) ?? 0), z = S(() => Yi(i.block)), H = S(() => Xi(i.block));
2910
+ function ee(e) {
2822
2911
  i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
2823
2912
  }
2824
- function re() {
2913
+ function te() {
2825
2914
  A?.deleteBlock(i.block.id);
2826
2915
  }
2827
- function ie() {
2916
+ function ne() {
2828
2917
  A?.duplicateBlock(i.block);
2829
2918
  }
2830
- function ae() {
2919
+ function re() {
2831
2920
  N.savedBlocks?.startPicking(i.block.id);
2832
2921
  }
2833
- function oe() {
2922
+ function ie() {
2834
2923
  j?.toggleBlock(i.block.id);
2835
2924
  }
2836
2925
  return (t, n) => x.value ? w("", !0) : (s(), C("div", {
@@ -2844,7 +2933,7 @@ var Gi = [
2844
2933
  "data-block-id": e.block.id,
2845
2934
  "data-block-type": e.block.type,
2846
2935
  "data-tpl-picked": e.picked || void 0,
2847
- onClick: ne
2936
+ onClick: ee
2848
2937
  }, [
2849
2938
  v(_(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
2850
2939
  I.value ? (s(), C("div", {
@@ -2862,98 +2951,98 @@ var Gi = [
2862
2951
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
2863
2952
  title: _(c).blockActions.drag,
2864
2953
  onKeydown: g
2865
- }, [v(_(Gt), {
2954
+ }, [v(_(Kt), {
2866
2955
  size: 14,
2867
2956
  "stroke-width": 1.5
2868
- })], 40, qi),
2957
+ })], 40, $i),
2869
2958
  M("button", {
2870
2959
  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",
2871
2960
  "aria-label": _(c).blockActions.duplicate,
2872
2961
  title: _(c).blockActions.duplicate,
2873
- onClick: O(ie, ["stop"])
2874
- }, [v(_(Rt), {
2962
+ onClick: O(ne, ["stop"])
2963
+ }, [v(_(zt), {
2875
2964
  size: 14,
2876
2965
  "stroke-width": 1.5
2877
- })], 8, Ji),
2966
+ })], 8, ea),
2878
2967
  F.value ? (s(), C("button", {
2879
2968
  key: 0,
2880
2969
  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",
2881
2970
  "aria-label": _(c).blockActions.saveAsBlock,
2882
2971
  title: _(c).blockActions.saveAsBlock,
2883
- onClick: O(ae, ["stop"])
2884
- }, [v(_(Lt), {
2972
+ onClick: O(re, ["stop"])
2973
+ }, [v(_(Rt), {
2885
2974
  size: 14,
2886
2975
  "stroke-width": 1.5
2887
- })], 8, Yi)) : w("", !0),
2976
+ })], 8, ta)) : w("", !0),
2888
2977
  M("button", {
2889
2978
  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",
2890
2979
  "aria-label": _(c).blockActions.delete,
2891
2980
  title: _(c).blockActions.delete,
2892
- onClick: O(re, ["stop"])
2893
- }, [v(_(Ut), {
2981
+ onClick: O(te, ["stop"])
2982
+ }, [v(_(Wt), {
2894
2983
  size: 14,
2895
2984
  "stroke-width": 1.5
2896
- })], 8, Xi)
2897
- ], 8, Ki)) : w("", !0),
2898
- y.value ? (s(), C("div", Zi, [M("span", Qi, [v(_(Vt), {
2985
+ })], 8, na)
2986
+ ], 8, Qi)) : w("", !0),
2987
+ y.value ? (s(), C("div", ra, [M("span", ia, [v(_(Ht), {
2899
2988
  size: 12,
2900
2989
  "stroke-width": 1.5
2901
- }), B(" " + R(_(u)(_(c).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : w("", !0),
2902
- E.value && !y.value ? (s(), C("div", $i, [M("button", {
2990
+ }), V(" " + R(_(u)(_(c).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : w("", !0),
2991
+ E.value && !y.value ? (s(), C("div", aa, [M("button", {
2903
2992
  "data-testid": "condition-toggle",
2904
2993
  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)]",
2905
2994
  "aria-label": _(c).blockActions.conditionToggle,
2906
2995
  title: e.block.displayCondition?.label,
2907
- onClick: O(oe, ["stop"])
2908
- }, [v(_(Qt), {
2996
+ onClick: O(ie, ["stop"])
2997
+ }, [v(_($t), {
2909
2998
  size: 12,
2910
2999
  "stroke-width": 2
2911
- })], 8, ea)])) : w("", !0),
2912
- L.value > 0 && !y.value ? (s(), C("div", ta, [M("button", {
3000
+ })], 8, oa)])) : w("", !0),
3001
+ L.value > 0 && !y.value ? (s(), C("div", sa, [M("button", {
2913
3002
  class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 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)]",
2914
3003
  "aria-label": _(u)(_(c).blockActions.comments, { count: String(L.value) }),
2915
3004
  onClick: n[0] ||= O((t) => _(N).comments?.openForBlock(e.block.id), ["stop"])
2916
- }, [v(_(Yt), {
3005
+ }, [v(_(Xt), {
2917
3006
  size: 12,
2918
3007
  "stroke-width": 2.5
2919
- }), B(" " + R(L.value), 1)], 8, na)])) : w("", !0),
2920
- te.value ? (s(), C("div", {
3008
+ }), V(" " + R(L.value), 1)], 8, ca)])) : w("", !0),
3009
+ H.value ? (s(), C("div", {
2921
3010
  key: 4,
2922
3011
  class: "tpl-section-wrapper",
2923
- style: k(te.value)
3012
+ style: k(H.value)
2924
3013
  }, [M("div", {
2925
3014
  class: "tpl-block-content",
2926
- style: k(ee.value)
3015
+ style: k(z.value)
2927
3016
  }, [a(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (s(), C("div", {
2928
3017
  key: 5,
2929
3018
  class: "tpl-block-content",
2930
- style: k(ee.value)
3019
+ style: k(z.value)
2931
3020
  }, [a(t.$slots, "default", {}, void 0, !0)], 4))
2932
- ], 10, Gi));
3021
+ ], 10, Zi));
2933
3022
  }
2934
3023
  }), [["__scopeId", "data-v-2c239048"]]);
2935
3024
  //#endregion
2936
3025
  //#region src/utils/unwrapParagraph.ts
2937
- function ia(e) {
3026
+ function ua(e) {
2938
3027
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
2939
3028
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
2940
3029
  }
2941
3030
  //#endregion
2942
3031
  //#region src/components/blocks/TitleBlock.vue
2943
- var aa = /* @__PURE__ */ d({
3032
+ var da = /* @__PURE__ */ d({
2944
3033
  __name: "TitleBlock",
2945
3034
  props: {
2946
3035
  block: {},
2947
3036
  viewport: {}
2948
3037
  },
2949
3038
  setup(e) {
2950
- let t = e, n = z(() => import("./TitleEditor-BuCOahW3.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ri(() => t.block.content), d = S(() => {
3039
+ let t = e, n = B(() => import("./TitleEditor-CrnuIq62.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Wi(() => t.block.content), d = S(() => {
2951
3040
  let e = {
2952
- fontSize: `${ke[t.block.level]}px`,
3041
+ fontSize: `${Ne[t.block.level]}px`,
2953
3042
  textAlign: t.block.textAlign
2954
3043
  };
2955
3044
  return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
2956
- }), f = S(() => `h${t.block.level}`), p = S(() => ia(o.value));
3045
+ }), f = S(() => `h${t.block.level}`), p = S(() => ua(o.value));
2957
3046
  return (t, o) => (s(), C("div", {
2958
3047
  ref_key: "blockRef",
2959
3048
  ref: i,
@@ -2979,16 +3068,16 @@ var aa = /* @__PURE__ */ d({
2979
3068
  });
2980
3069
  //#endregion
2981
3070
  //#region src/utils/sectionColumnDrop.ts
2982
- function oa(e) {
3071
+ function fa(e) {
2983
3072
  return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
2984
3073
  }
2985
3074
  //#endregion
2986
3075
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
2987
- var sa = { class: "tpl:w-full" }, ca = {
3076
+ var pa = { class: "tpl:w-full" }, ma = {
2988
3077
  key: 0,
2989
3078
  "data-testid": "section-drop-hint",
2990
3079
  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)]"
2991
- }, la = /* @__PURE__ */ d({
3080
+ }, ha = /* @__PURE__ */ d({
2992
3081
  __name: "SectionBlock",
2993
3082
  props: {
2994
3083
  block: {},
@@ -2996,13 +3085,13 @@ var sa = { class: "tpl:w-full" }, ca = {
2996
3085
  },
2997
3086
  setup(e) {
2998
3087
  let t = {
2999
- title: aa,
3000
- paragraph: Bi,
3001
- image: Di,
3002
- button: kr,
3003
- divider: si,
3004
- custom: ai
3005
- }, a = e, { t: o } = J(), c = $e(K, "SectionBlock"), l = n(gt, null), d = n(Et, null), p = n(ht, {}), m = n(Tt, null);
3088
+ title: da,
3089
+ paragraph: Ki,
3090
+ image: Ni,
3091
+ button: Pr,
3092
+ divider: fi,
3093
+ custom: ui
3094
+ }, a = e, { t: o } = X(), c = lt(Y, "SectionBlock"), l = n(ht, null), d = n(Et, null), p = n(yt, {}), m = n(Tt, null);
3006
3095
  function h(e) {
3007
3096
  let t = p.savedBlocks;
3008
3097
  if (t?.isPicking.value) {
@@ -3037,7 +3126,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3037
3126
  r[e] = n, c.updateBlock(a.block.id, { children: r });
3038
3127
  }
3039
3128
  function D(e) {
3040
- return Hi(e, d, t);
3129
+ return Ji(e, d, t);
3041
3130
  }
3042
3131
  function O(e, t) {
3043
3132
  e.type === "custom" && c.updateBlock(e.id, {
@@ -3045,7 +3134,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3045
3134
  dataSourceFetched: t.dataSourceFetched
3046
3135
  });
3047
3136
  }
3048
- return (t, n) => (s(), C("div", sa, [M("div", { class: b(["tpl:flex tpl:gap-0", { "tpl:flex-col": x.value }]) }, [(s(!0), C(L, null, r(y.value, (t, n) => (s(), C("div", {
3137
+ return (t, n) => (s(), C("div", pa, [M("div", { class: b(["tpl:flex tpl:gap-0", { "tpl:flex-col": x.value }]) }, [(s(!0), C(L, null, r(y.value, (t, n) => (s(), C("div", {
3049
3138
  key: n,
3050
3139
  class: b(["tpl:relative tpl:min-h-[60px] tpl:rounded", T(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3051
3140
  style: k({ width: x.value ? "100%" : g.value[n] })
@@ -3054,7 +3143,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3054
3143
  group: {
3055
3144
  name: "blocks",
3056
3145
  pull: !0,
3057
- put: (e, t, n) => _(oa)(n)
3146
+ put: (e, t, n) => _(fa)(n)
3058
3147
  },
3059
3148
  animation: 150,
3060
3149
  "ghost-class": "tpl-ghost",
@@ -3067,7 +3156,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3067
3156
  class: "tpl:min-h-[60px]",
3068
3157
  "onUpdate:modelValue": (e) => E(n, e)
3069
3158
  }, {
3070
- default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(ra, {
3159
+ default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(la, {
3071
3160
  block: t,
3072
3161
  "is-selected": _(c).state.selectedBlockId === t.id,
3073
3162
  viewport: e.viewport,
@@ -3099,13 +3188,13 @@ var sa = { class: "tpl:w-full" }, ca = {
3099
3188
  "model-value",
3100
3189
  "group",
3101
3190
  "onUpdate:modelValue"
3102
- ]), T(n).length === 0 ? (s(), C("div", ca, [M("span", null, R(_(o).section.dropHere), 1)])) : w("", !0)], 6))), 128))], 2)]));
3191
+ ]), T(n).length === 0 ? (s(), C("div", ma, [M("span", null, R(_(o).section.dropHere), 1)])) : w("", !0)], 6))), 128))], 2)]));
3103
3192
  }
3104
- }), ua = Fe, da = {
3193
+ }), ga = ke, _a = {
3105
3194
  small: 24,
3106
3195
  medium: 32,
3107
3196
  large: 48
3108
- }, fa = [
3197
+ }, va = [
3109
3198
  "facebook",
3110
3199
  "twitter",
3111
3200
  "instagram",
@@ -3123,11 +3212,11 @@ var sa = { class: "tpl:w-full" }, ca = {
3123
3212
  "github",
3124
3213
  "dribbble",
3125
3214
  "behance"
3126
- ], pa = [
3215
+ ], ya = [
3127
3216
  "width",
3128
3217
  "height",
3129
3218
  "fill"
3130
- ], ma = ["d"], ha = /* @__PURE__ */ d({
3219
+ ], ba = ["d"], xa = /* @__PURE__ */ d({
3131
3220
  __name: "SocialIconSvg",
3132
3221
  props: {
3133
3222
  platform: {},
@@ -3135,7 +3224,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3135
3224
  iconSize: {}
3136
3225
  },
3137
3226
  setup(e) {
3138
- let t = e, n = S(() => ua[t.platform]), r = S(() => da[t.iconSize]), i = S(() => {
3227
+ let t = e, n = S(() => ga[t.platform]), r = S(() => _a[t.iconSize]), i = S(() => {
3139
3228
  let e = {
3140
3229
  display: "inline-flex",
3141
3230
  alignItems: "center",
@@ -3179,25 +3268,25 @@ var sa = { class: "tpl:w-full" }, ca = {
3179
3268
  viewBox: "0 0 24 24",
3180
3269
  fill: o.value,
3181
3270
  xmlns: "http://www.w3.org/2000/svg"
3182
- }, [M("path", { d: n.value.path }, null, 8, ma)], 8, pa))], 4));
3271
+ }, [M("path", { d: n.value.path }, null, 8, ba)], 8, ya))], 4));
3183
3272
  }
3184
- }), ga = { class: "tpl:w-full" }, _a = ["href"], va = {
3273
+ }), Sa = { class: "tpl:w-full" }, Ca = ["href"], wa = {
3185
3274
  key: 1,
3186
3275
  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)]"
3187
- }, ya = /* @__PURE__ */ d({
3276
+ }, Ta = /* @__PURE__ */ d({
3188
3277
  __name: "SocialIconsBlock",
3189
3278
  props: {
3190
3279
  block: {},
3191
3280
  viewport: {}
3192
3281
  },
3193
3282
  setup(e) {
3194
- let t = e, { t: n } = J(), i = S(() => ({
3283
+ let t = e, { t: n } = X(), i = S(() => ({
3195
3284
  display: "flex",
3196
3285
  flexWrap: "wrap",
3197
3286
  gap: `${t.block.spacing}px`,
3198
3287
  justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
3199
3288
  })), a = S(() => t.block.icons.length > 0);
3200
- return (t, o) => (s(), C("div", ga, [a.value ? (s(), C("div", {
3289
+ return (t, o) => (s(), C("div", Sa, [a.value ? (s(), C("div", {
3201
3290
  key: 0,
3202
3291
  style: k(i.value)
3203
3292
  }, [(s(!0), C(L, null, r(e.block.icons, (t) => (s(), C("a", {
@@ -3205,7 +3294,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3205
3294
  href: t.url || "#",
3206
3295
  class: "tpl:cursor-default",
3207
3296
  onClick: o[0] ||= O(() => {}, ["prevent"])
3208
- }, [v(ha, {
3297
+ }, [v(xa, {
3209
3298
  platform: t.platform,
3210
3299
  "icon-style": e.block.iconStyle,
3211
3300
  "icon-size": e.block.iconSize
@@ -3213,44 +3302,44 @@ var sa = { class: "tpl:w-full" }, ca = {
3213
3302
  "platform",
3214
3303
  "icon-style",
3215
3304
  "icon-size"
3216
- ])], 8, _a))), 128))], 4)) : (s(), C("div", va, [v(_(It), { size: 16 }), M("span", null, R(_(n).social.addIcons), 1)]))]));
3305
+ ])], 8, Ca))), 128))], 4)) : (s(), C("div", wa, [v(_(Lt), { size: 16 }), M("span", null, R(_(n).social.addIcons), 1)]))]));
3217
3306
  }
3218
- }), ba = { class: "tpl:w-full" }, xa = {
3307
+ }), Ea = { class: "tpl:w-full" }, Da = {
3219
3308
  key: 0,
3220
3309
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
3221
3310
  style: {
3222
3311
  "background-color": "var(--tpl-bg-hover)",
3223
3312
  color: "var(--tpl-text-dim)"
3224
3313
  }
3225
- }, Sa = /* @__PURE__ */ d({
3314
+ }, Oa = /* @__PURE__ */ d({
3226
3315
  __name: "SpacerBlock",
3227
3316
  props: {
3228
3317
  block: {},
3229
3318
  viewport: {}
3230
3319
  },
3231
3320
  setup(e) {
3232
- let t = e, n = $e(K, "SpacerBlock"), r = S(() => ({
3321
+ let t = e, n = lt(Y, "SpacerBlock"), r = S(() => ({
3233
3322
  height: `${t.block.height}px`,
3234
3323
  minHeight: `${t.block.height}px`,
3235
3324
  ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
3236
3325
  }));
3237
- return (t, i) => (s(), C("div", ba, [M("div", {
3326
+ return (t, i) => (s(), C("div", Ea, [M("div", {
3238
3327
  style: k(r.value),
3239
3328
  class: b(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !_(n).state.previewMode }])
3240
- }, [_(n).state.previewMode ? w("", !0) : (s(), C("span", xa, R(e.block.height) + "px ", 1))], 6)]));
3329
+ }, [_(n).state.previewMode ? w("", !0) : (s(), C("span", Da, R(e.block.height) + "px ", 1))], 6)]));
3241
3330
  }
3242
- }), Ca = { class: "tpl:w-full" }, wa = { key: 0 }, Ta = [
3331
+ }), ka = { class: "tpl:w-full" }, Aa = { key: 0 }, ja = [
3243
3332
  "aria-label",
3244
3333
  "data-placeholder",
3245
3334
  "onBlur"
3246
- ], Ea = [
3335
+ ], Ma = [
3247
3336
  "aria-label",
3248
3337
  "data-placeholder",
3249
3338
  "onBlur"
3250
- ], Da = {
3339
+ ], Na = {
3251
3340
  key: 1,
3252
3341
  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)]"
3253
- }, Oa = /*#__PURE__*/ tn(/* @__PURE__ */ d({
3342
+ }, Pa = /*#__PURE__*/ nn(/* @__PURE__ */ d({
3254
3343
  __name: "TableBlock",
3255
3344
  props: {
3256
3345
  block: {},
@@ -3264,7 +3353,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3264
3353
  updated(e, t) {
3265
3354
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
3266
3355
  }
3267
- }, n = e, { t: i } = J(), a = $e(K, "TableBlock"), o = S(() => n.block.rows.length > 0), c = S(() => {
3356
+ }, n = e, { t: i } = X(), a = lt(Y, "TableBlock"), o = S(() => n.block.rows.length > 0), c = S(() => {
3268
3357
  let e = {
3269
3358
  width: "100%",
3270
3359
  borderCollapse: "collapse",
@@ -3295,11 +3384,11 @@ var sa = { class: "tpl:w-full" }, ca = {
3295
3384
  } : n);
3296
3385
  a.updateBlock(n.block.id, { rows: o });
3297
3386
  }
3298
- return (e, n) => (s(), C("div", Ca, [o.value ? (s(), C("table", {
3387
+ return (e, n) => (s(), C("div", ka, [o.value ? (s(), C("table", {
3299
3388
  key: 0,
3300
3389
  style: k(c.value),
3301
3390
  class: "tpl-table-editable"
3302
- }, [d.value ? (s(), C("thead", wa, [M("tr", null, [(s(!0), C(L, null, r(d.value.cells, (e) => f((s(), C("th", {
3391
+ }, [d.value ? (s(), C("thead", Aa, [M("tr", null, [(s(!0), C(L, null, r(d.value.cells, (e) => f((s(), C("th", {
3303
3392
  key: e.id,
3304
3393
  style: k(u.value),
3305
3394
  "aria-label": _(i).table.cellPlaceholder,
@@ -3308,7 +3397,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3308
3397
  onBlur: (t) => h(d.value.id, e.id, t),
3309
3398
  onKeydown: n[0] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
3310
3399
  onClick: O(m, ["stop"])
3311
- }, null, 44, Ta)), [[t, e.content]])), 128))])])) : w("", !0), M("tbody", null, [(s(!0), C(L, null, r(p.value, (e) => (s(), C("tr", { key: e.id }, [(s(!0), C(L, null, r(e.cells, (r) => f((s(), C("td", {
3400
+ }, null, 44, ja)), [[t, e.content]])), 128))])])) : w("", !0), M("tbody", null, [(s(!0), C(L, null, r(p.value, (e) => (s(), C("tr", { key: e.id }, [(s(!0), C(L, null, r(e.cells, (r) => f((s(), C("td", {
3312
3401
  key: r.id,
3313
3402
  style: k(l.value),
3314
3403
  "aria-label": _(i).table.cellPlaceholder,
@@ -3317,9 +3406,9 @@ var sa = { class: "tpl:w-full" }, ca = {
3317
3406
  onBlur: (t) => h(e.id, r.id, t),
3318
3407
  onKeydown: n[1] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
3319
3408
  onClick: O(m, ["stop"])
3320
- }, null, 44, Ea)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), C("div", Da, [v(_(Zt), { size: 16 }), M("span", null, R(_(i).table.empty), 1)]))]));
3409
+ }, null, 44, Ma)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), C("div", Na, [v(_(Qt), { size: 16 }), M("span", null, R(_(i).table.empty), 1)]))]));
3321
3410
  }
3322
- }), [["__scopeId", "data-v-963ac422"]]), ka = /* @__PURE__ */ d({
3411
+ }), [["__scopeId", "data-v-963ac422"]]), Fa = /* @__PURE__ */ d({
3323
3412
  __name: "VideoPlayButton",
3324
3413
  props: { hoverEffect: {
3325
3414
  type: Boolean,
@@ -3337,7 +3426,7 @@ var sa = { class: "tpl:w-full" }, ca = {
3337
3426
  });
3338
3427
  //#endregion
3339
3428
  //#region src/utils/videoThumbnail.ts
3340
- function Aa(e) {
3429
+ function Ia(e) {
3341
3430
  if (!e) return {
3342
3431
  platform: "unknown",
3343
3432
  videoId: null,
@@ -3369,25 +3458,25 @@ function Aa(e) {
3369
3458
  thumbnailUrl: null
3370
3459
  };
3371
3460
  }
3372
- function ja(e, t) {
3373
- return t || Aa(e).thumbnailUrl;
3461
+ function La(e, t) {
3462
+ return t || Ia(e).thumbnailUrl;
3374
3463
  }
3375
3464
  //#endregion
3376
3465
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
3377
- var Ma = ["src", "alt"], Na = {
3466
+ var Ra = ["src", "alt"], za = {
3378
3467
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3379
3468
  style: { opacity: "0.7" }
3380
- }, Pa = ["href"], Fa = ["src", "alt"], Ia = ["src", "alt"], La = {
3469
+ }, Ba = ["href"], Va = ["src", "alt"], Ha = ["src", "alt"], Ua = {
3381
3470
  key: 3,
3382
3471
  class: "tpl:flex 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)]"
3383
- }, Ra = /* @__PURE__ */ d({
3472
+ }, Wa = /* @__PURE__ */ d({
3384
3473
  __name: "VideoBlock",
3385
3474
  props: {
3386
3475
  block: {},
3387
3476
  viewport: {}
3388
3477
  },
3389
3478
  setup(e) {
3390
- let t = e, { t: n } = J(), { syntax: r } = Z(), i = S(() => H(t.block.url, r) || H(t.block.thumbnailUrl, r)), a = Mn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Mn(() => i.value ? t.block.placeholderUrl : void 0), c = S(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : ja(t.block.url)), l = S(() => ({ textAlign: t.block.align })), u = S(() => {
3479
+ let t = e, { t: n } = X(), { syntax: r } = an(), i = S(() => W(t.block.url, r) || W(t.block.thumbnailUrl, r)), a = Ln(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Ln(() => i.value ? t.block.placeholderUrl : void 0), c = S(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : La(t.block.url)), l = S(() => ({ textAlign: t.block.align })), u = S(() => {
3391
3480
  let e = t.block.align;
3392
3481
  return {
3393
3482
  maxWidth: "100%",
@@ -3397,7 +3486,7 @@ var Ma = ["src", "alt"], Na = {
3397
3486
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
3398
3487
  marginRight: e === "center" ? "auto" : void 0
3399
3488
  };
3400
- }), d = S(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = S(() => H(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
3489
+ }), d = S(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = S(() => W(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
3401
3490
  return (t, r) => (s(), C("div", {
3402
3491
  class: "tpl:w-full",
3403
3492
  style: k(l.value)
@@ -3410,16 +3499,16 @@ var Ma = ["src", "alt"], Na = {
3410
3499
  src: _(o),
3411
3500
  alt: e.block.alt,
3412
3501
  style: k(d.value)
3413
- }, null, 12, Ma), v(ka)], 4)) : i.value ? (s(), C("div", {
3502
+ }, null, 12, Ra), v(Fa)], 4)) : i.value ? (s(), C("div", {
3414
3503
  key: 1,
3415
3504
  class: "tpl:relative tpl:!flex 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)]",
3416
3505
  style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
3417
- }, [v(_(qt), {
3506
+ }, [v(_(Jt), {
3418
3507
  size: 36,
3419
3508
  "stroke-width": 1.5,
3420
3509
  class: "tpl:text-[var(--tpl-primary)]",
3421
3510
  style: { opacity: "0.5" }
3422
- }), M("span", Na, [v(Dr, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), C(L, { key: 2 }, [e.block.url ? (s(), C("a", {
3511
+ }), M("span", za, [v(Mr, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), C(L, { key: 2 }, [e.block.url ? (s(), C("a", {
3423
3512
  key: 0,
3424
3513
  href: e.block.url,
3425
3514
  target: "_blank",
@@ -3432,7 +3521,7 @@ var Ma = ["src", "alt"], Na = {
3432
3521
  src: c.value,
3433
3522
  alt: e.block.alt,
3434
3523
  style: k(d.value)
3435
- }, null, 12, Fa), v(ka, { "hover-effect": "" })], 12, Pa)) : (s(), C("div", {
3524
+ }, null, 12, Va), v(Fa, { "hover-effect": "" })], 12, Ba)) : (s(), C("div", {
3436
3525
  key: 1,
3437
3526
  class: "tpl:relative tpl:inline-block",
3438
3527
  style: k(u.value)
@@ -3441,51 +3530,54 @@ var Ma = ["src", "alt"], Na = {
3441
3530
  src: c.value,
3442
3531
  alt: e.block.alt,
3443
3532
  style: k(d.value)
3444
- }, null, 12, Ia), v(ka)], 4))], 64)) : (s(), C("div", La, [v(_(qt), {
3533
+ }, null, 12, Ha), v(Fa)], 4))], 64)) : (s(), C("div", Ua, [v(_(Jt), {
3445
3534
  size: 40,
3446
3535
  "stroke-width": 1.5,
3447
3536
  class: "tpl:text-[var(--tpl-border-light)]"
3448
3537
  }), M("span", null, R(_(n).video.addVideo), 1)]))], 4));
3449
3538
  }
3450
- }), za = {
3451
- section: la,
3452
- title: aa,
3453
- paragraph: Bi,
3454
- image: Di,
3455
- button: kr,
3456
- divider: si,
3457
- video: Ra,
3458
- social: ya,
3459
- menu: ji,
3460
- table: Oa,
3461
- spacer: Sa,
3462
- html: pi,
3463
- countdown: z(() => import("./CountdownBlock-rK055jpy.js"))
3539
+ }), Ga = {
3540
+ section: ha,
3541
+ title: da,
3542
+ paragraph: Ki,
3543
+ image: Ni,
3544
+ button: Pr,
3545
+ divider: fi,
3546
+ video: Wa,
3547
+ social: Ta,
3548
+ menu: Li,
3549
+ table: Pa,
3550
+ spacer: Oa,
3551
+ html: vi,
3552
+ countdown: B(() => import("./CountdownBlock-B4AfqJwb.js"))
3464
3553
  };
3465
- function Ba(e) {
3466
- let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = J(i), d = S(() => ge(ge(nr(i), xr(n.content.value.settings?.locale)), r.blockDefaults ?? {}));
3554
+ function Ka(e) {
3555
+ let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = X(i), d = S(() => ae(ae(ae(sr(i), Er(n.content.value.settings?.locale)), de(n.content.value.settings) === "rtl" ? {
3556
+ title: { textAlign: "right" },
3557
+ table: { textAlign: "right" }
3558
+ } : {}), r.blockDefaults ?? {}));
3467
3559
  n.setUiTheme(r.uiTheme ?? "auto");
3468
- let { resolvedTheme: f } = Bn(S(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: m } = Hn({
3560
+ let { resolvedTheme: f } = Gn(S(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: m } = qn({
3469
3561
  themeOverrides: p,
3470
3562
  resolvedTheme: f,
3471
3563
  extraStyles: () => ({
3472
3564
  "--tpl-drop-text": `"${i.canvas.dropHere}"`,
3473
3565
  ...e.themeExtraStyles?.()
3474
3566
  })
3475
- }), g = fn({
3567
+ }), g = mn({
3476
3568
  content: n.content,
3477
3569
  setContent: (e, t) => n.setContent(e, t),
3478
3570
  ...e.historyOptions
3479
3571
  });
3480
- yn(n, g);
3481
- let _ = mn({
3572
+ xn(n, g);
3573
+ let _ = gn({
3482
3574
  addBlock: n.addBlock,
3483
3575
  removeBlock: n.removeBlock,
3484
3576
  updateBlock: n.updateBlock,
3485
3577
  selectBlock: n.selectBlock,
3486
3578
  findBlockLocation: n.findBlockLocation,
3487
3579
  blockDefaults: () => d.value
3488
- }), v = _n(n), y = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? gn({
3580
+ }), v = yn(n), y = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? vn({
3489
3581
  content: n.content,
3490
3582
  isDirty: () => n.state.isDirty,
3491
3583
  ...e.autoSaveOptions
@@ -3493,30 +3585,30 @@ function Ba(e) {
3493
3585
  y && (b = t(g.isNavigating, (e) => {
3494
3586
  e ? y.pause() : y.resume();
3495
3587
  }));
3496
- let x = zn(n, {
3588
+ let x = Wn(n, {
3497
3589
  t: s,
3498
3590
  format: u
3499
3591
  }, r.customBlocks ?? []), C = Pt(r.colors);
3500
- if (C.allowCustomIgnored && Y.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), C.invalidPresets.length > 0 && Y.warn(`config.colors.presets skipped invalid entries: ${C.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), C.allowCustom === !1) {
3501
- let e = tr(C.presets, r.blockDefaults, r.templateDefaults);
3502
- e.length > 0 && Y.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.`);
3503
- }
3504
- let w = $n(r.templateSettings);
3505
- for (let e of w.unknown) Y.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Zn.join(", ")}) — skipping it.`);
3506
- let T = Un();
3507
- Jn(T, za);
3592
+ if (C.allowCustomIgnored && Z.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), C.invalidPresets.length > 0 && Z.warn(`config.colors.presets skipped invalid entries: ${C.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), C.allowCustom === !1) {
3593
+ let e = or(C.presets, r.blockDefaults, r.templateDefaults);
3594
+ e.length > 0 && Z.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.`);
3595
+ }
3596
+ let w = ir(r.templateSettings);
3597
+ for (let e of w.unknown) Z.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${nr.join(", ")}) — skipping it.`);
3598
+ let T = Jn();
3599
+ $n(T, Ga);
3508
3600
  let E = /* @__PURE__ */ new Set();
3509
3601
  function D(e) {
3510
3602
  for (let t of e) {
3511
- T.registerCustom(t, ai);
3512
- for (let e of Cr(t, C)) E.has(e.id) || (E.add(e.id), Y.warn(e.message));
3603
+ T.registerCustom(t, ui);
3604
+ for (let e of Or(t, C)) E.has(e.id) || (E.add(e.id), Z.warn(e.message));
3513
3605
  }
3514
3606
  }
3515
3607
  r.customBlocks?.length && D(r.customBlocks);
3516
- let O = On();
3608
+ let O = Nn();
3517
3609
  if (o() && h(O.dispose), e.containerEl) {
3518
3610
  let t = e.containerEl;
3519
- W(document, "pointerdown", (e) => {
3611
+ K(document, "pointerdown", (e) => {
3520
3612
  let n = t.value;
3521
3613
  n && (e.composedPath?.() ?? []).includes(n) && O.claim();
3522
3614
  }, { capture: !0 });
@@ -3530,7 +3622,7 @@ function Ba(e) {
3530
3622
  y?.flush();
3531
3623
  }
3532
3624
  function A(t) {
3533
- O.isActive() && Tr(t, {
3625
+ O.isActive() && Ar(t, {
3534
3626
  history: g,
3535
3627
  selectBlock: (e) => n.selectBlock(e),
3536
3628
  getSelectedBlockId: () => n.state.selectedBlockId,
@@ -3542,31 +3634,31 @@ function Ba(e) {
3542
3634
  onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
3543
3635
  });
3544
3636
  }
3545
- W(document, "keydown", A);
3637
+ K(document, "keydown", A);
3546
3638
  let j = l(null);
3547
- c(vt, e.editorRoot ?? document), c(Qe, j), c(dt, i), c(K, n), c(Ot, g), c(pt, _), c(gt, v), c(ft, a), c(lt, m), c(et, f), c(Ct, d), c(Xe, r.locale), c(Et, T), c(_t, r.customBlocks ?? []), c(Ye, r.paletteBlocks), c(jt, Yn(r.htmlBlockPreview)), c(Dt, C), c(Ze, w.fields), c(wt, Wn(n.content, T));
3548
- let M = Ce(r.mergeTags?.syntax);
3549
- c(G, r.mergeTags?.tags ?? []), c(yt, M), c(at, r.mergeTags?.onRequest ?? null), c(Je, r.mergeTags?.autocomplete !== !1);
3550
- let N = l(Ie(r.mergeTags?.tags ?? []));
3551
- c(Ke, N);
3552
- let P = An({
3639
+ c(ut, e.editorRoot ?? document), c($e, j), c(Ye, i), c(Y, n), c(At, g), c(dt, _), c(ht, v), c(Dt, a), c(ct, m), c(wt, f), c(St, d), c(Qe, r.locale), c(Et, T), c(Ct, r.customBlocks ?? []), c(Ze, r.paletteBlocks), c(ft, er(r.htmlBlockPreview)), c(mt, C), c(st, w.fields), c(bt, Yn(n.content, T));
3640
+ let M = Se(r.mergeTags?.syntax);
3641
+ c(q, r.mergeTags?.tags ?? []), c(et, M), c(Je, r.mergeTags?.onRequest ?? null), c(nt, r.mergeTags?.autocomplete !== !1);
3642
+ let N = l(Fe(r.mergeTags?.tags ?? []));
3643
+ c(_t, N);
3644
+ let P = Fn({
3553
3645
  resolvePreview: r.resolvePreview,
3554
3646
  getContent: () => n.content.value,
3555
3647
  isActive: () => n.state.previewMode
3556
3648
  });
3557
- c(tt, P), c(ot, r.resolvePreview);
3649
+ c(it, P), c(jt, r.resolvePreview);
3558
3650
  let F = S(() => !(n.state.previewMode && P.isConfigured));
3559
3651
  c(Tt, F);
3560
- let I = Nn();
3561
- c(it, I), c(bt, l(!1)), c(ct, l(!1)), c(qe, r.logicTags?.tags ?? []), c(st, r.logicTags?.pairs ?? []), c(nt, r.logicTags?.onRequest ?? null), c(kt, Pn()), c(rt, r.onRequestMedia ?? null), c(mt, r.resolveImageUrl ? jn(r.resolveImageUrl) : null), c(xt, r.displayConditions?.conditions ?? []), c(St, r.displayConditions?.allowCustom ?? !1), c(ht, e.capabilities ?? {}), c(At, x);
3562
- let L = Fn(r.lint) ? null : In({
3652
+ let I = Rn();
3653
+ c(vt, I), c(Ge, l(!1)), c(qe, l(!1)), c(Ot, r.logicTags?.tags ?? []), c(Ke, r.logicTags?.pairs ?? []), c(tt, r.logicTags?.onRequest ?? null), c(ot, zn()), c(rt, r.onRequestMedia ?? null), c(pt, r.canDropMedia ?? null), c(kt, r.resolveImageUrl ? In(r.resolveImageUrl) : null), c(gt, r.displayConditions?.conditions ?? []), c(xt, r.displayConditions?.allowCustom ?? !1), c(yt, e.capabilities ?? {}), c(at, x);
3654
+ let L = Bn(r.lint) ? null : Vn({
3563
3655
  content: n.content,
3564
3656
  options: r.lint ?? {},
3565
3657
  updateBlock: n.updateBlock,
3566
3658
  updateSettings: n.updateSettings,
3567
3659
  removeBlock: n.removeBlock
3568
3660
  });
3569
- c(ut, L);
3661
+ c(Xe, L);
3570
3662
  function R() {
3571
3663
  b?.(), L?.destroy(), y?.destroy(), g.destroy();
3572
3664
  }
@@ -3592,6 +3684,6 @@ function Ba(e) {
3592
3684
  };
3593
3685
  }
3594
3686
  //#endregion
3595
- export { ur as A, Ln as B, Vr as C, Mr as D, Pr as E, mr as F, Sn as G, Tn as H, pr as I, hn as J, bn as K, Zn as L, _r as M, gr as N, kr as O, hr as P, Xn as R, Kr as S, Fr as T, wn as U, An as V, Cn as W, cn as Y, pi as _, ya as a, Xr as b, aa as c, Vi as d, Hi as f, hi as g, Di as h, Sa as i, vr as j, Sr as k, ra as l, ji as m, Ra as n, fa as o, Bi as p, vn as q, Oa as r, la as s, Ba as t, Ui as u, si as v, Br as w, Jr as x, ai as y, Rn as z };
3687
+ export { hr as A, Hn as B, Kr as C, Lr as D, zr as E, yr as F, Dn as G, An as H, vr as I, bn as J, wn as K, nr as L, Sr as M, xr as N, Pr as O, br as P, tr as R, Zr as S, Br as T, kn as U, Fn as V, On as W, un as X, _n as Y, vi as _, Ta as a, ti as b, da as c, qi as d, Ji as f, bi as g, Ni as h, Oa as i, Cr as j, Dr as k, la as l, Li as m, Wa as n, va as o, Ki as p, Sn as q, Pa as r, ha as s, Ka as t, Yi as u, fi as v, Gr as w, $r as x, ui as y, Un as z };
3596
3688
 
3597
- //# sourceMappingURL=useEditorCore-ehUSEsbw.js.map
3689
+ //# sourceMappingURL=useEditorCore-Cs7rYVBo.js.map