@uva-glass/component-library 3.52.4 → 3.52.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexical.prod-BAE-wnll.js → Lexical.prod-sd_e2sqT.js} +648 -627
- package/dist/Lexical.prod-sd_e2sqT.js.map +1 -0
- package/dist/{LexicalClipboard.prod-BS4qAkmJ.js → LexicalClipboard.prod-Co2PF1UJ.js} +44 -42
- package/dist/LexicalClipboard.prod-Co2PF1UJ.js.map +1 -0
- package/dist/{LexicalLink.prod-C6Or2Yo6.js → LexicalLink.prod-BCE6Bg2N.js} +354 -334
- package/dist/LexicalLink.prod-BCE6Bg2N.js.map +1 -0
- package/dist/{LexicalList.prod-rTq41CO0.js → LexicalList.prod-CIB0K0ja.js} +141 -138
- package/dist/LexicalList.prod-CIB0K0ja.js.map +1 -0
- package/dist/{LexicalSelection.prod-fLzEGOT_.js → LexicalSelection.prod-CCmcTP6S.js} +41 -41
- package/dist/{LexicalSelection.prod-fLzEGOT_.js.map → LexicalSelection.prod-CCmcTP6S.js.map} +1 -1
- package/dist/{LexicalTable.prod-BBI7yaOy.js → LexicalTable.prod-Oa2YPHLl.js} +359 -359
- package/dist/LexicalTable.prod-Oa2YPHLl.js.map +1 -0
- package/dist/{LexicalUtils.prod-D8DAKg7O.js → LexicalUtils.prod-CjKjgnmx.js} +43 -43
- package/dist/{LexicalUtils.prod-D8DAKg7O.js.map → LexicalUtils.prod-CjKjgnmx.js.map} +1 -1
- package/dist/{TableCellResizerPlugin-HPo4ZkHo.js → TableCellResizerPlugin-DATbSzfg.js} +51 -51
- package/dist/{TableCellResizerPlugin-HPo4ZkHo.js.map → TableCellResizerPlugin-DATbSzfg.js.map} +1 -1
- package/dist/{TablePlugin-BLbsvcuu.js → TablePlugin-CqCjNBW_.js} +83 -83
- package/dist/{TablePlugin-BLbsvcuu.js.map → TablePlugin-CqCjNBW_.js.map} +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +52 -52
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +27 -27
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +16 -16
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/RteEditor.js +185 -185
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +8 -8
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +11 -11
- package/dist/components/SelectListbox/components/SelectButton.js +17 -17
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/dist/Lexical.prod-BAE-wnll.js.map +0 -1
- package/dist/LexicalClipboard.prod-BS4qAkmJ.js.map +0 -1
- package/dist/LexicalLink.prod-C6Or2Yo6.js.map +0 -1
- package/dist/LexicalList.prod-rTq41CO0.js.map +0 -1
- package/dist/LexicalTable.prod-BBI7yaOy.js.map +0 -1
|
@@ -18,7 +18,7 @@ function Ni(...n) {
|
|
|
18
18
|
}
|
|
19
19
|
const Fs = 0, Ls = 1, Is = 2, wi = 128, Ks = 1, zs = 2, Bs = 3, Rs = 4, Ws = 5, Js = 6, hn = St || st || vt ? " " : "", Oe = `
|
|
20
20
|
|
|
21
|
-
`,
|
|
21
|
+
`, js = Be ? " " : hn, Re = { bold: 1, capitalize: 1024, code: 16, highlight: wi, italic: 2, lowercase: 256, strikethrough: 4, subscript: 32, superscript: 64, underline: 8, uppercase: 512 }, $s = { directionless: 1, unmergeable: 2 }, Nr = { center: 2, end: 6, justify: 4, left: 1, right: 3, start: 5 }, Us = { [zs]: "center", [Js]: "end", [Rs]: "justify", [Ks]: "left", [Bs]: "right", [Ws]: "start" }, Vs = { normal: 0, segmented: 2, token: 1 }, Ys = { [Fs]: "normal", [Is]: "segmented", [Ls]: "token" }, wr = "$config";
|
|
22
22
|
function Ei(n, e, t, r, i, s) {
|
|
23
23
|
let o = n.getFirstChild();
|
|
24
24
|
for (; o !== null; ) {
|
|
@@ -26,30 +26,30 @@ function Ei(n, e, t, r, i, s) {
|
|
|
26
26
|
o.__parent === e && (v(o) && Ei(o, l, t, r, i, s), t.has(l) || s.delete(l), i.push(l)), o = o.getNextSibling();
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
let
|
|
29
|
+
let Rn = !1, ir = 0;
|
|
30
30
|
function Hs(n) {
|
|
31
|
-
|
|
31
|
+
ir = n.timeStamp;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function wn(n, e, t) {
|
|
34
34
|
const r = n.nodeName === "BR", i = e.__lexicalLineBreak;
|
|
35
35
|
return i && (n === i || r && n.previousSibling === i) || r && Cn(n, t) !== void 0;
|
|
36
36
|
}
|
|
37
37
|
function qs(n, e, t) {
|
|
38
|
-
const r =
|
|
38
|
+
const r = ve(se(t));
|
|
39
39
|
let i = null, s = null;
|
|
40
40
|
r !== null && r.anchorNode === n && (i = r.anchorOffset, s = r.focusOffset);
|
|
41
41
|
const o = n.nodeValue;
|
|
42
|
-
o !== null &&
|
|
42
|
+
o !== null && pr(e, o, i, s, !1);
|
|
43
43
|
}
|
|
44
44
|
function Gs(n, e, t) {
|
|
45
45
|
if (A(n)) {
|
|
46
46
|
const r = n.anchor.getNode();
|
|
47
47
|
if (r.is(t) && n.format !== r.getFormat()) return !1;
|
|
48
48
|
}
|
|
49
|
-
return
|
|
49
|
+
return ke(e) && t.isAttached();
|
|
50
50
|
}
|
|
51
51
|
function Xs(n, e, t, r) {
|
|
52
|
-
for (let i = n; i && !
|
|
52
|
+
for (let i = n; i && !ll(i); i = Lt(i)) {
|
|
53
53
|
const s = Cn(i, e);
|
|
54
54
|
if (s !== void 0) {
|
|
55
55
|
const o = U(s, t);
|
|
@@ -58,8 +58,8 @@ function Xs(n, e, t, r) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
function Mi(n, e, t) {
|
|
61
|
-
|
|
62
|
-
const r = performance.now() -
|
|
61
|
+
Rn = !0;
|
|
62
|
+
const r = performance.now() - ir > 100;
|
|
63
63
|
try {
|
|
64
64
|
ne(n, () => {
|
|
65
65
|
const i = L() || (function(f) {
|
|
@@ -73,28 +73,28 @@ function Mi(n, e, t) {
|
|
|
73
73
|
const g = e[f], h = g.type, _ = g.target, p = Xs(_, n, l, o);
|
|
74
74
|
if (!p) continue;
|
|
75
75
|
const [x, y] = p;
|
|
76
|
-
if (h === "characterData") r && M(y) &&
|
|
76
|
+
if (h === "characterData") r && M(y) && ke(_) && Gs(i, _, y) && qs(_, y, n);
|
|
77
77
|
else if (h === "childList") {
|
|
78
78
|
c = !0;
|
|
79
79
|
const m = g.addedNodes;
|
|
80
|
-
for (let
|
|
81
|
-
const w = m[
|
|
82
|
-
if (
|
|
80
|
+
for (let S = 0; S < m.length; S++) {
|
|
81
|
+
const w = m[S], k = ms(w), C = w.parentNode;
|
|
82
|
+
if (C != null && w !== a && k === null && !wn(w, C, n)) {
|
|
83
83
|
if (Be) {
|
|
84
84
|
const O = (ee(w) ? w.innerText : null) || w.nodeValue;
|
|
85
85
|
O && (u += O);
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
C.removeChild(w);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
const b = g.removedNodes, N = b.length;
|
|
91
91
|
if (N > 0) {
|
|
92
|
-
let
|
|
92
|
+
let S = 0;
|
|
93
93
|
for (let w = 0; w < N; w++) {
|
|
94
94
|
const k = b[w];
|
|
95
|
-
(
|
|
95
|
+
(wn(k, _, n) || a === k) && (_.appendChild(k), S++);
|
|
96
96
|
}
|
|
97
|
-
N !==
|
|
97
|
+
N !== S && s.set(x, y);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -105,7 +105,7 @@ function Mi(n, e, t) {
|
|
|
105
105
|
const g = d[f], h = g.addedNodes, _ = g.target;
|
|
106
106
|
for (let p = 0; p < h.length; p++) {
|
|
107
107
|
const x = h[p], y = x.parentNode;
|
|
108
|
-
y == null || x.nodeName !== "BR" ||
|
|
108
|
+
y == null || x.nodeName !== "BR" || wn(x, _, n) || y.removeChild(x);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
t.takeRecords();
|
|
@@ -113,7 +113,7 @@ function Mi(n, e, t) {
|
|
|
113
113
|
i !== null && (c && re(i), Be && Ts(n) && i.insertRawText(u));
|
|
114
114
|
});
|
|
115
115
|
} finally {
|
|
116
|
-
|
|
116
|
+
Rn = !1;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
function Oi(n) {
|
|
@@ -122,7 +122,7 @@ function Oi(n) {
|
|
|
122
122
|
}
|
|
123
123
|
function Ai(n) {
|
|
124
124
|
(function(e) {
|
|
125
|
-
|
|
125
|
+
ir === 0 && se(e).addEventListener("textInput", Hs, !0);
|
|
126
126
|
})(n), n._observer = new MutationObserver((e, t) => {
|
|
127
127
|
Mi(n, e, t);
|
|
128
128
|
});
|
|
@@ -130,7 +130,7 @@ function Ai(n) {
|
|
|
130
130
|
function Qs(n) {
|
|
131
131
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
|
|
132
132
|
for (let r = typeof n == "function" ? n : n.replace; r.prototype && r.prototype.getType !== void 0; r = Object.getPrototypeOf(r)) {
|
|
133
|
-
const { ownNodeConfig: i } =
|
|
133
|
+
const { ownNodeConfig: i } = kn(r);
|
|
134
134
|
if (i && i.stateConfigs) for (const s of i.stateConfigs) {
|
|
135
135
|
let o;
|
|
136
136
|
"stateConfig" in s ? (o = s.stateConfig, s.flat && t.add(o.key)) : o = s, e.set(o.key, o);
|
|
@@ -138,7 +138,7 @@ function Qs(n) {
|
|
|
138
138
|
}
|
|
139
139
|
return { flatKeys: t, sharedConfigMap: e };
|
|
140
140
|
}
|
|
141
|
-
class
|
|
141
|
+
class sr {
|
|
142
142
|
node;
|
|
143
143
|
knownState;
|
|
144
144
|
unknownState;
|
|
@@ -179,7 +179,7 @@ class ir {
|
|
|
179
179
|
getWritable(e) {
|
|
180
180
|
if (this.node === e) return this;
|
|
181
181
|
const { sharedNodeState: t, unknownState: r } = this, i = new Map(this.knownState);
|
|
182
|
-
return new
|
|
182
|
+
return new sr(e, t, (function(s, o, l) {
|
|
183
183
|
let a;
|
|
184
184
|
if (l) for (const [c, u] of Object.entries(l)) {
|
|
185
185
|
const d = s.get(c);
|
|
@@ -205,11 +205,11 @@ class ir {
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
function Zs(n) {
|
|
208
|
-
const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new
|
|
208
|
+
const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new sr(e, Pi(e));
|
|
209
209
|
return e.__state = t, t;
|
|
210
210
|
}
|
|
211
211
|
function Pi(n) {
|
|
212
|
-
return n.__state ? n.__state.sharedNodeState : hs(
|
|
212
|
+
return n.__state ? n.__state.sharedNodeState : hs(il(), n.getType()).sharedNodeState;
|
|
213
213
|
}
|
|
214
214
|
function Er(n) {
|
|
215
215
|
if (n) for (const e in n) return n;
|
|
@@ -274,7 +274,7 @@ function Fr(n) {
|
|
|
274
274
|
}
|
|
275
275
|
} else r.remove();
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Wn(n) {
|
|
278
278
|
return Lr(n.anchor), Lr(n.focus), n;
|
|
279
279
|
}
|
|
280
280
|
function Lr(n) {
|
|
@@ -289,20 +289,20 @@ function Lr(n) {
|
|
|
289
289
|
n.set(r.__key, i ? r.getChildrenSize() : 0, "element", !0);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
let We, Q, kt, gn,
|
|
292
|
+
let We, Q, kt, gn, Jn, jn, Je, le, $n, Tt, J = "", ce = null, ue = "", Ce = "", Ze = !1, Zt = !1;
|
|
293
293
|
function en(n, e) {
|
|
294
294
|
const t = Je.get(n);
|
|
295
295
|
if (e !== null) {
|
|
296
|
-
const r =
|
|
296
|
+
const r = Hn(n);
|
|
297
297
|
r.parentNode === e && e.removeChild(r);
|
|
298
298
|
}
|
|
299
299
|
if (le.has(n) || Q._keyToDOMMap.delete(n), v(t)) {
|
|
300
300
|
const r = nn(t, Je);
|
|
301
|
-
|
|
301
|
+
Un(r, 0, r.length - 1, null);
|
|
302
302
|
}
|
|
303
|
-
t !== void 0 &&
|
|
303
|
+
t !== void 0 && yr(Tt, kt, gn, t, "destroyed");
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function Un(n, e, t, r) {
|
|
306
306
|
let i = e;
|
|
307
307
|
for (; i <= t; ++i) {
|
|
308
308
|
const s = n[i];
|
|
@@ -326,7 +326,7 @@ function Fi(n, e) {
|
|
|
326
326
|
const t = n.style;
|
|
327
327
|
e === 0 ? Fe(t, "") : e === 1 ? Fe(t, "left") : e === 2 ? Fe(t, "center") : e === 3 ? Fe(t, "right") : e === 4 ? Fe(t, "justify") : e === 5 ? Fe(t, "start") : e === 6 && Fe(t, "end");
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Vn(n, e) {
|
|
330
330
|
const t = (function(r) {
|
|
331
331
|
const i = r.__dir;
|
|
332
332
|
if (i !== null) return i;
|
|
@@ -348,23 +348,23 @@ function tn(n, e) {
|
|
|
348
348
|
})(s, o, i), l.set(i, s);
|
|
349
349
|
})(n, r, Q), M(t) ? r.setAttribute("data-lexical-text", "true") : B(t) && r.setAttribute("data-lexical-decorator", "true"), v(t)) {
|
|
350
350
|
const i = t.__indent, s = t.__size;
|
|
351
|
-
if (
|
|
351
|
+
if (Vn(r, t), i !== 0 && Di(r, i), s !== 0) {
|
|
352
352
|
const l = s - 1;
|
|
353
|
-
|
|
353
|
+
Yn(nn(t, le), t, 0, l, t.getDOMSlot(r));
|
|
354
354
|
}
|
|
355
355
|
const o = t.__format;
|
|
356
|
-
o !== 0 && Fi(r, o), t.isInline() || Li(null, t, r), Sn(t) && (J += Oe,
|
|
356
|
+
o !== 0 && Fi(r, o), t.isInline() || Li(null, t, r), Sn(t) && (J += Oe, Ce += Oe);
|
|
357
357
|
} else {
|
|
358
358
|
const i = t.getTextContent();
|
|
359
359
|
if (B(t)) {
|
|
360
360
|
const s = t.decorate(Q, We);
|
|
361
361
|
s !== null && Ii(n, s), r.contentEditable = "false";
|
|
362
362
|
}
|
|
363
|
-
J += i,
|
|
363
|
+
J += i, Ce += i;
|
|
364
364
|
}
|
|
365
|
-
return e !== null && e.insertChild(r),
|
|
365
|
+
return e !== null && e.insertChild(r), yr(Tt, kt, gn, t, "created"), r;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Yn(n, e, t, r, i) {
|
|
368
368
|
const s = J;
|
|
369
369
|
J = "";
|
|
370
370
|
let o = t;
|
|
@@ -400,7 +400,7 @@ function to(n, e, t) {
|
|
|
400
400
|
const d = i.__first, f = s.__first;
|
|
401
401
|
if (d === f) _t(d, u);
|
|
402
402
|
else {
|
|
403
|
-
const h =
|
|
403
|
+
const h = Hn(d), _ = tn(f, null);
|
|
404
404
|
try {
|
|
405
405
|
u.replaceChild(_, h);
|
|
406
406
|
} catch (p) {
|
|
@@ -416,35 +416,35 @@ function to(n, e, t) {
|
|
|
416
416
|
M(g) && (ce === null && (ce = g.getFormat()), ue === "" && (ue = g.getStyle()));
|
|
417
417
|
} else {
|
|
418
418
|
const d = nn(i, Je), f = nn(s, le);
|
|
419
|
-
if (d.length !== a && T(227), f.length !== c && T(228), a === 0) c !== 0 &&
|
|
419
|
+
if (d.length !== a && T(227), f.length !== c && T(228), a === 0) c !== 0 && Yn(f, s, 0, c - 1, o);
|
|
420
420
|
else if (c === 0) {
|
|
421
421
|
if (a !== 0) {
|
|
422
422
|
const g = o.after == null && o.before == null && o.element.__lexicalLineBreak == null;
|
|
423
|
-
|
|
423
|
+
Un(d, 0, a - 1, g ? null : u), g && (u.textContent = "");
|
|
424
424
|
}
|
|
425
425
|
} else (function(g, h, _, p, x, y) {
|
|
426
426
|
const m = p - 1, b = x - 1;
|
|
427
|
-
let N,
|
|
428
|
-
for (; k <= m &&
|
|
429
|
-
const z = h[k], F = _[
|
|
430
|
-
if (z === F) w =
|
|
427
|
+
let N, S, w = y.getFirstChild(), k = 0, C = 0;
|
|
428
|
+
for (; k <= m && C <= b; ) {
|
|
429
|
+
const z = h[k], F = _[C];
|
|
430
|
+
if (z === F) w = En(_t(F, y.element)), k++, C++;
|
|
431
431
|
else {
|
|
432
|
-
N === void 0 && (N = new Set(h)),
|
|
433
|
-
const W =
|
|
432
|
+
N === void 0 && (N = new Set(h)), S === void 0 && (S = new Set(_));
|
|
433
|
+
const W = S.has(z), G = N.has(F);
|
|
434
434
|
if (W) if (G) {
|
|
435
|
-
const te =
|
|
436
|
-
te === w ? w =
|
|
437
|
-
} else tn(F, y.withBefore(w)),
|
|
438
|
-
else w =
|
|
435
|
+
const te = je(Q, F);
|
|
436
|
+
te === w ? w = En(_t(F, y.element)) : (y.withBefore(w).insertChild(te), _t(F, y.element)), k++, C++;
|
|
437
|
+
} else tn(F, y.withBefore(w)), C++;
|
|
438
|
+
else w = En(Hn(z)), en(z, y.element), k++;
|
|
439
439
|
}
|
|
440
440
|
const I = le.get(F);
|
|
441
441
|
I !== null && M(I) && (ce === null && (ce = I.getFormat()), ue === "" && (ue = I.getStyle()));
|
|
442
442
|
}
|
|
443
|
-
const O = k > m, D =
|
|
443
|
+
const O = k > m, D = C > b;
|
|
444
444
|
if (O && !D) {
|
|
445
445
|
const z = _[b + 1], F = z === void 0 ? null : Q.getElementByKey(z);
|
|
446
|
-
|
|
447
|
-
} else D && !O &&
|
|
446
|
+
Yn(_, g, C, b, y.withBefore(F));
|
|
447
|
+
} else D && !O && Un(h, k, m, y.element);
|
|
448
448
|
})(s, d, f, a, c, o);
|
|
449
449
|
}
|
|
450
450
|
Sn(s) && (J += Oe), u.__lexicalTextContent = J, J = l + J;
|
|
@@ -465,18 +465,18 @@ function _t(n, e) {
|
|
|
465
465
|
const t = Je.get(n);
|
|
466
466
|
let r = le.get(n);
|
|
467
467
|
t !== void 0 && r !== void 0 || T(61);
|
|
468
|
-
const i = Ze ||
|
|
468
|
+
const i = Ze || jn.has(n) || Jn.has(n), s = je(Q, n);
|
|
469
469
|
if (t === r && !i) {
|
|
470
470
|
if (v(t)) {
|
|
471
471
|
const o = s.__lexicalTextContent;
|
|
472
|
-
o !== void 0 && (J += o,
|
|
472
|
+
o !== void 0 && (J += o, Ce += o);
|
|
473
473
|
} else {
|
|
474
474
|
const o = t.getTextContent();
|
|
475
|
-
|
|
475
|
+
Ce += o, J += o;
|
|
476
476
|
}
|
|
477
477
|
return s;
|
|
478
478
|
}
|
|
479
|
-
if (t !== r && i &&
|
|
479
|
+
if (t !== r && i && yr(Tt, kt, gn, r, "updated"), r.updateDOM(t, s, We)) {
|
|
480
480
|
const o = tn(n, null);
|
|
481
481
|
return e === null && T(62), e.replaceChild(o, s), en(n, null), o;
|
|
482
482
|
}
|
|
@@ -484,18 +484,18 @@ function _t(n, e) {
|
|
|
484
484
|
const o = r.__indent;
|
|
485
485
|
(Ze || o !== t.__indent) && Di(s, o);
|
|
486
486
|
const l = r.__format;
|
|
487
|
-
if ((Ze || l !== t.__format) && Fi(s, l), i && (to(t, r, s), H(r) || r.isInline() || Li(t, r, s)), Sn(r) && (J += Oe,
|
|
487
|
+
if ((Ze || l !== t.__format) && Fi(s, l), i && (to(t, r, s), H(r) || r.isInline() || Li(t, r, s)), Sn(r) && (J += Oe, Ce += Oe), (Ze || r.__dir !== t.__dir) && (Vn(s, r), H(r) && !Ze)) for (const a of r.getChildren()) v(a) && Vn(je(Q, a.getKey()), a);
|
|
488
488
|
} else {
|
|
489
489
|
const o = r.getTextContent();
|
|
490
490
|
if (B(r)) {
|
|
491
491
|
const l = r.decorate(Q, We);
|
|
492
492
|
l !== null && Ii(n, l);
|
|
493
493
|
}
|
|
494
|
-
J += o,
|
|
494
|
+
J += o, Ce += o;
|
|
495
495
|
}
|
|
496
|
-
if (!Zt && H(r) && r.__cachedText !==
|
|
496
|
+
if (!Zt && H(r) && r.__cachedText !== Ce) {
|
|
497
497
|
const o = r.getWritable();
|
|
498
|
-
o.__cachedText =
|
|
498
|
+
o.__cachedText = Ce, r = o;
|
|
499
499
|
}
|
|
500
500
|
return s;
|
|
501
501
|
}
|
|
@@ -508,38 +508,38 @@ function Ii(n, e) {
|
|
|
508
508
|
}
|
|
509
509
|
t[n] = e;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function En(n) {
|
|
512
512
|
let e = n.nextSibling;
|
|
513
513
|
return e !== null && e === Q._blockCursorElement && (e = e.nextSibling), e;
|
|
514
514
|
}
|
|
515
515
|
function no(n, e, t, r, i, s) {
|
|
516
|
-
J = "",
|
|
516
|
+
J = "", Ce = "", Ze = r === 2, Q = t, We = t._config, kt = t._nodes, gn = Q._listeners.mutation, Jn = i, jn = s, Je = n._nodeMap, le = e._nodeMap, Zt = e._readOnly, $n = new Map(t._keyToDOMMap);
|
|
517
517
|
const o = /* @__PURE__ */ new Map();
|
|
518
|
-
return Tt = o, _t("root", null), Q = void 0, kt = void 0,
|
|
518
|
+
return Tt = o, _t("root", null), Q = void 0, kt = void 0, Jn = void 0, jn = void 0, Je = void 0, le = void 0, We = void 0, $n = void 0, Tt = void 0, o;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Hn(n) {
|
|
521
521
|
const e = $n.get(n);
|
|
522
522
|
return e === void 0 && T(75, n), e;
|
|
523
523
|
}
|
|
524
524
|
function P(n) {
|
|
525
525
|
return { type: n };
|
|
526
526
|
}
|
|
527
|
-
const Ki = P("SELECTION_CHANGE_COMMAND"),
|
|
528
|
-
if (yt = n.timeStamp,
|
|
529
|
-
if (
|
|
530
|
-
Wt(e,
|
|
531
|
-
}),
|
|
527
|
+
const Ki = P("SELECTION_CHANGE_COMMAND"), vl = P("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), ro = P("CLICK_COMMAND"), rn = P("DELETE_CHARACTER_COMMAND"), Vt = P("INSERT_LINE_BREAK_COMMAND"), Kr = P("INSERT_PARAGRAPH_COMMAND"), pt = P("CONTROLLED_TEXT_INSERTION_COMMAND"), zi = P("PASTE_COMMAND"), zr = P("REMOVE_TEXT_COMMAND"), sn = P("DELETE_WORD_COMMAND"), on = P("DELETE_LINE_COMMAND"), Ie = P("FORMAT_TEXT_COMMAND"), Bi = P("UNDO_COMMAND"), Ri = P("REDO_COMMAND"), io = P("KEYDOWN_COMMAND"), so = P("KEY_ARROW_RIGHT_COMMAND"), oo = P("MOVE_TO_END"), lo = P("KEY_ARROW_LEFT_COMMAND"), ao = P("MOVE_TO_START"), co = P("KEY_ARROW_UP_COMMAND"), uo = P("KEY_ARROW_DOWN_COMMAND"), qn = P("KEY_ENTER_COMMAND"), fo = P("KEY_SPACE_COMMAND"), ho = P("KEY_BACKSPACE_COMMAND"), go = P("KEY_ESCAPE_COMMAND"), _o = P("KEY_DELETE_COMMAND"), po = P("KEY_TAB_COMMAND"), kl = P("INSERT_TAB_COMMAND"), Tl = P("INDENT_CONTENT_COMMAND"), bl = P("OUTDENT_CONTENT_COMMAND"), yo = P("DROP_COMMAND"), Nl = P("FORMAT_ELEMENT_COMMAND"), mo = P("DRAGSTART_COMMAND"), xo = P("DRAGOVER_COMMAND"), Co = P("DRAGEND_COMMAND"), Wi = P("COPY_COMMAND"), Ji = P("CUT_COMMAND"), Br = P("SELECT_ALL_COMMAND"), wl = P("CLEAR_EDITOR_COMMAND"), El = P("CLEAR_HISTORY_COMMAND"), Ml = P("CAN_REDO_COMMAND"), Ol = P("CAN_UNDO_COMMAND"), So = P("FOCUS_COMMAND"), vo = P("BLUR_COMMAND"), ko = P("KEY_MODIFIER_COMMAND"), ye = Object.freeze({}), Gn = [["keydown", function(n, e) {
|
|
528
|
+
if (yt = n.timeStamp, ji = n.key, !e.isComposing() && !E(e, io, n) && n.key != null) {
|
|
529
|
+
if (Mn && gi(n)) return ne(e, () => {
|
|
530
|
+
Wt(e, On);
|
|
531
|
+
}), Mn = !1, void (On = "");
|
|
532
532
|
if ((function(t) {
|
|
533
533
|
return K(t, "ArrowRight", { shiftKey: "any" });
|
|
534
534
|
})(n)) E(e, so, n);
|
|
535
535
|
else if ((function(t) {
|
|
536
|
-
return K(t, "ArrowRight",
|
|
536
|
+
return K(t, "ArrowRight", xe);
|
|
537
537
|
})(n)) E(e, oo, n);
|
|
538
538
|
else if ((function(t) {
|
|
539
539
|
return K(t, "ArrowLeft", { shiftKey: "any" });
|
|
540
540
|
})(n)) E(e, lo, n);
|
|
541
541
|
else if ((function(t) {
|
|
542
|
-
return K(t, "ArrowLeft",
|
|
542
|
+
return K(t, "ArrowLeft", xe);
|
|
543
543
|
})(n)) E(e, ao, n);
|
|
544
544
|
else if ((function(t) {
|
|
545
545
|
return K(t, "ArrowUp", { altKey: "any", shiftKey: "any" });
|
|
@@ -549,7 +549,7 @@ const Ki = P("SELECTION_CHANGE_COMMAND"), Sl = P("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
549
549
|
})(n)) E(e, uo, n);
|
|
550
550
|
else if ((function(t) {
|
|
551
551
|
return K(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any", shiftKey: !0 });
|
|
552
|
-
})(n)) mt = !0, E(e,
|
|
552
|
+
})(n)) mt = !0, E(e, qn, n);
|
|
553
553
|
else if ((function(t) {
|
|
554
554
|
return t.key === " ";
|
|
555
555
|
})(n)) E(e, fo, n);
|
|
@@ -558,7 +558,7 @@ const Ki = P("SELECTION_CHANGE_COMMAND"), Sl = P("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
558
558
|
})(n)) n.preventDefault(), mt = !0, E(e, Vt, !0);
|
|
559
559
|
else if ((function(t) {
|
|
560
560
|
return K(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any" });
|
|
561
|
-
})(n)) mt = !1, E(e,
|
|
561
|
+
})(n)) mt = !1, E(e, qn, n);
|
|
562
562
|
else if ((function(t) {
|
|
563
563
|
return K(t, "Backspace", { shiftKey: "any" }) || oe && K(t, "h", { ctrlKey: !0 });
|
|
564
564
|
})(n)) gi(n) ? E(e, ho, n) : (n.preventDefault(), E(e, rn, !0));
|
|
@@ -583,19 +583,19 @@ const Ki = P("SELECTION_CHANGE_COMMAND"), Sl = P("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
583
583
|
return oe && (K(t, "Delete", { metaKey: !0 }) || K(t, "k", { ctrlKey: !0 }));
|
|
584
584
|
})(n)) n.preventDefault(), E(e, on, !1);
|
|
585
585
|
else if ((function(t) {
|
|
586
|
-
return K(t, "b",
|
|
586
|
+
return K(t, "b", xe);
|
|
587
587
|
})(n)) n.preventDefault(), E(e, Ie, "bold");
|
|
588
588
|
else if ((function(t) {
|
|
589
|
-
return K(t, "u",
|
|
589
|
+
return K(t, "u", xe);
|
|
590
590
|
})(n)) n.preventDefault(), E(e, Ie, "underline");
|
|
591
591
|
else if ((function(t) {
|
|
592
|
-
return K(t, "i",
|
|
592
|
+
return K(t, "i", xe);
|
|
593
593
|
})(n)) n.preventDefault(), E(e, Ie, "italic");
|
|
594
594
|
else if ((function(t) {
|
|
595
595
|
return K(t, "Tab", { shiftKey: "any" });
|
|
596
596
|
})(n)) E(e, po, n);
|
|
597
597
|
else if ((function(t) {
|
|
598
|
-
return K(t, "z",
|
|
598
|
+
return K(t, "z", xe);
|
|
599
599
|
})(n)) n.preventDefault(), E(e, Bi, void 0);
|
|
600
600
|
else if ((function(t) {
|
|
601
601
|
return oe ? K(t, "z", { metaKey: !0, shiftKey: !0 }) : K(t, "y", { ctrlKey: !0 }) || K(t, "z", { ctrlKey: !0, shiftKey: !0 });
|
|
@@ -603,9 +603,9 @@ const Ki = P("SELECTION_CHANGE_COMMAND"), Sl = P("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
603
603
|
else {
|
|
604
604
|
const t = e._editorState._selection;
|
|
605
605
|
t === null || A(t) ? _i(n) && (n.preventDefault(), E(e, Br, n)) : (function(r) {
|
|
606
|
-
return K(r, "c",
|
|
606
|
+
return K(r, "c", xe);
|
|
607
607
|
})(n) ? (n.preventDefault(), E(e, Wi, n)) : (function(r) {
|
|
608
|
-
return K(r, "x",
|
|
608
|
+
return K(r, "x", xe);
|
|
609
609
|
})(n) ? (n.preventDefault(), E(e, Ji, n)) : _i(n) && (n.preventDefault(), E(e, Br, n));
|
|
610
610
|
}
|
|
611
611
|
(function(t) {
|
|
@@ -615,34 +615,34 @@ const Ki = P("SELECTION_CHANGE_COMMAND"), Sl = P("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
615
615
|
}], ["pointerdown", function(n, e) {
|
|
616
616
|
const t = n.target, r = n.pointerType;
|
|
617
617
|
It(t) && r !== "touch" && r !== "pen" && n.button === 0 && ne(e, () => {
|
|
618
|
-
ui(t) || (
|
|
618
|
+
ui(t) || (Zn = !0);
|
|
619
619
|
});
|
|
620
620
|
}], ["compositionstart", function(n, e) {
|
|
621
621
|
ne(e, () => {
|
|
622
622
|
const t = L();
|
|
623
623
|
if (A(t) && !e.isComposing()) {
|
|
624
624
|
const r = t.anchor, i = t.anchor.getNode();
|
|
625
|
-
Y(r.key), (n.timeStamp < yt + 30 || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || M(i) && i.getStyle() !== t.style) && E(e, pt,
|
|
625
|
+
Y(r.key), (n.timeStamp < yt + 30 || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || M(i) && i.getStyle() !== t.style) && E(e, pt, js);
|
|
626
626
|
}
|
|
627
627
|
});
|
|
628
628
|
}], ["compositionend", function(n, e) {
|
|
629
629
|
Be ? ht = !0 : st || !St && !vt ? ne(e, () => {
|
|
630
630
|
Wt(e, n.data);
|
|
631
|
-
}) : (
|
|
631
|
+
}) : (Mn = !0, On = n.data);
|
|
632
632
|
}], ["input", function(n, e) {
|
|
633
633
|
n.stopPropagation(), ne(e, () => {
|
|
634
634
|
if (ee(n.target) && ui(n.target)) return;
|
|
635
635
|
const t = L(), r = n.data, i = Hi(n);
|
|
636
636
|
if (r != null && A(t) && Vi(t, i, r, n.timeStamp, !1)) {
|
|
637
637
|
ht && (Wt(e, r), ht = !1);
|
|
638
|
-
const s = t.anchor.getNode(), o =
|
|
638
|
+
const s = t.anchor.getNode(), o = ve(se(e));
|
|
639
639
|
if (o === null) return;
|
|
640
640
|
const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, c = l ? t.focus.offset : t.anchor.offset;
|
|
641
641
|
Qt && !t.isCollapsed() && M(s) && o.anchorNode !== null && s.getTextContent().slice(0, a) + r + s.getTextContent().slice(a + c) === ks(o.anchorNode) || E(e, pt, r);
|
|
642
642
|
const u = r.length;
|
|
643
643
|
Be && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), St || st || vt || !e.isComposing() || (yt = 0, Y(null));
|
|
644
644
|
} else
|
|
645
|
-
|
|
645
|
+
_r(!1, e, r !== null ? r : void 0), ht && (Wt(e, r || void 0), ht = !1);
|
|
646
646
|
(function() {
|
|
647
647
|
X();
|
|
648
648
|
const s = R();
|
|
@@ -651,7 +651,7 @@ const Ki = P("SELECTION_CHANGE_COMMAND"), Sl = P("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
651
651
|
}, { event: n }), et = null;
|
|
652
652
|
}], ["click", function(n, e) {
|
|
653
653
|
ne(e, () => {
|
|
654
|
-
const t = L(), r =
|
|
654
|
+
const t = L(), r = ve(se(e)), i = ut();
|
|
655
655
|
if (r) {
|
|
656
656
|
if (A(t)) {
|
|
657
657
|
const s = t.anchor, o = s.getNode();
|
|
@@ -662,13 +662,13 @@ const Ki = P("SELECTION_CHANGE_COMMAND"), Sl = P("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
662
662
|
}
|
|
663
663
|
} else if (n.pointerType === "touch" || n.pointerType === "pen") {
|
|
664
664
|
const s = r.anchorNode;
|
|
665
|
-
(ee(s) ||
|
|
665
|
+
(ee(s) || ke(s)) && re(pn(i, r, e, n));
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
E(e, ro, n);
|
|
669
669
|
});
|
|
670
|
-
}], ["cut",
|
|
671
|
-
Qt &&
|
|
670
|
+
}], ["cut", ye], ["copy", ye], ["dragstart", ye], ["dragover", ye], ["dragend", ye], ["paste", ye], ["focus", ye], ["blur", ye], ["drop", ye]];
|
|
671
|
+
Qt && Gn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
672
672
|
const i = t.inputType, s = Hi(t);
|
|
673
673
|
i === "deleteCompositionText" || Be && Ts(r) || i !== "insertCompositionText" && ne(r, () => {
|
|
674
674
|
const o = L();
|
|
@@ -680,7 +680,7 @@ Qt && qn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
680
680
|
}
|
|
681
681
|
if (A(o)) {
|
|
682
682
|
const g = o.anchor.key === o.focus.key;
|
|
683
|
-
if (l = t.timeStamp,
|
|
683
|
+
if (l = t.timeStamp, ji === "MediaLast" && l < yt + 30 && r.isComposing() && g) {
|
|
684
684
|
if (Y(null), yt = 0, setTimeout(() => {
|
|
685
685
|
ne(r, () => {
|
|
686
686
|
Y(null);
|
|
@@ -693,7 +693,7 @@ Qt && qn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
693
693
|
Y(null), t.preventDefault();
|
|
694
694
|
const h = o.anchor.getNode(), _ = h.getTextContent(), p = h.canInsertTextAfter(), x = o.anchor.offset === 0 && o.focus.offset === _.length;
|
|
695
695
|
let y = br && g && !x && p;
|
|
696
|
-
if (y && o.isCollapsed() && (y = !B(
|
|
696
|
+
if (y && o.isCollapsed() && (y = !B(qo(o.anchor, !0))), !y) {
|
|
697
697
|
E(r, rn, !0);
|
|
698
698
|
const m = L();
|
|
699
699
|
br && A(m) && m.isCollapsed() && (Le = m, setTimeout(() => Le = null));
|
|
@@ -705,7 +705,7 @@ Qt && qn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
705
705
|
var l;
|
|
706
706
|
if (!A(o)) return;
|
|
707
707
|
const a = t.data;
|
|
708
|
-
et !== null &&
|
|
708
|
+
et !== null && _r(!1, r, et), o.dirty && et === null || !o.isCollapsed() || H(o.anchor.getNode()) || s === null || o.applyDOMRange(s), et = null;
|
|
709
709
|
const c = o.anchor, u = o.focus, d = c.getNode(), f = u.getNode();
|
|
710
710
|
if (i !== "insertText" && i !== "insertTranspose") switch (t.preventDefault(), i) {
|
|
711
711
|
case "insertFromYank":
|
|
@@ -779,16 +779,16 @@ Qt && qn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
779
779
|
const g = t.dataTransfer.getData("text/plain");
|
|
780
780
|
t.preventDefault(), o.insertRawText(g);
|
|
781
781
|
} else a != null && Vi(o, s, a, t.timeStamp, !0) ? (t.preventDefault(), E(r, pt, a)) : et = a;
|
|
782
|
-
|
|
782
|
+
$i = t.timeStamp;
|
|
783
783
|
}
|
|
784
784
|
});
|
|
785
785
|
})(n, e)]);
|
|
786
|
-
let yt = 0,
|
|
787
|
-
const
|
|
788
|
-
let
|
|
786
|
+
let yt = 0, ji = null, $i = 0, et = null;
|
|
787
|
+
const Xn = /* @__PURE__ */ new WeakMap(), ln = /* @__PURE__ */ new WeakMap();
|
|
788
|
+
let Qn = !1, Zn = !1, mt = !1, ht = !1, Mn = !1, On = "", Le = null, Ui = [0, "", 0, "root", 0];
|
|
789
789
|
function Vi(n, e, t, r, i) {
|
|
790
|
-
const s = n.anchor, o = n.focus, l = s.getNode(), a = R(), c =
|
|
791
|
-
return d !== o.key || !M(l) || (!i && (!Qt ||
|
|
790
|
+
const s = n.anchor, o = n.focus, l = s.getNode(), a = R(), c = ve(se(a)), u = c !== null ? c.anchorNode : null, d = s.key, f = a.getElementByKey(d), g = t.length;
|
|
791
|
+
return d !== o.key || !M(l) || (!i && (!Qt || $i < r + 50) || l.isDirty() && g < 2 || Ss(t)) && s.offset !== o.offset && !l.isComposing() || be(l) || l.isDirty() && g > 1 || (i || !Qt) && f !== null && !l.isComposing() && u !== lt(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || (function(h, _) {
|
|
792
792
|
if (_.isSegmented()) return !0;
|
|
793
793
|
if (!h.isCollapsed()) return !1;
|
|
794
794
|
const p = h.anchor.offset, x = _.getParentOrThrow(), y = Ke(_);
|
|
@@ -799,11 +799,11 @@ function Vi(n, e, t, r, i) {
|
|
|
799
799
|
})(n, l);
|
|
800
800
|
}
|
|
801
801
|
function Rr(n, e) {
|
|
802
|
-
return
|
|
802
|
+
return ke(n) && n.nodeValue !== null && e !== 0 && e !== n.nodeValue.length;
|
|
803
803
|
}
|
|
804
804
|
function Wr(n, e, t) {
|
|
805
805
|
const { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o } = n;
|
|
806
|
-
|
|
806
|
+
Qn && (Qn = !1, Rr(r, i) && Rr(s, o) && !Le) || ne(e, () => {
|
|
807
807
|
if (!t) return void re(null);
|
|
808
808
|
if (!mn(e, r, s)) return;
|
|
809
809
|
let l = L();
|
|
@@ -822,16 +822,16 @@ function Wr(n, e, t) {
|
|
|
822
822
|
v(c) || T(259);
|
|
823
823
|
const m = a.getNode();
|
|
824
824
|
m.isEmpty() ? (function(b, N) {
|
|
825
|
-
const
|
|
826
|
-
Yt(b,
|
|
825
|
+
const S = N.getTextFormat(), w = N.getTextStyle();
|
|
826
|
+
Yt(b, S, w);
|
|
827
827
|
})(l, m) : Yt(l, 0, "");
|
|
828
828
|
}
|
|
829
829
|
} else {
|
|
830
830
|
const u = a.key, d = l.focus.key, f = l.getNodes(), g = f.length, h = l.isBackward(), _ = h ? o : i, p = h ? i : o, x = h ? d : u, y = h ? u : d;
|
|
831
831
|
let m = 2047, b = !1;
|
|
832
832
|
for (let N = 0; N < g; N++) {
|
|
833
|
-
const
|
|
834
|
-
if (M(
|
|
833
|
+
const S = f[N], w = S.getTextContentSize();
|
|
834
|
+
if (M(S) && w !== 0 && !(N === 0 && S.__key === x && _ === w || N === g - 1 && S.__key === y && p === 0) && (b = !0, m &= S.getFormat(), m === 0)) break;
|
|
835
835
|
}
|
|
836
836
|
l.format = b ? m : 0;
|
|
837
837
|
}
|
|
@@ -855,18 +855,18 @@ function Wt(n, e) {
|
|
|
855
855
|
if (Y(null), t !== null && e != null) {
|
|
856
856
|
if (e === "") {
|
|
857
857
|
const r = U(t), i = lt(n.getElementByKey(t));
|
|
858
|
-
return void (i !== null && i.nodeValue !== null && M(r) &&
|
|
858
|
+
return void (i !== null && i.nodeValue !== null && M(r) && pr(r, i.nodeValue, null, null, !0));
|
|
859
859
|
}
|
|
860
860
|
if (e[e.length - 1] === `
|
|
861
861
|
`) {
|
|
862
862
|
const r = L();
|
|
863
863
|
if (A(r)) {
|
|
864
864
|
const i = r.focus;
|
|
865
|
-
return r.anchor.set(i.key, i.offset, i.type), void E(n,
|
|
865
|
+
return r.anchor.set(i.key, i.offset, i.type), void E(n, qn, null);
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
|
-
|
|
869
|
+
_r(!0, n, e);
|
|
870
870
|
}
|
|
871
871
|
function qi(n) {
|
|
872
872
|
let e = n.__lexicalEventHandles;
|
|
@@ -874,34 +874,34 @@ function qi(n) {
|
|
|
874
874
|
}
|
|
875
875
|
const nt = /* @__PURE__ */ new Map();
|
|
876
876
|
function Gi(n) {
|
|
877
|
-
const e =
|
|
877
|
+
const e = tl(n.target);
|
|
878
878
|
if (e === null) return;
|
|
879
879
|
const t = ps(e.anchorNode);
|
|
880
880
|
if (t === null) return;
|
|
881
|
-
|
|
881
|
+
Zn && (Zn = !1, ne(t, () => {
|
|
882
882
|
const a = ut(), c = e.anchorNode;
|
|
883
|
-
(ee(c) ||
|
|
883
|
+
(ee(c) || ke(c)) && re(pn(a, e, t, n));
|
|
884
884
|
}));
|
|
885
|
-
const r =
|
|
885
|
+
const r = gr(t), i = r[r.length - 1], s = i._key, o = nt.get(s), l = o || i;
|
|
886
886
|
l !== t && Wr(e, l, !1), Wr(e, t, !0), t !== i ? nt.set(s, t) : o && nt.delete(s);
|
|
887
887
|
}
|
|
888
888
|
function Jr(n) {
|
|
889
889
|
n._lexicalHandled = !0;
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function jr(n) {
|
|
892
892
|
return n._lexicalHandled === !0;
|
|
893
893
|
}
|
|
894
894
|
function To(n) {
|
|
895
|
-
const e =
|
|
895
|
+
const e = Xn.get(n);
|
|
896
896
|
if (e === void 0) return;
|
|
897
897
|
const t = ln.get(e);
|
|
898
898
|
if (t === void 0) return;
|
|
899
899
|
const r = t - 1;
|
|
900
|
-
r >= 0 || T(164),
|
|
900
|
+
r >= 0 || T(164), Xn.delete(n), ln.set(e, r), r === 0 && e.removeEventListener("selectionchange", Gi);
|
|
901
901
|
const i = xn(n);
|
|
902
|
-
|
|
902
|
+
dr(i) ? ((function(o) {
|
|
903
903
|
if (o._parentEditor !== null) {
|
|
904
|
-
const l =
|
|
904
|
+
const l = gr(o), a = l[l.length - 1]._key;
|
|
905
905
|
nt.get(a) === o && nt.delete(a);
|
|
906
906
|
} else nt.delete(o._key);
|
|
907
907
|
})(i), n.__lexicalEditor = null) : i && T(198);
|
|
@@ -909,7 +909,7 @@ function To(n) {
|
|
|
909
909
|
for (let o = 0; o < s.length; o++) s[o]();
|
|
910
910
|
n.__lexicalEventHandles = [];
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function er(n, e, t) {
|
|
913
913
|
X();
|
|
914
914
|
const r = n.__key, i = n.getParent();
|
|
915
915
|
if (i === null) return;
|
|
@@ -917,27 +917,27 @@ function Zn(n, e, t) {
|
|
|
917
917
|
const a = L();
|
|
918
918
|
if (!A(a) || !v(l)) return a;
|
|
919
919
|
const { anchor: c, focus: u } = a, d = c.getNode(), f = u.getNode();
|
|
920
|
-
return
|
|
920
|
+
return nr(d, l) && c.set(l.__key, 0, "element"), nr(f, l) && u.set(l.__key, 0, "element"), a;
|
|
921
921
|
})(n);
|
|
922
922
|
let o = !1;
|
|
923
923
|
if (A(s) && e) {
|
|
924
924
|
const l = s.anchor, a = s.focus;
|
|
925
925
|
l.key === r && (un(l, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0), a.key === r && (un(a, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0);
|
|
926
|
-
} else
|
|
926
|
+
} else ar(s) && e && n.isSelected() && n.selectPrevious();
|
|
927
927
|
if (A(s) && e && !o) {
|
|
928
928
|
const l = n.getIndexWithinParent();
|
|
929
929
|
ze(n), cn(s, i, l, -1);
|
|
930
930
|
} else ze(n);
|
|
931
|
-
t || De(i) || i.canBeEmpty() || !i.isEmpty() ||
|
|
931
|
+
t || De(i) || i.canBeEmpty() || !i.isEmpty() || er(i, e), e && s && H(i) && i.isEmpty() && i.selectEnd();
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function Al(n) {
|
|
934
934
|
return n;
|
|
935
935
|
}
|
|
936
936
|
const Xi = Symbol.for("ephemeral");
|
|
937
937
|
function an(n) {
|
|
938
938
|
return n[Xi] || !1;
|
|
939
939
|
}
|
|
940
|
-
class
|
|
940
|
+
class de {
|
|
941
941
|
__type;
|
|
942
942
|
__key;
|
|
943
943
|
__parent;
|
|
@@ -945,7 +945,7 @@ class we {
|
|
|
945
945
|
__next;
|
|
946
946
|
__state;
|
|
947
947
|
static getType() {
|
|
948
|
-
const { ownNodeType: e } =
|
|
948
|
+
const { ownNodeType: e } = kn(this);
|
|
949
949
|
return e === void 0 && T(64, this.name), e;
|
|
950
950
|
}
|
|
951
951
|
static clone(e) {
|
|
@@ -1156,26 +1156,26 @@ class we {
|
|
|
1156
1156
|
return null;
|
|
1157
1157
|
}
|
|
1158
1158
|
remove(e) {
|
|
1159
|
-
|
|
1159
|
+
er(this, !0, e);
|
|
1160
1160
|
}
|
|
1161
1161
|
replace(e, t) {
|
|
1162
1162
|
X();
|
|
1163
1163
|
let r = L();
|
|
1164
|
-
r !== null && (r = r.clone()),
|
|
1164
|
+
r !== null && (r = r.clone()), Kn(this, e);
|
|
1165
1165
|
const i = this.getLatest(), s = this.__key, o = e.__key, l = e.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
|
|
1166
1166
|
ze(l);
|
|
1167
1167
|
const u = i.getPreviousSibling(), d = i.getNextSibling(), f = i.__prev, g = i.__next, h = i.__parent;
|
|
1168
|
-
if (
|
|
1168
|
+
if (er(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, d === null ? a.__last = o : d.getWritable().__prev = o, l.__next = g, l.__parent = h, a.__size = c, t && (v(this) && v(l) || T(139), this.getChildren().forEach((_) => {
|
|
1169
1169
|
l.append(_);
|
|
1170
1170
|
})), A(r)) {
|
|
1171
1171
|
re(r);
|
|
1172
1172
|
const _ = r.anchor, p = r.focus;
|
|
1173
1173
|
_.key === s && Yr(_, l), p.key === s && Yr(p, l);
|
|
1174
1174
|
}
|
|
1175
|
-
return
|
|
1175
|
+
return we() === s && Y(o), l;
|
|
1176
1176
|
}
|
|
1177
1177
|
insertAfter(e, t = !0) {
|
|
1178
|
-
X(),
|
|
1178
|
+
X(), Kn(this, e);
|
|
1179
1179
|
const r = this.getWritable(), i = e.getWritable(), s = i.getParent(), o = L();
|
|
1180
1180
|
let l = !1, a = !1;
|
|
1181
1181
|
if (s !== null) {
|
|
@@ -1195,7 +1195,7 @@ class we {
|
|
|
1195
1195
|
return e;
|
|
1196
1196
|
}
|
|
1197
1197
|
insertBefore(e, t = !0) {
|
|
1198
|
-
X(),
|
|
1198
|
+
X(), Kn(this, e);
|
|
1199
1199
|
const r = this.getWritable(), i = e.getWritable(), s = i.__key;
|
|
1200
1200
|
ze(i);
|
|
1201
1201
|
const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, c = this.getIndexWithinParent();
|
|
@@ -1244,8 +1244,8 @@ class we {
|
|
|
1244
1244
|
this.markDirty();
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
|
-
const
|
|
1248
|
-
class Et extends
|
|
1247
|
+
const Pl = "historic", Dl = "history-push", An = "history-merge", Fl = "paste", bo = "collaboration", No = "skip-scroll-into-view", wo = "skip-dom-selection", Eo = "skip-selection-focus";
|
|
1248
|
+
class Et extends de {
|
|
1249
1249
|
static getType() {
|
|
1250
1250
|
return "linebreak";
|
|
1251
1251
|
}
|
|
@@ -1304,12 +1304,12 @@ function rt(n) {
|
|
|
1304
1304
|
return n instanceof Et;
|
|
1305
1305
|
}
|
|
1306
1306
|
function Jt(n) {
|
|
1307
|
-
return
|
|
1307
|
+
return ke(n) && /^( |\t|\r?\n)+$/.test(n.textContent || "");
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function Pn(n, e) {
|
|
1310
1310
|
return 16 & e ? "code" : e & wi ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function Dn(n, e) {
|
|
1313
1313
|
return 1 & e ? "strong" : 2 & e ? "em" : "span";
|
|
1314
1314
|
}
|
|
1315
1315
|
function Qi(n, e, t, r, i) {
|
|
@@ -1347,16 +1347,16 @@ function Zi(n, e, t) {
|
|
|
1347
1347
|
} else r.nodeValue = s;
|
|
1348
1348
|
}
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function $r(n, e, t, r, i, s) {
|
|
1351
1351
|
Zi(i, n, e);
|
|
1352
1352
|
const o = s.theme.text;
|
|
1353
1353
|
o !== void 0 && Qi(0, 0, r, n, o);
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function jt(n, e) {
|
|
1356
1356
|
const t = document.createElement(e);
|
|
1357
1357
|
return t.appendChild(n), t;
|
|
1358
1358
|
}
|
|
1359
|
-
class ct extends
|
|
1359
|
+
class ct extends de {
|
|
1360
1360
|
__text;
|
|
1361
1361
|
__format;
|
|
1362
1362
|
__style;
|
|
@@ -1391,7 +1391,7 @@ class ct extends we {
|
|
|
1391
1391
|
return this.getLatest().__mode === 1;
|
|
1392
1392
|
}
|
|
1393
1393
|
isComposing() {
|
|
1394
|
-
return this.__key ===
|
|
1394
|
+
return this.__key === we();
|
|
1395
1395
|
}
|
|
1396
1396
|
isSegmented() {
|
|
1397
1397
|
return this.getLatest().__mode === 2;
|
|
@@ -1422,20 +1422,20 @@ class ct extends we {
|
|
|
1422
1422
|
return !0;
|
|
1423
1423
|
}
|
|
1424
1424
|
createDOM(e, t) {
|
|
1425
|
-
const r = this.__format, i =
|
|
1425
|
+
const r = this.__format, i = Pn(0, r), s = Dn(0, r), o = i === null ? s : i, l = document.createElement(o);
|
|
1426
1426
|
let a = l;
|
|
1427
|
-
this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)),
|
|
1427
|
+
this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)), $r(a, this, 0, r, this.__text, e);
|
|
1428
1428
|
const c = this.__style;
|
|
1429
1429
|
return c !== "" && (l.style.cssText = c), l;
|
|
1430
1430
|
}
|
|
1431
1431
|
updateDOM(e, t, r) {
|
|
1432
|
-
const i = this.__text, s = e.__format, o = this.__format, l =
|
|
1432
|
+
const i = this.__text, s = e.__format, o = this.__format, l = Pn(0, s), a = Pn(0, o), c = Dn(0, s), u = Dn(0, o);
|
|
1433
1433
|
if ((l === null ? c : l) !== (a === null ? u : a)) return !0;
|
|
1434
1434
|
if (l === a && c !== u) {
|
|
1435
1435
|
const _ = t.firstChild;
|
|
1436
1436
|
_ == null && T(48);
|
|
1437
1437
|
const p = document.createElement(u);
|
|
1438
|
-
return
|
|
1438
|
+
return $r(p, this, 0, o, i, r), t.replaceChild(p, _), !1;
|
|
1439
1439
|
}
|
|
1440
1440
|
let d = t;
|
|
1441
1441
|
a !== null && l !== null && (d = t.firstChild, d == null && T(49)), Zi(i, d, this);
|
|
@@ -1445,7 +1445,7 @@ class ct extends we {
|
|
|
1445
1445
|
return g !== h && (t.style.cssText = h), !1;
|
|
1446
1446
|
}
|
|
1447
1447
|
static importDOM() {
|
|
1448
|
-
return { "#text": () => ({ conversion: Do, priority: 0 }), b: () => ({ conversion: Ao, priority: 0 }), code: () => ({ conversion:
|
|
1448
|
+
return { "#text": () => ({ conversion: Do, priority: 0 }), b: () => ({ conversion: Ao, priority: 0 }), code: () => ({ conversion: me, priority: 0 }), em: () => ({ conversion: me, priority: 0 }), i: () => ({ conversion: me, priority: 0 }), mark: () => ({ conversion: me, priority: 0 }), s: () => ({ conversion: me, priority: 0 }), span: () => ({ conversion: Oo, priority: 0 }), strong: () => ({ conversion: me, priority: 0 }), sub: () => ({ conversion: me, priority: 0 }), sup: () => ({ conversion: me, priority: 0 }), u: () => ({ conversion: me, priority: 0 }) };
|
|
1449
1449
|
}
|
|
1450
1450
|
static importJSON(e) {
|
|
1451
1451
|
return V().updateFromJSON(e);
|
|
@@ -1455,7 +1455,7 @@ class ct extends we {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
exportDOM(e) {
|
|
1457
1457
|
let { element: t } = super.exportDOM(e);
|
|
1458
|
-
return ee(t) || T(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("lowercase") ? t.style.textTransform = "lowercase" : this.hasFormat("uppercase") ? t.style.textTransform = "uppercase" : this.hasFormat("capitalize") && (t.style.textTransform = "capitalize"), this.hasFormat("bold") && (t =
|
|
1458
|
+
return ee(t) || T(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("lowercase") ? t.style.textTransform = "lowercase" : this.hasFormat("uppercase") ? t.style.textTransform = "uppercase" : this.hasFormat("capitalize") && (t.style.textTransform = "capitalize"), this.hasFormat("bold") && (t = jt(t, "b")), this.hasFormat("italic") && (t = jt(t, "i")), this.hasFormat("strikethrough") && (t = jt(t, "s")), this.hasFormat("underline") && (t = jt(t, "u")), { element: t };
|
|
1459
1459
|
}
|
|
1460
1460
|
exportJSON() {
|
|
1461
1461
|
return { detail: this.getDetail(), format: this.getFormat(), mode: this.getMode(), style: this.getStyle(), text: this.getTextContent(), ...super.exportJSON() };
|
|
@@ -1468,7 +1468,7 @@ class ct extends we {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
setDetail(e) {
|
|
1470
1470
|
const t = this.getWritable();
|
|
1471
|
-
return t.__detail = typeof e == "string" ?
|
|
1471
|
+
return t.__detail = typeof e == "string" ? $s[e] : e, t;
|
|
1472
1472
|
}
|
|
1473
1473
|
setStyle(e) {
|
|
1474
1474
|
const t = this.getWritable();
|
|
@@ -1507,7 +1507,7 @@ class ct extends we {
|
|
|
1507
1507
|
} else r = 0, i = 0;
|
|
1508
1508
|
if (!A(s)) return rs(l, r, l, i, "text", "text");
|
|
1509
1509
|
{
|
|
1510
|
-
const a =
|
|
1510
|
+
const a = we();
|
|
1511
1511
|
a !== s.anchor.key && a !== s.focus.key || Y(l), s.setTextNodeRange(this, r, this, i);
|
|
1512
1512
|
}
|
|
1513
1513
|
return s;
|
|
@@ -1541,11 +1541,11 @@ class ct extends we {
|
|
|
1541
1541
|
X();
|
|
1542
1542
|
const t = this.getLatest(), r = t.getTextContent();
|
|
1543
1543
|
if (r === "") return [];
|
|
1544
|
-
const i = t.__key, s =
|
|
1545
|
-
e.sort((k,
|
|
1544
|
+
const i = t.__key, s = we(), o = r.length;
|
|
1545
|
+
e.sort((k, C) => k - C), e.push(o);
|
|
1546
1546
|
const l = [], a = e.length;
|
|
1547
|
-
for (let k = 0,
|
|
1548
|
-
const O = e[
|
|
1547
|
+
for (let k = 0, C = 0; k < o && C <= a; C++) {
|
|
1548
|
+
const O = e[C];
|
|
1549
1549
|
O > k && (l.push(r.slice(k, O)), k = O);
|
|
1550
1550
|
}
|
|
1551
1551
|
const c = l.length;
|
|
@@ -1556,35 +1556,35 @@ class ct extends we {
|
|
|
1556
1556
|
let p = !1, x = null, y = null;
|
|
1557
1557
|
const m = L();
|
|
1558
1558
|
if (A(m)) {
|
|
1559
|
-
const [k,
|
|
1560
|
-
k.type === "text" && k.key === i && (x = k),
|
|
1559
|
+
const [k, C] = m.isBackward() ? [m.focus, m.anchor] : [m.anchor, m.focus];
|
|
1560
|
+
k.type === "text" && k.key === i && (x = k), C.type === "text" && C.key === i && (y = C);
|
|
1561
1561
|
}
|
|
1562
1562
|
t.isSegmented() ? (f = V(u), f.__format = g, f.__style = h, f.__detail = _, f.__state = Ar(t, f), p = !0) : f = t.setTextContent(u);
|
|
1563
1563
|
const b = [f];
|
|
1564
1564
|
for (let k = 1; k < c; k++) {
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1567
|
-
const O =
|
|
1568
|
-
s === i && Y(O), b.push(
|
|
1565
|
+
const C = V(l[k]);
|
|
1566
|
+
C.__format = g, C.__style = h, C.__detail = _, C.__state = Ar(t, C);
|
|
1567
|
+
const O = C.__key;
|
|
1568
|
+
s === i && Y(O), b.push(C);
|
|
1569
1569
|
}
|
|
1570
|
-
const N = x ? x.offset : null,
|
|
1570
|
+
const N = x ? x.offset : null, S = y ? y.offset : null;
|
|
1571
1571
|
let w = 0;
|
|
1572
1572
|
for (const k of b) {
|
|
1573
1573
|
if (!x && !y) break;
|
|
1574
|
-
const
|
|
1575
|
-
if (x !== null && N !== null && N <=
|
|
1576
|
-
y.set(k.getKey(),
|
|
1574
|
+
const C = w + k.getTextContentSize();
|
|
1575
|
+
if (x !== null && N !== null && N <= C && N >= w && (x.set(k.getKey(), N - w, "text"), N < C && (x = null)), y !== null && S !== null && S <= C && S >= w) {
|
|
1576
|
+
y.set(k.getKey(), S - w, "text");
|
|
1577
1577
|
break;
|
|
1578
1578
|
}
|
|
1579
|
-
w =
|
|
1579
|
+
w = C;
|
|
1580
1580
|
}
|
|
1581
1581
|
if (d !== null) {
|
|
1582
1582
|
(function(O) {
|
|
1583
1583
|
const D = O.getPreviousSibling(), z = O.getNextSibling();
|
|
1584
1584
|
D !== null && dn(D), z !== null && dn(z);
|
|
1585
1585
|
})(this);
|
|
1586
|
-
const k = d.getWritable(),
|
|
1587
|
-
p ? (k.splice(
|
|
1586
|
+
const k = d.getWritable(), C = this.getIndexWithinParent();
|
|
1587
|
+
p ? (k.splice(C, 0, b), this.remove()) : k.splice(C, 1, b), A(m) && cn(m, d, C, c - 1);
|
|
1588
1588
|
}
|
|
1589
1589
|
return b;
|
|
1590
1590
|
}
|
|
@@ -1592,7 +1592,7 @@ class ct extends we {
|
|
|
1592
1592
|
const t = e === this.getPreviousSibling();
|
|
1593
1593
|
t || e === this.getNextSibling() || T(50);
|
|
1594
1594
|
const r = this.__key, i = e.__key, s = this.__text, o = s.length;
|
|
1595
|
-
|
|
1595
|
+
we() === i && Y(r);
|
|
1596
1596
|
const l = L();
|
|
1597
1597
|
if (A(l)) {
|
|
1598
1598
|
const d = l.anchor, f = l.focus;
|
|
@@ -1608,11 +1608,11 @@ class ct extends we {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
function Oo(n) {
|
|
1611
|
-
return { forChild:
|
|
1611
|
+
return { forChild: or(n.style), node: null };
|
|
1612
1612
|
}
|
|
1613
1613
|
function Ao(n) {
|
|
1614
1614
|
const e = n, t = e.style.fontWeight === "normal";
|
|
1615
|
-
return { forChild:
|
|
1615
|
+
return { forChild: or(e.style, t ? void 0 : "bold"), node: null };
|
|
1616
1616
|
}
|
|
1617
1617
|
const Ur = /* @__PURE__ */ new WeakMap();
|
|
1618
1618
|
function Po(n) {
|
|
@@ -1638,7 +1638,7 @@ function Do(n) {
|
|
|
1638
1638
|
const l = r[o];
|
|
1639
1639
|
l === `
|
|
1640
1640
|
` || l === `\r
|
|
1641
|
-
` ? i.push(bt()) : l === " " ? i.push(
|
|
1641
|
+
` ? i.push(bt()) : l === " " ? i.push(lr()) : l !== "" && i.push(V(l));
|
|
1642
1642
|
}
|
|
1643
1643
|
return { node: i };
|
|
1644
1644
|
}
|
|
@@ -1676,18 +1676,18 @@ function Vr(n, e) {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
if (t = r, ee(t)) {
|
|
1678
1678
|
const s = t.style.display;
|
|
1679
|
-
if (s === "" && !
|
|
1679
|
+
if (s === "" && !rl(t) || s !== "" && !s.startsWith("inline")) return null;
|
|
1680
1680
|
}
|
|
1681
1681
|
let i = t;
|
|
1682
1682
|
for (; (i = e ? t.firstChild : t.lastChild) !== null; ) t = i;
|
|
1683
|
-
if (
|
|
1683
|
+
if (ke(t)) return t;
|
|
1684
1684
|
if (t.nodeName === "BR") return null;
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
1687
|
const Fo = { code: "code", em: "italic", i: "italic", mark: "highlight", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
|
|
1688
|
-
function
|
|
1688
|
+
function me(n) {
|
|
1689
1689
|
const e = Fo[n.nodeName.toLowerCase()];
|
|
1690
|
-
return e === void 0 ? { node: null } : { forChild:
|
|
1690
|
+
return e === void 0 ? { node: null } : { forChild: or(n.style, e), node: null };
|
|
1691
1691
|
}
|
|
1692
1692
|
function V(n = "") {
|
|
1693
1693
|
return vn(new ct(n));
|
|
@@ -1695,7 +1695,7 @@ function V(n = "") {
|
|
|
1695
1695
|
function M(n) {
|
|
1696
1696
|
return n instanceof ct;
|
|
1697
1697
|
}
|
|
1698
|
-
function
|
|
1698
|
+
function or(n, e) {
|
|
1699
1699
|
const t = n.fontWeight, r = n.textDecoration.split(" "), i = t === "700" || t === "bold", s = r.includes("line-through"), o = n.fontStyle === "italic", l = r.includes("underline"), a = n.verticalAlign;
|
|
1700
1700
|
return (c) => (M(c) && (i && !c.hasFormat("bold") && c.toggleFormat("bold"), s && !c.hasFormat("strikethrough") && c.toggleFormat("strikethrough"), o && !c.hasFormat("italic") && c.toggleFormat("italic"), l && !c.hasFormat("underline") && c.toggleFormat("underline"), a !== "sub" || c.hasFormat("subscript") || c.toggleFormat("subscript"), a !== "super" || c.hasFormat("superscript") || c.toggleFormat("superscript"), e && !c.hasFormat(e) && c.toggleFormat(e)), c);
|
|
1701
1701
|
}
|
|
@@ -1717,7 +1717,7 @@ class Mt extends ct {
|
|
|
1717
1717
|
return r !== void 0 && t.classList.add(...r), t;
|
|
1718
1718
|
}
|
|
1719
1719
|
static importJSON(e) {
|
|
1720
|
-
return
|
|
1720
|
+
return lr().updateFromJSON(e);
|
|
1721
1721
|
}
|
|
1722
1722
|
setTextContent(e) {
|
|
1723
1723
|
return e !== " " && e !== "" && Ti(126), super.setTextContent(" ");
|
|
@@ -1738,7 +1738,7 @@ class Mt extends ct {
|
|
|
1738
1738
|
return !1;
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
|
-
function
|
|
1741
|
+
function lr() {
|
|
1742
1742
|
return vn(new Mt());
|
|
1743
1743
|
}
|
|
1744
1744
|
function es(n) {
|
|
@@ -1764,13 +1764,13 @@ class Lo {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
set(e, t, r, i) {
|
|
1766
1766
|
const s = this._selection, o = this.key;
|
|
1767
|
-
i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, Ot() || (
|
|
1767
|
+
i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, Ot() || (we() === o && Y(e), s !== null && (s.setCachedNodes(null), s.dirty = !0)));
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1770
|
+
function _e(n, e, t) {
|
|
1771
1771
|
return new Lo(n, e, t);
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1773
|
+
function Fn(n, e) {
|
|
1774
1774
|
let t = e.__key, r = n.offset, i = "element";
|
|
1775
1775
|
if (M(e)) {
|
|
1776
1776
|
i = "text";
|
|
@@ -1789,8 +1789,8 @@ function Dn(n, e) {
|
|
|
1789
1789
|
function Yr(n, e) {
|
|
1790
1790
|
if (v(e)) {
|
|
1791
1791
|
const t = e.getLastDescendant();
|
|
1792
|
-
v(t) || M(t) ?
|
|
1793
|
-
} else
|
|
1792
|
+
v(t) || M(t) ? Fn(n, t) : Fn(n, e);
|
|
1793
|
+
} else Fn(n, e);
|
|
1794
1794
|
}
|
|
1795
1795
|
class _n {
|
|
1796
1796
|
_nodes;
|
|
@@ -1806,7 +1806,7 @@ class _n {
|
|
|
1806
1806
|
this._cachedNodes = e;
|
|
1807
1807
|
}
|
|
1808
1808
|
is(e) {
|
|
1809
|
-
if (!
|
|
1809
|
+
if (!ar(e)) return !1;
|
|
1810
1810
|
const t = this._nodes, r = e._nodes;
|
|
1811
1811
|
return t.size === r.size && Array.from(t).every((i) => r.has(i));
|
|
1812
1812
|
}
|
|
@@ -1872,7 +1872,7 @@ class _n {
|
|
|
1872
1872
|
const e = this.getNodes();
|
|
1873
1873
|
if ((L() || ut()) === this && e[0]) {
|
|
1874
1874
|
const t = q(e[0], "next");
|
|
1875
|
-
|
|
1875
|
+
pl(Ye(t, t));
|
|
1876
1876
|
}
|
|
1877
1877
|
for (const t of e) t.remove();
|
|
1878
1878
|
}
|
|
@@ -1909,14 +1909,14 @@ class Ge {
|
|
|
1909
1909
|
const i = [], [s, o] = r.getTextSlices();
|
|
1910
1910
|
s && i.push(s.caret.origin);
|
|
1911
1911
|
const l = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
1912
|
-
for (const c of r) if (
|
|
1912
|
+
for (const c of r) if (he(c)) {
|
|
1913
1913
|
const { origin: u } = c;
|
|
1914
1914
|
i.length === 0 ? l.add(u) : (a.add(u), i.push(u));
|
|
1915
1915
|
} else {
|
|
1916
1916
|
const { origin: u } = c;
|
|
1917
1917
|
v(u) && a.has(u) || i.push(u);
|
|
1918
1918
|
}
|
|
1919
|
-
if (o && i.push(o.caret.origin), at(r.focus) && v(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c = Ae(r.focus.origin, "previous");
|
|
1919
|
+
if (o && i.push(o.caret.origin), at(r.focus) && v(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c = Ae(r.focus.origin, "previous"); he(c) && l.has(c.origin) && !c.origin.isEmpty() && c.origin.is(i[i.length - 1]); c = Sr(c)) l.delete(c.origin), i.pop();
|
|
1920
1920
|
for (; i.length > 1; ) {
|
|
1921
1921
|
const c = i[i.length - 1];
|
|
1922
1922
|
if (!v(c) || a.has(c) || c.isEmpty() || l.has(c)) break;
|
|
@@ -1953,11 +1953,11 @@ class Ge {
|
|
|
1953
1953
|
const t = R(), r = t.getEditorState()._selection, i = ns(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, r);
|
|
1954
1954
|
if (i === null) return;
|
|
1955
1955
|
const [s, o] = i;
|
|
1956
|
-
this.anchor.set(s.key, s.offset, s.type, !0), this.focus.set(o.key, o.offset, o.type, !0),
|
|
1956
|
+
this.anchor.set(s.key, s.offset, s.type, !0), this.focus.set(o.key, o.offset, o.type, !0), Wn(this);
|
|
1957
1957
|
}
|
|
1958
1958
|
clone() {
|
|
1959
1959
|
const e = this.anchor, t = this.focus;
|
|
1960
|
-
return new Ge(
|
|
1960
|
+
return new Ge(_e(e.key, e.offset, e.type), _e(t.key, t.offset, t.type), this.format, this.style);
|
|
1961
1961
|
}
|
|
1962
1962
|
toggleFormat(e) {
|
|
1963
1963
|
this.format = fn(this.format, e, null), this.dirty = !0;
|
|
@@ -1978,7 +1978,7 @@ class Ge {
|
|
|
1978
1978
|
const o = t[s];
|
|
1979
1979
|
o === `
|
|
1980
1980
|
` || o === `\r
|
|
1981
|
-
` ? r.push(bt()) : o === " " ? r.push(
|
|
1981
|
+
` ? r.push(bt()) : o === " " ? r.push(lr()) : r.push(V(o));
|
|
1982
1982
|
}
|
|
1983
1983
|
this.insertNodes(r);
|
|
1984
1984
|
}
|
|
@@ -1986,13 +1986,13 @@ class Ge {
|
|
|
1986
1986
|
const t = this.anchor, r = this.focus, i = this.format, s = this.style;
|
|
1987
1987
|
let o = t, l = r;
|
|
1988
1988
|
!this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && (function(p, x, y, m) {
|
|
1989
|
-
const b = p.getNode(), N = b.getChildAtIndex(p.offset),
|
|
1990
|
-
if (
|
|
1989
|
+
const b = p.getNode(), N = b.getChildAtIndex(p.offset), S = V();
|
|
1990
|
+
if (S.setFormat(y), S.setStyle(m), jo(N)) N.splice(0, 0, [S]);
|
|
1991
1991
|
else {
|
|
1992
|
-
const w = H(b) ? Ee().append(
|
|
1992
|
+
const w = H(b) ? Ee().append(S) : S;
|
|
1993
1993
|
N === null ? b.append(w) : N.insertBefore(w);
|
|
1994
1994
|
}
|
|
1995
|
-
p.is(x) && x.set(
|
|
1995
|
+
p.is(x) && x.set(S.__key, 0, "text"), p.set(S.__key, 0, "text");
|
|
1996
1996
|
})(o, l, i, s), l.type === "element" && wt(l, fe(He(l, "next")));
|
|
1997
1997
|
const a = o.offset;
|
|
1998
1998
|
let c = l.offset;
|
|
@@ -2001,12 +2001,12 @@ class Ge {
|
|
|
2001
2001
|
M(f) || T(26);
|
|
2002
2002
|
const g = f.getTextContent().length, h = f.getParentOrThrow();
|
|
2003
2003
|
let _ = u[d - 1];
|
|
2004
|
-
if (d === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (
|
|
2004
|
+
if (d === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (be(f) || !f.canInsertTextAfter() || !h.canInsertTextAfter() && f.getNextSibling() === null)) {
|
|
2005
2005
|
let p = f.getNextSibling();
|
|
2006
|
-
if (M(p) && p.canInsertTextBefore() && !
|
|
2007
|
-
} else if (this.isCollapsed() && a === 0 && (
|
|
2006
|
+
if (M(p) && p.canInsertTextBefore() && !be(p) || (p = V(), p.setFormat(i), p.setStyle(s), h.canInsertTextAfter() ? f.insertAfter(p) : h.insertAfter(p)), p.select(0, 0), f = p, e !== "") return void this.insertText(e);
|
|
2007
|
+
} else if (this.isCollapsed() && a === 0 && (be(f) || !f.canInsertTextBefore() || !h.canInsertTextBefore() && f.getPreviousSibling() === null)) {
|
|
2008
2008
|
let p = f.getPreviousSibling();
|
|
2009
|
-
if (M(p) && !
|
|
2009
|
+
if (M(p) && !be(p) || (p = V(), p.setFormat(i), h.canInsertTextBefore() ? f.insertBefore(p) : h.insertBefore(p)), p.select(), f = p, e !== "") return void this.insertText(e);
|
|
2010
2010
|
} else if (f.isSegmented() && a !== g) {
|
|
2011
2011
|
const p = V(f.getTextContent());
|
|
2012
2012
|
p.setFormat(i), f.replace(p), f = p;
|
|
@@ -2056,17 +2056,17 @@ class Ge {
|
|
|
2056
2056
|
k.canBeEmpty() || k.getChildrenSize() !== 1 ? _.remove() : k.remove();
|
|
2057
2057
|
}
|
|
2058
2058
|
else p.add(_.__key);
|
|
2059
|
-
const b = y.getChildren(), N = new Set(u),
|
|
2059
|
+
const b = y.getChildren(), N = new Set(u), S = x.is(y), w = x.isInline() && f.getNextSibling() === null ? x : f;
|
|
2060
2060
|
for (let k = b.length - 1; k >= 0; k--) {
|
|
2061
|
-
const
|
|
2062
|
-
if (
|
|
2063
|
-
|
|
2061
|
+
const C = b[k];
|
|
2062
|
+
if (C.is(f) || v(C) && C.isParentOf(f)) break;
|
|
2063
|
+
C.isAttached() && (!N.has(C) || C.is(m) ? S || w.insertAfter(C, !1) : C.remove());
|
|
2064
2064
|
}
|
|
2065
|
-
if (!
|
|
2066
|
-
let k = y,
|
|
2065
|
+
if (!S) {
|
|
2066
|
+
let k = y, C = null;
|
|
2067
2067
|
for (; k !== null; ) {
|
|
2068
2068
|
const O = k.getChildren(), D = O.length;
|
|
2069
|
-
(D === 0 || O[D - 1].is(
|
|
2069
|
+
(D === 0 || O[D - 1].is(C)) && (p.delete(k.__key), C = k), k = k.getParent();
|
|
2070
2070
|
}
|
|
2071
2071
|
}
|
|
2072
2072
|
if (Ke(f)) if (a === g) f.select();
|
|
@@ -2076,14 +2076,14 @@ class Ge {
|
|
|
2076
2076
|
}
|
|
2077
2077
|
else f = f.spliceText(a, g - a, e, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
|
|
2078
2078
|
for (let k = 1; k < d; k++) {
|
|
2079
|
-
const
|
|
2080
|
-
p.has(O) ||
|
|
2079
|
+
const C = u[k], O = C.__key;
|
|
2080
|
+
p.has(O) || C.remove();
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
2084
|
removeText() {
|
|
2085
2085
|
const e = L() === this;
|
|
2086
|
-
Xt(this,
|
|
2086
|
+
Xt(this, yl(vi(this))), e && L() !== this && re(this);
|
|
2087
2087
|
}
|
|
2088
2088
|
formatText(e, t = null) {
|
|
2089
2089
|
if (this.isCollapsed()) return this.toggleFormat(e), void Y(null);
|
|
@@ -2092,8 +2092,8 @@ class Ge {
|
|
|
2092
2092
|
const s = (b) => {
|
|
2093
2093
|
r.forEach((N) => {
|
|
2094
2094
|
if (v(N)) {
|
|
2095
|
-
const
|
|
2096
|
-
N.setTextFormat(
|
|
2095
|
+
const S = N.getFormatFlags(e, b);
|
|
2096
|
+
N.setTextFormat(S);
|
|
2097
2097
|
}
|
|
2098
2098
|
});
|
|
2099
2099
|
}, o = i.length;
|
|
@@ -2108,19 +2108,19 @@ class Ge {
|
|
|
2108
2108
|
const y = d.type === "text" ? d.offset : x.getTextContentSize();
|
|
2109
2109
|
if (g.is(x)) {
|
|
2110
2110
|
if (h === y) return;
|
|
2111
|
-
if (
|
|
2111
|
+
if (be(g) || h === 0 && y === g.getTextContentSize()) g.setFormat(_);
|
|
2112
2112
|
else {
|
|
2113
2113
|
const b = g.splitText(h, y), N = h === 0 ? b[0] : b[1];
|
|
2114
2114
|
N.setFormat(_), u.type === "text" && u.set(N.__key, 0, "text"), d.type === "text" && d.set(N.__key, y - h, "text");
|
|
2115
2115
|
}
|
|
2116
2116
|
return void (this.format = _);
|
|
2117
2117
|
}
|
|
2118
|
-
h === 0 ||
|
|
2118
|
+
h === 0 || be(g) || ([, g] = g.splitText(h), h = 0), g.setFormat(_);
|
|
2119
2119
|
const m = x.getFormatFlags(e, _);
|
|
2120
|
-
y > 0 && (y === x.getTextContentSize() ||
|
|
2120
|
+
y > 0 && (y === x.getTextContentSize() || be(x) || ([x] = x.splitText(y)), x.setFormat(m));
|
|
2121
2121
|
for (let b = f + 1; b < p; b++) {
|
|
2122
|
-
const N = i[b],
|
|
2123
|
-
N.setFormat(
|
|
2122
|
+
const N = i[b], S = N.getFormatFlags(e, m);
|
|
2123
|
+
N.setFormat(S);
|
|
2124
2124
|
}
|
|
2125
2125
|
u.type === "text" && u.set(g.__key, h, "text"), d.type === "text" && d.set(x.__key, y, "text"), this.format = _ | m;
|
|
2126
2126
|
}
|
|
@@ -2131,18 +2131,18 @@ class Ge {
|
|
|
2131
2131
|
const h = L();
|
|
2132
2132
|
return A(h) || T(134), h.insertNodes(e);
|
|
2133
2133
|
}
|
|
2134
|
-
const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = qt(t,
|
|
2134
|
+
const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = qt(t, Ne), i = e[e.length - 1];
|
|
2135
2135
|
if (v(r) && "__language" in r) {
|
|
2136
2136
|
if ("__language" in e[0]) this.insertText(e[0].getTextContent());
|
|
2137
2137
|
else {
|
|
2138
|
-
const h =
|
|
2138
|
+
const h = Ln(this);
|
|
2139
2139
|
r.splice(h, 0, e), i.selectEnd();
|
|
2140
2140
|
}
|
|
2141
2141
|
return;
|
|
2142
2142
|
}
|
|
2143
2143
|
if (!e.some((h) => (v(h) || B(h)) && !h.isInline())) {
|
|
2144
2144
|
v(r) || T(211, t.constructor.name, t.getType());
|
|
2145
|
-
const h =
|
|
2145
|
+
const h = Ln(this);
|
|
2146
2146
|
return r.splice(h, 0, e), void i.selectEnd();
|
|
2147
2147
|
}
|
|
2148
2148
|
const s = (function(h) {
|
|
@@ -2159,7 +2159,7 @@ class Ge {
|
|
|
2159
2159
|
})(e), o = s.getLastDescendant(), l = s.getChildren(), a = !v(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
|
|
2160
2160
|
let u = l[0];
|
|
2161
2161
|
var d;
|
|
2162
|
-
v(d = u) &&
|
|
2162
|
+
v(d = u) && Ne(d) && !d.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), (function(h, _) {
|
|
2163
2163
|
const p = _.getParentOrThrow().getLastChild();
|
|
2164
2164
|
let x = _;
|
|
2165
2165
|
const y = [_];
|
|
@@ -2167,8 +2167,8 @@ class Ge {
|
|
|
2167
2167
|
let m = h;
|
|
2168
2168
|
for (const b of y) m = m.insertAfter(b);
|
|
2169
2169
|
})(r, u));
|
|
2170
|
-
const f = qt(o,
|
|
2171
|
-
a && v(f) && (a.canMergeWhenEmpty() ||
|
|
2170
|
+
const f = qt(o, Ne);
|
|
2171
|
+
a && v(f) && (a.canMergeWhenEmpty() || Ne(c)) && (f.append(...a.getChildren()), a.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
|
|
2172
2172
|
const g = v(r) ? r.getLastChild() : null;
|
|
2173
2173
|
rt(g) && f !== r && g.remove();
|
|
2174
2174
|
}
|
|
@@ -2177,7 +2177,7 @@ class Ge {
|
|
|
2177
2177
|
const o = Ee();
|
|
2178
2178
|
return ie().splice(this.anchor.offset, 0, [o]), o.select(), o;
|
|
2179
2179
|
}
|
|
2180
|
-
const e =
|
|
2180
|
+
const e = Ln(this), t = qt(this.anchor.getNode(), Ne);
|
|
2181
2181
|
v(t) || T(213);
|
|
2182
2182
|
const r = t.getChildAtIndex(e), i = r ? [r, ...r.getNextSiblings()] : [], s = t.insertNewAfter(this, !1);
|
|
2183
2183
|
return s ? (s.append(...i), s.selectStart(), s) : null;
|
|
@@ -2209,23 +2209,23 @@ class Ge {
|
|
|
2209
2209
|
}
|
|
2210
2210
|
modify(e, t, r) {
|
|
2211
2211
|
if (ni(this, e, t, r)) return;
|
|
2212
|
-
const i = e === "move", s = R(), o =
|
|
2212
|
+
const i = e === "move", s = R(), o = ve(se(s));
|
|
2213
2213
|
if (!o) return;
|
|
2214
2214
|
const l = s._blockCursorElement, a = s._rootElement, c = this.focus.getNode();
|
|
2215
|
-
if (a === null || l === null || !v(c) || c.isInline() || c.canBeEmpty() ||
|
|
2216
|
-
let u =
|
|
2215
|
+
if (a === null || l === null || !v(c) || c.isInline() || c.canBeEmpty() || rr(l, s, a), this.dirty) {
|
|
2216
|
+
let u = je(s, this.anchor.key), d = je(s, this.focus.key);
|
|
2217
2217
|
this.anchor.type === "text" && (u = lt(u)), this.focus.type === "text" && (d = lt(d)), u && d && ss(o, u, this.anchor.offset, d, this.focus.offset);
|
|
2218
2218
|
}
|
|
2219
2219
|
if ((function(u, d, f, g) {
|
|
2220
2220
|
u.modify(d, f, g);
|
|
2221
2221
|
})(o, e, t ? "backward" : "forward", r), o.rangeCount > 0) {
|
|
2222
|
-
const u = o.getRangeAt(0), d = this.anchor.getNode(), f = H(d) ? d :
|
|
2222
|
+
const u = o.getRangeAt(0), d = this.anchor.getNode(), f = H(d) ? d : Qo(d);
|
|
2223
2223
|
if (this.applyDOMRange(u), this.dirty = !0, !i) {
|
|
2224
2224
|
const g = this.getNodes(), h = [];
|
|
2225
2225
|
let _ = !1;
|
|
2226
2226
|
for (let p = 0; p < g.length; p++) {
|
|
2227
2227
|
const x = g[p];
|
|
2228
|
-
|
|
2228
|
+
nr(x, f) ? h.push(x) : _ = !0;
|
|
2229
2229
|
}
|
|
2230
2230
|
if (_ && h.length > 0) if (t) {
|
|
2231
2231
|
const p = h[0];
|
|
@@ -2258,7 +2258,7 @@ class Ge {
|
|
|
2258
2258
|
const s = ws(He(r, e ? "previous" : "next"));
|
|
2259
2259
|
if (s.getTextSlices().every((l) => l === null || l.distance === 0)) {
|
|
2260
2260
|
let l = { type: "initial" };
|
|
2261
|
-
for (const a of s.iterNodeCarets("shadowRoot")) if (
|
|
2261
|
+
for (const a of s.iterNodeCarets("shadowRoot")) if (he(a)) {
|
|
2262
2262
|
if (!a.origin.isInline()) {
|
|
2263
2263
|
if (a.origin.isShadowRoot()) {
|
|
2264
2264
|
if (l.type === "merge-block") break;
|
|
@@ -2341,7 +2341,7 @@ class Ge {
|
|
|
2341
2341
|
return [this.anchor, this.focus];
|
|
2342
2342
|
}
|
|
2343
2343
|
}
|
|
2344
|
-
function
|
|
2344
|
+
function ar(n) {
|
|
2345
2345
|
return n instanceof _n;
|
|
2346
2346
|
}
|
|
2347
2347
|
function Hr(n) {
|
|
@@ -2399,7 +2399,7 @@ function Qr(n, e, t, r) {
|
|
|
2399
2399
|
const f = c.parentNode;
|
|
2400
2400
|
n === f && e > Array.prototype.indexOf.call(f.children, c) && s--;
|
|
2401
2401
|
}
|
|
2402
|
-
if (i = tt(u), M(i)) s =
|
|
2402
|
+
if (i = tt(u), M(i)) s = ge(i, o ? "next" : "previous");
|
|
2403
2403
|
else {
|
|
2404
2404
|
let f = tt(n);
|
|
2405
2405
|
if (f === null) return null;
|
|
@@ -2414,15 +2414,15 @@ function Qr(n, e, t, r) {
|
|
|
2414
2414
|
const p = o ? _.getLastDescendant() : _.getFirstDescendant();
|
|
2415
2415
|
p === null ? f = _ : (_ = p, f = v(_) ? _ : _.getParentOrThrow()), s = 0;
|
|
2416
2416
|
}
|
|
2417
|
-
M(_) ? (i = _, f = null, s =
|
|
2417
|
+
M(_) ? (i = _, f = null, s = ge(_, o ? "next" : "previous")) : _ !== f && o && !d && (v(f) || T(216), s = Math.min(f.getChildrenSize(), s + 1));
|
|
2418
2418
|
} else {
|
|
2419
2419
|
const g = f.getIndexWithinParent();
|
|
2420
2420
|
s = e === 0 && B(f) && tt(n) === f ? g : g + 1, f = f.getParentOrThrow();
|
|
2421
2421
|
}
|
|
2422
|
-
if (v(f)) return
|
|
2422
|
+
if (v(f)) return _e(f.__key, s, "element");
|
|
2423
2423
|
}
|
|
2424
2424
|
} else i = tt(n);
|
|
2425
|
-
return M(i) ?
|
|
2425
|
+
return M(i) ? _e(i.__key, ge(i, s, "clamp"), "text") : null;
|
|
2426
2426
|
}
|
|
2427
2427
|
function Zr(n, e, t) {
|
|
2428
2428
|
const r = n.offset, i = n.getNode();
|
|
@@ -2466,31 +2466,31 @@ function ns(n, e, t, r, i, s) {
|
|
|
2466
2466
|
}
|
|
2467
2467
|
return ts(o, l, s), [o, l];
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2469
|
+
function Ll(n) {
|
|
2470
2470
|
return v(n) && !n.isInline();
|
|
2471
2471
|
}
|
|
2472
2472
|
function rs(n, e, t, r, i, s) {
|
|
2473
|
-
const o = Pe(), l = new Ge(
|
|
2473
|
+
const o = Pe(), l = new Ge(_e(n, e, i), _e(t, r, s), 0, "");
|
|
2474
2474
|
return l.dirty = !0, o._selection = l, l;
|
|
2475
2475
|
}
|
|
2476
2476
|
function Ko() {
|
|
2477
|
-
const n =
|
|
2477
|
+
const n = _e("root", 0, "element"), e = _e("root", 0, "element");
|
|
2478
2478
|
return new Ge(n, e, 0, "");
|
|
2479
2479
|
}
|
|
2480
2480
|
function is() {
|
|
2481
2481
|
return new _n(/* @__PURE__ */ new Set());
|
|
2482
2482
|
}
|
|
2483
|
-
function
|
|
2483
|
+
function Il(n, e) {
|
|
2484
2484
|
return pn(null, n, e, null);
|
|
2485
2485
|
}
|
|
2486
2486
|
function pn(n, e, t, r) {
|
|
2487
2487
|
const i = t._window;
|
|
2488
2488
|
if (i === null) return null;
|
|
2489
|
-
const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !
|
|
2489
|
+
const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !Rn && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && s && s.detail === 3 || o === "drop" || o === void 0);
|
|
2490
2490
|
let c, u, d, f;
|
|
2491
2491
|
if (A(n) && !a) return n.clone();
|
|
2492
2492
|
if (e === null) return null;
|
|
2493
|
-
if (c = e.anchorNode, u = e.focusNode, d = e.anchorOffset, f = e.focusOffset, l && A(n) && !mn(t, c, u)) return n.clone();
|
|
2493
|
+
if (c = e.anchorNode, u = e.focusNode, d = e.anchorOffset, f = e.focusOffset, (l || o === void 0) && A(n) && !mn(t, c, u)) return n.clone();
|
|
2494
2494
|
const g = ns(c, d, u, f, t, n);
|
|
2495
2495
|
if (g === null) return null;
|
|
2496
2496
|
const [h, _] = g;
|
|
@@ -2568,15 +2568,15 @@ function zo(n, e, t, r, i, s, o) {
|
|
|
2568
2568
|
const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, d = document.activeElement;
|
|
2569
2569
|
if (i.has(bo) && d !== s || d !== null && _s(d)) return;
|
|
2570
2570
|
if (!A(e)) return void (n !== null && mn(t, l, a) && r.removeAllRanges());
|
|
2571
|
-
const f = e.anchor, g = e.focus, h = f.key, _ = g.key, p =
|
|
2572
|
-
let w = p, k = x,
|
|
2571
|
+
const f = e.anchor, g = e.focus, h = f.key, _ = g.key, p = je(t, h), x = je(t, _), y = f.offset, m = g.offset, b = e.format, N = e.style, S = e.isCollapsed();
|
|
2572
|
+
let w = p, k = x, C = !1;
|
|
2573
2573
|
if (f.type === "text") {
|
|
2574
2574
|
w = lt(p);
|
|
2575
2575
|
const W = f.getNode();
|
|
2576
|
-
|
|
2577
|
-
} else A(n) && n.anchor.type === "text" && (
|
|
2576
|
+
C = W.getFormat() !== b || W.getStyle() !== N;
|
|
2577
|
+
} else A(n) && n.anchor.type === "text" && (C = !0);
|
|
2578
2578
|
var O, D, z, F, I;
|
|
2579
|
-
if (g.type === "text" && (k = lt(x)), w !== null && k !== null && (
|
|
2579
|
+
if (g.type === "text" && (k = lt(x)), w !== null && k !== null && (S && (n === null || C || A(n) && (n.format !== b || n.style !== N)) && (O = b, D = N, z = y, F = h, I = performance.now(), Ui = [O, D, z, F, I]), c !== y || u !== m || l !== w || a !== k || r.type === "Range" && S || (d !== null && s.contains(d) || i.has(Eo) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
|
|
2580
2580
|
if (ss(r, w, y, k, m), !i.has(No) && e.isCollapsed() && s !== null && s === document.activeElement) {
|
|
2581
2581
|
const W = A(e) && e.anchor.type === "element" ? w.childNodes[y] || null : r.rangeCount > 0 ? r.getRangeAt(0) : null;
|
|
2582
2582
|
if (W !== null) {
|
|
@@ -2585,46 +2585,46 @@ function zo(n, e, t, r, i, s, o) {
|
|
|
2585
2585
|
const te = document.createRange();
|
|
2586
2586
|
te.selectNode(W), G = te.getBoundingClientRect();
|
|
2587
2587
|
} else G = W.getBoundingClientRect();
|
|
2588
|
-
(function(te, Qe,
|
|
2589
|
-
const ft = bs(
|
|
2588
|
+
(function(te, Qe, pe) {
|
|
2589
|
+
const ft = bs(pe), kr = mr(ft);
|
|
2590
2590
|
if (ft === null || kr === null) return;
|
|
2591
|
-
let { top:
|
|
2592
|
-
for (;
|
|
2593
|
-
const
|
|
2594
|
-
if (
|
|
2591
|
+
let { top: Tn, bottom: bn } = Qe, zt = 0, Bt = 0, Te = pe;
|
|
2592
|
+
for (; Te !== null; ) {
|
|
2593
|
+
const Nn = Te === ft.body;
|
|
2594
|
+
if (Nn) zt = 0, Bt = se(te).innerHeight;
|
|
2595
2595
|
else {
|
|
2596
|
-
const Rt =
|
|
2596
|
+
const Rt = Te.getBoundingClientRect();
|
|
2597
2597
|
zt = Rt.top, Bt = Rt.bottom;
|
|
2598
2598
|
}
|
|
2599
2599
|
let dt = 0;
|
|
2600
|
-
if (
|
|
2600
|
+
if (Tn < zt ? dt = -(zt - Tn) : bn > Bt && (dt = bn - Bt), dt !== 0) if (Nn) kr.scrollBy(0, dt);
|
|
2601
2601
|
else {
|
|
2602
|
-
const Rt =
|
|
2603
|
-
|
|
2604
|
-
const Tr =
|
|
2605
|
-
|
|
2602
|
+
const Rt = Te.scrollTop;
|
|
2603
|
+
Te.scrollTop += dt;
|
|
2604
|
+
const Tr = Te.scrollTop - Rt;
|
|
2605
|
+
Tn -= Tr, bn -= Tr;
|
|
2606
2606
|
}
|
|
2607
|
-
if (
|
|
2608
|
-
|
|
2607
|
+
if (Nn) break;
|
|
2608
|
+
Te = Lt(Te);
|
|
2609
2609
|
}
|
|
2610
2610
|
})(t, G, s);
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
2613
|
-
|
|
2613
|
+
Qn = !0;
|
|
2614
2614
|
}
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2616
|
+
function Kl(n) {
|
|
2617
2617
|
let e = L() || ut();
|
|
2618
2618
|
e === null && (e = ie().selectEnd()), e.insertNodes(n);
|
|
2619
2619
|
}
|
|
2620
|
-
function
|
|
2620
|
+
function Ln(n) {
|
|
2621
2621
|
let e = n;
|
|
2622
2622
|
n.isCollapsed() || e.removeText();
|
|
2623
2623
|
const t = L();
|
|
2624
2624
|
A(t) && (e = t), A(e) || T(161);
|
|
2625
2625
|
const r = e.anchor;
|
|
2626
2626
|
let i = r.getNode(), s = r.offset;
|
|
2627
|
-
for (; !
|
|
2627
|
+
for (; !Ne(i); ) {
|
|
2628
2628
|
const o = i;
|
|
2629
2629
|
if ([i, s] = Bo(i, s), o.is(i)) break;
|
|
2630
2630
|
}
|
|
@@ -2645,7 +2645,7 @@ function Bo(n, e) {
|
|
|
2645
2645
|
if (!v(n) || e === 0) return [t, n.getIndexWithinParent()];
|
|
2646
2646
|
const r = n.getChildAtIndex(e);
|
|
2647
2647
|
if (r) {
|
|
2648
|
-
const i = new Ge(
|
|
2648
|
+
const i = new Ge(_e(n.__key, e, "element"), _e(n.__key, e, "element"), 0, ""), s = n.insertNewAfter(i);
|
|
2649
2649
|
s && s.append(r, ...r.getNextSiblings());
|
|
2650
2650
|
}
|
|
2651
2651
|
return [t, n.getIndexWithinParent() + 1];
|
|
@@ -2657,14 +2657,14 @@ function ni(n, e, t, r, i = "decorators-and-blocks") {
|
|
|
2657
2657
|
}
|
|
2658
2658
|
const s = He(n.focus, t ? "previous" : "next"), o = r === "lineboundary", l = e === "move";
|
|
2659
2659
|
let a = s, c = i === "decorators-and-blocks";
|
|
2660
|
-
if (!
|
|
2660
|
+
if (!ml(a)) {
|
|
2661
2661
|
for (const u of a) {
|
|
2662
2662
|
c = !1;
|
|
2663
2663
|
const { origin: d } = u;
|
|
2664
2664
|
if (!B(d) || d.isIsolated() || (a = u, !o || !d.isInline())) break;
|
|
2665
2665
|
}
|
|
2666
2666
|
if (c) for (const u of ws(s).iterNodeCarets(e === "extend" ? "shadowRoot" : "root")) {
|
|
2667
|
-
if (
|
|
2667
|
+
if (he(u)) u.origin.isInline() || (a = u);
|
|
2668
2668
|
else {
|
|
2669
2669
|
if (v(u.origin)) continue;
|
|
2670
2670
|
B(u.origin) && !u.origin.isInline() && (a = u);
|
|
@@ -2679,10 +2679,10 @@ function ni(n, e, t, r, i = "decorators-and-blocks") {
|
|
|
2679
2679
|
}
|
|
2680
2680
|
return a = fe(a), l && wt(n.anchor, a), wt(n.focus, a), c || !o;
|
|
2681
2681
|
}
|
|
2682
|
-
let
|
|
2682
|
+
let j = null, $ = null, Z = !1, In = !1, Ht = 0;
|
|
2683
2683
|
const ri = { characterData: !0, childList: !0, subtree: !0 };
|
|
2684
2684
|
function Ot() {
|
|
2685
|
-
return Z ||
|
|
2685
|
+
return Z || j !== null && j._readOnly;
|
|
2686
2686
|
}
|
|
2687
2687
|
function X() {
|
|
2688
2688
|
Z && T(13);
|
|
@@ -2691,17 +2691,17 @@ function os() {
|
|
|
2691
2691
|
Ht > 99 && T(14);
|
|
2692
2692
|
}
|
|
2693
2693
|
function Pe() {
|
|
2694
|
-
return
|
|
2694
|
+
return j === null && T(195, ls()), j;
|
|
2695
2695
|
}
|
|
2696
2696
|
function R() {
|
|
2697
|
-
return
|
|
2697
|
+
return $ === null && T(196, ls()), $;
|
|
2698
2698
|
}
|
|
2699
2699
|
function ls() {
|
|
2700
2700
|
let n = 0;
|
|
2701
2701
|
const e = /* @__PURE__ */ new Set(), t = ot.version;
|
|
2702
2702
|
if (typeof window < "u") for (const i of document.querySelectorAll("[contenteditable]")) {
|
|
2703
2703
|
const s = xn(i);
|
|
2704
|
-
if (
|
|
2704
|
+
if (dr(s)) n++;
|
|
2705
2705
|
else if (s) {
|
|
2706
2706
|
let o = String(s.constructor.version || "<0.17.1");
|
|
2707
2707
|
o === t && (o += " (separately built, likely a bundler configuration issue)"), e.add(o);
|
|
@@ -2711,7 +2711,7 @@ function ls() {
|
|
|
2711
2711
|
return e.size && (r += ` and incompatible editors with versions ${Array.from(e).join(", ")}`), r;
|
|
2712
2712
|
}
|
|
2713
2713
|
function Ro() {
|
|
2714
|
-
return
|
|
2714
|
+
return $;
|
|
2715
2715
|
}
|
|
2716
2716
|
function ii(n, e, t) {
|
|
2717
2717
|
const r = e.__type, i = hs(n, r);
|
|
@@ -2730,132 +2730,132 @@ function as(n, e) {
|
|
|
2730
2730
|
Array.isArray(e) || (r = [e]);
|
|
2731
2731
|
for (const i of r) t.add(i);
|
|
2732
2732
|
}
|
|
2733
|
-
function
|
|
2734
|
-
return
|
|
2733
|
+
function zl(n) {
|
|
2734
|
+
return cr(n, R()._nodes);
|
|
2735
2735
|
}
|
|
2736
|
-
function
|
|
2736
|
+
function cr(n, e) {
|
|
2737
2737
|
const t = n.type, r = e.get(t);
|
|
2738
2738
|
r === void 0 && T(17, t);
|
|
2739
2739
|
const i = r.klass;
|
|
2740
2740
|
n.type !== i.getType() && T(18, i.name);
|
|
2741
2741
|
const s = i.importJSON(n), o = n.children;
|
|
2742
2742
|
if (v(s) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
|
|
2743
|
-
const a =
|
|
2743
|
+
const a = cr(o[l], e);
|
|
2744
2744
|
s.append(a);
|
|
2745
2745
|
}
|
|
2746
2746
|
return s;
|
|
2747
2747
|
}
|
|
2748
2748
|
function oi(n, e, t) {
|
|
2749
|
-
const r =
|
|
2750
|
-
|
|
2749
|
+
const r = j, i = Z, s = $;
|
|
2750
|
+
j = e, Z = !0, $ = n;
|
|
2751
2751
|
try {
|
|
2752
2752
|
return t();
|
|
2753
2753
|
} finally {
|
|
2754
|
-
|
|
2754
|
+
j = r, Z = i, $ = s;
|
|
2755
2755
|
}
|
|
2756
2756
|
}
|
|
2757
|
-
function
|
|
2757
|
+
function Se(n, e) {
|
|
2758
2758
|
const t = n._pendingEditorState, r = n._rootElement, i = n._headless || r === null;
|
|
2759
2759
|
if (t === null) return;
|
|
2760
|
-
const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== 0, c =
|
|
2760
|
+
const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== 0, c = j, u = Z, d = $, f = n._updating, g = n._observer;
|
|
2761
2761
|
let h = null;
|
|
2762
2762
|
if (n._pendingEditorState = null, n._editorState = t, !i && a && g !== null) {
|
|
2763
|
-
|
|
2763
|
+
$ = n, j = t, Z = !1, n._updating = !0;
|
|
2764
2764
|
try {
|
|
2765
|
-
const
|
|
2766
|
-
g.disconnect(), h = no(s, t, n,
|
|
2767
|
-
} catch (
|
|
2768
|
-
if (
|
|
2769
|
-
return ds(n, null, r, t), Ai(n), n._dirtyType = 2,
|
|
2765
|
+
const S = n._dirtyType, w = n._dirtyElements, k = n._dirtyLeaves;
|
|
2766
|
+
g.disconnect(), h = no(s, t, n, S, w, k);
|
|
2767
|
+
} catch (S) {
|
|
2768
|
+
if (S instanceof Error && n._onError(S), In) throw S;
|
|
2769
|
+
return ds(n, null, r, t), Ai(n), n._dirtyType = 2, In = !0, Se(n, s), void (In = !1);
|
|
2770
2770
|
} finally {
|
|
2771
|
-
g.observe(r, ri), n._updating = f,
|
|
2771
|
+
g.observe(r, ri), n._updating = f, j = c, Z = u, $ = d;
|
|
2772
2772
|
}
|
|
2773
2773
|
}
|
|
2774
2774
|
t._readOnly || (t._readOnly = !0);
|
|
2775
2775
|
const _ = n._dirtyLeaves, p = n._dirtyElements, x = n._normalizedNodes, y = n._updateTags, m = n._deferred;
|
|
2776
|
-
a && (n._dirtyType = 0, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), (function(
|
|
2777
|
-
const k =
|
|
2778
|
-
let
|
|
2776
|
+
a && (n._dirtyType = 0, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), (function(S, w) {
|
|
2777
|
+
const k = S._decorators;
|
|
2778
|
+
let C = S._pendingDecorators || k;
|
|
2779
2779
|
const O = w._nodeMap;
|
|
2780
2780
|
let D;
|
|
2781
|
-
for (D in
|
|
2781
|
+
for (D in C) O.has(D) || (C === k && (C = xs(S)), delete C[D]);
|
|
2782
2782
|
})(n, t);
|
|
2783
|
-
const b = i ? null :
|
|
2784
|
-
if (n._editable && b !== null && (a || l === null || l.dirty) && r !== null && !y.has(wo)) {
|
|
2785
|
-
|
|
2783
|
+
const b = i ? null : ve(se(n));
|
|
2784
|
+
if (n._editable && b !== null && (a || l === null || l.dirty || !l.is(o)) && r !== null && !y.has(wo)) {
|
|
2785
|
+
$ = n, j = t;
|
|
2786
2786
|
try {
|
|
2787
2787
|
if (g !== null && g.disconnect(), a || l === null || l.dirty) {
|
|
2788
|
-
const
|
|
2789
|
-
|
|
2788
|
+
const S = n._blockCursorElement;
|
|
2789
|
+
S !== null && rr(S, n, r), zo(o, l, n, b, y, r);
|
|
2790
2790
|
}
|
|
2791
|
-
(function(
|
|
2792
|
-
let
|
|
2791
|
+
(function(S, w, k) {
|
|
2792
|
+
let C = S._blockCursorElement;
|
|
2793
2793
|
if (A(k) && k.isCollapsed() && k.anchor.type === "element" && w.contains(document.activeElement)) {
|
|
2794
2794
|
const O = k.anchor, D = O.getNode(), z = O.offset;
|
|
2795
2795
|
let F = !1, I = null;
|
|
2796
2796
|
if (z === D.getChildrenSize())
|
|
2797
|
-
|
|
2797
|
+
zn(D.getChildAtIndex(z - 1)) && (F = !0);
|
|
2798
2798
|
else {
|
|
2799
2799
|
const W = D.getChildAtIndex(z);
|
|
2800
|
-
if (W !== null &&
|
|
2800
|
+
if (W !== null && zn(W)) {
|
|
2801
2801
|
const G = W.getPreviousSibling();
|
|
2802
|
-
(G === null ||
|
|
2802
|
+
(G === null || zn(G)) && (F = !0, I = S.getElementByKey(W.__key));
|
|
2803
2803
|
}
|
|
2804
2804
|
}
|
|
2805
2805
|
if (F) {
|
|
2806
|
-
const W =
|
|
2807
|
-
return
|
|
2806
|
+
const W = S.getElementByKey(D.__key);
|
|
2807
|
+
return C === null && (S._blockCursorElement = C = (function(G) {
|
|
2808
2808
|
const te = G.theme, Qe = document.createElement("div");
|
|
2809
2809
|
Qe.contentEditable = "false", Qe.setAttribute("data-lexical-cursor", "true");
|
|
2810
|
-
let
|
|
2811
|
-
if (
|
|
2812
|
-
if (typeof
|
|
2813
|
-
const ft = Ni(
|
|
2814
|
-
|
|
2810
|
+
let pe = te.blockCursor;
|
|
2811
|
+
if (pe !== void 0) {
|
|
2812
|
+
if (typeof pe == "string") {
|
|
2813
|
+
const ft = Ni(pe);
|
|
2814
|
+
pe = te.blockCursor = ft;
|
|
2815
2815
|
}
|
|
2816
|
-
|
|
2816
|
+
pe !== void 0 && Qe.classList.add(...pe);
|
|
2817
2817
|
}
|
|
2818
2818
|
return Qe;
|
|
2819
|
-
})(
|
|
2819
|
+
})(S._config)), w.style.caretColor = "transparent", void (I === null ? W.appendChild(C) : W.insertBefore(C, I));
|
|
2820
2820
|
}
|
|
2821
2821
|
}
|
|
2822
|
-
|
|
2822
|
+
C !== null && rr(C, S, w);
|
|
2823
2823
|
})(n, r, l);
|
|
2824
2824
|
} finally {
|
|
2825
|
-
g !== null && g.observe(r, ri),
|
|
2825
|
+
g !== null && g.observe(r, ri), $ = d, j = c;
|
|
2826
2826
|
}
|
|
2827
2827
|
}
|
|
2828
|
-
h !== null && (function(
|
|
2829
|
-
const D = Array.from(
|
|
2828
|
+
h !== null && (function(S, w, k, C, O) {
|
|
2829
|
+
const D = Array.from(S._listeners.mutation), z = D.length;
|
|
2830
2830
|
for (let F = 0; F < z; F++) {
|
|
2831
2831
|
const [I, W] = D[F];
|
|
2832
2832
|
for (const G of W) {
|
|
2833
2833
|
const te = w.get(G);
|
|
2834
|
-
te !== void 0 && I(te, { dirtyLeaves:
|
|
2834
|
+
te !== void 0 && I(te, { dirtyLeaves: C, prevEditorState: O, updateTags: k });
|
|
2835
2835
|
}
|
|
2836
2836
|
}
|
|
2837
2837
|
})(n, h, y, _, s), A(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Ki, void 0);
|
|
2838
2838
|
const N = n._pendingDecorators;
|
|
2839
|
-
N !== null && (n._decorators = N, n._pendingDecorators = null, xt("decorator", n, !0, N)), (function(
|
|
2840
|
-
const
|
|
2841
|
-
|
|
2842
|
-
})(n, e || s, t), xt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: h, normalizedNodes: x, prevEditorState: e || s, tags: y }), (function(
|
|
2843
|
-
if (
|
|
2844
|
-
const k =
|
|
2845
|
-
|
|
2839
|
+
N !== null && (n._decorators = N, n._pendingDecorators = null, xt("decorator", n, !0, N)), (function(S, w, k) {
|
|
2840
|
+
const C = fi(w), O = fi(k);
|
|
2841
|
+
C !== O && xt("textcontent", S, !0, O);
|
|
2842
|
+
})(n, e || s, t), xt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: h, normalizedNodes: x, prevEditorState: e || s, tags: y }), (function(S, w) {
|
|
2843
|
+
if (S._deferred = [], w.length !== 0) {
|
|
2844
|
+
const k = S._updating;
|
|
2845
|
+
S._updating = !0;
|
|
2846
2846
|
try {
|
|
2847
|
-
for (let
|
|
2847
|
+
for (let C = 0; C < w.length; C++) w[C]();
|
|
2848
2848
|
} finally {
|
|
2849
|
-
|
|
2849
|
+
S._updating = k;
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
|
-
})(n, m), (function(
|
|
2853
|
-
const w =
|
|
2852
|
+
})(n, m), (function(S) {
|
|
2853
|
+
const w = S._updates;
|
|
2854
2854
|
if (w.length !== 0) {
|
|
2855
2855
|
const k = w.shift();
|
|
2856
2856
|
if (k) {
|
|
2857
|
-
const [
|
|
2858
|
-
yn(
|
|
2857
|
+
const [C, O] = k;
|
|
2858
|
+
yn(S, C, O);
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
})(n);
|
|
@@ -2890,43 +2890,43 @@ function yn(n, e, t) {
|
|
|
2890
2890
|
const l = n._editorState;
|
|
2891
2891
|
let a = n._pendingEditorState, c = !1;
|
|
2892
2892
|
(a === null || a._readOnly) && (a = n._pendingEditorState = us(a || l), c = !0), a._flushSync = o;
|
|
2893
|
-
const u =
|
|
2894
|
-
|
|
2893
|
+
const u = j, d = Z, f = $, g = n._updating;
|
|
2894
|
+
j = a, Z = !1, n._updating = !0, $ = n;
|
|
2895
2895
|
const h = n._headless || n.getRootElement() === null;
|
|
2896
|
-
|
|
2896
|
+
fr(null);
|
|
2897
2897
|
try {
|
|
2898
2898
|
c && (h ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = (function(y, m) {
|
|
2899
|
-
const b = y.getEditorState()._selection, N =
|
|
2899
|
+
const b = y.getEditorState()._selection, N = ve(se(y));
|
|
2900
2900
|
return A(b) || b == null ? pn(b, N, y, m) : b.clone();
|
|
2901
2901
|
})(n, t && t.event || null));
|
|
2902
2902
|
const p = n._compositionKey;
|
|
2903
2903
|
e(), s = li(n, s), (function(y, m) {
|
|
2904
2904
|
const b = m.getEditorState()._selection, N = y._selection;
|
|
2905
2905
|
if (A(N)) {
|
|
2906
|
-
const
|
|
2906
|
+
const S = N.anchor, w = N.focus;
|
|
2907
2907
|
let k;
|
|
2908
|
-
if (
|
|
2909
|
-
const
|
|
2910
|
-
k !==
|
|
2908
|
+
if (S.type === "text" && (k = S.getNode(), k.selectionTransform(b, N)), w.type === "text") {
|
|
2909
|
+
const C = w.getNode();
|
|
2910
|
+
k !== C && C.selectionTransform(b, N);
|
|
2911
2911
|
}
|
|
2912
2912
|
}
|
|
2913
2913
|
})(a, n), n._dirtyType !== 0 && (s ? (function(y, m) {
|
|
2914
2914
|
const b = m._dirtyLeaves, N = y._nodeMap;
|
|
2915
|
-
for (const
|
|
2916
|
-
const w = N.get(
|
|
2915
|
+
for (const S of b) {
|
|
2916
|
+
const w = N.get(S);
|
|
2917
2917
|
M(w) && w.isAttached() && w.isSimpleText() && !w.isUnmergeable() && Fr(w);
|
|
2918
2918
|
}
|
|
2919
2919
|
})(a, n) : (function(y, m) {
|
|
2920
|
-
const b = m._dirtyLeaves, N = m._dirtyElements,
|
|
2921
|
-
let
|
|
2920
|
+
const b = m._dirtyLeaves, N = m._dirtyElements, S = y._nodeMap, w = we(), k = /* @__PURE__ */ new Map();
|
|
2921
|
+
let C = b, O = C.size, D = N, z = D.size;
|
|
2922
2922
|
for (; O > 0 || z > 0; ) {
|
|
2923
2923
|
if (O > 0) {
|
|
2924
2924
|
m._dirtyLeaves = /* @__PURE__ */ new Set();
|
|
2925
|
-
for (const F of
|
|
2926
|
-
const I =
|
|
2925
|
+
for (const F of C) {
|
|
2926
|
+
const I = S.get(F);
|
|
2927
2927
|
M(I) && I.isAttached() && I.isSimpleText() && !I.isUnmergeable() && Fr(I), I !== void 0 && si(I, w) && ii(m, I, k), b.add(F);
|
|
2928
2928
|
}
|
|
2929
|
-
if (
|
|
2929
|
+
if (C = m._dirtyLeaves, O = C.size, O > 0) {
|
|
2930
2930
|
Ht++;
|
|
2931
2931
|
continue;
|
|
2932
2932
|
}
|
|
@@ -2935,33 +2935,33 @@ function yn(n, e, t) {
|
|
|
2935
2935
|
for (const F of D) {
|
|
2936
2936
|
const I = F[0], W = F[1];
|
|
2937
2937
|
if (N.set(I, W), !W) continue;
|
|
2938
|
-
const G =
|
|
2938
|
+
const G = S.get(I);
|
|
2939
2939
|
G !== void 0 && si(G, w) && ii(m, G, k);
|
|
2940
2940
|
}
|
|
2941
|
-
|
|
2941
|
+
C = m._dirtyLeaves, O = C.size, D = m._dirtyElements, z = D.size, Ht++;
|
|
2942
2942
|
}
|
|
2943
2943
|
m._dirtyLeaves = b, m._dirtyElements = N;
|
|
2944
2944
|
})(a, n), li(n), (function(y, m, b, N) {
|
|
2945
|
-
const
|
|
2946
|
-
for (const [
|
|
2947
|
-
const O = w.get(
|
|
2948
|
-
O !== void 0 && (O.isAttached() || (v(O) && Ei(O,
|
|
2945
|
+
const S = y._nodeMap, w = m._nodeMap, k = [];
|
|
2946
|
+
for (const [C] of N) {
|
|
2947
|
+
const O = w.get(C);
|
|
2948
|
+
O !== void 0 && (O.isAttached() || (v(O) && Ei(O, C, S, w, k, N), S.has(C) || N.delete(C), k.push(C)));
|
|
2949
2949
|
}
|
|
2950
|
-
for (const
|
|
2951
|
-
for (const
|
|
2952
|
-
const O = w.get(
|
|
2953
|
-
O === void 0 || O.isAttached() || (
|
|
2950
|
+
for (const C of k) w.delete(C);
|
|
2951
|
+
for (const C of b) {
|
|
2952
|
+
const O = w.get(C);
|
|
2953
|
+
O === void 0 || O.isAttached() || (S.has(C) || b.delete(C), w.delete(C));
|
|
2954
2954
|
}
|
|
2955
2955
|
})(l, a, n._dirtyLeaves, n._dirtyElements)), p !== n._compositionKey && (a._flushSync = !0);
|
|
2956
2956
|
const x = a._selection;
|
|
2957
2957
|
if (A(x)) {
|
|
2958
2958
|
const y = a._nodeMap, m = x.anchor.key, b = x.focus.key;
|
|
2959
2959
|
y.get(m) !== void 0 && y.get(b) !== void 0 || T(19);
|
|
2960
|
-
} else
|
|
2960
|
+
} else ar(x) && x._nodes.size === 0 && (a._selection = null);
|
|
2961
2961
|
} catch (p) {
|
|
2962
|
-
return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = 2, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void
|
|
2962
|
+
return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = 2, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void Se(n);
|
|
2963
2963
|
} finally {
|
|
2964
|
-
|
|
2964
|
+
j = u, Z = d, $ = f, n._updating = g, Ht = 0;
|
|
2965
2965
|
}
|
|
2966
2966
|
n._dirtyType !== 0 || n._deferred.length > 0 || (function(p, x) {
|
|
2967
2967
|
const y = x.getEditorState()._selection, m = p._selection;
|
|
@@ -2969,12 +2969,12 @@ function yn(n, e, t) {
|
|
|
2969
2969
|
if (m.dirty || !m.is(y)) return !0;
|
|
2970
2970
|
} else if (y !== null) return !0;
|
|
2971
2971
|
return !1;
|
|
2972
|
-
})(a, n) ? a._flushSync ? (a._flushSync = !1,
|
|
2973
|
-
|
|
2972
|
+
})(a, n) ? a._flushSync ? (a._flushSync = !1, Se(n)) : c && Vo(() => {
|
|
2973
|
+
Se(n);
|
|
2974
2974
|
}) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
|
|
2975
2975
|
}
|
|
2976
2976
|
function ne(n, e, t) {
|
|
2977
|
-
|
|
2977
|
+
$ === n && t === void 0 ? e() : yn(n, e, t);
|
|
2978
2978
|
}
|
|
2979
2979
|
class Ct {
|
|
2980
2980
|
element;
|
|
@@ -3070,7 +3070,7 @@ function ai(n, e) {
|
|
|
3070
3070
|
}
|
|
3071
3071
|
return r !== n && T(225), t.reverse();
|
|
3072
3072
|
}
|
|
3073
|
-
class At extends
|
|
3073
|
+
class At extends de {
|
|
3074
3074
|
__first;
|
|
3075
3075
|
__last;
|
|
3076
3076
|
__size;
|
|
@@ -3424,7 +3424,7 @@ function ci(n, e, t) {
|
|
|
3424
3424
|
}
|
|
3425
3425
|
return !1;
|
|
3426
3426
|
}
|
|
3427
|
-
class cs extends
|
|
3427
|
+
class cs extends de {
|
|
3428
3428
|
decorate(e, t) {
|
|
3429
3429
|
return null;
|
|
3430
3430
|
}
|
|
@@ -3491,7 +3491,7 @@ function H(n) {
|
|
|
3491
3491
|
function us(n) {
|
|
3492
3492
|
return new Dt(new Map(n._nodeMap));
|
|
3493
3493
|
}
|
|
3494
|
-
function
|
|
3494
|
+
function ur() {
|
|
3495
3495
|
return new Dt(/* @__PURE__ */ new Map([["root", new Pt()]]));
|
|
3496
3496
|
}
|
|
3497
3497
|
function fs(n) {
|
|
@@ -3507,7 +3507,7 @@ function fs(n) {
|
|
|
3507
3507
|
}
|
|
3508
3508
|
return e;
|
|
3509
3509
|
}
|
|
3510
|
-
function
|
|
3510
|
+
function Bl(n) {
|
|
3511
3511
|
return n instanceof Dt;
|
|
3512
3512
|
}
|
|
3513
3513
|
class Dt {
|
|
@@ -3589,23 +3589,43 @@ class Ft extends At {
|
|
|
3589
3589
|
}
|
|
3590
3590
|
function Jo(n) {
|
|
3591
3591
|
const e = Ee();
|
|
3592
|
-
return n.style && (e.setFormat(n.style.textAlign),
|
|
3592
|
+
return n.style && (e.setFormat(n.style.textAlign), ol(n, e)), { node: e };
|
|
3593
3593
|
}
|
|
3594
3594
|
function Ee() {
|
|
3595
3595
|
return vn(new Ft());
|
|
3596
3596
|
}
|
|
3597
|
-
function
|
|
3597
|
+
function jo(n) {
|
|
3598
3598
|
return n instanceof Ft;
|
|
3599
3599
|
}
|
|
3600
|
-
const
|
|
3600
|
+
const Rl = 0, Wl = 1, Jl = 2, jl = 3, $l = 4;
|
|
3601
3601
|
function ds(n, e, t, r) {
|
|
3602
3602
|
const i = n._keyToDOMMap;
|
|
3603
|
-
i.clear(), n._editorState =
|
|
3603
|
+
i.clear(), n._editorState = ur(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = 0, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
|
|
3604
3604
|
const s = n._observer;
|
|
3605
3605
|
s !== null && (s.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", i.set("root", t));
|
|
3606
3606
|
}
|
|
3607
|
-
function
|
|
3608
|
-
const e =
|
|
3607
|
+
function $o(n) {
|
|
3608
|
+
const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
3609
|
+
let r = n;
|
|
3610
|
+
for (; r; ) {
|
|
3611
|
+
const { ownNodeConfig: i } = kn(r), s = r.transform;
|
|
3612
|
+
if (!t.has(s)) {
|
|
3613
|
+
t.add(s);
|
|
3614
|
+
const o = r.transform();
|
|
3615
|
+
o && e.add(o);
|
|
3616
|
+
}
|
|
3617
|
+
if (i) {
|
|
3618
|
+
const o = i.$transform;
|
|
3619
|
+
o && e.add(o), r = i.extends;
|
|
3620
|
+
} else {
|
|
3621
|
+
const o = Object.getPrototypeOf(r);
|
|
3622
|
+
r = o.prototype instanceof de && o !== de ? o : void 0;
|
|
3623
|
+
}
|
|
3624
|
+
}
|
|
3625
|
+
return e;
|
|
3626
|
+
}
|
|
3627
|
+
function Ul(n) {
|
|
3628
|
+
const e = n || {}, t = Ro(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, s = e.disableEvents || !1, o = ur(), l = e.namespace || (i !== null ? i._config.namespace : vs()), a = e.editorState, c = [Pt, ct, Et, Mt, Ft, Wo, ...e.nodes || []], { onError: u, html: d } = e, f = e.editable === void 0 || e.editable;
|
|
3609
3629
|
let g;
|
|
3610
3630
|
if (n === void 0 && t !== null) g = t._nodes;
|
|
3611
3631
|
else {
|
|
@@ -3613,26 +3633,27 @@ function jl(n) {
|
|
|
3613
3633
|
for (let _ = 0; _ < c.length; _++) {
|
|
3614
3634
|
let p = c[_], x = null, y = null;
|
|
3615
3635
|
if (typeof p != "function") {
|
|
3616
|
-
const
|
|
3617
|
-
p =
|
|
3636
|
+
const N = p;
|
|
3637
|
+
p = N.replace, x = N.with, y = N.withKlass || null;
|
|
3618
3638
|
}
|
|
3619
|
-
|
|
3620
|
-
|
|
3639
|
+
kn(p);
|
|
3640
|
+
const m = p.getType(), b = $o(p);
|
|
3641
|
+
g.set(m, { exportDOM: d && d.export ? d.export.get(p) : void 0, klass: p, replace: x, replaceWithKlass: y, sharedNodeState: Qs(c[_]), transforms: b });
|
|
3621
3642
|
}
|
|
3622
3643
|
}
|
|
3623
3644
|
const h = new ot(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, (function(_, p) {
|
|
3624
3645
|
const x = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), m = (b) => {
|
|
3625
3646
|
Object.keys(b).forEach((N) => {
|
|
3626
|
-
let
|
|
3627
|
-
|
|
3647
|
+
let S = x.get(N);
|
|
3648
|
+
S === void 0 && (S = [], x.set(N, S)), S.push(b[N]);
|
|
3628
3649
|
});
|
|
3629
3650
|
};
|
|
3630
3651
|
return _.forEach((b) => {
|
|
3631
3652
|
const N = b.klass.importDOM;
|
|
3632
3653
|
if (N == null || y.has(N)) return;
|
|
3633
3654
|
y.add(N);
|
|
3634
|
-
const
|
|
3635
|
-
|
|
3655
|
+
const S = N.call(b.klass);
|
|
3656
|
+
S !== null && m(S);
|
|
3636
3657
|
}), p && m(p), x;
|
|
3637
3658
|
})(g, d ? d.import : void 0), f, n);
|
|
3638
3659
|
return a !== void 0 && (h._pendingEditorState = a, h._dirtyType = 2), h;
|
|
@@ -3761,7 +3782,7 @@ class ot {
|
|
|
3761
3782
|
const f = U(d);
|
|
3762
3783
|
f && f.markDirty();
|
|
3763
3784
|
}
|
|
3764
|
-
}, o._pendingEditorState === null ? { tag:
|
|
3785
|
+
}, o._pendingEditorState === null ? { tag: An } : void 0);
|
|
3765
3786
|
})(this, i.map((o) => o.klass.getType())), () => {
|
|
3766
3787
|
i.forEach((o) => o.transforms.delete(t));
|
|
3767
3788
|
};
|
|
@@ -3789,18 +3810,18 @@ class ot {
|
|
|
3789
3810
|
if (e !== t) {
|
|
3790
3811
|
const r = it(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
|
|
3791
3812
|
if (this._rootElement = e, ds(this, t, e, i), t !== null && (this._config.disableEvents || To(t), r != null && t.classList.remove(...r)), e !== null) {
|
|
3792
|
-
const s =
|
|
3793
|
-
o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = 2, Ai(this), this._updateTags.add(
|
|
3813
|
+
const s = mr(e), o = e.style;
|
|
3814
|
+
o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = 2, Ai(this), this._updateTags.add(An), Se(this), this._config.disableEvents || (function(l, a) {
|
|
3794
3815
|
const c = l.ownerDocument;
|
|
3795
|
-
|
|
3816
|
+
Xn.set(l, c);
|
|
3796
3817
|
const u = ln.get(c) ?? 0;
|
|
3797
3818
|
u < 1 && c.addEventListener("selectionchange", Gi), ln.set(c, u + 1), l.__lexicalEditor = a;
|
|
3798
3819
|
const d = qi(l);
|
|
3799
|
-
for (let f = 0; f <
|
|
3800
|
-
const [g, h] =
|
|
3801
|
-
|
|
3820
|
+
for (let f = 0; f < Gn.length; f++) {
|
|
3821
|
+
const [g, h] = Gn[f], _ = typeof h == "function" ? (p) => {
|
|
3822
|
+
jr(p) || (Jr(p), (a.isEditable() || g === "click") && h(p, a));
|
|
3802
3823
|
} : (p) => {
|
|
3803
|
-
if (
|
|
3824
|
+
if (jr(p)) return;
|
|
3804
3825
|
Jr(p);
|
|
3805
3826
|
const x = a.isEditable();
|
|
3806
3827
|
switch (g) {
|
|
@@ -3829,7 +3850,7 @@ class ot {
|
|
|
3829
3850
|
});
|
|
3830
3851
|
}
|
|
3831
3852
|
})(e, this), r != null && e.classList.add(...r);
|
|
3832
|
-
} else this._window = null, this._updateTags.add(
|
|
3853
|
+
} else this._window = null, this._updateTags.add(An), Se(this);
|
|
3833
3854
|
xt("root", this, !1, e, t);
|
|
3834
3855
|
}
|
|
3835
3856
|
}
|
|
@@ -3844,25 +3865,25 @@ class ot {
|
|
|
3844
3865
|
let r = e;
|
|
3845
3866
|
r._readOnly && (r = us(e), r._selection = e._selection ? e._selection.clone() : null), Oi(this);
|
|
3846
3867
|
const i = this._pendingEditorState, s = this._updateTags, o = t !== void 0 ? t.tag : null;
|
|
3847
|
-
i === null || i.isEmpty() || (o != null && s.add(o),
|
|
3868
|
+
i === null || i.isEmpty() || (o != null && s.add(o), Se(this)), this._pendingEditorState = r, this._dirtyType = 2, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || Se(this);
|
|
3848
3869
|
}
|
|
3849
3870
|
parseEditorState(e, t) {
|
|
3850
3871
|
return (function(r, i, s) {
|
|
3851
|
-
const o =
|
|
3852
|
-
i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0,
|
|
3872
|
+
const o = ur(), l = j, a = Z, c = $, u = i._dirtyElements, d = i._dirtyLeaves, f = i._cloneNotNeeded, g = i._dirtyType;
|
|
3873
|
+
i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, j = o, Z = !1, $ = i, fr(null);
|
|
3853
3874
|
try {
|
|
3854
3875
|
const h = i._nodes;
|
|
3855
|
-
|
|
3876
|
+
cr(r.root, h), s && s(), o._readOnly = !0;
|
|
3856
3877
|
} catch (h) {
|
|
3857
3878
|
h instanceof Error && i._onError(h);
|
|
3858
3879
|
} finally {
|
|
3859
|
-
i._dirtyElements = u, i._dirtyLeaves = d, i._cloneNotNeeded = f, i._dirtyType = g,
|
|
3880
|
+
i._dirtyElements = u, i._dirtyLeaves = d, i._cloneNotNeeded = f, i._dirtyType = g, j = l, Z = a, $ = c;
|
|
3860
3881
|
}
|
|
3861
3882
|
return o;
|
|
3862
3883
|
})(typeof e == "string" ? JSON.parse(e) : e, this, t);
|
|
3863
3884
|
}
|
|
3864
3885
|
read(e) {
|
|
3865
|
-
return
|
|
3886
|
+
return Se(this), this.getEditorState().read(e, { editor: this });
|
|
3866
3887
|
}
|
|
3867
3888
|
update(e, t) {
|
|
3868
3889
|
(function(r, i, s) {
|
|
@@ -3873,7 +3894,7 @@ class ot {
|
|
|
3873
3894
|
const r = this._rootElement;
|
|
3874
3895
|
r !== null && (r.setAttribute("autocapitalize", "off"), ne(this, () => {
|
|
3875
3896
|
const i = L(), s = ie();
|
|
3876
|
-
i !== null ? i.dirty || re(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()),
|
|
3897
|
+
i !== null ? i.dirty || re(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()), Go("focus"), Xo(() => {
|
|
3877
3898
|
r.removeAttribute("autocapitalize"), e && e();
|
|
3878
3899
|
});
|
|
3879
3900
|
}), this._pendingEditorState === null && r.removeAttribute("autocapitalize"));
|
|
@@ -3881,7 +3902,7 @@ class ot {
|
|
|
3881
3902
|
blur() {
|
|
3882
3903
|
const e = this._rootElement;
|
|
3883
3904
|
e !== null && e.blur();
|
|
3884
|
-
const t =
|
|
3905
|
+
const t = ve(this._window);
|
|
3885
3906
|
t !== null && t.removeAllRanges();
|
|
3886
3907
|
}
|
|
3887
3908
|
isEditable() {
|
|
@@ -3894,12 +3915,12 @@ class ot {
|
|
|
3894
3915
|
return { editorState: this._editorState.toJSON() };
|
|
3895
3916
|
}
|
|
3896
3917
|
}
|
|
3897
|
-
ot.version = "0.
|
|
3898
|
-
let
|
|
3899
|
-
function
|
|
3900
|
-
|
|
3918
|
+
ot.version = "0.38.2+prod.esm";
|
|
3919
|
+
let tr = null;
|
|
3920
|
+
function fr(n) {
|
|
3921
|
+
tr = n;
|
|
3901
3922
|
}
|
|
3902
|
-
let
|
|
3923
|
+
let Uo = 1;
|
|
3903
3924
|
function hs(n, e) {
|
|
3904
3925
|
const t = gs(n, e);
|
|
3905
3926
|
return t === void 0 && T(30, e), t;
|
|
@@ -3907,17 +3928,17 @@ function hs(n, e) {
|
|
|
3907
3928
|
function gs(n, e) {
|
|
3908
3929
|
return n._nodes.get(e);
|
|
3909
3930
|
}
|
|
3910
|
-
const
|
|
3931
|
+
const Vo = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
|
|
3911
3932
|
Promise.resolve().then(n);
|
|
3912
3933
|
};
|
|
3913
3934
|
function ui(n) {
|
|
3914
|
-
return B(
|
|
3935
|
+
return B(hr(n));
|
|
3915
3936
|
}
|
|
3916
3937
|
function _s(n) {
|
|
3917
3938
|
const e = document.activeElement;
|
|
3918
3939
|
if (!ee(e)) return !1;
|
|
3919
3940
|
const t = e.nodeName;
|
|
3920
|
-
return B(
|
|
3941
|
+
return B(hr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && xn(e) == null);
|
|
3921
3942
|
}
|
|
3922
3943
|
function mn(n, e, t) {
|
|
3923
3944
|
const r = n.getRootElement();
|
|
@@ -3927,14 +3948,14 @@ function mn(n, e, t) {
|
|
|
3927
3948
|
return !1;
|
|
3928
3949
|
}
|
|
3929
3950
|
}
|
|
3930
|
-
function
|
|
3951
|
+
function dr(n) {
|
|
3931
3952
|
return n instanceof ot;
|
|
3932
3953
|
}
|
|
3933
3954
|
function ps(n) {
|
|
3934
3955
|
let e = n;
|
|
3935
3956
|
for (; e != null; ) {
|
|
3936
3957
|
const t = xn(e);
|
|
3937
|
-
if (
|
|
3958
|
+
if (dr(t)) return t;
|
|
3938
3959
|
e = Lt(e);
|
|
3939
3960
|
}
|
|
3940
3961
|
return null;
|
|
@@ -3945,19 +3966,19 @@ function xn(n) {
|
|
|
3945
3966
|
function Ke(n) {
|
|
3946
3967
|
return es(n) || n.isToken();
|
|
3947
3968
|
}
|
|
3948
|
-
function
|
|
3969
|
+
function be(n) {
|
|
3949
3970
|
return Ke(n) || n.isSegmented();
|
|
3950
3971
|
}
|
|
3951
|
-
function
|
|
3972
|
+
function ke(n) {
|
|
3952
3973
|
return It(n) && n.nodeType === 3;
|
|
3953
3974
|
}
|
|
3954
|
-
function
|
|
3975
|
+
function Yo(n) {
|
|
3955
3976
|
return It(n) && n.nodeType === 9;
|
|
3956
3977
|
}
|
|
3957
3978
|
function lt(n) {
|
|
3958
3979
|
let e = n;
|
|
3959
3980
|
for (; e != null; ) {
|
|
3960
|
-
if (
|
|
3981
|
+
if (ke(e)) return e;
|
|
3961
3982
|
e = e.firstChild;
|
|
3962
3983
|
}
|
|
3963
3984
|
return null;
|
|
@@ -3968,17 +3989,17 @@ function fn(n, e, t) {
|
|
|
3968
3989
|
let i = n ^ r;
|
|
3969
3990
|
return e === "subscript" ? i &= -65 : e === "superscript" ? i &= -33 : e === "lowercase" ? (i &= -513, i &= -1025) : e === "uppercase" ? (i &= -257, i &= -1025) : e === "capitalize" && (i &= -257, i &= -513), i;
|
|
3970
3991
|
}
|
|
3971
|
-
function
|
|
3992
|
+
function Vl(n) {
|
|
3972
3993
|
return M(n) || rt(n) || B(n);
|
|
3973
3994
|
}
|
|
3974
3995
|
function ys(n, e) {
|
|
3975
3996
|
const t = (function() {
|
|
3976
|
-
const o =
|
|
3977
|
-
return
|
|
3997
|
+
const o = tr;
|
|
3998
|
+
return tr = null, o;
|
|
3978
3999
|
})();
|
|
3979
4000
|
if ((e = e || t && t.__key) != null) return void (n.__key = e);
|
|
3980
4001
|
X(), os();
|
|
3981
|
-
const r = R(), i = Pe(), s = "" +
|
|
4002
|
+
const r = R(), i = Pe(), s = "" + Uo++;
|
|
3982
4003
|
i._nodeMap.set(s, n), v(n) ? r._dirtyElements.set(s, !0) : r._dirtyLeaves.add(s), r._cloneNotNeeded.add(s), r._dirtyType = 1, n.__key = s;
|
|
3983
4004
|
}
|
|
3984
4005
|
function ze(n) {
|
|
@@ -4017,7 +4038,7 @@ function Y(n) {
|
|
|
4017
4038
|
}
|
|
4018
4039
|
}
|
|
4019
4040
|
}
|
|
4020
|
-
function
|
|
4041
|
+
function we() {
|
|
4021
4042
|
return Ot() ? null : R()._compositionKey;
|
|
4022
4043
|
}
|
|
4023
4044
|
function U(n, e) {
|
|
@@ -4031,7 +4052,7 @@ function ms(n, e) {
|
|
|
4031
4052
|
function Cn(n, e) {
|
|
4032
4053
|
return n[`__lexicalKey_${e._key}`];
|
|
4033
4054
|
}
|
|
4034
|
-
function
|
|
4055
|
+
function hr(n, e) {
|
|
4035
4056
|
let t = n;
|
|
4036
4057
|
for (; t != null; ) {
|
|
4037
4058
|
const r = ms(t, e);
|
|
@@ -4073,7 +4094,7 @@ function tt(n) {
|
|
|
4073
4094
|
function Ss(n) {
|
|
4074
4095
|
return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n);
|
|
4075
4096
|
}
|
|
4076
|
-
function
|
|
4097
|
+
function gr(n) {
|
|
4077
4098
|
const e = [];
|
|
4078
4099
|
let t = n;
|
|
4079
4100
|
for (; t !== null; ) e.push(t), t = t._parentEditor;
|
|
@@ -4083,26 +4104,26 @@ function vs() {
|
|
|
4083
4104
|
return Math.random().toString(36).replace(/[^a-z]+/g, "").substring(0, 5);
|
|
4084
4105
|
}
|
|
4085
4106
|
function ks(n) {
|
|
4086
|
-
return
|
|
4107
|
+
return ke(n) ? n.nodeValue : null;
|
|
4087
4108
|
}
|
|
4088
|
-
function
|
|
4089
|
-
const r =
|
|
4109
|
+
function _r(n, e, t) {
|
|
4110
|
+
const r = ve(se(e));
|
|
4090
4111
|
if (r === null) return;
|
|
4091
4112
|
const i = r.anchorNode;
|
|
4092
4113
|
let { anchorOffset: s, focusOffset: o } = r;
|
|
4093
4114
|
if (i !== null) {
|
|
4094
4115
|
let l = ks(i);
|
|
4095
|
-
const a =
|
|
4116
|
+
const a = hr(i);
|
|
4096
4117
|
if (l !== null && M(a)) {
|
|
4097
4118
|
if (l === hn && t) {
|
|
4098
4119
|
const c = t.length;
|
|
4099
4120
|
l = t, s = c, o = c;
|
|
4100
4121
|
}
|
|
4101
|
-
l !== null &&
|
|
4122
|
+
l !== null && pr(a, l, s, o, n);
|
|
4102
4123
|
}
|
|
4103
4124
|
}
|
|
4104
4125
|
}
|
|
4105
|
-
function
|
|
4126
|
+
function pr(n, e, t, r, i) {
|
|
4106
4127
|
let s = n;
|
|
4107
4128
|
if (s.isAttached() && (i || !s.isDirty())) {
|
|
4108
4129
|
const o = s.isComposing();
|
|
@@ -4122,7 +4143,7 @@ function _r(n, e, t, r, i) {
|
|
|
4122
4143
|
}
|
|
4123
4144
|
return;
|
|
4124
4145
|
}
|
|
4125
|
-
const c = s.getParent(), u = ut(), d = s.getTextContentSize(), f =
|
|
4146
|
+
const c = s.getParent(), u = ut(), d = s.getTextContentSize(), f = we(), g = s.getKey();
|
|
4126
4147
|
if (s.isToken() || f !== null && g === f && !o || A(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !s.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === d && !s.canInsertTextAfter() && !o)) return void s.markDirty();
|
|
4127
4148
|
const h = L();
|
|
4128
4149
|
if (!A(h) || t === null || r === null) return void di(s, l, h);
|
|
@@ -4139,36 +4160,36 @@ function di(n, e, t) {
|
|
|
4139
4160
|
const r = n.getKey();
|
|
4140
4161
|
for (const i of ["anchor", "focus"]) {
|
|
4141
4162
|
const s = t[i];
|
|
4142
|
-
s.type === "text" && s.key === r && (s.offset =
|
|
4163
|
+
s.type === "text" && s.key === r && (s.offset = ge(n, s.offset, "clamp"));
|
|
4143
4164
|
}
|
|
4144
4165
|
}
|
|
4145
4166
|
}
|
|
4146
|
-
function
|
|
4167
|
+
function $t(n, e, t) {
|
|
4147
4168
|
const r = e[t] || !1;
|
|
4148
4169
|
return r === "any" || r === n[t];
|
|
4149
4170
|
}
|
|
4150
|
-
function
|
|
4151
|
-
return
|
|
4171
|
+
function Ho(n, e) {
|
|
4172
|
+
return $t(n, e, "altKey") && $t(n, e, "ctrlKey") && $t(n, e, "shiftKey") && $t(n, e, "metaKey");
|
|
4152
4173
|
}
|
|
4153
4174
|
function K(n, e, t) {
|
|
4154
|
-
return
|
|
4175
|
+
return Ho(n, t) && n.key.toLowerCase() === e.toLowerCase();
|
|
4155
4176
|
}
|
|
4156
|
-
const
|
|
4177
|
+
const xe = { ctrlKey: !oe, metaKey: oe }, hi = { altKey: oe, ctrlKey: !oe };
|
|
4157
4178
|
function gi(n) {
|
|
4158
4179
|
return n.key === "Backspace";
|
|
4159
4180
|
}
|
|
4160
4181
|
function _i(n) {
|
|
4161
|
-
return K(n, "a",
|
|
4182
|
+
return K(n, "a", xe);
|
|
4162
4183
|
}
|
|
4163
|
-
function
|
|
4184
|
+
function Yl(n) {
|
|
4164
4185
|
const e = ie();
|
|
4165
4186
|
if (A(n)) {
|
|
4166
4187
|
const t = n.anchor, r = n.focus, i = t.getNode().getTopLevelElementOrThrow().getParentOrThrow();
|
|
4167
|
-
return t.set(i.getKey(), 0, "element"), r.set(i.getKey(), i.getChildrenSize(), "element"),
|
|
4188
|
+
return t.set(i.getKey(), 0, "element"), r.set(i.getKey(), i.getChildrenSize(), "element"), Wn(n), n;
|
|
4168
4189
|
}
|
|
4169
4190
|
{
|
|
4170
4191
|
const t = e.select(0, e.getChildrenSize());
|
|
4171
|
-
return re(
|
|
4192
|
+
return re(Wn(t)), t;
|
|
4172
4193
|
}
|
|
4173
4194
|
}
|
|
4174
4195
|
function it(n, e) {
|
|
@@ -4182,7 +4203,7 @@ function it(n, e) {
|
|
|
4182
4203
|
}
|
|
4183
4204
|
return i;
|
|
4184
4205
|
}
|
|
4185
|
-
function
|
|
4206
|
+
function yr(n, e, t, r, i) {
|
|
4186
4207
|
if (t.size === 0) return;
|
|
4187
4208
|
const s = r.__type, o = r.__key, l = e.get(s);
|
|
4188
4209
|
l === void 0 && T(33, s);
|
|
@@ -4197,7 +4218,7 @@ function pi(n, e, t) {
|
|
|
4197
4218
|
let i = t, s = n;
|
|
4198
4219
|
return r !== null && (e && t === 0 ? (i = s.getIndexWithinParent(), s = r) : e || t !== s.getChildrenSize() || (i = s.getIndexWithinParent() + 1, s = r)), s.getChildAtIndex(e ? i - 1 : i);
|
|
4199
4220
|
}
|
|
4200
|
-
function
|
|
4221
|
+
function qo(n, e) {
|
|
4201
4222
|
const t = n.offset;
|
|
4202
4223
|
if (n.type === "element")
|
|
4203
4224
|
return pi(n.getNode(), e, t);
|
|
@@ -4216,7 +4237,7 @@ function Ts(n) {
|
|
|
4216
4237
|
}
|
|
4217
4238
|
function E(n, e, t) {
|
|
4218
4239
|
return (function(r, i, s) {
|
|
4219
|
-
const o =
|
|
4240
|
+
const o = gr(r);
|
|
4220
4241
|
for (let l = 4; l >= 0; l--) for (let a = 0; a < o.length; a++) {
|
|
4221
4242
|
const c = o[a], u = c._commands.get(i);
|
|
4222
4243
|
if (u !== void 0) {
|
|
@@ -4236,24 +4257,24 @@ function E(n, e, t) {
|
|
|
4236
4257
|
function Sn(n) {
|
|
4237
4258
|
return !H(n) && !n.isLastChild() && !n.isInline();
|
|
4238
4259
|
}
|
|
4239
|
-
function
|
|
4260
|
+
function je(n, e) {
|
|
4240
4261
|
const t = n._keyToDOMMap.get(e);
|
|
4241
4262
|
return t === void 0 && T(75, e), t;
|
|
4242
4263
|
}
|
|
4243
4264
|
function Lt(n) {
|
|
4244
4265
|
const e = n.assignedSlot || n.parentElement;
|
|
4245
|
-
return
|
|
4266
|
+
return nl(e) ? e.host : e;
|
|
4246
4267
|
}
|
|
4247
4268
|
function bs(n) {
|
|
4248
|
-
return
|
|
4269
|
+
return Yo(n) ? n : ee(n) ? n.ownerDocument : null;
|
|
4249
4270
|
}
|
|
4250
|
-
function
|
|
4271
|
+
function Go(n) {
|
|
4251
4272
|
X(), R()._updateTags.add(n);
|
|
4252
4273
|
}
|
|
4253
|
-
function
|
|
4274
|
+
function Xo(n) {
|
|
4254
4275
|
X(), R()._deferred.push(n);
|
|
4255
4276
|
}
|
|
4256
|
-
function
|
|
4277
|
+
function nr(n, e) {
|
|
4257
4278
|
let t = n.getParent();
|
|
4258
4279
|
for (; t !== null; ) {
|
|
4259
4280
|
if (t.is(e)) return !0;
|
|
@@ -4261,7 +4282,7 @@ function tr(n, e) {
|
|
|
4261
4282
|
}
|
|
4262
4283
|
return !1;
|
|
4263
4284
|
}
|
|
4264
|
-
function
|
|
4285
|
+
function mr(n) {
|
|
4265
4286
|
const e = bs(n);
|
|
4266
4287
|
return e ? e.defaultView : null;
|
|
4267
4288
|
}
|
|
@@ -4269,10 +4290,10 @@ function se(n) {
|
|
|
4269
4290
|
const e = n._window;
|
|
4270
4291
|
return e === null && T(78), e;
|
|
4271
4292
|
}
|
|
4272
|
-
function
|
|
4293
|
+
function Hl(n) {
|
|
4273
4294
|
return v(n) && n.isInline() || B(n) && n.isInline();
|
|
4274
4295
|
}
|
|
4275
|
-
function
|
|
4296
|
+
function Qo(n) {
|
|
4276
4297
|
let e = n.getParentOrThrow();
|
|
4277
4298
|
for (; e !== null; ) {
|
|
4278
4299
|
if (De(e)) return e;
|
|
@@ -4283,7 +4304,7 @@ function Xo(n) {
|
|
|
4283
4304
|
function De(n) {
|
|
4284
4305
|
return H(n) || v(n) && n.isShadowRoot();
|
|
4285
4306
|
}
|
|
4286
|
-
function
|
|
4307
|
+
function Zo(n) {
|
|
4287
4308
|
const e = n.constructor.clone(n);
|
|
4288
4309
|
return ys(e, null), e.afterCloneFrom(n), e;
|
|
4289
4310
|
}
|
|
@@ -4297,29 +4318,29 @@ function vn(n) {
|
|
|
4297
4318
|
}
|
|
4298
4319
|
return n;
|
|
4299
4320
|
}
|
|
4300
|
-
function
|
|
4321
|
+
function Kn(n, e) {
|
|
4301
4322
|
!H(n.getParent()) || v(e) || B(e) || T(99);
|
|
4302
4323
|
}
|
|
4303
|
-
function
|
|
4324
|
+
function el(n) {
|
|
4304
4325
|
const e = U(n);
|
|
4305
4326
|
return e === null && T(63, n), e;
|
|
4306
4327
|
}
|
|
4307
|
-
function
|
|
4328
|
+
function zn(n) {
|
|
4308
4329
|
return (B(n) || v(n) && !n.canBeEmpty()) && !n.isInline();
|
|
4309
4330
|
}
|
|
4310
|
-
function
|
|
4331
|
+
function rr(n, e, t) {
|
|
4311
4332
|
t.style.removeProperty("caret-color"), e._blockCursorElement = null;
|
|
4312
4333
|
const r = n.parentElement;
|
|
4313
4334
|
r !== null && r.removeChild(n);
|
|
4314
4335
|
}
|
|
4315
|
-
function
|
|
4336
|
+
function ve(n) {
|
|
4316
4337
|
return ae ? (n || window).getSelection() : null;
|
|
4317
4338
|
}
|
|
4318
|
-
function
|
|
4319
|
-
const e =
|
|
4339
|
+
function tl(n) {
|
|
4340
|
+
const e = mr(n);
|
|
4320
4341
|
return e ? e.getSelection() : null;
|
|
4321
4342
|
}
|
|
4322
|
-
function
|
|
4343
|
+
function ql(n) {
|
|
4323
4344
|
return ee(n) && n.tagName === "A";
|
|
4324
4345
|
}
|
|
4325
4346
|
function ee(n) {
|
|
@@ -4328,10 +4349,10 @@ function ee(n) {
|
|
|
4328
4349
|
function It(n) {
|
|
4329
4350
|
return typeof n == "object" && n !== null && "nodeType" in n && typeof n.nodeType == "number";
|
|
4330
4351
|
}
|
|
4331
|
-
function
|
|
4352
|
+
function nl(n) {
|
|
4332
4353
|
return It(n) && n.nodeType === 11;
|
|
4333
4354
|
}
|
|
4334
|
-
function
|
|
4355
|
+
function rl(n) {
|
|
4335
4356
|
const e = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/, "i");
|
|
4336
4357
|
return n.nodeName.match(e) !== null;
|
|
4337
4358
|
}
|
|
@@ -4339,18 +4360,18 @@ function yi(n) {
|
|
|
4339
4360
|
const e = new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/, "i");
|
|
4340
4361
|
return n.nodeName.match(e) !== null;
|
|
4341
4362
|
}
|
|
4342
|
-
function
|
|
4363
|
+
function Ne(n) {
|
|
4343
4364
|
if (B(n) && !n.isInline()) return !0;
|
|
4344
4365
|
if (!v(n) || De(n)) return !1;
|
|
4345
4366
|
const e = n.getFirstChild(), t = e === null || rt(e) || M(e) || e.isInline();
|
|
4346
4367
|
return !n.isInline() && n.canBeEmpty() !== !1 && t;
|
|
4347
4368
|
}
|
|
4348
|
-
function
|
|
4369
|
+
function il() {
|
|
4349
4370
|
return R();
|
|
4350
4371
|
}
|
|
4351
|
-
const mi = /* @__PURE__ */ new WeakMap(),
|
|
4372
|
+
const mi = /* @__PURE__ */ new WeakMap(), sl = /* @__PURE__ */ new Map();
|
|
4352
4373
|
function xi(n) {
|
|
4353
|
-
if (!n._readOnly && n.isEmpty()) return
|
|
4374
|
+
if (!n._readOnly && n.isEmpty()) return sl;
|
|
4354
4375
|
n._readOnly || T(192);
|
|
4355
4376
|
let e = mi.get(n);
|
|
4356
4377
|
return e || (e = (function(t) {
|
|
@@ -4367,28 +4388,28 @@ function Ns(n) {
|
|
|
4367
4388
|
const e = n.constructor.clone(n);
|
|
4368
4389
|
return e.afterCloneFrom(n), e;
|
|
4369
4390
|
}
|
|
4370
|
-
function
|
|
4391
|
+
function Gl(n) {
|
|
4371
4392
|
return (e = Ns(n))[Xi] = !0, e;
|
|
4372
4393
|
var e;
|
|
4373
4394
|
}
|
|
4374
|
-
function
|
|
4395
|
+
function ol(n, e) {
|
|
4375
4396
|
const t = parseInt(n.style.paddingInlineStart, 10) || 0, r = Math.round(t / 40);
|
|
4376
4397
|
e.setIndent(r);
|
|
4377
4398
|
}
|
|
4378
|
-
function
|
|
4399
|
+
function Xl(n) {
|
|
4379
4400
|
n.__lexicalUnmanaged = !0;
|
|
4380
4401
|
}
|
|
4381
|
-
function
|
|
4402
|
+
function ll(n) {
|
|
4382
4403
|
return n.__lexicalUnmanaged === !0;
|
|
4383
4404
|
}
|
|
4384
4405
|
function gt(n, e) {
|
|
4385
4406
|
return (function(t, r) {
|
|
4386
4407
|
return Object.prototype.hasOwnProperty.call(t, r);
|
|
4387
|
-
})(n, e) && n[e] !==
|
|
4408
|
+
})(n, e) && n[e] !== de[e];
|
|
4388
4409
|
}
|
|
4389
|
-
function
|
|
4410
|
+
function kn(n) {
|
|
4390
4411
|
const e = wr in n.prototype ? n.prototype[wr]() : void 0, t = (function(o) {
|
|
4391
|
-
if (!(o ===
|
|
4412
|
+
if (!(o === de || o.prototype instanceof de)) {
|
|
4392
4413
|
let l = "<unknown>", a = "<unknown>";
|
|
4393
4414
|
try {
|
|
4394
4415
|
l = o.getType();
|
|
@@ -4400,12 +4421,12 @@ function mr(n) {
|
|
|
4400
4421
|
}
|
|
4401
4422
|
T(290, o.name, l, a);
|
|
4402
4423
|
}
|
|
4403
|
-
return o === cs || o === At || o ===
|
|
4424
|
+
return o === cs || o === At || o === de;
|
|
4404
4425
|
})(n), r = !t && gt(n, "getType") ? n.getType() : void 0;
|
|
4405
4426
|
let i, s = r;
|
|
4406
4427
|
if (e) if (r) i = e[r];
|
|
4407
4428
|
else for (const [o, l] of Object.entries(e)) s = o, i = l;
|
|
4408
|
-
if (!t && s && (gt(n, "getType") || (n.getType = () => s), gt(n, "clone") || (n.clone = (o) => (
|
|
4429
|
+
if (!t && s && (gt(n, "getType") || (n.getType = () => s), gt(n, "clone") || (n.clone = (o) => (fr(o), new n())), gt(n, "importJSON") || (n.importJSON = i && i.$importJSON || ((o) => new n().updateFromJSON(o))), !gt(n, "importDOM") && i)) {
|
|
4409
4430
|
const { importDOM: o } = i;
|
|
4410
4431
|
o && (n.importDOM = () => o);
|
|
4411
4432
|
}
|
|
@@ -4418,7 +4439,7 @@ const qt = (n, e) => {
|
|
|
4418
4439
|
t = t.getParent();
|
|
4419
4440
|
}
|
|
4420
4441
|
return null;
|
|
4421
|
-
},
|
|
4442
|
+
}, al = { next: "previous", previous: "next" };
|
|
4422
4443
|
class xr {
|
|
4423
4444
|
origin;
|
|
4424
4445
|
constructor(e) {
|
|
@@ -4491,14 +4512,14 @@ class Nt extends xr {
|
|
|
4491
4512
|
return this.isSameNodeCaret(e);
|
|
4492
4513
|
}
|
|
4493
4514
|
}
|
|
4494
|
-
const
|
|
4515
|
+
const cl = { root: H, shadowRoot: De };
|
|
4495
4516
|
function Xe(n) {
|
|
4496
|
-
return
|
|
4517
|
+
return al[n];
|
|
4497
4518
|
}
|
|
4498
4519
|
function Cr(n, e = "root") {
|
|
4499
|
-
return
|
|
4520
|
+
return cl[e](n) ? null : n;
|
|
4500
4521
|
}
|
|
4501
|
-
class
|
|
4522
|
+
class $e extends xr {
|
|
4502
4523
|
type = "sibling";
|
|
4503
4524
|
getLatest() {
|
|
4504
4525
|
const e = this.origin.getLatest();
|
|
@@ -4521,10 +4542,10 @@ class je extends xr {
|
|
|
4521
4542
|
return q(this.getNodeAtCaret(), e) || Ae(this.origin.getParentOrThrow(), e);
|
|
4522
4543
|
}
|
|
4523
4544
|
isSamePointCaret(e) {
|
|
4524
|
-
return e instanceof
|
|
4545
|
+
return e instanceof $e && this.direction === e.direction && this.origin.is(e.origin);
|
|
4525
4546
|
}
|
|
4526
4547
|
isSameNodeCaret(e) {
|
|
4527
|
-
return (e instanceof
|
|
4548
|
+
return (e instanceof $e || e instanceof Ue) && this.direction === e.direction && this.origin.is(e.origin);
|
|
4528
4549
|
}
|
|
4529
4550
|
}
|
|
4530
4551
|
class Ue extends xr {
|
|
@@ -4553,7 +4574,7 @@ class Ue extends xr {
|
|
|
4553
4574
|
return e instanceof Ue && this.direction === e.direction && this.origin.is(e.origin) && this.offset === e.offset;
|
|
4554
4575
|
}
|
|
4555
4576
|
isSameNodeCaret(e) {
|
|
4556
|
-
return (e instanceof
|
|
4577
|
+
return (e instanceof $e || e instanceof Ue) && this.direction === e.direction && this.origin.is(e.origin);
|
|
4557
4578
|
}
|
|
4558
4579
|
getSiblingCaret() {
|
|
4559
4580
|
return q(this.origin, this.direction);
|
|
@@ -4563,12 +4584,12 @@ function Me(n) {
|
|
|
4563
4584
|
return n instanceof Ue;
|
|
4564
4585
|
}
|
|
4565
4586
|
function at(n) {
|
|
4566
|
-
return n instanceof
|
|
4587
|
+
return n instanceof $e;
|
|
4567
4588
|
}
|
|
4568
|
-
function
|
|
4589
|
+
function he(n) {
|
|
4569
4590
|
return n instanceof Nt;
|
|
4570
4591
|
}
|
|
4571
|
-
const
|
|
4592
|
+
const ul = { next: class extends Ue {
|
|
4572
4593
|
direction = "next";
|
|
4573
4594
|
getNodeAtCaret() {
|
|
4574
4595
|
return this.origin.getNextSibling();
|
|
@@ -4584,7 +4605,7 @@ const cl = { next: class extends Ue {
|
|
|
4584
4605
|
insert(n) {
|
|
4585
4606
|
return this.origin.insertBefore(n), this;
|
|
4586
4607
|
}
|
|
4587
|
-
} },
|
|
4608
|
+
} }, fl = { next: class extends $e {
|
|
4588
4609
|
direction = "next";
|
|
4589
4610
|
getNodeAtCaret() {
|
|
4590
4611
|
return this.origin.getNextSibling();
|
|
@@ -4592,7 +4613,7 @@ const cl = { next: class extends Ue {
|
|
|
4592
4613
|
insert(n) {
|
|
4593
4614
|
return this.origin.insertAfter(n), this;
|
|
4594
4615
|
}
|
|
4595
|
-
}, previous: class extends
|
|
4616
|
+
}, previous: class extends $e {
|
|
4596
4617
|
direction = "previous";
|
|
4597
4618
|
getNodeAtCaret() {
|
|
4598
4619
|
return this.origin.getPreviousSibling();
|
|
@@ -4600,7 +4621,7 @@ const cl = { next: class extends Ue {
|
|
|
4600
4621
|
insert(n) {
|
|
4601
4622
|
return this.origin.insertBefore(n), this;
|
|
4602
4623
|
}
|
|
4603
|
-
} },
|
|
4624
|
+
} }, dl = { next: class extends Nt {
|
|
4604
4625
|
direction = "next";
|
|
4605
4626
|
getNodeAtCaret() {
|
|
4606
4627
|
return this.origin.getFirstChild();
|
|
@@ -4618,27 +4639,27 @@ const cl = { next: class extends Ue {
|
|
|
4618
4639
|
}
|
|
4619
4640
|
} };
|
|
4620
4641
|
function q(n, e) {
|
|
4621
|
-
return n ? new
|
|
4642
|
+
return n ? new fl[e](n) : null;
|
|
4622
4643
|
}
|
|
4623
4644
|
function Ve(n, e, t) {
|
|
4624
|
-
return n ? new
|
|
4645
|
+
return n ? new ul[e](n, ge(n, t)) : null;
|
|
4625
4646
|
}
|
|
4626
|
-
function
|
|
4647
|
+
function ge(n, e, t = "error") {
|
|
4627
4648
|
const r = n.getTextContentSize();
|
|
4628
4649
|
let i = e === "next" ? r : e === "previous" ? 0 : e;
|
|
4629
4650
|
return (i < 0 || i > r) && (t !== "clamp" && Ti(284, String(e), String(r), n.getKey()), i = i < 0 ? 0 : r), i;
|
|
4630
4651
|
}
|
|
4631
4652
|
function Ci(n, e) {
|
|
4632
|
-
return new
|
|
4653
|
+
return new gl(n, e);
|
|
4633
4654
|
}
|
|
4634
4655
|
function Ae(n, e) {
|
|
4635
|
-
return v(n) ? new
|
|
4656
|
+
return v(n) ? new dl[e](n) : null;
|
|
4636
4657
|
}
|
|
4637
|
-
function
|
|
4658
|
+
function hl(n) {
|
|
4638
4659
|
return n && n.getChildCaret() || n;
|
|
4639
4660
|
}
|
|
4640
4661
|
function Sr(n) {
|
|
4641
|
-
return n &&
|
|
4662
|
+
return n && hl(n.getAdjacentCaret());
|
|
4642
4663
|
}
|
|
4643
4664
|
class vr {
|
|
4644
4665
|
type = "node-caret-range";
|
|
@@ -4659,7 +4680,7 @@ class vr {
|
|
|
4659
4680
|
const e = (i) => {
|
|
4660
4681
|
const s = this[i].getLatest();
|
|
4661
4682
|
return Me(s) ? (function(o, l) {
|
|
4662
|
-
const { direction: a, origin: c } = o, u =
|
|
4683
|
+
const { direction: a, origin: c } = o, u = ge(c, l === "focus" ? Xe(a) : a);
|
|
4663
4684
|
return Ci(o, u - o.offset);
|
|
4664
4685
|
})(s, i) : null;
|
|
4665
4686
|
}, t = e("anchor"), r = e("focus");
|
|
@@ -4677,7 +4698,7 @@ class vr {
|
|
|
4677
4698
|
return this.iterNodeCarets("root");
|
|
4678
4699
|
}
|
|
4679
4700
|
}
|
|
4680
|
-
class
|
|
4701
|
+
class gl {
|
|
4681
4702
|
type = "slice";
|
|
4682
4703
|
caret;
|
|
4683
4704
|
distance;
|
|
@@ -4703,7 +4724,7 @@ class hl {
|
|
|
4703
4724
|
function ws(n) {
|
|
4704
4725
|
return Ye(n, q(ie(), n.direction));
|
|
4705
4726
|
}
|
|
4706
|
-
function
|
|
4727
|
+
function _l(n) {
|
|
4707
4728
|
return Ye(n, n);
|
|
4708
4729
|
}
|
|
4709
4730
|
function Ye(n, e) {
|
|
@@ -4763,14 +4784,14 @@ function Gt(n, e) {
|
|
|
4763
4784
|
return null;
|
|
4764
4785
|
}
|
|
4765
4786
|
function He(n, e) {
|
|
4766
|
-
const { type: t, key: r, offset: i } = n, s =
|
|
4767
|
-
return t === "text" ? (M(s) || T(266, s.getType(), r), Ve(s, e, i)) : (v(s) || T(267, s.getType(), r),
|
|
4787
|
+
const { type: t, key: r, offset: i } = n, s = el(n.key);
|
|
4788
|
+
return t === "text" ? (M(s) || T(266, s.getType(), r), Ve(s, e, i)) : (v(s) || T(267, s.getType(), r), xl(s, n.offset, e));
|
|
4768
4789
|
}
|
|
4769
4790
|
function wt(n, e) {
|
|
4770
4791
|
const { origin: t, direction: r } = e, i = r === "next";
|
|
4771
|
-
Me(e) ? n.set(t.getKey(), e.offset, "text") : at(e) ? M(t) ? n.set(t.getKey(),
|
|
4792
|
+
Me(e) ? n.set(t.getKey(), e.offset, "text") : at(e) ? M(t) ? n.set(t.getKey(), ge(t, r), "text") : n.set(t.getParentOrThrow().getKey(), t.getIndexWithinParent() + (i ? 1 : 0), "element") : (he(e) && v(t) || T(268), n.set(t.getKey(), i ? 0 : t.getChildrenSize(), "element"));
|
|
4772
4793
|
}
|
|
4773
|
-
function
|
|
4794
|
+
function pl(n) {
|
|
4774
4795
|
const e = L(), t = A(e) ? e : Ko();
|
|
4775
4796
|
return Xt(t, n), re(t), t;
|
|
4776
4797
|
}
|
|
@@ -4787,18 +4808,18 @@ function Kt(n) {
|
|
|
4787
4808
|
}
|
|
4788
4809
|
function ki(n, e = "root") {
|
|
4789
4810
|
const t = [n];
|
|
4790
|
-
for (let r =
|
|
4811
|
+
for (let r = he(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(Kt(r));
|
|
4791
4812
|
return t;
|
|
4792
4813
|
}
|
|
4793
|
-
function
|
|
4814
|
+
function Bn(n) {
|
|
4794
4815
|
return !!n && n.origin.isAttached();
|
|
4795
4816
|
}
|
|
4796
|
-
function
|
|
4817
|
+
function yl(n, e = "removeEmptySlices") {
|
|
4797
4818
|
if (n.isCollapsed()) return n;
|
|
4798
4819
|
const t = "root", r = "next";
|
|
4799
4820
|
let i = e;
|
|
4800
4821
|
const s = As(n, r), o = ki(s.anchor, t), l = ki(s.focus.getFlipped(), t), a = /* @__PURE__ */ new Set(), c = [];
|
|
4801
|
-
for (const h of s.iterNodeCarets(t)) if (
|
|
4822
|
+
for (const h of s.iterNodeCarets(t)) if (he(h)) a.add(h.origin.getKey());
|
|
4802
4823
|
else if (at(h)) {
|
|
4803
4824
|
const { origin: _ } = h;
|
|
4804
4825
|
v(_) && !a.has(_.getKey()) || c.push(_);
|
|
@@ -4813,18 +4834,18 @@ function pl(n, e = "removeEmptySlices") {
|
|
|
4813
4834
|
let m = h.removeTextSlice();
|
|
4814
4835
|
const b = h.caret.origin;
|
|
4815
4836
|
if (y === "segmented") {
|
|
4816
|
-
const N = m.origin,
|
|
4817
|
-
x.replaceOrInsert(
|
|
4837
|
+
const N = m.origin, S = V(N.getTextContent()).setStyle(N.getStyle()).setFormat(N.getFormat());
|
|
4838
|
+
x.replaceOrInsert(S), m = Ve(S, r, m.offset);
|
|
4818
4839
|
}
|
|
4819
4840
|
b.is(o[0].origin) && (o[0] = m), b.is(l[0].origin) && (l[0] = m.getFlipped());
|
|
4820
4841
|
}
|
|
4821
4842
|
}
|
|
4822
4843
|
let u, d;
|
|
4823
|
-
for (const h of o) if (
|
|
4844
|
+
for (const h of o) if (Bn(h)) {
|
|
4824
4845
|
u = fe(h);
|
|
4825
4846
|
break;
|
|
4826
4847
|
}
|
|
4827
|
-
for (const h of l) if (
|
|
4848
|
+
for (const h of l) if (Bn(h)) {
|
|
4828
4849
|
d = fe(h);
|
|
4829
4850
|
break;
|
|
4830
4851
|
}
|
|
@@ -4837,34 +4858,34 @@ function pl(n, e = "removeEmptySlices") {
|
|
|
4837
4858
|
const b = y.getParents().reverse();
|
|
4838
4859
|
b.push(y);
|
|
4839
4860
|
const N = Math.min(m.length, b.length);
|
|
4840
|
-
let
|
|
4841
|
-
for (
|
|
4861
|
+
let S;
|
|
4862
|
+
for (S = 0; S < N && m[S] === b[S]; S++) ;
|
|
4842
4863
|
const w = (O, D) => {
|
|
4843
4864
|
let z;
|
|
4844
|
-
for (let F =
|
|
4865
|
+
for (let F = S; F < O.length; F++) {
|
|
4845
4866
|
const I = O[F];
|
|
4846
4867
|
if (De(I)) return;
|
|
4847
4868
|
!z && D(I) && (z = I);
|
|
4848
4869
|
}
|
|
4849
4870
|
return z;
|
|
4850
|
-
}, k = w(m,
|
|
4851
|
-
return k &&
|
|
4871
|
+
}, k = w(m, Ne), C = k && w(b, (O) => p.has(O.getKey()) && Ne(O));
|
|
4872
|
+
return k && C ? [k, C] : null;
|
|
4852
4873
|
})(u, d, a);
|
|
4853
4874
|
if (f) {
|
|
4854
4875
|
const [h, _] = f;
|
|
4855
4876
|
Ae(h, "previous").splice(0, _.getChildren()), _.remove();
|
|
4856
4877
|
}
|
|
4857
|
-
const g = [u, d, ...o, ...l].find(
|
|
4878
|
+
const g = [u, d, ...o, ...l].find(Bn);
|
|
4858
4879
|
if (g)
|
|
4859
|
-
return
|
|
4880
|
+
return _l(qe(fe(g), n.direction));
|
|
4860
4881
|
T(269, JSON.stringify(o.map((h) => h.origin.__key)));
|
|
4861
4882
|
}
|
|
4862
4883
|
function fe(n) {
|
|
4863
4884
|
const e = (function(i) {
|
|
4864
4885
|
let s = i;
|
|
4865
|
-
for (;
|
|
4886
|
+
for (; he(s); ) {
|
|
4866
4887
|
const o = Sr(s);
|
|
4867
|
-
if (!
|
|
4888
|
+
if (!he(o)) break;
|
|
4868
4889
|
s = o;
|
|
4869
4890
|
}
|
|
4870
4891
|
return s;
|
|
@@ -4873,8 +4894,8 @@ function fe(n) {
|
|
|
4873
4894
|
const r = e.getAdjacentCaret();
|
|
4874
4895
|
return at(r) && M(r.origin) ? Ve(r.origin, t, Xe(t)) : e;
|
|
4875
4896
|
}
|
|
4876
|
-
function
|
|
4877
|
-
return Me(n) && n.offset !==
|
|
4897
|
+
function ml(n) {
|
|
4898
|
+
return Me(n) && n.offset !== ge(n.origin, n.direction);
|
|
4878
4899
|
}
|
|
4879
4900
|
function qe(n, e) {
|
|
4880
4901
|
return n.direction === e ? n : n.getFlipped();
|
|
@@ -4882,7 +4903,7 @@ function qe(n, e) {
|
|
|
4882
4903
|
function As(n, e) {
|
|
4883
4904
|
return n.direction === e ? n : Ye(qe(n.focus, e), qe(n.anchor, e));
|
|
4884
4905
|
}
|
|
4885
|
-
function
|
|
4906
|
+
function xl(n, e, t) {
|
|
4886
4907
|
let r = Ae(n, "next");
|
|
4887
4908
|
for (let i = 0; i < e; i++) {
|
|
4888
4909
|
const s = r.getAdjacentCaret();
|
|
@@ -4891,22 +4912,22 @@ function ml(n, e, t) {
|
|
|
4891
4912
|
}
|
|
4892
4913
|
return qe(r, t);
|
|
4893
4914
|
}
|
|
4894
|
-
function
|
|
4915
|
+
function Cl(n) {
|
|
4895
4916
|
const { origin: e, offset: t, direction: r } = n;
|
|
4896
|
-
if (t ===
|
|
4897
|
-
if (t ===
|
|
4917
|
+
if (t === ge(e, r)) return n.getSiblingCaret();
|
|
4918
|
+
if (t === ge(e, Xe(r))) return Kt(n.getSiblingCaret());
|
|
4898
4919
|
const [i] = e.splitText(t);
|
|
4899
4920
|
return M(i) || T(281), qe(q(i, "next"), r);
|
|
4900
4921
|
}
|
|
4901
|
-
function
|
|
4922
|
+
function Sl(n, e) {
|
|
4902
4923
|
return !0;
|
|
4903
4924
|
}
|
|
4904
|
-
function
|
|
4925
|
+
function Ql(n, { $copyElementNode: e = Zo, $splitTextPointCaretNext: t = Cl, rootMode: r = "shadowRoot", $shouldSplit: i = Sl } = {}) {
|
|
4905
4926
|
if (Me(n)) return t(n);
|
|
4906
4927
|
const s = n.getParentCaret(r);
|
|
4907
4928
|
if (s) {
|
|
4908
4929
|
const { origin: o } = s;
|
|
4909
|
-
if (
|
|
4930
|
+
if (he(n) && (!o.canBeEmpty() || !i(o, "first"))) return Kt(s);
|
|
4910
4931
|
const l = (function(a) {
|
|
4911
4932
|
const c = [];
|
|
4912
4933
|
for (let u = a.getAdjacentCaret(); u; u = u.getAdjacentCaret()) c.push(u.origin);
|
|
@@ -4916,153 +4937,153 @@ function Xl(n, { $copyElementNode: e = Qo, $splitTextPointCaretNext: t = xl, roo
|
|
|
4916
4937
|
}
|
|
4917
4938
|
return s;
|
|
4918
4939
|
}
|
|
4919
|
-
function
|
|
4940
|
+
function Zl(n) {
|
|
4920
4941
|
return n;
|
|
4921
4942
|
}
|
|
4922
|
-
function
|
|
4943
|
+
function ea(...n) {
|
|
4923
4944
|
return n;
|
|
4924
4945
|
}
|
|
4925
|
-
function
|
|
4946
|
+
function ta(n) {
|
|
4926
4947
|
return n;
|
|
4927
4948
|
}
|
|
4928
|
-
function
|
|
4949
|
+
function na(n, e) {
|
|
4929
4950
|
if (!e || n === e) return n;
|
|
4930
4951
|
for (const t in e) if (n[t] !== e[t]) return { ...n, ...e };
|
|
4931
4952
|
return n;
|
|
4932
4953
|
}
|
|
4933
4954
|
export {
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4955
|
+
Ki as $,
|
|
4956
|
+
ut as A,
|
|
4957
|
+
co as B,
|
|
4958
|
+
At as C,
|
|
4959
|
+
Xl as D,
|
|
4960
|
+
fe as E,
|
|
4961
|
+
lo as F,
|
|
4962
|
+
so as G,
|
|
4963
|
+
jl as H,
|
|
4964
|
+
jo as I,
|
|
4965
|
+
go as J,
|
|
4966
|
+
Rl as K,
|
|
4967
|
+
Ee as L,
|
|
4968
|
+
sn as M,
|
|
4969
|
+
on as N,
|
|
4970
|
+
rn as O,
|
|
4971
|
+
ho as P,
|
|
4972
|
+
_o as Q,
|
|
4973
|
+
Re as R,
|
|
4974
|
+
v as S,
|
|
4975
|
+
uo as T,
|
|
4976
|
+
Ji as U,
|
|
4977
|
+
Nl as V,
|
|
4957
4978
|
pt as W,
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4979
|
+
ct as X,
|
|
4980
|
+
po as Y,
|
|
4981
|
+
So as Z,
|
|
4982
|
+
Ie as _,
|
|
4983
|
+
ee as a,
|
|
4963
4984
|
xo as a$,
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4985
|
+
re as a0,
|
|
4986
|
+
ve as a1,
|
|
4987
|
+
Il as a2,
|
|
4988
|
+
Ko as a3,
|
|
4989
|
+
H as a4,
|
|
4990
|
+
He as a5,
|
|
4991
|
+
ml as a6,
|
|
4992
|
+
ws as a7,
|
|
4993
|
+
at as a8,
|
|
4994
|
+
he as a9,
|
|
4995
|
+
Ll as aA,
|
|
4975
4996
|
yi as aB,
|
|
4976
|
-
|
|
4997
|
+
rl as aC,
|
|
4977
4998
|
gs as aD,
|
|
4978
|
-
|
|
4979
|
-
|
|
4999
|
+
nl as aE,
|
|
5000
|
+
lr as aF,
|
|
4980
5001
|
Wi as aG,
|
|
4981
5002
|
Ye as aH,
|
|
4982
|
-
|
|
5003
|
+
zl as aI,
|
|
4983
5004
|
mn as aJ,
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
5005
|
+
Ul as aK,
|
|
5006
|
+
na as aL,
|
|
5007
|
+
Zl as aM,
|
|
4987
5008
|
Pt as aN,
|
|
4988
5009
|
Et as aO,
|
|
4989
5010
|
Mt as aP,
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
5011
|
+
ta as aQ,
|
|
5012
|
+
Bl as aR,
|
|
5013
|
+
An as aS,
|
|
5014
|
+
ql as aT,
|
|
4994
5015
|
ps as aU,
|
|
4995
|
-
|
|
5016
|
+
ar as aV,
|
|
4996
5017
|
fo as aW,
|
|
4997
5018
|
_s as aX,
|
|
4998
|
-
|
|
5019
|
+
Fl as aY,
|
|
4999
5020
|
Br as aZ,
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5021
|
+
Yl as a_,
|
|
5022
|
+
q as aa,
|
|
5023
|
+
Sr as ab,
|
|
5024
|
+
Ft as ac,
|
|
5025
|
+
zi as ad,
|
|
5026
|
+
$l as ae,
|
|
5027
|
+
Jl as af,
|
|
5007
5028
|
Es as ag,
|
|
5008
5029
|
ie as ah,
|
|
5009
|
-
|
|
5010
|
-
|
|
5030
|
+
pl as ai,
|
|
5031
|
+
_l as aj,
|
|
5011
5032
|
qe as ak,
|
|
5012
|
-
|
|
5033
|
+
Ql as al,
|
|
5013
5034
|
Me as am,
|
|
5014
5035
|
B as an,
|
|
5015
|
-
|
|
5036
|
+
be as ao,
|
|
5016
5037
|
qr as ap,
|
|
5017
|
-
|
|
5018
|
-
|
|
5038
|
+
Gl as aq,
|
|
5039
|
+
Ne as ar,
|
|
5019
5040
|
io as as,
|
|
5020
|
-
|
|
5021
|
-
|
|
5041
|
+
Ol as at,
|
|
5042
|
+
Ml as au,
|
|
5022
5043
|
Bi as av,
|
|
5023
5044
|
Ri as aw,
|
|
5024
|
-
|
|
5045
|
+
Yo as ax,
|
|
5025
5046
|
Wo as ay,
|
|
5026
5047
|
bt as az,
|
|
5027
|
-
|
|
5048
|
+
L as b,
|
|
5028
5049
|
mo as b0,
|
|
5029
5050
|
yo as b1,
|
|
5030
|
-
|
|
5051
|
+
qn as b2,
|
|
5031
5052
|
Vt as b3,
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5053
|
+
bl as b4,
|
|
5054
|
+
qo as b5,
|
|
5055
|
+
Tl as b6,
|
|
5056
|
+
kl as b7,
|
|
5057
|
+
Kl as b8,
|
|
5037
5058
|
zr as b9,
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5059
|
+
El as ba,
|
|
5060
|
+
wl as bb,
|
|
5061
|
+
Pl as bc,
|
|
5062
|
+
Dl as bd,
|
|
5063
|
+
ea as be,
|
|
5064
|
+
Kr as c,
|
|
5044
5065
|
qt as d,
|
|
5045
5066
|
De as e,
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
+
vn as f,
|
|
5068
|
+
wt as g,
|
|
5069
|
+
Vl as h,
|
|
5070
|
+
Ae as i,
|
|
5071
|
+
Hl as j,
|
|
5072
|
+
rt as k,
|
|
5073
|
+
M as l,
|
|
5074
|
+
il as m,
|
|
5075
|
+
_e as n,
|
|
5076
|
+
Wn as o,
|
|
5077
|
+
ro as p,
|
|
5078
|
+
vl as q,
|
|
5079
|
+
P as r,
|
|
5080
|
+
V as s,
|
|
5081
|
+
Ot as t,
|
|
5082
|
+
It as u,
|
|
5083
|
+
hr as v,
|
|
5084
|
+
Al as w,
|
|
5085
|
+
U as x,
|
|
5086
|
+
A as y,
|
|
5087
|
+
Wl as z
|
|
5067
5088
|
};
|
|
5068
|
-
//# sourceMappingURL=Lexical.prod-
|
|
5089
|
+
//# sourceMappingURL=Lexical.prod-sd_e2sqT.js.map
|