@templatical/editor 0.19.0 → 0.21.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 (189) hide show
  1. package/README.md +1 -0
  2. package/dist/{AiChatSidebar-DAQTFuvi.js → AiChatSidebar-K_AehWc-.js} +9 -9
  3. package/dist/{AiFeatureMenu-aFSO20PR.js → AiFeatureMenu-CPdNpHpZ.js} +6 -6
  4. package/dist/{BlockIssueBadge-BQmq1bxn.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
  5. package/dist/{CloudEditor-D0K-m1GA.js → CloudEditor-3a7mqMhe.js} +263 -315
  6. package/dist/{CollaboratorBar-CJO3l6Dt.js → CollaboratorBar-Ds0YZWzV.js} +3 -3
  7. package/dist/{ColorPicker-BsgpTJqK.js → ColorPicker-s9GHXjZs.js} +4 -4
  8. package/dist/CommentsSidebar-DvNEdugN.js +435 -0
  9. package/dist/{CountdownBlock-Bn5w7C-p.js → CountdownBlock-BUHYIAe9.js} +1 -1
  10. package/dist/{CountdownToolbar-PJI3ffi1.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
  11. package/dist/{DesignReferenceSidebar-QfAV8XT9.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
  12. package/dist/{IssuesPanel-CTjRgz8w.js → IssuesPanel-CEnEGFtd.js} +7 -7
  13. package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
  14. package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
  15. package/dist/{ParagraphEditor-Cf75UfSo.js → ParagraphEditor-CkwBirNl.js} +47 -47
  16. package/dist/{RichTextEditorContent-MdaLz6Q3.js → RichTextEditorContent-FbnWsh46.js} +6 -6
  17. package/dist/SaveBlockDialog-Cc5BSUBx.js +264 -0
  18. package/dist/SavedBlockPreviewCanvas-ubttfmKr.js +109 -0
  19. package/dist/SavedBlocksBrowserModal-LkY_U3lY.js +323 -0
  20. package/dist/SavedBlocksPanels-CET0zvH6.js +36 -0
  21. package/dist/SavedBlocksPickBar-poGS4PoI.js +52 -0
  22. package/dist/{SnapshotHistory-C_Y1LzAY.js → SnapshotHistory-BvF5IXn1.js} +8 -8
  23. package/dist/{TemplateScoringPanel-DikuKc6i.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
  24. package/dist/{TestEmailModal-BW8aTtzf.js → TestEmailModal-BRaM_eko.js} +4 -4
  25. package/dist/{TitleEditor-CCUkbRN0.js → TitleEditor-Bhgzh-iQ.js} +11 -11
  26. package/dist/{TplModal-DoOwUKlT.js → TplModal-BA-Zsg0O.js} +3 -3
  27. package/dist/{blockTypeIcons-BlPKjD7M.js → blockTypeIcons-B1-Yzp-a.js} +6 -6
  28. package/dist/bundle-stats.json +8 -8
  29. package/dist/{ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -3
  30. package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js → AiFeatureMenu--PdArSnv.js} +7 -7
  31. package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js.map → AiFeatureMenu--PdArSnv.js.map} +1 -1
  32. package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js → BlockIssueBadge-DMSd0SIl.js} +4 -4
  33. package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js.map → BlockIssueBadge-DMSd0SIl.js.map} +1 -1
  34. package/dist/cdn/chunks/{CloudEditor-Dufl354p.js → CloudEditor-DnTfI5GU.js} +273 -325
  35. package/dist/cdn/chunks/CloudEditor-DnTfI5GU.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js → CollaboratorBar-CBqd7ldq.js} +3 -3
  37. package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js.map → CollaboratorBar-CBqd7ldq.js.map} +1 -1
  38. package/dist/cdn/chunks/{ColorPicker-y_obnw4o.js → ColorPicker-DCdWP8YB.js} +99 -99
  39. package/dist/cdn/chunks/ColorPicker-DCdWP8YB.js.map +1 -0
  40. package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js → CountdownBlock-BDnWMAME.js} +2 -2
  41. package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js.map → CountdownBlock-BDnWMAME.js.map} +1 -1
  42. package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js → CountdownToolbar-BbLoo22S.js} +4 -5
  43. package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js.map → CountdownToolbar-BbLoo22S.js.map} +1 -1
  44. package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js → IssuesPanel-CfudrI3T.js} +7 -7
  45. package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js.map → IssuesPanel-CfudrI3T.js.map} +1 -1
  46. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
  47. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
  48. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js +123 -0
  49. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js.map +1 -0
  50. package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js → ParagraphEditor-DPCUSXpx.js} +82 -82
  51. package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js.map → ParagraphEditor-DPCUSXpx.js.map} +1 -1
  52. package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js → RichTextEditorContent-B8dOiv_D.js} +5 -5
  53. package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js.map → RichTextEditorContent-B8dOiv_D.js.map} +1 -1
  54. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js +259 -0
  55. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js.map +1 -0
  56. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js +110 -0
  57. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js.map +1 -0
  58. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js +318 -0
  59. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js.map +1 -0
  60. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js +38 -0
  61. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js.map +1 -0
  62. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js +52 -0
  63. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js.map +1 -0
  64. package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js → TitleEditor-iwd-O9sO.js} +11 -11
  65. package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js.map → TitleEditor-iwd-O9sO.js.map} +1 -1
  66. package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js → blockTypeIcons-BYz0fgLz.js} +7 -7
  67. package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js.map → blockTypeIcons-BYz0fgLz.js.map} +1 -1
  68. package/dist/cdn/chunks/{ca-DbWoy4rG.js → ca-BBgad6y5.js} +51 -4
  69. package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
  70. package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
  71. package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
  72. package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
  73. package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
  74. package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
  75. package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
  76. package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
  77. package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
  78. package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
  79. package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
  80. package/dist/cdn/chunks/{extensions-DLHvZ0UH.js → extensions-DeJh3E9b.js} +29 -29
  81. package/dist/cdn/chunks/{extensions-DLHvZ0UH.js.map → extensions-DeJh3E9b.js.map} +1 -1
  82. package/dist/cdn/chunks/{features-Cnfv4QAY.js → features-pLfGJWIB.js} +1802 -1603
  83. package/dist/cdn/chunks/features-pLfGJWIB.js.map +1 -0
  84. package/dist/cdn/chunks/{icons-DbcM69bb.js → icons-FLemooQz.js} +16 -16
  85. package/dist/cdn/chunks/{icons-DbcM69bb.js.map → icons-FLemooQz.js.map} +1 -1
  86. package/dist/cdn/chunks/{media-library-DpSMwHd4.js → media-library-mCCZieYO.js} +163 -163
  87. package/dist/cdn/chunks/{media-library-DpSMwHd4.js.map → media-library-mCCZieYO.js.map} +1 -1
  88. package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
  89. package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
  90. package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
  91. package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
  92. package/dist/cdn/chunks/{pusher-CIwiKF8H.js → pusher-R0v5p99W.js} +27 -22
  93. package/dist/cdn/chunks/pusher-R0v5p99W.js.map +1 -0
  94. package/dist/cdn/chunks/{quality-D9QqkRcU.js → quality-BRbHtAk1.js} +460 -460
  95. package/dist/cdn/chunks/{quality-D9QqkRcU.js.map → quality-BRbHtAk1.js.map} +1 -1
  96. package/dist/cdn/chunks/{renderer-BsLQZNXU.js → renderer-Yg1XhsBN.js} +18 -18
  97. package/dist/cdn/chunks/{renderer-BsLQZNXU.js.map → renderer-Yg1XhsBN.js.map} +1 -1
  98. package/dist/cdn/chunks/{src-zu1ehVNN.js → src-BDJeYiVE.js} +33 -33
  99. package/dist/cdn/chunks/{src-zu1ehVNN.js.map → src-BDJeYiVE.js.map} +1 -1
  100. package/dist/cdn/chunks/{styles-Dx-jXeCd.js → styles-Bp5Jsu9J.js} +1422 -1332
  101. package/dist/cdn/chunks/styles-Bp5Jsu9J.js.map +1 -0
  102. package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
  103. package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
  104. package/dist/cdn/editor.css +1 -1
  105. package/dist/cdn/editor.js +123 -114
  106. package/dist/cdn/editor.js.map +1 -1
  107. package/dist/{check-Cg6Mc2pP.js → check-BpQDKiPz.js} +1 -1
  108. package/dist/{chevron-down-dClfxKrJ.js → chevron-down-j8GrdTyz.js} +1 -1
  109. package/dist/chevron-up-BACyVhyC.js +7 -0
  110. package/dist/{circle-alert-Bhzm-fNA.js → circle-alert-CgtE46ND.js} +1 -1
  111. package/dist/{clock-m7TwQw4b.js → clock-BzKLLW5L.js} +1 -1
  112. package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
  113. package/dist/{createLucideIcon-FSF4peHQ.js → createLucideIcon-JWHwTI6N.js} +2 -2
  114. package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
  115. package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
  116. package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
  117. package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
  118. package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
  119. package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
  120. package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
  121. package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
  122. package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
  123. package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
  124. package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
  125. package/dist/dist-CweLDZrs.js +5 -0
  126. package/dist/dist-DOsdqAEZ.js +5 -0
  127. package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
  128. package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
  129. package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
  130. package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
  131. package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
  132. package/dist/{image-up-CDEgJqwA.js → image-up-CQdtq8ge.js} +1 -1
  133. package/dist/index.d.ts +81 -4
  134. package/dist/{info-BNP8yGsK.js → info-BUJBXoE6.js} +1 -1
  135. package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
  136. package/dist/{list-checks-jepi4iYr.js → list-checks-BGHaCSD5.js} +1 -1
  137. package/dist/{loader-circle-BT38qSm3.js → loader-circle-C-Z6kgI6.js} +1 -1
  138. package/dist/{message-circle-BAHcL9S-.js → message-circle-CEm5qckV.js} +1 -1
  139. package/dist/pencil-DdwmkKLb.js +10 -0
  140. package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
  141. package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
  142. package/dist/{refresh-cw-as5Bmg4X.js → refresh-cw-maKlg0dl.js} +1 -1
  143. package/dist/{scan-line-IAMjPtRw.js → scan-line-BFgesTOY.js} +1 -1
  144. package/dist/{send-DvMay6bt.js → send-B70aQDrA.js} +1 -1
  145. package/dist/{shield-check-YYDhGroE.js → shield-check-B7x5OKt5.js} +1 -1
  146. package/dist/{sparkles-CCwQMMMZ.js → sparkles-DVlm1Ipp.js} +1 -1
  147. package/dist/style.css +1 -1
  148. package/dist/{styles-64uLkPJV.js → styles-DIDAJdkj.js} +1241 -1151
  149. package/dist/templatical-editor.js +134 -125
  150. package/dist/{text-align-start-BwsA6QzC.js → text-align-start-Vay3Kvo2.js} +1 -1
  151. package/dist/{trash-2-CRBDolnR.js → trash-2-DE8CmxAG.js} +1 -1
  152. package/dist/{triangle-alert-B2g0ALvq.js → triangle-alert-Djg6IG8N.js} +1 -1
  153. package/dist/{upload-y4gxiFp5.js → upload-BwwE0U6G.js} +1 -1
  154. package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
  155. package/dist/{useEditorCore-ea9OrrH3.js → useEditorCore-Bd9CA4L_.js} +1236 -1013
  156. package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
  157. package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
  158. package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
  159. package/dist/{x-Ctg_250T.js → x-CkD6A1iB.js} +1 -1
  160. package/package.json +23 -23
  161. package/dist/CommentsSidebar-BYMVucZh.js +0 -442
  162. package/dist/ModuleBrowserModal-BNalLx0k.js +0 -202
  163. package/dist/ModulePreviewCanvas-BwObwisa.js +0 -106
  164. package/dist/NumberWithSuffix-D3BKz66W.js +0 -89
  165. package/dist/SaveModuleDialog-MTjwiF9D.js +0 -125
  166. package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
  167. package/dist/cdn/chunks/CloudEditor-Dufl354p.js.map +0 -1
  168. package/dist/cdn/chunks/ColorPicker-y_obnw4o.js.map +0 -1
  169. package/dist/cdn/chunks/ModuleBrowserModal-DG4AVFjH.js +0 -198
  170. package/dist/cdn/chunks/ModuleBrowserModal-DG4AVFjH.js.map +0 -1
  171. package/dist/cdn/chunks/ModulePreviewCanvas-Bc_PcJuc.js +0 -107
  172. package/dist/cdn/chunks/ModulePreviewCanvas-Bc_PcJuc.js.map +0 -1
  173. package/dist/cdn/chunks/NumberWithSuffix-8fOO-LC_.js +0 -91
  174. package/dist/cdn/chunks/NumberWithSuffix-8fOO-LC_.js.map +0 -1
  175. package/dist/cdn/chunks/SaveModuleDialog-DhsfYf2n.js +0 -120
  176. package/dist/cdn/chunks/SaveModuleDialog-DhsfYf2n.js.map +0 -1
  177. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
  178. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
  179. package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
  180. package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
  181. package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
  182. package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
  183. package/dist/cdn/chunks/features-Cnfv4QAY.js.map +0 -1
  184. package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
  185. package/dist/cdn/chunks/pusher-CIwiKF8H.js.map +0 -1
  186. package/dist/cdn/chunks/styles-Dx-jXeCd.js.map +0 -1
  187. package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
  188. package/dist/dist-BDVm2MrW.js +0 -5
  189. package/dist/dist-DbekZDmJ.js +0 -5
@@ -1,27 +1,27 @@
1
- import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as c, J as l, K as u, N as d, O as f, Ot as p, R as m, T as h, W as g, Y as _, Z as v, _ as y, c as b, d as x, et as S, g as C, h as w, j as T, k as E, l as D, m as O, nt as k, q as ee, r as A, rt as te, s as j, tt as ne, u as M, v as re, w as ie, x as N, y as ae, z as oe } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { c as P, o as se, s as ce } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
3
- import { t as le } from "./upload-y4gxiFp5.js";
4
- import { A as ue, C as de, D as fe, E as pe, F as me, I as he, M as ge, N as _e, P as ve, S as ye, T as be, _ as xe, a as Se, b as Ce, c as we, d as Te, f as Ee, g as De, h as Oe, i as ke, j as Ae, k as je, l as Me, m as Ne, n as Pe, p as Fe, r as Ie, t as Le, u as Re, v as ze, w as Be, x as Ve, y as He } from "./dist-BJbqgyPn.js";
1
+ import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as c, J as l, K as u, N as d, O as f, Ot as p, R as m, T as h, W as g, Y as _, Z as v, _ as y, c as b, d as x, et as S, g as C, h as w, j as T, k as E, l as D, m as O, nt as k, q as A, r as j, rt as ee, s as M, tt as te, u as N, v as ne, w as re, x as P, y as ie, z as ae } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
+ import { c as F, o as oe, s as se } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
3
+ import { t as ce } from "./upload-BwwE0U6G.js";
4
+ import { A as le, C as ue, D as de, E as fe, F as pe, I as me, M as he, N as ge, P as _e, S as ve, T as ye, _ as be, a as xe, b as Se, c as Ce, d as we, f as Te, g as Ee, h as De, i as Oe, j as ke, k as Ae, l as je, m as Me, n as Ne, o as Pe, p as Fe, r as Ie, t as Le, u as Re, v as ze, w as Be, x as Ve, y as He } from "./dist-BJbqgyPn.js";
5
5
  import { f as Ue, g as We, h as Ge, m as Ke } from "./dist-DYv_Pttj.js";
6
- import { c as qe, d as Je, i as Ye, l as Xe, o as Ze, r as Qe, t as $e, u as et } from "./usePopoverPosition-F9STHRIr.js";
7
- import { A as tt, B as nt, C as rt, D as it, E as at, I as ot, L as st, M as ct, N as lt, O as ut, R as dt, S as ft, T as pt, _ as mt, a as ht, b as gt, d as _t, f as vt, g as yt, h as bt, i as xt, j as St, k as Ct, l as wt, m as Tt, n as Et, o as Dt, p as Ot, s as kt, v as At, w as jt, x as Mt, y as Nt, z as Pt } from "./keys-DFaIbGR8.js";
8
- import { t as Ft } from "./useI18n-BNMzZTM5.js";
9
- import { t as F } from "./createLucideIcon-FSF4peHQ.js";
10
- import { t as It } from "./loader-circle-BT38qSm3.js";
11
- import { t as Lt } from "./message-circle-BAHcL9S-.js";
12
- import { t as Rt } from "./trash-2-CRBDolnR.js";
13
- import { t as zt } from "./triangle-alert-B2g0ALvq.js";
14
- import { t as Bt } from "./LoadingTrack-KIcREPlS.js";
15
- import { t as Vt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
16
- import "./useCloudI18n-PCDOC2kz.js";
17
- import { t as Ht } from "./useMergeTag-DfEY0eK5.js";
18
- import { t as Ut } from "./useAliveFlag-C43EhZFY.js";
6
+ import { a as qe, c as Je, d as Ye, i as Xe, l as Ze, o as Qe, r as $e, t as et, u as tt } from "./usePopoverPosition-BO2LNy5n.js";
7
+ import { A as nt, B as rt, C as it, D as at, E as ot, I as st, L as ct, M as lt, N as ut, O as dt, R as ft, S as pt, T as mt, _ as ht, a as gt, b as _t, d as vt, f as yt, g as bt, h as xt, i as St, j as Ct, k as wt, l as Tt, m as Et, n as Dt, o as Ot, p as kt, s as At, v as jt, w as Mt, x as Nt, y as Pt, z as Ft } from "./keys-CHPcp-Nz.js";
8
+ import { t as It } from "./useI18n-D2L9Mkik.js";
9
+ import { t as I } from "./createLucideIcon-JWHwTI6N.js";
10
+ import { t as Lt } from "./loader-circle-C-Z6kgI6.js";
11
+ import { t as Rt } from "./message-circle-CEm5qckV.js";
12
+ import { t as zt } from "./trash-2-DE8CmxAG.js";
13
+ import { t as Bt } from "./triangle-alert-Djg6IG8N.js";
14
+ import { t as Vt } from "./LoadingTrack-KIcREPlS.js";
15
+ import { t as Ht } from "./_plugin-vue_export-helper-B3ysoDQm.js";
16
+ import "./useCloudI18n-BmiygEM4.js";
17
+ import { t as Ut } from "./useMergeTag-BTdDq5DC.js";
18
+ import { t as Wt } from "./useAliveFlag-C43EhZFY.js";
19
19
  //#region ../core/dist/index.js
20
- function Wt(e) {
20
+ function Gt(e) {
21
21
  return e === "1" ? 1 : e === "3" ? 3 : 2;
22
22
  }
23
- function Gt(e) {
24
- let t = ee({
23
+ function Kt(e) {
24
+ let t = A({
25
25
  content: e.content ?? Fe(e.defaultFontFamily, e.templateDefaults),
26
26
  selectedBlockId: null,
27
27
  viewport: "desktop",
@@ -111,7 +111,7 @@ function Gt(e) {
111
111
  if (c(n)) return;
112
112
  let o = a(t.content.blocks, n);
113
113
  if (o && o.type === "section") {
114
- if (r < 0 || r >= Wt(o.columns)) return;
114
+ if (r < 0 || r >= Gt(o.columns)) return;
115
115
  o.children[r] = o.children[r] || [];
116
116
  let t = o.children[r];
117
117
  i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
@@ -144,7 +144,7 @@ function Gt(e) {
144
144
  let u;
145
145
  if (r) {
146
146
  let e = a(t.content.blocks, r);
147
- if (!e || e.type !== "section" || i < 0 || i >= Wt(e.columns)) return;
147
+ if (!e || e.type !== "section" || i < 0 || i >= Gt(e.columns)) return;
148
148
  e.children[i] = e.children[i] || [], u = e.children[i];
149
149
  } else u = t.content.blocks;
150
150
  let [d] = o.blocks.splice(l, 1);
@@ -173,11 +173,11 @@ function Gt(e) {
173
173
  findBlockLocation: u
174
174
  };
175
175
  }
176
- var Kt = 50, qt = 300, Jt = 1500;
177
- function Yt(e) {
178
- let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = Kt } = e, o = _([]), s = _([]), c = _(!1), l = null, u = null, d = n(() => o.value.length > 0), f = n(() => s.value.length > 0);
176
+ var qt = 50, Jt = 300, Yt = 1500;
177
+ function Xt(e) {
178
+ let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = qt } = e, o = _([]), s = _([]), c = _(!1), l = null, u = null, d = n(() => o.value.length > 0), f = n(() => s.value.length > 0);
179
179
  function p() {
180
- return he(t.value);
180
+ return me(t.value);
181
181
  }
182
182
  function m(e) {
183
183
  o.value.push(e), o.value.length > a && o.value.splice(0, o.value.length - a);
@@ -193,21 +193,21 @@ function Yt(e) {
193
193
  if (u && u.blockId === e) {
194
194
  clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
195
195
  u = null;
196
- }, qt);
196
+ }, Jt);
197
197
  return;
198
198
  }
199
199
  h(), m(p()), s.value = [], u = {
200
200
  blockId: e,
201
201
  timeoutId: setTimeout(() => {
202
202
  u = null;
203
- }, qt)
203
+ }, Jt)
204
204
  };
205
205
  }
206
206
  }
207
207
  function y() {
208
208
  c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
209
209
  c.value = !1, l = null;
210
- }, Jt);
210
+ }, Yt);
211
211
  }
212
212
  function b() {
213
213
  if (o.value.length === 0) return;
@@ -239,33 +239,33 @@ function Yt(e) {
239
239
  destroy: C
240
240
  };
241
241
  }
242
- function Xt(e) {
242
+ function Zt(e) {
243
243
  e.type === "table" ? e.rows = e.rows.map((e) => ({
244
244
  ...e,
245
- id: be(),
245
+ id: ye(),
246
246
  cells: e.cells.map((e) => ({
247
247
  ...e,
248
- id: be()
248
+ id: ye()
249
249
  }))
250
250
  })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
251
251
  ...e,
252
- id: be()
252
+ id: ye()
253
253
  })) : e.type === "menu" && (e.items = e.items.map((e) => ({
254
254
  ...e,
255
- id: be()
255
+ id: ye()
256
256
  })));
257
257
  }
258
- function Zt(e) {
258
+ function Qt(e) {
259
259
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
260
260
  function o(n, r, a) {
261
- let o = Me(n, e.blockDefaults);
261
+ let o = je(n, e.blockDefaults);
262
262
  return t(o, r, a), i(o.id), o;
263
263
  }
264
264
  function s(e, n, r) {
265
265
  let o = JSON.parse(JSON.stringify(e));
266
- if (o.id = be(), Xt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
266
+ if (o.id = ye(), Zt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
267
267
  let t = JSON.parse(JSON.stringify(e));
268
- return t.id = be(), Xt(t), t;
268
+ return t.id = ye(), Zt(t), t;
269
269
  }))), n !== void 0 || r !== void 0) t(o, n, r);
270
270
  else {
271
271
  let i = a?.(e.id) ?? null;
@@ -286,7 +286,7 @@ function Zt(e) {
286
286
  updateBlockProperty: l
287
287
  };
288
288
  }
289
- function Qt(e) {
289
+ function $t(e) {
290
290
  let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
291
291
  function c() {
292
292
  return typeof a == "function" ? a() : a;
@@ -308,7 +308,7 @@ function Qt(e) {
308
308
  o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
309
309
  }, i));
310
310
  }
