@editora/core 1.0.8 → 1.0.9

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 (88) hide show
  1. package/README.md +5 -0
  2. package/dist/{A11yCheckerPlugin.native-BRdGYMju.mjs → A11yCheckerPlugin.native-58d12bed.mjs} +23 -12
  3. package/dist/{AnchorPlugin.native-BcYGEtd9.mjs → AnchorPlugin.native-289a112a.mjs} +112 -102
  4. package/dist/{ApprovalWorkflowPlugin.native-C3jtAYjG.mjs → ApprovalWorkflowPlugin.native-449ce66c.mjs} +79 -40
  5. package/dist/{BackgroundColorPlugin.native-50iAT9xU.mjs → BackgroundColorPlugin.native-8aceb5cc.mjs} +16 -9
  6. package/dist/{BlockquotePlugin.native-JFmOLsxN.mjs → BlockquotePlugin.native-3541c714.mjs} +3 -2
  7. package/dist/{BlocksLibraryPlugin.native-HMWKxWNs.mjs → BlocksLibraryPlugin.native-1cc51e63.mjs} +119 -60
  8. package/dist/{BoldPlugin.native-BAzzoqU5.mjs → BoldPlugin.native-f9d7f8e4.mjs} +1 -1
  9. package/dist/{CapitalizationPlugin.native-DOMsh5R7.mjs → CapitalizationPlugin.native-42c135dc.mjs} +3 -2
  10. package/dist/{ChecklistPlugin.native-nuSSEFNI.mjs → ChecklistPlugin.native-3b397ee9.mjs} +43 -22
  11. package/dist/{CitationsPlugin.native-BnU0qCwR.mjs → CitationsPlugin.native-169fb1e8.mjs} +137 -69
  12. package/dist/{ClearFormattingPlugin.native-Bq_XcTh2.mjs → ClearFormattingPlugin.native-77baa514.mjs} +11 -6
  13. package/dist/{CodePlugin.native-DlpTPdkd.mjs → CodePlugin.native-989cf0aa.mjs} +629 -580
  14. package/dist/{CodeSamplePlugin.native-CgGoH-X4.mjs → CodeSamplePlugin.native-6cc0148e.mjs} +19 -10
  15. package/dist/{CommentsPlugin.native-DPSqTkiv.mjs → CommentsPlugin.native-03659874.mjs} +55 -28
  16. package/dist/{ConditionalContentPlugin.native-CfhY46rU.mjs → ConditionalContentPlugin.native-4983143a.mjs} +108 -51
  17. package/dist/{ContentRulesPlugin.native-nBLQ8QFZ.mjs → ContentRulesPlugin.native-63ed405b.mjs} +100 -50
  18. package/dist/{DataBindingPlugin.native-jQ1JPRTp.mjs → DataBindingPlugin.native-427e9d75.mjs} +79 -40
  19. package/dist/{DirectionPlugin.native-CDnbdNyl.mjs → DirectionPlugin.native-4e742f42.mjs} +19 -10
  20. package/dist/{DocSchemaPlugin.native-CHOge18O.mjs → DocSchemaPlugin.native-8e41eda0.mjs} +115 -58
  21. package/dist/{DocumentManagerPlugin.native-C2cs_1w4.mjs → DocumentManagerPlugin.native-e69895ad.mjs} +4 -4
  22. package/dist/{EmbedIframePlugin.native-DKJx2OS7.mjs → EmbedIframePlugin.native-55209c87.mjs} +70 -70
  23. package/dist/{EmojisPlugin.native-CitxxlWX.mjs → EmojisPlugin.native-65c5ac47.mjs} +11 -6
  24. package/dist/{FontFamilyPlugin.native-j8hMTbg4.mjs → FontFamilyPlugin.native-f9bc255a.mjs} +7 -4
  25. package/dist/{FontSizePlugin.native-B_jCh7dY.mjs → FontSizePlugin.native-f5647872.mjs} +19 -10
  26. package/dist/{FootnotePlugin.native-D730OGRm.mjs → FootnotePlugin.native-494657b3.mjs} +77 -39
  27. package/dist/{FullscreenPlugin.native-ChXyxeNw.mjs → FullscreenPlugin.native-87ce92e9.mjs} +1 -1
  28. package/dist/{HeadingPlugin.native-DrLYwQnQ.mjs → HeadingPlugin.native-e38c4a16.mjs} +1 -1
  29. package/dist/{HistoryPlugin.native-TDnVMsEO.mjs → HistoryPlugin.native-92ed4be4.mjs} +43 -22
  30. package/dist/{IndentPlugin.native-BHixp8sP.mjs → IndentPlugin.native-e4ee902b.mjs} +23 -12
  31. package/dist/{ItalicPlugin.native-CQjjDyUL.mjs → ItalicPlugin.native-7c95cfbc.mjs} +1 -1
  32. package/dist/{LineHeightPlugin.native-CM7iXdQj.mjs → LineHeightPlugin.native-5668f78c.mjs} +19 -10
  33. package/dist/{LinkPlugin.native-DYCIcdTm.mjs → LinkPlugin.native-6df29111.mjs} +9 -5
  34. package/dist/{ListPlugin.native-V7EZC1lM.mjs → ListPlugin.native-fe2e115a.mjs} +9 -5
  35. package/dist/{MathPlugin.native-f_mDp8VL.mjs → MathPlugin.native-735bbac2.mjs} +9 -5
  36. package/dist/{MediaManagerPlugin.native-BiXiK8FC.mjs → MediaManagerPlugin.native-3cf48a00.mjs} +219 -207
  37. package/dist/{MentionPlugin.native-BMDlOqur.mjs → MentionPlugin.native-3b1e8c05.mjs} +89 -45
  38. package/dist/{MergeTagPlugin.native-C3eOfEgw.mjs → MergeTagPlugin.native-31cf7d48.mjs} +51 -26
  39. package/dist/{PIIRedactionPlugin.native-DcsjmtV1.mjs → PIIRedactionPlugin.native-7ab10b9f.mjs} +107 -54
  40. package/dist/{PageBreakPlugin.native-DijGuHJZ.mjs → PageBreakPlugin.native-1794c5fb.mjs} +31 -16
  41. package/dist/{PreviewPlugin.native-WuIwOAOR.mjs → PreviewPlugin.native-f7b67cc0.mjs} +11 -6
  42. package/dist/{PrintPlugin.native-7qt5v7L5.mjs → PrintPlugin.native-f6a168c2.mjs} +5 -3
  43. package/dist/{SlashCommandsPlugin.native-CmxvMEaE.mjs → SlashCommandsPlugin.native-8d45e511.mjs} +72 -37
  44. package/dist/{SmartPastePlugin.native-BOKKtF07.mjs → SmartPastePlugin.native-a6c5efec.mjs} +99 -50
  45. package/dist/{SpecialCharactersPlugin.native-CZDato89.mjs → SpecialCharactersPlugin.native-7f06d4ba.mjs} +17 -9
  46. package/dist/{SpellCheckPlugin.native-BZB9AewP.mjs → SpellCheckPlugin.native-04e20834.mjs} +41 -21
  47. package/dist/{StrikethroughPlugin.native-0Be7j49s.mjs → StrikethroughPlugin.native-905e9501.mjs} +9 -5
  48. package/dist/{TablePlugin.native-DrHX-efe.mjs → TablePlugin.native-7d5458c1.mjs} +58 -30
  49. package/dist/{TemplatePlugin.native-CrpfKRJ8.mjs → TemplatePlugin.native-580f0f63.mjs} +32 -17
  50. package/dist/{TextAlignmentPlugin.native-sM_1s00t.mjs → TextAlignmentPlugin.native-9357b3ed.mjs} +11 -6
  51. package/dist/{TextColorPlugin.native-Bwl_bSmc.mjs → TextColorPlugin.native-d53ed459.mjs} +26 -14
  52. package/dist/{TrackChangesPlugin.native-Bghu2q4a.mjs → TrackChangesPlugin.native-e96da509.mjs} +115 -58
  53. package/dist/{TranslationWorkflowPlugin.native-Bz6jDGvj.mjs → TranslationWorkflowPlugin.native-4e711b1e.mjs} +160 -91
  54. package/dist/{UnderlinePlugin.native-QpIcK4L2.mjs → UnderlinePlugin.native-8080c998.mjs} +1 -1
  55. package/dist/{VersionDiffPlugin.native-Bvxgy--t.mjs → VersionDiffPlugin.native-5bbeff85.mjs} +51 -26
  56. package/dist/_commonjsHelpers-69d58be2.mjs +31 -0
  57. package/dist/{anchoredPopover-Bxds0VoB.mjs → anchoredPopover-5cca53ba.mjs} +1 -1
  58. package/dist/documentManager-8327fb6e.mjs +9166 -0
  59. package/dist/{editorContainerHelpers-C7kdWnS0.mjs → editorContainerHelpers-69585c07.mjs} +3 -2
  60. package/dist/editora.min.js +14 -13
  61. package/dist/editora.umd.js +14 -13
  62. package/dist/{html2canvas.esm-AYkPY5LS.mjs → html2canvas.esm-c51cb3b9.mjs} +978 -894
  63. package/dist/index-072ef022.js +11 -0
  64. package/dist/index-49d31221.mjs +16860 -0
  65. package/dist/{index-DqC57IEH.mjs → index-7da30697.mjs} +163 -124
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/index.es-b47a189f.mjs +5782 -0
  68. package/dist/index.esm.js +12 -7
  69. package/dist/{jspdf.es.min-BJGtOnRT.mjs → jspdf.es.min-780c82db.mjs} +4808 -3784
  70. package/dist/plugin-loader.js +67 -67
  71. package/dist/{purify.es-CKpwg8Tk.mjs → purify.es-3bdbcfc5.mjs} +20 -10
  72. package/dist/style.css +1 -0
  73. package/dist/webcomponent-core.js +164 -125
  74. package/dist/webcomponent-core.min.css +1 -1
  75. package/dist/webcomponent-core.min.js +18 -17
  76. package/dist/webcomponent.cjs.js +1 -1
  77. package/dist/webcomponent.esm.js +1 -1
  78. package/dist/webcomponent.js +226 -187
  79. package/dist/webcomponent.min.css +1 -1
  80. package/dist/webcomponent.min.js +1324 -1117
  81. package/package.json +11 -5
  82. package/LICENSE +0 -21
  83. package/dist/_commonjsHelpers-DOllISpa.mjs +0 -32
  84. package/dist/core.css +0 -1
  85. package/dist/documentManager-vQ1VkbUY.mjs +0 -8418
  86. package/dist/index-BslAFzmv.mjs +0 -16544
  87. package/dist/index-D1LOqg5C.js +0 -10
  88. package/dist/index.es-BYD2KEo6.mjs +0 -6666
