react-tiptap-base-editor 1.2.1 → 1.3.0
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/components/tiptap-node/resizable-image-node/resizable-image-component.d.ts.map +1 -1
- package/dist/components/tiptap-node/resizable-image-node/resizable-image-extension.d.ts.map +1 -1
- package/dist/components/tiptap-templates/simple/simple-editor.d.ts.map +1 -1
- package/dist/index.cjs +19 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +623 -623
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as v, jsxs as P, Fragment as ze } from "react/jsx-runtime";
|
|
2
2
|
import * as g from "react";
|
|
3
|
-
import pe, { createRef as B0, memo as _0, createContext as Ui, createElement as H0, version as nu, useContext as Wi, useState as Lr, useLayoutEffect as ji, useEffect as
|
|
3
|
+
import pe, { createRef as B0, memo as _0, createContext as Ui, createElement as H0, version as nu, useContext as Wi, useState as Lr, useLayoutEffect as ji, useEffect as An, useDebugValue as Ef, useRef as Rt, forwardRef as $0, useCallback as Ml } from "react";
|
|
4
4
|
import * as wa from "react-dom";
|
|
5
5
|
import Mf, { flushSync as F0 } from "react-dom";
|
|
6
6
|
var mo = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -778,12 +778,12 @@ function Lf(t, e, n, r) {
|
|
|
778
778
|
} else if (n.content.size)
|
|
779
779
|
if (!n.openStart && !n.openEnd && t.depth == r && e.depth == r) {
|
|
780
780
|
let s = t.parent, l = s.content;
|
|
781
|
-
return
|
|
781
|
+
return kn(s, l.cut(0, t.parentOffset).append(n.content).append(l.cut(e.parentOffset)));
|
|
782
782
|
} else {
|
|
783
783
|
let { start: s, end: l } = W0(n, t);
|
|
784
|
-
return
|
|
784
|
+
return kn(i, Pf(t, s, l, e, r));
|
|
785
785
|
}
|
|
786
|
-
else return
|
|
786
|
+
else return kn(i, Zo(t, e, r));
|
|
787
787
|
}
|
|
788
788
|
function Df(t, e) {
|
|
789
789
|
if (!e.type.compatibleContent(t.type))
|
|
@@ -793,29 +793,29 @@ function Al(t, e, n) {
|
|
|
793
793
|
let r = t.node(n);
|
|
794
794
|
return Df(r, e.node(n)), r;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Sn(t, e) {
|
|
797
797
|
let n = e.length - 1;
|
|
798
798
|
n >= 0 && t.isText && t.sameMarkup(e[n]) ? e[n] = t.withText(e[n].text + t.text) : e.push(t);
|
|
799
799
|
}
|
|
800
800
|
function Sr(t, e, n, r) {
|
|
801
801
|
let o = (e || t).node(n), i = 0, s = e ? e.index(n) : o.childCount;
|
|
802
|
-
t && (i = t.index(n), t.depth > n ? i++ : t.textOffset && (
|
|
802
|
+
t && (i = t.index(n), t.depth > n ? i++ : t.textOffset && (Sn(t.nodeAfter, r), i++));
|
|
803
803
|
for (let l = i; l < s; l++)
|
|
804
|
-
|
|
805
|
-
e && e.depth == n && e.textOffset &&
|
|
804
|
+
Sn(o.child(l), r);
|
|
805
|
+
e && e.depth == n && e.textOffset && Sn(e.nodeBefore, r);
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function kn(t, e) {
|
|
808
808
|
return t.type.checkContent(e), t.copy(e);
|
|
809
809
|
}
|
|
810
810
|
function Pf(t, e, n, r, o) {
|
|
811
811
|
let i = t.depth > o && Al(t, e, o + 1), s = r.depth > o && Al(n, r, o + 1), l = [];
|
|
812
|
-
return Sr(null, t, o, l), i && s && e.index(o) == n.index(o) ? (Df(i, s), kn(
|
|
812
|
+
return Sr(null, t, o, l), i && s && e.index(o) == n.index(o) ? (Df(i, s), Sn(kn(i, Pf(t, e, n, r, o + 1)), l)) : (i && Sn(kn(i, Zo(t, e, o + 1)), l), Sr(e, n, o, l), s && Sn(kn(s, Zo(n, r, o + 1)), l)), Sr(r, null, o, l), new A(l);
|
|
813
813
|
}
|
|
814
814
|
function Zo(t, e, n) {
|
|
815
815
|
let r = [];
|
|
816
816
|
if (Sr(null, t, n, r), t.depth > n) {
|
|
817
817
|
let o = Al(t, e, n + 1);
|
|
818
|
-
kn(
|
|
818
|
+
Sn(kn(o, Zo(t, e, n + 1)), r);
|
|
819
819
|
}
|
|
820
820
|
return Sr(e, null, n, r), new A(r);
|
|
821
821
|
}
|
|
@@ -1122,7 +1122,7 @@ class Yo {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
const q0 = /* @__PURE__ */ Object.create(null);
|
|
1125
|
-
let
|
|
1125
|
+
let Xt = class Rl {
|
|
1126
1126
|
/**
|
|
1127
1127
|
@internal
|
|
1128
1128
|
*/
|
|
@@ -1491,8 +1491,8 @@ let tn = class Rl {
|
|
|
1491
1491
|
return i.type.checkAttrs(i.attrs), i;
|
|
1492
1492
|
}
|
|
1493
1493
|
};
|
|
1494
|
-
|
|
1495
|
-
class Xo extends
|
|
1494
|
+
Xt.prototype.text = void 0;
|
|
1495
|
+
class Xo extends Xt {
|
|
1496
1496
|
/**
|
|
1497
1497
|
@internal
|
|
1498
1498
|
*/
|
|
@@ -1535,7 +1535,7 @@ function Bf(t, e) {
|
|
|
1535
1535
|
e = t[n].type.name + "(" + e + ")";
|
|
1536
1536
|
return e;
|
|
1537
1537
|
}
|
|
1538
|
-
class
|
|
1538
|
+
class Rn {
|
|
1539
1539
|
/**
|
|
1540
1540
|
@internal
|
|
1541
1541
|
*/
|
|
@@ -1548,7 +1548,7 @@ class On {
|
|
|
1548
1548
|
static parse(e, n) {
|
|
1549
1549
|
let r = new G0(e, n);
|
|
1550
1550
|
if (r.next == null)
|
|
1551
|
-
return
|
|
1551
|
+
return Rn.empty;
|
|
1552
1552
|
let o = _f(r);
|
|
1553
1553
|
r.next && r.err("Unexpected trailing text");
|
|
1554
1554
|
let i = t2(e2(o));
|
|
@@ -1697,7 +1697,7 @@ class On {
|
|
|
1697
1697
|
`);
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
|
|
1700
|
+
Rn.empty = new Rn(!0);
|
|
1701
1701
|
class G0 {
|
|
1702
1702
|
constructor(e, n) {
|
|
1703
1703
|
this.string = e, this.nodeTypes = n, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
@@ -1860,7 +1860,7 @@ function t2(t) {
|
|
|
1860
1860
|
});
|
|
1861
1861
|
});
|
|
1862
1862
|
});
|
|
1863
|
-
let i = e[r.join(",")] = new
|
|
1863
|
+
let i = e[r.join(",")] = new Rn(r.indexOf(t.length - 1) > -1);
|
|
1864
1864
|
for (let s = 0; s < o.length; s++) {
|
|
1865
1865
|
let l = o[s][1].sort(Hf);
|
|
1866
1866
|
i.next.push({ type: o[s][0], next: e[l.join(",")] || n(l) });
|
|
@@ -1943,7 +1943,7 @@ let cu = class Uf {
|
|
|
1943
1943
|
True for node types that allow no content.
|
|
1944
1944
|
*/
|
|
1945
1945
|
get isLeaf() {
|
|
1946
|
-
return this.contentMatch ==
|
|
1946
|
+
return this.contentMatch == Rn.empty;
|
|
1947
1947
|
}
|
|
1948
1948
|
/**
|
|
1949
1949
|
True when this node is an atom, i.e. when it does not have
|
|
@@ -1998,7 +1998,7 @@ let cu = class Uf {
|
|
|
1998
1998
|
create(e = null, n, r) {
|
|
1999
1999
|
if (this.isText)
|
|
2000
2000
|
throw new Error("NodeType.create can't construct text nodes");
|
|
2001
|
-
return new
|
|
2001
|
+
return new Xt(this, this.computeAttrs(e), A.from(n), ne.setFrom(r));
|
|
2002
2002
|
}
|
|
2003
2003
|
/**
|
|
2004
2004
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
|
|
@@ -2006,7 +2006,7 @@ let cu = class Uf {
|
|
|
2006
2006
|
if it doesn't match.
|
|
2007
2007
|
*/
|
|
2008
2008
|
createChecked(e = null, n, r) {
|
|
2009
|
-
return n = A.from(n), this.checkContent(n), new
|
|
2009
|
+
return n = A.from(n), this.checkContent(n), new Xt(this, this.computeAttrs(e), n, ne.setFrom(r));
|
|
2010
2010
|
}
|
|
2011
2011
|
/**
|
|
2012
2012
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
|
|
@@ -2024,7 +2024,7 @@ let cu = class Uf {
|
|
|
2024
2024
|
n = s.append(n);
|
|
2025
2025
|
}
|
|
2026
2026
|
let o = this.contentMatch.matchFragment(n), i = o && o.fillBefore(A.empty, !0);
|
|
2027
|
-
return i ? new
|
|
2027
|
+
return i ? new Xt(this, e, n.append(i), ne.setFrom(r)) : null;
|
|
2028
2028
|
}
|
|
2029
2029
|
/**
|
|
2030
2030
|
Returns true if the given fragment is valid content for this node
|
|
@@ -2184,7 +2184,7 @@ class Wf {
|
|
|
2184
2184
|
if (o in this.marks)
|
|
2185
2185
|
throw new RangeError(o + " can not be both a node and a mark");
|
|
2186
2186
|
let i = this.nodes[o], s = i.spec.content || "", l = i.spec.marks;
|
|
2187
|
-
if (i.contentMatch = r[s] || (r[s] =
|
|
2187
|
+
if (i.contentMatch = r[s] || (r[s] = Rn.parse(s, this.nodes)), i.inlineContent = i.contentMatch.inlineContent, i.spec.linebreakReplacement) {
|
|
2188
2188
|
if (this.linebreakReplacement)
|
|
2189
2189
|
throw new RangeError("Multiple linebreak nodes defined");
|
|
2190
2190
|
if (!i.isInline || !i.isLeaf)
|
|
@@ -2197,7 +2197,7 @@ class Wf {
|
|
|
2197
2197
|
let i = this.marks[o], s = i.spec.excludes;
|
|
2198
2198
|
i.excluded = s == null ? [i] : s == "" ? [] : uu(this, s.split(" "));
|
|
2199
2199
|
}
|
|
2200
|
-
this.nodeFromJSON = (o) =>
|
|
2200
|
+
this.nodeFromJSON = (o) => Xt.fromJSON(this, o), this.markFromJSON = (o) => ne.fromJSON(this, o), this.topNodeType = this.nodes[this.spec.topNode || "doc"], this.cached.wrappings = /* @__PURE__ */ Object.create(null);
|
|
2201
2201
|
}
|
|
2202
2202
|
/**
|
|
2203
2203
|
Create a node in this schema. The `type` may be a string or a
|
|
@@ -2260,7 +2260,7 @@ function i2(t) {
|
|
|
2260
2260
|
function s2(t) {
|
|
2261
2261
|
return t.style != null;
|
|
2262
2262
|
}
|
|
2263
|
-
class
|
|
2263
|
+
class Qt {
|
|
2264
2264
|
/**
|
|
2265
2265
|
Create a parser that targets the given schema, using the given
|
|
2266
2266
|
parsing rules.
|
|
@@ -2372,7 +2372,7 @@ class nn {
|
|
|
2372
2372
|
[priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).
|
|
2373
2373
|
*/
|
|
2374
2374
|
static fromSchema(e) {
|
|
2375
|
-
return e.cached.domParser || (e.cached.domParser = new
|
|
2375
|
+
return e.cached.domParser || (e.cached.domParser = new Qt(e, Qt.schemaRules(e)));
|
|
2376
2376
|
}
|
|
2377
2377
|
}
|
|
2378
2378
|
const jf = {
|
|
@@ -2767,7 +2767,7 @@ function pu(t, e) {
|
|
|
2767
2767
|
return !0;
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
2770
|
-
class
|
|
2770
|
+
class Bn {
|
|
2771
2771
|
/**
|
|
2772
2772
|
Create a serializer. `nodes` should map node names to functions
|
|
2773
2773
|
that take a node and return a description of the corresponding
|
|
@@ -2854,7 +2854,7 @@ class _n {
|
|
|
2854
2854
|
properties in a schema's node and mark specs.
|
|
2855
2855
|
*/
|
|
2856
2856
|
static fromSchema(e) {
|
|
2857
|
-
return e.cached.domSerializer || (e.cached.domSerializer = new
|
|
2857
|
+
return e.cached.domSerializer || (e.cached.domSerializer = new Bn(this.nodesFromSchema(e), this.marksFromSchema(e)));
|
|
2858
2858
|
}
|
|
2859
2859
|
/**
|
|
2860
2860
|
Gather the serializers in a schema's node specs into an object.
|
|
@@ -3278,7 +3278,7 @@ function Sa(t, e, n) {
|
|
|
3278
3278
|
}
|
|
3279
3279
|
return A.fromArray(r);
|
|
3280
3280
|
}
|
|
3281
|
-
class
|
|
3281
|
+
class Jt extends Ie {
|
|
3282
3282
|
/**
|
|
3283
3283
|
Create a mark step.
|
|
3284
3284
|
*/
|
|
@@ -3294,10 +3294,10 @@ class Xt extends Ie {
|
|
|
3294
3294
|
}
|
|
3295
3295
|
map(e) {
|
|
3296
3296
|
let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
3297
|
-
return n.deleted && r.deleted || n.pos >= r.pos ? null : new
|
|
3297
|
+
return n.deleted && r.deleted || n.pos >= r.pos ? null : new Jt(n.pos, r.pos, this.mark);
|
|
3298
3298
|
}
|
|
3299
3299
|
merge(e) {
|
|
3300
|
-
return e instanceof
|
|
3300
|
+
return e instanceof Jt && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Jt(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
3301
3301
|
}
|
|
3302
3302
|
toJSON() {
|
|
3303
3303
|
return {
|
|
@@ -3313,10 +3313,10 @@ class Xt extends Ie {
|
|
|
3313
3313
|
static fromJSON(e, n) {
|
|
3314
3314
|
if (typeof n.from != "number" || typeof n.to != "number")
|
|
3315
3315
|
throw new RangeError("Invalid input for AddMarkStep.fromJSON");
|
|
3316
|
-
return new
|
|
3316
|
+
return new Jt(n.from, n.to, e.markFromJSON(n.mark));
|
|
3317
3317
|
}
|
|
3318
3318
|
}
|
|
3319
|
-
Ie.jsonID("addMark",
|
|
3319
|
+
Ie.jsonID("addMark", Jt);
|
|
3320
3320
|
class it extends Ie {
|
|
3321
3321
|
/**
|
|
3322
3322
|
Create a mark-removing step.
|
|
@@ -3329,7 +3329,7 @@ class it extends Ie {
|
|
|
3329
3329
|
return me.fromReplace(e, this.from, this.to, r);
|
|
3330
3330
|
}
|
|
3331
3331
|
invert() {
|
|
3332
|
-
return new
|
|
3332
|
+
return new Jt(this.from, this.to, this.mark);
|
|
3333
3333
|
}
|
|
3334
3334
|
map(e) {
|
|
3335
3335
|
let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
@@ -3356,7 +3356,7 @@ class it extends Ie {
|
|
|
3356
3356
|
}
|
|
3357
3357
|
}
|
|
3358
3358
|
Ie.jsonID("removeMark", it);
|
|
3359
|
-
class
|
|
3359
|
+
class Zt extends Ie {
|
|
3360
3360
|
/**
|
|
3361
3361
|
Create a node mark step.
|
|
3362
3362
|
*/
|
|
@@ -3377,15 +3377,15 @@ class Qt extends Ie {
|
|
|
3377
3377
|
if (r.length == n.marks.length) {
|
|
3378
3378
|
for (let o = 0; o < n.marks.length; o++)
|
|
3379
3379
|
if (!n.marks[o].isInSet(r))
|
|
3380
|
-
return new
|
|
3381
|
-
return new
|
|
3380
|
+
return new Zt(this.pos, n.marks[o]);
|
|
3381
|
+
return new Zt(this.pos, this.mark);
|
|
3382
3382
|
}
|
|
3383
3383
|
}
|
|
3384
|
-
return new
|
|
3384
|
+
return new On(this.pos, this.mark);
|
|
3385
3385
|
}
|
|
3386
3386
|
map(e) {
|
|
3387
3387
|
let n = e.mapResult(this.pos, 1);
|
|
3388
|
-
return n.deletedAfter ? null : new
|
|
3388
|
+
return n.deletedAfter ? null : new Zt(n.pos, this.mark);
|
|
3389
3389
|
}
|
|
3390
3390
|
toJSON() {
|
|
3391
3391
|
return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
@@ -3396,11 +3396,11 @@ class Qt extends Ie {
|
|
|
3396
3396
|
static fromJSON(e, n) {
|
|
3397
3397
|
if (typeof n.pos != "number")
|
|
3398
3398
|
throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
|
|
3399
|
-
return new
|
|
3399
|
+
return new Zt(n.pos, e.markFromJSON(n.mark));
|
|
3400
3400
|
}
|
|
3401
3401
|
}
|
|
3402
|
-
Ie.jsonID("addNodeMark",
|
|
3403
|
-
class
|
|
3402
|
+
Ie.jsonID("addNodeMark", Zt);
|
|
3403
|
+
class On extends Ie {
|
|
3404
3404
|
/**
|
|
3405
3405
|
Create a mark-removing step.
|
|
3406
3406
|
*/
|
|
@@ -3416,11 +3416,11 @@ class Nn extends Ie {
|
|
|
3416
3416
|
}
|
|
3417
3417
|
invert(e) {
|
|
3418
3418
|
let n = e.nodeAt(this.pos);
|
|
3419
|
-
return !n || !this.mark.isInSet(n.marks) ? this : new
|
|
3419
|
+
return !n || !this.mark.isInSet(n.marks) ? this : new Zt(this.pos, this.mark);
|
|
3420
3420
|
}
|
|
3421
3421
|
map(e) {
|
|
3422
3422
|
let n = e.mapResult(this.pos, 1);
|
|
3423
|
-
return n.deletedAfter ? null : new
|
|
3423
|
+
return n.deletedAfter ? null : new On(n.pos, this.mark);
|
|
3424
3424
|
}
|
|
3425
3425
|
toJSON() {
|
|
3426
3426
|
return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
@@ -3431,10 +3431,10 @@ class Nn extends Ie {
|
|
|
3431
3431
|
static fromJSON(e, n) {
|
|
3432
3432
|
if (typeof n.pos != "number")
|
|
3433
3433
|
throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
|
|
3434
|
-
return new
|
|
3434
|
+
return new On(n.pos, e.markFromJSON(n.mark));
|
|
3435
3435
|
}
|
|
3436
3436
|
}
|
|
3437
|
-
Ie.jsonID("removeNodeMark",
|
|
3437
|
+
Ie.jsonID("removeNodeMark", On);
|
|
3438
3438
|
class be extends Ie {
|
|
3439
3439
|
/**
|
|
3440
3440
|
The given `slice` should fit the 'gap' between `from` and
|
|
@@ -3569,7 +3569,7 @@ function p2(t, e, n, r) {
|
|
|
3569
3569
|
let f = Math.max(c, e), h = Math.min(c + a.nodeSize, n), p = r.addToSet(d);
|
|
3570
3570
|
for (let m = 0; m < d.length; m++)
|
|
3571
3571
|
d[m].isInSet(p) || (s && s.to == f && s.mark.eq(d[m]) ? s.to = h : o.push(s = new it(f, h, d[m])));
|
|
3572
|
-
l && l.to == f ? l.to = h : i.push(l = new
|
|
3572
|
+
l && l.to == f ? l.to = h : i.push(l = new Jt(f, h, r));
|
|
3573
3573
|
}
|
|
3574
3574
|
}), o.forEach((a) => t.step(a)), i.forEach((a) => t.step(a));
|
|
3575
3575
|
}
|
|
@@ -3762,7 +3762,7 @@ function k2(t, e, n = 1, r) {
|
|
|
3762
3762
|
}
|
|
3763
3763
|
t.step(new be(e, e, new D(i.append(s), n, n), !0));
|
|
3764
3764
|
}
|
|
3765
|
-
function
|
|
3765
|
+
function dn(t, e) {
|
|
3766
3766
|
let n = t.resolve(e), r = n.index();
|
|
3767
3767
|
return eh(n.nodeBefore, n.nodeAfter) && n.parent.canReplace(r, r + 1);
|
|
3768
3768
|
}
|
|
@@ -4380,7 +4380,7 @@ class sh {
|
|
|
4380
4380
|
Add a mark to the node at position `pos`.
|
|
4381
4381
|
*/
|
|
4382
4382
|
addNodeMark(e, n) {
|
|
4383
|
-
return this.step(new
|
|
4383
|
+
return this.step(new Zt(e, n)), this;
|
|
4384
4384
|
}
|
|
4385
4385
|
/**
|
|
4386
4386
|
Remove a mark (or all marks of the given type) from the node at
|
|
@@ -4391,11 +4391,11 @@ class sh {
|
|
|
4391
4391
|
if (!r)
|
|
4392
4392
|
throw new RangeError("No node at position " + e);
|
|
4393
4393
|
if (n instanceof ne)
|
|
4394
|
-
n.isInSet(r.marks) && this.step(new
|
|
4394
|
+
n.isInSet(r.marks) && this.step(new On(e, n));
|
|
4395
4395
|
else {
|
|
4396
4396
|
let o = r.marks, i, s = [];
|
|
4397
4397
|
for (; i = n.isInSet(o); )
|
|
4398
|
-
s.push(new
|
|
4398
|
+
s.push(new On(e, i)), o = i.removeFromSet(o);
|
|
4399
4399
|
for (let l = s.length - 1; l >= 0; l--)
|
|
4400
4400
|
this.step(s[l]);
|
|
4401
4401
|
}
|
|
@@ -4531,11 +4531,11 @@ let q = class {
|
|
|
4531
4531
|
found.
|
|
4532
4532
|
*/
|
|
4533
4533
|
static findFrom(e, n, r = !1) {
|
|
4534
|
-
let o = e.parent.inlineContent ? new z(e) :
|
|
4534
|
+
let o = e.parent.inlineContent ? new z(e) : qn(e.node(0), e.parent, e.pos, e.index(), n, r);
|
|
4535
4535
|
if (o)
|
|
4536
4536
|
return o;
|
|
4537
4537
|
for (let i = e.depth - 1; i >= 0; i--) {
|
|
4538
|
-
let s = n < 0 ?
|
|
4538
|
+
let s = n < 0 ? qn(e.node(0), e.node(i), e.before(i + 1), e.index(i), n, r) : qn(e.node(0), e.node(i), e.after(i + 1), e.index(i) + 1, n, r);
|
|
4539
4539
|
if (s)
|
|
4540
4540
|
return s;
|
|
4541
4541
|
}
|
|
@@ -4556,14 +4556,14 @@ let q = class {
|
|
|
4556
4556
|
exists.
|
|
4557
4557
|
*/
|
|
4558
4558
|
static atStart(e) {
|
|
4559
|
-
return
|
|
4559
|
+
return qn(e, e, 0, 0, 1) || new je(e);
|
|
4560
4560
|
}
|
|
4561
4561
|
/**
|
|
4562
4562
|
Find the cursor or leaf node selection closest to the end of the
|
|
4563
4563
|
given document.
|
|
4564
4564
|
*/
|
|
4565
4565
|
static atEnd(e) {
|
|
4566
|
-
return
|
|
4566
|
+
return qn(e, e, e.content.size, e.childCount, -1) || new je(e);
|
|
4567
4567
|
}
|
|
4568
4568
|
/**
|
|
4569
4569
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -4802,7 +4802,7 @@ const P2 = {
|
|
|
4802
4802
|
return new je(t);
|
|
4803
4803
|
}
|
|
4804
4804
|
};
|
|
4805
|
-
function
|
|
4805
|
+
function qn(t, e, n, r, o, i = !1) {
|
|
4806
4806
|
if (e.inlineContent)
|
|
4807
4807
|
return z.create(t, n);
|
|
4808
4808
|
for (let s = r - (o > 0 ? 0 : 1); o > 0 ? s < e.childCount : s >= 0; s += o) {
|
|
@@ -4811,7 +4811,7 @@ function Gn(t, e, n, r, o, i = !1) {
|
|
|
4811
4811
|
if (!i && _.isSelectable(l))
|
|
4812
4812
|
return _.create(t, n - (o < 0 ? l.nodeSize : 0));
|
|
4813
4813
|
} else {
|
|
4814
|
-
let a =
|
|
4814
|
+
let a = qn(t, l, n + o, o < 0 ? l.childCount : 0, o, i);
|
|
4815
4815
|
if (a)
|
|
4816
4816
|
return a;
|
|
4817
4817
|
}
|
|
@@ -5180,7 +5180,7 @@ class Qn {
|
|
|
5180
5180
|
let o = new Ps(e.schema, e.plugins), i = new Qn(o);
|
|
5181
5181
|
return o.fields.forEach((s) => {
|
|
5182
5182
|
if (s.name == "doc")
|
|
5183
|
-
i.doc =
|
|
5183
|
+
i.doc = Xt.fromJSON(e.schema, n.doc);
|
|
5184
5184
|
else if (s.name == "selection")
|
|
5185
5185
|
i.selection = q.fromJSON(i.doc, n.selection);
|
|
5186
5186
|
else if (s.name == "storedMarks")
|
|
@@ -5399,7 +5399,7 @@ function Ra(t) {
|
|
|
5399
5399
|
const F2 = (t, e) => {
|
|
5400
5400
|
let n = t.selection, r = n instanceof _, o;
|
|
5401
5401
|
if (r) {
|
|
5402
|
-
if (n.node.isTextblock || !
|
|
5402
|
+
if (n.node.isTextblock || !dn(t.doc, n.from))
|
|
5403
5403
|
return !1;
|
|
5404
5404
|
o = n.from;
|
|
5405
5405
|
} else if (o = qi(t.doc, n.from, -1), o == null)
|
|
@@ -5412,7 +5412,7 @@ const F2 = (t, e) => {
|
|
|
5412
5412
|
}, V2 = (t, e) => {
|
|
5413
5413
|
let n = t.selection, r;
|
|
5414
5414
|
if (n instanceof _) {
|
|
5415
|
-
if (n.node.isTextblock || !
|
|
5415
|
+
if (n.node.isTextblock || !dn(t.doc, n.to))
|
|
5416
5416
|
return !1;
|
|
5417
5417
|
r = n.to;
|
|
5418
5418
|
} else if (r = qi(t.doc, n.to, 1), r == null)
|
|
@@ -5505,7 +5505,7 @@ const j2 = W2(), K2 = (t, e) => {
|
|
|
5505
5505
|
};
|
|
5506
5506
|
function q2(t, e, n) {
|
|
5507
5507
|
let r = e.nodeBefore, o = e.nodeAfter, i = e.index();
|
|
5508
|
-
return !r || !o || !r.type.compatibleContent(o.type) ? !1 : !r.content.size && e.parent.canReplace(i - 1, i) ? (n && n(t.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(i, i + 1) || !(o.isTextblock ||
|
|
5508
|
+
return !r || !o || !r.type.compatibleContent(o.type) ? !1 : !r.content.size && e.parent.canReplace(i - 1, i) ? (n && n(t.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(i, i + 1) || !(o.isTextblock || dn(t.doc, e.pos)) ? !1 : (n && n(t.tr.join(e.pos).scrollIntoView()), !0);
|
|
5509
5509
|
}
|
|
5510
5510
|
function bh(t, e, n, r) {
|
|
5511
5511
|
let o = e.nodeBefore, i = e.nodeAfter, s, l, a = o.type.spec.isolating || i.type.spec.isolating;
|
|
@@ -5519,7 +5519,7 @@ function bh(t, e, n, r) {
|
|
|
5519
5519
|
p = A.from(s[b].create(null, p));
|
|
5520
5520
|
p = A.from(o.copy(p));
|
|
5521
5521
|
let m = t.tr.step(new Ce(e.pos - 1, h, e.pos, h, new D(p, 1, 0), s.length, !0)), y = m.doc.resolve(h + 2 * s.length);
|
|
5522
|
-
y.nodeAfter && y.nodeAfter.type == o.type &&
|
|
5522
|
+
y.nodeAfter && y.nodeAfter.type == o.type && dn(m.doc, y.pos) && m.join(y.pos), n(m.scrollIntoView());
|
|
5523
5523
|
}
|
|
5524
5524
|
return !0;
|
|
5525
5525
|
}
|
|
@@ -5653,7 +5653,7 @@ function ty(t, e, n, r) {
|
|
|
5653
5653
|
return !1;
|
|
5654
5654
|
o.lift(r, l);
|
|
5655
5655
|
let a = o.doc.resolve(o.mapping.map(i, -1) - 1);
|
|
5656
|
-
return
|
|
5656
|
+
return dn(o.doc, a.pos) && a.nodeBefore.type == a.nodeAfter.type && o.join(a.pos), e(o.scrollIntoView()), !0;
|
|
5657
5657
|
}
|
|
5658
5658
|
function ny(t, e, n) {
|
|
5659
5659
|
let r = t.tr, o = n.parent;
|
|
@@ -5700,7 +5700,7 @@ const Mt = function(t, e, n) {
|
|
|
5700
5700
|
return r.setEnd(t, n ?? t.nodeValue.length), r.setStart(t, e || 0), r;
|
|
5701
5701
|
}, oy = function() {
|
|
5702
5702
|
Ll = null;
|
|
5703
|
-
},
|
|
5703
|
+
}, Nn = function(t, e, n, r) {
|
|
5704
5704
|
return n && (Mu(t, e, n, r, -1) || Mu(t, e, n, r, 1));
|
|
5705
5705
|
}, iy = /^(img|br|input|textarea|hr)$/i;
|
|
5706
5706
|
function Mu(t, e, n, r, o) {
|
|
@@ -5773,9 +5773,9 @@ function Qr(t) {
|
|
|
5773
5773
|
return e && e.node && e.node.isBlock && (e.dom == t || e.contentDOM == t);
|
|
5774
5774
|
}
|
|
5775
5775
|
const Zi = function(t) {
|
|
5776
|
-
return t.focusNode &&
|
|
5776
|
+
return t.focusNode && Nn(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
|
|
5777
5777
|
};
|
|
5778
|
-
function
|
|
5778
|
+
function gn(t, e) {
|
|
5779
5779
|
let n = document.createEvent("Event");
|
|
5780
5780
|
return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
|
|
5781
5781
|
}
|
|
@@ -5799,9 +5799,9 @@ function uy(t, e, n) {
|
|
|
5799
5799
|
return { node: r.startContainer, offset: Math.min(Qe(r.startContainer), r.startOffset) };
|
|
5800
5800
|
}
|
|
5801
5801
|
}
|
|
5802
|
-
const mt = typeof navigator < "u" ? navigator : null, Tu = typeof document < "u" ? document : null,
|
|
5803
|
-
et && +(/Firefox\/(\d+)/.exec(
|
|
5804
|
-
const Bl = !Fe && /Chrome\/(\d+)/.exec(
|
|
5802
|
+
const mt = typeof navigator < "u" ? navigator : null, Tu = typeof document < "u" ? document : null, fn = mt && mt.userAgent || "", Dl = /Edge\/(\d+)/.exec(fn), wh = /MSIE \d/.exec(fn), Pl = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fn), Fe = !!(wh || Pl || Dl), en = wh ? document.documentMode : Pl ? +Pl[1] : Dl ? +Dl[1] : 0, et = !Fe && /gecko\/(\d+)/i.test(fn);
|
|
5803
|
+
et && +(/Firefox\/(\d+)/.exec(fn) || [0, 0])[1];
|
|
5804
|
+
const Bl = !Fe && /Chrome\/(\d+)/.exec(fn), Oe = !!Bl, xh = Bl ? +Bl[1] : 0, De = !Fe && !!mt && /Apple Computer/.test(mt.vendor), lr = De && (/Mobile\/\w+/.test(fn) || !!mt && mt.maxTouchPoints > 2), Xe = lr || (mt ? /Mac/.test(mt.platform) : !1), dy = mt ? /Win/.test(mt.platform) : !1, Tt = /Android \d/.test(fn), eo = !!Tu && "webkitFontSmoothing" in Tu.documentElement.style, fy = eo ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5805
5805
|
function hy(t) {
|
|
5806
5806
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
5807
5807
|
return e ? {
|
|
@@ -5881,18 +5881,18 @@ function kh(t, e) {
|
|
|
5881
5881
|
r.scrollTop != o + e && (r.scrollTop = o + e), r.scrollLeft != i && (r.scrollLeft = i);
|
|
5882
5882
|
}
|
|
5883
5883
|
}
|
|
5884
|
-
let
|
|
5884
|
+
let zn = null;
|
|
5885
5885
|
function yy(t) {
|
|
5886
5886
|
if (t.setActive)
|
|
5887
5887
|
return t.setActive();
|
|
5888
|
-
if (
|
|
5889
|
-
return t.focus(
|
|
5888
|
+
if (zn)
|
|
5889
|
+
return t.focus(zn);
|
|
5890
5890
|
let e = Sh(t);
|
|
5891
|
-
t.focus(
|
|
5891
|
+
t.focus(zn == null ? {
|
|
5892
5892
|
get preventScroll() {
|
|
5893
|
-
return
|
|
5893
|
+
return zn = { preventScroll: !0 }, !0;
|
|
5894
5894
|
}
|
|
5895
|
-
} : void 0),
|
|
5895
|
+
} : void 0), zn || (zn = !1, kh(e, 0));
|
|
5896
5896
|
}
|
|
5897
5897
|
function Eh(t, e) {
|
|
5898
5898
|
let n, r = 2e8, o, i = 0, s = e.top, l = e.top, a, c;
|
|
@@ -6135,7 +6135,7 @@ let Ou = null, Nu = null, Iu = !1;
|
|
|
6135
6135
|
function Ty(t, e, n) {
|
|
6136
6136
|
return Ou == e && Nu == n ? Iu : (Ou = e, Nu = n, Iu = n == "up" || n == "down" ? ky(t, e, n) : My(t, e, n));
|
|
6137
6137
|
}
|
|
6138
|
-
const tt = 0, Lu = 1,
|
|
6138
|
+
const tt = 0, Lu = 1, bn = 2, gt = 3;
|
|
6139
6139
|
class to {
|
|
6140
6140
|
constructor(e, n, r, o) {
|
|
6141
6141
|
this.parent = e, this.children = n, this.dom = r, this.contentDOM = o, this.dirty = tt, r.pmViewDesc = this;
|
|
@@ -6418,7 +6418,7 @@ class to {
|
|
|
6418
6418
|
let h = u.focusNode.childNodes[u.focusOffset];
|
|
6419
6419
|
h && h.contentEditable == "false" && (o = !0);
|
|
6420
6420
|
}
|
|
6421
|
-
if (!(o || d && De) &&
|
|
6421
|
+
if (!(o || d && De) && Nn(l.node, l.offset, u.anchorNode, u.anchorOffset) && Nn(a.node, a.offset, u.focusNode, u.focusOffset))
|
|
6422
6422
|
return;
|
|
6423
6423
|
let f = !1;
|
|
6424
6424
|
if ((c.extend || e == n) && !(d && et)) {
|
|
@@ -6451,19 +6451,19 @@ class to {
|
|
|
6451
6451
|
if (r == s ? e <= s && n >= r : e < s && n > r) {
|
|
6452
6452
|
let l = r + i.border, a = s - i.border;
|
|
6453
6453
|
if (e >= l && n <= a) {
|
|
6454
|
-
this.dirty = e == r || n == s ?
|
|
6454
|
+
this.dirty = e == r || n == s ? bn : Lu, e == l && n == a && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty = gt : i.markDirty(e - l, n - l);
|
|
6455
6455
|
return;
|
|
6456
6456
|
} else
|
|
6457
|
-
i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ?
|
|
6457
|
+
i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? bn : gt;
|
|
6458
6458
|
}
|
|
6459
6459
|
r = s;
|
|
6460
6460
|
}
|
|
6461
|
-
this.dirty =
|
|
6461
|
+
this.dirty = bn;
|
|
6462
6462
|
}
|
|
6463
6463
|
markParentsDirty() {
|
|
6464
6464
|
let e = 1;
|
|
6465
6465
|
for (let n = this.parent; n; n = n.parent, e++) {
|
|
6466
|
-
let r = e == 1 ?
|
|
6466
|
+
let r = e == 1 ? bn : Lu;
|
|
6467
6467
|
n.dirty < r && (n.dirty = r);
|
|
6468
6468
|
}
|
|
6469
6469
|
}
|
|
@@ -6540,13 +6540,13 @@ class Ay extends to {
|
|
|
6540
6540
|
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
6541
6541
|
}
|
|
6542
6542
|
}
|
|
6543
|
-
class
|
|
6543
|
+
class In extends to {
|
|
6544
6544
|
constructor(e, n, r, o, i) {
|
|
6545
6545
|
super(e, [], r, o), this.mark = n, this.spec = i;
|
|
6546
6546
|
}
|
|
6547
6547
|
static create(e, n, r, o) {
|
|
6548
6548
|
let i = o.nodeViews[n.type.name], s = i && i(n, o, r);
|
|
6549
|
-
return (!s || !s.dom) && (s =
|
|
6549
|
+
return (!s || !s.dom) && (s = Bn.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new In(e, n, s.dom, s.contentDOM || s.dom, s);
|
|
6550
6550
|
}
|
|
6551
6551
|
parseRule() {
|
|
6552
6552
|
return this.dirty & gt || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
@@ -6563,7 +6563,7 @@ class Ln extends to {
|
|
|
6563
6563
|
}
|
|
6564
6564
|
}
|
|
6565
6565
|
slice(e, n, r) {
|
|
6566
|
-
let o =
|
|
6566
|
+
let o = In.create(this.parent, this.mark, !0, r), i = this.children, s = this.size;
|
|
6567
6567
|
n < s && (i = Hl(i, n, s, r)), e > 0 && (i = Hl(i, 0, e, r));
|
|
6568
6568
|
for (let l = 0; l < i.length; l++)
|
|
6569
6569
|
i[l].parent = o;
|
|
@@ -6576,7 +6576,7 @@ class Ln extends to {
|
|
|
6576
6576
|
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
6577
6577
|
}
|
|
6578
6578
|
}
|
|
6579
|
-
class
|
|
6579
|
+
class tn extends to {
|
|
6580
6580
|
constructor(e, n, r, o, i, s, l, a, c) {
|
|
6581
6581
|
super(e, [], i, s), this.node = n, this.outerDeco = r, this.innerDeco = o, this.nodeDOM = l;
|
|
6582
6582
|
}
|
|
@@ -6601,10 +6601,10 @@ class on extends to {
|
|
|
6601
6601
|
u = document.createTextNode(n.text);
|
|
6602
6602
|
else if (u.nodeType != 3)
|
|
6603
6603
|
throw new RangeError("Text must be rendered as a DOM text node");
|
|
6604
|
-
} else u || ({ dom: u, contentDOM: d } =
|
|
6604
|
+
} else u || ({ dom: u, contentDOM: d } = Bn.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
|
|
6605
6605
|
!d && !n.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), n.type.spec.draggable && (u.draggable = !0));
|
|
6606
6606
|
let f = u;
|
|
6607
|
-
return u = Lh(u, r, n), c ? a = new Ry(e, n, r, o, u, d || null, f, c, i, s + 1) : n.isText ? new Yi(e, n, r, o, u, f, i) : new
|
|
6607
|
+
return u = Lh(u, r, n), c ? a = new Ry(e, n, r, o, u, d || null, f, c, i, s + 1) : n.isText ? new Yi(e, n, r, o, u, f, i) : new tn(e, n, r, o, u, d || null, f, i, s + 1);
|
|
6608
6608
|
}
|
|
6609
6609
|
parseRule() {
|
|
6610
6610
|
if (this.node.type.spec.reparseInView)
|
|
@@ -6647,7 +6647,7 @@ class on extends to {
|
|
|
6647
6647
|
a.syncToMarks(c.marks, r, e);
|
|
6648
6648
|
let h;
|
|
6649
6649
|
a.findNodeMatch(c, u, d, f) || l && e.state.selection.from > o && e.state.selection.to < o + c.nodeSize && (h = a.findIndexWithChild(i.node)) > -1 && a.updateNodeAt(c, u, d, h, e) || a.updateNextNode(c, u, d, e, f, o) || a.addNode(c, u, d, e, o), o += c.nodeSize;
|
|
6650
|
-
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty ==
|
|
6650
|
+
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == bn) && (s && this.protectLocalComposition(e, s), Nh(this.contentDOM, this.children, e), lr && Py(this.dom));
|
|
6651
6651
|
}
|
|
6652
6652
|
localCompositionInfo(e, n) {
|
|
6653
6653
|
let { from: r, to: o } = e.state.selection;
|
|
@@ -6704,10 +6704,10 @@ class on extends to {
|
|
|
6704
6704
|
}
|
|
6705
6705
|
function Du(t, e, n, r, o) {
|
|
6706
6706
|
Lh(r, e, t);
|
|
6707
|
-
let i = new
|
|
6707
|
+
let i = new tn(void 0, t, e, n, r, r, r, o, 0);
|
|
6708
6708
|
return i.contentDOM && i.updateChildren(o, 0), i;
|
|
6709
6709
|
}
|
|
6710
|
-
class Yi extends
|
|
6710
|
+
class Yi extends tn {
|
|
6711
6711
|
constructor(e, n, r, o, i, s, l) {
|
|
6712
6712
|
super(e, n, r, o, i, null, s, l, 0);
|
|
6713
6713
|
}
|
|
@@ -6764,7 +6764,7 @@ class Oh extends to {
|
|
|
6764
6764
|
return this.dom.nodeName == "IMG";
|
|
6765
6765
|
}
|
|
6766
6766
|
}
|
|
6767
|
-
class Ry extends
|
|
6767
|
+
class Ry extends tn {
|
|
6768
6768
|
constructor(e, n, r, o, i, s, l, a, c, u) {
|
|
6769
6769
|
super(e, n, r, o, i, s, l, c, u), this.spec = a;
|
|
6770
6770
|
}
|
|
@@ -6808,7 +6808,7 @@ function Nh(t, e, n) {
|
|
|
6808
6808
|
r = r.nextSibling;
|
|
6809
6809
|
} else
|
|
6810
6810
|
o = !0, t.insertBefore(l, r);
|
|
6811
|
-
if (s instanceof
|
|
6811
|
+
if (s instanceof In) {
|
|
6812
6812
|
let a = r ? r.previousSibling : t.lastChild;
|
|
6813
6813
|
Nh(s.contentDOM, s.children, n), r = a ? a.nextSibling : t.firstChild;
|
|
6814
6814
|
}
|
|
@@ -6821,11 +6821,11 @@ const Er = function(t) {
|
|
|
6821
6821
|
t && (this.nodeName = t);
|
|
6822
6822
|
};
|
|
6823
6823
|
Er.prototype = /* @__PURE__ */ Object.create(null);
|
|
6824
|
-
const
|
|
6824
|
+
const Cn = [new Er()];
|
|
6825
6825
|
function _l(t, e, n) {
|
|
6826
6826
|
if (t.length == 0)
|
|
6827
|
-
return
|
|
6828
|
-
let r = n ?
|
|
6827
|
+
return Cn;
|
|
6828
|
+
let r = n ? Cn[0] : new Er(), o = [r];
|
|
6829
6829
|
for (let i = 0; i < t.length; i++) {
|
|
6830
6830
|
let s = t[i].type.attrs;
|
|
6831
6831
|
if (s) {
|
|
@@ -6839,16 +6839,16 @@ function _l(t, e, n) {
|
|
|
6839
6839
|
return o;
|
|
6840
6840
|
}
|
|
6841
6841
|
function Ih(t, e, n, r) {
|
|
6842
|
-
if (n ==
|
|
6842
|
+
if (n == Cn && r == Cn)
|
|
6843
6843
|
return e;
|
|
6844
6844
|
let o = e;
|
|
6845
6845
|
for (let i = 0; i < r.length; i++) {
|
|
6846
6846
|
let s = r[i], l = n[i];
|
|
6847
6847
|
if (i) {
|
|
6848
6848
|
let a;
|
|
6849
|
-
l && l.nodeName == s.nodeName && o != t && (a = o.parentNode) && a.nodeName.toLowerCase() == s.nodeName || (a = document.createElement(s.nodeName), a.pmIsDeco = !0, a.appendChild(o), l =
|
|
6849
|
+
l && l.nodeName == s.nodeName && o != t && (a = o.parentNode) && a.nodeName.toLowerCase() == s.nodeName || (a = document.createElement(s.nodeName), a.pmIsDeco = !0, a.appendChild(o), l = Cn[0]), o = a;
|
|
6850
6850
|
}
|
|
6851
|
-
Oy(o, l ||
|
|
6851
|
+
Oy(o, l || Cn[0], s);
|
|
6852
6852
|
}
|
|
6853
6853
|
return o;
|
|
6854
6854
|
}
|
|
@@ -6875,7 +6875,7 @@ function Oy(t, e, n) {
|
|
|
6875
6875
|
}
|
|
6876
6876
|
}
|
|
6877
6877
|
function Lh(t, e, n) {
|
|
6878
|
-
return Ih(t, t,
|
|
6878
|
+
return Ih(t, t, Cn, _l(e, n, t.nodeType != 1));
|
|
6879
6879
|
}
|
|
6880
6880
|
function Qo(t, e) {
|
|
6881
6881
|
if (t.length != e.length)
|
|
@@ -6927,7 +6927,7 @@ class Ny {
|
|
|
6927
6927
|
if (l > -1)
|
|
6928
6928
|
l > this.index && (this.changed = !0, this.destroyBetween(this.index, l)), this.top = this.top.children[this.index];
|
|
6929
6929
|
else {
|
|
6930
|
-
let a =
|
|
6930
|
+
let a = In.create(this.top, e[i], n, r);
|
|
6931
6931
|
this.top.children.splice(this.index, 0, a), this.top = a, this.changed = !0;
|
|
6932
6932
|
}
|
|
6933
6933
|
this.index = 0, i++;
|
|
@@ -6951,7 +6951,7 @@ class Ny {
|
|
|
6951
6951
|
}
|
|
6952
6952
|
updateNodeAt(e, n, r, o, i) {
|
|
6953
6953
|
let s = this.top.children[o];
|
|
6954
|
-
return s.dirty == gt && s.dom == s.contentDOM && (s.dirty =
|
|
6954
|
+
return s.dirty == gt && s.dom == s.contentDOM && (s.dirty = bn), s.update(e, n, r, i) ? (this.destroyBetween(this.index, o), this.index++, !0) : !1;
|
|
6955
6955
|
}
|
|
6956
6956
|
findIndexWithChild(e) {
|
|
6957
6957
|
for (; ; ) {
|
|
@@ -6975,7 +6975,7 @@ class Ny {
|
|
|
6975
6975
|
updateNextNode(e, n, r, o, i, s) {
|
|
6976
6976
|
for (let l = this.index; l < this.top.children.length; l++) {
|
|
6977
6977
|
let a = this.top.children[l];
|
|
6978
|
-
if (a instanceof
|
|
6978
|
+
if (a instanceof tn) {
|
|
6979
6979
|
let c = this.preMatch.matched.get(a);
|
|
6980
6980
|
if (c != null && c != i)
|
|
6981
6981
|
return !1;
|
|
@@ -6983,7 +6983,7 @@ class Ny {
|
|
|
6983
6983
|
if (!f && a.update(e, n, r, o))
|
|
6984
6984
|
return this.destroyBetween(this.index, l), a.dom != u && (this.changed = !0), this.index++, !0;
|
|
6985
6985
|
if (!f && (d = this.recreateWrapper(a, e, n, r, o, s)))
|
|
6986
|
-
return this.destroyBetween(this.index, l), this.top.children[this.index] = d, d.contentDOM && (d.dirty =
|
|
6986
|
+
return this.destroyBetween(this.index, l), this.top.children[this.index] = d, d.contentDOM && (d.dirty = bn, d.updateChildren(o, s + 1), d.dirty = tt), this.changed = !0, this.index++, !0;
|
|
6987
6987
|
break;
|
|
6988
6988
|
}
|
|
6989
6989
|
}
|
|
@@ -6994,7 +6994,7 @@ class Ny {
|
|
|
6994
6994
|
recreateWrapper(e, n, r, o, i, s) {
|
|
6995
6995
|
if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !Qo(r, e.outerDeco) || !o.eq(e.innerDeco))
|
|
6996
6996
|
return null;
|
|
6997
|
-
let l =
|
|
6997
|
+
let l = tn.create(this.top, n, r, o, i, s);
|
|
6998
6998
|
if (l.contentDOM) {
|
|
6999
6999
|
l.children = e.children, e.children = [];
|
|
7000
7000
|
for (let a of l.children)
|
|
@@ -7004,7 +7004,7 @@ class Ny {
|
|
|
7004
7004
|
}
|
|
7005
7005
|
// Insert the node as a newly created node desc.
|
|
7006
7006
|
addNode(e, n, r, o, i) {
|
|
7007
|
-
let s =
|
|
7007
|
+
let s = tn.create(this.top, e, n, r, o, i);
|
|
7008
7008
|
s.contentDOM && s.updateChildren(o, i + 1), this.top.children.splice(this.index++, 0, s), this.changed = !0;
|
|
7009
7009
|
}
|
|
7010
7010
|
placeWidget(e, n, r) {
|
|
@@ -7020,7 +7020,7 @@ class Ny {
|
|
|
7020
7020
|
// contentEditable.
|
|
7021
7021
|
addTextblockHacks() {
|
|
7022
7022
|
let e = this.top.children[this.index - 1], n = this.top;
|
|
7023
|
-
for (; e instanceof
|
|
7023
|
+
for (; e instanceof In; )
|
|
7024
7024
|
n = e, e = n.children[n.children.length - 1];
|
|
7025
7025
|
(!e || // Empty textblock
|
|
7026
7026
|
!(e instanceof Yi) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((De || Oe) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
|
|
@@ -7046,7 +7046,7 @@ function Iy(t, e) {
|
|
|
7046
7046
|
for (; ; )
|
|
7047
7047
|
if (r) {
|
|
7048
7048
|
let c = n.children[r - 1];
|
|
7049
|
-
if (c instanceof
|
|
7049
|
+
if (c instanceof In)
|
|
7050
7050
|
n = c, r = c.children.length;
|
|
7051
7051
|
else {
|
|
7052
7052
|
l = c, r--;
|
|
@@ -7201,7 +7201,7 @@ function Nt(t, e = !1) {
|
|
|
7201
7201
|
if (Ph(t, n), !!Dh(t)) {
|
|
7202
7202
|
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && Oe) {
|
|
7203
7203
|
let r = t.domSelectionRange(), o = t.domObserver.currentSelection;
|
|
7204
|
-
if (r.anchorNode && o.anchorNode &&
|
|
7204
|
+
if (r.anchorNode && o.anchorNode && Nn(r.anchorNode, r.anchorOffset, o.anchorNode, o.anchorOffset)) {
|
|
7205
7205
|
t.input.mouseDown.delayedSelectionSync = !0, t.domObserver.setCurSelection();
|
|
7206
7206
|
return;
|
|
7207
7207
|
}
|
|
@@ -7248,7 +7248,7 @@ function Hy(t) {
|
|
|
7248
7248
|
if (!e)
|
|
7249
7249
|
return;
|
|
7250
7250
|
let n = t.cursorWrapper.dom, r = n.nodeName == "IMG";
|
|
7251
|
-
r ? e.collapse(n.parentNode, Ee(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Fe &&
|
|
7251
|
+
r ? e.collapse(n.parentNode, Ee(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Fe && en <= 11 && (n.disabled = !0, n.disabled = !1);
|
|
7252
7252
|
}
|
|
7253
7253
|
function Ph(t, e) {
|
|
7254
7254
|
if (e instanceof _) {
|
|
@@ -7278,13 +7278,13 @@ function Bh(t) {
|
|
|
7278
7278
|
}
|
|
7279
7279
|
function $y(t) {
|
|
7280
7280
|
let e = t.docView.domFromPos(t.state.selection.anchor, 0), n = t.domSelectionRange();
|
|
7281
|
-
return
|
|
7281
|
+
return Nn(e.node, e.offset, n.anchorNode, n.anchorOffset);
|
|
7282
7282
|
}
|
|
7283
7283
|
function $l(t, e) {
|
|
7284
7284
|
let { $anchor: n, $head: r } = t.selection, o = e > 0 ? n.max(r) : n.min(r), i = o.parent.inlineContent ? o.depth ? t.doc.resolve(e > 0 ? o.after() : o.before()) : null : o;
|
|
7285
7285
|
return i && q.findFrom(i, e);
|
|
7286
7286
|
}
|
|
7287
|
-
function
|
|
7287
|
+
function Wt(t, e) {
|
|
7288
7288
|
return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
7289
7289
|
}
|
|
7290
7290
|
function Vu(t, e, n) {
|
|
@@ -7295,25 +7295,25 @@ function Vu(t, e, n) {
|
|
|
7295
7295
|
if (!i || i.isText || !i.isLeaf)
|
|
7296
7296
|
return !1;
|
|
7297
7297
|
let s = t.state.doc.resolve(o.pos + i.nodeSize * (e < 0 ? -1 : 1));
|
|
7298
|
-
return
|
|
7298
|
+
return Wt(t, new z(r.$anchor, s));
|
|
7299
7299
|
} else if (r.empty) {
|
|
7300
7300
|
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
7301
7301
|
let o = $l(t.state, e);
|
|
7302
|
-
return o && o instanceof _ ?
|
|
7302
|
+
return o && o instanceof _ ? Wt(t, o) : !1;
|
|
7303
7303
|
} else if (!(Xe && n.indexOf("m") > -1)) {
|
|
7304
7304
|
let o = r.$head, i = o.textOffset ? null : e < 0 ? o.nodeBefore : o.nodeAfter, s;
|
|
7305
7305
|
if (!i || i.isText)
|
|
7306
7306
|
return !1;
|
|
7307
7307
|
let l = e < 0 ? o.pos - i.nodeSize : o.pos;
|
|
7308
|
-
return i.isAtom || (s = t.docView.descAt(l)) && !s.contentDOM ? _.isSelectable(i) ?
|
|
7308
|
+
return i.isAtom || (s = t.docView.descAt(l)) && !s.contentDOM ? _.isSelectable(i) ? Wt(t, new _(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : eo ? Wt(t, new z(t.state.doc.resolve(e < 0 ? l : l + i.nodeSize))) : !1 : !1;
|
|
7309
7309
|
}
|
|
7310
7310
|
} else return !1;
|
|
7311
7311
|
else {
|
|
7312
7312
|
if (r instanceof _ && r.node.isInline)
|
|
7313
|
-
return
|
|
7313
|
+
return Wt(t, new z(e > 0 ? r.$to : r.$from));
|
|
7314
7314
|
{
|
|
7315
7315
|
let o = $l(t.state, e);
|
|
7316
|
-
return o ?
|
|
7316
|
+
return o ? Wt(t, o) : !1;
|
|
7317
7317
|
}
|
|
7318
7318
|
}
|
|
7319
7319
|
}
|
|
@@ -7324,7 +7324,7 @@ function Mr(t, e) {
|
|
|
7324
7324
|
let n = t.pmViewDesc;
|
|
7325
7325
|
return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
|
|
7326
7326
|
}
|
|
7327
|
-
function
|
|
7327
|
+
function Un(t, e) {
|
|
7328
7328
|
return e < 0 ? Fy(t) : Vy(t);
|
|
7329
7329
|
}
|
|
7330
7330
|
function Fy(t) {
|
|
@@ -7466,11 +7466,11 @@ function Uu(t, e, n) {
|
|
|
7466
7466
|
if (!o.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
7467
7467
|
let s = $l(t.state, e);
|
|
7468
7468
|
if (s && s instanceof _)
|
|
7469
|
-
return
|
|
7469
|
+
return Wt(t, s);
|
|
7470
7470
|
}
|
|
7471
7471
|
if (!o.parent.inlineContent) {
|
|
7472
7472
|
let s = e < 0 ? o : i, l = r instanceof je ? q.near(s, e) : q.findFrom(s, e);
|
|
7473
|
-
return l ?
|
|
7473
|
+
return l ? Wt(t, l) : !1;
|
|
7474
7474
|
}
|
|
7475
7475
|
return !1;
|
|
7476
7476
|
}
|
|
@@ -7511,22 +7511,22 @@ function jy(t) {
|
|
|
7511
7511
|
function Ky(t, e) {
|
|
7512
7512
|
let n = e.keyCode, r = jy(e);
|
|
7513
7513
|
if (n == 8 || Xe && n == 72 && r == "c")
|
|
7514
|
-
return Wu(t, -1) ||
|
|
7514
|
+
return Wu(t, -1) || Un(t, -1);
|
|
7515
7515
|
if (n == 46 && !e.shiftKey || Xe && n == 68 && r == "c")
|
|
7516
|
-
return Wu(t, 1) ||
|
|
7516
|
+
return Wu(t, 1) || Un(t, 1);
|
|
7517
7517
|
if (n == 13 || n == 27)
|
|
7518
7518
|
return !0;
|
|
7519
7519
|
if (n == 37 || Xe && n == 66 && r == "c") {
|
|
7520
7520
|
let o = n == 37 ? zu(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
7521
|
-
return Vu(t, o, r) ||
|
|
7521
|
+
return Vu(t, o, r) || Un(t, o);
|
|
7522
7522
|
} else if (n == 39 || Xe && n == 70 && r == "c") {
|
|
7523
7523
|
let o = n == 39 ? zu(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
7524
|
-
return Vu(t, o, r) ||
|
|
7524
|
+
return Vu(t, o, r) || Un(t, o);
|
|
7525
7525
|
} else {
|
|
7526
7526
|
if (n == 38 || Xe && n == 80 && r == "c")
|
|
7527
|
-
return Uu(t, -1, r) ||
|
|
7527
|
+
return Uu(t, -1, r) || Un(t, -1);
|
|
7528
7528
|
if (n == 40 || Xe && n == 78 && r == "c")
|
|
7529
|
-
return Wy(t) || Uu(t, 1, r) ||
|
|
7529
|
+
return Wy(t) || Uu(t, 1, r) || Un(t, 1);
|
|
7530
7530
|
if (r == (Xe ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
|
|
7531
7531
|
return !0;
|
|
7532
7532
|
}
|
|
@@ -7542,7 +7542,7 @@ function Pa(t, e) {
|
|
|
7542
7542
|
let h = r.firstChild;
|
|
7543
7543
|
n.push(h.type.name, h.attrs != h.type.defaultAttrs ? h.attrs : null), r = h.content;
|
|
7544
7544
|
}
|
|
7545
|
-
let s = t.someProp("clipboardSerializer") ||
|
|
7545
|
+
let s = t.someProp("clipboardSerializer") || Bn.fromSchema(t.state.schema), l = Uh(), a = l.createElement("div");
|
|
7546
7546
|
a.appendChild(s.serializeFragment(r, { document: l }));
|
|
7547
7547
|
let c = a.firstChild, u, d = 0;
|
|
7548
7548
|
for (; c && c.nodeType == 1 && (u = zh[c.nodeName.toLowerCase()]); ) {
|
|
@@ -7577,7 +7577,7 @@ function Hh(t, e, n, r, o) {
|
|
|
7577
7577
|
if (d)
|
|
7578
7578
|
l = d;
|
|
7579
7579
|
else {
|
|
7580
|
-
let f = o.marks(), { schema: h } = t.state, p =
|
|
7580
|
+
let f = o.marks(), { schema: h } = t.state, p = Bn.fromSchema(h);
|
|
7581
7581
|
s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
|
|
7582
7582
|
let y = s.appendChild(document.createElement("p"));
|
|
7583
7583
|
m && y.appendChild(p.serializeNode(h.text(m, f)));
|
|
@@ -7597,7 +7597,7 @@ function Hh(t, e, n, r, o) {
|
|
|
7597
7597
|
break;
|
|
7598
7598
|
s = f;
|
|
7599
7599
|
}
|
|
7600
|
-
if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") ||
|
|
7600
|
+
if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") || Qt.fromSchema(t.state.schema)).parseSlice(s, {
|
|
7601
7601
|
preserveWhitespace: !!(a || u),
|
|
7602
7602
|
context: o,
|
|
7603
7603
|
ruleFromNode(f) {
|
|
@@ -7737,7 +7737,7 @@ function tv(t) {
|
|
|
7737
7737
|
}
|
|
7738
7738
|
De && t.dom.addEventListener("input", () => null), zl(t);
|
|
7739
7739
|
}
|
|
7740
|
-
function
|
|
7740
|
+
function Yt(t, e) {
|
|
7741
7741
|
t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
|
|
7742
7742
|
}
|
|
7743
7743
|
function nv(t) {
|
|
@@ -7777,9 +7777,9 @@ Be.keydown = (t, e) => {
|
|
|
7777
7777
|
if (n.keyCode != 229 && t.domObserver.forceFlush(), lr && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
|
|
7778
7778
|
let r = Date.now();
|
|
7779
7779
|
t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
7780
|
-
t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t,
|
|
7780
|
+
t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, gn(13, "Enter"))), t.input.lastIOSEnter = 0);
|
|
7781
7781
|
}, 200);
|
|
7782
|
-
} else t.someProp("handleKeyDown", (r) => r(t, n)) || Ky(t, n) ? n.preventDefault() :
|
|
7782
|
+
} else t.someProp("handleKeyDown", (r) => r(t, n)) || Ky(t, n) ? n.preventDefault() : Yt(t, "key");
|
|
7783
7783
|
};
|
|
7784
7784
|
Be.keyup = (t, e) => {
|
|
7785
7785
|
e.keyCode == 16 && (t.input.shiftKey = !1);
|
|
@@ -7878,7 +7878,7 @@ Pe.mousedown = (t, e) => {
|
|
|
7878
7878
|
let r = Ha(t), o = Date.now(), i = "singleClick";
|
|
7879
7879
|
o - t.input.lastClick.time < 500 && iv(n, t.input.lastClick) && !n[Wh] && t.input.lastClick.button == n.button && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i, button: n.button };
|
|
7880
7880
|
let s = t.posAtCoords(Xi(n));
|
|
7881
|
-
s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new fv(t, s, n, !!r)) : (i == "doubleClick" ? cv : uv)(t, s.pos, s.inside, n) ? n.preventDefault() :
|
|
7881
|
+
s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new fv(t, s, n, !!r)) : (i == "doubleClick" ? cv : uv)(t, s.pos, s.inside, n) ? n.preventDefault() : Yt(t, "pointer"));
|
|
7882
7882
|
};
|
|
7883
7883
|
class fv {
|
|
7884
7884
|
constructor(e, n, r, o) {
|
|
@@ -7900,7 +7900,7 @@ class fv {
|
|
|
7900
7900
|
setUneditable: !!(this.target && et && !this.target.hasAttribute("contentEditable"))
|
|
7901
7901
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
7902
7902
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
7903
|
-
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)),
|
|
7903
|
+
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), Yt(e, "pointer");
|
|
7904
7904
|
}
|
|
7905
7905
|
done() {
|
|
7906
7906
|
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => Nt(this.view)), this.view.input.mouseDown = null;
|
|
@@ -7909,7 +7909,7 @@ class fv {
|
|
|
7909
7909
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
7910
7910
|
return;
|
|
7911
7911
|
let n = this.pos;
|
|
7912
|
-
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Xi(e))), this.updateAllowDefault(e), this.allowDefault || !n ?
|
|
7912
|
+
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Xi(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Yt(this.view, "pointer") : av(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
7913
7913
|
De && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
7914
7914
|
// cursor, but still report that the node is selected
|
|
7915
7915
|
// when asked through getSelection. You'll then get a
|
|
@@ -7917,20 +7917,20 @@ class fv {
|
|
|
7917
7917
|
// (hidden) cursor is doesn't change the selection, and
|
|
7918
7918
|
// thus doesn't get a reaction from ProseMirror. This
|
|
7919
7919
|
// works around that.
|
|
7920
|
-
Oe && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (tr(this.view, q.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) :
|
|
7920
|
+
Oe && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (tr(this.view, q.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : Yt(this.view, "pointer");
|
|
7921
7921
|
}
|
|
7922
7922
|
move(e) {
|
|
7923
|
-
this.updateAllowDefault(e),
|
|
7923
|
+
this.updateAllowDefault(e), Yt(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
7924
7924
|
}
|
|
7925
7925
|
updateAllowDefault(e) {
|
|
7926
7926
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
7927
7927
|
}
|
|
7928
7928
|
}
|
|
7929
7929
|
Pe.touchstart = (t) => {
|
|
7930
|
-
t.input.lastTouch = Date.now(), Ha(t),
|
|
7930
|
+
t.input.lastTouch = Date.now(), Ha(t), Yt(t, "pointer");
|
|
7931
7931
|
};
|
|
7932
7932
|
Pe.touchmove = (t) => {
|
|
7933
|
-
t.input.lastTouch = Date.now(),
|
|
7933
|
+
t.input.lastTouch = Date.now(), Yt(t, "pointer");
|
|
7934
7934
|
};
|
|
7935
7935
|
Pe.contextmenu = (t) => Ha(t);
|
|
7936
7936
|
function jh(t, e) {
|
|
@@ -8013,7 +8013,7 @@ function gv(t, e) {
|
|
|
8013
8013
|
n.parentNode && n.parentNode.removeChild(n), t.focus();
|
|
8014
8014
|
}, 50);
|
|
8015
8015
|
}
|
|
8016
|
-
const Hr = Fe &&
|
|
8016
|
+
const Hr = Fe && en < 15 || lr && fy < 604;
|
|
8017
8017
|
Pe.copy = Be.cut = (t, e) => {
|
|
8018
8018
|
let n = e, r = t.state.selection, o = n.type == "cut";
|
|
8019
8019
|
if (r.empty)
|
|
@@ -8142,7 +8142,7 @@ Pe.beforeinput = (t, e) => {
|
|
|
8142
8142
|
t.domObserver.flushSoon();
|
|
8143
8143
|
let { domChangeCount: r } = t.input;
|
|
8144
8144
|
setTimeout(() => {
|
|
8145
|
-
if (t.input.domChangeCount != r || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (i) => i(t,
|
|
8145
|
+
if (t.input.domChangeCount != r || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (i) => i(t, gn(8, "Backspace")))))
|
|
8146
8146
|
return;
|
|
8147
8147
|
let { $cursor: o } = t.state.selection;
|
|
8148
8148
|
o && o.pos > 0 && t.dispatch(t.state.tr.delete(o.pos - 1, o.pos).scrollIntoView());
|
|
@@ -8164,7 +8164,7 @@ function Fr(t, e) {
|
|
|
8164
8164
|
}
|
|
8165
8165
|
class ni {
|
|
8166
8166
|
constructor(e, n) {
|
|
8167
|
-
this.toDOM = e, this.spec = n ||
|
|
8167
|
+
this.toDOM = e, this.spec = n || En, this.side = this.spec.side || 0;
|
|
8168
8168
|
}
|
|
8169
8169
|
map(e, n, r, o) {
|
|
8170
8170
|
let { pos: i, deleted: s } = e.mapResult(n.from + o, this.side < 0 ? -1 : 1);
|
|
@@ -8180,9 +8180,9 @@ class ni {
|
|
|
8180
8180
|
this.spec.destroy && this.spec.destroy(e);
|
|
8181
8181
|
}
|
|
8182
8182
|
}
|
|
8183
|
-
class
|
|
8183
|
+
class nn {
|
|
8184
8184
|
constructor(e, n) {
|
|
8185
|
-
this.attrs = e, this.spec = n ||
|
|
8185
|
+
this.attrs = e, this.spec = n || En;
|
|
8186
8186
|
}
|
|
8187
8187
|
map(e, n, r, o) {
|
|
8188
8188
|
let i = e.map(n.from + o, this.spec.inclusiveStart ? -1 : 1) - r, s = e.map(n.to + o, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
@@ -8192,17 +8192,17 @@ class sn {
|
|
|
8192
8192
|
return n.from < n.to;
|
|
8193
8193
|
}
|
|
8194
8194
|
eq(e) {
|
|
8195
|
-
return this == e || e instanceof
|
|
8195
|
+
return this == e || e instanceof nn && Fr(this.attrs, e.attrs) && Fr(this.spec, e.spec);
|
|
8196
8196
|
}
|
|
8197
8197
|
static is(e) {
|
|
8198
|
-
return e.type instanceof
|
|
8198
|
+
return e.type instanceof nn;
|
|
8199
8199
|
}
|
|
8200
8200
|
destroy() {
|
|
8201
8201
|
}
|
|
8202
8202
|
}
|
|
8203
8203
|
class $a {
|
|
8204
8204
|
constructor(e, n) {
|
|
8205
|
-
this.attrs = e, this.spec = n ||
|
|
8205
|
+
this.attrs = e, this.spec = n || En;
|
|
8206
8206
|
}
|
|
8207
8207
|
map(e, n, r, o) {
|
|
8208
8208
|
let i = e.mapResult(n.from + o, 1);
|
|
@@ -8262,7 +8262,7 @@ class Le {
|
|
|
8262
8262
|
each inline node between `from` and `to`.
|
|
8263
8263
|
*/
|
|
8264
8264
|
static inline(e, n, r, o) {
|
|
8265
|
-
return new Le(e, n, new
|
|
8265
|
+
return new Le(e, n, new nn(r, o));
|
|
8266
8266
|
}
|
|
8267
8267
|
/**
|
|
8268
8268
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -8283,7 +8283,7 @@ class Le {
|
|
|
8283
8283
|
@internal
|
|
8284
8284
|
*/
|
|
8285
8285
|
get inline() {
|
|
8286
|
-
return this.type instanceof
|
|
8286
|
+
return this.type instanceof nn;
|
|
8287
8287
|
}
|
|
8288
8288
|
/**
|
|
8289
8289
|
@internal
|
|
@@ -8292,13 +8292,13 @@ class Le {
|
|
|
8292
8292
|
return this.type instanceof ni;
|
|
8293
8293
|
}
|
|
8294
8294
|
}
|
|
8295
|
-
const
|
|
8295
|
+
const Gn = [], En = {};
|
|
8296
8296
|
class ae {
|
|
8297
8297
|
/**
|
|
8298
8298
|
@internal
|
|
8299
8299
|
*/
|
|
8300
8300
|
constructor(e, n) {
|
|
8301
|
-
this.local = e.length ? e :
|
|
8301
|
+
this.local = e.length ? e : Gn, this.children = n.length ? n : Gn;
|
|
8302
8302
|
}
|
|
8303
8303
|
/**
|
|
8304
8304
|
Create a set of decorations, using the structure of the given
|
|
@@ -8306,7 +8306,7 @@ class ae {
|
|
|
8306
8306
|
you must make a copy if you want need to preserve that.
|
|
8307
8307
|
*/
|
|
8308
8308
|
static create(e, n) {
|
|
8309
|
-
return n.length ? ri(n, e, 0,
|
|
8309
|
+
return n.length ? ri(n, e, 0, En) : Re;
|
|
8310
8310
|
}
|
|
8311
8311
|
/**
|
|
8312
8312
|
Find all decorations in this set which touch the given range
|
|
@@ -8336,7 +8336,7 @@ class ae {
|
|
|
8336
8336
|
document.
|
|
8337
8337
|
*/
|
|
8338
8338
|
map(e, n, r) {
|
|
8339
|
-
return this == Re || e.maps.length == 0 ? this : this.mapInner(e, n, 0, 0, r ||
|
|
8339
|
+
return this == Re || e.maps.length == 0 ? this : this.mapInner(e, n, 0, 0, r || En);
|
|
8340
8340
|
}
|
|
8341
8341
|
/**
|
|
8342
8342
|
@internal
|
|
@@ -8347,7 +8347,7 @@ class ae {
|
|
|
8347
8347
|
let a = this.local[l].map(e, r, o);
|
|
8348
8348
|
a && a.type.valid(n, a) ? (s || (s = [])).push(a) : i.onRemove && i.onRemove(this.local[l].spec);
|
|
8349
8349
|
}
|
|
8350
|
-
return this.children.length ? Cv(this.children, s || [], e, n, r, o, i) : s ? new ae(s.sort(
|
|
8350
|
+
return this.children.length ? Cv(this.children, s || [], e, n, r, o, i) : s ? new ae(s.sort(Mn), Gn) : Re;
|
|
8351
8351
|
}
|
|
8352
8352
|
/**
|
|
8353
8353
|
Add the given array of decorations to the ones in the set,
|
|
@@ -8365,13 +8365,13 @@ class ae {
|
|
|
8365
8365
|
if (u = Xh(n, l, c)) {
|
|
8366
8366
|
for (o || (o = this.children.slice()); i < o.length && o[i] < a; )
|
|
8367
8367
|
i += 3;
|
|
8368
|
-
o[i] == a ? o[i + 2] = o[i + 2].addInner(l, u, c + 1) : o.splice(i, 0, a, a + l.nodeSize, ri(u, l, c + 1,
|
|
8368
|
+
o[i] == a ? o[i + 2] = o[i + 2].addInner(l, u, c + 1) : o.splice(i, 0, a, a + l.nodeSize, ri(u, l, c + 1, En)), i += 3;
|
|
8369
8369
|
}
|
|
8370
8370
|
});
|
|
8371
8371
|
let s = Yh(i ? Qh(n) : n, -r);
|
|
8372
8372
|
for (let l = 0; l < s.length; l++)
|
|
8373
8373
|
s[l].type.valid(e, s[l]) || s.splice(l--, 1);
|
|
8374
|
-
return new ae(s.length ? this.local.concat(s).sort(
|
|
8374
|
+
return new ae(s.length ? this.local.concat(s).sort(Mn) : this.local, o || this.children);
|
|
8375
8375
|
}
|
|
8376
8376
|
/**
|
|
8377
8377
|
Create a new set that contains the decorations in this set, minus
|
|
@@ -8414,14 +8414,14 @@ class ae {
|
|
|
8414
8414
|
let i = e + 1, s = i + n.content.size;
|
|
8415
8415
|
for (let l = 0; l < this.local.length; l++) {
|
|
8416
8416
|
let a = this.local[l];
|
|
8417
|
-
if (a.from < s && a.to > i && a.type instanceof
|
|
8417
|
+
if (a.from < s && a.to > i && a.type instanceof nn) {
|
|
8418
8418
|
let c = Math.max(i, a.from) - i, u = Math.min(s, a.to) - i;
|
|
8419
8419
|
c < u && (o || (o = [])).push(a.copy(c, u));
|
|
8420
8420
|
}
|
|
8421
8421
|
}
|
|
8422
8422
|
if (o) {
|
|
8423
|
-
let l = new ae(o.sort(
|
|
8424
|
-
return r ? new
|
|
8423
|
+
let l = new ae(o.sort(Mn), Gn);
|
|
8424
|
+
return r ? new qt([l, r]) : l;
|
|
8425
8425
|
}
|
|
8426
8426
|
return r || Re;
|
|
8427
8427
|
}
|
|
@@ -8452,12 +8452,12 @@ class ae {
|
|
|
8452
8452
|
*/
|
|
8453
8453
|
localsInner(e) {
|
|
8454
8454
|
if (this == Re)
|
|
8455
|
-
return
|
|
8456
|
-
if (e.inlineContent || !this.local.some(
|
|
8455
|
+
return Gn;
|
|
8456
|
+
if (e.inlineContent || !this.local.some(nn.is))
|
|
8457
8457
|
return this.local;
|
|
8458
8458
|
let n = [];
|
|
8459
8459
|
for (let r = 0; r < this.local.length; r++)
|
|
8460
|
-
this.local[r].type instanceof
|
|
8460
|
+
this.local[r].type instanceof nn || n.push(this.local[r]);
|
|
8461
8461
|
return n;
|
|
8462
8462
|
}
|
|
8463
8463
|
forEachSet(e) {
|
|
@@ -8467,13 +8467,13 @@ class ae {
|
|
|
8467
8467
|
ae.empty = new ae([], []);
|
|
8468
8468
|
ae.removeOverlap = Fa;
|
|
8469
8469
|
const Re = ae.empty;
|
|
8470
|
-
class
|
|
8470
|
+
class qt {
|
|
8471
8471
|
constructor(e) {
|
|
8472
8472
|
this.members = e;
|
|
8473
8473
|
}
|
|
8474
8474
|
map(e, n) {
|
|
8475
|
-
const r = this.members.map((o) => o.map(e, n,
|
|
8476
|
-
return
|
|
8475
|
+
const r = this.members.map((o) => o.map(e, n, En));
|
|
8476
|
+
return qt.from(r);
|
|
8477
8477
|
}
|
|
8478
8478
|
forChild(e, n) {
|
|
8479
8479
|
if (n.isLeaf)
|
|
@@ -8481,12 +8481,12 @@ class Zt {
|
|
|
8481
8481
|
let r = [];
|
|
8482
8482
|
for (let o = 0; o < this.members.length; o++) {
|
|
8483
8483
|
let i = this.members[o].forChild(e, n);
|
|
8484
|
-
i != Re && (i instanceof
|
|
8484
|
+
i != Re && (i instanceof qt ? r = r.concat(i.members) : r.push(i));
|
|
8485
8485
|
}
|
|
8486
|
-
return
|
|
8486
|
+
return qt.from(r);
|
|
8487
8487
|
}
|
|
8488
8488
|
eq(e) {
|
|
8489
|
-
if (!(e instanceof
|
|
8489
|
+
if (!(e instanceof qt) || e.members.length != this.members.length)
|
|
8490
8490
|
return !1;
|
|
8491
8491
|
for (let n = 0; n < this.members.length; n++)
|
|
8492
8492
|
if (!this.members[n].eq(e.members[n]))
|
|
@@ -8506,7 +8506,7 @@ class Zt {
|
|
|
8506
8506
|
n.push(i[s]);
|
|
8507
8507
|
}
|
|
8508
8508
|
}
|
|
8509
|
-
return n ? Fa(r ? n : n.sort(
|
|
8509
|
+
return n ? Fa(r ? n : n.sort(Mn)) : Gn;
|
|
8510
8510
|
}
|
|
8511
8511
|
// Create a group for the given array of decoration sets, or return
|
|
8512
8512
|
// a single set when possible.
|
|
@@ -8517,7 +8517,7 @@ class Zt {
|
|
|
8517
8517
|
case 1:
|
|
8518
8518
|
return e[0];
|
|
8519
8519
|
default:
|
|
8520
|
-
return new
|
|
8520
|
+
return new qt(e.every((n) => n instanceof ae) ? e : e.reduce((n, r) => n.concat(r instanceof ae ? r : r.members), []));
|
|
8521
8521
|
}
|
|
8522
8522
|
}
|
|
8523
8523
|
forEachSet(e) {
|
|
@@ -8572,7 +8572,7 @@ function Cv(t, e, n, r, o, i, s) {
|
|
|
8572
8572
|
l.splice(f, 0, u.children[d], u.children[d + 1], u.children[d + 2]);
|
|
8573
8573
|
}
|
|
8574
8574
|
}
|
|
8575
|
-
return new ae(e.sort(
|
|
8575
|
+
return new ae(e.sort(Mn), l);
|
|
8576
8576
|
}
|
|
8577
8577
|
function Yh(t, e) {
|
|
8578
8578
|
if (!e || !t.length)
|
|
@@ -8621,12 +8621,12 @@ function ri(t, e, n, r) {
|
|
|
8621
8621
|
u != Re && o.push(a, a + l.nodeSize, u);
|
|
8622
8622
|
}
|
|
8623
8623
|
});
|
|
8624
|
-
let s = Yh(i ? Qh(t) : t, -n).sort(
|
|
8624
|
+
let s = Yh(i ? Qh(t) : t, -n).sort(Mn);
|
|
8625
8625
|
for (let l = 0; l < s.length; l++)
|
|
8626
8626
|
s[l].type.valid(e, s[l]) || (r.onRemove && r.onRemove(s[l].spec), s.splice(l--, 1));
|
|
8627
8627
|
return s.length || o.length ? new ae(s, o) : Re;
|
|
8628
8628
|
}
|
|
8629
|
-
function
|
|
8629
|
+
function Mn(t, e) {
|
|
8630
8630
|
return t.from - e.from || t.to - e.to;
|
|
8631
8631
|
}
|
|
8632
8632
|
function Fa(t) {
|
|
@@ -8648,7 +8648,7 @@ function Fa(t) {
|
|
|
8648
8648
|
return e;
|
|
8649
8649
|
}
|
|
8650
8650
|
function Gu(t, e, n) {
|
|
8651
|
-
for (; e < t.length &&
|
|
8651
|
+
for (; e < t.length && Mn(n, t[e]) > 0; )
|
|
8652
8652
|
e++;
|
|
8653
8653
|
t.splice(e, 0, n);
|
|
8654
8654
|
}
|
|
@@ -8657,7 +8657,7 @@ function Fs(t) {
|
|
|
8657
8657
|
return t.someProp("decorations", (n) => {
|
|
8658
8658
|
let r = n(t.state);
|
|
8659
8659
|
r && r != Re && e.push(r);
|
|
8660
|
-
}), t.cursorWrapper && e.push(ae.create(t.state.doc, [t.cursorWrapper.deco])),
|
|
8660
|
+
}), t.cursorWrapper && e.push(ae.create(t.state.doc, [t.cursorWrapper.deco])), qt.from(e);
|
|
8661
8661
|
}
|
|
8662
8662
|
const xv = {
|
|
8663
8663
|
childList: !0,
|
|
@@ -8666,7 +8666,7 @@ const xv = {
|
|
|
8666
8666
|
attributes: !0,
|
|
8667
8667
|
attributeOldValue: !0,
|
|
8668
8668
|
subtree: !0
|
|
8669
|
-
}, Sv = Fe &&
|
|
8669
|
+
}, Sv = Fe && en <= 11;
|
|
8670
8670
|
class kv {
|
|
8671
8671
|
constructor() {
|
|
8672
8672
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
@@ -8686,7 +8686,7 @@ class Ev {
|
|
|
8686
8686
|
this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new kv(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
|
|
8687
8687
|
for (let o = 0; o < r.length; o++)
|
|
8688
8688
|
this.queue.push(r[o]);
|
|
8689
|
-
Fe &&
|
|
8689
|
+
Fe && en <= 11 && r.some((o) => o.type == "childList" && o.removedNodes.length || o.type == "characterData" && o.oldValue.length > o.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
8690
8690
|
}), Sv && (this.onCharData = (r) => {
|
|
8691
8691
|
this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
|
|
8692
8692
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
@@ -8727,9 +8727,9 @@ class Ev {
|
|
|
8727
8727
|
if (Fu(this.view)) {
|
|
8728
8728
|
if (this.suppressingSelectionUpdates)
|
|
8729
8729
|
return Nt(this.view);
|
|
8730
|
-
if (Fe &&
|
|
8730
|
+
if (Fe && en <= 11 && !this.view.state.selection.empty) {
|
|
8731
8731
|
let e = this.view.domSelectionRange();
|
|
8732
|
-
if (e.focusNode &&
|
|
8732
|
+
if (e.focusNode && Nn(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
8733
8733
|
return this.flushSoon();
|
|
8734
8734
|
}
|
|
8735
8735
|
this.flush();
|
|
@@ -8805,7 +8805,7 @@ class Ev {
|
|
|
8805
8805
|
if (r.contentDOM && r.contentDOM != r.dom && !r.contentDOM.contains(e.target))
|
|
8806
8806
|
return { from: r.posBefore, to: r.posAfter };
|
|
8807
8807
|
let o = e.previousSibling, i = e.nextSibling;
|
|
8808
|
-
if (Fe &&
|
|
8808
|
+
if (Fe && en <= 11 && e.addedNodes.length)
|
|
8809
8809
|
for (let u = 0; u < e.addedNodes.length; u++) {
|
|
8810
8810
|
let { previousSibling: d, nextSibling: f } = e.addedNodes[u];
|
|
8811
8811
|
(!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (o = d), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (i = f);
|
|
@@ -8833,7 +8833,7 @@ function Mv(t) {
|
|
|
8833
8833
|
}
|
|
8834
8834
|
function Yu(t, e) {
|
|
8835
8835
|
let n = e.startContainer, r = e.startOffset, o = e.endContainer, i = e.endOffset, s = t.domAtPos(t.state.selection.anchor);
|
|
8836
|
-
return
|
|
8836
|
+
return Nn(s.node, s.offset, o, i) && ([n, r, o, i] = [o, i, n, r]), { anchorNode: n, anchorOffset: r, focusNode: o, focusOffset: i };
|
|
8837
8837
|
}
|
|
8838
8838
|
function Tv(t, e) {
|
|
8839
8839
|
if (e.getComposedRanges) {
|
|
@@ -8867,7 +8867,7 @@ function Rv(t, e, n) {
|
|
|
8867
8867
|
if (!C || C.size)
|
|
8868
8868
|
break;
|
|
8869
8869
|
}
|
|
8870
|
-
let d = t.state.doc, f = t.someProp("domParser") ||
|
|
8870
|
+
let d = t.state.doc, f = t.someProp("domParser") || Qt.fromSchema(t.state.schema), h = d.resolve(s), p = null, m = f.parse(r, {
|
|
8871
8871
|
topNode: h.parent,
|
|
8872
8872
|
topMatch: h.parent.contentMatchAt(h.index()),
|
|
8873
8873
|
topOpen: !0,
|
|
@@ -8904,7 +8904,7 @@ function Iv(t, e, n, r, o) {
|
|
|
8904
8904
|
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
8905
8905
|
let S = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, M = La(t, S);
|
|
8906
8906
|
if (M && !t.state.selection.eq(M)) {
|
|
8907
|
-
if (Oe && Tt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (B) => B(t,
|
|
8907
|
+
if (Oe && Tt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (B) => B(t, gn(13, "Enter"))))
|
|
8908
8908
|
return;
|
|
8909
8909
|
let N = t.state.tr.setSelection(M);
|
|
8910
8910
|
S == "pointer" ? N.setMeta("pointer", !0) : S == "key" && N.scrollIntoView(), i && N.setMeta("composition", i), t.dispatch(N);
|
|
@@ -8916,7 +8916,7 @@ function Iv(t, e, n, r, o) {
|
|
|
8916
8916
|
let a = t.state.selection, c = Rv(t, e, n), u = t.state.doc, d = u.slice(c.from, c.to), f, h;
|
|
8917
8917
|
t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, h = "end") : (f = t.state.selection.from, h = "start"), t.input.lastKeyCode = null;
|
|
8918
8918
|
let p = Pv(d.content, c.doc.content, c.from, f, h);
|
|
8919
|
-
if (p && t.input.domChangeCount++, (lr && t.input.lastIOSEnter > Date.now() - 225 || Tt) && o.some((S) => S.nodeType == 1 && !Nv.test(S.nodeName)) && (!p || p.endA >= p.endB) && t.someProp("handleKeyDown", (S) => S(t,
|
|
8919
|
+
if (p && t.input.domChangeCount++, (lr && t.input.lastIOSEnter > Date.now() - 225 || Tt) && o.some((S) => S.nodeType == 1 && !Nv.test(S.nodeName)) && (!p || p.endA >= p.endB) && t.someProp("handleKeyDown", (S) => S(t, gn(13, "Enter")))) {
|
|
8920
8920
|
t.input.lastIOSEnter = 0;
|
|
8921
8921
|
return;
|
|
8922
8922
|
}
|
|
@@ -8933,19 +8933,19 @@ function Iv(t, e, n, r, o) {
|
|
|
8933
8933
|
}
|
|
8934
8934
|
return;
|
|
8935
8935
|
}
|
|
8936
|
-
t.state.selection.from < t.state.selection.to && p.start == p.endB && t.state.selection instanceof z && (p.start > t.state.selection.from && p.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? p.start = t.state.selection.from : p.endA < t.state.selection.to && p.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (p.endB += t.state.selection.to - p.endA, p.endA = t.state.selection.to)), Fe &&
|
|
8936
|
+
t.state.selection.from < t.state.selection.to && p.start == p.endB && t.state.selection instanceof z && (p.start > t.state.selection.from && p.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? p.start = t.state.selection.from : p.endA < t.state.selection.to && p.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (p.endB += t.state.selection.to - p.endA, p.endA = t.state.selection.to)), Fe && en <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == " " && (p.start--, p.endA--, p.endB--);
|
|
8937
8937
|
let m = c.doc.resolveNoCache(p.start - c.from), y = c.doc.resolveNoCache(p.endB - c.from), b = u.resolve(p.start), C = m.sameParent(y) && m.parent.inlineContent && b.end() >= p.endA;
|
|
8938
|
-
if ((lr && t.input.lastIOSEnter > Date.now() - 225 && (!C || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !C && m.pos < c.doc.content.size && (!m.sameParent(y) || !m.parent.inlineContent) && m.pos < y.pos && !/\S/.test(c.doc.textBetween(m.pos, y.pos, "", ""))) && t.someProp("handleKeyDown", (S) => S(t,
|
|
8938
|
+
if ((lr && t.input.lastIOSEnter > Date.now() - 225 && (!C || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !C && m.pos < c.doc.content.size && (!m.sameParent(y) || !m.parent.inlineContent) && m.pos < y.pos && !/\S/.test(c.doc.textBetween(m.pos, y.pos, "", ""))) && t.someProp("handleKeyDown", (S) => S(t, gn(13, "Enter")))) {
|
|
8939
8939
|
t.input.lastIOSEnter = 0;
|
|
8940
8940
|
return;
|
|
8941
8941
|
}
|
|
8942
|
-
if (t.state.selection.anchor > p.start && Dv(u, p.start, p.endA, m, y) && t.someProp("handleKeyDown", (S) => S(t,
|
|
8942
|
+
if (t.state.selection.anchor > p.start && Dv(u, p.start, p.endA, m, y) && t.someProp("handleKeyDown", (S) => S(t, gn(8, "Backspace")))) {
|
|
8943
8943
|
Tt && Oe && t.domObserver.suppressSelectionUpdates();
|
|
8944
8944
|
return;
|
|
8945
8945
|
}
|
|
8946
8946
|
Oe && p.endB == p.start && (t.input.lastChromeDelete = Date.now()), Tt && !C && m.start() != y.start() && y.parentOffset == 0 && m.depth == y.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, y = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
|
|
8947
8947
|
t.someProp("handleKeyDown", function(S) {
|
|
8948
|
-
return S(t,
|
|
8948
|
+
return S(t, gn(13, "Enter"));
|
|
8949
8949
|
});
|
|
8950
8950
|
}, 20));
|
|
8951
8951
|
let w = p.start, x = p.endA, E = (S) => {
|
|
@@ -8958,7 +8958,7 @@ function Iv(t, e, n, r, o) {
|
|
|
8958
8958
|
}, k;
|
|
8959
8959
|
if (C)
|
|
8960
8960
|
if (m.pos == y.pos) {
|
|
8961
|
-
Fe &&
|
|
8961
|
+
Fe && en <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => Nt(t), 20));
|
|
8962
8962
|
let S = E(t.state.tr.delete(w, x)), M = u.resolve(p.start).marksAcross(u.resolve(p.endA));
|
|
8963
8963
|
M && S.ensureMarks(M), t.dispatch(S);
|
|
8964
8964
|
} else if (
|
|
@@ -9429,7 +9429,7 @@ function od(t) {
|
|
|
9429
9429
|
if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
|
|
9430
9430
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
9431
9431
|
}
|
|
9432
|
-
var
|
|
9432
|
+
var sn = {
|
|
9433
9433
|
8: "Backspace",
|
|
9434
9434
|
9: "Tab",
|
|
9435
9435
|
10: "Enter",
|
|
@@ -9508,13 +9508,13 @@ var cn = {
|
|
|
9508
9508
|
221: "}",
|
|
9509
9509
|
222: '"'
|
|
9510
9510
|
}, Hv = typeof navigator < "u" && /Mac/.test(navigator.platform), $v = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
9511
|
-
for (var Me = 0; Me < 10; Me++)
|
|
9512
|
-
for (var Me = 1; Me <= 24; Me++)
|
|
9511
|
+
for (var Me = 0; Me < 10; Me++) sn[48 + Me] = sn[96 + Me] = String(Me);
|
|
9512
|
+
for (var Me = 1; Me <= 24; Me++) sn[Me + 111] = "F" + Me;
|
|
9513
9513
|
for (var Me = 65; Me <= 90; Me++)
|
|
9514
|
-
|
|
9515
|
-
for (var zs in
|
|
9514
|
+
sn[Me] = String.fromCharCode(Me + 32), oi[Me] = String.fromCharCode(Me);
|
|
9515
|
+
for (var zs in sn) oi.hasOwnProperty(zs) || (oi[zs] = sn[zs]);
|
|
9516
9516
|
function Fv(t) {
|
|
9517
|
-
var e = Hv && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || $v && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? oi :
|
|
9517
|
+
var e = Hv && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || $v && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? oi : sn)[t.keyCode] || t.key || "Unidentified";
|
|
9518
9518
|
return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
|
|
9519
9519
|
}
|
|
9520
9520
|
const Vv = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), zv = typeof navigator < "u" && /Win/.test(navigator.platform);
|
|
@@ -9564,7 +9564,7 @@ function tp(t) {
|
|
|
9564
9564
|
return !0;
|
|
9565
9565
|
}
|
|
9566
9566
|
if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
9567
|
-
!(zv && r.ctrlKey && r.altKey) && (i =
|
|
9567
|
+
!(zv && r.ctrlKey && r.altKey) && (i = sn[r.keyCode]) && i != o) {
|
|
9568
9568
|
let l = e[Us(i, r)];
|
|
9569
9569
|
if (l && l(n.state, n.dispatch, n))
|
|
9570
9570
|
return !0;
|
|
@@ -9855,7 +9855,7 @@ var ib = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
9855
9855
|
function op(t) {
|
|
9856
9856
|
return t instanceof z;
|
|
9857
9857
|
}
|
|
9858
|
-
function
|
|
9858
|
+
function wn(t = 0, e = 0, n = 0) {
|
|
9859
9859
|
return Math.min(Math.max(t, e), n);
|
|
9860
9860
|
}
|
|
9861
9861
|
function ip(t, e = null) {
|
|
@@ -9867,7 +9867,7 @@ function ip(t, e = null) {
|
|
|
9867
9867
|
if (e === "end")
|
|
9868
9868
|
return r;
|
|
9869
9869
|
const o = n.from, i = r.to;
|
|
9870
|
-
return e === "all" ? z.create(t,
|
|
9870
|
+
return e === "all" ? z.create(t, wn(0, o, i), wn(t.content.size, o, i)) : z.create(t, wn(e, o, i), wn(e, o, i));
|
|
9871
9871
|
}
|
|
9872
9872
|
function sp() {
|
|
9873
9873
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
@@ -9907,7 +9907,7 @@ function Co(t) {
|
|
|
9907
9907
|
return lp(n);
|
|
9908
9908
|
}
|
|
9909
9909
|
function Vr(t, e, n) {
|
|
9910
|
-
if (t instanceof
|
|
9910
|
+
if (t instanceof Xt || t instanceof A)
|
|
9911
9911
|
return t;
|
|
9912
9912
|
n = {
|
|
9913
9913
|
slice: !0,
|
|
@@ -9947,12 +9947,12 @@ function Vr(t, e, n) {
|
|
|
9947
9947
|
}
|
|
9948
9948
|
})
|
|
9949
9949
|
});
|
|
9950
|
-
if (n.slice ?
|
|
9950
|
+
if (n.slice ? Qt.fromSchema(a).parseSlice(Co(t), n.parseOptions) : Qt.fromSchema(a).parse(Co(t), n.parseOptions), n.errorOnInvalidContent && s)
|
|
9951
9951
|
throw new Error("[tiptap error]: Invalid HTML content", {
|
|
9952
9952
|
cause: new Error(`Invalid element found: ${l}`)
|
|
9953
9953
|
});
|
|
9954
9954
|
}
|
|
9955
|
-
const i =
|
|
9955
|
+
const i = Qt.fromSchema(e);
|
|
9956
9956
|
return n.slice ? i.parseSlice(Co(t), n.parseOptions).content : i.parse(Co(t), n.parseOptions);
|
|
9957
9957
|
}
|
|
9958
9958
|
return Vr("", e, n);
|
|
@@ -10093,7 +10093,7 @@ var xb = (t) => ({ editor: e, view: n, tr: r, dispatch: o }) => {
|
|
|
10093
10093
|
u && o && r.maybeStep(u);
|
|
10094
10094
|
}), !0;
|
|
10095
10095
|
};
|
|
10096
|
-
function
|
|
10096
|
+
function ln(t, e, n = {}) {
|
|
10097
10097
|
const { from: r, to: o, empty: i } = t.selection, s = e ? ge(e, t.schema) : null, l = [];
|
|
10098
10098
|
t.doc.nodesBetween(r, o, (d, f) => {
|
|
10099
10099
|
if (d.isText)
|
|
@@ -10110,7 +10110,7 @@ function un(t, e, n = {}) {
|
|
|
10110
10110
|
}
|
|
10111
10111
|
var Sb = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
10112
10112
|
const o = ge(t, n.schema);
|
|
10113
|
-
return
|
|
10113
|
+
return ln(n, o, e) ? z2(n, r) : !1;
|
|
10114
10114
|
}, kb = () => ({ state: t, dispatch: e }) => vh(t, e), Eb = (t) => ({ state: e, dispatch: n }) => {
|
|
10115
10115
|
const r = ge(t, e.schema);
|
|
10116
10116
|
return ey(r)(e, n);
|
|
@@ -10236,7 +10236,7 @@ function ja(t) {
|
|
|
10236
10236
|
}).flat(10);
|
|
10237
10237
|
}
|
|
10238
10238
|
function Ka(t, e) {
|
|
10239
|
-
const n =
|
|
10239
|
+
const n = Bn.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
|
|
10240
10240
|
return o.appendChild(n), o.innerHTML;
|
|
10241
10241
|
}
|
|
10242
10242
|
function dp(t) {
|
|
@@ -10656,9 +10656,9 @@ function Wl(t, e, n = {}) {
|
|
|
10656
10656
|
}
|
|
10657
10657
|
function Jb(t, e, n = {}) {
|
|
10658
10658
|
if (!e)
|
|
10659
|
-
return
|
|
10659
|
+
return ln(t, null, n) || Wl(t, null, n);
|
|
10660
10660
|
const r = ns(e, t.schema);
|
|
10661
|
-
return r === "node" ?
|
|
10661
|
+
return r === "node" ? ln(t, e, n) : r === "mark" ? Wl(t, e, n) : !1;
|
|
10662
10662
|
}
|
|
10663
10663
|
var Zb = (t, e) => {
|
|
10664
10664
|
const { $from: n, $to: r, $anchor: o } = t.selection;
|
|
@@ -10773,13 +10773,13 @@ var Qb = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
10773
10773
|
return n.selection.$anchor.sameParent(n.selection.$head) && (s = n.selection.$anchor.parent.attrs), i.isTextblock ? o().command(({ commands: l }) => Eu(i, { ...s, ...e })(n) ? !0 : l.clearNodes()).command(({ state: l }) => Eu(i, { ...s, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
10774
10774
|
}, nC = (t) => ({ tr: e, dispatch: n }) => {
|
|
10775
10775
|
if (n) {
|
|
10776
|
-
const { doc: r } = e, o =
|
|
10776
|
+
const { doc: r } = e, o = wn(t, 0, r.content.size), i = _.create(r, o);
|
|
10777
10777
|
e.setSelection(i);
|
|
10778
10778
|
}
|
|
10779
10779
|
return !0;
|
|
10780
10780
|
}, rC = (t) => ({ tr: e, dispatch: n }) => {
|
|
10781
10781
|
if (n) {
|
|
10782
|
-
const { doc: r } = e, { from: o, to: i } = typeof t == "number" ? { from: t, to: t } : t, s = z.atStart(r).from, l = z.atEnd(r).to, a =
|
|
10782
|
+
const { doc: r } = e, { from: o, to: i } = typeof t == "number" ? { from: t, to: t } : t, s = z.atStart(r).from, l = z.atEnd(r).to, a = wn(o, s, l), c = wn(i, s, l), u = z.create(r, a, c);
|
|
10783
10783
|
e.setSelection(u);
|
|
10784
10784
|
}
|
|
10785
10785
|
return !0;
|
|
@@ -10886,7 +10886,7 @@ var iC = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
|
|
|
10886
10886
|
if (r === void 0)
|
|
10887
10887
|
return !0;
|
|
10888
10888
|
const o = t.doc.nodeAt(r);
|
|
10889
|
-
return n.node.type === o?.type &&
|
|
10889
|
+
return n.node.type === o?.type && dn(t.doc, n.pos) && t.join(n.pos), !0;
|
|
10890
10890
|
}, Ks = (t, e) => {
|
|
10891
10891
|
const n = rs((s) => s.type === e)(t.selection);
|
|
10892
10892
|
if (!n)
|
|
@@ -10895,7 +10895,7 @@ var iC = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
|
|
|
10895
10895
|
if (r === void 0)
|
|
10896
10896
|
return !0;
|
|
10897
10897
|
const o = t.doc.nodeAt(r);
|
|
10898
|
-
return n.node.type === o?.type &&
|
|
10898
|
+
return n.node.type === o?.type && dn(t.doc, r) && t.join(r), !0;
|
|
10899
10899
|
}, lC = (t, e, n, r = {}) => ({ editor: o, tr: i, state: s, dispatch: l, chain: a, commands: c, can: u }) => {
|
|
10900
10900
|
const { extensions: d, splittableMarks: f } = o.extensionManager, h = ge(t, s.schema), p = ge(e, s.schema), { selection: m, storedMarks: y } = s, { $from: b, $to: C } = m, w = b.blockRange(C), x = y || m.$to.parentOffset && m.$from.marks();
|
|
10901
10901
|
if (!w)
|
|
@@ -10915,12 +10915,12 @@ var iC = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
|
|
|
10915
10915
|
const { extendEmptyMarkRange: i = !1 } = n, s = _t(t, r.schema);
|
|
10916
10916
|
return Wl(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
|
|
10917
10917
|
}, cC = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
10918
|
-
const i = ge(t, r.schema), s = ge(e, r.schema), l =
|
|
10918
|
+
const i = ge(t, r.schema), s = ge(e, r.schema), l = ln(r, i, n);
|
|
10919
10919
|
let a;
|
|
10920
10920
|
return r.selection.$anchor.sameParent(r.selection.$head) && (a = r.selection.$anchor.parent.attrs), l ? o.setNode(s, a) : o.setNode(i, { ...a, ...n });
|
|
10921
10921
|
}, uC = (t, e = {}) => ({ state: n, commands: r }) => {
|
|
10922
10922
|
const o = ge(t, n.schema);
|
|
10923
|
-
return
|
|
10923
|
+
return ln(n, o, e) ? r.lift(o) : r.wrapIn(o, e);
|
|
10924
10924
|
}, dC = () => ({ state: t, dispatch: e }) => {
|
|
10925
10925
|
const n = t.plugins;
|
|
10926
10926
|
for (let r = 0; r < n.length; r += 1) {
|
|
@@ -11276,12 +11276,12 @@ function kC(t) {
|
|
|
11276
11276
|
SC(S, i.find, s).forEach((N) => {
|
|
11277
11277
|
if (N.index === void 0)
|
|
11278
11278
|
return;
|
|
11279
|
-
const B = E + N.index + 1,
|
|
11279
|
+
const B = E + N.index + 1, U = B + N[0].length, W = {
|
|
11280
11280
|
from: n.tr.mapping.map(B),
|
|
11281
|
-
to: n.tr.mapping.map(
|
|
11281
|
+
to: n.tr.mapping.map(U)
|
|
11282
11282
|
}, $ = i.handler({
|
|
11283
11283
|
state: n,
|
|
11284
|
-
range:
|
|
11284
|
+
range: W,
|
|
11285
11285
|
match: N,
|
|
11286
11286
|
commands: a,
|
|
11287
11287
|
chain: c,
|
|
@@ -11866,7 +11866,7 @@ var Q = class Cp extends Za {
|
|
|
11866
11866
|
})
|
|
11867
11867
|
];
|
|
11868
11868
|
}
|
|
11869
|
-
}), AC = class
|
|
11869
|
+
}), AC = class Jn {
|
|
11870
11870
|
constructor(e, n, r = !1, o = null) {
|
|
11871
11871
|
this.currentNode = null, this.actualDepth = null, this.isBlock = r, this.resolvedPos = e, this.editor = n, this.currentNode = o;
|
|
11872
11872
|
}
|
|
@@ -11925,15 +11925,15 @@ var Q = class Cp extends Za {
|
|
|
11925
11925
|
if (this.depth === 0)
|
|
11926
11926
|
return null;
|
|
11927
11927
|
const e = this.resolvedPos.start(this.resolvedPos.depth - 1), n = this.resolvedPos.doc.resolve(e);
|
|
11928
|
-
return new
|
|
11928
|
+
return new Jn(n, this.editor);
|
|
11929
11929
|
}
|
|
11930
11930
|
get before() {
|
|
11931
11931
|
let e = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));
|
|
11932
|
-
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new
|
|
11932
|
+
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new Jn(e, this.editor);
|
|
11933
11933
|
}
|
|
11934
11934
|
get after() {
|
|
11935
11935
|
let e = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));
|
|
11936
|
-
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new
|
|
11936
|
+
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new Jn(e, this.editor);
|
|
11937
11937
|
}
|
|
11938
11938
|
get children() {
|
|
11939
11939
|
const e = [];
|
|
@@ -11944,8 +11944,8 @@ var Q = class Cp extends Za {
|
|
|
11944
11944
|
const l = this.resolvedPos.doc.resolve(s);
|
|
11945
11945
|
if (!o && l.depth <= this.depth)
|
|
11946
11946
|
return;
|
|
11947
|
-
const a = new
|
|
11948
|
-
o && (a.actualDepth = this.depth + 1), e.push(new
|
|
11947
|
+
const a = new Jn(l, this.editor, o, o ? n : null);
|
|
11948
|
+
o && (a.actualDepth = this.depth + 1), e.push(new Jn(l, this.editor, o, o ? n : null));
|
|
11949
11949
|
}), e;
|
|
11950
11950
|
}
|
|
11951
11951
|
get firstChild() {
|
|
@@ -12489,7 +12489,7 @@ var NC = class extends yC {
|
|
|
12489
12489
|
return this.$pos(0);
|
|
12490
12490
|
}
|
|
12491
12491
|
};
|
|
12492
|
-
function
|
|
12492
|
+
function Ln(t) {
|
|
12493
12493
|
return new no({
|
|
12494
12494
|
find: t.find,
|
|
12495
12495
|
handler: ({ state: e, range: n, match: r }) => {
|
|
@@ -12579,7 +12579,7 @@ function ar(t) {
|
|
|
12579
12579
|
o().updateAttributes(d, i).run();
|
|
12580
12580
|
}
|
|
12581
12581
|
const u = s.doc.resolve(n.from - 1).nodeBefore;
|
|
12582
|
-
u && u.type === t.type &&
|
|
12582
|
+
u && u.type === t.type && dn(s.doc, n.from - 1) && (!t.joinPredicate || t.joinPredicate(r, u)) && s.join(n.from - 1);
|
|
12583
12583
|
},
|
|
12584
12584
|
undoable: t.undoable
|
|
12585
12585
|
});
|
|
@@ -12737,18 +12737,18 @@ function BC(t) {
|
|
|
12737
12737
|
const N = S.exec(M);
|
|
12738
12738
|
if (N === null)
|
|
12739
12739
|
break;
|
|
12740
|
-
const B = N.index,
|
|
12740
|
+
const B = N.index, U = N[1];
|
|
12741
12741
|
if (!((p = N[2]) != null && p.endsWith(":::"))) {
|
|
12742
|
-
if (
|
|
12742
|
+
if (U)
|
|
12743
12743
|
x += 1;
|
|
12744
12744
|
else if (x -= 1, x === 0) {
|
|
12745
|
-
const
|
|
12746
|
-
k =
|
|
12745
|
+
const W = M.slice(0, B);
|
|
12746
|
+
k = W.trim();
|
|
12747
12747
|
const $ = d.slice(0, E + B + N[0].length);
|
|
12748
12748
|
let I = [];
|
|
12749
12749
|
if (k)
|
|
12750
12750
|
if (l === "block")
|
|
12751
|
-
for (I = h.blockTokens(
|
|
12751
|
+
for (I = h.blockTokens(W), I.forEach((H) => {
|
|
12752
12752
|
H.text && (!H.tokens || H.tokens.length === 0) && (H.tokens = h.inlineTokens(H.text));
|
|
12753
12753
|
}); I.length > 0; ) {
|
|
12754
12754
|
const H = I[I.length - 1];
|
|
@@ -13091,7 +13091,7 @@ var _e = class Np extends Za {
|
|
|
13091
13091
|
this.editor.commands.deleteRange({ from: t, to: e });
|
|
13092
13092
|
}
|
|
13093
13093
|
};
|
|
13094
|
-
function
|
|
13094
|
+
function an(t) {
|
|
13095
13095
|
return new xC({
|
|
13096
13096
|
find: t.find,
|
|
13097
13097
|
handler: ({ state: e, range: n, match: r, pasteEvent: o }) => {
|
|
@@ -13397,7 +13397,7 @@ var XC = class extends pe.Component {
|
|
|
13397
13397
|
...t
|
|
13398
13398
|
});
|
|
13399
13399
|
}
|
|
13400
|
-
), ew = pe.memo(QC), tw = typeof window < "u" ? ji :
|
|
13400
|
+
), ew = pe.memo(QC), tw = typeof window < "u" ? ji : An, nw = class {
|
|
13401
13401
|
constructor(t) {
|
|
13402
13402
|
this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = t, this.lastSnapshot = { editor: t, transactionNumber: 0 }, this.getSnapshot = this.getSnapshot.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.watch = this.watch.bind(this), this.subscribe = this.subscribe.bind(this);
|
|
13403
13403
|
}
|
|
@@ -13617,7 +13617,7 @@ function iw(t = {}, e = []) {
|
|
|
13617
13617
|
r.getEditor,
|
|
13618
13618
|
r.getServerSnapshot
|
|
13619
13619
|
);
|
|
13620
|
-
return Ef(o),
|
|
13620
|
+
return Ef(o), An(r.onRender(e)), Ip({
|
|
13621
13621
|
editor: o,
|
|
13622
13622
|
selector: ({ transactionNumber: i }) => t.shouldRerenderOnTransaction === !1 || t.shouldRerenderOnTransaction === void 0 ? null : t.immediatelyRender && i === 0 ? 0 : i + 1
|
|
13623
13623
|
}), o;
|
|
@@ -14013,11 +14013,11 @@ var si = (t, e) => {
|
|
|
14013
14013
|
},
|
|
14014
14014
|
addInputRules() {
|
|
14015
14015
|
return [
|
|
14016
|
-
|
|
14016
|
+
Ln({
|
|
14017
14017
|
find: ww,
|
|
14018
14018
|
type: this.type
|
|
14019
14019
|
}),
|
|
14020
|
-
|
|
14020
|
+
Ln({
|
|
14021
14021
|
find: Sw,
|
|
14022
14022
|
type: this.type
|
|
14023
14023
|
})
|
|
@@ -14025,11 +14025,11 @@ var si = (t, e) => {
|
|
|
14025
14025
|
},
|
|
14026
14026
|
addPasteRules() {
|
|
14027
14027
|
return [
|
|
14028
|
-
|
|
14028
|
+
an({
|
|
14029
14029
|
find: xw,
|
|
14030
14030
|
type: this.type
|
|
14031
14031
|
}),
|
|
14032
|
-
|
|
14032
|
+
an({
|
|
14033
14033
|
find: kw,
|
|
14034
14034
|
type: this.type
|
|
14035
14035
|
})
|
|
@@ -14068,7 +14068,7 @@ var si = (t, e) => {
|
|
|
14068
14068
|
},
|
|
14069
14069
|
addInputRules() {
|
|
14070
14070
|
return [
|
|
14071
|
-
|
|
14071
|
+
Ln({
|
|
14072
14072
|
find: Mw,
|
|
14073
14073
|
type: this.type
|
|
14074
14074
|
})
|
|
@@ -14076,7 +14076,7 @@ var si = (t, e) => {
|
|
|
14076
14076
|
},
|
|
14077
14077
|
addPasteRules() {
|
|
14078
14078
|
return [
|
|
14079
|
-
|
|
14079
|
+
an({
|
|
14080
14080
|
find: Tw,
|
|
14081
14081
|
type: this.type
|
|
14082
14082
|
})
|
|
@@ -14506,11 +14506,11 @@ var si = (t, e) => {
|
|
|
14506
14506
|
},
|
|
14507
14507
|
addInputRules() {
|
|
14508
14508
|
return [
|
|
14509
|
-
|
|
14509
|
+
Ln({
|
|
14510
14510
|
find: Bw,
|
|
14511
14511
|
type: this.type
|
|
14512
14512
|
}),
|
|
14513
|
-
|
|
14513
|
+
Ln({
|
|
14514
14514
|
find: Hw,
|
|
14515
14515
|
type: this.type
|
|
14516
14516
|
})
|
|
@@ -14518,11 +14518,11 @@ var si = (t, e) => {
|
|
|
14518
14518
|
},
|
|
14519
14519
|
addPasteRules() {
|
|
14520
14520
|
return [
|
|
14521
|
-
|
|
14521
|
+
an({
|
|
14522
14522
|
find: _w,
|
|
14523
14523
|
type: this.type
|
|
14524
14524
|
}),
|
|
14525
|
-
|
|
14525
|
+
an({
|
|
14526
14526
|
find: $w,
|
|
14527
14527
|
type: this.type
|
|
14528
14528
|
})
|
|
@@ -14533,7 +14533,7 @@ const Vw = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4
|
|
|
14533
14533
|
function jw(t, e) {
|
|
14534
14534
|
return t in e || (e[t] = []), e[t];
|
|
14535
14535
|
}
|
|
14536
|
-
function
|
|
14536
|
+
function xn(t, e, n) {
|
|
14537
14537
|
e[Gl] && (e[Tr] = !0, e[Cr] = !0), e[Jl] && (e[Tr] = !0, e[Zl] = !0), e[Tr] && (e[Cr] = !0), e[Zl] && (e[Cr] = !0), e[Cr] && (e[Yl] = !0), e[Hp] && (e[Yl] = !0);
|
|
14538
14538
|
for (const r in e) {
|
|
14539
14539
|
const o = jw(r, n);
|
|
@@ -14605,7 +14605,7 @@ $e.prototype = {
|
|
|
14605
14605
|
tr(t, e, n, r) {
|
|
14606
14606
|
r = r || $e.groups;
|
|
14607
14607
|
let o;
|
|
14608
|
-
return e && e.j ? o = e : (o = new $e(e), n && r &&
|
|
14608
|
+
return e && e.j ? o = e : (o = new $e(e), n && r && xn(e, n, r)), this.jr.push([t, o]), o;
|
|
14609
14609
|
},
|
|
14610
14610
|
/**
|
|
14611
14611
|
* Short for "take transitions", will take as many sequential transitions as
|
|
@@ -14663,14 +14663,14 @@ $e.prototype = {
|
|
|
14663
14663
|
if (r)
|
|
14664
14664
|
if (s.t && typeof s.t == "string") {
|
|
14665
14665
|
const a = Object.assign(Kw(s.t, r), n);
|
|
14666
|
-
|
|
14667
|
-
} else n &&
|
|
14666
|
+
xn(i, a, r);
|
|
14667
|
+
} else n && xn(i, n, r);
|
|
14668
14668
|
s.t = i;
|
|
14669
14669
|
}
|
|
14670
14670
|
return o.j[t] = s, s;
|
|
14671
14671
|
}
|
|
14672
14672
|
};
|
|
14673
|
-
const G = (t, e, n, r, o) => t.ta(e, n, r, o), ue = (t, e, n, r, o) => t.tr(e, n, r, o), Cd = (t, e, n, r, o) => t.ts(e, n, r, o), O = (t, e, n, r, o) => t.tt(e, n, r, o), Et = "WORD", Xl = "UWORD", $p = "ASCIINUMERICAL", Fp = "ALPHANUMERICAL", Wr = "LOCALHOST", Ql = "TLD", ea = "UTLD", Vo = "SCHEME",
|
|
14673
|
+
const G = (t, e, n, r, o) => t.ta(e, n, r, o), ue = (t, e, n, r, o) => t.tr(e, n, r, o), Cd = (t, e, n, r, o) => t.ts(e, n, r, o), O = (t, e, n, r, o) => t.tt(e, n, r, o), Et = "WORD", Xl = "UWORD", $p = "ASCIINUMERICAL", Fp = "ALPHANUMERICAL", Wr = "LOCALHOST", Ql = "TLD", ea = "UTLD", Vo = "SCHEME", Zn = "SLASH_SCHEME", tc = "NUM", ta = "WS", nc = "NL", Ar = "OPENBRACE", Rr = "CLOSEBRACE", li = "OPENBRACKET", ai = "CLOSEBRACKET", ci = "OPENPAREN", ui = "CLOSEPAREN", di = "OPENANGLEBRACKET", fi = "CLOSEANGLEBRACKET", hi = "FULLWIDTHLEFTPAREN", pi = "FULLWIDTHRIGHTPAREN", mi = "LEFTCORNERBRACKET", gi = "RIGHTCORNERBRACKET", yi = "LEFTWHITECORNERBRACKET", vi = "RIGHTWHITECORNERBRACKET", bi = "FULLWIDTHLESSTHAN", Ci = "FULLWIDTHGREATERTHAN", wi = "AMPERSAND", xi = "APOSTROPHE", Si = "ASTERISK", jt = "AT", ki = "BACKSLASH", Ei = "BACKTICK", Mi = "CARET", Gt = "COLON", rc = "COMMA", Ti = "DOLLAR", at = "DOT", Ai = "EQUALS", oc = "EXCLAMATION", Ye = "HYPHEN", Or = "PERCENT", Ri = "PIPE", Oi = "PLUS", Ni = "POUND", Nr = "QUERY", ic = "QUOTE", Vp = "FULLWIDTHMIDDLEDOT", sc = "SEMI", ct = "SLASH", Ir = "TILDE", Ii = "UNDERSCORE", zp = "EMOJI", Li = "SYM";
|
|
14674
14674
|
var Up = /* @__PURE__ */ Object.freeze({
|
|
14675
14675
|
__proto__: null,
|
|
14676
14676
|
ALPHANUMERICAL: Fp,
|
|
@@ -14678,7 +14678,7 @@ var Up = /* @__PURE__ */ Object.freeze({
|
|
|
14678
14678
|
APOSTROPHE: xi,
|
|
14679
14679
|
ASCIINUMERICAL: $p,
|
|
14680
14680
|
ASTERISK: Si,
|
|
14681
|
-
AT:
|
|
14681
|
+
AT: jt,
|
|
14682
14682
|
BACKSLASH: ki,
|
|
14683
14683
|
BACKTICK: Ei,
|
|
14684
14684
|
CARET: Mi,
|
|
@@ -14686,7 +14686,7 @@ var Up = /* @__PURE__ */ Object.freeze({
|
|
|
14686
14686
|
CLOSEBRACE: Rr,
|
|
14687
14687
|
CLOSEBRACKET: ai,
|
|
14688
14688
|
CLOSEPAREN: ui,
|
|
14689
|
-
COLON:
|
|
14689
|
+
COLON: Gt,
|
|
14690
14690
|
COMMA: rc,
|
|
14691
14691
|
DOLLAR: Ti,
|
|
14692
14692
|
DOT: at,
|
|
@@ -14719,7 +14719,7 @@ var Up = /* @__PURE__ */ Object.freeze({
|
|
|
14719
14719
|
SCHEME: Vo,
|
|
14720
14720
|
SEMI: sc,
|
|
14721
14721
|
SLASH: ct,
|
|
14722
|
-
SLASH_SCHEME:
|
|
14722
|
+
SLASH_SCHEME: Zn,
|
|
14723
14723
|
SYM: Li,
|
|
14724
14724
|
TILDE: Ir,
|
|
14725
14725
|
TLD: Ql,
|
|
@@ -14736,7 +14736,7 @@ function Jw(t = []) {
|
|
|
14736
14736
|
const e = {};
|
|
14737
14737
|
$e.groups = e;
|
|
14738
14738
|
const n = new $e();
|
|
14739
|
-
Eo == null && (Eo = xd(Vw)), Mo == null && (Mo = xd(zw)), O(n, "'", xi), O(n, "{", Ar), O(n, "}", Rr), O(n, "[", li), O(n, "]", ai), O(n, "(", ci), O(n, ")", ui), O(n, "<", di), O(n, ">", fi), O(n, "(", hi), O(n, ")", pi), O(n, "「", mi), O(n, "」", gi), O(n, "『", yi), O(n, "』", vi), O(n, "<", bi), O(n, ">", Ci), O(n, "&", wi), O(n, "*", Si), O(n, "@",
|
|
14739
|
+
Eo == null && (Eo = xd(Vw)), Mo == null && (Mo = xd(zw)), O(n, "'", xi), O(n, "{", Ar), O(n, "}", Rr), O(n, "[", li), O(n, "]", ai), O(n, "(", ci), O(n, ")", ui), O(n, "<", di), O(n, ">", fi), O(n, "(", hi), O(n, ")", pi), O(n, "「", mi), O(n, "」", gi), O(n, "『", yi), O(n, "』", vi), O(n, "<", bi), O(n, ">", Ci), O(n, "&", wi), O(n, "*", Si), O(n, "@", jt), O(n, "`", Ei), O(n, "^", Mi), O(n, ":", Gt), O(n, ",", rc), O(n, "$", Ti), O(n, ".", at), O(n, "=", Ai), O(n, "!", oc), O(n, "-", Ye), O(n, "%", Or), O(n, "|", Ri), O(n, "+", Oi), O(n, "#", Ni), O(n, "?", Nr), O(n, '"', ic), O(n, "/", ct), O(n, ";", sc), O(n, "~", Ir), O(n, "_", Ii), O(n, "\\", ki), O(n, "・", Vp);
|
|
14740
14740
|
const r = ue(n, kt, tc, {
|
|
14741
14741
|
[Gl]: !0
|
|
14742
14742
|
});
|
|
@@ -14772,16 +14772,16 @@ function Jw(t = []) {
|
|
|
14772
14772
|
Ft(n, Eo[m], Ql, Et, h);
|
|
14773
14773
|
for (let m = 0; m < Mo.length; m++)
|
|
14774
14774
|
Ft(n, Mo[m], ea, Xl, p);
|
|
14775
|
-
|
|
14775
|
+
xn(Ql, {
|
|
14776
14776
|
tld: !0,
|
|
14777
14777
|
ascii: !0
|
|
14778
|
-
}, e),
|
|
14778
|
+
}, e), xn(ea, {
|
|
14779
14779
|
utld: !0,
|
|
14780
14780
|
alpha: !0
|
|
14781
|
-
}, e), Ft(n, "file", Vo, Et, h), Ft(n, "mailto", Vo, Et, h), Ft(n, "http",
|
|
14781
|
+
}, e), Ft(n, "file", Vo, Et, h), Ft(n, "mailto", Vo, Et, h), Ft(n, "http", Zn, Et, h), Ft(n, "https", Zn, Et, h), Ft(n, "ftp", Zn, Et, h), Ft(n, "ftps", Zn, Et, h), xn(Vo, {
|
|
14782
14782
|
scheme: !0,
|
|
14783
14783
|
ascii: !0
|
|
14784
|
-
}, e),
|
|
14784
|
+
}, e), xn(Zn, {
|
|
14785
14785
|
slashscheme: !0,
|
|
14786
14786
|
ascii: !0
|
|
14787
14787
|
}, e), t = t.sort((m, y) => m[0] > y[0] ? 1 : -1);
|
|
@@ -15086,18 +15086,18 @@ const kd = ls("email", {
|
|
|
15086
15086
|
*/
|
|
15087
15087
|
hasProtocol() {
|
|
15088
15088
|
const t = this.tk;
|
|
15089
|
-
return t.length >= 2 && t[0].t !== Wr && t[1].t ===
|
|
15089
|
+
return t.length >= 2 && t[0].t !== Wr && t[1].t === Gt;
|
|
15090
15090
|
}
|
|
15091
15091
|
}), Je = (t) => new $e(t);
|
|
15092
15092
|
function Xw({
|
|
15093
15093
|
groups: t
|
|
15094
15094
|
}) {
|
|
15095
|
-
const e = t.domain.concat([wi, Si,
|
|
15095
|
+
const e = t.domain.concat([wi, Si, jt, ki, Ei, Mi, Ti, Ai, Ye, tc, Or, Ri, Oi, Ni, ct, Li, Ir, Ii]), n = [xi, Gt, rc, at, oc, Or, Nr, ic, sc, di, fi, Ar, Rr, ai, li, ci, ui, hi, pi, mi, gi, yi, vi, bi, Ci], r = [wi, xi, Si, ki, Ei, Mi, Ti, Ai, Ye, Ar, Rr, Or, Ri, Oi, Ni, Nr, ct, Li, Ir, Ii], o = Je(), i = O(o, Ir);
|
|
15096
15096
|
G(i, r, i), G(i, t.domain, i);
|
|
15097
15097
|
const s = Je(), l = Je(), a = Je();
|
|
15098
15098
|
G(o, t.domain, s), G(o, t.scheme, l), G(o, t.slashscheme, a), G(s, r, i), G(s, t.domain, s);
|
|
15099
|
-
const c = O(s,
|
|
15100
|
-
O(i,
|
|
15099
|
+
const c = O(s, jt);
|
|
15100
|
+
O(i, jt, c), O(l, jt, c), O(a, jt, c);
|
|
15101
15101
|
const u = O(i, at);
|
|
15102
15102
|
G(u, r, i), G(u, t.domain, i);
|
|
15103
15103
|
const d = Je();
|
|
@@ -15108,19 +15108,19 @@ function Xw({
|
|
|
15108
15108
|
G(f, t.tld, h), G(f, t.utld, h), O(c, Wr, h);
|
|
15109
15109
|
const p = O(d, Ye);
|
|
15110
15110
|
O(p, Ye, p), G(p, t.domain, d), G(h, t.domain, d), O(h, at, f), O(h, Ye, p);
|
|
15111
|
-
const m = O(h,
|
|
15111
|
+
const m = O(h, Gt);
|
|
15112
15112
|
G(m, t.numeric, kd);
|
|
15113
15113
|
const y = O(s, Ye), b = O(s, at);
|
|
15114
15114
|
O(y, Ye, y), G(y, t.domain, s), G(b, r, i), G(b, t.domain, s);
|
|
15115
15115
|
const C = Je(To);
|
|
15116
|
-
G(b, t.tld, C), G(b, t.utld, C), G(C, t.domain, s), G(C, r, i), O(C, at, b), O(C, Ye, y), O(C,
|
|
15117
|
-
const w = O(C,
|
|
15116
|
+
G(b, t.tld, C), G(b, t.utld, C), G(C, t.domain, s), G(C, r, i), O(C, at, b), O(C, Ye, y), O(C, jt, c);
|
|
15117
|
+
const w = O(C, Gt), x = Je(To);
|
|
15118
15118
|
G(w, t.numeric, x);
|
|
15119
15119
|
const E = Je(To), k = Je();
|
|
15120
15120
|
G(E, e, E), G(E, n, k), G(k, e, E), G(k, n, k), O(C, ct, E), O(x, ct, E);
|
|
15121
|
-
const S = O(l,
|
|
15121
|
+
const S = O(l, Gt), M = O(a, Gt), N = O(M, ct), B = O(N, ct);
|
|
15122
15122
|
G(l, t.domain, s), O(l, at, b), O(l, Ye, y), G(a, t.domain, s), O(a, at, b), O(a, Ye, y), G(S, t.domain, E), O(S, ct, E), O(S, Nr, E), G(B, t.domain, E), G(B, e, E), O(B, ct, E);
|
|
15123
|
-
const
|
|
15123
|
+
const U = [
|
|
15124
15124
|
[Ar, Rr],
|
|
15125
15125
|
// {}
|
|
15126
15126
|
[li, ai],
|
|
@@ -15138,8 +15138,8 @@ function Xw({
|
|
|
15138
15138
|
[bi, Ci]
|
|
15139
15139
|
// <>
|
|
15140
15140
|
];
|
|
15141
|
-
for (let
|
|
15142
|
-
const [$, I] =
|
|
15141
|
+
for (let W = 0; W < U.length; W++) {
|
|
15142
|
+
const [$, I] = U[W], H = O(E, $);
|
|
15143
15143
|
O(k, $, H), O(H, I, E);
|
|
15144
15144
|
const F = Je(To);
|
|
15145
15145
|
G(H, e, F);
|
|
@@ -15329,7 +15329,7 @@ function u7(t) {
|
|
|
15329
15329
|
}
|
|
15330
15330
|
});
|
|
15331
15331
|
}
|
|
15332
|
-
function
|
|
15332
|
+
function mn(t, e) {
|
|
15333
15333
|
const n = ["http", "https", "ftp", "ftps", "mailto", "tel", "callto", "sms", "cid", "xmpp"];
|
|
15334
15334
|
return e && e.forEach((r) => {
|
|
15335
15335
|
const o = typeof r == "string" ? r : r.scheme;
|
|
@@ -15375,7 +15375,7 @@ var d7 = lt.create({
|
|
|
15375
15375
|
rel: "noopener noreferrer nofollow",
|
|
15376
15376
|
class: null
|
|
15377
15377
|
},
|
|
15378
|
-
isAllowedUri: (t, e) => !!
|
|
15378
|
+
isAllowedUri: (t, e) => !!mn(t, e.protocols),
|
|
15379
15379
|
validate: (t) => !!t,
|
|
15380
15380
|
shouldAutoLink: (t) => !!t
|
|
15381
15381
|
};
|
|
@@ -15406,7 +15406,7 @@ var d7 = lt.create({
|
|
|
15406
15406
|
getAttrs: (t) => {
|
|
15407
15407
|
const e = t.getAttribute("href");
|
|
15408
15408
|
return !e || !this.options.isAllowedUri(e, {
|
|
15409
|
-
defaultValidate: (n) => !!
|
|
15409
|
+
defaultValidate: (n) => !!mn(n, this.options.protocols),
|
|
15410
15410
|
protocols: this.options.protocols,
|
|
15411
15411
|
defaultProtocol: this.options.defaultProtocol
|
|
15412
15412
|
}) ? !1 : null;
|
|
@@ -15416,7 +15416,7 @@ var d7 = lt.create({
|
|
|
15416
15416
|
},
|
|
15417
15417
|
renderHTML({ HTMLAttributes: t }) {
|
|
15418
15418
|
return this.options.isAllowedUri(t.href, {
|
|
15419
|
-
defaultValidate: (e) => !!
|
|
15419
|
+
defaultValidate: (e) => !!mn(e, this.options.protocols),
|
|
15420
15420
|
protocols: this.options.protocols,
|
|
15421
15421
|
defaultProtocol: this.options.defaultProtocol
|
|
15422
15422
|
}) ? ["a", re(this.options.HTMLAttributes, t), 0] : ["a", re(this.options.HTMLAttributes, { ...t, href: "" }), 0];
|
|
@@ -15436,7 +15436,7 @@ var d7 = lt.create({
|
|
|
15436
15436
|
setLink: (t) => ({ chain: e }) => {
|
|
15437
15437
|
const { href: n } = t;
|
|
15438
15438
|
return this.options.isAllowedUri(n, {
|
|
15439
|
-
defaultValidate: (r) => !!
|
|
15439
|
+
defaultValidate: (r) => !!mn(r, this.options.protocols),
|
|
15440
15440
|
protocols: this.options.protocols,
|
|
15441
15441
|
defaultProtocol: this.options.defaultProtocol
|
|
15442
15442
|
}) ? e().setMark(this.name, t).setMeta("preventAutolink", !0).run() : !1;
|
|
@@ -15444,7 +15444,7 @@ var d7 = lt.create({
|
|
|
15444
15444
|
toggleLink: (t) => ({ chain: e }) => {
|
|
15445
15445
|
const { href: n } = t || {};
|
|
15446
15446
|
return n && !this.options.isAllowedUri(n, {
|
|
15447
|
-
defaultValidate: (r) => !!
|
|
15447
|
+
defaultValidate: (r) => !!mn(r, this.options.protocols),
|
|
15448
15448
|
protocols: this.options.protocols,
|
|
15449
15449
|
defaultProtocol: this.options.defaultProtocol
|
|
15450
15450
|
}) ? !1 : e().toggleMark(this.name, t, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run();
|
|
@@ -15454,13 +15454,13 @@ var d7 = lt.create({
|
|
|
15454
15454
|
},
|
|
15455
15455
|
addPasteRules() {
|
|
15456
15456
|
return [
|
|
15457
|
-
|
|
15457
|
+
an({
|
|
15458
15458
|
find: (t) => {
|
|
15459
15459
|
const e = [];
|
|
15460
15460
|
if (t) {
|
|
15461
15461
|
const { protocols: n, defaultProtocol: r } = this.options, o = Kp(t).filter(
|
|
15462
15462
|
(i) => i.isLink && this.options.isAllowedUri(i.value, {
|
|
15463
|
-
defaultValidate: (s) => !!
|
|
15463
|
+
defaultValidate: (s) => !!mn(s, n),
|
|
15464
15464
|
protocols: n,
|
|
15465
15465
|
defaultProtocol: r
|
|
15466
15466
|
})
|
|
@@ -15494,7 +15494,7 @@ var d7 = lt.create({
|
|
|
15494
15494
|
type: this.type,
|
|
15495
15495
|
defaultProtocol: this.options.defaultProtocol,
|
|
15496
15496
|
validate: (r) => this.options.isAllowedUri(r, {
|
|
15497
|
-
defaultValidate: (o) => !!
|
|
15497
|
+
defaultValidate: (o) => !!mn(o, e),
|
|
15498
15498
|
protocols: e,
|
|
15499
15499
|
defaultProtocol: n
|
|
15500
15500
|
}),
|
|
@@ -15684,7 +15684,7 @@ var ro = (t, e) => {
|
|
|
15684
15684
|
return !0;
|
|
15685
15685
|
if (t.state.selection.from !== t.state.selection.to)
|
|
15686
15686
|
return !1;
|
|
15687
|
-
if (!
|
|
15687
|
+
if (!ln(t.state, e) && Jp(t.state, e, n)) {
|
|
15688
15688
|
const { $anchor: l } = t.state.selection, a = t.state.doc.resolve(l.before() - 1), c = [];
|
|
15689
15689
|
a.node().descendants((f, h) => {
|
|
15690
15690
|
f.type.name === e && c.push({ node: f, pos: h });
|
|
@@ -15695,7 +15695,7 @@ var ro = (t, e) => {
|
|
|
15695
15695
|
const d = t.state.doc.resolve(a.start() + u.pos + 1);
|
|
15696
15696
|
return t.chain().cut({ from: l.start() - 1, to: l.end() + 1 }, d.end()).joinForward().run();
|
|
15697
15697
|
}
|
|
15698
|
-
if (!
|
|
15698
|
+
if (!ln(t.state, e) || !Yb(t.state))
|
|
15699
15699
|
return !1;
|
|
15700
15700
|
const r = ro(e, t.state);
|
|
15701
15701
|
if (!r)
|
|
@@ -15709,7 +15709,7 @@ var ro = (t, e) => {
|
|
|
15709
15709
|
const n = uc(t, e), r = ro(t, e);
|
|
15710
15710
|
return !r || !n ? !1 : n < r.depth;
|
|
15711
15711
|
}, ra = (t, e) => {
|
|
15712
|
-
if (!
|
|
15712
|
+
if (!ln(t.state, e) || !Zb(t.state, e))
|
|
15713
15713
|
return !1;
|
|
15714
15714
|
const { selection: n } = t.state, { $from: r, $to: o } = n;
|
|
15715
15715
|
return !n.empty && r.sameParent(o) ? !1 : Xp(e, t.state) ? t.chain().focus(t.state.selection.from + 4).lift(e).joinBackward().run() : Qp(e, t.state) ? t.chain().joinForward().joinBackward().run() : t.commands.joinItemForward();
|
|
@@ -16296,7 +16296,7 @@ var x7 = _e.create({
|
|
|
16296
16296
|
},
|
|
16297
16297
|
addInputRules() {
|
|
16298
16298
|
return [
|
|
16299
|
-
|
|
16299
|
+
Ln({
|
|
16300
16300
|
find: S7,
|
|
16301
16301
|
type: this.type
|
|
16302
16302
|
})
|
|
@@ -16304,7 +16304,7 @@ var x7 = _e.create({
|
|
|
16304
16304
|
},
|
|
16305
16305
|
addPasteRules() {
|
|
16306
16306
|
return [
|
|
16307
|
-
|
|
16307
|
+
an({
|
|
16308
16308
|
find: k7,
|
|
16309
16309
|
type: this.type
|
|
16310
16310
|
})
|
|
@@ -16886,26 +16886,26 @@ let Vt = class lm {
|
|
|
16886
16886
|
}
|
|
16887
16887
|
}
|
|
16888
16888
|
};
|
|
16889
|
-
class
|
|
16889
|
+
class Kt {
|
|
16890
16890
|
constructor(e, n, r, o, i) {
|
|
16891
16891
|
this.done = e, this.undone = n, this.prevRanges = r, this.prevTime = o, this.prevComposition = i;
|
|
16892
16892
|
}
|
|
16893
16893
|
}
|
|
16894
16894
|
const F7 = 20;
|
|
16895
16895
|
function V7(t, e, n, r) {
|
|
16896
|
-
let o = n.getMeta(
|
|
16896
|
+
let o = n.getMeta(Tn), i;
|
|
16897
16897
|
if (o)
|
|
16898
16898
|
return o.historyState;
|
|
16899
|
-
n.getMeta(W7) && (t = new
|
|
16899
|
+
n.getMeta(W7) && (t = new Kt(t.done, t.undone, null, 0, -1));
|
|
16900
16900
|
let s = n.getMeta("appendedTransaction");
|
|
16901
16901
|
if (n.steps.length == 0)
|
|
16902
16902
|
return t;
|
|
16903
|
-
if (s && s.getMeta(
|
|
16904
|
-
return s.getMeta(
|
|
16903
|
+
if (s && s.getMeta(Tn))
|
|
16904
|
+
return s.getMeta(Tn).redo ? new Kt(t.done.addTransform(n, void 0, r, zo(e)), t.undone, Id(n.mapping.maps), t.prevTime, t.prevComposition) : new Kt(t.done, t.undone.addTransform(n, void 0, r, zo(e)), null, t.prevTime, t.prevComposition);
|
|
16905
16905
|
if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
|
|
16906
16906
|
let l = n.getMeta("composition"), a = t.prevTime == 0 || !s && t.prevComposition != l && (t.prevTime < (n.time || 0) - r.newGroupDelay || !z7(n, t.prevRanges)), c = s ? ol(t.prevRanges, n.mapping) : Id(n.mapping.maps);
|
|
16907
|
-
return new
|
|
16908
|
-
} else return (i = n.getMeta("rebased")) ? new
|
|
16907
|
+
return new Kt(t.done.addTransform(n, a ? e.selection.getBookmark() : void 0, r, zo(e)), ot.empty, c, n.time, l ?? t.prevComposition);
|
|
16908
|
+
} else return (i = n.getMeta("rebased")) ? new Kt(t.done.rebased(n, i), t.undone.rebased(n, i), ol(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Kt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), ol(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
|
|
16909
16909
|
}
|
|
16910
16910
|
function z7(t, e) {
|
|
16911
16911
|
if (!e)
|
|
@@ -16935,11 +16935,11 @@ function ol(t, e) {
|
|
|
16935
16935
|
return n;
|
|
16936
16936
|
}
|
|
16937
16937
|
function U7(t, e, n) {
|
|
16938
|
-
let r = zo(e), o =
|
|
16938
|
+
let r = zo(e), o = Tn.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
|
|
16939
16939
|
if (!i)
|
|
16940
16940
|
return null;
|
|
16941
|
-
let s = i.selection.resolve(i.transform.doc), l = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), a = new
|
|
16942
|
-
return i.transform.setSelection(s).setMeta(
|
|
16941
|
+
let s = i.selection.resolve(i.transform.doc), l = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), a = new Kt(n ? l : i.remaining, n ? i.remaining : l, null, 0, -1);
|
|
16942
|
+
return i.transform.setSelection(s).setMeta(Tn, { redo: n, historyState: a });
|
|
16943
16943
|
}
|
|
16944
16944
|
let il = !1, Ld = null;
|
|
16945
16945
|
function zo(t) {
|
|
@@ -16954,16 +16954,16 @@ function zo(t) {
|
|
|
16954
16954
|
}
|
|
16955
16955
|
return il;
|
|
16956
16956
|
}
|
|
16957
|
-
const
|
|
16957
|
+
const Tn = new ve("history"), W7 = new ve("closeHistory");
|
|
16958
16958
|
function j7(t = {}) {
|
|
16959
16959
|
return t = {
|
|
16960
16960
|
depth: t.depth || 100,
|
|
16961
16961
|
newGroupDelay: t.newGroupDelay || 500
|
|
16962
16962
|
}, new ce({
|
|
16963
|
-
key:
|
|
16963
|
+
key: Tn,
|
|
16964
16964
|
state: {
|
|
16965
16965
|
init() {
|
|
16966
|
-
return new
|
|
16966
|
+
return new Kt(ot.empty, ot.empty, null, 0, -1);
|
|
16967
16967
|
},
|
|
16968
16968
|
apply(e, n, r) {
|
|
16969
16969
|
return V7(n, r, e, t);
|
|
@@ -16982,7 +16982,7 @@ function j7(t = {}) {
|
|
|
16982
16982
|
}
|
|
16983
16983
|
function am(t, e) {
|
|
16984
16984
|
return (n, r) => {
|
|
16985
|
-
let o =
|
|
16985
|
+
let o = Tn.getState(n);
|
|
16986
16986
|
if (!o || (t ? o.undone : o.done).eventCount == 0)
|
|
16987
16987
|
return !1;
|
|
16988
16988
|
if (r) {
|
|
@@ -17479,7 +17479,7 @@ var J7 = Q.create({
|
|
|
17479
17479
|
},
|
|
17480
17480
|
addInputRules() {
|
|
17481
17481
|
return [
|
|
17482
|
-
|
|
17482
|
+
Ln({
|
|
17483
17483
|
find: x4,
|
|
17484
17484
|
type: this.type
|
|
17485
17485
|
})
|
|
@@ -17487,7 +17487,7 @@ var J7 = Q.create({
|
|
|
17487
17487
|
},
|
|
17488
17488
|
addPasteRules() {
|
|
17489
17489
|
return [
|
|
17490
|
-
|
|
17490
|
+
an({
|
|
17491
17491
|
find: S4,
|
|
17492
17492
|
type: this.type
|
|
17493
17493
|
})
|
|
@@ -17685,11 +17685,11 @@ var D4 = Q.create({
|
|
|
17685
17685
|
[u]: k
|
|
17686
17686
|
}), b[x + 1] = k, S.node.attrs[u])
|
|
17687
17687
|
return;
|
|
17688
|
-
const
|
|
17688
|
+
const U = d({ node: C, pos: w });
|
|
17689
17689
|
return a.setNodeMarkup(w, void 0, {
|
|
17690
17690
|
...C.attrs,
|
|
17691
|
-
[u]:
|
|
17692
|
-
}), b[x] =
|
|
17691
|
+
[u]: U
|
|
17692
|
+
}), b[x] = U, a;
|
|
17693
17693
|
}
|
|
17694
17694
|
const M = L4(b), { deleted: N } = h.invert().mapResult(w);
|
|
17695
17695
|
N && M.includes(k) && a.setNodeMarkup(w, void 0, {
|
|
@@ -18091,20 +18091,20 @@ function pm(t) {
|
|
|
18091
18091
|
const e = Lt(t);
|
|
18092
18092
|
return It(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Ke(e) && oo(e) ? e : pm(e);
|
|
18093
18093
|
}
|
|
18094
|
-
function
|
|
18094
|
+
function rn(t, e, n) {
|
|
18095
18095
|
var r;
|
|
18096
18096
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
18097
18097
|
const o = pm(t), i = o === ((r = t.ownerDocument) == null ? void 0 : r.body), s = Ve(o);
|
|
18098
18098
|
if (i) {
|
|
18099
18099
|
const l = ia(s);
|
|
18100
|
-
return e.concat(s, s.visualViewport || [], oo(o) ? o : [], l && n ?
|
|
18100
|
+
return e.concat(s, s.visualViewport || [], oo(o) ? o : [], l && n ? rn(l) : []);
|
|
18101
18101
|
}
|
|
18102
|
-
return e.concat(o,
|
|
18102
|
+
return e.concat(o, rn(o, [], n));
|
|
18103
18103
|
}
|
|
18104
18104
|
function ia(t) {
|
|
18105
18105
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
18106
18106
|
}
|
|
18107
|
-
const Y4 = ["top", "right", "bottom", "left"],
|
|
18107
|
+
const Y4 = ["top", "right", "bottom", "left"], cn = Math.min, Ue = Math.max, Pi = Math.round, Oo = Math.floor, pt = (t) => ({
|
|
18108
18108
|
x: t,
|
|
18109
18109
|
y: t
|
|
18110
18110
|
}), X4 = {
|
|
@@ -18117,7 +18117,7 @@ const Y4 = ["top", "right", "bottom", "left"], fn = Math.min, Ue = Math.max, Pi
|
|
|
18117
18117
|
end: "start"
|
|
18118
18118
|
};
|
|
18119
18119
|
function sa(t, e, n) {
|
|
18120
|
-
return Ue(t,
|
|
18120
|
+
return Ue(t, cn(e, n));
|
|
18121
18121
|
}
|
|
18122
18122
|
function Dt(t, e) {
|
|
18123
18123
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -18455,7 +18455,7 @@ function cr(t, e) {
|
|
|
18455
18455
|
}
|
|
18456
18456
|
return !1;
|
|
18457
18457
|
}
|
|
18458
|
-
function
|
|
18458
|
+
function Yn(t) {
|
|
18459
18459
|
return "composedPath" in t ? t.composedPath()[0] : t.target;
|
|
18460
18460
|
}
|
|
18461
18461
|
function ll(t, e) {
|
|
@@ -18738,7 +18738,7 @@ const U5 = (t) => ({
|
|
|
18738
18738
|
}, h = gc(o), p = mc(h), m = await s.getDimensions(c), y = h === "y", b = y ? "top" : "left", C = y ? "bottom" : "right", w = y ? "clientHeight" : "clientWidth", x = i.reference[p] + i.reference[h] - f[h] - i.floating[p], E = f[h] - i.reference[h], k = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
|
|
18739
18739
|
let S = k ? k[w] : 0;
|
|
18740
18740
|
(!S || !await (s.isElement == null ? void 0 : s.isElement(k))) && (S = l.floating[w] || i.floating[p]);
|
|
18741
|
-
const M = x / 2 - E / 2, N = S / 2 - m[p] / 2 - 1, B =
|
|
18741
|
+
const M = x / 2 - E / 2, N = S / 2 - m[p] / 2 - 1, B = cn(d[b], N), U = cn(d[C], N), W = B, $ = S - m[p] - U, I = S / 2 - m[p] / 2 + M, H = sa(W, I, $), F = !a.arrow && hr(o) != null && I !== H && i.reference[p] / 2 - (I < W ? B : U) - m[p] / 2 < 0, L = F ? I < W ? I - W : I - $ : 0;
|
|
18742
18742
|
return {
|
|
18743
18743
|
[h]: f[h] + L,
|
|
18744
18744
|
data: {
|
|
@@ -18787,8 +18787,8 @@ const U5 = (t) => ({
|
|
|
18787
18787
|
placement: o,
|
|
18788
18788
|
overflows: N
|
|
18789
18789
|
}], !N.every((I) => I <= 0)) {
|
|
18790
|
-
var
|
|
18791
|
-
const I = (((
|
|
18790
|
+
var U, W;
|
|
18791
|
+
const I = (((U = i.flip) == null ? void 0 : U.index) || 0) + 1, H = S[I];
|
|
18792
18792
|
if (H && (!(d === "alignment" ? C !== ft(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
18793
18793
|
// overflows the main axis.
|
|
18794
18794
|
B.every((T) => ft(T.placement) === C ? T.overflows[0] > 0 : !0)))
|
|
@@ -18801,7 +18801,7 @@ const U5 = (t) => ({
|
|
|
18801
18801
|
placement: H
|
|
18802
18802
|
}
|
|
18803
18803
|
};
|
|
18804
|
-
let F = (
|
|
18804
|
+
let F = (W = B.filter((L) => L.overflows[0] <= 0).sort((L, T) => L.overflows[1] - T.overflows[1])[0]) == null ? void 0 : W.placement;
|
|
18805
18805
|
if (!F)
|
|
18806
18806
|
switch (h) {
|
|
18807
18807
|
case "bestFit": {
|
|
@@ -18814,7 +18814,7 @@ const U5 = (t) => ({
|
|
|
18814
18814
|
R === "y";
|
|
18815
18815
|
}
|
|
18816
18816
|
return !0;
|
|
18817
|
-
}).map((T) => [T.placement, T.overflows.filter((R) => R > 0).reduce((R,
|
|
18817
|
+
}).map((T) => [T.placement, T.overflows.filter((R) => R > 0).reduce((R, j) => R + j, 0)]).sort((T, R) => T[1] - R[1])[0]) == null ? void 0 : $[0];
|
|
18818
18818
|
L && (F = L);
|
|
18819
18819
|
break;
|
|
18820
18820
|
}
|
|
@@ -19054,11 +19054,11 @@ const q5 = function(t) {
|
|
|
19054
19054
|
} = i.floating;
|
|
19055
19055
|
let y, b;
|
|
19056
19056
|
d === "top" || d === "bottom" ? (y = d, b = f === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (b = d, y = f === "end" ? "top" : "bottom");
|
|
19057
|
-
const C = m - u.top - u.bottom, w = p - u.left - u.right, x =
|
|
19057
|
+
const C = m - u.top - u.bottom, w = p - u.left - u.right, x = cn(m - u[y], C), E = cn(p - u[b], w), k = !e.middlewareData.shift;
|
|
19058
19058
|
let S = x, M = E;
|
|
19059
19059
|
if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = w), (r = e.middlewareData.shift) != null && r.enabled.y && (S = C), k && !f) {
|
|
19060
|
-
const B = Ue(u.left, 0),
|
|
19061
|
-
h ? M = p - 2 * (B !== 0 ||
|
|
19060
|
+
const B = Ue(u.left, 0), U = Ue(u.right, 0), W = Ue(u.top, 0), $ = Ue(u.bottom, 0);
|
|
19061
|
+
h ? M = p - 2 * (B !== 0 || U !== 0 ? B + U : Ue(u.left, u.right)) : S = m - 2 * (W !== 0 || $ !== 0 ? W + $ : Ue(u.top, u.bottom));
|
|
19062
19062
|
}
|
|
19063
19063
|
await a({
|
|
19064
19064
|
...e,
|
|
@@ -19113,7 +19113,7 @@ function Tm(t) {
|
|
|
19113
19113
|
function X5(t, e, n) {
|
|
19114
19114
|
return e === void 0 && (e = !1), !n || e && n !== Ve(t) ? !1 : e;
|
|
19115
19115
|
}
|
|
19116
|
-
function
|
|
19116
|
+
function Dn(t, e, n, r) {
|
|
19117
19117
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
19118
19118
|
const o = t.getBoundingClientRect(), i = yc(t);
|
|
19119
19119
|
let s = pt(1);
|
|
@@ -19137,7 +19137,7 @@ function Pn(t, e, n, r) {
|
|
|
19137
19137
|
}
|
|
19138
19138
|
function fs(t, e) {
|
|
19139
19139
|
const n = ds(t).scrollLeft;
|
|
19140
|
-
return e ? e.left + n :
|
|
19140
|
+
return e ? e.left + n : Dn(yt(t)).left + n;
|
|
19141
19141
|
}
|
|
19142
19142
|
function Am(t, e) {
|
|
19143
19143
|
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - fs(t, n), o = n.top + e.scrollTop;
|
|
@@ -19162,7 +19162,7 @@ function Q5(t) {
|
|
|
19162
19162
|
}, c = pt(1);
|
|
19163
19163
|
const u = pt(0), d = Ke(r);
|
|
19164
19164
|
if ((d || !d && !i) && ((fr(r) !== "body" || oo(s)) && (a = ds(r)), Ke(r))) {
|
|
19165
|
-
const h =
|
|
19165
|
+
const h = Dn(r);
|
|
19166
19166
|
c = nr(r), u.x = h.x + r.clientLeft, u.y = h.y + r.clientTop;
|
|
19167
19167
|
}
|
|
19168
19168
|
const f = s && !d && !i ? Am(s, a) : pt(0);
|
|
@@ -19210,7 +19210,7 @@ function n3(t, e) {
|
|
|
19210
19210
|
}
|
|
19211
19211
|
const r3 = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
19212
19212
|
function o3(t, e) {
|
|
19213
|
-
const n =
|
|
19213
|
+
const n = Dn(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = Ke(t) ? nr(t) : pt(1), s = t.clientWidth * i.x, l = t.clientHeight * i.y, a = o * i.x, c = r * i.y;
|
|
19214
19214
|
return {
|
|
19215
19215
|
width: s,
|
|
19216
19216
|
height: l,
|
|
@@ -19245,7 +19245,7 @@ function i3(t, e) {
|
|
|
19245
19245
|
const n = e.get(t);
|
|
19246
19246
|
if (n)
|
|
19247
19247
|
return n;
|
|
19248
|
-
let r =
|
|
19248
|
+
let r = rn(t, [], !1).filter((l) => oe(l) && fr(l) !== "body"), o = null;
|
|
19249
19249
|
const i = rt(t).position === "fixed";
|
|
19250
19250
|
let s = i ? Lt(t) : t;
|
|
19251
19251
|
for (; oe(s) && !It(s); ) {
|
|
@@ -19263,7 +19263,7 @@ function s3(t) {
|
|
|
19263
19263
|
} = t;
|
|
19264
19264
|
const s = [...n === "clippingAncestors" ? cs(e) ? [] : i3(e, this._c) : [].concat(n), r], l = s[0], a = s.reduce((c, u) => {
|
|
19265
19265
|
const d = Kd(e, u, o);
|
|
19266
|
-
return c.top = Ue(d.top, c.top), c.right =
|
|
19266
|
+
return c.top = Ue(d.top, c.top), c.right = cn(d.right, c.right), c.bottom = cn(d.bottom, c.bottom), c.left = Ue(d.left, c.left), c;
|
|
19267
19267
|
}, Kd(e, l, o));
|
|
19268
19268
|
return {
|
|
19269
19269
|
width: a.right - a.left,
|
|
@@ -19283,7 +19283,7 @@ function l3(t) {
|
|
|
19283
19283
|
};
|
|
19284
19284
|
}
|
|
19285
19285
|
function a3(t, e, n) {
|
|
19286
|
-
const r = Ke(e), o = yt(e), i = n === "fixed", s =
|
|
19286
|
+
const r = Ke(e), o = yt(e), i = n === "fixed", s = Dn(t, !0, i, e);
|
|
19287
19287
|
let l = {
|
|
19288
19288
|
scrollLeft: 0,
|
|
19289
19289
|
scrollTop: 0
|
|
@@ -19294,7 +19294,7 @@ function a3(t, e, n) {
|
|
|
19294
19294
|
}
|
|
19295
19295
|
if (r || !r && !i)
|
|
19296
19296
|
if ((fr(e) !== "body" || oo(o)) && (l = ds(e)), r) {
|
|
19297
|
-
const h =
|
|
19297
|
+
const h = Dn(e, !0, i, e);
|
|
19298
19298
|
a.x = h.x + e.clientLeft, a.y = h.y + e.clientTop;
|
|
19299
19299
|
} else o && c();
|
|
19300
19300
|
i && !r && o && c();
|
|
@@ -19384,7 +19384,7 @@ function f3(t, e) {
|
|
|
19384
19384
|
return;
|
|
19385
19385
|
const p = Oo(d), m = Oo(o.clientWidth - (u + f)), y = Oo(o.clientHeight - (d + h)), b = Oo(u), w = {
|
|
19386
19386
|
rootMargin: -p + "px " + -m + "px " + -y + "px " + -b + "px",
|
|
19387
|
-
threshold: Ue(0,
|
|
19387
|
+
threshold: Ue(0, cn(1, a)) || 1
|
|
19388
19388
|
};
|
|
19389
19389
|
let x = !0;
|
|
19390
19390
|
function E(k) {
|
|
@@ -19419,7 +19419,7 @@ function Im(t, e, n, r) {
|
|
|
19419
19419
|
elementResize: s = typeof ResizeObserver == "function",
|
|
19420
19420
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
19421
19421
|
animationFrame: a = !1
|
|
19422
|
-
} = r, c = yc(t), u = o || i ? [...c ?
|
|
19422
|
+
} = r, c = yc(t), u = o || i ? [...c ? rn(c) : [], ...rn(e)] : [];
|
|
19423
19423
|
u.forEach((b) => {
|
|
19424
19424
|
o && b.addEventListener("scroll", n, {
|
|
19425
19425
|
passive: !0
|
|
@@ -19434,10 +19434,10 @@ function Im(t, e, n, r) {
|
|
|
19434
19434
|
(w = h) == null || w.observe(e);
|
|
19435
19435
|
})), n();
|
|
19436
19436
|
}), c && !a && h.observe(c), h.observe(e));
|
|
19437
|
-
let p, m = a ?
|
|
19437
|
+
let p, m = a ? Dn(t) : null;
|
|
19438
19438
|
a && y();
|
|
19439
19439
|
function y() {
|
|
19440
|
-
const b =
|
|
19440
|
+
const b = Dn(t);
|
|
19441
19441
|
m && !Nm(m, b) && n(), m = b, p = requestAnimationFrame(y);
|
|
19442
19442
|
}
|
|
19443
19443
|
return n(), () => {
|
|
@@ -19532,7 +19532,7 @@ function Dm(t) {
|
|
|
19532
19532
|
T !== k.current && (k.current = T, m(T));
|
|
19533
19533
|
}, []), w = g.useCallback((T) => {
|
|
19534
19534
|
T !== S.current && (S.current = T, b(T));
|
|
19535
|
-
}, []), x = i || p, E = s || y, k = g.useRef(null), S = g.useRef(null), M = g.useRef(u), N = a != null, B = ul(a),
|
|
19535
|
+
}, []), x = i || p, E = s || y, k = g.useRef(null), S = g.useRef(null), M = g.useRef(u), N = a != null, B = ul(a), U = ul(o), W = ul(c), $ = g.useCallback(() => {
|
|
19536
19536
|
if (!k.current || !S.current)
|
|
19537
19537
|
return;
|
|
19538
19538
|
const T = {
|
|
@@ -19540,20 +19540,20 @@ function Dm(t) {
|
|
|
19540
19540
|
strategy: n,
|
|
19541
19541
|
middleware: f
|
|
19542
19542
|
};
|
|
19543
|
-
|
|
19544
|
-
const
|
|
19543
|
+
U.current && (T.platform = U.current), b3(k.current, S.current, T).then((R) => {
|
|
19544
|
+
const j = {
|
|
19545
19545
|
...R,
|
|
19546
19546
|
// The floating element's position may be recomputed while it's closed
|
|
19547
19547
|
// but still mounted (such as when transitioning out). To ensure
|
|
19548
19548
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
19549
19549
|
// setting it to `true` when `open === false` (must be specified).
|
|
19550
|
-
isPositioned:
|
|
19550
|
+
isPositioned: W.current !== !1
|
|
19551
19551
|
};
|
|
19552
|
-
I.current && !$i(M.current,
|
|
19553
|
-
d(
|
|
19552
|
+
I.current && !$i(M.current, j) && (M.current = j, wa.flushSync(() => {
|
|
19553
|
+
d(j);
|
|
19554
19554
|
}));
|
|
19555
19555
|
});
|
|
19556
|
-
}, [f, e, n,
|
|
19556
|
+
}, [f, e, n, U, W]);
|
|
19557
19557
|
Wo(() => {
|
|
19558
19558
|
c === !1 && M.current.isPositioned && (M.current.isPositioned = !1, d((T) => ({
|
|
19559
19559
|
...T,
|
|
@@ -19586,17 +19586,17 @@ function Dm(t) {
|
|
|
19586
19586
|
};
|
|
19587
19587
|
if (!F.floating)
|
|
19588
19588
|
return T;
|
|
19589
|
-
const R = Jd(F.floating, u.x),
|
|
19589
|
+
const R = Jd(F.floating, u.x), j = Jd(F.floating, u.y);
|
|
19590
19590
|
return l ? {
|
|
19591
19591
|
...T,
|
|
19592
|
-
transform: "translate(" + R + "px, " +
|
|
19592
|
+
transform: "translate(" + R + "px, " + j + "px)",
|
|
19593
19593
|
...Lm(F.floating) >= 1.5 && {
|
|
19594
19594
|
willChange: "transform"
|
|
19595
19595
|
}
|
|
19596
19596
|
} : {
|
|
19597
19597
|
position: n,
|
|
19598
19598
|
left: R,
|
|
19599
|
-
top:
|
|
19599
|
+
top: j
|
|
19600
19600
|
};
|
|
19601
19601
|
}, [n, l, F.floating, u.x, u.y]);
|
|
19602
19602
|
return g.useMemo(() => ({
|
|
@@ -19759,7 +19759,7 @@ function B3(t, e) {
|
|
|
19759
19759
|
restMs: d = 0,
|
|
19760
19760
|
move: f = !0
|
|
19761
19761
|
} = e, h = Cc(), p = bc(), m = No(c), y = No(a), b = No(n), C = No(d), w = g.useRef(), x = g.useRef(-1), E = g.useRef(), k = g.useRef(-1), S = g.useRef(!0), M = g.useRef(!1), N = g.useRef(() => {
|
|
19762
|
-
}), B = g.useRef(!1),
|
|
19762
|
+
}), B = g.useRef(!1), U = ut(() => {
|
|
19763
19763
|
var L;
|
|
19764
19764
|
const T = (L = o.current.openEvent) == null ? void 0 : L.type;
|
|
19765
19765
|
return T?.includes("mouse") && T !== "mousedown";
|
|
@@ -19778,17 +19778,17 @@ function B3(t, e) {
|
|
|
19778
19778
|
}, [l, i]), g.useEffect(() => {
|
|
19779
19779
|
if (!l || !m.current || !n) return;
|
|
19780
19780
|
function L(R) {
|
|
19781
|
-
|
|
19781
|
+
U() && r(!1, R, "hover");
|
|
19782
19782
|
}
|
|
19783
19783
|
const T = ht(s.floating).documentElement;
|
|
19784
19784
|
return T.addEventListener("mouseleave", L), () => {
|
|
19785
19785
|
T.removeEventListener("mouseleave", L);
|
|
19786
19786
|
};
|
|
19787
|
-
}, [s.floating, n, r, l, m,
|
|
19788
|
-
const
|
|
19787
|
+
}, [s.floating, n, r, l, m, U]);
|
|
19788
|
+
const W = g.useCallback(function(L, T, R) {
|
|
19789
19789
|
T === void 0 && (T = !0), R === void 0 && (R = "hover");
|
|
19790
|
-
const
|
|
19791
|
-
|
|
19790
|
+
const j = dl(y.current, "close", w.current);
|
|
19791
|
+
j && !E.current ? (Ze(x), x.current = window.setTimeout(() => r(!1, L, R), j)) : T && (Ze(x), r(!1, L, R));
|
|
19792
19792
|
}, [y, r]), $ = ut(() => {
|
|
19793
19793
|
N.current(), E.current = void 0;
|
|
19794
19794
|
}), I = ut(() => {
|
|
@@ -19821,7 +19821,7 @@ function B3(t, e) {
|
|
|
19821
19821
|
x: K.clientX,
|
|
19822
19822
|
y: K.clientY,
|
|
19823
19823
|
onClose() {
|
|
19824
|
-
I(), $(), H() ||
|
|
19824
|
+
I(), $(), H() || W(K, !0, "safe-polygon");
|
|
19825
19825
|
}
|
|
19826
19826
|
});
|
|
19827
19827
|
const le = E.current;
|
|
@@ -19830,7 +19830,7 @@ function B3(t, e) {
|
|
|
19830
19830
|
};
|
|
19831
19831
|
return;
|
|
19832
19832
|
}
|
|
19833
|
-
(w.current === "touch" ? !cr(s.floating, K.relatedTarget) : !0) &&
|
|
19833
|
+
(w.current === "touch" ? !cr(s.floating, K.relatedTarget) : !0) && W(K);
|
|
19834
19834
|
}
|
|
19835
19835
|
function R(K) {
|
|
19836
19836
|
H() || o.current.floatingContext && (m.current == null || m.current({
|
|
@@ -19839,40 +19839,40 @@ function B3(t, e) {
|
|
|
19839
19839
|
x: K.clientX,
|
|
19840
19840
|
y: K.clientY,
|
|
19841
19841
|
onClose() {
|
|
19842
|
-
I(), $(), H() ||
|
|
19842
|
+
I(), $(), H() || W(K);
|
|
19843
19843
|
}
|
|
19844
19844
|
})(K));
|
|
19845
19845
|
}
|
|
19846
|
-
function
|
|
19846
|
+
function j() {
|
|
19847
19847
|
Ze(x);
|
|
19848
19848
|
}
|
|
19849
19849
|
function ee(K) {
|
|
19850
|
-
H() ||
|
|
19850
|
+
H() || W(K, !1);
|
|
19851
19851
|
}
|
|
19852
19852
|
if (oe(s.domReference)) {
|
|
19853
19853
|
const K = s.domReference, Z = s.floating;
|
|
19854
19854
|
return n && K.addEventListener("mouseleave", R), f && K.addEventListener("mousemove", L, {
|
|
19855
19855
|
once: !0
|
|
19856
|
-
}), K.addEventListener("mouseenter", L), K.addEventListener("mouseleave", T), Z && (Z.addEventListener("mouseleave", R), Z.addEventListener("mouseenter",
|
|
19857
|
-
n && K.removeEventListener("mouseleave", R), f && K.removeEventListener("mousemove", L), K.removeEventListener("mouseenter", L), K.removeEventListener("mouseleave", T), Z && (Z.removeEventListener("mouseleave", R), Z.removeEventListener("mouseenter",
|
|
19856
|
+
}), K.addEventListener("mouseenter", L), K.addEventListener("mouseleave", T), Z && (Z.addEventListener("mouseleave", R), Z.addEventListener("mouseenter", j), Z.addEventListener("mouseleave", ee)), () => {
|
|
19857
|
+
n && K.removeEventListener("mouseleave", R), f && K.removeEventListener("mousemove", L), K.removeEventListener("mouseenter", L), K.removeEventListener("mouseleave", T), Z && (Z.removeEventListener("mouseleave", R), Z.removeEventListener("mouseenter", j), Z.removeEventListener("mouseleave", ee));
|
|
19858
19858
|
};
|
|
19859
19859
|
}
|
|
19860
|
-
}, [s, l, t, u, f,
|
|
19860
|
+
}, [s, l, t, u, f, W, $, I, r, n, b, h, y, m, o, H, C]), st(() => {
|
|
19861
19861
|
var L;
|
|
19862
|
-
if (l && n && (L = m.current) != null && (L = L.__options) != null && L.blockPointerEvents &&
|
|
19862
|
+
if (l && n && (L = m.current) != null && (L = L.__options) != null && L.blockPointerEvents && U()) {
|
|
19863
19863
|
M.current = !0;
|
|
19864
19864
|
const R = s.floating;
|
|
19865
19865
|
if (oe(s.domReference) && R) {
|
|
19866
19866
|
var T;
|
|
19867
|
-
const
|
|
19868
|
-
|
|
19867
|
+
const j = ht(s.floating).body;
|
|
19868
|
+
j.setAttribute(ef, "");
|
|
19869
19869
|
const ee = s.domReference, K = h == null || (T = h.nodesRef.current.find((Z) => Z.id === p)) == null || (T = T.context) == null ? void 0 : T.elements.floating;
|
|
19870
|
-
return K && (K.style.pointerEvents = ""),
|
|
19871
|
-
|
|
19870
|
+
return K && (K.style.pointerEvents = ""), j.style.pointerEvents = "none", ee.style.pointerEvents = "auto", R.style.pointerEvents = "auto", () => {
|
|
19871
|
+
j.style.pointerEvents = "", ee.style.pointerEvents = "", R.style.pointerEvents = "";
|
|
19872
19872
|
};
|
|
19873
19873
|
}
|
|
19874
19874
|
}
|
|
19875
|
-
}, [l, n, p, s, h, m,
|
|
19875
|
+
}, [l, n, p, s, h, m, U]), st(() => {
|
|
19876
19876
|
n || (w.current = void 0, B.current = !1, $(), I());
|
|
19877
19877
|
}, [n, $, I]), g.useEffect(() => () => {
|
|
19878
19878
|
$(), Ze(x), Ze(k), I();
|
|
@@ -19888,10 +19888,10 @@ function B3(t, e) {
|
|
|
19888
19888
|
const {
|
|
19889
19889
|
nativeEvent: R
|
|
19890
19890
|
} = T;
|
|
19891
|
-
function
|
|
19891
|
+
function j() {
|
|
19892
19892
|
!S.current && !b.current && r(!0, R, "hover");
|
|
19893
19893
|
}
|
|
19894
|
-
u && !da(w.current) || n || fl(C.current) === 0 || B.current && T.movementX ** 2 + T.movementY ** 2 < 2 || (Ze(k), w.current === "touch" ?
|
|
19894
|
+
u && !da(w.current) || n || fl(C.current) === 0 || B.current && T.movementX ** 2 + T.movementY ** 2 < 2 || (Ze(k), w.current === "touch" ? j() : (B.current = !0, k.current = window.setTimeout(j, fl(C.current))));
|
|
19895
19895
|
}
|
|
19896
19896
|
};
|
|
19897
19897
|
}, [u, r, n, b, C]);
|
|
@@ -20113,8 +20113,8 @@ function W3(t, e) {
|
|
|
20113
20113
|
if (!w && (I.stopPropagation(), L.length > 0)) {
|
|
20114
20114
|
let T = !0;
|
|
20115
20115
|
if (L.forEach((R) => {
|
|
20116
|
-
var
|
|
20117
|
-
if ((
|
|
20116
|
+
var j;
|
|
20117
|
+
if ((j = R.context) != null && j.open && !R.context.dataRef.current.__escapeKeyBubbles) {
|
|
20118
20118
|
T = !1;
|
|
20119
20119
|
return;
|
|
20120
20120
|
}
|
|
@@ -20126,9 +20126,9 @@ function W3(t, e) {
|
|
|
20126
20126
|
var H;
|
|
20127
20127
|
const F = () => {
|
|
20128
20128
|
var L;
|
|
20129
|
-
M(I), (L =
|
|
20129
|
+
M(I), (L = Yn(I)) == null || L.removeEventListener("keydown", F);
|
|
20130
20130
|
};
|
|
20131
|
-
(H =
|
|
20131
|
+
(H = Yn(I)) == null || H.addEventListener("keydown", F);
|
|
20132
20132
|
}), B = ut((I) => {
|
|
20133
20133
|
var H;
|
|
20134
20134
|
const F = i.current.insideReactTree;
|
|
@@ -20136,7 +20136,7 @@ function W3(t, e) {
|
|
|
20136
20136
|
const L = C.current;
|
|
20137
20137
|
if (C.current = !1, c === "click" && L || F || typeof b == "function" && !b(I))
|
|
20138
20138
|
return;
|
|
20139
|
-
const T =
|
|
20139
|
+
const T = Yn(I), R = "[" + io("inert") + "]", j = ht(o.floating).querySelectorAll(R);
|
|
20140
20140
|
let ee = oe(T) ? T : null;
|
|
20141
20141
|
for (; ee && !It(ee); ) {
|
|
20142
20142
|
const le = Lt(ee);
|
|
@@ -20144,14 +20144,14 @@ function W3(t, e) {
|
|
|
20144
20144
|
break;
|
|
20145
20145
|
ee = le;
|
|
20146
20146
|
}
|
|
20147
|
-
if (
|
|
20147
|
+
if (j.length && oe(T) && !R5(T) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
20148
20148
|
!cr(T, o.floating) && // If the target root element contains none of the markers, then the
|
|
20149
20149
|
// element was injected after the floating element rendered.
|
|
20150
|
-
Array.from(
|
|
20150
|
+
Array.from(j).every((le) => !cr(ee, le)))
|
|
20151
20151
|
return;
|
|
20152
20152
|
if (Ke(T) && $) {
|
|
20153
|
-
const le = It(T), ye = rt(T), Y = /auto|scroll/, te = le || Y.test(ye.overflowX), Ge = le || Y.test(ye.overflowY), wt = te && T.clientWidth > 0 && T.scrollWidth > T.clientWidth,
|
|
20154
|
-
if (
|
|
20153
|
+
const le = It(T), ye = rt(T), Y = /auto|scroll/, te = le || Y.test(ye.overflowX), Ge = le || Y.test(ye.overflowY), wt = te && T.clientWidth > 0 && T.scrollWidth > T.clientWidth, Fn = Ge && T.clientHeight > 0 && T.scrollHeight > T.clientHeight, Ms = ye.direction === "rtl", Vn = Fn && (Ms ? I.offsetX <= T.offsetWidth - T.clientWidth : I.offsetX > T.clientWidth), P0 = wt && I.offsetY > T.clientHeight;
|
|
20154
|
+
if (Vn || P0)
|
|
20155
20155
|
return;
|
|
20156
20156
|
}
|
|
20157
20157
|
const K = (H = i.current.floatingContext) == null ? void 0 : H.nodeId, Z = m && Uo(m.nodesRef.current, K).some((le) => {
|
|
@@ -20173,21 +20173,21 @@ function W3(t, e) {
|
|
|
20173
20173
|
return;
|
|
20174
20174
|
}
|
|
20175
20175
|
r(!1, I, "outside-press");
|
|
20176
|
-
}),
|
|
20176
|
+
}), U = ut((I) => {
|
|
20177
20177
|
var H;
|
|
20178
20178
|
const F = () => {
|
|
20179
20179
|
var L;
|
|
20180
|
-
B(I), (L =
|
|
20180
|
+
B(I), (L = Yn(I)) == null || L.removeEventListener(c, F);
|
|
20181
20181
|
};
|
|
20182
|
-
(H =
|
|
20182
|
+
(H = Yn(I)) == null || H.addEventListener(c, F);
|
|
20183
20183
|
});
|
|
20184
20184
|
g.useEffect(() => {
|
|
20185
20185
|
if (!n || !s)
|
|
20186
20186
|
return;
|
|
20187
20187
|
i.current.__escapeKeyBubbles = w, i.current.__outsidePressBubbles = x;
|
|
20188
20188
|
let I = -1;
|
|
20189
|
-
function H(
|
|
20190
|
-
r(!1,
|
|
20189
|
+
function H(j) {
|
|
20190
|
+
r(!1, j, "ancestor-scroll");
|
|
20191
20191
|
}
|
|
20192
20192
|
function F() {
|
|
20193
20193
|
window.clearTimeout(I), S.current = !0;
|
|
@@ -20203,24 +20203,24 @@ function W3(t, e) {
|
|
|
20203
20203
|
);
|
|
20204
20204
|
}
|
|
20205
20205
|
const T = ht(o.floating);
|
|
20206
|
-
l && (T.addEventListener("keydown", E ? N : M, E), T.addEventListener("compositionstart", F), T.addEventListener("compositionend", L)), b && T.addEventListener(c, k ?
|
|
20206
|
+
l && (T.addEventListener("keydown", E ? N : M, E), T.addEventListener("compositionstart", F), T.addEventListener("compositionend", L)), b && T.addEventListener(c, k ? U : B, k);
|
|
20207
20207
|
let R = [];
|
|
20208
|
-
return f && (oe(o.domReference) && (R =
|
|
20208
|
+
return f && (oe(o.domReference) && (R = rn(o.domReference)), oe(o.floating) && (R = R.concat(rn(o.floating))), !oe(o.reference) && o.reference && o.reference.contextElement && (R = R.concat(rn(o.reference.contextElement)))), R = R.filter((j) => {
|
|
20209
20209
|
var ee;
|
|
20210
|
-
return
|
|
20211
|
-
}), R.forEach((
|
|
20212
|
-
|
|
20210
|
+
return j !== ((ee = T.defaultView) == null ? void 0 : ee.visualViewport);
|
|
20211
|
+
}), R.forEach((j) => {
|
|
20212
|
+
j.addEventListener("scroll", H, {
|
|
20213
20213
|
passive: !0
|
|
20214
20214
|
});
|
|
20215
20215
|
}), () => {
|
|
20216
|
-
l && (T.removeEventListener("keydown", E ? N : M, E), T.removeEventListener("compositionstart", F), T.removeEventListener("compositionend", L)), b && T.removeEventListener(c, k ?
|
|
20217
|
-
|
|
20216
|
+
l && (T.removeEventListener("keydown", E ? N : M, E), T.removeEventListener("compositionstart", F), T.removeEventListener("compositionend", L)), b && T.removeEventListener(c, k ? U : B, k), R.forEach((j) => {
|
|
20217
|
+
j.removeEventListener("scroll", H);
|
|
20218
20218
|
}), window.clearTimeout(I);
|
|
20219
20219
|
};
|
|
20220
|
-
}, [i, o, l, b, c, n, r, f, s, w, x, M, E, N, B, k,
|
|
20220
|
+
}, [i, o, l, b, c, n, r, f, s, w, x, M, E, N, B, k, U]), g.useEffect(() => {
|
|
20221
20221
|
i.current.insideReactTree = !1;
|
|
20222
20222
|
}, [i, b, c]);
|
|
20223
|
-
const
|
|
20223
|
+
const W = g.useMemo(() => ({
|
|
20224
20224
|
onKeyDown: M,
|
|
20225
20225
|
...u && {
|
|
20226
20226
|
[z3[d]]: (I) => {
|
|
@@ -20245,9 +20245,9 @@ function W3(t, e) {
|
|
|
20245
20245
|
}
|
|
20246
20246
|
}), [M, c, i]);
|
|
20247
20247
|
return g.useMemo(() => s ? {
|
|
20248
|
-
reference:
|
|
20248
|
+
reference: W,
|
|
20249
20249
|
floating: $
|
|
20250
|
-
} : {}, [s,
|
|
20250
|
+
} : {}, [s, W, $]);
|
|
20251
20251
|
}
|
|
20252
20252
|
function j3(t) {
|
|
20253
20253
|
const {
|
|
@@ -20394,7 +20394,7 @@ function q3(t, e) {
|
|
|
20394
20394
|
},
|
|
20395
20395
|
onFocus(h) {
|
|
20396
20396
|
if (c.current) return;
|
|
20397
|
-
const p =
|
|
20397
|
+
const p = Yn(h.nativeEvent);
|
|
20398
20398
|
if (a && oe(p)) {
|
|
20399
20399
|
if (hl() && !h.relatedTarget) {
|
|
20400
20400
|
if (!d.current && !O5(p))
|
|
@@ -20727,7 +20727,7 @@ function nx(t, e) {
|
|
|
20727
20727
|
return console.error(`Error getting node at position ${e}:`, n), null;
|
|
20728
20728
|
}
|
|
20729
20729
|
}
|
|
20730
|
-
function
|
|
20730
|
+
function hn(t) {
|
|
20731
20731
|
const { editor: e, node: n, nodePos: r } = t;
|
|
20732
20732
|
if (!e || !e.state?.doc) return null;
|
|
20733
20733
|
const o = n != null, i = bt(r);
|
|
@@ -20849,7 +20849,7 @@ const sx = ({
|
|
|
20849
20849
|
}
|
|
20850
20850
|
);
|
|
20851
20851
|
he.displayName = "Button";
|
|
20852
|
-
const
|
|
20852
|
+
const Pn = g.forwardRef(({ className: t, children: e, orientation: n = "vertical", ...r }, o) => /* @__PURE__ */ v(
|
|
20853
20853
|
"div",
|
|
20854
20854
|
{
|
|
20855
20855
|
ref: o,
|
|
@@ -20860,7 +20860,7 @@ const Bn = g.forwardRef(({ className: t, children: e, orientation: n = "vertical
|
|
|
20860
20860
|
children: e
|
|
20861
20861
|
}
|
|
20862
20862
|
));
|
|
20863
|
-
|
|
20863
|
+
Pn.displayName = "ButtonGroup";
|
|
20864
20864
|
function lf({
|
|
20865
20865
|
orientation: t = "horizontal",
|
|
20866
20866
|
size: e,
|
|
@@ -21022,7 +21022,7 @@ const af = (t, e) => {
|
|
|
21022
21022
|
}
|
|
21023
21023
|
);
|
|
21024
21024
|
Km.displayName = "Toolbar";
|
|
21025
|
-
const
|
|
21025
|
+
const yn = g.forwardRef(
|
|
21026
21026
|
({ children: t, className: e, ...n }, r) => /* @__PURE__ */ v(
|
|
21027
21027
|
"div",
|
|
21028
21028
|
{
|
|
@@ -21034,11 +21034,11 @@ const Gt = g.forwardRef(
|
|
|
21034
21034
|
}
|
|
21035
21035
|
)
|
|
21036
21036
|
);
|
|
21037
|
-
|
|
21038
|
-
const
|
|
21037
|
+
yn.displayName = "ToolbarGroup";
|
|
21038
|
+
const vn = g.forwardRef(
|
|
21039
21039
|
({ ...t }, e) => /* @__PURE__ */ v(ps, { ref: e, orientation: "vertical", decorative: !0, ...t })
|
|
21040
21040
|
);
|
|
21041
|
-
|
|
21041
|
+
vn.displayName = "ToolbarSeparator";
|
|
21042
21042
|
const qm = g.memo(
|
|
21043
21043
|
({ className: t, ...e }) => /* @__PURE__ */ v(
|
|
21044
21044
|
"svg",
|
|
@@ -21466,43 +21466,43 @@ const Gm = () => /* @__PURE__ */ P(
|
|
|
21466
21466
|
width: t.attrs.width || 300,
|
|
21467
21467
|
height: t.attrs.height || "auto"
|
|
21468
21468
|
}), l = Rt(null), a = Rt(null), c = Rt(t.attrs.width || 300), u = t.attrs.imageId || `img-${Date.now()}`;
|
|
21469
|
-
|
|
21469
|
+
An(() => {
|
|
21470
21470
|
s({
|
|
21471
21471
|
width: t.attrs.width || 300,
|
|
21472
21472
|
height: t.attrs.height || "auto"
|
|
21473
21473
|
});
|
|
21474
21474
|
}, [t.attrs.width, t.attrs.height]);
|
|
21475
21475
|
const d = Ml(
|
|
21476
|
-
(
|
|
21477
|
-
|
|
21478
|
-
const
|
|
21479
|
-
let
|
|
21480
|
-
|
|
21481
|
-
const
|
|
21482
|
-
const
|
|
21483
|
-
c.current =
|
|
21484
|
-
const
|
|
21476
|
+
(C) => {
|
|
21477
|
+
C.preventDefault(), C.stopPropagation(), o(!0);
|
|
21478
|
+
const w = C.clientX, x = typeof i.width == "number" ? i.width : 300, E = l.current;
|
|
21479
|
+
let k = 1;
|
|
21480
|
+
E && E.naturalWidth && E.naturalHeight && (k = E.naturalWidth / E.naturalHeight);
|
|
21481
|
+
const S = (N) => {
|
|
21482
|
+
const B = N.clientX - w, U = Math.max(50, x + B);
|
|
21483
|
+
c.current = U;
|
|
21484
|
+
const W = i.height === "auto" ? "auto" : Math.max(30, U / k);
|
|
21485
21485
|
s({
|
|
21486
|
-
width:
|
|
21487
|
-
height:
|
|
21488
|
-
}), a.current && (a.current.style.width = `${
|
|
21489
|
-
},
|
|
21486
|
+
width: U,
|
|
21487
|
+
height: W
|
|
21488
|
+
}), a.current && (a.current.style.width = `${U}px`, W !== "auto" && (a.current.style.height = `${W}px`));
|
|
21489
|
+
}, M = () => {
|
|
21490
21490
|
o(!1);
|
|
21491
|
-
const
|
|
21491
|
+
const N = Math.round(c.current);
|
|
21492
21492
|
e({
|
|
21493
|
-
width:
|
|
21494
|
-
}), document.removeEventListener("mousemove",
|
|
21493
|
+
width: N
|
|
21494
|
+
}), document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", M);
|
|
21495
21495
|
};
|
|
21496
|
-
document.addEventListener("mousemove",
|
|
21496
|
+
document.addEventListener("mousemove", S), document.addEventListener("mouseup", M);
|
|
21497
21497
|
},
|
|
21498
21498
|
[i, e]
|
|
21499
21499
|
), f = Ml(() => {
|
|
21500
|
-
i.height === "auto" && l.current && s((
|
|
21501
|
-
...
|
|
21500
|
+
i.height === "auto" && l.current && s((C) => ({
|
|
21501
|
+
...C,
|
|
21502
21502
|
height: "auto"
|
|
21503
21503
|
// 保持 auto,讓 CSS 處理
|
|
21504
21504
|
}));
|
|
21505
|
-
}, [i.width, i.height]), h = {
|
|
21505
|
+
}, [i.width, i.height]), h = t.attrs.textAlign || "left", p = h === "center" ? "center" : h === "right" ? "flex-end" : "flex-start", m = {
|
|
21506
21506
|
position: "relative",
|
|
21507
21507
|
display: "inline-block",
|
|
21508
21508
|
width: i.width,
|
|
@@ -21511,12 +21511,12 @@ const Gm = () => /* @__PURE__ */ P(
|
|
|
21511
21511
|
userSelect: r ? "none" : "auto",
|
|
21512
21512
|
outline: n ? "2px solid #007bff" : "none",
|
|
21513
21513
|
outlineOffset: "2px"
|
|
21514
|
-
},
|
|
21514
|
+
}, y = {
|
|
21515
21515
|
width: "100%",
|
|
21516
21516
|
height: i.height === "auto" ? "auto" : "100%",
|
|
21517
21517
|
display: "block",
|
|
21518
21518
|
objectFit: "contain"
|
|
21519
|
-
},
|
|
21519
|
+
}, b = {
|
|
21520
21520
|
position: "absolute",
|
|
21521
21521
|
bottom: -5,
|
|
21522
21522
|
right: -5,
|
|
@@ -21531,77 +21531,85 @@ const Gm = () => /* @__PURE__ */ P(
|
|
|
21531
21531
|
zIndex: 10,
|
|
21532
21532
|
boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
|
|
21533
21533
|
};
|
|
21534
|
-
return /* @__PURE__ */ v(
|
|
21535
|
-
|
|
21534
|
+
return /* @__PURE__ */ v(
|
|
21535
|
+
Pp,
|
|
21536
21536
|
{
|
|
21537
|
-
|
|
21538
|
-
|
|
21539
|
-
style:
|
|
21540
|
-
|
|
21541
|
-
|
|
21542
|
-
|
|
21543
|
-
|
|
21544
|
-
|
|
21545
|
-
|
|
21546
|
-
|
|
21547
|
-
|
|
21548
|
-
|
|
21549
|
-
|
|
21550
|
-
|
|
21551
|
-
|
|
21552
|
-
|
|
21553
|
-
|
|
21537
|
+
className: "resizable-image-wrapper",
|
|
21538
|
+
"data-drag-handle": "",
|
|
21539
|
+
style: { display: "flex", justifyContent: p },
|
|
21540
|
+
children: /* @__PURE__ */ P(
|
|
21541
|
+
"div",
|
|
21542
|
+
{
|
|
21543
|
+
ref: a,
|
|
21544
|
+
id: `resizable-image-${u}`,
|
|
21545
|
+
style: m,
|
|
21546
|
+
onMouseEnter: () => {
|
|
21547
|
+
if (a.current) {
|
|
21548
|
+
const C = a.current.querySelector(
|
|
21549
|
+
".resize-handle"
|
|
21550
|
+
);
|
|
21551
|
+
C && (C.style.opacity = "1");
|
|
21552
|
+
}
|
|
21553
|
+
},
|
|
21554
|
+
onMouseLeave: () => {
|
|
21555
|
+
if (!r && !n && a.current) {
|
|
21556
|
+
const C = a.current.querySelector(
|
|
21557
|
+
".resize-handle"
|
|
21558
|
+
);
|
|
21559
|
+
C && (C.style.opacity = "0");
|
|
21560
|
+
}
|
|
21561
|
+
},
|
|
21562
|
+
children: [
|
|
21563
|
+
/* @__PURE__ */ v(
|
|
21564
|
+
"img",
|
|
21565
|
+
{
|
|
21566
|
+
ref: l,
|
|
21567
|
+
src: t.attrs.src,
|
|
21568
|
+
alt: t.attrs.alt || "",
|
|
21569
|
+
title: t.attrs.title || "",
|
|
21570
|
+
style: y,
|
|
21571
|
+
onLoad: f,
|
|
21572
|
+
draggable: !1
|
|
21573
|
+
}
|
|
21574
|
+
),
|
|
21575
|
+
/* @__PURE__ */ v(
|
|
21576
|
+
"div",
|
|
21577
|
+
{
|
|
21578
|
+
className: "resize-handle",
|
|
21579
|
+
style: b,
|
|
21580
|
+
onMouseDown: d,
|
|
21581
|
+
title: "拖拽調整圖片大小"
|
|
21582
|
+
}
|
|
21583
|
+
),
|
|
21584
|
+
(n || r) && /* @__PURE__ */ P(
|
|
21585
|
+
"div",
|
|
21586
|
+
{
|
|
21587
|
+
style: {
|
|
21588
|
+
position: "absolute",
|
|
21589
|
+
top: -25,
|
|
21590
|
+
left: 0,
|
|
21591
|
+
background: "rgba(0, 0, 0, 0.8)",
|
|
21592
|
+
color: "white",
|
|
21593
|
+
padding: "2px 6px",
|
|
21594
|
+
borderRadius: "3px",
|
|
21595
|
+
fontSize: "12px",
|
|
21596
|
+
whiteSpace: "nowrap",
|
|
21597
|
+
zIndex: 11
|
|
21598
|
+
},
|
|
21599
|
+
children: [
|
|
21600
|
+
typeof i.width == "number" ? Math.round(i.width) : i.width,
|
|
21601
|
+
" ",
|
|
21602
|
+
"×",
|
|
21603
|
+
" ",
|
|
21604
|
+
i.height === "auto" ? "auto" : typeof i.height == "number" ? Math.round(i.height) : i.height
|
|
21605
|
+
]
|
|
21606
|
+
}
|
|
21607
|
+
)
|
|
21608
|
+
]
|
|
21554
21609
|
}
|
|
21555
|
-
|
|
21556
|
-
children: [
|
|
21557
|
-
/* @__PURE__ */ v(
|
|
21558
|
-
"img",
|
|
21559
|
-
{
|
|
21560
|
-
ref: l,
|
|
21561
|
-
src: t.attrs.src,
|
|
21562
|
-
alt: t.attrs.alt || "",
|
|
21563
|
-
title: t.attrs.title || "",
|
|
21564
|
-
style: p,
|
|
21565
|
-
onLoad: f,
|
|
21566
|
-
draggable: !1
|
|
21567
|
-
}
|
|
21568
|
-
),
|
|
21569
|
-
/* @__PURE__ */ v(
|
|
21570
|
-
"div",
|
|
21571
|
-
{
|
|
21572
|
-
className: "resize-handle",
|
|
21573
|
-
style: m,
|
|
21574
|
-
onMouseDown: d,
|
|
21575
|
-
title: "拖拽調整圖片大小"
|
|
21576
|
-
}
|
|
21577
|
-
),
|
|
21578
|
-
(n || r) && /* @__PURE__ */ P(
|
|
21579
|
-
"div",
|
|
21580
|
-
{
|
|
21581
|
-
style: {
|
|
21582
|
-
position: "absolute",
|
|
21583
|
-
top: -25,
|
|
21584
|
-
left: 0,
|
|
21585
|
-
background: "rgba(0, 0, 0, 0.8)",
|
|
21586
|
-
color: "white",
|
|
21587
|
-
padding: "2px 6px",
|
|
21588
|
-
borderRadius: "3px",
|
|
21589
|
-
fontSize: "12px",
|
|
21590
|
-
whiteSpace: "nowrap",
|
|
21591
|
-
zIndex: 11
|
|
21592
|
-
},
|
|
21593
|
-
children: [
|
|
21594
|
-
typeof i.width == "number" ? Math.round(i.width) : i.width,
|
|
21595
|
-
" ",
|
|
21596
|
-
"×",
|
|
21597
|
-
" ",
|
|
21598
|
-
i.height === "auto" ? "auto" : typeof i.height == "number" ? Math.round(i.height) : i.height
|
|
21599
|
-
]
|
|
21600
|
-
}
|
|
21601
|
-
)
|
|
21602
|
-
]
|
|
21610
|
+
)
|
|
21603
21611
|
}
|
|
21604
|
-
)
|
|
21612
|
+
);
|
|
21605
21613
|
}, bx = _e.create({
|
|
21606
21614
|
name: "resizableImage",
|
|
21607
21615
|
addOptions() {
|
|
@@ -21640,6 +21648,11 @@ const Gm = () => /* @__PURE__ */ P(
|
|
|
21640
21648
|
height: "auto"
|
|
21641
21649
|
} : {}
|
|
21642
21650
|
},
|
|
21651
|
+
textAlign: {
|
|
21652
|
+
default: "left",
|
|
21653
|
+
parseHTML: (t) => t.getAttribute("data-text-align") || "left",
|
|
21654
|
+
renderHTML: (t) => !t.textAlign || t.textAlign === "left" ? {} : { "data-text-align": t.textAlign }
|
|
21655
|
+
},
|
|
21643
21656
|
// 使用唯一 ID 來識別每張圖片
|
|
21644
21657
|
imageId: {
|
|
21645
21658
|
default: null,
|
|
@@ -22041,7 +22054,7 @@ function Jr(t, e, n = !0) {
|
|
|
22041
22054
|
try {
|
|
22042
22055
|
const o = t.view.state, i = o.selection;
|
|
22043
22056
|
if (i.empty || i instanceof z) {
|
|
22044
|
-
const s =
|
|
22057
|
+
const s = hn({
|
|
22045
22058
|
editor: t,
|
|
22046
22059
|
node: o.selection.$anchor.node(1)
|
|
22047
22060
|
})?.pos;
|
|
@@ -22063,7 +22076,7 @@ function wx(t, e) {
|
|
|
22063
22076
|
const o = t.view;
|
|
22064
22077
|
let i = o.state, s = i.tr;
|
|
22065
22078
|
if (i.selection.empty || i.selection instanceof z) {
|
|
22066
|
-
const d =
|
|
22079
|
+
const d = hn({
|
|
22067
22080
|
editor: t,
|
|
22068
22081
|
node: i.selection.$anchor.node(1)
|
|
22069
22082
|
})?.pos;
|
|
@@ -22196,8 +22209,8 @@ function Sx(...t) {
|
|
|
22196
22209
|
};
|
|
22197
22210
|
return n.scopeName = e.scopeName, n;
|
|
22198
22211
|
}
|
|
22199
|
-
var
|
|
22200
|
-
}, kx = g[" useInsertionEffect ".trim().toString()] ||
|
|
22212
|
+
var un = globalThis?.document ? g.useLayoutEffect : () => {
|
|
22213
|
+
}, kx = g[" useInsertionEffect ".trim().toString()] || un;
|
|
22201
22214
|
function Sc({
|
|
22202
22215
|
prop: t,
|
|
22203
22216
|
defaultProp: e,
|
|
@@ -22636,7 +22649,7 @@ var Jx = g[" useId ".trim().toString()] || (() => {
|
|
|
22636
22649
|
}), Zx = 0;
|
|
22637
22650
|
function Fi(t) {
|
|
22638
22651
|
const [e, n] = g.useState(Jx());
|
|
22639
|
-
return
|
|
22652
|
+
return un(() => {
|
|
22640
22653
|
n((r) => r ?? String(Zx++));
|
|
22641
22654
|
}, [t]), t || (e ? `radix-${e}` : "");
|
|
22642
22655
|
}
|
|
@@ -22659,7 +22672,7 @@ f1.displayName = Yx;
|
|
|
22659
22672
|
var Xx = f1;
|
|
22660
22673
|
function Qx(t) {
|
|
22661
22674
|
const [e, n] = g.useState(void 0);
|
|
22662
|
-
return
|
|
22675
|
+
return un(() => {
|
|
22663
22676
|
if (t) {
|
|
22664
22677
|
n({ width: t.offsetWidth, height: t.offsetHeight });
|
|
22665
22678
|
const r = new ResizeObserver((o) => {
|
|
@@ -22711,11 +22724,11 @@ var Tc = "PopperContent", [tS, nS] = h1(Tc), v1 = g.forwardRef(
|
|
|
22711
22724
|
updatePositionStrategy: h = "optimized",
|
|
22712
22725
|
onPlaced: p,
|
|
22713
22726
|
...m
|
|
22714
|
-
} = t, y = p1(Tc, n), [b, C] = g.useState(null), w = Ne(e, (Y) => C(Y)), [x, E] = g.useState(null), k = Qx(x), S = k?.width ?? 0, M = k?.height ?? 0, N = r + (i !== "center" ? "-" + i : ""), B = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u },
|
|
22727
|
+
} = t, y = p1(Tc, n), [b, C] = g.useState(null), w = Ne(e, (Y) => C(Y)), [x, E] = g.useState(null), k = Qx(x), S = k?.width ?? 0, M = k?.height ?? 0, N = r + (i !== "center" ? "-" + i : ""), B = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, U = Array.isArray(c) ? c : [c], W = U.length > 0, $ = {
|
|
22715
22728
|
padding: B,
|
|
22716
|
-
boundary:
|
|
22729
|
+
boundary: U.filter(oS),
|
|
22717
22730
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
22718
|
-
altBoundary:
|
|
22731
|
+
altBoundary: W
|
|
22719
22732
|
}, { refs: I, floatingStyles: H, placement: F, isPositioned: L, middlewareData: T } = Dm({
|
|
22720
22733
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
22721
22734
|
strategy: "fixed",
|
|
@@ -22738,20 +22751,20 @@ var Tc = "PopperContent", [tS, nS] = h1(Tc), v1 = g.forwardRef(
|
|
|
22738
22751
|
k3({
|
|
22739
22752
|
...$,
|
|
22740
22753
|
apply: ({ elements: Y, rects: te, availableWidth: Ge, availableHeight: wt }) => {
|
|
22741
|
-
const { width:
|
|
22742
|
-
|
|
22754
|
+
const { width: Fn, height: Ms } = te.reference, Vn = Y.floating.style;
|
|
22755
|
+
Vn.setProperty("--radix-popper-available-width", `${Ge}px`), Vn.setProperty("--radix-popper-available-height", `${wt}px`), Vn.setProperty("--radix-popper-anchor-width", `${Fn}px`), Vn.setProperty("--radix-popper-anchor-height", `${Ms}px`);
|
|
22743
22756
|
}
|
|
22744
22757
|
}),
|
|
22745
22758
|
x && M3({ element: x, padding: l }),
|
|
22746
22759
|
iS({ arrowWidth: S, arrowHeight: M }),
|
|
22747
22760
|
f && E3({ strategy: "referenceHidden", ...$ })
|
|
22748
22761
|
]
|
|
22749
|
-
}), [R,
|
|
22750
|
-
|
|
22762
|
+
}), [R, j] = w1(F), ee = Bt(p);
|
|
22763
|
+
un(() => {
|
|
22751
22764
|
L && ee?.();
|
|
22752
22765
|
}, [L, ee]);
|
|
22753
22766
|
const K = T.arrow?.x, Z = T.arrow?.y, qe = T.arrow?.centerOffset !== 0, [le, ye] = g.useState();
|
|
22754
|
-
return
|
|
22767
|
+
return un(() => {
|
|
22755
22768
|
b && ye(window.getComputedStyle(b).zIndex);
|
|
22756
22769
|
}, [b]), /* @__PURE__ */ v(
|
|
22757
22770
|
"div",
|
|
@@ -22790,7 +22803,7 @@ var Tc = "PopperContent", [tS, nS] = h1(Tc), v1 = g.forwardRef(
|
|
|
22790
22803
|
Ae.div,
|
|
22791
22804
|
{
|
|
22792
22805
|
"data-side": R,
|
|
22793
|
-
"data-align":
|
|
22806
|
+
"data-align": j,
|
|
22794
22807
|
...m,
|
|
22795
22808
|
ref: w,
|
|
22796
22809
|
style: {
|
|
@@ -22877,7 +22890,7 @@ function w1(t) {
|
|
|
22877
22890
|
}
|
|
22878
22891
|
var x1 = m1, Ac = y1, S1 = v1, k1 = C1, sS = "Portal", Rc = g.forwardRef((t, e) => {
|
|
22879
22892
|
const { container: n, ...r } = t, [o, i] = g.useState(!1);
|
|
22880
|
-
|
|
22893
|
+
un(() => i(!0), []);
|
|
22881
22894
|
const s = n || o && globalThis?.document?.body;
|
|
22882
22895
|
return s ? Mf.createPortal(/* @__PURE__ */ v(Ae.div, { ...r, ref: e }), s) : null;
|
|
22883
22896
|
});
|
|
@@ -22885,11 +22898,11 @@ Rc.displayName = sS;
|
|
|
22885
22898
|
function lS(t, e) {
|
|
22886
22899
|
return g.useReducer((n, r) => e[n][r] ?? n, t);
|
|
22887
22900
|
}
|
|
22888
|
-
var
|
|
22901
|
+
var _n = (t) => {
|
|
22889
22902
|
const { present: e, children: n } = t, r = aS(e), o = typeof n == "function" ? n({ present: r.isPresent }) : g.Children.only(n), i = Ne(r.ref, cS(o));
|
|
22890
22903
|
return typeof n == "function" || r.isPresent ? g.cloneElement(o, { ref: i }) : null;
|
|
22891
22904
|
};
|
|
22892
|
-
|
|
22905
|
+
_n.displayName = "Presence";
|
|
22893
22906
|
function aS(t) {
|
|
22894
22907
|
const [e, n] = g.useState(), r = g.useRef(null), o = g.useRef(t), i = g.useRef("none"), s = t ? "mounted" : "unmounted", [l, a] = lS(s, {
|
|
22895
22908
|
mounted: {
|
|
@@ -22907,13 +22920,13 @@ function aS(t) {
|
|
|
22907
22920
|
return g.useEffect(() => {
|
|
22908
22921
|
const c = Io(r.current);
|
|
22909
22922
|
i.current = l === "mounted" ? c : "none";
|
|
22910
|
-
}, [l]),
|
|
22923
|
+
}, [l]), un(() => {
|
|
22911
22924
|
const c = r.current, u = o.current;
|
|
22912
22925
|
if (u !== t) {
|
|
22913
22926
|
const f = i.current, h = Io(c);
|
|
22914
22927
|
t ? a("MOUNT") : h === "none" || c?.display === "none" ? a("UNMOUNT") : a(u && f !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = t;
|
|
22915
22928
|
}
|
|
22916
|
-
}, [t, a]),
|
|
22929
|
+
}, [t, a]), un(() => {
|
|
22917
22930
|
if (e) {
|
|
22918
22931
|
let c;
|
|
22919
22932
|
const u = e.ownerDocument.defaultView ?? window, d = (h) => {
|
|
@@ -23012,7 +23025,7 @@ var mS = g.forwardRef((t, e) => {
|
|
|
23012
23025
|
if (M.target === M.currentTarget && N && !b) {
|
|
23013
23026
|
const B = new CustomEvent(vl, uS);
|
|
23014
23027
|
if (M.currentTarget.dispatchEvent(B), !B.defaultPrevented) {
|
|
23015
|
-
const
|
|
23028
|
+
const U = x().filter((F) => F.focusable), W = U.find((F) => F.active), $ = U.find((F) => F.id === m), H = [W, $, ...U].filter(
|
|
23016
23029
|
Boolean
|
|
23017
23030
|
).map((F) => F.ref.current);
|
|
23018
23031
|
O1(H, u);
|
|
@@ -23115,7 +23128,7 @@ var CS = T1, wS = R1, xS = function(t) {
|
|
|
23115
23128
|
return null;
|
|
23116
23129
|
var e = Array.isArray(t) ? t[0] : t;
|
|
23117
23130
|
return e.ownerDocument.body;
|
|
23118
|
-
},
|
|
23131
|
+
}, Wn = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Do = {}, bl = 0, N1 = function(t) {
|
|
23119
23132
|
return t && (t.host || N1(t.parentNode));
|
|
23120
23133
|
}, SS = function(t, e) {
|
|
23121
23134
|
return e.map(function(n) {
|
|
@@ -23139,8 +23152,8 @@ var CS = T1, wS = R1, xS = function(t) {
|
|
|
23139
23152
|
u(f);
|
|
23140
23153
|
else
|
|
23141
23154
|
try {
|
|
23142
|
-
var h = f.getAttribute(r), p = h !== null && h !== "false", m = (
|
|
23143
|
-
|
|
23155
|
+
var h = f.getAttribute(r), p = h !== null && h !== "false", m = (Wn.get(f) || 0) + 1, y = (i.get(f) || 0) + 1;
|
|
23156
|
+
Wn.set(f, m), i.set(f, y), s.push(f), m === 1 && p && Lo.set(f, !0), y === 1 && f.setAttribute(n, "true"), p || f.setAttribute(r, "true");
|
|
23144
23157
|
} catch (b) {
|
|
23145
23158
|
console.error("aria-hidden: cannot operate on ", f, b);
|
|
23146
23159
|
}
|
|
@@ -23148,9 +23161,9 @@ var CS = T1, wS = R1, xS = function(t) {
|
|
|
23148
23161
|
};
|
|
23149
23162
|
return u(e), l.clear(), bl++, function() {
|
|
23150
23163
|
s.forEach(function(d) {
|
|
23151
|
-
var f =
|
|
23152
|
-
|
|
23153
|
-
}), bl--, bl || (
|
|
23164
|
+
var f = Wn.get(d) - 1, h = i.get(d) - 1;
|
|
23165
|
+
Wn.set(d, f), i.set(d, h), f || (Lo.has(d) || d.removeAttribute(r), Lo.delete(d)), h || d.removeAttribute(n);
|
|
23166
|
+
}), bl--, bl || (Wn = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Do = {});
|
|
23154
23167
|
};
|
|
23155
23168
|
}, I1 = function(t, e, n) {
|
|
23156
23169
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -23461,7 +23474,7 @@ if (typeof window < "u")
|
|
|
23461
23474
|
} catch {
|
|
23462
23475
|
ga = !1;
|
|
23463
23476
|
}
|
|
23464
|
-
var
|
|
23477
|
+
var jn = ga ? { passive: !1 } : !1, GS = function(t) {
|
|
23465
23478
|
return t.tagName === "TEXTAREA";
|
|
23466
23479
|
}, _1 = function(t, e) {
|
|
23467
23480
|
if (!(t instanceof Element))
|
|
@@ -23537,7 +23550,7 @@ var Kn = ga ? { passive: !1 } : !1, GS = function(t) {
|
|
|
23537
23550
|
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
23538
23551
|
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
23539
23552
|
`);
|
|
23540
|
-
}, rk = 0,
|
|
23553
|
+
}, rk = 0, Kn = [];
|
|
23541
23554
|
function ok(t) {
|
|
23542
23555
|
var e = g.useRef([]), n = g.useRef([0, 0]), r = g.useRef(), o = g.useState(rk++)[0], i = g.useState(B1)[0], s = g.useRef(t);
|
|
23543
23556
|
g.useEffect(function() {
|
|
@@ -23572,7 +23585,7 @@ function ok(t) {
|
|
|
23572
23585
|
return ek(N, y, m, N === "h" ? w : x);
|
|
23573
23586
|
}, []), a = g.useCallback(function(m) {
|
|
23574
23587
|
var y = m;
|
|
23575
|
-
if (!(!
|
|
23588
|
+
if (!(!Kn.length || Kn[Kn.length - 1] !== i)) {
|
|
23576
23589
|
var b = "deltaY" in y ? Cf(y) : Bo(y), C = e.current.filter(function(E) {
|
|
23577
23590
|
return E.name === y.type && (E.target === y.target || y.target === E.shadowParent) && tk(E.delta, b);
|
|
23578
23591
|
})[0];
|
|
@@ -23602,14 +23615,14 @@ function ok(t) {
|
|
|
23602
23615
|
c(m.type, Bo(m), m.target, l(m, t.lockRef.current));
|
|
23603
23616
|
}, []);
|
|
23604
23617
|
g.useEffect(function() {
|
|
23605
|
-
return
|
|
23618
|
+
return Kn.push(i), t.setCallbacks({
|
|
23606
23619
|
onScrollCapture: d,
|
|
23607
23620
|
onWheelCapture: d,
|
|
23608
23621
|
onTouchMoveCapture: f
|
|
23609
|
-
}), document.addEventListener("wheel", a,
|
|
23610
|
-
|
|
23622
|
+
}), document.addEventListener("wheel", a, jn), document.addEventListener("touchmove", a, jn), document.addEventListener("touchstart", u, jn), function() {
|
|
23623
|
+
Kn = Kn.filter(function(m) {
|
|
23611
23624
|
return m !== i;
|
|
23612
|
-
}), document.removeEventListener("wheel", a,
|
|
23625
|
+
}), document.removeEventListener("wheel", a, jn), document.removeEventListener("touchmove", a, jn), document.removeEventListener("touchstart", u, jn);
|
|
23613
23626
|
};
|
|
23614
23627
|
}, []);
|
|
23615
23628
|
var h = t.removeScrollBar, p = t.inert;
|
|
@@ -23636,11 +23649,11 @@ var ya = ["Enter", " "], lk = ["ArrowDown", "PageUp", "Home"], F1 = ["ArrowUp",
|
|
|
23636
23649
|
}, uk = {
|
|
23637
23650
|
ltr: ["ArrowLeft"],
|
|
23638
23651
|
rtl: ["ArrowRight"]
|
|
23639
|
-
}, ao = "Menu", [Yr, dk, fk] = s1(ao), [
|
|
23652
|
+
}, ao = "Menu", [Yr, dk, fk] = s1(ao), [Hn, V1] = pr(ao, [
|
|
23640
23653
|
fk,
|
|
23641
23654
|
gs,
|
|
23642
23655
|
M1
|
|
23643
|
-
]), vs = gs(), z1 = M1(), [hk,
|
|
23656
|
+
]), vs = gs(), z1 = M1(), [hk, $n] = Hn(ao), [pk, co] = Hn(ao), U1 = (t) => {
|
|
23644
23657
|
const { __scopeMenu: e, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = t, l = vs(e), [a, c] = g.useState(null), u = g.useRef(!1), d = Bt(i), f = l1(o);
|
|
23645
23658
|
return g.useEffect(() => {
|
|
23646
23659
|
const h = () => {
|
|
@@ -23679,21 +23692,21 @@ var mk = "MenuAnchor", Nc = g.forwardRef(
|
|
|
23679
23692
|
}
|
|
23680
23693
|
);
|
|
23681
23694
|
Nc.displayName = mk;
|
|
23682
|
-
var Ic = "MenuPortal", [gk, W1] =
|
|
23695
|
+
var Ic = "MenuPortal", [gk, W1] = Hn(Ic, {
|
|
23683
23696
|
forceMount: void 0
|
|
23684
23697
|
}), j1 = (t) => {
|
|
23685
|
-
const { __scopeMenu: e, forceMount: n, children: r, container: o } = t, i =
|
|
23686
|
-
return /* @__PURE__ */ v(gk, { scope: e, forceMount: n, children: /* @__PURE__ */ v(
|
|
23698
|
+
const { __scopeMenu: e, forceMount: n, children: r, container: o } = t, i = $n(Ic, e);
|
|
23699
|
+
return /* @__PURE__ */ v(gk, { scope: e, forceMount: n, children: /* @__PURE__ */ v(_n, { present: n || i.open, children: /* @__PURE__ */ v(Rc, { asChild: !0, container: o, children: r }) }) });
|
|
23687
23700
|
};
|
|
23688
23701
|
j1.displayName = Ic;
|
|
23689
|
-
var nt = "MenuContent", [yk, Lc] =
|
|
23702
|
+
var nt = "MenuContent", [yk, Lc] = Hn(nt), K1 = g.forwardRef(
|
|
23690
23703
|
(t, e) => {
|
|
23691
|
-
const n = W1(nt, t.__scopeMenu), { forceMount: r = n.forceMount, ...o } = t, i =
|
|
23692
|
-
return /* @__PURE__ */ v(Yr.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(
|
|
23704
|
+
const n = W1(nt, t.__scopeMenu), { forceMount: r = n.forceMount, ...o } = t, i = $n(nt, t.__scopeMenu), s = co(nt, t.__scopeMenu);
|
|
23705
|
+
return /* @__PURE__ */ v(Yr.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(_n, { present: r || i.open, children: /* @__PURE__ */ v(Yr.Slot, { scope: t.__scopeMenu, children: s.modal ? /* @__PURE__ */ v(vk, { ...o, ref: e }) : /* @__PURE__ */ v(bk, { ...o, ref: e }) }) }) });
|
|
23693
23706
|
}
|
|
23694
23707
|
), vk = g.forwardRef(
|
|
23695
23708
|
(t, e) => {
|
|
23696
|
-
const n =
|
|
23709
|
+
const n = $n(nt, t.__scopeMenu), r = g.useRef(null), o = Ne(e, r);
|
|
23697
23710
|
return g.useEffect(() => {
|
|
23698
23711
|
const i = r.current;
|
|
23699
23712
|
if (i) return I1(i);
|
|
@@ -23715,7 +23728,7 @@ var nt = "MenuContent", [yk, Lc] = $n(nt), K1 = g.forwardRef(
|
|
|
23715
23728
|
);
|
|
23716
23729
|
}
|
|
23717
23730
|
), bk = g.forwardRef((t, e) => {
|
|
23718
|
-
const n =
|
|
23731
|
+
const n = $n(nt, t.__scopeMenu);
|
|
23719
23732
|
return /* @__PURE__ */ v(
|
|
23720
23733
|
Dc,
|
|
23721
23734
|
{
|
|
@@ -23744,14 +23757,14 @@ var nt = "MenuContent", [yk, Lc] = $n(nt), K1 = g.forwardRef(
|
|
|
23744
23757
|
onDismiss: h,
|
|
23745
23758
|
disableOutsideScroll: p,
|
|
23746
23759
|
...m
|
|
23747
|
-
} = t, y =
|
|
23748
|
-
const
|
|
23760
|
+
} = t, y = $n(nt, n), b = co(nt, n), C = vs(n), w = z1(n), x = dk(n), [E, k] = g.useState(null), S = g.useRef(null), M = Ne(e, S, y.onContentChange), N = g.useRef(0), B = g.useRef(""), U = g.useRef(0), W = g.useRef(null), $ = g.useRef("right"), I = g.useRef(0), H = p ? Oc : g.Fragment, F = p ? { as: Ck, allowPinchZoom: !0 } : void 0, L = (R) => {
|
|
23761
|
+
const j = B.current + R, ee = x().filter((Y) => !Y.disabled), K = document.activeElement, Z = ee.find((Y) => Y.ref.current === K)?.textValue, qe = ee.map((Y) => Y.textValue), le = Ik(qe, j, Z), ye = ee.find((Y) => Y.textValue === le)?.ref.current;
|
|
23749
23762
|
(function Y(te) {
|
|
23750
23763
|
B.current = te, window.clearTimeout(N.current), te !== "" && (N.current = window.setTimeout(() => Y(""), 1e3));
|
|
23751
|
-
})(
|
|
23764
|
+
})(j), ye && setTimeout(() => ye.focus());
|
|
23752
23765
|
};
|
|
23753
23766
|
g.useEffect(() => () => window.clearTimeout(N.current), []), u1();
|
|
23754
|
-
const T = g.useCallback((R) => $.current ===
|
|
23767
|
+
const T = g.useCallback((R) => $.current === W.current?.side && Dk(R, W.current?.area), []);
|
|
23755
23768
|
return /* @__PURE__ */ v(
|
|
23756
23769
|
yk,
|
|
23757
23770
|
{
|
|
@@ -23775,9 +23788,9 @@ var nt = "MenuContent", [yk, Lc] = $n(nt), K1 = g.forwardRef(
|
|
|
23775
23788
|
},
|
|
23776
23789
|
[T]
|
|
23777
23790
|
),
|
|
23778
|
-
pointerGraceTimerRef:
|
|
23791
|
+
pointerGraceTimerRef: U,
|
|
23779
23792
|
onPointerGraceIntentChange: g.useCallback((R) => {
|
|
23780
|
-
|
|
23793
|
+
W.current = R;
|
|
23781
23794
|
}, []),
|
|
23782
23795
|
children: /* @__PURE__ */ v(H, { ...F, children: /* @__PURE__ */ v(
|
|
23783
23796
|
Ec,
|
|
@@ -23839,8 +23852,8 @@ var nt = "MenuContent", [yk, Lc] = $n(nt), K1 = g.forwardRef(
|
|
|
23839
23852
|
onPointerMove: J(
|
|
23840
23853
|
t.onPointerMove,
|
|
23841
23854
|
Xr((R) => {
|
|
23842
|
-
const
|
|
23843
|
-
if (R.currentTarget.contains(
|
|
23855
|
+
const j = R.target, ee = I.current !== R.clientX;
|
|
23856
|
+
if (R.currentTarget.contains(j) && ee) {
|
|
23844
23857
|
const K = R.clientX > I.current ? "right" : "left";
|
|
23845
23858
|
$.current = K, I.current = R.clientX;
|
|
23846
23859
|
}
|
|
@@ -23963,7 +23976,7 @@ var G1 = g.forwardRef(
|
|
|
23963
23976
|
}
|
|
23964
23977
|
);
|
|
23965
23978
|
J1.displayName = Sk;
|
|
23966
|
-
var Z1 = "MenuRadioGroup", [kk, Ek] =
|
|
23979
|
+
var Z1 = "MenuRadioGroup", [kk, Ek] = Hn(
|
|
23967
23980
|
Z1,
|
|
23968
23981
|
{ value: void 0, onValueChange: () => {
|
|
23969
23982
|
} }
|
|
@@ -23995,14 +24008,14 @@ var X1 = "MenuRadioItem", Q1 = g.forwardRef(
|
|
|
23995
24008
|
}
|
|
23996
24009
|
);
|
|
23997
24010
|
Q1.displayName = X1;
|
|
23998
|
-
var Bc = "MenuItemIndicator", [eg, Mk] =
|
|
24011
|
+
var Bc = "MenuItemIndicator", [eg, Mk] = Hn(
|
|
23999
24012
|
Bc,
|
|
24000
24013
|
{ checked: !1 }
|
|
24001
24014
|
), tg = g.forwardRef(
|
|
24002
24015
|
(t, e) => {
|
|
24003
24016
|
const { __scopeMenu: n, forceMount: r, ...o } = t, i = Mk(Bc, n);
|
|
24004
24017
|
return /* @__PURE__ */ v(
|
|
24005
|
-
|
|
24018
|
+
_n,
|
|
24006
24019
|
{
|
|
24007
24020
|
present: r || zi(i.checked) || i.checked === !0,
|
|
24008
24021
|
children: /* @__PURE__ */ v(
|
|
@@ -24040,9 +24053,9 @@ var Ak = "MenuArrow", rg = g.forwardRef(
|
|
|
24040
24053
|
}
|
|
24041
24054
|
);
|
|
24042
24055
|
rg.displayName = Ak;
|
|
24043
|
-
var Rk = "MenuSub", [kM, og] =
|
|
24056
|
+
var Rk = "MenuSub", [kM, og] = Hn(Rk), wr = "MenuSubTrigger", ig = g.forwardRef(
|
|
24044
24057
|
(t, e) => {
|
|
24045
|
-
const n =
|
|
24058
|
+
const n = $n(wr, t.__scopeMenu), r = co(wr, t.__scopeMenu), o = og(wr, t.__scopeMenu), i = Lc(wr, t.__scopeMenu), s = g.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: a } = i, c = { __scopeMenu: t.__scopeMenu }, u = g.useCallback(() => {
|
|
24046
24059
|
s.current && window.clearTimeout(s.current), s.current = null;
|
|
24047
24060
|
}, []);
|
|
24048
24061
|
return g.useEffect(() => u, [u]), g.useEffect(() => {
|
|
@@ -24110,8 +24123,8 @@ var Rk = "MenuSub", [kM, og] = $n(Rk), wr = "MenuSubTrigger", ig = g.forwardRef(
|
|
|
24110
24123
|
ig.displayName = wr;
|
|
24111
24124
|
var sg = "MenuSubContent", lg = g.forwardRef(
|
|
24112
24125
|
(t, e) => {
|
|
24113
|
-
const n = W1(nt, t.__scopeMenu), { forceMount: r = n.forceMount, ...o } = t, i =
|
|
24114
|
-
return /* @__PURE__ */ v(Yr.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(
|
|
24126
|
+
const n = W1(nt, t.__scopeMenu), { forceMount: r = n.forceMount, ...o } = t, i = $n(nt, t.__scopeMenu), s = co(nt, t.__scopeMenu), l = og(sg, t.__scopeMenu), a = g.useRef(null), c = Ne(e, a);
|
|
24127
|
+
return /* @__PURE__ */ v(Yr.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(_n, { present: r || i.open, children: /* @__PURE__ */ v(Yr.Slot, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(
|
|
24115
24128
|
Dc,
|
|
24116
24129
|
{
|
|
24117
24130
|
id: l.contentId,
|
|
@@ -24471,7 +24484,7 @@ const kg = g.forwardRef(
|
|
|
24471
24484
|
]
|
|
24472
24485
|
}
|
|
24473
24486
|
) }),
|
|
24474
|
-
/* @__PURE__ */ v($c, { align: "start", portal: r, children: /* @__PURE__ */ v(uo, { children: /* @__PURE__ */ v(fo, { children: /* @__PURE__ */ v(
|
|
24487
|
+
/* @__PURE__ */ v($c, { align: "start", portal: r, children: /* @__PURE__ */ v(uo, { children: /* @__PURE__ */ v(fo, { children: /* @__PURE__ */ v(Pn, { children: e.map((m) => /* @__PURE__ */ v(Sg, { asChild: !0, children: /* @__PURE__ */ v(
|
|
24475
24488
|
Jm,
|
|
24476
24489
|
{
|
|
24477
24490
|
editor: l,
|
|
@@ -24614,7 +24627,7 @@ const Tg = ["shift", "alt", "meta", "mod", "ctrl", "control"], R9 = {
|
|
|
24614
24627
|
ControlLeft: "ctrl",
|
|
24615
24628
|
ControlRight: "ctrl"
|
|
24616
24629
|
};
|
|
24617
|
-
function
|
|
24630
|
+
function on(t) {
|
|
24618
24631
|
return (R9[t.trim()] || t.trim()).toLowerCase().replace(/key|digit|numpad/, "");
|
|
24619
24632
|
}
|
|
24620
24633
|
function Ag(t) {
|
|
@@ -24625,7 +24638,7 @@ function Sl(t, e = ",") {
|
|
|
24625
24638
|
}
|
|
24626
24639
|
function kl(t, e = "+", n = ">", r = !1, o) {
|
|
24627
24640
|
let i = [], s = !1;
|
|
24628
|
-
t = t.trim(), t.includes(n) ? (s = !0, i = t.toLocaleLowerCase().split(n).map((c) =>
|
|
24641
|
+
t = t.trim(), t.includes(n) ? (s = !0, i = t.toLocaleLowerCase().split(n).map((c) => on(c))) : i = t.toLocaleLowerCase().split(e).map((c) => on(c));
|
|
24629
24642
|
const l = {
|
|
24630
24643
|
alt: i.includes("alt"),
|
|
24631
24644
|
ctrl: i.includes("ctrl") || i.includes("control"),
|
|
@@ -24643,9 +24656,9 @@ function kl(t, e = "+", n = ">", r = !1, o) {
|
|
|
24643
24656
|
};
|
|
24644
24657
|
}
|
|
24645
24658
|
typeof document < "u" && (document.addEventListener("keydown", (t) => {
|
|
24646
|
-
t.code !== void 0 && Rg([
|
|
24659
|
+
t.code !== void 0 && Rg([on(t.code)]);
|
|
24647
24660
|
}), document.addEventListener("keyup", (t) => {
|
|
24648
|
-
t.code !== void 0 && Og([
|
|
24661
|
+
t.code !== void 0 && Og([on(t.code)]);
|
|
24649
24662
|
})), typeof window < "u" && (window.addEventListener("blur", () => {
|
|
24650
24663
|
At.clear();
|
|
24651
24664
|
}), window.addEventListener("contextmenu", () => {
|
|
@@ -24705,7 +24718,7 @@ function B9(t, e) {
|
|
|
24705
24718
|
), !0) : e ? t.some((n) => e.includes(n)) || t.includes("*") : !0;
|
|
24706
24719
|
}
|
|
24707
24720
|
const _9 = (t, e, n = !1) => {
|
|
24708
|
-
const { alt: r, meta: o, mod: i, shift: s, ctrl: l, keys: a, useKey: c } = e, { code: u, key: d, ctrlKey: f, metaKey: h, shiftKey: p, altKey: m } = t, y =
|
|
24721
|
+
const { alt: r, meta: o, mod: i, shift: s, ctrl: l, keys: a, useKey: c } = e, { code: u, key: d, ctrlKey: f, metaKey: h, shiftKey: p, altKey: m } = t, y = on(u);
|
|
24709
24722
|
if (c && a?.length === 1 && a.includes(d))
|
|
24710
24723
|
return !0;
|
|
24711
24724
|
if (!a?.includes(y) && !["ctrl", "control", "unknown", "meta", "alt", "shift", "os"].includes(y))
|
|
@@ -24742,7 +24755,7 @@ function z9(t) {
|
|
|
24742
24755
|
}
|
|
24743
24756
|
const Sf = (t) => {
|
|
24744
24757
|
t.stopPropagation(), t.preventDefault(), t.stopImmediatePropagation();
|
|
24745
|
-
}, U9 = typeof window < "u" ? ji :
|
|
24758
|
+
}, U9 = typeof window < "u" ? ji : An;
|
|
24746
24759
|
function Lg(t, e, n, r) {
|
|
24747
24760
|
const o = Rt(null), i = Rt(!1), s = Array.isArray(n) ? Array.isArray(r) ? void 0 : r : n, l = Vc(t) ? t.join(s?.delimiter) : t, a = Array.isArray(n) ? n : Array.isArray(r) ? r : void 0, c = Ml(e, a ?? []), u = Rt(c);
|
|
24748
24761
|
a ? u.current = c : u.current = e;
|
|
@@ -24778,7 +24791,7 @@ function Lg(t, e, n, r) {
|
|
|
24778
24791
|
m = setTimeout(() => {
|
|
24779
24792
|
p = [];
|
|
24780
24793
|
}, d?.sequenceTimeoutMs ?? 1e3);
|
|
24781
|
-
const M = S.useKey ? x.key :
|
|
24794
|
+
const M = S.useKey ? x.key : on(x.code);
|
|
24782
24795
|
if (Ag(M.toLowerCase()))
|
|
24783
24796
|
return;
|
|
24784
24797
|
p.push(M);
|
|
@@ -24800,9 +24813,9 @@ function Lg(t, e, n, r) {
|
|
|
24800
24813
|
});
|
|
24801
24814
|
}
|
|
24802
24815
|
}, b = (x) => {
|
|
24803
|
-
x.code !== void 0 && (Rg(
|
|
24816
|
+
x.code !== void 0 && (Rg(on(x.code)), (d?.keydown === void 0 && d?.keyup !== !0 || d?.keydown) && y(x));
|
|
24804
24817
|
}, C = (x) => {
|
|
24805
|
-
x.code !== void 0 && (Og(
|
|
24818
|
+
x.code !== void 0 && (Og(on(x.code)), i.current = !1, d?.keyup && y(x, !0));
|
|
24806
24819
|
}, w = o.current || s?.document || document;
|
|
24807
24820
|
return w.addEventListener("keyup", C, s?.eventListenerOptions), w.addEventListener("keydown", b, s?.eventListenerOptions), h && Sl(l, d?.delimiter).forEach(
|
|
24808
24821
|
(x) => h.addHotkey(
|
|
@@ -25220,7 +25233,7 @@ function xs(t, e, n = !0) {
|
|
|
25220
25233
|
try {
|
|
25221
25234
|
const o = t.view.state, i = o.selection;
|
|
25222
25235
|
if (i.empty || i instanceof z) {
|
|
25223
|
-
const s =
|
|
25236
|
+
const s = hn({
|
|
25224
25237
|
editor: t,
|
|
25225
25238
|
node: o.selection.$anchor.node(1)
|
|
25226
25239
|
})?.pos;
|
|
@@ -25250,7 +25263,7 @@ function Z9(t, e) {
|
|
|
25250
25263
|
const n = t.view;
|
|
25251
25264
|
let r = n.state, o = r.tr;
|
|
25252
25265
|
if (r.selection.empty || r.selection instanceof z) {
|
|
25253
|
-
const l =
|
|
25266
|
+
const l = hn({
|
|
25254
25267
|
editor: t,
|
|
25255
25268
|
node: r.selection.$anchor.node(1)
|
|
25256
25269
|
})?.pos;
|
|
@@ -25423,7 +25436,7 @@ function sE({
|
|
|
25423
25436
|
]
|
|
25424
25437
|
}
|
|
25425
25438
|
) }),
|
|
25426
|
-
/* @__PURE__ */ v($c, { align: "start", portal: o, children: /* @__PURE__ */ v(uo, { children: /* @__PURE__ */ v(fo, { children: /* @__PURE__ */ v(
|
|
25439
|
+
/* @__PURE__ */ v($c, { align: "start", portal: o, children: /* @__PURE__ */ v(uo, { children: /* @__PURE__ */ v(fo, { children: /* @__PURE__ */ v(Pn, { children: c.map((m) => /* @__PURE__ */ v(Sg, { asChild: !0, children: /* @__PURE__ */ v(
|
|
25427
25440
|
Pg,
|
|
25428
25441
|
{
|
|
25429
25442
|
editor: s,
|
|
@@ -25556,7 +25569,7 @@ function Kc(t, e = !0) {
|
|
|
25556
25569
|
try {
|
|
25557
25570
|
const r = t.view.state, o = r.selection;
|
|
25558
25571
|
if (o.empty || o instanceof z) {
|
|
25559
|
-
const i =
|
|
25572
|
+
const i = hn({
|
|
25560
25573
|
editor: t,
|
|
25561
25574
|
node: r.selection.$anchor.node(1)
|
|
25562
25575
|
})?.pos;
|
|
@@ -25573,7 +25586,7 @@ function aE(t) {
|
|
|
25573
25586
|
const e = t.view;
|
|
25574
25587
|
let n = e.state, r = n.tr;
|
|
25575
25588
|
if (n.selection.empty || n.selection instanceof z) {
|
|
25576
|
-
const l =
|
|
25589
|
+
const l = hn({
|
|
25577
25590
|
editor: t,
|
|
25578
25591
|
node: n.selection.$anchor.node(1)
|
|
25579
25592
|
})?.pos;
|
|
@@ -25738,7 +25751,7 @@ function qc(t, e = !0) {
|
|
|
25738
25751
|
try {
|
|
25739
25752
|
const r = t.view.state, o = r.selection;
|
|
25740
25753
|
if (o.empty || o instanceof z) {
|
|
25741
|
-
const i =
|
|
25754
|
+
const i = hn({
|
|
25742
25755
|
editor: t,
|
|
25743
25756
|
node: r.selection.$anchor.node(1)
|
|
25744
25757
|
})?.pos;
|
|
@@ -25755,7 +25768,7 @@ function fE(t) {
|
|
|
25755
25768
|
const e = t.view;
|
|
25756
25769
|
let n = e.state, r = n.tr;
|
|
25757
25770
|
if (n.selection.empty || n.selection instanceof z) {
|
|
25758
|
-
const l =
|
|
25771
|
+
const l = hn({
|
|
25759
25772
|
editor: t,
|
|
25760
25773
|
node: n.selection.$anchor.node(1)
|
|
25761
25774
|
})?.pos;
|
|
@@ -25857,7 +25870,7 @@ const Ss = g.memo(
|
|
|
25857
25870
|
Ss.displayName = "HighlighterIcon";
|
|
25858
25871
|
var ks = "Popover", [jg] = pr(ks, [
|
|
25859
25872
|
gs
|
|
25860
|
-
]), po = gs(), [mE,
|
|
25873
|
+
]), po = gs(), [mE, pn] = jg(ks), Kg = (t) => {
|
|
25861
25874
|
const {
|
|
25862
25875
|
__scopePopover: e,
|
|
25863
25876
|
children: n,
|
|
@@ -25891,14 +25904,14 @@ var ks = "Popover", [jg] = pr(ks, [
|
|
|
25891
25904
|
Kg.displayName = ks;
|
|
25892
25905
|
var qg = "PopoverAnchor", gE = g.forwardRef(
|
|
25893
25906
|
(t, e) => {
|
|
25894
|
-
const { __scopePopover: n, ...r } = t, o =
|
|
25907
|
+
const { __scopePopover: n, ...r } = t, o = pn(qg, n), i = po(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: l } = o;
|
|
25895
25908
|
return g.useEffect(() => (s(), () => l()), [s, l]), /* @__PURE__ */ v(Ac, { ...i, ...r, ref: e });
|
|
25896
25909
|
}
|
|
25897
25910
|
);
|
|
25898
25911
|
gE.displayName = qg;
|
|
25899
25912
|
var Gg = "PopoverTrigger", Jg = g.forwardRef(
|
|
25900
25913
|
(t, e) => {
|
|
25901
|
-
const { __scopePopover: n, ...r } = t, o =
|
|
25914
|
+
const { __scopePopover: n, ...r } = t, o = pn(Gg, n), i = po(n), s = Ne(e, o.triggerRef), l = /* @__PURE__ */ v(
|
|
25902
25915
|
Ae.button,
|
|
25903
25916
|
{
|
|
25904
25917
|
type: "button",
|
|
@@ -25918,20 +25931,20 @@ Jg.displayName = Gg;
|
|
|
25918
25931
|
var Gc = "PopoverPortal", [yE, vE] = jg(Gc, {
|
|
25919
25932
|
forceMount: void 0
|
|
25920
25933
|
}), Zg = (t) => {
|
|
25921
|
-
const { __scopePopover: e, forceMount: n, children: r, container: o } = t, i =
|
|
25922
|
-
return /* @__PURE__ */ v(yE, { scope: e, forceMount: n, children: /* @__PURE__ */ v(
|
|
25934
|
+
const { __scopePopover: e, forceMount: n, children: r, container: o } = t, i = pn(Gc, e);
|
|
25935
|
+
return /* @__PURE__ */ v(yE, { scope: e, forceMount: n, children: /* @__PURE__ */ v(_n, { present: n || i.open, children: /* @__PURE__ */ v(Rc, { asChild: !0, container: o, children: r }) }) });
|
|
25923
25936
|
};
|
|
25924
25937
|
Zg.displayName = Gc;
|
|
25925
25938
|
var ur = "PopoverContent", Yg = g.forwardRef(
|
|
25926
25939
|
(t, e) => {
|
|
25927
|
-
const n = vE(ur, t.__scopePopover), { forceMount: r = n.forceMount, ...o } = t, i =
|
|
25928
|
-
return /* @__PURE__ */ v(
|
|
25940
|
+
const n = vE(ur, t.__scopePopover), { forceMount: r = n.forceMount, ...o } = t, i = pn(ur, t.__scopePopover);
|
|
25941
|
+
return /* @__PURE__ */ v(_n, { present: r || i.open, children: i.modal ? /* @__PURE__ */ v(CE, { ...o, ref: e }) : /* @__PURE__ */ v(wE, { ...o, ref: e }) });
|
|
25929
25942
|
}
|
|
25930
25943
|
);
|
|
25931
25944
|
Yg.displayName = ur;
|
|
25932
25945
|
var bE = /* @__PURE__ */ Zr("PopoverContent.RemoveScroll"), CE = g.forwardRef(
|
|
25933
25946
|
(t, e) => {
|
|
25934
|
-
const n =
|
|
25947
|
+
const n = pn(ur, t.__scopePopover), r = g.useRef(null), o = Ne(e, r), i = g.useRef(!1);
|
|
25935
25948
|
return g.useEffect(() => {
|
|
25936
25949
|
const s = r.current;
|
|
25937
25950
|
if (s) return I1(s);
|
|
@@ -25963,7 +25976,7 @@ var bE = /* @__PURE__ */ Zr("PopoverContent.RemoveScroll"), CE = g.forwardRef(
|
|
|
25963
25976
|
}
|
|
25964
25977
|
), wE = g.forwardRef(
|
|
25965
25978
|
(t, e) => {
|
|
25966
|
-
const n =
|
|
25979
|
+
const n = pn(ur, t.__scopePopover), r = g.useRef(!1), o = g.useRef(!1);
|
|
25967
25980
|
return /* @__PURE__ */ v(
|
|
25968
25981
|
Xg,
|
|
25969
25982
|
{
|
|
@@ -25995,7 +26008,7 @@ var bE = /* @__PURE__ */ Zr("PopoverContent.RemoveScroll"), CE = g.forwardRef(
|
|
|
25995
26008
|
onFocusOutside: c,
|
|
25996
26009
|
onInteractOutside: u,
|
|
25997
26010
|
...d
|
|
25998
|
-
} = t, f =
|
|
26011
|
+
} = t, f = pn(ur, n), h = po(n);
|
|
25999
26012
|
return u1(), /* @__PURE__ */ v(
|
|
26000
26013
|
Ec,
|
|
26001
26014
|
{
|
|
@@ -26040,7 +26053,7 @@ var bE = /* @__PURE__ */ Zr("PopoverContent.RemoveScroll"), CE = g.forwardRef(
|
|
|
26040
26053
|
}
|
|
26041
26054
|
), Qg = "PopoverClose", xE = g.forwardRef(
|
|
26042
26055
|
(t, e) => {
|
|
26043
|
-
const { __scopePopover: n, ...r } = t, o =
|
|
26056
|
+
const { __scopePopover: n, ...r } = t, o = pn(Qg, n);
|
|
26044
26057
|
return /* @__PURE__ */ v(
|
|
26045
26058
|
Ae.button,
|
|
26046
26059
|
{
|
|
@@ -26342,7 +26355,7 @@ function s0({
|
|
|
26342
26355
|
tabIndex: 0,
|
|
26343
26356
|
style: r ? { boxShadow: "none", border: 0 } : {},
|
|
26344
26357
|
children: /* @__PURE__ */ v(fo, { style: r ? { padding: 0 } : {}, children: /* @__PURE__ */ P(Fc, { orientation: "horizontal", children: [
|
|
26345
|
-
/* @__PURE__ */ v(
|
|
26358
|
+
/* @__PURE__ */ v(Pn, { orientation: "horizontal", children: e.map((l, a) => /* @__PURE__ */ v(
|
|
26346
26359
|
o0,
|
|
26347
26360
|
{
|
|
26348
26361
|
editor: t,
|
|
@@ -26355,7 +26368,7 @@ function s0({
|
|
|
26355
26368
|
l.value
|
|
26356
26369
|
)) }),
|
|
26357
26370
|
/* @__PURE__ */ v(ps, {}),
|
|
26358
|
-
/* @__PURE__ */ v(
|
|
26371
|
+
/* @__PURE__ */ v(Pn, { orientation: "horizontal", children: /* @__PURE__ */ v(
|
|
26359
26372
|
he,
|
|
26360
26373
|
{
|
|
26361
26374
|
onClick: n,
|
|
@@ -26584,7 +26597,7 @@ const u0 = ({
|
|
|
26584
26597
|
autoCapitalize: "off"
|
|
26585
26598
|
}
|
|
26586
26599
|
) }),
|
|
26587
|
-
/* @__PURE__ */ v(
|
|
26600
|
+
/* @__PURE__ */ v(Pn, { orientation: "horizontal", children: /* @__PURE__ */ v(
|
|
26588
26601
|
he,
|
|
26589
26602
|
{
|
|
26590
26603
|
type: "button",
|
|
@@ -26596,7 +26609,7 @@ const u0 = ({
|
|
|
26596
26609
|
}
|
|
26597
26610
|
) }),
|
|
26598
26611
|
/* @__PURE__ */ v(ps, {}),
|
|
26599
|
-
/* @__PURE__ */ P(
|
|
26612
|
+
/* @__PURE__ */ P(Pn, { orientation: "horizontal", children: [
|
|
26600
26613
|
/* @__PURE__ */ v(
|
|
26601
26614
|
he,
|
|
26602
26615
|
{
|
|
@@ -26798,7 +26811,7 @@ function VE({
|
|
|
26798
26811
|
}) {
|
|
26799
26812
|
return /* @__PURE__ */ v(Ct, { children: vt({ shortcutKeys: e }) });
|
|
26800
26813
|
}
|
|
26801
|
-
const
|
|
26814
|
+
const Xn = g.forwardRef(
|
|
26802
26815
|
({
|
|
26803
26816
|
editor: t,
|
|
26804
26817
|
type: e,
|
|
@@ -26854,7 +26867,7 @@ const Wt = g.forwardRef(
|
|
|
26854
26867
|
) : null;
|
|
26855
26868
|
}
|
|
26856
26869
|
);
|
|
26857
|
-
|
|
26870
|
+
Xn.displayName = "MarkButton";
|
|
26858
26871
|
const m0 = g.memo(
|
|
26859
26872
|
({ className: t, ...e }) => /* @__PURE__ */ v(
|
|
26860
26873
|
"svg",
|
|
@@ -27646,24 +27659,24 @@ function aM() {
|
|
|
27646
27659
|
return u.Date.now();
|
|
27647
27660
|
};
|
|
27648
27661
|
function y(k, S, M) {
|
|
27649
|
-
var N, B,
|
|
27662
|
+
var N, B, U, W, $, I, H = 0, F = !1, L = !1, T = !0;
|
|
27650
27663
|
if (typeof k != "function")
|
|
27651
27664
|
throw new TypeError(t);
|
|
27652
|
-
S = E(S) || 0, C(M) && (F = !!M.leading, L = "maxWait" in M,
|
|
27665
|
+
S = E(S) || 0, C(M) && (F = !!M.leading, L = "maxWait" in M, U = L ? h(E(M.maxWait) || 0, S) : U, T = "trailing" in M ? !!M.trailing : T);
|
|
27653
27666
|
function R(te) {
|
|
27654
27667
|
var Ge = N, wt = B;
|
|
27655
|
-
return N = B = void 0, H = te,
|
|
27668
|
+
return N = B = void 0, H = te, W = k.apply(wt, Ge), W;
|
|
27656
27669
|
}
|
|
27657
|
-
function
|
|
27658
|
-
return H = te, $ = setTimeout(Z, S), F ? R(te) :
|
|
27670
|
+
function j(te) {
|
|
27671
|
+
return H = te, $ = setTimeout(Z, S), F ? R(te) : W;
|
|
27659
27672
|
}
|
|
27660
27673
|
function ee(te) {
|
|
27661
|
-
var Ge = te - I, wt = te - H,
|
|
27662
|
-
return L ? p(
|
|
27674
|
+
var Ge = te - I, wt = te - H, Fn = S - Ge;
|
|
27675
|
+
return L ? p(Fn, U - wt) : Fn;
|
|
27663
27676
|
}
|
|
27664
27677
|
function K(te) {
|
|
27665
27678
|
var Ge = te - I, wt = te - H;
|
|
27666
|
-
return I === void 0 || Ge >= S || Ge < 0 || L && wt >=
|
|
27679
|
+
return I === void 0 || Ge >= S || Ge < 0 || L && wt >= U;
|
|
27667
27680
|
}
|
|
27668
27681
|
function Z() {
|
|
27669
27682
|
var te = m();
|
|
@@ -27672,23 +27685,23 @@ function aM() {
|
|
|
27672
27685
|
$ = setTimeout(Z, ee(te));
|
|
27673
27686
|
}
|
|
27674
27687
|
function qe(te) {
|
|
27675
|
-
return $ = void 0, T && N ? R(te) : (N = B = void 0,
|
|
27688
|
+
return $ = void 0, T && N ? R(te) : (N = B = void 0, W);
|
|
27676
27689
|
}
|
|
27677
27690
|
function le() {
|
|
27678
27691
|
$ !== void 0 && clearTimeout($), H = 0, N = I = B = $ = void 0;
|
|
27679
27692
|
}
|
|
27680
27693
|
function ye() {
|
|
27681
|
-
return $ === void 0 ?
|
|
27694
|
+
return $ === void 0 ? W : qe(m());
|
|
27682
27695
|
}
|
|
27683
27696
|
function Y() {
|
|
27684
27697
|
var te = m(), Ge = K(te);
|
|
27685
27698
|
if (N = arguments, B = this, I = te, Ge) {
|
|
27686
27699
|
if ($ === void 0)
|
|
27687
|
-
return
|
|
27700
|
+
return j(I);
|
|
27688
27701
|
if (L)
|
|
27689
27702
|
return $ = setTimeout(Z, S), R(I);
|
|
27690
27703
|
}
|
|
27691
|
-
return $ === void 0 && ($ = setTimeout(Z, S)),
|
|
27704
|
+
return $ === void 0 && ($ = setTimeout(Z, S)), W;
|
|
27692
27705
|
}
|
|
27693
27706
|
return Y.cancel = le, Y.flush = ye, Y;
|
|
27694
27707
|
}
|
|
@@ -27732,7 +27745,7 @@ function aM() {
|
|
|
27732
27745
|
var cM = aM();
|
|
27733
27746
|
const uM = /* @__PURE__ */ Tf(cM), dM = (t) => {
|
|
27734
27747
|
const e = Rt(t);
|
|
27735
|
-
e.current = t,
|
|
27748
|
+
e.current = t, An(
|
|
27736
27749
|
() => () => {
|
|
27737
27750
|
e.current();
|
|
27738
27751
|
},
|
|
@@ -27880,58 +27893,47 @@ const yM = ({
|
|
|
27880
27893
|
isMobile: n
|
|
27881
27894
|
}) => /* @__PURE__ */ P(ze, { children: [
|
|
27882
27895
|
/* @__PURE__ */ v(lf, {}),
|
|
27883
|
-
/* @__PURE__ */ P(
|
|
27896
|
+
/* @__PURE__ */ P(yn, { children: [
|
|
27884
27897
|
/* @__PURE__ */ v(Ca, { action: "undo" }),
|
|
27885
27898
|
/* @__PURE__ */ v(Ca, { action: "redo" })
|
|
27886
27899
|
] }),
|
|
27887
|
-
/* @__PURE__ */ v(
|
|
27888
|
-
/* @__PURE__ */ P(
|
|
27900
|
+
/* @__PURE__ */ v(vn, {}),
|
|
27901
|
+
/* @__PURE__ */ P(yn, { children: [
|
|
27889
27902
|
/* @__PURE__ */ v(kg, { levels: [1, 2, 3, 4], portal: n }),
|
|
27890
|
-
/* @__PURE__ */ v(
|
|
27891
|
-
sE,
|
|
27892
|
-
{
|
|
27893
|
-
types: ["bulletList", "orderedList", "taskList"],
|
|
27894
|
-
portal: n
|
|
27895
|
-
}
|
|
27896
|
-
),
|
|
27903
|
+
/* @__PURE__ */ v(sE, { types: ["bulletList", "orderedList", "taskList"], portal: n }),
|
|
27897
27904
|
/* @__PURE__ */ v(Hg, {}),
|
|
27898
27905
|
/* @__PURE__ */ v(Vg, {})
|
|
27899
27906
|
] }),
|
|
27900
|
-
/* @__PURE__ */ v(
|
|
27901
|
-
/* @__PURE__ */ P(
|
|
27902
|
-
/* @__PURE__ */ v(
|
|
27903
|
-
/* @__PURE__ */ v(
|
|
27904
|
-
/* @__PURE__ */ v(
|
|
27905
|
-
/* @__PURE__ */ v(
|
|
27906
|
-
/* @__PURE__ */ v(
|
|
27907
|
+
/* @__PURE__ */ v(vn, {}),
|
|
27908
|
+
/* @__PURE__ */ P(yn, { children: [
|
|
27909
|
+
/* @__PURE__ */ v(Xn, { type: "bold" }),
|
|
27910
|
+
/* @__PURE__ */ v(Xn, { type: "italic" }),
|
|
27911
|
+
/* @__PURE__ */ v(Xn, { type: "strike" }),
|
|
27912
|
+
/* @__PURE__ */ v(Xn, { type: "code" }),
|
|
27913
|
+
/* @__PURE__ */ v(Xn, { type: "underline" }),
|
|
27907
27914
|
n ? /* @__PURE__ */ v(Yc, { onClick: t }) : /* @__PURE__ */ v(DE, {}),
|
|
27908
27915
|
n ? /* @__PURE__ */ v(Xc, { onClick: e }) : /* @__PURE__ */ v(d0, {})
|
|
27909
27916
|
] }),
|
|
27910
|
-
/* @__PURE__ */ v(
|
|
27911
|
-
/* @__PURE__ */ P(
|
|
27912
|
-
/* @__PURE__ */ v(Wt, { type: "superscript" }),
|
|
27913
|
-
/* @__PURE__ */ v(Wt, { type: "subscript" })
|
|
27914
|
-
] }),
|
|
27915
|
-
/* @__PURE__ */ v(Jt, {}),
|
|
27916
|
-
/* @__PURE__ */ P(Gt, { children: [
|
|
27917
|
+
/* @__PURE__ */ v(vn, {}),
|
|
27918
|
+
/* @__PURE__ */ P(yn, { children: [
|
|
27917
27919
|
/* @__PURE__ */ v(xr, { align: "left" }),
|
|
27918
27920
|
/* @__PURE__ */ v(xr, { align: "center" }),
|
|
27919
27921
|
/* @__PURE__ */ v(xr, { align: "right" }),
|
|
27920
27922
|
/* @__PURE__ */ v(xr, { align: "justify" })
|
|
27921
27923
|
] }),
|
|
27922
|
-
/* @__PURE__ */ v(
|
|
27923
|
-
/* @__PURE__ */ v(
|
|
27924
|
+
/* @__PURE__ */ v(vn, {}),
|
|
27925
|
+
/* @__PURE__ */ v(yn, { children: /* @__PURE__ */ v(Mg, { text: "Add" }) }),
|
|
27924
27926
|
/* @__PURE__ */ v(lf, {}),
|
|
27925
|
-
n && /* @__PURE__ */ v(
|
|
27927
|
+
n && /* @__PURE__ */ v(vn, {})
|
|
27926
27928
|
] }), vM = ({
|
|
27927
27929
|
type: t,
|
|
27928
27930
|
onBack: e
|
|
27929
27931
|
}) => /* @__PURE__ */ P(ze, { children: [
|
|
27930
|
-
/* @__PURE__ */ v(
|
|
27932
|
+
/* @__PURE__ */ v(yn, { children: /* @__PURE__ */ P(he, { "data-style": "ghost", onClick: e, children: [
|
|
27931
27933
|
/* @__PURE__ */ v(N0, { className: "tiptap-button-icon" }),
|
|
27932
27934
|
t === "highlighter" ? /* @__PURE__ */ v(Ss, { className: "tiptap-button-icon" }) : /* @__PURE__ */ v(Es, { className: "tiptap-button-icon" })
|
|
27933
27935
|
] }) }),
|
|
27934
|
-
/* @__PURE__ */ v(
|
|
27936
|
+
/* @__PURE__ */ v(vn, {}),
|
|
27935
27937
|
t === "highlighter" ? /* @__PURE__ */ v(s0, {}) : /* @__PURE__ */ v(_E, {})
|
|
27936
27938
|
] });
|
|
27937
27939
|
function EM(t) {
|
|
@@ -27959,9 +27961,7 @@ function EM(t) {
|
|
|
27959
27961
|
accept: "image/*",
|
|
27960
27962
|
maxSize: 1 * 1024 * 1024 * 1024,
|
|
27961
27963
|
// limit: props.maxImageCount || 3,
|
|
27962
|
-
upload: (a, c, u) => Promise.resolve(
|
|
27963
|
-
t.onUploadImage?.(a, c, u) || ""
|
|
27964
|
-
)
|
|
27964
|
+
upload: (a, c, u) => Promise.resolve(t.onUploadImage?.(a, c, u) || "")
|
|
27965
27965
|
// upload: (file) => props.onUploadImage(file)
|
|
27966
27966
|
// // onError:
|
|
27967
27967
|
// // props.onImageUploadError ||
|
|
@@ -27980,7 +27980,7 @@ function EM(t) {
|
|
|
27980
27980
|
}
|
|
27981
27981
|
}),
|
|
27982
27982
|
yx,
|
|
27983
|
-
X7.configure({ types: ["heading", "paragraph"] }),
|
|
27983
|
+
X7.configure({ types: ["heading", "paragraph", "resizableImage"] }),
|
|
27984
27984
|
om,
|
|
27985
27985
|
rm.configure({ nested: !0 }),
|
|
27986
27986
|
k4.configure({ multicolor: !0 }),
|
|
@@ -27998,9 +27998,9 @@ function EM(t) {
|
|
|
27998
27998
|
editor: s,
|
|
27999
27999
|
overlayHeight: i.current?.getBoundingClientRect().height ?? 0
|
|
28000
28000
|
});
|
|
28001
|
-
return
|
|
28001
|
+
return An(() => {
|
|
28002
28002
|
!e && r !== "main" && o("main");
|
|
28003
|
-
}, [e, r]),
|
|
28003
|
+
}, [e, r]), An(() => () => {
|
|
28004
28004
|
s && s.commands.clearContent();
|
|
28005
28005
|
}, [s]), /* @__PURE__ */ v("div", { className: "simple-editor-wrapper", children: /* @__PURE__ */ P(ec.Provider, { value: { editor: s }, children: [
|
|
28006
28006
|
/* @__PURE__ */ v(
|
|
@@ -28040,12 +28040,12 @@ export {
|
|
|
28040
28040
|
Mg as ImageUploadButton,
|
|
28041
28041
|
sE as ListDropdownMenu,
|
|
28042
28042
|
sf as MAX_FILE_SIZE,
|
|
28043
|
-
|
|
28043
|
+
Xn as MarkButton,
|
|
28044
28044
|
xr as TextAlignButton,
|
|
28045
28045
|
EM as TiptapEditor,
|
|
28046
28046
|
Km as Toolbar,
|
|
28047
|
-
|
|
28048
|
-
|
|
28047
|
+
yn as ToolbarGroup,
|
|
28048
|
+
vn as ToolbarSeparator,
|
|
28049
28049
|
Ca as UndoRedoButton,
|
|
28050
28050
|
SM as onUploadImage,
|
|
28051
28051
|
ho as useIsMobile,
|