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