311
- let m = te(t, () => {
311
+ let m = ee(t, () => {
312
312
  c() && !s && n() && p();
313
313
  }, { deep: !0 });
314
314
  function h() {
@@ -322,8 +322,8 @@ function Qt(e) {
322
322
  destroy: h
323
323
  };
324
324
  }
325
- function $t(e) {
326
- let t = ee(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
325
+ function en(e) {
326
+ let t = A(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
327
327
  function i(e) {
328
328
  return t.has(e);
329
329
  }
@@ -340,7 +340,7 @@ function $t(e) {
340
340
  hasHiddenBlocks: r
341
341
  };
342
342
  }
343
- function en(e) {
343
+ function tn(e) {
344
344
  let t = _(!1), r = _(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
345
345
  async function o() {
346
346
  let n = e.definition.value;
@@ -370,7 +370,7 @@ function en(e) {
370
370
  needsFetch: a
371
371
  };
372
372
  }
373
- function tn(e, t) {
373
+ function nn(e, t) {
374
374
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
375
375
  e.addBlock = (r, i, a, o) => {
376
376
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -384,29 +384,165 @@ function tn(e, t) {
384
384
  t.record(), o(e);
385
385
  };
386
386
  }
387
+ function rn(e) {
388
+ let { provider: t } = e, n = _([]), r = _(!1), i = M(() => {
389
+ let e = /* @__PURE__ */ new Set();
390
+ for (let t of n.value) {
391
+ let n = t.category?.trim();
392
+ n && e.add(n);
393
+ }
394
+ return [...e].sort((e, t) => e.localeCompare(t));
395
+ }), a = M(() => typeof t.create == "function"), o = M(() => typeof t.update == "function"), s = M(() => typeof t.delete == "function");
396
+ function c(e) {
397
+ return o.value && e.canUpdate !== !1;
398
+ }
399
+ function l(e) {
400
+ return s.value && e.canDelete !== !1;
401
+ }
402
+ function u(e, t) {
403
+ throw new Pe(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
404
+ }
405
+ async function d(i) {
406
+ r.value = !0;
407
+ try {
408
+ n.value = await t.list(i);
409
+ } catch (t) {
410
+ throw e.onError?.(t), t;
411
+ } finally {
412
+ r.value = !1;
413
+ }
414
+ }
415
+ async function f(r, i, a) {
416
+ let { create: o } = t;
417
+ typeof o != "function" && u("create", "disabled by the provider");
418
+ try {
419
+ let e = await o(a ? {
420
+ name: r,
421
+ content: i,
422
+ category: a
423
+ } : {
424
+ name: r,
425
+ content: i
426
+ });
427
+ return n.value = [e, ...n.value], e;
428
+ } catch (t) {
429
+ throw e.onError?.(t), t;
430
+ }
431
+ }
432
+ async function p(r, i) {
433
+ let { update: a } = t;
434
+ typeof a != "function" && u("update", "disabled by the provider");
435
+ let o = n.value.find((e) => e.id === r);
436
+ o && o.canUpdate === !1 && u("update", `not permitted for entry "${r}"`);
437
+ try {
438
+ let e = await a(r, i);
439
+ return n.value = n.value.map((t) => t.id === r ? e : t), e;
440
+ } catch (t) {
441
+ throw e.onError?.(t), t;
442
+ }
443
+ }
444
+ async function m(r) {
445
+ let { delete: i } = t;
446
+ typeof i != "function" && u("delete", "disabled by the provider");
447
+ let a = n.value.find((e) => e.id === r);
448
+ a && a.canDelete === !1 && u("delete", `not permitted for entry "${r}"`);
449
+ try {
450
+ await i(r), n.value = n.value.filter((e) => e.id !== r);
451
+ } catch (t) {
452
+ throw e.onError?.(t), t;
453
+ }
454
+ }
455
+ return {
456
+ savedBlocks: n,
457
+ isLoading: r,
458
+ categories: i,
459
+ canCreate: a,
460
+ canUpdate: o,
461
+ canDelete: s,
462
+ canUpdateBlock: c,
463
+ canDeleteBlock: l,
464
+ load: d,
465
+ create: f,
466
+ update: p,
467
+ remove: m
468
+ };
469
+ }
470
+ var an = "templatical:saved-blocks";
471
+ function on(e = {}) {
472
+ let t = e.key ?? an;
473
+ function n() {
474
+ if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
475
+ return localStorage;
476
+ }
477
+ function r() {
478
+ let e = n().getItem(t);
479
+ if (!e) return [];
480
+ try {
481
+ let t = JSON.parse(e);
482
+ return Array.isArray(t) ? t : [];
483
+ } catch {
484
+ return [];
485
+ }
486
+ }
487
+ function i(e) {
488
+ n().setItem(t, JSON.stringify(e));
489
+ }
490
+ return {
491
+ async list(e) {
492
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
493
+ return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
494
+ },
495
+ async create(e) {
496
+ let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
497
+ id: ye(),
498
+ name: e.name,
499
+ content: e.content,
500
+ ...e.category ? { category: e.category } : {},
501
+ createdAt: t,
502
+ updatedAt: t
503
+ };
504
+ return i([n, ...r()]), n;
505
+ },
506
+ async update(e, t) {
507
+ let n = r(), a = n.findIndex((t) => t.id === e);
508
+ if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
509
+ let o = {
510
+ ...n[a],
511
+ ...t,
512
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
513
+ }, s = [...n];
514
+ return s[a] = o, i(s), o;
515
+ },
516
+ async delete(e) {
517
+ let t = r();
518
+ if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
519
+ i(t.filter((t) => t.id !== e));
520
+ }
521
+ };
522
+ }
387
523
  //#endregion
388
524
  //#region src/utils/activeEditorTracker.ts
389
- var nn = /* @__PURE__ */ new Set(), rn = 0, an = 0;
390
- function on() {
391
- let e = ++an;
392
- return nn.add(e), rn === 0 && (rn = e), {
525
+ var sn = /* @__PURE__ */ new Set(), cn = 0, ln = 0;
526
+ function un() {
527
+ let e = ++ln;
528
+ return sn.add(e), cn === 0 && (cn = e), {
393
529
  id: e,
394
- isActive: () => nn.size <= 1 || rn === e,
530
+ isActive: () => sn.size <= 1 || cn === e,
395
531
  claim: () => {
396
- rn = e;
532
+ cn = e;
397
533
  },
398
534
  dispose: () => {
399
- if (nn.delete(e), rn === e) {
400
- let e = Array.from(nn);
401
- rn = e[e.length - 1] ?? 0;
535
+ if (sn.delete(e), cn === e) {
536
+ let e = Array.from(sn);
537
+ cn = e[e.length - 1] ?? 0;
402
538
  }
403
539
  }
404
540
  };
405
541
  }
406
542
  //#endregion
407
543
  //#region src/composables/useImageUrlResolver.ts
408
- function sn(e) {
409
- let t = ee(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
544
+ function dn(e) {
545
+ let t = A(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
410
546
  function r(e) {
411
547
  return t.get(e);
412
548
  }
@@ -438,8 +574,8 @@ function sn(e) {
438
574
  lookup: a
439
575
  };
440
576
  }
441
- function cn(e) {
442
- let t = N(gt, null), n = j(e);
577
+ function fn(e) {
578
+ let t = P(_t, null), n = M(e);
443
579
  if (!t) return n;
444
580
  let r;
445
581
  function i() {
@@ -459,7 +595,7 @@ function cn(e) {
459
595
  r = void 0, t.lookup(e);
460
596
  }, 300);
461
597
  }
462
- }, { immediate: !0 }), j(() => {
598
+ }, { immediate: !0 }), M(() => {
463
599
  let e = n.value;
464
600
  if (!e) return e;
465
601
  let r = t.get(e);
@@ -468,7 +604,7 @@ function cn(e) {
468
604
  }
469
605
  //#endregion
470
606
  //#region src/composables/useMergeTagPicker.ts
471
- function ln() {
607
+ function pn() {
472
608
  let e = _(!1), t = _([]), n = null;
473
609
  function r(r) {
474
610
  if (n) {
@@ -498,7 +634,7 @@ function ln() {
498
634
  }
499
635
  //#endregion
500
636
  //#region src/composables/useLogicTagPicker.ts
501
- function un() {
637
+ function mn() {
502
638
  let e = _(!1), t = _([]), n = _([]), r = null;
503
639
  function i(i, a) {
504
640
  if (r) {
@@ -529,11 +665,11 @@ function un() {
529
665
  }
530
666
  //#endregion
531
667
  //#region src/composables/useTemplateLint.ts
532
- function dn(e) {
668
+ function hn(e) {
533
669
  return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
534
670
  }
535
- function fn(e) {
536
- let t = _([]), n = _(!1), r = _(!1), i = v(null), a = dn(e.options), o = null, s = !1;
671
+ function gn(e) {
672
+ let t = _([]), n = _(!1), r = _(!1), i = v(null), a = hn(e.options), o = null, s = !1;
537
673
  a || l();
538
674
  async function l() {
539
675
  try {
@@ -574,14 +710,19 @@ function fn(e) {
574
710
  }
575
711
  //#endregion
576
712
  //#region src/utils/blockTypeLabels.ts
577
- function pn(e, t) {
713
+ function _n(e, t) {
578
714
  return t.blocks[e] ?? e;
579
715
  }
716
+ function vn(e, t, n = []) {
717
+ if (e.type !== "custom") return _n(e.type, t);
718
+ let { customType: r } = e;
719
+ return n.find((e) => e.type === r)?.name ?? r;
720
+ }
580
721
  //#endregion
581
722
  //#region src/composables/useKeyboardReorder.ts
582
- function mn(e, t) {
583
- let n = _(null), r = _(""), i = null;
584
- function a(t) {
723
+ function yn(e, t, n = []) {
724
+ let r = _(null), i = _(""), a = null;
725
+ function o(t) {
585
726
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
586
727
  if (r !== -1) return {
587
728
  index: r,
@@ -602,86 +743,86 @@ function mn(e, t) {
602
743
  }
603
744
  return null;
604
745
  }
605
- function o(n) {
606
- let r = a(n);
607
- if (!r) return "";
608
- let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
609
- return i ? pn(i.type, t.t) : "";
746
+ function s(r) {
747
+ let i = o(r);
748
+ if (!i) return "";
749
+ let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
750
+ return a ? vn(a, t.t, n) : "";
610
751
  }
611
- function s(t, n) {
752
+ function c(t, n) {
612
753
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
613
754
  }
614
- function c(e) {
615
- r.value = "", queueMicrotask(() => {
616
- r.value = e;
617
- });
618
- }
619
755
  function l(e) {
620
- return n.value === e;
756
+ i.value = "", queueMicrotask(() => {
757
+ i.value = e;
758
+ });
621
759
  }
622
760
  function u(e) {
623
- let r = a(e);
624
- r && (n.value = e, i = r, c(t.format(t.t.blockActions.lifted, {
625
- block: o(e),
626
- position: String(r.index + 1),
627
- total: String(r.total)
761
+ return r.value === e;
762
+ }
763
+ function d(e) {
764
+ let n = o(e);
765
+ n && (r.value = e, a = n, l(t.format(t.t.blockActions.lifted, {
766
+ block: s(e),
767
+ position: String(n.index + 1),
768
+ total: String(n.total)
628
769
  })));
629
770
  }
630
- function d(n, r) {
631
- let i = a(n);
771
+ function f(n, r) {
772
+ let i = o(n);
632
773
  if (!i) return;
633
- let s = i.index + r;
634
- s < 0 || s >= i.total || (e.moveBlock(n, s, i.sectionId, i.columnIndex), c(t.format(t.t.blockActions.moved, {
635
- block: o(n),
636
- position: String(s + 1),
774
+ let a = i.index + r;
775
+ a < 0 || a >= i.total || (e.moveBlock(n, a, i.sectionId, i.columnIndex), l(t.format(t.t.blockActions.moved, {
776
+ block: s(n),
777
+ position: String(a + 1),
637
778
  total: String(i.total)
638
779
  })));
639
780
  }
640
- function f(e) {
641
- d(e, -1);
642
- }
643
781
  function p(e) {
644
- d(e, 1);
782
+ f(e, -1);
645
783
  }
646
784
  function m(e) {
647
- let r = a(e);
648
- r && c(t.format(t.t.blockActions.dropped, {
649
- block: o(e),
650
- position: String(r.index + 1),
651
- total: String(r.total)
652
- })), n.value = null, i = null;
785
+ f(e, 1);
653
786
  }
654
- function h() {
655
- let r = n.value;
656
- if (r && i) {
657
- let n = a(r), s = !!n && (n.sectionId !== i.sectionId || n.columnIndex !== i.columnIndex), l = !!n && n.index !== i.index;
658
- n && (s || l) && e.moveBlock(r, i.index, i.sectionId, i.columnIndex), c(t.format(t.t.blockActions.cancelled, {
659
- block: o(r),
660
- position: String(i.index + 1)
787
+ function h(e) {
788
+ let n = o(e);
789
+ n && l(t.format(t.t.blockActions.dropped, {
790
+ block: s(e),
791
+ position: String(n.index + 1),
792
+ total: String(n.total)
793
+ })), r.value = null, a = null;
794
+ }
795
+ function g() {
796
+ let n = r.value;
797
+ if (n && a) {
798
+ let r = o(n), i = !!r && (r.sectionId !== a.sectionId || r.columnIndex !== a.columnIndex), c = !!r && r.index !== a.index;
799
+ r && (i || c) && e.moveBlock(n, a.index, a.sectionId, a.columnIndex), l(t.format(t.t.blockActions.cancelled, {
800
+ block: s(n),
801
+ position: String(a.index + 1)
661
802
  }));
662
803
  }
663
- n.value = null, i = null;
804
+ r.value = null, a = null;
664
805
  }
665
806
  return {
666
- liftedBlockId: n,
667
- announcement: r,
668
- isLifted: l,
669
- lift: u,
670
- cancel: h,
671
- moveUp: f,
672
- moveDown: p,
673
- drop: m
807
+ liftedBlockId: r,
808
+ announcement: i,
809
+ isLifted: u,
810
+ lift: d,
811
+ cancel: g,
812
+ moveUp: p,
813
+ moveDown: m,
814
+ drop: h
674
815
  };
675
816
  }
676
817
  //#endregion
677
818
  //#region src/composables/useUiTheme.ts
678
- function hn(e) {
679
- let t = Je("(prefers-color-scheme: dark)");
680
- return { resolvedTheme: j(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
819
+ function bn(e) {
820
+ let t = Ye("(prefers-color-scheme: dark)");
821
+ return { resolvedTheme: M(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
681
822
  }
682
823
  //#endregion
683
824
  //#region src/composables/useThemeStyles.ts
684
- var gn = {
825
+ var xn = {
685
826
  bg: "--tpl-bg",
686
827
  bgElevated: "--tpl-bg-elevated",
687
828
  bgHover: "--tpl-bg-hover",
@@ -705,10 +846,10 @@ var gn = {
705
846
  dangerLight: "--tpl-danger-light",
706
847
  canvasBg: "--tpl-canvas-bg"
707
848
  };
708
- function _n({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
709
- return { themeStyles: j(() => {
849
+ function Sn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
850
+ return { themeStyles: M(() => {
710
851
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
711
- if (a) for (let [e, t] of Object.entries(gn)) {
852
+ if (a) for (let [e, t] of Object.entries(xn)) {
712
853
  let n = a[e];
713
854
  n && (r[t] = n);
714
855
  }
@@ -717,38 +858,38 @@ function _n({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
717
858
  }
718
859
  //#endregion
719
860
  //#region src/utils/logger.ts
720
- var vn = "[Templatical]";
721
- function yn() {
861
+ var Cn = "[Templatical]";
862
+ function wn() {
722
863
  return typeof process < "u" && process.env.NODE_ENV === "production";
723
864
  }
724
- var bn = {
865
+ var Tn = {
725
866
  warn(...e) {
726
- console.warn(vn, ...e);
867
+ console.warn(Cn, ...e);
727
868
  },
728
869
  error(...e) {
729
- console.error(vn, ...e);
870
+ console.error(Cn, ...e);
730
871
  },
731
872
  debug(...e) {
732
- yn() || console.debug(vn, ...e);
873
+ wn() || console.debug(Cn, ...e);
733
874
  },
734
875
  info(...e) {
735
- yn() || console.info(vn, ...e);
876
+ wn() || console.info(Cn, ...e);
736
877
  }
737
878
  };
738
879
  //#endregion
739
880
  //#region src/composables/useBlockRegistry.ts
740
- function xn() {
881
+ function En() {
741
882
  let e = v(/* @__PURE__ */ new Map());
742
883
  function t(t, n) {
743
- e.value.set(t, n), ne(e);
884
+ e.value.set(t, n), te(e);
744
885
  }
745
886
  function n(t, n) {
746
887
  let r = `custom:${t.type}`, i = {
747
888
  component: n,
748
- createBlock: () => Ee(t),
889
+ createBlock: () => Te(t),
749
890
  definition: t
750
891
  };
751
- e.value.set(r, i), ne(e);
892
+ e.value.set(r, i), te(e);
752
893
  }
753
894
  function r(t) {
754
895
  if (t.type === "custom") {
@@ -777,7 +918,7 @@ function xn() {
777
918
  strictFilters: !1
778
919
  }).parseAndRender(t.template, e.fieldValues);
779
920
  } catch (t) {
780
- return bn.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
921
+ return Tn.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
781
922
  }
782
923
  }
783
924
  function c(t) {
@@ -795,9 +936,9 @@ function xn() {
795
936
  }
796
937
  //#endregion
797
938
  //#region src/composables/useCustomBlockStylesheets.ts
798
- function Sn(e, t) {
799
- return j(() => {
800
- let n = Cn(e.value.blocks);
939
+ function Dn(e, t) {
940
+ return M(() => {
941
+ let n = On(e.value.blocks);
801
942
  if (n.size === 0) return [];
802
943
  let r = /* @__PURE__ */ new Set(), i = [];
803
944
  for (let e of n) {
@@ -809,33 +950,33 @@ function Sn(e, t) {
809
950
  return i;
810
951
  });
811
952
  }
812
- function Cn(e) {
953
+ function On(e) {
813
954
  let t = /* @__PURE__ */ new Set();
814
- return wn(e, t), t;
955
+ return kn(e, t), t;
815
956
  }
816
- function wn(e, t) {
957
+ function kn(e, t) {
817
958
  for (let n of e) {
818
- if (ue(n)) {
959
+ if (le(n)) {
819
960
  t.add(n.customType);
820
961
  continue;
821
962
  }
822
963
  if (n.type === "section") {
823
964
  let e = n.children;
824
965
  if (!e) continue;
825
- for (let n of e) wn(n, t);
966
+ for (let n of e) kn(n, t);
826
967
  }
827
968
  }
828
969
  }
829
970
  //#endregion
830
971
  //#region src/utils/registerBuiltInBlocks.ts
831
- var Tn = [
972
+ var An = [
832
973
  {
833
974
  type: "section",
834
975
  createBlock: He
835
976
  },
836
977
  {
837
978
  type: "title",
838
- createBlock: de
979
+ createBlock: ue
839
980
  },
840
981
  {
841
982
  type: "paragraph",
@@ -843,7 +984,7 @@ var Tn = [
843
984
  },
844
985
  {
845
986
  type: "image",
846
- createBlock: De
987
+ createBlock: Ee
847
988
  },
848
989
  {
849
990
  type: "button",
@@ -851,7 +992,7 @@ var Tn = [
851
992
  },
852
993
  {
853
994
  type: "divider",
854
- createBlock: Ne
995
+ createBlock: Me
855
996
  },
856
997
  {
857
998
  type: "video",
@@ -859,15 +1000,15 @@ var Tn = [
859
1000
  },
860
1001
  {
861
1002
  type: "social",
862
- createBlock: Ce
1003
+ createBlock: Se
863
1004
  },
864
1005
  {
865
1006
  type: "menu",
866
- createBlock: xe
1007
+ createBlock: be
867
1008
  },
868
1009
  {
869
1010
  type: "table",
870
- createBlock: ye
1011
+ createBlock: ve
871
1012
  },
872
1013
  {
873
1014
  type: "spacer",
@@ -875,15 +1016,15 @@ var Tn = [
875
1016
  },
876
1017
  {
877
1018
  type: "html",
878
- createBlock: Oe
1019
+ createBlock: De
879
1020
  },
880
1021
  {
881
1022
  type: "countdown",
882
- createBlock: Te
1023
+ createBlock: we
883
1024
  }
884
1025
  ];
885
- function En(e, t) {
886
- for (let n of Tn) {
1026
+ function jn(e, t) {
1027
+ for (let n of An) {
887
1028
  let r = t[n.type];
888
1029
  r && e.registerBuiltIn(n.type, {
889
1030
  component: r,
@@ -893,33 +1034,72 @@ function En(e, t) {
893
1034
  }
894
1035
  //#endregion
895
1036
  //#region src/utils/resolveHtmlBlockPreview.ts
896
- function Dn(e) {
1037
+ function Mn(e) {
897
1038
  return typeof e == "boolean" ? e : e?.enabled ?? !1;
898
1039
  }
899
1040
  //#endregion
900
1041
  //#region src/utils/collectOffPaletteDefaults.ts
901
- function On(e) {
1042
+ function Nn(e) {
902
1043
  return typeof e == "object" && !!e && !Array.isArray(e);
903
1044
  }
904
- function kn(e, t, n) {
905
- let r = new Set(e.map((e) => Qe(e))), i = [], a = (e, t) => {
906
- for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Qe(o)) && i.push(`${t}.${n}: ${o}`) : On(o) && a(o, `${t}.${n}`);
1045
+ function Pn(e, t, n) {
1046
+ let r = new Set(e.map((e) => $e(e))), i = [], a = (e, t) => {
1047
+ for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has($e(o)) && i.push(`${t}.${n}: ${o}`) : Nn(o) && a(o, `${t}.${n}`);
907
1048
  }, o = t;
908
1049
  for (let [e, t] of Object.entries(Le)) {
909
1050
  let n = o?.[e];
910
1051
  a({
911
1052
  ...t,
912
- ...On(n) ? n : {}
1053
+ ...Nn(n) ? n : {}
913
1054
  }, e);
914
1055
  }
915
1056
  return a({
916
- ...Pe,
1057
+ ...Ne,
917
1058
  ...n ?? {}
918
1059
  }, "template"), i;
919
1060
  }
920
1061
  //#endregion
1062
+ //#region src/utils/resolveFieldColors.ts
1063
+ function Fn(e, t) {
1064
+ let n = Qe({ presets: e.presets }, qe), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
1065
+ return {
1066
+ presets: r ? t.presets : n.presets,
1067
+ allowCustom: t.allowCustom !== !1 && i,
1068
+ invalidPresets: n.invalidPresets,
1069
+ emptyPresets: e.presets !== void 0 && e.presets.length === 0,
1070
+ presetsInherited: r,
1071
+ allowCustomIgnored: e.allowCustom === !0 && t.allowCustom === !1
1072
+ };
1073
+ }
1074
+ //#endregion
1075
+ //#region src/utils/collectColorFieldIssues.ts
1076
+ function In(e, t) {
1077
+ let n = [], r = (r, i) => {
1078
+ let a = Fn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1079
+ if (a.invalidPresets.length > 0 && n.push({
1080
+ id: s("invalid-presets"),
1081
+ message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
1082
+ }), a.emptyPresets && n.push({
1083
+ id: s("empty-presets"),
1084
+ message: `${o}: presets is empty — a field palette can only narrow the editor's, so an empty list is ignored and the field inherits colors.presets.`
1085
+ }), a.allowCustomIgnored && n.push({
1086
+ id: s("allow-custom-ignored"),
1087
+ message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
1088
+ }), !a.allowCustom && a.presets.length > 0) {
1089
+ let e = r.default ?? "", t = new Set(a.presets.map((e) => $e(e)));
1090
+ e !== "" && !t.has($e(e)) && n.push({
1091
+ id: s("off-palette-default"),
1092
+ message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
1093
+ });
1094
+ }
1095
+ };
1096
+ for (let t of e.fields) if (t.type === "color") r(t, t.key);
1097
+ else if (t.type === "repeatable") for (let e of t.fields) e.type === "color" && r(e, `${t.key}[].${e.key}`);
1098
+ return n;
1099
+ }
1100
+ //#endregion
921
1101
  //#region src/utils/keyboardShortcuts.ts
922
- function An(e) {
1102
+ function Ln(e) {
923
1103
  for (let t of e.composedPath()) {
924
1104
  if (!(t instanceof HTMLElement)) continue;
925
1105
  if (t.isContentEditable) return !0;
@@ -928,26 +1108,40 @@ function An(e) {
928
1108
  }
929
1109
  return !1;
930
1110
  }
931
- function jn(e, t) {
1111
+ function Rn(e, t) {
932
1112
  let n = e.metaKey || e.ctrlKey;
933
1113
  if (n && e.key.toLowerCase() === "s") {
934
1114
  e.preventDefault(), t.onSave?.();
935
1115
  return;
936
1116
  }
937
1117
  if (n && e.key.toLowerCase() === "z") {
938
- if (An(e)) return;
1118
+ if (Ln(e)) return;
939
1119
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
940
1120
  return;
941
1121
  }
1122
+ if (t.isPicking?.() && !Ln(e)) {
1123
+ if (e.key === "Escape") {
1124
+ e.preventDefault(), t.onCancelPick?.();
1125
+ return;
1126
+ }
1127
+ if (e.key === "Enter") {
1128
+ e.preventDefault(), t.onConfirmPick?.();
1129
+ return;
1130
+ }
1131
+ if (e.key === "Delete" || e.key === "Backspace") {
1132
+ e.preventDefault();
1133
+ return;
1134
+ }
1135
+ }
942
1136
  if (e.key === "Escape") {
943
1137
  t.selectBlock(null);
944
1138
  return;
945
1139
  }
946
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !An(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1140
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ln(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
947
1141
  }
948
1142
  //#endregion
949
1143
  //#region src/utils/mergeTagLabelSegments.ts
950
- function Mn(e, t, n) {
1144
+ function zn(e, t, n) {
951
1145
  if (!e) return [];
952
1146
  let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
953
1147
  for (; (o = r.exec(e)) !== null;) {
@@ -956,12 +1150,12 @@ function Mn(e, t, n) {
956
1150
  value: e.slice(a, o.index)
957
1151
  });
958
1152
  let r = o[0];
959
- ge(r, n) ? i.push({
1153
+ he(r, n) ? i.push({
960
1154
  type: "tag",
961
- value: fe(r, t)
962
- }) : Ae(r, n) ? i.push({
1155
+ value: de(r, t)
1156
+ }) : ke(r, n) ? i.push({
963
1157
  type: "tag",
964
- value: pe(r, n)
1158
+ value: fe(r, n)
965
1159
  }) : i.push({
966
1160
  type: "text",
967
1161
  value: r
@@ -974,27 +1168,27 @@ function Mn(e, t, n) {
974
1168
  }
975
1169
  //#endregion
976
1170
  //#region src/components/MergeTagPreviewText.vue
977
- var Nn = y({
1171
+ var Bn = y({
978
1172
  name: "MergeTagPreviewText",
979
1173
  props: { text: {
980
1174
  type: String,
981
1175
  required: !0
982
1176
  } },
983
1177
  setup(e) {
984
- let t = N(pt, []), n = N(ut, Se.liquid), r = j(() => Mn(e.text, t, n));
985
- return () => r.value.map((e, t) => e.type === "tag" ? ae("span", {
1178
+ let t = P(mt, []), n = P(dt, xe.liquid), r = M(() => zn(e.text, t, n));
1179
+ return () => r.value.map((e, t) => e.type === "tag" ? ie("span", {
986
1180
  key: t,
987
1181
  class: "tpl-merge-tag-label"
988
1182
  }, e.value) : e.value);
989
1183
  }
990
- }), Pn = { class: "tpl:text-center" }, Fn = ["href"], In = /* @__PURE__ */ y({
1184
+ }), Vn = { class: "tpl:text-center" }, Hn = ["href"], Un = /* @__PURE__ */ y({
991
1185
  __name: "ButtonBlock",
992
1186
  props: {
993
1187
  block: {},
994
1188
  viewport: {}
995
1189
  },
996
1190
  setup(e) {
997
- let t = e, n = j(() => {
1191
+ let t = e, n = M(() => {
998
1192
  let e = {
999
1193
  display: "inline-block",
1000
1194
  padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
@@ -1008,17 +1202,17 @@ var Nn = y({
1008
1202
  };
1009
1203
  return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
1010
1204
  });
1011
- return (t, r) => (f(), x("div", Pn, [b("a", {
1205
+ return (t, r) => (f(), x("div", Vn, [b("a", {
1012
1206
  href: e.block.url || "#",
1013
1207
  style: i(n.value),
1014
1208
  class: "tpl:cursor-default",
1015
- onClick: r[0] ||= P(() => {}, ["prevent"])
1016
- }, [w(Nn, { text: e.block.text }, null, 8, ["text"])], 12, Fn)]));
1209
+ onClick: r[0] ||= F(() => {}, ["prevent"])
1210
+ }, [w(Bn, { text: e.block.text }, null, 8, ["text"])], 12, Hn)]));
1017
1211
  }
1018
- }), Ln = F("bookmark", [["path", {
1212
+ }), Wn = I("bookmark", [["path", {
1019
1213
  d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
1020
1214
  key: "oz39mx"
1021
- }]]), Rn = F("box", [
1215
+ }]]), Gn = I("box", [
1022
1216
  ["path", {
1023
1217
  d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
1024
1218
  key: "hh9hay"
@@ -1031,13 +1225,13 @@ var Nn = y({
1031
1225
  d: "M12 22V12",
1032
1226
  key: "d0xqtd"
1033
1227
  }]
1034
- ]), zn = F("code", [["path", {
1228
+ ]), Kn = I("code", [["path", {
1035
1229
  d: "m16 18 6-6-6-6",
1036
1230
  key: "eg8j8"
1037
1231
  }], ["path", {
1038
1232
  d: "m8 6-6 6 6 6",
1039
1233
  key: "ppft3o"
1040
- }]]), Bn = F("copy", [["rect", {
1234
+ }]]), qn = I("copy", [["rect", {
1041
1235
  width: "14",
1042
1236
  height: "14",
1043
1237
  x: "8",
@@ -1048,7 +1242,7 @@ var Nn = y({
1048
1242
  }], ["path", {
1049
1243
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
1050
1244
  key: "zix9uf"
1051
- }]]), Vn = F("eye-off", [
1245
+ }]]), Jn = I("eye-off", [
1052
1246
  ["path", {
1053
1247
  d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
1054
1248
  key: "ct8e1f"
@@ -1065,10 +1259,10 @@ var Nn = y({
1065
1259
  d: "m2 2 20 20",
1066
1260
  key: "1ooewy"
1067
1261
  }]
1068
- ]), Hn = F("funnel", [["path", {
1262
+ ]), Yn = I("funnel", [["path", {
1069
1263
  d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
1070
1264
  key: "sc7q7i"
1071
- }]]), Un = F("grip-vertical", [
1265
+ }]]), Xn = I("grip-vertical", [
1072
1266
  ["circle", {
1073
1267
  cx: "9",
1074
1268
  cy: "12",
@@ -1105,7 +1299,7 @@ var Nn = y({
1105
1299
  r: "1",
1106
1300
  key: "f4zoj3"
1107
1301
  }]
1108
- ]), Wn = F("image", [
1302
+ ]), Zn = I("image", [
1109
1303
  ["rect", {
1110
1304
  width: "18",
1111
1305
  height: "18",
@@ -1125,13 +1319,13 @@ var Nn = y({
1125
1319
  d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
1126
1320
  key: "1xmnt7"
1127
1321
  }]
1128
- ]), Gn = F("navigation", [["polygon", {
1322
+ ]), Qn = I("navigation", [["polygon", {
1129
1323
  points: "3 11 22 2 13 21 11 13 3 11",
1130
1324
  key: "1ltx0t"
1131
- }]]), Kn = F("puzzle", [["path", {
1325
+ }]]), $n = I("puzzle", [["path", {
1132
1326
  d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
1133
1327
  key: "w46dr5"
1134
- }]]), qn = F("share-2", [
1328
+ }]]), er = I("share-2", [
1135
1329
  ["circle", {
1136
1330
  cx: "18",
1137
1331
  cy: "5",
@@ -1164,7 +1358,7 @@ var Nn = y({
1164
1358
  y2: "10.49",
1165
1359
  key: "1n3mei"
1166
1360
  }]
1167
- ]), Jn = F("table", [
1361
+ ]), tr = I("table", [
1168
1362
  ["path", {
1169
1363
  d: "M12 3v18",
1170
1364
  key: "108xh3"
@@ -1185,7 +1379,7 @@ var Nn = y({
1185
1379
  d: "M3 15h18",
1186
1380
  key: "5xshup"
1187
1381
  }]
1188
- ]), Yn = F("video", [["path", {
1382
+ ]), nr = I("video", [["path", {
1189
1383
  d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
1190
1384
  key: "ftymec"
1191
1385
  }], ["rect", {
@@ -1195,18 +1389,18 @@ var Nn = y({
1195
1389
  height: "12",
1196
1390
  rx: "2",
1197
1391
  key: "158x01"
1198
- }]]), Xn = ["innerHTML"], Zn = [
1392
+ }]]), rr = ["innerHTML"], ir = [
1199
1393
  "src",
1200
1394
  "width",
1201
1395
  "height"
1202
- ], Qn = /* @__PURE__ */ y({
1396
+ ], ar = /* @__PURE__ */ y({
1203
1397
  __name: "CustomBlockIcon",
1204
1398
  props: {
1205
1399
  icon: {},
1206
1400
  size: {}
1207
1401
  },
1208
1402
  setup(e) {
1209
- let t = e, n = j(() => t.size ?? 20), r = j(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), a = j(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
1403
+ let t = e, n = M(() => t.size ?? 20), r = M(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), a = M(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
1210
1404
  return (t, o) => r.value ? (f(), x("span", {
1211
1405
  key: 0,
1212
1406
  class: "tpl:inline-flex tpl:items-center tpl:justify-center",
@@ -1215,14 +1409,14 @@ var Nn = y({
1215
1409
  height: `${n.value}px`
1216
1410
  }),
1217
1411
  innerHTML: e.icon
1218
- }, null, 12, Xn)) : a.value ? (f(), x("img", {
1412
+ }, null, 12, rr)) : a.value ? (f(), x("img", {
1219
1413
  key: 1,
1220
1414
  src: e.icon,
1221
1415
  width: n.value,
1222
1416
  height: n.value,
1223
1417
  class: "tpl:inline-block",
1224
1418
  alt: ""
1225
- }, null, 8, Zn)) : (f(), D(k(Rn), {
1419
+ }, null, 8, ir)) : (f(), D(k(Gn), {
1226
1420
  key: 2,
1227
1421
  size: n.value,
1228
1422
  "stroke-width": 1.5
@@ -1231,16 +1425,16 @@ var Nn = y({
1231
1425
  });
1232
1426
  //#endregion
1233
1427
  //#region src/composables/useEditorRoot.ts
1234
- function $n() {
1235
- return N(yt, document) ?? document;
1428
+ function or() {
1429
+ return P(bt, document) ?? document;
1236
1430
  }
1237
1431
  //#endregion
1238
1432
  //#region src/composables/useFocusTrap.ts
1239
- var er = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1240
- function tr(e, t) {
1241
- let n = $n(), r = null, i = null, a = null;
1433
+ var sr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1434
+ function cr(e, t) {
1435
+ let n = or(), r = null, i = null, a = null;
1242
1436
  function o() {
1243
- return e.value ? Array.from(e.value.querySelectorAll(er)).filter((e) => e.offsetParent !== null) : [];
1437
+ return e.value ? Array.from(e.value.querySelectorAll(sr)).filter((e) => e.offsetParent !== null) : [];
1244
1438
  }
1245
1439
  function s(e) {
1246
1440
  if (e.key !== "Tab") return;
@@ -1255,7 +1449,7 @@ function tr(e, t) {
1255
1449
  a = null;
1256
1450
  let t = o();
1257
1451
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
1258
- }), i = et(e, "keydown", s);
1452
+ }), i = tt(e, "keydown", s);
1259
1453
  }
1260
1454
  function d(e = {}) {
1261
1455
  let t = e.restoreFocus !== !1;
@@ -1270,7 +1464,7 @@ function tr(e, t) {
1270
1464
  }
1271
1465
  //#endregion
1272
1466
  //#region src/composables/useEmoji.ts
1273
- function nr() {
1467
+ function lr() {
1274
1468
  let [e, t] = Ge(!1), n = v([]), r = !1;
1275
1469
  u(() => {
1276
1470
  r = !0;
@@ -1296,7 +1490,7 @@ function nr() {
1296
1490
  }
1297
1491
  //#endregion
1298
1492
  //#region src/composables/useDragDrop.ts
1299
- function rr(e) {
1493
+ function ur(e) {
1300
1494
  let { onBlockMove: t, onBlockAdd: n } = e, r = _(!1), i = _(null), a = _(null);
1301
1495
  function o(e) {
1302
1496
  r.value = !0, i.value = e;
@@ -1346,7 +1540,7 @@ function rr(e) {
1346
1540
  }
1347
1541
  //#endregion
1348
1542
  //#region src/composables/useFonts.ts
1349
- var ir = [
1543
+ var dr = [
1350
1544
  {
1351
1545
  value: "Arial",
1352
1546
  label: "Arial"
@@ -1375,7 +1569,7 @@ var ir = [
1375
1569
  value: "Courier New",
1376
1570
  label: "Courier New"
1377
1571
  }
1378
- ], ar = {
1572
+ ], fr = {
1379
1573
  arial: "Arial, sans-serif",
1380
1574
  helvetica: "Helvetica, sans-serif",
1381
1575
  georgia: "Georgia, serif",
@@ -1383,27 +1577,27 @@ var ir = [
1383
1577
  verdana: "Verdana, sans-serif",
1384
1578
  "trebuchet ms": "'Trebuchet MS', sans-serif",
1385
1579
  "courier new": "'Courier New', monospace"
1386
- }, or = "Arial, sans-serif";
1387
- function sr(e) {
1388
- if (e === void 0 || e === !0) return [...ir];
1580
+ }, pr = "Arial, sans-serif";
1581
+ function mr(e) {
1582
+ if (e === void 0 || e === !0) return [...dr];
1389
1583
  if (e === !1) return [];
1390
1584
  let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
1391
1585
  for (let i of e) {
1392
- let e = i.toLowerCase(), a = ir.find((t) => t.value.toLowerCase() === e);
1586
+ let e = i.toLowerCase(), a = dr.find((t) => t.value.toLowerCase() === e);
1393
1587
  if (!a) {
1394
- r.has(e) || (r.add(e), bn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${ir.map((e) => e.value).join(", ")}.`));
1588
+ r.has(e) || (r.add(e), Tn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${dr.map((e) => e.value).join(", ")}.`));
1395
1589
  continue;
1396
1590
  }
1397
1591
  n.has(a.value) || (n.add(a.value), t.push(a));
1398
1592
  }
1399
1593
  return t;
1400
1594
  }
1401
- function cr(e) {
1402
- let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = sr(e?.builtIns), a = j(() => e?.defaultFallback ?? or);
1595
+ function hr(e) {
1596
+ let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = mr(e?.builtIns), a = M(() => e?.defaultFallback ?? pr);
1403
1597
  function o(e) {
1404
1598
  n.value = e;
1405
1599
  }
1406
- let c = j(() => {
1600
+ let c = M(() => {
1407
1601
  let e = [...i];
1408
1602
  if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
1409
1603
  let r = t.value.map((e) => ({
@@ -1416,22 +1610,22 @@ function cr(e) {
1416
1610
  function l(e) {
1417
1611
  return c.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1418
1612
  }
1419
- let d = e?.defaultFont ?? or.split(",")[0].trim();
1420
- l(d) || bn.warn(`config.fonts: new templates seed "${d}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
1613
+ let d = e?.defaultFont ?? pr.split(",")[0].trim();
1614
+ l(d) || Tn.warn(`config.fonts: new templates seed "${d}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
1421
1615
  function f(e) {
1422
- return ir.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1616
+ return dr.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1423
1617
  }
1424
1618
  function p() {
1425
1619
  if (e?.defaultFont) {
1426
- if (!n.value && !f(e.defaultFont)) return or;
1620
+ if (!n.value && !f(e.defaultFont)) return pr;
1427
1621
  if (l(e.defaultFont)) {
1428
1622
  let t = c.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1429
1623
  if (t) return t.value;
1430
1624
  }
1431
1625
  }
1432
- return or;
1626
+ return pr;
1433
1627
  }
1434
- let m = j(() => p());
1628
+ let m = M(() => p());
1435
1629
  function h(e) {
1436
1630
  if (!e) return a.value;
1437
1631
  let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
@@ -1439,7 +1633,7 @@ function cr(e) {
1439
1633
  let e = n.fallback ?? a.value;
1440
1634
  return `'${n.name}', ${e}`;
1441
1635
  }
1442
- return ar[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
1636
+ return fr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
1443
1637
  }
1444
1638
  let g = [], v = !1;
1445
1639
  async function y() {
@@ -1455,7 +1649,7 @@ function cr(e) {
1455
1649
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
1456
1650
  });
1457
1651
  } catch (t) {
1458
- bn.warn(`Failed to load custom font "${e.name}":`, t);
1652
+ Tn.warn(`Failed to load custom font "${e.name}":`, t);
1459
1653
  }
1460
1654
  });
1461
1655
  await Promise.allSettled(e), !v && (r.value = !0);
@@ -1482,8 +1676,8 @@ function cr(e) {
1482
1676
  }
1483
1677
  //#endregion
1484
1678
  //#region src/composables/useLogicTag.ts
1485
- function lr() {
1486
- let e = N(rt, []), t = N(ft, []), n = N(ut, Se.liquid), r = N(Ct, null), i = N(jt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
1679
+ function gr() {
1680
+ let e = P(it, []), t = P(pt, []), n = P(dt, xe.liquid), r = P(wt, null), i = P(Mt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
1487
1681
  async function c() {
1488
1682
  if (r) {
1489
1683
  a.value = !0;
@@ -1514,12 +1708,12 @@ function lr() {
1514
1708
  }
1515
1709
  //#endregion
1516
1710
  //#region src/utils/mergeTagNodeSpec.ts
1517
- function ur(e, t, n) {
1518
- return Ae(e, n) ? {
1711
+ function _r(e, t, n) {
1712
+ return ke(e, n) ? {
1519
1713
  type: "logicMergeTagNode",
1520
1714
  attrs: {
1521
1715
  value: e,
1522
- keyword: pe(e, n)
1716
+ keyword: fe(e, n)
1523
1717
  }
1524
1718
  } : {
1525
1719
  type: "mergeTagNode",
@@ -1531,15 +1725,15 @@ function ur(e, t, n) {
1531
1725
  }
1532
1726
  //#endregion
1533
1727
  //#region src/utils/insertLogicTag.ts
1534
- function dr(e) {
1728
+ function vr(e) {
1535
1729
  return "before" in e && "after" in e;
1536
1730
  }
1537
- function fr(e, t, n) {
1538
- if (!dr(t)) {
1539
- e.chain().focus().insertContent(ur(t.value, t.label, n)).run();
1731
+ function yr(e, t, n) {
1732
+ if (!vr(t)) {
1733
+ e.chain().focus().insertContent(_r(t.value, t.label, n)).run();
1540
1734
  return;
1541
1735
  }
1542
- let r = ur(t.before, t.label, n), i = ur(t.after, t.label, n), { from: a, to: o } = e.state.selection;
1736
+ let r = _r(t.before, t.label, n), i = _r(t.after, t.label, n), { from: a, to: o } = e.state.selection;
1543
1737
  if (a !== o) {
1544
1738
  e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
1545
1739
  return;
@@ -1548,20 +1742,20 @@ function fr(e, t, n) {
1548
1742
  }
1549
1743
  //#endregion
1550
1744
  //#region src/utils/linkColorExtension.ts
1551
- function pr(e) {
1745
+ function br(e) {
1552
1746
  if (!e) return null;
1553
1747
  let t = e.trim();
1554
1748
  return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
1555
1749
  }
1556
- function mr(e) {
1750
+ function xr(e) {
1557
1751
  return e.extend({ addAttributes() {
1558
1752
  return {
1559
1753
  ...this.parent?.(),
1560
1754
  color: {
1561
1755
  default: null,
1562
- parseHTML: (e) => pr(Ye(e.style.color)),
1756
+ parseHTML: (e) => br(Xe(e.style.color)),
1563
1757
  renderHTML: (e) => {
1564
- let t = pr(e.color);
1758
+ let t = br(e.color);
1565
1759
  return t ? { style: `color: ${t}` } : {};
1566
1760
  }
1567
1761
  }
@@ -1570,9 +1764,9 @@ function mr(e) {
1570
1764
  }
1571
1765
  //#endregion
1572
1766
  //#region src/composables/useRichTextLinkDialog.ts
1573
- function hr(e) {
1767
+ function Sr(e) {
1574
1768
  let t = _(!1), n = _(""), r = _(""), i = _(null);
1575
- tr(i, t);
1769
+ cr(i, t);
1576
1770
  function a() {
1577
1771
  let i = e.value?.getAttributes("link") ?? {};
1578
1772
  n.value = i.href || "", r.value = i.color || "", t.value = !0;
@@ -1581,7 +1775,7 @@ function hr(e) {
1581
1775
  if (n.value) {
1582
1776
  let t = c(n.value);
1583
1777
  if (t !== null) {
1584
- let n = pr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
1778
+ let n = br(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
1585
1779
  n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
1586
1780
  }
1587
1781
  }
@@ -1628,10 +1822,10 @@ function hr(e) {
1628
1822
  }
1629
1823
  //#endregion
1630
1824
  //#region src/composables/useRichTextEditor.ts
1631
- function gr(e) {
1632
- let t = N(bt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Ht(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = lr(), f = N(dt, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = je(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = hr(y), { start: k, stop: ee } = Ke(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), A = v(null), te = _(!0), j = _(null), ne = !1;
1633
- async function M() {
1634
- j.value = null, te.value = !0;
1825
+ function Cr(e) {
1826
+ let t = P(xt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Ut(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = gr(), f = P(ft, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = Ae(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = Sr(y), { start: k, stop: A } = Ke(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), j = v(null), ee = _(!0), M = _(null), te = !1;
1827
+ async function N() {
1828
+ M.value = null, ee.value = !0;
1635
1829
  try {
1636
1830
  let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
1637
1831
  mergeTags: n,
@@ -1640,8 +1834,8 @@ function gr(e) {
1640
1834
  autocompleteEnabled: s,
1641
1835
  suggestionEmptyText: p
1642
1836
  });
1643
- if (ne) return;
1644
- A.value = i;
1837
+ if (te) return;
1838
+ j.value = i;
1645
1839
  let c = /* @__PURE__ */ new Map();
1646
1840
  a.forEach((e, t) => c.set(e.name, t));
1647
1841
  let l = new r({
@@ -1649,27 +1843,27 @@ function gr(e) {
1649
1843
  content: e.blockContent(),
1650
1844
  editable: !0,
1651
1845
  onUpdate: ({ editor: n }) => {
1652
- ne || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
1846
+ te || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
1653
1847
  }
1654
1848
  });
1655
- if (ne) {
1849
+ if (te) {
1656
1850
  l.destroy();
1657
1851
  return;
1658
1852
  }
1659
- y.value = l, te.value = !1, k();
1853
+ y.value = l, ee.value = !1, k();
1660
1854
  } catch (t) {
1661
- if (ne) return;
1662
- bn.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), j.value = t instanceof Error ? t.message : "Failed to load editor", te.value = !1;
1855
+ if (te) return;
1856
+ Tn.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), M.value = t instanceof Error ? t.message : "Failed to load editor", ee.value = !1;
1663
1857
  }
1664
1858
  }
1665
- function re() {
1666
- y.value?.destroy(), y.value = null, M();
1859
+ function ne() {
1860
+ y.value?.destroy(), y.value = null, N();
1667
1861
  }
1668
- M();
1669
- let ie = c(() => e.blockContent(), (e) => {
1862
+ N();
1863
+ let re = c(() => e.blockContent(), (e) => {
1670
1864
  y.value && y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 });
1671
1865
  });
1672
- function ae(t) {
1866
+ function ie(t) {
1673
1867
  if (i.value || u.value) return;
1674
1868
  let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
1675
1869
  if (!r) return;
@@ -1677,26 +1871,26 @@ function gr(e) {
1677
1871
  let a = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
1678
1872
  r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || a || e.onDone();
1679
1873
  }
1680
- et(document, "mousedown", ae), h(() => {
1681
- ne = !0, ie(), ee(), y.value?.destroy();
1874
+ tt(document, "mousedown", ie), h(() => {
1875
+ te = !0, re(), A(), y.value?.destroy();
1682
1876
  });
1683
- async function oe() {
1877
+ async function ae() {
1684
1878
  let e = await a();
1685
- ne || (e && y.value ? y.value.chain().focus().insertMergeTag({
1879
+ te || (e && y.value ? y.value.chain().focus().insertMergeTag({
1686
1880
  label: e.label,
1687
1881
  value: e.value
1688
1882
  }).run() : y.value?.commands.focus());
1689
1883
  }
1690
- async function P() {
1884
+ async function F() {
1691
1885
  let e = await d();
1692
- ne || (e && y.value ? fr(y.value, e, o) : y.value?.commands.focus());
1886
+ te || (e && y.value ? yr(y.value, e, o) : y.value?.commands.focus());
1693
1887
  }
1694
1888
  return {
1695
1889
  editor: y,
1696
- EditorContent: A,
1697
- isLoading: te,
1698
- initError: j,
1699
- retry: re,
1890
+ EditorContent: j,
1891
+ isLoading: ee,
1892
+ initError: M,
1893
+ retry: ne,
1700
1894
  showLinkDialog: b,
1701
1895
  linkUrl: x,
1702
1896
  linkColor: S,
@@ -1712,36 +1906,36 @@ function gr(e) {
1712
1906
  removeLink: E,
1713
1907
  closeLinkDialog: D,
1714
1908
  handleLinkKeydown: O,
1715
- handleAddMergeTag: oe,
1716
- handleAddLogicTag: P
1909
+ handleAddMergeTag: ae,
1910
+ handleAddLogicTag: F
1717
1911
  };
1718
1912
  }
1719
1913
  //#endregion
1720
1914
  //#region src/composables/useSmallScreenNotice.ts
1721
- var _r = "(max-width: 767px)";
1722
- function vr(e) {
1723
- let t = Je(_r);
1915
+ var wr = "(max-width: 767px)";
1916
+ function Tr(e) {
1917
+ let t = Ye(wr);
1724
1918
  return {
1725
1919
  isSmallScreen: t,
1726
- showNotice: j(() => (S(e) ?? !0) && t.value)
1920
+ showNotice: M(() => (S(e) ?? !0) && t.value)
1727
1921
  };
1728
1922
  }
1729
1923
  //#endregion
1730
1924
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
1731
- var yr = { class: "tpl:w-full" }, br = {
1925
+ var Er = { class: "tpl:w-full" }, Dr = {
1732
1926
  key: 0,
1733
1927
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
1734
- }, xr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Sr = {
1928
+ }, Or = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, kr = {
1735
1929
  key: 1,
1736
1930
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
1737
- }, Cr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, wr = {
1931
+ }, Ar = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, jr = {
1738
1932
  key: 2,
1739
1933
  class: "tpl:relative"
1740
- }, Tr = ["innerHTML"], Er = {
1934
+ }, Mr = ["innerHTML"], Nr = {
1741
1935
  key: 0,
1742
1936
  class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
1743
1937
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
1744
- }, Dr = /* @__PURE__ */ y({
1938
+ }, Pr = /* @__PURE__ */ y({
1745
1939
  __name: "CustomBlock",
1746
1940
  props: {
1747
1941
  block: {},
@@ -1749,9 +1943,9 @@ var yr = { class: "tpl:w-full" }, br = {
1749
1943
  },
1750
1944
  emits: ["fetchData"],
1751
1945
  setup(e, { emit: t }) {
1752
- let n = e, r = t, { t: i } = Ft(), o = N(Dt, null), s = _(""), l = _(!1), u = j(() => o?.getDefinition(n.block.customType)), d = j(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = en({
1946
+ let n = e, r = t, { t: i } = It(), o = P(Ot, null), s = _(""), l = _(!1), u = M(() => o?.getDefinition(n.block.customType)), d = M(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = tn({
1753
1947
  definition: u,
1754
- block: j(() => n.block),
1948
+ block: M(() => n.block),
1755
1949
  onUpdate: (e, t) => {
1756
1950
  r("fetchData", {
1757
1951
  fieldValues: e,
@@ -1775,60 +1969,60 @@ var yr = { class: "tpl:w-full" }, br = {
1775
1969
  y();
1776
1970
  }), c(() => n.block.fieldValues, () => {
1777
1971
  S();
1778
- }, { deep: !0 }), (e, t) => (f(), x("div", yr, [d.value ? l.value ? (f(), x("div", Sr, [w(k(zt), {
1972
+ }, { deep: !0 }), (e, t) => (f(), x("div", Er, [d.value ? l.value ? (f(), x("div", kr, [w(k(Bt), {
1779
1973
  size: 24,
1780
1974
  class: "tpl:text-[var(--tpl-danger)]"
1781
- }), b("span", Cr, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", wr, [b("div", { innerHTML: s.value }, null, 8, Tr), k(v) && k(g) ? (f(), x("div", Er, [k(m) ? (f(), D(Bt, {
1975
+ }), b("span", Ar, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", jr, [b("div", { innerHTML: s.value }, null, 8, Mr), k(v) && k(g) ? (f(), x("div", Nr, [k(m) ? (f(), D(Vt, {
1782
1976
  key: 1,
1783
1977
  class: "tpl:w-48"
1784
1978
  })) : (f(), x("button", {
1785
1979
  key: 0,
1786
1980
  type: "button",
1787
1981
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
1788
- onClick: t[0] ||= P((...e) => k(h) && k(h)(...e), ["stop"])
1789
- }, [u.value?.icon ? (f(), D(Qn, {
1982
+ onClick: t[0] ||= F((...e) => k(h) && k(h)(...e), ["stop"])
1983
+ }, [u.value?.icon ? (f(), D(ar, {
1790
1984
  key: 0,
1791
1985
  icon: u.value.icon,
1792
1986
  size: 16
1793
- }, null, 8, ["icon"])) : M("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : M("", !0)])) : (f(), x("div", br, [w(k(Kn), {
1987
+ }, null, 8, ["icon"])) : N("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : N("", !0)])) : (f(), x("div", Dr, [w(k($n), {
1794
1988
  size: 24,
1795
1989
  class: "tpl:text-[var(--tpl-warning)]"
1796
- }), b("span", xr, p(k(i).customBlocks.definitionNotFound), 1)]))]));
1990
+ }), b("span", Or, p(k(i).customBlocks.definitionNotFound), 1)]))]));
1797
1991
  }
1798
- }), Or = { class: "tpl:w-full" }, kr = /* @__PURE__ */ y({
1992
+ }), Fr = { class: "tpl:w-full" }, Ir = /* @__PURE__ */ y({
1799
1993
  __name: "DividerBlock",
1800
1994
  props: {
1801
1995
  block: {},
1802
1996
  viewport: {}
1803
1997
  },
1804
1998
  setup(e) {
1805
- let t = e, n = j(() => ({
1999
+ let t = e, n = M(() => ({
1806
2000
  borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
1807
2001
  width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
1808
2002
  margin: t.block.width === "full" ? "0" : "0 auto"
1809
2003
  }));
1810
- return (e, t) => (f(), x("div", Or, [b("hr", {
2004
+ return (e, t) => (f(), x("div", Fr, [b("hr", {
1811
2005
  class: "tpl:m-0 tpl:border-none",
1812
2006
  style: i(n.value)
1813
2007
  }, null, 4)]));
1814
2008
  }
1815
- }), Ar = { class: "tpl:w-full" }, jr = ["srcdoc", "title"], Mr = {
2009
+ }), Lr = { class: "tpl:w-full" }, Rr = ["srcdoc", "title"], zr = {
1816
2010
  key: 1,
1817
2011
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
1818
- }, Nr = {
2012
+ }, Br = {
1819
2013
  key: 0,
1820
2014
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
1821
- }, Pr = {
2015
+ }, Vr = {
1822
2016
  key: 1,
1823
2017
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
1824
- }, Fr = /* @__PURE__ */ y({
2018
+ }, Hr = /* @__PURE__ */ y({
1825
2019
  __name: "HtmlBlock",
1826
2020
  props: {
1827
2021
  block: {},
1828
2022
  viewport: {}
1829
2023
  },
1830
2024
  setup(e) {
1831
- let t = e, { t: n } = Ft(), r = N(Nt, !1), a = j(() => t.block.content.trim().length > 0), o = j(() => r && a.value), s = _(null), l = _(60), u = null;
2025
+ let t = e, { t: n } = It(), r = P(Pt, !1), a = M(() => t.block.content.trim().length > 0), o = M(() => r && a.value), s = _(null), l = _(60), u = null;
1832
2026
  function d() {
1833
2027
  let e = s.value?.contentDocument;
1834
2028
  e && (l.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
@@ -1842,7 +2036,7 @@ var yr = { class: "tpl:w-full" }, br = {
1842
2036
  e || (u?.disconnect(), u = null);
1843
2037
  }), h(() => {
1844
2038
  u?.disconnect(), u = null;
1845
- }), (t, r) => (f(), x("div", Ar, [o.value ? (f(), x("iframe", {
2039
+ }), (t, r) => (f(), x("div", Lr, [o.value ? (f(), x("iframe", {
1846
2040
  key: 0,
1847
2041
  ref_key: "iframeRef",
1848
2042
  ref: s,
@@ -1852,36 +2046,36 @@ var yr = { class: "tpl:w-full" }, br = {
1852
2046
  class: "tpl:block tpl:w-full tpl:border-0",
1853
2047
  style: i({ height: `${l.value}px` }),
1854
2048
  onLoad: m
1855
- }, null, 44, jr)) : (f(), x("div", Mr, [w(k(zn), {
2049
+ }, null, 44, Rr)) : (f(), x("div", zr, [w(k(Kn), {
1856
2050
  size: 24,
1857
2051
  class: "tpl:text-[var(--tpl-text-dim)]"
1858
- }), a.value ? (f(), x("span", Nr, p(k(n).html.preview), 1)) : (f(), x("span", Pr, p(k(n).html.empty), 1))]))]));
2052
+ }), a.value ? (f(), x("span", Br, p(k(n).html.preview), 1)) : (f(), x("span", Vr, p(k(n).html.empty), 1))]))]));
1859
2053
  }
1860
- }), Ir = "image/";
1861
- function Lr(e) {
1862
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = qe(t, {
2054
+ }), Ur = "image/";
2055
+ function Wr(e) {
2056
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = Je(t, {
1863
2057
  preventDefaultForUnhandled: !0,
1864
2058
  onDrop: (e) => {
1865
2059
  if (!i()) return;
1866
- let t = (e ?? []).filter((e) => e.type.startsWith(Ir));
2060
+ let t = (e ?? []).filter((e) => e.type.startsWith(Ur));
1867
2061
  t.length > 0 && n([t[0]]);
1868
2062
  }
1869
2063
  });
1870
- return { isOver: j(() => i() && a.value) };
2064
+ return { isOver: M(() => i() && a.value) };
1871
2065
  }
1872
2066
  //#endregion
1873
2067
  //#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
1874
- var Rr = {
2068
+ var Gr = {
1875
2069
  key: 0,
1876
2070
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
1877
2071
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
1878
- }, zr = ["href"], Br = ["src", "alt"], Vr = ["src", "alt"], Hr = {
2072
+ }, Kr = ["href"], qr = ["src", "alt"], Jr = ["src", "alt"], Yr = {
1879
2073
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
1880
2074
  style: { opacity: "0.7" }
1881
- }, Ur = ["href"], Wr = ["src", "alt"], Gr = ["src", "alt"], Kr = {
2075
+ }, Xr = ["href"], Zr = ["src", "alt"], Qr = ["src", "alt"], $r = {
1882
2076
  key: 4,
1883
2077
  class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
1884
- }, qr = ["aria-label"], Jr = { key: 1 }, Yr = /* @__PURE__ */ y({
2078
+ }, ei = ["aria-label"], ti = { key: 1 }, ni = /* @__PURE__ */ y({
1885
2079
  __name: "ImageBlock",
1886
2080
  props: {
1887
2081
  block: {},
@@ -1889,7 +2083,7 @@ var Rr = {
1889
2083
  },
1890
2084
  emits: ["update"],
1891
2085
  setup(e, { emit: t }) {
1892
- let n = e, r = t, { t: a } = Ft(), { syntax: o } = Ht(), s = N(tt, null), c = j(() => !!s), l = Ut();
2086
+ let n = e, r = t, { t: a } = It(), { syntax: o } = Ut(), s = P(nt, null), c = M(() => !!s), l = Wt();
1893
2087
  async function u() {
1894
2088
  let e = await s?.({ accept: ["images"] });
1895
2089
  if (l.alive && e) {
@@ -1897,7 +2091,7 @@ var Rr = {
1897
2091
  e.alt && (t.alt = e.alt), r("update", t);
1898
2092
  }
1899
2093
  }
1900
- let d = _(), m = _(!1), h = j(() => c.value && !m.value && !C.value);
2094
+ let d = _(), m = _(!1), h = M(() => c.value && !m.value && !C.value);
1901
2095
  async function g(e) {
1902
2096
  if (s) {
1903
2097
  m.value = !0;
@@ -1916,11 +2110,11 @@ var Rr = {
1916
2110
  }
1917
2111
  }
1918
2112
  }
1919
- let { isOver: v } = Lr({
2113
+ let { isOver: v } = Wr({
1920
2114
  target: d,
1921
2115
  enabled: h,
1922
2116
  onFiles: g
1923
- }), y = j(() => ({ textAlign: n.block.align })), S = j(() => {
2117
+ }), y = M(() => ({ textAlign: n.block.align })), S = M(() => {
1924
2118
  let e = n.block.align;
1925
2119
  return {
1926
2120
  maxWidth: "100%",
@@ -1929,86 +2123,86 @@ var Rr = {
1929
2123
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
1930
2124
  marginRight: e === "center" ? "auto" : void 0
1931
2125
  };
1932
- }), C = j(() => we(n.block.src, o)), T = cn(() => C.value ? void 0 : n.block.src), E = cn(() => C.value ? n.block.placeholderUrl : void 0);
2126
+ }), C = M(() => Ce(n.block.src, o)), T = fn(() => C.value ? void 0 : n.block.src), E = fn(() => C.value ? n.block.placeholderUrl : void 0);
1933
2127
  return (t, n) => (f(), x("div", {
1934
2128
  ref_key: "dropZoneRef",
1935
2129
  ref: d,
1936
2130
  "data-testid": "image-drop-zone",
1937
2131
  class: "tpl:relative tpl:w-full",
1938
2132
  style: i(y.value)
1939
- }, [h.value && (k(v) || m.value) ? (f(), x("div", Rr, [m.value ? (f(), x(A, { key: 0 }, [w(k(It), {
2133
+ }, [h.value && (k(v) || m.value) ? (f(), x("div", Gr, [m.value ? (f(), x(j, { key: 0 }, [w(k(Lt), {
1940
2134
  class: "tpl-spinner",
1941
2135
  size: 20,
1942
2136
  "stroke-width": 2
1943
- }), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(A, { key: 1 }, [w(k(le), {
2137
+ }), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(j, { key: 1 }, [w(k(ce), {
1944
2138
  size: 20,
1945
2139
  "stroke-width": 1.5
1946
- }), O(" " + p(k(a).image.dropToUpload), 1)], 64))])) : M("", !0), e.block.src && C.value && e.block.placeholderUrl ? (f(), x(A, { key: 1 }, [e.block.linkUrl ? (f(), x("a", {
2140
+ }), O(" " + p(k(a).image.dropToUpload), 1)], 64))])) : N("", !0), e.block.src && C.value && e.block.placeholderUrl ? (f(), x(j, { key: 1 }, [e.block.linkUrl ? (f(), x("a", {
1947
2141
  key: 0,
1948
2142
  href: e.block.linkUrl,
1949
2143
  target: "_blank",
1950
2144
  rel: "noopener noreferrer",
1951
- onClick: n[0] ||= P(() => {}, ["prevent"])
2145
+ onClick: n[0] ||= F(() => {}, ["prevent"])
1952
2146
  }, [b("img", {
1953
2147
  class: "tpl:border-0",
1954
2148
  loading: "lazy",
1955
2149
  src: k(E),
1956
2150
  alt: e.block.alt || k(a).image.altTextPlaceholder,
1957
2151
  style: i(S.value)
1958
- }, null, 12, Br)], 8, zr)) : (f(), x("img", {
2152
+ }, null, 12, qr)], 8, Kr)) : (f(), x("img", {
1959
2153
  key: 1,
1960
2154
  class: "tpl:border-0",
1961
2155
  src: k(E),
1962
2156
  alt: e.block.alt,
1963
2157
  style: i(S.value)
1964
- }, null, 12, Vr))], 64)) : e.block.src && C.value ? (f(), x("div", {
2158
+ }, null, 12, Jr))], 64)) : e.block.src && C.value ? (f(), x("div", {
1965
2159
  key: 2,
1966
2160
  class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
1967
2161
  style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
1968
- }, [w(k(Wn), {
2162
+ }, [w(k(Zn), {
1969
2163
  size: 32,
1970
2164
  "stroke-width": 1.5,
1971
2165
  class: "tpl:text-[var(--tpl-primary)]",
1972
2166
  style: { opacity: "0.5" }
1973
- }), b("span", Hr, [w(Nn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(A, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
2167
+ }), b("span", Yr, [w(Bn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(j, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
1974
2168
  key: 0,
1975
2169
  href: e.block.linkUrl,
1976
2170
  target: "_blank",
1977
2171
  rel: "noopener noreferrer",
1978
- onClick: n[1] ||= P(() => {}, ["prevent"])
2172
+ onClick: n[1] ||= F(() => {}, ["prevent"])
1979
2173
  }, [b("img", {
1980
2174
  class: "tpl:border-0",
1981
2175
  loading: "lazy",
1982
2176
  src: k(T),
1983
2177
  alt: e.block.alt || k(a).image.altTextPlaceholder,
1984
2178
  style: i(S.value)
1985
- }, null, 12, Wr)], 8, Ur)) : (f(), x("img", {
2179
+ }, null, 12, Zr)], 8, Xr)) : (f(), x("img", {
1986
2180
  key: 1,
1987
2181
  class: "tpl:border-0",
1988
2182
  src: k(T),
1989
2183
  alt: e.block.alt,
1990
2184
  style: i(S.value)
1991
- }, null, 12, Gr))], 64)) : (f(), x("div", Kr, [c.value ? (f(), x("button", {
2185
+ }, null, 12, Qr))], 64)) : (f(), x("div", $r, [c.value ? (f(), x("button", {
1992
2186
  key: 0,
1993
2187
  "aria-label": k(a).image.browseMedia,
1994
2188
  class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
1995
- onClick: P(u, ["stop"])
1996
- }, [w(k(Wn), {
2189
+ onClick: F(u, ["stop"])
2190
+ }, [w(k(Zn), {
1997
2191
  size: 14,
1998
2192
  "stroke-width": 1.5
1999
- }), O(" " + p(k(a).image.browseMedia), 1)], 8, qr)) : (f(), x("span", Jr, p(k(a).image.clickToAdd), 1))]))], 4));
2193
+ }), O(" " + p(k(a).image.browseMedia), 1)], 8, ei)) : (f(), x("span", ti, p(k(a).image.clickToAdd), 1))]))], 4));
2000
2194
  }
2001
- }), Xr = { class: "tpl:w-full" }, Zr = ["href"], Qr = {
2195
+ }), ri = { class: "tpl:w-full" }, ii = ["href"], ai = {
2002
2196
  key: 1,
2003
2197
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
2004
- }, $r = /* @__PURE__ */ y({
2198
+ }, oi = /* @__PURE__ */ y({
2005
2199
  __name: "MenuBlock",
2006
2200
  props: {
2007
2201
  block: {},
2008
2202
  viewport: {}
2009
2203
  },
2010
2204
  setup(e) {
2011
- let n = e, { t: r } = Ft(), a = j(() => ({
2205
+ let n = e, { t: r } = It(), a = M(() => ({
2012
2206
  display: "flex",
2013
2207
  flexWrap: "wrap",
2014
2208
  gap: `0 ${n.block.spacing}px`,
@@ -2016,14 +2210,14 @@ var Rr = {
2016
2210
  fontSize: `${n.block.fontSize}px`,
2017
2211
  fontFamily: n.block.fontFamily || "inherit",
2018
2212
  alignItems: "center"
2019
- })), o = j(() => n.block.items.length > 0);
2213
+ })), o = M(() => n.block.items.length > 0);
2020
2214
  function s(e) {
2021
2215
  return e || n.block.linkColor || n.block.color;
2022
2216
  }
2023
- return (n, c) => (f(), x("div", Xr, [o.value ? (f(), x("div", {
2217
+ return (n, c) => (f(), x("div", ri, [o.value ? (f(), x("div", {
2024
2218
  key: 0,
2025
2219
  style: i(a.value)
2026
- }, [(f(!0), x(A, null, t(e.block.items, (t, n) => (f(), x(A, { key: t.id }, [b("a", {
2220
+ }, [(f(!0), x(j, null, t(e.block.items, (t, n) => (f(), x(j, { key: t.id }, [b("a", {
2027
2221
  href: t.url || "#",
2028
2222
  class: "tpl:cursor-default tpl:no-underline",
2029
2223
  style: i({
@@ -2031,16 +2225,16 @@ var Rr = {
2031
2225
  fontWeight: t.bold ? "bold" : "normal",
2032
2226
  textDecoration: t.underline ? "underline" : "none"
2033
2227
  }),
2034
- onClick: c[0] ||= P(() => {}, ["prevent"])
2035
- }, [w(Nn, { text: t.text || "..." }, null, 8, ["text"])], 12, Zr), n < e.block.items.length - 1 ? (f(), x("span", {
2228
+ onClick: c[0] ||= F(() => {}, ["prevent"])
2229
+ }, [w(Bn, { text: t.text || "..." }, null, 8, ["text"])], 12, ii), n < e.block.items.length - 1 ? (f(), x("span", {
2036
2230
  key: 0,
2037
2231
  style: i({
2038
2232
  color: e.block.separatorColor,
2039
2233
  padding: `0 ${e.block.spacing}px`
2040
2234
  })
2041
- }, p(e.block.separator), 5)) : M("", !0)], 64))), 128))], 4)) : (f(), x("div", Qr, [w(k(Gn), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
2235
+ }, p(e.block.separator), 5)) : N("", !0)], 64))), 128))], 4)) : (f(), x("div", ai, [w(k(Qn), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
2042
2236
  }
2043
- }), ei = /* @__PURE__ */ new Set([
2237
+ }), si = /* @__PURE__ */ new Set([
2044
2238
  "http",
2045
2239
  "https",
2046
2240
  "mailto",
@@ -2050,7 +2244,7 @@ var Rr = {
2050
2244
  "sms",
2051
2245
  "xmpp",
2052
2246
  "cid"
2053
- ]), ti = /* @__PURE__ */ new Set([
2247
+ ]), ci = /* @__PURE__ */ new Set([
2054
2248
  "SCRIPT",
2055
2249
  "STYLE",
2056
2250
  "IFRAME",
@@ -2060,7 +2254,7 @@ var Rr = {
2060
2254
  "META",
2061
2255
  "BASE",
2062
2256
  "FORM"
2063
- ]), ni = /* @__PURE__ */ new Set([
2257
+ ]), li = /* @__PURE__ */ new Set([
2064
2258
  "href",
2065
2259
  "xlink:href",
2066
2260
  "formaction",
@@ -2069,16 +2263,16 @@ var Rr = {
2069
2263
  "background",
2070
2264
  "poster"
2071
2265
  ]);
2072
- function ri(e, t) {
2266
+ function ui(e, t) {
2073
2267
  let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
2074
2268
  if (!n || n.startsWith("#")) return !0;
2075
2269
  let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
2076
2270
  if (!r) return !0;
2077
2271
  let i = r[1].toLowerCase();
2078
- return ei.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2272
+ return si.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2079
2273
  }
2080
- function ii(e) {
2081
- if (ti.has(e.tagName)) {
2274
+ function di(e) {
2275
+ if (ci.has(e.tagName)) {
2082
2276
  e.remove();
2083
2277
  return;
2084
2278
  }
@@ -2090,29 +2284,29 @@ function ii(e) {
2090
2284
  e.removeAttribute(n);
2091
2285
  continue;
2092
2286
  }
2093
- if (ni.has(t)) {
2094
- ri(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2287
+ if (li.has(t)) {
2288
+ ui(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2095
2289
  continue;
2096
2290
  }
2097
2291
  if (t === "src") {
2098
- ri(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2292
+ ui(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2099
2293
  continue;
2100
2294
  }
2101
2295
  t === "srcdoc" && e.removeAttribute(n);
2102
2296
  }
2103
2297
  let n = Array.from(e.children);
2104
- for (let e of n) ii(e);
2298
+ for (let e of n) di(e);
2105
2299
  }
2106
- function ai(e) {
2300
+ function fi(e) {
2107
2301
  if (typeof DOMParser > "u") return e;
2108
2302
  let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
2109
- for (let e of n) ii(e);
2303
+ for (let e of n) di(e);
2110
2304
  return t.innerHTML;
2111
2305
  }
2112
2306
  //#endregion
2113
2307
  //#region src/composables/useEditableTextBlock.ts
2114
- function oi(e) {
2115
- let t = N(pt, []), { syntax: n } = Ht(), r = j(() => ai(_e(ve(e(), t), n))), i = _(!1), a = _(null), { top: o, left: s } = Xe(a), { toLocal: c } = $e(), l = j(() => c({
2308
+ function pi(e) {
2309
+ let t = P(mt, []), { syntax: n } = Ut(), r = M(() => fi(ge(_e(e(), t), n))), i = _(!1), a = _(null), { top: o, left: s } = Ze(a), { toLocal: c } = et(), l = M(() => c({
2116
2310
  top: o.value - 8,
2117
2311
  left: s.value
2118
2312
  }));
@@ -2133,14 +2327,14 @@ function oi(e) {
2133
2327
  }
2134
2328
  //#endregion
2135
2329
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
2136
- var si = ["innerHTML"], ci = /* @__PURE__ */ y({
2330
+ var mi = ["innerHTML"], hi = /* @__PURE__ */ y({
2137
2331
  __name: "ParagraphBlock",
2138
2332
  props: {
2139
2333
  block: {},
2140
2334
  viewport: {}
2141
2335
  },
2142
2336
  setup(e) {
2143
- let t = e, n = C(() => import("./ParagraphEditor-Cf75UfSo.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = oi(() => t.block.content);
2337
+ let t = e, n = C(() => import("./ParagraphEditor-CkwBirNl.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = pi(() => t.block.content);
2144
2338
  return (t, l) => (f(), x("div", {
2145
2339
  ref_key: "blockRef",
2146
2340
  ref: i,
@@ -2159,58 +2353,68 @@ var si = ["innerHTML"], ci = /* @__PURE__ */ y({
2159
2353
  key: 1,
2160
2354
  class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
2161
2355
  innerHTML: k(o)
2162
- }, null, 8, si))], 544));
2356
+ }, null, 8, mi))], 544));
2163
2357
  }
2164
2358
  });
2165
2359
  //#endregion
2166
2360
  //#region src/utils/blockComponentResolver.ts
2167
- function li(e, t, n) {
2361
+ function gi(e) {
2362
+ let t = { fontFamily: e.fontFamily };
2363
+ return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
2364
+ }
2365
+ function _i(e, t, n) {
2168
2366
  if (t) {
2169
2367
  let n = t.getComponent(e);
2170
2368
  if (n) return n;
2171
2369
  }
2172
2370
  return n[e.type] ?? null;
2173
2371
  }
2174
- function ui(e) {
2372
+ function vi(e) {
2175
2373
  let { padding: t, backgroundColor: n } = e.styles, r = {
2176
2374
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
2177
2375
  backgroundColor: n || "transparent"
2178
2376
  };
2179
2377
  return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
2180
2378
  }
2181
- function di(e) {
2379
+ function yi(e) {
2182
2380
  if (e.type !== "section" || !e.wrapper) return null;
2183
2381
  let t = e.wrapper, n = {};
2184
2382
  return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
2185
2383
  }
2186
2384
  //#endregion
2187
2385
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
2188
- var fi = ["data-block-id", "data-block-type"], pi = ["aria-label"], mi = [
2386
+ var bi = [
2387
+ "data-block-id",
2388
+ "data-block-type",
2389
+ "data-tpl-picked"
2390
+ ], xi = ["aria-label"], Si = [
2189
2391
  "aria-label",
2190
2392
  "aria-pressed",
2191
2393
  "title"
2192
- ], hi = ["aria-label", "title"], gi = ["aria-label", "title"], _i = ["aria-label", "title"], vi = {
2394
+ ], Ci = ["aria-label", "title"], wi = ["aria-label", "title"], Ti = ["aria-label", "title"], Ei = {
2193
2395
  key: 1,
2194
2396
  class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
2195
- }, yi = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, bi = {
2397
+ }, Di = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Oi = {
2196
2398
  key: 2,
2197
2399
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
2198
- }, xi = ["aria-label", "title"], Si = {
2400
+ }, ki = ["aria-label", "title"], Ai = {
2199
2401
  key: 3,
2200
2402
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
2201
- }, Ci = ["aria-label"], wi = /*#__PURE__*/ Vt(/* @__PURE__ */ y({
2403
+ }, ji = ["aria-label"], Mi = /*#__PURE__*/ Ht(/* @__PURE__ */ y({
2202
2404
  __name: "BlockWrapper",
2203
2405
  props: {
2204
2406
  block: {},
2205
2407
  isSelected: { type: Boolean },
2206
2408
  viewport: {},
2207
- previewMode: { type: Boolean }
2409
+ previewMode: { type: Boolean },
2410
+ nested: { type: Boolean },
2411
+ picked: { type: Boolean }
2208
2412
  },
2209
2413
  emits: ["select"],
2210
2414
  setup(e, { emit: t }) {
2211
- let n = C(() => import("./BlockIssueBadge-BQmq1bxn.js")), r = e, a = t, { t: s, format: c } = Ft(), l = N(Mt, null), u = _(null), d = j(() => l?.liftedBlockId.value === r.block.id), m = j(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
2415
+ let n = C(() => import("./BlockIssueBadge-Dmj9rVra.js")), r = e, a = t, { t: s, format: c } = It(), l = P(Nt, null), u = _(null), d = M(() => l?.liftedBlockId.value === r.block.id), m = M(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
2212
2416
  async function h() {
2213
- await ie(), u.value?.focus();
2417
+ await re(), u.value?.focus();
2214
2418
  }
2215
2419
  function g(e) {
2216
2420
  if (l) {
@@ -2231,48 +2435,50 @@ var fi = ["data-block-id", "data-block-type"], pi = ["aria-label"], mi = [
2231
2435
  }
2232
2436
  }
2233
2437
  }
2234
- let v = j(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), y = j(() => r.previewMode === !0 && v.value), S = j(() => r.viewport ? {
2438
+ let v = M(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), y = M(() => r.previewMode === !0 && v.value), S = M(() => r.viewport ? {
2235
2439
  desktop: s.viewport.desktop,
2236
2440
  mobile: s.viewport.mobile
2237
- }[r.viewport] ?? r.viewport : ""), E = j(() => !!r.block.displayCondition), D = N(xt, null), ee = N(_t, null), A = N(kt, {}), te = j(() => !!A.savedModules), ne = j(() => A.comments?.getBlockCount(r.block.id) ?? 0), re = j(() => {
2238
- let e = ui(r.block), t = {
2441
+ }[r.viewport] ?? r.viewport : ""), E = M(() => !!r.block.displayCondition), D = P(St, null), A = P(vt, null), j = P(At, {}), ee = M(() => j.savedBlocks?.isPicking.value === !0), te = M(() => !r.nested && j.savedBlocks?.isAvailable.value === !0 && j.savedBlocks?.canCreate.value === !0), ne = M(() => r.isSelected && !ee.value), ie = M(() => j.comments?.getBlockCount(r.block.id) ?? 0), ae = M(() => {
2442
+ let e = vi(r.block), t = {
2239
2443
  padding: e.padding,
2240
2444
  backgroundColor: e.backgroundColor
2241
2445
  };
2242
2446
  return e.borderRadius && (t.borderRadius = e.borderRadius), t;
2243
- }), ae = j(() => di(r.block));
2244
- function oe(e) {
2447
+ }), oe = M(() => yi(r.block));
2448
+ function se(e) {
2245
2449
  r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
2246
2450
  }
2247
- function se() {
2248
- D?.deleteBlock(r.block.id);
2249
- }
2250
2451
  function ce() {
2251
- D?.duplicateBlock(r.block);
2452
+ D?.deleteBlock(r.block.id);
2252
2453
  }
2253
2454
  function le() {
2254
- A.savedModules?.openSaveDialog(r.block.id);
2455
+ D?.duplicateBlock(r.block);
2255
2456
  }
2256
2457
  function ue() {
2257
- ee?.toggleBlock(r.block.id);
2458
+ j.savedBlocks?.startPicking(r.block.id);
2258
2459
  }
2259
- return (t, r) => y.value ? M("", !0) : (f(), x("div", {
2460
+ function de() {
2461
+ A?.toggleBlock(r.block.id);
2462
+ }
2463
+ return (t, r) => y.value ? N("", !0) : (f(), x("div", {
2260
2464
  key: 0,
2261
2465
  class: o(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
2262
2466
  "tpl-block--selected": e.isSelected,
2263
- "tpl-block--idle": !e.isSelected,
2467
+ "tpl-block--picked": e.picked,
2468
+ "tpl-block--idle": !e.isSelected && !e.picked,
2264
2469
  "tpl-block--lifted": d.value
2265
2470
  }]),
2266
2471
  "data-block-id": e.block.id,
2267
2472
  "data-block-type": e.block.type,
2268
- onClick: oe
2473
+ "data-tpl-picked": e.picked || void 0,
2474
+ onClick: se
2269
2475
  }, [
2270
2476
  w(k(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
2271
- e.isSelected ? (f(), x("div", {
2477
+ ne.value ? (f(), x("div", {
2272
2478
  key: 0,
2273
2479
  role: "toolbar",
2274
2480
  "aria-label": k(s).blockActions.drag,
2275
- class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
2481
+ class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
2276
2482
  }, [
2277
2483
  b("button", {
2278
2484
  ref_key: "dragButtonRef",
@@ -2283,97 +2489,97 @@ var fi = ["data-block-id", "data-block-type"], pi = ["aria-label"], mi = [
2283
2489
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
2284
2490
  title: k(s).blockActions.drag,
2285
2491
  onKeydown: g
2286
- }, [w(k(Un), {
2492
+ }, [w(k(Xn), {
2287
2493
  size: 14,
2288
2494
  "stroke-width": 1.5
2289
- })], 40, mi),
2495
+ })], 40, Si),
2290
2496
  b("button", {
2291
2497
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
2292
2498
  "aria-label": k(s).blockActions.duplicate,
2293
2499
  title: k(s).blockActions.duplicate,
2294
- onClick: P(ce, ["stop"])
2295
- }, [w(k(Bn), {
2500
+ onClick: F(le, ["stop"])
2501
+ }, [w(k(qn), {
2296
2502
  size: 14,
2297
2503
  "stroke-width": 1.5
2298
- })], 8, hi),
2504
+ })], 8, Ci),
2299
2505
  te.value ? (f(), x("button", {
2300
2506
  key: 0,
2301
2507
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
2302
- "aria-label": k(s).blockActions.saveAsModule,
2303
- title: k(s).blockActions.saveAsModule,
2304
- onClick: P(le, ["stop"])
2305
- }, [w(k(Ln), {
2508
+ "aria-label": k(s).blockActions.saveAsBlock,
2509
+ title: k(s).blockActions.saveAsBlock,
2510
+ onClick: F(ue, ["stop"])
2511
+ }, [w(k(Wn), {
2306
2512
  size: 14,
2307
2513
  "stroke-width": 1.5
2308
- })], 8, gi)) : M("", !0),
2514
+ })], 8, wi)) : N("", !0),
2309
2515
  b("button", {
2310
2516
  class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
2311
2517
  "aria-label": k(s).blockActions.delete,
2312
2518
  title: k(s).blockActions.delete,
2313
- onClick: P(se, ["stop"])
2314
- }, [w(k(Rt), {
2519
+ onClick: F(ce, ["stop"])
2520
+ }, [w(k(zt), {
2315
2521
  size: 14,
2316
2522
  "stroke-width": 1.5
2317
- })], 8, _i)
2318
- ], 8, pi)) : M("", !0),
2319
- v.value ? (f(), x("div", vi, [b("span", yi, [w(k(Vn), {
2523
+ })], 8, Ti)
2524
+ ], 8, xi)) : N("", !0),
2525
+ v.value ? (f(), x("div", Ei, [b("span", Di, [w(k(Jn), {
2320
2526
  size: 12,
2321
2527
  "stroke-width": 1.5
2322
- }), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : M("", !0),
2323
- E.value && !v.value ? (f(), x("div", bi, [b("button", {
2324
- class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
2528
+ }), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : N("", !0),
2529
+ E.value && !v.value ? (f(), x("div", Oi, [b("button", {
2530
+ class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
2325
2531
  "aria-label": k(s).blockActions.conditionToggle,
2326
2532
  title: e.block.displayCondition?.label,
2327
- onClick: P(ue, ["stop"])
2328
- }, [w(k(Hn), {
2533
+ onClick: F(de, ["stop"])
2534
+ }, [w(k(Yn), {
2329
2535
  size: 12,
2330
2536
  "stroke-width": 2
2331
- })], 8, xi)])) : M("", !0),
2332
- ne.value > 0 && !v.value ? (f(), x("div", Si, [b("button", {
2333
- class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
2334
- "aria-label": k(c)(k(s).blockActions.comments, { count: String(ne.value) }),
2335
- onClick: r[0] ||= P((t) => k(A).comments?.openForBlock(e.block.id), ["stop"])
2336
- }, [w(k(Lt), {
2537
+ })], 8, ki)])) : N("", !0),
2538
+ ie.value > 0 && !v.value ? (f(), x("div", Ai, [b("button", {
2539
+ class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
2540
+ "aria-label": k(c)(k(s).blockActions.comments, { count: String(ie.value) }),
2541
+ onClick: r[0] ||= F((t) => k(j).comments?.openForBlock(e.block.id), ["stop"])
2542
+ }, [w(k(Rt), {
2337
2543
  size: 12,
2338
2544
  "stroke-width": 2.5
2339
- }), O(" " + p(ne.value), 1)], 8, Ci)])) : M("", !0),
2340
- ae.value ? (f(), x("div", {
2545
+ }), O(" " + p(ie.value), 1)], 8, ji)])) : N("", !0),
2546
+ oe.value ? (f(), x("div", {
2341
2547
  key: 4,
2342
2548
  class: "tpl-section-wrapper",
2343
- style: i(ae.value)
2549
+ style: i(oe.value)
2344
2550
  }, [b("div", {
2345
2551
  class: "tpl-block-content",
2346
- style: i(re.value)
2552
+ style: i(ae.value)
2347
2553
  }, [T(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (f(), x("div", {
2348
2554
  key: 5,
2349
2555
  class: "tpl-block-content",
2350
- style: i(re.value)
2556
+ style: i(ae.value)
2351
2557
  }, [T(t.$slots, "default", {}, void 0, !0)], 4))
2352
- ], 10, fi));
2558
+ ], 10, bi));
2353
2559
  }
2354
- }), [["__scopeId", "data-v-7d9e7893"]]);
2560
+ }), [["__scopeId", "data-v-43c10a08"]]);
2355
2561
  //#endregion
2356
2562
  //#region src/utils/unwrapParagraph.ts
2357
- function Ti(e) {
2563
+ function Ni(e) {
2358
2564
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
2359
2565
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
2360
2566
  }
2361
2567
  //#endregion
2362
2568
  //#region src/components/blocks/TitleBlock.vue
2363
- var Ei = /* @__PURE__ */ y({
2569
+ var Pi = /* @__PURE__ */ y({
2364
2570
  __name: "TitleBlock",
2365
2571
  props: {
2366
2572
  block: {},
2367
2573
  viewport: {}
2368
2574
  },
2369
2575
  setup(e) {
2370
- let t = e, n = C(() => import("./TitleEditor-CCUkbRN0.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = oi(() => t.block.content), u = j(() => {
2576
+ let t = e, n = C(() => import("./TitleEditor-Bhgzh-iQ.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = pi(() => t.block.content), u = M(() => {
2371
2577
  let e = {
2372
2578
  fontSize: `${Ie[t.block.level]}px`,
2373
2579
  textAlign: t.block.textAlign
2374
2580
  };
2375
2581
  return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
2376
- }), p = j(() => `h${t.block.level}`), m = j(() => Ti(s.value));
2582
+ }), p = M(() => `h${t.block.level}`), m = M(() => Ni(s.value));
2377
2583
  return (t, s) => (f(), x("div", {
2378
2584
  ref_key: "blockRef",
2379
2585
  ref: a,
@@ -2399,88 +2605,88 @@ var Ei = /* @__PURE__ */ y({
2399
2605
  });
2400
2606
  //#endregion
2401
2607
  //#region src/utils/sectionColumnDrop.ts
2402
- function Di(e) {
2608
+ function Fi(e) {
2403
2609
  return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
2404
2610
  }
2405
2611
  //#endregion
2406
2612
  //#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
2407
- var Oi = Object.defineProperty, ki = Object.getOwnPropertySymbols, Ai = Object.prototype.hasOwnProperty, ji = Object.prototype.propertyIsEnumerable, Mi = (e, t, n) => t in e ? Oi(e, t, {
2613
+ var Ii = Object.defineProperty, Li = Object.getOwnPropertySymbols, Ri = Object.prototype.hasOwnProperty, zi = Object.prototype.propertyIsEnumerable, Bi = (e, t, n) => t in e ? Ii(e, t, {
2408
2614
  enumerable: !0,
2409
2615
  configurable: !0,
2410
2616
  writable: !0,
2411
2617
  value: n
2412
- }) : e[t] = n, Ni = (e, t) => {
2413
- for (var n in t ||= {}) Ai.call(t, n) && Mi(e, n, t[n]);
2414
- if (ki) for (var n of ki(t)) ji.call(t, n) && Mi(e, n, t[n]);
2618
+ }) : e[t] = n, Vi = (e, t) => {
2619
+ for (var n in t ||= {}) Ri.call(t, n) && Bi(e, n, t[n]);
2620
+ if (Li) for (var n of Li(t)) zi.call(t, n) && Bi(e, n, t[n]);
2415
2621
  return e;
2416
- }, Pi = (e, t) => {
2622
+ }, Hi = (e, t) => {
2417
2623
  var n = {};
2418
- for (var r in e) Ai.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2419
- if (e != null && ki) for (var r of ki(e)) t.indexOf(r) < 0 && ji.call(e, r) && (n[r] = e[r]);
2624
+ for (var r in e) Ri.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2625
+ if (e != null && Li) for (var r of Li(e)) t.indexOf(r) < 0 && zi.call(e, r) && (n[r] = e[r]);
2420
2626
  return n;
2421
- }, Fi = "[vue-draggable-plus]: ";
2422
- function Ii(e) {
2423
- console.warn(Fi + e);
2627
+ }, Ui = "[vue-draggable-plus]: ";
2628
+ function Wi(e) {
2629
+ console.warn(Ui + e);
2424
2630
  }
2425
- function Li(e) {
2426
- console.error(Fi + e);
2631
+ function Gi(e) {
2632
+ console.error(Ui + e);
2427
2633
  }
2428
- function Ri(e, t, n) {
2634
+ function Ki(e, t, n) {
2429
2635
  return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
2430
2636
  }
2431
- function zi(e) {
2637
+ function qi(e) {
2432
2638
  return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
2433
2639
  }
2434
- function Bi(e) {
2435
- return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[zi(n)] = e[n]), t), {});
2640
+ function Ji(e) {
2641
+ return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[qi(n)] = e[n]), t), {});
2436
2642
  }
2437
- function Vi(e, t) {
2643
+ function Yi(e, t) {
2438
2644
  return Array.isArray(e) && e.splice(t, 1), e;
2439
2645
  }
2440
- function Hi(e, t, n) {
2646
+ function Xi(e, t, n) {
2441
2647
  return Array.isArray(e) && e.splice(t, 0, n), e;
2442
2648
  }
2443
- function Ui(e) {
2649
+ function Zi(e) {
2444
2650
  return e === void 0;
2445
2651
  }
2446
- function Wi(e) {
2652
+ function Qi(e) {
2447
2653
  return typeof e == "string";
2448
2654
  }
2449
- function Gi(e, t, n) {
2655
+ function $i(e, t, n) {
2450
2656
  let r = e.children[n];
2451
2657
  e.insertBefore(t, r);
2452
2658
  }
2453
- function Ki(e) {
2659
+ function ea(e) {
2454
2660
  e.parentNode && e.parentNode.removeChild(e);
2455
2661
  }
2456
- function qi(e, t = document) {
2662
+ function ta(e, t = document) {
2457
2663
  let n = null;
2458
- return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Ii(`Element not found: ${e}`), n;
2664
+ return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Wi(`Element not found: ${e}`), n;
2459
2665
  }
2460
- function Ji(e, t, n = null) {
2666
+ function na(e, t, n = null) {
2461
2667
  return function(...r) {
2462
2668
  return e.apply(n, r), t.apply(n, r);
2463
2669
  };
2464
2670
  }
2465
- function Yi(e, t) {
2466
- let n = Ni({}, e);
2671
+ function ra(e, t) {
2672
+ let n = Vi({}, e);
2467
2673
  return Object.keys(t).forEach((r) => {
2468
- n[r] ? n[r] = Ji(e[r], t[r]) : n[r] = t[r];
2674
+ n[r] ? n[r] = na(e[r], t[r]) : n[r] = t[r];
2469
2675
  }), n;
2470
2676
  }
2471
- function Xi(e) {
2677
+ function ia(e) {
2472
2678
  return e instanceof HTMLElement;
2473
2679
  }
2474
- function Zi(e, t) {
2680
+ function aa(e, t) {
2475
2681
  Object.keys(e).forEach((n) => {
2476
2682
  t(n, e[n]);
2477
2683
  });
2478
2684
  }
2479
- function Qi(e) {
2685
+ function oa(e) {
2480
2686
  return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
2481
2687
  }
2482
- var $i = Object.assign;
2483
- function ea(e, t) {
2688
+ var sa = Object.assign;
2689
+ function ca(e, t) {
2484
2690
  var n = Object.keys(e);
2485
2691
  if (Object.getOwnPropertySymbols) {
2486
2692
  var r = Object.getOwnPropertySymbols(e);
@@ -2490,26 +2696,26 @@ function ea(e, t) {
2490
2696
  }
2491
2697
  return n;
2492
2698
  }
2493
- function ta(e) {
2699
+ function la(e) {
2494
2700
  for (var t = 1; t < arguments.length; t++) {
2495
2701
  var n = arguments[t] == null ? {} : arguments[t];
2496
- t % 2 ? ea(Object(n), !0).forEach(function(t) {
2497
- ra(e, t, n[t]);
2498
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ea(Object(n)).forEach(function(t) {
2702
+ t % 2 ? ca(Object(n), !0).forEach(function(t) {
2703
+ da(e, t, n[t]);
2704
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ca(Object(n)).forEach(function(t) {
2499
2705
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
2500
2706
  });
2501
2707
  }
2502
2708
  return e;
2503
2709
  }
2504
- function na(e) {
2710
+ function ua(e) {
2505
2711
  "@babel/helpers - typeof";
2506
- return na = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2712
+ return ua = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2507
2713
  return typeof e;
2508
2714
  } : function(e) {
2509
2715
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2510
- }, na(e);
2716
+ }, ua(e);
2511
2717
  }
2512
- function ra(e, t, n) {
2718
+ function da(e, t, n) {
2513
2719
  return t in e ? Object.defineProperty(e, t, {
2514
2720
  value: n,
2515
2721
  enumerable: !0,
@@ -2517,45 +2723,45 @@ function ra(e, t, n) {
2517
2723
  writable: !0
2518
2724
  }) : e[t] = n, e;
2519
2725
  }
2520
- function ia() {
2521
- return ia = Object.assign || function(e) {
2726
+ function fa() {
2727
+ return fa = Object.assign || function(e) {
2522
2728
  for (var t = 1; t < arguments.length; t++) {
2523
2729
  var n = arguments[t];
2524
2730
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2525
2731
  }
2526
2732
  return e;
2527
- }, ia.apply(this, arguments);
2733
+ }, fa.apply(this, arguments);
2528
2734
  }
2529
- function aa(e, t) {
2735
+ function pa(e, t) {
2530
2736
  if (e == null) return {};
2531
2737
  var n = {}, r = Object.keys(e), i, a;
2532
2738
  for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
2533
2739
  return n;
2534
2740
  }
2535
- function oa(e, t) {
2741
+ function ma(e, t) {
2536
2742
  if (e == null) return {};
2537
- var n = aa(e, t), r, i;
2743
+ var n = pa(e, t), r, i;
2538
2744
  if (Object.getOwnPropertySymbols) {
2539
2745
  var a = Object.getOwnPropertySymbols(e);
2540
2746
  for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
2541
2747
  }
2542
2748
  return n;
2543
2749
  }
2544
- var sa = "1.15.2";
2545
- function ca(e) {
2750
+ var ha = "1.15.2";
2751
+ function ga(e) {
2546
2752
  if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
2547
2753
  }
2548
- var la = ca(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ua = ca(/Edge/i), da = ca(/firefox/i), fa = ca(/safari/i) && !ca(/chrome/i) && !ca(/android/i), pa = ca(/iP(ad|od|hone)/i), ma = ca(/chrome/i) && ca(/android/i), ha = {
2754
+ var _a = ga(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), va = ga(/Edge/i), ya = ga(/firefox/i), ba = ga(/safari/i) && !ga(/chrome/i) && !ga(/android/i), xa = ga(/iP(ad|od|hone)/i), Sa = ga(/chrome/i) && ga(/android/i), Ca = {
2549
2755
  capture: !1,
2550
2756
  passive: !1
2551
2757
  };
2552
- function I(e, t, n) {
2553
- e.addEventListener(t, n, !la && ha);
2554
- }
2555
2758
  function L(e, t, n) {
2556
- e.removeEventListener(t, n, !la && ha);
2759
+ e.addEventListener(t, n, !_a && Ca);
2760
+ }
2761
+ function R(e, t, n) {
2762
+ e.removeEventListener(t, n, !_a && Ca);
2557
2763
  }
2558
- function ga(e, t) {
2764
+ function wa(e, t) {
2559
2765
  if (t) {
2560
2766
  if (t[0] === ">" && (t = t.substring(1)), e) try {
2561
2767
  if (e.matches) return e.matches(t);
@@ -2567,41 +2773,41 @@ function ga(e, t) {
2567
2773
  return !1;
2568
2774
  }
2569
2775
  }
2570
- function _a(e) {
2776
+ function Ta(e) {
2571
2777
  return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
2572
2778
  }
2573
- function va(e, t, n, r) {
2779
+ function Ea(e, t, n, r) {
2574
2780
  if (e) {
2575
2781
  n ||= document;
2576
2782
  do {
2577
- if (t != null && (t[0] === ">" ? e.parentNode === n && ga(e, t) : ga(e, t)) || r && e === n) return e;
2783
+ if (t != null && (t[0] === ">" ? e.parentNode === n && wa(e, t) : wa(e, t)) || r && e === n) return e;
2578
2784
  if (e === n) break;
2579
- } while (e = _a(e));
2785
+ } while (e = Ta(e));
2580
2786
  }
2581
2787
  return null;
2582
2788
  }
2583
- var ya = /\s+/g;
2584
- function R(e, t, n) {
2585
- e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ya, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ya, " "));
2586
- }
2789
+ var Da = /\s+/g;
2587
2790
  function z(e, t, n) {
2791
+ e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Da, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Da, " "));
2792
+ }
2793
+ function B(e, t, n) {
2588
2794
  var r = e && e.style;
2589
2795
  if (r) {
2590
2796
  if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
2591
2797
  !(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
2592
2798
  }
2593
2799
  }
2594
- function ba(e, t) {
2800
+ function Oa(e, t) {
2595
2801
  var n = "";
2596
2802
  if (typeof e == "string") n = e;
2597
2803
  else do {
2598
- var r = z(e, "transform");
2804
+ var r = B(e, "transform");
2599
2805
  r && r !== "none" && (n = r + " " + n);
2600
2806
  } while (!t && (e = e.parentNode));
2601
2807
  var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
2602
2808
  return i && new i(n);
2603
2809
  }
2604
- function xa(e, t, n) {
2810
+ function ka(e, t, n) {
2605
2811
  if (e) {
2606
2812
  var r = e.getElementsByTagName(t), i = 0, a = r.length;
2607
2813
  if (n) for (; i < a; i++) n(r[i], i);
@@ -2609,21 +2815,21 @@ function xa(e, t, n) {
2609
2815
  }
2610
2816
  return [];
2611
2817
  }
2612
- function Sa() {
2818
+ function Aa() {
2613
2819
  return document.scrollingElement || document.documentElement;
2614
2820
  }
2615
- function B(e, t, n, r, i) {
2821
+ function V(e, t, n, r, i) {
2616
2822
  if (!(!e.getBoundingClientRect && e !== window)) {
2617
2823
  var a, o, s, c, l, u, d;
2618
- if (e !== window && e.parentNode && e !== Sa() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !la)) do
2619
- if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
2824
+ if (e !== window && e.parentNode && e !== Aa() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !_a)) do
2825
+ if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
2620
2826
  var f = i.getBoundingClientRect();
2621
- o -= f.top + parseInt(z(i, "border-top-width")), s -= f.left + parseInt(z(i, "border-left-width")), c = o + a.height, l = s + a.width;
2827
+ o -= f.top + parseInt(B(i, "border-top-width")), s -= f.left + parseInt(B(i, "border-left-width")), c = o + a.height, l = s + a.width;
2622
2828
  break;
2623
2829
  }
2624
2830
  while (i = i.parentNode);
2625
2831
  if (r && e !== window) {
2626
- var p = ba(i || e), m = p && p.a, h = p && p.d;
2832
+ var p = Oa(i || e), m = p && p.a, h = p && p.d;
2627
2833
  p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
2628
2834
  }
2629
2835
  return {
@@ -2636,18 +2842,18 @@ function B(e, t, n, r, i) {
2636
2842
  };
2637
2843
  }
2638
2844
  }
2639
- function Ca(e, t, n) {
2640
- for (var r = ka(e, !0), i = B(e)[t]; r;) {
2641
- var a = B(r)[n], o = void 0;
2845
+ function ja(e, t, n) {
2846
+ for (var r = La(e, !0), i = V(e)[t]; r;) {
2847
+ var a = V(r)[n], o = void 0;
2642
2848
  if (o = i >= a, !o) return r;
2643
- if (r === Sa()) break;
2644
- r = ka(r, !1);
2849
+ if (r === Aa()) break;
2850
+ r = La(r, !1);
2645
2851
  }
2646
2852
  return !1;
2647
2853
  }
2648
- function wa(e, t, n, r) {
2854
+ function Ma(e, t, n, r) {
2649
2855
  for (var i = 0, a = 0, o = e.children; a < o.length;) {
2650
- if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && va(o[a], n.draggable, e, !1)) {
2856
+ if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ea(o[a], n.draggable, e, !1)) {
2651
2857
  if (i === t) return o[a];
2652
2858
  i++;
2653
2859
  }
@@ -2655,96 +2861,96 @@ function wa(e, t, n, r) {
2655
2861
  }
2656
2862
  return null;
2657
2863
  }
2658
- function Ta(e, t) {
2659
- for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !ga(n, t));) n = n.previousElementSibling;
2864
+ function Na(e, t) {
2865
+ for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !wa(n, t));) n = n.previousElementSibling;
2660
2866
  return n || null;
2661
2867
  }
2662
- function Ea(e, t) {
2868
+ function Pa(e, t) {
2663
2869
  var n = 0;
2664
2870
  if (!e || !e.parentNode) return -1;
2665
- for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ga(e, t)) && n++;
2871
+ for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || wa(e, t)) && n++;
2666
2872
  return n;
2667
2873
  }
2668
- function Da(e) {
2669
- var t = 0, n = 0, r = Sa();
2874
+ function Fa(e) {
2875
+ var t = 0, n = 0, r = Aa();
2670
2876
  if (e) do {
2671
- var i = ba(e), a = i.a, o = i.d;
2877
+ var i = Oa(e), a = i.a, o = i.d;
2672
2878
  t += e.scrollLeft * a, n += e.scrollTop * o;
2673
2879
  } while (e !== r && (e = e.parentNode));
2674
2880
  return [t, n];
2675
2881
  }
2676
- function Oa(e, t) {
2882
+ function Ia(e, t) {
2677
2883
  for (var n in e) if (e.hasOwnProperty(n)) {
2678
2884
  for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
2679
2885
  }
2680
2886
  return -1;
2681
2887
  }
2682
- function ka(e, t) {
2683
- if (!e || !e.getBoundingClientRect) return Sa();
2888
+ function La(e, t) {
2889
+ if (!e || !e.getBoundingClientRect) return Aa();
2684
2890
  var n = e, r = !1;
2685
2891
  do
2686
2892
  if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
2687
- var i = z(n);
2893
+ var i = B(n);
2688
2894
  if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
2689
- if (!n.getBoundingClientRect || n === document.body) return Sa();
2895
+ if (!n.getBoundingClientRect || n === document.body) return Aa();
2690
2896
  if (r || t) return n;
2691
2897
  r = !0;
2692
2898
  }
2693
2899
  }
2694
2900
  while (n = n.parentNode);
2695
- return Sa();
2901
+ return Aa();
2696
2902
  }
2697
- function Aa(e, t) {
2903
+ function Ra(e, t) {
2698
2904
  if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
2699
2905
  return e;
2700
2906
  }
2701
- function ja(e, t) {
2907
+ function za(e, t) {
2702
2908
  return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
2703
2909
  }
2704
- var Ma;
2705
- function Na(e, t) {
2910
+ var Ba;
2911
+ function Va(e, t) {
2706
2912
  return function() {
2707
- if (!Ma) {
2913
+ if (!Ba) {
2708
2914
  var n = arguments, r = this;
2709
- n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ma = setTimeout(function() {
2710
- Ma = void 0;
2915
+ n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ba = setTimeout(function() {
2916
+ Ba = void 0;
2711
2917
  }, t);
2712
2918
  }
2713
2919
  };
2714
2920
  }
2715
- function Pa() {
2716
- clearTimeout(Ma), Ma = void 0;
2921
+ function Ha() {
2922
+ clearTimeout(Ba), Ba = void 0;
2717
2923
  }
2718
- function Fa(e, t, n) {
2924
+ function Ua(e, t, n) {
2719
2925
  e.scrollLeft += t, e.scrollTop += n;
2720
2926
  }
2721
- function Ia(e) {
2927
+ function Wa(e) {
2722
2928
  var t = window.Polymer, n = window.jQuery || window.Zepto;
2723
2929
  return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
2724
2930
  }
2725
- function La(e, t, n) {
2931
+ function Ga(e, t, n) {
2726
2932
  var r = {};
2727
2933
  return Array.from(e.children).forEach(function(i) {
2728
- if (!(!va(i, t.draggable, e, !1) || i.animated || i === n)) {
2729
- var a = B(i);
2934
+ if (!(!Ea(i, t.draggable, e, !1) || i.animated || i === n)) {
2935
+ var a = V(i);
2730
2936
  r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
2731
2937
  }
2732
2938
  }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
2733
2939
  }
2734
- var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
2735
- function Ra() {
2940
+ var H = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
2941
+ function Ka() {
2736
2942
  var e = [], t;
2737
2943
  return {
2738
2944
  captureAnimationState: function() {
2739
2945
  e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
2740
- if (!(z(t, "display") === "none" || t === Q.ghost)) {
2946
+ if (!(B(t, "display") === "none" || t === Q.ghost)) {
2741
2947
  e.push({
2742
2948
  target: t,
2743
- rect: B(t)
2949
+ rect: V(t)
2744
2950
  });
2745
- var n = ta({}, e[e.length - 1].rect);
2951
+ var n = la({}, e[e.length - 1].rect);
2746
2952
  if (t.thisAnimationDuration) {
2747
- var r = ba(t, !0);
2953
+ var r = Oa(t, !0);
2748
2954
  r && (n.top -= r.f, n.left -= r.e);
2749
2955
  }
2750
2956
  t.fromRect = n;
@@ -2755,7 +2961,7 @@ function Ra() {
2755
2961
  e.push(t);
2756
2962
  },
2757
2963
  removeAnimationState: function(t) {
2758
- e.splice(Oa(e, { target: t }), 1);
2964
+ e.splice(Ia(e, { target: t }), 1);
2759
2965
  },
2760
2966
  animateAll: function(n) {
2761
2967
  var r = this;
@@ -2765,8 +2971,8 @@ function Ra() {
2765
2971
  }
2766
2972
  var i = !1, a = 0;
2767
2973
  e.forEach(function(e) {
2768
- var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = ba(n, !0);
2769
- d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ja(c, s) && !ja(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ba(u, c, l, r.options)), ja(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
2974
+ var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Oa(n, !0);
2975
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && za(c, s) && !za(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ja(u, c, l, r.options)), za(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
2770
2976
  n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
2771
2977
  }, t), n.thisAnimationDuration = t);
2772
2978
  }), clearTimeout(t), i ? t = setTimeout(function() {
@@ -2775,27 +2981,27 @@ function Ra() {
2775
2981
  },
2776
2982
  animate: function(e, t, n, r) {
2777
2983
  if (r) {
2778
- z(e, "transition", ""), z(e, "transform", "");
2779
- var i = ba(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2780
- e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = za(e), z(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), z(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
2781
- z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2984
+ B(e, "transition", ""), B(e, "transform", "");
2985
+ var i = Oa(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2986
+ e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = qa(e), B(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), B(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
2987
+ B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2782
2988
  }, r);
2783
2989
  }
2784
2990
  }
2785
2991
  };
2786
2992
  }
2787
- function za(e) {
2993
+ function qa(e) {
2788
2994
  return e.offsetWidth;
2789
2995
  }
2790
- function Ba(e, t, n, r) {
2996
+ function Ja(e, t, n, r) {
2791
2997
  return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
2792
2998
  }
2793
- var Va = [], Ha = { initializeByDefault: !0 }, Ua = {
2999
+ var Ya = [], Xa = { initializeByDefault: !0 }, Za = {
2794
3000
  mount: function(e) {
2795
- for (var t in Ha) Ha.hasOwnProperty(t) && !(t in e) && (e[t] = Ha[t]);
2796
- Va.forEach(function(t) {
3001
+ for (var t in Xa) Xa.hasOwnProperty(t) && !(t in e) && (e[t] = Xa[t]);
3002
+ Ya.forEach(function(t) {
2797
3003
  if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
2798
- }), Va.push(e);
3004
+ }), Ya.push(e);
2799
3005
  },
2800
3006
  pluginEvent: function(e, t, n) {
2801
3007
  var r = this;
@@ -2803,16 +3009,16 @@ var Va = [], Ha = { initializeByDefault: !0 }, Ua = {
2803
3009
  r.eventCanceled = !0;
2804
3010
  };
2805
3011
  var i = e + "Global";
2806
- Va.forEach(function(r) {
2807
- t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ta({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ta({ sortable: t }, n)));
3012
+ Ya.forEach(function(r) {
3013
+ t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](la({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](la({ sortable: t }, n)));
2808
3014
  });
2809
3015
  },
2810
3016
  initializePlugins: function(e, t, n, r) {
2811
- for (var i in Va.forEach(function(r) {
3017
+ for (var i in Ya.forEach(function(r) {
2812
3018
  var i = r.pluginName;
2813
3019
  if (!(!e.options[i] && !r.initializeByDefault)) {
2814
3020
  var a = new r(e, t, e.options);
2815
- a.sortable = e, a.options = e.options, e[i] = a, ia(n, a.defaults);
3021
+ a.sortable = e, a.options = e.options, e[i] = a, fa(n, a.defaults);
2816
3022
  }
2817
3023
  }), e.options) if (e.options.hasOwnProperty(i)) {
2818
3024
  var a = this.modifyOption(e, i, e.options[i]);
@@ -2821,59 +3027,59 @@ var Va = [], Ha = { initializeByDefault: !0 }, Ua = {
2821
3027
  },
2822
3028
  getEventProperties: function(e, t) {
2823
3029
  var n = {};
2824
- return Va.forEach(function(r) {
2825
- typeof r.eventProperties == "function" && ia(n, r.eventProperties.call(t[r.pluginName], e));
3030
+ return Ya.forEach(function(r) {
3031
+ typeof r.eventProperties == "function" && fa(n, r.eventProperties.call(t[r.pluginName], e));
2826
3032
  }), n;
2827
3033
  },
2828
3034
  modifyOption: function(e, t, n) {
2829
3035
  var r;
2830
- return Va.forEach(function(i) {
3036
+ return Ya.forEach(function(i) {
2831
3037
  e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
2832
3038
  }), r;
2833
3039
  }
2834
3040
  };
2835
- function Wa(e) {
3041
+ function Qa(e) {
2836
3042
  var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
2837
- if (t ||= n && n[V], t) {
3043
+ if (t ||= n && n[H], t) {
2838
3044
  var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
2839
- window.CustomEvent && !la && !ua ? h = new CustomEvent(r, {
3045
+ window.CustomEvent && !_a && !va ? h = new CustomEvent(r, {
2840
3046
  bubbles: !0,
2841
3047
  cancelable: !0
2842
3048
  }) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
2843
- var v = ta(ta({}, m), Ua.getEventProperties(r, t));
3049
+ var v = la(la({}, m), Za.getEventProperties(r, t));
2844
3050
  for (var y in v) h[y] = v[y];
2845
3051
  n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
2846
3052
  }
2847
3053
  }
2848
- var Ga = ["evt"], H = function(e, t) {
2849
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = oa(n, Ga);
2850
- Ua.pluginEvent.bind(Q)(e, t, ta({
2851
- dragEl: W,
2852
- parentEl: G,
2853
- ghostEl: K,
2854
- rootEl: q,
2855
- nextEl: Ka,
2856
- lastDownEl: qa,
2857
- cloneEl: J,
2858
- cloneHidden: Ja,
2859
- dragStarted: co,
3054
+ var $a = ["evt"], U = function(e, t) {
3055
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ma(n, $a);
3056
+ Za.pluginEvent.bind(Q)(e, t, la({
3057
+ dragEl: G,
3058
+ parentEl: K,
3059
+ ghostEl: q,
3060
+ rootEl: J,
3061
+ nextEl: eo,
3062
+ lastDownEl: to,
3063
+ cloneEl: Y,
3064
+ cloneHidden: no,
3065
+ dragStarted: vo,
2860
3066
  putSortable: X,
2861
3067
  activeSortable: Q.active,
2862
3068
  originalEvent: r,
2863
- oldIndex: Ya,
2864
- oldDraggableIndex: Xa,
2865
- newIndex: Y,
2866
- newDraggableIndex: Za,
2867
- hideGhostForTarget: Do,
2868
- unhideGhostForTarget: Oo,
3069
+ oldIndex: ro,
3070
+ oldDraggableIndex: ao,
3071
+ newIndex: io,
3072
+ newDraggableIndex: oo,
3073
+ hideGhostForTarget: Io,
3074
+ unhideGhostForTarget: Lo,
2869
3075
  cloneNowHidden: function() {
2870
- Ja = !0;
3076
+ no = !0;
2871
3077
  },
2872
3078
  cloneNowShown: function() {
2873
- Ja = !1;
3079
+ no = !1;
2874
3080
  },
2875
3081
  dispatchSortableEvent: function(e) {
2876
- U({
3082
+ W({
2877
3083
  sortable: t,
2878
3084
  name: e,
2879
3085
  originalEvent: r
@@ -2881,46 +3087,46 @@ var Ga = ["evt"], H = function(e, t) {
2881
3087
  }
2882
3088
  }, i));
2883
3089
  };
2884
- function U(e) {
2885
- Wa(ta({
3090
+ function W(e) {
3091
+ Qa(la({
2886
3092
  putSortable: X,
2887
- cloneEl: J,
2888
- targetEl: W,
2889
- rootEl: q,
2890
- oldIndex: Ya,
2891
- oldDraggableIndex: Xa,
2892
- newIndex: Y,
2893
- newDraggableIndex: Za
3093
+ cloneEl: Y,
3094
+ targetEl: G,
3095
+ rootEl: J,
3096
+ oldIndex: ro,
3097
+ oldDraggableIndex: ao,
3098
+ newIndex: io,
3099
+ newDraggableIndex: oo
2894
3100
  }, e));
2895
3101
  }
2896
- var W, G, K, q, Ka, qa, J, Ja, Ya, Y, Xa, Za, Qa, X, $a = !1, eo = !1, to = [], no, ro, io, ao, oo, so, co, lo, uo, fo = !1, po = !1, mo, Z, ho = [], go = !1, _o = [], vo = typeof document < "u", yo = pa, bo = ua || la ? "cssFloat" : "float", xo = vo && !ma && !pa && "draggable" in document.createElement("div"), So = function() {
2897
- if (vo) {
2898
- if (la) return !1;
3102
+ var G, K, q, J, eo, to, Y, no, ro, io, ao, oo, so, X, co = !1, lo = !1, uo = [], fo, po, mo, ho, go, _o, vo, yo, bo, xo = !1, So = !1, Co, Z, wo = [], To = !1, Eo = [], Do = typeof document < "u", Oo = xa, ko = va || _a ? "cssFloat" : "float", Ao = Do && !Sa && !xa && "draggable" in document.createElement("div"), jo = function() {
3103
+ if (Do) {
3104
+ if (_a) return !1;
2899
3105
  var e = document.createElement("x");
2900
3106
  return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
2901
3107
  }
2902
- }(), Co = function(e, t) {
2903
- var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = wa(e, 0, t), a = wa(e, 1, t), o = i && z(i), s = a && z(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + B(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + B(a).width;
3108
+ }(), Mo = function(e, t) {
3109
+ var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ma(e, 0, t), a = Ma(e, 1, t), o = i && B(i), s = a && B(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + V(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + V(a).width;
2904
3110
  if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
2905
3111
  if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
2906
3112
  if (i && o.float && o.float !== "none") {
2907
3113
  var u = o.float === "left" ? "left" : "right";
2908
3114
  return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
2909
3115
  }
2910
- return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[bo] === "none" || a && n[bo] === "none" && c + l > r) ? "vertical" : "horizontal";
2911
- }, wo = function(e, t, n) {
3116
+ return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ko] === "none" || a && n[ko] === "none" && c + l > r) ? "vertical" : "horizontal";
3117
+ }, No = function(e, t, n) {
2912
3118
  var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
2913
3119
  return r === o || i === s || r + a / 2 === o + c / 2;
2914
- }, To = function(e, t) {
3120
+ }, Po = function(e, t) {
2915
3121
  var n;
2916
- return to.some(function(r) {
2917
- var i = r[V].options.emptyInsertThreshold;
2918
- if (!(!i || Ta(r))) {
2919
- var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
3122
+ return uo.some(function(r) {
3123
+ var i = r[H].options.emptyInsertThreshold;
3124
+ if (!(!i || Na(r))) {
3125
+ var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
2920
3126
  if (o && s) return n = r;
2921
3127
  }
2922
3128
  }), n;
2923
- }, Eo = function(e) {
3129
+ }, Fo = function(e) {
2924
3130
  function t(e, n) {
2925
3131
  return function(r, i, a, o) {
2926
3132
  var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
@@ -2933,31 +3139,31 @@ var W, G, K, q, Ka, qa, J, Ja, Ya, Y, Xa, Za, Qa, X, $a = !1, eo = !1, to = [],
2933
3139
  };
2934
3140
  }
2935
3141
  var n = {}, r = e.group;
2936
- (!r || na(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
2937
- }, Do = function() {
2938
- !So && K && z(K, "display", "none");
2939
- }, Oo = function() {
2940
- !So && K && z(K, "display", "");
3142
+ (!r || ua(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
3143
+ }, Io = function() {
3144
+ !jo && q && B(q, "display", "none");
3145
+ }, Lo = function() {
3146
+ !jo && q && B(q, "display", "");
2941
3147
  };
2942
- vo && !ma && document.addEventListener("click", function(e) {
2943
- if (eo) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), eo = !1, !1;
3148
+ Do && !Sa && document.addEventListener("click", function(e) {
3149
+ if (lo) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), lo = !1, !1;
2944
3150
  }, !0);
2945
- var ko = function(e) {
2946
- if (W) {
3151
+ var Ro = function(e) {
3152
+ if (G) {
2947
3153
  e = e.touches ? e.touches[0] : e;
2948
- var t = To(e.clientX, e.clientY);
3154
+ var t = Po(e.clientX, e.clientY);
2949
3155
  if (t) {
2950
3156
  var n = {};
2951
3157
  for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
2952
- n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
3158
+ n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[H]._onDragOver(n);
2953
3159
  }
2954
3160
  }
2955
- }, Ao = function(e) {
2956
- W && W.parentNode[V]._isOutsideThisEl(e.target);
3161
+ }, zo = function(e) {
3162
+ G && G.parentNode[H]._isOutsideThisEl(e.target);
2957
3163
  };
2958
3164
  function Q(e, t) {
2959
3165
  if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
2960
- this.el = e, this.options = t = ia({}, t), e[V] = this;
3166
+ this.el = e, this.options = t = fa({}, t), e[H] = this;
2961
3167
  var n = {
2962
3168
  group: null,
2963
3169
  sort: !0,
@@ -2970,7 +3176,7 @@ function Q(e, t) {
2970
3176
  invertedSwapThreshold: null,
2971
3177
  removeCloneOnHide: !0,
2972
3178
  direction: function() {
2973
- return Co(e, this.options);
3179
+ return Mo(e, this.options);
2974
3180
  },
2975
3181
  ghostClass: "sortable-ghost",
2976
3182
  chosenClass: "sortable-chosen",
@@ -2997,80 +3203,80 @@ function Q(e, t) {
2997
3203
  x: 0,
2998
3204
  y: 0
2999
3205
  },
3000
- supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !fa,
3206
+ supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ba,
3001
3207
  emptyInsertThreshold: 5
3002
3208
  };
3003
- for (var r in Ua.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
3004
- for (var i in Eo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
3005
- this.nativeDraggable = !t.forceFallback && xo, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? I(e, "pointerdown", this._onTapStart) : (I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart)), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), to.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ia(this, Ra());
3209
+ for (var r in Za.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
3210
+ for (var i in Fo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
3211
+ this.nativeDraggable = !t.forceFallback && Ao, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), uo.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), fa(this, Ka());
3006
3212
  }
3007
3213
  Q.prototype = {
3008
3214
  constructor: Q,
3009
3215
  _isOutsideThisEl: function(e) {
3010
- !this.el.contains(e) && e !== this.el && (lo = null);
3216
+ !this.el.contains(e) && e !== this.el && (yo = null);
3011
3217
  },
3012
3218
  _getDirection: function(e, t) {
3013
- return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
3219
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
3014
3220
  },
3015
3221
  _onTapStart: function(e) {
3016
3222
  if (e.cancelable) {
3017
3223
  var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
3018
- if (Bo(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && fa && s && s.tagName.toUpperCase() === "SELECT") && (s = va(s, r.draggable, n, !1), !(s && s.animated) && qa !== s)) {
3019
- if (Ya = Ea(s), Xa = Ea(s, r.draggable), typeof l == "function") {
3224
+ if (Yo(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ba && s && s.tagName.toUpperCase() === "SELECT") && (s = Ea(s, r.draggable, n, !1), !(s && s.animated) && to !== s)) {
3225
+ if (ro = Pa(s), ao = Pa(s, r.draggable), typeof l == "function") {
3020
3226
  if (l.call(this, e, s, this)) {
3021
- U({
3227
+ W({
3022
3228
  sortable: t,
3023
3229
  rootEl: c,
3024
3230
  name: "filter",
3025
3231
  targetEl: s,
3026
3232
  toEl: n,
3027
3233
  fromEl: n
3028
- }), H("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
3234
+ }), U("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
3029
3235
  return;
3030
3236
  }
3031
3237
  } else if (l && (l = l.split(",").some(function(r) {
3032
- if (r = va(c, r.trim(), n, !1), r) return U({
3238
+ if (r = Ea(c, r.trim(), n, !1), r) return W({
3033
3239
  sortable: t,
3034
3240
  rootEl: r,
3035
3241
  name: "filter",
3036
3242
  targetEl: s,
3037
3243
  fromEl: n,
3038
3244
  toEl: n
3039
- }), H("filter", t, { evt: e }), !0;
3245
+ }), U("filter", t, { evt: e }), !0;
3040
3246
  }), l)) {
3041
3247
  i && e.cancelable && e.preventDefault();
3042
3248
  return;
3043
3249
  }
3044
- r.handle && !va(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
3250
+ r.handle && !Ea(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
3045
3251
  }
3046
3252
  }
3047
3253
  },
3048
3254
  _prepareDragStart: function(e, t, n) {
3049
3255
  var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
3050
- if (n && !W && n.parentNode === i) {
3051
- var c = B(n);
3052
- if (q = i, W = n, G = W.parentNode, Ka = W.nextSibling, qa = n, Qa = a.group, Q.dragged = W, no = {
3053
- target: W,
3256
+ if (n && !G && n.parentNode === i) {
3257
+ var c = V(n);
3258
+ if (J = i, G = n, K = G.parentNode, eo = G.nextSibling, to = n, so = a.group, Q.dragged = G, fo = {
3259
+ target: G,
3054
3260
  clientX: (t || e).clientX,
3055
3261
  clientY: (t || e).clientY
3056
- }, oo = no.clientX - c.left, so = no.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
3057
- if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
3262
+ }, go = fo.clientX - c.left, _o = fo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
3263
+ if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
3058
3264
  r._onDrop();
3059
3265
  return;
3060
3266
  }
3061
- r._disableDelayedDragEvents(), !da && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
3267
+ r._disableDelayedDragEvents(), !ya && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
3062
3268
  sortable: r,
3063
3269
  name: "choose",
3064
3270
  originalEvent: e
3065
- }), R(W, a.chosenClass, !0);
3271
+ }), z(G, a.chosenClass, !0);
3066
3272
  }, a.ignore.split(",").forEach(function(e) {
3067
- xa(W, e.trim(), No);
3068
- }), I(o, "dragover", ko), I(o, "mousemove", ko), I(o, "touchmove", ko), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), da && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ua || la))) {
3273
+ ka(G, e.trim(), Ho);
3274
+ }), L(o, "dragover", Ro), L(o, "mousemove", Ro), L(o, "touchmove", Ro), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), ya && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(va || _a))) {
3069
3275
  if (Q.eventCanceled) {
3070
3276
  this._onDrop();
3071
3277
  return;
3072
3278
  }
3073
- I(o, "mouseup", r._disableDelayedDrag), I(o, "touchend", r._disableDelayedDrag), I(o, "touchcancel", r._disableDelayedDrag), I(o, "mousemove", r._delayedDragTouchMoveHandler), I(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && I(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
3279
+ L(o, "mouseup", r._disableDelayedDrag), L(o, "touchend", r._disableDelayedDrag), L(o, "touchcancel", r._disableDelayedDrag), L(o, "mousemove", r._delayedDragTouchMoveHandler), L(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && L(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
3074
3280
  } else s();
3075
3281
  }
3076
3282
  },
@@ -3079,25 +3285,25 @@ Q.prototype = {
3079
3285
  Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
3080
3286
  },
3081
3287
  _disableDelayedDrag: function() {
3082
- W && No(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
3288
+ G && Ho(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
3083
3289
  },
3084
3290
  _disableDelayedDragEvents: function() {
3085
3291
  var e = this.el.ownerDocument;
3086
- L(e, "mouseup", this._disableDelayedDrag), L(e, "touchend", this._disableDelayedDrag), L(e, "touchcancel", this._disableDelayedDrag), L(e, "mousemove", this._delayedDragTouchMoveHandler), L(e, "touchmove", this._delayedDragTouchMoveHandler), L(e, "pointermove", this._delayedDragTouchMoveHandler);
3292
+ R(e, "mouseup", this._disableDelayedDrag), R(e, "touchend", this._disableDelayedDrag), R(e, "touchcancel", this._disableDelayedDrag), R(e, "mousemove", this._delayedDragTouchMoveHandler), R(e, "touchmove", this._delayedDragTouchMoveHandler), R(e, "pointermove", this._delayedDragTouchMoveHandler);
3087
3293
  },
3088
3294
  _triggerDragStart: function(e, t) {
3089
- t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : t ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(W, "dragend", this), I(q, "dragstart", this._onDragStart));
3295
+ t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(G, "dragend", this), L(J, "dragstart", this._onDragStart));
3090
3296
  try {
3091
- document.selection ? Vo(function() {
3297
+ document.selection ? Xo(function() {
3092
3298
  document.selection.empty();
3093
3299
  }) : window.getSelection().removeAllRanges();
3094
3300
  } catch {}
3095
3301
  },
3096
3302
  _dragStarted: function(e, t) {
3097
- if ($a = !1, q && W) {
3098
- H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", Ao);
3303
+ if (co = !1, J && G) {
3304
+ U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", zo);
3099
3305
  var n = this.options;
3100
- !e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
3306
+ !e && z(G, n.dragClass, !1), z(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
3101
3307
  sortable: this,
3102
3308
  name: "start",
3103
3309
  originalEvent: t
@@ -3105,33 +3311,33 @@ Q.prototype = {
3105
3311
  } else this._nulling();
3106
3312
  },
3107
3313
  _emulateDragOver: function() {
3108
- if (ro) {
3109
- this._lastX = ro.clientX, this._lastY = ro.clientY, Do();
3110
- for (var e = document.elementFromPoint(ro.clientX, ro.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ro.clientX, ro.clientY), e !== t);) t = e;
3111
- if (W.parentNode[V]._isOutsideThisEl(e), t) do {
3112
- if (t[V]) {
3314
+ if (po) {
3315
+ this._lastX = po.clientX, this._lastY = po.clientY, Io();
3316
+ for (var e = document.elementFromPoint(po.clientX, po.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(po.clientX, po.clientY), e !== t);) t = e;
3317
+ if (G.parentNode[H]._isOutsideThisEl(e), t) do {
3318
+ if (t[H]) {
3113
3319
  var n = void 0;
3114
- if (n = t[V]._onDragOver({
3115
- clientX: ro.clientX,
3116
- clientY: ro.clientY,
3320
+ if (n = t[H]._onDragOver({
3321
+ clientX: po.clientX,
3322
+ clientY: po.clientY,
3117
3323
  target: e,
3118
3324
  rootEl: t
3119
3325
  }), n && !this.options.dragoverBubble) break;
3120
3326
  }
3121
3327
  e = t;
3122
3328
  } while (t = t.parentNode);
3123
- Oo();
3329
+ Lo();
3124
3330
  }
3125
3331
  },
3126
3332
  _onTouchMove: function(e) {
3127
- if (no) {
3128
- var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && ba(K, !0), o = K && a && a.a, s = K && a && a.d, c = yo && Z && Da(Z), l = (i.clientX - no.clientX + r.x) / (o || 1) + (c ? c[0] - ho[0] : 0) / (o || 1), u = (i.clientY - no.clientY + r.y) / (s || 1) + (c ? c[1] - ho[1] : 0) / (s || 1);
3129
- if (!Q.active && !$a) {
3333
+ if (fo) {
3334
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Oa(q, !0), o = q && a && a.a, s = q && a && a.d, c = Oo && Z && Fa(Z), l = (i.clientX - fo.clientX + r.x) / (o || 1) + (c ? c[0] - wo[0] : 0) / (o || 1), u = (i.clientY - fo.clientY + r.y) / (s || 1) + (c ? c[1] - wo[1] : 0) / (s || 1);
3335
+ if (!Q.active && !co) {
3130
3336
  if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
3131
3337
  this._onDragStart(e, !0);
3132
3338
  }
3133
- if (K) {
3134
- a ? (a.e += l - (io || 0), a.f += u - (ao || 0)) : a = {
3339
+ if (q) {
3340
+ a ? (a.e += l - (mo || 0), a.f += u - (ho || 0)) : a = {
3135
3341
  a: 1,
3136
3342
  b: 0,
3137
3343
  c: 0,
@@ -3140,39 +3346,39 @@ Q.prototype = {
3140
3346
  f: u
3141
3347
  };
3142
3348
  var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
3143
- z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), io = l, ao = u, ro = i;
3349
+ B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d), mo = l, ho = u, po = i;
3144
3350
  }
3145
3351
  e.cancelable && e.preventDefault();
3146
3352
  }
3147
3353
  },
3148
3354
  _appendGhost: function() {
3149
- if (!K) {
3150
- var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, yo, !0, e), n = this.options;
3151
- if (yo) {
3152
- for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
3153
- Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Sa()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Sa(), ho = Da(Z);
3355
+ if (!q) {
3356
+ var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0, Oo, !0, e), n = this.options;
3357
+ if (Oo) {
3358
+ for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
3359
+ Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Aa()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Aa(), wo = Fa(Z);
3154
3360
  }
3155
- K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position", yo ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", oo / parseInt(K.style.width) * 100 + "% " + so / parseInt(K.style.height) * 100 + "%");
3361
+ q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position", Oo ? "absolute" : "fixed"), B(q, "zIndex", "100000"), B(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), B(q, "transform-origin", go / parseInt(q.style.width) * 100 + "% " + _o / parseInt(q.style.height) * 100 + "%");
3156
3362
  }
3157
3363
  },
3158
3364
  _onDragStart: function(e, t) {
3159
3365
  var n = this, r = e.dataTransfer, i = n.options;
3160
- if (H("dragStart", this, { evt: e }), Q.eventCanceled) {
3366
+ if (U("dragStart", this, { evt: e }), Q.eventCanceled) {
3161
3367
  this._onDrop();
3162
3368
  return;
3163
3369
  }
3164
- H("setupClone", this), Q.eventCanceled || (J = Ia(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Vo(function() {
3165
- H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
3370
+ U("setupClone", this), Q.eventCanceled || (Y = Wa(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), z(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = Xo(function() {
3371
+ U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
3166
3372
  sortable: n,
3167
3373
  name: "clone"
3168
3374
  }));
3169
- }), !t && R(W, i.dragClass, !0), t ? (eo = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (L(document, "mouseup", n._onDrop), L(document, "touchend", n._onDrop), L(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), I(document, "drop", n), z(W, "transform", "translateZ(0)")), $a = !0, n._dragStartId = Vo(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), co = !0, fa && z(document.body, "user-select", "none");
3375
+ }), !t && z(G, i.dragClass, !0), t ? (lo = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), L(document, "drop", n), B(G, "transform", "translateZ(0)")), co = !0, n._dragStartId = Xo(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), vo = !0, ba && B(document.body, "user-select", "none");
3170
3376
  },
3171
3377
  _onDragOver: function(e) {
3172
- var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Qa === s, u = o.sort, d = X || c, f, p = this, m = !1;
3173
- if (go) return;
3378
+ var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = so === s, u = o.sort, d = X || c, f, p = this, m = !1;
3379
+ if (To) return;
3174
3380
  function h(o, s) {
3175
- H(o, p, ta({
3381
+ U(o, p, la({
3176
3382
  evt: e,
3177
3383
  isOwner: l,
3178
3384
  axis: f ? "vertical" : "horizontal",
@@ -3184,7 +3390,7 @@ Q.prototype = {
3184
3390
  target: n,
3185
3391
  completed: _,
3186
3392
  onMove: function(n, i) {
3187
- return Mo(q, t, W, r, n, B(n), e, i);
3393
+ return Vo(J, t, G, r, n, V(n), e, i);
3188
3394
  },
3189
3395
  changed: v
3190
3396
  }, s));
@@ -3193,119 +3399,119 @@ Q.prototype = {
3193
3399
  h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
3194
3400
  }
3195
3401
  function _(r) {
3196
- return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (R(W, X ? X.options.ghostClass : c.options.ghostClass, !1), R(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
3402
+ return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(G, X ? X.options.ghostClass : c.options.ghostClass, !1), z(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
3197
3403
  h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
3198
- }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (lo = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && ko(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
3404
+ }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (yo = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[H]._isOutsideThisEl(e.target), !r && Ro(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
3199
3405
  }
3200
3406
  function v() {
3201
- Y = Ea(W), Za = Ea(W, o.draggable), U({
3407
+ io = Pa(G), oo = Pa(G, o.draggable), W({
3202
3408
  sortable: p,
3203
3409
  name: "change",
3204
3410
  toEl: t,
3205
- newIndex: Y,
3206
- newDraggableIndex: Za,
3411
+ newIndex: io,
3412
+ newDraggableIndex: oo,
3207
3413
  originalEvent: e
3208
3414
  });
3209
3415
  }
3210
- if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = va(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
3211
- if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
3212
- if (eo = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Qa.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
3213
- if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
3214
- if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Ka ? q.insertBefore(W, Ka) : q.appendChild(W)), _(!0);
3215
- var y = Ta(t, o.draggable);
3216
- if (!y || Io(e, f, this) && !y.animated) {
3217
- if (y === W) return _(!1);
3218
- if (y && t === e.target && (n = y), n && (i = B(n)), Mo(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
3219
- } else if (y && Fo(e, f, this)) {
3220
- var b = wa(t, 0, o, !0);
3221
- if (b === W) return _(!1);
3222
- if (n = b, i = B(n), Mo(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
3416
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ea(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
3417
+ if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
3418
+ if (lo = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = so.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
3419
+ if (f = this._getDirection(e, n) === "vertical", r = V(G), h("dragOverValid"), Q.eventCanceled) return m;
3420
+ if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (eo ? J.insertBefore(G, eo) : J.appendChild(G)), _(!0);
3421
+ var y = Na(t, o.draggable);
3422
+ if (!y || Go(e, f, this) && !y.animated) {
3423
+ if (y === G) return _(!1);
3424
+ if (y && t === e.target && (n = y), n && (i = V(n)), Vo(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
3425
+ } else if (y && Wo(e, f, this)) {
3426
+ var b = Ma(t, 0, o, !0);
3427
+ if (b === G) return _(!1);
3428
+ if (n = b, i = V(n), Vo(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
3223
3429
  } else if (n.parentNode === t) {
3224
- i = B(n);
3225
- var x = 0, S, C = W.parentNode !== t, w = !wo(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ca(n, "top", "top") || Ca(W, "top", "top"), D = E ? E.scrollTop : void 0;
3226
- lo !== n && (S = i[T], fo = !1, po = !w && o.invertSwap || C), x = Lo(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, po, lo === n);
3430
+ i = V(n);
3431
+ var x = 0, S, C = G.parentNode !== t, w = !No(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ja(n, "top", "top") || ja(G, "top", "top"), D = E ? E.scrollTop : void 0;
3432
+ yo !== n && (S = i[T], xo = !1, So = !w && o.invertSwap || C), x = Ko(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, So, yo === n);
3227
3433
  var O;
3228
3434
  if (x !== 0) {
3229
- var k = Ea(W);
3435
+ var k = Pa(G);
3230
3436
  do
3231
- k -= x, O = G.children[k];
3232
- while (O && (z(O, "display") === "none" || O === K));
3437
+ k -= x, O = K.children[k];
3438
+ while (O && (B(O, "display") === "none" || O === q));
3233
3439
  }
3234
3440
  if (x === 0 || O === n) return _(!1);
3235
- lo = n, uo = x;
3236
- var ee = n.nextElementSibling, A = !1;
3237
- A = x === 1;
3238
- var te = Mo(q, t, W, r, n, i, e, A);
3239
- if (te !== !1) return (te === 1 || te === -1) && (A = te === 1), go = !0, setTimeout(Po, 30), g(), A && !ee ? t.appendChild(W) : n.parentNode.insertBefore(W, A ? ee : n), E && Fa(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !po && (mo = Math.abs(S - B(n)[T])), v(), _(!0);
3441
+ yo = n, bo = x;
3442
+ var A = n.nextElementSibling, j = !1;
3443
+ j = x === 1;
3444
+ var ee = Vo(J, t, G, r, n, i, e, j);
3445
+ if (ee !== !1) return (ee === 1 || ee === -1) && (j = ee === 1), To = !0, setTimeout(Uo, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Ua(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !So && (Co = Math.abs(S - V(n)[T])), v(), _(!0);
3240
3446
  }
3241
- if (t.contains(W)) return _(!1);
3447
+ if (t.contains(G)) return _(!1);
3242
3448
  }
3243
3449
  return !1;
3244
3450
  },
3245
3451
  _ignoreWhileAnimating: null,
3246
3452
  _offMoveEvents: function() {
3247
- L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", ko), L(document, "mousemove", ko), L(document, "touchmove", ko);
3453
+ R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", Ro), R(document, "mousemove", Ro), R(document, "touchmove", Ro);
3248
3454
  },
3249
3455
  _offUpEvents: function() {
3250
3456
  var e = this.el.ownerDocument;
3251
- L(e, "mouseup", this._onDrop), L(e, "touchend", this._onDrop), L(e, "pointerup", this._onDrop), L(e, "touchcancel", this._onDrop), L(document, "selectstart", this);
3457
+ R(e, "mouseup", this._onDrop), R(e, "touchend", this._onDrop), R(e, "pointerup", this._onDrop), R(e, "touchcancel", this._onDrop), R(document, "selectstart", this);
3252
3458
  },
3253
3459
  _onDrop: function(e) {
3254
3460
  var t = this.el, n = this.options;
3255
- if (Y = Ea(W), Za = Ea(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = Ea(W), Za = Ea(W, n.draggable), Q.eventCanceled) {
3461
+ if (io = Pa(G), oo = Pa(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, io = Pa(G), oo = Pa(G, n.draggable), Q.eventCanceled) {
3256
3462
  this._nulling();
3257
3463
  return;
3258
3464
  }
3259
- $a = !1, po = !1, fo = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ho(this.cloneId), Ho(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), fa && z(document.body, "user-select", ""), z(W, "transform", ""), e && (co && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && L(W, "dragend", this), No(W), W.style["will-change"] = "", co && !$a && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
3465
+ co = !1, So = !1, xo = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Zo(this.cloneId), Zo(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ba && B(document.body, "user-select", ""), B(G, "transform", ""), e && (vo && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && R(G, "dragend", this), Ho(G), G.style["will-change"] = "", vo && !co && z(G, X ? X.options.ghostClass : this.options.ghostClass, !1), z(G, this.options.chosenClass, !1), W({
3260
3466
  sortable: this,
3261
3467
  name: "unchoose",
3262
- toEl: G,
3468
+ toEl: K,
3263
3469
  newIndex: null,
3264
3470
  newDraggableIndex: null,
3265
3471
  originalEvent: e
3266
- }), q === G ? Y !== Ya && Y >= 0 && (U({
3472
+ }), J === K ? io !== ro && io >= 0 && (W({
3267
3473
  sortable: this,
3268
3474
  name: "update",
3269
- toEl: G,
3475
+ toEl: K,
3270
3476
  originalEvent: e
3271
- }), U({
3477
+ }), W({
3272
3478
  sortable: this,
3273
3479
  name: "sort",
3274
- toEl: G,
3480
+ toEl: K,
3275
3481
  originalEvent: e
3276
- })) : (Y >= 0 && (U({
3277
- rootEl: G,
3482
+ })) : (io >= 0 && (W({
3483
+ rootEl: K,
3278
3484
  name: "add",
3279
- toEl: G,
3280
- fromEl: q,
3485
+ toEl: K,
3486
+ fromEl: J,
3281
3487
  originalEvent: e
3282
- }), U({
3488
+ }), W({
3283
3489
  sortable: this,
3284
3490
  name: "remove",
3285
- toEl: G,
3491
+ toEl: K,
3286
3492
  originalEvent: e
3287
- }), U({
3288
- rootEl: G,
3493
+ }), W({
3494
+ rootEl: K,
3289
3495
  name: "sort",
3290
- toEl: G,
3291
- fromEl: q,
3496
+ toEl: K,
3497
+ fromEl: J,
3292
3498
  originalEvent: e
3293
- }), U({
3499
+ }), W({
3294
3500
  sortable: this,
3295
3501
  name: "sort",
3296
- toEl: G,
3502
+ toEl: K,
3297
3503
  originalEvent: e
3298
- })), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Ya, Za = Xa), U({
3504
+ })), X && X.save()), Q.active && ((io == null || io === -1) && (io = ro, oo = ao), W({
3299
3505
  sortable: this,
3300
3506
  name: "end",
3301
- toEl: G,
3507
+ toEl: K,
3302
3508
  originalEvent: e
3303
3509
  }), this.save()))), this._nulling();
3304
3510
  },
3305
3511
  _nulling: function() {
3306
- H("nulling", this), q = W = G = K = Ka = J = qa = Ja = no = ro = co = Y = Za = Ya = Xa = lo = uo = X = Qa = Q.dragged = Q.ghost = Q.clone = Q.active = null, _o.forEach(function(e) {
3512
+ U("nulling", this), J = G = K = q = eo = Y = to = no = fo = po = vo = io = oo = ro = ao = yo = bo = X = so = Q.dragged = Q.ghost = Q.clone = Q.active = null, Eo.forEach(function(e) {
3307
3513
  e.checked = !0;
3308
- }), _o.length = io = ao = 0;
3514
+ }), Eo.length = mo = ho = 0;
3309
3515
  },
3310
3516
  handleEvent: function(e) {
3311
3517
  switch (e.type) {
@@ -3315,7 +3521,7 @@ Q.prototype = {
3315
3521
  break;
3316
3522
  case "dragenter":
3317
3523
  case "dragover":
3318
- W && (this._onDragOver(e), jo(e));
3524
+ G && (this._onDragOver(e), Bo(e));
3319
3525
  break;
3320
3526
  case "selectstart":
3321
3527
  e.preventDefault();
@@ -3323,14 +3529,14 @@ Q.prototype = {
3323
3529
  }
3324
3530
  },
3325
3531
  toArray: function() {
3326
- for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], va(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || zo(t));
3532
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ea(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Jo(t));
3327
3533
  return e;
3328
3534
  },
3329
3535
  sort: function(e, t) {
3330
3536
  var n = {}, r = this.el;
3331
3537
  this.toArray().forEach(function(e, t) {
3332
3538
  var i = r.children[t];
3333
- va(i, this.options.draggable, r, !1) && (n[e] = i);
3539
+ Ea(i, this.options.draggable, r, !1) && (n[e] = i);
3334
3540
  }, this), t && this.captureAnimationState(), e.forEach(function(e) {
3335
3541
  n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
3336
3542
  }), t && this.animateAll();
@@ -3340,25 +3546,25 @@ Q.prototype = {
3340
3546
  e && e.set && e.set(this);
3341
3547
  },
3342
3548
  closest: function(e, t) {
3343
- return va(e, t || this.options.draggable, this.el, !1);
3549
+ return Ea(e, t || this.options.draggable, this.el, !1);
3344
3550
  },
3345
3551
  option: function(e, t) {
3346
3552
  var n = this.options;
3347
3553
  if (t === void 0) return n[e];
3348
- var r = Ua.modifyOption(this, e, t);
3349
- r === void 0 ? n[e] = t : n[e] = r, e === "group" && Eo(n);
3554
+ var r = Za.modifyOption(this, e, t);
3555
+ r === void 0 ? n[e] = t : n[e] = r, e === "group" && Fo(n);
3350
3556
  },
3351
3557
  destroy: function() {
3352
- H("destroy", this);
3558
+ U("destroy", this);
3353
3559
  var e = this.el;
3354
- e[V] = null, L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart), L(e, "pointerdown", this._onTapStart), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
3560
+ e[H] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
3355
3561
  e.removeAttribute("draggable");
3356
- }), this._onDrop(), this._disableDelayedDragEvents(), to.splice(to.indexOf(this.el), 1), this.el = e = null;
3562
+ }), this._onDrop(), this._disableDelayedDragEvents(), uo.splice(uo.indexOf(this.el), 1), this.el = e = null;
3357
3563
  },
3358
3564
  _hideClone: function() {
3359
- if (!Ja) {
3360
- if (H("hideClone", this), Q.eventCanceled) return;
3361
- z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ja = !0;
3565
+ if (!no) {
3566
+ if (U("hideClone", this), Q.eventCanceled) return;
3567
+ B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), no = !0;
3362
3568
  }
3363
3569
  },
3364
3570
  _showClone: function(e) {
@@ -3366,99 +3572,99 @@ Q.prototype = {
3366
3572
  this._hideClone();
3367
3573
  return;
3368
3574
  }
3369
- if (Ja) {
3370
- if (H("showClone", this), Q.eventCanceled) return;
3371
- W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Ka ? q.insertBefore(J, Ka) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), Ja = !1;
3575
+ if (no) {
3576
+ if (U("showClone", this), Q.eventCanceled) return;
3577
+ G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : eo ? J.insertBefore(Y, eo) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), B(Y, "display", ""), no = !1;
3372
3578
  }
3373
3579
  }
3374
3580
  };
3375
- function jo(e) {
3581
+ function Bo(e) {
3376
3582
  e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
3377
3583
  }
3378
- function Mo(e, t, n, r, i, a, o, s) {
3379
- var c, l = e[V], u = l.options.onMove, d;
3380
- return window.CustomEvent && !la && !ua ? c = new CustomEvent("move", {
3584
+ function Vo(e, t, n, r, i, a, o, s) {
3585
+ var c, l = e[H], u = l.options.onMove, d;
3586
+ return window.CustomEvent && !_a && !va ? c = new CustomEvent("move", {
3381
3587
  bubbles: !0,
3382
3588
  cancelable: !0
3383
- }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || B(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
3589
+ }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || V(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
3384
3590
  }
3385
- function No(e) {
3591
+ function Ho(e) {
3386
3592
  e.draggable = !1;
3387
3593
  }
3388
- function Po() {
3389
- go = !1;
3594
+ function Uo() {
3595
+ To = !1;
3390
3596
  }
3391
- function Fo(e, t, n) {
3392
- var r = B(wa(n.el, 0, n.options, !0)), i = La(n.el, n.options, K), a = 10;
3597
+ function Wo(e, t, n) {
3598
+ var r = V(Ma(n.el, 0, n.options, !0)), i = Ga(n.el, n.options, q), a = 10;
3393
3599
  return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
3394
3600
  }
3395
- function Io(e, t, n) {
3396
- var r = B(Ta(n.el, n.options.draggable)), i = La(n.el, n.options, K), a = 10;
3601
+ function Go(e, t, n) {
3602
+ var r = V(Na(n.el, n.options.draggable)), i = Ga(n.el, n.options, q), a = 10;
3397
3603
  return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
3398
3604
  }
3399
- function Lo(e, t, n, r, i, a, o, s) {
3605
+ function Ko(e, t, n, r, i, a, o, s) {
3400
3606
  var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
3401
3607
  if (!o) {
3402
- if (s && mo < l * i) {
3403
- if (!fo && (uo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (fo = !0), fo) f = !0;
3404
- else if (uo === 1 ? c < u + mo : c > d - mo) return -uo;
3405
- } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Ro(t);
3608
+ if (s && Co < l * i) {
3609
+ if (!xo && (bo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (xo = !0), xo) f = !0;
3610
+ else if (bo === 1 ? c < u + Co : c > d - Co) return -bo;
3611
+ } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return qo(t);
3406
3612
  }
3407
3613
  return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
3408
3614
  }
3409
- function Ro(e) {
3410
- return Ea(W) < Ea(e) ? 1 : -1;
3615
+ function qo(e) {
3616
+ return Pa(G) < Pa(e) ? 1 : -1;
3411
3617
  }
3412
- function zo(e) {
3618
+ function Jo(e) {
3413
3619
  for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
3414
3620
  return r.toString(36);
3415
3621
  }
3416
- function Bo(e) {
3417
- _o.length = 0;
3622
+ function Yo(e) {
3623
+ Eo.length = 0;
3418
3624
  for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
3419
3625
  var r = t[n];
3420
- r.checked && _o.push(r);
3626
+ r.checked && Eo.push(r);
3421
3627
  }
3422
3628
  }
3423
- function Vo(e) {
3629
+ function Xo(e) {
3424
3630
  return setTimeout(e, 0);
3425
3631
  }
3426
- function Ho(e) {
3632
+ function Zo(e) {
3427
3633
  return clearTimeout(e);
3428
3634
  }
3429
- vo && I(document, "touchmove", function(e) {
3430
- (Q.active || $a) && e.cancelable && e.preventDefault();
3635
+ Do && L(document, "touchmove", function(e) {
3636
+ (Q.active || co) && e.cancelable && e.preventDefault();
3431
3637
  }), Q.utils = {
3432
- on: I,
3433
- off: L,
3434
- css: z,
3435
- find: xa,
3638
+ on: L,
3639
+ off: R,
3640
+ css: B,
3641
+ find: ka,
3436
3642
  is: function(e, t) {
3437
- return !!va(e, t, e, !1);
3643
+ return !!Ea(e, t, e, !1);
3438
3644
  },
3439
- extend: Aa,
3440
- throttle: Na,
3441
- closest: va,
3442
- toggleClass: R,
3443
- clone: Ia,
3444
- index: Ea,
3445
- nextTick: Vo,
3446
- cancelNextTick: Ho,
3447
- detectDirection: Co,
3448
- getChild: wa
3645
+ extend: Ra,
3646
+ throttle: Va,
3647
+ closest: Ea,
3648
+ toggleClass: z,
3649
+ clone: Wa,
3650
+ index: Pa,
3651
+ nextTick: Xo,
3652
+ cancelNextTick: Zo,
3653
+ detectDirection: Mo,
3654
+ getChild: Ma
3449
3655
  }, Q.get = function(e) {
3450
- return e[V];
3656
+ return e[H];
3451
3657
  }, Q.mount = function() {
3452
3658
  var e = [...arguments];
3453
3659
  e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
3454
3660
  if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
3455
- e.utils && (Q.utils = ta(ta({}, Q.utils), e.utils)), Ua.mount(e);
3661
+ e.utils && (Q.utils = la(la({}, Q.utils), e.utils)), Za.mount(e);
3456
3662
  });
3457
3663
  }, Q.create = function(e, t) {
3458
3664
  return new Q(e, t);
3459
- }, Q.version = sa;
3460
- var $ = [], Uo, Wo, Go = !1, Ko, qo, Jo, Yo;
3461
- function Xo() {
3665
+ }, Q.version = ha;
3666
+ var $ = [], Qo, $o, es = !1, ts, ns, rs, is;
3667
+ function as() {
3462
3668
  function e() {
3463
3669
  for (var e in this.defaults = {
3464
3670
  scroll: !0,
@@ -3471,70 +3677,70 @@ function Xo() {
3471
3677
  return e.prototype = {
3472
3678
  dragStarted: function(e) {
3473
3679
  var t = e.originalEvent;
3474
- this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? I(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? I(document, "touchmove", this._handleFallbackAutoScroll) : I(document, "mousemove", this._handleFallbackAutoScroll);
3680
+ this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? L(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? L(document, "touchmove", this._handleFallbackAutoScroll) : L(document, "mousemove", this._handleFallbackAutoScroll);
3475
3681
  },
3476
3682
  dragOverCompleted: function(e) {
3477
3683
  var t = e.originalEvent;
3478
3684
  !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
3479
3685
  },
3480
3686
  drop: function() {
3481
- this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Qo(), Zo(), Pa();
3687
+ this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), ss(), os(), Ha();
3482
3688
  },
3483
3689
  nulling: function() {
3484
- Jo = Wo = Uo = Go = Yo = Ko = qo = null, $.length = 0;
3690
+ rs = $o = Qo = es = is = ts = ns = null, $.length = 0;
3485
3691
  },
3486
3692
  _handleFallbackAutoScroll: function(e) {
3487
3693
  this._handleAutoScroll(e, !0);
3488
3694
  },
3489
3695
  _handleAutoScroll: function(e, t) {
3490
3696
  var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
3491
- if (Jo = e, t || this.options.forceAutoScrollFallback || ua || la || fa) {
3492
- $o(e, this.options, a, t);
3493
- var o = ka(a, !0);
3494
- Go && (!Yo || r !== Ko || i !== qo) && (Yo && Qo(), Yo = setInterval(function() {
3495
- var a = ka(document.elementFromPoint(r, i), !0);
3496
- a !== o && (o = a, Zo()), $o(e, n.options, a, t);
3497
- }, 10), Ko = r, qo = i);
3697
+ if (rs = e, t || this.options.forceAutoScrollFallback || va || _a || ba) {
3698
+ cs(e, this.options, a, t);
3699
+ var o = La(a, !0);
3700
+ es && (!is || r !== ts || i !== ns) && (is && ss(), is = setInterval(function() {
3701
+ var a = La(document.elementFromPoint(r, i), !0);
3702
+ a !== o && (o = a, os()), cs(e, n.options, a, t);
3703
+ }, 10), ts = r, ns = i);
3498
3704
  } else {
3499
- if (!this.options.bubbleScroll || ka(a, !0) === Sa()) {
3500
- Zo();
3705
+ if (!this.options.bubbleScroll || La(a, !0) === Aa()) {
3706
+ os();
3501
3707
  return;
3502
3708
  }
3503
- $o(e, this.options, ka(a, !1), !1);
3709
+ cs(e, this.options, La(a, !1), !1);
3504
3710
  }
3505
3711
  }
3506
- }, ia(e, {
3712
+ }, fa(e, {
3507
3713
  pluginName: "scroll",
3508
3714
  initializeByDefault: !0
3509
3715
  });
3510
3716
  }
3511
- function Zo() {
3717
+ function os() {
3512
3718
  $.forEach(function(e) {
3513
3719
  clearInterval(e.pid);
3514
3720
  }), $ = [];
3515
3721
  }
3516
- function Qo() {
3517
- clearInterval(Yo);
3722
+ function ss() {
3723
+ clearInterval(is);
3518
3724
  }
3519
- var $o = Na(function(e, t, n, r) {
3725
+ var cs = Va(function(e, t, n, r) {
3520
3726
  if (t.scroll) {
3521
- var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Sa(), l = !1, u;
3522
- Wo !== n && (Wo = n, Zo(), Uo = t.scroll, u = t.scrollFn, Uo === !0 && (Uo = ka(n, !0)));
3523
- var d = 0, f = Uo;
3727
+ var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Aa(), l = !1, u;
3728
+ $o !== n && ($o = n, os(), Qo = t.scroll, u = t.scrollFn, Qo === !0 && (Qo = La(n, !0)));
3729
+ var d = 0, f = Qo;
3524
3730
  do {
3525
- var p = f, m = B(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = z(p), E = p.scrollLeft, D = p.scrollTop;
3731
+ var p = f, m = V(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = B(p), E = p.scrollLeft, D = p.scrollTop;
3526
3732
  p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
3527
3733
  var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
3528
- if (!$[d]) for (var ee = 0; ee <= d; ee++) $[ee] || ($[ee] = {});
3734
+ if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
3529
3735
  ($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
3530
- r && this.layer === 0 && Q.active._onTouchMove(Jo);
3736
+ r && this.layer === 0 && Q.active._onTouchMove(rs);
3531
3737
  var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
3532
- typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Jo, $[this.layer].el) !== "continue" || Fa($[this.layer].el, n, t);
3738
+ typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e, rs, $[this.layer].el) !== "continue" || Ua($[this.layer].el, n, t);
3533
3739
  }.bind({ layer: d }), 24))), d++;
3534
- } while (t.bubbleScroll && f !== c && (f = ka(f, !1)));
3535
- Go = l;
3740
+ } while (t.bubbleScroll && f !== c && (f = La(f, !1)));
3741
+ es = l;
3536
3742
  }
3537
- }, 30), es = function(e) {
3743
+ }, 30), ls = function(e) {
3538
3744
  var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
3539
3745
  if (t) {
3540
3746
  var c = n || i;
@@ -3546,8 +3752,8 @@ var $o = Na(function(e, t, n, r) {
3546
3752
  }));
3547
3753
  }
3548
3754
  };
3549
- function ts() {}
3550
- ts.prototype = {
3755
+ function us() {}
3756
+ us.prototype = {
3551
3757
  startIndex: null,
3552
3758
  dragStart: function(e) {
3553
3759
  var t = e.oldDraggableIndex;
@@ -3556,72 +3762,72 @@ ts.prototype = {
3556
3762
  onSpill: function(e) {
3557
3763
  var t = e.dragEl, n = e.putSortable;
3558
3764
  this.sortable.captureAnimationState(), n && n.captureAnimationState();
3559
- var r = wa(this.sortable.el, this.startIndex, this.options);
3765
+ var r = Ma(this.sortable.el, this.startIndex, this.options);
3560
3766
  r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
3561
3767
  },
3562
- drop: es
3563
- }, ia(ts, { pluginName: "revertOnSpill" });
3564
- function ns() {}
3565
- ns.prototype = {
3768
+ drop: ls
3769
+ }, fa(us, { pluginName: "revertOnSpill" });
3770
+ function ds() {}
3771
+ ds.prototype = {
3566
3772
  onSpill: function(e) {
3567
3773
  var t = e.dragEl, n = e.putSortable || this.sortable;
3568
3774
  n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
3569
3775
  },
3570
- drop: es
3571
- }, ia(ns, { pluginName: "removeOnSpill" }), Q.mount(new Xo()), Q.mount(ns, ts);
3572
- function rs(e) {
3776
+ drop: ls
3777
+ }, fa(ds, { pluginName: "removeOnSpill" }), Q.mount(new as()), Q.mount(ds, us);
3778
+ function fs(e) {
3573
3779
  return e == null ? e : JSON.parse(JSON.stringify(e));
3574
3780
  }
3575
- function is(e) {
3576
- re() && r(e);
3781
+ function ps(e) {
3782
+ ne() && r(e);
3577
3783
  }
3578
- function as(e) {
3579
- re() ? a(e) : ie(e);
3784
+ function ms(e) {
3785
+ ne() ? a(e) : re(e);
3580
3786
  }
3581
- var os = null, ss = null;
3582
- function cs(e = null, t = null) {
3583
- os = e, ss = t;
3787
+ var hs = null, gs = null;
3788
+ function _s(e = null, t = null) {
3789
+ hs = e, gs = t;
3584
3790
  }
3585
- function ls() {
3791
+ function vs() {
3586
3792
  return {
3587
- data: os,
3588
- clonedData: ss
3793
+ data: hs,
3794
+ clonedData: gs
3589
3795
  };
3590
3796
  }
3591
- var us = Symbol("cloneElement");
3592
- function ds(...e) {
3593
- let t = re()?.proxy, n = null, r = e[0], [, i, a] = e;
3797
+ var ys = Symbol("cloneElement");
3798
+ function bs(...e) {
3799
+ let t = ne()?.proxy, n = null, r = e[0], [, i, a] = e;
3594
3800
  Array.isArray(k(i)) || (a = i, i = null);
3595
- let o = null, { immediate: s = !0, clone: l = rs, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
3801
+ let o = null, { immediate: s = !0, clone: l = fs, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
3596
3802
  function p(e) {
3597
3803
  let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
3598
3804
  n = u && !d ? o.slice(0, -1) : o;
3599
3805
  let s = k(k(i)?.[r]), c = l(s);
3600
- cs(s, c), a[us] = c;
3806
+ _s(s, c), a[ys] = c;
3601
3807
  }
3602
3808
  function m(e) {
3603
- let t = e.item[us];
3604
- if (!Ui(t)) {
3605
- if (Ki(e.item), g(i)) {
3809
+ let t = e.item[ys];
3810
+ if (!Zi(t)) {
3811
+ if (ea(e.item), g(i)) {
3606
3812
  let n = [...k(i)];
3607
- i.value = Hi(n, e.newDraggableIndex, t);
3813
+ i.value = Xi(n, e.newDraggableIndex, t);
3608
3814
  return;
3609
3815
  }
3610
- Hi(k(i), e.newDraggableIndex, t);
3816
+ Xi(k(i), e.newDraggableIndex, t);
3611
3817
  }
3612
3818
  }
3613
3819
  function h(e) {
3614
3820
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
3615
- if (Gi(t, n, r), o === "clone") {
3616
- Ki(s);
3821
+ if ($i(t, n, r), o === "clone") {
3822
+ ea(s);
3617
3823
  return;
3618
3824
  }
3619
3825
  if (g(i)) {
3620
3826
  let e = [...k(i)];
3621
- i.value = Vi(e, a);
3827
+ i.value = Yi(e, a);
3622
3828
  return;
3623
3829
  }
3624
- Vi(k(i), a);
3830
+ Yi(k(i), a);
3625
3831
  }
3626
3832
  function _(e) {
3627
3833
  if (f) {
@@ -3629,12 +3835,12 @@ function ds(...e) {
3629
3835
  return;
3630
3836
  }
3631
3837
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
3632
- if (Ki(n), Gi(t, n, r), g(i)) {
3838
+ if (ea(n), $i(t, n, r), g(i)) {
3633
3839
  let e = [...k(i)];
3634
- i.value = Ri(e, a, o);
3840
+ i.value = Ki(e, a, o);
3635
3841
  return;
3636
3842
  }
3637
- Ri(k(i), a, o);
3843
+ Ki(k(i), a, o);
3638
3844
  }
3639
3845
  function v(e) {
3640
3846
  let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
@@ -3652,8 +3858,8 @@ function ds(...e) {
3652
3858
  } finally {
3653
3859
  n = null;
3654
3860
  }
3655
- ie(() => {
3656
- if (cs(), o) throw o;
3861
+ re(() => {
3862
+ if (_s(), o) throw o;
3657
3863
  });
3658
3864
  }
3659
3865
  let y = {
@@ -3665,19 +3871,19 @@ function ds(...e) {
3665
3871
  };
3666
3872
  function b(e) {
3667
3873
  let n = k(r);
3668
- return e ||= Wi(n) ? qi(n, t?.$el) : n, e && !Xi(e) && (e = e.$el), e || Li("Root element not found"), e;
3874
+ return e ||= Qi(n) ? ta(n, t?.$el) : n, e && !ia(e) && (e = e.$el), e || Gi("Root element not found"), e;
3669
3875
  }
3670
3876
  function x() {
3671
- let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = Pi(e, ["immediate", "clone"]);
3672
- return Zi(r, (e, t) => {
3673
- Qi(e) && (r[e] = (e, ...n) => ($i(e, ls()), t(e, ...n)));
3674
- }), Yi(i === null ? {} : y, r);
3877
+ let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = Hi(e, ["immediate", "clone"]);
3878
+ return aa(r, (e, t) => {
3879
+ oa(e) && (r[e] = (e, ...n) => (sa(e, vs()), t(e, ...n)));
3880
+ }), ra(i === null ? {} : y, r);
3675
3881
  }
3676
3882
  let S = (e) => {
3677
3883
  e = b(e), o && C.destroy(), o = new Q(e, x());
3678
3884
  };
3679
3885
  c(() => a, () => {
3680
- o && Zi(x(), (e, t) => {
3886
+ o && aa(x(), (e, t) => {
3681
3887
  o?.option(e, t);
3682
3888
  });
3683
3889
  }, { deep: !0 });
@@ -3690,15 +3896,15 @@ function ds(...e) {
3690
3896
  toArray: () => o?.toArray(),
3691
3897
  closest: (...e) => o?.closest(...e)
3692
3898
  };
3693
- return as(() => {
3899
+ return ms(() => {
3694
3900
  s && S();
3695
- }), is(C.destroy), Ni({
3901
+ }), ps(C.destroy), Vi({
3696
3902
  start: S,
3697
3903
  pause: () => C?.option("disabled", !0),
3698
3904
  resume: () => C?.option("disabled", !1)
3699
3905
  }, C);
3700
3906
  }
3701
- var fs = [
3907
+ var xs = [
3702
3908
  "update",
3703
3909
  "start",
3704
3910
  "add",
@@ -3711,7 +3917,7 @@ var fs = [
3711
3917
  "clone",
3712
3918
  "move",
3713
3919
  "change"
3714
- ], ps = y({
3920
+ ], Ss = y({
3715
3921
  name: "VueDraggable",
3716
3922
  model: {
3717
3923
  prop: "modelValue",
@@ -3761,37 +3967,37 @@ var fs = [
3761
3967
  "tag",
3762
3968
  "target",
3763
3969
  "customUpdate",
3764
- ...fs.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3970
+ ...xs.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3765
3971
  ],
3766
- emits: ["update:modelValue", ...fs],
3972
+ emits: ["update:modelValue", ...xs],
3767
3973
  setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
3768
- let o = fs.reduce((e, t) => {
3974
+ let o = xs.reduce((e, t) => {
3769
3975
  let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
3770
3976
  return e[n] = (...e) => r(t, ...e), e;
3771
- }, {}), s = j(() => {
3772
- let n = e(t), { modelValue: r } = n, i = Pi(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
3977
+ }, {}), s = M(() => {
3978
+ let n = e(t), { modelValue: r } = n, i = Hi(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
3773
3979
  let r = k(n);
3774
3980
  return r !== void 0 && (e[t] = r), e;
3775
3981
  }, {});
3776
- return Ni(Ni({}, o), Bi(Ni(Ni({}, a), s)));
3777
- }), c = j({
3982
+ return Vi(Vi({}, o), Ji(Vi(Vi({}, a), s)));
3983
+ }), c = M({
3778
3984
  get: () => t.modelValue,
3779
3985
  set: (e) => r("update:modelValue", e)
3780
- }), l = _(), u = ee(ds(t.target || l, c, s));
3781
- return i(u), () => ae(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
3986
+ }), l = _(), u = A(bs(t.target || l, c, s));
3987
+ return i(u), () => ie(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
3782
3988
  }
3783
- }), ms = {
3989
+ }), Cs = {
3784
3990
  mounted: "mounted",
3785
3991
  unmounted: "unmounted"
3786
3992
  };
3787
- ms.mounted, ms.unmounted;
3993
+ Cs.mounted, Cs.unmounted;
3788
3994
  //#endregion
3789
3995
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
3790
- var hs = { class: "tpl:w-full" }, gs = {
3996
+ var ws = { class: "tpl:w-full" }, Ts = {
3791
3997
  key: 0,
3792
3998
  "data-testid": "section-drop-hint",
3793
- class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
3794
- }, _s = /* @__PURE__ */ y({
3999
+ class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
4000
+ }, Es = /* @__PURE__ */ y({
3795
4001
  __name: "SectionBlock",
3796
4002
  props: {
3797
4003
  block: {},
@@ -3799,13 +4005,22 @@ var hs = { class: "tpl:w-full" }, gs = {
3799
4005
  },
3800
4006
  setup(e) {
3801
4007
  let n = {
3802
- title: Ei,
3803
- paragraph: ci,
3804
- image: Yr,
3805
- button: In,
3806
- divider: kr,
3807
- custom: Dr
3808
- }, r = e, { t: a } = Ft(), s = nt(bt, "SectionBlock"), c = N(_t, null), l = N(Dt, null), u = j(() => {
4008
+ title: Pi,
4009
+ paragraph: hi,
4010
+ image: ni,
4011
+ button: Un,
4012
+ divider: Ir,
4013
+ custom: Pr
4014
+ }, r = e, { t: a } = It(), s = rt(xt, "SectionBlock"), c = P(vt, null), l = P(Ot, null), u = P(At, {});
4015
+ function h(e) {
4016
+ let t = u.savedBlocks;
4017
+ if (t?.isPicking.value) {
4018
+ t.togglePick(r.block.id);
4019
+ return;
4020
+ }
4021
+ s.selectBlock(e);
4022
+ }
4023
+ let g = M(() => {
3809
4024
  switch (r.block.columns) {
3810
4025
  case "2": return ["50%", "50%"];
3811
4026
  case "3": return [
@@ -3817,38 +4032,38 @@ var hs = { class: "tpl:w-full" }, gs = {
3817
4032
  case "2-1": return ["66.67%", "33.33%"];
3818
4033
  default: return ["100%"];
3819
4034
  }
3820
- }), h = j(() => {
3821
- let e = u.value.length, t = [...r.block.children];
4035
+ }), _ = M(() => {
4036
+ let e = g.value.length, t = [...r.block.children];
3822
4037
  for (; t.length < e;) t.push([]);
3823
4038
  return t.slice(0, e);
3824
- }), g = j(() => r.viewport === "mobile" && r.block.stackOnMobile !== !1);
3825
- function _(e) {
3826
- return h.value[e] || [];
4039
+ }), v = M(() => r.viewport === "mobile" && r.block.stackOnMobile !== !1);
4040
+ function y(e) {
4041
+ return _.value[e] || [];
3827
4042
  }
3828
- function v(e, t) {
4043
+ function S(e, t) {
3829
4044
  let n = t.map((e) => JSON.parse(JSON.stringify(e))), i = [...r.block.children];
3830
4045
  for (; i.length <= e;) i.push([]);
3831
4046
  i[e] = n, s.updateBlock(r.block.id, { children: i });
3832
4047
  }
3833
- function y(e) {
3834
- return li(e, l, n);
4048
+ function C(e) {
4049
+ return _i(e, l, n);
3835
4050
  }
3836
- function S(e, t) {
4051
+ function T(e, t) {
3837
4052
  e.type === "custom" && s.updateBlock(e.id, {
3838
4053
  fieldValues: t.fieldValues,
3839
4054
  dataSourceFetched: t.dataSourceFetched
3840
4055
  });
3841
4056
  }
3842
- return (n, r) => (f(), x("div", hs, [b("div", { class: o(["tpl:flex tpl:gap-0", { "tpl:flex-col": g.value }]) }, [(f(!0), x(A, null, t(h.value, (n, r) => (f(), x("div", {
4057
+ return (n, r) => (f(), x("div", ws, [b("div", { class: o(["tpl:flex tpl:gap-0", { "tpl:flex-col": v.value }]) }, [(f(!0), x(j, null, t(_.value, (n, r) => (f(), x("div", {
3843
4058
  key: r,
3844
- class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", _(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3845
- style: i({ width: g.value ? "100%" : u.value[r] })
3846
- }, [w(k(ps), {
3847
- "model-value": _(r),
4059
+ class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", y(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
4060
+ style: i({ width: v.value ? "100%" : g.value[r] })
4061
+ }, [w(k(Ss), {
4062
+ "model-value": y(r),
3848
4063
  group: {
3849
4064
  name: "blocks",
3850
4065
  pull: !0,
3851
- put: (e, t, n) => k(Di)(n)
4066
+ put: (e, t, n) => k(Fi)(n)
3852
4067
  },
3853
4068
  animation: 150,
3854
4069
  "ghost-class": "tpl-ghost",
@@ -3859,19 +4074,20 @@ var hs = { class: "tpl:w-full" }, gs = {
3859
4074
  "empty-insert-threshold": 20,
3860
4075
  "force-fallback": !0,
3861
4076
  class: "tpl:min-h-[60px]",
3862
- "onUpdate:modelValue": (e) => v(r, e)
4077
+ "onUpdate:modelValue": (e) => S(r, e)
3863
4078
  }, {
3864
- default: m(() => [(f(!0), x(A, null, t(_(r), (t) => oe((f(), x("div", { key: t.id }, [w(wi, {
4079
+ default: m(() => [(f(!0), x(j, null, t(y(r), (t) => ae((f(), x("div", { key: t.id }, [w(Mi, {
3865
4080
  block: t,
3866
4081
  "is-selected": k(s).state.selectedBlockId === t.id,
3867
4082
  viewport: e.viewport,
3868
4083
  "preview-mode": k(s).state.previewMode,
3869
- onSelect: (e) => k(s).selectBlock(t.id)
4084
+ nested: "",
4085
+ onSelect: (e) => h(t.id)
3870
4086
  }, {
3871
- default: m(() => [(f(), D(d(y(t)), {
4087
+ default: m(() => [(f(), D(d(C(t)), {
3872
4088
  block: t,
3873
4089
  viewport: e.viewport,
3874
- onFetchData: (e) => S(t, e),
4090
+ onFetchData: (e) => T(t, e),
3875
4091
  onUpdate: (e) => k(s).updateBlock(t.id, e)
3876
4092
  }, null, 40, [
3877
4093
  "block",
@@ -3886,19 +4102,19 @@ var hs = { class: "tpl:w-full" }, gs = {
3886
4102
  "viewport",
3887
4103
  "preview-mode",
3888
4104
  "onSelect"
3889
- ])])), [[se, !k(c)?.isHidden(t.id)]])), 128))]),
4105
+ ])])), [[oe, !k(c)?.isHidden(t.id)]])), 128))]),
3890
4106
  _: 2
3891
4107
  }, 1032, [
3892
4108
  "model-value",
3893
4109
  "group",
3894
4110
  "onUpdate:modelValue"
3895
- ]), _(r).length === 0 ? (f(), x("div", gs, [b("span", null, p(k(a).section.dropHere), 1)])) : M("", !0)], 6))), 128))], 2)]));
4111
+ ]), y(r).length === 0 ? (f(), x("div", Ts, [b("span", null, p(k(a).section.dropHere), 1)])) : N("", !0)], 6))), 128))], 2)]));
3896
4112
  }
3897
- }), vs = ke, ys = {
4113
+ }), Ds = Oe, Os = {
3898
4114
  small: 24,
3899
4115
  medium: 32,
3900
4116
  large: 48
3901
- }, bs = [
4117
+ }, ks = [
3902
4118
  "facebook",
3903
4119
  "twitter",
3904
4120
  "instagram",
@@ -3916,11 +4132,11 @@ var hs = { class: "tpl:w-full" }, gs = {
3916
4132
  "github",
3917
4133
  "dribbble",
3918
4134
  "behance"
3919
- ], xs = [
4135
+ ], As = [
3920
4136
  "width",
3921
4137
  "height",
3922
4138
  "fill"
3923
- ], Ss = ["d"], Cs = /* @__PURE__ */ y({
4139
+ ], js = ["d"], Ms = /* @__PURE__ */ y({
3924
4140
  __name: "SocialIconSvg",
3925
4141
  props: {
3926
4142
  platform: {},
@@ -3928,7 +4144,7 @@ var hs = { class: "tpl:w-full" }, gs = {
3928
4144
  iconSize: {}
3929
4145
  },
3930
4146
  setup(e) {
3931
- let t = e, n = j(() => vs[t.platform]), r = j(() => ys[t.iconSize]), a = j(() => {
4147
+ let t = e, n = M(() => Ds[t.platform]), r = M(() => Os[t.iconSize]), a = M(() => {
3932
4148
  let e = {
3933
4149
  display: "inline-flex",
3934
4150
  alignItems: "center",
@@ -3965,40 +4181,40 @@ var hs = { class: "tpl:w-full" }, gs = {
3965
4181
  };
3966
4182
  default: return e;
3967
4183
  }
3968
- }), o = j(() => Math.floor(r.value * .6)), s = j(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
4184
+ }), o = M(() => Math.floor(r.value * .6)), s = M(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
3969
4185
  return (e, t) => (f(), x("span", { style: i(a.value) }, [(f(), x("svg", {
3970
4186
  width: o.value,
3971
4187
  height: o.value,
3972
4188
  viewBox: "0 0 24 24",
3973
4189
  fill: s.value,
3974
4190
  xmlns: "http://www.w3.org/2000/svg"
3975
- }, [b("path", { d: n.value.path }, null, 8, Ss)], 8, xs))], 4));
4191
+ }, [b("path", { d: n.value.path }, null, 8, js)], 8, As))], 4));
3976
4192
  }
3977
- }), ws = { class: "tpl:w-full" }, Ts = ["href"], Es = {
4193
+ }), Ns = { class: "tpl:w-full" }, Ps = ["href"], Fs = {
3978
4194
  key: 1,
3979
4195
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
3980
- }, Ds = /* @__PURE__ */ y({
4196
+ }, Is = /* @__PURE__ */ y({
3981
4197
  __name: "SocialIconsBlock",
3982
4198
  props: {
3983
4199
  block: {},
3984
4200
  viewport: {}
3985
4201
  },
3986
4202
  setup(e) {
3987
- let n = e, { t: r } = Ft(), a = j(() => ({
4203
+ let n = e, { t: r } = It(), a = M(() => ({
3988
4204
  display: "flex",
3989
4205
  flexWrap: "wrap",
3990
4206
  gap: `${n.block.spacing}px`,
3991
4207
  justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
3992
- })), o = j(() => n.block.icons.length > 0);
3993
- return (n, s) => (f(), x("div", ws, [o.value ? (f(), x("div", {
4208
+ })), o = M(() => n.block.icons.length > 0);
4209
+ return (n, s) => (f(), x("div", Ns, [o.value ? (f(), x("div", {
3994
4210
  key: 0,
3995
4211
  style: i(a.value)
3996
- }, [(f(!0), x(A, null, t(e.block.icons, (t) => (f(), x("a", {
4212
+ }, [(f(!0), x(j, null, t(e.block.icons, (t) => (f(), x("a", {
3997
4213
  key: t.id,
3998
4214
  href: t.url || "#",
3999
4215
  class: "tpl:cursor-default",
4000
- onClick: s[0] ||= P(() => {}, ["prevent"])
4001
- }, [w(Cs, {
4216
+ onClick: s[0] ||= F(() => {}, ["prevent"])
4217
+ }, [w(Ms, {
4002
4218
  platform: t.platform,
4003
4219
  "icon-style": e.block.iconStyle,
4004
4220
  "icon-size": e.block.iconSize
@@ -4006,44 +4222,44 @@ var hs = { class: "tpl:w-full" }, gs = {
4006
4222
  "platform",
4007
4223
  "icon-style",
4008
4224
  "icon-size"
4009
- ])], 8, Ts))), 128))], 4)) : (f(), x("div", Es, [w(k(qn), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
4225
+ ])], 8, Ps))), 128))], 4)) : (f(), x("div", Fs, [w(k(er), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
4010
4226
  }
4011
- }), Os = { class: "tpl:w-full" }, ks = {
4227
+ }), Ls = { class: "tpl:w-full" }, Rs = {
4012
4228
  key: 0,
4013
4229
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
4014
4230
  style: {
4015
4231
  "background-color": "var(--tpl-bg-hover)",
4016
4232
  color: "var(--tpl-text-dim)"
4017
4233
  }
4018
- }, As = /* @__PURE__ */ y({
4234
+ }, zs = /* @__PURE__ */ y({
4019
4235
  __name: "SpacerBlock",
4020
4236
  props: {
4021
4237
  block: {},
4022
4238
  viewport: {}
4023
4239
  },
4024
4240
  setup(e) {
4025
- let t = e, n = nt(bt, "SpacerBlock"), r = j(() => ({
4241
+ let t = e, n = rt(xt, "SpacerBlock"), r = M(() => ({
4026
4242
  height: `${t.block.height}px`,
4027
4243
  minHeight: `${t.block.height}px`,
4028
4244
  ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
4029
4245
  }));
4030
- return (t, a) => (f(), x("div", Os, [b("div", {
4246
+ return (t, a) => (f(), x("div", Ls, [b("div", {
4031
4247
  style: i(r.value),
4032
4248
  class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
4033
- }, [k(n).state.previewMode ? M("", !0) : (f(), x("span", ks, p(e.block.height) + "px ", 1))], 6)]));
4249
+ }, [k(n).state.previewMode ? N("", !0) : (f(), x("span", Rs, p(e.block.height) + "px ", 1))], 6)]));
4034
4250
  }
4035
- }), js = { class: "tpl:w-full" }, Ms = { key: 0 }, Ns = [
4251
+ }), Bs = { class: "tpl:w-full" }, Vs = { key: 0 }, Hs = [
4036
4252
  "aria-label",
4037
4253
  "data-placeholder",
4038
4254
  "onBlur"
4039
- ], Ps = [
4255
+ ], Us = [
4040
4256
  "aria-label",
4041
4257
  "data-placeholder",
4042
4258
  "onBlur"
4043
- ], Fs = {
4259
+ ], Ws = {
4044
4260
  key: 1,
4045
4261
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
4046
- }, Is = /*#__PURE__*/ Vt(/* @__PURE__ */ y({
4262
+ }, Gs = /*#__PURE__*/ Ht(/* @__PURE__ */ y({
4047
4263
  __name: "TableBlock",
4048
4264
  props: {
4049
4265
  block: {},
@@ -4057,7 +4273,7 @@ var hs = { class: "tpl:w-full" }, gs = {
4057
4273
  updated(e, t) {
4058
4274
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
4059
4275
  }
4060
- }, r = e, { t: a } = Ft(), o = nt(bt, "TableBlock"), s = j(() => r.block.rows.length > 0), c = j(() => {
4276
+ }, r = e, { t: a } = It(), o = rt(xt, "TableBlock"), s = M(() => r.block.rows.length > 0), c = M(() => {
4061
4277
  let e = {
4062
4278
  width: "100%",
4063
4279
  borderCollapse: "collapse",
@@ -4066,15 +4282,15 @@ var hs = { class: "tpl:w-full" }, gs = {
4066
4282
  fontFamily: r.block.fontFamily || "inherit"
4067
4283
  };
4068
4284
  return r.block.color && (e.color = r.block.color), e;
4069
- }), l = j(() => ({
4285
+ }), l = M(() => ({
4070
4286
  border: `${r.block.borderWidth}px solid ${r.block.borderColor}`,
4071
4287
  padding: `${r.block.cellPadding}px`,
4072
4288
  textAlign: r.block.textAlign
4073
- })), u = j(() => ({
4289
+ })), u = M(() => ({
4074
4290
  ...l.value,
4075
4291
  fontWeight: "bold",
4076
4292
  backgroundColor: r.block.headerBackgroundColor || "transparent"
4077
- })), d = j(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), m = j(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
4293
+ })), d = M(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), m = M(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
4078
4294
  function h() {
4079
4295
  o.selectBlock(r.block.id);
4080
4296
  }
@@ -4088,31 +4304,31 @@ var hs = { class: "tpl:w-full" }, gs = {
4088
4304
  } : n);
4089
4305
  o.updateBlock(r.block.id, { rows: a });
4090
4306
  }
4091
- return (e, r) => (f(), x("div", js, [s.value ? (f(), x("table", {
4307
+ return (e, r) => (f(), x("div", Bs, [s.value ? (f(), x("table", {
4092
4308
  key: 0,
4093
4309
  style: i(c.value),
4094
4310
  class: "tpl-table-editable"
4095
- }, [d.value ? (f(), x("thead", Ms, [b("tr", null, [(f(!0), x(A, null, t(d.value.cells, (e) => oe((f(), x("th", {
4311
+ }, [d.value ? (f(), x("thead", Vs, [b("tr", null, [(f(!0), x(j, null, t(d.value.cells, (e) => ae((f(), x("th", {
4096
4312
  key: e.id,
4097
4313
  style: i(u.value),
4098
4314
  "aria-label": k(a).table.cellPlaceholder,
4099
4315
  contenteditable: "true",
4100
4316
  "data-placeholder": k(a).table.cellPlaceholder,
4101
4317
  onBlur: (t) => g(d.value.id, e.id, t),
4102
- onKeydown: r[0] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
4103
- onClick: P(h, ["stop"])
4104
- }, null, 44, Ns)), [[n, e.content]])), 128))])])) : M("", !0), b("tbody", null, [(f(!0), x(A, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(A, null, t(e.cells, (t) => oe((f(), x("td", {
4318
+ onKeydown: r[0] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
4319
+ onClick: F(h, ["stop"])
4320
+ }, null, 44, Hs)), [[n, e.content]])), 128))])])) : N("", !0), b("tbody", null, [(f(!0), x(j, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(j, null, t(e.cells, (t) => ae((f(), x("td", {
4105
4321
  key: t.id,
4106
4322
  style: i(l.value),
4107
4323
  "aria-label": k(a).table.cellPlaceholder,
4108
4324
  contenteditable: "true",
4109
4325
  "data-placeholder": k(a).table.cellPlaceholder,
4110
4326
  onBlur: (n) => g(e.id, t.id, n),
4111
- onKeydown: r[1] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
4112
- onClick: P(h, ["stop"])
4113
- }, null, 44, Ps)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", Fs, [w(k(Jn), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
4327
+ onKeydown: r[1] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
4328
+ onClick: F(h, ["stop"])
4329
+ }, null, 44, Us)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", Ws, [w(k(tr), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
4114
4330
  }
4115
- }), [["__scopeId", "data-v-963ac422"]]), Ls = /* @__PURE__ */ y({
4331
+ }), [["__scopeId", "data-v-963ac422"]]), Ks = /* @__PURE__ */ y({
4116
4332
  __name: "VideoPlayButton",
4117
4333
  props: { hoverEffect: {
4118
4334
  type: Boolean,
@@ -4130,7 +4346,7 @@ var hs = { class: "tpl:w-full" }, gs = {
4130
4346
  });
4131
4347
  //#endregion
4132
4348
  //#region src/utils/videoThumbnail.ts
4133
- function Rs(e) {
4349
+ function qs(e) {
4134
4350
  if (!e) return {
4135
4351
  platform: "unknown",
4136
4352
  videoId: null,
@@ -4162,25 +4378,25 @@ function Rs(e) {
4162
4378
  thumbnailUrl: null
4163
4379
  };
4164
4380
  }
4165
- function zs(e, t) {
4166
- return t || Rs(e).thumbnailUrl;
4381
+ function Js(e, t) {
4382
+ return t || qs(e).thumbnailUrl;
4167
4383
  }
4168
4384
  //#endregion
4169
4385
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
4170
- var Bs = ["src", "alt"], Vs = {
4386
+ var Ys = ["src", "alt"], Xs = {
4171
4387
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
4172
4388
  style: { opacity: "0.7" }
4173
- }, Hs = ["href"], Us = ["src", "alt"], Ws = ["src", "alt"], Gs = {
4389
+ }, Zs = ["href"], Qs = ["src", "alt"], $s = ["src", "alt"], ec = {
4174
4390
  key: 3,
4175
4391
  class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
4176
- }, Ks = /* @__PURE__ */ y({
4392
+ }, tc = /* @__PURE__ */ y({
4177
4393
  __name: "VideoBlock",
4178
4394
  props: {
4179
4395
  block: {},
4180
4396
  viewport: {}
4181
4397
  },
4182
4398
  setup(e) {
4183
- let t = e, { t: n } = Ft(), { syntax: r } = Ht(), a = j(() => we(t.block.url, r) || we(t.block.thumbnailUrl, r)), o = cn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = cn(() => a.value ? t.block.placeholderUrl : void 0), c = j(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : zs(t.block.url)), l = j(() => ({ textAlign: t.block.align })), u = j(() => {
4399
+ let t = e, { t: n } = It(), { syntax: r } = Ut(), a = M(() => Ce(t.block.url, r) || Ce(t.block.thumbnailUrl, r)), o = fn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = fn(() => a.value ? t.block.placeholderUrl : void 0), c = M(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : Js(t.block.url)), l = M(() => ({ textAlign: t.block.align })), u = M(() => {
4184
4400
  let e = t.block.align;
4185
4401
  return {
4186
4402
  maxWidth: "100%",
@@ -4189,7 +4405,7 @@ var Bs = ["src", "alt"], Vs = {
4189
4405
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
4190
4406
  marginRight: e === "center" ? "auto" : void 0
4191
4407
  };
4192
- }), d = j(() => we(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
4408
+ }), d = M(() => Ce(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
4193
4409
  return (t, r) => (f(), x("div", {
4194
4410
  class: "tpl:w-full",
4195
4411
  style: i(l.value)
@@ -4201,28 +4417,28 @@ var Bs = ["src", "alt"], Vs = {
4201
4417
  class: "tpl:w-full tpl:border-0",
4202
4418
  src: k(s),
4203
4419
  alt: e.block.alt
4204
- }, null, 8, Bs), w(Ls)], 4)) : a.value ? (f(), x("div", {
4420
+ }, null, 8, Ys), w(Ks)], 4)) : a.value ? (f(), x("div", {
4205
4421
  key: 1,
4206
4422
  class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
4207
4423
  style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
4208
- }, [w(k(Yn), {
4424
+ }, [w(k(nr), {
4209
4425
  size: 36,
4210
4426
  "stroke-width": 1.5,
4211
4427
  class: "tpl:text-[var(--tpl-primary)]",
4212
4428
  style: { opacity: "0.5" }
4213
- }), b("span", Vs, [w(Nn, { text: d.value }, null, 8, ["text"])])], 4)) : c.value ? (f(), x(A, { key: 2 }, [e.block.url ? (f(), x("a", {
4429
+ }), b("span", Xs, [w(Bn, { text: d.value }, null, 8, ["text"])])], 4)) : c.value ? (f(), x(j, { key: 2 }, [e.block.url ? (f(), x("a", {
4214
4430
  key: 0,
4215
4431
  href: e.block.url,
4216
4432
  target: "_blank",
4217
4433
  rel: "noopener noreferrer",
4218
4434
  class: "tpl:group tpl:relative tpl:inline-block",
4219
4435
  style: i(u.value),
4220
- onClick: r[0] ||= P(() => {}, ["prevent"])
4436
+ onClick: r[0] ||= F(() => {}, ["prevent"])
4221
4437
  }, [b("img", {
4222
4438
  class: "tpl:w-full tpl:border-0",
4223
4439
  src: c.value,
4224
4440
  alt: e.block.alt
4225
- }, null, 8, Us), w(Ls, { "hover-effect": "" })], 12, Hs)) : (f(), x("div", {
4441
+ }, null, 8, Qs), w(Ks, { "hover-effect": "" })], 12, Zs)) : (f(), x("div", {
4226
4442
  key: 1,
4227
4443
  class: "tpl:relative tpl:inline-block",
4228
4444
  style: i(u.value)
@@ -4230,48 +4446,48 @@ var Bs = ["src", "alt"], Vs = {
4230
4446
  class: "tpl:w-full tpl:border-0",
4231
4447
  src: c.value,
4232
4448
  alt: e.block.alt
4233
- }, null, 8, Ws), w(Ls)], 4))], 64)) : (f(), x("div", Gs, [w(k(Yn), {
4449
+ }, null, 8, $s), w(Ks)], 4))], 64)) : (f(), x("div", ec, [w(k(nr), {
4234
4450
  size: 40,
4235
4451
  "stroke-width": 1.5,
4236
4452
  class: "tpl:text-[var(--tpl-border-light)]"
4237
4453
  }), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
4238
4454
  }
4239
- }), qs = {
4240
- section: _s,
4241
- title: Ei,
4242
- paragraph: ci,
4243
- image: Yr,
4244
- button: In,
4245
- divider: kr,
4246
- video: Ks,
4247
- social: Ds,
4248
- menu: $r,
4249
- table: Is,
4250
- spacer: As,
4251
- html: Fr,
4252
- countdown: C(() => import("./CountdownBlock-Bn5w7C-p.js").then((e) => e.n))
4455
+ }), nc = {
4456
+ section: Es,
4457
+ title: Pi,
4458
+ paragraph: hi,
4459
+ image: ni,
4460
+ button: Un,
4461
+ divider: Ir,
4462
+ video: tc,
4463
+ social: Is,
4464
+ menu: oi,
4465
+ table: Gs,
4466
+ spacer: zs,
4467
+ html: Hr,
4468
+ countdown: C(() => import("./CountdownBlock-BUHYIAe9.js").then((e) => e.n))
4253
4469
  };
4254
- function Js(e) {
4255
- let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Ft(r);
4470
+ function rc(e) {
4471
+ let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = It(r);
4256
4472
  t.setUiTheme(n.uiTheme ?? "auto");
4257
- let { resolvedTheme: l } = hn(j(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = _n({
4473
+ let { resolvedTheme: l } = bn(M(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = Sn({
4258
4474
  themeOverrides: d,
4259
4475
  resolvedTheme: l,
4260
4476
  extraStyles: e.themeExtraStyles
4261
- }), p = Yt({
4477
+ }), p = Xt({
4262
4478
  content: t.content,
4263
4479
  setContent: (e, n) => t.setContent(e, n),
4264
4480
  ...e.historyOptions
4265
4481
  });
4266
- tn(t, p);
4267
- let m = Zt({
4482
+ nn(t, p);
4483
+ let m = Qt({
4268
4484
  addBlock: t.addBlock,
4269
4485
  removeBlock: t.removeBlock,
4270
4486
  updateBlock: t.updateBlock,
4271
4487
  selectBlock: t.selectBlock,
4272
4488
  findBlockLocation: t.findBlockLocation,
4273
4489
  blockDefaults: n.blockDefaults
4274
- }), h = $t(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Qt({
4490
+ }), h = en(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? $t({
4275
4491
  content: t.content,
4276
4492
  isDirty: () => t.state.isDirty,
4277
4493
  ...e.autoSaveOptions
@@ -4279,53 +4495,60 @@ function Js(e) {
4279
4495
  g && (v = c(p.isNavigating, (e) => {
4280
4496
  e ? g.pause() : g.resume();
4281
4497
  }));
4282
- let y = mn(t, {
4498
+ let y = yn(t, {
4283
4499
  t: a,
4284
4500
  format: o
4285
- }), b = xn();
4286
- if (En(b, qs), n.customBlocks?.length) for (let e of n.customBlocks) b.registerCustom(e, Dr);
4287
- function x(e) {
4288
- for (let t of e) b.registerCustom(t, Dr);
4501
+ }, n.customBlocks ?? []), b = Qe(n.colors);
4502
+ if (b.allowCustomIgnored && Tn.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && Tn.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
4503
+ let e = Pn(b.presets, n.blockDefaults, n.templateDefaults);
4504
+ e.length > 0 && Tn.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
4505
+ }
4506
+ let x = En();
4507
+ jn(x, nc);
4508
+ let S = /* @__PURE__ */ new Set();
4509
+ function C(e) {
4510
+ for (let t of e) {
4511
+ x.registerCustom(t, Pr);
4512
+ for (let e of In(t, b)) S.has(e.id) || (S.add(e.id), Tn.warn(e.message));
4513
+ }
4289
4514
  }
4290
- let S = on();
4291
- if (s() && u(S.dispose), e.containerEl) {
4515
+ n.customBlocks?.length && C(n.customBlocks);
4516
+ let w = un();
4517
+ if (s() && u(w.dispose), e.containerEl) {
4292
4518
  let t = e.containerEl;
4293
- et(document, "pointerdown", (e) => {
4519
+ tt(document, "pointerdown", (e) => {
4294
4520
  let n = t.value;
4295
- n && (e.composedPath?.() ?? []).includes(n) && S.claim();
4521
+ n && (e.composedPath?.() ?? []).includes(n) && w.claim();
4296
4522
  }, { capture: !0 });
4297
4523
  }
4298
- function C(r) {
4299
- S.isActive() && jn(r, {
4524
+ function T(r) {
4525
+ w.isActive() && Rn(r, {
4300
4526
  history: p,
4301
4527
  selectBlock: (e) => t.selectBlock(e),
4302
4528
  getSelectedBlockId: () => t.state.selectedBlockId,
4303
4529
  removeBlock: (e) => t.removeBlock(e),
4304
4530
  onSave: n.onSave,
4305
- onBeforeUndo: e.keyboardOptions?.onBeforeUndo
4531
+ onBeforeUndo: e.keyboardOptions?.onBeforeUndo,
4532
+ isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
4533
+ onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
4534
+ onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
4306
4535
  });
4307
4536
  }
4308
- et(document, "keydown", C);
4309
- let w = _(null);
4310
- E(yt, e.editorRoot ?? document), E(lt, w), E(dt, r), E(bt, t), E(At, p), E(xt, m), E(_t, h), E(mt, i), E(st, f), E(Pt, l), E(ht, n.blockDefaults), E(Dt, b), E(vt, n.customBlocks ?? []), E(ct, n.paletteBlocks), E(Nt, Dn(n.htmlBlockPreview));
4311
- let T = Ze(n.colors);
4312
- if (T.allowCustomIgnored && bn.warn("config.colors.allowCustom: false is ignored without presets keeping the color wheel and hex input so a color can still be chosen."), T.invalidPresets.length > 0 && bn.warn(`config.colors.presets skipped invalid entries: ${T.invalidPresets.join(", ")} presets must be hex colors (#rgb or #rrggbb).`), T.allowCustom === !1) {
4313
- let e = kn(T.presets, n.blockDefaults, n.templateDefaults);
4314
- e.length > 0 && bn.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
4315
- }
4316
- E(wt, T), E(Ot, Sn(t.content, b));
4317
- let D = me(n.mergeTags?.syntax);
4318
- E(pt, n.mergeTags?.tags ?? []), E(ut, D), E(St, n.mergeTags?.onRequest ?? null), E(at, n.mergeTags?.autocomplete !== !1), E(it, ln()), E(rt, n.logicTags?.tags ?? []), E(ft, n.logicTags?.pairs ?? []), E(Ct, n.logicTags?.onRequest ?? null), E(jt, un()), E(tt, n.onRequestMedia ?? null), E(gt, n.resolveImageUrl ? sn(n.resolveImageUrl) : null), E(Tt, n.displayConditions?.conditions ?? []), E(Et, n.displayConditions?.allowCustom ?? !1), E(kt, e.capabilities ?? {}), E(Mt, y);
4319
- let O = dn(n.lint) ? null : fn({
4537
+ tt(document, "keydown", T);
4538
+ let D = _(null);
4539
+ E(bt, e.editorRoot ?? document), E(ut, D), E(ft, r), E(xt, t), E(jt, p), E(St, m), E(vt, h), E(ht, i), E(ct, f), E(Ft, l), E(gt, n.blockDefaults), E(Ot, x), E(yt, n.customBlocks ?? []), E(lt, n.paletteBlocks), E(Pt, Mn(n.htmlBlockPreview)), E(Tt, b), E(kt, Dn(t.content, x));
4540
+ let O = pe(n.mergeTags?.syntax);
4541
+ E(mt, n.mergeTags?.tags ?? []), E(dt, O), E(Ct, n.mergeTags?.onRequest ?? null), E(ot, n.mergeTags?.autocomplete !== !1), E(at, pn()), E(it, n.logicTags?.tags ?? []), E(pt, n.logicTags?.pairs ?? []), E(wt, n.logicTags?.onRequest ?? null), E(Mt, mn()), E(nt, n.onRequestMedia ?? null), E(_t, n.resolveImageUrl ? dn(n.resolveImageUrl) : null), E(Et, n.displayConditions?.conditions ?? []), E(Dt, n.displayConditions?.allowCustom ?? !1), E(At, e.capabilities ?? {}), E(Nt, y);
4542
+ let k = hn(n.lint) ? null : gn({
4320
4543
  content: t.content,
4321
4544
  options: n.lint ?? {},
4322
4545
  updateBlock: t.updateBlock,
4323
4546
  updateSettings: t.updateSettings,
4324
4547
  removeBlock: t.removeBlock
4325
4548
  });
4326
- E(ot, O);
4327
- function k() {
4328
- v?.(), O?.destroy(), g?.destroy(), p.destroy();
4549
+ E(st, k);
4550
+ function A() {
4551
+ v?.(), k?.destroy(), g?.destroy(), p.destroy();
4329
4552
  }
4330
4553
  return {
4331
4554
  t: a,
@@ -4337,13 +4560,13 @@ function Js(e) {
4337
4560
  resolvedTheme: l,
4338
4561
  themeStyles: f,
4339
4562
  themeOverrides: d,
4340
- registry: b,
4563
+ registry: x,
4341
4564
  keyboardReorder: y,
4342
- templateLint: O,
4343
- popoverRoot: w,
4344
- registerCustomBlocks: x,
4345
- destroy: k
4565
+ templateLint: k,
4566
+ popoverRoot: D,
4567
+ registerCustomBlocks: C,
4568
+ destroy: A
4346
4569
  };
4347
4570
  }
4348
4571
  //#endregion
4349
- export { qn as A, Gt as B, lr as C, tr as D, nr as E, zn as F, In as I, bn as L, Wn as M, Vn as N, Qn as O, Bn as P, pn as R, mr as S, rr as T, Fr as _, Ds as a, vr as b, ps as c, ui as d, li as f, Lr as g, Yr as h, As as i, Gn as j, Jn as k, Ei as l, $r as m, Ks as n, bs as o, ci as p, Is as r, _s as s, Js as t, wi as u, kr as v, cr as w, gr as x, Dr as y, en as z };
4572
+ export { tr as A, Fn as B, xr as C, lr as D, ur as E, Jn as F, tn as G, vn as H, qn as I, Kt as K, Kn as L, Qn as M, Zn as N, cr as O, Xn as P, Wn as R, Cr as S, hr as T, _n as U, Tn as V, on as W, Wr as _, Is as a, Pr as b, Ss as c, vi as d, gi as f, ni as g, oi as h, zs as i, er as j, ar as k, Pi as l, hi as m, tc as n, ks as o, _i as p, rn as q, Gs as r, Es as s, rc as t, Mi as u, Hr as v, gr as w, Tr as x, Ir as y, Un as z };