@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
@@ -93,7 +93,8 @@ function $e(e) {
93
93
  }
94
94
  function We(e) {
95
95
  const t = e.replace(/\D/g, "");
96
- if (t.length < 13 || t.length > 19) return !1;
96
+ if (t.length < 13 || t.length > 19)
97
+ return !1;
97
98
  let n = 0, i = !1;
98
99
  for (let o = t.length - 1; o >= 0; o -= 1) {
99
100
  let r = Number(t[o]);
@@ -195,22 +196,28 @@ function Ze(e) {
195
196
  return ge(e);
196
197
  }
197
198
  function z(e) {
198
- if (!e) return null;
199
- if (e.matches(x)) return e;
199
+ if (!e)
200
+ return null;
201
+ if (e.matches(x))
202
+ return e;
200
203
  const t = e.querySelector(x);
201
204
  return t instanceof HTMLElement ? t : null;
202
205
  }
203
206
  function Ve() {
204
- if (typeof window == "undefined") return null;
207
+ if (typeof window == "undefined")
208
+ return null;
205
209
  const e = window[we];
206
- if (!(e instanceof HTMLElement)) return null;
210
+ if (!(e instanceof HTMLElement))
211
+ return null;
207
212
  window[we] = null;
208
213
  const t = z(e);
209
- if (t) return t;
214
+ if (t)
215
+ return t;
210
216
  const n = e.closest(ae);
211
217
  if (n) {
212
218
  const o = z(n);
213
- if (o) return o;
219
+ if (o)
220
+ return o;
214
221
  }
215
222
  const i = e.closest(x);
216
223
  return i instanceof HTMLElement ? i : null;
@@ -220,7 +227,8 @@ function J(e) {
220
227
  }
221
228
  function Ue(e) {
222
229
  const t = ge(e);
223
- if (J(t)) return !0;
230
+ if (J(t))
231
+ return !0;
224
232
  const n = t.closest("[data-theme], [theme], .dark, .editora-theme-dark, .rte-theme-dark");
225
233
  return J(n) ? !0 : J(document.documentElement) || J(document.body);
226
234
  }
@@ -267,7 +275,8 @@ function Ge(e) {
267
275
  if (!(a.type !== "childList" || a.removedNodes.length === 0))
268
276
  for (let l = 0; l < a.removedNodes.length; l += 1) {
269
277
  const c = a.removedNodes[l];
270
- if (c.nodeType !== Node.ELEMENT_NODE) continue;
278
+ if (c.nodeType !== Node.ELEMENT_NODE)
279
+ continue;
271
280
  const d = c;
272
281
  if ((t = d.matches) != null && t.call(d, x) || (n = d.matches) != null && n.call(d, `.${u}`) || (i = d.querySelector) != null && i.call(d, x) || (o = d.querySelector) != null && o.call(d, `.${u}`))
273
282
  return !0;
@@ -276,23 +285,29 @@ function Ge(e) {
276
285
  return !1;
277
286
  }
278
287
  function T(e, t = !0) {
279
- if (q(), (e == null ? void 0 : e.contentElement) instanceof HTMLElement) return e.contentElement;
288
+ if (q(), (e == null ? void 0 : e.contentElement) instanceof HTMLElement)
289
+ return e.contentElement;
280
290
  if ((e == null ? void 0 : e.editorElement) instanceof HTMLElement) {
281
291
  const r = e.editorElement, a = z(r);
282
- if (a) return a;
292
+ if (a)
293
+ return a;
283
294
  }
284
295
  const n = Ve();
285
- if (n) return n;
296
+ if (n)
297
+ return n;
286
298
  const i = window.getSelection();
287
299
  if (i && i.rangeCount > 0) {
288
300
  const r = re(i.getRangeAt(0).startContainer), a = r == null ? void 0 : r.closest(x);
289
- if (a) return a;
301
+ if (a)
302
+ return a;
290
303
  }
291
304
  const o = document.activeElement;
292
305
  if (o) {
293
- if (o.matches(x)) return o;
306
+ if (o.matches(x))
307
+ return o;
294
308
  const r = o.closest(x);
295
- if (r) return r;
309
+ if (r)
310
+ return r;
296
311
  }
297
312
  return g && g.isConnected ? g : (g && !g.isConnected && (g = null), t ? document.querySelector(x) : null);
298
313
  }
@@ -317,7 +332,8 @@ function ie(e) {
317
332
  return V.get(e) === !0;
318
333
  }
319
334
  function Ie(e, t, n, i) {
320
- if (!e) return e;
335
+ if (!e)
336
+ return e;
321
337
  if (e.length <= n + i)
322
338
  return t.repeat(e.length);
323
339
  const o = e.slice(0, n), r = i > 0 ? e.slice(e.length - i) : "";
@@ -325,14 +341,16 @@ function Ie(e, t, n, i) {
325
341
  }
326
342
  function se(e, t, n) {
327
343
  const i = e.replace(/\D/g, "");
328
- if (i.length === 0) return e;
344
+ if (i.length === 0)
345
+ return e;
329
346
  let o = 0;
330
347
  const r = Math.max(0, i.length - n);
331
348
  return e.split("").map((a) => /\d/.test(a) ? (o += 1, o <= r ? t : a) : a).join("");
332
349
  }
333
350
  function Ye(e, t) {
334
351
  const n = e.indexOf("@");
335
- if (n <= 0) return e;
352
+ if (n <= 0)
353
+ return e;
336
354
  const i = e.slice(0, n), o = e.slice(n + 1);
337
355
  return i.length <= 2 ? `${i[0] || ""}${t}[at]${o}` : `${i[0]}${t.repeat(Math.max(1, i.length - 2))}${i[i.length - 1]}[at]${o}`;
338
356
  }
@@ -398,7 +416,8 @@ function oe(e, t) {
398
416
  }
399
417
  function F(e, t, n) {
400
418
  const i = t.querySelector('[data-action="toggle-realtime"]');
401
- if (!i) return;
419
+ if (!i)
420
+ return;
402
421
  const o = H(e, n);
403
422
  i.textContent = o ? n.labels.realtimeOnText : n.labels.realtimeOffText, i.setAttribute("aria-pressed", o ? "true" : "false"), C(e, "togglePIIRealtime", o);
404
423
  }
@@ -417,9 +436,11 @@ function rt(e, t) {
417
436
  }
418
437
  function B(e) {
419
438
  const t = m.get(e);
420
- if (!t) return;
439
+ if (!t)
440
+ return;
421
441
  const n = f.get(e) || M;
422
- if (!n) return;
442
+ if (!n)
443
+ return;
423
444
  const i = I.get(e) || [], o = E.get(e) || le(0), r = U(e), a = t.querySelector(".rte-pii-redaction-count"), l = t.querySelector(".rte-pii-redaction-summary"), c = t.querySelector(".rte-pii-redaction-list"), d = t.querySelector('[data-action="redact-all"]');
424
445
  if (!(!a || !l || !c || !d)) {
425
446
  if (a.textContent = String(o.total), l.textContent = `${n.labels.summaryPrefix}: ${o.total} | High ${o.high} | Medium ${o.medium} | Low ${o.low} | Redacted ${o.redactedCount}`, d.disabled = r || i.length === 0, r ? oe(t, n.labels.readonlyRedactionText) : oe(t, `${o.total} PII findings detected.`), F(e, t, n), i.length === 0) {
@@ -456,7 +477,8 @@ function B(e) {
456
477
  }
457
478
  }
458
479
  function fe(e, t) {
459
- if (!t.classList.contains("show")) return;
480
+ if (!t.classList.contains("show"))
481
+ return;
460
482
  const i = ge(e).getBoundingClientRect(), o = Math.min(window.innerWidth - 20, 390), r = Math.max(10, window.innerWidth - o - 10), a = Math.min(Math.max(10, i.right - o), r), l = Math.max(10, Math.min(window.innerHeight - 10 - 280, i.top + 10));
461
483
  t.style.width = `${o}px`, t.style.left = `${a}px`, t.style.top = `${l}px`, t.style.maxHeight = `${Math.max(260, window.innerHeight - 20)}px`;
462
484
  }
@@ -465,7 +487,8 @@ function H(e, t) {
465
487
  return typeof n == "boolean" ? n : t ? t.enableRealtime : !0;
466
488
  }
467
489
  function Se(e, t) {
468
- if (t === e.innerHTML) return;
490
+ if (t === e.innerHTML)
491
+ return;
469
492
  const n = window.execEditorCommand || window.executeEditorCommand;
470
493
  if (typeof n == "function")
471
494
  try {
@@ -491,7 +514,8 @@ function Pe(e, t) {
491
514
  }
492
515
  function it(e) {
493
516
  const t = m.get(e);
494
- if (t) return t;
517
+ if (t)
518
+ return t;
495
519
  const n = f.get(e) || M || ee(), i = `rte-pii-redaction-panel-${He++}`, o = document.createElement("section");
496
520
  return o.className = u, o.id = i, o.setAttribute("role", "dialog"), o.setAttribute("aria-modal", "false"), o.setAttribute("aria-label", n.labels.panelAriaLabel), o.innerHTML = `
497
521
  <header class="rte-pii-redaction-header">
@@ -520,7 +544,8 @@ function it(e) {
520
544
  </div>
521
545
  `, o.addEventListener("click", (r) => {
522
546
  const a = r.target, l = a == null ? void 0 : a.closest("[data-action]");
523
- if (!l) return;
547
+ if (!l)
548
+ return;
524
549
  const c = l.getAttribute("data-action") || "", d = f.get(e) || M || n;
525
550
  if (f.set(e, d), w(e, d), c === "close") {
526
551
  Z(e, !0);
@@ -541,7 +566,8 @@ function it(e) {
541
566
  }
542
567
  if (c === "locate-finding") {
543
568
  const s = l.getAttribute("data-finding-id") || "", p = Pe(e, s);
544
- if (!p) return;
569
+ if (!p)
570
+ return;
545
571
  lt(e, p, d);
546
572
  return;
547
573
  }
@@ -554,11 +580,14 @@ function it(e) {
554
580
  r.preventDefault(), Z(e, !0);
555
581
  return;
556
582
  }
557
- if (r.key !== "ArrowDown" && r.key !== "ArrowUp") return;
583
+ if (r.key !== "ArrowDown" && r.key !== "ArrowUp")
584
+ return;
558
585
  const a = Array.from(o.querySelectorAll('[data-role="finding-button"]'));
559
- if (a.length === 0) return;
586
+ if (a.length === 0)
587
+ return;
560
588
  const l = document.activeElement, c = a.findIndex((p) => p === l);
561
- if (c === -1) return;
589
+ if (c === -1)
590
+ return;
562
591
  r.preventDefault();
563
592
  const d = r.key === "ArrowDown" ? 1 : -1, s = (c + d + a.length) % a.length;
564
593
  a[s].focus();
@@ -596,7 +625,8 @@ function at(e, t) {
596
625
  }
597
626
  function De(e, t, n) {
598
627
  const i = n.detectors.find((c) => c.type === t.type && c.enabled);
599
- if (!i) return null;
628
+ if (!i)
629
+ return null;
600
630
  const o = t.match.toLowerCase();
601
631
  let r = 0;
602
632
  const a = document.createTreeWalker(e, pe, null);
@@ -618,9 +648,11 @@ function De(e, t, n) {
618
648
  }
619
649
  function lt(e, t, n) {
620
650
  const i = De(e, t, n);
621
- if (!i) return !1;
651
+ if (!i)
652
+ return !1;
622
653
  const o = window.getSelection();
623
- if (!o) return !1;
654
+ if (!o)
655
+ return !1;
624
656
  o.removeAllRanges(), o.addRange(i);
625
657
  const r = re(i.startContainer);
626
658
  return r == null || r.scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" }), e.focus({ preventScroll: !0 }), !0;
@@ -682,9 +714,11 @@ async function _e(e, t, n) {
682
714
  return s && oe(s, n.labels.readonlyRedactionText), !1;
683
715
  }
684
716
  const i = Pe(e, t);
685
- if (!i) return !1;
717
+ if (!i)
718
+ return !1;
686
719
  const o = De(e, i, n);
687
- if (!o) return !1;
720
+ if (!o)
721
+ return !1;
688
722
  const r = e.innerHTML, a = Re(i.match, i.type, n);
689
723
  if (o.startContainer === o.endContainer && o.startContainer.nodeType === Node.TEXT_NODE) {
690
724
  const s = o.startContainer, p = s.data, A = o.startOffset, P = o.endOffset;
@@ -721,7 +755,8 @@ async function xe(e, t) {
721
755
  const p = ct(s, t);
722
756
  p.count > 0 && p.nextValue !== s && (a.data = p.nextValue, o += p.count), a = r.nextNode();
723
757
  }
724
- if (o === 0) return 0;
758
+ if (o === 0)
759
+ return 0;
725
760
  Ae(e), Se(e, i);
726
761
  const l = ((d = E.get(e)) == null ? void 0 : d.redactedCount) || 0;
727
762
  await h(e, t, !0);
@@ -730,7 +765,8 @@ async function xe(e, t) {
730
765
  }
731
766
  function Ne(e) {
732
767
  const t = f.get(e) || M;
733
- if (!t || !H(e, t) || U(e)) return;
768
+ if (!t || !H(e, t) || U(e))
769
+ return;
734
770
  me(e);
735
771
  const n = window.setTimeout(() => {
736
772
  j.delete(n), te.delete(e), h(e, t, !1);
@@ -758,16 +794,19 @@ function pt(e) {
758
794
  const t = re(e.target);
759
795
  if (t) {
760
796
  const o = t.closest(x);
761
- if (o) return o;
797
+ if (o)
798
+ return o;
762
799
  const r = t.closest(ae);
763
800
  if (r) {
764
801
  const l = z(r);
765
- if (l) return l;
802
+ if (l)
803
+ return l;
766
804
  }
767
805
  const a = t.closest(`.${u}`);
768
806
  if (a) {
769
807
  const l = Array.from(m.entries()).find(([, c]) => c === a);
770
- if (l) return l[0];
808
+ if (l)
809
+ return l[0];
771
810
  }
772
811
  }
773
812
  const n = window.getSelection();
@@ -775,12 +814,14 @@ function pt(e) {
775
814
  const o = (i = re(n.getRangeAt(0).startContainer)) == null ? void 0 : i.closest(
776
815
  x
777
816
  );
778
- if (o) return o;
817
+ if (o)
818
+ return o;
779
819
  }
780
820
  return null;
781
821
  }
782
822
  function bt() {
783
- if (typeof document == "undefined" || document.getElementById(Ee)) return;
823
+ if (typeof document == "undefined" || document.getElementById(Ee))
824
+ return;
784
825
  const e = document.createElement("style");
785
826
  e.id = Ee, e.textContent = `
786
827
  .rte-toolbar-group-items.${k},
@@ -1183,7 +1224,8 @@ function gt(e) {
1183
1224
  M = e, L || (L = (t) => {
1184
1225
  q();
1185
1226
  const n = t.target, i = n == null ? void 0 : n.closest(x);
1186
- if (!i) return;
1227
+ if (!i)
1228
+ return;
1187
1229
  g = i;
1188
1230
  const o = f.get(i) || e;
1189
1231
  w(i, o), f.set(i, o), C(i, "togglePIIRedactionPanel", ie(i)), C(i, "togglePIIRealtime", H(i, o));
@@ -1193,11 +1235,14 @@ function gt(e) {
1193
1235
  const n = t.target, i = n == null ? void 0 : n.closest(x);
1194
1236
  i && (g = i, Ne(i));
1195
1237
  }, document.addEventListener("input", D, !0)), _ || (_ = (t) => {
1196
- if (t.defaultPrevented) return;
1238
+ if (t.defaultPrevented)
1239
+ return;
1197
1240
  const n = t.target;
1198
- if (n != null && n.closest(`.${u} input, .${u} textarea, .${u} select`)) return;
1241
+ if (n != null && n.closest(`.${u} input, .${u} textarea, .${u} select`))
1242
+ return;
1199
1243
  const i = pt(t);
1200
- if (!i) return;
1244
+ if (!i)
1245
+ return;
1201
1246
  const o = f.get(i) || M || e;
1202
1247
  if (w(i, o), f.set(i, o), g = i, t.key === "Escape" && ie(i)) {
1203
1248
  t.preventDefault(), Z(i, !0);
@@ -1281,13 +1326,15 @@ const ht = (e = {}) => {
1281
1326
  commands: {
1282
1327
  piiRedaction: (i, o) => {
1283
1328
  const r = T(o);
1284
- if (!r) return !1;
1329
+ if (!r)
1330
+ return !1;
1285
1331
  const a = f.get(r) || t;
1286
1332
  return w(r, a), f.set(r, a), g = r, O(r), h(r, a, !1), !0;
1287
1333
  },
1288
1334
  togglePIIRedactionPanel: (i, o) => {
1289
1335
  const r = T(o);
1290
- if (!r) return !1;
1336
+ if (!r)
1337
+ return !1;
1291
1338
  const a = f.get(r) || t;
1292
1339
  w(r, a), f.set(r, a), g = r;
1293
1340
  const l = Le(r, typeof i == "boolean" ? i : void 0);
@@ -1295,13 +1342,15 @@ const ht = (e = {}) => {
1295
1342
  },
1296
1343
  runPIIScan: async (i, o) => {
1297
1344
  const r = T(o);
1298
- if (!r) return !1;
1345
+ if (!r)
1346
+ return !1;
1299
1347
  const a = f.get(r) || t;
1300
1348
  return w(r, a), f.set(r, a), g = r, await h(r, a, !0), O(r), !0;
1301
1349
  },
1302
1350
  redactAllPII: async (i, o) => {
1303
1351
  const r = T(o);
1304
- if (!r) return !1;
1352
+ if (!r)
1353
+ return !1;
1305
1354
  const a = f.get(r) || t;
1306
1355
  w(r, a), f.set(r, a), g = r;
1307
1356
  const l = await xe(r, a);
@@ -1309,13 +1358,15 @@ const ht = (e = {}) => {
1309
1358
  },
1310
1359
  redactPIIFinding: async (i, o) => {
1311
1360
  const r = T(o);
1312
- if (!r || typeof i != "string" || !i) return !1;
1361
+ if (!r || typeof i != "string" || !i)
1362
+ return !1;
1313
1363
  const a = f.get(r) || t;
1314
1364
  return w(r, a), f.set(r, a), g = r, _e(r, i, a);
1315
1365
  },
1316
1366
  togglePIIRealtime: (i, o) => {
1317
1367
  const r = T(o);
1318
- if (!r) return !1;
1368
+ if (!r)
1369
+ return !1;
1319
1370
  const a = f.get(r) || t;
1320
1371
  w(r, a), f.set(r, a);
1321
1372
  const l = typeof i == "boolean" ? i : !H(r, a);
@@ -1325,7 +1376,8 @@ const ht = (e = {}) => {
1325
1376
  },
1326
1377
  getPIIRedactionFindings: (i, o) => {
1327
1378
  const r = T(o);
1328
- if (!r) return !1;
1379
+ if (!r)
1380
+ return !1;
1329
1381
  const a = I.get(r) || [], l = E.get(r) || le(0), c = a.map((s) => ({ ...s })), d = {
1330
1382
  ...l,
1331
1383
  byType: { ...l.byType }
@@ -1344,7 +1396,8 @@ const ht = (e = {}) => {
1344
1396
  },
1345
1397
  setPIIRedactionOptions: (i, o) => {
1346
1398
  const r = T(o);
1347
- if (!r || !i || typeof i != "object") return !1;
1399
+ if (!r || !i || typeof i != "object")
1400
+ return !1;
1348
1401
  const a = f.get(r) || t, l = ee({
1349
1402
  ...ce(a),
1350
1403
  ...i,
@@ -1393,4 +1446,4 @@ const ht = (e = {}) => {
1393
1446
  export {
1394
1447
  ht as PIIRedactionPlugin
1395
1448
  };
1396
- //# sourceMappingURL=PIIRedactionPlugin.native-DcsjmtV1.mjs.map
1449
+ //# sourceMappingURL=PIIRedactionPlugin.native-7ab10b9f.mjs.map
@@ -1,7 +1,8 @@
1
1
  const u = '.rte-page-break[data-type="page-break"]', f = ".rte-content, .editora-content";
2
2
  let p = null, m = !1;
3
3
  const h = (e, n) => {
4
- if (n === e.innerHTML) return;
4
+ if (n === e.innerHTML)
5
+ return;
5
6
  const t = window.execEditorCommand || window.executeEditorCommand;
6
7
  if (typeof t == "function")
7
8
  try {
@@ -97,12 +98,14 @@ const h = (e, n) => {
97
98
  `, document.head.appendChild(p));
98
99
  }, T = () => {
99
100
  const e = window.getSelection();
100
- if (!e || e.rangeCount === 0) return null;
101
+ if (!e || e.rangeCount === 0)
102
+ return null;
101
103
  const n = e.getRangeAt(0), t = n.startContainer.nodeType === Node.ELEMENT_NODE ? n.startContainer : n.startContainer.parentElement;
102
104
  return (t == null ? void 0 : t.closest(f)) || null;
103
105
  }, w = () => {
104
106
  const e = T();
105
- if (e) return e;
107
+ if (e)
108
+ return e;
106
109
  const n = document.activeElement, t = n == null ? void 0 : n.closest(f);
107
110
  return t || document.querySelector(f);
108
111
  }, E = (e, n) => {
@@ -139,12 +142,14 @@ const h = (e, n) => {
139
142
  return t.innerHTML = "<br>", (r = e.parentNode) == null || r.insertBefore(t, e.nextSibling), t;
140
143
  }, d = (e) => {
141
144
  const n = window.getSelection();
142
- if (!n) return;
145
+ if (!n)
146
+ return;
143
147
  const t = document.createRange();
144
148
  e.nodeType, Node.TEXT_NODE, t.setStart(e, 0), t.collapse(!0), n.removeAllRanges(), n.addRange(t);
145
149
  }, b = (e) => {
146
150
  const n = window.getSelection();
147
- if (!n) return;
151
+ if (!n)
152
+ return;
148
153
  const t = document.createRange();
149
154
  if (e.nodeType === Node.TEXT_NODE) {
150
155
  const r = e;
@@ -162,17 +167,21 @@ const h = (e, n) => {
162
167
  return null;
163
168
  }, A = (e) => {
164
169
  const n = window.getSelection();
165
- if (!n || !e.parentNode) return;
170
+ if (!n || !e.parentNode)
171
+ return;
166
172
  const t = e.parentNode, r = Array.from(t.childNodes).indexOf(e);
167
- if (r < 0) return;
173
+ if (r < 0)
174
+ return;
168
175
  const o = document.createRange();
169
176
  o.setStart(t, r), o.setEnd(t, r + 1), n.removeAllRanges(), n.addRange(o), e.focus({ preventScroll: !0 });
170
177
  }, y = (e) => {
171
- if (e.collapsed || e.startContainer !== e.endContainer || e.endOffset !== e.startOffset + 1 || !(e.startContainer instanceof Element || e.startContainer instanceof DocumentFragment)) return null;
178
+ if (e.collapsed || e.startContainer !== e.endContainer || e.endOffset !== e.startOffset + 1 || !(e.startContainer instanceof Element || e.startContainer instanceof DocumentFragment))
179
+ return null;
172
180
  const n = e.startContainer.childNodes[e.startOffset];
173
181
  return n instanceof HTMLElement && n.matches(u) ? n : null;
174
182
  }, B = (e, n, t) => {
175
- if (!e.collapsed) return null;
183
+ if (!e.collapsed)
184
+ return null;
176
185
  const { startContainer: r, startOffset: o } = e, a = (i) => i instanceof HTMLElement && i.matches(u) ? i : null, s = (i) => {
177
186
  if (r.nodeType === Node.ELEMENT_NODE) {
178
187
  const l = r;
@@ -187,7 +196,8 @@ const h = (e, n) => {
187
196
  let c = r;
188
197
  for (; c && c !== n; ) {
189
198
  const l = i === "previous" ? c.previousSibling : c.nextSibling;
190
- if (l) return l;
199
+ if (l)
200
+ return l;
191
201
  c = c.parentNode;
192
202
  }
193
203
  return null;
@@ -233,9 +243,11 @@ const h = (e, n) => {
233
243
  return t && (h(t, r), t.dispatchEvent(new Event("input", { bubbles: !0 }))), !0;
234
244
  }, D = () => {
235
245
  const e = w();
236
- if (!e) return !1;
246
+ if (!e)
247
+ return !1;
237
248
  const n = e.innerHTML, t = window.getSelection();
238
- if (!t) return !1;
249
+ if (!t)
250
+ return !1;
239
251
  let r;
240
252
  t.rangeCount > 0 && e.contains(t.getRangeAt(0).commonAncestorContainer) ? r = t.getRangeAt(0) : (r = document.createRange(), r.selectNodeContents(e), r.collapse(!1), t.removeAllRanges(), t.addRange(r));
241
253
  const o = E(r.endContainer, e) || E(r.startContainer, e), a = C();
@@ -251,9 +263,11 @@ const h = (e, n) => {
251
263
  if (!["Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(n))
252
264
  return;
253
265
  const t = window.getSelection();
254
- if (!t || t.rangeCount === 0) return;
266
+ if (!t || t.rangeCount === 0)
267
+ return;
255
268
  const r = t.getRangeAt(0), o = w();
256
- if (!o || !o.contains(r.commonAncestorContainer)) return;
269
+ if (!o || !o.contains(r.commonAncestorContainer))
270
+ return;
257
271
  const a = y(r);
258
272
  if (a) {
259
273
  if (n === "Backspace" || n === "Delete") {
@@ -279,7 +293,8 @@ const h = (e, n) => {
279
293
  o,
280
294
  n
281
295
  );
282
- if (!s) return;
296
+ if (!s)
297
+ return;
283
298
  e.preventDefault(), e.stopPropagation(), k(s, n);
284
299
  }
285
300
  }));
@@ -303,4 +318,4 @@ const h = (e, n) => {
303
318
  export {
304
319
  P as PageBreakPlugin
305
320
  };
306
- //# sourceMappingURL=PageBreakPlugin.native-DijGuHJZ.mjs.map
321
+ //# sourceMappingURL=PageBreakPlugin.native-1794c5fb.mjs.map
@@ -1,8 +1,10 @@
1
1
  let c = !1;
2
2
  const g = () => {
3
- if (typeof document == "undefined") return;
3
+ if (typeof document == "undefined")
4
+ return;
4
5
  const i = "rte-preview-plugin-styles";
5
- if (document.getElementById(i)) return;
6
+ if (document.getElementById(i))
7
+ return;
6
8
  const t = document.createElement("style");
7
9
  t.id = i, t.textContent = `
8
10
  /* Preview Editor Dialog Styles */
@@ -242,12 +244,14 @@ const g = () => {
242
244
  if (t.getAttribute("contenteditable") === "true")
243
245
  return t;
244
246
  const e = t.closest('[contenteditable="true"]');
245
- if (e) return e;
247
+ if (e)
248
+ return e;
246
249
  }
247
250
  return document.querySelector('[contenteditable="true"]');
248
251
  }, h = () => {
249
252
  const i = v();
250
- if (!i) return "";
253
+ if (!i)
254
+ return "";
251
255
  const t = i.cloneNode(!0);
252
256
  return [
253
257
  ".rte-floating-toolbar",
@@ -268,7 +272,8 @@ const g = () => {
268
272
  }), r.setAttribute("contenteditable", "false");
269
273
  }), t.innerHTML;
270
274
  }, u = () => {
271
- if (typeof window == "undefined" || c) return;
275
+ if (typeof window == "undefined" || c)
276
+ return;
272
277
  c = !0, g();
273
278
  const i = h(), t = w(i), e = document.createElement("div");
274
279
  e.className = "rte-preview-editor-overlay", e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.setAttribute("aria-labelledby", "preview-editor-title");
@@ -319,4 +324,4 @@ const g = () => {
319
324
  export {
320
325
  f as PreviewPlugin
321
326
  };
322
- //# sourceMappingURL=PreviewPlugin.native-WuIwOAOR.mjs.map
327
+ //# sourceMappingURL=PreviewPlugin.native-f7b67cc0.mjs.map
@@ -240,7 +240,8 @@ const g = () => `
240
240
  }
241
241
  `, p = () => {
242
242
  var d;
243
- if (typeof window == "undefined") return !1;
243
+ if (typeof window == "undefined")
244
+ return !1;
244
245
  const a = (() => {
245
246
  const i = window.getSelection();
246
247
  if (i && i.rangeCount > 0) {
@@ -259,7 +260,8 @@ const g = () => `
259
260
  if (n.getAttribute("contenteditable") === "true")
260
261
  return n;
261
262
  const t = n.closest('[contenteditable="true"]');
262
- if (t) return t;
263
+ if (t)
264
+ return t;
263
265
  }
264
266
  return document.querySelector('[contenteditable="true"]');
265
267
  })();
@@ -308,4 +310,4 @@ const g = () => `
308
310
  export {
309
311
  b as PrintPlugin
310
312
  };
311
- //# sourceMappingURL=PrintPlugin.native-7qt5v7L5.mjs.map
313
+ //# sourceMappingURL=PrintPlugin.native-f6a168c2.mjs.map