@@ -42,24 +42,28 @@ function se(e) {
42
42
  return e.closest("[data-editora-editor], .rte-editor, .editora-editor, editora-editor") || e;
43
43
  }
44
44
  function pe(e) {
45
- if (!e) return !1;
45
+ if (!e)
46
+ return !1;
46
47
  const t = e.getAttribute("data-theme") || e.getAttribute("theme");
47
48
  return t && t.toLowerCase() === "dark" ? !0 : e.classList.contains("dark") || e.classList.contains("editora-theme-dark") || e.classList.contains("rte-theme-dark");
48
49
  }
49
50
  function je(e) {
50
51
  const t = se(e);
51
- if (pe(t)) return !0;
52
+ if (pe(t))
53
+ return !0;
52
54
  const o = t.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
53
55
  return pe(o) ? !0 : pe(document.documentElement) || pe(document.body);
54
56
  }
55
57
  function he(e) {
56
- if (!e) return !1;
58
+ if (!e)
59
+ return !1;
57
60
  const t = e.getAttribute("data-theme") || e.getAttribute("theme");
58
61
  return t && t.toLowerCase() === "acme" ? !0 : e.classList.contains("editora-theme-acme") || e.classList.contains("rte-theme-acme");
59
62
  }
60
63
  function Ie(e) {
61
64
  const t = se(e);
62
- if (he(t)) return !0;
65
+ if (he(t))
66
+ return !0;
63
67
  const o = t.closest("[data-theme], [theme], .editora-theme-acme, .rte-theme-acme");
64
68
  return he(o) ? !0 : he(document.documentElement) || he(document.body);
65
69
  }
