@editora/core 1.0.23 → 1.0.25
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.
- package/dist/{A11yCheckerPlugin.native-qW_njhLY.mjs → A11yCheckerPlugin.native-BBCsR5Ur.mjs} +7 -5
- package/dist/{AnchorPlugin.native-Drmxhy98.mjs → AnchorPlugin.native-Dk9R26cF.mjs} +20 -19
- package/dist/{ApprovalWorkflowPlugin.native-ZsS_2xmn.mjs → ApprovalWorkflowPlugin.native-AeJsehXM.mjs} +56 -55
- package/dist/{BackgroundColorPlugin.native-H3XyYD7_.mjs → BackgroundColorPlugin.native-DCAd94kp.mjs} +103 -98
- package/dist/{BlocksLibraryPlugin.native-CownM6Rk.mjs → BlocksLibraryPlugin.native-D9OPcnQV.mjs} +42 -43
- package/dist/{CitationsPlugin.native-C_7wWQ-k.mjs → CitationsPlugin.native-BFChgCSV.mjs} +51 -51
- package/dist/{CodePlugin.native-DZgIez08.mjs → CodePlugin.native-CPfKDrkr.mjs} +1383 -1094
- package/dist/{CodePlugin.native-CAHk9ecG.mjs → CodePlugin.native-CRpX2G93.mjs} +167 -113
- package/dist/{CodeSamplePlugin.native-svbAFWh_.mjs → CodeSamplePlugin.native-Bai8bgl3.mjs} +5 -5
- package/dist/{CommentsPlugin.native-DncTHiEe.mjs → CommentsPlugin.native-DHCDUm9f.mjs} +161 -141
- package/dist/{ConditionalContentPlugin.native-Bf7XgRSW.mjs → ConditionalContentPlugin.native-B3R6xcqn.mjs} +3 -3
- package/dist/{ContentRulesPlugin.native-vPx5nC73.mjs → ContentRulesPlugin.native-BISqhQKJ.mjs} +52 -52
- package/dist/{DataBindingPlugin.native-B7lpI_0c.mjs → DataBindingPlugin.native-DbaDeXNp.mjs} +37 -37
- package/dist/{DocumentManagerPlugin.native-B8K-Oqom.mjs → DocumentManagerPlugin.native-CaBqCH-p.mjs} +21 -20
- package/dist/{EmbedIframePlugin.native-BfZ_HGlV.mjs → EmbedIframePlugin.native-qHMf1Jtg.mjs} +7 -7
- package/dist/{EmojisPlugin.native-D92aaOKi.mjs → EmojisPlugin.native-B64efKg5.mjs} +4 -4
- package/dist/{FormatPainterPlugin.native-BhjzsiVq.mjs → FormatPainterPlugin.native-CAc1N6xU.mjs} +183 -161
- package/dist/{HeadingPlugin.native-DZdvubrQ.mjs → HeadingPlugin.native-C3YiGERx.mjs} +85 -72
- package/dist/HistoryPlugin.native-C8GyxsgC.mjs +330 -0
- package/dist/{LinkPlugin.native-BsQXYsK6.mjs → LinkPlugin.native-Dt_p6Ukb.mjs} +4 -4
- package/dist/ListPlugin.native-UYaoRiub.mjs +239 -0
- package/dist/{MathPlugin.native-Byo3WL0f.mjs → MathPlugin.native-Cq9WQ7cq.mjs} +148 -130
- package/dist/MediaManagerPlugin.native-0YFHZfsb.mjs +4823 -0
- package/dist/MediaManagerPlugin.native-mXWWARRX.mjs +4908 -0
- package/dist/{MentionPlugin.native-S_lwGZQO.mjs → MentionPlugin.native-Zb1dwdxU.mjs} +304 -300
- package/dist/{MergeTagPlugin.native-7-6F3S1Y.mjs → MergeTagPlugin.native-BXkVPvCo.mjs} +6 -4
- package/dist/{PIIRedactionPlugin.native-g7j4jOmm.mjs → PIIRedactionPlugin.native-Cm0bpzQb.mjs} +2 -2
- package/dist/{PreviewPlugin.native-Dv5OsffK.mjs → PreviewPlugin.native-CrfiwP2J.mjs} +2 -2
- package/dist/{SlashCommandsPlugin.native-BDIIwGNs.mjs → SlashCommandsPlugin.native-BzGTRmMB.mjs} +264 -240
- package/dist/{SmartPastePlugin.native-BATLCds5.mjs → SmartPastePlugin.native-DnOJhDsf.mjs} +2 -2
- package/dist/{SpecialCharactersPlugin.native-CdZoc1GB.mjs → SpecialCharactersPlugin.native-B0XaCfjZ.mjs} +4 -4
- package/dist/{SpellCheckPlugin.native-BGm2qPfn.mjs → SpellCheckPlugin.native-BE7os1Xj.mjs} +302 -265
- package/dist/{TablePlugin.native-C1YZ372P.mjs → TablePlugin.native-CWxEFpV8.mjs} +159 -136
- package/dist/{TemplatePlugin.native-Dwk8TgxI.mjs → TemplatePlugin.native-OD8Wc1R7.mjs} +6 -4
- package/dist/{TextColorPlugin.native-KMZ2uzlq.mjs → TextColorPlugin.native-C2IjioNM.mjs} +75 -71
- package/dist/{TranslationWorkflowPlugin.native-CZtG--06.mjs → TranslationWorkflowPlugin.native-BGXVJD9f.mjs} +101 -98
- package/dist/{VersionDiffPlugin.native-Ca1fMWUJ.mjs → VersionDiffPlugin.native-DJZIzFSK.mjs} +11 -11
- package/dist/anchoredPopover-QN4jNbW1.mjs +134 -0
- package/dist/confirmDialog-CNqPHT5x.mjs +92 -0
- package/dist/dialogHelpers-Dzn8DHoF.mjs +194 -0
- package/dist/{documentManager-BWK_-KJp.mjs → documentManager-DHLCoWzw.mjs} +1963 -1969
- package/dist/editora.min.js +21 -21
- package/dist/editora.umd.js +10 -10
- package/dist/index-DHPPVQwx.js +12 -0
- package/dist/{index-DGMYWPLx.mjs → index-gI4djib2.mjs} +407 -327
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/katex-DLIObQUm.mjs +11683 -0
- package/dist/katex.min--Ws3c9be.mjs +6 -0
- package/dist/notify-DCQGpmq-.mjs +60 -0
- package/dist/plugin-loader.js +54 -54
- package/dist/shared-config-DuA34Iii.mjs +26 -0
- package/dist/webcomponent-core.js +315 -235
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +153 -80
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +672 -592
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +3099 -1532
- package/package.json +1 -1
- package/dist/HistoryPlugin.native-DPvhks6h.mjs +0 -246
- package/dist/ListPlugin.native-Bt0LANbO.mjs +0 -139
- package/dist/MediaManagerPlugin.native-BT1NZIJS.mjs +0 -998
- package/dist/anchoredPopover-DJFD2oAP.mjs +0 -116
- package/dist/dialogHelpers-DBf7WqYH.mjs +0 -40
- package/dist/index-C1sO7DAC.js +0 -12
|
@@ -579,7 +579,7 @@ class un {
|
|
|
579
579
|
return this.isDestroyed;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
class
|
|
582
|
+
class pn {
|
|
583
583
|
constructor(t, e, o) {
|
|
584
584
|
this.overflowUnits = [], this.overflowUnitHomes = /* @__PURE__ */ new WeakMap(), this.expandedOpen = !1, this.onDocumentPointerDownForOverflow = (i) => {
|
|
585
585
|
var l, c;
|
|
@@ -667,61 +667,62 @@ class fn {
|
|
|
667
667
|
exportPdf: "exportPdf",
|
|
668
668
|
insertImage: "insertImage",
|
|
669
669
|
insertVideo: "insertVideo",
|
|
670
|
+
insertAudio: "insertAudio",
|
|
670
671
|
codeBlock: "insertCodeBlock"
|
|
671
672
|
};
|
|
672
673
|
return o.forEach((c) => {
|
|
673
|
-
const
|
|
674
|
-
c.split(/\s+/).filter(Boolean).forEach((
|
|
675
|
-
if (
|
|
676
|
-
const w = r.get("setDirectionLTR"),
|
|
677
|
-
w &&
|
|
674
|
+
const f = [];
|
|
675
|
+
c.split(/\s+/).filter(Boolean).forEach((g) => {
|
|
676
|
+
if (g === "direction") {
|
|
677
|
+
const w = r.get("setDirectionLTR"), v = r.get("setDirectionRTL");
|
|
678
|
+
w && f.push({
|
|
678
679
|
id: "directionLTR",
|
|
679
680
|
label: w.label,
|
|
680
681
|
command: w.command,
|
|
681
682
|
icon: w.icon,
|
|
682
683
|
type: w.type || "button",
|
|
683
684
|
options: w.options
|
|
684
|
-
}),
|
|
685
|
+
}), v && f.push({
|
|
685
686
|
id: "directionRTL",
|
|
686
|
-
label:
|
|
687
|
-
command:
|
|
688
|
-
icon:
|
|
689
|
-
type:
|
|
690
|
-
options:
|
|
687
|
+
label: v.label,
|
|
688
|
+
command: v.command,
|
|
689
|
+
icon: v.icon,
|
|
690
|
+
type: v.type || "button",
|
|
691
|
+
options: v.options
|
|
691
692
|
});
|
|
692
693
|
return;
|
|
693
694
|
}
|
|
694
|
-
if (
|
|
695
|
-
const w = r.get("addComment"),
|
|
696
|
-
w &&
|
|
695
|
+
if (g === "comments") {
|
|
696
|
+
const w = r.get("addComment"), v = r.get("toggleComments");
|
|
697
|
+
w && f.push({
|
|
697
698
|
id: "addComment",
|
|
698
699
|
label: w.label,
|
|
699
700
|
command: w.command,
|
|
700
701
|
icon: w.icon,
|
|
701
702
|
type: w.type || "button",
|
|
702
703
|
options: w.options
|
|
703
|
-
}),
|
|
704
|
+
}), v && f.push({
|
|
704
705
|
id: "toggleComments",
|
|
705
|
-
label:
|
|
706
|
-
command:
|
|
707
|
-
icon:
|
|
708
|
-
type:
|
|
709
|
-
options:
|
|
706
|
+
label: v.label,
|
|
707
|
+
command: v.command,
|
|
708
|
+
icon: v.icon,
|
|
709
|
+
type: v.type || "button",
|
|
710
|
+
options: v.options
|
|
710
711
|
});
|
|
711
712
|
return;
|
|
712
713
|
}
|
|
713
|
-
const
|
|
714
|
-
let
|
|
715
|
-
|
|
716
|
-
id:
|
|
717
|
-
label:
|
|
718
|
-
command:
|
|
719
|
-
icon:
|
|
720
|
-
type:
|
|
721
|
-
options:
|
|
722
|
-
items:
|
|
714
|
+
const T = l[g] || g;
|
|
715
|
+
let k = r.get(T);
|
|
716
|
+
k || (k = r.get(g)), k && f.push({
|
|
717
|
+
id: g,
|
|
718
|
+
label: k.label,
|
|
719
|
+
command: k.command,
|
|
720
|
+
icon: k.icon,
|
|
721
|
+
type: k.type === "separator" ? "separator" : k.type || "button",
|
|
722
|
+
options: k.options,
|
|
723
|
+
items: k.items
|
|
723
724
|
});
|
|
724
|
-
}),
|
|
725
|
+
}), f.length > 0 && e.push(f);
|
|
725
726
|
}), e;
|
|
726
727
|
}
|
|
727
728
|
/**
|
|
@@ -740,13 +741,13 @@ class fn {
|
|
|
740
741
|
const o = this.config.items || this.getDefaultToolbarString(), i = this.parseToolbarString(o);
|
|
741
742
|
i.forEach((r, l) => {
|
|
742
743
|
const c = document.createElement("div");
|
|
743
|
-
if (c.className = "editora-toolbar-group", r.forEach((
|
|
744
|
-
this.appendToolbarButton(c,
|
|
744
|
+
if (c.className = "editora-toolbar-group", r.forEach((f) => {
|
|
745
|
+
this.appendToolbarButton(c, f);
|
|
745
746
|
const m = c.lastElementChild;
|
|
746
747
|
m instanceof HTMLElement && (this.overflowUnits.push(m), this.overflowUnitHomes.set(m, c));
|
|
747
748
|
}), e.appendChild(c), l < i.length - 1) {
|
|
748
|
-
const
|
|
749
|
-
|
|
749
|
+
const f = document.createElement("div");
|
|
750
|
+
f.className = "editora-toolbar-separator", e.appendChild(f);
|
|
750
751
|
}
|
|
751
752
|
}), t.appendChild(e), this.setupOverflow(t);
|
|
752
753
|
}
|
|
@@ -763,23 +764,23 @@ class fn {
|
|
|
763
764
|
const r = () => {
|
|
764
765
|
const c = this.overflowUnits;
|
|
765
766
|
if (c.length === 0) return;
|
|
766
|
-
c.forEach((
|
|
767
|
+
c.forEach((O) => {
|
|
767
768
|
var N;
|
|
768
|
-
|
|
769
|
+
O.parentElement === i && ((N = this.overflowUnitHomes.get(O)) == null || N.appendChild(O));
|
|
769
770
|
});
|
|
770
|
-
const
|
|
771
|
-
let w = 0,
|
|
772
|
-
for (const
|
|
773
|
-
const N =
|
|
774
|
-
if (w + N <=
|
|
775
|
-
w += N,
|
|
771
|
+
const f = t.clientWidth, m = 16, g = 40, T = 4, k = Math.max(0, f - m - g - T);
|
|
772
|
+
let w = 0, v = 0;
|
|
773
|
+
for (const O of c) {
|
|
774
|
+
const N = O.getBoundingClientRect().width + T;
|
|
775
|
+
if (w + N <= k)
|
|
776
|
+
w += N, v++;
|
|
776
777
|
else
|
|
777
778
|
break;
|
|
778
779
|
}
|
|
779
|
-
|
|
780
|
-
const K =
|
|
781
|
-
o.style.display = K ? "" : "none", o.classList.toggle("active", K && this.expandedOpen), !K && this.expandedOpen && this.setExpandedOpen(!1), c.forEach((
|
|
782
|
-
N >=
|
|
780
|
+
v = Math.max(1, Math.min(v, c.length));
|
|
781
|
+
const K = v < c.length;
|
|
782
|
+
o.style.display = K ? "" : "none", o.classList.toggle("active", K && this.expandedOpen), !K && this.expandedOpen && this.setExpandedOpen(!1), c.forEach((O, N) => {
|
|
783
|
+
N >= v && i.appendChild(O);
|
|
783
784
|
});
|
|
784
785
|
}, l = () => {
|
|
785
786
|
this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), this.overflowRafId = requestAnimationFrame(r);
|
|
@@ -859,6 +860,57 @@ class fn {
|
|
|
859
860
|
o.preventDefault(), this.commandHandler && t.command && this.commandHandler(t.command);
|
|
860
861
|
}), e;
|
|
861
862
|
}
|
|
863
|
+
/**
|
|
864
|
+
* What a toolbar menu needs besides its look, so it can be used without a mouse: the trigger says it opens a menu
|
|
865
|
+
* and whether it is open, the menu and its items have menu roles, and the keyboard works in it. Enter, Space or an
|
|
866
|
+
* arrow key on the trigger opens it and moves the focus to the first (or, with ArrowUp, the last) item; arrows,
|
|
867
|
+
* Home and End move between items; Escape closes it and gives the focus back to the trigger; Tab closes it. A
|
|
868
|
+
* mouse click leaves the focus alone, so the editor keeps its selection.
|
|
869
|
+
*/
|
|
870
|
+
makeMenuAccessible(t, e, o, i) {
|
|
871
|
+
e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", "false"), o.setAttribute("role", "menu"), o.setAttribute("aria-label", i), o.querySelectorAll(".editora-toolbar-dropdown-item").forEach((m) => {
|
|
872
|
+
m.setAttribute("role", "menuitem"), m.tabIndex = -1;
|
|
873
|
+
});
|
|
874
|
+
const r = () => Array.from(o.querySelectorAll('[role="menuitem"]')), l = () => o.style.display === "block", c = new MutationObserver(() => {
|
|
875
|
+
e.setAttribute("aria-expanded", l() ? "true" : "false");
|
|
876
|
+
});
|
|
877
|
+
c.observe(o, { attributes: !0, attributeFilter: ["style"] });
|
|
878
|
+
const f = t._cleanupDropdown;
|
|
879
|
+
t._cleanupDropdown = () => {
|
|
880
|
+
c.disconnect(), f == null || f();
|
|
881
|
+
}, e.addEventListener("click", (m) => {
|
|
882
|
+
var g;
|
|
883
|
+
m.detail === 0 && l() && ((g = r()[0]) == null || g.focus());
|
|
884
|
+
}), e.addEventListener("keydown", (m) => {
|
|
885
|
+
var T;
|
|
886
|
+
if (m.key !== "ArrowDown" && m.key !== "ArrowUp") return;
|
|
887
|
+
m.preventDefault(), l() || e.click();
|
|
888
|
+
const g = r();
|
|
889
|
+
(T = m.key === "ArrowUp" ? g[g.length - 1] : g[0]) == null || T.focus();
|
|
890
|
+
}), o.addEventListener("keydown", (m) => {
|
|
891
|
+
const g = r();
|
|
892
|
+
if (g.length === 0) return;
|
|
893
|
+
const T = g.indexOf(document.activeElement), k = (w) => {
|
|
894
|
+
m.preventDefault(), g[(w + g.length) % g.length].focus();
|
|
895
|
+
};
|
|
896
|
+
switch (m.key) {
|
|
897
|
+
case "ArrowDown":
|
|
898
|
+
return k(T + 1);
|
|
899
|
+
case "ArrowUp":
|
|
900
|
+
return k(T < 0 ? g.length - 1 : T - 1);
|
|
901
|
+
case "Home":
|
|
902
|
+
return k(0);
|
|
903
|
+
case "End":
|
|
904
|
+
return k(g.length - 1);
|
|
905
|
+
case "Escape":
|
|
906
|
+
m.preventDefault(), m.stopPropagation(), o.style.display = "none", e.focus();
|
|
907
|
+
return;
|
|
908
|
+
case "Tab":
|
|
909
|
+
o.style.display = "none";
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
}
|
|
862
914
|
/**
|
|
863
915
|
* Create a dropdown element
|
|
864
916
|
*/
|
|
@@ -869,14 +921,14 @@ class fn {
|
|
|
869
921
|
o.className = "editora-toolbar-button editora-toolbar-dropdown-trigger", o.type = "button", o.textContent = t.label;
|
|
870
922
|
const i = document.createElement("div");
|
|
871
923
|
i.className = "editora-toolbar-dropdown-menu", i.style.display = "none", t.options && t.options.forEach((c) => {
|
|
872
|
-
const
|
|
873
|
-
|
|
924
|
+
const f = document.createElement("button");
|
|
925
|
+
f.className = "editora-toolbar-dropdown-item", f.type = "button", f.textContent = c.label, f.setAttribute("data-value", c.value), f.addEventListener("click", (m) => {
|
|
874
926
|
m.preventDefault(), this.setLastCommandTrigger(o, t.command), this.commandHandler && t.command && this.commandHandler(t.command, c.value), i.style.display = "none";
|
|
875
|
-
}), i.appendChild(
|
|
927
|
+
}), i.appendChild(f);
|
|
876
928
|
}), o.addEventListener("click", (c) => {
|
|
877
929
|
c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(o, t.command);
|
|
878
|
-
const
|
|
879
|
-
i.style.display =
|
|
930
|
+
const f = i.style.display === "block";
|
|
931
|
+
i.style.display = f ? "none" : "block";
|
|
880
932
|
});
|
|
881
933
|
const r = (c) => {
|
|
882
934
|
e.contains(c.target) || (i.style.display = "none");
|
|
@@ -885,7 +937,7 @@ class fn {
|
|
|
885
937
|
};
|
|
886
938
|
return document.addEventListener("mousedown", r, !0), document.addEventListener("keydown", l), e._cleanupDropdown = () => {
|
|
887
939
|
document.removeEventListener("mousedown", r, !0), document.removeEventListener("keydown", l);
|
|
888
|
-
}, e.appendChild(o), e.appendChild(i), e;
|
|
940
|
+
}, e.appendChild(o), e.appendChild(i), this.makeMenuAccessible(e, o, i, t.label), e;
|
|
889
941
|
}
|
|
890
942
|
/**
|
|
891
943
|
* Create an inline menu element (like dropdown but triggered by button click)
|
|
@@ -904,18 +956,18 @@ class fn {
|
|
|
904
956
|
o.textContent = t.label;
|
|
905
957
|
const i = document.createElement("div");
|
|
906
958
|
i.className = "editora-toolbar-dropdown-menu", i.style.display = "none", t.options && t.options.forEach((c) => {
|
|
907
|
-
const
|
|
908
|
-
|
|
959
|
+
const f = document.createElement("button");
|
|
960
|
+
f.className = "editora-toolbar-dropdown-item", f.type = "button", f.textContent = c.label, f.setAttribute("data-value", c.value), f.addEventListener("click", (m) => {
|
|
909
961
|
m.preventDefault(), m.stopPropagation(), this.setLastCommandTrigger(o, t.command), this.commandHandler && t.command && this.commandHandler(t.command, c.value), i.style.display = "none";
|
|
910
|
-
}), i.appendChild(
|
|
962
|
+
}), i.appendChild(f);
|
|
911
963
|
}), o.addEventListener("click", (c) => {
|
|
912
964
|
var m;
|
|
913
965
|
c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(o, t.command);
|
|
914
|
-
const
|
|
966
|
+
const f = (m = this.container) == null ? void 0 : m.querySelectorAll(
|
|
915
967
|
".editora-toolbar-dropdown-menu"
|
|
916
968
|
);
|
|
917
|
-
|
|
918
|
-
|
|
969
|
+
f == null || f.forEach((g) => {
|
|
970
|
+
g !== i && (g.style.display = "none");
|
|
919
971
|
}), i.style.display = i.style.display === "none" ? "block" : "none";
|
|
920
972
|
});
|
|
921
973
|
const r = (c) => {
|
|
@@ -925,7 +977,7 @@ class fn {
|
|
|
925
977
|
};
|
|
926
978
|
return document.addEventListener("mousedown", r, !0), document.addEventListener("keydown", l), e._cleanupDropdown = () => {
|
|
927
979
|
document.removeEventListener("mousedown", r, !0), document.removeEventListener("keydown", l);
|
|
928
|
-
}, e.appendChild(o), e.appendChild(i), e;
|
|
980
|
+
}, e.appendChild(o), e.appendChild(i), this.makeMenuAccessible(e, o, i, t.label), e;
|
|
929
981
|
}
|
|
930
982
|
/**
|
|
931
983
|
* Get default toolbar string if none provided
|
|
@@ -954,7 +1006,7 @@ class fn {
|
|
|
954
1006
|
}), this.container.innerHTML = ""), (t = this.resizeObserver) == null || t.disconnect(), this.resizeObserver = void 0, this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), document.removeEventListener("mousedown", this.onDocumentPointerDownForOverflow, !0), this.itemsContainer = void 0, this.moreButton = void 0, this.expandedRow = void 0, this.commandHandler = void 0;
|
|
955
1007
|
}
|
|
956
1008
|
}
|
|
957
|
-
class
|
|
1009
|
+
class fn {
|
|
958
1010
|
constructor(t) {
|
|
959
1011
|
this.visible = !1, this.config = t;
|
|
960
1012
|
}
|
|
@@ -1038,14 +1090,14 @@ class hn {
|
|
|
1038
1090
|
}), o.forEach((r, l) => {
|
|
1039
1091
|
const c = document.createElement("span");
|
|
1040
1092
|
if (c.className = "editora-statusbar-item", c.textContent = r, t.appendChild(c), l < o.length - 1) {
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1093
|
+
const f = document.createElement("span");
|
|
1094
|
+
f.className = "editora-statusbar-separator", f.textContent = "|", t.appendChild(f);
|
|
1043
1095
|
}
|
|
1044
1096
|
}), i.forEach((r, l) => {
|
|
1045
1097
|
const c = document.createElement("span");
|
|
1046
1098
|
if (c.className = "editora-statusbar-item", c.textContent = r, e.appendChild(c), l < i.length - 1) {
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1099
|
+
const f = document.createElement("span");
|
|
1100
|
+
f.className = "editora-statusbar-separator", f.textContent = "|", e.appendChild(f);
|
|
1049
1101
|
}
|
|
1050
1102
|
}), this.container.appendChild(t), this.container.appendChild(e);
|
|
1051
1103
|
}
|
|
@@ -1121,14 +1173,14 @@ function vn(s) {
|
|
|
1121
1173
|
function wn(s, t) {
|
|
1122
1174
|
var e = s == null ? null : typeof Symbol != "undefined" && s[Symbol.iterator] || s["@@iterator"];
|
|
1123
1175
|
if (e != null) {
|
|
1124
|
-
var o, i, r, l, c = [],
|
|
1176
|
+
var o, i, r, l, c = [], f = !0, m = !1;
|
|
1125
1177
|
try {
|
|
1126
|
-
if (r = (e = e.call(s)).next, t !== 0) for (; !(
|
|
1127
|
-
} catch (
|
|
1128
|
-
m = !0, i =
|
|
1178
|
+
if (r = (e = e.call(s)).next, t !== 0) for (; !(f = (o = r.call(e)).done) && (c.push(o.value), c.length !== t); f = !0) ;
|
|
1179
|
+
} catch (g) {
|
|
1180
|
+
m = !0, i = g;
|
|
1129
1181
|
} finally {
|
|
1130
1182
|
try {
|
|
1131
|
-
if (!
|
|
1183
|
+
if (!f && e.return != null && (l = e.return(), Object(l) !== l)) return;
|
|
1132
1184
|
} finally {
|
|
1133
1185
|
if (m) throw i;
|
|
1134
1186
|
}
|
|
@@ -1166,7 +1218,7 @@ Te || (Te = function(t) {
|
|
|
1166
1218
|
for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) o[i - 1] = arguments[i];
|
|
1167
1219
|
return new t(...o);
|
|
1168
1220
|
});
|
|
1169
|
-
const it = L(Array.prototype.forEach), _n = L(Array.prototype.lastIndexOf), ao = L(Array.prototype.pop), kt = L(Array.prototype.push), Ln = L(Array.prototype.splice), bt = Array.isArray, _t = L(String.prototype.toLowerCase),
|
|
1221
|
+
const it = L(Array.prototype.forEach), _n = L(Array.prototype.lastIndexOf), ao = L(Array.prototype.pop), kt = L(Array.prototype.push), Ln = L(Array.prototype.splice), bt = Array.isArray, _t = L(String.prototype.toLowerCase), fe = L(String.prototype.toString), so = L(String.prototype.match), xt = L(String.prototype.replace), lo = L(String.prototype.indexOf), Mn = L(String.prototype.trim), In = L(Number.prototype.toString), Dn = L(Boolean.prototype.toString), co = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), uo = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), z = L(Object.prototype.hasOwnProperty), At = L(Object.prototype.toString), D = L(RegExp.prototype.test), X = On(TypeError);
|
|
1170
1222
|
function L(s) {
|
|
1171
1223
|
return function(t) {
|
|
1172
1224
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -1174,13 +1226,13 @@ function L(s) {
|
|
|
1174
1226
|
return we(s, t, o);
|
|
1175
1227
|
};
|
|
1176
1228
|
}
|
|
1177
|
-
function
|
|
1229
|
+
function On(s) {
|
|
1178
1230
|
return function() {
|
|
1179
1231
|
for (var t = arguments.length, e = new Array(t), o = 0; o < t; o++) e[o] = arguments[o];
|
|
1180
1232
|
return Te(s, e);
|
|
1181
1233
|
};
|
|
1182
1234
|
}
|
|
1183
|
-
function
|
|
1235
|
+
function E(s, t) {
|
|
1184
1236
|
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _t;
|
|
1185
1237
|
if (ro && ro(s, null), !bt(t)) return s;
|
|
1186
1238
|
let o = t.length;
|
|
@@ -1198,12 +1250,12 @@ function Rn(s) {
|
|
|
1198
1250
|
for (let t = 0; t < s.length; t++) z(s, t) || (s[t] = null);
|
|
1199
1251
|
return s;
|
|
1200
1252
|
}
|
|
1201
|
-
function
|
|
1253
|
+
function F(s) {
|
|
1202
1254
|
const t = mt(null);
|
|
1203
1255
|
for (const o of Co(s)) {
|
|
1204
1256
|
var e = kn(o, 2);
|
|
1205
1257
|
const i = e[0], r = e[1];
|
|
1206
|
-
z(s, i) && (bt(r) ? t[i] = Rn(r) : r && typeof r == "object" && r.constructor === Object ? t[i] =
|
|
1258
|
+
z(s, i) && (bt(r) ? t[i] = Rn(r) : r && typeof r == "object" && r.constructor === Object ? t[i] = F(r) : t[i] = r);
|
|
1207
1259
|
}
|
|
1208
1260
|
return t;
|
|
1209
1261
|
}
|
|
@@ -1214,7 +1266,7 @@ function Nn(s) {
|
|
|
1214
1266
|
case "number":
|
|
1215
1267
|
return In(s);
|
|
1216
1268
|
case "boolean":
|
|
1217
|
-
return
|
|
1269
|
+
return Dn(s);
|
|
1218
1270
|
case "bigint":
|
|
1219
1271
|
return co ? co(s) : "0";
|
|
1220
1272
|
case "symbol":
|
|
@@ -1251,12 +1303,12 @@ function j(s, t) {
|
|
|
1251
1303
|
}
|
|
1252
1304
|
function Pn(s) {
|
|
1253
1305
|
try {
|
|
1254
|
-
return
|
|
1306
|
+
return D(s, ""), !0;
|
|
1255
1307
|
} catch (t) {
|
|
1256
1308
|
return !1;
|
|
1257
1309
|
}
|
|
1258
1310
|
}
|
|
1259
|
-
const
|
|
1311
|
+
const po = M([
|
|
1260
1312
|
"a",
|
|
1261
1313
|
"abbr",
|
|
1262
1314
|
"acronym",
|
|
@@ -1504,7 +1556,7 @@ const fo = M([
|
|
|
1504
1556
|
"munder",
|
|
1505
1557
|
"munderover",
|
|
1506
1558
|
"mprescripts"
|
|
1507
|
-
]),
|
|
1559
|
+
]), Hn = M([
|
|
1508
1560
|
"maction",
|
|
1509
1561
|
"maligngroup",
|
|
1510
1562
|
"malignmark",
|
|
@@ -1520,7 +1572,7 @@ const fo = M([
|
|
|
1520
1572
|
"annotation-xml",
|
|
1521
1573
|
"mprescripts",
|
|
1522
1574
|
"none"
|
|
1523
|
-
]),
|
|
1575
|
+
]), fo = M(["#text"]), ho = M([
|
|
1524
1576
|
"accept",
|
|
1525
1577
|
"action",
|
|
1526
1578
|
"align",
|
|
@@ -1893,7 +1945,7 @@ const fo = M([
|
|
|
1893
1945
|
"xlink:title",
|
|
1894
1946
|
"xml:space",
|
|
1895
1947
|
"xmlns:xlink"
|
|
1896
|
-
]),
|
|
1948
|
+
]), Bn = I(/{{[\w\W]*|^[\w\W]*}}/g), Fn = I(/<%[\w\W]*|^[\w\W]*%>/g), Un = I(/\${[\w\W]*/g), jn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), Wn = I(/^aria-[\-\w]+$/), go = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), $n = I(/^(?:\w+script|data):/i), Gn = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Kn = I(/^html$/i), Yn = I(/^[a-z][.\w]*(-[.\w]+)+$/i), bo = I(/<[/\w!]/g), yo = I(/<[/\w]/g), qn = I(/<\/no(script|embed|frames)/i), Vn = I(/\/>/i), B = {
|
|
1897
1949
|
element: 1,
|
|
1898
1950
|
attribute: 2,
|
|
1899
1951
|
text: 3,
|
|
@@ -1915,7 +1967,7 @@ const fo = M([
|
|
|
1915
1967
|
"noframes",
|
|
1916
1968
|
"plaintext",
|
|
1917
1969
|
"noscript"
|
|
1918
|
-
], Xn = M(
|
|
1970
|
+
], Xn = M(E({}, _o)), Zn = (function() {
|
|
1919
1971
|
const s = {};
|
|
1920
1972
|
return it(_o, (t) => {
|
|
1921
1973
|
s[t] = I(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
@@ -1953,22 +2005,22 @@ const fo = M([
|
|
|
1953
2005
|
uponSanitizeShadowNode: []
|
|
1954
2006
|
};
|
|
1955
2007
|
}, Z = function(t, e, o, i) {
|
|
1956
|
-
return z(t, e) && bt(t[e]) ?
|
|
2008
|
+
return z(t, e) && bt(t[e]) ? E(i.base ? F(i.base) : {}, t[e], i.transform) : o;
|
|
1957
2009
|
}, ye = function(t, e, o) {
|
|
1958
2010
|
const i = z(t, e) ? t[e] : void 0;
|
|
1959
|
-
return i && typeof i == "object" ?
|
|
2011
|
+
return i && typeof i == "object" ? F(i) : o();
|
|
1960
2012
|
};
|
|
1961
2013
|
function Lo() {
|
|
1962
2014
|
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Jn();
|
|
1963
2015
|
const t = (u) => Lo(u);
|
|
1964
|
-
if (t.version = "3.4.16", t.removed = [], !s || !s.document || s.document.nodeType !==
|
|
2016
|
+
if (t.version = "3.4.16", t.removed = [], !s || !s.document || s.document.nodeType !== B.document || !s.Element)
|
|
1965
2017
|
return t.isSupported = !1, t;
|
|
1966
2018
|
let e = s.document;
|
|
1967
2019
|
const o = e, i = o.currentScript;
|
|
1968
2020
|
s.DocumentFragment;
|
|
1969
|
-
const r = s.HTMLTemplateElement, l = s.Node, c = s.Element,
|
|
2021
|
+
const r = s.HTMLTemplateElement, l = s.Node, c = s.Element, f = s.NodeFilter;
|
|
1970
2022
|
s.NamedNodeMap === void 0 && (s.NamedNodeMap || s.MozNamedAttrMap), s.HTMLFormElement;
|
|
1971
|
-
const m = s.DOMParser,
|
|
2023
|
+
const m = s.DOMParser, g = s.trustedTypes, T = c.prototype, k = j(T, "cloneNode"), w = j(T, "remove"), v = j(T, "removeAttributeNode"), K = j(T, "nextSibling"), O = j(T, "childNodes"), N = j(T, "parentNode"), Ae = j(T, "shadowRoot"), qt = j(T, "attributes"), Q = l && l.prototype ? j(l.prototype, "nodeType") : null, rt = l && l.prototype ? j(l.prototype, "nodeName") : null, Lt = l && l.prototype ? j(l.prototype, "ownerDocument") : null, yt = function(n) {
|
|
1972
2024
|
return Q ? Q(n) : n.nodeType;
|
|
1973
2025
|
}, Vt = function(n) {
|
|
1974
2026
|
return rt ? rt(n) : n.nodeName;
|
|
@@ -1987,7 +2039,7 @@ function Lo() {
|
|
|
1987
2039
|
} finally {
|
|
1988
2040
|
Et--;
|
|
1989
2041
|
}
|
|
1990
|
-
},
|
|
2042
|
+
}, Oo = function(n) {
|
|
1991
2043
|
Se(), Et++;
|
|
1992
2044
|
try {
|
|
1993
2045
|
return P.createScriptURL(n);
|
|
@@ -1995,21 +2047,21 @@ function Lo() {
|
|
|
1995
2047
|
Et--;
|
|
1996
2048
|
}
|
|
1997
2049
|
}, Ro = function() {
|
|
1998
|
-
return Ce || (Xt = Qn(
|
|
2050
|
+
return Ce || (Xt = Qn(g, i), Ce = !0), Xt;
|
|
1999
2051
|
}, Mt = e, Zt = Mt.implementation, _e = Mt.createNodeIterator, No = Mt.createDocumentFragment, Po = Mt.getElementsByTagName, zo = o.importNode;
|
|
2000
|
-
let
|
|
2052
|
+
let x = Eo();
|
|
2001
2053
|
t.isSupported = typeof Co == "function" && typeof N == "function" && Zt && Zt.createHTMLDocument !== void 0;
|
|
2002
|
-
const
|
|
2003
|
-
let Me = go,
|
|
2004
|
-
const Jt =
|
|
2005
|
-
...
|
|
2054
|
+
const Ho = Bn, Bo = Fn, Fo = Un, Uo = jn, jo = Wn, Wo = $n, Le = Gn, $o = Yn;
|
|
2055
|
+
let Me = go, A = null;
|
|
2056
|
+
const Jt = E({}, [
|
|
2057
|
+
...po,
|
|
2006
2058
|
...he,
|
|
2007
2059
|
...me,
|
|
2008
2060
|
...ge,
|
|
2009
|
-
...
|
|
2061
|
+
...fo
|
|
2010
2062
|
]);
|
|
2011
|
-
let
|
|
2012
|
-
const Qt =
|
|
2063
|
+
let C = null;
|
|
2064
|
+
const Qt = E({}, [
|
|
2013
2065
|
...ho,
|
|
2014
2066
|
...be,
|
|
2015
2067
|
...mo,
|
|
@@ -2049,10 +2101,10 @@ function Lo() {
|
|
|
2049
2101
|
value: null
|
|
2050
2102
|
}
|
|
2051
2103
|
}));
|
|
2052
|
-
let
|
|
2104
|
+
let De = !0, te = !0, Oe = !1, Re = !0, q = !1, et = !0, ot = !1, ee = !1, It = null, Dt = null, oe = !1, st = !1, Ot = !1, Rt = !1, Ne = !0, Pe = !1;
|
|
2053
2105
|
const ze = "user-content-";
|
|
2054
2106
|
let ne = !0, ie = !1, lt = {}, ct = null;
|
|
2055
|
-
const
|
|
2107
|
+
const He = E({}, [
|
|
2056
2108
|
"annotation-xml",
|
|
2057
2109
|
"audio",
|
|
2058
2110
|
"colgroup",
|
|
@@ -2080,8 +2132,8 @@ function Lo() {
|
|
|
2080
2132
|
"video",
|
|
2081
2133
|
"xmp"
|
|
2082
2134
|
]);
|
|
2083
|
-
let
|
|
2084
|
-
const
|
|
2135
|
+
let Be = null;
|
|
2136
|
+
const Fe = E({}, [
|
|
2085
2137
|
"audio",
|
|
2086
2138
|
"video",
|
|
2087
2139
|
"img",
|
|
@@ -2090,7 +2142,7 @@ function Lo() {
|
|
|
2090
2142
|
"track"
|
|
2091
2143
|
]);
|
|
2092
2144
|
let Ue = null;
|
|
2093
|
-
const je =
|
|
2145
|
+
const je = E({}, [
|
|
2094
2146
|
"alt",
|
|
2095
2147
|
"class",
|
|
2096
2148
|
"for",
|
|
@@ -2107,21 +2159,21 @@ function Lo() {
|
|
|
2107
2159
|
"xmlns"
|
|
2108
2160
|
]), Nt = "http://www.w3.org/1998/Math/MathML", Pt = "http://www.w3.org/2000/svg", $ = "http://www.w3.org/1999/xhtml";
|
|
2109
2161
|
let dt = $, re = !1, ae = null;
|
|
2110
|
-
const Go =
|
|
2162
|
+
const Go = E({}, [
|
|
2111
2163
|
Nt,
|
|
2112
2164
|
Pt,
|
|
2113
2165
|
$
|
|
2114
|
-
],
|
|
2166
|
+
], fe), We = M([
|
|
2115
2167
|
"mi",
|
|
2116
2168
|
"mo",
|
|
2117
2169
|
"mn",
|
|
2118
2170
|
"ms",
|
|
2119
2171
|
"mtext"
|
|
2120
2172
|
]);
|
|
2121
|
-
let se =
|
|
2173
|
+
let se = E({}, We);
|
|
2122
2174
|
const $e = M(["annotation-xml"]);
|
|
2123
|
-
let le =
|
|
2124
|
-
const Ko =
|
|
2175
|
+
let le = E({}, $e);
|
|
2176
|
+
const Ko = E({}, [
|
|
2125
2177
|
"title",
|
|
2126
2178
|
"style",
|
|
2127
2179
|
"font",
|
|
@@ -2136,35 +2188,35 @@ function Lo() {
|
|
|
2136
2188
|
}, ce = function() {
|
|
2137
2189
|
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2138
2190
|
if (ut && ut === n) return;
|
|
2139
|
-
(!n || typeof n != "object") && (n = {}), n =
|
|
2191
|
+
(!n || typeof n != "object") && (n = {}), n = F(n), wt = Yo.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? qo : n.PARSER_MEDIA_TYPE, _ = wt === "application/xhtml+xml" ? fe : _t, A = Z(n, "ALLOWED_TAGS", Jt, { transform: _ }), C = Z(n, "ALLOWED_ATTR", Qt, { transform: _ }), ae = Z(n, "ALLOWED_NAMESPACES", Go, { transform: fe }), Ue = Z(n, "ADD_URI_SAFE_ATTR", je, {
|
|
2140
2192
|
transform: _,
|
|
2141
2193
|
base: je
|
|
2142
|
-
}),
|
|
2194
|
+
}), Be = Z(n, "ADD_DATA_URI_TAGS", Fe, {
|
|
2143
2195
|
transform: _,
|
|
2144
|
-
base:
|
|
2145
|
-
}), ct = Z(n, "FORBID_CONTENTS",
|
|
2196
|
+
base: Fe
|
|
2197
|
+
}), ct = Z(n, "FORBID_CONTENTS", He, { transform: _ }), vt = Z(n, "FORBID_TAGS", F({}), { transform: _ }), Ie = Z(n, "FORBID_ATTR", F({}), { transform: _ }), lt = z(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? F(n.USE_PROFILES) : n.USE_PROFILES : !1, De = n.ALLOW_ARIA_ATTR !== !1, te = n.ALLOW_DATA_ATTR !== !1, Oe = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Re = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = n.SAFE_FOR_TEMPLATES || !1, et = n.SAFE_FOR_XML !== !1, ot = n.WHOLE_DOCUMENT || !1, st = n.RETURN_DOM || !1, Ot = n.RETURN_DOM_FRAGMENT || !1, Rt = n.RETURN_TRUSTED_TYPE || !1, oe = n.FORCE_BODY || !1, Ne = n.SANITIZE_DOM !== !1, Pe = n.SANITIZE_NAMED_PROPS || !1, ne = n.KEEP_CONTENT !== !1, ie = n.IN_PLACE || !1, Me = Pn(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : go, dt = typeof n.NAMESPACE == "string" ? n.NAMESPACE : $, se = ye(n, "MATHML_TEXT_INTEGRATION_POINTS", () => E({}, We)), le = ye(n, "HTML_INTEGRATION_POINTS", () => E({}, $e));
|
|
2146
2198
|
const a = ye(n, "CUSTOM_ELEMENT_HANDLING", () => mt(null));
|
|
2147
|
-
if (W = mt(null), z(a, "tagNameCheck") && Ge(a.tagNameCheck) && (W.tagNameCheck = a.tagNameCheck), z(a, "attributeNameCheck") && Ge(a.attributeNameCheck) && (W.attributeNameCheck = a.attributeNameCheck), z(a, "allowCustomizedBuiltInElements") && typeof a.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = a.allowCustomizedBuiltInElements), I(W), q && (te = !1),
|
|
2199
|
+
if (W = mt(null), z(a, "tagNameCheck") && Ge(a.tagNameCheck) && (W.tagNameCheck = a.tagNameCheck), z(a, "attributeNameCheck") && Ge(a.attributeNameCheck) && (W.attributeNameCheck = a.attributeNameCheck), z(a, "allowCustomizedBuiltInElements") && typeof a.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = a.allowCustomizedBuiltInElements), I(W), q && (te = !1), Ot && (st = !0), lt && (A = E({}, fo), C = mt(null), lt.html === !0 && (E(A, po), E(C, ho)), lt.svg === !0 && (E(A, he), E(C, be), E(C, Wt)), lt.svgFilters === !0 && (E(A, me), E(C, be), E(C, Wt)), lt.mathMl === !0 && (E(A, ge), E(C, mo), E(C, Wt))), Y.tagCheck = null, Y.attributeCheck = null, z(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? Y.tagCheck = n.ADD_TAGS : bt(n.ADD_TAGS) && (A === Jt && (A = F(A)), E(A, n.ADD_TAGS, _))), z(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? Y.attributeCheck = n.ADD_ATTR : bt(n.ADD_ATTR) && (C === Qt && (C = F(C)), E(C, n.ADD_ATTR, _))), z(n, "ADD_FORBID_CONTENTS") && bt(n.ADD_FORBID_CONTENTS) && (ct === He && (ct = F(ct)), E(ct, n.ADD_FORBID_CONTENTS, _)), ne && (A["#text"] = !0), ot && E(A, [
|
|
2148
2200
|
"html",
|
|
2149
2201
|
"head",
|
|
2150
2202
|
"body"
|
|
2151
|
-
]),
|
|
2203
|
+
]), A.table && (E(A, ["tbody"]), delete vt.tbody), n.TRUSTED_TYPES_POLICY) {
|
|
2152
2204
|
if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function") throw X('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2153
2205
|
if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw X('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
2154
2206
|
const d = P;
|
|
2155
2207
|
P = n.TRUSTED_TYPES_POLICY;
|
|
2156
2208
|
try {
|
|
2157
2209
|
tt = at("");
|
|
2158
|
-
} catch (
|
|
2159
|
-
throw P = d,
|
|
2210
|
+
} catch (p) {
|
|
2211
|
+
throw P = d, p;
|
|
2160
2212
|
}
|
|
2161
2213
|
} else n.TRUSTED_TYPES_POLICY === null ? (P = void 0, tt = "") : (P === void 0 && (P = Ro()), P && typeof tt == "string" && (tt = at("")));
|
|
2162
2214
|
M && M(n), ut = n;
|
|
2163
|
-
}, Ke =
|
|
2215
|
+
}, Ke = E({}, [
|
|
2164
2216
|
...he,
|
|
2165
2217
|
...me,
|
|
2166
2218
|
...zn
|
|
2167
|
-
]), Ye =
|
|
2219
|
+
]), Ye = E({}, [...ge, ...Hn]), Xo = function(n, a, d) {
|
|
2168
2220
|
return a.namespaceURI === $ ? n === "svg" : a.namespaceURI === Nt ? n === "svg" && (d === "annotation-xml" || se[d]) : !!Ke[n];
|
|
2169
2221
|
}, Zo = function(n, a, d) {
|
|
2170
2222
|
return a.namespaceURI === $ ? n === "math" : a.namespaceURI === Pt ? n === "math" && le[d] : !!Ye[n];
|
|
@@ -2176,8 +2228,8 @@ function Lo() {
|
|
|
2176
2228
|
namespaceURI: dt,
|
|
2177
2229
|
tagName: "template"
|
|
2178
2230
|
});
|
|
2179
|
-
const d = _t(n.tagName),
|
|
2180
|
-
return ae[n.namespaceURI] ? n.namespaceURI === Pt ? Xo(d, a,
|
|
2231
|
+
const d = _t(n.tagName), p = _t(a.tagName);
|
|
2232
|
+
return ae[n.namespaceURI] ? n.namespaceURI === Pt ? Xo(d, a, p) : n.namespaceURI === Nt ? Zo(d, a, p) : n.namespaceURI === $ ? Jo(d, a, p) : !!(wt === "application/xhtml+xml" && ae[n.namespaceURI]) : !1;
|
|
2181
2233
|
}, V = function(n) {
|
|
2182
2234
|
kt(t.removed, { element: n });
|
|
2183
2235
|
try {
|
|
@@ -2187,36 +2239,36 @@ function Lo() {
|
|
|
2187
2239
|
}
|
|
2188
2240
|
}, qe = function(n, a, d) {
|
|
2189
2241
|
try {
|
|
2190
|
-
|
|
2191
|
-
} catch (
|
|
2242
|
+
v(n, a);
|
|
2243
|
+
} catch (p) {
|
|
2192
2244
|
try {
|
|
2193
2245
|
n.removeAttribute(d);
|
|
2194
2246
|
} catch (h) {
|
|
2195
2247
|
}
|
|
2196
2248
|
}
|
|
2197
2249
|
}, zt = function(n) {
|
|
2198
|
-
|
|
2199
|
-
const a =
|
|
2250
|
+
Ht(n);
|
|
2251
|
+
const a = O(n);
|
|
2200
2252
|
if (a) {
|
|
2201
|
-
const
|
|
2253
|
+
const p = [];
|
|
2202
2254
|
it(a, (h) => {
|
|
2203
|
-
kt(
|
|
2204
|
-
}), it(
|
|
2255
|
+
kt(p, h);
|
|
2256
|
+
}), it(p, (h) => {
|
|
2205
2257
|
try {
|
|
2206
2258
|
w(h);
|
|
2207
|
-
} catch (
|
|
2259
|
+
} catch (b) {
|
|
2208
2260
|
}
|
|
2209
2261
|
});
|
|
2210
2262
|
}
|
|
2211
2263
|
const d = qt(n);
|
|
2212
|
-
if (d) for (let
|
|
2213
|
-
const h = d[
|
|
2214
|
-
typeof
|
|
2264
|
+
if (d) for (let p = d.length - 1; p >= 0; --p) {
|
|
2265
|
+
const h = d[p], b = h && h.name;
|
|
2266
|
+
typeof b == "string" && qe(n, h, b);
|
|
2215
2267
|
}
|
|
2216
2268
|
}, nt = function(n, a, d) {
|
|
2217
2269
|
if (!d) try {
|
|
2218
2270
|
d = a.getAttributeNode(n);
|
|
2219
|
-
} catch (
|
|
2271
|
+
} catch (p) {
|
|
2220
2272
|
d = null;
|
|
2221
2273
|
}
|
|
2222
2274
|
kt(t.removed, {
|
|
@@ -2224,36 +2276,36 @@ function Lo() {
|
|
|
2224
2276
|
from: a
|
|
2225
2277
|
});
|
|
2226
2278
|
try {
|
|
2227
|
-
d ?
|
|
2228
|
-
} catch (
|
|
2279
|
+
d ? v(a, d) : a.removeAttribute(n);
|
|
2280
|
+
} catch (p) {
|
|
2229
2281
|
try {
|
|
2230
2282
|
a.removeAttribute(n);
|
|
2231
2283
|
} catch (h) {
|
|
2232
2284
|
}
|
|
2233
2285
|
}
|
|
2234
2286
|
if (n === "is")
|
|
2235
|
-
if (st ||
|
|
2287
|
+
if (st || Ot) try {
|
|
2236
2288
|
V(a);
|
|
2237
|
-
} catch (
|
|
2289
|
+
} catch (p) {
|
|
2238
2290
|
}
|
|
2239
2291
|
else try {
|
|
2240
2292
|
a.setAttribute(n, "");
|
|
2241
|
-
} catch (
|
|
2293
|
+
} catch (p) {
|
|
2242
2294
|
}
|
|
2243
2295
|
}, tn = function(n) {
|
|
2244
2296
|
const a = qt(n);
|
|
2245
2297
|
if (a)
|
|
2246
2298
|
for (let d = a.length - 1; d >= 0; --d) {
|
|
2247
|
-
const
|
|
2248
|
-
typeof h != "string" ||
|
|
2299
|
+
const p = a[d], h = p && p.name;
|
|
2300
|
+
typeof h != "string" || C[_(h)] || qe(n, p, h);
|
|
2249
2301
|
}
|
|
2250
|
-
},
|
|
2302
|
+
}, Ht = function(n) {
|
|
2251
2303
|
const a = [n];
|
|
2252
2304
|
for (; a.length > 0; ) {
|
|
2253
2305
|
const d = a.pop();
|
|
2254
|
-
yt(d) ===
|
|
2255
|
-
const
|
|
2256
|
-
if (
|
|
2306
|
+
yt(d) === B.element && tn(d);
|
|
2307
|
+
const p = O(d);
|
|
2308
|
+
if (p) for (let h = p.length - 1; h >= 0; --h) a.push(p[h]);
|
|
2257
2309
|
}
|
|
2258
2310
|
}, Ve = function(n, a) {
|
|
2259
2311
|
return et ? n === "patchsrc" ? !0 : n === "for" && a !== "label" && a !== "output" : !1;
|
|
@@ -2261,69 +2313,69 @@ function Lo() {
|
|
|
2261
2313
|
if (!et) return;
|
|
2262
2314
|
const a = [n];
|
|
2263
2315
|
for (; a.length > 0; ) {
|
|
2264
|
-
const d = a.pop(),
|
|
2265
|
-
if (
|
|
2316
|
+
const d = a.pop(), p = yt(d);
|
|
2317
|
+
if (p === B.processingInstruction || p === B.comment && D(yo, d.data)) {
|
|
2266
2318
|
try {
|
|
2267
2319
|
w(d);
|
|
2268
|
-
} catch (
|
|
2320
|
+
} catch (b) {
|
|
2269
2321
|
}
|
|
2270
2322
|
continue;
|
|
2271
2323
|
}
|
|
2272
|
-
if (
|
|
2273
|
-
const
|
|
2324
|
+
if (p === B.element) {
|
|
2325
|
+
const b = d, y = _(Vt(d));
|
|
2274
2326
|
try {
|
|
2275
|
-
|
|
2327
|
+
b.hasAttribute && b.hasAttribute("patchsrc") && b.removeAttribute("patchsrc"), b.hasAttribute && b.hasAttribute("for") && Ve("for", y) && b.removeAttribute("for");
|
|
2276
2328
|
} catch (S) {
|
|
2277
2329
|
}
|
|
2278
2330
|
}
|
|
2279
|
-
const h =
|
|
2280
|
-
if (h) for (let
|
|
2331
|
+
const h = O(d);
|
|
2332
|
+
if (h) for (let b = h.length - 1; b >= 0; --b) a.push(h[b]);
|
|
2281
2333
|
}
|
|
2282
2334
|
}, Xe = function(n) {
|
|
2283
2335
|
let a = null, d = null;
|
|
2284
2336
|
if (oe) n = "<remove></remove>" + n;
|
|
2285
2337
|
else {
|
|
2286
|
-
const
|
|
2287
|
-
d =
|
|
2338
|
+
const b = so(n, /^[\r\n\t ]+/);
|
|
2339
|
+
d = b && b[0];
|
|
2288
2340
|
}
|
|
2289
2341
|
wt === "application/xhtml+xml" && dt === $ && (n = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + n + "</body></html>");
|
|
2290
|
-
const
|
|
2342
|
+
const p = P ? at(n) : n;
|
|
2291
2343
|
if (dt === $) try {
|
|
2292
|
-
a = new m().parseFromString(
|
|
2293
|
-
} catch (
|
|
2344
|
+
a = new m().parseFromString(p, wt);
|
|
2345
|
+
} catch (b) {
|
|
2294
2346
|
}
|
|
2295
2347
|
if (!a || !a.documentElement) {
|
|
2296
2348
|
a = Zt.createDocument(dt, "template", null);
|
|
2297
2349
|
try {
|
|
2298
|
-
a.documentElement.innerHTML = re ? tt :
|
|
2299
|
-
} catch (
|
|
2350
|
+
a.documentElement.innerHTML = re ? tt : p;
|
|
2351
|
+
} catch (b) {
|
|
2300
2352
|
}
|
|
2301
2353
|
}
|
|
2302
2354
|
const h = a.body || a.documentElement;
|
|
2303
2355
|
return n && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), dt === $ ? Po.call(a, ot ? "html" : "body")[0] : ot ? a.documentElement : h;
|
|
2304
2356
|
}, Ze = function(n) {
|
|
2305
2357
|
const a = Lt ? Lt(n) : n.ownerDocument;
|
|
2306
|
-
return _e.call(a || n, n,
|
|
2307
|
-
},
|
|
2308
|
-
return n = xt(n,
|
|
2358
|
+
return _e.call(a || n, n, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION, null);
|
|
2359
|
+
}, Bt = function(n) {
|
|
2360
|
+
return n = xt(n, Ho, " "), n = xt(n, Bo, " "), n = xt(n, Fo, " "), n;
|
|
2309
2361
|
}, de = function(n) {
|
|
2310
2362
|
var a;
|
|
2311
2363
|
n.normalize();
|
|
2312
|
-
const d = Lt ? Lt(n) : n.ownerDocument,
|
|
2313
|
-
let h =
|
|
2364
|
+
const d = Lt ? Lt(n) : n.ownerDocument, p = _e.call(d || n, n, f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION, null);
|
|
2365
|
+
let h = p.nextNode();
|
|
2314
2366
|
for (; h; )
|
|
2315
|
-
h.data =
|
|
2316
|
-
const
|
|
2317
|
-
|
|
2318
|
-
|
|
2367
|
+
h.data = Bt(h.data), h = p.nextNode();
|
|
2368
|
+
const b = (a = n.querySelectorAll) === null || a === void 0 ? void 0 : a.call(n, "template");
|
|
2369
|
+
b && it(b, (y) => {
|
|
2370
|
+
pt(y.content) && de(y.content);
|
|
2319
2371
|
});
|
|
2320
|
-
},
|
|
2372
|
+
}, Ft = function(n) {
|
|
2321
2373
|
const a = rt ? rt(n) : null;
|
|
2322
|
-
return typeof a != "string" || _(a) !== "form" ? !1 : typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || n.attributes !== qt(n) || typeof n.removeAttribute != "function" || typeof n.removeAttributeNode != "function" || typeof n.getAttributeNode != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function" || n.nodeType !== Q(n) || n.childNodes !==
|
|
2323
|
-
},
|
|
2374
|
+
return typeof a != "string" || _(a) !== "form" ? !1 : typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || n.attributes !== qt(n) || typeof n.removeAttribute != "function" || typeof n.removeAttributeNode != "function" || typeof n.getAttributeNode != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function" || n.nodeType !== Q(n) || n.childNodes !== O(n);
|
|
2375
|
+
}, pt = function(n) {
|
|
2324
2376
|
if (!Q || typeof n != "object" || n === null) return !1;
|
|
2325
2377
|
try {
|
|
2326
|
-
return Q(n) ===
|
|
2378
|
+
return Q(n) === B.documentFragment;
|
|
2327
2379
|
} catch (a) {
|
|
2328
2380
|
return !1;
|
|
2329
2381
|
}
|
|
@@ -2341,58 +2393,58 @@ function Lo() {
|
|
|
2341
2393
|
});
|
|
2342
2394
|
}
|
|
2343
2395
|
const on = function(n, a) {
|
|
2344
|
-
return !!(et && n.hasChildNodes() && !Tt(n.firstElementChild) &&
|
|
2396
|
+
return !!(et && n.hasChildNodes() && !Tt(n.firstElementChild) && D(bo, n.textContent) && D(bo, n.innerHTML) || et && n.namespaceURI === $ && Xn[a] && (Tt(n.firstElementChild) || typeof n.textContent == "string" && D(Zn[a], n.textContent)) || n.nodeType === B.processingInstruction || et && n.nodeType === B.comment && D(yo, n.data));
|
|
2345
2397
|
}, Ut = function(n, a) {
|
|
2346
|
-
if (n instanceof RegExp) return
|
|
2398
|
+
if (n instanceof RegExp) return D(n, a);
|
|
2347
2399
|
if (n instanceof Function) {
|
|
2348
|
-
for (var d = arguments.length,
|
|
2349
|
-
return !!n(a, ...
|
|
2400
|
+
for (var d = arguments.length, p = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++) p[h - 2] = arguments[h];
|
|
2401
|
+
return !!n(a, ...p);
|
|
2350
2402
|
}
|
|
2351
2403
|
return !1;
|
|
2352
2404
|
}, nn = function(n, a, d) {
|
|
2353
2405
|
if (!vt[a] && eo(a) && Ut(W.tagNameCheck, a)) return !1;
|
|
2354
2406
|
if (ne && !ct[a]) {
|
|
2355
|
-
const
|
|
2356
|
-
if (h &&
|
|
2357
|
-
const
|
|
2358
|
-
for (let
|
|
2359
|
-
const S = n === d ?
|
|
2360
|
-
|
|
2407
|
+
const p = N(n), h = O(n);
|
|
2408
|
+
if (h && p) {
|
|
2409
|
+
const b = h.length;
|
|
2410
|
+
for (let y = b - 1; y >= 0; --y) {
|
|
2411
|
+
const S = n === d ? k(h[y], !0) : h[y];
|
|
2412
|
+
p.insertBefore(S, K(n));
|
|
2361
2413
|
}
|
|
2362
2414
|
}
|
|
2363
2415
|
}
|
|
2364
2416
|
return V(n), !0;
|
|
2365
|
-
}, Je = function(n, a, d,
|
|
2366
|
-
return n.length === 0 ? a : a === d || a ===
|
|
2367
|
-
},
|
|
2368
|
-
return n === a || N(n) !== null ? !1 : (ie &&
|
|
2417
|
+
}, Je = function(n, a, d, p) {
|
|
2418
|
+
return n.length === 0 ? a : a === d || a === p ? F(a) : a;
|
|
2419
|
+
}, ft = function(n, a) {
|
|
2420
|
+
return n === a || N(n) !== null ? !1 : (ie && Ht(n), !0);
|
|
2369
2421
|
}, Qe = function(n, a) {
|
|
2370
|
-
if (G(
|
|
2371
|
-
if (
|
|
2422
|
+
if (G(x.beforeSanitizeElements, n, null), ft(n, a)) return !0;
|
|
2423
|
+
if (Ft(n))
|
|
2372
2424
|
return V(n), !0;
|
|
2373
2425
|
const d = _(Vt(n));
|
|
2374
|
-
if (
|
|
2426
|
+
if (A = Je(x.uponSanitizeElement, A, Jt, It), G(x.uponSanitizeElement, n, {
|
|
2375
2427
|
tagName: d,
|
|
2376
|
-
allowedTags:
|
|
2377
|
-
}),
|
|
2428
|
+
allowedTags: A
|
|
2429
|
+
}), ft(n, a)) return !0;
|
|
2378
2430
|
if (on(n, d))
|
|
2379
2431
|
return V(n), !0;
|
|
2380
|
-
if (vt[d] || !(Y.tagCheck instanceof Function && Y.tagCheck(d)) && !
|
|
2381
|
-
const
|
|
2382
|
-
return
|
|
2432
|
+
if (vt[d] || !(Y.tagCheck instanceof Function && Y.tagCheck(d)) && !A[d]) {
|
|
2433
|
+
const p = nn(n, d, a);
|
|
2434
|
+
return p === !1 && (G(x.afterSanitizeElements, n, null), ft(n, a)) ? !0 : p;
|
|
2383
2435
|
}
|
|
2384
|
-
if (yt(n) ===
|
|
2436
|
+
if (yt(n) === B.element && !Qo(n) || (d === "noscript" || d === "noembed" || d === "noframes") && D(qn, n.innerHTML))
|
|
2385
2437
|
return V(n), !0;
|
|
2386
|
-
if (q && n.nodeType ===
|
|
2387
|
-
const
|
|
2388
|
-
n.textContent !==
|
|
2438
|
+
if (q && n.nodeType === B.text) {
|
|
2439
|
+
const p = Bt(n.textContent);
|
|
2440
|
+
n.textContent !== p && (kt(t.removed, { element: n.cloneNode() }), n.textContent = p);
|
|
2389
2441
|
}
|
|
2390
|
-
return G(
|
|
2442
|
+
return G(x.afterSanitizeElements, n, null), ft(n, a);
|
|
2391
2443
|
}, to = function(n, a, d) {
|
|
2392
2444
|
if (Ie[a] || Ve(a, n) || Ne && (a === "id" || a === "name") && (d in e || d in Vo)) return !1;
|
|
2393
|
-
const
|
|
2394
|
-
return te &&
|
|
2395
|
-
}, rn =
|
|
2445
|
+
const p = C[a] || Y.attributeCheck instanceof Function && Y.attributeCheck(a, n);
|
|
2446
|
+
return te && D(Uo, a) || De && D(jo, a) ? !0 : p ? Ue[a] || D(Me, xt(d, Le, "")) || (a === "src" || a === "xlink:href" || a === "href") && n !== "script" && lo(d, "data:") === 0 && Be[n] || Oe && !D(Wo, xt(d, Le, "")) ? !0 : !d : eo(n) && Ut(W.tagNameCheck, n) && Ut(W.attributeNameCheck, a, n) || a === "is" && W.allowCustomizedBuiltInElements && Ut(W.tagNameCheck, d);
|
|
2447
|
+
}, rn = E({}, [
|
|
2396
2448
|
"annotation-xml",
|
|
2397
2449
|
"color-profile",
|
|
2398
2450
|
"font-face",
|
|
@@ -2402,72 +2454,72 @@ function Lo() {
|
|
|
2402
2454
|
"font-face-uri",
|
|
2403
2455
|
"missing-glyph"
|
|
2404
2456
|
]), eo = function(n) {
|
|
2405
|
-
return !rn[_t(n)] &&
|
|
2406
|
-
}, an = function(n, a, d,
|
|
2407
|
-
if (P && typeof
|
|
2457
|
+
return !rn[_t(n)] && D($o, n);
|
|
2458
|
+
}, an = function(n, a, d, p) {
|
|
2459
|
+
if (P && typeof g == "object" && typeof g.getAttributeType == "function" && !d) switch (g.getAttributeType(n, a)) {
|
|
2408
2460
|
case "TrustedHTML":
|
|
2409
|
-
return at(
|
|
2461
|
+
return at(p);
|
|
2410
2462
|
case "TrustedScriptURL":
|
|
2411
|
-
return
|
|
2463
|
+
return Oo(p);
|
|
2412
2464
|
}
|
|
2413
|
-
return
|
|
2414
|
-
}, sn = function(n, a, d,
|
|
2465
|
+
return p;
|
|
2466
|
+
}, sn = function(n, a, d, p) {
|
|
2415
2467
|
try {
|
|
2416
|
-
return d ? n.setAttributeNS(d, a,
|
|
2468
|
+
return d ? n.setAttributeNS(d, a, p) : n.setAttribute(a, p), Ft(n) ? (V(n), !1) : !0;
|
|
2417
2469
|
} catch (h) {
|
|
2418
2470
|
return nt(a, n), !1;
|
|
2419
2471
|
}
|
|
2420
2472
|
}, oo = function(n, a) {
|
|
2421
|
-
if (G(
|
|
2473
|
+
if (G(x.beforeSanitizeAttributes, n, null), ft(n, a)) return;
|
|
2422
2474
|
const d = n.attributes;
|
|
2423
|
-
if (!d ||
|
|
2424
|
-
|
|
2425
|
-
const
|
|
2475
|
+
if (!d || Ft(n)) return;
|
|
2476
|
+
C = Je(x.uponSanitizeAttribute, C, Qt, Dt);
|
|
2477
|
+
const p = {
|
|
2426
2478
|
attrName: "",
|
|
2427
2479
|
attrValue: "",
|
|
2428
2480
|
keepAttr: !0,
|
|
2429
|
-
allowedAttributes:
|
|
2481
|
+
allowedAttributes: C,
|
|
2430
2482
|
forceKeepAttr: void 0
|
|
2431
2483
|
};
|
|
2432
2484
|
let h = d.length;
|
|
2433
|
-
const
|
|
2485
|
+
const b = _(n.nodeName);
|
|
2434
2486
|
for (; h--; ) {
|
|
2435
|
-
const
|
|
2436
|
-
let R = S === "value" ?
|
|
2437
|
-
if (
|
|
2438
|
-
nt(S, n,
|
|
2487
|
+
const y = d[h], S = y.name, U = y.namespaceURI, H = y.value, ht = _(S), pe = H;
|
|
2488
|
+
let R = S === "value" ? pe : Mn(pe), no = !1;
|
|
2489
|
+
if (p.attrName = ht, p.attrValue = R, p.keepAttr = !0, p.forceKeepAttr = void 0, G(x.uponSanitizeAttribute, n, p), R = p.attrValue, Pe && (ht === "id" || ht === "name") && lo(R, ze) !== 0 && (nt(S, n, y), R = ze + R, no = !0), et && D(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, R)) {
|
|
2490
|
+
nt(S, n, y);
|
|
2439
2491
|
continue;
|
|
2440
2492
|
}
|
|
2441
2493
|
if (ht === "attributename" && so(R, "href")) {
|
|
2442
|
-
nt(S, n,
|
|
2494
|
+
nt(S, n, y);
|
|
2443
2495
|
continue;
|
|
2444
2496
|
}
|
|
2445
|
-
if (!
|
|
2446
|
-
if (!
|
|
2447
|
-
nt(S, n,
|
|
2497
|
+
if (!p.forceKeepAttr) {
|
|
2498
|
+
if (!p.keepAttr) {
|
|
2499
|
+
nt(S, n, y);
|
|
2448
2500
|
continue;
|
|
2449
2501
|
}
|
|
2450
|
-
if (!Re &&
|
|
2451
|
-
nt(S, n,
|
|
2502
|
+
if (!Re && D(Vn, R)) {
|
|
2503
|
+
nt(S, n, y);
|
|
2452
2504
|
continue;
|
|
2453
2505
|
}
|
|
2454
|
-
if (q && (R =
|
|
2455
|
-
nt(S, n,
|
|
2506
|
+
if (q && (R = Bt(R)), !to(b, ht, R)) {
|
|
2507
|
+
nt(S, n, y);
|
|
2456
2508
|
continue;
|
|
2457
2509
|
}
|
|
2458
|
-
R = an(
|
|
2510
|
+
R = an(b, ht, U, R), R !== pe && sn(n, S, U, R) && no && ao(t.removed);
|
|
2459
2511
|
}
|
|
2460
2512
|
}
|
|
2461
|
-
G(
|
|
2513
|
+
G(x.afterSanitizeAttributes, n, null), ft(n, a);
|
|
2462
2514
|
}, jt = function(n) {
|
|
2463
2515
|
let a = null;
|
|
2464
2516
|
const d = Ze(n);
|
|
2465
|
-
for (G(
|
|
2466
|
-
if (G(
|
|
2467
|
-
const
|
|
2468
|
-
|
|
2517
|
+
for (G(x.beforeSanitizeShadowDOM, n, null); a = d.nextNode(); )
|
|
2518
|
+
if (G(x.uponSanitizeShadowNode, a, null), Qe(a, n), oo(a, n), pt(a.content) && jt(a.content), yt(a) === B.element) {
|
|
2519
|
+
const p = Ae(a);
|
|
2520
|
+
pt(p) && (ue(p), jt(p));
|
|
2469
2521
|
}
|
|
2470
|
-
G(
|
|
2522
|
+
G(x.afterSanitizeShadowDOM, n, null);
|
|
2471
2523
|
}, ue = function(n) {
|
|
2472
2524
|
const a = [{
|
|
2473
2525
|
node: n,
|
|
@@ -2479,111 +2531,111 @@ function Lo() {
|
|
|
2479
2531
|
jt(d.shadow);
|
|
2480
2532
|
continue;
|
|
2481
2533
|
}
|
|
2482
|
-
const
|
|
2483
|
-
if (
|
|
2484
|
-
node:
|
|
2534
|
+
const p = d.node, h = yt(p) === B.element, b = O(p);
|
|
2535
|
+
if (b) for (let y = b.length - 1; y >= 0; --y) a.push({
|
|
2536
|
+
node: b[y],
|
|
2485
2537
|
shadow: null
|
|
2486
2538
|
});
|
|
2487
2539
|
if (h) {
|
|
2488
|
-
const
|
|
2489
|
-
if (typeof
|
|
2490
|
-
const S =
|
|
2491
|
-
|
|
2540
|
+
const y = rt ? rt(p) : null;
|
|
2541
|
+
if (typeof y == "string" && _(y) === "template") {
|
|
2542
|
+
const S = p.content;
|
|
2543
|
+
pt(S) && a.push({
|
|
2492
2544
|
node: S,
|
|
2493
2545
|
shadow: null
|
|
2494
2546
|
});
|
|
2495
2547
|
}
|
|
2496
2548
|
}
|
|
2497
2549
|
if (h) {
|
|
2498
|
-
const
|
|
2499
|
-
|
|
2550
|
+
const y = Ae(p);
|
|
2551
|
+
pt(y) && a.push({
|
|
2500
2552
|
node: null,
|
|
2501
|
-
shadow:
|
|
2553
|
+
shadow: y
|
|
2502
2554
|
}, {
|
|
2503
|
-
node:
|
|
2555
|
+
node: y,
|
|
2504
2556
|
shadow: null
|
|
2505
2557
|
});
|
|
2506
2558
|
}
|
|
2507
2559
|
}
|
|
2508
2560
|
};
|
|
2509
2561
|
return t.sanitize = function(u) {
|
|
2510
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, d = null,
|
|
2562
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, d = null, p = null, h = null;
|
|
2511
2563
|
if (re = !u, re && (u = "<!-->"), typeof u != "string" && !Tt(u) && (u = Nn(u), typeof u != "string"))
|
|
2512
2564
|
throw X("dirty is not a string, aborting");
|
|
2513
2565
|
if (!t.isSupported) return u;
|
|
2514
|
-
ee ? (
|
|
2515
|
-
const
|
|
2516
|
-
if (
|
|
2566
|
+
ee ? (A = It, C = Dt) : ce(n), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (A = F(A)), x.uponSanitizeAttribute.length > 0 && (C = F(C)), t.removed = [];
|
|
2567
|
+
const b = ie && typeof u != "string" && Tt(u);
|
|
2568
|
+
if (b) {
|
|
2517
2569
|
en(u);
|
|
2518
2570
|
const U = Vt(u);
|
|
2519
2571
|
if (typeof U == "string") {
|
|
2520
|
-
const
|
|
2521
|
-
if (!
|
|
2572
|
+
const H = _(U);
|
|
2573
|
+
if (!A[H] || vt[H])
|
|
2522
2574
|
throw zt(u), X("root node is forbidden and cannot be sanitized in-place");
|
|
2523
2575
|
}
|
|
2524
|
-
if (
|
|
2576
|
+
if (Ft(u))
|
|
2525
2577
|
throw zt(u), X("root node is clobbered and cannot be sanitized in-place");
|
|
2526
2578
|
try {
|
|
2527
2579
|
ue(u);
|
|
2528
|
-
} catch (
|
|
2529
|
-
throw zt(u),
|
|
2580
|
+
} catch (H) {
|
|
2581
|
+
throw zt(u), H;
|
|
2530
2582
|
}
|
|
2531
2583
|
} else if (Tt(u))
|
|
2532
|
-
a = Xe("<!---->"), d = a.ownerDocument.importNode(u, !0), d.nodeType ===
|
|
2584
|
+
a = Xe("<!---->"), d = a.ownerDocument.importNode(u, !0), d.nodeType === B.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? a = d : a.appendChild(d), ue(a);
|
|
2533
2585
|
else {
|
|
2534
2586
|
if (!st && !q && !ot && u.indexOf("<") === -1) return P && Rt ? at(u) : u;
|
|
2535
2587
|
if (a = Xe(u), !a) return st ? null : Rt ? tt : "";
|
|
2536
2588
|
}
|
|
2537
2589
|
a && oe && V(a.firstChild);
|
|
2538
|
-
const
|
|
2590
|
+
const y = b ? u : a;
|
|
2539
2591
|
try {
|
|
2540
|
-
const U = Ze(
|
|
2541
|
-
for (;
|
|
2542
|
-
Qe(
|
|
2592
|
+
const U = Ze(y);
|
|
2593
|
+
for (; p = U.nextNode(); )
|
|
2594
|
+
Qe(p, y), oo(p, y), pt(p.content) && jt(p.content);
|
|
2543
2595
|
} catch (U) {
|
|
2544
|
-
throw
|
|
2545
|
-
|
|
2596
|
+
throw b && (zt(u), it(t.removed, (H) => {
|
|
2597
|
+
H.element && Ht(H.element);
|
|
2546
2598
|
})), U;
|
|
2547
2599
|
}
|
|
2548
|
-
if (
|
|
2600
|
+
if (b) {
|
|
2549
2601
|
let U = !1;
|
|
2550
|
-
if (it(t.removed, (
|
|
2551
|
-
|
|
2602
|
+
if (it(t.removed, (H) => {
|
|
2603
|
+
H.element && (H.element === u && (U = !0), Ht(H.element));
|
|
2552
2604
|
}), U) throw X("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
2553
2605
|
return q && de(u), u;
|
|
2554
2606
|
}
|
|
2555
2607
|
if (st) {
|
|
2556
|
-
if (q && de(a),
|
|
2608
|
+
if (q && de(a), Ot)
|
|
2557
2609
|
for (h = No.call(a.ownerDocument); a.firstChild; ) h.appendChild(a.firstChild);
|
|
2558
2610
|
else h = a;
|
|
2559
|
-
return (
|
|
2611
|
+
return (C.shadowroot || C.shadowrootmode) && (h = zo.call(o, h, !0)), h;
|
|
2560
2612
|
}
|
|
2561
2613
|
let S = ot ? a.outerHTML : a.innerHTML;
|
|
2562
|
-
return ot &&
|
|
2563
|
-
` + S), q && (S =
|
|
2614
|
+
return ot && A["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && D(Kn, a.ownerDocument.doctype.name) && (S = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
|
|
2615
|
+
` + S), q && (S = Bt(S)), P && Rt ? at(S) : S;
|
|
2564
2616
|
}, t.setConfig = function() {
|
|
2565
2617
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2566
|
-
ce(u), ee = !0, It =
|
|
2618
|
+
ce(u), ee = !0, It = A, Dt = C;
|
|
2567
2619
|
}, t.clearConfig = function() {
|
|
2568
|
-
ut = null, ee = !1, It = null,
|
|
2620
|
+
ut = null, ee = !1, It = null, Dt = null, P = Xt, tt = "";
|
|
2569
2621
|
}, t.isValidAttribute = function(u, n, a) {
|
|
2570
2622
|
ut || ce({});
|
|
2571
|
-
const d = _(u),
|
|
2572
|
-
return to(d,
|
|
2623
|
+
const d = _(u), p = _(n);
|
|
2624
|
+
return to(d, p, a);
|
|
2573
2625
|
}, t.addHook = function(u, n) {
|
|
2574
|
-
typeof n == "function" && z(
|
|
2626
|
+
typeof n == "function" && z(x, u) && kt(x[u], n);
|
|
2575
2627
|
}, t.removeHook = function(u, n) {
|
|
2576
|
-
if (z(
|
|
2628
|
+
if (z(x, u)) {
|
|
2577
2629
|
if (n !== void 0) {
|
|
2578
|
-
const a = _n(
|
|
2579
|
-
return a === -1 ? void 0 : Ln(
|
|
2630
|
+
const a = _n(x[u], n);
|
|
2631
|
+
return a === -1 ? void 0 : Ln(x[u], a, 1)[0];
|
|
2580
2632
|
}
|
|
2581
|
-
return ao(
|
|
2633
|
+
return ao(x[u]);
|
|
2582
2634
|
}
|
|
2583
2635
|
}, t.removeHooks = function(u) {
|
|
2584
|
-
z(
|
|
2636
|
+
z(x, u) && (x[u] = []);
|
|
2585
2637
|
}, t.removeAllHooks = function() {
|
|
2586
|
-
|
|
2638
|
+
x = Eo();
|
|
2587
2639
|
}, t;
|
|
2588
2640
|
}
|
|
2589
2641
|
var $t = Lo();
|
|
@@ -2623,6 +2675,9 @@ const ti = [
|
|
|
2623
2675
|
"span",
|
|
2624
2676
|
"div",
|
|
2625
2677
|
"section",
|
|
2678
|
+
// A captioned image or video (the media manager's output). Neither carries behaviour of its own.
|
|
2679
|
+
"figure",
|
|
2680
|
+
"figcaption",
|
|
2626
2681
|
"sup",
|
|
2627
2682
|
"sub",
|
|
2628
2683
|
"hr"
|
|
@@ -2663,23 +2718,23 @@ function ni(s) {
|
|
|
2663
2718
|
function Mo(s, t, e, o) {
|
|
2664
2719
|
if ((t == null ? void 0 : t.sanitize) === !1)
|
|
2665
2720
|
return s;
|
|
2666
|
-
const i = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ti, r = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...i, ...e])) : i, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : ei,
|
|
2667
|
-
for (const
|
|
2668
|
-
for (const
|
|
2721
|
+
const i = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ti, r = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...i, ...e])) : i, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : ei, f = /* @__PURE__ */ new Set();
|
|
2722
|
+
for (const T of Object.values(c))
|
|
2723
|
+
for (const k of T) f.add(k);
|
|
2669
2724
|
const m = {
|
|
2670
2725
|
ALLOWED_TAGS: r,
|
|
2671
|
-
ALLOWED_ATTR: Array.from(
|
|
2726
|
+
ALLOWED_ATTR: Array.from(f)
|
|
2672
2727
|
};
|
|
2673
2728
|
if (!o)
|
|
2674
2729
|
return $t.sanitize(s, m);
|
|
2675
|
-
const
|
|
2730
|
+
const g = r.includes("iframe");
|
|
2676
2731
|
$t.addHook(
|
|
2677
2732
|
"uponSanitizeElement",
|
|
2678
|
-
(
|
|
2679
|
-
var
|
|
2680
|
-
if (
|
|
2681
|
-
const w =
|
|
2682
|
-
|
|
2733
|
+
(T, k) => {
|
|
2734
|
+
var v;
|
|
2735
|
+
if (k.tagName !== "iframe") return;
|
|
2736
|
+
const w = T;
|
|
2737
|
+
k.allowedTags.iframe = g || ((v = w.getAttribute) == null ? void 0 : v.call(w, oi)) === "true" && ni(w.getAttribute("src"));
|
|
2683
2738
|
}
|
|
2684
2739
|
);
|
|
2685
2740
|
try {
|
|
@@ -2697,7 +2752,7 @@ function ri(s, t, e) {
|
|
|
2697
2752
|
function vo(s, t, e, o) {
|
|
2698
2753
|
return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? s : Mo(s, t, o, !0);
|
|
2699
2754
|
}
|
|
2700
|
-
const ai = ".resize-handle, .table-resize-handle", si = /resize-handle/;
|
|
2755
|
+
const ai = ".resize-handle, .table-resize-handle, [data-rte-media-pending]", si = /resize-handle|data-rte-media-pending|rte-media/;
|
|
2701
2756
|
function Io(s) {
|
|
2702
2757
|
if (!s || !si.test(s)) return s;
|
|
2703
2758
|
const t = document.createElement("template");
|
|
@@ -2709,6 +2764,11 @@ function Io(s) {
|
|
|
2709
2764
|
}), e.forEach((o) => {
|
|
2710
2765
|
var i;
|
|
2711
2766
|
o.style.position === "relative" && (o.style.removeProperty("position"), (i = o.getAttribute("style")) != null && i.trim() || o.removeAttribute("style"));
|
|
2767
|
+
}), t.content.querySelectorAll("figure.rte-media").forEach((o) => {
|
|
2768
|
+
var r;
|
|
2769
|
+
o.removeAttribute("contenteditable");
|
|
2770
|
+
const i = o.querySelector(":scope > figcaption");
|
|
2771
|
+
i && (i.removeAttribute("contenteditable"), !((r = i.textContent) != null && r.trim()) && !i.querySelector("img, video, a") && i.remove());
|
|
2712
2772
|
}), t.innerHTML;
|
|
2713
2773
|
}
|
|
2714
2774
|
function Ct(s) {
|
|
@@ -3052,14 +3112,14 @@ class li {
|
|
|
3052
3112
|
}
|
|
3053
3113
|
const ci = '.editora-editor{display:flex;flex-direction:column;border:1px solid #ddd;border-radius:4px;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;overflow:hidden}.editora-editor *{box-sizing:border-box}.editora-theme-light{background:#fff;color:#333}.editora-theme-dark{--editora-dark-toolbar-bg-start: #353d48;--editora-dark-toolbar-bg-end: #2d3540;--editora-dark-button-bg-start: #46505f;--editora-dark-button-bg-end: #3b4553;--editora-dark-button-hover-start: #525d6d;--editora-dark-button-hover-end: #465262;--editora-dark-button-active-start: #5eaaf6;--editora-dark-button-active-end: #4a95de;--editora-dark-border: #475263;--editora-dark-border-strong: #566275;--editora-dark-text: #e1e9f5;--editora-dark-text-strong: #f3f7ff;--editora-dark-text-muted: #aeb9cc;--editora-dark-surface: #1d242d;--editora-dark-content: #1f2732;background:linear-gradient(180deg,#1b2330,#1c2430);color:var(--editora-dark-text);border-color:var(--editora-dark-border)}.editora-toolbar{display:flex;align-items:center;gap:4px;padding:8px;background:#f5f5f5;border-bottom:1px solid #ddd;flex-wrap:wrap}.editora-theme-dark .editora-toolbar{background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%);border-bottom-color:var(--editora-dark-border);box-shadow:inset 0 1px #ffffff0d}.editora-toolbar-sticky{position:sticky;top:0;z-index:100;position:-webkit-sticky}.editora-toolbar-group{display:flex;align-items:center;gap:2px}.editora-toolbar-button{padding:6px 12px;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-weight:600;font-size:14px;height:30px;display:flex;align-items:center;white-space:nowrap}.editora-toolbar-group-button{display:flex;align-items:center}.editora-toolbar-input.font-size{width:40px;padding:.25rem;text-align:center;font-size:14px;background:#fff;border:1px solid var(--rte-color-border-light);border-radius:var(--rte-radius-sm)}.editora-toolbar-group-items{display:flex;align-items:center;border:1px solid #ccc;.editora-toolbar-button{border:none;border-radius:0;&:first-child{border-right:1px solid #ccc;border-top-left-radius:3px;border-bottom-left-radius:3px}&:last-child{border:0px solid #ccc;border-radius:0!important}&:hover{background:#e0e0e0;border-color:#ccc}}}.editora-theme-dark .editora-toolbar-button{background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%);border-color:var(--editora-dark-border-strong);color:var(--editora-dark-text);box-shadow:inset 0 1px #ffffff14,0 1px 1px #00000059}.editora-theme-dark .editora-toolbar-group-items{border-color:var(--editora-dark-border-strong);background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%)}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:first-child{border-right-color:#566275}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:last-child{border-left-color:#566275}.editora-theme-dark .editora-toolbar-input.font-size{background-color:#2e3642;color:var(--editora-dark-text-strong);border-color:var(--editora-dark-border-strong);caret-color:var(--editora-dark-text-strong)}.editora-theme-dark .editora-toolbar-input.font-size::placeholder{color:var(--editora-dark-text-strong);opacity:1}.editora-toolbar-button:hover{background:#e0e0e0;border-color:#ccc}.editora-theme-dark .editora-toolbar-button:hover{background:linear-gradient(180deg,var(--editora-dark-button-hover-start) 0%,var(--editora-dark-button-hover-end) 100%);border-color:#66748a;color:var(--editora-dark-text-strong)}.editora-toolbar-button:active,.editora-toolbar-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-button:active,.editora-theme-dark .editora-toolbar-button.active{background:linear-gradient(180deg,var(--editora-dark-button-active-start) 0%,var(--editora-dark-button-active-end) 100%);border-color:#67adf4;color:#0f1b2a}.editora-theme-dark .editora-toolbar-button:disabled{background:#313946;border-color:#424d5e;color:#7f8ca1}.editora-theme-dark .editora-toolbar-button[data-command=insertTable],.editora-theme-dark .editora-toolbar-button[data-command=print],.editora-theme-dark .editora-toolbar-button[data-command=toggleSpellCheck],.editora-theme-dark .editora-toolbar-button[data-command=toggleA11yChecker],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionLTR],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionRTL]{color:#f1f6ff}.editora-toolbar-button:disabled{opacity:.5;cursor:not-allowed}.editora-toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;line-height:1}.editora-toolbar-button svg,.editora-toolbar-icon svg{width:20px;height:20px;display:block;color:currentColor}.editora-theme-dark .editora-toolbar-button svg:not([fill=none i]),.editora-theme-dark .editora-toolbar-icon svg:not([fill=none i]){fill:currentColor}.editora-theme-dark .editora-toolbar-icon,.editora-theme-dark .editora-toolbar-icon *{color:inherit}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([stroke="#000" i],[stroke="#000000" i],[stroke=black i],[stroke="#0f0f0f" i],[stroke="#111111" i],[style*="stroke:#000" i],[style*="stroke: #000" i],[style*="stroke:black" i],[style*="stroke: black" i],[style*="stroke:#0f0f0f" i],[style*="stroke: #0f0f0f" i]){stroke:currentColor!important}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([fill="#000" i],[fill="#000000" i],[fill=black i],[fill="#0f0f0f" i],[fill="#111111" i],[style*="fill:#000" i],[style*="fill: #000" i],[style*="fill:black" i],[style*="fill: black" i],[style*="fill:#0f0f0f" i],[style*="fill: #0f0f0f" i]){fill:currentColor!important}.editora-toolbar-separator{width:1px;height:24px;background:#ddd;margin:0 4px}.editora-theme-dark .editora-toolbar-separator{background:#4d596b}.editora-toolbar-items-container{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow:hidden}.editora-toolbar-more-button{display:flex;align-items:center;justify-content:center;width:30px;height:30px;flex-shrink:0;padding:0;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-size:16px}.editora-toolbar-more-button:hover{background:#e0e0e0}.editora-toolbar-more-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-more-button{background:var(--editora-dark-content);border-color:var(--editora-dark-border);color:var(--editora-dark-text)}.editora-theme-dark .editora-toolbar-more-button:hover,.editora-theme-dark .editora-toolbar-more-button.active{background:#3a4554;border-color:#607088}.editora-toolbar-expanded-row{display:none;flex-wrap:wrap;align-items:center;gap:4px;width:100%;padding:8px;border-top:1px solid #ddd;background:#f5f5f5}.editora-toolbar-expanded-row.show{display:flex}.editora-theme-dark .editora-toolbar-expanded-row{border-top-color:var(--editora-dark-border);background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%)}.editora-toolbar-dropdown{position:relative}.editora-toolbar-dropdown-menu{position:absolute;top:100%;left:0;min-width:150px;margin-top:4px;padding:4px 0;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-toolbar-dropdown-menu{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;color:#333;text-align:left;cursor:pointer;font-size:13px;transition:background .15s ease}.editora-theme-dark .editora-toolbar-dropdown-item{color:#d7deea}.editora-toolbar-dropdown-item:hover{background:#f5f5f5}.editora-theme-dark .editora-toolbar-dropdown-item:hover{background:#3a4554;color:#f0f6ff}.editora-content{flex:1;min-height:200px;padding:16px;outline:none;overflow-y:auto;line-height:1.6}.editora-theme-dark .editora-content{color:#ecf3ff;background:linear-gradient(180deg,var(--editora-dark-content) 0%,#1c232e 100%)}.editora-content:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}.editora-theme-dark .editora-content:empty:before{color:#8f9bb0}.editora-content h1{font-size:2em;margin:.67em 0;font-weight:600}.editora-content h2{font-size:1.5em;margin:.75em 0;font-weight:600}.editora-content h3{font-size:1.17em;margin:.83em 0;font-weight:600}.editora-content p{margin:1em 0}.editora-theme-dark .editora-content,.editora-theme-dark .editora-content :is(p,span,div,li,ul,ol,td,th,h1,h2,h3,h4,h5,h6,strong,em,u,s,small,sub,sup,blockquote,code,pre,a){color:#ecf3ff}.editora-content ul,.editora-content ol{margin:1em 0;padding-left:2em}.editora-content a{color:#06c;text-decoration:underline}.editora-theme-dark .editora-content a{color:#ecf3ff}.editora-content code{padding:2px 4px;background:#f5f5f5;border-radius:3px;font-family:Monaco,Menlo,Consolas,monospace;font-size:.9em}.editora-theme-dark .editora-content code{background:#1e1e1e}.editora-content pre{padding:12px;background:#f5f5f5;border-radius:4px;overflow-x:auto;margin:1em 0}.editora-theme-dark .editora-content pre{background:#1e1e1e}.editora-theme-dark .rte-code-block{background:linear-gradient(180deg,#212a36,#1b2430)!important;border-color:#4f5b70!important;color:#e7effc!important}.editora-theme-dark .rte-code-block code{color:#e7effc!important}.editora-theme-dark .rte-code-block:before{background:#111927!important;color:#dce8ff!important}.editora-theme-dark .rte-code-block .rte-code-copy{background:#2b3441!important;border-color:#5a667b!important;color:#dce8ff!important}.editora-content blockquote{margin:1em 0;padding-left:1em;border-left:4px solid #ddd;color:#666}.editora-theme-dark .editora-content blockquote{border-left-color:#3c3c3c;color:#ecf3ff}.editora-floating-toolbar{position:absolute;padding:4px;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-floating-toolbar{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-statusbar-container{display:flex;flex-direction:column}.editora-statusbar-left{display:flex;align-items:center;gap:8px}.editora-statusbar-right{display:flex;align-items:center;gap:8px;margin-left:auto}.editora-statusbar{display:flex;align-items:center;gap:12px;padding:6px 12px;background:#f5f5f5;border-top:1px solid #ddd;font-size:12px;color:#666}.editora-theme-dark .editora-statusbar{background:linear-gradient(180deg,#2c3440,#252d37);border-top-color:#3f4a5b;color:#d7deea}.editora-statusbar-item{white-space:nowrap}.editora-statusbar-separator{color:#ddd}.editora-theme-dark .editora-statusbar-separator{color:#566275}.editora-editor[readonly] .editora-content{background:#fafafa;cursor:not-allowed}.editora-theme-dark.editora-editor[readonly] .editora-content{background:#1a1a1a}.editora-editor:focus-within{border-color:#06c;box-shadow:0 0 0 3px #0066cc1a}.editora-theme-dark.editora-editor:focus-within{border-color:#4db8ff;box-shadow:0 0 0 3px #4db8ff1a}.editora-editor[disabled]{opacity:.6;pointer-events:none}@media(max-width:768px){.editora-toolbar{padding:4px}.editora-toolbar-button{min-width:28px;min-height:28px;padding:4px 8px;font-size:12px}.editora-content{padding:12px}}.editora-content ::selection{background:#06c3}.editora-theme-dark .editora-content ::selection{background:#4db8ff33}.editora-content table{border-collapse:collapse;width:100%;margin:1em 0}.editora-content th,.editora-content td{border:1px solid #ddd;padding:8px 12px;text-align:left}.editora-theme-dark .editora-content th,.editora-theme-dark .editora-content td{border-color:#3c3c3c}.editora-content th{background:#f5f5f5;font-weight:600}.editora-theme-dark .editora-content th{background:#252526}.editora-content img{max-width:100%;height:auto;border-radius:4px;display:block}.editora-content video{max-width:100%;height:auto;border-radius:4px;display:block}.editora-editor.loading{opacity:.7;pointer-events:none}.editora-editor.loading:after{content:"";position:absolute;top:50%;left:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border:3px solid #ddd;border-top-color:#06c;border-radius:50%;animation:editora-spin .8s linear infinite}@keyframes editora-spin{to{transform:rotate(360deg)}}.toolbar-container-wrapper{display:flex;align-items:center;background:#fff;border-bottom:1px solid #e0e0e0;padding:0;margin:0;width:100%;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.5;position:relative}.toolbar-container-wrapper[data-toolbar-sticky=true]{position:sticky;top:0;z-index:999;box-shadow:0 2px 4px #0000001a}.toolbar-container-wrapper[data-toolbar-floating=true]{position:fixed;top:0;left:0;right:0;z-index:1000;box-shadow:0 4px 12px #00000026}.toolbar-container-wrapper[data-toolbar-position=bottom]{border-bottom:none;border-top:1px solid #e0e0e0}.toolbar-container-wrapper .toolbar-wrapper{display:flex;width:100%;padding:8px;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar{display:flex;width:100%;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar-container{display:flex;gap:4px;flex-wrap:wrap;align-items:center;flex:1;position:relative}.toolbar-container-wrapper .toolbar-item{display:flex;align-items:center;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:6px 10px;border:1px solid #d1d5db;background:#fff;border-radius:4px;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;transition:all .15s ease;min-height:32px;white-space:nowrap}.toolbar-container-wrapper .toolbar-button:hover{background-color:#f3f4f6;border-color:#9ca3af}.toolbar-container-wrapper .toolbar-button:active,.toolbar-container-wrapper .toolbar-button[data-active=true]{background-color:#06c;color:#fff;border-color:#0052a3;box-shadow:inset 0 1px 3px #0000001a}.toolbar-container-wrapper .toolbar-button:disabled{opacity:.5;cursor:not-allowed;background-color:#f9fafb}.toolbar-container-wrapper .toolbar-more-button{padding:6px 8px;font-size:16px;font-weight:500;line-height:1}.toolbar-container-wrapper .toolbar-separator{width:1px;height:24px;background-color:#d1d5db;margin:0 4px}.toolbar-container-wrapper .toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}.toolbar-container-wrapper .toolbar-icon svg{width:100%;height:100%}.toolbar-container-wrapper .toolbar-dropdown{position:relative;display:flex;align-items:center}.toolbar-container-wrapper .toolbar-dropdown-arrow{font-size:10px;margin-left:2px;line-height:1}.toolbar-container-wrapper .toolbar-dropdown-menu{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;min-width:160px;padding:4px 0;margin-top:4px;display:none}.toolbar-container-wrapper .toolbar-dropdown-menu.show{display:block}.toolbar-container-wrapper .toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;text-align:left;cursor:pointer;font-size:13px;color:#1f2937;transition:background-color .15s ease;font-family:inherit}.toolbar-container-wrapper .toolbar-dropdown-item:hover{background-color:#f3f4f6}.toolbar-container-wrapper .toolbar-dropdown-item:active{background-color:#e5e7eb}.toolbar-container-wrapper .toolbar-input{padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px;font-family:inherit;background-color:#fff;color:#1f2937;transition:all .15s ease}.toolbar-container-wrapper .toolbar-input:focus{outline:none;border-color:#06c;box-shadow:0 0 0 3px #0066cc1a;background-color:#fff}.toolbar-container-wrapper .toolbar-input::placeholder{color:#9ca3af}.toolbar-overflow-menu{animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.toolbar-overflow-item{transition:background-color .15s ease}.floating-toolbar{user-select:none;-webkit-user-select:none;font-family:system-ui,-apple-system,sans-serif;font-size:14px;animation:fadeInUp .15s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.floating-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:4px;color:#495057;cursor:pointer;font-size:14px;font-weight:500;transition:all .15s ease;outline:none}.floating-toolbar-btn:hover{background:#f8f9fa;color:#212529}.floating-toolbar-btn:active{background:#e9ecef;transform:scale(.95)}.floating-toolbar-btn.floating-toolbar-toggle{color:#dc3545;font-weight:700}.floating-toolbar-btn.floating-toolbar-toggle:hover{background:#f8d7da;color:#721c24}.floating-toolbar-separator{width:1px;height:20px;background:#e1e5e9;margin:0 2px}@media(max-width:768px){.toolbar-container-wrapper .toolbar-button{padding:5px 8px;font-size:12px;min-height:28px}.toolbar-container-wrapper .toolbar-icon{width:16px;height:16px}.toolbar-container-wrapper .toolbar-dropdown-menu{min-width:140px}.toolbar-container-wrapper .toolbar-dropdown-item{padding:6px 10px;font-size:12px}.floating-toolbar{padding:4px;gap:2px}.floating-toolbar-btn{width:28px;height:28px;font-size:12px}}@media(max-width:480px){.toolbar-container-wrapper{padding:4px}.toolbar-container-wrapper .toolbar-wrapper{padding:4px;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:4px 6px;font-size:11px;min-height:24px}.toolbar-container-wrapper .toolbar-icon{width:14px;height:14px}}.floating-toolbar{pointer-events:auto}.floating-toolbar{max-width:calc(100vw - 20px);overflow-x:auto}@media(prefers-color-scheme:dark){.floating-toolbar{background:#2d3748;border-color:#4a5568;color:#e2e8f0}.floating-toolbar-btn:hover{background:#4a5568;color:#f7fafc}.floating-toolbar-btn:active{background:#718096}.floating-toolbar-separator{background:#4a5568}}';
|
|
3054
3114
|
let Gt;
|
|
3055
|
-
const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", wo = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", To = ".rte-content, .editora-content",
|
|
3115
|
+
const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", wo = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", To = ".rte-content, .editora-content", pi = "Rich text editor", xe = /* @__PURE__ */ new Set();
|
|
3056
3116
|
let J = null, ko = !1, Ee = null, ve = null;
|
|
3057
3117
|
function xo(s) {
|
|
3058
3118
|
if (!(s instanceof HTMLElement)) return !1;
|
|
3059
3119
|
const t = s;
|
|
3060
3120
|
return typeof t.execCommand == "function" && (t.tagName.toLowerCase() === "editora-editor" || t.classList.contains("editora-editor") || t.hasAttribute("data-editora-editor"));
|
|
3061
3121
|
}
|
|
3062
|
-
function
|
|
3122
|
+
function fi(s) {
|
|
3063
3123
|
return s ? s.nodeType === Node.ELEMENT_NODE ? s : s.parentElement : null;
|
|
3064
3124
|
}
|
|
3065
3125
|
function St(s) {
|
|
@@ -3094,7 +3154,7 @@ function hi() {
|
|
|
3094
3154
|
}
|
|
3095
3155
|
const o = (i = window.getSelection) == null ? void 0 : i.call(window);
|
|
3096
3156
|
if (o && o.rangeCount > 0) {
|
|
3097
|
-
const r = St(
|
|
3157
|
+
const r = St(fi(o.getRangeAt(0).startContainer));
|
|
3098
3158
|
if (r) return r;
|
|
3099
3159
|
}
|
|
3100
3160
|
if (J && J.isConnected)
|
|
@@ -3119,7 +3179,7 @@ function gi() {
|
|
|
3119
3179
|
t.id = s, t.textContent = ci, document.head.appendChild(t);
|
|
3120
3180
|
}
|
|
3121
3181
|
}
|
|
3122
|
-
function
|
|
3182
|
+
function Do() {
|
|
3123
3183
|
if (!Gt) {
|
|
3124
3184
|
const s = gt.__globalPluginLoader;
|
|
3125
3185
|
s ? Gt = s : Gt = new li();
|
|
@@ -3127,14 +3187,14 @@ function Oo() {
|
|
|
3127
3187
|
return Gt;
|
|
3128
3188
|
}
|
|
3129
3189
|
function yi(s) {
|
|
3130
|
-
const t =
|
|
3190
|
+
const t = Do();
|
|
3131
3191
|
Object.entries(s).forEach(([e, o]) => {
|
|
3132
3192
|
t.register(e, o);
|
|
3133
3193
|
});
|
|
3134
3194
|
}
|
|
3135
3195
|
class gt extends HTMLElement {
|
|
3136
3196
|
constructor() {
|
|
3137
|
-
if (super(), this.pluginLoader =
|
|
3197
|
+
if (super(), this.pluginLoader = Do(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new cn(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, this.pendingHistorySnapshot = null, gi(), !this.hasAttribute("data-initial-content")) {
|
|
3138
3198
|
const t = this.innerHTML.trim();
|
|
3139
3199
|
t && this.setAttribute("data-initial-content", t);
|
|
3140
3200
|
}
|
|
@@ -3389,7 +3449,7 @@ class gt extends HTMLElement {
|
|
|
3389
3449
|
if (t.enableARIA) {
|
|
3390
3450
|
this.contentElement.setAttribute("role", "textbox"), this.contentElement.setAttribute("aria-multiline", "true"), this.contentElement.setAttribute("aria-disabled", this.config.readonly ? "true" : "false");
|
|
3391
3451
|
const o = (e = this.getAttribute("aria-label")) == null ? void 0 : e.trim(), i = typeof this.config.placeholder == "string" ? this.config.placeholder.trim() : "";
|
|
3392
|
-
this.contentElement.setAttribute("aria-label", o || i ||
|
|
3452
|
+
this.contentElement.setAttribute("aria-label", o || i || pi);
|
|
3393
3453
|
} else
|
|
3394
3454
|
this.contentElement.removeAttribute("role"), this.contentElement.removeAttribute("aria-multiline"), this.contentElement.removeAttribute("aria-disabled"), this.contentElement.removeAttribute("aria-label");
|
|
3395
3455
|
this.contentElement.tabIndex = t.keyboardNavigation ? 0 : -1;
|
|
@@ -3580,7 +3640,7 @@ class gt extends HTMLElement {
|
|
|
3580
3640
|
*/
|
|
3581
3641
|
createUI(t, e) {
|
|
3582
3642
|
const o = this.querySelector('[slot="toolbar"]'), i = this.querySelector('[slot="statusbar"]');
|
|
3583
|
-
this.innerHTML = "", this.config.toolbar !== !1 && !o ? (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.appendChild(this.toolbarElement), this.toolbar = new
|
|
3643
|
+
this.innerHTML = "", this.config.toolbar !== !1 && !o ? (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.appendChild(this.toolbarElement), this.toolbar = new pn(
|
|
3584
3644
|
{
|
|
3585
3645
|
items: this.resolveToolbarItems(),
|
|
3586
3646
|
sticky: this.isToolbarStickyEnabled(),
|
|
@@ -3593,10 +3653,10 @@ class gt extends HTMLElement {
|
|
|
3593
3653
|
var c;
|
|
3594
3654
|
if (this.contentElement) {
|
|
3595
3655
|
this.contentElement.focus();
|
|
3596
|
-
const
|
|
3597
|
-
if (!
|
|
3598
|
-
const m = document.createRange(),
|
|
3599
|
-
|
|
3656
|
+
const f = window.getSelection();
|
|
3657
|
+
if (!f || f.rangeCount === 0 || !this.contentElement.contains(f.anchorNode)) {
|
|
3658
|
+
const m = document.createRange(), g = this.contentElement.lastChild || this.contentElement;
|
|
3659
|
+
g.nodeType === Node.TEXT_NODE ? m.setStart(g, ((c = g.textContent) == null ? void 0 : c.length) || 0) : g.nodeType === Node.ELEMENT_NODE ? (m.selectNodeContents(g), m.collapse(!1)) : m.setStart(this.contentElement, 0), m.collapse(!0), f == null || f.removeAllRanges(), f == null || f.addRange(m);
|
|
3600
3660
|
}
|
|
3601
3661
|
}
|
|
3602
3662
|
return this.executeCommand(r, l);
|
|
@@ -3610,18 +3670,32 @@ class gt extends HTMLElement {
|
|
|
3610
3670
|
const r = document.createElement("div");
|
|
3611
3671
|
r.innerHTML = e.trim(), !Array.from(r.childNodes).some((c) => {
|
|
3612
3672
|
if (c.nodeType === Node.ELEMENT_NODE) {
|
|
3613
|
-
const
|
|
3614
|
-
return ["P", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "BLOCKQUOTE", "PRE"].includes(
|
|
3673
|
+
const f = c.tagName;
|
|
3674
|
+
return ["P", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "BLOCKQUOTE", "PRE"].includes(f);
|
|
3615
3675
|
}
|
|
3616
3676
|
return !1;
|
|
3617
3677
|
}) && e.trim() ? this.contentElement.innerHTML = `<p>${e.trim()}</p>` : this.contentElement.innerHTML = e;
|
|
3618
3678
|
} else
|
|
3619
3679
|
this.config.placeholder ? this.contentElement.innerHTML = "" : this.contentElement.innerHTML = "<p><br></p>";
|
|
3620
|
-
this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new
|
|
3680
|
+
this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new fn({ enabled: !0 }), this.floatingToolbar.create(this)), i ? this.appendChild(i) : this.isStatusbarEnabled() && (this.statusBarElement = document.createElement("div"), this.statusBarElement.className = "editora-statusbar-container", this.appendChild(this.statusBarElement), this.statusBar = new hn({ position: this.getStatusbarPosition() }), this.statusBar.create(this.statusBarElement)), this.config.autofocus && setTimeout(() => {
|
|
3621
3681
|
var r;
|
|
3622
3682
|
return (r = this.contentElement) == null ? void 0 : r.focus();
|
|
3623
3683
|
}, 0);
|
|
3624
3684
|
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Hands what a keystroke changed to the history plugin, so Undo takes back typing. Without this the
|
|
3687
|
+
* plugin only knew about changes that plugins reported themselves, and typed text could not be undone.
|
|
3688
|
+
*/
|
|
3689
|
+
recordInputHistory(t) {
|
|
3690
|
+
const e = this.pendingHistorySnapshot;
|
|
3691
|
+
if (this.pendingHistorySnapshot = null, !e || !this.contentElement || e.beforeHTML === t) return;
|
|
3692
|
+
const o = window.execEditorCommand;
|
|
3693
|
+
typeof o == "function" && o("recordDomTransaction", this.contentElement, e.beforeHTML, t, {
|
|
3694
|
+
inputType: e.inputType,
|
|
3695
|
+
data: e.data,
|
|
3696
|
+
selectionCollapsed: e.selectionCollapsed
|
|
3697
|
+
});
|
|
3698
|
+
}
|
|
3625
3699
|
/**
|
|
3626
3700
|
* Setup event listeners
|
|
3627
3701
|
*/
|
|
@@ -3629,43 +3703,49 @@ class gt extends HTMLElement {
|
|
|
3629
3703
|
if (!this.contentElement || !this.engine) return;
|
|
3630
3704
|
const t = this.keyboardShortcutManager;
|
|
3631
3705
|
this.contentElement.addEventListener("beforeinput", (o) => {
|
|
3632
|
-
|
|
3706
|
+
var i, r;
|
|
3707
|
+
this.lastBeforeInputType = o.inputType || null, o.inputType === "historyUndo" || o.inputType === "historyRedo" ? this.pendingHistorySnapshot = null : this.contentElement && (this.pendingHistorySnapshot = {
|
|
3708
|
+
beforeHTML: this.contentElement.innerHTML,
|
|
3709
|
+
inputType: o.inputType || null,
|
|
3710
|
+
data: typeof o.data == "string" ? o.data : null,
|
|
3711
|
+
selectionCollapsed: (r = (i = window.getSelection()) == null ? void 0 : i.isCollapsed) != null ? r : !0
|
|
3712
|
+
});
|
|
3633
3713
|
}), this.contentElement.addEventListener("input", (o) => {
|
|
3634
|
-
var
|
|
3714
|
+
var k;
|
|
3635
3715
|
if (!this.contentElement) return;
|
|
3636
3716
|
let i = this.contentElement.innerHTML;
|
|
3637
|
-
const r = (
|
|
3638
|
-
if (this.lastBeforeInputType = null,
|
|
3639
|
-
const w = vo(i, c,
|
|
3717
|
+
const r = (k = o == null ? void 0 : o.detail) == null ? void 0 : k.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = this.lastBeforeInputType;
|
|
3718
|
+
if (this.lastBeforeInputType = null, f.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
|
|
3719
|
+
const w = vo(i, c, f, r);
|
|
3640
3720
|
if (w !== i) {
|
|
3641
|
-
const
|
|
3642
|
-
if (this.contentElement.innerHTML = w, K &&
|
|
3721
|
+
const v = window.getSelection(), K = v && v.rangeCount > 0 ? v.getRangeAt(0) : null;
|
|
3722
|
+
if (this.contentElement.innerHTML = w, K && v)
|
|
3643
3723
|
try {
|
|
3644
|
-
|
|
3645
|
-
} catch (
|
|
3724
|
+
v.removeAllRanges(), v.addRange(K);
|
|
3725
|
+
} catch (O) {
|
|
3646
3726
|
}
|
|
3647
3727
|
i = w;
|
|
3648
3728
|
}
|
|
3649
3729
|
}
|
|
3650
|
-
this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
|
|
3651
|
-
const
|
|
3730
|
+
this.recordInputHistory(i), this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
|
|
3731
|
+
const T = () => {
|
|
3652
3732
|
this.dispatchEvent(new CustomEvent("content-change", {
|
|
3653
3733
|
detail: { html: Io(i) },
|
|
3654
3734
|
bubbles: !0
|
|
3655
3735
|
}));
|
|
3656
3736
|
};
|
|
3657
|
-
l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(
|
|
3737
|
+
l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(T, l.debounceInputMs) : T(), this.updateStatusBar();
|
|
3658
3738
|
}), this.contentElement.addEventListener("contextmenu", (o) => {
|
|
3659
3739
|
const i = this.config.contextMenu;
|
|
3660
3740
|
(i === !1 || typeof i == "object" && i !== null && i.enabled === !1) && o.preventDefault();
|
|
3661
3741
|
}), this.contentElement.addEventListener("paste", (o) => {
|
|
3662
|
-
var
|
|
3742
|
+
var g, T;
|
|
3663
3743
|
if (o.__editoraSmartPasteHandled === !0 || o.defaultPrevented)
|
|
3664
3744
|
return;
|
|
3665
3745
|
o.preventDefault();
|
|
3666
3746
|
const i = this.config.paste || {};
|
|
3667
|
-
let r = ((
|
|
3668
|
-
const l = ((
|
|
3747
|
+
let r = ((g = o.clipboardData) == null ? void 0 : g.getData("text/html")) || "";
|
|
3748
|
+
const l = ((T = o.clipboardData) == null ? void 0 : T.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = !!r && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(r);
|
|
3669
3749
|
if ((i.clean || !i.keepFormatting) && l) {
|
|
3670
3750
|
document.execCommand("insertText", !1, l);
|
|
3671
3751
|
return;
|
|
@@ -3675,7 +3755,7 @@ class gt extends HTMLElement {
|
|
|
3675
3755
|
return;
|
|
3676
3756
|
}
|
|
3677
3757
|
if (r) {
|
|
3678
|
-
|
|
3758
|
+
f.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (r = ri(r, c, f)), this.insertHTMLAtSelection(r);
|
|
3679
3759
|
return;
|
|
3680
3760
|
}
|
|
3681
3761
|
l && document.execCommand("insertText", !1, l);
|
|
@@ -3765,14 +3845,14 @@ class gt extends HTMLElement {
|
|
|
3765
3845
|
if (t.viewportOnlyScan && !this.isEditorInViewport() && !e)
|
|
3766
3846
|
return;
|
|
3767
3847
|
const o = this.contentElement.textContent || "", { words: i, chars: r } = yn(o), l = bn(this.contentElement);
|
|
3768
|
-
let c,
|
|
3848
|
+
let c, f;
|
|
3769
3849
|
const m = this.getSelectionRangeInEditor();
|
|
3770
|
-
m && (c = mn(this.contentElement, m), m.collapsed || (
|
|
3850
|
+
m && (c = mn(this.contentElement, m), m.collapsed || (f = En(m, c), c = void 0)), this.statusBar.update({
|
|
3771
3851
|
wordCount: i,
|
|
3772
3852
|
charCount: r,
|
|
3773
3853
|
lineCount: l,
|
|
3774
3854
|
cursorPosition: c,
|
|
3775
|
-
selectionInfo:
|
|
3855
|
+
selectionInfo: f
|
|
3776
3856
|
});
|
|
3777
3857
|
}
|
|
3778
3858
|
/**
|
|
@@ -3922,12 +4002,12 @@ class gt extends HTMLElement {
|
|
|
3922
4002
|
export {
|
|
3923
4003
|
dn as C,
|
|
3924
4004
|
Kt as E,
|
|
3925
|
-
|
|
4005
|
+
fn as F,
|
|
3926
4006
|
cn as K,
|
|
3927
4007
|
Ao as P,
|
|
3928
4008
|
gt as R,
|
|
3929
4009
|
ln as S,
|
|
3930
|
-
|
|
4010
|
+
pn as T,
|
|
3931
4011
|
un as a,
|
|
3932
4012
|
ke as b,
|
|
3933
4013
|
li as c,
|
|
@@ -3945,4 +4025,4 @@ export {
|
|
|
3945
4025
|
yi as o,
|
|
3946
4026
|
ii as s
|
|
3947
4027
|
};
|
|
3948
|
-
//# sourceMappingURL=index-
|
|
4028
|
+
//# sourceMappingURL=index-gI4djib2.mjs.map
|