@editora/core 1.0.31 → 1.0.33
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/README.md +11 -3
- package/dist/{CollaborationPlugin.native-B9aiC2s7.mjs → CollaborationPlugin.native-8gcyVRnR.mjs} +869 -857
- package/dist/{VersionDiffPlugin.native-DJZIzFSK.mjs → VersionDiffPlugin.native-2v8ZaZWN.mjs} +248 -247
- package/dist/editora.min.js +15 -15
- package/dist/editora.umd.js +15 -15
- package/dist/index-BahpGXyw.js +12 -0
- package/dist/{index-8WhEVFK8.mjs → index-BlsTuyTe.mjs} +676 -582
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/plugin-loader.js +4 -4
- package/dist/webcomponent-core.js +480 -386
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +29 -29
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +481 -387
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +267 -267
- package/package.json +1 -1
- package/dist/index-DMk3V5_f.js +0 -12
package/dist/webcomponent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class _o {
|
|
2
2
|
constructor() {
|
|
3
3
|
this.loadedPlugins = /* @__PURE__ */ new Map(), this.pluginRegistry = /* @__PURE__ */ new Map();
|
|
4
4
|
}
|
|
@@ -9,16 +9,30 @@ class Co {
|
|
|
9
9
|
this.pluginRegistry.set(t, e);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Load a plugin by name (async)
|
|
12
|
+
* Load a plugin by name (async). The instance is cached by name: every later call gets the same
|
|
13
|
+
* one, configured by the first call. For one instance per editor, use create().
|
|
13
14
|
*/
|
|
14
15
|
async load(t, e) {
|
|
15
16
|
if (this.loadedPlugins.has(t))
|
|
16
17
|
return this.loadedPlugins.get(t);
|
|
18
|
+
const o = await this.create(t, e);
|
|
19
|
+
return o && this.loadedPlugins.set(t, o), o;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a new instance of a registered plugin, configured with `config`, without caching it.
|
|
23
|
+
*/
|
|
24
|
+
async create(t, e) {
|
|
17
25
|
const o = this.pluginRegistry.get(t);
|
|
18
26
|
if (!o)
|
|
19
27
|
return console.warn(`Plugin not found: ${t}`), null;
|
|
20
28
|
const r = await o();
|
|
21
|
-
return e && this.applyPluginConfig(r, e),
|
|
29
|
+
return e && this.applyPluginConfig(r, e), r;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Attach configuration to a plugin instance (read at runtime as `__pluginConfig`).
|
|
33
|
+
*/
|
|
34
|
+
configure(t, e) {
|
|
35
|
+
this.applyPluginConfig(t, e);
|
|
22
36
|
}
|
|
23
37
|
/**
|
|
24
38
|
* Load multiple plugins
|
|
@@ -84,7 +98,7 @@ class Yt {
|
|
|
84
98
|
return new Yt(t, e || this.selection, this.schema);
|
|
85
99
|
}
|
|
86
100
|
}
|
|
87
|
-
class
|
|
101
|
+
class dn {
|
|
88
102
|
constructor(t, e) {
|
|
89
103
|
this.nodes = new Map(Object.entries(t)), this.marks = new Map(Object.entries(e));
|
|
90
104
|
}
|
|
@@ -95,7 +109,7 @@ class ln {
|
|
|
95
109
|
return { type: "text", text: t, marks: e };
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
|
-
class
|
|
112
|
+
class un {
|
|
99
113
|
constructor() {
|
|
100
114
|
this.plugins = [], this.pluginConfigs = /* @__PURE__ */ new Map();
|
|
101
115
|
}
|
|
@@ -132,7 +146,7 @@ class cn {
|
|
|
132
146
|
const t = {}, e = {};
|
|
133
147
|
return this.plugins.forEach((o) => {
|
|
134
148
|
o.nodes && Object.assign(t, o.nodes), o.marks && Object.assign(e, o.marks);
|
|
135
|
-
}), new
|
|
149
|
+
}), new dn(t, e);
|
|
136
150
|
}
|
|
137
151
|
getCommands() {
|
|
138
152
|
const t = {};
|
|
@@ -186,7 +200,7 @@ class cn {
|
|
|
186
200
|
await Promise.all(t), this.plugins = [], this.pluginConfigs.clear();
|
|
187
201
|
}
|
|
188
202
|
}
|
|
189
|
-
class
|
|
203
|
+
class pn {
|
|
190
204
|
constructor(t = {}) {
|
|
191
205
|
this.commands = /* @__PURE__ */ new Map(), Object.entries(t).forEach(([e, o]) => {
|
|
192
206
|
this.register(e, o);
|
|
@@ -229,11 +243,11 @@ class dn {
|
|
|
229
243
|
this.commands.clear();
|
|
230
244
|
}
|
|
231
245
|
}
|
|
232
|
-
class
|
|
246
|
+
class fn {
|
|
233
247
|
constructor(t = {}) {
|
|
234
|
-
this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new
|
|
248
|
+
this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new un(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((o) => this.pluginManager.register(o));
|
|
235
249
|
const e = this.pluginManager.buildSchema();
|
|
236
|
-
this.state = Yt.create(e), this.commandRegistry = new
|
|
250
|
+
this.state = Yt.create(e), this.commandRegistry = new pn(this.pluginManager.getCommands());
|
|
237
251
|
}
|
|
238
252
|
/**
|
|
239
253
|
* Execute a command
|
|
@@ -315,7 +329,7 @@ class un {
|
|
|
315
329
|
return this.isDestroyed;
|
|
316
330
|
}
|
|
317
331
|
}
|
|
318
|
-
class
|
|
332
|
+
class hn {
|
|
319
333
|
constructor(t, e, o) {
|
|
320
334
|
this.overflowUnits = [], this.overflowUnitHomes = /* @__PURE__ */ new WeakMap(), this.expandedOpen = !1, this.onDocumentPointerDownForOverflow = (r) => {
|
|
321
335
|
var l, c;
|
|
@@ -410,14 +424,14 @@ class pn {
|
|
|
410
424
|
const p = [];
|
|
411
425
|
c.split(/\s+/).filter(Boolean).forEach((g) => {
|
|
412
426
|
if (g === "direction") {
|
|
413
|
-
const
|
|
414
|
-
|
|
427
|
+
const v = a.get("setDirectionLTR"), T = a.get("setDirectionRTL");
|
|
428
|
+
v && p.push({
|
|
415
429
|
id: "directionLTR",
|
|
416
|
-
label:
|
|
417
|
-
command:
|
|
418
|
-
icon:
|
|
419
|
-
type:
|
|
420
|
-
options:
|
|
430
|
+
label: v.label,
|
|
431
|
+
command: v.command,
|
|
432
|
+
icon: v.icon,
|
|
433
|
+
type: v.type || "button",
|
|
434
|
+
options: v.options
|
|
421
435
|
}), T && p.push({
|
|
422
436
|
id: "directionRTL",
|
|
423
437
|
label: T.label,
|
|
@@ -429,14 +443,14 @@ class pn {
|
|
|
429
443
|
return;
|
|
430
444
|
}
|
|
431
445
|
if (g === "comments") {
|
|
432
|
-
const
|
|
433
|
-
|
|
446
|
+
const v = a.get("addComment"), T = a.get("toggleComments");
|
|
447
|
+
v && p.push({
|
|
434
448
|
id: "addComment",
|
|
435
|
-
label:
|
|
436
|
-
command:
|
|
437
|
-
icon:
|
|
438
|
-
type:
|
|
439
|
-
options:
|
|
449
|
+
label: v.label,
|
|
450
|
+
command: v.command,
|
|
451
|
+
icon: v.icon,
|
|
452
|
+
type: v.type || "button",
|
|
453
|
+
options: v.options
|
|
440
454
|
}), T && p.push({
|
|
441
455
|
id: "toggleComments",
|
|
442
456
|
label: T.label,
|
|
@@ -502,24 +516,24 @@ class pn {
|
|
|
502
516
|
const c = this.overflowUnits;
|
|
503
517
|
if (c.length === 0) return;
|
|
504
518
|
c.forEach((B) => {
|
|
505
|
-
var
|
|
506
|
-
B.parentElement === r && ((
|
|
519
|
+
var P;
|
|
520
|
+
B.parentElement === r && ((P = this.overflowUnitHomes.get(B)) == null || P.appendChild(B));
|
|
507
521
|
});
|
|
508
|
-
const p = t.clientWidth, m = 16, g = 40, w = 4, k = Math.max(0, p - m),
|
|
509
|
-
const
|
|
510
|
-
return T ? et.right -
|
|
522
|
+
const p = t.clientWidth, m = 16, g = 40, w = 4, k = Math.max(0, p - m), v = Math.max(0, k - g - w), T = getComputedStyle(t).direction === "rtl", et = e.getBoundingClientRect(), G = (B) => {
|
|
523
|
+
const P = B.getBoundingClientRect();
|
|
524
|
+
return T ? et.right - P.left : P.right - et.left;
|
|
511
525
|
};
|
|
512
526
|
let z = 0;
|
|
513
527
|
if (G(c[c.length - 1]) <= k)
|
|
514
528
|
z = c.length;
|
|
515
529
|
else
|
|
516
530
|
for (const B of c)
|
|
517
|
-
if (G(B) <=
|
|
531
|
+
if (G(B) <= v) z++;
|
|
518
532
|
else break;
|
|
519
533
|
z = Math.max(1, Math.min(z, c.length));
|
|
520
534
|
const st = z < c.length;
|
|
521
|
-
o.style.display = st ? "" : "none", o.classList.toggle("active", st && this.expandedOpen), !st && this.expandedOpen && this.setExpandedOpen(!1), c.forEach((B,
|
|
522
|
-
|
|
535
|
+
o.style.display = st ? "" : "none", o.classList.toggle("active", st && this.expandedOpen), !st && this.expandedOpen && this.setExpandedOpen(!1), c.forEach((B, P) => {
|
|
536
|
+
P >= z && r.appendChild(B);
|
|
523
537
|
});
|
|
524
538
|
}, l = () => {
|
|
525
539
|
this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), this.overflowRafId = requestAnimationFrame(a);
|
|
@@ -629,8 +643,8 @@ class pn {
|
|
|
629
643
|
}), o.addEventListener("keydown", (m) => {
|
|
630
644
|
const g = a();
|
|
631
645
|
if (g.length === 0) return;
|
|
632
|
-
const w = g.indexOf(document.activeElement), k = (
|
|
633
|
-
m.preventDefault(), g[(
|
|
646
|
+
const w = g.indexOf(document.activeElement), k = (v) => {
|
|
647
|
+
m.preventDefault(), g[(v + g.length) % g.length].focus();
|
|
634
648
|
};
|
|
635
649
|
switch (m.key) {
|
|
636
650
|
case "ArrowDown":
|
|
@@ -745,7 +759,7 @@ class pn {
|
|
|
745
759
|
}), 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;
|
|
746
760
|
}
|
|
747
761
|
}
|
|
748
|
-
class
|
|
762
|
+
class mn {
|
|
749
763
|
constructor(t) {
|
|
750
764
|
this.visible = !1, this.config = t;
|
|
751
765
|
}
|
|
@@ -787,7 +801,7 @@ class fn {
|
|
|
787
801
|
this.container && this.container.parentNode && this.container.parentNode.removeChild(this.container), this.container = void 0, this.visible = !1;
|
|
788
802
|
}
|
|
789
803
|
}
|
|
790
|
-
class
|
|
804
|
+
class gn {
|
|
791
805
|
constructor(t = {}) {
|
|
792
806
|
this.statusInfo = {}, this.config = t;
|
|
793
807
|
}
|
|
@@ -847,12 +861,12 @@ class hn {
|
|
|
847
861
|
this.container && this.container.parentNode && this.container.parentNode.removeChild(this.container), this.container = void 0;
|
|
848
862
|
}
|
|
849
863
|
}
|
|
850
|
-
function
|
|
851
|
-
const e = n.textContent || "", o =
|
|
864
|
+
function bn(n, t) {
|
|
865
|
+
const e = n.textContent || "", o = yn(n, t.startContainer, t.startOffset), a = e.substring(0, o).split(`
|
|
852
866
|
`), l = a.length, c = a[a.length - 1].length + 1;
|
|
853
867
|
return { line: l, column: c };
|
|
854
868
|
}
|
|
855
|
-
function
|
|
869
|
+
function yn(n, t, e) {
|
|
856
870
|
var l;
|
|
857
871
|
let o = 0;
|
|
858
872
|
const r = document.createTreeWalker(
|
|
@@ -870,7 +884,7 @@ function gn(n, t, e) {
|
|
|
870
884
|
}
|
|
871
885
|
return o;
|
|
872
886
|
}
|
|
873
|
-
function
|
|
887
|
+
function En(n) {
|
|
874
888
|
var o, r;
|
|
875
889
|
const t = n.querySelectorAll("div, p, br, h1, h2, h3, h4, h5, h6, blockquote, li, pre");
|
|
876
890
|
let e = 1;
|
|
@@ -885,11 +899,11 @@ function bn(n) {
|
|
|
885
899
|
}
|
|
886
900
|
return e;
|
|
887
901
|
}
|
|
888
|
-
function
|
|
902
|
+
function vn(n) {
|
|
889
903
|
const t = n.trim() ? n.trim().split(/\s+/).length : 0, e = n.length;
|
|
890
904
|
return { words: t, chars: e };
|
|
891
905
|
}
|
|
892
|
-
function
|
|
906
|
+
function wn(n, t) {
|
|
893
907
|
const e = n.toString();
|
|
894
908
|
return {
|
|
895
909
|
startLine: t.line,
|
|
@@ -901,7 +915,7 @@ function vn(n, t) {
|
|
|
901
915
|
selectedWords: e.trim().split(/\s+/).filter(Boolean).length
|
|
902
916
|
};
|
|
903
917
|
}
|
|
904
|
-
class
|
|
918
|
+
class kn {
|
|
905
919
|
constructor(t) {
|
|
906
920
|
this.shortcuts = /* @__PURE__ */ new Map(), this.enabled = !0, this.isMac = typeof navigator != "undefined" && navigator.platform.toUpperCase().indexOf("MAC") >= 0, (t == null ? void 0 : t.enabled) === !1 && (this.enabled = !1), this.registerDefaultShortcuts(), t != null && t.shortcuts && t.shortcuts.forEach((e) => this.registerShortcut(e)), t != null && t.customShortcuts && Object.values(t.customShortcuts).forEach((e) => {
|
|
907
921
|
this.registerShortcut(e);
|
|
@@ -1236,15 +1250,15 @@ class En {
|
|
|
1236
1250
|
return t.includes("toggle") && (t.includes("Bold") || t.includes("Italic") || t.includes("Underline") || t.includes("Strike") || t.includes("Code") || t.includes("Super") || t.includes("Sub")) ? "Text Formatting" : t.includes("Heading") || t.includes("Paragraph") ? "Block Formatting" : t.includes("List") || t.includes("Checklist") ? "Lists" : t.includes("Alignment") || t.includes("Indent") ? "Alignment & Indentation" : t.includes("undo") || t.includes("redo") ? "History" : t.includes("insert") ? "Insert" : t.includes("find") || t.includes("replace") ? "Find & Replace" : t.includes("Accessibility") || t.includes("spell") ? "Tools" : "Other";
|
|
1237
1251
|
}
|
|
1238
1252
|
}
|
|
1239
|
-
function
|
|
1253
|
+
function ao(n, t) {
|
|
1240
1254
|
(t == null || t > n.length) && (t = n.length);
|
|
1241
1255
|
for (var e = 0, o = Array(t); e < t; e++) o[e] = n[e];
|
|
1242
1256
|
return o;
|
|
1243
1257
|
}
|
|
1244
|
-
function
|
|
1258
|
+
function Tn(n) {
|
|
1245
1259
|
if (Array.isArray(n)) return n;
|
|
1246
1260
|
}
|
|
1247
|
-
function
|
|
1261
|
+
function Cn(n, t) {
|
|
1248
1262
|
var e = n == null ? null : typeof Symbol != "undefined" && n[Symbol.iterator] || n["@@iterator"];
|
|
1249
1263
|
if (e != null) {
|
|
1250
1264
|
var o, r, a, l, c = [], p = !0, m = !1;
|
|
@@ -1262,29 +1276,29 @@ function kn(n, t) {
|
|
|
1262
1276
|
return c;
|
|
1263
1277
|
}
|
|
1264
1278
|
}
|
|
1265
|
-
function
|
|
1279
|
+
function xn() {
|
|
1266
1280
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1267
1281
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1268
1282
|
}
|
|
1269
|
-
function xn(n, t) {
|
|
1270
|
-
return wn(n) || kn(n, t) || An(n, t) || Tn();
|
|
1271
|
-
}
|
|
1272
1283
|
function An(n, t) {
|
|
1284
|
+
return Tn(n) || Cn(n, t) || Sn(n, t) || xn();
|
|
1285
|
+
}
|
|
1286
|
+
function Sn(n, t) {
|
|
1273
1287
|
if (n) {
|
|
1274
|
-
if (typeof n == "string") return
|
|
1288
|
+
if (typeof n == "string") return ao(n, t);
|
|
1275
1289
|
var e = {}.toString.call(n).slice(8, -1);
|
|
1276
|
-
return e === "Object" && n.constructor && (e = n.constructor.name), e === "Map" || e === "Set" ? Array.from(n) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ?
|
|
1290
|
+
return e === "Object" && n.constructor && (e = n.constructor.name), e === "Map" || e === "Set" ? Array.from(n) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? ao(n, t) : void 0;
|
|
1277
1291
|
}
|
|
1278
1292
|
}
|
|
1279
|
-
const
|
|
1280
|
-
let M = Object.freeze,
|
|
1293
|
+
const Lo = Object.entries, so = Object.setPrototypeOf, _n = Object.isFrozen, Ln = Object.getPrototypeOf, Mn = Object.getOwnPropertyDescriptor;
|
|
1294
|
+
let M = Object.freeze, D = Object.seal, Et = Object.create, Mo = typeof Reflect != "undefined" && Reflect, Ce = Mo.apply, xe = Mo.construct;
|
|
1281
1295
|
M || (M = function(t) {
|
|
1282
1296
|
return t;
|
|
1283
1297
|
});
|
|
1284
|
-
|
|
1298
|
+
D || (D = function(t) {
|
|
1285
1299
|
return t;
|
|
1286
1300
|
});
|
|
1287
|
-
|
|
1301
|
+
Ce || (Ce = function(t, e) {
|
|
1288
1302
|
for (var o = arguments.length, r = new Array(o > 2 ? o - 2 : 0), a = 2; a < o; a++) r[a - 2] = arguments[a];
|
|
1289
1303
|
return t.apply(e, r);
|
|
1290
1304
|
});
|
|
@@ -1292,97 +1306,97 @@ xe || (xe = function(t) {
|
|
|
1292
1306
|
for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) o[r - 1] = arguments[r];
|
|
1293
1307
|
return new t(...o);
|
|
1294
1308
|
});
|
|
1295
|
-
const at =
|
|
1296
|
-
function
|
|
1309
|
+
const at = L(Array.prototype.forEach), Dn = L(Array.prototype.lastIndexOf), lo = L(Array.prototype.pop), At = L(Array.prototype.push), In = L(Array.prototype.splice), vt = Array.isArray, Mt = L(String.prototype.toLowerCase), me = L(String.prototype.toString), co = L(String.prototype.match), St = L(String.prototype.replace), uo = L(String.prototype.indexOf), Pn = L(String.prototype.trim), On = L(Number.prototype.toString), Rn = L(Boolean.prototype.toString), po = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), fo = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), N = L(Object.prototype.hasOwnProperty), _t = L(Object.prototype.toString), I = L(RegExp.prototype.test), Z = Nn(TypeError);
|
|
1310
|
+
function L(n) {
|
|
1297
1311
|
return function(t) {
|
|
1298
1312
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
1299
1313
|
for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) o[r - 1] = arguments[r];
|
|
1300
|
-
return
|
|
1314
|
+
return Ce(n, t, o);
|
|
1301
1315
|
};
|
|
1302
1316
|
}
|
|
1303
|
-
function
|
|
1317
|
+
function Nn(n) {
|
|
1304
1318
|
return function() {
|
|
1305
1319
|
for (var t = arguments.length, e = new Array(t), o = 0; o < t; o++) e[o] = arguments[o];
|
|
1306
1320
|
return xe(n, e);
|
|
1307
1321
|
};
|
|
1308
1322
|
}
|
|
1309
|
-
function
|
|
1323
|
+
function E(n, t) {
|
|
1310
1324
|
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Mt;
|
|
1311
|
-
if (
|
|
1325
|
+
if (so && so(n, null), !vt(t)) return n;
|
|
1312
1326
|
let o = t.length;
|
|
1313
1327
|
for (; o--; ) {
|
|
1314
1328
|
let r = t[o];
|
|
1315
1329
|
if (typeof r == "string") {
|
|
1316
1330
|
const a = e(r);
|
|
1317
|
-
a !== r && (
|
|
1331
|
+
a !== r && (_n(t) || (t[o] = a), r = a);
|
|
1318
1332
|
}
|
|
1319
1333
|
n[r] = !0;
|
|
1320
1334
|
}
|
|
1321
1335
|
return n;
|
|
1322
1336
|
}
|
|
1323
|
-
function
|
|
1337
|
+
function zn(n) {
|
|
1324
1338
|
for (let t = 0; t < n.length; t++) N(n, t) || (n[t] = null);
|
|
1325
1339
|
return n;
|
|
1326
1340
|
}
|
|
1327
1341
|
function U(n) {
|
|
1328
|
-
const t =
|
|
1329
|
-
for (const o of
|
|
1330
|
-
var e =
|
|
1342
|
+
const t = Et(null);
|
|
1343
|
+
for (const o of Lo(n)) {
|
|
1344
|
+
var e = An(o, 2);
|
|
1331
1345
|
const r = e[0], a = e[1];
|
|
1332
|
-
N(n, r) && (vt(a) ? t[r] =
|
|
1346
|
+
N(n, r) && (vt(a) ? t[r] = zn(a) : a && typeof a == "object" && a.constructor === Object ? t[r] = U(a) : t[r] = a);
|
|
1333
1347
|
}
|
|
1334
1348
|
return t;
|
|
1335
1349
|
}
|
|
1336
|
-
function
|
|
1350
|
+
function Bn(n) {
|
|
1337
1351
|
switch (typeof n) {
|
|
1338
1352
|
case "string":
|
|
1339
1353
|
return n;
|
|
1340
1354
|
case "number":
|
|
1341
|
-
return
|
|
1355
|
+
return On(n);
|
|
1342
1356
|
case "boolean":
|
|
1343
|
-
return
|
|
1357
|
+
return Rn(n);
|
|
1344
1358
|
case "bigint":
|
|
1345
|
-
return
|
|
1359
|
+
return po ? po(n) : "0";
|
|
1346
1360
|
case "symbol":
|
|
1347
|
-
return
|
|
1361
|
+
return fo ? fo(n) : "Symbol()";
|
|
1348
1362
|
case "undefined":
|
|
1349
|
-
return
|
|
1363
|
+
return _t(n);
|
|
1350
1364
|
case "function":
|
|
1351
1365
|
case "object": {
|
|
1352
|
-
if (n === null) return
|
|
1366
|
+
if (n === null) return _t(n);
|
|
1353
1367
|
const t = n, e = W(t, "toString");
|
|
1354
1368
|
if (typeof e == "function") {
|
|
1355
1369
|
const o = e(t);
|
|
1356
|
-
return typeof o == "string" ? o :
|
|
1370
|
+
return typeof o == "string" ? o : _t(o);
|
|
1357
1371
|
}
|
|
1358
|
-
return
|
|
1372
|
+
return _t(n);
|
|
1359
1373
|
}
|
|
1360
1374
|
default:
|
|
1361
|
-
return
|
|
1375
|
+
return _t(n);
|
|
1362
1376
|
}
|
|
1363
1377
|
}
|
|
1364
1378
|
function W(n, t) {
|
|
1365
1379
|
for (; n !== null; ) {
|
|
1366
|
-
const o =
|
|
1380
|
+
const o = Mn(n, t);
|
|
1367
1381
|
if (o) {
|
|
1368
|
-
if (o.get) return
|
|
1369
|
-
if (typeof o.value == "function") return
|
|
1382
|
+
if (o.get) return L(o.get);
|
|
1383
|
+
if (typeof o.value == "function") return L(o.value);
|
|
1370
1384
|
}
|
|
1371
|
-
n =
|
|
1385
|
+
n = Ln(n);
|
|
1372
1386
|
}
|
|
1373
1387
|
function e() {
|
|
1374
1388
|
return null;
|
|
1375
1389
|
}
|
|
1376
1390
|
return e;
|
|
1377
1391
|
}
|
|
1378
|
-
function
|
|
1392
|
+
function Fn(n) {
|
|
1379
1393
|
try {
|
|
1380
|
-
return
|
|
1394
|
+
return I(n, ""), !0;
|
|
1381
1395
|
} catch (t) {
|
|
1382
1396
|
return !1;
|
|
1383
1397
|
}
|
|
1384
1398
|
}
|
|
1385
|
-
const
|
|
1399
|
+
const ho = M([
|
|
1386
1400
|
"a",
|
|
1387
1401
|
"abbr",
|
|
1388
1402
|
"acronym",
|
|
@@ -1576,7 +1590,7 @@ const fo = M([
|
|
|
1576
1590
|
"feSpotLight",
|
|
1577
1591
|
"feTile",
|
|
1578
1592
|
"feTurbulence"
|
|
1579
|
-
]),
|
|
1593
|
+
]), Hn = M([
|
|
1580
1594
|
"animate",
|
|
1581
1595
|
"color-profile",
|
|
1582
1596
|
"cursor",
|
|
@@ -1630,7 +1644,7 @@ const fo = M([
|
|
|
1630
1644
|
"munder",
|
|
1631
1645
|
"munderover",
|
|
1632
1646
|
"mprescripts"
|
|
1633
|
-
]),
|
|
1647
|
+
]), Un = M([
|
|
1634
1648
|
"maction",
|
|
1635
1649
|
"maligngroup",
|
|
1636
1650
|
"malignmark",
|
|
@@ -1646,7 +1660,7 @@ const fo = M([
|
|
|
1646
1660
|
"annotation-xml",
|
|
1647
1661
|
"mprescripts",
|
|
1648
1662
|
"none"
|
|
1649
|
-
]),
|
|
1663
|
+
]), mo = M(["#text"]), go = M([
|
|
1650
1664
|
"accept",
|
|
1651
1665
|
"action",
|
|
1652
1666
|
"align",
|
|
@@ -1765,7 +1779,7 @@ const fo = M([
|
|
|
1765
1779
|
"width",
|
|
1766
1780
|
"wrap",
|
|
1767
1781
|
"xmlns"
|
|
1768
|
-
]),
|
|
1782
|
+
]), Ee = M([
|
|
1769
1783
|
"accent-height",
|
|
1770
1784
|
"accumulate",
|
|
1771
1785
|
"additive",
|
|
@@ -1958,7 +1972,7 @@ const fo = M([
|
|
|
1958
1972
|
"y2",
|
|
1959
1973
|
"z",
|
|
1960
1974
|
"zoomandpan"
|
|
1961
|
-
]),
|
|
1975
|
+
]), bo = M([
|
|
1962
1976
|
"accent",
|
|
1963
1977
|
"accentunder",
|
|
1964
1978
|
"align",
|
|
@@ -2019,7 +2033,7 @@ const fo = M([
|
|
|
2019
2033
|
"xlink:title",
|
|
2020
2034
|
"xml:space",
|
|
2021
2035
|
"xmlns:xlink"
|
|
2022
|
-
]),
|
|
2036
|
+
]), jn = D(/{{[\w\W]*|^[\w\W]*}}/g), Wn = D(/<%[\w\W]*|^[\w\W]*%>/g), $n = D(/\${[\w\W]*/g), Gn = D(/^data-[\-\w.\u00B7-\uFFFF]+$/), Kn = D(/^aria-[\-\w]+$/), yo = D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), qn = D(/^(?:\w+script|data):/i), Yn = D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Vn = D(/^html$/i), Xn = D(/^[a-z][.\w]*(-[.\w]+)+$/i), Eo = D(/<[/\w!]/g), vo = D(/<[/\w]/g), Qn = D(/<\/no(script|embed|frames)/i), Zn = D(/\/>/i), H = {
|
|
2023
2037
|
element: 1,
|
|
2024
2038
|
attribute: 2,
|
|
2025
2039
|
text: 3,
|
|
@@ -2032,7 +2046,7 @@ const fo = M([
|
|
|
2032
2046
|
documentType: 10,
|
|
2033
2047
|
documentFragment: 11,
|
|
2034
2048
|
notation: 12
|
|
2035
|
-
},
|
|
2049
|
+
}, Do = [
|
|
2036
2050
|
"style",
|
|
2037
2051
|
"script",
|
|
2038
2052
|
"xmp",
|
|
@@ -2041,14 +2055,14 @@ const fo = M([
|
|
|
2041
2055
|
"noframes",
|
|
2042
2056
|
"plaintext",
|
|
2043
2057
|
"noscript"
|
|
2044
|
-
],
|
|
2058
|
+
], Jn = M(E({}, Do)), ti = (function() {
|
|
2045
2059
|
const n = {};
|
|
2046
|
-
return at(
|
|
2047
|
-
n[t] =
|
|
2060
|
+
return at(Do, (t) => {
|
|
2061
|
+
n[t] = D(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
2048
2062
|
}), M(n);
|
|
2049
|
-
})(),
|
|
2063
|
+
})(), ei = function() {
|
|
2050
2064
|
return typeof window == "undefined" ? null : window;
|
|
2051
|
-
},
|
|
2065
|
+
}, oi = function(t, e) {
|
|
2052
2066
|
if (typeof t != "object" || typeof t.createPolicy != "function") return null;
|
|
2053
2067
|
let o = null;
|
|
2054
2068
|
const r = "data-tt-policy-suffix";
|
|
@@ -2066,7 +2080,7 @@ const fo = M([
|
|
|
2066
2080
|
} catch (l) {
|
|
2067
2081
|
return console.warn("TrustedTypes policy " + a + " could not be created."), null;
|
|
2068
2082
|
}
|
|
2069
|
-
},
|
|
2083
|
+
}, wo = function() {
|
|
2070
2084
|
return {
|
|
2071
2085
|
afterSanitizeAttributes: [],
|
|
2072
2086
|
afterSanitizeElements: [],
|
|
@@ -2078,15 +2092,15 @@ const fo = M([
|
|
|
2078
2092
|
uponSanitizeElement: [],
|
|
2079
2093
|
uponSanitizeShadowNode: []
|
|
2080
2094
|
};
|
|
2081
|
-
},
|
|
2082
|
-
return N(t, e) && vt(t[e]) ?
|
|
2083
|
-
},
|
|
2095
|
+
}, J = function(t, e, o, r) {
|
|
2096
|
+
return N(t, e) && vt(t[e]) ? E(r.base ? U(r.base) : {}, t[e], r.transform) : o;
|
|
2097
|
+
}, ve = function(t, e, o) {
|
|
2084
2098
|
const r = N(t, e) ? t[e] : void 0;
|
|
2085
2099
|
return r && typeof r == "object" ? U(r) : o();
|
|
2086
2100
|
};
|
|
2087
|
-
function
|
|
2088
|
-
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
2089
|
-
const t = (u) =>
|
|
2101
|
+
function Io() {
|
|
2102
|
+
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ei();
|
|
2103
|
+
const t = (u) => Io(u);
|
|
2090
2104
|
if (t.version = "3.4.16", t.removed = [], !n || !n.document || n.document.nodeType !== H.document || !n.Element)
|
|
2091
2105
|
return t.isSupported = !1, t;
|
|
2092
2106
|
let e = n.document;
|
|
@@ -2094,54 +2108,54 @@ function Mo() {
|
|
|
2094
2108
|
n.DocumentFragment;
|
|
2095
2109
|
const a = n.HTMLTemplateElement, l = n.Node, c = n.Element, p = n.NodeFilter;
|
|
2096
2110
|
n.NamedNodeMap === void 0 && (n.NamedNodeMap || n.MozNamedAttrMap), n.HTMLFormElement;
|
|
2097
|
-
const m = n.DOMParser, g = n.trustedTypes, w = c.prototype, k = W(w, "cloneNode"),
|
|
2098
|
-
return
|
|
2099
|
-
},
|
|
2111
|
+
const m = n.DOMParser, g = n.trustedTypes, w = c.prototype, k = W(w, "cloneNode"), v = W(w, "remove"), T = W(w, "removeAttributeNode"), et = W(w, "nextSibling"), G = W(w, "childNodes"), z = W(w, "parentNode"), st = W(w, "shadowRoot"), B = W(w, "attributes"), P = l && l.prototype ? W(l.prototype, "nodeType") : null, lt = l && l.prototype ? W(l.prototype, "nodeName") : null, Dt = l && l.prototype ? W(l.prototype, "ownerDocument") : null, wt = function(i) {
|
|
2112
|
+
return P ? P(i) : i.nodeType;
|
|
2113
|
+
}, Qt = function(i) {
|
|
2100
2114
|
return lt ? lt(i) : i.nodeName;
|
|
2101
2115
|
};
|
|
2102
2116
|
if (typeof a == "function") {
|
|
2103
2117
|
const u = e.createElement("template");
|
|
2104
2118
|
u.content && u.content.ownerDocument && (e = u.content.ownerDocument);
|
|
2105
2119
|
}
|
|
2106
|
-
let R, ot = "",
|
|
2120
|
+
let R, ot = "", Zt, _e = !1, kt = 0;
|
|
2107
2121
|
const Le = function() {
|
|
2108
|
-
if (
|
|
2122
|
+
if (kt > 0) throw Z('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
2109
2123
|
}, ct = function(i) {
|
|
2110
|
-
Le(),
|
|
2124
|
+
Le(), kt++;
|
|
2111
2125
|
try {
|
|
2112
2126
|
return R.createHTML(i);
|
|
2113
2127
|
} finally {
|
|
2114
|
-
|
|
2128
|
+
kt--;
|
|
2115
2129
|
}
|
|
2116
|
-
},
|
|
2117
|
-
Le(),
|
|
2130
|
+
}, Ro = function(i) {
|
|
2131
|
+
Le(), kt++;
|
|
2118
2132
|
try {
|
|
2119
2133
|
return R.createScriptURL(i);
|
|
2120
2134
|
} finally {
|
|
2121
|
-
|
|
2135
|
+
kt--;
|
|
2122
2136
|
}
|
|
2123
|
-
},
|
|
2124
|
-
return
|
|
2125
|
-
},
|
|
2126
|
-
let
|
|
2127
|
-
t.isSupported = typeof
|
|
2128
|
-
const
|
|
2129
|
-
let Ie =
|
|
2130
|
-
const te =
|
|
2131
|
-
...
|
|
2137
|
+
}, No = function() {
|
|
2138
|
+
return _e || (Zt = oi(g, r), _e = !0), Zt;
|
|
2139
|
+
}, It = e, Jt = It.implementation, Me = It.createNodeIterator, zo = It.createDocumentFragment, Bo = It.getElementsByTagName, Fo = o.importNode;
|
|
2140
|
+
let C = wo();
|
|
2141
|
+
t.isSupported = typeof Lo == "function" && typeof z == "function" && Jt && Jt.createHTMLDocument !== void 0;
|
|
2142
|
+
const Ho = jn, Uo = Wn, jo = $n, Wo = Gn, $o = Kn, Go = qn, De = Yn, Ko = Xn;
|
|
2143
|
+
let Ie = yo, x = null;
|
|
2144
|
+
const te = E({}, [
|
|
2145
|
+
...ho,
|
|
2132
2146
|
...ge,
|
|
2133
2147
|
...be,
|
|
2134
2148
|
...ye,
|
|
2135
|
-
...
|
|
2149
|
+
...mo
|
|
2136
2150
|
]);
|
|
2137
|
-
let
|
|
2138
|
-
const ee =
|
|
2139
|
-
...mo,
|
|
2140
|
-
...ve,
|
|
2151
|
+
let A = null;
|
|
2152
|
+
const ee = E({}, [
|
|
2141
2153
|
...go,
|
|
2154
|
+
...Ee,
|
|
2155
|
+
...bo,
|
|
2142
2156
|
...Gt
|
|
2143
2157
|
]);
|
|
2144
|
-
let K = Object.seal(
|
|
2158
|
+
let K = Object.seal(Et(null, {
|
|
2145
2159
|
tagNameCheck: {
|
|
2146
2160
|
writable: !0,
|
|
2147
2161
|
configurable: !1,
|
|
@@ -2160,8 +2174,8 @@ function Mo() {
|
|
|
2160
2174
|
enumerable: !0,
|
|
2161
2175
|
value: !1
|
|
2162
2176
|
}
|
|
2163
|
-
})),
|
|
2164
|
-
const V = Object.seal(
|
|
2177
|
+
})), Tt = null, Pe = null;
|
|
2178
|
+
const V = Object.seal(Et(null, {
|
|
2165
2179
|
tagCheck: {
|
|
2166
2180
|
writable: !0,
|
|
2167
2181
|
configurable: !1,
|
|
@@ -2175,10 +2189,10 @@ function Mo() {
|
|
|
2175
2189
|
value: null
|
|
2176
2190
|
}
|
|
2177
2191
|
}));
|
|
2178
|
-
let
|
|
2179
|
-
const
|
|
2192
|
+
let Oe = !0, oe = !0, Re = !1, Ne = !0, X = !1, nt = !0, it = !1, ne = !1, Pt = null, Ot = null, ie = !1, dt = !1, Rt = !1, Nt = !1, ze = !0, Be = !1;
|
|
2193
|
+
const Fe = "user-content-";
|
|
2180
2194
|
let re = !0, ae = !1, ut = {}, pt = null;
|
|
2181
|
-
const
|
|
2195
|
+
const He = E({}, [
|
|
2182
2196
|
"annotation-xml",
|
|
2183
2197
|
"audio",
|
|
2184
2198
|
"colgroup",
|
|
@@ -2206,8 +2220,8 @@ function Mo() {
|
|
|
2206
2220
|
"video",
|
|
2207
2221
|
"xmp"
|
|
2208
2222
|
]);
|
|
2209
|
-
let
|
|
2210
|
-
const
|
|
2223
|
+
let Ue = null;
|
|
2224
|
+
const je = E({}, [
|
|
2211
2225
|
"audio",
|
|
2212
2226
|
"video",
|
|
2213
2227
|
"img",
|
|
@@ -2215,8 +2229,8 @@ function Mo() {
|
|
|
2215
2229
|
"image",
|
|
2216
2230
|
"track"
|
|
2217
2231
|
]);
|
|
2218
|
-
let
|
|
2219
|
-
const
|
|
2232
|
+
let We = null;
|
|
2233
|
+
const $e = E({}, [
|
|
2220
2234
|
"alt",
|
|
2221
2235
|
"class",
|
|
2222
2236
|
"for",
|
|
@@ -2233,50 +2247,50 @@ function Mo() {
|
|
|
2233
2247
|
"xmlns"
|
|
2234
2248
|
]), zt = "http://www.w3.org/1998/Math/MathML", Bt = "http://www.w3.org/2000/svg", q = "http://www.w3.org/1999/xhtml";
|
|
2235
2249
|
let ft = q, se = !1, le = null;
|
|
2236
|
-
const
|
|
2250
|
+
const qo = E({}, [
|
|
2237
2251
|
zt,
|
|
2238
2252
|
Bt,
|
|
2239
2253
|
q
|
|
2240
|
-
], me),
|
|
2254
|
+
], me), Ge = M([
|
|
2241
2255
|
"mi",
|
|
2242
2256
|
"mo",
|
|
2243
2257
|
"mn",
|
|
2244
2258
|
"ms",
|
|
2245
2259
|
"mtext"
|
|
2246
2260
|
]);
|
|
2247
|
-
let ce =
|
|
2248
|
-
const
|
|
2249
|
-
let de =
|
|
2250
|
-
const
|
|
2261
|
+
let ce = E({}, Ge);
|
|
2262
|
+
const Ke = M(["annotation-xml"]);
|
|
2263
|
+
let de = E({}, Ke);
|
|
2264
|
+
const Yo = E({}, [
|
|
2251
2265
|
"title",
|
|
2252
2266
|
"style",
|
|
2253
2267
|
"font",
|
|
2254
2268
|
"a",
|
|
2255
2269
|
"script"
|
|
2256
2270
|
]);
|
|
2257
|
-
let
|
|
2258
|
-
const
|
|
2259
|
-
let
|
|
2260
|
-
const
|
|
2271
|
+
let Ct = null;
|
|
2272
|
+
const Vo = ["application/xhtml+xml", "text/html"], Xo = "text/html";
|
|
2273
|
+
let _ = null, ht = null;
|
|
2274
|
+
const Qo = e.createElement("form"), qe = function(i) {
|
|
2261
2275
|
return i instanceof RegExp || i instanceof Function;
|
|
2262
2276
|
}, ue = function() {
|
|
2263
2277
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2264
2278
|
if (ht && ht === i) return;
|
|
2265
|
-
(!i || typeof i != "object") && (i = {}), i = U(i),
|
|
2266
|
-
transform:
|
|
2267
|
-
base:
|
|
2268
|
-
}),
|
|
2269
|
-
transform:
|
|
2270
|
-
base:
|
|
2271
|
-
}), pt =
|
|
2272
|
-
const s =
|
|
2273
|
-
if (K =
|
|
2279
|
+
(!i || typeof i != "object") && (i = {}), i = U(i), Ct = Vo.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? Xo : i.PARSER_MEDIA_TYPE, _ = Ct === "application/xhtml+xml" ? me : Mt, x = J(i, "ALLOWED_TAGS", te, { transform: _ }), A = J(i, "ALLOWED_ATTR", ee, { transform: _ }), le = J(i, "ALLOWED_NAMESPACES", qo, { transform: me }), We = J(i, "ADD_URI_SAFE_ATTR", $e, {
|
|
2280
|
+
transform: _,
|
|
2281
|
+
base: $e
|
|
2282
|
+
}), Ue = J(i, "ADD_DATA_URI_TAGS", je, {
|
|
2283
|
+
transform: _,
|
|
2284
|
+
base: je
|
|
2285
|
+
}), pt = J(i, "FORBID_CONTENTS", He, { transform: _ }), Tt = J(i, "FORBID_TAGS", U({}), { transform: _ }), Pe = J(i, "FORBID_ATTR", U({}), { transform: _ }), ut = N(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? U(i.USE_PROFILES) : i.USE_PROFILES : !1, Oe = i.ALLOW_ARIA_ATTR !== !1, oe = i.ALLOW_DATA_ATTR !== !1, Re = i.ALLOW_UNKNOWN_PROTOCOLS || !1, Ne = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, X = i.SAFE_FOR_TEMPLATES || !1, nt = i.SAFE_FOR_XML !== !1, it = i.WHOLE_DOCUMENT || !1, dt = i.RETURN_DOM || !1, Rt = i.RETURN_DOM_FRAGMENT || !1, Nt = i.RETURN_TRUSTED_TYPE || !1, ie = i.FORCE_BODY || !1, ze = i.SANITIZE_DOM !== !1, Be = i.SANITIZE_NAMED_PROPS || !1, re = i.KEEP_CONTENT !== !1, ae = i.IN_PLACE || !1, Ie = Fn(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : yo, ft = typeof i.NAMESPACE == "string" ? i.NAMESPACE : q, ce = ve(i, "MATHML_TEXT_INTEGRATION_POINTS", () => E({}, Ge)), de = ve(i, "HTML_INTEGRATION_POINTS", () => E({}, Ke));
|
|
2286
|
+
const s = ve(i, "CUSTOM_ELEMENT_HANDLING", () => Et(null));
|
|
2287
|
+
if (K = Et(null), N(s, "tagNameCheck") && qe(s.tagNameCheck) && (K.tagNameCheck = s.tagNameCheck), N(s, "attributeNameCheck") && qe(s.attributeNameCheck) && (K.attributeNameCheck = s.attributeNameCheck), N(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), D(K), X && (oe = !1), Rt && (dt = !0), ut && (x = E({}, mo), A = Et(null), ut.html === !0 && (E(x, ho), E(A, go)), ut.svg === !0 && (E(x, ge), E(A, Ee), E(A, Gt)), ut.svgFilters === !0 && (E(x, be), E(A, Ee), E(A, Gt)), ut.mathMl === !0 && (E(x, ye), E(A, bo), E(A, Gt))), V.tagCheck = null, V.attributeCheck = null, N(i, "ADD_TAGS") && (typeof i.ADD_TAGS == "function" ? V.tagCheck = i.ADD_TAGS : vt(i.ADD_TAGS) && (x === te && (x = U(x)), E(x, i.ADD_TAGS, _))), N(i, "ADD_ATTR") && (typeof i.ADD_ATTR == "function" ? V.attributeCheck = i.ADD_ATTR : vt(i.ADD_ATTR) && (A === ee && (A = U(A)), E(A, i.ADD_ATTR, _))), N(i, "ADD_FORBID_CONTENTS") && vt(i.ADD_FORBID_CONTENTS) && (pt === He && (pt = U(pt)), E(pt, i.ADD_FORBID_CONTENTS, _)), re && (x["#text"] = !0), it && E(x, [
|
|
2274
2288
|
"html",
|
|
2275
2289
|
"head",
|
|
2276
2290
|
"body"
|
|
2277
|
-
]),
|
|
2278
|
-
if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
2279
|
-
if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
2291
|
+
]), x.table && (E(x, ["tbody"]), delete Tt.tbody), i.TRUSTED_TYPES_POLICY) {
|
|
2292
|
+
if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2293
|
+
if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
2280
2294
|
const d = R;
|
|
2281
2295
|
R = i.TRUSTED_TYPES_POLICY;
|
|
2282
2296
|
try {
|
|
@@ -2284,34 +2298,34 @@ function Mo() {
|
|
|
2284
2298
|
} catch (f) {
|
|
2285
2299
|
throw R = d, f;
|
|
2286
2300
|
}
|
|
2287
|
-
} else i.TRUSTED_TYPES_POLICY === null ? (R = void 0, ot = "") : (R === void 0 && (R =
|
|
2301
|
+
} else i.TRUSTED_TYPES_POLICY === null ? (R = void 0, ot = "") : (R === void 0 && (R = No()), R && typeof ot == "string" && (ot = ct("")));
|
|
2288
2302
|
M && M(i), ht = i;
|
|
2289
|
-
},
|
|
2303
|
+
}, Ye = E({}, [
|
|
2290
2304
|
...ge,
|
|
2291
2305
|
...be,
|
|
2292
|
-
...
|
|
2293
|
-
]),
|
|
2294
|
-
return s.namespaceURI === q ? i === "svg" : s.namespaceURI === zt ? i === "svg" && (d === "annotation-xml" || ce[d]) : !!
|
|
2295
|
-
}, Zo = function(i, s, d) {
|
|
2296
|
-
return s.namespaceURI === q ? i === "math" : s.namespaceURI === Bt ? i === "math" && de[d] : !!Ye[i];
|
|
2306
|
+
...Hn
|
|
2307
|
+
]), Ve = E({}, [...ye, ...Un]), Zo = function(i, s, d) {
|
|
2308
|
+
return s.namespaceURI === q ? i === "svg" : s.namespaceURI === zt ? i === "svg" && (d === "annotation-xml" || ce[d]) : !!Ye[i];
|
|
2297
2309
|
}, Jo = function(i, s, d) {
|
|
2298
|
-
return s.namespaceURI ===
|
|
2299
|
-
},
|
|
2310
|
+
return s.namespaceURI === q ? i === "math" : s.namespaceURI === Bt ? i === "math" && de[d] : !!Ve[i];
|
|
2311
|
+
}, tn = function(i, s, d) {
|
|
2312
|
+
return s.namespaceURI === Bt && !de[d] || s.namespaceURI === zt && !ce[d] ? !1 : !Ve[i] && (Yo[i] || !Ye[i]);
|
|
2313
|
+
}, en = function(i) {
|
|
2300
2314
|
let s = z(i);
|
|
2301
2315
|
(!s || !s.tagName) && (s = {
|
|
2302
2316
|
namespaceURI: ft,
|
|
2303
2317
|
tagName: "template"
|
|
2304
2318
|
});
|
|
2305
2319
|
const d = Mt(i.tagName), f = Mt(s.tagName);
|
|
2306
|
-
return le[i.namespaceURI] ? i.namespaceURI === Bt ?
|
|
2307
|
-
},
|
|
2320
|
+
return le[i.namespaceURI] ? i.namespaceURI === Bt ? Zo(d, s, f) : i.namespaceURI === zt ? Jo(d, s, f) : i.namespaceURI === q ? tn(d, s, f) : !!(Ct === "application/xhtml+xml" && le[i.namespaceURI]) : !1;
|
|
2321
|
+
}, Q = function(i) {
|
|
2308
2322
|
At(t.removed, { element: i });
|
|
2309
2323
|
try {
|
|
2310
2324
|
z(i).removeChild(i);
|
|
2311
2325
|
} catch (s) {
|
|
2312
|
-
if (
|
|
2326
|
+
if (v(i), !z(i)) throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
2313
2327
|
}
|
|
2314
|
-
},
|
|
2328
|
+
}, Xe = function(i, s, d) {
|
|
2315
2329
|
try {
|
|
2316
2330
|
T(i, s);
|
|
2317
2331
|
} catch (f) {
|
|
@@ -2329,7 +2343,7 @@ function Mo() {
|
|
|
2329
2343
|
At(f, h);
|
|
2330
2344
|
}), at(f, (h) => {
|
|
2331
2345
|
try {
|
|
2332
|
-
|
|
2346
|
+
v(h);
|
|
2333
2347
|
} catch (b) {
|
|
2334
2348
|
}
|
|
2335
2349
|
});
|
|
@@ -2337,7 +2351,7 @@ function Mo() {
|
|
|
2337
2351
|
const d = B(i);
|
|
2338
2352
|
if (d) for (let f = d.length - 1; f >= 0; --f) {
|
|
2339
2353
|
const h = d[f], b = h && h.name;
|
|
2340
|
-
typeof b == "string" &&
|
|
2354
|
+
typeof b == "string" && Xe(i, h, b);
|
|
2341
2355
|
}
|
|
2342
2356
|
}, rt = function(i, s, d) {
|
|
2343
2357
|
if (!d) try {
|
|
@@ -2359,46 +2373,46 @@ function Mo() {
|
|
|
2359
2373
|
}
|
|
2360
2374
|
if (i === "is")
|
|
2361
2375
|
if (dt || Rt) try {
|
|
2362
|
-
|
|
2376
|
+
Q(s);
|
|
2363
2377
|
} catch (f) {
|
|
2364
2378
|
}
|
|
2365
2379
|
else try {
|
|
2366
2380
|
s.setAttribute(i, "");
|
|
2367
2381
|
} catch (f) {
|
|
2368
2382
|
}
|
|
2369
|
-
},
|
|
2383
|
+
}, on = function(i) {
|
|
2370
2384
|
const s = B(i);
|
|
2371
2385
|
if (s)
|
|
2372
2386
|
for (let d = s.length - 1; d >= 0; --d) {
|
|
2373
2387
|
const f = s[d], h = f && f.name;
|
|
2374
|
-
typeof h != "string" ||
|
|
2388
|
+
typeof h != "string" || A[_(h)] || Xe(i, f, h);
|
|
2375
2389
|
}
|
|
2376
2390
|
}, Ht = function(i) {
|
|
2377
2391
|
const s = [i];
|
|
2378
2392
|
for (; s.length > 0; ) {
|
|
2379
2393
|
const d = s.pop();
|
|
2380
|
-
|
|
2394
|
+
wt(d) === H.element && on(d);
|
|
2381
2395
|
const f = G(d);
|
|
2382
2396
|
if (f) for (let h = f.length - 1; h >= 0; --h) s.push(f[h]);
|
|
2383
2397
|
}
|
|
2384
|
-
},
|
|
2398
|
+
}, Qe = function(i, s) {
|
|
2385
2399
|
return nt ? i === "patchsrc" ? !0 : i === "for" && s !== "label" && s !== "output" : !1;
|
|
2386
|
-
},
|
|
2400
|
+
}, nn = function(i) {
|
|
2387
2401
|
if (!nt) return;
|
|
2388
2402
|
const s = [i];
|
|
2389
2403
|
for (; s.length > 0; ) {
|
|
2390
|
-
const d = s.pop(), f =
|
|
2391
|
-
if (f === H.processingInstruction || f === H.comment &&
|
|
2404
|
+
const d = s.pop(), f = wt(d);
|
|
2405
|
+
if (f === H.processingInstruction || f === H.comment && I(vo, d.data)) {
|
|
2392
2406
|
try {
|
|
2393
|
-
|
|
2407
|
+
v(d);
|
|
2394
2408
|
} catch (b) {
|
|
2395
2409
|
}
|
|
2396
2410
|
continue;
|
|
2397
2411
|
}
|
|
2398
2412
|
if (f === H.element) {
|
|
2399
|
-
const b = d, y =
|
|
2413
|
+
const b = d, y = _(Qt(d));
|
|
2400
2414
|
try {
|
|
2401
|
-
b.hasAttribute && b.hasAttribute("patchsrc") && b.removeAttribute("patchsrc"), b.hasAttribute && b.hasAttribute("for") &&
|
|
2415
|
+
b.hasAttribute && b.hasAttribute("patchsrc") && b.removeAttribute("patchsrc"), b.hasAttribute && b.hasAttribute("for") && Qe("for", y) && b.removeAttribute("for");
|
|
2402
2416
|
} catch (S) {
|
|
2403
2417
|
}
|
|
2404
2418
|
}
|
|
@@ -2409,33 +2423,33 @@ function Mo() {
|
|
|
2409
2423
|
let s = null, d = null;
|
|
2410
2424
|
if (ie) i = "<remove></remove>" + i;
|
|
2411
2425
|
else {
|
|
2412
|
-
const b =
|
|
2426
|
+
const b = co(i, /^[\r\n\t ]+/);
|
|
2413
2427
|
d = b && b[0];
|
|
2414
2428
|
}
|
|
2415
|
-
|
|
2429
|
+
Ct === "application/xhtml+xml" && ft === q && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
|
|
2416
2430
|
const f = R ? ct(i) : i;
|
|
2417
2431
|
if (ft === q) try {
|
|
2418
|
-
s = new m().parseFromString(f,
|
|
2432
|
+
s = new m().parseFromString(f, Ct);
|
|
2419
2433
|
} catch (b) {
|
|
2420
2434
|
}
|
|
2421
2435
|
if (!s || !s.documentElement) {
|
|
2422
|
-
s =
|
|
2436
|
+
s = Jt.createDocument(ft, "template", null);
|
|
2423
2437
|
try {
|
|
2424
2438
|
s.documentElement.innerHTML = se ? ot : f;
|
|
2425
2439
|
} catch (b) {
|
|
2426
2440
|
}
|
|
2427
2441
|
}
|
|
2428
2442
|
const h = s.body || s.documentElement;
|
|
2429
|
-
return i && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ft === q ?
|
|
2443
|
+
return i && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ft === q ? Bo.call(s, it ? "html" : "body")[0] : it ? s.documentElement : h;
|
|
2430
2444
|
}, Je = function(i) {
|
|
2431
|
-
const s =
|
|
2432
|
-
return
|
|
2445
|
+
const s = Dt ? Dt(i) : i.ownerDocument;
|
|
2446
|
+
return Me.call(s || i, i, p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION, null);
|
|
2433
2447
|
}, Ut = function(i) {
|
|
2434
|
-
return i =
|
|
2448
|
+
return i = St(i, Ho, " "), i = St(i, Uo, " "), i = St(i, jo, " "), i;
|
|
2435
2449
|
}, pe = function(i) {
|
|
2436
2450
|
var s;
|
|
2437
2451
|
i.normalize();
|
|
2438
|
-
const d =
|
|
2452
|
+
const d = Dt ? Dt(i) : i.ownerDocument, f = Me.call(d || i, i, p.SHOW_TEXT | p.SHOW_COMMENT | p.SHOW_CDATA_SECTION | p.SHOW_PROCESSING_INSTRUCTION, null);
|
|
2439
2453
|
let h = f.nextNode();
|
|
2440
2454
|
for (; h; )
|
|
2441
2455
|
h.data = Ut(h.data), h = f.nextNode();
|
|
@@ -2445,18 +2459,18 @@ function Mo() {
|
|
|
2445
2459
|
});
|
|
2446
2460
|
}, jt = function(i) {
|
|
2447
2461
|
const s = lt ? lt(i) : null;
|
|
2448
|
-
return typeof s != "string" ||
|
|
2462
|
+
return typeof s != "string" || _(s) !== "form" ? !1 : typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || i.attributes !== B(i) || typeof i.removeAttribute != "function" || typeof i.removeAttributeNode != "function" || typeof i.getAttributeNode != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function" || i.nodeType !== P(i) || i.childNodes !== G(i);
|
|
2449
2463
|
}, mt = function(i) {
|
|
2450
|
-
if (!
|
|
2464
|
+
if (!P || typeof i != "object" || i === null) return !1;
|
|
2451
2465
|
try {
|
|
2452
|
-
return
|
|
2466
|
+
return P(i) === H.documentFragment;
|
|
2453
2467
|
} catch (s) {
|
|
2454
2468
|
return !1;
|
|
2455
2469
|
}
|
|
2456
2470
|
}, xt = function(i) {
|
|
2457
|
-
if (!
|
|
2471
|
+
if (!P || typeof i != "object" || i === null) return !1;
|
|
2458
2472
|
try {
|
|
2459
|
-
return typeof
|
|
2473
|
+
return typeof P(i) == "number";
|
|
2460
2474
|
} catch (s) {
|
|
2461
2475
|
return !1;
|
|
2462
2476
|
}
|
|
@@ -2466,17 +2480,17 @@ function Mo() {
|
|
|
2466
2480
|
d.call(t, i, s, ht);
|
|
2467
2481
|
});
|
|
2468
2482
|
}
|
|
2469
|
-
const
|
|
2470
|
-
return !!(nt && i.hasChildNodes() && !xt(i.firstElementChild) &&
|
|
2483
|
+
const rn = function(i, s) {
|
|
2484
|
+
return !!(nt && i.hasChildNodes() && !xt(i.firstElementChild) && I(Eo, i.textContent) && I(Eo, i.innerHTML) || nt && i.namespaceURI === q && Jn[s] && (xt(i.firstElementChild) || typeof i.textContent == "string" && I(ti[s], i.textContent)) || i.nodeType === H.processingInstruction || nt && i.nodeType === H.comment && I(vo, i.data));
|
|
2471
2485
|
}, Wt = function(i, s) {
|
|
2472
|
-
if (i instanceof RegExp) return
|
|
2486
|
+
if (i instanceof RegExp) return I(i, s);
|
|
2473
2487
|
if (i instanceof Function) {
|
|
2474
2488
|
for (var d = arguments.length, f = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++) f[h - 2] = arguments[h];
|
|
2475
2489
|
return !!i(s, ...f);
|
|
2476
2490
|
}
|
|
2477
2491
|
return !1;
|
|
2478
|
-
},
|
|
2479
|
-
if (!
|
|
2492
|
+
}, an = function(i, s, d) {
|
|
2493
|
+
if (!Tt[s] && no(s) && Wt(K.tagNameCheck, s)) return !1;
|
|
2480
2494
|
if (re && !pt[s]) {
|
|
2481
2495
|
const f = z(i), h = G(i);
|
|
2482
2496
|
if (h && f) {
|
|
@@ -2487,38 +2501,38 @@ function Mo() {
|
|
|
2487
2501
|
}
|
|
2488
2502
|
}
|
|
2489
2503
|
}
|
|
2490
|
-
return
|
|
2491
|
-
},
|
|
2504
|
+
return Q(i), !0;
|
|
2505
|
+
}, to = function(i, s, d, f) {
|
|
2492
2506
|
return i.length === 0 ? s : s === d || s === f ? U(s) : s;
|
|
2493
2507
|
}, gt = function(i, s) {
|
|
2494
2508
|
return i === s || z(i) !== null ? !1 : (ae && Ht(i), !0);
|
|
2495
|
-
},
|
|
2496
|
-
if (Y(
|
|
2509
|
+
}, eo = function(i, s) {
|
|
2510
|
+
if (Y(C.beforeSanitizeElements, i, null), gt(i, s)) return !0;
|
|
2497
2511
|
if (jt(i))
|
|
2498
|
-
return
|
|
2499
|
-
const d =
|
|
2500
|
-
if (
|
|
2512
|
+
return Q(i), !0;
|
|
2513
|
+
const d = _(Qt(i));
|
|
2514
|
+
if (x = to(C.uponSanitizeElement, x, te, Pt), Y(C.uponSanitizeElement, i, {
|
|
2501
2515
|
tagName: d,
|
|
2502
|
-
allowedTags:
|
|
2516
|
+
allowedTags: x
|
|
2503
2517
|
}), gt(i, s)) return !0;
|
|
2504
|
-
if (
|
|
2505
|
-
return
|
|
2506
|
-
if (
|
|
2507
|
-
const f =
|
|
2508
|
-
return f === !1 && (Y(
|
|
2518
|
+
if (rn(i, d))
|
|
2519
|
+
return Q(i), !0;
|
|
2520
|
+
if (Tt[d] || !(V.tagCheck instanceof Function && V.tagCheck(d)) && !x[d]) {
|
|
2521
|
+
const f = an(i, d, s);
|
|
2522
|
+
return f === !1 && (Y(C.afterSanitizeElements, i, null), gt(i, s)) ? !0 : f;
|
|
2509
2523
|
}
|
|
2510
|
-
if (
|
|
2511
|
-
return
|
|
2524
|
+
if (wt(i) === H.element && !en(i) || (d === "noscript" || d === "noembed" || d === "noframes") && I(Qn, i.innerHTML))
|
|
2525
|
+
return Q(i), !0;
|
|
2512
2526
|
if (X && i.nodeType === H.text) {
|
|
2513
2527
|
const f = Ut(i.textContent);
|
|
2514
2528
|
i.textContent !== f && (At(t.removed, { element: i.cloneNode() }), i.textContent = f);
|
|
2515
2529
|
}
|
|
2516
|
-
return Y(
|
|
2517
|
-
},
|
|
2518
|
-
if (Pe[s] ||
|
|
2519
|
-
const f =
|
|
2520
|
-
return oe &&
|
|
2521
|
-
},
|
|
2530
|
+
return Y(C.afterSanitizeElements, i, null), gt(i, s);
|
|
2531
|
+
}, oo = function(i, s, d) {
|
|
2532
|
+
if (Pe[s] || Qe(s, i) || ze && (s === "id" || s === "name") && (d in e || d in Qo)) return !1;
|
|
2533
|
+
const f = A[s] || V.attributeCheck instanceof Function && V.attributeCheck(s, i);
|
|
2534
|
+
return oe && I(Wo, s) || Oe && I($o, s) ? !0 : f ? We[s] || I(Ie, St(d, De, "")) || (s === "src" || s === "xlink:href" || s === "href") && i !== "script" && uo(d, "data:") === 0 && Ue[i] || Re && !I(Go, St(d, De, "")) ? !0 : !d : no(i) && Wt(K.tagNameCheck, i) && Wt(K.attributeNameCheck, s, i) || s === "is" && K.allowCustomizedBuiltInElements && Wt(K.tagNameCheck, d);
|
|
2535
|
+
}, sn = E({}, [
|
|
2522
2536
|
"annotation-xml",
|
|
2523
2537
|
"color-profile",
|
|
2524
2538
|
"font-face",
|
|
@@ -2527,44 +2541,44 @@ function Mo() {
|
|
|
2527
2541
|
"font-face-src",
|
|
2528
2542
|
"font-face-uri",
|
|
2529
2543
|
"missing-glyph"
|
|
2530
|
-
]),
|
|
2531
|
-
return !
|
|
2532
|
-
},
|
|
2544
|
+
]), no = function(i) {
|
|
2545
|
+
return !sn[Mt(i)] && I(Ko, i);
|
|
2546
|
+
}, ln = function(i, s, d, f) {
|
|
2533
2547
|
if (R && typeof g == "object" && typeof g.getAttributeType == "function" && !d) switch (g.getAttributeType(i, s)) {
|
|
2534
2548
|
case "TrustedHTML":
|
|
2535
2549
|
return ct(f);
|
|
2536
2550
|
case "TrustedScriptURL":
|
|
2537
|
-
return
|
|
2551
|
+
return Ro(f);
|
|
2538
2552
|
}
|
|
2539
2553
|
return f;
|
|
2540
|
-
},
|
|
2554
|
+
}, cn = function(i, s, d, f) {
|
|
2541
2555
|
try {
|
|
2542
|
-
return d ? i.setAttributeNS(d, s, f) : i.setAttribute(s, f), jt(i) ? (
|
|
2556
|
+
return d ? i.setAttributeNS(d, s, f) : i.setAttribute(s, f), jt(i) ? (Q(i), !1) : !0;
|
|
2543
2557
|
} catch (h) {
|
|
2544
2558
|
return rt(s, i), !1;
|
|
2545
2559
|
}
|
|
2546
|
-
},
|
|
2547
|
-
if (Y(
|
|
2560
|
+
}, io = function(i, s) {
|
|
2561
|
+
if (Y(C.beforeSanitizeAttributes, i, null), gt(i, s)) return;
|
|
2548
2562
|
const d = i.attributes;
|
|
2549
2563
|
if (!d || jt(i)) return;
|
|
2550
|
-
|
|
2564
|
+
A = to(C.uponSanitizeAttribute, A, ee, Ot);
|
|
2551
2565
|
const f = {
|
|
2552
2566
|
attrName: "",
|
|
2553
2567
|
attrValue: "",
|
|
2554
2568
|
keepAttr: !0,
|
|
2555
|
-
allowedAttributes:
|
|
2569
|
+
allowedAttributes: A,
|
|
2556
2570
|
forceKeepAttr: void 0
|
|
2557
2571
|
};
|
|
2558
2572
|
let h = d.length;
|
|
2559
|
-
const b =
|
|
2573
|
+
const b = _(i.nodeName);
|
|
2560
2574
|
for (; h--; ) {
|
|
2561
|
-
const y = d[h], S = y.name, j = y.namespaceURI, F = y.value, bt =
|
|
2562
|
-
let O = S === "value" ? he :
|
|
2563
|
-
if (f.attrName = bt, f.attrValue = O, f.keepAttr = !0, f.forceKeepAttr = void 0, Y(
|
|
2575
|
+
const y = d[h], S = y.name, j = y.namespaceURI, F = y.value, bt = _(S), he = F;
|
|
2576
|
+
let O = S === "value" ? he : Pn(he), ro = !1;
|
|
2577
|
+
if (f.attrName = bt, f.attrValue = O, f.keepAttr = !0, f.forceKeepAttr = void 0, Y(C.uponSanitizeAttribute, i, f), O = f.attrValue, Be && (bt === "id" || bt === "name") && uo(O, Fe) !== 0 && (rt(S, i, y), O = Fe + O, ro = !0), nt && I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
|
|
2564
2578
|
rt(S, i, y);
|
|
2565
2579
|
continue;
|
|
2566
2580
|
}
|
|
2567
|
-
if (bt === "attributename" &&
|
|
2581
|
+
if (bt === "attributename" && co(O, "href")) {
|
|
2568
2582
|
rt(S, i, y);
|
|
2569
2583
|
continue;
|
|
2570
2584
|
}
|
|
@@ -2573,27 +2587,27 @@ function Mo() {
|
|
|
2573
2587
|
rt(S, i, y);
|
|
2574
2588
|
continue;
|
|
2575
2589
|
}
|
|
2576
|
-
if (!
|
|
2590
|
+
if (!Ne && I(Zn, O)) {
|
|
2577
2591
|
rt(S, i, y);
|
|
2578
2592
|
continue;
|
|
2579
2593
|
}
|
|
2580
|
-
if (X && (O = Ut(O)), !
|
|
2594
|
+
if (X && (O = Ut(O)), !oo(b, bt, O)) {
|
|
2581
2595
|
rt(S, i, y);
|
|
2582
2596
|
continue;
|
|
2583
2597
|
}
|
|
2584
|
-
O =
|
|
2598
|
+
O = ln(b, bt, j, O), O !== he && cn(i, S, j, O) && ro && lo(t.removed);
|
|
2585
2599
|
}
|
|
2586
2600
|
}
|
|
2587
|
-
Y(
|
|
2601
|
+
Y(C.afterSanitizeAttributes, i, null), gt(i, s);
|
|
2588
2602
|
}, $t = function(i) {
|
|
2589
2603
|
let s = null;
|
|
2590
2604
|
const d = Je(i);
|
|
2591
|
-
for (Y(
|
|
2592
|
-
if (Y(
|
|
2605
|
+
for (Y(C.beforeSanitizeShadowDOM, i, null); s = d.nextNode(); )
|
|
2606
|
+
if (Y(C.uponSanitizeShadowNode, s, null), eo(s, i), io(s, i), mt(s.content) && $t(s.content), wt(s) === H.element) {
|
|
2593
2607
|
const f = st(s);
|
|
2594
2608
|
mt(f) && (fe(f), $t(f));
|
|
2595
2609
|
}
|
|
2596
|
-
Y(
|
|
2610
|
+
Y(C.afterSanitizeShadowDOM, i, null);
|
|
2597
2611
|
}, fe = function(i) {
|
|
2598
2612
|
const s = [{
|
|
2599
2613
|
node: i,
|
|
@@ -2605,14 +2619,14 @@ function Mo() {
|
|
|
2605
2619
|
$t(d.shadow);
|
|
2606
2620
|
continue;
|
|
2607
2621
|
}
|
|
2608
|
-
const f = d.node, h =
|
|
2622
|
+
const f = d.node, h = wt(f) === H.element, b = G(f);
|
|
2609
2623
|
if (b) for (let y = b.length - 1; y >= 0; --y) s.push({
|
|
2610
2624
|
node: b[y],
|
|
2611
2625
|
shadow: null
|
|
2612
2626
|
});
|
|
2613
2627
|
if (h) {
|
|
2614
2628
|
const y = lt ? lt(f) : null;
|
|
2615
|
-
if (typeof y == "string" &&
|
|
2629
|
+
if (typeof y == "string" && _(y) === "template") {
|
|
2616
2630
|
const S = f.content;
|
|
2617
2631
|
mt(S) && s.push({
|
|
2618
2632
|
node: S,
|
|
@@ -2634,21 +2648,21 @@ function Mo() {
|
|
|
2634
2648
|
};
|
|
2635
2649
|
return t.sanitize = function(u) {
|
|
2636
2650
|
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, d = null, f = null, h = null;
|
|
2637
|
-
if (se = !u, se && (u = "<!-->"), typeof u != "string" && !xt(u) && (u =
|
|
2638
|
-
throw
|
|
2651
|
+
if (se = !u, se && (u = "<!-->"), typeof u != "string" && !xt(u) && (u = Bn(u), typeof u != "string"))
|
|
2652
|
+
throw Z("dirty is not a string, aborting");
|
|
2639
2653
|
if (!t.isSupported) return u;
|
|
2640
|
-
ne ? (
|
|
2654
|
+
ne ? (x = Pt, A = Ot) : ue(i), (C.uponSanitizeElement.length > 0 || C.uponSanitizeAttribute.length > 0) && (x = U(x)), C.uponSanitizeAttribute.length > 0 && (A = U(A)), t.removed = [];
|
|
2641
2655
|
const b = ae && typeof u != "string" && xt(u);
|
|
2642
2656
|
if (b) {
|
|
2643
|
-
|
|
2644
|
-
const j =
|
|
2657
|
+
nn(u);
|
|
2658
|
+
const j = Qt(u);
|
|
2645
2659
|
if (typeof j == "string") {
|
|
2646
|
-
const F =
|
|
2647
|
-
if (!
|
|
2648
|
-
throw Ft(u),
|
|
2660
|
+
const F = _(j);
|
|
2661
|
+
if (!x[F] || Tt[F])
|
|
2662
|
+
throw Ft(u), Z("root node is forbidden and cannot be sanitized in-place");
|
|
2649
2663
|
}
|
|
2650
2664
|
if (jt(u))
|
|
2651
|
-
throw Ft(u),
|
|
2665
|
+
throw Ft(u), Z("root node is clobbered and cannot be sanitized in-place");
|
|
2652
2666
|
try {
|
|
2653
2667
|
fe(u);
|
|
2654
2668
|
} catch (F) {
|
|
@@ -2660,12 +2674,12 @@ function Mo() {
|
|
|
2660
2674
|
if (!dt && !X && !it && u.indexOf("<") === -1) return R && Nt ? ct(u) : u;
|
|
2661
2675
|
if (s = Ze(u), !s) return dt ? null : Nt ? ot : "";
|
|
2662
2676
|
}
|
|
2663
|
-
s && ie &&
|
|
2677
|
+
s && ie && Q(s.firstChild);
|
|
2664
2678
|
const y = b ? u : s;
|
|
2665
2679
|
try {
|
|
2666
2680
|
const j = Je(y);
|
|
2667
2681
|
for (; f = j.nextNode(); )
|
|
2668
|
-
|
|
2682
|
+
eo(f, y), io(f, y), mt(f.content) && $t(f.content);
|
|
2669
2683
|
} catch (j) {
|
|
2670
2684
|
throw b && (Ft(u), at(t.removed, (F) => {
|
|
2671
2685
|
F.element && Ht(F.element);
|
|
@@ -2675,45 +2689,45 @@ function Mo() {
|
|
|
2675
2689
|
let j = !1;
|
|
2676
2690
|
if (at(t.removed, (F) => {
|
|
2677
2691
|
F.element && (F.element === u && (j = !0), Ht(F.element));
|
|
2678
|
-
}), j) throw
|
|
2692
|
+
}), j) throw Z("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
2679
2693
|
return X && pe(u), u;
|
|
2680
2694
|
}
|
|
2681
2695
|
if (dt) {
|
|
2682
2696
|
if (X && pe(s), Rt)
|
|
2683
|
-
for (h =
|
|
2697
|
+
for (h = zo.call(s.ownerDocument); s.firstChild; ) h.appendChild(s.firstChild);
|
|
2684
2698
|
else h = s;
|
|
2685
|
-
return (
|
|
2699
|
+
return (A.shadowroot || A.shadowrootmode) && (h = Fo.call(o, h, !0)), h;
|
|
2686
2700
|
}
|
|
2687
2701
|
let S = it ? s.outerHTML : s.innerHTML;
|
|
2688
|
-
return it &&
|
|
2702
|
+
return it && x["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && I(Vn, s.ownerDocument.doctype.name) && (S = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
|
|
2689
2703
|
` + S), X && (S = Ut(S)), R && Nt ? ct(S) : S;
|
|
2690
2704
|
}, t.setConfig = function() {
|
|
2691
2705
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2692
|
-
ue(u), ne = !0,
|
|
2706
|
+
ue(u), ne = !0, Pt = x, Ot = A;
|
|
2693
2707
|
}, t.clearConfig = function() {
|
|
2694
|
-
ht = null, ne = !1,
|
|
2708
|
+
ht = null, ne = !1, Pt = null, Ot = null, R = Zt, ot = "";
|
|
2695
2709
|
}, t.isValidAttribute = function(u, i, s) {
|
|
2696
2710
|
ht || ue({});
|
|
2697
|
-
const d =
|
|
2698
|
-
return
|
|
2711
|
+
const d = _(u), f = _(i);
|
|
2712
|
+
return oo(d, f, s);
|
|
2699
2713
|
}, t.addHook = function(u, i) {
|
|
2700
|
-
typeof i == "function" && N(
|
|
2714
|
+
typeof i == "function" && N(C, u) && At(C[u], i);
|
|
2701
2715
|
}, t.removeHook = function(u, i) {
|
|
2702
|
-
if (N(
|
|
2716
|
+
if (N(C, u)) {
|
|
2703
2717
|
if (i !== void 0) {
|
|
2704
|
-
const s =
|
|
2705
|
-
return s === -1 ? void 0 :
|
|
2718
|
+
const s = Dn(C[u], i);
|
|
2719
|
+
return s === -1 ? void 0 : In(C[u], s, 1)[0];
|
|
2706
2720
|
}
|
|
2707
|
-
return
|
|
2721
|
+
return lo(C[u]);
|
|
2708
2722
|
}
|
|
2709
2723
|
}, t.removeHooks = function(u) {
|
|
2710
|
-
N(
|
|
2724
|
+
N(C, u) && (C[u] = []);
|
|
2711
2725
|
}, t.removeAllHooks = function() {
|
|
2712
|
-
|
|
2726
|
+
C = wo();
|
|
2713
2727
|
}, t;
|
|
2714
2728
|
}
|
|
2715
|
-
var Kt =
|
|
2716
|
-
const
|
|
2729
|
+
var Kt = Io();
|
|
2730
|
+
const ni = [
|
|
2717
2731
|
"p",
|
|
2718
2732
|
"br",
|
|
2719
2733
|
"strong",
|
|
@@ -2762,7 +2776,7 @@ const ei = [
|
|
|
2762
2776
|
// user-initiated dialog, a different trust boundary that never calls
|
|
2763
2777
|
// through this sanitizer. A consumer that genuinely wants iframes in
|
|
2764
2778
|
// pasted/typed content can still opt in via a custom allowedTags list.
|
|
2765
|
-
],
|
|
2779
|
+
], ii = {
|
|
2766
2780
|
"*": ["class", "style", "id", "data-*", "role", "aria-*", "tabindex", "contenteditable", "spellcheck", "dir", "lang"],
|
|
2767
2781
|
a: ["href", "target", "rel", "title"],
|
|
2768
2782
|
img: ["src", "alt", "width", "height", "loading"],
|
|
@@ -2779,8 +2793,8 @@ const ei = [
|
|
|
2779
2793
|
// additionalAllowedTags), restoring the attributes that make an inserted
|
|
2780
2794
|
// iframe actually usable (src, sizing, fullscreen, scrolling/border).
|
|
2781
2795
|
iframe: ["src", "width", "height", "name", "title", "frameborder", "scrolling", "allowfullscreen", "longdesc", "allow"]
|
|
2782
|
-
},
|
|
2783
|
-
function
|
|
2796
|
+
}, ri = "data-editora-embed";
|
|
2797
|
+
function ai(n) {
|
|
2784
2798
|
if (!n || /\s/.test(n.trim())) return !1;
|
|
2785
2799
|
try {
|
|
2786
2800
|
const t = new URL(n.trim());
|
|
@@ -2789,10 +2803,10 @@ function ii(n) {
|
|
|
2789
2803
|
return !1;
|
|
2790
2804
|
}
|
|
2791
2805
|
}
|
|
2792
|
-
function
|
|
2806
|
+
function Po(n, t, e, o) {
|
|
2793
2807
|
if ((t == null ? void 0 : t.sanitize) === !1)
|
|
2794
2808
|
return n;
|
|
2795
|
-
const r = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags :
|
|
2809
|
+
const r = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ni, a = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...r, ...e])) : r, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : ii, p = /* @__PURE__ */ new Set();
|
|
2796
2810
|
for (const w of Object.values(c))
|
|
2797
2811
|
for (const k of w) p.add(k);
|
|
2798
2812
|
const m = {
|
|
@@ -2807,8 +2821,8 @@ function Io(n, t, e, o) {
|
|
|
2807
2821
|
(w, k) => {
|
|
2808
2822
|
var T;
|
|
2809
2823
|
if (k.tagName !== "iframe") return;
|
|
2810
|
-
const
|
|
2811
|
-
k.allowedTags.iframe = g || ((T =
|
|
2824
|
+
const v = w;
|
|
2825
|
+
k.allowedTags.iframe = g || ((T = v.getAttribute) == null ? void 0 : T.call(v, ri)) === "true" && ai(v.getAttribute("src"));
|
|
2812
2826
|
}
|
|
2813
2827
|
);
|
|
2814
2828
|
try {
|
|
@@ -2817,22 +2831,22 @@ function Io(n, t, e, o) {
|
|
|
2817
2831
|
Kt.removeHook("uponSanitizeElement");
|
|
2818
2832
|
}
|
|
2819
2833
|
}
|
|
2820
|
-
function
|
|
2821
|
-
return
|
|
2834
|
+
function si(n, t, e, o) {
|
|
2835
|
+
return Po(n, t, o, !1);
|
|
2822
2836
|
}
|
|
2823
|
-
function
|
|
2824
|
-
return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? n :
|
|
2837
|
+
function li(n, t, e) {
|
|
2838
|
+
return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? n : si(n, t);
|
|
2825
2839
|
}
|
|
2826
|
-
function
|
|
2827
|
-
return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? n :
|
|
2840
|
+
function ko(n, t, e, o) {
|
|
2841
|
+
return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? n : Po(n, t, o, !0);
|
|
2828
2842
|
}
|
|
2829
|
-
const
|
|
2830
|
-
function
|
|
2831
|
-
if (!n || !
|
|
2843
|
+
const ci = ".resize-handle, .table-resize-handle, [data-rte-media-pending]", di = /resize-handle|data-rte-media-pending|rte-media/;
|
|
2844
|
+
function Oo(n) {
|
|
2845
|
+
if (!n || !di.test(n)) return n;
|
|
2832
2846
|
const t = document.createElement("template");
|
|
2833
2847
|
t.innerHTML = n;
|
|
2834
2848
|
const e = /* @__PURE__ */ new Set();
|
|
2835
|
-
return t.content.querySelectorAll(
|
|
2849
|
+
return t.content.querySelectorAll(ci).forEach((o) => {
|
|
2836
2850
|
const r = o.parentElement;
|
|
2837
2851
|
r && (r.tagName === "TD" || r.tagName === "TH") && e.add(r), o.remove();
|
|
2838
2852
|
}), e.forEach((o) => {
|
|
@@ -2845,8 +2859,8 @@ function Po(n) {
|
|
|
2845
2859
|
r && (r.removeAttribute("contenteditable"), !((a = r.textContent) != null && a.trim()) && !r.querySelector("img, video, a") && r.remove());
|
|
2846
2860
|
}), t.innerHTML;
|
|
2847
2861
|
}
|
|
2848
|
-
function
|
|
2849
|
-
return n ?
|
|
2862
|
+
function yt(n) {
|
|
2863
|
+
return n ? Oo(n.innerHTML) : "";
|
|
2850
2864
|
}
|
|
2851
2865
|
const Xt = class Xt {
|
|
2852
2866
|
/**
|
|
@@ -3045,7 +3059,7 @@ Xt.EDITOR_DEFAULTS = {
|
|
|
3045
3059
|
width: "100%",
|
|
3046
3060
|
readonly: !1,
|
|
3047
3061
|
disabled: !1,
|
|
3048
|
-
menubar: !
|
|
3062
|
+
menubar: !1,
|
|
3049
3063
|
toolbar: !0,
|
|
3050
3064
|
plugins: [],
|
|
3051
3065
|
theme: "light",
|
|
@@ -3110,87 +3124,93 @@ Xt.EDITOR_DEFAULTS = {
|
|
|
3110
3124
|
"security-sanitize-on-input"
|
|
3111
3125
|
]);
|
|
3112
3126
|
let Ae = Xt;
|
|
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}}editora-editor[data-loading]{display:block;position:relative;min-height:160px;border:1px solid var(--ui-color-border, #ddd);border-radius:var(--ui-radius, 4px);background:var(--ui-color-surface, #fff)}editora-editor[data-loading]:before{content:"";position:absolute;inset:0 0 auto;height:46px;border-bottom:1px solid var(--ui-color-border, #ddd);border-radius:var(--ui-radius, 4px) var(--ui-radius, 4px) 0 0;background:linear-gradient(90deg,var(--ui-color-surface-alt, #f5f5f5) 0%,color-mix(in srgb,var(--ui-color-surface-alt, #f5f5f5) 70%,var(--ui-color-border, #ddd)) 50%,var(--ui-color-surface-alt, #f5f5f5) 100%);background-size:220% 100%;animation:editora-loading-shimmer 1.2s linear infinite}editora-editor[data-loading]:after{content:"Loading editor…";position:absolute;top:62px;left:16px;font:14px/1.4 var(--ui-font-family, system-ui, sans-serif);color:var(--ui-color-muted, #6b7280)}editora-editor[data-loading]>*{visibility:hidden}@keyframes editora-loading-shimmer{to{background-position:-220% 0}}@media(prefers-reduced-motion:reduce){editora-editor[data-loading]:before{animation:none}}';
|
|
3127
|
+
const To = /* @__PURE__ */ new Set();
|
|
3128
|
+
function ui(n, t) {
|
|
3129
|
+
To.has(n) || (To.add(n), console.warn(
|
|
3130
|
+
`[Editora] The "${n}" option has no effect: ${t} It is still accepted so existing code keeps working, and will be removed in a future major release.`
|
|
3131
|
+
));
|
|
3132
|
+
}
|
|
3133
|
+
const pi = '.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.editora-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}}editora-editor[data-loading]{display:block;position:relative;min-height:160px;border:1px solid var(--ui-color-border, #ddd);border-radius:var(--ui-radius, 4px);background:var(--ui-color-surface, #fff)}editora-editor[data-loading]:before{content:"";position:absolute;inset:0 0 auto;height:46px;border-bottom:1px solid var(--ui-color-border, #ddd);border-radius:var(--ui-radius, 4px) var(--ui-radius, 4px) 0 0;background:linear-gradient(90deg,var(--ui-color-surface-alt, #f5f5f5) 0%,color-mix(in srgb,var(--ui-color-surface-alt, #f5f5f5) 70%,var(--ui-color-border, #ddd)) 50%,var(--ui-color-surface-alt, #f5f5f5) 100%);background-size:220% 100%;animation:editora-loading-shimmer 1.2s linear infinite}editora-editor[data-loading]:after{content:"Loading editor…";position:absolute;top:62px;left:16px;font:14px/1.4 var(--ui-font-family, system-ui, sans-serif);color:var(--ui-color-muted, #6b7280)}editora-editor[data-loading]>*{visibility:hidden}@keyframes editora-loading-shimmer{to{background-position:-220% 0}}@media(prefers-reduced-motion:reduce){editora-editor[data-loading]:before{animation:none}}';
|
|
3114
3134
|
let qt;
|
|
3115
|
-
const
|
|
3116
|
-
let tt = null,
|
|
3117
|
-
function
|
|
3135
|
+
const fi = "__editoraCommandEditorRoot", hi = "__editoraLastCommandButton", Co = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", xo = ".rte-content, .editora-content", mi = "Rich text editor", gi = /* @__PURE__ */ new Set(["collaboration"]), we = "data-editora-disabled-by-host", Se = /* @__PURE__ */ new Set();
|
|
3136
|
+
let tt = null, Ao = !1, ke = null, Te = null;
|
|
3137
|
+
function So(n) {
|
|
3118
3138
|
if (!(n instanceof HTMLElement)) return !1;
|
|
3119
3139
|
const t = n;
|
|
3120
3140
|
return typeof t.execCommand == "function" && (t.tagName.toLowerCase() === "editora-editor" || t.classList.contains("editora-editor") || t.hasAttribute("data-editora-editor"));
|
|
3121
3141
|
}
|
|
3122
|
-
function
|
|
3142
|
+
function bi(n) {
|
|
3123
3143
|
return n ? n.nodeType === Node.ELEMENT_NODE ? n : n.parentElement : null;
|
|
3124
3144
|
}
|
|
3125
|
-
function
|
|
3145
|
+
function Lt(n) {
|
|
3126
3146
|
if (!n) return null;
|
|
3127
|
-
if (
|
|
3147
|
+
if (So(n))
|
|
3128
3148
|
return n;
|
|
3129
|
-
const t = n.matches(
|
|
3130
|
-
return !t || !
|
|
3149
|
+
const t = n.matches(Co) ? n : n.closest(Co);
|
|
3150
|
+
return !t || !So(t) ? null : t;
|
|
3131
3151
|
}
|
|
3132
|
-
function
|
|
3152
|
+
function yi() {
|
|
3133
3153
|
var r;
|
|
3134
3154
|
if (typeof window == "undefined") return null;
|
|
3135
|
-
const n = window[
|
|
3155
|
+
const n = window[fi];
|
|
3136
3156
|
if (n instanceof HTMLElement) {
|
|
3137
|
-
const a =
|
|
3157
|
+
const a = Lt(n);
|
|
3138
3158
|
if (a) return a;
|
|
3139
|
-
const l = n.matches(
|
|
3159
|
+
const l = n.matches(xo) ? n : n.querySelector(xo);
|
|
3140
3160
|
if (l) {
|
|
3141
|
-
const c =
|
|
3161
|
+
const c = Lt(l);
|
|
3142
3162
|
if (c) return c;
|
|
3143
3163
|
}
|
|
3144
3164
|
}
|
|
3145
|
-
const t = window[
|
|
3165
|
+
const t = window[hi];
|
|
3146
3166
|
if (t instanceof HTMLElement) {
|
|
3147
|
-
const a =
|
|
3167
|
+
const a = Lt(t);
|
|
3148
3168
|
if (a) return a;
|
|
3149
3169
|
}
|
|
3150
3170
|
const e = document.activeElement;
|
|
3151
3171
|
if (e) {
|
|
3152
|
-
const a =
|
|
3172
|
+
const a = Lt(e);
|
|
3153
3173
|
if (a) return a;
|
|
3154
3174
|
}
|
|
3155
3175
|
const o = (r = window.getSelection) == null ? void 0 : r.call(window);
|
|
3156
3176
|
if (o && o.rangeCount > 0) {
|
|
3157
|
-
const a =
|
|
3177
|
+
const a = Lt(bi(o.getRangeAt(0).startContainer));
|
|
3158
3178
|
if (a) return a;
|
|
3159
3179
|
}
|
|
3160
3180
|
if (tt && tt.isConnected)
|
|
3161
3181
|
return tt;
|
|
3162
|
-
for (const a of
|
|
3182
|
+
for (const a of Se)
|
|
3163
3183
|
if (a.isConnected) return a;
|
|
3164
3184
|
return null;
|
|
3165
3185
|
}
|
|
3166
|
-
function
|
|
3167
|
-
if (typeof window == "undefined" ||
|
|
3168
|
-
|
|
3186
|
+
function Ei() {
|
|
3187
|
+
if (typeof window == "undefined" || Ao) return;
|
|
3188
|
+
ke = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, Te = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
|
|
3169
3189
|
const n = (t, ...e) => {
|
|
3170
|
-
const o =
|
|
3171
|
-
return o ? o.execCommand(t, ...e) :
|
|
3190
|
+
const o = yi();
|
|
3191
|
+
return o ? o.execCommand(t, ...e) : ke ? ke(t, ...e) : Te ? Te(t, ...e) : !1;
|
|
3172
3192
|
};
|
|
3173
|
-
window.executeEditorCommand = n, window.execEditorCommand = n,
|
|
3193
|
+
window.executeEditorCommand = n, window.execEditorCommand = n, Ao = !0;
|
|
3174
3194
|
}
|
|
3175
|
-
function
|
|
3195
|
+
function vi() {
|
|
3176
3196
|
const n = "editora-webcomponent-styles";
|
|
3177
3197
|
if (!document.getElementById(n)) {
|
|
3178
3198
|
const t = document.createElement("style");
|
|
3179
|
-
t.id = n, t.textContent =
|
|
3199
|
+
t.id = n, t.textContent = pi, document.head.appendChild(t);
|
|
3180
3200
|
}
|
|
3181
3201
|
}
|
|
3182
|
-
function
|
|
3202
|
+
function wi() {
|
|
3183
3203
|
if (!qt) {
|
|
3184
3204
|
const n = $.__globalPluginLoader;
|
|
3185
|
-
n ? qt = n : qt = new
|
|
3205
|
+
n ? qt = n : qt = new _o();
|
|
3186
3206
|
}
|
|
3187
3207
|
return qt;
|
|
3188
3208
|
}
|
|
3189
|
-
const
|
|
3209
|
+
const ki = typeof HTMLElement == "undefined" ? class {
|
|
3190
3210
|
} : HTMLElement;
|
|
3191
|
-
class $ extends
|
|
3211
|
+
class $ extends ki {
|
|
3192
3212
|
constructor() {
|
|
3193
|
-
if (super(), this.pluginLoader =
|
|
3213
|
+
if (super(), this.pluginLoader = wi(), this.config = {}, this.isInitialized = !1, this.buildGeneration = 0, this.keyboardShortcutManager = new kn(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.pluginInstances = /* @__PURE__ */ new Map(), this.lastBeforeInputType = null, this.pendingHistorySnapshot = null, this.hasConnected = !1, this.reinitializeQueued = !1, this.lastReportedContent = null, vi(), !this.hasAttribute("data-initial-content")) {
|
|
3194
3214
|
const t = this.innerHTML.trim();
|
|
3195
3215
|
t && this.setAttribute("data-initial-content", t);
|
|
3196
3216
|
}
|
|
@@ -3247,7 +3267,7 @@ class $ extends vi {
|
|
|
3247
3267
|
* Called when element is added to DOM
|
|
3248
3268
|
*/
|
|
3249
3269
|
connectedCallback() {
|
|
3250
|
-
this.config = this.resolveConfig(), this.waitForPluginLoader().then(() => {
|
|
3270
|
+
this.hasConnected = !0, this.config = this.resolveConfig(), this.waitForPluginLoader().then(() => {
|
|
3251
3271
|
setTimeout(async () => {
|
|
3252
3272
|
await this.initialize();
|
|
3253
3273
|
}, 0);
|
|
@@ -3284,7 +3304,22 @@ class $ extends vi {
|
|
|
3284
3304
|
* Set configuration via JavaScript API
|
|
3285
3305
|
*/
|
|
3286
3306
|
async setConfig(t) {
|
|
3287
|
-
this.jsConfig = t, this.config = this.resolveConfig(), this.isConnected
|
|
3307
|
+
this.jsConfig = t, this.config = this.resolveConfig(), this.isConnected ? (this.destroy(), this.adoptConfiguredContent(t), await this.waitForPluginLoader(), await this.initialize()) : this.adoptConfiguredContent(t);
|
|
3308
|
+
}
|
|
3309
|
+
/**
|
|
3310
|
+
* `content` in setConfig() is a one-off replacement, not a setting: it feeds the next initialize()
|
|
3311
|
+
* the same way the live content that destroy() keeps does, so a later rebuild (a `plugins`
|
|
3312
|
+
* attribute change, the element being moved) resumes from what the user typed, not from this value.
|
|
3313
|
+
* It outranks that kept content, autosave and the element's own markup.
|
|
3314
|
+
*/
|
|
3315
|
+
adoptConfiguredContent(t) {
|
|
3316
|
+
typeof t.content == "string" && (this.preservedContent = t.content);
|
|
3317
|
+
}
|
|
3318
|
+
/** Replace the `editora-theme-*` class (there is only ever one) with the one for `theme`. */
|
|
3319
|
+
applyThemeClass(t) {
|
|
3320
|
+
Array.from(this.classList).forEach((e) => {
|
|
3321
|
+
e.startsWith("editora-theme-") && this.classList.remove(e);
|
|
3322
|
+
}), t && this.classList.add(`editora-theme-${t}`);
|
|
3288
3323
|
}
|
|
3289
3324
|
/**
|
|
3290
3325
|
* Initialize the editor
|
|
@@ -3293,7 +3328,7 @@ class $ extends vi {
|
|
|
3293
3328
|
var a;
|
|
3294
3329
|
if (this.querySelector(".editora-toolbar") || this.isInitialized) return;
|
|
3295
3330
|
const t = ++this.buildGeneration;
|
|
3296
|
-
this.setAttribute("data-editora-editor", "true"),
|
|
3331
|
+
this.setAttribute("data-editora-editor", "true"), Se.add(this), tt || (tt = this), Ei(), this.config.height && (this.style.height = typeof this.config.height == "number" ? `${this.config.height}px` : this.config.height), this.config.width && (this.style.width = typeof this.config.width == "number" ? `${this.config.width}px` : this.config.width), this.classList.add("editora-editor"), this.classList.toggle("editora-disabled", this.isEditorDisabled()), this.applyThemeClass(this.config.theme), this.isMenubarRequested() && ui("menubar", "<editora-editor> does not render a menu bar."), this.setAttribute("data-loading", "true"), this.setAttribute("aria-busy", "true");
|
|
3297
3332
|
const e = await this.loadPlugins();
|
|
3298
3333
|
if (t !== this.buildGeneration || !this.isConnected) return;
|
|
3299
3334
|
if (this.loadedPlugins = e, e.forEach((l) => {
|
|
@@ -3312,10 +3347,10 @@ class $ extends vi {
|
|
|
3312
3347
|
const r = this.sanitizeLoadedContent(
|
|
3313
3348
|
(a = o != null ? o : this.restoreAutosavedContent()) != null ? a : this.getAttribute("data-initial-content") || ""
|
|
3314
3349
|
);
|
|
3315
|
-
this.engine = new
|
|
3350
|
+
this.engine = new fn({
|
|
3316
3351
|
content: r,
|
|
3317
3352
|
plugins: e,
|
|
3318
|
-
readonly: this.config.readonly
|
|
3353
|
+
readonly: !!this.config.readonly || this.isEditorDisabled()
|
|
3319
3354
|
}), this.createUI(e, r), this.setupEventListeners(), this.startAutosave(), this.isInitialized = !0, this.removeAttribute("data-loading"), this.removeAttribute("aria-busy"), this.dispatchEvent(new CustomEvent("editor-ready", {
|
|
3320
3355
|
detail: { api: this.getAPI() },
|
|
3321
3356
|
bubbles: !0
|
|
@@ -3341,18 +3376,18 @@ class $ extends vi {
|
|
|
3341
3376
|
const a = this.config.plugins.split(/\s+/).filter(Boolean);
|
|
3342
3377
|
r && !a.includes("a11yChecker") && a.push("a11yChecker");
|
|
3343
3378
|
for (const l of a) {
|
|
3344
|
-
const c = await this.
|
|
3379
|
+
const c = await this.loadPlugin(l, this.getPluginLoadConfig(l));
|
|
3345
3380
|
c && t.push(c);
|
|
3346
3381
|
}
|
|
3347
3382
|
} else if (Array.isArray(this.config.plugins)) {
|
|
3348
3383
|
for (const a of this.config.plugins)
|
|
3349
3384
|
if (typeof a == "string") {
|
|
3350
|
-
const l = await this.
|
|
3385
|
+
const l = await this.loadPlugin(a, this.getPluginLoadConfig(a));
|
|
3351
3386
|
l && t.push(l);
|
|
3352
3387
|
} else
|
|
3353
3388
|
t.push(a);
|
|
3354
3389
|
if (r && !t.some((a) => (a == null ? void 0 : a.name) === "a11yChecker")) {
|
|
3355
|
-
const a = await this.
|
|
3390
|
+
const a = await this.loadPlugin("a11yChecker", this.getPluginLoadConfig("a11yChecker"));
|
|
3356
3391
|
a && t.push(a);
|
|
3357
3392
|
}
|
|
3358
3393
|
}
|
|
@@ -3360,13 +3395,24 @@ class $ extends vi {
|
|
|
3360
3395
|
const a = this.pluginLoader.getRegisteredPluginNames();
|
|
3361
3396
|
for (const l of a) {
|
|
3362
3397
|
const c = this.getPluginLoadConfig(l);
|
|
3363
|
-
if (
|
|
3364
|
-
const p = await this.
|
|
3398
|
+
if (gi.has(l) && !c) continue;
|
|
3399
|
+
const p = await this.loadPlugin(l, c);
|
|
3365
3400
|
p && t.push(p);
|
|
3366
3401
|
}
|
|
3367
3402
|
}
|
|
3368
3403
|
return t;
|
|
3369
3404
|
}
|
|
3405
|
+
/**
|
|
3406
|
+
* This editor's instance of a registered plugin: created on first use, then reused (with the
|
|
3407
|
+
* current config) when the editor rebuilds.
|
|
3408
|
+
*/
|
|
3409
|
+
async loadPlugin(t, e) {
|
|
3410
|
+
const o = this.pluginInstances.get(t);
|
|
3411
|
+
if (o)
|
|
3412
|
+
return e && this.pluginLoader.configure(o, e), o;
|
|
3413
|
+
const r = await this.pluginLoader.create(t, e);
|
|
3414
|
+
return r && this.pluginInstances.set(t, r), r;
|
|
3415
|
+
}
|
|
3370
3416
|
resolveToolbarItems() {
|
|
3371
3417
|
const t = this.config.toolbarItems;
|
|
3372
3418
|
if (typeof t == "string") return t;
|
|
@@ -3447,12 +3493,15 @@ class $ extends vi {
|
|
|
3447
3493
|
if (!this.contentElement) return;
|
|
3448
3494
|
const t = this.getAccessibilityConfig();
|
|
3449
3495
|
if (t.enableARIA) {
|
|
3450
|
-
this.contentElement.setAttribute("role", "textbox"), this.contentElement.setAttribute("aria-multiline", "true"), this.contentElement.setAttribute(
|
|
3496
|
+
this.contentElement.setAttribute("role", "textbox"), this.contentElement.setAttribute("aria-multiline", "true"), this.contentElement.setAttribute(
|
|
3497
|
+
"aria-disabled",
|
|
3498
|
+
this.config.readonly || this.isEditorDisabled() ? "true" : "false"
|
|
3499
|
+
);
|
|
3451
3500
|
const o = (e = this.getAttribute("aria-label")) == null ? void 0 : e.trim(), r = typeof this.config.placeholder == "string" ? this.config.placeholder.trim() : "";
|
|
3452
|
-
this.contentElement.setAttribute("aria-label", o || r ||
|
|
3501
|
+
this.contentElement.setAttribute("aria-label", o || r || mi);
|
|
3453
3502
|
} else
|
|
3454
3503
|
this.contentElement.removeAttribute("role"), this.contentElement.removeAttribute("aria-multiline"), this.contentElement.removeAttribute("aria-disabled"), this.contentElement.removeAttribute("aria-label");
|
|
3455
|
-
this.contentElement.tabIndex = t.keyboardNavigation ? 0 : -1;
|
|
3504
|
+
this.contentElement.tabIndex = t.keyboardNavigation && !this.isEditorDisabled() ? 0 : -1;
|
|
3456
3505
|
}
|
|
3457
3506
|
applyLanguageSettings() {
|
|
3458
3507
|
if (!this.contentElement) return;
|
|
@@ -3549,7 +3598,7 @@ class $ extends vi {
|
|
|
3549
3598
|
* editable DOM: sanitizing only after the first edit leaves the page exposed until then.
|
|
3550
3599
|
*/
|
|
3551
3600
|
sanitizeLoadedContent(t) {
|
|
3552
|
-
return
|
|
3601
|
+
return ko(t, this.getContentSanitizeConfig(), this.getSecurityConfig());
|
|
3553
3602
|
}
|
|
3554
3603
|
getAutosaveConfig() {
|
|
3555
3604
|
var e, o;
|
|
@@ -3617,7 +3666,7 @@ class $ extends vi {
|
|
|
3617
3666
|
this.stopAutosave();
|
|
3618
3667
|
const t = this.getAutosaveConfig();
|
|
3619
3668
|
!t.enabled || !this.contentElement || (this.autosaveTimer = setInterval(() => {
|
|
3620
|
-
this.persistAutosave(
|
|
3669
|
+
this.persistAutosave(yt(this.contentElement));
|
|
3621
3670
|
}, t.intervalMs));
|
|
3622
3671
|
}
|
|
3623
3672
|
insertHTMLAtSelection(t) {
|
|
@@ -3640,7 +3689,7 @@ class $ extends vi {
|
|
|
3640
3689
|
*/
|
|
3641
3690
|
createUI(t, e) {
|
|
3642
3691
|
const o = this.querySelector('[slot="toolbar"]'), r = this.querySelector('[slot="statusbar"]');
|
|
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
|
|
3692
|
+
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 hn(
|
|
3644
3693
|
{
|
|
3645
3694
|
items: this.resolveToolbarItems(),
|
|
3646
3695
|
sticky: this.isToolbarStickyEnabled(),
|
|
@@ -3651,6 +3700,7 @@ class $ extends vi {
|
|
|
3651
3700
|
// Pass plugin loader to get all registered plugins
|
|
3652
3701
|
), this.toolbar.setCommandHandler((a, l) => {
|
|
3653
3702
|
var c;
|
|
3703
|
+
if (this.isEditorDisabled()) return !1;
|
|
3654
3704
|
if (this.contentElement) {
|
|
3655
3705
|
this.contentElement.focus();
|
|
3656
3706
|
const p = window.getSelection();
|
|
@@ -3660,7 +3710,7 @@ class $ extends vi {
|
|
|
3660
3710
|
}
|
|
3661
3711
|
}
|
|
3662
3712
|
return this.executeCommand(a, l);
|
|
3663
|
-
}), this.toolbar.render(this.toolbarElement)) : o && this.appendChild(o), this.contentElement = document.createElement("div"), this.contentElement.className = "editora-content rte-content", this.contentElement.contentEditable = this.config.readonly ? "false" : "true", this.applyLanguageSettings(), this.applyAccessibilitySettings(), this.applySpellcheckSettings(), this.config.placeholder && this.contentElement.setAttribute("data-placeholder", this.config.placeholder);
|
|
3713
|
+
}), this.toolbar.render(this.toolbarElement)) : o && this.appendChild(o), this.contentElement = document.createElement("div"), this.contentElement.className = "editora-content rte-content", this.contentElement.contentEditable = this.config.readonly || this.isEditorDisabled() ? "false" : "true", this.applyLanguageSettings(), this.applyAccessibilitySettings(), this.applySpellcheckSettings(), this.config.placeholder && this.contentElement.setAttribute("data-placeholder", this.config.placeholder);
|
|
3664
3714
|
try {
|
|
3665
3715
|
document.execCommand("defaultParagraphSeparator", !1, "p");
|
|
3666
3716
|
} catch (a) {
|
|
@@ -3677,11 +3727,20 @@ class $ extends vi {
|
|
|
3677
3727
|
}) && e.trim() ? this.contentElement.innerHTML = `<p>${e.trim()}</p>` : this.contentElement.innerHTML = e;
|
|
3678
3728
|
} else
|
|
3679
3729
|
this.config.placeholder ? this.contentElement.innerHTML = "" : this.contentElement.innerHTML = "<p><br></p>";
|
|
3680
|
-
this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new
|
|
3730
|
+
this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new mn({ enabled: !0 }), this.floatingToolbar.create(this)), r ? this.appendChild(r) : this.isStatusbarEnabled() && (this.statusBarElement = document.createElement("div"), this.statusBarElement.className = "editora-statusbar-container", this.appendChild(this.statusBarElement), this.statusBar = new gn({ position: this.getStatusbarPosition() }), this.statusBar.create(this.statusBarElement)), this.setToolbarControlsDisabled(this.isEditorDisabled()), this.lastReportedContent = yt(this.contentElement), this.config.autofocus && !this.isEditorDisabled() && setTimeout(() => {
|
|
3681
3731
|
var a;
|
|
3682
3732
|
return (a = this.contentElement) == null ? void 0 : a.focus();
|
|
3683
3733
|
}, 0);
|
|
3684
3734
|
}
|
|
3735
|
+
/** True only when the page asked for a menu bar (the default is not a request), through setConfig() or the attribute. */
|
|
3736
|
+
isMenubarRequested() {
|
|
3737
|
+
var o;
|
|
3738
|
+
const t = (o = this.jsConfig) == null ? void 0 : o.menubar;
|
|
3739
|
+
if (t !== void 0)
|
|
3740
|
+
return t === !0 || typeof t == "object" && t !== null && t.enabled !== !1;
|
|
3741
|
+
const e = this.getAttribute("menubar");
|
|
3742
|
+
return e !== null && e !== "false";
|
|
3743
|
+
}
|
|
3685
3744
|
/**
|
|
3686
3745
|
* Hands what a keystroke changed to the history plugin, so Undo takes back typing. Without this the
|
|
3687
3746
|
* plugin only knew about changes that plugins reported themselves, and typed text could not be undone.
|
|
@@ -3696,6 +3755,30 @@ class $ extends vi {
|
|
|
3696
3755
|
selectionCollapsed: e.selectionCollapsed
|
|
3697
3756
|
});
|
|
3698
3757
|
}
|
|
3758
|
+
/**
|
|
3759
|
+
* `disabled` is `readonly` plus a toolbar that cannot be pressed and a surface that leaves the tab
|
|
3760
|
+
* order, like a disabled form control.
|
|
3761
|
+
*/
|
|
3762
|
+
isEditorDisabled() {
|
|
3763
|
+
return this.config.disabled === !0;
|
|
3764
|
+
}
|
|
3765
|
+
applyDisabledState() {
|
|
3766
|
+
var e, o;
|
|
3767
|
+
const t = this.isEditorDisabled();
|
|
3768
|
+
this.classList.toggle("editora-disabled", t), t && ((e = this.floatingToolbar) == null || e.hide()), this.contentElement && (this.contentElement.contentEditable = t || this.config.readonly ? "false" : "true", this.applyAccessibilitySettings()), (o = this.engine) == null || o.setReadonly(t || !!this.config.readonly), this.setToolbarControlsDisabled(t);
|
|
3769
|
+
}
|
|
3770
|
+
/**
|
|
3771
|
+
* Disable (or give back) every control the default toolbar rendered. Controls that were already
|
|
3772
|
+
* disabled for another reason are marked untouched, so enabling the editor does not wake them up.
|
|
3773
|
+
*/
|
|
3774
|
+
setToolbarControlsDisabled(t) {
|
|
3775
|
+
if (!this.toolbarElement) return;
|
|
3776
|
+
this.toolbarElement.querySelectorAll(
|
|
3777
|
+
"button, input, select, textarea"
|
|
3778
|
+
).forEach((o) => {
|
|
3779
|
+
t ? o.disabled || (o.disabled = !0, o.setAttribute(we, "")) : o.hasAttribute(we) && (o.disabled = !1, o.removeAttribute(we));
|
|
3780
|
+
});
|
|
3781
|
+
}
|
|
3699
3782
|
/**
|
|
3700
3783
|
* Setup event listeners
|
|
3701
3784
|
*/
|
|
@@ -3716,23 +3799,20 @@ class $ extends vi {
|
|
|
3716
3799
|
let r = this.contentElement.innerHTML;
|
|
3717
3800
|
const a = (k = o == null ? void 0 : o.detail) == null ? void 0 : k.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = this.lastBeforeInputType;
|
|
3718
3801
|
if (this.lastBeforeInputType = null, p.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
|
|
3719
|
-
const
|
|
3720
|
-
if (
|
|
3802
|
+
const v = ko(r, c, p, a);
|
|
3803
|
+
if (v !== r) {
|
|
3721
3804
|
const T = window.getSelection(), et = T && T.rangeCount > 0 ? T.getRangeAt(0) : null;
|
|
3722
|
-
if (this.contentElement.innerHTML =
|
|
3805
|
+
if (this.contentElement.innerHTML = v, et && T)
|
|
3723
3806
|
try {
|
|
3724
3807
|
T.removeAllRanges(), T.addRange(et);
|
|
3725
3808
|
} catch (G) {
|
|
3726
3809
|
}
|
|
3727
|
-
r =
|
|
3810
|
+
r = v;
|
|
3728
3811
|
}
|
|
3729
3812
|
}
|
|
3730
3813
|
this.recordInputHistory(r), this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
|
|
3731
3814
|
const w = () => {
|
|
3732
|
-
this.
|
|
3733
|
-
detail: { html: Po(r) },
|
|
3734
|
-
bubbles: !0
|
|
3735
|
-
}));
|
|
3815
|
+
this.emitContentChange(Oo(r));
|
|
3736
3816
|
};
|
|
3737
3817
|
l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(w, l.debounceInputMs) : w(), this.updateStatusBar();
|
|
3738
3818
|
}), this.contentElement.addEventListener("contextmenu", (o) => {
|
|
@@ -3755,19 +3835,20 @@ class $ extends vi {
|
|
|
3755
3835
|
return;
|
|
3756
3836
|
}
|
|
3757
3837
|
if (a) {
|
|
3758
|
-
p.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (a =
|
|
3838
|
+
p.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (a = li(a, c, p)), this.insertHTMLAtSelection(a);
|
|
3759
3839
|
return;
|
|
3760
3840
|
}
|
|
3761
3841
|
l && document.execCommand("insertText", !1, l);
|
|
3762
3842
|
}), this.contentElement.addEventListener("focus", () => {
|
|
3763
3843
|
tt = this, this.dispatchEvent(new Event("editor-focus", { bubbles: !0 })), this.updateStatusBar();
|
|
3764
3844
|
}), this.contentElement.addEventListener("blur", () => {
|
|
3765
|
-
this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
}
|
|
3845
|
+
if (this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement) {
|
|
3846
|
+
const o = yt(this.contentElement);
|
|
3847
|
+
o !== this.lastReportedContent && this.emitContentChange(o);
|
|
3848
|
+
}
|
|
3849
|
+
this.dispatchEvent(new Event("editor-blur", { bubbles: !0 })), this.updateFloatingToolbar(), this.updateStatusBar();
|
|
3769
3850
|
}), this.contentElement.addEventListener("keydown", (o) => {
|
|
3770
|
-
this.getAccessibilityConfig().keyboardNavigation
|
|
3851
|
+
!this.getAccessibilityConfig().keyboardNavigation || this.isEditorDisabled() || t.handleKeyDown(o, (a, l) => {
|
|
3771
3852
|
this.executeCommand(a, l);
|
|
3772
3853
|
});
|
|
3773
3854
|
});
|
|
@@ -3777,6 +3858,12 @@ class $ extends vi {
|
|
|
3777
3858
|
};
|
|
3778
3859
|
this.selectionChangeHandler = e, document.addEventListener("selectionchange", this.selectionChangeHandler);
|
|
3779
3860
|
}
|
|
3861
|
+
emitContentChange(t) {
|
|
3862
|
+
this.lastReportedContent = t, this.dispatchEvent(new CustomEvent("content-change", {
|
|
3863
|
+
detail: { html: t },
|
|
3864
|
+
bubbles: !0
|
|
3865
|
+
}));
|
|
3866
|
+
}
|
|
3780
3867
|
getSelectionRangeInEditor() {
|
|
3781
3868
|
if (!this.contentElement) return null;
|
|
3782
3869
|
const t = window.getSelection();
|
|
@@ -3844,10 +3931,10 @@ class $ extends vi {
|
|
|
3844
3931
|
const t = this.getPerformanceConfig(), e = document.activeElement === this.contentElement || this.contentElement.contains(document.activeElement);
|
|
3845
3932
|
if (t.viewportOnlyScan && !this.isEditorInViewport() && !e)
|
|
3846
3933
|
return;
|
|
3847
|
-
const o = this.contentElement.textContent || "", { words: r, chars: a } =
|
|
3934
|
+
const o = this.contentElement.textContent || "", { words: r, chars: a } = vn(o), l = En(this.contentElement);
|
|
3848
3935
|
let c, p;
|
|
3849
3936
|
const m = this.getSelectionRangeInEditor();
|
|
3850
|
-
m && (c =
|
|
3937
|
+
m && (c = bn(this.contentElement, m), m.collapsed || (p = wn(m, c), c = void 0)), this.statusBar.update({
|
|
3851
3938
|
wordCount: r,
|
|
3852
3939
|
charCount: a,
|
|
3853
3940
|
lineCount: l,
|
|
@@ -3868,12 +3955,13 @@ class $ extends vi {
|
|
|
3868
3955
|
handleAttributeChange(t, e) {
|
|
3869
3956
|
switch (t) {
|
|
3870
3957
|
case "readonly":
|
|
3871
|
-
this.contentElement && (this.contentElement.contentEditable = this.isReadonlyAttribute(e) ? "false" : "true", this.applyAccessibilitySettings()), this.engine && this.engine.setReadonly(this.isReadonlyAttribute(e));
|
|
3958
|
+
this.contentElement && (this.contentElement.contentEditable = this.isReadonlyAttribute(e) || this.isEditorDisabled() ? "false" : "true", this.applyAccessibilitySettings()), this.engine && this.engine.setReadonly(this.isReadonlyAttribute(e) || this.isEditorDisabled());
|
|
3959
|
+
break;
|
|
3960
|
+
case "disabled":
|
|
3961
|
+
this.applyDisabledState();
|
|
3872
3962
|
break;
|
|
3873
3963
|
case "theme":
|
|
3874
|
-
this.
|
|
3875
|
-
o.startsWith("editora-theme-") && this.classList.remove(o);
|
|
3876
|
-
}), e && this.classList.add(`editora-theme-${e}`);
|
|
3964
|
+
this.applyThemeClass(e);
|
|
3877
3965
|
break;
|
|
3878
3966
|
case "placeholder":
|
|
3879
3967
|
this.contentElement && (this.contentElement.setAttribute("data-placeholder", e), this.applyAccessibilitySettings());
|
|
@@ -3923,14 +4011,20 @@ class $ extends vi {
|
|
|
3923
4011
|
case "toolbar-sticky":
|
|
3924
4012
|
case "plugins":
|
|
3925
4013
|
case "statusbar":
|
|
3926
|
-
this.isConnected &&
|
|
3927
|
-
this.initialize().catch((o) => {
|
|
3928
|
-
console.error("[RichTextEditor] Error during attribute change re-initialization:", o);
|
|
3929
|
-
});
|
|
3930
|
-
}));
|
|
4014
|
+
this.isConnected && this.hasConnected && this.scheduleReinitialize();
|
|
3931
4015
|
break;
|
|
3932
4016
|
}
|
|
3933
4017
|
}
|
|
4018
|
+
/** One rebuild for however many attributes are changed in the same task. */
|
|
4019
|
+
scheduleReinitialize() {
|
|
4020
|
+
this.reinitializeQueued || (this.reinitializeQueued = !0, queueMicrotask(() => {
|
|
4021
|
+
this.reinitializeQueued = !1, this.isConnected && (this.destroy(), this.waitForPluginLoader().then(() => {
|
|
4022
|
+
this.initialize().catch((t) => {
|
|
4023
|
+
console.error("[RichTextEditor] Error during attribute change re-initialization:", t);
|
|
4024
|
+
});
|
|
4025
|
+
}));
|
|
4026
|
+
}));
|
|
4027
|
+
}
|
|
3934
4028
|
/**
|
|
3935
4029
|
* Resolve configuration from all sources
|
|
3936
4030
|
*/
|
|
@@ -3950,7 +4044,7 @@ class $ extends vi {
|
|
|
3950
4044
|
*/
|
|
3951
4045
|
getAPI() {
|
|
3952
4046
|
return {
|
|
3953
|
-
getContent: () =>
|
|
4047
|
+
getContent: () => yt(this.contentElement),
|
|
3954
4048
|
setContent: (t) => {
|
|
3955
4049
|
this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
|
|
3956
4050
|
},
|
|
@@ -3978,11 +4072,11 @@ class $ extends vi {
|
|
|
3978
4072
|
*/
|
|
3979
4073
|
destroy() {
|
|
3980
4074
|
var t, e, o, r;
|
|
3981
|
-
this.buildGeneration += 1, this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && (this.preservedContent =
|
|
4075
|
+
this.buildGeneration += 1, this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && (this.preservedContent = yt(this.contentElement), this.persistAutosave(this.preservedContent)), this.stopAutosave(), this.selectionChangeHandler && (document.removeEventListener("selectionchange", this.selectionChangeHandler), this.selectionChangeHandler = void 0), (t = this.engine) == null || t.destroy(), (e = this.toolbar) == null || e.destroy(), (o = this.floatingToolbar) == null || o.destroy(), (r = this.statusBar) == null || r.destroy(), this.innerHTML = "", this.contentElement = void 0, this.toolbarElement = void 0, this.statusBarElement = void 0, this.loadedPlugins = [], this.lastReportedContent = null, this.isInitialized = !1, Se.delete(this), tt === this && (tt = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
|
|
3982
4076
|
}
|
|
3983
4077
|
// Public API methods
|
|
3984
4078
|
getContent() {
|
|
3985
|
-
return
|
|
4079
|
+
return yt(this.contentElement);
|
|
3986
4080
|
}
|
|
3987
4081
|
setContent(t) {
|
|
3988
4082
|
this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
|
|
@@ -3999,9 +4093,9 @@ class $ extends vi {
|
|
|
3999
4093
|
(t = this.contentElement) == null || t.blur();
|
|
4000
4094
|
}
|
|
4001
4095
|
}
|
|
4002
|
-
const Vt = new
|
|
4096
|
+
const Vt = new _o();
|
|
4003
4097
|
$.__globalPluginLoader = Vt;
|
|
4004
|
-
const
|
|
4098
|
+
const Ti = {
|
|
4005
4099
|
// Core editing plugins (always loaded)
|
|
4006
4100
|
bold: () => import("./BoldPlugin.native-CSh_LiIJ.mjs").then((n) => n.BoldPlugin()),
|
|
4007
4101
|
italic: () => import("./ItalicPlugin.native-CmnlwFHB.mjs").then((n) => n.ItalicPlugin()),
|
|
@@ -4031,9 +4125,9 @@ const Ei = {
|
|
|
4031
4125
|
link: () => import("./LinkPlugin.native-Dt_p6Ukb.mjs").then((n) => n.LinkPlugin()),
|
|
4032
4126
|
table: () => import("./TablePlugin.native-1TvjRqv1.mjs").then((n) => n.TablePlugin()),
|
|
4033
4127
|
trackChanges: () => import("./TrackChangesPlugin.native-Bghu2q4a.mjs").then((n) => n.TrackChangesPlugin()),
|
|
4034
|
-
versionDiff: () => import("./VersionDiffPlugin.native-
|
|
4035
|
-
"version-diff": () => import("./VersionDiffPlugin.native-
|
|
4036
|
-
versiondiff: () => import("./VersionDiffPlugin.native-
|
|
4128
|
+
versionDiff: () => import("./VersionDiffPlugin.native-2v8ZaZWN.mjs").then((n) => n.VersionDiffPlugin()),
|
|
4129
|
+
"version-diff": () => import("./VersionDiffPlugin.native-2v8ZaZWN.mjs").then((n) => n.VersionDiffPlugin()),
|
|
4130
|
+
versiondiff: () => import("./VersionDiffPlugin.native-2v8ZaZWN.mjs").then((n) => n.VersionDiffPlugin()),
|
|
4037
4131
|
conditionalContent: () => import("./ConditionalContentPlugin.native-B3R6xcqn.mjs").then((n) => n.ConditionalContentPlugin()),
|
|
4038
4132
|
"conditional-content": () => import("./ConditionalContentPlugin.native-B3R6xcqn.mjs").then((n) => n.ConditionalContentPlugin()),
|
|
4039
4133
|
conditionalcontent: () => import("./ConditionalContentPlugin.native-B3R6xcqn.mjs").then((n) => n.ConditionalContentPlugin()),
|
|
@@ -4080,18 +4174,18 @@ const Ei = {
|
|
|
4080
4174
|
emojis: () => import("./EmojisPlugin.native-B64efKg5.mjs").then((n) => n.EmojisPlugin()),
|
|
4081
4175
|
a11yChecker: () => import("./A11yCheckerPlugin.native-BBCsR5Ur.mjs").then((n) => n.A11yCheckerPlugin()),
|
|
4082
4176
|
comments: () => import("./CommentsPlugin.native-CxdTwTGE.mjs").then((n) => n.CommentsPlugin()),
|
|
4083
|
-
collaboration: () => import("./CollaborationPlugin.native-
|
|
4177
|
+
collaboration: () => import("./CollaborationPlugin.native-8gcyVRnR.mjs").then((n) => n.CollaborationPlugin()),
|
|
4084
4178
|
"document-manager": () => import("./DocumentManagerPlugin.native-CaBqCH-p.mjs").then((n) => n.DocumentManagerPlugin()),
|
|
4085
4179
|
fullscreen: () => import("./FullscreenPlugin.native-ChXyxeNw.mjs").then((n) => n.FullscreenPlugin()),
|
|
4086
4180
|
template: () => import("./TemplatePlugin.native-OD8Wc1R7.mjs").then((n) => n.TemplatePlugin()),
|
|
4087
4181
|
footnote: () => import("./FootnotePlugin.native-D730OGRm.mjs").then((n) => n.FootnotePlugin())
|
|
4088
4182
|
};
|
|
4089
|
-
async function
|
|
4090
|
-
return Object.entries(
|
|
4183
|
+
async function Ci() {
|
|
4184
|
+
return Object.entries(Ti).forEach(([n, t]) => {
|
|
4091
4185
|
Vt.register(n, t);
|
|
4092
4186
|
}), Vt;
|
|
4093
4187
|
}
|
|
4094
|
-
typeof window != "undefined" &&
|
|
4188
|
+
typeof window != "undefined" && Ci().then((n) => {
|
|
4095
4189
|
$.__globalPluginLoader = n, customElements.get("editora-editor") || customElements.define("editora-editor", $);
|
|
4096
4190
|
const t = document.querySelectorAll("editora-editor:not([data-initial-content])"), e = [];
|
|
4097
4191
|
t.forEach((a) => {
|
|
@@ -4114,6 +4208,6 @@ typeof window != "undefined" && wi().then((n) => {
|
|
|
4114
4208
|
});
|
|
4115
4209
|
export {
|
|
4116
4210
|
$ as RichTextEditorElement,
|
|
4117
|
-
|
|
4211
|
+
Ci as initWebComponent
|
|
4118
4212
|
};
|
|
4119
4213
|
//# sourceMappingURL=webcomponent.js.map
|