@templatical/editor 0.54.2 → 0.56.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 (281) hide show
  1. package/dist/{AiAltTextPopover-BBKVJ6HA.js → AiAltTextPopover-DdsvhE78.js} +4 -4
  2. package/dist/{AiAltTextReview-BuVbeQh-.js → AiAltTextReview-P6to1_0t.js} +3 -3
  3. package/dist/{AiChatPanel-C8SeEJRP.js → AiChatPanel-BSlmzMRC.js} +10 -10
  4. package/dist/{AiPanels-CR6zphjP.js → AiPanels-DAsnX-a3.js} +1 -1
  5. package/dist/{AiRewriteMenu-ZpYJfm-O.js → AiRewriteMenu-DIISOR6U.js} +11 -11
  6. package/dist/{BlockIssueBadge-DaPTq1RE.js → BlockIssueBadge-Bmtc50BQ.js} +4 -4
  7. package/dist/BlockPreviewCanvas-BYIzNn-9.js +154 -0
  8. package/dist/{CloudHeaderExtras-XpjJjn3o.js → CloudHeaderExtras-Cqhw-jMz.js} +1 -1
  9. package/dist/{CloudPanels-DQRWMc59.js → CloudPanels-w34W8_BP.js} +4 -4
  10. package/dist/{CollaborationNotices-Cnx0XHzZ.js → CollaborationNotices-HTbCebjV.js} +2 -2
  11. package/dist/{CollaboratorBar-BaBoNhwB.js → CollaboratorBar-CLQjksX-.js} +2 -2
  12. package/dist/{CommentsPanel-Ck3QmqiC.js → CommentsPanel-C5qG17Ki.js} +1 -1
  13. package/dist/{CommentsSidebar-CHknhOar.js → CommentsSidebar-C7CWcUYZ.js} +12 -12
  14. package/dist/{CountdownBlock-BMezkFbJ.js → CountdownBlock-BTXcCvjZ.js} +2 -2
  15. package/dist/{CountdownToolbar-DTpMEDyh.js → CountdownToolbar-CP-pkntQ.js} +5 -5
  16. package/dist/{IssuesPanel-BZn7-p9e.js → IssuesPanel-CiiNBzH0.js} +12 -12
  17. package/dist/{LanguageMenu-OOmQWVzO.js → LanguageMenu-B981Av-6.js} +15 -15
  18. package/dist/{LocaleNotices-WzsYtBRs.js → LocaleNotices-CTCZ7BYv.js} +4 -4
  19. package/dist/{LogicTagInsertButton-XESwnJia.js → LogicTagInsertButton-DEOPc4RC.js} +284 -279
  20. package/dist/{MediaEditModal-C3U9Mi31.js → MediaEditModal-DJsPLTwP.js} +1 -1
  21. package/dist/{MediaPanels-CGmk9ufe.js → MediaPanels-D2WD2aE2.js} +1 -1
  22. package/dist/{MergeTagInput-CAsBRoSm.js → MergeTagInput-C9icdxw7.js} +1 -1
  23. package/dist/{MergeTagModeToggle-bOf27Hg1.js → MergeTagModeToggle-DXvb80OE.js} +6 -6
  24. package/dist/{MergeTagTextarea-DH_6JFui.js → MergeTagTextarea-CrAcmT3A.js} +5 -5
  25. package/dist/{ParagraphEditor-XGUkV5Uw.js → ParagraphEditor-BWBQ3jKz.js} +55 -55
  26. package/dist/{RestoreVersionDialog-C72kWccI.js → RestoreVersionDialog-CqAp16yQ.js} +4 -4
  27. package/dist/{RichTextEditorContent-BZN8KRvR.js → RichTextEditorContent-xbBjVPVQ.js} +8 -8
  28. package/dist/{SaveBlockDialog-CKOnTMTU.js → SaveBlockDialog-pebNJBTc.js} +9 -9
  29. package/dist/{SavedBlocksBrowserModal-BrlNxqDH.js → SavedBlocksBrowserModal-CvagMcv7.js} +11 -11
  30. package/dist/{SavedBlocksPanels--lPR6gdh.js → SavedBlocksPanels-B9AAVBDm.js} +1 -1
  31. package/dist/{SavedBlocksPickBar-4ON4_KKl.js → SavedBlocksPickBar-BIANWe3i.js} +3 -3
  32. package/dist/{TemplateSettings-BE0jZmRJ.js → TemplateSettings-ORq4PbCN.js} +12 -12
  33. package/dist/{TestEmailModal-BKmNGrZN.js → TestEmailModal-DRjCpcPl.js} +11 -11
  34. package/dist/{TestEmailPanel-DT1wllX3.js → TestEmailPanel-H0v8El__.js} +1 -1
  35. package/dist/{TitleEditor-HjVZuUTB.js → TitleEditor-CEGbJXeU.js} +11 -11
  36. package/dist/{Toolbar-BppchV2k.js → Toolbar-XT-uGA9J.js} +1134 -852
  37. package/dist/{TplModal-BFWOoK8l.js → TplModal-7NQq5-VW.js} +4 -4
  38. package/dist/{VersionHistoryMenu-BnP0EyLl.js → VersionHistoryMenu-C8BE3Pr-.js} +7 -7
  39. package/dist/{VersionHistoryPanels-D4yNVLvq.js → VersionHistoryPanels-CuKuOSJG.js} +1 -1
  40. package/dist/{VersionPreviewBanner-BPP939cD.js → VersionPreviewBanner-BVFBkveR.js} +2 -2
  41. package/dist/WrapperBlock-Bdw-072t.js +56 -0
  42. package/dist/{blockTypeIcons-D91v9k0x.js → blockTypeIcons-CGplGmmr.js} +3 -3
  43. package/dist/bundle-stats.json +6 -6
  44. package/dist/{ca-DOuIxWRv.js → ca-BJn8lcJx.js} +18 -1
  45. package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js → AiAltTextPopover-x999Gimz.js} +5 -5
  46. package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js.map → AiAltTextPopover-x999Gimz.js.map} +1 -1
  47. package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js → AiAltTextReview-DjnFz1wO.js} +4 -4
  48. package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js.map → AiAltTextReview-DjnFz1wO.js.map} +1 -1
  49. package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js → AiChatPanel-DKDu9cs7.js} +4 -4
  50. package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js.map → AiChatPanel-DKDu9cs7.js.map} +1 -1
  51. package/dist/cdn/chunks/{AiPanels-BblCSkQy.js → AiPanels-jMLVaiKx.js} +2 -2
  52. package/dist/cdn/chunks/{AiPanels-BblCSkQy.js.map → AiPanels-jMLVaiKx.js.map} +1 -1
  53. package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js → AiRewriteMenu-s79rmHFy.js} +10 -10
  54. package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js.map → AiRewriteMenu-s79rmHFy.js.map} +1 -1
  55. package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js → BlockIssueBadge-Bnmq_M4G.js} +4 -4
  56. package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js.map → BlockIssueBadge-Bnmq_M4G.js.map} +1 -1
  57. package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js → BlockPreviewCanvas-B3HkuENF.js} +46 -32
  58. package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js.map +1 -0
  59. package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js → CloudHeaderExtras-uUJYJFJ6.js} +2 -2
  60. package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js.map → CloudHeaderExtras-uUJYJFJ6.js.map} +1 -1
  61. package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js → CloudPanels-DQnlH_YJ.js} +4 -4
  62. package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js.map → CloudPanels-DQnlH_YJ.js.map} +1 -1
  63. package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js → CollaborationNotices-CHqUGhOZ.js} +3 -3
  64. package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js.map → CollaborationNotices-CHqUGhOZ.js.map} +1 -1
  65. package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js → CollaboratorBar-C1ZI2xwa.js} +3 -3
  66. package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js.map → CollaboratorBar-C1ZI2xwa.js.map} +1 -1
  67. package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js → CommentsPanel-EtdTzTmq.js} +2 -2
  68. package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js.map → CommentsPanel-EtdTzTmq.js.map} +1 -1
  69. package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js → CommentsSidebar-Qmj049QX.js} +4 -4
  70. package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js.map → CommentsSidebar-Qmj049QX.js.map} +1 -1
  71. package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js → CountdownBlock-DyGsh92b.js} +3 -3
  72. package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js.map → CountdownBlock-DyGsh92b.js.map} +1 -1
  73. package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js → CountdownToolbar-Ddj2erNm.js} +6 -6
  74. package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js.map → CountdownToolbar-Ddj2erNm.js.map} +1 -1
  75. package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js → IssuesPanel-DnSnEh1X.js} +8 -8
  76. package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js.map → IssuesPanel-DnSnEh1X.js.map} +1 -1
  77. package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js → LanguageMenu-C2I_yTL5.js} +110 -110
  78. package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js.map → LanguageMenu-C2I_yTL5.js.map} +1 -1
  79. package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js → LocaleNotices-Dr9LRCAg.js} +4 -4
  80. package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js.map → LocaleNotices-Dr9LRCAg.js.map} +1 -1
  81. package/dist/cdn/chunks/{LogicTagInsertButton-PDKuo2J3.js → LogicTagInsertButton-BdzE9-l7.js} +260 -255
  82. package/dist/cdn/chunks/LogicTagInsertButton-BdzE9-l7.js.map +1 -0
  83. package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js → MediaEditModal-CMJFXu_o.js} +2 -2
  84. package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js.map → MediaEditModal-CMJFXu_o.js.map} +1 -1
  85. package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js → MediaPanels-C790ZXuY.js} +2 -2
  86. package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js.map → MediaPanels-C790ZXuY.js.map} +1 -1
  87. package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js → MergeTagInput-CmrX8Md6.js} +2 -2
  88. package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js.map → MergeTagInput-CmrX8Md6.js.map} +1 -1
  89. package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js → MergeTagModeToggle-D7maMGIM.js} +5 -5
  90. package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js.map → MergeTagModeToggle-D7maMGIM.js.map} +1 -1
  91. package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js → MergeTagTextarea-KOnd2teB.js} +8 -8
  92. package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js.map → MergeTagTextarea-KOnd2teB.js.map} +1 -1
  93. package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js → ParagraphEditor-I9lbKaPk.js} +19 -19
  94. package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js.map → ParagraphEditor-I9lbKaPk.js.map} +1 -1
  95. package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js → RestoreVersionDialog-DqbULAbc.js} +4 -4
  96. package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js.map → RestoreVersionDialog-DqbULAbc.js.map} +1 -1
  97. package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js → RichTextEditorContent-_O22z0pn.js} +8 -8
  98. package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js.map → RichTextEditorContent-_O22z0pn.js.map} +1 -1
  99. package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js → SaveBlockDialog-CClRLXgF.js} +8 -8
  100. package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js.map → SaveBlockDialog-CClRLXgF.js.map} +1 -1
  101. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js → SavedBlocksBrowserModal-BIaxaxw9.js} +8 -8
  102. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js.map → SavedBlocksBrowserModal-BIaxaxw9.js.map} +1 -1
  103. package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js → SavedBlocksPanels-Dfu9N6YW.js} +2 -2
  104. package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js.map → SavedBlocksPanels-Dfu9N6YW.js.map} +1 -1
  105. package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js → SavedBlocksPickBar-DiMW_dbJ.js} +4 -4
  106. package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js.map → SavedBlocksPickBar-DiMW_dbJ.js.map} +1 -1
  107. package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js → TemplateSettings-JMUo0LIV.js} +10 -10
  108. package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js.map → TemplateSettings-JMUo0LIV.js.map} +1 -1
  109. package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js → TestEmailModal-D52VtwBZ.js} +12 -12
  110. package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js.map → TestEmailModal-D52VtwBZ.js.map} +1 -1
  111. package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js → TestEmailPanel-D9ezVDHd.js} +2 -2
  112. package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js.map → TestEmailPanel-D9ezVDHd.js.map} +1 -1
  113. package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js → TitleEditor-D04vvbUc.js} +9 -9
  114. package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js.map → TitleEditor-D04vvbUc.js.map} +1 -1
  115. package/dist/cdn/chunks/{Toolbar-Cv6Rv1S-.js → Toolbar-C_Hfsher.js} +1196 -914
  116. package/dist/cdn/chunks/Toolbar-C_Hfsher.js.map +1 -0
  117. package/dist/cdn/chunks/{TplModal-DGpGdwgf.js → TplModal-d6fEZGJ5.js} +5 -5
  118. package/dist/cdn/chunks/{TplModal-DGpGdwgf.js.map → TplModal-d6fEZGJ5.js.map} +1 -1
  119. package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js → VersionHistoryMenu-C8ucm43v.js} +7 -7
  120. package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js.map → VersionHistoryMenu-C8ucm43v.js.map} +1 -1
  121. package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js → VersionHistoryPanels-BAdzmhvH.js} +2 -2
  122. package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js.map → VersionHistoryPanels-BAdzmhvH.js.map} +1 -1
  123. package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js → VersionPreviewBanner-BWuovbFc.js} +3 -3
  124. package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js.map → VersionPreviewBanner-BWuovbFc.js.map} +1 -1
  125. package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js +58 -0
  126. package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js.map +1 -0
  127. package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js → blockTypeIcons-CzYA5DF9.js} +2 -2
  128. package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js.map → blockTypeIcons-CzYA5DF9.js.map} +1 -1
  129. package/dist/cdn/chunks/{ca-DOuIxWRv.js → ca-BJn8lcJx.js} +19 -2
  130. package/dist/cdn/chunks/ca-BJn8lcJx.js.map +1 -0
  131. package/dist/cdn/chunks/{composables-BxikPuC1.js → composables-CsfQlmcf.js} +676 -620
  132. package/dist/cdn/chunks/composables-CsfQlmcf.js.map +1 -0
  133. package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js → createCloudRuntime-PpIFCDfj.js} +4 -4
  134. package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js.map → createCloudRuntime-PpIFCDfj.js.map} +1 -1
  135. package/dist/{de-DaOUfYBX.js → cdn/chunks/de-BLFp3nWx.js} +20 -1
  136. package/dist/cdn/chunks/de-BLFp3nWx.js.map +1 -0
  137. package/dist/cdn/chunks/{editor-modal-erQEOHZN.js → editor-modal-B8UE9V8B.js} +90 -90
  138. package/dist/cdn/chunks/{editor-modal-erQEOHZN.js.map → editor-modal-B8UE9V8B.js.map} +1 -1
  139. package/dist/cdn/chunks/en-CVxNoHww.js +1 -0
  140. package/dist/cdn/chunks/{en-C0pHHMiR.js → en-DGGQJGbm.js} +19 -2
  141. package/dist/cdn/chunks/en-DGGQJGbm.js.map +1 -0
  142. package/dist/{es-CxyEKr6n.js → cdn/chunks/es-DTY9qgLv.js} +20 -1
  143. package/dist/cdn/chunks/es-DTY9qgLv.js.map +1 -0
  144. package/dist/cdn/chunks/{extensions-DuDWpKo7.js → extensions-BM6ZSnsQ.js} +82 -76
  145. package/dist/cdn/chunks/extensions-BM6ZSnsQ.js.map +1 -0
  146. package/dist/{fr-CYbamiI6.js → cdn/chunks/fr-L4FqO9Gp.js} +20 -1
  147. package/dist/cdn/chunks/fr-L4FqO9Gp.js.map +1 -0
  148. package/dist/cdn/chunks/{icons-Da9GKjPx.js → icons-DHExFLlT.js} +43 -43
  149. package/dist/cdn/chunks/{icons-Da9GKjPx.js.map → icons-DHExFLlT.js.map} +1 -1
  150. package/dist/cdn/chunks/{ja-DfaIAoGI.js → ja-6uOXkh4v.js} +19 -2
  151. package/dist/cdn/chunks/ja-6uOXkh4v.js.map +1 -0
  152. package/dist/cdn/chunks/{keys-CoQtCqNv.js → keys-BUmIvYy3.js} +4 -4
  153. package/dist/cdn/chunks/keys-BUmIvYy3.js.map +1 -0
  154. package/dist/cdn/chunks/{nl-DkrB-VKZ.js → nl-DCxuxwNq.js} +19 -2
  155. package/dist/cdn/chunks/nl-DCxuxwNq.js.map +1 -0
  156. package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js +300 -0
  157. package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js.map +1 -0
  158. package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js → preRenderCustomBlocks-Dn6dFUwx.js} +2 -2
  159. package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js.map → preRenderCustomBlocks-Dn6dFUwx.js.map} +1 -1
  160. package/dist/cdn/chunks/{pt-BR-CY5Ye7eP.js → pt-BR-CBkcrebr.js} +19 -2
  161. package/dist/cdn/chunks/pt-BR-CBkcrebr.js.map +1 -0
  162. package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js → sanitizeHtml-DJI7vvET.js} +3 -3
  163. package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js.map → sanitizeHtml-DJI7vvET.js.map} +1 -1
  164. package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js → socialIcons-Qw9rHc8C.js} +420 -406
  165. package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js.map → socialIcons-Qw9rHc8C.js.map} +1 -1
  166. package/dist/cdn/chunks/src-Bfj1jHnn.js +710 -0
  167. package/dist/cdn/chunks/src-Bfj1jHnn.js.map +1 -0
  168. package/dist/cdn/chunks/{src-712f3ofG.js → src-C9JWWxAk.js} +683 -568
  169. package/dist/cdn/chunks/src-C9JWWxAk.js.map +1 -0
  170. package/dist/cdn/chunks/{src-ZFw5fg_z.js → src-mXG-Of9A.js} +892 -735
  171. package/dist/cdn/chunks/src-mXG-Of9A.js.map +1 -0
  172. package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js → useCloudI18n-Xsih9yRH.js} +2 -2
  173. package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js.map → useCloudI18n-Xsih9yRH.js.map} +1 -1
  174. package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js → useEditorRoot-Beau2Z_T.js} +2 -2
  175. package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js.map → useEditorRoot-Beau2Z_T.js.map} +1 -1
  176. package/dist/cdn/chunks/{useI18n-BnJYydPv.js → useI18n-D8s7HtTn.js} +2 -2
  177. package/dist/cdn/chunks/{useI18n-BnJYydPv.js.map → useI18n-D8s7HtTn.js.map} +1 -1
  178. package/dist/cdn/chunks/useLocalizedDisplay-Bgg4qpev.js +33 -0
  179. package/dist/cdn/chunks/{useLocalizedDisplay-DiNjT22M.js.map → useLocalizedDisplay-Bgg4qpev.js.map} +1 -1
  180. package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js → useLogicTag-DLvWzWsp.js} +4 -4
  181. package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js.map → useLogicTag-DLvWzWsp.js.map} +1 -1
  182. package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js → useMergeTag-B4FHCGGm.js} +6 -6
  183. package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js.map → useMergeTag-B4FHCGGm.js.map} +1 -1
  184. package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js → usePopoverPosition-esO6wjvU.js} +5 -5
  185. package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js.map → usePopoverPosition-esO6wjvU.js.map} +1 -1
  186. package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js → useScrollToBlock-CJuUu7Xj.js} +2 -2
  187. package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js.map → useScrollToBlock-CJuUu7Xj.js.map} +1 -1
  188. package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js → withCurrentFont-QqBilClC.js} +2 -2
  189. package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js.map → withCurrentFont-QqBilClC.js.map} +1 -1
  190. package/dist/cdn/editor.css +1 -1
  191. package/dist/cdn/editor.js +761 -764
  192. package/dist/cdn/editor.js.map +1 -1
  193. package/dist/{check-XMnOOIEC.js → check-CcuCoJDh.js} +1 -1
  194. package/dist/{chevron-down-DmamTEWQ.js → chevron-down-BfYIbFbC.js} +1 -1
  195. package/dist/{chevron-right-BEFXOH27.js → chevron-right-DyjFqY35.js} +1 -1
  196. package/dist/{chevron-up-Dw7woXj8.js → chevron-up-BHEIxuS-.js} +1 -1
  197. package/dist/{circle-alert-BTKC9vkq.js → circle-alert-Tq7kAh9S.js} +1 -1
  198. package/dist/{clock-BVT5u2uG.js → clock-Df0ZiXwQ.js} +1 -1
  199. package/dist/{composables-BbPFRlBf.js → composables-CRX6rncm.js} +1044 -988
  200. package/dist/{createCloudRuntime-Dlrg88gS.js → createCloudRuntime-DplyIlsy.js} +3 -3
  201. package/dist/{createLucideIcon-CgDE3xAR.js → createLucideIcon-CfBdtoUw.js} +5 -5
  202. package/dist/{cdn/chunks/de-DaOUfYBX.js → de-BLFp3nWx.js} +18 -3
  203. package/dist/{dist-C34cYI5S.js → dist-BMUUt3zJ.js} +964 -807
  204. package/dist/{editor-modal-BeX6otLk.js → editor-modal-D9HT9bD6.js} +15 -15
  205. package/dist/{en-C0pHHMiR.js → en-DGGQJGbm.js} +18 -1
  206. package/dist/en-De3uAutQ.js +1 -0
  207. package/dist/{cdn/chunks/es-CxyEKr6n.js → es-DTY9qgLv.js} +18 -3
  208. package/dist/{extensions-xCiyqSg7.js → extensions-Cm6K4SRX.js} +344 -338
  209. package/dist/{eye-ByMgHeA_.js → eye-B3psrAqd.js} +1 -1
  210. package/dist/{cdn/chunks/fr-CYbamiI6.js → fr-L4FqO9Gp.js} +18 -3
  211. package/dist/{image-Ch8tR35K.js → image-C3yuPDxx.js} +1 -1
  212. package/dist/index.d.ts +74 -13
  213. package/dist/{info-DzSD-Wpk.js → info-DKja7A68.js} +1 -1
  214. package/dist/{ja-DfaIAoGI.js → ja-6uOXkh4v.js} +18 -1
  215. package/dist/{keys-BCqskl51.js → keys-w_VRjoMu.js} +3 -3
  216. package/dist/{link-oDn9AR2w.js → link-DhzPI4Hn.js} +1 -1
  217. package/dist/{list-C5t07dp8.js → list-DVGn7Ik2.js} +1 -1
  218. package/dist/{loader-circle-k6xvKgUB.js → loader-circle-DqKWsMHO.js} +1 -1
  219. package/dist/{message-circle-C23R6OJR.js → message-circle-C4TonoBs.js} +1 -1
  220. package/dist/{nl-DkrB-VKZ.js → nl-DCxuxwNq.js} +18 -1
  221. package/dist/normalizeMergeTagMarkup-Da9JAgx7.js +298 -0
  222. package/dist/{package-C90eQ7NU.js → package-9OkiEO4S.js} +1 -1
  223. package/dist/{pencil-BK7GrQuA.js → pencil-M9vkOB7C.js} +1 -1
  224. package/dist/{plus-Cr0Mis63.js → plus-DxZiv9YC.js} +1 -1
  225. package/dist/{preRenderCustomBlocks-DvbRa3L3.js → preRenderCustomBlocks-CdqSp2P7.js} +4 -4
  226. package/dist/{pt-BR-CY5Ye7eP.js → pt-BR-CBkcrebr.js} +18 -1
  227. package/dist/{refresh-cw-_ZLOIEvA.js → refresh-cw-UY8_sdFG.js} +1 -1
  228. package/dist/{rotate-ccw-CB5wsHwv.js → rotate-ccw-BFTGCpHn.js} +1 -1
  229. package/dist/{sanitizeHtml-D_ab7dD6.js → sanitizeHtml-wBibnBF4.js} +6 -6
  230. package/dist/{search-BmrQNox8.js → search-RuGJnMEn.js} +1 -1
  231. package/dist/{send-blAsIBBg.js → send-DGB1ar02.js} +1 -1
  232. package/dist/{smartphone-BPpWYrwV.js → smartphone-CVA29CU_.js} +1 -1
  233. package/dist/{socialIcons-DhAolBjt.js → socialIcons-CJD6OsI7.js} +283 -269
  234. package/dist/{sparkles-OqIxrNp-.js → sparkles-IHfEwEcd.js} +1 -1
  235. package/dist/{square-BP-V7iT-.js → square-_Cl44UU6.js} +1 -1
  236. package/dist/style.css +1 -1
  237. package/dist/templatical-editor.js +851 -854
  238. package/dist/{text-align-start-4mwX2o-F.js → text-align-start-Dqk2Xt_Q.js} +13 -13
  239. package/dist/{trash-B99WixTA.js → trash-Cr7rD5Hh.js} +1 -1
  240. package/dist/{triangle-alert-CHMiDkHa.js → triangle-alert-CKcpwtUj.js} +1 -1
  241. package/dist/{upload-Cp8o-hrN.js → upload-DR9pqVON.js} +1 -1
  242. package/dist/{useCloudI18n-Dh2iydo1.js → useCloudI18n-BczJoFf4.js} +1 -1
  243. package/dist/{useEditorRoot-DY3mgcHm.js → useEditorRoot-BcXKhM_8.js} +1 -1
  244. package/dist/{useI18n-CgtvtF4C.js → useI18n-zeWYtWSv.js} +1 -1
  245. package/dist/useLocalizedDisplay-Cbhx208c.js +31 -0
  246. package/dist/{useLogicTag-BmuakZBd.js → useLogicTag-DLkYos2Q.js} +3 -3
  247. package/dist/{useMergeTag-DC4a8b_v.js → useMergeTag-IoWOO679.js} +5 -5
  248. package/dist/{usePopoverPosition-VDQjyX_A.js → usePopoverPosition-Br3zt_MQ.js} +4 -4
  249. package/dist/{useScrollToBlock-B35ObCGK.js → useScrollToBlock-BfOzc1Z6.js} +2 -2
  250. package/dist/{withCurrentFont-BSxJai99.js → withCurrentFont-m_PHcOD0.js} +1 -1
  251. package/dist/{x-BIBStNMS.js → x-DZSFHafL.js} +1 -1
  252. package/package.json +10 -10
  253. package/dist/BlockPreviewCanvas-DtOo5y3U.js +0 -140
  254. package/dist/WrapperBlock-BUzQTZuu.js +0 -44
  255. package/dist/cdn/chunks/BlockPreviewCanvas-B6ndvof2.js.map +0 -1
  256. package/dist/cdn/chunks/LogicTagInsertButton-PDKuo2J3.js.map +0 -1
  257. package/dist/cdn/chunks/Toolbar-Cv6Rv1S-.js.map +0 -1
  258. package/dist/cdn/chunks/WrapperBlock-C_uE5rPJ.js +0 -46
  259. package/dist/cdn/chunks/WrapperBlock-C_uE5rPJ.js.map +0 -1
  260. package/dist/cdn/chunks/ca-DOuIxWRv.js.map +0 -1
  261. package/dist/cdn/chunks/composables-BxikPuC1.js.map +0 -1
  262. package/dist/cdn/chunks/de-DaOUfYBX.js.map +0 -1
  263. package/dist/cdn/chunks/en-B6tLGRHq.js +0 -1
  264. package/dist/cdn/chunks/en-C0pHHMiR.js.map +0 -1
  265. package/dist/cdn/chunks/es-CxyEKr6n.js.map +0 -1
  266. package/dist/cdn/chunks/extensions-DuDWpKo7.js.map +0 -1
  267. package/dist/cdn/chunks/fr-CYbamiI6.js.map +0 -1
  268. package/dist/cdn/chunks/ja-DfaIAoGI.js.map +0 -1
  269. package/dist/cdn/chunks/keys-CoQtCqNv.js.map +0 -1
  270. package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +0 -1
  271. package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js +0 -290
  272. package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js.map +0 -1
  273. package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +0 -1
  274. package/dist/cdn/chunks/src-712f3ofG.js.map +0 -1
  275. package/dist/cdn/chunks/src-B2tQbzf6.js +0 -677
  276. package/dist/cdn/chunks/src-B2tQbzf6.js.map +0 -1
  277. package/dist/cdn/chunks/src-ZFw5fg_z.js.map +0 -1
  278. package/dist/cdn/chunks/useLocalizedDisplay-DiNjT22M.js +0 -33
  279. package/dist/en-Do0SU6tR.js +0 -1
  280. package/dist/normalizeMergeTagMarkup-C7FGNURu.js +0 -288
  281. package/dist/useLocalizedDisplay-C9MBFUr4.js +0 -31
