@templatical/editor 0.7.2 → 0.8.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 (134) hide show
  1. package/dist/{AiChatSidebar-DWRONNm6.js → AiChatSidebar-B74X6tIx.js} +49 -59
  2. package/dist/{AiFeatureMenu-U7b4Z8OV.js → AiFeatureMenu-BOxQqkn9.js} +4 -4
  3. package/dist/{BlockA11yBadge-BFIw0h1m.js → BlockIssueBadge-DJTiT1eF.js} +6 -6
  4. package/dist/{CloudEditor-DgiUCNMn.js → CloudEditor-BzCVDD6e.js} +125 -121
  5. package/dist/{CollaboratorBar-BgeaMhrV.js → CollaboratorBar-Cb-c1IkS.js} +3 -3
  6. package/dist/{CommentsSidebar-BiRtaXYD.js → CommentsSidebar-Qvppl-DR.js} +7 -7
  7. package/dist/{CountdownBlock-Cq8A8WrM.js → CountdownBlock-D0IiMliC.js} +1 -1
  8. package/dist/{CountdownToolbar-CojjlZet.js → CountdownToolbar-BVVT8U5C.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-C1W02bYt.js → DesignReferenceSidebar-ucgtoDll.js} +7 -7
  10. package/dist/{AccessibilityPanel-D-PqmHdH.js → IssuesPanel-XVdvrgmq.js} +18 -18
  11. package/dist/{ModuleBrowserModal-Bjh99_5c.js → ModuleBrowserModal-BotDsZ0R.js} +7 -7
  12. package/dist/{ModulePreviewCanvas-DDDQmUI_.js → ModulePreviewCanvas-CDg4MnJP.js} +2 -2
  13. package/dist/{NumberWithSuffix-CLTBb2Rj.js → NumberWithSuffix-n-cr7lpU.js} +2 -2
  14. package/dist/{ParagraphEditor-BSaEdasm.js → ParagraphEditor-CfzIUFQ_.js} +18 -18
  15. package/dist/{RichTextEditorContent-C3QSg7gd.js → RichTextEditorContent-Cu9NEkKd.js} +3 -3
  16. package/dist/{SaveModuleDialog-9fX6oSxf.js → SaveModuleDialog-DuzfCamG.js} +6 -6
  17. package/dist/{SnapshotHistory-gYW-IXkE.js → SnapshotHistory-DiAPOSDM.js} +6 -6
  18. package/dist/{TemplateScoringPanel-V79yrEPC.js → TemplateScoringPanel-BzDVdfOx.js} +6 -6
  19. package/dist/{TestEmailModal-B_Rmnngq.js → TestEmailModal-D5I5Mgtb.js} +3 -3
  20. package/dist/{TitleEditor-XbFuw1Vy.js → TitleEditor-CZUkhtDo.js} +9 -9
  21. package/dist/{TplModal-LY9rkDph.js → TplModal-CVq2BAIW.js} +3 -3
  22. package/dist/{blockTypeIcons-CLT2H0yU.js → blockTypeIcons-CJNuGjLX.js} +1 -1
  23. package/dist/bundle-stats.json +7 -7
  24. package/dist/cdn/chunks/{AiFeatureMenu-WhZ7G-Wr.js → AiFeatureMenu-DtrT-aFR.js} +8 -8
  25. package/dist/cdn/chunks/{AiFeatureMenu-WhZ7G-Wr.js.map → AiFeatureMenu-DtrT-aFR.js.map} +1 -1
  26. package/dist/cdn/chunks/{BlockA11yBadge-BLKyO0lH.js → BlockIssueBadge-w7n4orSd.js} +6 -6
  27. package/dist/cdn/chunks/BlockIssueBadge-w7n4orSd.js.map +1 -0
  28. package/dist/cdn/chunks/{CloudEditor-BKEXPt3g.js → CloudEditor-CwG0DhG1.js} +166 -162
  29. package/dist/cdn/chunks/CloudEditor-CwG0DhG1.js.map +1 -0
  30. package/dist/cdn/chunks/{CollaboratorBar-ASDiTitQ.js → CollaboratorBar-DYjZaz7H.js} +3 -3
  31. package/dist/cdn/chunks/{CollaboratorBar-ASDiTitQ.js.map → CollaboratorBar-DYjZaz7H.js.map} +1 -1
  32. package/dist/cdn/chunks/{CountdownBlock-LAlYJYWL.js → CountdownBlock-CFR8VJCU.js} +2 -2
  33. package/dist/cdn/chunks/{CountdownBlock-LAlYJYWL.js.map → CountdownBlock-CFR8VJCU.js.map} +1 -1
  34. package/dist/cdn/chunks/{CountdownToolbar-CbIKGP7u.js → CountdownToolbar-DOrQCH57.js} +3 -3
  35. package/dist/cdn/chunks/{CountdownToolbar-CbIKGP7u.js.map → CountdownToolbar-DOrQCH57.js.map} +1 -1
  36. package/dist/cdn/chunks/{AccessibilityPanel-DaqF4Xzy.js → IssuesPanel-C54PhBgc.js} +16 -16
  37. package/dist/cdn/chunks/IssuesPanel-C54PhBgc.js.map +1 -0
  38. package/dist/cdn/chunks/{ModuleBrowserModal-BjmdleNq.js → ModuleBrowserModal-4V6um-AC.js} +8 -8
  39. package/dist/cdn/chunks/{ModuleBrowserModal-BjmdleNq.js.map → ModuleBrowserModal-4V6um-AC.js.map} +1 -1
  40. package/dist/cdn/chunks/{ModulePreviewCanvas-DsmACAdb.js → ModulePreviewCanvas-DL8zI6VX.js} +26 -26
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-DsmACAdb.js.map → ModulePreviewCanvas-DL8zI6VX.js.map} +1 -1
  42. package/dist/cdn/chunks/{NumberWithSuffix-EEDNj1my.js → NumberWithSuffix-avXrYDo6.js} +2 -2
  43. package/dist/cdn/chunks/{NumberWithSuffix-EEDNj1my.js.map → NumberWithSuffix-avXrYDo6.js.map} +1 -1
  44. package/dist/cdn/chunks/{ParagraphEditor-D6Dw5RtX.js → ParagraphEditor-Cpmy85zL.js} +39 -39
  45. package/dist/cdn/chunks/{ParagraphEditor-D6Dw5RtX.js.map → ParagraphEditor-Cpmy85zL.js.map} +1 -1
  46. package/dist/cdn/chunks/{RichTextEditorContent-C2yj_yPM.js → RichTextEditorContent-CFL-Lrv5.js} +5 -5
  47. package/dist/cdn/chunks/{RichTextEditorContent-C2yj_yPM.js.map → RichTextEditorContent-CFL-Lrv5.js.map} +1 -1
  48. package/dist/cdn/chunks/{SaveModuleDialog-DCcvwYat.js → SaveModuleDialog-D6szy5vX.js} +14 -14
  49. package/dist/cdn/chunks/{SaveModuleDialog-DCcvwYat.js.map → SaveModuleDialog-D6szy5vX.js.map} +1 -1
  50. package/dist/cdn/chunks/{TitleEditor-isN_t0MJ.js → TitleEditor-CSDdss38.js} +9 -9
  51. package/dist/cdn/chunks/{TitleEditor-isN_t0MJ.js.map → TitleEditor-CSDdss38.js.map} +1 -1
  52. package/dist/cdn/chunks/blockTypeIcons-BEdpG8xl.js +22 -0
  53. package/dist/cdn/chunks/{blockTypeIcons-Bgn69Q1-.js.map → blockTypeIcons-BEdpG8xl.js.map} +1 -1
  54. package/dist/{de-BhIWu_bO.js → cdn/chunks/de-BBEGQDsd.js} +9 -7
  55. package/dist/cdn/chunks/{de-B_6zGPbx.js.map → de-BBEGQDsd.js.map} +1 -1
  56. package/dist/{en-D7HRbYah.js → cdn/chunks/en-CHha-_ta.js} +9 -7
  57. package/dist/cdn/chunks/{en-pYt1-lm4.js.map → en-CHha-_ta.js.map} +1 -1
  58. package/dist/cdn/chunks/{extensions-BPsjY5N8.js → extensions-DgvvgeJU.js} +50 -48
  59. package/dist/cdn/chunks/{extensions-BPsjY5N8.js.map → extensions-DgvvgeJU.js.map} +1 -1
  60. package/dist/cdn/chunks/{features-BouLRfOO.js → features-CgTy87Ni.js} +1276 -1119
  61. package/dist/cdn/chunks/features-CgTy87Ni.js.map +1 -0
  62. package/dist/cdn/chunks/{icons-BBuZkqC3.js → icons-DxJ--AJb.js} +36 -38
  63. package/dist/cdn/chunks/icons-DxJ--AJb.js.map +1 -0
  64. package/dist/cdn/chunks/{media-library-C-DcHE6w.js → media-library-Byh_BbTm.js} +113 -113
  65. package/dist/cdn/chunks/{media-library-C-DcHE6w.js.map → media-library-Byh_BbTm.js.map} +1 -1
  66. package/dist/{pt-BR-K32lt6YP.js → cdn/chunks/pt-BR-CFomv2R8.js} +9 -7
  67. package/dist/cdn/chunks/{pt-BR-CtDwVsN-.js.map → pt-BR-CFomv2R8.js.map} +1 -1
  68. package/dist/cdn/chunks/quality-CHCEMG8e.js +1846 -0
  69. package/dist/cdn/chunks/quality-CHCEMG8e.js.map +1 -0
  70. package/dist/cdn/chunks/{renderer-F8cxEe3t.js → renderer-DttVILgu.js} +50 -50
  71. package/dist/cdn/chunks/{renderer-F8cxEe3t.js.map → renderer-DttVILgu.js.map} +1 -1
  72. package/dist/cdn/chunks/{src-C9rMok-R.js → src-a8fYhBi5.js} +8 -8
  73. package/dist/cdn/chunks/{src-C9rMok-R.js.map → src-a8fYhBi5.js.map} +1 -1
  74. package/dist/cdn/chunks/styles-8qDRQ-6n.js +3001 -0
  75. package/dist/cdn/chunks/styles-8qDRQ-6n.js.map +1 -0
  76. package/dist/cdn/editor.css +1 -1
  77. package/dist/cdn/editor.js +112 -109
  78. package/dist/cdn/editor.js.map +1 -1
  79. package/dist/{cdn/chunks/de-B_6zGPbx.js → de-KFqjrxG3.js} +7 -9
  80. package/dist/{dist-DDJIWTRY.js → dist-B2jcQhv8.js} +1 -1
  81. package/dist/{dist-wzMIGj-D.js → dist-BYt3jdCR.js} +1 -1
  82. package/dist/{dist-aRzjfSRN.js → dist-CISFttkF.js} +1 -1
  83. package/dist/{dist-D6uC2xhi.js → dist-CfQPBf15.js} +1 -1
  84. package/dist/{dist-DjviJBCi.js → dist-DD-9hatO.js} +1 -1
  85. package/dist/{dist-KoBJjK1G.js → dist-DUvhjQ2-.js} +1 -1
  86. package/dist/{dist-BaQIYPsn.js → dist-DVwOAodp.js} +1 -1
  87. package/dist/{dist-Cp0zXPAD.js → dist-DxD1kSdH.js} +1 -1
  88. package/dist/{dist-Pk4MhWMP.js → dist-U5guDm2w.js} +1 -1
  89. package/dist/{dist-D90y8dvT.js → dist-hfu7I2rO.js} +3 -3
  90. package/dist/{dist-us-RpCWN.js → dist-v8h02hhE.js} +1 -1
  91. package/dist/{cdn/chunks/en-pYt1-lm4.js → en-CNm94YYD.js} +7 -9
  92. package/dist/{extensions-D-J02CiP.js → extensions-C-FpnfJn.js} +32 -30
  93. package/dist/index.d.ts +13 -11
  94. package/dist/{keys-B5SJtPWf.js → keys-CY3tkCsv.js} +2 -2
  95. package/dist/list-checks-CMtEXe9l.js +25 -0
  96. package/dist/{cdn/chunks/pt-BR-CtDwVsN-.js → pt-BR-gxZZAUWp.js} +7 -9
  97. package/dist/style.css +1 -1
  98. package/dist/{styles-j_3bu0Bo.js → styles-Ci7RdimQ.js} +1096 -1065
  99. package/dist/templatical-editor.js +108 -105
  100. package/dist/useAliveFlag-D8GoB4VE.js +10 -0
  101. package/dist/{useCloudI18n-ByEMykjO.js → useCloudI18n-BPUHj2CZ.js} +1 -1
  102. package/dist/{useEditorCore-B1XrI6fY.js → useEditorCore-DT3VrvZS.js} +940 -785
  103. package/dist/{useI18n-PEB8ioi_.js → useI18n-CWX9ZTCW.js} +1 -1
  104. package/dist/{useMergeTag-C47xwU7X.js → useMergeTag-B3F9VR04.js} +2 -2
  105. package/dist/{usePopoverRoot-BxJrqnMD.js → usePopoverRoot-BKJcxsst.js} +1 -1
  106. package/package.json +7 -7
  107. package/dist/accessibility-BgUEA-Ai.js +0 -27
  108. package/dist/cdn/chunks/AccessibilityPanel-DaqF4Xzy.js.map +0 -1
  109. package/dist/cdn/chunks/BlockA11yBadge-BLKyO0lH.js.map +0 -1
  110. package/dist/cdn/chunks/CloudEditor-BKEXPt3g.js.map +0 -1
  111. package/dist/cdn/chunks/blockTypeIcons-Bgn69Q1-.js +0 -22
  112. package/dist/cdn/chunks/features-BouLRfOO.js.map +0 -1
  113. package/dist/cdn/chunks/icons-BBuZkqC3.js.map +0 -1
  114. package/dist/cdn/chunks/quality-ConWSEB6.js +0 -1456
  115. package/dist/cdn/chunks/quality-ConWSEB6.js.map +0 -1
  116. package/dist/cdn/chunks/styles-BRN0i_zg.js +0 -2971
  117. package/dist/cdn/chunks/styles-BRN0i_zg.js.map +0 -1
  118. /package/dist/{check-Bg5yrRmX.js → check-BF4bEbCU.js} +0 -0
  119. /package/dist/{chevron-down-tee-ghFi.js → chevron-down-4NzWtv6Y.js} +0 -0
  120. /package/dist/{circle-alert-C0L9pUQ4.js → circle-alert-CPIth9bC.js} +0 -0
  121. /package/dist/{clock-CDlEdqiP.js → clock-B9-ct9r_.js} +0 -0
  122. /package/dist/{cloud-CTmfCSqf.js → cloud-k0DgeCo2.js} +0 -0
  123. /package/dist/{de-Di4MEjjx.js → de-GOtR9DwW.js} +0 -0
  124. /package/dist/{dist-iLBdeBDR.js → dist-CQQS9SRN.js} +0 -0
  125. /package/dist/{emojiData-DX3E0XT-.js → emojiData-DrBuvEoP.js} +0 -0
  126. /package/dist/{en-BSuzi-Pd.js → en-dFFQVzNn.js} +0 -0
  127. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-bvx5sFh5.js} +0 -0
  128. /package/dist/{image-up-1D_3XDdO.js → image-up-CubAveUO.js} +0 -0
  129. /package/dist/{info-DTGrc0Bx.js → info-DiINxXfZ.js} +0 -0
  130. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-DX8ZHRdq.js} +0 -0
  131. /package/dist/{pt-BR-CCVBRais.js → pt-BR-iOr79aDg.js} +0 -0
  132. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-CXzrEnNb.js} +0 -0
  133. /package/dist/{refresh-cw-BNAhAmtL.js → refresh-cw-C9_M6yB3.js} +0 -0
  134. /package/dist/{styleConstants-fWzlIIwN.js → styleConstants-DkfOPzGu.js} +0 -0
@@ -1,20 +1,24 @@
1
- import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as ae, x as oe, y as se, z as ce } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
- import { A as le, S as ue, T as de, _ as fe, a as pe, b as me, c as he, d as ge, f as _e, g as ve, h as ye, j as be, k as xe, l as Se, m as Ce, o as we, p as Te, s as Ee, t as De, u as Oe, v as ke, x as Ae, y as je } from "./dist-DJmnUmW9.js";
3
- import { a as Me, c as Ne, i as Pe, l as Fe, n as Ie, r as Le, s as Re } from "./dist-BzRLLpfq.js";
4
- import { A as ze, C as Be, D as Ve, O as He, S as Ue, _ as We, a as Ge, b as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, k as Qe, m as $e, o as et, p as tt, r as nt, s as rt, t as it, v as at, w as ot, x as st, y as ct } from "./keys-B5SJtPWf.js";
5
- import { t as lt } from "./useI18n-PEB8ioi_.js";
6
- import { t as P } from "./createLucideIcon-Di4mqmGn.js";
7
- import { t as ut } from "./message-circle-gzy2ZGJ3.js";
8
- import { t as dt } from "./trash-2-424iqbpN.js";
9
- import { t as ft } from "./triangle-alert-DWQySIE2.js";
10
- import { t as pt } from "./LoadingTrack-CFkDkjBb.js";
11
- import { t as mt } from "./_plugin-vue_export-helper-B0hnzhyu.js";
12
- import "./useCloudI18n-ByEMykjO.js";
13
- import { t as ht } from "./useMergeTag-C47xwU7X.js";
1
+ import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as P, x as ae, y as oe, z as se } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
2
+ import { A as ce, S as le, T as ue, _ as de, a as fe, b as pe, c as me, d as he, f as ge, g as _e, h as ve, j as ye, k as be, l as xe, m as Se, o as Ce, p as we, s as Te, t as Ee, u as De, v as Oe, x as ke, y as Ae } from "./dist-DJmnUmW9.js";
3
+ import { a as je, c as Me, i as Ne, l as Pe, n as Fe, r as Ie, s as Le } from "./dist-BzRLLpfq.js";
4
+ import { A as Re, C as ze, D as Be, E as Ve, O as He, S as Ue, _ as We, a as Ge, b as Ke, d as qe, f as Je, g as Ye, h as Xe, i as Ze, k as Qe, m as $e, n as et, o as tt, p as nt, s as rt, u as it, v as at, x as ot, y as st } from "./keys-CY3tkCsv.js";
5
+ import { t as ct } from "./useI18n-CWX9ZTCW.js";
6
+ import { t as F } from "./createLucideIcon-Di4mqmGn.js";
7
+ import { t as lt } from "./message-circle-gzy2ZGJ3.js";
8
+ import { t as ut } from "./trash-2-424iqbpN.js";
9
+ import { t as dt } from "./triangle-alert-DWQySIE2.js";
10
+ import { t as ft } from "./LoadingTrack-CFkDkjBb.js";
11
+ import { t as pt } from "./_plugin-vue_export-helper-B0hnzhyu.js";
12
+ import "./useCloudI18n-BPUHj2CZ.js";
13
+ import { t as mt } from "./useMergeTag-B3F9VR04.js";
14
+ import { t as ht } from "./useAliveFlag-D8GoB4VE.js";
14
15
  //#region ../core/dist/index.js
