@editora/core 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CollaborationPlugin.native-Bl3R9CRI.mjs → CollaborationPlugin.native-B2AsCMfm.mjs} +88 -88
- package/dist/core.css +1 -1
- package/dist/editora.min.js +16 -16
- package/dist/editora.umd.js +16 -16
- package/dist/{index-gI4djib2.mjs → index-8sr_lMjf.mjs} +428 -423
- package/dist/index-hTD8Iy46.js +12 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/plugin-loader.js +1 -1
- package/dist/webcomponent-core.js +425 -420
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +16 -16
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +452 -447
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +108 -108
- package/package.json +1 -1
- package/dist/index-DHPPVQwx.js +0 -12
package/dist/webcomponent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Co {
|
|
2
2
|
constructor() {
|
|
3
3
|
this.loadedPlugins = /* @__PURE__ */ new Map(), this.pluginRegistry = /* @__PURE__ */ new Map();
|
|
4
4
|
}
|
|
@@ -72,16 +72,16 @@ class xo {
|
|
|
72
72
|
return this.loadedPlugins.has(t);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
class
|
|
75
|
+
class Yt {
|
|
76
76
|
constructor(t, e, o) {
|
|
77
77
|
this.doc = t, this.selection = e, this.schema = o;
|
|
78
78
|
}
|
|
79
79
|
static create(t, e) {
|
|
80
80
|
const o = e || t.node("doc", {}, [t.node("paragraph")]);
|
|
81
|
-
return new
|
|
81
|
+
return new Yt(o, { anchor: 0, head: 0 }, t);
|
|
82
82
|
}
|
|
83
83
|
apply(t, e) {
|
|
84
|
-
return new
|
|
84
|
+
return new Yt(t, e || this.selection, this.schema);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
class ln {
|
|
@@ -233,7 +233,7 @@ class un {
|
|
|
233
233
|
constructor(t = {}) {
|
|
234
234
|
this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new cn(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((o) => this.pluginManager.register(o));
|
|
235
235
|
const e = this.pluginManager.buildSchema();
|
|
236
|
-
this.state =
|
|
236
|
+
this.state = Yt.create(e), this.commandRegistry = new dn(this.pluginManager.getCommands());
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
239
|
* Execute a command
|
|
@@ -410,53 +410,53 @@ class pn {
|
|
|
410
410
|
const f = [];
|
|
411
411
|
c.split(/\s+/).filter(Boolean).forEach((g) => {
|
|
412
412
|
if (g === "direction") {
|
|
413
|
-
const
|
|
414
|
-
|
|
413
|
+
const E = a.get("setDirectionLTR"), T = a.get("setDirectionRTL");
|
|
414
|
+
E && f.push({
|
|
415
415
|
id: "directionLTR",
|
|
416
|
-
label:
|
|
417
|
-
command:
|
|
418
|
-
icon:
|
|
419
|
-
type:
|
|
420
|
-
options:
|
|
421
|
-
}),
|
|
416
|
+
label: E.label,
|
|
417
|
+
command: E.command,
|
|
418
|
+
icon: E.icon,
|
|
419
|
+
type: E.type || "button",
|
|
420
|
+
options: E.options
|
|
421
|
+
}), T && f.push({
|
|
422
422
|
id: "directionRTL",
|
|
423
|
-
label:
|
|
424
|
-
command:
|
|
425
|
-
icon:
|
|
426
|
-
type:
|
|
427
|
-
options:
|
|
423
|
+
label: T.label,
|
|
424
|
+
command: T.command,
|
|
425
|
+
icon: T.icon,
|
|
426
|
+
type: T.type || "button",
|
|
427
|
+
options: T.options
|
|
428
428
|
});
|
|
429
429
|
return;
|
|
430
430
|
}
|
|
431
431
|
if (g === "comments") {
|
|
432
|
-
const
|
|
433
|
-
|
|
432
|
+
const E = a.get("addComment"), T = a.get("toggleComments");
|
|
433
|
+
E && f.push({
|
|
434
434
|
id: "addComment",
|
|
435
|
-
label:
|
|
436
|
-
command:
|
|
437
|
-
icon:
|
|
438
|
-
type:
|
|
439
|
-
options:
|
|
440
|
-
}),
|
|
435
|
+
label: E.label,
|
|
436
|
+
command: E.command,
|
|
437
|
+
icon: E.icon,
|
|
438
|
+
type: E.type || "button",
|
|
439
|
+
options: E.options
|
|
440
|
+
}), T && f.push({
|
|
441
441
|
id: "toggleComments",
|
|
442
|
-
label:
|
|
443
|
-
command:
|
|
444
|
-
icon:
|
|
445
|
-
type:
|
|
446
|
-
options:
|
|
442
|
+
label: T.label,
|
|
443
|
+
command: T.command,
|
|
444
|
+
icon: T.icon,
|
|
445
|
+
type: T.type || "button",
|
|
446
|
+
options: T.options
|
|
447
447
|
});
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
|
|
450
|
+
const w = l[g] || g;
|
|
451
|
+
let k = a.get(w);
|
|
452
|
+
k || (k = a.get(g)), k && f.push({
|
|
453
453
|
id: g,
|
|
454
|
-
label:
|
|
455
|
-
command:
|
|
456
|
-
icon:
|
|
457
|
-
type:
|
|
458
|
-
options:
|
|
459
|
-
items:
|
|
454
|
+
label: k.label,
|
|
455
|
+
command: k.command,
|
|
456
|
+
icon: k.icon,
|
|
457
|
+
type: k.type === "separator" ? "separator" : k.type || "button",
|
|
458
|
+
options: k.options,
|
|
459
|
+
items: k.items
|
|
460
460
|
});
|
|
461
461
|
}), f.length > 0 && e.push(f);
|
|
462
462
|
}), e;
|
|
@@ -490,7 +490,8 @@ class pn {
|
|
|
490
490
|
/** Measures top-level items in `itemsContainer` and moves whatever doesn't
|
|
491
491
|
* fit into a collapsible "more options" row, re-measuring on resize. */
|
|
492
492
|
setupOverflow(t) {
|
|
493
|
-
|
|
493
|
+
const e = this.itemsContainer;
|
|
494
|
+
if (!e || typeof ResizeObserver == "undefined") return;
|
|
494
495
|
const o = document.createElement("button");
|
|
495
496
|
o.type = "button", o.className = "editora-toolbar-more-button", o.title = "Show more options", o.setAttribute("aria-label", "More toolbar options"), o.textContent = "☰", o.style.display = "none", o.addEventListener("click", (c) => {
|
|
496
497
|
c.preventDefault(), this.setExpandedOpen(!this.expandedOpen);
|
|
@@ -500,23 +501,25 @@ class pn {
|
|
|
500
501
|
const a = () => {
|
|
501
502
|
const c = this.overflowUnits;
|
|
502
503
|
if (c.length === 0) return;
|
|
503
|
-
c.forEach((
|
|
504
|
-
var
|
|
505
|
-
|
|
504
|
+
c.forEach((B) => {
|
|
505
|
+
var D;
|
|
506
|
+
B.parentElement === r && ((D = this.overflowUnitHomes.get(B)) == null || D.appendChild(B));
|
|
506
507
|
});
|
|
507
|
-
const f = t.clientWidth, m = 16, g = 40,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
508
|
+
const f = t.clientWidth, m = 16, g = 40, w = 4, k = Math.max(0, f - m), E = Math.max(0, k - g - w), T = getComputedStyle(t).direction === "rtl", et = e.getBoundingClientRect(), G = (B) => {
|
|
509
|
+
const D = B.getBoundingClientRect();
|
|
510
|
+
return T ? et.right - D.left : D.right - et.left;
|
|
511
|
+
};
|
|
512
|
+
let z = 0;
|
|
513
|
+
if (G(c[c.length - 1]) <= k)
|
|
514
|
+
z = c.length;
|
|
515
|
+
else
|
|
516
|
+
for (const B of c)
|
|
517
|
+
if (G(B) <= E) z++;
|
|
518
|
+
else break;
|
|
519
|
+
z = Math.max(1, Math.min(z, c.length));
|
|
520
|
+
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, D) => {
|
|
522
|
+
D >= z && r.appendChild(B);
|
|
520
523
|
});
|
|
521
524
|
}, l = () => {
|
|
522
525
|
this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), this.overflowRafId = requestAnimationFrame(a);
|
|
@@ -618,26 +621,26 @@ class pn {
|
|
|
618
621
|
var g;
|
|
619
622
|
m.detail === 0 && l() && ((g = a()[0]) == null || g.focus());
|
|
620
623
|
}), e.addEventListener("keydown", (m) => {
|
|
621
|
-
var
|
|
624
|
+
var w;
|
|
622
625
|
if (m.key !== "ArrowDown" && m.key !== "ArrowUp") return;
|
|
623
626
|
m.preventDefault(), l() || e.click();
|
|
624
627
|
const g = a();
|
|
625
|
-
(
|
|
628
|
+
(w = m.key === "ArrowUp" ? g[g.length - 1] : g[0]) == null || w.focus();
|
|
626
629
|
}), o.addEventListener("keydown", (m) => {
|
|
627
630
|
const g = a();
|
|
628
631
|
if (g.length === 0) return;
|
|
629
|
-
const
|
|
630
|
-
m.preventDefault(), g[(
|
|
632
|
+
const w = g.indexOf(document.activeElement), k = (E) => {
|
|
633
|
+
m.preventDefault(), g[(E + g.length) % g.length].focus();
|
|
631
634
|
};
|
|
632
635
|
switch (m.key) {
|
|
633
636
|
case "ArrowDown":
|
|
634
|
-
return
|
|
637
|
+
return k(w + 1);
|
|
635
638
|
case "ArrowUp":
|
|
636
|
-
return
|
|
639
|
+
return k(w < 0 ? g.length - 1 : w - 1);
|
|
637
640
|
case "Home":
|
|
638
|
-
return
|
|
641
|
+
return k(0);
|
|
639
642
|
case "End":
|
|
640
|
-
return
|
|
643
|
+
return k(g.length - 1);
|
|
641
644
|
case "Escape":
|
|
642
645
|
m.preventDefault(), m.stopPropagation(), o.style.display = "none", e.focus();
|
|
643
646
|
return;
|
|
@@ -886,7 +889,7 @@ function yn(n) {
|
|
|
886
889
|
const t = n.trim() ? n.trim().split(/\s+/).length : 0, e = n.length;
|
|
887
890
|
return { words: t, chars: e };
|
|
888
891
|
}
|
|
889
|
-
function
|
|
892
|
+
function vn(n, t) {
|
|
890
893
|
const e = n.toString();
|
|
891
894
|
return {
|
|
892
895
|
startLine: t.line,
|
|
@@ -898,7 +901,7 @@ function En(n, t) {
|
|
|
898
901
|
selectedWords: e.trim().split(/\s+/).filter(Boolean).length
|
|
899
902
|
};
|
|
900
903
|
}
|
|
901
|
-
class
|
|
904
|
+
class En {
|
|
902
905
|
constructor(t) {
|
|
903
906
|
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) => {
|
|
904
907
|
this.registerShortcut(e);
|
|
@@ -1263,7 +1266,7 @@ function Tn() {
|
|
|
1263
1266
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1264
1267
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1265
1268
|
}
|
|
1266
|
-
function
|
|
1269
|
+
function xn(n, t) {
|
|
1267
1270
|
return wn(n) || kn(n, t) || An(n, t) || Tn();
|
|
1268
1271
|
}
|
|
1269
1272
|
function An(n, t) {
|
|
@@ -1273,60 +1276,60 @@ function An(n, t) {
|
|
|
1273
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) ? ro(n, t) : void 0;
|
|
1274
1277
|
}
|
|
1275
1278
|
}
|
|
1276
|
-
const So = Object.entries, ao = Object.setPrototypeOf,
|
|
1277
|
-
let M = Object.freeze, I = Object.seal,
|
|
1279
|
+
const So = Object.entries, ao = Object.setPrototypeOf, Cn = Object.isFrozen, Sn = Object.getPrototypeOf, Ln = Object.getOwnPropertyDescriptor;
|
|
1280
|
+
let M = Object.freeze, I = Object.seal, yt = Object.create, Lo = typeof Reflect != "undefined" && Reflect, Te = Lo.apply, xe = Lo.construct;
|
|
1278
1281
|
M || (M = function(t) {
|
|
1279
1282
|
return t;
|
|
1280
1283
|
});
|
|
1281
1284
|
I || (I = function(t) {
|
|
1282
1285
|
return t;
|
|
1283
1286
|
});
|
|
1284
|
-
|
|
1287
|
+
Te || (Te = function(t, e) {
|
|
1285
1288
|
for (var o = arguments.length, r = new Array(o > 2 ? o - 2 : 0), a = 2; a < o; a++) r[a - 2] = arguments[a];
|
|
1286
1289
|
return t.apply(e, r);
|
|
1287
1290
|
});
|
|
1288
|
-
|
|
1291
|
+
xe || (xe = function(t) {
|
|
1289
1292
|
for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) o[r - 1] = arguments[r];
|
|
1290
1293
|
return new t(...o);
|
|
1291
1294
|
});
|
|
1292
|
-
const
|
|
1293
|
-
function
|
|
1295
|
+
const at = _(Array.prototype.forEach), _n = _(Array.prototype.lastIndexOf), so = _(Array.prototype.pop), At = _(Array.prototype.push), Mn = _(Array.prototype.splice), vt = Array.isArray, Mt = _(String.prototype.toLowerCase), me = _(String.prototype.toString), lo = _(String.prototype.match), Ct = _(String.prototype.replace), co = _(String.prototype.indexOf), In = _(String.prototype.trim), Pn = _(Number.prototype.toString), Dn = _(Boolean.prototype.toString), uo = typeof BigInt == "undefined" ? null : _(BigInt.prototype.toString), po = typeof Symbol == "undefined" ? null : _(Symbol.prototype.toString), N = _(Object.prototype.hasOwnProperty), St = _(Object.prototype.toString), P = _(RegExp.prototype.test), J = On(TypeError);
|
|
1296
|
+
function _(n) {
|
|
1294
1297
|
return function(t) {
|
|
1295
1298
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
1296
1299
|
for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) o[r - 1] = arguments[r];
|
|
1297
|
-
return
|
|
1300
|
+
return Te(n, t, o);
|
|
1298
1301
|
};
|
|
1299
1302
|
}
|
|
1300
1303
|
function On(n) {
|
|
1301
1304
|
return function() {
|
|
1302
1305
|
for (var t = arguments.length, e = new Array(t), o = 0; o < t; o++) e[o] = arguments[o];
|
|
1303
|
-
return
|
|
1306
|
+
return xe(n, e);
|
|
1304
1307
|
};
|
|
1305
1308
|
}
|
|
1306
|
-
function
|
|
1307
|
-
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
1308
|
-
if (ao && ao(n, null), !
|
|
1309
|
+
function v(n, t) {
|
|
1310
|
+
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Mt;
|
|
1311
|
+
if (ao && ao(n, null), !vt(t)) return n;
|
|
1309
1312
|
let o = t.length;
|
|
1310
1313
|
for (; o--; ) {
|
|
1311
1314
|
let r = t[o];
|
|
1312
1315
|
if (typeof r == "string") {
|
|
1313
1316
|
const a = e(r);
|
|
1314
|
-
a !== r && (
|
|
1317
|
+
a !== r && (Cn(t) || (t[o] = a), r = a);
|
|
1315
1318
|
}
|
|
1316
1319
|
n[r] = !0;
|
|
1317
1320
|
}
|
|
1318
1321
|
return n;
|
|
1319
1322
|
}
|
|
1320
1323
|
function Rn(n) {
|
|
1321
|
-
for (let t = 0; t < n.length; t++)
|
|
1324
|
+
for (let t = 0; t < n.length; t++) N(n, t) || (n[t] = null);
|
|
1322
1325
|
return n;
|
|
1323
1326
|
}
|
|
1324
|
-
function
|
|
1325
|
-
const t =
|
|
1327
|
+
function U(n) {
|
|
1328
|
+
const t = yt(null);
|
|
1326
1329
|
for (const o of So(n)) {
|
|
1327
|
-
var e =
|
|
1330
|
+
var e = xn(o, 2);
|
|
1328
1331
|
const r = e[0], a = e[1];
|
|
1329
|
-
|
|
1332
|
+
N(n, r) && (vt(a) ? t[r] = Rn(a) : a && typeof a == "object" && a.constructor === Object ? t[r] = U(a) : t[r] = a);
|
|
1330
1333
|
}
|
|
1331
1334
|
return t;
|
|
1332
1335
|
}
|
|
@@ -1343,27 +1346,27 @@ function Nn(n) {
|
|
|
1343
1346
|
case "symbol":
|
|
1344
1347
|
return po ? po(n) : "Symbol()";
|
|
1345
1348
|
case "undefined":
|
|
1346
|
-
return
|
|
1349
|
+
return St(n);
|
|
1347
1350
|
case "function":
|
|
1348
1351
|
case "object": {
|
|
1349
|
-
if (n === null) return
|
|
1350
|
-
const t = n, e =
|
|
1352
|
+
if (n === null) return St(n);
|
|
1353
|
+
const t = n, e = W(t, "toString");
|
|
1351
1354
|
if (typeof e == "function") {
|
|
1352
1355
|
const o = e(t);
|
|
1353
|
-
return typeof o == "string" ? o :
|
|
1356
|
+
return typeof o == "string" ? o : St(o);
|
|
1354
1357
|
}
|
|
1355
|
-
return
|
|
1358
|
+
return St(n);
|
|
1356
1359
|
}
|
|
1357
1360
|
default:
|
|
1358
|
-
return
|
|
1361
|
+
return St(n);
|
|
1359
1362
|
}
|
|
1360
1363
|
}
|
|
1361
|
-
function
|
|
1364
|
+
function W(n, t) {
|
|
1362
1365
|
for (; n !== null; ) {
|
|
1363
|
-
const o =
|
|
1366
|
+
const o = Ln(n, t);
|
|
1364
1367
|
if (o) {
|
|
1365
|
-
if (o.get) return
|
|
1366
|
-
if (typeof o.value == "function") return
|
|
1368
|
+
if (o.get) return _(o.get);
|
|
1369
|
+
if (typeof o.value == "function") return _(o.value);
|
|
1367
1370
|
}
|
|
1368
1371
|
n = Sn(n);
|
|
1369
1372
|
}
|
|
@@ -1499,7 +1502,7 @@ const fo = M([
|
|
|
1499
1502
|
"var",
|
|
1500
1503
|
"video",
|
|
1501
1504
|
"wbr"
|
|
1502
|
-
]),
|
|
1505
|
+
]), ge = M([
|
|
1503
1506
|
"svg",
|
|
1504
1507
|
"a",
|
|
1505
1508
|
"altglyph",
|
|
@@ -1547,7 +1550,7 @@ const fo = M([
|
|
|
1547
1550
|
"tspan",
|
|
1548
1551
|
"view",
|
|
1549
1552
|
"vkern"
|
|
1550
|
-
]),
|
|
1553
|
+
]), be = M([
|
|
1551
1554
|
"feBlend",
|
|
1552
1555
|
"feColorMatrix",
|
|
1553
1556
|
"feComponentTransfer",
|
|
@@ -1596,7 +1599,7 @@ const fo = M([
|
|
|
1596
1599
|
"solidcolor",
|
|
1597
1600
|
"unknown",
|
|
1598
1601
|
"use"
|
|
1599
|
-
]),
|
|
1602
|
+
]), ye = M([
|
|
1600
1603
|
"math",
|
|
1601
1604
|
"menclose",
|
|
1602
1605
|
"merror",
|
|
@@ -1762,7 +1765,7 @@ const fo = M([
|
|
|
1762
1765
|
"width",
|
|
1763
1766
|
"wrap",
|
|
1764
1767
|
"xmlns"
|
|
1765
|
-
]),
|
|
1768
|
+
]), ve = M([
|
|
1766
1769
|
"accent-height",
|
|
1767
1770
|
"accumulate",
|
|
1768
1771
|
"additive",
|
|
@@ -2010,13 +2013,13 @@ const fo = M([
|
|
|
2010
2013
|
"voffset",
|
|
2011
2014
|
"width",
|
|
2012
2015
|
"xmlns"
|
|
2013
|
-
]),
|
|
2016
|
+
]), Gt = M([
|
|
2014
2017
|
"xlink:href",
|
|
2015
2018
|
"xml:id",
|
|
2016
2019
|
"xlink:title",
|
|
2017
2020
|
"xml:space",
|
|
2018
2021
|
"xmlns:xlink"
|
|
2019
|
-
]), Hn = I(/{{[\w\W]*|^[\w\W]*}}/g), Un = I(/<%[\w\W]*|^[\w\W]*%>/g), jn = I(/\${[\w\W]*/g), Wn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), $n = I(/^aria-[\-\w]+$/), bo = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gn = I(/^(?:\w+script|data):/i), Kn = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), qn = I(/^html$/i), Yn = I(/^[a-z][.\w]*(-[.\w]+)+$/i), yo = I(/<[/\w!]/g),
|
|
2022
|
+
]), Hn = I(/{{[\w\W]*|^[\w\W]*}}/g), Un = I(/<%[\w\W]*|^[\w\W]*%>/g), jn = I(/\${[\w\W]*/g), Wn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), $n = I(/^aria-[\-\w]+$/), bo = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gn = I(/^(?:\w+script|data):/i), Kn = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), qn = I(/^html$/i), Yn = I(/^[a-z][.\w]*(-[.\w]+)+$/i), yo = I(/<[/\w!]/g), vo = I(/<[/\w]/g), Vn = I(/<\/no(script|embed|frames)/i), Xn = I(/\/>/i), H = {
|
|
2020
2023
|
element: 1,
|
|
2021
2024
|
attribute: 2,
|
|
2022
2025
|
text: 3,
|
|
@@ -2029,7 +2032,7 @@ const fo = M([
|
|
|
2029
2032
|
documentType: 10,
|
|
2030
2033
|
documentFragment: 11,
|
|
2031
2034
|
notation: 12
|
|
2032
|
-
},
|
|
2035
|
+
}, _o = [
|
|
2033
2036
|
"style",
|
|
2034
2037
|
"script",
|
|
2035
2038
|
"xmp",
|
|
@@ -2038,9 +2041,9 @@ const fo = M([
|
|
|
2038
2041
|
"noframes",
|
|
2039
2042
|
"plaintext",
|
|
2040
2043
|
"noscript"
|
|
2041
|
-
], Zn = M(
|
|
2044
|
+
], Zn = M(v({}, _o)), Jn = (function() {
|
|
2042
2045
|
const n = {};
|
|
2043
|
-
return
|
|
2046
|
+
return at(_o, (t) => {
|
|
2044
2047
|
n[t] = I(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
2045
2048
|
}), M(n);
|
|
2046
2049
|
})(), Qn = function() {
|
|
@@ -2063,7 +2066,7 @@ const fo = M([
|
|
|
2063
2066
|
} catch (l) {
|
|
2064
2067
|
return console.warn("TrustedTypes policy " + a + " could not be created."), null;
|
|
2065
2068
|
}
|
|
2066
|
-
},
|
|
2069
|
+
}, Eo = function() {
|
|
2067
2070
|
return {
|
|
2068
2071
|
afterSanitizeAttributes: [],
|
|
2069
2072
|
afterSanitizeElements: [],
|
|
@@ -2075,70 +2078,70 @@ const fo = M([
|
|
|
2075
2078
|
uponSanitizeElement: [],
|
|
2076
2079
|
uponSanitizeShadowNode: []
|
|
2077
2080
|
};
|
|
2078
|
-
},
|
|
2079
|
-
return
|
|
2081
|
+
}, Q = function(t, e, o, r) {
|
|
2082
|
+
return N(t, e) && vt(t[e]) ? v(r.base ? U(r.base) : {}, t[e], r.transform) : o;
|
|
2080
2083
|
}, Ee = function(t, e, o) {
|
|
2081
|
-
const r =
|
|
2082
|
-
return r && typeof r == "object" ?
|
|
2084
|
+
const r = N(t, e) ? t[e] : void 0;
|
|
2085
|
+
return r && typeof r == "object" ? U(r) : o();
|
|
2083
2086
|
};
|
|
2084
2087
|
function Mo() {
|
|
2085
2088
|
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qn();
|
|
2086
2089
|
const t = (u) => Mo(u);
|
|
2087
|
-
if (t.version = "3.4.16", t.removed = [], !n || !n.document || n.document.nodeType !==
|
|
2090
|
+
if (t.version = "3.4.16", t.removed = [], !n || !n.document || n.document.nodeType !== H.document || !n.Element)
|
|
2088
2091
|
return t.isSupported = !1, t;
|
|
2089
2092
|
let e = n.document;
|
|
2090
2093
|
const o = e, r = o.currentScript;
|
|
2091
2094
|
n.DocumentFragment;
|
|
2092
2095
|
const a = n.HTMLTemplateElement, l = n.Node, c = n.Element, f = n.NodeFilter;
|
|
2093
2096
|
n.NamedNodeMap === void 0 && (n.NamedNodeMap || n.MozNamedAttrMap), n.HTMLFormElement;
|
|
2094
|
-
const m = n.DOMParser, g = n.trustedTypes,
|
|
2095
|
-
return
|
|
2096
|
-
},
|
|
2097
|
-
return
|
|
2097
|
+
const m = n.DOMParser, g = n.trustedTypes, w = c.prototype, k = W(w, "cloneNode"), E = 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"), D = l && l.prototype ? W(l.prototype, "nodeType") : null, lt = l && l.prototype ? W(l.prototype, "nodeName") : null, It = l && l.prototype ? W(l.prototype, "ownerDocument") : null, Et = function(i) {
|
|
2098
|
+
return D ? D(i) : i.nodeType;
|
|
2099
|
+
}, Zt = function(i) {
|
|
2100
|
+
return lt ? lt(i) : i.nodeName;
|
|
2098
2101
|
};
|
|
2099
2102
|
if (typeof a == "function") {
|
|
2100
2103
|
const u = e.createElement("template");
|
|
2101
2104
|
u.content && u.content.ownerDocument && (e = u.content.ownerDocument);
|
|
2102
2105
|
}
|
|
2103
|
-
let
|
|
2104
|
-
const
|
|
2105
|
-
if (
|
|
2106
|
-
},
|
|
2107
|
-
|
|
2106
|
+
let R, ot = "", Jt, Se = !1, wt = 0;
|
|
2107
|
+
const Le = function() {
|
|
2108
|
+
if (wt > 0) throw J('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
|
+
}, ct = function(i) {
|
|
2110
|
+
Le(), wt++;
|
|
2108
2111
|
try {
|
|
2109
|
-
return
|
|
2112
|
+
return R.createHTML(i);
|
|
2110
2113
|
} finally {
|
|
2111
|
-
|
|
2114
|
+
wt--;
|
|
2112
2115
|
}
|
|
2113
2116
|
}, Do = function(i) {
|
|
2114
|
-
|
|
2117
|
+
Le(), wt++;
|
|
2115
2118
|
try {
|
|
2116
|
-
return
|
|
2119
|
+
return R.createScriptURL(i);
|
|
2117
2120
|
} finally {
|
|
2118
|
-
|
|
2121
|
+
wt--;
|
|
2119
2122
|
}
|
|
2120
2123
|
}, Oo = function() {
|
|
2121
|
-
return Se || (
|
|
2122
|
-
},
|
|
2123
|
-
let
|
|
2124
|
-
t.isSupported = typeof So == "function" && typeof
|
|
2124
|
+
return Se || (Jt = ti(g, r), Se = !0), Jt;
|
|
2125
|
+
}, Pt = e, Qt = Pt.implementation, _e = Pt.createNodeIterator, Ro = Pt.createDocumentFragment, No = Pt.getElementsByTagName, zo = o.importNode;
|
|
2126
|
+
let x = Eo();
|
|
2127
|
+
t.isSupported = typeof So == "function" && typeof z == "function" && Qt && Qt.createHTMLDocument !== void 0;
|
|
2125
2128
|
const Bo = Hn, Fo = Un, Ho = jn, Uo = Wn, jo = $n, Wo = Gn, Me = Kn, $o = Yn;
|
|
2126
2129
|
let Ie = bo, A = null;
|
|
2127
|
-
const
|
|
2130
|
+
const te = v({}, [
|
|
2128
2131
|
...fo,
|
|
2129
|
-
...me,
|
|
2130
2132
|
...ge,
|
|
2131
2133
|
...be,
|
|
2134
|
+
...ye,
|
|
2132
2135
|
...ho
|
|
2133
2136
|
]);
|
|
2134
|
-
let
|
|
2135
|
-
const
|
|
2137
|
+
let C = null;
|
|
2138
|
+
const ee = v({}, [
|
|
2136
2139
|
...mo,
|
|
2137
|
-
...
|
|
2140
|
+
...ve,
|
|
2138
2141
|
...go,
|
|
2139
|
-
...
|
|
2142
|
+
...Gt
|
|
2140
2143
|
]);
|
|
2141
|
-
let
|
|
2144
|
+
let K = Object.seal(yt(null, {
|
|
2142
2145
|
tagNameCheck: {
|
|
2143
2146
|
writable: !0,
|
|
2144
2147
|
configurable: !1,
|
|
@@ -2157,8 +2160,8 @@ function Mo() {
|
|
|
2157
2160
|
enumerable: !0,
|
|
2158
2161
|
value: !1
|
|
2159
2162
|
}
|
|
2160
|
-
})),
|
|
2161
|
-
const
|
|
2163
|
+
})), kt = null, Pe = null;
|
|
2164
|
+
const V = Object.seal(yt(null, {
|
|
2162
2165
|
tagCheck: {
|
|
2163
2166
|
writable: !0,
|
|
2164
2167
|
configurable: !1,
|
|
@@ -2172,10 +2175,10 @@ function Mo() {
|
|
|
2172
2175
|
value: null
|
|
2173
2176
|
}
|
|
2174
2177
|
}));
|
|
2175
|
-
let De = !0,
|
|
2178
|
+
let De = !0, oe = !0, Oe = !1, Re = !0, X = !1, nt = !0, it = !1, ne = !1, Dt = null, Ot = null, ie = !1, dt = !1, Rt = !1, Nt = !1, Ne = !0, ze = !1;
|
|
2176
2179
|
const Be = "user-content-";
|
|
2177
|
-
let
|
|
2178
|
-
const Fe =
|
|
2180
|
+
let re = !0, ae = !1, ut = {}, pt = null;
|
|
2181
|
+
const Fe = v({}, [
|
|
2179
2182
|
"annotation-xml",
|
|
2180
2183
|
"audio",
|
|
2181
2184
|
"colgroup",
|
|
@@ -2204,7 +2207,7 @@ function Mo() {
|
|
|
2204
2207
|
"xmp"
|
|
2205
2208
|
]);
|
|
2206
2209
|
let He = null;
|
|
2207
|
-
const Ue =
|
|
2210
|
+
const Ue = v({}, [
|
|
2208
2211
|
"audio",
|
|
2209
2212
|
"video",
|
|
2210
2213
|
"img",
|
|
@@ -2213,7 +2216,7 @@ function Mo() {
|
|
|
2213
2216
|
"track"
|
|
2214
2217
|
]);
|
|
2215
2218
|
let je = null;
|
|
2216
|
-
const We =
|
|
2219
|
+
const We = v({}, [
|
|
2217
2220
|
"alt",
|
|
2218
2221
|
"class",
|
|
2219
2222
|
"for",
|
|
@@ -2228,126 +2231,126 @@ function Mo() {
|
|
|
2228
2231
|
"value",
|
|
2229
2232
|
"style",
|
|
2230
2233
|
"xmlns"
|
|
2231
|
-
]),
|
|
2232
|
-
let
|
|
2233
|
-
const Go =
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
],
|
|
2234
|
+
]), zt = "http://www.w3.org/1998/Math/MathML", Bt = "http://www.w3.org/2000/svg", q = "http://www.w3.org/1999/xhtml";
|
|
2235
|
+
let ft = q, se = !1, le = null;
|
|
2236
|
+
const Go = v({}, [
|
|
2237
|
+
zt,
|
|
2238
|
+
Bt,
|
|
2239
|
+
q
|
|
2240
|
+
], me), $e = M([
|
|
2238
2241
|
"mi",
|
|
2239
2242
|
"mo",
|
|
2240
2243
|
"mn",
|
|
2241
2244
|
"ms",
|
|
2242
2245
|
"mtext"
|
|
2243
2246
|
]);
|
|
2244
|
-
let
|
|
2247
|
+
let ce = v({}, $e);
|
|
2245
2248
|
const Ge = M(["annotation-xml"]);
|
|
2246
|
-
let
|
|
2247
|
-
const Ko =
|
|
2249
|
+
let de = v({}, Ge);
|
|
2250
|
+
const Ko = v({}, [
|
|
2248
2251
|
"title",
|
|
2249
2252
|
"style",
|
|
2250
2253
|
"font",
|
|
2251
2254
|
"a",
|
|
2252
2255
|
"script"
|
|
2253
2256
|
]);
|
|
2254
|
-
let
|
|
2257
|
+
let Tt = null;
|
|
2255
2258
|
const qo = ["application/xhtml+xml", "text/html"], Yo = "text/html";
|
|
2256
|
-
let
|
|
2259
|
+
let L = null, ht = null;
|
|
2257
2260
|
const Vo = e.createElement("form"), Ke = function(i) {
|
|
2258
2261
|
return i instanceof RegExp || i instanceof Function;
|
|
2259
|
-
},
|
|
2262
|
+
}, ue = function() {
|
|
2260
2263
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2261
|
-
if (
|
|
2262
|
-
(!i || typeof i != "object") && (i = {}), i =
|
|
2263
|
-
transform:
|
|
2264
|
+
if (ht && ht === i) return;
|
|
2265
|
+
(!i || typeof i != "object") && (i = {}), i = U(i), Tt = qo.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? Yo : i.PARSER_MEDIA_TYPE, L = Tt === "application/xhtml+xml" ? me : Mt, A = Q(i, "ALLOWED_TAGS", te, { transform: L }), C = Q(i, "ALLOWED_ATTR", ee, { transform: L }), le = Q(i, "ALLOWED_NAMESPACES", Go, { transform: me }), je = Q(i, "ADD_URI_SAFE_ATTR", We, {
|
|
2266
|
+
transform: L,
|
|
2264
2267
|
base: We
|
|
2265
|
-
}), He =
|
|
2266
|
-
transform:
|
|
2268
|
+
}), He = Q(i, "ADD_DATA_URI_TAGS", Ue, {
|
|
2269
|
+
transform: L,
|
|
2267
2270
|
base: Ue
|
|
2268
|
-
}),
|
|
2269
|
-
const s = Ee(i, "CUSTOM_ELEMENT_HANDLING", () =>
|
|
2270
|
-
if (
|
|
2271
|
+
}), pt = Q(i, "FORBID_CONTENTS", Fe, { transform: L }), kt = Q(i, "FORBID_TAGS", U({}), { transform: L }), Pe = Q(i, "FORBID_ATTR", U({}), { transform: L }), ut = N(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? U(i.USE_PROFILES) : i.USE_PROFILES : !1, De = i.ALLOW_ARIA_ATTR !== !1, oe = i.ALLOW_DATA_ATTR !== !1, Oe = i.ALLOW_UNKNOWN_PROTOCOLS || !1, Re = 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, Ne = i.SANITIZE_DOM !== !1, ze = i.SANITIZE_NAMED_PROPS || !1, re = i.KEEP_CONTENT !== !1, ae = i.IN_PLACE || !1, Ie = zn(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : bo, ft = typeof i.NAMESPACE == "string" ? i.NAMESPACE : q, ce = Ee(i, "MATHML_TEXT_INTEGRATION_POINTS", () => v({}, $e)), de = Ee(i, "HTML_INTEGRATION_POINTS", () => v({}, Ge));
|
|
2272
|
+
const s = Ee(i, "CUSTOM_ELEMENT_HANDLING", () => yt(null));
|
|
2273
|
+
if (K = yt(null), N(s, "tagNameCheck") && Ke(s.tagNameCheck) && (K.tagNameCheck = s.tagNameCheck), N(s, "attributeNameCheck") && Ke(s.attributeNameCheck) && (K.attributeNameCheck = s.attributeNameCheck), N(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), I(K), X && (oe = !1), Rt && (dt = !0), ut && (A = v({}, ho), C = yt(null), ut.html === !0 && (v(A, fo), v(C, mo)), ut.svg === !0 && (v(A, ge), v(C, ve), v(C, Gt)), ut.svgFilters === !0 && (v(A, be), v(C, ve), v(C, Gt)), ut.mathMl === !0 && (v(A, ye), v(C, go), v(C, 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) && (A === te && (A = U(A)), v(A, i.ADD_TAGS, L))), N(i, "ADD_ATTR") && (typeof i.ADD_ATTR == "function" ? V.attributeCheck = i.ADD_ATTR : vt(i.ADD_ATTR) && (C === ee && (C = U(C)), v(C, i.ADD_ATTR, L))), N(i, "ADD_FORBID_CONTENTS") && vt(i.ADD_FORBID_CONTENTS) && (pt === Fe && (pt = U(pt)), v(pt, i.ADD_FORBID_CONTENTS, L)), re && (A["#text"] = !0), it && v(A, [
|
|
2271
2274
|
"html",
|
|
2272
2275
|
"head",
|
|
2273
2276
|
"body"
|
|
2274
|
-
]), A.table && (
|
|
2275
|
-
if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
2276
|
-
if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
2277
|
-
const d =
|
|
2278
|
-
|
|
2277
|
+
]), A.table && (v(A, ["tbody"]), delete kt.tbody), i.TRUSTED_TYPES_POLICY) {
|
|
2278
|
+
if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function") throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2279
|
+
if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
2280
|
+
const d = R;
|
|
2281
|
+
R = i.TRUSTED_TYPES_POLICY;
|
|
2279
2282
|
try {
|
|
2280
|
-
|
|
2283
|
+
ot = ct("");
|
|
2281
2284
|
} catch (p) {
|
|
2282
|
-
throw
|
|
2285
|
+
throw R = d, p;
|
|
2283
2286
|
}
|
|
2284
|
-
} else i.TRUSTED_TYPES_POLICY === null ? (
|
|
2285
|
-
M && M(i),
|
|
2286
|
-
}, qe =
|
|
2287
|
-
...me,
|
|
2287
|
+
} else i.TRUSTED_TYPES_POLICY === null ? (R = void 0, ot = "") : (R === void 0 && (R = Oo()), R && typeof ot == "string" && (ot = ct("")));
|
|
2288
|
+
M && M(i), ht = i;
|
|
2289
|
+
}, qe = v({}, [
|
|
2288
2290
|
...ge,
|
|
2291
|
+
...be,
|
|
2289
2292
|
...Bn
|
|
2290
|
-
]), Ye =
|
|
2291
|
-
return s.namespaceURI ===
|
|
2293
|
+
]), Ye = v({}, [...ye, ...Fn]), Xo = function(i, s, d) {
|
|
2294
|
+
return s.namespaceURI === q ? i === "svg" : s.namespaceURI === zt ? i === "svg" && (d === "annotation-xml" || ce[d]) : !!qe[i];
|
|
2292
2295
|
}, Zo = function(i, s, d) {
|
|
2293
|
-
return s.namespaceURI ===
|
|
2296
|
+
return s.namespaceURI === q ? i === "math" : s.namespaceURI === Bt ? i === "math" && de[d] : !!Ye[i];
|
|
2294
2297
|
}, Jo = function(i, s, d) {
|
|
2295
|
-
return s.namespaceURI ===
|
|
2298
|
+
return s.namespaceURI === Bt && !de[d] || s.namespaceURI === zt && !ce[d] ? !1 : !Ye[i] && (Ko[i] || !qe[i]);
|
|
2296
2299
|
}, Qo = function(i) {
|
|
2297
|
-
let s =
|
|
2300
|
+
let s = z(i);
|
|
2298
2301
|
(!s || !s.tagName) && (s = {
|
|
2299
|
-
namespaceURI:
|
|
2302
|
+
namespaceURI: ft,
|
|
2300
2303
|
tagName: "template"
|
|
2301
2304
|
});
|
|
2302
|
-
const d =
|
|
2303
|
-
return
|
|
2304
|
-
},
|
|
2305
|
-
|
|
2305
|
+
const d = Mt(i.tagName), p = Mt(s.tagName);
|
|
2306
|
+
return le[i.namespaceURI] ? i.namespaceURI === Bt ? Xo(d, s, p) : i.namespaceURI === zt ? Zo(d, s, p) : i.namespaceURI === q ? Jo(d, s, p) : !!(Tt === "application/xhtml+xml" && le[i.namespaceURI]) : !1;
|
|
2307
|
+
}, Z = function(i) {
|
|
2308
|
+
At(t.removed, { element: i });
|
|
2306
2309
|
try {
|
|
2307
|
-
|
|
2310
|
+
z(i).removeChild(i);
|
|
2308
2311
|
} catch (s) {
|
|
2309
|
-
if (
|
|
2312
|
+
if (E(i), !z(i)) throw J("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
2310
2313
|
}
|
|
2311
2314
|
}, Ve = function(i, s, d) {
|
|
2312
2315
|
try {
|
|
2313
|
-
|
|
2316
|
+
T(i, s);
|
|
2314
2317
|
} catch (p) {
|
|
2315
2318
|
try {
|
|
2316
2319
|
i.removeAttribute(d);
|
|
2317
2320
|
} catch (h) {
|
|
2318
2321
|
}
|
|
2319
2322
|
}
|
|
2320
|
-
},
|
|
2321
|
-
|
|
2322
|
-
const s =
|
|
2323
|
+
}, Ft = function(i) {
|
|
2324
|
+
Ht(i);
|
|
2325
|
+
const s = G(i);
|
|
2323
2326
|
if (s) {
|
|
2324
2327
|
const p = [];
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
}),
|
|
2328
|
+
at(s, (h) => {
|
|
2329
|
+
At(p, h);
|
|
2330
|
+
}), at(p, (h) => {
|
|
2328
2331
|
try {
|
|
2329
|
-
|
|
2332
|
+
E(h);
|
|
2330
2333
|
} catch (b) {
|
|
2331
2334
|
}
|
|
2332
2335
|
});
|
|
2333
2336
|
}
|
|
2334
|
-
const d =
|
|
2337
|
+
const d = B(i);
|
|
2335
2338
|
if (d) for (let p = d.length - 1; p >= 0; --p) {
|
|
2336
2339
|
const h = d[p], b = h && h.name;
|
|
2337
2340
|
typeof b == "string" && Ve(i, h, b);
|
|
2338
2341
|
}
|
|
2339
|
-
},
|
|
2342
|
+
}, rt = function(i, s, d) {
|
|
2340
2343
|
if (!d) try {
|
|
2341
2344
|
d = s.getAttributeNode(i);
|
|
2342
2345
|
} catch (p) {
|
|
2343
2346
|
d = null;
|
|
2344
2347
|
}
|
|
2345
|
-
|
|
2348
|
+
At(t.removed, {
|
|
2346
2349
|
attribute: d || null,
|
|
2347
2350
|
from: s
|
|
2348
2351
|
});
|
|
2349
2352
|
try {
|
|
2350
|
-
d ?
|
|
2353
|
+
d ? T(s, d) : s.removeAttribute(i);
|
|
2351
2354
|
} catch (p) {
|
|
2352
2355
|
try {
|
|
2353
2356
|
s.removeAttribute(i);
|
|
@@ -2355,8 +2358,8 @@ function Mo() {
|
|
|
2355
2358
|
}
|
|
2356
2359
|
}
|
|
2357
2360
|
if (i === "is")
|
|
2358
|
-
if (
|
|
2359
|
-
|
|
2361
|
+
if (dt || Rt) try {
|
|
2362
|
+
Z(s);
|
|
2360
2363
|
} catch (p) {
|
|
2361
2364
|
}
|
|
2362
2365
|
else try {
|
|
@@ -2364,108 +2367,108 @@ function Mo() {
|
|
|
2364
2367
|
} catch (p) {
|
|
2365
2368
|
}
|
|
2366
2369
|
}, tn = function(i) {
|
|
2367
|
-
const s =
|
|
2370
|
+
const s = B(i);
|
|
2368
2371
|
if (s)
|
|
2369
2372
|
for (let d = s.length - 1; d >= 0; --d) {
|
|
2370
2373
|
const p = s[d], h = p && p.name;
|
|
2371
|
-
typeof h != "string" ||
|
|
2374
|
+
typeof h != "string" || C[L(h)] || Ve(i, p, h);
|
|
2372
2375
|
}
|
|
2373
|
-
},
|
|
2376
|
+
}, Ht = function(i) {
|
|
2374
2377
|
const s = [i];
|
|
2375
2378
|
for (; s.length > 0; ) {
|
|
2376
2379
|
const d = s.pop();
|
|
2377
|
-
|
|
2378
|
-
const p =
|
|
2380
|
+
Et(d) === H.element && tn(d);
|
|
2381
|
+
const p = G(d);
|
|
2379
2382
|
if (p) for (let h = p.length - 1; h >= 0; --h) s.push(p[h]);
|
|
2380
2383
|
}
|
|
2381
2384
|
}, Xe = function(i, s) {
|
|
2382
|
-
return
|
|
2385
|
+
return nt ? i === "patchsrc" ? !0 : i === "for" && s !== "label" && s !== "output" : !1;
|
|
2383
2386
|
}, en = function(i) {
|
|
2384
|
-
if (!
|
|
2387
|
+
if (!nt) return;
|
|
2385
2388
|
const s = [i];
|
|
2386
2389
|
for (; s.length > 0; ) {
|
|
2387
|
-
const d = s.pop(), p =
|
|
2388
|
-
if (p ===
|
|
2390
|
+
const d = s.pop(), p = Et(d);
|
|
2391
|
+
if (p === H.processingInstruction || p === H.comment && P(vo, d.data)) {
|
|
2389
2392
|
try {
|
|
2390
|
-
|
|
2393
|
+
E(d);
|
|
2391
2394
|
} catch (b) {
|
|
2392
2395
|
}
|
|
2393
2396
|
continue;
|
|
2394
2397
|
}
|
|
2395
|
-
if (p ===
|
|
2396
|
-
const b = d, y =
|
|
2398
|
+
if (p === H.element) {
|
|
2399
|
+
const b = d, y = L(Zt(d));
|
|
2397
2400
|
try {
|
|
2398
2401
|
b.hasAttribute && b.hasAttribute("patchsrc") && b.removeAttribute("patchsrc"), b.hasAttribute && b.hasAttribute("for") && Xe("for", y) && b.removeAttribute("for");
|
|
2399
2402
|
} catch (S) {
|
|
2400
2403
|
}
|
|
2401
2404
|
}
|
|
2402
|
-
const h =
|
|
2405
|
+
const h = G(d);
|
|
2403
2406
|
if (h) for (let b = h.length - 1; b >= 0; --b) s.push(h[b]);
|
|
2404
2407
|
}
|
|
2405
2408
|
}, Ze = function(i) {
|
|
2406
2409
|
let s = null, d = null;
|
|
2407
|
-
if (
|
|
2410
|
+
if (ie) i = "<remove></remove>" + i;
|
|
2408
2411
|
else {
|
|
2409
2412
|
const b = lo(i, /^[\r\n\t ]+/);
|
|
2410
2413
|
d = b && b[0];
|
|
2411
2414
|
}
|
|
2412
|
-
|
|
2413
|
-
const p =
|
|
2414
|
-
if (
|
|
2415
|
-
s = new m().parseFromString(p,
|
|
2415
|
+
Tt === "application/xhtml+xml" && ft === q && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
|
|
2416
|
+
const p = R ? ct(i) : i;
|
|
2417
|
+
if (ft === q) try {
|
|
2418
|
+
s = new m().parseFromString(p, Tt);
|
|
2416
2419
|
} catch (b) {
|
|
2417
2420
|
}
|
|
2418
2421
|
if (!s || !s.documentElement) {
|
|
2419
|
-
s =
|
|
2422
|
+
s = Qt.createDocument(ft, "template", null);
|
|
2420
2423
|
try {
|
|
2421
|
-
s.documentElement.innerHTML =
|
|
2424
|
+
s.documentElement.innerHTML = se ? ot : p;
|
|
2422
2425
|
} catch (b) {
|
|
2423
2426
|
}
|
|
2424
2427
|
}
|
|
2425
2428
|
const h = s.body || s.documentElement;
|
|
2426
|
-
return i && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null),
|
|
2429
|
+
return i && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ft === q ? No.call(s, it ? "html" : "body")[0] : it ? s.documentElement : h;
|
|
2427
2430
|
}, Je = function(i) {
|
|
2428
|
-
const s =
|
|
2429
|
-
return
|
|
2430
|
-
},
|
|
2431
|
+
const s = It ? It(i) : i.ownerDocument;
|
|
2432
|
+
return _e.call(s || i, i, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION, null);
|
|
2433
|
+
}, Ut = function(i) {
|
|
2431
2434
|
return i = Ct(i, Bo, " "), i = Ct(i, Fo, " "), i = Ct(i, Ho, " "), i;
|
|
2432
|
-
},
|
|
2435
|
+
}, pe = function(i) {
|
|
2433
2436
|
var s;
|
|
2434
2437
|
i.normalize();
|
|
2435
|
-
const d =
|
|
2438
|
+
const d = It ? It(i) : i.ownerDocument, p = _e.call(d || i, i, f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION, null);
|
|
2436
2439
|
let h = p.nextNode();
|
|
2437
2440
|
for (; h; )
|
|
2438
|
-
h.data =
|
|
2441
|
+
h.data = Ut(h.data), h = p.nextNode();
|
|
2439
2442
|
const b = (s = i.querySelectorAll) === null || s === void 0 ? void 0 : s.call(i, "template");
|
|
2440
|
-
b &&
|
|
2441
|
-
|
|
2443
|
+
b && at(b, (y) => {
|
|
2444
|
+
mt(y.content) && pe(y.content);
|
|
2442
2445
|
});
|
|
2443
|
-
},
|
|
2444
|
-
const s =
|
|
2445
|
-
return typeof s != "string" ||
|
|
2446
|
-
},
|
|
2447
|
-
if (!
|
|
2446
|
+
}, jt = function(i) {
|
|
2447
|
+
const s = lt ? lt(i) : null;
|
|
2448
|
+
return typeof s != "string" || L(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 !== D(i) || i.childNodes !== G(i);
|
|
2449
|
+
}, mt = function(i) {
|
|
2450
|
+
if (!D || typeof i != "object" || i === null) return !1;
|
|
2448
2451
|
try {
|
|
2449
|
-
return
|
|
2452
|
+
return D(i) === H.documentFragment;
|
|
2450
2453
|
} catch (s) {
|
|
2451
2454
|
return !1;
|
|
2452
2455
|
}
|
|
2453
|
-
},
|
|
2454
|
-
if (!
|
|
2456
|
+
}, xt = function(i) {
|
|
2457
|
+
if (!D || typeof i != "object" || i === null) return !1;
|
|
2455
2458
|
try {
|
|
2456
|
-
return typeof
|
|
2459
|
+
return typeof D(i) == "number";
|
|
2457
2460
|
} catch (s) {
|
|
2458
2461
|
return !1;
|
|
2459
2462
|
}
|
|
2460
2463
|
};
|
|
2461
|
-
function
|
|
2462
|
-
u.length !== 0 &&
|
|
2463
|
-
d.call(t, i, s,
|
|
2464
|
+
function Y(u, i, s) {
|
|
2465
|
+
u.length !== 0 && at(u, (d) => {
|
|
2466
|
+
d.call(t, i, s, ht);
|
|
2464
2467
|
});
|
|
2465
2468
|
}
|
|
2466
2469
|
const on = function(i, s) {
|
|
2467
|
-
return !!(
|
|
2468
|
-
},
|
|
2470
|
+
return !!(nt && i.hasChildNodes() && !xt(i.firstElementChild) && P(yo, i.textContent) && P(yo, i.innerHTML) || nt && i.namespaceURI === q && Zn[s] && (xt(i.firstElementChild) || typeof i.textContent == "string" && P(Jn[s], i.textContent)) || i.nodeType === H.processingInstruction || nt && i.nodeType === H.comment && P(vo, i.data));
|
|
2471
|
+
}, Wt = function(i, s) {
|
|
2469
2472
|
if (i instanceof RegExp) return P(i, s);
|
|
2470
2473
|
if (i instanceof Function) {
|
|
2471
2474
|
for (var d = arguments.length, p = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++) p[h - 2] = arguments[h];
|
|
@@ -2473,49 +2476,49 @@ function Mo() {
|
|
|
2473
2476
|
}
|
|
2474
2477
|
return !1;
|
|
2475
2478
|
}, nn = function(i, s, d) {
|
|
2476
|
-
if (!
|
|
2477
|
-
if (
|
|
2478
|
-
const p =
|
|
2479
|
+
if (!kt[s] && oo(s) && Wt(K.tagNameCheck, s)) return !1;
|
|
2480
|
+
if (re && !pt[s]) {
|
|
2481
|
+
const p = z(i), h = G(i);
|
|
2479
2482
|
if (h && p) {
|
|
2480
2483
|
const b = h.length;
|
|
2481
2484
|
for (let y = b - 1; y >= 0; --y) {
|
|
2482
|
-
const S = i === d ?
|
|
2483
|
-
p.insertBefore(S,
|
|
2485
|
+
const S = i === d ? k(h[y], !0) : h[y];
|
|
2486
|
+
p.insertBefore(S, et(i));
|
|
2484
2487
|
}
|
|
2485
2488
|
}
|
|
2486
2489
|
}
|
|
2487
|
-
return
|
|
2490
|
+
return Z(i), !0;
|
|
2488
2491
|
}, Qe = function(i, s, d, p) {
|
|
2489
|
-
return i.length === 0 ? s : s === d || s === p ?
|
|
2490
|
-
},
|
|
2491
|
-
return i === s ||
|
|
2492
|
+
return i.length === 0 ? s : s === d || s === p ? U(s) : s;
|
|
2493
|
+
}, gt = function(i, s) {
|
|
2494
|
+
return i === s || z(i) !== null ? !1 : (ae && Ht(i), !0);
|
|
2492
2495
|
}, to = function(i, s) {
|
|
2493
|
-
if (
|
|
2494
|
-
if (
|
|
2495
|
-
return
|
|
2496
|
-
const d =
|
|
2497
|
-
if (A = Qe(
|
|
2496
|
+
if (Y(x.beforeSanitizeElements, i, null), gt(i, s)) return !0;
|
|
2497
|
+
if (jt(i))
|
|
2498
|
+
return Z(i), !0;
|
|
2499
|
+
const d = L(Zt(i));
|
|
2500
|
+
if (A = Qe(x.uponSanitizeElement, A, te, Dt), Y(x.uponSanitizeElement, i, {
|
|
2498
2501
|
tagName: d,
|
|
2499
2502
|
allowedTags: A
|
|
2500
|
-
}),
|
|
2503
|
+
}), gt(i, s)) return !0;
|
|
2501
2504
|
if (on(i, d))
|
|
2502
|
-
return
|
|
2503
|
-
if (
|
|
2505
|
+
return Z(i), !0;
|
|
2506
|
+
if (kt[d] || !(V.tagCheck instanceof Function && V.tagCheck(d)) && !A[d]) {
|
|
2504
2507
|
const p = nn(i, d, s);
|
|
2505
|
-
return p === !1 && (
|
|
2508
|
+
return p === !1 && (Y(x.afterSanitizeElements, i, null), gt(i, s)) ? !0 : p;
|
|
2506
2509
|
}
|
|
2507
|
-
if (
|
|
2508
|
-
return
|
|
2509
|
-
if (
|
|
2510
|
-
const p =
|
|
2511
|
-
i.textContent !== p && (
|
|
2510
|
+
if (Et(i) === H.element && !Qo(i) || (d === "noscript" || d === "noembed" || d === "noframes") && P(Vn, i.innerHTML))
|
|
2511
|
+
return Z(i), !0;
|
|
2512
|
+
if (X && i.nodeType === H.text) {
|
|
2513
|
+
const p = Ut(i.textContent);
|
|
2514
|
+
i.textContent !== p && (At(t.removed, { element: i.cloneNode() }), i.textContent = p);
|
|
2512
2515
|
}
|
|
2513
|
-
return
|
|
2516
|
+
return Y(x.afterSanitizeElements, i, null), gt(i, s);
|
|
2514
2517
|
}, eo = function(i, s, d) {
|
|
2515
2518
|
if (Pe[s] || Xe(s, i) || Ne && (s === "id" || s === "name") && (d in e || d in Vo)) return !1;
|
|
2516
|
-
const p =
|
|
2517
|
-
return
|
|
2518
|
-
}, rn =
|
|
2519
|
+
const p = C[s] || V.attributeCheck instanceof Function && V.attributeCheck(s, i);
|
|
2520
|
+
return oe && P(Uo, s) || De && P(jo, s) ? !0 : p ? je[s] || P(Ie, Ct(d, Me, "")) || (s === "src" || s === "xlink:href" || s === "href") && i !== "script" && co(d, "data:") === 0 && He[i] || Oe && !P(Wo, Ct(d, Me, "")) ? !0 : !d : oo(i) && Wt(K.tagNameCheck, i) && Wt(K.attributeNameCheck, s, i) || s === "is" && K.allowCustomizedBuiltInElements && Wt(K.tagNameCheck, d);
|
|
2521
|
+
}, rn = v({}, [
|
|
2519
2522
|
"annotation-xml",
|
|
2520
2523
|
"color-profile",
|
|
2521
2524
|
"font-face",
|
|
@@ -2525,73 +2528,73 @@ function Mo() {
|
|
|
2525
2528
|
"font-face-uri",
|
|
2526
2529
|
"missing-glyph"
|
|
2527
2530
|
]), oo = function(i) {
|
|
2528
|
-
return !rn[
|
|
2531
|
+
return !rn[Mt(i)] && P($o, i);
|
|
2529
2532
|
}, an = function(i, s, d, p) {
|
|
2530
|
-
if (
|
|
2533
|
+
if (R && typeof g == "object" && typeof g.getAttributeType == "function" && !d) switch (g.getAttributeType(i, s)) {
|
|
2531
2534
|
case "TrustedHTML":
|
|
2532
|
-
return
|
|
2535
|
+
return ct(p);
|
|
2533
2536
|
case "TrustedScriptURL":
|
|
2534
2537
|
return Do(p);
|
|
2535
2538
|
}
|
|
2536
2539
|
return p;
|
|
2537
2540
|
}, sn = function(i, s, d, p) {
|
|
2538
2541
|
try {
|
|
2539
|
-
return d ? i.setAttributeNS(d, s, p) : i.setAttribute(s, p),
|
|
2542
|
+
return d ? i.setAttributeNS(d, s, p) : i.setAttribute(s, p), jt(i) ? (Z(i), !1) : !0;
|
|
2540
2543
|
} catch (h) {
|
|
2541
|
-
return
|
|
2544
|
+
return rt(s, i), !1;
|
|
2542
2545
|
}
|
|
2543
2546
|
}, no = function(i, s) {
|
|
2544
|
-
if (
|
|
2547
|
+
if (Y(x.beforeSanitizeAttributes, i, null), gt(i, s)) return;
|
|
2545
2548
|
const d = i.attributes;
|
|
2546
|
-
if (!d ||
|
|
2547
|
-
|
|
2549
|
+
if (!d || jt(i)) return;
|
|
2550
|
+
C = Qe(x.uponSanitizeAttribute, C, ee, Ot);
|
|
2548
2551
|
const p = {
|
|
2549
2552
|
attrName: "",
|
|
2550
2553
|
attrValue: "",
|
|
2551
2554
|
keepAttr: !0,
|
|
2552
|
-
allowedAttributes:
|
|
2555
|
+
allowedAttributes: C,
|
|
2553
2556
|
forceKeepAttr: void 0
|
|
2554
2557
|
};
|
|
2555
2558
|
let h = d.length;
|
|
2556
|
-
const b =
|
|
2559
|
+
const b = L(i.nodeName);
|
|
2557
2560
|
for (; h--; ) {
|
|
2558
|
-
const y = d[h], S = y.name,
|
|
2559
|
-
let O = S === "value" ?
|
|
2560
|
-
if (p.attrName =
|
|
2561
|
-
|
|
2561
|
+
const y = d[h], S = y.name, j = y.namespaceURI, F = y.value, bt = L(S), he = F;
|
|
2562
|
+
let O = S === "value" ? he : In(he), io = !1;
|
|
2563
|
+
if (p.attrName = bt, p.attrValue = O, p.keepAttr = !0, p.forceKeepAttr = void 0, Y(x.uponSanitizeAttribute, i, p), O = p.attrValue, ze && (bt === "id" || bt === "name") && co(O, Be) !== 0 && (rt(S, i, y), O = Be + O, io = !0), nt && P(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
|
|
2564
|
+
rt(S, i, y);
|
|
2562
2565
|
continue;
|
|
2563
2566
|
}
|
|
2564
|
-
if (
|
|
2565
|
-
|
|
2567
|
+
if (bt === "attributename" && lo(O, "href")) {
|
|
2568
|
+
rt(S, i, y);
|
|
2566
2569
|
continue;
|
|
2567
2570
|
}
|
|
2568
2571
|
if (!p.forceKeepAttr) {
|
|
2569
2572
|
if (!p.keepAttr) {
|
|
2570
|
-
|
|
2573
|
+
rt(S, i, y);
|
|
2571
2574
|
continue;
|
|
2572
2575
|
}
|
|
2573
2576
|
if (!Re && P(Xn, O)) {
|
|
2574
|
-
|
|
2577
|
+
rt(S, i, y);
|
|
2575
2578
|
continue;
|
|
2576
2579
|
}
|
|
2577
|
-
if (
|
|
2578
|
-
|
|
2580
|
+
if (X && (O = Ut(O)), !eo(b, bt, O)) {
|
|
2581
|
+
rt(S, i, y);
|
|
2579
2582
|
continue;
|
|
2580
2583
|
}
|
|
2581
|
-
O = an(b,
|
|
2584
|
+
O = an(b, bt, j, O), O !== he && sn(i, S, j, O) && io && so(t.removed);
|
|
2582
2585
|
}
|
|
2583
2586
|
}
|
|
2584
|
-
|
|
2585
|
-
},
|
|
2587
|
+
Y(x.afterSanitizeAttributes, i, null), gt(i, s);
|
|
2588
|
+
}, $t = function(i) {
|
|
2586
2589
|
let s = null;
|
|
2587
2590
|
const d = Je(i);
|
|
2588
|
-
for (
|
|
2589
|
-
if (
|
|
2590
|
-
const p =
|
|
2591
|
-
|
|
2591
|
+
for (Y(x.beforeSanitizeShadowDOM, i, null); s = d.nextNode(); )
|
|
2592
|
+
if (Y(x.uponSanitizeShadowNode, s, null), to(s, i), no(s, i), mt(s.content) && $t(s.content), Et(s) === H.element) {
|
|
2593
|
+
const p = st(s);
|
|
2594
|
+
mt(p) && (fe(p), $t(p));
|
|
2592
2595
|
}
|
|
2593
|
-
|
|
2594
|
-
},
|
|
2596
|
+
Y(x.afterSanitizeShadowDOM, i, null);
|
|
2597
|
+
}, fe = function(i) {
|
|
2595
2598
|
const s = [{
|
|
2596
2599
|
node: i,
|
|
2597
2600
|
shadow: null
|
|
@@ -2599,27 +2602,27 @@ function Mo() {
|
|
|
2599
2602
|
for (; s.length > 0; ) {
|
|
2600
2603
|
const d = s.pop();
|
|
2601
2604
|
if (d.shadow) {
|
|
2602
|
-
|
|
2605
|
+
$t(d.shadow);
|
|
2603
2606
|
continue;
|
|
2604
2607
|
}
|
|
2605
|
-
const p = d.node, h =
|
|
2608
|
+
const p = d.node, h = Et(p) === H.element, b = G(p);
|
|
2606
2609
|
if (b) for (let y = b.length - 1; y >= 0; --y) s.push({
|
|
2607
2610
|
node: b[y],
|
|
2608
2611
|
shadow: null
|
|
2609
2612
|
});
|
|
2610
2613
|
if (h) {
|
|
2611
|
-
const y =
|
|
2612
|
-
if (typeof y == "string" &&
|
|
2614
|
+
const y = lt ? lt(p) : null;
|
|
2615
|
+
if (typeof y == "string" && L(y) === "template") {
|
|
2613
2616
|
const S = p.content;
|
|
2614
|
-
|
|
2617
|
+
mt(S) && s.push({
|
|
2615
2618
|
node: S,
|
|
2616
2619
|
shadow: null
|
|
2617
2620
|
});
|
|
2618
2621
|
}
|
|
2619
2622
|
}
|
|
2620
2623
|
if (h) {
|
|
2621
|
-
const y =
|
|
2622
|
-
|
|
2624
|
+
const y = st(p);
|
|
2625
|
+
mt(y) && s.push({
|
|
2623
2626
|
node: null,
|
|
2624
2627
|
shadow: y
|
|
2625
2628
|
}, {
|
|
@@ -2631,85 +2634,85 @@ function Mo() {
|
|
|
2631
2634
|
};
|
|
2632
2635
|
return t.sanitize = function(u) {
|
|
2633
2636
|
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, d = null, p = null, h = null;
|
|
2634
|
-
if (
|
|
2635
|
-
throw
|
|
2637
|
+
if (se = !u, se && (u = "<!-->"), typeof u != "string" && !xt(u) && (u = Nn(u), typeof u != "string"))
|
|
2638
|
+
throw J("dirty is not a string, aborting");
|
|
2636
2639
|
if (!t.isSupported) return u;
|
|
2637
|
-
|
|
2638
|
-
const b =
|
|
2640
|
+
ne ? (A = Dt, C = Ot) : ue(i), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (A = U(A)), x.uponSanitizeAttribute.length > 0 && (C = U(C)), t.removed = [];
|
|
2641
|
+
const b = ae && typeof u != "string" && xt(u);
|
|
2639
2642
|
if (b) {
|
|
2640
2643
|
en(u);
|
|
2641
|
-
const
|
|
2642
|
-
if (typeof
|
|
2643
|
-
const
|
|
2644
|
-
if (!A[
|
|
2645
|
-
throw
|
|
2644
|
+
const j = Zt(u);
|
|
2645
|
+
if (typeof j == "string") {
|
|
2646
|
+
const F = L(j);
|
|
2647
|
+
if (!A[F] || kt[F])
|
|
2648
|
+
throw Ft(u), J("root node is forbidden and cannot be sanitized in-place");
|
|
2646
2649
|
}
|
|
2647
|
-
if (
|
|
2648
|
-
throw
|
|
2650
|
+
if (jt(u))
|
|
2651
|
+
throw Ft(u), J("root node is clobbered and cannot be sanitized in-place");
|
|
2649
2652
|
try {
|
|
2650
|
-
|
|
2651
|
-
} catch (
|
|
2652
|
-
throw
|
|
2653
|
+
fe(u);
|
|
2654
|
+
} catch (F) {
|
|
2655
|
+
throw Ft(u), F;
|
|
2653
2656
|
}
|
|
2654
|
-
} else if (
|
|
2655
|
-
s = Ze("<!---->"), d = s.ownerDocument.importNode(u, !0), d.nodeType ===
|
|
2657
|
+
} else if (xt(u))
|
|
2658
|
+
s = Ze("<!---->"), d = s.ownerDocument.importNode(u, !0), d.nodeType === H.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? s = d : s.appendChild(d), fe(s);
|
|
2656
2659
|
else {
|
|
2657
|
-
if (!
|
|
2658
|
-
if (s = Ze(u), !s) return
|
|
2660
|
+
if (!dt && !X && !it && u.indexOf("<") === -1) return R && Nt ? ct(u) : u;
|
|
2661
|
+
if (s = Ze(u), !s) return dt ? null : Nt ? ot : "";
|
|
2659
2662
|
}
|
|
2660
|
-
s &&
|
|
2663
|
+
s && ie && Z(s.firstChild);
|
|
2661
2664
|
const y = b ? u : s;
|
|
2662
2665
|
try {
|
|
2663
|
-
const
|
|
2664
|
-
for (; p =
|
|
2665
|
-
to(p, y), no(p, y),
|
|
2666
|
-
} catch (
|
|
2667
|
-
throw b && (
|
|
2668
|
-
|
|
2669
|
-
})),
|
|
2666
|
+
const j = Je(y);
|
|
2667
|
+
for (; p = j.nextNode(); )
|
|
2668
|
+
to(p, y), no(p, y), mt(p.content) && $t(p.content);
|
|
2669
|
+
} catch (j) {
|
|
2670
|
+
throw b && (Ft(u), at(t.removed, (F) => {
|
|
2671
|
+
F.element && Ht(F.element);
|
|
2672
|
+
})), j;
|
|
2670
2673
|
}
|
|
2671
2674
|
if (b) {
|
|
2672
|
-
let
|
|
2673
|
-
if (
|
|
2674
|
-
|
|
2675
|
-
}),
|
|
2676
|
-
return
|
|
2675
|
+
let j = !1;
|
|
2676
|
+
if (at(t.removed, (F) => {
|
|
2677
|
+
F.element && (F.element === u && (j = !0), Ht(F.element));
|
|
2678
|
+
}), j) throw J("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
2679
|
+
return X && pe(u), u;
|
|
2677
2680
|
}
|
|
2678
|
-
if (
|
|
2679
|
-
if (
|
|
2681
|
+
if (dt) {
|
|
2682
|
+
if (X && pe(s), Rt)
|
|
2680
2683
|
for (h = Ro.call(s.ownerDocument); s.firstChild; ) h.appendChild(s.firstChild);
|
|
2681
2684
|
else h = s;
|
|
2682
|
-
return (
|
|
2685
|
+
return (C.shadowroot || C.shadowrootmode) && (h = zo.call(o, h, !0)), h;
|
|
2683
2686
|
}
|
|
2684
|
-
let S =
|
|
2685
|
-
return
|
|
2686
|
-
` + S),
|
|
2687
|
+
let S = it ? s.outerHTML : s.innerHTML;
|
|
2688
|
+
return it && A["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && P(qn, s.ownerDocument.doctype.name) && (S = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
|
|
2689
|
+
` + S), X && (S = Ut(S)), R && Nt ? ct(S) : S;
|
|
2687
2690
|
}, t.setConfig = function() {
|
|
2688
2691
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2689
|
-
|
|
2692
|
+
ue(u), ne = !0, Dt = A, Ot = C;
|
|
2690
2693
|
}, t.clearConfig = function() {
|
|
2691
|
-
|
|
2694
|
+
ht = null, ne = !1, Dt = null, Ot = null, R = Jt, ot = "";
|
|
2692
2695
|
}, t.isValidAttribute = function(u, i, s) {
|
|
2693
|
-
|
|
2694
|
-
const d =
|
|
2696
|
+
ht || ue({});
|
|
2697
|
+
const d = L(u), p = L(i);
|
|
2695
2698
|
return eo(d, p, s);
|
|
2696
2699
|
}, t.addHook = function(u, i) {
|
|
2697
|
-
typeof i == "function" &&
|
|
2700
|
+
typeof i == "function" && N(x, u) && At(x[u], i);
|
|
2698
2701
|
}, t.removeHook = function(u, i) {
|
|
2699
|
-
if (
|
|
2702
|
+
if (N(x, u)) {
|
|
2700
2703
|
if (i !== void 0) {
|
|
2701
|
-
const s =
|
|
2702
|
-
return s === -1 ? void 0 : Mn(
|
|
2704
|
+
const s = _n(x[u], i);
|
|
2705
|
+
return s === -1 ? void 0 : Mn(x[u], s, 1)[0];
|
|
2703
2706
|
}
|
|
2704
|
-
return so(
|
|
2707
|
+
return so(x[u]);
|
|
2705
2708
|
}
|
|
2706
2709
|
}, t.removeHooks = function(u) {
|
|
2707
|
-
|
|
2710
|
+
N(x, u) && (x[u] = []);
|
|
2708
2711
|
}, t.removeAllHooks = function() {
|
|
2709
|
-
|
|
2712
|
+
x = Eo();
|
|
2710
2713
|
}, t;
|
|
2711
2714
|
}
|
|
2712
|
-
var
|
|
2715
|
+
var Kt = Mo();
|
|
2713
2716
|
const ei = [
|
|
2714
2717
|
"p",
|
|
2715
2718
|
"br",
|
|
@@ -2790,28 +2793,28 @@ function Io(n, t, e, o) {
|
|
|
2790
2793
|
if ((t == null ? void 0 : t.sanitize) === !1)
|
|
2791
2794
|
return n;
|
|
2792
2795
|
const r = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ei, 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 : oi, f = /* @__PURE__ */ new Set();
|
|
2793
|
-
for (const
|
|
2794
|
-
for (const
|
|
2796
|
+
for (const w of Object.values(c))
|
|
2797
|
+
for (const k of w) f.add(k);
|
|
2795
2798
|
const m = {
|
|
2796
2799
|
ALLOWED_TAGS: a,
|
|
2797
2800
|
ALLOWED_ATTR: Array.from(f)
|
|
2798
2801
|
};
|
|
2799
2802
|
if (!o)
|
|
2800
|
-
return
|
|
2803
|
+
return Kt.sanitize(n, m);
|
|
2801
2804
|
const g = a.includes("iframe");
|
|
2802
|
-
|
|
2805
|
+
Kt.addHook(
|
|
2803
2806
|
"uponSanitizeElement",
|
|
2804
|
-
(
|
|
2805
|
-
var
|
|
2806
|
-
if (
|
|
2807
|
-
const
|
|
2808
|
-
|
|
2807
|
+
(w, k) => {
|
|
2808
|
+
var T;
|
|
2809
|
+
if (k.tagName !== "iframe") return;
|
|
2810
|
+
const E = w;
|
|
2811
|
+
k.allowedTags.iframe = g || ((T = E.getAttribute) == null ? void 0 : T.call(E, ni)) === "true" && ii(E.getAttribute("src"));
|
|
2809
2812
|
}
|
|
2810
2813
|
);
|
|
2811
2814
|
try {
|
|
2812
|
-
return
|
|
2815
|
+
return Kt.sanitize(n, m);
|
|
2813
2816
|
} finally {
|
|
2814
|
-
|
|
2817
|
+
Kt.removeHook("uponSanitizeElement");
|
|
2815
2818
|
}
|
|
2816
2819
|
}
|
|
2817
2820
|
function ri(n, t, e, o) {
|
|
@@ -2842,10 +2845,10 @@ function Po(n) {
|
|
|
2842
2845
|
r && (r.removeAttribute("contenteditable"), !((a = r.textContent) != null && a.trim()) && !r.querySelector("img, video, a") && r.remove());
|
|
2843
2846
|
}), t.innerHTML;
|
|
2844
2847
|
}
|
|
2845
|
-
function
|
|
2848
|
+
function Lt(n) {
|
|
2846
2849
|
return n ? Po(n.innerHTML) : "";
|
|
2847
2850
|
}
|
|
2848
|
-
const
|
|
2851
|
+
const Xt = class Xt {
|
|
2849
2852
|
/**
|
|
2850
2853
|
* Resolve configuration from multiple sources with priority
|
|
2851
2854
|
*/
|
|
@@ -3037,7 +3040,7 @@ const Yt = class Yt {
|
|
|
3037
3040
|
return e;
|
|
3038
3041
|
}
|
|
3039
3042
|
};
|
|
3040
|
-
|
|
3043
|
+
Xt.EDITOR_DEFAULTS = {
|
|
3041
3044
|
height: 400,
|
|
3042
3045
|
width: "100%",
|
|
3043
3046
|
readonly: !1,
|
|
@@ -3086,7 +3089,7 @@ Yt.EDITOR_DEFAULTS = {
|
|
|
3086
3089
|
sanitizeOnInput: !0
|
|
3087
3090
|
},
|
|
3088
3091
|
statusbar: !1
|
|
3089
|
-
},
|
|
3092
|
+
}, Xt.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
3090
3093
|
"readonly",
|
|
3091
3094
|
"disabled",
|
|
3092
3095
|
"autofocus",
|
|
@@ -3106,11 +3109,11 @@ Yt.EDITOR_DEFAULTS = {
|
|
|
3106
3109
|
"security-sanitize-on-paste",
|
|
3107
3110
|
"security-sanitize-on-input"
|
|
3108
3111
|
]);
|
|
3109
|
-
let
|
|
3110
|
-
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}}';
|
|
3111
|
-
let
|
|
3112
|
-
const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", ko = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", To = ".rte-content, .editora-content", pi = "Rich text editor",
|
|
3113
|
-
let
|
|
3112
|
+
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}}';
|
|
3114
|
+
let qt;
|
|
3115
|
+
const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", ko = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", To = ".rte-content, .editora-content", pi = "Rich text editor", Ce = /* @__PURE__ */ new Set();
|
|
3116
|
+
let tt = null, xo = !1, we = null, ke = null;
|
|
3114
3117
|
function Ao(n) {
|
|
3115
3118
|
if (!(n instanceof HTMLElement)) return !1;
|
|
3116
3119
|
const t = n;
|
|
@@ -3119,7 +3122,7 @@ function Ao(n) {
|
|
|
3119
3122
|
function fi(n) {
|
|
3120
3123
|
return n ? n.nodeType === Node.ELEMENT_NODE ? n : n.parentElement : null;
|
|
3121
3124
|
}
|
|
3122
|
-
function
|
|
3125
|
+
function _t(n) {
|
|
3123
3126
|
if (!n) return null;
|
|
3124
3127
|
if (Ao(n))
|
|
3125
3128
|
return n;
|
|
@@ -3131,43 +3134,43 @@ function hi() {
|
|
|
3131
3134
|
if (typeof window == "undefined") return null;
|
|
3132
3135
|
const n = window[di];
|
|
3133
3136
|
if (n instanceof HTMLElement) {
|
|
3134
|
-
const a =
|
|
3137
|
+
const a = _t(n);
|
|
3135
3138
|
if (a) return a;
|
|
3136
3139
|
const l = n.matches(To) ? n : n.querySelector(To);
|
|
3137
3140
|
if (l) {
|
|
3138
|
-
const c =
|
|
3141
|
+
const c = _t(l);
|
|
3139
3142
|
if (c) return c;
|
|
3140
3143
|
}
|
|
3141
3144
|
}
|
|
3142
3145
|
const t = window[ui];
|
|
3143
3146
|
if (t instanceof HTMLElement) {
|
|
3144
|
-
const a =
|
|
3147
|
+
const a = _t(t);
|
|
3145
3148
|
if (a) return a;
|
|
3146
3149
|
}
|
|
3147
3150
|
const e = document.activeElement;
|
|
3148
3151
|
if (e) {
|
|
3149
|
-
const a =
|
|
3152
|
+
const a = _t(e);
|
|
3150
3153
|
if (a) return a;
|
|
3151
3154
|
}
|
|
3152
3155
|
const o = (r = window.getSelection) == null ? void 0 : r.call(window);
|
|
3153
3156
|
if (o && o.rangeCount > 0) {
|
|
3154
|
-
const a =
|
|
3157
|
+
const a = _t(fi(o.getRangeAt(0).startContainer));
|
|
3155
3158
|
if (a) return a;
|
|
3156
3159
|
}
|
|
3157
|
-
if (
|
|
3158
|
-
return
|
|
3159
|
-
for (const a of
|
|
3160
|
+
if (tt && tt.isConnected)
|
|
3161
|
+
return tt;
|
|
3162
|
+
for (const a of Ce)
|
|
3160
3163
|
if (a.isConnected) return a;
|
|
3161
3164
|
return null;
|
|
3162
3165
|
}
|
|
3163
3166
|
function mi() {
|
|
3164
|
-
if (typeof window == "undefined" ||
|
|
3165
|
-
|
|
3167
|
+
if (typeof window == "undefined" || xo) return;
|
|
3168
|
+
we = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, ke = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
|
|
3166
3169
|
const n = (t, ...e) => {
|
|
3167
3170
|
const o = hi();
|
|
3168
|
-
return o ? o.execCommand(t, ...e) :
|
|
3171
|
+
return o ? o.execCommand(t, ...e) : we ? we(t, ...e) : ke ? ke(t, ...e) : !1;
|
|
3169
3172
|
};
|
|
3170
|
-
window.executeEditorCommand = n, window.execEditorCommand = n,
|
|
3173
|
+
window.executeEditorCommand = n, window.execEditorCommand = n, xo = !0;
|
|
3171
3174
|
}
|
|
3172
3175
|
function gi() {
|
|
3173
3176
|
const n = "editora-webcomponent-styles";
|
|
@@ -3177,15 +3180,15 @@ function gi() {
|
|
|
3177
3180
|
}
|
|
3178
3181
|
}
|
|
3179
3182
|
function bi() {
|
|
3180
|
-
if (!
|
|
3181
|
-
const n =
|
|
3182
|
-
n ?
|
|
3183
|
+
if (!qt) {
|
|
3184
|
+
const n = $.__globalPluginLoader;
|
|
3185
|
+
n ? qt = n : qt = new Co();
|
|
3183
3186
|
}
|
|
3184
|
-
return
|
|
3187
|
+
return qt;
|
|
3185
3188
|
}
|
|
3186
|
-
class
|
|
3189
|
+
class $ extends HTMLElement {
|
|
3187
3190
|
constructor() {
|
|
3188
|
-
if (super(), this.pluginLoader = bi(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new
|
|
3191
|
+
if (super(), this.pluginLoader = bi(), this.config = {}, this.isInitialized = !1, this.buildGeneration = 0, this.keyboardShortcutManager = new En(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, this.pendingHistorySnapshot = null, gi(), !this.hasAttribute("data-initial-content")) {
|
|
3189
3192
|
const t = this.innerHTML.trim();
|
|
3190
3193
|
t && this.setAttribute("data-initial-content", t);
|
|
3191
3194
|
}
|
|
@@ -3252,13 +3255,13 @@ class W extends HTMLElement {
|
|
|
3252
3255
|
* Wait for the global plugin loader to be available
|
|
3253
3256
|
*/
|
|
3254
3257
|
async waitForPluginLoader() {
|
|
3255
|
-
if (
|
|
3256
|
-
this.pluginLoader =
|
|
3258
|
+
if ($.__globalPluginLoader) {
|
|
3259
|
+
this.pluginLoader = $.__globalPluginLoader;
|
|
3257
3260
|
return;
|
|
3258
3261
|
}
|
|
3259
3262
|
return new Promise((t) => {
|
|
3260
3263
|
const e = () => {
|
|
3261
|
-
|
|
3264
|
+
$.__globalPluginLoader ? (this.pluginLoader = $.__globalPluginLoader, t()) : setTimeout(e, 0);
|
|
3262
3265
|
};
|
|
3263
3266
|
e();
|
|
3264
3267
|
});
|
|
@@ -3285,31 +3288,33 @@ class W extends HTMLElement {
|
|
|
3285
3288
|
* Initialize the editor
|
|
3286
3289
|
*/
|
|
3287
3290
|
async initialize() {
|
|
3288
|
-
var
|
|
3291
|
+
var a;
|
|
3289
3292
|
if (this.querySelector(".editora-toolbar") || this.isInitialized) return;
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3293
|
+
const t = ++this.buildGeneration;
|
|
3294
|
+
this.setAttribute("data-editora-editor", "true"), Ce.add(this), tt || (tt = this), mi(), 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.config.theme && this.classList.add(`editora-theme-${this.config.theme}`), this.setAttribute("data-loading", "true"), this.setAttribute("aria-busy", "true");
|
|
3295
|
+
const e = await this.loadPlugins();
|
|
3296
|
+
if (t !== this.buildGeneration || !this.isConnected) return;
|
|
3297
|
+
if (this.loadedPlugins = e, e.forEach((l) => {
|
|
3298
|
+
if (l.init && typeof l.init == "function")
|
|
3294
3299
|
try {
|
|
3295
|
-
|
|
3296
|
-
} catch (
|
|
3297
|
-
console.error(`[RichTextEditor] Error initializing plugin ${
|
|
3300
|
+
l.init({ editorElement: this });
|
|
3301
|
+
} catch (c) {
|
|
3302
|
+
console.error(`[RichTextEditor] Error initializing plugin ${l.name}:`, c);
|
|
3298
3303
|
}
|
|
3299
3304
|
}), !this.hasAttribute("data-initial-content") && !this.contentElement) {
|
|
3300
|
-
const
|
|
3301
|
-
|
|
3305
|
+
const l = this.innerHTML.trim();
|
|
3306
|
+
l && this.setAttribute("data-initial-content", l);
|
|
3302
3307
|
}
|
|
3303
|
-
const
|
|
3308
|
+
const o = this.preservedContent;
|
|
3304
3309
|
this.preservedContent = null;
|
|
3305
|
-
const
|
|
3306
|
-
(
|
|
3310
|
+
const r = this.sanitizeLoadedContent(
|
|
3311
|
+
(a = o != null ? o : this.restoreAutosavedContent()) != null ? a : this.getAttribute("data-initial-content") || ""
|
|
3307
3312
|
);
|
|
3308
3313
|
this.engine = new un({
|
|
3309
|
-
content:
|
|
3310
|
-
plugins:
|
|
3314
|
+
content: r,
|
|
3315
|
+
plugins: e,
|
|
3311
3316
|
readonly: this.config.readonly
|
|
3312
|
-
}), this.createUI(
|
|
3317
|
+
}), 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", {
|
|
3313
3318
|
detail: { api: this.getAPI() },
|
|
3314
3319
|
bubbles: !0
|
|
3315
3320
|
}));
|
|
@@ -3608,7 +3613,7 @@ class W extends HTMLElement {
|
|
|
3608
3613
|
this.stopAutosave();
|
|
3609
3614
|
const t = this.getAutosaveConfig();
|
|
3610
3615
|
!t.enabled || !this.contentElement || (this.autosaveTimer = setInterval(() => {
|
|
3611
|
-
this.persistAutosave(
|
|
3616
|
+
this.persistAutosave(Lt(this.contentElement));
|
|
3612
3617
|
}, t.intervalMs));
|
|
3613
3618
|
}
|
|
3614
3619
|
insertHTMLAtSelection(t) {
|
|
@@ -3702,41 +3707,41 @@ class W extends HTMLElement {
|
|
|
3702
3707
|
selectionCollapsed: (a = (r = window.getSelection()) == null ? void 0 : r.isCollapsed) != null ? a : !0
|
|
3703
3708
|
});
|
|
3704
3709
|
}), this.contentElement.addEventListener("input", (o) => {
|
|
3705
|
-
var
|
|
3710
|
+
var k;
|
|
3706
3711
|
if (!this.contentElement) return;
|
|
3707
3712
|
let r = this.contentElement.innerHTML;
|
|
3708
|
-
const a = (
|
|
3713
|
+
const a = (k = o == null ? void 0 : o.detail) == null ? void 0 : k.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = this.lastBeforeInputType;
|
|
3709
3714
|
if (this.lastBeforeInputType = null, f.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
|
|
3710
|
-
const
|
|
3711
|
-
if (
|
|
3712
|
-
const
|
|
3713
|
-
if (this.contentElement.innerHTML =
|
|
3715
|
+
const E = wo(r, c, f, a);
|
|
3716
|
+
if (E !== r) {
|
|
3717
|
+
const T = window.getSelection(), et = T && T.rangeCount > 0 ? T.getRangeAt(0) : null;
|
|
3718
|
+
if (this.contentElement.innerHTML = E, et && T)
|
|
3714
3719
|
try {
|
|
3715
|
-
|
|
3716
|
-
} catch (
|
|
3720
|
+
T.removeAllRanges(), T.addRange(et);
|
|
3721
|
+
} catch (G) {
|
|
3717
3722
|
}
|
|
3718
|
-
r =
|
|
3723
|
+
r = E;
|
|
3719
3724
|
}
|
|
3720
3725
|
}
|
|
3721
3726
|
this.recordInputHistory(r), this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
|
|
3722
|
-
const
|
|
3727
|
+
const w = () => {
|
|
3723
3728
|
this.dispatchEvent(new CustomEvent("content-change", {
|
|
3724
3729
|
detail: { html: Po(r) },
|
|
3725
3730
|
bubbles: !0
|
|
3726
3731
|
}));
|
|
3727
3732
|
};
|
|
3728
|
-
l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(
|
|
3733
|
+
l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(w, l.debounceInputMs) : w(), this.updateStatusBar();
|
|
3729
3734
|
}), this.contentElement.addEventListener("contextmenu", (o) => {
|
|
3730
3735
|
const r = this.config.contextMenu;
|
|
3731
3736
|
(r === !1 || typeof r == "object" && r !== null && r.enabled === !1) && o.preventDefault();
|
|
3732
3737
|
}), this.contentElement.addEventListener("paste", (o) => {
|
|
3733
|
-
var g,
|
|
3738
|
+
var g, w;
|
|
3734
3739
|
if (o.__editoraSmartPasteHandled === !0 || o.defaultPrevented)
|
|
3735
3740
|
return;
|
|
3736
3741
|
o.preventDefault();
|
|
3737
3742
|
const r = this.config.paste || {};
|
|
3738
3743
|
let a = ((g = o.clipboardData) == null ? void 0 : g.getData("text/html")) || "";
|
|
3739
|
-
const l = ((
|
|
3744
|
+
const l = ((w = o.clipboardData) == null ? void 0 : w.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = !!a && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(a);
|
|
3740
3745
|
if ((r.clean || !r.keepFormatting) && l) {
|
|
3741
3746
|
document.execCommand("insertText", !1, l);
|
|
3742
3747
|
return;
|
|
@@ -3751,10 +3756,10 @@ class W extends HTMLElement {
|
|
|
3751
3756
|
}
|
|
3752
3757
|
l && document.execCommand("insertText", !1, l);
|
|
3753
3758
|
}), this.contentElement.addEventListener("focus", () => {
|
|
3754
|
-
|
|
3759
|
+
tt = this, this.dispatchEvent(new Event("editor-focus", { bubbles: !0 })), this.updateStatusBar();
|
|
3755
3760
|
}), this.contentElement.addEventListener("blur", () => {
|
|
3756
3761
|
this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && this.dispatchEvent(new CustomEvent("content-change", {
|
|
3757
|
-
detail: { html:
|
|
3762
|
+
detail: { html: Lt(this.contentElement) },
|
|
3758
3763
|
bubbles: !0
|
|
3759
3764
|
})), this.dispatchEvent(new Event("editor-blur", { bubbles: !0 })), this.updateFloatingToolbar(), this.updateStatusBar();
|
|
3760
3765
|
}), this.contentElement.addEventListener("keydown", (o) => {
|
|
@@ -3838,7 +3843,7 @@ class W extends HTMLElement {
|
|
|
3838
3843
|
const o = this.contentElement.textContent || "", { words: r, chars: a } = yn(o), l = bn(this.contentElement);
|
|
3839
3844
|
let c, f;
|
|
3840
3845
|
const m = this.getSelectionRangeInEditor();
|
|
3841
|
-
m && (c = mn(this.contentElement, m), m.collapsed || (f =
|
|
3846
|
+
m && (c = mn(this.contentElement, m), m.collapsed || (f = vn(m, c), c = void 0)), this.statusBar.update({
|
|
3842
3847
|
wordCount: r,
|
|
3843
3848
|
charCount: a,
|
|
3844
3849
|
lineCount: l,
|
|
@@ -3931,7 +3936,7 @@ class W extends HTMLElement {
|
|
|
3931
3936
|
const o = this.attributes[e];
|
|
3932
3937
|
t[o.name] = o.value;
|
|
3933
3938
|
}
|
|
3934
|
-
return
|
|
3939
|
+
return Ae.resolve({
|
|
3935
3940
|
jsConfig: this.jsConfig,
|
|
3936
3941
|
attributes: t
|
|
3937
3942
|
});
|
|
@@ -3941,7 +3946,7 @@ class W extends HTMLElement {
|
|
|
3941
3946
|
*/
|
|
3942
3947
|
getAPI() {
|
|
3943
3948
|
return {
|
|
3944
|
-
getContent: () =>
|
|
3949
|
+
getContent: () => Lt(this.contentElement),
|
|
3945
3950
|
setContent: (t) => {
|
|
3946
3951
|
this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
|
|
3947
3952
|
},
|
|
@@ -3969,11 +3974,11 @@ class W extends HTMLElement {
|
|
|
3969
3974
|
*/
|
|
3970
3975
|
destroy() {
|
|
3971
3976
|
var t, e, o, r;
|
|
3972
|
-
this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && (this.preservedContent =
|
|
3977
|
+
this.buildGeneration += 1, this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && (this.preservedContent = Lt(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.isInitialized = !1, Ce.delete(this), tt === this && (tt = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
|
|
3973
3978
|
}
|
|
3974
3979
|
// Public API methods
|
|
3975
3980
|
getContent() {
|
|
3976
|
-
return
|
|
3981
|
+
return Lt(this.contentElement);
|
|
3977
3982
|
}
|
|
3978
3983
|
setContent(t) {
|
|
3979
3984
|
this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
|
|
@@ -3990,8 +3995,8 @@ class W extends HTMLElement {
|
|
|
3990
3995
|
(t = this.contentElement) == null || t.blur();
|
|
3991
3996
|
}
|
|
3992
3997
|
}
|
|
3993
|
-
const
|
|
3994
|
-
|
|
3998
|
+
const Vt = new Co();
|
|
3999
|
+
$.__globalPluginLoader = Vt;
|
|
3995
4000
|
const yi = {
|
|
3996
4001
|
// Core editing plugins (always loaded)
|
|
3997
4002
|
bold: () => import("./BoldPlugin.native-CSh_LiIJ.mjs").then((n) => n.BoldPlugin()),
|
|
@@ -4071,19 +4076,19 @@ const yi = {
|
|
|
4071
4076
|
emojis: () => import("./EmojisPlugin.native-B64efKg5.mjs").then((n) => n.EmojisPlugin()),
|
|
4072
4077
|
a11yChecker: () => import("./A11yCheckerPlugin.native-BBCsR5Ur.mjs").then((n) => n.A11yCheckerPlugin()),
|
|
4073
4078
|
comments: () => import("./CommentsPlugin.native-CxdTwTGE.mjs").then((n) => n.CommentsPlugin()),
|
|
4074
|
-
collaboration: () => import("./CollaborationPlugin.native-
|
|
4079
|
+
collaboration: () => import("./CollaborationPlugin.native-B2AsCMfm.mjs").then((n) => n.CollaborationPlugin()),
|
|
4075
4080
|
"document-manager": () => import("./DocumentManagerPlugin.native-CaBqCH-p.mjs").then((n) => n.DocumentManagerPlugin()),
|
|
4076
4081
|
fullscreen: () => import("./FullscreenPlugin.native-ChXyxeNw.mjs").then((n) => n.FullscreenPlugin()),
|
|
4077
4082
|
template: () => import("./TemplatePlugin.native-OD8Wc1R7.mjs").then((n) => n.TemplatePlugin()),
|
|
4078
4083
|
footnote: () => import("./FootnotePlugin.native-D730OGRm.mjs").then((n) => n.FootnotePlugin())
|
|
4079
4084
|
};
|
|
4080
|
-
async function
|
|
4085
|
+
async function vi() {
|
|
4081
4086
|
return Object.entries(yi).forEach(([n, t]) => {
|
|
4082
|
-
|
|
4083
|
-
}),
|
|
4087
|
+
Vt.register(n, t);
|
|
4088
|
+
}), Vt;
|
|
4084
4089
|
}
|
|
4085
|
-
typeof window != "undefined" &&
|
|
4086
|
-
|
|
4090
|
+
typeof window != "undefined" && vi().then((n) => {
|
|
4091
|
+
$.__globalPluginLoader = n, customElements.get("editora-editor") || customElements.define("editora-editor", $);
|
|
4087
4092
|
const t = document.querySelectorAll("editora-editor:not([data-initial-content])"), e = [];
|
|
4088
4093
|
t.forEach((a) => {
|
|
4089
4094
|
const l = a.innerHTML.trim();
|
|
@@ -4095,16 +4100,16 @@ typeof window != "undefined" && Ei().then((n) => {
|
|
|
4095
4100
|
e[l] && a.setAttribute("data-initial-content", e[l]);
|
|
4096
4101
|
}), window.Editora = {
|
|
4097
4102
|
version: "1.0.0",
|
|
4098
|
-
plugins:
|
|
4099
|
-
WebComponent:
|
|
4103
|
+
plugins: Vt.getRegisteredPluginNames(),
|
|
4104
|
+
WebComponent: $,
|
|
4100
4105
|
init: async (a, l) => {
|
|
4101
4106
|
const c = document.querySelector(a);
|
|
4102
|
-
return c instanceof
|
|
4107
|
+
return c instanceof $ ? (l && await c.setConfig(l), c.getAPI()) : null;
|
|
4103
4108
|
}
|
|
4104
4109
|
};
|
|
4105
4110
|
});
|
|
4106
4111
|
export {
|
|
4107
|
-
|
|
4108
|
-
|
|
4112
|
+
$ as RichTextEditorElement,
|
|
4113
|
+
vi as initWebComponent
|
|
4109
4114
|
};
|
|
4110
4115
|
//# sourceMappingURL=webcomponent.js.map
|