@@ -1,12 +1,12 @@
1
1
  import { $ as e, B as t, Ft as n, G as r, M as i, Mt as a, Pt as o, Q as s, Y as c, Z as l, _ as u, c as d, ct as f, et as p, f as m, g as h, it as g, k as _, lt as v, nt as y, ot as b, q as x, r as S, w as C, y as w } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
2
- import { $t as T, A as E, C as D, Ct as O, D as k, Dt as ee, E as A, Et as j, F as te, Ft as ne, H as re, It as M, Kt as N, Mt as P, O as F, Pt as I, St as L, T as R, Tt as z, Vt as B, Wt as ie, Xt as V, Z as H, _ as U, _t as ae, d as W, et as G, g as K, h as oe, ht as se, m as ce, nn as le, ot as ue, st as de, w as fe, x as pe } from "./dist-C34cYI5S.js";
3
- import { t as q } from "./createLucideIcon-CgDE3xAR.js";
4
- import { t as J } from "./upload-Cp8o-hrN.js";
5
- import { t as me } from "./loader-circle-k6xvKgUB.js";
6
- import { B as he, C as ge, U as _e, u as ve } from "./keys-BCqskl51.js";
7
- import { t as ye } from "./useI18n-CgtvtF4C.js";
2
+ import { $t as T, C as E, Ct as D, Dt as O, E as k, Et as A, Ft as j, Gt as M, Ht as ee, I as te, It as ne, Lt as N, Nt as P, O as F, Ot as I, Q as L, T as R, U as re, _ as z, an as ie, ct as B, d as V, g as H, gt as ae, h as U, j as oe, k as se, m as W, nn as ce, qt as G, st as le, tt as K, vt as ue, w as de, wt as fe, x as pe } from "./dist-BMUUt3zJ.js";
3
+ import { t as q } from "./createLucideIcon-CfBdtoUw.js";
4
+ import { t as J } from "./upload-DR9pqVON.js";
5
+ import { t as me } from "./loader-circle-DqKWsMHO.js";
6
+ import { B as he, C as ge, W as _e, u as ve } from "./keys-w_VRjoMu.js";
7
+ import { t as ye } from "./useI18n-zeWYtWSv.js";
8
8
  import { r as be } from "./dist-0alKVRc_.js";
