@ahzoo/sus 1.6.1 → 1.6.3
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/index.js +731 -718
- package/index.umd.cjs +20 -20
- package/package.json +1 -1
- package/style.css +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var vu = Object.defineProperty;
|
|
2
2
|
var ju = (o, e, t) => e in o ? vu(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
3
|
+
var kt = (o, e, t) => ju(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as jt, shallowRef as ku, onMounted as na, onBeforeUnmount as As, h as jn, ref as $e, getCurrentInstance as yu, watchEffect as _u, nextTick as Du, unref as en, markRaw as hc, reactive as bc, render as cl, customRef as wu, createElementBlock as ce, openBlock as re, Fragment as Pn, renderList as Ts, createElementVNode as H, watch as Iu, normalizeClass as vc, createTextVNode as Na, toDisplayString as Ke, withDirectives as mt, vShow as $t, vModelText as ti, createVNode as Ai, createCommentVNode as Je, createStaticVNode as dr, pushScopeId as jc, popScopeId as kc, createBlock as oi } from "vue";
|
|
5
5
|
function Fe(o) {
|
|
6
6
|
this.content = o;
|
|
7
7
|
}
|
|
@@ -432,7 +432,7 @@ function Ba(o, e) {
|
|
|
432
432
|
}
|
|
433
433
|
return !0;
|
|
434
434
|
}
|
|
435
|
-
let
|
|
435
|
+
let ue = class Ti {
|
|
436
436
|
/**
|
|
437
437
|
@internal
|
|
438
438
|
*/
|
|
@@ -537,7 +537,7 @@ let de = class Ti {
|
|
|
537
537
|
return t.sort((n, a) => n.type.rank - a.type.rank), t;
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
|
-
|
|
540
|
+
ue.none = [];
|
|
541
541
|
class Ra extends Error {
|
|
542
542
|
}
|
|
543
543
|
class T {
|
|
@@ -835,7 +835,7 @@ class Ln {
|
|
|
835
835
|
marks() {
|
|
836
836
|
let e = this.parent, t = this.index();
|
|
837
837
|
if (e.content.size == 0)
|
|
838
|
-
return
|
|
838
|
+
return ue.none;
|
|
839
839
|
if (this.textOffset)
|
|
840
840
|
return e.child(t).marks;
|
|
841
841
|
let n = e.maybeChild(t - 1), a = e.maybeChild(t);
|
|
@@ -1002,7 +1002,7 @@ let lo = class Bi {
|
|
|
1002
1002
|
/**
|
|
1003
1003
|
@internal
|
|
1004
1004
|
*/
|
|
1005
|
-
constructor(e, t, n, a =
|
|
1005
|
+
constructor(e, t, n, a = ue.none) {
|
|
1006
1006
|
this.type = e, this.attrs = t, this.marks = a, this.content = n || C.empty;
|
|
1007
1007
|
}
|
|
1008
1008
|
/**
|
|
@@ -1110,7 +1110,7 @@ let lo = class Bi {
|
|
|
1110
1110
|
attributes, and marks.
|
|
1111
1111
|
*/
|
|
1112
1112
|
hasMarkup(e, t, n) {
|
|
1113
|
-
return this.type == e && Ba(this.attrs, t || e.defaultAttrs || Mu) &&
|
|
1113
|
+
return this.type == e && Ba(this.attrs, t || e.defaultAttrs || Mu) && ue.sameSet(this.marks, n || ue.none);
|
|
1114
1114
|
}
|
|
1115
1115
|
/**
|
|
1116
1116
|
Create a new node with the same markup as this node, containing
|
|
@@ -1320,12 +1320,12 @@ let lo = class Bi {
|
|
|
1320
1320
|
*/
|
|
1321
1321
|
check() {
|
|
1322
1322
|
this.type.checkContent(this.content), this.type.checkAttrs(this.attrs);
|
|
1323
|
-
let e =
|
|
1323
|
+
let e = ue.none;
|
|
1324
1324
|
for (let t = 0; t < this.marks.length; t++) {
|
|
1325
1325
|
let n = this.marks[t];
|
|
1326
1326
|
n.type.checkAttrs(n.attrs), e = n.addToSet(e);
|
|
1327
1327
|
}
|
|
1328
|
-
if (!
|
|
1328
|
+
if (!ue.sameSet(e, this.marks))
|
|
1329
1329
|
throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t) => t.type.name)}`);
|
|
1330
1330
|
this.content.forEach((t) => t.check());
|
|
1331
1331
|
}
|
|
@@ -1861,7 +1861,7 @@ let gl = class Nc {
|
|
|
1861
1861
|
create(e = null, t, n) {
|
|
1862
1862
|
if (this.isText)
|
|
1863
1863
|
throw new Error("NodeType.create can't construct text nodes");
|
|
1864
|
-
return new lo(this, this.computeAttrs(e), C.from(t),
|
|
1864
|
+
return new lo(this, this.computeAttrs(e), C.from(t), ue.setFrom(n));
|
|
1865
1865
|
}
|
|
1866
1866
|
/**
|
|
1867
1867
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
|
|
@@ -1869,7 +1869,7 @@ let gl = class Nc {
|
|
|
1869
1869
|
if it doesn't match.
|
|
1870
1870
|
*/
|
|
1871
1871
|
createChecked(e = null, t, n) {
|
|
1872
|
-
return t = C.from(t), this.checkContent(t), new lo(this, this.computeAttrs(e), t,
|
|
1872
|
+
return t = C.from(t), this.checkContent(t), new lo(this, this.computeAttrs(e), t, ue.setFrom(n));
|
|
1873
1873
|
}
|
|
1874
1874
|
/**
|
|
1875
1875
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
|
|
@@ -1887,7 +1887,7 @@ let gl = class Nc {
|
|
|
1887
1887
|
t = i.append(t);
|
|
1888
1888
|
}
|
|
1889
1889
|
let a = this.contentMatch.matchFragment(t), s = a && a.fillBefore(C.empty, !0);
|
|
1890
|
-
return s ? new lo(this, e, t.append(s),
|
|
1890
|
+
return s ? new lo(this, e, t.append(s), ue.setFrom(n)) : null;
|
|
1891
1891
|
}
|
|
1892
1892
|
/**
|
|
1893
1893
|
Returns true if the given fragment is valid content for this node
|
|
@@ -1943,7 +1943,7 @@ let gl = class Nc {
|
|
|
1943
1943
|
let t;
|
|
1944
1944
|
for (let n = 0; n < e.length; n++)
|
|
1945
1945
|
this.allowsMarkType(e[n].type) ? t && t.push(e[n]) : t || (t = e.slice(0, n));
|
|
1946
|
-
return t ? t.length ? t :
|
|
1946
|
+
return t ? t.length ? t : ue.none : e;
|
|
1947
1947
|
}
|
|
1948
1948
|
/**
|
|
1949
1949
|
@internal
|
|
@@ -1984,7 +1984,7 @@ class Ns {
|
|
|
1984
1984
|
constructor(e, t, n, a) {
|
|
1985
1985
|
this.name = e, this.rank = t, this.schema = n, this.spec = a, this.attrs = Tc(e, a.attrs), this.excluded = null;
|
|
1986
1986
|
let s = Fc(this.attrs);
|
|
1987
|
-
this.instance = s ? new
|
|
1987
|
+
this.instance = s ? new ue(this, s) : null;
|
|
1988
1988
|
}
|
|
1989
1989
|
/**
|
|
1990
1990
|
Create a mark of this type. `attrs` may be `null` or an object
|
|
@@ -1992,7 +1992,7 @@ class Ns {
|
|
|
1992
1992
|
they have defaults, will be added.
|
|
1993
1993
|
*/
|
|
1994
1994
|
create(e = null) {
|
|
1995
|
-
return !e && this.instance ? this.instance : new
|
|
1995
|
+
return !e && this.instance ? this.instance : new ue(this, Oc(this.attrs, e));
|
|
1996
1996
|
}
|
|
1997
1997
|
/**
|
|
1998
1998
|
@internal
|
|
@@ -2083,7 +2083,7 @@ class Bc {
|
|
|
2083
2083
|
*/
|
|
2084
2084
|
text(e, t) {
|
|
2085
2085
|
let n = this.nodes.text;
|
|
2086
|
-
return new za(n, n.defaultAttrs, e,
|
|
2086
|
+
return new za(n, n.defaultAttrs, e, ue.setFrom(t));
|
|
2087
2087
|
}
|
|
2088
2088
|
/**
|
|
2089
2089
|
Create a mark with the given type and attributes.
|
|
@@ -2103,7 +2103,7 @@ class Bc {
|
|
|
2103
2103
|
bound.
|
|
2104
2104
|
*/
|
|
2105
2105
|
markFromJSON(e) {
|
|
2106
|
-
return
|
|
2106
|
+
return ue.fromJSON(this, e);
|
|
2107
2107
|
}
|
|
2108
2108
|
/**
|
|
2109
2109
|
@internal
|
|
@@ -2164,7 +2164,7 @@ class po {
|
|
|
2164
2164
|
*/
|
|
2165
2165
|
parse(e, t = {}) {
|
|
2166
2166
|
let n = new bl(this, t, !1);
|
|
2167
|
-
return n.addAll(e,
|
|
2167
|
+
return n.addAll(e, ue.none, t.from, t.to), n.finish();
|
|
2168
2168
|
}
|
|
2169
2169
|
/**
|
|
2170
2170
|
Parses the content of the given DOM node, like
|
|
@@ -2176,7 +2176,7 @@ class po {
|
|
|
2176
2176
|
*/
|
|
2177
2177
|
parseSlice(e, t = {}) {
|
|
2178
2178
|
let n = new bl(this, t, !0);
|
|
2179
|
-
return n.addAll(e,
|
|
2179
|
+
return n.addAll(e, ue.none, t.from, t.to), T.maxOpen(n.finish());
|
|
2180
2180
|
}
|
|
2181
2181
|
/**
|
|
2182
2182
|
@internal
|
|
@@ -2298,7 +2298,7 @@ function hl(o, e, t) {
|
|
|
2298
2298
|
}
|
|
2299
2299
|
class ua {
|
|
2300
2300
|
constructor(e, t, n, a, s, i) {
|
|
2301
|
-
this.type = e, this.attrs = t, this.marks = n, this.solid = a, this.options = i, this.content = [], this.activeMarks =
|
|
2301
|
+
this.type = e, this.attrs = t, this.marks = n, this.solid = a, this.options = i, this.content = [], this.activeMarks = ue.none, this.match = s || (i & Ca ? null : e.contentMatch);
|
|
2302
2302
|
}
|
|
2303
2303
|
findWrapping(e) {
|
|
2304
2304
|
if (!this.match) {
|
|
@@ -2333,7 +2333,7 @@ class bl {
|
|
|
2333
2333
|
constructor(e, t, n) {
|
|
2334
2334
|
this.parser = e, this.options = t, this.isOpen = n, this.open = 0;
|
|
2335
2335
|
let a = t.topNode, s, i = hl(null, t.preserveWhitespace, 0) | (n ? Ca : 0);
|
|
2336
|
-
a ? s = new ua(a.type, a.attrs,
|
|
2336
|
+
a ? s = new ua(a.type, a.attrs, ue.none, !0, t.topMatch || a.type.contentMatch, i) : n ? s = new ua(null, null, ue.none, !0, null, i) : s = new ua(e.schema.topNodeType, null, ue.none, !0, null, i), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
|
|
2337
2337
|
}
|
|
2338
2338
|
get top() {
|
|
2339
2339
|
return this.nodes[this.open];
|
|
@@ -2480,7 +2480,7 @@ class bl {
|
|
|
2480
2480
|
this.closeExtra();
|
|
2481
2481
|
let a = this.top;
|
|
2482
2482
|
a.match && (a.match = a.match.matchType(e.type));
|
|
2483
|
-
let s =
|
|
2483
|
+
let s = ue.none;
|
|
2484
2484
|
for (let i of n.concat(e.marks))
|
|
2485
2485
|
(a.type ? a.type.allowsMarkType(i.type) : jl(i.type, e.type)) && (s = i.addToSet(s));
|
|
2486
2486
|
return a.content.push(e.mark(s)), !0;
|
|
@@ -2500,7 +2500,7 @@ class bl {
|
|
|
2500
2500
|
i.match = i.match && i.match.matchType(e);
|
|
2501
2501
|
let r = hl(e, s, i.options);
|
|
2502
2502
|
i.options & Ca && i.content.length == 0 && (r |= Ca);
|
|
2503
|
-
let l =
|
|
2503
|
+
let l = ue.none;
|
|
2504
2504
|
return n = n.filter((p) => (i.type ? i.type.allowsMarkType(p.type) : jl(p.type, e)) ? (l = p.addToSet(l), !1) : !0), this.nodes.push(new ua(e, t, l, a, null, r)), this.open++, n;
|
|
2505
2505
|
}
|
|
2506
2506
|
// Make sure all nodes above this.open are finished and added to
|
|
@@ -3595,7 +3595,7 @@ function lg(o, e, t, n, a) {
|
|
|
3595
3595
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
3596
3596
|
o.step(new Ee(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new T(C.from(i), 0, 0), 1, !0));
|
|
3597
3597
|
}
|
|
3598
|
-
function
|
|
3598
|
+
function Wt(o, e, t = 1, n) {
|
|
3599
3599
|
let a = o.resolve(e), s = a.depth - t, i = n && n[n.length - 1] || a.parent;
|
|
3600
3600
|
if (s < 0 || a.parent.type.spec.isolating || !a.parent.canReplace(a.index(), a.parent.childCount) || !i.type.validContent(a.parent.content.cutByIndex(a.index(), a.parent.childCount)))
|
|
3601
3601
|
return !1;
|
|
@@ -4221,7 +4221,7 @@ class Xc {
|
|
|
4221
4221
|
position `pos`.
|
|
4222
4222
|
*/
|
|
4223
4223
|
removeNodeMark(e, t) {
|
|
4224
|
-
if (!(t instanceof
|
|
4224
|
+
if (!(t instanceof ue)) {
|
|
4225
4225
|
let n = this.doc.nodeAt(e);
|
|
4226
4226
|
if (!n)
|
|
4227
4227
|
throw new RangeError("No node at position " + e);
|
|
@@ -4360,7 +4360,7 @@ class Z {
|
|
|
4360
4360
|
found.
|
|
4361
4361
|
*/
|
|
4362
4362
|
static findFrom(e, t, n = !1) {
|
|
4363
|
-
let a = e.parent.inlineContent ? new
|
|
4363
|
+
let a = e.parent.inlineContent ? new J(e) : Yo(e.node(0), e.parent, e.pos, e.index(), t, n);
|
|
4364
4364
|
if (a)
|
|
4365
4365
|
return a;
|
|
4366
4366
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
@@ -4376,7 +4376,7 @@ class Z {
|
|
|
4376
4376
|
negative, it will search backwards first.
|
|
4377
4377
|
*/
|
|
4378
4378
|
static near(e, t = 1) {
|
|
4379
|
-
return this.findFrom(e, t) || this.findFrom(e, -t) || new
|
|
4379
|
+
return this.findFrom(e, t) || this.findFrom(e, -t) || new gt(e.node(0));
|
|
4380
4380
|
}
|
|
4381
4381
|
/**
|
|
4382
4382
|
Find the cursor or leaf node selection closest to the start of
|
|
@@ -4385,14 +4385,14 @@ class Z {
|
|
|
4385
4385
|
exists.
|
|
4386
4386
|
*/
|
|
4387
4387
|
static atStart(e) {
|
|
4388
|
-
return Yo(e, e, 0, 0, 1) || new
|
|
4388
|
+
return Yo(e, e, 0, 0, 1) || new gt(e);
|
|
4389
4389
|
}
|
|
4390
4390
|
/**
|
|
4391
4391
|
Find the cursor or leaf node selection closest to the end of the
|
|
4392
4392
|
given document.
|
|
4393
4393
|
*/
|
|
4394
4394
|
static atEnd(e) {
|
|
4395
|
-
return Yo(e, e, e.content.size, e.childCount, -1) || new
|
|
4395
|
+
return Yo(e, e, e.content.size, e.childCount, -1) || new gt(e);
|
|
4396
4396
|
}
|
|
4397
4397
|
/**
|
|
4398
4398
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -4427,7 +4427,7 @@ class Z {
|
|
|
4427
4427
|
returns the bookmark for that.
|
|
4428
4428
|
*/
|
|
4429
4429
|
getBookmark() {
|
|
4430
|
-
return
|
|
4430
|
+
return J.between(this.$anchor, this.$head).getBookmark();
|
|
4431
4431
|
}
|
|
4432
4432
|
}
|
|
4433
4433
|
Z.prototype.visible = !0;
|
|
@@ -4443,7 +4443,7 @@ let wl = !1;
|
|
|
4443
4443
|
function Il(o) {
|
|
4444
4444
|
!wl && !o.parent.inlineContent && (wl = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + o.parent.type.name + ")"));
|
|
4445
4445
|
}
|
|
4446
|
-
class
|
|
4446
|
+
class J extends Z {
|
|
4447
4447
|
/**
|
|
4448
4448
|
Construct a text selection between the given points.
|
|
4449
4449
|
*/
|
|
@@ -4462,7 +4462,7 @@ class Y extends Z {
|
|
|
4462
4462
|
if (!n.parent.inlineContent)
|
|
4463
4463
|
return Z.near(n);
|
|
4464
4464
|
let a = e.resolve(t.map(this.anchor));
|
|
4465
|
-
return new
|
|
4465
|
+
return new J(a.parent.inlineContent ? a : n, n);
|
|
4466
4466
|
}
|
|
4467
4467
|
replace(e, t = T.empty) {
|
|
4468
4468
|
if (super.replace(e, t), t == T.empty) {
|
|
@@ -4471,7 +4471,7 @@ class Y extends Z {
|
|
|
4471
4471
|
}
|
|
4472
4472
|
}
|
|
4473
4473
|
eq(e) {
|
|
4474
|
-
return e instanceof
|
|
4474
|
+
return e instanceof J && e.anchor == this.anchor && e.head == this.head;
|
|
4475
4475
|
}
|
|
4476
4476
|
getBookmark() {
|
|
4477
4477
|
return new Ps(this.anchor, this.head);
|
|
@@ -4485,7 +4485,7 @@ class Y extends Z {
|
|
|
4485
4485
|
static fromJSON(e, t) {
|
|
4486
4486
|
if (typeof t.anchor != "number" || typeof t.head != "number")
|
|
4487
4487
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
4488
|
-
return new
|
|
4488
|
+
return new J(e.resolve(t.anchor), e.resolve(t.head));
|
|
4489
4489
|
}
|
|
4490
4490
|
/**
|
|
4491
4491
|
Create a text selection from non-resolved positions.
|
|
@@ -4511,10 +4511,10 @@ class Y extends Z {
|
|
|
4511
4511
|
else
|
|
4512
4512
|
return Z.near(t, n);
|
|
4513
4513
|
}
|
|
4514
|
-
return e.parent.inlineContent || (a == 0 ? e = t : (e = (Z.findFrom(e, -n, !0) || Z.findFrom(e, n, !0)).$anchor, e.pos < t.pos != a < 0 && (e = t))), new
|
|
4514
|
+
return e.parent.inlineContent || (a == 0 ? e = t : (e = (Z.findFrom(e, -n, !0) || Z.findFrom(e, n, !0)).$anchor, e.pos < t.pos != a < 0 && (e = t))), new J(e, t);
|
|
4515
4515
|
}
|
|
4516
4516
|
}
|
|
4517
|
-
Z.jsonID("text",
|
|
4517
|
+
Z.jsonID("text", J);
|
|
4518
4518
|
class Ps {
|
|
4519
4519
|
constructor(e, t) {
|
|
4520
4520
|
this.anchor = e, this.head = t;
|
|
@@ -4523,7 +4523,7 @@ class Ps {
|
|
|
4523
4523
|
return new Ps(e.map(this.anchor), e.map(this.head));
|
|
4524
4524
|
}
|
|
4525
4525
|
resolve(e) {
|
|
4526
|
-
return
|
|
4526
|
+
return J.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
4527
4527
|
}
|
|
4528
4528
|
}
|
|
4529
4529
|
class W extends Z {
|
|
@@ -4588,7 +4588,7 @@ class fr {
|
|
|
4588
4588
|
return n && W.isSelectable(n) ? new W(t) : Z.near(t);
|
|
4589
4589
|
}
|
|
4590
4590
|
}
|
|
4591
|
-
class
|
|
4591
|
+
class gt extends Z {
|
|
4592
4592
|
/**
|
|
4593
4593
|
Create an all-selection over the given document.
|
|
4594
4594
|
*/
|
|
@@ -4610,30 +4610,30 @@ class ut extends Z {
|
|
|
4610
4610
|
@internal
|
|
4611
4611
|
*/
|
|
4612
4612
|
static fromJSON(e) {
|
|
4613
|
-
return new
|
|
4613
|
+
return new gt(e);
|
|
4614
4614
|
}
|
|
4615
4615
|
map(e) {
|
|
4616
|
-
return new
|
|
4616
|
+
return new gt(e);
|
|
4617
4617
|
}
|
|
4618
4618
|
eq(e) {
|
|
4619
|
-
return e instanceof
|
|
4619
|
+
return e instanceof gt;
|
|
4620
4620
|
}
|
|
4621
4621
|
getBookmark() {
|
|
4622
4622
|
return jg;
|
|
4623
4623
|
}
|
|
4624
4624
|
}
|
|
4625
|
-
Z.jsonID("all",
|
|
4625
|
+
Z.jsonID("all", gt);
|
|
4626
4626
|
const jg = {
|
|
4627
4627
|
map() {
|
|
4628
4628
|
return this;
|
|
4629
4629
|
},
|
|
4630
4630
|
resolve(o) {
|
|
4631
|
-
return new
|
|
4631
|
+
return new gt(o);
|
|
4632
4632
|
}
|
|
4633
4633
|
};
|
|
4634
4634
|
function Yo(o, e, t, n, a, s = !1) {
|
|
4635
4635
|
if (e.inlineContent)
|
|
4636
|
-
return
|
|
4636
|
+
return J.create(o, t);
|
|
4637
4637
|
for (let i = n - (a > 0 ? 0 : 1); a > 0 ? i < e.childCount : i >= 0; i += a) {
|
|
4638
4638
|
let r = e.child(i);
|
|
4639
4639
|
if (r.isAtom) {
|
|
@@ -4704,7 +4704,7 @@ class kg extends Xc {
|
|
|
4704
4704
|
this is already the case.
|
|
4705
4705
|
*/
|
|
4706
4706
|
ensureMarks(e) {
|
|
4707
|
-
return
|
|
4707
|
+
return ue.sameSet(this.storedMarks || this.selection.$from.marks(), e) || this.setStoredMarks(e), this;
|
|
4708
4708
|
}
|
|
4709
4709
|
/**
|
|
4710
4710
|
Add a mark to the set of stored marks.
|
|
@@ -4749,7 +4749,7 @@ class kg extends Xc {
|
|
|
4749
4749
|
*/
|
|
4750
4750
|
replaceSelectionWith(e, t = !0) {
|
|
4751
4751
|
let n = this.selection;
|
|
4752
|
-
return t && (e = e.mark(this.storedMarks || (n.empty ? n.$from.marks() : n.$from.marksAcross(n.$to) ||
|
|
4752
|
+
return t && (e = e.mark(this.storedMarks || (n.empty ? n.$from.marks() : n.$from.marksAcross(n.$to) || ue.none))), n.replaceWith(this, e), this;
|
|
4753
4753
|
}
|
|
4754
4754
|
/**
|
|
4755
4755
|
Delete the selection.
|
|
@@ -5083,7 +5083,7 @@ const Oe = function(o) {
|
|
|
5083
5083
|
return e && e.nodeType == 11 ? e.host : e;
|
|
5084
5084
|
};
|
|
5085
5085
|
let Li = null;
|
|
5086
|
-
const
|
|
5086
|
+
const Ht = function(o, e, t) {
|
|
5087
5087
|
let n = Li || (Li = document.createRange());
|
|
5088
5088
|
return n.setEnd(o, t ?? o.nodeValue.length), n.setStart(o, e || 0), n;
|
|
5089
5089
|
}, _g = function() {
|
|
@@ -5095,7 +5095,7 @@ function Fl(o, e, t, n, a) {
|
|
|
5095
5095
|
for (; ; ) {
|
|
5096
5096
|
if (o == t && e == n)
|
|
5097
5097
|
return !0;
|
|
5098
|
-
if (e == (a < 0 ? 0 :
|
|
5098
|
+
if (e == (a < 0 ? 0 : ut(o))) {
|
|
5099
5099
|
let s = o.parentNode;
|
|
5100
5100
|
if (!s || s.nodeType != 1 || aa(o) || Dg.test(o.nodeName) || o.contentEditable == "false")
|
|
5101
5101
|
return !1;
|
|
@@ -5103,12 +5103,12 @@ function Fl(o, e, t, n, a) {
|
|
|
5103
5103
|
} else if (o.nodeType == 1) {
|
|
5104
5104
|
if (o = o.childNodes[e + (a < 0 ? -1 : 0)], o.contentEditable == "false")
|
|
5105
5105
|
return !1;
|
|
5106
|
-
e = a < 0 ?
|
|
5106
|
+
e = a < 0 ? ut(o) : 0;
|
|
5107
5107
|
} else
|
|
5108
5108
|
return !1;
|
|
5109
5109
|
}
|
|
5110
5110
|
}
|
|
5111
|
-
function
|
|
5111
|
+
function ut(o) {
|
|
5112
5112
|
return o.nodeType == 3 ? o.nodeValue.length : o.childNodes.length;
|
|
5113
5113
|
}
|
|
5114
5114
|
function wg(o, e) {
|
|
@@ -5118,7 +5118,7 @@ function wg(o, e) {
|
|
|
5118
5118
|
if (o.nodeType == 1 && e > 0) {
|
|
5119
5119
|
if (o.contentEditable == "false")
|
|
5120
5120
|
return null;
|
|
5121
|
-
o = o.childNodes[e - 1], e =
|
|
5121
|
+
o = o.childNodes[e - 1], e = ut(o);
|
|
5122
5122
|
} else if (o.parentNode && !aa(o))
|
|
5123
5123
|
e = Oe(o), o = o.parentNode;
|
|
5124
5124
|
else
|
|
@@ -5140,13 +5140,13 @@ function Ig(o, e) {
|
|
|
5140
5140
|
}
|
|
5141
5141
|
}
|
|
5142
5142
|
function Eg(o, e, t) {
|
|
5143
|
-
for (let n = e == 0, a = e ==
|
|
5143
|
+
for (let n = e == 0, a = e == ut(o); n || a; ) {
|
|
5144
5144
|
if (o == t)
|
|
5145
5145
|
return !0;
|
|
5146
5146
|
let s = Oe(o);
|
|
5147
5147
|
if (o = o.parentNode, !o)
|
|
5148
5148
|
return !1;
|
|
5149
|
-
n = n && s == 0, a = a && s ==
|
|
5149
|
+
n = n && s == 0, a = a && s == ut(o);
|
|
5150
5150
|
}
|
|
5151
5151
|
}
|
|
5152
5152
|
function aa(o) {
|
|
@@ -5173,18 +5173,18 @@ function xg(o, e, t) {
|
|
|
5173
5173
|
try {
|
|
5174
5174
|
let n = o.caretPositionFromPoint(e, t);
|
|
5175
5175
|
if (n)
|
|
5176
|
-
return { node: n.offsetNode, offset: Math.min(
|
|
5176
|
+
return { node: n.offsetNode, offset: Math.min(ut(n.offsetNode), n.offset) };
|
|
5177
5177
|
} catch {
|
|
5178
5178
|
}
|
|
5179
5179
|
if (o.caretRangeFromPoint) {
|
|
5180
5180
|
let n = o.caretRangeFromPoint(e, t);
|
|
5181
5181
|
if (n)
|
|
5182
|
-
return { node: n.startContainer, offset: Math.min(
|
|
5182
|
+
return { node: n.startContainer, offset: Math.min(ut(n.startContainer), n.startOffset) };
|
|
5183
5183
|
}
|
|
5184
5184
|
}
|
|
5185
5185
|
const At = typeof navigator < "u" ? navigator : null, Ol = typeof document < "u" ? document : null, ho = At && At.userAgent || "", zi = /Edge\/(\d+)/.exec(ho), em = /MSIE \d/.exec(ho), $i = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ho), Ye = !!(em || $i || zi), co = em ? document.documentMode : $i ? +$i[1] : zi ? +zi[1] : 0, Dt = !Ye && /gecko\/(\d+)/i.test(ho);
|
|
5186
5186
|
Dt && +(/Firefox\/(\d+)/.exec(ho) || [0, 0])[1];
|
|
5187
|
-
const Hi = !Ye && /Chrome\/(\d+)/.exec(ho), Ne = !!Hi, tm = Hi ? +Hi[1] : 0, Ve = !Ye && !!At && /Apple Computer/.test(At.vendor), pn = Ve && (/Mobile\/\w+/.test(ho) || !!At && At.maxTouchPoints > 2),
|
|
5187
|
+
const Hi = !Ye && /Chrome\/(\d+)/.exec(ho), Ne = !!Hi, tm = Hi ? +Hi[1] : 0, Ve = !Ye && !!At && /Apple Computer/.test(At.vendor), pn = Ve && (/Mobile\/\w+/.test(ho) || !!At && At.maxTouchPoints > 2), dt = pn || (At ? /Mac/.test(At.platform) : !1), Sg = At ? /Win/.test(At.platform) : !1, yt = /Android \d/.test(ho), sa = !!Ol && "webkitFontSmoothing" in Ol.documentElement.style, Mg = sa ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5188
5188
|
function Fg(o) {
|
|
5189
5189
|
let e = o.defaultView && o.defaultView.visualViewport;
|
|
5190
5190
|
return e ? {
|
|
@@ -5280,7 +5280,7 @@ function am(o, e) {
|
|
|
5280
5280
|
if (c.nodeType == 1)
|
|
5281
5281
|
d = c.getClientRects();
|
|
5282
5282
|
else if (c.nodeType == 3)
|
|
5283
|
-
d =
|
|
5283
|
+
d = Ht(c).getClientRects();
|
|
5284
5284
|
else
|
|
5285
5285
|
continue;
|
|
5286
5286
|
for (let u = 0; u < d.length; u++) {
|
|
@@ -5305,7 +5305,7 @@ function Bg(o, e) {
|
|
|
5305
5305
|
let t = o.nodeValue.length, n = document.createRange();
|
|
5306
5306
|
for (let a = 0; a < t; a++) {
|
|
5307
5307
|
n.setEnd(o, a + 1), n.setStart(o, a);
|
|
5308
|
-
let s =
|
|
5308
|
+
let s = Xt(n, 1);
|
|
5309
5309
|
if (s.top != s.bottom && hr(e, s))
|
|
5310
5310
|
return { node: o, offset: a + (e.left >= (s.left + s.right) / 2 ? 1 : 0) };
|
|
5311
5311
|
}
|
|
@@ -5386,7 +5386,7 @@ function zg(o, e) {
|
|
|
5386
5386
|
function Tl(o) {
|
|
5387
5387
|
return o.top < o.bottom || o.left < o.right;
|
|
5388
5388
|
}
|
|
5389
|
-
function
|
|
5389
|
+
function Xt(o, e) {
|
|
5390
5390
|
let t = o.getClientRects();
|
|
5391
5391
|
if (t.length) {
|
|
5392
5392
|
let n = t[e < 0 ? 0 : t.length - 1];
|
|
@@ -5400,11 +5400,11 @@ function im(o, e, t) {
|
|
|
5400
5400
|
let { node: n, offset: a, atom: s } = o.docView.domFromPos(e, t < 0 ? -1 : 1), i = sa || Dt;
|
|
5401
5401
|
if (n.nodeType == 3)
|
|
5402
5402
|
if (i && ($g.test(n.nodeValue) || (t < 0 ? !a : a == n.nodeValue.length))) {
|
|
5403
|
-
let l =
|
|
5403
|
+
let l = Xt(Ht(n, a, a), t);
|
|
5404
5404
|
if (Dt && a && /\s/.test(n.nodeValue[a - 1]) && a < n.nodeValue.length) {
|
|
5405
|
-
let p =
|
|
5405
|
+
let p = Xt(Ht(n, a - 1, a - 1), -1);
|
|
5406
5406
|
if (p.top == l.top) {
|
|
5407
|
-
let c =
|
|
5407
|
+
let c = Xt(Ht(n, a, a + 1), -1);
|
|
5408
5408
|
if (c.top != l.top)
|
|
5409
5409
|
return Dn(c, c.left < p.left);
|
|
5410
5410
|
}
|
|
@@ -5412,35 +5412,35 @@ function im(o, e, t) {
|
|
|
5412
5412
|
return l;
|
|
5413
5413
|
} else {
|
|
5414
5414
|
let l = a, p = a, c = t < 0 ? 1 : -1;
|
|
5415
|
-
return t < 0 && !a ? (p++, c = -1) : t >= 0 && a == n.nodeValue.length ? (l--, c = 1) : t < 0 ? l-- : p++, Dn(
|
|
5415
|
+
return t < 0 && !a ? (p++, c = -1) : t >= 0 && a == n.nodeValue.length ? (l--, c = 1) : t < 0 ? l-- : p++, Dn(Xt(Ht(n, l, p), c), c < 0);
|
|
5416
5416
|
}
|
|
5417
5417
|
if (!o.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
|
|
5418
|
-
if (s == null && a && (t < 0 || a ==
|
|
5418
|
+
if (s == null && a && (t < 0 || a == ut(n))) {
|
|
5419
5419
|
let l = n.childNodes[a - 1];
|
|
5420
5420
|
if (l.nodeType == 1)
|
|
5421
5421
|
return mi(l.getBoundingClientRect(), !1);
|
|
5422
5422
|
}
|
|
5423
|
-
if (s == null && a <
|
|
5423
|
+
if (s == null && a < ut(n)) {
|
|
5424
5424
|
let l = n.childNodes[a];
|
|
5425
5425
|
if (l.nodeType == 1)
|
|
5426
5426
|
return mi(l.getBoundingClientRect(), !0);
|
|
5427
5427
|
}
|
|
5428
5428
|
return mi(n.getBoundingClientRect(), t >= 0);
|
|
5429
5429
|
}
|
|
5430
|
-
if (s == null && a && (t < 0 || a ==
|
|
5431
|
-
let l = n.childNodes[a - 1], p = l.nodeType == 3 ?
|
|
5430
|
+
if (s == null && a && (t < 0 || a == ut(n))) {
|
|
5431
|
+
let l = n.childNodes[a - 1], p = l.nodeType == 3 ? Ht(l, ut(l) - (i ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
5432
5432
|
if (p)
|
|
5433
|
-
return Dn(
|
|
5433
|
+
return Dn(Xt(p, 1), !1);
|
|
5434
5434
|
}
|
|
5435
|
-
if (s == null && a <
|
|
5435
|
+
if (s == null && a < ut(n)) {
|
|
5436
5436
|
let l = n.childNodes[a];
|
|
5437
5437
|
for (; l.pmViewDesc && l.pmViewDesc.ignoreForCoords; )
|
|
5438
5438
|
l = l.nextSibling;
|
|
5439
|
-
let p = l ? l.nodeType == 3 ?
|
|
5439
|
+
let p = l ? l.nodeType == 3 ? Ht(l, 0, i ? 0 : 1) : l.nodeType == 1 ? l : null : null;
|
|
5440
5440
|
if (p)
|
|
5441
|
-
return Dn(
|
|
5441
|
+
return Dn(Xt(p, -1), !0);
|
|
5442
5442
|
}
|
|
5443
|
-
return Dn(
|
|
5443
|
+
return Dn(Xt(n.nodeType == 3 ? Ht(n) : n, -t), t >= 0);
|
|
5444
5444
|
}
|
|
5445
5445
|
function Dn(o, e) {
|
|
5446
5446
|
if (o.width == 0)
|
|
@@ -5483,7 +5483,7 @@ function Hg(o, e, t) {
|
|
|
5483
5483
|
if (r.nodeType == 1)
|
|
5484
5484
|
l = r.getClientRects();
|
|
5485
5485
|
else if (r.nodeType == 3)
|
|
5486
|
-
l =
|
|
5486
|
+
l = Ht(r, 0, r.nodeValue.length).getClientRects();
|
|
5487
5487
|
else
|
|
5488
5488
|
continue;
|
|
5489
5489
|
for (let p = 0; p < l.length; p++) {
|
|
@@ -5516,10 +5516,10 @@ let Nl = null, Bl = null, Rl = !1;
|
|
|
5516
5516
|
function Wg(o, e, t) {
|
|
5517
5517
|
return Nl == e && Bl == t ? Rl : (Nl = e, Bl = t, Rl = t == "up" || t == "down" ? Hg(o, e, t) : qg(o, e, t));
|
|
5518
5518
|
}
|
|
5519
|
-
const
|
|
5519
|
+
const ft = 0, Pl = 1, Do = 2, Tt = 3;
|
|
5520
5520
|
class ia {
|
|
5521
5521
|
constructor(e, t, n, a) {
|
|
5522
|
-
this.parent = e, this.children = t, this.dom = n, this.contentDOM = a, this.dirty =
|
|
5522
|
+
this.parent = e, this.children = t, this.dom = n, this.contentDOM = a, this.dirty = ft, n.pmViewDesc = this;
|
|
5523
5523
|
}
|
|
5524
5524
|
// Used to check whether a given description corresponds to a
|
|
5525
5525
|
// widget/mark/node.
|
|
@@ -5870,7 +5870,7 @@ class lm extends ia {
|
|
|
5870
5870
|
super(e, [], i, null), this.widget = t, this.widget = t, s = this;
|
|
5871
5871
|
}
|
|
5872
5872
|
matchesWidget(e) {
|
|
5873
|
-
return this.dirty ==
|
|
5873
|
+
return this.dirty == ft && e.type.eq(this.widget.type);
|
|
5874
5874
|
}
|
|
5875
5875
|
parseRule() {
|
|
5876
5876
|
return { ignore: !0 };
|
|
@@ -5924,11 +5924,11 @@ class Bo extends ia {
|
|
|
5924
5924
|
return this.dirty != Tt && this.mark.eq(e);
|
|
5925
5925
|
}
|
|
5926
5926
|
markDirty(e, t) {
|
|
5927
|
-
if (super.markDirty(e, t), this.dirty !=
|
|
5927
|
+
if (super.markDirty(e, t), this.dirty != ft) {
|
|
5928
5928
|
let n = this.parent;
|
|
5929
5929
|
for (; !n.node; )
|
|
5930
5930
|
n = n.parent;
|
|
5931
|
-
n.dirty < this.dirty && (n.dirty = this.dirty), this.dirty =
|
|
5931
|
+
n.dirty < this.dirty && (n.dirty = this.dirty), this.dirty = ft;
|
|
5932
5932
|
}
|
|
5933
5933
|
}
|
|
5934
5934
|
slice(e, t, n) {
|
|
@@ -5990,7 +5990,7 @@ class mo extends ia {
|
|
|
5990
5990
|
return e;
|
|
5991
5991
|
}
|
|
5992
5992
|
matchesNode(e, t, n) {
|
|
5993
|
-
return this.dirty ==
|
|
5993
|
+
return this.dirty == ft && e.eq(this.node) && Va(t, this.outerDeco) && n.eq(this.innerDeco);
|
|
5994
5994
|
}
|
|
5995
5995
|
get size() {
|
|
5996
5996
|
return this.node.nodeSize;
|
|
@@ -6005,7 +6005,7 @@ class mo extends ia {
|
|
|
6005
6005
|
updateChildren(e, t) {
|
|
6006
6006
|
let n = this.node.inlineContent, a = t, s = e.composing ? this.localCompositionInfo(e, t) : null, i = s && s.pos > -1 ? s : null, r = s && s.pos < 0, l = new Jg(this, i && i.node, e);
|
|
6007
6007
|
Zg(this.node, this.innerDeco, (p, c, m) => {
|
|
6008
|
-
p.spec.marks ? l.syncToMarks(p.spec.marks, n, e) : p.type.side >= 0 && !m && l.syncToMarks(c == this.node.childCount ?
|
|
6008
|
+
p.spec.marks ? l.syncToMarks(p.spec.marks, n, e) : p.type.side >= 0 && !m && l.syncToMarks(c == this.node.childCount ? ue.none : this.node.child(c).marks, n, e), l.placeWidget(p, e, a);
|
|
6009
6009
|
}, (p, c, m, d) => {
|
|
6010
6010
|
l.syncToMarks(p.marks, n, e);
|
|
6011
6011
|
let u;
|
|
@@ -6014,7 +6014,7 @@ class mo extends ia {
|
|
|
6014
6014
|
}
|
|
6015
6015
|
localCompositionInfo(e, t) {
|
|
6016
6016
|
let { from: n, to: a } = e.state.selection;
|
|
6017
|
-
if (!(e.state.selection instanceof
|
|
6017
|
+
if (!(e.state.selection instanceof J) || n < t || a > t + this.node.content.size)
|
|
6018
6018
|
return null;
|
|
6019
6019
|
let s = e.input.compositionNode;
|
|
6020
6020
|
if (!s || !this.dom.contains(s.parentNode))
|
|
@@ -6045,7 +6045,7 @@ class mo extends ia {
|
|
|
6045
6045
|
return this.dirty == Tt || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, t, n, a), !0);
|
|
6046
6046
|
}
|
|
6047
6047
|
updateInner(e, t, n, a) {
|
|
6048
|
-
this.updateOuterDeco(t), this.node = e, this.innerDeco = n, this.contentDOM && this.updateChildren(a, this.posAtStart), this.dirty =
|
|
6048
|
+
this.updateOuterDeco(t), this.node = e, this.innerDeco = n, this.contentDOM && this.updateChildren(a, this.posAtStart), this.dirty = ft;
|
|
6049
6049
|
}
|
|
6050
6050
|
updateOuterDeco(e) {
|
|
6051
6051
|
if (Va(e, this.outerDeco))
|
|
@@ -6081,7 +6081,7 @@ class zs extends mo {
|
|
|
6081
6081
|
return { skip: e || !0 };
|
|
6082
6082
|
}
|
|
6083
6083
|
update(e, t, n, a) {
|
|
6084
|
-
return this.dirty == Tt || this.dirty !=
|
|
6084
|
+
return this.dirty == Tt || this.dirty != ft && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(t), (this.dirty != ft || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, a.trackWrites == this.nodeDOM && (a.trackWrites = null)), this.node = e, this.dirty = ft, !0);
|
|
6085
6085
|
}
|
|
6086
6086
|
inParent() {
|
|
6087
6087
|
let e = this.parent.contentDOM;
|
|
@@ -6118,7 +6118,7 @@ class pm extends ia {
|
|
|
6118
6118
|
return { ignore: !0 };
|
|
6119
6119
|
}
|
|
6120
6120
|
matchesHack(e) {
|
|
6121
|
-
return this.dirty ==
|
|
6121
|
+
return this.dirty == ft && this.dom.nodeName == e;
|
|
6122
6122
|
}
|
|
6123
6123
|
get domAtom() {
|
|
6124
6124
|
return !0;
|
|
@@ -6276,7 +6276,7 @@ class Jg {
|
|
|
6276
6276
|
for (; a < i && (a == s - 1 ? this.top : this.stack[a + 1 << 1]).matchesMark(e[a]) && e[a].type.spec.spanning !== !1; )
|
|
6277
6277
|
a++;
|
|
6278
6278
|
for (; a < s; )
|
|
6279
|
-
this.destroyRest(), this.top.dirty =
|
|
6279
|
+
this.destroyRest(), this.top.dirty = ft, this.index = this.stack.pop(), this.top = this.stack.pop(), s--;
|
|
6280
6280
|
for (; s < e.length; ) {
|
|
6281
6281
|
this.stack.push(this.top, this.index + 1);
|
|
6282
6282
|
let r = -1;
|
|
@@ -6346,7 +6346,7 @@ class Jg {
|
|
|
6346
6346
|
if (!d && l.update(e, t, n, a))
|
|
6347
6347
|
return this.destroyBetween(this.index, r), l.dom != c && (this.changed = !0), this.index++, !0;
|
|
6348
6348
|
if (!d && (m = this.recreateWrapper(l, e, t, n, a, i)))
|
|
6349
|
-
return this.destroyBetween(this.index, r), this.top.children[this.index] = m, m.contentDOM && (m.dirty = Do, m.updateChildren(a, i + 1), m.dirty =
|
|
6349
|
+
return this.destroyBetween(this.index, r), this.top.children[this.index] = m, m.contentDOM && (m.dirty = Do, m.updateChildren(a, i + 1), m.dirty = ft), this.changed = !0, this.index++, !0;
|
|
6350
6350
|
break;
|
|
6351
6351
|
}
|
|
6352
6352
|
}
|
|
@@ -6559,7 +6559,7 @@ function br(o, e = null) {
|
|
|
6559
6559
|
function um(o) {
|
|
6560
6560
|
return o.editable ? o.hasFocus() : fm(o) && document.activeElement && document.activeElement.contains(o.dom);
|
|
6561
6561
|
}
|
|
6562
|
-
function
|
|
6562
|
+
function Ut(o, e = !1) {
|
|
6563
6563
|
let t = o.state.selection;
|
|
6564
6564
|
if (gm(o, t), !!um(o)) {
|
|
6565
6565
|
if (!e && o.input.mouseDown && o.input.mouseDown.allowDefault && Ne) {
|
|
@@ -6573,7 +6573,7 @@ function Wt(o, e = !1) {
|
|
|
6573
6573
|
of(o);
|
|
6574
6574
|
else {
|
|
6575
6575
|
let { anchor: n, head: a } = t, s, i;
|
|
6576
|
-
$l && !(t instanceof
|
|
6576
|
+
$l && !(t instanceof J) && (t.$from.parent.inlineContent || (s = Hl(o, t.from)), !t.empty && !t.$from.parent.inlineContent && (i = Hl(o, t.to))), o.docView.setSelection(n, a, o.root, e), $l && (s && Vl(s), i && Vl(i)), t.visible ? o.dom.classList.remove("ProseMirror-hideselection") : (o.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && tf(o));
|
|
6577
6577
|
}
|
|
6578
6578
|
o.domObserver.setCurSelection(), o.domObserver.connectSelection();
|
|
6579
6579
|
}
|
|
@@ -6624,7 +6624,7 @@ function ql(o) {
|
|
|
6624
6624
|
o.lastSelectedViewDesc && (o.lastSelectedViewDesc.parent && o.lastSelectedViewDesc.deselectNode(), o.lastSelectedViewDesc = void 0);
|
|
6625
6625
|
}
|
|
6626
6626
|
function vr(o, e, t, n) {
|
|
6627
|
-
return o.someProp("createSelectionBetween", (a) => a(o, e, t)) ||
|
|
6627
|
+
return o.someProp("createSelectionBetween", (a) => a(o, e, t)) || J.between(e, t, n);
|
|
6628
6628
|
}
|
|
6629
6629
|
function Wl(o) {
|
|
6630
6630
|
return o.editable && !o.hasFocus() ? !1 : fm(o);
|
|
@@ -6652,28 +6652,28 @@ function Zt(o, e) {
|
|
|
6652
6652
|
}
|
|
6653
6653
|
function Ul(o, e, t) {
|
|
6654
6654
|
let n = o.state.selection;
|
|
6655
|
-
if (n instanceof
|
|
6655
|
+
if (n instanceof J)
|
|
6656
6656
|
if (t.indexOf("s") > -1) {
|
|
6657
6657
|
let { $head: a } = n, s = a.textOffset ? null : e < 0 ? a.nodeBefore : a.nodeAfter;
|
|
6658
6658
|
if (!s || s.isText || !s.isLeaf)
|
|
6659
6659
|
return !1;
|
|
6660
6660
|
let i = o.state.doc.resolve(a.pos + s.nodeSize * (e < 0 ? -1 : 1));
|
|
6661
|
-
return Zt(o, new
|
|
6661
|
+
return Zt(o, new J(n.$anchor, i));
|
|
6662
6662
|
} else if (n.empty) {
|
|
6663
6663
|
if (o.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
6664
6664
|
let a = Wi(o.state, e);
|
|
6665
6665
|
return a && a instanceof W ? Zt(o, a) : !1;
|
|
6666
|
-
} else if (!(
|
|
6666
|
+
} else if (!(dt && t.indexOf("m") > -1)) {
|
|
6667
6667
|
let a = n.$head, s = a.textOffset ? null : e < 0 ? a.nodeBefore : a.nodeAfter, i;
|
|
6668
6668
|
if (!s || s.isText)
|
|
6669
6669
|
return !1;
|
|
6670
6670
|
let r = e < 0 ? a.pos - s.nodeSize : a.pos;
|
|
6671
|
-
return s.isAtom || (i = o.docView.descAt(r)) && !i.contentDOM ? W.isSelectable(s) ? Zt(o, new W(e < 0 ? o.state.doc.resolve(a.pos - s.nodeSize) : a)) : sa ? Zt(o, new
|
|
6671
|
+
return s.isAtom || (i = o.docView.descAt(r)) && !i.contentDOM ? W.isSelectable(s) ? Zt(o, new W(e < 0 ? o.state.doc.resolve(a.pos - s.nodeSize) : a)) : sa ? Zt(o, new J(o.state.doc.resolve(e < 0 ? r : r + s.nodeSize))) : !1 : !1;
|
|
6672
6672
|
}
|
|
6673
6673
|
} else return !1;
|
|
6674
6674
|
else {
|
|
6675
6675
|
if (n instanceof W && n.node.isInline)
|
|
6676
|
-
return Zt(o, new
|
|
6676
|
+
return Zt(o, new J(e > 0 ? n.$to : n.$from));
|
|
6677
6677
|
{
|
|
6678
6678
|
let a = Wi(o.state, e);
|
|
6679
6679
|
return a ? Zt(o, a) : !1;
|
|
@@ -6801,7 +6801,7 @@ function Ui(o, e, t) {
|
|
|
6801
6801
|
o.domObserver.setCurSelection();
|
|
6802
6802
|
let { state: a } = o;
|
|
6803
6803
|
setTimeout(() => {
|
|
6804
|
-
o.state == a &&
|
|
6804
|
+
o.state == a && Ut(o);
|
|
6805
6805
|
}, 50);
|
|
6806
6806
|
}
|
|
6807
6807
|
function Kl(o, e) {
|
|
@@ -6823,7 +6823,7 @@ function Kl(o, e) {
|
|
|
6823
6823
|
}
|
|
6824
6824
|
function Gl(o, e, t) {
|
|
6825
6825
|
let n = o.state.selection;
|
|
6826
|
-
if (n instanceof
|
|
6826
|
+
if (n instanceof J && !n.empty || t.indexOf("s") > -1 || dt && t.indexOf("m") > -1)
|
|
6827
6827
|
return !1;
|
|
6828
6828
|
let { $from: a, $to: s } = n;
|
|
6829
6829
|
if (!a.parent.inlineContent || o.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
@@ -6832,13 +6832,13 @@ function Gl(o, e, t) {
|
|
|
6832
6832
|
return Zt(o, i);
|
|
6833
6833
|
}
|
|
6834
6834
|
if (!a.parent.inlineContent) {
|
|
6835
|
-
let i = e < 0 ? a : s, r = n instanceof
|
|
6835
|
+
let i = e < 0 ? a : s, r = n instanceof gt ? Z.near(i, e) : Z.findFrom(i, e);
|
|
6836
6836
|
return r ? Zt(o, r) : !1;
|
|
6837
6837
|
}
|
|
6838
6838
|
return !1;
|
|
6839
6839
|
}
|
|
6840
6840
|
function Jl(o, e) {
|
|
6841
|
-
if (!(o.state.selection instanceof
|
|
6841
|
+
if (!(o.state.selection instanceof J))
|
|
6842
6842
|
return !0;
|
|
6843
6843
|
let { $head: t, $anchor: n, empty: a } = o.state.selection;
|
|
6844
6844
|
if (!t.sameParent(n))
|
|
@@ -6873,24 +6873,24 @@ function cf(o) {
|
|
|
6873
6873
|
}
|
|
6874
6874
|
function mf(o, e) {
|
|
6875
6875
|
let t = e.keyCode, n = cf(e);
|
|
6876
|
-
if (t == 8 ||
|
|
6876
|
+
if (t == 8 || dt && t == 72 && n == "c")
|
|
6877
6877
|
return Jl(o, -1) || Wo(o, -1);
|
|
6878
|
-
if (t == 46 && !e.shiftKey ||
|
|
6878
|
+
if (t == 46 && !e.shiftKey || dt && t == 68 && n == "c")
|
|
6879
6879
|
return Jl(o, 1) || Wo(o, 1);
|
|
6880
6880
|
if (t == 13 || t == 27)
|
|
6881
6881
|
return !0;
|
|
6882
|
-
if (t == 37 ||
|
|
6882
|
+
if (t == 37 || dt && t == 66 && n == "c") {
|
|
6883
6883
|
let a = t == 37 ? Kl(o, o.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
6884
6884
|
return Ul(o, a, n) || Wo(o, a);
|
|
6885
|
-
} else if (t == 39 ||
|
|
6885
|
+
} else if (t == 39 || dt && t == 70 && n == "c") {
|
|
6886
6886
|
let a = t == 39 ? Kl(o, o.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
6887
6887
|
return Ul(o, a, n) || Wo(o, a);
|
|
6888
6888
|
} else {
|
|
6889
|
-
if (t == 38 ||
|
|
6889
|
+
if (t == 38 || dt && t == 80 && n == "c")
|
|
6890
6890
|
return Gl(o, -1, n) || Wo(o, -1);
|
|
6891
|
-
if (t == 40 ||
|
|
6891
|
+
if (t == 40 || dt && t == 78 && n == "c")
|
|
6892
6892
|
return pf(o) || Gl(o, 1, n) || Wo(o, 1);
|
|
6893
|
-
if (n == (
|
|
6893
|
+
if (n == (dt ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
|
|
6894
6894
|
return !0;
|
|
6895
6895
|
}
|
|
6896
6896
|
return !1;
|
|
@@ -7146,14 +7146,14 @@ We.keyup = (o, e) => {
|
|
|
7146
7146
|
};
|
|
7147
7147
|
We.keypress = (o, e) => {
|
|
7148
7148
|
let t = e;
|
|
7149
|
-
if (Im(o, t) || !t.charCode || t.ctrlKey && !t.altKey ||
|
|
7149
|
+
if (Im(o, t) || !t.charCode || t.ctrlKey && !t.altKey || dt && t.metaKey)
|
|
7150
7150
|
return;
|
|
7151
7151
|
if (o.someProp("handleKeyPress", (a) => a(o, t))) {
|
|
7152
7152
|
t.preventDefault();
|
|
7153
7153
|
return;
|
|
7154
7154
|
}
|
|
7155
7155
|
let n = o.state.selection;
|
|
7156
|
-
if (!(n instanceof
|
|
7156
|
+
if (!(n instanceof J) || !n.$from.sameParent(n.$to)) {
|
|
7157
7157
|
let a = String.fromCharCode(t.charCode);
|
|
7158
7158
|
!/[\r\n]/.test(a) && !o.someProp("handleTextInput", (s) => s(o, n.$from.pos, n.$to.pos, a)) && o.dispatch(o.state.tr.insertText(a).scrollIntoView()), t.preventDefault();
|
|
7159
7159
|
}
|
|
@@ -7215,12 +7215,12 @@ function Mf(o, e, t) {
|
|
|
7215
7215
|
return !1;
|
|
7216
7216
|
let n = o.state.doc;
|
|
7217
7217
|
if (e == -1)
|
|
7218
|
-
return n.inlineContent ? (sn(o,
|
|
7218
|
+
return n.inlineContent ? (sn(o, J.create(n, 0, n.content.size)), !0) : !1;
|
|
7219
7219
|
let a = n.resolve(e);
|
|
7220
7220
|
for (let s = a.depth + 1; s > 0; s--) {
|
|
7221
7221
|
let i = s > a.depth ? a.nodeAfter : a.node(s), r = a.before(s);
|
|
7222
7222
|
if (i.inlineContent)
|
|
7223
|
-
sn(o,
|
|
7223
|
+
sn(o, J.create(n, r + 1, r + 1 + i.content.size));
|
|
7224
7224
|
else if (W.isSelectable(i))
|
|
7225
7225
|
sn(o, W.create(n, r));
|
|
7226
7226
|
else
|
|
@@ -7231,7 +7231,7 @@ function Mf(o, e, t) {
|
|
|
7231
7231
|
function yr(o) {
|
|
7232
7232
|
return Wa(o);
|
|
7233
7233
|
}
|
|
7234
|
-
const wm =
|
|
7234
|
+
const wm = dt ? "metaKey" : "ctrlKey";
|
|
7235
7235
|
qe.mousedown = (o, e) => {
|
|
7236
7236
|
let t = e;
|
|
7237
7237
|
o.input.shiftKey = t.shiftKey;
|
|
@@ -7263,7 +7263,7 @@ class Ff {
|
|
|
7263
7263
|
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), so(e, "pointer");
|
|
7264
7264
|
}
|
|
7265
7265
|
done() {
|
|
7266
|
-
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() =>
|
|
7266
|
+
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => Ut(this.view)), this.view.input.mouseDown = null;
|
|
7267
7267
|
}
|
|
7268
7268
|
up(e) {
|
|
7269
7269
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
@@ -7301,7 +7301,7 @@ We.compositionstart = We.compositionupdate = (o) => {
|
|
|
7301
7301
|
if (!o.composing) {
|
|
7302
7302
|
o.domObserver.flush();
|
|
7303
7303
|
let { state: e } = o, t = e.selection.$to;
|
|
7304
|
-
if (e.selection instanceof
|
|
7304
|
+
if (e.selection instanceof J && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((n) => n.type.spec.inclusive === !1)))
|
|
7305
7305
|
o.markCursor = o.state.storedMarks || t.marks(), Wa(o, !0), o.markCursor = null;
|
|
7306
7306
|
else if (Wa(o, !e.selection.empty), Dt && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
7307
7307
|
let n = o.domSelectionRange();
|
|
@@ -7422,7 +7422,7 @@ class Sm {
|
|
|
7422
7422
|
this.slice = e, this.move = t, this.node = n;
|
|
7423
7423
|
}
|
|
7424
7424
|
}
|
|
7425
|
-
const Mm =
|
|
7425
|
+
const Mm = dt ? "altKey" : "ctrlKey";
|
|
7426
7426
|
qe.dragstart = (o, e) => {
|
|
7427
7427
|
let t = e, n = o.input.mouseDown;
|
|
7428
7428
|
if (n && n.done(), !t.dataTransfer)
|
|
@@ -7486,7 +7486,7 @@ We.drop = (o, e) => {
|
|
|
7486
7486
|
};
|
|
7487
7487
|
qe.focus = (o) => {
|
|
7488
7488
|
o.input.lastFocus = Date.now(), o.focused || (o.domObserver.stop(), o.dom.classList.add("ProseMirror-focused"), o.domObserver.start(), o.focused = !0, setTimeout(() => {
|
|
7489
|
-
o.docView && o.hasFocus() && !o.domObserver.currentSelection.eq(o.domSelectionRange()) &&
|
|
7489
|
+
o.docView && o.hasFocus() && !o.domObserver.currentSelection.eq(o.domSelectionRange()) && Ut(o);
|
|
7490
7490
|
}, 20));
|
|
7491
7491
|
};
|
|
7492
7492
|
qe.blur = (o, e) => {
|
|
@@ -8082,7 +8082,7 @@ class Vf {
|
|
|
8082
8082
|
onSelectionChange() {
|
|
8083
8083
|
if (Wl(this.view)) {
|
|
8084
8084
|
if (this.suppressingSelectionUpdates)
|
|
8085
|
-
return
|
|
8085
|
+
return Ut(this.view);
|
|
8086
8086
|
if (Ye && co <= 11 && !this.view.state.selection.empty) {
|
|
8087
8087
|
let e = this.view.domSelectionRange();
|
|
8088
8088
|
if (e.focusNode && No(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
@@ -8147,7 +8147,7 @@ class Vf {
|
|
|
8147
8147
|
}
|
|
8148
8148
|
}
|
|
8149
8149
|
let p = null;
|
|
8150
|
-
s < 0 && a && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ls(n) && (p = br(e)) && p.eq(Z.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0,
|
|
8150
|
+
s < 0 && a && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ls(n) && (p = br(e)) && p.eq(Z.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ut(e), this.currentSelection.set(n), e.scrollToSelection()) : (s > -1 || a) && (s > -1 && (e.docView.markDirty(s, i), qf(e)), this.handleDOMChange(s, i, r, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || Ut(e), this.currentSelection.set(n));
|
|
8151
8151
|
}
|
|
8152
8152
|
registerMutation(e, t) {
|
|
8153
8153
|
if (t.indexOf(e.target) > -1)
|
|
@@ -8261,12 +8261,12 @@ const Jf = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
|
|
|
8261
8261
|
function Yf(o, e, t, n, a) {
|
|
8262
8262
|
let s = o.input.compositionPendingChanges || (o.composing ? o.input.compositionID : 0);
|
|
8263
8263
|
if (o.input.compositionPendingChanges = 0, e < 0) {
|
|
8264
|
-
let E = o.input.lastSelectionTime > Date.now() - 50 ? o.input.lastSelectionOrigin : null,
|
|
8265
|
-
if (
|
|
8266
|
-
if (Ne && yt && o.input.lastKeyCode === 13 && Date.now() - 100 < o.input.lastKeyCodeTime && o.someProp("handleKeyDown", (
|
|
8264
|
+
let E = o.input.lastSelectionTime > Date.now() - 50 ? o.input.lastSelectionOrigin : null, q = br(o, E);
|
|
8265
|
+
if (q && !o.state.selection.eq(q)) {
|
|
8266
|
+
if (Ne && yt && o.input.lastKeyCode === 13 && Date.now() - 100 < o.input.lastKeyCodeTime && o.someProp("handleKeyDown", (P) => P(o, yo(13, "Enter"))))
|
|
8267
8267
|
return;
|
|
8268
|
-
let
|
|
8269
|
-
E == "pointer" ?
|
|
8268
|
+
let X = o.state.tr.setSelection(q);
|
|
8269
|
+
E == "pointer" ? X.setMeta("pointer", !0) : E == "key" && X.scrollIntoView(), s && X.setMeta("composition", s), o.dispatch(X);
|
|
8270
8270
|
}
|
|
8271
8271
|
return;
|
|
8272
8272
|
}
|
|
@@ -8280,19 +8280,19 @@ function Yf(o, e, t, n, a) {
|
|
|
8280
8280
|
return;
|
|
8281
8281
|
}
|
|
8282
8282
|
if (!g)
|
|
8283
|
-
if (n && l instanceof
|
|
8283
|
+
if (n && l instanceof J && !l.empty && l.$head.sameParent(l.$anchor) && !o.composing && !(p.sel && p.sel.anchor != p.sel.head))
|
|
8284
8284
|
g = { start: l.from, endA: l.to, endB: l.to };
|
|
8285
8285
|
else {
|
|
8286
8286
|
if (p.sel) {
|
|
8287
8287
|
let E = np(o, o.state.doc, p.sel);
|
|
8288
8288
|
if (E && !E.eq(o.state.selection)) {
|
|
8289
|
-
let
|
|
8290
|
-
s &&
|
|
8289
|
+
let q = o.state.tr.setSelection(E);
|
|
8290
|
+
s && q.setMeta("composition", s), o.dispatch(q);
|
|
8291
8291
|
}
|
|
8292
8292
|
}
|
|
8293
8293
|
return;
|
|
8294
8294
|
}
|
|
8295
|
-
o.state.selection.from < o.state.selection.to && g.start == g.endB && o.state.selection instanceof
|
|
8295
|
+
o.state.selection.from < o.state.selection.to && g.start == g.endB && o.state.selection instanceof J && (g.start > o.state.selection.from && g.start <= o.state.selection.from + 2 && o.state.selection.from >= p.from ? g.start = o.state.selection.from : g.endA < o.state.selection.to && g.endA >= o.state.selection.to - 2 && o.state.selection.to <= p.to && (g.endB += o.state.selection.to - g.endA, g.endA = o.state.selection.to)), Ye && co <= 11 && g.endB == g.start + 1 && g.endA == g.start && g.start > p.from && p.doc.textBetween(g.start - p.from - 1, g.start - p.from + 1) == " " && (g.start--, g.endA--, g.endB--);
|
|
8296
8296
|
let f = p.doc.resolveNoCache(g.start - p.from), h = p.doc.resolveNoCache(g.endB - p.from), j = c.resolve(g.start), w = f.sameParent(h) && f.parent.inlineContent && j.end() >= g.endA, x;
|
|
8297
8297
|
if ((pn && o.input.lastIOSEnter > Date.now() - 225 && (!w || a.some((E) => E.nodeName == "DIV" || E.nodeName == "P")) || !w && f.pos < p.doc.content.size && !f.sameParent(h) && (x = Z.findFrom(p.doc.resolve(f.pos + 1), 1, !0)) && x.head == h.pos) && o.someProp("handleKeyDown", (E) => E(o, yo(13, "Enter")))) {
|
|
8298
8298
|
o.input.lastIOSEnter = 0;
|
|
@@ -8307,10 +8307,10 @@ function Yf(o, e, t, n, a) {
|
|
|
8307
8307
|
return E(o, yo(13, "Enter"));
|
|
8308
8308
|
});
|
|
8309
8309
|
}, 20));
|
|
8310
|
-
let b = g.start, A = g.endA, _,
|
|
8310
|
+
let b = g.start, A = g.endA, _, R, U;
|
|
8311
8311
|
if (w) {
|
|
8312
8312
|
if (f.pos == h.pos)
|
|
8313
|
-
Ye && co <= 11 && f.parentOffset == 0 && (o.domObserver.suppressSelectionUpdates(), setTimeout(() =>
|
|
8313
|
+
Ye && co <= 11 && f.parentOffset == 0 && (o.domObserver.suppressSelectionUpdates(), setTimeout(() => Ut(o), 20)), _ = o.state.tr.delete(b, A), R = c.resolve(g.start).marksAcross(c.resolve(g.endA));
|
|
8314
8314
|
else if (
|
|
8315
8315
|
// Adding or removing a mark
|
|
8316
8316
|
g.endA == g.endB && (U = Xf(f.parent.content.cut(f.parentOffset, h.parentOffset), j.parent.content.cut(j.parentOffset, g.endA - j.start())))
|
|
@@ -8318,7 +8318,7 @@ function Yf(o, e, t, n, a) {
|
|
|
8318
8318
|
_ = o.state.tr, U.type == "add" ? _.addMark(b, A, U.mark) : _.removeMark(b, A, U.mark);
|
|
8319
8319
|
else if (f.parent.child(f.index()).isText && f.index() == h.index() - (h.textOffset ? 0 : 1)) {
|
|
8320
8320
|
let E = f.parent.textBetween(f.parentOffset, h.parentOffset);
|
|
8321
|
-
if (o.someProp("handleTextInput", (
|
|
8321
|
+
if (o.someProp("handleTextInput", (q) => q(o, b, A, E)))
|
|
8322
8322
|
return;
|
|
8323
8323
|
_ = o.state.tr.insertText(E, b, A);
|
|
8324
8324
|
}
|
|
@@ -8327,7 +8327,7 @@ function Yf(o, e, t, n, a) {
|
|
|
8327
8327
|
let E = np(o, _.doc, p.sel);
|
|
8328
8328
|
E && !(Ne && yt && o.composing && E.empty && (g.start != g.endB || o.input.lastAndroidDelete < Date.now() - 100) && (E.head == b || E.head == _.mapping.map(A) - 1) || Ye && E.empty && E.head == b) && _.setSelection(E);
|
|
8329
8329
|
}
|
|
8330
|
-
|
|
8330
|
+
R && _.ensureMarks(R), s && _.setMeta("composition", s), o.dispatch(_.scrollIntoView());
|
|
8331
8331
|
}
|
|
8332
8332
|
function np(o, e, t) {
|
|
8333
8333
|
return Math.max(t.anchor, t.head) > e.content.size ? null : vr(o, e.resolve(t.anchor), e.resolve(t.head));
|
|
@@ -8484,7 +8484,7 @@ class eh {
|
|
|
8484
8484
|
let g = Ne ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
8485
8485
|
this.composing && (this.input.compositionNode = Af(this)), (s || !this.docView.update(e.doc, p, l, this)) && (this.docView.updateOuterDeco(p), this.docView.destroy(), this.docView = Ll(e.doc, p, l, this.dom, this)), g && !this.trackWrites && (u = !0);
|
|
8486
8486
|
}
|
|
8487
|
-
u || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && nf(this)) ?
|
|
8487
|
+
u || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && nf(this)) ? Ut(this, u) : (gm(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
8488
8488
|
}
|
|
8489
8489
|
this.updatePluginViews(a), !((n = this.dragging) === null || n === void 0) && n.node && !a.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, a), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : d && Tg(d);
|
|
8490
8490
|
}
|
|
@@ -8571,7 +8571,7 @@ class eh {
|
|
|
8571
8571
|
Focus the editor.
|
|
8572
8572
|
*/
|
|
8573
8573
|
focus() {
|
|
8574
|
-
this.domObserver.stop(), this.editable && Ng(this.dom),
|
|
8574
|
+
this.domObserver.stop(), this.editable && Ng(this.dom), Ut(this), this.domObserver.start();
|
|
8575
8575
|
}
|
|
8576
8576
|
/**
|
|
8577
8577
|
Get the document root in which the editor exists. This will
|
|
@@ -8990,7 +8990,7 @@ function Rm(o, e, t) {
|
|
|
8990
8990
|
return !1;
|
|
8991
8991
|
if (t) {
|
|
8992
8992
|
let c = o.tr.step(p);
|
|
8993
|
-
c.setSelection(
|
|
8993
|
+
c.setSelection(J.create(c.doc, s)), t(c.scrollIntoView());
|
|
8994
8994
|
}
|
|
8995
8995
|
return !0;
|
|
8996
8996
|
}
|
|
@@ -9125,14 +9125,14 @@ const fh = (o, e) => {
|
|
|
9125
9125
|
return !0;
|
|
9126
9126
|
}, Vm = (o, e) => {
|
|
9127
9127
|
let t = o.selection, { $from: n, $to: a } = t;
|
|
9128
|
-
if (t instanceof
|
|
9128
|
+
if (t instanceof gt || n.parent.inlineContent || a.parent.inlineContent)
|
|
9129
9129
|
return !1;
|
|
9130
9130
|
let s = Cr(a.parent.contentMatchAt(a.indexAfter()));
|
|
9131
9131
|
if (!s || !s.isTextblock)
|
|
9132
9132
|
return !1;
|
|
9133
9133
|
if (e) {
|
|
9134
9134
|
let i = (!n.parentOffset && a.index() < a.parent.childCount ? n : a).pos, r = o.tr.insert(i, s.createAndFill());
|
|
9135
|
-
r.setSelection(
|
|
9135
|
+
r.setSelection(J.create(r.doc, i + 1)), e(r.scrollIntoView());
|
|
9136
9136
|
}
|
|
9137
9137
|
return !0;
|
|
9138
9138
|
}, qm = (o, e) => {
|
|
@@ -9141,7 +9141,7 @@ const fh = (o, e) => {
|
|
|
9141
9141
|
return !1;
|
|
9142
9142
|
if (t.depth > 1 && t.after() != t.end(-1)) {
|
|
9143
9143
|
let s = t.before();
|
|
9144
|
-
if (
|
|
9144
|
+
if (Wt(o.doc, s))
|
|
9145
9145
|
return e && e(o.tr.split(s).scrollIntoView()), !0;
|
|
9146
9146
|
}
|
|
9147
9147
|
let n = t.blockRange(), a = n && kn(n);
|
|
@@ -9151,14 +9151,14 @@ function hh(o) {
|
|
|
9151
9151
|
return (e, t) => {
|
|
9152
9152
|
let { $from: n, $to: a } = e.selection;
|
|
9153
9153
|
if (e.selection instanceof W && e.selection.node.isBlock)
|
|
9154
|
-
return !n.parentOffset || !
|
|
9154
|
+
return !n.parentOffset || !Wt(e.doc, n.pos) ? !1 : (t && t(e.tr.split(n.pos).scrollIntoView()), !0);
|
|
9155
9155
|
if (!n.parent.isBlock)
|
|
9156
9156
|
return !1;
|
|
9157
9157
|
if (t) {
|
|
9158
9158
|
let s = a.parentOffset == a.parent.content.size, i = e.tr;
|
|
9159
|
-
(e.selection instanceof
|
|
9160
|
-
let r = n.depth == 0 ? null : Cr(n.node(-1).contentMatchAt(n.indexAfter(-1))), l = s && r ? [{ type: r }] : void 0, p =
|
|
9161
|
-
if (!l && !p &&
|
|
9159
|
+
(e.selection instanceof J || e.selection instanceof gt) && i.deleteSelection();
|
|
9160
|
+
let r = n.depth == 0 ? null : Cr(n.node(-1).contentMatchAt(n.indexAfter(-1))), l = s && r ? [{ type: r }] : void 0, p = Wt(i.doc, i.mapping.map(n.pos), 1, l);
|
|
9161
|
+
if (!l && !p && Wt(i.doc, i.mapping.map(n.pos), 1, r ? [{ type: r }] : void 0) && (r && (l = [{ type: r }]), p = !0), p && (i.split(i.mapping.map(n.pos), 1, l), !s && !n.parentOffset && n.parent.type != r)) {
|
|
9162
9162
|
let c = i.mapping.map(n.before()), m = i.doc.resolve(c);
|
|
9163
9163
|
r && n.node(-1).canReplaceWith(m.index(), m.index() + 1, r) && i.setNodeMarkup(i.mapping.map(n.before()), r);
|
|
9164
9164
|
}
|
|
@@ -9222,7 +9222,7 @@ function Um(o) {
|
|
|
9222
9222
|
return !1;
|
|
9223
9223
|
s--;
|
|
9224
9224
|
}
|
|
9225
|
-
return a.node(s).isTextblock ? (t && t(e.tr.setSelection(
|
|
9225
|
+
return a.node(s).isTextblock ? (t && t(e.tr.setSelection(J.create(e.doc, o < 0 ? a.start(s) : a.end(s)))), !0) : !1;
|
|
9226
9226
|
};
|
|
9227
9227
|
}
|
|
9228
9228
|
const kh = Um(-1), yh = Um(1);
|
|
@@ -9299,7 +9299,7 @@ function wh(o, e, t, n, a) {
|
|
|
9299
9299
|
t[c].type == a && (i = c + 1);
|
|
9300
9300
|
let r = t.length - i, l = e.start + t.length - (n ? 2 : 0), p = e.parent;
|
|
9301
9301
|
for (let c = e.startIndex, m = e.endIndex, d = !0; c < m; c++, d = !1)
|
|
9302
|
-
!d &&
|
|
9302
|
+
!d && Wt(o.doc, l, r) && (o.split(l, r), l += 2 * r), l += p.child(c).nodeSize;
|
|
9303
9303
|
return o;
|
|
9304
9304
|
}
|
|
9305
9305
|
function Ih(o) {
|
|
@@ -9459,10 +9459,10 @@ class Sh {
|
|
|
9459
9459
|
this.callbacks = {};
|
|
9460
9460
|
}
|
|
9461
9461
|
}
|
|
9462
|
-
function
|
|
9463
|
-
return o.config[e] === void 0 && o.parent ?
|
|
9462
|
+
function B(o, e, t) {
|
|
9463
|
+
return o.config[e] === void 0 && o.parent ? B(o.parent, e, t) : typeof o.config[e] == "function" ? o.config[e].bind({
|
|
9464
9464
|
...t,
|
|
9465
|
-
parent: o.parent ?
|
|
9465
|
+
parent: o.parent ? B(o.parent, e, t) : null
|
|
9466
9466
|
}) : o.config[e];
|
|
9467
9467
|
}
|
|
9468
9468
|
function qs(o) {
|
|
@@ -9488,7 +9488,7 @@ function Km(o) {
|
|
|
9488
9488
|
options: i.options,
|
|
9489
9489
|
storage: i.storage,
|
|
9490
9490
|
extensions: a
|
|
9491
|
-
}, l =
|
|
9491
|
+
}, l = B(i, "addGlobalAttributes", r);
|
|
9492
9492
|
if (!l)
|
|
9493
9493
|
return;
|
|
9494
9494
|
l().forEach((c) => {
|
|
@@ -9510,7 +9510,7 @@ function Km(o) {
|
|
|
9510
9510
|
name: i.name,
|
|
9511
9511
|
options: i.options,
|
|
9512
9512
|
storage: i.storage
|
|
9513
|
-
}, l =
|
|
9513
|
+
}, l = B(i, "addAttributes", r);
|
|
9514
9514
|
if (!l)
|
|
9515
9515
|
return;
|
|
9516
9516
|
const p = l();
|
|
@@ -9568,7 +9568,7 @@ function Ji(o, e) {
|
|
|
9568
9568
|
function Gm(o) {
|
|
9569
9569
|
return typeof o == "function";
|
|
9570
9570
|
}
|
|
9571
|
-
function
|
|
9571
|
+
function oe(o, e = void 0, ...t) {
|
|
9572
9572
|
return Gm(o) ? e ? o.bind(e)(...t) : o(...t) : o;
|
|
9573
9573
|
}
|
|
9574
9574
|
function Mh(o = {}) {
|
|
@@ -9603,44 +9603,44 @@ function dp(o) {
|
|
|
9603
9603
|
}
|
|
9604
9604
|
function Oh(o, e) {
|
|
9605
9605
|
var t;
|
|
9606
|
-
const n = Km(o), { nodeExtensions: a, markExtensions: s } = qs(o), i = (t = a.find((p) =>
|
|
9606
|
+
const n = Km(o), { nodeExtensions: a, markExtensions: s } = qs(o), i = (t = a.find((p) => B(p, "topNode"))) === null || t === void 0 ? void 0 : t.name, r = Object.fromEntries(a.map((p) => {
|
|
9607
9607
|
const c = n.filter((j) => j.type === p.name), m = {
|
|
9608
9608
|
name: p.name,
|
|
9609
9609
|
options: p.options,
|
|
9610
9610
|
storage: p.storage,
|
|
9611
9611
|
editor: e
|
|
9612
9612
|
}, d = o.reduce((j, w) => {
|
|
9613
|
-
const x =
|
|
9613
|
+
const x = B(w, "extendNodeSchema", m);
|
|
9614
9614
|
return {
|
|
9615
9615
|
...j,
|
|
9616
9616
|
...x ? x(p) : {}
|
|
9617
9617
|
};
|
|
9618
9618
|
}, {}), u = dp({
|
|
9619
9619
|
...d,
|
|
9620
|
-
content:
|
|
9621
|
-
marks:
|
|
9622
|
-
group:
|
|
9623
|
-
inline:
|
|
9624
|
-
atom:
|
|
9625
|
-
selectable:
|
|
9626
|
-
draggable:
|
|
9627
|
-
code:
|
|
9628
|
-
whitespace:
|
|
9629
|
-
linebreakReplacement:
|
|
9630
|
-
defining:
|
|
9631
|
-
isolating:
|
|
9620
|
+
content: oe(B(p, "content", m)),
|
|
9621
|
+
marks: oe(B(p, "marks", m)),
|
|
9622
|
+
group: oe(B(p, "group", m)),
|
|
9623
|
+
inline: oe(B(p, "inline", m)),
|
|
9624
|
+
atom: oe(B(p, "atom", m)),
|
|
9625
|
+
selectable: oe(B(p, "selectable", m)),
|
|
9626
|
+
draggable: oe(B(p, "draggable", m)),
|
|
9627
|
+
code: oe(B(p, "code", m)),
|
|
9628
|
+
whitespace: oe(B(p, "whitespace", m)),
|
|
9629
|
+
linebreakReplacement: oe(B(p, "linebreakReplacement", m)),
|
|
9630
|
+
defining: oe(B(p, "defining", m)),
|
|
9631
|
+
isolating: oe(B(p, "isolating", m)),
|
|
9632
9632
|
attrs: Object.fromEntries(c.map((j) => {
|
|
9633
9633
|
var w;
|
|
9634
9634
|
return [j.name, { default: (w = j == null ? void 0 : j.attribute) === null || w === void 0 ? void 0 : w.default }];
|
|
9635
9635
|
}))
|
|
9636
|
-
}), g =
|
|
9636
|
+
}), g = oe(B(p, "parseHTML", m));
|
|
9637
9637
|
g && (u.parseDOM = g.map((j) => mp(j, c)));
|
|
9638
|
-
const f =
|
|
9638
|
+
const f = B(p, "renderHTML", m);
|
|
9639
9639
|
f && (u.toDOM = (j) => f({
|
|
9640
9640
|
node: j,
|
|
9641
9641
|
HTMLAttributes: Ji(j, c)
|
|
9642
9642
|
}));
|
|
9643
|
-
const h =
|
|
9643
|
+
const h = B(p, "renderText", m);
|
|
9644
9644
|
return h && (u.toText = h), [p.name, u];
|
|
9645
9645
|
})), l = Object.fromEntries(s.map((p) => {
|
|
9646
9646
|
const c = n.filter((h) => h.type === p.name), m = {
|
|
@@ -9649,25 +9649,25 @@ function Oh(o, e) {
|
|
|
9649
9649
|
storage: p.storage,
|
|
9650
9650
|
editor: e
|
|
9651
9651
|
}, d = o.reduce((h, j) => {
|
|
9652
|
-
const w =
|
|
9652
|
+
const w = B(j, "extendMarkSchema", m);
|
|
9653
9653
|
return {
|
|
9654
9654
|
...h,
|
|
9655
9655
|
...w ? w(p) : {}
|
|
9656
9656
|
};
|
|
9657
9657
|
}, {}), u = dp({
|
|
9658
9658
|
...d,
|
|
9659
|
-
inclusive:
|
|
9660
|
-
excludes:
|
|
9661
|
-
group:
|
|
9662
|
-
spanning:
|
|
9663
|
-
code:
|
|
9659
|
+
inclusive: oe(B(p, "inclusive", m)),
|
|
9660
|
+
excludes: oe(B(p, "excludes", m)),
|
|
9661
|
+
group: oe(B(p, "group", m)),
|
|
9662
|
+
spanning: oe(B(p, "spanning", m)),
|
|
9663
|
+
code: oe(B(p, "code", m)),
|
|
9664
9664
|
attrs: Object.fromEntries(c.map((h) => {
|
|
9665
9665
|
var j;
|
|
9666
9666
|
return [h.name, { default: (j = h == null ? void 0 : h.attribute) === null || j === void 0 ? void 0 : j.default }];
|
|
9667
9667
|
}))
|
|
9668
|
-
}), g =
|
|
9668
|
+
}), g = oe(B(p, "parseHTML", m));
|
|
9669
9669
|
g && (u.parseDOM = g.map((h) => mp(h, c)));
|
|
9670
|
-
const f =
|
|
9670
|
+
const f = B(p, "renderHTML", m);
|
|
9671
9671
|
return f && (u.toDOM = (h) => f({
|
|
9672
9672
|
mark: h,
|
|
9673
9673
|
HTMLAttributes: Ji(h, c)
|
|
@@ -9856,9 +9856,9 @@ class Nt {
|
|
|
9856
9856
|
}, this.config = {
|
|
9857
9857
|
...this.config,
|
|
9858
9858
|
...e
|
|
9859
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options =
|
|
9859
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = oe(B(this, "addOptions", {
|
|
9860
9860
|
name: this.name
|
|
9861
|
-
}))), this.storage =
|
|
9861
|
+
}))), this.storage = oe(B(this, "addStorage", {
|
|
9862
9862
|
name: this.name,
|
|
9863
9863
|
options: this.options
|
|
9864
9864
|
})) || {};
|
|
@@ -9875,9 +9875,9 @@ class Nt {
|
|
|
9875
9875
|
}
|
|
9876
9876
|
extend(e = {}) {
|
|
9877
9877
|
const t = new Nt(e);
|
|
9878
|
-
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options =
|
|
9878
|
+
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = oe(B(t, "addOptions", {
|
|
9879
9879
|
name: t.name
|
|
9880
|
-
})), t.storage =
|
|
9880
|
+
})), t.storage = oe(B(t, "addStorage", {
|
|
9881
9881
|
name: t.name,
|
|
9882
9882
|
options: t.options
|
|
9883
9883
|
})), t;
|
|
@@ -9926,7 +9926,7 @@ function Lh(o) {
|
|
|
9926
9926
|
const b = f + x.index + 1, A = b + x[0].length, _ = {
|
|
9927
9927
|
from: t.tr.mapping.map(b),
|
|
9928
9928
|
to: t.tr.mapping.map(A)
|
|
9929
|
-
},
|
|
9929
|
+
}, R = s.handler({
|
|
9930
9930
|
state: t,
|
|
9931
9931
|
range: _,
|
|
9932
9932
|
match: x,
|
|
@@ -9936,7 +9936,7 @@ function Lh(o) {
|
|
|
9936
9936
|
pasteEvent: i,
|
|
9937
9937
|
dropEvent: r
|
|
9938
9938
|
});
|
|
9939
|
-
m.push(
|
|
9939
|
+
m.push(R);
|
|
9940
9940
|
});
|
|
9941
9941
|
}), m.every((u) => u !== null);
|
|
9942
9942
|
}
|
|
@@ -10007,12 +10007,12 @@ function $h(o) {
|
|
|
10007
10007
|
if (w) {
|
|
10008
10008
|
let { text: A } = j;
|
|
10009
10009
|
typeof A == "string" ? A = A : A = Sr(C.from(A), u.schema);
|
|
10010
|
-
const { from: _ } = j,
|
|
10010
|
+
const { from: _ } = j, R = _ + A.length, U = zh(A);
|
|
10011
10011
|
return l({
|
|
10012
10012
|
rule: c,
|
|
10013
10013
|
state: u,
|
|
10014
10014
|
from: _,
|
|
10015
|
-
to: { b:
|
|
10015
|
+
to: { b: R },
|
|
10016
10016
|
pasteEvt: U
|
|
10017
10017
|
});
|
|
10018
10018
|
}
|
|
@@ -10057,7 +10057,7 @@ class on {
|
|
|
10057
10057
|
name: t.name,
|
|
10058
10058
|
options: t.options,
|
|
10059
10059
|
storage: t.storage
|
|
10060
|
-
}, a =
|
|
10060
|
+
}, a = B(t, "addExtensions", n);
|
|
10061
10061
|
return a ? [t, ...this.flatten(a())] : t;
|
|
10062
10062
|
}).flat(10);
|
|
10063
10063
|
}
|
|
@@ -10068,7 +10068,7 @@ class on {
|
|
|
10068
10068
|
*/
|
|
10069
10069
|
static sort(e) {
|
|
10070
10070
|
return e.sort((n, a) => {
|
|
10071
|
-
const s =
|
|
10071
|
+
const s = B(n, "priority") || 100, i = B(a, "priority") || 100;
|
|
10072
10072
|
return s > i ? -1 : s < i ? 1 : 0;
|
|
10073
10073
|
});
|
|
10074
10074
|
}
|
|
@@ -10084,7 +10084,7 @@ class on {
|
|
|
10084
10084
|
storage: t.storage,
|
|
10085
10085
|
editor: this.editor,
|
|
10086
10086
|
type: bi(t.name, this.schema)
|
|
10087
|
-
}, a =
|
|
10087
|
+
}, a = B(t, "addCommands", n);
|
|
10088
10088
|
return a ? {
|
|
10089
10089
|
...e,
|
|
10090
10090
|
...a()
|
|
@@ -10103,19 +10103,19 @@ class on {
|
|
|
10103
10103
|
storage: i.storage,
|
|
10104
10104
|
editor: e,
|
|
10105
10105
|
type: bi(i.name, this.schema)
|
|
10106
|
-
}, l = [], p =
|
|
10106
|
+
}, l = [], p = B(i, "addKeyboardShortcuts", r);
|
|
10107
10107
|
let c = {};
|
|
10108
|
-
if (i.type === "mark" &&
|
|
10108
|
+
if (i.type === "mark" && B(i, "exitable", r) && (c.ArrowRight = () => Nt.handleExit({ editor: e, mark: i })), p) {
|
|
10109
10109
|
const f = Object.fromEntries(Object.entries(p()).map(([h, j]) => [h, () => j({ editor: e })]));
|
|
10110
10110
|
c = { ...c, ...f };
|
|
10111
10111
|
}
|
|
10112
10112
|
const m = ph(c);
|
|
10113
10113
|
l.push(m);
|
|
10114
|
-
const d =
|
|
10114
|
+
const d = B(i, "addInputRules", r);
|
|
10115
10115
|
up(i, e.options.enableInputRules) && d && n.push(...d());
|
|
10116
|
-
const u =
|
|
10116
|
+
const u = B(i, "addPasteRules", r);
|
|
10117
10117
|
up(i, e.options.enablePasteRules) && u && a.push(...u());
|
|
10118
|
-
const g =
|
|
10118
|
+
const g = B(i, "addProseMirrorPlugins", r);
|
|
10119
10119
|
if (g) {
|
|
10120
10120
|
const f = g();
|
|
10121
10121
|
l.push(...f);
|
|
@@ -10147,14 +10147,14 @@ class on {
|
|
|
10147
10147
|
*/
|
|
10148
10148
|
get nodeViews() {
|
|
10149
10149
|
const { editor: e } = this, { nodeExtensions: t } = qs(this.extensions);
|
|
10150
|
-
return Object.fromEntries(t.filter((n) => !!
|
|
10150
|
+
return Object.fromEntries(t.filter((n) => !!B(n, "addNodeView")).map((n) => {
|
|
10151
10151
|
const a = this.attributes.filter((l) => l.type === n.name), s = {
|
|
10152
10152
|
name: n.name,
|
|
10153
10153
|
options: n.options,
|
|
10154
10154
|
storage: n.storage,
|
|
10155
10155
|
editor: e,
|
|
10156
10156
|
type: xe(n.name, this.schema)
|
|
10157
|
-
}, i =
|
|
10157
|
+
}, i = B(n, "addNodeView", s);
|
|
10158
10158
|
if (!i)
|
|
10159
10159
|
return [];
|
|
10160
10160
|
const r = (l, p, c, m, d) => {
|
|
@@ -10190,8 +10190,8 @@ class on {
|
|
|
10190
10190
|
editor: this.editor,
|
|
10191
10191
|
type: bi(e.name, this.schema)
|
|
10192
10192
|
};
|
|
10193
|
-
e.type === "mark" && (!((t =
|
|
10194
|
-
const a =
|
|
10193
|
+
e.type === "mark" && (!((t = oe(B(e, "keepOnSplit", n))) !== null && t !== void 0) || t) && this.splittableMarks.push(e.name);
|
|
10194
|
+
const a = B(e, "onBeforeCreate", n), s = B(e, "onCreate", n), i = B(e, "onUpdate", n), r = B(e, "onSelectionUpdate", n), l = B(e, "onTransaction", n), p = B(e, "onFocus", n), c = B(e, "onBlur", n), m = B(e, "onDestroy", n);
|
|
10195
10195
|
a && this.editor.on("beforeCreate", a), s && this.editor.on("create", s), i && this.editor.on("update", i), r && this.editor.on("selectionUpdate", r), l && this.editor.on("transaction", l), p && this.editor.on("focus", p), c && this.editor.on("blur", c), m && this.editor.on("destroy", m);
|
|
10196
10196
|
});
|
|
10197
10197
|
}
|
|
@@ -10204,9 +10204,9 @@ class Se {
|
|
|
10204
10204
|
}, this.config = {
|
|
10205
10205
|
...this.config,
|
|
10206
10206
|
...e
|
|
10207
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options =
|
|
10207
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = oe(B(this, "addOptions", {
|
|
10208
10208
|
name: this.name
|
|
10209
|
-
}))), this.storage =
|
|
10209
|
+
}))), this.storage = oe(B(this, "addStorage", {
|
|
10210
10210
|
name: this.name,
|
|
10211
10211
|
options: this.options
|
|
10212
10212
|
})) || {};
|
|
@@ -10223,9 +10223,9 @@ class Se {
|
|
|
10223
10223
|
}
|
|
10224
10224
|
extend(e = {}) {
|
|
10225
10225
|
const t = new Se({ ...this.config, ...e });
|
|
10226
|
-
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options =
|
|
10226
|
+
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = oe(B(t, "addOptions", {
|
|
10227
10227
|
name: t.name
|
|
10228
|
-
})), t.storage =
|
|
10228
|
+
})), t.storage = oe(B(t, "addStorage", {
|
|
10229
10229
|
name: t.name,
|
|
10230
10230
|
options: t.options
|
|
10231
10231
|
})), t;
|
|
@@ -10301,7 +10301,7 @@ const Vh = Se.create({
|
|
|
10301
10301
|
const { state: a } = t, s = a.doc.slice(o.from, o.to);
|
|
10302
10302
|
n.deleteRange(o.from, o.to);
|
|
10303
10303
|
const i = n.mapping.map(e);
|
|
10304
|
-
return n.insert(i, s.content), n.setSelection(new
|
|
10304
|
+
return n.insert(i, s.content), n.setSelection(new J(n.doc.resolve(i - 1))), !0;
|
|
10305
10305
|
}, Yh = () => ({ tr: o, dispatch: e }) => {
|
|
10306
10306
|
const { selection: t } = o, n = t.$anchor.node();
|
|
10307
10307
|
if (n.content.size > 0)
|
|
@@ -10375,7 +10375,7 @@ const ob = (o, e = {}) => ({ tr: t, state: n, dispatch: a }) => {
|
|
|
10375
10375
|
if (a) {
|
|
10376
10376
|
const m = Us(l, s, e);
|
|
10377
10377
|
if (m && m.from <= p && m.to >= c) {
|
|
10378
|
-
const d =
|
|
10378
|
+
const d = J.create(i, m.from, m.to);
|
|
10379
10379
|
t.setSelection(d);
|
|
10380
10380
|
}
|
|
10381
10381
|
}
|
|
@@ -10388,9 +10388,9 @@ const ob = (o, e = {}) => ({ tr: t, state: n, dispatch: a }) => {
|
|
|
10388
10388
|
return !1;
|
|
10389
10389
|
};
|
|
10390
10390
|
function Fr(o) {
|
|
10391
|
-
return o instanceof
|
|
10391
|
+
return o instanceof J;
|
|
10392
10392
|
}
|
|
10393
|
-
function
|
|
10393
|
+
function qt(o = 0, e = 0, t = 0) {
|
|
10394
10394
|
return Math.min(Math.max(o, e), t);
|
|
10395
10395
|
}
|
|
10396
10396
|
function Qm(o, e = null) {
|
|
@@ -10402,7 +10402,7 @@ function Qm(o, e = null) {
|
|
|
10402
10402
|
if (e === "end")
|
|
10403
10403
|
return n;
|
|
10404
10404
|
const a = t.from, s = n.to;
|
|
10405
|
-
return e === "all" ?
|
|
10405
|
+
return e === "all" ? J.create(o, qt(0, a, s), qt(o.content.size, a, s)) : J.create(o, qt(e, a, s), qt(e, a, s));
|
|
10406
10406
|
}
|
|
10407
10407
|
function Or() {
|
|
10408
10408
|
return [
|
|
@@ -10851,7 +10851,7 @@ function hp(o, e) {
|
|
|
10851
10851
|
name: n.name,
|
|
10852
10852
|
options: n.options,
|
|
10853
10853
|
storage: n.storage
|
|
10854
|
-
}, s =
|
|
10854
|
+
}, s = oe(B(n, "group", a));
|
|
10855
10855
|
return typeof s != "string" ? !1 : s.split(" ").includes("list");
|
|
10856
10856
|
}
|
|
10857
10857
|
function Gs(o, { checkChildren: e = !0, ignoreWhitespace: t = !1 } = {}) {
|
|
@@ -10880,7 +10880,7 @@ function sd(o) {
|
|
|
10880
10880
|
return o instanceof W;
|
|
10881
10881
|
}
|
|
10882
10882
|
function id(o, e, t) {
|
|
10883
|
-
const a = o.state.doc.content.size, s =
|
|
10883
|
+
const a = o.state.doc.content.size, s = qt(e, 0, a), i = qt(t, 0, a), r = o.coordsAtPos(s), l = o.coordsAtPos(i, -1), p = Math.min(r.top, l.top), c = Math.max(r.bottom, l.bottom), m = Math.min(r.left, l.left), d = Math.max(r.right, l.right), u = d - m, g = c - p, j = {
|
|
10884
10884
|
top: p,
|
|
10885
10885
|
bottom: c,
|
|
10886
10886
|
left: m,
|
|
@@ -10946,13 +10946,13 @@ const $b = (o, e = {}) => ({ tr: t, state: n, dispatch: a }) => {
|
|
|
10946
10946
|
return t.selection.$anchor.sameParent(t.selection.$head) && (i = t.selection.$anchor.parent.attrs), s.isTextblock ? a().command(({ commands: r }) => cp(s, { ...i, ...e })(t) ? !0 : r.clearNodes()).command(({ state: r }) => cp(s, { ...i, ...e })(r, n)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
10947
10947
|
}, qb = (o) => ({ tr: e, dispatch: t }) => {
|
|
10948
10948
|
if (t) {
|
|
10949
|
-
const { doc: n } = e, a =
|
|
10949
|
+
const { doc: n } = e, a = qt(o, 0, n.content.size), s = W.create(n, a);
|
|
10950
10950
|
e.setSelection(s);
|
|
10951
10951
|
}
|
|
10952
10952
|
return !0;
|
|
10953
10953
|
}, Wb = (o) => ({ tr: e, dispatch: t }) => {
|
|
10954
10954
|
if (t) {
|
|
10955
|
-
const { doc: n } = e, { from: a, to: s } = typeof o == "number" ? { from: o, to: o } : o, i =
|
|
10955
|
+
const { doc: n } = e, { from: a, to: s } = typeof o == "number" ? { from: o, to: o } : o, i = J.atStart(n).from, r = J.atEnd(n).to, l = qt(a, i, r), p = qt(s, i, r), c = J.create(n, l, p);
|
|
10956
10956
|
e.setSelection(c);
|
|
10957
10957
|
}
|
|
10958
10958
|
return !0;
|
|
@@ -10970,7 +10970,7 @@ function bp(o, e) {
|
|
|
10970
10970
|
const Kb = ({ keepMarks: o = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor: a }) => {
|
|
10971
10971
|
const { selection: s, doc: i } = e, { $from: r, $to: l } = s, p = a.extensionManager.attributes, c = Ma(p, r.node().type.name, r.node().attrs);
|
|
10972
10972
|
if (s instanceof W && s.node.isBlock)
|
|
10973
|
-
return !r.parentOffset || !
|
|
10973
|
+
return !r.parentOffset || !Wt(i, r.pos) ? !1 : (n && (o && bp(t, a.extensionManager.splittableMarks), e.split(r.pos).scrollIntoView()), !0);
|
|
10974
10974
|
if (!r.parent.isBlock)
|
|
10975
10975
|
return !1;
|
|
10976
10976
|
const m = l.parentOffset === l.parent.content.size, d = r.depth === 0 ? void 0 : Ab(r.node(-1).contentMatchAt(r.indexAfter(-1)));
|
|
@@ -10979,14 +10979,14 @@ const Kb = ({ keepMarks: o = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
10979
10979
|
type: d,
|
|
10980
10980
|
attrs: c
|
|
10981
10981
|
}
|
|
10982
|
-
] : void 0, g =
|
|
10983
|
-
if (!u && !g &&
|
|
10982
|
+
] : void 0, g = Wt(e.doc, e.mapping.map(r.pos), 1, u);
|
|
10983
|
+
if (!u && !g && Wt(e.doc, e.mapping.map(r.pos), 1, d ? [{ type: d }] : void 0) && (g = !0, u = d ? [
|
|
10984
10984
|
{
|
|
10985
10985
|
type: d,
|
|
10986
10986
|
attrs: c
|
|
10987
10987
|
}
|
|
10988
10988
|
] : void 0), n) {
|
|
10989
|
-
if (g && (s instanceof
|
|
10989
|
+
if (g && (s instanceof J && e.deleteSelection(), e.split(e.mapping.map(r.pos), 1, u), d && !m && !r.parentOffset && r.parent.type !== d)) {
|
|
10990
10990
|
const f = e.mapping.map(r.before()), h = e.doc.resolve(f);
|
|
10991
10991
|
r.node(-1).canReplaceWith(h.index(), h.index() + 1, d) && e.setNodeMarkup(e.mapping.map(r.before()), d);
|
|
10992
10992
|
}
|
|
@@ -11017,12 +11017,12 @@ const Kb = ({ keepMarks: o = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
11017
11017
|
j = j.append(C.from(r.createAndFill(null, A) || void 0));
|
|
11018
11018
|
const _ = l.before(l.depth - (w - 1));
|
|
11019
11019
|
t.replace(_, l.after(-x), new T(j, 4 - w, 0));
|
|
11020
|
-
let
|
|
11020
|
+
let R = -1;
|
|
11021
11021
|
t.doc.nodesBetween(_, t.doc.content.size, (U, E) => {
|
|
11022
|
-
if (
|
|
11022
|
+
if (R > -1)
|
|
11023
11023
|
return !1;
|
|
11024
|
-
U.isTextblock && U.content.size === 0 && (
|
|
11025
|
-
}),
|
|
11024
|
+
U.isTextblock && U.content.size === 0 && (R = E + 1);
|
|
11025
|
+
}), R > -1 && t.setSelection(J.near(t.doc.resolve(R))), t.scrollIntoView();
|
|
11026
11026
|
}
|
|
11027
11027
|
return !0;
|
|
11028
11028
|
}
|
|
@@ -11038,7 +11038,7 @@ const Kb = ({ keepMarks: o = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
11038
11038
|
{ type: r, attrs: g },
|
|
11039
11039
|
{ type: u, attrs: f }
|
|
11040
11040
|
] : [{ type: r, attrs: g }];
|
|
11041
|
-
if (!
|
|
11041
|
+
if (!Wt(t.doc, l.pos, 2))
|
|
11042
11042
|
return !1;
|
|
11043
11043
|
if (a) {
|
|
11044
11044
|
const { selection: j, storedMarks: w } = n, { splittableMarks: x } = s.extensionManager, b = w || j.$to.parentOffset && j.$from.marks();
|
|
@@ -11078,8 +11078,8 @@ const Kb = ({ keepMarks: o = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
11078
11078
|
return l().command(() => (s.setNodeMarkup(A.pos, u), !0)).command(() => vi(s, u)).command(() => ji(s, u)).run();
|
|
11079
11079
|
}
|
|
11080
11080
|
return !t || !b || !r ? l().command(() => c().wrapInList(u, n) ? !0 : p.clearNodes()).wrapInList(u, n).command(() => vi(s, u)).command(() => ji(s, u)).run() : l().command(() => {
|
|
11081
|
-
const _ = c().wrapInList(u, n),
|
|
11082
|
-
return s.ensureMarks(
|
|
11081
|
+
const _ = c().wrapInList(u, n), R = b.filter((U) => d.includes(U.type.name));
|
|
11082
|
+
return s.ensureMarks(R), _ ? !0 : p.clearNodes();
|
|
11083
11083
|
}).wrapInList(u, n).command(() => vi(s, u)).command(() => ji(s, u)).run();
|
|
11084
11084
|
}, Yb = (o, e = {}, t = {}) => ({ state: n, commands: a }) => {
|
|
11085
11085
|
const { extendEmptyMarkRange: s = !1 } = t, i = bo(o, n.schema);
|
|
@@ -11953,7 +11953,7 @@ function mn(o) {
|
|
|
11953
11953
|
return new ra({
|
|
11954
11954
|
find: o.find,
|
|
11955
11955
|
handler: ({ state: e, range: t, match: n }) => {
|
|
11956
|
-
const a =
|
|
11956
|
+
const a = oe(o.getAttributes, void 0, n);
|
|
11957
11957
|
if (a === !1 || a === null)
|
|
11958
11958
|
return null;
|
|
11959
11959
|
const { tr: s } = e, i = n[n.length - 1], r = n[0];
|
|
@@ -11972,7 +11972,7 @@ function Rr(o) {
|
|
|
11972
11972
|
return new ra({
|
|
11973
11973
|
find: o.find,
|
|
11974
11974
|
handler: ({ state: e, range: t, match: n }) => {
|
|
11975
|
-
const a =
|
|
11975
|
+
const a = oe(o.getAttributes, void 0, n) || {}, { tr: s } = e, i = t.from;
|
|
11976
11976
|
let r = t.to;
|
|
11977
11977
|
const l = o.type.create(a);
|
|
11978
11978
|
if (n[1]) {
|
|
@@ -11993,7 +11993,7 @@ function Qi(o) {
|
|
|
11993
11993
|
return new ra({
|
|
11994
11994
|
find: o.find,
|
|
11995
11995
|
handler: ({ state: e, range: t, match: n }) => {
|
|
11996
|
-
const a = e.doc.resolve(t.from), s =
|
|
11996
|
+
const a = e.doc.resolve(t.from), s = oe(o.getAttributes, void 0, n) || {};
|
|
11997
11997
|
if (!a.node(-1).canReplaceWith(a.index(-1), a.indexAfter(-1), o.type))
|
|
11998
11998
|
return null;
|
|
11999
11999
|
e.tr.delete(t.from, t.to).setBlockType(t.from, t.from, o.type, s);
|
|
@@ -12004,7 +12004,7 @@ function Un(o) {
|
|
|
12004
12004
|
return new ra({
|
|
12005
12005
|
find: o.find,
|
|
12006
12006
|
handler: ({ state: e, range: t, match: n, chain: a }) => {
|
|
12007
|
-
const s =
|
|
12007
|
+
const s = oe(o.getAttributes, void 0, n) || {}, i = e.tr.delete(t.from, t.to), l = i.doc.resolve(t.from).blockRange(), p = l && gr(l, o.type, s);
|
|
12008
12008
|
if (!p)
|
|
12009
12009
|
return null;
|
|
12010
12010
|
if (i.wrap(l, p), o.keepMarks && o.editor) {
|
|
@@ -12031,9 +12031,9 @@ class Be {
|
|
|
12031
12031
|
}, this.config = {
|
|
12032
12032
|
...this.config,
|
|
12033
12033
|
...e
|
|
12034
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options =
|
|
12034
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = oe(B(this, "addOptions", {
|
|
12035
12035
|
name: this.name
|
|
12036
|
-
}))), this.storage =
|
|
12036
|
+
}))), this.storage = oe(B(this, "addStorage", {
|
|
12037
12037
|
name: this.name,
|
|
12038
12038
|
options: this.options
|
|
12039
12039
|
})) || {};
|
|
@@ -12050,9 +12050,9 @@ class Be {
|
|
|
12050
12050
|
}
|
|
12051
12051
|
extend(e = {}) {
|
|
12052
12052
|
const t = new Be(e);
|
|
12053
|
-
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options =
|
|
12053
|
+
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = oe(B(t, "addOptions", {
|
|
12054
12054
|
name: t.name
|
|
12055
|
-
})), t.storage =
|
|
12055
|
+
})), t.storage = oe(B(t, "addStorage", {
|
|
12056
12056
|
name: t.name,
|
|
12057
12057
|
options: t.options
|
|
12058
12058
|
})), t;
|
|
@@ -12062,7 +12062,7 @@ function Ro(o) {
|
|
|
12062
12062
|
return new Jm({
|
|
12063
12063
|
find: o.find,
|
|
12064
12064
|
handler: ({ state: e, range: t, match: n, pasteEvent: a }) => {
|
|
12065
|
-
const s =
|
|
12065
|
+
const s = oe(o.getAttributes, void 0, n, a);
|
|
12066
12066
|
if (s === !1 || s === null)
|
|
12067
12067
|
return null;
|
|
12068
12068
|
const { tr: i } = e, r = n[n.length - 1], l = n[0];
|
|
@@ -12079,7 +12079,7 @@ function Ro(o) {
|
|
|
12079
12079
|
function rd(o) {
|
|
12080
12080
|
return o.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
12081
12081
|
}
|
|
12082
|
-
var Xe = "top",
|
|
12082
|
+
var Xe = "top", bt = "bottom", vt = "right", Ze = "left", Pr = "auto", la = [Xe, bt, vt, Ze], dn = "start", Kn = "end", hv = "clippingParents", ld = "viewport", wn = "popper", bv = "reference", vp = /* @__PURE__ */ la.reduce(function(o, e) {
|
|
12083
12083
|
return o.concat([e + "-" + dn, e + "-" + Kn]);
|
|
12084
12084
|
}, []), pd = /* @__PURE__ */ [].concat(la, [Pr]).reduce(function(o, e) {
|
|
12085
12085
|
return o.concat([e, e + "-" + dn, e + "-" + Kn]);
|
|
@@ -12100,7 +12100,7 @@ function Po(o) {
|
|
|
12100
12100
|
var e = tt(o).Element;
|
|
12101
12101
|
return o instanceof e || o instanceof Element;
|
|
12102
12102
|
}
|
|
12103
|
-
function
|
|
12103
|
+
function ht(o) {
|
|
12104
12104
|
var e = tt(o).HTMLElement;
|
|
12105
12105
|
return o instanceof e || o instanceof HTMLElement;
|
|
12106
12106
|
}
|
|
@@ -12114,7 +12114,7 @@ function xv(o) {
|
|
|
12114
12114
|
var e = o.state;
|
|
12115
12115
|
Object.keys(e.elements).forEach(function(t) {
|
|
12116
12116
|
var n = e.styles[t] || {}, a = e.attributes[t] || {}, s = e.elements[t];
|
|
12117
|
-
!
|
|
12117
|
+
!ht(s) || !Bt(s) || (Object.assign(s.style, n), Object.keys(a).forEach(function(i) {
|
|
12118
12118
|
var r = a[i];
|
|
12119
12119
|
r === !1 ? s.removeAttribute(i) : s.setAttribute(i, r === !0 ? "" : r);
|
|
12120
12120
|
}));
|
|
@@ -12138,7 +12138,7 @@ function Sv(o) {
|
|
|
12138
12138
|
var a = e.elements[n], s = e.attributes[n] || {}, i = Object.keys(e.styles.hasOwnProperty(n) ? e.styles[n] : t[n]), r = i.reduce(function(l, p) {
|
|
12139
12139
|
return l[p] = "", l;
|
|
12140
12140
|
}, {});
|
|
12141
|
-
!
|
|
12141
|
+
!ht(a) || !Bt(a) || (Object.assign(a.style, r), Object.keys(s).forEach(function(l) {
|
|
12142
12142
|
a.removeAttribute(l);
|
|
12143
12143
|
}));
|
|
12144
12144
|
});
|
|
@@ -12168,7 +12168,7 @@ function md() {
|
|
|
12168
12168
|
function gn(o, e, t) {
|
|
12169
12169
|
e === void 0 && (e = !1), t === void 0 && (t = !1);
|
|
12170
12170
|
var n = o.getBoundingClientRect(), a = 1, s = 1;
|
|
12171
|
-
e &&
|
|
12171
|
+
e && ht(o) && (a = o.offsetWidth > 0 && un(n.width) / o.offsetWidth || 1, s = o.offsetHeight > 0 && un(n.height) / o.offsetHeight || 1);
|
|
12172
12172
|
var i = Po(o) ? tt(o) : window, r = i.visualViewport, l = !md() && t, p = (n.left + (l && r ? r.offsetLeft : 0)) / a, c = (n.top + (l && r ? r.offsetTop : 0)) / s, m = n.width / a, d = n.height / s;
|
|
12173
12173
|
return {
|
|
12174
12174
|
width: m,
|
|
@@ -12204,7 +12204,7 @@ function dd(o, e) {
|
|
|
12204
12204
|
}
|
|
12205
12205
|
return !1;
|
|
12206
12206
|
}
|
|
12207
|
-
function
|
|
12207
|
+
function Kt(o) {
|
|
12208
12208
|
return tt(o).getComputedStyle(o);
|
|
12209
12209
|
}
|
|
12210
12210
|
function Mv(o) {
|
|
@@ -12229,19 +12229,19 @@ function Js(o) {
|
|
|
12229
12229
|
);
|
|
12230
12230
|
}
|
|
12231
12231
|
function jp(o) {
|
|
12232
|
-
return !
|
|
12233
|
-
|
|
12232
|
+
return !ht(o) || // https://github.com/popperjs/popper-core/issues/837
|
|
12233
|
+
Kt(o).position === "fixed" ? null : o.offsetParent;
|
|
12234
12234
|
}
|
|
12235
12235
|
function Fv(o) {
|
|
12236
12236
|
var e = /firefox/i.test(er()), t = /Trident/i.test(er());
|
|
12237
|
-
if (t &&
|
|
12238
|
-
var n =
|
|
12237
|
+
if (t && ht(o)) {
|
|
12238
|
+
var n = Kt(o);
|
|
12239
12239
|
if (n.position === "fixed")
|
|
12240
12240
|
return null;
|
|
12241
12241
|
}
|
|
12242
12242
|
var a = Js(o);
|
|
12243
|
-
for (Lr(a) && (a = a.host);
|
|
12244
|
-
var s =
|
|
12243
|
+
for (Lr(a) && (a = a.host); ht(a) && ["html", "body"].indexOf(Bt(a)) < 0; ) {
|
|
12244
|
+
var s = Kt(a);
|
|
12245
12245
|
if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || e && s.willChange === "filter" || e && s.filter && s.filter !== "none")
|
|
12246
12246
|
return a;
|
|
12247
12247
|
a = a.parentNode;
|
|
@@ -12249,9 +12249,9 @@ function Fv(o) {
|
|
|
12249
12249
|
return null;
|
|
12250
12250
|
}
|
|
12251
12251
|
function pa(o) {
|
|
12252
|
-
for (var e = tt(o), t = jp(o); t && Mv(t) &&
|
|
12252
|
+
for (var e = tt(o), t = jp(o); t && Mv(t) && Kt(t).position === "static"; )
|
|
12253
12253
|
t = jp(t);
|
|
12254
|
-
return t && (Bt(t) === "html" || Bt(t) === "body" &&
|
|
12254
|
+
return t && (Bt(t) === "html" || Bt(t) === "body" && Kt(t).position === "static") ? e : t || Fv(o) || e;
|
|
12255
12255
|
}
|
|
12256
12256
|
function $r(o) {
|
|
12257
12257
|
return ["top", "bottom"].indexOf(o) >= 0 ? "x" : "y";
|
|
@@ -12285,10 +12285,10 @@ var Av = function(e, t) {
|
|
|
12285
12285
|
})) : e, gd(typeof e != "number" ? e : fd(e, la));
|
|
12286
12286
|
};
|
|
12287
12287
|
function Tv(o) {
|
|
12288
|
-
var e, t = o.state, n = o.name, a = o.options, s = t.elements.arrow, i = t.modifiersData.popperOffsets, r = Ot(t.placement), l = $r(r), p = [Ze,
|
|
12288
|
+
var e, t = o.state, n = o.name, a = o.options, s = t.elements.arrow, i = t.modifiersData.popperOffsets, r = Ot(t.placement), l = $r(r), p = [Ze, vt].indexOf(r) >= 0, c = p ? "height" : "width";
|
|
12289
12289
|
if (!(!s || !i)) {
|
|
12290
|
-
var m = Av(a.padding, t), d = zr(s), u = l === "y" ? Xe : Ze, g = l === "y" ?
|
|
12291
|
-
t.modifiersData[n] = (e = {}, e[U] =
|
|
12290
|
+
var m = Av(a.padding, t), d = zr(s), u = l === "y" ? Xe : Ze, g = l === "y" ? bt : vt, f = t.rects.reference[c] + t.rects.reference[l] - i[l] - t.rects.popper[c], h = i[l] - t.rects.reference[l], j = pa(s), w = j ? l === "y" ? j.clientHeight || 0 : j.clientWidth || 0 : 0, x = f / 2 - h / 2, b = m[u], A = w - d[c] - m[g], _ = w / 2 - d[c] / 2 + x, R = On(b, _, A), U = l;
|
|
12291
|
+
t.modifiersData[n] = (e = {}, e[U] = R, e.centerOffset = R - _, e);
|
|
12292
12292
|
}
|
|
12293
12293
|
}
|
|
12294
12294
|
function Nv(o) {
|
|
@@ -12331,38 +12331,38 @@ function kp(o) {
|
|
|
12331
12331
|
u = h.x, f = h.y;
|
|
12332
12332
|
var j = i.hasOwnProperty("x"), w = i.hasOwnProperty("y"), x = Ze, b = Xe, A = window;
|
|
12333
12333
|
if (p) {
|
|
12334
|
-
var _ = pa(t),
|
|
12335
|
-
if (_ === tt(t) && (_ = vo(t),
|
|
12336
|
-
b =
|
|
12334
|
+
var _ = pa(t), R = "clientHeight", U = "clientWidth";
|
|
12335
|
+
if (_ === tt(t) && (_ = vo(t), Kt(_).position !== "static" && r === "absolute" && (R = "scrollHeight", U = "scrollWidth")), _ = _, a === Xe || (a === Ze || a === vt) && s === Kn) {
|
|
12336
|
+
b = bt;
|
|
12337
12337
|
var E = m && _ === A && A.visualViewport ? A.visualViewport.height : (
|
|
12338
12338
|
// $FlowFixMe[prop-missing]
|
|
12339
|
-
_[
|
|
12339
|
+
_[R]
|
|
12340
12340
|
);
|
|
12341
12341
|
f -= E - n.height, f *= l ? 1 : -1;
|
|
12342
12342
|
}
|
|
12343
|
-
if (a === Ze || (a === Xe || a ===
|
|
12344
|
-
x =
|
|
12345
|
-
var
|
|
12343
|
+
if (a === Ze || (a === Xe || a === bt) && s === Kn) {
|
|
12344
|
+
x = vt;
|
|
12345
|
+
var q = m && _ === A && A.visualViewport ? A.visualViewport.width : (
|
|
12346
12346
|
// $FlowFixMe[prop-missing]
|
|
12347
12347
|
_[U]
|
|
12348
12348
|
);
|
|
12349
|
-
u -=
|
|
12349
|
+
u -= q - n.width, u *= l ? 1 : -1;
|
|
12350
12350
|
}
|
|
12351
12351
|
}
|
|
12352
|
-
var
|
|
12352
|
+
var X = Object.assign({
|
|
12353
12353
|
position: r
|
|
12354
|
-
}, p && Rv),
|
|
12354
|
+
}, p && Rv), P = c === !0 ? Pv({
|
|
12355
12355
|
x: u,
|
|
12356
12356
|
y: f
|
|
12357
12357
|
}, tt(t)) : {
|
|
12358
12358
|
x: u,
|
|
12359
12359
|
y: f
|
|
12360
12360
|
};
|
|
12361
|
-
if (u =
|
|
12362
|
-
var
|
|
12363
|
-
return Object.assign({},
|
|
12361
|
+
if (u = P.x, f = P.y, l) {
|
|
12362
|
+
var V;
|
|
12363
|
+
return Object.assign({}, X, (V = {}, V[b] = w ? "0" : "", V[x] = j ? "0" : "", V.transform = (A.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + f + "px)" : "translate3d(" + u + "px, " + f + "px, 0)", V));
|
|
12364
12364
|
}
|
|
12365
|
-
return Object.assign({},
|
|
12365
|
+
return Object.assign({}, X, (e = {}, e[b] = w ? f + "px" : "", e[x] = j ? u + "px" : "", e.transform = "", e));
|
|
12366
12366
|
}
|
|
12367
12367
|
function Lv(o) {
|
|
12368
12368
|
var e = o.state, t = o.options, n = t.gpuAcceleration, a = n === void 0 ? !0 : n, s = t.adaptive, i = s === void 0 ? !0 : s, r = t.roundOffsets, l = r === void 0 ? !0 : r, p = {
|
|
@@ -12462,7 +12462,7 @@ function Wv(o, e) {
|
|
|
12462
12462
|
}
|
|
12463
12463
|
function Uv(o) {
|
|
12464
12464
|
var e, t = vo(o), n = Hr(o), a = (e = o.ownerDocument) == null ? void 0 : e.body, s = Mo(t.scrollWidth, t.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), i = Mo(t.scrollHeight, t.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), r = -n.scrollLeft + Vr(o), l = -n.scrollTop;
|
|
12465
|
-
return
|
|
12465
|
+
return Kt(a || t).direction === "rtl" && (r += Mo(t.clientWidth, a ? a.clientWidth : 0) - s), {
|
|
12466
12466
|
width: s,
|
|
12467
12467
|
height: i,
|
|
12468
12468
|
x: r,
|
|
@@ -12470,11 +12470,11 @@ function Uv(o) {
|
|
|
12470
12470
|
};
|
|
12471
12471
|
}
|
|
12472
12472
|
function qr(o) {
|
|
12473
|
-
var e =
|
|
12473
|
+
var e = Kt(o), t = e.overflow, n = e.overflowX, a = e.overflowY;
|
|
12474
12474
|
return /auto|scroll|overlay|hidden/.test(t + a + n);
|
|
12475
12475
|
}
|
|
12476
12476
|
function hd(o) {
|
|
12477
|
-
return ["html", "body", "#document"].indexOf(Bt(o)) >= 0 ? o.ownerDocument.body :
|
|
12477
|
+
return ["html", "body", "#document"].indexOf(Bt(o)) >= 0 ? o.ownerDocument.body : ht(o) && qr(o) ? o : hd(Js(o));
|
|
12478
12478
|
}
|
|
12479
12479
|
function An(o, e) {
|
|
12480
12480
|
var t;
|
|
@@ -12501,7 +12501,7 @@ function _p(o, e, t) {
|
|
|
12501
12501
|
return e === ld ? tr(Wv(o, t)) : Po(e) ? Kv(e, t) : tr(Uv(vo(o)));
|
|
12502
12502
|
}
|
|
12503
12503
|
function Gv(o) {
|
|
12504
|
-
var e = An(Js(o)), t = ["absolute", "fixed"].indexOf(
|
|
12504
|
+
var e = An(Js(o)), t = ["absolute", "fixed"].indexOf(Kt(o).position) >= 0, n = t && ht(o) ? pa(o) : o;
|
|
12505
12505
|
return Po(n) ? e.filter(function(a) {
|
|
12506
12506
|
return Po(a) && dd(a, n) && Bt(a) !== "body";
|
|
12507
12507
|
}) : [];
|
|
@@ -12522,13 +12522,13 @@ function bd(o) {
|
|
|
12522
12522
|
y: e.y - t.height
|
|
12523
12523
|
};
|
|
12524
12524
|
break;
|
|
12525
|
-
case
|
|
12525
|
+
case bt:
|
|
12526
12526
|
l = {
|
|
12527
12527
|
x: i,
|
|
12528
12528
|
y: e.y + e.height
|
|
12529
12529
|
};
|
|
12530
12530
|
break;
|
|
12531
|
-
case
|
|
12531
|
+
case vt:
|
|
12532
12532
|
l = {
|
|
12533
12533
|
x: e.x + e.width,
|
|
12534
12534
|
y: r
|
|
@@ -12562,24 +12562,24 @@ function bd(o) {
|
|
|
12562
12562
|
}
|
|
12563
12563
|
function Gn(o, e) {
|
|
12564
12564
|
e === void 0 && (e = {});
|
|
12565
|
-
var t = e, n = t.placement, a = n === void 0 ? o.placement : n, s = t.strategy, i = s === void 0 ? o.strategy : s, r = t.boundary, l = r === void 0 ? hv : r, p = t.rootBoundary, c = p === void 0 ? ld : p, m = t.elementContext, d = m === void 0 ? wn : m, u = t.altBoundary, g = u === void 0 ? !1 : u, f = t.padding, h = f === void 0 ? 0 : f, j = gd(typeof h != "number" ? h : fd(h, la)), w = d === wn ? bv : wn, x = o.rects.popper, b = o.elements[g ? w : d], A = Jv(Po(b) ? b : b.contextElement || vo(o.elements.popper), l, c, i), _ = gn(o.elements.reference),
|
|
12565
|
+
var t = e, n = t.placement, a = n === void 0 ? o.placement : n, s = t.strategy, i = s === void 0 ? o.strategy : s, r = t.boundary, l = r === void 0 ? hv : r, p = t.rootBoundary, c = p === void 0 ? ld : p, m = t.elementContext, d = m === void 0 ? wn : m, u = t.altBoundary, g = u === void 0 ? !1 : u, f = t.padding, h = f === void 0 ? 0 : f, j = gd(typeof h != "number" ? h : fd(h, la)), w = d === wn ? bv : wn, x = o.rects.popper, b = o.elements[g ? w : d], A = Jv(Po(b) ? b : b.contextElement || vo(o.elements.popper), l, c, i), _ = gn(o.elements.reference), R = bd({
|
|
12566
12566
|
reference: _,
|
|
12567
12567
|
element: x,
|
|
12568
12568
|
placement: a
|
|
12569
|
-
}), U = tr(Object.assign({}, x,
|
|
12569
|
+
}), U = tr(Object.assign({}, x, R)), E = d === wn ? U : _, q = {
|
|
12570
12570
|
top: A.top - E.top + j.top,
|
|
12571
12571
|
bottom: E.bottom - A.bottom + j.bottom,
|
|
12572
12572
|
left: A.left - E.left + j.left,
|
|
12573
12573
|
right: E.right - A.right + j.right
|
|
12574
|
-
},
|
|
12575
|
-
if (d === wn &&
|
|
12576
|
-
var
|
|
12577
|
-
Object.keys(
|
|
12578
|
-
var
|
|
12579
|
-
V
|
|
12574
|
+
}, X = o.modifiersData.offset;
|
|
12575
|
+
if (d === wn && X) {
|
|
12576
|
+
var P = X[a];
|
|
12577
|
+
Object.keys(q).forEach(function(V) {
|
|
12578
|
+
var Q = [vt, bt].indexOf(V) >= 0 ? 1 : -1, ae = [Xe, bt].indexOf(V) >= 0 ? "y" : "x";
|
|
12579
|
+
q[V] += P[ae] * Q;
|
|
12580
12580
|
});
|
|
12581
12581
|
}
|
|
12582
|
-
return
|
|
12582
|
+
return q;
|
|
12583
12583
|
}
|
|
12584
12584
|
function Yv(o, e) {
|
|
12585
12585
|
e === void 0 && (e = {});
|
|
@@ -12610,46 +12610,46 @@ function Xv(o) {
|
|
|
12610
12610
|
function Zv(o) {
|
|
12611
12611
|
var e = o.state, t = o.options, n = o.name;
|
|
12612
12612
|
if (!e.modifiersData[n]._skip) {
|
|
12613
|
-
for (var a = t.mainAxis, s = a === void 0 ? !0 : a, i = t.altAxis, r = i === void 0 ? !0 : i, l = t.fallbackPlacements, p = t.padding, c = t.boundary, m = t.rootBoundary, d = t.altBoundary, u = t.flipVariations, g = u === void 0 ? !0 : u, f = t.allowedAutoPlacements, h = e.options.placement, j = Ot(h), w = j === h, x = l || (w || !g ? [Fa(h)] : Xv(h)), b = [h].concat(x).reduce(function(we,
|
|
12614
|
-
return we.concat(Ot(
|
|
12615
|
-
placement:
|
|
12613
|
+
for (var a = t.mainAxis, s = a === void 0 ? !0 : a, i = t.altAxis, r = i === void 0 ? !0 : i, l = t.fallbackPlacements, p = t.padding, c = t.boundary, m = t.rootBoundary, d = t.altBoundary, u = t.flipVariations, g = u === void 0 ? !0 : u, f = t.allowedAutoPlacements, h = e.options.placement, j = Ot(h), w = j === h, x = l || (w || !g ? [Fa(h)] : Xv(h)), b = [h].concat(x).reduce(function(we, te) {
|
|
12614
|
+
return we.concat(Ot(te) === Pr ? Yv(e, {
|
|
12615
|
+
placement: te,
|
|
12616
12616
|
boundary: c,
|
|
12617
12617
|
rootBoundary: m,
|
|
12618
12618
|
padding: p,
|
|
12619
12619
|
flipVariations: g,
|
|
12620
12620
|
allowedAutoPlacements: f
|
|
12621
|
-
}) :
|
|
12622
|
-
}, []), A = e.rects.reference, _ = e.rects.popper,
|
|
12623
|
-
var
|
|
12624
|
-
placement:
|
|
12621
|
+
}) : te);
|
|
12622
|
+
}, []), A = e.rects.reference, _ = e.rects.popper, R = /* @__PURE__ */ new Map(), U = !0, E = b[0], q = 0; q < b.length; q++) {
|
|
12623
|
+
var X = b[q], P = Ot(X), V = fn(X) === dn, Q = [Xe, bt].indexOf(P) >= 0, ae = Q ? "width" : "height", le = Gn(e, {
|
|
12624
|
+
placement: X,
|
|
12625
12625
|
boundary: c,
|
|
12626
12626
|
rootBoundary: m,
|
|
12627
12627
|
altBoundary: d,
|
|
12628
12628
|
padding: p
|
|
12629
|
-
}), v =
|
|
12629
|
+
}), v = Q ? V ? vt : Ze : V ? bt : Xe;
|
|
12630
12630
|
A[ae] > _[ae] && (v = Fa(v));
|
|
12631
12631
|
var y = Fa(v), M = [];
|
|
12632
|
-
if (s && M.push(le[
|
|
12632
|
+
if (s && M.push(le[P] <= 0), r && M.push(le[v] <= 0, le[y] <= 0), M.every(function(we) {
|
|
12633
12633
|
return we;
|
|
12634
12634
|
})) {
|
|
12635
|
-
E =
|
|
12635
|
+
E = X, U = !1;
|
|
12636
12636
|
break;
|
|
12637
12637
|
}
|
|
12638
|
-
|
|
12638
|
+
R.set(X, M);
|
|
12639
12639
|
}
|
|
12640
12640
|
if (U)
|
|
12641
|
-
for (var N = g ? 3 : 1, K = function(
|
|
12642
|
-
var
|
|
12643
|
-
var Pe =
|
|
12641
|
+
for (var N = g ? 3 : 1, K = function(te) {
|
|
12642
|
+
var pe = b.find(function(ot) {
|
|
12643
|
+
var Pe = R.get(ot);
|
|
12644
12644
|
if (Pe)
|
|
12645
|
-
return Pe.slice(0,
|
|
12645
|
+
return Pe.slice(0, te).every(function(nt) {
|
|
12646
12646
|
return nt;
|
|
12647
12647
|
});
|
|
12648
12648
|
});
|
|
12649
|
-
if (
|
|
12650
|
-
return E =
|
|
12651
|
-
},
|
|
12652
|
-
var ge = K(
|
|
12649
|
+
if (pe)
|
|
12650
|
+
return E = pe, "break";
|
|
12651
|
+
}, ne = N; ne > 0; ne--) {
|
|
12652
|
+
var ge = K(ne);
|
|
12653
12653
|
if (ge === "break") break;
|
|
12654
12654
|
}
|
|
12655
12655
|
e.placement !== E && (e.modifiersData[n]._skip = !0, e.placement = E, e.reset = !0);
|
|
@@ -12677,7 +12677,7 @@ function Dp(o, e, t) {
|
|
|
12677
12677
|
};
|
|
12678
12678
|
}
|
|
12679
12679
|
function wp(o) {
|
|
12680
|
-
return [Xe,
|
|
12680
|
+
return [Xe, vt, bt, Ze].some(function(e) {
|
|
12681
12681
|
return o[e] >= 0;
|
|
12682
12682
|
});
|
|
12683
12683
|
}
|
|
@@ -12708,7 +12708,7 @@ function oj(o, e, t) {
|
|
|
12708
12708
|
var n = Ot(o), a = [Ze, Xe].indexOf(n) >= 0 ? -1 : 1, s = typeof t == "function" ? t(Object.assign({}, e, {
|
|
12709
12709
|
placement: o
|
|
12710
12710
|
})) : t, i = s[0], r = s[1];
|
|
12711
|
-
return i = i || 0, r = (r || 0) * a, [Ze,
|
|
12711
|
+
return i = i || 0, r = (r || 0) * a, [Ze, vt].indexOf(n) >= 0 ? {
|
|
12712
12712
|
x: r,
|
|
12713
12713
|
y: i
|
|
12714
12714
|
} : {
|
|
@@ -12753,31 +12753,31 @@ function lj(o) {
|
|
|
12753
12753
|
rootBoundary: p,
|
|
12754
12754
|
padding: m,
|
|
12755
12755
|
altBoundary: c
|
|
12756
|
-
}), j = Ot(e.placement), w = fn(e.placement), x = !w, b = $r(j), A = rj(b), _ = e.modifiersData.popperOffsets,
|
|
12756
|
+
}), j = Ot(e.placement), w = fn(e.placement), x = !w, b = $r(j), A = rj(b), _ = e.modifiersData.popperOffsets, R = e.rects.reference, U = e.rects.popper, E = typeof f == "function" ? f(Object.assign({}, e.rects, {
|
|
12757
12757
|
placement: e.placement
|
|
12758
|
-
})) : f,
|
|
12758
|
+
})) : f, q = typeof E == "number" ? {
|
|
12759
12759
|
mainAxis: E,
|
|
12760
12760
|
altAxis: E
|
|
12761
12761
|
} : Object.assign({
|
|
12762
12762
|
mainAxis: 0,
|
|
12763
12763
|
altAxis: 0
|
|
12764
|
-
}, E),
|
|
12764
|
+
}, E), X = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, P = {
|
|
12765
12765
|
x: 0,
|
|
12766
12766
|
y: 0
|
|
12767
12767
|
};
|
|
12768
12768
|
if (_) {
|
|
12769
12769
|
if (s) {
|
|
12770
|
-
var
|
|
12770
|
+
var V, Q = b === "y" ? Xe : Ze, ae = b === "y" ? bt : vt, le = b === "y" ? "height" : "width", v = _[b], y = v + h[Q], M = v - h[ae], N = u ? -U[le] / 2 : 0, K = w === dn ? R[le] : U[le], ne = w === dn ? -U[le] : -R[le], ge = e.elements.arrow, we = u && ge ? zr(ge) : {
|
|
12771
12771
|
width: 0,
|
|
12772
12772
|
height: 0
|
|
12773
|
-
},
|
|
12774
|
-
_[b] =
|
|
12773
|
+
}, te = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : ud(), pe = te[Q], ot = te[ae], Pe = On(0, R[le], we[le]), nt = x ? R[le] / 2 - N - Pe - pe - q.mainAxis : K - Pe - pe - q.mainAxis, at = x ? -R[le] / 2 + N + Pe + ot + q.mainAxis : ne + Pe + ot + q.mainAxis, wt = e.elements.arrow && pa(e.elements.arrow), Jt = wt ? b === "y" ? wt.clientTop || 0 : wt.clientLeft || 0 : 0, Rt = (V = X == null ? void 0 : X[b]) != null ? V : 0, Ue = v + nt - Rt - Jt, It = v + at - Rt, de = On(u ? Xa(y, Ue) : y, v, u ? Mo(M, It) : M);
|
|
12774
|
+
_[b] = de, P[b] = de - v;
|
|
12775
12775
|
}
|
|
12776
12776
|
if (r) {
|
|
12777
|
-
var Pt, st = b === "x" ? Xe : Ze, S = b === "x" ?
|
|
12778
|
-
_[A] = I,
|
|
12777
|
+
var Pt, st = b === "x" ? Xe : Ze, S = b === "x" ? bt : vt, Le = _[A], Y = A === "y" ? "height" : "width", $ = Le + h[st], Me = Le - h[S], je = [Xe, Ze].indexOf(j) !== -1, it = (Pt = X == null ? void 0 : X[A]) != null ? Pt : 0, rt = je ? $ : Le - R[Y] - U[Y] - it + q.altAxis, k = je ? Le + R[Y] + U[Y] - it - q.altAxis : Me, I = u && je ? Ov(rt, Le, k) : On(u ? rt : $, Le, u ? k : Me);
|
|
12778
|
+
_[A] = I, P[A] = I - Le;
|
|
12779
12779
|
}
|
|
12780
|
-
e.modifiersData[n] =
|
|
12780
|
+
e.modifiersData[n] = P;
|
|
12781
12781
|
}
|
|
12782
12782
|
}
|
|
12783
12783
|
const pj = {
|
|
@@ -12794,7 +12794,7 @@ function cj(o) {
|
|
|
12794
12794
|
};
|
|
12795
12795
|
}
|
|
12796
12796
|
function mj(o) {
|
|
12797
|
-
return o === tt(o) || !
|
|
12797
|
+
return o === tt(o) || !ht(o) ? Hr(o) : cj(o);
|
|
12798
12798
|
}
|
|
12799
12799
|
function dj(o) {
|
|
12800
12800
|
var e = o.getBoundingClientRect(), t = un(e.width) / o.offsetWidth || 1, n = un(e.height) / o.offsetHeight || 1;
|
|
@@ -12802,7 +12802,7 @@ function dj(o) {
|
|
|
12802
12802
|
}
|
|
12803
12803
|
function uj(o, e, t) {
|
|
12804
12804
|
t === void 0 && (t = !1);
|
|
12805
|
-
var n =
|
|
12805
|
+
var n = ht(e), a = ht(e) && dj(e), s = vo(e), i = gn(o, a, t), r = {
|
|
12806
12806
|
scrollLeft: 0,
|
|
12807
12807
|
scrollTop: 0
|
|
12808
12808
|
}, l = {
|
|
@@ -12810,7 +12810,7 @@ function uj(o, e, t) {
|
|
|
12810
12810
|
y: 0
|
|
12811
12811
|
};
|
|
12812
12812
|
return (n || !n && !t) && ((Bt(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
12813
|
-
qr(s)) && (r = mj(e)),
|
|
12813
|
+
qr(s)) && (r = mj(e)), ht(e) ? (l = gn(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : s && (l.x = Vr(s))), {
|
|
12814
12814
|
x: i.left + r.scrollLeft - l.x,
|
|
12815
12815
|
y: i.top + r.scrollTop - l.y,
|
|
12816
12816
|
width: i.width,
|
|
@@ -12919,15 +12919,15 @@ function vj(o) {
|
|
|
12919
12919
|
c.rects = {
|
|
12920
12920
|
reference: uj(w, pa(x), c.options.strategy === "fixed"),
|
|
12921
12921
|
popper: zr(x)
|
|
12922
|
-
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(
|
|
12923
|
-
return c.modifiersData[
|
|
12922
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(q) {
|
|
12923
|
+
return c.modifiersData[q.name] = Object.assign({}, q.data);
|
|
12924
12924
|
});
|
|
12925
12925
|
for (var b = 0; b < c.orderedModifiers.length; b++) {
|
|
12926
12926
|
if (c.reset === !0) {
|
|
12927
12927
|
c.reset = !1, b = -1;
|
|
12928
12928
|
continue;
|
|
12929
12929
|
}
|
|
12930
|
-
var A = c.orderedModifiers[b], _ = A.fn,
|
|
12930
|
+
var A = c.orderedModifiers[b], _ = A.fn, R = A.options, U = R === void 0 ? {} : R, E = A.name;
|
|
12931
12931
|
typeof _ == "function" && (c = _({
|
|
12932
12932
|
state: c,
|
|
12933
12933
|
options: U,
|
|
@@ -13159,7 +13159,7 @@ process.env.NODE_ENV !== "production" && zj();
|
|
|
13159
13159
|
function zj() {
|
|
13160
13160
|
Yn = /* @__PURE__ */ new Set();
|
|
13161
13161
|
}
|
|
13162
|
-
function
|
|
13162
|
+
function Vt(o, e) {
|
|
13163
13163
|
if (o && !Yn.has(e)) {
|
|
13164
13164
|
var t;
|
|
13165
13165
|
Yn.add(e), (t = console).warn.apply(t, wd(e));
|
|
@@ -13291,7 +13291,7 @@ function Cd(o, e) {
|
|
|
13291
13291
|
var a = wj(et, Object.keys(Id)), s = !Dj(a, n);
|
|
13292
13292
|
s && (s = e.filter(function(i) {
|
|
13293
13293
|
return i.name === n;
|
|
13294
|
-
}).length === 0),
|
|
13294
|
+
}).length === 0), Vt(s, ["`" + n + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
13295
13295
|
|
|
13296
13296
|
`, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
13297
13297
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
@@ -13368,7 +13368,7 @@ function Gj(o, e) {
|
|
|
13368
13368
|
setContent: I,
|
|
13369
13369
|
show: F,
|
|
13370
13370
|
hide: L,
|
|
13371
|
-
hideWithInteractivity:
|
|
13371
|
+
hideWithInteractivity: se,
|
|
13372
13372
|
enable: je,
|
|
13373
13373
|
disable: it,
|
|
13374
13374
|
unmount: ke,
|
|
@@ -13376,7 +13376,7 @@ function Gj(o, e) {
|
|
|
13376
13376
|
};
|
|
13377
13377
|
if (!t.render)
|
|
13378
13378
|
return process.env.NODE_ENV !== "production" && or(!0, "render() function has not been supplied."), b;
|
|
13379
|
-
var A = t.render(b), _ = A.popper,
|
|
13379
|
+
var A = t.render(b), _ = A.popper, R = A.onUpdate;
|
|
13380
13380
|
_.setAttribute("data-tippy-root", ""), _.id = "tippy-" + b.id, b.popper = _, o._tippy = b, _._tippy = b;
|
|
13381
13381
|
var U = w.map(function(D) {
|
|
13382
13382
|
return D.fn(b);
|
|
@@ -13384,24 +13384,24 @@ function Gj(o, e) {
|
|
|
13384
13384
|
return wt(), N(), v(), y("onCreate", [b]), t.showOnCreate && $(), _.addEventListener("mouseenter", function() {
|
|
13385
13385
|
b.props.interactive && b.state.isVisible && b.clearDelayTimeouts();
|
|
13386
13386
|
}), _.addEventListener("mouseleave", function() {
|
|
13387
|
-
b.props.interactive && b.props.trigger.indexOf("mouseenter") >= 0 &&
|
|
13387
|
+
b.props.interactive && b.props.trigger.indexOf("mouseenter") >= 0 && Q().addEventListener("mousemove", g);
|
|
13388
13388
|
}), b;
|
|
13389
|
-
function
|
|
13389
|
+
function q() {
|
|
13390
13390
|
var D = b.props.touch;
|
|
13391
13391
|
return Array.isArray(D) ? D : [D, 0];
|
|
13392
13392
|
}
|
|
13393
|
-
function
|
|
13394
|
-
return
|
|
13393
|
+
function X() {
|
|
13394
|
+
return q()[0] === "hold";
|
|
13395
13395
|
}
|
|
13396
|
-
function
|
|
13396
|
+
function P() {
|
|
13397
13397
|
var D;
|
|
13398
13398
|
return !!((D = b.props.render) != null && D.$$tippy);
|
|
13399
13399
|
}
|
|
13400
|
-
function
|
|
13400
|
+
function V() {
|
|
13401
13401
|
return f || o;
|
|
13402
13402
|
}
|
|
13403
|
-
function
|
|
13404
|
-
var D =
|
|
13403
|
+
function Q() {
|
|
13404
|
+
var D = V().parentNode;
|
|
13405
13405
|
return D ? Oj(D) : document;
|
|
13406
13406
|
}
|
|
13407
13407
|
function ae() {
|
|
@@ -13413,25 +13413,25 @@ function Gj(o, e) {
|
|
|
13413
13413
|
function v(D) {
|
|
13414
13414
|
D === void 0 && (D = !1), _.style.pointerEvents = b.props.interactive && !D ? "" : "none", _.style.zIndex = "" + b.props.zIndex;
|
|
13415
13415
|
}
|
|
13416
|
-
function y(D, z,
|
|
13417
|
-
if (
|
|
13418
|
-
|
|
13419
|
-
}),
|
|
13420
|
-
var
|
|
13421
|
-
(
|
|
13416
|
+
function y(D, z, G) {
|
|
13417
|
+
if (G === void 0 && (G = !0), U.forEach(function(ie) {
|
|
13418
|
+
ie[D] && ie[D].apply(ie, z);
|
|
13419
|
+
}), G) {
|
|
13420
|
+
var me;
|
|
13421
|
+
(me = b.props)[D].apply(me, z);
|
|
13422
13422
|
}
|
|
13423
13423
|
}
|
|
13424
13424
|
function M() {
|
|
13425
13425
|
var D = b.props.aria;
|
|
13426
13426
|
if (D.content) {
|
|
13427
|
-
var z = "aria-" + D.content,
|
|
13428
|
-
|
|
13429
|
-
var ze =
|
|
13427
|
+
var z = "aria-" + D.content, G = _.id, me = Zo(b.props.triggerTarget || o);
|
|
13428
|
+
me.forEach(function(ie) {
|
|
13429
|
+
var ze = ie.getAttribute(z);
|
|
13430
13430
|
if (b.state.isVisible)
|
|
13431
|
-
|
|
13431
|
+
ie.setAttribute(z, ze ? ze + " " + G : G);
|
|
13432
13432
|
else {
|
|
13433
|
-
var lt = ze && ze.replace(
|
|
13434
|
-
lt ?
|
|
13433
|
+
var lt = ze && ze.replace(G, "").trim();
|
|
13434
|
+
lt ? ie.setAttribute(z, lt) : ie.removeAttribute(z);
|
|
13435
13435
|
}
|
|
13436
13436
|
});
|
|
13437
13437
|
}
|
|
@@ -13440,21 +13440,21 @@ function Gj(o, e) {
|
|
|
13440
13440
|
if (!(E || !b.props.aria.expanded)) {
|
|
13441
13441
|
var D = Zo(b.props.triggerTarget || o);
|
|
13442
13442
|
D.forEach(function(z) {
|
|
13443
|
-
b.props.interactive ? z.setAttribute("aria-expanded", b.state.isVisible && z ===
|
|
13443
|
+
b.props.interactive ? z.setAttribute("aria-expanded", b.state.isVisible && z === V() ? "true" : "false") : z.removeAttribute("aria-expanded");
|
|
13444
13444
|
});
|
|
13445
13445
|
}
|
|
13446
13446
|
}
|
|
13447
13447
|
function K() {
|
|
13448
|
-
|
|
13448
|
+
Q().removeEventListener("mousemove", g), va = va.filter(function(D) {
|
|
13449
13449
|
return D !== g;
|
|
13450
13450
|
});
|
|
13451
13451
|
}
|
|
13452
|
-
function
|
|
13452
|
+
function ne(D) {
|
|
13453
13453
|
if (!(Mt.isTouch && (l || D.type === "mousedown"))) {
|
|
13454
13454
|
var z = D.composedPath && D.composedPath()[0] || D.target;
|
|
13455
13455
|
if (!(b.props.interactive && Fp(_, z))) {
|
|
13456
|
-
if (Zo(b.props.triggerTarget || o).some(function(
|
|
13457
|
-
return Fp(
|
|
13456
|
+
if (Zo(b.props.triggerTarget || o).some(function(G) {
|
|
13457
|
+
return Fp(G, z);
|
|
13458
13458
|
})) {
|
|
13459
13459
|
if (Mt.isTouch || b.state.isVisible && b.props.trigger.indexOf("click") >= 0)
|
|
13460
13460
|
return;
|
|
@@ -13462,7 +13462,7 @@ function Gj(o, e) {
|
|
|
13462
13462
|
y("onClickOutside", [b, D]);
|
|
13463
13463
|
b.props.hideOnClick === !0 && (b.clearDelayTimeouts(), b.hide(), r = !0, setTimeout(function() {
|
|
13464
13464
|
r = !1;
|
|
13465
|
-
}), b.state.isMounted ||
|
|
13465
|
+
}), b.state.isMounted || pe());
|
|
13466
13466
|
}
|
|
13467
13467
|
}
|
|
13468
13468
|
}
|
|
@@ -13472,13 +13472,13 @@ function Gj(o, e) {
|
|
|
13472
13472
|
function we() {
|
|
13473
13473
|
l = !1;
|
|
13474
13474
|
}
|
|
13475
|
-
function
|
|
13476
|
-
var D =
|
|
13477
|
-
D.addEventListener("mousedown",
|
|
13475
|
+
function te() {
|
|
13476
|
+
var D = Q();
|
|
13477
|
+
D.addEventListener("mousedown", ne, !0), D.addEventListener("touchend", ne, ko), D.addEventListener("touchstart", we, ko), D.addEventListener("touchmove", ge, ko);
|
|
13478
13478
|
}
|
|
13479
|
-
function
|
|
13480
|
-
var D =
|
|
13481
|
-
D.removeEventListener("mousedown",
|
|
13479
|
+
function pe() {
|
|
13480
|
+
var D = Q();
|
|
13481
|
+
D.removeEventListener("mousedown", ne, !0), D.removeEventListener("touchend", ne, ko), D.removeEventListener("touchstart", we, ko), D.removeEventListener("touchmove", ge, ko);
|
|
13482
13482
|
}
|
|
13483
13483
|
function ot(D, z) {
|
|
13484
13484
|
nt(D, function() {
|
|
@@ -13489,28 +13489,28 @@ function Gj(o, e) {
|
|
|
13489
13489
|
nt(D, z);
|
|
13490
13490
|
}
|
|
13491
13491
|
function nt(D, z) {
|
|
13492
|
-
var
|
|
13493
|
-
function
|
|
13494
|
-
|
|
13492
|
+
var G = ae().box;
|
|
13493
|
+
function me(ie) {
|
|
13494
|
+
ie.target === G && (_i(G, "remove", me), z());
|
|
13495
13495
|
}
|
|
13496
13496
|
if (D === 0)
|
|
13497
13497
|
return z();
|
|
13498
|
-
_i(
|
|
13499
|
-
}
|
|
13500
|
-
function at(D, z,
|
|
13501
|
-
|
|
13502
|
-
var
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
node:
|
|
13498
|
+
_i(G, "remove", m), _i(G, "add", me), m = me;
|
|
13499
|
+
}
|
|
13500
|
+
function at(D, z, G) {
|
|
13501
|
+
G === void 0 && (G = !1);
|
|
13502
|
+
var me = Zo(b.props.triggerTarget || o);
|
|
13503
|
+
me.forEach(function(ie) {
|
|
13504
|
+
ie.addEventListener(D, z, G), u.push({
|
|
13505
|
+
node: ie,
|
|
13506
13506
|
eventType: D,
|
|
13507
13507
|
handler: z,
|
|
13508
|
-
options:
|
|
13508
|
+
options: G
|
|
13509
13509
|
});
|
|
13510
13510
|
});
|
|
13511
13511
|
}
|
|
13512
13512
|
function wt() {
|
|
13513
|
-
|
|
13513
|
+
X() && (at("touchstart", Rt, {
|
|
13514
13514
|
passive: !0
|
|
13515
13515
|
}), at("touchend", It, {
|
|
13516
13516
|
passive: !0
|
|
@@ -13521,41 +13521,41 @@ function Gj(o, e) {
|
|
|
13521
13521
|
at("mouseleave", It);
|
|
13522
13522
|
break;
|
|
13523
13523
|
case "focus":
|
|
13524
|
-
at(Pj ? "focusout" : "blur",
|
|
13524
|
+
at(Pj ? "focusout" : "blur", de);
|
|
13525
13525
|
break;
|
|
13526
13526
|
case "focusin":
|
|
13527
|
-
at("focusout",
|
|
13527
|
+
at("focusout", de);
|
|
13528
13528
|
break;
|
|
13529
13529
|
}
|
|
13530
13530
|
});
|
|
13531
13531
|
}
|
|
13532
|
-
function
|
|
13532
|
+
function Jt() {
|
|
13533
13533
|
u.forEach(function(D) {
|
|
13534
|
-
var z = D.node,
|
|
13535
|
-
z.removeEventListener(
|
|
13534
|
+
var z = D.node, G = D.eventType, me = D.handler, ie = D.options;
|
|
13535
|
+
z.removeEventListener(G, me, ie);
|
|
13536
13536
|
}), u = [];
|
|
13537
13537
|
}
|
|
13538
13538
|
function Rt(D) {
|
|
13539
|
-
var z,
|
|
13539
|
+
var z, G = !1;
|
|
13540
13540
|
if (!(!b.state.isEnabled || Pt(D) || r)) {
|
|
13541
|
-
var
|
|
13542
|
-
c = D, f = D.currentTarget, N(), !b.state.isVisible && Sj(D) && va.forEach(function(
|
|
13543
|
-
return
|
|
13544
|
-
}), D.type === "click" && (b.props.trigger.indexOf("mouseenter") < 0 || i) && b.props.hideOnClick !== !1 && b.state.isVisible ?
|
|
13541
|
+
var me = ((z = c) == null ? void 0 : z.type) === "focus";
|
|
13542
|
+
c = D, f = D.currentTarget, N(), !b.state.isVisible && Sj(D) && va.forEach(function(ie) {
|
|
13543
|
+
return ie(D);
|
|
13544
|
+
}), D.type === "click" && (b.props.trigger.indexOf("mouseenter") < 0 || i) && b.props.hideOnClick !== !1 && b.state.isVisible ? G = !0 : $(D), D.type === "click" && (i = !G), G && !me && Me(D);
|
|
13545
13545
|
}
|
|
13546
13546
|
}
|
|
13547
13547
|
function Ue(D) {
|
|
13548
|
-
var z = D.target,
|
|
13549
|
-
if (!(D.type === "mousemove" &&
|
|
13550
|
-
var
|
|
13551
|
-
var ze, lt =
|
|
13548
|
+
var z = D.target, G = V().contains(z) || _.contains(z);
|
|
13549
|
+
if (!(D.type === "mousemove" && G)) {
|
|
13550
|
+
var me = Y().concat(_).map(function(ie) {
|
|
13551
|
+
var ze, lt = ie._tippy, Ho = (ze = lt.popperInstance) == null ? void 0 : ze.state;
|
|
13552
13552
|
return Ho ? {
|
|
13553
|
-
popperRect:
|
|
13553
|
+
popperRect: ie.getBoundingClientRect(),
|
|
13554
13554
|
popperState: Ho,
|
|
13555
13555
|
props: t
|
|
13556
13556
|
} : null;
|
|
13557
13557
|
}).filter(Boolean);
|
|
13558
|
-
Aj(
|
|
13558
|
+
Aj(me, D) && (K(), Me(D));
|
|
13559
13559
|
}
|
|
13560
13560
|
}
|
|
13561
13561
|
function It(D) {
|
|
@@ -13568,17 +13568,17 @@ function Gj(o, e) {
|
|
|
13568
13568
|
Me(D);
|
|
13569
13569
|
}
|
|
13570
13570
|
}
|
|
13571
|
-
function
|
|
13572
|
-
b.props.trigger.indexOf("focusin") < 0 && D.target !==
|
|
13571
|
+
function de(D) {
|
|
13572
|
+
b.props.trigger.indexOf("focusin") < 0 && D.target !== V() || b.props.interactive && D.relatedTarget && _.contains(D.relatedTarget) || Me(D);
|
|
13573
13573
|
}
|
|
13574
13574
|
function Pt(D) {
|
|
13575
|
-
return Mt.isTouch ?
|
|
13575
|
+
return Mt.isTouch ? X() !== D.type.indexOf("touch") >= 0 : !1;
|
|
13576
13576
|
}
|
|
13577
13577
|
function st() {
|
|
13578
13578
|
S();
|
|
13579
|
-
var D = b.props, z = D.popperOptions,
|
|
13580
|
-
getBoundingClientRect:
|
|
13581
|
-
contextElement:
|
|
13579
|
+
var D = b.props, z = D.popperOptions, G = D.placement, me = D.offset, ie = D.getReferenceClientRect, ze = D.moveTransition, lt = P() ? ar(_).arrow : null, Ho = ie ? {
|
|
13580
|
+
getBoundingClientRect: ie,
|
|
13581
|
+
contextElement: ie.contextElement || V()
|
|
13582
13582
|
} : o, pl = {
|
|
13583
13583
|
name: "$$tippy",
|
|
13584
13584
|
enabled: !0,
|
|
@@ -13586,7 +13586,7 @@ function Gj(o, e) {
|
|
|
13586
13586
|
requires: ["computeStyles"],
|
|
13587
13587
|
fn: function(ca) {
|
|
13588
13588
|
var Vo = ca.state;
|
|
13589
|
-
if (
|
|
13589
|
+
if (P()) {
|
|
13590
13590
|
var bu = ae(), ei = bu.box;
|
|
13591
13591
|
["placement", "reference-hidden", "escaped"].forEach(function(ma) {
|
|
13592
13592
|
ma === "placement" ? ei.setAttribute("data-placement", Vo.placement) : Vo.attributes.popper["data-popper-" + ma] ? ei.setAttribute("data-" + ma, "") : ei.removeAttribute("data-" + ma);
|
|
@@ -13596,7 +13596,7 @@ function Gj(o, e) {
|
|
|
13596
13596
|
}, jo = [{
|
|
13597
13597
|
name: "offset",
|
|
13598
13598
|
options: {
|
|
13599
|
-
offset:
|
|
13599
|
+
offset: me
|
|
13600
13600
|
}
|
|
13601
13601
|
}, {
|
|
13602
13602
|
name: "preventOverflow",
|
|
@@ -13619,14 +13619,14 @@ function Gj(o, e) {
|
|
|
13619
13619
|
adaptive: !ze
|
|
13620
13620
|
}
|
|
13621
13621
|
}, pl];
|
|
13622
|
-
|
|
13622
|
+
P() && lt && jo.push({
|
|
13623
13623
|
name: "arrow",
|
|
13624
13624
|
options: {
|
|
13625
13625
|
element: lt,
|
|
13626
13626
|
padding: 3
|
|
13627
13627
|
}
|
|
13628
13628
|
}), jo.push.apply(jo, (z == null ? void 0 : z.modifiers) || []), b.popperInstance = kj(Ho, _, Object.assign({}, z, {
|
|
13629
|
-
placement:
|
|
13629
|
+
placement: G,
|
|
13630
13630
|
onFirstUpdate: d,
|
|
13631
13631
|
modifiers: jo
|
|
13632
13632
|
}));
|
|
@@ -13635,8 +13635,8 @@ function Gj(o, e) {
|
|
|
13635
13635
|
b.popperInstance && (b.popperInstance.destroy(), b.popperInstance = null);
|
|
13636
13636
|
}
|
|
13637
13637
|
function Le() {
|
|
13638
|
-
var D = b.props.appendTo, z,
|
|
13639
|
-
b.props.interactive && D === yd || D === "parent" ? z =
|
|
13638
|
+
var D = b.props.appendTo, z, G = V();
|
|
13639
|
+
b.props.interactive && D === yd || D === "parent" ? z = G.parentNode : z = _d(D, [G]), z.contains(_) || z.appendChild(_), b.state.isMounted = !0, st(), process.env.NODE_ENV !== "production" && Vt(b.props.interactive && D === et.appendTo && G.nextElementSibling !== _, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
13640
13640
|
|
|
13641
13641
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
13642
13642
|
|
|
@@ -13644,19 +13644,19 @@ function Gj(o, e) {
|
|
|
13644
13644
|
|
|
13645
13645
|
`, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
|
|
13646
13646
|
}
|
|
13647
|
-
function
|
|
13647
|
+
function Y() {
|
|
13648
13648
|
return Za(_.querySelectorAll("[data-tippy-root]"));
|
|
13649
13649
|
}
|
|
13650
13650
|
function $(D) {
|
|
13651
|
-
b.clearDelayTimeouts(), D && y("onTrigger", [b, D]),
|
|
13652
|
-
var z = le(!0),
|
|
13653
|
-
Mt.isTouch &&
|
|
13651
|
+
b.clearDelayTimeouts(), D && y("onTrigger", [b, D]), te();
|
|
13652
|
+
var z = le(!0), G = q(), me = G[0], ie = G[1];
|
|
13653
|
+
Mt.isTouch && me === "hold" && ie && (z = ie), z ? n = setTimeout(function() {
|
|
13654
13654
|
b.show();
|
|
13655
13655
|
}, z) : b.show();
|
|
13656
13656
|
}
|
|
13657
13657
|
function Me(D) {
|
|
13658
13658
|
if (b.clearDelayTimeouts(), y("onUntrigger", [b, D]), !b.state.isVisible) {
|
|
13659
|
-
|
|
13659
|
+
pe();
|
|
13660
13660
|
return;
|
|
13661
13661
|
}
|
|
13662
13662
|
if (!(b.props.trigger.indexOf("mouseenter") >= 0 && b.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(D.type) >= 0 && i)) {
|
|
@@ -13678,15 +13678,15 @@ function Gj(o, e) {
|
|
|
13678
13678
|
clearTimeout(n), clearTimeout(a), cancelAnimationFrame(s);
|
|
13679
13679
|
}
|
|
13680
13680
|
function k(D) {
|
|
13681
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
13682
|
-
y("onBeforeUpdate", [b, D]),
|
|
13683
|
-
var z = b.props,
|
|
13681
|
+
if (process.env.NODE_ENV !== "production" && Vt(b.state.isDestroyed, Uo("setProps")), !b.state.isDestroyed) {
|
|
13682
|
+
y("onBeforeUpdate", [b, D]), Jt();
|
|
13683
|
+
var z = b.props, G = Tp(o, Object.assign({}, z, Sp(D), {
|
|
13684
13684
|
ignoreAttributes: !0
|
|
13685
13685
|
}));
|
|
13686
|
-
b.props =
|
|
13687
|
-
|
|
13688
|
-
}) :
|
|
13689
|
-
requestAnimationFrame(
|
|
13686
|
+
b.props = G, wt(), z.interactiveDebounce !== G.interactiveDebounce && (K(), g = Cp(Ue, G.interactiveDebounce)), z.triggerTarget && !G.triggerTarget ? Zo(z.triggerTarget).forEach(function(me) {
|
|
13687
|
+
me.removeAttribute("aria-expanded");
|
|
13688
|
+
}) : G.triggerTarget && o.removeAttribute("aria-expanded"), N(), v(), R && R(z, G), b.popperInstance && (st(), Y().forEach(function(me) {
|
|
13689
|
+
requestAnimationFrame(me._tippy.popperInstance.forceUpdate);
|
|
13690
13690
|
})), y("onAfterUpdate", [b, D]);
|
|
13691
13691
|
}
|
|
13692
13692
|
}
|
|
@@ -13696,21 +13696,21 @@ function Gj(o, e) {
|
|
|
13696
13696
|
});
|
|
13697
13697
|
}
|
|
13698
13698
|
function F() {
|
|
13699
|
-
process.env.NODE_ENV !== "production" &&
|
|
13700
|
-
var D = b.state.isVisible, z = b.state.isDestroyed,
|
|
13701
|
-
if (!(D || z ||
|
|
13702
|
-
if (b.state.isVisible = !0,
|
|
13699
|
+
process.env.NODE_ENV !== "production" && Vt(b.state.isDestroyed, Uo("show"));
|
|
13700
|
+
var D = b.state.isVisible, z = b.state.isDestroyed, G = !b.state.isEnabled, me = Mt.isTouch && !b.props.touch, ie = ki(b.props.duration, 0, et.duration);
|
|
13701
|
+
if (!(D || z || G || me) && !V().hasAttribute("disabled") && (y("onShow", [b], !1), b.props.onShow(b) !== !1)) {
|
|
13702
|
+
if (b.state.isVisible = !0, P() && (_.style.visibility = "visible"), v(), te(), b.state.isMounted || (_.style.transition = "none"), P()) {
|
|
13703
13703
|
var ze = ae(), lt = ze.box, Ho = ze.content;
|
|
13704
13704
|
yi([lt, Ho], 0);
|
|
13705
13705
|
}
|
|
13706
13706
|
d = function() {
|
|
13707
13707
|
var jo;
|
|
13708
13708
|
if (!(!b.state.isVisible || p)) {
|
|
13709
|
-
if (p = !0, _.offsetHeight, _.style.transition = b.props.moveTransition,
|
|
13709
|
+
if (p = !0, _.offsetHeight, _.style.transition = b.props.moveTransition, P() && b.props.animation) {
|
|
13710
13710
|
var Qs = ae(), ca = Qs.box, Vo = Qs.content;
|
|
13711
|
-
yi([ca, Vo],
|
|
13711
|
+
yi([ca, Vo], ie), Mp([ca, Vo], "visible");
|
|
13712
13712
|
}
|
|
13713
|
-
M(), N(), xp(Di, b), (jo = b.popperInstance) == null || jo.forceUpdate(), y("onMount", [b]), b.props.animation &&
|
|
13713
|
+
M(), N(), xp(Di, b), (jo = b.popperInstance) == null || jo.forceUpdate(), y("onMount", [b]), b.props.animation && P() && Pe(ie, function() {
|
|
13714
13714
|
b.state.isShown = !0, y("onShown", [b]);
|
|
13715
13715
|
});
|
|
13716
13716
|
}
|
|
@@ -13718,31 +13718,31 @@ function Gj(o, e) {
|
|
|
13718
13718
|
}
|
|
13719
13719
|
}
|
|
13720
13720
|
function L() {
|
|
13721
|
-
process.env.NODE_ENV !== "production" &&
|
|
13722
|
-
var D = !b.state.isVisible, z = b.state.isDestroyed,
|
|
13723
|
-
if (!(D || z ||
|
|
13724
|
-
if (b.state.isVisible = !1, b.state.isShown = !1, p = !1, i = !1,
|
|
13725
|
-
var
|
|
13726
|
-
b.props.animation && (yi([ze, lt],
|
|
13721
|
+
process.env.NODE_ENV !== "production" && Vt(b.state.isDestroyed, Uo("hide"));
|
|
13722
|
+
var D = !b.state.isVisible, z = b.state.isDestroyed, G = !b.state.isEnabled, me = ki(b.props.duration, 1, et.duration);
|
|
13723
|
+
if (!(D || z || G) && (y("onHide", [b], !1), b.props.onHide(b) !== !1)) {
|
|
13724
|
+
if (b.state.isVisible = !1, b.state.isShown = !1, p = !1, i = !1, P() && (_.style.visibility = "hidden"), K(), pe(), v(!0), P()) {
|
|
13725
|
+
var ie = ae(), ze = ie.box, lt = ie.content;
|
|
13726
|
+
b.props.animation && (yi([ze, lt], me), Mp([ze, lt], "hidden"));
|
|
13727
13727
|
}
|
|
13728
|
-
M(), N(), b.props.animation ?
|
|
13728
|
+
M(), N(), b.props.animation ? P() && ot(me, b.unmount) : b.unmount();
|
|
13729
13729
|
}
|
|
13730
13730
|
}
|
|
13731
|
-
function
|
|
13732
|
-
process.env.NODE_ENV !== "production" &&
|
|
13731
|
+
function se(D) {
|
|
13732
|
+
process.env.NODE_ENV !== "production" && Vt(b.state.isDestroyed, Uo("hideWithInteractivity")), Q().addEventListener("mousemove", g), xp(va, g), g(D);
|
|
13733
13733
|
}
|
|
13734
13734
|
function ke() {
|
|
13735
|
-
process.env.NODE_ENV !== "production" &&
|
|
13735
|
+
process.env.NODE_ENV !== "production" && Vt(b.state.isDestroyed, Uo("unmount")), b.state.isVisible && b.hide(), b.state.isMounted && (S(), Y().forEach(function(D) {
|
|
13736
13736
|
D._tippy.unmount();
|
|
13737
13737
|
}), _.parentNode && _.parentNode.removeChild(_), Di = Di.filter(function(D) {
|
|
13738
13738
|
return D !== b;
|
|
13739
13739
|
}), b.state.isMounted = !1, y("onHidden", [b]));
|
|
13740
13740
|
}
|
|
13741
13741
|
function _n() {
|
|
13742
|
-
process.env.NODE_ENV !== "production" &&
|
|
13742
|
+
process.env.NODE_ENV !== "production" && Vt(b.state.isDestroyed, Uo("destroy")), !b.state.isDestroyed && (b.clearDelayTimeouts(), b.unmount(), Jt(), delete o._tippy, b.state.isDestroyed = !0, y("onDestroy", [b]));
|
|
13743
13743
|
}
|
|
13744
13744
|
}
|
|
13745
|
-
function
|
|
13745
|
+
function Gt(o, e) {
|
|
13746
13746
|
e === void 0 && (e = {});
|
|
13747
13747
|
var t = et.plugins.concat(e.plugins || []);
|
|
13748
13748
|
process.env.NODE_ENV !== "production" && ($j(o), Cd(e, t)), Bj();
|
|
@@ -13751,7 +13751,7 @@ function Kt(o, e) {
|
|
|
13751
13751
|
}), a = Fj(o);
|
|
13752
13752
|
if (process.env.NODE_ENV !== "production") {
|
|
13753
13753
|
var s = Jn(n.content), i = a.length > 1;
|
|
13754
|
-
|
|
13754
|
+
Vt(s && i, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
13755
13755
|
|
|
13756
13756
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
13757
13757
|
|
|
@@ -13764,9 +13764,9 @@ function Kt(o, e) {
|
|
|
13764
13764
|
}, []);
|
|
13765
13765
|
return Jn(o) ? r[0] : r;
|
|
13766
13766
|
}
|
|
13767
|
-
|
|
13768
|
-
|
|
13769
|
-
|
|
13767
|
+
Gt.defaultProps = et;
|
|
13768
|
+
Gt.setDefaultProps = qj;
|
|
13769
|
+
Gt.currentInput = Mt;
|
|
13770
13770
|
Object.assign({}, cd, {
|
|
13771
13771
|
effect: function(e) {
|
|
13772
13772
|
var t = e.state, n = {
|
|
@@ -13784,7 +13784,7 @@ Object.assign({}, cd, {
|
|
|
13784
13784
|
Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow);
|
|
13785
13785
|
}
|
|
13786
13786
|
});
|
|
13787
|
-
|
|
13787
|
+
Gt.setDefaultProps({
|
|
13788
13788
|
render: xd
|
|
13789
13789
|
});
|
|
13790
13790
|
class Jj {
|
|
@@ -13834,8 +13834,8 @@ class Jj {
|
|
|
13834
13834
|
getReferenceClientRect: ((u = this.tippyOptions) === null || u === void 0 ? void 0 : u.getReferenceClientRect) || (() => {
|
|
13835
13835
|
if (sd(g.selection)) {
|
|
13836
13836
|
let _ = r.nodeDOM(x);
|
|
13837
|
-
const
|
|
13838
|
-
if (
|
|
13837
|
+
const R = _.dataset.nodeViewWrapper ? _ : _.querySelector("[data-node-view-wrapper]");
|
|
13838
|
+
if (R && (_ = R.firstChild), _)
|
|
13839
13839
|
return _.getBoundingClientRect();
|
|
13840
13840
|
}
|
|
13841
13841
|
return id(r, x, b);
|
|
@@ -13845,7 +13845,7 @@ class Jj {
|
|
|
13845
13845
|
}
|
|
13846
13846
|
createTooltip() {
|
|
13847
13847
|
const { element: e } = this.editor.options, t = !!e.parentElement;
|
|
13848
|
-
this.tippy || !t || (this.tippy =
|
|
13848
|
+
this.tippy || !t || (this.tippy = Gt(e, {
|
|
13849
13849
|
duration: 0,
|
|
13850
13850
|
getReferenceClientRect: null,
|
|
13851
13851
|
content: this.element,
|
|
@@ -13928,7 +13928,7 @@ class Yj {
|
|
|
13928
13928
|
}
|
|
13929
13929
|
createTooltip() {
|
|
13930
13930
|
const { element: e } = this.editor.options, t = !!e.parentElement;
|
|
13931
|
-
this.tippy || !t || (this.tippy =
|
|
13931
|
+
this.tippy || !t || (this.tippy = Gt(e, {
|
|
13932
13932
|
duration: 0,
|
|
13933
13933
|
getReferenceClientRect: null,
|
|
13934
13934
|
content: this.element,
|
|
@@ -13996,7 +13996,7 @@ Se.create({
|
|
|
13996
13996
|
] : [];
|
|
13997
13997
|
}
|
|
13998
13998
|
});
|
|
13999
|
-
|
|
13999
|
+
jt({
|
|
14000
14000
|
name: "BubbleMenu",
|
|
14001
14001
|
props: {
|
|
14002
14002
|
pluginKey: {
|
|
@@ -14082,7 +14082,7 @@ class Xj extends fv {
|
|
|
14082
14082
|
return this.reactiveState && t && (this.reactiveState.value = t), t;
|
|
14083
14083
|
}
|
|
14084
14084
|
}
|
|
14085
|
-
const Zj =
|
|
14085
|
+
const Zj = jt({
|
|
14086
14086
|
name: "EditorContent",
|
|
14087
14087
|
props: {
|
|
14088
14088
|
editor: {
|
|
@@ -14128,7 +14128,7 @@ const Zj = vt({
|
|
|
14128
14128
|
});
|
|
14129
14129
|
}
|
|
14130
14130
|
});
|
|
14131
|
-
|
|
14131
|
+
jt({
|
|
14132
14132
|
name: "FloatingMenu",
|
|
14133
14133
|
props: {
|
|
14134
14134
|
pluginKey: {
|
|
@@ -14170,7 +14170,7 @@ vt({
|
|
|
14170
14170
|
};
|
|
14171
14171
|
}
|
|
14172
14172
|
});
|
|
14173
|
-
|
|
14173
|
+
jt({
|
|
14174
14174
|
name: "NodeViewContent",
|
|
14175
14175
|
props: {
|
|
14176
14176
|
as: {
|
|
@@ -14187,7 +14187,7 @@ vt({
|
|
|
14187
14187
|
});
|
|
14188
14188
|
}
|
|
14189
14189
|
});
|
|
14190
|
-
|
|
14190
|
+
jt({
|
|
14191
14191
|
name: "NodeViewWrapper",
|
|
14192
14192
|
props: {
|
|
14193
14193
|
as: {
|
|
@@ -14245,14 +14245,14 @@ class e1 {
|
|
|
14245
14245
|
this.renderedComponent.destroy();
|
|
14246
14246
|
}
|
|
14247
14247
|
}
|
|
14248
|
-
const t1 = { class: "sus-emoji-panel grid" }, o1 = ["onClick", "src", "alt", "title"], n1 = /* @__PURE__ */
|
|
14248
|
+
const t1 = { class: "sus-emoji-panel grid" }, o1 = ["onClick", "src", "alt", "title"], n1 = /* @__PURE__ */ jt({
|
|
14249
14249
|
__name: "index",
|
|
14250
14250
|
props: {
|
|
14251
14251
|
emojiList: {}
|
|
14252
14252
|
},
|
|
14253
14253
|
setup(o) {
|
|
14254
|
-
return (e, t) => (
|
|
14255
|
-
(
|
|
14254
|
+
return (e, t) => (re(), ce("div", t1, [
|
|
14255
|
+
(re(!0), ce(Pn, null, Ts(e.emojiList, (n) => (re(), ce("div", null, [
|
|
14256
14256
|
H("img", {
|
|
14257
14257
|
onClick: (a) => e.$emit("onselect", n),
|
|
14258
14258
|
class: "sus-emoji-item",
|
|
@@ -14638,7 +14638,7 @@ const t1 = { class: "sus-emoji-panel grid" }, o1 = ["onClick", "src", "alt", "ti
|
|
|
14638
14638
|
return !1;
|
|
14639
14639
|
const { tr: i, schema: r } = o.state, l = r.text(t.replace(/\r\n?/g, `
|
|
14640
14640
|
`));
|
|
14641
|
-
return i.replaceSelectionWith(this.type.create({ language: s }, l)), i.selection.$from.parent.type !== this.type && i.setSelection(
|
|
14641
|
+
return i.replaceSelectionWith(this.type.create({ language: s }, l)), i.selection.$from.parent.type !== this.type && i.setSelection(J.near(i.doc.resolve(Math.max(0, i.selection.from - 2)))), i.setMeta("paste", !0), o.dispatch(i), !0;
|
|
14642
14642
|
}
|
|
14643
14643
|
}
|
|
14644
14644
|
})
|
|
@@ -14900,7 +14900,7 @@ function ja(o, e) {
|
|
|
14900
14900
|
const t = o == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
14901
14901
|
return function(n, a, s) {
|
|
14902
14902
|
let i = n.selection, r = e > 0 ? i.$to : i.$from, l = i.empty;
|
|
14903
|
-
if (i instanceof
|
|
14903
|
+
if (i instanceof J) {
|
|
14904
14904
|
if (!s.endOfTextblock(t) || r.depth == 0)
|
|
14905
14905
|
return !1;
|
|
14906
14906
|
l = !1, r = n.doc.resolve(e > 0 ? r.after() : r.before());
|
|
@@ -14928,7 +14928,7 @@ function C1(o, e) {
|
|
|
14928
14928
|
for (let i = n.length - 1; i >= 0; i--)
|
|
14929
14929
|
a = C.from(n[i].createAndFill(null, a));
|
|
14930
14930
|
let s = o.state.tr.replace(t.pos, t.pos, new T(a, 0, 0));
|
|
14931
|
-
return s.setSelection(
|
|
14931
|
+
return s.setSelection(J.near(s.doc.resolve(t.pos + 1))), o.dispatch(s), !1;
|
|
14932
14932
|
}
|
|
14933
14933
|
function x1(o) {
|
|
14934
14934
|
if (!(o.selection instanceof ve))
|
|
@@ -14951,7 +14951,7 @@ const S1 = Se.create({
|
|
|
14951
14951
|
storage: o.storage
|
|
14952
14952
|
};
|
|
14953
14953
|
return {
|
|
14954
|
-
allowGapCursor: (e =
|
|
14954
|
+
allowGapCursor: (e = oe(B(o, "allowGapCursor", t))) !== null && e !== void 0 ? e : null
|
|
14955
14955
|
};
|
|
14956
14956
|
}
|
|
14957
14957
|
}), M1 = Be.create({
|
|
@@ -15448,10 +15448,10 @@ const Td = Ad(!1, !0), Nd = Ad(!0, !0), $1 = Se.create({
|
|
|
15448
15448
|
if (r) {
|
|
15449
15449
|
const { $to: p } = i.selection, c = p.end();
|
|
15450
15450
|
if (p.nodeAfter)
|
|
15451
|
-
p.nodeAfter.isTextblock ? i.setSelection(
|
|
15451
|
+
p.nodeAfter.isTextblock ? i.setSelection(J.create(i.doc, p.pos + 1)) : p.nodeAfter.isBlock ? i.setSelection(W.create(i.doc, p.pos)) : i.setSelection(J.create(i.doc, p.pos));
|
|
15452
15452
|
else {
|
|
15453
15453
|
const m = (l = p.parent.type.contentMatch.defaultType) === null || l === void 0 ? void 0 : l.create();
|
|
15454
|
-
m && (i.insert(c, m), i.setSelection(
|
|
15454
|
+
m && (i.insert(c, m), i.setSelection(J.create(i.doc, c + 1)));
|
|
15455
15455
|
}
|
|
15456
15456
|
i.scrollIntoView();
|
|
15457
15457
|
}
|
|
@@ -15824,11 +15824,11 @@ function ik({ pluginKey: o = sk, editor: e, char: t = "@", allowSpaces: n = !1,
|
|
|
15824
15824
|
view() {
|
|
15825
15825
|
return {
|
|
15826
15826
|
update: async (h, j) => {
|
|
15827
|
-
var w, x, b, A, _,
|
|
15828
|
-
const E = (w = this.key) === null || w === void 0 ? void 0 : w.getState(j),
|
|
15827
|
+
var w, x, b, A, _, R, U;
|
|
15828
|
+
const E = (w = this.key) === null || w === void 0 ? void 0 : w.getState(j), q = (x = this.key) === null || x === void 0 ? void 0 : x.getState(h.state), X = E.active && q.active && E.range.from !== q.range.from, P = !E.active && q.active, V = E.active && !q.active, Q = !P && !V && E.query !== q.query, ae = P || X && Q, le = Q || X, v = V || X && Q;
|
|
15829
15829
|
if (!ae && !le && !v)
|
|
15830
15830
|
return;
|
|
15831
|
-
const y = v && !ae ? E :
|
|
15831
|
+
const y = v && !ae ? E : q, M = h.dom.querySelector(`[data-decoration-id="${y.decorationId}"]`);
|
|
15832
15832
|
u = {
|
|
15833
15833
|
editor: e,
|
|
15834
15834
|
range: y.range,
|
|
@@ -15845,13 +15845,13 @@ function ik({ pluginKey: o = sk, editor: e, char: t = "@", allowSpaces: n = !1,
|
|
|
15845
15845
|
// this can be used for building popups without a DOM node
|
|
15846
15846
|
clientRect: M ? () => {
|
|
15847
15847
|
var N;
|
|
15848
|
-
const { decorationId: K } = (N = this.key) === null || N === void 0 ? void 0 : N.getState(e.state),
|
|
15849
|
-
return (
|
|
15848
|
+
const { decorationId: K } = (N = this.key) === null || N === void 0 ? void 0 : N.getState(e.state), ne = h.dom.querySelector(`[data-decoration-id="${K}"]`);
|
|
15849
|
+
return (ne == null ? void 0 : ne.getBoundingClientRect()) || null;
|
|
15850
15850
|
} : null
|
|
15851
15851
|
}, ae && ((b = g == null ? void 0 : g.onBeforeStart) === null || b === void 0 || b.call(g, u)), le && ((A = g == null ? void 0 : g.onBeforeUpdate) === null || A === void 0 || A.call(g, u)), (le || ae) && (u.items = await p({
|
|
15852
15852
|
editor: e,
|
|
15853
15853
|
query: y.query
|
|
15854
|
-
})), v && ((_ = g == null ? void 0 : g.onExit) === null || _ === void 0 || _.call(g, u)), le && ((
|
|
15854
|
+
})), v && ((_ = g == null ? void 0 : g.onExit) === null || _ === void 0 || _.call(g, u)), le && ((R = g == null ? void 0 : g.onUpdate) === null || R === void 0 || R.call(g, u)), ae && ((U = g == null ? void 0 : g.onStart) === null || U === void 0 || U.call(g, u));
|
|
15855
15855
|
},
|
|
15856
15856
|
destroy: () => {
|
|
15857
15857
|
var h;
|
|
@@ -15875,22 +15875,22 @@ function ik({ pluginKey: o = sk, editor: e, char: t = "@", allowSpaces: n = !1,
|
|
|
15875
15875
|
},
|
|
15876
15876
|
// Apply changes to the plugin state from a view transaction.
|
|
15877
15877
|
apply(h, j, w, x) {
|
|
15878
|
-
const { isEditable: b } = e, { composing: A } = e.view, { selection: _ } = h, { empty:
|
|
15879
|
-
if (E.composing = A, b && (
|
|
15878
|
+
const { isEditable: b } = e, { composing: A } = e.view, { selection: _ } = h, { empty: R, from: U } = _, E = { ...j };
|
|
15879
|
+
if (E.composing = A, b && (R || e.view.composing)) {
|
|
15880
15880
|
(U < j.range.from || U > j.range.to) && !A && !j.composing && (E.active = !1);
|
|
15881
|
-
const
|
|
15881
|
+
const q = d({
|
|
15882
15882
|
char: t,
|
|
15883
15883
|
allowSpaces: n,
|
|
15884
15884
|
allowedPrefixes: a,
|
|
15885
15885
|
startOfLine: s,
|
|
15886
15886
|
$position: _.$from
|
|
15887
|
-
}),
|
|
15888
|
-
|
|
15887
|
+
}), X = `id_${Math.floor(Math.random() * 4294967295)}`;
|
|
15888
|
+
q && m({
|
|
15889
15889
|
editor: e,
|
|
15890
15890
|
state: x,
|
|
15891
|
-
range:
|
|
15891
|
+
range: q.range,
|
|
15892
15892
|
isActive: j.active
|
|
15893
|
-
}) ? (E.active = !0, E.decorationId = j.decorationId ? j.decorationId :
|
|
15893
|
+
}) ? (E.active = !0, E.decorationId = j.decorationId ? j.decorationId : X, E.range = q.range, E.query = q.query, E.text = q.text) : E.active = !1;
|
|
15894
15894
|
} else
|
|
15895
15895
|
E.active = !1;
|
|
15896
15896
|
return E.active || (E.decorationId = null, E.range = { from: 0, to: 0 }, E.query = null, E.text = null), E;
|
|
@@ -16035,7 +16035,7 @@ const dk = new De("emojiSuggestion"), uk = /:([a-zA-Z0-9_+-]+):$/, gk = /:([a-zA
|
|
|
16035
16035
|
});
|
|
16036
16036
|
}), n.steps.length ? n : void 0;
|
|
16037
16037
|
} })];
|
|
16038
|
-
} }), hk = { class: "dropdown-menu" }, bk = ["onClick"], vk = ["src"], jk = /* @__PURE__ */
|
|
16038
|
+
} }), hk = { class: "dropdown-menu" }, bk = ["onClick"], vk = ["src"], jk = /* @__PURE__ */ jt({
|
|
16039
16039
|
__name: "EmojiList",
|
|
16040
16040
|
props: {
|
|
16041
16041
|
items: {},
|
|
@@ -16051,18 +16051,18 @@ const dk = new De("emojiSuggestion"), uk = /:([a-zA-Z0-9_+-]+):$/, gk = /:([a-zA
|
|
|
16051
16051
|
const s = e.items[a];
|
|
16052
16052
|
s && e.command({ name: s.name });
|
|
16053
16053
|
};
|
|
16054
|
-
return (a, s) => (
|
|
16055
|
-
(
|
|
16054
|
+
return (a, s) => (re(), ce("div", hk, [
|
|
16055
|
+
(re(!0), ce(Pn, null, Ts(a.items, (i, r) => (re(), ce("button", {
|
|
16056
16056
|
class: vc({ "is-selected": r === t.value }),
|
|
16057
16057
|
key: r,
|
|
16058
16058
|
onClick: (l) => n(r)
|
|
16059
16059
|
}, [
|
|
16060
|
-
i.fallbackImage ? (
|
|
16060
|
+
i.fallbackImage ? (re(), ce("img", {
|
|
16061
16061
|
key: 0,
|
|
16062
16062
|
src: i.fallbackImage,
|
|
16063
16063
|
align: "absmiddle",
|
|
16064
16064
|
alt: ""
|
|
16065
|
-
}, null, 8, vk)) : (
|
|
16065
|
+
}, null, 8, vk)) : (re(), ce(Pn, { key: 1 }, [
|
|
16066
16066
|
Na(Ke(i.emoji), 1)
|
|
16067
16067
|
], 64)),
|
|
16068
16068
|
Na(" :" + Ke(i.name) + ": ", 1)
|
|
@@ -16078,7 +16078,7 @@ const dk = new De("emojiSuggestion"), uk = /:([a-zA-Z0-9_+-]+):$/, gk = /:([a-zA
|
|
|
16078
16078
|
o = new e1(jk, {
|
|
16079
16079
|
props: t,
|
|
16080
16080
|
editor: t.editor
|
|
16081
|
-
}), e =
|
|
16081
|
+
}), e = Gt("body", {
|
|
16082
16082
|
getReferenceClientRect: t.clientRect,
|
|
16083
16083
|
appendTo: () => document.body,
|
|
16084
16084
|
content: o.element,
|
|
@@ -16784,22 +16784,22 @@ const Ci = Rd, Kp = io, Gp = Symbol("nomatch"), gy = 7, Gd = function(o) {
|
|
|
16784
16784
|
let N = "", K = "";
|
|
16785
16785
|
typeof y == "object" ? (N = v, M = y.ignoreIllegals, K = y.language) : (Ko("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Ko("10.7.0", `Please use highlight(code, options) instead.
|
|
16786
16786
|
https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M === void 0 && (M = !0);
|
|
16787
|
-
const
|
|
16787
|
+
const ne = {
|
|
16788
16788
|
code: N,
|
|
16789
16789
|
language: K
|
|
16790
16790
|
};
|
|
16791
|
-
ae("before:highlight",
|
|
16792
|
-
const ge =
|
|
16793
|
-
return ge.code =
|
|
16791
|
+
ae("before:highlight", ne);
|
|
16792
|
+
const ge = ne.result ? ne.result : m(ne.language, ne.code, M);
|
|
16793
|
+
return ge.code = ne.code, ae("after:highlight", ge), ge;
|
|
16794
16794
|
}
|
|
16795
16795
|
function m(v, y, M, N) {
|
|
16796
16796
|
const K = /* @__PURE__ */ Object.create(null);
|
|
16797
|
-
function
|
|
16797
|
+
function ne(k, I) {
|
|
16798
16798
|
return k.keywords[I];
|
|
16799
16799
|
}
|
|
16800
16800
|
function ge() {
|
|
16801
16801
|
if (!S.keywords) {
|
|
16802
|
-
|
|
16802
|
+
Y.addText($);
|
|
16803
16803
|
return;
|
|
16804
16804
|
}
|
|
16805
16805
|
let k = 0;
|
|
@@ -16807,40 +16807,40 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16807
16807
|
let I = S.keywordPatternRe.exec($), F = "";
|
|
16808
16808
|
for (; I; ) {
|
|
16809
16809
|
F += $.substring(k, I.index);
|
|
16810
|
-
const L =
|
|
16811
|
-
if (
|
|
16812
|
-
const [ke, _n] =
|
|
16813
|
-
if (
|
|
16810
|
+
const L = de.case_insensitive ? I[0].toLowerCase() : I[0], se = ne(S, L);
|
|
16811
|
+
if (se) {
|
|
16812
|
+
const [ke, _n] = se;
|
|
16813
|
+
if (Y.addText(F), F = "", K[L] = (K[L] || 0) + 1, K[L] <= gy && (Me += _n), ke.startsWith("_"))
|
|
16814
16814
|
F += I[0];
|
|
16815
16815
|
else {
|
|
16816
|
-
const D =
|
|
16817
|
-
|
|
16816
|
+
const D = de.classNameAliases[ke] || ke;
|
|
16817
|
+
pe(I[0], D);
|
|
16818
16818
|
}
|
|
16819
16819
|
} else
|
|
16820
16820
|
F += I[0];
|
|
16821
16821
|
k = S.keywordPatternRe.lastIndex, I = S.keywordPatternRe.exec($);
|
|
16822
16822
|
}
|
|
16823
|
-
F += $.substring(k),
|
|
16823
|
+
F += $.substring(k), Y.addText(F);
|
|
16824
16824
|
}
|
|
16825
16825
|
function we() {
|
|
16826
16826
|
if ($ === "") return;
|
|
16827
16827
|
let k = null;
|
|
16828
16828
|
if (typeof S.subLanguage == "string") {
|
|
16829
16829
|
if (!e[S.subLanguage]) {
|
|
16830
|
-
|
|
16830
|
+
Y.addText($);
|
|
16831
16831
|
return;
|
|
16832
16832
|
}
|
|
16833
16833
|
k = m(S.subLanguage, $, !0, Le[S.subLanguage]), Le[S.subLanguage] = /** @type {CompiledMode} */
|
|
16834
16834
|
k._top;
|
|
16835
16835
|
} else
|
|
16836
16836
|
k = u($, S.subLanguage.length ? S.subLanguage : null);
|
|
16837
|
-
S.relevance > 0 && (Me += k.relevance),
|
|
16837
|
+
S.relevance > 0 && (Me += k.relevance), Y.__addSublanguage(k._emitter, k.language);
|
|
16838
16838
|
}
|
|
16839
|
-
function
|
|
16839
|
+
function te() {
|
|
16840
16840
|
S.subLanguage != null ? we() : ge(), $ = "";
|
|
16841
16841
|
}
|
|
16842
|
-
function
|
|
16843
|
-
k !== "" && (
|
|
16842
|
+
function pe(k, I) {
|
|
16843
|
+
k !== "" && (Y.startScope(I), Y.addText(k), Y.endScope());
|
|
16844
16844
|
}
|
|
16845
16845
|
function ot(k, I) {
|
|
16846
16846
|
let F = 1;
|
|
@@ -16850,19 +16850,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16850
16850
|
F++;
|
|
16851
16851
|
continue;
|
|
16852
16852
|
}
|
|
16853
|
-
const
|
|
16854
|
-
|
|
16853
|
+
const se = de.classNameAliases[k[F]] || k[F], ke = I[F];
|
|
16854
|
+
se ? pe(ke, se) : ($ = ke, ge(), $ = ""), F++;
|
|
16855
16855
|
}
|
|
16856
16856
|
}
|
|
16857
16857
|
function Pe(k, I) {
|
|
16858
|
-
return k.scope && typeof k.scope == "string" &&
|
|
16858
|
+
return k.scope && typeof k.scope == "string" && Y.openNode(de.classNameAliases[k.scope] || k.scope), k.beginScope && (k.beginScope._wrap ? (pe($, de.classNameAliases[k.beginScope._wrap] || k.beginScope._wrap), $ = "") : k.beginScope._multi && (ot(k.beginScope, I), $ = "")), S = Object.create(k, { parent: { value: S } }), S;
|
|
16859
16859
|
}
|
|
16860
16860
|
function nt(k, I, F) {
|
|
16861
16861
|
let L = Mk(k.endRe, F);
|
|
16862
16862
|
if (L) {
|
|
16863
16863
|
if (k["on:end"]) {
|
|
16864
|
-
const
|
|
16865
|
-
k["on:end"](I,
|
|
16864
|
+
const se = new Hp(k);
|
|
16865
|
+
k["on:end"](I, se), se.isMatchIgnored && (L = !1);
|
|
16866
16866
|
}
|
|
16867
16867
|
if (L) {
|
|
16868
16868
|
for (; k.endsParent && k.parent; )
|
|
@@ -16877,34 +16877,34 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16877
16877
|
return S.matcher.regexIndex === 0 ? ($ += k[0], 1) : (rt = !0, 0);
|
|
16878
16878
|
}
|
|
16879
16879
|
function wt(k) {
|
|
16880
|
-
const I = k[0], F = k.rule, L = new Hp(F),
|
|
16881
|
-
for (const ke of
|
|
16880
|
+
const I = k[0], F = k.rule, L = new Hp(F), se = [F.__beforeBegin, F["on:begin"]];
|
|
16881
|
+
for (const ke of se)
|
|
16882
16882
|
if (ke && (ke(k, L), L.isMatchIgnored))
|
|
16883
16883
|
return at(I);
|
|
16884
|
-
return F.skip ? $ += I : (F.excludeBegin && ($ += I),
|
|
16884
|
+
return F.skip ? $ += I : (F.excludeBegin && ($ += I), te(), !F.returnBegin && !F.excludeBegin && ($ = I)), Pe(F, k), F.returnBegin ? 0 : I.length;
|
|
16885
16885
|
}
|
|
16886
|
-
function
|
|
16886
|
+
function Jt(k) {
|
|
16887
16887
|
const I = k[0], F = y.substring(k.index), L = nt(S, k, F);
|
|
16888
16888
|
if (!L)
|
|
16889
16889
|
return Gp;
|
|
16890
|
-
const
|
|
16891
|
-
S.endScope && S.endScope._wrap ? (
|
|
16890
|
+
const se = S;
|
|
16891
|
+
S.endScope && S.endScope._wrap ? (te(), pe(I, S.endScope._wrap)) : S.endScope && S.endScope._multi ? (te(), ot(S.endScope, k)) : se.skip ? $ += I : (se.returnEnd || se.excludeEnd || ($ += I), te(), se.excludeEnd && ($ = I));
|
|
16892
16892
|
do
|
|
16893
|
-
S.scope &&
|
|
16893
|
+
S.scope && Y.closeNode(), !S.skip && !S.subLanguage && (Me += S.relevance), S = S.parent;
|
|
16894
16894
|
while (S !== L.parent);
|
|
16895
|
-
return L.starts && Pe(L.starts, k),
|
|
16895
|
+
return L.starts && Pe(L.starts, k), se.returnEnd ? 0 : I.length;
|
|
16896
16896
|
}
|
|
16897
16897
|
function Rt() {
|
|
16898
16898
|
const k = [];
|
|
16899
|
-
for (let I = S; I !==
|
|
16899
|
+
for (let I = S; I !== de; I = I.parent)
|
|
16900
16900
|
I.scope && k.unshift(I.scope);
|
|
16901
|
-
k.forEach((I) =>
|
|
16901
|
+
k.forEach((I) => Y.openNode(I));
|
|
16902
16902
|
}
|
|
16903
16903
|
let Ue = {};
|
|
16904
16904
|
function It(k, I) {
|
|
16905
16905
|
const F = I && I[0];
|
|
16906
16906
|
if ($ += k, F == null)
|
|
16907
|
-
return
|
|
16907
|
+
return te(), 0;
|
|
16908
16908
|
if (Ue.type === "begin" && I.type === "end" && Ue.index === I.index && F === "") {
|
|
16909
16909
|
if ($ += y.slice(I.index, I.index + 1), !a) {
|
|
16910
16910
|
const L = new Error(`0 width match regex (${v})`);
|
|
@@ -16918,7 +16918,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16918
16918
|
const L = new Error('Illegal lexeme "' + F + '" for mode "' + (S.scope || "<unnamed>") + '"');
|
|
16919
16919
|
throw L.mode = S, L;
|
|
16920
16920
|
} else if (I.type === "end") {
|
|
16921
|
-
const L =
|
|
16921
|
+
const L = Jt(I);
|
|
16922
16922
|
if (L !== Gp)
|
|
16923
16923
|
return L;
|
|
16924
16924
|
}
|
|
@@ -16928,17 +16928,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16928
16928
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
16929
16929
|
return $ += F, F.length;
|
|
16930
16930
|
}
|
|
16931
|
-
const
|
|
16932
|
-
if (!
|
|
16931
|
+
const de = E(v);
|
|
16932
|
+
if (!de)
|
|
16933
16933
|
throw Oo(s.replace("{}", v)), new Error('Unknown language: "' + v + '"');
|
|
16934
|
-
const Pt = cy(
|
|
16934
|
+
const Pt = cy(de);
|
|
16935
16935
|
let st = "", S = N || Pt;
|
|
16936
|
-
const Le = {},
|
|
16936
|
+
const Le = {}, Y = new r.__emitter(r);
|
|
16937
16937
|
Rt();
|
|
16938
16938
|
let $ = "", Me = 0, je = 0, it = 0, rt = !1;
|
|
16939
16939
|
try {
|
|
16940
|
-
if (
|
|
16941
|
-
|
|
16940
|
+
if (de.__emitTokens)
|
|
16941
|
+
de.__emitTokens(y, Y);
|
|
16942
16942
|
else {
|
|
16943
16943
|
for (S.matcher.considerAll(); ; ) {
|
|
16944
16944
|
it++, rt ? rt = !1 : S.matcher.considerAll(), S.matcher.lastIndex = je;
|
|
@@ -16949,12 +16949,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16949
16949
|
}
|
|
16950
16950
|
It(y.substring(je));
|
|
16951
16951
|
}
|
|
16952
|
-
return
|
|
16952
|
+
return Y.finalize(), st = Y.toHTML(), {
|
|
16953
16953
|
language: v,
|
|
16954
16954
|
value: st,
|
|
16955
16955
|
relevance: Me,
|
|
16956
16956
|
illegal: !1,
|
|
16957
|
-
_emitter:
|
|
16957
|
+
_emitter: Y,
|
|
16958
16958
|
_top: S
|
|
16959
16959
|
};
|
|
16960
16960
|
} catch (k) {
|
|
@@ -16971,7 +16971,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16971
16971
|
mode: k.mode,
|
|
16972
16972
|
resultSoFar: st
|
|
16973
16973
|
},
|
|
16974
|
-
_emitter:
|
|
16974
|
+
_emitter: Y
|
|
16975
16975
|
};
|
|
16976
16976
|
if (a)
|
|
16977
16977
|
return {
|
|
@@ -16980,7 +16980,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16980
16980
|
illegal: !1,
|
|
16981
16981
|
relevance: 0,
|
|
16982
16982
|
errorRaised: k,
|
|
16983
|
-
_emitter:
|
|
16983
|
+
_emitter: Y,
|
|
16984
16984
|
_top: S
|
|
16985
16985
|
};
|
|
16986
16986
|
throw k;
|
|
@@ -16998,20 +16998,20 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
16998
16998
|
}
|
|
16999
16999
|
function u(v, y) {
|
|
17000
17000
|
y = y || r.languages || Object.keys(e);
|
|
17001
|
-
const M = d(v), N = y.filter(E).filter(
|
|
17002
|
-
(
|
|
17001
|
+
const M = d(v), N = y.filter(E).filter(X).map(
|
|
17002
|
+
(te) => m(te, v, !1)
|
|
17003
17003
|
);
|
|
17004
17004
|
N.unshift(M);
|
|
17005
|
-
const K = N.sort((
|
|
17006
|
-
if (
|
|
17007
|
-
if (
|
|
17008
|
-
if (E(
|
|
17005
|
+
const K = N.sort((te, pe) => {
|
|
17006
|
+
if (te.relevance !== pe.relevance) return pe.relevance - te.relevance;
|
|
17007
|
+
if (te.language && pe.language) {
|
|
17008
|
+
if (E(te.language).supersetOf === pe.language)
|
|
17009
17009
|
return 1;
|
|
17010
|
-
if (E(
|
|
17010
|
+
if (E(pe.language).supersetOf === te.language)
|
|
17011
17011
|
return -1;
|
|
17012
17012
|
}
|
|
17013
17013
|
return 0;
|
|
17014
|
-
}), [
|
|
17014
|
+
}), [ne, ge] = K, we = ne;
|
|
17015
17015
|
return we.secondBest = ge, we;
|
|
17016
17016
|
}
|
|
17017
17017
|
function g(v, y, M) {
|
|
@@ -17078,9 +17078,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
17078
17078
|
throw N;
|
|
17079
17079
|
M = i;
|
|
17080
17080
|
}
|
|
17081
|
-
M.name || (M.name = v), e[v] = M, M.rawDefinition = y.bind(null, o), M.aliases &&
|
|
17081
|
+
M.name || (M.name = v), e[v] = M, M.rawDefinition = y.bind(null, o), M.aliases && q(M.aliases, { languageName: v });
|
|
17082
17082
|
}
|
|
17083
|
-
function
|
|
17083
|
+
function R(v) {
|
|
17084
17084
|
delete e[v];
|
|
17085
17085
|
for (const y of Object.keys(t))
|
|
17086
17086
|
t[y] === v && delete t[y];
|
|
@@ -17091,16 +17091,16 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
17091
17091
|
function E(v) {
|
|
17092
17092
|
return v = (v || "").toLowerCase(), e[v] || e[t[v]];
|
|
17093
17093
|
}
|
|
17094
|
-
function
|
|
17094
|
+
function q(v, { languageName: y }) {
|
|
17095
17095
|
typeof v == "string" && (v = [v]), v.forEach((M) => {
|
|
17096
17096
|
t[M.toLowerCase()] = y;
|
|
17097
17097
|
});
|
|
17098
17098
|
}
|
|
17099
|
-
function
|
|
17099
|
+
function X(v) {
|
|
17100
17100
|
const y = E(v);
|
|
17101
17101
|
return y && !y.disableAutodetect;
|
|
17102
17102
|
}
|
|
17103
|
-
function
|
|
17103
|
+
function P(v) {
|
|
17104
17104
|
v["before:highlightBlock"] && !v["before:highlightElement"] && (v["before:highlightElement"] = (y) => {
|
|
17105
17105
|
v["before:highlightBlock"](
|
|
17106
17106
|
Object.assign({ block: y.el }, y)
|
|
@@ -17111,10 +17111,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
17111
17111
|
);
|
|
17112
17112
|
});
|
|
17113
17113
|
}
|
|
17114
|
-
function
|
|
17115
|
-
|
|
17114
|
+
function V(v) {
|
|
17115
|
+
P(v), n.push(v);
|
|
17116
17116
|
}
|
|
17117
|
-
function
|
|
17117
|
+
function Q(v) {
|
|
17118
17118
|
const y = n.indexOf(v);
|
|
17119
17119
|
y !== -1 && n.splice(y, 1);
|
|
17120
17120
|
}
|
|
@@ -17138,14 +17138,14 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
17138
17138
|
initHighlighting: j,
|
|
17139
17139
|
initHighlightingOnLoad: w,
|
|
17140
17140
|
registerLanguage: _,
|
|
17141
|
-
unregisterLanguage:
|
|
17141
|
+
unregisterLanguage: R,
|
|
17142
17142
|
listLanguages: U,
|
|
17143
17143
|
getLanguage: E,
|
|
17144
|
-
registerAliases:
|
|
17145
|
-
autoDetection:
|
|
17144
|
+
registerAliases: q,
|
|
17145
|
+
autoDetection: X,
|
|
17146
17146
|
inherit: Kp,
|
|
17147
|
-
addPlugin:
|
|
17148
|
-
removePlugin:
|
|
17147
|
+
addPlugin: V,
|
|
17148
|
+
removePlugin: Q
|
|
17149
17149
|
}), o.debugMode = function() {
|
|
17150
17150
|
a = !1;
|
|
17151
17151
|
}, o.safeMode = function() {
|
|
@@ -17943,22 +17943,22 @@ const xi = Xd, oc = ro, nc = Symbol("nomatch"), u0 = 7, ru = function(o) {
|
|
|
17943
17943
|
let N = "", K = "";
|
|
17944
17944
|
typeof y == "object" ? (N = v, M = y.ignoreIllegals, K = y.language) : (Go("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Go("10.7.0", `Please use highlight(code, options) instead.
|
|
17945
17945
|
https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M === void 0 && (M = !0);
|
|
17946
|
-
const
|
|
17946
|
+
const ne = {
|
|
17947
17947
|
code: N,
|
|
17948
17948
|
language: K
|
|
17949
17949
|
};
|
|
17950
|
-
ae("before:highlight",
|
|
17951
|
-
const ge =
|
|
17952
|
-
return ge.code =
|
|
17950
|
+
ae("before:highlight", ne);
|
|
17951
|
+
const ge = ne.result ? ne.result : m(ne.language, ne.code, M);
|
|
17952
|
+
return ge.code = ne.code, ae("after:highlight", ge), ge;
|
|
17953
17953
|
}
|
|
17954
17954
|
function m(v, y, M, N) {
|
|
17955
17955
|
const K = /* @__PURE__ */ Object.create(null);
|
|
17956
|
-
function
|
|
17956
|
+
function ne(k, I) {
|
|
17957
17957
|
return k.keywords[I];
|
|
17958
17958
|
}
|
|
17959
17959
|
function ge() {
|
|
17960
17960
|
if (!S.keywords) {
|
|
17961
|
-
|
|
17961
|
+
Y.addText($);
|
|
17962
17962
|
return;
|
|
17963
17963
|
}
|
|
17964
17964
|
let k = 0;
|
|
@@ -17966,40 +17966,40 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
17966
17966
|
let I = S.keywordPatternRe.exec($), F = "";
|
|
17967
17967
|
for (; I; ) {
|
|
17968
17968
|
F += $.substring(k, I.index);
|
|
17969
|
-
const L =
|
|
17970
|
-
if (
|
|
17971
|
-
const [ke, _n] =
|
|
17972
|
-
if (
|
|
17969
|
+
const L = de.case_insensitive ? I[0].toLowerCase() : I[0], se = ne(S, L);
|
|
17970
|
+
if (se) {
|
|
17971
|
+
const [ke, _n] = se;
|
|
17972
|
+
if (Y.addText(F), F = "", K[L] = (K[L] || 0) + 1, K[L] <= u0 && (Me += _n), ke.startsWith("_"))
|
|
17973
17973
|
F += I[0];
|
|
17974
17974
|
else {
|
|
17975
|
-
const D =
|
|
17976
|
-
|
|
17975
|
+
const D = de.classNameAliases[ke] || ke;
|
|
17976
|
+
pe(I[0], D);
|
|
17977
17977
|
}
|
|
17978
17978
|
} else
|
|
17979
17979
|
F += I[0];
|
|
17980
17980
|
k = S.keywordPatternRe.lastIndex, I = S.keywordPatternRe.exec($);
|
|
17981
17981
|
}
|
|
17982
|
-
F += $.substring(k),
|
|
17982
|
+
F += $.substring(k), Y.addText(F);
|
|
17983
17983
|
}
|
|
17984
17984
|
function we() {
|
|
17985
17985
|
if ($ === "") return;
|
|
17986
17986
|
let k = null;
|
|
17987
17987
|
if (typeof S.subLanguage == "string") {
|
|
17988
17988
|
if (!e[S.subLanguage]) {
|
|
17989
|
-
|
|
17989
|
+
Y.addText($);
|
|
17990
17990
|
return;
|
|
17991
17991
|
}
|
|
17992
17992
|
k = m(S.subLanguage, $, !0, Le[S.subLanguage]), Le[S.subLanguage] = /** @type {CompiledMode} */
|
|
17993
17993
|
k._top;
|
|
17994
17994
|
} else
|
|
17995
17995
|
k = u($, S.subLanguage.length ? S.subLanguage : null);
|
|
17996
|
-
S.relevance > 0 && (Me += k.relevance),
|
|
17996
|
+
S.relevance > 0 && (Me += k.relevance), Y.__addSublanguage(k._emitter, k.language);
|
|
17997
17997
|
}
|
|
17998
|
-
function
|
|
17998
|
+
function te() {
|
|
17999
17999
|
S.subLanguage != null ? we() : ge(), $ = "";
|
|
18000
18000
|
}
|
|
18001
|
-
function
|
|
18002
|
-
k !== "" && (
|
|
18001
|
+
function pe(k, I) {
|
|
18002
|
+
k !== "" && (Y.startScope(I), Y.addText(k), Y.endScope());
|
|
18003
18003
|
}
|
|
18004
18004
|
function ot(k, I) {
|
|
18005
18005
|
let F = 1;
|
|
@@ -18009,19 +18009,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18009
18009
|
F++;
|
|
18010
18010
|
continue;
|
|
18011
18011
|
}
|
|
18012
|
-
const
|
|
18013
|
-
|
|
18012
|
+
const se = de.classNameAliases[k[F]] || k[F], ke = I[F];
|
|
18013
|
+
se ? pe(ke, se) : ($ = ke, ge(), $ = ""), F++;
|
|
18014
18014
|
}
|
|
18015
18015
|
}
|
|
18016
18016
|
function Pe(k, I) {
|
|
18017
|
-
return k.scope && typeof k.scope == "string" &&
|
|
18017
|
+
return k.scope && typeof k.scope == "string" && Y.openNode(de.classNameAliases[k.scope] || k.scope), k.beginScope && (k.beginScope._wrap ? (pe($, de.classNameAliases[k.beginScope._wrap] || k.beginScope._wrap), $ = "") : k.beginScope._multi && (ot(k.beginScope, I), $ = "")), S = Object.create(k, { parent: { value: S } }), S;
|
|
18018
18018
|
}
|
|
18019
18019
|
function nt(k, I, F) {
|
|
18020
18020
|
let L = Sy(k.endRe, F);
|
|
18021
18021
|
if (L) {
|
|
18022
18022
|
if (k["on:end"]) {
|
|
18023
|
-
const
|
|
18024
|
-
k["on:end"](I,
|
|
18023
|
+
const se = new Xp(k);
|
|
18024
|
+
k["on:end"](I, se), se.isMatchIgnored && (L = !1);
|
|
18025
18025
|
}
|
|
18026
18026
|
if (L) {
|
|
18027
18027
|
for (; k.endsParent && k.parent; )
|
|
@@ -18036,34 +18036,34 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18036
18036
|
return S.matcher.regexIndex === 0 ? ($ += k[0], 1) : (rt = !0, 0);
|
|
18037
18037
|
}
|
|
18038
18038
|
function wt(k) {
|
|
18039
|
-
const I = k[0], F = k.rule, L = new Xp(F),
|
|
18040
|
-
for (const ke of
|
|
18039
|
+
const I = k[0], F = k.rule, L = new Xp(F), se = [F.__beforeBegin, F["on:begin"]];
|
|
18040
|
+
for (const ke of se)
|
|
18041
18041
|
if (ke && (ke(k, L), L.isMatchIgnored))
|
|
18042
18042
|
return at(I);
|
|
18043
|
-
return F.skip ? $ += I : (F.excludeBegin && ($ += I),
|
|
18043
|
+
return F.skip ? $ += I : (F.excludeBegin && ($ += I), te(), !F.returnBegin && !F.excludeBegin && ($ = I)), Pe(F, k), F.returnBegin ? 0 : I.length;
|
|
18044
18044
|
}
|
|
18045
|
-
function
|
|
18045
|
+
function Jt(k) {
|
|
18046
18046
|
const I = k[0], F = y.substring(k.index), L = nt(S, k, F);
|
|
18047
18047
|
if (!L)
|
|
18048
18048
|
return nc;
|
|
18049
|
-
const
|
|
18050
|
-
S.endScope && S.endScope._wrap ? (
|
|
18049
|
+
const se = S;
|
|
18050
|
+
S.endScope && S.endScope._wrap ? (te(), pe(I, S.endScope._wrap)) : S.endScope && S.endScope._multi ? (te(), ot(S.endScope, k)) : se.skip ? $ += I : (se.returnEnd || se.excludeEnd || ($ += I), te(), se.excludeEnd && ($ = I));
|
|
18051
18051
|
do
|
|
18052
|
-
S.scope &&
|
|
18052
|
+
S.scope && Y.closeNode(), !S.skip && !S.subLanguage && (Me += S.relevance), S = S.parent;
|
|
18053
18053
|
while (S !== L.parent);
|
|
18054
|
-
return L.starts && Pe(L.starts, k),
|
|
18054
|
+
return L.starts && Pe(L.starts, k), se.returnEnd ? 0 : I.length;
|
|
18055
18055
|
}
|
|
18056
18056
|
function Rt() {
|
|
18057
18057
|
const k = [];
|
|
18058
|
-
for (let I = S; I !==
|
|
18058
|
+
for (let I = S; I !== de; I = I.parent)
|
|
18059
18059
|
I.scope && k.unshift(I.scope);
|
|
18060
|
-
k.forEach((I) =>
|
|
18060
|
+
k.forEach((I) => Y.openNode(I));
|
|
18061
18061
|
}
|
|
18062
18062
|
let Ue = {};
|
|
18063
18063
|
function It(k, I) {
|
|
18064
18064
|
const F = I && I[0];
|
|
18065
18065
|
if ($ += k, F == null)
|
|
18066
|
-
return
|
|
18066
|
+
return te(), 0;
|
|
18067
18067
|
if (Ue.type === "begin" && I.type === "end" && Ue.index === I.index && F === "") {
|
|
18068
18068
|
if ($ += y.slice(I.index, I.index + 1), !a) {
|
|
18069
18069
|
const L = new Error(`0 width match regex (${v})`);
|
|
@@ -18077,7 +18077,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18077
18077
|
const L = new Error('Illegal lexeme "' + F + '" for mode "' + (S.scope || "<unnamed>") + '"');
|
|
18078
18078
|
throw L.mode = S, L;
|
|
18079
18079
|
} else if (I.type === "end") {
|
|
18080
|
-
const L =
|
|
18080
|
+
const L = Jt(I);
|
|
18081
18081
|
if (L !== nc)
|
|
18082
18082
|
return L;
|
|
18083
18083
|
}
|
|
@@ -18087,17 +18087,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18087
18087
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
18088
18088
|
return $ += F, F.length;
|
|
18089
18089
|
}
|
|
18090
|
-
const
|
|
18091
|
-
if (!
|
|
18090
|
+
const de = E(v);
|
|
18091
|
+
if (!de)
|
|
18092
18092
|
throw Ao(s.replace("{}", v)), new Error('Unknown language: "' + v + '"');
|
|
18093
|
-
const Pt = p0(
|
|
18093
|
+
const Pt = p0(de);
|
|
18094
18094
|
let st = "", S = N || Pt;
|
|
18095
|
-
const Le = {},
|
|
18095
|
+
const Le = {}, Y = new r.__emitter(r);
|
|
18096
18096
|
Rt();
|
|
18097
18097
|
let $ = "", Me = 0, je = 0, it = 0, rt = !1;
|
|
18098
18098
|
try {
|
|
18099
|
-
if (
|
|
18100
|
-
|
|
18099
|
+
if (de.__emitTokens)
|
|
18100
|
+
de.__emitTokens(y, Y);
|
|
18101
18101
|
else {
|
|
18102
18102
|
for (S.matcher.considerAll(); ; ) {
|
|
18103
18103
|
it++, rt ? rt = !1 : S.matcher.considerAll(), S.matcher.lastIndex = je;
|
|
@@ -18108,12 +18108,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18108
18108
|
}
|
|
18109
18109
|
It(y.substring(je));
|
|
18110
18110
|
}
|
|
18111
|
-
return
|
|
18111
|
+
return Y.finalize(), st = Y.toHTML(), {
|
|
18112
18112
|
language: v,
|
|
18113
18113
|
value: st,
|
|
18114
18114
|
relevance: Me,
|
|
18115
18115
|
illegal: !1,
|
|
18116
|
-
_emitter:
|
|
18116
|
+
_emitter: Y,
|
|
18117
18117
|
_top: S
|
|
18118
18118
|
};
|
|
18119
18119
|
} catch (k) {
|
|
@@ -18130,7 +18130,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18130
18130
|
mode: k.mode,
|
|
18131
18131
|
resultSoFar: st
|
|
18132
18132
|
},
|
|
18133
|
-
_emitter:
|
|
18133
|
+
_emitter: Y
|
|
18134
18134
|
};
|
|
18135
18135
|
if (a)
|
|
18136
18136
|
return {
|
|
@@ -18139,7 +18139,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18139
18139
|
illegal: !1,
|
|
18140
18140
|
relevance: 0,
|
|
18141
18141
|
errorRaised: k,
|
|
18142
|
-
_emitter:
|
|
18142
|
+
_emitter: Y,
|
|
18143
18143
|
_top: S
|
|
18144
18144
|
};
|
|
18145
18145
|
throw k;
|
|
@@ -18157,20 +18157,20 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18157
18157
|
}
|
|
18158
18158
|
function u(v, y) {
|
|
18159
18159
|
y = y || r.languages || Object.keys(e);
|
|
18160
|
-
const M = d(v), N = y.filter(E).filter(
|
|
18161
|
-
(
|
|
18160
|
+
const M = d(v), N = y.filter(E).filter(X).map(
|
|
18161
|
+
(te) => m(te, v, !1)
|
|
18162
18162
|
);
|
|
18163
18163
|
N.unshift(M);
|
|
18164
|
-
const K = N.sort((
|
|
18165
|
-
if (
|
|
18166
|
-
if (
|
|
18167
|
-
if (E(
|
|
18164
|
+
const K = N.sort((te, pe) => {
|
|
18165
|
+
if (te.relevance !== pe.relevance) return pe.relevance - te.relevance;
|
|
18166
|
+
if (te.language && pe.language) {
|
|
18167
|
+
if (E(te.language).supersetOf === pe.language)
|
|
18168
18168
|
return 1;
|
|
18169
|
-
if (E(
|
|
18169
|
+
if (E(pe.language).supersetOf === te.language)
|
|
18170
18170
|
return -1;
|
|
18171
18171
|
}
|
|
18172
18172
|
return 0;
|
|
18173
|
-
}), [
|
|
18173
|
+
}), [ne, ge] = K, we = ne;
|
|
18174
18174
|
return we.secondBest = ge, we;
|
|
18175
18175
|
}
|
|
18176
18176
|
function g(v, y, M) {
|
|
@@ -18237,9 +18237,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18237
18237
|
throw N;
|
|
18238
18238
|
M = i;
|
|
18239
18239
|
}
|
|
18240
|
-
M.name || (M.name = v), e[v] = M, M.rawDefinition = y.bind(null, o), M.aliases &&
|
|
18240
|
+
M.name || (M.name = v), e[v] = M, M.rawDefinition = y.bind(null, o), M.aliases && q(M.aliases, { languageName: v });
|
|
18241
18241
|
}
|
|
18242
|
-
function
|
|
18242
|
+
function R(v) {
|
|
18243
18243
|
delete e[v];
|
|
18244
18244
|
for (const y of Object.keys(t))
|
|
18245
18245
|
t[y] === v && delete t[y];
|
|
@@ -18250,16 +18250,16 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18250
18250
|
function E(v) {
|
|
18251
18251
|
return v = (v || "").toLowerCase(), e[v] || e[t[v]];
|
|
18252
18252
|
}
|
|
18253
|
-
function
|
|
18253
|
+
function q(v, { languageName: y }) {
|
|
18254
18254
|
typeof v == "string" && (v = [v]), v.forEach((M) => {
|
|
18255
18255
|
t[M.toLowerCase()] = y;
|
|
18256
18256
|
});
|
|
18257
18257
|
}
|
|
18258
|
-
function
|
|
18258
|
+
function X(v) {
|
|
18259
18259
|
const y = E(v);
|
|
18260
18260
|
return y && !y.disableAutodetect;
|
|
18261
18261
|
}
|
|
18262
|
-
function
|
|
18262
|
+
function P(v) {
|
|
18263
18263
|
v["before:highlightBlock"] && !v["before:highlightElement"] && (v["before:highlightElement"] = (y) => {
|
|
18264
18264
|
v["before:highlightBlock"](
|
|
18265
18265
|
Object.assign({ block: y.el }, y)
|
|
@@ -18270,10 +18270,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18270
18270
|
);
|
|
18271
18271
|
});
|
|
18272
18272
|
}
|
|
18273
|
-
function
|
|
18274
|
-
|
|
18273
|
+
function V(v) {
|
|
18274
|
+
P(v), n.push(v);
|
|
18275
18275
|
}
|
|
18276
|
-
function
|
|
18276
|
+
function Q(v) {
|
|
18277
18277
|
const y = n.indexOf(v);
|
|
18278
18278
|
y !== -1 && n.splice(y, 1);
|
|
18279
18279
|
}
|
|
@@ -18297,14 +18297,14 @@ https://github.com/highlightjs/highlight.js/issues/2277`), K = v, N = y), M ===
|
|
|
18297
18297
|
initHighlighting: j,
|
|
18298
18298
|
initHighlightingOnLoad: w,
|
|
18299
18299
|
registerLanguage: _,
|
|
18300
|
-
unregisterLanguage:
|
|
18300
|
+
unregisterLanguage: R,
|
|
18301
18301
|
listLanguages: U,
|
|
18302
18302
|
getLanguage: E,
|
|
18303
|
-
registerAliases:
|
|
18304
|
-
autoDetection:
|
|
18303
|
+
registerAliases: q,
|
|
18304
|
+
autoDetection: X,
|
|
18305
18305
|
inherit: oc,
|
|
18306
|
-
addPlugin:
|
|
18307
|
-
removePlugin:
|
|
18306
|
+
addPlugin: V,
|
|
18307
|
+
removePlugin: Q
|
|
18308
18308
|
}), o.debugMode = function() {
|
|
18309
18309
|
a = !1;
|
|
18310
18310
|
}, o.safeMode = function() {
|
|
@@ -18669,7 +18669,7 @@ Ge.prototype = {
|
|
|
18669
18669
|
return a.j[o] = i, i;
|
|
18670
18670
|
}
|
|
18671
18671
|
};
|
|
18672
|
-
const
|
|
18672
|
+
const ee = (o, e, t, n, a) => o.ta(e, t, n, a), pt = (o, e, t, n, a) => o.tr(e, t, n, a), ic = (o, e, t, n, a) => o.ts(e, t, n, a), O = (o, e, t, n, a) => o.tt(e, t, n, a), zt = "WORD", pr = "UWORD", ta = "LOCALHOST", cr = "TLD", mr = "UTLD", Ta = "SCHEME", Qo = "SLASH_SCHEME", ol = "NUM", pu = "WS", nl = "NL", Nn = "OPENBRACE", Bn = "CLOSEBRACE", as = "OPENBRACKET", ss = "CLOSEBRACKET", is = "OPENPAREN", rs = "CLOSEPAREN", ls = "OPENANGLEBRACKET", ps = "CLOSEANGLEBRACKET", cs = "FULLWIDTHLEFTPAREN", ms = "FULLWIDTHRIGHTPAREN", ds = "LEFTCORNERBRACKET", us = "RIGHTCORNERBRACKET", gs = "LEFTWHITECORNERBRACKET", fs = "RIGHTWHITECORNERBRACKET", hs = "FULLWIDTHLESSTHAN", bs = "FULLWIDTHGREATERTHAN", vs = "AMPERSAND", js = "APOSTROPHE", ks = "ASTERISK", eo = "AT", ys = "BACKSLASH", _s = "BACKTICK", Ds = "CARET", oo = "COLON", al = "COMMA", ws = "DOLLAR", Ct = "DOT", Is = "EQUALS", sl = "EXCLAMATION", xt = "HYPHEN", Es = "PERCENT", Cs = "PIPE", xs = "PLUS", Ss = "POUND", Ms = "QUERY", il = "QUOTE", rl = "SEMI", St = "SLASH", Rn = "TILDE", Fs = "UNDERSCORE", cu = "EMOJI", Os = "SYM";
|
|
18673
18673
|
var mu = /* @__PURE__ */ Object.freeze({
|
|
18674
18674
|
__proto__: null,
|
|
18675
18675
|
WORD: zt,
|
|
@@ -18760,16 +18760,16 @@ function S0(o) {
|
|
|
18760
18760
|
pt(l, Mi, r);
|
|
18761
18761
|
const p = [[Jo, a]], c = [[Jo, null], [Si, s]];
|
|
18762
18762
|
for (let m = 0; m < Da.length; m++)
|
|
18763
|
-
|
|
18763
|
+
Yt(t, Da[m], cr, zt, p);
|
|
18764
18764
|
for (let m = 0; m < wa.length; m++)
|
|
18765
|
-
|
|
18765
|
+
Yt(t, wa[m], mr, pr, c);
|
|
18766
18766
|
Io(cr, {
|
|
18767
18767
|
tld: !0,
|
|
18768
18768
|
ascii: !0
|
|
18769
18769
|
}, e), Io(mr, {
|
|
18770
18770
|
utld: !0,
|
|
18771
18771
|
alpha: !0
|
|
18772
|
-
}, e),
|
|
18772
|
+
}, e), Yt(t, "file", Ta, zt, p), Yt(t, "mailto", Ta, zt, p), Yt(t, "http", Qo, zt, p), Yt(t, "https", Qo, zt, p), Yt(t, "ftp", Qo, zt, p), Yt(t, "ftps", Qo, zt, p), Io(Ta, {
|
|
18773
18773
|
scheme: !0,
|
|
18774
18774
|
ascii: !0
|
|
18775
18775
|
}, e), Io(Qo, {
|
|
@@ -18822,7 +18822,7 @@ function F0(o) {
|
|
|
18822
18822
|
}
|
|
18823
18823
|
return e;
|
|
18824
18824
|
}
|
|
18825
|
-
function
|
|
18825
|
+
function Yt(o, e, t, n, a) {
|
|
18826
18826
|
let s;
|
|
18827
18827
|
const i = e.length;
|
|
18828
18828
|
for (let r = 0; r < i - 1; r++) {
|
|
@@ -19086,34 +19086,34 @@ function A0(o) {
|
|
|
19086
19086
|
groups: e
|
|
19087
19087
|
} = o;
|
|
19088
19088
|
const t = e.domain.concat([vs, ks, eo, ys, _s, Ds, ws, Is, xt, ol, Es, Cs, xs, Ss, St, Os, Rn, Fs]), n = [js, oo, al, Ct, sl, Ms, il, rl, ls, ps, Nn, Bn, ss, as, is, rs, cs, ms, ds, us, gs, fs, hs, bs], a = [vs, js, ks, ys, _s, Ds, ws, Is, xt, Nn, Bn, Es, Cs, xs, Ss, Ms, St, Os, Rn, Fs], s = ct(), i = O(s, Rn);
|
|
19089
|
-
|
|
19089
|
+
ee(i, a, i), ee(i, e.domain, i);
|
|
19090
19090
|
const r = ct(), l = ct(), p = ct();
|
|
19091
|
-
|
|
19091
|
+
ee(s, e.domain, r), ee(s, e.scheme, l), ee(s, e.slashscheme, p), ee(r, a, i), ee(r, e.domain, r);
|
|
19092
19092
|
const c = O(r, eo);
|
|
19093
19093
|
O(i, eo, c), O(l, eo, c), O(p, eo, c);
|
|
19094
19094
|
const m = O(i, Ct);
|
|
19095
|
-
|
|
19095
|
+
ee(m, a, i), ee(m, e.domain, i);
|
|
19096
19096
|
const d = ct();
|
|
19097
|
-
|
|
19097
|
+
ee(c, e.domain, d), ee(d, e.domain, d);
|
|
19098
19098
|
const u = O(d, Ct);
|
|
19099
|
-
|
|
19099
|
+
ee(u, e.domain, d);
|
|
19100
19100
|
const g = ct(mc);
|
|
19101
|
-
|
|
19101
|
+
ee(u, e.tld, g), ee(u, e.utld, g), O(c, ta, g);
|
|
19102
19102
|
const f = O(d, xt);
|
|
19103
|
-
|
|
19103
|
+
ee(f, e.domain, d), ee(g, e.domain, d), O(g, Ct, u), O(g, xt, f);
|
|
19104
19104
|
const h = O(g, oo);
|
|
19105
|
-
|
|
19105
|
+
ee(h, e.numeric, mc);
|
|
19106
19106
|
const j = O(r, xt), w = O(r, Ct);
|
|
19107
|
-
|
|
19107
|
+
ee(j, e.domain, r), ee(w, a, i), ee(w, e.domain, r);
|
|
19108
19108
|
const x = ct(Ia);
|
|
19109
|
-
|
|
19109
|
+
ee(w, e.tld, x), ee(w, e.utld, x), ee(x, e.domain, r), ee(x, a, i), O(x, Ct, w), O(x, xt, j), O(x, eo, c);
|
|
19110
19110
|
const b = O(x, oo), A = ct(Ia);
|
|
19111
|
-
|
|
19112
|
-
const _ = ct(Ia),
|
|
19113
|
-
|
|
19114
|
-
const U = O(l, oo), E = O(p, oo),
|
|
19115
|
-
|
|
19116
|
-
const
|
|
19111
|
+
ee(b, e.numeric, A);
|
|
19112
|
+
const _ = ct(Ia), R = ct();
|
|
19113
|
+
ee(_, t, _), ee(_, n, R), ee(R, t, _), ee(R, n, R), O(x, St, _), O(A, St, _);
|
|
19114
|
+
const U = O(l, oo), E = O(p, oo), q = O(E, St), X = O(q, St);
|
|
19115
|
+
ee(l, e.domain, r), O(l, Ct, w), O(l, xt, j), ee(p, e.domain, r), O(p, Ct, w), O(p, xt, j), ee(U, e.domain, _), O(U, St, _), ee(X, e.domain, _), ee(X, t, _), O(X, St, _);
|
|
19116
|
+
const P = [
|
|
19117
19117
|
[Nn, Bn],
|
|
19118
19118
|
// {}
|
|
19119
19119
|
[as, ss],
|
|
@@ -19131,13 +19131,13 @@ function A0(o) {
|
|
|
19131
19131
|
[hs, bs]
|
|
19132
19132
|
// <>
|
|
19133
19133
|
];
|
|
19134
|
-
for (let
|
|
19135
|
-
const [
|
|
19136
|
-
O(
|
|
19134
|
+
for (let V = 0; V < P.length; V++) {
|
|
19135
|
+
const [Q, ae] = P[V], le = O(_, Q);
|
|
19136
|
+
O(R, Q, le), O(le, ae, _);
|
|
19137
19137
|
const v = ct(Ia);
|
|
19138
|
-
|
|
19138
|
+
ee(le, t, v);
|
|
19139
19139
|
const y = ct();
|
|
19140
|
-
|
|
19140
|
+
ee(le, n), ee(v, t, v), ee(v, n, y), ee(y, t, v), ee(y, n, y), O(v, ae, _), O(y, ae, _);
|
|
19141
19141
|
}
|
|
19142
19142
|
return O(s, ta, x), O(s, nl, O0), {
|
|
19143
19143
|
start: s,
|
|
@@ -19455,7 +19455,7 @@ const q0 = Nt.create({
|
|
|
19455
19455
|
const { from: l, to: p } = r, c = Math.min(l, p), m = Math.max(l, p);
|
|
19456
19456
|
if (n < c || n > m)
|
|
19457
19457
|
return;
|
|
19458
|
-
const d = Nr(t.state, "_blank"), u = event.target, g = s.resolve(c), f = s.resolve(m), h = i.setSelection(new
|
|
19458
|
+
const d = Nr(t.state, "_blank"), u = event.target, g = s.resolve(c), f = s.resolve(m), h = i.setSelection(new J(g, f));
|
|
19459
19459
|
U0(u, d, o), t.dispatch(h);
|
|
19460
19460
|
}
|
|
19461
19461
|
}
|
|
@@ -19468,7 +19468,7 @@ function U0(o, e, t) {
|
|
|
19468
19468
|
const n = document.createElement("div"), a = document.createElement("input");
|
|
19469
19469
|
a.setAttribute("class", "sus-link-input"), a.setAttribute("placeholder", "编辑网址"), a.value = (o == null ? void 0 : o.href) ?? e.href, a.addEventListener("blur", (s) => {
|
|
19470
19470
|
t.commands.updateAttributes("link", { href: a.value });
|
|
19471
|
-
}), n.append(a), fc =
|
|
19471
|
+
}), n.append(a), fc = Gt("body", {
|
|
19472
19472
|
duration: 0,
|
|
19473
19473
|
getReferenceClientRect: () => o.getBoundingClientRect(),
|
|
19474
19474
|
content: n,
|
|
@@ -19480,18 +19480,18 @@ function U0(o, e, t) {
|
|
|
19480
19480
|
theme: "light-border"
|
|
19481
19481
|
})[0], fc.show();
|
|
19482
19482
|
}
|
|
19483
|
-
const fu = (o) => (jc("data-v-
|
|
19483
|
+
const fu = (o) => (jc("data-v-0ff46a3f"), o = o(), kc(), o), K0 = { class: "sus-comment relative flex flex-row w-full" }, G0 = { class: "sus-comment-avatar" }, J0 = ["src"], Y0 = { class: "sus-comment__main" }, X0 = { class: "sus-comment__info my-1" }, Z0 = { class: "sus-comment__info-input" }, Q0 = {
|
|
19484
19484
|
class: "sus-comment__info-input",
|
|
19485
19485
|
"data-tippy-content": "点击昵称时可跳转"
|
|
19486
19486
|
}, e6 = ["data-tippy-content"], t6 = { class: "relative" }, o6 = { class: "sus-comment__footer flex justify-between" }, n6 = { class: "flex flex-row items-center" }, a6 = {
|
|
19487
19487
|
key: 0,
|
|
19488
19488
|
class: "p-1"
|
|
19489
|
-
}, s6 = /* @__PURE__ */ dr('<g fill="none" data-v-
|
|
19489
|
+
}, s6 = /* @__PURE__ */ dr('<g fill="none" data-v-0ff46a3f><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M9 16c.85.63 1.885 1 3 1s2.15-.37 3-1" data-v-0ff46a3f></path><path fill="currentColor" d="M16 10.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5s.448-1.5 1-1.5s1 .672 1 1.5" data-v-0ff46a3f></path><ellipse cx="9" cy="10.5" fill="currentColor" rx="1" ry="1.5" data-v-0ff46a3f></ellipse><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5" data-v-0ff46a3f></path></g>', 1), i6 = [
|
|
19490
19490
|
s6
|
|
19491
19491
|
], r6 = {
|
|
19492
19492
|
key: 1,
|
|
19493
19493
|
class: "sus-upload p-1"
|
|
19494
|
-
}, l6 = /* @__PURE__ */ dr('<label for="upload-input" data-v-
|
|
19494
|
+
}, l6 = /* @__PURE__ */ dr('<label for="upload-input" data-v-0ff46a3f><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-0ff46a3f><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5" data-v-0ff46a3f><path d="m2 12.5l1.752-1.533a2.3 2.3 0 0 1 3.14.105l4.29 4.29a2 2 0 0 0 2.564.222l.299-.21a3 3 0 0 1 3.731.225L21 18.5m-6-13h3.5m0 0H22m-3.5 0V9m0-3.5V2" data-v-0ff46a3f></path><path d="M22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12c0-1.128 0-2.122.02-3M12 2C7.286 2 4.929 2 3.464 3.464c-.424.425-.726.925-.94 1.536" data-v-0ff46a3f></path></g></svg></label>', 1), p6 = {
|
|
19495
19495
|
"data-tippy-content": "收到回复后通知",
|
|
19496
19496
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19497
19497
|
viewBox: "0 0 24 24"
|
|
@@ -19520,9 +19520,9 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19520
19520
|
/* @__PURE__ */ H("path", { d: "M7.5 19c.655 1.748 2.422 3 4.5 3q.367 0 .72-.05M16.5 19a4.5 4.5 0 0 1-1.302 1.84M9.107 2.674A6.5 6.5 0 0 1 12 2c3.727 0 6.75 3.136 6.75 7.005v.705a4.4 4.4 0 0 0 .692 2.375l1.108 1.724c1.011 1.575.239 3.716-1.52 4.214a25.8 25.8 0 0 1-14.06 0c-1.759-.498-2.531-2.639-1.52-4.213l1.108-1.725A4.4 4.4 0 0 0 5.25 9.71v-.705c0-1.074.233-2.092.65-3.002" })
|
|
19521
19521
|
], -1)), g6 = [
|
|
19522
19522
|
u6
|
|
19523
|
-
], f6 = { class: "sus-comment__extend flex" }, h6 = ["src"], b6 = ["onClick"], v6 = /* @__PURE__ */ dr('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-
|
|
19523
|
+
], f6 = { class: "sus-comment__extend flex" }, h6 = ["src"], b6 = ["onClick"], v6 = /* @__PURE__ */ dr('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-0ff46a3f><g fill="none" stroke="currentColor" stroke-width="1.5" data-v-0ff46a3f><path stroke-linecap="round" d="M20.5 6h-17m6 5l.5 5m4.5-5l-.5 5" data-v-0ff46a3f></path><path d="M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6" data-v-0ff46a3f></path><path stroke-linecap="round" d="M18.374 15.4c-.177 2.654-.266 3.981-1.131 4.79s-2.195.81-4.856.81h-.774c-2.66 0-3.99 0-4.856-.81c-.865-.809-.953-2.136-1.13-4.79l-.46-6.9m13.666 0l-.2 3" data-v-0ff46a3f></path></g></svg>', 1), j6 = [
|
|
19524
19524
|
v6
|
|
19525
|
-
], k6 = /* @__PURE__ */
|
|
19525
|
+
], k6 = /* @__PURE__ */ jt({
|
|
19526
19526
|
__name: "index",
|
|
19527
19527
|
props: {
|
|
19528
19528
|
reply: {},
|
|
@@ -19537,27 +19537,27 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19537
19537
|
},
|
|
19538
19538
|
emits: ["on-save", "on-cancel", "add-image"],
|
|
19539
19539
|
setup(o, { expose: e, emit: t }) {
|
|
19540
|
-
var
|
|
19540
|
+
var X;
|
|
19541
19541
|
class n {
|
|
19542
19542
|
constructor() {
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
|
|
19551
|
-
|
|
19552
|
-
|
|
19543
|
+
kt(this, "articleId", "");
|
|
19544
|
+
kt(this, "userName", "");
|
|
19545
|
+
kt(this, "userEmail", "");
|
|
19546
|
+
kt(this, "userWebsite", "");
|
|
19547
|
+
kt(this, "userAvatar", "");
|
|
19548
|
+
kt(this, "content", "");
|
|
19549
|
+
kt(this, "contentText", "");
|
|
19550
|
+
kt(this, "replyName", "");
|
|
19551
|
+
kt(this, "parentId", "");
|
|
19552
|
+
kt(this, "notify", 0);
|
|
19553
19553
|
}
|
|
19554
19554
|
}
|
|
19555
19555
|
const a = o;
|
|
19556
19556
|
e({
|
|
19557
19557
|
updateImage: b,
|
|
19558
|
-
updatePreviewImage:
|
|
19558
|
+
updatePreviewImage: _
|
|
19559
19559
|
});
|
|
19560
|
-
const s = t, i = a.emojiList, r = (
|
|
19560
|
+
const s = t, i = a.emojiList, r = (X = a.reply) == null ? void 0 : X.userName, l = $e("在此处留下你的足迹吧!(支持markdown语法)"), p = bc(new n()), c = $e(""), m = $e(""), d = $e(!1), u = $e(null), g = $e([]), f = $e(null), h = Qj({
|
|
19561
19561
|
extensions: [
|
|
19562
19562
|
ek,
|
|
19563
19563
|
ok,
|
|
@@ -19583,8 +19583,8 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19583
19583
|
async function j() {
|
|
19584
19584
|
if (!(!h || !h.value)) {
|
|
19585
19585
|
if (c.value = h.value.getHTML(), p.userWebsite && (p.userWebsite.concat("http://") || p.userWebsite.concat("https://") || (p.userWebsite = "https://" + p.userWebsite)), localStorage.setItem("user", JSON.stringify(p)), localStorage.setItem("comment-content", c.value), a.reply.id != "0") {
|
|
19586
|
-
const
|
|
19587
|
-
p.parentId =
|
|
19586
|
+
const P = a.reply.parentId;
|
|
19587
|
+
p.parentId = P === "0" ? a.reply.id : P, p.replyName = a.reply.userName, l.value = "@" + r + ":";
|
|
19588
19588
|
}
|
|
19589
19589
|
p.content = c.value, p.contentText = h.value.getText(), s("on-save", p, f.value);
|
|
19590
19590
|
}
|
|
@@ -19595,68 +19595,81 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19595
19595
|
function x() {
|
|
19596
19596
|
s("add-image", u.value, f.value);
|
|
19597
19597
|
}
|
|
19598
|
-
function b(
|
|
19599
|
-
f.value || (f.value = []), f.value.
|
|
19600
|
-
for (let
|
|
19601
|
-
g.value.push(URL.createObjectURL(f.value[
|
|
19598
|
+
function b(P) {
|
|
19599
|
+
f.value || (f.value = []), !f.value || f.value.length == 0 ? f.value = P : f.value = A(f.value, P[0]), g.value = [];
|
|
19600
|
+
for (let V = 0; V < f.value.length; V++)
|
|
19601
|
+
g.value.push(URL.createObjectURL(f.value[V]));
|
|
19602
19602
|
}
|
|
19603
|
-
function A(
|
|
19604
|
-
|
|
19603
|
+
function A(P, V) {
|
|
19604
|
+
return [...P, V];
|
|
19605
19605
|
}
|
|
19606
|
-
function _() {
|
|
19607
|
-
|
|
19608
|
-
p.userEmail.trim().endsWith("@qq.com") && !p.userAvatar && (m.value = "https://thirdqq.qlogo.cn/g?b=sdk&nk=" + ((B = p.userEmail) == null ? void 0 : B.replace("@qq.com", "").trim()) + "&s=140");
|
|
19606
|
+
function _(P) {
|
|
19607
|
+
g.value = P;
|
|
19609
19608
|
}
|
|
19610
|
-
function
|
|
19609
|
+
function R() {
|
|
19610
|
+
var P;
|
|
19611
|
+
p.userEmail.trim().endsWith("@qq.com") && !p.userAvatar && (m.value = "https://thirdqq.qlogo.cn/g?b=sdk&nk=" + ((P = p.userEmail) == null ? void 0 : P.replace("@qq.com", "").trim()) + "&s=140");
|
|
19612
|
+
}
|
|
19613
|
+
function U() {
|
|
19611
19614
|
p.notify == 1 ? p.notify = 0 : p.notify = 1;
|
|
19612
19615
|
}
|
|
19613
|
-
function
|
|
19614
|
-
!h || !h.value || (h.value.chain().focus().setEmoji(
|
|
19616
|
+
function E(P) {
|
|
19617
|
+
!h || !h.value || (h.value.chain().focus().setEmoji(P.shortcodes[0]).run(), d.value = !1);
|
|
19615
19618
|
}
|
|
19616
|
-
function
|
|
19617
|
-
var
|
|
19618
|
-
|
|
19619
|
+
function q(P) {
|
|
19620
|
+
var V;
|
|
19621
|
+
try {
|
|
19622
|
+
if (!f.value || !f.value.length || f.value.length <= 1) {
|
|
19623
|
+
f.value = [], g.value = [];
|
|
19624
|
+
return;
|
|
19625
|
+
}
|
|
19626
|
+
(V = f.value) == null || V.splice(P, 1), g.value.splice(P, 1);
|
|
19627
|
+
} catch (Q) {
|
|
19628
|
+
console.log(Q), f.value = [], g.value = [];
|
|
19629
|
+
}
|
|
19619
19630
|
}
|
|
19620
19631
|
return na(() => {
|
|
19621
19632
|
if (!h || !h.value)
|
|
19622
19633
|
return;
|
|
19623
|
-
const
|
|
19624
|
-
if (
|
|
19625
|
-
const
|
|
19626
|
-
p.userName =
|
|
19634
|
+
const P = localStorage.getItem("user"), V = localStorage.getItem("comment-content");
|
|
19635
|
+
if (V && h.value.commands.setContent(V), P) {
|
|
19636
|
+
const Q = JSON.parse(P);
|
|
19637
|
+
p.userName = Q.userName, p.userEmail = Q.userEmail, p.userWebsite = Q.userWebsite, R();
|
|
19627
19638
|
}
|
|
19628
|
-
p.notify = 1,
|
|
19629
|
-
}), (
|
|
19630
|
-
H("div", G0, [
|
|
19631
|
-
|
|
19639
|
+
p.notify = 1, Gt("[data-tippy-content]");
|
|
19640
|
+
}), (P, V) => (re(), ce("div", K0, [
|
|
19641
|
+
mt(H("div", G0, [
|
|
19642
|
+
mt(H("img", {
|
|
19632
19643
|
alt: "头像",
|
|
19633
19644
|
src: m.value,
|
|
19634
19645
|
class: "sus-avatar",
|
|
19635
19646
|
onerror: "this.onerror=null,this.src='/error.webp'"
|
|
19636
19647
|
}, null, 8, J0), [
|
|
19637
|
-
[
|
|
19648
|
+
[$t, !!m.value]
|
|
19638
19649
|
]),
|
|
19639
|
-
|
|
19640
|
-
[
|
|
19650
|
+
mt(H("span", { class: "sus-avatar-text flex w-full h-full items-center justify-center" }, Ke(p.userName.charAt(0)), 513), [
|
|
19651
|
+
[$t, !m.value]
|
|
19641
19652
|
])
|
|
19653
|
+
], 512), [
|
|
19654
|
+
[$t, P.showUserInfo]
|
|
19642
19655
|
]),
|
|
19643
19656
|
H("div", Y0, [
|
|
19644
|
-
|
|
19657
|
+
mt(H("div", X0, [
|
|
19645
19658
|
H("div", Z0, [
|
|
19646
|
-
|
|
19659
|
+
mt(H("input", {
|
|
19647
19660
|
class: "sus-input sus-username",
|
|
19648
19661
|
placeholder: "昵称(必填)",
|
|
19649
|
-
"onUpdate:modelValue":
|
|
19662
|
+
"onUpdate:modelValue": V[0] || (V[0] = (Q) => p.userName = Q),
|
|
19650
19663
|
maxlength: "23"
|
|
19651
19664
|
}, null, 512), [
|
|
19652
19665
|
[ti, p.userName]
|
|
19653
19666
|
])
|
|
19654
19667
|
]),
|
|
19655
19668
|
H("div", Q0, [
|
|
19656
|
-
|
|
19669
|
+
mt(H("input", {
|
|
19657
19670
|
class: "sus-input sus-web",
|
|
19658
19671
|
placeholder: "网址(https://)",
|
|
19659
|
-
"onUpdate:modelValue":
|
|
19672
|
+
"onUpdate:modelValue": V[1] || (V[1] = (Q) => p.userWebsite = Q),
|
|
19660
19673
|
maxlength: "35"
|
|
19661
19674
|
}, null, 512), [
|
|
19662
19675
|
[ti, p.userWebsite]
|
|
@@ -19664,28 +19677,28 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19664
19677
|
]),
|
|
19665
19678
|
H("div", {
|
|
19666
19679
|
class: "sus-comment__info-input",
|
|
19667
|
-
"data-tippy-content":
|
|
19680
|
+
"data-tippy-content": P.mailTips
|
|
19668
19681
|
}, [
|
|
19669
|
-
|
|
19670
|
-
onBlur:
|
|
19682
|
+
mt(H("input", {
|
|
19683
|
+
onBlur: R,
|
|
19671
19684
|
class: "sus-input sus-email",
|
|
19672
19685
|
placeholder: "邮箱(不会公开,仅用于通知回复)",
|
|
19673
|
-
"onUpdate:modelValue":
|
|
19686
|
+
"onUpdate:modelValue": V[2] || (V[2] = (Q) => p.userEmail = Q),
|
|
19674
19687
|
maxlength: "35"
|
|
19675
19688
|
}, null, 544), [
|
|
19676
19689
|
[ti, p.userEmail]
|
|
19677
19690
|
])
|
|
19678
19691
|
], 8, e6)
|
|
19679
19692
|
], 512), [
|
|
19680
|
-
[
|
|
19693
|
+
[$t, P.showUserInfo]
|
|
19681
19694
|
]),
|
|
19682
19695
|
H("div", t6, [
|
|
19683
|
-
|
|
19696
|
+
mt(Ai(a1, {
|
|
19684
19697
|
class: "absolute bottom-2 left-1",
|
|
19685
19698
|
emojiList: en(i),
|
|
19686
|
-
onOnselect:
|
|
19699
|
+
onOnselect: E
|
|
19687
19700
|
}, null, 8, ["emojiList"]), [
|
|
19688
|
-
[
|
|
19701
|
+
[$t, d.value]
|
|
19689
19702
|
]),
|
|
19690
19703
|
Ai(en(Zj), {
|
|
19691
19704
|
class: "sus-comment-input",
|
|
@@ -19694,14 +19707,14 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19694
19707
|
]),
|
|
19695
19708
|
H("div", o6, [
|
|
19696
19709
|
H("div", n6, [
|
|
19697
|
-
en(i).length >= 0 ? (
|
|
19698
|
-
(
|
|
19699
|
-
onClick:
|
|
19710
|
+
en(i).length >= 0 ? (re(), ce("div", a6, [
|
|
19711
|
+
(re(), ce("svg", {
|
|
19712
|
+
onClick: V[3] || (V[3] = (Q) => d.value = !d.value),
|
|
19700
19713
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19701
19714
|
viewBox: "0 0 24 24"
|
|
19702
19715
|
}, i6))
|
|
19703
19716
|
])) : Je("", !0),
|
|
19704
|
-
|
|
19717
|
+
P.showImage ? (re(), ce("div", r6, [
|
|
19705
19718
|
H("input", {
|
|
19706
19719
|
ref_key: "imgRef",
|
|
19707
19720
|
ref: u,
|
|
@@ -19713,16 +19726,16 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19713
19726
|
}, null, 544),
|
|
19714
19727
|
l6
|
|
19715
19728
|
])) : Je("", !0),
|
|
19716
|
-
|
|
19729
|
+
P.showNotify ? (re(), ce("div", {
|
|
19717
19730
|
key: 2,
|
|
19718
|
-
onClick:
|
|
19731
|
+
onClick: U,
|
|
19719
19732
|
class: "p-1"
|
|
19720
19733
|
}, [
|
|
19721
|
-
|
|
19722
|
-
[
|
|
19734
|
+
mt((re(), ce("svg", p6, m6, 512)), [
|
|
19735
|
+
[$t, p.notify === 1]
|
|
19723
19736
|
]),
|
|
19724
|
-
|
|
19725
|
-
[
|
|
19737
|
+
mt((re(), ce("svg", d6, g6, 512)), [
|
|
19738
|
+
[$t, p.notify !== 1]
|
|
19726
19739
|
])
|
|
19727
19740
|
])) : Je("", !0)
|
|
19728
19741
|
]),
|
|
@@ -19738,17 +19751,17 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19738
19751
|
])
|
|
19739
19752
|
]),
|
|
19740
19753
|
H("div", f6, [
|
|
19741
|
-
(
|
|
19754
|
+
(re(!0), ce(Pn, null, Ts(g.value, (Q, ae) => (re(), ce("div", {
|
|
19742
19755
|
class: "sus-comment__extend-img relative",
|
|
19743
|
-
key:
|
|
19756
|
+
key: Q
|
|
19744
19757
|
}, [
|
|
19745
19758
|
H("img", {
|
|
19746
19759
|
class: "img-item",
|
|
19747
|
-
src:
|
|
19760
|
+
src: Q,
|
|
19748
19761
|
alt: ""
|
|
19749
19762
|
}, null, 8, h6),
|
|
19750
19763
|
H("div", {
|
|
19751
|
-
onClick: (
|
|
19764
|
+
onClick: (le) => q(ae),
|
|
19752
19765
|
class: "mask"
|
|
19753
19766
|
}, j6, 8, b6)
|
|
19754
19767
|
]))), 128))
|
|
@@ -19756,7 +19769,7 @@ const fu = (o) => (jc("data-v-1fc2e453"), o = o(), kc(), o), K0 = { class: "sus-
|
|
|
19756
19769
|
])
|
|
19757
19770
|
]));
|
|
19758
19771
|
}
|
|
19759
|
-
}), y6 = /* @__PURE__ */ yn(k6, [["__scopeId", "data-v-
|
|
19772
|
+
}), y6 = /* @__PURE__ */ yn(k6, [["__scopeId", "data-v-0ff46a3f"]]);
|
|
19760
19773
|
function _6(o) {
|
|
19761
19774
|
const e = new Date(o), t = e.getFullYear(), n = e.getMonth() + 1, a = e.getDate(), s = /* @__PURE__ */ new Date(), i = s.getFullYear(), r = s.getMonth() + 1, l = s.getDate();
|
|
19762
19775
|
if (i === t && r == n) {
|
|
@@ -19768,7 +19781,7 @@ function _6(o) {
|
|
|
19768
19781
|
}
|
|
19769
19782
|
return i === t ? `${n}月${a}日` : `${t}年${n}月${a}日`;
|
|
19770
19783
|
}
|
|
19771
|
-
const hu = (o) => (jc("data-v-
|
|
19784
|
+
const hu = (o) => (jc("data-v-f96e823b"), o = o(), kc(), o), D6 = { class: "sus-item__container relative" }, w6 = { class: "flex flex-row" }, I6 = { class: "sus-comment-aside" }, E6 = { class: "sus-comment-avatar" }, C6 = ["src"], x6 = { class: "sus-item-floor mt-2" }, S6 = { class: "sus-item__main w-full overflow-hidden" }, M6 = { class: "sus-item__user leading-loose" }, F6 = ["rel", "href"], O6 = {
|
|
19772
19785
|
key: 0,
|
|
19773
19786
|
class: "sus-item-tag mx-1",
|
|
19774
19787
|
title: "博主"
|
|
@@ -19804,7 +19817,7 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19804
19817
|
"stroke-width": "1.5",
|
|
19805
19818
|
d: "M5 2.252c-.774.169-1.359.45-1.828.92C2 4.343 2 6.229 2 10v1c0 2.828 0 4.243.879 5.121C3.757 17 5.172 17 8 17h8c2.828 0 4.243 0 5.121-.879C22 15.243 22 13.828 22 11v-1c0-3.771 0-5.657-1.172-6.828S17.771 2 14 2H9m7 20H8m4-5v5m10-9h-6M2 13h10"
|
|
19806
19819
|
})
|
|
19807
|
-
], -1)), H6 = /* @__PURE__ */
|
|
19820
|
+
], -1)), H6 = /* @__PURE__ */ jt({
|
|
19808
19821
|
__name: "item",
|
|
19809
19822
|
props: {
|
|
19810
19823
|
comment: {},
|
|
@@ -19835,7 +19848,7 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19835
19848
|
}
|
|
19836
19849
|
return na(() => {
|
|
19837
19850
|
c(), l();
|
|
19838
|
-
}), (d, u) => (
|
|
19851
|
+
}), (d, u) => (re(), ce("div", D6, [
|
|
19839
19852
|
H("div", w6, [
|
|
19840
19853
|
H("span", {
|
|
19841
19854
|
onClick: p,
|
|
@@ -19843,16 +19856,16 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19843
19856
|
}, " 回复 "),
|
|
19844
19857
|
H("div", I6, [
|
|
19845
19858
|
H("div", E6, [
|
|
19846
|
-
|
|
19859
|
+
mt(H("img", {
|
|
19847
19860
|
alt: "",
|
|
19848
19861
|
class: "sus-avatar",
|
|
19849
19862
|
src: d.comment.userAvatar,
|
|
19850
19863
|
onerror: "this.onerror=null,this.src='/error.webp'"
|
|
19851
19864
|
}, null, 8, C6), [
|
|
19852
|
-
[
|
|
19865
|
+
[$t, !!d.comment.userAvatar]
|
|
19853
19866
|
]),
|
|
19854
|
-
|
|
19855
|
-
[
|
|
19867
|
+
mt(H("span", { class: "sus-avatar-text flex w-full h-full items-center justify-center" }, Ke(d.comment.userName.charAt(0)), 513), [
|
|
19868
|
+
[$t, !d.comment.userAvatar]
|
|
19856
19869
|
])
|
|
19857
19870
|
]),
|
|
19858
19871
|
H("p", x6, Ke(d.num), 1)
|
|
@@ -19865,8 +19878,8 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19865
19878
|
href: d.comment.userWebsite,
|
|
19866
19879
|
class: vc([d.comment.tagName, "sus-item__user-name font-semibold ml-1 cursor-pointer"])
|
|
19867
19880
|
}, Ke(d.comment.userName), 11, F6),
|
|
19868
|
-
d.comment.tagName === "owner" ? (
|
|
19869
|
-
d.comment.replyName ? (
|
|
19881
|
+
d.comment.tagName === "owner" ? (re(), ce("span", O6, " 博主 ")) : Je("", !0),
|
|
19882
|
+
d.comment.replyName ? (re(), ce("span", A6, "@" + Ke(d.comment.replyName), 1)) : Je("", !0),
|
|
19870
19883
|
H("span", T6, Ke(en(_6)(d.comment.createdDate)), 1)
|
|
19871
19884
|
]),
|
|
19872
19885
|
H("div", N6, [
|
|
@@ -19874,9 +19887,9 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19874
19887
|
ref_key: "contentDom",
|
|
19875
19888
|
ref: n,
|
|
19876
19889
|
class: "sus-item__content-text",
|
|
19877
|
-
innerHTML: d.comment.content
|
|
19890
|
+
innerHTML: d.comment.content + (d.comment.contentExtends || "")
|
|
19878
19891
|
}, null, 8, B6),
|
|
19879
|
-
s.value ? (
|
|
19892
|
+
s.value ? (re(), ce("a", {
|
|
19880
19893
|
key: 0,
|
|
19881
19894
|
ref_key: "showMoreDom",
|
|
19882
19895
|
ref: a,
|
|
@@ -19886,7 +19899,7 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19886
19899
|
])
|
|
19887
19900
|
])
|
|
19888
19901
|
]),
|
|
19889
|
-
d.showFooter && d.comment.area ? (
|
|
19902
|
+
d.showFooter && d.comment.area ? (re(), ce("div", R6, [
|
|
19890
19903
|
H("span", P6, [
|
|
19891
19904
|
L6,
|
|
19892
19905
|
Na(" " + Ke(d.comment.area), 1)
|
|
@@ -19898,10 +19911,10 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19898
19911
|
])) : Je("", !0)
|
|
19899
19912
|
]));
|
|
19900
19913
|
}
|
|
19901
|
-
}), Ea = /* @__PURE__ */ yn(H6, [["__scopeId", "data-v-
|
|
19914
|
+
}), Ea = /* @__PURE__ */ yn(H6, [["__scopeId", "data-v-f96e823b"]]), V6 = { class: "sus-comment__item" }, q6 = { class: "sus-comment__item-child" }, W6 = { key: 2 }, U6 = {
|
|
19902
19915
|
key: 0,
|
|
19903
19916
|
class: "sus-comment__item-footer flex justify-center w-full cursor-pointer"
|
|
19904
|
-
}, K6 = /* @__PURE__ */
|
|
19917
|
+
}, K6 = /* @__PURE__ */ jt({
|
|
19905
19918
|
__name: "index",
|
|
19906
19919
|
props: {
|
|
19907
19920
|
comment: {},
|
|
@@ -19916,7 +19929,7 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19916
19929
|
}
|
|
19917
19930
|
return (s, i) => {
|
|
19918
19931
|
var r, l, p;
|
|
19919
|
-
return
|
|
19932
|
+
return re(), ce("div", V6, [
|
|
19920
19933
|
Ai(Ea, {
|
|
19921
19934
|
comment: s.comment,
|
|
19922
19935
|
onOnReply: i[0] || (i[0] = (c) => a(s.comment)),
|
|
@@ -19924,7 +19937,7 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19924
19937
|
showFooter: s.showFooter
|
|
19925
19938
|
}, null, 8, ["comment", "lineHeight", "showFooter"]),
|
|
19926
19939
|
H("div", q6, [
|
|
19927
|
-
((r = s.comment.child) == null ? void 0 : r.length) > 0 ? (
|
|
19940
|
+
((r = s.comment.child) == null ? void 0 : r.length) > 0 ? (re(), oi(Ea, {
|
|
19928
19941
|
key: 0,
|
|
19929
19942
|
onOnReply: i[1] || (i[1] = (c) => a(s.comment.child[0])),
|
|
19930
19943
|
comment: s.comment.child[0],
|
|
@@ -19933,7 +19946,7 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19933
19946
|
lineHeight: s.lineHeight,
|
|
19934
19947
|
class: "sus-comment__item-child__item"
|
|
19935
19948
|
}, null, 8, ["comment", "showFooter", "lineHeight"])) : Je("", !0),
|
|
19936
|
-
((l = s.comment.child) == null ? void 0 : l.length) > 1 ? (
|
|
19949
|
+
((l = s.comment.child) == null ? void 0 : l.length) > 1 ? (re(), oi(Ea, {
|
|
19937
19950
|
key: 1,
|
|
19938
19951
|
onOnReply: i[2] || (i[2] = (c) => a(s.comment.child[1])),
|
|
19939
19952
|
comment: s.comment.child[1],
|
|
@@ -19942,14 +19955,14 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19942
19955
|
lineHeight: s.lineHeight,
|
|
19943
19956
|
class: "sus-comment__item-child__item"
|
|
19944
19957
|
}, null, 8, ["comment", "showFooter", "lineHeight"])) : Je("", !0),
|
|
19945
|
-
((p = s.comment.child) == null ? void 0 : p.length) > 2 ? (
|
|
19946
|
-
t.value ? Je("", !0) : (
|
|
19958
|
+
((p = s.comment.child) == null ? void 0 : p.length) > 2 ? (re(), ce("div", W6, [
|
|
19959
|
+
t.value ? Je("", !0) : (re(), ce("div", U6, [
|
|
19947
19960
|
H("p", {
|
|
19948
19961
|
class: "sus-load-more",
|
|
19949
19962
|
onClick: i[3] || (i[3] = (c) => t.value = !0)
|
|
19950
19963
|
}, " 查看更多回复 > ")
|
|
19951
19964
|
])),
|
|
19952
|
-
t.value ? (
|
|
19965
|
+
t.value ? (re(!0), ce(Pn, { key: 1 }, Ts(s.comment.child.slice(2), (c, m) => (re(), oi(Ea, {
|
|
19953
19966
|
onOnReply: (d) => a(c),
|
|
19954
19967
|
key: m,
|
|
19955
19968
|
comment: c,
|
|
@@ -19966,16 +19979,16 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19966
19979
|
}), G6 = /* @__PURE__ */ yn(K6, [["__scopeId", "data-v-394137ac"]]), J6 = { class: "sus-top-item flex items-start p-1.5 overflow-hidden" }, Y6 = { class: "sus-top-item__info flex flex-col mr-1" }, X6 = { class: "sus-top-item__user whitespace-nowrap" }, Z6 = {
|
|
19967
19980
|
key: 0,
|
|
19968
19981
|
class: "sus-top-item__reply whitespace-nowrap"
|
|
19969
|
-
}, Q6 = ["innerHTML"], e_ = /* @__PURE__ */
|
|
19982
|
+
}, Q6 = ["innerHTML"], e_ = /* @__PURE__ */ jt({
|
|
19970
19983
|
__name: "simple",
|
|
19971
19984
|
props: {
|
|
19972
19985
|
comment: {}
|
|
19973
19986
|
},
|
|
19974
19987
|
setup(o) {
|
|
19975
|
-
return (e, t) => (
|
|
19988
|
+
return (e, t) => (re(), ce("div", J6, [
|
|
19976
19989
|
H("div", Y6, [
|
|
19977
19990
|
H("span", X6, Ke(e.comment.userName) + ": ", 1),
|
|
19978
|
-
e.comment.replyName ? (
|
|
19991
|
+
e.comment.replyName ? (re(), ce("span", Z6, Ke("@" + e.comment.replyName), 1)) : Je("", !0)
|
|
19979
19992
|
]),
|
|
19980
19993
|
H("span", {
|
|
19981
19994
|
class: "sus-top-item__content w-full",
|
|
@@ -19983,10 +19996,10 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19983
19996
|
}, null, 8, Q6)
|
|
19984
19997
|
]));
|
|
19985
19998
|
}
|
|
19986
|
-
}), t_ = /* @__PURE__ */ yn(e_, [["__scopeId", "data-v-
|
|
19999
|
+
}), t_ = /* @__PURE__ */ yn(e_, [["__scopeId", "data-v-b136418d"]]), o_ = { class: "sus-top-item__user flex items-center" }, n_ = {
|
|
19987
20000
|
key: 0,
|
|
19988
20001
|
class: "sus-top-item__user-avatar ml-1 mr-2"
|
|
19989
|
-
}, a_ = ["src"], s_ = { class: "sus-top-item__user-owner" }, i_ = { class: "sus-top-item__user-reply ml-3 opacity-70" }, r_ = ["innerHTML"], l_ = /* @__PURE__ */
|
|
20002
|
+
}, a_ = ["src"], s_ = { class: "sus-top-item__user-owner" }, i_ = { class: "sus-top-item__user-reply ml-3 opacity-70" }, r_ = ["innerHTML"], l_ = /* @__PURE__ */ jt({
|
|
19990
20003
|
__name: "index",
|
|
19991
20004
|
props: {
|
|
19992
20005
|
comment: {}
|
|
@@ -19997,12 +20010,12 @@ const hu = (o) => (jc("data-v-07d35a8c"), o = o(), kc(), o), D6 = { class: "sus-
|
|
|
19997
20010
|
function n() {
|
|
19998
20011
|
t("go-local");
|
|
19999
20012
|
}
|
|
20000
|
-
return (a, s) => (
|
|
20013
|
+
return (a, s) => (re(), ce("div", {
|
|
20001
20014
|
class: "sus-top-item p-1.5 cursor-pointer",
|
|
20002
20015
|
onClick: n
|
|
20003
20016
|
}, [
|
|
20004
20017
|
H("div", o_, [
|
|
20005
|
-
a.comment.userAvatar ? (
|
|
20018
|
+
a.comment.userAvatar ? (re(), ce("div", n_, [
|
|
20006
20019
|
H("img", {
|
|
20007
20020
|
alt: "",
|
|
20008
20021
|
class: "sus-avatar",
|