@harbour-enterprises/superdoc 0.9.22 → 0.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{index-YqE5-6V1.cjs → index-BXKGjuVW.cjs} +1 -1
- package/dist/chunks/{index-DHS2ANjv.cjs → index-CqRwYOdx.cjs} +1 -1
- package/dist/chunks/{index-XHRxRUhd.es.js → index-DjLrg1eZ.es.js} +2 -2
- package/dist/chunks/{index-Dd_ce0Er.es.js → index-dZKHAFXF.es.js} +1 -1
- package/dist/chunks/{super-editor.es-Biu3hzvL.es.js → super-editor.es-C8w4J5jx.es.js} +2373 -2333
- package/dist/chunks/{super-editor.es-CMTCdDpB.cjs → super-editor.es-dH2QglKu.cjs} +58 -58
- package/dist/chunks/{url-Cqg7fbSS.cjs → url-6Xu7gR4T.cjs} +1 -1
- package/dist/chunks/{url-BWFemt_V.es.js → url-BxDGAI6E.es.js} +1 -1
- package/dist/chunks/{xml-js-Bzw8Bo_u.es.js → xml-js-BAML2_fM.es.js} +762 -744
- package/dist/chunks/xml-js-zhwNEV5e.cjs +10 -0
- package/dist/super-editor/chunks/{converter-ClWoW5PX.js → converter-Cwp-Sia4.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-B4k46BKl.js → docx-zipper-CnOgTDAX.js} +1 -1
- package/dist/super-editor/chunks/{editor-DZjHTvfC.js → editor-D1IioTBl.js} +455 -416
- package/dist/super-editor/chunks/{toolbar-CKWbkRLL.js → toolbar-CTkdGAwV.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/list-item/list-item.d.ts.map +1 -1
- package/dist/super-editor/extensions/ordered-list/ordered-list.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +8 -8
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +530 -491
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-Zwb1wsIy.cjs +0 -10
|
@@ -4,12 +4,12 @@ var Gs = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var ff = (t, e, n) => e in t ? uf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
6
|
var P = (t, e, n) => ff(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n) => e.has(t) || Gs("Cannot " + n);
|
|
7
|
-
var
|
|
7
|
+
var Qe = (t, e, n) => (Ho(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? Gs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), jo = (t, e, n, r) => (Ho(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), I = (t, e, n) => (Ho(t, e, "access private method"), n);
|
|
8
8
|
import * as T from "yjs";
|
|
9
9
|
import { UndoManager as pf, Item as hf, ContentType as mf, Text as gf, XmlElement as yf } from "yjs";
|
|
10
|
-
import { P as G, a as Z, M as lr, N as B, S as J, T as V, b as H, D as zn, F as E, c as Mn, d as bf, e as Jl, A as Mr, p as ie, B as wf, f as Yl, i as vf, g as
|
|
10
|
+
import { P as G, a as Z, M as lr, N as B, S as J, T as V, b as H, D as zn, F as E, c as Mn, d as bf, e as Jl, A as Mr, p as ie, B as wf, f as Yl, i as vf, g as wt, l as Ar, h as jt, j as Gl, r as Zl, R as an, o as cr, k as Vt, m as bi, n as Ql, q as ue, s as Ve, v as Do, t as vn, u as kf, w as xe, x as to, y as ec, z as kn, C as Wo, E as Uo, G as qo, H as no, I as Cf, J as Zs, K as Sf, L as xf } from "./converter-Cwp-Sia4.js";
|
|
11
11
|
import { ref as Qs, computed as Mf, createElementBlock as Xt, openBlock as Jt, withModifiers as Ko, Fragment as Af, renderList as Of, normalizeClass as Tf, createCommentVNode as ea, toDisplayString as Xo, createElementVNode as Df, createApp as Nf } from "vue";
|
|
12
|
-
import { D as ta } from "./docx-zipper-
|
|
12
|
+
import { D as ta } from "./docx-zipper-CnOgTDAX.js";
|
|
13
13
|
function No(t) {
|
|
14
14
|
const { from: e, to: n, empty: r } = t.selection, o = [];
|
|
15
15
|
return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
|
|
@@ -168,7 +168,7 @@ var Pf = /* @__PURE__ */ function(t) {
|
|
|
168
168
|
}, e;
|
|
169
169
|
}(fe);
|
|
170
170
|
const Rf = 500;
|
|
171
|
-
class
|
|
171
|
+
class Ye {
|
|
172
172
|
constructor(e, n) {
|
|
173
173
|
this.items = e, this.eventCount = n;
|
|
174
174
|
}
|
|
@@ -192,24 +192,24 @@ class Je {
|
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
194
|
if (o) {
|
|
195
|
-
d.push(new
|
|
195
|
+
d.push(new tt(u.map));
|
|
196
196
|
let p = u.step.map(o.slice(i)), h;
|
|
197
|
-
p && s.maybeStep(p).doc && (h = s.mapping.maps[s.mapping.maps.length - 1], c.push(new
|
|
197
|
+
p && s.maybeStep(p).doc && (h = s.mapping.maps[s.mapping.maps.length - 1], c.push(new tt(h, void 0, void 0, c.length + d.length))), i--, h && o.appendMap(h, i);
|
|
198
198
|
} else
|
|
199
199
|
s.maybeStep(u.step);
|
|
200
200
|
if (u.selection)
|
|
201
|
-
return a = o ? u.selection.map(o.slice(i)) : u.selection, l = new
|
|
201
|
+
return a = o ? u.selection.map(o.slice(i)) : u.selection, l = new Ye(this.items.slice(0, r).append(d.reverse().concat(c)), this.eventCount - 1), !1;
|
|
202
202
|
}, this.items.length, 0), { remaining: l, transform: s, selection: a };
|
|
203
203
|
}
|
|
204
204
|
// Create a new branch with the given transform added.
|
|
205
205
|
addTransform(e, n, r, o) {
|
|
206
206
|
let i = [], s = this.eventCount, a = this.items, l = !o && a.length ? a.get(a.length - 1) : null;
|
|
207
207
|
for (let d = 0; d < e.steps.length; d++) {
|
|
208
|
-
let u = e.steps[d].invert(e.docs[d]), f = new
|
|
208
|
+
let u = e.steps[d].invert(e.docs[d]), f = new tt(e.mapping.maps[d], u, n), p;
|
|
209
209
|
(p = l && l.merge(f)) && (f = p, d ? i.pop() : a = a.slice(0, a.length - 1)), i.push(f), n && (s++, n = void 0), o || (l = f);
|
|
210
210
|
}
|
|
211
211
|
let c = s - r.depth;
|
|
212
|
-
return c > Ff && (a = Lf(a, c), s -= c), new
|
|
212
|
+
return c > Ff && (a = Lf(a, c), s -= c), new Ye(a.append(i), s);
|
|
213
213
|
}
|
|
214
214
|
remapping(e, n) {
|
|
215
215
|
let r = new lr();
|
|
@@ -219,7 +219,7 @@ class Je {
|
|
|
219
219
|
}, e, n), r;
|
|
220
220
|
}
|
|
221
221
|
addMaps(e) {
|
|
222
|
-
return this.eventCount == 0 ? this : new
|
|
222
|
+
return this.eventCount == 0 ? this : new Ye(this.items.append(e.map((n) => new tt(n))), this.eventCount);
|
|
223
223
|
}
|
|
224
224
|
// When the collab module receives remote changes, the history has
|
|
225
225
|
// to know about those, so that it can adjust the steps that were
|
|
@@ -241,14 +241,14 @@ class Je {
|
|
|
241
241
|
let h = i.maps[p];
|
|
242
242
|
if (f.step) {
|
|
243
243
|
let m = e.steps[p].invert(e.docs[p]), g = f.selection && f.selection.map(i.slice(l + 1, p));
|
|
244
|
-
g && a++, r.push(new
|
|
244
|
+
g && a++, r.push(new tt(h, m, g));
|
|
245
245
|
} else
|
|
246
|
-
r.push(new
|
|
246
|
+
r.push(new tt(h));
|
|
247
247
|
}, o);
|
|
248
248
|
let c = [];
|
|
249
249
|
for (let f = n; f < s; f++)
|
|
250
|
-
c.push(new
|
|
251
|
-
let d = this.items.slice(0, o).append(c).append(r), u = new
|
|
250
|
+
c.push(new tt(i.maps[f]));
|
|
251
|
+
let d = this.items.slice(0, o).append(c).append(r), u = new Ye(d, a);
|
|
252
252
|
return u.emptyItemCount() > Rf && (u = u.compress(this.items.length - r.length)), u;
|
|
253
253
|
}
|
|
254
254
|
emptyItemCount() {
|
|
@@ -273,14 +273,14 @@ class Je {
|
|
|
273
273
|
if (r--, c && n.appendMap(c, r), l) {
|
|
274
274
|
let d = s.selection && s.selection.map(n.slice(r));
|
|
275
275
|
d && i++;
|
|
276
|
-
let u = new
|
|
276
|
+
let u = new tt(c.invert(), l, d), f, p = o.length - 1;
|
|
277
277
|
(f = o.length && o[p].merge(u)) ? o[p] = f : o.push(u);
|
|
278
278
|
}
|
|
279
279
|
} else s.map && r--;
|
|
280
|
-
}, this.items.length, 0), new
|
|
280
|
+
}, this.items.length, 0), new Ye(fe.from(o.reverse()), i);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
|
|
283
|
+
Ye.empty = new Ye(fe.empty, 0);
|
|
284
284
|
function Lf(t, e) {
|
|
285
285
|
let n;
|
|
286
286
|
return t.forEach((r, o) => {
|
|
@@ -288,7 +288,7 @@ function Lf(t, e) {
|
|
|
288
288
|
return n = o, !1;
|
|
289
289
|
}), t.slice(n);
|
|
290
290
|
}
|
|
291
|
-
class
|
|
291
|
+
class tt {
|
|
292
292
|
constructor(e, n, r, o) {
|
|
293
293
|
this.map = e, this.step = n, this.selection = r, this.mirrorOffset = o;
|
|
294
294
|
}
|
|
@@ -296,30 +296,30 @@ class et {
|
|
|
296
296
|
if (this.step && e.step && !e.selection) {
|
|
297
297
|
let n = e.step.merge(this.step);
|
|
298
298
|
if (n)
|
|
299
|
-
return new
|
|
299
|
+
return new tt(n.getMap().invert(), n, this.selection);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
class
|
|
303
|
+
class Nt {
|
|
304
304
|
constructor(e, n, r, o, i) {
|
|
305
305
|
this.done = e, this.undone = n, this.prevRanges = r, this.prevTime = o, this.prevComposition = i;
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
const Ff = 20;
|
|
309
309
|
function Bf(t, e, n, r) {
|
|
310
|
-
let o = n.getMeta(
|
|
310
|
+
let o = n.getMeta(vt), i;
|
|
311
311
|
if (o)
|
|
312
312
|
return o.historyState;
|
|
313
|
-
n.getMeta($f) && (t = new
|
|
313
|
+
n.getMeta($f) && (t = new Nt(t.done, t.undone, null, 0, -1));
|
|
314
314
|
let s = n.getMeta("appendedTransaction");
|
|
315
315
|
if (n.steps.length == 0)
|
|
316
316
|
return t;
|
|
317
|
-
if (s && s.getMeta(
|
|
318
|
-
return s.getMeta(
|
|
317
|
+
if (s && s.getMeta(vt))
|
|
318
|
+
return s.getMeta(vt).redo ? new Nt(t.done.addTransform(n, void 0, r, ro(e)), t.undone, ra(n.mapping.maps), t.prevTime, t.prevComposition) : new Nt(t.done, t.undone.addTransform(n, void 0, r, ro(e)), null, t.prevTime, t.prevComposition);
|
|
319
319
|
if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
|
|
320
320
|
let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !_f(n, t.prevRanges)), c = s ? Jo(t.prevRanges, n.mapping) : ra(n.mapping.maps);
|
|
321
|
-
return new
|
|
322
|
-
} else return (i = n.getMeta("rebased")) ? new
|
|
321
|
+
return new Nt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, ro(e)), Ye.empty, c, n.time, a ?? t.prevComposition);
|
|
322
|
+
} else return (i = n.getMeta("rebased")) ? new Nt(t.done.rebased(n, i), t.undone.rebased(n, i), Jo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Nt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Jo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
|
|
323
323
|
}
|
|
324
324
|
function _f(t, e) {
|
|
325
325
|
if (!e)
|
|
@@ -349,11 +349,11 @@ function Jo(t, e) {
|
|
|
349
349
|
return n;
|
|
350
350
|
}
|
|
351
351
|
function zf(t, e, n) {
|
|
352
|
-
let r = ro(e), o =
|
|
352
|
+
let r = ro(e), o = vt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
|
|
353
353
|
if (!i)
|
|
354
354
|
return null;
|
|
355
|
-
let s = i.selection.resolve(i.transform.doc), a = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), l = new
|
|
356
|
-
return i.transform.setSelection(s).setMeta(
|
|
355
|
+
let s = i.selection.resolve(i.transform.doc), a = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), l = new Nt(n ? a : i.remaining, n ? i.remaining : a, null, 0, -1);
|
|
356
|
+
return i.transform.setSelection(s).setMeta(vt, { redo: n, historyState: l });
|
|
357
357
|
}
|
|
358
358
|
let Yo = !1, oa = null;
|
|
359
359
|
function ro(t) {
|
|
@@ -368,16 +368,16 @@ function ro(t) {
|
|
|
368
368
|
}
|
|
369
369
|
return Yo;
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const vt = new G("history"), $f = new G("closeHistory");
|
|
372
372
|
function Vf(t = {}) {
|
|
373
373
|
return t = {
|
|
374
374
|
depth: t.depth || 100,
|
|
375
375
|
newGroupDelay: t.newGroupDelay || 500
|
|
376
376
|
}, new Z({
|
|
377
|
-
key:
|
|
377
|
+
key: vt,
|
|
378
378
|
state: {
|
|
379
379
|
init() {
|
|
380
|
-
return new
|
|
380
|
+
return new Nt(Ye.empty, Ye.empty, null, 0, -1);
|
|
381
381
|
},
|
|
382
382
|
apply(e, n, r) {
|
|
383
383
|
return Bf(n, r, e, t);
|
|
@@ -396,7 +396,7 @@ function Vf(t = {}) {
|
|
|
396
396
|
}
|
|
397
397
|
function nc(t, e) {
|
|
398
398
|
return (n, r) => {
|
|
399
|
-
let o =
|
|
399
|
+
let o = vt.getState(n);
|
|
400
400
|
if (!o || (t ? o.undone : o.done).eventCount == 0)
|
|
401
401
|
return !1;
|
|
402
402
|
if (r) {
|
|
@@ -408,11 +408,11 @@ function nc(t, e) {
|
|
|
408
408
|
}
|
|
409
409
|
const rc = nc(!1, !0), oc = nc(!0, !0);
|
|
410
410
|
function zk(t) {
|
|
411
|
-
let e =
|
|
411
|
+
let e = vt.getState(t);
|
|
412
412
|
return e ? e.done.eventCount : 0;
|
|
413
413
|
}
|
|
414
414
|
function $k(t) {
|
|
415
|
-
let e =
|
|
415
|
+
let e = vt.getState(t);
|
|
416
416
|
return e ? e.undone.eventCount : 0;
|
|
417
417
|
}
|
|
418
418
|
function D(t, e, n = {}) {
|
|
@@ -486,7 +486,7 @@ const Hf = Q.create({
|
|
|
486
486
|
return e && e.nodeType == 11 ? e.host : e;
|
|
487
487
|
};
|
|
488
488
|
let wi = null;
|
|
489
|
-
const
|
|
489
|
+
const mt = function(t, e, n) {
|
|
490
490
|
let r = wi || (wi = document.createRange());
|
|
491
491
|
return r.setEnd(t, n ?? t.nodeValue.length), r.setStart(t, e || 0), r;
|
|
492
492
|
}, jf = function() {
|
|
@@ -585,9 +585,9 @@ function Jf(t, e, n) {
|
|
|
585
585
|
return { node: r.startContainer, offset: Math.min($e(r.startContainer), r.startOffset) };
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
const Ci = !Te && /Chrome\/(\d+)/.exec(Wt), we = !!Ci, sc = Ci ? +Ci[1] : 0, Me = !Te && !!
|
|
588
|
+
const st = typeof navigator < "u" ? navigator : null, sa = typeof document < "u" ? document : null, Wt = st && st.userAgent || "", vi = /Edge\/(\d+)/.exec(Wt), ic = /MSIE \d/.exec(Wt), ki = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wt), Te = !!(ic || ki || vi), Ft = ic ? document.documentMode : ki ? +ki[1] : vi ? +vi[1] : 0, Ge = !Te && /gecko\/(\d+)/i.test(Wt);
|
|
589
|
+
Ge && +(/Firefox\/(\d+)/.exec(Wt) || [0, 0])[1];
|
|
590
|
+
const Ci = !Te && /Chrome\/(\d+)/.exec(Wt), we = !!Ci, sc = Ci ? +Ci[1] : 0, Me = !Te && !!st && /Apple Computer/.test(st.vendor), Tn = Me && (/Mobile\/\w+/.test(Wt) || !!st && st.maxTouchPoints > 2), ze = Tn || (st ? /Mac/.test(st.platform) : !1), Yf = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(Wt), Tr = !!sa && "webkitFontSmoothing" in sa.documentElement.style, Gf = Tr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
591
591
|
function Zf(t) {
|
|
592
592
|
let e = t.defaultView && t.defaultView.visualViewport;
|
|
593
593
|
return e ? {
|
|
@@ -602,7 +602,7 @@ function Zf(t) {
|
|
|
602
602
|
bottom: t.documentElement.clientHeight
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function pt(t, e) {
|
|
606
606
|
return typeof t == "number" ? t : t[e];
|
|
607
607
|
}
|
|
608
608
|
function Qf(t) {
|
|
@@ -622,7 +622,7 @@ function aa(t, e, n) {
|
|
|
622
622
|
continue;
|
|
623
623
|
}
|
|
624
624
|
let a = s, l = a == i.body, c = l ? Zf(i) : Qf(a), d = 0, u = 0;
|
|
625
|
-
if (e.top < c.top +
|
|
625
|
+
if (e.top < c.top + pt(r, "top") ? u = -(c.top - e.top + pt(o, "top")) : e.bottom > c.bottom - pt(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + pt(o, "top") - c.top : e.bottom - c.bottom + pt(o, "bottom")), e.left < c.left + pt(r, "left") ? d = -(c.left - e.left + pt(o, "left")) : e.right > c.right - pt(r, "right") && (d = e.right - c.right + pt(o, "right")), d || u)
|
|
626
626
|
if (l)
|
|
627
627
|
i.defaultView.scrollBy(d, u);
|
|
628
628
|
else {
|
|
@@ -687,7 +687,7 @@ function cc(t, e) {
|
|
|
687
687
|
if (d.nodeType == 1)
|
|
688
688
|
f = d.getClientRects();
|
|
689
689
|
else if (d.nodeType == 3)
|
|
690
|
-
f =
|
|
690
|
+
f = mt(d).getClientRects();
|
|
691
691
|
else
|
|
692
692
|
continue;
|
|
693
693
|
for (let p = 0; p < f.length; p++) {
|
|
@@ -712,7 +712,7 @@ function rp(t, e) {
|
|
|
712
712
|
let n = t.nodeValue.length, r = document.createRange();
|
|
713
713
|
for (let o = 0; o < n; o++) {
|
|
714
714
|
r.setEnd(t, o + 1), r.setStart(t, o);
|
|
715
|
-
let i =
|
|
715
|
+
let i = Dt(r, 1);
|
|
716
716
|
if (i.top != i.bottom && gs(e, i))
|
|
717
717
|
return { node: t, offset: o + (e.left >= (i.left + i.right) / 2 ? 1 : 0) };
|
|
718
718
|
}
|
|
@@ -777,7 +777,7 @@ function ap(t, e) {
|
|
|
777
777
|
for (let c = s; r && c; c = On(c))
|
|
778
778
|
c.draggable && (r = void 0);
|
|
779
779
|
if (s = op(s, e), r) {
|
|
780
|
-
if (
|
|
780
|
+
if (Ge && r.nodeType == 1 && (o = Math.min(o, r.childNodes.length), o < r.childNodes.length)) {
|
|
781
781
|
let d = r.childNodes[o], u;
|
|
782
782
|
d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && o++;
|
|
783
783
|
}
|
|
@@ -791,7 +791,7 @@ function ap(t, e) {
|
|
|
791
791
|
function la(t) {
|
|
792
792
|
return t.top < t.bottom || t.left < t.right;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function Dt(t, e) {
|
|
795
795
|
let n = t.getClientRects();
|
|
796
796
|
if (n.length) {
|
|
797
797
|
let r = n[e < 0 ? 0 : n.length - 1];
|
|
@@ -802,14 +802,14 @@ function Tt(t, e) {
|
|
|
802
802
|
}
|
|
803
803
|
const lp = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
804
804
|
function uc(t, e, n) {
|
|
805
|
-
let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Tr ||
|
|
805
|
+
let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Tr || Ge;
|
|
806
806
|
if (r.nodeType == 3)
|
|
807
807
|
if (s && (lp.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
|
|
808
|
-
let l =
|
|
809
|
-
if (
|
|
810
|
-
let c =
|
|
808
|
+
let l = Dt(mt(r, o, o), n);
|
|
809
|
+
if (Ge && o && /\s/.test(r.nodeValue[o - 1]) && o < r.nodeValue.length) {
|
|
810
|
+
let c = Dt(mt(r, o - 1, o - 1), -1);
|
|
811
811
|
if (c.top == l.top) {
|
|
812
|
-
let d =
|
|
812
|
+
let d = Dt(mt(r, o, o + 1), -1);
|
|
813
813
|
if (d.top != l.top)
|
|
814
814
|
return qn(d, d.left < c.left);
|
|
815
815
|
}
|
|
@@ -817,7 +817,7 @@ function uc(t, e, n) {
|
|
|
817
817
|
return l;
|
|
818
818
|
} else {
|
|
819
819
|
let l = o, c = o, d = n < 0 ? 1 : -1;
|
|
820
|
-
return n < 0 && !o ? (c++, d = -1) : n >= 0 && o == r.nodeValue.length ? (l--, d = 1) : n < 0 ? l-- : c++, qn(
|
|
820
|
+
return n < 0 && !o ? (c++, d = -1) : n >= 0 && o == r.nodeValue.length ? (l--, d = 1) : n < 0 ? l-- : c++, qn(Dt(mt(r, l, c), d), d < 0);
|
|
821
821
|
}
|
|
822
822
|
if (!t.state.doc.resolve(e - (i || 0)).parent.inlineContent) {
|
|
823
823
|
if (i == null && o && (n < 0 || o == $e(r))) {
|
|
@@ -833,19 +833,19 @@ function uc(t, e, n) {
|
|
|
833
833
|
return Zo(r.getBoundingClientRect(), n >= 0);
|
|
834
834
|
}
|
|
835
835
|
if (i == null && o && (n < 0 || o == $e(r))) {
|
|
836
|
-
let l = r.childNodes[o - 1], c = l.nodeType == 3 ?
|
|
836
|
+
let l = r.childNodes[o - 1], c = l.nodeType == 3 ? mt(l, $e(l) - (s ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
837
837
|
if (c)
|
|
838
|
-
return qn(
|
|
838
|
+
return qn(Dt(c, 1), !1);
|
|
839
839
|
}
|
|
840
840
|
if (i == null && o < $e(r)) {
|
|
841
841
|
let l = r.childNodes[o];
|
|
842
842
|
for (; l.pmViewDesc && l.pmViewDesc.ignoreForCoords; )
|
|
843
843
|
l = l.nextSibling;
|
|
844
|
-
let c = l ? l.nodeType == 3 ?
|
|
844
|
+
let c = l ? l.nodeType == 3 ? mt(l, 0, s ? 0 : 1) : l.nodeType == 1 ? l : null : null;
|
|
845
845
|
if (c)
|
|
846
|
-
return qn(
|
|
846
|
+
return qn(Dt(c, -1), !0);
|
|
847
847
|
}
|
|
848
|
-
return qn(
|
|
848
|
+
return qn(Dt(r.nodeType == 3 ? mt(r) : r, -n), n >= 0);
|
|
849
849
|
}
|
|
850
850
|
function qn(t, e) {
|
|
851
851
|
if (t.width == 0)
|
|
@@ -888,7 +888,7 @@ function cp(t, e, n) {
|
|
|
888
888
|
if (a.nodeType == 1)
|
|
889
889
|
l = a.getClientRects();
|
|
890
890
|
else if (a.nodeType == 3)
|
|
891
|
-
l =
|
|
891
|
+
l = mt(a, 0, a.nodeValue.length).getClientRects();
|
|
892
892
|
else
|
|
893
893
|
continue;
|
|
894
894
|
for (let c = 0; c < l.length; c++) {
|
|
@@ -921,7 +921,7 @@ let ca = null, da = null, ua = !1;
|
|
|
921
921
|
function fp(t, e, n) {
|
|
922
922
|
return ca == e && da == n ? ua : (ca = e, da = n, ua = n == "up" || n == "down" ? cp(t, e, n) : up(t, e, n));
|
|
923
923
|
}
|
|
924
|
-
const He = 0, fa = 1, Qt = 2,
|
|
924
|
+
const He = 0, fa = 1, Qt = 2, at = 3;
|
|
925
925
|
class Dr {
|
|
926
926
|
constructor(e, n, r, o) {
|
|
927
927
|
this.parent = e, this.children = n, this.dom = r, this.contentDOM = o, this.dirty = He, r.pmViewDesc = this;
|
|
@@ -1181,7 +1181,7 @@ class Dr {
|
|
|
1181
1181
|
h = g;
|
|
1182
1182
|
}
|
|
1183
1183
|
let a = this.domFromPos(e, e ? -1 : 1), l = n == e ? a : this.domFromPos(n, n ? -1 : 1), c = r.root.getSelection(), d = r.domSelectionRange(), u = !1;
|
|
1184
|
-
if ((
|
|
1184
|
+
if ((Ge || Me) && e == n) {
|
|
1185
1185
|
let { node: p, offset: h } = a;
|
|
1186
1186
|
if (p.nodeType == 3) {
|
|
1187
1187
|
if (u = !!(h && p.nodeValue[h - 1] == `
|
|
@@ -1200,7 +1200,7 @@ class Dr {
|
|
|
1200
1200
|
u = m && (m.nodeName == "BR" || m.contentEditable == "false");
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
if (
|
|
1203
|
+
if (Ge && d.focusNode && d.focusNode != l.node && d.focusNode.nodeType == 1) {
|
|
1204
1204
|
let p = d.focusNode.childNodes[d.focusOffset];
|
|
1205
1205
|
p && p.contentEditable == "false" && (o = !0);
|
|
1206
1206
|
}
|
|
@@ -1237,10 +1237,10 @@ class Dr {
|
|
|
1237
1237
|
if (r == s ? e <= s && n >= r : e < s && n > r) {
|
|
1238
1238
|
let a = r + i.border, l = s - i.border;
|
|
1239
1239
|
if (e >= a && n <= l) {
|
|
1240
|
-
this.dirty = e == r || n == s ? Qt : fa, e == a && n == l && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty =
|
|
1240
|
+
this.dirty = e == r || n == s ? Qt : fa, e == a && n == l && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty = at : i.markDirty(e - a, n - a);
|
|
1241
1241
|
return;
|
|
1242
1242
|
} else
|
|
1243
|
-
i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? Qt :
|
|
1243
|
+
i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? Qt : at;
|
|
1244
1244
|
}
|
|
1245
1245
|
r = s;
|
|
1246
1246
|
}
|
|
@@ -1329,10 +1329,10 @@ class cn extends Dr {
|
|
|
1329
1329
|
return (!s || !s.dom) && (s = zn.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new cn(e, n, s.dom, s.contentDOM || s.dom, s);
|
|
1330
1330
|
}
|
|
1331
1331
|
parseRule() {
|
|
1332
|
-
return this.dirty &
|
|
1332
|
+
return this.dirty & at || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
1333
1333
|
}
|
|
1334
1334
|
matchesMark(e) {
|
|
1335
|
-
return this.dirty !=
|
|
1335
|
+
return this.dirty != at && this.mark.eq(e);
|
|
1336
1336
|
}
|
|
1337
1337
|
markDirty(e, n) {
|
|
1338
1338
|
if (super.markDirty(e, n), this.dirty != He) {
|
|
@@ -1356,7 +1356,7 @@ class cn extends Dr {
|
|
|
1356
1356
|
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
|
-
class
|
|
1359
|
+
class Bt extends Dr {
|
|
1360
1360
|
constructor(e, n, r, o, i, s, a, l, c) {
|
|
1361
1361
|
super(e, [], i, s), this.node = n, this.outerDeco = r, this.innerDeco = o, this.nodeDOM = a;
|
|
1362
1362
|
}
|
|
@@ -1384,7 +1384,7 @@ class Ft extends Dr {
|
|
|
1384
1384
|
} else d || ({ dom: d, contentDOM: u } = zn.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
|
|
1385
1385
|
!u && !n.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), n.type.spec.draggable && (d.draggable = !0));
|
|
1386
1386
|
let f = d;
|
|
1387
|
-
return d = yc(d, r, n), c ? l = new hp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Po(e, n, r, o, d, f, i) : new
|
|
1387
|
+
return d = yc(d, r, n), c ? l = new hp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Po(e, n, r, o, d, f, i) : new Bt(e, n, r, o, d, u || null, f, i, s + 1);
|
|
1388
1388
|
}
|
|
1389
1389
|
parseRule() {
|
|
1390
1390
|
if (this.node.type.spec.reparseInView)
|
|
@@ -1459,7 +1459,7 @@ class Ft extends Dr {
|
|
|
1459
1459
|
// If this desc must be updated to match the given node decoration,
|
|
1460
1460
|
// do so and return true.
|
|
1461
1461
|
update(e, n, r, o) {
|
|
1462
|
-
return this.dirty ==
|
|
1462
|
+
return this.dirty == at || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, n, r, o), !0);
|
|
1463
1463
|
}
|
|
1464
1464
|
updateInner(e, n, r, o) {
|
|
1465
1465
|
this.updateOuterDeco(n), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(o, this.posAtStart), this.dirty = He;
|
|
@@ -1484,10 +1484,10 @@ class Ft extends Dr {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
function pa(t, e, n, r, o) {
|
|
1486
1486
|
yc(r, e, t);
|
|
1487
|
-
let i = new
|
|
1487
|
+
let i = new Bt(void 0, t, e, n, r, r, r, o, 0);
|
|
1488
1488
|
return i.contentDOM && i.updateChildren(o, 0), i;
|
|
1489
1489
|
}
|
|
1490
|
-
class Po extends
|
|
1490
|
+
class Po extends Bt {
|
|
1491
1491
|
constructor(e, n, r, o, i, s, a) {
|
|
1492
1492
|
super(e, n, r, o, i, null, s, a, 0);
|
|
1493
1493
|
}
|
|
@@ -1498,7 +1498,7 @@ class Po extends Ft {
|
|
|
1498
1498
|
return { skip: e || !0 };
|
|
1499
1499
|
}
|
|
1500
1500
|
update(e, n, r, o) {
|
|
1501
|
-
return this.dirty ==
|
|
1501
|
+
return this.dirty == at || this.dirty != He && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(n), (this.dirty != He || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, o.trackWrites == this.nodeDOM && (o.trackWrites = null)), this.node = e, this.dirty = He, !0);
|
|
1502
1502
|
}
|
|
1503
1503
|
inParent() {
|
|
1504
1504
|
let e = this.parent.contentDOM;
|
|
@@ -1521,7 +1521,7 @@ class Po extends Ft {
|
|
|
1521
1521
|
return new Po(this.parent, o, this.outerDeco, this.innerDeco, i, i, r);
|
|
1522
1522
|
}
|
|
1523
1523
|
markDirty(e, n) {
|
|
1524
|
-
super.markDirty(e, n), this.dom != this.nodeDOM && (e == 0 || n == this.nodeDOM.nodeValue.length) && (this.dirty =
|
|
1524
|
+
super.markDirty(e, n), this.dom != this.nodeDOM && (e == 0 || n == this.nodeDOM.nodeValue.length) && (this.dirty = at);
|
|
1525
1525
|
}
|
|
1526
1526
|
get domAtom() {
|
|
1527
1527
|
return !1;
|
|
@@ -1544,7 +1544,7 @@ class hc extends Dr {
|
|
|
1544
1544
|
return this.dom.nodeName == "IMG";
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
|
-
class hp extends
|
|
1547
|
+
class hp extends Bt {
|
|
1548
1548
|
constructor(e, n, r, o, i, s, a, l, c, d) {
|
|
1549
1549
|
super(e, n, r, o, i, s, a, c, d), this.spec = l;
|
|
1550
1550
|
}
|
|
@@ -1552,7 +1552,7 @@ class hp extends Ft {
|
|
|
1552
1552
|
// through. If it does, and there's a `contentDOM` node, our logic
|
|
1553
1553
|
// updates the children.
|
|
1554
1554
|
update(e, n, r, o) {
|
|
1555
|
-
if (this.dirty ==
|
|
1555
|
+
if (this.dirty == at)
|
|
1556
1556
|
return !1;
|
|
1557
1557
|
if (this.spec.update && (this.node.type == e.type || this.spec.multiType)) {
|
|
1558
1558
|
let i = this.spec.update(e, n, r);
|
|
@@ -1731,7 +1731,7 @@ class gp {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
updateNodeAt(e, n, r, o, i) {
|
|
1733
1733
|
let s = this.top.children[o];
|
|
1734
|
-
return s.dirty ==
|
|
1734
|
+
return s.dirty == at && s.dom == s.contentDOM && (s.dirty = Qt), s.update(e, n, r, i) ? (this.destroyBetween(this.index, o), this.index++, !0) : !1;
|
|
1735
1735
|
}
|
|
1736
1736
|
findIndexWithChild(e) {
|
|
1737
1737
|
for (; ; ) {
|
|
@@ -1755,11 +1755,11 @@ class gp {
|
|
|
1755
1755
|
updateNextNode(e, n, r, o, i, s) {
|
|
1756
1756
|
for (let a = this.index; a < this.top.children.length; a++) {
|
|
1757
1757
|
let l = this.top.children[a];
|
|
1758
|
-
if (l instanceof
|
|
1758
|
+
if (l instanceof Bt) {
|
|
1759
1759
|
let c = this.preMatch.matched.get(l);
|
|
1760
1760
|
if (c != null && c != i)
|
|
1761
1761
|
return !1;
|
|
1762
|
-
let d = l.dom, u, f = this.isLocked(d) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty !=
|
|
1762
|
+
let d = l.dom, u, f = this.isLocked(d) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != at && po(n, l.outerDeco));
|
|
1763
1763
|
if (!f && l.update(e, n, r, o))
|
|
1764
1764
|
return this.destroyBetween(this.index, a), l.dom != d && (this.changed = !0), this.index++, !0;
|
|
1765
1765
|
if (!f && (u = this.recreateWrapper(l, e, n, r, o, s)))
|
|
@@ -1774,7 +1774,7 @@ class gp {
|
|
|
1774
1774
|
recreateWrapper(e, n, r, o, i, s) {
|
|
1775
1775
|
if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !po(r, e.outerDeco) || !o.eq(e.innerDeco))
|
|
1776
1776
|
return null;
|
|
1777
|
-
let a =
|
|
1777
|
+
let a = Bt.create(this.top, n, r, o, i, s);
|
|
1778
1778
|
if (a.contentDOM) {
|
|
1779
1779
|
a.children = e.children, e.children = [];
|
|
1780
1780
|
for (let l of a.children)
|
|
@@ -1784,7 +1784,7 @@ class gp {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
// Insert the node as a newly created node desc.
|
|
1786
1786
|
addNode(e, n, r, o, i) {
|
|
1787
|
-
let s =
|
|
1787
|
+
let s = Bt.create(this.top, e, n, r, o, i);
|
|
1788
1788
|
s.contentDOM && s.updateChildren(o, i + 1), this.top.children.splice(this.index++, 0, s), this.changed = !0;
|
|
1789
1789
|
}
|
|
1790
1790
|
placeWidget(e, n, r) {
|
|
@@ -1976,7 +1976,7 @@ function ys(t, e = null) {
|
|
|
1976
1976
|
function bc(t) {
|
|
1977
1977
|
return t.editable ? t.hasFocus() : vc(t) && document.activeElement && document.activeElement.contains(t.dom);
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function kt(t, e = !1) {
|
|
1980
1980
|
let n = t.state.selection;
|
|
1981
1981
|
if (wc(t, n), !!bc(t)) {
|
|
1982
1982
|
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && we) {
|
|
@@ -2028,7 +2028,7 @@ function Sp(t) {
|
|
|
2028
2028
|
if (!e)
|
|
2029
2029
|
return;
|
|
2030
2030
|
let r = t.cursorWrapper.dom, o = r.nodeName == "IMG";
|
|
2031
|
-
o ? n.setStart(r.parentNode, ge(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Te &&
|
|
2031
|
+
o ? n.setStart(r.parentNode, ge(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Te && Ft <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
2032
2032
|
}
|
|
2033
2033
|
function wc(t, e) {
|
|
2034
2034
|
if (e instanceof B) {
|
|
@@ -2064,7 +2064,7 @@ function Mi(t, e) {
|
|
|
2064
2064
|
let { $anchor: n, $head: r } = t.selection, o = e > 0 ? n.max(r) : n.min(r), i = o.parent.inlineContent ? o.depth ? t.doc.resolve(e > 0 ? o.after() : o.before()) : null : o;
|
|
2065
2065
|
return i && J.findFrom(i, e);
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2067
|
+
function Et(t, e) {
|
|
2068
2068
|
return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
2069
2069
|
}
|
|
2070
2070
|
function va(t, e, n) {
|
|
@@ -2075,25 +2075,25 @@ function va(t, e, n) {
|
|
|
2075
2075
|
if (!i || i.isText || !i.isLeaf)
|
|
2076
2076
|
return !1;
|
|
2077
2077
|
let s = t.state.doc.resolve(o.pos + i.nodeSize * (e < 0 ? -1 : 1));
|
|
2078
|
-
return
|
|
2078
|
+
return Et(t, new V(r.$anchor, s));
|
|
2079
2079
|
} else if (r.empty) {
|
|
2080
2080
|
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
2081
2081
|
let o = Mi(t.state, e);
|
|
2082
|
-
return o && o instanceof B ?
|
|
2082
|
+
return o && o instanceof B ? Et(t, o) : !1;
|
|
2083
2083
|
} else if (!(ze && n.indexOf("m") > -1)) {
|
|
2084
2084
|
let o = r.$head, i = o.textOffset ? null : e < 0 ? o.nodeBefore : o.nodeAfter, s;
|
|
2085
2085
|
if (!i || i.isText)
|
|
2086
2086
|
return !1;
|
|
2087
2087
|
let a = e < 0 ? o.pos - i.nodeSize : o.pos;
|
|
2088
|
-
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ?
|
|
2088
|
+
return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ? Et(t, new B(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Tr ? Et(t, new V(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
|
|
2089
2089
|
}
|
|
2090
2090
|
} else return !1;
|
|
2091
2091
|
else {
|
|
2092
2092
|
if (r instanceof B && r.node.isInline)
|
|
2093
|
-
return
|
|
2093
|
+
return Et(t, new V(e > 0 ? r.$to : r.$from));
|
|
2094
2094
|
{
|
|
2095
2095
|
let o = Mi(t.state, e);
|
|
2096
|
-
return o ?
|
|
2096
|
+
return o ? Et(t, o) : !1;
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
@@ -2112,7 +2112,7 @@ function Mp(t) {
|
|
|
2112
2112
|
if (!n)
|
|
2113
2113
|
return;
|
|
2114
2114
|
let o, i, s = !1;
|
|
2115
|
-
for (
|
|
2115
|
+
for (Ge && n.nodeType == 1 && r < ho(n) && er(n.childNodes[r], -1) && (s = !0); ; )
|
|
2116
2116
|
if (r > 0) {
|
|
2117
2117
|
if (n.nodeType != 1)
|
|
2118
2118
|
break;
|
|
@@ -2218,7 +2218,7 @@ function Ai(t, e, n) {
|
|
|
2218
2218
|
t.domObserver.setCurSelection();
|
|
2219
2219
|
let { state: o } = t;
|
|
2220
2220
|
setTimeout(() => {
|
|
2221
|
-
t.state == o &&
|
|
2221
|
+
t.state == o && kt(t);
|
|
2222
2222
|
}, 50);
|
|
2223
2223
|
}
|
|
2224
2224
|
function ka(t, e) {
|
|
@@ -2246,11 +2246,11 @@ function Ca(t, e, n) {
|
|
|
2246
2246
|
if (!o.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
2247
2247
|
let s = Mi(t.state, e);
|
|
2248
2248
|
if (s && s instanceof B)
|
|
2249
|
-
return
|
|
2249
|
+
return Et(t, s);
|
|
2250
2250
|
}
|
|
2251
2251
|
if (!o.parent.inlineContent) {
|
|
2252
2252
|
let s = e < 0 ? o : i, a = r instanceof Mr ? J.near(s, e) : J.findFrom(s, e);
|
|
2253
|
-
return a ?
|
|
2253
|
+
return a ? Et(t, a) : !1;
|
|
2254
2254
|
}
|
|
2255
2255
|
return !1;
|
|
2256
2256
|
}
|
|
@@ -2515,7 +2515,7 @@ function $p(t) {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
Me && t.dom.addEventListener("input", () => null), Ti(t);
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2518
|
+
function Rt(t, e) {
|
|
2519
2519
|
t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
|
|
2520
2520
|
}
|
|
2521
2521
|
function Vp(t) {
|
|
@@ -2551,13 +2551,13 @@ function jp(t, e) {
|
|
|
2551
2551
|
}
|
|
2552
2552
|
Oe.keydown = (t, e) => {
|
|
2553
2553
|
let n = e;
|
|
2554
|
-
if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Dc(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(
|
|
2554
|
+
if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Dc(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(bt && we && n.keyCode == 13)))
|
|
2555
2555
|
if (n.keyCode != 229 && t.domObserver.forceFlush(), Tn && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
|
|
2556
2556
|
let r = Date.now();
|
|
2557
2557
|
t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
2558
2558
|
t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, Zt(13, "Enter"))), t.input.lastIOSEnter = 0);
|
|
2559
2559
|
}, 200);
|
|
2560
|
-
} else t.someProp("handleKeyDown", (r) => r(t, n)) || Ep(t, n) ? n.preventDefault() :
|
|
2560
|
+
} else t.someProp("handleKeyDown", (r) => r(t, n)) || Ep(t, n) ? n.preventDefault() : Rt(t, "key");
|
|
2561
2561
|
};
|
|
2562
2562
|
Oe.keyup = (t, e) => {
|
|
2563
2563
|
e.keyCode == 16 && (t.input.shiftKey = !1);
|
|
@@ -2656,7 +2656,7 @@ Ae.mousedown = (t, e) => {
|
|
|
2656
2656
|
let r = Cs(t), o = Date.now(), i = "singleClick";
|
|
2657
2657
|
o - t.input.lastClick.time < 500 && Wp(n, t.input.lastClick) && !n[Tc] && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
|
|
2658
2658
|
let s = t.posAtCoords(Ro(n));
|
|
2659
|
-
s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new Gp(t, s, n, !!r)) : (i == "doubleClick" ? Xp : Jp)(t, s.pos, s.inside, n) ? n.preventDefault() :
|
|
2659
|
+
s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new Gp(t, s, n, !!r)) : (i == "doubleClick" ? Xp : Jp)(t, s.pos, s.inside, n) ? n.preventDefault() : Rt(t, "pointer"));
|
|
2660
2660
|
};
|
|
2661
2661
|
class Gp {
|
|
2662
2662
|
constructor(e, n, r, o) {
|
|
@@ -2675,19 +2675,19 @@ class Gp {
|
|
|
2675
2675
|
node: i,
|
|
2676
2676
|
pos: s,
|
|
2677
2677
|
addAttr: !!(this.target && !this.target.draggable),
|
|
2678
|
-
setUneditable: !!(this.target &&
|
|
2678
|
+
setUneditable: !!(this.target && Ge && !this.target.hasAttribute("contentEditable"))
|
|
2679
2679
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
2680
2680
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
2681
|
-
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)),
|
|
2681
|
+
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), Rt(e, "pointer");
|
|
2682
2682
|
}
|
|
2683
2683
|
done() {
|
|
2684
|
-
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() =>
|
|
2684
|
+
this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => kt(this.view)), this.view.input.mouseDown = null;
|
|
2685
2685
|
}
|
|
2686
2686
|
up(e) {
|
|
2687
2687
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
2688
2688
|
return;
|
|
2689
2689
|
let n = this.pos;
|
|
2690
|
-
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ro(e))), this.updateAllowDefault(e), this.allowDefault || !n ?
|
|
2690
|
+
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ro(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Rt(this.view, "pointer") : Kp(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
2691
2691
|
Me && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
2692
2692
|
// cursor, but still report that the node is selected
|
|
2693
2693
|
// when asked through getSelection. You'll then get a
|
|
@@ -2695,33 +2695,33 @@ class Gp {
|
|
|
2695
2695
|
// (hidden) cursor is doesn't change the selection, and
|
|
2696
2696
|
// thus doesn't get a reaction from ProseMirror. This
|
|
2697
2697
|
// works around that.
|
|
2698
|
-
we && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (An(this.view, J.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) :
|
|
2698
|
+
we && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (An(this.view, J.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : Rt(this.view, "pointer");
|
|
2699
2699
|
}
|
|
2700
2700
|
move(e) {
|
|
2701
|
-
this.updateAllowDefault(e),
|
|
2701
|
+
this.updateAllowDefault(e), Rt(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
2702
2702
|
}
|
|
2703
2703
|
updateAllowDefault(e) {
|
|
2704
2704
|
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
2707
2707
|
Ae.touchstart = (t) => {
|
|
2708
|
-
t.input.lastTouch = Date.now(), Cs(t),
|
|
2708
|
+
t.input.lastTouch = Date.now(), Cs(t), Rt(t, "pointer");
|
|
2709
2709
|
};
|
|
2710
2710
|
Ae.touchmove = (t) => {
|
|
2711
|
-
t.input.lastTouch = Date.now(),
|
|
2711
|
+
t.input.lastTouch = Date.now(), Rt(t, "pointer");
|
|
2712
2712
|
};
|
|
2713
2713
|
Ae.contextmenu = (t) => Cs(t);
|
|
2714
2714
|
function Dc(t, e) {
|
|
2715
2715
|
return t.composing ? !0 : Me && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
|
|
2716
2716
|
}
|
|
2717
|
-
const Zp =
|
|
2717
|
+
const Zp = bt ? 5e3 : -1;
|
|
2718
2718
|
Oe.compositionstart = Oe.compositionupdate = (t) => {
|
|
2719
2719
|
if (!t.composing) {
|
|
2720
2720
|
t.domObserver.flush();
|
|
2721
2721
|
let { state: e } = t, n = e.selection.$to;
|
|
2722
2722
|
if (e.selection instanceof V && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
|
|
2723
2723
|
t.markCursor = t.state.storedMarks || n.marks(), mo(t, !0), t.markCursor = null;
|
|
2724
|
-
else if (mo(t, !e.selection.empty),
|
|
2724
|
+
else if (mo(t, !e.selection.empty), Ge && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
|
|
2725
2725
|
let r = t.domSelectionRange();
|
|
2726
2726
|
for (let o = r.focusNode, i = r.focusOffset; o && o.nodeType == 1 && i != 0; ) {
|
|
2727
2727
|
let s = i < 0 ? o.lastChild : o.childNodes[i - 1];
|
|
@@ -2773,7 +2773,7 @@ function eh() {
|
|
|
2773
2773
|
return t.initEvent("event", !0, !0), t.timeStamp;
|
|
2774
2774
|
}
|
|
2775
2775
|
function mo(t, e = !1) {
|
|
2776
|
-
if (!(
|
|
2776
|
+
if (!(bt && t.domObserver.flushingSoon >= 0)) {
|
|
2777
2777
|
if (t.domObserver.forceFlush(), Ec(t), e || t.docView && t.docView.dirty) {
|
|
2778
2778
|
let n = ys(t);
|
|
2779
2779
|
return n && !n.eq(t.state.selection) ? t.dispatch(t.state.tr.setSelection(n)) : (t.markCursor || e) && !t.state.selection.empty ? t.dispatch(t.state.tr.deleteSelection()) : t.updateState(t.state), !0;
|
|
@@ -2791,7 +2791,7 @@ function th(t, e) {
|
|
|
2791
2791
|
n.parentNode && n.parentNode.removeChild(n), t.focus();
|
|
2792
2792
|
}, 50);
|
|
2793
2793
|
}
|
|
2794
|
-
const dr = Te &&
|
|
2794
|
+
const dr = Te && Ft < 15 || Tn && Gf < 604;
|
|
2795
2795
|
Ae.copy = Oe.cut = (t, e) => {
|
|
2796
2796
|
let n = e, r = t.state.selection, o = n.type == "cut";
|
|
2797
2797
|
if (r.empty)
|
|
@@ -2830,7 +2830,7 @@ function Ic(t) {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
Oe.paste = (t, e) => {
|
|
2832
2832
|
let n = e;
|
|
2833
|
-
if (t.composing && !
|
|
2833
|
+
if (t.composing && !bt)
|
|
2834
2834
|
return;
|
|
2835
2835
|
let r = dr ? null : n.clipboardData, o = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
2836
2836
|
r && ur(t, Ic(r), r.getData("text/html"), o, n) ? n.preventDefault() : rh(t, n);
|
|
@@ -2908,7 +2908,7 @@ Oe.drop = (t, e) => {
|
|
|
2908
2908
|
};
|
|
2909
2909
|
Ae.focus = (t) => {
|
|
2910
2910
|
t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
|
|
2911
|
-
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) &&
|
|
2911
|
+
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && kt(t);
|
|
2912
2912
|
}, 20));
|
|
2913
2913
|
};
|
|
2914
2914
|
Ae.blur = (t, e) => {
|
|
@@ -2916,7 +2916,7 @@ Ae.blur = (t, e) => {
|
|
|
2916
2916
|
t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
|
|
2917
2917
|
};
|
|
2918
2918
|
Ae.beforeinput = (t, e) => {
|
|
2919
|
-
if (we &&
|
|
2919
|
+
if (we && bt && e.inputType == "deleteContentBackward") {
|
|
2920
2920
|
t.domObserver.flushSoon();
|
|
2921
2921
|
let { domChangeCount: r } = t.input;
|
|
2922
2922
|
setTimeout(() => {
|
|
@@ -2958,7 +2958,7 @@ class go {
|
|
|
2958
2958
|
this.spec.destroy && this.spec.destroy(e);
|
|
2959
2959
|
}
|
|
2960
2960
|
}
|
|
2961
|
-
class
|
|
2961
|
+
class _t {
|
|
2962
2962
|
constructor(e, n) {
|
|
2963
2963
|
this.attrs = e, this.spec = n || nn;
|
|
2964
2964
|
}
|
|
@@ -2970,10 +2970,10 @@ class Bt {
|
|
|
2970
2970
|
return n.from < n.to;
|
|
2971
2971
|
}
|
|
2972
2972
|
eq(e) {
|
|
2973
|
-
return this == e || e instanceof
|
|
2973
|
+
return this == e || e instanceof _t && fr(this.attrs, e.attrs) && fr(this.spec, e.spec);
|
|
2974
2974
|
}
|
|
2975
2975
|
static is(e) {
|
|
2976
|
-
return e.type instanceof
|
|
2976
|
+
return e.type instanceof _t;
|
|
2977
2977
|
}
|
|
2978
2978
|
destroy() {
|
|
2979
2979
|
}
|
|
@@ -3040,7 +3040,7 @@ class z {
|
|
|
3040
3040
|
each inline node between `from` and `to`.
|
|
3041
3041
|
*/
|
|
3042
3042
|
static inline(e, n, r, o) {
|
|
3043
|
-
return new z(e, n, new
|
|
3043
|
+
return new z(e, n, new _t(r, o));
|
|
3044
3044
|
}
|
|
3045
3045
|
/**
|
|
3046
3046
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -3061,7 +3061,7 @@ class z {
|
|
|
3061
3061
|
@internal
|
|
3062
3062
|
*/
|
|
3063
3063
|
get inline() {
|
|
3064
|
-
return this.type instanceof
|
|
3064
|
+
return this.type instanceof _t;
|
|
3065
3065
|
}
|
|
3066
3066
|
/**
|
|
3067
3067
|
@internal
|
|
@@ -3192,14 +3192,14 @@ class F {
|
|
|
3192
3192
|
let i = e + 1, s = i + n.content.size;
|
|
3193
3193
|
for (let a = 0; a < this.local.length; a++) {
|
|
3194
3194
|
let l = this.local[a];
|
|
3195
|
-
if (l.from < s && l.to > i && l.type instanceof
|
|
3195
|
+
if (l.from < s && l.to > i && l.type instanceof _t) {
|
|
3196
3196
|
let c = Math.max(i, l.from) - i, d = Math.min(s, l.to) - i;
|
|
3197
3197
|
c < d && (o || (o = [])).push(l.copy(c, d));
|
|
3198
3198
|
}
|
|
3199
3199
|
}
|
|
3200
3200
|
if (o) {
|
|
3201
3201
|
let a = new F(o.sort(rn), Cn);
|
|
3202
|
-
return r ? new
|
|
3202
|
+
return r ? new It([a, r]) : a;
|
|
3203
3203
|
}
|
|
3204
3204
|
return r || be;
|
|
3205
3205
|
}
|
|
@@ -3231,11 +3231,11 @@ class F {
|
|
|
3231
3231
|
localsInner(e) {
|
|
3232
3232
|
if (this == be)
|
|
3233
3233
|
return Cn;
|
|
3234
|
-
if (e.inlineContent || !this.local.some(
|
|
3234
|
+
if (e.inlineContent || !this.local.some(_t.is))
|
|
3235
3235
|
return this.local;
|
|
3236
3236
|
let n = [];
|
|
3237
3237
|
for (let r = 0; r < this.local.length; r++)
|
|
3238
|
-
this.local[r].type instanceof
|
|
3238
|
+
this.local[r].type instanceof _t || n.push(this.local[r]);
|
|
3239
3239
|
return n;
|
|
3240
3240
|
}
|
|
3241
3241
|
forEachSet(e) {
|
|
@@ -3245,13 +3245,13 @@ class F {
|
|
|
3245
3245
|
F.empty = new F([], []);
|
|
3246
3246
|
F.removeOverlap = xs;
|
|
3247
3247
|
const be = F.empty;
|
|
3248
|
-
class
|
|
3248
|
+
class It {
|
|
3249
3249
|
constructor(e) {
|
|
3250
3250
|
this.members = e;
|
|
3251
3251
|
}
|
|
3252
3252
|
map(e, n) {
|
|
3253
3253
|
const r = this.members.map((o) => o.map(e, n, nn));
|
|
3254
|
-
return
|
|
3254
|
+
return It.from(r);
|
|
3255
3255
|
}
|
|
3256
3256
|
forChild(e, n) {
|
|
3257
3257
|
if (n.isLeaf)
|
|
@@ -3259,12 +3259,12 @@ class Et {
|
|
|
3259
3259
|
let r = [];
|
|
3260
3260
|
for (let o = 0; o < this.members.length; o++) {
|
|
3261
3261
|
let i = this.members[o].forChild(e, n);
|
|
3262
|
-
i != be && (i instanceof
|
|
3262
|
+
i != be && (i instanceof It ? r = r.concat(i.members) : r.push(i));
|
|
3263
3263
|
}
|
|
3264
|
-
return
|
|
3264
|
+
return It.from(r);
|
|
3265
3265
|
}
|
|
3266
3266
|
eq(e) {
|
|
3267
|
-
if (!(e instanceof
|
|
3267
|
+
if (!(e instanceof It) || e.members.length != this.members.length)
|
|
3268
3268
|
return !1;
|
|
3269
3269
|
for (let n = 0; n < this.members.length; n++)
|
|
3270
3270
|
if (!this.members[n].eq(e.members[n]))
|
|
@@ -3295,7 +3295,7 @@ class Et {
|
|
|
3295
3295
|
case 1:
|
|
3296
3296
|
return e[0];
|
|
3297
3297
|
default:
|
|
3298
|
-
return new
|
|
3298
|
+
return new It(e.every((n) => n instanceof F) ? e : e.reduce((n, r) => n.concat(r instanceof F ? r : r.members), []));
|
|
3299
3299
|
}
|
|
3300
3300
|
}
|
|
3301
3301
|
forEachSet(e) {
|
|
@@ -3435,7 +3435,7 @@ function ti(t) {
|
|
|
3435
3435
|
return t.someProp("decorations", (n) => {
|
|
3436
3436
|
let r = n(t.state);
|
|
3437
3437
|
r && r != be && e.push(r);
|
|
3438
|
-
}), t.cursorWrapper && e.push(F.create(t.state.doc, [t.cursorWrapper.deco])),
|
|
3438
|
+
}), t.cursorWrapper && e.push(F.create(t.state.doc, [t.cursorWrapper.deco])), It.from(e);
|
|
3439
3439
|
}
|
|
3440
3440
|
const ah = {
|
|
3441
3441
|
childList: !0,
|
|
@@ -3444,7 +3444,7 @@ const ah = {
|
|
|
3444
3444
|
attributes: !0,
|
|
3445
3445
|
attributeOldValue: !0,
|
|
3446
3446
|
subtree: !0
|
|
3447
|
-
}, lh = Te &&
|
|
3447
|
+
}, lh = Te && Ft <= 11;
|
|
3448
3448
|
class ch {
|
|
3449
3449
|
constructor() {
|
|
3450
3450
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
@@ -3464,7 +3464,7 @@ class dh {
|
|
|
3464
3464
|
this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new ch(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
|
|
3465
3465
|
for (let o = 0; o < r.length; o++)
|
|
3466
3466
|
this.queue.push(r[o]);
|
|
3467
|
-
Te &&
|
|
3467
|
+
Te && Ft <= 11 && r.some((o) => o.type == "childList" && o.removedNodes.length || o.type == "characterData" && o.oldValue.length > o.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
3468
3468
|
}), lh && (this.onCharData = (r) => {
|
|
3469
3469
|
this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
|
|
3470
3470
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
@@ -3504,8 +3504,8 @@ class dh {
|
|
|
3504
3504
|
onSelectionChange() {
|
|
3505
3505
|
if (wa(this.view)) {
|
|
3506
3506
|
if (this.suppressingSelectionUpdates)
|
|
3507
|
-
return
|
|
3508
|
-
if (Te &&
|
|
3507
|
+
return kt(this.view);
|
|
3508
|
+
if (Te && Ft <= 11 && !this.view.state.selection.empty) {
|
|
3509
3509
|
let e = this.view.domSelectionRange();
|
|
3510
3510
|
if (e.focusNode && ln(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
3511
3511
|
return this.flushSoon();
|
|
@@ -3552,7 +3552,7 @@ class dh {
|
|
|
3552
3552
|
let u = this.registerMutation(n[d], l);
|
|
3553
3553
|
u && (i = i < 0 ? u.from : Math.min(u.from, i), s = s < 0 ? u.to : Math.max(u.to, s), u.typeOver && (a = !0));
|
|
3554
3554
|
}
|
|
3555
|
-
if (
|
|
3555
|
+
if (Ge && l.length) {
|
|
3556
3556
|
let d = l.filter((u) => u.nodeName == "BR");
|
|
3557
3557
|
if (d.length == 2) {
|
|
3558
3558
|
let [u, f] = d;
|
|
@@ -3566,7 +3566,7 @@ class dh {
|
|
|
3566
3566
|
}
|
|
3567
3567
|
}
|
|
3568
3568
|
let c = null;
|
|
3569
|
-
i < 0 && o && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Io(r) && (c = ys(e)) && c.eq(J.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0,
|
|
3569
|
+
i < 0 && o && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Io(r) && (c = ys(e)) && c.eq(J.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, kt(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || o) && (i > -1 && (e.docView.markDirty(i, s), uh(e)), this.handleDOMChange(i, s, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || kt(e), this.currentSelection.set(r));
|
|
3570
3570
|
}
|
|
3571
3571
|
registerMutation(e, n) {
|
|
3572
3572
|
if (n.indexOf(e.target) > -1)
|
|
@@ -3583,7 +3583,7 @@ class dh {
|
|
|
3583
3583
|
if (r.contentDOM && r.contentDOM != r.dom && !r.contentDOM.contains(e.target))
|
|
3584
3584
|
return { from: r.posBefore, to: r.posAfter };
|
|
3585
3585
|
let o = e.previousSibling, i = e.nextSibling;
|
|
3586
|
-
if (Te &&
|
|
3586
|
+
if (Te && Ft <= 11 && e.addedNodes.length)
|
|
3587
3587
|
for (let d = 0; d < e.addedNodes.length; d++) {
|
|
3588
3588
|
let { previousSibling: u, nextSibling: f } = e.addedNodes[d];
|
|
3589
3589
|
(!u || Array.prototype.indexOf.call(e.addedNodes, u) < 0) && (o = u), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (i = f);
|
|
@@ -3604,7 +3604,7 @@ class dh {
|
|
|
3604
3604
|
let Ta = /* @__PURE__ */ new WeakMap(), Da = !1;
|
|
3605
3605
|
function uh(t) {
|
|
3606
3606
|
if (!Ta.has(t) && (Ta.set(t, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace) !== -1)) {
|
|
3607
|
-
if (t.requiresGeckoHackNode =
|
|
3607
|
+
if (t.requiresGeckoHackNode = Ge, Da)
|
|
3608
3608
|
return;
|
|
3609
3609
|
console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Da = !0;
|
|
3610
3610
|
}
|
|
@@ -3682,7 +3682,7 @@ function yh(t, e, n, r, o) {
|
|
|
3682
3682
|
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
3683
3683
|
let x = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, $ = ys(t, x);
|
|
3684
3684
|
if ($ && !t.state.selection.eq($)) {
|
|
3685
|
-
if (we &&
|
|
3685
|
+
if (we && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (U) => U(t, Zt(13, "Enter"))))
|
|
3686
3686
|
return;
|
|
3687
3687
|
let _ = t.state.tr.setSelection($);
|
|
3688
3688
|
x == "pointer" ? _.setMeta("pointer", !0) : x == "key" && _.scrollIntoView(), i && _.setMeta("composition", i), t.dispatch(_);
|
|
@@ -3694,7 +3694,7 @@ function yh(t, e, n, r, o) {
|
|
|
3694
3694
|
let l = t.state.selection, c = hh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
|
|
3695
3695
|
t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, p = "end") : (f = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
|
|
3696
3696
|
let h = vh(u.content, c.doc.content, c.from, f, p);
|
|
3697
|
-
if (h && t.input.domChangeCount++, (Tn && t.input.lastIOSEnter > Date.now() - 225 ||
|
|
3697
|
+
if (h && t.input.domChangeCount++, (Tn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((x) => x.nodeType == 1 && !gh.test(x.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (x) => x(t, Zt(13, "Enter")))) {
|
|
3698
3698
|
t.input.lastIOSEnter = 0;
|
|
3699
3699
|
return;
|
|
3700
3700
|
}
|
|
@@ -3711,17 +3711,17 @@ function yh(t, e, n, r, o) {
|
|
|
3711
3711
|
}
|
|
3712
3712
|
return;
|
|
3713
3713
|
}
|
|
3714
|
-
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof V && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), Te &&
|
|
3714
|
+
t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof V && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), Te && Ft <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == " " && (h.start--, h.endA--, h.endB--);
|
|
3715
3715
|
let m = c.doc.resolveNoCache(h.start - c.from), g = c.doc.resolveNoCache(h.endB - c.from), b = d.resolve(h.start), w = m.sameParent(g) && m.parent.inlineContent && b.end() >= h.endA, C;
|
|
3716
3716
|
if ((Tn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((x) => x.nodeName == "DIV" || x.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = J.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (x) => x(t, Zt(13, "Enter")))) {
|
|
3717
3717
|
t.input.lastIOSEnter = 0;
|
|
3718
3718
|
return;
|
|
3719
3719
|
}
|
|
3720
3720
|
if (t.state.selection.anchor > h.start && wh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (x) => x(t, Zt(8, "Backspace")))) {
|
|
3721
|
-
|
|
3721
|
+
bt && we && t.domObserver.suppressSelectionUpdates();
|
|
3722
3722
|
return;
|
|
3723
3723
|
}
|
|
3724
|
-
we && h.endB == h.start && (t.input.lastChromeDelete = Date.now()),
|
|
3724
|
+
we && h.endB == h.start && (t.input.lastChromeDelete = Date.now()), bt && !w && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == h.endA && (h.endB -= 2, g = c.doc.resolveNoCache(h.endB - c.from), setTimeout(() => {
|
|
3725
3725
|
t.someProp("handleKeyDown", function(x) {
|
|
3726
3726
|
return x(t, Zt(13, "Enter"));
|
|
3727
3727
|
});
|
|
@@ -3729,7 +3729,7 @@ function yh(t, e, n, r, o) {
|
|
|
3729
3729
|
let y = h.start, S = h.endA, k, M, L;
|
|
3730
3730
|
if (w) {
|
|
3731
3731
|
if (m.pos == g.pos)
|
|
3732
|
-
Te &&
|
|
3732
|
+
Te && Ft <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => kt(t), 20)), k = t.state.tr.delete(y, S), M = d.resolve(h.start).marksAcross(d.resolve(h.endA));
|
|
3733
3733
|
else if (
|
|
3734
3734
|
// Adding or removing a mark
|
|
3735
3735
|
h.endA == h.endB && (L = bh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
|
|
@@ -3903,7 +3903,7 @@ class _c {
|
|
|
3903
3903
|
let h = we ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
3904
3904
|
this.composing && (this.input.compositionNode = Qp(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = pa(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
|
|
3905
3905
|
}
|
|
3906
|
-
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && xp(this)) ?
|
|
3906
|
+
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && xp(this)) ? kt(this, p) : (wc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
3907
3907
|
}
|
|
3908
3908
|
this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && tp(f);
|
|
3909
3909
|
}
|
|
@@ -3992,7 +3992,7 @@ class _c {
|
|
|
3992
3992
|
Focus the editor.
|
|
3993
3993
|
*/
|
|
3994
3994
|
focus() {
|
|
3995
|
-
this.domObserver.stop(), this.editable && np(this.dom),
|
|
3995
|
+
this.domObserver.stop(), this.editable && np(this.dom), kt(this), this.domObserver.start();
|
|
3996
3996
|
}
|
|
3997
3997
|
/**
|
|
3998
3998
|
Get the document root in which the editor exists. This will
|
|
@@ -4211,7 +4211,7 @@ function Ba(t) {
|
|
|
4211
4211
|
if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
|
|
4212
4212
|
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
4213
4213
|
}
|
|
4214
|
-
const pr = Math.floor, Sh = Math.abs,
|
|
4214
|
+
const pr = Math.floor, Sh = Math.abs, zt = (t, e) => t < e ? t : e, Dn = (t, e) => t > e ? t : e, xh = (t) => t !== 0 ? t < 0 : 1 / t < 0, Mh = 64, hr = 128, Ah = 1 << 29, _a = 63, tr = 127, Oh = 2147483647, Th = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && pr(t) === t), Dh = () => /* @__PURE__ */ new Set(), Nh = Array.isArray, Eh = String.fromCharCode, Ih = (t) => t.toLowerCase(), Ph = /^\s*/g, Rh = (t) => t.replace(Ph, ""), Lh = /([A-Z])/g, za = (t, e) => Rh(t.replace(Lh, (n) => `${e}${Ih(n)}`)), Fh = (t) => {
|
|
4215
4215
|
const e = unescape(encodeURIComponent(t)), n = e.length, r = new Uint8Array(n);
|
|
4216
4216
|
for (let o = 0; o < n; o++)
|
|
4217
4217
|
r[o] = /** @type {number} */
|
|
@@ -4277,7 +4277,7 @@ const $h = () => new zh(), Vh = (t) => {
|
|
|
4277
4277
|
);
|
|
4278
4278
|
}, $a = mr && /** @type {any} */
|
|
4279
4279
|
mr.encodeInto ? Kh : Xh, Jh = (t, e) => {
|
|
4280
|
-
const n = t.cbuf.length, r = t.cpos, o =
|
|
4280
|
+
const n = t.cbuf.length, r = t.cpos, o = zt(n - r, e.length), i = e.length - o;
|
|
4281
4281
|
t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(Dn(n * 2, i)), t.cbuf.set(e.subarray(o)), t.cpos = i);
|
|
4282
4282
|
}, zc = (t, e) => {
|
|
4283
4283
|
gr(t, e.byteLength), Jh(t, e);
|
|
@@ -4359,7 +4359,7 @@ mr.encodeInto ? Kh : Xh, Jh = (t, e) => {
|
|
|
4359
4359
|
remove: t.length - n - r,
|
|
4360
4360
|
insert: e.slice(n, e.length - r)
|
|
4361
4361
|
};
|
|
4362
|
-
}, lm = am, te = new G("y-sync"),
|
|
4362
|
+
}, lm = am, te = new G("y-sync"), $t = new G("y-undo"), Ur = new G("yjs-cursor"), cm = Math.random, dm = (t) => t[pr(cm() * t.length)], Ha = (t) => t === void 0 ? null : t;
|
|
4363
4363
|
class um {
|
|
4364
4364
|
constructor() {
|
|
4365
4365
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -4384,25 +4384,25 @@ try {
|
|
|
4384
4384
|
} catch {
|
|
4385
4385
|
}
|
|
4386
4386
|
const pm = jc, Nn = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Wc = typeof window < "u" && typeof document < "u" && !Nn;
|
|
4387
|
-
let
|
|
4387
|
+
let et;
|
|
4388
4388
|
const hm = () => {
|
|
4389
|
-
if (
|
|
4389
|
+
if (et === void 0)
|
|
4390
4390
|
if (Nn) {
|
|
4391
|
-
|
|
4391
|
+
et = oo();
|
|
4392
4392
|
const t = ie.argv;
|
|
4393
4393
|
let e = null;
|
|
4394
4394
|
for (let n = 0; n < t.length; n++) {
|
|
4395
4395
|
const r = t[n];
|
|
4396
|
-
r[0] === "-" ? (e !== null &&
|
|
4396
|
+
r[0] === "-" ? (e !== null && et.set(e, ""), e = r) : e !== null && (et.set(e, r), e = null);
|
|
4397
4397
|
}
|
|
4398
|
-
e !== null &&
|
|
4399
|
-
} else typeof location == "object" ? (
|
|
4398
|
+
e !== null && et.set(e, "");
|
|
4399
|
+
} else typeof location == "object" ? (et = oo(), (location.search || "?").slice(1).split("&").forEach((t) => {
|
|
4400
4400
|
if (t.length !== 0) {
|
|
4401
4401
|
const [e, n] = t.split("=");
|
|
4402
|
-
|
|
4402
|
+
et.set(`--${za(e, "-")}`, n), et.set(`-${za(e, "-")}`, n);
|
|
4403
4403
|
}
|
|
4404
|
-
})) :
|
|
4405
|
-
return
|
|
4404
|
+
})) : et = oo();
|
|
4405
|
+
return et;
|
|
4406
4406
|
}, Ei = (t) => hm().has(t), Ii = (t) => Ha(Nn ? ie.env[t.toUpperCase().replaceAll("-", "_")] : pm.getItem(t)), Uc = (t) => Ei("--" + t) || Ii(t) !== null;
|
|
4407
4407
|
Uc("production");
|
|
4408
4408
|
const mm = Nn && rm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
@@ -4423,7 +4423,7 @@ const ym = (t) => class {
|
|
|
4423
4423
|
destroy() {
|
|
4424
4424
|
t(this._);
|
|
4425
4425
|
}
|
|
4426
|
-
}, bm = ym(clearTimeout), As = (t, e) => new bm(setTimeout(e, t)),
|
|
4426
|
+
}, bm = ym(clearTimeout), As = (t, e) => new bm(setTimeout(e, t)), ot = (t, e) => t >>> e | t << 32 - e, wm = (t) => ot(t, 2) ^ ot(t, 13) ^ ot(t, 22), vm = (t) => ot(t, 6) ^ ot(t, 11) ^ ot(t, 25), km = (t) => ot(t, 7) ^ ot(t, 18) ^ t >>> 3, Cm = (t) => ot(t, 17) ^ ot(t, 19) ^ t >>> 10, Sm = new Uint32Array([
|
|
4427
4427
|
1116352408,
|
|
4428
4428
|
1899447441,
|
|
4429
4429
|
3049323471,
|
|
@@ -4637,7 +4637,7 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Rm = [{ light: "
|
|
|
4637
4637
|
c.state.doc.type.createAndFill().content
|
|
4638
4638
|
) !== null)) {
|
|
4639
4639
|
if (s = !0, d.addToHistory === !1 && !d.isChangeOrigin) {
|
|
4640
|
-
const u =
|
|
4640
|
+
const u = $t.getState(c.state), f = u && u.undoManager;
|
|
4641
4641
|
f && f.stopCapturing();
|
|
4642
4642
|
}
|
|
4643
4643
|
a.mux(() => {
|
|
@@ -4764,7 +4764,7 @@ class _m {
|
|
|
4764
4764
|
new H(E.from(n), 0, 0)
|
|
4765
4765
|
);
|
|
4766
4766
|
if (e) {
|
|
4767
|
-
const o =
|
|
4767
|
+
const o = zt(Dn(e.anchor, 0), r.doc.content.size), i = zt(Dn(e.head, 0), r.doc.content.size);
|
|
4768
4768
|
r.setSelection(V.create(r.doc, o, i));
|
|
4769
4769
|
}
|
|
4770
4770
|
this.prosemirrorView.dispatch(
|
|
@@ -5057,7 +5057,7 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5057
5057
|
}, wo = (t, e) => t === e || t instanceof Array && e instanceof Array && t.length === e.length && t.every(
|
|
5058
5058
|
(n, r) => e[r] === n
|
|
5059
5059
|
), Wa = (t, e, n) => {
|
|
5060
|
-
const r = t.toArray(), o = Lo(e), i = o.length, s = r.length, a =
|
|
5060
|
+
const r = t.toArray(), o = Lo(e), i = o.length, s = r.length, a = zt(s, i);
|
|
5061
5061
|
let l = 0, c = 0, d = !1;
|
|
5062
5062
|
for (; l < a; l++) {
|
|
5063
5063
|
const u = r[l], f = o[l];
|
|
@@ -5124,7 +5124,7 @@ const qc = (t, e, n, r, o, i) => {
|
|
|
5124
5124
|
for (const p in u)
|
|
5125
5125
|
f[p] === void 0 && e.removeAttribute(p);
|
|
5126
5126
|
}
|
|
5127
|
-
const o = Lo(n), i = o.length, s = e.toArray(), a = s.length, l =
|
|
5127
|
+
const o = Lo(n), i = o.length, s = e.toArray(), a = s.length, l = zt(i, a);
|
|
5128
5128
|
let c = 0, d = 0;
|
|
5129
5129
|
for (; c < l; c++) {
|
|
5130
5130
|
const u = s[c], f = o[c];
|
|
@@ -5354,13 +5354,13 @@ const qm = () => {
|
|
|
5354
5354
|
);
|
|
5355
5355
|
if (u !== null && f !== null) {
|
|
5356
5356
|
const p = Dn(t.doc.content.size - 1, 0);
|
|
5357
|
-
u =
|
|
5357
|
+
u = zt(u, p), f = zt(f, p), a.push(
|
|
5358
5358
|
z.widget(f, () => r(d, c), {
|
|
5359
5359
|
key: c + "",
|
|
5360
5360
|
side: 10
|
|
5361
5361
|
})
|
|
5362
5362
|
);
|
|
5363
|
-
const h =
|
|
5363
|
+
const h = zt(u, f), m = Dn(u, f);
|
|
5364
5364
|
a.push(
|
|
5365
5365
|
z.inline(h, m, o(d, c), {
|
|
5366
5366
|
inclusiveEnd: !0,
|
|
@@ -5441,15 +5441,15 @@ const qm = () => {
|
|
|
5441
5441
|
};
|
|
5442
5442
|
}
|
|
5443
5443
|
}), ng = (t) => {
|
|
5444
|
-
const e =
|
|
5444
|
+
const e = $t.getState(t).undoManager;
|
|
5445
5445
|
if (e != null)
|
|
5446
5446
|
return e.undo(), !0;
|
|
5447
5447
|
}, rg = (t) => {
|
|
5448
|
-
const e =
|
|
5448
|
+
const e = $t.getState(t).undoManager;
|
|
5449
5449
|
if (e != null)
|
|
5450
5450
|
return e.redo(), !0;
|
|
5451
5451
|
}, og = /* @__PURE__ */ new Set(["paragraph"]), ig = (t, e) => !(t instanceof hf) || !(t.content instanceof mf) || !(t.content.type instanceof gf || t.content.type instanceof yf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, sg = ({ protectedNodes: t = og, trackedOrigins: e = [], undoManager: n = null } = {}) => new Z({
|
|
5452
|
-
key:
|
|
5452
|
+
key: $t,
|
|
5453
5453
|
state: {
|
|
5454
5454
|
init: (r, o) => {
|
|
5455
5455
|
const i = te.getState(o), s = n || new pf(i.type, {
|
|
@@ -5481,10 +5481,10 @@ const qm = () => {
|
|
|
5481
5481
|
}
|
|
5482
5482
|
},
|
|
5483
5483
|
view: (r) => {
|
|
5484
|
-
const o = te.getState(r.state), i =
|
|
5484
|
+
const o = te.getState(r.state), i = $t.getState(r.state).undoManager;
|
|
5485
5485
|
return i.on("stack-item-added", ({ stackItem: s }) => {
|
|
5486
5486
|
const a = o.binding;
|
|
5487
|
-
a && s.meta.set(a,
|
|
5487
|
+
a && s.meta.set(a, $t.getState(r.state).prevSel);
|
|
5488
5488
|
}), i.on("stack-item-popped", ({ stackItem: s }) => {
|
|
5489
5489
|
const a = o.binding;
|
|
5490
5490
|
a && (a.beforeTransactionSelection = s.meta.get(a) || a.beforeTransactionSelection);
|
|
@@ -5495,10 +5495,10 @@ const qm = () => {
|
|
|
5495
5495
|
};
|
|
5496
5496
|
}
|
|
5497
5497
|
});
|
|
5498
|
-
var
|
|
5498
|
+
var nt;
|
|
5499
5499
|
class ag {
|
|
5500
5500
|
constructor() {
|
|
5501
|
-
|
|
5501
|
+
ft(this, nt, /* @__PURE__ */ new Map());
|
|
5502
5502
|
}
|
|
5503
5503
|
/**
|
|
5504
5504
|
* Subscribe to the event.
|
|
@@ -5506,8 +5506,8 @@ class ag {
|
|
|
5506
5506
|
* @param fn Callback.
|
|
5507
5507
|
*/
|
|
5508
5508
|
on(e, n) {
|
|
5509
|
-
const r =
|
|
5510
|
-
r ? r.push(n) :
|
|
5509
|
+
const r = Qe(this, nt).get(e);
|
|
5510
|
+
r ? r.push(n) : Qe(this, nt).set(e, [n]);
|
|
5511
5511
|
}
|
|
5512
5512
|
/**
|
|
5513
5513
|
* Emit event.
|
|
@@ -5515,7 +5515,7 @@ class ag {
|
|
|
5515
5515
|
* @param args Arguments.
|
|
5516
5516
|
*/
|
|
5517
5517
|
emit(e, ...n) {
|
|
5518
|
-
const r =
|
|
5518
|
+
const r = Qe(this, nt).get(e);
|
|
5519
5519
|
if (r)
|
|
5520
5520
|
for (const o of r)
|
|
5521
5521
|
o.apply(this, n);
|
|
@@ -5527,21 +5527,21 @@ class ag {
|
|
|
5527
5527
|
* @param fn Callback.
|
|
5528
5528
|
*/
|
|
5529
5529
|
off(e, n) {
|
|
5530
|
-
const r =
|
|
5531
|
-
r && (n ?
|
|
5530
|
+
const r = Qe(this, nt).get(e);
|
|
5531
|
+
r && (n ? Qe(this, nt).set(
|
|
5532
5532
|
e,
|
|
5533
5533
|
r.filter((o) => o !== n)
|
|
5534
|
-
) :
|
|
5534
|
+
) : Qe(this, nt).delete(e));
|
|
5535
5535
|
}
|
|
5536
5536
|
/**
|
|
5537
5537
|
* Remove all registered events and subscriptions.
|
|
5538
5538
|
*/
|
|
5539
5539
|
removeAllListeners() {
|
|
5540
|
-
jo(this,
|
|
5540
|
+
jo(this, nt, /* @__PURE__ */ new Map());
|
|
5541
5541
|
}
|
|
5542
5542
|
}
|
|
5543
|
-
|
|
5544
|
-
var
|
|
5543
|
+
nt = new WeakMap();
|
|
5544
|
+
var Ht = {
|
|
5545
5545
|
8: "Backspace",
|
|
5546
5546
|
9: "Tab",
|
|
5547
5547
|
10: "Enter",
|
|
@@ -5620,13 +5620,13 @@ var Vt = {
|
|
|
5620
5620
|
221: "}",
|
|
5621
5621
|
222: '"'
|
|
5622
5622
|
}, lg = typeof navigator < "u" && /Mac/.test(navigator.platform), cg = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
5623
|
-
for (var ye = 0; ye < 10; ye++)
|
|
5624
|
-
for (var ye = 1; ye <= 24; ye++)
|
|
5623
|
+
for (var ye = 0; ye < 10; ye++) Ht[48 + ye] = Ht[96 + ye] = String(ye);
|
|
5624
|
+
for (var ye = 1; ye <= 24; ye++) Ht[ye + 111] = "F" + ye;
|
|
5625
5625
|
for (var ye = 65; ye <= 90; ye++)
|
|
5626
|
-
|
|
5627
|
-
for (var oi in
|
|
5626
|
+
Ht[ye] = String.fromCharCode(ye + 32), ko[ye] = String.fromCharCode(ye);
|
|
5627
|
+
for (var oi in Ht) ko.hasOwnProperty(oi) || (ko[oi] = Ht[oi]);
|
|
5628
5628
|
function dg(t) {
|
|
5629
|
-
var e = lg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || cg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? ko :
|
|
5629
|
+
var e = lg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || cg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? ko : Ht)[t.keyCode] || t.key || "Unidentified";
|
|
5630
5630
|
return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
|
|
5631
5631
|
}
|
|
5632
5632
|
const ug = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
|
|
@@ -5675,7 +5675,7 @@ function Ts(t) {
|
|
|
5675
5675
|
if (a && a(n.state, n.dispatch, n))
|
|
5676
5676
|
return !0;
|
|
5677
5677
|
}
|
|
5678
|
-
if ((r.shiftKey || r.altKey || r.metaKey || o.charCodeAt(0) > 127) && (i =
|
|
5678
|
+
if ((r.shiftKey || r.altKey || r.metaKey || o.charCodeAt(0) > 127) && (i = Ht[r.keyCode]) && i != o) {
|
|
5679
5679
|
let a = e[ii(i, r)];
|
|
5680
5680
|
if (a && a(n.state, n.dispatch, n))
|
|
5681
5681
|
return !0;
|
|
@@ -5692,7 +5692,7 @@ function le(t, e) {
|
|
|
5692
5692
|
}
|
|
5693
5693
|
return t;
|
|
5694
5694
|
}
|
|
5695
|
-
function
|
|
5695
|
+
function xt(t, e) {
|
|
5696
5696
|
if (typeof t == "string") {
|
|
5697
5697
|
if (!e.marks[t])
|
|
5698
5698
|
throw Error(`There is no mark type named '${t}' in schema.`);
|
|
@@ -5801,7 +5801,7 @@ class N {
|
|
|
5801
5801
|
* @returns The mark attrs.
|
|
5802
5802
|
*/
|
|
5803
5803
|
static getMarkAttributes(e, n) {
|
|
5804
|
-
const r =
|
|
5804
|
+
const r = xt(n, e.schema), i = No(e).find((s) => s.type.name === r.name);
|
|
5805
5805
|
return i ? { ...i.attrs } : {};
|
|
5806
5806
|
}
|
|
5807
5807
|
/**
|
|
@@ -5882,7 +5882,7 @@ Fn = new WeakSet(), Yc = function(e, n) {
|
|
|
5882
5882
|
}
|
|
5883
5883
|
}
|
|
5884
5884
|
return r;
|
|
5885
|
-
},
|
|
5885
|
+
}, ft(N, Fn);
|
|
5886
5886
|
function mg(t = {}) {
|
|
5887
5887
|
return Object.keys(t).length === 0 && t.constructor === Object;
|
|
5888
5888
|
}
|
|
@@ -5968,7 +5968,7 @@ Bn = new WeakSet(), Zc = function(e, n, r) {
|
|
|
5968
5968
|
})), [i.name, c];
|
|
5969
5969
|
});
|
|
5970
5970
|
return Object.fromEntries(o);
|
|
5971
|
-
},
|
|
5971
|
+
}, ft(ar, Bn);
|
|
5972
5972
|
let _i = ar;
|
|
5973
5973
|
function Jn(t, e) {
|
|
5974
5974
|
return e.nodes[t] || e.marks[t] || null;
|
|
@@ -6237,7 +6237,7 @@ const vg = (t, e) => {
|
|
|
6237
6237
|
var _n, ed, td;
|
|
6238
6238
|
const xn = class xn {
|
|
6239
6239
|
constructor(e, n, r) {
|
|
6240
|
-
|
|
6240
|
+
ft(this, _n);
|
|
6241
6241
|
P(this, "editor");
|
|
6242
6242
|
P(this, "schema");
|
|
6243
6243
|
P(this, "extensions");
|
|
@@ -6583,7 +6583,7 @@ const Eg = (t, e) => {
|
|
|
6583
6583
|
return !1;
|
|
6584
6584
|
if (n.depth > 1 && n.after() != n.end(-1)) {
|
|
6585
6585
|
let i = n.before();
|
|
6586
|
-
if (
|
|
6586
|
+
if (wt(t.doc, i))
|
|
6587
6587
|
return e && e(t.tr.split(i).scrollIntoView()), !0;
|
|
6588
6588
|
}
|
|
6589
6589
|
let r = n.blockRange(), o = r && Ar(r);
|
|
@@ -6593,7 +6593,7 @@ function Ig(t) {
|
|
|
6593
6593
|
return (e, n) => {
|
|
6594
6594
|
let { $from: r, $to: o } = e.selection;
|
|
6595
6595
|
if (e.selection instanceof B && e.selection.node.isBlock)
|
|
6596
|
-
return !r.parentOffset || !
|
|
6596
|
+
return !r.parentOffset || !wt(e.doc, r.pos) ? !1 : (n && n(e.tr.split(r.pos).scrollIntoView()), !0);
|
|
6597
6597
|
if (!r.depth)
|
|
6598
6598
|
return !1;
|
|
6599
6599
|
let i = [], s, a, l = !1, c = !1;
|
|
@@ -6608,8 +6608,8 @@ function Ig(t) {
|
|
|
6608
6608
|
}
|
|
6609
6609
|
let d = e.tr;
|
|
6610
6610
|
(e.selection instanceof V || e.selection instanceof Mr) && d.deleteSelection();
|
|
6611
|
-
let u = d.mapping.map(r.pos), f =
|
|
6612
|
-
if (f || (i[0] = a ? { type: a } : null, f =
|
|
6611
|
+
let u = d.mapping.map(r.pos), f = wt(d.doc, u, i.length, i);
|
|
6612
|
+
if (f || (i[0] = a ? { type: a } : null, f = wt(d.doc, u, i.length, i)), d.split(u, i.length, i), !l && c && r.node(s).type != a) {
|
|
6613
6613
|
let p = d.mapping.map(r.before(s)), h = d.doc.resolve(p);
|
|
6614
6614
|
a && r.node(s - 1).canReplaceWith(h.index(), h.index() + 1, a) && d.setNodeMarkup(d.mapping.map(r.before(s)), a);
|
|
6615
6615
|
}
|
|
@@ -6730,14 +6730,14 @@ const Ka = (t, e) => {
|
|
|
6730
6730
|
}, _g = ({ keepMarks: t = !0 } = {}) => (e) => {
|
|
6731
6731
|
const { tr: n, state: r, dispatch: o, editor: i } = e, { selection: s, doc: a } = n, { $from: l, $to: c } = s, d = i.extensionService.attributes, u = N.getSplittedAttributes(d, l.node().type.name, l.node().attrs);
|
|
6732
6732
|
if (s instanceof B && s.node.isBlock)
|
|
6733
|
-
return !l.parentOffset || !
|
|
6733
|
+
return !l.parentOffset || !wt(a, l.pos) ? !1 : (o && (t && Ka(r, i.extensionService.splittableMarks), n.split(l.pos).scrollIntoView()), !0);
|
|
6734
6734
|
if (!l.parent.isBlock) return !1;
|
|
6735
6735
|
if (o) {
|
|
6736
6736
|
const f = c.parentOffset === c.parent.content.size;
|
|
6737
6737
|
s instanceof V && n.deleteSelection();
|
|
6738
6738
|
const p = l.depth === 0 ? null : pd(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
6739
|
-
let h = f && p ? [{ type: p, attrs: u }] : void 0, m =
|
|
6740
|
-
if (!h && !m &&
|
|
6739
|
+
let h = f && p ? [{ type: p, attrs: u }] : void 0, m = wt(n.doc, n.mapping.map(l.pos), 1, h);
|
|
6740
|
+
if (!h && !m && wt(n.doc, n.mapping.map(l.pos), 1, p ? [{ type: p }] : void 0) && (m = !0, h = p ? [{ type: p, attrs: u }] : void 0), m && (n.split(n.mapping.map(l.pos), 1, h), p && !f && !l.parentOffset && l.parent.type !== p)) {
|
|
6741
6741
|
const g = n.mapping.map(l.before()), b = n.doc.resolve(g);
|
|
6742
6742
|
l.node(-1).canReplaceWith(b.index(), b.index() + 1, p) && n.setNodeMarkup(n.mapping.map(l.before()), p);
|
|
6743
6743
|
}
|
|
@@ -6766,7 +6766,7 @@ function jg(t, e, n) {
|
|
|
6766
6766
|
});
|
|
6767
6767
|
}
|
|
6768
6768
|
const Wg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6769
|
-
const { selection: i } = n, { empty: s, ranges: a } = i, l =
|
|
6769
|
+
const { selection: i } = n, { empty: s, ranges: a } = i, l = xt(t, r.schema);
|
|
6770
6770
|
if (o)
|
|
6771
6771
|
if (s) {
|
|
6772
6772
|
const c = N.getMarkAttributes(r, l);
|
|
@@ -6815,7 +6815,7 @@ function Ps(t, e, n = {}) {
|
|
|
6815
6815
|
return { from: s, to: l };
|
|
6816
6816
|
}
|
|
6817
6817
|
const qg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6818
|
-
const { extendEmptyMarkRange: i = !1 } = e, { selection: s } = n, a =
|
|
6818
|
+
const { extendEmptyMarkRange: i = !1 } = e, { selection: s } = n, a = xt(t, r.schema), { $from: l, empty: c, ranges: d } = s;
|
|
6819
6819
|
if (!o) return !0;
|
|
6820
6820
|
if (c && i) {
|
|
6821
6821
|
let { from: u, to: f } = s;
|
|
@@ -6833,7 +6833,7 @@ const qg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6833
6833
|
}), !0;
|
|
6834
6834
|
};
|
|
6835
6835
|
function Co(t, e, n = {}) {
|
|
6836
|
-
const { empty: r, ranges: o } = t.selection, i = e ?
|
|
6836
|
+
const { empty: r, ranges: o } = t.selection, i = e ? xt(e, t.schema) : null;
|
|
6837
6837
|
if (r)
|
|
6838
6838
|
return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => cr(u.attrs, n, { strict: !1 }));
|
|
6839
6839
|
let s = 0;
|
|
@@ -6856,7 +6856,7 @@ function Co(t, e, n = {}) {
|
|
|
6856
6856
|
return (l > 0 ? l + c : l) >= s;
|
|
6857
6857
|
}
|
|
6858
6858
|
const Xg = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
6859
|
-
const { extendEmptyMarkRange: i = !1 } = n, s =
|
|
6859
|
+
const { extendEmptyMarkRange: i = !1 } = n, s = xt(t, r.schema);
|
|
6860
6860
|
return Co(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
|
|
6861
6861
|
}, Jg = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
6862
6862
|
const { selection: r } = e, { ranges: o } = r;
|
|
@@ -6900,7 +6900,7 @@ const Gg = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6900
6900
|
typeof t == "string" ? t : t.name,
|
|
6901
6901
|
r.schema
|
|
6902
6902
|
);
|
|
6903
|
-
return a ? (a === "node" && (i = le(t, r.schema)), a === "mark" && (s =
|
|
6903
|
+
return a ? (a === "node" && (i = le(t, r.schema)), a === "mark" && (s = xt(t, r.schema)), o && n.selection.ranges.forEach((l) => {
|
|
6904
6904
|
const c = l.$from.pos, d = l.$to.pos;
|
|
6905
6905
|
r.doc.nodesBetween(c, d, (u, f) => {
|
|
6906
6906
|
i && i === u.type && n.setNodeMarkup(f, void 0, { ...u.attrs, ...e }), s && u.marks.length && u.marks.forEach((p) => {
|
|
@@ -6922,7 +6922,7 @@ const ty = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6922
6922
|
typeof t == "string" ? t : t.name,
|
|
6923
6923
|
r.schema
|
|
6924
6924
|
);
|
|
6925
|
-
return a ? (a === "node" && (i = le(t, r.schema)), a === "mark" && (s =
|
|
6925
|
+
return a ? (a === "node" && (i = le(t, r.schema)), a === "mark" && (s = xt(t, r.schema)), o && n.selection.ranges.forEach((l) => {
|
|
6926
6926
|
r.doc.nodesBetween(l.$from.pos, l.$to.pos, (c, d) => {
|
|
6927
6927
|
i && i === c.type && n.setNodeMarkup(d, void 0, Xa(c.attrs, e)), s && c.marks.length && c.marks.forEach((u) => {
|
|
6928
6928
|
s === u.type && n.addMark(d, d + c.nodeSize, s.create(Xa(u.attrs, e)));
|
|
@@ -6995,7 +6995,7 @@ function uy(t, e, n) {
|
|
|
6995
6995
|
if (r < e)
|
|
6996
6996
|
return;
|
|
6997
6997
|
const o = t.steps[r];
|
|
6998
|
-
if (!(o instanceof
|
|
6998
|
+
if (!(o instanceof Vt || o instanceof an))
|
|
6999
6999
|
return;
|
|
7000
7000
|
const i = t.mapping.maps[r];
|
|
7001
7001
|
let s = 0;
|
|
@@ -7092,7 +7092,7 @@ function yy(t, e, n, r, o) {
|
|
|
7092
7092
|
n[d].type == o && (s = d + 1);
|
|
7093
7093
|
let a = n.length - s, l = e.start + n.length - (r ? 2 : 0), c = e.parent;
|
|
7094
7094
|
for (let d = e.startIndex, u = e.endIndex, f = !0; d < u; d++, f = !1)
|
|
7095
|
-
!f &&
|
|
7095
|
+
!f && wt(t.doc, l, a) && (t.split(l, a), l += 2 * a), l += c.child(d).nodeSize;
|
|
7096
7096
|
return t;
|
|
7097
7097
|
}
|
|
7098
7098
|
function by(t) {
|
|
@@ -7156,7 +7156,7 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
7156
7156
|
node: r
|
|
7157
7157
|
};
|
|
7158
7158
|
}
|
|
7159
|
-
},
|
|
7159
|
+
}, je = (t) => ({ $from: e }) => Bo(e, t), Hi = (t, e) => {
|
|
7160
7160
|
const r = e.filter((s) => s.type === "node").find((s) => s.name === t);
|
|
7161
7161
|
if (!r) return !1;
|
|
7162
7162
|
const o = {
|
|
@@ -8309,14 +8309,14 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8309
8309
|
}
|
|
8310
8310
|
]
|
|
8311
8311
|
}, ai = (t, e) => {
|
|
8312
|
-
const n =
|
|
8312
|
+
const n = je((s) => s.type === e)(t.selection);
|
|
8313
8313
|
if (!n) return !0;
|
|
8314
8314
|
const r = t.doc.resolve(Math.max(0, n.pos - 1)).before(n.depth);
|
|
8315
8315
|
if (r === void 0) return !0;
|
|
8316
8316
|
const o = t.doc.nodeAt(r);
|
|
8317
8317
|
return n.node.type === o?.type && jt(t.doc, n.pos) && t.join(n.pos), !0;
|
|
8318
8318
|
}, li = (t, e) => {
|
|
8319
|
-
const n =
|
|
8319
|
+
const n = je((s) => s.type === e)(t.selection);
|
|
8320
8320
|
if (!n) return !0;
|
|
8321
8321
|
const r = t.doc.resolve(n.start).after(n.depth);
|
|
8322
8322
|
if (r === void 0) return !0;
|
|
@@ -8325,7 +8325,7 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8325
8325
|
}, My = (t, e, n, r = {}) => (o) => {
|
|
8326
8326
|
const { editor: i, tr: s, state: a, dispatch: l, chain: c, can: d, commands: u } = o, { extensions: f, splittableMarks: p } = i.extensionService, h = le(t, a.schema), m = le(e, a.schema), { selection: g, storedMarks: b } = a, { $from: w, $to: C } = g, y = w.blockRange(C), S = b || g.$to.parentOffset && g.$from.marks();
|
|
8327
8327
|
if (!y) return !1;
|
|
8328
|
-
const k =
|
|
8328
|
+
const k = je((_) => Hi(_.type.name, f))(g), { numbering: M } = i.converter;
|
|
8329
8329
|
if (y.depth >= 1 && k && y.depth - k.depth <= 1) {
|
|
8330
8330
|
if (k.node.type === h) {
|
|
8331
8331
|
const { listId: _ } = k.node.attrs;
|
|
@@ -8410,7 +8410,7 @@ const Cy = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8410
8410
|
{ type: s, attrs: p },
|
|
8411
8411
|
{ type: f, attrs: h }
|
|
8412
8412
|
] : [{ type: s, attrs: p }];
|
|
8413
|
-
if (!
|
|
8413
|
+
if (!wt(n.doc, a.pos, 2))
|
|
8414
8414
|
return !1;
|
|
8415
8415
|
if (o) {
|
|
8416
8416
|
const { selection: g, storedMarks: b } = r, { splittableMarks: w } = i.extensionService, C = b || g.$to.parentOffset && g.$from.marks();
|
|
@@ -8632,7 +8632,7 @@ const Rs = ({
|
|
|
8632
8632
|
return t.doc.nodesBetween(e, n, (d, u) => {
|
|
8633
8633
|
if (!d.type.name.includes("table"))
|
|
8634
8634
|
if (d.isInline && d.marks.find((f) => f.type.name === Ve && f.attrs.authorEmail === r.email)) {
|
|
8635
|
-
const f = new
|
|
8635
|
+
const f = new Vt(
|
|
8636
8636
|
l.map(Math.max(e, u)),
|
|
8637
8637
|
l.map(Math.min(n, u + d.nodeSize)),
|
|
8638
8638
|
H.empty
|
|
@@ -8755,7 +8755,7 @@ const Cd = (t) => {
|
|
|
8755
8755
|
defaultBlockAt: pd,
|
|
8756
8756
|
findChildren: Ls,
|
|
8757
8757
|
findMark: Eo,
|
|
8758
|
-
findParentNode:
|
|
8758
|
+
findParentNode: je,
|
|
8759
8759
|
findParentNodeClosestToPos: Bo,
|
|
8760
8760
|
generateDocxListAttributes: zy,
|
|
8761
8761
|
generateDocxRandomId: vn,
|
|
@@ -8763,7 +8763,7 @@ const Cd = (t) => {
|
|
|
8763
8763
|
getActiveFormatting: Ef,
|
|
8764
8764
|
getExtensionConfigField: D,
|
|
8765
8765
|
getMarkRange: Ps,
|
|
8766
|
-
getMarkType:
|
|
8766
|
+
getMarkType: xt,
|
|
8767
8767
|
getMarksBetween: $y,
|
|
8768
8768
|
getMarksFromSelection: No,
|
|
8769
8769
|
getNodeType: le,
|
|
@@ -9457,7 +9457,7 @@ function tb(t, e) {
|
|
|
9457
9457
|
}), n;
|
|
9458
9458
|
}
|
|
9459
9459
|
const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a, originalStep: l, originalStepIndex: c }) => {
|
|
9460
|
-
const d = t.schema.marks[ue], u = Eo(t, d, !1), f = u ? u.to : n.to, p = new
|
|
9460
|
+
const d = t.schema.marks[ue], u = Eo(t, d, !1), f = u ? u.to : n.to, p = new Vt(
|
|
9461
9461
|
f,
|
|
9462
9462
|
// We insert all the same steps, but with "from"/"to" both set to "to" in order not to delete content. Mapped as needed.
|
|
9463
9463
|
f,
|
|
@@ -9476,7 +9476,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9476
9476
|
to: b,
|
|
9477
9477
|
user: s,
|
|
9478
9478
|
date: a
|
|
9479
|
-
}), C = new
|
|
9479
|
+
}), C = new Vt(p.from, p.to, g.doc.slice(p.from, b));
|
|
9480
9480
|
r.step(C);
|
|
9481
9481
|
const y = o.maps.length - 1;
|
|
9482
9482
|
o.appendMap(C.getMap(), y), p.from !== b && (m.insertedMark = w, m.step = C), r.selection.eq(g.selection) || r.setSelection(g.selection);
|
|
@@ -9583,7 +9583,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9583
9583
|
const i = e.tr, s = new lr(), a = Math.floor(Date.now() / 6e5) * 6e5, l = new Date(a).toISOString();
|
|
9584
9584
|
if (t.steps.forEach((c, d) => {
|
|
9585
9585
|
const u = c.map(s), { doc: f } = i;
|
|
9586
|
-
u && (u instanceof
|
|
9586
|
+
u && (u instanceof Vt ? (Td({
|
|
9587
9587
|
state: e,
|
|
9588
9588
|
tr: t,
|
|
9589
9589
|
step: u,
|
|
@@ -9658,14 +9658,14 @@ var tn, ms, O, Id, Pd, Wi, Rd, Ui, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, Ld, Yn, Gn, F
|
|
|
9658
9658
|
const Js = class Js extends ag {
|
|
9659
9659
|
constructor(n) {
|
|
9660
9660
|
super();
|
|
9661
|
-
|
|
9662
|
-
|
|
9661
|
+
ft(this, O);
|
|
9662
|
+
ft(this, tn);
|
|
9663
9663
|
P(this, "extensionService");
|
|
9664
9664
|
P(this, "extensionStorage", {});
|
|
9665
9665
|
P(this, "schema");
|
|
9666
9666
|
P(this, "view");
|
|
9667
9667
|
P(this, "isFocused", !1);
|
|
9668
|
-
|
|
9668
|
+
ft(this, ms);
|
|
9669
9669
|
P(this, "options", {
|
|
9670
9670
|
element: null,
|
|
9671
9671
|
isHeadless: !1,
|
|
@@ -9754,7 +9754,7 @@ const Js = class Js extends ag {
|
|
|
9754
9754
|
* Get object of registered commands.
|
|
9755
9755
|
*/
|
|
9756
9756
|
get commands() {
|
|
9757
|
-
return
|
|
9757
|
+
return Qe(this, tn).commands;
|
|
9758
9758
|
}
|
|
9759
9759
|
/**
|
|
9760
9760
|
* Check if the editor is editable.
|
|
@@ -9784,13 +9784,13 @@ const Js = class Js extends ag {
|
|
|
9784
9784
|
* Create a chain of commands to call multiple commands at once.
|
|
9785
9785
|
*/
|
|
9786
9786
|
chain() {
|
|
9787
|
-
return
|
|
9787
|
+
return Qe(this, tn).chain();
|
|
9788
9788
|
}
|
|
9789
9789
|
/**
|
|
9790
9790
|
* Check if a command or a chain of commands can be executed. Without executing it.
|
|
9791
9791
|
*/
|
|
9792
9792
|
can() {
|
|
9793
|
-
return
|
|
9793
|
+
return Qe(this, tn).can();
|
|
9794
9794
|
}
|
|
9795
9795
|
setDocumentMode(n) {
|
|
9796
9796
|
let r = n?.toLowerCase() || "editing";
|
|
@@ -10018,7 +10018,7 @@ const Js = class Js extends ag {
|
|
|
10018
10018
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
10019
10019
|
*/
|
|
10020
10020
|
processCollaborationMigrations() {
|
|
10021
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.9.
|
|
10021
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.9.24"), !this.options.ydoc) return;
|
|
10022
10022
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
10023
10023
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
10024
10024
|
const o = Qa(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
|
|
@@ -10312,7 +10312,7 @@ class Fe {
|
|
|
10312
10312
|
}
|
|
10313
10313
|
}
|
|
10314
10314
|
const sb = /[\d-.]+(\w+)$/, ab = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
|
|
10315
|
-
function
|
|
10315
|
+
function Ct(t = "0") {
|
|
10316
10316
|
const e = t || "0", n = Number.parseFloat(e), o = (e.match(sb)?.[1] ?? "").toLowerCase();
|
|
10317
10317
|
return [n, ab.includes(o) ? o : null];
|
|
10318
10318
|
}
|
|
@@ -10393,7 +10393,7 @@ const $d = Q.create({
|
|
|
10393
10393
|
parseDOM: (t) => t.style.fontSize,
|
|
10394
10394
|
renderDOM: (t) => {
|
|
10395
10395
|
if (!t.fontSize) return {};
|
|
10396
|
-
let [e, n] =
|
|
10396
|
+
let [e, n] = Ct(t.fontSize);
|
|
10397
10397
|
return Number.isNaN(e) ? {} : (n = n || this.options.defaults.unit, { style: `font-size: ${e}${n}` });
|
|
10398
10398
|
}
|
|
10399
10399
|
}
|
|
@@ -10404,7 +10404,7 @@ const $d = Q.create({
|
|
|
10404
10404
|
addCommands() {
|
|
10405
10405
|
return {
|
|
10406
10406
|
setFontSize: (t) => ({ chain: e }) => {
|
|
10407
|
-
let [n, r] =
|
|
10407
|
+
let [n, r] = Ct(t);
|
|
10408
10408
|
if (Number.isNaN(n))
|
|
10409
10409
|
return !1;
|
|
10410
10410
|
let { min: o, max: i, unit: s } = this.options.defaults;
|
|
@@ -10473,7 +10473,7 @@ const $d = Q.create({
|
|
|
10473
10473
|
parseDOM: (t) => t.style.textIndent,
|
|
10474
10474
|
renderDOM: (t) => {
|
|
10475
10475
|
if (!t.textIndent) return {};
|
|
10476
|
-
let [e, n] =
|
|
10476
|
+
let [e, n] = Ct(t.textIndent);
|
|
10477
10477
|
return Number.isNaN(e) || !e ? {} : (n = n || this.options.defaults.unit, { style: `margin-left: ${e}${n}` });
|
|
10478
10478
|
}
|
|
10479
10479
|
}
|
|
@@ -10493,7 +10493,7 @@ const $d = Q.create({
|
|
|
10493
10493
|
textIndent: `${i}${s}`
|
|
10494
10494
|
});
|
|
10495
10495
|
}
|
|
10496
|
-
let [r, o] =
|
|
10496
|
+
let [r, o] = Ct(n);
|
|
10497
10497
|
return r = r + this.options.defaults.increment, o = o || this.options.defaults.unit, Number.isNaN(r) ? !1 : t.updateAttributes(e, {
|
|
10498
10498
|
textIndent: `${r}${o}`
|
|
10499
10499
|
});
|
|
@@ -10501,7 +10501,7 @@ const $d = Q.create({
|
|
|
10501
10501
|
decreaseTextIndent: () => ({ commands: t }) => this.options.types.map((e) => {
|
|
10502
10502
|
let { textIndent: n } = this.editor.getAttributes(e);
|
|
10503
10503
|
if (!n) return !1;
|
|
10504
|
-
let [r, o] =
|
|
10504
|
+
let [r, o] = Ct(n);
|
|
10505
10505
|
return r = r - this.options.defaults.increment, o = o || this.options.defaults.unit, Number.isNaN(r) ? !1 : r <= 0 ? t.unsetTextIndent() : t.updateAttributes(e, {
|
|
10506
10506
|
textIndent: `${r}${o}`
|
|
10507
10507
|
});
|
|
@@ -10528,7 +10528,7 @@ const $d = Q.create({
|
|
|
10528
10528
|
parseDOM: (t) => t.style.lineHeight,
|
|
10529
10529
|
renderDOM: (t) => {
|
|
10530
10530
|
if (!t.lineHeight) return {};
|
|
10531
|
-
let [e, n] =
|
|
10531
|
+
let [e, n] = Ct(t.lineHeight);
|
|
10532
10532
|
return Number.isNaN(e) ? {} : (n = n || this.options.defaults.unit, { style: `line-height: ${e}${n}` });
|
|
10533
10533
|
}
|
|
10534
10534
|
}
|
|
@@ -10927,8 +10927,8 @@ const yb = Q.create({
|
|
|
10927
10927
|
},
|
|
10928
10928
|
addCommands() {
|
|
10929
10929
|
return {
|
|
10930
|
-
undo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyUndo"),
|
|
10931
|
-
redo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyRedo"),
|
|
10930
|
+
undo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyUndo"), $t.getState(e).undoManager.undoStack.length === 0 ? !1 : n ? ng(e) : !0),
|
|
10931
|
+
redo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyRedo"), $t.getState(e).undoManager.redoStack.length === 0 ? !1 : n ? rg(e) : !0),
|
|
10932
10932
|
addImageToCollaboration: ({ mediaPath: t, fileData: e }) => () => {
|
|
10933
10933
|
if (!this.options.ydoc) return;
|
|
10934
10934
|
this.options.ydoc.getMap("media").set(t, e);
|
|
@@ -11340,12 +11340,26 @@ const nl = /^(\d+)\.\s$/, Zd = Y.create({
|
|
|
11340
11340
|
addCommands() {
|
|
11341
11341
|
return {
|
|
11342
11342
|
toggleOrderedList: () => ({ commands: t }) => t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks),
|
|
11343
|
+
getCurrentList: () => ({ state: t }) => je((e) => e.type.name === this.name)(t.selection),
|
|
11344
|
+
restartListNodes: (t, e) => ({ tr: n, state: r }) => {
|
|
11345
|
+
let o = e;
|
|
11346
|
+
return t.map((s) => {
|
|
11347
|
+
const a = {
|
|
11348
|
+
node: s,
|
|
11349
|
+
pos: o
|
|
11350
|
+
};
|
|
11351
|
+
return o += s.nodeSize, a;
|
|
11352
|
+
}).forEach((s) => {
|
|
11353
|
+
const { pos: a } = s, l = n.mapping.map(a);
|
|
11354
|
+
n.setNodeMarkup(l, void 0, {});
|
|
11355
|
+
}), !0;
|
|
11356
|
+
},
|
|
11343
11357
|
/**
|
|
11344
11358
|
* Updates ordered list style type when sink or lift `listItem`.
|
|
11345
11359
|
* @example 1,2,3 -> a,b,c -> i,ii,iii -> 1,2,3 -> etc
|
|
11346
11360
|
*/
|
|
11347
11361
|
updateOrderedListStyleType: () => ({ dispatch: t, state: e, tr: n }) => {
|
|
11348
|
-
let r =
|
|
11362
|
+
let r = je((o) => o.type.name === this.name)(n.selection);
|
|
11349
11363
|
if (!r)
|
|
11350
11364
|
return !0;
|
|
11351
11365
|
if (t) {
|
|
@@ -11370,7 +11384,7 @@ const nl = /^(\d+)\.\s$/, Zd = Y.create({
|
|
|
11370
11384
|
* </ol>
|
|
11371
11385
|
*/
|
|
11372
11386
|
liftEmptyBlockAndContinueListOrder: () => ({ editor: t, dispatch: e, state: n, tr: r, commands: o }) => {
|
|
11373
|
-
let i =
|
|
11387
|
+
let i = je((f) => f.type.name === this.name)(n.selection);
|
|
11374
11388
|
if (!i)
|
|
11375
11389
|
return !1;
|
|
11376
11390
|
let s = t.can().liftEmptyBlock(), a = i.depth === 1, l = i.node.childCount === 1, c = n.selection.$from.node(-1), d = i.node.lastChild.eq(c);
|
|
@@ -11497,7 +11511,7 @@ function Hb(t = {}) {
|
|
|
11497
11511
|
function rl(t) {
|
|
11498
11512
|
let { doc: e, storedMarks: n } = t, r = [], o = Ls(e, (i) => i.type.name === "listItem");
|
|
11499
11513
|
return o.length && o.forEach(({ node: i, pos: s }) => {
|
|
11500
|
-
let a = [], l =
|
|
11514
|
+
let a = [], l = xt("textStyle", e.type.schema);
|
|
11501
11515
|
if (Wb(i) && n) {
|
|
11502
11516
|
let g = n.filter((b) => b.type === l);
|
|
11503
11517
|
a.push(...g);
|
|
@@ -11509,7 +11523,7 @@ function rl(t) {
|
|
|
11509
11523
|
a.forEach((g) => {
|
|
11510
11524
|
let { attrs: b } = g;
|
|
11511
11525
|
if (b.fontSize && !d) {
|
|
11512
|
-
let [w, C] =
|
|
11526
|
+
let [w, C] = Ct(b.fontSize);
|
|
11513
11527
|
Number.isNaN(w) || (C = C ?? "pt", d = `${w}${C}`);
|
|
11514
11528
|
}
|
|
11515
11529
|
b.fontFamily && !u && (u = b.fontFamily);
|
|
@@ -11638,6 +11652,31 @@ const tu = Y.create({
|
|
|
11638
11652
|
}
|
|
11639
11653
|
};
|
|
11640
11654
|
},
|
|
11655
|
+
addCommands() {
|
|
11656
|
+
return {
|
|
11657
|
+
getCurrentListNode: () => ({ state: t }) => je((e) => e.type.name === this.name)(t.selection),
|
|
11658
|
+
increaseListIndent: () => ({ commands: t }) => t.sinkListItem(this.name) ? (t.updateNodeStyle(), t.updateOrderedListStyleType(), !0) : !1,
|
|
11659
|
+
decreaseListIndent: () => ({ commands: t }) => {
|
|
11660
|
+
const e = t.getCurrentList();
|
|
11661
|
+
if (e?.depth === 1) return !1;
|
|
11662
|
+
if (!t.liftListItem(this.name))
|
|
11663
|
+
return !0;
|
|
11664
|
+
if (!t.updateNodeStyle())
|
|
11665
|
+
return !1;
|
|
11666
|
+
const r = t.getCurrentListNode(), o = e?.node?.children.findIndex((a) => a === r.node), i = r?.pos + r?.node.nodeSize, s = e?.node?.children.slice(o + 1) || [];
|
|
11667
|
+
return t.updateOrderedListStyleType(), t.restartListNodes(s, i), !0;
|
|
11668
|
+
},
|
|
11669
|
+
updateNodeStyle: () => ({ tr: t, state: e }) => {
|
|
11670
|
+
let n = je((s) => s.type.name === "orderedList")(t.selection);
|
|
11671
|
+
const r = je((s) => s.type.name === this.name)(e.selection);
|
|
11672
|
+
if (!n) return !1;
|
|
11673
|
+
const o = n?.node.children[0]?.attrs, i = t.mapping.map(r.pos);
|
|
11674
|
+
return t.setNodeMarkup(i, void 0, {
|
|
11675
|
+
...o
|
|
11676
|
+
}), !0;
|
|
11677
|
+
}
|
|
11678
|
+
};
|
|
11679
|
+
},
|
|
11641
11680
|
addShortcuts() {
|
|
11642
11681
|
return {
|
|
11643
11682
|
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
@@ -11645,8 +11684,8 @@ const tu = Y.create({
|
|
|
11645
11684
|
() => t.createParagraphNear(),
|
|
11646
11685
|
() => t.splitBlock()
|
|
11647
11686
|
]),
|
|
11648
|
-
Tab: () => this.editor.
|
|
11649
|
-
"Shift-Tab": () => this.editor.
|
|
11687
|
+
Tab: () => this.editor.commands.increaseListIndent(),
|
|
11688
|
+
"Shift-Tab": () => this.editor.commands.decreaseListIndent()
|
|
11650
11689
|
};
|
|
11651
11690
|
},
|
|
11652
11691
|
addPmPlugins() {
|
|
@@ -11665,7 +11704,7 @@ const tu = Y.create({
|
|
|
11665
11704
|
if (o === i) return;
|
|
11666
11705
|
let s = o, a = n.doc.nodeAt(o);
|
|
11667
11706
|
if (a.type.name !== "paragraph") {
|
|
11668
|
-
const l =
|
|
11707
|
+
const l = je((c) => c.type.name === "paragraph")(n.selection) || {};
|
|
11669
11708
|
s = l.pos, a = l.node;
|
|
11670
11709
|
}
|
|
11671
11710
|
n.setNodeMarkup(s, void 0, {
|
|
@@ -12444,7 +12483,7 @@ function ve(t) {
|
|
|
12444
12483
|
}
|
|
12445
12484
|
return e;
|
|
12446
12485
|
}
|
|
12447
|
-
var
|
|
12486
|
+
var Pt = new G("selectingCells");
|
|
12448
12487
|
function $n(t) {
|
|
12449
12488
|
for (let e = t.depth - 1; e > 0; e--)
|
|
12450
12489
|
if (t.node(e).type.spec.tableRole == "row")
|
|
@@ -12458,7 +12497,7 @@ function f0(t) {
|
|
|
12458
12497
|
}
|
|
12459
12498
|
return null;
|
|
12460
12499
|
}
|
|
12461
|
-
function
|
|
12500
|
+
function Ze(t) {
|
|
12462
12501
|
const e = t.selection.$head;
|
|
12463
12502
|
for (let n = e.depth; n > 0; n--)
|
|
12464
12503
|
if (e.node(n).type.spec.tableRole == "row") return !0;
|
|
@@ -12518,7 +12557,7 @@ function m0(t, e, n) {
|
|
|
12518
12557
|
return !1;
|
|
12519
12558
|
return !0;
|
|
12520
12559
|
}
|
|
12521
|
-
var X = class
|
|
12560
|
+
var X = class ht extends J {
|
|
12522
12561
|
// A table selection is identified by its anchor and head cells. The
|
|
12523
12562
|
// positions given to this constructor should point _before_ two
|
|
12524
12563
|
// cells in the same table. They may be the same, to select a single
|
|
@@ -12545,7 +12584,7 @@ var X = class pt extends J {
|
|
|
12545
12584
|
const r = e.resolve(n.map(this.$anchorCell.pos)), o = e.resolve(n.map(this.$headCell.pos));
|
|
12546
12585
|
if (rs(r) && rs(o) && $s(r, o)) {
|
|
12547
12586
|
const i = this.$anchorCell.node(-1) != r.node(-1);
|
|
12548
|
-
return i && this.isRowSelection() ?
|
|
12587
|
+
return i && this.isRowSelection() ? ht.rowSelection(r, o) : i && this.isColSelection() ? ht.colSelection(r, o) : new ht(r, o);
|
|
12549
12588
|
}
|
|
12550
12589
|
return V.between(r, o);
|
|
12551
12590
|
}
|
|
@@ -12640,7 +12679,7 @@ var X = class pt extends J {
|
|
|
12640
12679
|
i + o.map[o.width * (o.height - 1) + a.right - 1]
|
|
12641
12680
|
))) : (a.top > 0 && (n = l.resolve(i + o.map[a.left])), s.bottom < o.height && (e = l.resolve(
|
|
12642
12681
|
i + o.map[o.width * (o.height - 1) + s.right - 1]
|
|
12643
|
-
))), new
|
|
12682
|
+
))), new ht(e, n);
|
|
12644
12683
|
}
|
|
12645
12684
|
// True if this selection goes all the way from the left to the
|
|
12646
12685
|
// right of the table.
|
|
@@ -12651,7 +12690,7 @@ var X = class pt extends J {
|
|
|
12651
12690
|
return Math.max(s, a) == n.width;
|
|
12652
12691
|
}
|
|
12653
12692
|
eq(e) {
|
|
12654
|
-
return e instanceof
|
|
12693
|
+
return e instanceof ht && e.$anchorCell.pos == this.$anchorCell.pos && e.$headCell.pos == this.$headCell.pos;
|
|
12655
12694
|
}
|
|
12656
12695
|
// Returns the smallest row selection that covers the given anchor
|
|
12657
12696
|
// and head cell.
|
|
@@ -12663,7 +12702,7 @@ var X = class pt extends J {
|
|
|
12663
12702
|
i + o.map[o.width * (a.top + 1) - 1]
|
|
12664
12703
|
))) : (a.left > 0 && (n = l.resolve(i + o.map[a.top * o.width])), s.right < o.width && (e = l.resolve(
|
|
12665
12704
|
i + o.map[o.width * (s.top + 1) - 1]
|
|
12666
|
-
))), new
|
|
12705
|
+
))), new ht(e, n);
|
|
12667
12706
|
}
|
|
12668
12707
|
toJSON() {
|
|
12669
12708
|
return {
|
|
@@ -12673,10 +12712,10 @@ var X = class pt extends J {
|
|
|
12673
12712
|
};
|
|
12674
12713
|
}
|
|
12675
12714
|
static fromJSON(e, n) {
|
|
12676
|
-
return new
|
|
12715
|
+
return new ht(e.resolve(n.anchor), e.resolve(n.head));
|
|
12677
12716
|
}
|
|
12678
12717
|
static create(e, n, r = n) {
|
|
12679
|
-
return new
|
|
12718
|
+
return new ht(e.resolve(n), e.resolve(r));
|
|
12680
12719
|
}
|
|
12681
12720
|
getBookmark() {
|
|
12682
12721
|
return new g0(this.$anchorCell.pos, this.$headCell.pos);
|
|
@@ -12827,7 +12866,7 @@ function C0(t, e, n, r) {
|
|
|
12827
12866
|
}
|
|
12828
12867
|
return r.setMeta(k0, { fixTables: !0 });
|
|
12829
12868
|
}
|
|
12830
|
-
function
|
|
12869
|
+
function ct(t) {
|
|
12831
12870
|
const e = t.selection, n = _o(t), r = n.node(-1), o = n.start(-1), i = re.get(r);
|
|
12832
12871
|
return { ...e instanceof X ? i.rectBetween(
|
|
12833
12872
|
e.$anchorCell.pos - o,
|
|
@@ -12854,17 +12893,17 @@ function fu(t, { map: e, tableStart: n, table: r }, o) {
|
|
|
12854
12893
|
return t;
|
|
12855
12894
|
}
|
|
12856
12895
|
function S0(t, e) {
|
|
12857
|
-
if (!
|
|
12896
|
+
if (!Ze(t)) return !1;
|
|
12858
12897
|
if (e) {
|
|
12859
|
-
const n =
|
|
12898
|
+
const n = ct(t);
|
|
12860
12899
|
e(fu(t.tr, n, n.left));
|
|
12861
12900
|
}
|
|
12862
12901
|
return !0;
|
|
12863
12902
|
}
|
|
12864
12903
|
function x0(t, e) {
|
|
12865
|
-
if (!
|
|
12904
|
+
if (!Ze(t)) return !1;
|
|
12866
12905
|
if (e) {
|
|
12867
|
-
const n =
|
|
12906
|
+
const n = ct(t);
|
|
12868
12907
|
e(fu(t.tr, n, n.right));
|
|
12869
12908
|
}
|
|
12870
12909
|
return !0;
|
|
@@ -12887,9 +12926,9 @@ function M0(t, { map: e, table: n, tableStart: r }, o) {
|
|
|
12887
12926
|
}
|
|
12888
12927
|
}
|
|
12889
12928
|
function A0(t, e) {
|
|
12890
|
-
if (!
|
|
12929
|
+
if (!Ze(t)) return !1;
|
|
12891
12930
|
if (e) {
|
|
12892
|
-
const n =
|
|
12931
|
+
const n = ct(t), r = t.tr;
|
|
12893
12932
|
if (n.left == 0 && n.right == n.map.width) return !1;
|
|
12894
12933
|
for (let o = n.right - 1; M0(r, n, o), o != n.left; o--) {
|
|
12895
12934
|
const i = n.tableStart ? r.doc.nodeAt(n.tableStart - 1) : r.doc;
|
|
@@ -12930,17 +12969,17 @@ function pu(t, { map: e, tableStart: n, table: r }, o) {
|
|
|
12930
12969
|
return t.insert(s, ve(r.type.schema).row.create(null, a)), t;
|
|
12931
12970
|
}
|
|
12932
12971
|
function T0(t, e) {
|
|
12933
|
-
if (!
|
|
12972
|
+
if (!Ze(t)) return !1;
|
|
12934
12973
|
if (e) {
|
|
12935
|
-
const n =
|
|
12974
|
+
const n = ct(t);
|
|
12936
12975
|
e(pu(t.tr, n, n.top));
|
|
12937
12976
|
}
|
|
12938
12977
|
return !0;
|
|
12939
12978
|
}
|
|
12940
12979
|
function D0(t, e) {
|
|
12941
|
-
if (!
|
|
12980
|
+
if (!Ze(t)) return !1;
|
|
12942
12981
|
if (e) {
|
|
12943
|
-
const n =
|
|
12982
|
+
const n = ct(t);
|
|
12944
12983
|
e(pu(t.tr, n, n.bottom));
|
|
12945
12984
|
}
|
|
12946
12985
|
return !0;
|
|
@@ -12971,9 +13010,9 @@ function N0(t, { map: e, table: n, tableStart: r }, o) {
|
|
|
12971
13010
|
}
|
|
12972
13011
|
}
|
|
12973
13012
|
function E0(t, e) {
|
|
12974
|
-
if (!
|
|
13013
|
+
if (!Ze(t)) return !1;
|
|
12975
13014
|
if (e) {
|
|
12976
|
-
const n =
|
|
13015
|
+
const n = ct(t), r = t.tr;
|
|
12977
13016
|
if (n.top == 0 && n.bottom == n.map.height) return !1;
|
|
12978
13017
|
for (let o = n.bottom - 1; N0(r, n, o), o != n.top; o--) {
|
|
12979
13018
|
const i = n.tableStart ? r.doc.nodeAt(n.tableStart - 1) : r.doc;
|
|
@@ -13007,7 +13046,7 @@ function fl(t, e) {
|
|
|
13007
13046
|
const n = t.selection;
|
|
13008
13047
|
if (!(n instanceof X) || n.$anchorCell.pos == n.$headCell.pos)
|
|
13009
13048
|
return !1;
|
|
13010
|
-
const r =
|
|
13049
|
+
const r = ct(t), { map: o } = r;
|
|
13011
13050
|
if (I0(o, r)) return !1;
|
|
13012
13051
|
if (e) {
|
|
13013
13052
|
const i = t.tr, s = {};
|
|
@@ -13065,7 +13104,7 @@ function P0(t) {
|
|
|
13065
13104
|
let a = i.attrs;
|
|
13066
13105
|
const l = [], c = a.colwidth;
|
|
13067
13106
|
a.rowspan > 1 && (a = { ...a, rowspan: 1 }), a.colspan > 1 && (a = { ...a, colspan: 1 });
|
|
13068
|
-
const d =
|
|
13107
|
+
const d = ct(e), u = e.tr;
|
|
13069
13108
|
for (let p = 0; p < d.right - d.left; p++)
|
|
13070
13109
|
l.push(
|
|
13071
13110
|
c ? {
|
|
@@ -13099,7 +13138,7 @@ function P0(t) {
|
|
|
13099
13138
|
}
|
|
13100
13139
|
function R0(t, e) {
|
|
13101
13140
|
return function(n, r) {
|
|
13102
|
-
if (!
|
|
13141
|
+
if (!Ze(n)) return !1;
|
|
13103
13142
|
const o = _o(n);
|
|
13104
13143
|
if (o.nodeAfter.attrs[t] === e) return !1;
|
|
13105
13144
|
if (r) {
|
|
@@ -13119,9 +13158,9 @@ function R0(t, e) {
|
|
|
13119
13158
|
}
|
|
13120
13159
|
function L0(t) {
|
|
13121
13160
|
return function(e, n) {
|
|
13122
|
-
if (!
|
|
13161
|
+
if (!Ze(e)) return !1;
|
|
13123
13162
|
if (n) {
|
|
13124
|
-
const r = ve(e.schema), o =
|
|
13163
|
+
const r = ve(e.schema), o = ct(e), i = e.tr, s = o.map.cellsInRect(
|
|
13125
13164
|
t == "column" ? {
|
|
13126
13165
|
left: o.left,
|
|
13127
13166
|
top: 0,
|
|
@@ -13168,9 +13207,9 @@ function hl(t, e, n) {
|
|
|
13168
13207
|
}
|
|
13169
13208
|
function wr(t, e) {
|
|
13170
13209
|
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? L0(t) : function(n, r) {
|
|
13171
|
-
if (!
|
|
13210
|
+
if (!Ze(n)) return !1;
|
|
13172
13211
|
if (r) {
|
|
13173
|
-
const o = ve(n.schema), i =
|
|
13212
|
+
const o = ve(n.schema), i = ct(n), s = n.tr, a = hl("row", i, o), l = hl(
|
|
13174
13213
|
"column",
|
|
13175
13214
|
i,
|
|
13176
13215
|
o
|
|
@@ -13226,7 +13265,7 @@ function B0(t, e) {
|
|
|
13226
13265
|
}
|
|
13227
13266
|
function ml(t) {
|
|
13228
13267
|
return function(e, n) {
|
|
13229
|
-
if (!
|
|
13268
|
+
if (!Ze(e)) return !1;
|
|
13230
13269
|
const r = B0(_o(e), t);
|
|
13231
13270
|
if (r == null) return !1;
|
|
13232
13271
|
if (n) {
|
|
@@ -13526,7 +13565,7 @@ function W0(t, e) {
|
|
|
13526
13565
|
return r ? (t.dispatch(t.state.tr.setSelection(new X(r))), !0) : !1;
|
|
13527
13566
|
}
|
|
13528
13567
|
function U0(t, e, n) {
|
|
13529
|
-
if (!
|
|
13568
|
+
if (!Ze(t.state)) return !1;
|
|
13530
13569
|
let r = z0(n);
|
|
13531
13570
|
const o = t.state.selection;
|
|
13532
13571
|
if (o instanceof X) {
|
|
@@ -13569,21 +13608,21 @@ function q0(t, e) {
|
|
|
13569
13608
|
return;
|
|
13570
13609
|
function i(l, c) {
|
|
13571
13610
|
let d = di(t, c);
|
|
13572
|
-
const u =
|
|
13611
|
+
const u = Pt.getState(t.state) == null;
|
|
13573
13612
|
if (!d || !$s(l, d))
|
|
13574
13613
|
if (u) d = l;
|
|
13575
13614
|
else return;
|
|
13576
13615
|
const f = new X(l, d);
|
|
13577
13616
|
if (u || !t.state.selection.eq(f)) {
|
|
13578
13617
|
const p = t.state.tr.setSelection(f);
|
|
13579
|
-
u && p.setMeta(
|
|
13618
|
+
u && p.setMeta(Pt, l.pos), t.dispatch(p);
|
|
13580
13619
|
}
|
|
13581
13620
|
}
|
|
13582
13621
|
function s() {
|
|
13583
|
-
t.root.removeEventListener("mouseup", s), t.root.removeEventListener("dragstart", s), t.root.removeEventListener("mousemove", a),
|
|
13622
|
+
t.root.removeEventListener("mouseup", s), t.root.removeEventListener("dragstart", s), t.root.removeEventListener("mousemove", a), Pt.getState(t.state) != null && t.dispatch(t.state.tr.setMeta(Pt, -1));
|
|
13584
13623
|
}
|
|
13585
13624
|
function a(l) {
|
|
13586
|
-
const c = l, d =
|
|
13625
|
+
const c = l, d = Pt.getState(t.state);
|
|
13587
13626
|
let u;
|
|
13588
13627
|
if (d != null)
|
|
13589
13628
|
u = t.state.doc.resolve(d);
|
|
@@ -13887,7 +13926,7 @@ function ow({
|
|
|
13887
13926
|
allowTableNodeSelection: t = !1
|
|
13888
13927
|
} = {}) {
|
|
13889
13928
|
return new Z({
|
|
13890
|
-
key:
|
|
13929
|
+
key: Pt,
|
|
13891
13930
|
// This piece of state is used to remember when a mouse-drag
|
|
13892
13931
|
// cell-selection is happening, so that it can continue even as
|
|
13893
13932
|
// transactions (which might move its anchor cell) come in.
|
|
@@ -13896,7 +13935,7 @@ function ow({
|
|
|
13896
13935
|
return null;
|
|
13897
13936
|
},
|
|
13898
13937
|
apply(e, n) {
|
|
13899
|
-
const r = e.getMeta(
|
|
13938
|
+
const r = e.getMeta(Pt);
|
|
13900
13939
|
if (r != null) return r == -1 ? null : r;
|
|
13901
13940
|
if (n == null || !e.docChanged) return n;
|
|
13902
13941
|
const { deleted: o, pos: i } = e.mapping.mapResult(n);
|
|
@@ -13909,7 +13948,7 @@ function ow({
|
|
|
13909
13948
|
mousedown: q0
|
|
13910
13949
|
},
|
|
13911
13950
|
createSelectionBetween(e) {
|
|
13912
|
-
return
|
|
13951
|
+
return Pt.getState(e.state) != null ? e.state.selection : null;
|
|
13913
13952
|
},
|
|
13914
13953
|
handleTripleClick: W0,
|
|
13915
13954
|
handleKeyDown: j0,
|
|
@@ -14056,7 +14095,7 @@ const iw = (t) => t instanceof X, Gr = ({ editor: t }) => {
|
|
|
14056
14095
|
deleteCellAndTableBorders: () => ({ chain: t, state: e, tr: n }) => {
|
|
14057
14096
|
if (!Cd(e))
|
|
14058
14097
|
return !1;
|
|
14059
|
-
const r =
|
|
14098
|
+
const r = je((s) => s.type.name === this.name)(e.selection);
|
|
14060
14099
|
if (!r)
|
|
14061
14100
|
return !1;
|
|
14062
14101
|
const o = r.pos, i = r.pos + r.node.nodeSize;
|
|
@@ -14252,10 +14291,10 @@ const iw = (t) => t instanceof X, Gr = ({ editor: t }) => {
|
|
|
14252
14291
|
return ["td", N.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
14253
14292
|
}
|
|
14254
14293
|
});
|
|
14255
|
-
var
|
|
14294
|
+
var yt, Yt;
|
|
14256
14295
|
class sw {
|
|
14257
14296
|
constructor(e) {
|
|
14258
|
-
|
|
14297
|
+
ft(this, yt);
|
|
14259
14298
|
P(this, "editor");
|
|
14260
14299
|
P(this, "node");
|
|
14261
14300
|
P(this, "decorations");
|
|
@@ -14280,13 +14319,13 @@ class sw {
|
|
|
14280
14319
|
(n[e] ?? n.default)();
|
|
14281
14320
|
}
|
|
14282
14321
|
buildTextView() {
|
|
14283
|
-
let { displayLabel: e } = this.node.attrs, { annotation: n } = I(this,
|
|
14322
|
+
let { displayLabel: e } = this.node.attrs, { annotation: n } = I(this, yt, Yt).call(this, {
|
|
14284
14323
|
displayLabel: e
|
|
14285
14324
|
});
|
|
14286
14325
|
this.dom = n;
|
|
14287
14326
|
}
|
|
14288
14327
|
buildImageView() {
|
|
14289
|
-
let { displayLabel: e, imageSrc: n } = this.node.attrs, { annotation: r, content: o } = I(this,
|
|
14328
|
+
let { displayLabel: e, imageSrc: n } = this.node.attrs, { annotation: r, content: o } = I(this, yt, Yt).call(this);
|
|
14290
14329
|
if (n) {
|
|
14291
14330
|
let i = document.createElement("img");
|
|
14292
14331
|
i.src = n, i.alt = e, i.style.height = "auto", i.style.maxWidth = "100%", i.style.pointerEvents = "none", i.style.verticalAlign = "middle", o.append(i), r.style.display = "inline-block", o.style.display = "inline-block";
|
|
@@ -14297,7 +14336,7 @@ class sw {
|
|
|
14297
14336
|
buildSignatureView() {
|
|
14298
14337
|
let { displayLabel: e, imageSrc: n } = this.node.attrs;
|
|
14299
14338
|
e = e || "Signature";
|
|
14300
|
-
let { annotation: r, content: o } = I(this,
|
|
14339
|
+
let { annotation: r, content: o } = I(this, yt, Yt).call(this);
|
|
14301
14340
|
if (n) {
|
|
14302
14341
|
let i = document.createElement("img");
|
|
14303
14342
|
i.src = n, i.alt = e, i.style.height = "auto", i.style.maxWidth = "100%", i.style.maxHeight = "28px", i.style.pointerEvents = "none", i.style.verticalAlign = "middle", o.append(i), r.style.display = "inline-block", o.style.display = "inline-block";
|
|
@@ -14306,17 +14345,17 @@ class sw {
|
|
|
14306
14345
|
this.dom = r;
|
|
14307
14346
|
}
|
|
14308
14347
|
buildCheckboxView() {
|
|
14309
|
-
let { displayLabel: e } = this.node.attrs, { annotation: n } = I(this,
|
|
14348
|
+
let { displayLabel: e } = this.node.attrs, { annotation: n } = I(this, yt, Yt).call(this, {
|
|
14310
14349
|
displayLabel: e
|
|
14311
14350
|
});
|
|
14312
14351
|
this.dom = n;
|
|
14313
14352
|
}
|
|
14314
14353
|
buildHTMLView() {
|
|
14315
|
-
let { displayLabel: e, rawHtml: n } = this.node.attrs, { annotation: r, content: o } = I(this,
|
|
14354
|
+
let { displayLabel: e, rawHtml: n } = this.node.attrs, { annotation: r, content: o } = I(this, yt, Yt).call(this);
|
|
14316
14355
|
n ? (o.innerHTML = n.trim(), r.style.display = "inline-block", o.style.display = "inline-block") : o.textContent = e, this.dom = r;
|
|
14317
14356
|
}
|
|
14318
14357
|
buildLinkView() {
|
|
14319
|
-
let { displayLabel: e, linkUrl: n } = this.node.attrs, { annotation: r, content: o } = I(this,
|
|
14358
|
+
let { displayLabel: e, linkUrl: n } = this.node.attrs, { annotation: r, content: o } = I(this, yt, Yt).call(this);
|
|
14320
14359
|
if (n) {
|
|
14321
14360
|
let i = document.createElement("a");
|
|
14322
14361
|
i.href = n, i.target = "_blank", i.textContent = n, i.style.textDecoration = "none", o.append(i), o.style.pointerEvents = "all";
|
|
@@ -14383,7 +14422,7 @@ class sw {
|
|
|
14383
14422
|
}), !0));
|
|
14384
14423
|
}
|
|
14385
14424
|
}
|
|
14386
|
-
|
|
14425
|
+
yt = new WeakSet(), Yt = function({ displayLabel: e } = {}) {
|
|
14387
14426
|
let { highlighted: n } = this.node.attrs, r = document.createElement("span");
|
|
14388
14427
|
r.classList.add(this.annotationClass);
|
|
14389
14428
|
let o = document.createElement("span");
|
|
@@ -14403,7 +14442,7 @@ gt = new WeakSet(), Yt = function({ displayLabel: e } = {}) {
|
|
|
14403
14442
|
function ku(t) {
|
|
14404
14443
|
let e = [];
|
|
14405
14444
|
return !t.steps.length || t.meta && !Object.keys(t.meta).every((n) => ["inputType", "uiEvent", "paste"].includes(n)) || ["historyUndo", "historyRedo"].includes(t.getMeta("inputType")) || ["drop"].includes(t.getMeta("uiEvent")) || t.getMeta("fieldAnnotationUpdate") === !0 || t.steps.forEach((n, r) => {
|
|
14406
|
-
if (n instanceof
|
|
14445
|
+
if (n instanceof Vt && n.from !== n.to) {
|
|
14407
14446
|
let o = t.mapping.maps[r];
|
|
14408
14447
|
t.before.nodesBetween(n.from, n.to, (s, a) => {
|
|
14409
14448
|
s.type.name === "fieldAnnotation" && o.mapResult(a).deleted && e.push({ node: s, pos: a });
|
|
@@ -14421,7 +14460,7 @@ function Cu(t, e) {
|
|
|
14421
14460
|
}, 0);
|
|
14422
14461
|
}
|
|
14423
14462
|
const { findChildren: aw } = Sd;
|
|
14424
|
-
function
|
|
14463
|
+
function Lt(t) {
|
|
14425
14464
|
return aw(t.doc, (n) => n.type.name === "fieldAnnotation");
|
|
14426
14465
|
}
|
|
14427
14466
|
const lw = (t = {}) => {
|
|
@@ -14489,7 +14528,7 @@ const lw = (t = {}) => {
|
|
|
14489
14528
|
appendTransaction: (r, o, i) => {
|
|
14490
14529
|
if (!(r.some((u) => u.docChanged) && !o.doc.eq(i.doc)))
|
|
14491
14530
|
return;
|
|
14492
|
-
let { tr: a, doc: l } = i, c = !1, d =
|
|
14531
|
+
let { tr: a, doc: l } = i, c = !1, d = Lt(i);
|
|
14493
14532
|
if (d.length)
|
|
14494
14533
|
return d.forEach(({ node: u, pos: f }) => {
|
|
14495
14534
|
let { marks: p } = u, h = a.doc.nodeAt(f);
|
|
@@ -14518,7 +14557,7 @@ function cw({ fieldAnnotation: t, editor: e, view: n, event: r }) {
|
|
|
14518
14557
|
});
|
|
14519
14558
|
}
|
|
14520
14559
|
function dw(t, e) {
|
|
14521
|
-
return
|
|
14560
|
+
return Lt(e).map(({ node: r, pos: o }) => {
|
|
14522
14561
|
let i = kd(t, o, o + r.nodeSize);
|
|
14523
14562
|
return {
|
|
14524
14563
|
node: r,
|
|
@@ -14528,7 +14567,7 @@ function dw(t, e) {
|
|
|
14528
14567
|
});
|
|
14529
14568
|
}
|
|
14530
14569
|
function uw(t, e) {
|
|
14531
|
-
let n =
|
|
14570
|
+
let n = Lt(e), r = [];
|
|
14532
14571
|
return n.forEach((o) => {
|
|
14533
14572
|
t(o.node) && r.push(o);
|
|
14534
14573
|
}), r;
|
|
@@ -14565,7 +14604,7 @@ const Wk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
14565
14604
|
findFieldAnnotationsByFieldId: lo,
|
|
14566
14605
|
findFirstFieldAnnotationByFieldId: pw,
|
|
14567
14606
|
findRemovedFieldAnnotations: ku,
|
|
14568
|
-
getAllFieldAnnotations:
|
|
14607
|
+
getAllFieldAnnotations: Lt,
|
|
14569
14608
|
getAllFieldAnnotationsWithRect: dw,
|
|
14570
14609
|
trackFieldAnnotationsDeletion: Cu
|
|
14571
14610
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -14810,7 +14849,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
14810
14849
|
parseDOM: (t) => t.getAttribute("data-font-size") || t.style.fontSize || null,
|
|
14811
14850
|
renderDOM: (t) => {
|
|
14812
14851
|
if (!t.fontSize) return {};
|
|
14813
|
-
let [e, n] =
|
|
14852
|
+
let [e, n] = Ct(t.fontSize);
|
|
14814
14853
|
if (Number.isNaN(e)) return {};
|
|
14815
14854
|
n = n || "pt";
|
|
14816
14855
|
let r = `${e}${n}`;
|
|
@@ -15013,7 +15052,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15013
15052
|
* })
|
|
15014
15053
|
*/
|
|
15015
15054
|
setFieldAnnotationsHiddenByCondition: (t = () => !1, e = !1) => ({ dispatch: n, state: r, chain: o }) => {
|
|
15016
|
-
let i =
|
|
15055
|
+
let i = Lt(r);
|
|
15017
15056
|
if (!i.length)
|
|
15018
15057
|
return !0;
|
|
15019
15058
|
if (n) {
|
|
@@ -15031,7 +15070,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15031
15070
|
* editor.commands.unsetFieldAnnotationsHidden()
|
|
15032
15071
|
*/
|
|
15033
15072
|
unsetFieldAnnotationsHidden: () => ({ dispatch: t, state: e, commands: n }) => {
|
|
15034
|
-
let r =
|
|
15073
|
+
let r = Lt(e);
|
|
15035
15074
|
return r.length && t ? n.updateFieldAnnotationsAttributes(r, { hidden: !1 }) : !0;
|
|
15036
15075
|
},
|
|
15037
15076
|
/**
|
|
@@ -15043,7 +15082,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15043
15082
|
* editor.commands.setFieldAnnotationsVisibility('hidden');
|
|
15044
15083
|
*/
|
|
15045
15084
|
setFieldAnnotationsVisibility: (t = "visible") => ({ dispatch: e, state: n, commands: r }) => {
|
|
15046
|
-
let o =
|
|
15085
|
+
let o = Lt(n);
|
|
15047
15086
|
return o.length ? this.options.visibilityOptions.includes(t) ? e ? r.updateFieldAnnotationsAttributes(o, {
|
|
15048
15087
|
visibility: t
|
|
15049
15088
|
}) : !0 : !1 : !0;
|
|
@@ -15062,7 +15101,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15062
15101
|
* editor.commands.setFieldAnnotationsHighlighted(() => true, true)
|
|
15063
15102
|
*/
|
|
15064
15103
|
setFieldAnnotationsHighlighted: (t = () => !1, e = !0) => ({ dispatch: n, state: r, commands: o }) => {
|
|
15065
|
-
let i =
|
|
15104
|
+
let i = Lt(r);
|
|
15066
15105
|
if (!i.length)
|
|
15067
15106
|
return !0;
|
|
15068
15107
|
if (n) {
|
|
@@ -15098,7 +15137,7 @@ const ls = "annotation", Su = "annotation-content", xu = Y.create({
|
|
|
15098
15137
|
let { from: s, to: a, node: l } = o.selection, c = co(s, a, o.doc);
|
|
15099
15138
|
if (!c.length)
|
|
15100
15139
|
return !0;
|
|
15101
|
-
let [d, u] =
|
|
15140
|
+
let [d, u] = Ct(t), f = 8, p = 96, h = "pt";
|
|
15102
15141
|
return Number.isNaN(d) ? !1 : (d = xo(d, f, p), u = u || h, n && (c.forEach((m) => {
|
|
15103
15142
|
i.updateFieldAnnotationsAttributes([m], {
|
|
15104
15143
|
fontSize: `${d}${u}`
|
|
@@ -15791,7 +15830,7 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15791
15830
|
const s = new lr();
|
|
15792
15831
|
return i.nodesBetween(t, e, (a, l) => {
|
|
15793
15832
|
if (a.marks && a.marks.find((c) => c.type.name === ue)) {
|
|
15794
|
-
const c = new
|
|
15833
|
+
const c = new Vt(
|
|
15795
15834
|
s.map(Math.max(l, t)),
|
|
15796
15835
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15797
15836
|
H.empty
|
|
@@ -15833,7 +15872,7 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15833
15872
|
)
|
|
15834
15873
|
);
|
|
15835
15874
|
} else if (a.marks && a.marks.find((c) => c.type.name === Ve)) {
|
|
15836
|
-
const c = new
|
|
15875
|
+
const c = new Vt(
|
|
15837
15876
|
s.map(Math.max(l, t)),
|
|
15838
15877
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15839
15878
|
H.empty
|
|
@@ -15981,12 +16020,12 @@ const Iw = "track-insert", Ru = Fe.create({
|
|
|
15981
16020
|
})];
|
|
15982
16021
|
}
|
|
15983
16022
|
});
|
|
15984
|
-
var De = "top",
|
|
16023
|
+
var De = "top", Ue = "bottom", qe = "right", Ne = "left", Vs = "auto", Er = [De, Ue, qe, Ne], In = "start", kr = "end", Bw = "clippingParents", Bu = "viewport", Xn = "popper", _w = "reference", Ol = /* @__PURE__ */ Er.reduce(function(t, e) {
|
|
15985
16024
|
return t.concat([e + "-" + In, e + "-" + kr]);
|
|
15986
16025
|
}, []), _u = /* @__PURE__ */ [].concat(Er, [Vs]).reduce(function(t, e) {
|
|
15987
16026
|
return t.concat([e, e + "-" + In, e + "-" + kr]);
|
|
15988
16027
|
}, []), zw = "beforeRead", $w = "read", Vw = "afterRead", Hw = "beforeMain", jw = "main", Ww = "afterMain", Uw = "beforeWrite", qw = "write", Kw = "afterWrite", Xw = [zw, $w, Vw, Hw, jw, Ww, Uw, qw, Kw];
|
|
15989
|
-
function
|
|
16028
|
+
function lt(t) {
|
|
15990
16029
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
15991
16030
|
}
|
|
15992
16031
|
function Le(t) {
|
|
@@ -16002,7 +16041,7 @@ function un(t) {
|
|
|
16002
16041
|
var e = Le(t).Element;
|
|
16003
16042
|
return t instanceof e || t instanceof Element;
|
|
16004
16043
|
}
|
|
16005
|
-
function
|
|
16044
|
+
function We(t) {
|
|
16006
16045
|
var e = Le(t).HTMLElement;
|
|
16007
16046
|
return t instanceof e || t instanceof HTMLElement;
|
|
16008
16047
|
}
|
|
@@ -16016,7 +16055,7 @@ function Jw(t) {
|
|
|
16016
16055
|
var e = t.state;
|
|
16017
16056
|
Object.keys(e.elements).forEach(function(n) {
|
|
16018
16057
|
var r = e.styles[n] || {}, o = e.attributes[n] || {}, i = e.elements[n];
|
|
16019
|
-
!
|
|
16058
|
+
!We(i) || !lt(i) || (Object.assign(i.style, r), Object.keys(o).forEach(function(s) {
|
|
16020
16059
|
var a = o[s];
|
|
16021
16060
|
a === !1 ? i.removeAttribute(s) : i.setAttribute(s, a === !0 ? "" : a);
|
|
16022
16061
|
}));
|
|
@@ -16040,7 +16079,7 @@ function Yw(t) {
|
|
|
16040
16079
|
var o = e.elements[r], i = e.attributes[r] || {}, s = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), a = s.reduce(function(l, c) {
|
|
16041
16080
|
return l[c] = "", l;
|
|
16042
16081
|
}, {});
|
|
16043
|
-
!
|
|
16082
|
+
!We(o) || !lt(o) || (Object.assign(o.style, a), Object.keys(i).forEach(function(l) {
|
|
16044
16083
|
o.removeAttribute(l);
|
|
16045
16084
|
}));
|
|
16046
16085
|
});
|
|
@@ -16054,7 +16093,7 @@ const zu = {
|
|
|
16054
16093
|
effect: Yw,
|
|
16055
16094
|
requires: ["computeStyles"]
|
|
16056
16095
|
};
|
|
16057
|
-
function
|
|
16096
|
+
function it(t) {
|
|
16058
16097
|
return t.split("-")[0];
|
|
16059
16098
|
}
|
|
16060
16099
|
var sn = Math.max, Oo = Math.min, Pn = Math.round;
|
|
@@ -16070,7 +16109,7 @@ function $u() {
|
|
|
16070
16109
|
function Rn(t, e, n) {
|
|
16071
16110
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
16072
16111
|
var r = t.getBoundingClientRect(), o = 1, i = 1;
|
|
16073
|
-
e &&
|
|
16112
|
+
e && We(t) && (o = t.offsetWidth > 0 && Pn(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Pn(r.height) / t.offsetHeight || 1);
|
|
16074
16113
|
var s = un(t) ? Le(t) : window, a = s.visualViewport, l = !$u() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, u = r.width / o, f = r.height / i;
|
|
16075
16114
|
return {
|
|
16076
16115
|
width: u,
|
|
@@ -16106,11 +16145,11 @@ function Vu(t, e) {
|
|
|
16106
16145
|
}
|
|
16107
16146
|
return !1;
|
|
16108
16147
|
}
|
|
16109
|
-
function
|
|
16148
|
+
function St(t) {
|
|
16110
16149
|
return Le(t).getComputedStyle(t);
|
|
16111
16150
|
}
|
|
16112
16151
|
function Gw(t) {
|
|
16113
|
-
return ["table", "td", "th"].indexOf(
|
|
16152
|
+
return ["table", "td", "th"].indexOf(lt(t)) >= 0;
|
|
16114
16153
|
}
|
|
16115
16154
|
function Ut(t) {
|
|
16116
16155
|
return ((un(t) ? t.ownerDocument : (
|
|
@@ -16119,7 +16158,7 @@ function Ut(t) {
|
|
|
16119
16158
|
)) || window.document).documentElement;
|
|
16120
16159
|
}
|
|
16121
16160
|
function zo(t) {
|
|
16122
|
-
return
|
|
16161
|
+
return lt(t) === "html" ? t : (
|
|
16123
16162
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
16124
16163
|
// $FlowFixMe[incompatible-return]
|
|
16125
16164
|
// $FlowFixMe[prop-missing]
|
|
@@ -16131,19 +16170,19 @@ function zo(t) {
|
|
|
16131
16170
|
);
|
|
16132
16171
|
}
|
|
16133
16172
|
function Tl(t) {
|
|
16134
|
-
return !
|
|
16135
|
-
|
|
16173
|
+
return !We(t) || // https://github.com/popperjs/popper-core/issues/837
|
|
16174
|
+
St(t).position === "fixed" ? null : t.offsetParent;
|
|
16136
16175
|
}
|
|
16137
16176
|
function Zw(t) {
|
|
16138
16177
|
var e = /firefox/i.test(ds()), n = /Trident/i.test(ds());
|
|
16139
|
-
if (n &&
|
|
16140
|
-
var r =
|
|
16178
|
+
if (n && We(t)) {
|
|
16179
|
+
var r = St(t);
|
|
16141
16180
|
if (r.position === "fixed")
|
|
16142
16181
|
return null;
|
|
16143
16182
|
}
|
|
16144
16183
|
var o = zo(t);
|
|
16145
|
-
for (Hs(o) && (o = o.host);
|
|
16146
|
-
var i =
|
|
16184
|
+
for (Hs(o) && (o = o.host); We(o) && ["html", "body"].indexOf(lt(o)) < 0; ) {
|
|
16185
|
+
var i = St(o);
|
|
16147
16186
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none")
|
|
16148
16187
|
return o;
|
|
16149
16188
|
o = o.parentNode;
|
|
@@ -16151,9 +16190,9 @@ function Zw(t) {
|
|
|
16151
16190
|
return null;
|
|
16152
16191
|
}
|
|
16153
16192
|
function Ir(t) {
|
|
16154
|
-
for (var e = Le(t), n = Tl(t); n && Gw(n) &&
|
|
16193
|
+
for (var e = Le(t), n = Tl(t); n && Gw(n) && St(n).position === "static"; )
|
|
16155
16194
|
n = Tl(n);
|
|
16156
|
-
return n && (
|
|
16195
|
+
return n && (lt(n) === "html" || lt(n) === "body" && St(n).position === "static") ? e : n || Zw(t) || e;
|
|
16157
16196
|
}
|
|
16158
16197
|
function Ws(t) {
|
|
16159
16198
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
@@ -16187,9 +16226,9 @@ var ev = function(e, n) {
|
|
|
16187
16226
|
})) : e, ju(typeof e != "number" ? e : Wu(e, Er));
|
|
16188
16227
|
};
|
|
16189
16228
|
function tv(t) {
|
|
16190
|
-
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a =
|
|
16229
|
+
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = it(n.placement), l = Ws(a), c = [Ne, qe].indexOf(a) >= 0, d = c ? "height" : "width";
|
|
16191
16230
|
if (!(!i || !s)) {
|
|
16192
|
-
var u = ev(o.padding, n), f = js(i), p = l === "y" ? De : Ne, h = l === "y" ?
|
|
16231
|
+
var u = ev(o.padding, n), f = js(i), p = l === "y" ? De : Ne, h = l === "y" ? Ue : qe, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = Ir(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, C = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + C, M = or(y, k, S), L = l;
|
|
16193
16232
|
n.modifiersData[r] = (e = {}, e[L] = M, e.centerOffset = M - k, e);
|
|
16194
16233
|
}
|
|
16195
16234
|
}
|
|
@@ -16234,16 +16273,16 @@ function Dl(t) {
|
|
|
16234
16273
|
var b = s.hasOwnProperty("x"), w = s.hasOwnProperty("y"), C = Ne, y = De, S = window;
|
|
16235
16274
|
if (c) {
|
|
16236
16275
|
var k = Ir(n), M = "clientHeight", L = "clientWidth";
|
|
16237
|
-
if (k === Le(n) && (k = Ut(n),
|
|
16238
|
-
y =
|
|
16276
|
+
if (k === Le(n) && (k = Ut(n), St(k).position !== "static" && a === "absolute" && (M = "scrollHeight", L = "scrollWidth")), k = k, o === De || (o === Ne || o === qe) && i === kr) {
|
|
16277
|
+
y = Ue;
|
|
16239
16278
|
var x = u && k === S && S.visualViewport ? S.visualViewport.height : (
|
|
16240
16279
|
// $FlowFixMe[prop-missing]
|
|
16241
16280
|
k[M]
|
|
16242
16281
|
);
|
|
16243
16282
|
m -= x - r.height, m *= l ? 1 : -1;
|
|
16244
16283
|
}
|
|
16245
|
-
if (o === Ne || (o === De || o ===
|
|
16246
|
-
C =
|
|
16284
|
+
if (o === Ne || (o === De || o === Ue) && i === kr) {
|
|
16285
|
+
C = qe;
|
|
16247
16286
|
var $ = u && k === S && S.visualViewport ? S.visualViewport.width : (
|
|
16248
16287
|
// $FlowFixMe[prop-missing]
|
|
16249
16288
|
k[L]
|
|
@@ -16268,7 +16307,7 @@ function Dl(t) {
|
|
|
16268
16307
|
}
|
|
16269
16308
|
function sv(t) {
|
|
16270
16309
|
var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, s = i === void 0 ? !0 : i, a = n.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
16271
|
-
placement:
|
|
16310
|
+
placement: it(e.placement),
|
|
16272
16311
|
variation: Ln(e.placement),
|
|
16273
16312
|
popper: e.elements.popper,
|
|
16274
16313
|
popperRect: e.rects.popper,
|
|
@@ -16364,7 +16403,7 @@ function fv(t, e) {
|
|
|
16364
16403
|
}
|
|
16365
16404
|
function pv(t) {
|
|
16366
16405
|
var e, n = Ut(t), r = Us(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i = sn(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = sn(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), a = -r.scrollLeft + qs(t), l = -r.scrollTop;
|
|
16367
|
-
return
|
|
16406
|
+
return St(o || n).direction === "rtl" && (a += sn(n.clientWidth, o ? o.clientWidth : 0) - i), {
|
|
16368
16407
|
width: i,
|
|
16369
16408
|
height: s,
|
|
16370
16409
|
x: a,
|
|
@@ -16372,11 +16411,11 @@ function pv(t) {
|
|
|
16372
16411
|
};
|
|
16373
16412
|
}
|
|
16374
16413
|
function Ks(t) {
|
|
16375
|
-
var e =
|
|
16414
|
+
var e = St(t), n = e.overflow, r = e.overflowX, o = e.overflowY;
|
|
16376
16415
|
return /auto|scroll|overlay|hidden/.test(n + o + r);
|
|
16377
16416
|
}
|
|
16378
16417
|
function Uu(t) {
|
|
16379
|
-
return ["html", "body", "#document"].indexOf(
|
|
16418
|
+
return ["html", "body", "#document"].indexOf(lt(t)) >= 0 ? t.ownerDocument.body : We(t) && Ks(t) ? t : Uu(zo(t));
|
|
16380
16419
|
}
|
|
16381
16420
|
function ir(t, e) {
|
|
16382
16421
|
var n;
|
|
@@ -16403,9 +16442,9 @@ function El(t, e, n) {
|
|
|
16403
16442
|
return e === Bu ? us(fv(t, n)) : un(e) ? hv(e, n) : us(pv(Ut(t)));
|
|
16404
16443
|
}
|
|
16405
16444
|
function mv(t) {
|
|
16406
|
-
var e = ir(zo(t)), n = ["absolute", "fixed"].indexOf(
|
|
16445
|
+
var e = ir(zo(t)), n = ["absolute", "fixed"].indexOf(St(t).position) >= 0, r = n && We(t) ? Ir(t) : t;
|
|
16407
16446
|
return un(r) ? e.filter(function(o) {
|
|
16408
|
-
return un(o) && Vu(o, r) &&
|
|
16447
|
+
return un(o) && Vu(o, r) && lt(o) !== "body";
|
|
16409
16448
|
}) : [];
|
|
16410
16449
|
}
|
|
16411
16450
|
function gv(t, e, n, r) {
|
|
@@ -16416,7 +16455,7 @@ function gv(t, e, n, r) {
|
|
|
16416
16455
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
16417
16456
|
}
|
|
16418
16457
|
function qu(t) {
|
|
16419
|
-
var e = t.reference, n = t.element, r = t.placement, o = r ?
|
|
16458
|
+
var e = t.reference, n = t.element, r = t.placement, o = r ? it(r) : null, i = r ? Ln(r) : null, s = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
|
|
16420
16459
|
switch (o) {
|
|
16421
16460
|
case De:
|
|
16422
16461
|
l = {
|
|
@@ -16424,13 +16463,13 @@ function qu(t) {
|
|
|
16424
16463
|
y: e.y - n.height
|
|
16425
16464
|
};
|
|
16426
16465
|
break;
|
|
16427
|
-
case
|
|
16466
|
+
case Ue:
|
|
16428
16467
|
l = {
|
|
16429
16468
|
x: s,
|
|
16430
16469
|
y: e.y + e.height
|
|
16431
16470
|
};
|
|
16432
16471
|
break;
|
|
16433
|
-
case
|
|
16472
|
+
case qe:
|
|
16434
16473
|
l = {
|
|
16435
16474
|
x: e.x + e.width,
|
|
16436
16475
|
y: a
|
|
@@ -16477,7 +16516,7 @@ function Cr(t, e) {
|
|
|
16477
16516
|
if (f === Xn && _) {
|
|
16478
16517
|
var U = _[o];
|
|
16479
16518
|
Object.keys($).forEach(function(W) {
|
|
16480
|
-
var ee = [
|
|
16519
|
+
var ee = [qe, Ue].indexOf(W) >= 0 ? 1 : -1, oe = [De, Ue].indexOf(W) >= 0 ? "y" : "x";
|
|
16481
16520
|
$[W] += U[oe] * ee;
|
|
16482
16521
|
});
|
|
16483
16522
|
}
|
|
@@ -16497,14 +16536,14 @@ function yv(t, e) {
|
|
|
16497
16536
|
boundary: o,
|
|
16498
16537
|
rootBoundary: i,
|
|
16499
16538
|
padding: s
|
|
16500
|
-
})[
|
|
16539
|
+
})[it(m)], h;
|
|
16501
16540
|
}, {});
|
|
16502
16541
|
return Object.keys(p).sort(function(h, m) {
|
|
16503
16542
|
return p[h] - p[m];
|
|
16504
16543
|
});
|
|
16505
16544
|
}
|
|
16506
16545
|
function bv(t) {
|
|
16507
|
-
if (
|
|
16546
|
+
if (it(t) === Vs)
|
|
16508
16547
|
return [];
|
|
16509
16548
|
var e = uo(t);
|
|
16510
16549
|
return [Nl(t), e, Nl(e)];
|
|
@@ -16512,8 +16551,8 @@ function bv(t) {
|
|
|
16512
16551
|
function wv(t) {
|
|
16513
16552
|
var e = t.state, n = t.options, r = t.name;
|
|
16514
16553
|
if (!e.modifiersData[r]._skip) {
|
|
16515
|
-
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b =
|
|
16516
|
-
return
|
|
16554
|
+
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = it(g), w = b === g, C = l || (w || !h ? [uo(g)] : bv(g)), y = [g].concat(C).reduce(function(Ke, Ee) {
|
|
16555
|
+
return Ke.concat(it(Ee) === Vs ? yv(e, {
|
|
16517
16556
|
placement: Ee,
|
|
16518
16557
|
boundary: d,
|
|
16519
16558
|
rootBoundary: u,
|
|
@@ -16522,17 +16561,17 @@ function wv(t) {
|
|
|
16522
16561
|
allowedAutoPlacements: m
|
|
16523
16562
|
}) : Ee);
|
|
16524
16563
|
}, []), S = e.rects.reference, k = e.rects.popper, M = /* @__PURE__ */ new Map(), L = !0, x = y[0], $ = 0; $ < y.length; $++) {
|
|
16525
|
-
var _ = y[$], U =
|
|
16564
|
+
var _ = y[$], U = it(_), W = Ln(_) === In, ee = [De, Ue].indexOf(U) >= 0, oe = ee ? "width" : "height", ae = Cr(e, {
|
|
16526
16565
|
placement: _,
|
|
16527
16566
|
boundary: d,
|
|
16528
16567
|
rootBoundary: u,
|
|
16529
16568
|
altBoundary: f,
|
|
16530
16569
|
padding: c
|
|
16531
|
-
}), ce = ee ? W ?
|
|
16570
|
+
}), ce = ee ? W ? qe : Ne : W ? Ue : De;
|
|
16532
16571
|
S[oe] > k[oe] && (ce = uo(ce));
|
|
16533
16572
|
var se = uo(ce), pe = [];
|
|
16534
|
-
if (i && pe.push(ae[U] <= 0), a && pe.push(ae[ce] <= 0, ae[se] <= 0), pe.every(function(
|
|
16535
|
-
return
|
|
16573
|
+
if (i && pe.push(ae[U] <= 0), a && pe.push(ae[ce] <= 0, ae[se] <= 0), pe.every(function(Ke) {
|
|
16574
|
+
return Ke;
|
|
16536
16575
|
})) {
|
|
16537
16576
|
x = _, L = !1;
|
|
16538
16577
|
break;
|
|
@@ -16541,18 +16580,18 @@ function wv(t) {
|
|
|
16541
16580
|
}
|
|
16542
16581
|
if (L)
|
|
16543
16582
|
for (var ke = h ? 3 : 1, Be = function(Ee) {
|
|
16544
|
-
var
|
|
16545
|
-
var
|
|
16546
|
-
if (
|
|
16547
|
-
return
|
|
16548
|
-
return
|
|
16583
|
+
var Xe = y.find(function(Mt) {
|
|
16584
|
+
var Je = M.get(Mt);
|
|
16585
|
+
if (Je)
|
|
16586
|
+
return Je.slice(0, Ee).every(function(At) {
|
|
16587
|
+
return At;
|
|
16549
16588
|
});
|
|
16550
16589
|
});
|
|
16551
|
-
if (
|
|
16552
|
-
return x =
|
|
16590
|
+
if (Xe)
|
|
16591
|
+
return x = Xe, "break";
|
|
16553
16592
|
}, Ce = ke; Ce > 0; Ce--) {
|
|
16554
|
-
var
|
|
16555
|
-
if (
|
|
16593
|
+
var dt = Be(Ce);
|
|
16594
|
+
if (dt === "break") break;
|
|
16556
16595
|
}
|
|
16557
16596
|
e.placement !== x && (e.modifiersData[r]._skip = !0, e.placement = x, e.reset = !0);
|
|
16558
16597
|
}
|
|
@@ -16579,7 +16618,7 @@ function Il(t, e, n) {
|
|
|
16579
16618
|
};
|
|
16580
16619
|
}
|
|
16581
16620
|
function Pl(t) {
|
|
16582
|
-
return [De,
|
|
16621
|
+
return [De, qe, Ue, Ne].some(function(e) {
|
|
16583
16622
|
return t[e] >= 0;
|
|
16584
16623
|
});
|
|
16585
16624
|
}
|
|
@@ -16607,10 +16646,10 @@ const Cv = {
|
|
|
16607
16646
|
fn: kv
|
|
16608
16647
|
};
|
|
16609
16648
|
function Sv(t, e, n) {
|
|
16610
|
-
var r =
|
|
16649
|
+
var r = it(t), o = [Ne, De].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, {
|
|
16611
16650
|
placement: t
|
|
16612
16651
|
})) : n, s = i[0], a = i[1];
|
|
16613
|
-
return s = s || 0, a = (a || 0) * o, [Ne,
|
|
16652
|
+
return s = s || 0, a = (a || 0) * o, [Ne, qe].indexOf(r) >= 0 ? {
|
|
16614
16653
|
x: a,
|
|
16615
16654
|
y: s
|
|
16616
16655
|
} : {
|
|
@@ -16655,7 +16694,7 @@ function Dv(t) {
|
|
|
16655
16694
|
rootBoundary: c,
|
|
16656
16695
|
padding: u,
|
|
16657
16696
|
altBoundary: d
|
|
16658
|
-
}), b =
|
|
16697
|
+
}), b = it(e.placement), w = Ln(e.placement), C = !w, y = Ws(b), S = Tv(y), k = e.modifiersData.popperOffsets, M = e.rects.reference, L = e.rects.popper, x = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
16659
16698
|
placement: e.placement
|
|
16660
16699
|
})) : m, $ = typeof x == "number" ? {
|
|
16661
16700
|
mainAxis: x,
|
|
@@ -16669,15 +16708,15 @@ function Dv(t) {
|
|
|
16669
16708
|
};
|
|
16670
16709
|
if (k) {
|
|
16671
16710
|
if (i) {
|
|
16672
|
-
var W, ee = y === "y" ? De : Ne, oe = y === "y" ?
|
|
16711
|
+
var W, ee = y === "y" ? De : Ne, oe = y === "y" ? Ue : qe, ae = y === "y" ? "height" : "width", ce = k[y], se = ce + g[ee], pe = ce - g[oe], ke = p ? -L[ae] / 2 : 0, Be = w === In ? M[ae] : L[ae], Ce = w === In ? -L[ae] : -M[ae], dt = e.elements.arrow, Ke = p && dt ? js(dt) : {
|
|
16673
16712
|
width: 0,
|
|
16674
16713
|
height: 0
|
|
16675
|
-
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(),
|
|
16714
|
+
}, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(), Xe = Ee[ee], Mt = Ee[oe], Je = or(0, M[ae], Ke[ae]), At = C ? M[ae] / 2 - ke - Je - Xe - $.mainAxis : Be - Je - Xe - $.mainAxis, Ot = C ? -M[ae] / 2 + ke + Je + Mt + $.mainAxis : Ce + Je + Mt + $.mainAxis, fn = e.elements.arrow && Ir(e.elements.arrow), Rr = fn ? y === "y" ? fn.clientTop || 0 : fn.clientLeft || 0 : 0, Vn = (W = _?.[y]) != null ? W : 0, Lr = ce + At - Vn - Rr, Fr = ce + Ot - Vn, Hn = or(p ? Oo(se, Lr) : se, ce, p ? sn(pe, Fr) : pe);
|
|
16676
16715
|
k[y] = Hn, U[y] = Hn - ce;
|
|
16677
16716
|
}
|
|
16678
16717
|
if (a) {
|
|
16679
|
-
var jn, Br = y === "x" ? De : Ne, _r = y === "x" ?
|
|
16680
|
-
k[S] = Hr, U[S] = Hr -
|
|
16718
|
+
var jn, Br = y === "x" ? De : Ne, _r = y === "x" ? Ue : qe, ut = k[S], Tt = S === "y" ? "height" : "width", Wn = ut + g[Br], qt = ut - g[_r], Un = [De, Ne].indexOf(b) !== -1, zr = (jn = _?.[S]) != null ? jn : 0, $r = Un ? Wn : ut - M[Tt] - L[Tt] - zr + $.altAxis, Vr = Un ? ut + M[Tt] + L[Tt] - zr - $.altAxis : qt, Hr = p && Un ? Qw($r, ut, Vr) : or(p ? $r : Wn, ut, p ? Vr : qt);
|
|
16719
|
+
k[S] = Hr, U[S] = Hr - ut;
|
|
16681
16720
|
}
|
|
16682
16721
|
e.modifiersData[r] = U;
|
|
16683
16722
|
}
|
|
@@ -16696,7 +16735,7 @@ function Ev(t) {
|
|
|
16696
16735
|
};
|
|
16697
16736
|
}
|
|
16698
16737
|
function Iv(t) {
|
|
16699
|
-
return t === Le(t) || !
|
|
16738
|
+
return t === Le(t) || !We(t) ? Us(t) : Ev(t);
|
|
16700
16739
|
}
|
|
16701
16740
|
function Pv(t) {
|
|
16702
16741
|
var e = t.getBoundingClientRect(), n = Pn(e.width) / t.offsetWidth || 1, r = Pn(e.height) / t.offsetHeight || 1;
|
|
@@ -16704,15 +16743,15 @@ function Pv(t) {
|
|
|
16704
16743
|
}
|
|
16705
16744
|
function Rv(t, e, n) {
|
|
16706
16745
|
n === void 0 && (n = !1);
|
|
16707
|
-
var r =
|
|
16746
|
+
var r = We(e), o = We(e) && Pv(e), i = Ut(e), s = Rn(t, o, n), a = {
|
|
16708
16747
|
scrollLeft: 0,
|
|
16709
16748
|
scrollTop: 0
|
|
16710
16749
|
}, l = {
|
|
16711
16750
|
x: 0,
|
|
16712
16751
|
y: 0
|
|
16713
16752
|
};
|
|
16714
|
-
return (r || !r && !n) && ((
|
|
16715
|
-
Ks(i)) && (a = Iv(e)),
|
|
16753
|
+
return (r || !r && !n) && ((lt(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
16754
|
+
Ks(i)) && (a = Iv(e)), We(e) ? (l = Rn(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = qs(i))), {
|
|
16716
16755
|
x: s.left + a.scrollLeft - l.x,
|
|
16717
16756
|
y: s.top + a.scrollTop - l.y,
|
|
16718
16757
|
width: s.width,
|
|
@@ -17004,15 +17043,15 @@ function $l(t, e) {
|
|
|
17004
17043
|
}
|
|
17005
17044
|
return !1;
|
|
17006
17045
|
}
|
|
17007
|
-
var
|
|
17046
|
+
var rt = {
|
|
17008
17047
|
isTouch: !1
|
|
17009
17048
|
}, Vl = 0;
|
|
17010
17049
|
function tk() {
|
|
17011
|
-
|
|
17050
|
+
rt.isTouch || (rt.isTouch = !0, window.performance && document.addEventListener("mousemove", Zu));
|
|
17012
17051
|
}
|
|
17013
17052
|
function Zu() {
|
|
17014
17053
|
var t = performance.now();
|
|
17015
|
-
t - Vl < 20 && (
|
|
17054
|
+
t - Vl < 20 && (rt.isTouch = !1, document.removeEventListener("mousemove", Zu)), Vl = t;
|
|
17016
17055
|
}
|
|
17017
17056
|
function nk() {
|
|
17018
17057
|
var t = document.activeElement;
|
|
@@ -17061,7 +17100,7 @@ ie.env.NODE_ENV !== "production" && ak();
|
|
|
17061
17100
|
function ak() {
|
|
17062
17101
|
xr = /* @__PURE__ */ new Set();
|
|
17063
17102
|
}
|
|
17064
|
-
function
|
|
17103
|
+
function gt(t, e) {
|
|
17065
17104
|
if (t && !xr.has(e)) {
|
|
17066
17105
|
var n;
|
|
17067
17106
|
xr.add(e), (n = console).warn.apply(n, Qu(e));
|
|
@@ -17193,7 +17232,7 @@ function nf(t, e) {
|
|
|
17193
17232
|
var o = Uv(Pe, Object.keys(ef)), i = !Wv(o, r);
|
|
17194
17233
|
i && (i = e.filter(function(s) {
|
|
17195
17234
|
return s.name === r;
|
|
17196
|
-
}).length === 0),
|
|
17235
|
+
}).length === 0), gt(i, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
17197
17236
|
|
|
17198
17237
|
`, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
17199
17238
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
@@ -17310,7 +17349,7 @@ function mk(t, e) {
|
|
|
17310
17349
|
return hs(k);
|
|
17311
17350
|
}
|
|
17312
17351
|
function ae(v) {
|
|
17313
|
-
return y.state.isMounted && !y.state.isVisible ||
|
|
17352
|
+
return y.state.isMounted && !y.state.isVisible || rt.isTouch || d && d.type === "focus" ? 0 : ui(y.props.delay, v ? 0 : 1, Pe.delay);
|
|
17314
17353
|
}
|
|
17315
17354
|
function ce(v) {
|
|
17316
17355
|
v === void 0 && (v = !1), k.style.pointerEvents = y.props.interactive && !v ? "" : "none", k.style.zIndex = "" + y.props.zIndex;
|
|
@@ -17352,45 +17391,45 @@ function mk(t, e) {
|
|
|
17352
17391
|
});
|
|
17353
17392
|
}
|
|
17354
17393
|
function Ce(v) {
|
|
17355
|
-
if (!(
|
|
17394
|
+
if (!(rt.isTouch && (l || v.type === "mousedown"))) {
|
|
17356
17395
|
var A = v.composedPath && v.composedPath()[0] || v.target;
|
|
17357
17396
|
if (!(y.props.interactive && $l(k, A))) {
|
|
17358
17397
|
if (Sn(y.props.triggerTarget || t).some(function(R) {
|
|
17359
17398
|
return $l(R, A);
|
|
17360
17399
|
})) {
|
|
17361
|
-
if (
|
|
17400
|
+
if (rt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
|
|
17362
17401
|
return;
|
|
17363
17402
|
} else
|
|
17364
17403
|
se("onClickOutside", [y, v]);
|
|
17365
17404
|
y.props.hideOnClick === !0 && (y.clearDelayTimeouts(), y.hide(), a = !0, setTimeout(function() {
|
|
17366
17405
|
a = !1;
|
|
17367
|
-
}), y.state.isMounted ||
|
|
17406
|
+
}), y.state.isMounted || Xe());
|
|
17368
17407
|
}
|
|
17369
17408
|
}
|
|
17370
17409
|
}
|
|
17371
|
-
function
|
|
17410
|
+
function dt() {
|
|
17372
17411
|
l = !0;
|
|
17373
17412
|
}
|
|
17374
|
-
function
|
|
17413
|
+
function Ke() {
|
|
17375
17414
|
l = !1;
|
|
17376
17415
|
}
|
|
17377
17416
|
function Ee() {
|
|
17378
17417
|
var v = ee();
|
|
17379
|
-
v.addEventListener("mousedown", Ce, !0), v.addEventListener("touchend", Ce, Gt), v.addEventListener("touchstart",
|
|
17418
|
+
v.addEventListener("mousedown", Ce, !0), v.addEventListener("touchend", Ce, Gt), v.addEventListener("touchstart", Ke, Gt), v.addEventListener("touchmove", dt, Gt);
|
|
17380
17419
|
}
|
|
17381
|
-
function
|
|
17420
|
+
function Xe() {
|
|
17382
17421
|
var v = ee();
|
|
17383
|
-
v.removeEventListener("mousedown", Ce, !0), v.removeEventListener("touchend", Ce, Gt), v.removeEventListener("touchstart",
|
|
17422
|
+
v.removeEventListener("mousedown", Ce, !0), v.removeEventListener("touchend", Ce, Gt), v.removeEventListener("touchstart", Ke, Gt), v.removeEventListener("touchmove", dt, Gt);
|
|
17384
17423
|
}
|
|
17385
|
-
function
|
|
17386
|
-
|
|
17424
|
+
function Mt(v, A) {
|
|
17425
|
+
At(v, function() {
|
|
17387
17426
|
!y.state.isVisible && k.parentNode && k.parentNode.contains(k) && A();
|
|
17388
17427
|
});
|
|
17389
17428
|
}
|
|
17390
|
-
function
|
|
17391
|
-
|
|
17429
|
+
function Je(v, A) {
|
|
17430
|
+
At(v, A);
|
|
17392
17431
|
}
|
|
17393
|
-
function
|
|
17432
|
+
function At(v, A) {
|
|
17394
17433
|
var R = oe().box;
|
|
17395
17434
|
function q(j) {
|
|
17396
17435
|
j.target === R && (pi(R, "remove", q), A());
|
|
@@ -17399,7 +17438,7 @@ function mk(t, e) {
|
|
|
17399
17438
|
return A();
|
|
17400
17439
|
pi(R, "remove", u), pi(R, "add", q), u = q;
|
|
17401
17440
|
}
|
|
17402
|
-
function
|
|
17441
|
+
function Ot(v, A, R) {
|
|
17403
17442
|
R === void 0 && (R = !1);
|
|
17404
17443
|
var q = Sn(y.props.triggerTarget || t);
|
|
17405
17444
|
q.forEach(function(j) {
|
|
@@ -17412,21 +17451,21 @@ function mk(t, e) {
|
|
|
17412
17451
|
});
|
|
17413
17452
|
}
|
|
17414
17453
|
function fn() {
|
|
17415
|
-
_() && (
|
|
17454
|
+
_() && (Ot("touchstart", Vn, {
|
|
17416
17455
|
passive: !0
|
|
17417
|
-
}),
|
|
17456
|
+
}), Ot("touchend", Fr, {
|
|
17418
17457
|
passive: !0
|
|
17419
17458
|
})), qv(y.props.trigger).forEach(function(v) {
|
|
17420
17459
|
if (v !== "manual")
|
|
17421
|
-
switch (
|
|
17460
|
+
switch (Ot(v, Vn), v) {
|
|
17422
17461
|
case "mouseenter":
|
|
17423
|
-
|
|
17462
|
+
Ot("mouseleave", Fr);
|
|
17424
17463
|
break;
|
|
17425
17464
|
case "focus":
|
|
17426
|
-
|
|
17465
|
+
Ot(ik ? "focusout" : "blur", Hn);
|
|
17427
17466
|
break;
|
|
17428
17467
|
case "focusin":
|
|
17429
|
-
|
|
17468
|
+
Ot("focusout", Hn);
|
|
17430
17469
|
break;
|
|
17431
17470
|
}
|
|
17432
17471
|
});
|
|
@@ -17449,7 +17488,7 @@ function mk(t, e) {
|
|
|
17449
17488
|
function Lr(v) {
|
|
17450
17489
|
var A = v.target, R = W().contains(A) || k.contains(A);
|
|
17451
17490
|
if (!(v.type === "mousemove" && R)) {
|
|
17452
|
-
var q =
|
|
17491
|
+
var q = Tt().concat(k).map(function(j) {
|
|
17453
17492
|
var Se, _e = j._tippy, pn = (Se = _e.popperInstance) == null ? void 0 : Se.state;
|
|
17454
17493
|
return pn ? {
|
|
17455
17494
|
popperRect: j.getBoundingClientRect(),
|
|
@@ -17474,7 +17513,7 @@ function mk(t, e) {
|
|
|
17474
17513
|
y.props.trigger.indexOf("focusin") < 0 && v.target !== W() || y.props.interactive && v.relatedTarget && k.contains(v.relatedTarget) || qt(v);
|
|
17475
17514
|
}
|
|
17476
17515
|
function jn(v) {
|
|
17477
|
-
return
|
|
17516
|
+
return rt.isTouch ? _() !== v.type.indexOf("touch") >= 0 : !1;
|
|
17478
17517
|
}
|
|
17479
17518
|
function Br() {
|
|
17480
17519
|
_r();
|
|
@@ -17536,9 +17575,9 @@ function mk(t, e) {
|
|
|
17536
17575
|
function _r() {
|
|
17537
17576
|
y.popperInstance && (y.popperInstance.destroy(), y.popperInstance = null);
|
|
17538
17577
|
}
|
|
17539
|
-
function
|
|
17578
|
+
function ut() {
|
|
17540
17579
|
var v = y.props.appendTo, A, R = W();
|
|
17541
|
-
y.props.interactive && v === Yu || v === "parent" ? A = R.parentNode : A = Gu(v, [R]), A.contains(k) || A.appendChild(k), y.state.isMounted = !0, Br(), ie.env.NODE_ENV !== "production" &&
|
|
17580
|
+
y.props.interactive && v === Yu || v === "parent" ? A = R.parentNode : A = Gu(v, [R]), A.contains(k) || A.appendChild(k), y.state.isMounted = !0, Br(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Pe.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
17542
17581
|
|
|
17543
17582
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
17544
17583
|
|
|
@@ -17546,19 +17585,19 @@ function mk(t, e) {
|
|
|
17546
17585
|
|
|
17547
17586
|
`, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
|
|
17548
17587
|
}
|
|
17549
|
-
function
|
|
17588
|
+
function Tt() {
|
|
17550
17589
|
return To(k.querySelectorAll("[data-tippy-root]"));
|
|
17551
17590
|
}
|
|
17552
17591
|
function Wn(v) {
|
|
17553
17592
|
y.clearDelayTimeouts(), v && se("onTrigger", [y, v]), Ee();
|
|
17554
17593
|
var A = ae(!0), R = $(), q = R[0], j = R[1];
|
|
17555
|
-
|
|
17594
|
+
rt.isTouch && q === "hold" && j && (A = j), A ? r = setTimeout(function() {
|
|
17556
17595
|
y.show();
|
|
17557
17596
|
}, A) : y.show();
|
|
17558
17597
|
}
|
|
17559
17598
|
function qt(v) {
|
|
17560
17599
|
if (y.clearDelayTimeouts(), se("onUntrigger", [y, v]), !y.state.isVisible) {
|
|
17561
|
-
|
|
17600
|
+
Xe();
|
|
17562
17601
|
return;
|
|
17563
17602
|
}
|
|
17564
17603
|
if (!(y.props.trigger.indexOf("mouseenter") >= 0 && y.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(v.type) >= 0 && s)) {
|
|
@@ -17580,14 +17619,14 @@ function mk(t, e) {
|
|
|
17580
17619
|
clearTimeout(r), clearTimeout(o), cancelAnimationFrame(i);
|
|
17581
17620
|
}
|
|
17582
17621
|
function Vr(v) {
|
|
17583
|
-
if (ie.env.NODE_ENV !== "production" &&
|
|
17622
|
+
if (ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("setProps")), !y.state.isDestroyed) {
|
|
17584
17623
|
se("onBeforeUpdate", [y, v]), Rr();
|
|
17585
17624
|
var A = y.props, R = jl(t, Object.assign({}, A, _l(v), {
|
|
17586
17625
|
ignoreAttributes: !0
|
|
17587
17626
|
}));
|
|
17588
17627
|
y.props = R, fn(), A.interactiveDebounce !== R.interactiveDebounce && (Be(), h = Fl(Lr, R.interactiveDebounce)), A.triggerTarget && !R.triggerTarget ? Sn(A.triggerTarget).forEach(function(q) {
|
|
17589
17628
|
q.removeAttribute("aria-expanded");
|
|
17590
|
-
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ce(), M && M(A, R), y.popperInstance && (Br(),
|
|
17629
|
+
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ce(), M && M(A, R), y.popperInstance && (Br(), Tt().forEach(function(q) {
|
|
17591
17630
|
requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
|
|
17592
17631
|
})), se("onAfterUpdate", [y, v]);
|
|
17593
17632
|
}
|
|
@@ -17598,8 +17637,8 @@ function mk(t, e) {
|
|
|
17598
17637
|
});
|
|
17599
17638
|
}
|
|
17600
17639
|
function of() {
|
|
17601
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17602
|
-
var v = y.state.isVisible, A = y.state.isDestroyed, R = !y.state.isEnabled, q =
|
|
17640
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("show"));
|
|
17641
|
+
var v = y.state.isVisible, A = y.state.isDestroyed, R = !y.state.isEnabled, q = rt.isTouch && !y.props.touch, j = ui(y.props.duration, 0, Pe.duration);
|
|
17603
17642
|
if (!(v || A || R || q) && !W().hasAttribute("disabled") && (se("onShow", [y], !1), y.props.onShow(y) !== !1)) {
|
|
17604
17643
|
if (y.state.isVisible = !0, U() && (k.style.visibility = "visible"), ce(), Ee(), y.state.isMounted || (k.style.transition = "none"), U()) {
|
|
17605
17644
|
var Se = oe(), _e = Se.box, pn = Se.content;
|
|
@@ -17612,36 +17651,36 @@ function mk(t, e) {
|
|
|
17612
17651
|
var $o = oe(), jr = $o.box, hn = $o.content;
|
|
17613
17652
|
fi([jr, hn], j), zl([jr, hn], "visible");
|
|
17614
17653
|
}
|
|
17615
|
-
pe(), ke(), Bl(hi, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), se("onMount", [y]), y.props.animation && U() &&
|
|
17654
|
+
pe(), ke(), Bl(hi, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), se("onMount", [y]), y.props.animation && U() && Je(j, function() {
|
|
17616
17655
|
y.state.isShown = !0, se("onShown", [y]);
|
|
17617
17656
|
});
|
|
17618
17657
|
}
|
|
17619
|
-
},
|
|
17658
|
+
}, ut();
|
|
17620
17659
|
}
|
|
17621
17660
|
}
|
|
17622
17661
|
function sf() {
|
|
17623
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17662
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("hide"));
|
|
17624
17663
|
var v = !y.state.isVisible, A = y.state.isDestroyed, R = !y.state.isEnabled, q = ui(y.props.duration, 1, Pe.duration);
|
|
17625
17664
|
if (!(v || A || R) && (se("onHide", [y], !1), y.props.onHide(y) !== !1)) {
|
|
17626
|
-
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, U() && (k.style.visibility = "hidden"), Be(),
|
|
17665
|
+
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, U() && (k.style.visibility = "hidden"), Be(), Xe(), ce(!0), U()) {
|
|
17627
17666
|
var j = oe(), Se = j.box, _e = j.content;
|
|
17628
17667
|
y.props.animation && (fi([Se, _e], q), zl([Se, _e], "hidden"));
|
|
17629
17668
|
}
|
|
17630
|
-
pe(), ke(), y.props.animation ? U() &&
|
|
17669
|
+
pe(), ke(), y.props.animation ? U() && Mt(q, y.unmount) : y.unmount();
|
|
17631
17670
|
}
|
|
17632
17671
|
}
|
|
17633
17672
|
function af(v) {
|
|
17634
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17673
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("hideWithInteractivity")), ee().addEventListener("mousemove", h), Bl(Qr, h), h(v);
|
|
17635
17674
|
}
|
|
17636
17675
|
function lf() {
|
|
17637
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17676
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (_r(), Tt().forEach(function(v) {
|
|
17638
17677
|
v._tippy.unmount();
|
|
17639
17678
|
}), k.parentNode && k.parentNode.removeChild(k), hi = hi.filter(function(v) {
|
|
17640
17679
|
return v !== y;
|
|
17641
17680
|
}), y.state.isMounted = !1, se("onHidden", [y]));
|
|
17642
17681
|
}
|
|
17643
17682
|
function cf() {
|
|
17644
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17683
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, wn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Rr(), delete t._tippy, y.state.isDestroyed = !0, se("onDestroy", [y]));
|
|
17645
17684
|
}
|
|
17646
17685
|
}
|
|
17647
17686
|
function Pr(t, e) {
|
|
@@ -17653,7 +17692,7 @@ function Pr(t, e) {
|
|
|
17653
17692
|
}), o = Zv(t);
|
|
17654
17693
|
if (ie.env.NODE_ENV !== "production") {
|
|
17655
17694
|
var i = Sr(r.content), s = o.length > 1;
|
|
17656
|
-
|
|
17695
|
+
gt(i && s, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
17657
17696
|
|
|
17658
17697
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
17659
17698
|
|
|
@@ -17668,7 +17707,7 @@ function Pr(t, e) {
|
|
|
17668
17707
|
}
|
|
17669
17708
|
Pr.defaultProps = Pe;
|
|
17670
17709
|
Pr.setDefaultProps = uk;
|
|
17671
|
-
Pr.currentInput =
|
|
17710
|
+
Pr.currentInput = rt;
|
|
17672
17711
|
Object.assign({}, zu, {
|
|
17673
17712
|
effect: function(e) {
|
|
17674
17713
|
var n = e.state, r = {
|
|
@@ -18001,7 +18040,7 @@ function Nk(t, e, n, r) {
|
|
|
18001
18040
|
}
|
|
18002
18041
|
}
|
|
18003
18042
|
if (ce || ae) {
|
|
18004
|
-
const se = e.state.doc.resolve(oe), pe = Bo(se, (
|
|
18043
|
+
const se = e.state.doc.resolve(oe), pe = Bo(se, (At) => At.type.name === "tableRow");
|
|
18005
18044
|
pe && (ee = pe.node, oe = pe.pos);
|
|
18006
18045
|
const {
|
|
18007
18046
|
top: ke,
|
|
@@ -18009,12 +18048,12 @@ function Nk(t, e, n, r) {
|
|
|
18009
18048
|
pos: Ce
|
|
18010
18049
|
} = Ek(e, oe, c);
|
|
18011
18050
|
l++;
|
|
18012
|
-
const
|
|
18013
|
-
u = mi(s, i, r,
|
|
18014
|
-
const Ee = c - Be, { node:
|
|
18015
|
-
o.push(
|
|
18016
|
-
const
|
|
18017
|
-
o.push(z.widget(Ce,
|
|
18051
|
+
const dt = eo(l, "headerIds", n), Ke = eo(l, "footerIds", n);
|
|
18052
|
+
u = mi(s, i, r, dt), d = gi(s, i, r, Ke, l - 1);
|
|
18053
|
+
const Ee = c - Be, { node: Xe } = Kl(Ee), Mt = z.widget(Ce, Xe, { key: "stable-key" });
|
|
18054
|
+
o.push(Mt);
|
|
18055
|
+
const Je = yi({ editor: n, header: u, footer: d });
|
|
18056
|
+
o.push(z.widget(Ce, Je, { key: "stable-key" })), c = Be + (a - u.headerHeight - d.footerHeight);
|
|
18018
18057
|
}
|
|
18019
18058
|
});
|
|
18020
18059
|
let y = t.content.size;
|
|
@@ -18179,7 +18218,7 @@ export {
|
|
|
18179
18218
|
gk as _,
|
|
18180
18219
|
Hk as a,
|
|
18181
18220
|
Kb as b,
|
|
18182
|
-
|
|
18221
|
+
je as c,
|
|
18183
18222
|
Ef as d,
|
|
18184
18223
|
Pk as e,
|
|
18185
18224
|
Uk as f,
|