@templatical/editor 0.49.0 → 0.50.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 (378) hide show
  1. package/README.md +4 -2
  2. package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
  3. package/dist/AiAltTextReview-DoBEudnE.js +206 -0
  4. package/dist/AiChatPanel-Bs6sES3b.js +550 -0
  5. package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
  6. package/dist/AiPanels-CfN7A-ZA.js +33 -0
  7. package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
  8. package/dist/{BlockIssueBadge-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
  9. package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
  10. package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
  11. package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
  12. package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
  13. package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
  14. package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
  15. package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
  16. package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
  17. package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
  18. package/dist/IssuesPanel-C8nMUccy.js +360 -0
  19. package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
  20. package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
  21. package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
  22. package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
  23. package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
  24. package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
  25. package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
  26. package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
  27. package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
  28. package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
  29. package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
  30. package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
  31. package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
  32. package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
  33. package/dist/TemplateSettings-BVBWpiDU.js +237 -0
  34. package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
  35. package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
  36. package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
  37. package/dist/ToggleSwitch-D51U9cmR.js +37 -0
  38. package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
  39. package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
  40. package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
  41. package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
  42. package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
  43. package/dist/WrapperBlock-BO619LAb.js +45 -0
  44. package/dist/aiErrors-D5UOoYOt.js +41 -0
  45. package/dist/aiImageContext-BH4Ss1h3.js +48 -0
  46. package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
  47. package/dist/{blockTypeIcons-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
  48. package/dist/bundle-stats.json +8 -8
  49. package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
  50. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
  51. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
  52. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
  53. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
  54. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
  55. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
  56. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
  57. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
  58. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
  59. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
  60. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
  61. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
  62. package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
  63. package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
  65. package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
  66. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
  67. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
  68. package/dist/cdn/chunks/{CloudPanels-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
  69. package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
  70. package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
  71. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
  72. package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
  73. package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
  74. package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
  75. package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
  76. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
  77. package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
  78. package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
  79. package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
  80. package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
  81. package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
  82. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
  83. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
  84. package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
  85. package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
  86. package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
  87. package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
  88. package/dist/{MediaEditModal-C_wxoUMG.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
  89. package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
  90. package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
  91. package/dist/cdn/chunks/{MediaPanels-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
  92. package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
  93. package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
  94. package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
  95. package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
  96. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
  97. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
  98. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
  99. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
  100. package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
  101. package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
  102. package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
  103. package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
  104. package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
  105. package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
  106. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
  107. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
  108. package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
  109. package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
  111. package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
  112. package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
  113. package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
  114. package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
  115. package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
  116. package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
  117. package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
  118. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
  119. package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
  120. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
  121. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
  122. package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
  123. package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
  124. package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
  125. package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
  126. package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
  127. package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
  128. package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
  129. package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
  130. package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
  131. package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
  132. package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
  133. package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
  134. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
  135. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
  136. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
  137. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
  138. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
  139. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
  140. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
  141. package/dist/cdn/chunks/{blockTypeIcons-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
  142. package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
  143. package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
  144. package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
  145. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
  146. package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
  147. package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
  148. package/dist/{de-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
  149. package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
  150. package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
  151. package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
  152. package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
  153. package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
  154. package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
  155. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
  156. package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
  157. package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
  158. package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
  159. package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
  160. package/dist/{en-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
  161. package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
  162. package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
  163. package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
  164. package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
  165. package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
  166. package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
  167. package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
  168. package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
  169. package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
  170. package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
  171. package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
  172. package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
  173. package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
  174. package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
  175. package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
  176. package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
  177. package/dist/{nl-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
  178. package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
  179. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
  180. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
  181. package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
  182. package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
  183. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
  184. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
  185. package/dist/{pt-BR-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
  186. package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
  187. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
  188. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
  189. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
  190. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
  191. package/dist/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
  192. package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
  193. package/dist/cdn/chunks/{src-B77z1iw4.js → src-BcTUmgLe.js} +113 -113
  194. package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-BcTUmgLe.js.map} +1 -1
  195. package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
  196. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  197. package/dist/cdn/chunks/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
  198. package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
  199. package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
  200. package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
  201. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
  202. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
  203. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
  204. package/dist/cdn/chunks/{useEditorRoot-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
  205. package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
  206. package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
  207. package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
  208. package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
  209. package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
  210. package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
  211. package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
  212. package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
  213. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
  214. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
  215. package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
  216. package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
  217. package/dist/cdn/editor.css +1 -1
  218. package/dist/cdn/editor.js +2151 -1480
  219. package/dist/cdn/editor.js.map +1 -1
  220. package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
  221. package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
  222. package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
  223. package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
  224. package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
  225. package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
  226. package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
  227. package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
  228. package/dist/de-DBOTcDj2.js +20 -0
  229. package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
  230. package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
  231. package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
  232. package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
  233. package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
  234. package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
  235. package/dist/en-CDhWRrF_.js +20 -0
  236. package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
  237. package/dist/en-DwV15ltA.js +1 -0
  238. package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
  239. package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
  240. package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
  241. package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
  242. package/dist/image-DesWjcZ4.js +28 -0
  243. package/dist/index.d.ts +361 -24
  244. package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
  245. package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
  246. package/dist/keys-Zd9KWRD1.js +10 -0
  247. package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
  248. package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
  249. package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
  250. package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
  251. package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
  252. package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
  253. package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
  254. package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
  255. package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
  256. package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
  257. package/dist/pt-BR-CHM-ZKvE.js +20 -0
  258. package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
  259. package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
  260. package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
  261. package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
  262. package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
  263. package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
  264. package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
  265. package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
  266. package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
  267. package/dist/square-BWlolnXe.js +15 -0
  268. package/dist/style.css +1 -1
  269. package/dist/templatical-editor.js +2114 -1422
  270. package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
  271. package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
  272. package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
  273. package/dist/upload-BJfvdIrD.js +36 -0
  274. package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
  275. package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
  276. package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
  277. package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
  278. package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
  279. package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
  280. package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
  281. package/dist/useScrollToBlock-FmNMALM_.js +74 -0
  282. package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
  283. package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
  284. package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
  285. package/package.json +14 -12
  286. package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
  287. package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
  288. package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
  289. package/dist/CommentsSidebar-J65znlrH.js +0 -500
  290. package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
  291. package/dist/IssuesPanel-DeeVsfG7.js +0 -117
  292. package/dist/ParagraphEditor-zLV44z-R.js +0 -797
  293. package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
  294. package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
  295. package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
  296. package/dist/ToggleSwitch-DHweVJOr.js +0 -102
  297. package/dist/WrapperBlock-DiiaxpMb.js +0 -45
  298. package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
  299. package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
  300. package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
  301. package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
  302. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
  303. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
  304. package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
  305. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
  306. package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
  307. package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
  308. package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
  309. package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
  310. package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
  311. package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
  312. package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
  313. package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
  314. package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
  315. package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
  316. package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
  317. package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
  318. package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
  319. package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
  320. package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
  321. package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
  322. package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
  323. package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
  324. package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
  325. package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
  326. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
  327. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
  328. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
  329. package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
  330. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
  331. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
  332. package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
  333. package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
  334. package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
  335. package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
  336. package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
  337. package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
  338. package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
  339. package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
  340. package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
  341. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
  342. package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
  343. package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
  344. package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
  345. package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
  346. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
  347. package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
  348. package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
  349. package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
  350. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
  351. package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
  352. package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
  353. package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
  354. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
  355. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
  356. package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
  357. package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
  358. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
  359. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
  360. package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
  361. package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
  362. package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
  363. package/dist/copy-CUC43md_.js +0 -19
  364. package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
  365. package/dist/de-D_atmUVB.js +0 -87
  366. package/dist/dist-CCqn-RqE.js +0 -407
  367. package/dist/en-BHCMzqib.js +0 -1
  368. package/dist/en-DhJLnaBx.js +0 -87
  369. package/dist/image-up-BqiO7KCO.js +0 -27
  370. package/dist/keys-BymCnLHD.js +0 -10
  371. package/dist/plus-BDd0gTEm.js +0 -14
  372. package/dist/pt-BR-BphMoUTw.js +0 -87
  373. package/dist/shield-check-YhsbXfQc.js +0 -14
  374. package/dist/socialIcons-Bwv-49EB.js +0 -2167
  375. package/dist/timeouts-o5Y9BuqI.js +0 -4
  376. package/dist/upload-uU2cK0Ce.js +0 -21
  377. package/dist/useAliveFlag-BjP0Gxza.js +0 -10
  378. package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
@@ -0,0 +1,2586 @@
1
+ import { $ as e, A as t, C as n, D as r, F as i, I as a, J as o, L as s, M as c, P as l, S as u, T as d, U as f, V as p, W as m, X as h, _ as g, at as _, b as v, c as y, dt as b, g as x, h as S, it as C, j as w, l as T, lt as E, m as D, ot as O, p as k, q as A, s as j, t as M, tt as N, u as P, ut as F, x as I, z as L } from "./draggable-DZ0gwUJ6.js";
2
+ import { A as R, At as z, Bt as B, Ct as V, Dt as H, Et as U, F as ee, Ft as te, G as ne, H as re, Ht as W, I as ie, J as ae, L as oe, M as se, N as ce, Ot as le, P as ue, Pt as de, Q as fe, R as pe, Rt as me, U as he, Ut as ge, V as _e, Vt as ve, W as ye, X as be, Z as xe, a as Se, b as Ce, c as we, d as Te, f as Ee, g as De, h as Oe, i as ke, j as Ae, l as je, m as Me, mt as Ne, n as Pe, o as Fe, p as Ie, r as Le, t as Re, tt as ze, u as Be, w as Ve, y as He, z as Ue, zt as We } from "./src-BNFnxfrA.js";
3
+ import { C as Ge, I as Ke, L as qe, M as Je, N as Ye, P as Xe, R as Ze, S as Qe, _ as $e, a as et, b as tt, d as nt, g as rt, l as it, m as at, n as ot, t as st, v as ct, w as lt } from "./socialIcons-BBvsTwCV.js";
4
+ import { _ as ut, h as dt, v as ft, y as pt } from "./dist-Bo8Thh8v.js";
5
+ import { a as G, c as mt, i as ht } from "./dist-S-rLGqax.js";
6
+ import { $ as K, A as gt, B as _t, C as vt, D as yt, E as bt, F as xt, H as St, I as Ct, J as wt, K as Tt, L as Et, M as Dt, N as Ot, O as q, P as kt, Q as At, R as jt, S as Mt, T as Nt, V as Pt, W as Ft, X as It, Y as Lt, Z as Rt, _ as zt, a as Bt, b as Vt, c as Ht, d as Ut, f as Wt, g as J, h as Gt, j as Kt, k as qt, l as Jt, m as Yt, n as Xt, o as Zt, p as Qt, q as $t, r as en, s as tn, v as Y, w as nn, x as rn, y as an, z as on } from "./keys-BTpmg2Tt.js";
7
+ import { t as X } from "./logger-Tj0RPskW.js";
8
+ import { t as Z } from "./useI18n-CbVubQhM.js";
9
+ import { i as sn, r as cn, s as ln, t as un } from "./usePopoverPosition-C829ps5i.js";
10
+ import { r as dn, t as fn } from "./templateSettingsFields-YCFVBVYh.js";
11
+ import { At as pn, Dt as mn, Ht as hn, Ot as gn, V as _n, Vt as vn, X as yn, d as bn, f as xn, ht as Sn, k as Cn, nt as wn, o as Tn, vt as En, xt as Dn, y as On } from "./icons-DNX6StSs.js";
12
+ import { t as kn } from "./LoadingTrack-BIcL4NiY.js";
13
+ import { t as An } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
+ import { t as jn } from "./useEditorRoot-CR5GjJD6.js";
15
+ import "./useCloudI18n-AVXhzbhQ.js";
16
+ import { t as Mn } from "./useMergeTag-B0KryMj8.js";
17
+ import { t as Nn } from "./useLogicTag-B49Nc53Y.js";
18
+ import { t as Pn } from "./sanitizeRichTextHtml-DeISfLFr.js";
19
+ import { t as Fn } from "./readableTextColor-f8Kykfnh.js";
20
+ //#region src/utils/activeEditorTracker.ts
21
+ var In = /* @__PURE__ */ new Set(), Q = 0, Ln = 0;
22
+ function Rn() {
23
+ let e = ++Ln;
24
+ return In.add(e), Q === 0 && (Q = e), {
25
+ id: e,
26
+ isActive: () => In.size <= 1 || Q === e,
27
+ claim: () => {
28
+ Q = e;
29
+ },
30
+ dispose: () => {
31
+ if (In.delete(e), Q === e) {
32
+ let e = Array.from(In);
33
+ Q = e[e.length - 1] ?? 0;
34
+ }
35
+ }
36
+ };
37
+ }
38
+ //#endregion
39
+ //#region src/composables/usePreviewResolution.ts
40
+ var zn = 500;
41
+ function Bn(t) {
42
+ let n = typeof t.resolvePreview == "function", r = e(null), i = e(!1), a = e(!1), o = 0, s = null;
43
+ function c() {
44
+ s !== null && (clearTimeout(s), s = null);
45
+ }
46
+ async function l() {
47
+ let e = t.resolvePreview;
48
+ if (!e) return;
49
+ let n = ++o;
50
+ i.value = !0;
51
+ let s = {
52
+ content: V(t.getContent()),
53
+ ...t.getRecipient?.() === void 0 ? {} : { recipient: t.getRecipient() }
54
+ };
55
+ try {
56
+ let t = await e(s);
57
+ if (n !== o) return;
58
+ if (!Re(t)) {
59
+ a.value = !0;
60
+ return;
61
+ }
62
+ r.value = t, a.value = !1;
63
+ } catch {
64
+ if (n !== o) return;
65
+ a.value = !0;
66
+ } finally {
67
+ n === o && (i.value = !1);
68
+ }
69
+ }
70
+ function u() {
71
+ n && (c(), r.value === null ? l() : s = setTimeout(() => {
72
+ s = null, l();
73
+ }, zn));
74
+ }
75
+ return p(() => [t.isActive(), t.getRecipient?.()], ([e]) => {
76
+ e ? u() : (c(), o++, i.value = !1, r.value = null, a.value = !1);
77
+ }, { immediate: !0 }), h(() => {
78
+ c(), o++;
79
+ }), {
80
+ isConfigured: n,
81
+ content: k(() => r.value ?? t.getContent()),
82
+ isResolving: i,
83
+ isInitialResolve: k(() => i.value && r.value === null),
84
+ hasFailed: a,
85
+ supersedesSamples: k(() => n)
86
+ };
87
+ }
88
+ //#endregion
89
+ //#region src/composables/useMergeTagPicker.ts
90
+ function Vn() {
91
+ let t = e(!1), n = e([]), r = e(null), i = null;
92
+ function a(e, a) {
93
+ if (i) {
94
+ let e = i;
95
+ i = null, e(null);
96
+ }
97
+ return n.value = e, r.value = a?.current ?? null, t.value = !0, new Promise((e) => {
98
+ i = e;
99
+ });
100
+ }
101
+ function o(e) {
102
+ let a = i;
103
+ i = null, t.value = !1, n.value = [], r.value = null, a && a(e);
104
+ }
105
+ return A() && h(() => {
106
+ if (i) {
107
+ let e = i;
108
+ i = null, e(null);
109
+ }
110
+ t.value = !1, n.value = [], r.value = null;
111
+ }), {
112
+ isOpen: t,
113
+ tags: n,
114
+ current: r,
115
+ open: a,
116
+ resolve: o
117
+ };
118
+ }
119
+ //#endregion
120
+ //#region src/composables/useLogicTagPicker.ts
121
+ function Hn() {
122
+ let t = e(!1), n = e([]), r = e([]), i = null;
123
+ function a(e, a) {
124
+ if (i) {
125
+ let e = i;
126
+ i = null, e(null);
127
+ }
128
+ return n.value = e, r.value = a, t.value = !0, new Promise((e) => {
129
+ i = e;
130
+ });
131
+ }
132
+ function o(e) {
133
+ let a = i;
134
+ i = null, t.value = !1, n.value = [], r.value = [], a && a(e);
135
+ }
136
+ return A() && h(() => {
137
+ if (i) {
138
+ let e = i;
139
+ i = null, e(null);
140
+ }
141
+ t.value = !1, n.value = [], r.value = [];
142
+ }), {
143
+ isOpen: t,
144
+ tags: n,
145
+ pairs: r,
146
+ open: a,
147
+ resolve: o
148
+ };
149
+ }
150
+ //#endregion
151
+ //#region src/composables/useTemplateLint.ts
152
+ function Un(e) {
153
+ return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 : !1;
154
+ }
155
+ var Wn = !1;
156
+ function Gn(t) {
157
+ let n = e([]), r = e(0), i = e(-1), a = p(t.content, () => {
158
+ r.value++;
159
+ }, {
160
+ deep: !0,
161
+ flush: "sync"
162
+ }), o = e(!1), s = e(!1), c = N(null), l = Un(t.options), u = null, d = !1;
163
+ l || f();
164
+ async function f() {
165
+ try {
166
+ let e = await import("./src-Bs_yxk3h.js");
167
+ if (d) return;
168
+ c.value = { lintTemplate: e.lintTemplate }, o.value = !0, m(), u = pt(t.content, m, {
169
+ debounce: t.debounce ?? 500,
170
+ deep: !0
171
+ });
172
+ } catch {
173
+ if (d) return;
174
+ s.value = !0, Wn || (Wn = !0, X.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
175
+ }
176
+ }
177
+ function m() {
178
+ if (!c.value) return;
179
+ let e = c.value.lintTemplate(t.content.value, t.options);
180
+ i.value = r.value, n.value = e;
181
+ }
182
+ let h = p(() => t.options, () => {
183
+ c.value && m();
184
+ }, { deep: !0 });
185
+ function g(e) {
186
+ e.fix && e.fix.apply({
187
+ updateBlock: t.updateBlock,
188
+ updateSettings: t.updateSettings,
189
+ removeBlock: t.removeBlock
190
+ });
191
+ }
192
+ function _() {
193
+ d = !0, u?.(), a(), h();
194
+ }
195
+ return {
196
+ issues: n,
197
+ contentVersion: r,
198
+ lintVersion: i,
199
+ ready: o,
200
+ unavailable: s,
201
+ applyFix: g,
202
+ destroy: _
203
+ };
204
+ }
205
+ //#endregion
206
+ //#region src/composables/useKeyboardReorder.ts
207
+ function Kn(t, n, r = []) {
208
+ let i = e(null), a = e(""), o = null;
209
+ function s(e) {
210
+ let n = t.content.value.blocks, r = n.findIndex((t) => t.id === e);
211
+ if (r !== -1) return {
212
+ index: r,
213
+ total: n.length
214
+ };
215
+ for (let t of n) {
216
+ if (t.type !== "section") continue;
217
+ let n = t;
218
+ for (let t = 0; t < n.children.length; t++) {
219
+ let r = n.children[t], i = r.findIndex((t) => t.id === e);
220
+ if (i !== -1) return {
221
+ index: i,
222
+ total: r.length,
223
+ sectionId: n.id,
224
+ columnIndex: t
225
+ };
226
+ }
227
+ }
228
+ return null;
229
+ }
230
+ function c(e) {
231
+ let i = s(e);
232
+ if (!i) return "";
233
+ let a = (i.sectionId ? l(i.sectionId, i.columnIndex ?? 0) : t.content.value.blocks)?.[i.index];
234
+ return a ? ct(a, n.t, r) : "";
235
+ }
236
+ function l(e, n) {
237
+ return t.content.value.blocks.find((t) => t.id === e && t.type === "section")?.children[n] ?? null;
238
+ }
239
+ function u(e) {
240
+ a.value = "", queueMicrotask(() => {
241
+ a.value = e;
242
+ });
243
+ }
244
+ function d(e) {
245
+ return i.value === e;
246
+ }
247
+ function f(e) {
248
+ let t = s(e);
249
+ t && (i.value = e, o = t, u(n.format(n.t.blockActions.lifted, {
250
+ block: c(e),
251
+ position: String(t.index + 1),
252
+ total: String(t.total)
253
+ })));
254
+ }
255
+ function p(e, r) {
256
+ let i = s(e);
257
+ if (!i) return;
258
+ let a = i.index + r;
259
+ a < 0 || a >= i.total || (t.moveBlock(e, a, i.sectionId, i.columnIndex), u(n.format(n.t.blockActions.moved, {
260
+ block: c(e),
261
+ position: String(a + 1),
262
+ total: String(i.total)
263
+ })));
264
+ }
265
+ function m(e) {
266
+ p(e, -1);
267
+ }
268
+ function h(e) {
269
+ p(e, 1);
270
+ }
271
+ function g(e) {
272
+ let t = s(e);
273
+ t && u(n.format(n.t.blockActions.dropped, {
274
+ block: c(e),
275
+ position: String(t.index + 1),
276
+ total: String(t.total)
277
+ })), i.value = null, o = null;
278
+ }
279
+ function _() {
280
+ let e = i.value;
281
+ if (e && o) {
282
+ let r = s(e);
283
+ r && (r && (r.sectionId !== o.sectionId || r.columnIndex !== o.columnIndex) || r && r.index !== o.index) && t.moveBlock(e, o.index, o.sectionId, o.columnIndex), u(n.format(n.t.blockActions.cancelled, {
284
+ block: c(e),
285
+ position: String(o.index + 1)
286
+ }));
287
+ }
288
+ i.value = null, o = null;
289
+ }
290
+ return {
291
+ liftedBlockId: i,
292
+ announcement: a,
293
+ isLifted: d,
294
+ lift: f,
295
+ cancel: _,
296
+ moveUp: m,
297
+ moveDown: h,
298
+ drop: g
299
+ };
300
+ }
301
+ //#endregion
302
+ //#region src/composables/useUiTheme.ts
303
+ function qn(e) {
304
+ let t = mt("(prefers-color-scheme: dark)");
305
+ return { resolvedTheme: k(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
306
+ }
307
+ //#endregion
308
+ //#region src/composables/useThemeStyles.ts
309
+ var Jn = {
310
+ bg: "--tpl-bg",
311
+ bgElevated: "--tpl-bg-elevated",
312
+ bgHover: "--tpl-bg-hover",
313
+ bgActive: "--tpl-bg-active",
314
+ border: "--tpl-border",
315
+ borderLight: "--tpl-border-light",
316
+ text: "--tpl-text",
317
+ textMuted: "--tpl-text-muted",
318
+ textDim: "--tpl-text-dim",
319
+ primary: "--tpl-primary",
320
+ primaryHover: "--tpl-primary-hover",
321
+ primaryLight: "--tpl-primary-light",
322
+ secondary: "--tpl-secondary",
323
+ secondaryHover: "--tpl-secondary-hover",
324
+ secondaryLight: "--tpl-secondary-light",
325
+ success: "--tpl-success",
326
+ successLight: "--tpl-success-light",
327
+ warning: "--tpl-warning",
328
+ warningLight: "--tpl-warning-light",
329
+ danger: "--tpl-danger",
330
+ dangerLight: "--tpl-danger-light",
331
+ canvasBg: "--tpl-canvas-bg"
332
+ };
333
+ function Yn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
334
+ return { themeStyles: k(() => {
335
+ let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
336
+ if (a) for (let [e, t] of Object.entries(Jn)) {
337
+ let n = a[e];
338
+ n && (r[t] = n);
339
+ }
340
+ return n && Object.assign(r, n()), r;
341
+ }) };
342
+ }
343
+ //#endregion
344
+ //#region src/composables/useBlockRegistry.ts
345
+ function Xn() {
346
+ let e = N(/* @__PURE__ */ new Map());
347
+ function t(t, n) {
348
+ e.value.set(t, n), _(e);
349
+ }
350
+ function n(t, n) {
351
+ let r = `custom:${t.type}`;
352
+ e.value.set(r, {
353
+ component: n,
354
+ createBlock: () => ce(t),
355
+ definition: t
356
+ }), _(e);
357
+ }
358
+ function r(t) {
359
+ if (t.type === "custom") {
360
+ let n = `custom:${t.customType}`;
361
+ return e.value.get(n)?.component;
362
+ }
363
+ return e.value.get(t.type)?.component;
364
+ }
365
+ function i(t) {
366
+ return e.value.get(t)?.createBlock();
367
+ }
368
+ function a(t) {
369
+ let n = `custom:${t}`;
370
+ return e.value.get(n)?.definition;
371
+ }
372
+ function o(e) {
373
+ return `<div style="color: var(--tpl-text-muted); padding: 16px; text-align: center; border: 1px dashed var(--tpl-border); border-radius: var(--tpl-radius-sm); font-family: var(--tpl-font-family); font-size: 14px;">${e}</div>`;
374
+ }
375
+ async function s(e) {
376
+ let t = a(e.customType);
377
+ if (!t) return o("Block definition not found");
378
+ try {
379
+ let { Liquid: n } = await import("./liquid.browser-Bbt17cVz.js");
380
+ return await new n({
381
+ strictVariables: !1,
382
+ strictFilters: !1
383
+ }).parseAndRender(t.template, e.fieldValues);
384
+ } catch (t) {
385
+ return X.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
386
+ }
387
+ }
388
+ function c(t) {
389
+ return e.value.has(t);
390
+ }
391
+ return {
392
+ registerBuiltIn: t,
393
+ registerCustom: n,
394
+ getComponent: r,
395
+ createBlock: i,
396
+ getDefinition: a,
397
+ renderCustomBlock: s,
398
+ isRegistered: c
399
+ };
400
+ }
401
+ //#endregion
402
+ //#region src/composables/useCustomBlockStylesheets.ts
403
+ function Zn(e, t) {
404
+ return k(() => {
405
+ let n = Qn(e.value.blocks);
406
+ if (n.size === 0) return [];
407
+ let r = /* @__PURE__ */ new Set(), i = [];
408
+ for (let e of n) {
409
+ let n = t.getDefinition(e)?.stylesheet;
410
+ if (!n) continue;
411
+ let a = n.trim();
412
+ a === "" || r.has(a) || (r.add(a), i.push(a));
413
+ }
414
+ return i;
415
+ });
416
+ }
417
+ function Qn(e) {
418
+ let t = /* @__PURE__ */ new Set();
419
+ return $n(e, t), t;
420
+ }
421
+ function $n(e, t) {
422
+ for (let n of e) if (ze(n)) t.add(n.customType);
423
+ else if (n.type === "section") {
424
+ let e = n.children;
425
+ if (!e) continue;
426
+ for (let n of e) $n(n, t);
427
+ } else Ne(n) && $n(n.children, t);
428
+ }
429
+ //#endregion
430
+ //#region src/utils/registerBuiltInBlocks.ts
431
+ var er = [
432
+ {
433
+ type: "section",
434
+ createBlock: Ue
435
+ },
436
+ {
437
+ type: "title",
438
+ createBlock: ye
439
+ },
440
+ {
441
+ type: "paragraph",
442
+ createBlock: pe
443
+ },
444
+ {
445
+ type: "image",
446
+ createBlock: ie
447
+ },
448
+ {
449
+ type: "button",
450
+ createBlock: Ae
451
+ },
452
+ {
453
+ type: "divider",
454
+ createBlock: ue
455
+ },
456
+ {
457
+ type: "video",
458
+ createBlock: ne
459
+ },
460
+ {
461
+ type: "social",
462
+ createBlock: _e
463
+ },
464
+ {
465
+ type: "menu",
466
+ createBlock: oe
467
+ },
468
+ {
469
+ type: "table",
470
+ createBlock: he
471
+ },
472
+ {
473
+ type: "spacer",
474
+ createBlock: re
475
+ },
476
+ {
477
+ type: "html",
478
+ createBlock: ee
479
+ },
480
+ {
481
+ type: "countdown",
482
+ createBlock: se
483
+ }
484
+ ];
485
+ function tr(e, t) {
486
+ for (let n of er) {
487
+ let r = t[n.type];
488
+ r && e.registerBuiltIn(n.type, {
489
+ component: r,
490
+ createBlock: n.createBlock
491
+ });
492
+ }
493
+ }
494
+ //#endregion
495
+ //#region src/utils/resolveHtmlBlockPreview.ts
496
+ function nr(e) {
497
+ return typeof e == "boolean" ? e : e?.enabled ?? !1;
498
+ }
499
+ //#endregion
500
+ //#region src/utils/collectOffPaletteDefaults.ts
501
+ function rr(e) {
502
+ return typeof e == "object" && !!e && !Array.isArray(e);
503
+ }
504
+ function ir(e, t, n) {
505
+ let r = new Set(e.map((e) => cn(e))), i = [], a = (e, t) => {
506
+ for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(cn(o)) && i.push(`${t}.${n}: ${o}`) : rr(o) && a(o, `${t}.${n}`);
507
+ }, o = t;
508
+ for (let [e, t] of Object.entries(be)) {
509
+ let n = o?.[e];
510
+ a({
511
+ ...t,
512
+ ...rr(n) ? n : {}
513
+ }, e);
514
+ }
515
+ return a({
516
+ ...xe,
517
+ ...n ?? {}
518
+ }, "template"), i;
519
+ }
520
+ //#endregion
521
+ //#region src/utils/localizedBlockDefaults.ts
522
+ function ar(e) {
523
+ return {
524
+ title: { content: `<p>${e.blockDefaults.title}</p>` },
525
+ paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
526
+ button: { text: e.blockDefaults.button }
527
+ };
528
+ }
529
+ //#endregion
530
+ //#region src/i18n/index.ts
531
+ var or = /* #__PURE__ */ Object.assign({
532
+ "./locales/ca.ts": () => import("./ca-C7mTzW1r.js"),
533
+ "./locales/de.ts": () => import("./de-DNuYQTmS.js"),
534
+ "./locales/en.ts": () => import("./en-CW71OK66.js"),
535
+ "./locales/es.ts": () => import("./es-DdK7zQfi.js"),
536
+ "./locales/fr.ts": () => import("./fr-Dz5Bgb7-.js"),
537
+ "./locales/ja.ts": () => import("./ja-Di-zJiT8.js"),
538
+ "./locales/nl.ts": () => import("./nl-CvVuHYFL.js"),
539
+ "./locales/pt-BR.ts": () => import("./pt-BR-ZhO4vgyq.js")
540
+ }), sr = /* #__PURE__ */ Object.assign({
541
+ "./locales/cloud/de.ts": () => import("./de-DBOTcDj2.js"),
542
+ "./locales/cloud/en.ts": () => import("./en-CDhWRrF_.js"),
543
+ "./locales/cloud/pt-BR.ts": () => import("./pt-BR-CHM-ZKvE.js")
544
+ });
545
+ function cr(e) {
546
+ return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
547
+ }
548
+ var lr = cr(or), ur = cr(sr);
549
+ function dr(e) {
550
+ return e.trim().replace(/_/g, "-").toLowerCase();
551
+ }
552
+ function fr(e, t) {
553
+ let n = dr(e);
554
+ return t.find((e) => dr(e) === n);
555
+ }
556
+ function pr(e) {
557
+ return dr(e).split("-")[0];
558
+ }
559
+ function mr(e, t) {
560
+ return fr(e, t) ?? fr(pr(e), t);
561
+ }
562
+ function hr(e, t) {
563
+ return mr(e, t) ?? "en";
564
+ }
565
+ async function gr(e) {
566
+ let t = or[`./locales/${hr(e, lr)}.ts`];
567
+ return (await t()).default;
568
+ }
569
+ async function _r(e) {
570
+ let t = sr[`./locales/cloud/${hr(e, ur)}.ts`];
571
+ return (await t()).default;
572
+ }
573
+ function vr(e) {
574
+ return mr(e, lr) !== void 0;
575
+ }
576
+ function yr(e) {
577
+ return mr(e, ur) !== void 0;
578
+ }
579
+ function br() {
580
+ return [...lr];
581
+ }
582
+ function xr() {
583
+ return [...ur];
584
+ }
585
+ //#endregion
586
+ //#region src/i18n/contentDefaults.ts
587
+ var $ = {
588
+ en: {
589
+ video: "Video",
590
+ days: "Days",
591
+ hours: "Hours",
592
+ minutes: "Minutes",
593
+ seconds: "Seconds",
594
+ expired: "This offer has expired"
595
+ },
596
+ de: {
597
+ video: "Video",
598
+ days: "Tage",
599
+ hours: "Stunden",
600
+ minutes: "Minuten",
601
+ seconds: "Sekunden",
602
+ expired: "Dieses Angebot ist abgelaufen"
603
+ },
604
+ es: {
605
+ video: "Vídeo",
606
+ days: "Días",
607
+ hours: "Horas",
608
+ minutes: "Minutos",
609
+ seconds: "Segundos",
610
+ expired: "Esta oferta ha expirado"
611
+ },
612
+ fr: {
613
+ video: "Vidéo",
614
+ days: "Jours",
615
+ hours: "Heures",
616
+ minutes: "Minutes",
617
+ seconds: "Secondes",
618
+ expired: "Cette offre a expiré"
619
+ },
620
+ nl: {
621
+ video: "Video",
622
+ days: "Dagen",
623
+ hours: "Uren",
624
+ minutes: "Minuten",
625
+ seconds: "Seconden",
626
+ expired: "Deze aanbieding is verlopen"
627
+ },
628
+ "pt-BR": {
629
+ video: "Vídeo",
630
+ days: "Dias",
631
+ hours: "Horas",
632
+ minutes: "Minutos",
633
+ seconds: "Segundos",
634
+ expired: "Esta oferta expirou"
635
+ },
636
+ ca: {
637
+ video: "Vídeo",
638
+ days: "Dies",
639
+ hours: "Hores",
640
+ minutes: "Minuts",
641
+ seconds: "Segons",
642
+ expired: "Aquesta oferta ha caducat"
643
+ },
644
+ ja: {
645
+ video: "動画",
646
+ days: "日",
647
+ hours: "時間",
648
+ minutes: "分",
649
+ seconds: "秒",
650
+ expired: "このオファーは終了しました"
651
+ }
652
+ }, Sr = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
653
+ function Cr(e) {
654
+ if (!e) return $.en;
655
+ let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Sr.get(t);
656
+ if (n) return $[n];
657
+ let r = Sr.get(pr(t));
658
+ return r ? $[r] : $.en;
659
+ }
660
+ function wr(e) {
661
+ let t = Cr(e);
662
+ return {
663
+ video: { alt: t.video },
664
+ countdown: {
665
+ labelDays: t.days,
666
+ labelHours: t.hours,
667
+ labelMinutes: t.minutes,
668
+ labelSeconds: t.seconds,
669
+ expiredMessage: t.expired
670
+ }
671
+ };
672
+ }
673
+ //#endregion
674
+ //#region src/utils/collectColorFieldIssues.ts
675
+ function Tr(e, t) {
676
+ let n = [], r = (r, i) => {
677
+ let a = $e(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
678
+ if (a.invalidPresets.length > 0 && n.push({
679
+ id: s("invalid-presets"),
680
+ 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." : "")
681
+ }), a.emptyPresets && n.push({
682
+ id: s("empty-presets"),
683
+ message: `${o}: presets is empty — a field palette can only narrow the editor's, so an empty list is ignored and the field inherits colors.presets.`
684
+ }), a.allowCustomIgnored && n.push({
685
+ id: s("allow-custom-ignored"),
686
+ message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
687
+ }), !a.allowCustom && a.presets.length > 0) {
688
+ let e = r.default ?? "", t = new Set(a.presets.map((e) => cn(e)));
689
+ e !== "" && !t.has(cn(e)) && n.push({
690
+ id: s("off-palette-default"),
691
+ 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.`
692
+ });
693
+ }
694
+ };
695
+ for (let t of e.fields) if (t.type === "color") r(t, t.key);
696
+ else if (t.type === "repeatable") for (let e of t.fields) e.type === "color" && r(e, `${t.key}[].${e.key}`);
697
+ return n;
698
+ }
699
+ //#endregion
700
+ //#region src/utils/keyboardShortcuts.ts
701
+ function Er(e) {
702
+ for (let t of e.composedPath()) {
703
+ if (!(t instanceof HTMLElement)) continue;
704
+ if (t.isContentEditable) return !0;
705
+ let e = t.tagName;
706
+ if (e === "INPUT" || e === "TEXTAREA" || e === "SELECT") return !0;
707
+ }
708
+ return !1;
709
+ }
710
+ function Dr(e, t) {
711
+ let n = e.metaKey || e.ctrlKey;
712
+ if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
713
+ else if (n && e.key.toLowerCase() === "z") {
714
+ if (Er(e)) return;
715
+ e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
716
+ } else {
717
+ if (t.isPicking?.() && !Er(e)) {
718
+ if (e.key === "Escape") {
719
+ e.preventDefault(), t.onCancelPick?.();
720
+ return;
721
+ }
722
+ if (e.key === "Enter") {
723
+ e.preventDefault(), t.onConfirmPick?.();
724
+ return;
725
+ }
726
+ if (e.key === "Delete" || e.key === "Backspace") {
727
+ e.preventDefault();
728
+ return;
729
+ }
730
+ }
731
+ e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Er(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
732
+ }
733
+ }
734
+ //#endregion
735
+ //#region src/utils/blockComponentResolver.ts
736
+ function Or(e, t) {
737
+ let n = { fontFamily: t(e.fontFamily) };
738
+ return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
739
+ }
740
+ function kr(e, t, n) {
741
+ if (t) {
742
+ let n = t.getComponent(e);
743
+ if (n) return n;
744
+ }
745
+ return n[e.type] ?? null;
746
+ }
747
+ var Ar = "--tpl-block-bg-layer", jr = "tpl-has-bg-image";
748
+ function Mr(e, t) {
749
+ if (t === null) return {};
750
+ let n = te(e);
751
+ if (n === null) return {};
752
+ let r = t?.trim(), i = r ? de(r) : n.url;
753
+ return {
754
+ backgroundImage: `url("${i}")`,
755
+ backgroundSize: n.size,
756
+ backgroundPosition: n.position,
757
+ backgroundRepeat: n.repeat,
758
+ [Ar]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
759
+ };
760
+ }
761
+ function Nr(e) {
762
+ return e && Ar in e ? jr : void 0;
763
+ }
764
+ var Pr = {
765
+ top: "flex-start",
766
+ middle: "center",
767
+ bottom: "flex-end"
768
+ };
769
+ function Fr(e, t) {
770
+ let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Ir(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
771
+ return {
772
+ display: "flex",
773
+ flexDirection: "column",
774
+ justifyContent: Pr[e.verticalAlign],
775
+ boxSizing: "border-box",
776
+ ...n
777
+ };
778
+ }
779
+ function Ir(e, t) {
780
+ return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
781
+ }
782
+ function Lr(e, t = {}) {
783
+ if (e.type === "wrapper") return {};
784
+ let { padding: n, backgroundColor: r } = e.styles, i = {
785
+ padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
786
+ backgroundColor: r || "transparent"
787
+ };
788
+ if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? We.paragraphGap : We.paragraphGap}px`), e.type === "section") {
789
+ let n = ge(e.borderRadius);
790
+ n !== null && (i.borderRadius = n);
791
+ let r = z(e);
792
+ r?.applied && e.backgroundImage ? (Object.assign(i, Fr(r, t.heroBoxWidth)), Object.assign(i, Mr({
793
+ ...e.backgroundImage,
794
+ size: "cover",
795
+ repeat: !1
796
+ }, t.backgroundImageUrl))) : (Object.assign(i, zr(e.border)), Object.assign(i, Mr(e.backgroundImage, t.backgroundImageUrl)));
797
+ }
798
+ return i;
799
+ }
800
+ function Rr(e, t, n, r) {
801
+ return e.type === "section" ? Lr(e, {
802
+ backgroundImageUrl: Qe(t, e.backgroundImage, n),
803
+ heroBoxWidth: r
804
+ }) : Lr(e);
805
+ }
806
+ function zr(e) {
807
+ let t = {};
808
+ for (let [n, r] of Object.entries(W(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
809
+ return t;
810
+ }
811
+ function Br(e, t = {}) {
812
+ if (e.type !== "section" || !e.wrapper) return null;
813
+ let n = e.wrapper, r = {};
814
+ n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && (r.padding = `${n.padding.top}px ${n.padding.right}px ${n.padding.bottom}px ${n.padding.left}px`);
815
+ let i = ge(n.borderRadius);
816
+ return i !== null && (r.borderRadius = i), Object.assign(r, Mr(n.backgroundImage, t.backgroundImageUrl)), r;
817
+ }
818
+ function Vr(e, t = {}) {
819
+ if (e.type !== "wrapper") return null;
820
+ let n = {};
821
+ if (e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
822
+ let t = e.styles.padding;
823
+ n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
824
+ }
825
+ return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Mr(e.backgroundImage, t.backgroundImageUrl)), n;
826
+ }
827
+ //#endregion
828
+ //#region src/utils/mergeTagLabelSegments.ts
829
+ function Hr(e, t, n, r = !1) {
830
+ if (!e) return [];
831
+ let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
832
+ for (; (s = i.exec(e)) !== null;) {
833
+ s.index > o && a.push({
834
+ type: "text",
835
+ value: e.slice(o, s.index)
836
+ });
837
+ let i = s[0];
838
+ if (Te(i, n)) {
839
+ let e = r ? Fe(i, t) : void 0;
840
+ a.push(e === void 0 ? {
841
+ type: "tag",
842
+ value: Se(i, t)
843
+ } : {
844
+ type: "text",
845
+ value: e
846
+ });
847
+ } else Be(i, n) ? a.push({
848
+ type: "tag",
849
+ value: ke(i, n)
850
+ }) : a.push({
851
+ type: "text",
852
+ value: i
853
+ });
854
+ o = s.index + i.length;
855
+ }
856
+ return o < e.length && a.push({
857
+ type: "text",
858
+ value: e.slice(o)
859
+ }), a;
860
+ }
861
+ //#endregion
862
+ //#region src/components/MergeTagPreviewText.vue
863
+ var Ur = n({
864
+ name: "MergeTagPreviewText",
865
+ props: { text: {
866
+ type: String,
867
+ required: !0
868
+ } },
869
+ setup(e) {
870
+ let t = r(q, xt), n = r(kt, Pe.liquid), i = r(At, null), a = k(() => Hr(e.text, t.value, n, i?.value ?? !1));
871
+ return () => a.value.map((e, t) => e.type === "tag" ? d("span", {
872
+ key: t,
873
+ class: "tpl-merge-tag-label"
874
+ }, e.value) : e.value);
875
+ }
876
+ }), Wr = ["href"], Gr = /* @__PURE__ */ n({
877
+ __name: "ButtonBlock",
878
+ props: {
879
+ block: {},
880
+ viewport: {}
881
+ },
882
+ setup(e) {
883
+ let t = e, n = K(Y, "ButtonBlock"), r = k(() => {
884
+ let e = {
885
+ display: "inline-block",
886
+ padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
887
+ backgroundColor: t.block.backgroundColor,
888
+ color: t.block.textColor,
889
+ fontSize: `${t.block.fontSize}px`,
890
+ fontWeight: "bold",
891
+ textDecoration: "none",
892
+ borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : ge(t.block.borderRadius) ?? "0px",
893
+ textAlign: "center"
894
+ };
895
+ return Object.assign(e, zr(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
896
+ }), i = k(() => ({ textAlign: t.block.align ?? "center" }));
897
+ return (t, n) => (l(), g("div", { style: F(i.value) }, [D("a", {
898
+ href: e.block.url || "#",
899
+ style: F(r.value),
900
+ class: "tpl:cursor-default",
901
+ onClick: n[0] ||= T(() => {}, ["prevent"])
902
+ }, [I(Ur, { text: e.block.text }, null, 8, ["text"])], 12, Wr)], 4));
903
+ }
904
+ }), Kr = ["innerHTML"], qr = [
905
+ "src",
906
+ "width",
907
+ "height"
908
+ ], Jr = /* @__PURE__ */ n({
909
+ __name: "CustomBlockIcon",
910
+ props: {
911
+ icon: {},
912
+ size: {}
913
+ },
914
+ setup(e) {
915
+ let t = e, n = k(() => t.size ?? 20), r = k(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = k(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
916
+ return (t, a) => r.value ? (l(), g("span", {
917
+ key: 0,
918
+ class: "tpl:inline-flex tpl:items-center tpl:justify-center",
919
+ style: F({
920
+ width: `${n.value}px`,
921
+ height: `${n.value}px`
922
+ }),
923
+ innerHTML: e.icon
924
+ }, null, 12, Kr)) : i.value ? (l(), g("img", {
925
+ key: 1,
926
+ src: e.icon,
927
+ width: n.value,
928
+ height: n.value,
929
+ class: "tpl:inline-block",
930
+ alt: ""
931
+ }, null, 8, qr)) : (l(), S(O(vn), {
932
+ key: 2,
933
+ size: n.value,
934
+ "stroke-width": 1.5
935
+ }, null, 8, ["size"]));
936
+ }
937
+ }), Yr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
938
+ function Xr(e, t) {
939
+ let n = jn(), r = null, i = null, a = null;
940
+ function o() {
941
+ return e.value ? Array.from(e.value.querySelectorAll(Yr)).filter((e) => e.offsetParent !== null) : [];
942
+ }
943
+ function s(e) {
944
+ if (e.key !== "Tab") return;
945
+ let t = o();
946
+ if (t.length === 0) return;
947
+ let r = t[0], i = t[t.length - 1];
948
+ e.shiftKey ? n.activeElement === r && (e.preventDefault(), i.focus()) : n.activeElement === i && (e.preventDefault(), r.focus());
949
+ }
950
+ function c() {
951
+ let t = i !== null || a !== null;
952
+ t && l({ restoreFocus: !1 }), t || (r = n.activeElement), a = requestAnimationFrame(() => {
953
+ a = null;
954
+ let t = o();
955
+ t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
956
+ }), i = G(e, "keydown", s);
957
+ }
958
+ function l(e = {}) {
959
+ let t = e.restoreFocus !== !1;
960
+ a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
961
+ }
962
+ let u = p([t, e], ([e, t]) => {
963
+ e && t ? c() : l();
964
+ }, { flush: "post" });
965
+ h(() => {
966
+ u(), l();
967
+ });
968
+ }
969
+ //#endregion
970
+ //#region src/composables/useEmoji.ts
971
+ function Zr() {
972
+ let [e, t] = ft(!1), n = N([]), r = !1;
973
+ h(() => {
974
+ r = !0;
975
+ }), p(e, async (e) => {
976
+ if (e && n.value.length === 0) {
977
+ let { emojiCategories: e } = await import("./emojiData-6m0DBh7O.js");
978
+ if (r) return;
979
+ n.value = e;
980
+ }
981
+ });
982
+ function i() {
983
+ t();
984
+ }
985
+ function a() {
986
+ e.value = !1;
987
+ }
988
+ return {
989
+ categories: n,
990
+ isOpen: e,
991
+ toggle: i,
992
+ close: a
993
+ };
994
+ }
995
+ //#endregion
996
+ //#region src/composables/useFonts.ts
997
+ var Qr = [
998
+ {
999
+ value: "Arial",
1000
+ label: "Arial"
1001
+ },
1002
+ {
1003
+ value: "Helvetica",
1004
+ label: "Helvetica"
1005
+ },
1006
+ {
1007
+ value: "Georgia",
1008
+ label: "Georgia"
1009
+ },
1010
+ {
1011
+ value: "Times New Roman",
1012
+ label: "Times New Roman"
1013
+ },
1014
+ {
1015
+ value: "Verdana",
1016
+ label: "Verdana"
1017
+ },
1018
+ {
1019
+ value: "Trebuchet MS",
1020
+ label: "Trebuchet MS"
1021
+ },
1022
+ {
1023
+ value: "Courier New",
1024
+ label: "Courier New"
1025
+ }
1026
+ ], $r = "Arial, sans-serif";
1027
+ function ei(e) {
1028
+ if (e === void 0 || e === !0) return [...Qr];
1029
+ if (e === !1) return [];
1030
+ let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
1031
+ for (let i of e) {
1032
+ let e = i.toLowerCase(), a = Qr.find((t) => t.value.toLowerCase() === e);
1033
+ a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), X.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Qr.map((e) => e.value).join(", ")}.`));
1034
+ }
1035
+ return t;
1036
+ }
1037
+ function ti(t) {
1038
+ let n = e(t?.customFonts ?? []), r = e(!1), i = ei(t?.builtIns), a = k(() => t?.defaultFallback ?? $r), o = k(() => {
1039
+ let e = [...i], t = n.value.map((e) => ({
1040
+ value: e.name,
1041
+ label: e.name,
1042
+ isCustom: !0
1043
+ })), r = [...e, ...t];
1044
+ return r.sort((e, t) => e.label.localeCompare(t.label)), r;
1045
+ });
1046
+ function s(e) {
1047
+ return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1048
+ }
1049
+ let c = t?.defaultFont ?? $r.split(",")[0].trim();
1050
+ s(c) || X.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.`);
1051
+ function l() {
1052
+ if (t?.defaultFont && s(t.defaultFont)) {
1053
+ let e = o.value.find((e) => e.label.toLowerCase() === t.defaultFont.toLowerCase() || e.value.toLowerCase().startsWith(t.defaultFont.toLowerCase()));
1054
+ if (e) return e.value;
1055
+ }
1056
+ return $r;
1057
+ }
1058
+ let u = k(() => l());
1059
+ function d(e) {
1060
+ return He(e, {
1061
+ customFonts: n.value,
1062
+ defaultFallback: a.value
1063
+ });
1064
+ }
1065
+ let f = [], p = !1;
1066
+ async function m() {
1067
+ if (n.value.length === 0) {
1068
+ p || (r.value = !0);
1069
+ return;
1070
+ }
1071
+ let e = n.value.map(async (e) => {
1072
+ try {
1073
+ if (document.querySelector(`link[data-custom-font="${CSS.escape(e.name)}"]`)) return;
1074
+ let t = document.createElement("link");
1075
+ t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), f.push(t), await new Promise((n, r) => {
1076
+ t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
1077
+ });
1078
+ } catch (t) {
1079
+ X.warn(`Failed to load custom font "${e.name}":`, t);
1080
+ }
1081
+ });
1082
+ await Promise.allSettled(e), !p && (r.value = !0);
1083
+ }
1084
+ function g() {
1085
+ for (let e of f) e.remove();
1086
+ f.length = 0;
1087
+ }
1088
+ return A() && h(() => {
1089
+ p = !0, g();
1090
+ }), {
1091
+ fonts: o,
1092
+ defaultFont: u,
1093
+ defaultFallback: a,
1094
+ customFonts: n,
1095
+ isLoaded: r,
1096
+ loadCustomFonts: m,
1097
+ cleanupFontLinks: g,
1098
+ resolveFontFamily: d,
1099
+ getDefaultFont: l
1100
+ };
1101
+ }
1102
+ //#endregion
1103
+ //#region src/utils/mergeTagNodeSpec.ts
1104
+ function ni(e, t, n) {
1105
+ return Be(e, n) ? {
1106
+ type: "logicMergeTagNode",
1107
+ attrs: {
1108
+ value: e,
1109
+ keyword: ke(e, n)
1110
+ }
1111
+ } : {
1112
+ type: "mergeTagNode",
1113
+ attrs: {
1114
+ label: t,
1115
+ value: e
1116
+ }
1117
+ };
1118
+ }
1119
+ //#endregion
1120
+ //#region src/utils/insertLogicTag.ts
1121
+ function ri(e) {
1122
+ return "before" in e && "after" in e;
1123
+ }
1124
+ function ii(e, t, n) {
1125
+ if (!ri(t)) {
1126
+ e.chain().focus().insertContent(ni(t.value, t.label, n)).run();
1127
+ return;
1128
+ }
1129
+ let r = ni(t.before, t.label, n), i = ni(t.after, t.label, n), { from: a, to: o } = e.state.selection;
1130
+ a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
1131
+ }
1132
+ //#endregion
1133
+ //#region src/utils/linkColorExtension.ts
1134
+ function ai(e) {
1135
+ if (!e) return null;
1136
+ let t = e.trim();
1137
+ 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;
1138
+ }
1139
+ function oi(e) {
1140
+ return e.extend({ addAttributes() {
1141
+ return {
1142
+ ...this.parent?.(),
1143
+ color: {
1144
+ default: null,
1145
+ parseHTML: (e) => ai(sn(e.style.color)),
1146
+ renderHTML: (e) => {
1147
+ let t = ai(e.color);
1148
+ return t ? { style: `color: ${t}` } : {};
1149
+ }
1150
+ }
1151
+ };
1152
+ } });
1153
+ }
1154
+ //#endregion
1155
+ //#region src/composables/useRichTextLinkDialog.ts
1156
+ function si(t, n = Pe.liquid) {
1157
+ let r = e(!1), i = e(""), a = e(""), o = e(null);
1158
+ Xr(o, r);
1159
+ function s() {
1160
+ let e = t.value?.getAttributes("link") ?? {};
1161
+ i.value = e.href || "", a.value = e.color || "", r.value = !0;
1162
+ }
1163
+ function c() {
1164
+ if (i.value) {
1165
+ let e = f(i.value);
1166
+ if (e !== null) {
1167
+ let n = ai(a.value), r = t.value?.chain().focus().extendMarkRange("link").setLink({ href: e }).updateAttributes("link", { color: n });
1168
+ n && typeof t.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
1169
+ }
1170
+ }
1171
+ m();
1172
+ }
1173
+ let l = /* @__PURE__ */ new Set([
1174
+ "http",
1175
+ "https",
1176
+ "mailto",
1177
+ "tel",
1178
+ "ftp",
1179
+ "ftps",
1180
+ "sms",
1181
+ "xmpp",
1182
+ "cid"
1183
+ ]), u = /^(?:\/|\.{1,2}\/|\?)/;
1184
+ function d(e) {
1185
+ return RegExp(`^(?:${n.value.source})`).test(e);
1186
+ }
1187
+ function f(e) {
1188
+ let t = e.trim();
1189
+ if (!t) return null;
1190
+ if (t.startsWith("#")) return t;
1191
+ if (t.startsWith("//")) return `https:${t}`;
1192
+ if (u.test(t)) return t;
1193
+ let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
1194
+ return n ? l.has(n[1].toLowerCase()) ? t : null : d(t) ? t : `https://${t}`;
1195
+ }
1196
+ function p() {
1197
+ t.value?.chain().focus().extendMarkRange("link").unsetLink().run(), m();
1198
+ }
1199
+ function m() {
1200
+ r.value = !1, i.value = "", a.value = "";
1201
+ }
1202
+ function h(e) {
1203
+ e.key === "Enter" ? (e.preventDefault(), c()) : e.key === "Escape" && m();
1204
+ }
1205
+ return {
1206
+ showLinkDialog: r,
1207
+ linkUrl: i,
1208
+ linkColor: a,
1209
+ linkDialogRef: o,
1210
+ openLinkDialog: s,
1211
+ insertLink: c,
1212
+ removeLink: p,
1213
+ closeLinkDialog: m,
1214
+ handleLinkKeydown: h
1215
+ };
1216
+ }
1217
+ //#endregion
1218
+ //#region src/composables/useRichTextEditor.ts
1219
+ function ci(t) {
1220
+ let n = r(J, null), { mergeTags: i, canRequestMergeTag: a, isRequesting: s, requestMergeTag: c, syntax: l, autocomplete: u } = Mn(), { canInsertLogicTag: d, isRequesting: f, requestLogicTag: m } = Nn(), h = r(Lt, null), g = (o(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = we(l), v = N(null), y = () => ae(n?.content?.value?.settings ?? { locale: "en" });
1221
+ p(y, (e) => {
1222
+ let t = v.value?.view.dom;
1223
+ t && t.setAttribute("dir", e);
1224
+ });
1225
+ let { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = si(v, l), { start: A, stop: j } = ut(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), M = N(null), P = e(!0), F = e(null), I = !1, L = null;
1226
+ async function R() {
1227
+ F.value = null, P.value = !0;
1228
+ try {
1229
+ let { TiptapEditor: e, EC: r, extensions: a } = await t.loadExtensions({
1230
+ mergeTags: i,
1231
+ syntax: l,
1232
+ triggerChar: _,
1233
+ autocompleteEnabled: u,
1234
+ suggestionEmptyText: g
1235
+ });
1236
+ if (I) return;
1237
+ M.value = r;
1238
+ let o = /* @__PURE__ */ new Map();
1239
+ a.forEach((e, t) => o.set(e.name, t));
1240
+ let s = new e({
1241
+ extensions: a.filter((e, t) => o.get(e.name) === t),
1242
+ content: t.blockContent(),
1243
+ editable: !0,
1244
+ editorProps: { attributes: { dir: y() } },
1245
+ onUpdate: ({ editor: e }) => {
1246
+ I || n && (L = e.getHTML(), n.updateBlock(t.blockId(), { content: L }));
1247
+ }
1248
+ });
1249
+ if (I) {
1250
+ s.destroy();
1251
+ return;
1252
+ }
1253
+ v.value = s, P.value = !1, A();
1254
+ } catch (e) {
1255
+ if (I) return;
1256
+ X.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
1257
+ }
1258
+ }
1259
+ function z() {
1260
+ v.value?.destroy(), v.value = null, R();
1261
+ }
1262
+ R();
1263
+ let B = p(() => t.blockContent(), (e) => {
1264
+ v.value && e !== L && (L = e, v.value.getHTML() !== e && v.value.commands.setContent(e, { emitUpdate: !1 }));
1265
+ });
1266
+ function V(e) {
1267
+ if (s.value || f.value) return;
1268
+ let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
1269
+ if (!r) return;
1270
+ t.onClickOutsideSideEffect?.(r);
1271
+ let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
1272
+ r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
1273
+ }
1274
+ G(document, "mousedown", V), w(() => {
1275
+ I = !0, B(), j(), v.value?.destroy();
1276
+ });
1277
+ async function H() {
1278
+ let e = await c();
1279
+ I || (e && v.value ? v.value.chain().focus().insertMergeTag({
1280
+ label: e.label,
1281
+ value: e.value
1282
+ }).run() : v.value?.commands.focus());
1283
+ }
1284
+ async function U() {
1285
+ let e = await m();
1286
+ I || (e && v.value ? ii(v.value, e, l) : v.value?.commands.focus());
1287
+ }
1288
+ return {
1289
+ editor: v,
1290
+ EditorContent: M,
1291
+ isLoading: P,
1292
+ initError: F,
1293
+ retry: z,
1294
+ showLinkDialog: b,
1295
+ linkUrl: x,
1296
+ linkColor: S,
1297
+ linkDialogRef: C,
1298
+ mergeTags: i,
1299
+ canRequestMergeTag: a,
1300
+ isRequestingMergeTag: s,
1301
+ syntax: l,
1302
+ canInsertLogicTag: d,
1303
+ isRequestingLogicTag: f,
1304
+ openLinkDialog: T,
1305
+ insertLink: E,
1306
+ removeLink: D,
1307
+ closeLinkDialog: O,
1308
+ handleLinkKeydown: k,
1309
+ handleAddMergeTag: H,
1310
+ handleAddLogicTag: U
1311
+ };
1312
+ }
1313
+ //#endregion
1314
+ //#region src/composables/useSmallScreenNotice.ts
1315
+ var li = "(max-width: 767px)";
1316
+ function ui(e) {
1317
+ let t = mt(li);
1318
+ return {
1319
+ isSmallScreen: t,
1320
+ showNotice: k(() => (C(e) ?? !0) && t.value)
1321
+ };
1322
+ }
1323
+ //#endregion
1324
+ //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
1325
+ var di = { class: "tpl:w-full" }, fi = {
1326
+ key: 0,
1327
+ class: "tpl:flex tpl:box-border 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)]"
1328
+ }, pi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, mi = {
1329
+ key: 1,
1330
+ class: "tpl:flex tpl:box-border 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)]"
1331
+ }, hi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, gi = {
1332
+ key: 2,
1333
+ class: "tpl:relative"
1334
+ }, _i = ["innerHTML"], vi = {
1335
+ key: 0,
1336
+ 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]",
1337
+ style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
1338
+ }, yi = /* @__PURE__ */ n({
1339
+ __name: "CustomBlock",
1340
+ props: {
1341
+ block: {},
1342
+ viewport: {}
1343
+ },
1344
+ emits: ["fetchData"],
1345
+ setup(t, { emit: n }) {
1346
+ let i = t, a = n, { t: o } = Z(), s = r(tn, null), u = e(""), d = e(!1), f = k(() => s?.getDefinition(i.block.customType)), m = k(() => !!f.value), h = k(() => i.block), { isFetching: _, fetch: y, needsFetch: C, hasDataSource: w } = Ye({
1347
+ definition: f,
1348
+ block: h,
1349
+ onUpdate: (e, t) => {
1350
+ a("fetchData", {
1351
+ fieldValues: e,
1352
+ dataSourceFetched: t
1353
+ });
1354
+ }
1355
+ }), E = r(q, xt), A = r(At, null), j = k(() => {
1356
+ if (!A?.value) return i.block;
1357
+ let e = {};
1358
+ for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? De(n, E.value) : n;
1359
+ return {
1360
+ ...i.block,
1361
+ fieldValues: e
1362
+ };
1363
+ });
1364
+ async function M() {
1365
+ if (s) {
1366
+ d.value = !1;
1367
+ try {
1368
+ let e = await s.renderCustomBlock(j.value);
1369
+ e.includes("Template render error:") && (d.value = !0), u.value = e;
1370
+ } catch {
1371
+ d.value = !0, u.value = "";
1372
+ }
1373
+ }
1374
+ }
1375
+ let N = dt(M, 150);
1376
+ return c(() => {
1377
+ M();
1378
+ }), p(() => i.block.fieldValues, () => {
1379
+ N();
1380
+ }, { deep: !0 }), p(() => A?.value, () => {
1381
+ N();
1382
+ }), (e, t) => (l(), g("div", di, [m.value ? d.value ? (l(), g("div", mi, [I(O(bn), {
1383
+ size: 24,
1384
+ class: "tpl:text-[var(--tpl-danger)]"
1385
+ }), D("span", hi, b(O(o).customBlocks.renderError), 1)])) : (l(), g("div", gi, [D("div", { innerHTML: u.value }, null, 8, _i), O(w) && O(C) ? (l(), g("div", vi, [O(_) ? (l(), S(kn, {
1386
+ key: 1,
1387
+ class: "tpl:w-48"
1388
+ })) : (l(), g("button", {
1389
+ key: 0,
1390
+ type: "button",
1391
+ 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)]",
1392
+ onClick: t[0] ||= T((...e) => O(y) && O(y)(...e), ["stop"])
1393
+ }, [f.value?.icon ? (l(), S(Jr, {
1394
+ key: 0,
1395
+ icon: f.value.icon,
1396
+ size: 16
1397
+ }, null, 8, ["icon"])) : x("", !0), v(" " + b(f.value?.dataSource?.label || O(o).customBlocks.dataSource.fetchButton), 1)]))])) : x("", !0)])) : (l(), g("div", fi, [I(O(_n), {
1398
+ size: 24,
1399
+ class: "tpl:text-[var(--tpl-warning)]"
1400
+ }), D("span", pi, b(O(o).customBlocks.definitionNotFound), 1)]))]));
1401
+ }
1402
+ }), bi = { class: "tpl:w-full" }, xi = /* @__PURE__ */ n({
1403
+ __name: "DividerBlock",
1404
+ props: {
1405
+ block: {},
1406
+ viewport: {}
1407
+ },
1408
+ setup(e) {
1409
+ let t = e, n = k(() => ({
1410
+ borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
1411
+ width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
1412
+ margin: t.block.width === "full" ? "0" : "0 auto"
1413
+ }));
1414
+ return (e, t) => (l(), g("div", bi, [D("hr", {
1415
+ class: "tpl:m-0 tpl:border-none",
1416
+ style: F(n.value)
1417
+ }, null, 4)]));
1418
+ }
1419
+ }), Si = { class: "tpl:w-full" }, Ci = ["srcdoc", "title"], wi = {
1420
+ key: 1,
1421
+ class: "tpl:flex tpl:box-border 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)]"
1422
+ }, Ti = {
1423
+ key: 0,
1424
+ class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
1425
+ }, Ei = {
1426
+ key: 1,
1427
+ class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
1428
+ }, Di = /* @__PURE__ */ n({
1429
+ __name: "HtmlBlock",
1430
+ props: {
1431
+ block: {},
1432
+ viewport: {}
1433
+ },
1434
+ setup(t) {
1435
+ let n = t, { t: i } = Z(), a = r(Vt, !1), o = k(() => n.block.content.trim().length > 0), s = k(() => a && o.value), c = r(q, xt), u = r(At, null), d = k(() => u?.value ? De(n.block.content, c.value) : n.block.content), f = e(null), m = e(60), h = null;
1436
+ function _() {
1437
+ let e = f.value?.contentDocument;
1438
+ e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
1439
+ }
1440
+ function v() {
1441
+ h?.disconnect(), h = null, _();
1442
+ let e = f.value?.contentDocument?.documentElement;
1443
+ e && typeof ResizeObserver < "u" && (h = new ResizeObserver(() => _()), h.observe(e));
1444
+ }
1445
+ return p(s, (e) => {
1446
+ e || (h?.disconnect(), h = null);
1447
+ }), w(() => {
1448
+ h?.disconnect(), h = null;
1449
+ }), (e, t) => (l(), g("div", Si, [s.value ? (l(), g("iframe", {
1450
+ key: 0,
1451
+ ref_key: "iframeRef",
1452
+ ref: f,
1453
+ srcdoc: d.value,
1454
+ sandbox: "allow-same-origin",
1455
+ title: O(i).html.preview,
1456
+ class: "tpl:block tpl:w-full tpl:border-0",
1457
+ style: F({ height: `${m.value}px` }),
1458
+ onLoad: v
1459
+ }, null, 44, Ci)) : (l(), g("div", wi, [I(O(pn), {
1460
+ size: 24,
1461
+ class: "tpl:text-[var(--tpl-text-dim)]"
1462
+ }), o.value ? (l(), g("span", Ti, b(O(i).html.preview), 1)) : (l(), g("span", Ei, b(O(i).html.empty), 1))]))]));
1463
+ }
1464
+ }), Oi = ["data-drop-enabled"], ki = ["href"], Ai = ["src", "alt"], ji = ["src", "alt"], Mi = {
1465
+ class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
1466
+ style: { opacity: "0.7" }
1467
+ }, Ni = ["href"], Pi = ["src", "alt"], Fi = ["src", "alt"], Ii = {
1468
+ key: 4,
1469
+ class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
1470
+ }, Li = ["aria-label"], Ri = { key: 1 }, zi = /* @__PURE__ */ n({
1471
+ __name: "ImageBlock",
1472
+ props: {
1473
+ block: {},
1474
+ viewport: {}
1475
+ },
1476
+ emits: ["update"],
1477
+ setup(t, { emit: n }) {
1478
+ let r = t, i = n, { t: a } = Z(), { syntax: o } = Mn(), s = k(() => Le(r.block.src, o));
1479
+ function c(e) {
1480
+ let t = {
1481
+ src: e.url,
1482
+ ...at(rt(e.width, e.height))
1483
+ };
1484
+ e.alt && (t.alt = e.alt), i("update", t);
1485
+ }
1486
+ let u = e(), { canBrowse: d, dropEnabled: f, isUploading: p, showOverlay: m, openMediaBrowser: h } = it({
1487
+ target: u,
1488
+ blocked: s,
1489
+ apply: c
1490
+ }), _ = k(() => ({ textAlign: r.block.align })), y = k(() => {
1491
+ let e = r.block.border, t = ["left", "right"].map((t) => ve(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
1492
+ return t > 0 ? `calc(100% - ${t}px)` : "100%";
1493
+ }), C = k(() => {
1494
+ let e = r.block.align;
1495
+ return {
1496
+ maxWidth: "100%",
1497
+ width: r.block.width === "full" ? y.value : `${r.block.width}px`,
1498
+ height: r.block.height ? `${r.block.height}px` : void 0,
1499
+ borderRadius: ge(r.block.borderRadius) ?? void 0,
1500
+ ...zr(r.block.border),
1501
+ display: "block",
1502
+ marginLeft: e === "center" || e === "right" ? "auto" : void 0,
1503
+ marginRight: e === "center" ? "auto" : void 0
1504
+ };
1505
+ }), w = lt(() => s.value ? void 0 : r.block.src), E = lt(() => s.value ? r.block.placeholderUrl : void 0);
1506
+ return (e, n) => (l(), g("div", {
1507
+ ref_key: "dropZoneRef",
1508
+ ref: u,
1509
+ "data-testid": "image-drop-zone",
1510
+ "data-drop-enabled": O(f),
1511
+ class: "tpl:relative tpl:w-full",
1512
+ style: F(_.value)
1513
+ }, [O(m) ? (l(), S(nt, {
1514
+ key: 0,
1515
+ uploading: O(p),
1516
+ size: "canvas"
1517
+ }, null, 8, ["uploading"])) : x("", !0), t.block.src && s.value && t.block.placeholderUrl ? (l(), g(P, { key: 1 }, [t.block.linkUrl ? (l(), g("a", {
1518
+ key: 0,
1519
+ href: t.block.linkUrl,
1520
+ target: "_blank",
1521
+ rel: "noopener noreferrer",
1522
+ onClick: n[0] ||= T(() => {}, ["prevent"])
1523
+ }, [D("img", {
1524
+ class: "tpl:border-0",
1525
+ loading: "lazy",
1526
+ src: O(E),
1527
+ alt: t.block.alt || O(a).image.altTextPlaceholder,
1528
+ style: F(C.value)
1529
+ }, null, 12, Ai)], 8, ki)) : (l(), g("img", {
1530
+ key: 1,
1531
+ class: "tpl:border-0",
1532
+ src: O(E),
1533
+ alt: t.block.alt,
1534
+ style: F(C.value)
1535
+ }, null, 12, ji))], 64)) : t.block.src && s.value ? (l(), g("div", {
1536
+ key: 2,
1537
+ class: "tpl:!flex tpl:box-border tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
1538
+ style: F([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, C.value])
1539
+ }, [I(O(Sn), {
1540
+ size: 32,
1541
+ "stroke-width": 1.5,
1542
+ class: "tpl:text-[var(--tpl-primary)]",
1543
+ style: { opacity: "0.5" }
1544
+ }), D("span", Mi, [I(Ur, { text: t.block.src }, null, 8, ["text"])])], 4)) : t.block.src ? (l(), g(P, { key: 3 }, [t.block.linkUrl ? (l(), g("a", {
1545
+ key: 0,
1546
+ href: t.block.linkUrl,
1547
+ target: "_blank",
1548
+ rel: "noopener noreferrer",
1549
+ onClick: n[1] ||= T(() => {}, ["prevent"])
1550
+ }, [D("img", {
1551
+ class: "tpl:border-0",
1552
+ loading: "lazy",
1553
+ src: O(w),
1554
+ alt: t.block.alt || O(a).image.altTextPlaceholder,
1555
+ style: F(C.value)
1556
+ }, null, 12, Pi)], 8, Ni)) : (l(), g("img", {
1557
+ key: 1,
1558
+ class: "tpl:border-0",
1559
+ src: O(w),
1560
+ alt: t.block.alt,
1561
+ style: F(C.value)
1562
+ }, null, 12, Fi))], 64)) : (l(), g("div", Ii, [O(d) ? (l(), g("button", {
1563
+ key: 0,
1564
+ "aria-label": O(a).image.browseMedia,
1565
+ 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)]",
1566
+ onClick: n[2] ||= T((...e) => O(h) && O(h)(...e), ["stop"])
1567
+ }, [I(O(Sn), {
1568
+ size: 14,
1569
+ "stroke-width": 1.5
1570
+ }), v(" " + b(O(a).image.browseMedia), 1)], 8, Li)) : (l(), g("span", Ri, b(O(a).image.clickToAdd), 1))]))], 12, Oi));
1571
+ }
1572
+ }), Bi = { class: "tpl:w-full" }, Vi = ["href"], Hi = {
1573
+ key: 1,
1574
+ 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)]"
1575
+ }, Ui = /* @__PURE__ */ n({
1576
+ __name: "MenuBlock",
1577
+ props: {
1578
+ block: {},
1579
+ viewport: {}
1580
+ },
1581
+ setup(e) {
1582
+ let t = e, { t: n } = Z(), r = K(Y, "MenuBlock"), i = k(() => ({
1583
+ display: "flex",
1584
+ flexWrap: "wrap",
1585
+ gap: `0 ${t.block.spacing}px`,
1586
+ justifyContent: t.block.textAlign === "left" ? "flex-start" : t.block.textAlign === "right" ? "flex-end" : "center",
1587
+ fontSize: `${t.block.fontSize}px`,
1588
+ fontFamily: t.block.fontFamily ? r.resolveFontFamily(t.block.fontFamily) : "inherit",
1589
+ alignItems: "center"
1590
+ })), o = k(() => t.block.items.length > 0);
1591
+ function s(e) {
1592
+ return e || t.block.linkColor || t.block.color;
1593
+ }
1594
+ return (t, r) => (l(), g("div", Bi, [o.value ? (l(), g("div", {
1595
+ key: 0,
1596
+ style: F(i.value)
1597
+ }, [(l(!0), g(P, null, a(e.block.items, (t, n) => (l(), g(P, { key: t.id }, [D("a", {
1598
+ href: t.url || "#",
1599
+ class: "tpl:cursor-default tpl:no-underline",
1600
+ style: F({
1601
+ color: s(t.color),
1602
+ fontWeight: t.bold ? "bold" : "normal",
1603
+ textDecoration: t.underline ? "underline" : "none"
1604
+ }),
1605
+ onClick: r[0] ||= T(() => {}, ["prevent"])
1606
+ }, [I(Ur, { text: t.text || "..." }, null, 8, ["text"])], 12, Vi), n < e.block.items.length - 1 ? (l(), g("span", {
1607
+ key: 0,
1608
+ style: F({
1609
+ color: e.block.separatorColor,
1610
+ padding: `0 ${e.block.spacing}px`
1611
+ })
1612
+ }, b(e.block.separator), 5)) : x("", !0)], 64))), 128))], 4)) : (l(), g("div", Hi, [I(O(yn), { size: 16 }), D("span", null, b(O(n).menu.addLinks), 1)]))]));
1613
+ }
1614
+ });
1615
+ //#endregion
1616
+ //#region src/composables/useEditableTextBlock.ts
1617
+ function Wi(t) {
1618
+ let n = r(q, xt), i = r(At, null), { syntax: a } = Mn(), o = k(() => i?.value ? Oe(t(), n.value) : Ie(t(), n.value)), s = k(() => Ce(Pn(Ee(o.value, a)))), c = e(!1), l = e(null), { top: u, left: d } = ht(l), { toLocal: f } = un(), p = k(() => f({
1619
+ top: u.value - 8,
1620
+ left: d.value
1621
+ }));
1622
+ function m() {
1623
+ c.value = !0;
1624
+ }
1625
+ function h() {
1626
+ c.value = !1;
1627
+ }
1628
+ return {
1629
+ isEditing: c,
1630
+ blockRef: l,
1631
+ toolbarPosition: p,
1632
+ resolvedContent: s,
1633
+ handleDoubleClick: m,
1634
+ handleEditorDone: h
1635
+ };
1636
+ }
1637
+ //#endregion
1638
+ //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
1639
+ var Gi = ["innerHTML"], Ki = /* @__PURE__ */ n({
1640
+ __name: "ParagraphBlock",
1641
+ props: {
1642
+ block: {},
1643
+ viewport: {}
1644
+ },
1645
+ setup(e) {
1646
+ let t = e, n = u(() => import("./ParagraphEditor-CqSj6Ayz.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Wi(() => t.block.content);
1647
+ return (t, u) => (l(), g("div", {
1648
+ ref_key: "blockRef",
1649
+ ref: i,
1650
+ class: "tpl:min-h-[1em] tpl:w-full",
1651
+ onDblclick: u[0] ||= (...e) => O(s) && O(s)(...e)
1652
+ }, [O(r) ? (l(), S(O(n), {
1653
+ key: 0,
1654
+ block: e.block,
1655
+ "toolbar-position": O(a),
1656
+ onDone: O(c)
1657
+ }, null, 8, [
1658
+ "block",
1659
+ "toolbar-position",
1660
+ "onDone"
1661
+ ])) : (l(), g("div", {
1662
+ key: 1,
1663
+ class: "tpl-text-content tpl:outline-none",
1664
+ innerHTML: O(o)
1665
+ }, null, 8, Gi))], 544));
1666
+ }
1667
+ }), qi = [
1668
+ "data-block-id",
1669
+ "data-block-type",
1670
+ "data-tpl-picked"
1671
+ ], Ji = ["data-lock-holder"], Yi = ["aria-label"], Xi = [
1672
+ "aria-label",
1673
+ "aria-pressed",
1674
+ "title"
1675
+ ], Zi = ["aria-label", "title"], Qi = ["aria-label", "title"], $i = ["aria-label", "title"], ea = {
1676
+ key: 3,
1677
+ 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"
1678
+ }, ta = { 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)]" }, na = {
1679
+ key: 4,
1680
+ class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
1681
+ }, ra = ["aria-label", "title"], ia = {
1682
+ key: 5,
1683
+ class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
1684
+ }, aa = ["aria-label"], oa = /*#__PURE__*/ An(/* @__PURE__ */ n({
1685
+ __name: "BlockWrapper",
1686
+ props: {
1687
+ block: {},
1688
+ isSelected: { type: Boolean },
1689
+ viewport: {},
1690
+ previewMode: { type: Boolean },
1691
+ nested: { type: Boolean },
1692
+ picked: { type: Boolean }
1693
+ },
1694
+ emits: ["select"],
1695
+ setup(n, { emit: i }) {
1696
+ let a = u(() => import("./BlockIssueBadge-DAn2vsMJ.js")), o = n, c = i, { t: d, format: f } = Z(), p = r(Mt, null), m = e(null), h = k(() => p?.liftedBlockId.value === o.block.id), _ = k(() => h.value ? f(d.blockActions.dragLifted, { block: o.block.type }) : d.blockActions.drag);
1697
+ async function y() {
1698
+ await t(), m.value?.focus();
1699
+ }
1700
+ function S(e) {
1701
+ p && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), h.value ? p.drop(o.block.id) : p.lift(o.block.id)) : h.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), p.cancel(), y()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), p.moveUp(o.block.id), y()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), p.moveDown(o.block.id), y())));
1702
+ }
1703
+ let C = k(() => !o.viewport || !o.block.visibility ? !1 : o.block.visibility[o.viewport] === !1), w = k(() => o.previewMode === !0 && C.value), A = k(() => o.viewport ? {
1704
+ desktop: d.viewport.desktop,
1705
+ mobile: d.viewport.mobile
1706
+ }[o.viewport] ?? o.viewport : ""), j = k(() => !!o.block.displayCondition), M = r(Bt, null), N = r(Wt, null), P = r(Jt, {}), L = k(() => P.savedBlocks?.isPicking.value === !0), R = k(() => !o.nested && P.savedBlocks?.isAvailable.value === !0 && P.savedBlocks?.canCreate.value === !0), z = k(() => o.isSelected && !L.value), B = k(() => P.comments?.getBlockCount(o.block.id) ?? 0), V = k(() => P.collaboration?.lockOf(o.block.id) ?? null), H = k(() => V.value?.holder.type === "guest" ? d.collaboration.guest : V.value?.holder.name ?? ""), U = k(() => P.collaboration?.agentHighlightOf(o.block.id) ?? P.ai?.highlightOf(o.block.id) ?? null), ee = Ge(() => o.block.type === "section" ? o.block.backgroundImage : void 0), te = Ge(() => o.block.type === "section" ? o.block.wrapper?.backgroundImage : void 0), ne = r(J, null), re = r(vt, void 0), W = k(() => Lr(o.block, {
1707
+ backgroundImageUrl: ee.value,
1708
+ heroBoxWidth: et(o.block, ne?.content.value, re)
1709
+ })), ie = k(() => Br(o.block, { backgroundImageUrl: te.value }));
1710
+ function ae(e) {
1711
+ o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), c("select"));
1712
+ }
1713
+ function oe() {
1714
+ M?.deleteBlock(o.block.id);
1715
+ }
1716
+ function se() {
1717
+ M?.duplicateBlock(o.block);
1718
+ }
1719
+ function ce() {
1720
+ P.savedBlocks?.startPicking(o.block.id);
1721
+ }
1722
+ function le() {
1723
+ N?.toggleBlock(o.block.id);
1724
+ }
1725
+ return (e, t) => w.value ? x("", !0) : (l(), g("div", {
1726
+ key: 0,
1727
+ class: E(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
1728
+ "tpl-block--selected": n.isSelected,
1729
+ "tpl-block--picked": n.picked,
1730
+ "tpl-block--idle": !n.isSelected && !n.picked,
1731
+ "tpl-block--lifted": h.value
1732
+ }]),
1733
+ "data-block-id": n.block.id,
1734
+ "data-block-type": n.block.type,
1735
+ "data-tpl-picked": n.picked || void 0,
1736
+ onClick: ae
1737
+ }, [
1738
+ I(O(a), { "block-id": n.block.id }, null, 8, ["block-id"]),
1739
+ V.value ? (l(), g("div", {
1740
+ key: 0,
1741
+ "data-testid": "block-lock",
1742
+ "data-lock-holder": V.value.holder.sessionId,
1743
+ class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
1744
+ style: F({
1745
+ outline: `2px solid ${V.value.holder.color}`,
1746
+ outlineOffset: "-1px"
1747
+ })
1748
+ }, [D("span", {
1749
+ class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
1750
+ style: F({
1751
+ backgroundColor: V.value.holder.color,
1752
+ color: O(Fn)(V.value.holder.color)
1753
+ })
1754
+ }, b(O(f)(O(d).collaboration.editing, { name: H.value })), 5)], 12, Ji)) : x("", !0),
1755
+ U.value === null ? x("", !0) : (l(), g("div", {
1756
+ key: U.value,
1757
+ "data-testid": "block-agent-highlight",
1758
+ "aria-hidden": "true",
1759
+ class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
1760
+ })),
1761
+ z.value ? (l(), g("div", {
1762
+ key: 2,
1763
+ role: "toolbar",
1764
+ "aria-label": O(d).blockActions.drag,
1765
+ class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
1766
+ }, [
1767
+ D("button", {
1768
+ ref_key: "dragButtonRef",
1769
+ ref: m,
1770
+ class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
1771
+ "aria-label": _.value,
1772
+ "aria-pressed": h.value,
1773
+ "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
1774
+ title: O(d).blockActions.drag,
1775
+ onKeydown: S
1776
+ }, [I(O(En), {
1777
+ size: 14,
1778
+ "stroke-width": 1.5
1779
+ })], 40, Xi),
1780
+ D("button", {
1781
+ 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",
1782
+ "aria-label": O(d).blockActions.duplicate,
1783
+ title: O(d).blockActions.duplicate,
1784
+ onClick: T(se, ["stop"])
1785
+ }, [I(O(gn), {
1786
+ size: 14,
1787
+ "stroke-width": 1.5
1788
+ })], 8, Zi),
1789
+ R.value ? (l(), g("button", {
1790
+ key: 0,
1791
+ 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",
1792
+ "aria-label": O(d).blockActions.saveAsBlock,
1793
+ title: O(d).blockActions.saveAsBlock,
1794
+ onClick: T(ce, ["stop"])
1795
+ }, [I(O(hn), {
1796
+ size: 14,
1797
+ "stroke-width": 1.5
1798
+ })], 8, Qi)) : x("", !0),
1799
+ D("button", {
1800
+ 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",
1801
+ "aria-label": O(d).blockActions.delete,
1802
+ title: O(d).blockActions.delete,
1803
+ onClick: T(oe, ["stop"])
1804
+ }, [I(O(xn), {
1805
+ size: 14,
1806
+ "stroke-width": 1.5
1807
+ })], 8, $i)
1808
+ ], 8, Yi)) : x("", !0),
1809
+ C.value ? (l(), g("div", ea, [D("span", ta, [I(O(mn), {
1810
+ size: 12,
1811
+ "stroke-width": 1.5
1812
+ }), v(" " + b(O(f)(O(d).blockActions.hiddenOnViewport, { viewport: A.value })), 1)])])) : x("", !0),
1813
+ j.value && !C.value ? (l(), g("div", na, [D("button", {
1814
+ "data-testid": "condition-toggle",
1815
+ 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)]",
1816
+ "aria-label": O(d).blockActions.conditionToggle,
1817
+ title: n.block.displayCondition?.label,
1818
+ onClick: T(le, ["stop"])
1819
+ }, [I(O(Dn), {
1820
+ size: 12,
1821
+ "stroke-width": 2
1822
+ })], 8, ra)])) : x("", !0),
1823
+ B.value > 0 && !C.value ? (l(), g("div", ia, [D("button", {
1824
+ 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)]",
1825
+ "aria-label": O(f)(O(d).blockActions.comments, { count: String(B.value) }),
1826
+ onClick: t[0] ||= T((e) => O(P).comments?.openForBlock(n.block.id), ["stop"])
1827
+ }, [I(O(wn), {
1828
+ size: 12,
1829
+ "stroke-width": 2.5
1830
+ }), v(" " + b(B.value), 1)], 8, aa)])) : x("", !0),
1831
+ ie.value ? (l(), g("div", {
1832
+ key: 6,
1833
+ class: E(["tpl-section-wrapper tpl-email-surface", O(Nr)(ie.value)]),
1834
+ style: F(ie.value)
1835
+ }, [D("div", {
1836
+ class: E(["tpl-block-content tpl-email-surface", O(Nr)(W.value)]),
1837
+ style: F(W.value)
1838
+ }, [s(e.$slots, "default", {}, void 0, !0)], 6)], 6)) : (l(), g("div", {
1839
+ key: 7,
1840
+ class: E(["tpl-block-content tpl-email-surface", O(Nr)(W.value)]),
1841
+ style: F(W.value)
1842
+ }, [s(e.$slots, "default", {}, void 0, !0)], 6))
1843
+ ], 10, qi));
1844
+ }
1845
+ }), [["__scopeId", "data-v-126b991e"]]);
1846
+ //#endregion
1847
+ //#region src/utils/unwrapParagraph.ts
1848
+ function sa(e) {
1849
+ let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
1850
+ return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
1851
+ }
1852
+ //#endregion
1853
+ //#region src/components/blocks/TitleBlock.vue
1854
+ var ca = /* @__PURE__ */ n({
1855
+ __name: "TitleBlock",
1856
+ props: {
1857
+ block: {},
1858
+ viewport: {}
1859
+ },
1860
+ setup(e) {
1861
+ let t = e, n = u(() => import("./TitleEditor-Ccv6uoTz.js")), r = K(Y, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: d } = Wi(() => t.block.content), f = k(() => {
1862
+ let e = {
1863
+ fontSize: `${me[t.block.level]}px`,
1864
+ lineHeight: String(B),
1865
+ fontWeight: "700",
1866
+ textAlign: t.block.textAlign
1867
+ };
1868
+ return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
1869
+ }), p = k(() => `h${t.block.level}`), m = k(() => sa(s.value));
1870
+ return (t, r) => (l(), g("div", {
1871
+ ref_key: "blockRef",
1872
+ ref: a,
1873
+ class: "tpl:min-h-[1em] tpl:w-full",
1874
+ style: F(f.value),
1875
+ onDblclick: r[0] ||= (...e) => O(c) && O(c)(...e)
1876
+ }, [O(i) ? (l(), S(O(n), {
1877
+ key: 0,
1878
+ block: e.block,
1879
+ "toolbar-position": O(o),
1880
+ onDone: O(d)
1881
+ }, null, 8, [
1882
+ "block",
1883
+ "toolbar-position",
1884
+ "onDone"
1885
+ ])) : (l(), S(L(p.value), {
1886
+ key: 1,
1887
+ class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
1888
+ style: {
1889
+ color: "inherit",
1890
+ fontWeight: "inherit"
1891
+ },
1892
+ innerHTML: m.value
1893
+ }, null, 8, ["innerHTML"]))], 36));
1894
+ }
1895
+ }), la = "hero", ua = "#1f2937", da = "#ffffff";
1896
+ function fa(e, t) {
1897
+ let n = R("title", e);
1898
+ n.color = da, n.textAlign = "center";
1899
+ let r = R("paragraph", e);
1900
+ r.content = `<p style="text-align: center"><span style="color: ${da}">${pa(t)}</span></p>`;
1901
+ let i = R("button", e);
1902
+ return i.align = "center", Ue({
1903
+ columns: "1",
1904
+ children: [[
1905
+ n,
1906
+ r,
1907
+ i
1908
+ ]],
1909
+ hero: {
1910
+ height: "image",
1911
+ verticalAlign: "middle"
1912
+ },
1913
+ styles: {
1914
+ padding: {
1915
+ top: 48,
1916
+ right: 24,
1917
+ bottom: 48,
1918
+ left: 24
1919
+ },
1920
+ backgroundColor: ua
1921
+ }
1922
+ });
1923
+ }
1924
+ function pa(e) {
1925
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1926
+ }
1927
+ //#endregion
1928
+ //#region src/utils/sectionColumnDrop.ts
1929
+ var ma = /* @__PURE__ */ new Set(["section", la]);
1930
+ function ha(e) {
1931
+ return e.dataset.blockType !== "section" && !ma.has(e.dataset.paletteType ?? "");
1932
+ }
1933
+ //#endregion
1934
+ //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
1935
+ var ga = { class: "tpl:relative tpl:w-full" }, _a = {
1936
+ key: 0,
1937
+ "data-testid": "hero-image-hint",
1938
+ class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
1939
+ }, va = {
1940
+ key: 0,
1941
+ "data-testid": "section-drop-hint",
1942
+ 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)]"
1943
+ }, ya = /* @__PURE__ */ n({
1944
+ __name: "SectionBlock",
1945
+ props: {
1946
+ block: {},
1947
+ viewport: {}
1948
+ },
1949
+ setup(t) {
1950
+ let n = {
1951
+ title: ca,
1952
+ paragraph: Ki,
1953
+ image: zi,
1954
+ button: Gr,
1955
+ divider: xi,
1956
+ custom: yi
1957
+ }, i = t, { t: o } = Z(), s = K(J, "SectionBlock"), c = r(Wt, null), u = r(tn, null), d = r(Jt, {}), p = r(en, null);
1958
+ function h(e) {
1959
+ let t = d.savedBlocks;
1960
+ t?.isPicking.value ? t.togglePick(i.block.id) : s.selectBlock(e);
1961
+ }
1962
+ let _ = k(() => {
1963
+ switch (i.block.columns) {
1964
+ case "2": return ["50%", "50%"];
1965
+ case "3": return [
1966
+ "33.33%",
1967
+ "33.33%",
1968
+ "33.33%"
1969
+ ];
1970
+ case "1-2": return ["33.33%", "66.67%"];
1971
+ case "2-1": return ["66.67%", "33.33%"];
1972
+ default: return ["100%"];
1973
+ }
1974
+ }), v = k(() => {
1975
+ let e = _.value.length, t = [...i.block.children];
1976
+ for (; t.length < e;) t.push([]);
1977
+ return t.slice(0, e);
1978
+ }), y = k(() => i.viewport === "mobile" && i.block.stackOnMobile !== !1);
1979
+ function C(e) {
1980
+ return v.value[e] || [];
1981
+ }
1982
+ function w(e) {
1983
+ return p?.value === !1 || !c?.isHidden(e);
1984
+ }
1985
+ function T(e) {
1986
+ return !C(e).some((e) => w(e.id));
1987
+ }
1988
+ let A = e(null);
1989
+ function N(e) {
1990
+ return s.state.previewMode ? !1 : T(e) ? !0 : A.value === e && C(e).filter((e) => w(e.id)).length <= 1;
1991
+ }
1992
+ let R = k(() => {
1993
+ if (s.state.previewMode) return !1;
1994
+ let e = z(i.block);
1995
+ return e !== null && !e.applied && e.reason === "image";
1996
+ });
1997
+ function B(e) {
1998
+ return C(e).length === 0 && !s.state.previewMode;
1999
+ }
2000
+ function V(e) {
2001
+ return C(e).length === 0 && s.state.previewMode;
2002
+ }
2003
+ function H(e, t) {
2004
+ let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...i.block.children];
2005
+ for (; r.length <= e;) r.push([]);
2006
+ r[e] = n, s.updateBlock(i.block.id, { children: r });
2007
+ }
2008
+ function U(e) {
2009
+ return kr(e, u, n);
2010
+ }
2011
+ function ee(e, t) {
2012
+ e.type === "custom" && s.updateBlock(e.id, {
2013
+ fieldValues: t.fieldValues,
2014
+ dataSourceFetched: t.dataSourceFetched
2015
+ });
2016
+ }
2017
+ return (e, n) => (l(), g("div", ga, [R.value ? (l(), g("div", _a, [D("span", null, b(O(o).section.heroAddImage), 1)])) : x("", !0), D("div", { class: E(["tpl:flex tpl:gap-0", { "tpl:flex-col": y.value }]) }, [(l(!0), g(P, null, a(v.value, (e, r) => (l(), g("div", {
2018
+ key: r,
2019
+ class: E(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", B(r) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
2020
+ style: F({ width: y.value ? "100%" : _.value[r] })
2021
+ }, [I(O(M), {
2022
+ "model-value": C(r),
2023
+ group: {
2024
+ name: "blocks",
2025
+ pull: !0,
2026
+ put: (e, t, n) => O(ha)(n)
2027
+ },
2028
+ animation: 150,
2029
+ "ghost-class": "tpl-ghost",
2030
+ "drag-class": "tpl-dragging",
2031
+ handle: ".tpl-block-btn",
2032
+ "invert-swap": !0,
2033
+ "inverted-swap-threshold": .65,
2034
+ "empty-insert-threshold": 20,
2035
+ "force-fallback": !0,
2036
+ class: E(["tpl:grow", {
2037
+ "tpl:min-h-[60px]": N(r),
2038
+ "tpl:min-h-[34px]": V(r)
2039
+ }]),
2040
+ onStart: (e) => A.value = r,
2041
+ onEnd: n[0] ||= (e) => A.value = null,
2042
+ "onUpdate:modelValue": (e) => H(r, e)
2043
+ }, {
2044
+ default: f(() => [(l(!0), g(P, null, a(C(r), (e) => m((l(), g("div", { key: e.id }, [I(oa, {
2045
+ block: e,
2046
+ "is-selected": O(s).state.selectedBlockId === e.id,
2047
+ viewport: t.viewport,
2048
+ "preview-mode": O(s).state.previewMode,
2049
+ nested: "",
2050
+ onSelect: (t) => h(e.id)
2051
+ }, {
2052
+ default: f(() => [(l(), S(L(U(e)), {
2053
+ block: e,
2054
+ viewport: t.viewport,
2055
+ onFetchData: (t) => ee(e, t),
2056
+ onUpdate: (t) => O(s).updateBlock(e.id, t)
2057
+ }, null, 40, [
2058
+ "block",
2059
+ "viewport",
2060
+ "onFetchData",
2061
+ "onUpdate"
2062
+ ]))]),
2063
+ _: 2
2064
+ }, 1032, [
2065
+ "block",
2066
+ "is-selected",
2067
+ "viewport",
2068
+ "preview-mode",
2069
+ "onSelect"
2070
+ ])])), [[j, w(e.id)]])), 128))]),
2071
+ _: 2
2072
+ }, 1032, [
2073
+ "model-value",
2074
+ "group",
2075
+ "class",
2076
+ "onStart",
2077
+ "onUpdate:modelValue"
2078
+ ]), B(r) ? (l(), g("div", va, [D("span", null, b(O(o).section.dropHere), 1)])) : x("", !0)], 6))), 128))], 2)]));
2079
+ }
2080
+ }), ba = ["width", "height"], xa = [
2081
+ "d",
2082
+ "stroke",
2083
+ "stroke-opacity",
2084
+ "stroke-width"
2085
+ ], Sa = ["d", "fill"], Ca = /* @__PURE__ */ n({
2086
+ __name: "SocialIconSvg",
2087
+ props: {
2088
+ platform: {},
2089
+ iconStyle: {},
2090
+ iconTone: {},
2091
+ iconSize: {}
2092
+ },
2093
+ setup(e) {
2094
+ let t = e, n = k(() => ot[t.platform]), r = k(() => st[t.iconSize]), i = k(() => U(t.platform, t.iconTone)), a = k(() => le(t.iconStyle, t.iconTone)), o = k(() => {
2095
+ let e = {
2096
+ display: "inline-flex",
2097
+ alignItems: "center",
2098
+ justifyContent: "center",
2099
+ width: `${r.value}px`,
2100
+ height: `${r.value}px`
2101
+ }, n = i.value.fill;
2102
+ switch (t.iconStyle) {
2103
+ case "solid": return {
2104
+ ...e,
2105
+ backgroundColor: n,
2106
+ borderRadius: "4px"
2107
+ };
2108
+ case "outlined": return {
2109
+ ...e,
2110
+ backgroundColor: "transparent",
2111
+ border: `2px solid ${n}`,
2112
+ borderRadius: "4px",
2113
+ ...a.value && { boxShadow: u(a.value) }
2114
+ };
2115
+ case "rounded": return {
2116
+ ...e,
2117
+ backgroundColor: n,
2118
+ borderRadius: "8px"
2119
+ };
2120
+ case "square": return {
2121
+ ...e,
2122
+ backgroundColor: n,
2123
+ borderRadius: "0"
2124
+ };
2125
+ case "circle": return {
2126
+ ...e,
2127
+ backgroundColor: n,
2128
+ borderRadius: "50%"
2129
+ };
2130
+ default: return e;
2131
+ }
2132
+ }), s = k(() => H(t.iconStyle)), c = k(() => Math.floor(r.value * s.value));
2133
+ function u(e) {
2134
+ let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
2135
+ return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
2136
+ }
2137
+ let d = k(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
2138
+ return (e, t) => (l(), g("span", { style: F(o.value) }, [(l(), g("svg", {
2139
+ width: c.value,
2140
+ height: c.value,
2141
+ viewBox: "0 0 24 24",
2142
+ overflow: "visible",
2143
+ xmlns: "http://www.w3.org/2000/svg"
2144
+ }, [a.value ? (l(), g("path", {
2145
+ key: 0,
2146
+ "data-testid": "social-icon-halo",
2147
+ d: n.value.path,
2148
+ fill: "none",
2149
+ stroke: a.value.color,
2150
+ "stroke-opacity": a.value.opacity,
2151
+ "stroke-width": a.value.width / s.value,
2152
+ "stroke-linejoin": "round"
2153
+ }, null, 8, xa)) : x("", !0), D("path", {
2154
+ d: n.value.path,
2155
+ fill: d.value
2156
+ }, null, 8, Sa)], 8, ba))], 4));
2157
+ }
2158
+ }), wa = { class: "tpl:w-full" }, Ta = ["href"], Ea = {
2159
+ key: 1,
2160
+ 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)]"
2161
+ }, Da = /* @__PURE__ */ n({
2162
+ __name: "SocialIconsBlock",
2163
+ props: {
2164
+ block: {},
2165
+ viewport: {}
2166
+ },
2167
+ setup(e) {
2168
+ let t = e, { t: n } = Z(), r = k(() => ({
2169
+ display: "flex",
2170
+ flexWrap: "wrap",
2171
+ gap: `${t.block.spacing}px`,
2172
+ justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
2173
+ })), i = k(() => t.block.icons.length > 0);
2174
+ return (t, o) => (l(), g("div", wa, [i.value ? (l(), g("div", {
2175
+ key: 0,
2176
+ style: F(r.value)
2177
+ }, [(l(!0), g(P, null, a(e.block.icons, (t) => (l(), g("a", {
2178
+ key: t.id,
2179
+ href: t.url || "#",
2180
+ class: "tpl:cursor-default",
2181
+ onClick: o[0] ||= T(() => {}, ["prevent"])
2182
+ }, [I(Ca, {
2183
+ platform: t.platform,
2184
+ "icon-style": e.block.iconStyle,
2185
+ "icon-tone": e.block.iconTone,
2186
+ "icon-size": e.block.iconSize
2187
+ }, null, 8, [
2188
+ "platform",
2189
+ "icon-style",
2190
+ "icon-tone",
2191
+ "icon-size"
2192
+ ])], 8, Ta))), 128))], 4)) : (l(), g("div", Ea, [I(O(Cn), { size: 16 }), D("span", null, b(O(n).social.addIcons), 1)]))]));
2193
+ }
2194
+ }), Oa = { class: "tpl:w-full" }, ka = {
2195
+ key: 0,
2196
+ class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
2197
+ style: {
2198
+ "background-color": "var(--tpl-bg-hover)",
2199
+ color: "var(--tpl-text-dim)"
2200
+ }
2201
+ }, Aa = /* @__PURE__ */ n({
2202
+ __name: "SpacerBlock",
2203
+ props: {
2204
+ block: {},
2205
+ viewport: {}
2206
+ },
2207
+ setup(e) {
2208
+ let t = e, n = K(J, "SpacerBlock"), r = k(() => ({
2209
+ height: `${t.block.height}px`,
2210
+ minHeight: `${t.block.height}px`,
2211
+ ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
2212
+ }));
2213
+ return (t, i) => (l(), g("div", Oa, [D("div", {
2214
+ style: F(r.value),
2215
+ class: E(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !O(n).state.previewMode }])
2216
+ }, [O(n).state.previewMode ? x("", !0) : (l(), g("span", ka, b(e.block.height) + "px ", 1))], 6)]));
2217
+ }
2218
+ }), ja = { class: "tpl:w-full" }, Ma = { key: 0 }, Na = [
2219
+ "aria-label",
2220
+ "data-placeholder",
2221
+ "onBlur"
2222
+ ], Pa = [
2223
+ "aria-label",
2224
+ "data-placeholder",
2225
+ "onBlur"
2226
+ ], Fa = {
2227
+ key: 1,
2228
+ 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)]"
2229
+ }, Ia = /*#__PURE__*/ An(/* @__PURE__ */ n({
2230
+ __name: "TableBlock",
2231
+ props: {
2232
+ block: {},
2233
+ viewport: {}
2234
+ },
2235
+ setup(e) {
2236
+ let t = {
2237
+ mounted(e, t) {
2238
+ e.textContent = t.value ?? "";
2239
+ },
2240
+ updated(e, t) {
2241
+ t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
2242
+ }
2243
+ }, n = e, { t: r } = Z(), i = K(J, "TableBlock"), o = K(Y, "TableBlock"), s = k(() => n.block.rows.length > 0), c = k(() => {
2244
+ let e = {
2245
+ width: "100%",
2246
+ borderCollapse: "collapse",
2247
+ fontSize: `${n.block.fontSize}px`,
2248
+ textAlign: n.block.textAlign,
2249
+ fontFamily: n.block.fontFamily ? o.resolveFontFamily(n.block.fontFamily) : "inherit"
2250
+ };
2251
+ return n.block.color && (e.color = n.block.color), e;
2252
+ }), u = k(() => ({
2253
+ border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
2254
+ padding: `${n.block.cellPadding}px`,
2255
+ textAlign: n.block.textAlign
2256
+ })), d = k(() => ({
2257
+ ...u.value,
2258
+ fontWeight: "bold",
2259
+ backgroundColor: n.block.headerBackgroundColor || "transparent"
2260
+ })), f = k(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), p = k(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
2261
+ function h() {
2262
+ i.selectBlock(n.block.id);
2263
+ }
2264
+ function _(e, t, r) {
2265
+ let a = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
2266
+ ...n,
2267
+ cells: n.cells.map((e) => e.id === t ? {
2268
+ ...e,
2269
+ content: a
2270
+ } : e)
2271
+ } : n);
2272
+ i.updateBlock(n.block.id, { rows: o });
2273
+ }
2274
+ return (e, n) => (l(), g("div", ja, [s.value ? (l(), g("table", {
2275
+ key: 0,
2276
+ style: F(c.value),
2277
+ class: "tpl-table-editable"
2278
+ }, [f.value ? (l(), g("thead", Ma, [D("tr", null, [(l(!0), g(P, null, a(f.value.cells, (e) => m((l(), g("th", {
2279
+ key: e.id,
2280
+ style: F(d.value),
2281
+ "aria-label": O(r).table.cellPlaceholder,
2282
+ contenteditable: "true",
2283
+ "data-placeholder": O(r).table.cellPlaceholder,
2284
+ onBlur: (t) => _(f.value.id, e.id, t),
2285
+ onKeydown: n[0] ||= y(T((e) => e.target.blur(), ["prevent"]), ["enter"]),
2286
+ onClick: T(h, ["stop"])
2287
+ }, null, 44, Na)), [[t, e.content]])), 128))])])) : x("", !0), D("tbody", null, [(l(!0), g(P, null, a(p.value, (e) => (l(), g("tr", { key: e.id }, [(l(!0), g(P, null, a(e.cells, (i) => m((l(), g("td", {
2288
+ key: i.id,
2289
+ style: F(u.value),
2290
+ "aria-label": O(r).table.cellPlaceholder,
2291
+ contenteditable: "true",
2292
+ "data-placeholder": O(r).table.cellPlaceholder,
2293
+ onBlur: (t) => _(e.id, i.id, t),
2294
+ onKeydown: n[1] ||= y(T((e) => e.target.blur(), ["prevent"]), ["enter"]),
2295
+ onClick: T(h, ["stop"])
2296
+ }, null, 44, Pa)), [[t, i.content]])), 128))]))), 128))])], 4)) : (l(), g("div", Fa, [I(O(On), { size: 16 }), D("span", null, b(O(r).table.empty), 1)]))]));
2297
+ }
2298
+ }), [["__scopeId", "data-v-6751d456"]]), La = /* @__PURE__ */ n({
2299
+ __name: "VideoPlayButton",
2300
+ props: { hoverEffect: {
2301
+ type: Boolean,
2302
+ default: !1
2303
+ } },
2304
+ setup(e) {
2305
+ return (t, n) => (l(), g("div", { class: E(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [D("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [D("svg", {
2306
+ class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
2307
+ width: "28",
2308
+ height: "28",
2309
+ viewBox: "0 0 24 24",
2310
+ fill: "currentColor"
2311
+ }, [D("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
2312
+ }
2313
+ });
2314
+ //#endregion
2315
+ //#region src/utils/videoThumbnail.ts
2316
+ function Ra(e) {
2317
+ if (!e) return {
2318
+ platform: "unknown",
2319
+ videoId: null,
2320
+ thumbnailUrl: null
2321
+ };
2322
+ for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/i, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/i]) {
2323
+ let n = e.match(t);
2324
+ if (n) {
2325
+ let e = n[1];
2326
+ return {
2327
+ platform: "youtube",
2328
+ videoId: e,
2329
+ thumbnailUrl: `https://img.youtube.com/vi/${e}/maxresdefault.jpg`
2330
+ };
2331
+ }
2332
+ }
2333
+ let t = e.match(/vimeo\.com\/(?:video\/)?(\d+)/i);
2334
+ if (t) {
2335
+ let e = t[1];
2336
+ return {
2337
+ platform: "vimeo",
2338
+ videoId: e,
2339
+ thumbnailUrl: `https://vumbnail.com/${e}.jpg`
2340
+ };
2341
+ }
2342
+ return {
2343
+ platform: "unknown",
2344
+ videoId: null,
2345
+ thumbnailUrl: null
2346
+ };
2347
+ }
2348
+ function za(e, t) {
2349
+ return t || Ra(e).thumbnailUrl;
2350
+ }
2351
+ //#endregion
2352
+ //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
2353
+ var Ba = ["src", "alt"], Va = {
2354
+ class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
2355
+ style: { opacity: "0.7" }
2356
+ }, Ha = ["href"], Ua = ["src", "alt"], Wa = ["src", "alt"], Ga = {
2357
+ key: 3,
2358
+ class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
2359
+ }, Ka = /* @__PURE__ */ n({
2360
+ __name: "VideoBlock",
2361
+ props: {
2362
+ block: {},
2363
+ viewport: {}
2364
+ },
2365
+ setup(e) {
2366
+ let t = e, { t: n } = Z(), { syntax: r } = Mn(), i = k(() => Le(t.block.url, r) || Le(t.block.thumbnailUrl, r)), a = lt(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = lt(() => i.value ? t.block.placeholderUrl : void 0), s = k(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : za(t.block.url)), c = k(() => ({ textAlign: t.block.align })), u = k(() => {
2367
+ let e = t.block.align;
2368
+ return {
2369
+ maxWidth: "100%",
2370
+ width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
2371
+ height: t.block.height ? `${t.block.height}px` : void 0,
2372
+ display: "block",
2373
+ marginLeft: e === "center" || e === "right" ? "auto" : void 0,
2374
+ marginRight: e === "center" ? "auto" : void 0
2375
+ };
2376
+ }), d = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = k(() => Le(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
2377
+ return (t, r) => (l(), g("div", {
2378
+ class: "tpl:w-full",
2379
+ style: F(c.value)
2380
+ }, [i.value && e.block.placeholderUrl ? (l(), g("div", {
2381
+ key: 0,
2382
+ class: "tpl:relative tpl:inline-block",
2383
+ style: F(u.value)
2384
+ }, [D("img", {
2385
+ class: "tpl:block tpl:w-full tpl:border-0",
2386
+ src: O(o),
2387
+ alt: e.block.alt,
2388
+ style: F(d.value)
2389
+ }, null, 12, Ba), I(La)], 4)) : i.value ? (l(), g("div", {
2390
+ key: 1,
2391
+ class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
2392
+ style: F([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
2393
+ }, [I(O(Tn), {
2394
+ size: 36,
2395
+ "stroke-width": 1.5,
2396
+ class: "tpl:text-[var(--tpl-primary)]",
2397
+ style: { opacity: "0.5" }
2398
+ }), D("span", Va, [I(Ur, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (l(), g(P, { key: 2 }, [e.block.url ? (l(), g("a", {
2399
+ key: 0,
2400
+ href: e.block.url,
2401
+ target: "_blank",
2402
+ rel: "noopener noreferrer",
2403
+ class: "tpl:group tpl:relative tpl:inline-block",
2404
+ style: F(u.value),
2405
+ onClick: r[0] ||= T(() => {}, ["prevent"])
2406
+ }, [D("img", {
2407
+ class: "tpl:block tpl:w-full tpl:border-0",
2408
+ src: s.value,
2409
+ alt: e.block.alt,
2410
+ style: F(d.value)
2411
+ }, null, 12, Ua), I(La, { "hover-effect": "" })], 12, Ha)) : (l(), g("div", {
2412
+ key: 1,
2413
+ class: "tpl:relative tpl:inline-block",
2414
+ style: F(u.value)
2415
+ }, [D("img", {
2416
+ class: "tpl:block tpl:w-full tpl:border-0",
2417
+ src: s.value,
2418
+ alt: e.block.alt,
2419
+ style: F(d.value)
2420
+ }, null, 12, Wa), I(La)], 4))], 64)) : (l(), g("div", Ga, [I(O(Tn), {
2421
+ size: 40,
2422
+ "stroke-width": 1.5,
2423
+ class: "tpl:text-[var(--tpl-border-light)]"
2424
+ }), D("span", null, b(O(n).video.addVideo), 1)]))], 4));
2425
+ }
2426
+ }), qa = {
2427
+ section: ya,
2428
+ title: ca,
2429
+ paragraph: Ki,
2430
+ image: zi,
2431
+ button: Gr,
2432
+ divider: xi,
2433
+ video: Ka,
2434
+ social: Da,
2435
+ menu: Ui,
2436
+ table: Ia,
2437
+ spacer: Aa,
2438
+ html: Di,
2439
+ countdown: u(() => import("./CountdownBlock-C6USdwk3.js"))
2440
+ };
2441
+ function Ja(t) {
2442
+ let { editor: n, config: r, translations: a, fontsManager: o } = t, { t: s, format: c } = Z(a), l = k(() => fe(fe(fe(ar(a), wr(n.content.value.settings?.locale)), ae(n.content.value.settings) === "rtl" ? {
2443
+ title: { textAlign: "right" },
2444
+ table: { textAlign: "right" }
2445
+ } : {}), r.blockDefaults ?? {}));
2446
+ n.setUiTheme(r.uiTheme ?? "auto");
2447
+ let { resolvedTheme: u } = qn(k(() => n.state.uiTheme)), d = e(r.theme ?? {}), { themeStyles: f } = Yn({
2448
+ themeOverrides: d,
2449
+ resolvedTheme: u,
2450
+ extraStyles: () => ({
2451
+ "--tpl-drop-text": `"${a.canvas.dropHere}"`,
2452
+ ...t.themeExtraStyles?.()
2453
+ })
2454
+ }), m = t.history ?? Ze({
2455
+ content: n.content,
2456
+ setContent: (e, t) => n.setContent(e, t)
2457
+ });
2458
+ t.history || Je(n, m);
2459
+ let g = qe({
2460
+ addBlock: n.addBlock,
2461
+ removeBlock: n.removeBlock,
2462
+ updateBlock: n.updateBlock,
2463
+ selectBlock: n.selectBlock,
2464
+ findBlockLocation: n.findBlockLocation,
2465
+ blockDefaults: () => l.value
2466
+ }), _ = Xe(n), v = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? Ke({
2467
+ content: n.content,
2468
+ isDirty: () => n.state.isDirty,
2469
+ ...t.autoSaveOptions
2470
+ }) : null, y = null;
2471
+ v && (y = p(m.isNavigating, (e) => {
2472
+ e ? v.pause() : v.resume();
2473
+ }));
2474
+ let b = Kn(n, {
2475
+ t: s,
2476
+ format: c
2477
+ }, r.customBlocks ?? []), x = ln(r.colors);
2478
+ if (x.allowCustomIgnored && X.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), x.invalidPresets.length > 0 && X.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
2479
+ let e = ir(x.presets, r.blockDefaults, r.templateDefaults);
2480
+ e.length > 0 && X.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.`);
2481
+ }
2482
+ let S = dn(r.templateSettings);
2483
+ for (let e of S.unknown) X.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${fn.join(", ")}) — skipping it.`);
2484
+ let C = Xn();
2485
+ tr(C, qa);
2486
+ let w = /* @__PURE__ */ new Set();
2487
+ function T(e) {
2488
+ for (let t of e) {
2489
+ C.registerCustom(t, yi);
2490
+ for (let e of Tr(t, x)) w.has(e.id) || (w.add(e.id), X.warn(e.message));
2491
+ }
2492
+ }
2493
+ r.customBlocks?.length && T(r.customBlocks);
2494
+ let E = Rn();
2495
+ if (A() && h(E.dispose), t.containerEl) {
2496
+ let e = t.containerEl;
2497
+ G(document, "pointerdown", (t) => {
2498
+ let n = e.value;
2499
+ n && (t.composedPath?.() ?? []).includes(n) && E.claim();
2500
+ }, { capture: !0 });
2501
+ }
2502
+ function D() {
2503
+ let e = t.capabilities?.templates;
2504
+ e ? e.save() : v?.flush();
2505
+ }
2506
+ function O(e) {
2507
+ E.isActive() && Dr(e, {
2508
+ history: m,
2509
+ selectBlock: (e) => n.selectBlock(e),
2510
+ getSelectedBlockId: () => n.state.selectedBlockId,
2511
+ removeBlock: (e) => n.removeBlock(e),
2512
+ onSave: D,
2513
+ isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
2514
+ onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
2515
+ onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
2516
+ });
2517
+ }
2518
+ G(document, "keydown", O);
2519
+ let j = e(null), M = t.editorRoot ?? document;
2520
+ i(zt, M), i(_t, j), i(Lt, a), i(J, n), i(an, m), i(Bt, g), i(Wt, _), i(Y, o), i(wt, f), i(Rt, u), i(Zt, l), i(It, r.locale), i(tn, C), i(Qt, r.customBlocks ?? []), i(on, r.paletteBlocks), i(Vt, nr(r.htmlBlockPreview)), i(vt, r.layout), i(Ft, r.sectionWrapper), i(Ut, x), i($t, S.fields), i(Yt, Zn(n.content, C));
2521
+ let P = Me(r.mergeTags?.syntax);
2522
+ for (let e of ["opener", "closer"]) {
2523
+ let t = P[e];
2524
+ typeof t == "string" && t.trim() === "" && X.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
2525
+ }
2526
+ typeof P.opener != "string" && typeof P.closer == "string" && P.closer.trim() !== "" && we(P) === null && X.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
2527
+ let F = N(r.mergeTags?.tags ?? []);
2528
+ function I(e) {
2529
+ Array.isArray(e) ? F.value = e : X.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
2530
+ }
2531
+ i(q, F), i(kt, P), i(jt, r.mergeTags?.onRequest ?? null), i(qt, r.mergeTags?.autocomplete !== !1), i(Ot, r.mergeTags?.showRawValue !== !1);
2532
+ let L = e(je(r.mergeTags?.tags ?? []));
2533
+ i(Dt, L);
2534
+ let R = Bn({
2535
+ resolvePreview: r.resolvePreview,
2536
+ getContent: () => {
2537
+ let e = n.content.value;
2538
+ return r.layout && n.state.previewMode ? Ve(r.layout, e) : e;
2539
+ },
2540
+ isActive: () => n.state.previewMode
2541
+ });
2542
+ i(Pt, R), i(St, r.resolvePreview);
2543
+ let z = k(() => !(n.state.previewMode && R.isConfigured));
2544
+ i(en, z);
2545
+ let B = Vn();
2546
+ i(gt, B), i(Kt, e(!1)), i(yt, e(!1)), i(Nt, r.logicTags?.tags ?? []), i(nn, r.logicTags?.pairs ?? []), i(Ct, r.logicTags?.onRequest ?? null), i(bt, Hn()), i(Et, r.onRequestMedia ?? null), i(Ht, r.canDropMedia ?? null), i(rn, r.resolveImageUrl ? tt(r.resolveImageUrl) : null), i(Gt, r.displayConditions?.conditions ?? []), i(Xt, r.displayConditions?.allowCustom ?? !1), i(Jt, t.capabilities ?? {}), i(Mt, b);
2547
+ let V = Un(r.lint) ? null : Gn({
2548
+ content: n.content,
2549
+ options: r.lint ?? {},
2550
+ updateBlock: n.updateBlock,
2551
+ updateSettings: n.updateSettings,
2552
+ removeBlock: n.removeBlock
2553
+ });
2554
+ i(Tt, V);
2555
+ function H() {
2556
+ y?.(), V?.destroy(), v?.destroy(), m.destroy();
2557
+ }
2558
+ return {
2559
+ t: s,
2560
+ format: c,
2561
+ editorRoot: M,
2562
+ history: m,
2563
+ blockActions: g,
2564
+ conditionPreview: _,
2565
+ autoSave: v,
2566
+ resolvedTheme: u,
2567
+ themeStyles: f,
2568
+ themeOverrides: d,
2569
+ registry: C,
2570
+ keyboardReorder: b,
2571
+ templateLint: V,
2572
+ popoverRoot: j,
2573
+ mergeTagSampleMode: L,
2574
+ previewResolution: R,
2575
+ appliesConditionFilter: z,
2576
+ registerCustomBlocks: T,
2577
+ setMergeTags: I,
2578
+ mergeTags: F,
2579
+ mergeTagSyntax: P,
2580
+ destroy: H
2581
+ };
2582
+ }
2583
+ //#endregion
2584
+ export { kr as A, Jr as C, Rr as D, Lr as E, vr as F, _r as I, gr as L, xr as M, br as N, Or as O, yr as P, Bn as R, Xr as S, Nr as T, ui as _, Da as a, ti as b, fa as c, Ki as d, Ui as f, yi as g, xi as h, Aa as i, pr as j, Vr as k, ca as l, Di as m, Ka as n, ya as o, zi as p, Ia as r, la as s, Ja as t, oa as u, ci as v, Gr as w, Zr as x, oi as y };
2585
+
2586
+ //# sourceMappingURL=useEditorCore-CCVFi1YZ.js.map