9
- import { i as Y, r as xe } from "./usePopoverPosition-VDQjyX_A.js";
9
+ import { i as Y, r as xe } from "./usePopoverPosition-Br3zt_MQ.js";
10
10
  // ../core/dist/index.js
11
11
  var X = (e) => typeof e == "object" && !!e && !Array.isArray(e), Se = (e) => Array.isArray(e) && e.length > 0 && e.every((e) => X(e) && typeof e.id == "string"), Ce = /* @__PURE__ */ new Set([
12
12
  "id",
@@ -19,17 +19,17 @@ var X = (e) => typeof e == "object" && !!e && !Array.isArray(e), Se = (e) => Arr
19
19
  function we(e, t, n) {
20
20
  let r = /* @__PURE__ */ new Set();
21
21
  for (let i of n) {
22
- if (!L(i)) continue;
23
- let n = i.split("."), a = n.pop(), o = n.join("."), s = M(e, i), c = t;
22
+ if (!D(i)) continue;
23
+ let n = i.split("."), a = n.pop(), o = n.join("."), s = N(e, i), c = t;
24
24
  for (let [t, i] of n.entries()) {
25
25
  let a = n.slice(0, t + 1).join(".");
26
- s !== void 0 && X(c) && M(c, i) === void 0 && X(M(e, a)) && (c[i] = {}, r.add(a)), c = M(c, i);
26
+ s !== void 0 && X(c) && N(c, i) === void 0 && X(N(e, a)) && (c[i] = {}, r.add(a)), c = N(c, i);
27
27
  }
28
28
  if (Array.isArray(c)) {
29
29
  let e = c.findIndex((e) => X(e) && e.id === a);
30
30
  if (e < 0) continue;
31
- s === void 0 ? c.splice(e, 1) : c[e] = N(s);
32
- } else X(c) && (s === void 0 ? delete c[a] : c[a] = N(s), o && Object.keys(c).length === 0 && M(e, o) === void 0 && we(e, t, [o]));
31
+ s === void 0 ? c.splice(e, 1) : c[e] = G(s);
32
+ } else X(c) && (s === void 0 ? delete c[a] : c[a] = G(s), o && Object.keys(c).length === 0 && N(e, o) === void 0 && we(e, t, [o]));
33
33
  }
34
34
  return r;
35
35
  }
@@ -40,17 +40,17 @@ function Te(e, t, n, r, i = !0, a = /* @__PURE__ */ new Set()) {
40
40
  let t = e.find((e) => e.id === o.id);
41
41
  t && Te(t, o, `${n}.${o.id}`, r, i, a);
42
42
  }
43
- else H(e, t) || r.set(n, t);
43
+ else L(e, t) || r.set(n, t);
44
44
  }
