@nine-lab/nine-ux 0.1.140 → 0.1.142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nine-ux.js CHANGED
@@ -3,29 +3,29 @@ var hi = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
5
  var Rl = (r, e, t) => e in r ? Il(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var dt = (r, e, t) => Rl(r, typeof e != "symbol" ? e + "" : e, t), _n = (r, e, t) => e.has(r) || hi("Cannot " + t);
7
- var v = (r, e, t) => (_n(r, e, "read from private field"), t ? t.call(r) : e.get(r)), B = (r, e, t) => e.has(r) ? hi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), X = (r, e, t, n) => (_n(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), A = (r, e, t) => (_n(r, e, "access private method"), t);
6
+ var dt = (r, e, t) => Rl(r, typeof e != "symbol" ? e + "" : e, t), Un = (r, e, t) => e.has(r) || hi("Cannot " + t);
7
+ var v = (r, e, t) => (Un(r, e, "read from private field"), t ? t.call(r) : e.get(r)), B = (r, e, t) => e.has(r) ? hi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), X = (r, e, t, n) => (Un(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), A = (r, e, t) => (Un(r, e, "access private method"), t);
8
8
  import { nine as vs, nineAlertPopup as Pl, nineConfirmPopup as Bl } from "@nine-lab/nine-util";
9
9
  const Ll = typeof window < "u" && window.nine ? window.nine : vs;
10
- var Gt, Yt, mr;
10
+ var Ut, _t, pr;
11
11
  class zl {
12
12
  constructor() {
13
- B(this, Yt);
14
- B(this, Gt, "");
13
+ B(this, _t);
14
+ B(this, Ut, "");
15
15
  }
16
16
  // 1. 값만 깔끔하게 반환
17
17
  get cssPath() {
18
18
  var e;
19
- return ((e = Ll.config.ux) == null ? void 0 : e.cssPath) || v(this, Gt);
19
+ return ((e = Ll.config.ux) == null ? void 0 : e.cssPath) || v(this, Ut);
20
20
  }
21
21
  set cssPath(e) {
22
- X(this, Gt, e);
22
+ X(this, Ut, e);
23
23
  }
24
24
  alert(e, t = "Alert") {
25
- return A(this, Yt, mr).call(this, "alert", e, t, "classic");
25
+ return A(this, _t, pr).call(this, "alert", e, t, "classic");
26
26
  }
27
27
  confirm(e, t = "Confirm") {
28
- return A(this, Yt, mr).call(this, "confirm", e, t, "classic");
28
+ return A(this, _t, pr).call(this, "confirm", e, t, "classic");
29
29
  }
30
30
  /**
31
31
  * 컴포넌트별 CSS 경로 생성 헬퍼 (복구!)
@@ -35,7 +35,7 @@ class zl {
35
35
  return t ? `${t.endsWith("/") ? t : t + "/"}${e}` : null;
36
36
  }
37
37
  }
38
- Gt = new WeakMap(), Yt = new WeakSet(), mr = function(e, t, n, i) {
38
+ Ut = new WeakMap(), _t = new WeakSet(), pr = function(e, t, n, i) {
39
39
  const s = { class: i, animation: "fade-in" }, o = e === "alert" ? Pl : Bl;
40
40
  let l = !1;
41
41
  const a = {
@@ -57,20 +57,20 @@ Gt = new WeakMap(), Yt = new WeakSet(), mr = function(e, t, n, i) {
57
57
  l || (l = !0, o[e](t, n, s));
58
58
  }), a;
59
59
  };
60
- const kn = new zl();
61
- var Xt, Xe, Zt, ae, vt, gr, yr, Qt, Pn;
60
+ const mr = new zl();
61
+ var Gt, Xe, Yt, ae, At, gr, yr, Xt, Rn;
62
62
  class $l extends HTMLElement {
63
63
  constructor() {
64
64
  super();
65
65
  B(this, ae);
66
66
  dt(this, "originContents");
67
- B(this, Xt, !1);
67
+ B(this, Gt, !1);
68
68
  B(this, Xe);
69
69
  // Shadow DOM 사용 여부에 따라 shadowRoot 또는 this를 가리킴
70
- B(this, Zt, !1);
70
+ B(this, Yt, !1);
71
71
  dt(this, "getData", () => {
72
72
  const t = {};
73
- return A(this, ae, vt).call(this).forEach((n) => {
73
+ return A(this, ae, At).call(this).forEach((n) => {
74
74
  const i = n.name;
75
75
  if (!i) return;
76
76
  let s;
@@ -83,7 +83,7 @@ class $l extends HTMLElement {
83
83
  });
84
84
  // 파라미터가 있으면 해당 값으로, 없으면 전체 공백 초기화
85
85
  dt(this, "clearData", (t = {}) => {
86
- A(this, ae, yr).call(this), A(this, ae, vt).call(this).forEach((n) => {
86
+ A(this, ae, yr).call(this), A(this, ae, At).call(this).forEach((n) => {
87
87
  const i = n.name;
88
88
  if (!i) return;
89
89
  const s = t && t[i] !== void 0 ? t[i] : "";
@@ -94,7 +94,7 @@ class $l extends HTMLElement {
94
94
  if (!t || typeof t != "object") return;
95
95
  A(this, ae, yr).call(this);
96
96
  let n = !1;
97
- A(this, ae, vt).call(this).forEach((i) => {
97
+ A(this, ae, At).call(this).forEach((i) => {
98
98
  const s = i.name;
99
99
  !s || !t.hasOwnProperty(s) || A(this, ae, gr).call(this, i, t[s]) && (n = !0);
100
100
  }), n && (this.changed = !0);
@@ -102,24 +102,24 @@ class $l extends HTMLElement {
102
102
  dt(this, "initData", (t) => {
103
103
  this.clearData(t), this.changed = !1;
104
104
  });
105
- B(this, Qt, (t) => {
105
+ B(this, Xt, (t) => {
106
106
  this.changed = !0;
107
107
  });
108
- B(this, Pn, () => {
108
+ B(this, Rn, () => {
109
109
  for (const t of this.attributes)
110
110
  t.name.startsWith("css-") && this.style.setProperty(t.name.substring(4), t.value);
111
111
  this.originContents = this.innerHTML.trim(), this.innerHTML = "", this.shadowRoot && this.tagName.toLowerCase() === "nx-div" && (this.shadowRoot.innerHTML = this.originContents);
112
112
  });
113
113
  }
114
114
  connectedCallback() {
115
- return v(this, Xt) ? !1 : (this.getAttribute("use-shadow") !== "false" && !this.shadowRoot ? (this.attachShadow({ mode: "open" }), X(this, Xe, this.shadowRoot)) : X(this, Xe, this), v(this, Pn).call(this), X(this, Xt, !0), !0);
115
+ return v(this, Gt) ? !1 : (this.getAttribute("use-shadow") !== "false" && !this.shadowRoot ? (this.attachShadow({ mode: "open" }), X(this, Xe, this.shadowRoot)) : X(this, Xe, this), v(this, Rn).call(this), X(this, Gt, !0), !0);
116
116
  }
117
117
  get changed() {
118
- return v(this, Zt);
118
+ return v(this, Yt);
119
119
  }
120
120
  set changed(t) {
121
121
  const n = !!t;
122
- X(this, Zt, n);
122
+ X(this, Yt, n);
123
123
  const i = this.closest(".detail-wrapper");
124
124
  if (i) {
125
125
  const s = i.querySelector("nx-title2");
@@ -131,8 +131,8 @@ class $l extends HTMLElement {
131
131
  return v(this, Xe) || this;
132
132
  }
133
133
  }
134
- Xt = new WeakMap(), Xe = new WeakMap(), Zt = new WeakMap(), ae = new WeakSet(), // 공통 쿼리 함수: 현재 root(Shadow 또는 Light DOM)에서 요소를 찾음
135
- vt = function() {
134
+ Gt = new WeakMap(), Xe = new WeakMap(), Yt = new WeakMap(), ae = new WeakSet(), // 공통 쿼리 함수: 현재 root(Shadow 또는 Light DOM)에서 요소를 찾음
135
+ At = function() {
136
136
  return ninegrid.querySelectorAll("input[name], textarea[name], select[name], nx-editor[name]", v(this, Xe));
137
137
  }, // [공통 로직 1] 특정 요소에 값을 쓰거나 초기화하는 핵심 함수
138
138
  gr = function(t, n) {
@@ -152,10 +152,10 @@ gr = function(t, n) {
152
152
  return o;
153
153
  }, // [공통 로직 2] 이벤트 리스너 일괄 등록
154
154
  yr = function() {
155
- A(this, ae, vt).call(this).forEach((t) => {
156
- t.removeEventListener("input", v(this, Qt)), t.addEventListener("input", v(this, Qt));
155
+ A(this, ae, At).call(this).forEach((t) => {
156
+ t.removeEventListener("input", v(this, Xt)), t.addEventListener("input", v(this, Xt));
157
157
  });
158
- }, Qt = new WeakMap(), Pn = new WeakMap();
158
+ }, Xt = new WeakMap(), Rn = new WeakMap();
159
159
  function J(r) {
160
160
  this.content = r;
161
161
  }
@@ -558,11 +558,11 @@ class b {
558
558
  }
559
559
  }
560
560
  b.empty = new b([], 0);
561
- const Gn = { index: 0, offset: 0 };
561
+ const _n = { index: 0, offset: 0 };
562
562
  function ln(r, e) {
563
- return Gn.index = r, Gn.offset = e, Gn;
563
+ return _n.index = r, _n.offset = e, _n;
564
564
  }
565
- function xn(r, e) {
565
+ function kn(r, e) {
566
566
  if (r === e)
567
567
  return !0;
568
568
  if (!(r && typeof r == "object") || !(e && typeof e == "object"))
@@ -574,11 +574,11 @@ function xn(r, e) {
574
574
  if (r.length != e.length)
575
575
  return !1;
576
576
  for (let n = 0; n < r.length; n++)
577
- if (!xn(r[n], e[n]))
577
+ if (!kn(r[n], e[n]))
578
578
  return !1;
579
579
  } else {
580
580
  for (let n in r)
581
- if (!(n in e) || !xn(r[n], e[n]))
581
+ if (!(n in e) || !kn(r[n], e[n]))
582
582
  return !1;
583
583
  for (let n in e)
584
584
  if (!(n in r))
@@ -640,7 +640,7 @@ let D = class br {
640
640
  another mark.
641
641
  */
642
642
  eq(e) {
643
- return this == e || this.type == e.type && xn(this.attrs, e.attrs);
643
+ return this == e || this.type == e.type && kn(this.attrs, e.attrs);
644
644
  }
645
645
  /**
646
646
  Convert this mark to a JSON-serializeable representation.
@@ -692,7 +692,7 @@ let D = class br {
692
692
  }
693
693
  };
694
694
  D.none = [];
695
- class Sn extends Error {
695
+ class xn extends Error {
696
696
  }
697
697
  class k {
698
698
  /**
@@ -795,9 +795,9 @@ function Ps(r, e, t, n) {
795
795
  }
796
796
  function Fl(r, e, t) {
797
797
  if (t.openStart > r.depth)
798
- throw new Sn("Inserted content deeper than insertion position");
798
+ throw new xn("Inserted content deeper than insertion position");
799
799
  if (r.depth - t.openStart != e.depth - t.openEnd)
800
- throw new Sn("Inconsistent open depths");
800
+ throw new xn("Inconsistent open depths");
801
801
  return Bs(r, e, t, 0);
802
802
  }
803
803
  function Bs(r, e, t, n) {
@@ -813,11 +813,11 @@ function Bs(r, e, t, n) {
813
813
  let { start: o, end: l } = Vl(t, r);
814
814
  return Qe(s, zs(r, o, l, e, n));
815
815
  }
816
- else return Qe(s, Mn(r, e, n));
816
+ else return Qe(s, Sn(r, e, n));
817
817
  }
818
818
  function Ls(r, e) {
819
819
  if (!e.type.compatibleContent(r.type))
820
- throw new Sn("Cannot join " + e.type.name + " onto " + r.type.name);
820
+ throw new xn("Cannot join " + e.type.name + " onto " + r.type.name);
821
821
  }
822
822
  function kr(r, e, t) {
823
823
  let n = r.node(t);
@@ -827,7 +827,7 @@ function Ze(r, e) {
827
827
  let t = e.length - 1;
828
828
  t >= 0 && r.isText && r.sameMarkup(e[t]) ? e[t] = r.withText(e[t].text + r.text) : e.push(r);
829
829
  }
830
- function Bt(r, e, t, n) {
830
+ function Rt(r, e, t, n) {
831
831
  let i = (e || r).node(t), s = 0, o = e ? e.index(t) : i.childCount;
832
832
  r && (s = r.index(t), r.depth > t ? s++ : r.textOffset && (Ze(r.nodeAfter, n), s++));
833
833
  for (let l = s; l < o; l++)
@@ -839,15 +839,15 @@ function Qe(r, e) {
839
839
  }
840
840
  function zs(r, e, t, n, i) {
841
841
  let s = r.depth > i && kr(r, e, i + 1), o = n.depth > i && kr(t, n, i + 1), l = [];
842
- return Bt(null, r, i, l), s && o && e.index(i) == t.index(i) ? (Ls(s, o), Ze(Qe(s, zs(r, e, t, n, i + 1)), l)) : (s && Ze(Qe(s, Mn(r, e, i + 1)), l), Bt(e, t, i, l), o && Ze(Qe(o, Mn(t, n, i + 1)), l)), Bt(n, null, i, l), new b(l);
842
+ return Rt(null, r, i, l), s && o && e.index(i) == t.index(i) ? (Ls(s, o), Ze(Qe(s, zs(r, e, t, n, i + 1)), l)) : (s && Ze(Qe(s, Sn(r, e, i + 1)), l), Rt(e, t, i, l), o && Ze(Qe(o, Sn(t, n, i + 1)), l)), Rt(n, null, i, l), new b(l);
843
843
  }
844
- function Mn(r, e, t) {
844
+ function Sn(r, e, t) {
845
845
  let n = [];
846
- if (Bt(null, r, t, n), r.depth > t) {
846
+ if (Rt(null, r, t, n), r.depth > t) {
847
847
  let i = kr(r, e, t + 1);
848
- Ze(Qe(i, Mn(r, e, t + 1)), n);
848
+ Ze(Qe(i, Sn(r, e, t + 1)), n);
849
849
  }
850
- return Bt(e, null, t, n), new b(n);
850
+ return Rt(e, null, t, n), new b(n);
851
851
  }
852
852
  function Vl(r, e) {
853
853
  let t = e.depth - r.openStart, i = e.node(t).copy(r.content);
@@ -858,7 +858,7 @@ function Vl(r, e) {
858
858
  end: i.resolveNoCache(i.content.size - r.openEnd - t)
859
859
  };
860
860
  }
861
- class Ft {
861
+ class zt {
862
862
  /**
863
863
  @internal
864
864
  */
@@ -1043,7 +1043,7 @@ class Ft {
1043
1043
  return e.blockRange(this);
1044
1044
  for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--)
1045
1045
  if (e.pos <= this.end(n) && (!t || t(this.node(n))))
1046
- return new wn(this, e, n);
1046
+ return new Mn(this, e, n);
1047
1047
  return null;
1048
1048
  }
1049
1049
  /**
@@ -1086,7 +1086,7 @@ class Ft {
1086
1086
  break;
1087
1087
  s = c - 1, i += a + 1;
1088
1088
  }
1089
- return new Ft(t, n, s);
1089
+ return new zt(t, n, s);
1090
1090
  }
1091
1091
  /**
1092
1092
  @internal
@@ -1101,7 +1101,7 @@ class Ft {
1101
1101
  }
1102
1102
  else
1103
1103
  pi.set(e, n = new Hl());
1104
- let i = n.elts[n.i] = Ft.resolve(e, t);
1104
+ let i = n.elts[n.i] = zt.resolve(e, t);
1105
1105
  return n.i = (n.i + 1) % Wl, i;
1106
1106
  }
1107
1107
  }
@@ -1111,7 +1111,7 @@ class Hl {
1111
1111
  }
1112
1112
  }
1113
1113
  const Wl = 12, pi = /* @__PURE__ */ new WeakMap();
1114
- class wn {
1114
+ class Mn {
1115
1115
  /**
1116
1116
  Construct a node range. `$from` and `$to` should point into the
1117
1117
  same node until at least the given `depth`, since a node range
@@ -1270,7 +1270,7 @@ let ze = class xr {
1270
1270
  attributes, and marks.
1271
1271
  */
1272
1272
  hasMarkup(e, t, n) {
1273
- return this.type == e && xn(this.attrs, t || e.defaultAttrs || ql) && D.sameSet(this.marks, n || D.none);
1273
+ return this.type == e && kn(this.attrs, t || e.defaultAttrs || ql) && D.sameSet(this.marks, n || D.none);
1274
1274
  }
1275
1275
  /**
1276
1276
  Create a new node with the same markup as this node, containing
@@ -1356,13 +1356,13 @@ let ze = class xr {
1356
1356
  [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.
1357
1357
  */
1358
1358
  resolve(e) {
1359
- return Ft.resolveCached(this, e);
1359
+ return zt.resolveCached(this, e);
1360
1360
  }
1361
1361
  /**
1362
1362
  @internal
1363
1363
  */
1364
1364
  resolveNoCache(e) {
1365
- return Ft.resolve(this, e);
1365
+ return zt.resolve(this, e);
1366
1366
  }
1367
1367
  /**
1368
1368
  Test whether a given mark or mark type occurs in this document
@@ -1522,7 +1522,7 @@ let ze = class xr {
1522
1522
  }
1523
1523
  };
1524
1524
  ze.prototype.text = void 0;
1525
- class Cn extends ze {
1525
+ class wn extends ze {
1526
1526
  /**
1527
1527
  @internal
1528
1528
  */
@@ -1544,10 +1544,10 @@ class Cn extends ze {
1544
1544
  return this.text.length;
1545
1545
  }
1546
1546
  mark(e) {
1547
- return e == this.marks ? this : new Cn(this.type, this.attrs, this.text, e);
1547
+ return e == this.marks ? this : new wn(this.type, this.attrs, this.text, e);
1548
1548
  }
1549
1549
  withText(e) {
1550
- return e == this.text ? this : new Cn(this.type, this.attrs, e, this.marks);
1550
+ return e == this.text ? this : new wn(this.type, this.attrs, e, this.marks);
1551
1551
  }
1552
1552
  cut(e = 0, t = this.text.length) {
1553
1553
  return e == 0 && t == this.text.length ? this : this.withText(this.text.slice(e, t));
@@ -2144,7 +2144,7 @@ class ea {
2144
2144
  return !this.hasDefault;
2145
2145
  }
2146
2146
  }
2147
- class Bn {
2147
+ class Pn {
2148
2148
  /**
2149
2149
  @internal
2150
2150
  */
@@ -2166,7 +2166,7 @@ class Bn {
2166
2166
  */
2167
2167
  static compile(e, t) {
2168
2168
  let n = /* @__PURE__ */ Object.create(null), i = 0;
2169
- return e.forEach((s, o) => n[s] = new Bn(s, i++, t, o)), n;
2169
+ return e.forEach((s, o) => n[s] = new Pn(s, i++, t, o)), n;
2170
2170
  }
2171
2171
  /**
2172
2172
  When there is a mark of this type in the given set, a new set
@@ -2208,7 +2208,7 @@ class Ks {
2208
2208
  let t = this.spec = {};
2209
2209
  for (let i in e)
2210
2210
  t[i] = e[i];
2211
- t.nodes = J.from(e.nodes), t.marks = J.from(e.marks || {}), this.nodes = yi.compile(this.spec.nodes, this), this.marks = Bn.compile(this.spec.marks, this);
2211
+ t.nodes = J.from(e.nodes), t.marks = J.from(e.marks || {}), this.nodes = yi.compile(this.spec.nodes, this), this.marks = Pn.compile(this.spec.marks, this);
2212
2212
  let n = /* @__PURE__ */ Object.create(null);
2213
2213
  for (let i in this.nodes) {
2214
2214
  if (i in this.marks)
@@ -2250,7 +2250,7 @@ class Ks {
2250
2250
  */
2251
2251
  text(e, t) {
2252
2252
  let n = this.nodes.text;
2253
- return new Cn(n, n.defaultAttrs, e, D.setFrom(t));
2253
+ return new wn(n, n.defaultAttrs, e, D.setFrom(t));
2254
2254
  }
2255
2255
  /**
2256
2256
  Create a mark with the given type and attributes.
@@ -2445,13 +2445,13 @@ const Us = {
2445
2445
  script: !0,
2446
2446
  style: !0,
2447
2447
  title: !0
2448
- }, _s = { ol: !0, ul: !0 }, Vt = 1, Sr = 2, Lt = 4;
2448
+ }, _s = { ol: !0, ul: !0 }, $t = 1, Sr = 2, Pt = 4;
2449
2449
  function ki(r, e, t) {
2450
- return e != null ? (e ? Vt : 0) | (e === "full" ? Sr : 0) : r && r.whitespace == "pre" ? Vt | Sr : t & ~Lt;
2450
+ return e != null ? (e ? $t : 0) | (e === "full" ? Sr : 0) : r && r.whitespace == "pre" ? $t | Sr : t & ~Pt;
2451
2451
  }
2452
2452
  class an {
2453
2453
  constructor(e, t, n, i, s, o) {
2454
- this.type = e, this.attrs = t, this.marks = n, this.solid = i, this.options = o, this.content = [], this.activeMarks = D.none, this.match = s || (o & Lt ? null : e.contentMatch);
2454
+ this.type = e, this.attrs = t, this.marks = n, this.solid = i, this.options = o, this.content = [], this.activeMarks = D.none, this.match = s || (o & Pt ? null : e.contentMatch);
2455
2455
  }
2456
2456
  findWrapping(e) {
2457
2457
  if (!this.match) {
@@ -2468,7 +2468,7 @@ class an {
2468
2468
  return this.match.findWrapping(e.type);
2469
2469
  }
2470
2470
  finish(e) {
2471
- if (!(this.options & Vt)) {
2471
+ if (!(this.options & $t)) {
2472
2472
  let n = this.content[this.content.length - 1], i;
2473
2473
  if (n && n.isText && (i = /[ \t\r\n\u000c]+$/.exec(n.text))) {
2474
2474
  let s = n;
@@ -2485,7 +2485,7 @@ class an {
2485
2485
  class xi {
2486
2486
  constructor(e, t, n) {
2487
2487
  this.parser = e, this.options = t, this.isOpen = n, this.open = 0, this.localPreserveWS = !1;
2488
- let i = t.topNode, s, o = ki(null, t.preserveWhitespace, 0) | (n ? Lt : 0);
2488
+ let i = t.topNode, s, o = ki(null, t.preserveWhitespace, 0) | (n ? Pt : 0);
2489
2489
  i ? s = new an(i.type, i.attrs, D.none, !0, t.topMatch || i.type.contentMatch, o) : n ? s = new an(null, null, D.none, !0, null, o) : s = new an(e.schema.topNodeType, null, D.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
2490
2490
  }
2491
2491
  get top() {
@@ -2498,7 +2498,7 @@ class xi {
2498
2498
  e.nodeType == 3 ? this.addTextNode(e, t) : e.nodeType == 1 && this.addElement(e, t);
2499
2499
  }
2500
2500
  addTextNode(e, t) {
2501
- let n = e.nodeValue, i = this.top, s = i.options & Sr ? "full" : this.localPreserveWS || (i.options & Vt) > 0, { schema: o } = this.parser;
2501
+ let n = e.nodeValue, i = this.top, s = i.options & Sr ? "full" : this.localPreserveWS || (i.options & $t) > 0, { schema: o } = this.parser;
2502
2502
  if (s === "full" || i.inlineContext(e) || /[^ \t\r\n\u000c]/.test(n)) {
2503
2503
  if (s)
2504
2504
  if (s === "full")
@@ -2668,7 +2668,7 @@ class xi {
2668
2668
  let o = this.top;
2669
2669
  o.match = o.match && o.match.matchType(e);
2670
2670
  let l = ki(e, s, o.options);
2671
- o.options & Lt && o.content.length == 0 && (l |= Lt);
2671
+ o.options & Pt && o.content.length == 0 && (l |= Pt);
2672
2672
  let a = D.none;
2673
2673
  return n = n.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : Mi(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new an(e, t, a, i, null, l)), this.open++, n;
2674
2674
  }
@@ -2689,7 +2689,7 @@ class xi {
2689
2689
  for (let t = this.open; t >= 0; t--) {
2690
2690
  if (this.nodes[t] == e)
2691
2691
  return this.open = t, !0;
2692
- this.localPreserveWS && (this.nodes[t].options |= Vt);
2692
+ this.localPreserveWS && (this.nodes[t].options |= $t);
2693
2693
  }
2694
2694
  return !1;
2695
2695
  }
@@ -2817,7 +2817,7 @@ class ct {
2817
2817
  nodes.
2818
2818
  */
2819
2819
  serializeFragment(e, t = {}, n) {
2820
- n || (n = Yn(t).createDocumentFragment());
2820
+ n || (n = Gn(t).createDocumentFragment());
2821
2821
  let i = n, s = [];
2822
2822
  return e.forEach((o) => {
2823
2823
  if (s.length || o.marks.length) {
@@ -2846,7 +2846,7 @@ class ct {
2846
2846
  @internal
2847
2847
  */
2848
2848
  serializeNodeInner(e, t) {
2849
- let { dom: n, contentDOM: i } = mn(Yn(t), this.nodes[e.type.name](e), null, e.attrs);
2849
+ let { dom: n, contentDOM: i } = mn(Gn(t), this.nodes[e.type.name](e), null, e.attrs);
2850
2850
  if (i) {
2851
2851
  if (e.isLeaf)
2852
2852
  throw new RangeError("Content hole not allowed in a leaf node spec");
@@ -2874,7 +2874,7 @@ class ct {
2874
2874
  */
2875
2875
  serializeMark(e, t, n = {}) {
2876
2876
  let i = this.marks[e.type.name];
2877
- return i && mn(Yn(n), i(e, t), null, e.attrs);
2877
+ return i && mn(Gn(n), i(e, t), null, e.attrs);
2878
2878
  }
2879
2879
  static renderSpec(e, t, n = null, i) {
2880
2880
  return mn(e, t, n, i);
@@ -2909,7 +2909,7 @@ function wi(r) {
2909
2909
  }
2910
2910
  return e;
2911
2911
  }
2912
- function Yn(r) {
2912
+ function Gn(r) {
2913
2913
  return r.document || window.document;
2914
2914
  }
2915
2915
  const Ci = /* @__PURE__ */ new WeakMap();
@@ -3117,7 +3117,7 @@ class le {
3117
3117
  }
3118
3118
  }
3119
3119
  le.empty = new le([]);
3120
- class Ht {
3120
+ class Ft {
3121
3121
  /**
3122
3122
  Create a new mapping with the given position maps.
3123
3123
  */
@@ -3134,7 +3134,7 @@ class Ht {
3134
3134
  Create a mapping that maps only through a part of this one.
3135
3135
  */
3136
3136
  slice(e = 0, t = this.maps.length) {
3137
- return new Ht(this._maps, this.mirror, e, t);
3137
+ return new Ft(this._maps, this.mirror, e, t);
3138
3138
  }
3139
3139
  /**
3140
3140
  Add a step map to the end of this mapping. If `mirrors` is
@@ -3185,7 +3185,7 @@ class Ht {
3185
3185
  Create an inverted version of this mapping.
3186
3186
  */
3187
3187
  invert() {
3188
- let e = new Ht();
3188
+ let e = new Ft();
3189
3189
  return e.appendMappingInverted(this), e;
3190
3190
  }
3191
3191
  /**
@@ -3224,7 +3224,7 @@ class Ht {
3224
3224
  return n ? e : new Mr(e, i, null);
3225
3225
  }
3226
3226
  }
3227
- const Xn = /* @__PURE__ */ Object.create(null);
3227
+ const Yn = /* @__PURE__ */ Object.create(null);
3228
3228
  class ee {
3229
3229
  /**
3230
3230
  Get the step map that represents the changes made by this step,
@@ -3249,7 +3249,7 @@ class ee {
3249
3249
  static fromJSON(e, t) {
3250
3250
  if (!t || !t.stepType)
3251
3251
  throw new RangeError("Invalid input for Step.fromJSON");
3252
- let n = Xn[t.stepType];
3252
+ let n = Yn[t.stepType];
3253
3253
  if (!n)
3254
3254
  throw new RangeError(`No step type ${t.stepType} defined`);
3255
3255
  return n.fromJSON(e, t);
@@ -3261,9 +3261,9 @@ class ee {
3261
3261
  that's unlikely to clash with steps from other modules.
3262
3262
  */
3263
3263
  static jsonID(e, t) {
3264
- if (e in Xn)
3264
+ if (e in Yn)
3265
3265
  throw new RangeError("Duplicate use of step JSON ID " + e);
3266
- return Xn[e] = t, t.prototype.jsonID = e, t;
3266
+ return Yn[e] = t, t.prototype.jsonID = e, t;
3267
3267
  }
3268
3268
  }
3269
3269
  class z {
@@ -3294,7 +3294,7 @@ class z {
3294
3294
  try {
3295
3295
  return z.ok(e.replace(t, n, i));
3296
3296
  } catch (s) {
3297
- if (s instanceof Sn)
3297
+ if (s instanceof xn)
3298
3298
  return z.fail(s.message);
3299
3299
  throw s;
3300
3300
  }
@@ -3611,7 +3611,7 @@ function ua(r, e, t, n) {
3611
3611
  return;
3612
3612
  s++;
3613
3613
  let a = null;
3614
- if (n instanceof Bn) {
3614
+ if (n instanceof Pn) {
3615
3615
  let c = o.marks, d;
3616
3616
  for (; d = n.isInSet(c); )
3617
3617
  (a || (a = [])).push(d), c = d.removeFromSet(c);
@@ -3657,7 +3657,7 @@ function jr(r, e, t, n = t.contentMatch, i = !0) {
3657
3657
  function fa(r, e, t) {
3658
3658
  return (e == 0 || r.canReplace(e, r.childCount)) && (t == r.childCount || r.canReplace(0, t));
3659
3659
  }
3660
- function At(r) {
3660
+ function Ot(r) {
3661
3661
  let t = r.parent.content.cutByIndex(r.startIndex, r.endIndex);
3662
3662
  for (let n = r.depth, i = 0, s = 0; ; --n) {
3663
3663
  let o = r.$from.node(n), l = r.$from.index(n) + i, a = r.$to.indexAfter(n) - s;
@@ -3811,7 +3811,7 @@ function Sa(r, e) {
3811
3811
  function no(r, e) {
3812
3812
  return !!(r && e && !r.isLeaf && Sa(r, e));
3813
3813
  }
3814
- function Ln(r, e, t = -1) {
3814
+ function Bn(r, e, t = -1) {
3815
3815
  let n = r.resolve(e);
3816
3816
  for (let i = n.depth; ; i--) {
3817
3817
  let s, o, l = n.index(i);
@@ -3884,7 +3884,7 @@ function ro(r, e, t) {
3884
3884
  }
3885
3885
  return null;
3886
3886
  }
3887
- function zn(r, e, t = e, n = k.empty) {
3887
+ function Ln(r, e, t = e, n = k.empty) {
3888
3888
  if (e == t && !n.size)
3889
3889
  return null;
3890
3890
  let i = r.resolve(e), s = r.resolve(t);
@@ -3939,7 +3939,7 @@ class Ca {
3939
3939
  for (let t = 1; t <= 2; t++)
3940
3940
  for (let n = t == 1 ? e : this.unplaced.openStart; n >= 0; n--) {
3941
3941
  let i, s = null;
3942
- n ? (s = Zn(this.unplaced.content, n - 1).firstChild, i = s.content) : i = this.unplaced.content;
3942
+ n ? (s = Xn(this.unplaced.content, n - 1).firstChild, i = s.content) : i = this.unplaced.content;
3943
3943
  let o = i.firstChild;
3944
3944
  for (let l = this.depth; l >= 0; l--) {
3945
3945
  let { type: a, match: c } = this.frontier[l], d, u = null;
@@ -3953,16 +3953,16 @@ class Ca {
3953
3953
  }
3954
3954
  }
3955
3955
  openMore() {
3956
- let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Zn(e, t);
3956
+ let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Xn(e, t);
3957
3957
  return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new k(e, t + 1, Math.max(n, i.size + t >= e.size - n ? t + 1 : 0)), !0);
3958
3958
  }
3959
3959
  dropNode() {
3960
- let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Zn(e, t);
3960
+ let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Xn(e, t);
3961
3961
  if (i.childCount <= 1 && t > 0) {
3962
3962
  let s = e.size - t <= t + i.size;
3963
- this.unplaced = new k(Dt(e, t - 1, 1), t - 1, s ? t - 1 : n);
3963
+ this.unplaced = new k(Nt(e, t - 1, 1), t - 1, s ? t - 1 : n);
3964
3964
  } else
3965
- this.unplaced = new k(Dt(e, t, 1), t, n);
3965
+ this.unplaced = new k(Nt(e, t, 1), t, n);
3966
3966
  }
3967
3967
  // Move content from the unplaced slice at `sliceDepth` to the
3968
3968
  // frontier node at `frontierDepth`. Close that frontier node when
@@ -3987,18 +3987,18 @@ class Ca {
3987
3987
  c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(so(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
3988
3988
  }
3989
3989
  let p = c == l.childCount;
3990
- p || (h = -1), this.placed = It(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && n && n.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
3990
+ p || (h = -1), this.placed = vt(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && n && n.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
3991
3991
  for (let m = 0, g = l; m < h; m++) {
3992
3992
  let y = g.lastChild;
3993
3993
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
3994
3994
  }
3995
- this.unplaced = p ? e == 0 ? k.empty : new k(Dt(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new k(Dt(o.content, e, c), o.openStart, o.openEnd);
3995
+ this.unplaced = p ? e == 0 ? k.empty : new k(Nt(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new k(Nt(o.content, e, c), o.openStart, o.openEnd);
3996
3996
  }
3997
3997
  mustMoveInline() {
3998
3998
  if (!this.$to.parent.isTextblock)
3999
3999
  return -1;
4000
4000
  let e = this.frontier[this.depth], t;
4001
- if (!e.type.isTextblock || !Qn(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
4001
+ if (!e.type.isTextblock || !Zn(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
4002
4002
  return -1;
4003
4003
  let { depth: n } = this.$to, i = this.$to.after(n);
4004
4004
  for (; n > 1 && i == this.$to.end(--n); )
@@ -4007,10 +4007,10 @@ class Ca {
4007
4007
  }
4008
4008
  findCloseLevel(e) {
4009
4009
  e: for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
4010
- let { match: n, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = Qn(e, t, i, n, s);
4010
+ let { match: n, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = Zn(e, t, i, n, s);
4011
4011
  if (o) {
4012
4012
  for (let l = t - 1; l >= 0; l--) {
4013
- let { match: a, type: c } = this.frontier[l], d = Qn(e, l, c, a, !0);
4013
+ let { match: a, type: c } = this.frontier[l], d = Zn(e, l, c, a, !0);
4014
4014
  if (!d || d.childCount)
4015
4015
  continue e;
4016
4016
  }
@@ -4024,7 +4024,7 @@ class Ca {
4024
4024
  return null;
4025
4025
  for (; this.depth > t.depth; )
4026
4026
  this.closeFrontierNode();
4027
- t.fit.childCount && (this.placed = It(this.placed, t.depth, t.fit)), e = t.move;
4027
+ t.fit.childCount && (this.placed = vt(this.placed, t.depth, t.fit)), e = t.move;
4028
4028
  for (let n = t.depth + 1; n <= e.depth; n++) {
4029
4029
  let i = e.node(n), s = i.type.contentMatch.fillBefore(i.content, !0, e.index(n));
4030
4030
  this.openFrontierNode(i.type, i.attrs, s);
@@ -4033,20 +4033,20 @@ class Ca {
4033
4033
  }
4034
4034
  openFrontierNode(e, t = null, n) {
4035
4035
  let i = this.frontier[this.depth];
4036
- i.match = i.match.matchType(e), this.placed = It(this.placed, this.depth, b.from(e.create(t, n))), this.frontier.push({ type: e, match: e.contentMatch });
4036
+ i.match = i.match.matchType(e), this.placed = vt(this.placed, this.depth, b.from(e.create(t, n))), this.frontier.push({ type: e, match: e.contentMatch });
4037
4037
  }
4038
4038
  closeFrontierNode() {
4039
4039
  let t = this.frontier.pop().match.fillBefore(b.empty, !0);
4040
- t.childCount && (this.placed = It(this.placed, this.frontier.length, t));
4040
+ t.childCount && (this.placed = vt(this.placed, this.frontier.length, t));
4041
4041
  }
4042
4042
  }
4043
- function Dt(r, e, t) {
4044
- return e == 0 ? r.cutByIndex(t, r.childCount) : r.replaceChild(0, r.firstChild.copy(Dt(r.firstChild.content, e - 1, t)));
4043
+ function Nt(r, e, t) {
4044
+ return e == 0 ? r.cutByIndex(t, r.childCount) : r.replaceChild(0, r.firstChild.copy(Nt(r.firstChild.content, e - 1, t)));
4045
4045
  }
4046
- function It(r, e, t) {
4047
- return e == 0 ? r.append(t) : r.replaceChild(r.childCount - 1, r.lastChild.copy(It(r.lastChild.content, e - 1, t)));
4046
+ function vt(r, e, t) {
4047
+ return e == 0 ? r.append(t) : r.replaceChild(r.childCount - 1, r.lastChild.copy(vt(r.lastChild.content, e - 1, t)));
4048
4048
  }
4049
- function Zn(r, e) {
4049
+ function Xn(r, e) {
4050
4050
  for (let t = 0; t < e; t++)
4051
4051
  r = r.firstChild.content;
4052
4052
  return r;
@@ -4057,7 +4057,7 @@ function so(r, e, t) {
4057
4057
  let n = r.content;
4058
4058
  return e > 1 && (n = n.replaceChild(0, so(n.firstChild, e - 1, n.childCount == 1 ? t - 1 : 0))), e > 0 && (n = r.type.contentMatch.fillBefore(n).append(n), t <= 0 && (n = n.append(r.type.contentMatch.matchFragment(n).fillBefore(b.empty, !0)))), r.copy(n);
4059
4059
  }
4060
- function Qn(r, e, t, n, i) {
4060
+ function Zn(r, e, t, n, i) {
4061
4061
  let s = r.node(e), o = i ? r.indexAfter(e) : r.index(e);
4062
4062
  if (o == s.childCount && !t.compatibleContent(s.type))
4063
4063
  return null;
@@ -4215,7 +4215,7 @@ class yt extends ee {
4215
4215
  }
4216
4216
  }
4217
4217
  ee.jsonID("attr", yt);
4218
- class Wt extends ee {
4218
+ class Vt extends ee {
4219
4219
  /**
4220
4220
  Construct an attribute step.
4221
4221
  */
@@ -4234,7 +4234,7 @@ class Wt extends ee {
4234
4234
  return le.empty;
4235
4235
  }
4236
4236
  invert(e) {
4237
- return new Wt(this.attr, e.attrs[this.attr]);
4237
+ return new Vt(this.attr, e.attrs[this.attr]);
4238
4238
  }
4239
4239
  map(e) {
4240
4240
  return this;
@@ -4245,25 +4245,25 @@ class Wt extends ee {
4245
4245
  static fromJSON(e, t) {
4246
4246
  if (typeof t.attr != "string")
4247
4247
  throw new RangeError("Invalid input for DocAttrStep.fromJSON");
4248
- return new Wt(t.attr, t.value);
4248
+ return new Vt(t.attr, t.value);
4249
4249
  }
4250
4250
  }
4251
- ee.jsonID("docAttr", Wt);
4252
- let Ct = class extends Error {
4251
+ ee.jsonID("docAttr", Vt);
4252
+ let Mt = class extends Error {
4253
4253
  };
4254
- Ct = function r(e) {
4254
+ Mt = function r(e) {
4255
4255
  let t = Error.call(this, e);
4256
4256
  return t.__proto__ = r.prototype, t;
4257
4257
  };
4258
- Ct.prototype = Object.create(Error.prototype);
4259
- Ct.prototype.constructor = Ct;
4260
- Ct.prototype.name = "TransformError";
4258
+ Mt.prototype = Object.create(Error.prototype);
4259
+ Mt.prototype.constructor = Mt;
4260
+ Mt.prototype.name = "TransformError";
4261
4261
  class va {
4262
4262
  /**
4263
4263
  Create a transform that starts with the given document.
4264
4264
  */
4265
4265
  constructor(e) {
4266
- this.doc = e, this.steps = [], this.docs = [], this.mapping = new Ht();
4266
+ this.doc = e, this.steps = [], this.docs = [], this.mapping = new Ft();
4267
4267
  }
4268
4268
  /**
4269
4269
  The starting document.
@@ -4278,7 +4278,7 @@ class va {
4278
4278
  step(e) {
4279
4279
  let t = this.maybeStep(e);
4280
4280
  if (t.failed)
4281
- throw new Ct(t.failed);
4281
+ throw new Mt(t.failed);
4282
4282
  return this;
4283
4283
  }
4284
4284
  /**
@@ -4323,7 +4323,7 @@ class va {
4323
4323
  given `slice`.
4324
4324
  */
4325
4325
  replace(e, t = e, n = k.empty) {
4326
- let i = zn(this.doc, e, t, n);
4326
+ let i = Ln(this.doc, e, t, n);
4327
4327
  return i && this.step(i), this;
4328
4328
  }
4329
4329
  /**
@@ -4437,7 +4437,7 @@ class va {
4437
4437
  Set a single attribute on the document to a new value.
4438
4438
  */
4439
4439
  setDocAttribute(e, t) {
4440
- return this.step(new Wt(e, t)), this;
4440
+ return this.step(new Vt(e, t)), this;
4441
4441
  }
4442
4442
  /**
4443
4443
  Add a mark to the node at position `pos`.
@@ -4499,7 +4499,7 @@ class va {
4499
4499
  return jr(this, e, t, n), this;
4500
4500
  }
4501
4501
  }
4502
- const er = /* @__PURE__ */ Object.create(null);
4502
+ const Qn = /* @__PURE__ */ Object.create(null);
4503
4503
  class O {
4504
4504
  /**
4505
4505
  Initialize a selection with the head and anchor and ranges. If no
@@ -4635,7 +4635,7 @@ class O {
4635
4635
  static fromJSON(e, t) {
4636
4636
  if (!t || !t.type)
4637
4637
  throw new RangeError("Invalid input for Selection.fromJSON");
4638
- let n = er[t.type];
4638
+ let n = Qn[t.type];
4639
4639
  if (!n)
4640
4640
  throw new RangeError(`No selection type ${t.type} defined`);
4641
4641
  return n.fromJSON(e, t);
@@ -4647,9 +4647,9 @@ class O {
4647
4647
  clash with classes from other modules.
4648
4648
  */
4649
4649
  static jsonID(e, t) {
4650
- if (e in er)
4650
+ if (e in Qn)
4651
4651
  throw new RangeError("Duplicate use of selection JSON ID " + e);
4652
- return er[e] = t, t.prototype.jsonID = e, t;
4652
+ return Qn[e] = t, t.prototype.jsonID = e, t;
4653
4653
  }
4654
4654
  /**
4655
4655
  Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
@@ -4708,7 +4708,7 @@ class M extends O {
4708
4708
  return e instanceof M && e.anchor == this.anchor && e.head == this.head;
4709
4709
  }
4710
4710
  getBookmark() {
4711
- return new $n(this.anchor, this.head);
4711
+ return new zn(this.anchor, this.head);
4712
4712
  }
4713
4713
  toJSON() {
4714
4714
  return { type: "text", anchor: this.anchor, head: this.head };
@@ -4749,12 +4749,12 @@ class M extends O {
4749
4749
  }
4750
4750
  }
4751
4751
  O.jsonID("text", M);
4752
- class $n {
4752
+ class zn {
4753
4753
  constructor(e, t) {
4754
4754
  this.anchor = e, this.head = t;
4755
4755
  }
4756
4756
  map(e) {
4757
- return new $n(e.map(this.anchor), e.map(this.head));
4757
+ return new zn(e.map(this.anchor), e.map(this.head));
4758
4758
  }
4759
4759
  resolve(e) {
4760
4760
  return M.between(e.resolve(this.anchor), e.resolve(this.head));
@@ -4815,7 +4815,7 @@ class Kr {
4815
4815
  }
4816
4816
  map(e) {
4817
4817
  let { deleted: t, pos: n } = e.mapResult(this.anchor);
4818
- return t ? new $n(n, n) : new Kr(n);
4818
+ return t ? new zn(n, n) : new Kr(n);
4819
4819
  }
4820
4820
  resolve(e) {
4821
4821
  let t = e.resolve(this.anchor), n = t.nodeAfter;
@@ -5049,13 +5049,13 @@ class Ra extends va {
5049
5049
  function Ii(r, e) {
5050
5050
  return !e || !r ? r : r.bind(e);
5051
5051
  }
5052
- class Rt {
5052
+ class Dt {
5053
5053
  constructor(e, t, n) {
5054
5054
  this.name = e, this.init = Ii(t.init, n), this.apply = Ii(t.apply, n);
5055
5055
  }
5056
5056
  }
5057
5057
  const Pa = [
5058
- new Rt("doc", {
5058
+ new Dt("doc", {
5059
5059
  init(r) {
5060
5060
  return r.doc || r.schema.topNodeType.createAndFill();
5061
5061
  },
@@ -5063,7 +5063,7 @@ const Pa = [
5063
5063
  return r.doc;
5064
5064
  }
5065
5065
  }),
5066
- new Rt("selection", {
5066
+ new Dt("selection", {
5067
5067
  init(r, e) {
5068
5068
  return r.selection || O.atStart(e.doc);
5069
5069
  },
@@ -5071,7 +5071,7 @@ const Pa = [
5071
5071
  return r.selection;
5072
5072
  }
5073
5073
  }),
5074
- new Rt("storedMarks", {
5074
+ new Dt("storedMarks", {
5075
5075
  init(r) {
5076
5076
  return r.storedMarks || null;
5077
5077
  },
@@ -5079,7 +5079,7 @@ const Pa = [
5079
5079
  return n.selection.$cursor ? r.storedMarks : null;
5080
5080
  }
5081
5081
  }),
5082
- new Rt("scrollToSelection", {
5082
+ new Dt("scrollToSelection", {
5083
5083
  init() {
5084
5084
  return 0;
5085
5085
  },
@@ -5088,12 +5088,12 @@ const Pa = [
5088
5088
  }
5089
5089
  })
5090
5090
  ];
5091
- class tr {
5091
+ class er {
5092
5092
  constructor(e, t) {
5093
5093
  this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Pa.slice(), t && t.forEach((n) => {
5094
5094
  if (this.pluginsByKey[n.key])
5095
5095
  throw new RangeError("Adding different instances of a keyed plugin (" + n.key + ")");
5096
- this.plugins.push(n), this.pluginsByKey[n.key] = n, n.spec.state && this.fields.push(new Rt(n.key, n.spec.state, n));
5096
+ this.plugins.push(n), this.pluginsByKey[n.key] = n, n.spec.state && this.fields.push(new Dt(n.key, n.spec.state, n));
5097
5097
  });
5098
5098
  }
5099
5099
  }
@@ -5189,7 +5189,7 @@ class mt {
5189
5189
  Create a new state.
5190
5190
  */
5191
5191
  static create(e) {
5192
- let t = new tr(e.doc ? e.doc.type.schema : e.schema, e.plugins), n = new mt(t);
5192
+ let t = new er(e.doc ? e.doc.type.schema : e.schema, e.plugins), n = new mt(t);
5193
5193
  for (let i = 0; i < t.fields.length; i++)
5194
5194
  n[t.fields[i].name] = t.fields[i].init(e, n);
5195
5195
  return n;
@@ -5203,7 +5203,7 @@ class mt {
5203
5203
  configuration object..
5204
5204
  */
5205
5205
  reconfigure(e) {
5206
- let t = new tr(this.schema, e.plugins), n = t.fields, i = new mt(t);
5206
+ let t = new er(this.schema, e.plugins), n = t.fields, i = new mt(t);
5207
5207
  for (let s = 0; s < n.length; s++) {
5208
5208
  let o = n[s].name;
5209
5209
  i[o] = this.hasOwnProperty(o) ? this[o] : n[s].init(e, i);
@@ -5240,7 +5240,7 @@ class mt {
5240
5240
  throw new RangeError("Invalid input for EditorState.fromJSON");
5241
5241
  if (!e.schema)
5242
5242
  throw new RangeError("Required config field 'schema' missing");
5243
- let i = new tr(e.schema, e.plugins), s = new mt(i);
5243
+ let i = new er(e.schema, e.plugins), s = new mt(i);
5244
5244
  return i.fields.forEach((o) => {
5245
5245
  if (o.name == "doc")
5246
5246
  s.doc = ze.fromJSON(e.schema, t.doc);
@@ -5283,9 +5283,9 @@ class oe {
5283
5283
  return e[this.key];
5284
5284
  }
5285
5285
  }
5286
- const nr = /* @__PURE__ */ Object.create(null);
5286
+ const tr = /* @__PURE__ */ Object.create(null);
5287
5287
  function co(r) {
5288
- return r in nr ? r + "$" + ++nr[r] : (nr[r] = 0, r + "$");
5288
+ return r in tr ? r + "$" + ++tr[r] : (tr[r] = 0, r + "$");
5289
5289
  }
5290
5290
  class we {
5291
5291
  /**
@@ -5312,7 +5312,7 @@ const K = function(r) {
5312
5312
  for (var e = 0; ; e++)
5313
5313
  if (r = r.previousSibling, !r)
5314
5314
  return e;
5315
- }, Tt = function(r) {
5315
+ }, wt = function(r) {
5316
5316
  let e = r.assignedSlot || r.parentNode;
5317
5317
  return e && e.nodeType == 11 ? e.host : e;
5318
5318
  };
@@ -5394,7 +5394,7 @@ function nn(r) {
5394
5394
  ;
5395
5395
  return e && e.node && e.node.isBlock && (e.dom == r || e.contentDOM == r);
5396
5396
  }
5397
- const Fn = function(r) {
5397
+ const $n = function(r) {
5398
5398
  return r.focusNode && st(r.focusNode, r.focusOffset, r.anchorNode, r.anchorOffset);
5399
5399
  };
5400
5400
  function Ke(r, e) {
@@ -5423,7 +5423,7 @@ function Ha(r, e, t) {
5423
5423
  }
5424
5424
  const xe = typeof navigator < "u" ? navigator : null, Pi = typeof document < "u" ? document : null, je = xe && xe.userAgent || "", Tr = /Edge\/(\d+)/.exec(je), uo = /MSIE \d/.exec(je), Or = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(je), se = !!(uo || Or || Tr), Fe = uo ? document.documentMode : Or ? +Or[1] : Tr ? +Tr[1] : 0, pe = !se && /gecko\/(\d+)/i.test(je);
5425
5425
  pe && +(/Firefox\/(\d+)/.exec(je) || [0, 0])[1];
5426
- const Er = !se && /Chrome\/(\d+)/.exec(je), _ = !!Er, fo = Er ? +Er[1] : 0, Q = !se && !!xe && /Apple Computer/.test(xe.vendor), Ot = Q && (/Mobile\/\w+/.test(je) || !!xe && xe.maxTouchPoints > 2), ue = Ot || (xe ? /Mac/.test(xe.platform) : !1), ho = xe ? /Win/.test(xe.platform) : !1, Ee = /Android \d/.test(je), rn = !!Pi && "webkitFontSmoothing" in Pi.documentElement.style, Wa = rn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5426
+ const Er = !se && /Chrome\/(\d+)/.exec(je), _ = !!Er, fo = Er ? +Er[1] : 0, Q = !se && !!xe && /Apple Computer/.test(xe.vendor), Ct = Q && (/Mobile\/\w+/.test(je) || !!xe && xe.maxTouchPoints > 2), ue = Ct || (xe ? /Mac/.test(xe.platform) : !1), ho = xe ? /Win/.test(xe.platform) : !1, Ee = /Android \d/.test(je), rn = !!Pi && "webkitFontSmoothing" in Pi.documentElement.style, Wa = rn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5427
5427
  function qa(r) {
5428
5428
  let e = r.defaultView && r.defaultView.visualViewport;
5429
5429
  return e ? {
@@ -5454,7 +5454,7 @@ function Bi(r, e, t) {
5454
5454
  let n = r.someProp("scrollThreshold") || 0, i = r.someProp("scrollMargin") || 5, s = r.dom.ownerDocument;
5455
5455
  for (let o = t || r.dom; o; ) {
5456
5456
  if (o.nodeType != 1) {
5457
- o = Tt(o);
5457
+ o = wt(o);
5458
5458
  continue;
5459
5459
  }
5460
5460
  let l = o, a = l == s.body, c = a ? qa(s) : ja(l), d = 0, u = 0;
@@ -5470,7 +5470,7 @@ function Bi(r, e, t) {
5470
5470
  let f = a ? "fixed" : getComputedStyle(o).position;
5471
5471
  if (/^(fixed|sticky)$/.test(f))
5472
5472
  break;
5473
- o = f == "absolute" ? o.offsetParent : Tt(o);
5473
+ o = f == "absolute" ? o.offsetParent : wt(o);
5474
5474
  }
5475
5475
  }
5476
5476
  function Ja(r) {
@@ -5489,7 +5489,7 @@ function Ja(r) {
5489
5489
  }
5490
5490
  function po(r) {
5491
5491
  let e = [], t = r.ownerDocument;
5492
- for (let n = r; n && (e.push({ dom: n, top: n.scrollTop, left: n.scrollLeft }), r != t); n = Tt(n))
5492
+ for (let n = r; n && (e.push({ dom: n, top: n.scrollTop, left: n.scrollLeft }), r != t); n = wt(n))
5493
5493
  ;
5494
5494
  return e;
5495
5495
  }
@@ -5612,7 +5612,7 @@ function Za(r, e) {
5612
5612
  return null;
5613
5613
  }
5614
5614
  if (Q)
5615
- for (let c = o; n && c; c = Tt(c))
5615
+ for (let c = o; n && c; c = wt(c))
5616
5616
  c.draggable && (n = void 0);
5617
5617
  if (o = Ga(o, e), n) {
5618
5618
  if (pe && n.nodeType == 1 && (i = Math.min(i, n.childNodes.length), i < n.childNodes.length)) {
@@ -5649,31 +5649,31 @@ function bo(r, e, t) {
5649
5649
  if (c.top == a.top) {
5650
5650
  let d = ve(Te(n, i, i + 1), -1);
5651
5651
  if (d.top != a.top)
5652
- return Nt(d, d.left < c.left);
5652
+ return Et(d, d.left < c.left);
5653
5653
  }
5654
5654
  }
5655
5655
  return a;
5656
5656
  } else {
5657
5657
  let a = i, c = i, d = t < 0 ? 1 : -1;
5658
- return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == n.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, Nt(ve(Te(n, a, c), d), d < 0);
5658
+ return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == n.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, Et(ve(Te(n, a, c), d), d < 0);
5659
5659
  }
5660
5660
  if (!r.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
5661
5661
  if (s == null && i && (t < 0 || i == fe(n))) {
5662
5662
  let a = n.childNodes[i - 1];
5663
5663
  if (a.nodeType == 1)
5664
- return rr(a.getBoundingClientRect(), !1);
5664
+ return nr(a.getBoundingClientRect(), !1);
5665
5665
  }
5666
5666
  if (s == null && i < fe(n)) {
5667
5667
  let a = n.childNodes[i];
5668
5668
  if (a.nodeType == 1)
5669
- return rr(a.getBoundingClientRect(), !0);
5669
+ return nr(a.getBoundingClientRect(), !0);
5670
5670
  }
5671
- return rr(n.getBoundingClientRect(), t >= 0);
5671
+ return nr(n.getBoundingClientRect(), t >= 0);
5672
5672
  }
5673
5673
  if (s == null && i && (t < 0 || i == fe(n))) {
5674
5674
  let a = n.childNodes[i - 1], c = a.nodeType == 3 ? Te(a, fe(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
5675
5675
  if (c)
5676
- return Nt(ve(c, 1), !1);
5676
+ return Et(ve(c, 1), !1);
5677
5677
  }
5678
5678
  if (s == null && i < fe(n)) {
5679
5679
  let a = n.childNodes[i];
@@ -5681,17 +5681,17 @@ function bo(r, e, t) {
5681
5681
  a = a.nextSibling;
5682
5682
  let c = a ? a.nodeType == 3 ? Te(a, 0, o ? 0 : 1) : a.nodeType == 1 ? a : null : null;
5683
5683
  if (c)
5684
- return Nt(ve(c, -1), !0);
5684
+ return Et(ve(c, -1), !0);
5685
5685
  }
5686
- return Nt(ve(n.nodeType == 3 ? Te(n) : n, -t), t >= 0);
5686
+ return Et(ve(n.nodeType == 3 ? Te(n) : n, -t), t >= 0);
5687
5687
  }
5688
- function Nt(r, e) {
5688
+ function Et(r, e) {
5689
5689
  if (r.width == 0)
5690
5690
  return r;
5691
5691
  let t = e ? r.left : r.right;
5692
5692
  return { top: r.top, bottom: r.bottom, left: t, right: t };
5693
5693
  }
5694
- function rr(r, e) {
5694
+ function nr(r, e) {
5695
5695
  if (r.height == 0)
5696
5696
  return r;
5697
5697
  let t = e ? r.top : r.bottom;
@@ -6228,7 +6228,7 @@ class Ve extends sn {
6228
6228
  } else d || ({ dom: d, contentDOM: u } = ct.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
6229
6229
  !u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
6230
6230
  let f = d;
6231
- return d = Co(d, n, t), c ? a = new sc(e, t, n, i, d, u || null, f, c, s, o + 1) : t.isText ? new Vn(e, t, n, i, d, f, s) : new Ve(e, t, n, i, d, u || null, f, s, o + 1);
6231
+ return d = Co(d, n, t), c ? a = new sc(e, t, n, i, d, u || null, f, c, s, o + 1) : t.isText ? new Fn(e, t, n, i, d, f, s) : new Ve(e, t, n, i, d, u || null, f, s, o + 1);
6232
6232
  }
6233
6233
  parseRule() {
6234
6234
  if (this.node.type.spec.reparseInView)
@@ -6251,7 +6251,7 @@ class Ve extends sn {
6251
6251
  return e;
6252
6252
  }
6253
6253
  matchesNode(e, t, n) {
6254
- return this.dirty == me && e.eq(this.node) && Tn(t, this.outerDeco) && n.eq(this.innerDeco);
6254
+ return this.dirty == me && e.eq(this.node) && Cn(t, this.outerDeco) && n.eq(this.innerDeco);
6255
6255
  }
6256
6256
  get size() {
6257
6257
  return this.node.nodeSize;
@@ -6271,7 +6271,7 @@ class Ve extends sn {
6271
6271
  a.syncToMarks(c.marks, n, e, f);
6272
6272
  let h;
6273
6273
  a.findNodeMatch(c, d, u, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, h, e) || a.updateNextNode(c, d, u, e, f, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
6274
- }), a.syncToMarks([], n, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == _e) && (o && this.protectLocalComposition(e, o), Mo(this.contentDOM, this.children, e), Ot && uc(this.dom));
6274
+ }), a.syncToMarks([], n, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == _e) && (o && this.protectLocalComposition(e, o), Mo(this.contentDOM, this.children, e), Ct && uc(this.dom));
6275
6275
  }
6276
6276
  localCompositionInfo(e, t) {
6277
6277
  let { from: n, to: i } = e.state.selection;
@@ -6309,7 +6309,7 @@ class Ve extends sn {
6309
6309
  this.updateOuterDeco(t), this.node = e, this.innerDeco = n, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = me;
6310
6310
  }
6311
6311
  updateOuterDeco(e) {
6312
- if (Tn(e, this.outerDeco))
6312
+ if (Cn(e, this.outerDeco))
6313
6313
  return;
6314
6314
  let t = this.nodeDOM.nodeType != 1, n = this.dom;
6315
6315
  this.dom = wo(this.dom, this.nodeDOM, Ar(this.outerDeco, this.node, t), Ar(e, this.node, t)), this.dom != n && (n.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
@@ -6331,7 +6331,7 @@ function Hi(r, e, t, n, i) {
6331
6331
  let s = new Ve(void 0, r, e, t, n, n, n, i, 0);
6332
6332
  return s.contentDOM && s.updateChildren(i, 0), s;
6333
6333
  }
6334
- class Vn extends Ve {
6334
+ class Fn extends Ve {
6335
6335
  constructor(e, t, n, i, s, o, l) {
6336
6336
  super(e, t, n, i, s, null, o, l, 0);
6337
6337
  }
@@ -6362,7 +6362,7 @@ class Vn extends Ve {
6362
6362
  }
6363
6363
  slice(e, t, n) {
6364
6364
  let i = this.node.cut(e, t), s = document.createTextNode(i.text);
6365
- return new Vn(this.parent, i, this.outerDeco, this.innerDeco, s, s, n);
6365
+ return new Fn(this.parent, i, this.outerDeco, this.innerDeco, s, s, n);
6366
6366
  }
6367
6367
  markDirty(e, t) {
6368
6368
  super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty = Se);
@@ -6441,22 +6441,22 @@ function Mo(r, e, t) {
6441
6441
  n = Wi(n), i = !0;
6442
6442
  i && t.trackWrites == r && (t.trackWrites = null);
6443
6443
  }
6444
- const zt = function(r) {
6444
+ const Bt = function(r) {
6445
6445
  r && (this.nodeName = r);
6446
6446
  };
6447
- zt.prototype = /* @__PURE__ */ Object.create(null);
6448
- const Ge = [new zt()];
6447
+ Bt.prototype = /* @__PURE__ */ Object.create(null);
6448
+ const Ge = [new Bt()];
6449
6449
  function Ar(r, e, t) {
6450
6450
  if (r.length == 0)
6451
6451
  return Ge;
6452
- let n = t ? Ge[0] : new zt(), i = [n];
6452
+ let n = t ? Ge[0] : new Bt(), i = [n];
6453
6453
  for (let s = 0; s < r.length; s++) {
6454
6454
  let o = r[s].type.attrs;
6455
6455
  if (o) {
6456
- o.nodeName && i.push(n = new zt(o.nodeName));
6456
+ o.nodeName && i.push(n = new Bt(o.nodeName));
6457
6457
  for (let l in o) {
6458
6458
  let a = o[l];
6459
- a != null && (t && i.length == 1 && i.push(n = new zt(e.isInline ? "span" : "div")), l == "class" ? n.class = (n.class ? n.class + " " : "") + a : l == "style" ? n.style = (n.style ? n.style + ";" : "") + a : l != "nodeName" && (n[l] = a));
6459
+ a != null && (t && i.length == 1 && i.push(n = new Bt(e.isInline ? "span" : "div")), l == "class" ? n.class = (n.class ? n.class + " " : "") + a : l == "style" ? n.style = (n.style ? n.style + ";" : "") + a : l != "nodeName" && (n[l] = a));
6460
6460
  }
6461
6461
  }
6462
6462
  }
@@ -6501,7 +6501,7 @@ function oc(r, e, t) {
6501
6501
  function Co(r, e, t) {
6502
6502
  return wo(r, r, Ge, Ar(e, t, r.nodeType != 1));
6503
6503
  }
6504
- function Tn(r, e) {
6504
+ function Cn(r, e) {
6505
6505
  if (r.length != e.length)
6506
6506
  return !1;
6507
6507
  for (let t = 0; t < r.length; t++)
@@ -6604,7 +6604,7 @@ class lc {
6604
6604
  let c = this.preMatch.matched.get(a);
6605
6605
  if (c != null && c != s)
6606
6606
  return !1;
6607
- let d = a.dom, u, f = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Se && Tn(t, a.outerDeco));
6607
+ let d = a.dom, u, f = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Se && Cn(t, a.outerDeco));
6608
6608
  if (!f && a.update(e, t, n, i))
6609
6609
  return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
6610
6610
  if (!f && (u = this.recreateWrapper(a, e, t, n, i, o)))
@@ -6617,7 +6617,7 @@ class lc {
6617
6617
  // When a node with content is replaced by a different node with
6618
6618
  // identical content, move over its children.
6619
6619
  recreateWrapper(e, t, n, i, s, o) {
6620
- if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !Tn(n, e.outerDeco) || !i.eq(e.innerDeco))
6620
+ if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !Cn(n, e.outerDeco) || !i.eq(e.innerDeco))
6621
6621
  return null;
6622
6622
  let l = Ve.create(this.top, t, n, i, s, o);
6623
6623
  if (l.contentDOM) {
@@ -6648,7 +6648,7 @@ class lc {
6648
6648
  for (; e instanceof ot; )
6649
6649
  t = e, e = t.children[t.children.length - 1];
6650
6650
  (!e || // Empty textblock
6651
- !(e instanceof Vn) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Q || _) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
6651
+ !(e instanceof Fn) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Q || _) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
6652
6652
  }
6653
6653
  addHackNode(e, t) {
6654
6654
  if (t == this.top && this.index < t.children.length && t.children[this.index].matchesHack(e))
@@ -6788,7 +6788,7 @@ function _r(r, e = null) {
6788
6788
  if (o < 0)
6789
6789
  return null;
6790
6790
  let l = n.resolve(o), a, c;
6791
- if (Fn(t)) {
6791
+ if ($n(t)) {
6792
6792
  for (a = o; i && !i.node; )
6793
6793
  i = i.parent;
6794
6794
  let u = i.node;
@@ -6844,15 +6844,15 @@ const qi = Q || _ && fo < 63;
6844
6844
  function ji(r, e) {
6845
6845
  let { node: t, offset: n } = r.docView.domFromPos(e, 0), i = n < t.childNodes.length ? t.childNodes[n] : null, s = n ? t.childNodes[n - 1] : null;
6846
6846
  if (Q && i && i.contentEditable == "false")
6847
- return ir(i);
6847
+ return rr(i);
6848
6848
  if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
6849
6849
  if (i)
6850
- return ir(i);
6850
+ return rr(i);
6851
6851
  if (s)
6852
- return ir(s);
6852
+ return rr(s);
6853
6853
  }
6854
6854
  }
6855
- function ir(r) {
6855
+ function rr(r) {
6856
6856
  return r.contentEditable = "true", Q && r.draggable && (r.draggable = !1, r.wasDraggable = !0), r;
6857
6857
  }
6858
6858
  function Ji(r) {
@@ -6942,10 +6942,10 @@ function _i(r, e, t) {
6942
6942
  }
6943
6943
  }
6944
6944
  }
6945
- function On(r) {
6945
+ function Tn(r) {
6946
6946
  return r.nodeType == 3 ? r.nodeValue.length : r.childNodes.length;
6947
6947
  }
6948
- function $t(r, e) {
6948
+ function Lt(r, e) {
6949
6949
  let t = r.pmViewDesc;
6950
6950
  return t && t.size == 0 && (e < 0 || r.nextSibling || r.nodeName != "BR");
6951
6951
  }
@@ -6957,13 +6957,13 @@ function gc(r) {
6957
6957
  if (!t)
6958
6958
  return;
6959
6959
  let i, s, o = !1;
6960
- for (pe && t.nodeType == 1 && n < On(t) && $t(t.childNodes[n], -1) && (o = !0); ; )
6960
+ for (pe && t.nodeType == 1 && n < Tn(t) && Lt(t.childNodes[n], -1) && (o = !0); ; )
6961
6961
  if (n > 0) {
6962
6962
  if (t.nodeType != 1)
6963
6963
  break;
6964
6964
  {
6965
6965
  let l = t.childNodes[n - 1];
6966
- if ($t(l, -1))
6966
+ if (Lt(l, -1))
6967
6967
  i = t, s = --n;
6968
6968
  else if (l.nodeType == 3)
6969
6969
  t = l, n = t.nodeValue.length;
@@ -6975,10 +6975,10 @@ function gc(r) {
6975
6975
  break;
6976
6976
  {
6977
6977
  let l = t.previousSibling;
6978
- for (; l && $t(l, -1); )
6978
+ for (; l && Lt(l, -1); )
6979
6979
  i = t.parentNode, s = K(l), l = l.previousSibling;
6980
6980
  if (l)
6981
- t = l, n = On(t);
6981
+ t = l, n = Tn(t);
6982
6982
  else {
6983
6983
  if (t = t.parentNode, t == r.dom)
6984
6984
  break;
@@ -6992,13 +6992,13 @@ function yc(r) {
6992
6992
  let e = r.domSelectionRange(), t = e.focusNode, n = e.focusOffset;
6993
6993
  if (!t)
6994
6994
  return;
6995
- let i = On(t), s, o;
6995
+ let i = Tn(t), s, o;
6996
6996
  for (; ; )
6997
6997
  if (n < i) {
6998
6998
  if (t.nodeType != 1)
6999
6999
  break;
7000
7000
  let l = t.childNodes[n];
7001
- if ($t(l, 1))
7001
+ if (Lt(l, 1))
7002
7002
  s = t, o = ++n;
7003
7003
  else
7004
7004
  break;
@@ -7007,10 +7007,10 @@ function yc(r) {
7007
7007
  break;
7008
7008
  {
7009
7009
  let l = t.nextSibling;
7010
- for (; l && $t(l, 1); )
7010
+ for (; l && Lt(l, 1); )
7011
7011
  s = l.parentNode, o = K(l) + 1, l = l.nextSibling;
7012
7012
  if (l)
7013
- t = l, n = 0, i = On(t);
7013
+ t = l, n = 0, i = Tn(t);
7014
7014
  else {
7015
7015
  if (t = t.parentNode, t == r.dom)
7016
7016
  break;
@@ -7056,7 +7056,7 @@ function Dr(r, e, t) {
7056
7056
  let n = r.domSelection();
7057
7057
  if (!n)
7058
7058
  return;
7059
- if (Fn(n)) {
7059
+ if ($n(n)) {
7060
7060
  let s = document.createRange();
7061
7061
  s.setEnd(e, t), s.setStart(e, t), n.removeAllRanges(), n.addRange(s);
7062
7062
  } else n.extend && n.extend(e, t);
@@ -7308,10 +7308,10 @@ let es = null;
7308
7308
  function Po() {
7309
7309
  return es || (es = document.implementation.createHTMLDocument("title"));
7310
7310
  }
7311
- let sr = null;
7311
+ let ir = null;
7312
7312
  function Tc(r) {
7313
7313
  let e = window.trustedTypes;
7314
- return e ? (sr || (sr = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), sr.createHTML(r)) : r;
7314
+ return e ? (ir || (ir = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), ir.createHTML(r)) : r;
7315
7315
  }
7316
7316
  function Oc(r) {
7317
7317
  let e = /^(\s*<meta [^>]*>)*/.exec(r);
@@ -7399,7 +7399,7 @@ function Pc(r, e) {
7399
7399
  ne.keydown = (r, e) => {
7400
7400
  let t = e;
7401
7401
  if (r.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Lo(r, t) && (r.input.lastKeyCode = t.keyCode, r.input.lastKeyCodeTime = Date.now(), !(Ee && _ && t.keyCode == 13)))
7402
- if (t.keyCode != 229 && r.domObserver.forceFlush(), Ot && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
7402
+ if (t.keyCode != 229 && r.domObserver.forceFlush(), Ct && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
7403
7403
  let n = Date.now();
7404
7404
  r.input.lastIOSEnter = n, r.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
7405
7405
  r.input.lastIOSEnter == n && (r.someProp("handleKeyDown", (i) => i(r, Ke(13, "Enter"))), r.input.lastIOSEnter = 0);
@@ -7423,7 +7423,7 @@ ne.keypress = (r, e) => {
7423
7423
  !/[\r\n]/.test(i) && !r.someProp("handleTextInput", (o) => o(r, n.$from.pos, n.$to.pos, i, s)) && r.dispatch(s()), t.preventDefault();
7424
7424
  }
7425
7425
  };
7426
- function Hn(r) {
7426
+ function Vn(r) {
7427
7427
  return { left: r.clientX, top: r.clientY };
7428
7428
  }
7429
7429
  function Bc(r, e) {
@@ -7494,7 +7494,7 @@ function Hc(r, e, t) {
7494
7494
  }
7495
7495
  }
7496
7496
  function Qr(r) {
7497
- return En(r);
7497
+ return On(r);
7498
7498
  }
7499
7499
  const Bo = ue ? "metaKey" : "ctrlKey";
7500
7500
  te.mousedown = (r, e) => {
@@ -7502,7 +7502,7 @@ te.mousedown = (r, e) => {
7502
7502
  r.input.shiftKey = t.shiftKey;
7503
7503
  let n = Qr(r), i = Date.now(), s = "singleClick";
7504
7504
  i - r.input.lastClick.time < 500 && Bc(t, r.input.lastClick) && !t[Bo] && r.input.lastClick.button == t.button && (r.input.lastClick.type == "singleClick" ? s = "doubleClick" : r.input.lastClick.type == "doubleClick" && (s = "tripleClick")), r.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
7505
- let o = r.posAtCoords(Hn(t));
7505
+ let o = r.posAtCoords(Vn(t));
7506
7506
  o && (s == "singleClick" ? (r.input.mouseDown && r.input.mouseDown.done(), r.input.mouseDown = new Wc(r, o, t, !!n)) : (s == "doubleClick" ? Fc : Vc)(r, o.pos, o.inside, t) ? t.preventDefault() : Le(r, "pointer"));
7507
7507
  };
7508
7508
  class Wc {
@@ -7534,7 +7534,7 @@ class Wc {
7534
7534
  if (this.done(), !this.view.dom.contains(e.target))
7535
7535
  return;
7536
7536
  let t = this.pos;
7537
- this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Hn(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Le(this.view, "pointer") : $c(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
7537
+ this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Vn(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Le(this.view, "pointer") : $c(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
7538
7538
  Q && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
7539
7539
  // cursor, but still report that the node is selected
7540
7540
  // when asked through getSelection. You'll then get a
@@ -7567,8 +7567,8 @@ ne.compositionstart = ne.compositionupdate = (r) => {
7567
7567
  r.domObserver.flush();
7568
7568
  let { state: e } = r, t = e.selection.$to;
7569
7569
  if (e.selection instanceof M && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((n) => n.type.spec.inclusive === !1) || _ && ho && jc(r)))
7570
- r.markCursor = r.state.storedMarks || t.marks(), En(r, !0), r.markCursor = null;
7571
- else if (En(r, !e.selection.empty), pe && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
7570
+ r.markCursor = r.state.storedMarks || t.marks(), On(r, !0), r.markCursor = null;
7571
+ else if (On(r, !e.selection.empty), pe && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
7572
7572
  let n = r.domSelectionRange();
7573
7573
  for (let i = n.focusNode, s = n.focusOffset; i && i.nodeType == 1 && s != 0; ) {
7574
7574
  let o = s < 0 ? i.lastChild : i.childNodes[s - 1];
@@ -7597,7 +7597,7 @@ ne.compositionend = (r, e) => {
7597
7597
  r.composing && (r.input.composing = !1, r.input.compositionEndedAt = e.timeStamp, r.input.compositionPendingChanges = r.domObserver.pendingRecords().length ? r.input.compositionID : 0, r.input.compositionNode = null, r.input.badSafariComposition ? r.domObserver.forceFlush() : r.input.compositionPendingChanges && Promise.resolve().then(() => r.domObserver.flush()), r.input.compositionID++, zo(r, 20));
7598
7598
  };
7599
7599
  function zo(r, e) {
7600
- clearTimeout(r.input.composingTimeout), e > -1 && (r.input.composingTimeout = setTimeout(() => En(r), e));
7600
+ clearTimeout(r.input.composingTimeout), e > -1 && (r.input.composingTimeout = setTimeout(() => On(r), e));
7601
7601
  }
7602
7602
  function $o(r) {
7603
7603
  for (r.composing && (r.input.composing = !1, r.input.compositionEndedAt = Kc()); r.input.compositionNodes.length > 0; )
@@ -7626,7 +7626,7 @@ function Kc() {
7626
7626
  let r = document.createEvent("Event");
7627
7627
  return r.initEvent("event", !0, !0), r.timeStamp;
7628
7628
  }
7629
- function En(r, e = !1) {
7629
+ function On(r, e = !1) {
7630
7630
  if (!(Ee && r.domObserver.flushingSoon >= 0)) {
7631
7631
  if (r.domObserver.forceFlush(), $o(r), e || r.docView && r.docView.dirty) {
7632
7632
  let t = _r(r), n = r.state.selection;
@@ -7645,12 +7645,12 @@ function Uc(r, e) {
7645
7645
  t.parentNode && t.parentNode.removeChild(t), r.focus();
7646
7646
  }, 50);
7647
7647
  }
7648
- const qt = se && Fe < 15 || Ot && Wa < 604;
7648
+ const Ht = se && Fe < 15 || Ct && Wa < 604;
7649
7649
  te.copy = ne.cut = (r, e) => {
7650
7650
  let t = e, n = r.state.selection, i = t.type == "cut";
7651
7651
  if (n.empty)
7652
7652
  return;
7653
- let s = qt ? null : t.clipboardData, o = n.content(), { dom: l, text: a } = Yr(r, o);
7653
+ let s = Ht ? null : t.clipboardData, o = n.content(), { dom: l, text: a } = Yr(r, o);
7654
7654
  s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Uc(r, l), i && r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
7655
7655
  };
7656
7656
  function _c(r) {
@@ -7663,10 +7663,10 @@ function Gc(r, e) {
7663
7663
  t || (n.contentEditable = "true"), n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus();
7664
7664
  let i = r.input.shiftKey && r.input.lastKeyCode != 45;
7665
7665
  setTimeout(() => {
7666
- r.focus(), n.parentNode && n.parentNode.removeChild(n), t ? jt(r, n.value, null, i, e) : jt(r, n.textContent, n.innerHTML, i, e);
7666
+ r.focus(), n.parentNode && n.parentNode.removeChild(n), t ? Wt(r, n.value, null, i, e) : Wt(r, n.textContent, n.innerHTML, i, e);
7667
7667
  }, 50);
7668
7668
  }
7669
- function jt(r, e, t, n, i) {
7669
+ function Wt(r, e, t, n, i) {
7670
7670
  let s = No(r, e, t, n, r.state.selection.$from);
7671
7671
  if (r.someProp("handlePaste", (a) => a(r, i, s || k.empty)))
7672
7672
  return !0;
@@ -7686,8 +7686,8 @@ ne.paste = (r, e) => {
7686
7686
  let t = e;
7687
7687
  if (r.composing && !Ee)
7688
7688
  return;
7689
- let n = qt ? null : t.clipboardData, i = r.input.shiftKey && r.input.lastKeyCode != 45;
7690
- n && jt(r, Fo(n), n.getData("text/html"), i, t) ? t.preventDefault() : Gc(r, t);
7689
+ let n = Ht ? null : t.clipboardData, i = r.input.shiftKey && r.input.lastKeyCode != 45;
7690
+ n && Wt(r, Fo(n), n.getData("text/html"), i, t) ? t.preventDefault() : Gc(r, t);
7691
7691
  };
7692
7692
  class Vo {
7693
7693
  constructor(e, t, n) {
@@ -7705,7 +7705,7 @@ te.dragstart = (r, e) => {
7705
7705
  let t = e, n = r.input.mouseDown;
7706
7706
  if (n && n.done(), !t.dataTransfer)
7707
7707
  return;
7708
- let i = r.state.selection, s = i.empty ? null : r.posAtCoords(Hn(t)), o;
7708
+ let i = r.state.selection, s = i.empty ? null : r.posAtCoords(Vn(t)), o;
7709
7709
  if (!(s && s.pos >= i.from && s.pos <= (i instanceof S ? i.to - 1 : i.to))) {
7710
7710
  if (n && n.mightDrag)
7711
7711
  o = S.create(r.state.doc, n.mightDrag.pos);
@@ -7715,7 +7715,7 @@ te.dragstart = (r, e) => {
7715
7715
  }
7716
7716
  }
7717
7717
  let l = (o || r.state.selection).content(), { dom: a, text: c, slice: d } = Yr(r, l);
7718
- (!t.dataTransfer.files.length || !_ || fo > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(qt ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", qt || t.dataTransfer.setData("text/plain", c), r.dragging = new Vo(d, Ho(r, t), o);
7718
+ (!t.dataTransfer.files.length || !_ || fo > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Ht ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Ht || t.dataTransfer.setData("text/plain", c), r.dragging = new Vo(d, Ho(r, t), o);
7719
7719
  };
7720
7720
  te.dragend = (r) => {
7721
7721
  let e = r.dragging;
@@ -7734,13 +7734,13 @@ ne.drop = (r, e) => {
7734
7734
  function Xc(r, e, t) {
7735
7735
  if (!e.dataTransfer)
7736
7736
  return;
7737
- let n = r.posAtCoords(Hn(e));
7737
+ let n = r.posAtCoords(Vn(e));
7738
7738
  if (!n)
7739
7739
  return;
7740
7740
  let i = r.state.doc.resolve(n.pos), s = t && t.slice;
7741
7741
  s ? r.someProp("transformPasted", (h) => {
7742
7742
  s = h(s, r, !1);
7743
- }) : s = No(r, Fo(e.dataTransfer), qt ? null : e.dataTransfer.getData("text/html"), !1, i);
7743
+ }) : s = No(r, Fo(e.dataTransfer), Ht ? null : e.dataTransfer.getData("text/html"), !1, i);
7744
7744
  let o = !!(t && Ho(r, e));
7745
7745
  if (r.someProp("handleDrop", (h) => h(r, e, s || k.empty, o))) {
7746
7746
  e.preventDefault();
@@ -7791,7 +7791,7 @@ te.beforeinput = (r, e) => {
7791
7791
  };
7792
7792
  for (let r in ne)
7793
7793
  te[r] = ne[r];
7794
- function Jt(r, e) {
7794
+ function qt(r, e) {
7795
7795
  if (r == e)
7796
7796
  return !0;
7797
7797
  for (let t in r)
@@ -7802,7 +7802,7 @@ function Jt(r, e) {
7802
7802
  return !1;
7803
7803
  return !0;
7804
7804
  }
7805
- class An {
7805
+ class En {
7806
7806
  constructor(e, t) {
7807
7807
  this.toDOM = e, this.spec = t || et, this.side = this.spec.side || 0;
7808
7808
  }
@@ -7814,7 +7814,7 @@ class An {
7814
7814
  return !0;
7815
7815
  }
7816
7816
  eq(e) {
7817
- return this == e || e instanceof An && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Jt(this.spec, e.spec));
7817
+ return this == e || e instanceof En && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && qt(this.spec, e.spec));
7818
7818
  }
7819
7819
  destroy(e) {
7820
7820
  this.spec.destroy && this.spec.destroy(e);
@@ -7832,7 +7832,7 @@ class He {
7832
7832
  return t.from < t.to;
7833
7833
  }
7834
7834
  eq(e) {
7835
- return this == e || e instanceof He && Jt(this.attrs, e.attrs) && Jt(this.spec, e.spec);
7835
+ return this == e || e instanceof He && qt(this.attrs, e.attrs) && qt(this.spec, e.spec);
7836
7836
  }
7837
7837
  static is(e) {
7838
7838
  return e.type instanceof He;
@@ -7856,7 +7856,7 @@ class ei {
7856
7856
  return i == t.from && !(s = e.child(n)).isText && i + s.nodeSize == t.to;
7857
7857
  }
7858
7858
  eq(e) {
7859
- return this == e || e instanceof ei && Jt(this.attrs, e.attrs) && Jt(this.spec, e.spec);
7859
+ return this == e || e instanceof ei && qt(this.attrs, e.attrs) && qt(this.spec, e.spec);
7860
7860
  }
7861
7861
  destroy() {
7862
7862
  }
@@ -7895,7 +7895,7 @@ class he {
7895
7895
  widget's current document position.
7896
7896
  */
7897
7897
  static widget(e, t, n) {
7898
- return new he(e, e, new An(t, n));
7898
+ return new he(e, e, new En(t, n));
7899
7899
  }
7900
7900
  /**
7901
7901
  Creates an inline decoration, which adds the given attributes to
@@ -7929,7 +7929,7 @@ class he {
7929
7929
  @internal
7930
7930
  */
7931
7931
  get widget() {
7932
- return this.type instanceof An;
7932
+ return this.type instanceof En;
7933
7933
  }
7934
7934
  }
7935
7935
  const pt = [], et = {};
@@ -7946,7 +7946,7 @@ class V {
7946
7946
  you must make a copy if you want need to preserve that.
7947
7947
  */
7948
7948
  static create(e, t) {
7949
- return t.length ? Nn(t, e, 0, et) : Z;
7949
+ return t.length ? An(t, e, 0, et) : Z;
7950
7950
  }
7951
7951
  /**
7952
7952
  Find all decorations in this set which touch the given range
@@ -8005,7 +8005,7 @@ class V {
8005
8005
  if (d = qo(t, l, c)) {
8006
8006
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
8007
8007
  s += 3;
8008
- i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Nn(d, l, c + 1, et)), s += 3;
8008
+ i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, An(d, l, c + 1, et)), s += 3;
8009
8009
  }
8010
8010
  });
8011
8011
  let o = Wo(s ? jo(t) : t, -n);
@@ -8201,7 +8201,7 @@ function Zc(r, e, t, n, i, s, o) {
8201
8201
  a = !0;
8202
8202
  }
8203
8203
  if (a) {
8204
- let c = Qc(l, r, e, t, i, s, o), d = Nn(c, n, 0, o);
8204
+ let c = Qc(l, r, e, t, i, s, o), d = An(c, n, 0, o);
8205
8205
  e = d.local;
8206
8206
  for (let u = 0; u < l.length; u += 3)
8207
8207
  l[u + 1] < 0 && (l.splice(u, 3), u -= 3);
@@ -8251,13 +8251,13 @@ function jo(r) {
8251
8251
  r[t] != null && e.push(r[t]);
8252
8252
  return e;
8253
8253
  }
8254
- function Nn(r, e, t, n) {
8254
+ function An(r, e, t, n) {
8255
8255
  let i = [], s = !1;
8256
8256
  e.forEach((l, a) => {
8257
8257
  let c = qo(r, l, a + t);
8258
8258
  if (c) {
8259
8259
  s = !0;
8260
- let d = Nn(c, l, t + a + 1, n);
8260
+ let d = An(c, l, t + a + 1, n);
8261
8261
  d != Z && i.push(a, a + l.nodeSize, d);
8262
8262
  }
8263
8263
  });
@@ -8292,7 +8292,7 @@ function ts(r, e, t) {
8292
8292
  e++;
8293
8293
  r.splice(e, 0, t);
8294
8294
  }
8295
- function or(r) {
8295
+ function sr(r) {
8296
8296
  let e = [];
8297
8297
  return r.someProp("decorations", (t) => {
8298
8298
  let n = t(r.state);
@@ -8382,9 +8382,9 @@ class rd {
8382
8382
  if (!e.focusNode)
8383
8383
  return !0;
8384
8384
  let t = /* @__PURE__ */ new Set(), n;
8385
- for (let s = e.focusNode; s; s = Tt(s))
8385
+ for (let s = e.focusNode; s; s = wt(s))
8386
8386
  t.add(s);
8387
- for (let s = e.anchorNode; s; s = Tt(s))
8387
+ for (let s = e.anchorNode; s; s = wt(s))
8388
8388
  if (t.has(s)) {
8389
8389
  n = s;
8390
8390
  break;
@@ -8440,7 +8440,7 @@ class rd {
8440
8440
  }
8441
8441
  }
8442
8442
  let c = null;
8443
- s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Fn(n) && (c = _r(e)) && c.eq(O.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ne(e), this.currentSelection.set(n), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), id(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, ld(e, a)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || Ne(e), this.currentSelection.set(n));
8443
+ s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && $n(n) && (c = _r(e)) && c.eq(O.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ne(e), this.currentSelection.set(n), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), id(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, ld(e, a)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || Ne(e), this.currentSelection.set(n));
8444
8444
  }
8445
8445
  registerMutation(e, t) {
8446
8446
  if (t.indexOf(e.target) > -1)
@@ -8530,7 +8530,7 @@ function ld(r, e) {
8530
8530
  }
8531
8531
  function ad(r, e, t) {
8532
8532
  let { node: n, fromOffset: i, toOffset: s, from: o, to: l } = r.docView.parseRange(e, t), a = r.domSelectionRange(), c, d = a.anchorNode;
8533
- if (d && r.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Fn(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), _ && r.input.lastKeyCode === 8)
8533
+ if (d && r.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], $n(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), _ && r.input.lastKeyCode === 8)
8534
8534
  for (let g = s; g > i; g--) {
8535
8535
  let y = n.childNodes[g - 1], T = y.pmViewDesc;
8536
8536
  if (y.nodeName == "BR" && !T) {
@@ -8589,7 +8589,7 @@ function ud(r, e, t, n, i) {
8589
8589
  let a = r.state.selection, c = ad(r, e, t), d = r.state.doc, u = d.slice(c.from, c.to), f, h;
8590
8590
  r.input.lastKeyCode === 8 && Date.now() - 100 < r.input.lastKeyCodeTime ? (f = r.state.selection.to, h = "end") : (f = r.state.selection.from, h = "start"), r.input.lastKeyCode = null;
8591
8591
  let p = pd(u.content, c.doc.content, c.from, f, h);
8592
- if (p && r.input.domChangeCount++, (Ot && r.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((C) => C.nodeType == 1 && !dd.test(C.nodeName)) && (!p || p.endA >= p.endB) && r.someProp("handleKeyDown", (C) => C(r, Ke(13, "Enter")))) {
8592
+ if (p && r.input.domChangeCount++, (Ct && r.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((C) => C.nodeType == 1 && !dd.test(C.nodeName)) && (!p || p.endA >= p.endB) && r.someProp("handleKeyDown", (C) => C(r, Ke(13, "Enter")))) {
8593
8593
  r.input.lastIOSEnter = 0;
8594
8594
  return;
8595
8595
  }
@@ -8608,7 +8608,7 @@ function ud(r, e, t, n, i) {
8608
8608
  }
8609
8609
  r.state.selection.from < r.state.selection.to && p.start == p.endB && r.state.selection instanceof M && (p.start > r.state.selection.from && p.start <= r.state.selection.from + 2 && r.state.selection.from >= c.from ? p.start = r.state.selection.from : p.endA < r.state.selection.to && p.endA >= r.state.selection.to - 2 && r.state.selection.to <= c.to && (p.endB += r.state.selection.to - p.endA, p.endA = r.state.selection.to)), se && Fe <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
8610
8610
  let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start), T = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA;
8611
- if ((Ot && r.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !T && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && r.someProp("handleKeyDown", (C) => C(r, Ke(13, "Enter")))) {
8611
+ if ((Ct && r.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !T && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && r.someProp("handleKeyDown", (C) => C(r, Ke(13, "Enter")))) {
8612
8612
  r.input.lastIOSEnter = 0;
8613
8613
  return;
8614
8614
  }
@@ -8673,7 +8673,7 @@ function hd(r, e, t, n, i) {
8673
8673
  if (
8674
8674
  // The content must have shrunk
8675
8675
  t - e <= i.pos - n.pos || // newEnd must point directly at or after the end of the block that newStart points into
8676
- lr(n, !0, !1) < i.pos
8676
+ or(n, !0, !1) < i.pos
8677
8677
  )
8678
8678
  return !1;
8679
8679
  let s = r.resolve(e);
@@ -8683,10 +8683,10 @@ function hd(r, e, t, n, i) {
8683
8683
  }
8684
8684
  if (s.parentOffset < s.parent.content.size || !s.parent.isTextblock)
8685
8685
  return !1;
8686
- let o = r.resolve(lr(s, !0, !0));
8687
- return !o.parent.isTextblock || o.pos > t || lr(o, !0, !1) < t ? !1 : n.parent.content.cut(n.parentOffset).eq(o.parent.content);
8686
+ let o = r.resolve(or(s, !0, !0));
8687
+ return !o.parent.isTextblock || o.pos > t || or(o, !0, !1) < t ? !1 : n.parent.content.cut(n.parentOffset).eq(o.parent.content);
8688
8688
  }
8689
- function lr(r, e, t) {
8689
+ function or(r, e, t) {
8690
8690
  let n = r.depth, i = e ? r.end() : r.pos;
8691
8691
  for (; n > 0 && (e || r.indexAfter(n) == r.node(n).childCount); )
8692
8692
  n--, i++, e = !1;
@@ -8730,7 +8730,7 @@ class Jo {
8730
8730
  added to the document.
8731
8731
  */
8732
8732
  constructor(e, t) {
8733
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new vc(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(fs), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = ds(this), cs(this), this.nodeViews = us(this), this.docView = Hi(this.state.doc, as(this), or(this), this.dom, this), this.domObserver = new rd(this, (n, i, s, o) => ud(this, n, i, s, o)), this.domObserver.start(), Dc(this), this.updatePluginViews();
8733
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new vc(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(fs), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = ds(this), cs(this), this.nodeViews = us(this), this.docView = Hi(this.state.doc, as(this), sr(this), this.dom, this), this.domObserver = new rd(this, (n, i, s, o) => ud(this, n, i, s, o)), this.domObserver.start(), Dc(this), this.updatePluginViews();
8734
8734
  }
8735
8735
  /**
8736
8736
  Holds `true` when a
@@ -8793,7 +8793,7 @@ class Jo {
8793
8793
  gd(h, this.nodeViews) && (this.nodeViews = h, s = !0);
8794
8794
  }
8795
8795
  (l || t.handleDOMEvents != this._props.handleDOMEvents) && Rr(this), this.editable = ds(this), cs(this);
8796
- let a = or(this), c = as(this), d = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", u = s || !this.docView.matchesNode(e.doc, c, a);
8796
+ let a = sr(this), c = as(this), d = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", u = s || !this.docView.matchesNode(e.doc, c, a);
8797
8797
  (u || !e.selection.eq(i.selection)) && (o = !0);
8798
8798
  let f = d == "preserve" && o && this.dom.style.overflowAnchor == null && Ja(this);
8799
8799
  if (o) {
@@ -8999,13 +8999,13 @@ class Jo {
8999
8999
  [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
9000
9000
  */
9001
9001
  pasteHTML(e, t) {
9002
- return jt(this, "", e, !1, t || new ClipboardEvent("paste"));
9002
+ return Wt(this, "", e, !1, t || new ClipboardEvent("paste"));
9003
9003
  }
9004
9004
  /**
9005
9005
  Run the editor's paste logic with the given plain-text input.
9006
9006
  */
9007
9007
  pasteText(e, t) {
9008
- return jt(this, e, null, !0, t || new ClipboardEvent("paste"));
9008
+ return Wt(this, e, null, !0, t || new ClipboardEvent("paste"));
9009
9009
  }
9010
9010
  /**
9011
9011
  Serialize the given slice as it would be if it was copied from
@@ -9023,7 +9023,7 @@ class Jo {
9023
9023
  views](https://prosemirror.net/docs/ref/#view.NodeView).
9024
9024
  */
9025
9025
  destroy() {
9026
- this.docView && (Ic(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], or(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Ba());
9026
+ this.docView && (Ic(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], sr(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Ba());
9027
9027
  }
9028
9028
  /**
9029
9029
  This is true when the view has been
@@ -9155,7 +9155,7 @@ var We = {
9155
9155
  220: "\\",
9156
9156
  221: "]",
9157
9157
  222: "'"
9158
- }, vn = {
9158
+ }, Nn = {
9159
9159
  48: ")",
9160
9160
  49: "!",
9161
9161
  50: "@",
@@ -9184,10 +9184,10 @@ var We = {
9184
9184
  for (var U = 0; U < 10; U++) We[48 + U] = We[96 + U] = String(U);
9185
9185
  for (var U = 1; U <= 24; U++) We[U + 111] = "F" + U;
9186
9186
  for (var U = 65; U <= 90; U++)
9187
- We[U] = String.fromCharCode(U + 32), vn[U] = String.fromCharCode(U);
9188
- for (var ar in We) vn.hasOwnProperty(ar) || (vn[ar] = We[ar]);
9187
+ We[U] = String.fromCharCode(U + 32), Nn[U] = String.fromCharCode(U);
9188
+ for (var lr in We) Nn.hasOwnProperty(lr) || (Nn[lr] = We[lr]);
9189
9189
  function kd(r) {
9190
- var e = yd && r.metaKey && r.shiftKey && !r.ctrlKey && !r.altKey || bd && r.shiftKey && r.key && r.key.length == 1 || r.key == "Unidentified", t = !e && r.key || (r.shiftKey ? vn : We)[r.keyCode] || r.key || "Unidentified";
9190
+ var e = yd && r.metaKey && r.shiftKey && !r.ctrlKey && !r.altKey || bd && r.shiftKey && r.key && r.key.length == 1 || r.key == "Unidentified", t = !e && r.key || (r.shiftKey ? Nn : We)[r.keyCode] || r.key || "Unidentified";
9191
9191
  return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
9192
9192
  }
9193
9193
  const xd = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), Sd = typeof navigator < "u" && /Win/.test(navigator.platform);
@@ -9218,7 +9218,7 @@ function wd(r) {
9218
9218
  e[Md(t)] = r[t];
9219
9219
  return e;
9220
9220
  }
9221
- function cr(r, e, t = !0) {
9221
+ function ar(r, e, t = !0) {
9222
9222
  return e.altKey && (r = "Alt-" + r), e.ctrlKey && (r = "Ctrl-" + r), e.metaKey && (r = "Meta-" + r), t && e.shiftKey && (r = "Shift-" + r), r;
9223
9223
  }
9224
9224
  function Cd(r) {
@@ -9227,18 +9227,18 @@ function Cd(r) {
9227
9227
  function Ko(r) {
9228
9228
  let e = wd(r);
9229
9229
  return function(t, n) {
9230
- let i = kd(n), s, o = e[cr(i, n)];
9230
+ let i = kd(n), s, o = e[ar(i, n)];
9231
9231
  if (o && o(t.state, t.dispatch, t))
9232
9232
  return !0;
9233
9233
  if (i.length == 1 && i != " ") {
9234
9234
  if (n.shiftKey) {
9235
- let l = e[cr(i, n, !1)];
9235
+ let l = e[ar(i, n, !1)];
9236
9236
  if (l && l(t.state, t.dispatch, t))
9237
9237
  return !0;
9238
9238
  }
9239
9239
  if ((n.altKey || n.metaKey || n.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
9240
9240
  !(Sd && n.ctrlKey && n.altKey) && (s = We[n.keyCode]) && s != i) {
9241
- let l = e[cr(s, n)];
9241
+ let l = e[ar(s, n)];
9242
9242
  if (l && l(t.state, t.dispatch, t))
9243
9243
  return !0;
9244
9244
  }
@@ -9257,19 +9257,19 @@ const _o = (r, e, t) => {
9257
9257
  return !1;
9258
9258
  let i = ri(n);
9259
9259
  if (!i) {
9260
- let o = n.blockRange(), l = o && At(o);
9260
+ let o = n.blockRange(), l = o && Ot(o);
9261
9261
  return l == null ? !1 : (e && e(r.tr.lift(o, l).scrollIntoView()), !0);
9262
9262
  }
9263
9263
  let s = i.nodeBefore;
9264
9264
  if (rl(r, i, e, -1))
9265
9265
  return !0;
9266
- if (n.parent.content.size == 0 && (Et(s, "end") || S.isSelectable(s)))
9266
+ if (n.parent.content.size == 0 && (Tt(s, "end") || S.isSelectable(s)))
9267
9267
  for (let o = n.depth; ; o--) {
9268
- let l = zn(r.doc, n.before(o), n.after(o), k.empty);
9268
+ let l = Ln(r.doc, n.before(o), n.after(o), k.empty);
9269
9269
  if (l && l.slice.size < l.to - l.from) {
9270
9270
  if (e) {
9271
9271
  let a = r.tr.step(l);
9272
- a.setSelection(Et(s, "end") ? O.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
9272
+ a.setSelection(Tt(s, "end") ? O.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
9273
9273
  }
9274
9274
  return !0;
9275
9275
  }
@@ -9309,7 +9309,7 @@ function Go(r, e, t) {
9309
9309
  return !1;
9310
9310
  l = d;
9311
9311
  }
9312
- let c = zn(r.doc, s, a, k.empty);
9312
+ let c = Ln(r.doc, s, a, k.empty);
9313
9313
  if (!c || c.from != s || c instanceof L && c.slice.size >= a - s)
9314
9314
  return !1;
9315
9315
  if (t) {
@@ -9318,7 +9318,7 @@ function Go(r, e, t) {
9318
9318
  }
9319
9319
  return !0;
9320
9320
  }
9321
- function Et(r, e, t = !1) {
9321
+ function Tt(r, e, t = !1) {
9322
9322
  for (let n = r; n; n = e == "start" ? n.firstChild : n.lastChild) {
9323
9323
  if (n.isTextblock)
9324
9324
  return !0;
@@ -9363,12 +9363,12 @@ const Zo = (r, e, t) => {
9363
9363
  let s = i.nodeAfter;
9364
9364
  if (rl(r, i, e, 1))
9365
9365
  return !0;
9366
- if (n.parent.content.size == 0 && (Et(s, "start") || S.isSelectable(s))) {
9367
- let o = zn(r.doc, n.before(), n.after(), k.empty);
9366
+ if (n.parent.content.size == 0 && (Tt(s, "start") || S.isSelectable(s))) {
9367
+ let o = Ln(r.doc, n.before(), n.after(), k.empty);
9368
9368
  if (o && o.slice.size < o.to - o.from) {
9369
9369
  if (e) {
9370
9370
  let l = r.tr.step(o);
9371
- l.setSelection(Et(s, "start") ? O.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
9371
+ l.setSelection(Tt(s, "start") ? O.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
9372
9372
  }
9373
9373
  return !0;
9374
9374
  }
@@ -9403,7 +9403,7 @@ const Ed = (r, e) => {
9403
9403
  if (t.node.isTextblock || !qe(r.doc, t.from))
9404
9404
  return !1;
9405
9405
  i = t.from;
9406
- } else if (i = Ln(r.doc, t.from, -1), i == null)
9406
+ } else if (i = Bn(r.doc, t.from, -1), i == null)
9407
9407
  return !1;
9408
9408
  if (e) {
9409
9409
  let s = r.tr.join(i);
@@ -9416,11 +9416,11 @@ const Ed = (r, e) => {
9416
9416
  if (t.node.isTextblock || !qe(r.doc, t.to))
9417
9417
  return !1;
9418
9418
  n = t.to;
9419
- } else if (n = Ln(r.doc, t.to, 1), n == null)
9419
+ } else if (n = Bn(r.doc, t.to, 1), n == null)
9420
9420
  return !1;
9421
9421
  return e && e(r.tr.join(n).scrollIntoView()), !0;
9422
9422
  }, Nd = (r, e) => {
9423
- let { $from: t, $to: n } = r.selection, i = t.blockRange(n), s = i && At(i);
9423
+ let { $from: t, $to: n } = r.selection, i = t.blockRange(n), s = i && Ot(i);
9424
9424
  return s == null ? !1 : (e && e(r.tr.lift(i, s).scrollIntoView()), !0);
9425
9425
  }, el = (r, e) => {
9426
9426
  let { $head: t, $anchor: n } = r.selection;
@@ -9468,7 +9468,7 @@ const vd = (r, e) => {
9468
9468
  if (Ae(r.doc, s))
9469
9469
  return e && e(r.tr.split(s).scrollIntoView()), !0;
9470
9470
  }
9471
- let n = t.blockRange(), i = n && At(n);
9471
+ let n = t.blockRange(), i = n && Ot(n);
9472
9472
  return i == null ? !1 : (e && e(r.tr.lift(n, i).scrollIntoView()), !0);
9473
9473
  };
9474
9474
  function Dd(r) {
@@ -9524,10 +9524,10 @@ function rl(r, e, t, n) {
9524
9524
  }
9525
9525
  return !0;
9526
9526
  }
9527
- let d = s.type.spec.isolating || n > 0 && a ? null : O.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && At(u);
9527
+ let d = s.type.spec.isolating || n > 0 && a ? null : O.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && Ot(u);
9528
9528
  if (f != null && f >= e.depth)
9529
9529
  return t && t(r.tr.lift(u, f).scrollIntoView()), !0;
9530
- if (c && Et(s, "start", !0) && Et(i, "end")) {
9530
+ if (c && Tt(s, "start", !0) && Tt(i, "end")) {
9531
9531
  let h = i, p = [];
9532
9532
  for (; p.push(h), !h.isTextblock; )
9533
9533
  h = h.lastChild;
@@ -9622,7 +9622,7 @@ function Fd(r, e, t, n = null) {
9622
9622
  if (e.$from.index(e.depth - 1) == 0)
9623
9623
  return !1;
9624
9624
  let a = o.resolve(e.start - 2);
9625
- s = new wn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new wn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
9625
+ s = new Mn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new Mn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
9626
9626
  }
9627
9627
  let l = Jr(s, t, n, e);
9628
9628
  return l ? (r && Vd(r, e, l, i, t), !0) : !1;
@@ -9648,8 +9648,8 @@ function Hd(r) {
9648
9648
  }
9649
9649
  function Wd(r, e, t, n) {
9650
9650
  let i = r.tr, s = n.end, o = n.$to.end(n.depth);
9651
- s < o && (i.step(new H(s - 1, o, s, o, new k(b.from(t.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new wn(i.doc.resolve(n.$from.pos), i.doc.resolve(o), n.depth));
9652
- const l = At(n);
9651
+ s < o && (i.step(new H(s - 1, o, s, o, new k(b.from(t.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new Mn(i.doc.resolve(n.$from.pos), i.doc.resolve(o), n.depth));
9652
+ const l = Ot(n);
9653
9653
  if (l == null)
9654
9654
  return !1;
9655
9655
  i.lift(n, l);
@@ -9687,7 +9687,7 @@ function jd(r) {
9687
9687
  return !0;
9688
9688
  };
9689
9689
  }
9690
- function Wn(r) {
9690
+ function Hn(r) {
9691
9691
  const { state: e, transaction: t } = r;
9692
9692
  let { selection: n } = t, { doc: i } = t, { storedMarks: s } = t;
9693
9693
  return {
@@ -9712,7 +9712,7 @@ function Wn(r) {
9712
9712
  }
9713
9713
  };
9714
9714
  }
9715
- class qn {
9715
+ class Wn {
9716
9716
  constructor(e) {
9717
9717
  this.editor = e.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = e.state;
9718
9718
  }
@@ -9757,7 +9757,7 @@ class qn {
9757
9757
  tr: e,
9758
9758
  editor: i,
9759
9759
  view: o,
9760
- state: Wn({
9760
+ state: Hn({
9761
9761
  state: s,
9762
9762
  transaction: e
9763
9763
  }),
@@ -9803,7 +9803,7 @@ function x(r, e, t) {
9803
9803
  parent: r.parent ? x(r.parent, e, t) : null
9804
9804
  }) : r.config[e];
9805
9805
  }
9806
- function jn(r) {
9806
+ function qn(r) {
9807
9807
  const e = r.filter((i) => i.type === "extension"), t = r.filter((i) => i.type === "node"), n = r.filter((i) => i.type === "mark");
9808
9808
  return {
9809
9809
  baseExtensions: e,
@@ -9812,7 +9812,7 @@ function jn(r) {
9812
9812
  };
9813
9813
  }
9814
9814
  function sl(r) {
9815
- const e = [], { nodeExtensions: t, markExtensions: n } = jn(r), i = [...t, ...n], s = {
9815
+ const e = [], { nodeExtensions: t, markExtensions: n } = qn(r), i = [...t, ...n], s = {
9816
9816
  default: null,
9817
9817
  rendered: !0,
9818
9818
  renderHTML: null,
@@ -9941,7 +9941,7 @@ function ms(r) {
9941
9941
  }
9942
9942
  function _d(r, e) {
9943
9943
  var t;
9944
- const n = sl(r), { nodeExtensions: i, markExtensions: s } = jn(r), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
9944
+ const n = sl(r), { nodeExtensions: i, markExtensions: s } = qn(r), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
9945
9945
  const d = n.filter((y) => y.type === c.name), u = {
9946
9946
  name: c.name,
9947
9947
  options: c.options,
@@ -10017,7 +10017,7 @@ function _d(r, e) {
10017
10017
  marks: a
10018
10018
  });
10019
10019
  }
10020
- function dr(r, e) {
10020
+ function cr(r, e) {
10021
10021
  return e.nodes[r] || e.marks[r] || null;
10022
10022
  }
10023
10023
  function gs(r, e) {
@@ -10044,7 +10044,7 @@ const Gd = (r, e = 500) => {
10044
10044
  function ai(r) {
10045
10045
  return Object.prototype.toString.call(r) === "[object RegExp]";
10046
10046
  }
10047
- class Jn {
10047
+ class jn {
10048
10048
  constructor(e) {
10049
10049
  this.find = e.find, this.handler = e.handler;
10050
10050
  }
@@ -10077,13 +10077,13 @@ function dn(r) {
10077
10077
  const h = Yd(u, f.find);
10078
10078
  if (!h)
10079
10079
  return;
10080
- const p = a.state.tr, m = Wn({
10080
+ const p = a.state.tr, m = Hn({
10081
10081
  state: a.state,
10082
10082
  transaction: p
10083
10083
  }), g = {
10084
10084
  from: n - (h[0].length - s.length),
10085
10085
  to: i
10086
- }, { commands: y, chain: T, can: w } = new qn({
10086
+ }, { commands: y, chain: T, can: w } = new Wn({
10087
10087
  editor: t,
10088
10088
  state: m
10089
10089
  });
@@ -10180,10 +10180,10 @@ function Zd(r) {
10180
10180
  function un(r) {
10181
10181
  return Zd(r) !== "Object" ? !1 : r.constructor === Object && Object.getPrototypeOf(r) === Object.prototype;
10182
10182
  }
10183
- function Kn(r, e) {
10183
+ function Jn(r, e) {
10184
10184
  const t = { ...r };
10185
10185
  return un(r) && un(e) && Object.keys(e).forEach((n) => {
10186
- un(e[n]) && un(r[n]) ? t[n] = Kn(r[n], e[n]) : t[n] = e[n];
10186
+ un(e[n]) && un(r[n]) ? t[n] = Jn(r[n], e[n]) : t[n] = e[n];
10187
10187
  }), t;
10188
10188
  }
10189
10189
  class Me {
@@ -10207,7 +10207,7 @@ class Me {
10207
10207
  configure(e = {}) {
10208
10208
  const t = this.extend({
10209
10209
  ...this.config,
10210
- addOptions: () => Kn(this.options, e)
10210
+ addOptions: () => Jn(this.options, e)
10211
10211
  });
10212
10212
  return t.name = this.name, t.parent = this.parent, t;
10213
10213
  }
@@ -10250,7 +10250,7 @@ const tu = (r, e, t) => {
10250
10250
  }) : [];
10251
10251
  };
10252
10252
  function nu(r) {
10253
- const { editor: e, state: t, from: n, to: i, rule: s, pasteEvent: o, dropEvent: l } = r, { commands: a, chain: c, can: d } = new qn({
10253
+ const { editor: e, state: t, from: n, to: i, rule: s, pasteEvent: o, dropEvent: l } = r, { commands: a, chain: c, can: d } = new Wn({
10254
10254
  editor: e,
10255
10255
  state: t
10256
10256
  }), u = [];
@@ -10295,7 +10295,7 @@ function iu(r) {
10295
10295
  l = null;
10296
10296
  }
10297
10297
  const a = ({ state: d, from: u, to: f, rule: h, pasteEvt: p }) => {
10298
- const m = d.tr, g = Wn({
10298
+ const m = d.tr, g = Hn({
10299
10299
  state: d,
10300
10300
  transaction: m
10301
10301
  });
@@ -10433,7 +10433,7 @@ class gt {
10433
10433
  options: t.options,
10434
10434
  storage: t.storage,
10435
10435
  editor: this.editor,
10436
- type: dr(t.name, this.schema)
10436
+ type: cr(t.name, this.schema)
10437
10437
  }, i = x(t, "addCommands", n);
10438
10438
  return i ? {
10439
10439
  ...e,
@@ -10452,7 +10452,7 @@ class gt {
10452
10452
  options: o.options,
10453
10453
  storage: o.storage,
10454
10454
  editor: e,
10455
- type: dr(o.name, this.schema)
10455
+ type: cr(o.name, this.schema)
10456
10456
  }, a = [], c = x(o, "addKeyboardShortcuts", l);
10457
10457
  let d = {};
10458
10458
  if (o.type === "mark" && x(o, "exitable", l) && (d.ArrowRight = () => Me.handleExit({ editor: e, mark: o })), c) {
@@ -10496,7 +10496,7 @@ class gt {
10496
10496
  * @returns An object with all node views where the key is the node name and the value is the node view function
10497
10497
  */
10498
10498
  get nodeViews() {
10499
- const { editor: e } = this, { nodeExtensions: t } = jn(this.extensions);
10499
+ const { editor: e } = this, { nodeExtensions: t } = qn(this.extensions);
10500
10500
  return Object.fromEntries(t.filter((n) => !!x(n, "addNodeView")).map((n) => {
10501
10501
  const i = this.attributes.filter((a) => a.type === n.name), s = {
10502
10502
  name: n.name,
@@ -10538,7 +10538,7 @@ class gt {
10538
10538
  options: e.options,
10539
10539
  storage: e.storage,
10540
10540
  editor: this.editor,
10541
- type: dr(e.name, this.schema)
10541
+ type: cr(e.name, this.schema)
10542
10542
  };
10543
10543
  e.type === "mark" && (!((t = E(x(e, "keepOnSplit", n))) !== null && t !== void 0) || t) && this.splittableMarks.push(e.name);
10544
10544
  const i = x(e, "onBeforeCreate", n), s = x(e, "onCreate", n), o = x(e, "onUpdate", n), l = x(e, "onSelectionUpdate", n), a = x(e, "onTransaction", n), c = x(e, "onFocus", n), d = x(e, "onBlur", n), u = x(e, "onDestroy", n);
@@ -10567,7 +10567,7 @@ class G {
10567
10567
  configure(e = {}) {
10568
10568
  const t = this.extend({
10569
10569
  ...this.config,
10570
- addOptions: () => Kn(this.options, e)
10570
+ addOptions: () => Jn(this.options, e)
10571
10571
  });
10572
10572
  return t.name = this.name, t.parent = this.parent, t;
10573
10573
  }
@@ -10639,7 +10639,7 @@ const ou = G.create({
10639
10639
  const { doc: c, mapping: d } = e, u = c.resolve(d.map(a)), f = c.resolve(d.map(a + l.nodeSize)), h = u.blockRange(f);
10640
10640
  if (!h)
10641
10641
  return;
10642
- const p = At(h);
10642
+ const p = Ot(h);
10643
10643
  if (l.type.isTextblock) {
10644
10644
  const { defaultType: m } = u.parent.contentMatchAt(u.index());
10645
10645
  e.setNodeMarkup(h.start, m);
@@ -10681,12 +10681,12 @@ const ou = G.create({
10681
10681
  const { from: n, to: i } = r;
10682
10682
  return t && e.delete(n, i), !0;
10683
10683
  }, gu = () => ({ state: r, dispatch: e }) => ni(r, e), yu = () => ({ commands: r }) => r.keyboardShortcut("Enter"), bu = () => ({ state: r, dispatch: e }) => vd(r, e);
10684
- function Dn(r, e, t = { strict: !0 }) {
10684
+ function vn(r, e, t = { strict: !0 }) {
10685
10685
  const n = Object.keys(e);
10686
10686
  return n.length ? n.every((i) => t.strict ? e[i] === r[i] : ai(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
10687
10687
  }
10688
10688
  function cl(r, e, t = {}) {
10689
- return r.find((n) => n.type === e && Dn(
10689
+ return r.find((n) => n.type === e && vn(
10690
10690
  // Only check equality for the attributes that are provided
10691
10691
  Object.fromEntries(Object.keys(t).map((i) => [i, n.attrs[i]])),
10692
10692
  t
@@ -10757,7 +10757,7 @@ function ul(r, e = null) {
10757
10757
  function bs() {
10758
10758
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
10759
10759
  }
10760
- function In() {
10760
+ function Dn() {
10761
10761
  return [
10762
10762
  "iPad Simulator",
10763
10763
  "iPhone Simulator",
@@ -10776,8 +10776,8 @@ const Mu = (r = null, e = {}) => ({ editor: t, view: n, tr: i, dispatch: s }) =>
10776
10776
  ...e
10777
10777
  };
10778
10778
  const o = () => {
10779
- (In() || bs()) && n.dom.focus(), requestAnimationFrame(() => {
10780
- t.isDestroyed || (n.focus(), Su() && !In() && !bs() && n.dom.focus({ preventScroll: !0 }));
10779
+ (Dn() || bs()) && n.dom.focus(), requestAnimationFrame(() => {
10780
+ t.isDestroyed || (n.focus(), Su() && !Dn() && !bs() && n.dom.focus({ preventScroll: !0 }));
10781
10781
  });
10782
10782
  };
10783
10783
  if (n.hasFocus() && r === null || r === !1)
@@ -10798,7 +10798,7 @@ function hn(r) {
10798
10798
  const e = `<body>${r}</body>`, t = new window.DOMParser().parseFromString(e, "text/html").body;
10799
10799
  return fl(t);
10800
10800
  }
10801
- function Kt(r, e, t) {
10801
+ function jt(r, e, t) {
10802
10802
  if (r instanceof ze || r instanceof b)
10803
10803
  return r;
10804
10804
  t = {
@@ -10816,7 +10816,7 @@ function Kt(r, e, t) {
10816
10816
  } catch (s) {
10817
10817
  if (t.errorOnInvalidContent)
10818
10818
  throw new Error("[tiptap error]: Invalid JSON content", { cause: s });
10819
- return console.warn("[tiptap warn]: Invalid content.", "Passed value:", r, "Error:", s), Kt("", e, t);
10819
+ return console.warn("[tiptap warn]: Invalid content.", "Passed value:", r, "Error:", s), jt("", e, t);
10820
10820
  }
10821
10821
  if (i) {
10822
10822
  if (t.errorOnInvalidContent) {
@@ -10845,7 +10845,7 @@ function Kt(r, e, t) {
10845
10845
  const s = $e.fromSchema(e);
10846
10846
  return t.slice ? s.parseSlice(hn(r), t.parseOptions).content : s.parse(hn(r), t.parseOptions);
10847
10847
  }
10848
- return Kt("", e, t);
10848
+ return jt("", e, t);
10849
10849
  }
10850
10850
  function Tu(r, e, t) {
10851
10851
  const n = r.steps.length - 1;
@@ -10885,7 +10885,7 @@ const Ou = (r) => !("type" in r), Eu = (r, e, t) => ({ tr: n, dispatch: i, edito
10885
10885
  };
10886
10886
  if (!t.errorOnInvalidContent && !s.options.enableContentCheck && s.options.emitContentError)
10887
10887
  try {
10888
- Kt(e, s.schema, {
10888
+ jt(e, s.schema, {
10889
10889
  parseOptions: c,
10890
10890
  errorOnInvalidContent: !0
10891
10891
  });
@@ -10893,7 +10893,7 @@ const Ou = (r) => !("type" in r), Eu = (r, e, t) => ({ tr: n, dispatch: i, edito
10893
10893
  a(g);
10894
10894
  }
10895
10895
  try {
10896
- l = Kt(e, s.schema, {
10896
+ l = jt(e, s.schema, {
10897
10897
  parseOptions: c,
10898
10898
  errorOnInvalidContent: (o = t.errorOnInvalidContent) !== null && o !== void 0 ? o : s.options.enableContentCheck
10899
10899
  });
@@ -10925,14 +10925,14 @@ const Ou = (r) => !("type" in r), Eu = (r, e, t) => ({ tr: n, dispatch: i, edito
10925
10925
  return !0;
10926
10926
  }, Au = () => ({ state: r, dispatch: e }) => Ed(r, e), Nu = () => ({ state: r, dispatch: e }) => Ad(r, e), vu = () => ({ state: r, dispatch: e }) => _o(r, e), Du = () => ({ state: r, dispatch: e }) => Zo(r, e), Iu = () => ({ state: r, dispatch: e, tr: t }) => {
10927
10927
  try {
10928
- const n = Ln(r.doc, r.selection.$from.pos, -1);
10928
+ const n = Bn(r.doc, r.selection.$from.pos, -1);
10929
10929
  return n == null ? !1 : (t.join(n, 2), e && e(t), !0);
10930
10930
  } catch {
10931
10931
  return !1;
10932
10932
  }
10933
10933
  }, Ru = () => ({ state: r, dispatch: e, tr: t }) => {
10934
10934
  try {
10935
- const n = Ln(r.doc, r.selection.$from.pos, 1);
10935
+ const n = Bn(r.doc, r.selection.$from.pos, 1);
10936
10936
  return n == null ? !1 : (t.join(n, 2), e && e(t), !0);
10937
10937
  } catch {
10938
10938
  return !1;
@@ -10957,7 +10957,7 @@ function Lu(r) {
10957
10957
  else if (/^s(hift)?$/i.test(a))
10958
10958
  s = !0;
10959
10959
  else if (/^mod$/i.test(a))
10960
- In() || hl() ? o = !0 : i = !0;
10960
+ Dn() || hl() ? o = !0 : i = !0;
10961
10961
  else
10962
10962
  throw new Error(`Unrecognized modifier name: ${a}`);
10963
10963
  }
@@ -10980,7 +10980,7 @@ const zu = (r) => ({ editor: e, view: t, tr: n, dispatch: i }) => {
10980
10980
  d && i && n.maybeStep(d);
10981
10981
  }), !0;
10982
10982
  };
10983
- function Ut(r, e, t = {}) {
10983
+ function Jt(r, e, t = {}) {
10984
10984
  const { from: n, to: i, empty: s } = r.selection, o = e ? q(e, r.schema) : null, l = [];
10985
10985
  r.doc.nodesBetween(n, i, (u, f) => {
10986
10986
  if (u.isText)
@@ -10992,17 +10992,17 @@ function Ut(r, e, t = {}) {
10992
10992
  to: p
10993
10993
  });
10994
10994
  });
10995
- const a = i - n, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => Dn(u.node.attrs, t, { strict: !1 }));
10995
+ const a = i - n, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => vn(u.node.attrs, t, { strict: !1 }));
10996
10996
  return s ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= a;
10997
10997
  }
10998
10998
  const $u = (r, e = {}) => ({ state: t, dispatch: n }) => {
10999
10999
  const i = q(r, t.schema);
11000
- return Ut(t, i, e) ? Nd(t, n) : !1;
11000
+ return Jt(t, i, e) ? Nd(t, n) : !1;
11001
11001
  }, Fu = () => ({ state: r, dispatch: e }) => nl(r, e), Vu = (r) => ({ state: e, dispatch: t }) => {
11002
11002
  const n = q(r, e.schema);
11003
11003
  return Hd(n)(e, t);
11004
11004
  }, Hu = () => ({ state: r, dispatch: e }) => el(r, e);
11005
- function Un(r, e) {
11005
+ function Kn(r, e) {
11006
11006
  return e.nodes[r] ? "node" : e.marks[r] ? "mark" : null;
11007
11007
  }
11008
11008
  function ks(r, e) {
@@ -11011,7 +11011,7 @@ function ks(r, e) {
11011
11011
  }
11012
11012
  const Wu = (r, e) => ({ tr: t, state: n, dispatch: i }) => {
11013
11013
  let s = null, o = null;
11014
- const l = Un(typeof r == "string" ? r : r.name, n.schema);
11014
+ const l = Kn(typeof r == "string" ? r : r.name, n.schema);
11015
11015
  return l ? (l === "node" && (s = q(r, n.schema)), l === "mark" && (o = Je(r, n.schema)), i && t.selection.ranges.forEach((a) => {
11016
11016
  n.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, d) => {
11017
11017
  s && s === c.type && t.setNodeMarkup(d, void 0, ks(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
@@ -11027,7 +11027,7 @@ const Wu = (r, e) => ({ tr: t, state: n, dispatch: i }) => {
11027
11027
  return !0;
11028
11028
  }, Ju = () => ({ state: r, dispatch: e }) => Yo(r, e), Ku = () => ({ state: r, dispatch: e }) => Qo(r, e), Uu = () => ({ state: r, dispatch: e }) => Rd(r, e), _u = () => ({ state: r, dispatch: e }) => Ld(r, e), Gu = () => ({ state: r, dispatch: e }) => Bd(r, e);
11029
11029
  function Br(r, e, t = {}, n = {}) {
11030
- return Kt(r, e, {
11030
+ return jt(r, e, {
11031
11031
  slice: !1,
11032
11032
  parseOptions: t,
11033
11033
  errorOnInvalidContent: n.errorOnInvalidContent
@@ -11094,7 +11094,7 @@ function ef(r, e) {
11094
11094
  return o ? { ...o.attrs } : {};
11095
11095
  }
11096
11096
  function tf(r, e) {
11097
- const t = Un(typeof e == "string" ? e : e.name, r.schema);
11097
+ const t = Kn(typeof e == "string" ? e : e.name, r.schema);
11098
11098
  return t === "node" ? ef(r, e) : t === "mark" ? pl(r, e) : {};
11099
11099
  }
11100
11100
  function ml(r, e, t) {
@@ -11122,7 +11122,7 @@ function yn(r, e, t) {
11122
11122
  function Lr(r, e, t = {}) {
11123
11123
  const { empty: n, ranges: i } = r.selection, s = e ? Je(e, r.schema) : null;
11124
11124
  if (n)
11125
- return !!(r.storedMarks || r.selection.$from.marks()).filter((u) => s ? s.name === u.type.name : !0).find((u) => Dn(u.attrs, t, { strict: !1 }));
11125
+ return !!(r.storedMarks || r.selection.$from.marks()).filter((u) => s ? s.name === u.type.name : !0).find((u) => vn(u.attrs, t, { strict: !1 }));
11126
11126
  let o = 0;
11127
11127
  const l = [];
11128
11128
  if (i.forEach(({ $from: u, $to: f }) => {
@@ -11139,17 +11139,17 @@ function Lr(r, e, t = {}) {
11139
11139
  });
11140
11140
  }), o === 0)
11141
11141
  return !1;
11142
- const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => Dn(u.mark.attrs, t, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, f) => u + f.to - f.from, 0);
11142
+ const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => vn(u.mark.attrs, t, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, f) => u + f.to - f.from, 0);
11143
11143
  return (a > 0 ? a + c : a) >= o;
11144
11144
  }
11145
11145
  function nf(r, e, t = {}) {
11146
11146
  if (!e)
11147
- return Ut(r, null, t) || Lr(r, null, t);
11148
- const n = Un(e, r.schema);
11149
- return n === "node" ? Ut(r, e, t) : n === "mark" ? Lr(r, e, t) : !1;
11147
+ return Jt(r, null, t) || Lr(r, null, t);
11148
+ const n = Kn(e, r.schema);
11149
+ return n === "node" ? Jt(r, e, t) : n === "mark" ? Lr(r, e, t) : !1;
11150
11150
  }
11151
11151
  function xs(r, e) {
11152
- const { nodeExtensions: t } = jn(e), n = t.find((o) => o.name === r);
11152
+ const { nodeExtensions: t } = qn(e), n = t.find((o) => o.name === r);
11153
11153
  if (!n)
11154
11154
  return !1;
11155
11155
  const i = {
@@ -11337,7 +11337,7 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11337
11337
  t.ensureMarks(I);
11338
11338
  }
11339
11339
  return !0;
11340
- }, ur = (r, e) => {
11340
+ }, dr = (r, e) => {
11341
11341
  const t = di((o) => o.type === e)(r.selection);
11342
11342
  if (!t)
11343
11343
  return !0;
@@ -11346,7 +11346,7 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11346
11346
  return !0;
11347
11347
  const i = r.doc.nodeAt(n);
11348
11348
  return t.node.type === (i == null ? void 0 : i.type) && qe(r.doc, t.pos) && r.join(t.pos), !0;
11349
- }, fr = (r, e) => {
11349
+ }, ur = (r, e) => {
11350
11350
  const t = di((o) => o.type === e)(r.selection);
11351
11351
  if (!t)
11352
11352
  return !0;
@@ -11364,22 +11364,22 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11364
11364
  if (I.node.type === h)
11365
11365
  return c.liftListItem(p);
11366
11366
  if (xs(I.node.type.name, u) && h.validContent(I.node.content) && l)
11367
- return a().command(() => (s.setNodeMarkup(I.pos, h), !0)).command(() => ur(s, h)).command(() => fr(s, h)).run();
11367
+ return a().command(() => (s.setNodeMarkup(I.pos, h), !0)).command(() => dr(s, h)).command(() => ur(s, h)).run();
11368
11368
  }
11369
- return !t || !R || !l ? a().command(() => d().wrapInList(h, n) ? !0 : c.clearNodes()).wrapInList(h, n).command(() => ur(s, h)).command(() => fr(s, h)).run() : a().command(() => {
11369
+ return !t || !R || !l ? a().command(() => d().wrapInList(h, n) ? !0 : c.clearNodes()).wrapInList(h, n).command(() => dr(s, h)).command(() => ur(s, h)).run() : a().command(() => {
11370
11370
  const F = d().wrapInList(h, n), C = R.filter((N) => f.includes(N.type.name));
11371
11371
  return s.ensureMarks(C), F ? !0 : c.clearNodes();
11372
- }).wrapInList(h, n).command(() => ur(s, h)).command(() => fr(s, h)).run();
11372
+ }).wrapInList(h, n).command(() => dr(s, h)).command(() => ur(s, h)).run();
11373
11373
  }, mf = (r, e = {}, t = {}) => ({ state: n, commands: i }) => {
11374
11374
  const { extendEmptyMarkRange: s = !1 } = t, o = Je(r, n.schema);
11375
11375
  return Lr(n, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
11376
11376
  }, gf = (r, e, t = {}) => ({ state: n, commands: i }) => {
11377
- const s = q(r, n.schema), o = q(e, n.schema), l = Ut(n, s, t);
11377
+ const s = q(r, n.schema), o = q(e, n.schema), l = Jt(n, s, t);
11378
11378
  let a;
11379
11379
  return n.selection.$anchor.sameParent(n.selection.$head) && (a = n.selection.$anchor.parent.attrs), l ? i.setNode(o, a) : i.setNode(s, { ...a, ...t });
11380
11380
  }, yf = (r, e = {}) => ({ state: t, commands: n }) => {
11381
11381
  const i = q(r, t.schema);
11382
- return Ut(t, i, e) ? n.lift(i) : n.wrapIn(i, e);
11382
+ return Jt(t, i, e) ? n.lift(i) : n.wrapIn(i, e);
11383
11383
  }, bf = () => ({ state: r, dispatch: e }) => {
11384
11384
  const t = r.plugins;
11385
11385
  for (let n = 0; n < t.length; n += 1) {
@@ -11421,7 +11421,7 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11421
11421
  return t.removeStoredMark(a), !0;
11422
11422
  }, Sf = (r, e = {}) => ({ tr: t, state: n, dispatch: i }) => {
11423
11423
  let s = null, o = null;
11424
- const l = Un(typeof r == "string" ? r : r.name, n.schema);
11424
+ const l = Kn(typeof r == "string" ? r : r.name, n.schema);
11425
11425
  return l ? (l === "node" && (s = q(r, n.schema)), l === "mark" && (o = Je(r, n.schema)), i && t.selection.ranges.forEach((a) => {
11426
11426
  const c = a.$from.pos, d = a.$to.pos;
11427
11427
  let u, f, h, p;
@@ -11625,7 +11625,7 @@ const Tf = G.create({
11625
11625
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
11626
11626
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
11627
11627
  };
11628
- return In() || hl() ? s : i;
11628
+ return Dn() || hl() ? s : i;
11629
11629
  },
11630
11630
  addProseMirrorPlugins() {
11631
11631
  return [
@@ -11645,10 +11645,10 @@ const Tf = G.create({
11645
11645
  const { empty: s, from: o, to: l } = e.selection, a = O.atStart(e.doc).from, c = O.atEnd(e.doc).to;
11646
11646
  if (s || !(o === a && l === c) || !ui(t.doc))
11647
11647
  return;
11648
- const f = t.tr, h = Wn({
11648
+ const f = t.tr, h = Hn({
11649
11649
  state: t,
11650
11650
  transaction: f
11651
- }), { commands: p } = new qn({
11651
+ }), { commands: p } = new Wn({
11652
11652
  editor: this.editor,
11653
11653
  state: h
11654
11654
  });
@@ -12046,7 +12046,7 @@ class Bf extends Jd {
12046
12046
  * Creates an command manager.
12047
12047
  */
12048
12048
  createCommandManager() {
12049
- this.commandManager = new qn({
12049
+ this.commandManager = new Wn({
12050
12050
  editor: this
12051
12051
  });
12052
12052
  }
@@ -12245,7 +12245,7 @@ class Bf extends Jd {
12245
12245
  }
12246
12246
  }
12247
12247
  function lt(r) {
12248
- return new Jn({
12248
+ return new jn({
12249
12249
  find: r.find,
12250
12250
  handler: ({ state: e, range: t, match: n }) => {
12251
12251
  const i = E(r.getAttributes, void 0, n);
@@ -12264,7 +12264,7 @@ function lt(r) {
12264
12264
  });
12265
12265
  }
12266
12266
  function gl(r) {
12267
- return new Jn({
12267
+ return new jn({
12268
12268
  find: r.find,
12269
12269
  handler: ({ state: e, range: t, match: n }) => {
12270
12270
  const i = E(r.getAttributes, void 0, n) || {}, { tr: s } = e, o = t.from;
@@ -12285,7 +12285,7 @@ function gl(r) {
12285
12285
  });
12286
12286
  }
12287
12287
  function zr(r) {
12288
- return new Jn({
12288
+ return new jn({
12289
12289
  find: r.find,
12290
12290
  handler: ({ state: e, range: t, match: n }) => {
12291
12291
  const i = e.doc.resolve(t.from), s = E(r.getAttributes, void 0, n) || {};
@@ -12295,8 +12295,8 @@ function zr(r) {
12295
12295
  }
12296
12296
  });
12297
12297
  }
12298
- function _t(r) {
12299
- return new Jn({
12298
+ function Kt(r) {
12299
+ return new jn({
12300
12300
  find: r.find,
12301
12301
  handler: ({ state: e, range: t, match: n, chain: i }) => {
12302
12302
  const s = E(r.getAttributes, void 0, n) || {}, o = e.tr.delete(t.from, t.to), a = o.doc.resolve(t.from).blockRange(), c = a && Jr(a, r.type, s);
@@ -12339,7 +12339,7 @@ class re {
12339
12339
  configure(e = {}) {
12340
12340
  const t = this.extend({
12341
12341
  ...this.config,
12342
- addOptions: () => Kn(this.options, e)
12342
+ addOptions: () => Jn(this.options, e)
12343
12343
  });
12344
12344
  return t.name = this.name, t.parent = this.parent, t;
12345
12345
  }
@@ -12418,7 +12418,7 @@ const zf = /^\s*>\s$/, $f = re.create({
12418
12418
  },
12419
12419
  addInputRules() {
12420
12420
  return [
12421
- _t({
12421
+ Kt({
12422
12422
  find: zf,
12423
12423
  type: this.type
12424
12424
  })
@@ -12523,11 +12523,11 @@ const zf = /^\s*>\s$/, $f = re.create({
12523
12523
  };
12524
12524
  },
12525
12525
  addInputRules() {
12526
- let r = _t({
12526
+ let r = Kt({
12527
12527
  find: ws,
12528
12528
  type: this.type
12529
12529
  });
12530
- return (this.options.keepMarks || this.options.keepAttributes) && (r = _t({
12530
+ return (this.options.keepMarks || this.options.keepAttributes) && (r = Kt({
12531
12531
  find: ws,
12532
12532
  type: this.type,
12533
12533
  keepMarks: this.options.keepMarks,
@@ -13126,10 +13126,10 @@ const ch = G.create({
13126
13126
  }));
13127
13127
  }
13128
13128
  });
13129
- var Rn = 200, W = function() {
13129
+ var In = 200, W = function() {
13130
13130
  };
13131
13131
  W.prototype.append = function(e) {
13132
- return e.length ? (e = W.from(e), !this.length && e || e.length < Rn && this.leafAppend(e) || this.length < Rn && e.leafPrepend(this) || this.appendInner(e)) : this;
13132
+ return e.length ? (e = W.from(e), !this.length && e || e.length < In && this.leafAppend(e) || this.length < In && e.leafPrepend(this) || this.appendInner(e)) : this;
13133
13133
  };
13134
13134
  W.prototype.prepend = function(e) {
13135
13135
  return e.length ? W.from(e).append(this) : this;
@@ -13178,10 +13178,10 @@ var bl = /* @__PURE__ */ function(r) {
13178
13178
  if (i(this.values[a], l + a) === !1)
13179
13179
  return !1;
13180
13180
  }, e.prototype.leafAppend = function(i) {
13181
- if (this.length + i.length <= Rn)
13181
+ if (this.length + i.length <= In)
13182
13182
  return new e(this.values.concat(i.flatten()));
13183
13183
  }, e.prototype.leafPrepend = function(i) {
13184
- if (this.length + i.length <= Rn)
13184
+ if (this.length + i.length <= In)
13185
13185
  return new e(i.flatten().concat(this.values));
13186
13186
  }, t.length.get = function() {
13187
13187
  return this.values.length;
@@ -13268,7 +13268,7 @@ class ge {
13268
13268
  return c > mh && (l = ph(l, c), o -= c), new ge(l.append(s), o);
13269
13269
  }
13270
13270
  remapping(e, t) {
13271
- let n = new Ht();
13271
+ let n = new Ft();
13272
13272
  return this.items.forEach((i, s) => {
13273
13273
  let o = i.mirrorOffset != null && s - i.mirrorOffset >= e ? n.maps.length - i.mirrorOffset : void 0;
13274
13274
  n.appendMap(i.map, o);
@@ -13373,9 +13373,9 @@ function gh(r, e, t, n) {
13373
13373
  if (o && o.getMeta(nt))
13374
13374
  return o.getMeta(nt).redo ? new Ie(r.done.addTransform(t, void 0, n, bn(e)), r.undone, Cs(t.mapping.maps), r.prevTime, r.prevComposition) : new Ie(r.done, r.undone.addTransform(t, void 0, n, bn(e)), null, r.prevTime, r.prevComposition);
13375
13375
  if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
13376
- let l = t.getMeta("composition"), a = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !yh(t, r.prevRanges)), c = o ? hr(r.prevRanges, t.mapping) : Cs(t.mapping.maps);
13376
+ let l = t.getMeta("composition"), a = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !yh(t, r.prevRanges)), c = o ? fr(r.prevRanges, t.mapping) : Cs(t.mapping.maps);
13377
13377
  return new Ie(r.done.addTransform(t, a ? e.selection.getBookmark() : void 0, n, bn(e)), ge.empty, c, t.time, l ?? r.prevComposition);
13378
- } else return (s = t.getMeta("rebased")) ? new Ie(r.done.rebased(t, s), r.undone.rebased(t, s), hr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new Ie(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), hr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
13378
+ } else return (s = t.getMeta("rebased")) ? new Ie(r.done.rebased(t, s), r.undone.rebased(t, s), fr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new Ie(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), fr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
13379
13379
  }
13380
13380
  function yh(r, e) {
13381
13381
  if (!e)
@@ -13394,7 +13394,7 @@ function Cs(r) {
13394
13394
  r[t].forEach((n, i, s, o) => e.push(s, o));
13395
13395
  return e;
13396
13396
  }
13397
- function hr(r, e) {
13397
+ function fr(r, e) {
13398
13398
  if (!r)
13399
13399
  return null;
13400
13400
  let t = [];
@@ -13411,18 +13411,18 @@ function bh(r, e, t) {
13411
13411
  let o = s.selection.resolve(s.transform.doc), l = (t ? r.done : r.undone).addTransform(s.transform, e.selection.getBookmark(), i, n), a = new Ie(t ? l : s.remaining, t ? s.remaining : l, null, 0, -1);
13412
13412
  return s.transform.setSelection(o).setMeta(nt, { redo: t, historyState: a });
13413
13413
  }
13414
- let pr = !1, Ts = null;
13414
+ let hr = !1, Ts = null;
13415
13415
  function bn(r) {
13416
13416
  let e = r.plugins;
13417
13417
  if (Ts != e) {
13418
- pr = !1, Ts = e;
13418
+ hr = !1, Ts = e;
13419
13419
  for (let t = 0; t < e.length; t++)
13420
13420
  if (e[t].spec.historyPreserveItems) {
13421
- pr = !0;
13421
+ hr = !0;
13422
13422
  break;
13423
13423
  }
13424
13424
  }
13425
- return pr;
13425
+ return hr;
13426
13426
  }
13427
13427
  const nt = new we("history"), kh = new we("closeHistory");
13428
13428
  function xh(r = {}) {
@@ -13684,13 +13684,13 @@ const xl = kl(!1, !0), Sl = kl(!0, !0), Sh = G.create({
13684
13684
  };
13685
13685
  },
13686
13686
  addInputRules() {
13687
- let r = _t({
13687
+ let r = Kt({
13688
13688
  find: Es,
13689
13689
  type: this.type,
13690
13690
  getAttributes: (e) => ({ start: +e[1] }),
13691
13691
  joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1]
13692
13692
  });
13693
- return (this.options.keepMarks || this.options.keepAttributes) && (r = _t({
13693
+ return (this.options.keepMarks || this.options.keepAttributes) && (r = Kt({
13694
13694
  find: Es,
13695
13695
  type: this.type,
13696
13696
  keepMarks: this.options.keepMarks,
@@ -14027,14 +14027,14 @@ const xl = kl(!1, !0), Sl = kl(!0, !0), Sh = G.create({
14027
14027
  ];
14028
14028
  }
14029
14029
  });
14030
- var ie, en, tn, de, $r, Ml, wl, Cl, Tl;
14030
+ var ie, Zt, Qt, de, $r, Ml, wl, Cl, Tl;
14031
14031
  class Kh extends $l {
14032
14032
  constructor() {
14033
14033
  super();
14034
14034
  B(this, de);
14035
14035
  B(this, ie, null);
14036
- B(this, en, null);
14037
- B(this, tn, null);
14036
+ B(this, Zt, null);
14037
+ B(this, Qt, null);
14038
14038
  }
14039
14039
  connectedCallback() {
14040
14040
  super.connectedCallback() && (A(this, de, Ml).call(this), A(this, de, wl).call(this), A(this, de, $r).call(this));
@@ -14045,7 +14045,7 @@ class Kh extends $l {
14045
14045
  set value(t) {
14046
14046
  let n = t || "";
14047
14047
  n && !/<\/?[a-z][^>]*>/i.test(n) && (n = n.split(`
14048
- `).map((i) => `<p>${i}</p>`).join("")), v(this, ie) ? v(this, ie).commands.setContent(n, !1) : X(this, tn, n);
14048
+ `).map((i) => `<p>${i}</p>`).join("")), v(this, ie) ? v(this, ie).commands.setContent(n, !1) : X(this, Qt, n);
14049
14049
  }
14050
14050
  get id() {
14051
14051
  return this.getAttribute("id");
@@ -14070,7 +14070,7 @@ class Kh extends $l {
14070
14070
  v(this, ie) && (v(this, ie).destroy(), X(this, ie, null));
14071
14071
  }
14072
14072
  }
14073
- ie = new WeakMap(), en = new WeakMap(), tn = new WeakMap(), de = new WeakSet(), // 2. 에디터 상태 업데이트 로직 분리
14073
+ ie = new WeakMap(), Zt = new WeakMap(), Qt = new WeakMap(), de = new WeakSet(), // 2. 에디터 상태 업데이트 로직 분리
14074
14074
  $r = function() {
14075
14075
  if (v(this, ie)) {
14076
14076
  const t = this.readonly;
@@ -14079,10 +14079,10 @@ $r = function() {
14079
14079
  n && (n.style.display = t ? "none" : "flex");
14080
14080
  }
14081
14081
  }, Ml = function() {
14082
- const t = kn.getComponentCssPath("nineEditor.css"), n = t ? `@import "${t}";` : "";
14082
+ const t = mr.getComponentCssPath("nineEditor.css"), n = t ? `@import "${t}";` : "";
14083
14083
  this.shadowRoot.innerHTML = `
14084
14084
  <style>
14085
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.140/dist/css/nineEditor.css";
14085
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.142/dist/css/nineEditor.css";
14086
14086
  ${n}
14087
14087
  </style>
14088
14088
 
@@ -14117,13 +14117,13 @@ $r = function() {
14117
14117
  <button type="button" data-cmd="redo" title="다시 실행(Ctrl+Y)"><i class="icon-redo"></i></button>
14118
14118
  </div>
14119
14119
  <div id="editor-container"></div>
14120
- `, X(this, en, this.shadowRoot.querySelector("#editor-container")), this.shadowRoot.querySelector("#font-size").onchange = (i) => {
14120
+ `, X(this, Zt, this.shadowRoot.querySelector("#editor-container")), this.shadowRoot.querySelector("#font-size").onchange = (i) => {
14121
14121
  const s = i.target.value;
14122
14122
  console.log(i.target, s), v(this, ie).chain().focus().setMark("textStyle", { fontSize: s }).run();
14123
14123
  };
14124
14124
  }, wl = function() {
14125
14125
  X(this, ie, new Bf({
14126
- element: v(this, en),
14126
+ element: v(this, Zt),
14127
14127
  editable: !this.readonly,
14128
14128
  // 4. 생성 시 readonly 여부 반영
14129
14129
  extensions: [
@@ -14149,7 +14149,7 @@ $r = function() {
14149
14149
  }
14150
14150
  })
14151
14151
  ],
14152
- content: v(this, tn) || this.originContents || "",
14152
+ content: v(this, Qt) || this.originContents || "",
14153
14153
  onUpdate: ({ editor: t }) => {
14154
14154
  this.dispatchEvent(new CustomEvent("change", { detail: t.getHTML() }));
14155
14155
  },
@@ -14190,14 +14190,14 @@ const Oe = typeof window < "u" && window.nine ? window.nine : vs, As = {
14190
14190
  var t;
14191
14191
  console.log(Oe, window.nine);
14192
14192
  const { nativeOverride: r } = ((t = Oe == null ? void 0 : Oe.config) == null ? void 0 : t.ux) || {}, e = Array.isArray(r) ? r : r === !0 ? ["alert", "confirm"] : [];
14193
- console.log(Oe, e), window.alert = e.includes("alert") ? (n) => kn.alert(n) : As.alert, window.confirm = e.includes("confirm") ? async (n) => await kn.confirm(n) : As.confirm, Oe.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
14193
+ console.log(Oe, e), window.alert = e.includes("alert") ? (n) => mr.alert(n) : As.alert, window.confirm = e.includes("confirm") ? async (n) => await mr.confirm(n) : As.confirm, Oe.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
14194
14194
  }, Uh = () => {
14195
14195
  Ns(), Oe == null || Oe.subscribeConfig((r) => {
14196
14196
  (r === "ux" || r === "config") && Ns();
14197
14197
  });
14198
14198
  };
14199
14199
  Uh();
14200
- var kt, xt, ye, Ol, Pt, El;
14200
+ var kt, xt, ye, Ol, It, El;
14201
14201
  class _h extends HTMLElement {
14202
14202
  constructor() {
14203
14203
  super();
@@ -14210,26 +14210,26 @@ class _h extends HTMLElement {
14210
14210
  return ["lang", "code"];
14211
14211
  }
14212
14212
  connectedCallback() {
14213
- !this.getAttribute("code") && this.textContent.trim() && this.setAttribute("code", this.textContent.trim()), A(this, ye, Pt).call(this);
14213
+ !this.getAttribute("code") && this.textContent.trim() && this.setAttribute("code", this.textContent.trim()), A(this, ye, It).call(this);
14214
14214
  }
14215
14215
  attributeChangedCallback() {
14216
- A(this, ye, Pt).call(this);
14216
+ A(this, ye, It).call(this);
14217
14217
  }
14218
14218
  }
14219
14219
  kt = new WeakMap(), xt = new WeakMap(), ye = new WeakSet(), Ol = async function() {
14220
14220
  const t = this.getAttribute("code") || "";
14221
14221
  try {
14222
- await navigator.clipboard.writeText(t), X(this, kt, !0), A(this, ye, Pt).call(this), setTimeout(() => {
14223
- X(this, kt, !1), A(this, ye, Pt).call(this);
14222
+ await navigator.clipboard.writeText(t), X(this, kt, !0), A(this, ye, It).call(this), setTimeout(() => {
14223
+ X(this, kt, !1), A(this, ye, It).call(this);
14224
14224
  }, 2e3);
14225
14225
  } catch (n) {
14226
14226
  console.error("Code copy failed:", n);
14227
14227
  }
14228
- }, Pt = function() {
14228
+ }, It = function() {
14229
14229
  const t = this.getAttribute("lang") || "Bash", n = this.getAttribute("code") || this.textContent.trim() || "", i = this.getAttribute("css-path");
14230
14230
  v(this, xt).innerHTML = `
14231
14231
  <style>
14232
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.140/dist/css/nine-code-block.css";
14232
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.142/dist/css/nine-code-block.css";
14233
14233
  ${i ? `@import "${i}";` : ""}
14234
14234
  </style>
14235
14235
 
@@ -14253,18 +14253,18 @@ kt = new WeakMap(), xt = new WeakMap(), ye = new WeakSet(), Ol = async function(
14253
14253
  return n.textContent = t, n.innerHTML;
14254
14254
  };
14255
14255
  typeof window < "u" && (customElements.get("nine-code-block") || customElements.define("nine-code-block", _h));
14256
- var St, Mt, wt, $, Al, Nl, Fr, Vr, Hr, vl, Wr;
14256
+ var en, tn, St, $, Al, Nl, Fr, Vr, Hr, vl, Wr;
14257
14257
  class Gh extends HTMLElement {
14258
14258
  constructor() {
14259
14259
  super();
14260
14260
  B(this, $);
14261
- B(this, St);
14262
- B(this, Mt);
14263
- B(this, wt, []);
14261
+ B(this, en);
14262
+ B(this, tn);
14263
+ B(this, St, []);
14264
14264
  this.attachShadow({ mode: "open" });
14265
14265
  }
14266
14266
  set data(t) {
14267
- X(this, wt, t), A(this, $, Nl).call(this), A(this, $, Hr).call(this);
14267
+ X(this, St, t), A(this, $, Nl).call(this), A(this, $, Hr).call(this);
14268
14268
  }
14269
14269
  connectedCallback() {
14270
14270
  A(this, $, Al).call(this), setTimeout(() => A(this, $, Hr).call(this), 300);
@@ -14274,39 +14274,23 @@ class Gh extends HTMLElement {
14274
14274
  A(this, $, Wr).call(this, t, n);
14275
14275
  }
14276
14276
  expand() {
14277
- A(this, $, Vr).call(this, "collapse"), document.body.style.width = `calc(100% - ${v(this, Mt)}px)`;
14277
+ A(this, $, Vr).call(this, "collapse"), document.body.style.width = `calc(100% - ${v(this, tn)}px)`;
14278
14278
  }
14279
14279
  collapse() {
14280
- A(this, $, Fr).call(this, "collapse"), document.body.style.width = `calc(100% - ${v(this, St)}px)`;
14280
+ A(this, $, Fr).call(this, "collapse"), document.body.style.width = `calc(100% - ${v(this, en)}px)`;
14281
14281
  }
14282
14282
  }
14283
- St = new WeakMap(), Mt = new WeakMap(), wt = new WeakMap(), $ = new WeakSet(), Al = function() {
14284
- X(this, St, Number(this.getAttribute("min-width") || 48)), X(this, Mt, Number(this.getAttribute("max-width") || 256));
14285
- const t = kn.getComponentCssPath("nineMenu.css");
14286
- this.shadowRoot.innerHTML = `
14287
- <style>
14288
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.140/dist/css/nineMenu.css";
14289
- ${t ? `@import "${t}";` : ""}
14290
- :host {
14291
- --min-width: ${v(this, St)}px;
14292
- --max-width: ${v(this, Mt)}px;
14293
- display: flex;
14294
- flex-direction: column;
14295
- }
14296
- </style>
14297
- <slot name="head"></slot>
14298
- <div class="body-wrapper" style="height: 100%; overflow: auto;"><slot></slot></div>
14299
- <slot name="foot"></slot>
14300
- `, this.addEventListener("mouseover", () => A(this, $, Fr).call(this, "hover")), this.addEventListener("mouseout", () => A(this, $, Vr).call(this, "hover")), document.body.style.float = "right", document.body.style.transition = "width 0.5s ease-in-out", this.collapse();
14283
+ en = new WeakMap(), tn = new WeakMap(), St = new WeakMap(), $ = new WeakSet(), Al = function() {
14284
+ X(this, en, Number(this.getAttribute("min-width") || 48)), X(this, tn, Number(this.getAttribute("max-width") || 256)), this.shadowRoot.innerHTML = "", this.addEventListener("mouseover", () => A(this, $, Fr).call(this, "hover")), this.addEventListener("mouseout", () => A(this, $, Vr).call(this, "hover")), document.body.style.float = "right", document.body.style.transition = "width 0.5s ease-in-out", this.collapse();
14301
14285
  }, Nl = function() {
14302
- if (!v(this, wt).length) return;
14286
+ if (!v(this, St).length) return;
14303
14287
  let t = this.querySelector("nine-side-menu-body");
14304
14288
  if (!t) {
14305
14289
  t = document.createElement("nine-side-menu-body");
14306
14290
  const n = this.querySelector("nine-side-menu-head");
14307
14291
  n ? n.after(t) : this.prepend(t);
14308
14292
  }
14309
- t.innerHTML = v(this, wt).map((n) => {
14293
+ t.innerHTML = v(this, St).map((n) => {
14310
14294
  const i = n.level === 1, s = n.isNew ? '<span style="color:#ff5722;margin-left:4px;">●</span>' : "";
14311
14295
  return `<nine-side-menu-item type="${i ? "group" : "item"}"
14312
14296
  icon-class="${i ? "icon-home" : "icon-base"}"
@@ -14344,13 +14328,7 @@ St = new WeakMap(), Mt = new WeakMap(), wt = new WeakMap(), $ = new WeakSet(), A
14344
14328
  class Yh extends HTMLElement {
14345
14329
  connectedCallback() {
14346
14330
  const e = this.getAttribute("icon-color") || "#eee", t = this.innerHTML.trim();
14347
- this.innerHTML = `
14348
- <style>
14349
- :host {
14350
- --icon-color: ${e};
14351
- }
14352
- </style>
14353
-
14331
+ this.style.setProperty("--icon-color", e), this.innerHTML = `
14354
14332
  <div class="logo-box">
14355
14333
  ${t}
14356
14334
  </div>
@@ -14380,13 +14358,7 @@ class Yh extends HTMLElement {
14380
14358
  class Xh extends HTMLElement {
14381
14359
  connectedCallback() {
14382
14360
  const e = this.getAttribute("icon-color") || "#eee", t = this.innerHTML.trim();
14383
- this.innerHTML = `
14384
- <style>
14385
- :host {
14386
- --icon-color: ${e};
14387
- }
14388
- </style>
14389
-
14361
+ this.style.setProperty("--icon-color", e), this.innerHTML = `
14390
14362
  <div class="logo-box">
14391
14363
  ${t}
14392
14364
  </div>