@sovann72-dev/lynqify-ui 1.0.1 → 1.0.2

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.
@@ -1,72 +1,51 @@
1
- import Tt from "@tiptap/extension-bold";
2
- import { default as hi } from "@tiptap/extension-bold";
3
- import Et from "@tiptap/extension-color";
4
- import { default as mi } from "@tiptap/extension-color";
5
- import kt from "@tiptap/extension-document";
6
- import { default as yi } from "@tiptap/extension-document";
7
- import _r from "@tiptap/extension-file-handler";
8
- import { default as Ii } from "@tiptap/extension-file-handler";
9
- import Rt from "@tiptap/extension-hard-break";
10
- import { default as xi } from "@tiptap/extension-hard-break";
11
- import Jr from "@tiptap/extension-heading";
12
- import { default as bi } from "@tiptap/extension-heading";
13
- import Fr from "@tiptap/extension-highlight";
14
- import { default as Ei } from "@tiptap/extension-highlight";
15
- import Hr from "@tiptap/extension-image";
16
- import { default as Ri } from "@tiptap/extension-image";
17
- import Ot from "@tiptap/extension-italic";
18
- import { default as Ni } from "@tiptap/extension-italic";
19
- import Br from "@tiptap/extension-link";
20
- import { default as Ci } from "@tiptap/extension-link";
21
- import { BulletList as Nt, ListItem as At, OrderedList as Ct, TaskItem as Lt, ListKeymap as $r, TaskList as jr } from "@tiptap/extension-list";
22
- import { BulletList as Mi, ListItem as Pi, ListKeymap as Di, OrderedList as zi, TaskItem as _i, TaskList as Ji } from "@tiptap/extension-list";
23
- import qr from "@tiptap/extension-mention";
24
- import { default as Hi } from "@tiptap/extension-mention";
25
- import Mt from "@tiptap/extension-paragraph";
26
- import { default as $i } from "@tiptap/extension-paragraph";
27
- import { Table as Vr, TableCell as Wr, TableHeader as Ur, TableRow as Yr } from "@tiptap/extension-table";
28
- import { Table as qi, TableCell as Vi, TableHeader as Wi, TableRow as Ui } from "@tiptap/extension-table";
29
- import Pt from "@tiptap/extension-text";
30
- import { default as Ki } from "@tiptap/extension-text";
31
- import Dt from "@tiptap/extension-text-align";
32
- import { default as Xi } from "@tiptap/extension-text-align";
33
- import { TextStyle as zt } from "@tiptap/extension-text-style";
34
- import { TextStyle as Qi } from "@tiptap/extension-text-style";
35
- import _t from "@tiptap/extension-underline";
36
- import { default as ts } from "@tiptap/extension-underline";
37
- import { UndoRedo as Jt, CharacterCount as Kr, Placeholder as Gr } from "@tiptap/extensions";
38
- import { CharacterCount as ns, UndoRedo as is, Placeholder as ss } from "@tiptap/extensions";
39
- import { Extension as Xr } from "@tiptap/react";
40
- import { Extension as fe, Node as Zr } from "@tiptap/core";
41
- import * as Le from "react";
42
- import Ft from "react";
43
- import Qr from "react-dom";
44
- const en = Mt.extend({
45
- // Keep name as 'paragraph' for schema compatibility
46
- addNodeView() {
47
- return ({ node: n }) => {
48
- const e = n.attrs.indent || 0, t = document.createElement("p");
49
- return t.setAttribute("data-indent", String(e)), e > 0 && (t.style.paddingLeft = `${e * 20}px`), { dom: t, contentDOM: t };
50
- };
51
- },
52
- // Placeholder positioning based on indent level
53
- addAttributes() {
54
- var n;
55
- return {
56
- ...(n = this.parent) == null ? void 0 : n.call(this),
57
- indent: {
58
- default: 0,
59
- parseHTML: (e) => parseInt(e.getAttribute("data-indent") || "0"),
60
- renderHTML: (e) => e.indent ? {
61
- "data-indent": e.indent,
62
- // CSS custom property for dynamic placeholder offset
63
- style: `--indent-level: ${e.indent};`
64
- } : {}
65
- }
66
- };
67
- }
68
- });
69
- function Ht(n, e, t) {
1
+ var Ur = Object.defineProperty;
2
+ var qr = (n, e, t) => e in n ? Ur(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var b = (n, e, t) => qr(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import Nt from "@tiptap/extension-bold";
5
+ import { default as Li } from "@tiptap/extension-bold";
6
+ import Lt from "@tiptap/extension-color";
7
+ import { default as zi } from "@tiptap/extension-color";
8
+ import At from "@tiptap/extension-document";
9
+ import { default as Pi } from "@tiptap/extension-document";
10
+ import Kr from "@tiptap/extension-file-handler";
11
+ import { default as _i } from "@tiptap/extension-file-handler";
12
+ import zt from "@tiptap/extension-hard-break";
13
+ import { default as Bi } from "@tiptap/extension-hard-break";
14
+ import Yr from "@tiptap/extension-heading";
15
+ import { default as Ji } from "@tiptap/extension-heading";
16
+ import Xr from "@tiptap/extension-highlight";
17
+ import { default as Hi } from "@tiptap/extension-highlight";
18
+ import Gr from "@tiptap/extension-image";
19
+ import { default as ji } from "@tiptap/extension-image";
20
+ import Mt from "@tiptap/extension-italic";
21
+ import { default as qi } from "@tiptap/extension-italic";
22
+ import Zr from "@tiptap/extension-link";
23
+ import { default as Yi } from "@tiptap/extension-link";
24
+ import { BulletList as Pt, ListItem as Dt, OrderedList as _t, TaskItem as $t, ListKeymap as Qr, TaskList as en } from "@tiptap/extension-list";
25
+ import { BulletList as Gi, ListItem as Zi, ListKeymap as Qi, OrderedList as es, TaskItem as ts, TaskList as rs } from "@tiptap/extension-list";
26
+ import tn from "@tiptap/extension-mention";
27
+ import { default as is } from "@tiptap/extension-mention";
28
+ import Bt from "@tiptap/extension-paragraph";
29
+ import { default as os } from "@tiptap/extension-paragraph";
30
+ import { Table as rn, TableCell as nn, TableHeader as sn, TableRow as on } from "@tiptap/extension-table";
31
+ import { Table as ls, TableCell as cs, TableHeader as ds, TableRow as us } from "@tiptap/extension-table";
32
+ import Ft from "@tiptap/extension-text";
33
+ import { default as hs } from "@tiptap/extension-text";
34
+ import Jt from "@tiptap/extension-text-align";
35
+ import { default as ms } from "@tiptap/extension-text-align";
36
+ import { TextStyle as Wt } from "@tiptap/extension-text-style";
37
+ import { TextStyle as ys } from "@tiptap/extension-text-style";
38
+ import Ht from "@tiptap/extension-underline";
39
+ import { default as ws } from "@tiptap/extension-underline";
40
+ import { UndoRedo as Vt, CharacterCount as an, Placeholder as ln } from "@tiptap/extensions";
41
+ import { CharacterCount as Is, UndoRedo as Ss, Placeholder as Es } from "@tiptap/extensions";
42
+ import { Extension as ge, Node as cn } from "@tiptap/core";
43
+ import { Extension as dn } from "@tiptap/react";
44
+ import { Editor as Ts, EditorContent as Rs, useEditor as Cs } from "@tiptap/react";
45
+ import * as De from "react";
46
+ import jt from "react";
47
+ import un from "react-dom";
48
+ function Ut(n, e, t) {
70
49
  for (let r = 0; ; r++) {
71
50
  if (r == n.childCount || r == e.childCount)
72
51
  return n.childCount == e.childCount ? null : t;
@@ -83,20 +62,20 @@ function Ht(n, e, t) {
83
62
  return t;
84
63
  }
85
64
  if (i.content.size || s.content.size) {
86
- let l = Ht(i.content, s.content, t + 1);
65
+ let l = Ut(i.content, s.content, t + 1);
87
66
  if (l != null)
88
67
  return l;
89
68
  }
90
69
  t += i.nodeSize;
91
70
  }
92
71
  }
93
- function Bt(n, e, t, r) {
72
+ function qt(n, e, t, r) {
94
73
  for (let i = n.childCount, s = e.childCount; ; ) {
95
74
  if (i == 0 || s == 0)
96
75
  return i == s ? null : { a: t, b: r };
97
- let l = n.child(--i), a = e.child(--s), u = l.nodeSize;
76
+ let l = n.child(--i), a = e.child(--s), c = l.nodeSize;
98
77
  if (l == a) {
99
- t -= u, r -= u;
78
+ t -= c, r -= c;
100
79
  continue;
101
80
  }
102
81
  if (!l.sameMarkup(a))
@@ -108,14 +87,14 @@ function Bt(n, e, t, r) {
108
87
  return { a: t, b: r };
109
88
  }
110
89
  if (l.content.size || a.content.size) {
111
- let f = Bt(l.content, a.content, t - 1, r - 1);
90
+ let f = qt(l.content, a.content, t - 1, r - 1);
112
91
  if (f)
113
92
  return f;
114
93
  }
115
- t -= u, r -= u;
94
+ t -= c, r -= c;
116
95
  }
117
96
  }
118
- class k {
97
+ class C {
119
98
  /**
120
99
  @internal
121
100
  */
@@ -131,10 +110,10 @@ class k {
131
110
  */
132
111
  nodesBetween(e, t, r, i = 0, s) {
133
112
  for (let l = 0, a = 0; a < t; l++) {
134
- let u = this.content[l], f = a + u.nodeSize;
135
- if (f > e && r(u, i + a, s || null, l) !== !1 && u.content.size) {
113
+ let c = this.content[l], f = a + c.nodeSize;
114
+ if (f > e && r(c, i + a, s || null, l) !== !1 && c.content.size) {
136
115
  let d = a + 1;
137
- u.nodesBetween(Math.max(0, e - d), Math.min(u.content.size, t - d), r, i + d);
116
+ c.nodesBetween(Math.max(0, e - d), Math.min(c.content.size, t - d), r, i + d);
138
117
  }
139
118
  a = f;
140
119
  }
@@ -153,8 +132,8 @@ class k {
153
132
  */
154
133
  textBetween(e, t, r, i) {
155
134
  let s = "", l = !0;
156
- return this.nodesBetween(e, t, (a, u) => {
157
- let f = a.isText ? a.text.slice(Math.max(e, u) - u, t - u) : a.isLeaf ? i ? typeof i == "function" ? i(a) : i : a.type.spec.leafText ? a.type.spec.leafText(a) : "" : "";
135
+ return this.nodesBetween(e, t, (a, c) => {
136
+ let f = a.isText ? a.text.slice(Math.max(e, c) - c, t - c) : a.isLeaf ? i ? typeof i == "function" ? i(a) : i : a.type.spec.leafText ? a.type.spec.leafText(a) : "" : "";
158
137
  a.isBlock && (a.isLeaf && f || a.isTextblock) && r && (l ? l = !1 : s += r), s += f;
159
138
  }, 0), s;
160
139
  }
@@ -170,7 +149,7 @@ class k {
170
149
  let t = this.lastChild, r = e.firstChild, i = this.content.slice(), s = 0;
171
150
  for (t.isText && t.sameMarkup(r) && (i[i.length - 1] = t.withText(t.text + r.text), s = 1); s < e.content.length; s++)
172
151
  i.push(e.content[s]);
173
- return new k(i, this.size + e.size);
152
+ return new C(i, this.size + e.size);
174
153
  }
175
154
  /**
176
155
  Cut out the sub-fragment between the two given positions.
@@ -181,16 +160,16 @@ class k {
181
160
  let r = [], i = 0;
182
161
  if (t > e)
183
162
  for (let s = 0, l = 0; l < t; s++) {
184
- let a = this.content[s], u = l + a.nodeSize;
185
- u > e && ((l < e || u > t) && (a.isText ? a = a.cut(Math.max(0, e - l), Math.min(a.text.length, t - l)) : a = a.cut(Math.max(0, e - l - 1), Math.min(a.content.size, t - l - 1))), r.push(a), i += a.nodeSize), l = u;
163
+ let a = this.content[s], c = l + a.nodeSize;
164
+ c > e && ((l < e || c > t) && (a.isText ? a = a.cut(Math.max(0, e - l), Math.min(a.text.length, t - l)) : a = a.cut(Math.max(0, e - l - 1), Math.min(a.content.size, t - l - 1))), r.push(a), i += a.nodeSize), l = c;
186
165
  }
187
- return new k(r, i);
166
+ return new C(r, i);
188
167
  }
189
168
  /**
190
169
  @internal
191
170
  */
192
171
  cutByIndex(e, t) {
193
- return e == t ? k.empty : e == 0 && t == this.content.length ? this : new k(this.content.slice(e, t));
172
+ return e == t ? C.empty : e == 0 && t == this.content.length ? this : new C(this.content.slice(e, t));
194
173
  }
195
174
  /**
196
175
  Create a new fragment in which the node at the given index is
@@ -201,21 +180,21 @@ class k {
201
180
  if (r == t)
202
181
  return this;
203
182
  let i = this.content.slice(), s = this.size + t.nodeSize - r.nodeSize;
204
- return i[e] = t, new k(i, s);
183
+ return i[e] = t, new C(i, s);
205
184
  }
206
185
  /**
207
186
  Create a new fragment by prepending the given node to this
208
187
  fragment.
209
188
  */
210
189
  addToStart(e) {
211
- return new k([e].concat(this.content), this.size + e.nodeSize);
190
+ return new C([e].concat(this.content), this.size + e.nodeSize);
212
191
  }
213
192
  /**
214
193
  Create a new fragment by appending the given node to this
215
194
  fragment.
216
195
  */
217
196
  addToEnd(e) {
218
- return new k(this.content.concat(e), this.size + e.nodeSize);
197
+ return new C(this.content.concat(e), this.size + e.nodeSize);
219
198
  }
220
199
  /**
221
200
  Compare this fragment to another one.
@@ -277,7 +256,7 @@ class k {
277
256
  fragment differ, or `null` if they are the same.
278
257
  */
279
258
  findDiffStart(e, t = 0) {
280
- return Ht(this, e, t);
259
+ return Ut(this, e, t);
281
260
  }
282
261
  /**
283
262
  Find the first position, searching from the end, at which this
@@ -286,7 +265,7 @@ class k {
286
265
  nodes, an object with two separate positions is returned.
287
266
  */
288
267
  findDiffEnd(e, t = this.size, r = e.size) {
289
- return Bt(this, e, t, r);
268
+ return qt(this, e, t, r);
290
269
  }
291
270
  /**
292
271
  Find the index and inner offset corresponding to a given relative
@@ -295,15 +274,15 @@ class k {
295
274
  */
296
275
  findIndex(e) {
297
276
  if (e == 0)
298
- return ye(0, e);
277
+ return Ie(0, e);
299
278
  if (e == this.size)
300
- return ye(this.content.length, e);
279
+ return Ie(this.content.length, e);
301
280
  if (e > this.size || e < 0)
302
281
  throw new RangeError(`Position ${e} outside of fragment (${this})`);
303
282
  for (let t = 0, r = 0; ; t++) {
304
283
  let i = this.child(t), s = r + i.nodeSize;
305
284
  if (s >= e)
306
- return s == e ? ye(t + 1, s) : ye(t, r);
285
+ return s == e ? Ie(t + 1, s) : Ie(t, r);
307
286
  r = s;
308
287
  }
309
288
  }
@@ -330,10 +309,10 @@ class k {
330
309
  */
331
310
  static fromJSON(e, t) {
332
311
  if (!t)
333
- return k.empty;
312
+ return C.empty;
334
313
  if (!Array.isArray(t))
335
314
  throw new RangeError("Invalid input for Fragment.fromJSON");
336
- return new k(t.map(e.nodeFromJSON));
315
+ return new C(t.map(e.nodeFromJSON));
337
316
  }
338
317
  /**
339
318
  Build a fragment from an array of nodes. Ensures that adjacent
@@ -341,13 +320,13 @@ class k {
341
320
  */
342
321
  static fromArray(e) {
343
322
  if (!e.length)
344
- return k.empty;
323
+ return C.empty;
345
324
  let t, r = 0;
346
325
  for (let i = 0; i < e.length; i++) {
347
326
  let s = e[i];
348
327
  r += s.nodeSize, i && s.isText && e[i - 1].sameMarkup(s) ? (t || (t = e.slice(0, i)), t[t.length - 1] = s.withText(t[t.length - 1].text + s.text)) : t && t.push(s);
349
328
  }
350
- return new k(t || e, r);
329
+ return new C(t || e, r);
351
330
  }
352
331
  /**
353
332
  Create a fragment from something that can be interpreted as a
@@ -357,22 +336,22 @@ class k {
357
336
  */
358
337
  static from(e) {
359
338
  if (!e)
360
- return k.empty;
361
- if (e instanceof k)
339
+ return C.empty;
340
+ if (e instanceof C)
362
341
  return e;
363
342
  if (Array.isArray(e))
364
343
  return this.fromArray(e);
365
344
  if (e.attrs)
366
- return new k([e], e.nodeSize);
345
+ return new C([e], e.nodeSize);
367
346
  throw new RangeError("Can not convert " + e + " to a Fragment" + (e.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
368
347
  }
369
348
  }
370
- k.empty = new k([], 0);
371
- const Me = { index: 0, offset: 0 };
372
- function ye(n, e) {
373
- return Me.index = n, Me.offset = e, Me;
349
+ C.empty = new C([], 0);
350
+ const _e = { index: 0, offset: 0 };
351
+ function Ie(n, e) {
352
+ return _e.index = n, _e.offset = e, _e;
374
353
  }
375
- class tn extends Error {
354
+ class fn extends Error {
376
355
  }
377
356
  class T {
378
357
  /**
@@ -400,14 +379,14 @@ class T {
400
379
  @internal
401
380
  */
402
381
  insertAt(e, t) {
403
- let r = jt(this.content, e + this.openStart, t);
382
+ let r = Yt(this.content, e + this.openStart, t);
404
383
  return r && new T(r, this.openStart, this.openEnd);
405
384
  }
406
385
  /**
407
386
  @internal
408
387
  */
409
388
  removeBetween(e, t) {
410
- return new T($t(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
389
+ return new T(Kt(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
411
390
  }
412
391
  /**
413
392
  Tests whether this slice is equal to another slice.
@@ -439,7 +418,7 @@ class T {
439
418
  let r = t.openStart || 0, i = t.openEnd || 0;
440
419
  if (typeof r != "number" || typeof i != "number")
441
420
  throw new RangeError("Invalid input for Slice.fromJSON");
442
- return new T(k.fromJSON(e, t.content), r, i);
421
+ return new T(C.fromJSON(e, t.content), r, i);
443
422
  }
444
423
  /**
445
424
  Create a slice from a fragment by taking the maximum possible
@@ -454,8 +433,8 @@ class T {
454
433
  return new T(e, r, i);
455
434
  }
456
435
  }
457
- T.empty = new T(k.empty, 0, 0);
458
- function $t(n, e, t) {
436
+ T.empty = new T(C.empty, 0, 0);
437
+ function Kt(n, e, t) {
459
438
  let { index: r, offset: i } = n.findIndex(e), s = n.maybeChild(r), { index: l, offset: a } = n.findIndex(t);
460
439
  if (i == e || s.isText) {
461
440
  if (a != t && !n.child(l).isText)
@@ -464,16 +443,16 @@ function $t(n, e, t) {
464
443
  }
465
444
  if (r != l)
466
445
  throw new RangeError("Removing non-flat range");
467
- return n.replaceChild(r, s.copy($t(s.content, e - i - 1, t - i - 1)));
446
+ return n.replaceChild(r, s.copy(Kt(s.content, e - i - 1, t - i - 1)));
468
447
  }
469
- function jt(n, e, t, r) {
448
+ function Yt(n, e, t, r) {
470
449
  let { index: i, offset: s } = n.findIndex(e), l = n.maybeChild(i);
471
450
  if (s == e || l.isText)
472
451
  return r && !r.canReplace(i, i, t) ? null : n.cut(0, e).append(t).append(n.cut(e));
473
- let a = jt(l.content, e - s - 1, t, l);
452
+ let a = Yt(l.content, e - s - 1, t, l);
474
453
  return a && n.replaceChild(i, l.copy(a));
475
454
  }
476
- class qt {
455
+ class Xt {
477
456
  /**
478
457
  Construct a node range. `$from` and `$to` should point into the
479
458
  same node until at least the given `depth`, since a node range
@@ -513,18 +492,18 @@ class qt {
513
492
  return this.$to.indexAfter(this.depth);
514
493
  }
515
494
  }
516
- const Vt = 65535, Wt = Math.pow(2, 16);
517
- function rn(n, e) {
518
- return n + e * Wt;
495
+ const Gt = 65535, Zt = Math.pow(2, 16);
496
+ function hn(n, e) {
497
+ return n + e * Zt;
519
498
  }
520
- function ht(n) {
521
- return n & Vt;
499
+ function wt(n) {
500
+ return n & Gt;
522
501
  }
523
- function nn(n) {
524
- return (n - (n & Vt)) / Wt;
502
+ function pn(n) {
503
+ return (n - (n & Gt)) / Zt;
525
504
  }
526
- const Ut = 1, Yt = 2, we = 4, Kt = 8;
527
- class pt {
505
+ const Qt = 1, er = 2, be = 4, tr = 8;
506
+ class xt {
528
507
  /**
529
508
  @internal
530
509
  */
@@ -537,19 +516,19 @@ class pt {
537
516
  argument from the document.
538
517
  */
539
518
  get deleted() {
540
- return (this.delInfo & Kt) > 0;
519
+ return (this.delInfo & tr) > 0;
541
520
  }
542
521
  /**
543
522
  Tells you whether the token before the mapped position was deleted.
544
523
  */
545
524
  get deletedBefore() {
546
- return (this.delInfo & (Ut | we)) > 0;
525
+ return (this.delInfo & (Qt | be)) > 0;
547
526
  }
548
527
  /**
549
528
  True when the token after the mapped position was deleted.
550
529
  */
551
530
  get deletedAfter() {
552
- return (this.delInfo & (Yt | we)) > 0;
531
+ return (this.delInfo & (er | be)) > 0;
553
532
  }
554
533
  /**
555
534
  Tells whether any of the steps mapped through deletes across the
@@ -557,28 +536,28 @@ class pt {
557
536
  position).
558
537
  */
559
538
  get deletedAcross() {
560
- return (this.delInfo & we) > 0;
539
+ return (this.delInfo & be) > 0;
561
540
  }
562
541
  }
563
- class F {
542
+ class J {
564
543
  /**
565
544
  Create a position map. The modifications to the document are
566
545
  represented as an array of numbers, in which each group of three
567
546
  represents a modified chunk as `[start, oldSize, newSize]`.
568
547
  */
569
548
  constructor(e, t = !1) {
570
- if (this.ranges = e, this.inverted = t, !e.length && F.empty)
571
- return F.empty;
549
+ if (this.ranges = e, this.inverted = t, !e.length && J.empty)
550
+ return J.empty;
572
551
  }
573
552
  /**
574
553
  @internal
575
554
  */
576
555
  recover(e) {
577
- let t = 0, r = ht(e);
556
+ let t = 0, r = wt(e);
578
557
  if (!this.inverted)
579
558
  for (let i = 0; i < r; i++)
580
559
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
581
- return this.ranges[r * 3] + t + nn(e);
560
+ return this.ranges[r * 3] + t + pn(e);
582
561
  }
583
562
  mapResult(e, t = 1) {
584
563
  return this._map(e, t, !1);
@@ -592,31 +571,31 @@ class F {
592
571
  _map(e, t, r) {
593
572
  let i = 0, s = this.inverted ? 2 : 1, l = this.inverted ? 1 : 2;
594
573
  for (let a = 0; a < this.ranges.length; a += 3) {
595
- let u = this.ranges[a] - (this.inverted ? i : 0);
596
- if (u > e)
574
+ let c = this.ranges[a] - (this.inverted ? i : 0);
575
+ if (c > e)
597
576
  break;
598
- let f = this.ranges[a + s], d = this.ranges[a + l], p = u + f;
599
- if (e <= p) {
600
- let y = f ? e == u ? -1 : e == p ? 1 : t : t, w = u + i + (y < 0 ? 0 : d);
577
+ let f = this.ranges[a + s], d = this.ranges[a + l], h = c + f;
578
+ if (e <= h) {
579
+ let g = f ? e == c ? -1 : e == h ? 1 : t : t, v = c + i + (g < 0 ? 0 : d);
601
580
  if (r)
602
- return w;
603
- let m = e == (t < 0 ? u : p) ? null : rn(a / 3, e - u), S = e == u ? Yt : e == p ? Ut : we;
604
- return (t < 0 ? e != u : e != p) && (S |= Kt), new pt(w, S, m);
581
+ return v;
582
+ let m = e == (t < 0 ? c : h) ? null : hn(a / 3, e - c), I = e == c ? er : e == h ? Qt : be;
583
+ return (t < 0 ? e != c : e != h) && (I |= tr), new xt(v, I, m);
605
584
  }
606
585
  i += d - f;
607
586
  }
608
- return r ? e + i : new pt(e + i, 0, null);
587
+ return r ? e + i : new xt(e + i, 0, null);
609
588
  }
610
589
  /**
611
590
  @internal
612
591
  */
613
592
  touches(e, t) {
614
- let r = 0, i = ht(t), s = this.inverted ? 2 : 1, l = this.inverted ? 1 : 2;
593
+ let r = 0, i = wt(t), s = this.inverted ? 2 : 1, l = this.inverted ? 1 : 2;
615
594
  for (let a = 0; a < this.ranges.length; a += 3) {
616
- let u = this.ranges[a] - (this.inverted ? r : 0);
617
- if (u > e)
595
+ let c = this.ranges[a] - (this.inverted ? r : 0);
596
+ if (c > e)
618
597
  break;
619
- let f = this.ranges[a + s], d = u + f;
598
+ let f = this.ranges[a + s], d = c + f;
620
599
  if (e <= d && a == i * 3)
621
600
  return !0;
622
601
  r += this.ranges[a + l] - f;
@@ -630,8 +609,8 @@ class F {
630
609
  forEach(e) {
631
610
  let t = this.inverted ? 2 : 1, r = this.inverted ? 1 : 2;
632
611
  for (let i = 0, s = 0; i < this.ranges.length; i += 3) {
633
- let l = this.ranges[i], a = l - (this.inverted ? s : 0), u = l + (this.inverted ? 0 : s), f = this.ranges[i + t], d = this.ranges[i + r];
634
- e(a, a + f, u, u + d), s += d - f;
612
+ let l = this.ranges[i], a = l - (this.inverted ? s : 0), c = l + (this.inverted ? 0 : s), f = this.ranges[i + t], d = this.ranges[i + r];
613
+ e(a, a + f, c, c + d), s += d - f;
635
614
  }
636
615
  }
637
616
  /**
@@ -639,7 +618,7 @@ class F {
639
618
  map positions in the post-step document to the pre-step document.
640
619
  */
641
620
  invert() {
642
- return new F(this.ranges, !this.inverted);
621
+ return new J(this.ranges, !this.inverted);
643
622
  }
644
623
  /**
645
624
  @internal
@@ -653,19 +632,19 @@ class F {
653
632
  sub-document to a larger document, or vice-versa.
654
633
  */
655
634
  static offset(e) {
656
- return e == 0 ? F.empty : new F(e < 0 ? [0, -e, 0] : [0, 0, e]);
635
+ return e == 0 ? J.empty : new J(e < 0 ? [0, -e, 0] : [0, 0, e]);
657
636
  }
658
637
  }
659
- F.empty = new F([]);
660
- const Pe = /* @__PURE__ */ Object.create(null);
661
- class M {
638
+ J.empty = new J([]);
639
+ const $e = /* @__PURE__ */ Object.create(null);
640
+ class D {
662
641
  /**
663
642
  Get the step map that represents the changes made by this step,
664
643
  and which can be used to transform between positions in the old
665
644
  and the new document.
666
645
  */
667
646
  getMap() {
668
- return F.empty;
647
+ return J.empty;
669
648
  }
670
649
  /**
671
650
  Try to merge this step with another one, to be applied directly
@@ -682,7 +661,7 @@ class M {
682
661
  static fromJSON(e, t) {
683
662
  if (!t || !t.stepType)
684
663
  throw new RangeError("Invalid input for Step.fromJSON");
685
- let r = Pe[t.stepType];
664
+ let r = $e[t.stepType];
686
665
  if (!r)
687
666
  throw new RangeError(`No step type ${t.stepType} defined`);
688
667
  return r.fromJSON(e, t);
@@ -694,9 +673,9 @@ class M {
694
673
  that's unlikely to clash with steps from other modules.
695
674
  */
696
675
  static jsonID(e, t) {
697
- if (e in Pe)
676
+ if (e in $e)
698
677
  throw new RangeError("Duplicate use of step JSON ID " + e);
699
- return Pe[e] = t, t.prototype.jsonID = e, t;
678
+ return $e[e] = t, t.prototype.jsonID = e, t;
700
679
  }
701
680
  }
702
681
  class N {
@@ -727,21 +706,21 @@ class N {
727
706
  try {
728
707
  return N.ok(e.replace(t, r, i));
729
708
  } catch (s) {
730
- if (s instanceof tn)
709
+ if (s instanceof fn)
731
710
  return N.fail(s.message);
732
711
  throw s;
733
712
  }
734
713
  }
735
714
  }
736
- function He(n, e, t) {
715
+ function Ue(n, e, t) {
737
716
  let r = [];
738
717
  for (let i = 0; i < n.childCount; i++) {
739
718
  let s = n.child(i);
740
- s.content.size && (s = s.copy(He(s.content, e, s))), s.isInline && (s = e(s, t, i)), r.push(s);
719
+ s.content.size && (s = s.copy(Ue(s.content, e, s))), s.isInline && (s = e(s, t, i)), r.push(s);
741
720
  }
742
- return k.fromArray(r);
721
+ return C.fromArray(r);
743
722
  }
744
- class U extends M {
723
+ class Y extends D {
745
724
  /**
746
725
  Create a mark step.
747
726
  */
@@ -749,18 +728,18 @@ class U extends M {
749
728
  super(), this.from = e, this.to = t, this.mark = r;
750
729
  }
751
730
  apply(e) {
752
- let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new T(He(t.content, (l, a) => !l.isAtom || !a.type.allowsMarkType(this.mark.type) ? l : l.mark(this.mark.addToSet(l.marks)), i), t.openStart, t.openEnd);
731
+ let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new T(Ue(t.content, (l, a) => !l.isAtom || !a.type.allowsMarkType(this.mark.type) ? l : l.mark(this.mark.addToSet(l.marks)), i), t.openStart, t.openEnd);
753
732
  return N.fromReplace(e, this.from, this.to, s);
754
733
  }
755
734
  invert() {
756
- return new Y(this.from, this.to, this.mark);
735
+ return new X(this.from, this.to, this.mark);
757
736
  }
758
737
  map(e) {
759
738
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
760
- return t.deleted && r.deleted || t.pos >= r.pos ? null : new U(t.pos, r.pos, this.mark);
739
+ return t.deleted && r.deleted || t.pos >= r.pos ? null : new Y(t.pos, r.pos, this.mark);
761
740
  }
762
741
  merge(e) {
763
- return e instanceof U && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new U(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
742
+ return e instanceof Y && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Y(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
764
743
  }
765
744
  toJSON() {
766
745
  return {
@@ -776,11 +755,11 @@ class U extends M {
776
755
  static fromJSON(e, t) {
777
756
  if (typeof t.from != "number" || typeof t.to != "number")
778
757
  throw new RangeError("Invalid input for AddMarkStep.fromJSON");
779
- return new U(t.from, t.to, e.markFromJSON(t.mark));
758
+ return new Y(t.from, t.to, e.markFromJSON(t.mark));
780
759
  }
781
760
  }
782
- M.jsonID("addMark", U);
783
- class Y extends M {
761
+ D.jsonID("addMark", Y);
762
+ class X extends D {
784
763
  /**
785
764
  Create a mark-removing step.
786
765
  */
@@ -788,18 +767,18 @@ class Y extends M {
788
767
  super(), this.from = e, this.to = t, this.mark = r;
789
768
  }
790
769
  apply(e) {
791
- let t = e.slice(this.from, this.to), r = new T(He(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
770
+ let t = e.slice(this.from, this.to), r = new T(Ue(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
792
771
  return N.fromReplace(e, this.from, this.to, r);
793
772
  }
794
773
  invert() {
795
- return new U(this.from, this.to, this.mark);
774
+ return new Y(this.from, this.to, this.mark);
796
775
  }
797
776
  map(e) {
798
777
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
799
- return t.deleted && r.deleted || t.pos >= r.pos ? null : new Y(t.pos, r.pos, this.mark);
778
+ return t.deleted && r.deleted || t.pos >= r.pos ? null : new X(t.pos, r.pos, this.mark);
800
779
  }
801
780
  merge(e) {
802
- return e instanceof Y && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Y(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
781
+ return e instanceof X && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new X(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
803
782
  }
804
783
  toJSON() {
805
784
  return {
@@ -815,11 +794,11 @@ class Y extends M {
815
794
  static fromJSON(e, t) {
816
795
  if (typeof t.from != "number" || typeof t.to != "number")
817
796
  throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
818
- return new Y(t.from, t.to, e.markFromJSON(t.mark));
797
+ return new X(t.from, t.to, e.markFromJSON(t.mark));
819
798
  }
820
799
  }
821
- M.jsonID("removeMark", Y);
822
- class K extends M {
800
+ D.jsonID("removeMark", X);
801
+ class G extends D {
823
802
  /**
824
803
  Create a node mark step.
825
804
  */
@@ -831,7 +810,7 @@ class K extends M {
831
810
  if (!t)
832
811
  return N.fail("No node at mark step's position");
833
812
  let r = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
834
- return N.fromReplace(e, this.pos, this.pos + 1, new T(k.from(r), 0, t.isLeaf ? 0 : 1));
813
+ return N.fromReplace(e, this.pos, this.pos + 1, new T(C.from(r), 0, t.isLeaf ? 0 : 1));
835
814
  }
836
815
  invert(e) {
837
816
  let t = e.nodeAt(this.pos);
@@ -840,15 +819,15 @@ class K extends M {
840
819
  if (r.length == t.marks.length) {
841
820
  for (let i = 0; i < t.marks.length; i++)
842
821
  if (!t.marks[i].isInSet(r))
843
- return new K(this.pos, t.marks[i]);
844
- return new K(this.pos, this.mark);
822
+ return new G(this.pos, t.marks[i]);
823
+ return new G(this.pos, this.mark);
845
824
  }
846
825
  }
847
- return new ue(this.pos, this.mark);
826
+ return new pe(this.pos, this.mark);
848
827
  }
849
828
  map(e) {
850
829
  let t = e.mapResult(this.pos, 1);
851
- return t.deletedAfter ? null : new K(t.pos, this.mark);
830
+ return t.deletedAfter ? null : new G(t.pos, this.mark);
852
831
  }
853
832
  toJSON() {
854
833
  return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
@@ -859,11 +838,11 @@ class K extends M {
859
838
  static fromJSON(e, t) {
860
839
  if (typeof t.pos != "number")
861
840
  throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
862
- return new K(t.pos, e.markFromJSON(t.mark));
841
+ return new G(t.pos, e.markFromJSON(t.mark));
863
842
  }
864
843
  }
865
- M.jsonID("addNodeMark", K);
866
- class ue extends M {
844
+ D.jsonID("addNodeMark", G);
845
+ class pe extends D {
867
846
  /**
868
847
  Create a mark-removing step.
869
848
  */
@@ -875,15 +854,15 @@ class ue extends M {
875
854
  if (!t)
876
855
  return N.fail("No node at mark step's position");
877
856
  let r = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
878
- return N.fromReplace(e, this.pos, this.pos + 1, new T(k.from(r), 0, t.isLeaf ? 0 : 1));
857
+ return N.fromReplace(e, this.pos, this.pos + 1, new T(C.from(r), 0, t.isLeaf ? 0 : 1));
879
858
  }
880
859
  invert(e) {
881
860
  let t = e.nodeAt(this.pos);
882
- return !t || !this.mark.isInSet(t.marks) ? this : new K(this.pos, this.mark);
861
+ return !t || !this.mark.isInSet(t.marks) ? this : new G(this.pos, this.mark);
883
862
  }
884
863
  map(e) {
885
864
  let t = e.mapResult(this.pos, 1);
886
- return t.deletedAfter ? null : new ue(t.pos, this.mark);
865
+ return t.deletedAfter ? null : new pe(t.pos, this.mark);
887
866
  }
888
867
  toJSON() {
889
868
  return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
@@ -894,11 +873,11 @@ class ue extends M {
894
873
  static fromJSON(e, t) {
895
874
  if (typeof t.pos != "number")
896
875
  throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
897
- return new ue(t.pos, e.markFromJSON(t.mark));
876
+ return new pe(t.pos, e.markFromJSON(t.mark));
898
877
  }
899
878
  }
900
- M.jsonID("removeNodeMark", ue);
901
- class B extends M {
879
+ D.jsonID("removeNodeMark", pe);
880
+ class H extends D {
902
881
  /**
903
882
  The given `slice` should fit the 'gap' between `from` and
904
883
  `to`—the depths must line up, and the surrounding nodes must be
@@ -912,27 +891,27 @@ class B extends M {
912
891
  super(), this.from = e, this.to = t, this.slice = r, this.structure = i;
913
892
  }
914
893
  apply(e) {
915
- return this.structure && Fe(e, this.from, this.to) ? N.fail("Structure replace would overwrite content") : N.fromReplace(e, this.from, this.to, this.slice);
894
+ return this.structure && Ve(e, this.from, this.to) ? N.fail("Structure replace would overwrite content") : N.fromReplace(e, this.from, this.to, this.slice);
916
895
  }
917
896
  getMap() {
918
- return new F([this.from, this.to - this.from, this.slice.size]);
897
+ return new J([this.from, this.to - this.from, this.slice.size]);
919
898
  }
920
899
  invert(e) {
921
- return new B(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
900
+ return new H(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
922
901
  }
923
902
  map(e) {
924
- let t = e.mapResult(this.to, -1), r = this.from == this.to && B.MAP_BIAS < 0 ? t : e.mapResult(this.from, 1);
925
- return r.deletedAcross && t.deletedAcross ? null : new B(r.pos, Math.max(r.pos, t.pos), this.slice, this.structure);
903
+ let t = e.mapResult(this.to, -1), r = this.from == this.to && H.MAP_BIAS < 0 ? t : e.mapResult(this.from, 1);
904
+ return r.deletedAcross && t.deletedAcross ? null : new H(r.pos, Math.max(r.pos, t.pos), this.slice, this.structure);
926
905
  }
927
906
  merge(e) {
928
- if (!(e instanceof B) || e.structure || this.structure)
907
+ if (!(e instanceof H) || e.structure || this.structure)
929
908
  return null;
930
909
  if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
931
910
  let t = this.slice.size + e.slice.size == 0 ? T.empty : new T(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
932
- return new B(this.from, this.to + (e.to - e.from), t, this.structure);
911
+ return new H(this.from, this.to + (e.to - e.from), t, this.structure);
933
912
  } else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
934
913
  let t = this.slice.size + e.slice.size == 0 ? T.empty : new T(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
935
- return new B(e.from, this.to, t, this.structure);
914
+ return new H(e.from, this.to, t, this.structure);
936
915
  } else
937
916
  return null;
938
917
  }
@@ -946,12 +925,12 @@ class B extends M {
946
925
  static fromJSON(e, t) {
947
926
  if (typeof t.from != "number" || typeof t.to != "number")
948
927
  throw new RangeError("Invalid input for ReplaceStep.fromJSON");
949
- return new B(t.from, t.to, T.fromJSON(e, t.slice), !!t.structure);
928
+ return new H(t.from, t.to, T.fromJSON(e, t.slice), !!t.structure);
950
929
  }
951
930
  }
952
- B.MAP_BIAS = 1;
953
- M.jsonID("replace", B);
954
- class ee extends M {
931
+ H.MAP_BIAS = 1;
932
+ D.jsonID("replace", H);
933
+ class ie extends D {
955
934
  /**
956
935
  Create a replace-around step with the given range and gap.
957
936
  `insert` should be the point in the slice into which the content
@@ -962,7 +941,7 @@ class ee extends M {
962
941
  super(), this.from = e, this.to = t, this.gapFrom = r, this.gapTo = i, this.slice = s, this.insert = l, this.structure = a;
963
942
  }
964
943
  apply(e) {
965
- if (this.structure && (Fe(e, this.from, this.gapFrom) || Fe(e, this.gapTo, this.to)))
944
+ if (this.structure && (Ve(e, this.from, this.gapFrom) || Ve(e, this.gapTo, this.to)))
966
945
  return N.fail("Structure gap-replace would overwrite content");
967
946
  let t = e.slice(this.gapFrom, this.gapTo);
968
947
  if (t.openStart || t.openEnd)
@@ -971,7 +950,7 @@ class ee extends M {
971
950
  return r ? N.fromReplace(e, this.from, this.to, r) : N.fail("Content does not fit in gap");
972
951
  }
973
952
  getMap() {
974
- return new F([
953
+ return new J([
975
954
  this.from,
976
955
  this.gapFrom - this.from,
977
956
  this.insert,
@@ -982,11 +961,11 @@ class ee extends M {
982
961
  }
983
962
  invert(e) {
984
963
  let t = this.gapTo - this.gapFrom;
985
- return new ee(this.from, this.from + this.slice.size + t, this.from + this.insert, this.from + this.insert + t, e.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
964
+ return new ie(this.from, this.from + this.slice.size + t, this.from + this.insert, this.from + this.insert + t, e.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
986
965
  }
987
966
  map(e) {
988
967
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1), i = this.from == this.gapFrom ? t.pos : e.map(this.gapFrom, -1), s = this.to == this.gapTo ? r.pos : e.map(this.gapTo, 1);
989
- return t.deletedAcross && r.deletedAcross || i < t.pos || s > r.pos ? null : new ee(t.pos, r.pos, i, s, this.slice, this.insert, this.structure);
968
+ return t.deletedAcross && r.deletedAcross || i < t.pos || s > r.pos ? null : new ie(t.pos, r.pos, i, s, this.slice, this.insert, this.structure);
990
969
  }
991
970
  toJSON() {
992
971
  let e = {
@@ -1005,11 +984,11 @@ class ee extends M {
1005
984
  static fromJSON(e, t) {
1006
985
  if (typeof t.from != "number" || typeof t.to != "number" || typeof t.gapFrom != "number" || typeof t.gapTo != "number" || typeof t.insert != "number")
1007
986
  throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
1008
- return new ee(t.from, t.to, t.gapFrom, t.gapTo, T.fromJSON(e, t.slice), t.insert, !!t.structure);
987
+ return new ie(t.from, t.to, t.gapFrom, t.gapTo, T.fromJSON(e, t.slice), t.insert, !!t.structure);
1009
988
  }
1010
989
  }
1011
- M.jsonID("replaceAround", ee);
1012
- function Fe(n, e, t) {
990
+ D.jsonID("replaceAround", ie);
991
+ function Ve(n, e, t) {
1013
992
  let r = n.resolve(e), i = t - e, s = r.depth;
1014
993
  for (; i > 0 && s > 0 && r.indexAfter(s) == r.node(s).childCount; )
1015
994
  s--, i--;
@@ -1023,22 +1002,22 @@ function Fe(n, e, t) {
1023
1002
  }
1024
1003
  return !1;
1025
1004
  }
1026
- function sn(n, e, t) {
1005
+ function mn(n, e, t) {
1027
1006
  return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
1028
1007
  }
1029
- function Gt(n) {
1008
+ function rr(n) {
1030
1009
  let t = n.parent.content.cutByIndex(n.startIndex, n.endIndex);
1031
1010
  for (let r = n.depth, i = 0, s = 0; ; --r) {
1032
- let l = n.$from.node(r), a = n.$from.index(r) + i, u = n.$to.indexAfter(r) - s;
1033
- if (r < n.depth && l.canReplace(a, u, t))
1011
+ let l = n.$from.node(r), a = n.$from.index(r) + i, c = n.$to.indexAfter(r) - s;
1012
+ if (r < n.depth && l.canReplace(a, c, t))
1034
1013
  return r;
1035
- if (r == 0 || l.type.spec.isolating || !sn(l, a, u))
1014
+ if (r == 0 || l.type.spec.isolating || !mn(l, a, c))
1036
1015
  break;
1037
- a && (i = 1), u < l.childCount && (s = 1);
1016
+ a && (i = 1), c < l.childCount && (s = 1);
1038
1017
  }
1039
1018
  return null;
1040
1019
  }
1041
- class le extends M {
1020
+ class he extends D {
1042
1021
  /**
1043
1022
  Construct an attribute step.
1044
1023
  */
@@ -1054,17 +1033,17 @@ class le extends M {
1054
1033
  r[s] = t.attrs[s];
1055
1034
  r[this.attr] = this.value;
1056
1035
  let i = t.type.create(r, null, t.marks);
1057
- return N.fromReplace(e, this.pos, this.pos + 1, new T(k.from(i), 0, t.isLeaf ? 0 : 1));
1036
+ return N.fromReplace(e, this.pos, this.pos + 1, new T(C.from(i), 0, t.isLeaf ? 0 : 1));
1058
1037
  }
1059
1038
  getMap() {
1060
- return F.empty;
1039
+ return J.empty;
1061
1040
  }
1062
1041
  invert(e) {
1063
- return new le(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
1042
+ return new he(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
1064
1043
  }
1065
1044
  map(e) {
1066
1045
  let t = e.mapResult(this.pos, 1);
1067
- return t.deletedAfter ? null : new le(t.pos, this.attr, this.value);
1046
+ return t.deletedAfter ? null : new he(t.pos, this.attr, this.value);
1068
1047
  }
1069
1048
  toJSON() {
1070
1049
  return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
@@ -1072,11 +1051,11 @@ class le extends M {
1072
1051
  static fromJSON(e, t) {
1073
1052
  if (typeof t.pos != "number" || typeof t.attr != "string")
1074
1053
  throw new RangeError("Invalid input for AttrStep.fromJSON");
1075
- return new le(t.pos, t.attr, t.value);
1054
+ return new he(t.pos, t.attr, t.value);
1076
1055
  }
1077
1056
  }
1078
- M.jsonID("attr", le);
1079
- class xe extends M {
1057
+ D.jsonID("attr", he);
1058
+ class Te extends D {
1080
1059
  /**
1081
1060
  Construct an attribute step.
1082
1061
  */
@@ -1092,10 +1071,10 @@ class xe extends M {
1092
1071
  return N.ok(r);
1093
1072
  }
1094
1073
  getMap() {
1095
- return F.empty;
1074
+ return J.empty;
1096
1075
  }
1097
1076
  invert(e) {
1098
- return new xe(this.attr, e.attrs[this.attr]);
1077
+ return new Te(this.attr, e.attrs[this.attr]);
1099
1078
  }
1100
1079
  map(e) {
1101
1080
  return this;
@@ -1106,28 +1085,28 @@ class xe extends M {
1106
1085
  static fromJSON(e, t) {
1107
1086
  if (typeof t.attr != "string")
1108
1087
  throw new RangeError("Invalid input for DocAttrStep.fromJSON");
1109
- return new xe(t.attr, t.value);
1088
+ return new Te(t.attr, t.value);
1110
1089
  }
1111
1090
  }
1112
- M.jsonID("docAttr", xe);
1113
- let ce = class extends Error {
1091
+ D.jsonID("docAttr", Te);
1092
+ let me = class extends Error {
1114
1093
  };
1115
- ce = function n(e) {
1094
+ me = function n(e) {
1116
1095
  let t = Error.call(this, e);
1117
1096
  return t.__proto__ = n.prototype, t;
1118
1097
  };
1119
- ce.prototype = Object.create(Error.prototype);
1120
- ce.prototype.constructor = ce;
1121
- ce.prototype.name = "TransformError";
1122
- const De = /* @__PURE__ */ Object.create(null);
1123
- class L {
1098
+ me.prototype = Object.create(Error.prototype);
1099
+ me.prototype.constructor = me;
1100
+ me.prototype.name = "TransformError";
1101
+ const Be = /* @__PURE__ */ Object.create(null);
1102
+ class z {
1124
1103
  /**
1125
1104
  Initialize a selection with the head and anchor and ranges. If no
1126
1105
  ranges are given, constructs a single range across `$anchor` and
1127
1106
  `$head`.
1128
1107
  */
1129
1108
  constructor(e, t, r) {
1130
- this.$anchor = e, this.$head = t, this.ranges = r || [new on(e.min(t), e.max(t))];
1109
+ this.$anchor = e, this.$head = t, this.ranges = r || [new gn(e.min(t), e.max(t))];
1131
1110
  }
1132
1111
  /**
1133
1112
  The selection's anchor, as an unresolved position.
@@ -1191,8 +1170,8 @@ class L {
1191
1170
  i = r, r = r.lastChild;
1192
1171
  let s = e.steps.length, l = this.ranges;
1193
1172
  for (let a = 0; a < l.length; a++) {
1194
- let { $from: u, $to: f } = l[a], d = e.mapping.slice(s);
1195
- e.replaceRange(d.map(u.pos), d.map(f.pos), a ? T.empty : t), a == 0 && yt(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
1173
+ let { $from: c, $to: f } = l[a], d = e.mapping.slice(s);
1174
+ e.replaceRange(d.map(c.pos), d.map(f.pos), a ? T.empty : t), a == 0 && Et(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
1196
1175
  }
1197
1176
  }
1198
1177
  /**
@@ -1202,8 +1181,8 @@ class L {
1202
1181
  replaceWith(e, t) {
1203
1182
  let r = e.steps.length, i = this.ranges;
1204
1183
  for (let s = 0; s < i.length; s++) {
1205
- let { $from: l, $to: a } = i[s], u = e.mapping.slice(r), f = u.map(l.pos), d = u.map(a.pos);
1206
- s ? e.deleteRange(f, d) : (e.replaceRangeWith(f, d, t), yt(e, r, t.isInline ? -1 : 1));
1184
+ let { $from: l, $to: a } = i[s], c = e.mapping.slice(r), f = c.map(l.pos), d = c.map(a.pos);
1185
+ s ? e.deleteRange(f, d) : (e.replaceRangeWith(f, d, t), Et(e, r, t.isInline ? -1 : 1));
1207
1186
  }
1208
1187
  }
1209
1188
  /**
@@ -1214,11 +1193,11 @@ class L {
1214
1193
  found.
1215
1194
  */
1216
1195
  static findFrom(e, t, r = !1) {
1217
- let i = e.parent.inlineContent ? new D(e) : Q(e.node(0), e.parent, e.pos, e.index(), t, r);
1196
+ let i = e.parent.inlineContent ? new $(e) : re(e.node(0), e.parent, e.pos, e.index(), t, r);
1218
1197
  if (i)
1219
1198
  return i;
1220
1199
  for (let s = e.depth - 1; s >= 0; s--) {
1221
- let l = t < 0 ? Q(e.node(0), e.node(s), e.before(s + 1), e.index(s), t, r) : Q(e.node(0), e.node(s), e.after(s + 1), e.index(s) + 1, t, r);
1200
+ let l = t < 0 ? re(e.node(0), e.node(s), e.before(s + 1), e.index(s), t, r) : re(e.node(0), e.node(s), e.after(s + 1), e.index(s) + 1, t, r);
1222
1201
  if (l)
1223
1202
  return l;
1224
1203
  }
@@ -1239,14 +1218,14 @@ class L {
1239
1218
  exists.
1240
1219
  */
1241
1220
  static atStart(e) {
1242
- return Q(e, e, 0, 0, 1) || new j(e);
1221
+ return re(e, e, 0, 0, 1) || new j(e);
1243
1222
  }
1244
1223
  /**
1245
1224
  Find the cursor or leaf node selection closest to the end of the
1246
1225
  given document.
1247
1226
  */
1248
1227
  static atEnd(e) {
1249
- return Q(e, e, e.content.size, e.childCount, -1) || new j(e);
1228
+ return re(e, e, e.content.size, e.childCount, -1) || new j(e);
1250
1229
  }
1251
1230
  /**
1252
1231
  Deserialize the JSON representation of a selection. Must be
@@ -1255,7 +1234,7 @@ class L {
1255
1234
  static fromJSON(e, t) {
1256
1235
  if (!t || !t.type)
1257
1236
  throw new RangeError("Invalid input for Selection.fromJSON");
1258
- let r = De[t.type];
1237
+ let r = Be[t.type];
1259
1238
  if (!r)
1260
1239
  throw new RangeError(`No selection type ${t.type} defined`);
1261
1240
  return r.fromJSON(e, t);
@@ -1267,9 +1246,9 @@ class L {
1267
1246
  clash with classes from other modules.
1268
1247
  */
1269
1248
  static jsonID(e, t) {
1270
- if (e in De)
1249
+ if (e in Be)
1271
1250
  throw new RangeError("Duplicate use of selection JSON ID " + e);
1272
- return De[e] = t, t.prototype.jsonID = e, t;
1251
+ return Be[e] = t, t.prototype.jsonID = e, t;
1273
1252
  }
1274
1253
  /**
1275
1254
  Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
@@ -1281,11 +1260,11 @@ class L {
1281
1260
  returns the bookmark for that.
1282
1261
  */
1283
1262
  getBookmark() {
1284
- return D.between(this.$anchor, this.$head).getBookmark();
1263
+ return $.between(this.$anchor, this.$head).getBookmark();
1285
1264
  }
1286
1265
  }
1287
- L.prototype.visible = !0;
1288
- class on {
1266
+ z.prototype.visible = !0;
1267
+ class gn {
1289
1268
  /**
1290
1269
  Create a range.
1291
1270
  */
@@ -1293,16 +1272,16 @@ class on {
1293
1272
  this.$from = e, this.$to = t;
1294
1273
  }
1295
1274
  }
1296
- let mt = !1;
1297
- function gt(n) {
1298
- !mt && !n.parent.inlineContent && (mt = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
1275
+ let It = !1;
1276
+ function St(n) {
1277
+ !It && !n.parent.inlineContent && (It = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
1299
1278
  }
1300
- class D extends L {
1279
+ class $ extends z {
1301
1280
  /**
1302
1281
  Construct a text selection between the given points.
1303
1282
  */
1304
1283
  constructor(e, t = e) {
1305
- gt(e), gt(t), super(e, t);
1284
+ St(e), St(t), super(e, t);
1306
1285
  }
1307
1286
  /**
1308
1287
  Returns a resolved position if this is a cursor selection (an
@@ -1314,9 +1293,9 @@ class D extends L {
1314
1293
  map(e, t) {
1315
1294
  let r = e.resolve(t.map(this.head));
1316
1295
  if (!r.parent.inlineContent)
1317
- return L.near(r);
1296
+ return z.near(r);
1318
1297
  let i = e.resolve(t.map(this.anchor));
1319
- return new D(i.parent.inlineContent ? i : r, r);
1298
+ return new $(i.parent.inlineContent ? i : r, r);
1320
1299
  }
1321
1300
  replace(e, t = T.empty) {
1322
1301
  if (super.replace(e, t), t == T.empty) {
@@ -1325,10 +1304,10 @@ class D extends L {
1325
1304
  }
1326
1305
  }
1327
1306
  eq(e) {
1328
- return e instanceof D && e.anchor == this.anchor && e.head == this.head;
1307
+ return e instanceof $ && e.anchor == this.anchor && e.head == this.head;
1329
1308
  }
1330
1309
  getBookmark() {
1331
- return new Se(this.anchor, this.head);
1310
+ return new Re(this.anchor, this.head);
1332
1311
  }
1333
1312
  toJSON() {
1334
1313
  return { type: "text", anchor: this.anchor, head: this.head };
@@ -1339,7 +1318,7 @@ class D extends L {
1339
1318
  static fromJSON(e, t) {
1340
1319
  if (typeof t.anchor != "number" || typeof t.head != "number")
1341
1320
  throw new RangeError("Invalid input for TextSelection.fromJSON");
1342
- return new D(e.resolve(t.anchor), e.resolve(t.head));
1321
+ return new $(e.resolve(t.anchor), e.resolve(t.head));
1343
1322
  }
1344
1323
  /**
1345
1324
  Create a text selection from non-resolved positions.
@@ -1359,28 +1338,28 @@ class D extends L {
1359
1338
  static between(e, t, r) {
1360
1339
  let i = e.pos - t.pos;
1361
1340
  if ((!r || i) && (r = i >= 0 ? 1 : -1), !t.parent.inlineContent) {
1362
- let s = L.findFrom(t, r, !0) || L.findFrom(t, -r, !0);
1341
+ let s = z.findFrom(t, r, !0) || z.findFrom(t, -r, !0);
1363
1342
  if (s)
1364
1343
  t = s.$head;
1365
1344
  else
1366
- return L.near(t, r);
1345
+ return z.near(t, r);
1367
1346
  }
1368
- return e.parent.inlineContent || (i == 0 ? e = t : (e = (L.findFrom(e, -r, !0) || L.findFrom(e, r, !0)).$anchor, e.pos < t.pos != i < 0 && (e = t))), new D(e, t);
1347
+ return e.parent.inlineContent || (i == 0 ? e = t : (e = (z.findFrom(e, -r, !0) || z.findFrom(e, r, !0)).$anchor, e.pos < t.pos != i < 0 && (e = t))), new $(e, t);
1369
1348
  }
1370
1349
  }
1371
- L.jsonID("text", D);
1372
- class Se {
1350
+ z.jsonID("text", $);
1351
+ class Re {
1373
1352
  constructor(e, t) {
1374
1353
  this.anchor = e, this.head = t;
1375
1354
  }
1376
1355
  map(e) {
1377
- return new Se(e.map(this.anchor), e.map(this.head));
1356
+ return new Re(e.map(this.anchor), e.map(this.head));
1378
1357
  }
1379
1358
  resolve(e) {
1380
- return D.between(e.resolve(this.anchor), e.resolve(this.head));
1359
+ return $.between(e.resolve(this.anchor), e.resolve(this.head));
1381
1360
  }
1382
1361
  }
1383
- class z extends L {
1362
+ class P extends z {
1384
1363
  /**
1385
1364
  Create a node selection. Does not verify the validity of its
1386
1365
  argument.
@@ -1391,19 +1370,19 @@ class z extends L {
1391
1370
  }
1392
1371
  map(e, t) {
1393
1372
  let { deleted: r, pos: i } = t.mapResult(this.anchor), s = e.resolve(i);
1394
- return r ? L.near(s) : new z(s);
1373
+ return r ? z.near(s) : new P(s);
1395
1374
  }
1396
1375
  content() {
1397
- return new T(k.from(this.node), 0, 0);
1376
+ return new T(C.from(this.node), 0, 0);
1398
1377
  }
1399
1378
  eq(e) {
1400
- return e instanceof z && e.anchor == this.anchor;
1379
+ return e instanceof P && e.anchor == this.anchor;
1401
1380
  }
1402
1381
  toJSON() {
1403
1382
  return { type: "node", anchor: this.anchor };
1404
1383
  }
1405
1384
  getBookmark() {
1406
- return new Be(this.anchor);
1385
+ return new qe(this.anchor);
1407
1386
  }
1408
1387
  /**
1409
1388
  @internal
@@ -1411,13 +1390,13 @@ class z extends L {
1411
1390
  static fromJSON(e, t) {
1412
1391
  if (typeof t.anchor != "number")
1413
1392
  throw new RangeError("Invalid input for NodeSelection.fromJSON");
1414
- return new z(e.resolve(t.anchor));
1393
+ return new P(e.resolve(t.anchor));
1415
1394
  }
1416
1395
  /**
1417
1396
  Create a node selection from non-resolved positions.
1418
1397
  */
1419
1398
  static create(e, t) {
1420
- return new z(e.resolve(t));
1399
+ return new P(e.resolve(t));
1421
1400
  }
1422
1401
  /**
1423
1402
  Determines whether the given node may be selected as a node
@@ -1427,22 +1406,22 @@ class z extends L {
1427
1406
  return !e.isText && e.type.spec.selectable !== !1;
1428
1407
  }
1429
1408
  }
1430
- z.prototype.visible = !1;
1431
- L.jsonID("node", z);
1432
- class Be {
1409
+ P.prototype.visible = !1;
1410
+ z.jsonID("node", P);
1411
+ class qe {
1433
1412
  constructor(e) {
1434
1413
  this.anchor = e;
1435
1414
  }
1436
1415
  map(e) {
1437
1416
  let { deleted: t, pos: r } = e.mapResult(this.anchor);
1438
- return t ? new Se(r, r) : new Be(r);
1417
+ return t ? new Re(r, r) : new qe(r);
1439
1418
  }
1440
1419
  resolve(e) {
1441
1420
  let t = e.resolve(this.anchor), r = t.nodeAfter;
1442
- return r && z.isSelectable(r) ? new z(t) : L.near(t);
1421
+ return r && P.isSelectable(r) ? new P(t) : z.near(t);
1443
1422
  }
1444
1423
  }
1445
- class j extends L {
1424
+ class j extends z {
1446
1425
  /**
1447
1426
  Create an all-selection over the given document.
1448
1427
  */
@@ -1452,7 +1431,7 @@ class j extends L {
1452
1431
  replace(e, t = T.empty) {
1453
1432
  if (t == T.empty) {
1454
1433
  e.delete(0, e.doc.content.size);
1455
- let r = L.atStart(e.doc);
1434
+ let r = z.atStart(e.doc);
1456
1435
  r.eq(e.selection) || e.setSelection(r);
1457
1436
  } else
1458
1437
  super.replace(e, t);
@@ -1473,11 +1452,11 @@ class j extends L {
1473
1452
  return e instanceof j;
1474
1453
  }
1475
1454
  getBookmark() {
1476
- return an;
1455
+ return yn;
1477
1456
  }
1478
1457
  }
1479
- L.jsonID("all", j);
1480
- const an = {
1458
+ z.jsonID("all", j);
1459
+ const yn = {
1481
1460
  map() {
1482
1461
  return this;
1483
1462
  },
@@ -1485,65 +1464,65 @@ const an = {
1485
1464
  return new j(n);
1486
1465
  }
1487
1466
  };
1488
- function Q(n, e, t, r, i, s = !1) {
1467
+ function re(n, e, t, r, i, s = !1) {
1489
1468
  if (e.inlineContent)
1490
- return D.create(n, t);
1469
+ return $.create(n, t);
1491
1470
  for (let l = r - (i > 0 ? 0 : 1); i > 0 ? l < e.childCount : l >= 0; l += i) {
1492
1471
  let a = e.child(l);
1493
1472
  if (a.isAtom) {
1494
- if (!s && z.isSelectable(a))
1495
- return z.create(n, t - (i < 0 ? a.nodeSize : 0));
1473
+ if (!s && P.isSelectable(a))
1474
+ return P.create(n, t - (i < 0 ? a.nodeSize : 0));
1496
1475
  } else {
1497
- let u = Q(n, a, t + i, i < 0 ? a.childCount : 0, i, s);
1498
- if (u)
1499
- return u;
1476
+ let c = re(n, a, t + i, i < 0 ? a.childCount : 0, i, s);
1477
+ if (c)
1478
+ return c;
1500
1479
  }
1501
1480
  t += a.nodeSize * i;
1502
1481
  }
1503
1482
  return null;
1504
1483
  }
1505
- function yt(n, e, t) {
1484
+ function Et(n, e, t) {
1506
1485
  let r = n.steps.length - 1;
1507
1486
  if (r < e)
1508
1487
  return;
1509
1488
  let i = n.steps[r];
1510
- if (!(i instanceof B || i instanceof ee))
1489
+ if (!(i instanceof H || i instanceof ie))
1511
1490
  return;
1512
1491
  let s = n.mapping.maps[r], l;
1513
- s.forEach((a, u, f, d) => {
1492
+ s.forEach((a, c, f, d) => {
1514
1493
  l == null && (l = d);
1515
- }), n.setSelection(L.near(n.doc.resolve(l), t));
1494
+ }), n.setSelection(z.near(n.doc.resolve(l), t));
1516
1495
  }
1517
- function vt(n, e) {
1496
+ function bt(n, e) {
1518
1497
  return !e || !n ? n : n.bind(e);
1519
1498
  }
1520
- class ve {
1499
+ class Se {
1521
1500
  constructor(e, t, r) {
1522
- this.name = e, this.init = vt(t.init, r), this.apply = vt(t.apply, r);
1501
+ this.name = e, this.init = bt(t.init, r), this.apply = bt(t.apply, r);
1523
1502
  }
1524
1503
  }
1525
- new ve("doc", {
1504
+ new Se("doc", {
1526
1505
  init(n) {
1527
1506
  return n.doc || n.schema.topNodeType.createAndFill();
1528
1507
  },
1529
1508
  apply(n) {
1530
1509
  return n.doc;
1531
1510
  }
1532
- }), new ve("selection", {
1511
+ }), new Se("selection", {
1533
1512
  init(n, e) {
1534
- return n.selection || L.atStart(e.doc);
1513
+ return n.selection || z.atStart(e.doc);
1535
1514
  },
1536
1515
  apply(n) {
1537
1516
  return n.selection;
1538
1517
  }
1539
- }), new ve("storedMarks", {
1518
+ }), new Se("storedMarks", {
1540
1519
  init(n) {
1541
1520
  return n.storedMarks || null;
1542
1521
  },
1543
1522
  apply(n, e, t, r) {
1544
1523
  return r.selection.$cursor ? n.storedMarks : null;
1545
1524
  }
1546
- }), new ve("scrollToSelection", {
1525
+ }), new Se("scrollToSelection", {
1547
1526
  init() {
1548
1527
  return 0;
1549
1528
  },
@@ -1551,19 +1530,19 @@ new ve("doc", {
1551
1530
  return n.scrolledIntoView ? e + 1 : e;
1552
1531
  }
1553
1532
  });
1554
- function Xt(n, e, t) {
1533
+ function nr(n, e, t) {
1555
1534
  for (let r in n) {
1556
1535
  let i = n[r];
1557
- i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = Xt(i, e, {})), t[r] = i;
1536
+ i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = nr(i, e, {})), t[r] = i;
1558
1537
  }
1559
1538
  return t;
1560
1539
  }
1561
- class de {
1540
+ class se {
1562
1541
  /**
1563
1542
  Create a plugin.
1564
1543
  */
1565
1544
  constructor(e) {
1566
- this.spec = e, this.props = {}, e.props && Xt(e.props, this, this.props), this.key = e.key ? e.key.key : Zt("plugin");
1545
+ this.spec = e, this.props = {}, e.props && nr(e.props, this, this.props), this.key = e.key ? e.key.key : ir("plugin");
1567
1546
  }
1568
1547
  /**
1569
1548
  Extract the plugin's state field from an editor state.
@@ -1572,16 +1551,16 @@ class de {
1572
1551
  return e[this.key];
1573
1552
  }
1574
1553
  }
1575
- const ze = /* @__PURE__ */ Object.create(null);
1576
- function Zt(n) {
1577
- return n in ze ? n + "$" + ++ze[n] : (ze[n] = 0, n + "$");
1554
+ const Fe = /* @__PURE__ */ Object.create(null);
1555
+ function ir(n) {
1556
+ return n in Fe ? n + "$" + ++Fe[n] : (Fe[n] = 0, n + "$");
1578
1557
  }
1579
- class ln {
1558
+ class vn {
1580
1559
  /**
1581
1560
  Create a plugin key.
1582
1561
  */
1583
1562
  constructor(e = "key") {
1584
- this.key = Zt(e);
1563
+ this.key = ir(e);
1585
1564
  }
1586
1565
  /**
1587
1566
  Get the active plugin with this key, if any, from an editor
@@ -1597,115 +1576,625 @@ class ln {
1597
1576
  return e[this.key];
1598
1577
  }
1599
1578
  }
1600
- const $ = (n) => n === "bulletList" || n === "orderedList", be = (n) => n === "listItem", _ = (n) => n === "paragraph" || n === "heading";
1601
- function _e(n, e) {
1579
+ const sr = Zr.extend({
1580
+ addAttributes() {
1581
+ var n;
1582
+ return {
1583
+ ...(n = this.parent) == null ? void 0 : n.call(this),
1584
+ "data-note-file-id": {
1585
+ default: null,
1586
+ parseHTML: (e) => e.getAttribute("data-note-file-id"),
1587
+ renderHTML: (e) => e["data-note-file-id"] ? { "data-note-file-id": e["data-note-file-id"] } : {}
1588
+ }
1589
+ };
1590
+ },
1591
+ addProseMirrorPlugins() {
1592
+ return [
1593
+ new se({
1594
+ appendTransaction(n, e, t) {
1595
+ if (!n.some((h) => h.docChanged)) return null;
1596
+ const { selection: r } = t;
1597
+ if (!r.empty) return null;
1598
+ const { $from: i } = r;
1599
+ if (i.parent.type.name !== "paragraph" || i.parent.content.size !== 0) return null;
1600
+ const s = i.before(i.depth), l = e.selection.$from;
1601
+ if (l.depth < 1) return null;
1602
+ const a = l.before(l.depth);
1603
+ if (s !== a) return null;
1604
+ const c = e.doc.nodeAt(s);
1605
+ if (!c || c.type.name !== "paragraph") return null;
1606
+ let f = !1;
1607
+ if (c.forEach((h) => {
1608
+ h.marks.some((g) => g.type.name === "link") && (f = !0);
1609
+ }), !f) return null;
1610
+ const d = t.tr;
1611
+ try {
1612
+ d.join(s);
1613
+ } catch {
1614
+ }
1615
+ return d.setStoredMarks([]);
1616
+ }
1617
+ })
1618
+ ];
1619
+ }
1620
+ }), wn = Bt.extend({
1621
+ // Keep name as 'paragraph' for schema compatibility
1622
+ addNodeView() {
1623
+ return ({ node: n }) => {
1624
+ const e = n.attrs.indent || 0, t = document.createElement("p");
1625
+ return t.setAttribute("data-indent", String(e)), e > 0 && (t.style.paddingLeft = `${e * 20}px`), { dom: t, contentDOM: t };
1626
+ };
1627
+ },
1628
+ // Placeholder positioning based on indent level
1629
+ addAttributes() {
1630
+ var n;
1631
+ return {
1632
+ ...(n = this.parent) == null ? void 0 : n.call(this),
1633
+ indent: {
1634
+ default: 0,
1635
+ parseHTML: (e) => parseInt(e.getAttribute("data-indent") || "0"),
1636
+ renderHTML: (e) => e.indent ? {
1637
+ "data-indent": e.indent,
1638
+ // CSS custom property for dynamic placeholder offset
1639
+ style: `--indent-level: ${e.indent};`
1640
+ } : {}
1641
+ }
1642
+ };
1643
+ }
1644
+ }), M = {
1645
+ MOBILE_BREAKPOINT: 768,
1646
+ ICON_SIZE: "24px",
1647
+ CONTROLLER_HEIGHT: "25px",
1648
+ DOT_SIZE: {
1649
+ MOBILE: 16,
1650
+ DESKTOP: 9
1651
+ },
1652
+ DOT_POSITION: {
1653
+ MOBILE: "-8px",
1654
+ DESKTOP: "-4px"
1655
+ },
1656
+ COLORS: {
1657
+ BORDER: "#6C6C6C",
1658
+ BACKGROUND: "rgba(255, 255, 255, 1)"
1659
+ },
1660
+ ICONS: {
1661
+ LEFT: "https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/format_align_left/default/20px.svg",
1662
+ CENTER: "https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/format_align_center/default/20px.svg",
1663
+ RIGHT: "https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/format_align_right/default/20px.svg"
1664
+ }
1665
+ }, Z = {
1666
+ isMobile() {
1667
+ return document.documentElement.clientWidth < M.MOBILE_BREAKPOINT;
1668
+ },
1669
+ getDotPosition() {
1670
+ return Z.isMobile() ? M.DOT_POSITION.MOBILE : M.DOT_POSITION.DESKTOP;
1671
+ },
1672
+ getDotSize() {
1673
+ return Z.isMobile() ? M.DOT_SIZE.MOBILE : M.DOT_SIZE.DESKTOP;
1674
+ },
1675
+ clearContainerBorder(n) {
1676
+ const e = n.getAttribute("style"), t = e == null ? void 0 : e.replace("border: 1px dashed #6C6C6C;", "").replace("border: 1px dashed rgb(108, 108, 108)", "");
1677
+ n.setAttribute("style", t);
1678
+ },
1679
+ removeResizeElements(n) {
1680
+ if (n.childElementCount > 3)
1681
+ for (let e = 0; e < 5; e++)
1682
+ n.removeChild(n.lastChild);
1683
+ }
1684
+ };
1685
+ class Je {
1686
+ static parseImageAttributes(e, t) {
1687
+ Object.entries(e).forEach(([r, i]) => {
1688
+ if (!(i == null || r === "wrapperStyle")) {
1689
+ if (r === "containerStyle") {
1690
+ const s = i.match(/width:\s*([0-9.]+)px/);
1691
+ s && t.setAttribute("width", s[1]);
1692
+ return;
1693
+ }
1694
+ t.setAttribute(r, i);
1695
+ }
1696
+ });
1697
+ }
1698
+ static extractWidthFromStyle(e) {
1699
+ const t = e.match(/width:\s*([0-9.]+)px/);
1700
+ return t ? (t == null ? void 0 : t.at(1)) ?? null : null;
1701
+ }
1702
+ }
1703
+ function je(n, e) {
1704
+ const { minWidth: t, maxWidth: r } = e, i = t !== void 0 ? Math.max(0, t) : 0;
1705
+ let s = Math.max(i, n);
1706
+ return r !== void 0 && s > r && (s = r), s;
1707
+ }
1708
+ class ne {
1709
+ static getContainerStyle(e, t) {
1710
+ return `${`width: ${t && t !== "0px" && t !== "0" ? t : "100%"}; height: auto; cursor: pointer;`} ${e ? "display: inline-block;" : ""}`;
1711
+ }
1712
+ static getWrapperStyle(e) {
1713
+ return e ? "display: inline-block; float: left; padding-right: 8px;" : "display: flex";
1714
+ }
1715
+ static getPositionControllerStyle(e) {
1716
+ return `
1717
+ position: absolute;
1718
+ top: 0%;
1719
+ left: 50%;
1720
+ width: ${e ? "66px" : "100px"};
1721
+ height: ${M.CONTROLLER_HEIGHT};
1722
+ z-index: 999;
1723
+ background-color: ${M.COLORS.BACKGROUND};
1724
+ border-radius: 3px;
1725
+ border: 1px solid ${M.COLORS.BORDER};
1726
+ cursor: pointer;
1727
+ transform: translate(-50%, -50%);
1728
+ justify-content: space-between;
1729
+ align-items: center;
1730
+ padding: 0 6px;
1731
+ display: none;
1732
+ `.replace(/\s+/g, " ").trim();
1733
+ }
1734
+ static getDotStyle(e) {
1735
+ const t = Z.getDotPosition(), r = Z.getDotSize(), i = [
1736
+ `top: ${t}; left: ${t}; cursor: nwse-resize;`,
1737
+ `top: ${t}; right: ${t}; cursor: nesw-resize;`,
1738
+ `bottom: ${t}; left: ${t}; cursor: nesw-resize;`,
1739
+ `bottom: ${t}; right: ${t}; cursor: nwse-resize;`
1740
+ ];
1741
+ return `
1742
+ position: absolute;
1743
+ width: ${r}px;
1744
+ height: ${r}px;
1745
+ border: 1.5px solid ${M.COLORS.BORDER};
1746
+ border-radius: 50%;
1747
+ ${i[e]}
1748
+ `.replace(/\s+/g, " ").trim();
1749
+ }
1750
+ }
1751
+ class xn {
1752
+ constructor(e, t, r) {
1753
+ b(this, "elements");
1754
+ b(this, "inline");
1755
+ b(this, "dispatchNodeView");
1756
+ this.elements = e, this.inline = t, this.dispatchNodeView = r;
1757
+ }
1758
+ createControllerIcon(e) {
1759
+ const t = document.createElement("img");
1760
+ return t.setAttribute("src", e), t.setAttribute(
1761
+ "style",
1762
+ `width: ${M.ICON_SIZE}; height: ${M.ICON_SIZE}; cursor: pointer;`
1763
+ ), t.addEventListener("mouseover", (r) => {
1764
+ r.target.style.opacity = "0.6";
1765
+ }), t.addEventListener("mouseout", (r) => {
1766
+ r.target.style.opacity = "1";
1767
+ }), t;
1768
+ }
1769
+ handleLeftClick() {
1770
+ if (!this.inline)
1771
+ this.elements.container.setAttribute(
1772
+ "style",
1773
+ `${this.elements.container.style.cssText} margin: 0 auto 0 0;`
1774
+ );
1775
+ else {
1776
+ const e = "display: inline-block; float: left; padding-right: 8px;";
1777
+ this.elements.wrapper.setAttribute("style", e), this.elements.container.setAttribute("style", e);
1778
+ }
1779
+ this.dispatchNodeView();
1780
+ }
1781
+ handleCenterClick() {
1782
+ this.elements.container.setAttribute(
1783
+ "style",
1784
+ `${this.elements.container.style.cssText} margin: 0 auto;`
1785
+ ), this.dispatchNodeView();
1786
+ }
1787
+ handleRightClick() {
1788
+ if (!this.inline)
1789
+ this.elements.container.setAttribute(
1790
+ "style",
1791
+ `${this.elements.container.style.cssText} margin: 0 0 0 auto;`
1792
+ );
1793
+ else {
1794
+ const e = "display: inline-block; float: right; padding-left: 8px;";
1795
+ this.elements.wrapper.setAttribute("style", e), this.elements.container.setAttribute("style", e);
1796
+ }
1797
+ this.dispatchNodeView();
1798
+ }
1799
+ createPositionControls() {
1800
+ const e = document.createElement("div");
1801
+ e.setAttribute("style", ne.getPositionControllerStyle(this.inline));
1802
+ const t = this.createControllerIcon(M.ICONS.LEFT);
1803
+ if (t.addEventListener("click", () => this.handleLeftClick()), e.appendChild(t), !this.inline) {
1804
+ const i = this.createControllerIcon(M.ICONS.CENTER);
1805
+ i.addEventListener("click", () => this.handleCenterClick()), e.appendChild(i);
1806
+ }
1807
+ const r = this.createControllerIcon(M.ICONS.RIGHT);
1808
+ return r.addEventListener("click", () => this.handleRightClick()), e.appendChild(r), this.elements.container.appendChild(e), this;
1809
+ }
1810
+ }
1811
+ class In {
1812
+ constructor(e, t, r = () => ({})) {
1813
+ b(this, "elements");
1814
+ b(this, "dispatchNodeView");
1815
+ b(this, "getResizeLimits");
1816
+ b(this, "state", {
1817
+ isResizing: !1,
1818
+ startX: 0,
1819
+ startWidth: 0
1820
+ });
1821
+ b(this, "handleMouseMove", (e, t) => {
1822
+ if (!this.state.isResizing) return;
1823
+ const r = t % 2 === 0 ? -(e.clientX - this.state.startX) : e.clientX - this.state.startX, i = je(this.state.startWidth + r, this.getResizeLimits());
1824
+ this.elements.container.style.width = i + "px", this.elements.img.style.width = i + "px";
1825
+ });
1826
+ b(this, "handleMouseUp", () => {
1827
+ this.state.isResizing && (this.state.isResizing = !1), this.dispatchNodeView();
1828
+ });
1829
+ b(this, "handleTouchMove", (e, t) => {
1830
+ if (!this.state.isResizing) return;
1831
+ const r = t % 2 === 0 ? -(e.touches[0].clientX - this.state.startX) : e.touches[0].clientX - this.state.startX, i = je(this.state.startWidth + r, this.getResizeLimits());
1832
+ this.elements.container.style.width = i + "px", this.elements.img.style.width = i + "px";
1833
+ });
1834
+ b(this, "handleTouchEnd", () => {
1835
+ this.state.isResizing && (this.state.isResizing = !1), this.dispatchNodeView();
1836
+ });
1837
+ this.elements = e, this.dispatchNodeView = t, this.getResizeLimits = r;
1838
+ }
1839
+ createResizeHandle(e) {
1840
+ const t = document.createElement("div");
1841
+ return t.setAttribute("style", ne.getDotStyle(e)), t.addEventListener("mousedown", (r) => {
1842
+ r.preventDefault(), this.state.isResizing = !0, this.state.startX = r.clientX, this.state.startWidth = this.elements.container.offsetWidth;
1843
+ const i = (l) => this.handleMouseMove(l, e), s = () => {
1844
+ this.handleMouseUp(), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", s);
1845
+ };
1846
+ document.addEventListener("mousemove", i), document.addEventListener("mouseup", s);
1847
+ }), t.addEventListener(
1848
+ "touchstart",
1849
+ (r) => {
1850
+ r.cancelable && r.preventDefault(), this.state.isResizing = !0, this.state.startX = r.touches[0].clientX, this.state.startWidth = this.elements.container.offsetWidth;
1851
+ const i = (l) => this.handleTouchMove(l, e), s = () => {
1852
+ this.handleTouchEnd(), document.removeEventListener("touchmove", i), document.removeEventListener("touchend", s);
1853
+ };
1854
+ document.addEventListener("touchmove", i), document.addEventListener("touchend", s);
1855
+ },
1856
+ { passive: !1 }
1857
+ ), t;
1858
+ }
1859
+ }
1860
+ class Sn {
1861
+ constructor(e = {}) {
1862
+ b(this, "limits");
1863
+ this.limits = e;
1864
+ }
1865
+ update(e) {
1866
+ this.limits = { ...this.limits, ...e };
1867
+ }
1868
+ get() {
1869
+ return this.limits;
1870
+ }
1871
+ }
1872
+ class En {
1873
+ constructor(e, t, r = {}, i) {
1874
+ b(this, "context");
1875
+ b(this, "elements");
1876
+ b(this, "inline");
1877
+ b(this, "resizeLimitsRef");
1878
+ b(this, "resizeEventName");
1879
+ b(this, "handleResizeEvent");
1880
+ b(this, "clearContainerBorder", () => {
1881
+ Z.clearContainerBorder(this.elements.container);
1882
+ });
1883
+ b(this, "dispatchNodeView", () => {
1884
+ const { view: e, getPos: t } = this.context;
1885
+ if (typeof t == "function") {
1886
+ this.clearContainerBorder();
1887
+ const r = {
1888
+ ...this.context.node.attrs,
1889
+ width: Je.extractWidthFromStyle(this.elements.container.style.cssText) ?? this.context.node.attrs.width,
1890
+ containerStyle: `${this.elements.container.style.cssText}`,
1891
+ wrapperStyle: `${this.elements.wrapper.style.cssText}`
1892
+ };
1893
+ e.dispatch(e.state.tr.setNodeMarkup(t(), null, r));
1894
+ }
1895
+ });
1896
+ b(this, "removeResizeElements", () => {
1897
+ Z.removeResizeElements(this.elements.container);
1898
+ });
1899
+ this.context = e, this.inline = t, this.resizeLimitsRef = new Sn(r), this.resizeEventName = i, this.elements = this.createElements(), i && (this.handleResizeEvent = ((s) => {
1900
+ const l = s;
1901
+ l.detail && this.updateResizeLimits({ maxWidth: l.detail.maxWidth });
1902
+ }), window.addEventListener(i, this.handleResizeEvent));
1903
+ }
1904
+ destroy() {
1905
+ this.resizeEventName && this.handleResizeEvent && window.removeEventListener(this.resizeEventName, this.handleResizeEvent);
1906
+ }
1907
+ updateResizeLimits(e) {
1908
+ this.resizeLimitsRef.update(e);
1909
+ }
1910
+ createElements() {
1911
+ return {
1912
+ wrapper: document.createElement("div"),
1913
+ container: document.createElement("div"),
1914
+ img: document.createElement("img")
1915
+ };
1916
+ }
1917
+ setupImageAttributes() {
1918
+ Je.parseImageAttributes(this.context.node.attrs, this.elements.img);
1919
+ }
1920
+ setupDOMStructure() {
1921
+ const { wrapperStyle: e, containerStyle: t } = this.context.node.attrs;
1922
+ this.elements.wrapper.setAttribute("style", e), this.elements.wrapper.appendChild(this.elements.container), this.elements.container.setAttribute("style", t), this.elements.container.appendChild(this.elements.img);
1923
+ }
1924
+ /**
1925
+ * Applies min/max width limits to the container and image.
1926
+ * Enforces configured limits on initial render and when container style is re-applied.
1927
+ */
1928
+ applyResizeLimits() {
1929
+ const e = this.resizeLimitsRef.get();
1930
+ let t = Je.extractWidthFromStyle(this.elements.container.style.cssText);
1931
+ if (t === null) {
1932
+ const l = e.maxWidth;
1933
+ if (!l) return;
1934
+ t = l.toString();
1935
+ }
1936
+ const r = Number(t);
1937
+ if (Number.isNaN(r)) return;
1938
+ const i = je(r, e), s = `${i}px`;
1939
+ this.elements.container.style.width = s, this.elements.img.style.width = s, this.elements.img.setAttribute("width", String(i));
1940
+ }
1941
+ createPositionController() {
1942
+ new xn(
1943
+ this.elements,
1944
+ this.inline,
1945
+ this.dispatchNodeView
1946
+ ).createPositionControls();
1947
+ }
1948
+ createResizeHandler() {
1949
+ const e = new In(
1950
+ this.elements,
1951
+ this.dispatchNodeView,
1952
+ // eslint-disable-next-line prettier/prettier
1953
+ () => this.resizeLimitsRef.get()
1954
+ );
1955
+ Array.from({ length: 4 }, (t, r) => {
1956
+ const i = e.createResizeHandle(r);
1957
+ this.elements.container.appendChild(i);
1958
+ });
1959
+ }
1960
+ setupContainerClick() {
1961
+ this.elements.container.addEventListener("click", () => {
1962
+ var t;
1963
+ Z.isMobile() && ((t = document.querySelector(".ProseMirror-focused")) == null || t.blur()), this.removeResizeElements(), this.createPositionController(), this.elements.container.setAttribute(
1964
+ "style",
1965
+ `position: relative; border: 1px dashed ${M.COLORS.BORDER}; ${this.context.node.attrs.containerStyle}`
1966
+ ), this.applyResizeLimits(), this.createResizeHandler();
1967
+ });
1968
+ }
1969
+ setupContentClick() {
1970
+ document.addEventListener("click", (e) => {
1971
+ const t = e.target;
1972
+ this.elements.container.contains(t) || t.style.cssText === `width: ${M.ICON_SIZE}; height: ${M.ICON_SIZE}; cursor: pointer;` || (this.clearContainerBorder(), this.removeResizeElements());
1973
+ });
1974
+ }
1975
+ initialize() {
1976
+ this.setupDOMStructure(), this.setupImageAttributes(), this.applyResizeLimits();
1977
+ const { editable: e } = this.context.editor.options;
1978
+ return e ? (this.setupContainerClick(), this.setupContentClick(), {
1979
+ dom: this.elements.wrapper,
1980
+ destroy: () => this.destroy()
1981
+ }) : { dom: this.elements.container, destroy: () => this.destroy() };
1982
+ }
1983
+ }
1984
+ const or = "image-resize-limit-update";
1985
+ class bn {
1986
+ constructor(e) {
1987
+ b(this, "currentMaxWidth");
1988
+ b(this, "resizeTimeout");
1989
+ b(this, "rafId");
1990
+ b(this, "handleResize", () => {
1991
+ this.resizeTimeout && clearTimeout(this.resizeTimeout), this.resizeTimeout = window.setTimeout(() => {
1992
+ this.rafId && cancelAnimationFrame(this.rafId), this.rafId = requestAnimationFrame(() => {
1993
+ const e = this.measureContainerWidth();
1994
+ if (e !== this.currentMaxWidth) {
1995
+ this.currentMaxWidth = e;
1996
+ const t = new CustomEvent(or, {
1997
+ detail: { maxWidth: e }
1998
+ });
1999
+ window.dispatchEvent(t);
2000
+ }
2001
+ });
2002
+ }, 150);
2003
+ });
2004
+ this.editorElement = e, this.currentMaxWidth = this.measureContainerWidth(), window.addEventListener("resize", this.handleResize);
2005
+ }
2006
+ measureContainerWidth() {
2007
+ return this.editorElement.clientWidth;
2008
+ }
2009
+ getCurrentMaxWidth() {
2010
+ return this.currentMaxWidth;
2011
+ }
2012
+ destroy() {
2013
+ window.removeEventListener("resize", this.handleResize), this.resizeTimeout && clearTimeout(this.resizeTimeout), this.rafId && cancelAnimationFrame(this.rafId);
2014
+ }
2015
+ }
2016
+ const ar = Gr.extend({
2017
+ name: "imageResize",
2018
+ addOptions() {
2019
+ var n;
2020
+ return {
2021
+ ...(n = this.parent) == null ? void 0 : n.call(this),
2022
+ inline: !1,
2023
+ minWidth: void 0,
2024
+ maxWidth: void 0,
2025
+ allowBase64: !1
2026
+ };
2027
+ },
2028
+ onCreate() {
2029
+ const n = new bn(this.editor.view.dom);
2030
+ return this.resizeHandler = n, () => {
2031
+ n.destroy();
2032
+ };
2033
+ },
2034
+ renderHTML({ HTMLAttributes: n }) {
2035
+ const e = { ...n };
2036
+ if (n != null && n.id && (e["data-id"] = n.id), !(n != null && n.wrapperStyle))
2037
+ return ["img", e];
2038
+ const t = (n == null ? void 0 : n.width) ?? this.options.maxWidth ?? 0, r = this.options.inline, i = (n == null ? void 0 : n.containerStyle) ?? ne.getContainerStyle(r, `${t}px`), s = (n == null ? void 0 : n.wrapperStyle) ?? ne.getWrapperStyle(r);
2039
+ return ["div", { style: i }, ["div", { style: s }, ["img", e]]];
2040
+ },
2041
+ addAttributes() {
2042
+ var e;
2043
+ const n = this.options.inline;
2044
+ return {
2045
+ ...(e = this.parent) == null ? void 0 : e.call(this),
2046
+ id: {
2047
+ default: null,
2048
+ parseHTML: (t) => t.getAttribute("data-id"),
2049
+ renderHTML: (t) => t.id ? { "data-id": t.id, style: "margin-block: 10px;" } : {}
2050
+ },
2051
+ width: {
2052
+ renderHTML: (t) => t.width ? { width: t.width } : {}
2053
+ },
2054
+ containerStyle: {
2055
+ default: null,
2056
+ parseHTML: (t) => {
2057
+ const r = t.getAttribute("containerstyle");
2058
+ if (r)
2059
+ return r;
2060
+ const i = t.getAttribute("width");
2061
+ return i ? ne.getContainerStyle(n, `${i}px`) : `${t.style.cssText}`;
2062
+ },
2063
+ renderHTML: (t) => t.width ? { width: t.width } : {}
2064
+ },
2065
+ wrapperStyle: {
2066
+ default: ne.getWrapperStyle(n)
2067
+ }
2068
+ };
2069
+ },
2070
+ addNodeView() {
2071
+ return ({ node: n, editor: e, getPos: t }) => {
2072
+ var d;
2073
+ if (n.type.name !== "imageResize") {
2074
+ const h = document.createElement("img");
2075
+ return h.src = n.attrs.src, h.alt = n.attrs.alt || "", n.attrs.width && (h.width = n.attrs.width), n.attrs.height && (h.height = n.attrs.height), { dom: h };
2076
+ }
2077
+ const { inline: r, minWidth: i, maxWidth: s } = this.options, l = {
2078
+ node: n,
2079
+ editor: e,
2080
+ view: e.view,
2081
+ getPos: typeof t == "function" ? t : void 0
2082
+ }, a = {
2083
+ minWidth: i,
2084
+ maxWidth: s ?? ((d = this.resizeHandler) == null ? void 0 : d.getCurrentMaxWidth())
2085
+ }, f = new En(l, r, a, or).initialize();
2086
+ return f.dom.addEventListener("click", (h) => {
2087
+ h.preventDefault();
2088
+ const g = t();
2089
+ if (g !== void 0) {
2090
+ const { state: v, view: m } = e, I = v.tr.setSelection(P.create(v.doc, g));
2091
+ m.dispatch(I);
2092
+ }
2093
+ }), f;
2094
+ };
2095
+ },
2096
+ addCommands() {
2097
+ var n;
2098
+ return {
2099
+ ...(n = this.parent) == null ? void 0 : n.call(this),
2100
+ setResizableImage: (e) => ({ commands: t }) => t.insertContent({
2101
+ type: this.name,
2102
+ attrs: e
2103
+ })
2104
+ };
2105
+ },
2106
+ addKeyboardShortcuts() {
2107
+ return {
2108
+ Backspace: () => Tn(this.editor)
2109
+ };
2110
+ }
2111
+ }), Tn = (n) => {
2112
+ var t, r;
2113
+ const e = [];
2114
+ return n.state.doc.nodesBetween(
2115
+ n.state.selection.$from.pos,
2116
+ n.state.selection.$to.pos,
2117
+ (i) => {
2118
+ e == null || e.push(i);
2119
+ }
2120
+ ), e.length !== 1 || ((r = (t = e.at(0)) == null ? void 0 : t.type) == null ? void 0 : r.name) !== "imageResize" ? (console.log("trace 1: handled?"), !1) : (n.commands.deleteSelection(), !0);
2121
+ }, V = (n) => n === "bulletList" || n === "orderedList", Ce = (n) => n === "listItem", B = (n) => n === "paragraph" || n === "heading";
2122
+ function We(n, e) {
1602
2123
  for (const t of n)
1603
2124
  if (t(e))
1604
2125
  return !0;
1605
2126
  return !1;
1606
2127
  }
1607
- function un(n, e) {
2128
+ function Rn(n, e) {
1608
2129
  for (const t of n)
1609
2130
  if (t(e)) return !0;
1610
2131
  return !1;
1611
2132
  }
1612
- const It = ({
1613
- state: n,
1614
- view: e,
1615
- $from: t,
1616
- $to: r,
1617
- selectionIsEmpty: i
1618
- }) => {
1619
- if (i) return !1;
1620
- let s = 0;
1621
- if (n.doc.nodesBetween(t.pos, r.pos, (p) => {
1622
- (be(p.type.name) || _(p.type.name)) && s++;
1623
- }), !(s > 1)) return !1;
1624
- const { tr: a, doc: u } = n;
1625
- let f = !1;
1626
- const d = /* @__PURE__ */ new Set();
1627
- return u.nodesBetween(t.pos, r.pos, (p, y) => {
1628
- if ($(p.type.name) && (p.attrs.indent ?? 0) > 0) {
1629
- if (!d.has(y)) {
1630
- d.add(y);
1631
- const w = p.attrs.indent ?? 0;
1632
- a.setNodeAttribute(y, "indent", Math.max(0, w - 1)), f = !0;
1633
- const m = n.doc.resolve(y), S = n.doc.resolve(y + p.nodeSize), C = new qt(m, S, m.depth), A = Gt(C);
1634
- A != null && (a.lift(C, A), f = !0);
1635
- }
1636
- return !1;
1637
- }
1638
- if (_(p.type.name) && (p.attrs.indent ?? 0) > 0) {
1639
- const w = p.attrs.indent ?? 0;
1640
- a.setNodeAttribute(y, "indent", Math.max(0, w - 1)), f = !0;
1641
- }
1642
- return !0;
1643
- }), f ? (a.setMeta("addToHistory", !0), e.dispatch(a), !0) : !1;
1644
- }, cn = ({
2133
+ const Cn = ({
1645
2134
  editor: n,
1646
2135
  $from: e,
1647
2136
  currentNode: t
1648
2137
  }) => {
1649
2138
  const r = e.pos === e.start(), i = t.attrs.indent > 0;
1650
- return _(t.type.name) && i && r ? n.commands.outdent() : !1;
1651
- }, dn = ({
2139
+ return B(t.type.name) && i && r ? n.commands.outdent() : !1;
2140
+ }, kn = ({
1652
2141
  state: n,
1653
2142
  view: e,
1654
2143
  $from: t,
1655
2144
  currentNode: r
1656
2145
  }) => {
1657
2146
  const i = r.content.size === 0, s = r.attrs.indent > 0;
1658
- if (!(_(r.type.name) && s && i)) return !1;
1659
- const a = t.before(t.depth), u = n.tr;
1660
- return u.delete(a, a + r.nodeSize), e.dispatch(u), !0;
1661
- }, fn = ({
2147
+ if (!(B(r.type.name) && s && i)) return !1;
2148
+ const a = t.before(t.depth), c = n.tr;
2149
+ return c.delete(a, a + r.nodeSize), e.dispatch(c), !0;
2150
+ }, On = ({
1662
2151
  state: n,
1663
2152
  view: e,
1664
2153
  $from: t,
1665
2154
  currentNode: r
1666
2155
  }) => {
1667
- const i = t.pos === t.start(), s = r.content.size === 0, l = r.attrs.indent > 0, a = t.before(t.depth), u = n.doc.resolve(a).nodeBefore, f = u != null && $(u.type.name);
1668
- if (_(r.type.name) && !l && s && i && f) {
1669
- const p = n.tr;
1670
- return p.delete(a, a + r.nodeSize), e.dispatch(p), !0;
2156
+ const i = t.pos === t.start(), s = r.content.size === 0, l = r.attrs.indent > 0, a = t.before(t.depth), c = n.doc.resolve(a).nodeBefore, f = c != null && V(c.type.name);
2157
+ if (B(r.type.name) && !l && s && i && f) {
2158
+ const h = n.tr;
2159
+ return h.delete(a, a + r.nodeSize), e.dispatch(h), !0;
1671
2160
  }
1672
2161
  return !1;
1673
- }, hn = (n) => {
2162
+ }, Nn = (n) => {
1674
2163
  const { tr: e, state: t, dispatch: r } = n, { selection: i } = t, { $from: s, $to: l } = i;
1675
2164
  if (i.empty) return !1;
1676
2165
  let a = 0;
1677
2166
  if (t.doc.nodesBetween(s.pos, l.pos, (d) => {
1678
- ($(d.type.name) || _(d.type.name)) && a++;
2167
+ (V(d.type.name) || B(d.type.name)) && a++;
1679
2168
  }), a <= 1) return !1;
1680
- const u = /* @__PURE__ */ new Set();
2169
+ const c = /* @__PURE__ */ new Set();
1681
2170
  let f = !1;
1682
- return t.doc.nodesBetween(s.pos, l.pos, (d, p) => {
1683
- var w;
1684
- return !($(d.type.name) || _(d.type.name)) || u.has(p) ? !0 : (u.add(p), e.setNodeAttribute(p, "indent", (((w = d.attrs) == null ? void 0 : w.indent) ?? 0) + 1), f = !0, !1);
2171
+ return t.doc.nodesBetween(s.pos, l.pos, (d, h) => {
2172
+ var v;
2173
+ return !(V(d.type.name) || B(d.type.name)) || c.has(h) ? !0 : (c.add(h), e.setNodeAttribute(h, "indent", (((v = d.attrs) == null ? void 0 : v.indent) ?? 0) + 1), f = !0, !1);
1685
2174
  }), f ? (e.setMeta("addToHistory", !0), r == null || r(e), !0) : !1;
1686
- }, pn = (n) => {
2175
+ }, Ln = (n) => {
1687
2176
  var f;
1688
2177
  const { tr: e, state: t, dispatch: r } = n, { selection: i } = t, { $from: s } = i;
1689
2178
  let l = null, a = null;
1690
2179
  for (let d = s.depth; d > 0; d--) {
1691
- const p = s.node(d);
1692
- if ($(p.type.name)) {
1693
- l = { ...p, pos: s.before(d) }, a = { ...s.node(d + 1), pos: s.before(d + 1) };
2180
+ const h = s.node(d);
2181
+ if (V(h.type.name)) {
2182
+ l = { ...h, pos: s.before(d) }, a = { ...s.node(d + 1), pos: s.before(d + 1) };
1694
2183
  break;
1695
2184
  }
1696
2185
  }
1697
2186
  if (!l || !a) return !1;
1698
- if (((f = l.content) == null ? void 0 : f.childCount) === 1 && i instanceof D) {
2187
+ if (((f = l.content) == null ? void 0 : f.childCount) === 1 && i instanceof $) {
1699
2188
  const d = l.attrs.indent ?? 0;
1700
2189
  return e.setNodeAttribute(l.pos, "indent", d + 1), e.setMeta("addToHistory", !1), r == null || r(e), !0;
1701
2190
  }
1702
2191
  return n.chain().focus().sinkListItem("listItem").updateAttributes("bulletList", { indent: 1 }).updateAttributes("orderedList", { indent: 1 }).run(), !0;
1703
- }, mn = (n) => {
2192
+ }, An = (n) => {
1704
2193
  const { tr: e, state: t, dispatch: r } = n, { selection: i } = t, { $from: s } = i, l = s.node();
1705
- if (!(_(l.type.name) && i instanceof D)) return !1;
1706
- const u = l.attrs.indent ?? 0;
1707
- return e.setNodeAttribute(s.before(s.depth), "indent", u + 1), e.setMeta("addToHistory", !1), r == null || r(e), !0;
1708
- }, gn = ({
2194
+ if (!(B(l.type.name) && i instanceof $)) return !1;
2195
+ const c = l.attrs.indent ?? 0;
2196
+ return e.setNodeAttribute(s.before(s.depth), "indent", c + 1), e.setMeta("addToHistory", !1), r == null || r(e), !0;
2197
+ }, Tt = ({
1709
2198
  state: n,
1710
2199
  view: e,
1711
2200
  $from: t,
@@ -1714,45 +2203,77 @@ const It = ({
1714
2203
  }) => {
1715
2204
  if (i) return !1;
1716
2205
  let s = 0;
1717
- if (n.doc.nodesBetween(t.pos, r.pos, (p) => {
1718
- (be(p.type.name) || _(p.type.name)) && s++;
2206
+ if (n.doc.nodesBetween(t.pos, r.pos, (h) => {
2207
+ (Ce(h.type.name) || B(h.type.name)) && s++;
1719
2208
  }), !(s > 1)) return !1;
1720
- const { tr: a, doc: u } = n;
2209
+ const { tr: a, doc: c } = n;
1721
2210
  let f = !1;
1722
2211
  const d = /* @__PURE__ */ new Set();
1723
- return u.nodesBetween(t.pos, r.pos, (p, y) => {
1724
- if ($(p.type.name) && (p.attrs.indent ?? 0) > 0) {
1725
- if (!d.has(y)) {
1726
- d.add(y);
1727
- const w = p.attrs.indent ?? 0;
1728
- a.setNodeAttribute(y, "indent", Math.max(0, w - 1)), f = !0;
1729
- const m = n.doc.resolve(y), S = n.doc.resolve(y + p.nodeSize), C = new qt(m, S, m.depth), A = Gt(C);
1730
- A != null && (a.lift(C, A), f = !0);
2212
+ return c.nodesBetween(t.pos, r.pos, (h, g) => {
2213
+ if (V(h.type.name) && (h.attrs.indent ?? 0) > 0) {
2214
+ if (!d.has(g)) {
2215
+ d.add(g);
2216
+ const v = h.attrs.indent ?? 0;
2217
+ a.setNodeAttribute(g, "indent", Math.max(0, v - 1)), f = !0;
2218
+ const m = n.doc.resolve(g), I = n.doc.resolve(g + h.nodeSize), A = new Xt(m, I, m.depth), L = rr(A);
2219
+ L != null && (a.lift(A, L), f = !0);
1731
2220
  }
1732
2221
  return !1;
1733
2222
  }
1734
- if (_(p.type.name) && (p.attrs.indent ?? 0) > 0) {
1735
- const w = p.attrs.indent ?? 0;
1736
- a.setNodeAttribute(y, "indent", Math.max(0, w - 1)), f = !0;
2223
+ if (B(h.type.name) && (h.attrs.indent ?? 0) > 0) {
2224
+ const v = h.attrs.indent ?? 0;
2225
+ a.setNodeAttribute(g, "indent", Math.max(0, v - 1)), f = !0;
1737
2226
  }
1738
2227
  return !0;
1739
2228
  }), f ? (a.setMeta("addToHistory", !0), e.dispatch(a), !0) : !1;
1740
- }, yn = ({ $from: n, selectionIsEmpty: e }) => {
2229
+ }, zn = ({
2230
+ state: n,
2231
+ view: e,
2232
+ $from: t,
2233
+ $to: r,
2234
+ selectionIsEmpty: i
2235
+ }) => {
2236
+ if (i) return !1;
2237
+ let s = 0;
2238
+ if (n.doc.nodesBetween(t.pos, r.pos, (h) => {
2239
+ (Ce(h.type.name) || B(h.type.name)) && s++;
2240
+ }), !(s > 1)) return !1;
2241
+ const { tr: a, doc: c } = n;
2242
+ let f = !1;
2243
+ const d = /* @__PURE__ */ new Set();
2244
+ return c.nodesBetween(t.pos, r.pos, (h, g) => {
2245
+ if (V(h.type.name) && (h.attrs.indent ?? 0) > 0) {
2246
+ if (!d.has(g)) {
2247
+ d.add(g);
2248
+ const v = h.attrs.indent ?? 0;
2249
+ a.setNodeAttribute(g, "indent", Math.max(0, v - 1)), f = !0;
2250
+ const m = n.doc.resolve(g), I = n.doc.resolve(g + h.nodeSize), A = new Xt(m, I, m.depth), L = rr(A);
2251
+ L != null && (a.lift(A, L), f = !0);
2252
+ }
2253
+ return !1;
2254
+ }
2255
+ if (B(h.type.name) && (h.attrs.indent ?? 0) > 0) {
2256
+ const v = h.attrs.indent ?? 0;
2257
+ a.setNodeAttribute(g, "indent", Math.max(0, v - 1)), f = !0;
2258
+ }
2259
+ return !0;
2260
+ }), f ? (a.setMeta("addToHistory", !0), e.dispatch(a), !0) : !1;
2261
+ }, Mn = ({ $from: n, selectionIsEmpty: e }) => {
1741
2262
  var l;
1742
2263
  if (!e) return !1;
1743
2264
  let t = !1, r = !1, i = 0;
1744
2265
  for (let a = n.depth; a > 0; a--) {
1745
- const u = n.node(a);
1746
- if ($(u.type.name))
2266
+ const c = n.node(a);
2267
+ if (V(c.type.name))
1747
2268
  if (!t)
1748
- t = !0, i = ((l = u.attrs) == null ? void 0 : l.indent) ?? 0;
2269
+ t = !0, i = ((l = c.attrs) == null ? void 0 : l.indent) ?? 0;
1749
2270
  else {
1750
2271
  r = !0;
1751
2272
  break;
1752
2273
  }
1753
2274
  }
1754
2275
  return t && !r ? i === 0 : !1;
1755
- }, vn = ({
2276
+ }, Pn = ({
1756
2277
  state: n,
1757
2278
  view: e,
1758
2279
  $from: t,
@@ -1761,10 +2282,10 @@ const It = ({
1761
2282
  }) => {
1762
2283
  if (!i || !(r.type.name === "paragraph" && r.content.size === 0)) return !1;
1763
2284
  const l = t.before(t.depth), a = n.doc.resolve(l).nodeBefore;
1764
- if (!(a != null && $(a.type.name))) return !1;
1765
- const f = n.doc.resolve(l - 1), d = n.tr.setSelection(D.near(f, -1));
2285
+ if (!(a != null && V(a.type.name))) return !1;
2286
+ const f = n.doc.resolve(l - 1), d = n.tr.setSelection($.near(f, -1));
1766
2287
  return e.dispatch(d), !0;
1767
- }, In = ({
2288
+ }, Dn = ({
1768
2289
  state: n,
1769
2290
  view: e,
1770
2291
  $from: t,
@@ -1773,21 +2294,21 @@ const It = ({
1773
2294
  }) => {
1774
2295
  if (i) return !1;
1775
2296
  let s = 0;
1776
- if (n.doc.nodesBetween(t.pos, r.pos, (p) => {
1777
- (be(p.type.name) || _(p.type.name)) && s++;
2297
+ if (n.doc.nodesBetween(t.pos, r.pos, (h) => {
2298
+ (Ce(h.type.name) || B(h.type.name)) && s++;
1778
2299
  }), !(s > 1)) return !1;
1779
- const { tr: a, doc: u } = n;
2300
+ const { tr: a, doc: c } = n;
1780
2301
  let f = !1;
1781
2302
  const d = /* @__PURE__ */ new Set();
1782
- return u.nodesBetween(t.pos, r.pos, (p, y) => {
1783
- if (($(p.type.name) || _(p.type.name)) && !d.has(y)) {
1784
- d.add(y);
1785
- const m = p.attrs.indent ?? 0;
1786
- return a.setNodeAttribute(y, "indent", m + 1), f = !0, !1;
2303
+ return c.nodesBetween(t.pos, r.pos, (h, g) => {
2304
+ if ((V(h.type.name) || B(h.type.name)) && !d.has(g)) {
2305
+ d.add(g);
2306
+ const m = h.attrs.indent ?? 0;
2307
+ return a.setNodeAttribute(g, "indent", m + 1), f = !0, !1;
1787
2308
  }
1788
2309
  return !0;
1789
2310
  }), f ? (a.setMeta("addToHistory", !0), e.dispatch(a), !0) : !1;
1790
- }, wn = ({
2311
+ }, _n = ({
1791
2312
  state: n,
1792
2313
  view: e,
1793
2314
  $from: t,
@@ -1795,52 +2316,52 @@ const It = ({
1795
2316
  }) => r || t.path.some((s) => {
1796
2317
  var l;
1797
2318
  return ((l = s == null ? void 0 : s.type) == null ? void 0 : l.name) === "listItem";
1798
- }) ? !1 : (e.dispatch(n.tr.insertText(" ")), !0), xn = ({ editor: n, currentNode: e, $from: t }) => {
2319
+ }) ? !1 : (e.dispatch(n.tr.insertText(" ")), !0), $n = ({ editor: n, currentNode: e, $from: t }) => {
1799
2320
  const r = e.content.size === 0, i = t.node(t.depth - 1);
1800
- return i && be(i.type.name) && !r ? (n.chain().focus().indent().focus().run(), !0) : !1;
1801
- }, Sn = ({ state: n, view: e, $from: t, currentNode: r }) => {
2321
+ return i && Ce(i.type.name) && !r ? (n.chain().focus().indent().focus().run(), !0) : !1;
2322
+ }, Bn = ({ state: n, view: e, $from: t, currentNode: r }) => {
1802
2323
  const i = t.pos === t.start(), s = r.content.size === 0;
1803
2324
  return !i && !s ? (e.dispatch(n.tr.insertText(" ")), !0) : !1;
1804
2325
  };
1805
- function Je(n) {
2326
+ function He(n) {
1806
2327
  const { state: e, view: t } = n, { $from: r, $to: i, empty: s } = e.selection;
1807
2328
  return { editor: n, state: e, view: t, $from: r, $to: i, selectionIsEmpty: s, currentNode: r.node() };
1808
2329
  }
1809
- const bn = Xr.create({
2330
+ const Fn = dn.create({
1810
2331
  name: "indent",
1811
2332
  addKeyboardShortcuts() {
1812
2333
  return {
1813
2334
  Enter: () => this.editor.commands._handleEnterKeyDown(),
1814
2335
  Tab: () => {
1815
- const n = Je(this.editor);
1816
- return _e(
2336
+ const n = He(this.editor);
2337
+ return We(
1817
2338
  [
1818
- In,
1819
- wn,
1820
- xn,
1821
- Sn
2339
+ Dn,
2340
+ _n,
2341
+ $n,
2342
+ Bn
1822
2343
  ],
1823
2344
  n
1824
2345
  ) || this.editor.commands.indent();
1825
2346
  },
1826
2347
  Backspace: () => {
1827
- const n = Je(this.editor);
1828
- return _e(
2348
+ const n = He(this.editor);
2349
+ return We(
1829
2350
  [
1830
- cn,
1831
- dn,
1832
- fn
2351
+ Cn,
2352
+ kn,
2353
+ On
1833
2354
  ],
1834
2355
  n
1835
2356
  );
1836
2357
  },
1837
2358
  "Shift-Tab": () => {
1838
- const n = Je(this.editor);
1839
- return _e(
2359
+ const n = He(this.editor);
2360
+ return We(
1840
2361
  [
1841
- gn,
1842
- vn,
1843
- yn
2362
+ zn,
2363
+ Pn,
2364
+ Mn
1844
2365
  ],
1845
2366
  n
1846
2367
  ) || this.editor.chain().outdentShiftTab().run();
@@ -1850,7 +2371,7 @@ const bn = Xr.create({
1850
2371
  },
1851
2372
  addProseMirrorPlugins() {
1852
2373
  return [
1853
- new de({
2374
+ new se({
1854
2375
  // WHY: When a paragraph/heading inside a listItem gets an indent attribute (e.g. from a
1855
2376
  // paste or undo), the indent belongs on the parent list node, not the text node inside it.
1856
2377
  // This plugin corrects that automatically on every document change.
@@ -1858,20 +2379,20 @@ const bn = Xr.create({
1858
2379
  if (!n.some((s) => s.docChanged)) return null;
1859
2380
  let i = null;
1860
2381
  return t.doc.descendants((s, l) => {
1861
- var y;
1862
- if (!(_(s.type.name) && (((y = s == null ? void 0 : s.attrs) == null ? void 0 : y.indent) ?? 0) > 0)) return;
1863
- const u = t.doc.resolve(l);
1864
- if (!(u.parent.type.name === "listItem")) return;
2382
+ var g;
2383
+ if (!(B(s.type.name) && (((g = s == null ? void 0 : s.attrs) == null ? void 0 : g.indent) ?? 0) > 0)) return;
2384
+ const c = t.doc.resolve(l);
2385
+ if (!(c.parent.type.name === "listItem")) return;
1865
2386
  let d = null;
1866
- for (let w = u.depth - 1; w > 0; w--)
1867
- if ($(u.node(w).type.name)) {
1868
- d = u.start(w) - 1;
2387
+ for (let v = c.depth - 1; v > 0; v--)
2388
+ if (V(c.node(v).type.name)) {
2389
+ d = c.start(v) - 1;
1869
2390
  break;
1870
2391
  }
1871
2392
  if (d === null || d < 0) return;
1872
2393
  i || (i = t.tr);
1873
- const p = s.attrs.indent;
1874
- i.setNodeAttribute(l, "indent", 0), i.setNodeAttribute(d, "indent", p);
2394
+ const h = s.attrs.indent;
2395
+ i.setNodeAttribute(l, "indent", 0), i.setNodeAttribute(d, "indent", h);
1875
2396
  }), i;
1876
2397
  }
1877
2398
  })
@@ -1894,21 +2415,21 @@ const bn = Xr.create({
1894
2415
  addCommands() {
1895
2416
  return {
1896
2417
  _handleEnterKeyDown: () => (n) => {
1897
- var u;
2418
+ var c;
1898
2419
  const { tr: e, state: t, dispatch: r } = n, { $from: i } = t.selection, s = i.node();
1899
- if (!(((u = s == null ? void 0 : s.type) == null ? void 0 : u.name) === "paragraph" && s.attrs.indent)) return !1;
2420
+ if (!(((c = s == null ? void 0 : s.type) == null ? void 0 : c.name) === "paragraph" && s.attrs.indent)) return !1;
1900
2421
  const a = s.attrs.indent;
1901
2422
  return e.split(i.pos), e.setNodeAttribute(e.selection.$from.before(), "indent", a), e.scrollIntoView(), e.setMeta("addToHistory", !1), r == null || r(e), !0;
1902
2423
  },
1903
2424
  _handleSpaceKeyDown: () => () => !1,
1904
- indent: () => (n) => un(
1905
- [hn, pn, mn],
2425
+ indent: () => (n) => Rn(
2426
+ [Nn, Ln, An],
1906
2427
  n
1907
2428
  ),
1908
2429
  // WHY: `outdent` is used by Backspace. It only reduces indent when the cursor
1909
2430
  // is at the very start of the node, preventing accidental outdenting mid-sentence.
1910
2431
  outdent: () => (n) => {
1911
- const { state: e, view: t, tr: r, dispatch: i } = n, { $from: s, $to: l, empty: a } = e.selection, u = {
2432
+ const { state: e, view: t, tr: r, dispatch: i } = n, { $from: s, $to: l, empty: a } = e.selection, c = {
1912
2433
  editor: n.editor,
1913
2434
  state: e,
1914
2435
  view: t,
@@ -1917,17 +2438,17 @@ const bn = Xr.create({
1917
2438
  selectionIsEmpty: a,
1918
2439
  currentNode: s.node()
1919
2440
  };
1920
- if (It(u)) return !0;
2441
+ if (Tt(c)) return !0;
1921
2442
  const f = s.node();
1922
- if (!(_(f.type.name) && f.attrs.indent > 0) || !(s.pos === s.start())) return !1;
1923
- const y = Math.max(0, f.attrs.indent - 1);
1924
- return r.setNodeAttribute(s.before(s.depth), "indent", y), r.setMeta("addToHistory", !1), i == null || i(r), !0;
2443
+ if (!(B(f.type.name) && f.attrs.indent > 0) || !(s.pos === s.start())) return !1;
2444
+ const g = Math.max(0, f.attrs.indent - 1);
2445
+ return r.setNodeAttribute(s.before(s.depth), "indent", g), r.setMeta("addToHistory", !1), i == null || i(r), !0;
1925
2446
  },
1926
2447
  // WHY: `outdentShiftTab` is used by Shift+Tab. Unlike `outdent`, it reduces indent
1927
2448
  // regardless of where the cursor is — Shift+Tab is an explicit intent to un-indent.
1928
2449
  outdentShiftTab: () => (n) => {
1929
2450
  const { state: e, tr: t, dispatch: r } = n, { $from: i } = e.selection, s = i.node();
1930
- if (!(_(s.type.name) && s.attrs.indent > 0)) return !1;
2451
+ if (!(B(s.type.name) && s.attrs.indent > 0)) return !1;
1931
2452
  const a = Math.max(0, s.attrs.indent - 1);
1932
2453
  return t.setNodeAttribute(i.before(i.depth), "indent", a), t.setMeta("addToHistory", !1), r == null || r(t), !0;
1933
2454
  },
@@ -1942,13 +2463,13 @@ const bn = Xr.create({
1942
2463
  selectionIsEmpty: s,
1943
2464
  currentNode: r.node()
1944
2465
  };
1945
- return It(l) ? !0 : n.chain().outdentShiftTab().run();
2466
+ return Tt(l) ? !0 : n.chain().outdentShiftTab().run();
1946
2467
  }
1947
2468
  };
1948
2469
  }
1949
2470
  });
1950
- var Tn = Nt, En = At, kn = Ct;
1951
- const Rn = Tn.extend({
2471
+ var Jn = Pt, Wn = Dt, Hn = _t;
2472
+ const Vn = Jn.extend({
1952
2473
  addAttributes() {
1953
2474
  var n;
1954
2475
  return {
@@ -1967,7 +2488,7 @@ const Rn = Tn.extend({
1967
2488
  return t.setAttribute("data-indent", String(e)), e > 0 && (t.style.paddingLeft = `${e * 20}px`), { dom: t, contentDOM: t };
1968
2489
  };
1969
2490
  }
1970
- }), On = kn.extend({
2491
+ }), jn = Hn.extend({
1971
2492
  addAttributes() {
1972
2493
  var n;
1973
2494
  return {
@@ -1986,7 +2507,7 @@ const Rn = Tn.extend({
1986
2507
  return t.setAttribute("data-indent", String(e)), e > 0 && (t.style.paddingLeft = `${e * 20}px`), { dom: t, contentDOM: t };
1987
2508
  };
1988
2509
  }
1989
- }), Qt = En.extend({
2510
+ }), lr = Wn.extend({
1990
2511
  addAttributes() {
1991
2512
  var n;
1992
2513
  return {
@@ -2004,50 +2525,50 @@ const Rn = Tn.extend({
2004
2525
  }
2005
2526
  };
2006
2527
  }
2007
- }), er = fe.create({
2528
+ }), cr = ge.create({
2008
2529
  name: "dynamicBulletStyling",
2009
2530
  addProseMirrorPlugins() {
2010
2531
  return [
2011
- new de({
2012
- key: new ln("dynamicBulletStyling"),
2532
+ new se({
2533
+ key: new vn("dynamicBulletStyling"),
2013
2534
  appendTransaction: (n, e, t) => {
2014
2535
  const r = t.tr;
2015
2536
  let i = !1;
2016
2537
  return t.doc.descendants((s, l) => {
2017
2538
  if (s.type.name === "listItem") {
2018
2539
  let a = 0;
2019
- const u = t.doc.resolve(l);
2020
- for (let f = u.depth; f > 0; f--)
2021
- if (u.node(f).type.name === "bulletList") {
2540
+ const c = t.doc.resolve(l);
2541
+ for (let f = c.depth; f > 0; f--)
2542
+ if (c.node(f).type.name === "bulletList") {
2022
2543
  a = 1;
2023
2544
  break;
2024
2545
  }
2025
- a > 0 && (r.setNodeAttribute(u.pos, "[data-style]", "line-height: inherit"), i = !0);
2546
+ a > 0 && (r.setNodeAttribute(c.pos, "[data-style]", "line-height: inherit"), i = !0);
2026
2547
  }
2027
2548
  }), i ? r : null;
2028
2549
  }
2029
2550
  })
2030
2551
  ];
2031
2552
  }
2032
- }), Nn = (n) => n === "bulletList" || n === "orderedList", An = (n) => n === "paragraph" || n === "heading", Cn = fe.create({
2553
+ }), Un = (n) => n === "bulletList" || n === "orderedList", qn = (n) => n === "paragraph" || n === "heading", Kn = ge.create({
2033
2554
  name: "listIndentIntegration",
2034
2555
  addProseMirrorPlugins() {
2035
2556
  return [
2036
2557
  // Indent attribute transfer plugin
2037
- new de({
2558
+ new se({
2038
2559
  appendTransaction: (n, e, t) => {
2039
2560
  if (!n.find((i) => i.docChanged))
2040
2561
  return null;
2041
2562
  let r = null;
2042
2563
  return t.doc.descendants((i, s) => {
2043
2564
  var l;
2044
- if (An(i.type.name) && (((l = i == null ? void 0 : i.attrs) == null ? void 0 : l.indent) ?? 0) > 0) {
2565
+ if (qn(i.type.name) && (((l = i == null ? void 0 : i.attrs) == null ? void 0 : l.indent) ?? 0) > 0) {
2045
2566
  const a = t.doc.resolve(s);
2046
2567
  if (a.parent.type.name === "listItem") {
2047
2568
  let f = null;
2048
2569
  for (let d = a.depth - 1; d > 0; d--) {
2049
- const p = a.node(d);
2050
- if (Nn(p.type.name)) {
2570
+ const h = a.node(d);
2571
+ if (Un(h.type.name)) {
2051
2572
  f = a.start(d) - 1;
2052
2573
  break;
2053
2574
  }
@@ -2063,7 +2584,7 @@ const Rn = Tn.extend({
2063
2584
  }
2064
2585
  }),
2065
2586
  // T088, T089, T090: Paste transformation plugin
2066
- new de({
2587
+ new se({
2067
2588
  props: {
2068
2589
  transformPastedHTML(n) {
2069
2590
  const e = /<p[^>]*style="[^"]*(?:padding|margin)-left:\s*(\d+)(?:px|pt|em)[^"]*"[^>]*>/gi;
@@ -2077,7 +2598,7 @@ const Rn = Tn.extend({
2077
2598
  })
2078
2599
  ];
2079
2600
  }
2080
- }), tr = fe.create({
2601
+ }), dr = ge.create({
2081
2602
  name: "fontSize",
2082
2603
  addOptions() {
2083
2604
  return {
@@ -2107,7 +2628,7 @@ const Rn = Tn.extend({
2107
2628
  unsetFontSize: () => ({ chain: n }) => n().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
2108
2629
  };
2109
2630
  }
2110
- }), rr = fe.create({
2631
+ }), ur = ge.create({
2111
2632
  name: "lineHeight",
2112
2633
  addOptions() {
2113
2634
  return {
@@ -2137,48 +2658,48 @@ const Rn = Tn.extend({
2137
2658
  unsetLineHeight: () => ({ chain: n }) => n().setMark("textStyle", { lineHeight: null }).removeEmptyTextStyle().run()
2138
2659
  };
2139
2660
  }
2140
- }), ai = [
2141
- Tt,
2142
- Kr,
2143
- Et,
2144
- kt,
2145
- _r,
2146
- Jr,
2147
- Fr,
2148
- Hr,
2149
- Br,
2661
+ }), Ti = [
2662
+ Nt,
2663
+ an,
2664
+ Lt,
2150
2665
  At,
2151
- $r,
2152
- qr,
2153
- Ct,
2154
- Gr,
2155
- Vr,
2156
- Wr,
2157
- Ur,
2666
+ Kr,
2158
2667
  Yr,
2159
- Lt,
2160
- jr,
2668
+ Xr,
2669
+ ar,
2670
+ sr,
2161
2671
  Dt,
2162
- zt,
2672
+ Qr,
2673
+ tn,
2163
2674
  _t,
2675
+ ln,
2676
+ rn,
2677
+ nn,
2678
+ sn,
2679
+ on,
2680
+ $t,
2681
+ en,
2682
+ Jt,
2683
+ Wt,
2684
+ Ht,
2164
2685
  // Missing from BASE_EXTENSIONS
2686
+ Bt,
2687
+ Ft,
2165
2688
  Mt,
2166
- Pt,
2167
- Ot,
2168
2689
  // Gapcursor,
2169
- Rt,
2170
- Jt,
2171
- Qt,
2172
- tr,
2173
- rr,
2174
- Nt,
2175
- er
2176
- ], li = [
2177
- en,
2178
- // CONVENTION - Replaces Paragraph with selectable indent spacing (T006-T007)
2179
2690
  zt,
2180
- Et,
2181
- Jt.configure({
2691
+ Vt,
2692
+ lr,
2693
+ dr,
2694
+ ur,
2695
+ Pt,
2696
+ cr
2697
+ ], Ri = [
2698
+ wn,
2699
+ // CONVENTION - Replaces Paragraph with selectable indent spacing (T006-T007)
2700
+ Wt,
2701
+ Lt,
2702
+ Vt.configure({
2182
2703
  // T012, T091: Pause-based undo/redo granularity (FR-032, FR-033)
2183
2704
  // Verified: Rapid Tab presses within 500ms are grouped as single undo unit
2184
2705
  // This matches Google Docs behavior (spec requirement)
@@ -2189,35 +2710,37 @@ const Rn = Tn.extend({
2189
2710
  }),
2190
2711
  // COMMENTED OUT TEMPORARILY THE GAPCURSOR FIRST BECAUSE WE DON'T NEED VISUAL EFFECT FROM GAPCUROSR AND WE DO CUSTOM IMAGES CURSOR ANYWAY. UNCOMMENT IT IF NEEDED LATER.
2191
2712
  // Gapcursor,
2192
- Rt,
2193
- _t,
2194
- Tt,
2195
- Ot,
2196
- Lt,
2197
- Qt,
2713
+ zt,
2714
+ Ht,
2715
+ Nt,
2716
+ Mt,
2717
+ $t,
2718
+ lr,
2198
2719
  // T011: ListItem with indent attribute
2199
- kt,
2200
- Pt,
2201
- tr,
2202
- rr,
2203
- Rn,
2720
+ At,
2721
+ Ft,
2722
+ dr,
2723
+ ur,
2724
+ Vn,
2204
2725
  // T009: BulletList with indent attribute
2205
2726
  // No custom keymap, just dynamic styling
2206
- er,
2207
- Cn,
2727
+ cr,
2728
+ ar,
2729
+ Kn,
2208
2730
  // T029: Indent attribute transfer (FR-020, FR-021, FR-023)
2209
- Dt.configure({
2731
+ Jt.configure({
2210
2732
  types: ["heading", "paragraph"]
2211
2733
  }),
2212
- On.configure({
2734
+ jn.configure({
2213
2735
  // T010: OrderedList with indent attribute
2214
2736
  itemTypeName: "listItem",
2215
2737
  keepMarks: !0,
2216
2738
  keepAttributes: !0
2217
2739
  }),
2740
+ sr,
2218
2741
  // Must be last to have highest keyboard shortcut priority
2219
- bn
2220
- ], ui = fe.create({
2742
+ Fn
2743
+ ], Ci = ge.create({
2221
2744
  name: "MentionStorage",
2222
2745
  addStorage() {
2223
2746
  return {
@@ -2225,23 +2748,23 @@ const Rn = Tn.extend({
2225
2748
  };
2226
2749
  }
2227
2750
  });
2228
- var Z = {}, wt;
2229
- function Ln() {
2230
- if (wt) return Z;
2231
- wt = 1;
2232
- var n = Qr;
2751
+ var te = {}, Rt;
2752
+ function Yn() {
2753
+ if (Rt) return te;
2754
+ Rt = 1;
2755
+ var n = un;
2233
2756
  if (process.env.NODE_ENV === "production")
2234
- Z.createRoot = n.createRoot, Z.hydrateRoot = n.hydrateRoot;
2757
+ te.createRoot = n.createRoot, te.hydrateRoot = n.hydrateRoot;
2235
2758
  else {
2236
2759
  var e = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2237
- Z.createRoot = function(t, r) {
2760
+ te.createRoot = function(t, r) {
2238
2761
  e.usingClientEntryPoint = !0;
2239
2762
  try {
2240
2763
  return n.createRoot(t, r);
2241
2764
  } finally {
2242
2765
  e.usingClientEntryPoint = !1;
2243
2766
  }
2244
- }, Z.hydrateRoot = function(t, r, i) {
2767
+ }, te.hydrateRoot = function(t, r, i) {
2245
2768
  e.usingClientEntryPoint = !0;
2246
2769
  try {
2247
2770
  return n.hydrateRoot(t, r, i);
@@ -2250,9 +2773,9 @@ function Ln() {
2250
2773
  }
2251
2774
  };
2252
2775
  }
2253
- return Z;
2776
+ return te;
2254
2777
  }
2255
- var Mn = Ln(), Ie = { exports: {} }, ie = {};
2778
+ var Xn = Yn(), Ee = { exports: {} }, ce = {};
2256
2779
  /**
2257
2780
  * @license React
2258
2781
  * react-jsx-runtime.production.min.js
@@ -2262,21 +2785,21 @@ var Mn = Ln(), Ie = { exports: {} }, ie = {};
2262
2785
  * This source code is licensed under the MIT license found in the
2263
2786
  * LICENSE file in the root directory of this source tree.
2264
2787
  */
2265
- var xt;
2266
- function Pn() {
2267
- if (xt) return ie;
2268
- xt = 1;
2269
- var n = Ft, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
2270
- function l(a, u, f) {
2271
- var d, p = {}, y = null, w = null;
2272
- f !== void 0 && (y = "" + f), u.key !== void 0 && (y = "" + u.key), u.ref !== void 0 && (w = u.ref);
2273
- for (d in u) r.call(u, d) && !s.hasOwnProperty(d) && (p[d] = u[d]);
2274
- if (a && a.defaultProps) for (d in u = a.defaultProps, u) p[d] === void 0 && (p[d] = u[d]);
2275
- return { $$typeof: e, type: a, key: y, ref: w, props: p, _owner: i.current };
2276
- }
2277
- return ie.Fragment = t, ie.jsx = l, ie.jsxs = l, ie;
2788
+ var Ct;
2789
+ function Gn() {
2790
+ if (Ct) return ce;
2791
+ Ct = 1;
2792
+ var n = jt, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
2793
+ function l(a, c, f) {
2794
+ var d, h = {}, g = null, v = null;
2795
+ f !== void 0 && (g = "" + f), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (v = c.ref);
2796
+ for (d in c) r.call(c, d) && !s.hasOwnProperty(d) && (h[d] = c[d]);
2797
+ if (a && a.defaultProps) for (d in c = a.defaultProps, c) h[d] === void 0 && (h[d] = c[d]);
2798
+ return { $$typeof: e, type: a, key: g, ref: v, props: h, _owner: i.current };
2799
+ }
2800
+ return ce.Fragment = t, ce.jsx = l, ce.jsxs = l, ce;
2278
2801
  }
2279
- var se = {};
2802
+ var de = {};
2280
2803
  /**
2281
2804
  * @license React
2282
2805
  * react-jsx-runtime.development.js
@@ -2286,57 +2809,57 @@ var se = {};
2286
2809
  * This source code is licensed under the MIT license found in the
2287
2810
  * LICENSE file in the root directory of this source tree.
2288
2811
  */
2289
- var St;
2290
- function Dn() {
2291
- return St || (St = 1, process.env.NODE_ENV !== "production" && (function() {
2292
- var n = Ft, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), a = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), m = Symbol.iterator, S = "@@iterator";
2293
- function C(o) {
2812
+ var kt;
2813
+ function Zn() {
2814
+ return kt || (kt = 1, process.env.NODE_ENV !== "production" && (function() {
2815
+ var n = jt, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), m = Symbol.iterator, I = "@@iterator";
2816
+ function A(o) {
2294
2817
  if (o === null || typeof o != "object")
2295
2818
  return null;
2296
- var c = m && o[m] || o[S];
2297
- return typeof c == "function" ? c : null;
2819
+ var u = m && o[m] || o[I];
2820
+ return typeof u == "function" ? u : null;
2298
2821
  }
2299
- var A = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2300
- function E(o) {
2822
+ var L = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2823
+ function R(o) {
2301
2824
  {
2302
- for (var c = arguments.length, h = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
2303
- h[g - 1] = arguments[g];
2304
- te("error", o, h);
2825
+ for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), y = 1; y < u; y++)
2826
+ p[y - 1] = arguments[y];
2827
+ oe("error", o, p);
2305
2828
  }
2306
2829
  }
2307
- function te(o, c, h) {
2830
+ function oe(o, u, p) {
2308
2831
  {
2309
- var g = A.ReactDebugCurrentFrame, x = g.getStackAddendum();
2310
- x !== "" && (c += "%s", h = h.concat([x]));
2311
- var b = h.map(function(I) {
2312
- return String(I);
2832
+ var y = L.ReactDebugCurrentFrame, S = y.getStackAddendum();
2833
+ S !== "" && (u += "%s", p = p.concat([S]));
2834
+ var E = p.map(function(x) {
2835
+ return String(x);
2313
2836
  });
2314
- b.unshift("Warning: " + c), Function.prototype.apply.call(console[o], console, b);
2837
+ E.unshift("Warning: " + u), Function.prototype.apply.call(console[o], console, E);
2315
2838
  }
2316
2839
  }
2317
- var nr = !1, ir = !1, sr = !1, or = !1, ar = !1, $e;
2318
- $e = Symbol.for("react.module.reference");
2319
- function lr(o) {
2320
- return !!(typeof o == "string" || typeof o == "function" || o === r || o === s || ar || o === i || o === f || o === d || or || o === w || nr || ir || sr || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === p || o.$$typeof === l || o.$$typeof === a || o.$$typeof === u || // This needs to include all possible module reference object
2840
+ var fr = !1, hr = !1, pr = !1, mr = !1, gr = !1, Ke;
2841
+ Ke = Symbol.for("react.module.reference");
2842
+ function yr(o) {
2843
+ return !!(typeof o == "string" || typeof o == "function" || o === r || o === s || gr || o === i || o === f || o === d || mr || o === v || fr || hr || pr || typeof o == "object" && o !== null && (o.$$typeof === g || o.$$typeof === h || o.$$typeof === l || o.$$typeof === a || o.$$typeof === c || // This needs to include all possible module reference object
2321
2844
  // types supported by any Flight configuration anywhere since
2322
2845
  // we don't know which Flight build this will end up being used
2323
2846
  // with.
2324
- o.$$typeof === $e || o.getModuleId !== void 0));
2847
+ o.$$typeof === Ke || o.getModuleId !== void 0));
2325
2848
  }
2326
- function ur(o, c, h) {
2327
- var g = o.displayName;
2328
- if (g)
2329
- return g;
2330
- var x = c.displayName || c.name || "";
2331
- return x !== "" ? h + "(" + x + ")" : h;
2849
+ function vr(o, u, p) {
2850
+ var y = o.displayName;
2851
+ if (y)
2852
+ return y;
2853
+ var S = u.displayName || u.name || "";
2854
+ return S !== "" ? p + "(" + S + ")" : p;
2332
2855
  }
2333
- function je(o) {
2856
+ function Ye(o) {
2334
2857
  return o.displayName || "Context";
2335
2858
  }
2336
- function q(o) {
2859
+ function U(o) {
2337
2860
  if (o == null)
2338
2861
  return null;
2339
- if (typeof o.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
2862
+ if (typeof o.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
2340
2863
  return o.displayName || o.name || null;
2341
2864
  if (typeof o == "string")
2342
2865
  return o;
@@ -2357,20 +2880,20 @@ function Dn() {
2357
2880
  if (typeof o == "object")
2358
2881
  switch (o.$$typeof) {
2359
2882
  case a:
2360
- var c = o;
2361
- return je(c) + ".Consumer";
2883
+ var u = o;
2884
+ return Ye(u) + ".Consumer";
2362
2885
  case l:
2363
- var h = o;
2364
- return je(h._context) + ".Provider";
2365
- case u:
2366
- return ur(o, o.render, "ForwardRef");
2367
- case p:
2368
- var g = o.displayName || null;
2369
- return g !== null ? g : q(o.type) || "Memo";
2370
- case y: {
2371
- var x = o, b = x._payload, I = x._init;
2886
+ var p = o;
2887
+ return Ye(p._context) + ".Provider";
2888
+ case c:
2889
+ return vr(o, o.render, "ForwardRef");
2890
+ case h:
2891
+ var y = o.displayName || null;
2892
+ return y !== null ? y : U(o.type) || "Memo";
2893
+ case g: {
2894
+ var S = o, E = S._payload, x = S._init;
2372
2895
  try {
2373
- return q(I(b));
2896
+ return U(x(E));
2374
2897
  } catch {
2375
2898
  return null;
2376
2899
  }
@@ -2378,18 +2901,18 @@ function Dn() {
2378
2901
  }
2379
2902
  return null;
2380
2903
  }
2381
- var V = Object.assign, re = 0, qe, Ve, We, Ue, Ye, Ke, Ge;
2382
- function Xe() {
2904
+ var q = Object.assign, ae = 0, Xe, Ge, Ze, Qe, et, tt, rt;
2905
+ function nt() {
2383
2906
  }
2384
- Xe.__reactDisabledLog = !0;
2385
- function cr() {
2907
+ nt.__reactDisabledLog = !0;
2908
+ function wr() {
2386
2909
  {
2387
- if (re === 0) {
2388
- qe = console.log, Ve = console.info, We = console.warn, Ue = console.error, Ye = console.group, Ke = console.groupCollapsed, Ge = console.groupEnd;
2910
+ if (ae === 0) {
2911
+ Xe = console.log, Ge = console.info, Ze = console.warn, Qe = console.error, et = console.group, tt = console.groupCollapsed, rt = console.groupEnd;
2389
2912
  var o = {
2390
2913
  configurable: !0,
2391
2914
  enumerable: !0,
2392
- value: Xe,
2915
+ value: nt,
2393
2916
  writable: !0
2394
2917
  };
2395
2918
  Object.defineProperties(console, {
@@ -2402,332 +2925,332 @@ function Dn() {
2402
2925
  groupEnd: o
2403
2926
  });
2404
2927
  }
2405
- re++;
2928
+ ae++;
2406
2929
  }
2407
2930
  }
2408
- function dr() {
2931
+ function xr() {
2409
2932
  {
2410
- if (re--, re === 0) {
2933
+ if (ae--, ae === 0) {
2411
2934
  var o = {
2412
2935
  configurable: !0,
2413
2936
  enumerable: !0,
2414
2937
  writable: !0
2415
2938
  };
2416
2939
  Object.defineProperties(console, {
2417
- log: V({}, o, {
2418
- value: qe
2940
+ log: q({}, o, {
2941
+ value: Xe
2419
2942
  }),
2420
- info: V({}, o, {
2421
- value: Ve
2943
+ info: q({}, o, {
2944
+ value: Ge
2422
2945
  }),
2423
- warn: V({}, o, {
2424
- value: We
2946
+ warn: q({}, o, {
2947
+ value: Ze
2425
2948
  }),
2426
- error: V({}, o, {
2427
- value: Ue
2949
+ error: q({}, o, {
2950
+ value: Qe
2428
2951
  }),
2429
- group: V({}, o, {
2430
- value: Ye
2952
+ group: q({}, o, {
2953
+ value: et
2431
2954
  }),
2432
- groupCollapsed: V({}, o, {
2433
- value: Ke
2955
+ groupCollapsed: q({}, o, {
2956
+ value: tt
2434
2957
  }),
2435
- groupEnd: V({}, o, {
2436
- value: Ge
2958
+ groupEnd: q({}, o, {
2959
+ value: rt
2437
2960
  })
2438
2961
  });
2439
2962
  }
2440
- re < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2963
+ ae < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2441
2964
  }
2442
2965
  }
2443
- var Te = A.ReactCurrentDispatcher, Ee;
2444
- function he(o, c, h) {
2966
+ var ke = L.ReactCurrentDispatcher, Oe;
2967
+ function ye(o, u, p) {
2445
2968
  {
2446
- if (Ee === void 0)
2969
+ if (Oe === void 0)
2447
2970
  try {
2448
2971
  throw Error();
2449
- } catch (x) {
2450
- var g = x.stack.trim().match(/\n( *(at )?)/);
2451
- Ee = g && g[1] || "";
2972
+ } catch (S) {
2973
+ var y = S.stack.trim().match(/\n( *(at )?)/);
2974
+ Oe = y && y[1] || "";
2452
2975
  }
2453
2976
  return `
2454
- ` + Ee + o;
2977
+ ` + Oe + o;
2455
2978
  }
2456
2979
  }
2457
- var ke = !1, pe;
2980
+ var Ne = !1, ve;
2458
2981
  {
2459
- var fr = typeof WeakMap == "function" ? WeakMap : Map;
2460
- pe = new fr();
2982
+ var Ir = typeof WeakMap == "function" ? WeakMap : Map;
2983
+ ve = new Ir();
2461
2984
  }
2462
- function Ze(o, c) {
2463
- if (!o || ke)
2985
+ function it(o, u) {
2986
+ if (!o || Ne)
2464
2987
  return "";
2465
2988
  {
2466
- var h = pe.get(o);
2467
- if (h !== void 0)
2468
- return h;
2989
+ var p = ve.get(o);
2990
+ if (p !== void 0)
2991
+ return p;
2469
2992
  }
2470
- var g;
2471
- ke = !0;
2472
- var x = Error.prepareStackTrace;
2993
+ var y;
2994
+ Ne = !0;
2995
+ var S = Error.prepareStackTrace;
2473
2996
  Error.prepareStackTrace = void 0;
2474
- var b;
2475
- b = Te.current, Te.current = null, cr();
2997
+ var E;
2998
+ E = ke.current, ke.current = null, wr();
2476
2999
  try {
2477
- if (c) {
2478
- var I = function() {
3000
+ if (u) {
3001
+ var x = function() {
2479
3002
  throw Error();
2480
3003
  };
2481
- if (Object.defineProperty(I.prototype, "props", {
3004
+ if (Object.defineProperty(x.prototype, "props", {
2482
3005
  set: function() {
2483
3006
  throw Error();
2484
3007
  }
2485
3008
  }), typeof Reflect == "object" && Reflect.construct) {
2486
3009
  try {
2487
- Reflect.construct(I, []);
2488
- } catch (J) {
2489
- g = J;
3010
+ Reflect.construct(x, []);
3011
+ } catch (F) {
3012
+ y = F;
2490
3013
  }
2491
- Reflect.construct(o, [], I);
3014
+ Reflect.construct(o, [], x);
2492
3015
  } else {
2493
3016
  try {
2494
- I.call();
2495
- } catch (J) {
2496
- g = J;
3017
+ x.call();
3018
+ } catch (F) {
3019
+ y = F;
2497
3020
  }
2498
- o.call(I.prototype);
3021
+ o.call(x.prototype);
2499
3022
  }
2500
3023
  } else {
2501
3024
  try {
2502
3025
  throw Error();
2503
- } catch (J) {
2504
- g = J;
3026
+ } catch (F) {
3027
+ y = F;
2505
3028
  }
2506
3029
  o();
2507
3030
  }
2508
- } catch (J) {
2509
- if (J && g && typeof J.stack == "string") {
2510
- for (var v = J.stack.split(`
2511
- `), P = g.stack.split(`
2512
- `), R = v.length - 1, O = P.length - 1; R >= 1 && O >= 0 && v[R] !== P[O]; )
3031
+ } catch (F) {
3032
+ if (F && y && typeof F.stack == "string") {
3033
+ for (var w = F.stack.split(`
3034
+ `), _ = y.stack.split(`
3035
+ `), k = w.length - 1, O = _.length - 1; k >= 1 && O >= 0 && w[k] !== _[O]; )
2513
3036
  O--;
2514
- for (; R >= 1 && O >= 0; R--, O--)
2515
- if (v[R] !== P[O]) {
2516
- if (R !== 1 || O !== 1)
3037
+ for (; k >= 1 && O >= 0; k--, O--)
3038
+ if (w[k] !== _[O]) {
3039
+ if (k !== 1 || O !== 1)
2517
3040
  do
2518
- if (R--, O--, O < 0 || v[R] !== P[O]) {
2519
- var H = `
2520
- ` + v[R].replace(" at new ", " at ");
2521
- return o.displayName && H.includes("<anonymous>") && (H = H.replace("<anonymous>", o.displayName)), typeof o == "function" && pe.set(o, H), H;
3041
+ if (k--, O--, O < 0 || w[k] !== _[O]) {
3042
+ var W = `
3043
+ ` + w[k].replace(" at new ", " at ");
3044
+ return o.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", o.displayName)), typeof o == "function" && ve.set(o, W), W;
2522
3045
  }
2523
- while (R >= 1 && O >= 0);
3046
+ while (k >= 1 && O >= 0);
2524
3047
  break;
2525
3048
  }
2526
3049
  }
2527
3050
  } finally {
2528
- ke = !1, Te.current = b, dr(), Error.prepareStackTrace = x;
3051
+ Ne = !1, ke.current = E, xr(), Error.prepareStackTrace = S;
2529
3052
  }
2530
- var X = o ? o.displayName || o.name : "", W = X ? he(X) : "";
2531
- return typeof o == "function" && pe.set(o, W), W;
3053
+ var ee = o ? o.displayName || o.name : "", K = ee ? ye(ee) : "";
3054
+ return typeof o == "function" && ve.set(o, K), K;
2532
3055
  }
2533
- function hr(o, c, h) {
2534
- return Ze(o, !1);
3056
+ function Sr(o, u, p) {
3057
+ return it(o, !1);
2535
3058
  }
2536
- function pr(o) {
2537
- var c = o.prototype;
2538
- return !!(c && c.isReactComponent);
3059
+ function Er(o) {
3060
+ var u = o.prototype;
3061
+ return !!(u && u.isReactComponent);
2539
3062
  }
2540
- function me(o, c, h) {
3063
+ function we(o, u, p) {
2541
3064
  if (o == null)
2542
3065
  return "";
2543
3066
  if (typeof o == "function")
2544
- return Ze(o, pr(o));
3067
+ return it(o, Er(o));
2545
3068
  if (typeof o == "string")
2546
- return he(o);
3069
+ return ye(o);
2547
3070
  switch (o) {
2548
3071
  case f:
2549
- return he("Suspense");
3072
+ return ye("Suspense");
2550
3073
  case d:
2551
- return he("SuspenseList");
3074
+ return ye("SuspenseList");
2552
3075
  }
2553
3076
  if (typeof o == "object")
2554
3077
  switch (o.$$typeof) {
2555
- case u:
2556
- return hr(o.render);
2557
- case p:
2558
- return me(o.type, c, h);
2559
- case y: {
2560
- var g = o, x = g._payload, b = g._init;
3078
+ case c:
3079
+ return Sr(o.render);
3080
+ case h:
3081
+ return we(o.type, u, p);
3082
+ case g: {
3083
+ var y = o, S = y._payload, E = y._init;
2561
3084
  try {
2562
- return me(b(x), c, h);
3085
+ return we(E(S), u, p);
2563
3086
  } catch {
2564
3087
  }
2565
3088
  }
2566
3089
  }
2567
3090
  return "";
2568
3091
  }
2569
- var ne = Object.prototype.hasOwnProperty, Qe = {}, et = A.ReactDebugCurrentFrame;
2570
- function ge(o) {
3092
+ var le = Object.prototype.hasOwnProperty, st = {}, ot = L.ReactDebugCurrentFrame;
3093
+ function xe(o) {
2571
3094
  if (o) {
2572
- var c = o._owner, h = me(o.type, o._source, c ? c.type : null);
2573
- et.setExtraStackFrame(h);
3095
+ var u = o._owner, p = we(o.type, o._source, u ? u.type : null);
3096
+ ot.setExtraStackFrame(p);
2574
3097
  } else
2575
- et.setExtraStackFrame(null);
3098
+ ot.setExtraStackFrame(null);
2576
3099
  }
2577
- function mr(o, c, h, g, x) {
3100
+ function br(o, u, p, y, S) {
2578
3101
  {
2579
- var b = Function.call.bind(ne);
2580
- for (var I in o)
2581
- if (b(o, I)) {
2582
- var v = void 0;
3102
+ var E = Function.call.bind(le);
3103
+ for (var x in o)
3104
+ if (E(o, x)) {
3105
+ var w = void 0;
2583
3106
  try {
2584
- if (typeof o[I] != "function") {
2585
- var P = Error((g || "React class") + ": " + h + " type `" + I + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[I] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
2586
- throw P.name = "Invariant Violation", P;
3107
+ if (typeof o[x] != "function") {
3108
+ var _ = Error((y || "React class") + ": " + p + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
3109
+ throw _.name = "Invariant Violation", _;
2587
3110
  }
2588
- v = o[I](c, I, g, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
2589
- } catch (R) {
2590
- v = R;
3111
+ w = o[x](u, x, y, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
3112
+ } catch (k) {
3113
+ w = k;
2591
3114
  }
2592
- v && !(v instanceof Error) && (ge(x), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", h, I, typeof v), ge(null)), v instanceof Error && !(v.message in Qe) && (Qe[v.message] = !0, ge(x), E("Failed %s type: %s", h, v.message), ge(null));
3115
+ w && !(w instanceof Error) && (xe(S), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", y || "React class", p, x, typeof w), xe(null)), w instanceof Error && !(w.message in st) && (st[w.message] = !0, xe(S), R("Failed %s type: %s", p, w.message), xe(null));
2593
3116
  }
2594
3117
  }
2595
3118
  }
2596
- var gr = Array.isArray;
2597
- function Re(o) {
2598
- return gr(o);
3119
+ var Tr = Array.isArray;
3120
+ function Le(o) {
3121
+ return Tr(o);
2599
3122
  }
2600
- function yr(o) {
3123
+ function Rr(o) {
2601
3124
  {
2602
- var c = typeof Symbol == "function" && Symbol.toStringTag, h = c && o[Symbol.toStringTag] || o.constructor.name || "Object";
2603
- return h;
3125
+ var u = typeof Symbol == "function" && Symbol.toStringTag, p = u && o[Symbol.toStringTag] || o.constructor.name || "Object";
3126
+ return p;
2604
3127
  }
2605
3128
  }
2606
- function vr(o) {
3129
+ function Cr(o) {
2607
3130
  try {
2608
- return tt(o), !1;
3131
+ return at(o), !1;
2609
3132
  } catch {
2610
3133
  return !0;
2611
3134
  }
2612
3135
  }
2613
- function tt(o) {
3136
+ function at(o) {
2614
3137
  return "" + o;
2615
3138
  }
2616
- function rt(o) {
2617
- if (vr(o))
2618
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", yr(o)), tt(o);
3139
+ function lt(o) {
3140
+ if (Cr(o))
3141
+ return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Rr(o)), at(o);
2619
3142
  }
2620
- var nt = A.ReactCurrentOwner, Ir = {
3143
+ var ct = L.ReactCurrentOwner, kr = {
2621
3144
  key: !0,
2622
3145
  ref: !0,
2623
3146
  __self: !0,
2624
3147
  __source: !0
2625
- }, it, st;
2626
- function wr(o) {
2627
- if (ne.call(o, "ref")) {
2628
- var c = Object.getOwnPropertyDescriptor(o, "ref").get;
2629
- if (c && c.isReactWarning)
3148
+ }, dt, ut;
3149
+ function Or(o) {
3150
+ if (le.call(o, "ref")) {
3151
+ var u = Object.getOwnPropertyDescriptor(o, "ref").get;
3152
+ if (u && u.isReactWarning)
2630
3153
  return !1;
2631
3154
  }
2632
3155
  return o.ref !== void 0;
2633
3156
  }
2634
- function xr(o) {
2635
- if (ne.call(o, "key")) {
2636
- var c = Object.getOwnPropertyDescriptor(o, "key").get;
2637
- if (c && c.isReactWarning)
3157
+ function Nr(o) {
3158
+ if (le.call(o, "key")) {
3159
+ var u = Object.getOwnPropertyDescriptor(o, "key").get;
3160
+ if (u && u.isReactWarning)
2638
3161
  return !1;
2639
3162
  }
2640
3163
  return o.key !== void 0;
2641
3164
  }
2642
- function Sr(o, c) {
2643
- typeof o.ref == "string" && nt.current;
3165
+ function Lr(o, u) {
3166
+ typeof o.ref == "string" && ct.current;
2644
3167
  }
2645
- function br(o, c) {
3168
+ function Ar(o, u) {
2646
3169
  {
2647
- var h = function() {
2648
- it || (it = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
3170
+ var p = function() {
3171
+ dt || (dt = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", u));
2649
3172
  };
2650
- h.isReactWarning = !0, Object.defineProperty(o, "key", {
2651
- get: h,
3173
+ p.isReactWarning = !0, Object.defineProperty(o, "key", {
3174
+ get: p,
2652
3175
  configurable: !0
2653
3176
  });
2654
3177
  }
2655
3178
  }
2656
- function Tr(o, c) {
3179
+ function zr(o, u) {
2657
3180
  {
2658
- var h = function() {
2659
- st || (st = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
3181
+ var p = function() {
3182
+ ut || (ut = !0, R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", u));
2660
3183
  };
2661
- h.isReactWarning = !0, Object.defineProperty(o, "ref", {
2662
- get: h,
3184
+ p.isReactWarning = !0, Object.defineProperty(o, "ref", {
3185
+ get: p,
2663
3186
  configurable: !0
2664
3187
  });
2665
3188
  }
2666
3189
  }
2667
- var Er = function(o, c, h, g, x, b, I) {
2668
- var v = {
3190
+ var Mr = function(o, u, p, y, S, E, x) {
3191
+ var w = {
2669
3192
  // This tag allows us to uniquely identify this as a React Element
2670
3193
  $$typeof: e,
2671
3194
  // Built-in properties that belong on the element
2672
3195
  type: o,
2673
- key: c,
2674
- ref: h,
2675
- props: I,
3196
+ key: u,
3197
+ ref: p,
3198
+ props: x,
2676
3199
  // Record the component responsible for creating this element.
2677
- _owner: b
3200
+ _owner: E
2678
3201
  };
2679
- return v._store = {}, Object.defineProperty(v._store, "validated", {
3202
+ return w._store = {}, Object.defineProperty(w._store, "validated", {
2680
3203
  configurable: !1,
2681
3204
  enumerable: !1,
2682
3205
  writable: !0,
2683
3206
  value: !1
2684
- }), Object.defineProperty(v, "_self", {
3207
+ }), Object.defineProperty(w, "_self", {
2685
3208
  configurable: !1,
2686
3209
  enumerable: !1,
2687
3210
  writable: !1,
2688
- value: g
2689
- }), Object.defineProperty(v, "_source", {
3211
+ value: y
3212
+ }), Object.defineProperty(w, "_source", {
2690
3213
  configurable: !1,
2691
3214
  enumerable: !1,
2692
3215
  writable: !1,
2693
- value: x
2694
- }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
3216
+ value: S
3217
+ }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
2695
3218
  };
2696
- function kr(o, c, h, g, x) {
3219
+ function Pr(o, u, p, y, S) {
2697
3220
  {
2698
- var b, I = {}, v = null, P = null;
2699
- h !== void 0 && (rt(h), v = "" + h), xr(c) && (rt(c.key), v = "" + c.key), wr(c) && (P = c.ref, Sr(c, x));
2700
- for (b in c)
2701
- ne.call(c, b) && !Ir.hasOwnProperty(b) && (I[b] = c[b]);
3221
+ var E, x = {}, w = null, _ = null;
3222
+ p !== void 0 && (lt(p), w = "" + p), Nr(u) && (lt(u.key), w = "" + u.key), Or(u) && (_ = u.ref, Lr(u, S));
3223
+ for (E in u)
3224
+ le.call(u, E) && !kr.hasOwnProperty(E) && (x[E] = u[E]);
2702
3225
  if (o && o.defaultProps) {
2703
- var R = o.defaultProps;
2704
- for (b in R)
2705
- I[b] === void 0 && (I[b] = R[b]);
3226
+ var k = o.defaultProps;
3227
+ for (E in k)
3228
+ x[E] === void 0 && (x[E] = k[E]);
2706
3229
  }
2707
- if (v || P) {
3230
+ if (w || _) {
2708
3231
  var O = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
2709
- v && br(I, O), P && Tr(I, O);
3232
+ w && Ar(x, O), _ && zr(x, O);
2710
3233
  }
2711
- return Er(o, v, P, x, g, nt.current, I);
3234
+ return Mr(o, w, _, S, y, ct.current, x);
2712
3235
  }
2713
3236
  }
2714
- var Oe = A.ReactCurrentOwner, ot = A.ReactDebugCurrentFrame;
2715
- function G(o) {
3237
+ var Ae = L.ReactCurrentOwner, ft = L.ReactDebugCurrentFrame;
3238
+ function Q(o) {
2716
3239
  if (o) {
2717
- var c = o._owner, h = me(o.type, o._source, c ? c.type : null);
2718
- ot.setExtraStackFrame(h);
3240
+ var u = o._owner, p = we(o.type, o._source, u ? u.type : null);
3241
+ ft.setExtraStackFrame(p);
2719
3242
  } else
2720
- ot.setExtraStackFrame(null);
3243
+ ft.setExtraStackFrame(null);
2721
3244
  }
2722
- var Ne;
2723
- Ne = !1;
2724
- function Ae(o) {
3245
+ var ze;
3246
+ ze = !1;
3247
+ function Me(o) {
2725
3248
  return typeof o == "object" && o !== null && o.$$typeof === e;
2726
3249
  }
2727
- function at() {
3250
+ function ht() {
2728
3251
  {
2729
- if (Oe.current) {
2730
- var o = q(Oe.current.type);
3252
+ if (Ae.current) {
3253
+ var o = U(Ae.current.type);
2731
3254
  if (o)
2732
3255
  return `
2733
3256
 
@@ -2736,187 +3259,201 @@ Check the render method of \`` + o + "`.";
2736
3259
  return "";
2737
3260
  }
2738
3261
  }
2739
- function Rr(o) {
3262
+ function Dr(o) {
2740
3263
  return "";
2741
3264
  }
2742
- var lt = {};
2743
- function Or(o) {
3265
+ var pt = {};
3266
+ function _r(o) {
2744
3267
  {
2745
- var c = at();
2746
- if (!c) {
2747
- var h = typeof o == "string" ? o : o.displayName || o.name;
2748
- h && (c = `
3268
+ var u = ht();
3269
+ if (!u) {
3270
+ var p = typeof o == "string" ? o : o.displayName || o.name;
3271
+ p && (u = `
2749
3272
 
2750
- Check the top-level render call using <` + h + ">.");
3273
+ Check the top-level render call using <` + p + ">.");
2751
3274
  }
2752
- return c;
3275
+ return u;
2753
3276
  }
2754
3277
  }
2755
- function ut(o, c) {
3278
+ function mt(o, u) {
2756
3279
  {
2757
3280
  if (!o._store || o._store.validated || o.key != null)
2758
3281
  return;
2759
3282
  o._store.validated = !0;
2760
- var h = Or(c);
2761
- if (lt[h])
3283
+ var p = _r(u);
3284
+ if (pt[p])
2762
3285
  return;
2763
- lt[h] = !0;
2764
- var g = "";
2765
- o && o._owner && o._owner !== Oe.current && (g = " It was passed a child from " + q(o._owner.type) + "."), G(o), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, g), G(null);
3286
+ pt[p] = !0;
3287
+ var y = "";
3288
+ o && o._owner && o._owner !== Ae.current && (y = " It was passed a child from " + U(o._owner.type) + "."), Q(o), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, y), Q(null);
2766
3289
  }
2767
3290
  }
2768
- function ct(o, c) {
3291
+ function gt(o, u) {
2769
3292
  {
2770
3293
  if (typeof o != "object")
2771
3294
  return;
2772
- if (Re(o))
2773
- for (var h = 0; h < o.length; h++) {
2774
- var g = o[h];
2775
- Ae(g) && ut(g, c);
3295
+ if (Le(o))
3296
+ for (var p = 0; p < o.length; p++) {
3297
+ var y = o[p];
3298
+ Me(y) && mt(y, u);
2776
3299
  }
2777
- else if (Ae(o))
3300
+ else if (Me(o))
2778
3301
  o._store && (o._store.validated = !0);
2779
3302
  else if (o) {
2780
- var x = C(o);
2781
- if (typeof x == "function" && x !== o.entries)
2782
- for (var b = x.call(o), I; !(I = b.next()).done; )
2783
- Ae(I.value) && ut(I.value, c);
3303
+ var S = A(o);
3304
+ if (typeof S == "function" && S !== o.entries)
3305
+ for (var E = S.call(o), x; !(x = E.next()).done; )
3306
+ Me(x.value) && mt(x.value, u);
2784
3307
  }
2785
3308
  }
2786
3309
  }
2787
- function Nr(o) {
3310
+ function $r(o) {
2788
3311
  {
2789
- var c = o.type;
2790
- if (c == null || typeof c == "string")
3312
+ var u = o.type;
3313
+ if (u == null || typeof u == "string")
2791
3314
  return;
2792
- var h;
2793
- if (typeof c == "function")
2794
- h = c.propTypes;
2795
- else if (typeof c == "object" && (c.$$typeof === u || // Note: Memo only checks outer props here.
3315
+ var p;
3316
+ if (typeof u == "function")
3317
+ p = u.propTypes;
3318
+ else if (typeof u == "object" && (u.$$typeof === c || // Note: Memo only checks outer props here.
2796
3319
  // Inner props are checked in the reconciler.
2797
- c.$$typeof === p))
2798
- h = c.propTypes;
3320
+ u.$$typeof === h))
3321
+ p = u.propTypes;
2799
3322
  else
2800
3323
  return;
2801
- if (h) {
2802
- var g = q(c);
2803
- mr(h, o.props, "prop", g, o);
2804
- } else if (c.PropTypes !== void 0 && !Ne) {
2805
- Ne = !0;
2806
- var x = q(c);
2807
- E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", x || "Unknown");
3324
+ if (p) {
3325
+ var y = U(u);
3326
+ br(p, o.props, "prop", y, o);
3327
+ } else if (u.PropTypes !== void 0 && !ze) {
3328
+ ze = !0;
3329
+ var S = U(u);
3330
+ R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", S || "Unknown");
2808
3331
  }
2809
- typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
3332
+ typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2810
3333
  }
2811
3334
  }
2812
- function Ar(o) {
3335
+ function Br(o) {
2813
3336
  {
2814
- for (var c = Object.keys(o.props), h = 0; h < c.length; h++) {
2815
- var g = c[h];
2816
- if (g !== "children" && g !== "key") {
2817
- G(o), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), G(null);
3337
+ for (var u = Object.keys(o.props), p = 0; p < u.length; p++) {
3338
+ var y = u[p];
3339
+ if (y !== "children" && y !== "key") {
3340
+ Q(o), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), Q(null);
2818
3341
  break;
2819
3342
  }
2820
3343
  }
2821
- o.ref !== null && (G(o), E("Invalid attribute `ref` supplied to `React.Fragment`."), G(null));
3344
+ o.ref !== null && (Q(o), R("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
2822
3345
  }
2823
3346
  }
2824
- var dt = {};
2825
- function ft(o, c, h, g, x, b) {
3347
+ var yt = {};
3348
+ function vt(o, u, p, y, S, E) {
2826
3349
  {
2827
- var I = lr(o);
2828
- if (!I) {
2829
- var v = "";
2830
- (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2831
- var P = Rr();
2832
- P ? v += P : v += at();
2833
- var R;
2834
- o === null ? R = "null" : Re(o) ? R = "array" : o !== void 0 && o.$$typeof === e ? (R = "<" + (q(o.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : R = typeof o, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, v);
3350
+ var x = yr(o);
3351
+ if (!x) {
3352
+ var w = "";
3353
+ (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
3354
+ var _ = Dr();
3355
+ _ ? w += _ : w += ht();
3356
+ var k;
3357
+ o === null ? k = "null" : Le(o) ? k = "array" : o !== void 0 && o.$$typeof === e ? (k = "<" + (U(o.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : k = typeof o, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, w);
2835
3358
  }
2836
- var O = kr(o, c, h, x, b);
3359
+ var O = Pr(o, u, p, S, E);
2837
3360
  if (O == null)
2838
3361
  return O;
2839
- if (I) {
2840
- var H = c.children;
2841
- if (H !== void 0)
2842
- if (g)
2843
- if (Re(H)) {
2844
- for (var X = 0; X < H.length; X++)
2845
- ct(H[X], o);
2846
- Object.freeze && Object.freeze(H);
3362
+ if (x) {
3363
+ var W = u.children;
3364
+ if (W !== void 0)
3365
+ if (y)
3366
+ if (Le(W)) {
3367
+ for (var ee = 0; ee < W.length; ee++)
3368
+ gt(W[ee], o);
3369
+ Object.freeze && Object.freeze(W);
2847
3370
  } else
2848
- E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
3371
+ R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2849
3372
  else
2850
- ct(H, o);
3373
+ gt(W, o);
2851
3374
  }
2852
- if (ne.call(c, "key")) {
2853
- var W = q(o), J = Object.keys(c).filter(function(zr) {
2854
- return zr !== "key";
2855
- }), Ce = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
2856
- if (!dt[W + Ce]) {
2857
- var Dr = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
2858
- E(`A props object containing a "key" prop is being spread into JSX:
3375
+ if (le.call(u, "key")) {
3376
+ var K = U(o), F = Object.keys(u).filter(function(jr) {
3377
+ return jr !== "key";
3378
+ }), Pe = F.length > 0 ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}";
3379
+ if (!yt[K + Pe]) {
3380
+ var Vr = F.length > 0 ? "{" + F.join(": ..., ") + ": ...}" : "{}";
3381
+ R(`A props object containing a "key" prop is being spread into JSX:
2859
3382
  let props = %s;
2860
3383
  <%s {...props} />
2861
3384
  React keys must be passed directly to JSX without using spread:
2862
3385
  let props = %s;
2863
- <%s key={someKey} {...props} />`, Ce, W, Dr, W), dt[W + Ce] = !0;
3386
+ <%s key={someKey} {...props} />`, Pe, K, Vr, K), yt[K + Pe] = !0;
2864
3387
  }
2865
3388
  }
2866
- return o === r ? Ar(O) : Nr(O), O;
3389
+ return o === r ? Br(O) : $r(O), O;
2867
3390
  }
2868
3391
  }
2869
- function Cr(o, c, h) {
2870
- return ft(o, c, h, !0);
3392
+ function Fr(o, u, p) {
3393
+ return vt(o, u, p, !0);
2871
3394
  }
2872
- function Lr(o, c, h) {
2873
- return ft(o, c, h, !1);
3395
+ function Jr(o, u, p) {
3396
+ return vt(o, u, p, !1);
2874
3397
  }
2875
- var Mr = Lr, Pr = Cr;
2876
- se.Fragment = r, se.jsx = Mr, se.jsxs = Pr;
2877
- })()), se;
3398
+ var Wr = Jr, Hr = Fr;
3399
+ de.Fragment = r, de.jsx = Wr, de.jsxs = Hr;
3400
+ })()), de;
2878
3401
  }
2879
- var bt;
2880
- function zn() {
2881
- return bt || (bt = 1, process.env.NODE_ENV === "production" ? Ie.exports = Pn() : Ie.exports = Dn()), Ie.exports;
3402
+ var Ot;
3403
+ function Qn() {
3404
+ return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? Ee.exports = Gn() : Ee.exports = Zn()), Ee.exports;
2882
3405
  }
2883
- var oe = zn();
2884
- const _n = ({
3406
+ var ue = Qn();
3407
+ const ei = ({
2885
3408
  images: n,
2886
3409
  onAdd: e,
2887
3410
  onDelete: t,
2888
3411
  onImageClick: r,
2889
3412
  focusedImageIndex: i
2890
- }) => /* @__PURE__ */ oe.jsxs("div", { className: "batch-image-gallery", style: { display: "flex", gap: "8px", overflowX: "auto", padding: "8px" }, children: [
2891
- n.map((s, l) => /* @__PURE__ */ oe.jsxs(
2892
- "div",
2893
- {
2894
- style: {
2895
- position: "relative",
2896
- border: i === l ? "2px solid blue" : "2px solid transparent",
2897
- cursor: "pointer"
2898
- },
2899
- onClick: () => r(s),
2900
- children: [
2901
- /* @__PURE__ */ oe.jsx("img", { src: s.src, alt: s.alt, style: { width: "80px", height: "80px", objectFit: "cover" } }),
2902
- /* @__PURE__ */ oe.jsx(
2903
- "button",
2904
- {
2905
- onClick: (a) => {
2906
- a.stopPropagation(), t(l);
2907
- },
2908
- style: { position: "absolute", top: 0, right: 0 },
2909
- children: "×"
2910
- }
2911
- )
2912
- ]
2913
- },
2914
- s.id
2915
- )),
2916
- /* @__PURE__ */ oe.jsx("button", { onClick: e, style: { width: "80px", height: "80px" }, children: "+" })
2917
- ] });
2918
- let ae = null;
2919
- const ci = Zr.create({
3413
+ }) => /* @__PURE__ */ ue.jsxs(
3414
+ "div",
3415
+ {
3416
+ className: "batch-image-gallery",
3417
+ style: { display: "flex", gap: "8px", overflowX: "auto", padding: "8px" },
3418
+ children: [
3419
+ n.map((s, l) => /* @__PURE__ */ ue.jsxs(
3420
+ "div",
3421
+ {
3422
+ style: {
3423
+ position: "relative",
3424
+ border: i === l ? "2px solid blue" : "2px solid transparent",
3425
+ cursor: "pointer"
3426
+ },
3427
+ onClick: () => r(s),
3428
+ children: [
3429
+ /* @__PURE__ */ ue.jsx(
3430
+ "img",
3431
+ {
3432
+ src: s.src,
3433
+ alt: s.alt,
3434
+ style: { width: "80px", height: "80px", objectFit: "cover" }
3435
+ }
3436
+ ),
3437
+ /* @__PURE__ */ ue.jsx(
3438
+ "button",
3439
+ {
3440
+ onClick: (a) => {
3441
+ a.stopPropagation(), t(l);
3442
+ },
3443
+ style: { position: "absolute", top: 0, right: 0 },
3444
+ children: "×"
3445
+ }
3446
+ )
3447
+ ]
3448
+ },
3449
+ s.id
3450
+ )),
3451
+ /* @__PURE__ */ ue.jsx("button", { onClick: e, style: { width: "80px", height: "80px" }, children: "+" })
3452
+ ]
3453
+ }
3454
+ );
3455
+ let fe = null;
3456
+ const ki = cn.create({
2920
3457
  name: "batchSegmentImages",
2921
3458
  group: "block",
2922
3459
  inline: !1,
@@ -2982,10 +3519,10 @@ const ci = Zr.create({
2982
3519
  },
2983
3520
  addProseMirrorPlugins() {
2984
3521
  return [
2985
- new de({
3522
+ new se({
2986
3523
  props: {
2987
3524
  handleKeyDown(n, e) {
2988
- return e.key === "ArrowLeft" || e.key === "ArrowUp" ? ae = "left" : e.key === "ArrowRight" || e.key === "ArrowDown" ? ae = "right" : ae = null, !1;
3525
+ return e.key === "ArrowLeft" || e.key === "ArrowUp" ? fe = "left" : e.key === "ArrowRight" || e.key === "ArrowDown" ? fe = "right" : fe = null, !1;
2989
3526
  }
2990
3527
  }
2991
3528
  })
@@ -2994,42 +3531,42 @@ const ci = Zr.create({
2994
3531
  addKeyboardShortcuts() {
2995
3532
  const n = (r, i) => {
2996
3533
  const s = this.editor.state.tr.setNodeMarkup(r, void 0, { ...i.attrs, focusedImageIndex: null }).setMeta("addToHistory", !1);
2997
- s.setSelection(D.near(s.doc.resolve(r))), this.editor.view.dispatch(s);
3534
+ s.setSelection($.near(s.doc.resolve(r))), this.editor.view.dispatch(s);
2998
3535
  }, e = (r, i) => {
2999
3536
  const s = r + i.nodeSize, l = this.editor.state.tr.setNodeMarkup(r, void 0, { ...i.attrs, focusedImageIndex: null }).setMeta("addToHistory", !1);
3000
- l.setSelection(D.near(l.doc.resolve(s))), this.editor.view.dispatch(l);
3537
+ l.setSelection($.near(l.doc.resolve(s))), this.editor.view.dispatch(l);
3001
3538
  }, t = (r) => {
3002
- var p, y;
3539
+ var h, g;
3003
3540
  const { selection: i } = this.editor.state;
3004
- if (!(i instanceof z)) return !1;
3541
+ if (!(i instanceof P)) return !1;
3005
3542
  const s = i.node;
3006
3543
  if (s.type.name !== "batchSegmentImages") return !1;
3007
- const l = ((y = (p = this.editor.storage.batchSegmentImages) == null ? void 0 : p.imageRegistry) == null ? void 0 : y.get(s.attrs.batchId)) ?? s.attrs.images;
3544
+ const l = ((g = (h = this.editor.storage.batchSegmentImages) == null ? void 0 : h.imageRegistry) == null ? void 0 : g.get(s.attrs.batchId)) ?? s.attrs.images;
3008
3545
  if (!l.length) return !1;
3009
- const a = i.from, u = s.attrs.focusedImageIndex, f = !!this.options.onAdd;
3546
+ const a = i.from, c = s.attrs.focusedImageIndex, f = !!this.options.onAdd;
3010
3547
  let d;
3011
3548
  if (r === "right") {
3012
- if (u === null)
3549
+ if (c === null)
3013
3550
  return e(a, s), !0;
3014
- if (u < l.length - 1)
3015
- d = u + 1;
3016
- else if (u === l.length - 1 && f)
3551
+ if (c < l.length - 1)
3552
+ d = c + 1;
3553
+ else if (c === l.length - 1 && f)
3017
3554
  d = null;
3018
3555
  else
3019
3556
  return e(a, s), !0;
3020
- } else if (u === null)
3557
+ } else if (c === null)
3021
3558
  d = l.length - 1;
3022
- else if (u > 0)
3023
- d = u - 1;
3559
+ else if (c > 0)
3560
+ d = c - 1;
3024
3561
  else
3025
3562
  return n(a, s), !0;
3026
3563
  if (this.editor.view.dispatch(
3027
3564
  this.editor.state.tr.setNodeMarkup(a, void 0, { ...s.attrs, focusedImageIndex: d }).setMeta("addToHistory", !1)
3028
3565
  ), d !== null && d >= 0 && d < l.length) {
3029
- const w = this.editor.view.nodeDOM(a);
3030
- w instanceof HTMLElement && requestAnimationFrame(() => {
3031
- var S;
3032
- (S = w.querySelectorAll("img")[d]) == null || S.scrollIntoView({ block: "nearest", inline: "nearest" });
3566
+ const v = this.editor.view.nodeDOM(a);
3567
+ v instanceof HTMLElement && requestAnimationFrame(() => {
3568
+ var I;
3569
+ (I = v.querySelectorAll("img")[d]) == null || I.scrollIntoView({ block: "nearest", inline: "nearest" });
3033
3570
  });
3034
3571
  }
3035
3572
  return !0;
@@ -3038,14 +3575,14 @@ const ci = Zr.create({
3038
3575
  ArrowLeft: () => t("left"),
3039
3576
  ArrowRight: () => t("right"),
3040
3577
  Space: () => {
3041
- var u, f, d, p, y, w;
3578
+ var c, f, d, h, g, v;
3042
3579
  const { selection: r } = this.editor.state;
3043
- if (!(r instanceof z)) return !1;
3580
+ if (!(r instanceof P)) return !1;
3044
3581
  const i = r.node;
3045
3582
  if (i.type.name !== "batchSegmentImages") return !1;
3046
- const s = ((f = (u = this.editor.storage.batchSegmentImages) == null ? void 0 : u.imageRegistry) == null ? void 0 : f.get(i.attrs.batchId)) ?? i.attrs.images, l = i.attrs.focusedImageIndex, a = r.from;
3583
+ const s = ((f = (c = this.editor.storage.batchSegmentImages) == null ? void 0 : c.imageRegistry) == null ? void 0 : f.get(i.attrs.batchId)) ?? i.attrs.images, l = i.attrs.focusedImageIndex, a = r.from;
3047
3584
  if (l === null)
3048
- return (p = (d = this.options).onAdd) == null || p.call(d, {
3585
+ return (h = (d = this.options).onAdd) == null || h.call(d, {
3049
3586
  position: "last",
3050
3587
  batchId: i.attrs.batchId,
3051
3588
  currentImages: s,
@@ -3054,7 +3591,7 @@ const ci = Zr.create({
3054
3591
  }), !0;
3055
3592
  if (l >= 0 && l < s.length) {
3056
3593
  const m = s[l];
3057
- return (w = (y = this.options).onImageClick) == null || w.call(y, {
3594
+ return (v = (g = this.options).onImageClick) == null || v.call(g, {
3058
3595
  imageId: m.id,
3059
3596
  batchId: i.attrs.batchId,
3060
3597
  src: m.src,
@@ -3092,8 +3629,8 @@ const ci = Zr.create({
3092
3629
  return ({ node: n, getPos: e, editor: t }) => {
3093
3630
  const r = this.options, i = this.storage, s = document.createElement("div");
3094
3631
  s.style.width = "100%", s.classList.add("batch-segment-gallery"), i.imageRegistry.has(n.attrs.batchId) || i.imageRegistry.set(n.attrs.batchId, n.attrs.images ?? []);
3095
- const l = Mn.createRoot(s), a = { current: n };
3096
- let u = null;
3632
+ const l = Xn.createRoot(s), a = { current: n };
3633
+ let c = null;
3097
3634
  const f = () => {
3098
3635
  var m;
3099
3636
  (m = r.onAdd) == null || m.call(r, {
@@ -3104,40 +3641,40 @@ const ci = Zr.create({
3104
3641
  editor: t
3105
3642
  });
3106
3643
  }, d = (m) => {
3107
- var S, C;
3108
- (C = r.onRemove) == null || C.call(r, {
3644
+ var I, A;
3645
+ (A = r.onRemove) == null || A.call(r, {
3109
3646
  index: m,
3110
- imageId: (S = (i.imageRegistry.get(a.current.attrs.batchId) ?? [])[m]) == null ? void 0 : S.id,
3647
+ imageId: (I = (i.imageRegistry.get(a.current.attrs.batchId) ?? [])[m]) == null ? void 0 : I.id,
3111
3648
  batchId: a.current.attrs.batchId,
3112
3649
  getPos: e,
3113
3650
  editor: t
3114
3651
  });
3115
- }, p = (m) => {
3116
- var C;
3117
- const S = e();
3118
- if (S !== void 0) {
3119
- const A = (i.imageRegistry.get(a.current.attrs.batchId) ?? []).findIndex((E) => E.id === m.id);
3652
+ }, h = (m) => {
3653
+ var A;
3654
+ const I = e();
3655
+ if (I !== void 0) {
3656
+ const L = (i.imageRegistry.get(a.current.attrs.batchId) ?? []).findIndex((R) => R.id === m.id);
3120
3657
  t.view.dispatch(
3121
- t.state.tr.setNodeMarkup(S, void 0, {
3658
+ t.state.tr.setNodeMarkup(I, void 0, {
3122
3659
  ...a.current.attrs,
3123
- focusedImageIndex: A
3660
+ focusedImageIndex: L
3124
3661
  }).setMeta("addToHistory", !1)
3125
3662
  );
3126
3663
  }
3127
- (C = r.onImageClick) == null || C.call(r, {
3664
+ (A = r.onImageClick) == null || A.call(r, {
3128
3665
  imageId: m.id,
3129
3666
  batchId: a.current.attrs.batchId,
3130
3667
  src: m.src,
3131
3668
  getPos: e,
3132
3669
  editor: t
3133
3670
  });
3134
- }, y = () => {
3135
- const [m, S] = Le.useState({
3671
+ }, g = () => {
3672
+ const [m, I] = De.useState({
3136
3673
  images: i.imageRegistry.get(n.attrs.batchId) ?? [],
3137
3674
  focusedImageIndex: n.attrs.focusedImageIndex,
3138
3675
  batchId: n.attrs.batchId
3139
3676
  });
3140
- return u = S, Le.createElement(_n, {
3677
+ return c = I, De.createElement(ei, {
3141
3678
  batchId: m.batchId,
3142
3679
  images: m.images,
3143
3680
  maxImageAmount: r.maxImageAmount,
@@ -3145,22 +3682,22 @@ const ci = Zr.create({
3145
3682
  focusedImageIndex: m.focusedImageIndex,
3146
3683
  onAdd: f,
3147
3684
  onDelete: d,
3148
- onImageClick: p
3685
+ onImageClick: h
3149
3686
  });
3150
3687
  };
3151
- l.render(Le.createElement(y));
3152
- let w = n;
3688
+ l.render(De.createElement(g));
3689
+ let v = n;
3153
3690
  return s.addEventListener("click", () => {
3154
3691
  const m = e();
3155
3692
  if (m !== void 0) {
3156
- const { state: S, view: C } = t, A = S.doc.nodeAt(m);
3157
- if (!A) return;
3158
- const E = S.tr.setNodeMarkup(m, void 0, { ...A.attrs, focusedImageIndex: null }).setMeta("addToHistory", !1);
3159
- C.dispatch(E.setSelection(z.create(E.doc, m)));
3693
+ const { state: I, view: A } = t, L = I.doc.nodeAt(m);
3694
+ if (!L) return;
3695
+ const R = I.tr.setNodeMarkup(m, void 0, { ...L.attrs, focusedImageIndex: null }).setMeta("addToHistory", !1);
3696
+ A.dispatch(R.setSelection(P.create(R.doc, m)));
3160
3697
  }
3161
3698
  }), {
3162
3699
  dom: s,
3163
- update: (m) => m.type !== n.type ? !1 : (m === w || (w = m, a.current = m, u == null || u({
3700
+ update: (m) => m.type !== n.type ? !1 : (m === v || (v = m, a.current = m, c == null || c({
3164
3701
  images: i.imageRegistry.get(m.attrs.batchId) ?? [],
3165
3702
  focusedImageIndex: m.attrs.focusedImageIndex,
3166
3703
  batchId: m.attrs.batchId
@@ -3168,28 +3705,28 @@ const ci = Zr.create({
3168
3705
  // selectNode fires when node becomes selected (ArrowUp/Down/Left/Right from outside).
3169
3706
  // Deferred via queueMicrotask — safe since selectNode is called during view.dispatch.
3170
3707
  selectNode: () => {
3171
- const m = ae;
3172
- ae = null;
3173
- const S = e();
3174
- if (S === void 0) return;
3175
- const C = t.state.doc.nodeAt(S);
3176
- if (!C || C.attrs.focusedImageIndex !== null) return;
3177
- const A = m === "left" ? null : 0;
3708
+ const m = fe;
3709
+ fe = null;
3710
+ const I = e();
3711
+ if (I === void 0) return;
3712
+ const A = t.state.doc.nodeAt(I);
3713
+ if (!A || A.attrs.focusedImageIndex !== null) return;
3714
+ const L = m === "left" ? null : 0;
3178
3715
  queueMicrotask(() => {
3179
- const E = e();
3180
- if (E === void 0) return;
3181
- const te = t.state.doc.nodeAt(E);
3182
- !te || te.attrs.focusedImageIndex !== null || t.state.selection instanceof z && t.view.dispatch(
3183
- t.state.tr.setNodeMarkup(E, void 0, { ...te.attrs, focusedImageIndex: A }).setMeta("addToHistory", !1)
3716
+ const R = e();
3717
+ if (R === void 0) return;
3718
+ const oe = t.state.doc.nodeAt(R);
3719
+ !oe || oe.attrs.focusedImageIndex !== null || t.state.selection instanceof P && t.view.dispatch(
3720
+ t.state.tr.setNodeMarkup(R, void 0, { ...oe.attrs, focusedImageIndex: L }).setMeta("addToHistory", !1)
3184
3721
  );
3185
3722
  });
3186
3723
  },
3187
3724
  deselectNode: () => {
3188
3725
  const m = e();
3189
3726
  if (m === void 0) return;
3190
- const S = t.state.doc.nodeAt(m);
3191
- !S || S.attrs.focusedImageIndex === null || t.view.dispatch(
3192
- t.state.tr.setNodeMarkup(m, void 0, { ...S.attrs, focusedImageIndex: null }).setMeta("addToHistory", !1)
3727
+ const I = t.state.doc.nodeAt(m);
3728
+ !I || I.attrs.focusedImageIndex === null || t.view.dispatch(
3729
+ t.state.tr.setNodeMarkup(m, void 0, { ...I.attrs, focusedImageIndex: null }).setMeta("addToHistory", !1)
3193
3730
  );
3194
3731
  },
3195
3732
  destroy: () => {
@@ -3219,46 +3756,51 @@ const ci = Zr.create({
3219
3756
  }
3220
3757
  });
3221
3758
  export {
3222
- ai as ALL_EXTENSIONS,
3223
- li as BASE_EXTENSIONS,
3224
- ci as BatchSegmentImagesExtension,
3225
- hi as Bold,
3226
- Mi as BulletList,
3227
- ns as CharacterCount,
3228
- mi as Color,
3229
- Rn as CustomBulletList,
3230
- Qt as CustomListItem,
3231
- On as CustomOrderedList,
3232
- en as CustomParagraph,
3233
- yi as Document,
3234
- er as DynamicBulletStyling,
3235
- Ii as FileHandler,
3236
- tr as FontSize,
3237
- xi as HardBreak,
3238
- bi as Heading,
3239
- Ei as Highlight,
3240
- is as History,
3241
- Ri as Image,
3242
- bn as IndentExtension,
3243
- Ni as Italic,
3244
- rr as LineHeight,
3245
- Ci as Link,
3246
- Cn as ListIndentIntegration,
3247
- Pi as ListItem,
3248
- Di as ListKeymap,
3249
- Hi as Mention,
3250
- ui as MentionStorage,
3251
- zi as OrderedList,
3252
- $i as Paragraph,
3253
- ss as Placeholder,
3254
- qi as Table,
3255
- Vi as TableCell,
3256
- Wi as TableHeader,
3257
- Ui as TableRow,
3258
- _i as TaskItem,
3259
- Ji as TaskList,
3260
- Ki as Text,
3261
- Xi as TextAlign,
3262
- Qi as TextStyle,
3263
- ts as Underline
3759
+ Ti as ALL_EXTENSIONS,
3760
+ Ri as BASE_EXTENSIONS,
3761
+ ki as BatchSegmentImagesExtension,
3762
+ Li as Bold,
3763
+ Gi as BulletList,
3764
+ Is as CharacterCount,
3765
+ zi as Color,
3766
+ Vn as CustomBulletList,
3767
+ sr as CustomLink,
3768
+ lr as CustomListItem,
3769
+ jn as CustomOrderedList,
3770
+ wn as CustomParagraph,
3771
+ Pi as Document,
3772
+ cr as DynamicBulletStyling,
3773
+ Ts as Editor,
3774
+ Rs as EditorContent,
3775
+ _i as FileHandler,
3776
+ dr as FontSize,
3777
+ Bi as HardBreak,
3778
+ Ji as Heading,
3779
+ Hi as Highlight,
3780
+ Ss as History,
3781
+ ji as Image,
3782
+ ar as ImageResize,
3783
+ Fn as IndentExtension,
3784
+ qi as Italic,
3785
+ ur as LineHeight,
3786
+ Yi as Link,
3787
+ Kn as ListIndentIntegration,
3788
+ Zi as ListItem,
3789
+ Qi as ListKeymap,
3790
+ is as Mention,
3791
+ Ci as MentionStorage,
3792
+ es as OrderedList,
3793
+ os as Paragraph,
3794
+ Es as Placeholder,
3795
+ ls as Table,
3796
+ cs as TableCell,
3797
+ ds as TableHeader,
3798
+ us as TableRow,
3799
+ ts as TaskItem,
3800
+ rs as TaskList,
3801
+ hs as Text,
3802
+ ms as TextAlign,
3803
+ ys as TextStyle,
3804
+ ws as Underline,
3805
+ Cs as useEditor
3264
3806
  };