@qwanyx/stack 0.2.22 → 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -4035,7 +4035,7 @@ function ha() {
4035
4035
  }
4036
4036
  var v = !1, A = !1, b = !1, S = !1, E = !1, C;
4037
4037
  C = Symbol.for("react.module.reference");
4038
- function N(m) {
4038
+ function B(m) {
4039
4039
  return !!(typeof m == "string" || typeof m == "function" || m === n || m === o || E || m === s || m === a || m === c || S || m === h || v || A || b || typeof m == "object" && m !== null && (m.$$typeof === f || m.$$typeof === d || m.$$typeof === i || m.$$typeof === u || m.$$typeof === l || // This needs to include all possible module reference object
4040
4040
  // types supported by any Flight configuration anywhere since
4041
4041
  // we don't know which Flight build this will end up being used
@@ -4543,7 +4543,7 @@ Check the top-level render call using <` + R + ">.");
4543
4543
  var ki = {};
4544
4544
  function Si(m, T, R, q, Y, Z) {
4545
4545
  {
4546
- var K = N(m);
4546
+ var K = B(m);
4547
4547
  if (!K) {
4548
4548
  var V = "";
4549
4549
  (m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (V += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
@@ -4707,7 +4707,7 @@ function pf({
4707
4707
  pe(() => {
4708
4708
  E(1);
4709
4709
  }, [w, A]);
4710
- const N = () => {
4710
+ const B = () => {
4711
4711
  v(""), b({}), E(1), y(), h == null || h();
4712
4712
  }, L = {
4713
4713
  background: p.background || "#ffffff",
@@ -4739,7 +4739,7 @@ function pf({
4739
4739
  /* @__PURE__ */ x.jsx(
4740
4740
  "button",
4741
4741
  {
4742
- onClick: N,
4742
+ onClick: B,
4743
4743
  style: {
4744
4744
  marginTop: "16px",
4745
4745
  padding: "8px 16px",
@@ -4776,7 +4776,7 @@ function pf({
4776
4776
  /* @__PURE__ */ x.jsx(
4777
4777
  "button",
4778
4778
  {
4779
- onClick: N,
4779
+ onClick: B,
4780
4780
  style: {
4781
4781
  padding: "6px 12px",
4782
4782
  background: "transparent",
@@ -5003,14 +5003,14 @@ function yf({
5003
5003
  }
5004
5004
  const b = [], S = [], E = [];
5005
5005
  for (let C = 0; C < u && C < r.length; C++) {
5006
- const N = D(E);
5007
- N && (b.push(N), E.push(N._id));
5006
+ const B = D(E);
5007
+ B && (b.push(B), E.push(B._id));
5008
5008
  }
5009
5009
  for (let C = 0; C < b.length; C++) {
5010
- const N = [
5010
+ const B = [
5011
5011
  b[C]._id,
5012
5012
  ...b.filter((U, $) => $ !== C).map((U) => U._id)
5013
- ], L = D(N);
5013
+ ], L = D(B);
5014
5014
  L ? S.push(L) : S.push(b[C]);
5015
5015
  }
5016
5016
  a(b), d(S);
@@ -5018,22 +5018,22 @@ function yf({
5018
5018
  const w = Q((b) => {
5019
5019
  const S = y(), E = setTimeout(() => {
5020
5020
  h((C) => {
5021
- const N = [...C];
5022
- return N[b] = !N[b], N;
5021
+ const B = [...C];
5022
+ return B[b] = !B[b], B;
5023
5023
  }), setTimeout(() => {
5024
5024
  g((C) => {
5025
- const N = [...C];
5026
- return N[b] = !N[b], N;
5025
+ const B = [...C];
5026
+ return B[b] = !B[b], B;
5027
5027
  }), setTimeout(() => {
5028
5028
  const C = !p[b];
5029
- C && a((N) => {
5030
- const L = [...N];
5029
+ C && a((B) => {
5030
+ const L = [...B];
5031
5031
  return L[b] = c[b], L;
5032
- }), d((N) => {
5033
- const L = [...N], $ = [
5032
+ }), d((B) => {
5033
+ const L = [...B], $ = [
5034
5034
  (C ? c[b] : l[b])._id,
5035
5035
  ...l.filter((W, ee) => ee !== b).map((W) => W._id),
5036
- ...N.filter((W, ee) => ee !== b).map((W) => W._id)
5036
+ ...B.filter((W, ee) => ee !== b).map((W) => W._id)
5037
5037
  ], I = D($);
5038
5038
  return I && (L[b] = I), L;
5039
5039
  }), setTimeout(() => {
@@ -5197,21 +5197,21 @@ function _f({
5197
5197
  renderLoading: y,
5198
5198
  theme: w = {}
5199
5199
  }) {
5200
- const v = { ...ga, ...w }, [A, b] = J([]), [S, E] = J(!1), [C, N] = J(null), [L, U] = J(/* @__PURE__ */ new Set()), [$, I] = J(null), [W, ee] = J(null), [Se, Me] = J(null), [vt, ut] = J(!1), ae = Pt(() => e ? new la({ baseUrl: r, system_id: e }) : null, [r, e]), Xe = Q(async () => {
5200
+ const v = { ...ga, ...w }, [A, b] = J([]), [S, E] = J(!1), [C, B] = J(null), [L, U] = J(/* @__PURE__ */ new Set()), [$, I] = J(null), [W, ee] = J(null), [Se, Me] = J(null), [vt, ut] = J(!1), ae = Pt(() => e ? new la({ baseUrl: r, system_id: e }) : null, [r, e]), Xe = Q(async () => {
5201
5201
  if (ae) {
5202
- E(!0), N(null);
5202
+ E(!0), B(null);
5203
5203
  try {
5204
5204
  const M = await ae.listEmails(t, n, s);
5205
5205
  M != null && M.messages && (b(M.messages), h == null || h(M.messages));
5206
5206
  } catch (M) {
5207
5207
  const z = M instanceof Error ? M : new Error("Failed to fetch emails");
5208
- N(z.message), f == null || f(z);
5208
+ B(z.message), f == null || f(z);
5209
5209
  }
5210
5210
  E(!1);
5211
5211
  }
5212
5212
  }, [ae, t, n, s, f, h]);
5213
5213
  pe(() => {
5214
- b([]), U(/* @__PURE__ */ new Set()), ee(null), N(null), l && Xe();
5214
+ b([]), U(/* @__PURE__ */ new Set()), ee(null), B(null), l && Xe();
5215
5215
  }, [s, l]);
5216
5216
  const $e = Q(async (M) => {
5217
5217
  if (ae) {
@@ -5254,10 +5254,10 @@ function _f({
5254
5254
  const se = Array.from(L);
5255
5255
  U(/* @__PURE__ */ new Set()), d == null || d(se);
5256
5256
  } else
5257
- N("Failed to move emails to trash");
5257
+ B("Failed to move emails to trash");
5258
5258
  } catch (z) {
5259
5259
  const se = z instanceof Error ? z : new Error("Trash failed");
5260
- console.error("Trash error:", se), N(se.message), f == null || f(se);
5260
+ console.error("Trash error:", se), B(se.message), f == null || f(se);
5261
5261
  }
5262
5262
  }, [ae, t, L, s, d, f]), Ze = Q(async () => {
5263
5263
  if (!ae || L.size === 0) return;
@@ -5269,10 +5269,10 @@ function _f({
5269
5269
  const se = Array.from(L);
5270
5270
  U(/* @__PURE__ */ new Set()), d == null || d(se);
5271
5271
  } else
5272
- N("Failed to archive emails");
5272
+ B("Failed to archive emails");
5273
5273
  } catch (z) {
5274
5274
  const se = z instanceof Error ? z : new Error("Archive failed");
5275
- console.error("Archive error:", se), N(se.message), f == null || f(se);
5275
+ console.error("Archive error:", se), B(se.message), f == null || f(se);
5276
5276
  }
5277
5277
  }, [ae, t, L, s, d, f]), Te = Q(() => {
5278
5278
  if (L.size === A.length)
@@ -5640,7 +5640,7 @@ function Ya(r, e, t) {
5640
5640
  i !== null && ci(e, i, s, o, !1);
5641
5641
  }
5642
5642
  function Xa(r, e, t) {
5643
- if (B(r)) {
5643
+ if (N(r)) {
5644
5644
  const n = r.anchor.getNode();
5645
5645
  if (n.is(t) && r.format !== n.getFormat()) return !1;
5646
5646
  }
@@ -5679,8 +5679,8 @@ function mu(r, e, t) {
5679
5679
  const S = w[b], E = Du(S), C = S.parentNode;
5680
5680
  if (C != null && S !== l && E === null && !ds(S, C, r)) {
5681
5681
  if (mt) {
5682
- const N = S.innerText || S.nodeValue;
5683
- N && (c += N);
5682
+ const B = S.innerText || S.nodeValue;
5683
+ B && (c += B);
5684
5684
  }
5685
5685
  C.removeChild(S);
5686
5686
  }
@@ -6004,9 +6004,9 @@ function ci(r, e, t, n, s) {
6004
6004
  return;
6005
6005
  }
6006
6006
  const a = o.getParent(), c = Ur(), d = o.getTextContentSize(), f = ht(), h = o.getKey();
6007
- if (o.isToken() || f !== null && h === f && !i || B(c) && (a !== null && !a.canInsertTextBefore() && c.anchor.offset === 0 || c.anchor.key === r.__key && c.anchor.offset === 0 && !o.canInsertTextBefore() && !i || c.focus.key === r.__key && c.focus.offset === d && !o.canInsertTextAfter() && !i)) return void o.markDirty();
6007
+ if (o.isToken() || f !== null && h === f && !i || N(c) && (a !== null && !a.canInsertTextBefore() && c.anchor.offset === 0 || c.anchor.key === r.__key && c.anchor.offset === 0 && !o.canInsertTextBefore() && !i || c.focus.key === r.__key && c.focus.offset === d && !o.canInsertTextAfter() && !i)) return void o.markDirty();
6008
6008
  const p = j();
6009
- if (!B(p) || t === null || n === null) return void o.setTextContent(u);
6009
+ if (!N(p) || t === null || n === null) return void o.setTextContent(u);
6010
6010
  if (p.setTextNodeRange(o, t, o, n), o.isSegmented()) {
6011
6011
  const g = ce(o.getTextContent());
6012
6012
  o.replace(g), o = g;
@@ -6152,7 +6152,7 @@ function fi(r, e, t) {
6152
6152
  }
6153
6153
  function uc(r, e, t) {
6154
6154
  let n = r._blockCursorElement;
6155
- if (B(t) && t.isCollapsed() && t.anchor.type === "element" && e.contains(document.activeElement)) {
6155
+ if (N(t) && t.isCollapsed() && t.anchor.type === "element" && e.contains(document.activeElement)) {
6156
6156
  const s = t.anchor, o = s.getNode(), i = s.offset;
6157
6157
  let u = !1, l = null;
6158
6158
  if (i === o.getChildrenSize())
@@ -6409,26 +6409,26 @@ function pc(r, e, t) {
6409
6409
  }
6410
6410
  } else (function(p, g, _, D, y, w) {
6411
6411
  const v = D - 1, A = y - 1;
6412
- let b, S, E = w.getFirstChild(), C = 0, N = 0;
6413
- for (; C <= v && N <= A; ) {
6414
- const $ = g[C], I = _[N];
6415
- if ($ === I) E = ps(mr(I, w.element)), C++, N++;
6412
+ let b, S, E = w.getFirstChild(), C = 0, B = 0;
6413
+ for (; C <= v && B <= A; ) {
6414
+ const $ = g[C], I = _[B];
6415
+ if ($ === I) E = ps(mr(I, w.element)), C++, B++;
6416
6416
  else {
6417
6417
  b === void 0 && (b = new Set(g)), S === void 0 && (S = new Set(_));
6418
6418
  const ee = S.has($), Se = b.has(I);
6419
6419
  if (ee) if (Se) {
6420
6420
  const Me = bn(xe, I);
6421
- Me === E ? E = ps(mr(I, w.element)) : (w.withBefore(E).insertChild(Me), mr(I, w.element)), C++, N++;
6422
- } else Cn(I, w.withBefore(E)), N++;
6421
+ Me === E ? E = ps(mr(I, w.element)) : (w.withBefore(E).insertChild(Me), mr(I, w.element)), C++, B++;
6422
+ } else Cn(I, w.withBefore(E)), B++;
6423
6423
  else E = ps(Ls($)), wn($, w.element), C++;
6424
6424
  }
6425
6425
  const W = je.get(I);
6426
6426
  W !== null && P(W) && (Ue === null && (Ue = W.getFormat()), Pe === "" && (Pe = W.getStyle()));
6427
6427
  }
6428
- const L = C > v, U = N > A;
6428
+ const L = C > v, U = B > A;
6429
6429
  if (L && !U) {
6430
6430
  const $ = _[A + 1], I = $ === void 0 ? null : xe.getElementByKey($);
6431
- Fs(_, p, N, A, w.withBefore(I));
6431
+ Fs(_, p, B, A, w.withBefore(I));
6432
6432
  } else U && !L && Ns(g, C, v, w.element);
6433
6433
  })(i, f, h, a, c, u);
6434
6434
  }
@@ -6587,7 +6587,7 @@ const tt = Object.freeze({}), Ps = 30, Os = [["keydown", function(r, e) {
6587
6587
  }(t, n, o, s)) r.preventDefault(), O(e, Js, void 0);
6588
6588
  else {
6589
6589
  const u = e._editorState._selection;
6590
- u === null || B(u) ? !mt && Ji(t, o, s) && (r.preventDefault(), O(e, As, r)) : function(l, a, c, d) {
6590
+ u === null || N(u) ? !mt && Ji(t, o, s) && (r.preventDefault(), O(e, As, r)) : function(l, a, c, d) {
6591
6591
  return !a && l.toLowerCase() === "c" && (Le ? c : d);
6592
6592
  }(t, n, o, s) ? (r.preventDefault(), O(e, Pn, r)) : function(l, a, c, d) {
6593
6593
  return !a && l.toLowerCase() === "x" && (Le ? c : d);
@@ -6605,7 +6605,7 @@ const tt = Object.freeze({}), Ps = 30, Os = [["keydown", function(r, e) {
6605
6605
  }], ["compositionstart", function(r, e) {
6606
6606
  Ee(e, () => {
6607
6607
  const t = j();
6608
- if (B(t) && !e.isComposing()) {
6608
+ if (N(t) && !e.isComposing()) {
6609
6609
  const n = t.anchor, s = t.anchor.getNode();
6610
6610
  he(n.key), (r.timeStamp < wr + Ps || n.type === "element" || !t.isCollapsed() || s.getFormat() !== t.format || P(s) && s.getStyle() !== t.style) && O(e, Gt, qa);
6611
6611
  }
@@ -6617,7 +6617,7 @@ const tt = Object.freeze({}), Ps = 30, Os = [["keydown", function(r, e) {
6617
6617
  }], ["input", function(r, e) {
6618
6618
  r.stopPropagation(), Ee(e, () => {
6619
6619
  const t = j(), n = r.data, s = $u(r);
6620
- if (n != null && B(t) && Mu(t, s, n, r.timeStamp, !1)) {
6620
+ if (n != null && N(t) && Mu(t, s, n, r.timeStamp, !1)) {
6621
6621
  fr && (gs(e, n), fr = !1);
6622
6622
  const o = t.anchor.getNode(), i = Fe(e._window);
6623
6623
  if (i === null) return;
@@ -6633,7 +6633,7 @@ const tt = Object.freeze({}), Ps = 30, Os = [["keydown", function(r, e) {
6633
6633
  Ee(e, () => {
6634
6634
  const t = j(), n = Fe(e._window), s = Ur();
6635
6635
  if (n) {
6636
- if (B(t)) {
6636
+ if (N(t)) {
6637
6637
  const o = t.anchor, i = o.getNode();
6638
6638
  o.type === "element" && o.offset === 0 && t.isCollapsed() && !_e(i) && ne().getChildrenSize() === 1 && i.getTopLevelElementOrThrow().isEmpty() && s !== null && t.is(s) ? (n.removeAllRanges(), t.dirty = !0) : r.detail === 3 && !t.isCollapsed() && i !== t.focus.getNode() && (k(i) ? i.select(0) : i.getParentOrThrow().select(0));
6639
6639
  } else if (r.pointerType === "touch") {
@@ -6654,17 +6654,17 @@ pn && Os.push(["beforeinput", (r, e) => function(t, n) {
6654
6654
  if (s === "deleteContentBackward") {
6655
6655
  if (i === null) {
6656
6656
  const h = Ur();
6657
- if (!B(h)) return;
6657
+ if (!N(h)) return;
6658
6658
  He(h.clone());
6659
6659
  }
6660
- if (B(i)) {
6660
+ if (N(i)) {
6661
6661
  const h = i.anchor.key === i.focus.key;
6662
6662
  if (u = t.timeStamp, Ru === "MediaLast" && u < wr + Ps && n.isComposing() && h) {
6663
6663
  if (he(null), wr = 0, setTimeout(() => {
6664
6664
  Ee(n, () => {
6665
6665
  he(null);
6666
6666
  });
6667
- }, Ps), B(i)) {
6667
+ }, Ps), N(i)) {
6668
6668
  const p = i.anchor.getNode();
6669
6669
  p.markDirty(), i.format = p.getFormat(), P(p) || F(142), i.style = p.getStyle();
6670
6670
  }
@@ -6677,7 +6677,7 @@ pn && Os.push(["beforeinput", (r, e) => function(t, n) {
6677
6677
  }
6678
6678
  }
6679
6679
  var u;
6680
- if (!B(i)) return;
6680
+ if (!N(i)) return;
6681
6681
  const l = t.data;
6682
6682
  Wt !== null && ai(!1, n, Wt), i.dirty && Wt === null || !i.isCollapsed() || _e(i.anchor.getNode()) || o === null || i.applyDOMRange(o), Wt = null;
6683
6683
  const a = i.anchor, c = i.focus, d = a.getNode(), f = c.getNode();
@@ -6773,7 +6773,7 @@ function to(r, e, t) {
6773
6773
  if (!t) return void He(null);
6774
6774
  if (!Ir(e, n, o)) return;
6775
6775
  const u = j();
6776
- if (B(u)) {
6776
+ if (N(u)) {
6777
6777
  const l = u.anchor, a = l.getNode();
6778
6778
  if (u.isCollapsed()) {
6779
6779
  r.type === "Range" && r.anchorNode === r.focusNode && (u.dirty = !0);
@@ -6812,7 +6812,7 @@ function gs(r, e) {
6812
6812
  if (e[e.length - 1] === `
6813
6813
  `) {
6814
6814
  const n = j();
6815
- if (B(n)) {
6815
+ if (N(n)) {
6816
6816
  const s = n.focus;
6817
6817
  return n.anchor.set(s.key, s.offset, s.type), void O(r, hn, null);
6818
6818
  }
@@ -6867,16 +6867,16 @@ function Is(r, e, t) {
6867
6867
  if (s === null) return;
6868
6868
  const o = function(u) {
6869
6869
  const l = j();
6870
- if (!B(l) || !k(u)) return l;
6870
+ if (!N(l) || !k(u)) return l;
6871
6871
  const { anchor: a, focus: c } = l, d = a.getNode(), f = c.getNode();
6872
6872
  return Dr(d, u) && a.set(u.__key, 0, "element"), Dr(f, u) && c.set(u.__key, 0, "element"), l;
6873
6873
  }(r);
6874
6874
  let i = !1;
6875
- if (B(o) && e) {
6875
+ if (N(o) && e) {
6876
6876
  const u = o.anchor, l = o.focus;
6877
6877
  u.key === n && (Sn(u, r, s, r.getPreviousSibling(), r.getNextSibling()), i = !0), l.key === n && (Sn(l, r, s, r.getPreviousSibling(), r.getNextSibling()), i = !0);
6878
6878
  } else We(o) && e && r.isSelected() && r.selectPrevious();
6879
- if (B(o) && e && !i) {
6879
+ if (N(o) && e && !i) {
6880
6880
  const u = r.getIndexWithinParent();
6881
6881
  kt(r), kn(o, s, u, -1);
6882
6882
  } else kt(r);
@@ -6916,7 +6916,7 @@ class zn {
6916
6916
  if (t == null) return !1;
6917
6917
  const n = t.getNodes().some((s) => s.__key === this.__key);
6918
6918
  if (P(this)) return n;
6919
- if (B(t) && t.anchor.type === "element" && t.focus.type === "element") {
6919
+ if (N(t) && t.anchor.type === "element" && t.focus.type === "element") {
6920
6920
  if (t.isCollapsed()) return !1;
6921
6921
  const s = this.getParent();
6922
6922
  if (X(this) && this.isInline() && s) {
@@ -7120,7 +7120,7 @@ class zn {
7120
7120
  const c = s.getPreviousSibling(), d = s.getNextSibling(), f = s.__prev, h = s.__next, p = s.__parent;
7121
7121
  if (Is(s, !1, !0), c === null ? l.__first = i : c.getWritable().__next = i, u.__prev = f, d === null ? l.__last = i : d.getWritable().__prev = i, u.__next = h, u.__parent = p, l.__size = a, t && (k(this) && k(u) || F(139), this.getChildren().forEach((g) => {
7122
7122
  u.append(g);
7123
- })), B(n)) {
7123
+ })), N(n)) {
7124
7124
  He(n);
7125
7125
  const g = n.anchor, _ = n.focus;
7126
7126
  g.key === o && uo(g, u), _.key === o && uo(_, u);
@@ -7133,13 +7133,13 @@ class zn {
7133
7133
  let u = !1, l = !1;
7134
7134
  if (o !== null) {
7135
7135
  const h = e.getIndexWithinParent();
7136
- if (kt(s), B(i)) {
7136
+ if (kt(s), N(i)) {
7137
7137
  const p = o.__key, g = i.anchor, _ = i.focus;
7138
7138
  u = g.type === "element" && g.key === p && g.offset === h + 1, l = _.type === "element" && _.key === p && _.offset === h + 1;
7139
7139
  }
7140
7140
  }
7141
7141
  const a = this.getNextSibling(), c = this.getParentOrThrow().getWritable(), d = s.__key, f = n.__next;
7142
- if (a === null ? c.__last = d : a.getWritable().__prev = d, c.__size++, n.__next = d, s.__next = f, s.__prev = n.__key, s.__parent = n.__parent, t && B(i)) {
7142
+ if (a === null ? c.__last = d : a.getWritable().__prev = d, c.__size++, n.__next = d, s.__next = f, s.__prev = n.__key, s.__parent = n.__parent, t && N(i)) {
7143
7143
  const h = this.getIndexWithinParent();
7144
7144
  kn(i, c, h + 1);
7145
7145
  const p = c.__key;
@@ -7154,7 +7154,7 @@ class zn {
7154
7154
  const i = this.getPreviousSibling(), u = this.getParentOrThrow().getWritable(), l = n.__prev, a = this.getIndexWithinParent();
7155
7155
  i === null ? u.__first = o : i.getWritable().__next = o, u.__size++, n.__prev = o, s.__prev = l, s.__next = n.__key, s.__parent = n.__parent;
7156
7156
  const c = j();
7157
- return t && B(c) && kn(c, this.getParentOrThrow(), a), e;
7157
+ return t && N(c) && kn(c, this.getParentOrThrow(), a), e;
7158
7158
  }
7159
7159
  isParentRequired() {
7160
7160
  return !1;
@@ -7447,7 +7447,7 @@ class tr extends zn {
7447
7447
  const l = i.length;
7448
7448
  n === void 0 && (n = l), s === void 0 && (s = l);
7449
7449
  } else n = 0, s = 0;
7450
- if (!B(o)) return Hu(u, n, u, s, "text", "text");
7450
+ if (!N(o)) return Hu(u, n, u, s, "text", "text");
7451
7451
  {
7452
7452
  const l = ht();
7453
7453
  l !== o.anchor.key && l !== o.focus.key || he(u), o.setTextNodeRange(this, n, this, s);
@@ -7466,7 +7466,7 @@ class tr extends zn {
7466
7466
  let l = e;
7467
7467
  l < 0 && (l = u + l, l < 0 && (l = 0));
7468
7468
  const a = j();
7469
- if (s && B(a)) {
7469
+ if (s && N(a)) {
7470
7470
  const d = e + u;
7471
7471
  a.setTextNodeRange(o, d, o, d);
7472
7472
  }
@@ -7498,12 +7498,12 @@ class tr extends zn {
7498
7498
  for (let A = 1; A < c; A++) {
7499
7499
  const b = u[A], S = b.length, E = ce(b).getWritable();
7500
7500
  E.__format = p, E.__style = g, E.__detail = _;
7501
- const C = E.__key, N = v + S;
7502
- if (B(y)) {
7501
+ const C = E.__key, B = v + S;
7502
+ if (N(y)) {
7503
7503
  const L = y.anchor, U = y.focus;
7504
- L.key === s && L.type === "text" && L.offset > v && L.offset <= N && (L.key = C, L.offset -= v, y.dirty = !0), U.key === s && U.type === "text" && U.offset > v && U.offset <= N && (U.key = C, U.offset -= v, y.dirty = !0);
7504
+ L.key === s && L.type === "text" && L.offset > v && L.offset <= B && (L.key = C, L.offset -= v, y.dirty = !0), U.key === s && U.type === "text" && U.offset > v && U.offset <= B && (U.key = C, U.offset -= v, y.dirty = !0);
7505
7505
  }
7506
- o === s && he(C), v = N, w.push(E);
7506
+ o === s && he(C), v = B, w.push(E);
7507
7507
  }
7508
7508
  if (f !== null) {
7509
7509
  (function(S) {
@@ -7511,7 +7511,7 @@ class tr extends zn {
7511
7511
  E !== null && vn(E), C !== null && vn(C);
7512
7512
  })(this);
7513
7513
  const A = f.getWritable(), b = this.getIndexWithinParent();
7514
- D ? (A.splice(b, 0, w), this.remove()) : A.splice(b, 1, w), B(y) && kn(y, f, b, c - 1);
7514
+ D ? (A.splice(b, 0, w), this.remove()) : A.splice(b, 1, w), N(y) && kn(y, f, b, c - 1);
7515
7515
  }
7516
7516
  return w;
7517
7517
  }
@@ -7521,7 +7521,7 @@ class tr extends zn {
7521
7521
  const n = this.__key, s = e.__key, o = this.__text, i = o.length;
7522
7522
  ht() === s && he(n);
7523
7523
  const u = j();
7524
- if (B(u)) {
7524
+ if (N(u)) {
7525
7525
  const d = u.anchor, f = u.focus;
7526
7526
  d !== null && d.key === s && (go(d, t, n, e, i), u.dirty = !0), f !== null && f.key === s && (go(f, t, n, e, i), u.dirty = !0);
7527
7527
  }
@@ -7799,7 +7799,7 @@ class Un {
7799
7799
  return t;
7800
7800
  }
7801
7801
  }
7802
- function B(r) {
7802
+ function N(r) {
7803
7803
  return r instanceof xt;
7804
7804
  }
7805
7805
  class xt {
@@ -7813,7 +7813,7 @@ class xt {
7813
7813
  this._cachedNodes = e;
7814
7814
  }
7815
7815
  is(e) {
7816
- return !!B(e) && this.anchor.is(e.anchor) && this.focus.is(e.focus) && this.format === e.format && this.style === e.style;
7816
+ return !!N(e) && this.anchor.is(e.anchor) && this.focus.is(e.focus) && this.format === e.format && this.style === e.style;
7817
7817
  }
7818
7818
  isCollapsed() {
7819
7819
  return this.anchor.is(this.focus);
@@ -7962,8 +7962,8 @@ class xt {
7962
7962
  if (!b) {
7963
7963
  let E = y, C = null;
7964
7964
  for (; E !== null; ) {
7965
- const N = E.getChildren(), L = N.length;
7966
- (L === 0 || N[L - 1].is(C)) && (_.delete(E.__key), C = E), E = E.getParent();
7965
+ const B = E.getChildren(), L = B.length;
7966
+ (L === 0 || B[L - 1].is(C)) && (_.delete(E.__key), C = E), E = E.getParent();
7967
7967
  }
7968
7968
  }
7969
7969
  if (f.isToken()) if (l === h) f.select();
@@ -7973,8 +7973,8 @@ class xt {
7973
7973
  }
7974
7974
  else f = f.spliceText(l, h - l, e, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
7975
7975
  for (let E = 1; E < d; E++) {
7976
- const C = c[E], N = C.__key;
7977
- _.has(N) || C.remove();
7976
+ const C = c[E], B = C.__key;
7977
+ _.has(B) || C.remove();
7978
7978
  }
7979
7979
  }
7980
7980
  }
@@ -8047,7 +8047,7 @@ class xt {
8047
8047
  if (this.anchor.key === "root") {
8048
8048
  this.insertParagraph();
8049
8049
  const p = j();
8050
- return B(p) || F(134), p.insertNodes(e);
8050
+ return N(p) || F(134), p.insertNodes(e);
8051
8051
  }
8052
8052
  const t = (this.isBackward() ? this.focus : this.anchor).getNode(), n = dr(t, dt), s = e[e.length - 1];
8053
8053
  if (k(n) && "__language" in n) {
@@ -8340,7 +8340,7 @@ function Vu(r, e, t) {
8340
8340
  const n = r.isBefore(e), s = r.is(e);
8341
8341
  fo(r, n, s), fo(e, !n, s), s && (e.key = r.key, e.offset = r.offset, e.type = r.type);
8342
8342
  const o = re();
8343
- if (o.isComposing() && o._compositionKey !== r.key && B(t)) {
8343
+ if (o.isComposing() && o._compositionKey !== r.key && N(t)) {
8344
8344
  const i = t.anchor, u = t.focus;
8345
8345
  ft(r, i.key, i.offset, i.type), ft(e, u.key, u.offset, u.type);
8346
8346
  }
@@ -8348,9 +8348,9 @@ function Vu(r, e, t) {
8348
8348
  }
8349
8349
  function Ku(r, e, t, n, s, o) {
8350
8350
  if (r === null || t === null || !Ir(s, r, t)) return null;
8351
- const i = co(r, e, B(o) ? o.anchor : null, s);
8351
+ const i = co(r, e, N(o) ? o.anchor : null, s);
8352
8352
  if (i === null) return null;
8353
- const u = co(t, n, B(o) ? o.focus : null, s);
8353
+ const u = co(t, n, N(o) ? o.focus : null, s);
8354
8354
  if (u === null) return null;
8355
8355
  if (i.type === "element" && u.type === "element") {
8356
8356
  const l = Vt(r), a = Vt(t);
@@ -8377,13 +8377,13 @@ function mi(r, e, t, n) {
8377
8377
  if (s === null) return null;
8378
8378
  const o = n || s.event, i = o ? o.type : void 0, u = i === "selectionchange", l = !Es && (u || i === "beforeinput" || i === "compositionstart" || i === "compositionend" || i === "click" && o && o.detail === 3 || i === "drop" || i === void 0);
8379
8379
  let a, c, d, f;
8380
- if (B(r) && !l) return r.clone();
8380
+ if (N(r) && !l) return r.clone();
8381
8381
  if (e === null) return null;
8382
- if (a = e.anchorNode, c = e.focusNode, d = e.anchorOffset, f = e.focusOffset, u && B(r) && !Ir(t, a, c)) return r.clone();
8382
+ if (a = e.anchorNode, c = e.focusNode, d = e.anchorOffset, f = e.focusOffset, u && N(r) && !Ir(t, a, c)) return r.clone();
8383
8383
  const h = Ku(a, d, c, f, t, r);
8384
8384
  if (h === null) return null;
8385
8385
  const [p, g] = h;
8386
- return new xt(p, g, B(r) ? r.format : 0, B(r) ? r.style : "");
8386
+ return new xt(p, g, N(r) ? r.format : 0, N(r) ? r.style : "");
8387
8387
  }
8388
8388
  function j() {
8389
8389
  return it()._selection;
@@ -8450,16 +8450,16 @@ function go(r, e, t, n, s) {
8450
8450
  function Ec(r, e, t, n, s, o, i) {
8451
8451
  const u = n.anchorNode, l = n.focusNode, a = n.anchorOffset, c = n.focusOffset, d = document.activeElement;
8452
8452
  if (s.has("collaboration") && d !== o || d !== null && oi(d)) return;
8453
- if (!B(e)) return void (r !== null && Ir(t, u, l) && n.removeAllRanges());
8453
+ if (!N(e)) return void (r !== null && Ir(t, u, l) && n.removeAllRanges());
8454
8454
  const f = e.anchor, h = e.focus, p = f.key, g = h.key, _ = bn(t, p), D = bn(t, g), y = f.offset, w = h.offset, v = e.format, A = e.style, b = e.isCollapsed();
8455
8455
  let S = _, E = D, C = !1;
8456
8456
  if (f.type === "text") {
8457
8457
  S = _n(_);
8458
8458
  const W = f.getNode();
8459
8459
  C = W.getFormat() !== v || W.getStyle() !== A;
8460
- } else B(r) && r.anchor.type === "text" && (C = !0);
8461
- var N, L, U, $, I;
8462
- if (h.type === "text" && (E = _n(D)), S !== null && E !== null && (b && (r === null || C || B(r) && (r.format !== v || r.style !== A)) && (N = v, L = A, U = y, $ = p, I = performance.now(), Iu = [N, L, U, $, I]), a !== y || c !== w || u !== S || l !== E || n.type === "Range" && b || (d !== null && o.contains(d) || o.focus({ preventScroll: !0 }), f.type === "element"))) {
8460
+ } else N(r) && r.anchor.type === "text" && (C = !0);
8461
+ var B, L, U, $, I;
8462
+ if (h.type === "text" && (E = _n(D)), S !== null && E !== null && (b && (r === null || C || N(r) && (r.format !== v || r.style !== A)) && (B = v, L = A, U = y, $ = p, I = performance.now(), Iu = [B, L, U, $, I]), a !== y || c !== w || u !== S || l !== E || n.type === "Range" && b || (d !== null && o.contains(d) || o.focus({ preventScroll: !0 }), f.type === "element"))) {
8463
8463
  try {
8464
8464
  n.setBaseAndExtent(S, y, E, w);
8465
8465
  } catch {
@@ -8508,7 +8508,7 @@ function xs(r) {
8508
8508
  let e = r;
8509
8509
  r.isCollapsed() || e.removeText();
8510
8510
  const t = j();
8511
- B(t) && (e = t), B(e) || F(161);
8511
+ N(t) && (e = t), N(e) || F(161);
8512
8512
  const n = e.anchor;
8513
8513
  let s = n.getNode(), o = n.offset;
8514
8514
  for (; !dt(s); ) [s, o] = Sc(s, o);
@@ -8634,9 +8634,9 @@ function pt(r, e) {
8634
8634
  l && (r._dirtyType = Tt, r._cloneNotNeeded.clear(), r._dirtyLeaves = /* @__PURE__ */ new Set(), r._dirtyElements = /* @__PURE__ */ new Map(), r._normalizedNodes = /* @__PURE__ */ new Set(), r._updateTags = /* @__PURE__ */ new Set()), function(b, S) {
8635
8635
  const E = b._decorators;
8636
8636
  let C = b._pendingDecorators || E;
8637
- const N = S._nodeMap;
8637
+ const B = S._nodeMap;
8638
8638
  let L;
8639
- for (L in C) N.has(L) || (C === E && (C = wu(b)), delete C[L]);
8639
+ for (L in C) B.has(L) || (C === E && (C = wu(b)), delete C[L]);
8640
8640
  }(r, t);
8641
8641
  const v = s ? null : Fe(r._window);
8642
8642
  if (r._editable && v !== null && (l || u === null || u.dirty)) {
@@ -8651,17 +8651,17 @@ function pt(r, e) {
8651
8651
  fe = d, de = a;
8652
8652
  }
8653
8653
  }
8654
- p !== null && function(b, S, E, C, N) {
8654
+ p !== null && function(b, S, E, C, B) {
8655
8655
  const L = Array.from(b._listeners.mutation), U = L.length;
8656
8656
  for (let $ = 0; $ < U; $++) {
8657
8657
  const [I, W] = L[$], ee = S.get(W);
8658
- ee !== void 0 && I(ee, { dirtyLeaves: C, prevEditorState: N, updateTags: E });
8658
+ ee !== void 0 && I(ee, { dirtyLeaves: C, prevEditorState: B, updateTags: E });
8659
8659
  }
8660
- }(r, p, y, g, o), B(u) || u === null || i !== null && i.is(u) || r.dispatchCommand(Hs, void 0);
8660
+ }(r, p, y, g, o), N(u) || u === null || i !== null && i.is(u) || r.dispatchCommand(Hs, void 0);
8661
8661
  const A = r._pendingDecorators;
8662
8662
  A !== null && (r._decorators = A, r._pendingDecorators = null, Ar("decorator", r, !0, A)), function(b, S, E) {
8663
- const C = Wi(S), N = Wi(E);
8664
- C !== N && Ar("textcontent", b, !0, N);
8663
+ const C = Wi(S), B = Wi(E);
8664
+ C !== B && Ar("textcontent", b, !0, B);
8665
8665
  }(r, e || o, t), Ar("update", r, !0, { dirtyElements: _, dirtyLeaves: g, editorState: t, normalizedNodes: D, prevEditorState: e || o, tags: y }), function(b, S) {
8666
8666
  if (b._deferred = [], S.length !== 0) {
8667
8667
  const E = b._updating;
@@ -8677,8 +8677,8 @@ function pt(r, e) {
8677
8677
  if (S.length !== 0) {
8678
8678
  const E = S.shift();
8679
8679
  if (E) {
8680
- const [C, N] = E;
8681
- Xu(b, C, N);
8680
+ const [C, B] = E;
8681
+ Xu(b, C, B);
8682
8682
  }
8683
8683
  }
8684
8684
  }(r);
@@ -8745,12 +8745,12 @@ function Xu(r, e, t) {
8745
8745
  try {
8746
8746
  a && (r._headless ? u._selection !== null && (l._selection = u._selection.clone()) : l._selection = function(D) {
8747
8747
  const y = D.getEditorState()._selection, w = Fe(D._window);
8748
- return B(y) || y == null ? mi(y, w, D, null) : y.clone();
8748
+ return N(y) || y == null ? mi(y, w, D, null) : y.clone();
8749
8749
  }(r));
8750
8750
  const g = r._compositionKey;
8751
8751
  e(), o = vo(r, o), function(D, y) {
8752
8752
  const w = y.getEditorState()._selection, v = D._selection;
8753
- if (B(v)) {
8753
+ if (N(v)) {
8754
8754
  const A = v.anchor, b = v.focus;
8755
8755
  let S;
8756
8756
  if (A.type === "text" && (S = A.getNode(), S.selectionTransform(w, v)), b.type === "text") {
@@ -8766,7 +8766,7 @@ function Xu(r, e, t) {
8766
8766
  }
8767
8767
  }(l, r) : function(D, y) {
8768
8768
  const w = y._dirtyLeaves, v = y._dirtyElements, A = D._nodeMap, b = ht(), S = /* @__PURE__ */ new Map();
8769
- let E = w, C = E.size, N = v, L = N.size;
8769
+ let E = w, C = E.size, B = v, L = B.size;
8770
8770
  for (; C > 0 || L > 0; ) {
8771
8771
  if (C > 0) {
8772
8772
  y._dirtyLeaves = /* @__PURE__ */ new Set();
@@ -8780,13 +8780,13 @@ function Xu(r, e, t) {
8780
8780
  }
8781
8781
  }
8782
8782
  y._dirtyLeaves = /* @__PURE__ */ new Set(), y._dirtyElements = /* @__PURE__ */ new Map();
8783
- for (const U of N) {
8783
+ for (const U of B) {
8784
8784
  const $ = U[0], I = U[1];
8785
8785
  if ($ !== "root" && !I) continue;
8786
8786
  const W = A.get($);
8787
8787
  W !== void 0 && _o(W, b) && yo(y, W, S), v.set($, I);
8788
8788
  }
8789
- E = y._dirtyLeaves, C = E.size, N = y._dirtyElements, L = N.size, cn++;
8789
+ E = y._dirtyLeaves, C = E.size, B = y._dirtyElements, L = B.size, cn++;
8790
8790
  }
8791
8791
  y._dirtyLeaves = w, y._dirtyElements = v;
8792
8792
  }(l, r), vo(r), function(D, y, w, v) {
@@ -8802,7 +8802,7 @@ function Xu(r, e, t) {
8802
8802
  }
8803
8803
  }(u, l, r._dirtyLeaves, r._dirtyElements)), g !== r._compositionKey && (l._flushSync = !0);
8804
8804
  const _ = l._selection;
8805
- if (B(_)) {
8805
+ if (N(_)) {
8806
8806
  const D = l._nodeMap, y = _.anchor.key, w = _.focus.key;
8807
8807
  D.get(y) !== void 0 && D.get(w) !== void 0 || F(19);
8808
8808
  } else We(_) && _._nodes.size === 0 && (l._selection = null);
@@ -9076,7 +9076,7 @@ class ot extends zn {
9076
9076
  }
9077
9077
  s === void 0 && (s = i), o === void 0 && (o = i);
9078
9078
  const u = this.__key;
9079
- return B(n) ? (n.anchor.set(u, s, "element"), n.focus.set(u, o, "element"), n.dirty = !0, n) : Hu(u, s, u, o, "element", "element");
9079
+ return N(n) ? (n.anchor.set(u, s, "element"), n.focus.set(u, o, "element"), n.dirty = !0, n) : Hu(u, s, u, o, "element", "element");
9080
9080
  }
9081
9081
  selectStart() {
9082
9082
  const e = this.getFirstDescendant();
@@ -9149,7 +9149,7 @@ class ot extends zn {
9149
9149
  }
9150
9150
  if (i.__size = f, a.length) {
9151
9151
  const p = j();
9152
- if (B(p)) {
9152
+ if (N(p)) {
9153
9153
  const g = new Set(a), _ = new Set(l), { anchor: D, focus: y } = p;
9154
9154
  Do(D, g, _) && Sn(D, D.getNode(), this, d, c), Do(y, g, _) && Sn(y, y.getNode(), this, d, c), f !== 0 || this.canBeEmpty() || Ge(this) || this.remove();
9155
9155
  }
@@ -9939,7 +9939,7 @@ function nd(r) {
9939
9939
  const [a, c, d, f, h, p] = l;
9940
9940
  r.update(() => {
9941
9941
  const g = j();
9942
- if (B(g)) {
9942
+ if (N(g)) {
9943
9943
  const _ = g.anchor;
9944
9944
  let D = _.getNode(), y = 0, w = 0;
9945
9945
  if (P(D) && a >= 0 && c >= 0 && (y = a, w = a + c, g.setTextNodeRange(D, y, D, w)), y === w && d === "" || (g.insertRawText(d), D = _.getNode()), P(D)) {
@@ -10070,10 +10070,10 @@ var Tn = id(function(r) {
10070
10070
  throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
10071
10071
  });
10072
10072
  function od(r, e = j()) {
10073
- return e == null && Tn(166), B(e) && e.isCollapsed() || e.getNodes().length === 0 ? "" : al(r, e);
10073
+ return e == null && Tn(166), N(e) && e.isCollapsed() || e.getNodes().length === 0 ? "" : al(r, e);
10074
10074
  }
10075
10075
  function ud(r, e = j()) {
10076
- return e == null && Tn(166), B(e) && e.isCollapsed() || e.getNodes().length === 0 ? null : JSON.stringify(ld(r, e));
10076
+ return e == null && Tn(166), N(e) && e.isCollapsed() || e.getNodes().length === 0 ? null : JSON.stringify(ld(r, e));
10077
10077
  }
10078
10078
  function Eo(r, e, t) {
10079
10079
  const n = r.getData("application/x-lexical-editor");
@@ -10092,12 +10092,12 @@ function Eo(r, e, t) {
10092
10092
  } catch {
10093
10093
  }
10094
10094
  const o = r.getData("text/plain") || r.getData("text/uri-list");
10095
- if (o != null) if (B(e)) {
10095
+ if (o != null) if (N(e)) {
10096
10096
  const i = o.split(/(\r?\n|\t)/);
10097
10097
  i[i.length - 1] === "" && i.pop();
10098
10098
  for (let u = 0; u < i.length; u++) {
10099
10099
  const l = j();
10100
- if (B(l)) {
10100
+ if (N(l)) {
10101
10101
  const a = i[u];
10102
10102
  a === `
10103
10103
  ` || a === `\r
@@ -10358,7 +10358,7 @@ function on(r) {
10358
10358
  }
10359
10359
  function Po(r) {
10360
10360
  const e = j();
10361
- if (!B(e)) return !1;
10361
+ if (!N(e)) return !1;
10362
10362
  const t = /* @__PURE__ */ new Set(), n = e.getNodes();
10363
10363
  for (let s = 0; s < n.length; s++) {
10364
10364
  const o = n[s], i = o.getKey();
@@ -10380,13 +10380,13 @@ function xd(r) {
10380
10380
  return !!We(t) && (t.clear(), !0);
10381
10381
  }, 0), r.registerCommand(Et, (e) => {
10382
10382
  const t = j();
10383
- return !!B(t) && (t.deleteCharacter(e), !0);
10383
+ return !!N(t) && (t.deleteCharacter(e), !0);
10384
10384
  }, G), r.registerCommand(Tr, (e) => {
10385
10385
  const t = j();
10386
- return !!B(t) && (t.deleteWord(e), !0);
10386
+ return !!N(t) && (t.deleteWord(e), !0);
10387
10387
  }, G), r.registerCommand(Br, (e) => {
10388
10388
  const t = j();
10389
- return !!B(t) && (t.deleteLine(e), !0);
10389
+ return !!N(t) && (t.deleteLine(e), !0);
10390
10390
  }, G), r.registerCommand(Gt, (e) => {
10391
10391
  const t = j();
10392
10392
  if (typeof e == "string") t !== null && t.insertText(e);
@@ -10394,7 +10394,7 @@ function xd(r) {
10394
10394
  if (t === null) return !1;
10395
10395
  const n = e.dataTransfer;
10396
10396
  if (n != null) Eo(n, t, r);
10397
- else if (B(t)) {
10397
+ else if (N(t)) {
10398
10398
  const s = e.data;
10399
10399
  return s && t.insertText(s), !0;
10400
10400
  }
@@ -10402,13 +10402,13 @@ function xd(r) {
10402
10402
  return !0;
10403
10403
  }, G), r.registerCommand(Cs, () => {
10404
10404
  const e = j();
10405
- return !!B(e) && (e.removeText(), !0);
10405
+ return !!N(e) && (e.removeText(), !0);
10406
10406
  }, G), r.registerCommand(Re, (e) => {
10407
10407
  const t = j();
10408
- return !!B(t) && (t.formatText(e), !0);
10408
+ return !!N(t) && (t.formatText(e), !0);
10409
10409
  }, G), r.registerCommand(ka, (e) => {
10410
10410
  const t = j();
10411
- if (!B(t) && !We(t)) return !1;
10411
+ if (!N(t) && !We(t)) return !1;
10412
10412
  const n = t.getNodes();
10413
10413
  for (const s of n) {
10414
10414
  const o = Kn(s, (i) => k(i) && !i.isInline());
@@ -10417,10 +10417,10 @@ function xd(r) {
10417
10417
  return !0;
10418
10418
  }, G), r.registerCommand(Ht, (e) => {
10419
10419
  const t = j();
10420
- return !!B(t) && (t.insertLineBreak(e), !0);
10420
+ return !!N(t) && (t.insertLineBreak(e), !0);
10421
10421
  }, G), r.registerCommand(Sr, () => {
10422
10422
  const e = j();
10423
- return !!B(e) && (e.insertParagraph(), !0);
10423
+ return !!N(e) && (e.insertParagraph(), !0);
10424
10424
  }, G), r.registerCommand(Aa, () => (kc([zr()]), !0), G), r.registerCommand(Ea, () => Po((e) => {
10425
10425
  const t = e.getIndent();
10426
10426
  e.setIndent(t + 1);
@@ -10432,7 +10432,7 @@ function xd(r) {
10432
10432
  if (We(t) && !un(e.target)) {
10433
10433
  const n = t.getNodes();
10434
10434
  if (n.length > 0) return n[0].selectPrevious(), !0;
10435
- } else if (B(t)) {
10435
+ } else if (N(t)) {
10436
10436
  const n = Nr(t.focus, !0);
10437
10437
  if (!e.shiftKey && X(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
10438
10438
  }
@@ -10442,7 +10442,7 @@ function xd(r) {
10442
10442
  if (We(t)) {
10443
10443
  const n = t.getNodes();
10444
10444
  if (n.length > 0) return n[0].selectNext(0, 0), !0;
10445
- } else if (B(t)) {
10445
+ } else if (N(t)) {
10446
10446
  if (function(s) {
10447
10447
  const o = s.focus;
10448
10448
  return o.key === "root" && o.offset === ne().getChildrenSize();
@@ -10457,7 +10457,7 @@ function xd(r) {
10457
10457
  const n = t.getNodes();
10458
10458
  if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
10459
10459
  }
10460
- if (!B(t)) return !1;
10460
+ if (!N(t)) return !1;
10461
10461
  if (wo(t, !0)) {
10462
10462
  const n = e.shiftKey;
10463
10463
  return e.preventDefault(), Co(t, n, !0), !0;
@@ -10469,22 +10469,22 @@ function xd(r) {
10469
10469
  const s = t.getNodes();
10470
10470
  if (s.length > 0) return e.preventDefault(), s[0].selectNext(0, 0), !0;
10471
10471
  }
10472
- if (!B(t)) return !1;
10472
+ if (!N(t)) return !1;
10473
10473
  const n = e.shiftKey;
10474
10474
  return !!wo(t, !1) && (e.preventDefault(), Co(t, n, !1), !0);
10475
10475
  }, G), r.registerCommand(ou, (e) => {
10476
10476
  if (un(e.target)) return !1;
10477
10477
  const t = j();
10478
- if (!B(t)) return !1;
10478
+ if (!N(t)) return !1;
10479
10479
  const { anchor: n } = t, s = n.getNode();
10480
10480
  return t.isCollapsed() && n.offset === 0 && !_e(s) && rd(s).getIndent() > 0 ? (e.preventDefault(), r.dispatchCommand(Ii, void 0)) : (!No || navigator.language !== "ko-KR") && (e.preventDefault(), r.dispatchCommand(Et, !0));
10481
10481
  }, G), r.registerCommand(lu, (e) => {
10482
10482
  if (un(e.target)) return !1;
10483
10483
  const t = j();
10484
- return !!B(t) && (e.preventDefault(), r.dispatchCommand(Et, !1));
10484
+ return !!N(t) && (e.preventDefault(), r.dispatchCommand(Et, !1));
10485
10485
  }, G), r.registerCommand(hn, (e) => {
10486
10486
  const t = j();
10487
- if (!B(t)) return !1;
10487
+ if (!N(t)) return !1;
10488
10488
  if (e !== null) {
10489
10489
  if ((No || gd || yd) && pd) return !1;
10490
10490
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(Ht, !1);
@@ -10492,7 +10492,7 @@ function xd(r) {
10492
10492
  return r.dispatchCommand(Sr, void 0);
10493
10493
  }, G), r.registerCommand(uu, () => {
10494
10494
  const e = j();
10495
- return !!B(e) && (r.blur(), !0);
10495
+ return !!N(e) && (r.blur(), !0);
10496
10496
  }, G), r.registerCommand(au, (e) => {
10497
10497
  const [, t] = on(e);
10498
10498
  if (t.length > 0) {
@@ -10514,13 +10514,13 @@ function xd(r) {
10514
10514
  return e.preventDefault(), !0;
10515
10515
  }
10516
10516
  const n = j();
10517
- return !!B(n);
10517
+ return !!N(n);
10518
10518
  }, G), r.registerCommand(cu, (e) => {
10519
10519
  const [t] = on(e), n = j();
10520
- return !(t && !B(n));
10520
+ return !(t && !N(n));
10521
10521
  }, G), r.registerCommand(du, (e) => {
10522
10522
  const [t] = on(e), n = j();
10523
- if (t && !B(n)) return !1;
10523
+ if (t && !N(n)) return !1;
10524
10524
  const s = Bo(e.clientX, e.clientY);
10525
10525
  if (s !== null) {
10526
10526
  const o = Xt(s.node);
@@ -10530,7 +10530,7 @@ function xd(r) {
10530
10530
  }, G), r.registerCommand(As, () => (ic(), !0), G), r.registerCommand(Pn, (e) => (So(r, gt(e, ClipboardEvent) ? e : null), !0), G), r.registerCommand(Qs, (e) => (async function(t, n) {
10531
10531
  await So(n, gt(t, ClipboardEvent) ? t : null), n.update(() => {
10532
10532
  const s = j();
10533
- B(s) ? s.removeText() : We(s) && s.getNodes().forEach((o) => o.remove());
10533
+ N(s) ? s.removeText() : We(s) && s.getNodes().forEach((o) => o.remove());
10534
10534
  });
10535
10535
  }(e, r), !0), G), r.registerCommand(Ln, (e) => {
10536
10536
  const [, t, n] = on(e);
@@ -10589,7 +10589,7 @@ const pl = typeof window < "u" && window.document !== void 0 && window.document.
10589
10589
  function Dd({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: s, ariaErrorMessage: o, ariaExpanded: i, ariaInvalid: u, ariaLabel: l, ariaLabelledBy: a, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: h, className: p, id: g, role: _ = "textbox", spellCheck: D = !0, style: y, tabIndex: w, "data-testid": v, ...A }, b) {
10590
10590
  const [S, E] = J(r.isEditable()), C = Q((L) => {
10591
10591
  L && L.ownerDocument && L.ownerDocument.defaultView ? r.setRootElement(L) : r.setRootElement(null);
10592
- }, [r]), N = Pt(() => /* @__PURE__ */ function(...L) {
10592
+ }, [r]), B = Pt(() => /* @__PURE__ */ function(...L) {
10593
10593
  return (U) => {
10594
10594
  L.forEach(($) => {
10595
10595
  typeof $ == "function" ? $(U) : $ != null && ($.current = U);
@@ -10598,7 +10598,7 @@ function Dd({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaContr
10598
10598
  }(b, C), [C, b]);
10599
10599
  return pl(() => (E(r.isEditable()), r.registerEditableListener((L) => {
10600
10600
  E(L);
10601
- })), [r]), x.jsx("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? n : void 0, "aria-describedby": s, ...o != null ? { "aria-errormessage": o } : {}, "aria-expanded": S && _ === "combobox" ? !!i : void 0, ...u != null ? { "aria-invalid": u } : {}, "aria-label": l, "aria-labelledby": a, "aria-multiline": c, "aria-owns": S ? d : void 0, "aria-readonly": !S || void 0, "aria-required": f, autoCapitalize: h, className: p, contentEditable: S, "data-testid": v, id: g, ref: N, role: S ? _ : void 0, spellCheck: D, style: y, tabIndex: w, ...A });
10601
+ })), [r]), x.jsx("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? n : void 0, "aria-describedby": s, ...o != null ? { "aria-errormessage": o } : {}, "aria-expanded": S && _ === "combobox" ? !!i : void 0, ...u != null ? { "aria-invalid": u } : {}, "aria-label": l, "aria-labelledby": a, "aria-multiline": c, "aria-owns": S ? d : void 0, "aria-readonly": !S || void 0, "aria-required": f, autoCapitalize: h, className: p, contentEditable: S, "data-testid": v, id: g, ref: B, role: S ? _ : void 0, spellCheck: D, style: y, tabIndex: w, ...A });
10602
10602
  }
10603
10603
  const wd = Qo(Dd);
10604
10604
  function Ro(r) {
@@ -10635,7 +10635,7 @@ function Bd(r, e, t, n, s) {
10635
10635
  if (r === null || t.size === 0 && n.size === 0 && !s) return Oe;
10636
10636
  const o = e._selection, i = r._selection;
10637
10637
  if (s) return kd;
10638
- if (!(B(o) && B(i) && i.isCollapsed() && o.isCollapsed())) return Oe;
10638
+ if (!(N(o) && N(i) && i.isCollapsed() && o.isCollapsed())) return Oe;
10639
10639
  const u = function(D, y, w) {
10640
10640
  const v = D._nodeMap, A = [];
10641
10641
  for (const b of y) {
@@ -10675,7 +10675,7 @@ function Nd(r, e) {
10675
10675
  const g = o._selection;
10676
10676
  return u.size > 0 || l.size > 0 ? p === !1 && d !== Oe && d === n && c < t + e && h || u.size === 1 && function(_, D, y) {
10677
10677
  const w = D._nodeMap.get(_), v = y._nodeMap.get(_), A = D._selection, b = y._selection;
10678
- return !(B(A) && B(b) && A.anchor.type === "element" && A.focus.type === "element" && b.anchor.type === "text" && b.focus.type === "text" || !P(w) || !P(v) || w.__parent !== v.__parent) && JSON.stringify(D.read(() => w.exportJSON())) === JSON.stringify(y.read(() => v.exportJSON()));
10678
+ return !(N(A) && N(b) && A.anchor.type === "element" && A.focus.type === "element" && b.anchor.type === "text" && b.focus.type === "text" || !P(w) || !P(v) || w.__parent !== v.__parent) && JSON.stringify(D.read(() => w.exportJSON())) === JSON.stringify(y.read(() => v.exportJSON()));
10679
10679
  }(Array.from(u)[0], s, o) ? ln : zs : g !== null ? ln : Us;
10680
10680
  })();
10681
10681
  return t = c, n = d, f;
@@ -10825,7 +10825,7 @@ function qo(r, e) {
10825
10825
  const t = j();
10826
10826
  if (t !== null) {
10827
10827
  const n = t.getNodes();
10828
- if (B(t)) {
10828
+ if (N(t)) {
10829
10829
  const o = t.getStartEndPoints();
10830
10830
  o === null && Ve(143);
10831
10831
  const [i] = o, u = i.getNode(), l = u.getParent();
@@ -10896,7 +10896,7 @@ function bi(r, e) {
10896
10896
  function qd(r) {
10897
10897
  r.update(() => {
10898
10898
  const e = j();
10899
- if (B(e)) {
10899
+ if (N(e)) {
10900
10900
  const t = /* @__PURE__ */ new Set(), n = e.getNodes(), s = e.anchor.getNode();
10901
10901
  if (ml(s, n)) t.add(Vs(s));
10902
10902
  else for (let o = 0; o < n.length; o++) {
@@ -10960,7 +10960,7 @@ function Ud(r) {
10960
10960
  }
10961
10961
  function Wd() {
10962
10962
  const r = j();
10963
- if (!B(r) || !r.isCollapsed()) return !1;
10963
+ if (!N(r) || !r.isCollapsed()) return !1;
10964
10964
  const e = r.anchor.getNode();
10965
10965
  if (!te(e) || e.getChildrenSize() !== 0) return !1;
10966
10966
  const t = Vs(e), n = e.getParent();
@@ -11141,7 +11141,7 @@ class Rt extends ot {
11141
11141
  return Zt(e) || te(e);
11142
11142
  }
11143
11143
  extractWithChild(e, t) {
11144
- if (!B(t)) return !1;
11144
+ if (!N(t)) return !1;
11145
11145
  const n = t.anchor.getNode(), s = t.focus.getNode();
11146
11146
  return this.isParentOf(n) && this.isParentOf(s) && this.getTextContent().length === t.getTextContent().length;
11147
11147
  }
@@ -11417,7 +11417,7 @@ class jt extends ot {
11417
11417
  return !0;
11418
11418
  }
11419
11419
  extractWithChild(e, t, n) {
11420
- if (!B(t)) return !1;
11420
+ if (!N(t)) return !1;
11421
11421
  const s = t.anchor.getNode(), o = t.focus.getNode();
11422
11422
  return this.isParentOf(s) && this.isParentOf(o) && t.getTextContent().length > 0;
11423
11423
  }
@@ -11493,7 +11493,7 @@ function Zd(r) {
11493
11493
  const Jo = Or();
11494
11494
  function bs(r, e = {}) {
11495
11495
  const { target: t, title: n } = e, s = e.rel === void 0 ? "noreferrer" : e.rel, o = j();
11496
- if (!B(o)) return;
11496
+ if (!N(o)) return;
11497
11497
  const i = o.extract();
11498
11498
  if (r === null) i.forEach((u) => {
11499
11499
  const l = Kn(u, (a) => !Zd(a) && hr(a));
@@ -11542,7 +11542,7 @@ function ef({ validateUrl: r, attributes: e }) {
11542
11542
  }
11543
11543
  }, Kt), r !== void 0 ? t.registerCommand(Ln, (n) => {
11544
11544
  const s = j();
11545
- if (!B(s) || s.isCollapsed() || !gt(n, ClipboardEvent)) return !1;
11545
+ if (!N(s) || s.isCollapsed() || !gt(n, ClipboardEvent)) return !1;
11546
11546
  const o = n;
11547
11547
  if (o.clipboardData === null) return !1;
11548
11548
  const i = o.clipboardData.getData("text");
@@ -11594,7 +11594,7 @@ function nf({ theme: r, disabled: e }) {
11594
11594
  }, [t]), l = Q(() => {
11595
11595
  t.update(() => {
11596
11596
  const d = j();
11597
- B(d) && Jc(d, () => vi());
11597
+ N(d) && Jc(d, () => vi());
11598
11598
  });
11599
11599
  }, [t]), a = {
11600
11600
  display: "flex",
@@ -11967,21 +11967,27 @@ function bf({
11967
11967
  }) {
11968
11968
  const d = { ...uf, ...a }, [f, h] = J(!1), [p, g] = J(""), _ = kr(null), D = kr(null);
11969
11969
  pe(() => {
11970
- function C(N) {
11971
- _.current && !_.current.contains(N.target) && (h(!1), g(""));
11970
+ function C(B) {
11971
+ _.current && !_.current.contains(B.target) && (h(!1), g(""));
11972
11972
  }
11973
11973
  return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
11974
11974
  }, []);
11975
11975
  const y = r.filter(
11976
- (C) => C.label.toLowerCase().includes(p.toLowerCase()) && !e.includes(C.id)
11977
- ), w = s && p.trim() && !r.some((C) => C.label.toLowerCase() === p.toLowerCase()), v = e.map((C) => r.find((N) => N.id === C)).filter(Boolean), A = Q((C) => {
11978
- var N;
11979
- l > 0 && e.length >= l || (t([...e, C]), g(""), (N = D.current) == null || N.focus());
11976
+ (C) => {
11977
+ var B;
11978
+ return ((B = C.label) == null ? void 0 : B.toLowerCase().includes(p.toLowerCase())) && !e.includes(C.id);
11979
+ }
11980
+ ), w = s && p.trim() && !r.some((C) => {
11981
+ var B;
11982
+ return ((B = C.label) == null ? void 0 : B.toLowerCase()) === p.toLowerCase();
11983
+ }), v = e.map((C) => r.find((B) => B.id === C)).filter(Boolean), A = Q((C) => {
11984
+ var B;
11985
+ l > 0 && e.length >= l || (t([...e, C]), g(""), (B = D.current) == null || B.focus());
11980
11986
  }, [e, t, l]), b = Q((C) => {
11981
- t(e.filter((N) => N !== C));
11982
- }, [e, t]), S = Q(() => {
11987
+ t(e.filter((B) => B !== C));
11988
+ }, [e, t]), S = Q(async () => {
11983
11989
  if (!w) return;
11984
- const C = o == null ? void 0 : o(p.trim());
11990
+ const C = await (o == null ? void 0 : o(p.trim()));
11985
11991
  C && A(C.id), g("");
11986
11992
  }, [w, p, o, A]), E = Q((C) => {
11987
11993
  C.key === "Enter" ? (C.preventDefault(), w ? S() : y.length > 0 && A(y[0].id)) : C.key === "Backspace" && !p && e.length > 0 ? b(e[e.length - 1]) : C.key === "Escape" && (h(!1), g(""));
@@ -12036,8 +12042,8 @@ function bf({
12036
12042
  "button",
12037
12043
  {
12038
12044
  type: "button",
12039
- onClick: (N) => {
12040
- N.stopPropagation(), b(C.id);
12045
+ onClick: (B) => {
12046
+ B.stopPropagation(), b(C.id);
12041
12047
  },
12042
12048
  style: {
12043
12049
  border: "none",
@@ -12121,11 +12127,11 @@ function bf({
12121
12127
  cursor: "pointer",
12122
12128
  color: d.text
12123
12129
  },
12124
- onMouseEnter: (N) => {
12125
- N.currentTarget.style.background = d.hoverBackground || "";
12130
+ onMouseEnter: (B) => {
12131
+ B.currentTarget.style.background = d.hoverBackground || "";
12126
12132
  },
12127
- onMouseLeave: (N) => {
12128
- N.currentTarget.style.background = "";
12133
+ onMouseLeave: (B) => {
12134
+ B.currentTarget.style.background = "";
12129
12135
  },
12130
12136
  children: C.label
12131
12137
  },