@templatical/editor 0.49.0 → 0.51.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-Bs_yxk3h.js +4392 -0
  194. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  195. package/dist/cdn/chunks/{src-B77z1iw4.js → src-K6fw_35b.js} +113 -113
  196. package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-K6fw_35b.js.map} +1 -1
  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
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/index.js
1
+ //#region ../types/src/blocks.ts
2
2
  var e = [
3
3
  "top",
4
4
  "right",
@@ -37,7 +37,7 @@ function a(e) {
37
37
  }
38
38
  function o(e) {
39
39
  if (e == null) return null;
40
- let t = typeof e == "number" ? i.map(() => a(e)) : i.map((t) => a(e[t]));
40
+ let t = i.map(typeof e == "number" ? () => a(e) : (t) => a(e[t]));
41
41
  return t.every((e) => e === 0) ? null : t.every((e) => e === t[0]) ? `${t[0]}px` : t.map((e) => `${e}px`).join(" ");
42
42
  }
43
43
  var s = {
@@ -58,12 +58,12 @@ var s = {
58
58
  "left",
59
59
  "center",
60
60
  "right"
61
- ], f = [
61
+ ], ee = [
62
62
  "top",
63
63
  "center",
64
64
  "bottom"
65
65
  ];
66
- function ee(e) {
66
+ function te(e) {
67
67
  return {
68
68
  url: e,
69
69
  size: "cover",
@@ -74,7 +74,7 @@ function ee(e) {
74
74
  repeat: !1
75
75
  };
76
76
  }
77
- function te(e) {
77
+ function ne(e) {
78
78
  let t = "";
79
79
  for (let n of e) {
80
80
  let e = n.charCodeAt(0);
@@ -82,35 +82,37 @@ function te(e) {
82
82
  }
83
83
  return t;
84
84
  }
85
- function ne(e) {
85
+ function re(e) {
86
86
  let t = typeof e?.url == "string" ? e.url.trim() : "";
87
87
  if (!e || !t) return null;
88
- let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r && f.includes(r.y) ? r.y : "center";
88
+ let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r && ee.includes(r.y) ? r.y : "center";
89
89
  return {
90
- url: te(t),
90
+ url: ne(t),
91
91
  size: n,
92
92
  position: `${i} ${a}`,
93
93
  repeat: e.repeat ? "repeat" : "no-repeat"
94
94
  };
95
95
  }
96
- var re = [
96
+ //#endregion
97
+ //#region ../types/src/hero.ts
98
+ var ie = [
97
99
  "top",
98
100
  "middle",
99
101
  "bottom"
100
102
  ];
101
- function ie(e) {
103
+ function ae(e) {
102
104
  let t = e.hero;
103
105
  if (!t || typeof t != "object") return null;
104
106
  if (e.columns !== "1") return {
105
107
  applied: !1,
106
108
  reason: "columns"
107
109
  };
108
- let n = ne(e.backgroundImage);
110
+ let n = re(e.backgroundImage);
109
111
  if (n === null) return {
110
112
  applied: !1,
111
113
  reason: "image"
112
114
  };
113
- let r = oe(e.backgroundImage), i = ae(t.height) ? Math.round(t.height) : "image";
115
+ let r = se(e.backgroundImage), i = oe(t.height) ? Math.round(t.height) : "image";
114
116
  return i === "image" && r === null ? {
115
117
  applied: !1,
116
118
  reason: "size"
@@ -118,18 +120,20 @@ function ie(e) {
118
120
  applied: !0,
119
121
  image: n,
120
122
  height: i,
121
- verticalAlign: re.includes(t.verticalAlign) ? t.verticalAlign : "middle",
123
+ verticalAlign: ie.includes(t.verticalAlign) ? t.verticalAlign : "middle",
122
124
  aspectRatio: r
123
125
  };
124
126
  }
125
- function ae(e) {
127
+ function oe(e) {
126
128
  return typeof e == "number" && Number.isFinite(e) && e >= 1;
127
129
  }
128
- function oe(e) {
130
+ function se(e) {
129
131
  let t = e?.naturalWidth, n = e?.naturalHeight;
130
132
  return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
131
133
  }
132
- var p = {
134
+ //#endregion
135
+ //#region ../types/src/social.ts
136
+ var ce = {
133
137
  facebook: {
134
138
  color: "#1877F2",
135
139
  path: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"
@@ -198,31 +202,37 @@ var p = {
198
202
  color: "#1769FF",
199
203
  path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
200
204
  }
201
- }, m = {
205
+ }, f = {
202
206
  dark: "#1f1f1f",
203
207
  light: "#ffffff"
204
208
  };
205
- function h(e) {
209
+ function p(e) {
206
210
  return e === "dark" || e === "light" ? e : void 0;
207
211
  }
208
- function se(e, t) {
209
- let n = h(t);
212
+ function le(e, t) {
213
+ let n = p(t);
210
214
  return {
211
- fill: n ? m[n] : p[e].color,
212
- onFill: n === "light" ? m.dark : "#ffffff"
215
+ fill: n ? f[n] : ce[e].color,
216
+ onFill: n === "light" ? f.dark : "#ffffff"
213
217
  };
214
218
  }
215
- function ce(e, t) {
216
- if (h(t) === "dark" && (e === "plain" || e === "outlined")) return {
217
- color: m.light,
219
+ function ue(e, t) {
220
+ let n = p(t);
221
+ return n ? `${e}-${n}` : e;
222
+ }
223
+ function de(e, t) {
224
+ if (p(t) === "dark" && (e === "plain" || e === "outlined")) return {
225
+ color: f.light,
218
226
  opacity: .6,
219
227
  width: 1.4
220
228
  };
221
229
  }
222
- function le(e) {
230
+ function fe(e) {
223
231
  return e === "plain" ? .84 : .6;
224
232
  }
225
- function g(e) {
233
+ //#endregion
234
+ //#region ../types/src/clone.ts
235
+ function m(e) {
226
236
  let t = [];
227
237
  return JSON.parse(JSON.stringify(e, function(e, n) {
228
238
  if (typeof n != "object" || !n) return n;
@@ -230,21 +240,25 @@ function g(e) {
230
240
  if (!t.includes(n)) return t.push(n), n;
231
241
  }));
232
242
  }
233
- function ue(e) {
243
+ //#endregion
244
+ //#region ../types/src/deep-equal.ts
245
+ function pe(e) {
234
246
  return typeof e == "object" && !!e && !Array.isArray(e);
235
247
  }
236
- function _(e, t) {
248
+ function h(e, t) {
237
249
  if (e === t) return !0;
238
- if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => _(e, t[n]));
239
- if (ue(e)) {
240
- if (!ue(t)) return !1;
250
+ if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => h(e, t[n]));
251
+ if (pe(e)) {
252
+ if (!pe(t)) return !1;
241
253
  let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
242
- for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !_(e[r], t[r])) return !1;
254
+ for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !h(e[r], t[r])) return !1;
243
255
  return !0;
244
256
  }
245
257
  return !1;
246
258
  }
247
- var de = class extends Error {
259
+ //#endregion
260
+ //#region ../types/src/operations.ts
261
+ var g = class extends Error {
248
262
  code;
249
263
  opIndex;
250
264
  blockId;
@@ -252,27 +266,27 @@ var de = class extends Error {
252
266
  super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
253
267
  }
254
268
  };
255
- function fe(e) {
269
+ function me(e) {
256
270
  return e === "1" ? 1 : e === "3" ? 3 : 2;
257
271
  }
258
- function pe(e, t, n = {}) {
259
- let r = g(e);
260
- return me(r, t, n), r;
272
+ function he(e, t, n = {}) {
273
+ let r = m(e);
274
+ return _(r, t, n), r;
261
275
  }
262
- function me(e, t, n = {}) {
276
+ function _(e, t, n = {}) {
263
277
  let r = {
264
278
  locks: n.locks ?? [],
265
279
  session: n.session ?? null
266
280
  };
267
- t.forEach((t, n) => xe(e, t, n, r));
281
+ t.forEach((t, n) => Ce(e, t, n, r));
268
282
  }
269
- var he = /* @__PURE__ */ new Set([
283
+ var ge = /* @__PURE__ */ new Set([
270
284
  "id",
271
285
  "type",
272
286
  "children"
273
- ]), ge = /* @__PURE__ */ new Set();
287
+ ]), _e = /* @__PURE__ */ new Set();
274
288
  function v(e, t, n, r) {
275
- throw new de(e, t, n, r);
289
+ throw new g(e, t, n, r);
276
290
  }
277
291
  function y(e) {
278
292
  return typeof e == "object" && !!e && !Array.isArray(e);
@@ -280,15 +294,15 @@ function y(e) {
280
294
  function b(e) {
281
295
  return e.type === "section";
282
296
  }
283
- function _e(e) {
297
+ function ve(e) {
284
298
  return Array.isArray(e.blocks) ? e.blocks : [];
285
299
  }
286
- function ve(e) {
300
+ function ye(e) {
287
301
  let t = e.children;
288
302
  return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
289
303
  }
290
304
  function x(e, t) {
291
- let n = _e(e);
305
+ let n = ve(e);
292
306
  for (let e = 0; e < n.length; e++) {
293
307
  let r = n[e];
294
308
  if (!y(r)) continue;
@@ -320,31 +334,31 @@ function x(e, t) {
320
334
  }
321
335
  function S(e) {
322
336
  let t = typeof e.id == "string" ? [e.id] : [];
323
- if (b(e)) for (let n of ve(e)) t.push(...ye(n));
337
+ if (b(e)) for (let n of ye(e)) t.push(...be(n));
324
338
  return t;
325
339
  }
326
- function ye(e) {
340
+ function be(e) {
327
341
  return e.flatMap((e) => y(e) ? S(e) : []);
328
342
  }
329
343
  function C(e, t) {
330
344
  return typeof e.blockId != "string" || e.blockId === "" ? v("invalid_operation", t, "blockId must be a block id.") : e.blockId;
331
345
  }
332
- function w(e, t) {
346
+ function xe(e, t) {
333
347
  let n = e.parent;
334
348
  return n === null ? null : y(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
335
349
  sectionId: n.sectionId,
336
350
  column: n.column
337
351
  } : v("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
338
352
  }
339
- function T(e, t) {
353
+ function w(e, t) {
340
354
  let n = e.after;
341
355
  return n === null ? null : typeof n == "string" && n !== "" ? n : v("invalid_operation", t, "after must be null or a block id.");
342
356
  }
343
- function E(e, t) {
357
+ function T(e, t) {
344
358
  let n = e.expect;
345
359
  return n == null ? null : y(n) ? n : v("invalid_operation", t, "expect must be an object.");
346
360
  }
347
- function D(e, t, n) {
361
+ function E(e, t, n) {
348
362
  let r = e.set ?? null, i = e.unset ?? [];
349
363
  (r !== null && !y(r) || !Array.isArray(i) || !i.every((e) => typeof e == "string")) && v("invalid_operation", t, "set must be an object and unset a list of keys.");
350
364
  let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
@@ -356,24 +370,24 @@ function D(e, t, n) {
356
370
  unset: i
357
371
  };
358
372
  }
359
- function O(e, t, n) {
373
+ function D(e, t, n) {
360
374
  if ((!y(e) || typeof e.id != "string" || e.id === "" || typeof e.type != "string") && v("invalid_operation", t, "A block needs a non-empty string id and a string type."), !b(e)) return;
361
375
  n && v("invalid_operation", t, "Sections can only be placed at the top level.");
362
376
  let r = e.children;
363
377
  (!Array.isArray(r) || !r.every((e) => Array.isArray(e))) && v("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
364
- for (let e of r) for (let n of e) O(n, t, !0);
378
+ for (let e of r) for (let n of e) D(n, t, !0);
365
379
  }
366
- function k(e, t) {
380
+ function O(e, t) {
367
381
  return e.session === null || t.sessionId !== e.session;
368
382
  }
369
- function A(e, t, n) {
370
- let r = e.locks.find((n) => t.includes(n.blockId) && k(e, n));
383
+ function k(e, t, n) {
384
+ let r = e.locks.find((n) => t.includes(n.blockId) && O(e, n));
371
385
  r && v("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
372
386
  }
373
- function j(e, t, n, r) {
374
- for (let [i, a] of Object.entries(t)) a !== void 0 && (_(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || v("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
387
+ function A(e, t, n, r) {
388
+ for (let [i, a] of Object.entries(t)) a !== void 0 && (h(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || v("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
375
389
  }
376
- function M(e, t, n) {
390
+ function j(e, t, n) {
377
391
  if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
378
392
  let r = x(e, t.sectionId);
379
393
  if (!r) return v("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
@@ -381,13 +395,13 @@ function M(e, t, n) {
381
395
  let i = r.block.children;
382
396
  return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? v("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
383
397
  }
384
- function N(e, t, n) {
398
+ function M(e, t, n) {
385
399
  if (t === null) return 0;
386
400
  let r = e.findIndex((e) => y(e) && e.id === t);
387
401
  return r === -1 ? v("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
388
402
  }
389
- function be(e, t, n, r) {
390
- let i = fe(t), a = Array.isArray(e.children) ? e.children : [];
403
+ function Se(e, t, n, r) {
404
+ let i = me(t), a = Array.isArray(e.children) ? e.children : [];
391
405
  for (let e = i; e < a.length; e++) {
392
406
  let t = a[e];
393
407
  Array.isArray(t) && t.length > 0 && v("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
@@ -396,74 +410,189 @@ function be(e, t, n, r) {
396
410
  for (; o.length < i;) o.push([]);
397
411
  e.children = o;
398
412
  }
399
- function P(e, t, n) {
413
+ function N(e, t, n) {
400
414
  for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
401
- value: g(r),
415
+ value: m(r),
402
416
  writable: !0,
403
417
  enumerable: !0,
404
418
  configurable: !0
405
- }) : e[n] = g(r);
419
+ }) : e[n] = m(r);
406
420
  for (let t of n) delete e[t];
407
421
  }
408
- function xe(e, t, n, r) {
422
+ function Ce(e, t, n, r) {
409
423
  let i = t;
410
424
  switch ((!y(i) || typeof i.op != "string") && v("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
411
- case "addBlock": return Se(e, i, n);
412
- case "moveBlock": return Ce(e, i, n, r);
413
- case "deleteBlock": return we(e, i, n, r);
414
- case "updateBlock": return Te(e, i, n, r);
415
- case "updateSettings": return Ee(e, i, n);
416
- case "setContent": return De(e, i, n, r);
425
+ case "addBlock": return we(e, i, n);
426
+ case "moveBlock": return Te(e, i, n, r);
427
+ case "deleteBlock": return Ee(e, i, n, r);
428
+ case "updateBlock": return De(e, i, n, r);
429
+ case "updateSettings": return Oe(e, i, n);
430
+ case "setContent": return ke(e, i, n, r);
417
431
  default: v("invalid_operation", n, `Unknown operation "${i.op}".`);
418
432
  }
419
433
  }
420
- function Se(e, t, n) {
421
- let r = w(t, n), i = T(t, n), a = t.block;
422
- O(a, n, r !== null);
423
- let o = new Set(ye(_e(e))), s = /* @__PURE__ */ new Set();
434
+ function we(e, t, n) {
435
+ let r = xe(t, n), i = w(t, n), a = t.block;
436
+ D(a, n, r !== null);
437
+ let o = new Set(be(ve(e))), s = /* @__PURE__ */ new Set();
424
438
  for (let e of S(a)) (o.has(e) || s.has(e)) && v("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
425
- let c = M(e, r, n);
426
- c.splice(N(c, i, n), 0, g(a));
439
+ let c = j(e, r, n);
440
+ c.splice(M(c, i, n), 0, m(a));
427
441
  }
428
- function Ce(e, t, n, r) {
429
- let i = C(t, n), a = w(t, n), o = T(t, n), s = E(t, n), c = x(e, i);
442
+ function Te(e, t, n, r) {
443
+ let i = C(t, n), a = xe(t, n), o = w(t, n), s = T(t, n), c = x(e, i);
430
444
  if (!c) return v("block_missing", n, `No block with id "${i}".`, i);
431
- if (A(r, S(c.block), n), s) {
445
+ if (k(r, S(c.block), n), s) {
432
446
  let e = c.index > 0 ? c.list[c.index - 1] : null, t = y(e) ? e.id ?? null : null;
433
- (!_(c.parent, s.parent ?? null) || !_(t, s.after ?? null)) && v("precondition_failed", n, `Block "${i}" has moved since.`, i);
447
+ (!h(c.parent, s.parent ?? null) || !h(t, s.after ?? null)) && v("precondition_failed", n, `Block "${i}" has moved since.`, i);
434
448
  }
435
449
  b(c.block) && a !== null && v("invalid_operation", n, "Sections can only be placed at the top level."), o === i && v("invalid_operation", n, "A block can't be placed after itself.");
436
- let l = M(e, a, n);
437
- c.list.splice(c.index, 1), l.splice(N(l, o, n), 0, c.block);
450
+ let l = j(e, a, n);
451
+ c.list.splice(c.index, 1), l.splice(M(l, o, n), 0, c.block);
438
452
  }
439
- function we(e, t, n, r) {
440
- let i = C(t, n), a = E(t, n), o = x(e, i);
453
+ function Ee(e, t, n, r) {
454
+ let i = C(t, n), a = T(t, n), o = x(e, i);
441
455
  if (!o) return v("block_missing", n, `No block with id "${i}".`, i);
442
- A(r, S(o.block), n), a && !_(o.block, a.block ?? null) && v("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
456
+ k(r, S(o.block), n), a && !h(o.block, a.block ?? null) && v("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
443
457
  }
444
- function Te(e, t, n, r) {
445
- let i = C(t, n), { set: a, unset: o } = D(t, n, he), s = E(t, n), c = x(e, i);
458
+ function De(e, t, n, r) {
459
+ let i = C(t, n), { set: a, unset: o } = E(t, n, ge), s = T(t, n), c = x(e, i);
446
460
  if (!c) return v("block_missing", n, `No block with id "${i}".`, i);
447
461
  let l = c.block, u = b(l);
448
- u && o.includes("columns") && v("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), A(r, [i], n), s && j(l, s, n, i), u && Object.hasOwn(a, "columns") && be(l, a.columns, n, i), P(l, a, o);
462
+ u && o.includes("columns") && v("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), k(r, [i], n), s && A(l, s, n, i), u && Object.hasOwn(a, "columns") && Se(l, a.columns, n, i), N(l, a, o);
449
463
  }
450
- function Ee(e, t, n) {
451
- let { set: r, unset: i } = D(t, n, ge), a = E(t, n);
464
+ function Oe(e, t, n) {
465
+ let { set: r, unset: i } = E(t, n, _e), a = T(t, n);
452
466
  y(e.settings) || (e.settings = {});
453
467
  let o = e.settings;
454
- a && j(o, a, n), P(o, r, i);
468
+ a && A(o, a, n), N(o, r, i);
455
469
  }
456
- function De(e, t, n, r) {
470
+ function ke(e, t, n, r) {
457
471
  let i = t.content;
458
472
  if (!y(i) || !Array.isArray(i.blocks) || !y(i.settings)) return v("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
459
- let a = r.locks.find((e) => k(r, e));
460
- a && v("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = g(i.blocks), e.settings = g(i.settings);
473
+ let a = r.locks.find((e) => O(r, e));
474
+ a && v("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = m(i.blocks), e.settings = m(i.settings);
475
+ }
476
+ //#endregion
477
+ //#region ../types/src/invert-operations.ts
478
+ function Ae(e) {
479
+ let t = e.children;
480
+ return e.type === "section" && Array.isArray(t) ? t : [];
481
+ }
482
+ function P(e, t, n = null) {
483
+ for (let r = 0; r < e.length; r++) {
484
+ let i = e[r];
485
+ if (i.id === t) return {
486
+ block: i,
487
+ parent: n,
488
+ after: r > 0 ? e[r - 1].id : null
489
+ };
490
+ let a = Ae(i);
491
+ for (let e = 0; e < a.length; e++) {
492
+ if (!Array.isArray(a[e])) continue;
493
+ let n = P(a[e], t, {
494
+ sectionId: i.id,
495
+ column: e
496
+ });
497
+ if (n) return n;
498
+ }
499
+ }
500
+ return null;
501
+ }
502
+ function F(e, t, n) {
503
+ let r = P(e.blocks, t);
504
+ if (!r) throw new g("block_missing", n, `No block with id "${t}".`, t);
505
+ return r;
506
+ }
507
+ function je(e, t, n) {
508
+ let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
509
+ for (let n of o) {
510
+ let o = e[n];
511
+ o === void 0 ? i.push(n) : r[n] = m(o);
512
+ let s = t && n in t ? t[n] : void 0;
513
+ a[n] = s === void 0 ? null : m(s);
514
+ }
515
+ return {
516
+ set: r,
517
+ unset: i,
518
+ expect: a
519
+ };
461
520
  }
462
- var Oe = class extends Error {
521
+ function Me(e, t, n) {
522
+ switch (t.op) {
523
+ case "addBlock": return {
524
+ op: "deleteBlock",
525
+ blockId: t.block.id,
526
+ expect: { block: m(t.block) }
527
+ };
528
+ case "deleteBlock": {
529
+ let r = F(e, t.blockId, n);
530
+ return {
531
+ op: "addBlock",
532
+ block: m(r.block),
533
+ parent: r.parent,
534
+ after: r.after
535
+ };
536
+ }
537
+ case "moveBlock": {
538
+ let r = F(e, t.blockId, n);
539
+ return {
540
+ op: "moveBlock",
541
+ blockId: t.blockId,
542
+ parent: r.parent,
543
+ after: r.after,
544
+ expect: {
545
+ parent: t.parent,
546
+ after: t.after
547
+ }
548
+ };
549
+ }
550
+ case "updateBlock": {
551
+ let r = F(e, t.blockId, n).block, { set: i, unset: a, expect: o } = je(r, t.set, t.unset);
552
+ return {
553
+ op: "updateBlock",
554
+ blockId: t.blockId,
555
+ ...Object.keys(i).length > 0 ? { set: i } : {},
556
+ ...a.length > 0 ? { unset: a } : {},
557
+ expect: o
558
+ };
559
+ }
560
+ case "updateSettings": {
561
+ let { set: n, unset: r, expect: i } = je(e.settings, t.set, t.unset);
562
+ return {
563
+ op: "updateSettings",
564
+ ...Object.keys(n).length > 0 ? { set: n } : {},
565
+ ...r.length > 0 ? { unset: r } : {},
566
+ expect: i
567
+ };
568
+ }
569
+ case "setContent": return {
570
+ op: "setContent",
571
+ content: {
572
+ blocks: m(e.blocks),
573
+ settings: m(e.settings)
574
+ }
575
+ };
576
+ }
577
+ }
578
+ function Ne(e, t) {
579
+ let n = m(e), r = [];
580
+ return t.forEach((e, t) => {
581
+ r.push(Me(n, e, t));
582
+ try {
583
+ _(n, [e]);
584
+ } catch (e) {
585
+ throw e instanceof g ? new g(e.code, t, e.message, e.blockId) : e;
586
+ }
587
+ }), r.reverse();
588
+ }
589
+ //#endregion
590
+ //#region ../types/src/config.ts
591
+ var Pe = class extends Error {
463
592
  statusCode;
464
593
  code;
465
- constructor(e, t, n) {
466
- super(e), this.statusCode = t, this.code = n, this.name = "SdkError";
594
+ constructor(e, t, n, r) {
595
+ super(e), this.statusCode = t, this.code = n, this.name = "SdkError", r !== void 0 && Object.keys(r).length > 0 && (this.details = r);
467
596
  }
468
597
  get isNotFound() {
469
598
  return this.statusCode === 404;
@@ -475,28 +604,81 @@ var Oe = class extends Error {
475
604
  return this.statusCode !== void 0 && this.statusCode >= 500;
476
605
  }
477
606
  };
478
- function F(e) {
607
+ //#endregion
608
+ //#region ../types/src/collaboration.ts
609
+ function Fe(e) {
610
+ return e === "invalid_operation" ? 422 : e === "content_too_large" ? 413 : 409;
611
+ }
612
+ var Ie = class extends Pe {
613
+ opIndex;
614
+ holder;
615
+ holders;
616
+ constructor(e, t) {
617
+ super(e, t.status ?? Fe(t.code), t.code), this.name = "CollaborationConflict", t.opIndex !== void 0 && (this.opIndex = t.opIndex), t.holder !== void 0 && (this.holder = t.holder), t.holders !== void 0 && (this.holders = t.holders);
618
+ }
619
+ };
620
+ //#endregion
621
+ //#region ../types/src/guards.ts
622
+ function I(e) {
479
623
  return e.type === "section";
480
624
  }
481
- function ke(e) {
625
+ function Le(e) {
626
+ return e.type === "title";
627
+ }
628
+ function Re(e) {
629
+ return e.type === "paragraph";
630
+ }
631
+ function ze(e) {
632
+ return e.type === "image";
633
+ }
634
+ function Be(e) {
635
+ return e.type === "button";
636
+ }
637
+ function Ve(e) {
638
+ return e.type === "divider";
639
+ }
640
+ function He(e) {
641
+ return e.type === "video";
642
+ }
643
+ function Ue(e) {
644
+ return e.type === "social";
645
+ }
646
+ function We(e) {
647
+ return e.type === "spacer";
648
+ }
649
+ function Ge(e) {
650
+ return e.type === "html";
651
+ }
652
+ function Ke(e) {
653
+ return e.type === "menu";
654
+ }
655
+ function qe(e) {
656
+ return e.type === "table";
657
+ }
658
+ function Je(e) {
659
+ return e.type === "countdown";
660
+ }
661
+ function Ye(e) {
482
662
  return e.type === "custom";
483
663
  }
484
- function I(e) {
664
+ function L(e) {
485
665
  return e.type === "slot";
486
666
  }
487
- function L(e) {
667
+ function R(e) {
488
668
  return e.type === "wrapper";
489
669
  }
490
- var R = {
670
+ //#endregion
671
+ //#region ../types/src/defaults.ts
672
+ var Xe = {
491
673
  content: "<p>Enter your title</p>",
492
674
  level: 2,
493
675
  textAlign: "left"
494
- }, Ae = { content: "<p>Enter your text here</p>" }, je = {
676
+ }, Ze = { content: "<p>Enter your text here</p>" }, Qe = {
495
677
  src: "",
496
678
  alt: "",
497
679
  width: "full",
498
680
  align: "center"
499
- }, Me = {
681
+ }, z = {
500
682
  text: "Click Here",
501
683
  url: "",
502
684
  backgroundColor: "#333333",
@@ -510,36 +692,36 @@ var R = {
510
692
  left: 24
511
693
  },
512
694
  align: "center"
513
- }, Ne = {
695
+ }, $e = {
514
696
  lineStyle: "solid",
515
697
  color: "#e0e0e0",
516
698
  thickness: 1,
517
699
  width: "full"
518
- }, Pe = { columns: "1" }, Fe = {
700
+ }, et = { columns: "1" }, tt = {
519
701
  url: "",
520
702
  thumbnailUrl: "",
521
703
  alt: "Video",
522
704
  width: "full",
523
705
  align: "center"
524
- }, Ie = {
706
+ }, nt = {
525
707
  iconStyle: "solid",
526
708
  iconSize: "medium",
527
709
  spacing: 10,
528
710
  align: "center"
529
- }, Le = { height: 24 }, Re = { content: "" }, ze = {
711
+ }, rt = { height: 24 }, it = { content: "" }, at = {
530
712
  fontSize: 15,
531
713
  textAlign: "center",
532
714
  separator: "|",
533
715
  separatorColor: "#e0e0e0",
534
716
  spacing: 10
535
- }, Be = {
717
+ }, ot = {
536
718
  hasHeaderRow: !0,
537
719
  borderColor: "#e0e0e0",
538
720
  borderWidth: 1,
539
721
  cellPadding: 8,
540
722
  fontSize: 15,
541
723
  textAlign: "left"
542
- }, Ve = {
724
+ }, st = {
543
725
  targetDate: "",
544
726
  timezone: "UTC",
545
727
  showDays: !0,
@@ -559,21 +741,21 @@ var R = {
559
741
  expiredMessage: "This offer has expired",
560
742
  expiredImageUrl: "",
561
743
  hideOnExpiry: !1
562
- }, He = {
563
- title: R,
564
- paragraph: Ae,
565
- image: je,
566
- button: Me,
567
- divider: Ne,
568
- section: Pe,
569
- video: Fe,
570
- social: Ie,
571
- spacer: Le,
572
- html: Re,
573
- menu: ze,
574
- table: Be,
575
- countdown: Ve
576
- }, Ue = {
744
+ }, ct = {
745
+ title: Xe,
746
+ paragraph: Ze,
747
+ image: Qe,
748
+ button: z,
749
+ divider: $e,
750
+ section: et,
751
+ video: tt,
752
+ social: nt,
753
+ spacer: rt,
754
+ html: it,
755
+ menu: at,
756
+ table: ot,
757
+ countdown: st
758
+ }, lt = {
577
759
  width: 600,
578
760
  backgroundColor: "#ffffff",
579
761
  textColor: "#1a1a1a",
@@ -581,28 +763,32 @@ var R = {
581
763
  fontFamily: "Arial",
582
764
  locale: "en"
583
765
  };
584
- function We(e) {
766
+ function ut(e) {
585
767
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
586
768
  }
587
- function z(e, t) {
769
+ function B(e, t) {
588
770
  let n = { ...e };
589
771
  for (let r of Object.keys(t)) {
590
772
  let i = e[r], a = t[r];
591
- a !== void 0 && (n[r] = We(i) && We(a) ? z(i, a) : a);
773
+ a !== void 0 && (n[r] = ut(i) && ut(a) ? B(i, a) : a);
592
774
  }
593
775
  return n;
594
776
  }
595
- function Ge(e = "Arial", t) {
777
+ //#endregion
778
+ //#region ../types/src/template.ts
779
+ function dt(e = "Arial", t) {
596
780
  return {
597
781
  blocks: [],
598
782
  settings: {
599
- ...Ue,
783
+ ...lt,
600
784
  fontFamily: e,
601
785
  ...t
602
786
  }
603
787
  };
604
788
  }
605
- var Ke = [
789
+ //#endregion
790
+ //#region ../types/src/direction.ts
791
+ var ft = [
606
792
  "ar",
607
793
  "he",
608
794
  "iw",
@@ -616,24 +802,26 @@ var Ke = [
616
802
  "ckb",
617
803
  "ks"
618
804
  ];
619
- function qe(e) {
805
+ function pt(e) {
620
806
  let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
621
- return !!t && Ke.includes(t);
807
+ return !!t && ft.includes(t);
622
808
  }
623
- function Je(e) {
624
- return e.direction === "ltr" || e.direction === "rtl" ? e.direction : qe(e.locale) ? "rtl" : "ltr";
809
+ function mt(e) {
810
+ return e.direction === "ltr" || e.direction === "rtl" ? e.direction : pt(e.locale) ? "rtl" : "ltr";
625
811
  }
626
- function B(e, t) {
627
- let n = g(e);
628
- return !t || Object.keys(t).length === 0 ? n : z(n, t);
812
+ //#endregion
813
+ //#region ../types/src/factory.ts
814
+ function V(e, t) {
815
+ let n = m(e);
816
+ return !t || Object.keys(t).length === 0 ? n : B(n, t);
629
817
  }
630
- function V(e) {
631
- return e === void 0 ? void 0 : g(e);
818
+ function H(e) {
819
+ return e === void 0 ? void 0 : m(e);
632
820
  }
633
- function H() {
821
+ function U() {
634
822
  return crypto.randomUUID();
635
823
  }
636
- function Ye(e = 0) {
824
+ function ht(e = 0) {
637
825
  return {
638
826
  top: e,
639
827
  right: e,
@@ -641,135 +829,135 @@ function Ye(e = 0) {
641
829
  left: e
642
830
  };
643
831
  }
644
- function U(e = 10) {
645
- return { padding: Ye(e) };
832
+ function W(e = 10) {
833
+ return { padding: ht(e) };
646
834
  }
647
- function Xe(e = {}) {
648
- return B({
649
- id: H(),
835
+ function gt(e = {}) {
836
+ return V({
837
+ id: U(),
650
838
  type: "title",
651
- ...R,
652
- styles: U()
839
+ ...Xe,
840
+ styles: W()
653
841
  }, e);
654
842
  }
655
- function Ze(e = {}) {
656
- return B({
657
- id: H(),
843
+ function _t(e = {}) {
844
+ return V({
845
+ id: U(),
658
846
  type: "paragraph",
659
- ...Ae,
660
- styles: U()
847
+ ...Ze,
848
+ styles: W()
661
849
  }, e);
662
850
  }
663
- function Qe(e = {}) {
664
- return B({
665
- id: H(),
851
+ function vt(e = {}) {
852
+ return V({
853
+ id: U(),
666
854
  type: "image",
667
- ...je,
668
- styles: U()
855
+ ...Qe,
856
+ styles: W()
669
857
  }, e);
670
858
  }
671
- function $e(e = {}) {
672
- return B({
673
- id: H(),
859
+ function yt(e = {}) {
860
+ return V({
861
+ id: U(),
674
862
  type: "button",
675
- ...Me,
676
- styles: U()
863
+ ...z,
864
+ styles: W()
677
865
  }, e);
678
866
  }
679
- function W(e = {}) {
680
- return B({
681
- id: H(),
867
+ function bt(e = {}) {
868
+ return V({
869
+ id: U(),
682
870
  type: "divider",
683
- ...Ne,
684
- styles: U(20)
871
+ ...$e,
872
+ styles: W(20)
685
873
  }, e);
686
874
  }
687
- function et(e = {}) {
688
- return B({
689
- id: H(),
875
+ function xt(e = {}) {
876
+ return V({
877
+ id: U(),
690
878
  type: "section",
691
- ...Pe,
879
+ ...et,
692
880
  children: [[]],
693
- styles: U(20)
881
+ styles: W(20)
694
882
  }, e);
695
883
  }
696
- function tt(e = {}) {
697
- return B({
698
- id: H(),
884
+ function St(e = {}) {
885
+ return V({
886
+ id: U(),
699
887
  type: "video",
700
- ...Fe,
701
- styles: U()
888
+ ...tt,
889
+ styles: W()
702
890
  }, e);
703
891
  }
704
- function nt(e = {}) {
705
- return B({
706
- id: H(),
892
+ function Ct(e = {}) {
893
+ return V({
894
+ id: U(),
707
895
  type: "social",
708
896
  icons: [],
709
- ...Ie,
710
- styles: U()
897
+ ...nt,
898
+ styles: W()
711
899
  }, e);
712
900
  }
713
- function rt(e = {}) {
714
- return B({
715
- id: H(),
901
+ function wt(e = {}) {
902
+ return V({
903
+ id: U(),
716
904
  type: "spacer",
717
- ...Le,
718
- styles: U(0)
905
+ ...rt,
906
+ styles: W(0)
719
907
  }, e);
720
908
  }
721
- function it(e = {}) {
722
- return B({
723
- id: H(),
909
+ function Tt(e = {}) {
910
+ return V({
911
+ id: U(),
724
912
  type: "html",
725
- ...Re,
726
- styles: U()
913
+ ...it,
914
+ styles: W()
727
915
  }, e);
728
916
  }
729
- function at(e = {}) {
730
- return B({
731
- id: H(),
917
+ function Et(e = {}) {
918
+ return V({
919
+ id: U(),
732
920
  type: "menu",
733
921
  items: [],
734
- ...ze,
735
- styles: U()
922
+ ...at,
923
+ styles: W()
736
924
  }, e);
737
925
  }
738
- function ot(e, t) {
926
+ function Dt(e, t) {
739
927
  return Array.from({ length: t }, () => ({
740
- id: H(),
928
+ id: U(),
741
929
  cells: Array.from({ length: e }, () => ({
742
- id: H(),
930
+ id: U(),
743
931
  content: ""
744
932
  }))
745
933
  }));
746
934
  }
747
- function st(e = {}) {
748
- return B({
749
- id: H(),
935
+ function Ot(e = {}) {
936
+ return V({
937
+ id: U(),
750
938
  type: "table",
751
- rows: ot(3, 3),
752
- ...Be,
753
- styles: U()
939
+ rows: Dt(3, 3),
940
+ ...ot,
941
+ styles: W()
754
942
  }, e);
755
943
  }
756
- function ct(e = {}) {
757
- return B({
758
- id: H(),
944
+ function kt(e = {}) {
945
+ return V({
946
+ id: U(),
759
947
  type: "countdown",
760
- ...Ve,
761
- styles: U()
948
+ ...st,
949
+ styles: W()
762
950
  }, e);
763
951
  }
764
- function lt(e) {
952
+ function At(e) {
765
953
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
766
954
  }
767
- function ut(e) {
955
+ function jt(e) {
768
956
  let t = {};
769
- for (let n of e.fields) t[n.key] = V(lt(n));
770
- let n = B(U(), V(e.defaultStyles));
957
+ for (let n of e.fields) t[n.key] = H(At(n));
958
+ let n = V(W(), H(e.defaultStyles));
771
959
  return {
772
- id: H(),
960
+ id: U(),
773
961
  type: "custom",
774
962
  customType: e.type,
775
963
  fieldValues: t,
@@ -777,36 +965,36 @@ function ut(e) {
777
965
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
778
966
  };
779
967
  }
780
- function dt() {
968
+ function Mt() {
781
969
  return {
782
- id: H(),
970
+ id: U(),
783
971
  type: "slot",
784
- styles: U(0)
972
+ styles: W(0)
785
973
  };
786
974
  }
787
- function ft(e = {}) {
788
- return B({
789
- id: H(),
975
+ function Nt(e = {}) {
976
+ return V({
977
+ id: U(),
790
978
  type: "wrapper",
791
979
  children: [],
792
- styles: U(0)
980
+ styles: W(0)
793
981
  }, e);
794
982
  }
795
- function pt(e, t) {
983
+ function Pt(e, t) {
796
984
  switch (e) {
797
- case "section": return et(V(t?.section));
798
- case "title": return Xe(V(t?.title));
799
- case "paragraph": return Ze(V(t?.paragraph));
800
- case "image": return Qe(V(t?.image));
801
- case "button": return $e(V(t?.button));
802
- case "divider": return W(V(t?.divider));
803
- case "video": return tt(V(t?.video));
804
- case "social": return nt(V(t?.social));
805
- case "spacer": return rt(V(t?.spacer));
806
- case "html": return it(V(t?.html));
807
- case "menu": return at(V(t?.menu));
808
- case "table": return st(V(t?.table));
809
- case "countdown": return ct(V(t?.countdown));
985
+ case "section": return xt(H(t?.section));
986
+ case "title": return gt(H(t?.title));
987
+ case "paragraph": return _t(H(t?.paragraph));
988
+ case "image": return vt(H(t?.image));
989
+ case "button": return yt(H(t?.button));
990
+ case "divider": return bt(H(t?.divider));
991
+ case "video": return St(H(t?.video));
992
+ case "social": return Ct(H(t?.social));
993
+ case "spacer": return wt(H(t?.spacer));
994
+ case "html": return Tt(H(t?.html));
995
+ case "menu": return Et(H(t?.menu));
996
+ case "table": return Ot(H(t?.table));
997
+ case "countdown": return kt(H(t?.countdown));
810
998
  case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
811
999
  case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
812
1000
  default: throw Error(`Unknown block type: ${e}`);
@@ -814,107 +1002,111 @@ function pt(e, t) {
814
1002
  }
815
1003
  function G(e) {
816
1004
  let t = JSON.parse(JSON.stringify(e));
817
- if (t.id = H(), t.type === "table") for (let e of t.rows) {
818
- e.id = H();
819
- for (let t of e.cells) t.id = H();
1005
+ if (t.id = U(), t.type === "table") for (let e of t.rows) {
1006
+ e.id = U();
1007
+ for (let t of e.cells) t.id = U();
820
1008
  }
821
- if (t.type === "menu") for (let e of t.items) e.id = H();
822
- if (t.type === "social") for (let e of t.icons) e.id = H();
1009
+ if (t.type === "menu") for (let e of t.items) e.id = U();
1010
+ if (t.type === "social") for (let e of t.icons) e.id = U();
823
1011
  return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => G(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => G(e))), t;
824
1012
  }
825
- var mt = "[Templatical] layout: must contain exactly one slot block", ht = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", gt = "[Templatical] layout: a wrapper cannot contain a wrapper", _t = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", vt = "[Templatical] slot is not a valid content block", yt = "[Templatical] wrapper is not a valid content block";
1013
+ //#endregion
1014
+ //#region ../types/src/layout.ts
1015
+ var Ft = "[Templatical] layout: must contain exactly one slot block", It = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Lt = "[Templatical] layout: a wrapper cannot contain a wrapper", Rt = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", zt = "[Templatical] slot is not a valid content block", Bt = "[Templatical] wrapper is not a valid content block";
826
1016
  function K(e, t, n = null, r = !1) {
827
- for (let i of e) if (t(i, n, r), F(i)) for (let e of i.children) K(e, t, i, !0);
828
- else L(i) && K(i.children, t, i, r);
1017
+ for (let i of e) if (t(i, n, r), I(i)) for (let e of i.children) K(e, t, i, !0);
1018
+ else R(i) && K(i.children, t, i, r);
829
1019
  }
830
- function bt(e) {
1020
+ function Vt(e) {
831
1021
  let t = 0;
832
1022
  if (K(e.blocks, (e, n, r) => {
833
- if (I(e) && (t += 1, r)) throw Error(ht);
834
- if (L(e)) {
835
- if (r) throw Error(ht);
836
- if (e.children.some(L)) throw Error(gt);
1023
+ if (L(e) && (t += 1, r)) throw Error(It);
1024
+ if (R(e)) {
1025
+ if (r) throw Error(It);
1026
+ if (e.children.some(R)) throw Error(Lt);
837
1027
  }
838
- }), t !== 1) throw Error(mt);
1028
+ }), t !== 1) throw Error(Ft);
839
1029
  }
840
- function xt(e) {
1030
+ function Ht(e) {
841
1031
  K(e.blocks, (e) => {
842
- if (I(e)) throw Error(vt);
1032
+ if (L(e)) throw Error(zt);
843
1033
  });
844
1034
  }
845
- function St(e) {
1035
+ function Ut(e) {
846
1036
  K(e.blocks, (e) => {
847
- if (L(e)) throw Error(yt);
1037
+ if (R(e)) throw Error(Bt);
848
1038
  });
849
1039
  }
850
- function Ct(e) {
1040
+ function Wt(e) {
851
1041
  let t = !1;
852
1042
  return K(e.blocks, (e, n) => {
853
- I(e) && n !== null && L(n) && (t = !0);
1043
+ L(e) && n !== null && R(n) && (t = !0);
854
1044
  }), t;
855
1045
  }
856
- function wt(e) {
857
- if (I(e)) return e;
858
- if (L(e)) {
1046
+ function Gt(e) {
1047
+ if (L(e)) return e;
1048
+ if (R(e)) {
859
1049
  let t = G({
860
1050
  ...e,
861
1051
  children: []
862
1052
  });
863
- return t.children = e.children.map(wt), t;
1053
+ return t.children = e.children.map(Gt), t;
864
1054
  }
865
1055
  return G(e);
866
1056
  }
867
- function Tt(e) {
1057
+ function Kt(e) {
868
1058
  for (let t = 0; t < e.length; t++) {
869
1059
  let n = e[t];
870
- if (I(n)) return {
1060
+ if (L(n)) return {
871
1061
  parent: e,
872
1062
  index: t
873
1063
  };
874
- if (L(n)) {
875
- let e = Tt(n.children);
1064
+ if (R(n)) {
1065
+ let e = Kt(n.children);
876
1066
  if (e) return e;
877
1067
  }
878
1068
  }
879
1069
  return null;
880
1070
  }
881
- function Et(e) {
882
- for (let t of e) if (F(t)) {
1071
+ function qt(e) {
1072
+ for (let t of e) if (I(t)) {
883
1073
  if (t.wrapper) return !0;
884
- for (let e of t.children) if (Et(e)) return !0;
1074
+ for (let e of t.children) if (qt(e)) return !0;
885
1075
  }
886
1076
  return !1;
887
1077
  }
888
- function Dt(e, t) {
889
- if (bt(e), xt(t), St(t), Ct(e) && Et(t.blocks)) throw Error(_t);
890
- let n = e.blocks.map(wt), r = Tt(n);
891
- if (!r) throw Error(mt);
892
- return r.parent.splice(r.index, 1, ...g(t.blocks)), {
1078
+ function Jt(e, t) {
1079
+ if (Vt(e), Ht(t), Ut(t), Wt(e) && qt(t.blocks)) throw Error(Rt);
1080
+ let n = e.blocks.map(Gt), r = Kt(n);
1081
+ if (!r) throw Error(Ft);
1082
+ return r.parent.splice(r.index, 1, ...m(t.blocks)), {
893
1083
  blocks: n,
894
1084
  settings: {
895
- ...g(t.settings),
1085
+ ...m(t.settings),
896
1086
  backgroundColor: e.settings.backgroundColor
897
1087
  }
898
1088
  };
899
1089
  }
900
- var Ot = /* @__PURE__ */ new Set(["\"", "'"]);
901
- function kt(e, t) {
1090
+ //#endregion
1091
+ //#region ../types/src/html-scan.ts
1092
+ var Yt = /* @__PURE__ */ new Set(["\"", "'"]);
1093
+ function Xt(e, t) {
902
1094
  let n = null;
903
1095
  for (let r = t; r < e.length; r++) {
904
1096
  let t = e[r];
905
1097
  if (n !== null) t === n && (n = null);
906
- else if (Ot.has(t)) n = t;
1098
+ else if (Yt.has(t)) n = t;
907
1099
  else if (t === ">") return r;
908
1100
  }
909
1101
  return -1;
910
1102
  }
911
- function At(e) {
1103
+ function Zt(e) {
912
1104
  return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
913
1105
  }
914
1106
  function q(e) {
915
1107
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
916
1108
  }
917
- var jt = {
1109
+ var Qt = {
918
1110
  amp: "&",
919
1111
  lt: "<",
920
1112
  gt: ">",
@@ -922,22 +1114,22 @@ var jt = {
922
1114
  apos: "'",
923
1115
  nbsp: "\xA0"
924
1116
  };
925
- function Mt(e) {
1117
+ function $t(e) {
926
1118
  return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
927
1119
  if (t[0] === "#") {
928
1120
  let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
929
1121
  return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
930
1122
  }
931
- return jt[t.toLowerCase()] ?? e;
1123
+ return Qt[t.toLowerCase()] ?? e;
932
1124
  }) : e;
933
1125
  }
934
- function Nt(e, t) {
1126
+ function en(e, t) {
935
1127
  let n = t.toLowerCase(), r = 0;
936
1128
  for (; r < e.length;) {
937
1129
  for (; r < e.length && (q(e[r]) || e[r] === "/");) r++;
938
1130
  if (r >= e.length) break;
939
1131
  let t = r;
940
- for (; r < e.length && At(e[r]);) r++;
1132
+ for (; r < e.length && Zt(e[r]);) r++;
941
1133
  let i = e.substring(t, r).toLowerCase();
942
1134
  if (i === "") {
943
1135
  r++;
@@ -947,27 +1139,31 @@ function Nt(e, t) {
947
1139
  if (e[r] !== "=") continue;
948
1140
  for (r++; r < e.length && q(e[r]);) r++;
949
1141
  let a = e[r];
950
- if (Ot.has(a)) {
1142
+ if (Yt.has(a)) {
951
1143
  let t = r + 1, o = e.indexOf(a, t);
952
1144
  if (o === -1) return null;
953
- if (i === n) return Mt(e.substring(t, o));
1145
+ if (i === n) return $t(e.substring(t, o));
954
1146
  r = o + 1;
955
1147
  continue;
956
1148
  }
957
1149
  let o = r;
958
1150
  for (; r < e.length && !q(e[r]) && e[r] !== ">";) r++;
959
- if (i === n) return Mt(e.substring(o, r));
1151
+ if (i === n) return $t(e.substring(o, r));
960
1152
  }
961
1153
  return null;
962
1154
  }
963
- var Pt = /<\/?p\b[^<>]*>/gi, Ft = /<p\b([^<>]*)>\s*<\/p>/gi;
964
- function It(e) {
965
- return e.replace(Pt, "").trim() === "";
1155
+ //#endregion
1156
+ //#region ../types/src/rich-text.ts
1157
+ var tn = /<\/?p\b[^<>]*>/gi, nn = /<p\b([^<>]*)>\s*<\/p>/gi;
1158
+ function rn(e) {
1159
+ return e.replace(tn, "").trim() === "";
966
1160
  }
967
- function Lt(e) {
968
- return It(e) ? e : e.replace(Ft, "<p$1>&nbsp;</p>");
1161
+ function an(e) {
1162
+ return rn(e) ? e : e.replace(nn, "<p$1>&nbsp;</p>");
969
1163
  }
970
- var Rt = {
1164
+ //#endregion
1165
+ //#region ../types/src/fonts.ts
1166
+ var on = {
971
1167
  arial: "Arial, sans-serif",
972
1168
  helvetica: "Helvetica, sans-serif",
973
1169
  georgia: "Georgia, serif",
@@ -976,13 +1172,13 @@ var Rt = {
976
1172
  "trebuchet ms": "'Trebuchet MS', sans-serif",
977
1173
  "courier new": "'Courier New', monospace",
978
1174
  tahoma: "Tahoma, sans-serif"
979
- }, zt = /* @__PURE__ */ new Set([
1175
+ }, sn = /* @__PURE__ */ new Set([
980
1176
  "inherit",
981
1177
  "initial",
982
1178
  "unset",
983
1179
  "revert",
984
1180
  "revert-layer"
985
- ]), Bt = /* @__PURE__ */ new Set([
1181
+ ]), cn = /* @__PURE__ */ new Set([
986
1182
  "serif",
987
1183
  "sans-serif",
988
1184
  "monospace",
@@ -997,14 +1193,14 @@ var Rt = {
997
1193
  "math",
998
1194
  "fangsong"
999
1195
  ]);
1000
- function Vt(e) {
1196
+ function ln(e) {
1001
1197
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
1002
1198
  }
1003
1199
  function J(e) {
1004
1200
  if (typeof e != "string") return [];
1005
1201
  let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
1006
1202
  for (;;) {
1007
- for (; r < t.length && Vt(t[r]);) r++;
1203
+ for (; r < t.length && ln(t[r]);) r++;
1008
1204
  if (r >= t.length) return [];
1009
1205
  let e = t[r];
1010
1206
  if (e === "\"" || e === "'") {
@@ -1021,7 +1217,7 @@ function J(e) {
1021
1217
  }
1022
1218
  }
1023
1219
  if (!o) return [];
1024
- for (; a < t.length && Vt(t[a]);) a++;
1220
+ for (; a < t.length && ln(t[a]);) a++;
1025
1221
  if (a < t.length && t[a] !== ",") return [];
1026
1222
  n.push({
1027
1223
  name: i,
@@ -1029,7 +1225,7 @@ function J(e) {
1029
1225
  }), r = a;
1030
1226
  } else {
1031
1227
  let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
1032
- if (a === "" || a.includes("\"") || a.includes("'") || zt.has(a.toLowerCase())) return [];
1228
+ if (a === "" || a.includes("\"") || a.includes("'") || sn.has(a.toLowerCase())) return [];
1033
1229
  n.push({
1034
1230
  name: a,
1035
1231
  quoted: !1
@@ -1039,67 +1235,71 @@ function J(e) {
1039
1235
  r++;
1040
1236
  }
1041
1237
  }
1042
- function Ht(e) {
1238
+ function un(e) {
1043
1239
  return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
1044
1240
  }
1045
- function Ut(e) {
1046
- return !e.quoted && Bt.has(e.name.toLowerCase());
1241
+ function dn(e) {
1242
+ return !e.quoted && cn.has(e.name.toLowerCase());
1047
1243
  }
1048
- function Wt(e) {
1244
+ function fn(e) {
1049
1245
  return J(e)[0]?.name ?? "";
1050
1246
  }
1051
- function Gt(e, t) {
1052
- let n = (e) => `${Ht(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
1247
+ function pn(e, t) {
1248
+ let n = (e) => `${un(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
1053
1249
  if (i) return n(i);
1054
1250
  let a = J(e);
1055
1251
  if (a.length !== 1) return e;
1056
1252
  let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
1057
- return c ? n(c) : Rt[s] || (Ut(o) ? e : `${Ht(o.name)}, ${t.defaultFallback}`);
1253
+ return c ? n(c) : on[s] || (dn(o) ? e : `${un(o.name)}, ${t.defaultFallback}`);
1058
1254
  }
1255
+ //#endregion
1256
+ //#region ../types/src/merge-tags.ts
1059
1257
  var Y = {
1060
1258
  liquid: {
1061
1259
  value: /\{\{.+?\}\}/g,
1062
- logic: /\{%-?\s*(\w+).*?-?%\}/g
1260
+ logic: /\{%-?\s*(\w+).*?-?%\}/g,
1261
+ opener: "{{",
1262
+ closer: "}}"
1063
1263
  },
1064
1264
  handlebars: {
1065
1265
  value: /\{\{\{?.+?\}?\}\}/g,
1066
- logic: /\{\{[#/](\w+).*?\}\}/g
1266
+ logic: /\{\{[#/](\w+).*?\}\}/g,
1267
+ opener: "{{",
1268
+ closer: "}}"
1067
1269
  },
1068
1270
  mailchimp: {
1069
1271
  value: /\*\|\w+\|\*/g,
1070
- logic: /\*\|(\w+)[:|].*?\|\*/g
1272
+ logic: /\*\|(\w+)[:|].*?\|\*/g,
1273
+ opener: "*|",
1274
+ closer: "|*"
1071
1275
  },
1072
1276
  ampscript: {
1073
1277
  value: /%%=.+?=%%/g,
1074
- logic: /%%\[\s*(\w+).*?\]%%/g
1278
+ logic: /%%\[\s*(\w+).*?\]%%/g,
1279
+ opener: "%%=",
1280
+ closer: "=%%"
1075
1281
  }
1076
- }, Kt = {
1077
- liquid: "{{",
1078
- handlebars: "{{",
1079
- mailchimp: "*|",
1080
- ampscript: "%%="
1081
- }, qt = {
1082
- liquid: "}}",
1083
- handlebars: "}}",
1084
- mailchimp: "|*",
1085
- ampscript: "=%%"
1086
1282
  };
1087
- function Jt(e) {
1088
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return Kt[t];
1089
- return null;
1283
+ function mn(e) {
1284
+ return typeof e == "string" && e.trim() !== "" ? e : null;
1090
1285
  }
1091
- function Yt(e) {
1092
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return qt[t];
1093
- return null;
1286
+ function hn(e) {
1287
+ return Object.values(Y).find((t) => t.value.source === e.value.source) ?? null;
1094
1288
  }
1095
- function Xt(e) {
1289
+ function gn(e) {
1290
+ return mn(e.opener) ?? hn(e)?.opener ?? null;
1291
+ }
1292
+ function _n(e) {
1293
+ return mn(e.closer) ?? hn(e)?.closer ?? null;
1294
+ }
1295
+ function vn(e) {
1096
1296
  return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
1097
1297
  }
1098
1298
  function X(e) {
1099
1299
  let t = e.source, n = e.flags.replace("g", "");
1100
1300
  return RegExp(`^${t}$`, n);
1101
1301
  }
1102
- function Zt(e, t) {
1302
+ function yn(e, t) {
1103
1303
  let n = e?.trim() || "";
1104
1304
  return !X(t.logic).test(n) && X(t.value).test(n);
1105
1305
  }
@@ -1107,41 +1307,41 @@ function Z(e, t) {
1107
1307
  let n = t.find((t) => t.value === e);
1108
1308
  return n ? n.label : e;
1109
1309
  }
1110
- function Qt(e, t) {
1310
+ function bn(e, t) {
1111
1311
  return $(e, "data-merge-tag", (e) => Z(e, t));
1112
1312
  }
1113
1313
  function Q(e, t) {
1114
1314
  return t.find((t) => t.value === e)?.sample;
1115
1315
  }
1116
- function $t(e, t) {
1117
- return $(e, "data-merge-tag", (e) => nn(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
1316
+ function xn(e, t) {
1317
+ return $(e, "data-merge-tag", (e) => wn(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
1118
1318
  }
1119
- function en(e) {
1319
+ function Sn(e) {
1120
1320
  return e.some((e) => e.sample !== void 0);
1121
1321
  }
1122
- function tn(e, t) {
1322
+ function Cn(e, t) {
1123
1323
  if (!e) return e;
1124
1324
  let n = e;
1125
1325
  for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
1126
1326
  return n;
1127
1327
  }
1128
- function nn(e) {
1328
+ function wn(e) {
1129
1329
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1130
1330
  }
1131
- function rn(e, t) {
1331
+ function Tn(e, t) {
1132
1332
  if (!e) return !1;
1133
1333
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
1134
1334
  return n.test(e) || r.test(e);
1135
1335
  }
1136
- function an(e, t) {
1336
+ function En(e, t) {
1137
1337
  return X(t.logic).test(e?.trim() || "");
1138
1338
  }
1139
- function on(e, t) {
1339
+ function Dn(e, t) {
1140
1340
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
1141
1341
  return r && r[1] ? r[1].toUpperCase() : e;
1142
1342
  }
1143
- function sn(e, t) {
1144
- return $(e, "data-logic-merge-tag", (e) => on(e, t));
1343
+ function On(e, t) {
1344
+ return $(e, "data-logic-merge-tag", (e) => Dn(e, t));
1145
1345
  }
1146
1346
  function $(e, t, n, r) {
1147
1347
  let i = "", a = 0;
@@ -1156,7 +1356,7 @@ function $(e, t, n, r) {
1156
1356
  i += e.substring(a, o + 5), a = o + 5;
1157
1357
  continue;
1158
1358
  }
1159
- let c = kt(e, o + 5);
1359
+ let c = Xt(e, o + 5);
1160
1360
  if (c === -1) {
1161
1361
  i += e.substring(a);
1162
1362
  break;
@@ -1166,7 +1366,7 @@ function $(e, t, n, r) {
1166
1366
  i += e.substring(a);
1167
1367
  break;
1168
1368
  }
1169
- let u = Nt(e.substring(o + 5, c), t);
1369
+ let u = en(e.substring(o + 5, c), t);
1170
1370
  if (u === null) {
1171
1371
  i += e.substring(a, o + 5), a = o + 5;
1172
1372
  continue;
@@ -1176,10 +1376,12 @@ function $(e, t, n, r) {
1176
1376
  }
1177
1377
  return i;
1178
1378
  }
1179
- function cn(e) {
1180
- if (typeof e != "object" || !e) return !1;
1181
- let t = e;
1182
- return Array.isArray(t.blocks);
1379
+ //#endregion
1380
+ //#region ../types/src/preview-resolution.ts
1381
+ function kn(e) {
1382
+ return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
1183
1383
  }
1184
1384
  //#endregion
1185
- export { oe as $, at as A, _ as B, $e as C, r as Ct, W as D, Ge as E, bt as Et, rt as F, H as G, te as H, st as I, Z as J, fe as K, Xe as L, et as M, dt as N, it as O, nt as P, en as Q, tt as R, pt as S, n as St, ut as T, t as Tt, Lt as U, z as V, Wt as W, Yt as X, Q as Y, Jt as Z, xt as _, se as _t, He as a, I as at, rn as b, $t as bt, de as c, J as ct, Y as d, Gt as dt, ke as et, Oe as f, ie as ft, me as g, g as gt, pe as h, Xt as ht, e as i, F as it, Ze as j, Qe as k, l, ne as lt, Dt as m, Qt as mt, f as n, Zt as nt, Ue as o, L as ot, c as p, sn as pt, on as q, i as r, cn as rt, s, Ct as st, d as t, an as tt, p as u, Je as ut, St as v, le as vt, ct as w, o as wt, ee as x, tn as xt, G as y, ce as yt, ft as z };
1385
+ export { Be as $, Pt as A, ae as At, Mt as B, c as Bt, en as C, m as Ct, Wt as D, fe as Dt, Ut as E, le as Et, Tt as F, re as Ft, St as G, wt as H, r as Ht, vt as I, i as It, mt as J, Nt as K, Et as L, e as Lt, kt as M, ee as Mt, jt as N, te as Nt, Vt as O, de as Ot, bt as P, ne as Pt, B as Q, _t as R, s as Rt, Xt as S, h as St, Ht as T, ue as Tt, Ot as U, o as Ut, Ct as V, n as Vt, gt as W, t as Wt, ct as X, dt as Y, lt as Z, fn as _, Ne as _t, Z as a, Ke as at, an as b, _ as bt, gn as c, L as ct, yn as d, qe as dt, Je as et, On as f, Le as ft, Cn as g, Pe as gt, xn as h, Ie as ht, Dn as i, ze as it, yt as j, d as jt, G as k, se as kt, Sn as l, Ue as lt, vn as m, R as mt, Y as n, Ve as nt, Q as o, Re as ot, bn as p, He as pt, U as q, Tn as r, Ge as rt, _n as s, I as st, kn as t, Ye as tt, En as u, We as ut, J as v, g as vt, Jt as w, ce as wt, rn as x, me as xt, pn as y, he as yt, xt as z, l as zt };
1386
+
1387
+ //# sourceMappingURL=src-BNFnxfrA.js.map