@@ -71,29 +75,36 @@ function xe(e, t) {
71
75
  e.classList.remove("rte-conditional-theme-dark", "rte-conditional-theme-acme"), o === "dark" ? e.classList.add("rte-conditional-theme-dark") : o === "acme" && e.classList.add("rte-conditional-theme-acme");
72
76
  }
73
77
  function w(e, t = !0) {
74
- if ((e == null ? void 0 : e.contentElement) instanceof HTMLElement) return e.contentElement;
78
+ if ((e == null ? void 0 : e.contentElement) instanceof HTMLElement)
79
+ return e.contentElement;
75
80
  if ((e == null ? void 0 : e.editorElement) instanceof HTMLElement) {
76
81
  const n = e.editorElement;
77
- if (n.matches(A)) return n;
82
+ if (n.matches(A))
83
+ return n;
78
84
  const a = n.querySelector(A);
79
- if (a instanceof HTMLElement) return a;
85
+ if (a instanceof HTMLElement)
86
+ return a;
80
87
  }
81
88
  const o = window.getSelection();
82
89
  if (o && o.rangeCount > 0) {
83
90
  const n = o.getRangeAt(0).startContainer, a = n.nodeType === Node.ELEMENT_NODE ? n : n.parentElement, r = a == null ? void 0 : a.closest(A);
84
- if (r) return r;
91
+ if (r)
92
+ return r;
85
93
  }
86
94
  const i = document.activeElement;
87
95
  if (i) {
88
- if (i.matches(A)) return i;
96
+ if (i.matches(A))
97
+ return i;
89
98
  const n = i.closest(A);
90
- if (n) return n;
99
+ if (n)
100
+ return n;
91
101
  }
92
102
  return y && y.isConnected ? y : t ? document.querySelector(A) : null;
93
103
  }
