sykpcomposer 0.0.262 → 0.0.263

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.
@@ -6636,7 +6636,7 @@ function mh() {
6636
6636
  function Mr(p) {
6637
6637
  return p instanceof Xi;
6638
6638
  }
6639
- const l2 = sr.lazy(() => import("./ImageComponent-e36a4d21.js"));
6639
+ const l2 = sr.lazy(() => import("./ImageComponent-00bb3a02.js"));
6640
6640
  function c2(p) {
6641
6641
  const t = p;
6642
6642
  if (t.src.startsWith("file:///"))
@@ -6782,7 +6782,7 @@ function yh({
6782
6782
  function u2(p) {
6783
6783
  return p instanceof su;
6784
6784
  }
6785
- const d2 = sr.lazy(() => import("./InlineImageComponent-503c44a0.js"));
6785
+ const d2 = sr.lazy(() => import("./InlineImageComponent-2a8ae2a8.js"));
6786
6786
  function f2(p) {
6787
6787
  if (p instanceof HTMLImageElement) {
6788
6788
  const { alt: t, src: a, width: e, height: s } = p;
@@ -52784,7 +52784,7 @@ class Th extends Oi {
52784
52784
  return null;
52785
52785
  }
52786
52786
  static importJSON(t) {
52787
- return e5();
52787
+ return eP();
52788
52788
  }
52789
52789
  isInline() {
52790
52790
  return !0;
@@ -52796,18 +52796,18 @@ class Th extends Oi {
52796
52796
  return "";
52797
52797
  }
52798
52798
  }
52799
- function e5(p = "") {
52799
+ function eP(p = "") {
52800
52800
  const t = new Th(p);
52801
52801
  return jo(t);
52802
52802
  }
52803
- function t5(p) {
52803
+ function tP(p) {
52804
52804
  return p instanceof Th;
52805
52805
  }
52806
- const n5 = Ti(), r5 = Ti(), o5 = Ti(), i5 = Ti();
52806
+ const nP = Ti(), rP = Ti(), oP = Ti(), iP = Ti();
52807
52807
  function rS(p, t, a, e) {
52808
52808
  return oS(p, t, a, void 0, void 0, e);
52809
52809
  }
52810
- function a5(p, t, a, e, s, r) {
52810
+ function aP(p, t, a, e, s, r) {
52811
52811
  return oS(p, t, a, e, s, r);
52812
52812
  }
52813
52813
  function oS(p, t, a, e, s, r) {
@@ -52820,16 +52820,16 @@ function oS(p, t, a, e, s, r) {
52820
52820
  let _ = null;
52821
52821
  return r && (i || c && d !== null && !Ht(d)) && g.push(lr(" ")), g.push(m), r && (u || f && h !== null && !Ht(h)) && (_ = lr(" "), g.push(_)), l.insertNodes(g), g.length > 1 && (Ht(m) ? m.select() : _ && _.selectPrevious()), !0;
52822
52822
  }
52823
- function s5(p, t, a = !0) {
52823
+ function sP(p, t, a = !0) {
52824
52824
  let e = !1, s = null, r = null;
52825
52825
  const n = h0();
52826
52826
  for (const o of n) {
52827
52827
  const l = o.getTrigger() === p, i = o.getValue() === t;
52828
- l && (i || !t) && (s = kh(o), r = Ch(o), o.remove(), e = !0, Ht(s) && Sa(s).endsWith(" ") && r && Sa(r).startsWith(" ") && s.setTextContent(Sa(s).slice(0, -1)), (r === null || t5(r)) && Ht(s) && Sa(s).endsWith(" ") && s.setTextContent(Sa(s).trimEnd()));
52828
+ l && (i || !t) && (s = kh(o), r = Ch(o), o.remove(), e = !0, Ht(s) && Sa(s).endsWith(" ") && r && Sa(r).startsWith(" ") && s.setTextContent(Sa(s).slice(0, -1)), (r === null || tP(r)) && Ht(s) && Sa(s).endsWith(" ") && s.setTextContent(Sa(s).trimEnd()));
52829
52829
  }
52830
52830
  return e && a ? iS(s, r) : a || Er(null), e;
52831
52831
  }
52832
- function l5(p, t, a, e = !0) {
52832
+ function lP(p, t, a, e = !0) {
52833
52833
  const s = h0();
52834
52834
  let r = null;
52835
52835
  for (const n of s) {
@@ -52860,10 +52860,10 @@ function lm(p) {
52860
52860
  let t = null;
52861
52861
  return p.getEditorState().read(() => {
52862
52862
  const a = jt();
52863
- Ct(a) && (t = c5(a));
52863
+ Ct(a) && (t = cP(a));
52864
52864
  }), t;
52865
52865
  }
52866
- function c5(p) {
52866
+ function cP(p) {
52867
52867
  const t = p.anchor;
52868
52868
  if (t.type !== "text")
52869
52869
  return null;
@@ -52873,10 +52873,10 @@ function c5(p) {
52873
52873
  const e = t.offset;
52874
52874
  return Sa(a).slice(0, e);
52875
52875
  }
52876
- function u5(p) {
52876
+ function uP(p) {
52877
52877
  return p.key.length === 1 && !p.ctrlKey && !p.altKey && !p.metaKey && !p.repeat;
52878
52878
  }
52879
- function d5(p, t, a) {
52879
+ function dP(p, t, a) {
52880
52880
  const [e] = Xn(), [s, r] = Zt(t ?? null), [n, o] = Zt(null);
52881
52881
  return sn(() => {
52882
52882
  if (t) {
@@ -52905,7 +52905,7 @@ function d5(p, t, a) {
52905
52905
  };
52906
52906
  }, [s, p, n, a]), n;
52907
52907
  }
52908
- function f5(p, t) {
52908
+ function fP(p, t) {
52909
52909
  var a;
52910
52910
  const e = (a = p.split(/\s/).pop()) !== null && a !== void 0 ? a : p, s = p !== e ? p.lastIndexOf(e) : 0;
52911
52911
  return t.some((n) => n.startsWith(e) && n !== e) ? {
@@ -52914,7 +52914,7 @@ function f5(p, t) {
52914
52914
  replaceableString: e
52915
52915
  } : null;
52916
52916
  }
52917
- function p5(p) {
52917
+ function pP(p) {
52918
52918
  var t;
52919
52919
  const { onSelectOption: a, triggers: e, punctuation: s, autoSpace: r, loading: n, triggerFn: o, onQueryChange: l, onReset: i, comboboxAnchor: u, comboboxAnchorClassName: c, comboboxComponent: f = "div", comboboxItemComponent: d = "div", onComboboxOpen: h, onComboboxClose: m, onComboboxFocusChange: g, comboboxAdditionalItems: _ = [], onComboboxItemSelect: v } = p, b = d0(), [w] = Xn(), [E, x] = Zt(null), [y, S] = Zt(null), [C, P] = Zt(null), [M, B] = Zt(null), N = p.options.length === 0 ? "trigger" : "value", R = lo(() => {
52920
52920
  const Z = _.map((X) => new sm("additional", X.value, X.displayValue, X.data));
@@ -52935,7 +52935,7 @@ function p5(p) {
52935
52935
  p.options,
52936
52936
  e,
52937
52937
  M
52938
- ]), [j, k] = Zt((t = p.comboboxOpen) !== null && t !== void 0 ? t : !1), A = d5(j, u, c), D = En((Z) => {
52938
+ ]), [j, k] = Zt((t = p.comboboxOpen) !== null && t !== void 0 ? t : !1), A = dP(j, u, c), D = En((Z) => {
52939
52939
  ed || x(Z);
52940
52940
  }, []), L = En((Z) => {
52941
52941
  var X;
@@ -52994,7 +52994,7 @@ function p5(p) {
52994
52994
  const Z = lm(w), X = Z ? Z.substring(0, Z.length - 1) : void 0;
52995
52995
  return X != null && X.trim() || D(null), !1;
52996
52996
  }, [w, D]), U = En((Z) => {
52997
- if (k(!0), !u5(Z))
52997
+ if (k(!0), !uP(Z))
52998
52998
  return !1;
52999
52999
  const X = lm(w), ne = (X === null ? Z.key : X + Z.key).trim();
53000
53000
  return R.some((ce) => ce.displayValue.startsWith(ne) && ne.length <= ce.displayValue.length) ? D(0) : N === "trigger" && D(null), !1;
@@ -53015,7 +53015,7 @@ function p5(p) {
53015
53015
  i(), S(null), P(null), l(null), B(null);
53016
53016
  return;
53017
53017
  }
53018
- const ee = f5(X, e);
53018
+ const ee = fP(X, e);
53019
53019
  if (S(ee), ee) {
53020
53020
  B(ee.matchingString), P(null);
53021
53021
  return;
@@ -53053,7 +53053,7 @@ function p5(p) {
53053
53053
  ee.preventDefault();
53054
53054
  }, children: Z.displayValue }, Z.key)) }), A);
53055
53055
  }
53056
- function h5(p, t) {
53056
+ function hP(p, t) {
53057
53057
  const [a, e] = Zt(p);
53058
53058
  return sn(() => {
53059
53059
  const s = setTimeout(() => {
@@ -53064,8 +53064,8 @@ function h5(p, t) {
53064
53064
  };
53065
53065
  }, [p, t]), a;
53066
53066
  }
53067
- function g5(p) {
53068
- const { queryString: t, trigger: a, searchDelay: e, items: s, onSearch: r, justSelectedAnOption: n } = p, o = h5(t, e), [l, i] = Zt(!1), [u, c] = Zt([]), [f, d] = Zt(null);
53067
+ function gP(p) {
53068
+ const { queryString: t, trigger: a, searchDelay: e, items: s, onSearch: r, justSelectedAnOption: n } = p, o = hP(t, e), [l, i] = Zt(!1), [u, c] = Zt([]), [f, d] = Zt(null);
53069
53069
  return sn(() => {
53070
53070
  if (!s)
53071
53071
  return;
@@ -53092,7 +53092,7 @@ function g5(p) {
53092
53092
  }
53093
53093
  }, [o, r, a, n]), lo(() => ({ loading: l, results: u, query: f }), [l, u, f]);
53094
53094
  }
53095
- var m5 = globalThis && globalThis.__rest || function(p, t) {
53095
+ var mP = globalThis && globalThis.__rest || function(p, t) {
53096
53096
  var a = {};
53097
53097
  for (var e in p)
53098
53098
  Object.prototype.hasOwnProperty.call(p, e) && t.indexOf(e) < 0 && (a[e] = p[e]);
@@ -53111,12 +53111,12 @@ class qf extends cy {
53111
53111
  };
53112
53112
  }
53113
53113
  }
53114
- const y5 = (p) => "(?:\\.[ |$]|\\s|[" + p + "]|)";
53115
- function b5(p, t, a, e) {
53116
- return new RegExp((t ? `(^|\\s|${t})(` : "(^|\\s)(") + GN(p) + "((?:" + nS(p, a) + (e ? y5(a) : "") + "){0," + KN + "}))$");
53114
+ const yP = (p) => "(?:\\.[ |$]|\\s|[" + p + "]|)";
53115
+ function bP(p, t, a, e) {
53116
+ return new RegExp((t ? `(^|\\s|${t})(` : "(^|\\s)(") + GN(p) + "((?:" + nS(p, a) + (e ? yP(a) : "") + "){0," + KN + "}))$");
53117
53117
  }
53118
53118
  function c_(p, t, a, e, s) {
53119
- const r = b5(t, a, e, s).exec(p);
53119
+ const r = bP(t, a, e, s).exec(p);
53120
53120
  if (r !== null) {
53121
53121
  const n = r[1], o = r[2], l = r[3];
53122
53122
  if (o.length >= 1)
@@ -53128,11 +53128,11 @@ function c_(p, t, a, e, s) {
53128
53128
  }
53129
53129
  return null;
53130
53130
  }
53131
- function v5(p) {
53131
+ function vP(p) {
53132
53132
  const { items: t, onSearch: a, autoSpace: e = !0, searchDelay: s = p.onSearch ? 250 : 0, allowSpaces: r = !0, insertOnBlur: n = !0, menuComponent: o = "ul", menuItemComponent: l = "li", emptyComponent: i, menuAnchorClassName: u, showMentionsOnDelete: c, showCurrentMentionsAsSuggestions: f = !0, mentionEnclosure: d, onMenuOpen: h, onMenuClose: m, onMenuItemSelect: g, punctuation: _ = VN, preTriggerChars: v = JN } = p, b = rr(!1), w = d0(), E = lo(() => {
53133
53133
  var Y;
53134
53134
  return (Y = p.triggers) !== null && Y !== void 0 ? Y : Object.keys(t ?? {});
53135
- }, [p.triggers, t]), [x] = Xn(), [y, S] = Zt(null), [C, P] = Zt(null), { results: M, loading: B, query: N } = g5({
53135
+ }, [p.triggers, t]), [x] = Xn(), [y, S] = Zt(null), [C, P] = Zt(null), { results: M, loading: B, query: N } = gP({
53136
53136
  queryString: y,
53137
53137
  searchDelay: s,
53138
53138
  trigger: C,
@@ -53146,7 +53146,7 @@ function v5(p) {
53146
53146
  if (typeof X == "string")
53147
53147
  return new qf(C, X, X);
53148
53148
  {
53149
- const { value: ee } = X, ne = m5(X, ["value"]);
53149
+ const { value: ee } = X, ne = mP(X, ["value"]);
53150
53150
  return new qf(C, ee, ee, ne);
53151
53151
  }
53152
53152
  });
@@ -53309,14 +53309,14 @@ function v5(p) {
53309
53309
  return Vr(x.registerCommand(Ei, () => {
53310
53310
  const Y = jt();
53311
53311
  return Y && !Qr(Y) ? j.current = Y : Y || (j.current = null), !1;
53312
- }, ar), x.registerCommand(vy, U, ar), x.registerCommand(es, H, ar), x.registerCommand(th, () => n ? G() : !1, ar), x.registerCommand(U_, () => !r && k ? G() : !1, ar), x.registerCommand(n5, ({ trigger: Y, value: Z, data: X, focus: ee = !0 }) => {
53312
+ }, ar), x.registerCommand(vy, U, ar), x.registerCommand(es, H, ar), x.registerCommand(th, () => n ? G() : !1, ar), x.registerCommand(U_, () => !r && k ? G() : !1, ar), x.registerCommand(nP, ({ trigger: Y, value: Z, data: X, focus: ee = !0 }) => {
53313
53313
  F();
53314
- const ne = a5(E, _, Y, Z, X, e);
53314
+ const ne = aP(E, _, Y, Z, X, e);
53315
53315
  return ee || Er(null), ne;
53316
- }, ar), x.registerCommand(r5, ({ trigger: Y, value: Z, focus: X }) => {
53317
- const ee = s5(Y, Z, X);
53316
+ }, ar), x.registerCommand(rP, ({ trigger: Y, value: Z, focus: X }) => {
53317
+ const ee = sP(Y, Z, X);
53318
53318
  return X || (j.current = null), ee;
53319
- }, ar), x.registerCommand(o5, ({ trigger: Y, newValue: Z, value: X, focus: ee }) => l5(Y, Z, X, ee), ar), x.registerCommand(i5, ({ trigger: Y }) => (F(), rS(E, _, Y, e)), ar), x.registerCommand(Ml, K, ar));
53319
+ }, ar), x.registerCommand(oP, ({ trigger: Y, newValue: Z, value: X, focus: ee }) => lP(Y, Z, X, ee), ar), x.registerCommand(iP, ({ trigger: Y }) => (F(), rS(E, _, Y, e)), ar), x.registerCommand(Ml, K, ar));
53320
53320
  }, [
53321
53321
  x,
53322
53322
  E,
@@ -53333,7 +53333,7 @@ function v5(p) {
53333
53333
  F
53334
53334
  ]), sn(() => {
53335
53335
  L && w ? h == null || h() : m == null || m(), L && !w && J();
53336
- }, [h, m, L, w, J]), fu ? p.combobox ? Te.jsx(p5, { options: D, loading: B, onQueryChange: S, onSelectOption: O, onReset: () => {
53336
+ }, [h, m, L, w, J]), fu ? p.combobox ? Te.jsx(pP, { options: D, loading: B, onQueryChange: S, onSelectOption: O, onReset: () => {
53337
53337
  P(null);
53338
53338
  }, triggerFn: W, triggers: E, punctuation: _, creatable: k, comboboxOpen: p.comboboxOpen, comboboxAnchor: p.comboboxAnchor, comboboxAnchorClassName: p.comboboxAnchorClassName, comboboxComponent: p.comboboxComponent, comboboxItemComponent: p.comboboxItemComponent, comboboxAdditionalItems: p.comboboxAdditionalItems, onComboboxOpen: p.onComboboxOpen, onComboboxClose: p.onComboboxClose, onComboboxFocusChange: p.onComboboxFocusChange, onComboboxItemSelect: p.onComboboxItemSelect }) : Te.jsx(BN, { commandPriority: md, onQueryChange: S, onSelectOption: z, triggerFn: W, options: D, anchorClassName: u, onClose: J, menuRenderFn: (Y, { selectedIndex: Z, selectOptionAndCleanUp: X, setHighlightedIndex: ee }) => (R.current = Z, Y.current && D.length === 0 && N && !B && w && i ? mp.createPortal(Te.jsx(i, {}), Y.current) : Y.current && L ? mp.createPortal(Te.jsx(o, { loading: B, role: "menu", "aria-label": "Choose a mention", "aria-hidden": !L, "aria-activedescendant": !ed && Z !== null && D[Z] ? D[Z].displayValue : "", children: D.map((ne, ce) => Te.jsx(l, Object.assign({ tabIndex: -1, selected: !ed && Z === ce, ref: ne.setRefElement, role: "menuitem", "aria-selected": !ed && Z === ce, "aria-label": `Choose ${ne.value}`, item: ne.menuItem, itemValue: ne.value, label: ne.displayValue }, ne.data, { onClick: () => {
53339
53339
  ee(ce), X(ne);
@@ -53343,10 +53343,10 @@ function v5(p) {
53343
53343
  ee(ce);
53344
53344
  }, children: ne.displayValue }), ne.key)) }), Y.current) : null) }) : null;
53345
53345
  }
53346
- const _5 = ({
53346
+ const _P = ({
53347
53347
  loading: p,
53348
53348
  ...t
53349
- }) => p ? /* @__PURE__ */ Te.jsx("ul", { id: "mention-container", className: "mentionsContainer", ...t, children: /* @__PURE__ */ Te.jsx("li", { className: "mentionsContainerItem", children: "Loading..." }) }) : /* @__PURE__ */ Te.jsx("ul", { id: "mention-container", className: "mentionsContainer", ...t }), x5 = CE(({ selected: p, item: t, children: a, ...e }, s) => {
53349
+ }) => p ? /* @__PURE__ */ Te.jsx("ul", { id: "mention-container", className: "mentionsContainer", ...t, children: /* @__PURE__ */ Te.jsx("li", { className: "mentionsContainerItem", children: "Loading..." }) }) : /* @__PURE__ */ Te.jsx("ul", { id: "mention-container", className: "mentionsContainer", ...t }), xP = CE(({ selected: p, item: t, children: a, ...e }, s) => {
53350
53350
  var r, n, o;
53351
53351
  return /* @__PURE__ */ Te.jsx(
53352
53352
  "li",
@@ -53362,13 +53362,13 @@ const _5 = ({
53362
53362
  );
53363
53363
  });
53364
53364
  let dd = [];
53365
- function w5({ nodeKey: p }) {
53365
+ function wP({ nodeKey: p }) {
53366
53366
  const [t] = Xn(), [a, e, s] = tS(p), [r, n] = sr.useState(dd), o = En(
53367
53367
  (l) => {
53368
53368
  const i = jt();
53369
53369
  return Qr(i) && t.update(() => {
53370
53370
  i.getNodes().forEach((u) => {
53371
- if (E5(u)) {
53371
+ if (EP(u)) {
53372
53372
  u.remove();
53373
53373
  const c = [...r];
53374
53374
  c.pop(), n(c), dd = c;
@@ -53415,7 +53415,7 @@ class Wd extends iu {
53415
53415
  static importDOM() {
53416
53416
  return {
53417
53417
  figure: (t) => t.getAttribute("type") !== this.getType() ? null : {
53418
- conversion: S5,
53418
+ conversion: SP,
53419
53419
  priority: wi
53420
53420
  }
53421
53421
  };
@@ -53441,19 +53441,19 @@ class Wd extends iu {
53441
53441
  return !1;
53442
53442
  }
53443
53443
  decorate() {
53444
- return /* @__PURE__ */ Te.jsx(w5, { nodeKey: this.__key });
53444
+ return /* @__PURE__ */ Te.jsx(wP, { nodeKey: this.__key });
53445
53445
  }
53446
53446
  }
53447
- function S5() {
53447
+ function SP() {
53448
53448
  return { node: aS() };
53449
53449
  }
53450
53450
  function aS() {
53451
53451
  return new Wd();
53452
53452
  }
53453
- function E5(p) {
53453
+ function EP(p) {
53454
53454
  return p instanceof Wd;
53455
53455
  }
53456
- function C5({ editorRef: p }) {
53456
+ function CP({ editorRef: p }) {
53457
53457
  const [t] = Xn();
53458
53458
  return sr.useEffect(() => {
53459
53459
  typeof p == "function" ? p(t) : typeof p == "object" && (p.current = t);
@@ -53467,18 +53467,18 @@ const sS = Vy ? Na : sn, Ca = () => /* @__PURE__ */ new Map(), uy = (p) => {
53467
53467
  }, pu = (p, t, a) => {
53468
53468
  let e = p.get(t);
53469
53469
  return e === void 0 && p.set(t, e = a()), e;
53470
- }, k5 = (p, t) => {
53470
+ }, kP = (p, t) => {
53471
53471
  const a = [];
53472
53472
  for (const [e, s] of p)
53473
53473
  a.push(t(s, e));
53474
53474
  return a;
53475
- }, T5 = (p, t) => {
53475
+ }, TP = (p, t) => {
53476
53476
  for (const [a, e] of p)
53477
53477
  if (t(e, a))
53478
53478
  return !0;
53479
53479
  return !1;
53480
- }, Jc = () => /* @__PURE__ */ new Set(), cm = (p) => p[p.length - 1], Gc = Array.from, O5 = Array.isArray;
53481
- class A5 {
53480
+ }, Jc = () => /* @__PURE__ */ new Set(), cm = (p) => p[p.length - 1], Gc = Array.from, OP = Array.isArray;
53481
+ class AP {
53482
53482
  constructor() {
53483
53483
  this._observers = Ca();
53484
53484
  }
@@ -53540,7 +53540,7 @@ class A5 {
53540
53540
  this._observers = Ca();
53541
53541
  }
53542
53542
  }
53543
- const Pl = Math.floor, fp = Math.abs, lS = (p, t) => p < t ? p : t, hu = (p, t) => p > t ? p : t, j5 = (p) => p !== 0 ? p < 0 : 1 / p < 0, u_ = 1, d_ = 2, um = 4, dm = 8, N5 = 32, cS = 64, Up = 128, P5 = 31, f_ = 63, fd = 127, I5 = 2147483647, M5 = Number.isInteger || ((p) => typeof p == "number" && isFinite(p) && Pl(p) === p), R5 = (p) => p.toLowerCase(), D5 = /^\s*/g, L5 = (p) => p.replace(D5, ""), F5 = /([A-Z])/g, p_ = (p, t) => L5(p.replace(F5, (a) => `${t}${R5(a)}`)), B5 = (p) => {
53543
+ const Pl = Math.floor, fp = Math.abs, lS = (p, t) => p < t ? p : t, hu = (p, t) => p > t ? p : t, jP = (p) => p !== 0 ? p < 0 : 1 / p < 0, u_ = 1, d_ = 2, um = 4, dm = 8, NP = 32, cS = 64, Up = 128, PP = 31, f_ = 63, fd = 127, IP = 2147483647, MP = Number.isInteger || ((p) => typeof p == "number" && isFinite(p) && Pl(p) === p), RP = (p) => p.toLowerCase(), DP = /^\s*/g, LP = (p) => p.replace(DP, ""), FP = /([A-Z])/g, p_ = (p, t) => LP(p.replace(FP, (a) => `${t}${RP(a)}`)), BP = (p) => {
53544
53544
  const t = unescape(encodeURIComponent(p)), a = t.length, e = new Uint8Array(a);
53545
53545
  for (let s = 0; s < a; s++)
53546
53546
  e[s] = /** @type {number} */
@@ -53549,7 +53549,7 @@ const Pl = Math.floor, fp = Math.abs, lS = (p, t) => p < t ? p : t, hu = (p, t)
53549
53549
  }, wd = (
53550
53550
  /** @type {TextEncoder} */
53551
53551
  typeof TextEncoder < "u" ? new TextEncoder() : null
53552
- ), z5 = (p) => wd.encode(p), $5 = wd ? z5 : B5;
53552
+ ), zP = (p) => wd.encode(p), $P = wd ? zP : BP;
53553
53553
  let fm = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
53554
53554
  fm && fm.decode(new Uint8Array()).length === 1 && (fm = null);
53555
53555
  class Vd {
@@ -53557,20 +53557,20 @@ class Vd {
53557
53557
  this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = [];
53558
53558
  }
53559
53559
  }
53560
- const g0 = () => new Vd(), U5 = (p) => {
53560
+ const g0 = () => new Vd(), UP = (p) => {
53561
53561
  let t = p.cpos;
53562
53562
  for (let a = 0; a < p.bufs.length; a++)
53563
53563
  t += p.bufs[a].length;
53564
53564
  return t;
53565
53565
  }, Ga = (p) => {
53566
- const t = new Uint8Array(U5(p));
53566
+ const t = new Uint8Array(UP(p));
53567
53567
  let a = 0;
53568
53568
  for (let e = 0; e < p.bufs.length; e++) {
53569
53569
  const s = p.bufs[e];
53570
53570
  t.set(s, a), a += s.length;
53571
53571
  }
53572
53572
  return t.set(new Uint8Array(p.cbuf.buffer, 0, p.cpos), a), t;
53573
- }, H5 = (p, t) => {
53573
+ }, HP = (p, t) => {
53574
53574
  const a = p.cbuf.length;
53575
53575
  a - p.cpos < t && (p.bufs.push(new Uint8Array(p.cbuf.buffer, 0, p.cpos)), p.cbuf = new Uint8Array(hu(a, t) * 2), p.cpos = 0);
53576
53576
  }, vo = (p, t) => {
@@ -53581,18 +53581,18 @@ const g0 = () => new Vd(), U5 = (p) => {
53581
53581
  vo(p, Up | fd & t), t = Pl(t / 128);
53582
53582
  vo(p, fd & t);
53583
53583
  }, m0 = (p, t) => {
53584
- const a = j5(t);
53584
+ const a = jP(t);
53585
53585
  for (a && (t = -t), vo(p, (t > f_ ? Up : 0) | (a ? cS : 0) | f_ & t), t = Pl(t / 64); t > 0; )
53586
53586
  vo(p, (t > fd ? Up : 0) | fd & t), t = Pl(t / 128);
53587
- }, fy = new Uint8Array(3e4), q5 = fy.length / 3, W5 = (p, t) => {
53588
- if (t.length < q5) {
53587
+ }, fy = new Uint8Array(3e4), qP = fy.length / 3, WP = (p, t) => {
53588
+ if (t.length < qP) {
53589
53589
  const a = wd.encodeInto(t, fy).written || 0;
53590
53590
  Ar(p, a);
53591
53591
  for (let e = 0; e < a; e++)
53592
53592
  vo(p, fy[e]);
53593
53593
  } else
53594
- _i(p, $5(t));
53595
- }, V5 = (p, t) => {
53594
+ _i(p, $P(t));
53595
+ }, VP = (p, t) => {
53596
53596
  const a = unescape(encodeURIComponent(t)), e = a.length;
53597
53597
  Ar(p, e);
53598
53598
  for (let s = 0; s < e; s++)
@@ -53602,33 +53602,33 @@ const g0 = () => new Vd(), U5 = (p) => {
53602
53602
  a.codePointAt(s)
53603
53603
  );
53604
53604
  }, Hc = wd && /** @type {any} */
53605
- wd.encodeInto ? W5 : V5, y0 = (p, t) => {
53605
+ wd.encodeInto ? WP : VP, y0 = (p, t) => {
53606
53606
  const a = p.cbuf.length, e = p.cpos, s = lS(a - e, t.length), r = t.length - s;
53607
53607
  p.cbuf.set(t.subarray(0, s), e), p.cpos += s, r > 0 && (p.bufs.push(p.cbuf), p.cbuf = new Uint8Array(hu(a * 2, r)), p.cbuf.set(t.subarray(s)), p.cpos = r);
53608
53608
  }, _i = (p, t) => {
53609
53609
  Ar(p, t.byteLength), y0(p, t);
53610
53610
  }, b0 = (p, t) => {
53611
- H5(p, t);
53611
+ HP(p, t);
53612
53612
  const a = new DataView(p.cbuf.buffer, p.cpos, t);
53613
53613
  return p.cpos += t, a;
53614
- }, J5 = (p, t) => b0(p, 4).setFloat32(0, t, !1), G5 = (p, t) => b0(p, 8).setFloat64(0, t, !1), K5 = (p, t) => (
53614
+ }, JP = (p, t) => b0(p, 4).setFloat32(0, t, !1), GP = (p, t) => b0(p, 8).setFloat64(0, t, !1), KP = (p, t) => (
53615
53615
  /** @type {any} */
53616
53616
  b0(p, 8).setBigInt64(0, t, !1)
53617
- ), h_ = new DataView(new ArrayBuffer(4)), Y5 = (p) => (h_.setFloat32(0, p), h_.getFloat32(0) === p), Sd = (p, t) => {
53617
+ ), h_ = new DataView(new ArrayBuffer(4)), YP = (p) => (h_.setFloat32(0, p), h_.getFloat32(0) === p), Sd = (p, t) => {
53618
53618
  switch (typeof t) {
53619
53619
  case "string":
53620
53620
  vo(p, 119), Hc(p, t);
53621
53621
  break;
53622
53622
  case "number":
53623
- M5(t) && fp(t) <= I5 ? (vo(p, 125), m0(p, t)) : Y5(t) ? (vo(p, 124), J5(p, t)) : (vo(p, 123), G5(p, t));
53623
+ MP(t) && fp(t) <= IP ? (vo(p, 125), m0(p, t)) : YP(t) ? (vo(p, 124), JP(p, t)) : (vo(p, 123), GP(p, t));
53624
53624
  break;
53625
53625
  case "bigint":
53626
- vo(p, 122), K5(p, t);
53626
+ vo(p, 122), KP(p, t);
53627
53627
  break;
53628
53628
  case "object":
53629
53629
  if (t === null)
53630
53630
  vo(p, 126);
53631
- else if (O5(t)) {
53631
+ else if (OP(t)) {
53632
53632
  vo(p, 117), Ar(p, t.length);
53633
53633
  for (let a = 0; a < t.length; a++)
53634
53634
  Sd(p, t[a]);
@@ -53712,7 +53712,7 @@ class pm {
53712
53712
  return y_(this), Ga(this.encoder);
53713
53713
  }
53714
53714
  }
53715
- class Z5 {
53715
+ class ZP {
53716
53716
  constructor() {
53717
53717
  this.sarr = [], this.s = "", this.lensE = new pp();
53718
53718
  }
@@ -53731,7 +53731,7 @@ const Kc = (p) => new Error(p), ka = () => {
53731
53731
  throw Kc("Method unimplemented");
53732
53732
  }, Il = () => {
53733
53733
  throw Kc("Unexpected case");
53734
- }, Q5 = crypto.getRandomValues.bind(crypto), uS = () => Q5(new Uint32Array(1))[0], X5 = [1e7] + -1e3 + -4e3 + -8e3 + -1e11, eP = () => X5.replace(
53734
+ }, QP = crypto.getRandomValues.bind(crypto), uS = () => QP(new Uint32Array(1))[0], XP = [1e7] + -1e3 + -4e3 + -8e3 + -1e11, e5 = () => XP.replace(
53735
53735
  /[018]/g,
53736
53736
  /** @param {number} c */
53737
53737
  (p) => (p ^ uS() & 15 >> p / 4).toString(16)
@@ -53741,7 +53741,7 @@ const Kc = (p) => new Error(p), ka = () => {
53741
53741
  );
53742
53742
  Promise.all.bind(Promise);
53743
53743
  const v_ = (p) => p === void 0 ? null : p;
53744
- class tP {
53744
+ class t5 {
53745
53745
  constructor() {
53746
53746
  this.map = /* @__PURE__ */ new Map();
53747
53747
  }
@@ -53759,29 +53759,29 @@ class tP {
53759
53759
  return this.map.get(t);
53760
53760
  }
53761
53761
  }
53762
- let dS = new tP(), nP = !0;
53762
+ let dS = new t5(), n5 = !0;
53763
53763
  try {
53764
- typeof localStorage < "u" && localStorage && (dS = localStorage, nP = !1);
53764
+ typeof localStorage < "u" && localStorage && (dS = localStorage, n5 = !1);
53765
53765
  } catch {
53766
53766
  }
53767
- const rP = dS, oP = Object.assign, iP = Object.keys, aP = (p, t) => {
53767
+ const r5 = dS, o5 = Object.assign, i5 = Object.keys, a5 = (p, t) => {
53768
53768
  for (const a in p)
53769
53769
  t(p[a], a);
53770
- }, __ = (p) => iP(p).length, sP = (p) => {
53770
+ }, __ = (p) => i5(p).length, s5 = (p) => {
53771
53771
  for (const t in p)
53772
53772
  return !1;
53773
53773
  return !0;
53774
- }, lP = (p, t) => {
53774
+ }, l5 = (p, t) => {
53775
53775
  for (const a in p)
53776
53776
  if (!t(p[a], a))
53777
53777
  return !1;
53778
53778
  return !0;
53779
- }, cP = (p, t) => Object.prototype.hasOwnProperty.call(p, t), uP = (p, t) => p === t || __(p) === __(t) && lP(p, (a, e) => (a !== void 0 || cP(t, e)) && t[e] === a), dP = Object.freeze, fS = (p) => {
53779
+ }, c5 = (p, t) => Object.prototype.hasOwnProperty.call(p, t), u5 = (p, t) => p === t || __(p) === __(t) && l5(p, (a, e) => (a !== void 0 || c5(t, e)) && t[e] === a), d5 = Object.freeze, fS = (p) => {
53780
53780
  for (const t in p) {
53781
53781
  const a = p[t];
53782
53782
  (typeof a == "object" || typeof a == "function") && fS(p[t]);
53783
53783
  }
53784
- return dP(p);
53784
+ return d5(p);
53785
53785
  }, v0 = (p, t, a = 0) => {
53786
53786
  try {
53787
53787
  for (; a < p.length; a++)
@@ -53789,9 +53789,9 @@ const rP = dS, oP = Object.assign, iP = Object.keys, aP = (p, t) => {
53789
53789
  } finally {
53790
53790
  a < p.length && v0(p, t, a + 1);
53791
53791
  }
53792
- }, fP = (p, t) => t.includes(p), Ed = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
53792
+ }, f5 = (p, t) => t.includes(p), Ed = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
53793
53793
  let xa;
53794
- const pP = () => {
53794
+ const p5 = () => {
53795
53795
  if (xa === void 0)
53796
53796
  if (Ed) {
53797
53797
  xa = Ca();
@@ -53810,11 +53810,11 @@ const pP = () => {
53810
53810
  }
53811
53811
  })) : xa = Ca();
53812
53812
  return xa;
53813
- }, py = (p) => pP().has(p), Hp = (p) => v_(Ed ? process.env[p.toUpperCase().replaceAll("-", "_")] : rP.getItem(p)), pS = (p) => py("--" + p) || Hp(p) !== null;
53813
+ }, py = (p) => p5().has(p), Hp = (p) => v_(Ed ? process.env[p.toUpperCase().replaceAll("-", "_")] : r5.getItem(p)), pS = (p) => py("--" + p) || Hp(p) !== null;
53814
53814
  pS("production");
53815
- const hP = Ed && fP(process.env.FORCE_COLOR, ["true", "1", "2"]), gP = hP || !py("--no-colors") && // @todo deprecate --no-colors
53815
+ const h5 = Ed && f5(process.env.FORCE_COLOR, ["true", "1", "2"]), g5 = h5 || !py("--no-colors") && // @todo deprecate --no-colors
53816
53816
  !pS("no-color") && (!Ed || process.stdout.isTTY) && (!Ed || py("--color") || Hp("COLORTERM") !== null || (Hp("TERM") || "").includes("color"));
53817
- class mP {
53817
+ class m5 {
53818
53818
  /**
53819
53819
  * @param {L} left
53820
53820
  * @param {R} right
@@ -53823,9 +53823,9 @@ class mP {
53823
53823
  this.left = t, this.right = a;
53824
53824
  }
53825
53825
  }
53826
- const Wa = (p, t) => new mP(p, t);
53826
+ const Wa = (p, t) => new m5(p, t);
53827
53827
  typeof DOMParser < "u" && new DOMParser();
53828
- const yP = (p) => k5(p, (t, a) => `${a}:${t};`).join(""), ss = Symbol, hS = ss(), gS = ss(), bP = ss(), vP = ss(), _P = ss(), mS = ss(), xP = ss(), _0 = ss(), wP = ss(), SP = (p) => {
53828
+ const y5 = (p) => kP(p, (t, a) => `${a}:${t};`).join(""), ss = Symbol, hS = ss(), gS = ss(), b5 = ss(), v5 = ss(), _5 = ss(), mS = ss(), x5 = ss(), _0 = ss(), w5 = ss(), S5 = (p) => {
53829
53829
  var s;
53830
53830
  p.length === 1 && ((s = p[0]) == null ? void 0 : s.constructor) === Function && (p = /** @type {Array<string|Symbol|Object|number>} */
53831
53831
  /** @type {[function]} */
@@ -53846,18 +53846,18 @@ const yP = (p) => k5(p, (t, a) => `${a}:${t};`).join(""), ss = Symbol, hS = ss()
53846
53846
  r instanceof Symbol || a.push(r);
53847
53847
  }
53848
53848
  return a;
53849
- }, EP = {
53849
+ }, E5 = {
53850
53850
  [hS]: Wa("font-weight", "bold"),
53851
53851
  [gS]: Wa("font-weight", "normal"),
53852
- [bP]: Wa("color", "blue"),
53853
- [_P]: Wa("color", "green"),
53854
- [vP]: Wa("color", "grey"),
53852
+ [b5]: Wa("color", "blue"),
53853
+ [_5]: Wa("color", "green"),
53854
+ [v5]: Wa("color", "grey"),
53855
53855
  [mS]: Wa("color", "red"),
53856
- [xP]: Wa("color", "purple"),
53856
+ [x5]: Wa("color", "purple"),
53857
53857
  [_0]: Wa("color", "orange"),
53858
53858
  // not well supported in chrome when debugging node with inspector - TODO: deprecate
53859
- [wP]: Wa("color", "black")
53860
- }, CP = (p) => {
53859
+ [w5]: Wa("color", "black")
53860
+ }, C5 = (p) => {
53861
53861
  var n;
53862
53862
  p.length === 1 && ((n = p[0]) == null ? void 0 : n.constructor) === Function && (p = /** @type {Array<string|Symbol|Object|number>} */
53863
53863
  /** @type {[function]} */
@@ -53865,14 +53865,14 @@ const yP = (p) => k5(p, (t, a) => `${a}:${t};`).join(""), ss = Symbol, hS = ss()
53865
53865
  const t = [], a = [], e = Ca();
53866
53866
  let s = [], r = 0;
53867
53867
  for (; r < p.length; r++) {
53868
- const o = p[r], l = EP[o];
53868
+ const o = p[r], l = E5[o];
53869
53869
  if (l !== void 0)
53870
53870
  e.set(l.left, l.right);
53871
53871
  else {
53872
53872
  if (o === void 0)
53873
53873
  break;
53874
53874
  if (o.constructor === String || o.constructor === Number) {
53875
- const i = yP(e);
53875
+ const i = y5(e);
53876
53876
  r > 0 || i.length > 0 ? (t.push("%c" + o), a.push(i)) : t.push(o);
53877
53877
  } else
53878
53878
  break;
@@ -53883,9 +53883,9 @@ const yP = (p) => k5(p, (t, a) => `${a}:${t};`).join(""), ss = Symbol, hS = ss()
53883
53883
  o instanceof Symbol || s.push(o);
53884
53884
  }
53885
53885
  return s;
53886
- }, yS = gP ? CP : SP, kP = (...p) => {
53886
+ }, yS = g5 ? C5 : S5, k5 = (...p) => {
53887
53887
  console.log(...yS(p)), bS.forEach((t) => t.print(p));
53888
- }, TP = (...p) => {
53888
+ }, T5 = (...p) => {
53889
53889
  console.warn(...yS(p)), p.unshift(_0), bS.forEach((t) => t.print(p));
53890
53890
  }, bS = Jc(), vS = (p) => ({
53891
53891
  /**
@@ -53896,7 +53896,7 @@ const yP = (p) => k5(p, (t, a) => `${a}:${t};`).join(""), ss = Symbol, hS = ss()
53896
53896
  },
53897
53897
  // @ts-ignore
53898
53898
  next: p
53899
- }), OP = (p, t) => vS(() => {
53899
+ }), O5 = (p, t) => vS(() => {
53900
53900
  let a;
53901
53901
  do
53902
53902
  a = p.next();
@@ -53906,7 +53906,7 @@ const yP = (p) => k5(p, (t, a) => `${a}:${t};`).join(""), ss = Symbol, hS = ss()
53906
53906
  const { done: a, value: e } = p.next();
53907
53907
  return { done: a, value: a ? void 0 : t(e) };
53908
53908
  });
53909
- class AP {
53909
+ class A5 {
53910
53910
  /**
53911
53911
  * @param {number} clock
53912
53912
  * @param {number} len
@@ -53915,7 +53915,7 @@ class AP {
53915
53915
  this.clock = t, this.len = a;
53916
53916
  }
53917
53917
  }
53918
- class jP {
53918
+ class j5 {
53919
53919
  constructor() {
53920
53920
  this.clients = /* @__PURE__ */ new Map();
53921
53921
  }
@@ -53929,7 +53929,7 @@ const _S = (p, t, a) => t.clients.forEach((e, s) => {
53929
53929
  const o = e[n];
53930
53930
  TS(p, r, o.clock, o.len, a);
53931
53931
  }
53932
- }), NP = (p, t) => {
53932
+ }), N5 = (p, t) => {
53933
53933
  let a = 0, e = p.length - 1;
53934
53934
  for (; a <= e; ) {
53935
53935
  const s = Pl((a + e) / 2), r = p[s], n = r.clock;
@@ -53943,7 +53943,7 @@ const _S = (p, t, a) => t.clients.forEach((e, s) => {
53943
53943
  return null;
53944
53944
  }, xS = (p, t) => {
53945
53945
  const a = p.clients.get(t.client);
53946
- return a !== void 0 && NP(a, t.clock) !== null;
53946
+ return a !== void 0 && N5(a, t.clock) !== null;
53947
53947
  }, wS = (p) => {
53948
53948
  p.clients.forEach((t) => {
53949
53949
  t.sort((s, r) => s.clock - r.clock);
@@ -53958,8 +53958,8 @@ const _S = (p, t, a) => t.clients.forEach((e, s) => {
53958
53958
  pu(p.clients, t, () => (
53959
53959
  /** @type {Array<DeleteItem>} */
53960
53960
  []
53961
- )).push(new AP(a, e));
53962
- }, PP = (p, t) => {
53961
+ )).push(new A5(a, e));
53962
+ }, P5 = (p, t) => {
53963
53963
  Ar(p.restEncoder, t.clients.size), Gc(t.clients.entries()).sort((a, e) => e[0] - a[0]).forEach(([a, e]) => {
53964
53964
  p.resetDsCurVal(), Ar(p.restEncoder, a);
53965
53965
  const s = e.length;
@@ -53970,12 +53970,12 @@ const _S = (p, t, a) => t.clients.forEach((e, s) => {
53970
53970
  }
53971
53971
  });
53972
53972
  }, ES = uS;
53973
- class Jd extends A5 {
53973
+ class Jd extends AP {
53974
53974
  /**
53975
53975
  * @param {DocOpts} opts configuration
53976
53976
  */
53977
- constructor({ guid: t = eP(), collectionid: a = null, gc: e = !0, gcFilter: s = () => !0, meta: r = null, autoLoad: n = !1, shouldLoad: o = !0 } = {}) {
53978
- super(), this.gc = e, this.gcFilter = s, this.clientID = ES(), this.guid = t, this.collectionid = a, this.share = /* @__PURE__ */ new Map(), this.store = new UP(), this._transaction = null, this._transactionCleanups = [], this.subdocs = /* @__PURE__ */ new Set(), this._item = null, this.shouldLoad = o, this.autoLoad = n, this.meta = r, this.isLoaded = !1, this.isSynced = !1, this.isDestroyed = !1, this.whenLoaded = b_((i) => {
53977
+ constructor({ guid: t = e5(), collectionid: a = null, gc: e = !0, gcFilter: s = () => !0, meta: r = null, autoLoad: n = !1, shouldLoad: o = !0 } = {}) {
53978
+ super(), this.gc = e, this.gcFilter = s, this.clientID = ES(), this.guid = t, this.collectionid = a, this.share = /* @__PURE__ */ new Map(), this.store = new U5(), this._transaction = null, this._transactionCleanups = [], this.subdocs = /* @__PURE__ */ new Set(), this._item = null, this.shouldLoad = o, this.autoLoad = n, this.meta = r, this.isLoaded = !1, this.isSynced = !1, this.isDestroyed = !1, this.whenLoaded = b_((i) => {
53979
53979
  this.on("load", () => {
53980
53980
  this.isLoaded = !0, i(this);
53981
53981
  });
@@ -54183,7 +54183,7 @@ class Jd extends A5 {
54183
54183
  this.emit("destroyed", [!0]), this.emit("destroy", [this]), super.destroy();
54184
54184
  }
54185
54185
  }
54186
- class IP {
54186
+ class I5 {
54187
54187
  constructor() {
54188
54188
  this.restEncoder = g0();
54189
54189
  }
@@ -54205,7 +54205,7 @@ class IP {
54205
54205
  Ar(this.restEncoder, t);
54206
54206
  }
54207
54207
  }
54208
- class MP extends IP {
54208
+ class M5 extends I5 {
54209
54209
  /**
54210
54210
  * @param {ID} id
54211
54211
  */
@@ -54282,7 +54282,7 @@ class MP extends IP {
54282
54282
  Hc(this.restEncoder, t);
54283
54283
  }
54284
54284
  }
54285
- class RP {
54285
+ class R5 {
54286
54286
  constructor() {
54287
54287
  this.restEncoder = g0(), this.dsCurrVal = 0;
54288
54288
  }
@@ -54306,9 +54306,9 @@ class RP {
54306
54306
  t === 0 && Il(), Ar(this.restEncoder, t - 1), this.dsCurrVal += t;
54307
54307
  }
54308
54308
  }
54309
- class DP extends RP {
54309
+ class D5 extends R5 {
54310
54310
  constructor() {
54311
- super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new pm(), this.clientEncoder = new pp(), this.leftClockEncoder = new pm(), this.rightClockEncoder = new pm(), this.infoEncoder = new g_(dy), this.stringEncoder = new Z5(), this.parentInfoEncoder = new g_(dy), this.typeRefEncoder = new pp(), this.lenEncoder = new pp();
54311
+ super(), this.keyMap = /* @__PURE__ */ new Map(), this.keyClock = 0, this.keyClockEncoder = new pm(), this.clientEncoder = new pp(), this.leftClockEncoder = new pm(), this.rightClockEncoder = new pm(), this.infoEncoder = new g_(dy), this.stringEncoder = new ZP(), this.parentInfoEncoder = new g_(dy), this.typeRefEncoder = new pp(), this.lenEncoder = new pp();
54312
54312
  }
54313
54313
  toUint8Array() {
54314
54314
  const t = g0();
@@ -54399,7 +54399,7 @@ class DP extends RP {
54399
54399
  a === void 0 ? (this.keyClockEncoder.write(this.keyClock++), this.stringEncoder.write(t)) : this.keyClockEncoder.write(a);
54400
54400
  }
54401
54401
  }
54402
- const LP = (p, t, a, e) => {
54402
+ const L5 = (p, t, a, e) => {
54403
54403
  e = hu(e, t[0].id.clock);
54404
54404
  const s = Qa(t, e);
54405
54405
  Ar(p.restEncoder, t.length - s), p.writeClient(a), Ar(p.restEncoder, e);
@@ -54407,14 +54407,14 @@ const LP = (p, t, a, e) => {
54407
54407
  r.write(p, e - r.id.clock);
54408
54408
  for (let n = s + 1; n < t.length; n++)
54409
54409
  t[n].write(p, 0);
54410
- }, FP = (p, t, a) => {
54410
+ }, F5 = (p, t, a) => {
54411
54411
  const e = /* @__PURE__ */ new Map();
54412
54412
  a.forEach((s, r) => {
54413
54413
  li(t, r) > s && e.set(r, s);
54414
54414
  }), x0(t).forEach((s, r) => {
54415
54415
  a.has(r) || e.set(r, 0);
54416
54416
  }), Ar(p.restEncoder, e.size), Gc(e.entries()).sort((s, r) => r[0] - s[0]).forEach(([s, r]) => {
54417
- LP(
54417
+ L5(
54418
54418
  p,
54419
54419
  /** @type {Array<GC|Item>} */
54420
54420
  t.clients.get(s),
@@ -54422,13 +54422,13 @@ const LP = (p, t, a, e) => {
54422
54422
  r
54423
54423
  );
54424
54424
  });
54425
- }, BP = (p, t) => FP(p, t.doc.store, t.beforeState);
54426
- class zP {
54425
+ }, B5 = (p, t) => F5(p, t.doc.store, t.beforeState);
54426
+ class z5 {
54427
54427
  constructor() {
54428
54428
  this.l = [];
54429
54429
  }
54430
54430
  }
54431
- const x_ = () => new zP(), w_ = (p, t) => p.l.push(t), S_ = (p, t) => {
54431
+ const x_ = () => new z5(), w_ = (p, t) => p.l.push(t), S_ = (p, t) => {
54432
54432
  const a = p.l, e = a.length;
54433
54433
  p.l = a.filter((s) => t !== s), e === p.l.length && console.error("[yjs] Tried to remove event handler that doesn't exist.");
54434
54434
  }, CS = (p, t, a) => v0(p.l, [t, a]);
@@ -54441,7 +54441,7 @@ class hp {
54441
54441
  this.client = t, this.clock = a;
54442
54442
  }
54443
54443
  }
54444
- const Wf = (p, t) => p === t || p !== null && t !== null && p.client === t.client && p.clock === t.clock, Xr = (p, t) => new hp(p, t), $P = (p) => {
54444
+ const Wf = (p, t) => p === t || p !== null && t !== null && p.client === t.client && p.clock === t.clock, Xr = (p, t) => new hp(p, t), $5 = (p) => {
54445
54445
  for (const [t, a] of p.doc.share.entries())
54446
54446
  if (a === p)
54447
54447
  return t;
@@ -54453,7 +54453,7 @@ const Wf = (p, t) => p === t || p !== null && t !== null && p.client === t.clien
54453
54453
  }), _S(p, t.ds, (s) => {
54454
54454
  }), a.add(t));
54455
54455
  };
54456
- class UP {
54456
+ class U5 {
54457
54457
  constructor() {
54458
54458
  this.clients = /* @__PURE__ */ new Map(), this.pendingStructs = null, this.pendingDs = null;
54459
54459
  }
@@ -54495,12 +54495,12 @@ const x0 = (p) => {
54495
54495
  n = Pl((a + e) / 2);
54496
54496
  }
54497
54497
  throw Il();
54498
- }, HP = (p, t) => {
54498
+ }, H5 = (p, t) => {
54499
54499
  const a = p.clients.get(t.client);
54500
54500
  return a[Qa(a, t.clock)];
54501
54501
  }, gm = (
54502
54502
  /** @type {function(StructStore,ID):Item} */
54503
- HP
54503
+ H5
54504
54504
  ), gy = (p, t, a) => {
54505
54505
  const e = Qa(t, a), s = t[e];
54506
54506
  return s.id.clock < a && s instanceof Bo ? (t.splice(e + 1, 0, VS(p, s, a - s.id.clock)), e + 1) : e;
@@ -54513,7 +54513,7 @@ const x0 = (p) => {
54513
54513
  }, E_ = (p, t, a) => {
54514
54514
  const e = t.clients.get(a.client), s = Qa(e, a.clock), r = e[s];
54515
54515
  return a.clock !== r.id.clock + r.length - 1 && r.constructor !== Ms && e.splice(s + 1, 0, VS(p, r, a.clock - r.id.clock + 1)), r;
54516
- }, qP = (p, t, a) => {
54516
+ }, q5 = (p, t, a) => {
54517
54517
  const e = (
54518
54518
  /** @type {Array<GC|Item>} */
54519
54519
  p.clients.get(t.id.client)
@@ -54528,17 +54528,17 @@ const x0 = (p) => {
54528
54528
  o = t[n++], r < o.id.clock + o.length && gy(p, t, r), s(o);
54529
54529
  while (n < t.length && t[n].id.clock < r);
54530
54530
  };
54531
- class WP {
54531
+ class W5 {
54532
54532
  /**
54533
54533
  * @param {Doc} doc
54534
54534
  * @param {any} origin
54535
54535
  * @param {boolean} local
54536
54536
  */
54537
54537
  constructor(t, a, e) {
54538
- this.doc = t, this.deleteSet = new jP(), this.beforeState = x0(t.store), this.afterState = /* @__PURE__ */ new Map(), this.changed = /* @__PURE__ */ new Map(), this.changedParentTypes = /* @__PURE__ */ new Map(), this._mergeStructs = [], this.origin = a, this.meta = /* @__PURE__ */ new Map(), this.local = e, this.subdocsAdded = /* @__PURE__ */ new Set(), this.subdocsRemoved = /* @__PURE__ */ new Set(), this.subdocsLoaded = /* @__PURE__ */ new Set(), this._needFormattingCleanup = !1;
54538
+ this.doc = t, this.deleteSet = new j5(), this.beforeState = x0(t.store), this.afterState = /* @__PURE__ */ new Map(), this.changed = /* @__PURE__ */ new Map(), this.changedParentTypes = /* @__PURE__ */ new Map(), this._mergeStructs = [], this.origin = a, this.meta = /* @__PURE__ */ new Map(), this.local = e, this.subdocsAdded = /* @__PURE__ */ new Set(), this.subdocsRemoved = /* @__PURE__ */ new Set(), this.subdocsLoaded = /* @__PURE__ */ new Set(), this._needFormattingCleanup = !1;
54539
54539
  }
54540
54540
  }
54541
- const C_ = (p, t) => t.deleteSet.clients.size === 0 && !T5(t.afterState, (a, e) => t.beforeState.get(e) !== a) ? !1 : (wS(t.deleteSet), BP(p, t), PP(p, t.deleteSet), !0), k_ = (p, t, a) => {
54541
+ const C_ = (p, t) => t.deleteSet.clients.size === 0 && !TP(t.afterState, (a, e) => t.beforeState.get(e) !== a) ? !1 : (wS(t.deleteSet), B5(p, t), P5(p, t.deleteSet), !0), k_ = (p, t, a) => {
54542
54542
  const e = t._item;
54543
54543
  (e === null || e.id.clock < (p.beforeState.get(e.id.client) || 0) && !e.deleted) && pu(p.changed, t, Jc).add(a);
54544
54544
  }, gp = (p, t) => {
@@ -54557,7 +54557,7 @@ const C_ = (p, t) => t.deleteSet.clients.size === 0 && !T5(t.afterState, (a, e)
54557
54557
  }
54558
54558
  const r = t - s;
54559
54559
  return r && p.splice(t + 1 - r, r), r;
54560
- }, VP = (p, t, a) => {
54560
+ }, V5 = (p, t, a) => {
54561
54561
  for (const [e, s] of p.clients.entries()) {
54562
54562
  const r = (
54563
54563
  /** @type {Array<GC|Item>} */
@@ -54573,7 +54573,7 @@ const C_ = (p, t) => t.deleteSet.clients.size === 0 && !T5(t.afterState, (a, e)
54573
54573
  }
54574
54574
  }
54575
54575
  }
54576
- }, JP = (p, t) => {
54576
+ }, J5 = (p, t) => {
54577
54577
  p.clients.forEach((a, e) => {
54578
54578
  const s = (
54579
54579
  /** @type {Array<GC|Item>} */
@@ -54605,7 +54605,7 @@ const C_ = (p, t) => t.deleteSet.clients.size === 0 && !T5(t.afterState, (a, e)
54605
54605
  });
54606
54606
  }), o.push(() => e.emit("afterTransaction", [a, e])), v0(o, []), a._needFormattingCleanup && oI(a);
54607
54607
  } finally {
54608
- e.gc && VP(r, s, e.gcFilter), JP(r, s), a.afterState.forEach((u, c) => {
54608
+ e.gc && V5(r, s, e.gcFilter), J5(r, s), a.afterState.forEach((u, c) => {
54609
54609
  const f = a.beforeState.get(c) || 0;
54610
54610
  if (f !== u) {
54611
54611
  const d = (
@@ -54623,12 +54623,12 @@ const C_ = (p, t) => t.deleteSet.clients.size === 0 && !T5(t.afterState, (a, e)
54623
54623
  ), h = Qa(d, f);
54624
54624
  h + 1 < d.length && gp(d, h + 1) > 1 || h > 0 && gp(d, h);
54625
54625
  }
54626
- if (!a.local && a.afterState.get(e.clientID) !== a.beforeState.get(e.clientID) && (kP(_0, hS, "[yjs] ", gS, mS, "Changed the client-id because another client seems to be using it."), e.clientID = ES()), e.emit("afterTransactionCleanup", [a, e]), e._observers.has("update")) {
54627
- const u = new MP();
54626
+ if (!a.local && a.afterState.get(e.clientID) !== a.beforeState.get(e.clientID) && (k5(_0, hS, "[yjs] ", gS, mS, "Changed the client-id because another client seems to be using it."), e.clientID = ES()), e.emit("afterTransactionCleanup", [a, e]), e._observers.has("update")) {
54627
+ const u = new M5();
54628
54628
  C_(u, a) && e.emit("update", [u.toUint8Array(), a.origin, e, a]);
54629
54629
  }
54630
54630
  if (e._observers.has("updateV2")) {
54631
- const u = new DP();
54631
+ const u = new D5();
54632
54632
  C_(u, a) && e.emit("updateV2", [u.toUint8Array(), a.origin, e, a]);
54633
54633
  }
54634
54634
  const { subdocsAdded: o, subdocsLoaded: l, subdocsRemoved: i } = a;
@@ -54640,7 +54640,7 @@ const C_ = (p, t) => t.deleteSet.clients.size === 0 && !T5(t.afterState, (a, e)
54640
54640
  }, Dr = (p, t, a = null, e = !0) => {
54641
54641
  const s = p._transactionCleanups;
54642
54642
  let r = !1, n = null;
54643
- p._transaction === null && (r = !0, p._transaction = new WP(p, a, e), s.push(p._transaction), s.length === 1 && p.emit("beforeAllTransactions", [p]), p.emit("beforeTransaction", [p._transaction, p]));
54643
+ p._transaction === null && (r = !0, p._transaction = new W5(p, a, e), s.push(p._transaction), s.length === 1 && p.emit("beforeAllTransactions", [p]), p.emit("beforeTransaction", [p._transaction, p]));
54644
54644
  try {
54645
54645
  n = t(p._transaction);
54646
54646
  } finally {
@@ -54673,7 +54673,7 @@ class Oh {
54673
54673
  * type === event.target // => true
54674
54674
  */
54675
54675
  get path() {
54676
- return this._path || (this._path = GP(this.currentTarget, this.target));
54676
+ return this._path || (this._path = G5(this.currentTarget, this.target));
54677
54677
  }
54678
54678
  /**
54679
54679
  * Check if a struct is deleted by this event.
@@ -54785,7 +54785,7 @@ class Oh {
54785
54785
  );
54786
54786
  }
54787
54787
  }
54788
- const GP = (p, t) => {
54788
+ const G5 = (p, t) => {
54789
54789
  const a = [];
54790
54790
  for (; t._item !== null && t !== p; ) {
54791
54791
  if (t._item.parentSub !== null)
@@ -54804,10 +54804,10 @@ const GP = (p, t) => {
54804
54804
  }
54805
54805
  return a;
54806
54806
  }, zo = () => {
54807
- TP("Invalid access: Add Yjs type to a document before reading data.");
54807
+ T5("Invalid access: Add Yjs type to a document before reading data.");
54808
54808
  }, AS = 80;
54809
54809
  let w0 = 0;
54810
- class KP {
54810
+ class K5 {
54811
54811
  /**
54812
54812
  * @param {Item} p
54813
54813
  * @param {number} index
@@ -54816,16 +54816,16 @@ class KP {
54816
54816
  t.marker = !0, this.p = t, this.index = a, this.timestamp = w0++;
54817
54817
  }
54818
54818
  }
54819
- const YP = (p) => {
54819
+ const Y5 = (p) => {
54820
54820
  p.timestamp = w0++;
54821
54821
  }, jS = (p, t, a) => {
54822
54822
  p.p.marker = !1, p.p = t, t.marker = !0, p.index = a, p.timestamp = w0++;
54823
- }, ZP = (p, t, a) => {
54823
+ }, Z5 = (p, t, a) => {
54824
54824
  if (p.length >= AS) {
54825
54825
  const e = p.reduce((s, r) => s.timestamp < r.timestamp ? s : r);
54826
54826
  return jS(e, t, a), e;
54827
54827
  } else {
54828
- const e = new KP(t, a);
54828
+ const e = new K5(t, a);
54829
54829
  return p.push(e), e;
54830
54830
  }
54831
54831
  }, Ah = (p, t) => {
@@ -54833,7 +54833,7 @@ const YP = (p) => {
54833
54833
  return null;
54834
54834
  const a = p._searchMarker.length === 0 ? null : p._searchMarker.reduce((r, n) => fp(t - r.index) < fp(t - n.index) ? r : n);
54835
54835
  let e = p._start, s = 0;
54836
- for (a !== null && (e = a.p, s = a.index, YP(a)); e.right !== null && s < t; ) {
54836
+ for (a !== null && (e = a.p, s = a.index, Y5(a)); e.right !== null && s < t; ) {
54837
54837
  if (!e.deleted && e.countable) {
54838
54838
  if (t < s + e.length)
54839
54839
  break;
@@ -54846,7 +54846,7 @@ const YP = (p) => {
54846
54846
  for (; e.left !== null && e.left.id.client === e.id.client && e.left.id.clock + e.left.length === e.id.clock; )
54847
54847
  e = e.left, !e.deleted && e.countable && (s -= e.length);
54848
54848
  return a !== null && fp(a.index - s) < /** @type {YText|YArray<any>} */
54849
- e.parent.length / AS ? (jS(a, e, s), a) : ZP(p._searchMarker, e, s);
54849
+ e.parent.length / AS ? (jS(a, e, s), a) : Z5(p._searchMarker, e, s);
54850
54850
  }, Cd = (p, t, a) => {
54851
54851
  for (let e = p.length - 1; e >= 0; e--) {
54852
54852
  const s = p[e];
@@ -55021,7 +55021,7 @@ const NS = (p, t, a) => {
55021
55021
  return kd(p, (e, s) => {
55022
55022
  a.push(t(e, s, p));
55023
55023
  }), a;
55024
- }, QP = (p) => {
55024
+ }, Q5 = (p) => {
55025
55025
  let t = p._start, a = null, e = 0;
55026
55026
  return {
55027
55027
  [Symbol.iterator]() {
@@ -55113,7 +55113,7 @@ const NS = (p, t, a) => {
55113
55113
  a -= n.length;
55114
55114
  }
55115
55115
  return t._searchMarker && Cd(t._searchMarker, s, e.length), qp(p, t, n, e);
55116
- }, XP = (p, t, a) => {
55116
+ }, X5 = (p, t, a) => {
55117
55117
  let s = (t._searchMarker || []).reduce((r, n) => n.index > r.index ? n : r, { index: 0, p: t._start }).p;
55118
55118
  if (s)
55119
55119
  for (; s.right; )
@@ -55193,7 +55193,7 @@ const NS = (p, t, a) => {
55193
55193
  r = r.left;
55194
55194
  r !== null && Nc(r, t) && (a[s] = r.content.getContent()[r.length - 1]);
55195
55195
  }), a;
55196
- }, Vf = (p) => (p.doc ?? zo(), OP(
55196
+ }, Vf = (p) => (p.doc ?? zo(), O5(
55197
55197
  p._map.entries(),
55198
55198
  /** @param {any} entry */
55199
55199
  (t) => !t[1].deleted
@@ -55301,7 +55301,7 @@ class kl extends Oo {
55301
55301
  */
55302
55302
  push(t) {
55303
55303
  this.doc !== null ? Dr(this.doc, (a) => {
55304
- XP(
55304
+ X5(
55305
55305
  a,
55306
55306
  this,
55307
55307
  /** @type {any} */
@@ -55392,7 +55392,7 @@ class kl extends Oo {
55392
55392
  * @return {IterableIterator<T>}
55393
55393
  */
55394
55394
  [Symbol.iterator]() {
55395
- return QP(this);
55395
+ return Q5(this);
55396
55396
  }
55397
55397
  /**
55398
55398
  * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
@@ -55612,7 +55612,7 @@ class Yc extends Oo {
55612
55612
  t.writeTypeRef(dI);
55613
55613
  }
55614
55614
  }
55615
- const Ls = (p, t) => p === t || typeof p == "object" && typeof t == "object" && p && t && uP(p, t);
55615
+ const Ls = (p, t) => p === t || typeof p == "object" && typeof t == "object" && p && t && u5(p, t);
55616
55616
  class my {
55617
55617
  /**
55618
55618
  * @param {Item|null} left
@@ -55962,7 +55962,7 @@ class iI extends Oh {
55962
55962
  }))), i = "";
55963
55963
  break;
55964
55964
  case "retain":
55965
- u > 0 && (d = { retain: u }, sP(l) || (d.attributes = oP({}, l))), u = 0;
55965
+ u > 0 && (d = { retain: u }, s5(l) || (d.attributes = o5({}, l))), u = 0;
55966
55966
  break;
55967
55967
  }
55968
55968
  d && a.push(d), o = null;
@@ -56694,7 +56694,7 @@ class Td extends Zc {
56694
56694
  */
56695
56695
  clone() {
56696
56696
  const t = new Td(this.nodeName), a = this.getAttributes();
56697
- return aP(a, (e, s) => {
56697
+ return a5(a, (e, s) => {
56698
56698
  typeof e == "string" && t.setAttribute(s, e);
56699
56699
  }), t.insert(0, this.toArray().map((e) => e instanceof Oo ? e.clone() : e)), t;
56700
56700
  }
@@ -57769,7 +57769,7 @@ class Bo extends WS {
57769
57769
  gc(t, a) {
57770
57770
  if (!this.deleted)
57771
57771
  throw Il();
57772
- this.content.gc(t), a ? qP(t, this, new Ms(this.id, this.length)) : this.content = new Jp(this.length);
57772
+ this.content.gc(t), a ? q5(t, this, new Ms(this.id, this.length)) : this.content = new Jp(this.length);
57773
57773
  }
57774
57774
  /**
57775
57775
  * Transform the properties of this type to binary and write it to an
@@ -57781,9 +57781,9 @@ class Bo extends WS {
57781
57781
  * @param {number} offset
57782
57782
  */
57783
57783
  write(t, a) {
57784
- const e = a > 0 ? Xr(this.id.client, this.id.clock + a - 1) : this.origin, s = this.rightOrigin, r = this.parentSub, n = this.content.getRef() & P5 | (e === null ? 0 : Up) | // origin is defined
57784
+ const e = a > 0 ? Xr(this.id.client, this.id.clock + a - 1) : this.origin, s = this.rightOrigin, r = this.parentSub, n = this.content.getRef() & PP | (e === null ? 0 : Up) | // origin is defined
57785
57785
  (s === null ? 0 : cS) | // right origin is defined
57786
- (r === null ? 0 : N5);
57786
+ (r === null ? 0 : NP);
57787
57787
  if (t.writeInfo(n), e !== null && t.writeLeftID(e), s !== null && t.writeRightID(s), e === null && s === null) {
57788
57788
  const o = (
57789
57789
  /** @type {AbstractType<any>} */
@@ -57792,7 +57792,7 @@ class Bo extends WS {
57792
57792
  if (o._item !== void 0) {
57793
57793
  const l = o._item;
57794
57794
  if (l === null) {
57795
- const i = $P(o);
57795
+ const i = $5(o);
57796
57796
  t.writeParentInfo(!0), t.writeString(i);
57797
57797
  } else
57798
57798
  t.writeParentInfo(!1), t.writeLeftID(l.id);
@@ -58138,7 +58138,7 @@ function ZS({
58138
58138
  t !== !1 && /* @__PURE__ */ Te.jsx(xh, {}),
58139
58139
  /* @__PURE__ */ Te.jsx(SI, { onEscape: a }),
58140
58140
  /* @__PURE__ */ Te.jsx(Nw, {}),
58141
- s !== void 0 && /* @__PURE__ */ Te.jsx(C5, { editorRef: s })
58141
+ s !== void 0 && /* @__PURE__ */ Te.jsx(CP, { editorRef: s })
58142
58142
  ] }) });
58143
58143
  }
58144
58144
  function QS(p, t) {
@@ -58623,7 +58623,7 @@ function OI({
58623
58623
  const v = () => {
58624
58624
  a.dispatchCommand(yy, void 0);
58625
58625
  };
58626
- return /* @__PURE__ */ Te.jsxs(Te.Fragment, { children: [
58626
+ return console.log("CommentPlugin"), /* @__PURE__ */ Te.jsxs(Te.Fragment, { children: [
58627
58627
  u && Qi(
58628
58628
  /* @__PURE__ */ Te.jsx(
58629
58629
  EI,
@@ -61536,7 +61536,7 @@ function zI({
61536
61536
  return window.addEventListener("resize", g), m && m.addEventListener("scroll", g), () => {
61537
61537
  window.removeEventListener("resize", g), m && m.removeEventListener("scroll", g);
61538
61538
  };
61539
- }, [p, h, t]), sn(() => (p.getEditorState().read(() => {
61539
+ }, [p, h, t]), sn(() => (console.log("SELECTION_CHANGE_COMMAND for floating text format plugin"), p.getEditorState().read(() => {
61540
61540
  h();
61541
61541
  }), Vr(
61542
61542
  p.registerUpdateListener(({ editorState: m }) => {
@@ -61549,7 +61549,7 @@ function zI({
61549
61549
  () => (h(), !1),
61550
61550
  ar
61551
61551
  )
61552
- )), [p, h]), /* @__PURE__ */ Te.jsxs("div", { ref: u, className: "floating-text-format-popup", children: [
61552
+ )), [p, h]), console.log("Floatingtexttoolbarplugin"), /* @__PURE__ */ Te.jsxs("div", { ref: u, className: "floating-text-format-popup", children: [
61553
61553
  p.isEditable() && /* @__PURE__ */ Te.jsxs(Te.Fragment, { children: [
61554
61554
  /* @__PURE__ */ Te.jsx(
61555
61555
  "button",
@@ -61879,11 +61879,11 @@ function ZI({
61879
61879
  /* @__PURE__ */ Te.jsx(J2, {}),
61880
61880
  /* @__PURE__ */ Te.jsx(Sh, {}),
61881
61881
  /* @__PURE__ */ Te.jsx(
61882
- v5,
61882
+ vP,
61883
61883
  {
61884
61884
  items: i,
61885
- menuComponent: _5,
61886
- menuItemComponent: x5
61885
+ menuComponent: _P,
61886
+ menuItemComponent: xP
61887
61887
  }
61888
61888
  ),
61889
61889
  /* @__PURE__ */ Te.jsx(HI, { onChange: h.includes("objective") ? q : U }),
@@ -62043,4 +62043,4 @@ export {
62043
62043
  jt as w,
62044
62044
  yr as x
62045
62045
  };
62046
- //# sourceMappingURL=index-61a46ad5.js.map
62046
+ //# sourceMappingURL=index-89c37e6e.js.map