45
45
  function Ee(e, t, n, r = [], i = /* @__PURE__ */ new Set()) {
46
46
  let a = /* @__PURE__ */ new Map();
47
47
  Te(e, t, "", a, e.type !== "custom", i);
48
- let o = new Set(e.type === "custom" ? le(e, r) : []), s = {}, c = {};
49
- for (let [t, r] of a) if ((e.type === "custom" ? o.has(t) : j(e.type, t)) && typeof r == "string" && M(e, t) !== void 0) {
48
+ let o = new Set(e.type === "custom" ? ie(e, r) : []), s = {}, c = {};
49
+ for (let [t, r] of a) if ((e.type === "custom" ? o.has(t) : O(e.type, t)) && typeof r == "string" && N(e, t) !== void 0) {
50
50
  let i = n?.text?.[t];
51
51
  s[t] = i && i.value === r ? i : {
52
52
  value: r,
53
- sourceHash: V(String(M(e, t) ?? ""))
53
+ sourceHash: T(String(N(e, t) ?? ""))
54
54
  };
55
55
  } else c[t] = r === void 0 ? null : r;
56
56
  let l = {};
@@ -60,7 +60,7 @@ function De(e, t, n) {
60
60
  let r = !1;
61
61
  function i(e, t, n, a) {
62
62
  let o = e[n], s = t[n], c = (e) => Array.isArray(e) && e.every((e) => X(e) && typeof e.id == "string");
63
- if (c(o) && c(s) && (JSON.stringify(o.map((e) => e.id)) !== JSON.stringify(s.map((e) => e.id)) && (r = !0, e[n] = s.map((e) => N(o.find((t) => t.id === e.id) ?? e))), a)) for (let t of s) {
63
+ if (c(o) && c(s) && (JSON.stringify(o.map((e) => e.id)) !== JSON.stringify(s.map((e) => e.id)) && (r = !0, e[n] = s.map((e) => G(o.find((t) => t.id === e.id) ?? e))), a)) for (let t of s) {
64
64
  let r = e[n].find((e) => e.id === t.id);
65
65
  r && i(r, t, a);
66
66
  }
@@ -68,7 +68,7 @@ function De(e, t, n) {
68
68
  let a = e, o = t;
69
69
  if (e.type === "menu" && i(a, o, "items"), e.type === "table" && i(a, o, "rows", "cells"), e.type === "social" && i(a, o, "icons"), e.type === "section" && t.type === "section") {
70
70
  let i = (e) => e.map((e) => e.map((e) => e.id));
71
- (e.columns !== t.columns || JSON.stringify(i(e.children)) !== JSON.stringify(i(t.children))) && (r = !0, e.columns = t.columns, e.children = t.children.map((e) => e.map((e) => N(n(e.id) ?? e))));
71
+ (e.columns !== t.columns || JSON.stringify(i(e.children)) !== JSON.stringify(i(t.children))) && (r = !0, e.columns = t.columns, e.children = t.children.map((e) => e.map((e) => G(n(e.id) ?? e))));
72
72
  }
73
73
  return r;
74
74
  }
@@ -79,40 +79,40 @@ function Oe(e, t, n) {
79
79
  }, i = /* @__PURE__ */ new Map();
80
80
  Te(r(e), r(t), "", i);
81
81
  let a = {};
82
- for (let [t, r] of i) if (ce.includes(t) && typeof r == "string" && M(e, t) !== void 0) {
82
+ for (let [t, r] of i) if (W.includes(t) && typeof r == "string" && N(e, t) !== void 0) {
83
83
  let i = n?.text?.[t];
84
84
  (a.text ??= {})[t] = i?.value === r ? i : {
85
85
  value: r,
86
- sourceHash: V(String(M(e, t) ?? ""))
86
+ sourceHash: T(String(N(e, t) ?? ""))
87
87
  };
88
88
  } else (a.set ??= {})[t] = r === void 0 ? null : r;
89
89
  return a;
90
90
  }
91
91
  function ke(e, t, n, r, i, a = []) {
92
- let o = N(e ?? {}), s = [.../* @__PURE__ */ new Set([...a, ...[.../* @__PURE__ */ new Set([
92
+ let o = G(e ?? {}), s = [.../* @__PURE__ */ new Set([...a, ...[.../* @__PURE__ */ new Set([
93
93
  ...Object.keys(t.text ?? {}),
94
94
  ...Object.keys(t.set ?? {}),
95
95
  ...Object.keys(n.text ?? {}),
96
96
  ...Object.keys(n.set ?? {})
97
- ])].filter((e) => !H(t.text?.[e], n.text?.[e]) || !H(t.set?.[e], n.set?.[e]))])], c = Object.keys(e?.set ?? {}).filter((e) => s.some((t) => t.startsWith(`${e}.`)));
97
+ ])].filter((e) => !L(t.text?.[e], n.text?.[e]) || !L(t.set?.[e], n.set?.[e]))])], c = Object.keys(e?.set ?? {}).filter((e) => s.some((t) => t.startsWith(`${e}.`)));
98
98
  for (let e of c) {
99
- let t = M(i, e), n = s.filter((t) => t.startsWith(`${e}.`) && H(M(r, t), M(i, t)));
100
- if (H(t, M(r, e))) delete o.set[e];
101
- else if (n.length && X(M(r, e)) && X(t)) {
99
+ let t = N(i, e), n = s.filter((t) => t.startsWith(`${e}.`) && L(N(r, t), N(i, t)));
100
+ if (L(t, N(r, e))) delete o.set[e];
101
+ else if (n.length && X(N(r, e)) && X(t)) {
102
102
  delete o.set[e];
103
103
  let i = (e, t, a) => {
104
104
  if (!n.some((t) => e === t || e.startsWith(`${t}.`))) {
105
105
  if (X(t) && X(a)) for (let n of /* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(a)])) i(`${e}.${n}`, t[n], a[n]);
106
106
  else if (X(r) && r.type !== "custom" && Se(t) && Se(a)) for (let n of a) i(`${e}.${n.id}`, t.find((e) => e.id === n.id), n);
107
- else X(r) && typeof r.type == "string" && z(r, e, a) || o.text?.[e] && o.text[e].value === a || ((o.set ??= {})[e] = a === void 0 ? null : N(a));
107
+ else X(r) && typeof r.type == "string" && A(r, e, a) || o.text?.[e] && o.text[e].value === a || ((o.set ??= {})[e] = a === void 0 ? null : G(a));
108
108
  }
109
109
  };
110
- i(e, M(r, e), t);
111
- } else o.set[e] = t === void 0 ? null : N(t);
110
+ i(e, N(r, e), t);
111
+ } else o.set[e] = t === void 0 ? null : G(t);
112
112
  for (let t of ["text", "set"]) for (let n of Object.keys(o[t] ?? {})) {
113
113
  if (!n.startsWith(`${e}.`)) continue;
114
114
  let r = t === "text" ? o.text[n].value : o.set[n] ?? void 0;
115
- H(r, M(i, n)) || delete o[t][n];
115
+ L(r, N(i, n)) || delete o[t][n];
116
116
  }
117
117
  }
118
118
  for (let e of s) if (!c.includes(e)) {
@@ -140,7 +140,7 @@ function je(e, t, n) {
140
140
  ...e.content(),
141
141
  blocks: [o]
142
142
  };
143
- R(t), A(t);
143
+ R(t), k(t);
144
144
  }
145
145
  if (t === "removeBlock") return !0;
146
146
  let c = i && n[1] === void 0 && n[2] === void 0, l = c ? s?.targetSectionId : n[t === "moveBlock" ? 2 : 1], u = (c ? s?.columnIndex : n[t === "moveBlock" ? 3 : 2]) ?? 0;
@@ -148,7 +148,7 @@ function je(e, t, n) {
148
148
  if (e.isBlockLocked(l, !0) || o?.type === "section") return !1;
149
149
  if (e.findBlock) {
150
150
  let t = e.findBlock(l);
151
- if (t?.type !== "section" || u < 0 || u >= de(t.columns)) return !1;
151
+ if (t?.type !== "section" || u < 0 || u >= B(t.columns)) return !1;
152
152
  }
153
153
  }
154
154
  return t !== "moveBlock" || s?.targetSectionId !== l || (s?.columnIndex ?? 0) !== u || s?.index !== n[1];
@@ -192,7 +192,7 @@ function Fe(e, t) {
192
192
  }
193
193
  function Ie(t) {
194
194
  let n = t.content ?? te(t.defaultFontFamily, t.templateDefaults);
195
- R(n), A(n);
195
+ R(n), k(n);
196
196
  let i = s({
197
197
  template: null,
198
198
  content: n,
@@ -207,11 +207,11 @@ function Ie(t) {
207
207
  uiTheme: "auto"
208
208
  }), a = g(i, "activeLocale"), o = [];
209
209
  function c(e) {
210
- let t = G(i.content);
211
- if (e === t && (e = null), e !== null && !i.content.settings.locales?.includes(e)) throw new U(`This template has no "${e}" version.`, void 0, "unknown_locale");
210
+ let t = K(i.content);
211
+ if (e === t && (e = null), e !== null && !i.content.settings.locales?.includes(e)) throw new z(`This template has no "${e}" version.`, void 0, "unknown_locale");
212
212
  a.value = e;
213
213
  }
214
- v(() => a.value ?? G(i.content), (e) => Fe(t.onError, () => t.onLocaleChange?.(e))), v(() => i.content.settings.locales?.includes(a.value ?? ""), () => {
214
+ v(() => a.value ?? K(i.content), (e) => Fe(t.onError, () => t.onLocaleChange?.(e))), v(() => i.content.settings.locales?.includes(a.value ?? ""), () => {
215
215
  a.value && !i.content.settings.locales?.includes(a.value) && c(null);
216
216
  });
217
217
  function l() {
@@ -225,16 +225,16 @@ function Ie(t) {
225
225
  }
226
226
  function f(e, n) {
227
227
  if (!l()) return null;
228
- if (e === "addLocale" && (!ae(n) || t.localization && !t.localization.locales.includes(n))) throw new U(`Locale "${n}" is not enabled.`, void 0, "unknown_locale");
229
- let r = N(i.content);
230
- return fe(r, [{
228
+ if (e === "addLocale" && (!ue(n) || t.localization && !t.localization.locales.includes(n))) throw new z(`Locale "${n}" is not enabled.`, void 0, "unknown_locale");
229
+ let r = G(i.content);
230
+ return de(r, [{
231
231
  op: e,
232
232
  locale: n
233
- }]), H(r, i.content) ? null : r;
233
+ }]), L(r, i.content) ? null : r;
234
234
  }
235
235
  function m(e, t) {
236
236
  let n = f(e, t);
237
- n && (i.content = n, O());
237
+ n && (i.content = n, A());
238
238
  }
239
239
  function h(e) {
240
240
  m("addLocale", e);
@@ -251,24 +251,24 @@ function Ie(t) {
251
251
  }
252
252
  function b(e, t) {
253
253
  let [n, r] = t;
254
- if (!a.value || !l() || z(n)) return null;
255
- let s = j(i.content.blocks, n);
254
+ if (!a.value || !l() || V(n)) return null;
255
+ let s = I(i.content.blocks, n);
256
256
  if (!s) return null;
257
- let c = s.l10n?.[a.value], u = P(s, a.value, G(i.content)), d = Ee(s, u, c, o), f = e === "resetLocaleFields" && Array.isArray(r) ? we(s, u, r) : void 0, p = e === "resetLocaleFields" ? ke(c, d, Ee(s, u, c, o, f), s, u, Array.isArray(r) ? r : []) : N(c ?? {});
257
+ let c = s.l10n?.[a.value], u = P(s, a.value, K(i.content)), d = Ee(s, u, c, o), f = e === "resetLocaleFields" && Array.isArray(r) ? we(s, u, r) : void 0, p = e === "resetLocaleFields" ? ke(c, d, Ee(s, u, c, o, f), s, u, Array.isArray(r) ? r : []) : G(c ?? {});
258
258
  if (e === "setBlockHidden") r ? p.hidden = !0 : delete p.hidden;
259
259
  else if (e === "resetLocaleFields") r || (delete p.text, delete p.set, delete p.hidden);
260
260
  else for (let e of r) {
261
261
  let t = p.text?.[e];
262
- t && (t.sourceHash = V(String(M(s, e) ?? "")));
262
+ t && (t.sourceHash = T(String(N(s, e) ?? "")));
263
263
  }
264
- return p.text && !Object.keys(p.text).length && delete p.text, p.set && !Object.keys(p.set).length && delete p.set, H(c ?? {}, p) ? null : {
264
+ return p.text && !Object.keys(p.text).length && delete p.text, p.set && !Object.keys(p.set).length && delete p.set, L(c ?? {}, p) ? null : {
265
265
  block: s,
266
266
  layer: p
267
267
  };
268
268
  }
269
269
  function x(e, t) {
270
270
  let n = b(e, t);
271
- n && (y(n.block, n.layer), O());
271
+ n && (y(n.block, n.layer), A());
272
272
  }
273
273
  function S(e, t) {
274
274
  x("setBlockHidden", [e, t]);
@@ -279,35 +279,35 @@ function Ie(t) {
279
279
  function w(e, t) {
280
280
  x("keepTranslations", [e, t]);
281
281
  }
282
- let T = p(0), E = 0, D = 0;
283
- function O() {
284
- i.isDirty = !0, D++;
282
+ let E = p(0), D = 0, O = 0;
283
+ function A() {
284
+ i.isDirty = !0, O++;
285
285
  }
286
- let k = r({
286
+ let ee = r({
287
287
  get: () => i.content,
288
288
  set: (e) => {
289
- i.content = e, O();
289
+ i.content = e, A();
290
290
  }
291
- }), ee = r(() => i.selectedBlockId ? j(i.content.blocks, i.selectedBlockId) : null);
292
- function j(e, t) {
291
+ }), F = r(() => i.selectedBlockId ? I(i.content.blocks, i.selectedBlockId) : null);
292
+ function I(e, t) {
293
293
  for (let n of e) {
294
294
  if (n.id === t) return n;
295
295
  if (n.type === "section") for (let e of n.children) {
296
- let n = j(e, t);
296
+ let n = I(e, t);
297
297
  if (n) return n;
298
298
  }
299
299
  }
300
300
  return null;
301
301
  }
302
- function F(e, t) {
303
- if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) F(e, t);
302
+ function ie(e, t) {
303
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) ie(e, t);
304
304
  }
305
- function L(e, t, n = { blocks: e }) {
305
+ function B(e, t, n = { blocks: e }) {
306
306
  for (let r = 0; r < e.length; r++) {
307
307
  let i = e[r];
308
308
  if (i.id === t) return n;
309
309
  if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
310
- let n = L(i.children[e], t, {
310
+ let n = B(i.children[e], t, {
311
311
  blocks: i.children[e],
312
312
  sectionId: i.id,
313
313
  columnIndex: e
@@ -317,7 +317,7 @@ function Ie(t) {
317
317
  }
318
318
  return null;
319
319
  }
320
- function z(e, n = !1) {
320
+ function V(e, n = !1) {
321
321
  let r = a.value ?? t.lockLocale?.value ?? null;
322
322
  for (let [i, a] of t.lockedBlocks?.value ?? []) {
323
323
  let o = a;
@@ -327,8 +327,8 @@ function Ie(t) {
327
327
  }
328
328
  return !1;
329
329
  }
330
- function B(e) {
331
- let t = L(i.content.blocks, e);
330
+ function H(e) {
331
+ let t = B(i.content.blocks, e);
332
332
  if (!t) return null;
333
333
  let n = t.blocks.findIndex((t) => t.id === e);
334
334
  return n === -1 ? null : {
@@ -337,11 +337,11 @@ function Ie(t) {
337
337
  index: n
338
338
  };
339
339
  }
340
- function W(e, t = !0) {
341
- R(e), A(e), i.content = e, t && O();
340
+ function ae(e, t = !0) {
341
+ R(e), k(e), i.content = e, t && A();
342
342
  }
343
- function K(e) {
344
- e && z(e) || (i.selectedBlockId = e);
343
+ function U(e) {
344
+ e && V(e) || (i.selectedBlockId = e);
345
345
  }
346
346
  function oe(e) {
347
347
  i.viewport = e;
@@ -349,50 +349,50 @@ function Ie(t) {
349
349
  function se(e) {
350
350
  i.darkMode = e;
351
351
  }
352
- function ce(e) {
352
+ function W(e) {
353
353
  i.uiTheme = e;
354
354
  }
355
- function le(e) {
355
+ function ce(e) {
356
356
  i.previewMode = e, e && (i.selectedBlockId = null);
357
357
  }
358
- function ue(e, t) {
358
+ function le(e, t) {
359
359
  if (!l()) return !1;
360
- let n = j(i.content.blocks, e);
360
+ let n = I(i.content.blocks, e);
361
361
  if (!n) return !1;
362
- if ("l10n" in t) throw new U("l10n is immutable in updateBlock.", void 0, "invalid_operation");
362
+ if ("l10n" in t) throw new z("l10n is immutable in updateBlock.", void 0, "invalid_operation");
363
363
  let r = {
364
364
  ...n,
365
365
  ...t
366
366
  };
367
- return !z(e, De(N(n), r, (e) => j(i.content.blocks, e)));
367
+ return !V(e, De(G(n), r, (e) => I(i.content.blocks, e)));
368
368
  }
369
- function de(e, n) {
370
- if (!ue(e, n)) return;
371
- let r = j(i.content.blocks, e);
369
+ function fe(e, n) {
370
+ if (!le(e, n)) return;
371
+ let r = I(i.content.blocks, e);
372
372
  if (!r) return;
373
373
  let s = a.value;
374
374
  if (s) {
375
- let a = P(r, s, G(i.content)), c = {
375
+ let a = P(r, s, K(i.content)), c = {
376
376
  ...a,
377
377
  ...n
378
- }, l = N(r), u = De(l, c, (e) => j(i.content.blocks, e));
379
- if (z(e, u)) return;
378
+ }, l = G(r), u = De(l, c, (e) => I(i.content.blocks, e));
379
+ if (V(e, u)) return;
380
380
  u && t.onStructureChange?.();
381
- let d = I(l);
381
+ let d = j(l);
382
382
  delete r.l10n, Object.assign(r, d), y(r, ke(r.l10n?.[s], Ee(r, a, r.l10n?.[s], o), Ee(r, c, r.l10n?.[s], o), r, c));
383
383
  } else {
384
- if (z(e, "children" in n || "columns" in n)) return;
385
- let t = I({
384
+ if (V(e, "children" in n || "columns" in n)) return;
385
+ let t = j({
386
386
  ...r,
387
387
  ...n
388
388
  });
389
389
  delete r.l10n, Object.assign(r, t);
390
390
  }
391
- O();
391
+ A();
392
392
  }
393
393
  function pe(e) {
394
- if ("locales" in e || "l10n" in e) throw new U("locales and l10n are immutable in updateSettings.", void 0, "invalid_operation");
395
- if ("locale" in e && e.locale !== G(i.content) && i.content.settings.locales?.length) throw new U("The default locale can't change while language versions exist.", void 0, "invalid_operation");
394
+ if ("locales" in e || "l10n" in e) throw new z("locales and l10n are immutable in updateSettings.", void 0, "invalid_operation");
395
+ if ("locale" in e && e.locale !== K(i.content) && i.content.settings.locales?.length) throw new z("The default locale can't change while language versions exist.", void 0, "invalid_operation");
396
396
  }
397
397
  function q(e) {
398
398
  if (!l()) return;
@@ -403,7 +403,7 @@ function Ie(t) {
403
403
  ...e
404
404
  });
405
405
  else {
406
- let n = i.content.settings, r = ie(i.content, t).settings, a = {
406
+ let n = i.content.settings, r = M(i.content, t).settings, a = {
407
407
  ...r,
408
408
  locale: n.locale,
409
409
  ...e
@@ -413,14 +413,14 @@ function Ie(t) {
413
413
  [t]: s
414
414
  } : n.l10n && (delete n.l10n[t], Object.keys(n.l10n).length || delete n.l10n);
415
415
  }
416
- O();
416
+ A();
417
417
  }
418
418
  let J = {
419
419
  canEdit: l,
420
420
  content: () => i.content,
421
- findBlock: (e) => j(i.content.blocks, e),
422
- findBlockLocation: B,
423
- isBlockLocked: z
421
+ findBlock: (e) => I(i.content.blocks, e),
422
+ findBlockLocation: H,
423
+ isBlockLocked: V
424
424
  };
425
425
  function me(e, n, r = 0, o) {
426
426
  if (je(J, "addBlock", [
@@ -430,28 +430,28 @@ function Ie(t) {
430
430
  o
431
431
  ])) {
432
432
  if (n) {
433
- let t = j(i.content.blocks, n);
433
+ let t = I(i.content.blocks, n);
434
434
  if (t && t.type === "section") {
435
435
  t.children[r] = t.children[r] || [];
436
436
  let n = t.children[r];
437
437
  o !== void 0 && o < n.length ? n.splice(o, 0, e) : n.push(e);
438
438
  }
439
439
  } else o !== void 0 && o < i.content.blocks.length ? i.content.blocks.splice(o, 0, e) : i.content.blocks.push(e);
440
- a.value && t.onStructureChange?.(), O();
440
+ a.value && t.onStructureChange?.(), A();
441
441
  }
442
442
  }
443
443
  function he(e) {
444
444
  if (!je(J, "removeBlock", [e])) return;
445
- let n = L(i.content.blocks, e);
445
+ let n = B(i.content.blocks, e);
446
446
  if (n) {
447
447
  let r = n.blocks.findIndex((t) => t.id === e);
448
448
  if (r !== -1) {
449
449
  let [e] = n.blocks.splice(r, 1);
450
450
  if (i.selectedBlockId) {
451
451
  let t = /* @__PURE__ */ new Set();
452
- F(e, t), t.has(i.selectedBlockId) && (i.selectedBlockId = null);
452
+ ie(e, t), t.has(i.selectedBlockId) && (i.selectedBlockId = null);
453
453
  }
454
- a.value && t.onStructureChange?.(), O();
454
+ a.value && t.onStructureChange?.(), A();
455
455
  }
456
456
  }
457
457
  }
@@ -462,19 +462,19 @@ function Ie(t) {
462
462
  r,
463
463
  o
464
464
  ])) return;
465
- let s = L(i.content.blocks, e), c = s.blocks.findIndex((t) => t.id === e), l;
465
+ let s = B(i.content.blocks, e), c = s.blocks.findIndex((t) => t.id === e), l;
466
466
  if (r) {
467
- let e = j(i.content.blocks, r);
467
+ let e = I(i.content.blocks, r);
468
468
  e.children[o] = e.children[o] || [], l = e.children[o];
469
469
  } else l = i.content.blocks;
470
470
  let [u] = s.blocks.splice(c, 1);
471
- l.splice(n, 0, u), a.value && t.onStructureChange?.(), O();
471
+ l.splice(n, 0, u), a.value && t.onStructureChange?.(), A();
472
472
  }
473
473
  function _e() {
474
- O();
474
+ A();
475
475
  }
476
476
  function ve(e, t) {
477
- throw new U(`[Templatical] Templates: ${e} ${t}`);
477
+ throw new z(`[Templatical] Templates: ${e} ${t}`);
478
478
  }
479
479
  function ye(e) {
480
480
  Fe(t.onError, e);
@@ -487,37 +487,37 @@ function Ie(t) {
487
487
  i.template && (i.template = {
488
488
  ...i.template,
489
489
  name: e
490
- }, O());
490
+ }, A());
491
491
  }
492
492
  async function xe(e) {
493
493
  let n = be("create()"), { create: r } = n;
494
494
  typeof r != "function" && ve("create()", "is disabled by the provider — its `create` is `false`.");
495
- let a, o = ++E;
495
+ let a, o = ++D;
496
496
  i.isLoading = !0;
497
497
  try {
498
498
  e?.content && (i.content = e.content);
499
- let t = D;
499
+ let t = O;
500
500
  a = await r(e?.name === void 0 ? { content: i.content } : {
501
501
  name: e.name,
502
502
  content: i.content
503
- }), i.template = a, D === t && (i.isDirty = !1), T.value++;
503
+ }), i.template = a, O === t && (i.isDirty = !1), E.value++;
504
504
  } catch (e) {
505
505
  throw t.onError?.(e), e;
506
506
  } finally {
507
- E === o && (i.isLoading = !1);
507
+ D === o && (i.isLoading = !1);
508
508
  }
509
509
  return ye(() => n.onCreated?.(a)), a;
510
510
  }
511
511
  async function X(e, n) {
512
- let r = be("load()"), a, o = ++E;
512
+ let r = be("load()"), a, o = ++D;
513
513
  i.isLoading = !0;
514
514
  try {
515
- if (a = await r.load(e), R(a.content), A(a.content), n && !n()) return a;
516
- i.template = a, i.content = a.content, i.isDirty = !1, T.value++;
515
+ if (a = await r.load(e), R(a.content), k(a.content), n && !n()) return a;
516
+ i.template = a, i.content = a.content, i.isDirty = !1, E.value++;
517
517
  } catch (e) {
518
518
  throw t.onError?.(e), e;
519
519
  } finally {
520
- E === o && (i.isLoading = !1);
520
+ D === o && (i.isLoading = !1);
521
521
  }
522
522
  return ye(() => r.onLoaded?.(a)), a;
523
523
  }
@@ -532,7 +532,7 @@ function Ie(t) {
532
532
  }, s;
533
533
  i.isSaving = !0;
534
534
  try {
535
- let e = D;
535
+ let e = O;
536
536
  if (s = await r(a.id, o), i.template?.id === a.id) {
537
537
  let e = i.template.name;
538
538
  i.template = e === a.name ? s : {
@@ -540,7 +540,7 @@ function Ie(t) {
540
540
  name: e
541
541
  };
542
542
  }
543
- D === e && (i.isDirty = !1);
543
+ O === e && (i.isDirty = !1);
544
544
  } catch (e) {
545
545
  throw t.onError?.(e), e;
546
546
  } finally {
@@ -553,9 +553,9 @@ function Ie(t) {
553
553
  }
554
554
  let Te = {
555
555
  state: e(i),
556
- loadVersion: e(T),
557
- content: k,
558
- selectedBlock: ee,
556
+ loadVersion: e(E),
557
+ content: ee,
558
+ selectedBlock: F,
559
559
  activeLocale: a,
560
560
  setActiveLocale: c,
561
561
  addLocale: h,
@@ -565,33 +565,33 @@ function Ie(t) {
565
565
  keepTranslations: w,
566
566
  setCustomBlockDefinitions: u,
567
567
  createSetDefaultLocaleOperation: d,
568
- isBlockLocked: z,
569
- setContent: W,
570
- selectBlock: K,
568
+ isBlockLocked: V,
569
+ setContent: ae,
570
+ selectBlock: U,
571
571
  setViewport: oe,
572
572
  setDarkMode: se,
573
- setUiTheme: ce,
574
- setPreviewMode: le,
575
- updateBlock: de,
573
+ setUiTheme: W,
574
+ setPreviewMode: ce,
575
+ updateBlock: fe,
576
576
  updateSettings: q,
577
577
  addBlock: me,
578
578
  removeBlock: he,
579
579
  moveBlock: ge,
580
580
  markDirty: _e,
581
- findBlockLocation: B,
581
+ findBlockLocation: H,
582
582
  setName: Y,
583
583
  create: xe,
584
584
  load: X,
585
585
  save: Se,
586
586
  hasTemplate: Ce
587
587
  };
588
- return Ne(Te, (e, t) => Ae(e) ? je(J, e, t) : l() ? e === "updateBlock" ? ue(t[0], t[1]) : (e === "updateSettings" && pe(t[0]), e === "addLocale" || e === "removeLocale" ? f(e, t[0]) !== null : e === "setBlockHidden" || e === "resetLocaleFields" || e === "keepTranslations" ? b(e, t) !== null : !0) : !1), Te;
588
+ return Ne(Te, (e, t) => Ae(e) ? je(J, e, t) : l() ? e === "updateBlock" ? le(t[0], t[1]) : (e === "updateSettings" && pe(t[0]), e === "addLocale" || e === "removeLocale" ? f(e, t[0]) !== null : e === "setBlockHidden" || e === "resetLocaleFields" || e === "keepTranslations" ? b(e, t) !== null : !0) : !1), Te;
589
589
  }
590
590
  var Le = 50, Re = 300, ze = 1500;
591
591
  function Be(e) {
592
592
  let { content: t, setContent: n, maxSize: i = Le } = e, a = p([]), o = p([]), s = p(!1), c = null, l = null, u = r(() => a.value.length > 0), d = r(() => o.value.length > 0);
593
593
  function f() {
594
- return N(t.value);
594
+ return G(t.value);
595
595
  }
596
596
  function m(e) {
597
597
  a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
@@ -651,11 +651,11 @@ function Be(e) {
651
651
  function Ve(e) {
652
652
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
653
653
  function o(n, r, a) {
654
- let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = E(n, o);
654
+ let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = oe(n, o);
655
655
  return t(s, r, a), i(s.id), s;
656
656
  }
657
657
  function s(e, n, r) {
658
- let o = k(e);
658
+ let o = F(e);
659
659
  if (!Q(t, "duplicateBlock", [
660
660
  e,
661
661
  n,
@@ -855,7 +855,7 @@ function tt(e) {
855
855
  }
856
856
  function nt(e, t, n) {
857
857
  let r = {}, i = [];
858
- for (let i of Object.keys(t)) n.has(i) || t[i] === void 0 || H(e[i], t[i]) || (r[i] = N(t[i]));
858
+ for (let i of Object.keys(t)) n.has(i) || t[i] === void 0 || L(e[i], t[i]) || (r[i] = G(t[i]));
859
859
  for (let r of Object.keys(e)) n.has(r) || e[r] === void 0 || t[r] === void 0 && i.push(r);
860
860
  return {
861
861
  set: r,
@@ -874,7 +874,7 @@ function rt(e = {}, t = {}) {
874
874
  function it(e, t) {
875
875
  if (e.settings.locale !== t.settings.locale && (e.settings.locales?.length || t.settings.locales?.length)) return [{
876
876
  op: "setContent",
877
- content: N(t)
877
+ content: G(t)
878
878
  }];
879
879
  let n = et(e.blocks), r = et(t.blocks), i = [], a = (e) => {
880
880
  let t = r.get(e), i = n.get(e);
@@ -892,8 +892,8 @@ function it(e, t) {
892
892
  };
893
893
  for (let t of e.blocks) u(t, "kept");
894
894
  let d = (e) => n.has(e) && !c.has(e), f = (e) => {
895
- let t = N(e);
896
- return t.type === "section" && (t.children = $e(e).map((e) => Array.isArray(e) ? e.filter((e) => !d(e.id)).map((e) => N(e)) : e)), t;
895
+ let t = G(e);
896
+ return t.type === "section" && (t.children = $e(e).map((e) => Array.isArray(e) ? e.filter((e) => !d(e.id)).map((e) => G(e)) : e)), t;
897
897
  }, p = (e, t, r) => {
898
898
  let a = Qe(e), o = [], s = [];
899
899
  t.forEach((e, t) => {
@@ -1032,32 +1032,32 @@ function ct(e, t, n) {
1032
1032
  Object.keys(n).length ? (e.l10n ??= {})[t] = n : e.l10n && (delete e.l10n[t], Object.keys(e.l10n).length || delete e.l10n);
1033
1033
  }
1034
1034
  function lt(e) {
1035
- let t = N(e);
1035
+ let t = G(e);
1036
1036
  return delete t.l10n, t.type === "section" && (t.children = t.children.map((e) => e.map(lt))), t;
1037
1037
  }
1038
1038
  function ut(e, t, n, r) {
1039
- let i = ie(e, t), a = N(e), o = N(i.settings), s = !1, c = /* @__PURE__ */ new Map(), l = (n, r) => {
1039
+ let i = M(e, t), a = G(e), o = G(i.settings), s = !1, c = /* @__PURE__ */ new Map(), l = (n, r) => {
1040
1040
  for (let [i, a] of $(n)) c.set(i, {
1041
- initial: P(a, t, G(e)),
1041
+ initial: P(a, t, K(e)),
1042
1042
  added: r,
1043
1043
  changed: !1
1044
1044
  });
1045
1045
  };
1046
1046
  l(i.blocks, !1);
1047
1047
  let u = [], d = (e, t, n) => {
1048
- if (t.some((e) => e?.op === "setDefaultLocale")) throw new W("invalid_operation", n, "Changing the default language isn't possible in a language view; switch to the default language.");
1049
- if (t.some((e) => e?.op === "setContent")) throw new W("invalid_operation", n, "Replacing the whole template isn't possible in a language view; switch to the default language.");
1048
+ if (t.some((e) => e?.op === "setDefaultLocale")) throw new V("invalid_operation", n, "Changing the default language isn't possible in a language view; switch to the default language.");
1049
+ if (t.some((e) => e?.op === "setContent")) throw new V("invalid_operation", n, "Replacing the whole template isn't possible in a language view; switch to the default language.");
1050
1050
  try {
1051
- return D(e, t);
1051
+ return E(e, t);
1052
1052
  } catch (e) {
1053
- throw e instanceof W ? new W(e.code, n, e.message, e.blockId) : e;
1053
+ throw e instanceof V ? new V(e.code, n, e.message, e.blockId) : e;
1054
1054
  }
1055
1055
  }, f = (e, t) => {
1056
1056
  a = d(a, e, t), u.push(...e);
1057
1057
  }, p = (e, n) => {
1058
1058
  let o = c.get(e);
1059
1059
  if (!o?.changed) return;
1060
- let s = $(a.blocks).get(e), l = $(i.blocks).get(e), u = N(a), d = at(u, ot(u, e).parent), p = N(s);
1060
+ let s = $(a.blocks).get(e), l = $(i.blocks).get(e), u = G(a), d = at(u, ot(u, e).parent), p = G(s);
1061
1061
  if (o.added) p = lt(l), p.type === "section" && s.type === "section" && (p.children = s.children, p.columns = s.columns);
1062
1062
  else {
1063
1063
  let e = p.type === "section" ? {
@@ -1065,7 +1065,7 @@ function ut(e, t, n, r) {
1065
1065
  children: p.children,
1066
1066
  columns: p.columns
1067
1067
  } : l;
1068
- De(p, e, (e) => $(a.blocks).get(e) ?? null), p = I(p);
1068
+ De(p, e, (e) => $(a.blocks).get(e) ?? null), p = j(p);
1069
1069
  let n = p.l10n?.[t];
1070
1070
  ct(p, t, ke(n, Ee(p, o.initial, n, r), Ee(p, l, n, r), p, l));
1071
1071
  }
@@ -1088,7 +1088,7 @@ function ut(e, t, n, r) {
1088
1088
  op: "updateBlock",
1089
1089
  blockId: e.blockId,
1090
1090
  set: { columns: i.columns },
1091
- ...e.expect ? { expect: Object.fromEntries(Object.keys(e.expect).map((e) => [e, M(u, e) ?? null])) } : {}
1091
+ ...e.expect ? { expect: Object.fromEntries(Object.keys(e.expect).map((e) => [e, N(u, e) ?? null])) } : {}
1092
1092
  }], n);
1093
1093
  };
1094
1094
  n.forEach((e, t) => {
@@ -1133,7 +1133,7 @@ function ut(e, t, n, r) {
1133
1133
  });
1134
1134
  for (let e of c.keys()) p(e, n.length - 1);
1135
1135
  if (s) {
1136
- let e = N(a), r = e.settings.l10n?.[t];
1136
+ let e = G(a), r = e.settings.l10n?.[t];
1137
1137
  ct(e.settings, t, ke(r, Oe(e.settings, o, r), Oe(e.settings, i.settings, r), e.settings, i.settings)), f(it(a, e), n.length - 1);
1138
1138
  }
1139
1139
  return u;
@@ -1190,7 +1190,7 @@ function Ct(e) {
1190
1190
  });
1191
1191
  }
1192
1192
  function wt(e) {
1193
- let { provider: t } = e, n = e.sessionId ?? crypto.randomUUID(), i = e.maxUndo ?? mt, a = typeof t.acquireLock == "function" && typeof t.renewLock == "function" && typeof t.releaseLock == "function", o = y([]), s = y(/* @__PURE__ */ new Map()), c = /* @__PURE__ */ new WeakSet(), u = /* @__PURE__ */ new WeakMap(), d = 0, f = p(null), m = p(null), h = p(0), g = p(0), _ = null, b = null, S = !1, C = !1, w = !1, T = !1, E = null, O = 0, k = !1, ee = [], A = null, j = null, te = Promise.resolve(), ne = null, re = r(() => (g.value, (b?.undo.length ?? 0) > 0)), M = r(() => (g.value, (b?.redo.length ?? 0) > 0));
1193
+ let { provider: t } = e, n = e.sessionId ?? crypto.randomUUID(), i = e.maxUndo ?? mt, a = typeof t.acquireLock == "function" && typeof t.renewLock == "function" && typeof t.releaseLock == "function", o = y([]), s = y(/* @__PURE__ */ new Map()), c = /* @__PURE__ */ new WeakSet(), u = /* @__PURE__ */ new WeakMap(), d = 0, f = p(null), m = p(null), h = p(0), g = p(0), _ = null, b = null, S = !1, C = !1, w = !1, T = !1, D = null, O = 0, k = !1, A = [], j = null, M = null, ee = Promise.resolve(), te = null, ne = r(() => (g.value, (b?.undo.length ?? 0) > 0)), N = r(() => (g.value, (b?.redo.length ?? 0) > 0));
1194
1194
  function P(t) {
1195
1195
  e.onError?.(t instanceof Error ? t : Error(String(t)));
1196
1196
  }
@@ -1207,10 +1207,10 @@ function wt(e) {
1207
1207
  session: n
1208
1208
  };
1209
1209
  }
1210
- function L() {
1210
+ function R() {
1211
1211
  g.value++;
1212
1212
  }
1213
- function R(e, t) {
1213
+ function re(e, t) {
1214
1214
  e.push(t), e.length > i && e.splice(0, e.length - i);
1215
1215
  }
1216
1216
  function z(e) {
@@ -1219,52 +1219,52 @@ function wt(e) {
1219
1219
  try {
1220
1220
  let t = _.content.value, n = it(t, e);
1221
1221
  if (n.length > 0) try {
1222
- fe(t, n);
1222
+ de(t, n);
1223
1223
  } catch {
1224
- _.setContent(N(e), !1);
1224
+ _.setContent(G(e), !1);
1225
1225
  }
1226
- H(_.content.value, e) || _.setContent(N(e), !1);
1226
+ L(_.content.value, e) || _.setContent(G(e), !1);
1227
1227
  } finally {
1228
1228
  C = !1;
1229
1229
  }
1230
1230
  let t = _.state.selectedBlockId;
1231
1231
  t && !xt(e.blocks, t) && _.selectBlock(null);
1232
1232
  }
1233
- function B() {
1233
+ function ie() {
1234
1234
  C || T || (T = !0, queueMicrotask(() => {
1235
- T = !1, V(!1);
1235
+ T = !1, H(!1);
1236
1236
  }));
1237
1237
  }
1238
- function ie() {
1239
- E &&= (clearTimeout(E), null);
1238
+ function B() {
1239
+ D &&= (clearTimeout(D), null);
1240
1240
  }
1241
- function V(e, t = !1) {
1241
+ function H(e, t = !1) {
1242
1242
  let n = b;
1243
1243
  if (!_ || !n || S || C || _.state.isLoading && !t || _.state.template?.id !== n.templateId) return;
1244
1244
  let r = it(n.view, _.content.value);
1245
- if (r.length === 0) ie();
1245
+ if (r.length === 0) B();
1246
1246
  else {
1247
1247
  if (!e && St(r)) {
1248
1248
  let e = Date.now();
1249
- if (E === null && (O = e), e - O < 1e3) {
1250
- E && clearTimeout(E), E = setTimeout(() => {
1251
- E = null, V(!0);
1249
+ if (D === null && (O = e), e - O < 1e3) {
1250
+ D && clearTimeout(D), D = setTimeout(() => {
1251
+ D = null, H(!0);
1252
1252
  }, 300);
1253
1253
  return;
1254
1254
  }
1255
1255
  }
1256
- ie(), ae(n, r);
1256
+ B(), oe(n, r);
1257
1257
  }
1258
1258
  }
1259
1259
  function U() {
1260
- V(!0);
1260
+ H(!0);
1261
1261
  }
1262
- function ae(e, t) {
1262
+ function oe(e, t) {
1263
1263
  let n = t, r;
1264
1264
  try {
1265
- r = D(e.view, n, I());
1265
+ r = E(e.view, n, I());
1266
1266
  } catch (n) {
1267
- if (!(n instanceof W)) throw n;
1267
+ if (!(n instanceof V)) throw n;
1268
1268
  z(e.view);
1269
1269
  let r = n.blockId === void 0 ? void 0 : ke(n.blockId).find((e) => {
1270
1270
  let r = t[n.opIndex];
@@ -1278,15 +1278,15 @@ function wt(e) {
1278
1278
  return;
1279
1279
  }
1280
1280
  let i = _.content.value;
1281
- if (!H(r, i)) {
1281
+ if (!L(r, i)) {
1282
1282
  P(/* @__PURE__ */ Error("[Templatical] Collaboration: a change couldn't be expressed as block operations, so the whole content was sent.")), n = [{
1283
1283
  op: "setContent",
1284
- content: N(i)
1284
+ content: G(i)
1285
1285
  }];
1286
1286
  try {
1287
- r = D(e.view, n, I());
1287
+ r = E(e.view, n, I());
1288
1288
  } catch (t) {
1289
- if (!(t instanceof W)) throw t;
1289
+ if (!(t instanceof V)) throw t;
1290
1290
  z(e.view), F({
1291
1291
  type: "editRefused",
1292
1292
  code: t.code
@@ -1294,12 +1294,12 @@ function wt(e) {
1294
1294
  return;
1295
1295
  }
1296
1296
  }
1297
- let a = _t({ ops: se(e.view, n) }, r);
1298
- R(e.undo, a), e.redo = [], L();
1297
+ let a = _t({ ops: ae(e.view, n) }, r);
1298
+ re(e.undo, a), e.redo = [], R();
1299
1299
  let o = e.view;
1300
- e.view = r, G(e, n, "edit", a, o);
1300
+ e.view = r, se(e, n, "edit", a, o);
1301
1301
  }
1302
- function G(e, t, n, r, i) {
1302
+ function se(e, t, n, r, i) {
1303
1303
  let a = { dropped: !1 }, o = 0, s = i;
1304
1304
  do {
1305
1305
  let i = t.slice(o, o + ht);
@@ -1313,41 +1313,41 @@ function wt(e) {
1313
1313
  revision: null,
1314
1314
  ...s && i.some((e) => e.op === "setContent") ? { base: s } : {}
1315
1315
  }), o += ht, s && t.slice(o).some((e) => e.op === "setContent")) try {
1316
- s = D(s, i);
1316
+ s = E(s, i);
1317
1317
  } catch {
1318
1318
  s = null;
1319
1319
  }
1320
1320
  } while (o < t.length);
1321
- K(e);
1321
+ W(e);
1322
1322
  }
1323
- function K(e) {
1323
+ function W(e) {
1324
1324
  if (e.inFlight || w) return;
1325
1325
  let t = e.pending.find((e) => !e.sent);
1326
- t ? (t.sent = !0, e.inFlight = t, oe(e, t, 0)) : q(e);
1326
+ t ? (t.sent = !0, e.inFlight = t, ce(e, t, 0)) : q(e);
1327
1327
  }
1328
- function oe(e, n, r) {
1328
+ function ce(e, n, r) {
1329
1329
  t.submit(e.templateId, {
1330
1330
  batchId: n.batchId,
1331
1331
  baseRevision: n.baseRevision ??= e.revision,
1332
1332
  ops: n.ops,
1333
1333
  ...n.origin === "ai" ? { origin: "ai" } : {}
1334
1334
  }).then(({ revision: t }) => {
1335
- e.inFlight = null, ce(e, n, t), K(e);
1335
+ e.inFlight = null, le(e, n, t), W(e);
1336
1336
  }, (t) => {
1337
- if (vt(t) !== null) e.inFlight = null, pe(e, n, t), K(e);
1337
+ if (vt(t) !== null) e.inFlight = null, pe(e, n, t), W(e);
1338
1338
  else if (bt(t)) {
1339
1339
  J(e, t);
1340
1340
  let i = pt[Math.min(r, pt.length - 1)];
1341
1341
  setTimeout(() => {
1342
- k || oe(e, n, r + 1);
1342
+ k || ce(e, n, r + 1);
1343
1343
  }, i);
1344
- } else e.inFlight = null, P(t), pe(e, n, t), K(e);
1344
+ } else e.inFlight = null, P(t), pe(e, n, t), W(e);
1345
1345
  });
1346
1346
  }
1347
- function ce(e, t, n) {
1348
- t.revision === null && (t.revision = n, n <= e.revision ? (le(e, t), _e(e)) : (e.own.set(n, t), ge(e)));
1347
+ function le(e, t, n) {
1348
+ t.revision === null && (t.revision = n, n <= e.revision ? (K(e, t), _e(e)) : (e.own.set(n, t), ge(e)));
1349
1349
  }
1350
- function le(e, t) {
1350
+ function K(e, t) {
1351
1351
  e.pending = e.pending.filter((e) => e !== t), q(e);
1352
1352
  }
1353
1353
  function ue(e, t) {
@@ -1356,15 +1356,15 @@ function wt(e) {
1356
1356
  let e = n.indexOf(t.entry);
1357
1357
  e !== -1 && n.splice(e, 1);
1358
1358
  }
1359
- L();
1359
+ R();
1360
1360
  }
1361
1361
  }
1362
- function de(e, t) {
1362
+ function fe(e, t) {
1363
1363
  let n = !t.group.dropped;
1364
1364
  return t.group.dropped = !0, e.pending = e.pending.filter((e) => e.group !== t.group || e.sent), n && ue(e, t), q(e), n;
1365
1365
  }
1366
1366
  function pe(e, t, n) {
1367
- if (le(e, t), de(e, t)) {
1367
+ if (K(e, t), fe(e, t)) {
1368
1368
  let r = vt(n) ?? "invalid_operation";
1369
1369
  if (t.origin === "edit" || t.origin === "ai") {
1370
1370
  let t = yt(n);
@@ -1390,7 +1390,7 @@ function wt(e) {
1390
1390
  function me(e, t) {
1391
1391
  if (t.revision <= e.revision) return;
1392
1392
  let n = e.pending.find((e) => e.batchId === t.batchId);
1393
- n ? ce(e, n, t.revision) : (e.remote.set(t.revision, t), ge(e));
1393
+ n ? le(e, n, t.revision) : (e.remote.set(t.revision, t), ge(e));
1394
1394
  }
1395
1395
  function he(t, n) {
1396
1396
  let r = n.ops;
@@ -1407,7 +1407,7 @@ function wt(e) {
1407
1407
  let e = t.revision + 1, i = t.remote.get(e), a = t.own.get(e);
1408
1408
  if (!i && !a) break;
1409
1409
  try {
1410
- t.confirmed = D(t.confirmed, i ? he(t, i) : a.ops);
1410
+ t.confirmed = E(t.confirmed, i ? he(t, i) : a.ops);
1411
1411
  } catch {
1412
1412
  if (t.recovering) {
1413
1413
  t.remote.clear(), t.own.clear(), P(/* @__PURE__ */ Error("[Templatical] Collaboration: this editor can't follow the template's changes. Reload the page."));
@@ -1416,7 +1416,7 @@ function wt(e) {
1416
1416
  xe(t);
1417
1417
  return;
1418
1418
  }
1419
- t.revision = e, i ? (t.remote.delete(e), n.push(i)) : (t.own.delete(e), a.group.dropped && (r = !0), le(t, a));
1419
+ t.revision = e, i ? (t.remote.delete(e), n.push(i)) : (t.own.delete(e), a.group.dropped && (r = !0), K(t, a));
1420
1420
  }
1421
1421
  if (t === b && (h.value = t.revision), t.remote.size > 0 || t.own.size > 0 ? ye(t) : be(t), (n.length !== 0 || r) && (_e(t), t === b)) for (let t of n) try {
1422
1422
  e.onRemoteChange?.({
@@ -1436,21 +1436,21 @@ function wt(e) {
1436
1436
  } finally {
1437
1437
  t && (w = !1);
1438
1438
  }
1439
- t && K(e);
1439
+ t && W(e);
1440
1440
  }
1441
1441
  function ve(e) {
1442
1442
  e === b && U();
1443
1443
  let t = e.confirmed;
1444
1444
  for (let n = 0; n < e.pending.length; n++) {
1445
1445
  let r = e.pending[n], i;
1446
- if (r.base && !H(r.base, t)) i = "precondition_failed";
1446
+ if (r.base && !L(r.base, t)) i = "precondition_failed";
1447
1447
  else try {
1448
- t = D(t, r.ops);
1448
+ t = E(t, r.ops);
1449
1449
  continue;
1450
1450
  } catch (e) {
1451
- i = e instanceof W ? e.code : "invalid_operation";
1451
+ i = e instanceof V ? e.code : "invalid_operation";
1452
1452
  }
1453
- r.sent || (de(e, r) && F(r.origin === "edit" || r.origin === "ai" ? {
1453
+ r.sent || (fe(e, r) && F(r.origin === "edit" || r.origin === "ai" ? {
1454
1454
  type: "editRefused",
1455
1455
  code: i
1456
1456
  } : {
@@ -1492,8 +1492,8 @@ function wt(e) {
1492
1492
  let n = await e.loadTemplate(t.templateId);
1493
1493
  if (t.retired) return;
1494
1494
  let r = n.revision ?? t.revision;
1495
- t.confirmed = N(n.content), t.revision = r, t.remote = new Map([...t.remote].filter(([e]) => e > r));
1496
- for (let [e, n] of [...t.own]) e <= r && (t.own.delete(e), le(t, n));
1495
+ t.confirmed = G(n.content), t.revision = r, t.remote = new Map([...t.remote].filter(([e]) => e > r));
1496
+ for (let [e, n] of [...t.own]) e <= r && (t.own.delete(e), K(t, n));
1497
1497
  t === b && (h.value = r), _e(t), ge(t);
1498
1498
  } catch (e) {
1499
1499
  P(e);
@@ -1541,12 +1541,12 @@ function wt(e) {
1541
1541
  }, (e) => P(e));
1542
1542
  }
1543
1543
  function Ce(e) {
1544
- let t = N(e.content), n = {
1544
+ let t = G(e.content), n = {
1545
1545
  templateId: e.id,
1546
1546
  confirmed: t,
1547
1547
  revision: e.revision ?? 0,
1548
1548
  pending: [],
1549
- view: N(t),
1549
+ view: G(t),
1550
1550
  remote: /* @__PURE__ */ new Map(),
1551
1551
  own: /* @__PURE__ */ new Map(),
1552
1552
  inFlight: null,
@@ -1559,7 +1559,7 @@ function wt(e) {
1559
1559
  redo: [],
1560
1560
  waiters: []
1561
1561
  };
1562
- b = n, h.value = n.revision, L(), Se(n, !1), _?.state.selectedBlockId && ze(_.state.selectedBlockId), B();
1562
+ b = n, h.value = n.revision, R(), Se(n, !1), _?.state.selectedBlockId && ze(_.state.selectedBlockId), ie();
1563
1563
  }
1564
1564
  function we(e) {
1565
1565
  e.retired = !0, be(e), e.leave?.(), e.leave = null, J(e, /* @__PURE__ */ Error("[Templatical] The template was closed."));
@@ -1569,7 +1569,7 @@ function wt(e) {
1569
1569
  m.value = t, t === "connected" && n !== null && n !== "connected" && Se(e, !0);
1570
1570
  }
1571
1571
  function Ee(e) {
1572
- b && b.templateId === e?.id || (b &&= (ie(), we(b), null), o.value = [], s.value = /* @__PURE__ */ new Map(), m.value = null, A = null, Pe(), L(), e && Ce(e));
1572
+ b && b.templateId === e?.id || (b &&= (B(), we(b), null), o.value = [], s.value = /* @__PURE__ */ new Map(), m.value = null, j = null, Pe(), R(), e && Ce(e));
1573
1573
  }
1574
1574
  function De(e, t) {
1575
1575
  return `${e}\u0000${t ?? ""}`;
@@ -1612,24 +1612,24 @@ function wt(e) {
1612
1612
  r.size !== s.value.size && (s.value = r);
1613
1613
  }
1614
1614
  function Q(e) {
1615
- te = te.then(e).catch(P);
1615
+ ee = ee.then(e).catch(P);
1616
1616
  }
1617
1617
  function Pe() {
1618
1618
  a && Q(async () => {
1619
- if (j && (A === null || j.templateId !== A.templateId || j.locale !== A.locale)) {
1620
- let e = j;
1621
- j = null, Re(), await t.releaseLock(e.templateId, e.blockId, e.locale);
1619
+ if (M && (j === null || M.templateId !== j.templateId || M.locale !== j.locale)) {
1620
+ let e = M;
1621
+ M = null, Re(), await t.releaseLock(e.templateId, e.blockId, e.locale);
1622
1622
  }
1623
- let e = A;
1624
- if (!(!e || j?.templateId === e.templateId && j.blockId === e.blockId && j.locale === e.locale)) try {
1623
+ let e = j;
1624
+ if (!(!e || M?.templateId === e.templateId && M.blockId === e.blockId && M.locale === e.locale)) try {
1625
1625
  let n = await t.acquireLock(e.templateId, e.blockId, e.locale);
1626
- j = e, Le(), Fe(n.blockId, n.locale ?? null);
1626
+ M = e, Le(), Fe(n.blockId, n.locale ?? null);
1627
1627
  } catch (n) {
1628
- if (j?.templateId === e.templateId) {
1629
- let e = j;
1630
- j = null, Re(), await t.releaseLock(e.templateId, e.blockId, e.locale).catch(() => {});
1628
+ if (M?.templateId === e.templateId) {
1629
+ let e = M;
1630
+ M = null, Re(), await t.releaseLock(e.templateId, e.blockId, e.locale).catch(() => {});
1631
1631
  }
1632
- if (A !== e) return;
1632
+ if (j !== e) return;
1633
1633
  Ie(e.blockId, n);
1634
1634
  }
1635
1635
  });
@@ -1641,7 +1641,7 @@ function wt(e) {
1641
1641
  function Ie(e, t) {
1642
1642
  let n = vt(t);
1643
1643
  if (n === "lock_held" || n === "block_missing") {
1644
- A = null;
1644
+ j = null;
1645
1645
  let n = yt(t);
1646
1646
  n ? je({
1647
1647
  blockId: e,
@@ -1649,18 +1649,18 @@ function wt(e) {
1649
1649
  expiresAt: ""
1650
1650
  }, !0) : _?.state.selectedBlockId === e && _.selectBlock(null);
1651
1651
  } else P(t), setTimeout(() => {
1652
- A?.blockId === e && Pe();
1652
+ j?.blockId === e && Pe();
1653
1653
  }, pt[0]);
1654
1654
  }
1655
1655
  function Le() {
1656
- ne ||= setInterval(() => {
1656
+ te ||= setInterval(() => {
1657
1657
  Q(async () => {
1658
- let e = j;
1658
+ let e = M;
1659
1659
  if (e) try {
1660
1660
  await t.renewLock(e.templateId, e.blockId, e.locale);
1661
1661
  } catch (e) {
1662
1662
  if (vt(e) === "lock_lost") {
1663
- j = null, Re(), Pe();
1663
+ M = null, Re(), Pe();
1664
1664
  return;
1665
1665
  }
1666
1666
  P(e);
@@ -1669,17 +1669,17 @@ function wt(e) {
1669
1669
  }, ft);
1670
1670
  }
1671
1671
  function Re() {
1672
- ne &&= (clearInterval(ne), null);
1672
+ te &&= (clearInterval(te), null);
1673
1673
  }
1674
1674
  function ze(e) {
1675
- U(), b && (A = e ? {
1675
+ U(), b && (j = e ? {
1676
1676
  templateId: b.templateId,
1677
1677
  blockId: e,
1678
1678
  locale: f.value
1679
1679
  } : null, Pe());
1680
1680
  }
1681
1681
  function Be() {
1682
- U(), j && a && (t.releaseLock(j.templateId, j.blockId, j.locale).catch(() => {}), j = null, Re()), b?.leave?.(), b && (b.leave = null);
1682
+ U(), M && a && (t.releaseLock(M.templateId, M.blockId, M.locale).catch(() => {}), M = null, Re()), b?.leave?.(), b && (b.leave = null);
1683
1683
  }
1684
1684
  function Ve(e) {
1685
1685
  let t = b;
@@ -1687,7 +1687,7 @@ function wt(e) {
1687
1687
  U();
1688
1688
  let n = (e === "undo" ? t.undo : t.redo).pop();
1689
1689
  if (!n) return;
1690
- if (L(), n.view && !H(n.view, t.view)) {
1690
+ if (R(), n.view && !L(n.view, t.view)) {
1691
1691
  F({
1692
1692
  type: "undoSkipped",
1693
1693
  code: "precondition_failed"
@@ -1696,30 +1696,30 @@ function wt(e) {
1696
1696
  }
1697
1697
  let r;
1698
1698
  try {
1699
- r = D(t.view, n.ops, I());
1699
+ r = E(t.view, n.ops, I());
1700
1700
  } catch (e) {
1701
- if (!(e instanceof W)) throw e;
1701
+ if (!(e instanceof V)) throw e;
1702
1702
  F({
1703
1703
  type: "undoSkipped",
1704
1704
  code: e.code
1705
1705
  });
1706
1706
  return;
1707
1707
  }
1708
- let i = _t({ ops: se(t.view, n.ops) }, r);
1709
- R(e === "undo" ? t.redo : t.undo, i);
1708
+ let i = _t({ ops: ae(t.view, n.ops) }, r);
1709
+ re(e === "undo" ? t.redo : t.undo, i);
1710
1710
  let a = t.view;
1711
- t.view = r, z(r), _?.markDirty(), G(t, n.ops, e, i, a);
1711
+ t.view = r, z(r), _?.markDirty(), se(t, n.ops, e, i, a);
1712
1712
  }
1713
1713
  function He(e, t) {
1714
1714
  let n = b;
1715
1715
  if (!_ || !n || S) return {
1716
1716
  applied: !1,
1717
- error: new W("invalid_operation", 0, "No template is open for editing.")
1717
+ error: new V("invalid_operation", 0, "No template is open for editing.")
1718
1718
  };
1719
1719
  if (t.origin === void 0) try {
1720
- D(_.content.value, e, I());
1720
+ E(_.content.value, e, I());
1721
1721
  } catch (e) {
1722
- if (e instanceof W) return {
1722
+ if (e instanceof V) return {
1723
1723
  applied: !1,
1724
1724
  error: e
1725
1725
  };
@@ -1728,9 +1728,9 @@ function wt(e) {
1728
1728
  U();
1729
1729
  let r, i;
1730
1730
  try {
1731
- r = D(n.view, e, I()), i = se(n.view, e);
1731
+ r = E(n.view, e, I()), i = ae(n.view, e);
1732
1732
  } catch (e) {
1733
- if (e instanceof W) return {
1733
+ if (e instanceof V) return {
1734
1734
  applied: !1,
1735
1735
  error: e
1736
1736
  };
@@ -1738,15 +1738,15 @@ function wt(e) {
1738
1738
  }
1739
1739
  let a = n.undo.at(-1), o;
1740
1740
  if (t.origin === "ai" && t.turn !== void 0 && a && a.turn === t.turn) {
1741
- let e = a.view !== void 0 && !H(a.view, n.view);
1741
+ let e = a.view !== void 0 && !L(a.view, n.view);
1742
1742
  a.ops = [...i, ...a.ops], o = e ? a : _t(a, r);
1743
1743
  } else o = _t({
1744
1744
  ops: i,
1745
1745
  ...t.origin === "ai" && t.turn !== void 0 ? { turn: t.turn } : {}
1746
- }, r), R(n.undo, o);
1747
- n.redo = [], L();
1746
+ }, r), re(n.undo, o);
1747
+ n.redo = [], R();
1748
1748
  let s = n.view;
1749
- return n.view = r, z(r), _.markDirty(), G(n, e, t.origin ?? "edit", o, s), {
1749
+ return n.view = r, z(r), _.markDirty(), se(n, e, t.origin ?? "edit", o, s), {
1750
1750
  applied: !0,
1751
1751
  inverse: i
1752
1752
  };
@@ -1757,25 +1757,25 @@ function wt(e) {
1757
1757
  if (t.moveBlock && t.findBlockLocation) {
1758
1758
  let n = t.moveBlock, r = (...r) => {
1759
1759
  let i = b, a = i && !S && !C && !e.state.isLoading && e.state.template?.id === i.templateId;
1760
- if (a && V(!0), n(...r), !a || H(i.view, e.content.value)) return;
1760
+ if (a && H(!0), n(...r), !a || L(i.view, e.content.value)) return;
1761
1761
  let o = t.findBlockLocation(r[0]);
1762
1762
  if (!o) return;
1763
1763
  let s = o.targetSectionId ? {
1764
1764
  sectionId: o.targetSectionId,
1765
1765
  column: o.columnIndex ?? 0
1766
1766
  } : null, c = s ? e.content.value.blocks.find((e) => e.id === s.sectionId) : void 0, l = s && c?.type === "section" ? c.children[s.column] : e.content.value.blocks;
1767
- ae(i, [{
1767
+ oe(i, [{
1768
1768
  op: "moveBlock",
1769
1769
  blockId: r[0],
1770
1770
  parent: s,
1771
1771
  after: l[o.index - 1]?.id ?? null
1772
1772
  }]);
1773
1773
  };
1774
- t.moveBlock = r, ee.push(() => {
1774
+ t.moveBlock = r, A.push(() => {
1775
1775
  t.moveBlock === r && (t.moveBlock = n);
1776
1776
  });
1777
1777
  }
1778
- ee.push(v(() => e.state.template, (e) => Ee(e), { immediate: !0 }), v(() => e.content.value, B, { deep: !0 }), v(() => e.state.selectedBlockId, ze), v(() => e.state.isLoading, (e) => e ? V(!0, !0) : B())), typeof window < "u" && (window.addEventListener("pagehide", Be), window.addEventListener("blur", U)), x() && l(qe);
1778
+ A.push(v(() => e.state.template, (e) => Ee(e), { immediate: !0 }), v(() => e.content.value, ie, { deep: !0 }), v(() => e.state.selectedBlockId, ze), v(() => e.state.isLoading, (e) => e ? H(!0, !0) : ie())), typeof window < "u" && (window.addEventListener("pagehide", Be), window.addEventListener("blur", U)), x() && l(qe);
1779
1779
  }
1780
1780
  function We() {
1781
1781
  U();
@@ -1794,8 +1794,8 @@ function wt(e) {
1794
1794
  function qe() {
1795
1795
  if (!k) {
1796
1796
  U();
1797
- for (let e of ee.splice(0)) e();
1798
- ie(), Be(), k = !0, b && we(b), b = null, Re(), typeof window < "u" && (window.removeEventListener("pagehide", Be), window.removeEventListener("blur", U));
1797
+ for (let e of A.splice(0)) e();
1798
+ B(), Be(), k = !0, b && we(b), b = null, Re(), typeof window < "u" && (window.removeEventListener("pagehide", Be), window.removeEventListener("blur", U));
1799
1799
  }
1800
1800
  }
1801
1801
  return {
@@ -1807,13 +1807,13 @@ function wt(e) {
1807
1807
  setLockLocale: Ae,
1808
1808
  connection: m,
1809
1809
  revision: h,
1810
- canUndo: re,
1811
- canRedo: M,
1810
+ canUndo: ne,
1811
+ canRedo: N,
1812
1812
  attach: Ue,
1813
1813
  undo: () => Ve("undo"),
1814
1814
  redo: () => Ve("redo"),
1815
1815
  clearHistory: () => {
1816
- b && (b.undo = [], b.redo = [], L());
1816
+ b && (b.undo = [], b.redo = [], R());
1817
1817
  },
1818
1818
  flush: U,
1819
1819
  settle: We,
@@ -1841,7 +1841,7 @@ function Tt(e) {
1841
1841
  return s.value && e.canDelete !== !1;
1842
1842
  }
1843
1843
  function u(e, t) {
1844
- throw new U(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
1844
+ throw new z(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
1845
1845
  }
1846
1846
  function f(t) {
1847
1847
  Fe(e.onError, t);
@@ -1938,7 +1938,7 @@ function Dt(e = {}) {
1938
1938
  },
1939
1939
  async create(e) {
1940
1940
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
1941
- id: ue(),
1941
+ id: le(),
1942
1942
  name: e.name,
1943
1943
  content: e.content,
1944
1944
  ...e.category ? { category: e.category } : {},
@@ -2004,7 +2004,7 @@ function At(e = {}) {
2004
2004
  },
2005
2005
  async create(e) {
2006
2006
  let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
2007
- id: ue(),
2007
+ id: le(),
2008
2008
  url: t,
2009
2009
  filename: e.filename || e.file.name,
2010
2010
  createdAt: n,
@@ -2043,11 +2043,11 @@ function jt(e) {
2043
2043
  let { provider: t, getTemplateId: n } = e, r = p([]), i = p(!1), a = p(void 0), o = p(!1), s = /* @__PURE__ */ new Map(), c = d(() => typeof t.create == "function"), l = d(() => typeof t.restore == "function");
2044
2044
  function u(e) {
2045
2045
  let t = n();
2046
- if (!t) throw new U(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
2046
+ if (!t) throw new z(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
2047
2047
  return t;
2048
2048
  }
2049
2049
  function f(e) {
2050
- throw new U(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
2050
+ throw new z(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
2051
2051
  }
2052
2052
  function m(t) {
2053
2053
  Fe(e.onError, t);
@@ -2125,16 +2125,16 @@ function Mt(e) {
2125
2125
  });
2126
2126
  function g(e) {
2127
2127
  let t = n();
2128
- if (!t) throw new U(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
2128
+ if (!t) throw new z(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
2129
2129
  return t;
2130
2130
  }
2131
2131
  function _(e) {
2132
2132
  let t = r();
2133
- if (!t) throw new U(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
2133
+ if (!t) throw new z(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
2134
2134
  return t;
2135
2135
  }
2136
2136
  function v(e) {
2137
- throw new U(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
2137
+ throw new z(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
2138
2138
  }
2139
2139
  function y(e) {
2140
2140
  for (let t of i.value) {
@@ -2230,7 +2230,7 @@ function Mt(e) {
2230
2230
  o.value = !1;
2231
2231
  }
2232
2232
  }
2233
- async function ee(e) {
2233
+ async function A(e) {
2234
2234
  let { delete: n } = t;
2235
2235
  typeof n != "function" && v("delete");
2236
2236
  let r = g("delete");
@@ -2245,7 +2245,7 @@ function Mt(e) {
2245
2245
  o.value = !1;
2246
2246
  }
2247
2247
  }
2248
- async function A(e, n) {
2248
+ async function j(e, n) {
2249
2249
  let { setResolved: r } = t;
2250
2250
  typeof r != "function" && v("setResolved");
2251
2251
  let i = g("setResolved");
@@ -2259,13 +2259,13 @@ function Mt(e) {
2259
2259
  o.value = !1;
2260
2260
  }
2261
2261
  }
2262
- function j(e) {
2262
+ function M(e) {
2263
2263
  T(e) && S(() => t.onCreated?.(e, { origin: "remote" }));
2264
2264
  }
2265
- function te(e) {
2265
+ function ee(e) {
2266
2266
  T(e) && S(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
2267
2267
  }
2268
- function ne(e, n) {
2268
+ function te(e, n) {
2269
2269
  let r = E(e, n);
2270
2270
  r && S(() => t.onDeleted?.(r, { origin: "remote" }));
2271
2271
  }
@@ -2283,13 +2283,13 @@ function Mt(e) {
2283
2283
  load: D,
2284
2284
  create: O,
2285
2285
  update: k,
2286
- remove: ee,
2287
- setResolved: A,
2286
+ remove: A,
2287
+ setResolved: j,
2288
2288
  find: y,
2289
2289
  isOwn: b,
2290
- applyRemoteCreate: j,
2291
- applyRemoteUpdate: te,
2292
- applyRemoteDelete: ne
2290
+ applyRemoteCreate: M,
2291
+ applyRemoteUpdate: ee,
2292
+ applyRemoteDelete: te
2293
2293
  };
2294
2294
  }
2295
2295
  function Nt(e) {
@@ -2451,14 +2451,14 @@ function Vt(e, t) {
2451
2451
  return typeof n == "string" && n.length > 0 ? n : t;
2452
2452
  }
2453
2453
  function Ht(e, t) {
2454
- return typeof e?.url == "string" && F(e.url, t);
2454
+ return typeof e?.url == "string" && se(e.url, t);
2455
2455
  }
2456
2456
  function Ut(e, t) {
2457
2457
  let n = e?.url;
2458
- if (typeof n == "string" && n.trim() !== "") return F(n, t) ? void 0 : n;
2458
+ if (typeof n == "string" && n.trim() !== "") return se(n, t) ? void 0 : n;
2459
2459
  }
2460
2460
  function Wt(e) {
2461
- let t = C(he, K.liquid), n = Bt(() => Ut(e(), t));
2461
+ let t = C(he, H.liquid), n = Bt(() => Ut(e(), t));
2462
2462
  return d(() => Ht(e(), t) ? null : n.value);
2463
2463
  }
2464
2464
  function Gt(e, t, n) {
@@ -2627,11 +2627,24 @@ var cn = "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)", ln = {
2627
2627
  33.33,
2628
2628
  33.34
2629
2629
  ],
2630
+ 4: [
2631
+ 25,
2632
+ 25,
2633
+ 25,
2634
+ 25
2635
+ ],
2630
2636
  "1-2": [33.33, 66.67],
2631
- "2-1": [66.67, 33.33]
2637
+ "2-1": [66.67, 33.33],
2638
+ "1-3": [25, 75],
2639
+ "3-1": [75, 25],
2640
+ "1-2-1": [
2641
+ 25,
2642
+ 50,
2643
+ 25
2644
+ ]
2632
2645
  };
2633
2646
  function un(e, t) {
2634
- let n = (e) => Math.trunc(e ?? 0), r = (e) => T(e) === null ? 0 : Math.trunc(e.width);
2647
+ let n = (e) => Math.trunc(e ?? 0), r = (e) => ce(e) === null ? 0 : Math.trunc(e.width);
2635
2648
  return n(e?.left) + n(e?.right) + r(t?.left) + r(t?.right);
2636
2649
  }
2637
2650
  function dn(e, t) {
@@ -2642,23 +2655,23 @@ function fn(e, t) {
2642
2655
  return Math.floor(t) - un(e.styles.padding, n);
2643
2656
  }
2644
2657
  function* pn(e, t) {
2645
- for (let n of e) ee(n) ? yield* pn(n.children, dn(t, n.styles.padding)) : yield {
2658
+ for (let n of e) I(n) ? yield* pn(n.children, dn(t, n.styles.padding)) : yield {
2646
2659
  block: n,
2647
- bandWidth: O(n) && n.wrapper ? dn(t, n.wrapper.padding) : t
2660
+ bandWidth: fe(n) && n.wrapper ? dn(t, n.wrapper.padding) : t
2648
2661
  };
2649
2662
  }
2650
- function mn(e, t, n = G(e)) {
2663
+ function mn(e, t, n = K(e)) {
2651
2664
  if (!t) return e;
2652
2665
  try {
2653
- return pe(ie(t, n, { missing: "default" }), e);
2666
+ return pe(M(t, n, { missing: "default" }), e);
2654
2667
  } catch {
2655
2668
  return e;
2656
2669
  }
2657
2670
  }
2658
2671
  function hn(e, t, n, r) {
2659
2672
  let i = mn(e, n, r);
2660
- for (let { block: e, bandWidth: n } of pn(i.blocks, i.settings.width)) if (O(e)) {
2661
- let r = B(e)?.applied ? void 0 : e.border, i = Math.floor(n) - un(e.styles.padding, r), a = ln[e.columns] ?? [100];
2673
+ for (let { block: e, bandWidth: n } of pn(i.blocks, i.settings.width)) if (fe(e)) {
2674
+ let r = ee(e)?.applied ? void 0 : e.border, i = Math.floor(n) - un(e.styles.padding, r), a = ln[e.columns] ?? [100];
2662
2675
  for (let n = 0; n < e.children.length; n++) {
2663
2676
  let r = Math.floor(i * (a[n] ?? 100) / 100), o = e.children[n].find((e) => e.id === t);
2664
2677
  if (o) return fn(o, r);
@@ -2672,14 +2685,14 @@ function gn(e, t, n, r) {
2672
2685
  return null;
2673
2686
  }
2674
2687
  function _n(e) {
2675
- let t = O(e) ? B(e) : null;
2688
+ let t = fe(e) ? ee(e) : null;
2676
2689
  return !!t?.applied && t.height === "image";
2677
2690
  }
2678
2691
  function vn(e, t, n, r) {
2679
2692
  if (_n(e)) return (t ? gn(t, e.id, n, r) : null) ?? sn(t?.settings);
2680
2693
  }
2681
2694
  // src/constants/socialIcons.ts
2682
- var yn = oe, bn = {
2695
+ var yn = U, bn = {
2683
2696
  small: 24,
2684
2697
  medium: 32,
2685
2698
  large: 48
@@ -2688,6 +2701,7 @@ var yn = oe, bn = {
2688
2701
  "twitter",
2689
2702
  "instagram",
2690
2703
  "linkedin",
2704
+ "xing",
2691
2705
  "youtube",
2692
2706
  "tiktok",
2693
2707
  "pinterest",