94
104
  function Ne(e) {
95
105
  const t = window.getSelection();
96
- if (!t || t.rangeCount === 0) return null;
106
+ if (!t || t.rangeCount === 0)
107
+ return null;
97
108
  const o = t.getRangeAt(0);
98
109
  return e.contains(o.commonAncestorContainer) ? o.cloneRange() : null;
99
110
  }
@@ -105,7 +116,8 @@ function De(e) {
105
116
  e.dispatchEvent(new Event("input", { bubbles: !0 }));
106
117
  }
107
118
  function He(e, t) {
108
- if (t === e.innerHTML) return;
119
+ if (t === e.innerHTML)
120
+ return;
109
121
  const o = window.execEditorCommand || window.executeEditorCommand;
110
122
  if (typeof o == "function")
111
123
  try {
@@ -128,11 +140,15 @@ function We(e) {
128
140
  const t = e.trim();
129
141
  if (t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'"))
130
142
  return t.slice(1, -1);
131
- if (t === "true") return !0;
132
- if (t === "false") return !1;
133
- if (t === "null") return null;
143
+ if (t === "true")
144
+ return !0;
145
+ if (t === "false")
146
+ return !1;
147
+ if (t === "null")
148
+ return null;
134
149
  const o = Number(t);
135
- if (!Number.isNaN(o) && t !== "") return o;
150
+ if (!Number.isNaN(o) && t !== "")
151
+ return o;
136
152
  if (t.startsWith("[") && t.endsWith("]") || t.startsWith("{") && t.endsWith("}"))
137
153
  try {
138
154
  return JSON.parse(t);
@@ -143,7 +159,8 @@ function We(e) {
143
159
  }
144
160
  function Ze(e, t) {
145
161
  const o = e.trim();
146
- if (!o) return !0;
162
+ if (!o)
163
+ return !0;
147
164
  if (o.startsWith("!")) {
148
165
  const x = o.slice(1).trim();
149
166
  return !ve(t, x);
@@ -175,7 +192,8 @@ function Ze(e, t) {
175
192
  }
176
193
  }
177
194
  function Ge() {
178
- if (typeof document == "undefined" || document.getElementById(Se)) return;
195
+ if (typeof document == "undefined" || document.getElementById(Se))
196
+ return;
179
197
  const e = document.createElement("style");
180
198
  e.id = Se, e.textContent = `
181
199
  .rte-conditional-block {
@@ -791,7 +809,8 @@ function ae(e, t) {
791
809
  }
792
810
  function Je(e) {
793
811
  const t = e.querySelector('.rte-conditional-body[data-slot="if"]');
794
- if (!t) return;
812
+ if (!t)
813
+ return;
795
814
  const o = /* @__PURE__ */ new Set(), i = e.querySelector(".rte-conditional-header"), n = e.querySelector(".rte-conditional-else-label"), a = e.querySelector('.rte-conditional-body[data-slot="else"]');
796
815
  i && o.add(i), o.add(t), n && o.add(n), a && o.add(a), Array.from(e.childNodes).forEach((l) => {
797
816
  if (!(l instanceof HTMLElement && o.has(l))) {
@@ -807,7 +826,8 @@ function U(e) {
807
826
  const t = window.getSelection();
808
827
  if (t && t.rangeCount > 0) {
809
828
  const n = t.getRangeAt(0).startContainer, a = n.nodeType === Node.ELEMENT_NODE ? n : n.parentElement, r = a == null ? void 0 : a.closest(P);
810
- if (r && e.contains(r)) return r;
829
+ if (r && e.contains(r))
830
+ return r;
811
831
  }
812
832
  const o = document.activeElement, i = o == null ? void 0 : o.closest(P);
813
833
  return i && e.contains(i) ? i : null;
@@ -856,9 +876,11 @@ function Pe(e, t) {
856
876
  function et(e, t) {
857
877
  if (t)
858
878
  try {
859
- if (!e.isConnected) return;
879
+ if (!e.isConnected)
880
+ return;
860
881
  const o = e.contains(t.startContainer), i = e.contains(t.endContainer);
861
- if (!o || !i) return;
882
+ if (!o || !i)
883
+ return;
862
884
  Le(e, t);
863
885
  } catch (o) {
864
886
  }
@@ -868,6 +890,13 @@ function tt(e) {
868
890
  }
869
891
  function Re(e, t, o) {
870
892
  let i = null;
893
+ if (o)
894
+ try {
895
+ const r = o.cloneRange();
896
+ e.contains(r.commonAncestorContainer) && (i = r);
897
+ } catch (r) {
898
+ i = null;
899
+ }
871
900
  i || (i = Ne(e)), i || (i = document.createRange(), i.selectNodeContents(e), i.collapse(!1));
872
901
  let n = null;
873
902
  i.collapsed || (n = i.extractContents()), i.insertNode(t);
@@ -958,7 +987,8 @@ function qe(e, t) {
958
987
  }
959
988
  function at(e) {
960
989
  const t = j.get(e);
961
- if (t && t.isConnected) return t;
990
+ if (t && t.isConnected)
991
+ return t;
962
992
  const o = document.createElement("div");
963
993
  return o.className = u, o.setAttribute("role", "toolbar"), o.setAttribute("aria-label", "Conditional block actions"), o.innerHTML = `
964
994
  <button type="button" class="rte-conditional-float-btn" data-action="edit" title="Edit Condition" aria-label="Edit Condition">
@@ -972,9 +1002,11 @@ function at(e) {
972
1002
  }), o.addEventListener("click", (i) => {
973
1003
  var d;
974
1004
  const n = i.target, a = (d = n == null ? void 0 : n.closest("[data-action]")) == null ? void 0 : d.getAttribute("data-action");
975
- if (!a) return;
1005
+ if (!a)
1006
+ return;
976
1007
  const r = E.get(e) || ne;
977
- if (!r) return;
1008
+ if (!r)
1009
+ return;
978
1010
  const l = I.get(e);
979
1011
  if (!(!l || !e.contains(l))) {
980
1012
  if (a === "edit") {
@@ -1004,7 +1036,8 @@ function ye(e, t) {
1004
1036
  }
1005
1037
  function O(e) {
1006
1038
  const t = E.get(e) || ne;
1007
- if (!t) return;
1039
+ if (!t)
1040
+ return;
1008
1041
  const o = U(e);
1009
1042
  if (!o || !e.contains(o) || D(e)) {
1010
1043
  I.set(e, null), F(e);
@@ -1018,7 +1051,8 @@ function rt() {
1018
1051
  e.remove(), j.delete(t), I.delete(t);
1019
1052
  return;
1020
1053
  }
1021
- if (!e.classList.contains("show")) return;
1054
+ if (!e.classList.contains("show"))
1055
+ return;
1022
1056
  xe(e, t);
1023
1057
  const o = I.get(t);
1024
1058
  if (!o || !t.contains(o)) {
@@ -1029,7 +1063,8 @@ function rt() {
1029
1063
  });
1030
1064
  }
1031
1065
  function _e(e, t) {
1032
- if (!e.contains(t)) return !1;
1066
+ if (!e.contains(t))
1067
+ return !1;
1033
1068
  const o = e.innerHTML, i = t.parentNode, n = t.nextSibling;
1034
1069
  t.remove(), i === e && e.innerHTML.trim() === "" && (e.innerHTML = "<p><br></p>");
1035
1070
  const a = document.createRange();
@@ -1091,11 +1126,13 @@ function L(e, t, o, i, n) {
1091
1126
  }, N = (s) => {
1092
1127
  s.target === l && C();
1093
1128
  }, Ee = (s) => {
1094
- if (s.key !== "Tab") return;
1129
+ if (s.key !== "Tab")
1130
+ return;
1095
1131
  const _ = Array.from(
1096
1132
  d.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')
1097
1133
  );
1098
- if (_.length === 0) return;
1134
+ if (_.length === 0)
1135
+ return;
1099
1136
  const G = _[0], ce = _[_.length - 1], z = document.activeElement;
1100
1137
  if (s.shiftKey && z === G) {
1101
1138
  s.preventDefault(), ce.focus();
@@ -1151,17 +1188,21 @@ function ct(e) {
1151
1188
  function dt(e) {
1152
1189
  ne = e, X || (X = (t) => {
1153
1190
  const o = t.target, i = o == null ? void 0 : o.closest(A);
1154
- if (!i) return;
1191
+ if (!i)
1192
+ return;
1155
1193
  y = i, E.has(i) || E.set(i, e);
1156
1194
  const n = E.get(i) || e;
1157
1195
  re(i, n.labels), qe(i, k.get(i) === !0), O(i);
1158
1196
  }, document.addEventListener("focusin", X, !0)), J || (J = (t) => {
1159
1197
  var v;
1160
- if (document.querySelector(`.${c}`)) return;
1198
+ if (document.querySelector(`.${c}`))
1199
+ return;
1161
1200
  const i = t.target;
1162
- if (!!(i != null && i.closest("input, textarea, select"))) return;
1201
+ if (!!(i != null && i.closest("input, textarea, select")))
1202
+ return;
1163
1203
  const r = (i == null ? void 0 : i.closest(A)) || w(void 0, !1) || y;
1164
- if (!r || D(r)) return;
1204
+ if (!r || D(r))
1205
+ return;
1165
1206
  const l = E.get(r) || ne || e, d = document.activeElement, x = (i == null ? void 0 : i.closest(".rte-conditional-header")) || (d == null ? void 0 : d.closest(".rte-conditional-header"));
1166
1207
  if (x && (t.key === "Enter" || t.key === " ")) {
1167
1208
  const m = x.closest(P);
@@ -1184,11 +1225,14 @@ function dt(e) {
1184
1225
  }
1185
1226
  if ((t.key === "Backspace" || t.key === "Delete") && !t.altKey && !t.ctrlKey && !t.metaKey) {
1186
1227
  const m = window.getSelection();
1187
- if (!m || m.rangeCount === 0) return;
1228
+ if (!m || m.rangeCount === 0)
1229
+ return;
1188
1230
  const S = m.getRangeAt(0);
1189
- if (!S.collapsed || !r.contains(S.commonAncestorContainer)) return;
1231
+ if (!S.collapsed || !r.contains(S.commonAncestorContainer))
1232
+ return;
1190
1233
  const T = (v = Ye(S.startContainer)) == null ? void 0 : v.closest(".rte-conditional-body");
1191
- if (!T || !r.contains(T)) return;
1234
+ if (!T || !r.contains(T))
1235
+ return;
1192
1236
  if (t.key === "Backspace" && Me(S, T, "start")) {
1193
1237
  t.preventDefault();
1194
1238
  return;
@@ -1200,13 +1244,15 @@ function dt(e) {
1200
1244
  }
1201
1245
  }, document.addEventListener("keydown", J, !0)), ee || (ee = (t) => {
1202
1246
  const o = t.target;
1203
- if (!o || o.closest(`.${u}`)) return;
1247
+ if (!o || o.closest(`.${u}`))
1248
+ return;
1204
1249
  const i = o.closest(A);
1205
1250
  if (!i) {
1206
1251
  y && F(y);
1207
1252
  return;
1208
1253
  }
1209
- if (D(i)) return;
1254
+ if (D(i))
1255
+ return;
1210
1256
  y = i, E.has(i) || E.set(i, e);
1211
1257
  const n = o.closest(P);
1212
1258
  if (!n) {
@@ -1218,13 +1264,15 @@ function dt(e) {
1218
1264
  });
1219
1265
  }, document.addEventListener("mousedown", ee, !0)), Q || (Q = (t) => {
1220
1266
  const o = t.target;
1221
- if (!o || o.closest(`.${u}`)) return;
1267
+ if (!o || o.closest(`.${u}`))
1268
+ return;
1222
1269
  const i = o.closest(A);
1223
1270
  if (!i) {
1224
1271
  y && F(y);
1225
1272
  return;
1226
1273
  }
1227
- if (D(i)) return;
1274
+ if (D(i))
1275
+ return;
1228
1276
  y = i, E.has(i) || E.set(i, e);
1229
1277
  const n = E.get(i) || e, a = o.closest(P), r = !!o.closest(".rte-conditional-header, .rte-conditional-summary, .rte-conditional-meta, .rte-conditional-else-label");
1230
1278
  if (a && r) {
@@ -1237,7 +1285,8 @@ function dt(e) {
1237
1285
  t && t.isConnected && O(t);
1238
1286
  }, document.addEventListener("selectionchange", te)), oe || (oe = (t) => {
1239
1287
  const o = t.target, i = o == null ? void 0 : o.closest(A);
1240
- if (!i) return;
1288
+ if (!i)
1289
+ return;
1241
1290
  const n = E.get(i) || ne || e;
1242
1291
  re(i, n.labels), O(i);
1243
1292
  }, document.addEventListener("input", oe, !0)), H || (H = () => {
@@ -1280,7 +1329,8 @@ const ft = (e = {}) => {
1280
1329
  commands: {
1281
1330
  conditionalContent: (o, i) => {
1282
1331
  const n = w(i);
1283
- if (!n || D(n)) return !1;
1332
+ if (!n || D(n))
1333
+ return !1;
1284
1334
  y = n, E.set(n, t), re(n, t.labels);
1285
1335
  const a = o == null ? void 0 : o.target;
1286
1336
  if (a === "insert")
@@ -1290,7 +1340,8 @@ const ft = (e = {}) => {
1290
1340
  },
1291
1341
  openConditionalDialog: (o, i) => {
1292
1342
  const n = w(i);
1293
- if (!n || D(n)) return !1;
1343
+ if (!n || D(n))
1344
+ return !1;
1294
1345
  y = n, E.set(n, t), re(n, t.labels);
1295
1346
  const a = o == null ? void 0 : o.target;
1296
1347
  if (a === "insert")
@@ -1300,30 +1351,35 @@ const ft = (e = {}) => {
1300
1351
  },
1301
1352
  conditionalPreview: async (o, i) => {
1302
1353
  const n = w(i);
1303
- if (!n) return !1;
1354
+ if (!n)
1355
+ return !1;
1304
1356
  y = n, E.set(n, t);
1305
1357
  const a = typeof o == "boolean" ? o : k.get(n) !== !0;
1306
1358
  return await Y(n, t, a), O(n), !0;
1307
1359
  },
1308
1360
  editConditionalBlock: (o, i) => {
1309
1361
  const n = w(i);
1310
- if (!n || D(n)) return !1;
1362
+ if (!n || D(n))
1363
+ return !1;
1311
1364
  y = n, E.set(n, t);
1312
1365
  const a = U(n);
1313
1366
  return a ? (L(n, t, "edit", o, a), !0) : !1;
1314
1367
  },
1315
1368
  deleteConditionalBlock: (o, i) => {
1316
1369
  const n = w(i);
1317
- if (!n || D(n)) return !1;
1370
+ if (!n || D(n))
1371
+ return !1;
1318
1372
  const a = U(n);
1319
- if (!a) return !1;
1373
+ if (!a)
1374
+ return !1;
1320
1375
  const r = _e(n, a);
1321
1376
  return r && O(n), r;
1322
1377
  },
1323
1378
  insertConditionalBlock: (o, i) => {
1324
1379
  var d, x, v, m;
1325
1380
  const n = w(i);
1326
- if (!n || D(n)) return !1;
1381
+ if (!n || D(n))
1382
+ return !1;
1327
1383
  y = n, E.set(n, t);
1328
1384
  const a = {
1329
1385
  condition: (d = o == null ? void 0 : o.condition) != null ? d : t.defaultCondition,
@@ -1335,7 +1391,8 @@ const ft = (e = {}) => {
1335
1391
  },
1336
1392
  toggleConditionalPreview: async (o, i) => {
1337
1393
  const n = w(i);
1338
- if (!n) return !1;
1394
+ if (!n)
1395
+ return !1;
1339
1396
  y = n, E.set(n, t);
1340
1397
  const a = typeof o == "boolean" ? o : k.get(n) !== !0;
1341
1398
  return await Y(n, t, a), !0;
@@ -1364,4 +1421,4 @@ const ft = (e = {}) => {
1364
1421
  export {
1365
1422
  ft as ConditionalContentPlugin
1366
1423
  };
1367
- //# sourceMappingURL=ConditionalContentPlugin.native-CfhY46rU.mjs.map
1424
+ //# sourceMappingURL=ConditionalContentPlugin.native-4983143a.mjs.map