@harbour-enterprises/superdoc 0.11.18 → 0.11.20
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/chunks/{super-editor.es-DE2LvQ4V.es.js → super-editor.es-Du1kHoDA.es.js} +492 -476
- package/dist/chunks/{super-editor.es-D8ziHk1x.cjs → super-editor.es-DvREqt6O.cjs} +25 -25
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{converter-B25jWkqJ.js → converter-CwMvN1V7.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-DNmQADIe.js → docx-zipper-CW3YnwaW.js} +1 -1
- package/dist/super-editor/chunks/{editor-DKyTaWEI.js → editor-CR8riiuL.js} +538 -522
- package/dist/super-editor/chunks/{toolbar-C6UiTU1Z.js → toolbar-BZ4Xi416.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/extensions/keymap.d.ts +3 -3
- package/dist/super-editor/core/extensions/keymap.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/search/search.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +476 -460
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,9 +7,9 @@ var R = (t, e, n) => Pf(t, typeof e != "symbol" ? e + "" : e, n), Zo = (t, e, n)
|
|
|
7
7
|
var Qe = (t, e, n) => (Zo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? aa("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Qo = (t, e, n, r) => (Zo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), N = (t, e, n) => (Zo(t, e, "access private method"), n);
|
|
8
8
|
import * as D from "yjs";
|
|
9
9
|
import { UndoManager as If, Item as Rf, ContentType as Lf, Text as Ff, XmlElement as Bf } from "yjs";
|
|
10
|
-
import { P as
|
|
10
|
+
import { P as K, a as X, M as fr, c as Y, N as _, S as ee, T as j, b as W, D as Hn, F as T, d as rn, e as zf, f as fc, A as Er, p as oe, B as $f, i as _f, g as pc, h as Vf, j as wt, l as Nr, k as jt, m as hc, r as mc, R as ln, o as pr, n as la, q as Vt, s as Ti, t as gc, u as Hf, v as jf, w as de, x as Ve, y as Pr, z as xn, C as So, E as Wf, G as Se, H as uo, I as yc, J as Sn, K as ei, L as ti, O as ni, Q as fo, U as Rt, V as _o, W as Uf, X as ca, Y as da, Z as qf, _ as Kf, $ as Xf } from "./converter-CwMvN1V7.js";
|
|
11
11
|
import { ref as ua, computed as Jf, createElementBlock as Xt, openBlock as Jt, withModifiers as ri, Fragment as Yf, renderList as Gf, normalizeClass as Zf, createCommentVNode as fa, toDisplayString as oi, createElementVNode as Qf, createApp as ep } from "vue";
|
|
12
|
-
import { D as pa } from "./docx-zipper-
|
|
12
|
+
import { D as pa } from "./docx-zipper-CW3YnwaW.js";
|
|
13
13
|
function Vo(t) {
|
|
14
14
|
const { from: e, to: n, empty: r } = t.selection, o = [];
|
|
15
15
|
return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
|
|
@@ -70,10 +70,10 @@ function np(t) {
|
|
|
70
70
|
return {};
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
var
|
|
73
|
+
var Co = 200, ue = function() {
|
|
74
74
|
};
|
|
75
75
|
ue.prototype.append = function(e) {
|
|
76
|
-
return e.length ? (e = ue.from(e), !this.length && e || e.length <
|
|
76
|
+
return e.length ? (e = ue.from(e), !this.length && e || e.length < Co && this.leafAppend(e) || this.length < Co && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
77
77
|
};
|
|
78
78
|
ue.prototype.prepend = function(e) {
|
|
79
79
|
return e.length ? ue.from(e).append(this) : this;
|
|
@@ -122,10 +122,10 @@ var bc = /* @__PURE__ */ function(t) {
|
|
|
122
122
|
if (o(this.values[l], a + l) === !1)
|
|
123
123
|
return !1;
|
|
124
124
|
}, e.prototype.leafAppend = function(o) {
|
|
125
|
-
if (this.length + o.length <=
|
|
125
|
+
if (this.length + o.length <= Co)
|
|
126
126
|
return new e(this.values.concat(o.flatten()));
|
|
127
127
|
}, e.prototype.leafPrepend = function(o) {
|
|
128
|
-
if (this.length + o.length <=
|
|
128
|
+
if (this.length + o.length <= Co)
|
|
129
129
|
return new e(o.flatten().concat(this.values));
|
|
130
130
|
}, n.length.get = function() {
|
|
131
131
|
return this.values.length;
|
|
@@ -315,10 +315,10 @@ function ap(t, e, n, r) {
|
|
|
315
315
|
if (n.steps.length == 0)
|
|
316
316
|
return t;
|
|
317
317
|
if (s && s.getMeta(vt))
|
|
318
|
-
return s.getMeta(vt).redo ? new Tt(t.done.addTransform(n, void 0, r,
|
|
318
|
+
return s.getMeta(vt).redo ? new Tt(t.done.addTransform(n, void 0, r, po(e)), t.undone, ma(n.mapping.maps), t.prevTime, t.prevComposition) : new Tt(t.done, t.undone.addTransform(n, void 0, r, po(e)), null, t.prevTime, t.prevComposition);
|
|
319
319
|
if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
|
|
320
320
|
let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !lp(n, t.prevRanges)), c = s ? ii(t.prevRanges, n.mapping) : ma(n.mapping.maps);
|
|
321
|
-
return new Tt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r,
|
|
321
|
+
return new Tt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, po(e)), Ye.empty, c, n.time, a ?? t.prevComposition);
|
|
322
322
|
} else return (i = n.getMeta("rebased")) ? new Tt(t.done.rebased(n, i), t.undone.rebased(n, i), ii(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Tt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), ii(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
|
|
323
323
|
}
|
|
324
324
|
function lp(t, e) {
|
|
@@ -349,14 +349,14 @@ function ii(t, e) {
|
|
|
349
349
|
return n;
|
|
350
350
|
}
|
|
351
351
|
function cp(t, e, n) {
|
|
352
|
-
let r =
|
|
352
|
+
let r = po(e), o = vt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
|
|
353
353
|
if (!i)
|
|
354
354
|
return null;
|
|
355
355
|
let s = i.selection.resolve(i.transform.doc), a = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), l = new Tt(n ? a : i.remaining, n ? i.remaining : a, null, 0, -1);
|
|
356
356
|
return i.transform.setSelection(s).setMeta(vt, { redo: n, historyState: l });
|
|
357
357
|
}
|
|
358
358
|
let si = !1, ga = null;
|
|
359
|
-
function
|
|
359
|
+
function po(t) {
|
|
360
360
|
let e = t.plugins;
|
|
361
361
|
if (ga != e) {
|
|
362
362
|
si = !1, ga = e;
|
|
@@ -368,12 +368,12 @@ function fo(t) {
|
|
|
368
368
|
}
|
|
369
369
|
return si;
|
|
370
370
|
}
|
|
371
|
-
const vt = new
|
|
371
|
+
const vt = new K("history"), dp = new K("closeHistory");
|
|
372
372
|
function up(t = {}) {
|
|
373
373
|
return t = {
|
|
374
374
|
depth: t.depth || 100,
|
|
375
375
|
newGroupDelay: t.newGroupDelay || 500
|
|
376
|
-
}, new
|
|
376
|
+
}, new X({
|
|
377
377
|
key: vt,
|
|
378
378
|
state: {
|
|
379
379
|
init() {
|
|
@@ -430,11 +430,11 @@ class Z {
|
|
|
430
430
|
this.config = {
|
|
431
431
|
...this.config,
|
|
432
432
|
...e
|
|
433
|
-
}, this.name = this.config.name, this.config.addOptions && (this.options =
|
|
433
|
+
}, this.name = this.config.name, this.config.addOptions && (this.options = Y(
|
|
434
434
|
I(this, "addOptions", {
|
|
435
435
|
name: this.name
|
|
436
436
|
})
|
|
437
|
-
)), this.storage =
|
|
437
|
+
)), this.storage = Y(
|
|
438
438
|
I(this, "addStorage", {
|
|
439
439
|
name: this.name,
|
|
440
440
|
options: this.options
|
|
@@ -497,7 +497,7 @@ function ya(t, e, n, r, o) {
|
|
|
497
497
|
return !0;
|
|
498
498
|
if (e == (o < 0 ? 0 : _e(t))) {
|
|
499
499
|
let i = t.parentNode;
|
|
500
|
-
if (!i || i.nodeType != 1 ||
|
|
500
|
+
if (!i || i.nodeType != 1 || Ir(t) || pp.test(t.nodeName) || t.contentEditable == "false")
|
|
501
501
|
return !1;
|
|
502
502
|
e = ye(t) + (o < 0 ? 0 : 1), t = i;
|
|
503
503
|
} else if (t.nodeType == 1) {
|
|
@@ -519,7 +519,7 @@ function hp(t, e) {
|
|
|
519
519
|
if (t.contentEditable == "false")
|
|
520
520
|
return null;
|
|
521
521
|
t = t.childNodes[e - 1], e = _e(t);
|
|
522
|
-
} else if (t.parentNode && !
|
|
522
|
+
} else if (t.parentNode && !Ir(t))
|
|
523
523
|
e = ye(t), t = t.parentNode;
|
|
524
524
|
else
|
|
525
525
|
return null;
|
|
@@ -533,7 +533,7 @@ function mp(t, e) {
|
|
|
533
533
|
if (t.contentEditable == "false")
|
|
534
534
|
return null;
|
|
535
535
|
t = t.childNodes[e], e = 0;
|
|
536
|
-
} else if (t.parentNode && !
|
|
536
|
+
} else if (t.parentNode && !Ir(t))
|
|
537
537
|
e = ye(t) + 1, t = t.parentNode;
|
|
538
538
|
else
|
|
539
539
|
return null;
|
|
@@ -549,7 +549,7 @@ function gp(t, e, n) {
|
|
|
549
549
|
r = r && i == 0, o = o && i == _e(t);
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function Ir(t) {
|
|
553
553
|
let e;
|
|
554
554
|
for (let n = t; n && !(e = n.pmViewDesc); n = n.parentNode)
|
|
555
555
|
;
|
|
@@ -584,7 +584,7 @@ function bp(t, e, n) {
|
|
|
584
584
|
}
|
|
585
585
|
const st = typeof navigator < "u" ? navigator : null, ba = typeof document < "u" ? document : null, Wt = st && st.userAgent || "", Ei = /Edge\/(\d+)/.exec(Wt), Sc = /MSIE \d/.exec(Wt), Ni = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wt), De = !!(Sc || Ni || Ei), Lt = Sc ? document.documentMode : Ni ? +Ni[1] : Ei ? +Ei[1] : 0, Ge = !De && /gecko\/(\d+)/i.test(Wt);
|
|
586
586
|
Ge && +(/Firefox\/(\d+)/.exec(Wt) || [0, 0])[1];
|
|
587
|
-
const Pi = !De && /Chrome\/(\d+)/.exec(Wt), ve = !!Pi, Cc = Pi ? +Pi[1] : 0, Ce = !De && !!st && /Apple Computer/.test(st.vendor), En = Ce && (/Mobile\/\w+/.test(Wt) || !!st && st.maxTouchPoints > 2), $e = En || (st ? /Mac/.test(st.platform) : !1), wp = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(Wt),
|
|
587
|
+
const Pi = !De && /Chrome\/(\d+)/.exec(Wt), ve = !!Pi, Cc = Pi ? +Pi[1] : 0, Ce = !De && !!st && /Apple Computer/.test(st.vendor), En = Ce && (/Mobile\/\w+/.test(Wt) || !!st && st.maxTouchPoints > 2), $e = En || (st ? /Mac/.test(st.platform) : !1), wp = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(Wt), Rr = !!ba && "webkitFontSmoothing" in ba.documentElement.style, vp = Rr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
588
588
|
function kp(t) {
|
|
589
589
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
590
590
|
return e ? {
|
|
@@ -779,7 +779,7 @@ function Ep(t, e) {
|
|
|
779
779
|
d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && o++;
|
|
780
780
|
}
|
|
781
781
|
let c;
|
|
782
|
-
|
|
782
|
+
Rr && o && r.nodeType == 1 && (c = r.childNodes[o - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && o--, r == t.dom && o == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = t.state.doc.content.size : (o == 0 || r.nodeType != 1 || r.childNodes[o - 1].nodeName != "BR") && (a = Dp(t, r, o, e));
|
|
783
783
|
}
|
|
784
784
|
a == null && (a = Tp(t, s, e));
|
|
785
785
|
let l = t.docView.nearestDesc(s, !0);
|
|
@@ -799,7 +799,7 @@ function Ot(t, e) {
|
|
|
799
799
|
}
|
|
800
800
|
const Np = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
801
801
|
function Dc(t, e, n) {
|
|
802
|
-
let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s =
|
|
802
|
+
let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Rr || Ge;
|
|
803
803
|
if (r.nodeType == 3)
|
|
804
804
|
if (s && (Np.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
|
|
805
805
|
let l = Ot(mt(r, o, o), n);
|
|
@@ -919,7 +919,7 @@ function Lp(t, e, n) {
|
|
|
919
919
|
return ka == e && xa == n ? Sa : (ka = e, xa = n, Sa = n == "up" || n == "down" ? Pp(t, e, n) : Rp(t, e, n));
|
|
920
920
|
}
|
|
921
921
|
const He = 0, Ca = 1, en = 2, at = 3;
|
|
922
|
-
class
|
|
922
|
+
class Lr {
|
|
923
923
|
constructor(e, n, r, o) {
|
|
924
924
|
this.parent = e, this.children = n, this.dom = r, this.contentDOM = o, this.dirty = He, r.pmViewDesc = this;
|
|
925
925
|
}
|
|
@@ -1260,7 +1260,7 @@ class Rr {
|
|
|
1260
1260
|
return !1;
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
|
-
class Nc extends
|
|
1263
|
+
class Nc extends Lr {
|
|
1264
1264
|
constructor(e, n, r, o) {
|
|
1265
1265
|
let i, s = n.type.toDOM;
|
|
1266
1266
|
if (typeof s == "function" && (s = s(r, () => {
|
|
@@ -1300,7 +1300,7 @@ class Nc extends Rr {
|
|
|
1300
1300
|
return this.widget.type.side;
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
class Fp extends
|
|
1303
|
+
class Fp extends Lr {
|
|
1304
1304
|
constructor(e, n, r, o) {
|
|
1305
1305
|
super(e, [], n, null), this.textDOM = r, this.text = o;
|
|
1306
1306
|
}
|
|
@@ -1317,7 +1317,7 @@ class Fp extends Rr {
|
|
|
1317
1317
|
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
class dn extends
|
|
1320
|
+
class dn extends Lr {
|
|
1321
1321
|
constructor(e, n, r, o, i) {
|
|
1322
1322
|
super(e, [], r, o), this.mark = n, this.spec = i;
|
|
1323
1323
|
}
|
|
@@ -1353,7 +1353,7 @@ class dn extends Rr {
|
|
|
1353
1353
|
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
|
-
class Ft extends
|
|
1356
|
+
class Ft extends Lr {
|
|
1357
1357
|
constructor(e, n, r, o, i, s, a, l, c) {
|
|
1358
1358
|
super(e, [], i, s), this.node = n, this.outerDeco = r, this.innerDeco = o, this.nodeDOM = a;
|
|
1359
1359
|
}
|
|
@@ -1404,7 +1404,7 @@ class Ft extends Rr {
|
|
|
1404
1404
|
return e;
|
|
1405
1405
|
}
|
|
1406
1406
|
matchesNode(e, n, r) {
|
|
1407
|
-
return this.dirty == He && e.eq(this.node) &&
|
|
1407
|
+
return this.dirty == He && e.eq(this.node) && Mo(n, this.outerDeco) && r.eq(this.innerDeco);
|
|
1408
1408
|
}
|
|
1409
1409
|
get size() {
|
|
1410
1410
|
return this.node.nodeSize;
|
|
@@ -1462,7 +1462,7 @@ class Ft extends Rr {
|
|
|
1462
1462
|
this.updateOuterDeco(n), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(o, this.posAtStart), this.dirty = He;
|
|
1463
1463
|
}
|
|
1464
1464
|
updateOuterDeco(e) {
|
|
1465
|
-
if (
|
|
1465
|
+
if (Mo(e, this.outerDeco))
|
|
1466
1466
|
return;
|
|
1467
1467
|
let n = this.nodeDOM.nodeType != 1, r = this.dom;
|
|
1468
1468
|
this.dom = Rc(this.dom, this.nodeDOM, Ii(this.outerDeco, this.node, n), Ii(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
@@ -1527,7 +1527,7 @@ class Wo extends Ft {
|
|
|
1527
1527
|
return this.node.text == e;
|
|
1528
1528
|
}
|
|
1529
1529
|
}
|
|
1530
|
-
class Pc extends
|
|
1530
|
+
class Pc extends Lr {
|
|
1531
1531
|
parseRule() {
|
|
1532
1532
|
return { ignore: !0 };
|
|
1533
1533
|
}
|
|
@@ -1654,7 +1654,7 @@ function zp(t, e, n) {
|
|
|
1654
1654
|
function Lc(t, e, n) {
|
|
1655
1655
|
return Rc(t, t, tn, Ii(e, n, t.nodeType != 1));
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function Mo(t, e) {
|
|
1658
1658
|
if (t.length != e.length)
|
|
1659
1659
|
return !1;
|
|
1660
1660
|
for (let n = 0; n < t.length; n++)
|
|
@@ -1756,7 +1756,7 @@ class $p {
|
|
|
1756
1756
|
let c = this.preMatch.matched.get(l);
|
|
1757
1757
|
if (c != null && c != i)
|
|
1758
1758
|
return !1;
|
|
1759
|
-
let d = l.dom, u, f = this.isLocked(d) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != at &&
|
|
1759
|
+
let d = l.dom, u, f = this.isLocked(d) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != at && Mo(n, l.outerDeco));
|
|
1760
1760
|
if (!f && l.update(e, n, r, o))
|
|
1761
1761
|
return this.destroyBetween(this.index, a), l.dom != d && (this.changed = !0), this.index++, !0;
|
|
1762
1762
|
if (!f && (u = this.recreateWrapper(l, e, n, r, o, s)))
|
|
@@ -1769,7 +1769,7 @@ class $p {
|
|
|
1769
1769
|
// When a node with content is replaced by a different node with
|
|
1770
1770
|
// identical content, move over its children.
|
|
1771
1771
|
recreateWrapper(e, n, r, o, i, s) {
|
|
1772
|
-
if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !
|
|
1772
|
+
if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !Mo(r, e.outerDeco) || !o.eq(e.innerDeco))
|
|
1773
1773
|
return null;
|
|
1774
1774
|
let a = Ft.create(this.top, n, r, o, i, s);
|
|
1775
1775
|
if (a.contentDOM) {
|
|
@@ -2082,7 +2082,7 @@ function Pa(t, e, n) {
|
|
|
2082
2082
|
if (!i || i.isText)
|
|
2083
2083
|
return !1;
|
|
2084
2084
|
let a = e < 0 ? o.pos - i.nodeSize : o.pos;
|
|
2085
|
-
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? _.isSelectable(i) ? Dt(t, new _(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) :
|
|
2085
|
+
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? _.isSelectable(i) ? Dt(t, new _(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Rr ? Dt(t, new j(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
|
|
2086
2086
|
}
|
|
2087
2087
|
} else return !1;
|
|
2088
2088
|
else {
|
|
@@ -2094,7 +2094,7 @@ function Pa(t, e, n) {
|
|
|
2094
2094
|
}
|
|
2095
2095
|
}
|
|
2096
2096
|
}
|
|
2097
|
-
function
|
|
2097
|
+
function Ao(t) {
|
|
2098
2098
|
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
2099
2099
|
}
|
|
2100
2100
|
function rr(t, e) {
|
|
@@ -2109,7 +2109,7 @@ function Xp(t) {
|
|
|
2109
2109
|
if (!n)
|
|
2110
2110
|
return;
|
|
2111
2111
|
let o, i, s = !1;
|
|
2112
|
-
for (Ge && n.nodeType == 1 && r <
|
|
2112
|
+
for (Ge && n.nodeType == 1 && r < Ao(n) && rr(n.childNodes[r], -1) && (s = !0); ; )
|
|
2113
2113
|
if (r > 0) {
|
|
2114
2114
|
if (n.nodeType != 1)
|
|
2115
2115
|
break;
|
|
@@ -2130,7 +2130,7 @@ function Xp(t) {
|
|
|
2130
2130
|
for (; a && rr(a, -1); )
|
|
2131
2131
|
o = n.parentNode, i = ye(a), a = a.previousSibling;
|
|
2132
2132
|
if (a)
|
|
2133
|
-
n = a, r =
|
|
2133
|
+
n = a, r = Ao(n);
|
|
2134
2134
|
else {
|
|
2135
2135
|
if (n = n.parentNode, n == t.dom)
|
|
2136
2136
|
break;
|
|
@@ -2144,7 +2144,7 @@ function Jp(t) {
|
|
|
2144
2144
|
let e = t.domSelectionRange(), n = e.focusNode, r = e.focusOffset;
|
|
2145
2145
|
if (!n)
|
|
2146
2146
|
return;
|
|
2147
|
-
let o =
|
|
2147
|
+
let o = Ao(n), i, s;
|
|
2148
2148
|
for (; ; )
|
|
2149
2149
|
if (r < o) {
|
|
2150
2150
|
if (n.nodeType != 1)
|
|
@@ -2162,7 +2162,7 @@ function Jp(t) {
|
|
|
2162
2162
|
for (; a && rr(a, 1); )
|
|
2163
2163
|
i = a.parentNode, s = ye(a) + 1, a = a.nextSibling;
|
|
2164
2164
|
if (a)
|
|
2165
|
-
n = a, r = 0, o =
|
|
2165
|
+
n = a, r = 0, o = Ao(n);
|
|
2166
2166
|
else {
|
|
2167
2167
|
if (n = n.parentNode, n == t.dom)
|
|
2168
2168
|
break;
|
|
@@ -2177,7 +2177,7 @@ function $c(t) {
|
|
|
2177
2177
|
return e && e.node && e.node.isBlock;
|
|
2178
2178
|
}
|
|
2179
2179
|
function Yp(t, e) {
|
|
2180
|
-
for (; t && e == t.childNodes.length && !
|
|
2180
|
+
for (; t && e == t.childNodes.length && !Ir(t); )
|
|
2181
2181
|
e = ye(t) + 1, t = t.parentNode;
|
|
2182
2182
|
for (; t && e < t.childNodes.length; ) {
|
|
2183
2183
|
let n = t.childNodes[e];
|
|
@@ -2189,7 +2189,7 @@ function Yp(t, e) {
|
|
|
2189
2189
|
}
|
|
2190
2190
|
}
|
|
2191
2191
|
function Gp(t, e) {
|
|
2192
|
-
for (; t && !e && !
|
|
2192
|
+
for (; t && !e && !Ir(t); )
|
|
2193
2193
|
e = ye(t), t = t.parentNode;
|
|
2194
2194
|
for (; t && e; ) {
|
|
2195
2195
|
let n = t.childNodes[e - 1];
|
|
@@ -2361,7 +2361,7 @@ function _c(t, e, n, r, o) {
|
|
|
2361
2361
|
} else
|
|
2362
2362
|
t.someProp("transformPastedHTML", (u) => {
|
|
2363
2363
|
n = u(n, t);
|
|
2364
|
-
}), s = oh(n),
|
|
2364
|
+
}), s = oh(n), Rr && ih(s);
|
|
2365
2365
|
let c = s && s.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
|
|
2366
2366
|
if (d && d[3])
|
|
2367
2367
|
for (let u = +d[3]; u > 0; u--) {
|
|
@@ -2644,7 +2644,7 @@ function wh(t, e, n) {
|
|
|
2644
2644
|
}
|
|
2645
2645
|
}
|
|
2646
2646
|
function Ns(t) {
|
|
2647
|
-
return
|
|
2647
|
+
return Oo(t);
|
|
2648
2648
|
}
|
|
2649
2649
|
const qc = $e ? "metaKey" : "ctrlKey";
|
|
2650
2650
|
Me.mousedown = (t, e) => {
|
|
@@ -2717,8 +2717,8 @@ Ae.compositionstart = Ae.compositionupdate = (t) => {
|
|
|
2717
2717
|
t.domObserver.flush();
|
|
2718
2718
|
let { state: e } = t, n = e.selection.$to;
|
|
2719
2719
|
if (e.selection instanceof j && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
|
|
2720
|
-
t.markCursor = t.state.storedMarks || n.marks(),
|
|
2721
|
-
else if (
|
|
2720
|
+
t.markCursor = t.state.storedMarks || n.marks(), Oo(t, !0), t.markCursor = null;
|
|
2721
|
+
else if (Oo(t, !e.selection.empty), Ge && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
|
|
2722
2722
|
let r = t.domSelectionRange();
|
|
2723
2723
|
for (let o = r.focusNode, i = r.focusOffset; o && o.nodeType == 1 && i != 0; ) {
|
|
2724
2724
|
let s = i < 0 ? o.lastChild : o.childNodes[i - 1];
|
|
@@ -2740,7 +2740,7 @@ Ae.compositionend = (t, e) => {
|
|
|
2740
2740
|
t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, Xc(t, 20));
|
|
2741
2741
|
};
|
|
2742
2742
|
function Xc(t, e) {
|
|
2743
|
-
clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() =>
|
|
2743
|
+
clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => Oo(t), e));
|
|
2744
2744
|
}
|
|
2745
2745
|
function Jc(t) {
|
|
2746
2746
|
for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = Sh()); t.input.compositionNodes.length > 0; )
|
|
@@ -2769,7 +2769,7 @@ function Sh() {
|
|
|
2769
2769
|
let t = document.createEvent("Event");
|
|
2770
2770
|
return t.initEvent("event", !0, !0), t.timeStamp;
|
|
2771
2771
|
}
|
|
2772
|
-
function
|
|
2772
|
+
function Oo(t, e = !1) {
|
|
2773
2773
|
if (!(bt && t.domObserver.flushingSoon >= 0)) {
|
|
2774
2774
|
if (t.domObserver.forceFlush(), Jc(t), e || t.docView && t.docView.dirty) {
|
|
2775
2775
|
let n = As(t);
|
|
@@ -2937,19 +2937,19 @@ function gr(t, e) {
|
|
|
2937
2937
|
return !1;
|
|
2938
2938
|
return !0;
|
|
2939
2939
|
}
|
|
2940
|
-
class
|
|
2940
|
+
class To {
|
|
2941
2941
|
constructor(e, n) {
|
|
2942
2942
|
this.toDOM = e, this.spec = n || on, this.side = this.spec.side || 0;
|
|
2943
2943
|
}
|
|
2944
2944
|
map(e, n, r, o) {
|
|
2945
2945
|
let { pos: i, deleted: s } = e.mapResult(n.from + o, this.side < 0 ? -1 : 1);
|
|
2946
|
-
return s ? null : new
|
|
2946
|
+
return s ? null : new F(i - r, i - r, this);
|
|
2947
2947
|
}
|
|
2948
2948
|
valid() {
|
|
2949
2949
|
return !0;
|
|
2950
2950
|
}
|
|
2951
2951
|
eq(e) {
|
|
2952
|
-
return this == e || e instanceof
|
|
2952
|
+
return this == e || e instanceof To && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && gr(this.spec, e.spec));
|
|
2953
2953
|
}
|
|
2954
2954
|
destroy(e) {
|
|
2955
2955
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -2961,7 +2961,7 @@ class Bt {
|
|
|
2961
2961
|
}
|
|
2962
2962
|
map(e, n, r, o) {
|
|
2963
2963
|
let i = e.map(n.from + o, this.spec.inclusiveStart ? -1 : 1) - r, s = e.map(n.to + o, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
2964
|
-
return i >= s ? null : new
|
|
2964
|
+
return i >= s ? null : new F(i, s, this);
|
|
2965
2965
|
}
|
|
2966
2966
|
valid(e, n) {
|
|
2967
2967
|
return n.from < n.to;
|
|
@@ -2984,7 +2984,7 @@ class Ps {
|
|
|
2984
2984
|
if (i.deleted)
|
|
2985
2985
|
return null;
|
|
2986
2986
|
let s = e.mapResult(n.to + o, -1);
|
|
2987
|
-
return s.deleted || s.pos <= i.pos ? null : new
|
|
2987
|
+
return s.deleted || s.pos <= i.pos ? null : new F(i.pos - r, s.pos - r, this);
|
|
2988
2988
|
}
|
|
2989
2989
|
valid(e, n) {
|
|
2990
2990
|
let { index: r, offset: o } = e.content.findIndex(n.from), i;
|
|
@@ -2996,7 +2996,7 @@ class Ps {
|
|
|
2996
2996
|
destroy() {
|
|
2997
2997
|
}
|
|
2998
2998
|
}
|
|
2999
|
-
class
|
|
2999
|
+
class F {
|
|
3000
3000
|
/**
|
|
3001
3001
|
@internal
|
|
3002
3002
|
*/
|
|
@@ -3007,7 +3007,7 @@ class z {
|
|
|
3007
3007
|
@internal
|
|
3008
3008
|
*/
|
|
3009
3009
|
copy(e, n) {
|
|
3010
|
-
return new
|
|
3010
|
+
return new F(e, n, this.type);
|
|
3011
3011
|
}
|
|
3012
3012
|
/**
|
|
3013
3013
|
@internal
|
|
@@ -3030,14 +3030,14 @@ class z {
|
|
|
3030
3030
|
widget's current document position.
|
|
3031
3031
|
*/
|
|
3032
3032
|
static widget(e, n, r) {
|
|
3033
|
-
return new
|
|
3033
|
+
return new F(e, e, new To(n, r));
|
|
3034
3034
|
}
|
|
3035
3035
|
/**
|
|
3036
3036
|
Creates an inline decoration, which adds the given attributes to
|
|
3037
3037
|
each inline node between `from` and `to`.
|
|
3038
3038
|
*/
|
|
3039
3039
|
static inline(e, n, r, o) {
|
|
3040
|
-
return new
|
|
3040
|
+
return new F(e, n, new Bt(r, o));
|
|
3041
3041
|
}
|
|
3042
3042
|
/**
|
|
3043
3043
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -3045,7 +3045,7 @@ class z {
|
|
|
3045
3045
|
node, will receive the given attributes.
|
|
3046
3046
|
*/
|
|
3047
3047
|
static node(e, n, r, o) {
|
|
3048
|
-
return new
|
|
3048
|
+
return new F(e, n, new Ps(r, o));
|
|
3049
3049
|
}
|
|
3050
3050
|
/**
|
|
3051
3051
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -3064,7 +3064,7 @@ class z {
|
|
|
3064
3064
|
@internal
|
|
3065
3065
|
*/
|
|
3066
3066
|
get widget() {
|
|
3067
|
-
return this.type instanceof
|
|
3067
|
+
return this.type instanceof To;
|
|
3068
3068
|
}
|
|
3069
3069
|
}
|
|
3070
3070
|
const Cn = [], on = {};
|
|
@@ -3081,7 +3081,7 @@ class P {
|
|
|
3081
3081
|
you must make a copy if you want need to preserve that.
|
|
3082
3082
|
*/
|
|
3083
3083
|
static create(e, n) {
|
|
3084
|
-
return n.length ?
|
|
3084
|
+
return n.length ? Do(n, e, 0, on) : we;
|
|
3085
3085
|
}
|
|
3086
3086
|
/**
|
|
3087
3087
|
Find all decorations in this set which touch the given range
|
|
@@ -3140,7 +3140,7 @@ class P {
|
|
|
3140
3140
|
if (d = ed(n, a, c)) {
|
|
3141
3141
|
for (o || (o = this.children.slice()); i < o.length && o[i] < l; )
|
|
3142
3142
|
i += 3;
|
|
3143
|
-
o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize,
|
|
3143
|
+
o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize, Do(d, a, c + 1, on)), i += 3;
|
|
3144
3144
|
}
|
|
3145
3145
|
});
|
|
3146
3146
|
let s = Qc(i ? td(n) : n, -r);
|
|
@@ -3336,7 +3336,7 @@ function Th(t, e, n, r, o, i, s) {
|
|
|
3336
3336
|
l = !0;
|
|
3337
3337
|
}
|
|
3338
3338
|
if (l) {
|
|
3339
|
-
let c = Dh(a, t, e, n, o, i, s), d =
|
|
3339
|
+
let c = Dh(a, t, e, n, o, i, s), d = Do(c, r, 0, s);
|
|
3340
3340
|
e = d.local;
|
|
3341
3341
|
for (let u = 0; u < a.length; u += 3)
|
|
3342
3342
|
a[u + 1] < 0 && (a.splice(u, 3), u -= 3);
|
|
@@ -3355,7 +3355,7 @@ function Qc(t, e) {
|
|
|
3355
3355
|
let n = [];
|
|
3356
3356
|
for (let r = 0; r < t.length; r++) {
|
|
3357
3357
|
let o = t[r];
|
|
3358
|
-
n.push(new
|
|
3358
|
+
n.push(new F(o.from + e, o.to + e, o.type));
|
|
3359
3359
|
}
|
|
3360
3360
|
return n;
|
|
3361
3361
|
}
|
|
@@ -3386,13 +3386,13 @@ function td(t) {
|
|
|
3386
3386
|
t[n] != null && e.push(t[n]);
|
|
3387
3387
|
return e;
|
|
3388
3388
|
}
|
|
3389
|
-
function
|
|
3389
|
+
function Do(t, e, n, r) {
|
|
3390
3390
|
let o = [], i = !1;
|
|
3391
3391
|
e.forEach((a, l) => {
|
|
3392
3392
|
let c = ed(t, a, l + n);
|
|
3393
3393
|
if (c) {
|
|
3394
3394
|
i = !0;
|
|
3395
|
-
let d =
|
|
3395
|
+
let d = Do(c, a, n + l + 1, r);
|
|
3396
3396
|
d != we && o.push(l, l + a.nodeSize, d);
|
|
3397
3397
|
}
|
|
3398
3398
|
});
|
|
@@ -3679,7 +3679,7 @@ function _h(t, e, n, r, o) {
|
|
|
3679
3679
|
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
3680
3680
|
let C = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, V = As(t, C);
|
|
3681
3681
|
if (V && !t.state.selection.eq(V)) {
|
|
3682
|
-
if (ve && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (
|
|
3682
|
+
if (ve && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (z) => z(t, Qt(13, "Enter"))))
|
|
3683
3683
|
return;
|
|
3684
3684
|
let $ = t.state.tr.setSelection(V);
|
|
3685
3685
|
C == "pointer" ? $.setMeta("pointer", !0) : C == "key" && $.scrollIntoView(), i && $.setMeta("composition", i), t.dispatch($);
|
|
@@ -3723,15 +3723,15 @@ function _h(t, e, n, r, o) {
|
|
|
3723
3723
|
return C(t, Qt(13, "Enter"));
|
|
3724
3724
|
});
|
|
3725
3725
|
}, 20));
|
|
3726
|
-
let y = h.start, S = h.endA, k, M,
|
|
3726
|
+
let y = h.start, S = h.endA, k, M, B;
|
|
3727
3727
|
if (w) {
|
|
3728
3728
|
if (m.pos == g.pos)
|
|
3729
3729
|
De && Lt <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => kt(t), 20)), k = t.state.tr.delete(y, S), M = d.resolve(h.start).marksAcross(d.resolve(h.endA));
|
|
3730
3730
|
else if (
|
|
3731
3731
|
// Adding or removing a mark
|
|
3732
|
-
h.endA == h.endB && (
|
|
3732
|
+
h.endA == h.endB && (B = Vh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
|
|
3733
3733
|
)
|
|
3734
|
-
k = t.state.tr,
|
|
3734
|
+
k = t.state.tr, B.type == "add" ? k.addMark(y, S, B.mark) : k.removeMark(y, S, B.mark);
|
|
3735
3735
|
else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
|
|
3736
3736
|
let C = m.parent.textBetween(m.parentOffset, g.parentOffset);
|
|
3737
3737
|
if (t.someProp("handleTextInput", (V) => V(t, y, S, C)))
|
|
@@ -4169,12 +4169,12 @@ function Ua(t) {
|
|
|
4169
4169
|
if (typeof n == "function" && (n = n(t.state)), n)
|
|
4170
4170
|
for (let r in n)
|
|
4171
4171
|
r == "class" ? e.class += " " + n[r] : r == "style" ? e.style = (e.style ? e.style + ";" : "") + n[r] : !e[r] && r != "contenteditable" && r != "nodeName" && (e[r] = String(n[r]));
|
|
4172
|
-
}), e.translate || (e.translate = "no"), [
|
|
4172
|
+
}), e.translate || (e.translate = "no"), [F.node(0, t.state.doc.content.size, e)];
|
|
4173
4173
|
}
|
|
4174
4174
|
function qa(t) {
|
|
4175
4175
|
if (t.markCursor) {
|
|
4176
4176
|
let e = document.createElement("img");
|
|
4177
|
-
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco:
|
|
4177
|
+
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco: F.widget(t.state.selection.from, e, { raw: !0, marks: t.markCursor }) };
|
|
4178
4178
|
} else
|
|
4179
4179
|
t.cursorWrapper = null;
|
|
4180
4180
|
}
|
|
@@ -4325,7 +4325,7 @@ wr.encodeInto ? gm : ym, bm = (t, e) => {
|
|
|
4325
4325
|
throw od("Method unimplemented");
|
|
4326
4326
|
}, id = () => {
|
|
4327
4327
|
throw od("Unexpected case");
|
|
4328
|
-
},
|
|
4328
|
+
}, ho = () => /* @__PURE__ */ new Map(), sd = (t, e, n) => {
|
|
4329
4329
|
let r = t.get(e);
|
|
4330
4330
|
return r === void 0 && t.set(e, r = n()), r;
|
|
4331
4331
|
}, Cm = Object.keys, Mm = (t, e) => {
|
|
@@ -4356,7 +4356,7 @@ wr.encodeInto ? gm : ym, bm = (t, e) => {
|
|
|
4356
4356
|
remove: t.length - n - r,
|
|
4357
4357
|
insert: e.slice(n, e.length - r)
|
|
4358
4358
|
};
|
|
4359
|
-
}, Nm = Em, te = new
|
|
4359
|
+
}, Nm = Em, te = new K("y-sync"), $t = new K("y-undo"), Zr = new K("yjs-cursor"), Pm = Math.random, Im = (t) => t[yr(Pm() * t.length)], el = (t) => t === void 0 ? null : t;
|
|
4360
4360
|
class Rm {
|
|
4361
4361
|
constructor() {
|
|
4362
4362
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -4385,7 +4385,7 @@ let et;
|
|
|
4385
4385
|
const Bm = () => {
|
|
4386
4386
|
if (et === void 0)
|
|
4387
4387
|
if (Pn) {
|
|
4388
|
-
et =
|
|
4388
|
+
et = ho();
|
|
4389
4389
|
const t = oe.argv;
|
|
4390
4390
|
let e = null;
|
|
4391
4391
|
for (let n = 0; n < t.length; n++) {
|
|
@@ -4393,12 +4393,12 @@ const Bm = () => {
|
|
|
4393
4393
|
r[0] === "-" ? (e !== null && et.set(e, ""), e = r) : e !== null && (et.set(e, r), e = null);
|
|
4394
4394
|
}
|
|
4395
4395
|
e !== null && et.set(e, "");
|
|
4396
|
-
} else typeof location == "object" ? (et =
|
|
4396
|
+
} else typeof location == "object" ? (et = ho(), (location.search || "?").slice(1).split("&").forEach((t) => {
|
|
4397
4397
|
if (t.length !== 0) {
|
|
4398
4398
|
const [e, n] = t.split("=");
|
|
4399
4399
|
et.set(`--${Ga(e, "-")}`, n), et.set(`-${Ga(e, "-")}`, n);
|
|
4400
4400
|
}
|
|
4401
|
-
})) : et =
|
|
4401
|
+
})) : et = ho();
|
|
4402
4402
|
return et;
|
|
4403
4403
|
}, Vi = (t) => Bm().has(t), Hi = (t) => el(Pn ? oe.env[t.toUpperCase().replaceAll("-", "_")] : Fm.getItem(t)), cd = (t) => Vi("--" + t) || Hi(t) !== null;
|
|
4404
4404
|
cd("production");
|
|
@@ -4553,7 +4553,7 @@ const Jm = (t) => new Xm().digest(t), Ym = (t) => {
|
|
|
4553
4553
|
}, tg = (t) => Zm(eg(Jm(Qm(t)))), ng = () => ({
|
|
4554
4554
|
mapping: /* @__PURE__ */ new Map(),
|
|
4555
4555
|
isOMark: /* @__PURE__ */ new Map()
|
|
4556
|
-
}),
|
|
4556
|
+
}), Eo = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && /** @type {number} */
|
|
4557
4557
|
e.sv.get(t.id.client) > t.id.clock && !D.isDeleted(e.ds, t.id), rg = [{ light: "#ecd44433", dark: "#ecd444" }], og = (t, e, n) => {
|
|
4558
4558
|
if (!t.has(n)) {
|
|
4559
4559
|
if (t.size < e.length) {
|
|
@@ -4575,7 +4575,7 @@ e.sv.get(t.id.client) > t.id.clock && !D.isDeleted(e.ds, t.id), rg = [{ light: "
|
|
|
4575
4575
|
mapping: i
|
|
4576
4576
|
} = {}) => {
|
|
4577
4577
|
let s = !1;
|
|
4578
|
-
const a = new ag(t, i), l = new
|
|
4578
|
+
const a = new ag(t, i), l = new X({
|
|
4579
4579
|
props: {
|
|
4580
4580
|
editable: (c) => {
|
|
4581
4581
|
const d = te.getState(c);
|
|
@@ -4673,12 +4673,12 @@ e.sv.get(t.id.client) > t.id.clock && !D.isDeleted(e.ds, t.id), rg = [{ light: "
|
|
|
4673
4673
|
/** @type {any} */
|
|
4674
4674
|
e.selection.jsonID
|
|
4675
4675
|
),
|
|
4676
|
-
anchor:
|
|
4676
|
+
anchor: Po(
|
|
4677
4677
|
e.selection.anchor,
|
|
4678
4678
|
t.type,
|
|
4679
4679
|
t.mapping
|
|
4680
4680
|
),
|
|
4681
|
-
head:
|
|
4681
|
+
head: Po(
|
|
4682
4682
|
e.selection.head,
|
|
4683
4683
|
t.type,
|
|
4684
4684
|
t.mapping
|
|
@@ -4813,7 +4813,7 @@ class ag {
|
|
|
4813
4813
|
}, c = D.typeListToArraySnapshot(
|
|
4814
4814
|
i,
|
|
4815
4815
|
new D.Snapshot(n.ds, e.sv)
|
|
4816
|
-
).map((u) => !u._item.deleted ||
|
|
4816
|
+
).map((u) => !u._item.deleted || Eo(u._item, e) || Eo(u._item, n) ? ir(
|
|
4817
4817
|
u,
|
|
4818
4818
|
this.prosemirrorView.state.schema,
|
|
4819
4819
|
{ mapping: /* @__PURE__ */ new Map(), isOMark: /* @__PURE__ */ new Map() },
|
|
@@ -4953,11 +4953,11 @@ const dd = (t, e, n, r, o, i) => {
|
|
|
4953
4953
|
r === void 0 || o === void 0 ? t.toArray().forEach(a) : D.typeListToArraySnapshot(t, new D.Snapshot(o.ds, r.sv)).forEach(a);
|
|
4954
4954
|
try {
|
|
4955
4955
|
const l = t.getAttributes(r);
|
|
4956
|
-
r !== void 0 && (
|
|
4956
|
+
r !== void 0 && (Eo(
|
|
4957
4957
|
/** @type {Y.Item} */
|
|
4958
4958
|
t._item,
|
|
4959
4959
|
r
|
|
4960
|
-
) ?
|
|
4960
|
+
) ? Eo(
|
|
4961
4961
|
/** @type {Y.Item} */
|
|
4962
4962
|
t._item,
|
|
4963
4963
|
o
|
|
@@ -5051,21 +5051,21 @@ const dd = (t, e, n, r, o, i) => {
|
|
|
5051
5051
|
);
|
|
5052
5052
|
}
|
|
5053
5053
|
return t instanceof D.XmlText && e instanceof Array && ud(t, e);
|
|
5054
|
-
},
|
|
5054
|
+
}, No = (t, e) => t === e || t instanceof Array && e instanceof Array && t.length === e.length && t.every(
|
|
5055
5055
|
(n, r) => e[r] === n
|
|
5056
5056
|
), nl = (t, e, n) => {
|
|
5057
5057
|
const r = t.toArray(), o = qo(e), i = o.length, s = r.length, a = zt(s, i);
|
|
5058
5058
|
let l = 0, c = 0, d = !1;
|
|
5059
5059
|
for (; l < a; l++) {
|
|
5060
5060
|
const u = r[l], f = o[l];
|
|
5061
|
-
if (
|
|
5061
|
+
if (No(n.mapping.get(u), f))
|
|
5062
5062
|
d = !0;
|
|
5063
5063
|
else if (!kr(u, f))
|
|
5064
5064
|
break;
|
|
5065
5065
|
}
|
|
5066
5066
|
for (; l + c < a; c++) {
|
|
5067
5067
|
const u = r[s - c - 1], f = o[i - c - 1];
|
|
5068
|
-
if (
|
|
5068
|
+
if (No(n.mapping.get(u), f))
|
|
5069
5069
|
d = !0;
|
|
5070
5070
|
else if (!kr(u, f))
|
|
5071
5071
|
break;
|
|
@@ -5125,7 +5125,7 @@ const dd = (t, e, n, r, o, i) => {
|
|
|
5125
5125
|
let c = 0, d = 0;
|
|
5126
5126
|
for (; c < l; c++) {
|
|
5127
5127
|
const u = s[c], f = o[c];
|
|
5128
|
-
if (!
|
|
5128
|
+
if (!No(r.mapping.get(u), f))
|
|
5129
5129
|
if (kr(u, f))
|
|
5130
5130
|
r.mapping.set(u, f);
|
|
5131
5131
|
else
|
|
@@ -5133,7 +5133,7 @@ const dd = (t, e, n, r, o, i) => {
|
|
|
5133
5133
|
}
|
|
5134
5134
|
for (; d + c + 1 < l; d++) {
|
|
5135
5135
|
const u = s[a - d - 1], f = o[i - d - 1];
|
|
5136
|
-
if (!
|
|
5136
|
+
if (!No(r.mapping.get(u), f))
|
|
5137
5137
|
if (kr(u, f))
|
|
5138
5138
|
r.mapping.set(u, f);
|
|
5139
5139
|
else
|
|
@@ -5203,8 +5203,8 @@ const mg = () => {
|
|
|
5203
5203
|
}), n.dispatch(r));
|
|
5204
5204
|
});
|
|
5205
5205
|
}, gg = (t, e, n) => {
|
|
5206
|
-
sr || (sr = /* @__PURE__ */ new Map(), Ls(0, mg)), sd(sr, t,
|
|
5207
|
-
},
|
|
5206
|
+
sr || (sr = /* @__PURE__ */ new Map(), Ls(0, mg)), sd(sr, t, ho).set(e, n);
|
|
5207
|
+
}, Po = (t, e, n) => {
|
|
5208
5208
|
if (t === 0)
|
|
5209
5209
|
return D.createRelativePositionFromTypeIndex(e, 0, -1);
|
|
5210
5210
|
let r = e._first === null ? null : (
|
|
@@ -5352,14 +5352,14 @@ const mg = () => {
|
|
|
5352
5352
|
if (u !== null && f !== null) {
|
|
5353
5353
|
const p = Nn(t.doc.content.size - 1, 0);
|
|
5354
5354
|
u = zt(u, p), f = zt(f, p), a.push(
|
|
5355
|
-
|
|
5355
|
+
F.widget(f, () => r(d, c), {
|
|
5356
5356
|
key: c + "",
|
|
5357
5357
|
side: 10
|
|
5358
5358
|
})
|
|
5359
5359
|
);
|
|
5360
5360
|
const h = zt(u, f), m = Nn(u, f);
|
|
5361
5361
|
a.push(
|
|
5362
|
-
|
|
5362
|
+
F.inline(h, m, o(d, c), {
|
|
5363
5363
|
inclusiveEnd: !0,
|
|
5364
5364
|
inclusiveStart: !1
|
|
5365
5365
|
})
|
|
@@ -5372,8 +5372,8 @@ const mg = () => {
|
|
|
5372
5372
|
cursorBuilder: n = kg,
|
|
5373
5373
|
selectionBuilder: r = xg,
|
|
5374
5374
|
getSelection: o = (s) => s.selection
|
|
5375
|
-
} = {}, i = "cursor") => new
|
|
5376
|
-
key:
|
|
5375
|
+
} = {}, i = "cursor") => new X({
|
|
5376
|
+
key: Zr,
|
|
5377
5377
|
state: {
|
|
5378
5378
|
init(s, a) {
|
|
5379
5379
|
return rl(
|
|
@@ -5385,7 +5385,7 @@ const mg = () => {
|
|
|
5385
5385
|
);
|
|
5386
5386
|
},
|
|
5387
5387
|
apply(s, a, l, c) {
|
|
5388
|
-
const d = te.getState(c), u = s.getMeta(
|
|
5388
|
+
const d = te.getState(c), u = s.getMeta(Zr);
|
|
5389
5389
|
return d && d.isChangeOrigin || u && u.awarenessUpdated ? rl(
|
|
5390
5390
|
c,
|
|
5391
5391
|
t,
|
|
@@ -5396,19 +5396,19 @@ const mg = () => {
|
|
|
5396
5396
|
}
|
|
5397
5397
|
},
|
|
5398
5398
|
props: {
|
|
5399
|
-
decorations: (s) =>
|
|
5399
|
+
decorations: (s) => Zr.getState(s)
|
|
5400
5400
|
},
|
|
5401
5401
|
view: (s) => {
|
|
5402
5402
|
const a = () => {
|
|
5403
|
-
s.docView && gg(s,
|
|
5403
|
+
s.docView && gg(s, Zr, { awarenessUpdated: !0 });
|
|
5404
5404
|
}, l = () => {
|
|
5405
5405
|
const c = te.getState(s.state), d = t.getLocalState() || {};
|
|
5406
5406
|
if (s.hasFocus()) {
|
|
5407
|
-
const u = o(s.state), f =
|
|
5407
|
+
const u = o(s.state), f = Po(
|
|
5408
5408
|
u.anchor,
|
|
5409
5409
|
c.type,
|
|
5410
5410
|
c.binding.mapping
|
|
5411
|
-
), p =
|
|
5411
|
+
), p = Po(
|
|
5412
5412
|
u.head,
|
|
5413
5413
|
c.type,
|
|
5414
5414
|
c.binding.mapping
|
|
@@ -5445,7 +5445,7 @@ const mg = () => {
|
|
|
5445
5445
|
const e = $t.getState(t).undoManager;
|
|
5446
5446
|
if (e != null)
|
|
5447
5447
|
return e.redo(), !0;
|
|
5448
|
-
}, Og = /* @__PURE__ */ new Set(["paragraph"]), Tg = (t, e) => !(t instanceof Rf) || !(t.content instanceof Lf) || !(t.content.type instanceof Ff || t.content.type instanceof Bf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, Dg = ({ protectedNodes: t = Og, trackedOrigins: e = [], undoManager: n = null } = {}) => new
|
|
5448
|
+
}, Og = /* @__PURE__ */ new Set(["paragraph"]), Tg = (t, e) => !(t instanceof Rf) || !(t.content instanceof Lf) || !(t.content.type instanceof Ff || t.content.type instanceof Bf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, Dg = ({ protectedNodes: t = Og, trackedOrigins: e = [], undoManager: n = null } = {}) => new X({
|
|
5449
5449
|
key: $t,
|
|
5450
5450
|
state: {
|
|
5451
5451
|
init: (r, o) => {
|
|
@@ -5591,7 +5591,7 @@ var Ht = {
|
|
|
5591
5591
|
220: "\\",
|
|
5592
5592
|
221: "]",
|
|
5593
5593
|
222: "'"
|
|
5594
|
-
},
|
|
5594
|
+
}, Io = {
|
|
5595
5595
|
48: ")",
|
|
5596
5596
|
49: "!",
|
|
5597
5597
|
50: "@",
|
|
@@ -5620,10 +5620,10 @@ var Ht = {
|
|
|
5620
5620
|
for (var be = 0; be < 10; be++) Ht[48 + be] = Ht[96 + be] = String(be);
|
|
5621
5621
|
for (var be = 1; be <= 24; be++) Ht[be + 111] = "F" + be;
|
|
5622
5622
|
for (var be = 65; be <= 90; be++)
|
|
5623
|
-
Ht[be] = String.fromCharCode(be + 32),
|
|
5624
|
-
for (var hi in Ht)
|
|
5623
|
+
Ht[be] = String.fromCharCode(be + 32), Io[be] = String.fromCharCode(be);
|
|
5624
|
+
for (var hi in Ht) Io.hasOwnProperty(hi) || (Io[hi] = Ht[hi]);
|
|
5625
5625
|
function Ig(t) {
|
|
5626
|
-
var e = Ng && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Pg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ?
|
|
5626
|
+
var e = Ng && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Pg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Io : Ht)[t.keyCode] || t.key || "Unidentified";
|
|
5627
5627
|
return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
|
|
5628
5628
|
}
|
|
5629
5629
|
const Rg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
|
|
@@ -5658,7 +5658,7 @@ function mi(t, e, n = !0) {
|
|
|
5658
5658
|
return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
|
|
5659
5659
|
}
|
|
5660
5660
|
function Bg(t) {
|
|
5661
|
-
return new
|
|
5661
|
+
return new X({ props: { handleKeyDown: Bs(t) } });
|
|
5662
5662
|
}
|
|
5663
5663
|
function Bs(t) {
|
|
5664
5664
|
let e = Fg(t);
|
|
@@ -5697,7 +5697,7 @@ function St(t, e) {
|
|
|
5697
5697
|
}
|
|
5698
5698
|
return t;
|
|
5699
5699
|
}
|
|
5700
|
-
function
|
|
5700
|
+
function Fr(t, e) {
|
|
5701
5701
|
return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
|
|
5702
5702
|
}
|
|
5703
5703
|
var $n, hd, md;
|
|
@@ -5822,7 +5822,7 @@ class E {
|
|
|
5822
5822
|
* @returns The attrs of the node/mark or an empty object.
|
|
5823
5823
|
*/
|
|
5824
5824
|
static getAttributes(e, n) {
|
|
5825
|
-
const r =
|
|
5825
|
+
const r = Fr(
|
|
5826
5826
|
typeof n == "string" ? n : n.name,
|
|
5827
5827
|
e.schema
|
|
5828
5828
|
);
|
|
@@ -5914,19 +5914,19 @@ _n = new WeakSet(), gd = function(e, n, r) {
|
|
|
5914
5914
|
...g ? g(i) : {}
|
|
5915
5915
|
};
|
|
5916
5916
|
}, {}), d = Ki({
|
|
5917
|
-
content:
|
|
5918
|
-
group:
|
|
5919
|
-
marks:
|
|
5920
|
-
inline:
|
|
5921
|
-
atom:
|
|
5922
|
-
selectable:
|
|
5923
|
-
draggable:
|
|
5924
|
-
code:
|
|
5925
|
-
defining:
|
|
5926
|
-
isolating:
|
|
5917
|
+
content: Y(I(i, "content", a)),
|
|
5918
|
+
group: Y(I(i, "group", a)),
|
|
5919
|
+
marks: Y(I(i, "marks", a)),
|
|
5920
|
+
inline: Y(I(i, "inline", a)),
|
|
5921
|
+
atom: Y(I(i, "atom", a)),
|
|
5922
|
+
selectable: Y(I(i, "selectable", a)),
|
|
5923
|
+
draggable: Y(I(i, "draggable", a)),
|
|
5924
|
+
code: Y(I(i, "code", a)),
|
|
5925
|
+
defining: Y(I(i, "defining", a)),
|
|
5926
|
+
isolating: Y(I(i, "isolating", a)),
|
|
5927
5927
|
attrs: l,
|
|
5928
5928
|
...c
|
|
5929
|
-
}), u =
|
|
5929
|
+
}), u = Y(I(i, "parseDOM", a));
|
|
5930
5930
|
u && (d.parseDOM = u.map((h) => E.insertExtensionAttrsToParseRule(h, s)));
|
|
5931
5931
|
const f = I(i, "renderDOM", a);
|
|
5932
5932
|
f && (d.toDOM = (h) => f({
|
|
@@ -5947,13 +5947,13 @@ _n = new WeakSet(), gd = function(e, n, r) {
|
|
|
5947
5947
|
}, l = Object.fromEntries(
|
|
5948
5948
|
s.map((f) => [f.name, { default: f?.attribute?.default }])
|
|
5949
5949
|
), c = Ki({
|
|
5950
|
-
group:
|
|
5951
|
-
inclusive:
|
|
5952
|
-
excludes:
|
|
5953
|
-
spanning:
|
|
5954
|
-
code:
|
|
5950
|
+
group: Y(I(i, "group", a)),
|
|
5951
|
+
inclusive: Y(I(i, "inclusive", a)),
|
|
5952
|
+
excludes: Y(I(i, "excludes", a)),
|
|
5953
|
+
spanning: Y(I(i, "spanning", a)),
|
|
5954
|
+
code: Y(I(i, "code", a)),
|
|
5955
5955
|
attrs: l
|
|
5956
|
-
}), d =
|
|
5956
|
+
}), d = Y(I(i, "parseDOM", a));
|
|
5957
5957
|
d && (c.parseDOM = d.map((f) => E.insertExtensionAttrsToParseRule(f, s)));
|
|
5958
5958
|
const u = I(i, "renderDOM", a);
|
|
5959
5959
|
return u && (c.toDOM = (f) => u({
|
|
@@ -6170,8 +6170,8 @@ const Hg = (t, e) => {
|
|
|
6170
6170
|
}), a.dispatch(p), c = !0);
|
|
6171
6171
|
}), c;
|
|
6172
6172
|
}, jg = ({ editor: t, rules: e }) => {
|
|
6173
|
-
const n = new
|
|
6174
|
-
key: new
|
|
6173
|
+
const n = new X({
|
|
6174
|
+
key: new K("inputRulesPlugin"),
|
|
6175
6175
|
state: {
|
|
6176
6176
|
init() {
|
|
6177
6177
|
return null;
|
|
@@ -6407,7 +6407,7 @@ bd = function() {
|
|
|
6407
6407
|
editor: this.editor,
|
|
6408
6408
|
type: Zn(e.name, this.schema)
|
|
6409
6409
|
};
|
|
6410
|
-
e.type === "mark" && (
|
|
6410
|
+
e.type === "mark" && (Y(I(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), N(this, Vn, wd).call(this, e);
|
|
6411
6411
|
}
|
|
6412
6412
|
}, /**
|
|
6413
6413
|
* Attach editor events to extension
|
|
@@ -6859,7 +6859,7 @@ const gy = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6859
6859
|
t.removeMark(i.$from.pos, i.$to.pos);
|
|
6860
6860
|
}), !0;
|
|
6861
6861
|
};
|
|
6862
|
-
function
|
|
6862
|
+
function Ro(t, e, n = {}) {
|
|
6863
6863
|
const { empty: r, ranges: o } = t.selection, i = e ? St(e, t.schema) : null;
|
|
6864
6864
|
if (r)
|
|
6865
6865
|
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => pr(u.attrs, n, { strict: !1 }));
|
|
@@ -6884,7 +6884,7 @@ function Io(t, e, n = {}) {
|
|
|
6884
6884
|
}
|
|
6885
6885
|
const by = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
6886
6886
|
const { extendEmptyMarkRange: i = !1 } = n, s = St(t, r.schema);
|
|
6887
|
-
return
|
|
6887
|
+
return Ro(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
|
|
6888
6888
|
}, wy = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
6889
6889
|
const { selection: r } = e, { ranges: o } = r;
|
|
6890
6890
|
return n && o.forEach(({ $from: i, $to: s }) => {
|
|
@@ -6904,7 +6904,7 @@ const by = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6904
6904
|
const i = le(t, n.schema);
|
|
6905
6905
|
return i.isTextblock ? o().command(({ commands: s }) => ol(i, e)(n) ? !0 : s.clearNodes()).command(({ state: s }) => ol(i, e)(s, r)).run() : !1;
|
|
6906
6906
|
};
|
|
6907
|
-
function
|
|
6907
|
+
function Lo(t, e, n = {}) {
|
|
6908
6908
|
const { from: r, to: o, empty: i } = t.selection, s = e ? le(e, t.schema) : null, a = [];
|
|
6909
6909
|
t.doc.nodesBetween(r, o, (u, f) => {
|
|
6910
6910
|
if (u.isText) return;
|
|
@@ -6920,10 +6920,10 @@ function Ro(t, e, n = {}) {
|
|
|
6920
6920
|
}
|
|
6921
6921
|
const ky = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
6922
6922
|
const i = le(t, r.schema), s = le(e, r.schema);
|
|
6923
|
-
return
|
|
6923
|
+
return Lo(r, i, n) ? o.setNode(s) : o.setNode(i, n);
|
|
6924
6924
|
}, xy = () => ({ state: t, dispatch: e }) => oy(t, e), Sy = () => ({ state: t, dispatch: e }) => $s(t, e), Cy = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6925
6925
|
let i = null, s = null;
|
|
6926
|
-
const a =
|
|
6926
|
+
const a = Fr(
|
|
6927
6927
|
typeof t == "string" ? t : t.name,
|
|
6928
6928
|
r.schema
|
|
6929
6929
|
);
|
|
@@ -6940,7 +6940,7 @@ const ky = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6940
6940
|
}), !0) : !1;
|
|
6941
6941
|
}, My = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6942
6942
|
let i = null, s = null;
|
|
6943
|
-
const a =
|
|
6943
|
+
const a = Fr(
|
|
6944
6944
|
typeof t == "string" ? t : t.name,
|
|
6945
6945
|
r.schema
|
|
6946
6946
|
);
|
|
@@ -6959,7 +6959,7 @@ const ky = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6959
6959
|
}
|
|
6960
6960
|
return t;
|
|
6961
6961
|
};
|
|
6962
|
-
function
|
|
6962
|
+
function Qr(t) {
|
|
6963
6963
|
const e = `<body>${t}</body>`, n = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
6964
6964
|
return Id(n);
|
|
6965
6965
|
}
|
|
@@ -7002,13 +7002,13 @@ function Gi(t, e, n) {
|
|
|
7002
7002
|
}
|
|
7003
7003
|
})
|
|
7004
7004
|
});
|
|
7005
|
-
if (n.slice ? rn.fromSchema(l).parseSlice(
|
|
7005
|
+
if (n.slice ? rn.fromSchema(l).parseSlice(Qr(t), n.parseOptions) : rn.fromSchema(l).parse(Qr(t), n.parseOptions), n.errorOnInvalidContent && s)
|
|
7006
7006
|
throw new Error("[super-editor error]: Invalid HTML content", {
|
|
7007
7007
|
cause: new Error(`Invalid element found: ${a}`)
|
|
7008
7008
|
});
|
|
7009
7009
|
}
|
|
7010
7010
|
const i = rn.fromSchema(e);
|
|
7011
|
-
return n.slice ? i.parseSlice(
|
|
7011
|
+
return n.slice ? i.parseSlice(Qr(t), n.parseOptions).content : i.parse(Qr(t), n.parseOptions);
|
|
7012
7012
|
}
|
|
7013
7013
|
return Gi("", e, n);
|
|
7014
7014
|
}
|
|
@@ -7167,7 +7167,7 @@ function Uy(t) {
|
|
|
7167
7167
|
const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
7168
7168
|
const o = le(t, n.schema);
|
|
7169
7169
|
return $y(o, e)(n, r);
|
|
7170
|
-
},
|
|
7170
|
+
}, Br = (t, e) => {
|
|
7171
7171
|
for (let n = t.depth; n > 0; n--) {
|
|
7172
7172
|
const r = t.node(n);
|
|
7173
7173
|
if (e(r))
|
|
@@ -7178,14 +7178,14 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
7178
7178
|
node: r
|
|
7179
7179
|
};
|
|
7180
7180
|
}
|
|
7181
|
-
}, je = (t) => ({ $from: e }) =>
|
|
7181
|
+
}, je = (t) => ({ $from: e }) => Br(e, t), Zi = (t, e) => {
|
|
7182
7182
|
const r = e.filter((s) => s.type === "node").find((s) => s.name === t);
|
|
7183
7183
|
if (!r) return !1;
|
|
7184
7184
|
const o = {
|
|
7185
7185
|
name: r.name,
|
|
7186
7186
|
options: r.options,
|
|
7187
7187
|
storage: r.storage
|
|
7188
|
-
}, i =
|
|
7188
|
+
}, i = Y(I(r, "group", o));
|
|
7189
7189
|
return typeof i != "string" ? !1 : i.split(" ").includes("list");
|
|
7190
7190
|
}, Ky = {
|
|
7191
7191
|
type: "element",
|
|
@@ -8356,15 +8356,15 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8356
8356
|
if (Zi(k.node.type.name, f) && h.validContent(k.node.content) && l)
|
|
8357
8357
|
return c().command(() => (s.setNodeMarkup(k.pos, h), !0)).command(() => yi(s, h)).command(() => bi(s, h)).run();
|
|
8358
8358
|
}
|
|
8359
|
-
const
|
|
8360
|
-
const
|
|
8359
|
+
const B = ({ ensureMarks: $ = !1 }) => () => {
|
|
8360
|
+
const z = d().wrapInList(h, r);
|
|
8361
8361
|
if ($) {
|
|
8362
8362
|
const H = S.filter((ie) => p.includes(ie.type.name));
|
|
8363
8363
|
s.ensureMarks(H);
|
|
8364
8364
|
}
|
|
8365
|
-
return
|
|
8365
|
+
return z ? !0 : u.clearNodes();
|
|
8366
8366
|
}, C = Rd(M.definitions);
|
|
8367
|
-
return i.converter.numbering = Yy(C, M, h), r.listId = C, !n || !S || !l ? c().command(
|
|
8367
|
+
return i.converter.numbering = Yy(C, M, h), r.listId = C, !n || !S || !l ? c().command(B({ ensureMarks: !1 })).wrapInList(h, r).command(() => yi(s, h)).command(() => bi(s, h)).run() : c().command(B({ ensureMarks: !0 })).wrapInList(h, r).command(() => yi(s, h)).command(() => bi(s, h)).run();
|
|
8368
8368
|
}, Rd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Yy = (t, e, n) => {
|
|
8369
8369
|
const r = n.name === "orderedList" ? Ky : Xy, o = { ...e }, i = Rd(o.abstracts), s = {
|
|
8370
8370
|
...r,
|
|
@@ -8415,9 +8415,9 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8415
8415
|
const S = a.before(a.depth - (b - 1));
|
|
8416
8416
|
n.replace(S, a.after(-w), new W(g, 4 - b, 0));
|
|
8417
8417
|
let k = -1;
|
|
8418
|
-
n.doc.nodesBetween(S, n.doc.content.size, (M,
|
|
8418
|
+
n.doc.nodesBetween(S, n.doc.content.size, (M, B) => {
|
|
8419
8419
|
if (k > -1) return !1;
|
|
8420
|
-
M.isTextblock && M.content.size === 0 && (k =
|
|
8420
|
+
M.isTextblock && M.content.size === 0 && (k = B + 1);
|
|
8421
8421
|
}), k > -1 && n.setSelection(j.near(n.doc.resolve(k))), n.scrollIntoView();
|
|
8422
8422
|
}
|
|
8423
8423
|
return !0;
|
|
@@ -8491,28 +8491,22 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8491
8491
|
addCommands() {
|
|
8492
8492
|
return { ...tb };
|
|
8493
8493
|
}
|
|
8494
|
-
}), rb = (t) => {
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
t.commands.first(({ commands: e }) => [
|
|
8511
|
-
() => e.deleteSelection(),
|
|
8512
|
-
() => e.joinForward(),
|
|
8513
|
-
() => e.selectNodeForward()
|
|
8514
|
-
]);
|
|
8515
|
-
}, ob = Z.create({
|
|
8494
|
+
}), rb = (t) => t.commands.first(({ commands: e }) => [
|
|
8495
|
+
() => e.newlineInCode(),
|
|
8496
|
+
() => e.createParagraphNear(),
|
|
8497
|
+
() => e.liftEmptyBlock(),
|
|
8498
|
+
() => e.splitBlock()
|
|
8499
|
+
]), Yn = (t) => t.commands.first(({ commands: e, tr: n }) => [
|
|
8500
|
+
() => e.undoInputRule(),
|
|
8501
|
+
() => (n.setMeta("inputType", "deleteContentBackward"), !1),
|
|
8502
|
+
() => e.deleteSelection(),
|
|
8503
|
+
() => e.joinBackward(),
|
|
8504
|
+
() => e.selectNodeBackward()
|
|
8505
|
+
]), wn = (t) => t.commands.first(({ commands: e }) => [
|
|
8506
|
+
() => e.deleteSelection(),
|
|
8507
|
+
() => e.joinForward(),
|
|
8508
|
+
() => e.selectNodeForward()
|
|
8509
|
+
]), ob = Z.create({
|
|
8516
8510
|
name: "keymap",
|
|
8517
8511
|
addShortcuts() {
|
|
8518
8512
|
const t = {
|
|
@@ -8544,8 +8538,8 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8544
8538
|
}), ib = Z.create({
|
|
8545
8539
|
name: "editable",
|
|
8546
8540
|
addPmPlugins() {
|
|
8547
|
-
return [new
|
|
8548
|
-
key: new
|
|
8541
|
+
return [new X({
|
|
8542
|
+
key: new K("editable"),
|
|
8549
8543
|
props: {
|
|
8550
8544
|
editable: () => this.editor.options.editable
|
|
8551
8545
|
}
|
|
@@ -8555,8 +8549,8 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8555
8549
|
name: "editorFocus",
|
|
8556
8550
|
addPmPlugins() {
|
|
8557
8551
|
const t = this.editor;
|
|
8558
|
-
return [new
|
|
8559
|
-
key: new
|
|
8552
|
+
return [new X({
|
|
8553
|
+
key: new K("editorFocus"),
|
|
8560
8554
|
props: {
|
|
8561
8555
|
handleDOMEvents: {
|
|
8562
8556
|
focus: (n, r) => {
|
|
@@ -8584,9 +8578,9 @@ function Ld(t, e, n, { check: r = !1 } = {}) {
|
|
|
8584
8578
|
}
|
|
8585
8579
|
function Fd(t, e, n = {}) {
|
|
8586
8580
|
if (!e)
|
|
8587
|
-
return
|
|
8588
|
-
const r =
|
|
8589
|
-
return r === "node" ?
|
|
8581
|
+
return Lo(t, null, n) || Ro(t, null, n);
|
|
8582
|
+
const r = Fr(e, t.schema);
|
|
8583
|
+
return r === "node" ? Lo(t, e, n) : r === "mark" ? Ro(t, e, n) : !1;
|
|
8590
8584
|
}
|
|
8591
8585
|
const js = ({
|
|
8592
8586
|
tr: t,
|
|
@@ -8620,7 +8614,7 @@ const js = ({
|
|
|
8620
8614
|
markName: Ve,
|
|
8621
8615
|
attrs: { authorEmail: r.email }
|
|
8622
8616
|
}), s;
|
|
8623
|
-
i ? s = i.mark.attrs.id : s =
|
|
8617
|
+
i ? s = i.mark.attrs.id : s = Pr();
|
|
8624
8618
|
const a = t.doc.type.schema.marks[Ve].create({
|
|
8625
8619
|
id: s,
|
|
8626
8620
|
author: r.name,
|
|
@@ -8641,7 +8635,7 @@ const js = ({
|
|
|
8641
8635
|
markName: de,
|
|
8642
8636
|
attrs: { authorEmail: r.email }
|
|
8643
8637
|
}), s;
|
|
8644
|
-
i ? s = i.mark.attrs.id : s =
|
|
8638
|
+
i ? s = i.mark.attrs.id : s = Pr();
|
|
8645
8639
|
const a = t.doc.type.schema.marks[de].create({
|
|
8646
8640
|
id: s,
|
|
8647
8641
|
author: r.name,
|
|
@@ -8743,7 +8737,7 @@ function Ws(t, e) {
|
|
|
8743
8737
|
}), n;
|
|
8744
8738
|
}
|
|
8745
8739
|
function $d(t, e, n) {
|
|
8746
|
-
const o = t.state.doc.content.size, i =
|
|
8740
|
+
const o = t.state.doc.content.size, i = So(e, 0, o), s = So(n, 0, o), a = t.coordsAtPos(i), l = t.coordsAtPos(s, -1), c = Math.min(a.top, l.top), d = Math.max(a.bottom, l.bottom), u = Math.min(a.left, l.left), f = Math.max(a.right, l.right), p = f - u, h = d - c, b = {
|
|
8747
8741
|
top: c,
|
|
8748
8742
|
bottom: d,
|
|
8749
8743
|
left: u,
|
|
@@ -8773,7 +8767,7 @@ const _d = (t) => {
|
|
|
8773
8767
|
findChildren: Ws,
|
|
8774
8768
|
findMark: Ho,
|
|
8775
8769
|
findParentNode: je,
|
|
8776
|
-
findParentNodeClosestToPos:
|
|
8770
|
+
findParentNodeClosestToPos: Br,
|
|
8777
8771
|
generateDocxListAttributes: ab,
|
|
8778
8772
|
generateDocxRandomId: xn,
|
|
8779
8773
|
generateRandom32BitHex: Wf,
|
|
@@ -8785,12 +8779,12 @@ const _d = (t) => {
|
|
|
8785
8779
|
getMarksFromSelection: Vo,
|
|
8786
8780
|
getNodeType: le,
|
|
8787
8781
|
getSchemaTypeByName: Zn,
|
|
8788
|
-
getSchemaTypeNameByName:
|
|
8782
|
+
getSchemaTypeNameByName: Fr,
|
|
8789
8783
|
isActive: Fd,
|
|
8790
8784
|
isInTable: _d,
|
|
8791
8785
|
isList: Zi,
|
|
8792
|
-
isMarkActive:
|
|
8793
|
-
isNodeActive:
|
|
8786
|
+
isMarkActive: Ro,
|
|
8787
|
+
isNodeActive: Lo,
|
|
8794
8788
|
isTextSelection: Pd,
|
|
8795
8789
|
posToDOMRect: $d
|
|
8796
8790
|
}, Symbol.toStringTag, { value: "Module" })), cb = (t, e, n) => {
|
|
@@ -8841,7 +8835,7 @@ const _d = (t) => {
|
|
|
8841
8835
|
});
|
|
8842
8836
|
});
|
|
8843
8837
|
}), e ? n.filter(({ mark: o }) => o.attrs.id === e) : n) : n;
|
|
8844
|
-
}, ce = new
|
|
8838
|
+
}, ce = new K("TrackChangesBase"), ub = (t = {}) => new X({
|
|
8845
8839
|
key: ce,
|
|
8846
8840
|
state: {
|
|
8847
8841
|
init(e, n) {
|
|
@@ -8901,39 +8895,39 @@ const _d = (t) => {
|
|
|
8901
8895
|
return o.length ? (o.forEach(({ mark: i, from: s, to: a }) => {
|
|
8902
8896
|
if (i.type.name === Ve)
|
|
8903
8897
|
if (e) {
|
|
8904
|
-
const l =
|
|
8898
|
+
const l = F.inline(s, a, {
|
|
8905
8899
|
class: "track-insert-dec hidden"
|
|
8906
8900
|
});
|
|
8907
8901
|
r.push(l);
|
|
8908
8902
|
} else if (n) {
|
|
8909
|
-
const l =
|
|
8903
|
+
const l = F.inline(s, a, {
|
|
8910
8904
|
class: "track-insert-dec normal"
|
|
8911
8905
|
});
|
|
8912
8906
|
r.push(l);
|
|
8913
8907
|
} else {
|
|
8914
|
-
const l =
|
|
8908
|
+
const l = F.inline(s, a, {
|
|
8915
8909
|
class: "track-insert-dec highlighted"
|
|
8916
8910
|
});
|
|
8917
8911
|
r.push(l);
|
|
8918
8912
|
}
|
|
8919
8913
|
if (i.type.name === de)
|
|
8920
8914
|
if (e) {
|
|
8921
|
-
const l =
|
|
8915
|
+
const l = F.inline(s, a, {
|
|
8922
8916
|
class: "track-delete-dec normal"
|
|
8923
8917
|
});
|
|
8924
8918
|
r.push(l);
|
|
8925
8919
|
} else if (n) {
|
|
8926
|
-
const l =
|
|
8920
|
+
const l = F.inline(s, a, {
|
|
8927
8921
|
class: "track-delete-dec hidden"
|
|
8928
8922
|
});
|
|
8929
8923
|
r.push(l);
|
|
8930
8924
|
} else {
|
|
8931
|
-
const l =
|
|
8925
|
+
const l = F.inline(s, a, {
|
|
8932
8926
|
class: "track-delete-dec highlighted"
|
|
8933
8927
|
// 'hidden'
|
|
8934
8928
|
});
|
|
8935
8929
|
r.push(l);
|
|
8936
|
-
const c =
|
|
8930
|
+
const c = F.widget(
|
|
8937
8931
|
s,
|
|
8938
8932
|
() => {
|
|
8939
8933
|
const d = document.createElement("span");
|
|
@@ -8945,17 +8939,17 @@ const _d = (t) => {
|
|
|
8945
8939
|
}
|
|
8946
8940
|
if (i.type.name === Se)
|
|
8947
8941
|
if (e) {
|
|
8948
|
-
const l =
|
|
8942
|
+
const l = F.inline(s, a, {
|
|
8949
8943
|
class: "track-format-dec before"
|
|
8950
8944
|
});
|
|
8951
8945
|
r.push(l);
|
|
8952
8946
|
} else if (n) {
|
|
8953
|
-
const l =
|
|
8947
|
+
const l = F.inline(s, a, {
|
|
8954
8948
|
class: "track-format-dec normal"
|
|
8955
8949
|
});
|
|
8956
8950
|
r.push(l);
|
|
8957
8951
|
} else {
|
|
8958
|
-
const l =
|
|
8952
|
+
const l = F.inline(s, a, {
|
|
8959
8953
|
class: "track-format-dec highlighted"
|
|
8960
8954
|
});
|
|
8961
8955
|
r.push(l);
|
|
@@ -9070,7 +9064,7 @@ const _d = (t) => {
|
|
|
9070
9064
|
if (!r.options.isInternal && n) return "transparent";
|
|
9071
9065
|
const o = ge.getState(r.state), i = n ? o.internalColor : o.externalColor, s = t == e ? "44" : "22";
|
|
9072
9066
|
return `${i}${s}`;
|
|
9073
|
-
}, _t = new
|
|
9067
|
+
}, _t = new K("paginationPlugin"), yb = async (t) => {
|
|
9074
9068
|
if (!t.converter) return;
|
|
9075
9069
|
const e = { headers: {}, footers: {} }, n = t.converter.headerIds.ids, r = t.converter.footerIds.ids;
|
|
9076
9070
|
for (let o in n) {
|
|
@@ -9136,7 +9130,7 @@ const _d = (t) => {
|
|
|
9136
9130
|
}), n({ height: d, sectionEditor: c, sectionContainer: r });
|
|
9137
9131
|
});
|
|
9138
9132
|
});
|
|
9139
|
-
}) : {}, Ks = [Ve, de, Se], ge = new
|
|
9133
|
+
}) : {}, Ks = [Ve, de, Se], ge = new K("comments"), bb = Z.create({
|
|
9140
9134
|
name: "comments",
|
|
9141
9135
|
addCommands() {
|
|
9142
9136
|
return {
|
|
@@ -9185,7 +9179,7 @@ const _d = (t) => {
|
|
|
9185
9179
|
addPmPlugins() {
|
|
9186
9180
|
const t = this.editor;
|
|
9187
9181
|
let e, n;
|
|
9188
|
-
return t.options.isHeadless ? [] : [new
|
|
9182
|
+
return t.options.isHeadless ? [] : [new X({
|
|
9189
9183
|
key: ge,
|
|
9190
9184
|
state: {
|
|
9191
9185
|
init() {
|
|
@@ -9224,7 +9218,7 @@ const _d = (t) => {
|
|
|
9224
9218
|
if (h && (g = d.activeThreadId), n !== g) {
|
|
9225
9219
|
n = g;
|
|
9226
9220
|
const w = {
|
|
9227
|
-
type:
|
|
9221
|
+
type: uo.SELECTED,
|
|
9228
9222
|
activeCommentId: n || null
|
|
9229
9223
|
};
|
|
9230
9224
|
e = !0, t.emit("commentsUpdate", w);
|
|
@@ -9254,7 +9248,7 @@ const _d = (t) => {
|
|
|
9254
9248
|
);
|
|
9255
9249
|
let S = !1;
|
|
9256
9250
|
y.forEach((M) => {
|
|
9257
|
-
const { attrs:
|
|
9251
|
+
const { attrs: B } = M, C = B.commentId || B.importedId, V = s.coordsAtPos(w);
|
|
9258
9252
|
cl({
|
|
9259
9253
|
allCommentPositions: f,
|
|
9260
9254
|
threadId: C,
|
|
@@ -9262,11 +9256,11 @@ const _d = (t) => {
|
|
|
9262
9256
|
currentBounds: V,
|
|
9263
9257
|
node: b
|
|
9264
9258
|
});
|
|
9265
|
-
const $ =
|
|
9259
|
+
const $ = B.internal;
|
|
9266
9260
|
S || (S = n === C);
|
|
9267
|
-
let
|
|
9268
|
-
const H =
|
|
9269
|
-
style: `background-color: ${
|
|
9261
|
+
let z = gb({ activeThreadId: n, threadId: C, isInternal: $, editor: t });
|
|
9262
|
+
const H = F.inline(w, w + b.nodeSize, {
|
|
9263
|
+
style: `background-color: ${z};`,
|
|
9270
9264
|
"data-thread-id": C,
|
|
9271
9265
|
class: "sd-editor-comment-highlight"
|
|
9272
9266
|
});
|
|
@@ -9278,10 +9272,10 @@ const _d = (t) => {
|
|
|
9278
9272
|
to: w + b.nodeSize
|
|
9279
9273
|
});
|
|
9280
9274
|
if (k) {
|
|
9281
|
-
const M = s.coordsAtPos(w), { id:
|
|
9275
|
+
const M = s.coordsAtPos(w), { id: B } = k.mark.attrs;
|
|
9282
9276
|
cl({
|
|
9283
9277
|
allCommentPositions: f,
|
|
9284
|
-
threadId:
|
|
9278
|
+
threadId: B,
|
|
9285
9279
|
pos: w,
|
|
9286
9280
|
currentBounds: M,
|
|
9287
9281
|
node: b
|
|
@@ -9454,7 +9448,7 @@ const _d = (t) => {
|
|
|
9454
9448
|
if (!b && !w)
|
|
9455
9449
|
return;
|
|
9456
9450
|
const x = {
|
|
9457
|
-
event:
|
|
9451
|
+
event: uo.ADD,
|
|
9458
9452
|
type: "trackedChange",
|
|
9459
9453
|
documentId: i,
|
|
9460
9454
|
changeId: p,
|
|
@@ -9465,7 +9459,7 @@ const _d = (t) => {
|
|
|
9465
9459
|
authorEmail: u,
|
|
9466
9460
|
date: f
|
|
9467
9461
|
};
|
|
9468
|
-
return t === "add" ? x.event =
|
|
9462
|
+
return t === "add" ? x.event = uo.ADD : t === "update" && (x.event = uo.UPDATE), x;
|
|
9469
9463
|
};
|
|
9470
9464
|
function Sb(t, e) {
|
|
9471
9465
|
let n = null;
|
|
@@ -9518,7 +9512,7 @@ const Ud = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9518
9512
|
return;
|
|
9519
9513
|
if (c.marks.find((h) => h.type.name === de))
|
|
9520
9514
|
return !1;
|
|
9521
|
-
const u = c.marks.find((h) => [de, Se].includes(h.type.name)), f = u ? u.attrs.id :
|
|
9515
|
+
const u = c.marks.find((h) => [de, Se].includes(h.type.name)), f = u ? u.attrs.id : Pr();
|
|
9522
9516
|
if (r.addMark(Math.max(n.from, d), Math.min(n.to, d + c.nodeSize), n.mark), ["bold", "italic", "strike", "underline", "textStyle"].includes(n.mark.type.name) && !c.marks.find((h) => h.type === n.mark.type)) {
|
|
9523
9517
|
const h = c.marks.find((b) => b.type.name === Se);
|
|
9524
9518
|
let m = [], g = [];
|
|
@@ -9578,7 +9572,7 @@ const Ud = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9578
9572
|
}
|
|
9579
9573
|
]), p.length || h.length) {
|
|
9580
9574
|
const m = t.schema.marks[Se].create({
|
|
9581
|
-
id:
|
|
9575
|
+
id: Pr(),
|
|
9582
9576
|
author: s.name,
|
|
9583
9577
|
authorEmail: s.email,
|
|
9584
9578
|
date: a,
|
|
@@ -9671,7 +9665,7 @@ const Ud = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9671
9665
|
}, dl = (t) => {
|
|
9672
9666
|
if (t === "initial" || t === "0.4.14") return Object.values(Ob);
|
|
9673
9667
|
};
|
|
9674
|
-
var nn, Cs, A, Jd, Yd, es, ts, Gd,
|
|
9668
|
+
var nn, Cs, A, Jd, Yd, es, ts, Gd, mo, ns, rs, is, ss, as, Zd, ls, cs, go, ds, Qd, Qn, er, eu, tu, nu, ru;
|
|
9675
9669
|
const ia = class ia extends Eg {
|
|
9676
9670
|
constructor(n) {
|
|
9677
9671
|
super();
|
|
@@ -9828,9 +9822,9 @@ const ia = class ia extends Eg {
|
|
|
9828
9822
|
initializeCollaborationData() {
|
|
9829
9823
|
if (!this.options.isNewFile || !this.options.collaborationProvider) return;
|
|
9830
9824
|
const { collaborationProvider: n } = this.options, r = () => {
|
|
9831
|
-
n.off("synced", r), N(this, A,
|
|
9825
|
+
n.off("synced", r), N(this, A, mo).call(this);
|
|
9832
9826
|
};
|
|
9833
|
-
n.synced ? N(this, A,
|
|
9827
|
+
n.synced ? N(this, A, mo).call(this) : n.on("synced", r);
|
|
9834
9828
|
}
|
|
9835
9829
|
/**
|
|
9836
9830
|
* Set editor options and update state.
|
|
@@ -10048,7 +10042,7 @@ const ia = class ia extends Eg {
|
|
|
10048
10042
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
10049
10043
|
*/
|
|
10050
10044
|
processCollaborationMigrations() {
|
|
10051
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.11.
|
|
10045
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.11.20"), !this.options.ydoc) return;
|
|
10052
10046
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
10053
10047
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
10054
10048
|
const o = dl(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
|
|
@@ -10071,7 +10065,7 @@ const ia = class ia extends Eg {
|
|
|
10071
10065
|
isNewFile: !0,
|
|
10072
10066
|
shouldLoadComments: !0,
|
|
10073
10067
|
replacedFile: !0
|
|
10074
|
-
}), N(this, A, ss).call(this), N(this, A, as).call(this), this.initDefaultStyles(), this.options.ydoc && this.options.collaborationProvider ? this.initializeCollaborationData(!0) : N(this, A,
|
|
10068
|
+
}), N(this, A, ss).call(this), N(this, A, as).call(this), this.initDefaultStyles(), this.options.ydoc && this.options.collaborationProvider ? this.initializeCollaborationData(!0) : N(this, A, mo).call(this), this.options.ydoc || (N(this, A, er).call(this), N(this, A, Qn).call(this));
|
|
10075
10069
|
}
|
|
10076
10070
|
getNodesOfType(n) {
|
|
10077
10071
|
const { findChildren: r } = Us;
|
|
@@ -10080,7 +10074,7 @@ const ia = class ia extends Eg {
|
|
|
10080
10074
|
replaceNodeWithHTML(n, r) {
|
|
10081
10075
|
const { tr: o } = this.state, { dispatch: i } = this.view;
|
|
10082
10076
|
if (!n || !r) return;
|
|
10083
|
-
const s = n.pos, a = s + n.node.nodeSize, l = N(this, A,
|
|
10077
|
+
const s = n.pos, a = s + n.node.nodeSize, l = N(this, A, go).call(this, r);
|
|
10084
10078
|
o.replaceWith(s, a, l), i(o);
|
|
10085
10079
|
}
|
|
10086
10080
|
};
|
|
@@ -10106,7 +10100,7 @@ nn = new WeakMap(), Cs = new WeakMap(), A = new WeakSet(), Jd = function(n) {
|
|
|
10106
10100
|
* Replace the current document with new data. Necessary for initializing a new collaboration file,
|
|
10107
10101
|
* since we need to insert the data only after the provider has synced.
|
|
10108
10102
|
*/
|
|
10109
|
-
|
|
10103
|
+
mo = function() {
|
|
10110
10104
|
if (!this.options.isNewFile) return;
|
|
10111
10105
|
this.options.isNewFile = !1;
|
|
10112
10106
|
const n = N(this, A, cs).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
|
|
@@ -10171,7 +10165,7 @@ cs = function() {
|
|
|
10171
10165
|
let n;
|
|
10172
10166
|
try {
|
|
10173
10167
|
const { mode: r, fragment: o, isHeadless: i, content: s, loadFromSchema: a } = this.options;
|
|
10174
|
-
r === "docx" ? (n = Ld(this.converter, this.schema, this), n = N(this, A, tu).call(this, n), this.options.html && (n = N(this, A,
|
|
10168
|
+
r === "docx" ? (n = Ld(this.converter, this.schema, this), n = N(this, A, tu).call(this, n), this.options.html && (n = N(this, A, go).call(this, this.options.html)), o && (n = wg(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, A, go).call(this, s) : n = this.schema.topNodeType.createAndFill());
|
|
10175
10169
|
} catch (r) {
|
|
10176
10170
|
console.error(r), this.emit("contentError", { editor: this, error: r });
|
|
10177
10171
|
}
|
|
@@ -10181,7 +10175,7 @@ cs = function() {
|
|
|
10181
10175
|
* @param {string} content HTML content.
|
|
10182
10176
|
* @returns {ProseMirrorNode} ProseMirror document.
|
|
10183
10177
|
*/
|
|
10184
|
-
|
|
10178
|
+
go = function(n) {
|
|
10185
10179
|
let r = n;
|
|
10186
10180
|
if (typeof n == "string") {
|
|
10187
10181
|
const o = document.createElement("div");
|
|
@@ -10197,7 +10191,7 @@ ds = function() {
|
|
|
10197
10191
|
this.options.ydoc || (r.doc = n), this.view = new nd(this.options.element, {
|
|
10198
10192
|
...this.options.editorProps,
|
|
10199
10193
|
dispatchTransaction: N(this, A, eu).bind(this),
|
|
10200
|
-
state:
|
|
10194
|
+
state: fo.create(r)
|
|
10201
10195
|
});
|
|
10202
10196
|
const o = this.state.reconfigure({
|
|
10203
10197
|
plugins: [...this.extensionService.plugins]
|
|
@@ -10275,7 +10269,7 @@ eu = function(n) {
|
|
|
10275
10269
|
* @returns {import('prosemirror-model').Node} The updated prosemirror document
|
|
10276
10270
|
*/
|
|
10277
10271
|
tu = function(n) {
|
|
10278
|
-
const r =
|
|
10272
|
+
const r = fo.create({
|
|
10279
10273
|
schema: this.schema,
|
|
10280
10274
|
doc: n
|
|
10281
10275
|
}), { tr: o, doc: i } = r;
|
|
@@ -10287,7 +10281,7 @@ tu = function(n) {
|
|
|
10287
10281
|
* @returns {Record<string, any>} The updated document JSON
|
|
10288
10282
|
*/
|
|
10289
10283
|
nu = function(n = []) {
|
|
10290
|
-
const r =
|
|
10284
|
+
const r = fo.create({
|
|
10291
10285
|
schema: this.schema,
|
|
10292
10286
|
doc: this.state.doc,
|
|
10293
10287
|
plugins: this.state.plugins
|
|
@@ -10304,7 +10298,7 @@ ru = function() {
|
|
|
10304
10298
|
}
|
|
10305
10299
|
};
|
|
10306
10300
|
let Qi = ia;
|
|
10307
|
-
class
|
|
10301
|
+
class J {
|
|
10308
10302
|
constructor(e) {
|
|
10309
10303
|
R(this, "type", "node");
|
|
10310
10304
|
R(this, "name", "node");
|
|
@@ -10316,11 +10310,11 @@ class K {
|
|
|
10316
10310
|
this.config = {
|
|
10317
10311
|
...this.config,
|
|
10318
10312
|
...e
|
|
10319
|
-
}, this.name = this.config.name, this.config.addOptions && (this.options =
|
|
10313
|
+
}, this.name = this.config.name, this.config.addOptions && (this.options = Y(
|
|
10320
10314
|
I(this, "addOptions", {
|
|
10321
10315
|
name: this.name
|
|
10322
10316
|
})
|
|
10323
|
-
)), this.storage =
|
|
10317
|
+
)), this.storage = Y(
|
|
10324
10318
|
I(this, "addStorage", {
|
|
10325
10319
|
name: this.name,
|
|
10326
10320
|
options: this.options
|
|
@@ -10332,7 +10326,7 @@ class K {
|
|
|
10332
10326
|
* @param args Arguments for the constructor.
|
|
10333
10327
|
*/
|
|
10334
10328
|
static create(...e) {
|
|
10335
|
-
return new
|
|
10329
|
+
return new J(...e);
|
|
10336
10330
|
}
|
|
10337
10331
|
}
|
|
10338
10332
|
class Oe {
|
|
@@ -10348,11 +10342,11 @@ class Oe {
|
|
|
10348
10342
|
this.config = {
|
|
10349
10343
|
...this.config,
|
|
10350
10344
|
...e
|
|
10351
|
-
}, this.name = this.config.name, this.isExternal = !!this.config.isExternal, this.config.addOptions && (this.options =
|
|
10345
|
+
}, this.name = this.config.name, this.isExternal = !!this.config.isExternal, this.config.addOptions && (this.options = Y(
|
|
10352
10346
|
I(this, "addOptions", {
|
|
10353
10347
|
name: this.name
|
|
10354
10348
|
})
|
|
10355
|
-
)), this.storage =
|
|
10349
|
+
)), this.storage = Y(
|
|
10356
10350
|
I(this, "addStorage", {
|
|
10357
10351
|
name: this.name,
|
|
10358
10352
|
options: this.options
|
|
@@ -10459,7 +10453,7 @@ const ou = Z.create({
|
|
|
10459
10453
|
if (Number.isNaN(n))
|
|
10460
10454
|
return !1;
|
|
10461
10455
|
let { min: o, max: i, unit: s } = this.options.defaults;
|
|
10462
|
-
return n =
|
|
10456
|
+
return n = So(n, o, i), r = r || s, e().setMark("textStyle", { fontSize: `${n}${r}` }).run();
|
|
10463
10457
|
},
|
|
10464
10458
|
unsetFontSize: () => ({ chain: t }) => t().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
10465
10459
|
};
|
|
@@ -10648,7 +10642,7 @@ const ou = Z.create({
|
|
|
10648
10642
|
}
|
|
10649
10643
|
});
|
|
10650
10644
|
function Tb(t = {}) {
|
|
10651
|
-
return new
|
|
10645
|
+
return new X({
|
|
10652
10646
|
view(e) {
|
|
10653
10647
|
return new Db(e, t);
|
|
10654
10648
|
}
|
|
@@ -10874,7 +10868,7 @@ function Nb(t) {
|
|
|
10874
10868
|
return !0;
|
|
10875
10869
|
}
|
|
10876
10870
|
function Pb() {
|
|
10877
|
-
return new
|
|
10871
|
+
return new X({
|
|
10878
10872
|
props: {
|
|
10879
10873
|
decorations: Fb,
|
|
10880
10874
|
createSelectionBetween(t, e, n) {
|
|
@@ -10887,12 +10881,12 @@ function Pb() {
|
|
|
10887
10881
|
});
|
|
10888
10882
|
}
|
|
10889
10883
|
const Ib = Bs({
|
|
10890
|
-
ArrowLeft:
|
|
10891
|
-
ArrowRight:
|
|
10892
|
-
ArrowUp:
|
|
10893
|
-
ArrowDown:
|
|
10884
|
+
ArrowLeft: eo("horiz", -1),
|
|
10885
|
+
ArrowRight: eo("horiz", 1),
|
|
10886
|
+
ArrowUp: eo("vert", -1),
|
|
10887
|
+
ArrowDown: eo("vert", 1)
|
|
10894
10888
|
});
|
|
10895
|
-
function
|
|
10889
|
+
function eo(t, e) {
|
|
10896
10890
|
const n = t == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
10897
10891
|
return function(r, o, i) {
|
|
10898
10892
|
let s = r.selection, a = e > 0 ? s.$to : s.$from, l = s.empty;
|
|
@@ -10930,7 +10924,7 @@ function Fb(t) {
|
|
|
10930
10924
|
if (!(t.selection instanceof ne))
|
|
10931
10925
|
return null;
|
|
10932
10926
|
let e = document.createElement("div");
|
|
10933
|
-
return e.className = "ProseMirror-gapcursor", P.create(t.doc, [
|
|
10927
|
+
return e.className = "ProseMirror-gapcursor", P.create(t.doc, [F.widget(t.selection.head, e, { key: "gapcursor" })]);
|
|
10934
10928
|
}
|
|
10935
10929
|
const Bb = Z.create({
|
|
10936
10930
|
name: "gapCursor",
|
|
@@ -10941,14 +10935,14 @@ const Bb = Z.create({
|
|
|
10941
10935
|
},
|
|
10942
10936
|
extendNodeSchema(t) {
|
|
10943
10937
|
return {
|
|
10944
|
-
allowGapCursor:
|
|
10938
|
+
allowGapCursor: Y(I(t, "allowGapCursor", {
|
|
10945
10939
|
name: t.name,
|
|
10946
10940
|
options: t.options,
|
|
10947
10941
|
storage: t.storage
|
|
10948
10942
|
})) ?? null
|
|
10949
10943
|
};
|
|
10950
10944
|
}
|
|
10951
|
-
}), zb = new
|
|
10945
|
+
}), zb = new K("collaboration"), $b = Z.create({
|
|
10952
10946
|
name: "collaboration",
|
|
10953
10947
|
priority: 1e3,
|
|
10954
10948
|
addOptions() {
|
|
@@ -11047,7 +11041,7 @@ const Bb = Z.create({
|
|
|
11047
11041
|
e.classList.add("ProseMirror-yjs-cursor"), e.setAttribute("style", `border-color: ${t.color}`);
|
|
11048
11042
|
const n = document.createElement("div");
|
|
11049
11043
|
return n.setAttribute("style", `background-color: ${t.color}`), n.insertBefore(document.createTextNode(t.name || t.email), null), e.insertBefore(n, null), e;
|
|
11050
|
-
}, Tn = "aiMark",
|
|
11044
|
+
}, Tn = "aiMark", to = "aiAnimationMark", qb = Oe.create({
|
|
11051
11045
|
name: Tn,
|
|
11052
11046
|
group: "ai",
|
|
11053
11047
|
inclusive: !1,
|
|
@@ -11071,11 +11065,11 @@ const Bb = Z.create({
|
|
|
11071
11065
|
return [Tn, E.mergeAttributes(this.options.htmlAttributes, t)];
|
|
11072
11066
|
}
|
|
11073
11067
|
}), Kb = Oe.create({
|
|
11074
|
-
name:
|
|
11068
|
+
name: to,
|
|
11075
11069
|
group: "ai",
|
|
11076
11070
|
inclusive: !1,
|
|
11077
11071
|
spanning: !1,
|
|
11078
|
-
excludes:
|
|
11072
|
+
excludes: to,
|
|
11079
11073
|
addOptions() {
|
|
11080
11074
|
return {
|
|
11081
11075
|
htmlAttributes: {}
|
|
@@ -11098,12 +11092,12 @@ const Bb = Z.create({
|
|
|
11098
11092
|
};
|
|
11099
11093
|
},
|
|
11100
11094
|
parseDOM() {
|
|
11101
|
-
return [{ tag:
|
|
11095
|
+
return [{ tag: to }];
|
|
11102
11096
|
},
|
|
11103
11097
|
renderDOM({ htmlAttributes: t }) {
|
|
11104
|
-
return [
|
|
11098
|
+
return [to, E.mergeAttributes(this.options.htmlAttributes, t)];
|
|
11105
11099
|
}
|
|
11106
|
-
}), Xb = new
|
|
11100
|
+
}), Xb = new K("ai"), fu = Z.create({
|
|
11107
11101
|
name: "ai",
|
|
11108
11102
|
addCommands() {
|
|
11109
11103
|
return {
|
|
@@ -11135,7 +11129,7 @@ const Bb = Z.create({
|
|
|
11135
11129
|
},
|
|
11136
11130
|
addPmPlugins() {
|
|
11137
11131
|
const t = this.editor;
|
|
11138
|
-
return [new
|
|
11132
|
+
return [new X({
|
|
11139
11133
|
key: Xb,
|
|
11140
11134
|
state: {
|
|
11141
11135
|
init() {
|
|
@@ -11166,7 +11160,7 @@ const Bb = Z.create({
|
|
|
11166
11160
|
return e.descendants((o, i) => {
|
|
11167
11161
|
const { marks: s = [] } = o;
|
|
11168
11162
|
if (s.find((l) => l.type.name === Tn)) {
|
|
11169
|
-
const l =
|
|
11163
|
+
const l = F.inline(
|
|
11170
11164
|
i,
|
|
11171
11165
|
i + o.nodeSize,
|
|
11172
11166
|
{
|
|
@@ -11177,7 +11171,7 @@ const Bb = Z.create({
|
|
|
11177
11171
|
r.push(l);
|
|
11178
11172
|
}
|
|
11179
11173
|
}), { decorations: r };
|
|
11180
|
-
}, pu =
|
|
11174
|
+
}, pu = J.create({
|
|
11181
11175
|
name: "doc",
|
|
11182
11176
|
topNode: !0,
|
|
11183
11177
|
content: "block+",
|
|
@@ -11194,11 +11188,11 @@ const Bb = Z.create({
|
|
|
11194
11188
|
}
|
|
11195
11189
|
};
|
|
11196
11190
|
}
|
|
11197
|
-
}), hu =
|
|
11191
|
+
}), hu = J.create({
|
|
11198
11192
|
name: "text",
|
|
11199
11193
|
group: "inline",
|
|
11200
11194
|
inline: !0
|
|
11201
|
-
}), Yb =
|
|
11195
|
+
}), Yb = J.create({
|
|
11202
11196
|
name: "run",
|
|
11203
11197
|
group: "inline",
|
|
11204
11198
|
content: "text*",
|
|
@@ -11217,7 +11211,7 @@ const Bb = Z.create({
|
|
|
11217
11211
|
};
|
|
11218
11212
|
}
|
|
11219
11213
|
});
|
|
11220
|
-
function
|
|
11214
|
+
function Fo(t) {
|
|
11221
11215
|
return new Vg({
|
|
11222
11216
|
match: t.match,
|
|
11223
11217
|
handler: ({
|
|
@@ -11226,7 +11220,7 @@ function Lo(t) {
|
|
|
11226
11220
|
match: r,
|
|
11227
11221
|
chain: o
|
|
11228
11222
|
}) => {
|
|
11229
|
-
const i =
|
|
11223
|
+
const i = Y(t.getAttributes, null, r) || {}, s = e.tr.delete(n.from, n.to), l = s.doc.resolve(n.from).blockRange(), c = l && gc(l, t.type, i);
|
|
11230
11224
|
if (!c)
|
|
11231
11225
|
return null;
|
|
11232
11226
|
if (s.wrap(l, c), t.keepMarks && t.editor) {
|
|
@@ -11245,7 +11239,7 @@ function Lo(t) {
|
|
|
11245
11239
|
}
|
|
11246
11240
|
});
|
|
11247
11241
|
}
|
|
11248
|
-
const ul = /^\s*([-+*])\s$/, mu =
|
|
11242
|
+
const ul = /^\s*([-+*])\s$/, mu = J.create({
|
|
11249
11243
|
name: "bulletList",
|
|
11250
11244
|
group: "block list",
|
|
11251
11245
|
content() {
|
|
@@ -11295,11 +11289,11 @@ const ul = /^\s*([-+*])\s$/, mu = K.create({
|
|
|
11295
11289
|
},
|
|
11296
11290
|
// Input rules.
|
|
11297
11291
|
addInputRules() {
|
|
11298
|
-
let t =
|
|
11292
|
+
let t = Fo({
|
|
11299
11293
|
match: ul,
|
|
11300
11294
|
type: this.type
|
|
11301
11295
|
});
|
|
11302
|
-
return (this.options.keepMarks || this.options.keepAttributes) && (t =
|
|
11296
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (t = Fo({
|
|
11303
11297
|
match: ul,
|
|
11304
11298
|
type: this.type,
|
|
11305
11299
|
keepMarks: this.options.keepMarks,
|
|
@@ -11312,8 +11306,8 @@ const ul = /^\s*([-+*])\s$/, mu = K.create({
|
|
|
11312
11306
|
}
|
|
11313
11307
|
});
|
|
11314
11308
|
function Gb(t = {}) {
|
|
11315
|
-
return new
|
|
11316
|
-
key: new
|
|
11309
|
+
return new X({
|
|
11310
|
+
key: new K("orderedListSync"),
|
|
11317
11311
|
appendTransaction: (e, n, r) => {
|
|
11318
11312
|
if (!(e.some((d) => d.docChanged) && !n.doc.eq(r.doc)))
|
|
11319
11313
|
return;
|
|
@@ -11352,8 +11346,8 @@ function Zb() {
|
|
|
11352
11346
|
return Math.floor(Math.random() * 4294967295).toString();
|
|
11353
11347
|
}
|
|
11354
11348
|
function Qb(t) {
|
|
11355
|
-
return new
|
|
11356
|
-
key: new
|
|
11349
|
+
return new X({
|
|
11350
|
+
key: new K("orderedListMarker"),
|
|
11357
11351
|
appendTransaction: (e, n, r) => {
|
|
11358
11352
|
if (!(e.some((c) => c.docChanged) && !n.doc.eq(r.doc)))
|
|
11359
11353
|
return;
|
|
@@ -11385,10 +11379,10 @@ function Qb(t) {
|
|
|
11385
11379
|
}), l = !0, w = g), f.forEach((y, S) => {
|
|
11386
11380
|
if (S === 0)
|
|
11387
11381
|
return;
|
|
11388
|
-
let { node: k, pos: M } = y, { lvlText:
|
|
11382
|
+
let { node: k, pos: M } = y, { lvlText: B, listLevel: C, listNumberingType: V } = k.attrs;
|
|
11389
11383
|
Array.isArray(w.listLevel) || (w.listLevel = JSON.parse(w.listLevel));
|
|
11390
11384
|
let $ = [...w.listLevel.slice(0, -1), w.listLevel.at(-1) + 1];
|
|
11391
|
-
if (!(
|
|
11385
|
+
if (!(B === w.lvlText && V === w.listNumberingType && fl(C, $))) {
|
|
11392
11386
|
let { selection: H, storedMarks: ie } = r, ae = ie || H.$to.parentOffset && H.$from.marks();
|
|
11393
11387
|
s.setNodeMarkup(M, void 0, {
|
|
11394
11388
|
...k.attrs,
|
|
@@ -11460,7 +11454,7 @@ function r0({ state: t, listItems: e }) {
|
|
|
11460
11454
|
listNumberingType: s
|
|
11461
11455
|
};
|
|
11462
11456
|
}
|
|
11463
|
-
const pl = /^(\d+)\.\s$/, yu =
|
|
11457
|
+
const pl = /^(\d+)\.\s$/, yu = J.create({
|
|
11464
11458
|
name: "orderedList",
|
|
11465
11459
|
group: "block list",
|
|
11466
11460
|
content() {
|
|
@@ -11602,13 +11596,13 @@ const pl = /^(\d+)\.\s$/, yu = K.create({
|
|
|
11602
11596
|
return [Qb(this.editor), Gb()];
|
|
11603
11597
|
},
|
|
11604
11598
|
addInputRules() {
|
|
11605
|
-
let t =
|
|
11599
|
+
let t = Fo({
|
|
11606
11600
|
match: pl,
|
|
11607
11601
|
type: this.type,
|
|
11608
11602
|
getAttributes: (e) => ({ start: +e[1] }),
|
|
11609
11603
|
joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1]
|
|
11610
11604
|
});
|
|
11611
|
-
return (this.options.keepMarks || this.options.keepAttributes) && (t =
|
|
11605
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (t = Fo({
|
|
11612
11606
|
match: pl,
|
|
11613
11607
|
type: this.type,
|
|
11614
11608
|
keepMarks: this.options.keepMarks,
|
|
@@ -11663,8 +11657,8 @@ const pl = /^(\d+)\.\s$/, yu = K.create({
|
|
|
11663
11657
|
return e;
|
|
11664
11658
|
};
|
|
11665
11659
|
function f0(t = {}) {
|
|
11666
|
-
return new
|
|
11667
|
-
key: new
|
|
11660
|
+
return new X({
|
|
11661
|
+
key: new K("styledListMarker"),
|
|
11668
11662
|
state: {
|
|
11669
11663
|
init(e, n) {
|
|
11670
11664
|
const r = [
|
|
@@ -11715,7 +11709,7 @@ function hl(t, e = []) {
|
|
|
11715
11709
|
style: `--marker-font-size: ${u ?? "initial"}`
|
|
11716
11710
|
}, h = {
|
|
11717
11711
|
style: `--marker-font-family: ${f ?? "initial"}`
|
|
11718
|
-
}, m = E.mergeAttributes(p, h), g =
|
|
11712
|
+
}, m = E.mergeAttributes(p, h), g = F.node(a, a + s.nodeSize, m);
|
|
11719
11713
|
o.push(g);
|
|
11720
11714
|
}), o;
|
|
11721
11715
|
}
|
|
@@ -11733,7 +11727,7 @@ function ml(t) {
|
|
|
11733
11727
|
`.trim()
|
|
11734
11728
|
};
|
|
11735
11729
|
}
|
|
11736
|
-
let a =
|
|
11730
|
+
let a = F.node(i, i + o.nodeSize, s);
|
|
11737
11731
|
n.push(a);
|
|
11738
11732
|
}), n;
|
|
11739
11733
|
}
|
|
@@ -11752,7 +11746,7 @@ function p0(t, e, n) {
|
|
|
11752
11746
|
function h0(t) {
|
|
11753
11747
|
return t.childCount === 1 && t.firstChild?.type.name === "paragraph" && t.firstChild?.content.size === 0;
|
|
11754
11748
|
}
|
|
11755
|
-
const vu =
|
|
11749
|
+
const vu = J.create({
|
|
11756
11750
|
name: "listItem",
|
|
11757
11751
|
content: "paragraph* block*",
|
|
11758
11752
|
defining: !0,
|
|
@@ -11874,7 +11868,7 @@ const vu = K.create({
|
|
|
11874
11868
|
addPmPlugins() {
|
|
11875
11869
|
return [f0()];
|
|
11876
11870
|
}
|
|
11877
|
-
}),
|
|
11871
|
+
}), yo = new K("linkedStyles"), m0 = Z.create({
|
|
11878
11872
|
name: "linkedStyles",
|
|
11879
11873
|
addPmPlugins() {
|
|
11880
11874
|
return [g0(this.editor)];
|
|
@@ -11897,8 +11891,8 @@ const vu = K.create({
|
|
|
11897
11891
|
}
|
|
11898
11892
|
};
|
|
11899
11893
|
}
|
|
11900
|
-
}), g0 = (t) => new
|
|
11901
|
-
key:
|
|
11894
|
+
}), g0 = (t) => new X({
|
|
11895
|
+
key: yo,
|
|
11902
11896
|
state: {
|
|
11903
11897
|
init(e, { doc: n, selection: r }) {
|
|
11904
11898
|
if (!t.converter || t.options.mode !== "docx") return {};
|
|
@@ -11912,7 +11906,7 @@ const vu = K.create({
|
|
|
11912
11906
|
if (!t.converter || t.options.mode !== "docx") return { ...n };
|
|
11913
11907
|
let i = n.decorations || P.empty;
|
|
11914
11908
|
if (e.docChanged) {
|
|
11915
|
-
const s =
|
|
11909
|
+
const s = yo.getState(t.state).styles;
|
|
11916
11910
|
i = gl(o, s);
|
|
11917
11911
|
}
|
|
11918
11912
|
return { ...n, decorations: i };
|
|
@@ -11920,7 +11914,7 @@ const vu = K.create({
|
|
|
11920
11914
|
},
|
|
11921
11915
|
props: {
|
|
11922
11916
|
decorations(e) {
|
|
11923
|
-
return
|
|
11917
|
+
return yo.getState(e)?.decorations;
|
|
11924
11918
|
}
|
|
11925
11919
|
}
|
|
11926
11920
|
}), gl = (t, e) => {
|
|
@@ -11934,7 +11928,7 @@ const vu = K.create({
|
|
|
11934
11928
|
if (!l) return;
|
|
11935
11929
|
const d = t.doc.resolve(s).parent, u = y0(l, i, d);
|
|
11936
11930
|
if (!u) return;
|
|
11937
|
-
const f =
|
|
11931
|
+
const f = F.inline(s, s + i.nodeSize, { style: u });
|
|
11938
11932
|
n.push(f);
|
|
11939
11933
|
}), P.create(o, n);
|
|
11940
11934
|
}, y0 = (t, e, n, r = !0) => {
|
|
@@ -11999,7 +11993,7 @@ const vu = K.create({
|
|
|
11999
11993
|
e += `${r ? `font-family: ${r};` : ""} ${o ? `font-size: ${o};` : ""}`;
|
|
12000
11994
|
}
|
|
12001
11995
|
return e.trim();
|
|
12002
|
-
}, Ix = (t) => t?.converter ? (t.converter.linkedStyles || []).filter((n) => n.type === "paragraph" && n.definition.attrs).sort((n, r) => n.definition.attrs?.name.localeCompare(r.definition.attrs?.name)) : [], ku =
|
|
11996
|
+
}, Ix = (t) => t?.converter ? (t.converter.linkedStyles || []).filter((n) => n.type === "paragraph" && n.definition.attrs).sort((n, r) => n.definition.attrs?.name.localeCompare(r.definition.attrs?.name)) : [], ku = J.create({
|
|
12003
11997
|
name: "paragraph",
|
|
12004
11998
|
priority: 1e3,
|
|
12005
11999
|
group: "block",
|
|
@@ -12086,9 +12080,9 @@ const vu = K.create({
|
|
|
12086
12080
|
},
|
|
12087
12081
|
addPmPlugins() {
|
|
12088
12082
|
const { view: t } = this.editor;
|
|
12089
|
-
return [new
|
|
12083
|
+
return [new X({
|
|
12090
12084
|
name: "dropcapPlugin",
|
|
12091
|
-
key: new
|
|
12085
|
+
key: new K("dropcapPlugin"),
|
|
12092
12086
|
state: {
|
|
12093
12087
|
init(n, r) {
|
|
12094
12088
|
let o = yl(r, t);
|
|
@@ -12112,7 +12106,7 @@ const vu = K.create({
|
|
|
12112
12106
|
if (r.attrs.dropcap?.type === "margin") {
|
|
12113
12107
|
const i = x0(e, o);
|
|
12114
12108
|
n.push(
|
|
12115
|
-
|
|
12109
|
+
F.node(o, o + r.nodeSize, { style: `margin-left: -${i}px;` })
|
|
12116
12110
|
);
|
|
12117
12111
|
}
|
|
12118
12112
|
}), n;
|
|
@@ -12125,7 +12119,7 @@ function x0(t, e) {
|
|
|
12125
12119
|
}
|
|
12126
12120
|
return 0;
|
|
12127
12121
|
}
|
|
12128
|
-
const xu =
|
|
12122
|
+
const xu = J.create({
|
|
12129
12123
|
name: "heading",
|
|
12130
12124
|
group: "block",
|
|
12131
12125
|
content: "inline*",
|
|
@@ -12168,7 +12162,7 @@ const xu = K.create({
|
|
|
12168
12162
|
{}
|
|
12169
12163
|
);
|
|
12170
12164
|
}
|
|
12171
|
-
}), S0 =
|
|
12165
|
+
}), S0 = J.create({
|
|
12172
12166
|
name: "commentRangeStart",
|
|
12173
12167
|
group: "inline",
|
|
12174
12168
|
inline: !0,
|
|
@@ -12199,7 +12193,7 @@ const xu = K.create({
|
|
|
12199
12193
|
}
|
|
12200
12194
|
};
|
|
12201
12195
|
}
|
|
12202
|
-
}), C0 =
|
|
12196
|
+
}), C0 = J.create({
|
|
12203
12197
|
name: "commentRangeEnd",
|
|
12204
12198
|
group: "inline",
|
|
12205
12199
|
inline: !0,
|
|
@@ -12226,7 +12220,7 @@ const xu = K.create({
|
|
|
12226
12220
|
}
|
|
12227
12221
|
};
|
|
12228
12222
|
}
|
|
12229
|
-
}), M0 =
|
|
12223
|
+
}), M0 = J.create({
|
|
12230
12224
|
name: "commentReference",
|
|
12231
12225
|
group: "inline",
|
|
12232
12226
|
inline: !0,
|
|
@@ -12278,7 +12272,7 @@ const xu = K.create({
|
|
|
12278
12272
|
renderDOM({ htmlAttributes: t }) {
|
|
12279
12273
|
return [Le, E.mergeAttributes(this.options.htmlAttributes, t)];
|
|
12280
12274
|
}
|
|
12281
|
-
}), O0 =
|
|
12275
|
+
}), O0 = J.create({
|
|
12282
12276
|
name: "tab",
|
|
12283
12277
|
group: "inline",
|
|
12284
12278
|
inline: !0,
|
|
@@ -12312,9 +12306,9 @@ const xu = K.create({
|
|
|
12312
12306
|
},
|
|
12313
12307
|
addPmPlugins() {
|
|
12314
12308
|
const { view: t } = this.editor;
|
|
12315
|
-
return [new
|
|
12309
|
+
return [new X({
|
|
12316
12310
|
name: "tabPlugin",
|
|
12317
|
-
key: new
|
|
12311
|
+
key: new K("tabPlugin"),
|
|
12318
12312
|
state: {
|
|
12319
12313
|
init(n, r) {
|
|
12320
12314
|
let o = bl(r, t);
|
|
@@ -12351,7 +12345,7 @@ const xu = K.create({
|
|
|
12351
12345
|
}
|
|
12352
12346
|
const l = i.nodeBefore?.type.name === "tab" ? wi : wi - a % wi, c = D0(i);
|
|
12353
12347
|
n.push(
|
|
12354
|
-
|
|
12348
|
+
F.node(o, o + r.nodeSize, { style: `width: ${l}px; height: ${c};` })
|
|
12355
12349
|
);
|
|
12356
12350
|
}
|
|
12357
12351
|
}), n;
|
|
@@ -12368,7 +12362,7 @@ function D0(t) {
|
|
|
12368
12362
|
const i = t.node(1).firstChild.marks.find((a) => a.type.name === "textStyle");
|
|
12369
12363
|
return `${(parseInt(i?.attrs.fontSize) * 1.333 || 16) * 1.1}px`;
|
|
12370
12364
|
}
|
|
12371
|
-
const E0 =
|
|
12365
|
+
const E0 = J.create({
|
|
12372
12366
|
name: "lineBreak",
|
|
12373
12367
|
group: "inline",
|
|
12374
12368
|
inline: !0,
|
|
@@ -12383,7 +12377,7 @@ const E0 = K.create({
|
|
|
12383
12377
|
renderDOM() {
|
|
12384
12378
|
return ["br", {}];
|
|
12385
12379
|
}
|
|
12386
|
-
}), Su =
|
|
12380
|
+
}), Su = J.create({
|
|
12387
12381
|
name: "hardBreak",
|
|
12388
12382
|
group: "inline",
|
|
12389
12383
|
inline: !0,
|
|
@@ -12642,8 +12636,8 @@ function I0(t) {
|
|
|
12642
12636
|
});
|
|
12643
12637
|
const k = w && w[S];
|
|
12644
12638
|
if (k) {
|
|
12645
|
-
const M = (y + S) % e * 2,
|
|
12646
|
-
|
|
12639
|
+
const M = (y + S) % e * 2, B = s[M];
|
|
12640
|
+
B == null || B != k && s[M + 1] == 1 ? (s[M] = k, s[M + 1] = 1) : B == k && s[M + 1]++;
|
|
12647
12641
|
}
|
|
12648
12642
|
}
|
|
12649
12643
|
}
|
|
@@ -12722,7 +12716,7 @@ function ke(t) {
|
|
|
12722
12716
|
}
|
|
12723
12717
|
return e;
|
|
12724
12718
|
}
|
|
12725
|
-
var Nt = new
|
|
12719
|
+
var Nt = new K("selectingCells");
|
|
12726
12720
|
function jn(t) {
|
|
12727
12721
|
for (let e = t.depth - 1; e > 0; e--)
|
|
12728
12722
|
if (t.node(e).type.spec.tableRole == "row")
|
|
@@ -12979,7 +12973,7 @@ function H0(t) {
|
|
|
12979
12973
|
const e = [];
|
|
12980
12974
|
return t.selection.forEachCell((n, r) => {
|
|
12981
12975
|
e.push(
|
|
12982
|
-
|
|
12976
|
+
F.node(r, r + n.nodeSize, { class: "selectedCell" })
|
|
12983
12977
|
);
|
|
12984
12978
|
}), P.create(t.doc, e);
|
|
12985
12979
|
}
|
|
@@ -13026,7 +13020,7 @@ function U0(t, e, n) {
|
|
|
13026
13020
|
} else r instanceof j && j0(r) ? i = j.create(o, r.from) : r instanceof j && W0(r) && (i = j.create(o, r.$from.start(), r.$from.end()));
|
|
13027
13021
|
return i && (e || (e = t.tr)).setSelection(i), e;
|
|
13028
13022
|
}
|
|
13029
|
-
var q0 = new
|
|
13023
|
+
var q0 = new K("fix-tables");
|
|
13030
13024
|
function Tu(t, e, n, r) {
|
|
13031
13025
|
const o = t.childCount, i = e.childCount;
|
|
13032
13026
|
e: for (let s = 0, a = 0; s < i; s++) {
|
|
@@ -13525,7 +13519,7 @@ function cw(t, e) {
|
|
|
13525
13519
|
), !0;
|
|
13526
13520
|
return !1;
|
|
13527
13521
|
}
|
|
13528
|
-
function
|
|
13522
|
+
function no(t, e) {
|
|
13529
13523
|
const n = t.selection;
|
|
13530
13524
|
if (!(n instanceof G)) return !1;
|
|
13531
13525
|
if (e) {
|
|
@@ -13737,28 +13731,28 @@ function El(t, e, n, r, o) {
|
|
|
13737
13731
|
), e(u);
|
|
13738
13732
|
}
|
|
13739
13733
|
var hw = Bs({
|
|
13740
|
-
ArrowLeft:
|
|
13741
|
-
ArrowRight:
|
|
13742
|
-
ArrowUp:
|
|
13743
|
-
ArrowDown:
|
|
13744
|
-
"Shift-ArrowLeft":
|
|
13745
|
-
"Shift-ArrowRight":
|
|
13746
|
-
"Shift-ArrowUp":
|
|
13747
|
-
"Shift-ArrowDown":
|
|
13748
|
-
Backspace:
|
|
13749
|
-
"Mod-Backspace":
|
|
13750
|
-
Delete:
|
|
13751
|
-
"Mod-Delete":
|
|
13734
|
+
ArrowLeft: ro("horiz", -1),
|
|
13735
|
+
ArrowRight: ro("horiz", 1),
|
|
13736
|
+
ArrowUp: ro("vert", -1),
|
|
13737
|
+
ArrowDown: ro("vert", 1),
|
|
13738
|
+
"Shift-ArrowLeft": oo("horiz", -1),
|
|
13739
|
+
"Shift-ArrowRight": oo("horiz", 1),
|
|
13740
|
+
"Shift-ArrowUp": oo("vert", -1),
|
|
13741
|
+
"Shift-ArrowDown": oo("vert", 1),
|
|
13742
|
+
Backspace: no,
|
|
13743
|
+
"Mod-Backspace": no,
|
|
13744
|
+
Delete: no,
|
|
13745
|
+
"Mod-Delete": no
|
|
13752
13746
|
});
|
|
13753
|
-
function
|
|
13747
|
+
function bo(t, e, n) {
|
|
13754
13748
|
return n.eq(t.selection) ? !1 : (e && e(t.tr.setSelection(n).scrollIntoView()), !0);
|
|
13755
13749
|
}
|
|
13756
|
-
function
|
|
13750
|
+
function ro(t, e) {
|
|
13757
13751
|
return (n, r, o) => {
|
|
13758
13752
|
if (!o) return !1;
|
|
13759
13753
|
const i = n.selection;
|
|
13760
13754
|
if (i instanceof G)
|
|
13761
|
-
return
|
|
13755
|
+
return bo(
|
|
13762
13756
|
n,
|
|
13763
13757
|
r,
|
|
13764
13758
|
ee.near(i.$headCell, e)
|
|
@@ -13767,7 +13761,7 @@ function no(t, e) {
|
|
|
13767
13761
|
const s = Pu(o, t, e);
|
|
13768
13762
|
if (s == null) return !1;
|
|
13769
13763
|
if (t == "horiz")
|
|
13770
|
-
return
|
|
13764
|
+
return bo(
|
|
13771
13765
|
n,
|
|
13772
13766
|
r,
|
|
13773
13767
|
ee.near(n.doc.resolve(i.head + e), e)
|
|
@@ -13775,11 +13769,11 @@ function no(t, e) {
|
|
|
13775
13769
|
{
|
|
13776
13770
|
const a = n.doc.resolve(s), l = Mu(a, t, e);
|
|
13777
13771
|
let c;
|
|
13778
|
-
return l ? c = ee.near(l, 1) : e < 0 ? c = ee.near(n.doc.resolve(a.before(-1)), -1) : c = ee.near(n.doc.resolve(a.after(-1)), 1),
|
|
13772
|
+
return l ? c = ee.near(l, 1) : e < 0 ? c = ee.near(n.doc.resolve(a.before(-1)), -1) : c = ee.near(n.doc.resolve(a.after(-1)), 1), bo(n, r, c);
|
|
13779
13773
|
}
|
|
13780
13774
|
};
|
|
13781
13775
|
}
|
|
13782
|
-
function
|
|
13776
|
+
function oo(t, e) {
|
|
13783
13777
|
return (n, r, o) => {
|
|
13784
13778
|
if (!o) return !1;
|
|
13785
13779
|
const i = n.selection;
|
|
@@ -13792,7 +13786,7 @@ function ro(t, e) {
|
|
|
13792
13786
|
s = new G(n.doc.resolve(l));
|
|
13793
13787
|
}
|
|
13794
13788
|
const a = Mu(s.$headCell, t, e);
|
|
13795
|
-
return a ?
|
|
13789
|
+
return a ? bo(
|
|
13796
13790
|
n,
|
|
13797
13791
|
r,
|
|
13798
13792
|
new G(s.$anchorCell, a)
|
|
@@ -13940,7 +13934,7 @@ function ms(t, e, n, r, o, i) {
|
|
|
13940
13934
|
l ? (n.style.width = a + "px", n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = a + "px");
|
|
13941
13935
|
}
|
|
13942
13936
|
}
|
|
13943
|
-
var Ie = new
|
|
13937
|
+
var Ie = new K(
|
|
13944
13938
|
"tableColumnResizing"
|
|
13945
13939
|
);
|
|
13946
13940
|
function ww({
|
|
@@ -13950,7 +13944,7 @@ function ww({
|
|
|
13950
13944
|
View: r = bw,
|
|
13951
13945
|
lastColumnResizable: o = !0
|
|
13952
13946
|
} = {}) {
|
|
13953
|
-
const i = new
|
|
13947
|
+
const i = new X({
|
|
13954
13948
|
key: Ie,
|
|
13955
13949
|
state: {
|
|
13956
13950
|
init(s, a) {
|
|
@@ -13988,19 +13982,19 @@ function ww({
|
|
|
13988
13982
|
});
|
|
13989
13983
|
return i;
|
|
13990
13984
|
}
|
|
13991
|
-
var vw = class
|
|
13985
|
+
var vw = class wo {
|
|
13992
13986
|
constructor(e, n) {
|
|
13993
13987
|
this.activeHandle = e, this.dragging = n;
|
|
13994
13988
|
}
|
|
13995
13989
|
apply(e) {
|
|
13996
13990
|
const n = this, r = e.getMeta(Ie);
|
|
13997
13991
|
if (r && r.setHandle != null)
|
|
13998
|
-
return new
|
|
13992
|
+
return new wo(r.setHandle, !1);
|
|
13999
13993
|
if (r && r.setDragging !== void 0)
|
|
14000
|
-
return new
|
|
13994
|
+
return new wo(n.activeHandle, r.setDragging);
|
|
14001
13995
|
if (n.activeHandle > -1 && e.docChanged) {
|
|
14002
13996
|
let o = e.mapping.map(n.activeHandle, -1);
|
|
14003
|
-
return ps(e.doc.resolve(o)) || (o = -1), new
|
|
13997
|
+
return ps(e.doc.resolve(o)) || (o = -1), new wo(o, n.dragging);
|
|
14004
13998
|
}
|
|
14005
13999
|
return n;
|
|
14006
14000
|
}
|
|
@@ -14149,14 +14143,14 @@ function Tw(t, e) {
|
|
|
14149
14143
|
if ((l == s.width - 1 || s.map[d] != s.map[d + 1]) && (c == 0 || s.map[d] != s.map[d - s.width])) {
|
|
14150
14144
|
const u = s.map[d], f = a + u + i.nodeAt(u).nodeSize - 1, p = document.createElement("div");
|
|
14151
14145
|
p.className = "column-resize-handle", (n = Ie.getState(t)) != null && n.dragging && r.push(
|
|
14152
|
-
|
|
14146
|
+
F.node(
|
|
14153
14147
|
a + u,
|
|
14154
14148
|
a + u + i.nodeAt(u).nodeSize,
|
|
14155
14149
|
{
|
|
14156
14150
|
class: "column-resize-dragging"
|
|
14157
14151
|
}
|
|
14158
14152
|
)
|
|
14159
|
-
), r.push(
|
|
14153
|
+
), r.push(F.widget(f, p));
|
|
14160
14154
|
}
|
|
14161
14155
|
}
|
|
14162
14156
|
return P.create(t.doc, r);
|
|
@@ -14164,7 +14158,7 @@ function Tw(t, e) {
|
|
|
14164
14158
|
function Dw({
|
|
14165
14159
|
allowTableNodeSelection: t = !1
|
|
14166
14160
|
} = {}) {
|
|
14167
|
-
return new
|
|
14161
|
+
return new X({
|
|
14168
14162
|
key: Nt,
|
|
14169
14163
|
// This piece of state is used to remember when a mouse-drag
|
|
14170
14164
|
// cell-selection is happening, so that it can continue even as
|
|
@@ -14202,11 +14196,11 @@ function Dw({
|
|
|
14202
14196
|
}
|
|
14203
14197
|
});
|
|
14204
14198
|
}
|
|
14205
|
-
const Ew = (t) => t instanceof G,
|
|
14199
|
+
const Ew = (t) => t instanceof G, io = ({ editor: t }) => {
|
|
14206
14200
|
const { selection: e } = t.state;
|
|
14207
14201
|
if (!Ew(e)) return !1;
|
|
14208
14202
|
let n = 0;
|
|
14209
|
-
return
|
|
14203
|
+
return Br(e.ranges[0].$from, (i) => i.type.name === "table")?.node.descendants((i) => {
|
|
14210
14204
|
if (i.type.name === "table") return !1;
|
|
14211
14205
|
["tableCell", "tableHeader"].includes(i.type.name) && (n += 1);
|
|
14212
14206
|
}), n === e.ranges.length ? (t.commands.deleteTable(), !0) : !1;
|
|
@@ -14226,7 +14220,7 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
|
|
|
14226
14220
|
image: Rw
|
|
14227
14221
|
}[n];
|
|
14228
14222
|
return o ? o(e) : {};
|
|
14229
|
-
}, Pw = (t) => ({ rawHtml: t }), Iw = (t) => ({ displayLabel: t }), Rw = (t) => ({ imageSrc: t }), Lw = (t) => ({ displayLabel: t }), Lu =
|
|
14223
|
+
}, Pw = (t) => ({ rawHtml: t }), Iw = (t) => ({ displayLabel: t }), Rw = (t) => ({ imageSrc: t }), Lw = (t) => ({ displayLabel: t }), Lu = J.create({
|
|
14230
14224
|
name: "table",
|
|
14231
14225
|
content: "tableRow+",
|
|
14232
14226
|
group: "block",
|
|
@@ -14357,7 +14351,7 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
|
|
|
14357
14351
|
}), !0;
|
|
14358
14352
|
},
|
|
14359
14353
|
generateTable: (t, e, n) => ({ tr: r, editor: o }) => {
|
|
14360
|
-
const i = [], { state: { doc: s, schema: a } } = o, { tableRow: l, tableCell: c, fieldAnnotation: d, paragraph: u } = a.nodes, f = s.resolve(t.pos), p =
|
|
14354
|
+
const i = [], { state: { doc: s, schema: a } } = o, { tableRow: l, tableCell: c, fieldAnnotation: d, paragraph: u } = a.nodes, f = s.resolve(t.pos), p = Br(f, (w) => w.type === l);
|
|
14361
14355
|
if (!p) return;
|
|
14362
14356
|
if (p.node.descendants((w, x) => {
|
|
14363
14357
|
w.type.name === "fieldAnnotation" && i.push(w.attrs.fieldId);
|
|
@@ -14391,10 +14385,10 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
|
|
|
14391
14385
|
return {
|
|
14392
14386
|
Tab: () => this.editor.commands.goToNextCell() ? !0 : this.editor.can().addRowAfter() ? this.editor.chain().addRowAfter().goToNextCell().run() : !1,
|
|
14393
14387
|
"Shift-Tab": () => this.editor.commands.goToPreviousCell(),
|
|
14394
|
-
Backspace:
|
|
14395
|
-
"Mod-Backspace":
|
|
14396
|
-
Delete:
|
|
14397
|
-
"Mod-Delete":
|
|
14388
|
+
Backspace: io,
|
|
14389
|
+
"Mod-Backspace": io,
|
|
14390
|
+
Delete: io,
|
|
14391
|
+
"Mod-Delete": io
|
|
14398
14392
|
};
|
|
14399
14393
|
},
|
|
14400
14394
|
addPmPlugins() {
|
|
@@ -14417,14 +14411,14 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
|
|
|
14417
14411
|
},
|
|
14418
14412
|
extendNodeSchema(t) {
|
|
14419
14413
|
return {
|
|
14420
|
-
tableRole:
|
|
14414
|
+
tableRole: Y(I(t, "tableRole", {
|
|
14421
14415
|
name: t.name,
|
|
14422
14416
|
options: t.options,
|
|
14423
14417
|
storage: t.storage
|
|
14424
14418
|
}))
|
|
14425
14419
|
};
|
|
14426
14420
|
}
|
|
14427
|
-
}), Fu =
|
|
14421
|
+
}), Fu = J.create({
|
|
14428
14422
|
name: "tableHeader",
|
|
14429
14423
|
content: "block+",
|
|
14430
14424
|
tableRole: "header_cell",
|
|
@@ -14460,7 +14454,7 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
|
|
|
14460
14454
|
renderDOM({ htmlAttributes: t }) {
|
|
14461
14455
|
return ["th", E.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14462
14456
|
}
|
|
14463
|
-
}), Bu =
|
|
14457
|
+
}), Bu = J.create({
|
|
14464
14458
|
name: "tableRow",
|
|
14465
14459
|
content: "(tableCell | tableHeader)*",
|
|
14466
14460
|
tableRole: "row",
|
|
@@ -14484,7 +14478,7 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
|
|
|
14484
14478
|
renderDOM({ htmlAttributes: t }) {
|
|
14485
14479
|
return ["tr", E.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14486
14480
|
}
|
|
14487
|
-
}), zu =
|
|
14481
|
+
}), zu = J.create({
|
|
14488
14482
|
name: "tableCell",
|
|
14489
14483
|
content: "block+",
|
|
14490
14484
|
tableRole: "cell",
|
|
@@ -14741,8 +14735,8 @@ function It(t) {
|
|
|
14741
14735
|
}
|
|
14742
14736
|
const zw = (t = {}) => {
|
|
14743
14737
|
let { editor: e, annotationClass: n } = t;
|
|
14744
|
-
return new
|
|
14745
|
-
key: new
|
|
14738
|
+
return new X({
|
|
14739
|
+
key: new K("fieldAnnotation"),
|
|
14746
14740
|
state: {
|
|
14747
14741
|
init() {
|
|
14748
14742
|
return null;
|
|
@@ -14849,7 +14843,7 @@ function Vw(t, e) {
|
|
|
14849
14843
|
}), r;
|
|
14850
14844
|
}
|
|
14851
14845
|
const { findChildren: Hw } = Us;
|
|
14852
|
-
function
|
|
14846
|
+
function vo(t, e) {
|
|
14853
14847
|
return Hw(e.doc, (r) => {
|
|
14854
14848
|
let o = r.type.name === "fieldAnnotation";
|
|
14855
14849
|
return Array.isArray(t) ? o && t.includes(r.attrs.fieldId) : o && r.attrs.fieldId === t;
|
|
@@ -14864,7 +14858,7 @@ function Ww(t, e) {
|
|
|
14864
14858
|
if (e(r) && (n = { node: r, pos: o }), n) return !1;
|
|
14865
14859
|
}), n;
|
|
14866
14860
|
}
|
|
14867
|
-
function
|
|
14861
|
+
function ko(t, e, n) {
|
|
14868
14862
|
let r = [];
|
|
14869
14863
|
return n.nodesBetween(t, e, (o, i) => {
|
|
14870
14864
|
!o || o?.nodeSize === void 0 || o.type.name === "fieldAnnotation" && r.push({
|
|
@@ -14876,8 +14870,8 @@ function vo(t, e, n) {
|
|
|
14876
14870
|
const Lx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14877
14871
|
__proto__: null,
|
|
14878
14872
|
findFieldAnnotations: Vw,
|
|
14879
|
-
findFieldAnnotationsBetween:
|
|
14880
|
-
findFieldAnnotationsByFieldId:
|
|
14873
|
+
findFieldAnnotationsBetween: ko,
|
|
14874
|
+
findFieldAnnotationsByFieldId: vo,
|
|
14881
14875
|
findFirstFieldAnnotationByFieldId: jw,
|
|
14882
14876
|
findRemovedFieldAnnotations: $u,
|
|
14883
14877
|
getAllFieldAnnotations: It,
|
|
@@ -14958,7 +14952,7 @@ function nv(t) {
|
|
|
14958
14952
|
};
|
|
14959
14953
|
return `#${i(e)}${i(n)}${i(r)}${o < 1 ? i(Math.round(o * 255)) : ""}`;
|
|
14960
14954
|
}
|
|
14961
|
-
const ys = "annotation", Vu = "annotation-content", Hu =
|
|
14955
|
+
const ys = "annotation", Vu = "annotation-content", Hu = J.create({
|
|
14962
14956
|
name: "fieldAnnotation",
|
|
14963
14957
|
group: "inline",
|
|
14964
14958
|
inline: !0,
|
|
@@ -15248,7 +15242,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
|
|
|
15248
15242
|
* })
|
|
15249
15243
|
*/
|
|
15250
15244
|
updateFieldAnnotations: (t, e = {}) => ({ dispatch: n, state: r, commands: o }) => {
|
|
15251
|
-
let i =
|
|
15245
|
+
let i = vo(t, r);
|
|
15252
15246
|
return i.length && n ? o.updateFieldAnnotationsAttributes(i, e) : !0;
|
|
15253
15247
|
},
|
|
15254
15248
|
/**
|
|
@@ -15283,7 +15277,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
|
|
|
15283
15277
|
* editor.commands.deleteFieldAnnotations(['123', '456'])
|
|
15284
15278
|
*/
|
|
15285
15279
|
deleteFieldAnnotations: (t) => ({ dispatch: e, state: n, tr: r }) => {
|
|
15286
|
-
let o =
|
|
15280
|
+
let o = vo(t, n);
|
|
15287
15281
|
return o.length && e && o.forEach((i) => {
|
|
15288
15282
|
let { pos: s, node: a } = i, l = r.mapping.map(s), c = r.mapping.map(s + a.nodeSize), d = r.doc.nodeAt(l);
|
|
15289
15283
|
a.eq(d) && r.delete(l, c);
|
|
@@ -15312,7 +15306,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
|
|
|
15312
15306
|
* editor.commands.sliceFieldAnnotations(['123', '456'], 5)
|
|
15313
15307
|
*/
|
|
15314
15308
|
sliceFieldAnnotations: (t, e) => ({ dispatch: n, state: r, tr: o }) => {
|
|
15315
|
-
let i =
|
|
15309
|
+
let i = vo(t, r);
|
|
15316
15310
|
return i.length && n && i.forEach((s, a) => {
|
|
15317
15311
|
if (a >= e) {
|
|
15318
15312
|
let { pos: l, node: c } = s, d = o.mapping.map(l), u = o.mapping.map(l + c.nodeSize), f = o.doc.nodeAt(d);
|
|
@@ -15398,7 +15392,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
|
|
|
15398
15392
|
toggleFieldAnnotationsFormat: (t, e = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
|
|
15399
15393
|
if (!this.options.toggleFormatNames.includes(t))
|
|
15400
15394
|
return !1;
|
|
15401
|
-
let { from: a, to: l, node: c } = o.selection, d =
|
|
15395
|
+
let { from: a, to: l, node: c } = o.selection, d = ko(a, l, o.doc);
|
|
15402
15396
|
return d.length && n && (d.forEach((u) => {
|
|
15403
15397
|
i.updateFieldAnnotationsAttributes([u], {
|
|
15404
15398
|
[t]: !u.node.attrs[t]
|
|
@@ -15406,7 +15400,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
|
|
|
15406
15400
|
}), e && c?.type.name === this.name && r.setSelection(_.create(r.doc, a))), !0;
|
|
15407
15401
|
},
|
|
15408
15402
|
setFieldAnnotationsFontFamily: (t, e = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
|
|
15409
|
-
let { from: s, to: a, node: l } = o.selection, c =
|
|
15403
|
+
let { from: s, to: a, node: l } = o.selection, c = ko(s, a, o.doc);
|
|
15410
15404
|
return c.length && n && (c.forEach((d) => {
|
|
15411
15405
|
i.updateFieldAnnotationsAttributes([d], {
|
|
15412
15406
|
fontFamily: t
|
|
@@ -15414,11 +15408,11 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
|
|
|
15414
15408
|
}), e && l?.type.name === this.name && r.setSelection(_.create(r.doc, s))), !0;
|
|
15415
15409
|
},
|
|
15416
15410
|
setFieldAnnotationsFontSize: (t, e = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
|
|
15417
|
-
let { from: s, to: a, node: l } = o.selection, c =
|
|
15411
|
+
let { from: s, to: a, node: l } = o.selection, c = ko(s, a, o.doc);
|
|
15418
15412
|
if (!c.length)
|
|
15419
15413
|
return !0;
|
|
15420
15414
|
let [d, u] = Rt(t), f = 8, p = 96, h = "pt";
|
|
15421
|
-
return Number.isNaN(d) ? !1 : (d =
|
|
15415
|
+
return Number.isNaN(d) ? !1 : (d = So(d, f, p), u = u || h, n && (c.forEach((m) => {
|
|
15422
15416
|
i.updateFieldAnnotationsAttributes([m], {
|
|
15423
15417
|
fontSize: `${d}${u}`
|
|
15424
15418
|
});
|
|
@@ -15462,17 +15456,17 @@ function rv(t) {
|
|
|
15462
15456
|
}
|
|
15463
15457
|
return e;
|
|
15464
15458
|
}
|
|
15465
|
-
const
|
|
15466
|
-
key:
|
|
15459
|
+
const Bo = new K("ImagePlaceholder"), ov = (t = {}) => new X({
|
|
15460
|
+
key: Bo,
|
|
15467
15461
|
state: {
|
|
15468
15462
|
init() {
|
|
15469
15463
|
return P.empty;
|
|
15470
15464
|
},
|
|
15471
15465
|
apply(e, n, r, o) {
|
|
15472
15466
|
n = n.map(e.mapping, e.doc);
|
|
15473
|
-
let i = e.getMeta(
|
|
15467
|
+
let i = e.getMeta(Bo);
|
|
15474
15468
|
if (i?.type === "add") {
|
|
15475
|
-
let s = document.createElement("placeholder"), a =
|
|
15469
|
+
let s = document.createElement("placeholder"), a = F.widget(i.pos, s, {
|
|
15476
15470
|
id: i.id
|
|
15477
15471
|
});
|
|
15478
15472
|
n = n.add(e.doc, [a]);
|
|
@@ -15486,12 +15480,12 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15486
15480
|
}
|
|
15487
15481
|
}
|
|
15488
15482
|
}), Fx = (t, e) => {
|
|
15489
|
-
let r =
|
|
15483
|
+
let r = Bo.getState(t)?.find(null, null, (o) => o.id === e);
|
|
15490
15484
|
return r?.length ? r[0].from : null;
|
|
15491
|
-
}, Bl = new
|
|
15485
|
+
}, Bl = new K("ImagePosition"), iv = ({ editor: t }) => {
|
|
15492
15486
|
const { view: e } = t;
|
|
15493
15487
|
let n = !1;
|
|
15494
|
-
return new
|
|
15488
|
+
return new X({
|
|
15495
15489
|
name: "ImagePositionPlugin",
|
|
15496
15490
|
key: Bl,
|
|
15497
15491
|
state: {
|
|
@@ -15543,11 +15537,11 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15543
15537
|
}
|
|
15544
15538
|
if (i += a === "margin" ? `position: absolute; top: ${u?.offsetTop + u?.offsetHeight}px; ` : "", a === "margin") {
|
|
15545
15539
|
const f = e.posAtDOM(u, 1), p = document.createElement("div");
|
|
15546
|
-
p.className = "anchor-image-placeholder", p.style.float = l, p.style.width = c.width + parseInt(d[l]) + "px", p.style.height = c.height + parseInt(d.top) + parseInt(d.bottom) + "px", n.push(
|
|
15540
|
+
p.className = "anchor-image-placeholder", p.style.float = l, p.style.width = c.width + parseInt(d[l]) + "px", p.style.height = c.height + parseInt(d.top) + parseInt(d.bottom) + "px", n.push(F.widget(f, p, { key: "stable-key" }));
|
|
15547
15541
|
}
|
|
15548
15542
|
}
|
|
15549
15543
|
n.push(
|
|
15550
|
-
|
|
15544
|
+
F.node(o, o + r.nodeSize, { style: i, class: s })
|
|
15551
15545
|
);
|
|
15552
15546
|
}
|
|
15553
15547
|
}), n;
|
|
@@ -15563,7 +15557,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15563
15557
|
r = r.parentNode;
|
|
15564
15558
|
}
|
|
15565
15559
|
return null;
|
|
15566
|
-
}, ju =
|
|
15560
|
+
}, ju = J.create({
|
|
15567
15561
|
name: "image",
|
|
15568
15562
|
group: "inline",
|
|
15569
15563
|
inline: !0,
|
|
@@ -15662,7 +15656,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15662
15656
|
addPmPlugins() {
|
|
15663
15657
|
return [ov(), iv({ editor: this.editor })];
|
|
15664
15658
|
}
|
|
15665
|
-
}), av =
|
|
15659
|
+
}), av = J.create({
|
|
15666
15660
|
name: "bookmarkStart",
|
|
15667
15661
|
group: "inline",
|
|
15668
15662
|
content: "inline*",
|
|
@@ -15687,7 +15681,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15687
15681
|
renderDOM({ htmlAttributes: t }) {
|
|
15688
15682
|
return ["a", E.mergeAttributes(this.options.htmlAttributes, t)];
|
|
15689
15683
|
}
|
|
15690
|
-
}), Wu =
|
|
15684
|
+
}), Wu = J.create({
|
|
15691
15685
|
name: "mention",
|
|
15692
15686
|
group: "inline",
|
|
15693
15687
|
inline: !0,
|
|
@@ -15725,7 +15719,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15725
15719
|
email: { default: null }
|
|
15726
15720
|
};
|
|
15727
15721
|
}
|
|
15728
|
-
}), lv =
|
|
15722
|
+
}), lv = J.create({
|
|
15729
15723
|
name: "page-number",
|
|
15730
15724
|
group: "inline",
|
|
15731
15725
|
inline: !0,
|
|
@@ -15743,7 +15737,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15743
15737
|
renderDOM({ htmlAttributes: t }) {
|
|
15744
15738
|
return ["span", E.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15745
15739
|
}
|
|
15746
|
-
}), cv =
|
|
15740
|
+
}), cv = J.create({
|
|
15747
15741
|
name: "total-page-number",
|
|
15748
15742
|
group: "inline",
|
|
15749
15743
|
inline: !0,
|
|
@@ -15761,7 +15755,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15761
15755
|
renderDOM({ htmlAttributes: t }) {
|
|
15762
15756
|
return ["span", E.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15763
15757
|
}
|
|
15764
|
-
}), dv =
|
|
15758
|
+
}), dv = J.create({
|
|
15765
15759
|
name: "shapeContainer",
|
|
15766
15760
|
group: "block",
|
|
15767
15761
|
content: "block+",
|
|
@@ -15807,7 +15801,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15807
15801
|
0
|
|
15808
15802
|
];
|
|
15809
15803
|
}
|
|
15810
|
-
}), uv =
|
|
15804
|
+
}), uv = J.create({
|
|
15811
15805
|
name: "shapeTextbox",
|
|
15812
15806
|
group: "block",
|
|
15813
15807
|
content: "paragraph* block*",
|
|
@@ -15840,7 +15834,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
|
|
|
15840
15834
|
0
|
|
15841
15835
|
];
|
|
15842
15836
|
}
|
|
15843
|
-
}), fv =
|
|
15837
|
+
}), fv = J.create({
|
|
15844
15838
|
name: "contentBlock",
|
|
15845
15839
|
group: "block",
|
|
15846
15840
|
content: "",
|
|
@@ -16519,14 +16513,14 @@ const hv = "track-insert", Zu = Oe.create({
|
|
|
16519
16513
|
addPmPlugins() {
|
|
16520
16514
|
const t = (n) => {
|
|
16521
16515
|
if (n.doc.textBetween(0, n.doc.content.size, " ", " ") !== "") return P.empty;
|
|
16522
|
-
const { $from: o } = n.selection, i =
|
|
16516
|
+
const { $from: o } = n.selection, i = F.node(o.before(), o.after(), {
|
|
16523
16517
|
"data-placeholder": this.options.placeholder,
|
|
16524
16518
|
class: "sd-editor-placeholder"
|
|
16525
16519
|
});
|
|
16526
16520
|
return P.create(n.doc, [i]);
|
|
16527
16521
|
};
|
|
16528
|
-
return [new
|
|
16529
|
-
key: new
|
|
16522
|
+
return [new X({
|
|
16523
|
+
key: new K("placeholder"),
|
|
16530
16524
|
state: {
|
|
16531
16525
|
init: (n, r) => t(r),
|
|
16532
16526
|
apply: (n, r, o, i) => t(i)
|
|
@@ -16539,9 +16533,9 @@ const hv = "track-insert", Zu = Oe.create({
|
|
|
16539
16533
|
})];
|
|
16540
16534
|
}
|
|
16541
16535
|
});
|
|
16542
|
-
var Ee = "top", Ue = "bottom", qe = "right", Ne = "left", Gs = "auto",
|
|
16536
|
+
var Ee = "top", Ue = "bottom", qe = "right", Ne = "left", Gs = "auto", zr = [Ee, Ue, qe, Ne], Rn = "start", Mr = "end", wv = "clippingParents", tf = "viewport", Gn = "popper", vv = "reference", Vl = /* @__PURE__ */ zr.reduce(function(t, e) {
|
|
16543
16537
|
return t.concat([e + "-" + Rn, e + "-" + Mr]);
|
|
16544
|
-
}, []), nf = /* @__PURE__ */ [].concat(
|
|
16538
|
+
}, []), nf = /* @__PURE__ */ [].concat(zr, [Gs]).reduce(function(t, e) {
|
|
16545
16539
|
return t.concat([e, e + "-" + Rn, e + "-" + Mr]);
|
|
16546
16540
|
}, []), kv = "beforeRead", xv = "read", Sv = "afterRead", Cv = "beforeMain", Mv = "main", Av = "afterMain", Ov = "beforeWrite", Tv = "write", Dv = "afterWrite", Ev = [kv, xv, Sv, Cv, Mv, Av, Ov, Tv, Dv];
|
|
16547
16541
|
function lt(t) {
|
|
@@ -16615,7 +16609,7 @@ const rf = {
|
|
|
16615
16609
|
function it(t) {
|
|
16616
16610
|
return t.split("-")[0];
|
|
16617
16611
|
}
|
|
16618
|
-
var an = Math.max,
|
|
16612
|
+
var an = Math.max, zo = Math.min, Ln = Math.round;
|
|
16619
16613
|
function ws() {
|
|
16620
16614
|
var t = navigator.userAgentData;
|
|
16621
16615
|
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
@@ -16708,7 +16702,7 @@ function Rv(t) {
|
|
|
16708
16702
|
}
|
|
16709
16703
|
return null;
|
|
16710
16704
|
}
|
|
16711
|
-
function
|
|
16705
|
+
function $r(t) {
|
|
16712
16706
|
for (var e = Fe(t), n = Hl(t); n && Iv(n) && xt(n).position === "static"; )
|
|
16713
16707
|
n = Hl(n);
|
|
16714
16708
|
return n && (lt(n) === "html" || lt(n) === "body" && xt(n).position === "static") ? e : n || Rv(t) || e;
|
|
@@ -16717,7 +16711,7 @@ function ea(t) {
|
|
|
16717
16711
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
16718
16712
|
}
|
|
16719
16713
|
function ar(t, e, n) {
|
|
16720
|
-
return an(t,
|
|
16714
|
+
return an(t, zo(e, n));
|
|
16721
16715
|
}
|
|
16722
16716
|
function Lv(t, e, n) {
|
|
16723
16717
|
var r = ar(t, e, n);
|
|
@@ -16742,13 +16736,13 @@ function cf(t, e) {
|
|
|
16742
16736
|
var Fv = function(e, n) {
|
|
16743
16737
|
return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
|
|
16744
16738
|
placement: n.placement
|
|
16745
|
-
})) : e, lf(typeof e != "number" ? e : cf(e,
|
|
16739
|
+
})) : e, lf(typeof e != "number" ? e : cf(e, zr));
|
|
16746
16740
|
};
|
|
16747
16741
|
function Bv(t) {
|
|
16748
16742
|
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = it(n.placement), l = ea(a), c = [Ne, qe].indexOf(a) >= 0, d = c ? "height" : "width";
|
|
16749
16743
|
if (!(!i || !s)) {
|
|
16750
|
-
var u = Fv(o.padding, n), f = Qs(i), p = l === "y" ? Ee : Ne, h = l === "y" ? Ue : qe, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b =
|
|
16751
|
-
n.modifiersData[r] = (e = {}, e[
|
|
16744
|
+
var u = Fv(o.padding, n), f = Qs(i), p = l === "y" ? Ee : Ne, h = l === "y" ? Ue : qe, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = $r(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, x = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + x, M = ar(y, k, S), B = l;
|
|
16745
|
+
n.modifiersData[r] = (e = {}, e[B] = M, e.centerOffset = M - k, e);
|
|
16752
16746
|
}
|
|
16753
16747
|
}
|
|
16754
16748
|
function zv(t) {
|
|
@@ -16791,8 +16785,8 @@ function jl(t) {
|
|
|
16791
16785
|
p = g.x, m = g.y;
|
|
16792
16786
|
var b = s.hasOwnProperty("x"), w = s.hasOwnProperty("y"), x = Ne, y = Ee, S = window;
|
|
16793
16787
|
if (c) {
|
|
16794
|
-
var k =
|
|
16795
|
-
if (k === Fe(n) && (k = Ut(n), xt(k).position !== "static" && a === "absolute" && (M = "scrollHeight",
|
|
16788
|
+
var k = $r(n), M = "clientHeight", B = "clientWidth";
|
|
16789
|
+
if (k === Fe(n) && (k = Ut(n), xt(k).position !== "static" && a === "absolute" && (M = "scrollHeight", B = "scrollWidth")), k = k, o === Ee || (o === Ne || o === qe) && i === Mr) {
|
|
16796
16790
|
y = Ue;
|
|
16797
16791
|
var C = u && k === S && S.visualViewport ? S.visualViewport.height : (
|
|
16798
16792
|
// $FlowFixMe[prop-missing]
|
|
@@ -16804,21 +16798,21 @@ function jl(t) {
|
|
|
16804
16798
|
x = qe;
|
|
16805
16799
|
var V = u && k === S && S.visualViewport ? S.visualViewport.width : (
|
|
16806
16800
|
// $FlowFixMe[prop-missing]
|
|
16807
|
-
k[
|
|
16801
|
+
k[B]
|
|
16808
16802
|
);
|
|
16809
16803
|
p -= V - r.width, p *= l ? 1 : -1;
|
|
16810
16804
|
}
|
|
16811
16805
|
}
|
|
16812
16806
|
var $ = Object.assign({
|
|
16813
16807
|
position: a
|
|
16814
|
-
}, c && _v),
|
|
16808
|
+
}, c && _v), z = d === !0 ? Vv({
|
|
16815
16809
|
x: p,
|
|
16816
16810
|
y: m
|
|
16817
16811
|
}, Fe(n)) : {
|
|
16818
16812
|
x: p,
|
|
16819
16813
|
y: m
|
|
16820
16814
|
};
|
|
16821
|
-
if (p =
|
|
16815
|
+
if (p = z.x, m = z.y, l) {
|
|
16822
16816
|
var H;
|
|
16823
16817
|
return Object.assign({}, $, (H = {}, H[y] = w ? "0" : "", H[x] = b ? "0" : "", H.transform = (S.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + m + "px)" : "translate3d(" + p + "px, " + m + "px, 0)", H));
|
|
16824
16818
|
}
|
|
@@ -16854,17 +16848,17 @@ const jv = {
|
|
|
16854
16848
|
fn: Hv,
|
|
16855
16849
|
data: {}
|
|
16856
16850
|
};
|
|
16857
|
-
var
|
|
16851
|
+
var so = {
|
|
16858
16852
|
passive: !0
|
|
16859
16853
|
};
|
|
16860
16854
|
function Wv(t) {
|
|
16861
16855
|
var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? !0 : o, s = r.resize, a = s === void 0 ? !0 : s, l = Fe(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
16862
16856
|
return i && c.forEach(function(d) {
|
|
16863
|
-
d.addEventListener("scroll", n.update,
|
|
16864
|
-
}), a && l.addEventListener("resize", n.update,
|
|
16857
|
+
d.addEventListener("scroll", n.update, so);
|
|
16858
|
+
}), a && l.addEventListener("resize", n.update, so), function() {
|
|
16865
16859
|
i && c.forEach(function(d) {
|
|
16866
|
-
d.removeEventListener("scroll", n.update,
|
|
16867
|
-
}), a && l.removeEventListener("resize", n.update,
|
|
16860
|
+
d.removeEventListener("scroll", n.update, so);
|
|
16861
|
+
}), a && l.removeEventListener("resize", n.update, so);
|
|
16868
16862
|
};
|
|
16869
16863
|
}
|
|
16870
16864
|
const Uv = {
|
|
@@ -16882,7 +16876,7 @@ var qv = {
|
|
|
16882
16876
|
bottom: "top",
|
|
16883
16877
|
top: "bottom"
|
|
16884
16878
|
};
|
|
16885
|
-
function
|
|
16879
|
+
function xo(t) {
|
|
16886
16880
|
return t.replace(/left|right|bottom|top/g, function(e) {
|
|
16887
16881
|
return qv[e];
|
|
16888
16882
|
});
|
|
@@ -16961,7 +16955,7 @@ function Ul(t, e, n) {
|
|
|
16961
16955
|
return e === tf ? vs(Xv(t, n)) : fn(e) ? Yv(e, n) : vs(Jv(Ut(t)));
|
|
16962
16956
|
}
|
|
16963
16957
|
function Gv(t) {
|
|
16964
|
-
var e = lr(Jo(t)), n = ["absolute", "fixed"].indexOf(xt(t).position) >= 0, r = n && We(t) ?
|
|
16958
|
+
var e = lr(Jo(t)), n = ["absolute", "fixed"].indexOf(xt(t).position) >= 0, r = n && We(t) ? $r(t) : t;
|
|
16965
16959
|
return fn(r) ? e.filter(function(o) {
|
|
16966
16960
|
return fn(o) && sf(o, r) && lt(o) !== "body";
|
|
16967
16961
|
}) : [];
|
|
@@ -16969,7 +16963,7 @@ function Gv(t) {
|
|
|
16969
16963
|
function Zv(t, e, n, r) {
|
|
16970
16964
|
var o = e === "clippingParents" ? Gv(t) : [].concat(e), i = [].concat(o, [n]), s = i[0], a = i.reduce(function(l, c) {
|
|
16971
16965
|
var d = Ul(t, c, r);
|
|
16972
|
-
return l.top = an(d.top, l.top), l.right =
|
|
16966
|
+
return l.top = an(d.top, l.top), l.right = zo(d.right, l.right), l.bottom = zo(d.bottom, l.bottom), l.left = an(d.left, l.left), l;
|
|
16973
16967
|
}, Ul(t, s, r));
|
|
16974
16968
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
16975
16969
|
}
|
|
@@ -17022,21 +17016,21 @@ function uf(t) {
|
|
|
17022
17016
|
}
|
|
17023
17017
|
function Ar(t, e) {
|
|
17024
17018
|
e === void 0 && (e = {});
|
|
17025
|
-
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? wv : a, c = n.rootBoundary, d = c === void 0 ? tf : c, u = n.elementContext, f = u === void 0 ? Gn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = lf(typeof g != "number" ? g : cf(g,
|
|
17019
|
+
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? wv : a, c = n.rootBoundary, d = c === void 0 ? tf : c, u = n.elementContext, f = u === void 0 ? Gn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = lf(typeof g != "number" ? g : cf(g, zr)), w = f === Gn ? vv : Gn, x = t.rects.popper, y = t.elements[h ? w : f], S = Zv(fn(y) ? y : y.contextElement || Ut(t.elements.popper), l, d, s), k = Fn(t.elements.reference), M = uf({
|
|
17026
17020
|
reference: k,
|
|
17027
17021
|
element: x,
|
|
17028
17022
|
placement: o
|
|
17029
|
-
}),
|
|
17023
|
+
}), B = vs(Object.assign({}, x, M)), C = f === Gn ? B : k, V = {
|
|
17030
17024
|
top: S.top - C.top + b.top,
|
|
17031
17025
|
bottom: C.bottom - S.bottom + b.bottom,
|
|
17032
17026
|
left: S.left - C.left + b.left,
|
|
17033
17027
|
right: C.right - S.right + b.right
|
|
17034
17028
|
}, $ = t.modifiersData.offset;
|
|
17035
17029
|
if (f === Gn && $) {
|
|
17036
|
-
var
|
|
17030
|
+
var z = $[o];
|
|
17037
17031
|
Object.keys(V).forEach(function(H) {
|
|
17038
17032
|
var ie = [qe, Ue].indexOf(H) >= 0 ? 1 : -1, ae = [Ee, Ue].indexOf(H) >= 0 ? "y" : "x";
|
|
17039
|
-
V[H] +=
|
|
17033
|
+
V[H] += z[ae] * ie;
|
|
17040
17034
|
});
|
|
17041
17035
|
}
|
|
17042
17036
|
return V;
|
|
@@ -17045,7 +17039,7 @@ function Qv(t, e) {
|
|
|
17045
17039
|
e === void 0 && (e = {});
|
|
17046
17040
|
var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? nf : l, d = Bn(r), u = d ? a ? Vl : Vl.filter(function(h) {
|
|
17047
17041
|
return Bn(h) === d;
|
|
17048
|
-
}) :
|
|
17042
|
+
}) : zr, f = u.filter(function(h) {
|
|
17049
17043
|
return c.indexOf(h) >= 0;
|
|
17050
17044
|
});
|
|
17051
17045
|
f.length === 0 && (f = u);
|
|
@@ -17064,13 +17058,13 @@ function Qv(t, e) {
|
|
|
17064
17058
|
function ek(t) {
|
|
17065
17059
|
if (it(t) === Gs)
|
|
17066
17060
|
return [];
|
|
17067
|
-
var e =
|
|
17061
|
+
var e = xo(t);
|
|
17068
17062
|
return [Wl(t), e, Wl(e)];
|
|
17069
17063
|
}
|
|
17070
17064
|
function tk(t) {
|
|
17071
17065
|
var e = t.state, n = t.options, r = t.name;
|
|
17072
17066
|
if (!e.modifiersData[r]._skip) {
|
|
17073
|
-
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = it(g), w = b === g, x = l || (w || !h ? [
|
|
17067
|
+
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = it(g), w = b === g, x = l || (w || !h ? [xo(g)] : ek(g)), y = [g].concat(x).reduce(function(Ke, Pe) {
|
|
17074
17068
|
return Ke.concat(it(Pe) === Gs ? Qv(e, {
|
|
17075
17069
|
placement: Pe,
|
|
17076
17070
|
boundary: d,
|
|
@@ -17079,25 +17073,25 @@ function tk(t) {
|
|
|
17079
17073
|
flipVariations: h,
|
|
17080
17074
|
allowedAutoPlacements: m
|
|
17081
17075
|
}) : Pe);
|
|
17082
|
-
}, []), S = e.rects.reference, k = e.rects.popper, M = /* @__PURE__ */ new Map(),
|
|
17083
|
-
var $ = y[V],
|
|
17076
|
+
}, []), S = e.rects.reference, k = e.rects.popper, M = /* @__PURE__ */ new Map(), B = !0, C = y[0], V = 0; V < y.length; V++) {
|
|
17077
|
+
var $ = y[V], z = it($), H = Bn($) === Rn, ie = [Ee, Ue].indexOf(z) >= 0, ae = ie ? "width" : "height", fe = Ar(e, {
|
|
17084
17078
|
placement: $,
|
|
17085
17079
|
boundary: d,
|
|
17086
17080
|
rootBoundary: u,
|
|
17087
17081
|
altBoundary: f,
|
|
17088
17082
|
padding: c
|
|
17089
17083
|
}), se = ie ? H ? qe : Ne : H ? Ue : Ee;
|
|
17090
|
-
S[ae] > k[ae] && (se =
|
|
17091
|
-
var Q =
|
|
17092
|
-
if (i && pe.push(fe[
|
|
17084
|
+
S[ae] > k[ae] && (se = xo(se));
|
|
17085
|
+
var Q = xo(se), pe = [];
|
|
17086
|
+
if (i && pe.push(fe[z] <= 0), a && pe.push(fe[se] <= 0, fe[Q] <= 0), pe.every(function(Ke) {
|
|
17093
17087
|
return Ke;
|
|
17094
17088
|
})) {
|
|
17095
|
-
C = $,
|
|
17089
|
+
C = $, B = !1;
|
|
17096
17090
|
break;
|
|
17097
17091
|
}
|
|
17098
17092
|
M.set($, pe);
|
|
17099
17093
|
}
|
|
17100
|
-
if (
|
|
17094
|
+
if (B)
|
|
17101
17095
|
for (var he = h ? 3 : 1, Te = function(Pe) {
|
|
17102
17096
|
var Xe = y.find(function(Ct) {
|
|
17103
17097
|
var Je = M.get(Ct);
|
|
@@ -17213,7 +17207,7 @@ function uk(t) {
|
|
|
17213
17207
|
rootBoundary: c,
|
|
17214
17208
|
padding: u,
|
|
17215
17209
|
altBoundary: d
|
|
17216
|
-
}), b = it(e.placement), w = Bn(e.placement), x = !w, y = ea(b), S = dk(y), k = e.modifiersData.popperOffsets, M = e.rects.reference,
|
|
17210
|
+
}), b = it(e.placement), w = Bn(e.placement), x = !w, y = ea(b), S = dk(y), k = e.modifiersData.popperOffsets, M = e.rects.reference, B = e.rects.popper, C = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
17217
17211
|
placement: e.placement
|
|
17218
17212
|
})) : m, V = typeof C == "number" ? {
|
|
17219
17213
|
mainAxis: C,
|
|
@@ -17221,23 +17215,23 @@ function uk(t) {
|
|
|
17221
17215
|
} : Object.assign({
|
|
17222
17216
|
mainAxis: 0,
|
|
17223
17217
|
altAxis: 0
|
|
17224
|
-
}, C), $ = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null,
|
|
17218
|
+
}, C), $ = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, z = {
|
|
17225
17219
|
x: 0,
|
|
17226
17220
|
y: 0
|
|
17227
17221
|
};
|
|
17228
17222
|
if (k) {
|
|
17229
17223
|
if (i) {
|
|
17230
|
-
var H, ie = y === "y" ? Ee : Ne, ae = y === "y" ? Ue : qe, fe = y === "y" ? "height" : "width", se = k[y], Q = se + g[ie], pe = se - g[ae], he = p ? -
|
|
17224
|
+
var H, ie = y === "y" ? Ee : Ne, ae = y === "y" ? Ue : qe, fe = y === "y" ? "height" : "width", se = k[y], Q = se + g[ie], pe = se - g[ae], he = p ? -B[fe] / 2 : 0, Te = w === Rn ? M[fe] : B[fe], Be = w === Rn ? -B[fe] : -M[fe], dt = e.elements.arrow, Ke = p && dt ? Qs(dt) : {
|
|
17231
17225
|
width: 0,
|
|
17232
17226
|
height: 0
|
|
17233
|
-
}, Pe = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : af(), Xe = Pe[ie], Ct = Pe[ae], Je = ar(0, M[fe], Ke[fe]), pn = x ? M[fe] / 2 - he - Je - Xe - V.mainAxis : Te - Je - Xe - V.mainAxis, Mt = x ? -M[fe] / 2 + he + Je + Ct + V.mainAxis : Be + Je + Ct + V.mainAxis, hn = e.elements.arrow &&
|
|
17234
|
-
k[y] = Un,
|
|
17227
|
+
}, Pe = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : af(), Xe = Pe[ie], Ct = Pe[ae], Je = ar(0, M[fe], Ke[fe]), pn = x ? M[fe] / 2 - he - Je - Xe - V.mainAxis : Te - Je - Xe - V.mainAxis, Mt = x ? -M[fe] / 2 + he + Je + Ct + V.mainAxis : Be + Je + Ct + V.mainAxis, hn = e.elements.arrow && $r(e.elements.arrow), Vr = hn ? y === "y" ? hn.clientTop || 0 : hn.clientLeft || 0 : 0, Wn = (H = $?.[y]) != null ? H : 0, Hr = se + pn - Wn - Vr, jr = se + Mt - Wn, Un = ar(p ? zo(Q, Hr) : Q, se, p ? an(pe, jr) : pe);
|
|
17228
|
+
k[y] = Un, z[y] = Un - se;
|
|
17235
17229
|
}
|
|
17236
17230
|
if (a) {
|
|
17237
|
-
var qn,
|
|
17238
|
-
k[S] =
|
|
17231
|
+
var qn, Wr = y === "x" ? Ee : Ne, Ur = y === "x" ? Ue : qe, ut = k[S], At = S === "y" ? "height" : "width", Kn = ut + g[Wr], qt = ut - g[Ur], Xn = [Ee, Ne].indexOf(b) !== -1, qr = (qn = $?.[S]) != null ? qn : 0, Kr = Xn ? Kn : ut - M[At] - B[At] - qr + V.altAxis, Xr = Xn ? ut + M[At] + B[At] - qr - V.altAxis : qt, Jr = p && Xn ? Lv(Kr, ut, Xr) : ar(p ? Kr : Kn, ut, p ? Xr : qt);
|
|
17232
|
+
k[S] = Jr, z[S] = Jr - ut;
|
|
17239
17233
|
}
|
|
17240
|
-
e.modifiersData[r] =
|
|
17234
|
+
e.modifiersData[r] = z;
|
|
17241
17235
|
}
|
|
17242
17236
|
}
|
|
17243
17237
|
const fk = {
|
|
@@ -17377,7 +17371,7 @@ function kk(t) {
|
|
|
17377
17371
|
var b = d.elements, w = b.reference, x = b.popper;
|
|
17378
17372
|
if (Jl(w, x)) {
|
|
17379
17373
|
d.rects = {
|
|
17380
|
-
reference: gk(w,
|
|
17374
|
+
reference: gk(w, $r(x), d.options.strategy === "fixed"),
|
|
17381
17375
|
popper: Qs(x)
|
|
17382
17376
|
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(V) {
|
|
17383
17377
|
return d.modifiersData[V.name] = Object.assign({}, V.data);
|
|
@@ -17387,10 +17381,10 @@ function kk(t) {
|
|
|
17387
17381
|
d.reset = !1, y = -1;
|
|
17388
17382
|
continue;
|
|
17389
17383
|
}
|
|
17390
|
-
var S = d.orderedModifiers[y], k = S.fn, M = S.options,
|
|
17384
|
+
var S = d.orderedModifiers[y], k = S.fn, M = S.options, B = M === void 0 ? {} : M, C = S.name;
|
|
17391
17385
|
typeof k == "function" && (d = k({
|
|
17392
17386
|
state: d,
|
|
17393
|
-
options:
|
|
17387
|
+
options: B,
|
|
17394
17388
|
name: C,
|
|
17395
17389
|
instance: p
|
|
17396
17390
|
}) || d);
|
|
@@ -17495,7 +17489,7 @@ function Dk(t) {
|
|
|
17495
17489
|
function Ek(t) {
|
|
17496
17490
|
return t.split("-")[0];
|
|
17497
17491
|
}
|
|
17498
|
-
function
|
|
17492
|
+
function $o(t) {
|
|
17499
17493
|
return [].slice.call(t);
|
|
17500
17494
|
}
|
|
17501
17495
|
function Zl(t) {
|
|
@@ -17521,7 +17515,7 @@ function Ik(t) {
|
|
|
17521
17515
|
return !!(t && t._tippy && t._tippy.reference === t);
|
|
17522
17516
|
}
|
|
17523
17517
|
function Rk(t) {
|
|
17524
|
-
return Or(t) ? [t] : Nk(t) ?
|
|
17518
|
+
return Or(t) ? [t] : Nk(t) ? $o(t) : Array.isArray(t) ? t : $o(document.querySelectorAll(t));
|
|
17525
17519
|
}
|
|
17526
17520
|
function xi(t, e) {
|
|
17527
17521
|
t.forEach(function(n) {
|
|
@@ -17771,7 +17765,7 @@ function ic(t, e) {
|
|
|
17771
17765
|
Or(e.content) ? (xs(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? xs(t, e.content) : t.textContent = e.content);
|
|
17772
17766
|
}
|
|
17773
17767
|
function Ss(t) {
|
|
17774
|
-
var e = t.firstElementChild, n =
|
|
17768
|
+
var e = t.firstElementChild, n = $o(e.children);
|
|
17775
17769
|
return {
|
|
17776
17770
|
box: e,
|
|
17777
17771
|
content: n.find(function(r) {
|
|
@@ -17800,9 +17794,9 @@ function xf(t) {
|
|
|
17800
17794
|
};
|
|
17801
17795
|
}
|
|
17802
17796
|
xf.$$tippy = !0;
|
|
17803
|
-
var Yk = 1,
|
|
17797
|
+
var Yk = 1, ao = [], Ci = [];
|
|
17804
17798
|
function Gk(t, e) {
|
|
17805
|
-
var n = rc(t, Object.assign({}, Re, vf(Zl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Yl(
|
|
17799
|
+
var n = rc(t, Object.assign({}, Re, vf(Zl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Yl(Hr, n.interactiveDebounce), m, g = Yk++, b = null, w = Dk(n.plugins), x = {
|
|
17806
17800
|
// Is the instance currently enabled?
|
|
17807
17801
|
isEnabled: !0,
|
|
17808
17802
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -17823,14 +17817,14 @@ function Gk(t, e) {
|
|
|
17823
17817
|
state: x,
|
|
17824
17818
|
plugins: w,
|
|
17825
17819
|
// methods
|
|
17826
|
-
clearDelayTimeouts:
|
|
17827
|
-
setProps:
|
|
17828
|
-
setContent:
|
|
17820
|
+
clearDelayTimeouts: Kr,
|
|
17821
|
+
setProps: Xr,
|
|
17822
|
+
setContent: Jr,
|
|
17829
17823
|
show: Mf,
|
|
17830
17824
|
hide: Af,
|
|
17831
17825
|
hideWithInteractivity: Of,
|
|
17832
17826
|
enable: Xn,
|
|
17833
|
-
disable:
|
|
17827
|
+
disable: qr,
|
|
17834
17828
|
unmount: Tf,
|
|
17835
17829
|
destroy: Df
|
|
17836
17830
|
};
|
|
@@ -17838,7 +17832,7 @@ function Gk(t, e) {
|
|
|
17838
17832
|
return oe.env.NODE_ENV !== "production" && ks(!0, "render() function has not been supplied."), y;
|
|
17839
17833
|
var S = n.render(y), k = S.popper, M = S.onUpdate;
|
|
17840
17834
|
k.setAttribute("data-tippy-root", ""), k.id = "tippy-" + y.id, y.popper = k, t._tippy = y, k._tippy = y;
|
|
17841
|
-
var
|
|
17835
|
+
var B = w.map(function(v) {
|
|
17842
17836
|
return v.fn(y);
|
|
17843
17837
|
}), C = t.hasAttribute("aria-expanded");
|
|
17844
17838
|
return hn(), he(), se(), Q("onCreate", [y]), n.showOnCreate && Kn(), k.addEventListener("mouseenter", function() {
|
|
@@ -17853,7 +17847,7 @@ function Gk(t, e) {
|
|
|
17853
17847
|
function $() {
|
|
17854
17848
|
return V()[0] === "hold";
|
|
17855
17849
|
}
|
|
17856
|
-
function
|
|
17850
|
+
function z() {
|
|
17857
17851
|
var v;
|
|
17858
17852
|
return !!((v = y.props.render) != null && v.$$tippy);
|
|
17859
17853
|
}
|
|
@@ -17874,7 +17868,7 @@ function Gk(t, e) {
|
|
|
17874
17868
|
v === void 0 && (v = !1), k.style.pointerEvents = y.props.interactive && !v ? "" : "none", k.style.zIndex = "" + y.props.zIndex;
|
|
17875
17869
|
}
|
|
17876
17870
|
function Q(v, O, L) {
|
|
17877
|
-
if (L === void 0 && (L = !0),
|
|
17871
|
+
if (L === void 0 && (L = !0), B.forEach(function(U) {
|
|
17878
17872
|
U[v] && U[v].apply(U, O);
|
|
17879
17873
|
}), L) {
|
|
17880
17874
|
var q;
|
|
@@ -17905,7 +17899,7 @@ function Gk(t, e) {
|
|
|
17905
17899
|
}
|
|
17906
17900
|
}
|
|
17907
17901
|
function Te() {
|
|
17908
|
-
ie().removeEventListener("mousemove", h),
|
|
17902
|
+
ie().removeEventListener("mousemove", h), ao = ao.filter(function(v) {
|
|
17909
17903
|
return v !== h;
|
|
17910
17904
|
});
|
|
17911
17905
|
}
|
|
@@ -17972,13 +17966,13 @@ function Gk(t, e) {
|
|
|
17972
17966
|
function hn() {
|
|
17973
17967
|
$() && (Mt("touchstart", Wn, {
|
|
17974
17968
|
passive: !0
|
|
17975
|
-
}), Mt("touchend",
|
|
17969
|
+
}), Mt("touchend", jr, {
|
|
17976
17970
|
passive: !0
|
|
17977
17971
|
})), Tk(y.props.trigger).forEach(function(v) {
|
|
17978
17972
|
if (v !== "manual")
|
|
17979
17973
|
switch (Mt(v, Wn), v) {
|
|
17980
17974
|
case "mouseenter":
|
|
17981
|
-
Mt("mouseleave",
|
|
17975
|
+
Mt("mouseleave", jr);
|
|
17982
17976
|
break;
|
|
17983
17977
|
case "focus":
|
|
17984
17978
|
Mt(Vk ? "focusout" : "blur", Un);
|
|
@@ -17989,7 +17983,7 @@ function Gk(t, e) {
|
|
|
17989
17983
|
}
|
|
17990
17984
|
});
|
|
17991
17985
|
}
|
|
17992
|
-
function
|
|
17986
|
+
function Vr() {
|
|
17993
17987
|
p.forEach(function(v) {
|
|
17994
17988
|
var O = v.node, L = v.eventType, q = v.handler, U = v.options;
|
|
17995
17989
|
O.removeEventListener(L, q, U);
|
|
@@ -17999,12 +17993,12 @@ function Gk(t, e) {
|
|
|
17999
17993
|
var O, L = !1;
|
|
18000
17994
|
if (!(!y.state.isEnabled || qn(v) || a)) {
|
|
18001
17995
|
var q = ((O = d) == null ? void 0 : O.type) === "focus";
|
|
18002
|
-
d = v, m = v.currentTarget, he(), !y.state.isVisible && Pk(v) &&
|
|
17996
|
+
d = v, m = v.currentTarget, he(), !y.state.isVisible && Pk(v) && ao.forEach(function(U) {
|
|
18003
17997
|
return U(v);
|
|
18004
17998
|
}), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? L = !0 : Kn(v), v.type === "click" && (s = !L), L && !q && qt(v);
|
|
18005
17999
|
}
|
|
18006
18000
|
}
|
|
18007
|
-
function
|
|
18001
|
+
function Hr(v) {
|
|
18008
18002
|
var O = v.target, L = H().contains(O) || k.contains(O);
|
|
18009
18003
|
if (!(v.type === "mousemove" && L)) {
|
|
18010
18004
|
var q = At().concat(k).map(function(U) {
|
|
@@ -18018,7 +18012,7 @@ function Gk(t, e) {
|
|
|
18018
18012
|
Fk(q, v) && (Te(), qt(v));
|
|
18019
18013
|
}
|
|
18020
18014
|
}
|
|
18021
|
-
function
|
|
18015
|
+
function jr(v) {
|
|
18022
18016
|
var O = qn(v) || y.props.trigger.indexOf("click") >= 0 && s;
|
|
18023
18017
|
if (!O) {
|
|
18024
18018
|
if (y.props.interactive) {
|
|
@@ -18034,9 +18028,9 @@ function Gk(t, e) {
|
|
|
18034
18028
|
function qn(v) {
|
|
18035
18029
|
return rt.isTouch ? $() !== v.type.indexOf("touch") >= 0 : !1;
|
|
18036
18030
|
}
|
|
18037
|
-
function
|
|
18038
|
-
|
|
18039
|
-
var v = y.props, O = v.popperOptions, L = v.placement, q = v.offset, U = v.getReferenceClientRect, xe = v.moveTransition, ze =
|
|
18031
|
+
function Wr() {
|
|
18032
|
+
Ur();
|
|
18033
|
+
var v = y.props, O = v.popperOptions, L = v.placement, q = v.offset, U = v.getReferenceClientRect, xe = v.moveTransition, ze = z() ? Ss(k).arrow : null, mn = U ? {
|
|
18040
18034
|
getBoundingClientRect: U,
|
|
18041
18035
|
contextElement: U.contextElement || H()
|
|
18042
18036
|
} : t, sa = {
|
|
@@ -18044,12 +18038,12 @@ function Gk(t, e) {
|
|
|
18044
18038
|
enabled: !0,
|
|
18045
18039
|
phase: "beforeWrite",
|
|
18046
18040
|
requires: ["computeStyles"],
|
|
18047
|
-
fn: function(
|
|
18048
|
-
var gn =
|
|
18049
|
-
if (
|
|
18041
|
+
fn: function(Yr) {
|
|
18042
|
+
var gn = Yr.state;
|
|
18043
|
+
if (z()) {
|
|
18050
18044
|
var Ef = ae(), Go = Ef.box;
|
|
18051
|
-
["placement", "reference-hidden", "escaped"].forEach(function(
|
|
18052
|
-
|
|
18045
|
+
["placement", "reference-hidden", "escaped"].forEach(function(Gr) {
|
|
18046
|
+
Gr === "placement" ? Go.setAttribute("data-placement", gn.placement) : gn.attributes.popper["data-popper-" + Gr] ? Go.setAttribute("data-" + Gr, "") : Go.removeAttribute("data-" + Gr);
|
|
18053
18047
|
}), gn.attributes.popper = {};
|
|
18054
18048
|
}
|
|
18055
18049
|
}
|
|
@@ -18079,7 +18073,7 @@ function Gk(t, e) {
|
|
|
18079
18073
|
adaptive: !xe
|
|
18080
18074
|
}
|
|
18081
18075
|
}, sa];
|
|
18082
|
-
|
|
18076
|
+
z() && ze && Kt.push({
|
|
18083
18077
|
name: "arrow",
|
|
18084
18078
|
options: {
|
|
18085
18079
|
element: ze,
|
|
@@ -18091,12 +18085,12 @@ function Gk(t, e) {
|
|
|
18091
18085
|
modifiers: Kt
|
|
18092
18086
|
}));
|
|
18093
18087
|
}
|
|
18094
|
-
function
|
|
18088
|
+
function Ur() {
|
|
18095
18089
|
y.popperInstance && (y.popperInstance.destroy(), y.popperInstance = null);
|
|
18096
18090
|
}
|
|
18097
18091
|
function ut() {
|
|
18098
18092
|
var v = y.props.appendTo, O, L = H();
|
|
18099
|
-
y.props.interactive && v === mf || v === "parent" ? O = L.parentNode : O = gf(v, [L]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0,
|
|
18093
|
+
y.props.interactive && v === mf || v === "parent" ? O = L.parentNode : O = gf(v, [L]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0, Wr(), oe.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Re.appendTo && L.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
18100
18094
|
|
|
18101
18095
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
18102
18096
|
|
|
@@ -18105,7 +18099,7 @@ function Gk(t, e) {
|
|
|
18105
18099
|
`, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
|
|
18106
18100
|
}
|
|
18107
18101
|
function At() {
|
|
18108
|
-
return
|
|
18102
|
+
return $o(k.querySelectorAll("[data-tippy-root]"));
|
|
18109
18103
|
}
|
|
18110
18104
|
function Kn(v) {
|
|
18111
18105
|
y.clearDelayTimeouts(), v && Q("onTrigger", [y, v]), Pe();
|
|
@@ -18131,26 +18125,26 @@ function Gk(t, e) {
|
|
|
18131
18125
|
function Xn() {
|
|
18132
18126
|
y.state.isEnabled = !0;
|
|
18133
18127
|
}
|
|
18134
|
-
function
|
|
18128
|
+
function qr() {
|
|
18135
18129
|
y.hide(), y.state.isEnabled = !1;
|
|
18136
18130
|
}
|
|
18137
|
-
function
|
|
18131
|
+
function Kr() {
|
|
18138
18132
|
clearTimeout(r), clearTimeout(o), cancelAnimationFrame(i);
|
|
18139
18133
|
}
|
|
18140
|
-
function
|
|
18134
|
+
function Xr(v) {
|
|
18141
18135
|
if (oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("setProps")), !y.state.isDestroyed) {
|
|
18142
|
-
Q("onBeforeUpdate", [y, v]),
|
|
18136
|
+
Q("onBeforeUpdate", [y, v]), Vr();
|
|
18143
18137
|
var O = y.props, L = rc(t, Object.assign({}, O, Zl(v), {
|
|
18144
18138
|
ignoreAttributes: !0
|
|
18145
18139
|
}));
|
|
18146
|
-
y.props = L, hn(), O.interactiveDebounce !== L.interactiveDebounce && (Te(), h = Yl(
|
|
18140
|
+
y.props = L, hn(), O.interactiveDebounce !== L.interactiveDebounce && (Te(), h = Yl(Hr, L.interactiveDebounce)), O.triggerTarget && !L.triggerTarget ? Mn(O.triggerTarget).forEach(function(q) {
|
|
18147
18141
|
q.removeAttribute("aria-expanded");
|
|
18148
|
-
}) : L.triggerTarget && t.removeAttribute("aria-expanded"), he(), se(), M && M(O, L), y.popperInstance && (
|
|
18142
|
+
}) : L.triggerTarget && t.removeAttribute("aria-expanded"), he(), se(), M && M(O, L), y.popperInstance && (Wr(), At().forEach(function(q) {
|
|
18149
18143
|
requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
|
|
18150
18144
|
})), Q("onAfterUpdate", [y, v]);
|
|
18151
18145
|
}
|
|
18152
18146
|
}
|
|
18153
|
-
function
|
|
18147
|
+
function Jr(v) {
|
|
18154
18148
|
y.setProps({
|
|
18155
18149
|
content: v
|
|
18156
18150
|
});
|
|
@@ -18159,18 +18153,18 @@ function Gk(t, e) {
|
|
|
18159
18153
|
oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("show"));
|
|
18160
18154
|
var v = y.state.isVisible, O = y.state.isDestroyed, L = !y.state.isEnabled, q = rt.isTouch && !y.props.touch, U = ki(y.props.duration, 0, Re.duration);
|
|
18161
18155
|
if (!(v || O || L || q) && !H().hasAttribute("disabled") && (Q("onShow", [y], !1), y.props.onShow(y) !== !1)) {
|
|
18162
|
-
if (y.state.isVisible = !0,
|
|
18156
|
+
if (y.state.isVisible = !0, z() && (k.style.visibility = "visible"), se(), Pe(), y.state.isMounted || (k.style.transition = "none"), z()) {
|
|
18163
18157
|
var xe = ae(), ze = xe.box, mn = xe.content;
|
|
18164
18158
|
xi([ze, mn], 0);
|
|
18165
18159
|
}
|
|
18166
18160
|
f = function() {
|
|
18167
18161
|
var Kt;
|
|
18168
18162
|
if (!(!y.state.isVisible || c)) {
|
|
18169
|
-
if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition,
|
|
18170
|
-
var Yo = ae(),
|
|
18171
|
-
xi([
|
|
18163
|
+
if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition, z() && y.props.animation) {
|
|
18164
|
+
var Yo = ae(), Yr = Yo.box, gn = Yo.content;
|
|
18165
|
+
xi([Yr, gn], U), Ql([Yr, gn], "visible");
|
|
18172
18166
|
}
|
|
18173
|
-
pe(), he(), Gl(Ci, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), Q("onMount", [y]), y.props.animation &&
|
|
18167
|
+
pe(), he(), Gl(Ci, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), Q("onMount", [y]), y.props.animation && z() && Je(U, function() {
|
|
18174
18168
|
y.state.isShown = !0, Q("onShown", [y]);
|
|
18175
18169
|
});
|
|
18176
18170
|
}
|
|
@@ -18181,28 +18175,28 @@ function Gk(t, e) {
|
|
|
18181
18175
|
oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("hide"));
|
|
18182
18176
|
var v = !y.state.isVisible, O = y.state.isDestroyed, L = !y.state.isEnabled, q = ki(y.props.duration, 1, Re.duration);
|
|
18183
18177
|
if (!(v || O || L) && (Q("onHide", [y], !1), y.props.onHide(y) !== !1)) {
|
|
18184
|
-
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1,
|
|
18178
|
+
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, z() && (k.style.visibility = "hidden"), Te(), Xe(), se(!0), z()) {
|
|
18185
18179
|
var U = ae(), xe = U.box, ze = U.content;
|
|
18186
18180
|
y.props.animation && (xi([xe, ze], q), Ql([xe, ze], "hidden"));
|
|
18187
18181
|
}
|
|
18188
|
-
pe(), he(), y.props.animation ?
|
|
18182
|
+
pe(), he(), y.props.animation ? z() && Ct(q, y.unmount) : y.unmount();
|
|
18189
18183
|
}
|
|
18190
18184
|
}
|
|
18191
18185
|
function Of(v) {
|
|
18192
|
-
oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("hideWithInteractivity")), ie().addEventListener("mousemove", h), Gl(
|
|
18186
|
+
oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("hideWithInteractivity")), ie().addEventListener("mousemove", h), Gl(ao, h), h(v);
|
|
18193
18187
|
}
|
|
18194
18188
|
function Tf() {
|
|
18195
|
-
oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (
|
|
18189
|
+
oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (Ur(), At().forEach(function(v) {
|
|
18196
18190
|
v._tippy.unmount();
|
|
18197
18191
|
}), k.parentNode && k.parentNode.removeChild(k), Ci = Ci.filter(function(v) {
|
|
18198
18192
|
return v !== y;
|
|
18199
18193
|
}), y.state.isMounted = !1, Q("onHidden", [y]));
|
|
18200
18194
|
}
|
|
18201
18195
|
function Df() {
|
|
18202
|
-
oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(),
|
|
18196
|
+
oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Vr(), delete t._tippy, y.state.isDestroyed = !0, Q("onDestroy", [y]));
|
|
18203
18197
|
}
|
|
18204
18198
|
}
|
|
18205
|
-
function
|
|
18199
|
+
function _r(t, e) {
|
|
18206
18200
|
e === void 0 && (e = {});
|
|
18207
18201
|
var n = Re.plugins.concat(e.plugins || []);
|
|
18208
18202
|
oe.env.NODE_ENV !== "production" && (Wk(t), kf(e, n)), $k();
|
|
@@ -18224,9 +18218,9 @@ function $r(t, e) {
|
|
|
18224
18218
|
}, []);
|
|
18225
18219
|
return Or(t) ? a[0] : a;
|
|
18226
18220
|
}
|
|
18227
|
-
|
|
18228
|
-
|
|
18229
|
-
|
|
18221
|
+
_r.defaultProps = Re;
|
|
18222
|
+
_r.setDefaultProps = Kk;
|
|
18223
|
+
_r.currentInput = rt;
|
|
18230
18224
|
Object.assign({}, rf, {
|
|
18231
18225
|
effect: function(e) {
|
|
18232
18226
|
var n = e.state, r = {
|
|
@@ -18244,7 +18238,7 @@ Object.assign({}, rf, {
|
|
|
18244
18238
|
Object.assign(n.elements.popper.style, r.popper), n.styles = r, n.elements.arrow && Object.assign(n.elements.arrow.style, r.arrow);
|
|
18245
18239
|
}
|
|
18246
18240
|
});
|
|
18247
|
-
|
|
18241
|
+
_r.setDefaultProps({
|
|
18248
18242
|
render: xf
|
|
18249
18243
|
});
|
|
18250
18244
|
const Zk = (t, e) => {
|
|
@@ -18313,10 +18307,10 @@ const Zk = (t, e) => {
|
|
|
18313
18307
|
], 42, Qk))), 128))
|
|
18314
18308
|
], 544));
|
|
18315
18309
|
}
|
|
18316
|
-
}, ix = /* @__PURE__ */ Zk(ox, [["__scopeId", "data-v-0a2a8b4e"]]), sc = new
|
|
18310
|
+
}, ix = /* @__PURE__ */ Zk(ox, [["__scopeId", "data-v-0a2a8b4e"]]), sc = new K("popoverPlugin"), sx = Z.create({
|
|
18317
18311
|
name: "popoverPlugin",
|
|
18318
18312
|
addPmPlugins() {
|
|
18319
|
-
return [new
|
|
18313
|
+
return [new X({
|
|
18320
18314
|
key: sc,
|
|
18321
18315
|
state: {
|
|
18322
18316
|
init: () => ({}),
|
|
@@ -18345,7 +18339,7 @@ class ax {
|
|
|
18345
18339
|
const n = e.key === "ArrowDown" || e.key === "ArrowUp";
|
|
18346
18340
|
this.tippyInstance.state.isVisible && n && (e.preventDefault(), this.popover.firstChild.focus());
|
|
18347
18341
|
});
|
|
18348
|
-
this.editor = n, this.view = e, this.popover = document.createElement("div"), this.popover.className = "sd-editor-popover", document.body.appendChild(this.popover), this.tippyInstance =
|
|
18342
|
+
this.editor = n, this.view = e, this.popover = document.createElement("div"), this.popover.className = "sd-editor-popover", document.body.appendChild(this.popover), this.tippyInstance = _r(this.popover, {
|
|
18349
18343
|
trigger: "manual",
|
|
18350
18344
|
placement: "bottom-start",
|
|
18351
18345
|
interactive: !0,
|
|
@@ -18444,7 +18438,7 @@ const lx = !1, cx = Z.create({
|
|
|
18444
18438
|
addPmPlugins() {
|
|
18445
18439
|
const t = this.editor;
|
|
18446
18440
|
let e = !1, n = !1, r = !1, o = !1;
|
|
18447
|
-
return [new
|
|
18441
|
+
return [new X({
|
|
18448
18442
|
key: _t,
|
|
18449
18443
|
state: {
|
|
18450
18444
|
isReadyToInit: !1,
|
|
@@ -18458,7 +18452,7 @@ const lx = !1, cx = Z.create({
|
|
|
18458
18452
|
apply(s, a, l, c) {
|
|
18459
18453
|
const d = s.getMeta(_t);
|
|
18460
18454
|
d && d.isReadyToInit && (n = !0, o = d.isReadyToInit);
|
|
18461
|
-
const u = s.getMeta(
|
|
18455
|
+
const u = s.getMeta(Bo);
|
|
18462
18456
|
if (u) {
|
|
18463
18457
|
if (u.type === "remove") {
|
|
18464
18458
|
const h = u.pos, m = t.view.domAtPos(h).node.querySelector("img");
|
|
@@ -18528,7 +18522,7 @@ const lx = !1, cx = Z.create({
|
|
|
18528
18522
|
if (!e.converter) return P.empty;
|
|
18529
18523
|
const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
|
|
18530
18524
|
if (!o || !i) return P.empty;
|
|
18531
|
-
const s = [zb, _t], { state: a } = t, l =
|
|
18525
|
+
const s = [zb, _t], { state: a } = t, l = fo.create({
|
|
18532
18526
|
schema: a.schema,
|
|
18533
18527
|
doc: a.doc,
|
|
18534
18528
|
plugins: a.plugins.filter((h) => s.includes(h.key))
|
|
@@ -18550,57 +18544,57 @@ function fx(t, e, n, r) {
|
|
|
18550
18544
|
const o = [], { pageSize: i, pageMargins: s } = n.converter.pageStyles, a = i.height * 96;
|
|
18551
18545
|
n.options.scale;
|
|
18552
18546
|
let l = 1, c = a, d = null, u = null;
|
|
18553
|
-
const f = Yt(l, "headerIds", n), p =
|
|
18554
|
-
o.push(
|
|
18547
|
+
const f = Yt(l, "headerIds", n), p = lo(s, i, r, f), h = co({ editor: n, header: p, isFirstHeader: !0 });
|
|
18548
|
+
o.push(F.widget(0, h, { key: "stable-key" }));
|
|
18555
18549
|
const m = Yt(l, "footerIds", n), g = Mi(s, i, r, m);
|
|
18556
18550
|
c -= p.headerHeight + g.footerHeight;
|
|
18557
18551
|
let b = e?.coordsAtPos(t.content.size);
|
|
18558
18552
|
if (!b) return [];
|
|
18559
18553
|
t.descendants((V, $) => {
|
|
18560
|
-
let
|
|
18554
|
+
let z = V, H = $;
|
|
18561
18555
|
if (b = e?.coordsAtPos(H), !b) return;
|
|
18562
|
-
let ie = b.bottom > c, ae =
|
|
18563
|
-
if (
|
|
18564
|
-
const pe = Yt(l, "headerIds", n,
|
|
18556
|
+
let ie = b.bottom > c, ae = z.type.name === "hardBreak";
|
|
18557
|
+
if (z.attrs?.pageBreakSource === "sectPr" && (t.nodeAt(H + z.nodeSize)?.attrs?.pageBreakSource === "sectPr" || (ae = !0), l === 1)) {
|
|
18558
|
+
const pe = Yt(l, "headerIds", n, z);
|
|
18565
18559
|
o.pop();
|
|
18566
|
-
const he =
|
|
18567
|
-
o.push(
|
|
18560
|
+
const he = lo(s, i, r, pe), Te = co({ editor: n, header: he, isFirstHeader: !0 });
|
|
18561
|
+
o.push(F.widget(0, Te, { key: "stable-key" }));
|
|
18568
18562
|
}
|
|
18569
|
-
if (
|
|
18570
|
-
const Q =
|
|
18563
|
+
if (z.type.name === "paragraph" && z.attrs.styleId) {
|
|
18564
|
+
const Q = yo.getState(n.state)?.styles?.find((pe) => pe.id === z.attrs.styleId);
|
|
18571
18565
|
if (Q) {
|
|
18572
18566
|
const { definition: pe = {} } = Q, { pageBreakBefore: he, pageBreakAfter: Te } = pe.attrs || {};
|
|
18573
18567
|
(he || Te) && (ie = !0);
|
|
18574
18568
|
}
|
|
18575
18569
|
}
|
|
18576
18570
|
if (ae || ie) {
|
|
18577
|
-
const se = e.state.doc.resolve(H), Q =
|
|
18578
|
-
Q && (
|
|
18571
|
+
const se = e.state.doc.resolve(H), Q = Br(se, (Je) => Je.type.name === "tableRow");
|
|
18572
|
+
Q && (z = Q.node, H = Q.pos);
|
|
18579
18573
|
const {
|
|
18580
18574
|
top: pe,
|
|
18581
18575
|
bottom: he,
|
|
18582
18576
|
pos: Te
|
|
18583
|
-
} = px(e, H, c), Be = Yt(l, "footerIds", n,
|
|
18577
|
+
} = px(e, H, c), Be = Yt(l, "footerIds", n, z);
|
|
18584
18578
|
l++;
|
|
18585
18579
|
const dt = Yt(l, "headerIds", n);
|
|
18586
|
-
u =
|
|
18587
|
-
const Ke = c - he, { node: Pe } = ac(Ke), Xe =
|
|
18580
|
+
u = lo(s, i, r, dt), d = Mi(s, i, r, Be, l - 1);
|
|
18581
|
+
const Ke = c - he, { node: Pe } = ac(Ke), Xe = F.widget(Te, Pe, { key: "stable-key" });
|
|
18588
18582
|
o.push(Xe);
|
|
18589
|
-
const Ct =
|
|
18590
|
-
o.push(
|
|
18583
|
+
const Ct = co({ editor: n, header: u, footer: d });
|
|
18584
|
+
o.push(F.widget(Te, Ct, { key: "stable-key" })), c = he + (a - u.headerHeight - d.footerHeight);
|
|
18591
18585
|
}
|
|
18592
18586
|
});
|
|
18593
18587
|
let w = t.content.size;
|
|
18594
18588
|
const x = e.coordsAtPos(w), y = Yt(l, "headerIds", n), S = Yt(l, "footerIds", n);
|
|
18595
|
-
u =
|
|
18596
|
-
const k = c - x.bottom, { node: M } = ac(k),
|
|
18597
|
-
o.push(
|
|
18598
|
-
const C =
|
|
18599
|
-
return o.push(
|
|
18600
|
-
const
|
|
18601
|
-
if (
|
|
18602
|
-
const H =
|
|
18603
|
-
H && (
|
|
18589
|
+
u = lo(s, i, r, y), d = Mi(s, i, r, S, l);
|
|
18590
|
+
const k = c - x.bottom, { node: M } = ac(k), B = F.widget(t.content.size, M, { key: "stable-key" });
|
|
18591
|
+
o.push(B);
|
|
18592
|
+
const C = co({ editor: n, footer: d, isLastFooter: !0 });
|
|
18593
|
+
return o.push(F.widget(t.content.size, C, { key: "stable-key" })), o.forEach((V) => {
|
|
18594
|
+
const z = V.type.toDOM?.querySelector('span[data-id="auto-total-pages"]');
|
|
18595
|
+
if (z) {
|
|
18596
|
+
const H = z.previousElementSibling?.style?.fontSize || z.nextElementSibling?.style?.fontSize;
|
|
18597
|
+
H && (z.style.fontSize = H), z.innerText = l;
|
|
18604
18598
|
}
|
|
18605
18599
|
}), o;
|
|
18606
18600
|
}
|
|
@@ -18608,7 +18602,7 @@ function ac(t) {
|
|
|
18608
18602
|
const e = document.createElement("div");
|
|
18609
18603
|
return e.className = "pagination-page-spacer", e.style.userSelect = "none", e.style.pointerEvents = "none", e.style.height = t + "px", { nodeHeight: t, node: e };
|
|
18610
18604
|
}
|
|
18611
|
-
function
|
|
18605
|
+
function lo(t, e, n, r) {
|
|
18612
18606
|
const o = n.headers?.[r], i = t.top * 96, s = t.header * 96, l = o?.height > i - s ? s : 0, c = Math.max(o?.height || 0, i) + l;
|
|
18613
18607
|
let d = o?.sectionContainer?.cloneNode(!0);
|
|
18614
18608
|
return d || (d = document.createElement("div")), d.className = "pagination-section-header", d.style.paddingTop = s + "px", d.style.paddingLeft = t.left * 96 + "px", d.style.paddingRight = t.right * 96 + "px", d.style.height = c + "px", d.style.width = e.width * 96 + "px", {
|
|
@@ -18630,7 +18624,7 @@ function Mi(t, e, n, r, o) {
|
|
|
18630
18624
|
footerHeight: l + a
|
|
18631
18625
|
};
|
|
18632
18626
|
}
|
|
18633
|
-
function
|
|
18627
|
+
function co({ editor: t, header: e, footer: n, footerBottom: r = null, isFirstHeader: o, isLastFooter: i }) {
|
|
18634
18628
|
const { pageSize: s, pageMargins: a } = t.converter.pageStyles;
|
|
18635
18629
|
let l = 0;
|
|
18636
18630
|
const c = document.createElement("div");
|
|
@@ -18883,13 +18877,13 @@ function Oi(t, e, n) {
|
|
|
18883
18877
|
if (!a)
|
|
18884
18878
|
break;
|
|
18885
18879
|
let l = a.from == o.from && a.to == o.to ? "ProseMirror-active-search-match" : "ProseMirror-search-match";
|
|
18886
|
-
r.push(
|
|
18880
|
+
r.push(F.inline(a.from, a.to, { class: l })), i = a.to;
|
|
18887
18881
|
}
|
|
18888
18882
|
return P.create(t.doc, r);
|
|
18889
18883
|
}
|
|
18890
|
-
const dr = new
|
|
18884
|
+
const dr = new K("search");
|
|
18891
18885
|
function vx(t = {}) {
|
|
18892
|
-
return new
|
|
18886
|
+
return new X({
|
|
18893
18887
|
key: dr,
|
|
18894
18888
|
state: {
|
|
18895
18889
|
init(e, n) {
|
|
@@ -18924,8 +18918,29 @@ function kx(t, e, n = null) {
|
|
|
18924
18918
|
return t.setMeta(dr, { query: e, range: n });
|
|
18925
18919
|
}
|
|
18926
18920
|
const xx = Z.create({
|
|
18921
|
+
addStorage() {
|
|
18922
|
+
return {
|
|
18923
|
+
searchResults: []
|
|
18924
|
+
};
|
|
18925
|
+
},
|
|
18927
18926
|
addPmPlugins() {
|
|
18928
|
-
|
|
18927
|
+
const t = this.editor, e = this.storage, n = new X({
|
|
18928
|
+
key: new K("customSearchHighlights"),
|
|
18929
|
+
props: {
|
|
18930
|
+
decorations(r) {
|
|
18931
|
+
if (!t) return null;
|
|
18932
|
+
const o = e?.searchResults;
|
|
18933
|
+
if (!o?.length) return null;
|
|
18934
|
+
const i = o.map(
|
|
18935
|
+
(s, a) => F.inline(s.from, s.to, {
|
|
18936
|
+
id: `search-match-${s.id}`
|
|
18937
|
+
})
|
|
18938
|
+
);
|
|
18939
|
+
return P.create(r.doc, i);
|
|
18940
|
+
}
|
|
18941
|
+
}
|
|
18942
|
+
});
|
|
18943
|
+
return [vx(), n];
|
|
18929
18944
|
},
|
|
18930
18945
|
addCommands() {
|
|
18931
18946
|
return {
|
|
@@ -18935,29 +18950,30 @@ const xx = Z.create({
|
|
|
18935
18950
|
const o = r.children.find((s) => s.local), i = r.children[0] + o.local[0].from + 1;
|
|
18936
18951
|
e.view.domAtPos(i)?.node?.scrollIntoView(!0);
|
|
18937
18952
|
},
|
|
18938
|
-
search: (t) => ({ state: e,
|
|
18939
|
-
let
|
|
18940
|
-
const
|
|
18953
|
+
search: (t) => ({ state: e, editor: n, dispatch: r }) => {
|
|
18954
|
+
let o, i = !1, s = !1;
|
|
18955
|
+
const a = !1;
|
|
18941
18956
|
if (t instanceof RegExp)
|
|
18942
|
-
|
|
18957
|
+
s = !0, o = t.source, i = !t.flags.includes("i");
|
|
18943
18958
|
else if (typeof t == "string" && /^\/(.+)\/([gimsuy]*)$/.test(t)) {
|
|
18944
|
-
const [,
|
|
18945
|
-
|
|
18959
|
+
const [, h, m] = t.match(/^\/(.+)\/([gimsuy]*)$/);
|
|
18960
|
+
s = !0, o = h, i = !m.includes("i");
|
|
18946
18961
|
} else
|
|
18947
|
-
|
|
18948
|
-
const
|
|
18949
|
-
search:
|
|
18950
|
-
caseSensitive:
|
|
18951
|
-
regexp:
|
|
18952
|
-
wholeWord:
|
|
18953
|
-
}),
|
|
18954
|
-
|
|
18955
|
-
const
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
|
|
18959
|
-
|
|
18962
|
+
o = String(t);
|
|
18963
|
+
const l = new Sf({
|
|
18964
|
+
search: o,
|
|
18965
|
+
caseSensitive: i,
|
|
18966
|
+
regexp: s,
|
|
18967
|
+
wholeWord: a
|
|
18968
|
+
}), c = kx(e.tr, l);
|
|
18969
|
+
r(c);
|
|
18970
|
+
const d = e.apply(c), u = uc(d), p = (u ? u.find() : []).map((h) => ({
|
|
18971
|
+
from: h.from,
|
|
18972
|
+
to: h.to,
|
|
18973
|
+
text: d.doc.textBetween(h.from, h.to),
|
|
18974
|
+
id: Pr()
|
|
18960
18975
|
}));
|
|
18976
|
+
return this.storage.searchResults = p, p;
|
|
18961
18977
|
},
|
|
18962
18978
|
goToSearchResult: (t) => ({ state: e, dispatch: n, editor: r }) => {
|
|
18963
18979
|
const { from: o, to: i } = t;
|
|
@@ -19071,9 +19087,9 @@ export {
|
|
|
19071
19087
|
E as A,
|
|
19072
19088
|
ge as C,
|
|
19073
19089
|
Qi as E,
|
|
19074
|
-
|
|
19090
|
+
Bo as I,
|
|
19075
19091
|
Oe as M,
|
|
19076
|
-
|
|
19092
|
+
J as N,
|
|
19077
19093
|
bv as P,
|
|
19078
19094
|
ce as T,
|
|
19079
19095
|
Zk as _,
|