@devalok/shilp-sutra 0.37.1 → 0.38.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/MIGRATION.md +67 -0
- package/dist/_chunks/tiptap.js +977 -968
- package/dist/_chunks/tiptap.js.map +1 -1
- package/dist/composed/index.d.ts +0 -2
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +5 -6
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -1
- package/dist/ui/alert.d.ts +1 -2
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +1 -27
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/banner.d.ts +3 -5
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +13 -13
- package/dist/ui/banner.js.map +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +2 -2
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/input.d.ts +1 -9
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +26 -27
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/segmented-control.d.ts +1 -1
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +2 -4
- package/dist/ui/segmented-control.js.map +1 -1
- package/docs/components/_header.md +1 -1
- package/docs/components/ui/alert.md +4 -1
- package/docs/components/ui/banner.md +3 -1
- package/docs/components/ui/input.md +4 -2
- package/docs/components/ui/segmented-control.md +13 -6
- package/docs/recipes/customize-brand.md +216 -0
- package/docs/recipes/index.md +51 -0
- package/docs/recipes/install-astro.md +178 -0
- package/docs/recipes/install-next-app-router.md +230 -0
- package/docs/recipes/install-next-pages.md +123 -0
- package/docs/recipes/install-remix.md +171 -0
- package/docs/recipes/install-tanstack-start.md +143 -0
- package/docs/recipes/install-vite.md +170 -0
- package/docs/recipes/server-components.md +209 -0
- package/docs/recipes/troubleshoot.md +217 -0
- package/llms-full.txt +26 -53
- package/llms.txt +33 -16
- package/package.json +45 -35
- package/dist/composed/responsive-overlay.d.ts +0 -23
- package/dist/composed/responsive-overlay.d.ts.map +0 -1
- package/dist/composed/responsive-overlay.js +0 -40
- package/dist/composed/responsive-overlay.js.map +0 -1
- package/dist/hooks/use-toast.d.ts +0 -17
- package/dist/hooks/use-toast.d.ts.map +0 -1
- package/dist/hooks/use-toast.js +0 -3
- package/dist/tailwind/index.cjs +0 -41
- package/dist/tailwind/index.d.ts +0 -2
- package/dist/tailwind/index.d.ts.map +0 -1
- package/dist/tailwind/index.js +0 -2
- package/dist/tailwind/preset.d.ts +0 -25
- package/dist/tailwind/preset.d.ts.map +0 -1
- package/dist/tailwind/preset.js +0 -17
- package/dist/tailwind/preset.js.map +0 -1
- package/docs/components/composed/responsive-overlay.md +0 -41
package/dist/_chunks/tiptap.js
CHANGED
|
@@ -7243,7 +7243,7 @@ function Dc(e) {
|
|
|
7243
7243
|
};
|
|
7244
7244
|
}
|
|
7245
7245
|
//#endregion
|
|
7246
|
-
//#region ../../node_modules/.pnpm/@tiptap+core@3.22.
|
|
7246
|
+
//#region ../../node_modules/.pnpm/@tiptap+core@3.22.5_@tiptap+pm@3.22.5/node_modules/@tiptap/core/dist/index.js
|
|
7247
7247
|
var Oc = Object.defineProperty, kc = (e, t) => {
|
|
7248
7248
|
for (var n in t) Oc(e, n, {
|
|
7249
7249
|
get: t[n],
|
|
@@ -7377,26 +7377,26 @@ kc(Mc, {
|
|
|
7377
7377
|
selectTextblockEnd: () => Rl,
|
|
7378
7378
|
selectTextblockStart: () => zl,
|
|
7379
7379
|
setContent: () => Vl,
|
|
7380
|
-
setMark: () =>
|
|
7381
|
-
setMeta: () =>
|
|
7382
|
-
setNode: () =>
|
|
7383
|
-
setNodeSelection: () =>
|
|
7384
|
-
setTextDirection: () =>
|
|
7385
|
-
setTextSelection: () =>
|
|
7386
|
-
sinkListItem: () =>
|
|
7387
|
-
splitBlock: () =>
|
|
7388
|
-
splitListItem: () =>
|
|
7389
|
-
toggleList: () =>
|
|
7390
|
-
toggleMark: () =>
|
|
7391
|
-
toggleNode: () =>
|
|
7392
|
-
toggleWrap: () =>
|
|
7393
|
-
undoInputRule: () =>
|
|
7394
|
-
unsetAllMarks: () =>
|
|
7395
|
-
unsetMark: () =>
|
|
7396
|
-
unsetTextDirection: () =>
|
|
7397
|
-
updateAttributes: () =>
|
|
7398
|
-
wrapIn: () =>
|
|
7399
|
-
wrapInList: () =>
|
|
7380
|
+
setMark: () => Ru,
|
|
7381
|
+
setMeta: () => zu,
|
|
7382
|
+
setNode: () => Bu,
|
|
7383
|
+
setNodeSelection: () => Vu,
|
|
7384
|
+
setTextDirection: () => Hu,
|
|
7385
|
+
setTextSelection: () => Uu,
|
|
7386
|
+
sinkListItem: () => Wu,
|
|
7387
|
+
splitBlock: () => Ku,
|
|
7388
|
+
splitListItem: () => qu,
|
|
7389
|
+
toggleList: () => Zu,
|
|
7390
|
+
toggleMark: () => Qu,
|
|
7391
|
+
toggleNode: () => $u,
|
|
7392
|
+
toggleWrap: () => ed,
|
|
7393
|
+
undoInputRule: () => td,
|
|
7394
|
+
unsetAllMarks: () => nd,
|
|
7395
|
+
unsetMark: () => rd,
|
|
7396
|
+
unsetTextDirection: () => id,
|
|
7397
|
+
updateAttributes: () => ad,
|
|
7398
|
+
wrapIn: () => od,
|
|
7399
|
+
wrapInList: () => sd
|
|
7400
7400
|
});
|
|
7401
7401
|
var Nc = () => ({ editor: e, view: t }) => (requestAnimationFrame(() => {
|
|
7402
7402
|
var n;
|
|
@@ -8322,7 +8322,11 @@ function Au(e, { checkChildren: t = !0, ignoreWhitespace: n = !1 } = {}) {
|
|
|
8322
8322
|
function ju(e) {
|
|
8323
8323
|
return e instanceof M;
|
|
8324
8324
|
}
|
|
8325
|
-
|
|
8325
|
+
function Mu({ selection: e, pos: t, nodeSize: n, selectedOnTextSelection: r = !1 }) {
|
|
8326
|
+
let { from: i, to: a } = e;
|
|
8327
|
+
return !!(i <= t && a >= t + n || r && $c(e) && i > t && a < t + n);
|
|
8328
|
+
}
|
|
8329
|
+
var Nu = class e {
|
|
8326
8330
|
constructor(e) {
|
|
8327
8331
|
this.position = e;
|
|
8328
8332
|
}
|
|
@@ -8333,17 +8337,17 @@ var Mu = class e {
|
|
|
8333
8337
|
return { position: this.position };
|
|
8334
8338
|
}
|
|
8335
8339
|
};
|
|
8336
|
-
function
|
|
8340
|
+
function Pu(e, t) {
|
|
8337
8341
|
let n = t.mapping.mapResult(e.position);
|
|
8338
8342
|
return {
|
|
8339
|
-
position: new
|
|
8343
|
+
position: new Nu(n.pos),
|
|
8340
8344
|
mapResult: n
|
|
8341
8345
|
};
|
|
8342
8346
|
}
|
|
8343
|
-
function
|
|
8344
|
-
return new
|
|
8347
|
+
function Fu(e) {
|
|
8348
|
+
return new Nu(e);
|
|
8345
8349
|
}
|
|
8346
|
-
function
|
|
8350
|
+
function Iu(e, t, n) {
|
|
8347
8351
|
let r = e.state.doc.content.size, i = el(t, 0, r), a = el(n, 0, r), o = e.coordsAtPos(i), s = e.coordsAtPos(a, -1), c = Math.min(o.top, s.top), l = Math.max(o.bottom, s.bottom), u = Math.min(o.left, s.left), d = Math.max(o.right, s.right), f = {
|
|
8348
8352
|
top: c,
|
|
8349
8353
|
bottom: l,
|
|
@@ -8359,7 +8363,7 @@ function Fu(e, t, n) {
|
|
|
8359
8363
|
toJSON: () => f
|
|
8360
8364
|
};
|
|
8361
8365
|
}
|
|
8362
|
-
function
|
|
8366
|
+
function Lu(e, t, n) {
|
|
8363
8367
|
let { selection: r } = t, i = null;
|
|
8364
8368
|
if ($c(r) && (i = r.$cursor), i) {
|
|
8365
8369
|
let t = e.storedMarks ?? i.marks();
|
|
@@ -8378,7 +8382,7 @@ function Iu(e, t, n) {
|
|
|
8378
8382
|
}), i;
|
|
8379
8383
|
});
|
|
8380
8384
|
}
|
|
8381
|
-
var
|
|
8385
|
+
var Ru = (e, t = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
8382
8386
|
let { selection: a } = n, { empty: o, ranges: s } = a, c = Xc(e, r.schema);
|
|
8383
8387
|
if (i) if (o) {
|
|
8384
8388
|
let e = Hl(r, c);
|
|
@@ -8398,8 +8402,8 @@ var Lu = (e, t = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
8398
8402
|
}) : n.addMark(o, s, c.create(t));
|
|
8399
8403
|
});
|
|
8400
8404
|
});
|
|
8401
|
-
return
|
|
8402
|
-
},
|
|
8405
|
+
return Lu(r, n, c);
|
|
8406
|
+
}, zu = (e, t) => ({ tr: n }) => (n.setMeta(e, t), !0), Bu = (e, t = {}) => ({ state: n, dispatch: r, chain: i }) => {
|
|
8403
8407
|
let a = U(e, n.schema), o;
|
|
8404
8408
|
return n.selection.$anchor.sameParent(n.selection.$head) && (o = n.selection.$anchor.parent.attrs), a.isTextblock ? i().command(({ commands: e }) => Rr(a, {
|
|
8405
8409
|
...o,
|
|
@@ -8408,13 +8412,13 @@ var Lu = (e, t = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
8408
8412
|
...o,
|
|
8409
8413
|
...t
|
|
8410
8414
|
})(e, r)).run() : (console.warn("[tiptap warn]: Currently \"setNode()\" only supports text block nodes."), !1);
|
|
8411
|
-
},
|
|
8415
|
+
}, Vu = (e) => ({ tr: t, dispatch: n }) => {
|
|
8412
8416
|
if (n) {
|
|
8413
8417
|
let { doc: n } = t, r = el(e, 0, n.content.size), i = M.create(n, r);
|
|
8414
8418
|
t.setSelection(i);
|
|
8415
8419
|
}
|
|
8416
8420
|
return !0;
|
|
8417
|
-
},
|
|
8421
|
+
}, Hu = (e, t) => ({ tr: n, state: r, dispatch: i }) => {
|
|
8418
8422
|
let { selection: a } = r, o, s;
|
|
8419
8423
|
return typeof t == "number" ? (o = t, s = t) : t && "from" in t && "to" in t ? (o = t.from, s = t.to) : (o = a.from, s = a.to), i && n.doc.nodesBetween(o, s, (t, r) => {
|
|
8420
8424
|
t.isText || n.setNodeMarkup(r, void 0, {
|
|
@@ -8422,7 +8426,7 @@ var Lu = (e, t = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
8422
8426
|
dir: e
|
|
8423
8427
|
});
|
|
8424
8428
|
}), !0;
|
|
8425
|
-
},
|
|
8429
|
+
}, Uu = (e) => ({ tr: t, dispatch: n }) => {
|
|
8426
8430
|
if (n) {
|
|
8427
8431
|
let { doc: n } = t, { from: r, to: i } = typeof e == "number" ? {
|
|
8428
8432
|
from: e,
|
|
@@ -8431,17 +8435,17 @@ var Lu = (e, t = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
8431
8435
|
t.setSelection(l);
|
|
8432
8436
|
}
|
|
8433
8437
|
return !0;
|
|
8434
|
-
},
|
|
8435
|
-
function
|
|
8438
|
+
}, Wu = (e) => ({ state: t, dispatch: n }) => Xr(U(e, t.schema))(t, n);
|
|
8439
|
+
function Gu(e, t) {
|
|
8436
8440
|
let n = e.storedMarks || e.selection.$to.parentOffset && e.selection.$from.marks();
|
|
8437
8441
|
if (n) {
|
|
8438
8442
|
let r = n.filter((e) => t?.includes(e.type.name));
|
|
8439
8443
|
e.tr.ensureMarks(r);
|
|
8440
8444
|
}
|
|
8441
8445
|
}
|
|
8442
|
-
var
|
|
8446
|
+
var Ku = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor: i }) => {
|
|
8443
8447
|
let { selection: a, doc: o } = t, { $from: s, $to: c } = a, l = i.extensionManager.attributes, u = Su(l, s.node().type.name, s.node().attrs);
|
|
8444
|
-
if (a instanceof M && a.node.isBlock) return !s.parentOffset || !dn(o, s.pos) ? !1 : (r && (e &&
|
|
8448
|
+
if (a instanceof M && a.node.isBlock) return !s.parentOffset || !dn(o, s.pos) ? !1 : (r && (e && Gu(n, i.extensionManager.splittableMarks), t.split(s.pos).scrollIntoView()), !0);
|
|
8445
8449
|
if (!s.parent.isBlock) return !1;
|
|
8446
8450
|
let d = c.parentOffset === c.parent.content.size, f = s.depth === 0 ? void 0 : Wl(s.node(-1).contentMatchAt(s.indexAfter(-1))), p = d && f ? [{
|
|
8447
8451
|
type: f,
|
|
@@ -8455,10 +8459,10 @@ var Gu = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
|
|
|
8455
8459
|
let e = t.mapping.map(s.before()), n = t.doc.resolve(e);
|
|
8456
8460
|
s.node(-1).canReplaceWith(n.index(), n.index() + 1, f) && t.setNodeMarkup(t.mapping.map(s.before()), f);
|
|
8457
8461
|
}
|
|
8458
|
-
e &&
|
|
8462
|
+
e && Gu(n, i.extensionManager.splittableMarks), t.scrollIntoView();
|
|
8459
8463
|
}
|
|
8460
8464
|
return m;
|
|
8461
|
-
},
|
|
8465
|
+
}, qu = (e, t = {}) => ({ tr: n, state: r, dispatch: i, editor: a }) => {
|
|
8462
8466
|
let o = U(e, r.schema), { $from: s, $to: c } = r.selection, l = r.selection.node;
|
|
8463
8467
|
if (l && l.isBlock || s.depth < 2 || !s.sameParent(c)) return !1;
|
|
8464
8468
|
let u = s.node(-1);
|
|
@@ -8510,14 +8514,14 @@ var Gu = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
|
|
|
8510
8514
|
n.ensureMarks(l);
|
|
8511
8515
|
}
|
|
8512
8516
|
return !0;
|
|
8513
|
-
},
|
|
8517
|
+
}, Ju = (e, t) => {
|
|
8514
8518
|
let n = ql((e) => e.type === t)(e.selection);
|
|
8515
8519
|
if (!n) return !0;
|
|
8516
8520
|
let r = e.doc.resolve(Math.max(0, n.pos - 1)).before(n.depth);
|
|
8517
8521
|
if (r === void 0) return !0;
|
|
8518
8522
|
let i = e.doc.nodeAt(r);
|
|
8519
8523
|
return n.node.type === i?.type && pn(e.doc, n.pos) && e.join(n.pos), !0;
|
|
8520
|
-
},
|
|
8524
|
+
}, Yu = (e, t) => {
|
|
8521
8525
|
let n = ql((e) => e.type === t)(e.selection);
|
|
8522
8526
|
if (!n) return !0;
|
|
8523
8527
|
let r = e.doc.resolve(n.start).after(n.depth);
|
|
@@ -8525,13 +8529,13 @@ var Gu = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
|
|
|
8525
8529
|
let i = e.doc.nodeAt(r);
|
|
8526
8530
|
return n.node.type === i?.type && pn(e.doc, r) && e.join(r), !0;
|
|
8527
8531
|
};
|
|
8528
|
-
function
|
|
8532
|
+
function Xu(e) {
|
|
8529
8533
|
let t = e.doc, n = t.firstChild;
|
|
8530
8534
|
if (!n) return null;
|
|
8531
8535
|
let r = t.resolve(1), i = t.resolve(n.nodeSize - 1);
|
|
8532
8536
|
return j.between(r, i);
|
|
8533
8537
|
}
|
|
8534
|
-
var
|
|
8538
|
+
var Zu = (e, t, n, r = {}) => ({ editor: i, tr: a, state: o, dispatch: s, chain: c, commands: l, can: u }) => {
|
|
8535
8539
|
let { extensions: d, splittableMarks: f } = i.extensionManager, p = U(e, o.schema), m = U(t, o.schema), { selection: h, storedMarks: g } = o, { $from: _, $to: v } = h, y = _.blockRange(v), b = g || h.$to.parentOffset && h.$from.marks();
|
|
8536
8540
|
if (!y) return !1;
|
|
8537
8541
|
let x = ql((e) => ku(e.type.name, d))(h), S = h.from === 0 && h.to === o.doc.content.size, ee = o.doc.content.content, C = ee.length === 1 ? ee[0] : null, te = S && C && ku(C.type.name, d) ? {
|
|
@@ -8541,28 +8545,28 @@ var Xu = (e, t, n, r = {}) => ({ editor: i, tr: a, state: o, dispatch: s, chain:
|
|
|
8541
8545
|
} : null, ne = x ?? te, re = !!x && y.depth >= 1 && y.depth - x.depth <= 1, ie = !!te;
|
|
8542
8546
|
if ((re || ie) && ne) {
|
|
8543
8547
|
if (ne.node.type === p) return S && ie ? c().command(({ tr: e, dispatch: t }) => {
|
|
8544
|
-
let n =
|
|
8548
|
+
let n = Xu(e);
|
|
8545
8549
|
return n ? (e.setSelection(n), t && t(e), !0) : !1;
|
|
8546
8550
|
}).liftListItem(m).run() : l.liftListItem(m);
|
|
8547
|
-
if (ku(ne.node.type.name, d) && p.validContent(ne.node.content)) return c().command(() => (a.setNodeMarkup(ne.pos, p), !0)).command(() =>
|
|
8551
|
+
if (ku(ne.node.type.name, d) && p.validContent(ne.node.content)) return c().command(() => (a.setNodeMarkup(ne.pos, p), !0)).command(() => Ju(a, p)).command(() => Yu(a, p)).run();
|
|
8548
8552
|
}
|
|
8549
|
-
return !n || !b || !s ? c().command(() => u().wrapInList(p, r) ? !0 : l.clearNodes()).wrapInList(p, r).command(() =>
|
|
8553
|
+
return !n || !b || !s ? c().command(() => u().wrapInList(p, r) ? !0 : l.clearNodes()).wrapInList(p, r).command(() => Ju(a, p)).command(() => Yu(a, p)).run() : c().command(() => {
|
|
8550
8554
|
let e = u().wrapInList(p, r), t = b.filter((e) => f.includes(e.type.name));
|
|
8551
8555
|
return a.ensureMarks(t), e ? !0 : l.clearNodes();
|
|
8552
|
-
}).wrapInList(p, r).command(() =>
|
|
8553
|
-
},
|
|
8556
|
+
}).wrapInList(p, r).command(() => Ju(a, p)).command(() => Yu(a, p)).run();
|
|
8557
|
+
}, Qu = (e, t = {}, n = {}) => ({ state: r, commands: i }) => {
|
|
8554
8558
|
let { extendEmptyMarkRange: a = !1 } = n, o = Xc(e, r.schema);
|
|
8555
8559
|
return wu(r, o, t) ? i.unsetMark(o, { extendEmptyMarkRange: a }) : i.setMark(o, t);
|
|
8556
|
-
},
|
|
8560
|
+
}, $u = (e, t, n = {}) => ({ state: r, commands: i }) => {
|
|
8557
8561
|
let a = U(e, r.schema), o = U(t, r.schema), s = Tl(r, a, n), c;
|
|
8558
8562
|
return r.selection.$anchor.sameParent(r.selection.$head) && (c = r.selection.$anchor.parent.attrs), s ? i.setNode(o, c) : i.setNode(a, {
|
|
8559
8563
|
...c,
|
|
8560
8564
|
...n
|
|
8561
8565
|
});
|
|
8562
|
-
},
|
|
8566
|
+
}, ed = (e, t = {}) => ({ state: n, commands: r }) => {
|
|
8563
8567
|
let i = U(e, n.schema);
|
|
8564
8568
|
return Tl(n, i, t) ? r.lift(i) : r.wrapIn(i, t);
|
|
8565
|
-
},
|
|
8569
|
+
}, td = () => ({ state: e, dispatch: t }) => {
|
|
8566
8570
|
let n = e.plugins;
|
|
8567
8571
|
for (let r = 0; r < n.length; r += 1) {
|
|
8568
8572
|
let i = n[r], a;
|
|
@@ -8579,12 +8583,12 @@ var Xu = (e, t, n, r = {}) => ({ editor: i, tr: a, state: o, dispatch: s, chain:
|
|
|
8579
8583
|
}
|
|
8580
8584
|
}
|
|
8581
8585
|
return !1;
|
|
8582
|
-
},
|
|
8586
|
+
}, nd = () => ({ tr: e, dispatch: t }) => {
|
|
8583
8587
|
let { selection: n } = e, { empty: r, ranges: i } = n;
|
|
8584
8588
|
return r || t && i.forEach((t) => {
|
|
8585
8589
|
e.removeMark(t.$from.pos, t.$to.pos);
|
|
8586
8590
|
}), !0;
|
|
8587
|
-
},
|
|
8591
|
+
}, rd = (e, t = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
8588
8592
|
let { extendEmptyMarkRange: a = !1 } = t, { selection: o } = n, s = Xc(e, r.schema), { $from: c, empty: l, ranges: u } = o;
|
|
8589
8593
|
if (!i) return !0;
|
|
8590
8594
|
if (l && a) {
|
|
@@ -8594,14 +8598,14 @@ var Xu = (e, t, n, r = {}) => ({ editor: i, tr: a, state: o, dispatch: s, chain:
|
|
|
8594
8598
|
n.removeMark(e.$from.pos, e.$to.pos, s);
|
|
8595
8599
|
});
|
|
8596
8600
|
return n.removeStoredMark(s), !0;
|
|
8597
|
-
},
|
|
8601
|
+
}, id = (e) => ({ tr: t, state: n, dispatch: r }) => {
|
|
8598
8602
|
let { selection: i } = n, a, o;
|
|
8599
8603
|
return typeof e == "number" ? (a = e, o = e) : e && "from" in e && "to" in e ? (a = e.from, o = e.to) : (a = i.from, o = i.to), r && t.doc.nodesBetween(a, o, (e, n) => {
|
|
8600
8604
|
if (e.isText) return;
|
|
8601
8605
|
let r = { ...e.attrs };
|
|
8602
8606
|
delete r.dir, t.setNodeMarkup(n, void 0, r);
|
|
8603
8607
|
}), !0;
|
|
8604
|
-
},
|
|
8608
|
+
}, ad = (e, t = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
8605
8609
|
let a = null, o = null, s = Al(typeof e == "string" ? e : e.name, r.schema);
|
|
8606
8610
|
if (!s) return !1;
|
|
8607
8611
|
s === "node" && (a = U(e, r.schema)), s === "mark" && (o = Xc(e, r.schema));
|
|
@@ -8633,7 +8637,7 @@ var Xu = (e, t, n, r = {}) => ({ editor: i, tr: a, state: o, dispatch: s, chain:
|
|
|
8633
8637
|
}));
|
|
8634
8638
|
}));
|
|
8635
8639
|
}), c;
|
|
8636
|
-
},
|
|
8640
|
+
}, od = (e, t = {}) => ({ state: n, dispatch: r }) => Lr(U(e, n.schema), t)(n, r), sd = (e, t = {}) => ({ state: n, dispatch: r }) => Wr(U(e, n.schema), t)(n, r), cd = class {
|
|
8637
8641
|
constructor() {
|
|
8638
8642
|
this.callbacks = {};
|
|
8639
8643
|
}
|
|
@@ -8657,18 +8661,18 @@ var Xu = (e, t, n, r = {}) => ({ editor: i, tr: a, state: o, dispatch: s, chain:
|
|
|
8657
8661
|
removeAllListeners() {
|
|
8658
8662
|
this.callbacks = {};
|
|
8659
8663
|
}
|
|
8660
|
-
},
|
|
8664
|
+
}, ld = class {
|
|
8661
8665
|
constructor(e) {
|
|
8662
8666
|
this.find = e.find, this.handler = e.handler, this.undoable = e.undoable ?? !0;
|
|
8663
8667
|
}
|
|
8664
|
-
},
|
|
8668
|
+
}, ud = (e, t) => {
|
|
8665
8669
|
if (Gc(t)) return t.exec(e);
|
|
8666
8670
|
let n = t(e);
|
|
8667
8671
|
if (!n) return null;
|
|
8668
8672
|
let r = [n.text];
|
|
8669
8673
|
return r.index = n.index, r.input = e, r.data = n.data, n.replaceWith && (n.text.includes(n.replaceWith) || console.warn("[tiptap warn]: \"inputRuleMatch.replaceWith\" must be part of \"inputRuleMatch.text\"."), r.push(n.replaceWith)), r;
|
|
8670
8674
|
};
|
|
8671
|
-
function
|
|
8675
|
+
function dd(e) {
|
|
8672
8676
|
let { editor: t, from: n, to: r, text: i, rules: a, plugin: o } = e, { view: s } = t;
|
|
8673
8677
|
if (s.composing) return !1;
|
|
8674
8678
|
let c = s.state.doc.resolve(n);
|
|
@@ -8676,7 +8680,7 @@ function ud(e) {
|
|
|
8676
8680
|
let l = !1, u = Cu(c) + i;
|
|
8677
8681
|
return a.forEach((e) => {
|
|
8678
8682
|
if (l) return;
|
|
8679
|
-
let a =
|
|
8683
|
+
let a = ud(u, e.find);
|
|
8680
8684
|
if (!a) return;
|
|
8681
8685
|
let c = s.state.tr, d = Ac({
|
|
8682
8686
|
state: s.state,
|
|
@@ -8703,7 +8707,7 @@ function ud(e) {
|
|
|
8703
8707
|
}), s.dispatch(c), l = !0);
|
|
8704
8708
|
}), l;
|
|
8705
8709
|
}
|
|
8706
|
-
function
|
|
8710
|
+
function fd(e) {
|
|
8707
8711
|
let { editor: t, rules: n } = e, r = new N({
|
|
8708
8712
|
state: {
|
|
8709
8713
|
init() {
|
|
@@ -8717,7 +8721,7 @@ function dd(e) {
|
|
|
8717
8721
|
let { text: e } = s;
|
|
8718
8722
|
e = typeof e == "string" ? e : Yl(T.from(e), a.schema);
|
|
8719
8723
|
let { from: i } = s;
|
|
8720
|
-
|
|
8724
|
+
dd({
|
|
8721
8725
|
editor: t,
|
|
8722
8726
|
from: i,
|
|
8723
8727
|
to: i + e.length,
|
|
@@ -8730,7 +8734,7 @@ function dd(e) {
|
|
|
8730
8734
|
},
|
|
8731
8735
|
props: {
|
|
8732
8736
|
handleTextInput(e, i, a, o) {
|
|
8733
|
-
return
|
|
8737
|
+
return dd({
|
|
8734
8738
|
editor: t,
|
|
8735
8739
|
from: i,
|
|
8736
8740
|
to: a,
|
|
@@ -8741,7 +8745,7 @@ function dd(e) {
|
|
|
8741
8745
|
},
|
|
8742
8746
|
handleDOMEvents: { compositionend: (e) => (setTimeout(() => {
|
|
8743
8747
|
let { $cursor: i } = e.state.selection;
|
|
8744
|
-
i &&
|
|
8748
|
+
i && dd({
|
|
8745
8749
|
editor: t,
|
|
8746
8750
|
from: i.pos,
|
|
8747
8751
|
to: i.pos,
|
|
@@ -8753,7 +8757,7 @@ function dd(e) {
|
|
|
8753
8757
|
handleKeyDown(e, i) {
|
|
8754
8758
|
if (i.key !== "Enter") return !1;
|
|
8755
8759
|
let { $cursor: a } = e.state.selection;
|
|
8756
|
-
return a ?
|
|
8760
|
+
return a ? dd({
|
|
8757
8761
|
editor: t,
|
|
8758
8762
|
from: a.pos,
|
|
8759
8763
|
to: a.pos,
|
|
@@ -8767,19 +8771,19 @@ function dd(e) {
|
|
|
8767
8771
|
});
|
|
8768
8772
|
return r;
|
|
8769
8773
|
}
|
|
8770
|
-
function
|
|
8774
|
+
function pd(e) {
|
|
8771
8775
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
8772
8776
|
}
|
|
8773
|
-
function
|
|
8774
|
-
return
|
|
8777
|
+
function md(e) {
|
|
8778
|
+
return pd(e) === "Object" ? e.constructor === Object && Object.getPrototypeOf(e) === Object.prototype : !1;
|
|
8775
8779
|
}
|
|
8776
|
-
function
|
|
8780
|
+
function hd(e, t) {
|
|
8777
8781
|
let n = { ...e };
|
|
8778
|
-
return
|
|
8779
|
-
|
|
8782
|
+
return md(e) && md(t) && Object.keys(t).forEach((r) => {
|
|
8783
|
+
md(t[r]) && md(e[r]) ? n[r] = hd(e[r], t[r]) : n[r] = t[r];
|
|
8780
8784
|
}), n;
|
|
8781
8785
|
}
|
|
8782
|
-
var
|
|
8786
|
+
var gd = class {
|
|
8783
8787
|
constructor(e = {}) {
|
|
8784
8788
|
this.type = "extendable", this.parent = null, this.child = null, this.name = "", this.config = { name: this.name }, this.config = {
|
|
8785
8789
|
...this.config,
|
|
@@ -8798,7 +8802,7 @@ var hd = class {
|
|
|
8798
8802
|
configure(e = {}) {
|
|
8799
8803
|
let t = this.extend({
|
|
8800
8804
|
...this.config,
|
|
8801
|
-
addOptions: () =>
|
|
8805
|
+
addOptions: () => hd(this.options, e)
|
|
8802
8806
|
});
|
|
8803
8807
|
return t.name = this.name, t.parent = this.parent, t;
|
|
8804
8808
|
}
|
|
@@ -8809,7 +8813,7 @@ var hd = class {
|
|
|
8809
8813
|
});
|
|
8810
8814
|
return t.parent = this, this.child = t, t.name = "name" in e ? e.name : t.parent.name, t;
|
|
8811
8815
|
}
|
|
8812
|
-
},
|
|
8816
|
+
}, _d = class e extends gd {
|
|
8813
8817
|
constructor() {
|
|
8814
8818
|
super(...arguments), this.type = "mark";
|
|
8815
8819
|
}
|
|
@@ -8834,14 +8838,14 @@ var hd = class {
|
|
|
8834
8838
|
return super.extend(t);
|
|
8835
8839
|
}
|
|
8836
8840
|
};
|
|
8837
|
-
function
|
|
8841
|
+
function vd(e) {
|
|
8838
8842
|
return typeof e == "number";
|
|
8839
8843
|
}
|
|
8840
|
-
var
|
|
8844
|
+
var yd = class {
|
|
8841
8845
|
constructor(e) {
|
|
8842
8846
|
this.find = e.find, this.handler = e.handler;
|
|
8843
8847
|
}
|
|
8844
|
-
},
|
|
8848
|
+
}, bd = (e, t, n) => {
|
|
8845
8849
|
if (Gc(t)) return [...e.matchAll(t)];
|
|
8846
8850
|
let r = t(e, n);
|
|
8847
8851
|
return r ? r.map((t) => {
|
|
@@ -8849,7 +8853,7 @@ var vd = class {
|
|
|
8849
8853
|
return n.index = t.index, n.input = e, n.data = t.data, t.replaceWith && (t.text.includes(t.replaceWith) || console.warn("[tiptap warn]: \"pasteRuleMatch.replaceWith\" must be part of \"pasteRuleMatch.text\"."), n.push(t.replaceWith)), n;
|
|
8850
8854
|
}) : [];
|
|
8851
8855
|
};
|
|
8852
|
-
function
|
|
8856
|
+
function xd(e) {
|
|
8853
8857
|
let { editor: t, state: n, from: r, to: i, rule: a, pasteEvent: o, dropEvent: s } = e, { commands: c, chain: l, can: u } = new jc({
|
|
8854
8858
|
editor: t,
|
|
8855
8859
|
state: n
|
|
@@ -8857,7 +8861,7 @@ function bd(e) {
|
|
|
8857
8861
|
return n.doc.nodesBetween(r, i, (e, t) => {
|
|
8858
8862
|
if (e.type?.spec?.code || !(e.isText || e.isTextblock || e.isInline)) return;
|
|
8859
8863
|
let f = e.content?.size ?? e.nodeSize ?? 0, p = Math.max(r, t), m = Math.min(i, t + f);
|
|
8860
|
-
p >= m ||
|
|
8864
|
+
p >= m || bd(e.isText ? e.text || "" : e.textBetween(p - t, m - t, void 0, ""), a.find, o).forEach((e) => {
|
|
8861
8865
|
if (e.index === void 0) return;
|
|
8862
8866
|
let t = p + e.index + 1, r = t + e[0].length, i = {
|
|
8863
8867
|
from: n.tr.mapping.map(t),
|
|
@@ -8876,12 +8880,12 @@ function bd(e) {
|
|
|
8876
8880
|
});
|
|
8877
8881
|
}), d.every((e) => e !== null);
|
|
8878
8882
|
}
|
|
8879
|
-
var
|
|
8883
|
+
var Sd = null, Cd = (e) => {
|
|
8880
8884
|
var t;
|
|
8881
8885
|
let n = new ClipboardEvent("paste", { clipboardData: new DataTransfer() });
|
|
8882
8886
|
return (t = n.clipboardData) == null || t.setData("text/html", e), n;
|
|
8883
8887
|
};
|
|
8884
|
-
function
|
|
8888
|
+
function wd(e) {
|
|
8885
8889
|
let { editor: t, rules: n } = e, r = null, i = !1, a = !1, o = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, s;
|
|
8886
8890
|
try {
|
|
8887
8891
|
s = typeof DragEvent < "u" ? new DragEvent("drop") : null;
|
|
@@ -8890,7 +8894,7 @@ function Cd(e) {
|
|
|
8890
8894
|
}
|
|
8891
8895
|
let c = ({ state: e, from: n, to: r, rule: i, pasteEvt: a }) => {
|
|
8892
8896
|
let c = e.tr;
|
|
8893
|
-
if (!(!
|
|
8897
|
+
if (!(!xd({
|
|
8894
8898
|
editor: t,
|
|
8895
8899
|
state: Ac({
|
|
8896
8900
|
state: e,
|
|
@@ -8913,9 +8917,9 @@ function Cd(e) {
|
|
|
8913
8917
|
return n.map((e) => new N({
|
|
8914
8918
|
view(e) {
|
|
8915
8919
|
let n = (n) => {
|
|
8916
|
-
r = e.dom.parentElement?.contains(n.target) ? e.dom.parentElement : null, r && (
|
|
8920
|
+
r = e.dom.parentElement?.contains(n.target) ? e.dom.parentElement : null, r && (Sd = t);
|
|
8917
8921
|
}, i = () => {
|
|
8918
|
-
|
|
8922
|
+
Sd &&= null;
|
|
8919
8923
|
};
|
|
8920
8924
|
return window.addEventListener("dragstart", n), window.addEventListener("dragend", i), { destroy() {
|
|
8921
8925
|
window.removeEventListener("dragstart", n), window.removeEventListener("dragend", i);
|
|
@@ -8924,7 +8928,7 @@ function Cd(e) {
|
|
|
8924
8928
|
props: { handleDOMEvents: {
|
|
8925
8929
|
drop: (e, t) => {
|
|
8926
8930
|
if (a = r === e.dom.parentElement, s = t, !a) {
|
|
8927
|
-
let e =
|
|
8931
|
+
let e = Sd;
|
|
8928
8932
|
e?.isEditable && setTimeout(() => {
|
|
8929
8933
|
let t = e.state.selection;
|
|
8930
8934
|
t && e.commands.deleteRange({
|
|
@@ -8946,7 +8950,7 @@ function Cd(e) {
|
|
|
8946
8950
|
if (f) {
|
|
8947
8951
|
let { text: t } = d;
|
|
8948
8952
|
t = typeof t == "string" ? t : Yl(T.from(t), r.schema);
|
|
8949
|
-
let { from: n } = d, i = n + t.length, a =
|
|
8953
|
+
let { from: n } = d, i = n + t.length, a = Cd(t);
|
|
8950
8954
|
return c({
|
|
8951
8955
|
rule: e,
|
|
8952
8956
|
state: r,
|
|
@@ -8956,7 +8960,7 @@ function Cd(e) {
|
|
|
8956
8960
|
});
|
|
8957
8961
|
}
|
|
8958
8962
|
let p = n.doc.content.findDiffStart(r.doc.content), m = n.doc.content.findDiffEnd(r.doc.content);
|
|
8959
|
-
if (!(!
|
|
8963
|
+
if (!(!vd(p) || !m || p === m.b)) return c({
|
|
8960
8964
|
rule: e,
|
|
8961
8965
|
state: r,
|
|
8962
8966
|
from: p,
|
|
@@ -8966,7 +8970,7 @@ function Cd(e) {
|
|
|
8966
8970
|
}
|
|
8967
8971
|
}));
|
|
8968
8972
|
}
|
|
8969
|
-
var
|
|
8973
|
+
var Td = class {
|
|
8970
8974
|
constructor(e, t) {
|
|
8971
8975
|
this.splittableMarks = [], this.editor = t, this.baseExtensions = e, this.extensions = uu(e), this.schema = su(this.extensions, t), this.setupExtensions();
|
|
8972
8976
|
}
|
|
@@ -8995,7 +8999,7 @@ var wd = class {
|
|
|
8995
8999
|
editor: e,
|
|
8996
9000
|
type: xu(t.name, this.schema)
|
|
8997
9001
|
}, r = [], i = W(t, "addKeyboardShortcuts", n), a = {};
|
|
8998
|
-
if (t.type === "mark" && W(t, "exitable", n) && (a.ArrowRight = () =>
|
|
9002
|
+
if (t.type === "mark" && W(t, "exitable", n) && (a.ArrowRight = () => _d.handleExit({
|
|
8999
9003
|
editor: e,
|
|
9000
9004
|
mark: t
|
|
9001
9005
|
})), i) {
|
|
@@ -9011,7 +9015,7 @@ var wd = class {
|
|
|
9011
9015
|
if (Ou(t, e.options.enableInputRules) && s) {
|
|
9012
9016
|
let t = s();
|
|
9013
9017
|
if (t && t.length) {
|
|
9014
|
-
let n =
|
|
9018
|
+
let n = fd({
|
|
9015
9019
|
editor: e,
|
|
9016
9020
|
rules: t
|
|
9017
9021
|
}), i = Array.isArray(n) ? n : [n];
|
|
@@ -9022,7 +9026,7 @@ var wd = class {
|
|
|
9022
9026
|
if (Ou(t, e.options.enablePasteRules) && c) {
|
|
9023
9027
|
let t = c();
|
|
9024
9028
|
if (t && t.length) {
|
|
9025
|
-
let n =
|
|
9029
|
+
let n = wd({
|
|
9026
9030
|
editor: e,
|
|
9027
9031
|
rules: t
|
|
9028
9032
|
});
|
|
@@ -9118,7 +9122,7 @@ var wd = class {
|
|
|
9118
9122
|
extension: t,
|
|
9119
9123
|
HTMLAttributes: s,
|
|
9120
9124
|
updateAttributes: (t) => {
|
|
9121
|
-
|
|
9125
|
+
cf(i, e, t);
|
|
9122
9126
|
}
|
|
9123
9127
|
});
|
|
9124
9128
|
}] : [];
|
|
@@ -9140,20 +9144,20 @@ var wd = class {
|
|
|
9140
9144
|
});
|
|
9141
9145
|
}
|
|
9142
9146
|
};
|
|
9143
|
-
|
|
9144
|
-
ClipboardTextSerializer: () =>
|
|
9145
|
-
Commands: () =>
|
|
9146
|
-
Delete: () =>
|
|
9147
|
-
Drop: () =>
|
|
9148
|
-
Editable: () =>
|
|
9149
|
-
FocusEvents: () =>
|
|
9150
|
-
Keymap: () =>
|
|
9151
|
-
Paste: () =>
|
|
9152
|
-
Tabindex: () =>
|
|
9153
|
-
TextDirection: () =>
|
|
9154
|
-
focusEventsPluginKey: () =>
|
|
9147
|
+
Td.resolve = uu, Td.sort = lu, Td.flatten = Jl, kc({}, {
|
|
9148
|
+
ClipboardTextSerializer: () => Ed,
|
|
9149
|
+
Commands: () => Dd,
|
|
9150
|
+
Delete: () => Od,
|
|
9151
|
+
Drop: () => kd,
|
|
9152
|
+
Editable: () => Ad,
|
|
9153
|
+
FocusEvents: () => Md,
|
|
9154
|
+
Keymap: () => Nd,
|
|
9155
|
+
Paste: () => Pd,
|
|
9156
|
+
Tabindex: () => Fd,
|
|
9157
|
+
TextDirection: () => Id,
|
|
9158
|
+
focusEventsPluginKey: () => jd
|
|
9155
9159
|
});
|
|
9156
|
-
var q = class e extends
|
|
9160
|
+
var q = class e extends gd {
|
|
9157
9161
|
constructor() {
|
|
9158
9162
|
super(...arguments), this.type = "extension";
|
|
9159
9163
|
}
|
|
@@ -9167,7 +9171,7 @@ var q = class e extends hd {
|
|
|
9167
9171
|
let t = typeof e == "function" ? e() : e;
|
|
9168
9172
|
return super.extend(t);
|
|
9169
9173
|
}
|
|
9170
|
-
},
|
|
9174
|
+
}, Ed = q.create({
|
|
9171
9175
|
name: "clipboardTextSerializer",
|
|
9172
9176
|
addOptions() {
|
|
9173
9177
|
return { blockSeparator: void 0 };
|
|
@@ -9187,12 +9191,12 @@ var q = class e extends hd {
|
|
|
9187
9191
|
} }
|
|
9188
9192
|
})];
|
|
9189
9193
|
}
|
|
9190
|
-
}),
|
|
9194
|
+
}), Dd = q.create({
|
|
9191
9195
|
name: "commands",
|
|
9192
9196
|
addCommands() {
|
|
9193
9197
|
return { ...Mc };
|
|
9194
9198
|
}
|
|
9195
|
-
}),
|
|
9199
|
+
}), Od = q.create({
|
|
9196
9200
|
name: "delete",
|
|
9197
9201
|
onUpdate({ transaction: e, appendedTransactions: t }) {
|
|
9198
9202
|
let n = () => {
|
|
@@ -9245,7 +9249,7 @@ var q = class e extends hd {
|
|
|
9245
9249
|
};
|
|
9246
9250
|
this.editor.options.coreExtensionOptions?.delete?.async ?? !0 ? setTimeout(n, 0) : n();
|
|
9247
9251
|
}
|
|
9248
|
-
}),
|
|
9252
|
+
}), kd = q.create({
|
|
9249
9253
|
name: "drop",
|
|
9250
9254
|
addProseMirrorPlugins() {
|
|
9251
9255
|
return [new N({
|
|
@@ -9260,7 +9264,7 @@ var q = class e extends hd {
|
|
|
9260
9264
|
} }
|
|
9261
9265
|
})];
|
|
9262
9266
|
}
|
|
9263
|
-
}),
|
|
9267
|
+
}), Ad = q.create({
|
|
9264
9268
|
name: "editable",
|
|
9265
9269
|
addProseMirrorPlugins() {
|
|
9266
9270
|
return [new N({
|
|
@@ -9268,12 +9272,12 @@ var q = class e extends hd {
|
|
|
9268
9272
|
props: { editable: () => this.editor.options.editable }
|
|
9269
9273
|
})];
|
|
9270
9274
|
}
|
|
9271
|
-
}),
|
|
9275
|
+
}), jd = new P("focusEvents"), Md = q.create({
|
|
9272
9276
|
name: "focusEvents",
|
|
9273
9277
|
addProseMirrorPlugins() {
|
|
9274
9278
|
let { editor: e } = this;
|
|
9275
9279
|
return [new N({
|
|
9276
|
-
key:
|
|
9280
|
+
key: jd,
|
|
9277
9281
|
props: { handleDOMEvents: {
|
|
9278
9282
|
focus: (t, n) => {
|
|
9279
9283
|
e.isFocused = !0;
|
|
@@ -9288,7 +9292,7 @@ var q = class e extends hd {
|
|
|
9288
9292
|
} }
|
|
9289
9293
|
})];
|
|
9290
9294
|
}
|
|
9291
|
-
}),
|
|
9295
|
+
}), Nd = q.create({
|
|
9292
9296
|
name: "keymap",
|
|
9293
9297
|
addKeyboardShortcuts() {
|
|
9294
9298
|
let e = () => this.editor.commands.first(({ commands: e }) => [
|
|
@@ -9352,7 +9356,7 @@ var q = class e extends hd {
|
|
|
9352
9356
|
}
|
|
9353
9357
|
})];
|
|
9354
9358
|
}
|
|
9355
|
-
}),
|
|
9359
|
+
}), Pd = q.create({
|
|
9356
9360
|
name: "paste",
|
|
9357
9361
|
addProseMirrorPlugins() {
|
|
9358
9362
|
return [new N({
|
|
@@ -9366,7 +9370,7 @@ var q = class e extends hd {
|
|
|
9366
9370
|
} }
|
|
9367
9371
|
})];
|
|
9368
9372
|
}
|
|
9369
|
-
}),
|
|
9373
|
+
}), Fd = q.create({
|
|
9370
9374
|
name: "tabindex",
|
|
9371
9375
|
addProseMirrorPlugins() {
|
|
9372
9376
|
return [new N({
|
|
@@ -9374,7 +9378,7 @@ var q = class e extends hd {
|
|
|
9374
9378
|
props: { attributes: () => this.editor.isEditable ? { tabindex: "0" } : {} }
|
|
9375
9379
|
})];
|
|
9376
9380
|
}
|
|
9377
|
-
}),
|
|
9381
|
+
}), Id = q.create({
|
|
9378
9382
|
name: "textDirection",
|
|
9379
9383
|
addOptions() {
|
|
9380
9384
|
return { direction: void 0 };
|
|
@@ -9403,7 +9407,7 @@ var q = class e extends hd {
|
|
|
9403
9407
|
} }
|
|
9404
9408
|
})];
|
|
9405
9409
|
}
|
|
9406
|
-
}),
|
|
9410
|
+
}), Ld = class e {
|
|
9407
9411
|
constructor(e, t, n = !1, r = null) {
|
|
9408
9412
|
this.currentNode = null, this.actualDepth = null, this.isBlock = n, this.resolvedPos = e, this.editor = t, this.currentNode = r;
|
|
9409
9413
|
}
|
|
@@ -9523,14 +9527,14 @@ var q = class e extends hd {
|
|
|
9523
9527
|
...e
|
|
9524
9528
|
}), this.editor.view.dispatch(t);
|
|
9525
9529
|
}
|
|
9526
|
-
},
|
|
9527
|
-
function
|
|
9530
|
+
}, Rd = ".ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}";
|
|
9531
|
+
function zd(e, t, n) {
|
|
9528
9532
|
let r = document.querySelector(`style[data-tiptap-style${n ? `-${n}` : ""}]`);
|
|
9529
9533
|
if (r !== null) return r;
|
|
9530
9534
|
let i = document.createElement("style");
|
|
9531
9535
|
return t && i.setAttribute("nonce", t), i.setAttribute(`data-tiptap-style${n ? `-${n}` : ""}`, ""), i.innerHTML = e, document.getElementsByTagName("head")[0].appendChild(i), i;
|
|
9532
9536
|
}
|
|
9533
|
-
var
|
|
9537
|
+
var Bd = class extends cd {
|
|
9534
9538
|
constructor(e = {}) {
|
|
9535
9539
|
super(), this.css = null, this.className = "tiptap", this.editorView = null, this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.instanceId = Math.random().toString(36).slice(2, 9), this.options = {
|
|
9536
9540
|
element: typeof document < "u" ? document.createElement("div") : null,
|
|
@@ -9567,8 +9571,8 @@ var zd = class extends sd {
|
|
|
9567
9571
|
onDelete: () => null,
|
|
9568
9572
|
enableExtensionDispatchTransaction: !0
|
|
9569
9573
|
}, this.isCapturingTransaction = !1, this.capturedTransaction = null, this.utils = {
|
|
9570
|
-
getUpdatedPosition:
|
|
9571
|
-
createMappablePosition:
|
|
9574
|
+
getUpdatedPosition: Pu,
|
|
9575
|
+
createMappablePosition: Fu
|
|
9572
9576
|
}, this.setOptions(e), this.createExtensionManager(), this.createCommandManager(), this.createSchema(), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("mount", this.options.onMount), this.on("unmount", this.options.onUnmount), this.on("contentError", this.options.onContentError), this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", this.options.onFocus), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("drop", ({ event: e, slice: t, moved: n }) => this.options.onDrop(e, t, n)), this.on("paste", ({ event: e, slice: t }) => this.options.onPaste(e, t)), this.on("delete", this.options.onDelete);
|
|
9573
9577
|
let t = this.createDoc(), n = tl(t, this.options.autofocus);
|
|
9574
9578
|
this.editorState = rr.create({
|
|
@@ -9608,7 +9612,7 @@ var zd = class extends sd {
|
|
|
9608
9612
|
return this.commandManager.can();
|
|
9609
9613
|
}
|
|
9610
9614
|
injectCSS() {
|
|
9611
|
-
this.options.injectCSS && typeof document < "u" && (this.css = Rd
|
|
9615
|
+
this.options.injectCSS && typeof document < "u" && (this.css = zd(Rd, this.options.injectNonce));
|
|
9612
9616
|
}
|
|
9613
9617
|
setOptions(e = {}) {
|
|
9614
9618
|
this.options = {
|
|
@@ -9664,17 +9668,17 @@ var zd = class extends sd {
|
|
|
9664
9668
|
return this.view.updateState(r), r;
|
|
9665
9669
|
}
|
|
9666
9670
|
createExtensionManager() {
|
|
9667
|
-
this.extensionManager = new
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
jd,
|
|
9671
|
+
this.extensionManager = new Td([...this.options.enableCoreExtensions ? [
|
|
9672
|
+
Ad,
|
|
9673
|
+
Ed.configure({ blockSeparator: this.options.coreExtensionOptions?.clipboardTextSerializer?.blockSeparator }),
|
|
9674
|
+
Dd,
|
|
9672
9675
|
Md,
|
|
9676
|
+
Nd,
|
|
9677
|
+
Fd,
|
|
9678
|
+
kd,
|
|
9673
9679
|
Pd,
|
|
9674
9680
|
Od,
|
|
9675
|
-
|
|
9676
|
-
Dd,
|
|
9677
|
-
Fd.configure({ direction: this.options.textDirection })
|
|
9681
|
+
Id.configure({ direction: this.options.textDirection })
|
|
9678
9682
|
].filter((e) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[e.name] !== !1 : !0) : [], ...this.options.extensions].filter((e) => [
|
|
9679
9683
|
"extension",
|
|
9680
9684
|
"node",
|
|
@@ -9814,14 +9818,14 @@ var zd = class extends sd {
|
|
|
9814
9818
|
return this.$doc?.querySelectorAll(e, t) || null;
|
|
9815
9819
|
}
|
|
9816
9820
|
$pos(e) {
|
|
9817
|
-
return new
|
|
9821
|
+
return new Ld(this.state.doc.resolve(e), this);
|
|
9818
9822
|
}
|
|
9819
9823
|
get $doc() {
|
|
9820
9824
|
return this.$pos(0);
|
|
9821
9825
|
}
|
|
9822
9826
|
};
|
|
9823
|
-
function
|
|
9824
|
-
return new
|
|
9827
|
+
function Vd(e) {
|
|
9828
|
+
return new ld({
|
|
9825
9829
|
find: e.find,
|
|
9826
9830
|
handler: ({ state: t, range: n, match: r }) => {
|
|
9827
9831
|
let i = G(e.getAttributes, void 0, r);
|
|
@@ -9838,8 +9842,8 @@ function Bd(e) {
|
|
|
9838
9842
|
undoable: e.undoable
|
|
9839
9843
|
});
|
|
9840
9844
|
}
|
|
9841
|
-
function
|
|
9842
|
-
return new
|
|
9845
|
+
function Hd(e) {
|
|
9846
|
+
return new ld({
|
|
9843
9847
|
find: e.find,
|
|
9844
9848
|
handler: ({ state: t, range: n, match: r }) => {
|
|
9845
9849
|
let i = G(e.getAttributes, void 0, r) || {}, { tr: a } = t, o = n.from, s = n.to, c = e.type.create(i);
|
|
@@ -9857,8 +9861,8 @@ function Vd(e) {
|
|
|
9857
9861
|
undoable: e.undoable
|
|
9858
9862
|
});
|
|
9859
9863
|
}
|
|
9860
|
-
function
|
|
9861
|
-
return new
|
|
9864
|
+
function Ud(e) {
|
|
9865
|
+
return new ld({
|
|
9862
9866
|
find: e.find,
|
|
9863
9867
|
handler: ({ state: t, range: n, match: r }) => {
|
|
9864
9868
|
let i = t.doc.resolve(n.from), a = G(e.getAttributes, void 0, r) || {};
|
|
@@ -9868,8 +9872,8 @@ function Hd(e) {
|
|
|
9868
9872
|
undoable: e.undoable
|
|
9869
9873
|
});
|
|
9870
9874
|
}
|
|
9871
|
-
function
|
|
9872
|
-
return new
|
|
9875
|
+
function Wd(e) {
|
|
9876
|
+
return new ld({
|
|
9873
9877
|
find: e.find,
|
|
9874
9878
|
handler: ({ state: t, range: n, match: r, chain: i }) => {
|
|
9875
9879
|
let a = G(e.getAttributes, void 0, r) || {}, o = t.tr.delete(n.from, n.to), s = o.doc.resolve(n.from).blockRange(), c = s && en(s, e.type, a);
|
|
@@ -9891,7 +9895,7 @@ function Ud(e) {
|
|
|
9891
9895
|
undoable: e.undoable
|
|
9892
9896
|
});
|
|
9893
9897
|
}
|
|
9894
|
-
var
|
|
9898
|
+
var Gd = (e) => "touches" in e, Kd = class {
|
|
9895
9899
|
constructor(e) {
|
|
9896
9900
|
this.directions = [
|
|
9897
9901
|
"bottom-left",
|
|
@@ -9980,7 +9984,7 @@ var Wd = (e) => "touches" in e, Gd = class {
|
|
|
9980
9984
|
e ? (this.element.style.width = `${e}px`, this.initialWidth = e) : this.initialWidth = this.element.offsetWidth, t ? (this.element.style.height = `${t}px`, this.initialHeight = t) : this.initialHeight = this.element.offsetHeight, this.initialWidth > 0 && this.initialHeight > 0 && (this.aspectRatio = this.initialWidth / this.initialHeight);
|
|
9981
9985
|
}
|
|
9982
9986
|
handleResizeStart(e, t) {
|
|
9983
|
-
e.preventDefault(), e.stopPropagation(), this.isResizing = !0, this.activeHandle = t,
|
|
9987
|
+
e.preventDefault(), e.stopPropagation(), this.isResizing = !0, this.activeHandle = t, Gd(e) ? (this.startX = e.touches[0].clientX, this.startY = e.touches[0].clientY) : (this.startX = e.clientX, this.startY = e.clientY), this.startWidth = this.element.offsetWidth, this.startHeight = this.element.offsetHeight, this.startWidth > 0 && this.startHeight > 0 && (this.aspectRatio = this.startWidth / this.startHeight), this.getPos(), this.container.dataset.resizeState = "true", this.classNames.resizing && this.container.classList.add(this.classNames.resizing), document.addEventListener("mousemove", this.handleMouseMove), document.addEventListener("touchmove", this.handleTouchMove), document.addEventListener("mouseup", this.handleMouseUp), document.addEventListener("keydown", this.handleKeyDown), document.addEventListener("keyup", this.handleKeyUp);
|
|
9984
9988
|
}
|
|
9985
9989
|
handleResize(e, t) {
|
|
9986
9990
|
if (!this.activeHandle) return;
|
|
@@ -10021,7 +10025,7 @@ var Wd = (e) => "touches" in e, Gd = class {
|
|
|
10021
10025
|
};
|
|
10022
10026
|
}
|
|
10023
10027
|
};
|
|
10024
|
-
function
|
|
10028
|
+
function qd(e, t) {
|
|
10025
10029
|
let { selection: n } = e, { $from: r } = n;
|
|
10026
10030
|
if (n instanceof M) {
|
|
10027
10031
|
let e = r.index();
|
|
@@ -10035,19 +10039,19 @@ function Kd(e, t) {
|
|
|
10035
10039
|
}
|
|
10036
10040
|
return !1;
|
|
10037
10041
|
}
|
|
10038
|
-
function
|
|
10042
|
+
function Jd(e) {
|
|
10039
10043
|
return e.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
10040
10044
|
}
|
|
10041
10045
|
kc({}, {
|
|
10042
|
-
createAtomBlockMarkdownSpec: () =>
|
|
10043
|
-
createBlockMarkdownSpec: () =>
|
|
10044
|
-
createInlineMarkdownSpec: () =>
|
|
10045
|
-
parseAttributes: () =>
|
|
10046
|
-
parseIndentedBlocks: () =>
|
|
10047
|
-
renderNestedMarkdownContent: () =>
|
|
10048
|
-
serializeAttributes: () =>
|
|
10046
|
+
createAtomBlockMarkdownSpec: () => Zd,
|
|
10047
|
+
createBlockMarkdownSpec: () => Qd,
|
|
10048
|
+
createInlineMarkdownSpec: () => tf,
|
|
10049
|
+
parseAttributes: () => Yd,
|
|
10050
|
+
parseIndentedBlocks: () => nf,
|
|
10051
|
+
renderNestedMarkdownContent: () => rf,
|
|
10052
|
+
serializeAttributes: () => Xd
|
|
10049
10053
|
});
|
|
10050
|
-
function
|
|
10054
|
+
function Yd(e) {
|
|
10051
10055
|
if (!e?.trim()) return {};
|
|
10052
10056
|
let t = {}, n = [], r = e.replace(/["']([^"']*)["']/g, (e) => (n.push(e), `__QUOTED_${n.length - 1}__`)), i = r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);
|
|
10053
10057
|
i && (t.class = i.map((e) => e.trim().slice(1)).join(" "));
|
|
@@ -10061,15 +10065,15 @@ function Jd(e) {
|
|
|
10061
10065
|
e.match(/^[a-zA-Z][\w-]*$/) && (t[e] = !0);
|
|
10062
10066
|
}), t;
|
|
10063
10067
|
}
|
|
10064
|
-
function
|
|
10068
|
+
function Xd(e) {
|
|
10065
10069
|
if (!e || Object.keys(e).length === 0) return "";
|
|
10066
10070
|
let t = [];
|
|
10067
10071
|
return e.class && String(e.class).split(/\s+/).filter(Boolean).forEach((e) => t.push(`.${e}`)), e.id && t.push(`#${e.id}`), Object.entries(e).forEach(([e, n]) => {
|
|
10068
10072
|
e === "class" || e === "id" || (n === !0 ? t.push(e) : n !== !1 && n != null && t.push(`${e}="${String(n)}"`));
|
|
10069
10073
|
}), t.join(" ");
|
|
10070
10074
|
}
|
|
10071
|
-
function
|
|
10072
|
-
let { nodeName: t, name: n, parseAttributes: r =
|
|
10075
|
+
function Zd(e) {
|
|
10076
|
+
let { nodeName: t, name: n, parseAttributes: r = Yd, serializeAttributes: i = Xd, defaultAttributes: a = {}, requiredAttributes: o = [], allowedAttributes: s } = e, c = n || t, l = (e) => {
|
|
10073
10077
|
if (!s) return e;
|
|
10074
10078
|
let t = {};
|
|
10075
10079
|
return s.forEach((n) => {
|
|
@@ -10108,8 +10112,8 @@ function Xd(e) {
|
|
|
10108
10112
|
}
|
|
10109
10113
|
};
|
|
10110
10114
|
}
|
|
10111
|
-
function
|
|
10112
|
-
let { nodeName: t, name: n, getContent: r, parseAttributes: i =
|
|
10115
|
+
function Qd(e) {
|
|
10116
|
+
let { nodeName: t, name: n, getContent: r, parseAttributes: i = Yd, serializeAttributes: a = Xd, defaultAttributes: o = {}, content: s = "block", allowedAttributes: c } = e, l = n || t, u = (e) => {
|
|
10113
10117
|
if (!c) return e;
|
|
10114
10118
|
let t = {};
|
|
10115
10119
|
return c.forEach((n) => {
|
|
@@ -10183,7 +10187,7 @@ ${t.renderChildren(e.content || [], "\n\n")}
|
|
|
10183
10187
|
}
|
|
10184
10188
|
};
|
|
10185
10189
|
}
|
|
10186
|
-
function
|
|
10190
|
+
function $d(e) {
|
|
10187
10191
|
if (!e.trim()) return {};
|
|
10188
10192
|
let t = {}, n = /(\w+)=(?:"([^"]*)"|'([^']*)')/g, r = n.exec(e);
|
|
10189
10193
|
for (; r !== null;) {
|
|
@@ -10192,11 +10196,11 @@ function Qd(e) {
|
|
|
10192
10196
|
}
|
|
10193
10197
|
return t;
|
|
10194
10198
|
}
|
|
10195
|
-
function
|
|
10199
|
+
function ef(e) {
|
|
10196
10200
|
return Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => `${e}="${t}"`).join(" ");
|
|
10197
10201
|
}
|
|
10198
|
-
function
|
|
10199
|
-
let { nodeName: t, name: n, getContent: r, parseAttributes: i =
|
|
10202
|
+
function tf(e) {
|
|
10203
|
+
let { nodeName: t, name: n, getContent: r, parseAttributes: i = $d, serializeAttributes: a = ef, defaultAttributes: o = {}, selfClosing: s = !1, allowedAttributes: c } = e, l = n || t, u = (e) => {
|
|
10200
10204
|
if (!c) return e;
|
|
10201
10205
|
let t = {};
|
|
10202
10206
|
return c.forEach((n) => {
|
|
@@ -10253,7 +10257,7 @@ function ef(e) {
|
|
|
10253
10257
|
}
|
|
10254
10258
|
};
|
|
10255
10259
|
}
|
|
10256
|
-
function
|
|
10260
|
+
function nf(e, t, n) {
|
|
10257
10261
|
let r = e.split("\n"), i = [], a = "", o = 0, s = t.baseIndentSize || 2;
|
|
10258
10262
|
for (; o < r.length;) {
|
|
10259
10263
|
let e = r[o], c = e.match(t.itemPattern);
|
|
@@ -10297,7 +10301,7 @@ function tf(e, t, n) {
|
|
|
10297
10301
|
raw: a
|
|
10298
10302
|
};
|
|
10299
10303
|
}
|
|
10300
|
-
function
|
|
10304
|
+
function rf(e, t, n, r) {
|
|
10301
10305
|
if (!e || !Array.isArray(e.content)) return "";
|
|
10302
10306
|
let i = typeof n == "function" ? n(r) : n, [a, ...o] = e.content, s = `${i}${t.renderChildren([a])}`;
|
|
10303
10307
|
return o && o.length > 0 && o.forEach((e, n) => {
|
|
@@ -10311,9 +10315,9 @@ ${n}`;
|
|
|
10311
10315
|
}
|
|
10312
10316
|
}), s;
|
|
10313
10317
|
}
|
|
10314
|
-
var
|
|
10315
|
-
function
|
|
10316
|
-
let n =
|
|
10318
|
+
var af = /* @__PURE__ */ new WeakMap();
|
|
10319
|
+
function of(e, t) {
|
|
10320
|
+
let n = af.get(e);
|
|
10317
10321
|
if (!n) {
|
|
10318
10322
|
let t = {
|
|
10319
10323
|
callbacks: /* @__PURE__ */ new Set(),
|
|
@@ -10324,15 +10328,15 @@ function af(e, t) {
|
|
|
10324
10328
|
});
|
|
10325
10329
|
}
|
|
10326
10330
|
};
|
|
10327
|
-
|
|
10331
|
+
af.set(e, t), e.on("update", t.handler), n = t;
|
|
10328
10332
|
}
|
|
10329
10333
|
n.callbacks.add(t);
|
|
10330
10334
|
}
|
|
10331
|
-
function
|
|
10332
|
-
let n =
|
|
10333
|
-
n && (n.callbacks.delete(t), n.callbacks.size === 0 && (n.rafId !== null && cancelAnimationFrame(n.rafId), e.off("update", n.handler),
|
|
10335
|
+
function sf(e, t) {
|
|
10336
|
+
let n = af.get(e);
|
|
10337
|
+
n && (n.callbacks.delete(t), n.callbacks.size === 0 && (n.rafId !== null && cancelAnimationFrame(n.rafId), e.off("update", n.handler), af.delete(e)));
|
|
10334
10338
|
}
|
|
10335
|
-
function
|
|
10339
|
+
function cf(e, t, n = {}) {
|
|
10336
10340
|
let { state: r } = t, { doc: i, tr: a } = r, o = e;
|
|
10337
10341
|
i.descendants((t, r) => {
|
|
10338
10342
|
let i = a.mapping.map(r), s = a.mapping.map(r) + t.nodeSize, c = null;
|
|
@@ -10352,7 +10356,7 @@ function sf(e, t, n = {}) {
|
|
|
10352
10356
|
}
|
|
10353
10357
|
}), a.docChanged && t.view.dispatch(a);
|
|
10354
10358
|
}
|
|
10355
|
-
var J = class e extends
|
|
10359
|
+
var J = class e extends gd {
|
|
10356
10360
|
constructor() {
|
|
10357
10361
|
super(...arguments), this.type = "node";
|
|
10358
10362
|
}
|
|
@@ -10366,7 +10370,7 @@ var J = class e extends hd {
|
|
|
10366
10370
|
let t = typeof e == "function" ? e() : e;
|
|
10367
10371
|
return super.extend(t);
|
|
10368
10372
|
}
|
|
10369
|
-
},
|
|
10373
|
+
}, lf = class {
|
|
10370
10374
|
constructor(e, t, n) {
|
|
10371
10375
|
this.isDragging = !1, this.component = e, this.editor = t.editor, this.options = {
|
|
10372
10376
|
stopEvent: null,
|
|
@@ -10458,8 +10462,8 @@ var J = class e extends hd {
|
|
|
10458
10462
|
});
|
|
10459
10463
|
}
|
|
10460
10464
|
};
|
|
10461
|
-
function
|
|
10462
|
-
return new
|
|
10465
|
+
function uf(e) {
|
|
10466
|
+
return new yd({
|
|
10463
10467
|
find: e.find,
|
|
10464
10468
|
handler: ({ state: t, range: n, match: r, pasteEvent: i }) => {
|
|
10465
10469
|
let a = G(e.getAttributes, void 0, r, i);
|
|
@@ -10475,13 +10479,13 @@ function lf(e) {
|
|
|
10475
10479
|
}
|
|
10476
10480
|
//#endregion
|
|
10477
10481
|
//#region ../../node_modules/.pnpm/fast-equals@5.4.0/node_modules/fast-equals/dist/es/index.mjs
|
|
10478
|
-
var { getOwnPropertyNames:
|
|
10479
|
-
function
|
|
10482
|
+
var { getOwnPropertyNames: df, getOwnPropertySymbols: ff } = Object, { hasOwnProperty: pf } = Object.prototype;
|
|
10483
|
+
function mf(e, t) {
|
|
10480
10484
|
return function(n, r, i) {
|
|
10481
10485
|
return e(n, r, i) && t(n, r, i);
|
|
10482
10486
|
};
|
|
10483
10487
|
}
|
|
10484
|
-
function
|
|
10488
|
+
function hf(e) {
|
|
10485
10489
|
return function(t, n, r) {
|
|
10486
10490
|
if (!t || !n || typeof t != "object" || typeof n != "object") return e(t, n, r);
|
|
10487
10491
|
let { cache: i } = r, a = i.get(t), o = i.get(n);
|
|
@@ -10491,39 +10495,39 @@ function mf(e) {
|
|
|
10491
10495
|
return i.delete(t), i.delete(n), s;
|
|
10492
10496
|
};
|
|
10493
10497
|
}
|
|
10494
|
-
function
|
|
10498
|
+
function gf(e) {
|
|
10495
10499
|
return e?.[Symbol.toStringTag];
|
|
10496
10500
|
}
|
|
10497
|
-
function
|
|
10498
|
-
return
|
|
10501
|
+
function _f(e) {
|
|
10502
|
+
return df(e).concat(ff(e));
|
|
10499
10503
|
}
|
|
10500
|
-
var
|
|
10501
|
-
function
|
|
10504
|
+
var vf = Object.hasOwn || ((e, t) => pf.call(e, t));
|
|
10505
|
+
function yf(e, t) {
|
|
10502
10506
|
return e === t || !e && !t && e !== e && t !== t;
|
|
10503
10507
|
}
|
|
10504
|
-
var
|
|
10505
|
-
function
|
|
10506
|
-
return e.byteLength === t.byteLength &&
|
|
10508
|
+
var bf = "__v", xf = "__o", Sf = "_owner", { getOwnPropertyDescriptor: Cf, keys: wf } = Object;
|
|
10509
|
+
function Tf(e, t) {
|
|
10510
|
+
return e.byteLength === t.byteLength && Rf(new Uint8Array(e), new Uint8Array(t));
|
|
10507
10511
|
}
|
|
10508
|
-
function
|
|
10512
|
+
function Ef(e, t, n) {
|
|
10509
10513
|
let r = e.length;
|
|
10510
10514
|
if (t.length !== r) return !1;
|
|
10511
10515
|
for (; r-- > 0;) if (!n.equals(e[r], t[r], r, r, e, t, n)) return !1;
|
|
10512
10516
|
return !0;
|
|
10513
10517
|
}
|
|
10514
|
-
function Ef(e, t) {
|
|
10515
|
-
return e.byteLength === t.byteLength && Lf(new Uint8Array(e.buffer, e.byteOffset, e.byteLength), new Uint8Array(t.buffer, t.byteOffset, t.byteLength));
|
|
10516
|
-
}
|
|
10517
10518
|
function Df(e, t) {
|
|
10518
|
-
return
|
|
10519
|
+
return e.byteLength === t.byteLength && Rf(new Uint8Array(e.buffer, e.byteOffset, e.byteLength), new Uint8Array(t.buffer, t.byteOffset, t.byteLength));
|
|
10519
10520
|
}
|
|
10520
10521
|
function Of(e, t) {
|
|
10521
|
-
return e.
|
|
10522
|
+
return yf(e.getTime(), t.getTime());
|
|
10522
10523
|
}
|
|
10523
10524
|
function kf(e, t) {
|
|
10525
|
+
return e.name === t.name && e.message === t.message && e.cause === t.cause && e.stack === t.stack;
|
|
10526
|
+
}
|
|
10527
|
+
function Af(e, t) {
|
|
10524
10528
|
return e === t;
|
|
10525
10529
|
}
|
|
10526
|
-
function
|
|
10530
|
+
function jf(e, t, n) {
|
|
10527
10531
|
let r = e.size;
|
|
10528
10532
|
if (r !== t.size) return !1;
|
|
10529
10533
|
if (!r) return !0;
|
|
@@ -10547,27 +10551,27 @@ function Af(e, t, n) {
|
|
|
10547
10551
|
}
|
|
10548
10552
|
return !0;
|
|
10549
10553
|
}
|
|
10550
|
-
var
|
|
10551
|
-
function
|
|
10552
|
-
let r =
|
|
10553
|
-
if (
|
|
10554
|
-
for (; i-- > 0;) if (!
|
|
10554
|
+
var Mf = yf;
|
|
10555
|
+
function Nf(e, t, n) {
|
|
10556
|
+
let r = wf(e), i = r.length;
|
|
10557
|
+
if (wf(t).length !== i) return !1;
|
|
10558
|
+
for (; i-- > 0;) if (!Bf(e, t, n, r[i])) return !1;
|
|
10555
10559
|
return !0;
|
|
10556
10560
|
}
|
|
10557
|
-
function
|
|
10558
|
-
let r =
|
|
10559
|
-
if (
|
|
10561
|
+
function Pf(e, t, n) {
|
|
10562
|
+
let r = _f(e), i = r.length;
|
|
10563
|
+
if (_f(t).length !== i) return !1;
|
|
10560
10564
|
let a, o, s;
|
|
10561
|
-
for (; i-- > 0;) if (a = r[i], !
|
|
10565
|
+
for (; i-- > 0;) if (a = r[i], !Bf(e, t, n, a) || (o = Cf(e, a), s = Cf(t, a), (o || s) && (!o || !s || o.configurable !== s.configurable || o.enumerable !== s.enumerable || o.writable !== s.writable))) return !1;
|
|
10562
10566
|
return !0;
|
|
10563
10567
|
}
|
|
10564
|
-
function Pf(e, t) {
|
|
10565
|
-
return vf(e.valueOf(), t.valueOf());
|
|
10566
|
-
}
|
|
10567
10568
|
function Ff(e, t) {
|
|
10569
|
+
return yf(e.valueOf(), t.valueOf());
|
|
10570
|
+
}
|
|
10571
|
+
function If(e, t) {
|
|
10568
10572
|
return e.source === t.source && e.flags === t.flags;
|
|
10569
10573
|
}
|
|
10570
|
-
function
|
|
10574
|
+
function Lf(e, t, n) {
|
|
10571
10575
|
let r = e.size;
|
|
10572
10576
|
if (r !== t.size) return !1;
|
|
10573
10577
|
if (!r) return !0;
|
|
@@ -10585,19 +10589,19 @@ function If(e, t, n) {
|
|
|
10585
10589
|
}
|
|
10586
10590
|
return !0;
|
|
10587
10591
|
}
|
|
10588
|
-
function
|
|
10592
|
+
function Rf(e, t) {
|
|
10589
10593
|
let n = e.byteLength;
|
|
10590
10594
|
if (t.byteLength !== n || e.byteOffset !== t.byteOffset) return !1;
|
|
10591
10595
|
for (; n-- > 0;) if (e[n] !== t[n]) return !1;
|
|
10592
10596
|
return !0;
|
|
10593
10597
|
}
|
|
10594
|
-
function
|
|
10598
|
+
function zf(e, t) {
|
|
10595
10599
|
return e.hostname === t.hostname && e.pathname === t.pathname && e.protocol === t.protocol && e.port === t.port && e.hash === t.hash && e.username === t.username && e.password === t.password;
|
|
10596
10600
|
}
|
|
10597
|
-
function
|
|
10598
|
-
return (r ===
|
|
10601
|
+
function Bf(e, t, n, r) {
|
|
10602
|
+
return (r === Sf || r === xf || r === bf) && (e.$$typeof || t.$$typeof) ? !0 : vf(t, r) && n.equals(e[r], t[r], r, r, e, t, n);
|
|
10599
10603
|
}
|
|
10600
|
-
var
|
|
10604
|
+
var Vf = "[object ArrayBuffer]", Hf = "[object Arguments]", Uf = "[object Boolean]", Wf = "[object DataView]", Gf = "[object Date]", Kf = "[object Error]", qf = "[object Map]", Jf = "[object Number]", Yf = "[object Object]", Xf = "[object RegExp]", Zf = "[object Set]", Qf = "[object String]", $f = {
|
|
10601
10605
|
"[object Int8Array]": !0,
|
|
10602
10606
|
"[object Uint8Array]": !0,
|
|
10603
10607
|
"[object Uint8ClampedArray]": !0,
|
|
@@ -10610,8 +10614,8 @@ var Bf = "[object ArrayBuffer]", Vf = "[object Arguments]", Hf = "[object Boolea
|
|
|
10610
10614
|
"[object Float64Array]": !0,
|
|
10611
10615
|
"[object BigInt64Array]": !0,
|
|
10612
10616
|
"[object BigUint64Array]": !0
|
|
10613
|
-
},
|
|
10614
|
-
function
|
|
10617
|
+
}, ep = "[object URL]", tp = Object.prototype.toString;
|
|
10618
|
+
function np({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n, areDatesEqual: r, areErrorsEqual: i, areFunctionsEqual: a, areMapsEqual: o, areNumbersEqual: s, areObjectsEqual: c, arePrimitiveWrappersEqual: l, areRegExpsEqual: u, areSetsEqual: d, areTypedArraysEqual: f, areUrlsEqual: p, unknownTagComparators: m }) {
|
|
10615
10619
|
return function(h, g, _) {
|
|
10616
10620
|
if (h === g) return !0;
|
|
10617
10621
|
if (h == null || g == null) return !1;
|
|
@@ -10626,23 +10630,23 @@ function tp({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n,
|
|
|
10626
10630
|
if (y === RegExp) return u(h, g, _);
|
|
10627
10631
|
if (y === Map) return o(h, g, _);
|
|
10628
10632
|
if (y === Set) return d(h, g, _);
|
|
10629
|
-
let b =
|
|
10630
|
-
if (b ===
|
|
10631
|
-
if (b ===
|
|
10632
|
-
if (b ===
|
|
10633
|
-
if (b ===
|
|
10634
|
-
if (b ===
|
|
10635
|
-
if (b ===
|
|
10636
|
-
if (b ===
|
|
10637
|
-
if (b ===
|
|
10638
|
-
if (
|
|
10639
|
-
if (b ===
|
|
10640
|
-
if (b ===
|
|
10641
|
-
if (b ===
|
|
10633
|
+
let b = tp.call(h);
|
|
10634
|
+
if (b === Gf) return r(h, g, _);
|
|
10635
|
+
if (b === Xf) return u(h, g, _);
|
|
10636
|
+
if (b === qf) return o(h, g, _);
|
|
10637
|
+
if (b === Zf) return d(h, g, _);
|
|
10638
|
+
if (b === Yf) return typeof h.then != "function" && typeof g.then != "function" && c(h, g, _);
|
|
10639
|
+
if (b === ep) return p(h, g, _);
|
|
10640
|
+
if (b === Kf) return i(h, g, _);
|
|
10641
|
+
if (b === Hf) return c(h, g, _);
|
|
10642
|
+
if ($f[b]) return f(h, g, _);
|
|
10643
|
+
if (b === Vf) return e(h, g, _);
|
|
10644
|
+
if (b === Wf) return n(h, g, _);
|
|
10645
|
+
if (b === Uf || b === Jf || b === Qf) return l(h, g, _);
|
|
10642
10646
|
if (m) {
|
|
10643
10647
|
let e = m[b];
|
|
10644
10648
|
if (!e) {
|
|
10645
|
-
let t =
|
|
10649
|
+
let t = gf(h);
|
|
10646
10650
|
t && (e = m[t]);
|
|
10647
10651
|
}
|
|
10648
10652
|
if (e) return e(h, g, _);
|
|
@@ -10650,26 +10654,26 @@ function tp({ areArrayBuffersEqual: e, areArraysEqual: t, areDataViewsEqual: n,
|
|
|
10650
10654
|
return !1;
|
|
10651
10655
|
};
|
|
10652
10656
|
}
|
|
10653
|
-
function
|
|
10657
|
+
function rp({ circular: e, createCustomConfig: t, strict: n }) {
|
|
10654
10658
|
let r = {
|
|
10655
|
-
areArrayBuffersEqual:
|
|
10656
|
-
areArraysEqual: n ?
|
|
10657
|
-
areDataViewsEqual:
|
|
10658
|
-
areDatesEqual:
|
|
10659
|
-
areErrorsEqual:
|
|
10660
|
-
areFunctionsEqual:
|
|
10661
|
-
areMapsEqual: n ?
|
|
10662
|
-
areNumbersEqual:
|
|
10663
|
-
areObjectsEqual: n ?
|
|
10664
|
-
arePrimitiveWrappersEqual:
|
|
10665
|
-
areRegExpsEqual:
|
|
10666
|
-
areSetsEqual: n ?
|
|
10667
|
-
areTypedArraysEqual: n ?
|
|
10668
|
-
areUrlsEqual:
|
|
10659
|
+
areArrayBuffersEqual: Tf,
|
|
10660
|
+
areArraysEqual: n ? Pf : Ef,
|
|
10661
|
+
areDataViewsEqual: Df,
|
|
10662
|
+
areDatesEqual: Of,
|
|
10663
|
+
areErrorsEqual: kf,
|
|
10664
|
+
areFunctionsEqual: Af,
|
|
10665
|
+
areMapsEqual: n ? mf(jf, Pf) : jf,
|
|
10666
|
+
areNumbersEqual: Mf,
|
|
10667
|
+
areObjectsEqual: n ? Pf : Nf,
|
|
10668
|
+
arePrimitiveWrappersEqual: Ff,
|
|
10669
|
+
areRegExpsEqual: If,
|
|
10670
|
+
areSetsEqual: n ? mf(Lf, Pf) : Lf,
|
|
10671
|
+
areTypedArraysEqual: n ? mf(Rf, Pf) : Rf,
|
|
10672
|
+
areUrlsEqual: zf,
|
|
10669
10673
|
unknownTagComparators: void 0
|
|
10670
10674
|
};
|
|
10671
10675
|
if (t && (r = Object.assign({}, r, t(r))), e) {
|
|
10672
|
-
let e =
|
|
10676
|
+
let e = hf(r.areArraysEqual), t = hf(r.areMapsEqual), n = hf(r.areObjectsEqual), i = hf(r.areSetsEqual);
|
|
10673
10677
|
r = Object.assign({}, r, {
|
|
10674
10678
|
areArraysEqual: e,
|
|
10675
10679
|
areMapsEqual: t,
|
|
@@ -10679,12 +10683,12 @@ function np({ circular: e, createCustomConfig: t, strict: n }) {
|
|
|
10679
10683
|
}
|
|
10680
10684
|
return r;
|
|
10681
10685
|
}
|
|
10682
|
-
function
|
|
10686
|
+
function ip(e) {
|
|
10683
10687
|
return function(t, n, r, i, a, o, s) {
|
|
10684
10688
|
return e(t, n, s);
|
|
10685
10689
|
};
|
|
10686
10690
|
}
|
|
10687
|
-
function
|
|
10691
|
+
function ap({ circular: e, comparator: t, createState: n, equals: r, strict: i }) {
|
|
10688
10692
|
if (n) return function(a, o) {
|
|
10689
10693
|
let { cache: s = e ? /* @__PURE__ */ new WeakMap() : void 0, meta: c } = n();
|
|
10690
10694
|
return t(a, o, {
|
|
@@ -10712,42 +10716,42 @@ function ip({ circular: e, comparator: t, createState: n, equals: r, strict: i }
|
|
|
10712
10716
|
return t(e, n, a);
|
|
10713
10717
|
};
|
|
10714
10718
|
}
|
|
10715
|
-
var
|
|
10716
|
-
|
|
10719
|
+
var op = sp();
|
|
10720
|
+
sp({ strict: !0 }), sp({ circular: !0 }), sp({
|
|
10717
10721
|
circular: !0,
|
|
10718
10722
|
strict: !0
|
|
10719
|
-
}),
|
|
10723
|
+
}), sp({ createInternalComparator: () => yf }), sp({
|
|
10720
10724
|
strict: !0,
|
|
10721
|
-
createInternalComparator: () =>
|
|
10722
|
-
}),
|
|
10725
|
+
createInternalComparator: () => yf
|
|
10726
|
+
}), sp({
|
|
10723
10727
|
circular: !0,
|
|
10724
|
-
createInternalComparator: () =>
|
|
10725
|
-
}),
|
|
10728
|
+
createInternalComparator: () => yf
|
|
10729
|
+
}), sp({
|
|
10726
10730
|
circular: !0,
|
|
10727
|
-
createInternalComparator: () =>
|
|
10731
|
+
createInternalComparator: () => yf,
|
|
10728
10732
|
strict: !0
|
|
10729
10733
|
});
|
|
10730
|
-
function
|
|
10731
|
-
let { circular: t = !1, createInternalComparator: n, createState: r, strict: i = !1 } = e, a =
|
|
10732
|
-
return
|
|
10734
|
+
function sp(e = {}) {
|
|
10735
|
+
let { circular: t = !1, createInternalComparator: n, createState: r, strict: i = !1 } = e, a = np(rp(e));
|
|
10736
|
+
return ap({
|
|
10733
10737
|
circular: t,
|
|
10734
10738
|
comparator: a,
|
|
10735
10739
|
createState: r,
|
|
10736
|
-
equals: n ? n(a) :
|
|
10740
|
+
equals: n ? n(a) : ip(a),
|
|
10737
10741
|
strict: i
|
|
10738
10742
|
});
|
|
10739
10743
|
}
|
|
10740
10744
|
//#endregion
|
|
10741
|
-
//#region ../../node_modules/.pnpm/@tiptap+react@3.22.
|
|
10742
|
-
var
|
|
10745
|
+
//#region ../../node_modules/.pnpm/@tiptap+react@3.22.5_@floating-ui+dom@1.7.6_@tiptap+core@3.22.5_@tiptap+pm@3.22.5__@tip_412b5dd72844165b28cdb59267386b00/node_modules/@tiptap/react/dist/index.js
|
|
10746
|
+
var cp = (...e) => (t) => {
|
|
10743
10747
|
e.forEach((e) => {
|
|
10744
10748
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
10745
10749
|
});
|
|
10746
|
-
},
|
|
10750
|
+
}, lp = ({ contentComponent: e }) => {
|
|
10747
10751
|
let t = ae(e.subscribe, e.getSnapshot, e.getServerSnapshot);
|
|
10748
10752
|
return /* @__PURE__ */ C(ee, { children: Object.values(t) });
|
|
10749
10753
|
};
|
|
10750
|
-
function
|
|
10754
|
+
function up() {
|
|
10751
10755
|
let e = /* @__PURE__ */ new Set(), t = {};
|
|
10752
10756
|
return {
|
|
10753
10757
|
subscribe(t) {
|
|
@@ -10773,7 +10777,7 @@ function lp() {
|
|
|
10773
10777
|
}
|
|
10774
10778
|
};
|
|
10775
10779
|
}
|
|
10776
|
-
var
|
|
10780
|
+
var dp = class extends l.Component {
|
|
10777
10781
|
constructor(e) {
|
|
10778
10782
|
super(e), this.editorContentRef = l.createRef();
|
|
10779
10783
|
}
|
|
@@ -10788,7 +10792,7 @@ var up = class extends l.Component {
|
|
|
10788
10792
|
if (e && !e.isDestroyed && e.view.dom?.parentNode) {
|
|
10789
10793
|
if (e.contentComponent) return;
|
|
10790
10794
|
let t = this.editorContentRef.current;
|
|
10791
|
-
t.append(...e.view.dom.parentNode.childNodes), e.setOptions({ element: t }), e.contentComponent =
|
|
10795
|
+
t.append(...e.view.dom.parentNode.childNodes), e.setOptions({ element: t }), e.contentComponent = up(), e.createNodeViews(), e.isEditorContentInitialized = !0, this.forceUpdate();
|
|
10792
10796
|
}
|
|
10793
10797
|
}
|
|
10794
10798
|
componentWillUnmount() {
|
|
@@ -10805,18 +10809,18 @@ var up = class extends l.Component {
|
|
|
10805
10809
|
render() {
|
|
10806
10810
|
let { editor: e, innerRef: t, ...n } = this.props;
|
|
10807
10811
|
return /* @__PURE__ */ te(ee, { children: [/* @__PURE__ */ C("div", {
|
|
10808
|
-
ref:
|
|
10812
|
+
ref: cp(t, this.editorContentRef),
|
|
10809
10813
|
...n
|
|
10810
|
-
}), e?.contentComponent && /* @__PURE__ */ C(
|
|
10814
|
+
}), e?.contentComponent && /* @__PURE__ */ C(lp, { contentComponent: e.contentComponent })] });
|
|
10811
10815
|
}
|
|
10812
|
-
},
|
|
10816
|
+
}, fp = p((e, t) => {
|
|
10813
10817
|
let n = l.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [e.editor]);
|
|
10814
|
-
return l.createElement(
|
|
10818
|
+
return l.createElement(dp, {
|
|
10815
10819
|
key: n,
|
|
10816
10820
|
innerRef: t,
|
|
10817
10821
|
...e
|
|
10818
10822
|
});
|
|
10819
|
-
}),
|
|
10823
|
+
}), pp = l.memo(fp), mp = typeof window < "u" ? v : _, hp = class {
|
|
10820
10824
|
constructor(e) {
|
|
10821
10825
|
this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = e, this.lastSnapshot = {
|
|
10822
10826
|
editor: e,
|
|
@@ -10851,11 +10855,11 @@ var up = class extends l.Component {
|
|
|
10851
10855
|
}
|
|
10852
10856
|
}
|
|
10853
10857
|
};
|
|
10854
|
-
function
|
|
10855
|
-
let [t] = x(() => new
|
|
10856
|
-
return
|
|
10858
|
+
function gp(e) {
|
|
10859
|
+
let [t] = x(() => new hp(e.editor)), n = oe(t.subscribe, t.getSnapshot, t.getServerSnapshot, e.selector, e.equalityFn ?? op);
|
|
10860
|
+
return mp(() => t.watch(e.editor), [e.editor, t]), g(n), n;
|
|
10857
10861
|
}
|
|
10858
|
-
var
|
|
10862
|
+
var _p = process.env.NODE_ENV !== "production", vp = typeof window > "u", yp = vp || !!(typeof window < "u" && window.next), bp = class e {
|
|
10859
10863
|
constructor(e) {
|
|
10860
10864
|
this.editor = null, this.subscriptions = /* @__PURE__ */ new Set(), this.isComponentMounted = !1, this.previousDeps = null, this.instanceId = "", this.options = e, this.subscriptions = /* @__PURE__ */ new Set(), this.setEditor(this.getInitialEditor()), this.scheduleDestroy(), this.getEditor = this.getEditor.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.subscribe = this.subscribe.bind(this), this.refreshEditorInstance = this.refreshEditorInstance.bind(this), this.scheduleDestroy = this.scheduleDestroy.bind(this), this.onRender = this.onRender.bind(this), this.createEditor = this.createEditor.bind(this);
|
|
10861
10865
|
}
|
|
@@ -10864,17 +10868,17 @@ var gp = process.env.NODE_ENV !== "production", _p = typeof window > "u", vp = _
|
|
|
10864
10868
|
}
|
|
10865
10869
|
getInitialEditor() {
|
|
10866
10870
|
if (this.options.current.immediatelyRender === void 0) {
|
|
10867
|
-
if (
|
|
10868
|
-
if (
|
|
10871
|
+
if (vp || yp) {
|
|
10872
|
+
if (_p) throw Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");
|
|
10869
10873
|
return null;
|
|
10870
10874
|
}
|
|
10871
10875
|
return this.createEditor();
|
|
10872
10876
|
}
|
|
10873
|
-
if (this.options.current.immediatelyRender &&
|
|
10877
|
+
if (this.options.current.immediatelyRender && vp && _p) throw Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");
|
|
10874
10878
|
return this.options.current.immediatelyRender ? this.createEditor() : null;
|
|
10875
10879
|
}
|
|
10876
10880
|
createEditor() {
|
|
10877
|
-
return new
|
|
10881
|
+
return new Bd({
|
|
10878
10882
|
...this.options.current,
|
|
10879
10883
|
onBeforeCreate: (...e) => {
|
|
10880
10884
|
var t;
|
|
@@ -10981,23 +10985,23 @@ var gp = process.env.NODE_ENV !== "production", _p = typeof window > "u", vp = _
|
|
|
10981
10985
|
}, 1);
|
|
10982
10986
|
}
|
|
10983
10987
|
};
|
|
10984
|
-
function
|
|
10988
|
+
function xp(e = {}, t = []) {
|
|
10985
10989
|
let n = b(e);
|
|
10986
10990
|
n.current = e;
|
|
10987
|
-
let [r] = x(() => new
|
|
10988
|
-
return g(i), _(r.onRender(t)),
|
|
10991
|
+
let [r] = x(() => new bp(n)), i = ae(r.subscribe, r.getEditor, r.getServerSnapshot);
|
|
10992
|
+
return g(i), _(r.onRender(t)), gp({
|
|
10989
10993
|
editor: i,
|
|
10990
10994
|
selector: ({ transactionNumber: t }) => e.shouldRerenderOnTransaction === !1 || e.shouldRerenderOnTransaction === void 0 ? null : e.immediatelyRender && t === 0 ? 0 : t + 1
|
|
10991
10995
|
}), i;
|
|
10992
10996
|
}
|
|
10993
|
-
var
|
|
10994
|
-
|
|
10995
|
-
var
|
|
10997
|
+
var Sp = u({ editor: null });
|
|
10998
|
+
Sp.Consumer;
|
|
10999
|
+
var Cp = () => h(Sp), wp = u({
|
|
10996
11000
|
onDragStart: () => {},
|
|
10997
11001
|
nodeViewContentChildren: void 0,
|
|
10998
11002
|
nodeViewContentRef: () => {}
|
|
10999
|
-
}),
|
|
11000
|
-
let { onDragStart: n } =
|
|
11003
|
+
}), Tp = () => h(wp), Ep = l.forwardRef((e, t) => {
|
|
11004
|
+
let { onDragStart: n } = Tp();
|
|
11001
11005
|
return /* @__PURE__ */ C(e.as || "div", {
|
|
11002
11006
|
...e,
|
|
11003
11007
|
ref: t,
|
|
@@ -11009,30 +11013,30 @@ var Sp = () => h(xp), Cp = u({
|
|
|
11009
11013
|
}
|
|
11010
11014
|
});
|
|
11011
11015
|
});
|
|
11012
|
-
function
|
|
11016
|
+
function Dp(e) {
|
|
11013
11017
|
return !!(typeof e == "function" && e.prototype && e.prototype.isReactComponent);
|
|
11014
11018
|
}
|
|
11015
|
-
function
|
|
11019
|
+
function Op(e) {
|
|
11016
11020
|
return !!(typeof e == "object" && e.$$typeof && (e.$$typeof.toString() === "Symbol(react.forward_ref)" || e.$$typeof.description === "react.forward_ref"));
|
|
11017
11021
|
}
|
|
11018
|
-
function
|
|
11022
|
+
function kp(e) {
|
|
11019
11023
|
return !!(typeof e == "object" && e.$$typeof && (e.$$typeof.toString() === "Symbol(react.memo)" || e.$$typeof.description === "react.memo"));
|
|
11020
11024
|
}
|
|
11021
|
-
function
|
|
11022
|
-
if (
|
|
11023
|
-
if (
|
|
11025
|
+
function Ap(e) {
|
|
11026
|
+
if (Dp(e) || Op(e)) return !0;
|
|
11027
|
+
if (kp(e)) {
|
|
11024
11028
|
let t = e.type;
|
|
11025
|
-
if (t) return
|
|
11029
|
+
if (t) return Dp(t) || Op(t);
|
|
11026
11030
|
}
|
|
11027
11031
|
return !1;
|
|
11028
11032
|
}
|
|
11029
|
-
function
|
|
11033
|
+
function jp() {
|
|
11030
11034
|
try {
|
|
11031
11035
|
if (S) return parseInt(S.split(".")[0], 10) >= 19;
|
|
11032
11036
|
} catch {}
|
|
11033
11037
|
return !1;
|
|
11034
11038
|
}
|
|
11035
|
-
var
|
|
11039
|
+
var Mp = class {
|
|
11036
11040
|
constructor(e, { editor: t, props: n = {}, as: r = "div", className: i = "" }) {
|
|
11037
11041
|
this.ref = null, this.destroyed = !1, this.id = Math.floor(Math.random() * 4294967295).toString(), this.component = e, this.editor = t, this.props = n, this.element = document.createElement(r), this.element.classList.add("react-renderer"), i && this.element.classList.add(...i.split(" ")), this.editor.isEditorContentInitialized ? ie(() => {
|
|
11038
11042
|
this.render();
|
|
@@ -11043,7 +11047,7 @@ var jp = class {
|
|
|
11043
11047
|
render() {
|
|
11044
11048
|
var e;
|
|
11045
11049
|
if (this.destroyed) return;
|
|
11046
|
-
let t = this.component, n = this.props, r = this.editor, i =
|
|
11050
|
+
let t = this.component, n = this.props, r = this.editor, i = jp(), a = Ap(t), o = { ...n };
|
|
11047
11051
|
o.ref && !(i || a) && delete o.ref, !o.ref && (i || a) && (o.ref = (e) => {
|
|
11048
11052
|
this.ref = e;
|
|
11049
11053
|
}), this.reactElement = /* @__PURE__ */ C(t, { ...o }), (e = r?.contentComponent) == null || e.setRenderer(this.id, this);
|
|
@@ -11068,7 +11072,7 @@ var jp = class {
|
|
|
11068
11072
|
}
|
|
11069
11073
|
};
|
|
11070
11074
|
l.createContext({ markViewContentRef: () => {} });
|
|
11071
|
-
var
|
|
11075
|
+
var Np = class extends lf {
|
|
11072
11076
|
constructor(e, t, n) {
|
|
11073
11077
|
if (super(e, t, n), this.selectionRafId = null, this.positionCheckCallback = null, this.cachedExtensionWithSyncedStorage = null, !this.node.isLeaf) {
|
|
11074
11078
|
this.options.contentDOMElementTag ? this.contentDOMElement = document.createElement(this.options.contentDOMElementTag) : this.contentDOMElement = document.createElement(this.node.isInline ? "span" : "div"), this.contentDOMElement.dataset.nodeViewContentReact = "", this.contentDOMElement.dataset.nodeViewWrapper = "", this.contentDOMElement.style.whiteSpace = "inherit";
|
|
@@ -11110,7 +11114,7 @@ var Mp = class extends cf {
|
|
|
11110
11114
|
nodeViewContentRef: (e) => {
|
|
11111
11115
|
e && this.contentDOMElement && e.firstChild !== this.contentDOMElement && (e.hasAttribute("data-node-view-wrapper") && e.removeAttribute("data-node-view-wrapper"), e.appendChild(this.contentDOMElement));
|
|
11112
11116
|
}
|
|
11113
|
-
}, n = this.component, r = m((e) => /* @__PURE__ */ C(
|
|
11117
|
+
}, n = this.component, r = m((e) => /* @__PURE__ */ C(wp.Provider, {
|
|
11114
11118
|
value: t,
|
|
11115
11119
|
children: d(n, e)
|
|
11116
11120
|
}));
|
|
@@ -11118,7 +11122,7 @@ var Mp = class extends cf {
|
|
|
11118
11122
|
let i = this.node.isInline ? "span" : "div";
|
|
11119
11123
|
this.options.as && (i = this.options.as);
|
|
11120
11124
|
let { className: a = "" } = this.options;
|
|
11121
|
-
this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this), this.renderer = new
|
|
11125
|
+
this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this), this.renderer = new Mp(r, {
|
|
11122
11126
|
editor: this.editor,
|
|
11123
11127
|
props: e,
|
|
11124
11128
|
as: i,
|
|
@@ -11126,7 +11130,7 @@ var Mp = class extends cf {
|
|
|
11126
11130
|
}), this.editor.on("selectionUpdate", this.handleSelectionUpdate), this.updateElementAttributes(), this.currentPos = this.getPos(), this.positionCheckCallback = () => {
|
|
11127
11131
|
let e = this.getPos();
|
|
11128
11132
|
typeof e != "number" || e === this.currentPos || (this.currentPos = e, this.renderer.updateProps({ getPos: () => this.getPos() }), typeof this.options.attrs == "function" && this.updateElementAttributes());
|
|
11129
|
-
},
|
|
11133
|
+
}, of(this.editor, this.positionCheckCallback);
|
|
11130
11134
|
}
|
|
11131
11135
|
get dom() {
|
|
11132
11136
|
if (this.renderer.element.firstElementChild && !this.renderer.element.firstElementChild?.hasAttribute("data-node-view-wrapper")) throw Error("Please use the NodeViewWrapper component for your node view.");
|
|
@@ -11138,8 +11142,13 @@ var Mp = class extends cf {
|
|
|
11138
11142
|
handleSelectionUpdate() {
|
|
11139
11143
|
this.selectionRafId &&= (cancelAnimationFrame(this.selectionRafId), null), this.selectionRafId = requestAnimationFrame(() => {
|
|
11140
11144
|
this.selectionRafId = null;
|
|
11141
|
-
let
|
|
11142
|
-
if (typeof
|
|
11145
|
+
let e = this.currentPos;
|
|
11146
|
+
if (typeof e == "number") if (Mu({
|
|
11147
|
+
selection: this.editor.state.selection,
|
|
11148
|
+
pos: e,
|
|
11149
|
+
nodeSize: this.node.nodeSize,
|
|
11150
|
+
selectedOnTextSelection: this.options.selectedOnTextSelection
|
|
11151
|
+
})) {
|
|
11143
11152
|
if (this.renderer.props.selected) return;
|
|
11144
11153
|
this.selectNode();
|
|
11145
11154
|
} else {
|
|
@@ -11191,7 +11200,7 @@ var Mp = class extends cf {
|
|
|
11191
11200
|
this.renderer.updateProps({ selected: !1 }), this.renderer.element.classList.remove("ProseMirror-selectednode");
|
|
11192
11201
|
}
|
|
11193
11202
|
destroy() {
|
|
11194
|
-
this.renderer.destroy(), this.editor.off("selectionUpdate", this.handleSelectionUpdate), this.positionCheckCallback &&= (
|
|
11203
|
+
this.renderer.destroy(), this.editor.off("selectionUpdate", this.handleSelectionUpdate), this.positionCheckCallback &&= (sf(this.editor, this.positionCheckCallback), null), this.contentDOMElement = null, this.selectionRafId &&= (cancelAnimationFrame(this.selectionRafId), null);
|
|
11195
11204
|
}
|
|
11196
11205
|
updateElementAttributes() {
|
|
11197
11206
|
if (this.options.attrs) {
|
|
@@ -11207,39 +11216,39 @@ var Mp = class extends cf {
|
|
|
11207
11216
|
}
|
|
11208
11217
|
}
|
|
11209
11218
|
};
|
|
11210
|
-
function
|
|
11211
|
-
return (n) => n.editor.contentComponent ? new
|
|
11219
|
+
function Pp(e, t) {
|
|
11220
|
+
return (n) => n.editor.contentComponent ? new Np(e, n, t) : {};
|
|
11212
11221
|
}
|
|
11213
|
-
var
|
|
11222
|
+
var Fp = u({ get editor() {
|
|
11214
11223
|
throw Error("useTiptap must be used within a <Tiptap> provider");
|
|
11215
11224
|
} });
|
|
11216
|
-
|
|
11217
|
-
var
|
|
11218
|
-
function
|
|
11225
|
+
Fp.displayName = "TiptapContext";
|
|
11226
|
+
var Ip = () => h(Fp);
|
|
11227
|
+
function Lp({ editor: e, instance: t, children: n }) {
|
|
11219
11228
|
let r = e ?? t;
|
|
11220
11229
|
if (!r) throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");
|
|
11221
11230
|
let i = y(() => ({ editor: r }), [r]), a = y(() => ({ editor: r }), [r]);
|
|
11222
|
-
return /* @__PURE__ */ C(
|
|
11231
|
+
return /* @__PURE__ */ C(Sp.Provider, {
|
|
11223
11232
|
value: a,
|
|
11224
|
-
children: /* @__PURE__ */ C(
|
|
11233
|
+
children: /* @__PURE__ */ C(Fp.Provider, {
|
|
11225
11234
|
value: i,
|
|
11226
11235
|
children: n
|
|
11227
11236
|
})
|
|
11228
11237
|
});
|
|
11229
11238
|
}
|
|
11230
|
-
|
|
11231
|
-
function
|
|
11232
|
-
let { editor: t } =
|
|
11233
|
-
return /* @__PURE__ */ C(
|
|
11239
|
+
Lp.displayName = "Tiptap";
|
|
11240
|
+
function Rp({ ...e }) {
|
|
11241
|
+
let { editor: t } = Ip();
|
|
11242
|
+
return /* @__PURE__ */ C(pp, {
|
|
11234
11243
|
editor: t,
|
|
11235
11244
|
...e
|
|
11236
11245
|
});
|
|
11237
11246
|
}
|
|
11238
|
-
|
|
11247
|
+
Rp.displayName = "Tiptap.Content", Object.assign(Lp, { Content: Rp });
|
|
11239
11248
|
//#endregion
|
|
11240
|
-
//#region ../../node_modules/.pnpm/@tiptap+suggestion@3.22.
|
|
11241
|
-
function
|
|
11242
|
-
let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c =
|
|
11249
|
+
//#region ../../node_modules/.pnpm/@tiptap+suggestion@3.22.5_@tiptap+core@3.22.5_@tiptap+pm@3.22.5__@tiptap+pm@3.22.5/node_modules/@tiptap/suggestion/dist/index.js
|
|
11250
|
+
function zp(e) {
|
|
11251
|
+
let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c = Jd(t), l = RegExp(`\\s${c}$`), u = a ? "^" : "", d = r ? "" : c, f = RegExp(s ? `${u}${c}.*?(?=\\s${d}|$)` : `${u}(?:^)?${c}[^\\s${d}]*`, "gm"), p = o.nodeBefore?.isText && o.nodeBefore.text;
|
|
11243
11252
|
if (!p) return null;
|
|
11244
11253
|
let m = o.pos - p.length, h = Array.from(p.matchAll(f)).pop();
|
|
11245
11254
|
if (!h || h.input === void 0 || h.index === void 0) return null;
|
|
@@ -11255,7 +11264,7 @@ function Rp(e) {
|
|
|
11255
11264
|
text: h[0]
|
|
11256
11265
|
} : null;
|
|
11257
11266
|
}
|
|
11258
|
-
function
|
|
11267
|
+
function Bp(e) {
|
|
11259
11268
|
return e.docChanged ? e.steps.some((e) => {
|
|
11260
11269
|
let t = e.slice;
|
|
11261
11270
|
if (!t?.content) return !1;
|
|
@@ -11263,8 +11272,8 @@ function zp(e) {
|
|
|
11263
11272
|
return /\s/.test(n);
|
|
11264
11273
|
}) : !1;
|
|
11265
11274
|
}
|
|
11266
|
-
var
|
|
11267
|
-
function
|
|
11275
|
+
var Vp = new P("suggestion");
|
|
11276
|
+
function Hp({ pluginKey: e = Vp, editor: t, char: n = "@", allowSpaces: r = !1, allowToIncludeChar: i = !1, allowedPrefixes: a = [" "], startOfLine: o = !1, decorationTag: s = "span", decorationClass: c = "suggestion", decorationContent: l = "", decorationEmptyClass: u = "is-empty", command: d = () => null, items: f = () => [], render: p = () => ({}), allow: m = () => !0, findSuggestionMatch: h = zp, shouldShow: g, shouldResetDismissed: _ }) {
|
|
11268
11277
|
let v, y = p?.(), b = r && !i, x = () => {
|
|
11269
11278
|
let e = t.state.selection.$anchor.pos, { top: n, right: r, bottom: i, left: a } = t.view.coordsAtPos(e);
|
|
11270
11279
|
try {
|
|
@@ -11282,7 +11291,7 @@ function Vp({ pluginKey: e = Bp, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
11282
11291
|
match: e,
|
|
11283
11292
|
transaction: i,
|
|
11284
11293
|
allowSpaces: b
|
|
11285
|
-
}) ? !1 : b ? e.range.from === n.from : e.range.from === n.from && !
|
|
11294
|
+
}) ? !1 : b ? e.range.from === n.from : e.range.from === n.from && !Bp(i);
|
|
11286
11295
|
function C(n, r) {
|
|
11287
11296
|
var i;
|
|
11288
11297
|
try {
|
|
@@ -11435,7 +11444,7 @@ function Vp({ pluginKey: e = Bp, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
11435
11444
|
});
|
|
11436
11445
|
return te;
|
|
11437
11446
|
}
|
|
11438
|
-
var
|
|
11447
|
+
var Up = Hp, Wp = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Gp = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Kp = _d.create({
|
|
11439
11448
|
name: "highlight",
|
|
11440
11449
|
addOptions() {
|
|
11441
11450
|
return {
|
|
@@ -11493,18 +11502,18 @@ var Hp = Vp, Up = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Wp = /(?:^|\s)
|
|
|
11493
11502
|
return { "Mod-Shift-h": () => this.editor.commands.toggleHighlight() };
|
|
11494
11503
|
},
|
|
11495
11504
|
addInputRules() {
|
|
11496
|
-
return [
|
|
11497
|
-
find:
|
|
11505
|
+
return [Vd({
|
|
11506
|
+
find: Wp,
|
|
11498
11507
|
type: this.type
|
|
11499
11508
|
})];
|
|
11500
11509
|
},
|
|
11501
11510
|
addPasteRules() {
|
|
11502
|
-
return [
|
|
11503
|
-
find:
|
|
11511
|
+
return [uf({
|
|
11512
|
+
find: Gp,
|
|
11504
11513
|
type: this.type
|
|
11505
11514
|
})];
|
|
11506
11515
|
}
|
|
11507
|
-
}),
|
|
11516
|
+
}), qp = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Jp = J.create({
|
|
11508
11517
|
name: "image",
|
|
11509
11518
|
addOptions() {
|
|
11510
11519
|
return {
|
|
@@ -11559,7 +11568,7 @@ var Hp = Vp, Up = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Wp = /(?:^|\s)
|
|
|
11559
11568
|
break;
|
|
11560
11569
|
}
|
|
11561
11570
|
}), c.src = o.src;
|
|
11562
|
-
let l = new
|
|
11571
|
+
let l = new Kd({
|
|
11563
11572
|
element: c,
|
|
11564
11573
|
editor: s,
|
|
11565
11574
|
node: i,
|
|
@@ -11596,8 +11605,8 @@ var Hp = Vp, Up = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Wp = /(?:^|\s)
|
|
|
11596
11605
|
}) };
|
|
11597
11606
|
},
|
|
11598
11607
|
addInputRules() {
|
|
11599
|
-
return [
|
|
11600
|
-
find:
|
|
11608
|
+
return [Hd({
|
|
11609
|
+
find: qp,
|
|
11601
11610
|
type: this.type,
|
|
11602
11611
|
getAttributes: (e) => {
|
|
11603
11612
|
let [, , t, n, r] = e;
|
|
@@ -11611,8 +11620,8 @@ var Hp = Vp, Up = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Wp = /(?:^|\s)
|
|
|
11611
11620
|
}
|
|
11612
11621
|
});
|
|
11613
11622
|
//#endregion
|
|
11614
|
-
//#region ../../node_modules/.pnpm/@tiptap+extension-mention@3.22.
|
|
11615
|
-
function
|
|
11623
|
+
//#region ../../node_modules/.pnpm/@tiptap+extension-mention@3.22.5_@tiptap+core@3.22.5_@tiptap+pm@3.22.5__@tiptap+pm@3.22_ae7a1836036be3f01f61ed6915cb0f6e/node_modules/@tiptap/extension-mention/dist/index.js
|
|
11624
|
+
function Yp({ editor: e, overrideSuggestionOptions: t, extensionName: n, char: r = "@" }) {
|
|
11616
11625
|
return {
|
|
11617
11626
|
editor: e,
|
|
11618
11627
|
char: r,
|
|
@@ -11637,19 +11646,19 @@ function Jp({ editor: e, overrideSuggestionOptions: t, extensionName: n, char: r
|
|
|
11637
11646
|
...t
|
|
11638
11647
|
};
|
|
11639
11648
|
}
|
|
11640
|
-
function
|
|
11641
|
-
return (e.options.suggestions.length ? e.options.suggestions : [e.options.suggestion]).map((t) =>
|
|
11649
|
+
function Xp(e) {
|
|
11650
|
+
return (e.options.suggestions.length ? e.options.suggestions : [e.options.suggestion]).map((t) => Yp({
|
|
11642
11651
|
editor: e.editor,
|
|
11643
11652
|
overrideSuggestionOptions: t,
|
|
11644
11653
|
extensionName: e.name,
|
|
11645
11654
|
char: t.char
|
|
11646
11655
|
}));
|
|
11647
11656
|
}
|
|
11648
|
-
function
|
|
11649
|
-
let n =
|
|
11657
|
+
function Zp(e, t) {
|
|
11658
|
+
let n = Xp(e);
|
|
11650
11659
|
return n.find((e) => e.char === t) || (n.length ? n[0] : null);
|
|
11651
11660
|
}
|
|
11652
|
-
var
|
|
11661
|
+
var Qp = J.create({
|
|
11653
11662
|
name: "mention",
|
|
11654
11663
|
priority: 101,
|
|
11655
11664
|
addOptions() {
|
|
@@ -11697,7 +11706,7 @@ var Zp = J.create({
|
|
|
11697
11706
|
return [{ tag: `span[data-type="${this.name}"]` }];
|
|
11698
11707
|
},
|
|
11699
11708
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
11700
|
-
let n =
|
|
11709
|
+
let n = Zp(this, e.attrs.mentionSuggestionChar);
|
|
11701
11710
|
if (this.options.renderLabel !== void 0) return console.warn("renderLabel is deprecated use renderText and renderHTML instead"), [
|
|
11702
11711
|
"span",
|
|
11703
11712
|
K({ "data-type": this.name }, this.options.HTMLAttributes, t),
|
|
@@ -11720,7 +11729,7 @@ var Zp = J.create({
|
|
|
11720
11729
|
i
|
|
11721
11730
|
] : i;
|
|
11722
11731
|
},
|
|
11723
|
-
...
|
|
11732
|
+
...tf({
|
|
11724
11733
|
nodeName: "mention",
|
|
11725
11734
|
name: "@",
|
|
11726
11735
|
selfClosing: !0,
|
|
@@ -11746,7 +11755,7 @@ var Zp = J.create({
|
|
|
11746
11755
|
let t = {
|
|
11747
11756
|
options: this.options,
|
|
11748
11757
|
node: e,
|
|
11749
|
-
suggestion:
|
|
11758
|
+
suggestion: Zp(this, e.attrs.mentionSuggestionChar)
|
|
11750
11759
|
};
|
|
11751
11760
|
return this.options.renderLabel === void 0 ? this.options.renderText(t) : (console.warn("renderLabel is deprecated use renderText and renderHTML instead"), this.options.renderLabel(t));
|
|
11752
11761
|
},
|
|
@@ -11761,17 +11770,17 @@ var Zp = J.create({
|
|
|
11761
11770
|
}) };
|
|
11762
11771
|
},
|
|
11763
11772
|
addProseMirrorPlugins() {
|
|
11764
|
-
return
|
|
11773
|
+
return Xp(this).map(Hp);
|
|
11765
11774
|
}
|
|
11766
11775
|
});
|
|
11767
11776
|
//#endregion
|
|
11768
11777
|
//#region ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js
|
|
11769
|
-
function
|
|
11778
|
+
function $p(e = {}) {
|
|
11770
11779
|
return new N({ view(t) {
|
|
11771
|
-
return new
|
|
11780
|
+
return new em(t, e);
|
|
11772
11781
|
} });
|
|
11773
11782
|
}
|
|
11774
|
-
var
|
|
11783
|
+
var em = class {
|
|
11775
11784
|
constructor(e, t) {
|
|
11776
11785
|
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = t.width ?? 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = [
|
|
11777
11786
|
"dragover",
|
|
@@ -11862,7 +11871,7 @@ var $p = class {
|
|
|
11862
11871
|
dragleave(e) {
|
|
11863
11872
|
this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
|
|
11864
11873
|
}
|
|
11865
|
-
},
|
|
11874
|
+
}, tm = class e extends A {
|
|
11866
11875
|
constructor(e) {
|
|
11867
11876
|
super(e, e);
|
|
11868
11877
|
}
|
|
@@ -11887,11 +11896,11 @@ var $p = class {
|
|
|
11887
11896
|
return new e(t.resolve(n.pos));
|
|
11888
11897
|
}
|
|
11889
11898
|
getBookmark() {
|
|
11890
|
-
return new
|
|
11899
|
+
return new nm(this.anchor);
|
|
11891
11900
|
}
|
|
11892
11901
|
static valid(e) {
|
|
11893
11902
|
let t = e.parent;
|
|
11894
|
-
if (t.inlineContent || !
|
|
11903
|
+
if (t.inlineContent || !im(e) || !am(e)) return !1;
|
|
11895
11904
|
let n = t.type.spec.allowGapCursor;
|
|
11896
11905
|
if (n != null) return n;
|
|
11897
11906
|
let r = t.contentMatchAt(e.index()).defaultType;
|
|
@@ -11928,8 +11937,8 @@ var $p = class {
|
|
|
11928
11937
|
}
|
|
11929
11938
|
}
|
|
11930
11939
|
};
|
|
11931
|
-
|
|
11932
|
-
var
|
|
11940
|
+
tm.prototype.visible = !1, tm.findFrom = tm.findGapCursorFrom, A.jsonID("gapcursor", tm);
|
|
11941
|
+
var nm = class e {
|
|
11933
11942
|
constructor(e) {
|
|
11934
11943
|
this.pos = e;
|
|
11935
11944
|
}
|
|
@@ -11938,13 +11947,13 @@ var tm = class e {
|
|
|
11938
11947
|
}
|
|
11939
11948
|
resolve(e) {
|
|
11940
11949
|
let t = e.resolve(this.pos);
|
|
11941
|
-
return
|
|
11950
|
+
return tm.valid(t) ? new tm(t) : A.near(t);
|
|
11942
11951
|
}
|
|
11943
11952
|
};
|
|
11944
|
-
function
|
|
11953
|
+
function rm(e) {
|
|
11945
11954
|
return e.isAtom || e.spec.isolating || e.spec.createGapCursor;
|
|
11946
11955
|
}
|
|
11947
|
-
function
|
|
11956
|
+
function im(e) {
|
|
11948
11957
|
for (let t = e.depth; t >= 0; t--) {
|
|
11949
11958
|
let n = e.index(t), r = e.node(t);
|
|
11950
11959
|
if (n == 0) {
|
|
@@ -11952,13 +11961,13 @@ function rm(e) {
|
|
|
11952
11961
|
continue;
|
|
11953
11962
|
}
|
|
11954
11963
|
for (let e = r.child(n - 1);; e = e.lastChild) {
|
|
11955
|
-
if (e.childCount == 0 && !e.inlineContent ||
|
|
11964
|
+
if (e.childCount == 0 && !e.inlineContent || rm(e.type)) return !0;
|
|
11956
11965
|
if (e.inlineContent) return !1;
|
|
11957
11966
|
}
|
|
11958
11967
|
}
|
|
11959
11968
|
return !0;
|
|
11960
11969
|
}
|
|
11961
|
-
function
|
|
11970
|
+
function am(e) {
|
|
11962
11971
|
for (let t = e.depth; t >= 0; t--) {
|
|
11963
11972
|
let n = e.indexAfter(t), r = e.node(t);
|
|
11964
11973
|
if (n == r.childCount) {
|
|
@@ -11966,30 +11975,30 @@ function im(e) {
|
|
|
11966
11975
|
continue;
|
|
11967
11976
|
}
|
|
11968
11977
|
for (let e = r.child(n);; e = e.firstChild) {
|
|
11969
|
-
if (e.childCount == 0 && !e.inlineContent ||
|
|
11978
|
+
if (e.childCount == 0 && !e.inlineContent || rm(e.type)) return !0;
|
|
11970
11979
|
if (e.inlineContent) return !1;
|
|
11971
11980
|
}
|
|
11972
11981
|
}
|
|
11973
11982
|
return !0;
|
|
11974
11983
|
}
|
|
11975
|
-
function
|
|
11984
|
+
function om() {
|
|
11976
11985
|
return new N({ props: {
|
|
11977
|
-
decorations:
|
|
11986
|
+
decorations: dm,
|
|
11978
11987
|
createSelectionBetween(e, t, n) {
|
|
11979
|
-
return t.pos == n.pos &&
|
|
11988
|
+
return t.pos == n.pos && tm.valid(n) ? new tm(n) : null;
|
|
11980
11989
|
},
|
|
11981
|
-
handleClick:
|
|
11982
|
-
handleKeyDown:
|
|
11983
|
-
handleDOMEvents: { beforeinput:
|
|
11990
|
+
handleClick: lm,
|
|
11991
|
+
handleKeyDown: sm,
|
|
11992
|
+
handleDOMEvents: { beforeinput: um }
|
|
11984
11993
|
} });
|
|
11985
11994
|
}
|
|
11986
|
-
var
|
|
11987
|
-
ArrowLeft:
|
|
11988
|
-
ArrowRight:
|
|
11989
|
-
ArrowUp:
|
|
11990
|
-
ArrowDown:
|
|
11995
|
+
var sm = Dc({
|
|
11996
|
+
ArrowLeft: cm("horiz", -1),
|
|
11997
|
+
ArrowRight: cm("horiz", 1),
|
|
11998
|
+
ArrowUp: cm("vert", -1),
|
|
11999
|
+
ArrowDown: cm("vert", 1)
|
|
11991
12000
|
});
|
|
11992
|
-
function
|
|
12001
|
+
function cm(e, t) {
|
|
11993
12002
|
let n = e == "vert" ? t > 0 ? "down" : "up" : t > 0 ? "right" : "left";
|
|
11994
12003
|
return function(e, r, i) {
|
|
11995
12004
|
let a = e.selection, o = t > 0 ? a.$to : a.$from, s = a.empty;
|
|
@@ -11997,22 +12006,22 @@ function sm(e, t) {
|
|
|
11997
12006
|
if (!i.endOfTextblock(n) || o.depth == 0) return !1;
|
|
11998
12007
|
s = !1, o = e.doc.resolve(t > 0 ? o.after() : o.before());
|
|
11999
12008
|
}
|
|
12000
|
-
let c =
|
|
12001
|
-
return c ? (r && r(e.tr.setSelection(new
|
|
12009
|
+
let c = tm.findGapCursorFrom(o, t, s);
|
|
12010
|
+
return c ? (r && r(e.tr.setSelection(new tm(c))), !0) : !1;
|
|
12002
12011
|
};
|
|
12003
12012
|
}
|
|
12004
|
-
function
|
|
12013
|
+
function lm(e, t, n) {
|
|
12005
12014
|
if (!e || !e.editable) return !1;
|
|
12006
12015
|
let r = e.state.doc.resolve(t);
|
|
12007
|
-
if (!
|
|
12016
|
+
if (!tm.valid(r)) return !1;
|
|
12008
12017
|
let i = e.posAtCoords({
|
|
12009
12018
|
left: n.clientX,
|
|
12010
12019
|
top: n.clientY
|
|
12011
12020
|
});
|
|
12012
|
-
return i && i.inside > -1 && M.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new
|
|
12021
|
+
return i && i.inside > -1 && M.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new tm(r))), !0);
|
|
12013
12022
|
}
|
|
12014
|
-
function
|
|
12015
|
-
if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof
|
|
12023
|
+
function um(e, t) {
|
|
12024
|
+
if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof tm)) return !1;
|
|
12016
12025
|
let { $from: n } = e.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);
|
|
12017
12026
|
if (!r) return !1;
|
|
12018
12027
|
let i = T.empty;
|
|
@@ -12020,20 +12029,20 @@ function lm(e, t) {
|
|
|
12020
12029
|
let a = e.state.tr.replace(n.pos, n.pos, new D(i, 0, 0));
|
|
12021
12030
|
return a.setSelection(j.near(a.doc.resolve(n.pos + 1))), e.dispatch(a), !1;
|
|
12022
12031
|
}
|
|
12023
|
-
function
|
|
12024
|
-
if (!(e.selection instanceof
|
|
12032
|
+
function dm(e) {
|
|
12033
|
+
if (!(e.selection instanceof tm)) return null;
|
|
12025
12034
|
let t = document.createElement("div");
|
|
12026
12035
|
return t.className = "ProseMirror-gapcursor", B.create(e.doc, [Es.widget(e.selection.head, t, { key: "gapcursor" })]);
|
|
12027
12036
|
}
|
|
12028
12037
|
//#endregion
|
|
12029
12038
|
//#region ../../node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.js
|
|
12030
|
-
var
|
|
12039
|
+
var fm = 200, Y = function() {};
|
|
12031
12040
|
Y.prototype.append = function(e) {
|
|
12032
|
-
return e.length ? (e = Y.from(e), !this.length && e || e.length <
|
|
12041
|
+
return e.length ? (e = Y.from(e), !this.length && e || e.length < fm && this.leafAppend(e) || this.length < fm && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
12033
12042
|
}, Y.prototype.prepend = function(e) {
|
|
12034
12043
|
return e.length ? Y.from(e).append(this) : this;
|
|
12035
12044
|
}, Y.prototype.appendInner = function(e) {
|
|
12036
|
-
return new
|
|
12045
|
+
return new mm(this, e);
|
|
12037
12046
|
}, Y.prototype.slice = function(e, t) {
|
|
12038
12047
|
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? Y.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
12039
12048
|
}, Y.prototype.get = function(e) {
|
|
@@ -12047,9 +12056,9 @@ Y.prototype.append = function(e) {
|
|
|
12047
12056
|
return r.push(e(t, n));
|
|
12048
12057
|
}, t, n), r;
|
|
12049
12058
|
}, Y.from = function(e) {
|
|
12050
|
-
return e instanceof Y ? e : e && e.length ? new
|
|
12059
|
+
return e instanceof Y ? e : e && e.length ? new pm(e) : Y.empty;
|
|
12051
12060
|
};
|
|
12052
|
-
var
|
|
12061
|
+
var pm = /* @__PURE__ */ function(e) {
|
|
12053
12062
|
function t(t) {
|
|
12054
12063
|
e.call(this), this.values = t;
|
|
12055
12064
|
}
|
|
@@ -12069,17 +12078,17 @@ var fm = /* @__PURE__ */ function(e) {
|
|
|
12069
12078
|
}, t.prototype.forEachInvertedInner = function(e, t, n, r) {
|
|
12070
12079
|
for (var i = t - 1; i >= n; i--) if (e(this.values[i], r + i) === !1) return !1;
|
|
12071
12080
|
}, t.prototype.leafAppend = function(e) {
|
|
12072
|
-
if (this.length + e.length <=
|
|
12081
|
+
if (this.length + e.length <= fm) return new t(this.values.concat(e.flatten()));
|
|
12073
12082
|
}, t.prototype.leafPrepend = function(e) {
|
|
12074
|
-
if (this.length + e.length <=
|
|
12083
|
+
if (this.length + e.length <= fm) return new t(e.flatten().concat(this.values));
|
|
12075
12084
|
}, n.length.get = function() {
|
|
12076
12085
|
return this.values.length;
|
|
12077
12086
|
}, n.depth.get = function() {
|
|
12078
12087
|
return 0;
|
|
12079
12088
|
}, Object.defineProperties(t.prototype, n), t;
|
|
12080
12089
|
}(Y);
|
|
12081
|
-
Y.empty = new
|
|
12082
|
-
var
|
|
12090
|
+
Y.empty = new pm([]);
|
|
12091
|
+
var mm = /* @__PURE__ */ function(e) {
|
|
12083
12092
|
function t(t, n) {
|
|
12084
12093
|
e.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
|
|
12085
12094
|
}
|
|
@@ -12106,7 +12115,7 @@ var pm = /* @__PURE__ */ function(e) {
|
|
|
12106
12115
|
}, t.prototype.appendInner = function(e) {
|
|
12107
12116
|
return this.left.depth >= Math.max(this.right.depth, e.depth) + 1 ? new t(this.left, new t(this.right, e)) : new t(this, e);
|
|
12108
12117
|
}, t;
|
|
12109
|
-
}(Y),
|
|
12118
|
+
}(Y), hm = 500, gm = class e {
|
|
12110
12119
|
constructor(e, t) {
|
|
12111
12120
|
this.items = e, this.eventCount = t;
|
|
12112
12121
|
}
|
|
@@ -12126,9 +12135,9 @@ var pm = /* @__PURE__ */ function(e) {
|
|
|
12126
12135
|
return;
|
|
12127
12136
|
}
|
|
12128
12137
|
if (i) {
|
|
12129
|
-
u.push(new
|
|
12138
|
+
u.push(new vm(t.map));
|
|
12130
12139
|
let e = t.step.map(i.slice(a)), n;
|
|
12131
|
-
e && o.maybeStep(e).doc && (n = o.mapping.maps[o.mapping.maps.length - 1], l.push(new
|
|
12140
|
+
e && o.maybeStep(e).doc && (n = o.mapping.maps[o.mapping.maps.length - 1], l.push(new vm(n, void 0, void 0, l.length + u.length))), a--, n && i.appendMap(n, a);
|
|
12132
12141
|
} else o.maybeStep(t.step);
|
|
12133
12142
|
if (t.selection) return s = i ? t.selection.map(i.slice(a)) : t.selection, c = new e(this.items.slice(0, r).append(u.reverse().concat(l)), this.eventCount - 1), !1;
|
|
12134
12143
|
}, this.items.length, 0), {
|
|
@@ -12140,11 +12149,11 @@ var pm = /* @__PURE__ */ function(e) {
|
|
|
12140
12149
|
addTransform(t, n, r, i) {
|
|
12141
12150
|
let a = [], o = this.eventCount, s = this.items, c = !i && s.length ? s.get(s.length - 1) : null;
|
|
12142
12151
|
for (let e = 0; e < t.steps.length; e++) {
|
|
12143
|
-
let r = t.steps[e].invert(t.docs[e]), l = new
|
|
12152
|
+
let r = t.steps[e].invert(t.docs[e]), l = new vm(t.mapping.maps[e], r, n), u;
|
|
12144
12153
|
(u = c && c.merge(l)) && (l = u, e ? a.pop() : s = s.slice(0, s.length - 1)), a.push(l), n &&= (o++, void 0), i || (c = l);
|
|
12145
12154
|
}
|
|
12146
12155
|
let l = o - r.depth;
|
|
12147
|
-
return l >
|
|
12156
|
+
return l > bm && (s = _m(s, l), o -= l), new e(s.append(a), o);
|
|
12148
12157
|
}
|
|
12149
12158
|
remapping(e, t) {
|
|
12150
12159
|
let n = new Rt();
|
|
@@ -12154,7 +12163,7 @@ var pm = /* @__PURE__ */ function(e) {
|
|
|
12154
12163
|
}, e, t), n;
|
|
12155
12164
|
}
|
|
12156
12165
|
addMaps(t) {
|
|
12157
|
-
return this.eventCount == 0 ? this : new e(this.items.append(t.map((e) => new
|
|
12166
|
+
return this.eventCount == 0 ? this : new e(this.items.append(t.map((e) => new vm(e))), this.eventCount);
|
|
12158
12167
|
}
|
|
12159
12168
|
rebased(t, n) {
|
|
12160
12169
|
if (!this.eventCount) return this;
|
|
@@ -12170,13 +12179,13 @@ var pm = /* @__PURE__ */ function(e) {
|
|
|
12170
12179
|
let i = a.maps[n];
|
|
12171
12180
|
if (e.step) {
|
|
12172
12181
|
let o = t.steps[n].invert(t.docs[n]), l = e.selection && e.selection.map(a.slice(c + 1, n));
|
|
12173
|
-
l && s++, r.push(new
|
|
12174
|
-
} else r.push(new
|
|
12182
|
+
l && s++, r.push(new vm(i, o, l));
|
|
12183
|
+
} else r.push(new vm(i));
|
|
12175
12184
|
}, i);
|
|
12176
12185
|
let l = [];
|
|
12177
|
-
for (let e = n; e < o; e++) l.push(new
|
|
12186
|
+
for (let e = n; e < o; e++) l.push(new vm(a.maps[e]));
|
|
12178
12187
|
let u = new e(this.items.slice(0, i).append(l).append(r), s);
|
|
12179
|
-
return u.emptyItemCount() >
|
|
12188
|
+
return u.emptyItemCount() > hm && (u = u.compress(this.items.length - r.length)), u;
|
|
12180
12189
|
}
|
|
12181
12190
|
emptyItemCount() {
|
|
12182
12191
|
let e = 0;
|
|
@@ -12193,21 +12202,21 @@ var pm = /* @__PURE__ */ function(e) {
|
|
|
12193
12202
|
if (r--, o && n.appendMap(o, r), t) {
|
|
12194
12203
|
let s = e.selection && e.selection.map(n.slice(r));
|
|
12195
12204
|
s && a++;
|
|
12196
|
-
let c = new
|
|
12205
|
+
let c = new vm(o.invert(), t, s), l, u = i.length - 1;
|
|
12197
12206
|
(l = i.length && i[u].merge(c)) ? i[u] = l : i.push(c);
|
|
12198
12207
|
}
|
|
12199
12208
|
} else e.map && r--;
|
|
12200
12209
|
}, this.items.length, 0), new e(Y.from(i.reverse()), a);
|
|
12201
12210
|
}
|
|
12202
12211
|
};
|
|
12203
|
-
|
|
12204
|
-
function
|
|
12212
|
+
gm.empty = new gm(Y.empty, 0);
|
|
12213
|
+
function _m(e, t) {
|
|
12205
12214
|
let n;
|
|
12206
12215
|
return e.forEach((e, r) => {
|
|
12207
12216
|
if (e.selection && t-- == 0) return n = r, !1;
|
|
12208
12217
|
}), e.slice(n);
|
|
12209
12218
|
}
|
|
12210
|
-
var
|
|
12219
|
+
var vm = class e {
|
|
12211
12220
|
constructor(e, t, n, r) {
|
|
12212
12221
|
this.map = e, this.step = t, this.selection = n, this.mirrorOffset = r;
|
|
12213
12222
|
}
|
|
@@ -12217,25 +12226,25 @@ var _m = class e {
|
|
|
12217
12226
|
if (n) return new e(n.getMap().invert(), n, this.selection);
|
|
12218
12227
|
}
|
|
12219
12228
|
}
|
|
12220
|
-
},
|
|
12229
|
+
}, ym = class {
|
|
12221
12230
|
constructor(e, t, n, r, i) {
|
|
12222
12231
|
this.done = e, this.undone = t, this.prevRanges = n, this.prevTime = r, this.prevComposition = i;
|
|
12223
12232
|
}
|
|
12224
|
-
},
|
|
12225
|
-
function
|
|
12226
|
-
let i = n.getMeta(
|
|
12233
|
+
}, bm = 20;
|
|
12234
|
+
function xm(e, t, n, r) {
|
|
12235
|
+
let i = n.getMeta(km), a;
|
|
12227
12236
|
if (i) return i.historyState;
|
|
12228
|
-
n.getMeta(
|
|
12237
|
+
n.getMeta(Am) && (e = new ym(e.done, e.undone, null, 0, -1));
|
|
12229
12238
|
let o = n.getMeta("appendedTransaction");
|
|
12230
12239
|
if (n.steps.length == 0) return e;
|
|
12231
|
-
if (o && o.getMeta(
|
|
12240
|
+
if (o && o.getMeta(km)) return o.getMeta(km).redo ? new ym(e.done.addTransform(n, void 0, r, Om(t)), e.undone, Cm(n.mapping.maps), e.prevTime, e.prevComposition) : new ym(e.done, e.undone.addTransform(n, void 0, r, Om(t)), null, e.prevTime, e.prevComposition);
|
|
12232
12241
|
if (n.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
12233
|
-
let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !
|
|
12234
|
-
return new
|
|
12235
|
-
} else if (a = n.getMeta("rebased")) return new
|
|
12236
|
-
else return new
|
|
12242
|
+
let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !Sm(n, e.prevRanges)), s = o ? wm(e.prevRanges, n.mapping) : Cm(n.mapping.maps);
|
|
12243
|
+
return new ym(e.done.addTransform(n, a ? t.selection.getBookmark() : void 0, r, Om(t)), gm.empty, s, n.time, i ?? e.prevComposition);
|
|
12244
|
+
} else if (a = n.getMeta("rebased")) return new ym(e.done.rebased(n, a), e.undone.rebased(n, a), wm(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
|
|
12245
|
+
else return new ym(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), wm(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
|
|
12237
12246
|
}
|
|
12238
|
-
function
|
|
12247
|
+
function Sm(e, t) {
|
|
12239
12248
|
if (!t) return !1;
|
|
12240
12249
|
if (!e.docChanged) return !0;
|
|
12241
12250
|
let n = !1;
|
|
@@ -12243,12 +12252,12 @@ function xm(e, t) {
|
|
|
12243
12252
|
for (let i = 0; i < t.length; i += 2) e <= t[i + 1] && r >= t[i] && (n = !0);
|
|
12244
12253
|
}), n;
|
|
12245
12254
|
}
|
|
12246
|
-
function
|
|
12255
|
+
function Cm(e) {
|
|
12247
12256
|
let t = [];
|
|
12248
12257
|
for (let n = e.length - 1; n >= 0 && t.length == 0; n--) e[n].forEach((e, n, r, i) => t.push(r, i));
|
|
12249
12258
|
return t;
|
|
12250
12259
|
}
|
|
12251
|
-
function
|
|
12260
|
+
function wm(e, t) {
|
|
12252
12261
|
if (!e) return null;
|
|
12253
12262
|
let n = [];
|
|
12254
12263
|
for (let r = 0; r < e.length; r += 2) {
|
|
@@ -12257,61 +12266,61 @@ function Cm(e, t) {
|
|
|
12257
12266
|
}
|
|
12258
12267
|
return n;
|
|
12259
12268
|
}
|
|
12260
|
-
function
|
|
12261
|
-
let r =
|
|
12269
|
+
function Tm(e, t, n) {
|
|
12270
|
+
let r = Om(t), i = km.get(t).spec.config, a = (n ? e.undone : e.done).popEvent(t, r);
|
|
12262
12271
|
if (!a) return null;
|
|
12263
|
-
let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new
|
|
12264
|
-
return a.transform.setSelection(o).setMeta(
|
|
12272
|
+
let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new ym(n ? s : a.remaining, n ? a.remaining : s, null, 0, -1);
|
|
12273
|
+
return a.transform.setSelection(o).setMeta(km, {
|
|
12265
12274
|
redo: n,
|
|
12266
12275
|
historyState: c
|
|
12267
12276
|
});
|
|
12268
12277
|
}
|
|
12269
|
-
var
|
|
12270
|
-
function
|
|
12278
|
+
var Em = !1, Dm = null;
|
|
12279
|
+
function Om(e) {
|
|
12271
12280
|
let t = e.plugins;
|
|
12272
|
-
if (
|
|
12273
|
-
|
|
12281
|
+
if (Dm != t) {
|
|
12282
|
+
Em = !1, Dm = t;
|
|
12274
12283
|
for (let e = 0; e < t.length; e++) if (t[e].spec.historyPreserveItems) {
|
|
12275
|
-
|
|
12284
|
+
Em = !0;
|
|
12276
12285
|
break;
|
|
12277
12286
|
}
|
|
12278
12287
|
}
|
|
12279
|
-
return
|
|
12288
|
+
return Em;
|
|
12280
12289
|
}
|
|
12281
|
-
var
|
|
12282
|
-
function
|
|
12290
|
+
var km = new P("history"), Am = new P("closeHistory");
|
|
12291
|
+
function jm(e = {}) {
|
|
12283
12292
|
return e = {
|
|
12284
12293
|
depth: e.depth || 100,
|
|
12285
12294
|
newGroupDelay: e.newGroupDelay || 500
|
|
12286
12295
|
}, new N({
|
|
12287
|
-
key:
|
|
12296
|
+
key: km,
|
|
12288
12297
|
state: {
|
|
12289
12298
|
init() {
|
|
12290
|
-
return new
|
|
12299
|
+
return new ym(gm.empty, gm.empty, null, 0, -1);
|
|
12291
12300
|
},
|
|
12292
12301
|
apply(t, n, r) {
|
|
12293
|
-
return
|
|
12302
|
+
return xm(n, r, t, e);
|
|
12294
12303
|
}
|
|
12295
12304
|
},
|
|
12296
12305
|
config: e,
|
|
12297
12306
|
props: { handleDOMEvents: { beforeinput(e, t) {
|
|
12298
|
-
let n = t.inputType, r = n == "historyUndo" ?
|
|
12307
|
+
let n = t.inputType, r = n == "historyUndo" ? Nm : n == "historyRedo" ? Pm : null;
|
|
12299
12308
|
return !r || !e.editable ? !1 : (t.preventDefault(), r(e.state, e.dispatch));
|
|
12300
12309
|
} } }
|
|
12301
12310
|
});
|
|
12302
12311
|
}
|
|
12303
|
-
function
|
|
12312
|
+
function Mm(e, t) {
|
|
12304
12313
|
return (n, r) => {
|
|
12305
|
-
let i =
|
|
12314
|
+
let i = km.getState(n);
|
|
12306
12315
|
if (!i || (e ? i.undone : i.done).eventCount == 0) return !1;
|
|
12307
12316
|
if (r) {
|
|
12308
|
-
let a =
|
|
12317
|
+
let a = Tm(i, n, e);
|
|
12309
12318
|
a && r(t ? a.scrollIntoView() : a);
|
|
12310
12319
|
}
|
|
12311
12320
|
return !0;
|
|
12312
12321
|
};
|
|
12313
12322
|
}
|
|
12314
|
-
var
|
|
12323
|
+
var Nm = Mm(!1, !0), Pm = Mm(!0, !0), Fm = q.create({
|
|
12315
12324
|
name: "characterCount",
|
|
12316
12325
|
addOptions() {
|
|
12317
12326
|
return {
|
|
@@ -12371,7 +12380,7 @@ var Mm = jm(!1, !0), Nm = jm(!0, !0), Pm = q.create({
|
|
|
12371
12380
|
}
|
|
12372
12381
|
})];
|
|
12373
12382
|
}
|
|
12374
|
-
}),
|
|
12383
|
+
}), Im = q.create({
|
|
12375
12384
|
name: "dropCursor",
|
|
12376
12385
|
addOptions() {
|
|
12377
12386
|
return {
|
|
@@ -12381,7 +12390,7 @@ var Mm = jm(!1, !0), Nm = jm(!0, !0), Pm = q.create({
|
|
|
12381
12390
|
};
|
|
12382
12391
|
},
|
|
12383
12392
|
addProseMirrorPlugins() {
|
|
12384
|
-
return [
|
|
12393
|
+
return [$p(this.options)];
|
|
12385
12394
|
}
|
|
12386
12395
|
});
|
|
12387
12396
|
q.create({
|
|
@@ -12415,10 +12424,10 @@ q.create({
|
|
|
12415
12424
|
})];
|
|
12416
12425
|
}
|
|
12417
12426
|
});
|
|
12418
|
-
var
|
|
12427
|
+
var Lm = q.create({
|
|
12419
12428
|
name: "gapCursor",
|
|
12420
12429
|
addProseMirrorPlugins() {
|
|
12421
|
-
return [
|
|
12430
|
+
return [om()];
|
|
12422
12431
|
},
|
|
12423
12432
|
extendNodeSchema(e) {
|
|
12424
12433
|
return { allowGapCursor: G(W(e, "allowGapCursor", {
|
|
@@ -12427,17 +12436,17 @@ var Im = q.create({
|
|
|
12427
12436
|
storage: e.storage
|
|
12428
12437
|
})) ?? null };
|
|
12429
12438
|
}
|
|
12430
|
-
}),
|
|
12431
|
-
function
|
|
12439
|
+
}), Rm = "placeholder";
|
|
12440
|
+
function zm(e) {
|
|
12432
12441
|
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
12433
12442
|
}
|
|
12434
|
-
var
|
|
12443
|
+
var Bm = q.create({
|
|
12435
12444
|
name: "placeholder",
|
|
12436
12445
|
addOptions() {
|
|
12437
12446
|
return {
|
|
12438
12447
|
emptyEditorClass: "is-editor-empty",
|
|
12439
12448
|
emptyNodeClass: "is-empty",
|
|
12440
|
-
dataAttribute:
|
|
12449
|
+
dataAttribute: Rm,
|
|
12441
12450
|
placeholder: "Write something …",
|
|
12442
12451
|
showOnlyWhenEditable: !0,
|
|
12443
12452
|
showOnlyCurrent: !0,
|
|
@@ -12445,7 +12454,7 @@ var zm = q.create({
|
|
|
12445
12454
|
};
|
|
12446
12455
|
},
|
|
12447
12456
|
addProseMirrorPlugins() {
|
|
12448
|
-
let e = this.options.dataAttribute ? `data-${
|
|
12457
|
+
let e = this.options.dataAttribute ? `data-${zm(this.options.dataAttribute)}` : `data-${Rm}`;
|
|
12449
12458
|
return [new N({
|
|
12450
12459
|
key: new P("placeholder"),
|
|
12451
12460
|
props: { decorations: ({ doc: t, selection: n }) => {
|
|
@@ -12490,10 +12499,10 @@ q.create({
|
|
|
12490
12499
|
})];
|
|
12491
12500
|
}
|
|
12492
12501
|
});
|
|
12493
|
-
function
|
|
12502
|
+
function Vm({ types: e, node: t }) {
|
|
12494
12503
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
12495
12504
|
}
|
|
12496
|
-
var
|
|
12505
|
+
var Hm = q.create({
|
|
12497
12506
|
name: "trailingNode",
|
|
12498
12507
|
addOptions() {
|
|
12499
12508
|
return {
|
|
@@ -12512,7 +12521,7 @@ var Vm = q.create({
|
|
|
12512
12521
|
state: {
|
|
12513
12522
|
init: (e, t) => {
|
|
12514
12523
|
let r = t.tr.doc.lastChild;
|
|
12515
|
-
return !
|
|
12524
|
+
return !Vm({
|
|
12516
12525
|
node: r,
|
|
12517
12526
|
types: n
|
|
12518
12527
|
});
|
|
@@ -12520,7 +12529,7 @@ var Vm = q.create({
|
|
|
12520
12529
|
apply: (e, t) => {
|
|
12521
12530
|
if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
|
|
12522
12531
|
let r = e.doc.lastChild;
|
|
12523
|
-
return !
|
|
12532
|
+
return !Vm({
|
|
12524
12533
|
node: r,
|
|
12525
12534
|
types: n
|
|
12526
12535
|
});
|
|
@@ -12528,7 +12537,7 @@ var Vm = q.create({
|
|
|
12528
12537
|
}
|
|
12529
12538
|
})];
|
|
12530
12539
|
}
|
|
12531
|
-
}),
|
|
12540
|
+
}), Um = q.create({
|
|
12532
12541
|
name: "undoRedo",
|
|
12533
12542
|
addOptions() {
|
|
12534
12543
|
return {
|
|
@@ -12538,12 +12547,12 @@ var Vm = q.create({
|
|
|
12538
12547
|
},
|
|
12539
12548
|
addCommands() {
|
|
12540
12549
|
return {
|
|
12541
|
-
undo: () => ({ state: e, dispatch: t }) =>
|
|
12542
|
-
redo: () => ({ state: e, dispatch: t }) =>
|
|
12550
|
+
undo: () => ({ state: e, dispatch: t }) => Nm(e, t),
|
|
12551
|
+
redo: () => ({ state: e, dispatch: t }) => Pm(e, t)
|
|
12543
12552
|
};
|
|
12544
12553
|
},
|
|
12545
12554
|
addProseMirrorPlugins() {
|
|
12546
|
-
return [
|
|
12555
|
+
return [jm(this.options)];
|
|
12547
12556
|
},
|
|
12548
12557
|
addKeyboardShortcuts() {
|
|
12549
12558
|
return {
|
|
@@ -12554,17 +12563,17 @@ var Vm = q.create({
|
|
|
12554
12563
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
12555
12564
|
};
|
|
12556
12565
|
}
|
|
12557
|
-
}),
|
|
12566
|
+
}), Wm, Gm;
|
|
12558
12567
|
if (typeof WeakMap < "u") {
|
|
12559
12568
|
let e = /* @__PURE__ */ new WeakMap();
|
|
12560
|
-
|
|
12569
|
+
Wm = (t) => e.get(t), Gm = (t, n) => (e.set(t, n), n);
|
|
12561
12570
|
} else {
|
|
12562
12571
|
let e = [], t = 0;
|
|
12563
|
-
|
|
12572
|
+
Wm = (t) => {
|
|
12564
12573
|
for (let n = 0; n < e.length; n += 2) if (e[n] == t) return e[n + 1];
|
|
12565
|
-
},
|
|
12574
|
+
}, Gm = (n, r) => (t == 10 && (t = 0), e[t++] = n, e[t++] = r);
|
|
12566
12575
|
}
|
|
12567
|
-
var
|
|
12576
|
+
var Km = class {
|
|
12568
12577
|
constructor(e, t, n, r) {
|
|
12569
12578
|
this.width = e, this.height = t, this.map = n, this.problems = r;
|
|
12570
12579
|
}
|
|
@@ -12621,12 +12630,12 @@ var Gm = class {
|
|
|
12621
12630
|
}
|
|
12622
12631
|
}
|
|
12623
12632
|
static get(e) {
|
|
12624
|
-
return
|
|
12633
|
+
return Wm(e) || Gm(e, qm(e));
|
|
12625
12634
|
}
|
|
12626
12635
|
};
|
|
12627
|
-
function
|
|
12636
|
+
function qm(e) {
|
|
12628
12637
|
if (e.type.spec.tableRole != "table") throw RangeError("Not a table node: " + e.type.name);
|
|
12629
|
-
let t =
|
|
12638
|
+
let t = Jm(e), n = e.childCount, r = [], i = 0, a = null, o = [];
|
|
12630
12639
|
for (let e = 0, i = t * n; e < i; e++) r[e] = 0;
|
|
12631
12640
|
for (let s = 0, c = 0; s < n; s++) {
|
|
12632
12641
|
let l = e.child(s);
|
|
@@ -12670,11 +12679,11 @@ function Km(e) {
|
|
|
12670
12679
|
}), c++;
|
|
12671
12680
|
}
|
|
12672
12681
|
(t === 0 || n === 0) && (a ||= []).push({ type: "zero_sized" });
|
|
12673
|
-
let s = new
|
|
12682
|
+
let s = new Km(t, n, r, a), c = !1;
|
|
12674
12683
|
for (let e = 0; !c && e < o.length; e += 2) o[e] != null && o[e + 1] < n && (c = !0);
|
|
12675
|
-
return c &&
|
|
12684
|
+
return c && Ym(s, o, e), s;
|
|
12676
12685
|
}
|
|
12677
|
-
function
|
|
12686
|
+
function Jm(e) {
|
|
12678
12687
|
let t = -1, n = !1;
|
|
12679
12688
|
for (let r = 0; r < e.childCount; r++) {
|
|
12680
12689
|
let i = e.child(r), a = 0;
|
|
@@ -12693,7 +12702,7 @@ function qm(e) {
|
|
|
12693
12702
|
}
|
|
12694
12703
|
return t;
|
|
12695
12704
|
}
|
|
12696
|
-
function
|
|
12705
|
+
function Ym(e, t, n) {
|
|
12697
12706
|
e.problems ||= [];
|
|
12698
12707
|
let r = {};
|
|
12699
12708
|
for (let i = 0; i < e.map.length; i++) {
|
|
@@ -12705,7 +12714,7 @@ function Jm(e, t, n) {
|
|
|
12705
12714
|
let s = null, c = o.attrs;
|
|
12706
12715
|
for (let n = 0; n < c.colspan; n++) {
|
|
12707
12716
|
let r = t[(i + n) % e.width * 2];
|
|
12708
|
-
r != null && (!c.colwidth || c.colwidth[n] != r) && ((s ||=
|
|
12717
|
+
r != null && (!c.colwidth || c.colwidth[n] != r) && ((s ||= Xm(c))[n] = r);
|
|
12709
12718
|
}
|
|
12710
12719
|
s && e.problems.unshift({
|
|
12711
12720
|
type: "colwidth mismatch",
|
|
@@ -12714,13 +12723,13 @@ function Jm(e, t, n) {
|
|
|
12714
12723
|
});
|
|
12715
12724
|
}
|
|
12716
12725
|
}
|
|
12717
|
-
function
|
|
12726
|
+
function Xm(e) {
|
|
12718
12727
|
if (e.colwidth) return e.colwidth.slice();
|
|
12719
12728
|
let t = [];
|
|
12720
12729
|
for (let n = 0; n < e.colspan; n++) t.push(0);
|
|
12721
12730
|
return t;
|
|
12722
12731
|
}
|
|
12723
|
-
function
|
|
12732
|
+
function Zm(e) {
|
|
12724
12733
|
let t = e.cached.tableNodeTypes;
|
|
12725
12734
|
if (!t) {
|
|
12726
12735
|
t = e.cached.tableNodeTypes = {};
|
|
@@ -12732,24 +12741,24 @@ function Xm(e) {
|
|
|
12732
12741
|
return t;
|
|
12733
12742
|
}
|
|
12734
12743
|
new P("selectingCells");
|
|
12735
|
-
function
|
|
12744
|
+
function Qm(e) {
|
|
12736
12745
|
for (let t = e.depth - 1; t > 0; t--) if (e.node(t).type.spec.tableRole == "row") return e.node(0).resolve(e.before(t + 1));
|
|
12737
12746
|
return null;
|
|
12738
12747
|
}
|
|
12739
|
-
function
|
|
12748
|
+
function $m(e) {
|
|
12740
12749
|
let t = e.selection.$head;
|
|
12741
12750
|
for (let e = t.depth; e > 0; e--) if (t.node(e).type.spec.tableRole == "row") return !0;
|
|
12742
12751
|
return !1;
|
|
12743
12752
|
}
|
|
12744
|
-
function
|
|
12753
|
+
function eh(e) {
|
|
12745
12754
|
let t = e.selection;
|
|
12746
12755
|
if ("$anchorCell" in t && t.$anchorCell) return t.$anchorCell.pos > t.$headCell.pos ? t.$anchorCell : t.$headCell;
|
|
12747
12756
|
if ("node" in t && t.node && t.node.type.spec.tableRole == "cell") return t.$anchor;
|
|
12748
|
-
let n =
|
|
12757
|
+
let n = Qm(t.$head) || th(t.$head);
|
|
12749
12758
|
if (n) return n;
|
|
12750
12759
|
throw RangeError(`No cell found around position ${t.head}`);
|
|
12751
12760
|
}
|
|
12752
|
-
function
|
|
12761
|
+
function th(e) {
|
|
12753
12762
|
for (let t = e.nodeAfter, n = e.pos; t; t = t.firstChild, n++) {
|
|
12754
12763
|
let r = t.type.spec.tableRole;
|
|
12755
12764
|
if (r == "cell" || r == "header_cell") return e.doc.resolve(n);
|
|
@@ -12759,26 +12768,26 @@ function eh(e) {
|
|
|
12759
12768
|
if (r == "cell" || r == "header_cell") return e.doc.resolve(n - t.nodeSize);
|
|
12760
12769
|
}
|
|
12761
12770
|
}
|
|
12762
|
-
function
|
|
12771
|
+
function nh(e) {
|
|
12763
12772
|
return e.parent.type.spec.tableRole == "row" && !!e.nodeAfter;
|
|
12764
12773
|
}
|
|
12765
|
-
function
|
|
12774
|
+
function rh(e, t) {
|
|
12766
12775
|
return e.depth == t.depth && e.pos >= t.start(-1) && e.pos <= t.end(-1);
|
|
12767
12776
|
}
|
|
12768
|
-
function
|
|
12769
|
-
let r = e.node(-1), i =
|
|
12777
|
+
function ih(e, t, n) {
|
|
12778
|
+
let r = e.node(-1), i = Km.get(r), a = e.start(-1), o = i.nextCell(e.pos - a, t, n);
|
|
12770
12779
|
return o == null ? null : e.node(0).resolve(a + o);
|
|
12771
12780
|
}
|
|
12772
|
-
function
|
|
12781
|
+
function ah(e, t, n = 1) {
|
|
12773
12782
|
let r = {
|
|
12774
12783
|
...e,
|
|
12775
12784
|
colspan: e.colspan - n
|
|
12776
12785
|
};
|
|
12777
12786
|
return r.colwidth && (r.colwidth = r.colwidth.slice(), r.colwidth.splice(t, n), r.colwidth.some((e) => e > 0) || (r.colwidth = null)), r;
|
|
12778
12787
|
}
|
|
12779
|
-
var
|
|
12788
|
+
var oh = class e extends A {
|
|
12780
12789
|
constructor(e, t = e) {
|
|
12781
|
-
let n = e.node(-1), r =
|
|
12790
|
+
let n = e.node(-1), r = Km.get(n), i = e.start(-1), a = r.rectBetween(e.pos - i, t.pos - i), o = e.node(0), s = r.cellsInRect(a).filter((e) => e != t.pos - i);
|
|
12782
12791
|
s.unshift(t.pos - i);
|
|
12783
12792
|
let c = s.map((e) => {
|
|
12784
12793
|
let t = n.nodeAt(e);
|
|
@@ -12790,14 +12799,14 @@ var ah = class e extends A {
|
|
|
12790
12799
|
}
|
|
12791
12800
|
map(t, n) {
|
|
12792
12801
|
let r = t.resolve(n.map(this.$anchorCell.pos)), i = t.resolve(n.map(this.$headCell.pos));
|
|
12793
|
-
if (
|
|
12802
|
+
if (nh(r) && nh(i) && rh(r, i)) {
|
|
12794
12803
|
let t = this.$anchorCell.node(-1) != r.node(-1);
|
|
12795
12804
|
return t && this.isRowSelection() ? e.rowSelection(r, i) : t && this.isColSelection() ? e.colSelection(r, i) : new e(r, i);
|
|
12796
12805
|
}
|
|
12797
12806
|
return j.between(r, i);
|
|
12798
12807
|
}
|
|
12799
12808
|
content() {
|
|
12800
|
-
let e = this.$anchorCell.node(-1), t =
|
|
12809
|
+
let e = this.$anchorCell.node(-1), t = Km.get(e), n = this.$anchorCell.start(-1), r = t.rectBetween(this.$anchorCell.pos - n, this.$headCell.pos - n), i = {}, a = [];
|
|
12801
12810
|
for (let n = r.top; n < r.bottom; n++) {
|
|
12802
12811
|
let o = [];
|
|
12803
12812
|
for (let a = n * t.width + r.left, s = r.left; s < r.right; s++, a++) {
|
|
@@ -12809,7 +12818,7 @@ var ah = class e extends A {
|
|
|
12809
12818
|
let l = r.left - s.left, u = s.right - r.right;
|
|
12810
12819
|
if (l > 0 || u > 0) {
|
|
12811
12820
|
let e = c.attrs;
|
|
12812
|
-
if (l > 0 && (e =
|
|
12821
|
+
if (l > 0 && (e = ah(e, 0, l)), u > 0 && (e = ah(e, e.colspan - u, u)), s.left < r.left) {
|
|
12813
12822
|
if (c = c.type.createAndFill(e), !c) throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`);
|
|
12814
12823
|
} else c = c.type.create(e, c.content);
|
|
12815
12824
|
}
|
|
@@ -12840,7 +12849,7 @@ var ah = class e extends A {
|
|
|
12840
12849
|
this.replace(e, new D(T.from(t), 0, 0));
|
|
12841
12850
|
}
|
|
12842
12851
|
forEachCell(e) {
|
|
12843
|
-
let t = this.$anchorCell.node(-1), n =
|
|
12852
|
+
let t = this.$anchorCell.node(-1), n = Km.get(t), r = this.$anchorCell.start(-1), i = n.cellsInRect(n.rectBetween(this.$anchorCell.pos - r, this.$headCell.pos - r));
|
|
12844
12853
|
for (let n = 0; n < i.length; n++) e(t.nodeAt(i[n]), r + i[n]);
|
|
12845
12854
|
}
|
|
12846
12855
|
isColSelection() {
|
|
@@ -12850,11 +12859,11 @@ var ah = class e extends A {
|
|
|
12850
12859
|
return Math.max(n, r) == this.$headCell.node(-1).childCount;
|
|
12851
12860
|
}
|
|
12852
12861
|
static colSelection(t, n = t) {
|
|
12853
|
-
let r = t.node(-1), i =
|
|
12862
|
+
let r = t.node(-1), i = Km.get(r), a = t.start(-1), o = i.findCell(t.pos - a), s = i.findCell(n.pos - a), c = t.node(0);
|
|
12854
12863
|
return o.top <= s.top ? (o.top > 0 && (t = c.resolve(a + i.map[o.left])), s.bottom < i.height && (n = c.resolve(a + i.map[i.width * (i.height - 1) + s.right - 1]))) : (s.top > 0 && (n = c.resolve(a + i.map[s.left])), o.bottom < i.height && (t = c.resolve(a + i.map[i.width * (i.height - 1) + o.right - 1]))), new e(t, n);
|
|
12855
12864
|
}
|
|
12856
12865
|
isRowSelection() {
|
|
12857
|
-
let e = this.$anchorCell.node(-1), t =
|
|
12866
|
+
let e = this.$anchorCell.node(-1), t = Km.get(e), n = this.$anchorCell.start(-1), r = t.colCount(this.$anchorCell.pos - n), i = t.colCount(this.$headCell.pos - n);
|
|
12858
12867
|
if (Math.min(r, i) > 0) return !1;
|
|
12859
12868
|
let a = r + this.$anchorCell.nodeAfter.attrs.colspan, o = i + this.$headCell.nodeAfter.attrs.colspan;
|
|
12860
12869
|
return Math.max(a, o) == t.width;
|
|
@@ -12863,7 +12872,7 @@ var ah = class e extends A {
|
|
|
12863
12872
|
return t instanceof e && t.$anchorCell.pos == this.$anchorCell.pos && t.$headCell.pos == this.$headCell.pos;
|
|
12864
12873
|
}
|
|
12865
12874
|
static rowSelection(t, n = t) {
|
|
12866
|
-
let r = t.node(-1), i =
|
|
12875
|
+
let r = t.node(-1), i = Km.get(r), a = t.start(-1), o = i.findCell(t.pos - a), s = i.findCell(n.pos - a), c = t.node(0);
|
|
12867
12876
|
return o.left <= s.left ? (o.left > 0 && (t = c.resolve(a + i.map[o.top * i.width])), s.right < i.width && (n = c.resolve(a + i.map[i.width * (s.top + 1) - 1]))) : (s.left > 0 && (n = c.resolve(a + i.map[s.top * i.width])), o.right < i.width && (t = c.resolve(a + i.map[i.width * (o.top + 1) - 1]))), new e(t, n);
|
|
12868
12877
|
}
|
|
12869
12878
|
toJSON() {
|
|
@@ -12880,11 +12889,11 @@ var ah = class e extends A {
|
|
|
12880
12889
|
return new e(t.resolve(n), t.resolve(r));
|
|
12881
12890
|
}
|
|
12882
12891
|
getBookmark() {
|
|
12883
|
-
return new
|
|
12892
|
+
return new sh(this.$anchorCell.pos, this.$headCell.pos);
|
|
12884
12893
|
}
|
|
12885
12894
|
};
|
|
12886
|
-
|
|
12887
|
-
var
|
|
12895
|
+
oh.prototype.visible = !1, A.jsonID("cell", oh);
|
|
12896
|
+
var sh = class e {
|
|
12888
12897
|
constructor(e, t) {
|
|
12889
12898
|
this.anchor = e, this.head = t;
|
|
12890
12899
|
}
|
|
@@ -12893,24 +12902,24 @@ var oh = class e {
|
|
|
12893
12902
|
}
|
|
12894
12903
|
resolve(e) {
|
|
12895
12904
|
let t = e.resolve(this.anchor), n = e.resolve(this.head);
|
|
12896
|
-
return t.parent.type.spec.tableRole == "row" && n.parent.type.spec.tableRole == "row" && t.index() < t.parent.childCount && n.index() < n.parent.childCount &&
|
|
12905
|
+
return t.parent.type.spec.tableRole == "row" && n.parent.type.spec.tableRole == "row" && t.index() < t.parent.childCount && n.index() < n.parent.childCount && rh(t, n) ? new oh(t, n) : A.near(n, 1);
|
|
12897
12906
|
}
|
|
12898
12907
|
};
|
|
12899
12908
|
new P("fix-tables");
|
|
12900
|
-
function
|
|
12901
|
-
let t = e.selection, n =
|
|
12909
|
+
function ch(e) {
|
|
12910
|
+
let t = e.selection, n = eh(e), r = n.node(-1), i = n.start(-1), a = Km.get(r);
|
|
12902
12911
|
return {
|
|
12903
|
-
...t instanceof
|
|
12912
|
+
...t instanceof oh ? a.rectBetween(t.$anchorCell.pos - i, t.$headCell.pos - i) : a.findCell(n.pos - i),
|
|
12904
12913
|
tableStart: i,
|
|
12905
12914
|
map: a,
|
|
12906
12915
|
table: r
|
|
12907
12916
|
};
|
|
12908
12917
|
}
|
|
12909
|
-
function
|
|
12918
|
+
function lh(e) {
|
|
12910
12919
|
return function(t, n) {
|
|
12911
|
-
if (
|
|
12920
|
+
if (!$m(t)) return !1;
|
|
12912
12921
|
if (n) {
|
|
12913
|
-
let r =
|
|
12922
|
+
let r = Zm(t.schema), i = ch(t), a = t.tr, o = i.map.cellsInRect(e == "column" ? {
|
|
12914
12923
|
left: i.left,
|
|
12915
12924
|
top: 0,
|
|
12916
12925
|
right: i.right,
|
|
@@ -12928,7 +12937,7 @@ function ch(e) {
|
|
|
12928
12937
|
return !0;
|
|
12929
12938
|
};
|
|
12930
12939
|
}
|
|
12931
|
-
function
|
|
12940
|
+
function uh(e, t, n) {
|
|
12932
12941
|
let r = t.map.cellsInRect({
|
|
12933
12942
|
left: 0,
|
|
12934
12943
|
top: 0,
|
|
@@ -12941,11 +12950,11 @@ function lh(e, t, n) {
|
|
|
12941
12950
|
}
|
|
12942
12951
|
return !0;
|
|
12943
12952
|
}
|
|
12944
|
-
function
|
|
12945
|
-
return t ||= { useDeprecatedLogic: !1 }, t.useDeprecatedLogic ?
|
|
12946
|
-
if (
|
|
12953
|
+
function dh(e, t) {
|
|
12954
|
+
return t ||= { useDeprecatedLogic: !1 }, t.useDeprecatedLogic ? lh(e) : function(t, n) {
|
|
12955
|
+
if (!$m(t)) return !1;
|
|
12947
12956
|
if (n) {
|
|
12948
|
-
let r =
|
|
12957
|
+
let r = Zm(t.schema), i = ch(t), a = t.tr, o = uh("row", i, r), s = uh("column", i, r), c = (e === "column" ? o : e === "row" && s) ? 1 : 0, l = e == "column" ? {
|
|
12949
12958
|
left: 0,
|
|
12950
12959
|
top: c,
|
|
12951
12960
|
right: 1,
|
|
@@ -12964,12 +12973,12 @@ function uh(e, t) {
|
|
|
12964
12973
|
return !0;
|
|
12965
12974
|
};
|
|
12966
12975
|
}
|
|
12967
|
-
|
|
12968
|
-
function
|
|
12976
|
+
dh("row", { useDeprecatedLogic: !0 }), dh("column", { useDeprecatedLogic: !0 }), dh("cell", { useDeprecatedLogic: !0 });
|
|
12977
|
+
function fh(e, t) {
|
|
12969
12978
|
let n = e.selection;
|
|
12970
|
-
if (!(n instanceof
|
|
12979
|
+
if (!(n instanceof oh)) return !1;
|
|
12971
12980
|
if (t) {
|
|
12972
|
-
let r = e.tr, i =
|
|
12981
|
+
let r = e.tr, i = Zm(e.schema).cell.createAndFill().content;
|
|
12973
12982
|
n.forEachCell((e, t) => {
|
|
12974
12983
|
e.content.eq(i) || r.replace(r.mapping.map(t + 1), r.mapping.map(t + e.nodeSize - 1), new D(i, 0, 0));
|
|
12975
12984
|
}), r.docChanged && t(r);
|
|
@@ -12977,52 +12986,52 @@ function dh(e, t) {
|
|
|
12977
12986
|
return !0;
|
|
12978
12987
|
}
|
|
12979
12988
|
Dc({
|
|
12980
|
-
ArrowLeft:
|
|
12981
|
-
ArrowRight:
|
|
12982
|
-
ArrowUp:
|
|
12983
|
-
ArrowDown:
|
|
12984
|
-
"Shift-ArrowLeft":
|
|
12985
|
-
"Shift-ArrowRight":
|
|
12986
|
-
"Shift-ArrowUp":
|
|
12987
|
-
"Shift-ArrowDown":
|
|
12988
|
-
Backspace:
|
|
12989
|
-
"Mod-Backspace":
|
|
12990
|
-
Delete:
|
|
12991
|
-
"Mod-Delete":
|
|
12989
|
+
ArrowLeft: mh("horiz", -1),
|
|
12990
|
+
ArrowRight: mh("horiz", 1),
|
|
12991
|
+
ArrowUp: mh("vert", -1),
|
|
12992
|
+
ArrowDown: mh("vert", 1),
|
|
12993
|
+
"Shift-ArrowLeft": hh("horiz", -1),
|
|
12994
|
+
"Shift-ArrowRight": hh("horiz", 1),
|
|
12995
|
+
"Shift-ArrowUp": hh("vert", -1),
|
|
12996
|
+
"Shift-ArrowDown": hh("vert", 1),
|
|
12997
|
+
Backspace: fh,
|
|
12998
|
+
"Mod-Backspace": fh,
|
|
12999
|
+
Delete: fh,
|
|
13000
|
+
"Mod-Delete": fh
|
|
12992
13001
|
});
|
|
12993
|
-
function
|
|
13002
|
+
function ph(e, t, n) {
|
|
12994
13003
|
return n.eq(e.selection) ? !1 : (t && t(e.tr.setSelection(n).scrollIntoView()), !0);
|
|
12995
13004
|
}
|
|
12996
|
-
function
|
|
13005
|
+
function mh(e, t) {
|
|
12997
13006
|
return (n, r, i) => {
|
|
12998
13007
|
if (!i) return !1;
|
|
12999
13008
|
let a = n.selection;
|
|
13000
|
-
if (a instanceof
|
|
13009
|
+
if (a instanceof oh) return ph(n, r, A.near(a.$headCell, t));
|
|
13001
13010
|
if (e != "horiz" && !a.empty) return !1;
|
|
13002
|
-
let o =
|
|
13011
|
+
let o = gh(i, e, t);
|
|
13003
13012
|
if (o == null) return !1;
|
|
13004
|
-
if (e == "horiz") return
|
|
13013
|
+
if (e == "horiz") return ph(n, r, A.near(n.doc.resolve(a.head + t), t));
|
|
13005
13014
|
{
|
|
13006
|
-
let i = n.doc.resolve(o), a =
|
|
13007
|
-
return s = a ? A.near(a, 1) : t < 0 ? A.near(n.doc.resolve(i.before(-1)), -1) : A.near(n.doc.resolve(i.after(-1)), 1),
|
|
13015
|
+
let i = n.doc.resolve(o), a = ih(i, e, t), s;
|
|
13016
|
+
return s = a ? A.near(a, 1) : t < 0 ? A.near(n.doc.resolve(i.before(-1)), -1) : A.near(n.doc.resolve(i.after(-1)), 1), ph(n, r, s);
|
|
13008
13017
|
}
|
|
13009
13018
|
};
|
|
13010
13019
|
}
|
|
13011
|
-
function
|
|
13020
|
+
function hh(e, t) {
|
|
13012
13021
|
return (n, r, i) => {
|
|
13013
13022
|
if (!i) return !1;
|
|
13014
13023
|
let a = n.selection, o;
|
|
13015
|
-
if (a instanceof
|
|
13024
|
+
if (a instanceof oh) o = a;
|
|
13016
13025
|
else {
|
|
13017
|
-
let r =
|
|
13026
|
+
let r = gh(i, e, t);
|
|
13018
13027
|
if (r == null) return !1;
|
|
13019
|
-
o = new
|
|
13028
|
+
o = new oh(n.doc.resolve(r));
|
|
13020
13029
|
}
|
|
13021
|
-
let s =
|
|
13022
|
-
return s ?
|
|
13030
|
+
let s = ih(o.$headCell, e, t);
|
|
13031
|
+
return s ? ph(n, r, new oh(o.$anchorCell, s)) : !1;
|
|
13023
13032
|
};
|
|
13024
13033
|
}
|
|
13025
|
-
function
|
|
13034
|
+
function gh(e, t, n) {
|
|
13026
13035
|
if (!(e.state.selection instanceof j)) return null;
|
|
13027
13036
|
let { $head: r } = e.state.selection;
|
|
13028
13037
|
for (let i = r.depth - 1; i >= 0; i--) {
|
|
@@ -13037,12 +13046,12 @@ function hh(e, t, n) {
|
|
|
13037
13046
|
}
|
|
13038
13047
|
new P("tableColumnResizing");
|
|
13039
13048
|
//#endregion
|
|
13040
|
-
//#region ../../node_modules/.pnpm/@tiptap+extension-bubble-menu@3.22.
|
|
13041
|
-
function
|
|
13049
|
+
//#region ../../node_modules/.pnpm/@tiptap+extension-bubble-menu@3.22.5_@tiptap+core@3.22.5_@tiptap+pm@3.22.5__@tiptap+pm@3.22.5/node_modules/@tiptap/extension-bubble-menu/dist/index.js
|
|
13050
|
+
function _h(e, t) {
|
|
13042
13051
|
let n = Math.min(e.top, t.top), r = Math.max(e.bottom, t.bottom), i = Math.min(e.left, t.left), a = Math.max(e.right, t.right) - i, o = r - n;
|
|
13043
13052
|
return new DOMRect(i, n, a, o);
|
|
13044
13053
|
}
|
|
13045
|
-
var
|
|
13054
|
+
var vh = class {
|
|
13046
13055
|
constructor({ editor: e, element: t, view: n, pluginKey: r = "bubbleMenu", updateDelay: i = 250, resizeDelay: a = 60, shouldShow: o, appendTo: s, getReferencedVirtualElement: c, options: l }) {
|
|
13047
13056
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.floatingUIOptions = {
|
|
13048
13057
|
strategy: "absolute",
|
|
@@ -13112,7 +13121,7 @@ var _h = class {
|
|
|
13112
13121
|
let { selection: e } = this.editor.state, t = this.getReferencedVirtualElement?.call(this);
|
|
13113
13122
|
if (t) return t;
|
|
13114
13123
|
if (!this.view?.dom?.parentNode) return;
|
|
13115
|
-
let n =
|
|
13124
|
+
let n = Iu(this.view, e.from, e.to), r = {
|
|
13116
13125
|
getBoundingClientRect: () => n,
|
|
13117
13126
|
getClientRects: () => [n]
|
|
13118
13127
|
};
|
|
@@ -13123,10 +13132,10 @@ var _h = class {
|
|
|
13123
13132
|
getClientRects: () => [t.getBoundingClientRect()]
|
|
13124
13133
|
});
|
|
13125
13134
|
}
|
|
13126
|
-
if (e instanceof
|
|
13135
|
+
if (e instanceof oh) {
|
|
13127
13136
|
let { $anchorCell: t, $headCell: n } = e, i = t ? t.pos : n.pos, a = n ? n.pos : t.pos, o = this.view.nodeDOM(i), s = this.view.nodeDOM(a);
|
|
13128
13137
|
if (!o || !s) return;
|
|
13129
|
-
let c = o === s ? o.getBoundingClientRect() :
|
|
13138
|
+
let c = o === s ? o.getBoundingClientRect() : _h(o.getBoundingClientRect(), s.getBoundingClientRect());
|
|
13130
13139
|
r = {
|
|
13131
13140
|
getBoundingClientRect: () => c,
|
|
13132
13141
|
getClientRects: () => [c]
|
|
@@ -13191,9 +13200,9 @@ var _h = class {
|
|
|
13191
13200
|
destroy() {
|
|
13192
13201
|
this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), window.removeEventListener("resize", this.resizeHandler), this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.editor.off("transaction", this.transactionHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
|
|
13193
13202
|
}
|
|
13194
|
-
},
|
|
13203
|
+
}, yh = (e) => new N({
|
|
13195
13204
|
key: typeof e.pluginKey == "string" ? new P(e.pluginKey) : e.pluginKey,
|
|
13196
|
-
view: (t) => new
|
|
13205
|
+
view: (t) => new vh({
|
|
13197
13206
|
view: t,
|
|
13198
13207
|
...e
|
|
13199
13208
|
})
|
|
@@ -13210,7 +13219,7 @@ q.create({
|
|
|
13210
13219
|
};
|
|
13211
13220
|
},
|
|
13212
13221
|
addProseMirrorPlugins() {
|
|
13213
|
-
return this.options.element ? [
|
|
13222
|
+
return this.options.element ? [yh({
|
|
13214
13223
|
pluginKey: this.options.pluginKey,
|
|
13215
13224
|
editor: this.editor,
|
|
13216
13225
|
element: this.options.element,
|
|
@@ -13223,8 +13232,8 @@ q.create({
|
|
|
13223
13232
|
}
|
|
13224
13233
|
});
|
|
13225
13234
|
//#endregion
|
|
13226
|
-
//#region ../../node_modules/.pnpm/@tiptap+extension-floating-menu@3.22.
|
|
13227
|
-
var
|
|
13235
|
+
//#region ../../node_modules/.pnpm/@tiptap+extension-floating-menu@3.22.5_@floating-ui+dom@1.7.6_@tiptap+core@3.22.5_@tiptap+pm@3.22.5__@tiptap+pm@3.22.5/node_modules/@tiptap/extension-floating-menu/dist/index.js
|
|
13236
|
+
var bh = class {
|
|
13228
13237
|
constructor({ editor: e, element: t, view: n, pluginKey: r = "floatingMenu", updateDelay: i = 250, resizeDelay: a = 60, options: o, appendTo: s, shouldShow: c }) {
|
|
13229
13238
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.shouldShow = ({ view: e, state: t }) => {
|
|
13230
13239
|
let { selection: n } = t, { $anchor: r, empty: i } = n, a = r.depth === 1, o = r.parent.isTextblock && !r.parent.type.spec.code && !r.parent.textContent && r.parent.childCount === 0 && !this.getTextContent(r.parent);
|
|
@@ -13299,7 +13308,7 @@ var yh = class {
|
|
|
13299
13308
|
}
|
|
13300
13309
|
}
|
|
13301
13310
|
updatePosition() {
|
|
13302
|
-
let { selection: e } = this.editor.state, t =
|
|
13311
|
+
let { selection: e } = this.editor.state, t = Iu(this.view, e.from, e.to);
|
|
13303
13312
|
r({
|
|
13304
13313
|
getBoundingClientRect: () => t,
|
|
13305
13314
|
getClientRects: () => [t]
|
|
@@ -13329,9 +13338,9 @@ var yh = class {
|
|
|
13329
13338
|
destroy() {
|
|
13330
13339
|
this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), window.removeEventListener("resize", this.resizeHandler), this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.editor.off("transaction", this.transactionHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
|
|
13331
13340
|
}
|
|
13332
|
-
},
|
|
13341
|
+
}, xh = (e) => new N({
|
|
13333
13342
|
key: typeof e.pluginKey == "string" ? new P(e.pluginKey) : e.pluginKey,
|
|
13334
|
-
view: (t) => new
|
|
13343
|
+
view: (t) => new bh({
|
|
13335
13344
|
view: t,
|
|
13336
13345
|
...e
|
|
13337
13346
|
})
|
|
@@ -13353,7 +13362,7 @@ q.create({
|
|
|
13353
13362
|
return { updateFloatingMenuPosition: () => ({ tr: e, dispatch: t }) => (t && e.setMeta(this.options.pluginKey, "updatePosition"), !0) };
|
|
13354
13363
|
},
|
|
13355
13364
|
addProseMirrorPlugins() {
|
|
13356
|
-
return this.options.element ? [
|
|
13365
|
+
return this.options.element ? [xh({
|
|
13357
13366
|
pluginKey: this.options.pluginKey,
|
|
13358
13367
|
editor: this.editor,
|
|
13359
13368
|
element: this.options.element,
|
|
@@ -13366,22 +13375,22 @@ q.create({
|
|
|
13366
13375
|
}
|
|
13367
13376
|
});
|
|
13368
13377
|
//#endregion
|
|
13369
|
-
//#region ../../node_modules/.pnpm/@tiptap+react@3.22.
|
|
13370
|
-
function
|
|
13378
|
+
//#region ../../node_modules/.pnpm/@tiptap+react@3.22.5_@floating-ui+dom@1.7.6_@tiptap+core@3.22.5_@tiptap+pm@3.22.5__@tip_412b5dd72844165b28cdb59267386b00/node_modules/@tiptap/react/dist/menus/index.js
|
|
13379
|
+
function Sh(e, t) {
|
|
13371
13380
|
return e ?? new P(t);
|
|
13372
13381
|
}
|
|
13373
|
-
var
|
|
13382
|
+
var Ch = typeof window < "u" ? v : _, wh = /* @__PURE__ */ new Set([
|
|
13374
13383
|
"left",
|
|
13375
13384
|
"opacity",
|
|
13376
13385
|
"position",
|
|
13377
13386
|
"top",
|
|
13378
13387
|
"visibility",
|
|
13379
13388
|
"width"
|
|
13380
|
-
]),
|
|
13389
|
+
]), Th = /* @__PURE__ */ new Set(/* @__PURE__ */ "animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.columnCount.columns.fillOpacity.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineClamp.lineHeight.opacity.order.orphans.scale.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth.tabSize.widows.zIndex.zoom".split(".")), Eh = /* @__PURE__ */ new Set([
|
|
13381
13390
|
"children",
|
|
13382
13391
|
"className",
|
|
13383
13392
|
"style"
|
|
13384
|
-
]),
|
|
13393
|
+
]), Dh = /* @__PURE__ */ new Set(["tabIndex"]), Oh = /* @__PURE__ */ new Set([
|
|
13385
13394
|
"accessKey",
|
|
13386
13395
|
"autoCapitalize",
|
|
13387
13396
|
"contentEditable",
|
|
@@ -13399,33 +13408,33 @@ var Sh = typeof window < "u" ? v : _, Ch = /* @__PURE__ */ new Set([
|
|
|
13399
13408
|
"tabIndex",
|
|
13400
13409
|
"title",
|
|
13401
13410
|
"translate"
|
|
13402
|
-
]),
|
|
13411
|
+
]), kh = {
|
|
13403
13412
|
Blur: "focusout",
|
|
13404
13413
|
DoubleClick: "dblclick",
|
|
13405
13414
|
Focus: "focusin",
|
|
13406
13415
|
MouseEnter: "mouseenter",
|
|
13407
13416
|
MouseLeave: "mouseleave"
|
|
13408
13417
|
};
|
|
13409
|
-
function
|
|
13418
|
+
function Ah(e, t) {
|
|
13410
13419
|
return /^on[A-Z]/.test(e) && typeof t == "function";
|
|
13411
13420
|
}
|
|
13412
|
-
function Ah(e) {
|
|
13413
|
-
return e.startsWith("aria-") || e.startsWith("data-"), e;
|
|
13414
|
-
}
|
|
13415
13421
|
function jh(e) {
|
|
13416
|
-
return e.startsWith("aria-") || e.startsWith("data-")
|
|
13422
|
+
return e.startsWith("aria-") || e.startsWith("data-"), e;
|
|
13417
13423
|
}
|
|
13418
13424
|
function Mh(e) {
|
|
13419
|
-
return e.startsWith("
|
|
13425
|
+
return e.startsWith("aria-") || e.startsWith("data-") || Oh.has(e);
|
|
13420
13426
|
}
|
|
13421
13427
|
function Nh(e) {
|
|
13428
|
+
return e.startsWith("--") ? e : e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
13429
|
+
}
|
|
13430
|
+
function Ph(e) {
|
|
13422
13431
|
let t = e.endsWith("Capture"), n = (t ? e.slice(0, -7) : e).slice(2);
|
|
13423
13432
|
return {
|
|
13424
|
-
eventName:
|
|
13433
|
+
eventName: kh[n] ?? n.toLowerCase(),
|
|
13425
13434
|
options: t ? { capture: !0 } : void 0
|
|
13426
13435
|
};
|
|
13427
13436
|
}
|
|
13428
|
-
function
|
|
13437
|
+
function Fh(e, t) {
|
|
13429
13438
|
let n = t.defaultPrevented, r = !1, i = Object.create(t);
|
|
13430
13439
|
return Object.defineProperties(i, {
|
|
13431
13440
|
nativeEvent: { value: t },
|
|
@@ -13442,17 +13451,17 @@ function Ph(e, t) {
|
|
|
13442
13451
|
} }
|
|
13443
13452
|
}), i;
|
|
13444
13453
|
}
|
|
13445
|
-
function
|
|
13446
|
-
return
|
|
13454
|
+
function Ih(e) {
|
|
13455
|
+
return Dh.has(e);
|
|
13447
13456
|
}
|
|
13448
|
-
function
|
|
13457
|
+
function Lh(e, t, n) {
|
|
13449
13458
|
if (t === "tabIndex") {
|
|
13450
13459
|
e.tabIndex = Number(n);
|
|
13451
13460
|
return;
|
|
13452
13461
|
}
|
|
13453
13462
|
e[t] = n;
|
|
13454
13463
|
}
|
|
13455
|
-
function
|
|
13464
|
+
function Rh(e, t) {
|
|
13456
13465
|
if (t === "tabIndex") {
|
|
13457
13466
|
e.removeAttribute("tabindex");
|
|
13458
13467
|
return;
|
|
@@ -13468,37 +13477,37 @@ function Lh(e, t) {
|
|
|
13468
13477
|
}
|
|
13469
13478
|
e[t] = "";
|
|
13470
13479
|
}
|
|
13471
|
-
function Rh(e, t) {
|
|
13472
|
-
return typeof t != "number" || t === 0 || e.startsWith("--") || wh.has(e) ? String(t) : `${t}px`;
|
|
13473
|
-
}
|
|
13474
13480
|
function zh(e, t) {
|
|
13475
|
-
|
|
13481
|
+
return typeof t != "number" || t === 0 || e.startsWith("--") || Th.has(e) ? String(t) : `${t}px`;
|
|
13476
13482
|
}
|
|
13477
|
-
function Bh(e, t
|
|
13478
|
-
|
|
13483
|
+
function Bh(e, t) {
|
|
13484
|
+
wh.has(t) || e.style.removeProperty(Nh(t));
|
|
13479
13485
|
}
|
|
13480
13486
|
function Vh(e, t, n) {
|
|
13487
|
+
wh.has(t) || e.style.setProperty(Nh(t), zh(t, n));
|
|
13488
|
+
}
|
|
13489
|
+
function Hh(e, t, n) {
|
|
13481
13490
|
(/* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])).forEach((r) => {
|
|
13482
|
-
if (
|
|
13491
|
+
if (Eh.has(r) || !Mh(r) || Ah(r, t[r]) || Ah(r, n[r])) return;
|
|
13483
13492
|
let i = t[r], a = n[r];
|
|
13484
13493
|
if (i === a) return;
|
|
13485
|
-
let o =
|
|
13494
|
+
let o = jh(r);
|
|
13486
13495
|
if (a == null || a === !1) {
|
|
13487
|
-
|
|
13496
|
+
Ih(r) && Rh(e, r), e.removeAttribute(o);
|
|
13488
13497
|
return;
|
|
13489
13498
|
}
|
|
13490
13499
|
if (a === !0) {
|
|
13491
|
-
|
|
13500
|
+
Ih(r) && Lh(e, r, !0), e.setAttribute(o, "");
|
|
13492
13501
|
return;
|
|
13493
13502
|
}
|
|
13494
|
-
if (
|
|
13495
|
-
|
|
13503
|
+
if (Ih(r)) {
|
|
13504
|
+
Lh(e, r, a);
|
|
13496
13505
|
return;
|
|
13497
13506
|
}
|
|
13498
13507
|
e.setAttribute(o, String(a));
|
|
13499
13508
|
});
|
|
13500
13509
|
}
|
|
13501
|
-
function
|
|
13510
|
+
function Uh(e, t, n) {
|
|
13502
13511
|
if (t !== n) {
|
|
13503
13512
|
if (n) {
|
|
13504
13513
|
e.className = n;
|
|
@@ -13507,28 +13516,28 @@ function Hh(e, t, n) {
|
|
|
13507
13516
|
e.removeAttribute("class");
|
|
13508
13517
|
}
|
|
13509
13518
|
}
|
|
13510
|
-
function
|
|
13519
|
+
function Wh(e, t, n) {
|
|
13511
13520
|
let r = t ?? {}, i = n ?? {};
|
|
13512
13521
|
(/* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])).forEach((t) => {
|
|
13513
13522
|
let n = r[t], a = i[t];
|
|
13514
13523
|
if (n !== a) {
|
|
13515
13524
|
if (a == null) {
|
|
13516
|
-
|
|
13525
|
+
Bh(e, t);
|
|
13517
13526
|
return;
|
|
13518
13527
|
}
|
|
13519
|
-
|
|
13528
|
+
Vh(e, t, a);
|
|
13520
13529
|
}
|
|
13521
13530
|
});
|
|
13522
13531
|
}
|
|
13523
|
-
function
|
|
13532
|
+
function Gh(e, t, n) {
|
|
13524
13533
|
t.forEach(({ eventName: t, listener: n, options: r }) => {
|
|
13525
13534
|
e.removeEventListener(t, n, r);
|
|
13526
13535
|
});
|
|
13527
13536
|
let r = [];
|
|
13528
13537
|
return Object.entries(n).forEach(([t, n]) => {
|
|
13529
|
-
if (!
|
|
13530
|
-
let { eventName: i, options: a } =
|
|
13531
|
-
n(
|
|
13538
|
+
if (!Ah(t, n)) return;
|
|
13539
|
+
let { eventName: i, options: a } = Ph(t), o = (t) => {
|
|
13540
|
+
n(Fh(e, t));
|
|
13532
13541
|
};
|
|
13533
13542
|
e.addEventListener(i, o, a), r.push({
|
|
13534
13543
|
eventName: i,
|
|
@@ -13537,21 +13546,21 @@ function Wh(e, t, n) {
|
|
|
13537
13546
|
});
|
|
13538
13547
|
}), r;
|
|
13539
13548
|
}
|
|
13540
|
-
function
|
|
13549
|
+
function Kh(e, t) {
|
|
13541
13550
|
let n = b({}), r = b([]);
|
|
13542
|
-
|
|
13551
|
+
Ch(() => {
|
|
13543
13552
|
let i = n.current;
|
|
13544
|
-
return
|
|
13553
|
+
return Uh(e, i.className, t.className), Wh(e, i.style, t.style), Hh(e, i, t), r.current = Gh(e, r.current, t), n.current = t, () => {
|
|
13545
13554
|
r.current.forEach(({ eventName: t, listener: n, options: r }) => {
|
|
13546
13555
|
e.removeEventListener(t, n, r);
|
|
13547
13556
|
}), r.current = [];
|
|
13548
13557
|
};
|
|
13549
13558
|
}, [e, t]);
|
|
13550
13559
|
}
|
|
13551
|
-
var
|
|
13552
|
-
let d = b(document.createElement("div")), f = b(
|
|
13553
|
-
|
|
13554
|
-
let { editor: p } =
|
|
13560
|
+
var qh = l.forwardRef(({ pluginKey: e, editor: t, updateDelay: n, resizeDelay: r, appendTo: i, shouldShow: a = null, getReferencedVirtualElement: o, options: s, children: c, ...l }, u) => {
|
|
13561
|
+
let d = b(document.createElement("div")), f = b(Sh(e, "bubbleMenu")).current;
|
|
13562
|
+
Kh(d.current, l), typeof u == "function" ? u(d.current) : u && (u.current = d.current);
|
|
13563
|
+
let { editor: p } = Cp(), m = t || p, h = {
|
|
13555
13564
|
updateDelay: n,
|
|
13556
13565
|
resizeDelay: r,
|
|
13557
13566
|
appendTo: i,
|
|
@@ -13570,7 +13579,7 @@ var Kh = l.forwardRef(({ pluginKey: e, editor: t, updateDelay: n, resizeDelay: r
|
|
|
13570
13579
|
}
|
|
13571
13580
|
let e = d.current;
|
|
13572
13581
|
e.style.visibility = "hidden", e.style.position = "absolute";
|
|
13573
|
-
let t =
|
|
13582
|
+
let t = yh({
|
|
13574
13583
|
...g.current,
|
|
13575
13584
|
editor: m,
|
|
13576
13585
|
element: e
|
|
@@ -13606,9 +13615,9 @@ var Kh = l.forwardRef(({ pluginKey: e, editor: t, updateDelay: n, resizeDelay: r
|
|
|
13606
13615
|
]), re(c, d.current);
|
|
13607
13616
|
});
|
|
13608
13617
|
l.forwardRef(({ pluginKey: e, editor: t, updateDelay: n, resizeDelay: r, appendTo: i, shouldShow: a = null, options: o, children: s, ...c }, l) => {
|
|
13609
|
-
let u = b(document.createElement("div")), d = b(
|
|
13610
|
-
|
|
13611
|
-
let { editor: f } =
|
|
13618
|
+
let u = b(document.createElement("div")), d = b(Sh(e, "floatingMenu")).current;
|
|
13619
|
+
Kh(u.current, c), typeof l == "function" ? l(u.current) : l && (l.current = u.current);
|
|
13620
|
+
let { editor: f } = Cp(), p = t || f, m = {
|
|
13612
13621
|
updateDelay: n,
|
|
13613
13622
|
resizeDelay: r,
|
|
13614
13623
|
appendTo: i,
|
|
@@ -13626,7 +13635,7 @@ l.forwardRef(({ pluginKey: e, editor: t, updateDelay: n, resizeDelay: r, appendT
|
|
|
13626
13635
|
}
|
|
13627
13636
|
let e = u.current;
|
|
13628
13637
|
e.style.visibility = "hidden", e.style.position = "absolute";
|
|
13629
|
-
let t =
|
|
13638
|
+
let t = xh({
|
|
13630
13639
|
...h.current,
|
|
13631
13640
|
editor: p,
|
|
13632
13641
|
element: e
|
|
@@ -13661,8 +13670,8 @@ l.forwardRef(({ pluginKey: e, editor: t, updateDelay: n, resizeDelay: r, appendT
|
|
|
13661
13670
|
]), re(s, u.current);
|
|
13662
13671
|
});
|
|
13663
13672
|
//#endregion
|
|
13664
|
-
//#region ../../node_modules/.pnpm/@tiptap+core@3.22.
|
|
13665
|
-
var
|
|
13673
|
+
//#region ../../node_modules/.pnpm/@tiptap+core@3.22.5_@tiptap+pm@3.22.5/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
|
|
13674
|
+
var Jh = (e, t) => {
|
|
13666
13675
|
if (e === "slot") return 0;
|
|
13667
13676
|
if (e instanceof Function) return e(t);
|
|
13668
13677
|
let { children: n, ...r } = t ?? {};
|
|
@@ -13672,7 +13681,7 @@ var qh = (e, t) => {
|
|
|
13672
13681
|
r,
|
|
13673
13682
|
n
|
|
13674
13683
|
];
|
|
13675
|
-
},
|
|
13684
|
+
}, Yh = /^\s*>\s$/, Xh = J.create({
|
|
13676
13685
|
name: "blockquote",
|
|
13677
13686
|
addOptions() {
|
|
13678
13687
|
return { HTMLAttributes: {} };
|
|
@@ -13684,9 +13693,9 @@ var qh = (e, t) => {
|
|
|
13684
13693
|
return [{ tag: "blockquote" }];
|
|
13685
13694
|
},
|
|
13686
13695
|
renderHTML({ HTMLAttributes: e }) {
|
|
13687
|
-
return /* @__PURE__ */
|
|
13696
|
+
return /* @__PURE__ */ Jh("blockquote", {
|
|
13688
13697
|
...K(this.options.HTMLAttributes, e),
|
|
13689
|
-
children: /* @__PURE__ */
|
|
13698
|
+
children: /* @__PURE__ */ Jh("slot", {})
|
|
13690
13699
|
});
|
|
13691
13700
|
},
|
|
13692
13701
|
parseMarkdown: (e, t) => {
|
|
@@ -13712,12 +13721,12 @@ var qh = (e, t) => {
|
|
|
13712
13721
|
return { "Mod-Shift-b": () => this.editor.commands.toggleBlockquote() };
|
|
13713
13722
|
},
|
|
13714
13723
|
addInputRules() {
|
|
13715
|
-
return [
|
|
13716
|
-
find:
|
|
13724
|
+
return [Wd({
|
|
13725
|
+
find: Yh,
|
|
13717
13726
|
type: this.type
|
|
13718
13727
|
})];
|
|
13719
13728
|
}
|
|
13720
|
-
}),
|
|
13729
|
+
}), Zh = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Qh = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, $h = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, eg = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, tg = _d.create({
|
|
13721
13730
|
name: "bold",
|
|
13722
13731
|
addOptions() {
|
|
13723
13732
|
return { HTMLAttributes: {} };
|
|
@@ -13740,9 +13749,9 @@ var qh = (e, t) => {
|
|
|
13740
13749
|
];
|
|
13741
13750
|
},
|
|
13742
13751
|
renderHTML({ HTMLAttributes: e }) {
|
|
13743
|
-
return /* @__PURE__ */
|
|
13752
|
+
return /* @__PURE__ */ Jh("strong", {
|
|
13744
13753
|
...K(this.options.HTMLAttributes, e),
|
|
13745
|
-
children: /* @__PURE__ */
|
|
13754
|
+
children: /* @__PURE__ */ Jh("slot", {})
|
|
13746
13755
|
});
|
|
13747
13756
|
},
|
|
13748
13757
|
markdownTokenName: "strong",
|
|
@@ -13766,24 +13775,24 @@ var qh = (e, t) => {
|
|
|
13766
13775
|
};
|
|
13767
13776
|
},
|
|
13768
13777
|
addInputRules() {
|
|
13769
|
-
return [
|
|
13770
|
-
find:
|
|
13778
|
+
return [Vd({
|
|
13779
|
+
find: Zh,
|
|
13771
13780
|
type: this.type
|
|
13772
|
-
}),
|
|
13773
|
-
find:
|
|
13781
|
+
}), Vd({
|
|
13782
|
+
find: $h,
|
|
13774
13783
|
type: this.type
|
|
13775
13784
|
})];
|
|
13776
13785
|
},
|
|
13777
13786
|
addPasteRules() {
|
|
13778
|
-
return [
|
|
13779
|
-
find:
|
|
13787
|
+
return [uf({
|
|
13788
|
+
find: Qh,
|
|
13780
13789
|
type: this.type
|
|
13781
|
-
}),
|
|
13782
|
-
find:
|
|
13790
|
+
}), uf({
|
|
13791
|
+
find: eg,
|
|
13783
13792
|
type: this.type
|
|
13784
13793
|
})];
|
|
13785
13794
|
}
|
|
13786
|
-
}),
|
|
13795
|
+
}), ng = /(^|[^`])`([^`]+)`(?!`)$/, rg = /(^|[^`])`([^`]+)`(?!`)/g, ig = _d.create({
|
|
13787
13796
|
name: "code",
|
|
13788
13797
|
addOptions() {
|
|
13789
13798
|
return { HTMLAttributes: {} };
|
|
@@ -13818,18 +13827,18 @@ var qh = (e, t) => {
|
|
|
13818
13827
|
return { "Mod-e": () => this.editor.commands.toggleCode() };
|
|
13819
13828
|
},
|
|
13820
13829
|
addInputRules() {
|
|
13821
|
-
return [
|
|
13822
|
-
find:
|
|
13830
|
+
return [Vd({
|
|
13831
|
+
find: ng,
|
|
13823
13832
|
type: this.type
|
|
13824
13833
|
})];
|
|
13825
13834
|
},
|
|
13826
13835
|
addPasteRules() {
|
|
13827
|
-
return [
|
|
13828
|
-
find:
|
|
13836
|
+
return [uf({
|
|
13837
|
+
find: rg,
|
|
13829
13838
|
type: this.type
|
|
13830
13839
|
})];
|
|
13831
13840
|
}
|
|
13832
|
-
}),
|
|
13841
|
+
}), ag = 4, og = /^```([a-z]+)?[\s\n]$/, sg = /^~~~([a-z]+)?[\s\n]$/, cg = J.create({
|
|
13833
13842
|
name: "codeBlock",
|
|
13834
13843
|
addOptions() {
|
|
13835
13844
|
return {
|
|
@@ -13838,7 +13847,7 @@ var qh = (e, t) => {
|
|
|
13838
13847
|
exitOnArrowDown: !0,
|
|
13839
13848
|
defaultLanguage: null,
|
|
13840
13849
|
enableTabIndentation: !1,
|
|
13841
|
-
tabSize:
|
|
13850
|
+
tabSize: ag,
|
|
13842
13851
|
HTMLAttributes: {}
|
|
13843
13852
|
};
|
|
13844
13853
|
},
|
|
@@ -13901,7 +13910,7 @@ var qh = (e, t) => {
|
|
|
13901
13910
|
},
|
|
13902
13911
|
Tab: ({ editor: e }) => {
|
|
13903
13912
|
if (!this.options.enableTabIndentation) return !1;
|
|
13904
|
-
let t = this.options.tabSize ??
|
|
13913
|
+
let t = this.options.tabSize ?? ag, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
|
|
13905
13914
|
if (i.parent.type !== this.type) return !1;
|
|
13906
13915
|
let o = " ".repeat(t);
|
|
13907
13916
|
return a ? e.commands.insertContent(o) : e.commands.command(({ tr: e }) => {
|
|
@@ -13911,7 +13920,7 @@ var qh = (e, t) => {
|
|
|
13911
13920
|
},
|
|
13912
13921
|
"Shift-Tab": ({ editor: e }) => {
|
|
13913
13922
|
if (!this.options.enableTabIndentation) return !1;
|
|
13914
|
-
let t = this.options.tabSize ??
|
|
13923
|
+
let t = this.options.tabSize ?? ag, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
|
|
13915
13924
|
return i.parent.type === this.type ? a ? e.commands.command(({ tr: e }) => {
|
|
13916
13925
|
let { pos: r } = i, a = i.start(), o = i.end(), s = n.doc.textBetween(a, o, "\n", "\n").split("\n"), c = 0, l = 0, u = r - a;
|
|
13917
13926
|
for (let e = 0; e < s.length; e += 1) {
|
|
@@ -13951,12 +13960,12 @@ var qh = (e, t) => {
|
|
|
13951
13960
|
};
|
|
13952
13961
|
},
|
|
13953
13962
|
addInputRules() {
|
|
13954
|
-
return [
|
|
13955
|
-
find:
|
|
13963
|
+
return [Ud({
|
|
13964
|
+
find: og,
|
|
13956
13965
|
type: this.type,
|
|
13957
13966
|
getAttributes: (e) => ({ language: e[1] })
|
|
13958
|
-
}),
|
|
13959
|
-
find:
|
|
13967
|
+
}), Ud({
|
|
13968
|
+
find: sg,
|
|
13960
13969
|
type: this.type,
|
|
13961
13970
|
getAttributes: (e) => ({ language: e[1] })
|
|
13962
13971
|
})];
|
|
@@ -13973,12 +13982,12 @@ var qh = (e, t) => {
|
|
|
13973
13982
|
} }
|
|
13974
13983
|
})];
|
|
13975
13984
|
}
|
|
13976
|
-
}),
|
|
13985
|
+
}), lg = J.create({
|
|
13977
13986
|
name: "doc",
|
|
13978
13987
|
topNode: !0,
|
|
13979
13988
|
content: "block+",
|
|
13980
13989
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n\n") : ""
|
|
13981
|
-
}),
|
|
13990
|
+
}), ug = J.create({
|
|
13982
13991
|
name: "hardBreak",
|
|
13983
13992
|
markdownTokenName: "br",
|
|
13984
13993
|
addOptions() {
|
|
@@ -14022,7 +14031,7 @@ var qh = (e, t) => {
|
|
|
14022
14031
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
14023
14032
|
};
|
|
14024
14033
|
}
|
|
14025
|
-
}),
|
|
14034
|
+
}), dg = J.create({
|
|
14026
14035
|
name: "heading",
|
|
14027
14036
|
addOptions() {
|
|
14028
14037
|
return {
|
|
@@ -14077,13 +14086,13 @@ var qh = (e, t) => {
|
|
|
14077
14086
|
}), {});
|
|
14078
14087
|
},
|
|
14079
14088
|
addInputRules() {
|
|
14080
|
-
return this.options.levels.map((e) =>
|
|
14089
|
+
return this.options.levels.map((e) => Ud({
|
|
14081
14090
|
find: RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
|
|
14082
14091
|
type: this.type,
|
|
14083
14092
|
getAttributes: { level: e }
|
|
14084
14093
|
}));
|
|
14085
14094
|
}
|
|
14086
|
-
}),
|
|
14095
|
+
}), fg = J.create({
|
|
14087
14096
|
name: "horizontalRule",
|
|
14088
14097
|
addOptions() {
|
|
14089
14098
|
return {
|
|
@@ -14103,7 +14112,7 @@ var qh = (e, t) => {
|
|
|
14103
14112
|
renderMarkdown: () => "---",
|
|
14104
14113
|
addCommands() {
|
|
14105
14114
|
return { setHorizontalRule: () => ({ chain: e, state: t }) => {
|
|
14106
|
-
if (!
|
|
14115
|
+
if (!qd(t, t.schema.nodes[this.name])) return !1;
|
|
14107
14116
|
let { selection: n } = t, { $to: r } = n, i = e();
|
|
14108
14117
|
return ju(n) ? i.insertContentAt(r.pos, { type: this.name }) : i.insertContent({ type: this.name }), i.command(({ state: e, tr: t, dispatch: n }) => {
|
|
14109
14118
|
if (n) {
|
|
@@ -14120,12 +14129,12 @@ var qh = (e, t) => {
|
|
|
14120
14129
|
} };
|
|
14121
14130
|
},
|
|
14122
14131
|
addInputRules() {
|
|
14123
|
-
return [
|
|
14132
|
+
return [Hd({
|
|
14124
14133
|
find: /^(?:---|—-|___\s|\*\*\*\s)$/,
|
|
14125
14134
|
type: this.type
|
|
14126
14135
|
})];
|
|
14127
14136
|
}
|
|
14128
|
-
}),
|
|
14137
|
+
}), pg = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, mg = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, hg = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, gg = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, _g = _d.create({
|
|
14129
14138
|
name: "italic",
|
|
14130
14139
|
addOptions() {
|
|
14131
14140
|
return { HTMLAttributes: {} };
|
|
@@ -14172,43 +14181,43 @@ var qh = (e, t) => {
|
|
|
14172
14181
|
};
|
|
14173
14182
|
},
|
|
14174
14183
|
addInputRules() {
|
|
14175
|
-
return [
|
|
14176
|
-
find:
|
|
14184
|
+
return [Vd({
|
|
14185
|
+
find: pg,
|
|
14177
14186
|
type: this.type
|
|
14178
|
-
}),
|
|
14179
|
-
find:
|
|
14187
|
+
}), Vd({
|
|
14188
|
+
find: hg,
|
|
14180
14189
|
type: this.type
|
|
14181
14190
|
})];
|
|
14182
14191
|
},
|
|
14183
14192
|
addPasteRules() {
|
|
14184
|
-
return [
|
|
14185
|
-
find:
|
|
14193
|
+
return [uf({
|
|
14194
|
+
find: mg,
|
|
14186
14195
|
type: this.type
|
|
14187
|
-
}),
|
|
14188
|
-
find:
|
|
14196
|
+
}), uf({
|
|
14197
|
+
find: gg,
|
|
14189
14198
|
type: this.type
|
|
14190
14199
|
})];
|
|
14191
14200
|
}
|
|
14192
|
-
}),
|
|
14193
|
-
function
|
|
14201
|
+
}), vg = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", yg = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", bg = "numeric", xg = "ascii", Sg = "alpha", Cg = "asciinumeric", wg = "alphanumeric", Tg = "domain", Eg = "emoji", Dg = "scheme", Og = "slashscheme", kg = "whitespace";
|
|
14202
|
+
function Ag(e, t) {
|
|
14194
14203
|
return e in t || (t[e] = []), t[e];
|
|
14195
14204
|
}
|
|
14196
|
-
function
|
|
14197
|
-
t[
|
|
14205
|
+
function jg(e, t, n) {
|
|
14206
|
+
t[bg] && (t[Cg] = !0, t[wg] = !0), t[xg] && (t[Cg] = !0, t[Sg] = !0), t[Cg] && (t[wg] = !0), t[Sg] && (t[wg] = !0), t[wg] && (t[Tg] = !0), t[Eg] && (t[Tg] = !0);
|
|
14198
14207
|
for (let r in t) {
|
|
14199
|
-
let t =
|
|
14208
|
+
let t = Ag(r, n);
|
|
14200
14209
|
t.indexOf(e) < 0 && t.push(e);
|
|
14201
14210
|
}
|
|
14202
14211
|
}
|
|
14203
|
-
function
|
|
14212
|
+
function Mg(e, t) {
|
|
14204
14213
|
let n = {};
|
|
14205
14214
|
for (let r in t) t[r].indexOf(e) >= 0 && (n[r] = !0);
|
|
14206
14215
|
return n;
|
|
14207
14216
|
}
|
|
14208
|
-
function
|
|
14217
|
+
function Ng(e = null) {
|
|
14209
14218
|
this.j = {}, this.jr = [], this.jd = null, this.t = e;
|
|
14210
14219
|
}
|
|
14211
|
-
|
|
14220
|
+
Ng.groups = {}, Ng.prototype = {
|
|
14212
14221
|
accepts() {
|
|
14213
14222
|
return !!this.t;
|
|
14214
14223
|
},
|
|
@@ -14228,9 +14237,9 @@ Mg.groups = {}, Mg.prototype = {
|
|
|
14228
14237
|
for (let i = 0; i < e.length; i++) this.tt(e[i], t, n, r);
|
|
14229
14238
|
},
|
|
14230
14239
|
tr(e, t, n, r) {
|
|
14231
|
-
r ||=
|
|
14240
|
+
r ||= Ng.groups;
|
|
14232
14241
|
let i;
|
|
14233
|
-
return t && t.j ? i = t : (i = new
|
|
14242
|
+
return t && t.j ? i = t : (i = new Ng(t), n && r && jg(t, n, r)), this.jr.push([e, i]), i;
|
|
14234
14243
|
},
|
|
14235
14244
|
ts(e, t, n, r) {
|
|
14236
14245
|
let i = this, a = e.length;
|
|
@@ -14239,119 +14248,119 @@ Mg.groups = {}, Mg.prototype = {
|
|
|
14239
14248
|
return i.tt(e[a - 1], t, n, r);
|
|
14240
14249
|
},
|
|
14241
14250
|
tt(e, t, n, r) {
|
|
14242
|
-
r ||=
|
|
14251
|
+
r ||= Ng.groups;
|
|
14243
14252
|
let i = this;
|
|
14244
14253
|
if (t && t.j) return i.j[e] = t, t;
|
|
14245
14254
|
let a = t, o, s = i.go(e);
|
|
14246
|
-
return s ? (o = new
|
|
14255
|
+
return s ? (o = new Ng(), Object.assign(o.j, s.j), o.jr.push.apply(o.jr, s.jr), o.jd = s.jd, o.t = s.t) : o = new Ng(), a && (r && (o.t && typeof o.t == "string" ? jg(a, Object.assign(Mg(o.t, r), n), r) : n && jg(a, n, r)), o.t = a), i.j[e] = o, o;
|
|
14247
14256
|
}
|
|
14248
14257
|
};
|
|
14249
|
-
var X = (e, t, n, r, i) => e.ta(t, n, r, i), Z = (e, t, n, r, i) => e.tr(t, n, r, i),
|
|
14258
|
+
var X = (e, t, n, r, i) => e.ta(t, n, r, i), Z = (e, t, n, r, i) => e.tr(t, n, r, i), Pg = (e, t, n, r, i) => e.ts(t, n, r, i), Q = (e, t, n, r, i) => e.tt(t, n, r, i), Fg = "WORD", Ig = "UWORD", Lg = "ASCIINUMERICAL", Rg = "ALPHANUMERICAL", zg = "LOCALHOST", Bg = "TLD", Vg = "UTLD", Hg = "SCHEME", Ug = "SLASH_SCHEME", Wg = "NUM", Gg = "WS", Kg = "NL", qg = "OPENBRACE", Jg = "CLOSEBRACE", Yg = "OPENBRACKET", Xg = "CLOSEBRACKET", Zg = "OPENPAREN", Qg = "CLOSEPAREN", $g = "OPENANGLEBRACKET", e_ = "CLOSEANGLEBRACKET", t_ = "FULLWIDTHLEFTPAREN", n_ = "FULLWIDTHRIGHTPAREN", r_ = "LEFTCORNERBRACKET", i_ = "RIGHTCORNERBRACKET", a_ = "LEFTWHITECORNERBRACKET", o_ = "RIGHTWHITECORNERBRACKET", s_ = "FULLWIDTHLESSTHAN", c_ = "FULLWIDTHGREATERTHAN", l_ = "AMPERSAND", u_ = "APOSTROPHE", d_ = "ASTERISK", f_ = "AT", p_ = "BACKSLASH", m_ = "BACKTICK", h_ = "CARET", g_ = "COLON", __ = "COMMA", v_ = "DOLLAR", y_ = "DOT", b_ = "EQUALS", x_ = "EXCLAMATION", S_ = "HYPHEN", C_ = "PERCENT", w_ = "PIPE", T_ = "PLUS", E_ = "POUND", D_ = "QUERY", O_ = "QUOTE", k_ = "FULLWIDTHMIDDLEDOT", A_ = "SEMI", j_ = "SLASH", M_ = "TILDE", N_ = "UNDERSCORE", P_ = "EMOJI", F_ = "SYM", I_ = /* @__PURE__ */ Object.freeze({
|
|
14250
14259
|
__proto__: null,
|
|
14251
|
-
ALPHANUMERICAL:
|
|
14252
|
-
AMPERSAND:
|
|
14253
|
-
APOSTROPHE:
|
|
14254
|
-
ASCIINUMERICAL:
|
|
14255
|
-
ASTERISK:
|
|
14256
|
-
AT:
|
|
14257
|
-
BACKSLASH:
|
|
14258
|
-
BACKTICK:
|
|
14259
|
-
CARET:
|
|
14260
|
-
CLOSEANGLEBRACKET:
|
|
14261
|
-
CLOSEBRACE:
|
|
14262
|
-
CLOSEBRACKET:
|
|
14263
|
-
CLOSEPAREN:
|
|
14264
|
-
COLON:
|
|
14265
|
-
COMMA:
|
|
14266
|
-
DOLLAR:
|
|
14267
|
-
DOT:
|
|
14268
|
-
EMOJI:
|
|
14269
|
-
EQUALS:
|
|
14270
|
-
EXCLAMATION:
|
|
14271
|
-
FULLWIDTHGREATERTHAN:
|
|
14272
|
-
FULLWIDTHLEFTPAREN:
|
|
14273
|
-
FULLWIDTHLESSTHAN:
|
|
14274
|
-
FULLWIDTHMIDDLEDOT:
|
|
14275
|
-
FULLWIDTHRIGHTPAREN:
|
|
14276
|
-
HYPHEN:
|
|
14277
|
-
LEFTCORNERBRACKET:
|
|
14278
|
-
LEFTWHITECORNERBRACKET:
|
|
14279
|
-
LOCALHOST:
|
|
14280
|
-
NL:
|
|
14281
|
-
NUM:
|
|
14282
|
-
OPENANGLEBRACKET:
|
|
14283
|
-
OPENBRACE:
|
|
14284
|
-
OPENBRACKET:
|
|
14285
|
-
OPENPAREN:
|
|
14286
|
-
PERCENT:
|
|
14287
|
-
PIPE:
|
|
14288
|
-
PLUS:
|
|
14289
|
-
POUND:
|
|
14290
|
-
QUERY:
|
|
14291
|
-
QUOTE:
|
|
14292
|
-
RIGHTCORNERBRACKET:
|
|
14293
|
-
RIGHTWHITECORNERBRACKET:
|
|
14294
|
-
SCHEME:
|
|
14295
|
-
SEMI:
|
|
14296
|
-
SLASH:
|
|
14297
|
-
SLASH_SCHEME:
|
|
14298
|
-
SYM:
|
|
14299
|
-
TILDE:
|
|
14300
|
-
TLD:
|
|
14301
|
-
UNDERSCORE:
|
|
14302
|
-
UTLD:
|
|
14303
|
-
UWORD:
|
|
14304
|
-
WORD:
|
|
14305
|
-
WS:
|
|
14306
|
-
}),
|
|
14307
|
-
function
|
|
14260
|
+
ALPHANUMERICAL: Rg,
|
|
14261
|
+
AMPERSAND: l_,
|
|
14262
|
+
APOSTROPHE: u_,
|
|
14263
|
+
ASCIINUMERICAL: Lg,
|
|
14264
|
+
ASTERISK: d_,
|
|
14265
|
+
AT: f_,
|
|
14266
|
+
BACKSLASH: p_,
|
|
14267
|
+
BACKTICK: m_,
|
|
14268
|
+
CARET: h_,
|
|
14269
|
+
CLOSEANGLEBRACKET: e_,
|
|
14270
|
+
CLOSEBRACE: Jg,
|
|
14271
|
+
CLOSEBRACKET: Xg,
|
|
14272
|
+
CLOSEPAREN: Qg,
|
|
14273
|
+
COLON: g_,
|
|
14274
|
+
COMMA: __,
|
|
14275
|
+
DOLLAR: v_,
|
|
14276
|
+
DOT: y_,
|
|
14277
|
+
EMOJI: P_,
|
|
14278
|
+
EQUALS: b_,
|
|
14279
|
+
EXCLAMATION: x_,
|
|
14280
|
+
FULLWIDTHGREATERTHAN: c_,
|
|
14281
|
+
FULLWIDTHLEFTPAREN: t_,
|
|
14282
|
+
FULLWIDTHLESSTHAN: s_,
|
|
14283
|
+
FULLWIDTHMIDDLEDOT: k_,
|
|
14284
|
+
FULLWIDTHRIGHTPAREN: n_,
|
|
14285
|
+
HYPHEN: S_,
|
|
14286
|
+
LEFTCORNERBRACKET: r_,
|
|
14287
|
+
LEFTWHITECORNERBRACKET: a_,
|
|
14288
|
+
LOCALHOST: zg,
|
|
14289
|
+
NL: Kg,
|
|
14290
|
+
NUM: Wg,
|
|
14291
|
+
OPENANGLEBRACKET: $g,
|
|
14292
|
+
OPENBRACE: qg,
|
|
14293
|
+
OPENBRACKET: Yg,
|
|
14294
|
+
OPENPAREN: Zg,
|
|
14295
|
+
PERCENT: C_,
|
|
14296
|
+
PIPE: w_,
|
|
14297
|
+
PLUS: T_,
|
|
14298
|
+
POUND: E_,
|
|
14299
|
+
QUERY: D_,
|
|
14300
|
+
QUOTE: O_,
|
|
14301
|
+
RIGHTCORNERBRACKET: i_,
|
|
14302
|
+
RIGHTWHITECORNERBRACKET: o_,
|
|
14303
|
+
SCHEME: Hg,
|
|
14304
|
+
SEMI: A_,
|
|
14305
|
+
SLASH: j_,
|
|
14306
|
+
SLASH_SCHEME: Ug,
|
|
14307
|
+
SYM: F_,
|
|
14308
|
+
TILDE: M_,
|
|
14309
|
+
TLD: Bg,
|
|
14310
|
+
UNDERSCORE: N_,
|
|
14311
|
+
UTLD: Vg,
|
|
14312
|
+
UWORD: Ig,
|
|
14313
|
+
WORD: Fg,
|
|
14314
|
+
WS: Gg
|
|
14315
|
+
}), L_ = /[a-z]/, R_ = /\p{L}/u, z_ = /\p{Emoji}/u, B_ = /\d/, V_ = /\s/, H_ = "\r", U_ = "\n", W_ = "️", G_ = "", K_ = "", q_ = null, J_ = null;
|
|
14316
|
+
function Y_(e = []) {
|
|
14308
14317
|
let t = {};
|
|
14309
|
-
|
|
14310
|
-
let n = new
|
|
14311
|
-
|
|
14312
|
-
let r = Z(n,
|
|
14313
|
-
Z(r,
|
|
14314
|
-
let i = Z(r,
|
|
14315
|
-
Z(o,
|
|
14316
|
-
let s = Z(n,
|
|
14317
|
-
Z(s,
|
|
14318
|
-
let c = Q(n,
|
|
14319
|
-
Q(n,
|
|
14320
|
-
let d = Z(n,
|
|
14321
|
-
Q(d, "#"), Z(d,
|
|
14322
|
-
let f = Q(d,
|
|
14323
|
-
Q(f, "#"), Z(f,
|
|
14324
|
-
let p = [[
|
|
14325
|
-
[
|
|
14326
|
-
[
|
|
14327
|
-
[
|
|
14318
|
+
Ng.groups = t;
|
|
14319
|
+
let n = new Ng();
|
|
14320
|
+
q_ ??= $_(vg), J_ ??= $_(yg), Q(n, "'", u_), Q(n, "{", qg), Q(n, "}", Jg), Q(n, "[", Yg), Q(n, "]", Xg), Q(n, "(", Zg), Q(n, ")", Qg), Q(n, "<", $g), Q(n, ">", e_), Q(n, "(", t_), Q(n, ")", n_), Q(n, "「", r_), Q(n, "」", i_), Q(n, "『", a_), Q(n, "』", o_), Q(n, "<", s_), Q(n, ">", c_), Q(n, "&", l_), Q(n, "*", d_), Q(n, "@", f_), Q(n, "`", m_), Q(n, "^", h_), Q(n, ":", g_), Q(n, ",", __), Q(n, "$", v_), Q(n, ".", y_), Q(n, "=", b_), Q(n, "!", x_), Q(n, "-", S_), Q(n, "%", C_), Q(n, "|", w_), Q(n, "+", T_), Q(n, "#", E_), Q(n, "?", D_), Q(n, "\"", O_), Q(n, "/", j_), Q(n, ";", A_), Q(n, "~", M_), Q(n, "_", N_), Q(n, "\\", p_), Q(n, "・", k_);
|
|
14321
|
+
let r = Z(n, B_, Wg, { [bg]: !0 });
|
|
14322
|
+
Z(r, B_, r);
|
|
14323
|
+
let i = Z(r, L_, Lg, { [Cg]: !0 }), a = Z(r, R_, Rg, { [wg]: !0 }), o = Z(n, L_, Fg, { [xg]: !0 });
|
|
14324
|
+
Z(o, B_, i), Z(o, L_, o), Z(i, B_, i), Z(i, L_, i);
|
|
14325
|
+
let s = Z(n, R_, Ig, { [Sg]: !0 });
|
|
14326
|
+
Z(s, L_), Z(s, B_, a), Z(s, R_, s), Z(a, B_, a), Z(a, L_), Z(a, R_, a);
|
|
14327
|
+
let c = Q(n, U_, Kg, { [kg]: !0 }), l = Q(n, H_, Gg, { [kg]: !0 }), u = Z(n, V_, Gg, { [kg]: !0 });
|
|
14328
|
+
Q(n, K_, u), Q(l, U_, c), Q(l, K_, u), Z(l, V_, u), Q(u, H_), Q(u, U_), Z(u, V_, u), Q(u, K_, u);
|
|
14329
|
+
let d = Z(n, z_, P_, { [Eg]: !0 });
|
|
14330
|
+
Q(d, "#"), Z(d, z_, d), Q(d, W_, d);
|
|
14331
|
+
let f = Q(d, G_);
|
|
14332
|
+
Q(f, "#"), Z(f, z_, d);
|
|
14333
|
+
let p = [[L_, o], [B_, i]], m = [
|
|
14334
|
+
[L_, null],
|
|
14335
|
+
[R_, s],
|
|
14336
|
+
[B_, a]
|
|
14328
14337
|
];
|
|
14329
|
-
for (let e = 0; e <
|
|
14330
|
-
for (let e = 0; e <
|
|
14331
|
-
|
|
14338
|
+
for (let e = 0; e < q_.length; e++) Q_(n, q_[e], Bg, Fg, p);
|
|
14339
|
+
for (let e = 0; e < J_.length; e++) Q_(n, J_[e], Vg, Ig, m);
|
|
14340
|
+
jg(Bg, {
|
|
14332
14341
|
tld: !0,
|
|
14333
14342
|
ascii: !0
|
|
14334
|
-
}, t),
|
|
14343
|
+
}, t), jg(Vg, {
|
|
14335
14344
|
utld: !0,
|
|
14336
14345
|
alpha: !0
|
|
14337
|
-
}, t),
|
|
14346
|
+
}, t), Q_(n, "file", Hg, Fg, p), Q_(n, "mailto", Hg, Fg, p), Q_(n, "http", Ug, Fg, p), Q_(n, "https", Ug, Fg, p), Q_(n, "ftp", Ug, Fg, p), Q_(n, "ftps", Ug, Fg, p), jg(Hg, {
|
|
14338
14347
|
scheme: !0,
|
|
14339
14348
|
ascii: !0
|
|
14340
|
-
}, t),
|
|
14349
|
+
}, t), jg(Ug, {
|
|
14341
14350
|
slashscheme: !0,
|
|
14342
14351
|
ascii: !0
|
|
14343
14352
|
}, t), e = e.sort((e, t) => e[0] > t[0] ? 1 : -1);
|
|
14344
14353
|
for (let t = 0; t < e.length; t++) {
|
|
14345
|
-
let r = e[t][0], i = e[t][1] ? { [
|
|
14346
|
-
r.indexOf("-") >= 0 ? i[
|
|
14354
|
+
let r = e[t][0], i = e[t][1] ? { [Dg]: !0 } : { [Og]: !0 };
|
|
14355
|
+
r.indexOf("-") >= 0 ? i[Tg] = !0 : L_.test(r) ? B_.test(r) ? i[Cg] = !0 : i[xg] = !0 : i[bg] = !0, Pg(n, r, r, i);
|
|
14347
14356
|
}
|
|
14348
|
-
return
|
|
14357
|
+
return Pg(n, "localhost", zg, { ascii: !0 }), n.jd = new Ng(F_), {
|
|
14349
14358
|
start: n,
|
|
14350
|
-
tokens: Object.assign({ groups: t },
|
|
14359
|
+
tokens: Object.assign({ groups: t }, I_)
|
|
14351
14360
|
};
|
|
14352
14361
|
}
|
|
14353
|
-
function
|
|
14354
|
-
let n =
|
|
14362
|
+
function X_(e, t) {
|
|
14363
|
+
let n = Z_(t.replace(/[A-Z]/g, (e) => e.toLowerCase())), r = n.length, i = [], a = 0, o = 0;
|
|
14355
14364
|
for (; o < r;) {
|
|
14356
14365
|
let s = e, c = null, l = 0, u = null, d = -1, f = -1;
|
|
14357
14366
|
for (; o < r && (c = s.go(n[o]));) s = c, s.accepts() ? (d = 0, f = 0, u = s) : d >= 0 && (d += n[o].length, f++), l += n[o].length, a += n[o].length, o++;
|
|
@@ -14364,7 +14373,7 @@ function Y_(e, t) {
|
|
|
14364
14373
|
}
|
|
14365
14374
|
return i;
|
|
14366
14375
|
}
|
|
14367
|
-
function
|
|
14376
|
+
function Z_(e) {
|
|
14368
14377
|
let t = [], n = e.length, r = 0;
|
|
14369
14378
|
for (; r < n;) {
|
|
14370
14379
|
let i = e.charCodeAt(r), a, o = i < 55296 || i > 56319 || r + 1 === n || (a = e.charCodeAt(r + 1)) < 56320 || a > 57343 ? e[r] : e.slice(r, r + 2);
|
|
@@ -14372,15 +14381,15 @@ function X_(e) {
|
|
|
14372
14381
|
}
|
|
14373
14382
|
return t;
|
|
14374
14383
|
}
|
|
14375
|
-
function
|
|
14384
|
+
function Q_(e, t, n, r, i) {
|
|
14376
14385
|
let a, o = t.length;
|
|
14377
14386
|
for (let n = 0; n < o - 1; n++) {
|
|
14378
14387
|
let o = t[n];
|
|
14379
|
-
e.j[o] ? a = e.j[o] : (a = new
|
|
14388
|
+
e.j[o] ? a = e.j[o] : (a = new Ng(r), a.jr = i.slice(), e.j[o] = a), e = a;
|
|
14380
14389
|
}
|
|
14381
|
-
return a = new
|
|
14390
|
+
return a = new Ng(n), a.jr = i.slice(), e.j[t[o - 1]] = a, a;
|
|
14382
14391
|
}
|
|
14383
|
-
function
|
|
14392
|
+
function $_(e) {
|
|
14384
14393
|
let t = [], n = [], r = 0;
|
|
14385
14394
|
for (; r < e.length;) {
|
|
14386
14395
|
let i = 0;
|
|
@@ -14393,11 +14402,11 @@ function Q_(e) {
|
|
|
14393
14402
|
}
|
|
14394
14403
|
return t;
|
|
14395
14404
|
}
|
|
14396
|
-
var
|
|
14405
|
+
var ev = {
|
|
14397
14406
|
defaultProtocol: "http",
|
|
14398
14407
|
events: null,
|
|
14399
|
-
format:
|
|
14400
|
-
formatHref:
|
|
14408
|
+
format: nv,
|
|
14409
|
+
formatHref: nv,
|
|
14401
14410
|
nl2br: !1,
|
|
14402
14411
|
tagName: "a",
|
|
14403
14412
|
target: null,
|
|
@@ -14409,15 +14418,15 @@ var $_ = {
|
|
|
14409
14418
|
ignoreTags: [],
|
|
14410
14419
|
render: null
|
|
14411
14420
|
};
|
|
14412
|
-
function
|
|
14413
|
-
let n = Object.assign({},
|
|
14414
|
-
e && (n = Object.assign(n, e instanceof
|
|
14421
|
+
function tv(e, t = null) {
|
|
14422
|
+
let n = Object.assign({}, ev);
|
|
14423
|
+
e && (n = Object.assign(n, e instanceof tv ? e.o : e));
|
|
14415
14424
|
let r = n.ignoreTags, i = [];
|
|
14416
14425
|
for (let e = 0; e < r.length; e++) i.push(r[e].toUpperCase());
|
|
14417
14426
|
this.o = n, t && (this.defaultRender = t), this.ignoreTags = i;
|
|
14418
14427
|
}
|
|
14419
|
-
|
|
14420
|
-
o:
|
|
14428
|
+
tv.prototype = {
|
|
14429
|
+
o: ev,
|
|
14421
14430
|
ignoreTags: [],
|
|
14422
14431
|
defaultRender(e) {
|
|
14423
14432
|
return e;
|
|
@@ -14427,7 +14436,7 @@ ev.prototype = {
|
|
|
14427
14436
|
},
|
|
14428
14437
|
get(e, t, n) {
|
|
14429
14438
|
let r = t != null, i = this.o[e];
|
|
14430
|
-
return i && (typeof i == "object" ? (i = n.t in i ? i[n.t] :
|
|
14439
|
+
return i && (typeof i == "object" ? (i = n.t in i ? i[n.t] : ev[e], typeof i == "function" && r && (i = i(t, n))) : typeof i == "function" && r && (i = i(t, n.t, n)), i);
|
|
14431
14440
|
},
|
|
14432
14441
|
getObj(e, t, n) {
|
|
14433
14442
|
let r = this.o[e];
|
|
@@ -14438,13 +14447,13 @@ ev.prototype = {
|
|
|
14438
14447
|
return (this.get("render", null, e) || this.defaultRender)(t, e.t, e);
|
|
14439
14448
|
}
|
|
14440
14449
|
};
|
|
14441
|
-
function
|
|
14450
|
+
function nv(e) {
|
|
14442
14451
|
return e;
|
|
14443
14452
|
}
|
|
14444
|
-
function
|
|
14453
|
+
function rv(e, t) {
|
|
14445
14454
|
this.t = "token", this.v = e, this.tk = t;
|
|
14446
14455
|
}
|
|
14447
|
-
|
|
14456
|
+
rv.prototype = {
|
|
14448
14457
|
isLink: !1,
|
|
14449
14458
|
toString() {
|
|
14450
14459
|
return this.v;
|
|
@@ -14465,7 +14474,7 @@ nv.prototype = {
|
|
|
14465
14474
|
endIndex() {
|
|
14466
14475
|
return this.tk[this.tk.length - 1].e;
|
|
14467
14476
|
},
|
|
14468
|
-
toObject(e =
|
|
14477
|
+
toObject(e = ev.defaultProtocol) {
|
|
14469
14478
|
return {
|
|
14470
14479
|
type: this.t,
|
|
14471
14480
|
value: this.toString(),
|
|
@@ -14498,8 +14507,8 @@ nv.prototype = {
|
|
|
14498
14507
|
};
|
|
14499
14508
|
}
|
|
14500
14509
|
};
|
|
14501
|
-
function
|
|
14502
|
-
class n extends
|
|
14510
|
+
function iv(e, t) {
|
|
14511
|
+
class n extends rv {
|
|
14503
14512
|
constructor(t, n) {
|
|
14504
14513
|
super(t, n), this.t = e;
|
|
14505
14514
|
}
|
|
@@ -14507,138 +14516,138 @@ function rv(e, t) {
|
|
|
14507
14516
|
for (let e in t) n.prototype[e] = t[e];
|
|
14508
14517
|
return n.t = e, n;
|
|
14509
14518
|
}
|
|
14510
|
-
var
|
|
14519
|
+
var av = iv("email", {
|
|
14511
14520
|
isLink: !0,
|
|
14512
14521
|
toHref() {
|
|
14513
14522
|
return "mailto:" + this.toString();
|
|
14514
14523
|
}
|
|
14515
|
-
}),
|
|
14524
|
+
}), ov = iv("text"), sv = iv("nl"), cv = iv("url", {
|
|
14516
14525
|
isLink: !0,
|
|
14517
|
-
toHref(e =
|
|
14526
|
+
toHref(e = ev.defaultProtocol) {
|
|
14518
14527
|
return this.hasProtocol() ? this.v : `${e}://${this.v}`;
|
|
14519
14528
|
},
|
|
14520
14529
|
hasProtocol() {
|
|
14521
14530
|
let e = this.tk;
|
|
14522
|
-
return e.length >= 2 && e[0].t !==
|
|
14531
|
+
return e.length >= 2 && e[0].t !== zg && e[1].t === g_;
|
|
14523
14532
|
}
|
|
14524
|
-
}),
|
|
14525
|
-
function
|
|
14533
|
+
}), lv = (e) => new Ng(e);
|
|
14534
|
+
function uv({ groups: e }) {
|
|
14526
14535
|
let t = e.domain.concat([
|
|
14527
|
-
|
|
14528
|
-
u_,
|
|
14536
|
+
l_,
|
|
14529
14537
|
d_,
|
|
14530
14538
|
f_,
|
|
14531
14539
|
p_,
|
|
14532
14540
|
m_,
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
Ug,
|
|
14541
|
+
h_,
|
|
14542
|
+
v_,
|
|
14543
|
+
b_,
|
|
14537
14544
|
S_,
|
|
14545
|
+
Wg,
|
|
14538
14546
|
C_,
|
|
14539
14547
|
w_,
|
|
14540
14548
|
T_,
|
|
14541
|
-
|
|
14542
|
-
P_,
|
|
14549
|
+
E_,
|
|
14543
14550
|
j_,
|
|
14544
|
-
|
|
14551
|
+
F_,
|
|
14552
|
+
M_,
|
|
14553
|
+
N_
|
|
14545
14554
|
]), n = [
|
|
14546
|
-
|
|
14547
|
-
h_,
|
|
14555
|
+
u_,
|
|
14548
14556
|
g_,
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14557
|
+
__,
|
|
14558
|
+
y_,
|
|
14559
|
+
x_,
|
|
14560
|
+
C_,
|
|
14553
14561
|
D_,
|
|
14554
|
-
|
|
14555
|
-
|
|
14562
|
+
O_,
|
|
14563
|
+
A_,
|
|
14556
14564
|
$g,
|
|
14557
|
-
|
|
14565
|
+
e_,
|
|
14558
14566
|
qg,
|
|
14559
|
-
Yg,
|
|
14560
14567
|
Jg,
|
|
14561
14568
|
Xg,
|
|
14569
|
+
Yg,
|
|
14562
14570
|
Zg,
|
|
14563
|
-
|
|
14571
|
+
Qg,
|
|
14564
14572
|
t_,
|
|
14565
14573
|
n_,
|
|
14566
14574
|
r_,
|
|
14567
14575
|
i_,
|
|
14568
14576
|
a_,
|
|
14569
14577
|
o_,
|
|
14570
|
-
s_
|
|
14578
|
+
s_,
|
|
14579
|
+
c_
|
|
14571
14580
|
], r = [
|
|
14572
|
-
c_,
|
|
14573
14581
|
l_,
|
|
14574
14582
|
u_,
|
|
14575
|
-
|
|
14583
|
+
d_,
|
|
14576
14584
|
p_,
|
|
14577
14585
|
m_,
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
Kg,
|
|
14582
|
-
qg,
|
|
14586
|
+
h_,
|
|
14587
|
+
v_,
|
|
14588
|
+
b_,
|
|
14583
14589
|
S_,
|
|
14590
|
+
qg,
|
|
14591
|
+
Jg,
|
|
14584
14592
|
C_,
|
|
14585
14593
|
w_,
|
|
14586
14594
|
T_,
|
|
14587
14595
|
E_,
|
|
14588
|
-
|
|
14589
|
-
P_,
|
|
14596
|
+
D_,
|
|
14590
14597
|
j_,
|
|
14591
|
-
|
|
14592
|
-
|
|
14598
|
+
F_,
|
|
14599
|
+
M_,
|
|
14600
|
+
N_
|
|
14601
|
+
], i = lv(), a = Q(i, M_);
|
|
14593
14602
|
X(a, r, a), X(a, e.domain, a);
|
|
14594
|
-
let o =
|
|
14603
|
+
let o = lv(), s = lv(), c = lv();
|
|
14595
14604
|
X(i, e.domain, o), X(i, e.scheme, s), X(i, e.slashscheme, c), X(o, r, a), X(o, e.domain, o);
|
|
14596
|
-
let l = Q(o,
|
|
14597
|
-
Q(a,
|
|
14598
|
-
let u = Q(a,
|
|
14605
|
+
let l = Q(o, f_);
|
|
14606
|
+
Q(a, f_, l), Q(s, f_, l), Q(c, f_, l);
|
|
14607
|
+
let u = Q(a, y_);
|
|
14599
14608
|
X(u, r, a), X(u, e.domain, a);
|
|
14600
|
-
let d =
|
|
14609
|
+
let d = lv();
|
|
14601
14610
|
X(l, e.domain, d), X(d, e.domain, d);
|
|
14602
|
-
let f = Q(d,
|
|
14611
|
+
let f = Q(d, y_);
|
|
14603
14612
|
X(f, e.domain, d);
|
|
14604
|
-
let p =
|
|
14605
|
-
X(f, e.tld, p), X(f, e.utld, p), Q(l,
|
|
14606
|
-
let m = Q(d,
|
|
14607
|
-
Q(m,
|
|
14608
|
-
let h = Q(o,
|
|
14609
|
-
Q(h,
|
|
14610
|
-
let _ = cv
|
|
14611
|
-
X(g, e.tld, _), X(g, e.utld, _), X(_, e.domain, o), X(_, r, a), Q(_,
|
|
14612
|
-
let v = Q(_,
|
|
14613
|
+
let p = lv(av);
|
|
14614
|
+
X(f, e.tld, p), X(f, e.utld, p), Q(l, zg, p);
|
|
14615
|
+
let m = Q(d, S_);
|
|
14616
|
+
Q(m, S_, m), X(m, e.domain, d), X(p, e.domain, d), Q(p, y_, f), Q(p, S_, m), X(Q(p, g_), e.numeric, av);
|
|
14617
|
+
let h = Q(o, S_), g = Q(o, y_);
|
|
14618
|
+
Q(h, S_, h), X(h, e.domain, o), X(g, r, a), X(g, e.domain, o);
|
|
14619
|
+
let _ = lv(cv);
|
|
14620
|
+
X(g, e.tld, _), X(g, e.utld, _), X(_, e.domain, o), X(_, r, a), Q(_, y_, g), Q(_, S_, h), Q(_, f_, l);
|
|
14621
|
+
let v = Q(_, g_), y = lv(cv);
|
|
14613
14622
|
X(v, e.numeric, y);
|
|
14614
|
-
let b = cv
|
|
14615
|
-
X(b, t, b), X(b, n, x), X(x, t, b), X(x, n, x), Q(_,
|
|
14616
|
-
let S = Q(s,
|
|
14617
|
-
X(s, e.domain, o), Q(s,
|
|
14623
|
+
let b = lv(cv), x = lv();
|
|
14624
|
+
X(b, t, b), X(b, n, x), X(x, t, b), X(x, n, x), Q(_, j_, b), Q(y, j_, b);
|
|
14625
|
+
let S = Q(s, g_), ee = Q(Q(Q(c, g_), j_), j_);
|
|
14626
|
+
X(s, e.domain, o), Q(s, y_, g), Q(s, S_, h), X(c, e.domain, o), Q(c, y_, g), Q(c, S_, h), X(S, e.domain, b), Q(S, j_, b), Q(S, D_, b), X(ee, e.domain, b), X(ee, t, b), Q(ee, j_, b);
|
|
14618
14627
|
let C = [
|
|
14619
|
-
[
|
|
14620
|
-
[
|
|
14621
|
-
[
|
|
14622
|
-
[
|
|
14623
|
-
[
|
|
14624
|
-
[
|
|
14625
|
-
[
|
|
14626
|
-
[
|
|
14628
|
+
[qg, Jg],
|
|
14629
|
+
[Yg, Xg],
|
|
14630
|
+
[Zg, Qg],
|
|
14631
|
+
[$g, e_],
|
|
14632
|
+
[t_, n_],
|
|
14633
|
+
[r_, i_],
|
|
14634
|
+
[a_, o_],
|
|
14635
|
+
[s_, c_]
|
|
14627
14636
|
];
|
|
14628
14637
|
for (let e = 0; e < C.length; e++) {
|
|
14629
14638
|
let [r, i] = C[e], a = Q(b, r);
|
|
14630
14639
|
Q(x, r, a), Q(a, i, b);
|
|
14631
|
-
let o = cv
|
|
14640
|
+
let o = lv(cv);
|
|
14632
14641
|
X(a, t, o);
|
|
14633
|
-
let s =
|
|
14642
|
+
let s = lv();
|
|
14634
14643
|
X(a, n), X(o, t, o), X(o, n, s), X(s, t, o), X(s, n, s), Q(o, i, b), Q(s, i, b);
|
|
14635
14644
|
}
|
|
14636
|
-
return Q(i,
|
|
14645
|
+
return Q(i, zg, _), Q(i, Kg, sv), {
|
|
14637
14646
|
start: i,
|
|
14638
|
-
tokens:
|
|
14647
|
+
tokens: I_
|
|
14639
14648
|
};
|
|
14640
14649
|
}
|
|
14641
|
-
function
|
|
14650
|
+
function dv(e, t, n) {
|
|
14642
14651
|
let r = n.length, i = 0, a = [], o = [];
|
|
14643
14652
|
for (; i < r;) {
|
|
14644
14653
|
let s = e, c = null, l = null, u = 0, d = null, f = -1;
|
|
@@ -14646,18 +14655,18 @@ function uv(e, t, n) {
|
|
|
14646
14655
|
for (; i < r && (l = c || s.go(n[i].t));) c = null, s = l, s.accepts() ? (f = 0, d = s) : f >= 0 && f++, i++, u++;
|
|
14647
14656
|
if (f < 0) i -= u, i < r && (o.push(n[i]), i++);
|
|
14648
14657
|
else {
|
|
14649
|
-
o.length > 0 && (a.push(
|
|
14658
|
+
o.length > 0 && (a.push(fv(ov, t, o)), o = []), i -= f, u -= f;
|
|
14650
14659
|
let e = d.t, r = n.slice(i - u, i);
|
|
14651
|
-
a.push(
|
|
14660
|
+
a.push(fv(e, t, r));
|
|
14652
14661
|
}
|
|
14653
14662
|
}
|
|
14654
|
-
return o.length > 0 && a.push(
|
|
14663
|
+
return o.length > 0 && a.push(fv(ov, t, o)), a;
|
|
14655
14664
|
}
|
|
14656
|
-
function
|
|
14665
|
+
function fv(e, t, n) {
|
|
14657
14666
|
let r = n[0].s, i = n[n.length - 1].e;
|
|
14658
14667
|
return new e(t.slice(r, i), n);
|
|
14659
14668
|
}
|
|
14660
|
-
var
|
|
14669
|
+
var pv = typeof console < "u" && console && console.warn || (() => {}), mv = "until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.", $ = {
|
|
14661
14670
|
scanner: null,
|
|
14662
14671
|
parser: null,
|
|
14663
14672
|
tokenQueue: [],
|
|
@@ -14665,33 +14674,33 @@ var fv = typeof console < "u" && console && console.warn || (() => {}), pv = "un
|
|
|
14665
14674
|
customSchemes: [],
|
|
14666
14675
|
initialized: !1
|
|
14667
14676
|
};
|
|
14668
|
-
function
|
|
14669
|
-
return
|
|
14677
|
+
function hv() {
|
|
14678
|
+
return Ng.groups = {}, $.scanner = null, $.parser = null, $.tokenQueue = [], $.pluginQueue = [], $.customSchemes = [], $.initialized = !1, $;
|
|
14670
14679
|
}
|
|
14671
|
-
function
|
|
14672
|
-
if ($.initialized &&
|
|
14680
|
+
function gv(e, t = !1) {
|
|
14681
|
+
if ($.initialized && pv(`linkifyjs: already initialized - will not register custom scheme "${e}" ${mv}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e)) throw Error("linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or \"-\"\n2. Cannot start or end with \"-\"\n3. \"-\" cannot repeat");
|
|
14673
14682
|
$.customSchemes.push([e, t]);
|
|
14674
14683
|
}
|
|
14675
|
-
function
|
|
14676
|
-
$.scanner =
|
|
14684
|
+
function _v() {
|
|
14685
|
+
$.scanner = Y_($.customSchemes);
|
|
14677
14686
|
for (let e = 0; e < $.tokenQueue.length; e++) $.tokenQueue[e][1]({ scanner: $.scanner });
|
|
14678
|
-
$.parser =
|
|
14687
|
+
$.parser = uv($.scanner.tokens);
|
|
14679
14688
|
for (let e = 0; e < $.pluginQueue.length; e++) $.pluginQueue[e][1]({
|
|
14680
14689
|
scanner: $.scanner,
|
|
14681
14690
|
parser: $.parser
|
|
14682
14691
|
});
|
|
14683
14692
|
return $.initialized = !0, $;
|
|
14684
14693
|
}
|
|
14685
|
-
function
|
|
14686
|
-
return $.initialized ||
|
|
14694
|
+
function vv(e) {
|
|
14695
|
+
return $.initialized || _v(), dv($.parser.start, e, X_($.scanner.start, e));
|
|
14687
14696
|
}
|
|
14688
|
-
|
|
14689
|
-
function
|
|
14697
|
+
vv.scan = X_;
|
|
14698
|
+
function yv(e, t = null, n = null) {
|
|
14690
14699
|
if (t && typeof t == "object") {
|
|
14691
14700
|
if (n) throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);
|
|
14692
14701
|
n = t, t = null;
|
|
14693
14702
|
}
|
|
14694
|
-
let r = new
|
|
14703
|
+
let r = new tv(n), i = vv(e), a = [];
|
|
14695
14704
|
for (let e = 0; e < i.length; e++) {
|
|
14696
14705
|
let n = i[e];
|
|
14697
14706
|
n.isLink && (!t || n.t === t) && r.check(n) && a.push(n.toFormattedObject(r));
|
|
@@ -14699,12 +14708,12 @@ function vv(e, t = null, n = null) {
|
|
|
14699
14708
|
return a;
|
|
14700
14709
|
}
|
|
14701
14710
|
//#endregion
|
|
14702
|
-
//#region ../../node_modules/.pnpm/@tiptap+extension-link@3.22.
|
|
14703
|
-
var
|
|
14704
|
-
function
|
|
14711
|
+
//#region ../../node_modules/.pnpm/@tiptap+extension-link@3.22.5_@tiptap+core@3.22.5_@tiptap+pm@3.22.5__@tiptap+pm@3.22.5/node_modules/@tiptap/extension-link/dist/index.js
|
|
14712
|
+
var bv = "[\0- \xA0 -\u2029 ]", xv = new RegExp(bv), Sv = RegExp(`${bv}$`), Cv = new RegExp(bv, "g");
|
|
14713
|
+
function wv(e) {
|
|
14705
14714
|
return e.length === 1 ? e[0].isLink : e.length === 3 && e[1].isLink ? ["()", "[]"].includes(e[0].value + e[2].value) : !1;
|
|
14706
14715
|
}
|
|
14707
|
-
function
|
|
14716
|
+
function Tv(e) {
|
|
14708
14717
|
return new N({
|
|
14709
14718
|
key: new P("autolink"),
|
|
14710
14719
|
appendTransaction: (t, n, r) => {
|
|
@@ -14716,16 +14725,16 @@ function wv(e) {
|
|
|
14716
14725
|
if (n.length > 1) i = n[0], a = r.doc.textBetween(i.pos, i.pos + i.node.nodeSize, void 0, " ");
|
|
14717
14726
|
else if (n.length) {
|
|
14718
14727
|
let e = r.doc.textBetween(t.from, t.to, " ", " ");
|
|
14719
|
-
if (!
|
|
14728
|
+
if (!Sv.test(e)) return;
|
|
14720
14729
|
i = n[0], a = r.doc.textBetween(i.pos, t.to, void 0, " ");
|
|
14721
14730
|
}
|
|
14722
14731
|
if (i && a) {
|
|
14723
|
-
let t = a.split(
|
|
14732
|
+
let t = a.split(xv).filter(Boolean);
|
|
14724
14733
|
if (t.length <= 0) return !1;
|
|
14725
14734
|
let n = t[t.length - 1], s = i.pos + a.lastIndexOf(n);
|
|
14726
14735
|
if (!n) return !1;
|
|
14727
|
-
let c =
|
|
14728
|
-
if (!
|
|
14736
|
+
let c = vv(n).map((t) => t.toObject(e.defaultProtocol));
|
|
14737
|
+
if (!wv(c)) return !1;
|
|
14729
14738
|
c.filter((e) => e.isLink).map((e) => ({
|
|
14730
14739
|
...e,
|
|
14731
14740
|
from: s + e.start + 1,
|
|
@@ -14738,7 +14747,7 @@ function wv(e) {
|
|
|
14738
14747
|
}
|
|
14739
14748
|
});
|
|
14740
14749
|
}
|
|
14741
|
-
function
|
|
14750
|
+
function Ev(e) {
|
|
14742
14751
|
return new N({
|
|
14743
14752
|
key: new P("handleClickLink"),
|
|
14744
14753
|
props: { handleClick: (t, n, r) => {
|
|
@@ -14761,7 +14770,7 @@ function Tv(e) {
|
|
|
14761
14770
|
} }
|
|
14762
14771
|
});
|
|
14763
14772
|
}
|
|
14764
|
-
function
|
|
14773
|
+
function Dv(e) {
|
|
14765
14774
|
return new N({
|
|
14766
14775
|
key: new P("handlePasteLink"),
|
|
14767
14776
|
props: { handlePaste: (t, n, r) => {
|
|
@@ -14771,12 +14780,12 @@ function Ev(e) {
|
|
|
14771
14780
|
r.content.forEach((e) => {
|
|
14772
14781
|
c += e.textContent;
|
|
14773
14782
|
});
|
|
14774
|
-
let l =
|
|
14783
|
+
let l = yv(c, { defaultProtocol: e.defaultProtocol }).find((e) => e.isLink && e.value === c);
|
|
14775
14784
|
return !c || !l || i !== void 0 && !i(l.value) ? !1 : e.editor.commands.setMark(e.type, { href: l.href });
|
|
14776
14785
|
} }
|
|
14777
14786
|
});
|
|
14778
14787
|
}
|
|
14779
|
-
function
|
|
14788
|
+
function Ov(e, t) {
|
|
14780
14789
|
let n = [
|
|
14781
14790
|
"http",
|
|
14782
14791
|
"https",
|
|
@@ -14792,9 +14801,9 @@ function Dv(e, t) {
|
|
|
14792
14801
|
return t && t.forEach((e) => {
|
|
14793
14802
|
let t = typeof e == "string" ? e : e.scheme;
|
|
14794
14803
|
t && n.push(t);
|
|
14795
|
-
}), !e || e.replace(
|
|
14804
|
+
}), !e || e.replace(Cv, "").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`, "i"));
|
|
14796
14805
|
}
|
|
14797
|
-
var
|
|
14806
|
+
var kv = _d.create({
|
|
14798
14807
|
name: "link",
|
|
14799
14808
|
priority: 1e3,
|
|
14800
14809
|
keepOnSplit: !1,
|
|
@@ -14802,14 +14811,14 @@ var Ov = gd.create({
|
|
|
14802
14811
|
onCreate() {
|
|
14803
14812
|
this.options.validate && !this.options.shouldAutoLink && (this.options.shouldAutoLink = this.options.validate, console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")), this.options.protocols.forEach((e) => {
|
|
14804
14813
|
if (typeof e == "string") {
|
|
14805
|
-
|
|
14814
|
+
gv(e);
|
|
14806
14815
|
return;
|
|
14807
14816
|
}
|
|
14808
|
-
|
|
14817
|
+
gv(e.scheme, e.optionalSlashes);
|
|
14809
14818
|
});
|
|
14810
14819
|
},
|
|
14811
14820
|
onDestroy() {
|
|
14812
|
-
|
|
14821
|
+
hv();
|
|
14813
14822
|
},
|
|
14814
14823
|
inclusive() {
|
|
14815
14824
|
return this.options.autolink;
|
|
@@ -14827,7 +14836,7 @@ var Ov = gd.create({
|
|
|
14827
14836
|
rel: "noopener noreferrer nofollow",
|
|
14828
14837
|
class: null
|
|
14829
14838
|
},
|
|
14830
|
-
isAllowedUri: (e, t) => !!
|
|
14839
|
+
isAllowedUri: (e, t) => !!Ov(e, t.protocols),
|
|
14831
14840
|
validate: (e) => !!e,
|
|
14832
14841
|
shouldAutoLink: (e) => {
|
|
14833
14842
|
let t = /^[a-z][a-z0-9+.-]*:\/\//i.test(e), n = /^[a-z][a-z0-9+.-]*:/i.test(e);
|
|
@@ -14857,7 +14866,7 @@ var Ov = gd.create({
|
|
|
14857
14866
|
getAttrs: (e) => {
|
|
14858
14867
|
let t = e.getAttribute("href");
|
|
14859
14868
|
return !t || !this.options.isAllowedUri(t, {
|
|
14860
|
-
defaultValidate: (e) => !!
|
|
14869
|
+
defaultValidate: (e) => !!Ov(e, this.options.protocols),
|
|
14861
14870
|
protocols: this.options.protocols,
|
|
14862
14871
|
defaultProtocol: this.options.defaultProtocol
|
|
14863
14872
|
}) ? !1 : null;
|
|
@@ -14866,7 +14875,7 @@ var Ov = gd.create({
|
|
|
14866
14875
|
},
|
|
14867
14876
|
renderHTML({ HTMLAttributes: e }) {
|
|
14868
14877
|
return this.options.isAllowedUri(e.href, {
|
|
14869
|
-
defaultValidate: (e) => !!
|
|
14878
|
+
defaultValidate: (e) => !!Ov(e, this.options.protocols),
|
|
14870
14879
|
protocols: this.options.protocols,
|
|
14871
14880
|
defaultProtocol: this.options.defaultProtocol
|
|
14872
14881
|
}) ? [
|
|
@@ -14896,7 +14905,7 @@ var Ov = gd.create({
|
|
|
14896
14905
|
setLink: (e) => ({ chain: t }) => {
|
|
14897
14906
|
let { href: n } = e;
|
|
14898
14907
|
return this.options.isAllowedUri(n, {
|
|
14899
|
-
defaultValidate: (e) => !!
|
|
14908
|
+
defaultValidate: (e) => !!Ov(e, this.options.protocols),
|
|
14900
14909
|
protocols: this.options.protocols,
|
|
14901
14910
|
defaultProtocol: this.options.defaultProtocol
|
|
14902
14911
|
}) ? t().setMark(this.name, e).setMeta("preventAutolink", !0).run() : !1;
|
|
@@ -14904,7 +14913,7 @@ var Ov = gd.create({
|
|
|
14904
14913
|
toggleLink: (e) => ({ chain: t }) => {
|
|
14905
14914
|
let { href: n } = e || {};
|
|
14906
14915
|
return n && !this.options.isAllowedUri(n, {
|
|
14907
|
-
defaultValidate: (e) => !!
|
|
14916
|
+
defaultValidate: (e) => !!Ov(e, this.options.protocols),
|
|
14908
14917
|
protocols: this.options.protocols,
|
|
14909
14918
|
defaultProtocol: this.options.defaultProtocol
|
|
14910
14919
|
}) ? !1 : t().toggleMark(this.name, e, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run();
|
|
@@ -14913,12 +14922,12 @@ var Ov = gd.create({
|
|
|
14913
14922
|
};
|
|
14914
14923
|
},
|
|
14915
14924
|
addPasteRules() {
|
|
14916
|
-
return [
|
|
14925
|
+
return [uf({
|
|
14917
14926
|
find: (e) => {
|
|
14918
14927
|
let t = [];
|
|
14919
14928
|
if (e) {
|
|
14920
|
-
let { protocols: n, defaultProtocol: r } = this.options, i =
|
|
14921
|
-
defaultValidate: (e) => !!
|
|
14929
|
+
let { protocols: n, defaultProtocol: r } = this.options, i = yv(e).filter((e) => e.isLink && this.options.isAllowedUri(e.value, {
|
|
14930
|
+
defaultValidate: (e) => !!Ov(e, n),
|
|
14922
14931
|
protocols: n,
|
|
14923
14932
|
defaultProtocol: r
|
|
14924
14933
|
}));
|
|
@@ -14938,33 +14947,33 @@ var Ov = gd.create({
|
|
|
14938
14947
|
},
|
|
14939
14948
|
addProseMirrorPlugins() {
|
|
14940
14949
|
let e = [], { protocols: t, defaultProtocol: n } = this.options;
|
|
14941
|
-
return this.options.autolink && e.push(
|
|
14950
|
+
return this.options.autolink && e.push(Tv({
|
|
14942
14951
|
type: this.type,
|
|
14943
14952
|
defaultProtocol: this.options.defaultProtocol,
|
|
14944
14953
|
validate: (e) => this.options.isAllowedUri(e, {
|
|
14945
|
-
defaultValidate: (e) => !!
|
|
14954
|
+
defaultValidate: (e) => !!Ov(e, t),
|
|
14946
14955
|
protocols: t,
|
|
14947
14956
|
defaultProtocol: n
|
|
14948
14957
|
}),
|
|
14949
14958
|
shouldAutoLink: this.options.shouldAutoLink
|
|
14950
|
-
})), e.push(
|
|
14959
|
+
})), e.push(Ev({
|
|
14951
14960
|
type: this.type,
|
|
14952
14961
|
editor: this.editor,
|
|
14953
14962
|
openOnClick: this.options.openOnClick === "whenNotEditable" ? !0 : this.options.openOnClick,
|
|
14954
14963
|
enableClickSelection: this.options.enableClickSelection
|
|
14955
|
-
})), this.options.linkOnPaste && e.push(
|
|
14964
|
+
})), this.options.linkOnPaste && e.push(Dv({
|
|
14956
14965
|
editor: this.editor,
|
|
14957
14966
|
defaultProtocol: this.options.defaultProtocol,
|
|
14958
14967
|
type: this.type,
|
|
14959
14968
|
shouldAutoLink: this.options.shouldAutoLink
|
|
14960
14969
|
})), e;
|
|
14961
14970
|
}
|
|
14962
|
-
}),
|
|
14963
|
-
for (var n in t)
|
|
14971
|
+
}), Av = Object.defineProperty, jv = (e, t) => {
|
|
14972
|
+
for (var n in t) Av(e, n, {
|
|
14964
14973
|
get: t[n],
|
|
14965
14974
|
enumerable: !0
|
|
14966
14975
|
});
|
|
14967
|
-
},
|
|
14976
|
+
}, Mv = "listItem", Nv = "textStyle", Pv = /^\s*([-+*])\s$/, Fv = J.create({
|
|
14968
14977
|
name: "bulletList",
|
|
14969
14978
|
addOptions() {
|
|
14970
14979
|
return {
|
|
@@ -14996,26 +15005,26 @@ var Ov = gd.create({
|
|
|
14996
15005
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
|
|
14997
15006
|
markdownOptions: { indentsContent: !0 },
|
|
14998
15007
|
addCommands() {
|
|
14999
|
-
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
15008
|
+
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Mv, this.editor.getAttributes(Nv)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
15000
15009
|
},
|
|
15001
15010
|
addKeyboardShortcuts() {
|
|
15002
15011
|
return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
|
|
15003
15012
|
},
|
|
15004
15013
|
addInputRules() {
|
|
15005
|
-
let e =
|
|
15006
|
-
find:
|
|
15014
|
+
let e = Wd({
|
|
15015
|
+
find: Pv,
|
|
15007
15016
|
type: this.type
|
|
15008
15017
|
});
|
|
15009
|
-
return (this.options.keepMarks || this.options.keepAttributes) && (e =
|
|
15010
|
-
find:
|
|
15018
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (e = Wd({
|
|
15019
|
+
find: Pv,
|
|
15011
15020
|
type: this.type,
|
|
15012
15021
|
keepMarks: this.options.keepMarks,
|
|
15013
15022
|
keepAttributes: this.options.keepAttributes,
|
|
15014
|
-
getAttributes: () => this.editor.getAttributes(
|
|
15023
|
+
getAttributes: () => this.editor.getAttributes(Nv),
|
|
15015
15024
|
editor: this.editor
|
|
15016
15025
|
})), [e];
|
|
15017
15026
|
}
|
|
15018
|
-
}),
|
|
15027
|
+
}), Iv = J.create({
|
|
15019
15028
|
name: "listItem",
|
|
15020
15029
|
addOptions() {
|
|
15021
15030
|
return {
|
|
@@ -15061,7 +15070,7 @@ var Ov = gd.create({
|
|
|
15061
15070
|
content: r
|
|
15062
15071
|
};
|
|
15063
15072
|
},
|
|
15064
|
-
renderMarkdown: (e, t, n) =>
|
|
15073
|
+
renderMarkdown: (e, t, n) => rf(e, t, (e) => e.parentType === "bulletList" ? "- " : e.parentType === "orderedList" ? `${(e.meta?.parentAttrs?.start || 1) + e.index}. ` : "- ", n),
|
|
15065
15074
|
addKeyboardShortcuts() {
|
|
15066
15075
|
return {
|
|
15067
15076
|
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
@@ -15070,46 +15079,46 @@ var Ov = gd.create({
|
|
|
15070
15079
|
};
|
|
15071
15080
|
}
|
|
15072
15081
|
});
|
|
15073
|
-
|
|
15074
|
-
findListItemPos: () =>
|
|
15075
|
-
getNextListDepth: () =>
|
|
15076
|
-
handleBackspace: () =>
|
|
15077
|
-
handleDelete: () =>
|
|
15078
|
-
hasListBefore: () =>
|
|
15079
|
-
hasListItemAfter: () =>
|
|
15080
|
-
hasListItemBefore: () =>
|
|
15081
|
-
listItemHasSubList: () =>
|
|
15082
|
-
nextListIsDeeper: () =>
|
|
15083
|
-
nextListIsHigher: () =>
|
|
15082
|
+
jv({}, {
|
|
15083
|
+
findListItemPos: () => Lv,
|
|
15084
|
+
getNextListDepth: () => Rv,
|
|
15085
|
+
handleBackspace: () => Hv,
|
|
15086
|
+
handleDelete: () => Gv,
|
|
15087
|
+
hasListBefore: () => zv,
|
|
15088
|
+
hasListItemAfter: () => Kv,
|
|
15089
|
+
hasListItemBefore: () => Bv,
|
|
15090
|
+
listItemHasSubList: () => Vv,
|
|
15091
|
+
nextListIsDeeper: () => Uv,
|
|
15092
|
+
nextListIsHigher: () => Wv
|
|
15084
15093
|
});
|
|
15085
|
-
var
|
|
15094
|
+
var Lv = (e, t) => {
|
|
15086
15095
|
let { $from: n } = t.selection, r = U(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
|
|
15087
15096
|
for (; a > 0 && s === null;) i = n.node(a), i.type === r ? s = a : (--a, --o);
|
|
15088
15097
|
return s === null ? null : {
|
|
15089
15098
|
$pos: t.doc.resolve(o),
|
|
15090
15099
|
depth: s
|
|
15091
15100
|
};
|
|
15092
|
-
},
|
|
15093
|
-
let n =
|
|
15101
|
+
}, Rv = (e, t) => {
|
|
15102
|
+
let n = Lv(e, t);
|
|
15094
15103
|
if (!n) return !1;
|
|
15095
15104
|
let [, r] = bu(t, e, n.$pos.pos + 4);
|
|
15096
15105
|
return r;
|
|
15097
|
-
},
|
|
15106
|
+
}, zv = (e, t, n) => {
|
|
15098
15107
|
let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
|
|
15099
15108
|
return !(!a || !n.includes(a.type.name));
|
|
15100
|
-
},
|
|
15109
|
+
}, Bv = (e, t) => {
|
|
15101
15110
|
let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - 2);
|
|
15102
15111
|
return !(r.index() === 0 || r.nodeBefore?.type.name !== e);
|
|
15103
|
-
},
|
|
15112
|
+
}, Vv = (e, t, n) => {
|
|
15104
15113
|
if (!n) return !1;
|
|
15105
15114
|
let r = U(e, t.schema), i = !1;
|
|
15106
15115
|
return n.descendants((e) => {
|
|
15107
15116
|
e.type === r && (i = !0);
|
|
15108
15117
|
}), i;
|
|
15109
|
-
},
|
|
15118
|
+
}, Hv = (e, t, n) => {
|
|
15110
15119
|
if (e.commands.undoInputRule()) return !0;
|
|
15111
15120
|
if (e.state.selection.from !== e.state.selection.to) return !1;
|
|
15112
|
-
if (!Tl(e.state, t) &&
|
|
15121
|
+
if (!Tl(e.state, t) && zv(e.state, t, n)) {
|
|
15113
15122
|
let { $anchor: n } = e.state.selection, r = e.state.doc.resolve(n.before() - 1), i = [];
|
|
15114
15123
|
r.node().descendants((e, n) => {
|
|
15115
15124
|
e.type.name === t && i.push({
|
|
@@ -15126,24 +15135,24 @@ var Iv = (e, t) => {
|
|
|
15126
15135
|
}, o.end()).joinForward().run();
|
|
15127
15136
|
}
|
|
15128
15137
|
if (!Tl(e.state, t) || !Du(e.state)) return !1;
|
|
15129
|
-
let r =
|
|
15138
|
+
let r = Lv(t, e.state);
|
|
15130
15139
|
if (!r) return !1;
|
|
15131
|
-
let i = e.state.doc.resolve(r.$pos.pos - 2).node(r.depth), a =
|
|
15132
|
-
return
|
|
15133
|
-
}, Hv = (e, t) => {
|
|
15134
|
-
let n = Lv(e, t), r = Iv(e, t);
|
|
15135
|
-
return !r || !n ? !1 : n > r.depth;
|
|
15140
|
+
let i = e.state.doc.resolve(r.$pos.pos - 2).node(r.depth), a = Vv(t, e.state, i);
|
|
15141
|
+
return Bv(t, e.state) && !a ? e.commands.joinItemBackward() : e.chain().liftListItem(t).run();
|
|
15136
15142
|
}, Uv = (e, t) => {
|
|
15137
|
-
let n =
|
|
15138
|
-
return !r || !n ? !1 : n
|
|
15143
|
+
let n = Rv(e, t), r = Lv(e, t);
|
|
15144
|
+
return !r || !n ? !1 : n > r.depth;
|
|
15139
15145
|
}, Wv = (e, t) => {
|
|
15146
|
+
let n = Rv(e, t), r = Lv(e, t);
|
|
15147
|
+
return !r || !n ? !1 : n < r.depth;
|
|
15148
|
+
}, Gv = (e, t) => {
|
|
15140
15149
|
if (!Tl(e.state, t) || !Eu(e.state, t)) return !1;
|
|
15141
15150
|
let { selection: n } = e.state, { $from: r, $to: i } = n;
|
|
15142
|
-
return !n.empty && r.sameParent(i) ? !1 :
|
|
15143
|
-
},
|
|
15151
|
+
return !n.empty && r.sameParent(i) ? !1 : Uv(t, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(t).joinBackward().run() : Wv(t, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
|
|
15152
|
+
}, Kv = (e, t) => {
|
|
15144
15153
|
let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - n.parentOffset - 2);
|
|
15145
15154
|
return !(r.index() === r.parent.childCount - 1 || r.nodeAfter?.type.name !== e);
|
|
15146
|
-
},
|
|
15155
|
+
}, qv = q.create({
|
|
15147
15156
|
name: "listKeymap",
|
|
15148
15157
|
addOptions() {
|
|
15149
15158
|
return { listTypes: [{
|
|
@@ -15159,35 +15168,35 @@ var Iv = (e, t) => {
|
|
|
15159
15168
|
Delete: ({ editor: e }) => {
|
|
15160
15169
|
let t = !1;
|
|
15161
15170
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
15162
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
15171
|
+
e.state.schema.nodes[n] !== void 0 && Gv(e, n) && (t = !0);
|
|
15163
15172
|
}), t;
|
|
15164
15173
|
},
|
|
15165
15174
|
"Mod-Delete": ({ editor: e }) => {
|
|
15166
15175
|
let t = !1;
|
|
15167
15176
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
15168
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
15177
|
+
e.state.schema.nodes[n] !== void 0 && Gv(e, n) && (t = !0);
|
|
15169
15178
|
}), t;
|
|
15170
15179
|
},
|
|
15171
15180
|
Backspace: ({ editor: e }) => {
|
|
15172
15181
|
let t = !1;
|
|
15173
15182
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
15174
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
15183
|
+
e.state.schema.nodes[n] !== void 0 && Hv(e, n, r) && (t = !0);
|
|
15175
15184
|
}), t;
|
|
15176
15185
|
},
|
|
15177
15186
|
"Mod-Backspace": ({ editor: e }) => {
|
|
15178
15187
|
let t = !1;
|
|
15179
15188
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
15180
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
15189
|
+
e.state.schema.nodes[n] !== void 0 && Hv(e, n, r) && (t = !0);
|
|
15181
15190
|
}), t;
|
|
15182
15191
|
}
|
|
15183
15192
|
};
|
|
15184
15193
|
}
|
|
15185
|
-
}),
|
|
15186
|
-
function
|
|
15194
|
+
}), Jv = /^(\s*)(\d+)\.\s+(.*)$/, Yv = /^\s/;
|
|
15195
|
+
function Xv(e) {
|
|
15187
15196
|
let t = e.trimStart();
|
|
15188
15197
|
return /^[-+*]\s+/.test(t) || /^\d+\.\s+/.test(t) || /^>\s?/.test(t) || /^```/.test(t) || /^~~~/.test(t);
|
|
15189
15198
|
}
|
|
15190
|
-
function
|
|
15199
|
+
function Zv(e) {
|
|
15191
15200
|
let t = [], n = [], r = !1;
|
|
15192
15201
|
return e.forEach((e) => {
|
|
15193
15202
|
if (r) {
|
|
@@ -15198,7 +15207,7 @@ function Xv(e) {
|
|
|
15198
15207
|
r = !0, n.push(e);
|
|
15199
15208
|
return;
|
|
15200
15209
|
}
|
|
15201
|
-
if (t.length > 0 &&
|
|
15210
|
+
if (t.length > 0 && Xv(e)) {
|
|
15202
15211
|
r = !0, n.push(e);
|
|
15203
15212
|
return;
|
|
15204
15213
|
}
|
|
@@ -15208,17 +15217,17 @@ function Xv(e) {
|
|
|
15208
15217
|
blockLines: n
|
|
15209
15218
|
};
|
|
15210
15219
|
}
|
|
15211
|
-
function
|
|
15220
|
+
function Qv(e) {
|
|
15212
15221
|
let t = [], n = 0, r = 0;
|
|
15213
15222
|
for (; n < e.length;) {
|
|
15214
|
-
let i = e[n], a = i.match(
|
|
15223
|
+
let i = e[n], a = i.match(Jv);
|
|
15215
15224
|
if (!a) break;
|
|
15216
15225
|
let [, o, s, c] = a, l = o.length, u = [c], d = n + 1, f = [i], p = !1;
|
|
15217
15226
|
for (; d < e.length;) {
|
|
15218
15227
|
let t = e[d];
|
|
15219
|
-
if (t.match(
|
|
15228
|
+
if (t.match(Jv)) break;
|
|
15220
15229
|
if (t.trim() === "") f.push(t), u.push(""), p = !0, d += 1;
|
|
15221
|
-
else if (t.match(
|
|
15230
|
+
else if (t.match(Yv)) f.push(t), u.push(t.slice(l + 2)), d += 1;
|
|
15222
15231
|
else {
|
|
15223
15232
|
if (p) break;
|
|
15224
15233
|
f.push(t), u.push(t), d += 1;
|
|
@@ -15234,12 +15243,12 @@ function Zv(e) {
|
|
|
15234
15243
|
}
|
|
15235
15244
|
return [t, r];
|
|
15236
15245
|
}
|
|
15237
|
-
function
|
|
15246
|
+
function $v(e, t, n) {
|
|
15238
15247
|
let r = [], i = 0;
|
|
15239
15248
|
for (; i < e.length;) {
|
|
15240
15249
|
let a = e[i];
|
|
15241
15250
|
if (a.indent === t) {
|
|
15242
|
-
let { paragraphLines: o, blockLines: s } =
|
|
15251
|
+
let { paragraphLines: o, blockLines: s } = Zv(a.contentLines), c = o.join("\n").trim(), l = [];
|
|
15243
15252
|
c && l.push({
|
|
15244
15253
|
type: "paragraph",
|
|
15245
15254
|
raw: c,
|
|
@@ -15253,7 +15262,7 @@ function Qv(e, t, n) {
|
|
|
15253
15262
|
let d = i + 1, f = [];
|
|
15254
15263
|
for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
|
|
15255
15264
|
if (f.length > 0) {
|
|
15256
|
-
let e =
|
|
15265
|
+
let e = $v(f, Math.min(...f.map((e) => e.indent)), n);
|
|
15257
15266
|
l.push({
|
|
15258
15267
|
type: "list",
|
|
15259
15268
|
ordered: !0,
|
|
@@ -15271,7 +15280,7 @@ function Qv(e, t, n) {
|
|
|
15271
15280
|
}
|
|
15272
15281
|
return r;
|
|
15273
15282
|
}
|
|
15274
|
-
function
|
|
15283
|
+
function ey(e, t) {
|
|
15275
15284
|
return e.map((e) => {
|
|
15276
15285
|
if (e.type !== "list_item") return t.parseChildren([e])[0];
|
|
15277
15286
|
let n = [];
|
|
@@ -15293,7 +15302,7 @@ function $v(e, t) {
|
|
|
15293
15302
|
};
|
|
15294
15303
|
});
|
|
15295
15304
|
}
|
|
15296
|
-
var
|
|
15305
|
+
var ty = "listItem", ny = "textStyle", ry = /^(\d+)\.\s$/, iy = J.create({
|
|
15297
15306
|
name: "orderedList",
|
|
15298
15307
|
addOptions() {
|
|
15299
15308
|
return {
|
|
@@ -15337,7 +15346,7 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15337
15346
|
markdownTokenName: "list",
|
|
15338
15347
|
parseMarkdown: (e, t) => {
|
|
15339
15348
|
if (e.type !== "list" || !e.ordered) return [];
|
|
15340
|
-
let n = e.start || 1, r = e.items ?
|
|
15349
|
+
let n = e.start || 1, r = e.items ? ey(e.items, t) : [];
|
|
15341
15350
|
return n === 1 ? {
|
|
15342
15351
|
type: "orderedList",
|
|
15343
15352
|
content: r
|
|
@@ -15356,9 +15365,9 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15356
15365
|
return t === void 0 ? -1 : t;
|
|
15357
15366
|
},
|
|
15358
15367
|
tokenize: (e, t, n) => {
|
|
15359
|
-
let r = e.split("\n"), [i, a] =
|
|
15368
|
+
let r = e.split("\n"), [i, a] = Qv(r);
|
|
15360
15369
|
if (i.length === 0) return;
|
|
15361
|
-
let o =
|
|
15370
|
+
let o = $v(i, 0, n);
|
|
15362
15371
|
if (o.length !== 0) return {
|
|
15363
15372
|
type: "list",
|
|
15364
15373
|
ordered: !0,
|
|
@@ -15370,32 +15379,32 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15370
15379
|
},
|
|
15371
15380
|
markdownOptions: { indentsContent: !0 },
|
|
15372
15381
|
addCommands() {
|
|
15373
|
-
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
15382
|
+
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ty, this.editor.getAttributes(ny)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
15374
15383
|
},
|
|
15375
15384
|
addKeyboardShortcuts() {
|
|
15376
15385
|
return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
|
|
15377
15386
|
},
|
|
15378
15387
|
addInputRules() {
|
|
15379
|
-
let e =
|
|
15380
|
-
find:
|
|
15388
|
+
let e = Wd({
|
|
15389
|
+
find: ry,
|
|
15381
15390
|
type: this.type,
|
|
15382
15391
|
getAttributes: (e) => ({ start: +e[1] }),
|
|
15383
15392
|
joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1]
|
|
15384
15393
|
});
|
|
15385
|
-
return (this.options.keepMarks || this.options.keepAttributes) && (e =
|
|
15386
|
-
find:
|
|
15394
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (e = Wd({
|
|
15395
|
+
find: ry,
|
|
15387
15396
|
type: this.type,
|
|
15388
15397
|
keepMarks: this.options.keepMarks,
|
|
15389
15398
|
keepAttributes: this.options.keepAttributes,
|
|
15390
15399
|
getAttributes: (e) => ({
|
|
15391
15400
|
start: +e[1],
|
|
15392
|
-
...this.editor.getAttributes(
|
|
15401
|
+
...this.editor.getAttributes(ny)
|
|
15393
15402
|
}),
|
|
15394
15403
|
joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1],
|
|
15395
15404
|
editor: this.editor
|
|
15396
15405
|
})), [e];
|
|
15397
15406
|
}
|
|
15398
|
-
}),
|
|
15407
|
+
}), ay = /^\s*(\[([( |x])?\])\s$/, oy = J.create({
|
|
15399
15408
|
name: "taskItem",
|
|
15400
15409
|
addOptions() {
|
|
15401
15410
|
return {
|
|
@@ -15449,7 +15458,7 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15449
15458
|
}
|
|
15450
15459
|
return t.createNode("taskItem", { checked: e.checked || !1 }, n);
|
|
15451
15460
|
},
|
|
15452
|
-
renderMarkdown: (e, t) =>
|
|
15461
|
+
renderMarkdown: (e, t) => rf(e, t, `- [${e.attrs?.checked ? "x" : " "}] `),
|
|
15453
15462
|
addKeyboardShortcuts() {
|
|
15454
15463
|
let e = {
|
|
15455
15464
|
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
@@ -15504,13 +15513,13 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15504
15513
|
};
|
|
15505
15514
|
},
|
|
15506
15515
|
addInputRules() {
|
|
15507
|
-
return [
|
|
15508
|
-
find:
|
|
15516
|
+
return [Wd({
|
|
15517
|
+
find: ay,
|
|
15509
15518
|
type: this.type,
|
|
15510
15519
|
getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
|
|
15511
15520
|
})];
|
|
15512
15521
|
}
|
|
15513
|
-
}),
|
|
15522
|
+
}), sy = J.create({
|
|
15514
15523
|
name: "taskList",
|
|
15515
15524
|
addOptions() {
|
|
15516
15525
|
return {
|
|
@@ -15546,7 +15555,7 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15546
15555
|
},
|
|
15547
15556
|
tokenize(e, t, n) {
|
|
15548
15557
|
let r = (e) => {
|
|
15549
|
-
let t =
|
|
15558
|
+
let t = nf(e, {
|
|
15550
15559
|
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
15551
15560
|
extractItemData: (e) => ({
|
|
15552
15561
|
indentLevel: e[1].length,
|
|
@@ -15570,7 +15579,7 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15570
15579
|
raw: t.raw,
|
|
15571
15580
|
items: t.items
|
|
15572
15581
|
}] : n.blockTokens(e);
|
|
15573
|
-
}, i =
|
|
15582
|
+
}, i = nf(e, {
|
|
15574
15583
|
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
15575
15584
|
extractItemData: (e) => ({
|
|
15576
15585
|
indentLevel: e[1].length,
|
|
@@ -15603,13 +15612,13 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15603
15612
|
addKeyboardShortcuts() {
|
|
15604
15613
|
return { "Mod-Shift-9": () => this.editor.commands.toggleTaskList() };
|
|
15605
15614
|
}
|
|
15606
|
-
}),
|
|
15615
|
+
}), cy = q.create({
|
|
15607
15616
|
name: "listKit",
|
|
15608
15617
|
addExtensions() {
|
|
15609
15618
|
let e = [];
|
|
15610
|
-
return this.options.bulletList !== !1 && e.push(
|
|
15619
|
+
return this.options.bulletList !== !1 && e.push(Fv.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(Iv.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(qv.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(iy.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(oy.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(sy.configure(this.options.taskList)), e;
|
|
15611
15620
|
}
|
|
15612
|
-
}),
|
|
15621
|
+
}), ly = " ", uy = "\xA0", dy = J.create({
|
|
15613
15622
|
name: "paragraph",
|
|
15614
15623
|
priority: 1e3,
|
|
15615
15624
|
addOptions() {
|
|
@@ -15631,14 +15640,14 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15631
15640
|
let n = e.tokens || [];
|
|
15632
15641
|
if (n.length === 1 && n[0].type === "image") return t.parseChildren([n[0]]);
|
|
15633
15642
|
let r = t.parseInline(n);
|
|
15634
|
-
return n.length === 1 && n[0].type === "text" && (n[0].raw ===
|
|
15643
|
+
return n.length === 1 && n[0].type === "text" && (n[0].raw === ly || n[0].text === ly || n[0].raw === uy || n[0].text === uy) && r.length === 1 && r[0].type === "text" && (r[0].text === ly || r[0].text === uy) ? t.createNode("paragraph", void 0, []) : t.createNode("paragraph", void 0, r);
|
|
15635
15644
|
},
|
|
15636
15645
|
renderMarkdown: (e, t, n) => {
|
|
15637
15646
|
if (!e) return "";
|
|
15638
15647
|
let r = Array.isArray(e.content) ? e.content : [];
|
|
15639
15648
|
if (r.length === 0) {
|
|
15640
15649
|
let e = Array.isArray(n?.previousNode?.content) ? n.previousNode.content : [];
|
|
15641
|
-
return n?.previousNode?.type === "paragraph" && e.length === 0 ?
|
|
15650
|
+
return n?.previousNode?.type === "paragraph" && e.length === 0 ? ly : "";
|
|
15642
15651
|
}
|
|
15643
15652
|
return t.renderChildren(r);
|
|
15644
15653
|
},
|
|
@@ -15648,7 +15657,7 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15648
15657
|
addKeyboardShortcuts() {
|
|
15649
15658
|
return { "Mod-Alt-0": () => this.editor.commands.setParagraph() };
|
|
15650
15659
|
}
|
|
15651
|
-
}),
|
|
15660
|
+
}), fy = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, py = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, my = _d.create({
|
|
15652
15661
|
name: "strike",
|
|
15653
15662
|
addOptions() {
|
|
15654
15663
|
return { HTMLAttributes: {} };
|
|
@@ -15686,18 +15695,18 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15686
15695
|
return { "Mod-Shift-s": () => this.editor.commands.toggleStrike() };
|
|
15687
15696
|
},
|
|
15688
15697
|
addInputRules() {
|
|
15689
|
-
return [
|
|
15690
|
-
find:
|
|
15698
|
+
return [Vd({
|
|
15699
|
+
find: fy,
|
|
15691
15700
|
type: this.type
|
|
15692
15701
|
})];
|
|
15693
15702
|
},
|
|
15694
15703
|
addPasteRules() {
|
|
15695
|
-
return [
|
|
15696
|
-
find:
|
|
15704
|
+
return [uf({
|
|
15705
|
+
find: py,
|
|
15697
15706
|
type: this.type
|
|
15698
15707
|
})];
|
|
15699
15708
|
}
|
|
15700
|
-
}),
|
|
15709
|
+
}), hy = J.create({
|
|
15701
15710
|
name: "text",
|
|
15702
15711
|
group: "inline",
|
|
15703
15712
|
parseMarkdown: (e) => ({
|
|
@@ -15705,7 +15714,7 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15705
15714
|
text: e.text || ""
|
|
15706
15715
|
}),
|
|
15707
15716
|
renderMarkdown: (e) => e.text || ""
|
|
15708
|
-
}),
|
|
15717
|
+
}), gy = _d.create({
|
|
15709
15718
|
name: "underline",
|
|
15710
15719
|
addOptions() {
|
|
15711
15720
|
return { HTMLAttributes: {} };
|
|
@@ -15761,13 +15770,13 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15761
15770
|
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
15762
15771
|
};
|
|
15763
15772
|
}
|
|
15764
|
-
}),
|
|
15773
|
+
}), _y = q.create({
|
|
15765
15774
|
name: "starterKit",
|
|
15766
15775
|
addExtensions() {
|
|
15767
15776
|
let e = [];
|
|
15768
|
-
return this.options.bold !== !1 && e.push(
|
|
15777
|
+
return this.options.bold !== !1 && e.push(tg.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(Xh.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(Fv.configure(this.options.bulletList)), this.options.code !== !1 && e.push(ig.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(cg.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(lg.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(Im.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(Lm.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(ug.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(dg.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(Um.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(fg.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(_g.configure(this.options.italic)), this.options.listItem !== !1 && e.push(Iv.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(qv.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(kv.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(iy.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(dy.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(my.configure(this.options.strike)), this.options.text !== !1 && e.push(hy.configure(this.options.text)), this.options.underline !== !1 && e.push(gy.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(Hm.configure(this.options?.trailingNode)), e;
|
|
15769
15778
|
}
|
|
15770
|
-
}),
|
|
15779
|
+
}), vy = q.create({
|
|
15771
15780
|
name: "textAlign",
|
|
15772
15781
|
addOptions() {
|
|
15773
15782
|
return {
|
|
@@ -15811,4 +15820,4 @@ var ey = "listItem", ty = "textStyle", ny = /^(\d+)\.\s$/, ry = J.create({
|
|
|
15811
15820
|
}
|
|
15812
15821
|
});
|
|
15813
15822
|
//#endregion
|
|
15814
|
-
export { J as _,
|
|
15823
|
+
export { J as _, Fm as a, Jp as c, pp as d, Ep as f, q as g, gp as h, qh as i, Kp as l, xp as m, _y as n, Bm as o, Pp as p, cy as r, Qp as s, vy as t, Up as u, K as v, P as y };
|