15
16
  function gt(e) {
17
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
18
+ }
19
+ function _t(e) {
16
20
  let t = o({
17
- content: e.content ?? Oe(e.defaultFontFamily, e.templateDefaults),
21
+ content: e.content ?? De(e.defaultFontFamily, e.templateDefaults),
18
22
  selectedBlockId: null,
19
23
  viewport: "desktop",
20
24
  darkMode: !1,
@@ -37,12 +41,15 @@ function gt(e) {
37
41
  }
38
42
  return null;
39
43
  }
40
- function a(e, t, n = { blocks: e }) {
44
+ function a(e, t) {
45
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) a(e, t);
46
+ }
47
+ function s(e, t, n = { blocks: e }) {
41
48
  for (let r = 0; r < e.length; r++) {
42
49
  let i = e[r];
43
50
  if (i.id === t) return n;
44
51
  if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
45
- let n = a(i.children[e], t, {
52
+ let n = s(i.children[e], t, {
46
53
  blocks: i.children[e],
47
54
  sectionId: i.id,
48
55
  columnIndex: e
@@ -52,11 +59,11 @@ function gt(e) {
52
59
  }
53
60
  return null;
54
61
  }
55
- function s(t) {
62
+ function c(t) {
56
63
  return e.lockedBlocks?.value.has(t) ?? !1;
57
64
  }
58
- function c(e) {
59
- let n = a(t.content.blocks, e);
65
+ function l(e) {
66
+ let n = s(t.content.blocks, e);
60
67
  if (!n) return null;
61
68
  let r = n.blocks.findIndex((t) => t.id === e);
62
69
  return r === -1 ? null : {
@@ -65,40 +72,41 @@ function gt(e) {
65
72
  index: r
66
73
  };
67
74
  }
68
- function l(e, n = !0) {
75
+ function u(e, n = !0) {
69
76
  t.content = e, n && (t.isDirty = !0);
70
77
  }
71
- function u(e) {
72
- e && s(e) || (t.selectedBlockId = e);
73
- }
74
78
  function d(e) {
75
- t.viewport = e;
79
+ e && c(e) || (t.selectedBlockId = e);
76
80
  }
77
81
  function f(e) {
78
- t.darkMode = e;
82
+ t.viewport = e;
79
83
  }
80
84
  function p(e) {
81
- t.uiTheme = e;
85
+ t.darkMode = e;
82
86
  }
83
87
  function h(e) {
88
+ t.uiTheme = e;
89
+ }
90
+ function _(e) {
84
91
  t.previewMode = e, e && (t.selectedBlockId = null);
85
92
  }
86
- function _(e, n) {
87
- if (s(e)) return;
93
+ function v(e, n) {
94
+ if (c(e)) return;
88
95
  let r = i(t.content.blocks, e);
89
96
  r && (Object.assign(r, n), t.isDirty = !0);
90
97
  }
91
- function v(e) {
98
+ function y(e) {
92
99
  t.content.settings = {
93
100
  ...t.content.settings,
94
101
  ...e
95
102
  }, t.isDirty = !0;
96
103
  }
97
- function y(e, n, r = 0, a) {
104
+ function b(e, n, r = 0, a) {
98
105
  if (n) {
99
- if (s(n)) return;
106
+ if (c(n)) return;
100
107
  let o = i(t.content.blocks, n);
101
108
  if (o && o.type === "section") {
109
+ if (r < 0 || r >= gt(o.columns)) return;
102
110
  o.children[r] = o.children[r] || [];
103
111
  let t = o.children[r];
104
112
  a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
@@ -106,55 +114,62 @@ function gt(e) {
106
114
  } else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
107
115
  t.isDirty = !0;
108
116
  }
109
- function b(e) {
110
- if (s(e)) return;
111
- let n = a(t.content.blocks, e);
117
+ function x(e) {
118
+ if (c(e)) return;
119
+ let n = s(t.content.blocks, e);
112
120
  if (n) {
113
121
  let r = n.blocks.findIndex((t) => t.id === e);
114
- r !== -1 && (n.blocks.splice(r, 1), t.selectedBlockId === e && (t.selectedBlockId = null), t.isDirty = !0);
122
+ if (r !== -1) {
123
+ let [e] = n.blocks.splice(r, 1);
124
+ if (t.selectedBlockId) {
125
+ let n = /* @__PURE__ */ new Set();
126
+ a(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
127
+ }
128
+ t.isDirty = !0;
129
+ }
115
130
  }
116
131
  }
117
- function x(e, n, r, o = 0) {
118
- if (s(e) || r && s(r)) return;
119
- let c = a(t.content.blocks, e);
120
- if (!c) return;
121
- let l = c.blocks.findIndex((t) => t.id === e);
132
+ function S(e, n, r, a = 0) {
133
+ if (c(e) || r && c(r)) return;
134
+ let o = s(t.content.blocks, e);
135
+ if (!o) return;
136
+ let l = o.blocks.findIndex((t) => t.id === e);
122
137
  if (l === -1) return;
123
138
  let u;
124
139
  if (r) {
125
140
  let e = i(t.content.blocks, r);
126
- if (!e || e.type !== "section") return;
127
- e.children[o] = e.children[o] || [], u = e.children[o];
141
+ if (!e || e.type !== "section" || a < 0 || a >= gt(e.columns)) return;
142
+ e.children[a] = e.children[a] || [], u = e.children[a];
128
143
  } else u = t.content.blocks;
129
- let [d] = c.blocks.splice(l, 1);
144
+ let [d] = o.blocks.splice(l, 1);
130
145
  u.splice(n, 0, d), t.isDirty = !0;
131
146
  }
132
- function S() {
147
+ function C() {
133
148
  t.isDirty = !0;
134
149
  }
135
150
  return {
136
151
  state: g(t),
137
152
  content: n,
138
153
  selectedBlock: r,
139
- isBlockLocked: s,
140
- setContent: l,
141
- selectBlock: u,
142
- setViewport: d,
143
- setDarkMode: f,
144
- setUiTheme: p,
145
- setPreviewMode: h,
146
- updateBlock: _,
147
- updateSettings: v,
148
- addBlock: y,
149
- removeBlock: b,
150
- moveBlock: x,
151
- markDirty: S,
152
- findBlockLocation: c
154
+ isBlockLocked: c,
155
+ setContent: u,
156
+ selectBlock: d,
157
+ setViewport: f,
158
+ setDarkMode: p,
159
+ setUiTheme: h,
160
+ setPreviewMode: _,
161
+ updateBlock: v,
162
+ updateSettings: y,
163
+ addBlock: b,
164
+ removeBlock: x,
165
+ moveBlock: S,
166
+ markDirty: C,
167
+ findBlockLocation: l
153
168
  };
154
169
  }
155
- var _t = 50, vt = 300, yt = 1500;
156
- function bt(e) {
157
- let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = _t } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
170
+ var vt = 50, yt = 300, bt = 1500;
171
+ function xt(e) {
172
+ let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = vt } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
158
173
  function f() {
159
174
  let e = /* @__PURE__ */ new WeakSet();
160
175
  return JSON.parse(JSON.stringify(t.value, (t, n) => {
@@ -179,21 +194,21 @@ function bt(e) {
179
194
  if (l && l.blockId === e) {
180
195
  clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
181
196
  l = null;
182
- }, vt);
197
+ }, yt);
183
198
  return;
184
199
  }
185
200
  g(), p(f()), o.value = [], l = {
186
201
  blockId: e,
187
202
  timeoutId: setTimeout(() => {
188
203
  l = null;
189
- }, vt)
204
+ }, yt)
190
205
  };
191
206
  }
192
207
  }
193
208
  function y() {
194
209
  s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
195
210
  s.value = !1, c = null;
196
- }, yt);
211
+ }, bt);
197
212
  }
198
213
  function b() {
199
214
  if (a.value.length === 0) return;
@@ -225,17 +240,33 @@ function bt(e) {
225
240
  destroy: C
226
241
  };
227
242
  }
228
- function xt(e) {
243
+ function St(e) {
244
+ e.type === "table" ? e.rows = e.rows.map((e) => ({
245
+ ...e,
246
+ id: le(),
247
+ cells: e.cells.map((e) => ({
248
+ ...e,
249
+ id: le()
250
+ }))
251
+ })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
252
+ ...e,
253
+ id: le()
254
+ })) : e.type === "menu" && (e.items = e.items.map((e) => ({
255
+ ...e,
256
+ id: le()
257
+ })));
258
+ }
259
+ function Ct(e) {
229
260
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
230
261
  function o(n, r, a) {
231
- let o = we(n, e.blockDefaults);
262
+ let o = Ce(n, e.blockDefaults);
232
263
  return t(o, r, a), i(o.id), o;
233
264
  }
234
265
  function s(e, n, r) {
235
266
  let o = JSON.parse(JSON.stringify(e));
236
- if (o.id = ue(), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
267
+ if (o.id = le(), St(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
237
268
  let t = JSON.parse(JSON.stringify(e));
238
- return t.id = ue(), t;
269
+ return t.id = le(), St(t), t;
239
270
  }))), n !== void 0 || r !== void 0) t(o, n, r);
240
271
  else {
241
272
  let i = a?.(e.id) ?? null;
@@ -256,7 +287,7 @@ function xt(e) {
256
287
  updateBlockProperty: l
257
288
  };
258
289
  }
259
- function St(e) {
290
+ function wt(e) {
260
291
  let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
261
292
  function c() {
262
293
  return typeof a == "function" ? a() : a;
@@ -292,7 +323,7 @@ function St(e) {
292
323
  destroy: h
293
324
  };
294
325
  }
295
- function Ct(e) {
326
+ function Tt(e) {
296
327
  let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
297
328
  function r(e) {
298
329
  return t.has(e);
@@ -310,7 +341,7 @@ function Ct(e) {
310
341
  hasHiddenBlocks: n
311
342
  };
312
343
  }
313
- function wt(e) {
344
+ function Et(e) {
314
345
  let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
315
346
  async function a() {
316
347
  let r = e.definition.value;
@@ -340,7 +371,7 @@ function wt(e) {
340
371
  needsFetch: i
341
372
  };
342
373
  }
343
- function Tt(e, t) {
374
+ function Dt(e, t) {
344
375
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
345
376
  e.addBlock = (r, i, a, o) => {
346
377
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -355,15 +386,38 @@ function Tt(e, t) {
355
386
  };
356
387
  }
357
388
  //#endregion
358
- //#region src/composables/useAccessibilityLint.ts
359
- function Et(e) {
389
+ //#region src/utils/activeEditorTracker.ts
390
+ var Ot = /* @__PURE__ */ new Set(), kt = 0, At = 0;
391
+ function jt() {
392
+ let e = ++At;
393
+ return Ot.add(e), kt === 0 && (kt = e), {
394
+ id: e,
395
+ isActive: () => Ot.size <= 1 || kt === e,
396
+ claim: () => {
397
+ kt = e;
398
+ },
399
+ dispose: () => {
400
+ if (Ot.delete(e), kt === e) {
401
+ let e = Array.from(Ot);
402
+ kt = e[e.length - 1] ?? 0;
403
+ }
404
+ }
405
+ };
406
+ }
407
+ //#endregion
408
+ //#region src/composables/useTemplateLint.ts
409
+ function Mt(e) {
360
410
  let t = h([]), n = h(!1), r = h(!1), i = d(null), a = e.options.disabled === !0, o = null, c = !1;
361
411
  a || l();
362
412
  async function l() {
363
413
  try {
364
414
  let t = await import("@templatical/quality");
365
415
  if (c) return;
366
- i.value = t.lintAccessibility, n.value = !0, u(), o = Fe(e.content, u, {
416
+ i.value = {
417
+ lintAccessibility: t.lintAccessibility,
418
+ lintStructure: t.lintStructure,
419
+ lintLinks: t.lintLinks
420
+ }, n.value = !0, u(), o = Pe(e.content, u, {
367
421
  debounce: e.debounce ?? 500,
368
422
  deep: !0
369
423
  });
@@ -373,7 +427,13 @@ function Et(e) {
373
427
  }
374
428
  }
375
429
  function u() {
376
- i.value && (t.value = i.value(e.content.value, e.options));
430
+ if (!i.value) return;
431
+ let n = i.value.lintAccessibility(e.content.value, e.options), r = i.value.lintStructure(e.content.value, e.options), a = i.value.lintLinks(e.content.value, e.options);
432
+ t.value = [
433
+ ...n,
434
+ ...r,
435
+ ...a
436
+ ];
377
437
  }
378
438
  let f = s(() => e.options, () => {
379
439
  i.value && u();
@@ -381,7 +441,8 @@ function Et(e) {
381
441
  function p(t) {
382
442
  t.fix && t.fix.apply({
383
443
  updateBlock: e.updateBlock,
384
- updateSettings: e.updateSettings
444
+ updateSettings: e.updateSettings,
445
+ removeBlock: e.removeBlock
385
446
  });
386
447
  }
387
448
  function m() {
@@ -397,12 +458,12 @@ function Et(e) {
397
458
  }
398
459
  //#endregion
399
460
  //#region src/utils/blockTypeLabels.ts
400
- function Dt(e, t) {
461
+ function Nt(e, t) {
401
462
  return t.blocks[e] ?? e;
402
463
  }
403
464
  //#endregion
404
465
  //#region src/composables/useKeyboardReorder.ts
405
- function Ot(e, t) {
466
+ function Pt(e, t) {
406
467
  let n = h(null), r = h(""), i = null;
407
468
  function a(t) {
408
469
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
@@ -429,7 +490,7 @@ function Ot(e, t) {
429
490
  let r = a(n);
430
491
  if (!r) return "";
431
492
  let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
432
- return i ? Dt(i.type, t.t) : "";
493
+ return i ? Nt(i.type, t.t) : "";
433
494
  }
434
495
  function s(t, n) {
435
496
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
@@ -498,13 +559,13 @@ function Ot(e, t) {
498
559
  }
499
560
  //#endregion
500
561
  //#region src/composables/useUiTheme.ts
501
- function kt(e) {
502
- let t = Pe("(prefers-color-scheme: dark)");
562
+ function Ft(e) {
563
+ let t = Ne("(prefers-color-scheme: dark)");
503
564
  return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
504
565
  }
505
566
  //#endregion
506
567
  //#region src/composables/useThemeStyles.ts
507
- var At = {
568
+ var It = {
508
569
  bg: "--tpl-bg",
509
570
  bgElevated: "--tpl-bg-elevated",
510
571
  bgHover: "--tpl-bg-hover",
@@ -528,10 +589,10 @@ var At = {
528
589
  dangerLight: "--tpl-danger-light",
529
590
  canvasBg: "--tpl-canvas-bg"
530
591
  };
531
- function jt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
592
+ function Lt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
532
593
  return { themeStyles: x(() => {
533
594
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
534
- if (a) for (let [e, t] of Object.entries(At)) {
595
+ if (a) for (let [e, t] of Object.entries(It)) {
535
596
  let n = a[e];
536
597
  n && (r[t] = n);
537
598
  }
@@ -540,27 +601,27 @@ function jt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
540
601
  }
541
602
  //#endregion
542
603
  //#region src/utils/logger.ts
543
- var Mt = "[Templatical]";
544
- function Nt() {
604
+ var Rt = "[Templatical]";
605
+ function zt() {
545
606
  return typeof process < "u" && process.env.NODE_ENV === "production";
546
607
  }
547
- var Pt = {
608
+ var Bt = {
548
609
  warn(...e) {
549
- console.warn(Mt, ...e);
610
+ console.warn(Rt, ...e);
550
611
  },
551
612
  error(...e) {
552
- console.error(Mt, ...e);
613
+ console.error(Rt, ...e);
553
614
  },
554
615
  debug(...e) {
555
- Nt() || console.debug(Mt, ...e);
616
+ zt() || console.debug(Rt, ...e);
556
617
  },
557
618
  info(...e) {
558
- Nt() || console.info(Mt, ...e);
619
+ zt() || console.info(Rt, ...e);
559
620
  }
560
621
  };
561
622
  //#endregion
562
623
  //#region src/composables/useBlockRegistry.ts
563
- function Ft() {
624
+ function Vt() {
564
625
  let e = d(/* @__PURE__ */ new Map());
565
626
  function t(t, n) {
566
627
  e.value.set(t, n), k(e);
@@ -568,7 +629,7 @@ function Ft() {
568
629
  function n(t, n) {
569
630
  let r = `custom:${t.type}`, i = {
570
631
  component: n,
571
- createBlock: () => Se(t),
632
+ createBlock: () => xe(t),
572
633
  sidebarItem: {
573
634
  type: r,
574
635
  label: t.name,
@@ -606,13 +667,13 @@ function Ft() {
606
667
  let t = o(e.customType);
607
668
  if (!t) return s("Block definition not found");
608
669
  try {
609
- let { Liquid: n } = await import("./liquid.browser-CdMv1BTn.js");
670
+ let { Liquid: n } = await import("./liquid.browser-DX8ZHRdq.js");
610
671
  return await new n({
611
672
  strictVariables: !1,
612
673
  strictFilters: !1
613
674
  }).parseAndRender(t.template, e.fieldValues);
614
675
  } catch (t) {
615
- return Pt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
676
+ return Bt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
616
677
  }
617
678
  }
618
679
  function l(t) {
@@ -631,75 +692,75 @@ function Ft() {
631
692
  }
632
693
  //#endregion
633
694
  //#region src/utils/registerBuiltInBlocks.ts
634
- var It = [
695
+ var Ht = [
635
696
  {
636
697
  type: "section",
637
698
  label: "Section",
638
- createBlock: ve
699
+ createBlock: _e
639
700
  },
640
701
  {
641
702
  type: "title",
642
703
  label: "Title",
643
- createBlock: me
704
+ createBlock: pe
644
705
  },
645
706
  {
646
707
  type: "paragraph",
647
708
  label: "Paragraph",
648
- createBlock: ye
709
+ createBlock: ve
649
710
  },
650
711
  {
651
712
  type: "image",
652
713
  label: "Image",
653
- createBlock: Te
714
+ createBlock: we
654
715
  },
655
716
  {
656
717
  type: "button",
657
718
  label: "Button",
658
- createBlock: Ee
719
+ createBlock: Te
659
720
  },
660
721
  {
661
722
  type: "divider",
662
723
  label: "Divider",
663
- createBlock: ge
724
+ createBlock: he
664
725
  },
665
726
  {
666
727
  type: "video",
667
728
  label: "Video",
668
- createBlock: Ae
729
+ createBlock: ke
669
730
  },
670
731
  {
671
732
  type: "social",
672
733
  label: "Social",
673
- createBlock: fe
734
+ createBlock: de
674
735
  },
675
736
  {
676
737
  type: "menu",
677
738
  label: "Menu",
678
- createBlock: Ce
739
+ createBlock: Se
679
740
  },
680
741
  {
681
742
  type: "table",
682
743
  label: "Table",
683
- createBlock: je
744
+ createBlock: Ae
684
745
  },
685
746
  {
686
747
  type: "spacer",
687
748
  label: "Spacer",
688
- createBlock: ke
749
+ createBlock: Oe
689
750
  },
690
751
  {
691
752
  type: "html",
692
753
  label: "HTML",
693
- createBlock: _e
754
+ createBlock: ge
694
755
  },
695
756
  {
696
757
  type: "countdown",
697
758
  label: "Countdown",
698
- createBlock: he
759
+ createBlock: me
699
760
  }
700
761
  ];
701
- function Lt(e, t) {
702
- for (let n of It) {
762
+ function Ut(e, t) {
763
+ for (let n of Ht) {
703
764
  let r = t[n.type];
704
765
  r && e.registerBuiltIn(n.type, {
705
766
  component: r,
@@ -714,7 +775,7 @@ function Lt(e, t) {
714
775
  }
715
776
  //#endregion
716
777
  //#region src/utils/keyboardShortcuts.ts
717
- function Rt(e) {
778
+ function Wt(e) {
718
779
  for (let t of e.composedPath()) {
719
780
  if (!(t instanceof HTMLElement)) continue;
720
781
  if (t.isContentEditable) return !0;
@@ -723,14 +784,14 @@ function Rt(e) {
723
784
  }
724
785
  return !1;
725
786
  }
726
- function zt(e, t) {
787
+ function Gt(e, t) {
727
788
  let n = e.metaKey || e.ctrlKey;
728
789
  if (n && e.key.toLowerCase() === "s") {
729
790
  e.preventDefault(), t.onSave?.();
730
791
  return;
731
792
  }
732
793
  if (n && e.key.toLowerCase() === "z") {
733
- if (Rt(e)) return;
794
+ if (Wt(e)) return;
734
795
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
735
796
  return;
736
797
  }
@@ -738,11 +799,11 @@ function zt(e, t) {
738
799
  t.selectBlock(null);
739
800
  return;
740
801
  }
741
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Rt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
802
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Wt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
742
803
  }
743
804
  //#endregion
744
805
  //#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
745
- var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
806
+ var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
746
807
  __name: "ButtonBlock",
747
808
  props: {
748
809
  block: {},
@@ -763,17 +824,17 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
763
824
  };
764
825
  return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
765
826
  });
766
- return (n, i) => (e(), w("div", Bt, [C("a", {
827
+ return (n, i) => (e(), w("div", Kt, [C("a", {
767
828
  href: t.block.url || "#",
768
829
  style: A(r.value),
769
830
  class: "tpl:cursor-default",
770
831
  onClick: i[0] ||= b(() => {}, ["prevent"])
771
- }, M(t.block.text), 13, Vt)]));
832
+ }, M(t.block.text), 13, qt)]));
772
833
  }
773
- }), Ut = P("bookmark", [["path", {
834
+ }), Yt = F("bookmark", [["path", {
774
835
  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",
775
836
  key: "oz39mx"
776
- }]]), Wt = P("box", [
837
+ }]]), Xt = F("box", [
777
838
  ["path", {
778
839
  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",
779
840
  key: "hh9hay"
@@ -786,13 +847,13 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
786
847
  d: "M12 22V12",
787
848
  key: "d0xqtd"
788
849
  }]
789
- ]), Gt = P("code", [["path", {
850
+ ]), Zt = F("code", [["path", {
790
851
  d: "m16 18 6-6-6-6",
791
852
  key: "eg8j8"
792
853
  }], ["path", {
793
854
  d: "m8 6-6 6 6 6",
794
855
  key: "ppft3o"
795
- }]]), Kt = P("copy", [["rect", {
856
+ }]]), Qt = F("copy", [["rect", {
796
857
  width: "14",
797
858
  height: "14",
798
859
  x: "8",
@@ -803,7 +864,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
803
864
  }], ["path", {
804
865
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
805
866
  key: "zix9uf"
806
- }]]), qt = P("eye-off", [
867
+ }]]), $t = F("eye-off", [
807
868
  ["path", {
808
869
  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",
809
870
  key: "ct8e1f"
@@ -820,10 +881,10 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
820
881
  d: "m2 2 20 20",
821
882
  key: "1ooewy"
822
883
  }]
823
- ]), Jt = P("funnel", [["path", {
884
+ ]), en = F("funnel", [["path", {
824
885
  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",
825
886
  key: "sc7q7i"
826
- }]]), Yt = P("grip-vertical", [
887
+ }]]), tn = F("grip-vertical", [
827
888
  ["circle", {
828
889
  cx: "9",
829
890
  cy: "12",
@@ -860,7 +921,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
860
921
  r: "1",
861
922
  key: "f4zoj3"
862
923
  }]
863
- ]), Xt = P("image", [
924
+ ]), nn = F("image", [
864
925
  ["rect", {
865
926
  width: "18",
866
927
  height: "18",
@@ -880,13 +941,13 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
880
941
  d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
881
942
  key: "1xmnt7"
882
943
  }]
883
- ]), Zt = P("navigation", [["polygon", {
944
+ ]), rn = F("navigation", [["polygon", {
884
945
  points: "3 11 22 2 13 21 11 13 3 11",
885
946
  key: "1ltx0t"
886
- }]]), Qt = P("puzzle", [["path", {
947
+ }]]), an = F("puzzle", [["path", {
887
948
  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",
888
949
  key: "w46dr5"
889
- }]]), $t = P("share-2", [
950
+ }]]), on = F("share-2", [
890
951
  ["circle", {
891
952
  cx: "18",
892
953
  cy: "5",
@@ -919,7 +980,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
919
980
  y2: "10.49",
920
981
  key: "1n3mei"
921
982
  }]
922
- ]), en = P("table", [
983
+ ]), sn = F("table", [
923
984
  ["path", {
924
985
  d: "M12 3v18",
925
986
  key: "108xh3"
@@ -940,7 +1001,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
940
1001
  d: "M3 15h18",
941
1002
  key: "5xshup"
942
1003
  }]
943
- ]), tn = P("video", [["path", {
1004
+ ]), cn = F("video", [["path", {
944
1005
  d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
945
1006
  key: "ftymec"
946
1007
  }], ["rect", {
@@ -950,11 +1011,11 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
950
1011
  height: "12",
951
1012
  rx: "2",
952
1013
  key: "158x01"
953
- }]]), nn = ["innerHTML"], rn = [
1014
+ }]]), ln = ["innerHTML"], un = [
954
1015
  "src",
955
1016
  "width",
956
1017
  "height"
957
- ], an = /* @__PURE__ */ y({
1018
+ ], dn = /* @__PURE__ */ y({
958
1019
  __name: "CustomBlockIcon",
959
1020
  props: {
960
1021
  icon: {},
@@ -970,14 +1031,14 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
970
1031
  height: `${r.value}px`
971
1032
  }),
972
1033
  innerHTML: t.icon
973
- }, null, 12, nn)) : a.value ? (e(), w("img", {
1034
+ }, null, 12, ln)) : a.value ? (e(), w("img", {
974
1035
  key: 1,
975
1036
  src: t.icon,
976
1037
  width: r.value,
977
1038
  height: r.value,
978
1039
  class: "tpl:inline-block",
979
1040
  alt: ""
980
- }, null, 8, rn)) : (e(), ne(j(Wt), {
1041
+ }, null, 8, un)) : (e(), ne(j(Xt), {
981
1042
  key: 2,
982
1043
  size: r.value,
983
1044
  "stroke-width": 1.5
@@ -986,16 +1047,16 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
986
1047
  });
987
1048
  //#endregion
988
1049
  //#region src/composables/useEditorRoot.ts
989
- function on() {
990
- return ae(Ze, document) ?? document;
1050
+ function fn() {
1051
+ return P($e, document) ?? document;
991
1052
  }
992
1053
  //#endregion
993
1054
  //#region src/composables/useFocusTrap.ts
994
- var sn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
995
- function cn(e, t) {
996
- let n = on(), r = null, i = null, a = null;
1055
+ var pn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1056
+ function mn(e, t) {
1057
+ let n = fn(), r = null, i = null, a = null;
997
1058
  function o() {
998
- return e.value ? Array.from(e.value.querySelectorAll(sn)).filter((e) => e.offsetParent !== null) : [];
1059
+ return e.value ? Array.from(e.value.querySelectorAll(pn)).filter((e) => e.offsetParent !== null) : [];
999
1060
  }
1000
1061
  function c(e) {
1001
1062
  if (e.key !== "Tab") return;
@@ -1010,7 +1071,7 @@ function cn(e, t) {
1010
1071
  a = null;
1011
1072
  let t = o();
1012
1073
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
1013
- }), i = Le(e, "keydown", c);
1074
+ }), i = Ie(e, "keydown", c);
1014
1075
  }
1015
1076
  function u(e = {}) {
1016
1077
  let t = e.restoreFocus !== !1;
@@ -1025,13 +1086,13 @@ function cn(e, t) {
1025
1086
  }
1026
1087
  //#endregion
1027
1088
  //#region src/composables/useEmoji.ts
1028
- function ln() {
1029
- let [e, t] = Ne(!1), n = d([]), r = !1;
1089
+ function hn() {
1090
+ let [e, t] = Me(!1), n = d([]), r = !1;
1030
1091
  re(() => {
1031
1092
  r = !0;
1032
1093
  }), s(e, async (e) => {
1033
1094
  if (e && n.value.length === 0) {
1034
- let { emojiCategories: e } = await import("./emojiData-DX3E0XT-.js");
1095
+ let { emojiCategories: e } = await import("./emojiData-DrBuvEoP.js");
1035
1096
  if (r) return;
1036
1097
  n.value = e;
1037
1098
  }
@@ -1051,7 +1112,7 @@ function ln() {
1051
1112
  }
1052
1113
  //#endregion
1053
1114
  //#region src/composables/useDragDrop.ts
1054
- function un(e) {
1115
+ function gn(e) {
1055
1116
  let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
1056
1117
  function o(e) {
1057
1118
  r.value = !0, i.value = e;
@@ -1101,7 +1162,7 @@ function un(e) {
1101
1162
  }
1102
1163
  //#endregion
1103
1164
  //#region src/composables/useFonts.ts
1104
- var dn = [
1165
+ var _n = [
1105
1166
  {
1106
1167
  value: "Arial",
1107
1168
  label: "Arial"
@@ -1130,7 +1191,7 @@ var dn = [
1130
1191
  value: "Courier New",
1131
1192
  label: "Courier New"
1132
1193
  }
1133
- ], fn = {
1194
+ ], vn = {
1134
1195
  arial: "Arial, sans-serif",
1135
1196
  helvetica: "Helvetica, sans-serif",
1136
1197
  georgia: "Georgia, serif",
@@ -1138,14 +1199,14 @@ var dn = [
1138
1199
  verdana: "Verdana, sans-serif",
1139
1200
  "trebuchet ms": "'Trebuchet MS', sans-serif",
1140
1201
  "courier new": "'Courier New', monospace"
1141
- }, pn = "Arial, sans-serif";
1142
- function mn(e) {
1143
- let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? pn);
1202
+ }, yn = "Arial, sans-serif";
1203
+ function bn(e) {
1204
+ let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? yn);
1144
1205
  function a(e) {
1145
1206
  n.value = e;
1146
1207
  }
1147
1208
  let o = x(() => {
1148
- let e = [...dn];
1209
+ let e = [..._n];
1149
1210
  if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
1150
1211
  let r = t.value.map((e) => ({
1151
1212
  value: e.name,
@@ -1158,17 +1219,17 @@ function mn(e) {
1158
1219
  return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1159
1220
  }
1160
1221
  function c(e) {
1161
- return dn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1222
+ return _n.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1162
1223
  }
1163
1224
  function l() {
1164
1225
  if (e?.defaultFont) {
1165
- if (!n.value && !c(e.defaultFont)) return pn;
1226
+ if (!n.value && !c(e.defaultFont)) return yn;
1166
1227
  if (s(e.defaultFont)) {
1167
1228
  let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1168
1229
  if (t) return t.value;
1169
1230
  }
1170
1231
  }
1171
- return pn;
1232
+ return yn;
1172
1233
  }
1173
1234
  let u = x(() => l());
1174
1235
  function d(e) {
@@ -1178,12 +1239,12 @@ function mn(e) {
1178
1239
  let e = n.fallback ?? i.value;
1179
1240
  return `'${n.name}', ${e}`;
1180
1241
  }
1181
- return fn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1242
+ return vn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1182
1243
  }
1183
- let f = [];
1184
- async function m() {
1244
+ let f = [], m = !1;
1245
+ async function g() {
1185
1246
  if (t.value.length === 0) {
1186
- r.value = !0;
1247
+ m || (r.value = !0);
1187
1248
  return;
1188
1249
  }
1189
1250
  let e = t.value.map(async (e) => {
@@ -1194,16 +1255,18 @@ function mn(e) {
1194
1255
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
1195
1256
  });
1196
1257
  } catch (t) {
1197
- Pt.warn(`Failed to load custom font "${e.name}":`, t);
1258
+ Bt.warn(`Failed to load custom font "${e.name}":`, t);
1198
1259
  }
1199
1260
  });
1200
- await Promise.allSettled(e), r.value = !0;
1261
+ await Promise.allSettled(e), !m && (r.value = !0);
1201
1262
  }
1202
- function g() {
1263
+ function _() {
1203
1264
  for (let e of f) e.remove();
1204
1265
  f.length = 0;
1205
1266
  }
1206
- return p() && re(g), {
1267
+ return p() && re(() => {
1268
+ m = !0, _();
1269
+ }), {
1207
1270
  fonts: o,
1208
1271
  defaultFont: u,
1209
1272
  defaultFallback: i,
@@ -1211,38 +1274,53 @@ function mn(e) {
1211
1274
  customFontsEnabled: n,
1212
1275
  isLoaded: r,
1213
1276
  setCustomFontsEnabled: a,
1214
- loadCustomFonts: m,
1215
- cleanupFontLinks: g,
1277
+ loadCustomFonts: g,
1278
+ cleanupFontLinks: _,
1216
1279
  getFontWithFallback: d,
1217
1280
  getDefaultFont: l
1218
1281
  };
1219
1282
  }
1220
1283
  //#endregion
1221
1284
  //#region src/composables/useRichTextLinkDialog.ts
1222
- function hn(e) {
1285
+ function xn(e) {
1223
1286
  let t = h(!1), n = h(""), r = h(null);
1224
- cn(r, t);
1287
+ mn(r, t);
1225
1288
  function i() {
1226
1289
  n.value = e.value?.getAttributes("link").href || "", t.value = !0;
1227
1290
  }
1228
1291
  function a() {
1229
1292
  if (n.value) {
1230
- let t = o(n.value);
1231
- e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
1232
- }
1233
- c();
1234
- }
1235
- function o(e) {
1236
- return /^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("#") ? e : `https://${e}`;
1237
- }
1238
- function s() {
1239
- e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), c();
1293
+ let t = s(n.value);
1294
+ t !== null && e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
1295
+ }
1296
+ l();
1297
+ }
1298
+ let o = new Set([
1299
+ "http",
1300
+ "https",
1301
+ "mailto",
1302
+ "tel",
1303
+ "ftp",
1304
+ "ftps",
1305
+ "sms",
1306
+ "xmpp",
1307
+ "cid"
1308
+ ]);
1309
+ function s(e) {
1310
+ let t = e.trim();
1311
+ if (!t) return null;
1312
+ if (t.startsWith("#")) return t;
1313
+ let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
1314
+ return n ? o.has(n[1].toLowerCase()) ? t : null : `https://${t}`;
1240
1315
  }
1241
1316
  function c() {
1317
+ e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), l();
1318
+ }
1319
+ function l() {
1242
1320
  t.value = !1, n.value = "";
1243
1321
  }
1244
- function l(e) {
1245
- e.key === "Enter" ? (e.preventDefault(), a()) : e.key === "Escape" && c();
1322
+ function u(e) {
1323
+ e.key === "Enter" ? (e.preventDefault(), a()) : e.key === "Escape" && l();
1246
1324
  }
1247
1325
  return {
1248
1326
  showLinkDialog: t,
@@ -1250,15 +1328,15 @@ function hn(e) {
1250
1328
  linkDialogRef: r,
1251
1329
  openLinkDialog: i,
1252
1330
  insertLink: a,
1253
- removeLink: s,
1254
- closeLinkDialog: c,
1255
- handleLinkKeydown: l
1331
+ removeLink: c,
1332
+ closeLinkDialog: l,
1333
+ handleLinkKeydown: u
1256
1334
  };
1257
1335
  }
1258
1336
  //#endregion
1259
1337
  //#region src/composables/useRichTextEditor.ts
1260
- function gn(e) {
1261
- let t = ae($e, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = ht(), f = ae(He, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = hn(g), { start: T, stop: E } = Re(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
1338
+ function Sn(e) {
1339
+ let t = P(nt, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = mt(), f = P(He, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = ue(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = xn(g), { start: T, stop: E } = Le(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
1262
1340
  async function te() {
1263
1341
  O.value = null, D.value = !0;
1264
1342
  try {
@@ -1288,7 +1366,7 @@ function gn(e) {
1288
1366
  g.value = s, D.value = !1, T();
1289
1367
  } catch (t) {
1290
1368
  if (k) return;
1291
- Pt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
1369
+ Bt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
1292
1370
  }
1293
1371
  }
1294
1372
  function A() {
@@ -1303,7 +1381,7 @@ function gn(e) {
1303
1381
  let n = t.composedPath().find((e) => e instanceof HTMLElement);
1304
1382
  n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
1305
1383
  }
1306
- Le(document, "mousedown", re), n(() => {
1384
+ Ie(document, "mousedown", re), n(() => {
1307
1385
  k = !0, ne(), E(), g.value?.destroy();
1308
1386
  });
1309
1387
  async function j() {
@@ -1336,20 +1414,20 @@ function gn(e) {
1336
1414
  }
1337
1415
  //#endregion
1338
1416
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
1339
- var _n = { class: "tpl:w-full" }, vn = {
1417
+ var Cn = { class: "tpl:w-full" }, wn = {
1340
1418
  key: 0,
1341
1419
  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)]"
1342
- }, yn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, bn = {
1420
+ }, Tn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, En = {
1343
1421
  key: 1,
1344
1422
  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)]"
1345
- }, xn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Sn = {
1423
+ }, Dn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, On = {
1346
1424
  key: 2,
1347
1425
  class: "tpl:relative"
1348
- }, Cn = ["innerHTML"], wn = {
1426
+ }, kn = ["innerHTML"], An = {
1349
1427
  key: 0,
1350
1428
  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]",
1351
1429
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
1352
- }, Tn = /* @__PURE__ */ y({
1430
+ }, jn = /* @__PURE__ */ y({
1353
1431
  __name: "CustomBlock",
1354
1432
  props: {
1355
1433
  block: {},
@@ -1357,7 +1435,7 @@ var _n = { class: "tpl:w-full" }, vn = {
1357
1435
  },
1358
1436
  emits: ["fetchData"],
1359
1437
  setup(t, { emit: n }) {
1360
- let r = t, i = n, { t: a } = lt(), o = ae(rt, null), c = h(""), l = h(!1), d = x(() => o?.getDefinition(r.block.customType)), f = x(() => !!d.value), { isFetching: p, fetch: m, needsFetch: g, hasDataSource: v } = wt({
1438
+ let r = t, i = n, { t: a } = ct(), o = P(tt, null), c = h(""), l = h(!1), d = x(() => o?.getDefinition(r.block.customType)), f = x(() => !!d.value), { isFetching: p, fetch: m, needsFetch: g, hasDataSource: v } = Et({
1361
1439
  definition: d,
1362
1440
  block: x(() => r.block),
1363
1441
  onUpdate: (e, t) => {
@@ -1378,15 +1456,15 @@ var _n = { class: "tpl:w-full" }, vn = {
1378
1456
  }
1379
1457
  }
1380
1458
  }
1381
- let S = Me(y, 150);
1459
+ let S = je(y, 150);
1382
1460
  return u(() => {
1383
1461
  y();
1384
1462
  }), s(() => r.block.fieldValues, () => {
1385
1463
  S();
1386
- }, { deep: !0 }), (t, n) => (e(), w("div", _n, [f.value ? l.value ? (e(), w("div", bn, [N(j(ft), {
1464
+ }, { deep: !0 }), (t, n) => (e(), w("div", Cn, [f.value ? l.value ? (e(), w("div", En, [N(j(dt), {
1387
1465
  size: 24,
1388
1466
  class: "tpl:text-[var(--tpl-danger)]"
1389
- }), C("span", xn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", Sn, [C("div", { innerHTML: c.value }, null, 8, Cn), j(v) && j(g) ? (e(), w("div", wn, [j(p) ? (e(), ne(pt, {
1467
+ }), C("span", Dn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", On, [C("div", { innerHTML: c.value }, null, 8, kn), j(v) && j(g) ? (e(), w("div", An, [j(p) ? (e(), ne(ft, {
1390
1468
  key: 1,
1391
1469
  class: "tpl:w-48"
1392
1470
  })) : (e(), w("button", {
@@ -1394,16 +1472,16 @@ var _n = { class: "tpl:w-full" }, vn = {
1394
1472
  type: "button",
1395
1473
  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)]",
1396
1474
  onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
1397
- }, [d.value?.icon ? (e(), ne(an, {
1475
+ }, [d.value?.icon ? (e(), ne(dn, {
1398
1476
  key: 0,
1399
1477
  icon: d.value.icon,
1400
1478
  size: 16
1401
- }, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", vn, [N(j(Qt), {
1479
+ }, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", wn, [N(j(an), {
1402
1480
  size: 24,
1403
1481
  class: "tpl:text-[var(--tpl-warning)]"
1404
- }), C("span", yn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
1482
+ }), C("span", Tn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
1405
1483
  }
1406
- }), En = { class: "tpl:w-full" }, Dn = /* @__PURE__ */ y({
1484
+ }), Mn = { class: "tpl:w-full" }, Nn = /* @__PURE__ */ y({
1407
1485
  __name: "DividerBlock",
1408
1486
  props: {
1409
1487
  block: {},
@@ -1415,37 +1493,37 @@ var _n = { class: "tpl:w-full" }, vn = {
1415
1493
  width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
1416
1494
  margin: n.block.width === "full" ? "0" : "0 auto"
1417
1495
  }));
1418
- return (t, n) => (e(), w("div", En, [C("hr", {
1496
+ return (t, n) => (e(), w("div", Mn, [C("hr", {
1419
1497
  class: "tpl:m-0 tpl:border-none",
1420
1498
  style: A(r.value)
1421
1499
  }, null, 4)]));
1422
1500
  }
1423
- }), On = { class: "tpl:w-full" }, kn = { 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)]" }, An = {
1501
+ }), Pn = { class: "tpl:w-full" }, Fn = { 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)]" }, In = {
1424
1502
  key: 0,
1425
1503
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
1426
- }, jn = {
1504
+ }, Ln = {
1427
1505
  key: 1,
1428
1506
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
1429
- }, Mn = /* @__PURE__ */ y({
1507
+ }, Rn = /* @__PURE__ */ y({
1430
1508
  __name: "HtmlBlock",
1431
1509
  props: {
1432
1510
  block: {},
1433
1511
  viewport: {}
1434
1512
  },
1435
1513
  setup(t) {
1436
- let n = t, { t: r } = lt(), i = x(() => n.block.content.trim().length > 0);
1437
- return (t, n) => (e(), w("div", On, [C("div", kn, [N(j(Gt), {
1514
+ let n = t, { t: r } = ct(), i = x(() => n.block.content.trim().length > 0);
1515
+ return (t, n) => (e(), w("div", Pn, [C("div", Fn, [N(j(Zt), {
1438
1516
  size: 24,
1439
1517
  class: "tpl:text-[var(--tpl-text-dim)]"
1440
- }), i.value ? (e(), w("span", An, M(j(r).html.preview), 1)) : (e(), w("span", jn, M(j(r).html.empty), 1))])]));
1518
+ }), i.value ? (e(), w("span", In, M(j(r).html.preview), 1)) : (e(), w("span", Ln, M(j(r).html.empty), 1))])]));
1441
1519
  }
1442
- }), Nn = ["href"], Pn = ["src", "alt"], Fn = ["src", "alt"], In = {
1520
+ }), zn = ["href"], Bn = ["src", "alt"], Vn = ["src", "alt"], Hn = {
1443
1521
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
1444
1522
  style: { opacity: "0.7" }
1445
- }, Ln = ["href"], Rn = ["src", "alt"], zn = ["src", "alt"], Bn = {
1523
+ }, Un = ["href"], Wn = ["src", "alt"], Gn = ["src", "alt"], Kn = {
1446
1524
  key: 3,
1447
1525
  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)]"
1448
- }, Vn = ["aria-label"], Hn = { key: 1 }, Un = /* @__PURE__ */ y({
1526
+ }, qn = ["aria-label"], Jn = { key: 1 }, Yn = /* @__PURE__ */ y({
1449
1527
  __name: "ImageBlock",
1450
1528
  props: {
1451
1529
  block: {},
@@ -1453,25 +1531,25 @@ var _n = { class: "tpl:w-full" }, vn = {
1453
1531
  },
1454
1532
  emits: ["update"],
1455
1533
  setup(t, { emit: n }) {
1456
- let r = t, i = n, { t: a } = lt(), { syntax: o } = ht(), s = ae(Ue, null), c = x(() => !!s);
1457
- async function l() {
1534
+ let r = t, i = n, { t: a } = ct(), { syntax: o } = mt(), s = P(ot, null), c = x(() => !!s), l = ht();
1535
+ async function u() {
1458
1536
  let e = await s?.({ accept: ["images"] });
1459
- if (e) {
1537
+ if (l.alive && e) {
1460
1538
  let t = { src: e.url };
1461
1539
  e.alt && (t.alt = e.alt), i("update", t);
1462
1540
  }
1463
1541
  }
1464
- let u = x(() => ({ textAlign: r.block.align })), d = x(() => ({
1542
+ let d = x(() => ({ textAlign: r.block.align })), f = x(() => ({
1465
1543
  maxWidth: "100%",
1466
1544
  width: r.block.width === "full" ? "100%" : `${r.block.width}px`,
1467
1545
  display: "block",
1468
1546
  margin: r.block.align === "center" ? "0 auto" : void 0,
1469
1547
  marginLeft: r.block.align === "right" ? "auto" : void 0
1470
- })), f = x(() => pe(r.block.src, o));
1548
+ })), p = x(() => fe(r.block.src, o));
1471
1549
  return (n, r) => (e(), w("div", {
1472
1550
  class: "tpl:w-full",
1473
- style: A(u.value)
1474
- }, [t.block.src && f.value && t.block.placeholderUrl ? (e(), w(D, { key: 0 }, [t.block.linkUrl ? (e(), w("a", {
1551
+ style: A(d.value)
1552
+ }, [t.block.src && p.value && t.block.placeholderUrl ? (e(), w(D, { key: 0 }, [t.block.linkUrl ? (e(), w("a", {
1475
1553
  key: 0,
1476
1554
  href: t.block.linkUrl,
1477
1555
  target: "_blank",
@@ -1482,23 +1560,23 @@ var _n = { class: "tpl:w-full" }, vn = {
1482
1560
  loading: "lazy",
1483
1561
  src: t.block.placeholderUrl,
1484
1562
  alt: t.block.alt || j(a).image.altTextPlaceholder,
1485
- style: A(d.value)
1486
- }, null, 12, Pn)], 8, Nn)) : (e(), w("img", {
1563
+ style: A(f.value)
1564
+ }, null, 12, Bn)], 8, zn)) : (e(), w("img", {
1487
1565
  key: 1,
1488
1566
  class: "tpl:border-0",
1489
1567
  src: t.block.placeholderUrl,
1490
1568
  alt: t.block.alt,
1491
- style: A(d.value)
1492
- }, null, 12, Fn))], 64)) : t.block.src && f.value ? (e(), w("div", {
1569
+ style: A(f.value)
1570
+ }, null, 12, Vn))], 64)) : t.block.src && p.value ? (e(), w("div", {
1493
1571
  key: 1,
1494
1572
  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)]",
1495
- style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
1496
- }, [N(j(Xt), {
1573
+ style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, f.value])
1574
+ }, [N(j(nn), {
1497
1575
  size: 32,
1498
1576
  "stroke-width": 1.5,
1499
1577
  class: "tpl:text-[var(--tpl-primary)]",
1500
1578
  style: { opacity: "0.5" }
1501
- }), C("span", In, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
1579
+ }), C("span", Hn, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
1502
1580
  key: 0,
1503
1581
  href: t.block.linkUrl,
1504
1582
  target: "_blank",
@@ -1509,34 +1587,34 @@ var _n = { class: "tpl:w-full" }, vn = {
1509
1587
  loading: "lazy",
1510
1588
  src: t.block.src,
1511
1589
  alt: t.block.alt || j(a).image.altTextPlaceholder,
1512
- style: A(d.value)
1513
- }, null, 12, Rn)], 8, Ln)) : (e(), w("img", {
1590
+ style: A(f.value)
1591
+ }, null, 12, Wn)], 8, Un)) : (e(), w("img", {
1514
1592
  key: 1,
1515
1593
  class: "tpl:border-0",
1516
1594
  src: t.block.src,
1517
1595
  alt: t.block.alt,
1518
- style: A(d.value)
1519
- }, null, 12, zn))], 64)) : (e(), w("div", Bn, [c.value ? (e(), w("button", {
1596
+ style: A(f.value)
1597
+ }, null, 12, Gn))], 64)) : (e(), w("div", Kn, [c.value ? (e(), w("button", {
1520
1598
  key: 0,
1521
1599
  "aria-label": j(a).image.browseMedia,
1522
1600
  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)]",
1523
- onClick: b(l, ["stop"])
1524
- }, [N(j(Xt), {
1601
+ onClick: b(u, ["stop"])
1602
+ }, [N(j(nn), {
1525
1603
  size: 14,
1526
1604
  "stroke-width": 1.5
1527
- }), _(" " + M(j(a).image.browseMedia), 1)], 8, Vn)) : (e(), w("span", Hn, M(j(a).image.clickToAdd), 1))]))], 4));
1605
+ }), _(" " + M(j(a).image.browseMedia), 1)], 8, qn)) : (e(), w("span", Jn, M(j(a).image.clickToAdd), 1))]))], 4));
1528
1606
  }
1529
- }), Wn = { class: "tpl:w-full" }, Gn = ["href"], Kn = {
1607
+ }), Xn = { class: "tpl:w-full" }, Zn = ["href"], Qn = {
1530
1608
  key: 1,
1531
1609
  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)]"
1532
- }, qn = /* @__PURE__ */ y({
1610
+ }, $n = /* @__PURE__ */ y({
1533
1611
  __name: "MenuBlock",
1534
1612
  props: {
1535
1613
  block: {},
1536
1614
  viewport: {}
1537
1615
  },
1538
1616
  setup(t) {
1539
- let n = t, { t: r } = lt(), i = x(() => ({
1617
+ let n = t, { t: r } = ct(), i = x(() => ({
1540
1618
  display: "flex",
1541
1619
  flexWrap: "wrap",
1542
1620
  gap: `0 ${n.block.spacing}px`,
@@ -1548,7 +1626,7 @@ var _n = { class: "tpl:w-full" }, vn = {
1548
1626
  function o(e) {
1549
1627
  return e || n.block.linkColor || n.block.color;
1550
1628
  }
1551
- return (n, s) => (e(), w("div", Wn, [a.value ? (e(), w("div", {
1629
+ return (n, s) => (e(), w("div", Xn, [a.value ? (e(), w("div", {
1552
1630
  key: 0,
1553
1631
  style: A(i.value)
1554
1632
  }, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
@@ -1560,19 +1638,87 @@ var _n = { class: "tpl:w-full" }, vn = {
1560
1638
  textDecoration: n.underline ? "underline" : "none"
1561
1639
  }),
1562
1640
  onClick: s[0] ||= b(() => {}, ["prevent"])
1563
- }, M(n.text || "..."), 13, Gn), r < t.block.items.length - 1 ? (e(), w("span", {
1641
+ }, M(n.text || "..."), 13, Zn), r < t.block.items.length - 1 ? (e(), w("span", {
1564
1642
  key: 0,
1565
1643
  style: A({
1566
1644
  color: t.block.separatorColor,
1567
1645
  padding: `0 ${t.block.spacing}px`
1568
1646
  })
1569
- }, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", Kn, [N(j(Zt), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
1647
+ }, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", Qn, [N(j(rn), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
1648
+ }
1649
+ }), er = new Set([
1650
+ "http",
1651
+ "https",
1652
+ "mailto",
1653
+ "tel",
1654
+ "ftp",
1655
+ "ftps",
1656
+ "sms",
1657
+ "xmpp",
1658
+ "cid"
1659
+ ]), tr = new Set([
1660
+ "SCRIPT",
1661
+ "STYLE",
1662
+ "IFRAME",
1663
+ "OBJECT",
1664
+ "EMBED",
1665
+ "LINK",
1666
+ "META",
1667
+ "BASE",
1668
+ "FORM"
1669
+ ]), nr = new Set([
1670
+ "href",
1671
+ "xlink:href",
1672
+ "formaction",
1673
+ "action",
1674
+ "ping",
1675
+ "background",
1676
+ "poster"
1677
+ ]);
1678
+ function rr(e, t) {
1679
+ let n = e.trim();
1680
+ if (!n || n.startsWith("#")) return !0;
1681
+ let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
1682
+ if (!r) return !0;
1683
+ let i = r[1].toLowerCase();
1684
+ return er.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
1685
+ }
1686
+ function ir(e) {
1687
+ if (tr.has(e.tagName)) {
1688
+ e.remove();
1689
+ return;
1570
1690
  }
1571
- });
1691
+ let t = [];
1692
+ for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
1693
+ for (let n of t) {
1694
+ let t = n.toLowerCase();
1695
+ if (t.startsWith("on")) {
1696
+ e.removeAttribute(n);
1697
+ continue;
1698
+ }
1699
+ if (nr.has(t)) {
1700
+ rr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
1701
+ continue;
1702
+ }
1703
+ if (t === "src") {
1704
+ rr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
1705
+ continue;
1706
+ }
1707
+ t === "srcdoc" && e.removeAttribute(n);
1708
+ }
1709
+ let n = Array.from(e.children);
1710
+ for (let e of n) ir(e);
1711
+ }
1712
+ function ar(e) {
1713
+ if (typeof DOMParser > "u") return e;
1714
+ let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
1715
+ for (let e of n) ir(e);
1716
+ return t.innerHTML;
1717
+ }
1572
1718
  //#endregion
1573
1719
  //#region src/composables/useEditableTextBlock.ts
1574
- function Jn(e) {
1575
- let t = ae(ct, []), { syntax: n } = ht(), r = x(() => xe(le(e(), t), n)), i = h(!1), a = h(null), { top: o, left: s } = Ie(a), c = x(() => ({
1720
+ function or(e) {
1721
+ let t = P(at, []), { syntax: n } = mt(), r = x(() => ar(be(ce(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = Fe(a), c = x(() => ({
1576
1722
  top: o.value - 8,
1577
1723
  left: s.value
1578
1724
  }));
@@ -1593,14 +1739,14 @@ function Jn(e) {
1593
1739
  }
1594
1740
  //#endregion
1595
1741
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
1596
- var Yn = ["innerHTML"], Xn = /* @__PURE__ */ y({
1742
+ var sr = ["innerHTML"], cr = /* @__PURE__ */ y({
1597
1743
  __name: "ParagraphBlock",
1598
1744
  props: {
1599
1745
  block: {},
1600
1746
  viewport: {}
1601
1747
  },
1602
1748
  setup(t) {
1603
- let n = t, r = se(() => import("./ParagraphEditor-BSaEdasm.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Jn(() => n.block.content);
1749
+ let n = t, r = oe(() => import("./ParagraphEditor-CfzIUFQ_.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = or(() => n.block.content);
1604
1750
  return (n, u) => (e(), w("div", {
1605
1751
  ref_key: "blockRef",
1606
1752
  ref: a,
@@ -1619,19 +1765,19 @@ var Yn = ["innerHTML"], Xn = /* @__PURE__ */ y({
1619
1765
  key: 1,
1620
1766
  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",
1621
1767
  innerHTML: j(s)
1622
- }, null, 8, Yn))], 544));
1768
+ }, null, 8, sr))], 544));
1623
1769
  }
1624
1770
  });
1625
1771
  //#endregion
1626
1772
  //#region src/utils/blockComponentResolver.ts
1627
- function Zn(e, t, n) {
1773
+ function lr(e, t, n) {
1628
1774
  if (t) {
1629
1775
  let n = t.getComponent(e);
1630
1776
  if (n) return n;
1631
1777
  }
1632
1778
  return n[e.type] ?? null;
1633
1779
  }
1634
- function Qn(e) {
1780
+ function ur(e) {
1635
1781
  let { padding: t, margin: n, backgroundColor: r } = e.styles;
1636
1782
  return {
1637
1783
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
@@ -1641,20 +1787,20 @@ function Qn(e) {
1641
1787
  }
1642
1788
  //#endregion
1643
1789
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
1644
- var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1790
+ var dr = ["data-block-id", "data-block-type"], fr = ["aria-label"], pr = [
1645
1791
  "aria-label",
1646
1792
  "aria-pressed",
1647
1793
  "title"
1648
- ], nr = ["aria-label", "title"], rr = ["aria-label", "title"], ir = ["aria-label", "title"], ar = {
1794
+ ], mr = ["aria-label", "title"], hr = ["aria-label", "title"], gr = ["aria-label", "title"], _r = {
1649
1795
  key: 1,
1650
1796
  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"
1651
- }, or = { 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)]" }, sr = {
1797
+ }, vr = { 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)]" }, yr = {
1652
1798
  key: 2,
1653
1799
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
1654
- }, cr = ["aria-label", "title"], lr = {
1800
+ }, br = ["aria-label", "title"], xr = {
1655
1801
  key: 3,
1656
1802
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
1657
- }, ur = ["aria-label"], dr = /* @__PURE__ */ mt(/* @__PURE__ */ y({
1803
+ }, Sr = ["aria-label"], Cr = /* @__PURE__ */ pt(/* @__PURE__ */ y({
1658
1804
  __name: "BlockWrapper",
1659
1805
  props: {
1660
1806
  block: {},
@@ -1664,7 +1810,7 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1664
1810
  },
1665
1811
  emits: ["select"],
1666
1812
  setup(t, { emit: n }) {
1667
- let i = se(() => import("./BlockA11yBadge-BFIw0h1m.js")), a = t, o = n, { t: s, format: c } = lt(), u = ae(at, null), d = h(null), f = x(() => u?.liftedBlockId.value === a.block.id), p = x(() => f.value ? c(s.blockActions.dragLifted, { block: a.block.type }) : s.blockActions.drag);
1813
+ let i = oe(() => import("./BlockIssueBadge-DJTiT1eF.js")), a = t, o = n, { t: s, format: c } = ct(), u = P(We, null), d = h(null), f = x(() => u?.liftedBlockId.value === a.block.id), p = x(() => f.value ? c(s.blockActions.dragLifted, { block: a.block.type }) : s.blockActions.drag);
1668
1814
  async function m() {
1669
1815
  await r(), d.value?.focus();
1670
1816
  }
@@ -1691,8 +1837,8 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1691
1837
  desktop: s.viewport.desktop,
1692
1838
  tablet: s.viewport.tablet,
1693
1839
  mobile: s.viewport.mobile
1694
- }[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = ae(Ge, null), ee = ae(Je, null), D = ae(qe, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => ({ margin: Qn(a.block).margin })), re = x(() => {
1695
- let e = Qn(a.block);
1840
+ }[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = P(Ze, null), ee = P(it, null), D = P(rt, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => ({ margin: ur(a.block).margin })), re = x(() => {
1841
+ let e = ur(a.block);
1696
1842
  return {
1697
1843
  padding: e.padding,
1698
1844
  backgroundColor: e.backgroundColor
@@ -1701,16 +1847,16 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1701
1847
  function ie(e) {
1702
1848
  a.previewMode || (e.stopPropagation(), o("select"));
1703
1849
  }
1704
- function oe() {
1850
+ function ae() {
1705
1851
  E?.deleteBlock(a.block.id);
1706
1852
  }
1707
- function ce() {
1853
+ function se() {
1708
1854
  E?.duplicateBlock(a.block);
1709
1855
  }
1710
- function le() {
1856
+ function ce() {
1711
1857
  D.savedModules?.openSaveDialog(a.block.id);
1712
1858
  }
1713
- function ue() {
1859
+ function le() {
1714
1860
  ee?.toggleBlock(a.block.id);
1715
1861
  }
1716
1862
  return (n, r) => (e(), w("div", {
@@ -1740,90 +1886,90 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
1740
1886
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
1741
1887
  title: j(s).blockActions.drag,
1742
1888
  onKeydown: g
1743
- }, [N(j(Yt), {
1889
+ }, [N(j(tn), {
1744
1890
  size: 14,
1745
1891
  "stroke-width": 1.5
1746
- })], 40, tr),
1892
+ })], 40, pr),
1747
1893
  C("button", {
1748
1894
  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",
1749
1895
  "aria-label": j(s).blockActions.duplicate,
1750
1896
  title: j(s).blockActions.duplicate,
1751
- onClick: b(ce, ["stop"])
1752
- }, [N(j(Kt), {
1897
+ onClick: b(se, ["stop"])
1898
+ }, [N(j(Qt), {
1753
1899
  size: 14,
1754
1900
  "stroke-width": 1.5
1755
- })], 8, nr),
1901
+ })], 8, mr),
1756
1902
  k.value ? (e(), w("button", {
1757
1903
  key: 0,
1758
1904
  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",
1759
1905
  "aria-label": j(s).blockActions.saveAsModule,
1760
1906
  title: j(s).blockActions.saveAsModule,
1761
- onClick: b(le, ["stop"])
1762
- }, [N(j(Ut), {
1907
+ onClick: b(ce, ["stop"])
1908
+ }, [N(j(Yt), {
1763
1909
  size: 14,
1764
1910
  "stroke-width": 1.5
1765
- })], 8, rr)) : O("", !0),
1911
+ })], 8, hr)) : O("", !0),
1766
1912
  C("button", {
1767
1913
  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",
1768
1914
  "aria-label": j(s).blockActions.delete,
1769
1915
  title: j(s).blockActions.delete,
1770
- onClick: b(oe, ["stop"])
1771
- }, [N(j(dt), {
1916
+ onClick: b(ae, ["stop"])
1917
+ }, [N(j(ut), {
1772
1918
  size: 14,
1773
1919
  "stroke-width": 1.5
1774
- })], 8, ir)
1775
- ], 8, er)) : O("", !0),
1776
- y.value ? (e(), w("div", ar, [C("span", or, [N(j(qt), {
1920
+ })], 8, gr)
1921
+ ], 8, fr)) : O("", !0),
1922
+ y.value ? (e(), w("div", _r, [C("span", vr, [N(j($t), {
1777
1923
  size: 12,
1778
1924
  "stroke-width": 1.5
1779
1925
  }), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : O("", !0),
1780
- T.value && !y.value ? (e(), w("div", sr, [C("button", {
1926
+ T.value && !y.value ? (e(), w("div", yr, [C("button", {
1781
1927
  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)]",
1782
1928
  "aria-label": j(s).blockActions.conditionToggle,
1783
1929
  title: t.block.displayCondition?.label,
1784
- onClick: b(ue, ["stop"])
1785
- }, [N(j(Jt), {
1930
+ onClick: b(le, ["stop"])
1931
+ }, [N(j(en), {
1786
1932
  size: 12,
1787
1933
  "stroke-width": 2
1788
- })], 8, cr)])) : O("", !0),
1789
- te.value > 0 && !y.value ? (e(), w("div", lr, [C("button", {
1934
+ })], 8, br)])) : O("", !0),
1935
+ te.value > 0 && !y.value ? (e(), w("div", xr, [C("button", {
1790
1936
  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)]",
1791
1937
  "aria-label": j(c)(j(s).blockActions.comments, { count: String(te.value) }),
1792
1938
  onClick: r[0] ||= b((e) => j(D).comments?.openForBlock(t.block.id), ["stop"])
1793
- }, [N(j(ut), {
1939
+ }, [N(j(lt), {
1794
1940
  size: 12,
1795
1941
  "stroke-width": 2.5
1796
- }), _(" " + M(te.value), 1)], 8, ur)])) : O("", !0),
1942
+ }), _(" " + M(te.value), 1)], 8, Sr)])) : O("", !0),
1797
1943
  C("div", {
1798
1944
  class: "tpl-block-content",
1799
1945
  style: A(re.value)
1800
1946
  }, [l(n.$slots, "default", {}, void 0, !0)], 4)
1801
- ], 14, $n));
1947
+ ], 14, dr));
1802
1948
  }
1803
- }), [["__scopeId", "data-v-7333e8d7"]]);
1949
+ }), [["__scopeId", "data-v-e77eb94e"]]);
1804
1950
  //#endregion
1805
1951
  //#region src/utils/unwrapParagraph.ts
1806
- function fr(e) {
1952
+ function wr(e) {
1807
1953
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
1808
1954
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
1809
1955
  }
1810
1956
  //#endregion
1811
1957
  //#region src/components/blocks/TitleBlock.vue
1812
- var pr = /* @__PURE__ */ y({
1958
+ var Tr = /* @__PURE__ */ y({
1813
1959
  __name: "TitleBlock",
1814
1960
  props: {
1815
1961
  block: {},
1816
1962
  viewport: {}
1817
1963
  },
1818
1964
  setup(t) {
1819
- let n = t, r = se(() => import("./TitleEditor-XbFuw1Vy.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = Jn(() => n.block.content), d = x(() => {
1965
+ let n = t, r = oe(() => import("./TitleEditor-CZUkhtDo.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = or(() => n.block.content), d = x(() => {
1820
1966
  let e = {
1821
- fontSize: `${De[n.block.level]}px`,
1967
+ fontSize: `${Ee[n.block.level]}px`,
1822
1968
  color: n.block.color,
1823
1969
  textAlign: n.block.textAlign
1824
1970
  };
1825
1971
  return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
1826
- }), f = x(() => `h${n.block.level}`), p = x(() => fr(c.value));
1972
+ }), f = x(() => `h${n.block.level}`), p = x(() => wr(c.value));
1827
1973
  return (n, c) => (e(), w("div", {
1828
1974
  ref_key: "blockRef",
1829
1975
  ref: o,
@@ -1846,83 +1992,83 @@ var pr = /* @__PURE__ */ y({
1846
1992
  innerHTML: p.value
1847
1993
  }, null, 8, ["innerHTML"]))], 36));
1848
1994
  }
1849
- }), mr = Object.defineProperty, hr = Object.getOwnPropertySymbols, gr = Object.prototype.hasOwnProperty, _r = Object.prototype.propertyIsEnumerable, vr = (e, t, n) => t in e ? mr(e, t, {
1995
+ }), Er = Object.defineProperty, Dr = Object.getOwnPropertySymbols, Or = Object.prototype.hasOwnProperty, kr = Object.prototype.propertyIsEnumerable, Ar = (e, t, n) => t in e ? Er(e, t, {
1850
1996
  enumerable: !0,
1851
1997
  configurable: !0,
1852
1998
  writable: !0,
1853
1999
  value: n
1854
- }) : e[t] = n, yr = (e, t) => {
1855
- for (var n in t ||= {}) gr.call(t, n) && vr(e, n, t[n]);
1856
- if (hr) for (var n of hr(t)) _r.call(t, n) && vr(e, n, t[n]);
2000
+ }) : e[t] = n, jr = (e, t) => {
2001
+ for (var n in t ||= {}) Or.call(t, n) && Ar(e, n, t[n]);
2002
+ if (Dr) for (var n of Dr(t)) kr.call(t, n) && Ar(e, n, t[n]);
1857
2003
  return e;
1858
- }, br = (e, t) => {
2004
+ }, Mr = (e, t) => {
1859
2005
  var n = {};
1860
- for (var r in e) gr.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1861
- if (e != null && hr) for (var r of hr(e)) t.indexOf(r) < 0 && _r.call(e, r) && (n[r] = e[r]);
2006
+ for (var r in e) Or.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2007
+ if (e != null && Dr) for (var r of Dr(e)) t.indexOf(r) < 0 && kr.call(e, r) && (n[r] = e[r]);
1862
2008
  return n;
1863
- }, xr = "[vue-draggable-plus]: ";
1864
- function Sr(e) {
1865
- console.warn(xr + e);
2009
+ }, Nr = "[vue-draggable-plus]: ";
2010
+ function Pr(e) {
2011
+ console.warn(Nr + e);
1866
2012
  }
1867
- function Cr(e) {
1868
- console.error(xr + e);
2013
+ function Fr(e) {
2014
+ console.error(Nr + e);
1869
2015
  }
1870
- function wr(e, t, n) {
2016
+ function Ir(e, t, n) {
1871
2017
  return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
1872
2018
  }
1873
- function Tr(e) {
2019
+ function Lr(e) {
1874
2020
  return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
1875
2021
  }
1876
- function Er(e) {
1877
- return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Tr(n)] = e[n]), t), {});
2022
+ function Rr(e) {
2023
+ return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Lr(n)] = e[n]), t), {});
1878
2024
  }
1879
- function Dr(e, t) {
2025
+ function zr(e, t) {
1880
2026
  return Array.isArray(e) && e.splice(t, 1), e;
1881
2027
  }
1882
- function Or(e, t, n) {
2028
+ function Br(e, t, n) {
1883
2029
  return Array.isArray(e) && e.splice(t, 0, n), e;
1884
2030
  }
1885
- function kr(e) {
2031
+ function Vr(e) {
1886
2032
  return e === void 0;
1887
2033
  }
1888
- function Ar(e) {
2034
+ function Hr(e) {
1889
2035
  return typeof e == "string";
1890
2036
  }
1891
- function jr(e, t, n) {
2037
+ function Ur(e, t, n) {
1892
2038
  let r = e.children[n];
1893
2039
  e.insertBefore(t, r);
1894
2040
  }
1895
- function Mr(e) {
2041
+ function Wr(e) {
1896
2042
  e.parentNode && e.parentNode.removeChild(e);
1897
2043
  }
1898
- function Nr(e, t = document) {
2044
+ function Gr(e, t = document) {
1899
2045
  let n = null;
1900
- return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Sr(`Element not found: ${e}`), n;
2046
+ return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Pr(`Element not found: ${e}`), n;
1901
2047
  }
1902
- function Pr(e, t, n = null) {
2048
+ function Kr(e, t, n = null) {
1903
2049
  return function(...r) {
1904
2050
  return e.apply(n, r), t.apply(n, r);
1905
2051
  };
1906
2052
  }
1907
- function Fr(e, t) {
1908
- let n = yr({}, e);
2053
+ function qr(e, t) {
2054
+ let n = jr({}, e);
1909
2055
  return Object.keys(t).forEach((r) => {
1910
- n[r] ? n[r] = Pr(e[r], t[r]) : n[r] = t[r];
2056
+ n[r] ? n[r] = Kr(e[r], t[r]) : n[r] = t[r];
1911
2057
  }), n;
1912
2058
  }
1913
- function Ir(e) {
2059
+ function Jr(e) {
1914
2060
  return e instanceof HTMLElement;
1915
2061
  }
1916
- function Lr(e, t) {
2062
+ function Yr(e, t) {
1917
2063
  Object.keys(e).forEach((n) => {
1918
2064
  t(n, e[n]);
1919
2065
  });
1920
2066
  }
1921
- function Rr(e) {
2067
+ function Xr(e) {
1922
2068
  return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
1923
2069
  }
1924
- var zr = Object.assign;
1925
- function Br(e, t) {
2070
+ var Zr = Object.assign;
2071
+ function Qr(e, t) {
1926
2072
  var n = Object.keys(e);
1927
2073
  if (Object.getOwnPropertySymbols) {
1928
2074
  var r = Object.getOwnPropertySymbols(e);
@@ -1932,26 +2078,26 @@ function Br(e, t) {
1932
2078
  }
1933
2079
  return n;
1934
2080
  }
1935
- function Vr(e) {
2081
+ function $r(e) {
1936
2082
  for (var t = 1; t < arguments.length; t++) {
1937
2083
  var n = arguments[t] == null ? {} : arguments[t];
1938
- t % 2 ? Br(Object(n), !0).forEach(function(t) {
1939
- Ur(e, t, n[t]);
1940
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Br(Object(n)).forEach(function(t) {
2084
+ t % 2 ? Qr(Object(n), !0).forEach(function(t) {
2085
+ ti(e, t, n[t]);
2086
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qr(Object(n)).forEach(function(t) {
1941
2087
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
1942
2088
  });
1943
2089
  }
1944
2090
  return e;
1945
2091
  }
1946
- function Hr(e) {
2092
+ function ei(e) {
1947
2093
  "@babel/helpers - typeof";
1948
- return Hr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2094
+ return ei = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1949
2095
  return typeof e;
1950
2096
  } : function(e) {
1951
2097
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1952
- }, Hr(e);
2098
+ }, ei(e);
1953
2099
  }
1954
- function Ur(e, t, n) {
2100
+ function ti(e, t, n) {
1955
2101
  return t in e ? Object.defineProperty(e, t, {
1956
2102
  value: n,
1957
2103
  enumerable: !0,
@@ -1959,45 +2105,45 @@ function Ur(e, t, n) {
1959
2105
  writable: !0
1960
2106
  }) : e[t] = n, e;
1961
2107
  }
1962
- function Wr() {
1963
- return Wr = Object.assign || function(e) {
2108
+ function ni() {
2109
+ return ni = Object.assign || function(e) {
1964
2110
  for (var t = 1; t < arguments.length; t++) {
1965
2111
  var n = arguments[t];
1966
2112
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
1967
2113
  }
1968
2114
  return e;
1969
- }, Wr.apply(this, arguments);
2115
+ }, ni.apply(this, arguments);
1970
2116
  }
1971
- function Gr(e, t) {
2117
+ function ri(e, t) {
1972
2118
  if (e == null) return {};
1973
2119
  var n = {}, r = Object.keys(e), i, a;
1974
2120
  for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
1975
2121
  return n;
1976
2122
  }
1977
- function Kr(e, t) {
2123
+ function ii(e, t) {
1978
2124
  if (e == null) return {};
1979
- var n = Gr(e, t), r, i;
2125
+ var n = ri(e, t), r, i;
1980
2126
  if (Object.getOwnPropertySymbols) {
1981
2127
  var a = Object.getOwnPropertySymbols(e);
1982
2128
  for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
1983
2129
  }
1984
2130
  return n;
1985
2131
  }
1986
- var qr = "1.15.2";
1987
- function Jr(e) {
2132
+ var ai = "1.15.2";
2133
+ function oi(e) {
1988
2134
  if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
1989
2135
  }
1990
- var Yr = Jr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Xr = Jr(/Edge/i), Zr = Jr(/firefox/i), Qr = Jr(/safari/i) && !Jr(/chrome/i) && !Jr(/android/i), $r = Jr(/iP(ad|od|hone)/i), ei = Jr(/chrome/i) && Jr(/android/i), ti = {
2136
+ var si = oi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ci = oi(/Edge/i), li = oi(/firefox/i), ui = oi(/safari/i) && !oi(/chrome/i) && !oi(/android/i), di = oi(/iP(ad|od|hone)/i), fi = oi(/chrome/i) && oi(/android/i), pi = {
1991
2137
  capture: !1,
1992
2138
  passive: !1
1993
2139
  };
1994
- function F(e, t, n) {
1995
- e.addEventListener(t, n, !Yr && ti);
1996
- }
1997
2140
  function I(e, t, n) {
1998
- e.removeEventListener(t, n, !Yr && ti);
2141
+ e.addEventListener(t, n, !si && pi);
1999
2142
  }
2000
- function ni(e, t) {
2143
+ function L(e, t, n) {
2144
+ e.removeEventListener(t, n, !si && pi);
2145
+ }
2146
+ function mi(e, t) {
2001
2147
  if (t) {
2002
2148
  if (t[0] === ">" && (t = t.substring(1)), e) try {
2003
2149
  if (e.matches) return e.matches(t);
@@ -2009,41 +2155,41 @@ function ni(e, t) {
2009
2155
  return !1;
2010
2156
  }
2011
2157
  }
2012
- function ri(e) {
2158
+ function hi(e) {
2013
2159
  return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
2014
2160
  }
2015
- function ii(e, t, n, r) {
2161
+ function gi(e, t, n, r) {
2016
2162
  if (e) {
2017
2163
  n ||= document;
2018
2164
  do {
2019
- if (t != null && (t[0] === ">" ? e.parentNode === n && ni(e, t) : ni(e, t)) || r && e === n) return e;
2165
+ if (t != null && (t[0] === ">" ? e.parentNode === n && mi(e, t) : mi(e, t)) || r && e === n) return e;
2020
2166
  if (e === n) break;
2021
- } while (e = ri(e));
2167
+ } while (e = hi(e));
2022
2168
  }
2023
2169
  return null;
2024
2170
  }
2025
- var ai = /\s+/g;
2026
- function L(e, t, n) {
2027
- e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ai, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ai, " "));
2028
- }
2171
+ var _i = /\s+/g;
2029
2172
  function R(e, t, n) {
2173
+ e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(_i, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(_i, " "));
2174
+ }
2175
+ function z(e, t, n) {
2030
2176
  var r = e && e.style;
2031
2177
  if (r) {
2032
2178
  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];
2033
2179
  !(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
2034
2180
  }
2035
2181
  }
2036
- function oi(e, t) {
2182
+ function vi(e, t) {
2037
2183
  var n = "";
2038
2184
  if (typeof e == "string") n = e;
2039
2185
  else do {
2040
- var r = R(e, "transform");
2186
+ var r = z(e, "transform");
2041
2187
  r && r !== "none" && (n = r + " " + n);
2042
2188
  } while (!t && (e = e.parentNode));
2043
2189
  var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
2044
2190
  return i && new i(n);
2045
2191
  }
2046
- function si(e, t, n) {
2192
+ function yi(e, t, n) {
2047
2193
  if (e) {
2048
2194
  var r = e.getElementsByTagName(t), i = 0, a = r.length;
2049
2195
  if (n) for (; i < a; i++) n(r[i], i);
@@ -2051,21 +2197,21 @@ function si(e, t, n) {
2051
2197
  }
2052
2198
  return [];
2053
2199
  }
2054
- function ci() {
2200
+ function bi() {
2055
2201
  return document.scrollingElement || document.documentElement;
2056
2202
  }
2057
- function z(e, t, n, r, i) {
2203
+ function B(e, t, n, r, i) {
2058
2204
  if (!(!e.getBoundingClientRect && e !== window)) {
2059
2205
  var a, o, s, c, l, u, d;
2060
- if (e !== window && e.parentNode && e !== ci() ? (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, !Yr)) do
2061
- if (i && i.getBoundingClientRect && (R(i, "transform") !== "none" || n && R(i, "position") !== "static")) {
2206
+ if (e !== window && e.parentNode && e !== bi() ? (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, !si)) do
2207
+ if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
2062
2208
  var f = i.getBoundingClientRect();
2063
- o -= f.top + parseInt(R(i, "border-top-width")), s -= f.left + parseInt(R(i, "border-left-width")), c = o + a.height, l = s + a.width;
2209
+ 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;
2064
2210
  break;
2065
2211
  }
2066
2212
  while (i = i.parentNode);
2067
2213
  if (r && e !== window) {
2068
- var p = oi(i || e), m = p && p.a, h = p && p.d;
2214
+ var p = vi(i || e), m = p && p.a, h = p && p.d;
2069
2215
  p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
2070
2216
  }
2071
2217
  return {
@@ -2078,18 +2224,18 @@ function z(e, t, n, r, i) {
2078
2224
  };
2079
2225
  }
2080
2226
  }
2081
- function li(e, t, n) {
2082
- for (var r = mi(e, !0), i = z(e)[t]; r;) {
2083
- var a = z(r)[n], o = void 0;
2227
+ function xi(e, t, n) {
2228
+ for (var r = Di(e, !0), i = B(e)[t]; r;) {
2229
+ var a = B(r)[n], o = void 0;
2084
2230
  if (o = i >= a, !o) return r;
2085
- if (r === ci()) break;
2086
- r = mi(r, !1);
2231
+ if (r === bi()) break;
2232
+ r = Di(r, !1);
2087
2233
  }
2088
2234
  return !1;
2089
2235
  }
2090
- function ui(e, t, n, r) {
2236
+ function Si(e, t, n, r) {
2091
2237
  for (var i = 0, a = 0, o = e.children; a < o.length;) {
2092
- if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && ii(o[a], n.draggable, e, !1)) {
2238
+ if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && gi(o[a], n.draggable, e, !1)) {
2093
2239
  if (i === t) return o[a];
2094
2240
  i++;
2095
2241
  }
@@ -2097,96 +2243,96 @@ function ui(e, t, n, r) {
2097
2243
  }
2098
2244
  return null;
2099
2245
  }
2100
- function di(e, t) {
2101
- for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !ni(n, t));) n = n.previousElementSibling;
2246
+ function Ci(e, t) {
2247
+ for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !mi(n, t));) n = n.previousElementSibling;
2102
2248
  return n || null;
2103
2249
  }
2104
- function B(e, t) {
2250
+ function wi(e, t) {
2105
2251
  var n = 0;
2106
2252
  if (!e || !e.parentNode) return -1;
2107
- for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ni(e, t)) && n++;
2253
+ for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || mi(e, t)) && n++;
2108
2254
  return n;
2109
2255
  }
2110
- function fi(e) {
2111
- var t = 0, n = 0, r = ci();
2256
+ function Ti(e) {
2257
+ var t = 0, n = 0, r = bi();
2112
2258
  if (e) do {
2113
- var i = oi(e), a = i.a, o = i.d;
2259
+ var i = vi(e), a = i.a, o = i.d;
2114
2260
  t += e.scrollLeft * a, n += e.scrollTop * o;
2115
2261
  } while (e !== r && (e = e.parentNode));
2116
2262
  return [t, n];
2117
2263
  }
2118
- function pi(e, t) {
2264
+ function Ei(e, t) {
2119
2265
  for (var n in e) if (e.hasOwnProperty(n)) {
2120
2266
  for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
2121
2267
  }
2122
2268
  return -1;
2123
2269
  }
2124
- function mi(e, t) {
2125
- if (!e || !e.getBoundingClientRect) return ci();
2270
+ function Di(e, t) {
2271
+ if (!e || !e.getBoundingClientRect) return bi();
2126
2272
  var n = e, r = !1;
2127
2273
  do
2128
2274
  if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
2129
- var i = R(n);
2275
+ var i = z(n);
2130
2276
  if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
2131
- if (!n.getBoundingClientRect || n === document.body) return ci();
2277
+ if (!n.getBoundingClientRect || n === document.body) return bi();
2132
2278
  if (r || t) return n;
2133
2279
  r = !0;
2134
2280
  }
2135
2281
  }
2136
2282
  while (n = n.parentNode);
2137
- return ci();
2283
+ return bi();
2138
2284
  }
2139
- function hi(e, t) {
2285
+ function Oi(e, t) {
2140
2286
  if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
2141
2287
  return e;
2142
2288
  }
2143
- function gi(e, t) {
2289
+ function ki(e, t) {
2144
2290
  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);
2145
2291
  }
2146
- var _i;
2147
- function vi(e, t) {
2292
+ var Ai;
2293
+ function ji(e, t) {
2148
2294
  return function() {
2149
- if (!_i) {
2295
+ if (!Ai) {
2150
2296
  var n = arguments, r = this;
2151
- n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), _i = setTimeout(function() {
2152
- _i = void 0;
2297
+ n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ai = setTimeout(function() {
2298
+ Ai = void 0;
2153
2299
  }, t);
2154
2300
  }
2155
2301
  };
2156
2302
  }
2157
- function yi() {
2158
- clearTimeout(_i), _i = void 0;
2303
+ function Mi() {
2304
+ clearTimeout(Ai), Ai = void 0;
2159
2305
  }
2160
- function bi(e, t, n) {
2306
+ function Ni(e, t, n) {
2161
2307
  e.scrollLeft += t, e.scrollTop += n;
2162
2308
  }
2163
- function xi(e) {
2309
+ function Pi(e) {
2164
2310
  var t = window.Polymer, n = window.jQuery || window.Zepto;
2165
2311
  return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
2166
2312
  }
2167
- function Si(e, t, n) {
2313
+ function Fi(e, t, n) {
2168
2314
  var r = {};
2169
2315
  return Array.from(e.children).forEach(function(i) {
2170
- if (!(!ii(i, t.draggable, e, !1) || i.animated || i === n)) {
2171
- var a = z(i);
2316
+ if (!(!gi(i, t.draggable, e, !1) || i.animated || i === n)) {
2317
+ var a = B(i);
2172
2318
  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);
2173
2319
  }
2174
2320
  }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
2175
2321
  }
2176
2322
  var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
2177
- function Ci() {
2323
+ function Ii() {
2178
2324
  var e = [], t;
2179
2325
  return {
2180
2326
  captureAnimationState: function() {
2181
2327
  e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
2182
- if (!(R(t, "display") === "none" || t === Q.ghost)) {
2328
+ if (!(z(t, "display") === "none" || t === Q.ghost)) {
2183
2329
  e.push({
2184
2330
  target: t,
2185
- rect: z(t)
2331
+ rect: B(t)
2186
2332
  });
2187
- var n = Vr({}, e[e.length - 1].rect);
2333
+ var n = $r({}, e[e.length - 1].rect);
2188
2334
  if (t.thisAnimationDuration) {
2189
- var r = oi(t, !0);
2335
+ var r = vi(t, !0);
2190
2336
  r && (n.top -= r.f, n.left -= r.e);
2191
2337
  }
2192
2338
  t.fromRect = n;
@@ -2197,7 +2343,7 @@ function Ci() {
2197
2343
  e.push(t);
2198
2344
  },
2199
2345
  removeAnimationState: function(t) {
2200
- e.splice(pi(e, { target: t }), 1);
2346
+ e.splice(Ei(e, { target: t }), 1);
2201
2347
  },
2202
2348
  animateAll: function(n) {
2203
2349
  var r = this;
@@ -2207,8 +2353,8 @@ function Ci() {
2207
2353
  }
2208
2354
  var i = !1, a = 0;
2209
2355
  e.forEach(function(e) {
2210
- var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = oi(n, !0);
2211
- d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && gi(c, s) && !gi(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ti(u, c, l, r.options)), gi(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() {
2356
+ var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = vi(n, !0);
2357
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ki(c, s) && !ki(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ri(u, c, l, r.options)), ki(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() {
2212
2358
  n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
2213
2359
  }, t), n.thisAnimationDuration = t);
2214
2360
  }), clearTimeout(t), i ? t = setTimeout(function() {
@@ -2217,27 +2363,27 @@ function Ci() {
2217
2363
  },
2218
2364
  animate: function(e, t, n, r) {
2219
2365
  if (r) {
2220
- R(e, "transition", ""), R(e, "transform", "");
2221
- var i = oi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2222
- e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = wi(e), R(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), R(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
2223
- R(e, "transition", ""), R(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2366
+ z(e, "transition", ""), z(e, "transform", "");
2367
+ var i = vi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
2368
+ e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Li(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() {
2369
+ z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
2224
2370
  }, r);
2225
2371
  }
2226
2372
  }
2227
2373
  };
2228
2374
  }
2229
- function wi(e) {
2375
+ function Li(e) {
2230
2376
  return e.offsetWidth;
2231
2377
  }
2232
- function Ti(e, t, n, r) {
2378
+ function Ri(e, t, n, r) {
2233
2379
  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;
2234
2380
  }
2235
- var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
2381
+ var zi = [], Bi = { initializeByDefault: !0 }, Vi = {
2236
2382
  mount: function(e) {
2237
- for (var t in Di) Di.hasOwnProperty(t) && !(t in e) && (e[t] = Di[t]);
2238
- Ei.forEach(function(t) {
2383
+ for (var t in Bi) Bi.hasOwnProperty(t) && !(t in e) && (e[t] = Bi[t]);
2384
+ zi.forEach(function(t) {
2239
2385
  if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
2240
- }), Ei.push(e);
2386
+ }), zi.push(e);
2241
2387
  },
2242
2388
  pluginEvent: function(e, t, n) {
2243
2389
  var r = this;
@@ -2245,16 +2391,16 @@ var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
2245
2391
  r.eventCanceled = !0;
2246
2392
  };
2247
2393
  var i = e + "Global";
2248
- Ei.forEach(function(r) {
2249
- t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Vr({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Vr({ sortable: t }, n)));
2394
+ zi.forEach(function(r) {
2395
+ t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i]($r({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e]($r({ sortable: t }, n)));
2250
2396
  });
2251
2397
  },
2252
2398
  initializePlugins: function(e, t, n, r) {
2253
- for (var i in Ei.forEach(function(r) {
2399
+ for (var i in zi.forEach(function(r) {
2254
2400
  var i = r.pluginName;
2255
2401
  if (!(!e.options[i] && !r.initializeByDefault)) {
2256
2402
  var a = new r(e, t, e.options);
2257
- a.sortable = e, a.options = e.options, e[i] = a, Wr(n, a.defaults);
2403
+ a.sortable = e, a.options = e.options, e[i] = a, ni(n, a.defaults);
2258
2404
  }
2259
2405
  }), e.options) if (e.options.hasOwnProperty(i)) {
2260
2406
  var a = this.modifyOption(e, i, e.options[i]);
@@ -2263,56 +2409,56 @@ var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
2263
2409
  },
2264
2410
  getEventProperties: function(e, t) {
2265
2411
  var n = {};
2266
- return Ei.forEach(function(r) {
2267
- typeof r.eventProperties == "function" && Wr(n, r.eventProperties.call(t[r.pluginName], e));
2412
+ return zi.forEach(function(r) {
2413
+ typeof r.eventProperties == "function" && ni(n, r.eventProperties.call(t[r.pluginName], e));
2268
2414
  }), n;
2269
2415
  },
2270
2416
  modifyOption: function(e, t, n) {
2271
2417
  var r;
2272
- return Ei.forEach(function(i) {
2418
+ return zi.forEach(function(i) {
2273
2419
  e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
2274
2420
  }), r;
2275
2421
  }
2276
2422
  };
2277
- function ki(e) {
2423
+ function Hi(e) {
2278
2424
  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;
2279
2425
  if (t ||= n && n[V], t) {
2280
2426
  var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
2281
- window.CustomEvent && !Yr && !Xr ? h = new CustomEvent(r, {
2427
+ window.CustomEvent && !si && !ci ? h = new CustomEvent(r, {
2282
2428
  bubbles: !0,
2283
2429
  cancelable: !0
2284
2430
  }) : (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;
2285
- var v = Vr(Vr({}, m), Oi.getEventProperties(r, t));
2431
+ var v = $r($r({}, m), Vi.getEventProperties(r, t));
2286
2432
  for (var y in v) h[y] = v[y];
2287
2433
  n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
2288
2434
  }
2289
2435
  }
2290
- var Ai = ["evt"], H = function(e, t) {
2291
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Kr(n, Ai);
2292
- Oi.pluginEvent.bind(Q)(e, t, Vr({
2436
+ var Ui = ["evt"], H = function(e, t) {
2437
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ii(n, Ui);
2438
+ Vi.pluginEvent.bind(Q)(e, t, $r({
2293
2439
  dragEl: W,
2294
2440
  parentEl: G,
2295
2441
  ghostEl: K,
2296
2442
  rootEl: q,
2297
- nextEl: ji,
2298
- lastDownEl: Mi,
2443
+ nextEl: Wi,
2444
+ lastDownEl: Gi,
2299
2445
  cloneEl: J,
2300
- cloneHidden: Ni,
2301
- dragStarted: qi,
2446
+ cloneHidden: Ki,
2447
+ dragStarted: oa,
2302
2448
  putSortable: X,
2303
2449
  activeSortable: Q.active,
2304
2450
  originalEvent: r,
2305
- oldIndex: Pi,
2306
- oldDraggableIndex: Fi,
2451
+ oldIndex: qi,
2452
+ oldDraggableIndex: Ji,
2307
2453
  newIndex: Y,
2308
- newDraggableIndex: Ii,
2309
- hideGhostForTarget: da,
2310
- unhideGhostForTarget: fa,
2454
+ newDraggableIndex: Yi,
2455
+ hideGhostForTarget: wa,
2456
+ unhideGhostForTarget: Ta,
2311
2457
  cloneNowHidden: function() {
2312
- Ni = !0;
2458
+ Ki = !0;
2313
2459
  },
2314
2460
  cloneNowShown: function() {
2315
- Ni = !1;
2461
+ Ki = !1;
2316
2462
  },
2317
2463
  dispatchSortableEvent: function(e) {
2318
2464
  U({
@@ -2324,45 +2470,45 @@ var Ai = ["evt"], H = function(e, t) {
2324
2470
  }, i));
2325
2471
  };
2326
2472
  function U(e) {
2327
- ki(Vr({
2473
+ Hi($r({
2328
2474
  putSortable: X,
2329
2475
  cloneEl: J,
2330
2476
  targetEl: W,
2331
2477
  rootEl: q,
2332
- oldIndex: Pi,
2333
- oldDraggableIndex: Fi,
2478
+ oldIndex: qi,
2479
+ oldDraggableIndex: Ji,
2334
2480
  newIndex: Y,
2335
- newDraggableIndex: Ii
2481
+ newDraggableIndex: Yi
2336
2482
  }, e));
2337
2483
  }
2338
- var W, G, K, q, ji, Mi, J, Ni, Pi, Y, Fi, Ii, Li, X, Ri = !1, zi = !1, Bi = [], Vi, Hi, Ui, Wi, Gi, Ki, qi, Ji, Yi, Xi = !1, Zi = !1, Qi, Z, $i = [], ea = !1, ta = [], na = typeof document < "u", ra = $r, ia = Xr || Yr ? "cssFloat" : "float", aa = na && !ei && !$r && "draggable" in document.createElement("div"), oa = function() {
2339
- if (na) {
2340
- if (Yr) return !1;
2484
+ var W, G, K, q, Wi, Gi, J, Ki, qi, Y, Ji, Yi, Xi, X, Zi = !1, Qi = !1, $i = [], ea, ta, na, ra, ia, aa, oa, sa, ca, la = !1, ua = !1, da, Z, fa = [], pa = !1, ma = [], ha = typeof document < "u", ga = di, _a = ci || si ? "cssFloat" : "float", va = ha && !fi && !di && "draggable" in document.createElement("div"), ya = function() {
2485
+ if (ha) {
2486
+ if (si) return !1;
2341
2487
  var e = document.createElement("x");
2342
2488
  return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
2343
2489
  }
2344
- }(), sa = function(e, t) {
2345
- var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = ui(e, 0, t), a = ui(e, 1, t), o = i && R(i), s = a && R(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + z(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + z(a).width;
2490
+ }(), ba = function(e, t) {
2491
+ var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Si(e, 0, t), a = Si(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;
2346
2492
  if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
2347
2493
  if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
2348
2494
  if (i && o.float && o.float !== "none") {
2349
2495
  var u = o.float === "left" ? "left" : "right";
2350
2496
  return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
2351
2497
  }
2352
- return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ia] === "none" || a && n[ia] === "none" && c + l > r) ? "vertical" : "horizontal";
2353
- }, ca = function(e, t, n) {
2498
+ return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[_a] === "none" || a && n[_a] === "none" && c + l > r) ? "vertical" : "horizontal";
2499
+ }, xa = function(e, t, n) {
2354
2500
  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;
2355
2501
  return r === o || i === s || r + a / 2 === o + c / 2;
2356
- }, la = function(e, t) {
2502
+ }, Sa = function(e, t) {
2357
2503
  var n;
2358
- return Bi.some(function(r) {
2504
+ return $i.some(function(r) {
2359
2505
  var i = r[V].options.emptyInsertThreshold;
2360
- if (!(!i || di(r))) {
2361
- var a = z(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
2506
+ if (!(!i || Ci(r))) {
2507
+ var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
2362
2508
  if (o && s) return n = r;
2363
2509
  }
2364
2510
  }), n;
2365
- }, ua = function(e) {
2511
+ }, Ca = function(e) {
2366
2512
  function t(e, n) {
2367
2513
  return function(r, i, a, o) {
2368
2514
  var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
@@ -2375,31 +2521,31 @@ var W, G, K, q, ji, Mi, J, Ni, Pi, Y, Fi, Ii, Li, X, Ri = !1, zi = !1, Bi = [],
2375
2521
  };
2376
2522
  }
2377
2523
  var n = {}, r = e.group;
2378
- (!r || Hr(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;
2379
- }, da = function() {
2380
- !oa && K && R(K, "display", "none");
2381
- }, fa = function() {
2382
- !oa && K && R(K, "display", "");
2524
+ (!r || ei(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;
2525
+ }, wa = function() {
2526
+ !ya && K && z(K, "display", "none");
2527
+ }, Ta = function() {
2528
+ !ya && K && z(K, "display", "");
2383
2529
  };
2384
- na && !ei && document.addEventListener("click", function(e) {
2385
- if (zi) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), zi = !1, !1;
2530
+ ha && !fi && document.addEventListener("click", function(e) {
2531
+ if (Qi) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Qi = !1, !1;
2386
2532
  }, !0);
2387
- var pa = function(e) {
2533
+ var Ea = function(e) {
2388
2534
  if (W) {
2389
2535
  e = e.touches ? e.touches[0] : e;
2390
- var t = la(e.clientX, e.clientY);
2536
+ var t = Sa(e.clientX, e.clientY);
2391
2537
  if (t) {
2392
2538
  var n = {};
2393
2539
  for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
2394
2540
  n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
2395
2541
  }
2396
2542
  }
2397
- }, ma = function(e) {
2543
+ }, Da = function(e) {
2398
2544
  W && W.parentNode[V]._isOutsideThisEl(e.target);
2399
2545
  };
2400
2546
  function Q(e, t) {
2401
2547
  if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
2402
- this.el = e, this.options = t = Wr({}, t), e[V] = this;
2548
+ this.el = e, this.options = t = ni({}, t), e[V] = this;
2403
2549
  var n = {
2404
2550
  group: null,
2405
2551
  sort: !0,
@@ -2412,7 +2558,7 @@ function Q(e, t) {
2412
2558
  invertedSwapThreshold: null,
2413
2559
  removeCloneOnHide: !0,
2414
2560
  direction: function() {
2415
- return sa(e, this.options);
2561
+ return ba(e, this.options);
2416
2562
  },
2417
2563
  ghostClass: "sortable-ghost",
2418
2564
  chosenClass: "sortable-chosen",
@@ -2439,17 +2585,17 @@ function Q(e, t) {
2439
2585
  x: 0,
2440
2586
  y: 0
2441
2587
  },
2442
- supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Qr,
2588
+ supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ui,
2443
2589
  emptyInsertThreshold: 5
2444
2590
  };
2445
- for (var r in Oi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
2446
- for (var i in ua(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
2447
- this.nativeDraggable = t.forceFallback ? !1 : aa, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? F(e, "pointerdown", this._onTapStart) : (F(e, "mousedown", this._onTapStart), F(e, "touchstart", this._onTapStart)), this.nativeDraggable && (F(e, "dragover", this), F(e, "dragenter", this)), Bi.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Wr(this, Ci());
2591
+ for (var r in Vi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
2592
+ for (var i in Ca(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
2593
+ this.nativeDraggable = t.forceFallback ? !1 : va, 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)), $i.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ni(this, Ii());
2448
2594
  }
2449
2595
  Q.prototype = {
2450
2596
  constructor: Q,
2451
2597
  _isOutsideThisEl: function(e) {
2452
- !this.el.contains(e) && e !== this.el && (Ji = null);
2598
+ !this.el.contains(e) && e !== this.el && (sa = null);
2453
2599
  },
2454
2600
  _getDirection: function(e, t) {
2455
2601
  return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
@@ -2457,8 +2603,8 @@ Q.prototype = {
2457
2603
  _onTapStart: function(e) {
2458
2604
  if (e.cancelable) {
2459
2605
  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;
2460
- if (wa(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Qr && s && s.tagName.toUpperCase() === "SELECT") && (s = ii(s, r.draggable, n, !1), !(s && s.animated) && Mi !== s)) {
2461
- if (Pi = B(s), Fi = B(s, r.draggable), typeof l == "function") {
2606
+ if (La(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ui && s && s.tagName.toUpperCase() === "SELECT") && (s = gi(s, r.draggable, n, !1), !(s && s.animated) && Gi !== s)) {
2607
+ if (qi = wi(s), Ji = wi(s, r.draggable), typeof l == "function") {
2462
2608
  if (l.call(this, e, s, this)) {
2463
2609
  U({
2464
2610
  sortable: t,
@@ -2471,7 +2617,7 @@ Q.prototype = {
2471
2617
  return;
2472
2618
  }
2473
2619
  } else if (l && (l = l.split(",").some(function(r) {
2474
- if (r = ii(c, r.trim(), n, !1), r) return U({
2620
+ if (r = gi(c, r.trim(), n, !1), r) return U({
2475
2621
  sortable: t,
2476
2622
  rootEl: r,
2477
2623
  name: "filter",
@@ -2483,36 +2629,36 @@ Q.prototype = {
2483
2629
  i && e.cancelable && e.preventDefault();
2484
2630
  return;
2485
2631
  }
2486
- r.handle && !ii(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
2632
+ r.handle && !gi(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
2487
2633
  }
2488
2634
  }
2489
2635
  },
2490
2636
  _prepareDragStart: function(e, t, n) {
2491
2637
  var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
2492
2638
  if (n && !W && n.parentNode === i) {
2493
- var c = z(n);
2494
- if (q = i, W = n, G = W.parentNode, ji = W.nextSibling, Mi = n, Li = a.group, Q.dragged = W, Vi = {
2639
+ var c = B(n);
2640
+ if (q = i, W = n, G = W.parentNode, Wi = W.nextSibling, Gi = n, Xi = a.group, Q.dragged = W, ea = {
2495
2641
  target: W,
2496
2642
  clientX: (t || e).clientX,
2497
2643
  clientY: (t || e).clientY
2498
- }, Gi = Vi.clientX - c.left, Ki = Vi.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
2644
+ }, ia = ea.clientX - c.left, aa = ea.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
2499
2645
  if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
2500
2646
  r._onDrop();
2501
2647
  return;
2502
2648
  }
2503
- r._disableDelayedDragEvents(), !Zr && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
2649
+ r._disableDelayedDragEvents(), !li && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
2504
2650
  sortable: r,
2505
2651
  name: "choose",
2506
2652
  originalEvent: e
2507
- }), L(W, a.chosenClass, !0);
2653
+ }), R(W, a.chosenClass, !0);
2508
2654
  }, a.ignore.split(",").forEach(function(e) {
2509
- si(W, e.trim(), _a);
2510
- }), F(o, "dragover", pa), F(o, "mousemove", pa), F(o, "touchmove", pa), F(o, "mouseup", r._onDrop), F(o, "touchend", r._onDrop), F(o, "touchcancel", r._onDrop), Zr && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Xr || Yr))) {
2655
+ yi(W, e.trim(), Aa);
2656
+ }), I(o, "dragover", Ea), I(o, "mousemove", Ea), I(o, "touchmove", Ea), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), li && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ci || si))) {
2511
2657
  if (Q.eventCanceled) {
2512
2658
  this._onDrop();
2513
2659
  return;
2514
2660
  }
2515
- F(o, "mouseup", r._disableDelayedDrag), F(o, "touchend", r._disableDelayedDrag), F(o, "touchcancel", r._disableDelayedDrag), F(o, "mousemove", r._delayedDragTouchMoveHandler), F(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && F(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
2661
+ 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);
2516
2662
  } else s();
2517
2663
  }
2518
2664
  },
@@ -2521,25 +2667,25 @@ Q.prototype = {
2521
2667
  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();
2522
2668
  },
2523
2669
  _disableDelayedDrag: function() {
2524
- W && _a(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
2670
+ W && Aa(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
2525
2671
  },
2526
2672
  _disableDelayedDragEvents: function() {
2527
2673
  var e = this.el.ownerDocument;
2528
- I(e, "mouseup", this._disableDelayedDrag), I(e, "touchend", this._disableDelayedDrag), I(e, "touchcancel", this._disableDelayedDrag), I(e, "mousemove", this._delayedDragTouchMoveHandler), I(e, "touchmove", this._delayedDragTouchMoveHandler), I(e, "pointermove", this._delayedDragTouchMoveHandler);
2674
+ 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);
2529
2675
  },
2530
2676
  _triggerDragStart: function(e, t) {
2531
- t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? F(document, "pointermove", this._onTouchMove) : t ? F(document, "touchmove", this._onTouchMove) : F(document, "mousemove", this._onTouchMove) : (F(W, "dragend", this), F(q, "dragstart", this._onDragStart));
2677
+ 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));
2532
2678
  try {
2533
- document.selection ? Ta(function() {
2679
+ document.selection ? Ra(function() {
2534
2680
  document.selection.empty();
2535
2681
  }) : window.getSelection().removeAllRanges();
2536
2682
  } catch {}
2537
2683
  },
2538
2684
  _dragStarted: function(e, t) {
2539
- if (Ri = !1, q && W) {
2540
- H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover", ma);
2685
+ if (Zi = !1, q && W) {
2686
+ H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", Da);
2541
2687
  var n = this.options;
2542
- !e && L(W, n.dragClass, !1), L(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
2688
+ !e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
2543
2689
  sortable: this,
2544
2690
  name: "start",
2545
2691
  originalEvent: t
@@ -2547,33 +2693,33 @@ Q.prototype = {
2547
2693
  } else this._nulling();
2548
2694
  },
2549
2695
  _emulateDragOver: function() {
2550
- if (Hi) {
2551
- this._lastX = Hi.clientX, this._lastY = Hi.clientY, da();
2552
- for (var e = document.elementFromPoint(Hi.clientX, Hi.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Hi.clientX, Hi.clientY), e !== t);) t = e;
2696
+ if (ta) {
2697
+ this._lastX = ta.clientX, this._lastY = ta.clientY, wa();
2698
+ for (var e = document.elementFromPoint(ta.clientX, ta.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ta.clientX, ta.clientY), e !== t);) t = e;
2553
2699
  if (W.parentNode[V]._isOutsideThisEl(e), t) do {
2554
2700
  if (t[V]) {
2555
2701
  var n = void 0;
2556
2702
  if (n = t[V]._onDragOver({
2557
- clientX: Hi.clientX,
2558
- clientY: Hi.clientY,
2703
+ clientX: ta.clientX,
2704
+ clientY: ta.clientY,
2559
2705
  target: e,
2560
2706
  rootEl: t
2561
2707
  }), n && !this.options.dragoverBubble) break;
2562
2708
  }
2563
2709
  e = t;
2564
2710
  } while (t = t.parentNode);
2565
- fa();
2711
+ Ta();
2566
2712
  }
2567
2713
  },
2568
2714
  _onTouchMove: function(e) {
2569
- if (Vi) {
2570
- var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && oi(K, !0), o = K && a && a.a, s = K && a && a.d, c = ra && Z && fi(Z), l = (i.clientX - Vi.clientX + r.x) / (o || 1) + (c ? c[0] - $i[0] : 0) / (o || 1), u = (i.clientY - Vi.clientY + r.y) / (s || 1) + (c ? c[1] - $i[1] : 0) / (s || 1);
2571
- if (!Q.active && !Ri) {
2715
+ if (ea) {
2716
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && vi(K, !0), o = K && a && a.a, s = K && a && a.d, c = ga && Z && Ti(Z), l = (i.clientX - ea.clientX + r.x) / (o || 1) + (c ? c[0] - fa[0] : 0) / (o || 1), u = (i.clientY - ea.clientY + r.y) / (s || 1) + (c ? c[1] - fa[1] : 0) / (s || 1);
2717
+ if (!Q.active && !Zi) {
2572
2718
  if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
2573
2719
  this._onDragStart(e, !0);
2574
2720
  }
2575
2721
  if (K) {
2576
- a ? (a.e += l - (Ui || 0), a.f += u - (Wi || 0)) : a = {
2722
+ a ? (a.e += l - (na || 0), a.f += u - (ra || 0)) : a = {
2577
2723
  a: 1,
2578
2724
  b: 0,
2579
2725
  c: 0,
@@ -2582,19 +2728,19 @@ Q.prototype = {
2582
2728
  f: u
2583
2729
  };
2584
2730
  var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
2585
- R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d), Ui = l, Wi = u, Hi = i;
2731
+ z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), na = l, ra = u, ta = i;
2586
2732
  }
2587
2733
  e.cancelable && e.preventDefault();
2588
2734
  }
2589
2735
  },
2590
2736
  _appendGhost: function() {
2591
2737
  if (!K) {
2592
- var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0, ra, !0, e), n = this.options;
2593
- if (ra) {
2594
- for (Z = e; R(Z, "position") === "static" && R(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
2595
- Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = ci()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = ci(), $i = fi(Z);
2738
+ var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, ga, !0, e), n = this.options;
2739
+ if (ga) {
2740
+ for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
2741
+ Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = bi()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = bi(), fa = Ti(Z);
2596
2742
  }
2597
- K = W.cloneNode(!0), L(K, n.ghostClass, !1), L(K, n.fallbackClass, !0), L(K, n.dragClass, !0), R(K, "transition", ""), R(K, "transform", ""), R(K, "box-sizing", "border-box"), R(K, "margin", 0), R(K, "top", t.top), R(K, "left", t.left), R(K, "width", t.width), R(K, "height", t.height), R(K, "opacity", "0.8"), R(K, "position", ra ? "absolute" : "fixed"), R(K, "zIndex", "100000"), R(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), R(K, "transform-origin", Gi / parseInt(K.style.width) * 100 + "% " + Ki / parseInt(K.style.height) * 100 + "%");
2743
+ 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", ga ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", ia / parseInt(K.style.width) * 100 + "% " + aa / parseInt(K.style.height) * 100 + "%");
2598
2744
  }
2599
2745
  },
2600
2746
  _onDragStart: function(e, t) {
@@ -2603,18 +2749,18 @@ Q.prototype = {
2603
2749
  this._onDrop();
2604
2750
  return;
2605
2751
  }
2606
- H("setupClone", this), Q.eventCanceled || (J = xi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), L(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ta(function() {
2752
+ H("setupClone", this), Q.eventCanceled || (J = Pi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ra(function() {
2607
2753
  H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
2608
2754
  sortable: n,
2609
2755
  name: "clone"
2610
2756
  }));
2611
- }), !t && L(W, i.dragClass, !0), t ? (zi = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (I(document, "mouseup", n._onDrop), I(document, "touchend", n._onDrop), I(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), F(document, "drop", n), R(W, "transform", "translateZ(0)")), Ri = !0, n._dragStartId = Ta(n._dragStarted.bind(n, t, e)), F(document, "selectstart", n), qi = !0, Qr && R(document.body, "user-select", "none");
2757
+ }), !t && R(W, i.dragClass, !0), t ? (Qi = !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)")), Zi = !0, n._dragStartId = Ra(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), oa = !0, ui && z(document.body, "user-select", "none");
2612
2758
  },
2613
2759
  _onDragOver: function(e) {
2614
- var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Li === s, u = o.sort, d = X || c, f, p = this, m = !1;
2615
- if (ea) return;
2760
+ var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Xi === s, u = o.sort, d = X || c, f, p = this, m = !1;
2761
+ if (pa) return;
2616
2762
  function h(o, s) {
2617
- H(o, p, Vr({
2763
+ H(o, p, $r({
2618
2764
  evt: e,
2619
2765
  isOwner: l,
2620
2766
  axis: f ? "vertical" : "horizontal",
@@ -2626,7 +2772,7 @@ Q.prototype = {
2626
2772
  target: n,
2627
2773
  completed: _,
2628
2774
  onMove: function(n, i) {
2629
- return ga(q, t, W, r, n, z(n), e, i);
2775
+ return ka(q, t, W, r, n, B(n), e, i);
2630
2776
  },
2631
2777
  changed: v
2632
2778
  }, s));
@@ -2635,50 +2781,50 @@ Q.prototype = {
2635
2781
  h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
2636
2782
  }
2637
2783
  function _(r) {
2638
- return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (L(W, X ? X.options.ghostClass : c.options.ghostClass, !1), L(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() {
2784
+ 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() {
2639
2785
  h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
2640
- }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Ji = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && pa(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
2786
+ }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (sa = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && Ea(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
2641
2787
  }
2642
2788
  function v() {
2643
- Y = B(W), Ii = B(W, o.draggable), U({
2789
+ Y = wi(W), Yi = wi(W, o.draggable), U({
2644
2790
  sortable: p,
2645
2791
  name: "change",
2646
2792
  toEl: t,
2647
2793
  newIndex: Y,
2648
- newDraggableIndex: Ii,
2794
+ newDraggableIndex: Yi,
2649
2795
  originalEvent: e
2650
2796
  });
2651
2797
  }
2652
- if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ii(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
2798
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = gi(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
2653
2799
  if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
2654
- if (zi = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Li.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
2655
- if (f = this._getDirection(e, n) === "vertical", r = z(W), h("dragOverValid"), Q.eventCanceled) return m;
2656
- if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (ji ? q.insertBefore(W, ji) : q.appendChild(W)), _(!0);
2657
- var y = di(t, o.draggable);
2658
- if (!y || ba(e, f, this) && !y.animated) {
2800
+ if (Qi = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Xi.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
2801
+ if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
2802
+ if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Wi ? q.insertBefore(W, Wi) : q.appendChild(W)), _(!0);
2803
+ var y = Ci(t, o.draggable);
2804
+ if (!y || Na(e, f, this) && !y.animated) {
2659
2805
  if (y === W) return _(!1);
2660
- if (y && t === e.target && (n = y), n && (i = z(n)), ga(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);
2661
- } else if (y && ya(e, f, this)) {
2662
- var b = ui(t, 0, o, !0);
2806
+ if (y && t === e.target && (n = y), n && (i = B(n)), ka(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);
2807
+ } else if (y && Ma(e, f, this)) {
2808
+ var b = Si(t, 0, o, !0);
2663
2809
  if (b === W) return _(!1);
2664
- if (n = b, i = z(n), ga(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
2810
+ if (n = b, i = B(n), ka(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
2665
2811
  } else if (n.parentNode === t) {
2666
- i = z(n);
2667
- var x = 0, S, C = W.parentNode !== t, w = !ca(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = li(n, "top", "top") || li(W, "top", "top"), ee = E ? E.scrollTop : void 0;
2668
- Ji !== n && (S = i[T], Xi = !1, Zi = !w && o.invertSwap || C), x = xa(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Zi, Ji === n);
2812
+ i = B(n);
2813
+ var x = 0, S, C = W.parentNode !== t, w = !xa(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = xi(n, "top", "top") || xi(W, "top", "top"), ee = E ? E.scrollTop : void 0;
2814
+ sa !== n && (S = i[T], la = !1, ua = !w && o.invertSwap || C), x = Pa(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, ua, sa === n);
2669
2815
  var D;
2670
2816
  if (x !== 0) {
2671
- var O = B(W);
2817
+ var O = wi(W);
2672
2818
  do
2673
2819
  O -= x, D = G.children[O];
2674
- while (D && (R(D, "display") === "none" || D === K));
2820
+ while (D && (z(D, "display") === "none" || D === K));
2675
2821
  }
2676
2822
  if (x === 0 || D === n) return _(!1);
2677
- Ji = n, Yi = x;
2823
+ sa = n, ca = x;
2678
2824
  var k = n.nextElementSibling, te = !1;
2679
2825
  te = x === 1;
2680
- var A = ga(q, t, W, r, n, i, e, te);
2681
- if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), ea = !0, setTimeout(va, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && bi(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !Zi && (Qi = Math.abs(S - z(n)[T])), v(), _(!0);
2826
+ var A = ka(q, t, W, r, n, i, e, te);
2827
+ if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), pa = !0, setTimeout(ja, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && Ni(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !ua && (da = Math.abs(S - B(n)[T])), v(), _(!0);
2682
2828
  }
2683
2829
  if (t.contains(W)) return _(!1);
2684
2830
  }
@@ -2686,26 +2832,26 @@ Q.prototype = {
2686
2832
  },
2687
2833
  _ignoreWhileAnimating: null,
2688
2834
  _offMoveEvents: function() {
2689
- I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover", pa), I(document, "mousemove", pa), I(document, "touchmove", pa);
2835
+ L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", Ea), L(document, "mousemove", Ea), L(document, "touchmove", Ea);
2690
2836
  },
2691
2837
  _offUpEvents: function() {
2692
2838
  var e = this.el.ownerDocument;
2693
- I(e, "mouseup", this._onDrop), I(e, "touchend", this._onDrop), I(e, "pointerup", this._onDrop), I(e, "touchcancel", this._onDrop), I(document, "selectstart", this);
2839
+ L(e, "mouseup", this._onDrop), L(e, "touchend", this._onDrop), L(e, "pointerup", this._onDrop), L(e, "touchcancel", this._onDrop), L(document, "selectstart", this);
2694
2840
  },
2695
2841
  _onDrop: function(e) {
2696
2842
  var t = this.el, n = this.options;
2697
- if (Y = B(W), Ii = B(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = B(W), Ii = B(W, n.draggable), Q.eventCanceled) {
2843
+ if (Y = wi(W), Yi = wi(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = wi(W), Yi = wi(W, n.draggable), Q.eventCanceled) {
2698
2844
  this._nulling();
2699
2845
  return;
2700
2846
  }
2701
- Ri = !1, Zi = !1, Xi = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ea(this.cloneId), Ea(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Qr && R(document.body, "user-select", ""), R(W, "transform", ""), e && (qi && (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 && I(W, "dragend", this), _a(W), W.style["will-change"] = "", qi && !Ri && L(W, X ? X.options.ghostClass : this.options.ghostClass, !1), L(W, this.options.chosenClass, !1), U({
2847
+ Zi = !1, ua = !1, la = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), za(this.cloneId), za(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ui && z(document.body, "user-select", ""), z(W, "transform", ""), e && (oa && (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), Aa(W), W.style["will-change"] = "", oa && !Zi && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
2702
2848
  sortable: this,
2703
2849
  name: "unchoose",
2704
2850
  toEl: G,
2705
2851
  newIndex: null,
2706
2852
  newDraggableIndex: null,
2707
2853
  originalEvent: e
2708
- }), q === G ? Y !== Pi && Y >= 0 && (U({
2854
+ }), q === G ? Y !== qi && Y >= 0 && (U({
2709
2855
  sortable: this,
2710
2856
  name: "update",
2711
2857
  toEl: G,
@@ -2737,7 +2883,7 @@ Q.prototype = {
2737
2883
  name: "sort",
2738
2884
  toEl: G,
2739
2885
  originalEvent: e
2740
- })), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Pi, Ii = Fi), U({
2886
+ })), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = qi, Yi = Ji), U({
2741
2887
  sortable: this,
2742
2888
  name: "end",
2743
2889
  toEl: G,
@@ -2745,9 +2891,9 @@ Q.prototype = {
2745
2891
  }), this.save()))), this._nulling();
2746
2892
  },
2747
2893
  _nulling: function() {
2748
- H("nulling", this), q = W = G = K = ji = J = Mi = Ni = Vi = Hi = qi = Y = Ii = Pi = Fi = Ji = Yi = X = Li = Q.dragged = Q.ghost = Q.clone = Q.active = null, ta.forEach(function(e) {
2894
+ H("nulling", this), q = W = G = K = Wi = J = Gi = Ki = ea = ta = oa = Y = Yi = qi = Ji = sa = ca = X = Xi = Q.dragged = Q.ghost = Q.clone = Q.active = null, ma.forEach(function(e) {
2749
2895
  e.checked = !0;
2750
- }), ta.length = Ui = Wi = 0;
2896
+ }), ma.length = na = ra = 0;
2751
2897
  },
2752
2898
  handleEvent: function(e) {
2753
2899
  switch (e.type) {
@@ -2757,7 +2903,7 @@ Q.prototype = {
2757
2903
  break;
2758
2904
  case "dragenter":
2759
2905
  case "dragover":
2760
- W && (this._onDragOver(e), ha(e));
2906
+ W && (this._onDragOver(e), Oa(e));
2761
2907
  break;
2762
2908
  case "selectstart":
2763
2909
  e.preventDefault();
@@ -2765,14 +2911,14 @@ Q.prototype = {
2765
2911
  }
2766
2912
  },
2767
2913
  toArray: function() {
2768
- for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], ii(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ca(t));
2914
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], gi(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ia(t));
2769
2915
  return e;
2770
2916
  },
2771
2917
  sort: function(e, t) {
2772
2918
  var n = {}, r = this.el;
2773
2919
  this.toArray().forEach(function(e, t) {
2774
2920
  var i = r.children[t];
2775
- ii(i, this.options.draggable, r, !1) && (n[e] = i);
2921
+ gi(i, this.options.draggable, r, !1) && (n[e] = i);
2776
2922
  }, this), t && this.captureAnimationState(), e.forEach(function(e) {
2777
2923
  n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
2778
2924
  }), t && this.animateAll();
@@ -2782,25 +2928,25 @@ Q.prototype = {
2782
2928
  e && e.set && e.set(this);
2783
2929
  },
2784
2930
  closest: function(e, t) {
2785
- return ii(e, t || this.options.draggable, this.el, !1);
2931
+ return gi(e, t || this.options.draggable, this.el, !1);
2786
2932
  },
2787
2933
  option: function(e, t) {
2788
2934
  var n = this.options;
2789
2935
  if (t === void 0) return n[e];
2790
- var r = Oi.modifyOption(this, e, t);
2791
- r === void 0 ? n[e] = t : n[e] = r, e === "group" && ua(n);
2936
+ var r = Vi.modifyOption(this, e, t);
2937
+ r === void 0 ? n[e] = t : n[e] = r, e === "group" && Ca(n);
2792
2938
  },
2793
2939
  destroy: function() {
2794
2940
  H("destroy", this);
2795
2941
  var e = this.el;
2796
- e[V] = null, I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart), I(e, "pointerdown", this._onTapStart), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
2942
+ 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) {
2797
2943
  e.removeAttribute("draggable");
2798
- }), this._onDrop(), this._disableDelayedDragEvents(), Bi.splice(Bi.indexOf(this.el), 1), this.el = e = null;
2944
+ }), this._onDrop(), this._disableDelayedDragEvents(), $i.splice($i.indexOf(this.el), 1), this.el = e = null;
2799
2945
  },
2800
2946
  _hideClone: function() {
2801
- if (!Ni) {
2947
+ if (!Ki) {
2802
2948
  if (H("hideClone", this), Q.eventCanceled) return;
2803
- R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ni = !0;
2949
+ z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ki = !0;
2804
2950
  }
2805
2951
  },
2806
2952
  _showClone: function(e) {
@@ -2808,99 +2954,99 @@ Q.prototype = {
2808
2954
  this._hideClone();
2809
2955
  return;
2810
2956
  }
2811
- if (Ni) {
2957
+ if (Ki) {
2812
2958
  if (H("showClone", this), Q.eventCanceled) return;
2813
- W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : ji ? q.insertBefore(J, ji) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), R(J, "display", ""), Ni = !1;
2959
+ W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Wi ? q.insertBefore(J, Wi) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), Ki = !1;
2814
2960
  }
2815
2961
  }
2816
2962
  };
2817
- function ha(e) {
2963
+ function Oa(e) {
2818
2964
  e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
2819
2965
  }
2820
- function ga(e, t, n, r, i, a, o, s) {
2966
+ function ka(e, t, n, r, i, a, o, s) {
2821
2967
  var c, l = e[V], u = l.options.onMove, d;
2822
- return window.CustomEvent && !Yr && !Xr ? c = new CustomEvent("move", {
2968
+ return window.CustomEvent && !si && !ci ? c = new CustomEvent("move", {
2823
2969
  bubbles: !0,
2824
2970
  cancelable: !0
2825
- }) : (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 || z(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
2971
+ }) : (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;
2826
2972
  }
2827
- function _a(e) {
2973
+ function Aa(e) {
2828
2974
  e.draggable = !1;
2829
2975
  }
2830
- function va() {
2831
- ea = !1;
2976
+ function ja() {
2977
+ pa = !1;
2832
2978
  }
2833
- function ya(e, t, n) {
2834
- var r = z(ui(n.el, 0, n.options, !0)), i = Si(n.el, n.options, K), a = 10;
2979
+ function Ma(e, t, n) {
2980
+ var r = B(Si(n.el, 0, n.options, !0)), i = Fi(n.el, n.options, K), a = 10;
2835
2981
  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;
2836
2982
  }
2837
- function ba(e, t, n) {
2838
- var r = z(di(n.el, n.options.draggable)), i = Si(n.el, n.options, K), a = 10;
2983
+ function Na(e, t, n) {
2984
+ var r = B(Ci(n.el, n.options.draggable)), i = Fi(n.el, n.options, K), a = 10;
2839
2985
  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;
2840
2986
  }
2841
- function xa(e, t, n, r, i, a, o, s) {
2987
+ function Pa(e, t, n, r, i, a, o, s) {
2842
2988
  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;
2843
2989
  if (!o) {
2844
- if (s && Qi < l * i) {
2845
- if (!Xi && (Yi === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Xi = !0), Xi) f = !0;
2846
- else if (Yi === 1 ? c < u + Qi : c > d - Qi) return -Yi;
2847
- } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Sa(t);
2990
+ if (s && da < l * i) {
2991
+ if (!la && (ca === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (la = !0), la) f = !0;
2992
+ else if (ca === 1 ? c < u + da : c > d - da) return -ca;
2993
+ } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Fa(t);
2848
2994
  }
2849
2995
  return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
2850
2996
  }
2851
- function Sa(e) {
2852
- return B(W) < B(e) ? 1 : -1;
2997
+ function Fa(e) {
2998
+ return wi(W) < wi(e) ? 1 : -1;
2853
2999
  }
2854
- function Ca(e) {
3000
+ function Ia(e) {
2855
3001
  for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
2856
3002
  return r.toString(36);
2857
3003
  }
2858
- function wa(e) {
2859
- ta.length = 0;
3004
+ function La(e) {
3005
+ ma.length = 0;
2860
3006
  for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
2861
3007
  var r = t[n];
2862
- r.checked && ta.push(r);
3008
+ r.checked && ma.push(r);
2863
3009
  }
2864
3010
  }
2865
- function Ta(e) {
3011
+ function Ra(e) {
2866
3012
  return setTimeout(e, 0);
2867
3013
  }
2868
- function Ea(e) {
3014
+ function za(e) {
2869
3015
  return clearTimeout(e);
2870
3016
  }
2871
- na && F(document, "touchmove", function(e) {
2872
- (Q.active || Ri) && e.cancelable && e.preventDefault();
3017
+ ha && I(document, "touchmove", function(e) {
3018
+ (Q.active || Zi) && e.cancelable && e.preventDefault();
2873
3019
  }), Q.utils = {
2874
- on: F,
2875
- off: I,
2876
- css: R,
2877
- find: si,
3020
+ on: I,
3021
+ off: L,
3022
+ css: z,
3023
+ find: yi,
2878
3024
  is: function(e, t) {
2879
- return !!ii(e, t, e, !1);
2880
- },
2881
- extend: hi,
2882
- throttle: vi,
2883
- closest: ii,
2884
- toggleClass: L,
2885
- clone: xi,
2886
- index: B,
2887
- nextTick: Ta,
2888
- cancelNextTick: Ea,
2889
- detectDirection: sa,
2890
- getChild: ui
3025
+ return !!gi(e, t, e, !1);
3026
+ },
3027
+ extend: Oi,
3028
+ throttle: ji,
3029
+ closest: gi,
3030
+ toggleClass: R,
3031
+ clone: Pi,
3032
+ index: wi,
3033
+ nextTick: Ra,
3034
+ cancelNextTick: za,
3035
+ detectDirection: ba,
3036
+ getChild: Si
2891
3037
  }, Q.get = function(e) {
2892
3038
  return e[V];
2893
3039
  }, Q.mount = function() {
2894
3040
  var e = [...arguments];
2895
3041
  e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
2896
3042
  if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
2897
- e.utils && (Q.utils = Vr(Vr({}, Q.utils), e.utils)), Oi.mount(e);
3043
+ e.utils && (Q.utils = $r($r({}, Q.utils), e.utils)), Vi.mount(e);
2898
3044
  });
2899
3045
  }, Q.create = function(e, t) {
2900
3046
  return new Q(e, t);
2901
- }, Q.version = qr;
2902
- var $ = [], Da, Oa, ka = !1, Aa, ja, Ma, Na;
2903
- function Pa() {
3047
+ }, Q.version = ai;
3048
+ var $ = [], Ba, Va, Ha = !1, Ua, Wa, Ga, Ka;
3049
+ function qa() {
2904
3050
  function e() {
2905
3051
  for (var e in this.defaults = {
2906
3052
  scroll: !0,
@@ -2913,70 +3059,70 @@ function Pa() {
2913
3059
  return e.prototype = {
2914
3060
  dragStarted: function(e) {
2915
3061
  var t = e.originalEvent;
2916
- this.sortable.nativeDraggable ? F(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? F(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? F(document, "touchmove", this._handleFallbackAutoScroll) : F(document, "mousemove", this._handleFallbackAutoScroll);
3062
+ 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);
2917
3063
  },
2918
3064
  dragOverCompleted: function(e) {
2919
3065
  var t = e.originalEvent;
2920
3066
  !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
2921
3067
  },
2922
3068
  drop: function() {
2923
- this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), Ia(), Fa(), yi();
3069
+ this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Ya(), Ja(), Mi();
2924
3070
  },
2925
3071
  nulling: function() {
2926
- Ma = Oa = Da = ka = Na = Aa = ja = null, $.length = 0;
3072
+ Ga = Va = Ba = Ha = Ka = Ua = Wa = null, $.length = 0;
2927
3073
  },
2928
3074
  _handleFallbackAutoScroll: function(e) {
2929
3075
  this._handleAutoScroll(e, !0);
2930
3076
  },
2931
3077
  _handleAutoScroll: function(e, t) {
2932
3078
  var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
2933
- if (Ma = e, t || this.options.forceAutoScrollFallback || Xr || Yr || Qr) {
2934
- La(e, this.options, a, t);
2935
- var o = mi(a, !0);
2936
- ka && (!Na || r !== Aa || i !== ja) && (Na && Ia(), Na = setInterval(function() {
2937
- var a = mi(document.elementFromPoint(r, i), !0);
2938
- a !== o && (o = a, Fa()), La(e, n.options, a, t);
2939
- }, 10), Aa = r, ja = i);
3079
+ if (Ga = e, t || this.options.forceAutoScrollFallback || ci || si || ui) {
3080
+ Xa(e, this.options, a, t);
3081
+ var o = Di(a, !0);
3082
+ Ha && (!Ka || r !== Ua || i !== Wa) && (Ka && Ya(), Ka = setInterval(function() {
3083
+ var a = Di(document.elementFromPoint(r, i), !0);
3084
+ a !== o && (o = a, Ja()), Xa(e, n.options, a, t);
3085
+ }, 10), Ua = r, Wa = i);
2940
3086
  } else {
2941
- if (!this.options.bubbleScroll || mi(a, !0) === ci()) {
2942
- Fa();
3087
+ if (!this.options.bubbleScroll || Di(a, !0) === bi()) {
3088
+ Ja();
2943
3089
  return;
2944
3090
  }
2945
- La(e, this.options, mi(a, !1), !1);
3091
+ Xa(e, this.options, Di(a, !1), !1);
2946
3092
  }
2947
3093
  }
2948
- }, Wr(e, {
3094
+ }, ni(e, {
2949
3095
  pluginName: "scroll",
2950
3096
  initializeByDefault: !0
2951
3097
  });
2952
3098
  }
2953
- function Fa() {
3099
+ function Ja() {
2954
3100
  $.forEach(function(e) {
2955
3101
  clearInterval(e.pid);
2956
3102
  }), $ = [];
2957
3103
  }
2958
- function Ia() {
2959
- clearInterval(Na);
3104
+ function Ya() {
3105
+ clearInterval(Ka);
2960
3106
  }
2961
- var La = vi(function(e, t, n, r) {
3107
+ var Xa = ji(function(e, t, n, r) {
2962
3108
  if (t.scroll) {
2963
- var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ci(), l = !1, u;
2964
- Oa !== n && (Oa = n, Fa(), Da = t.scroll, u = t.scrollFn, Da === !0 && (Da = mi(n, !0)));
2965
- var d = 0, f = Da;
3109
+ var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = bi(), l = !1, u;
3110
+ Va !== n && (Va = n, Ja(), Ba = t.scroll, u = t.scrollFn, Ba === !0 && (Ba = Di(n, !0)));
3111
+ var d = 0, f = Ba;
2966
3112
  do {
2967
- var p = f, m = z(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 = R(p), E = p.scrollLeft, ee = p.scrollTop;
3113
+ 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, ee = p.scrollTop;
2968
3114
  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"));
2969
3115
  var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
2970
3116
  if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
2971
3117
  ($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
2972
- r && this.layer === 0 && Q.active._onTouchMove(Ma);
3118
+ r && this.layer === 0 && Q.active._onTouchMove(Ga);
2973
3119
  var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
2974
- typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ma, $[this.layer].el) !== "continue" || bi($[this.layer].el, n, t);
3120
+ typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ga, $[this.layer].el) !== "continue" || Ni($[this.layer].el, n, t);
2975
3121
  }.bind({ layer: d }), 24))), d++;
2976
- } while (t.bubbleScroll && f !== c && (f = mi(f, !1)));
2977
- ka = l;
3122
+ } while (t.bubbleScroll && f !== c && (f = Di(f, !1)));
3123
+ Ha = l;
2978
3124
  }
2979
- }, 30), Ra = function(e) {
3125
+ }, 30), Za = function(e) {
2980
3126
  var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
2981
3127
  if (t) {
2982
3128
  var c = n || i;
@@ -2988,8 +3134,8 @@ var La = vi(function(e, t, n, r) {
2988
3134
  }));
2989
3135
  }
2990
3136
  };
2991
- function za() {}
2992
- za.prototype = {
3137
+ function Qa() {}
3138
+ Qa.prototype = {
2993
3139
  startIndex: null,
2994
3140
  dragStart: function(e) {
2995
3141
  var t = e.oldDraggableIndex;
@@ -2998,72 +3144,72 @@ za.prototype = {
2998
3144
  onSpill: function(e) {
2999
3145
  var t = e.dragEl, n = e.putSortable;
3000
3146
  this.sortable.captureAnimationState(), n && n.captureAnimationState();
3001
- var r = ui(this.sortable.el, this.startIndex, this.options);
3147
+ var r = Si(this.sortable.el, this.startIndex, this.options);
3002
3148
  r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
3003
3149
  },
3004
- drop: Ra
3005
- }, Wr(za, { pluginName: "revertOnSpill" });
3006
- function Ba() {}
3007
- Ba.prototype = {
3150
+ drop: Za
3151
+ }, ni(Qa, { pluginName: "revertOnSpill" });
3152
+ function $a() {}
3153
+ $a.prototype = {
3008
3154
  onSpill: function(e) {
3009
3155
  var t = e.dragEl, n = e.putSortable || this.sortable;
3010
3156
  n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
3011
3157
  },
3012
- drop: Ra
3013
- }, Wr(Ba, { pluginName: "removeOnSpill" }), Q.mount(new Pa()), Q.mount(Ba, za);
3014
- function Va(e) {
3158
+ drop: Za
3159
+ }, ni($a, { pluginName: "removeOnSpill" }), Q.mount(new qa()), Q.mount($a, Qa);
3160
+ function eo(e) {
3015
3161
  return e == null ? e : JSON.parse(JSON.stringify(e));
3016
3162
  }
3017
- function Ha(e) {
3018
- oe() && ee(e);
3163
+ function to(e) {
3164
+ ae() && ee(e);
3019
3165
  }
3020
- function Ua(e) {
3021
- oe() ? u(e) : r(e);
3166
+ function no(e) {
3167
+ ae() ? u(e) : r(e);
3022
3168
  }
3023
- var Wa = null, Ga = null;
3024
- function Ka(e = null, t = null) {
3025
- Wa = e, Ga = t;
3169
+ var ro = null, io = null;
3170
+ function ao(e = null, t = null) {
3171
+ ro = e, io = t;
3026
3172
  }
3027
- function qa() {
3173
+ function oo() {
3028
3174
  return {
3029
- data: Wa,
3030
- clonedData: Ga
3175
+ data: ro,
3176
+ clonedData: io
3031
3177
  };
3032
3178
  }
3033
- var Ja = Symbol("cloneElement");
3034
- function Ya(...e) {
3035
- let t = oe()?.proxy, n = null, i = e[0], [, o, c] = e;
3179
+ var so = Symbol("cloneElement");
3180
+ function co(...e) {
3181
+ let t = ae()?.proxy, n = null, i = e[0], [, o, c] = e;
3036
3182
  Array.isArray(j(o)) || (c = o, o = null);
3037
- let l = null, { immediate: u = !0, clone: d = Va, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
3183
+ let l = null, { immediate: u = !0, clone: d = eo, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
3038
3184
  function h(e) {
3039
3185
  let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
3040
3186
  n = f && !p ? a.slice(0, -1) : a;
3041
3187
  let s = j(j(o)?.[r]), c = d(s);
3042
- Ka(s, c), i[Ja] = c;
3188
+ ao(s, c), i[so] = c;
3043
3189
  }
3044
3190
  function g(e) {
3045
- let t = e.item[Ja];
3046
- if (!kr(t)) {
3047
- if (Mr(e.item), a(o)) {
3191
+ let t = e.item[so];
3192
+ if (!Vr(t)) {
3193
+ if (Wr(e.item), a(o)) {
3048
3194
  let n = [...j(o)];
3049
- o.value = Or(n, e.newDraggableIndex, t);
3195
+ o.value = Br(n, e.newDraggableIndex, t);
3050
3196
  return;
3051
3197
  }
3052
- Or(j(o), e.newDraggableIndex, t);
3198
+ Br(j(o), e.newDraggableIndex, t);
3053
3199
  }
3054
3200
  }
3055
3201
  function _(e) {
3056
3202
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
3057
- if (jr(t, n, r), s === "clone") {
3058
- Mr(c);
3203
+ if (Ur(t, n, r), s === "clone") {
3204
+ Wr(c);
3059
3205
  return;
3060
3206
  }
3061
3207
  if (a(o)) {
3062
3208
  let e = [...j(o)];
3063
- o.value = Dr(e, i);
3209
+ o.value = zr(e, i);
3064
3210
  return;
3065
3211
  }
3066
- Dr(j(o), i);
3212
+ zr(j(o), i);
3067
3213
  }
3068
3214
  function v(e) {
3069
3215
  if (m) {
@@ -3071,12 +3217,12 @@ function Ya(...e) {
3071
3217
  return;
3072
3218
  }
3073
3219
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
3074
- if (Mr(n), jr(t, n, r), a(o)) {
3220
+ if (Wr(n), Ur(t, n, r), a(o)) {
3075
3221
  let e = [...j(o)];
3076
- o.value = wr(e, i, s);
3222
+ o.value = Ir(e, i, s);
3077
3223
  return;
3078
3224
  }
3079
- wr(j(o), i, s);
3225
+ Ir(j(o), i, s);
3080
3226
  }
3081
3227
  function y(e) {
3082
3228
  let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
@@ -3095,7 +3241,7 @@ function Ya(...e) {
3095
3241
  n = null;
3096
3242
  }
3097
3243
  r(() => {
3098
- if (Ka(), s) throw s;
3244
+ if (ao(), s) throw s;
3099
3245
  });
3100
3246
  }
3101
3247
  let b = {
@@ -3107,19 +3253,19 @@ function Ya(...e) {
3107
3253
  };
3108
3254
  function x(e) {
3109
3255
  let n = j(i);
3110
- return e ||= Ar(n) ? Nr(n, t?.$el) : n, e && !Ir(e) && (e = e.$el), e || Cr("Root element not found"), e;
3256
+ return e ||= Hr(n) ? Gr(n, t?.$el) : n, e && !Jr(e) && (e = e.$el), e || Fr("Root element not found"), e;
3111
3257
  }
3112
3258
  function S() {
3113
- let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = br(e, ["immediate", "clone"]);
3114
- return Lr(r, (e, t) => {
3115
- Rr(e) && (r[e] = (e, ...n) => (zr(e, qa()), t(e, ...n)));
3116
- }), Fr(o === null ? {} : b, r);
3259
+ let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = Mr(e, ["immediate", "clone"]);
3260
+ return Yr(r, (e, t) => {
3261
+ Xr(e) && (r[e] = (e, ...n) => (Zr(e, oo()), t(e, ...n)));
3262
+ }), qr(o === null ? {} : b, r);
3117
3263
  }
3118
3264
  let C = (e) => {
3119
3265
  e = x(e), l && w.destroy(), l = new Q(e, S());
3120
3266
  };
3121
3267
  s(() => c, () => {
3122
- l && Lr(S(), (e, t) => {
3268
+ l && Yr(S(), (e, t) => {
3123
3269
  l?.option(e, t);
3124
3270
  });
3125
3271
  }, { deep: !0 });
@@ -3132,15 +3278,15 @@ function Ya(...e) {
3132
3278
  toArray: () => l?.toArray(),
3133
3279
  closest: (...e) => l?.closest(...e)
3134
3280
  };
3135
- return Ua(() => {
3281
+ return no(() => {
3136
3282
  u && C();
3137
- }), Ha(w.destroy), yr({
3283
+ }), to(w.destroy), jr({
3138
3284
  start: C,
3139
3285
  pause: () => w?.option("disabled", !0),
3140
3286
  resume: () => w?.option("disabled", !1)
3141
3287
  }, w);
3142
3288
  }
3143
- var Xa = [
3289
+ var lo = [
3144
3290
  "update",
3145
3291
  "start",
3146
3292
  "add",
@@ -3153,7 +3299,7 @@ var Xa = [
3153
3299
  "clone",
3154
3300
  "move",
3155
3301
  "change"
3156
- ], Za = y({
3302
+ ], uo = y({
3157
3303
  name: "VueDraggable",
3158
3304
  model: {
3159
3305
  prop: "modelValue",
@@ -3203,37 +3349,37 @@ var Xa = [
3203
3349
  "tag",
3204
3350
  "target",
3205
3351
  "customUpdate",
3206
- ...Xa.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3352
+ ...lo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
3207
3353
  ],
3208
- emits: ["update:modelValue", ...Xa],
3354
+ emits: ["update:modelValue", ...lo],
3209
3355
  setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
3210
- let a = Xa.reduce((e, t) => {
3356
+ let a = lo.reduce((e, t) => {
3211
3357
  let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
3212
3358
  return e[r] = (...e) => n(t, ...e), e;
3213
3359
  }, {}), s = x(() => {
3214
- let t = S(e), { modelValue: n } = t, r = br(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
3360
+ let t = S(e), { modelValue: n } = t, r = Mr(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
3215
3361
  let r = j(n);
3216
3362
  return r !== void 0 && (e[t] = r), e;
3217
3363
  }, {});
3218
- return yr(yr({}, a), Er(yr(yr({}, i), o)));
3364
+ return jr(jr({}, a), Rr(jr(jr({}, i), o)));
3219
3365
  }), c = x({
3220
3366
  get: () => e.modelValue,
3221
3367
  set: (e) => n("update:modelValue", e)
3222
- }), l = h(), u = o(Ya(e.target || l, c, s));
3368
+ }), l = h(), u = o(co(e.target || l, c, s));
3223
3369
  return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
3224
3370
  }
3225
- }), Qa = {
3371
+ }), fo = {
3226
3372
  mounted: "mounted",
3227
3373
  unmounted: "unmounted"
3228
3374
  };
3229
- Qa.mounted, Qa.unmounted;
3375
+ fo.mounted, fo.unmounted;
3230
3376
  //#endregion
3231
3377
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
3232
- var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3378
+ var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
3233
3379
  key: 0,
3234
3380
  "data-testid": "section-drop-hint",
3235
3381
  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)]"
3236
- }, no = /* @__PURE__ */ y({
3382
+ }, go = /* @__PURE__ */ y({
3237
3383
  __name: "SectionBlock",
3238
3384
  props: {
3239
3385
  block: {},
@@ -3241,13 +3387,13 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3241
3387
  },
3242
3388
  setup(n) {
3243
3389
  let r = {
3244
- title: pr,
3245
- paragraph: Xn,
3246
- image: Un,
3247
- button: Ht,
3248
- divider: Dn,
3249
- custom: Tn
3250
- }, a = n, { t: o } = lt(), s = ze($e, "SectionBlock"), l = ae(Je, null), u = ae(rt, null), d = x(() => {
3390
+ title: Tr,
3391
+ paragraph: cr,
3392
+ image: Yn,
3393
+ button: Jt,
3394
+ divider: Nn,
3395
+ custom: jn
3396
+ }, a = n, { t: o } = ct(), s = Re(nt, "SectionBlock"), l = P(it, null), u = P(tt, null), d = x(() => {
3251
3397
  switch (a.block.columns) {
3252
3398
  case "2": return ["50%", "50%"];
3253
3399
  case "3": return [
@@ -3273,7 +3419,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3273
3419
  r[e] = n, s.updateBlock(a.block.id, { children: r });
3274
3420
  }
3275
3421
  function h(e) {
3276
- return Zn(e, u, r);
3422
+ return lr(e, u, r);
3277
3423
  }
3278
3424
  function g(e, t) {
3279
3425
  e.type === "custom" && s.updateBlock(e.id, {
@@ -3281,11 +3427,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3281
3427
  dataSourceFetched: t.dataSourceFetched
3282
3428
  });
3283
3429
  }
3284
- return (r, a) => (e(), w("div", $a, [C("div", eo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
3430
+ return (r, a) => (e(), w("div", po, [C("div", mo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
3285
3431
  key: a,
3286
3432
  class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3287
3433
  style: A({ width: d.value[a] })
3288
- }, [N(j(Za), {
3434
+ }, [N(j(uo), {
3289
3435
  "model-value": p(a),
3290
3436
  group: {
3291
3437
  name: "blocks",
@@ -3303,13 +3449,13 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3303
3449
  class: "tpl:min-h-[60px]",
3304
3450
  "onUpdate:modelValue": (e) => m(a, e)
3305
3451
  }, {
3306
- default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(dr, {
3452
+ default: se(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(Cr, {
3307
3453
  block: r,
3308
3454
  "is-selected": j(s).state.selectedBlockId === r.id,
3309
3455
  viewport: n.viewport,
3310
3456
  onSelect: (e) => j(s).selectBlock(r.id)
3311
3457
  }, {
3312
- default: ce(() => [(e(), ne(i(h(r)), {
3458
+ default: se(() => [(e(), ne(i(h(r)), {
3313
3459
  block: r,
3314
3460
  viewport: n.viewport,
3315
3461
  onFetchData: (e) => g(r, e)
@@ -3330,9 +3476,9 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3330
3476
  "model-value",
3331
3477
  "group",
3332
3478
  "onUpdate:modelValue"
3333
- ]), p(a).length === 0 ? (e(), w("div", to, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
3479
+ ]), p(a).length === 0 ? (e(), w("div", ho, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
3334
3480
  }
3335
- }), ro = {
3481
+ }), _o = {
3336
3482
  facebook: {
3337
3483
  name: "Facebook",
3338
3484
  color: "#1877F2",
@@ -3413,11 +3559,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3413
3559
  color: "#1769FF",
3414
3560
  path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
3415
3561
  }
3416
- }, io = {
3562
+ }, vo = {
3417
3563
  small: 24,
3418
3564
  medium: 32,
3419
3565
  large: 48
3420
- }, ao = [
3566
+ }, yo = [
3421
3567
  "facebook",
3422
3568
  "twitter",
3423
3569
  "instagram",
@@ -3434,11 +3580,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3434
3580
  "github",
3435
3581
  "dribbble",
3436
3582
  "behance"
3437
- ], oo = [
3583
+ ], bo = [
3438
3584
  "width",
3439
3585
  "height",
3440
3586
  "fill"
3441
- ], so = ["d"], co = /* @__PURE__ */ y({
3587
+ ], xo = ["d"], So = /* @__PURE__ */ y({
3442
3588
  __name: "SocialIconSvg",
3443
3589
  props: {
3444
3590
  platform: {},
@@ -3446,7 +3592,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3446
3592
  iconSize: {}
3447
3593
  },
3448
3594
  setup(t) {
3449
- let n = t, r = x(() => ro[n.platform]), i = x(() => io[n.iconSize]), a = x(() => {
3595
+ let n = t, r = x(() => _o[n.platform]), i = x(() => vo[n.iconSize]), a = x(() => {
3450
3596
  let e = {
3451
3597
  display: "inline-flex",
3452
3598
  alignItems: "center",
@@ -3490,25 +3636,25 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3490
3636
  viewBox: "0 0 24 24",
3491
3637
  fill: s.value,
3492
3638
  xmlns: "http://www.w3.org/2000/svg"
3493
- }, [C("path", { d: r.value.path }, null, 8, so)], 8, oo))], 4));
3639
+ }, [C("path", { d: r.value.path }, null, 8, xo)], 8, bo))], 4));
3494
3640
  }
3495
- }), lo = { class: "tpl:w-full" }, uo = ["href"], fo = {
3641
+ }), Co = { class: "tpl:w-full" }, wo = ["href"], To = {
3496
3642
  key: 1,
3497
3643
  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)]"
3498
- }, po = /* @__PURE__ */ y({
3644
+ }, Eo = /* @__PURE__ */ y({
3499
3645
  __name: "SocialIconsBlock",
3500
3646
  props: {
3501
3647
  block: {},
3502
3648
  viewport: {}
3503
3649
  },
3504
3650
  setup(t) {
3505
- let n = t, { t: r } = lt(), i = x(() => ({
3651
+ let n = t, { t: r } = ct(), i = x(() => ({
3506
3652
  display: "flex",
3507
3653
  flexWrap: "wrap",
3508
3654
  gap: `${n.block.spacing}px`,
3509
3655
  justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
3510
3656
  })), a = x(() => n.block.icons.length > 0);
3511
- return (n, o) => (e(), w("div", lo, [a.value ? (e(), w("div", {
3657
+ return (n, o) => (e(), w("div", Co, [a.value ? (e(), w("div", {
3512
3658
  key: 0,
3513
3659
  style: A(i.value)
3514
3660
  }, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
@@ -3516,7 +3662,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3516
3662
  href: n.url || "#",
3517
3663
  class: "tpl:cursor-default",
3518
3664
  onClick: o[0] ||= b(() => {}, ["prevent"])
3519
- }, [N(co, {
3665
+ }, [N(So, {
3520
3666
  platform: n.platform,
3521
3667
  "icon-style": t.block.iconStyle,
3522
3668
  "icon-size": t.block.iconSize
@@ -3524,44 +3670,44 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3524
3670
  "platform",
3525
3671
  "icon-style",
3526
3672
  "icon-size"
3527
- ])], 8, uo))), 128))], 4)) : (e(), w("div", fo, [N(j($t), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
3673
+ ])], 8, wo))), 128))], 4)) : (e(), w("div", To, [N(j(on), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
3528
3674
  }
3529
- }), mo = { class: "tpl:w-full" }, ho = {
3675
+ }), Do = { class: "tpl:w-full" }, Oo = {
3530
3676
  key: 0,
3531
3677
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
3532
3678
  style: {
3533
3679
  "background-color": "var(--tpl-bg-hover)",
3534
3680
  color: "var(--tpl-text-dim)"
3535
3681
  }
3536
- }, go = /* @__PURE__ */ y({
3682
+ }, ko = /* @__PURE__ */ y({
3537
3683
  __name: "SpacerBlock",
3538
3684
  props: {
3539
3685
  block: {},
3540
3686
  viewport: {}
3541
3687
  },
3542
3688
  setup(t) {
3543
- let n = t, r = ze($e, "SpacerBlock"), i = x(() => ({
3689
+ let n = t, r = Re(nt, "SpacerBlock"), i = x(() => ({
3544
3690
  height: `${n.block.height}px`,
3545
3691
  minHeight: `${n.block.height}px`,
3546
3692
  ...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
3547
3693
  }));
3548
- return (n, a) => (e(), w("div", mo, [C("div", {
3694
+ return (n, a) => (e(), w("div", Do, [C("div", {
3549
3695
  style: A(i.value),
3550
3696
  class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
3551
- }, [j(r).state.previewMode ? O("", !0) : (e(), w("span", ho, M(t.block.height) + "px ", 1))], 6)]));
3697
+ }, [j(r).state.previewMode ? O("", !0) : (e(), w("span", Oo, M(t.block.height) + "px ", 1))], 6)]));
3552
3698
  }
3553
- }), _o = { class: "tpl:w-full" }, vo = { key: 0 }, yo = [
3699
+ }), Ao = { class: "tpl:w-full" }, jo = { key: 0 }, Mo = [
3554
3700
  "aria-label",
3555
3701
  "data-placeholder",
3556
3702
  "onBlur"
3557
- ], bo = [
3703
+ ], No = [
3558
3704
  "aria-label",
3559
3705
  "data-placeholder",
3560
3706
  "onBlur"
3561
- ], xo = {
3707
+ ], Po = {
3562
3708
  key: 1,
3563
3709
  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)]"
3564
- }, So = /* @__PURE__ */ mt(/* @__PURE__ */ y({
3710
+ }, Fo = /* @__PURE__ */ pt(/* @__PURE__ */ y({
3565
3711
  __name: "TableBlock",
3566
3712
  props: {
3567
3713
  block: {},
@@ -3575,7 +3721,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3575
3721
  updated(e, t) {
3576
3722
  t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
3577
3723
  }
3578
- }, i = n, { t: a } = lt(), o = ze($e, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
3724
+ }, i = n, { t: a } = ct(), o = Re(nt, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
3579
3725
  width: "100%",
3580
3726
  borderCollapse: "collapse",
3581
3727
  fontSize: `${i.block.fontSize}px`,
@@ -3604,11 +3750,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3604
3750
  } : n);
3605
3751
  o.updateBlock(i.block.id, { rows: a });
3606
3752
  }
3607
- return (n, i) => (e(), w("div", _o, [s.value ? (e(), w("table", {
3753
+ return (n, i) => (e(), w("div", Ao, [s.value ? (e(), w("table", {
3608
3754
  key: 0,
3609
3755
  style: A(l.value),
3610
3756
  class: "tpl-table-editable"
3611
- }, [f.value ? (e(), w("thead", vo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
3757
+ }, [f.value ? (e(), w("thead", jo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
3612
3758
  key: n.id,
3613
3759
  style: A(d.value),
3614
3760
  "aria-label": j(a).table.cellPlaceholder,
@@ -3617,7 +3763,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3617
3763
  onBlur: (e) => h(f.value.id, n.id, e),
3618
3764
  onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
3619
3765
  onClick: b(m, ["stop"])
3620
- }, null, 44, yo)), [[r, n.content]])), 128))])])) : O("", !0), C("tbody", null, [(e(!0), w(D, null, c(p.value, (n) => (e(), w("tr", { key: n.id }, [(e(!0), w(D, null, c(n.cells, (o) => t((e(), w("td", {
3766
+ }, null, 44, Mo)), [[r, n.content]])), 128))])])) : O("", !0), C("tbody", null, [(e(!0), w(D, null, c(p.value, (n) => (e(), w("tr", { key: n.id }, [(e(!0), w(D, null, c(n.cells, (o) => t((e(), w("td", {
3621
3767
  key: o.id,
3622
3768
  style: A(u.value),
3623
3769
  "aria-label": j(a).table.cellPlaceholder,
@@ -3626,9 +3772,9 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3626
3772
  onBlur: (e) => h(n.id, o.id, e),
3627
3773
  onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
3628
3774
  onClick: b(m, ["stop"])
3629
- }, null, 44, bo)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", xo, [N(j(en), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
3775
+ }, null, 44, No)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", Po, [N(j(sn), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
3630
3776
  }
3631
- }), [["__scopeId", "data-v-4f49860b"]]), Co = /* @__PURE__ */ y({
3777
+ }), [["__scopeId", "data-v-4f49860b"]]), Io = /* @__PURE__ */ y({
3632
3778
  __name: "VideoPlayButton",
3633
3779
  props: { hoverEffect: {
3634
3780
  type: Boolean,
@@ -3646,7 +3792,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
3646
3792
  });
3647
3793
  //#endregion
3648
3794
  //#region src/utils/videoThumbnail.ts
3649
- function wo(e) {
3795
+ function Lo(e) {
3650
3796
  if (!e) return {
3651
3797
  platform: "unknown",
3652
3798
  videoId: null,
@@ -3678,31 +3824,31 @@ function wo(e) {
3678
3824
  thumbnailUrl: null
3679
3825
  };
3680
3826
  }
3681
- function To(e, t) {
3682
- return t || wo(e).thumbnailUrl;
3827
+ function Ro(e, t) {
3828
+ return t || Lo(e).thumbnailUrl;
3683
3829
  }
3684
3830
  //#endregion
3685
3831
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
3686
- var Eo = ["src", "alt"], Do = {
3832
+ var zo = ["src", "alt"], Bo = {
3687
3833
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3688
3834
  style: { opacity: "0.7" }
3689
- }, Oo = ["href"], ko = ["src", "alt"], Ao = ["src", "alt"], jo = {
3835
+ }, Vo = ["href"], Ho = ["src", "alt"], Uo = ["src", "alt"], Wo = {
3690
3836
  key: 3,
3691
3837
  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)]"
3692
- }, Mo = /* @__PURE__ */ y({
3838
+ }, Go = /* @__PURE__ */ y({
3693
3839
  __name: "VideoBlock",
3694
3840
  props: {
3695
3841
  block: {},
3696
3842
  viewport: {}
3697
3843
  },
3698
3844
  setup(t) {
3699
- let n = t, { t: r } = lt(), { syntax: i } = ht(), a = x(() => pe(n.block.url, i) || pe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : To(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => ({
3845
+ let n = t, { t: r } = ct(), { syntax: i } = mt(), a = x(() => fe(n.block.url, i) || fe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : Ro(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => ({
3700
3846
  maxWidth: "100%",
3701
3847
  width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
3702
3848
  display: "block",
3703
3849
  margin: n.block.align === "center" ? "0 auto" : void 0,
3704
3850
  marginLeft: n.block.align === "right" ? "auto" : void 0
3705
- })), l = x(() => pe(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
3851
+ })), l = x(() => fe(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
3706
3852
  return (n, i) => (e(), w("div", {
3707
3853
  class: "tpl:w-full",
3708
3854
  style: A(s.value)
@@ -3714,16 +3860,16 @@ var Eo = ["src", "alt"], Do = {
3714
3860
  class: "tpl:w-full tpl:border-0",
3715
3861
  src: t.block.placeholderUrl,
3716
3862
  alt: t.block.alt
3717
- }, null, 8, Eo), N(Co)], 4)) : a.value ? (e(), w("div", {
3863
+ }, null, 8, zo), N(Io)], 4)) : a.value ? (e(), w("div", {
3718
3864
  key: 1,
3719
3865
  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)]",
3720
3866
  style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
3721
- }, [N(j(tn), {
3867
+ }, [N(j(cn), {
3722
3868
  size: 36,
3723
3869
  "stroke-width": 1.5,
3724
3870
  class: "tpl:text-[var(--tpl-primary)]",
3725
3871
  style: { opacity: "0.5" }
3726
- }), C("span", Do, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
3872
+ }), C("span", Bo, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
3727
3873
  key: 0,
3728
3874
  href: t.block.url,
3729
3875
  target: "_blank",
@@ -3735,7 +3881,7 @@ var Eo = ["src", "alt"], Do = {
3735
3881
  class: "tpl:w-full tpl:border-0",
3736
3882
  src: o.value,
3737
3883
  alt: t.block.alt
3738
- }, null, 8, ko), N(Co, { "hover-effect": "" })], 12, Oo)) : (e(), w("div", {
3884
+ }, null, 8, Ho), N(Io, { "hover-effect": "" })], 12, Vo)) : (e(), w("div", {
3739
3885
  key: 1,
3740
3886
  class: "tpl:relative tpl:inline-block",
3741
3887
  style: A(c.value)
@@ -3743,65 +3889,73 @@ var Eo = ["src", "alt"], Do = {
3743
3889
  class: "tpl:w-full tpl:border-0",
3744
3890
  src: o.value,
3745
3891
  alt: t.block.alt
3746
- }, null, 8, Ao), N(Co)], 4))], 64)) : (e(), w("div", jo, [N(j(tn), {
3892
+ }, null, 8, Uo), N(Io)], 4))], 64)) : (e(), w("div", Wo, [N(j(cn), {
3747
3893
  size: 40,
3748
3894
  "stroke-width": 1.5,
3749
3895
  class: "tpl:text-[var(--tpl-border-light)]"
3750
3896
  }), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
3751
3897
  }
3752
- }), No = {
3753
- section: no,
3754
- title: pr,
3755
- paragraph: Xn,
3756
- image: Un,
3757
- button: Ht,
3758
- divider: Dn,
3759
- video: Mo,
3760
- social: po,
3761
- menu: qn,
3762
- table: So,
3763
- spacer: go,
3764
- html: Mn,
3765
- countdown: se(() => import("./CountdownBlock-Cq8A8WrM.js").then((e) => e.n))
3898
+ }), Ko = {
3899
+ section: go,
3900
+ title: Tr,
3901
+ paragraph: cr,
3902
+ image: Yn,
3903
+ button: Jt,
3904
+ divider: Nn,
3905
+ video: Go,
3906
+ social: Eo,
3907
+ menu: $n,
3908
+ table: Fo,
3909
+ spacer: ko,
3910
+ html: Rn,
3911
+ countdown: oe(() => import("./CountdownBlock-D0IiMliC.js").then((e) => e.n))
3766
3912
  };
3767
- function Po(e) {
3768
- let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = lt(r);
3913
+ function qo(e) {
3914
+ let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = ct(r);
3769
3915
  t.setUiTheme(n.uiTheme ?? "auto");
3770
- let { resolvedTheme: c } = kt(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = jt({
3916
+ let { resolvedTheme: c } = Ft(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = Lt({
3771
3917
  themeOverrides: l,
3772
3918
  resolvedTheme: c,
3773
3919
  extraStyles: e.themeExtraStyles
3774
- }), d = bt({
3920
+ }), d = xt({
3775
3921
  content: t.content,
3776
3922
  setContent: (e, n) => t.setContent(e, n),
3777
3923
  ...e.historyOptions
3778
3924
  });
3779
- Tt(t, d);
3780
- let f = xt({
3925
+ Dt(t, d);
3926
+ let f = Ct({
3781
3927
  addBlock: t.addBlock,
3782
3928
  removeBlock: t.removeBlock,
3783
3929
  updateBlock: t.updateBlock,
3784
3930
  selectBlock: t.selectBlock,
3785
3931
  findBlockLocation: t.findBlockLocation,
3786
3932
  blockDefaults: n.blockDefaults
3787
- }), p = Ct(t), m = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? St({
3933
+ }), m = Tt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? wt({
3788
3934
  content: t.content,
3789
3935
  isDirty: () => t.state.isDirty,
3790
3936
  ...e.autoSaveOptions
3791
- }) : null, g = null;
3792
- m && (g = s(d.isNavigating, (e) => {
3793
- e ? m.pause() : m.resume();
3937
+ }) : null, _ = null;
3938
+ g && (_ = s(d.isNavigating, (e) => {
3939
+ e ? g.pause() : g.resume();
3794
3940
  }));
3795
- let _ = Ot(t, {
3941
+ let v = Pt(t, {
3796
3942
  t: a,
3797
3943
  format: o
3798
- }), v = Ft();
3799
- if (Lt(v, No), n.customBlocks?.length) for (let e of n.customBlocks) v.registerCustom(e, Tn);
3800
- function y(e) {
3801
- for (let t of e) v.registerCustom(t, Tn);
3802
- }
3803
- function b(r) {
3804
- zt(r, {
3944
+ }), y = Vt();
3945
+ if (Ut(y, Ko), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, jn);
3946
+ function b(e) {
3947
+ for (let t of e) y.registerCustom(t, jn);
3948
+ }
3949
+ let S = jt();
3950
+ if (p() && re(S.dispose), e.containerEl) {
3951
+ let t = e.containerEl;
3952
+ Ie(document, "pointerdown", (e) => {
3953
+ let n = t.value;
3954
+ n && (e.composedPath?.() ?? []).includes(n) && S.claim();
3955
+ }, { capture: !0 });
3956
+ }
3957
+ function C(r) {
3958
+ S.isActive() && Gt(r, {
3805
3959
  history: d,
3806
3960
  selectBlock: (e) => t.selectBlock(e),
3807
3961
  getSelectedBlockId: () => t.state.selectedBlockId,
@@ -3810,38 +3964,39 @@ function Po(e) {
3810
3964
  onBeforeUndo: e.keyboardOptions?.onBeforeUndo
3811
3965
  });
3812
3966
  }
3813
- Le(document, "keydown", b);
3814
- let S = h(null);
3815
- E(Ze, e.editorRoot ?? document), E(ot, S), E(He, r), E($e, t), E(We, d), E(Ge, f), E(Je, p), E(Xe, i), E(Ve, u), E(Qe, c), E(et, n.blockDefaults), E(rt, v), E(Ye, n.customBlocks ?? []);
3816
- let C = be(n.mergeTags?.syntax);
3817
- E(ct, n.mergeTags?.tags ?? []), E(st, C), E(Be, n.mergeTags?.onRequest ?? null), E(Ke, n.mergeTags?.autocomplete !== !1), E(Ue, n.onRequestMedia ?? null), E(tt, n.displayConditions?.conditions ?? []), E(nt, n.displayConditions?.allowCustom ?? !1), E(qe, e.capabilities ?? {}), E(at, _);
3818
- let w = n.accessibility?.disabled === !0 ? null : Et({
3967
+ Ie(document, "keydown", C);
3968
+ let w = h(null);
3969
+ E($e, e.editorRoot ?? document), E(ze, w), E(He, r), E(nt, t), E(Ye, d), E(Ze, f), E(it, m), E(Xe, i), E(Be, u), E(Qe, c), E(Ge, n.blockDefaults), E(tt, y), E(qe, n.customBlocks ?? []);
3970
+ let T = ye(n.mergeTags?.syntax);
3971
+ E(at, n.mergeTags?.tags ?? []), E(Ke, T), E(Ue, n.mergeTags?.onRequest ?? null), E(st, n.mergeTags?.autocomplete !== !1), E(ot, n.onRequestMedia ?? null), E(Je, n.displayConditions?.conditions ?? []), E(et, n.displayConditions?.allowCustom ?? !1), E(rt, e.capabilities ?? {}), E(We, v);
3972
+ let ee = n.lint?.disabled === !0 ? null : Mt({
3819
3973
  content: t.content,
3820
- options: n.accessibility ?? {},
3974
+ options: n.lint ?? {},
3821
3975
  updateBlock: t.updateBlock,
3822
- updateSettings: t.updateSettings
3976
+ updateSettings: t.updateSettings,
3977
+ removeBlock: t.removeBlock
3823
3978
  });
3824
- E(it, w);
3825
- function T() {
3826
- g?.(), w?.destroy(), m?.destroy(), d.destroy();
3979
+ E(Ve, ee);
3980
+ function D() {
3981
+ _?.(), ee?.destroy(), g?.destroy(), d.destroy();
3827
3982
  }
3828
3983
  return {
3829
3984
  t: a,
3830
3985
  format: o,
3831
3986
  history: d,
3832
3987
  blockActions: f,
3833
- conditionPreview: p,
3834
- autoSave: m,
3988
+ conditionPreview: m,
3989
+ autoSave: g,
3835
3990
  resolvedTheme: c,
3836
3991
  themeStyles: u,
3837
3992
  themeOverrides: l,
3838
- registry: v,
3839
- keyboardReorder: _,
3840
- accessibilityLint: w,
3841
- popoverRoot: S,
3842
- registerCustomBlocks: y,
3843
- destroy: T
3993
+ registry: y,
3994
+ keyboardReorder: v,
3995
+ templateLint: ee,
3996
+ popoverRoot: w,
3997
+ registerCustomBlocks: b,
3998
+ destroy: D
3844
3999
  };
3845
4000
  }
3846
4001
  //#endregion
3847
- export { qt as A, ln as C, $t as D, en as E, Dt as F, wt as I, gt as L, Gt as M, Ht as N, Zt as O, Pt as P, un as S, an as T, Mn as _, po as a, gn as b, no as c, dr as d, Qn as f, Un as g, qn as h, go as i, Kt as j, Xt as k, Za as l, Xn as m, Mo as n, ro as o, Zn as p, So as r, ao as s, Po as t, pr as u, Dn as v, cn as w, mn as x, Tn as y };
4002
+ export { $t as A, hn as C, on as D, sn as E, Nt as F, Et as I, _t as L, Zt as M, Jt as N, rn as O, Bt as P, gn as S, dn as T, Rn as _, Eo as a, Sn as b, go as c, Cr as d, ur as f, Yn as g, $n as h, ko as i, Qt as j, nn as k, uo as l, cr as m, Go as n, _o as o, lr as p, Fo as r, yo as s, qo as t, Tr as u, Nn as v, mn as w, bn as x, jn as y };