@ahzoo/sus 2.0.2 → 2.0.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/dist/t/index.d.ts +5 -1
- package/dist/t/index.js +441 -422
- package/dist/t/index.umd.cjs +17 -17
- package/dist/t/style.css +1 -1
- package/dist/t/types/list.d.ts +9 -9
- package/dist/v/{types/index.d.ts → index.d.ts} +5 -1
- package/dist/v/index.js +1409 -1386
- package/dist/v/index.umd.cjs +79 -79
- package/dist/v/style.css +1 -1
- package/dist/v/types/list.d.ts +11 -10
- package/package.json +1 -1
package/dist/t/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as et, shallowRef as Uh, onMounted as Dr, onBeforeUnmount as ls, h as an, ref as qe, getCurrentInstance as Wh, watchEffect as Kh, nextTick as qh, unref as Ye, markRaw as Jh, customRef as Gh, createElementBlock as Z, openBlock as X, Fragment as as, renderList as Go, createElementVNode as T, Teleport as Uc, withDirectives as Te, createBlock as ho, createCommentVNode as ke, withModifiers as Yh, withKeys as Xh, vModelText as ai, vShow as We, withCtx as
|
|
1
|
+
import { defineComponent as et, shallowRef as Uh, onMounted as Dr, onBeforeUnmount as ls, h as an, ref as qe, getCurrentInstance as Wh, watchEffect as Kh, nextTick as qh, unref as Ye, markRaw as Jh, customRef as Gh, createElementBlock as Z, openBlock as X, Fragment as as, renderList as Go, createElementVNode as T, Teleport as Uc, withDirectives as Te, createBlock as ho, createCommentVNode as ke, withModifiers as Yh, withKeys as Xh, vModelText as ai, vShow as We, withCtx as zn, reactive as sa, toDisplayString as rt, createVNode as bt, createStaticVNode as Bs, createTextVNode as po, normalizeClass as Qh } from "vue";
|
|
2
2
|
import { createLowlight as Zh } from "lowlight";
|
|
3
3
|
import { OuOToolTip as Kr, OuOCheckBox as ep } from "@ahzoo/ouo";
|
|
4
4
|
function Ie(n) {
|
|
@@ -403,9 +403,9 @@ class x {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
x.empty = new x([], 0);
|
|
406
|
-
const
|
|
406
|
+
const $s = { index: 0, offset: 0 };
|
|
407
407
|
function qr(n, e) {
|
|
408
|
-
return
|
|
408
|
+
return $s.index = n, $s.offset = e, $s;
|
|
409
409
|
}
|
|
410
410
|
function mi(n, e) {
|
|
411
411
|
if (n === e)
|
|
@@ -2654,7 +2654,7 @@ class Rn {
|
|
|
2654
2654
|
nodes.
|
|
2655
2655
|
*/
|
|
2656
2656
|
serializeFragment(e, t = {}, r) {
|
|
2657
|
-
r || (r =
|
|
2657
|
+
r || (r = zs(t).createDocumentFragment());
|
|
2658
2658
|
let i = r, s = [];
|
|
2659
2659
|
return e.forEach((o) => {
|
|
2660
2660
|
if (s.length || o.marks.length) {
|
|
@@ -2683,7 +2683,7 @@ class Rn {
|
|
|
2683
2683
|
@internal
|
|
2684
2684
|
*/
|
|
2685
2685
|
serializeNodeInner(e, t) {
|
|
2686
|
-
let { dom: r, contentDOM: i } = ci(
|
|
2686
|
+
let { dom: r, contentDOM: i } = ci(zs(t), this.nodes[e.type.name](e), null, e.attrs);
|
|
2687
2687
|
if (i) {
|
|
2688
2688
|
if (e.isLeaf)
|
|
2689
2689
|
throw new RangeError("Content hole not allowed in a leaf node spec");
|
|
@@ -2711,7 +2711,7 @@ class Rn {
|
|
|
2711
2711
|
*/
|
|
2712
2712
|
serializeMark(e, t, r = {}) {
|
|
2713
2713
|
let i = this.marks[e.type.name];
|
|
2714
|
-
return i && ci(
|
|
2714
|
+
return i && ci(zs(r), i(e, t), null, e.attrs);
|
|
2715
2715
|
}
|
|
2716
2716
|
static renderSpec(e, t, r = null, i) {
|
|
2717
2717
|
return ci(e, t, r, i);
|
|
@@ -2746,7 +2746,7 @@ function ma(n) {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
return e;
|
|
2748
2748
|
}
|
|
2749
|
-
function
|
|
2749
|
+
function zs(n) {
|
|
2750
2750
|
return n.document || window.document;
|
|
2751
2751
|
}
|
|
2752
2752
|
const ga = /* @__PURE__ */ new WeakMap();
|
|
@@ -3061,8 +3061,8 @@ class Sr {
|
|
|
3061
3061
|
return r ? e : new wo(e, i, null);
|
|
3062
3062
|
}
|
|
3063
3063
|
}
|
|
3064
|
-
const
|
|
3065
|
-
class
|
|
3064
|
+
const _s = /* @__PURE__ */ Object.create(null);
|
|
3065
|
+
class _e {
|
|
3066
3066
|
/**
|
|
3067
3067
|
Get the step map that represents the changes made by this step,
|
|
3068
3068
|
and which can be used to transform between positions in the old
|
|
@@ -3086,7 +3086,7 @@ class ze {
|
|
|
3086
3086
|
static fromJSON(e, t) {
|
|
3087
3087
|
if (!t || !t.stepType)
|
|
3088
3088
|
throw new RangeError("Invalid input for Step.fromJSON");
|
|
3089
|
-
let r =
|
|
3089
|
+
let r = _s[t.stepType];
|
|
3090
3090
|
if (!r)
|
|
3091
3091
|
throw new RangeError(`No step type ${t.stepType} defined`);
|
|
3092
3092
|
return r.fromJSON(e, t);
|
|
@@ -3098,9 +3098,9 @@ class ze {
|
|
|
3098
3098
|
that's unlikely to clash with steps from other modules.
|
|
3099
3099
|
*/
|
|
3100
3100
|
static jsonID(e, t) {
|
|
3101
|
-
if (e in
|
|
3101
|
+
if (e in _s)
|
|
3102
3102
|
throw new RangeError("Duplicate use of step JSON ID " + e);
|
|
3103
|
-
return
|
|
3103
|
+
return _s[e] = t, t.prototype.jsonID = e, t;
|
|
3104
3104
|
}
|
|
3105
3105
|
}
|
|
3106
3106
|
class xe {
|
|
@@ -3145,7 +3145,7 @@ function Yo(n, e, t) {
|
|
|
3145
3145
|
}
|
|
3146
3146
|
return x.fromArray(r);
|
|
3147
3147
|
}
|
|
3148
|
-
class Zt extends
|
|
3148
|
+
class Zt extends _e {
|
|
3149
3149
|
/**
|
|
3150
3150
|
Create a mark step.
|
|
3151
3151
|
*/
|
|
@@ -3183,8 +3183,8 @@ class Zt extends ze {
|
|
|
3183
3183
|
return new Zt(t.from, t.to, e.markFromJSON(t.mark));
|
|
3184
3184
|
}
|
|
3185
3185
|
}
|
|
3186
|
-
|
|
3187
|
-
class dt extends
|
|
3186
|
+
_e.jsonID("addMark", Zt);
|
|
3187
|
+
class dt extends _e {
|
|
3188
3188
|
/**
|
|
3189
3189
|
Create a mark-removing step.
|
|
3190
3190
|
*/
|
|
@@ -3222,8 +3222,8 @@ class dt extends ze {
|
|
|
3222
3222
|
return new dt(t.from, t.to, e.markFromJSON(t.mark));
|
|
3223
3223
|
}
|
|
3224
3224
|
}
|
|
3225
|
-
|
|
3226
|
-
class en extends
|
|
3225
|
+
_e.jsonID("removeMark", dt);
|
|
3226
|
+
class en extends _e {
|
|
3227
3227
|
/**
|
|
3228
3228
|
Create a node mark step.
|
|
3229
3229
|
*/
|
|
@@ -3266,8 +3266,8 @@ class en extends ze {
|
|
|
3266
3266
|
return new en(t.pos, e.markFromJSON(t.mark));
|
|
3267
3267
|
}
|
|
3268
3268
|
}
|
|
3269
|
-
|
|
3270
|
-
class Tn extends
|
|
3269
|
+
_e.jsonID("addNodeMark", en);
|
|
3270
|
+
class Tn extends _e {
|
|
3271
3271
|
/**
|
|
3272
3272
|
Create a mark-removing step.
|
|
3273
3273
|
*/
|
|
@@ -3301,8 +3301,8 @@ class Tn extends ze {
|
|
|
3301
3301
|
return new Tn(t.pos, e.markFromJSON(t.mark));
|
|
3302
3302
|
}
|
|
3303
3303
|
}
|
|
3304
|
-
|
|
3305
|
-
class Oe extends
|
|
3304
|
+
_e.jsonID("removeNodeMark", Tn);
|
|
3305
|
+
class Oe extends _e {
|
|
3306
3306
|
/**
|
|
3307
3307
|
The given `slice` should fit the 'gap' between `from` and
|
|
3308
3308
|
`to`—the depths must line up, and the surrounding nodes must be
|
|
@@ -3353,8 +3353,8 @@ class Oe extends ze {
|
|
|
3353
3353
|
return new Oe(t.from, t.to, A.fromJSON(e, t.slice), !!t.structure);
|
|
3354
3354
|
}
|
|
3355
3355
|
}
|
|
3356
|
-
|
|
3357
|
-
class Ae extends
|
|
3356
|
+
_e.jsonID("replace", Oe);
|
|
3357
|
+
class Ae extends _e {
|
|
3358
3358
|
/**
|
|
3359
3359
|
Create a replace-around step with the given range and gap.
|
|
3360
3360
|
`insert` should be the point in the slice into which the content
|
|
@@ -3411,7 +3411,7 @@ class Ae extends ze {
|
|
|
3411
3411
|
return new Ae(t.from, t.to, t.gapFrom, t.gapTo, A.fromJSON(e, t.slice), t.insert, !!t.structure);
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
3414
|
-
|
|
3414
|
+
_e.jsonID("replaceAround", Ae);
|
|
3415
3415
|
function ko(n, e, t) {
|
|
3416
3416
|
let r = n.resolve(e), i = t - e, s = r.depth;
|
|
3417
3417
|
for (; i > 0 && s > 0 && r.indexAfter(s) == r.node(s).childCount; )
|
|
@@ -3603,7 +3603,7 @@ function Lp(n, e, t, r, i) {
|
|
|
3603
3603
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
3604
3604
|
n.step(new Ae(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new A(x.from(o), 0, 0), 1, !0));
|
|
3605
3605
|
}
|
|
3606
|
-
function
|
|
3606
|
+
function _t(n, e, t = 1, r) {
|
|
3607
3607
|
let i = n.resolve(e), s = i.depth - t, o = r && r[r.length - 1] || i.parent;
|
|
3608
3608
|
if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
|
|
3609
3609
|
return !1;
|
|
@@ -3633,7 +3633,7 @@ function fn(n, e) {
|
|
|
3633
3633
|
let t = n.resolve(e), r = t.index();
|
|
3634
3634
|
return gu(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
|
|
3635
3635
|
}
|
|
3636
|
-
function
|
|
3636
|
+
function $p(n, e) {
|
|
3637
3637
|
e.content.size || n.type.compatibleContent(e.type);
|
|
3638
3638
|
let t = n.contentMatchAt(n.childCount), { linebreakReplacement: r } = n.type.schema;
|
|
3639
3639
|
for (let i = 0; i < e.childCount; i++) {
|
|
@@ -3644,7 +3644,7 @@ function _p(n, e) {
|
|
|
3644
3644
|
return t.validEnd;
|
|
3645
3645
|
}
|
|
3646
3646
|
function gu(n, e) {
|
|
3647
|
-
return !!(n && e && !n.isLeaf &&
|
|
3647
|
+
return !!(n && e && !n.isLeaf && $p(n, e));
|
|
3648
3648
|
}
|
|
3649
3649
|
function us(n, e, t = -1) {
|
|
3650
3650
|
let r = n.resolve(e);
|
|
@@ -3657,7 +3657,7 @@ function us(n, e, t = -1) {
|
|
|
3657
3657
|
e = t < 0 ? r.before(i) : r.after(i);
|
|
3658
3658
|
}
|
|
3659
3659
|
}
|
|
3660
|
-
function
|
|
3660
|
+
function zp(n, e, t) {
|
|
3661
3661
|
let r = null, { linebreakReplacement: i } = n.doc.type.schema, s = n.doc.resolve(e - t), o = s.node().type;
|
|
3662
3662
|
if (i && o.inlineContent) {
|
|
3663
3663
|
let u = o.whitespace == "pre", d = !!o.contentMatch.matchType(i);
|
|
@@ -3676,7 +3676,7 @@ function $p(n, e, t) {
|
|
|
3676
3676
|
}
|
|
3677
3677
|
return n;
|
|
3678
3678
|
}
|
|
3679
|
-
function
|
|
3679
|
+
function _p(n, e, t) {
|
|
3680
3680
|
let r = n.resolve(e);
|
|
3681
3681
|
if (r.parent.canReplaceWith(r.index(), r.index(), t))
|
|
3682
3682
|
return e;
|
|
@@ -3968,7 +3968,7 @@ function ku(n, e, t, r, i) {
|
|
|
3968
3968
|
}
|
|
3969
3969
|
function Up(n, e, t, r) {
|
|
3970
3970
|
if (!r.isInline && e == t && n.doc.resolve(e).parent.content.size) {
|
|
3971
|
-
let i =
|
|
3971
|
+
let i = _p(n.doc, e, r.type);
|
|
3972
3972
|
i != null && (e = t = i);
|
|
3973
3973
|
}
|
|
3974
3974
|
n.replaceRange(e, t, new A(x.from(r), 0, 0));
|
|
@@ -3997,7 +3997,7 @@ function xu(n, e) {
|
|
|
3997
3997
|
}
|
|
3998
3998
|
return t;
|
|
3999
3999
|
}
|
|
4000
|
-
class Un extends
|
|
4000
|
+
class Un extends _e {
|
|
4001
4001
|
/**
|
|
4002
4002
|
Construct an attribute step.
|
|
4003
4003
|
*/
|
|
@@ -4034,8 +4034,8 @@ class Un extends ze {
|
|
|
4034
4034
|
return new Un(t.pos, t.attr, t.value);
|
|
4035
4035
|
}
|
|
4036
4036
|
}
|
|
4037
|
-
|
|
4038
|
-
class Cr extends
|
|
4037
|
+
_e.jsonID("attr", Un);
|
|
4038
|
+
class Cr extends _e {
|
|
4039
4039
|
/**
|
|
4040
4040
|
Construct an attribute step.
|
|
4041
4041
|
*/
|
|
@@ -4068,7 +4068,7 @@ class Cr extends ze {
|
|
|
4068
4068
|
return new Cr(t.attr, t.value);
|
|
4069
4069
|
}
|
|
4070
4070
|
}
|
|
4071
|
-
|
|
4071
|
+
_e.jsonID("docAttr", Cr);
|
|
4072
4072
|
let qn = class extends Error {
|
|
4073
4073
|
};
|
|
4074
4074
|
qn = function n(e) {
|
|
@@ -4205,7 +4205,7 @@ class vu {
|
|
|
4205
4205
|
last and first siblings are also joined, and so on.
|
|
4206
4206
|
*/
|
|
4207
4207
|
join(e, t = 1) {
|
|
4208
|
-
return
|
|
4208
|
+
return zp(this, e, t), this;
|
|
4209
4209
|
}
|
|
4210
4210
|
/**
|
|
4211
4211
|
Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
|
|
@@ -4398,11 +4398,11 @@ class F {
|
|
|
4398
4398
|
found.
|
|
4399
4399
|
*/
|
|
4400
4400
|
static findFrom(e, t, r = !1) {
|
|
4401
|
-
let i = e.parent.inlineContent ? new j(e) :
|
|
4401
|
+
let i = e.parent.inlineContent ? new j(e) : _n(e.node(0), e.parent, e.pos, e.index(), t, r);
|
|
4402
4402
|
if (i)
|
|
4403
4403
|
return i;
|
|
4404
4404
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
4405
|
-
let o = t < 0 ?
|
|
4405
|
+
let o = t < 0 ? _n(e.node(0), e.node(s), e.before(s + 1), e.index(s), t, r) : _n(e.node(0), e.node(s), e.after(s + 1), e.index(s) + 1, t, r);
|
|
4406
4406
|
if (o)
|
|
4407
4407
|
return o;
|
|
4408
4408
|
}
|
|
@@ -4423,14 +4423,14 @@ class F {
|
|
|
4423
4423
|
exists.
|
|
4424
4424
|
*/
|
|
4425
4425
|
static atStart(e) {
|
|
4426
|
-
return
|
|
4426
|
+
return _n(e, e, 0, 0, 1) || new Qe(e);
|
|
4427
4427
|
}
|
|
4428
4428
|
/**
|
|
4429
4429
|
Find the cursor or leaf node selection closest to the end of the
|
|
4430
4430
|
given document.
|
|
4431
4431
|
*/
|
|
4432
4432
|
static atEnd(e) {
|
|
4433
|
-
return
|
|
4433
|
+
return _n(e, e, e.content.size, e.childCount, -1) || new Qe(e);
|
|
4434
4434
|
}
|
|
4435
4435
|
/**
|
|
4436
4436
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -4564,7 +4564,7 @@ class fs {
|
|
|
4564
4564
|
return j.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
4565
4565
|
}
|
|
4566
4566
|
}
|
|
4567
|
-
class
|
|
4567
|
+
class _ extends F {
|
|
4568
4568
|
/**
|
|
4569
4569
|
Create a node selection. Does not verify the validity of its
|
|
4570
4570
|
argument.
|
|
@@ -4575,13 +4575,13 @@ class z extends F {
|
|
|
4575
4575
|
}
|
|
4576
4576
|
map(e, t) {
|
|
4577
4577
|
let { deleted: r, pos: i } = t.mapResult(this.anchor), s = e.resolve(i);
|
|
4578
|
-
return r ? F.near(s) : new
|
|
4578
|
+
return r ? F.near(s) : new _(s);
|
|
4579
4579
|
}
|
|
4580
4580
|
content() {
|
|
4581
4581
|
return new A(x.from(this.node), 0, 0);
|
|
4582
4582
|
}
|
|
4583
4583
|
eq(e) {
|
|
4584
|
-
return e instanceof
|
|
4584
|
+
return e instanceof _ && e.anchor == this.anchor;
|
|
4585
4585
|
}
|
|
4586
4586
|
toJSON() {
|
|
4587
4587
|
return { type: "node", anchor: this.anchor };
|
|
@@ -4595,13 +4595,13 @@ class z extends F {
|
|
|
4595
4595
|
static fromJSON(e, t) {
|
|
4596
4596
|
if (typeof t.anchor != "number")
|
|
4597
4597
|
throw new RangeError("Invalid input for NodeSelection.fromJSON");
|
|
4598
|
-
return new
|
|
4598
|
+
return new _(e.resolve(t.anchor));
|
|
4599
4599
|
}
|
|
4600
4600
|
/**
|
|
4601
4601
|
Create a node selection from non-resolved positions.
|
|
4602
4602
|
*/
|
|
4603
4603
|
static create(e, t) {
|
|
4604
|
-
return new
|
|
4604
|
+
return new _(e.resolve(t));
|
|
4605
4605
|
}
|
|
4606
4606
|
/**
|
|
4607
4607
|
Determines whether the given node may be selected as a node
|
|
@@ -4611,8 +4611,8 @@ class z extends F {
|
|
|
4611
4611
|
return !e.isText && e.type.spec.selectable !== !1;
|
|
4612
4612
|
}
|
|
4613
4613
|
}
|
|
4614
|
-
|
|
4615
|
-
F.jsonID("node",
|
|
4614
|
+
_.prototype.visible = !1;
|
|
4615
|
+
F.jsonID("node", _);
|
|
4616
4616
|
class Zo {
|
|
4617
4617
|
constructor(e) {
|
|
4618
4618
|
this.anchor = e;
|
|
@@ -4623,7 +4623,7 @@ class Zo {
|
|
|
4623
4623
|
}
|
|
4624
4624
|
resolve(e) {
|
|
4625
4625
|
let t = e.resolve(this.anchor), r = t.nodeAfter;
|
|
4626
|
-
return r &&
|
|
4626
|
+
return r && _.isSelectable(r) ? new _(t) : F.near(t);
|
|
4627
4627
|
}
|
|
4628
4628
|
}
|
|
4629
4629
|
class Qe extends F {
|
|
@@ -4669,16 +4669,16 @@ const Kp = {
|
|
|
4669
4669
|
return new Qe(n);
|
|
4670
4670
|
}
|
|
4671
4671
|
};
|
|
4672
|
-
function
|
|
4672
|
+
function _n(n, e, t, r, i, s = !1) {
|
|
4673
4673
|
if (e.inlineContent)
|
|
4674
4674
|
return j.create(n, t);
|
|
4675
4675
|
for (let o = r - (i > 0 ? 0 : 1); i > 0 ? o < e.childCount : o >= 0; o += i) {
|
|
4676
4676
|
let l = e.child(o);
|
|
4677
4677
|
if (l.isAtom) {
|
|
4678
|
-
if (!s &&
|
|
4679
|
-
return
|
|
4678
|
+
if (!s && _.isSelectable(l))
|
|
4679
|
+
return _.create(n, t - (i < 0 ? l.nodeSize : 0));
|
|
4680
4680
|
} else {
|
|
4681
|
-
let a =
|
|
4681
|
+
let a = _n(n, l, t + i, i < 0 ? l.childCount : 0, i, s);
|
|
4682
4682
|
if (a)
|
|
4683
4683
|
return a;
|
|
4684
4684
|
}
|
|
@@ -5227,7 +5227,7 @@ function tm(n, e, t) {
|
|
|
5227
5227
|
}
|
|
5228
5228
|
const Mt = typeof navigator < "u" ? navigator : null, Ea = typeof document < "u" ? document : null, hn = Mt && Mt.userAgent || "", vo = /Edge\/(\d+)/.exec(hn), Eu = /MSIE \d/.exec(hn), So = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hn), Je = !!(Eu || So || vo), sn = Eu ? document.documentMode : So ? +So[1] : vo ? +vo[1] : 0, ot = !Je && /gecko\/(\d+)/i.test(hn);
|
|
5229
5229
|
ot && +(/Firefox\/(\d+)/.exec(hn) || [0, 0])[1];
|
|
5230
|
-
const Co = !Je && /Chrome\/(\d+)/.exec(hn),
|
|
5230
|
+
const Co = !Je && /Chrome\/(\d+)/.exec(hn), $e = !!Co, Tu = Co ? +Co[1] : 0, Fe = !Je && !!Mt && /Apple Computer/.test(Mt.vendor), Gn = Fe && (/Mobile\/\w+/.test(hn) || !!Mt && Mt.maxTouchPoints > 2), it = Gn || (Mt ? /Mac/.test(Mt.platform) : !1), nm = Mt ? /Win/.test(Mt.platform) : !1, $t = /Android \d/.test(hn), Lr = !!Ea && "webkitFontSmoothing" in Ea.documentElement.style, rm = Lr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5231
5231
|
function im(n) {
|
|
5232
5232
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
5233
5233
|
return e ? {
|
|
@@ -6030,7 +6030,7 @@ class on extends Br {
|
|
|
6030
6030
|
} else u || ({ dom: u, contentDOM: d } = Rn.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
|
|
6031
6031
|
!d && !t.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), t.type.spec.draggable && (u.draggable = !0));
|
|
6032
6032
|
let f = u;
|
|
6033
|
-
return u =
|
|
6033
|
+
return u = zu(u, r, t), c ? a = new km(e, t, r, i, u, d || null, f, c, s, o + 1) : t.isText ? new ps(e, t, r, i, u, f, s) : new on(e, t, r, i, u, d || null, f, s, o + 1);
|
|
6034
6034
|
}
|
|
6035
6035
|
parseRule() {
|
|
6036
6036
|
if (this.node.type.spec.reparseInView)
|
|
@@ -6114,7 +6114,7 @@ class on extends Br {
|
|
|
6114
6114
|
if (ki(e, this.outerDeco))
|
|
6115
6115
|
return;
|
|
6116
6116
|
let t = this.nodeDOM.nodeType != 1, r = this.dom;
|
|
6117
|
-
this.dom =
|
|
6117
|
+
this.dom = $u(this.dom, this.nodeDOM, Mo(this.outerDeco, this.node, t), Mo(e, this.node, t)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
6118
6118
|
}
|
|
6119
6119
|
// Mark this node as being the selected node.
|
|
6120
6120
|
selectNode() {
|
|
@@ -6129,7 +6129,7 @@ class on extends Br {
|
|
|
6129
6129
|
}
|
|
6130
6130
|
}
|
|
6131
6131
|
function Da(n, e, t, r, i) {
|
|
6132
|
-
|
|
6132
|
+
zu(r, e, n);
|
|
6133
6133
|
let s = new on(void 0, n, e, t, r, r, r, i, 0);
|
|
6134
6134
|
return s.contentDOM && s.updateChildren(i, 0), s;
|
|
6135
6135
|
}
|
|
@@ -6264,7 +6264,7 @@ function Mo(n, e, t) {
|
|
|
6264
6264
|
}
|
|
6265
6265
|
return i;
|
|
6266
6266
|
}
|
|
6267
|
-
function
|
|
6267
|
+
function $u(n, e, t, r) {
|
|
6268
6268
|
if (t == wn && r == wn)
|
|
6269
6269
|
return e;
|
|
6270
6270
|
let i = e;
|
|
@@ -6300,8 +6300,8 @@ function xm(n, e, t) {
|
|
|
6300
6300
|
t.style && (n.style.cssText += t.style);
|
|
6301
6301
|
}
|
|
6302
6302
|
}
|
|
6303
|
-
function
|
|
6304
|
-
return
|
|
6303
|
+
function zu(n, e, t) {
|
|
6304
|
+
return $u(n, n, wn, Mo(e, t, n.nodeType != 1));
|
|
6305
6305
|
}
|
|
6306
6306
|
function ki(n, e) {
|
|
6307
6307
|
if (n.length != e.length)
|
|
@@ -6449,7 +6449,7 @@ class vm {
|
|
|
6449
6449
|
for (; e instanceof An; )
|
|
6450
6450
|
t = e, e = t.children[t.children.length - 1];
|
|
6451
6451
|
(!e || // Empty textblock
|
|
6452
|
-
!(e instanceof ps) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Fe ||
|
|
6452
|
+
!(e instanceof ps) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Fe || $e) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
|
|
6453
6453
|
}
|
|
6454
6454
|
addHackNode(e, t) {
|
|
6455
6455
|
if (t == this.top && this.index < t.children.length && t.children[this.index].matchesHack(e))
|
|
@@ -6593,9 +6593,9 @@ function tl(n, e = null) {
|
|
|
6593
6593
|
for (a = o; i && !i.node; )
|
|
6594
6594
|
i = i.parent;
|
|
6595
6595
|
let d = i.node;
|
|
6596
|
-
if (i && d.isAtom &&
|
|
6596
|
+
if (i && d.isAtom && _.isSelectable(d) && i.parent && !(d.isInline && Zp(t.focusNode, t.focusOffset, i.dom))) {
|
|
6597
6597
|
let f = i.posBefore;
|
|
6598
|
-
c = new
|
|
6598
|
+
c = new _(o == f ? l : r.resolve(f));
|
|
6599
6599
|
}
|
|
6600
6600
|
} else {
|
|
6601
6601
|
if (t instanceof n.dom.ownerDocument.defaultView.Selection && t.rangeCount > 1) {
|
|
@@ -6619,13 +6619,13 @@ function tl(n, e = null) {
|
|
|
6619
6619
|
}
|
|
6620
6620
|
return c;
|
|
6621
6621
|
}
|
|
6622
|
-
function
|
|
6622
|
+
function _u(n) {
|
|
6623
6623
|
return n.editable ? n.hasFocus() : Fu(n) && document.activeElement && document.activeElement.contains(n.dom);
|
|
6624
6624
|
}
|
|
6625
6625
|
function Ht(n, e = !1) {
|
|
6626
6626
|
let t = n.state.selection;
|
|
6627
|
-
if (Hu(n, t), !!
|
|
6628
|
-
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault &&
|
|
6627
|
+
if (Hu(n, t), !!_u(n)) {
|
|
6628
|
+
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && $e) {
|
|
6629
6629
|
let r = n.domSelectionRange(), i = n.domObserver.currentSelection;
|
|
6630
6630
|
if (r.anchorNode && i.anchorNode && On(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
|
|
6631
6631
|
n.input.mouseDown.delayedSelectionSync = !0, n.domObserver.setCurSelection();
|
|
@@ -6636,12 +6636,12 @@ function Ht(n, e = !1) {
|
|
|
6636
6636
|
Am(n);
|
|
6637
6637
|
else {
|
|
6638
6638
|
let { anchor: r, head: i } = t, s, o;
|
|
6639
|
-
La && !(t instanceof j) && (t.$from.parent.inlineContent || (s = Ba(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Ba(n, t.to))), n.docView.setSelection(r, i, n, e), La && (s &&
|
|
6639
|
+
La && !(t instanceof j) && (t.$from.parent.inlineContent || (s = Ba(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Ba(n, t.to))), n.docView.setSelection(r, i, n, e), La && (s && $a(s), o && $a(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Om(n));
|
|
6640
6640
|
}
|
|
6641
6641
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
6642
6642
|
}
|
|
6643
6643
|
}
|
|
6644
|
-
const La = Fe ||
|
|
6644
|
+
const La = Fe || $e && Tu < 63;
|
|
6645
6645
|
function Ba(n, e) {
|
|
6646
6646
|
let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
|
|
6647
6647
|
if (Fe && i && i.contentEditable == "false")
|
|
@@ -6656,7 +6656,7 @@ function Ba(n, e) {
|
|
|
6656
6656
|
function Ks(n) {
|
|
6657
6657
|
return n.contentEditable = "true", Fe && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
|
|
6658
6658
|
}
|
|
6659
|
-
function
|
|
6659
|
+
function $a(n) {
|
|
6660
6660
|
n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
|
|
6661
6661
|
}
|
|
6662
6662
|
function Om(n) {
|
|
@@ -6665,7 +6665,7 @@ function Om(n) {
|
|
|
6665
6665
|
let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
|
|
6666
6666
|
e.addEventListener("selectionchange", n.input.hideSelectionGuard = () => {
|
|
6667
6667
|
(t.anchorNode != r || t.anchorOffset != i) && (e.removeEventListener("selectionchange", n.input.hideSelectionGuard), setTimeout(() => {
|
|
6668
|
-
(!
|
|
6668
|
+
(!_u(n) || n.state.selection.visible) && n.dom.classList.remove("ProseMirror-hideselection");
|
|
6669
6669
|
}, 20));
|
|
6670
6670
|
});
|
|
6671
6671
|
}
|
|
@@ -6677,19 +6677,19 @@ function Am(n) {
|
|
|
6677
6677
|
r ? e.collapse(t.parentNode, De(t) + 1) : e.collapse(t, 0), !r && !n.state.selection.visible && Je && sn <= 11 && (t.disabled = !0, t.disabled = !1);
|
|
6678
6678
|
}
|
|
6679
6679
|
function Hu(n, e) {
|
|
6680
|
-
if (e instanceof
|
|
6680
|
+
if (e instanceof _) {
|
|
6681
6681
|
let t = n.docView.descAt(e.from);
|
|
6682
|
-
t != n.lastSelectedViewDesc && (
|
|
6682
|
+
t != n.lastSelectedViewDesc && (za(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
|
|
6683
6683
|
} else
|
|
6684
|
-
|
|
6684
|
+
za(n);
|
|
6685
6685
|
}
|
|
6686
|
-
function
|
|
6686
|
+
function za(n) {
|
|
6687
6687
|
n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
|
|
6688
6688
|
}
|
|
6689
6689
|
function nl(n, e, t, r) {
|
|
6690
6690
|
return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || j.between(e, t, r);
|
|
6691
6691
|
}
|
|
6692
|
-
function
|
|
6692
|
+
function _a(n) {
|
|
6693
6693
|
return n.editable && !n.hasFocus() ? !1 : Fu(n);
|
|
6694
6694
|
}
|
|
6695
6695
|
function Fu(n) {
|
|
@@ -6725,17 +6725,17 @@ function Ha(n, e, t) {
|
|
|
6725
6725
|
} else if (r.empty) {
|
|
6726
6726
|
if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
6727
6727
|
let i = To(n.state, e);
|
|
6728
|
-
return i && i instanceof
|
|
6728
|
+
return i && i instanceof _ ? Jt(n, i) : !1;
|
|
6729
6729
|
} else if (!(it && t.indexOf("m") > -1)) {
|
|
6730
6730
|
let i = r.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, o;
|
|
6731
6731
|
if (!s || s.isText)
|
|
6732
6732
|
return !1;
|
|
6733
6733
|
let l = e < 0 ? i.pos - s.nodeSize : i.pos;
|
|
6734
|
-
return s.isAtom || (o = n.docView.descAt(l)) && !o.contentDOM ?
|
|
6734
|
+
return s.isAtom || (o = n.docView.descAt(l)) && !o.contentDOM ? _.isSelectable(s) ? Jt(n, new _(e < 0 ? n.state.doc.resolve(i.pos - s.nodeSize) : i)) : Lr ? Jt(n, new j(n.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
|
|
6735
6735
|
}
|
|
6736
6736
|
} else return !1;
|
|
6737
6737
|
else {
|
|
6738
|
-
if (r instanceof
|
|
6738
|
+
if (r instanceof _ && r.node.isInline)
|
|
6739
6739
|
return Jt(n, new j(e > 0 ? r.$to : r.$from));
|
|
6740
6740
|
{
|
|
6741
6741
|
let i = To(n.state, e);
|
|
@@ -6750,7 +6750,7 @@ function pr(n, e) {
|
|
|
6750
6750
|
let t = n.pmViewDesc;
|
|
6751
6751
|
return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
|
|
6752
6752
|
}
|
|
6753
|
-
function
|
|
6753
|
+
function $n(n, e) {
|
|
6754
6754
|
return e < 0 ? Rm(n) : Im(n);
|
|
6755
6755
|
}
|
|
6756
6756
|
function Rm(n) {
|
|
@@ -6869,7 +6869,7 @@ function Oo(n, e, t) {
|
|
|
6869
6869
|
}
|
|
6870
6870
|
function Fa(n, e) {
|
|
6871
6871
|
let t = n.state.doc.resolve(e);
|
|
6872
|
-
if (!(
|
|
6872
|
+
if (!($e || nm) && t.parent.inlineContent) {
|
|
6873
6873
|
let i = n.coordsAtPos(e);
|
|
6874
6874
|
if (e > t.start()) {
|
|
6875
6875
|
let s = n.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
|
|
@@ -6891,7 +6891,7 @@ function Va(n, e, t) {
|
|
|
6891
6891
|
let { $from: i, $to: s } = r;
|
|
6892
6892
|
if (!i.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
6893
6893
|
let o = To(n.state, e);
|
|
6894
|
-
if (o && o instanceof
|
|
6894
|
+
if (o && o instanceof _)
|
|
6895
6895
|
return Jt(n, o);
|
|
6896
6896
|
}
|
|
6897
6897
|
if (!i.parent.inlineContent) {
|
|
@@ -6934,25 +6934,25 @@ function Bm(n) {
|
|
|
6934
6934
|
let e = "";
|
|
6935
6935
|
return n.ctrlKey && (e += "c"), n.metaKey && (e += "m"), n.altKey && (e += "a"), n.shiftKey && (e += "s"), e;
|
|
6936
6936
|
}
|
|
6937
|
-
function
|
|
6937
|
+
function $m(n, e) {
|
|
6938
6938
|
let t = e.keyCode, r = Bm(e);
|
|
6939
6939
|
if (t == 8 || it && t == 72 && r == "c")
|
|
6940
|
-
return ja(n, -1) ||
|
|
6940
|
+
return ja(n, -1) || $n(n, -1);
|
|
6941
6941
|
if (t == 46 && !e.shiftKey || it && t == 68 && r == "c")
|
|
6942
|
-
return ja(n, 1) ||
|
|
6942
|
+
return ja(n, 1) || $n(n, 1);
|
|
6943
6943
|
if (t == 13 || t == 27)
|
|
6944
6944
|
return !0;
|
|
6945
6945
|
if (t == 37 || it && t == 66 && r == "c") {
|
|
6946
6946
|
let i = t == 37 ? Fa(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
6947
|
-
return Ha(n, i, r) ||
|
|
6947
|
+
return Ha(n, i, r) || $n(n, i);
|
|
6948
6948
|
} else if (t == 39 || it && t == 70 && r == "c") {
|
|
6949
6949
|
let i = t == 39 ? Fa(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
6950
|
-
return Ha(n, i, r) ||
|
|
6950
|
+
return Ha(n, i, r) || $n(n, i);
|
|
6951
6951
|
} else {
|
|
6952
6952
|
if (t == 38 || it && t == 80 && r == "c")
|
|
6953
|
-
return Va(n, -1, r) ||
|
|
6953
|
+
return Va(n, -1, r) || $n(n, -1);
|
|
6954
6954
|
if (t == 40 || it && t == 78 && r == "c")
|
|
6955
|
-
return Lm(n) || Va(n, 1, r) ||
|
|
6955
|
+
return Lm(n) || Va(n, 1, r) || $n(n, 1);
|
|
6956
6956
|
if (r == (it ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
|
|
6957
6957
|
return !0;
|
|
6958
6958
|
}
|
|
@@ -7027,11 +7027,11 @@ function ju(n, e, t, r, i) {
|
|
|
7027
7027
|
preserveWhitespace: !!(a || u),
|
|
7028
7028
|
context: i,
|
|
7029
7029
|
ruleFromNode(f) {
|
|
7030
|
-
return f.nodeName == "BR" && !f.nextSibling && f.parentNode &&
|
|
7030
|
+
return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !zm.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
7031
7031
|
}
|
|
7032
7032
|
})), u)
|
|
7033
7033
|
l = jm(Wa(l, +u[1], +u[2]), u[4]);
|
|
7034
|
-
else if (l = A.maxOpen(
|
|
7034
|
+
else if (l = A.maxOpen(_m(l.content, i), !0), l.openStart || l.openEnd) {
|
|
7035
7035
|
let d = 0, f = 0;
|
|
7036
7036
|
for (let h = l.content.firstChild; d < l.openStart && !h.type.spec.isolating; d++, h = h.firstChild)
|
|
7037
7037
|
;
|
|
@@ -7043,8 +7043,8 @@ function ju(n, e, t, r, i) {
|
|
|
7043
7043
|
l = d(l, n, a);
|
|
7044
7044
|
}), l;
|
|
7045
7045
|
}
|
|
7046
|
-
const
|
|
7047
|
-
function
|
|
7046
|
+
const zm = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
|
|
7047
|
+
function _m(n, e) {
|
|
7048
7048
|
if (n.childCount < 2)
|
|
7049
7049
|
return n;
|
|
7050
7050
|
for (let t = e.depth; t >= 0; t--) {
|
|
@@ -7124,7 +7124,7 @@ function Fm(n) {
|
|
|
7124
7124
|
return t;
|
|
7125
7125
|
}
|
|
7126
7126
|
function Vm(n) {
|
|
7127
|
-
let e = n.querySelectorAll(
|
|
7127
|
+
let e = n.querySelectorAll($e ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
7128
7128
|
for (let t = 0; t < e.length; t++) {
|
|
7129
7129
|
let r = e[t];
|
|
7130
7130
|
r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), r);
|
|
@@ -7199,13 +7199,13 @@ function Gm(n, e) {
|
|
|
7199
7199
|
}
|
|
7200
7200
|
je.keydown = (n, e) => {
|
|
7201
7201
|
let t = e;
|
|
7202
|
-
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Yu(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(
|
|
7202
|
+
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Yu(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !($t && $e && t.keyCode == 13)))
|
|
7203
7203
|
if (t.keyCode != 229 && n.domObserver.forceFlush(), Gn && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
7204
7204
|
let r = Date.now();
|
|
7205
7205
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
7206
7206
|
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, yn(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
7207
7207
|
}, 200);
|
|
7208
|
-
} else n.someProp("handleKeyDown", (r) => r(n, t)) ||
|
|
7208
|
+
} else n.someProp("handleKeyDown", (r) => r(n, t)) || $m(n, t) ? t.preventDefault() : tn(n, "key");
|
|
7209
7209
|
};
|
|
7210
7210
|
je.keyup = (n, e) => {
|
|
7211
7211
|
e.keyCode == 16 && (n.input.shiftKey = !1);
|
|
@@ -7250,22 +7250,22 @@ function Xm(n, e) {
|
|
|
7250
7250
|
if (e == -1)
|
|
7251
7251
|
return !1;
|
|
7252
7252
|
let t = n.state.doc.resolve(e), r = t.nodeAfter;
|
|
7253
|
-
return r && r.isAtom &&
|
|
7253
|
+
return r && r.isAtom && _.isSelectable(r) ? (Wn(n, new _(t)), !0) : !1;
|
|
7254
7254
|
}
|
|
7255
7255
|
function Qm(n, e) {
|
|
7256
7256
|
if (e == -1)
|
|
7257
7257
|
return !1;
|
|
7258
7258
|
let t = n.state.selection, r, i;
|
|
7259
|
-
t instanceof
|
|
7259
|
+
t instanceof _ && (r = t.node);
|
|
7260
7260
|
let s = n.state.doc.resolve(e);
|
|
7261
7261
|
for (let o = s.depth + 1; o > 0; o--) {
|
|
7262
7262
|
let l = o > s.depth ? s.nodeAfter : s.node(o);
|
|
7263
|
-
if (
|
|
7263
|
+
if (_.isSelectable(l)) {
|
|
7264
7264
|
r && t.$from.depth > 0 && o >= t.$from.depth && s.before(t.$from.depth + 1) == t.$from.pos ? i = s.before(t.$from.depth) : i = s.before(o);
|
|
7265
7265
|
break;
|
|
7266
7266
|
}
|
|
7267
7267
|
}
|
|
7268
|
-
return i != null ? (Wn(n,
|
|
7268
|
+
return i != null ? (Wn(n, _.create(n.state.doc, i)), !0) : !1;
|
|
7269
7269
|
}
|
|
7270
7270
|
function Zm(n, e, t, r, i) {
|
|
7271
7271
|
return sl(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Qm(n, t) : Xm(n, t));
|
|
@@ -7287,8 +7287,8 @@ function ng(n, e, t) {
|
|
|
7287
7287
|
let o = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
|
|
7288
7288
|
if (o.inlineContent)
|
|
7289
7289
|
Wn(n, j.create(r, l + 1, l + 1 + o.content.size));
|
|
7290
|
-
else if (
|
|
7291
|
-
Wn(n,
|
|
7290
|
+
else if (_.isSelectable(o))
|
|
7291
|
+
Wn(n, _.create(r, l));
|
|
7292
7292
|
else
|
|
7293
7293
|
continue;
|
|
7294
7294
|
return !0;
|
|
@@ -7319,7 +7319,7 @@ class rg {
|
|
|
7319
7319
|
const l = i ? null : r.target, a = l ? e.docView.nearestDesc(l, !0) : null;
|
|
7320
7320
|
this.target = a && a.nodeDOM.nodeType == 1 ? a.nodeDOM : null;
|
|
7321
7321
|
let { selection: c } = e.state;
|
|
7322
|
-
(r.button == 0 && s.type.spec.draggable && s.type.spec.selectable !== !1 || c instanceof
|
|
7322
|
+
(r.button == 0 && s.type.spec.draggable && s.type.spec.selectable !== !1 || c instanceof _ && c.from <= o && c.to > o) && (this.mightDrag = {
|
|
7323
7323
|
node: s,
|
|
7324
7324
|
pos: o,
|
|
7325
7325
|
addAttr: !!(this.target && !this.target.draggable),
|
|
@@ -7343,7 +7343,7 @@ class rg {
|
|
|
7343
7343
|
// (hidden) cursor is doesn't change the selection, and
|
|
7344
7344
|
// thus doesn't get a reaction from ProseMirror. This
|
|
7345
7345
|
// works around that.
|
|
7346
|
-
|
|
7346
|
+
$e && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (Wn(this.view, F.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : tn(this.view, "pointer");
|
|
7347
7347
|
}
|
|
7348
7348
|
move(e) {
|
|
7349
7349
|
this.updateAllowDefault(e), tn(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -7362,7 +7362,7 @@ Ve.contextmenu = (n) => ol(n);
|
|
|
7362
7362
|
function Yu(n, e) {
|
|
7363
7363
|
return n.composing ? !0 : Fe && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
7364
7364
|
}
|
|
7365
|
-
const ig =
|
|
7365
|
+
const ig = $t ? 5e3 : -1;
|
|
7366
7366
|
je.compositionstart = je.compositionupdate = (n) => {
|
|
7367
7367
|
if (!n.composing) {
|
|
7368
7368
|
n.domObserver.flush();
|
|
@@ -7421,7 +7421,7 @@ function og() {
|
|
|
7421
7421
|
return n.initEvent("event", !0, !0), n.timeStamp;
|
|
7422
7422
|
}
|
|
7423
7423
|
function vi(n, e = !1) {
|
|
7424
|
-
if (!(
|
|
7424
|
+
if (!($t && n.domObserver.flushingSoon >= 0)) {
|
|
7425
7425
|
if (n.domObserver.forceFlush(), Qu(n), e || n.docView && n.docView.dirty) {
|
|
7426
7426
|
let t = tl(n), r = n.state.selection;
|
|
7427
7427
|
return t && !t.eq(r) ? n.dispatch(n.state.tr.setSelection(t)) : (n.markCursor || e) && !r.$from.node(r.$from.sharedDepth(r.to)).inlineContent ? n.dispatch(n.state.tr.deleteSelection()) : n.updateState(n.state), !0;
|
|
@@ -7478,7 +7478,7 @@ function Zu(n) {
|
|
|
7478
7478
|
}
|
|
7479
7479
|
je.paste = (n, e) => {
|
|
7480
7480
|
let t = e;
|
|
7481
|
-
if (n.composing &&
|
|
7481
|
+
if (n.composing && !$t)
|
|
7482
7482
|
return;
|
|
7483
7483
|
let r = Mr ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
|
|
7484
7484
|
r && Er(n, Zu(r), r.getData("text/html"), i, t) ? t.preventDefault() : cg(n, t);
|
|
@@ -7498,16 +7498,16 @@ Ve.dragstart = (n, e) => {
|
|
|
7498
7498
|
if (r && r.done(), !t.dataTransfer)
|
|
7499
7499
|
return;
|
|
7500
7500
|
let i = n.state.selection, s = i.empty ? null : n.posAtCoords(ms(t)), o;
|
|
7501
|
-
if (!(s && s.pos >= i.from && s.pos <= (i instanceof
|
|
7501
|
+
if (!(s && s.pos >= i.from && s.pos <= (i instanceof _ ? i.to - 1 : i.to))) {
|
|
7502
7502
|
if (r && r.mightDrag)
|
|
7503
|
-
o =
|
|
7503
|
+
o = _.create(n.state.doc, r.mightDrag.pos);
|
|
7504
7504
|
else if (t.target && t.target.nodeType == 1) {
|
|
7505
7505
|
let d = n.docView.nearestDesc(t.target, !0);
|
|
7506
|
-
d && d.node.type.spec.draggable && d != n.docView && (o =
|
|
7506
|
+
d && d.node.type.spec.draggable && d != n.docView && (o = _.create(n.state.doc, d.posBefore));
|
|
7507
7507
|
}
|
|
7508
7508
|
}
|
|
7509
7509
|
let l = (o || n.state.selection).content(), { dom: a, text: c, slice: u } = rl(n, l);
|
|
7510
|
-
(!t.dataTransfer.files.length ||
|
|
7510
|
+
(!t.dataTransfer.files.length || !$e || Tu > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Mr ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Mr || t.dataTransfer.setData("text/plain", c), n.dragging = new ed(u, td(n, t), o);
|
|
7511
7511
|
};
|
|
7512
7512
|
Ve.dragend = (n) => {
|
|
7513
7513
|
let e = n.dragging;
|
|
@@ -7546,8 +7546,8 @@ je.drop = (n, e) => {
|
|
|
7546
7546
|
if (d ? c.replaceRangeWith(u, u, o.content.firstChild) : c.replaceRange(u, u, o), c.doc.eq(f))
|
|
7547
7547
|
return;
|
|
7548
7548
|
let h = c.doc.resolve(u);
|
|
7549
|
-
if (d &&
|
|
7550
|
-
c.setSelection(new
|
|
7549
|
+
if (d && _.isSelectable(o.content.firstChild) && h.nodeAfter && h.nodeAfter.sameMarkup(o.content.firstChild))
|
|
7550
|
+
c.setSelection(new _(h));
|
|
7551
7551
|
else {
|
|
7552
7552
|
let p = c.mapping.map(a);
|
|
7553
7553
|
c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, b, w) => p = w), c.setSelection(nl(n, h, c.doc.resolve(p)));
|
|
@@ -7564,7 +7564,7 @@ Ve.blur = (n, e) => {
|
|
|
7564
7564
|
n.focused && (n.domObserver.stop(), n.dom.classList.remove("ProseMirror-focused"), n.domObserver.start(), t.relatedTarget && n.dom.contains(t.relatedTarget) && n.domObserver.currentSelection.clear(), n.focused = !1);
|
|
7565
7565
|
};
|
|
7566
7566
|
Ve.beforeinput = (n, e) => {
|
|
7567
|
-
if (
|
|
7567
|
+
if ($e && $t && e.inputType == "deleteContentBackward") {
|
|
7568
7568
|
n.domObserver.flushSoon();
|
|
7569
7569
|
let { domChangeCount: r } = n.input;
|
|
7570
7570
|
setTimeout(() => {
|
|
@@ -7594,7 +7594,7 @@ class Si {
|
|
|
7594
7594
|
}
|
|
7595
7595
|
map(e, t, r, i) {
|
|
7596
7596
|
let { pos: s, deleted: o } = e.mapResult(t.from + i, this.side < 0 ? -1 : 1);
|
|
7597
|
-
return o ? null : new
|
|
7597
|
+
return o ? null : new ze(s - r, s - r, this);
|
|
7598
7598
|
}
|
|
7599
7599
|
valid() {
|
|
7600
7600
|
return !0;
|
|
@@ -7612,7 +7612,7 @@ class ln {
|
|
|
7612
7612
|
}
|
|
7613
7613
|
map(e, t, r, i) {
|
|
7614
7614
|
let s = e.map(t.from + i, this.spec.inclusiveStart ? -1 : 1) - r, o = e.map(t.to + i, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
7615
|
-
return s >= o ? null : new
|
|
7615
|
+
return s >= o ? null : new ze(s, o, this);
|
|
7616
7616
|
}
|
|
7617
7617
|
valid(e, t) {
|
|
7618
7618
|
return t.from < t.to;
|
|
@@ -7635,7 +7635,7 @@ class ll {
|
|
|
7635
7635
|
if (s.deleted)
|
|
7636
7636
|
return null;
|
|
7637
7637
|
let o = e.mapResult(t.to + i, -1);
|
|
7638
|
-
return o.deleted || o.pos <= s.pos ? null : new
|
|
7638
|
+
return o.deleted || o.pos <= s.pos ? null : new ze(s.pos - r, o.pos - r, this);
|
|
7639
7639
|
}
|
|
7640
7640
|
valid(e, t) {
|
|
7641
7641
|
let { index: r, offset: i } = e.content.findIndex(t.from), s;
|
|
@@ -7647,7 +7647,7 @@ class ll {
|
|
|
7647
7647
|
destroy() {
|
|
7648
7648
|
}
|
|
7649
7649
|
}
|
|
7650
|
-
class
|
|
7650
|
+
class ze {
|
|
7651
7651
|
/**
|
|
7652
7652
|
@internal
|
|
7653
7653
|
*/
|
|
@@ -7658,7 +7658,7 @@ class $e {
|
|
|
7658
7658
|
@internal
|
|
7659
7659
|
*/
|
|
7660
7660
|
copy(e, t) {
|
|
7661
|
-
return new
|
|
7661
|
+
return new ze(e, t, this.type);
|
|
7662
7662
|
}
|
|
7663
7663
|
/**
|
|
7664
7664
|
@internal
|
|
@@ -7681,14 +7681,14 @@ class $e {
|
|
|
7681
7681
|
widget's current document position.
|
|
7682
7682
|
*/
|
|
7683
7683
|
static widget(e, t, r) {
|
|
7684
|
-
return new
|
|
7684
|
+
return new ze(e, e, new Si(t, r));
|
|
7685
7685
|
}
|
|
7686
7686
|
/**
|
|
7687
7687
|
Creates an inline decoration, which adds the given attributes to
|
|
7688
7688
|
each inline node between `from` and `to`.
|
|
7689
7689
|
*/
|
|
7690
7690
|
static inline(e, t, r, i) {
|
|
7691
|
-
return new
|
|
7691
|
+
return new ze(e, t, new ln(r, i));
|
|
7692
7692
|
}
|
|
7693
7693
|
/**
|
|
7694
7694
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -7696,7 +7696,7 @@ class $e {
|
|
|
7696
7696
|
node, will receive the given attributes.
|
|
7697
7697
|
*/
|
|
7698
7698
|
static node(e, t, r, i) {
|
|
7699
|
-
return new
|
|
7699
|
+
return new ze(e, t, new ll(r, i));
|
|
7700
7700
|
}
|
|
7701
7701
|
/**
|
|
7702
7702
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -8006,7 +8006,7 @@ function nd(n, e) {
|
|
|
8006
8006
|
let t = [];
|
|
8007
8007
|
for (let r = 0; r < n.length; r++) {
|
|
8008
8008
|
let i = n[r];
|
|
8009
|
-
t.push(new
|
|
8009
|
+
t.push(new ze(i.from + e, i.to + e, i.type));
|
|
8010
8010
|
}
|
|
8011
8011
|
return t;
|
|
8012
8012
|
}
|
|
@@ -8150,7 +8150,7 @@ class gg {
|
|
|
8150
8150
|
this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
|
|
8151
8151
|
}
|
|
8152
8152
|
onSelectionChange() {
|
|
8153
|
-
if (
|
|
8153
|
+
if (_a(this.view)) {
|
|
8154
8154
|
if (this.suppressingSelectionUpdates)
|
|
8155
8155
|
return Ht(this.view);
|
|
8156
8156
|
if (Je && sn <= 11 && !this.view.state.selection.empty) {
|
|
@@ -8194,7 +8194,7 @@ class gg {
|
|
|
8194
8194
|
return;
|
|
8195
8195
|
let t = this.pendingRecords();
|
|
8196
8196
|
t.length && (this.queue = []);
|
|
8197
|
-
let r = e.domSelectionRange(), i = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) &&
|
|
8197
|
+
let r = e.domSelectionRange(), i = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && _a(e) && !this.ignoreSelectionChange(r), s = -1, o = -1, l = !1, a = [];
|
|
8198
8198
|
if (e.editable)
|
|
8199
8199
|
for (let u = 0; u < t.length; u++) {
|
|
8200
8200
|
let d = this.registerMutation(t[u], a);
|
|
@@ -8283,7 +8283,7 @@ function wg(n, e) {
|
|
|
8283
8283
|
}
|
|
8284
8284
|
function kg(n, e, t) {
|
|
8285
8285
|
let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, u = a.anchorNode;
|
|
8286
|
-
if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], hs(a) || c.push({ node: a.focusNode, offset: a.focusOffset })),
|
|
8286
|
+
if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], hs(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), $e && n.input.lastKeyCode === 8)
|
|
8287
8287
|
for (let g = s; g > i; g--) {
|
|
8288
8288
|
let b = r.childNodes[g - 1], w = b.pmViewDesc;
|
|
8289
8289
|
if (b.nodeName == "BR" && !w) {
|
|
@@ -8328,11 +8328,11 @@ const vg = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
|
|
|
8328
8328
|
function Sg(n, e, t, r, i) {
|
|
8329
8329
|
let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
|
|
8330
8330
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
8331
|
-
let E = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null,
|
|
8332
|
-
if (
|
|
8333
|
-
if (
|
|
8331
|
+
let E = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, $ = tl(n, E);
|
|
8332
|
+
if ($ && !n.state.selection.eq($)) {
|
|
8333
|
+
if ($e && $t && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (V) => V(n, yn(13, "Enter"))))
|
|
8334
8334
|
return;
|
|
8335
|
-
let W = n.state.tr.setSelection(
|
|
8335
|
+
let W = n.state.tr.setSelection($);
|
|
8336
8336
|
E == "pointer" ? W.setMeta("pointer", !0) : E == "key" && W.scrollIntoView(), s && W.setMeta("composition", s), n.dispatch(W);
|
|
8337
8337
|
}
|
|
8338
8338
|
return;
|
|
@@ -8342,7 +8342,7 @@ function Sg(n, e, t, r, i) {
|
|
|
8342
8342
|
let a = n.state.selection, c = kg(n, e, t), u = n.state.doc, d = u.slice(c.from, c.to), f, h;
|
|
8343
8343
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
|
|
8344
8344
|
let p = Eg(d.content, c.doc.content, c.from, f, h);
|
|
8345
|
-
if (p && n.input.domChangeCount++, (Gn && n.input.lastIOSEnter > Date.now() - 225 ||
|
|
8345
|
+
if (p && n.input.domChangeCount++, (Gn && n.input.lastIOSEnter > Date.now() - 225 || $t) && i.some((E) => E.nodeType == 1 && !vg.test(E.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (E) => E(n, yn(13, "Enter")))) {
|
|
8346
8346
|
n.input.lastIOSEnter = 0;
|
|
8347
8347
|
return;
|
|
8348
8348
|
}
|
|
@@ -8353,8 +8353,8 @@ function Sg(n, e, t, r, i) {
|
|
|
8353
8353
|
if (c.sel) {
|
|
8354
8354
|
let E = Xa(n, n.state.doc, c.sel);
|
|
8355
8355
|
if (E && !E.eq(n.state.selection)) {
|
|
8356
|
-
let
|
|
8357
|
-
s &&
|
|
8356
|
+
let $ = n.state.tr.setSelection(E);
|
|
8357
|
+
s && $.setMeta("composition", s), n.dispatch($);
|
|
8358
8358
|
}
|
|
8359
8359
|
}
|
|
8360
8360
|
return;
|
|
@@ -8366,27 +8366,27 @@ function Sg(n, e, t, r, i) {
|
|
|
8366
8366
|
return;
|
|
8367
8367
|
}
|
|
8368
8368
|
if (n.state.selection.anchor > p.start && Mg(u, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (E) => E(n, yn(8, "Backspace")))) {
|
|
8369
|
-
|
|
8369
|
+
$t && $e && n.domObserver.suppressSelectionUpdates();
|
|
8370
8370
|
return;
|
|
8371
8371
|
}
|
|
8372
|
-
|
|
8372
|
+
$e && p.endB == p.start && (n.input.lastChromeDelete = Date.now()), $t && !w && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
|
|
8373
8373
|
n.someProp("handleKeyDown", function(E) {
|
|
8374
8374
|
return E(n, yn(13, "Enter"));
|
|
8375
8375
|
});
|
|
8376
8376
|
}, 20));
|
|
8377
8377
|
let v = p.start, R = p.endA, C = (E) => {
|
|
8378
|
-
let
|
|
8378
|
+
let $ = E || n.state.tr.replace(v, R, c.doc.slice(p.start - c.from, p.endB - c.from));
|
|
8379
8379
|
if (c.sel) {
|
|
8380
|
-
let W = Xa(n,
|
|
8381
|
-
W && !(
|
|
8380
|
+
let W = Xa(n, $.doc, c.sel);
|
|
8381
|
+
W && !($e && n.composing && W.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (W.head == v || W.head == $.mapping.map(R) - 1) || Je && W.empty && W.head == v) && $.setSelection(W);
|
|
8382
8382
|
}
|
|
8383
|
-
return s &&
|
|
8383
|
+
return s && $.setMeta("composition", s), $.scrollIntoView();
|
|
8384
8384
|
}, D;
|
|
8385
8385
|
if (w) {
|
|
8386
8386
|
if (m.pos == g.pos) {
|
|
8387
8387
|
Je && sn <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Ht(n), 20));
|
|
8388
|
-
let E = C(n.state.tr.delete(v, R)),
|
|
8389
|
-
|
|
8388
|
+
let E = C(n.state.tr.delete(v, R)), $ = u.resolve(p.start).marksAcross(u.resolve(p.endA));
|
|
8389
|
+
$ && E.ensureMarks($), n.dispatch(E);
|
|
8390
8390
|
} else if (
|
|
8391
8391
|
// Adding or removing a mark
|
|
8392
8392
|
p.endA == p.endB && (D = Cg(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, p.endA - b.start())))
|
|
@@ -8394,8 +8394,8 @@ function Sg(n, e, t, r, i) {
|
|
|
8394
8394
|
let E = C(n.state.tr);
|
|
8395
8395
|
D.type == "add" ? E.addMark(v, R, D.mark) : E.removeMark(v, R, D.mark), n.dispatch(E);
|
|
8396
8396
|
} else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
|
|
8397
|
-
let E = m.parent.textBetween(m.parentOffset, g.parentOffset),
|
|
8398
|
-
n.someProp("handleTextInput", (W) => W(n, v, R, E,
|
|
8397
|
+
let E = m.parent.textBetween(m.parentOffset, g.parentOffset), $ = () => C(n.state.tr.insertText(E, v, R));
|
|
8398
|
+
n.someProp("handleTextInput", (W) => W(n, v, R, E, $)) || n.dispatch($());
|
|
8399
8399
|
}
|
|
8400
8400
|
} else
|
|
8401
8401
|
n.dispatch(C());
|
|
@@ -8550,9 +8550,9 @@ class sd {
|
|
|
8550
8550
|
let f = u == "preserve" && o && this.dom.style.overflowAnchor == null && om(this);
|
|
8551
8551
|
if (o) {
|
|
8552
8552
|
this.domObserver.stop();
|
|
8553
|
-
let h = d && (Je ||
|
|
8553
|
+
let h = d && (Je || $e) && !this.composing && !i.selection.empty && !e.selection.empty && Tg(i.selection, e.selection);
|
|
8554
8554
|
if (d) {
|
|
8555
|
-
let p =
|
|
8555
|
+
let p = $e ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
8556
8556
|
this.composing && (this.input.compositionNode = sg(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Da(e.doc, c, a, this.dom, this)), p && !this.trackWrites && (h = !0);
|
|
8557
8557
|
}
|
|
8558
8558
|
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Nm(this)) ? Ht(this, h) : (Hu(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
@@ -8565,7 +8565,7 @@ class sd {
|
|
|
8565
8565
|
scrollToSelection() {
|
|
8566
8566
|
let e = this.domSelectionRange().focusNode;
|
|
8567
8567
|
if (!(!e || !this.dom.contains(e.nodeType == 1 ? e : e.parentNode))) {
|
|
8568
|
-
if (!this.someProp("handleScrollToSelection", (t) => t(this))) if (this.state.selection instanceof
|
|
8568
|
+
if (!this.someProp("handleScrollToSelection", (t) => t(this))) if (this.state.selection instanceof _) {
|
|
8569
8569
|
let t = this.docView.domAfterPos(this.state.selection.from);
|
|
8570
8570
|
t.nodeType == 1 && Ta(this, t.getBoundingClientRect(), e);
|
|
8571
8571
|
} else
|
|
@@ -8602,7 +8602,7 @@ class sd {
|
|
|
8602
8602
|
let s = r.from + (this.state.doc.content.size - t.doc.content.size);
|
|
8603
8603
|
(s > 0 && this.state.doc.nodeAt(s)) == r.node && (i = s);
|
|
8604
8604
|
}
|
|
8605
|
-
this.dragging = new ed(e.slice, e.move, i < 0 ? void 0 :
|
|
8605
|
+
this.dragging = new ed(e.slice, e.move, i < 0 ? void 0 : _.create(this.state.doc, i));
|
|
8606
8606
|
}
|
|
8607
8607
|
someProp(e, t) {
|
|
8608
8608
|
let r = this._props && this._props[e], i;
|
|
@@ -8815,12 +8815,12 @@ function Za(n) {
|
|
|
8815
8815
|
if (typeof t == "function" && (t = t(n.state)), t)
|
|
8816
8816
|
for (let r in t)
|
|
8817
8817
|
r == "class" ? e.class += " " + t[r] : r == "style" ? e.style = (e.style ? e.style + ";" : "") + t[r] : !e[r] && r != "contenteditable" && r != "nodeName" && (e[r] = String(t[r]));
|
|
8818
|
-
}), e.translate || (e.translate = "no"), [
|
|
8818
|
+
}), e.translate || (e.translate = "no"), [ze.node(0, n.state.doc.content.size, e)];
|
|
8819
8819
|
}
|
|
8820
8820
|
function ec(n) {
|
|
8821
8821
|
if (n.markCursor) {
|
|
8822
8822
|
let e = document.createElement("img");
|
|
8823
|
-
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), n.cursorWrapper = { dom: e, deco:
|
|
8823
|
+
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), n.cursorWrapper = { dom: e, deco: ze.widget(n.state.selection.from, e, { raw: !0, marks: n.markCursor }) };
|
|
8824
8824
|
} else
|
|
8825
8825
|
n.cursorWrapper = null;
|
|
8826
8826
|
}
|
|
@@ -9015,13 +9015,13 @@ const ld = (n, e, t) => {
|
|
|
9015
9015
|
let s = i.nodeBefore;
|
|
9016
9016
|
if (gd(n, i, e, -1))
|
|
9017
9017
|
return !0;
|
|
9018
|
-
if (r.parent.content.size == 0 && (Yn(s, "end") ||
|
|
9018
|
+
if (r.parent.content.size == 0 && (Yn(s, "end") || _.isSelectable(s)))
|
|
9019
9019
|
for (let o = r.depth; ; o--) {
|
|
9020
9020
|
let l = ds(n.doc, r.before(o), r.after(o), A.empty);
|
|
9021
9021
|
if (l && l.slice.size < l.to - l.from) {
|
|
9022
9022
|
if (e) {
|
|
9023
9023
|
let a = n.tr.step(l);
|
|
9024
|
-
a.setSelection(Yn(s, "end") ? F.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) :
|
|
9024
|
+
a.setSelection(Yn(s, "end") ? F.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : _.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
|
|
9025
9025
|
}
|
|
9026
9026
|
return !0;
|
|
9027
9027
|
}
|
|
@@ -9029,13 +9029,13 @@ const ld = (n, e, t) => {
|
|
|
9029
9029
|
break;
|
|
9030
9030
|
}
|
|
9031
9031
|
return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos - s.nodeSize, i.pos).scrollIntoView()), !0) : !1;
|
|
9032
|
-
},
|
|
9032
|
+
}, $g = (n, e, t) => {
|
|
9033
9033
|
let r = od(n, t);
|
|
9034
9034
|
if (!r)
|
|
9035
9035
|
return !1;
|
|
9036
9036
|
let i = dl(r);
|
|
9037
9037
|
return i ? ad(n, i, e) : !1;
|
|
9038
|
-
},
|
|
9038
|
+
}, zg = (n, e, t) => {
|
|
9039
9039
|
let r = ud(n, t);
|
|
9040
9040
|
if (!r)
|
|
9041
9041
|
return !1;
|
|
@@ -9089,7 +9089,7 @@ const cd = (n, e, t) => {
|
|
|
9089
9089
|
s = dl(r);
|
|
9090
9090
|
}
|
|
9091
9091
|
let o = s && s.nodeBefore;
|
|
9092
|
-
return !o || !
|
|
9092
|
+
return !o || !_.isSelectable(o) ? !1 : (e && e(n.tr.setSelection(_.create(n.doc, s.pos - o.nodeSize)).scrollIntoView()), !0);
|
|
9093
9093
|
};
|
|
9094
9094
|
function dl(n) {
|
|
9095
9095
|
if (!n.parent.type.spec.isolating)
|
|
@@ -9115,12 +9115,12 @@ const dd = (n, e, t) => {
|
|
|
9115
9115
|
let s = i.nodeAfter;
|
|
9116
9116
|
if (gd(n, i, e, 1))
|
|
9117
9117
|
return !0;
|
|
9118
|
-
if (r.parent.content.size == 0 && (Yn(s, "start") ||
|
|
9118
|
+
if (r.parent.content.size == 0 && (Yn(s, "start") || _.isSelectable(s))) {
|
|
9119
9119
|
let o = ds(n.doc, r.before(), r.after(), A.empty);
|
|
9120
9120
|
if (o && o.slice.size < o.to - o.from) {
|
|
9121
9121
|
if (e) {
|
|
9122
9122
|
let l = n.tr.step(o);
|
|
9123
|
-
l.setSelection(Yn(s, "start") ? F.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) :
|
|
9123
|
+
l.setSelection(Yn(s, "start") ? F.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : _.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
|
|
9124
9124
|
}
|
|
9125
9125
|
return !0;
|
|
9126
9126
|
}
|
|
@@ -9136,7 +9136,7 @@ const dd = (n, e, t) => {
|
|
|
9136
9136
|
s = fl(r);
|
|
9137
9137
|
}
|
|
9138
9138
|
let o = s && s.nodeAfter;
|
|
9139
|
-
return !o || !
|
|
9139
|
+
return !o || !_.isSelectable(o) ? !1 : (e && e(n.tr.setSelection(_.create(n.doc, s.pos)).scrollIntoView()), !0);
|
|
9140
9140
|
};
|
|
9141
9141
|
function fl(n) {
|
|
9142
9142
|
if (!n.parent.type.spec.isolating)
|
|
@@ -9149,8 +9149,8 @@ function fl(n) {
|
|
|
9149
9149
|
}
|
|
9150
9150
|
return null;
|
|
9151
9151
|
}
|
|
9152
|
-
const
|
|
9153
|
-
let t = n.selection, r = t instanceof
|
|
9152
|
+
const _g = (n, e) => {
|
|
9153
|
+
let t = n.selection, r = t instanceof _, i;
|
|
9154
9154
|
if (r) {
|
|
9155
9155
|
if (t.node.isTextblock || !fn(n.doc, t.from))
|
|
9156
9156
|
return !1;
|
|
@@ -9159,12 +9159,12 @@ const zg = (n, e) => {
|
|
|
9159
9159
|
return !1;
|
|
9160
9160
|
if (e) {
|
|
9161
9161
|
let s = n.tr.join(i);
|
|
9162
|
-
r && s.setSelection(
|
|
9162
|
+
r && s.setSelection(_.create(s.doc, i - n.doc.resolve(i).nodeBefore.nodeSize)), e(s.scrollIntoView());
|
|
9163
9163
|
}
|
|
9164
9164
|
return !0;
|
|
9165
9165
|
}, Hg = (n, e) => {
|
|
9166
9166
|
let t = n.selection, r;
|
|
9167
|
-
if (t instanceof
|
|
9167
|
+
if (t instanceof _) {
|
|
9168
9168
|
if (t.node.isTextblock || !fn(n.doc, t.to))
|
|
9169
9169
|
return !1;
|
|
9170
9170
|
r = t.to;
|
|
@@ -9217,7 +9217,7 @@ const Vg = (n, e) => {
|
|
|
9217
9217
|
return !1;
|
|
9218
9218
|
if (t.depth > 1 && t.after() != t.end(-1)) {
|
|
9219
9219
|
let s = t.before();
|
|
9220
|
-
if (
|
|
9220
|
+
if (_t(n.doc, s))
|
|
9221
9221
|
return e && e(n.tr.split(s).scrollIntoView()), !0;
|
|
9222
9222
|
}
|
|
9223
9223
|
let r = t.blockRange(), i = r && nr(r);
|
|
@@ -9226,8 +9226,8 @@ const Vg = (n, e) => {
|
|
|
9226
9226
|
function jg(n) {
|
|
9227
9227
|
return (e, t) => {
|
|
9228
9228
|
let { $from: r, $to: i } = e.selection;
|
|
9229
|
-
if (e.selection instanceof
|
|
9230
|
-
return !r.parentOffset || !
|
|
9229
|
+
if (e.selection instanceof _ && e.selection.node.isBlock)
|
|
9230
|
+
return !r.parentOffset || !_t(e.doc, r.pos) ? !1 : (t && t(e.tr.split(r.pos).scrollIntoView()), !0);
|
|
9231
9231
|
if (!r.depth)
|
|
9232
9232
|
return !1;
|
|
9233
9233
|
let s = [], o, l, a = !1, c = !1;
|
|
@@ -9242,8 +9242,8 @@ function jg(n) {
|
|
|
9242
9242
|
}
|
|
9243
9243
|
let u = e.tr;
|
|
9244
9244
|
(e.selection instanceof j || e.selection instanceof Qe) && u.deleteSelection();
|
|
9245
|
-
let d = u.mapping.map(r.pos), f =
|
|
9246
|
-
if (f || (s[0] = l ? { type: l } : null, f =
|
|
9245
|
+
let d = u.mapping.map(r.pos), f = _t(u.doc, d, s.length, s);
|
|
9246
|
+
if (f || (s[0] = l ? { type: l } : null, f = _t(u.doc, d, s.length, s)), !f)
|
|
9247
9247
|
return !1;
|
|
9248
9248
|
if (u.split(d, s.length, s), !a && c && r.node(o).type != l) {
|
|
9249
9249
|
let h = u.mapping.map(r.before(o)), p = u.doc.resolve(h);
|
|
@@ -9254,7 +9254,7 @@ function jg(n) {
|
|
|
9254
9254
|
}
|
|
9255
9255
|
const Ug = jg(), Wg = (n, e) => {
|
|
9256
9256
|
let { $from: t, to: r } = n.selection, i, s = t.sharedDepth(r);
|
|
9257
|
-
return s == 0 ? !1 : (i = t.before(s), e && e(n.tr.setSelection(
|
|
9257
|
+
return s == 0 ? !1 : (i = t.before(s), e && e(n.tr.setSelection(_.create(n.doc, i))), !0);
|
|
9258
9258
|
};
|
|
9259
9259
|
function Kg(n, e, t) {
|
|
9260
9260
|
let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
|
|
@@ -9389,7 +9389,7 @@ function Qg(n, e, t, r, i) {
|
|
|
9389
9389
|
t[u].type == i && (o = u + 1);
|
|
9390
9390
|
let l = t.length - o, a = e.start + t.length - (r ? 2 : 0), c = e.parent;
|
|
9391
9391
|
for (let u = e.startIndex, d = e.endIndex, f = !0; u < d; u++, f = !1)
|
|
9392
|
-
!f &&
|
|
9392
|
+
!f && _t(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(u).nodeSize;
|
|
9393
9393
|
return n;
|
|
9394
9394
|
}
|
|
9395
9395
|
function Zg(n) {
|
|
@@ -9681,10 +9681,10 @@ function ly(n, e) {
|
|
|
9681
9681
|
function bs(n) {
|
|
9682
9682
|
return (e) => ly(e.$from, n);
|
|
9683
9683
|
}
|
|
9684
|
-
function
|
|
9685
|
-
return n.config[e] === void 0 && n.parent ?
|
|
9684
|
+
function z(n, e, t) {
|
|
9685
|
+
return n.config[e] === void 0 && n.parent ? z(n.parent, e, t) : typeof n.config[e] == "function" ? n.config[e].bind({
|
|
9686
9686
|
...t,
|
|
9687
|
-
parent: n.parent ?
|
|
9687
|
+
parent: n.parent ? z(n.parent, e, t) : null
|
|
9688
9688
|
}) : n.config[e];
|
|
9689
9689
|
}
|
|
9690
9690
|
function ml(n) {
|
|
@@ -9693,7 +9693,7 @@ function ml(n) {
|
|
|
9693
9693
|
name: e.name,
|
|
9694
9694
|
options: e.options,
|
|
9695
9695
|
storage: e.storage
|
|
9696
|
-
}, r =
|
|
9696
|
+
}, r = z(e, "addExtensions", t);
|
|
9697
9697
|
return r ? [e, ...ml(r())] : e;
|
|
9698
9698
|
}).flat(10);
|
|
9699
9699
|
}
|
|
@@ -9734,7 +9734,7 @@ function vd(n) {
|
|
|
9734
9734
|
options: o.options,
|
|
9735
9735
|
storage: o.storage,
|
|
9736
9736
|
extensions: i
|
|
9737
|
-
}, a =
|
|
9737
|
+
}, a = z(
|
|
9738
9738
|
o,
|
|
9739
9739
|
"addGlobalAttributes",
|
|
9740
9740
|
l
|
|
@@ -9760,7 +9760,7 @@ function vd(n) {
|
|
|
9760
9760
|
name: o.name,
|
|
9761
9761
|
options: o.options,
|
|
9762
9762
|
storage: o.storage
|
|
9763
|
-
}, a =
|
|
9763
|
+
}, a = z(
|
|
9764
9764
|
o,
|
|
9765
9765
|
"addAttributes",
|
|
9766
9766
|
l
|
|
@@ -9840,7 +9840,7 @@ function oc(n) {
|
|
|
9840
9840
|
}
|
|
9841
9841
|
function uy(n, e) {
|
|
9842
9842
|
var t;
|
|
9843
|
-
const r = vd(n), { nodeExtensions: i, markExtensions: s } = Ar(n), o = (t = i.find((c) =>
|
|
9843
|
+
const r = vd(n), { nodeExtensions: i, markExtensions: s } = Ar(n), o = (t = i.find((c) => z(c, "topNode"))) == null ? void 0 : t.name, l = Object.fromEntries(
|
|
9844
9844
|
i.map((c) => {
|
|
9845
9845
|
const u = r.filter((b) => b.type === c.name), d = {
|
|
9846
9846
|
name: c.name,
|
|
@@ -9848,27 +9848,27 @@ function uy(n, e) {
|
|
|
9848
9848
|
storage: c.storage,
|
|
9849
9849
|
editor: e
|
|
9850
9850
|
}, f = n.reduce((b, w) => {
|
|
9851
|
-
const v =
|
|
9851
|
+
const v = z(w, "extendNodeSchema", d);
|
|
9852
9852
|
return {
|
|
9853
9853
|
...b,
|
|
9854
9854
|
...v ? v(c) : {}
|
|
9855
9855
|
};
|
|
9856
9856
|
}, {}), h = oc({
|
|
9857
9857
|
...f,
|
|
9858
|
-
content: re(
|
|
9859
|
-
marks: re(
|
|
9860
|
-
group: re(
|
|
9861
|
-
inline: re(
|
|
9862
|
-
atom: re(
|
|
9863
|
-
selectable: re(
|
|
9864
|
-
draggable: re(
|
|
9865
|
-
code: re(
|
|
9866
|
-
whitespace: re(
|
|
9858
|
+
content: re(z(c, "content", d)),
|
|
9859
|
+
marks: re(z(c, "marks", d)),
|
|
9860
|
+
group: re(z(c, "group", d)),
|
|
9861
|
+
inline: re(z(c, "inline", d)),
|
|
9862
|
+
atom: re(z(c, "atom", d)),
|
|
9863
|
+
selectable: re(z(c, "selectable", d)),
|
|
9864
|
+
draggable: re(z(c, "draggable", d)),
|
|
9865
|
+
code: re(z(c, "code", d)),
|
|
9866
|
+
whitespace: re(z(c, "whitespace", d)),
|
|
9867
9867
|
linebreakReplacement: re(
|
|
9868
|
-
|
|
9868
|
+
z(c, "linebreakReplacement", d)
|
|
9869
9869
|
),
|
|
9870
|
-
defining: re(
|
|
9871
|
-
isolating: re(
|
|
9870
|
+
defining: re(z(c, "defining", d)),
|
|
9871
|
+
isolating: re(z(c, "isolating", d)),
|
|
9872
9872
|
attrs: Object.fromEntries(
|
|
9873
9873
|
u.map((b) => {
|
|
9874
9874
|
var w, v;
|
|
@@ -9878,16 +9878,16 @@ function uy(n, e) {
|
|
|
9878
9878
|
];
|
|
9879
9879
|
})
|
|
9880
9880
|
)
|
|
9881
|
-
}), p = re(
|
|
9881
|
+
}), p = re(z(c, "parseHTML", d));
|
|
9882
9882
|
p && (h.parseDOM = p.map(
|
|
9883
9883
|
(b) => sc(b, u)
|
|
9884
9884
|
));
|
|
9885
|
-
const m =
|
|
9885
|
+
const m = z(c, "renderHTML", d);
|
|
9886
9886
|
m && (h.toDOM = (b) => m({
|
|
9887
9887
|
node: b,
|
|
9888
9888
|
HTMLAttributes: Ei(b, u)
|
|
9889
9889
|
}));
|
|
9890
|
-
const g =
|
|
9890
|
+
const g = z(c, "renderText", d);
|
|
9891
9891
|
return g && (h.toText = g), [c.name, h];
|
|
9892
9892
|
})
|
|
9893
9893
|
), a = Object.fromEntries(
|
|
@@ -9898,18 +9898,18 @@ function uy(n, e) {
|
|
|
9898
9898
|
storage: c.storage,
|
|
9899
9899
|
editor: e
|
|
9900
9900
|
}, f = n.reduce((g, b) => {
|
|
9901
|
-
const w =
|
|
9901
|
+
const w = z(b, "extendMarkSchema", d);
|
|
9902
9902
|
return {
|
|
9903
9903
|
...g,
|
|
9904
9904
|
...w ? w(c) : {}
|
|
9905
9905
|
};
|
|
9906
9906
|
}, {}), h = oc({
|
|
9907
9907
|
...f,
|
|
9908
|
-
inclusive: re(
|
|
9909
|
-
excludes: re(
|
|
9910
|
-
group: re(
|
|
9911
|
-
spanning: re(
|
|
9912
|
-
code: re(
|
|
9908
|
+
inclusive: re(z(c, "inclusive", d)),
|
|
9909
|
+
excludes: re(z(c, "excludes", d)),
|
|
9910
|
+
group: re(z(c, "group", d)),
|
|
9911
|
+
spanning: re(z(c, "spanning", d)),
|
|
9912
|
+
code: re(z(c, "code", d)),
|
|
9913
9913
|
attrs: Object.fromEntries(
|
|
9914
9914
|
u.map((g) => {
|
|
9915
9915
|
var b, w;
|
|
@@ -9919,11 +9919,11 @@ function uy(n, e) {
|
|
|
9919
9919
|
];
|
|
9920
9920
|
})
|
|
9921
9921
|
)
|
|
9922
|
-
}), p = re(
|
|
9922
|
+
}), p = re(z(c, "parseHTML", d));
|
|
9923
9923
|
p && (h.parseDOM = p.map(
|
|
9924
9924
|
(g) => sc(g, u)
|
|
9925
9925
|
));
|
|
9926
|
-
const m =
|
|
9926
|
+
const m = z(c, "renderHTML", d);
|
|
9927
9927
|
return m && (h.toDOM = (g) => m({
|
|
9928
9928
|
mark: g,
|
|
9929
9929
|
HTMLAttributes: Ei(g, u)
|
|
@@ -9942,7 +9942,7 @@ function dy(n) {
|
|
|
9942
9942
|
}
|
|
9943
9943
|
function yl(n) {
|
|
9944
9944
|
return n.sort((t, r) => {
|
|
9945
|
-
const i =
|
|
9945
|
+
const i = z(t, "priority") || 100, s = z(r, "priority") || 100;
|
|
9946
9946
|
return i > s ? -1 : i < s ? 1 : 0;
|
|
9947
9947
|
});
|
|
9948
9948
|
}
|
|
@@ -10223,7 +10223,7 @@ function cc(n, e) {
|
|
|
10223
10223
|
name: r.name,
|
|
10224
10224
|
options: r.options,
|
|
10225
10225
|
storage: r.storage
|
|
10226
|
-
}, s = re(
|
|
10226
|
+
}, s = re(z(r, "group", i));
|
|
10227
10227
|
return typeof s != "string" ? !1 : s.split(" ").includes("list");
|
|
10228
10228
|
}
|
|
10229
10229
|
function ks(n, {
|
|
@@ -10252,16 +10252,16 @@ function ks(n, {
|
|
|
10252
10252
|
return !1;
|
|
10253
10253
|
}
|
|
10254
10254
|
function Nd(n) {
|
|
10255
|
-
return n instanceof
|
|
10255
|
+
return n instanceof _;
|
|
10256
10256
|
}
|
|
10257
10257
|
function vl(n) {
|
|
10258
10258
|
return n instanceof j;
|
|
10259
10259
|
}
|
|
10260
|
-
function
|
|
10260
|
+
function zt(n = 0, e = 0, t = 0) {
|
|
10261
10261
|
return Math.min(Math.max(n, e), t);
|
|
10262
10262
|
}
|
|
10263
10263
|
function Rd(n, e, t) {
|
|
10264
|
-
const i = n.state.doc.content.size, s =
|
|
10264
|
+
const i = n.state.doc.content.size, s = zt(e, 0, i), o = zt(t, 0, i), l = n.coordsAtPos(s), a = n.coordsAtPos(o, -1), c = Math.min(l.top, a.top), u = Math.max(l.bottom, a.bottom), d = Math.min(l.left, a.left), f = Math.max(l.right, a.right), h = f - d, p = u - c, b = {
|
|
10265
10265
|
top: c,
|
|
10266
10266
|
bottom: u,
|
|
10267
10267
|
left: d,
|
|
@@ -10285,7 +10285,7 @@ function Id(n, e = null) {
|
|
|
10285
10285
|
if (e === "end")
|
|
10286
10286
|
return r;
|
|
10287
10287
|
const i = t.from, s = r.to;
|
|
10288
|
-
return e === "all" ? j.create(n,
|
|
10288
|
+
return e === "all" ? j.create(n, zt(0, i, s), zt(n.content.size, i, s)) : j.create(n, zt(e, i, s), zt(e, i, s));
|
|
10289
10289
|
}
|
|
10290
10290
|
function ky(n, e, t) {
|
|
10291
10291
|
const r = n.steps.length - 1;
|
|
@@ -10454,7 +10454,7 @@ var Sl = class {
|
|
|
10454
10454
|
get options() {
|
|
10455
10455
|
return {
|
|
10456
10456
|
...re(
|
|
10457
|
-
|
|
10457
|
+
z(this, "addOptions", {
|
|
10458
10458
|
name: this.name
|
|
10459
10459
|
})
|
|
10460
10460
|
) || {}
|
|
@@ -10463,7 +10463,7 @@ var Sl = class {
|
|
|
10463
10463
|
get storage() {
|
|
10464
10464
|
return {
|
|
10465
10465
|
...re(
|
|
10466
|
-
|
|
10466
|
+
z(this, "addStorage", {
|
|
10467
10467
|
name: this.name,
|
|
10468
10468
|
options: this.options
|
|
10469
10469
|
})
|
|
@@ -10645,13 +10645,13 @@ function Ay(n) {
|
|
|
10645
10645
|
if (w) {
|
|
10646
10646
|
let { text: C } = b;
|
|
10647
10647
|
typeof C == "string" ? C = C : C = gl(x.from(C), h.schema);
|
|
10648
|
-
const { from: D } = b, E = D + C.length,
|
|
10648
|
+
const { from: D } = b, E = D + C.length, $ = Oy(C);
|
|
10649
10649
|
return a({
|
|
10650
10650
|
rule: u,
|
|
10651
10651
|
state: h,
|
|
10652
10652
|
from: D,
|
|
10653
10653
|
to: { b: E },
|
|
10654
|
-
pasteEvt:
|
|
10654
|
+
pasteEvt: $
|
|
10655
10655
|
});
|
|
10656
10656
|
}
|
|
10657
10657
|
const v = f.doc.content.findDiffStart(h.doc.content), R = f.doc.content.findDiffEnd(h.doc.content);
|
|
@@ -10682,7 +10682,7 @@ var vs = class {
|
|
|
10682
10682
|
storage: this.editor.extensionStorage[e.name],
|
|
10683
10683
|
editor: this.editor,
|
|
10684
10684
|
type: Qs(e.name, this.schema)
|
|
10685
|
-
}, r =
|
|
10685
|
+
}, r = z(e, "addCommands", t);
|
|
10686
10686
|
return r ? {
|
|
10687
10687
|
...n,
|
|
10688
10688
|
...r()
|
|
@@ -10702,13 +10702,13 @@ var vs = class {
|
|
|
10702
10702
|
storage: this.editor.extensionStorage[r.name],
|
|
10703
10703
|
editor: n,
|
|
10704
10704
|
type: Qs(r.name, this.schema)
|
|
10705
|
-
}, s = [], o =
|
|
10705
|
+
}, s = [], o = z(
|
|
10706
10706
|
r,
|
|
10707
10707
|
"addKeyboardShortcuts",
|
|
10708
10708
|
i
|
|
10709
10709
|
);
|
|
10710
10710
|
let l = {};
|
|
10711
|
-
if (r.type === "mark" &&
|
|
10711
|
+
if (r.type === "mark" && z(r, "exitable", i) && (l.ArrowRight = () => In.handleExit({ editor: n, mark: r })), o) {
|
|
10712
10712
|
const f = Object.fromEntries(
|
|
10713
10713
|
Object.entries(o()).map(([h, p]) => [h, () => p({ editor: n })])
|
|
10714
10714
|
);
|
|
@@ -10716,7 +10716,7 @@ var vs = class {
|
|
|
10716
10716
|
}
|
|
10717
10717
|
const a = Bg(l);
|
|
10718
10718
|
s.push(a);
|
|
10719
|
-
const c =
|
|
10719
|
+
const c = z(r, "addInputRules", i);
|
|
10720
10720
|
if (ac(r, n.options.enableInputRules) && c) {
|
|
10721
10721
|
const f = c();
|
|
10722
10722
|
if (f && f.length) {
|
|
@@ -10727,7 +10727,7 @@ var vs = class {
|
|
|
10727
10727
|
s.push(...p);
|
|
10728
10728
|
}
|
|
10729
10729
|
}
|
|
10730
|
-
const u =
|
|
10730
|
+
const u = z(r, "addPasteRules", i);
|
|
10731
10731
|
if (ac(r, n.options.enablePasteRules) && u) {
|
|
10732
10732
|
const f = u();
|
|
10733
10733
|
if (f && f.length) {
|
|
@@ -10735,7 +10735,7 @@ var vs = class {
|
|
|
10735
10735
|
s.push(...h);
|
|
10736
10736
|
}
|
|
10737
10737
|
}
|
|
10738
|
-
const d =
|
|
10738
|
+
const d = z(
|
|
10739
10739
|
r,
|
|
10740
10740
|
"addProseMirrorPlugins",
|
|
10741
10741
|
i
|
|
@@ -10761,14 +10761,14 @@ var vs = class {
|
|
|
10761
10761
|
get nodeViews() {
|
|
10762
10762
|
const { editor: n } = this, { nodeExtensions: e } = Ar(this.extensions);
|
|
10763
10763
|
return Object.fromEntries(
|
|
10764
|
-
e.filter((t) =>
|
|
10764
|
+
e.filter((t) => !!z(t, "addNodeView")).map((t) => {
|
|
10765
10765
|
const r = this.attributes.filter((l) => l.type === t.name), i = {
|
|
10766
10766
|
name: t.name,
|
|
10767
10767
|
options: t.options,
|
|
10768
10768
|
storage: this.editor.extensionStorage[t.name],
|
|
10769
10769
|
editor: n,
|
|
10770
10770
|
type: ve(t.name, this.schema)
|
|
10771
|
-
}, s =
|
|
10771
|
+
}, s = z(t, "addNodeView", i);
|
|
10772
10772
|
if (!s)
|
|
10773
10773
|
return [];
|
|
10774
10774
|
const o = (l, a, c, u, d) => {
|
|
@@ -10793,14 +10793,14 @@ var vs = class {
|
|
|
10793
10793
|
get markViews() {
|
|
10794
10794
|
const { editor: n } = this, { markExtensions: e } = Ar(this.extensions);
|
|
10795
10795
|
return Object.fromEntries(
|
|
10796
|
-
e.filter((t) =>
|
|
10796
|
+
e.filter((t) => !!z(t, "addMarkView")).map((t) => {
|
|
10797
10797
|
const r = this.attributes.filter((l) => l.type === t.name), i = {
|
|
10798
10798
|
name: t.name,
|
|
10799
10799
|
options: t.options,
|
|
10800
10800
|
storage: this.editor.extensionStorage[t.name],
|
|
10801
10801
|
editor: n,
|
|
10802
10802
|
type: Ft(t.name, this.schema)
|
|
10803
|
-
}, s =
|
|
10803
|
+
}, s = z(t, "addMarkView", i);
|
|
10804
10804
|
if (!s)
|
|
10805
10805
|
return [];
|
|
10806
10806
|
const o = (l, a, c) => {
|
|
@@ -10840,12 +10840,12 @@ var vs = class {
|
|
|
10840
10840
|
editor: this.editor,
|
|
10841
10841
|
type: Qs(e.name, this.schema)
|
|
10842
10842
|
};
|
|
10843
|
-
e.type === "mark" && ((t = re(
|
|
10844
|
-
const i =
|
|
10843
|
+
e.type === "mark" && ((t = re(z(e, "keepOnSplit", r))) == null || t) && this.splittableMarks.push(e.name);
|
|
10844
|
+
const i = z(e, "onBeforeCreate", r), s = z(e, "onCreate", r), o = z(e, "onUpdate", r), l = z(
|
|
10845
10845
|
e,
|
|
10846
10846
|
"onSelectionUpdate",
|
|
10847
10847
|
r
|
|
10848
|
-
), a =
|
|
10848
|
+
), a = z(e, "onTransaction", r), c = z(e, "onFocus", r), u = z(e, "onBlur", r), d = z(e, "onDestroy", r);
|
|
10849
10849
|
i && this.editor.on("beforeCreate", i), s && this.editor.on("create", s), o && this.editor.on("update", o), l && this.editor.on("selectionUpdate", l), a && this.editor.on("transaction", a), c && this.editor.on("focus", c), u && this.editor.on("blur", u), d && this.editor.on("destroy", d);
|
|
10850
10850
|
});
|
|
10851
10851
|
}
|
|
@@ -10856,7 +10856,7 @@ vs.flatten = ml;
|
|
|
10856
10856
|
var Ny = {};
|
|
10857
10857
|
bd(Ny, {
|
|
10858
10858
|
ClipboardTextSerializer: () => Bd,
|
|
10859
|
-
Commands: () =>
|
|
10859
|
+
Commands: () => _d,
|
|
10860
10860
|
Delete: () => Hd,
|
|
10861
10861
|
Drop: () => Fd,
|
|
10862
10862
|
Editable: () => Vd,
|
|
@@ -10908,17 +10908,17 @@ var pe = class Ld extends Sl {
|
|
|
10908
10908
|
})
|
|
10909
10909
|
];
|
|
10910
10910
|
}
|
|
10911
|
-
}),
|
|
10912
|
-
bd(
|
|
10911
|
+
}), $d = {};
|
|
10912
|
+
bd($d, {
|
|
10913
10913
|
blur: () => Ry,
|
|
10914
10914
|
clearContent: () => Iy,
|
|
10915
10915
|
clearNodes: () => Dy,
|
|
10916
10916
|
command: () => Py,
|
|
10917
10917
|
createParagraphNear: () => Ly,
|
|
10918
10918
|
cut: () => By,
|
|
10919
|
-
deleteCurrentNode: () =>
|
|
10920
|
-
deleteNode: () =>
|
|
10921
|
-
deleteRange: () =>
|
|
10919
|
+
deleteCurrentNode: () => $y,
|
|
10920
|
+
deleteNode: () => zy,
|
|
10921
|
+
deleteRange: () => _y,
|
|
10922
10922
|
deleteSelection: () => Hy,
|
|
10923
10923
|
enter: () => Fy,
|
|
10924
10924
|
exitCode: () => Vy,
|
|
@@ -10966,8 +10966,8 @@ bd(_d, {
|
|
|
10966
10966
|
unsetAllMarks: () => P0,
|
|
10967
10967
|
unsetMark: () => L0,
|
|
10968
10968
|
updateAttributes: () => B0,
|
|
10969
|
-
wrapIn: () =>
|
|
10970
|
-
wrapInList: () =>
|
|
10969
|
+
wrapIn: () => $0,
|
|
10970
|
+
wrapInList: () => z0
|
|
10971
10971
|
});
|
|
10972
10972
|
var Ry = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
10973
10973
|
var t;
|
|
@@ -10994,7 +10994,7 @@ var Ry = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
10994
10994
|
r.deleteRange(n.from, n.to);
|
|
10995
10995
|
const o = r.mapping.map(e);
|
|
10996
10996
|
return r.insert(o, s.content), r.setSelection(new j(r.doc.resolve(Math.max(o - 1, 0)))), !0;
|
|
10997
|
-
},
|
|
10997
|
+
}, $y = () => ({ tr: n, dispatch: e }) => {
|
|
10998
10998
|
const { selection: t } = n, r = t.$anchor.node();
|
|
10999
10999
|
if (r.content.size > 0)
|
|
11000
11000
|
return !1;
|
|
@@ -11008,7 +11008,7 @@ var Ry = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
11008
11008
|
return !0;
|
|
11009
11009
|
}
|
|
11010
11010
|
return !1;
|
|
11011
|
-
},
|
|
11011
|
+
}, zy = (n) => ({ tr: e, state: t, dispatch: r }) => {
|
|
11012
11012
|
const i = ve(n, t.schema), s = e.selection.$anchor;
|
|
11013
11013
|
for (let o = s.depth; o > 0; o -= 1)
|
|
11014
11014
|
if (s.node(o).type === i) {
|
|
@@ -11019,7 +11019,7 @@ var Ry = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
11019
11019
|
return !0;
|
|
11020
11020
|
}
|
|
11021
11021
|
return !1;
|
|
11022
|
-
},
|
|
11022
|
+
}, _y = (n) => ({ tr: e, dispatch: t }) => {
|
|
11023
11023
|
const { from: r, to: i } = n;
|
|
11024
11024
|
return t && e.delete(r, i), !0;
|
|
11025
11025
|
}, Hy = () => ({ state: n, dispatch: e }) => ul(n, e), Fy = () => ({ commands: n }) => n.keyboardShortcut("Enter"), Vy = () => ({ state: n, dispatch: e }) => Vg(n, e), jy = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
@@ -11128,7 +11128,7 @@ var Ky = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
|
|
|
11128
11128
|
t.updateSelection && ky(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: u, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: u, text: m });
|
|
11129
11129
|
}
|
|
11130
11130
|
return !0;
|
|
11131
|
-
}, Xy = () => ({ state: n, dispatch: e }) =>
|
|
11131
|
+
}, Xy = () => ({ state: n, dispatch: e }) => _g(n, e), Qy = () => ({ state: n, dispatch: e }) => Hg(n, e), Zy = () => ({ state: n, dispatch: e }) => ld(n, e), e0 = () => ({ state: n, dispatch: e }) => dd(n, e), t0 = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
11132
11132
|
try {
|
|
11133
11133
|
const r = us(n.doc, n.selection.$from.pos, -1);
|
|
11134
11134
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
@@ -11142,8 +11142,8 @@ var Ky = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
|
|
|
11142
11142
|
} catch {
|
|
11143
11143
|
return !1;
|
|
11144
11144
|
}
|
|
11145
|
-
}, r0 = () => ({ state: n, dispatch: e }) =>
|
|
11146
|
-
function
|
|
11145
|
+
}, r0 = () => ({ state: n, dispatch: e }) => $g(n, e), i0 = () => ({ state: n, dispatch: e }) => zg(n, e);
|
|
11146
|
+
function zd() {
|
|
11147
11147
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
11148
11148
|
}
|
|
11149
11149
|
function s0(n) {
|
|
@@ -11162,7 +11162,7 @@ function s0(n) {
|
|
|
11162
11162
|
else if (/^s(hift)?$/i.test(a))
|
|
11163
11163
|
s = !0;
|
|
11164
11164
|
else if (/^mod$/i.test(a))
|
|
11165
|
-
Cl() ||
|
|
11165
|
+
Cl() || zd() ? o = !0 : i = !0;
|
|
11166
11166
|
else
|
|
11167
11167
|
throw new Error(`Unrecognized modifier name: ${a}`);
|
|
11168
11168
|
}
|
|
@@ -11284,13 +11284,13 @@ var x0 = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11284
11284
|
return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? i().command(({ commands: l }) => ic(s, { ...o, ...e })(t) ? !0 : l.clearNodes()).command(({ state: l }) => ic(s, { ...o, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
11285
11285
|
}, C0 = (n) => ({ tr: e, dispatch: t }) => {
|
|
11286
11286
|
if (t) {
|
|
11287
|
-
const { doc: r } = e, i =
|
|
11287
|
+
const { doc: r } = e, i = zt(n, 0, r.content.size), s = _.create(r, i);
|
|
11288
11288
|
e.setSelection(s);
|
|
11289
11289
|
}
|
|
11290
11290
|
return !0;
|
|
11291
11291
|
}, M0 = (n) => ({ tr: e, dispatch: t }) => {
|
|
11292
11292
|
if (t) {
|
|
11293
|
-
const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = j.atStart(r).from, l = j.atEnd(r).to, a =
|
|
11293
|
+
const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = j.atStart(r).from, l = j.atEnd(r).to, a = zt(i, o, l), c = zt(s, o, l), u = j.create(r, a, c);
|
|
11294
11294
|
e.setSelection(u);
|
|
11295
11295
|
}
|
|
11296
11296
|
return !0;
|
|
@@ -11307,8 +11307,8 @@ function dc(n, e) {
|
|
|
11307
11307
|
}
|
|
11308
11308
|
var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
|
|
11309
11309
|
const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, u = di(c, l.node().type.name, l.node().attrs);
|
|
11310
|
-
if (s instanceof
|
|
11311
|
-
return !l.parentOffset || !
|
|
11310
|
+
if (s instanceof _ && s.node.isBlock)
|
|
11311
|
+
return !l.parentOffset || !_t(o, l.pos) ? !1 : (r && (n && dc(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
|
|
11312
11312
|
if (!l.parent.isBlock)
|
|
11313
11313
|
return !1;
|
|
11314
11314
|
const d = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 : sy(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
@@ -11317,8 +11317,8 @@ var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11317
11317
|
type: f,
|
|
11318
11318
|
attrs: u
|
|
11319
11319
|
}
|
|
11320
|
-
] : void 0, p =
|
|
11321
|
-
if (!h && !p &&
|
|
11320
|
+
] : void 0, p = _t(e.doc, e.mapping.map(l.pos), 1, h);
|
|
11321
|
+
if (!h && !p && _t(e.doc, e.mapping.map(l.pos), 1, f ? [{ type: f }] : void 0) && (p = !0, h = f ? [
|
|
11322
11322
|
{
|
|
11323
11323
|
type: f,
|
|
11324
11324
|
attrs: u
|
|
@@ -11346,8 +11346,8 @@ var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11346
11346
|
if (i) {
|
|
11347
11347
|
let b = x.empty;
|
|
11348
11348
|
const w = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
|
|
11349
|
-
for (let
|
|
11350
|
-
b = x.from(a.node(
|
|
11349
|
+
for (let $ = a.depth - w; $ >= a.depth - 3; $ -= 1)
|
|
11350
|
+
b = x.from(a.node($).copy(b));
|
|
11351
11351
|
const v = (
|
|
11352
11352
|
// eslint-disable-next-line no-nested-ternary
|
|
11353
11353
|
a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
|
|
@@ -11359,10 +11359,10 @@ var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11359
11359
|
const D = a.before(a.depth - (w - 1));
|
|
11360
11360
|
t.replace(D, a.after(-v), new A(b, 4 - w, 0));
|
|
11361
11361
|
let E = -1;
|
|
11362
|
-
t.doc.nodesBetween(D, t.doc.content.size, (
|
|
11362
|
+
t.doc.nodesBetween(D, t.doc.content.size, ($, W) => {
|
|
11363
11363
|
if (E > -1)
|
|
11364
11364
|
return !1;
|
|
11365
|
-
|
|
11365
|
+
$.isTextblock && $.content.size === 0 && (E = W + 1);
|
|
11366
11366
|
}), E > -1 && t.setSelection(j.near(t.doc.resolve(E))), t.scrollIntoView();
|
|
11367
11367
|
}
|
|
11368
11368
|
return !0;
|
|
@@ -11379,7 +11379,7 @@ var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11379
11379
|
{ type: l, attrs: p },
|
|
11380
11380
|
{ type: h, attrs: m }
|
|
11381
11381
|
] : [{ type: l, attrs: p }];
|
|
11382
|
-
if (!
|
|
11382
|
+
if (!_t(t.doc, a.pos, 2))
|
|
11383
11383
|
return !1;
|
|
11384
11384
|
if (i) {
|
|
11385
11385
|
const { selection: b, storedMarks: w } = r, { splittableMarks: v } = s.extensionManager, R = w || b.$to.parentOffset && b.$from.marks();
|
|
@@ -11419,7 +11419,7 @@ var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11419
11419
|
return a().command(() => (s.setNodeMarkup(C.pos, h), !0)).command(() => Zs(s, h)).command(() => eo(s, h)).run();
|
|
11420
11420
|
}
|
|
11421
11421
|
return !t || !R || !l ? a().command(() => u().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => Zs(s, h)).command(() => eo(s, h)).run() : a().command(() => {
|
|
11422
|
-
const D = u().wrapInList(h, r), E = R.filter((
|
|
11422
|
+
const D = u().wrapInList(h, r), E = R.filter(($) => f.includes($.type.name));
|
|
11423
11423
|
return s.ensureMarks(E), D ? !0 : c.clearNodes();
|
|
11424
11424
|
}).wrapInList(h, r).command(() => Zs(s, h)).command(() => eo(s, h)).run();
|
|
11425
11425
|
}, N0 = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
@@ -11513,17 +11513,17 @@ var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11513
11513
|
);
|
|
11514
11514
|
}));
|
|
11515
11515
|
}), !0) : !1;
|
|
11516
|
-
},
|
|
11516
|
+
}, $0 = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
11517
11517
|
const i = ve(n, t.schema);
|
|
11518
11518
|
return Gg(i, e)(t, r);
|
|
11519
|
-
},
|
|
11519
|
+
}, z0 = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
11520
11520
|
const i = ve(n, t.schema);
|
|
11521
11521
|
return Yg(i, e)(t, r);
|
|
11522
|
-
},
|
|
11522
|
+
}, _d = pe.create({
|
|
11523
11523
|
name: "commands",
|
|
11524
11524
|
addCommands() {
|
|
11525
11525
|
return {
|
|
11526
|
-
|
|
11526
|
+
...$d
|
|
11527
11527
|
};
|
|
11528
11528
|
}
|
|
11529
11529
|
}), Hd = pe.create({
|
|
@@ -11682,7 +11682,7 @@ var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11682
11682
|
"Ctrl-a": () => this.editor.commands.selectTextblockStart(),
|
|
11683
11683
|
"Ctrl-e": () => this.editor.commands.selectTextblockEnd()
|
|
11684
11684
|
};
|
|
11685
|
-
return Cl() ||
|
|
11685
|
+
return Cl() || zd() ? s : i;
|
|
11686
11686
|
},
|
|
11687
11687
|
addProseMirrorPlugins() {
|
|
11688
11688
|
return [
|
|
@@ -11745,7 +11745,7 @@ var T0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11745
11745
|
})
|
|
11746
11746
|
];
|
|
11747
11747
|
}
|
|
11748
|
-
}),
|
|
11748
|
+
}), _0 = class Fn {
|
|
11749
11749
|
constructor(e, t, r = !1, i = null) {
|
|
11750
11750
|
this.currentNode = null, this.actualDepth = null, this.isBlock = r, this.resolvedPos = e, this.editor = t, this.currentNode = i;
|
|
11751
11751
|
}
|
|
@@ -12092,6 +12092,8 @@ var V0 = class extends iy {
|
|
|
12092
12092
|
},
|
|
12093
12093
|
{
|
|
12094
12094
|
get: (e, t) => {
|
|
12095
|
+
if (this.editorView)
|
|
12096
|
+
return this.editorView[t];
|
|
12095
12097
|
if (t === "state")
|
|
12096
12098
|
return this.editorState;
|
|
12097
12099
|
if (t in e)
|
|
@@ -12151,7 +12153,7 @@ var V0 = class extends iy {
|
|
|
12151
12153
|
Bd.configure({
|
|
12152
12154
|
blockSeparator: (t = (e = this.options.coreExtensionOptions) == null ? void 0 : e.clipboardTextSerializer) == null ? void 0 : t.blockSeparator
|
|
12153
12155
|
}),
|
|
12154
|
-
|
|
12156
|
+
_d,
|
|
12155
12157
|
Ud,
|
|
12156
12158
|
Wd,
|
|
12157
12159
|
qd,
|
|
@@ -12360,7 +12362,7 @@ var V0 = class extends iy {
|
|
|
12360
12362
|
}
|
|
12361
12363
|
$pos(e) {
|
|
12362
12364
|
const t = this.state.doc.resolve(e);
|
|
12363
|
-
return new
|
|
12365
|
+
return new _0(t, this);
|
|
12364
12366
|
}
|
|
12365
12367
|
get $doc() {
|
|
12366
12368
|
return this.$pos(0);
|
|
@@ -12446,7 +12448,7 @@ function Qn(n) {
|
|
|
12446
12448
|
}
|
|
12447
12449
|
function j0(n, e) {
|
|
12448
12450
|
const { selection: t } = n, { $from: r } = t;
|
|
12449
|
-
if (t instanceof
|
|
12451
|
+
if (t instanceof _) {
|
|
12450
12452
|
const s = r.index();
|
|
12451
12453
|
return r.parent.canReplaceWith(s, s + 1, e);
|
|
12452
12454
|
}
|
|
@@ -13160,7 +13162,8 @@ var Oi = (n, e) => {
|
|
|
13160
13162
|
name: "horizontalRule",
|
|
13161
13163
|
addOptions() {
|
|
13162
13164
|
return {
|
|
13163
|
-
HTMLAttributes: {}
|
|
13165
|
+
HTMLAttributes: {},
|
|
13166
|
+
nextNodeType: "paragraph"
|
|
13164
13167
|
};
|
|
13165
13168
|
},
|
|
13166
13169
|
group: "block",
|
|
@@ -13178,17 +13181,16 @@ var Oi = (n, e) => {
|
|
|
13178
13181
|
const { selection: t } = e, { $to: r } = t, i = n();
|
|
13179
13182
|
return Nd(t) ? i.insertContentAt(r.pos, {
|
|
13180
13183
|
type: this.name
|
|
13181
|
-
}) : i.insertContent({ type: this.name }), i.command(({
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
const { $to: a } = s.selection, c = a.end();
|
|
13184
|
+
}) : i.insertContent({ type: this.name }), i.command(({ state: s, tr: o, dispatch: l }) => {
|
|
13185
|
+
if (l) {
|
|
13186
|
+
const { $to: a } = o.selection, c = a.end();
|
|
13185
13187
|
if (a.nodeAfter)
|
|
13186
|
-
a.nodeAfter.isTextblock ?
|
|
13188
|
+
a.nodeAfter.isTextblock ? o.setSelection(j.create(o.doc, a.pos + 1)) : a.nodeAfter.isBlock ? o.setSelection(_.create(o.doc, a.pos)) : o.setSelection(j.create(o.doc, a.pos));
|
|
13187
13189
|
else {
|
|
13188
|
-
const u =
|
|
13189
|
-
|
|
13190
|
+
const u = s.schema.nodes[this.options.nextNodeType] || a.parent.type.contentMatch.defaultType, d = u?.create();
|
|
13191
|
+
d && (o.insert(c, d), o.setSelection(j.create(o.doc, c + 1)));
|
|
13190
13192
|
}
|
|
13191
|
-
|
|
13193
|
+
o.scrollIntoView();
|
|
13192
13194
|
}
|
|
13193
13195
|
return !0;
|
|
13194
13196
|
}).run();
|
|
@@ -13269,12 +13271,12 @@ var Oi = (n, e) => {
|
|
|
13269
13271
|
];
|
|
13270
13272
|
}
|
|
13271
13273
|
});
|
|
13272
|
-
const k1 = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", x1 = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Lo = "numeric", Bo = "ascii",
|
|
13274
|
+
const k1 = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", x1 = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Lo = "numeric", Bo = "ascii", $o = "alpha", mr = "asciinumeric", ur = "alphanumeric", zo = "domain", Xd = "emoji", v1 = "scheme", S1 = "slashscheme", no = "whitespace";
|
|
13273
13275
|
function C1(n, e) {
|
|
13274
13276
|
return n in e || (e[n] = []), e[n];
|
|
13275
13277
|
}
|
|
13276
13278
|
function kn(n, e, t) {
|
|
13277
|
-
e[Lo] && (e[mr] = !0, e[ur] = !0), e[Bo] && (e[mr] = !0, e[
|
|
13279
|
+
e[Lo] && (e[mr] = !0, e[ur] = !0), e[Bo] && (e[mr] = !0, e[$o] = !0), e[mr] && (e[ur] = !0), e[$o] && (e[ur] = !0), e[ur] && (e[zo] = !0), e[Xd] && (e[zo] = !0);
|
|
13278
13280
|
for (const r in e) {
|
|
13279
13281
|
const i = C1(r, t);
|
|
13280
13282
|
i.indexOf(n) < 0 && i.push(n);
|
|
@@ -13410,7 +13412,7 @@ Ke.prototype = {
|
|
|
13410
13412
|
return i.j[n] = o, o;
|
|
13411
13413
|
}
|
|
13412
13414
|
};
|
|
13413
|
-
const G = (n, e, t, r, i) => n.ta(e, t, r, i), de = (n, e, t, r, i) => n.tr(e, t, r, i), hc = (n, e, t, r, i) => n.ts(e, t, r, i), S = (n, e, t, r, i) => n.tt(e, t, r, i), Dt = "WORD",
|
|
13415
|
+
const G = (n, e, t, r, i) => n.ta(e, t, r, i), de = (n, e, t, r, i) => n.tr(e, t, r, i), hc = (n, e, t, r, i) => n.ts(e, t, r, i), S = (n, e, t, r, i) => n.tt(e, t, r, i), Dt = "WORD", _o = "UWORD", Qd = "ASCIINUMERICAL", Zd = "ALPHANUMERICAL", Nr = "LOCALHOST", Ho = "TLD", Fo = "UTLD", fi = "SCHEME", Vn = "SLASH_SCHEME", Ml = "NUM", Vo = "WS", El = "NL", gr = "OPENBRACE", yr = "CLOSEBRACE", Ai = "OPENBRACKET", Ni = "CLOSEBRACKET", Ri = "OPENPAREN", Ii = "CLOSEPAREN", Di = "OPENANGLEBRACKET", Pi = "CLOSEANGLEBRACKET", Li = "FULLWIDTHLEFTPAREN", Bi = "FULLWIDTHRIGHTPAREN", $i = "LEFTCORNERBRACKET", zi = "RIGHTCORNERBRACKET", _i = "LEFTWHITECORNERBRACKET", Hi = "RIGHTWHITECORNERBRACKET", Fi = "FULLWIDTHLESSTHAN", Vi = "FULLWIDTHGREATERTHAN", ji = "AMPERSAND", Ui = "APOSTROPHE", Wi = "ASTERISK", Gt = "AT", Ki = "BACKSLASH", qi = "BACKTICK", Ji = "CARET", Qt = "COLON", Tl = "COMMA", Gi = "DOLLAR", wt = "DOT", Yi = "EQUALS", Ol = "EXCLAMATION", nt = "HYPHEN", br = "PERCENT", Xi = "PIPE", Qi = "PLUS", Zi = "POUND", wr = "QUERY", Al = "QUOTE", ef = "FULLWIDTHMIDDLEDOT", Nl = "SEMI", kt = "SLASH", kr = "TILDE", es = "UNDERSCORE", tf = "EMOJI", ts = "SYM";
|
|
13414
13416
|
var nf = /* @__PURE__ */ Object.freeze({
|
|
13415
13417
|
__proto__: null,
|
|
13416
13418
|
ALPHANUMERICAL: Zd,
|
|
@@ -13439,8 +13441,8 @@ var nf = /* @__PURE__ */ Object.freeze({
|
|
|
13439
13441
|
FULLWIDTHMIDDLEDOT: ef,
|
|
13440
13442
|
FULLWIDTHRIGHTPAREN: Bi,
|
|
13441
13443
|
HYPHEN: nt,
|
|
13442
|
-
LEFTCORNERBRACKET:
|
|
13443
|
-
LEFTWHITECORNERBRACKET:
|
|
13444
|
+
LEFTCORNERBRACKET: $i,
|
|
13445
|
+
LEFTWHITECORNERBRACKET: _i,
|
|
13444
13446
|
LOCALHOST: Nr,
|
|
13445
13447
|
NL: El,
|
|
13446
13448
|
NUM: Ml,
|
|
@@ -13454,7 +13456,7 @@ var nf = /* @__PURE__ */ Object.freeze({
|
|
|
13454
13456
|
POUND: Zi,
|
|
13455
13457
|
QUERY: wr,
|
|
13456
13458
|
QUOTE: Al,
|
|
13457
|
-
RIGHTCORNERBRACKET:
|
|
13459
|
+
RIGHTCORNERBRACKET: zi,
|
|
13458
13460
|
RIGHTWHITECORNERBRACKET: Hi,
|
|
13459
13461
|
SCHEME: fi,
|
|
13460
13462
|
SEMI: Nl,
|
|
@@ -13465,7 +13467,7 @@ var nf = /* @__PURE__ */ Object.freeze({
|
|
|
13465
13467
|
TLD: Ho,
|
|
13466
13468
|
UNDERSCORE: es,
|
|
13467
13469
|
UTLD: Fo,
|
|
13468
|
-
UWORD:
|
|
13470
|
+
UWORD: _o,
|
|
13469
13471
|
WORD: Dt,
|
|
13470
13472
|
WS: Vo
|
|
13471
13473
|
});
|
|
@@ -13476,7 +13478,7 @@ function O1(n = []) {
|
|
|
13476
13478
|
const e = {};
|
|
13477
13479
|
Ke.groups = e;
|
|
13478
13480
|
const t = new Ke();
|
|
13479
|
-
ei == null && (ei = mc(k1)), ti == null && (ti = mc(x1)), S(t, "'", Ui), S(t, "{", gr), S(t, "}", yr), S(t, "[", Ai), S(t, "]", Ni), S(t, "(", Ri), S(t, ")", Ii), S(t, "<", Di), S(t, ">", Pi), S(t, "(", Li), S(t, ")", Bi), S(t, "「",
|
|
13481
|
+
ei == null && (ei = mc(k1)), ti == null && (ti = mc(x1)), S(t, "'", Ui), S(t, "{", gr), S(t, "}", yr), S(t, "[", Ai), S(t, "]", Ni), S(t, "(", Ri), S(t, ")", Ii), S(t, "<", Di), S(t, ">", Pi), S(t, "(", Li), S(t, ")", Bi), S(t, "「", $i), S(t, "」", zi), S(t, "『", _i), S(t, "』", Hi), S(t, "<", Fi), S(t, ">", Vi), S(t, "&", ji), S(t, "*", Wi), S(t, "@", Gt), S(t, "`", qi), S(t, "^", Ji), S(t, ":", Qt), S(t, ",", Tl), S(t, "$", Gi), S(t, ".", wt), S(t, "=", Yi), S(t, "!", Ol), S(t, "-", nt), S(t, "%", br), S(t, "|", Xi), S(t, "+", Qi), S(t, "#", Zi), S(t, "?", wr), S(t, '"', Al), S(t, "/", kt), S(t, ";", Nl), S(t, "~", kr), S(t, "_", es), S(t, "\\", Ki), S(t, "・", ef);
|
|
13480
13482
|
const r = de(t, It, Ml, {
|
|
13481
13483
|
[Lo]: !0
|
|
13482
13484
|
});
|
|
@@ -13489,8 +13491,8 @@ function O1(n = []) {
|
|
|
13489
13491
|
[Bo]: !0
|
|
13490
13492
|
});
|
|
13491
13493
|
de(o, It, i), de(o, Rt, o), de(i, It, i), de(i, Rt, i);
|
|
13492
|
-
const l = de(t, or,
|
|
13493
|
-
[
|
|
13494
|
+
const l = de(t, or, _o, {
|
|
13495
|
+
[$o]: !0
|
|
13494
13496
|
});
|
|
13495
13497
|
de(l, Rt), de(l, It, s), de(l, or, l), de(s, It, s), de(s, Rt), de(s, or, s);
|
|
13496
13498
|
const a = S(t, so, El, {
|
|
@@ -13511,7 +13513,7 @@ function O1(n = []) {
|
|
|
13511
13513
|
for (let m = 0; m < ei.length; m++)
|
|
13512
13514
|
Kt(t, ei[m], Ho, Dt, h);
|
|
13513
13515
|
for (let m = 0; m < ti.length; m++)
|
|
13514
|
-
Kt(t, ti[m], Fo,
|
|
13516
|
+
Kt(t, ti[m], Fo, _o, p);
|
|
13515
13517
|
kn(Ho, {
|
|
13516
13518
|
tld: !0,
|
|
13517
13519
|
ascii: !0
|
|
@@ -13531,7 +13533,7 @@ function O1(n = []) {
|
|
|
13531
13533
|
} : {
|
|
13532
13534
|
[S1]: !0
|
|
13533
13535
|
};
|
|
13534
|
-
g.indexOf("-") >= 0 ? w[
|
|
13536
|
+
g.indexOf("-") >= 0 ? w[zo] = !0 : Rt.test(g) ? It.test(g) ? w[mr] = !0 : w[Bo] = !0 : w[Lo] = !0, hc(t, g, g, w);
|
|
13535
13537
|
}
|
|
13536
13538
|
return hc(t, "localhost", Nr, {
|
|
13537
13539
|
ascii: !0
|
|
@@ -13832,7 +13834,7 @@ const yc = Ss("email", {
|
|
|
13832
13834
|
function R1({
|
|
13833
13835
|
groups: n
|
|
13834
13836
|
}) {
|
|
13835
|
-
const e = n.domain.concat([ji, Wi, Gt, Ki, qi, Ji, Gi, Yi, nt, Ml, br, Xi, Qi, Zi, kt, ts, kr, es]), t = [Ui, Qt, Tl, wt, Ol, br, wr, Al, Nl, Di, Pi, gr, yr, Ni, Ai, Ri, Ii, Li, Bi,
|
|
13837
|
+
const e = n.domain.concat([ji, Wi, Gt, Ki, qi, Ji, Gi, Yi, nt, Ml, br, Xi, Qi, Zi, kt, ts, kr, es]), t = [Ui, Qt, Tl, wt, Ol, br, wr, Al, Nl, Di, Pi, gr, yr, Ni, Ai, Ri, Ii, Li, Bi, $i, zi, _i, Hi, Fi, Vi], r = [ji, Ui, Wi, Ki, qi, Ji, Gi, Yi, nt, gr, yr, br, Xi, Qi, Zi, wr, kt, ts, kr, es], i = tt(), s = S(i, kr);
|
|
13836
13838
|
G(s, r, s), G(s, n.domain, s);
|
|
13837
13839
|
const o = tt(), l = tt(), a = tt();
|
|
13838
13840
|
G(i, n.domain, o), G(i, n.scheme, l), G(i, n.slashscheme, a), G(o, r, s), G(o, n.domain, o);
|
|
@@ -13858,7 +13860,7 @@ function R1({
|
|
|
13858
13860
|
G(v, n.numeric, R);
|
|
13859
13861
|
const C = tt(ni), D = tt();
|
|
13860
13862
|
G(C, e, C), G(C, t, D), G(D, e, C), G(D, t, D), S(w, kt, C), S(R, kt, C);
|
|
13861
|
-
const E = S(l, Qt),
|
|
13863
|
+
const E = S(l, Qt), $ = S(a, Qt), W = S($, kt), V = S(W, kt);
|
|
13862
13864
|
G(l, n.domain, o), S(l, wt, b), S(l, nt, g), G(a, n.domain, o), S(a, wt, b), S(a, nt, g), G(E, n.domain, C), S(E, kt, C), S(E, wr, C), G(V, n.domain, C), G(V, e, C), S(V, kt, C);
|
|
13863
13865
|
const K = [
|
|
13864
13866
|
[gr, yr],
|
|
@@ -13871,9 +13873,9 @@ function R1({
|
|
|
13871
13873
|
// <>
|
|
13872
13874
|
[Li, Bi],
|
|
13873
13875
|
// ()
|
|
13874
|
-
[
|
|
13876
|
+
[$i, zi],
|
|
13875
13877
|
// 「」
|
|
13876
|
-
[
|
|
13878
|
+
[_i, Hi],
|
|
13877
13879
|
// 『』
|
|
13878
13880
|
[Fi, Vi]
|
|
13879
13881
|
// <>
|
|
@@ -13964,7 +13966,7 @@ function of(n, e = null, t = null) {
|
|
|
13964
13966
|
}
|
|
13965
13967
|
return s;
|
|
13966
13968
|
}
|
|
13967
|
-
var Dl = "[\0- -\u2029 ]",
|
|
13969
|
+
var Dl = "[\0- -\u2029 ]", $1 = new RegExp(Dl), z1 = new RegExp(`${Dl}$`), _1 = new RegExp(Dl, "g");
|
|
13968
13970
|
function H1(n) {
|
|
13969
13971
|
return n.length === 1 ? n[0].isLink : n.length === 3 && n[1].isLink ? ["()", "[]"].includes(n[0].value + n[2].value) : !1;
|
|
13970
13972
|
}
|
|
@@ -13988,12 +13990,12 @@ function F1(n) {
|
|
|
13988
13990
|
);
|
|
13989
13991
|
else if (u.length) {
|
|
13990
13992
|
const h = r.doc.textBetween(c.from, c.to, " ", " ");
|
|
13991
|
-
if (
|
|
13993
|
+
if (!z1.test(h))
|
|
13992
13994
|
return;
|
|
13993
13995
|
d = u[0], f = r.doc.textBetween(d.pos, c.to, void 0, " ");
|
|
13994
13996
|
}
|
|
13995
13997
|
if (d && f) {
|
|
13996
|
-
const h = f.split(
|
|
13998
|
+
const h = f.split($1).filter(Boolean);
|
|
13997
13999
|
if (h.length <= 0)
|
|
13998
14000
|
return !1;
|
|
13999
14001
|
const p = h[h.length - 1], m = d.pos + f.lastIndexOf(p);
|
|
@@ -14074,7 +14076,7 @@ function gn(n, e) {
|
|
|
14074
14076
|
return e && e.forEach((r) => {
|
|
14075
14077
|
const i = typeof r == "string" ? r : r.scheme;
|
|
14076
14078
|
i && t.push(i);
|
|
14077
|
-
}), !n || n.replace(
|
|
14079
|
+
}), !n || n.replace(_1, "").match(
|
|
14078
14080
|
new RegExp(
|
|
14079
14081
|
// eslint-disable-next-line no-useless-escape
|
|
14080
14082
|
`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,
|
|
@@ -14321,7 +14323,7 @@ var lf = In.create({
|
|
|
14321
14323
|
}
|
|
14322
14324
|
}), J1 = {};
|
|
14323
14325
|
K1(J1, {
|
|
14324
|
-
findListItemPos: () =>
|
|
14326
|
+
findListItemPos: () => $r,
|
|
14325
14327
|
getNextListDepth: () => Pl,
|
|
14326
14328
|
handleBackspace: () => jo,
|
|
14327
14329
|
handleDelete: () => Uo,
|
|
@@ -14332,14 +14334,14 @@ K1(J1, {
|
|
|
14332
14334
|
nextListIsDeeper: () => hf,
|
|
14333
14335
|
nextListIsHigher: () => pf
|
|
14334
14336
|
});
|
|
14335
|
-
var
|
|
14337
|
+
var $r = (n, e) => {
|
|
14336
14338
|
const { $from: t } = e.selection, r = ve(n, e.schema);
|
|
14337
14339
|
let i = null, s = t.depth, o = t.pos, l = null;
|
|
14338
14340
|
for (; s > 0 && l === null; )
|
|
14339
14341
|
i = t.node(s), i.type === r ? l = s : (s -= 1, o -= 1);
|
|
14340
14342
|
return l === null ? null : { $pos: e.doc.resolve(o), depth: l };
|
|
14341
14343
|
}, Pl = (n, e) => {
|
|
14342
|
-
const t =
|
|
14344
|
+
const t = $r(n, e);
|
|
14343
14345
|
if (!t)
|
|
14344
14346
|
return !1;
|
|
14345
14347
|
const [, r] = my(e, n, t.$pos.pos + 4);
|
|
@@ -14377,16 +14379,16 @@ var _r = (n, e) => {
|
|
|
14377
14379
|
}
|
|
14378
14380
|
if (!un(n.state, e) || !wy(n.state))
|
|
14379
14381
|
return !1;
|
|
14380
|
-
const r =
|
|
14382
|
+
const r = $r(e, n.state);
|
|
14381
14383
|
if (!r)
|
|
14382
14384
|
return !1;
|
|
14383
14385
|
const s = n.state.doc.resolve(r.$pos.pos - 2).node(r.depth), o = ff(e, n.state, s);
|
|
14384
14386
|
return df(e, n.state) && !o ? n.commands.joinItemBackward() : n.chain().liftListItem(e).run();
|
|
14385
14387
|
}, hf = (n, e) => {
|
|
14386
|
-
const t = Pl(n, e), r =
|
|
14388
|
+
const t = Pl(n, e), r = $r(n, e);
|
|
14387
14389
|
return !r || !t ? !1 : t > r.depth;
|
|
14388
14390
|
}, pf = (n, e) => {
|
|
14389
|
-
const t = Pl(n, e), r =
|
|
14391
|
+
const t = Pl(n, e), r = $r(n, e);
|
|
14390
14392
|
return !r || !t ? !1 : t < r.depth;
|
|
14391
14393
|
}, Uo = (n, e) => {
|
|
14392
14394
|
if (!un(n.state, e) || !by(n.state, e))
|
|
@@ -14929,7 +14931,7 @@ class fe extends F {
|
|
|
14929
14931
|
for (; ; ) {
|
|
14930
14932
|
let o = t > 0 ? s.firstChild : s.lastChild;
|
|
14931
14933
|
if (!o) {
|
|
14932
|
-
if (s.isAtom && !s.isText && !
|
|
14934
|
+
if (s.isAtom && !s.isText && !_.isSelectable(s)) {
|
|
14933
14935
|
e = e.doc.resolve(i + s.nodeSize * t), r = !1;
|
|
14934
14936
|
continue e;
|
|
14935
14937
|
}
|
|
@@ -15032,7 +15034,7 @@ function fb(n, e, t) {
|
|
|
15032
15034
|
if (!fe.valid(r))
|
|
15033
15035
|
return !1;
|
|
15034
15036
|
let i = n.posAtCoords({ left: t.clientX, top: t.clientY });
|
|
15035
|
-
return i && i.inside > -1 &&
|
|
15037
|
+
return i && i.inside > -1 && _.isSelectable(n.state.doc.nodeAt(i.inside)) ? !1 : (n.dispatch(n.state.tr.setSelection(new fe(r))), !0);
|
|
15036
15038
|
}
|
|
15037
15039
|
function hb(n, e) {
|
|
15038
15040
|
if (e.inputType != "insertCompositionText" || !(n.state.selection instanceof fe))
|
|
@@ -15050,7 +15052,7 @@ function pb(n) {
|
|
|
15050
15052
|
if (!(n.selection instanceof fe))
|
|
15051
15053
|
return null;
|
|
15052
15054
|
let e = document.createElement("div");
|
|
15053
|
-
return e.className = "ProseMirror-gapcursor", ce.create(n.doc, [
|
|
15055
|
+
return e.className = "ProseMirror-gapcursor", ce.create(n.doc, [ze.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
15054
15056
|
}
|
|
15055
15057
|
var ns = 200, Ne = function() {
|
|
15056
15058
|
};
|
|
@@ -15503,7 +15505,7 @@ pe.create({
|
|
|
15503
15505
|
if (l += 1, this.options.mode === "deepest" && o - l > 0 || this.options.mode === "shallowest" && l > 1)
|
|
15504
15506
|
return this.options.mode === "deepest";
|
|
15505
15507
|
s.push(
|
|
15506
|
-
|
|
15508
|
+
ze.node(c, c + a.nodeSize, {
|
|
15507
15509
|
class: this.options.className
|
|
15508
15510
|
})
|
|
15509
15511
|
);
|
|
@@ -15527,7 +15529,7 @@ var Mb = pe.create({
|
|
|
15527
15529
|
storage: n.storage
|
|
15528
15530
|
};
|
|
15529
15531
|
return {
|
|
15530
|
-
allowGapCursor: (e = re(
|
|
15532
|
+
allowGapCursor: (e = re(z(n, "allowGapCursor", t))) != null ? e : null
|
|
15531
15533
|
};
|
|
15532
15534
|
}
|
|
15533
15535
|
}), Eb = pe.create({
|
|
@@ -15557,7 +15559,7 @@ var Mb = pe.create({
|
|
|
15557
15559
|
if ((a || !this.options.showOnlyCurrent) && c) {
|
|
15558
15560
|
const u = [this.options.emptyNodeClass];
|
|
15559
15561
|
s && u.push(this.options.emptyEditorClass);
|
|
15560
|
-
const d =
|
|
15562
|
+
const d = ze.node(l, l + o.nodeSize, {
|
|
15561
15563
|
class: u.join(" "),
|
|
15562
15564
|
"data-placeholder": typeof this.options.placeholder == "function" ? this.options.placeholder({
|
|
15563
15565
|
editor: this.editor,
|
|
@@ -15591,7 +15593,7 @@ pe.create({
|
|
|
15591
15593
|
props: {
|
|
15592
15594
|
decorations(t) {
|
|
15593
15595
|
return t.selection.empty || n.isFocused || !n.isEditable || Nd(t.selection) || n.view.dragging ? null : ce.create(t.doc, [
|
|
15594
|
-
|
|
15596
|
+
ze.inline(t.selection.from, t.selection.to, {
|
|
15595
15597
|
class: e.className
|
|
15596
15598
|
})
|
|
15597
15599
|
]);
|
|
@@ -15979,7 +15981,7 @@ function Pb() {
|
|
|
15979
15981
|
return L;
|
|
15980
15982
|
}).map((q) => `(${q})`).join(k);
|
|
15981
15983
|
}
|
|
15982
|
-
const D = /\b\B/, E = "[a-zA-Z]\\w*",
|
|
15984
|
+
const D = /\b\B/, E = "[a-zA-Z]\\w*", $ = "[a-zA-Z_]\\w*", W = "\\b\\d+(\\.\\d+)?", V = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", K = "\\b(0b[01]+)", P = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ee = (y = {}) => {
|
|
15983
15985
|
const k = /^#![ ]*\//;
|
|
15984
15986
|
return y.binary && (y.begin = m(
|
|
15985
15987
|
k,
|
|
@@ -16110,14 +16112,14 @@ function Pb() {
|
|
|
16110
16112
|
relevance: 0
|
|
16111
16113
|
}, ih = {
|
|
16112
16114
|
scope: "title",
|
|
16113
|
-
begin:
|
|
16115
|
+
begin: $,
|
|
16114
16116
|
relevance: 0
|
|
16115
16117
|
}, sh = {
|
|
16116
16118
|
// excludes method names from keyword processing
|
|
16117
|
-
begin: "\\.\\s*" +
|
|
16119
|
+
begin: "\\.\\s*" + $,
|
|
16118
16120
|
relevance: 0
|
|
16119
16121
|
};
|
|
16120
|
-
var
|
|
16122
|
+
var _r = /* @__PURE__ */ Object.freeze({
|
|
16121
16123
|
__proto__: null,
|
|
16122
16124
|
APOS_STRING_MODE: Se,
|
|
16123
16125
|
BACKSLASH_ESCAPE: te,
|
|
@@ -16155,7 +16157,7 @@ function Pb() {
|
|
|
16155
16157
|
RE_STARTERS_RE: P,
|
|
16156
16158
|
SHEBANG: ee,
|
|
16157
16159
|
TITLE_MODE: rh,
|
|
16158
|
-
UNDERSCORE_IDENT_RE:
|
|
16160
|
+
UNDERSCORE_IDENT_RE: $,
|
|
16159
16161
|
UNDERSCORE_TITLE_MODE: ih
|
|
16160
16162
|
});
|
|
16161
16163
|
function oh(y, k) {
|
|
@@ -16510,17 +16512,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = M, se = H), Q ==
|
|
|
16510
16512
|
if (N.endsWithParent)
|
|
16511
16513
|
return na(N.parent, B, Y);
|
|
16512
16514
|
}
|
|
16513
|
-
function
|
|
16515
|
+
function $h(N) {
|
|
16514
16516
|
return J.matcher.regexIndex === 0 ? (oe += N[0], 1) : (Ls = !0, 0);
|
|
16515
16517
|
}
|
|
16516
|
-
function
|
|
16518
|
+
function zh(N) {
|
|
16517
16519
|
const B = N[0], Y = N.rule, ne = new e(Y), Le = [Y.__beforeBegin, Y["on:begin"]];
|
|
16518
16520
|
for (const At of Le)
|
|
16519
16521
|
if (At && (At(N, ne), ne.isMatchIgnored))
|
|
16520
|
-
return
|
|
16522
|
+
return $h(B);
|
|
16521
16523
|
return Y.skip ? oe += B : (Y.excludeBegin && (oe += B), Ge(), !Y.returnBegin && !Y.excludeBegin && (oe = B)), ta(Y, N), Y.returnBegin ? 0 : B.length;
|
|
16522
16524
|
}
|
|
16523
|
-
function
|
|
16525
|
+
function _h(N) {
|
|
16524
16526
|
const B = N[0], Y = H.substring(N.index), ne = na(J, N, Y);
|
|
16525
16527
|
if (!ne)
|
|
16526
16528
|
return Gl;
|
|
@@ -16550,12 +16552,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = M, se = H), Q ==
|
|
|
16550
16552
|
return 1;
|
|
16551
16553
|
}
|
|
16552
16554
|
if (Ur = B, B.type === "begin")
|
|
16553
|
-
return
|
|
16555
|
+
return zh(B);
|
|
16554
16556
|
if (B.type === "illegal" && !Q) {
|
|
16555
16557
|
const ne = new Error('Illegal lexeme "' + Y + '" for mode "' + (J.scope || "<unnamed>") + '"');
|
|
16556
16558
|
throw ne.mode = J, ne;
|
|
16557
16559
|
} else if (B.type === "end") {
|
|
16558
|
-
const ne =
|
|
16560
|
+
const ne = _h(B);
|
|
16559
16561
|
if (ne !== Gl)
|
|
16560
16562
|
return ne;
|
|
16561
16563
|
}
|
|
@@ -16794,9 +16796,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = M, se = H), Q ==
|
|
|
16794
16796
|
optional: p,
|
|
16795
16797
|
anyNumberOfTimes: h
|
|
16796
16798
|
};
|
|
16797
|
-
for (const M in
|
|
16798
|
-
typeof
|
|
16799
|
-
return Object.assign(y,
|
|
16799
|
+
for (const M in _r)
|
|
16800
|
+
typeof _r[M] == "object" && n(_r[M]);
|
|
16801
|
+
return Object.assign(y, _r), y;
|
|
16800
16802
|
}, Ln = Yl({});
|
|
16801
16803
|
return Ln.newInstance = () => Yl({}), uo = Ln, Ln.HighlightJS = Ln, Ln.default = Ln, uo;
|
|
16802
16804
|
}
|
|
@@ -16814,7 +16816,7 @@ function xf(n, e = []) {
|
|
|
16814
16816
|
function Oc(n) {
|
|
16815
16817
|
return n.value || n.children || [];
|
|
16816
16818
|
}
|
|
16817
|
-
function
|
|
16819
|
+
function $b(n) {
|
|
16818
16820
|
return !!Bb.getLanguage(n);
|
|
16819
16821
|
}
|
|
16820
16822
|
function Ac({
|
|
@@ -16827,11 +16829,11 @@ function Ac({
|
|
|
16827
16829
|
return Io(n, (s) => s.type.name === e).forEach((s) => {
|
|
16828
16830
|
var o;
|
|
16829
16831
|
let l = s.pos + 1;
|
|
16830
|
-
const a = s.node.attrs.language || r, c = t.listLanguages(), u = a && (c.includes(a) ||
|
|
16832
|
+
const a = s.node.attrs.language || r, c = t.listLanguages(), u = a && (c.includes(a) || $b(a) || (o = t.registered) != null && o.call(t, a)) ? Oc(t.highlight(a, s.node.textContent)) : Oc(t.highlightAuto(s.node.textContent));
|
|
16831
16833
|
xf(u).forEach((d) => {
|
|
16832
16834
|
const f = l + d.text.length;
|
|
16833
16835
|
if (d.classes.length) {
|
|
16834
|
-
const h =
|
|
16836
|
+
const h = ze.inline(l, f, {
|
|
16835
16837
|
class: d.classes.join(" ")
|
|
16836
16838
|
});
|
|
16837
16839
|
i.push(h);
|
|
@@ -16840,15 +16842,15 @@ function Ac({
|
|
|
16840
16842
|
});
|
|
16841
16843
|
}), ce.create(n, i);
|
|
16842
16844
|
}
|
|
16843
|
-
function
|
|
16845
|
+
function zb(n) {
|
|
16844
16846
|
return typeof n == "function";
|
|
16845
16847
|
}
|
|
16846
|
-
function
|
|
16848
|
+
function _b({
|
|
16847
16849
|
name: n,
|
|
16848
16850
|
lowlight: e,
|
|
16849
16851
|
defaultLanguage: t
|
|
16850
16852
|
}) {
|
|
16851
|
-
if (!["highlight", "highlightAuto", "listLanguages"].every((i) =>
|
|
16853
|
+
if (!["highlight", "highlightAuto", "listLanguages"].every((i) => zb(e[i])))
|
|
16852
16854
|
throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");
|
|
16853
16855
|
const r = new ae({
|
|
16854
16856
|
key: new ue("lowlight"),
|
|
@@ -16910,7 +16912,7 @@ var Hb = u1.extend({
|
|
|
16910
16912
|
var n;
|
|
16911
16913
|
return [
|
|
16912
16914
|
...((n = this.parent) == null ? void 0 : n.call(this)) || [],
|
|
16913
|
-
|
|
16915
|
+
_b({
|
|
16914
16916
|
name: this.name,
|
|
16915
16917
|
lowlight: this.options.lowlight,
|
|
16916
16918
|
defaultLanguage: this.options.defaultLanguage
|
|
@@ -16970,12 +16972,12 @@ const Wb = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
|
16970
16972
|
function vt(n) {
|
|
16971
16973
|
return Wb.has(at(n)) ? "y" : "x";
|
|
16972
16974
|
}
|
|
16973
|
-
function
|
|
16975
|
+
function $l(n) {
|
|
16974
16976
|
return Sf(vt(n));
|
|
16975
16977
|
}
|
|
16976
16978
|
function Cf(n, e, t) {
|
|
16977
16979
|
t === void 0 && (t = !1);
|
|
16978
|
-
const r = ft(n), i =
|
|
16980
|
+
const r = ft(n), i = $l(n), s = Bl(i);
|
|
16979
16981
|
let o = i === "x" ? r === (t ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
16980
16982
|
return e.reference[s] > e.floating[s] && (o = ss(o)), [o, ss(o)];
|
|
16981
16983
|
}
|
|
@@ -17016,7 +17018,7 @@ function Xb(n) {
|
|
|
17016
17018
|
...n
|
|
17017
17019
|
};
|
|
17018
17020
|
}
|
|
17019
|
-
function
|
|
17021
|
+
function zl(n) {
|
|
17020
17022
|
return typeof n != "number" ? Xb(n) : {
|
|
17021
17023
|
top: n,
|
|
17022
17024
|
right: n,
|
|
@@ -17047,7 +17049,7 @@ function Pc(n, e, t) {
|
|
|
17047
17049
|
reference: r,
|
|
17048
17050
|
floating: i
|
|
17049
17051
|
} = n;
|
|
17050
|
-
const s = vt(e), o =
|
|
17052
|
+
const s = vt(e), o = $l(e), l = Bl(o), a = at(e), c = s === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[l] / 2 - i[l] / 2;
|
|
17051
17053
|
let h;
|
|
17052
17054
|
switch (a) {
|
|
17053
17055
|
case "top":
|
|
@@ -17167,7 +17169,7 @@ async function er(n, e) {
|
|
|
17167
17169
|
elementContext: d = "floating",
|
|
17168
17170
|
altBoundary: f = !1,
|
|
17169
17171
|
padding: h = 0
|
|
17170
|
-
} = Vt(e, n), p =
|
|
17172
|
+
} = Vt(e, n), p = zl(h), g = l[f ? d === "floating" ? "reference" : "floating" : d], b = Zn(await s.getClippingRect({
|
|
17171
17173
|
element: (t = await (s.isElement == null ? void 0 : s.isElement(g))) == null || t ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
|
|
17172
17174
|
boundary: c,
|
|
17173
17175
|
rootBoundary: u,
|
|
@@ -17214,13 +17216,13 @@ const Zb = (n) => ({
|
|
|
17214
17216
|
} = Vt(n, e) || {};
|
|
17215
17217
|
if (c == null)
|
|
17216
17218
|
return {};
|
|
17217
|
-
const d =
|
|
17219
|
+
const d = zl(u), f = {
|
|
17218
17220
|
x: t,
|
|
17219
17221
|
y: r
|
|
17220
|
-
}, h =
|
|
17222
|
+
}, h = $l(i), p = Bl(h), m = await o.getDimensions(c), g = h === "y", b = g ? "top" : "left", w = g ? "bottom" : "right", v = g ? "clientHeight" : "clientWidth", R = s.reference[p] + s.reference[h] - f[h] - s.floating[p], C = f[h] - s.reference[h], D = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
|
|
17221
17223
|
let E = D ? D[v] : 0;
|
|
17222
17224
|
(!E || !await (o.isElement == null ? void 0 : o.isElement(D))) && (E = l.floating[v] || s.floating[p]);
|
|
17223
|
-
const
|
|
17225
|
+
const $ = R / 2 - C / 2, W = E / 2 - m[p] / 2 - 1, V = Tt(d[b], W), K = Tt(d[w], W), P = V, ee = E - m[p] - K, te = E / 2 - m[p] / 2 + $, Se = Wo(P, te, ee), me = !a.arrow && ft(i) != null && te !== Se && s.reference[p] / 2 - (te < P ? V : K) - m[p] / 2 < 0, ge = me ? te < P ? te - P : te - ee : 0;
|
|
17224
17226
|
return {
|
|
17225
17227
|
[h]: f[h] + ge,
|
|
17226
17228
|
data: {
|
|
@@ -17331,11 +17333,11 @@ const tw = function(n) {
|
|
|
17331
17333
|
return {};
|
|
17332
17334
|
const b = at(i), w = vt(l), v = at(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), C = f || (v || !m ? [ss(l)] : Kb(l)), D = p !== "none";
|
|
17333
17335
|
!f && D && C.push(...Yb(l, m, p, R));
|
|
17334
|
-
const E = [l, ...C],
|
|
17336
|
+
const E = [l, ...C], $ = await er(e, g), W = [];
|
|
17335
17337
|
let V = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
17336
|
-
if (u && W.push(
|
|
17338
|
+
if (u && W.push($[b]), d) {
|
|
17337
17339
|
const te = Cf(i, o, R);
|
|
17338
|
-
W.push(
|
|
17340
|
+
W.push($[te[0]], $[te[1]]);
|
|
17339
17341
|
}
|
|
17340
17342
|
if (V = [...V, {
|
|
17341
17343
|
placement: i,
|
|
@@ -17473,7 +17475,7 @@ const sw = function(n) {
|
|
|
17473
17475
|
padding: l = 2,
|
|
17474
17476
|
x: a,
|
|
17475
17477
|
y: c
|
|
17476
|
-
} = Vt(n, e), u = Array.from(await (s.getClientRects == null ? void 0 : s.getClientRects(r.reference)) || []), d = iw(u), f = Zn(Mf(u)), h =
|
|
17478
|
+
} = Vt(n, e), u = Array.from(await (s.getClientRects == null ? void 0 : s.getClientRects(r.reference)) || []), d = iw(u), f = Zn(Mf(u)), h = zl(l);
|
|
17477
17479
|
function p() {
|
|
17478
17480
|
if (d.length === 2 && d[0].left > d[1].right && a != null && c != null)
|
|
17479
17481
|
return d.find((g) => a > g.left - h.left && a < g.right + h.right && c > g.top - h.top && c < g.bottom + h.bottom) || f;
|
|
@@ -17491,13 +17493,13 @@ const sw = function(n) {
|
|
|
17491
17493
|
y: ee
|
|
17492
17494
|
};
|
|
17493
17495
|
}
|
|
17494
|
-
const g = at(t) === "left", b = He(...d.map((V) => V.right)), w = Tt(...d.map((V) => V.left)), v = d.filter((V) => g ? V.left === w : V.right === b), R = v[0].top, C = v[v.length - 1].bottom, D = w, E = b,
|
|
17496
|
+
const g = at(t) === "left", b = He(...d.map((V) => V.right)), w = Tt(...d.map((V) => V.left)), v = d.filter((V) => g ? V.left === w : V.right === b), R = v[0].top, C = v[v.length - 1].bottom, D = w, E = b, $ = E - D, W = C - R;
|
|
17495
17497
|
return {
|
|
17496
17498
|
top: R,
|
|
17497
17499
|
bottom: C,
|
|
17498
17500
|
left: D,
|
|
17499
17501
|
right: E,
|
|
17500
|
-
width:
|
|
17502
|
+
width: $,
|
|
17501
17503
|
height: W,
|
|
17502
17504
|
x: D,
|
|
17503
17505
|
y: R
|
|
@@ -17647,14 +17649,14 @@ const aw = function(n) {
|
|
|
17647
17649
|
let g, b;
|
|
17648
17650
|
d === "top" || d === "bottom" ? (g = d, b = f === (await (o.isRTL == null ? void 0 : o.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (b = d, g = f === "end" ? "top" : "bottom");
|
|
17649
17651
|
const w = m - u.top - u.bottom, v = p - u.left - u.right, R = Tt(m - u[g], w), C = Tt(p - u[b], v), D = !e.middlewareData.shift;
|
|
17650
|
-
let E = R,
|
|
17651
|
-
if ((t = e.middlewareData.shift) != null && t.enabled.x && (
|
|
17652
|
+
let E = R, $ = C;
|
|
17653
|
+
if ((t = e.middlewareData.shift) != null && t.enabled.x && ($ = v), (r = e.middlewareData.shift) != null && r.enabled.y && (E = w), D && !f) {
|
|
17652
17654
|
const V = He(u.left, 0), K = He(u.right, 0), P = He(u.top, 0), ee = He(u.bottom, 0);
|
|
17653
|
-
h ?
|
|
17655
|
+
h ? $ = p - 2 * (V !== 0 || K !== 0 ? V + K : He(u.left, u.right)) : E = m - 2 * (P !== 0 || ee !== 0 ? P + ee : He(u.top, u.bottom));
|
|
17654
17656
|
}
|
|
17655
17657
|
await a({
|
|
17656
17658
|
...e,
|
|
17657
|
-
availableWidth:
|
|
17659
|
+
availableWidth: $,
|
|
17658
17660
|
availableHeight: E
|
|
17659
17661
|
});
|
|
17660
17662
|
const W = await o.getDimensions(l.floating);
|
|
@@ -17689,11 +17691,11 @@ function ht(n) {
|
|
|
17689
17691
|
function Ot(n) {
|
|
17690
17692
|
return Cs() ? n instanceof HTMLElement || n instanceof Ze(n).HTMLElement : !1;
|
|
17691
17693
|
}
|
|
17692
|
-
function
|
|
17694
|
+
function $c(n) {
|
|
17693
17695
|
return !Cs() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof Ze(n).ShadowRoot;
|
|
17694
17696
|
}
|
|
17695
17697
|
const dw = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
17696
|
-
function
|
|
17698
|
+
function zr(n) {
|
|
17697
17699
|
const {
|
|
17698
17700
|
overflow: e,
|
|
17699
17701
|
overflowX: t,
|
|
@@ -17717,14 +17719,14 @@ function Ms(n) {
|
|
|
17717
17719
|
});
|
|
17718
17720
|
}
|
|
17719
17721
|
const mw = ["transform", "translate", "scale", "rotate", "perspective"], gw = ["transform", "translate", "scale", "rotate", "perspective", "filter"], yw = ["paint", "layout", "strict", "content"];
|
|
17720
|
-
function
|
|
17722
|
+
function _l(n) {
|
|
17721
17723
|
const e = Hl(), t = ht(n) ? pt(n) : n;
|
|
17722
17724
|
return mw.some((r) => t[r] ? t[r] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || gw.some((r) => (t.willChange || "").includes(r)) || yw.some((r) => (t.contain || "").includes(r));
|
|
17723
17725
|
}
|
|
17724
17726
|
function bw(n) {
|
|
17725
17727
|
let e = dn(n);
|
|
17726
17728
|
for (; Ot(e) && !tr(e); ) {
|
|
17727
|
-
if (
|
|
17729
|
+
if (_l(e))
|
|
17728
17730
|
return e;
|
|
17729
17731
|
if (Ms(e))
|
|
17730
17732
|
return null;
|
|
@@ -17758,20 +17760,20 @@ function dn(n) {
|
|
|
17758
17760
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
17759
17761
|
n.assignedSlot || // DOM Element detected.
|
|
17760
17762
|
n.parentNode || // ShadowRoot detected.
|
|
17761
|
-
|
|
17763
|
+
$c(n) && n.host || // Fallback.
|
|
17762
17764
|
jt(n)
|
|
17763
17765
|
);
|
|
17764
|
-
return
|
|
17766
|
+
return $c(e) ? e.host : e;
|
|
17765
17767
|
}
|
|
17766
17768
|
function Tf(n) {
|
|
17767
17769
|
const e = dn(n);
|
|
17768
|
-
return tr(e) ? n.ownerDocument ? n.ownerDocument.body : n.body : Ot(e) &&
|
|
17770
|
+
return tr(e) ? n.ownerDocument ? n.ownerDocument.body : n.body : Ot(e) && zr(e) ? e : Tf(e);
|
|
17769
17771
|
}
|
|
17770
17772
|
function Of(n, e, t) {
|
|
17771
17773
|
var r;
|
|
17772
17774
|
e === void 0 && (e = []);
|
|
17773
17775
|
const i = Tf(n), s = i === ((r = n.ownerDocument) == null ? void 0 : r.body), o = Ze(i);
|
|
17774
|
-
return s ? (Ko(o), e.concat(o, o.visualViewport || [],
|
|
17776
|
+
return s ? (Ko(o), e.concat(o, o.visualViewport || [], zr(i) ? i : [], [])) : e.concat(i, Of(i, []));
|
|
17775
17777
|
}
|
|
17776
17778
|
function Ko(n) {
|
|
17777
17779
|
return n.parent && Object.getPrototypeOf(n.parent) ? n.frameElement : null;
|
|
@@ -17863,7 +17865,7 @@ function vw(n) {
|
|
|
17863
17865
|
scrollTop: 0
|
|
17864
17866
|
}, c = St(1);
|
|
17865
17867
|
const u = St(0), d = Ot(r);
|
|
17866
|
-
if ((d || !d && !s) && ((rr(r) !== "body" ||
|
|
17868
|
+
if ((d || !d && !s) && ((rr(r) !== "body" || zr(o)) && (a = Es(r)), Ot(r))) {
|
|
17867
17869
|
const h = Ir(r);
|
|
17868
17870
|
c = Kn(r), u.x = h.x + r.clientLeft, u.y = h.y + r.clientTop;
|
|
17869
17871
|
}
|
|
@@ -17889,7 +17891,7 @@ function Cw(n) {
|
|
|
17889
17891
|
y: l
|
|
17890
17892
|
};
|
|
17891
17893
|
}
|
|
17892
|
-
const
|
|
17894
|
+
const zc = 25;
|
|
17893
17895
|
function Mw(n, e) {
|
|
17894
17896
|
const t = Ze(n), r = jt(n), i = t.visualViewport;
|
|
17895
17897
|
let s = r.clientWidth, o = r.clientHeight, l = 0, a = 0;
|
|
@@ -17901,8 +17903,8 @@ function Mw(n, e) {
|
|
|
17901
17903
|
const c = Ts(r);
|
|
17902
17904
|
if (c <= 0) {
|
|
17903
17905
|
const u = r.ownerDocument, d = u.body, f = getComputedStyle(d), h = u.compatMode === "CSS1Compat" && parseFloat(f.marginLeft) + parseFloat(f.marginRight) || 0, p = Math.abs(r.clientWidth - d.clientWidth - h);
|
|
17904
|
-
p <=
|
|
17905
|
-
} else c <=
|
|
17906
|
+
p <= zc && (s -= p);
|
|
17907
|
+
} else c <= zc && (s += c);
|
|
17906
17908
|
return {
|
|
17907
17909
|
width: s,
|
|
17908
17910
|
height: o,
|
|
@@ -17920,7 +17922,7 @@ function Tw(n, e) {
|
|
|
17920
17922
|
y: c
|
|
17921
17923
|
};
|
|
17922
17924
|
}
|
|
17923
|
-
function
|
|
17925
|
+
function _c(n, e, t) {
|
|
17924
17926
|
let r;
|
|
17925
17927
|
if (e === "viewport")
|
|
17926
17928
|
r = Mw(n, t);
|
|
@@ -17951,8 +17953,8 @@ function Ow(n, e) {
|
|
|
17951
17953
|
const s = pt(n).position === "fixed";
|
|
17952
17954
|
let o = s ? dn(n) : n;
|
|
17953
17955
|
for (; ht(o) && !tr(o); ) {
|
|
17954
|
-
const l = pt(o), a =
|
|
17955
|
-
!a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && Ew.has(i.position) ||
|
|
17956
|
+
const l = pt(o), a = _l(o);
|
|
17957
|
+
!a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && Ew.has(i.position) || zr(o) && !a && Df(n, o)) ? r = r.filter((u) => u !== o) : i = l, o = dn(o);
|
|
17956
17958
|
}
|
|
17957
17959
|
return e.set(n, r), r;
|
|
17958
17960
|
}
|
|
@@ -17964,9 +17966,9 @@ function Aw(n) {
|
|
|
17964
17966
|
strategy: i
|
|
17965
17967
|
} = n;
|
|
17966
17968
|
const o = [...t === "clippingAncestors" ? Ms(e) ? [] : Ow(e, this._c) : [].concat(t), r], l = o[0], a = o.reduce((c, u) => {
|
|
17967
|
-
const d =
|
|
17969
|
+
const d = _c(e, u, i);
|
|
17968
17970
|
return c.top = He(d.top, c.top), c.right = Tt(d.right, c.right), c.bottom = Tt(d.bottom, c.bottom), c.left = He(d.left, c.left), c;
|
|
17969
|
-
},
|
|
17971
|
+
}, _c(e, l, i));
|
|
17970
17972
|
return {
|
|
17971
17973
|
width: a.right - a.left,
|
|
17972
17974
|
height: a.bottom - a.top,
|
|
@@ -17995,7 +17997,7 @@ function Rw(n, e, t) {
|
|
|
17995
17997
|
a.x = Ts(i);
|
|
17996
17998
|
}
|
|
17997
17999
|
if (r || !r && !s)
|
|
17998
|
-
if ((rr(e) !== "body" ||
|
|
18000
|
+
if ((rr(e) !== "body" || zr(i)) && (l = Es(e)), r) {
|
|
17999
18001
|
const h = Ir(e, !0, s, e);
|
|
18000
18002
|
a.x = h.x + e.clientLeft, a.y = h.y + e.clientTop;
|
|
18001
18003
|
} else i && c();
|
|
@@ -18035,7 +18037,7 @@ function Pf(n, e) {
|
|
|
18035
18037
|
let r = Hc(n, e);
|
|
18036
18038
|
for (; r && hw(r) && fo(r); )
|
|
18037
18039
|
r = Hc(r, e);
|
|
18038
|
-
return r && tr(r) && fo(r) && !
|
|
18040
|
+
return r && tr(r) && fo(r) && !_l(r) ? t : r || bw(n) || t;
|
|
18039
18041
|
}
|
|
18040
18042
|
const Iw = async function(n) {
|
|
18041
18043
|
const e = this.getOffsetParent || Pf, t = this.getDimensions, r = await t(n.floating);
|
|
@@ -18063,7 +18065,7 @@ const Pw = {
|
|
|
18063
18065
|
getScale: Kn,
|
|
18064
18066
|
isElement: ht,
|
|
18065
18067
|
isRTL: Dw
|
|
18066
|
-
}, Lf = aw, Bf = tw,
|
|
18068
|
+
}, Lf = aw, Bf = tw, $f = cw, zf = nw, _f = uw, Hf = rw, Ff = Zb, Vf = sw, jf = (n, e, t) => {
|
|
18067
18069
|
const r = /* @__PURE__ */ new Map(), i = {
|
|
18068
18070
|
platform: Pw,
|
|
18069
18071
|
...t
|
|
@@ -18203,8 +18205,8 @@ function Lw(n) {
|
|
|
18203
18205
|
});
|
|
18204
18206
|
const D = w && w[C];
|
|
18205
18207
|
if (D) {
|
|
18206
|
-
const E = (R + C) % e * 2,
|
|
18207
|
-
|
|
18208
|
+
const E = (R + C) % e * 2, $ = o[E];
|
|
18209
|
+
$ == null || $ != D && o[E + 1] == 1 ? (o[E] = D, o[E + 1] = 1) : $ == D && o[E + 1]++;
|
|
18208
18210
|
}
|
|
18209
18211
|
}
|
|
18210
18212
|
}
|
|
@@ -18220,7 +18222,7 @@ function Lw(n) {
|
|
|
18220
18222
|
let a = !1;
|
|
18221
18223
|
for (let c = 0; !a && c < o.length; c += 2)
|
|
18222
18224
|
o[c] != null && o[c + 1] < t && (a = !0);
|
|
18223
|
-
return a &&
|
|
18225
|
+
return a && $w(l, o, n), l;
|
|
18224
18226
|
}
|
|
18225
18227
|
function Bw(n) {
|
|
18226
18228
|
let e = -1, t = !1;
|
|
@@ -18243,7 +18245,7 @@ function Bw(n) {
|
|
|
18243
18245
|
}
|
|
18244
18246
|
return e;
|
|
18245
18247
|
}
|
|
18246
|
-
function
|
|
18248
|
+
function $w(n, e, t) {
|
|
18247
18249
|
n.problems || (n.problems = []);
|
|
18248
18250
|
const r = {};
|
|
18249
18251
|
for (let i = 0; i < n.map.length; i++) {
|
|
@@ -18257,7 +18259,7 @@ function _w(n, e, t) {
|
|
|
18257
18259
|
const a = o.attrs;
|
|
18258
18260
|
for (let c = 0; c < a.colspan; c++) {
|
|
18259
18261
|
const u = (i + c) % n.width, d = e[u * 2];
|
|
18260
|
-
d != null && (!a.colwidth || a.colwidth[c] != d) && ((l || (l =
|
|
18262
|
+
d != null && (!a.colwidth || a.colwidth[c] != d) && ((l || (l = zw(a)))[c] = d);
|
|
18261
18263
|
}
|
|
18262
18264
|
l && n.problems.unshift({
|
|
18263
18265
|
type: "colwidth mismatch",
|
|
@@ -18266,7 +18268,7 @@ function _w(n, e, t) {
|
|
|
18266
18268
|
});
|
|
18267
18269
|
}
|
|
18268
18270
|
}
|
|
18269
|
-
function
|
|
18271
|
+
function zw(n) {
|
|
18270
18272
|
if (n.colwidth) return n.colwidth.slice();
|
|
18271
18273
|
const e = [];
|
|
18272
18274
|
for (let t = 0; t < n.colspan; t++) e.push(0);
|
|
@@ -18284,7 +18286,7 @@ function Fl(n) {
|
|
|
18284
18286
|
return e;
|
|
18285
18287
|
}
|
|
18286
18288
|
new ue("selectingCells");
|
|
18287
|
-
function
|
|
18289
|
+
function _w(n) {
|
|
18288
18290
|
for (let e = n.depth - 1; e > 0; e--)
|
|
18289
18291
|
if (n.node(e).type.spec.tableRole == "row")
|
|
18290
18292
|
return n.node(0).resolve(n.before(e + 1));
|
|
@@ -18302,7 +18304,7 @@ function Hw(n) {
|
|
|
18302
18304
|
return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
18303
18305
|
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
|
|
18304
18306
|
return e.$anchor;
|
|
18305
|
-
const t =
|
|
18307
|
+
const t = _w(e.$head) || Fw(e.$head);
|
|
18306
18308
|
if (t)
|
|
18307
18309
|
return t;
|
|
18308
18310
|
throw new RangeError(`No cell found around position ${e.head}`);
|
|
@@ -18777,11 +18779,11 @@ var Ww = class {
|
|
|
18777
18779
|
}
|
|
18778
18780
|
get middlewares() {
|
|
18779
18781
|
const n = [];
|
|
18780
|
-
return this.floatingUIOptions.flip && n.push(
|
|
18781
|
-
|
|
18782
|
+
return this.floatingUIOptions.flip && n.push(zf(typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0)), this.floatingUIOptions.shift && n.push(
|
|
18783
|
+
$f(typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0)
|
|
18782
18784
|
), this.floatingUIOptions.offset && n.push(
|
|
18783
18785
|
Lf(typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0)
|
|
18784
|
-
), this.floatingUIOptions.arrow && n.push(Ff(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && n.push(
|
|
18786
|
+
), this.floatingUIOptions.arrow && n.push(Ff(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && n.push(_f(typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0)), this.floatingUIOptions.autoPlacement && n.push(
|
|
18785
18787
|
Bf(
|
|
18786
18788
|
typeof this.floatingUIOptions.autoPlacement != "boolean" ? this.floatingUIOptions.autoPlacement : void 0
|
|
18787
18789
|
)
|
|
@@ -18799,7 +18801,7 @@ var Ww = class {
|
|
|
18799
18801
|
getBoundingClientRect: () => r,
|
|
18800
18802
|
getClientRects: () => [r]
|
|
18801
18803
|
};
|
|
18802
|
-
if (e instanceof
|
|
18804
|
+
if (e instanceof _) {
|
|
18803
18805
|
let s = this.view.nodeDOM(e.from);
|
|
18804
18806
|
const o = s.dataset.nodeViewWrapper ? s : s.querySelector("[data-node-view-wrapper]");
|
|
18805
18807
|
o && (s = o), s && (i = {
|
|
@@ -19015,11 +19017,11 @@ var Kw = et({
|
|
|
19015
19017
|
}
|
|
19016
19018
|
get middlewares() {
|
|
19017
19019
|
const n = [];
|
|
19018
|
-
return this.floatingUIOptions.flip && n.push(
|
|
19019
|
-
|
|
19020
|
+
return this.floatingUIOptions.flip && n.push(zf(typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0)), this.floatingUIOptions.shift && n.push(
|
|
19021
|
+
$f(typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0)
|
|
19020
19022
|
), this.floatingUIOptions.offset && n.push(
|
|
19021
19023
|
Lf(typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0)
|
|
19022
|
-
), this.floatingUIOptions.arrow && n.push(Ff(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && n.push(
|
|
19024
|
+
), this.floatingUIOptions.arrow && n.push(Ff(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && n.push(_f(typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0)), this.floatingUIOptions.autoPlacement && n.push(
|
|
19023
19025
|
Bf(
|
|
19024
19026
|
typeof this.floatingUIOptions.autoPlacement != "boolean" ? this.floatingUIOptions.autoPlacement : void 0
|
|
19025
19027
|
)
|
|
@@ -19251,7 +19253,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19251
19253
|
editor: n.editor,
|
|
19252
19254
|
options: { placement: "bottom", offset: 8 }
|
|
19253
19255
|
}, {
|
|
19254
|
-
default:
|
|
19256
|
+
default: zn(() => [
|
|
19255
19257
|
T("div", Jw, [
|
|
19256
19258
|
T("button", {
|
|
19257
19259
|
onClick: i,
|
|
@@ -19419,7 +19421,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19419
19421
|
function E(K) {
|
|
19420
19422
|
f.value = K;
|
|
19421
19423
|
}
|
|
19422
|
-
function
|
|
19424
|
+
function $() {
|
|
19423
19425
|
s("update-avatar", c);
|
|
19424
19426
|
}
|
|
19425
19427
|
function W() {
|
|
@@ -19449,7 +19451,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19449
19451
|
}
|
|
19450
19452
|
if (K) {
|
|
19451
19453
|
const P = JSON.parse(K);
|
|
19452
|
-
c.userName = P.userName, c.userEmail = P.userEmail, c.userWebsite = P.userWebsite,
|
|
19454
|
+
c.userName = P.userName, c.userEmail = P.userEmail, c.userWebsite = P.userWebsite, $();
|
|
19453
19455
|
}
|
|
19454
19456
|
c.notify = 1;
|
|
19455
19457
|
}), (K, P) => (X(), Z("div", Qw, [
|
|
@@ -19482,7 +19484,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19482
19484
|
bt(Ye(Kr), {
|
|
19483
19485
|
content: m.website.tips
|
|
19484
19486
|
}, {
|
|
19485
|
-
default:
|
|
19487
|
+
default: zn(() => [
|
|
19486
19488
|
Te(T("input", {
|
|
19487
19489
|
class: "sus-input sus-web",
|
|
19488
19490
|
placeholder: m.website.placeholder,
|
|
@@ -19499,9 +19501,9 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19499
19501
|
bt(Ye(Kr), {
|
|
19500
19502
|
content: m.email.tips
|
|
19501
19503
|
}, {
|
|
19502
|
-
default:
|
|
19504
|
+
default: zn(() => [
|
|
19503
19505
|
Te(T("input", {
|
|
19504
|
-
onBlur:
|
|
19506
|
+
onBlur: $,
|
|
19505
19507
|
class: "sus-input sus-email",
|
|
19506
19508
|
placeholder: m.email.placeholder,
|
|
19507
19509
|
"onUpdate:modelValue": P[2] || (P[2] = (ee) => c.userEmail = ee),
|
|
@@ -19539,7 +19541,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19539
19541
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19540
19542
|
viewBox: "0 0 24 24"
|
|
19541
19543
|
}, [...P[5] || (P[5] = [
|
|
19542
|
-
Bs('<g fill="none" data-v-
|
|
19544
|
+
Bs('<g fill="none" data-v-78541ace><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-78541ace></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-78541ace></path><ellipse cx="9" cy="10.5" fill="currentColor" rx="1" ry="1.5" data-v-78541ace></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-78541ace></path></g>', 1)
|
|
19543
19545
|
])]))
|
|
19544
19546
|
])) : ke("", !0),
|
|
19545
19547
|
n.toolBar?.image ? (X(), Z("div", hk, [
|
|
@@ -19552,7 +19554,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19552
19554
|
name: "image",
|
|
19553
19555
|
accept: "image/*"
|
|
19554
19556
|
}, null, 544),
|
|
19555
|
-
P[6] || (P[6] = Bs('<label for="upload-input" data-v-
|
|
19557
|
+
P[6] || (P[6] = Bs('<label for="upload-input" data-v-78541ace><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-78541ace><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5" data-v-78541ace><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-78541ace></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-78541ace></path></g></svg></label>', 1))
|
|
19556
19558
|
])) : ke("", !0),
|
|
19557
19559
|
n.toolBar?.notify ? (X(), Z("div", {
|
|
19558
19560
|
key: 2,
|
|
@@ -19560,7 +19562,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19560
19562
|
class: "p-1"
|
|
19561
19563
|
}, [
|
|
19562
19564
|
Te(bt(Ye(Kr), { content: "收到回复后通知" }, {
|
|
19563
|
-
default:
|
|
19565
|
+
default: zn(() => [...P[7] || (P[7] = [
|
|
19564
19566
|
T("svg", {
|
|
19565
19567
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19566
19568
|
viewBox: "0 0 24 24"
|
|
@@ -19579,7 +19581,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19579
19581
|
[We, c.notify === 1]
|
|
19580
19582
|
]),
|
|
19581
19583
|
Te(bt(Ye(Kr), { content: "收到回复后不通知" }, {
|
|
19582
|
-
default:
|
|
19584
|
+
default: zn(() => [...P[8] || (P[8] = [
|
|
19583
19585
|
T("svg", {
|
|
19584
19586
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19585
19587
|
viewBox: "0 0 24 24"
|
|
@@ -19621,7 +19623,7 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19621
19623
|
"onUpdate:modelValue": P[4] || (P[4] = (ee) => c.privacy = ee),
|
|
19622
19624
|
checked: Ye(p)
|
|
19623
19625
|
}, {
|
|
19624
|
-
default:
|
|
19626
|
+
default: zn(() => [...P[9] || (P[9] = [
|
|
19625
19627
|
po(" 仅博主可见 ", -1)
|
|
19626
19628
|
])]),
|
|
19627
19629
|
_: 1
|
|
@@ -19646,14 +19648,14 @@ const Jw = { class: "sus-bubble-menu" }, Gw = /* @__PURE__ */ et({
|
|
|
19646
19648
|
onClick: (Se) => V(te),
|
|
19647
19649
|
class: "mask"
|
|
19648
19650
|
}, [...P[10] || (P[10] = [
|
|
19649
|
-
Bs('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-
|
|
19651
|
+
Bs('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-78541ace><g fill="none" stroke="currentColor" stroke-width="1.5" data-v-78541ace><path stroke-linecap="round" d="M20.5 6h-17m6 5l.5 5m4.5-5l-.5 5" data-v-78541ace></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-78541ace></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-78541ace></path></g></svg>', 1)
|
|
19650
19652
|
])], 8, bk)
|
|
19651
19653
|
]))), 128))
|
|
19652
19654
|
])
|
|
19653
19655
|
])
|
|
19654
19656
|
]));
|
|
19655
19657
|
}
|
|
19656
|
-
}), kk = /* @__PURE__ */ Dn(wk, [["__scopeId", "data-v-
|
|
19658
|
+
}), kk = /* @__PURE__ */ Dn(wk, [["__scopeId", "data-v-78541ace"]]);
|
|
19657
19659
|
function xk(n) {
|
|
19658
19660
|
const e = new Date(n), t = e.getFullYear(), r = e.getMonth() + 1, i = e.getDate(), s = /* @__PURE__ */ new Date(), o = s.getFullYear(), l = s.getMonth() + 1, a = s.getDate();
|
|
19659
19661
|
if (o === t && l == r) {
|
|
@@ -19681,10 +19683,10 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19681
19683
|
}, Lk = { class: "sus-item__user-date ml-3" }, Bk = {
|
|
19682
19684
|
key: 0,
|
|
19683
19685
|
class: "sus-item__content"
|
|
19684
|
-
},
|
|
19686
|
+
}, $k = ["innerHTML"], zk = {
|
|
19685
19687
|
key: 1,
|
|
19686
19688
|
class: "sus-item__content"
|
|
19687
|
-
},
|
|
19689
|
+
}, _k = ["innerHTML"], Hk = {
|
|
19688
19690
|
key: 0,
|
|
19689
19691
|
class: "sus-item__info flex justify-end mx-1"
|
|
19690
19692
|
}, Fk = { class: "sus-item__info-area flex items-center" }, Vk = { class: "sus-item__info-useragent flex items-center" }, jk = /* @__PURE__ */ et({
|
|
@@ -19695,33 +19697,36 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19695
19697
|
showFooter: { type: Boolean },
|
|
19696
19698
|
num: { default: 1 }
|
|
19697
19699
|
},
|
|
19698
|
-
emits: ["on-reply", "on-remove"],
|
|
19700
|
+
emits: ["on-reply", "on-edit", "on-remove"],
|
|
19699
19701
|
setup(n, { emit: e }) {
|
|
19700
19702
|
const t = n, r = qe(), i = qe(), s = qe(!1), o = e;
|
|
19701
19703
|
function l() {
|
|
19702
19704
|
r.value.style.display = "block", s.value = !1;
|
|
19703
19705
|
}
|
|
19704
19706
|
function a() {
|
|
19705
|
-
const
|
|
19706
|
-
|
|
19707
|
+
const p = r?.value?.clientHeight || 0, m = t.lineHeight * 5;
|
|
19708
|
+
p >= m && (s.value = !0);
|
|
19707
19709
|
}
|
|
19708
19710
|
function c() {
|
|
19709
19711
|
o("on-reply", t.comment);
|
|
19710
19712
|
}
|
|
19711
19713
|
function u() {
|
|
19712
|
-
o("on-
|
|
19714
|
+
o("on-edit", t.comment);
|
|
19713
19715
|
}
|
|
19714
19716
|
function d() {
|
|
19715
|
-
|
|
19717
|
+
o("on-remove", t.comment);
|
|
19716
19718
|
}
|
|
19717
19719
|
function f() {
|
|
19718
|
-
|
|
19719
|
-
|
|
19720
|
+
t.comment.userAvatar || (t.comment.userAvatar = "/error.webp");
|
|
19721
|
+
}
|
|
19722
|
+
function h() {
|
|
19723
|
+
const p = new Date(t.comment?.createdDate), m = /* @__PURE__ */ new Date(), g = new Date(m.getFullYear() - 1, m.getMonth(), m.getDate());
|
|
19724
|
+
return p > g ? "ugc noopener nofollow" : "ugc noopener noreferrer nofollow";
|
|
19720
19725
|
}
|
|
19721
19726
|
return Dr(() => {
|
|
19722
|
-
|
|
19723
|
-
}), (
|
|
19724
|
-
Te((X(), Z("svg", Sk, [...
|
|
19727
|
+
f(), a();
|
|
19728
|
+
}), (p, m) => (X(), Z("div", vk, [
|
|
19729
|
+
Te((X(), Z("svg", Sk, [...m[0] || (m[0] = [
|
|
19725
19730
|
T("rect", {
|
|
19726
19731
|
width: "24",
|
|
19727
19732
|
height: "24",
|
|
@@ -19742,13 +19747,13 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19742
19747
|
T("div", Ck, [
|
|
19743
19748
|
T("div", Mk, [
|
|
19744
19749
|
Te(T("span", {
|
|
19745
|
-
onClick:
|
|
19750
|
+
onClick: d,
|
|
19746
19751
|
class: "sus-item__operate-delete cursor-pointer"
|
|
19747
19752
|
}, " 删除 ", 512), [
|
|
19748
|
-
[We, !n.comment.privacy && n.comment.
|
|
19753
|
+
[We, !n.comment.privacy && n.comment.showDelete]
|
|
19749
19754
|
]),
|
|
19750
19755
|
Te(T("span", {
|
|
19751
|
-
onClick:
|
|
19756
|
+
onClick: u,
|
|
19752
19757
|
class: "sus-item__operate-edit cursor-pointer"
|
|
19753
19758
|
}, " 编辑 ", 512), [
|
|
19754
19759
|
[We, !n.comment.privacy && n.comment.showEdit]
|
|
@@ -19780,7 +19785,7 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19780
19785
|
T("div", Rk, [
|
|
19781
19786
|
T("a", {
|
|
19782
19787
|
target: "_blank",
|
|
19783
|
-
rel:
|
|
19788
|
+
rel: h(),
|
|
19784
19789
|
href: n.comment.userWebsite,
|
|
19785
19790
|
class: Qh([n.comment.tagName, "sus-item__user-name font-semibold ml-1 cursor-pointer"])
|
|
19786
19791
|
}, rt(n.comment.userName), 11, Ik),
|
|
@@ -19789,18 +19794,18 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19789
19794
|
T("span", Lk, rt(Ye(xk)(n.comment.createdDate)), 1)
|
|
19790
19795
|
]),
|
|
19791
19796
|
n.comment.privacy ? (X(), Z("div", Bk, [
|
|
19792
|
-
|
|
19797
|
+
m[1] || (m[1] = T("div", { class: "sus-item-privacy" }, null, -1)),
|
|
19793
19798
|
T("span", {
|
|
19794
19799
|
class: "sus-item-privacy-text",
|
|
19795
19800
|
innerHTML: n.comment.content
|
|
19796
|
-
}, null, 8,
|
|
19797
|
-
])) : (X(), Z("div",
|
|
19801
|
+
}, null, 8, $k)
|
|
19802
|
+
])) : (X(), Z("div", zk, [
|
|
19798
19803
|
T("span", {
|
|
19799
19804
|
ref_key: "contentDom",
|
|
19800
19805
|
ref: r,
|
|
19801
19806
|
class: "sus-item__content-text",
|
|
19802
19807
|
innerHTML: n.comment.content + (n.comment.contentExtends || "")
|
|
19803
|
-
}, null, 8,
|
|
19808
|
+
}, null, 8, _k),
|
|
19804
19809
|
s.value ? (X(), Z("a", {
|
|
19805
19810
|
key: 0,
|
|
19806
19811
|
ref_key: "showMoreDom",
|
|
@@ -19813,7 +19818,7 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19813
19818
|
]),
|
|
19814
19819
|
n.showFooter && n.comment.area && !n.comment.privacy ? (X(), Z("div", Hk, [
|
|
19815
19820
|
T("span", Fk, [
|
|
19816
|
-
|
|
19821
|
+
m[2] || (m[2] = T("svg", {
|
|
19817
19822
|
class: "sus-svg",
|
|
19818
19823
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19819
19824
|
viewBox: "0 0 24 24"
|
|
@@ -19831,7 +19836,7 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19831
19836
|
po(" " + rt(n.comment.area), 1)
|
|
19832
19837
|
]),
|
|
19833
19838
|
T("span", Vk, [
|
|
19834
|
-
|
|
19839
|
+
m[3] || (m[3] = T("svg", {
|
|
19835
19840
|
class: "sus-svg",
|
|
19836
19841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19837
19842
|
viewBox: "0 0 24 24"
|
|
@@ -19849,7 +19854,7 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19849
19854
|
])) : ke("", !0)
|
|
19850
19855
|
]));
|
|
19851
19856
|
}
|
|
19852
|
-
}), li = /* @__PURE__ */ Dn(jk, [["__scopeId", "data-v-
|
|
19857
|
+
}), li = /* @__PURE__ */ Dn(jk, [["__scopeId", "data-v-fc3a8ef9"]]), Uk = { class: "sus-comment__item" }, Wk = {
|
|
19853
19858
|
key: 0,
|
|
19854
19859
|
class: "sus-comment__item-child"
|
|
19855
19860
|
}, Kk = { key: 1 }, qk = {
|
|
@@ -19862,22 +19867,32 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19862
19867
|
lineHeight: { default: 23 },
|
|
19863
19868
|
showFooter: { type: Boolean, default: !1 }
|
|
19864
19869
|
},
|
|
19865
|
-
emits: ["on-reply"],
|
|
19870
|
+
emits: ["on-reply", "on-edit", "on-remove"],
|
|
19866
19871
|
setup(n, { emit: e }) {
|
|
19867
19872
|
const t = qe(!1), r = e;
|
|
19868
|
-
function i(
|
|
19869
|
-
r("on-reply",
|
|
19873
|
+
function i(l) {
|
|
19874
|
+
r("on-reply", l);
|
|
19875
|
+
}
|
|
19876
|
+
function s(l) {
|
|
19877
|
+
r("on-edit", l);
|
|
19878
|
+
}
|
|
19879
|
+
function o(l) {
|
|
19880
|
+
r("on-remove", l);
|
|
19870
19881
|
}
|
|
19871
|
-
return (
|
|
19882
|
+
return (l, a) => (X(), Z("div", Uk, [
|
|
19872
19883
|
bt(li, {
|
|
19873
19884
|
comment: n.comment,
|
|
19874
|
-
onOnReply:
|
|
19885
|
+
onOnReply: a[0] || (a[0] = (c) => i(n.comment)),
|
|
19886
|
+
onOnEdit: a[1] || (a[1] = (c) => s(n.comment)),
|
|
19887
|
+
onOnRemove: a[2] || (a[2] = (c) => o(n.comment)),
|
|
19875
19888
|
lineHeight: n.lineHeight,
|
|
19876
19889
|
showFooter: n.showFooter
|
|
19877
19890
|
}, null, 8, ["comment", "lineHeight", "showFooter"]),
|
|
19878
19891
|
n.comment.child?.length > 0 ? (X(), Z("div", Wk, [
|
|
19879
19892
|
bt(li, {
|
|
19880
|
-
onOnReply:
|
|
19893
|
+
onOnReply: a[3] || (a[3] = (c) => i(n.comment.child[0])),
|
|
19894
|
+
onOnEdit: a[4] || (a[4] = (c) => s(n.comment.child[0])),
|
|
19895
|
+
onOnRemove: a[5] || (a[5] = (c) => o(n.comment.child[0])),
|
|
19881
19896
|
comment: n.comment.child[0],
|
|
19882
19897
|
num: 2,
|
|
19883
19898
|
showFooter: n.showFooter,
|
|
@@ -19886,7 +19901,9 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19886
19901
|
}, null, 8, ["comment", "showFooter", "lineHeight"]),
|
|
19887
19902
|
n.comment.child?.length > 1 ? (X(), ho(li, {
|
|
19888
19903
|
key: 0,
|
|
19889
|
-
onOnReply:
|
|
19904
|
+
onOnReply: a[6] || (a[6] = (c) => i(n.comment.child[1])),
|
|
19905
|
+
onOnEdit: a[7] || (a[7] = (c) => s(n.comment.child[1])),
|
|
19906
|
+
onOnRemove: a[8] || (a[8] = (c) => o(n.comment.child[1])),
|
|
19890
19907
|
comment: n.comment.child[1],
|
|
19891
19908
|
num: 3,
|
|
19892
19909
|
showFooter: n.showFooter,
|
|
@@ -19897,23 +19914,25 @@ const vk = { class: "sus-item__container relative" }, Sk = {
|
|
|
19897
19914
|
t.value ? ke("", !0) : (X(), Z("div", qk, [
|
|
19898
19915
|
T("p", {
|
|
19899
19916
|
class: "sus-load-more",
|
|
19900
|
-
onClick:
|
|
19917
|
+
onClick: a[9] || (a[9] = (c) => t.value = !0)
|
|
19901
19918
|
}, " 查看更多回复 > ")
|
|
19902
19919
|
])),
|
|
19903
|
-
t.value ? (X(!0), Z(as, { key: 1 }, Go(n.comment.child.slice(2), (
|
|
19904
|
-
onOnReply: (
|
|
19905
|
-
|
|
19906
|
-
|
|
19907
|
-
|
|
19920
|
+
t.value ? (X(!0), Z(as, { key: 1 }, Go(n.comment.child.slice(2), (c, u) => (X(), ho(li, {
|
|
19921
|
+
onOnReply: (d) => i(c),
|
|
19922
|
+
onOnEdit: (d) => s(c),
|
|
19923
|
+
onOnRemove: (d) => o(c),
|
|
19924
|
+
key: u,
|
|
19925
|
+
comment: c,
|
|
19926
|
+
num: 4 + u,
|
|
19908
19927
|
showFooter: n.showFooter,
|
|
19909
19928
|
lineHeight: n.lineHeight,
|
|
19910
19929
|
class: "sus-comment__item-child__item"
|
|
19911
|
-
}, null, 8, ["onOnReply", "comment", "num", "showFooter", "lineHeight"]))), 128)) : ke("", !0)
|
|
19930
|
+
}, null, 8, ["onOnReply", "onOnEdit", "onOnRemove", "comment", "num", "showFooter", "lineHeight"]))), 128)) : ke("", !0)
|
|
19912
19931
|
])) : ke("", !0)
|
|
19913
19932
|
])) : ke("", !0)
|
|
19914
19933
|
]));
|
|
19915
19934
|
}
|
|
19916
|
-
}), Gk = /* @__PURE__ */ Dn(Jk, [["__scopeId", "data-v-
|
|
19935
|
+
}), Gk = /* @__PURE__ */ Dn(Jk, [["__scopeId", "data-v-b49dad89"]]), Yk = { class: "sus-top-item flex items-start p-1.5 overflow-hidden" }, Xk = { class: "sus-top-item__info flex flex-col mr-1" }, Qk = { class: "sus-top-item__user whitespace-nowrap" }, Zk = {
|
|
19917
19936
|
key: 0,
|
|
19918
19937
|
class: "sus-top-item__reply whitespace-nowrap"
|
|
19919
19938
|
}, ex = ["innerHTML"], tx = /* @__PURE__ */ et({
|