@fileverse-dev/ddoc 3.0.77 → 3.0.78-fix-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -2,7 +2,7 @@ var fJ = Object.defineProperty;
2
2
  var gJ = (e, t, n) => t in e ? fJ(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var lt = (e, t, n) => gJ(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as Cn from "react";
5
- import Et, { createRef as mJ, memo as dh, createContext as yd, createElement as x2, useContext as xd, version as q7, useRef as Ve, useState as Be, useDebugValue as MD, useEffect as Re, forwardRef as sr, useLayoutEffect as ph, useCallback as Se, useMemo as Ft, Fragment as bJ, useReducer as yJ, cloneElement as IO, useImperativeHandle as LO } from "react";
5
+ import Et, { createRef as mJ, memo as dh, createContext as yd, createElement as x2, useContext as xd, version as q7, useRef as Ve, useState as Be, useDebugValue as MD, useEffect as Re, forwardRef as sr, useLayoutEffect as ph, useCallback as Te, useMemo as Ft, Fragment as bJ, useReducer as yJ, cloneElement as IO, useImperativeHandle as LO } from "react";
6
6
  import UO, { flushSync as xJ, createPortal as C1 } from "react-dom";
7
7
  import { Drawer as PO, DrawerContent as vJ, DrawerHeader as FJ, DrawerTitle as wJ, DrawerClose as DJ, LucideIcon as Ue, useTheme as kJ, Button as qt, TextField as ea, DynamicDropdown as Zn, Tooltip as ln, IconButton as vn, Avatar as OD, cn as Ge, ButtonGroup as RD, Skeleton as rn, TextAreaFieldV2 as v2, DatePicker as EJ, TimePicker as CJ, Divider as uf, BottomDrawer as zO, DynamicModal as ID, Select as cf, SelectTrigger as df, SelectValue as F2, SelectContent as pf, SelectItem as hf, DynamicDropdownV2 as LD, Popover as ff, PopoverTrigger as gf, PopoverContent as mf, toast as UD, UltimateIcons as _J, PopoverClose as $O, SelectGroup as HO, SelectLabel as AJ, Checkbox as SJ, DrawerTrigger as V7, AnimatedLoader as TJ, Label as jJ, DynamicDrawer as BJ, DynamicDrawerV2 as NJ, Tag as w2, TagInput as WO } from "@fileverse/ui";
8
8
  import { isAddress as MJ, createPublicClient as OJ, http as RJ } from "viem";
@@ -478,7 +478,7 @@ function JJ() {
478
478
  value: Qt
479
479
  }), Object.freeze && (Object.freeze(Ot.props), Object.freeze(Ot)), Ot;
480
480
  };
481
- function Te(Fe, Ie, rt, dt, Qt) {
481
+ function Ae(Fe, Ie, rt, dt, Qt) {
482
482
  {
483
483
  var tn, Rt = {}, Ot = null, br = null;
484
484
  rt !== void 0 && (R(rt), Ot = "" + rt), Ee(Ie) && (R(Ie.key), Ot = "" + Ie.key), ve(Ie) && (br = Ie.ref, Ce(Ie, Qt));
@@ -506,7 +506,7 @@ function JJ() {
506
506
  }
507
507
  var wt;
508
508
  wt = !1;
509
- function Ae(Fe) {
509
+ function Se(Fe) {
510
510
  return typeof Fe == "object" && Fe !== null && Fe.$$typeof === t;
511
511
  }
512
512
  function Pe() {
@@ -557,15 +557,15 @@ Check the top-level render call using <` + rt + ">.");
557
557
  if (be(Fe))
558
558
  for (var rt = 0; rt < Fe.length; rt++) {
559
559
  var dt = Fe[rt];
560
- Ae(dt) && ht(dt, Ie);
560
+ Se(dt) && ht(dt, Ie);
561
561
  }
562
- else if (Ae(Fe))
562
+ else if (Se(Fe))
563
563
  Fe._store && (Fe._store.validated = !0);
564
564
  else if (Fe) {
565
565
  var Qt = m(Fe);
566
566
  if (typeof Qt == "function" && Qt !== Fe.entries)
567
567
  for (var tn = Qt.call(Fe), Rt; !(Rt = tn.next()).done; )
568
- Ae(Rt.value) && ht(Rt.value, Ie);
568
+ Se(Rt.value) && ht(Rt.value, Ie);
569
569
  }
570
570
  }
571
571
  }
@@ -618,7 +618,7 @@ Check the top-level render call using <` + rt + ">.");
618
618
  var Qe;
619
619
  Fe === null ? Qe = "null" : be(Fe) ? Qe = "array" : Fe !== void 0 && Fe.$$typeof === t ? (Qe = "<" + (O(Fe.type) || "Unknown") + " />", Ot = " Did you accidentally export a JSX literal instead of a component?") : Qe = typeof Fe, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Qe, Ot);
620
620
  }
621
- var fe = Te(Fe, Ie, rt, Qt, tn);
621
+ var fe = Ae(Fe, Ie, rt, Qt, tn);
622
622
  if (fe == null)
623
623
  return fe;
624
624
  if (Rt) {
@@ -19107,17 +19107,17 @@ function Jse(e, t, n, r, o, i, s) {
19107
19107
  previousLocation: me,
19108
19108
  scrollLooper: je,
19109
19109
  slideLooper: Me,
19110
- dragHandler: Te,
19110
+ dragHandler: Ae,
19111
19111
  animation: Ne,
19112
19112
  eventHandler: Je,
19113
19113
  scrollBounds: st,
19114
19114
  options: {
19115
19115
  loop: wt
19116
19116
  }
19117
- }, Ae) => {
19118
- const Pe = ye.settled(), nt = !st.shouldConstrain(), ct = wt ? Pe : Pe && nt, Ke = ct && !Te.pointerDown();
19117
+ }, Se) => {
19118
+ const Pe = ye.settled(), nt = !st.shouldConstrain(), ct = wt ? Pe : Pe && nt, Ke = ct && !Ae.pointerDown();
19119
19119
  Ke && Ne.stop();
19120
- const ht = Ee.get() * Ae + me.get() * (1 - Ae);
19120
+ const ht = Ee.get() * Se + me.get() * (1 - Se);
19121
19121
  Ce.set(ht), wt && (je.loop(ye.direction()), Me.loop()), ve.to(Ce.get()), Ke && Je.emit("settle"), ct || Je.emit("scroll");
19122
19122
  }, N = Sse(r, o, () => Q(pe), (ye) => ce(pe, ye)), te = 0.68, le = re[ae.get()], G = F0(le), V = F0(le), ie = F0(le), he = F0(le), De = Rse(G, ie, V, he, p, te), be = Wse(d, re, oe, J, he), de = qse(N, ae, B, De, be, he, s), ue = zse(J), ge = jf(), R = Yse(t, n, s, g), {
19123
19123
  slideRegistry: W
@@ -19369,7 +19369,7 @@ function L2(e, t, n) {
19369
19369
  }
19370
19370
  L2.globalOptions = void 0;
19371
19371
  function Sk(e = {}, t = []) {
19372
- const n = Ve(e), r = Ve(t), [o, i] = Be(), [s, a] = Be(), l = Se(() => {
19372
+ const n = Ve(e), r = Ve(t), [o, i] = Be(), [s, a] = Be(), l = Te(() => {
19373
19373
  o && o.reInit(n.current, r.current);
19374
19374
  }, [o]);
19375
19375
  return Re(() => {
@@ -19409,13 +19409,13 @@ const qL = sr(
19409
19409
  axis: e === "horizontal" ? "x" : "y"
19410
19410
  },
19411
19411
  r
19412
- ), [c, d] = Be(!1), [p, h] = Be(!1), f = Se((y) => {
19412
+ ), [c, d] = Be(!1), [p, h] = Be(!1), f = Te((y) => {
19413
19413
  y && (d(y.canScrollPrev()), h(y.canScrollNext()));
19414
- }, []), g = Se(() => {
19414
+ }, []), g = Te(() => {
19415
19415
  u == null || u.scrollPrev();
19416
- }, [u]), m = Se(() => {
19416
+ }, [u]), m = Te(() => {
19417
19417
  u == null || u.scrollNext();
19418
- }, [u]), b = Se(
19418
+ }, [u]), b = Te(
19419
19419
  (y) => {
19420
19420
  y.key === "ArrowLeft" ? (y.preventDefault(), g()) : y.key === "ArrowRight" && (y.preventDefault(), m());
19421
19421
  },
@@ -19495,14 +19495,14 @@ const E5 = sr(
19495
19495
  );
19496
19496
  E5.displayName = "CarouselItem";
19497
19497
  const GL = sr(({ index: e, className: t, ...n }, r) => {
19498
- const { api: o } = M1(), [i, s] = Be(0), [, a] = Be([]), l = Se(
19498
+ const { api: o } = M1(), [i, s] = Be(0), [, a] = Be([]), l = Te(
19499
19499
  (p) => {
19500
19500
  o && o.scrollTo(p);
19501
19501
  },
19502
19502
  [o]
19503
- ), u = Se((p) => {
19503
+ ), u = Te((p) => {
19504
19504
  p && a(p.scrollSnapList());
19505
- }, []), c = Se((p) => {
19505
+ }, []), c = Te((p) => {
19506
19506
  p && s(p.selectedScrollSnap());
19507
19507
  }, []);
19508
19508
  Re(() => {
@@ -28109,47 +28109,47 @@ const lP = yd(void 0), wce = ({
28109
28109
  handleClick: !1
28110
28110
  }), Q = localStorage.getItem("ensCache"), [ce, N] = Be(
28111
28111
  Q ? JSON.parse(Q) : {}
28112
- ), [te, le] = Be([]), G = Se(
28113
- async (Ae, Pe) => {
28114
- if (te.includes(Ae)) {
28112
+ ), [te, le] = Be([]), G = Te(
28113
+ async (Se, Pe) => {
28114
+ if (te.includes(Se)) {
28115
28115
  Pe({
28116
- name: Ae || "Anonymous",
28116
+ name: Se || "Anonymous",
28117
28117
  isEns: !1
28118
28118
  });
28119
28119
  return;
28120
28120
  }
28121
- if (Ae && ce[Ae]) {
28121
+ if (Se && ce[Se]) {
28122
28122
  Pe({
28123
- ...ce[Ae]
28123
+ ...ce[Se]
28124
28124
  });
28125
28125
  return;
28126
28126
  }
28127
- if (!Ae || !h) {
28127
+ if (!Se || !h) {
28128
28128
  Pe({
28129
- name: Ae || "Anonymous",
28129
+ name: Se || "Anonymous",
28130
28130
  isEns: !1
28131
28131
  });
28132
28132
  return;
28133
28133
  }
28134
28134
  try {
28135
- le((ht) => [...ht, Ae]);
28135
+ le((ht) => [...ht, Se]);
28136
28136
  const { name: nt, isEns: ct, resolved: Ke } = await Cae(
28137
- Ae,
28137
+ Se,
28138
28138
  h
28139
28139
  // Add definite assignment assertion if ensResolutionUrl is guaranteed
28140
28140
  );
28141
28141
  Ke && N((ht) => {
28142
28142
  const _t = {
28143
28143
  ...ht,
28144
- [Ae]: { name: nt, isEns: ct }
28144
+ [Se]: { name: nt, isEns: ct }
28145
28145
  };
28146
28146
  return localStorage.setItem("ensCache", JSON.stringify(_t)), _t;
28147
28147
  }), le(
28148
- (ht) => ht.filter((_t) => _t !== Ae)
28148
+ (ht) => ht.filter((_t) => _t !== Se)
28149
28149
  ), Pe({ name: nt, isEns: ct });
28150
28150
  } catch (nt) {
28151
28151
  console.error("Error fetching ENS name:", nt), Pe({
28152
- name: Ae || "Anonymous",
28152
+ name: Se || "Anonymous",
28153
28153
  isEns: !1
28154
28154
  });
28155
28155
  }
@@ -28157,49 +28157,49 @@ const lP = yd(void 0), wce = ({
28157
28157
  [te, ce, h]
28158
28158
  ), V = Ft(
28159
28159
  () => r.filter(
28160
- (Ae) => (Ae.tabId ?? _c) === u
28160
+ (Se) => (Se.tabId ?? _c) === u
28161
28161
  ),
28162
28162
  [r, u]
28163
28163
  ), ie = Ft(
28164
- () => V.find((Ae) => Ae.id === a),
28164
+ () => V.find((Se) => Se.id === a),
28165
28165
  [V, a]
28166
28166
  );
28167
28167
  O1([ee, K, re], () => {
28168
28168
  z && (oe(!0), U(!1));
28169
28169
  });
28170
- const he = Se(() => {
28171
- const { state: Ae } = t, { from: Pe, to: nt } = Ae.selection, ct = Ae.doc.textBetween(Pe, nt, " ");
28170
+ const he = Te(() => {
28171
+ const { state: Se } = t, { from: Pe, to: nt } = Se.selection, ct = Se.doc.textBetween(Pe, nt, " ");
28172
28172
  J ? ie && q(ie.selectedContent || "") : q(ct), U(!0), w == null || w();
28173
- }, [t, J, ie, w]), De = Se(
28174
- (Ae, Pe = "", nt) => ({
28173
+ }, [t, J, ie, w]), De = Te(
28174
+ (Se, Pe = "", nt) => ({
28175
28175
  id: `comment-${Du()}`,
28176
28176
  tabId: u,
28177
28177
  username: nt,
28178
- selectedContent: Ae,
28178
+ selectedContent: Se,
28179
28179
  // Preserve line breaks in content
28180
28180
  content: Pe || "",
28181
28181
  replies: [],
28182
28182
  createdAt: /* @__PURE__ */ new Date()
28183
28183
  }),
28184
28184
  [u]
28185
- ), be = Se(
28186
- (Ae, Pe) => {
28185
+ ), be = Te(
28186
+ (Se, Pe) => {
28187
28187
  const nt = sue(n);
28188
28188
  if (!Pe()) return;
28189
28189
  const Ke = Wo(n, nt);
28190
28190
  if (!(!Ke || Ke.byteLength === 0))
28191
28191
  return {
28192
- type: Ae,
28192
+ type: Se,
28193
28193
  updateChunk: Vr(Ke)
28194
28194
  };
28195
28195
  },
28196
28196
  [n]
28197
- ), de = Se(
28198
- (Ae, Pe) => {
28197
+ ), de = Te(
28198
+ (Se, Pe) => {
28199
28199
  if (!t) return;
28200
28200
  const { state: nt } = t, { from: ct, to: Ke } = nt.selection, ht = nt.doc.textBetween(ct, Ke, " "), _t = De(
28201
28201
  ht,
28202
- Ae,
28202
+ Se,
28203
28203
  Pe || i
28204
28204
  ), Gt = be(
28205
28205
  "create",
@@ -28217,35 +28217,35 @@ const lP = yd(void 0), wce = ({
28217
28217
  d,
28218
28218
  be
28219
28219
  ]
28220
- ), ue = Se(
28221
- (Ae) => {
28220
+ ), ue = Te(
28221
+ (Se) => {
28222
28222
  const Pe = be(
28223
28223
  "resolve",
28224
- () => t.commands.resolveComment(Ae)
28224
+ () => t.commands.resolveComment(Se)
28225
28225
  );
28226
- f == null || f(Ae, Pe);
28226
+ f == null || f(Se, Pe);
28227
28227
  },
28228
28228
  [t, f, be]
28229
- ), ge = Se(
28230
- (Ae) => {
28229
+ ), ge = Te(
28230
+ (Se) => {
28231
28231
  const Pe = be(
28232
28232
  "unresolve",
28233
- () => t.commands.unresolveComment(Ae)
28233
+ () => t.commands.unresolveComment(Se)
28234
28234
  );
28235
- g == null || g(Ae, Pe);
28235
+ g == null || g(Se, Pe);
28236
28236
  },
28237
28237
  [t, g, be]
28238
- ), R = Se(
28239
- (Ae) => {
28238
+ ), R = Te(
28239
+ (Se) => {
28240
28240
  const Pe = be(
28241
28241
  "delete",
28242
- () => t.commands.unsetComment(Ae)
28242
+ () => t.commands.unsetComment(Se)
28243
28243
  );
28244
- m == null || m(Ae, Pe);
28244
+ m == null || m(Se, Pe);
28245
28245
  },
28246
28246
  [t, m, be]
28247
- ), W = Se(
28248
- (Ae, Pe, nt) => {
28247
+ ), W = Te(
28248
+ (Se, Pe, nt) => {
28249
28249
  if (!Pe.trim()) return;
28250
28250
  const ct = {
28251
28251
  id: `reply-${Du()}`,
@@ -28256,18 +28256,18 @@ const lP = yd(void 0), wce = ({
28256
28256
  createdAt: /* @__PURE__ */ new Date(),
28257
28257
  selectedContent: ""
28258
28258
  };
28259
- nt == null || nt(Ae, ct);
28259
+ nt == null || nt(Se, ct);
28260
28260
  },
28261
28261
  [u, i]
28262
- ), ne = Se(
28263
- (Ae) => {
28262
+ ), ne = Te(
28263
+ (Se) => {
28264
28264
  var nt, ct;
28265
28265
  if (!t || !((nt = t.view) != null && nt.dom) || !V.length) return;
28266
- const Pe = V.find((Ke) => Ke.id === Ae);
28266
+ const Pe = V.find((Ke) => Ke.id === Se);
28267
28267
  if (Pe) {
28268
28268
  if (Pe.selectedContent) {
28269
28269
  const Ke = t.view.dom.querySelector(
28270
- `[data-comment-id="${Ae}"]`
28270
+ `[data-comment-id="${Se}"]`
28271
28271
  );
28272
28272
  if (Ke) {
28273
28273
  const ht = t.view.posAtDOM(Ke, 0), _t = ht + (((ct = Ke.textContent) == null ? void 0 : ct.length) ?? 0);
@@ -28290,25 +28290,25 @@ const lP = yd(void 0), wce = ({
28290
28290
  });
28291
28291
  }
28292
28292
  }
28293
- l(Ae);
28293
+ l(Se);
28294
28294
  }
28295
28295
  },
28296
28296
  [t, V, l]
28297
- ), pe = Se(
28298
- (Ae) => {
28299
- const Pe = Ae.target.value;
28300
- _(Pe), Pe || (Ae.target.style.height = "40px");
28297
+ ), pe = Te(
28298
+ (Se) => {
28299
+ const Pe = Se.target.value;
28300
+ _(Pe), Pe || (Se.target.style.height = "40px");
28301
28301
  },
28302
28302
  []
28303
- ), ye = Se(
28304
- (Ae) => {
28305
- const Pe = Ae.target.value;
28306
- E(Pe), Pe || (Ae.target.style.height = "40px");
28303
+ ), ye = Te(
28304
+ (Se) => {
28305
+ const Pe = Se.target.value;
28306
+ E(Pe), Pe || (Se.target.style.height = "40px");
28307
28307
  },
28308
28308
  []
28309
- ), ve = Se(() => {
28309
+ ), ve = Te(() => {
28310
28310
  if (!O.trim() || !i) return;
28311
- const Ae = {
28311
+ const Se = {
28312
28312
  id: `comment-${Du()}`,
28313
28313
  tabId: u,
28314
28314
  username: i,
@@ -28318,7 +28318,7 @@ const lP = yd(void 0), wce = ({
28318
28318
  replies: [],
28319
28319
  createdAt: /* @__PURE__ */ new Date()
28320
28320
  };
28321
- d == null || d(Ae), l(Ae.id), E(""), D == null || D(), requestAnimationFrame(() => {
28321
+ d == null || d(Se), l(Se.id), E(""), D == null || D(), requestAnimationFrame(() => {
28322
28322
  L.current && L.current.scrollTo({
28323
28323
  top: 0,
28324
28324
  behavior: "smooth"
@@ -28332,43 +28332,43 @@ const lP = yd(void 0), wce = ({
28332
28332
  l,
28333
28333
  D,
28334
28334
  L
28335
- ]), Ee = Se(
28336
- (Ae) => {
28337
- Ae.key === "Enter" && !Ae.shiftKey && (Ae.preventDefault(), ve());
28335
+ ]), Ee = Te(
28336
+ (Se) => {
28337
+ Se.key === "Enter" && !Se.shiftKey && (Se.preventDefault(), ve());
28338
28338
  },
28339
28339
  [ve]
28340
- ), Ce = Se(() => {
28340
+ ), Ce = Te(() => {
28341
28341
  !a || !j.trim() || (W(a, j, p), _(""));
28342
- }, [a, j, W, p]), me = Se(
28343
- (Ae) => {
28344
- Ae.key === "Enter" && !Ae.shiftKey && (Ae.preventDefault(), Ce());
28342
+ }, [a, j, W, p]), me = Te(
28343
+ (Se) => {
28344
+ Se.key === "Enter" && !Se.shiftKey && (Se.preventDefault(), Ce());
28345
28345
  },
28346
28346
  [Ce]
28347
- ), je = Se(() => {
28348
- M((Ae) => !Ae);
28349
- }, []), Me = Se(
28350
- (Ae, Pe) => {
28351
- Ae.currentTarget.style.height = "auto";
28347
+ ), je = Te(() => {
28348
+ M((Se) => !Se);
28349
+ }, []), Me = Te(
28350
+ (Se, Pe) => {
28351
+ Se.currentTarget.style.height = "auto";
28352
28352
  const nt = Math.min(
28353
- Math.max(40, Ae.currentTarget.scrollHeight),
28353
+ Math.max(40, Se.currentTarget.scrollHeight),
28354
28354
  Pe.length > 30 || Pe.includes(`
28355
28355
  `) ? 96 : 40
28356
28356
  );
28357
- Ae.currentTarget.style.height = `${nt}px`;
28357
+ Se.currentTarget.style.height = `${nt}px`;
28358
28358
  },
28359
28359
  []
28360
- ), Te = Ft(
28360
+ ), Ae = Ft(
28361
28361
  () => V.filter(
28362
- (Ae) => !Ae.resolved && Ae.selectedContent && Ae.selectedContent.length > 0 && !Ae.deleted
28362
+ (Se) => !Se.resolved && Se.selectedContent && Se.selectedContent.length > 0 && !Se.deleted
28363
28363
  ),
28364
28364
  [V]
28365
28365
  ), Ne = Ft(
28366
- () => Te.findIndex((Ae) => Ae.id === a),
28367
- [Te, a]
28368
- ), Je = Se(() => {
28369
- var Ae, Pe;
28370
- if ((Ae = t.view) != null && Ae.dom && Ne > 0) {
28371
- const nt = Te[Ne - 1], ct = t.view.dom.querySelector(
28366
+ () => Ae.findIndex((Se) => Se.id === a),
28367
+ [Ae, a]
28368
+ ), Je = Te(() => {
28369
+ var Se, Pe;
28370
+ if ((Se = t.view) != null && Se.dom && Ne > 0) {
28371
+ const nt = Ae[Ne - 1], ct = t.view.dom.querySelector(
28372
28372
  `[data-comment-id="${nt.id}"]`
28373
28373
  );
28374
28374
  if (ct) {
@@ -28376,10 +28376,10 @@ const lP = yd(void 0), wce = ({
28376
28376
  t.commands.setTextSelection({ from: Ke, to: ht }), ne(nt.id || "");
28377
28377
  }
28378
28378
  }
28379
- }, [Ne, Te, t, ne]), st = Se(() => {
28380
- var Ae, Pe;
28381
- if ((Ae = t.view) != null && Ae.dom && Ne < Te.length - 1) {
28382
- const nt = Te[Ne + 1], ct = t.view.dom.querySelector(
28379
+ }, [Ne, Ae, t, ne]), st = Te(() => {
28380
+ var Se, Pe;
28381
+ if ((Se = t.view) != null && Se.dom && Ne < Ae.length - 1) {
28382
+ const nt = Ae[Ne + 1], ct = t.view.dom.querySelector(
28383
28383
  `[data-comment-id="${nt.id}"]`
28384
28384
  );
28385
28385
  if (ct) {
@@ -28387,7 +28387,7 @@ const lP = yd(void 0), wce = ({
28387
28387
  t.commands.setTextSelection({ from: Ke, to: ht }), ne(nt.id || "");
28388
28388
  }
28389
28389
  }
28390
- }, [Ne, Te, t, ne]), wt = Ft(
28390
+ }, [Ne, Ae, t, ne]), wt = Ft(
28391
28391
  () => ({
28392
28392
  comments: V,
28393
28393
  showResolved: A,
@@ -28429,7 +28429,7 @@ const lP = yd(void 0), wce = ({
28429
28429
  buttonRef: K,
28430
28430
  replySectionRef: P,
28431
28431
  dropdownRef: re,
28432
- activeComments: Te,
28432
+ activeComments: Ae,
28433
28433
  handleInput: Me,
28434
28434
  isCommentActive: J,
28435
28435
  isCommentResolved: ae,
@@ -28484,7 +28484,7 @@ const lP = yd(void 0), wce = ({
28484
28484
  he,
28485
28485
  X,
28486
28486
  oe,
28487
- Te,
28487
+ Ae,
28488
28488
  Me,
28489
28489
  J,
28490
28490
  ae,
@@ -31829,10 +31829,10 @@ function IP() {
31829
31829
  const ye = Kt({}, ["audio", "video", "img", "source", "image", "track"]);
31830
31830
  let ve = null;
31831
31831
  const Ee = Kt({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ce = "http://www.w3.org/1998/Math/MathML", me = "http://www.w3.org/2000/svg", je = "http://www.w3.org/1999/xhtml";
31832
- let Me = je, Te = !1, Ne = null;
31832
+ let Me = je, Ae = !1, Ne = null;
31833
31833
  const Je = Kt({}, [Ce, me, je], Ov);
31834
31834
  let st = Kt({}, ["mi", "mo", "mn", "ms", "mtext"]), wt = Kt({}, ["annotation-xml"]);
31835
- const Ae = Kt({}, ["title", "style", "font", "a", "script"]);
31835
+ const Se = Kt({}, ["title", "style", "font", "a", "script"]);
31836
31836
  let Pe = null;
31837
31837
  const nt = ["application/xhtml+xml", "text/html"], ct = "text/html";
31838
31838
  let Ke = null, ht = null;
@@ -31859,7 +31859,7 @@ function IP() {
31859
31859
  tagName: "template"
31860
31860
  });
31861
31861
  const ot = e2(fe.tagName), $t = e2(Le.tagName);
31862
- return Ne[fe.namespaceURI] ? fe.namespaceURI === me ? Le.namespaceURI === je ? ot === "svg" : Le.namespaceURI === Ce ? ot === "svg" && ($t === "annotation-xml" || st[$t]) : !!Xt[ot] : fe.namespaceURI === Ce ? Le.namespaceURI === je ? ot === "math" : Le.namespaceURI === me ? ot === "math" && wt[$t] : !!bn[ot] : fe.namespaceURI === je ? Le.namespaceURI === me && !wt[$t] || Le.namespaceURI === Ce && !st[$t] ? !1 : !bn[ot] && (Ae[ot] || !Xt[ot]) : !!(Pe === "application/xhtml+xml" && Ne[fe.namespaceURI]) : !1;
31862
+ return Ne[fe.namespaceURI] ? fe.namespaceURI === me ? Le.namespaceURI === je ? ot === "svg" : Le.namespaceURI === Ce ? ot === "svg" && ($t === "annotation-xml" || st[$t]) : !!Xt[ot] : fe.namespaceURI === Ce ? Le.namespaceURI === je ? ot === "math" : Le.namespaceURI === me ? ot === "math" && wt[$t] : !!bn[ot] : fe.namespaceURI === je ? Le.namespaceURI === me && !wt[$t] || Le.namespaceURI === Ce && !st[$t] ? !1 : !bn[ot] && (Se[ot] || !Xt[ot]) : !!(Pe === "application/xhtml+xml" && Ne[fe.namespaceURI]) : !1;
31863
31863
  }, cn = function(fe) {
31864
31864
  Gh(t.removed, {
31865
31865
  element: fe
@@ -31910,7 +31910,7 @@ function IP() {
31910
31910
  if (!Le || !Le.documentElement) {
31911
31911
  Le = w.createDocument(Me, "template", null);
31912
31912
  try {
31913
- Le.documentElement.innerHTML = Te ? k : $t;
31913
+ Le.documentElement.innerHTML = Ae ? k : $t;
31914
31914
  } catch {
31915
31915
  }
31916
31916
  }
@@ -32071,7 +32071,7 @@ function IP() {
32071
32071
  };
32072
32072
  return t.sanitize = function(Qe) {
32073
32073
  let fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Le = null, ot = null, $t = null, Zt = null;
32074
- if (Te = !Qe, Te && (Qe = "<!-->"), typeof Qe != "string" && !rt(Qe))
32074
+ if (Ae = !Qe, Ae && (Qe = "<!-->"), typeof Qe != "string" && !rt(Qe))
32075
32075
  if (typeof Qe.toString == "function") {
32076
32076
  if (Qe = Qe.toString(), typeof Qe != "string")
32077
32077
  throw Yh("dirty is not a string, aborting");
@@ -36557,7 +36557,7 @@ const $0 = (e) => {
36557
36557
  setIsLinkPopupOpen: o,
36558
36558
  onError: i
36559
36559
  }) => {
36560
- const [s, a] = Be(t.getAttributes("link").href), l = Se(() => {
36560
+ const [s, a] = Be(t.getAttributes("link").href), l = Te(() => {
36561
36561
  if (s === "" || s === void 0) {
36562
36562
  t.chain().focus().extendMarkRange("link").unsetLink().run();
36563
36563
  return;
@@ -37752,7 +37752,7 @@ const $0 = (e) => {
37752
37752
  const S = m.current.closest('[role="dialog"]');
37753
37753
  S && S.remove();
37754
37754
  }
37755
- }, E = Se(() => {
37755
+ }, E = Te(() => {
37756
37756
  if (!(o != null && o.length)) return null;
37757
37757
  let T = o.sort(
37758
37758
  (S, L) => new Date(S.createdAt || /* @__PURE__ */ new Date()).getTime() - new Date(L.createdAt || /* @__PURE__ */ new Date()).getTime()
@@ -38619,12 +38619,12 @@ const E1e = /* @__PURE__ */ qu(k1e), t0 = () => {
38619
38619
  });
38620
38620
  }), !c;
38621
38621
  }, Dz = (e) => {
38622
- const t = Se(
38622
+ const t = Te(
38623
38623
  (o) => {
38624
38624
  e && e.chain().focus().setFontSize(o).run();
38625
38625
  },
38626
38626
  [e]
38627
- ), n = Se(
38627
+ ), n = Te(
38628
38628
  (o) => {
38629
38629
  if (!e) return;
38630
38630
  const { from: i, to: s } = e.state.selection;
@@ -39671,16 +39671,16 @@ R1e.displayName = "Toolbar.Divider";
39671
39671
  const I1e = {
39672
39672
  Wrapper: Sz
39673
39673
  }, L1e = ({ editor: e, appendTo: t }) => {
39674
- const n = Se(() => O1e(e, "columns"), [e]), r = Se(() => {
39674
+ const n = Te(() => O1e(e, "columns"), [e]), r = Te(() => {
39675
39675
  const l = !e.isEditable;
39676
39676
  return e.isActive("columns") && !l;
39677
- }, [e]), o = Se(() => {
39677
+ }, [e]), o = Te(() => {
39678
39678
  e.chain().focus().setLayout(gc.AlignLeft).run();
39679
- }, [e]), i = Se(() => {
39679
+ }, [e]), i = Te(() => {
39680
39680
  e.chain().focus().setLayout(gc.AlignRight).run();
39681
- }, [e]), s = Se(() => {
39681
+ }, [e]), s = Te(() => {
39682
39682
  e.chain().focus().setLayout(gc.AlignCenter).run();
39683
- }, [e]), a = Se(() => {
39683
+ }, [e]), a = Te(() => {
39684
39684
  e.chain().focus().deleteNode("columns").run();
39685
39685
  }, [e]);
39686
39686
  return /* @__PURE__ */ F.jsx(
@@ -40167,13 +40167,13 @@ const Nz = ({
40167
40167
  ydoc: n,
40168
40168
  exportOptions: r
40169
40169
  }) => {
40170
- const o = Se(
40170
+ const o = Te(
40171
40171
  (x) => (x || "Untitled").replace(/\s+/g, " ").trim(),
40172
40172
  []
40173
- ), i = Se(
40173
+ ), i = Te(
40174
40174
  (x) => x.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"),
40175
40175
  []
40176
- ), s = Se((x) => x.includes("(.pdf)") ? "pdf" : x.includes("(.md)") ? "md" : x.includes("(.html)") ? "html" : x.includes("(.txt)") ? "txt" : "", []), a = Ft(
40176
+ ), s = Te((x) => x.includes("(.pdf)") ? "pdf" : x.includes("(.md)") ? "md" : x.includes("(.html)") ? "html" : x.includes("(.txt)") ? "txt" : "", []), a = Ft(
40177
40177
  () => r.filter((x) => x !== null).reduce((x, v) => {
40178
40178
  const k = s(v.title);
40179
40179
  return k && (x[k] = v), x;
@@ -40185,26 +40185,26 @@ const Nz = ({
40185
40185
  label: v.title
40186
40186
  })),
40187
40187
  [a]
40188
- ), u = Se(() => {
40188
+ ), u = Te(() => {
40189
40189
  if (!e) return "Untitled";
40190
40190
  const x = e.getJSON();
40191
40191
  return $0(
40192
40192
  x
40193
40193
  ) || "Untitled";
40194
- }, [e]), c = Se(
40194
+ }, [e]), c = Te(
40195
40195
  async (x, v) => {
40196
40196
  const k = a[x];
40197
40197
  !k || k.disabled || k.onClick(v);
40198
40198
  },
40199
40199
  [a]
40200
- ), d = Se(
40200
+ ), d = Te(
40201
40201
  (x) => {
40202
40202
  if (!e || !n) return null;
40203
40203
  const v = n.getXmlFragment(x), k = Bz(v);
40204
40204
  return kh(e, k);
40205
40205
  },
40206
40206
  [e, n]
40207
- ), p = Se(async () => {
40207
+ ), p = Te(async () => {
40208
40208
  if (!e || !n || t.length === 0) return;
40209
40209
  const x = [];
40210
40210
  try {
@@ -40234,7 +40234,7 @@ const Nz = ({
40234
40234
  o,
40235
40235
  t,
40236
40236
  n
40237
- ]), h = Se(
40237
+ ]), h = Te(
40238
40238
  async (x) => {
40239
40239
  if (!e || !n || t.length === 0) return;
40240
40240
  const v = x || u(), k = [];
@@ -40263,7 +40263,7 @@ ${T}`.trim());
40263
40263
  }
40264
40264
  },
40265
40265
  [d, e, u, o, t, n]
40266
- ), f = Se(
40266
+ ), f = Te(
40267
40267
  async (x) => {
40268
40268
  if (!e || !n || t.length === 0) return;
40269
40269
  const v = x || u(), k = [];
@@ -40297,7 +40297,7 @@ ${O.getHTML()}`
40297
40297
  t,
40298
40298
  n
40299
40299
  ]
40300
- ), g = Se(
40300
+ ), g = Te(
40301
40301
  async (x) => {
40302
40302
  if (!e || !n || t.length === 0) return;
40303
40303
  const v = x || u(), k = [];
@@ -40325,7 +40325,7 @@ ${O.getHTML()}`
40325
40325
  }
40326
40326
  },
40327
40327
  [d, e, u, t, n]
40328
- ), m = Se(
40328
+ ), m = Te(
40329
40329
  async ({
40330
40330
  format: x,
40331
40331
  tab: v,
@@ -40361,12 +40361,12 @@ ${O.getHTML()}`
40361
40361
  g,
40362
40362
  c
40363
40363
  ]
40364
- ), b = Se(
40364
+ ), b = Te(
40365
40365
  ({ format: x, tab: v, name: k }) => {
40366
40366
  m({ format: x, tab: v, name: k });
40367
40367
  },
40368
40368
  [m]
40369
- ), y = Se(
40369
+ ), y = Te(
40370
40370
  async ({
40371
40371
  format: x,
40372
40372
  tab: v,
@@ -40406,7 +40406,7 @@ ${O.getHTML()}`
40406
40406
  { id: "all", label: "All tabs" }
40407
40407
  ],
40408
40408
  []
40409
- ), A = s.length > 1, M = Se(
40409
+ ), A = s.length > 1, M = Te(
40410
40410
  (j = "pdf", _) => {
40411
40411
  if (k.find(
40412
40412
  (E) => E.id === j
@@ -47992,7 +47992,7 @@ const f4 = Et.use || // This extra generic is to avoid TypeScript mixing up the
47992
47992
  }, [
47993
47993
  r,
47994
47994
  b
47995
- ]), P = _1.useSyncExternalStore(Se(
47995
+ ]), P = _1.useSyncExternalStore(Te(
47996
47996
  (ce) => _(b, (N, te) => {
47997
47997
  S(te, N) || ce();
47998
47998
  }),
@@ -48001,7 +48001,7 @@ const f4 = Et.use || // This extra generic is to avoid TypeScript mixing up the
48001
48001
  r,
48002
48002
  b
48003
48003
  ]
48004
- ), L[0], L[1]), $ = !x.current, q = h[b] && h[b].length > 0, z = P.data, U = nn(z) ? T && B$(T) ? f4(T) : T : z, X = P.error, oe = Ve(U), ee = p ? nn(z) ? nn(oe.current) ? U : oe.current : z : U, K = q && !nn(X) ? !1 : $ && !nn(a) ? a : C().isPaused() ? !1 : i ? nn(U) ? !1 : l : nn(U) || l, re = !!(b && t && $ && K), J = nn(P.isValidating) ? re : P.isValidating, ae = nn(P.isLoading) ? re : P.isLoading, B = Se(
48004
+ ), L[0], L[1]), $ = !x.current, q = h[b] && h[b].length > 0, z = P.data, U = nn(z) ? T && B$(T) ? f4(T) : T : z, X = P.error, oe = Ve(U), ee = p ? nn(z) ? nn(oe.current) ? U : oe.current : z : U, K = q && !nn(X) ? !1 : $ && !nn(a) ? a : C().isPaused() ? !1 : i ? nn(U) ? !1 : l : nn(U) || l, re = !!(b && t && $ && K), J = nn(P.isValidating) ? re : P.isValidating, ae = nn(P.isLoading) ? re : P.isLoading, B = Te(
48005
48005
  async (ce) => {
48006
48006
  const N = w.current;
48007
48007
  if (!b || !N || v.current || C().isPaused())
@@ -48064,7 +48064,7 @@ const f4 = Et.use || // This extra generic is to avoid TypeScript mixing up the
48064
48064
  b,
48065
48065
  r
48066
48066
  ]
48067
- ), Y = Se(
48067
+ ), Y = Te(
48068
48068
  // Use callback to make sure `keyRef.current` returns latest result every time
48069
48069
  (...ce) => M$(r, k.current, ...ce),
48070
48070
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -48314,7 +48314,7 @@ const Mxe = ({
48314
48314
  Dw.delete(y), l.current && (cancelAnimationFrame(l.current), l.current = null);
48315
48315
  };
48316
48316
  }, [n]);
48317
- const u = Se(() => {
48317
+ const u = Te(() => {
48318
48318
  const { doc: y } = n.state, x = y.content.content.filter(
48319
48319
  (C) => {
48320
48320
  var A, M, j;
@@ -48333,7 +48333,7 @@ const Mxe = ({
48333
48333
  headingCount: x
48334
48334
  };
48335
48335
  return o.current = D, i.current = v, Ud = D, OS = k, D;
48336
- }, [n]), c = Se((y) => {
48336
+ }, [n]), c = Te((y) => {
48337
48337
  var D;
48338
48338
  const { doc: x } = y.state, v = /* @__PURE__ */ new Map(), k = [];
48339
48339
  let w = 0;
@@ -48428,7 +48428,7 @@ const Mxe = ({
48428
48428
  u,
48429
48429
  e.content,
48430
48430
  s
48431
- ]), m = Se(() => {
48431
+ ]), m = Te(() => {
48432
48432
  var C;
48433
48433
  if (!h) return;
48434
48434
  const y = t(), { headingMap: x } = u(), v = x.get(h);
@@ -48456,7 +48456,7 @@ const Mxe = ({
48456
48456
  const A = t() + e.nodeSize;
48457
48457
  n.chain().focus(A - 1).run();
48458
48458
  });
48459
- }, [n, h, u, t, e]), b = Se(() => {
48459
+ }, [n, h, u, t, e]), b = Te(() => {
48460
48460
  var C, A;
48461
48461
  if (!h) return t() + e.nodeSize;
48462
48462
  const { headingMap: y } = u(), x = y.get(h);
@@ -48590,7 +48590,7 @@ const Mxe = ({
48590
48590
  }
48591
48591
  };
48592
48592
  function Rxe(e) {
48593
- const [t, n] = Be(!1), r = Ve(e), o = Ve(null), i = Se(() => {
48593
+ const [t, n] = Be(!1), r = Ve(e), o = Ve(null), i = Te(() => {
48594
48594
  if (!r.current) {
48595
48595
  n(!1);
48596
48596
  return;
@@ -48621,10 +48621,10 @@ function Rxe(e) {
48621
48621
  );
48622
48622
  }
48623
48623
  const Ixe = (e, t, n) => {
48624
- const r = Rxe(e), o = Se(() => {
48624
+ const r = Rxe(e), o = Te(() => {
48625
48625
  const l = e.chain();
48626
48626
  l.setNodeSelection(n).unsetAllMarks(), (t == null ? void 0 : t.type.name) !== "paragraph" && l.setParagraph(), l.run();
48627
- }, [e, n, t == null ? void 0 : t.type.name]), i = Se(() => {
48627
+ }, [e, n, t == null ? void 0 : t.type.name]), i = Te(() => {
48628
48628
  if (r)
48629
48629
  return;
48630
48630
  e.commands.setNodeSelection(n);
@@ -48633,13 +48633,13 @@ const Ixe = (e, t, n) => {
48633
48633
  n + ((t == null ? void 0 : t.nodeSize) || 0),
48634
48634
  u.toJSON()
48635
48635
  ).run();
48636
- }, [e, n, t == null ? void 0 : t.nodeSize]), s = Se(() => {
48636
+ }, [e, n, t == null ? void 0 : t.nodeSize]), s = Te(() => {
48637
48637
  e.chain().setMeta("hideDragHandle", !0).setNodeSelection(n).run(), document.execCommand("copy"), UD({
48638
48638
  title: "Copied to clipboard",
48639
48639
  toastType: "mini",
48640
48640
  variant: "success"
48641
48641
  });
48642
- }, [e, n]), a = Se(() => {
48642
+ }, [e, n]), a = Te(() => {
48643
48643
  Oxe(e, n), e.chain().setMeta("hideDragHandle", !0).setNodeSelection(n).deleteSelection().run();
48644
48644
  }, [e, n]);
48645
48645
  return {
@@ -51971,7 +51971,7 @@ const g3e = Et.memo(
51971
51971
  node: e,
51972
51972
  getPos: t,
51973
51973
  editor: n
51974
- }), D = Se(() => {
51974
+ }), D = Te(() => {
51975
51975
  const { content: B } = e.content, Y = B[0].attrs.id, Q = B[0].content.content[0].text, ce = B8(Q), N = Y.replace(/-/g, "").substring(0, 8), te = `heading=${ce}-${N}`;
51976
51976
  i == null || i(te);
51977
51977
  }, [e.content, i]), C = Ft(() => {
@@ -52037,31 +52037,31 @@ const g3e = Et.memo(
52037
52037
  }, O = (B, Y) => {
52038
52038
  const Q = t(), ce = Q + e.nodeSize;
52039
52039
  B === "img" ? n == null || n.chain().focus(Q).deleteRange({ from: Q === 0 ? Q : Q + 1, to: ce }).setMedia({ src: Y, "media-type": "img" }).run() : B !== "secure-img" && (n == null || n.chain().focus(Q).deleteRange({ from: Q === 0 ? Q : Q + 1, to: ce }).setIframe({ src: Y, width: 640, height: 360 }).run());
52040
- }, E = Se((B) => {
52040
+ }, E = Te((B) => {
52041
52041
  B.altKey ? S() : T();
52042
- }, []), T = Se(() => {
52042
+ }, []), T = Te(() => {
52043
52043
  const B = t() + e.nodeSize;
52044
52044
  n.commands.insertContentAt(B, {
52045
52045
  type: "dBlock",
52046
52046
  content: [{ type: "paragraph" }]
52047
52047
  });
52048
- }, [t, n, e.nodeSize]), S = Se(() => {
52048
+ }, [t, n, e.nodeSize]), S = Te(() => {
52049
52049
  const B = t();
52050
52050
  n.commands.insertContentAt(B, {
52051
52051
  type: "dBlock",
52052
52052
  content: [{ type: "paragraph" }]
52053
52053
  });
52054
- }, [t, n]), L = Se(
52054
+ }, [t, n]), L = Te(
52055
52055
  (B) => {
52056
52056
  B.altKey ? r() : l((Y) => !Y);
52057
52057
  },
52058
52058
  [r]
52059
- ), P = Se(() => {
52059
+ ), P = Te(() => {
52060
52060
  _();
52061
52061
  }, [A, j]), $ = Ft(
52062
52062
  () => I$(P, 1e3),
52063
52063
  [P]
52064
- ), q = Se(
52064
+ ), q = Te(
52065
52065
  (B) => {
52066
52066
  const Y = t() + e.nodeSize;
52067
52067
  n.commands.insertContentAt(Y - 4, B);
@@ -52073,7 +52073,7 @@ const g3e = Et.memo(
52073
52073
  ), U = Ft(
52074
52074
  () => zxe(q),
52075
52075
  [q]
52076
- ), X = Se(() => {
52076
+ ), X = Te(() => {
52077
52077
  c(!u), p(u ? 2 : U.length);
52078
52078
  }, [u, U.length]), oe = Ft(() => {
52079
52079
  switch (w) {
@@ -54279,15 +54279,15 @@ function e4e(e, t) {
54279
54279
  if (Me === void 0 && (Me = !0), C.forEach(function(Ne) {
54280
54280
  Ne[me] && Ne[me].apply(Ne, je);
54281
54281
  }), Me) {
54282
- var Te;
54283
- (Te = v.props)[me].apply(Te, je);
54282
+ var Ae;
54283
+ (Ae = v.props)[me].apply(Ae, je);
54284
54284
  }
54285
54285
  }
54286
54286
  function $() {
54287
54287
  var me = v.props.aria;
54288
54288
  if (me.content) {
54289
- var je = "aria-" + me.content, Me = w.id, Te = op(v.props.triggerTarget || e);
54290
- Te.forEach(function(Ne) {
54289
+ var je = "aria-" + me.content, Me = w.id, Ae = op(v.props.triggerTarget || e);
54290
+ Ae.forEach(function(Ne) {
54291
54291
  var Je = Ne.getAttribute(je);
54292
54292
  if (v.state.isVisible)
54293
54293
  Ne.setAttribute(je, Je ? Je + " " + Me : Me);
@@ -54352,17 +54352,17 @@ function e4e(e, t) {
54352
54352
  }
54353
54353
  function ae(me, je) {
54354
54354
  var Me = T().box;
54355
- function Te(Ne) {
54356
- Ne.target === Me && (F4(Me, "remove", Te), je());
54355
+ function Ae(Ne) {
54356
+ Ne.target === Me && (F4(Me, "remove", Ae), je());
54357
54357
  }
54358
54358
  if (me === 0)
54359
54359
  return je();
54360
- F4(Me, "remove", d), F4(Me, "add", Te), d = Te;
54360
+ F4(Me, "remove", d), F4(Me, "add", Ae), d = Ae;
54361
54361
  }
54362
54362
  function B(me, je, Me) {
54363
54363
  Me === void 0 && (Me = !1);
54364
- var Te = op(v.props.triggerTarget || e);
54365
- Te.forEach(function(Ne) {
54364
+ var Ae = op(v.props.triggerTarget || e);
54365
+ Ae.forEach(function(Ne) {
54366
54366
  Ne.addEventListener(me, je, Me), h.push({
54367
54367
  node: Ne,
54368
54368
  eventType: me,
@@ -54393,23 +54393,23 @@ function e4e(e, t) {
54393
54393
  }
54394
54394
  function Q() {
54395
54395
  h.forEach(function(me) {
54396
- var je = me.node, Me = me.eventType, Te = me.handler, Ne = me.options;
54397
- je.removeEventListener(Me, Te, Ne);
54396
+ var je = me.node, Me = me.eventType, Ae = me.handler, Ne = me.options;
54397
+ je.removeEventListener(Me, Ae, Ne);
54398
54398
  }), h = [];
54399
54399
  }
54400
54400
  function ce(me) {
54401
54401
  var je, Me = !1;
54402
54402
  if (!(!v.state.isEnabled || G(me) || a)) {
54403
- var Te = ((je = c) == null ? void 0 : je.type) === "focus";
54403
+ var Ae = ((je = c) == null ? void 0 : je.type) === "focus";
54404
54404
  c = me, g = me.currentTarget, q(), !v.state.isVisible && Ove(me) && tm.forEach(function(Ne) {
54405
54405
  return Ne(me);
54406
- }), me.type === "click" && (v.props.trigger.indexOf("mouseenter") < 0 || s) && v.props.hideOnClick !== !1 && v.state.isVisible ? Me = !0 : be(me), me.type === "click" && (s = !Me), Me && !Te && de(me);
54406
+ }), me.type === "click" && (v.props.trigger.indexOf("mouseenter") < 0 || s) && v.props.hideOnClick !== !1 && v.state.isVisible ? Me = !0 : be(me), me.type === "click" && (s = !Me), Me && !Ae && de(me);
54407
54407
  }
54408
54408
  }
54409
54409
  function N(me) {
54410
54410
  var je = me.target, Me = O().contains(je) || w.contains(je);
54411
54411
  if (!(me.type === "mousemove" && Me)) {
54412
- var Te = De().concat(w).map(function(Ne) {
54412
+ var Ae = De().concat(w).map(function(Ne) {
54413
54413
  var Je, st = Ne._tippy, wt = (Je = st.popperInstance) == null ? void 0 : Je.state;
54414
54414
  return wt ? {
54415
54415
  popperRect: Ne.getBoundingClientRect(),
@@ -54417,7 +54417,7 @@ function e4e(e, t) {
54417
54417
  props: n
54418
54418
  } : null;
54419
54419
  }).filter(Boolean);
54420
- Uve(Te, me) && (z(), de(me));
54420
+ Uve(Ae, me) && (z(), de(me));
54421
54421
  }
54422
54422
  }
54423
54423
  function te(me) {
@@ -54438,10 +54438,10 @@ function e4e(e, t) {
54438
54438
  }
54439
54439
  function V() {
54440
54440
  ie();
54441
- var me = v.props, je = me.popperOptions, Me = me.placement, Te = me.offset, Ne = me.getReferenceClientRect, Je = me.moveTransition, st = _() ? Sw(w).arrow : null, wt = Ne ? {
54441
+ var me = v.props, je = me.popperOptions, Me = me.placement, Ae = me.offset, Ne = me.getReferenceClientRect, Je = me.moveTransition, st = _() ? Sw(w).arrow : null, wt = Ne ? {
54442
54442
  getBoundingClientRect: Ne,
54443
54443
  contextElement: Ne.contextElement || O()
54444
- } : e, Ae = {
54444
+ } : e, Se = {
54445
54445
  name: "$$tippy",
54446
54446
  enabled: !0,
54447
54447
  phase: "beforeWrite",
@@ -54458,7 +54458,7 @@ function e4e(e, t) {
54458
54458
  }, Pe = [{
54459
54459
  name: "offset",
54460
54460
  options: {
54461
- offset: Te
54461
+ offset: Ae
54462
54462
  }
54463
54463
  }, {
54464
54464
  name: "preventOverflow",
@@ -54480,7 +54480,7 @@ function e4e(e, t) {
54480
54480
  options: {
54481
54481
  adaptive: !Je
54482
54482
  }
54483
- }, Ae];
54483
+ }, Se];
54484
54484
  _() && st && Pe.push({
54485
54485
  name: "arrow",
54486
54486
  options: {
@@ -54511,8 +54511,8 @@ function e4e(e, t) {
54511
54511
  }
54512
54512
  function be(me) {
54513
54513
  v.clearDelayTimeouts(), me && P("onTrigger", [v, me]), ee();
54514
- var je = S(!0), Me = M(), Te = Me[0], Ne = Me[1];
54515
- Ws.isTouch && Te === "hold" && Ne && (je = Ne), je ? r = setTimeout(function() {
54514
+ var je = S(!0), Me = M(), Ae = Me[0], Ne = Me[1];
54515
+ Ws.isTouch && Ae === "hold" && Ne && (je = Ne), je ? r = setTimeout(function() {
54516
54516
  v.show();
54517
54517
  }, je) : v.show();
54518
54518
  }
@@ -54545,10 +54545,10 @@ function e4e(e, t) {
54545
54545
  var je = v.props, Me = uT(e, Object.assign({}, je, oT(me), {
54546
54546
  ignoreAttributes: !0
54547
54547
  }));
54548
- v.props = Me, Y(), je.interactiveDebounce !== Me.interactiveDebounce && (z(), f = nT(N, Me.interactiveDebounce)), je.triggerTarget && !Me.triggerTarget ? op(je.triggerTarget).forEach(function(Te) {
54549
- Te.removeAttribute("aria-expanded");
54550
- }) : Me.triggerTarget && e.removeAttribute("aria-expanded"), q(), L(), D && D(je, Me), v.popperInstance && (V(), De().forEach(function(Te) {
54551
- requestAnimationFrame(Te._tippy.popperInstance.forceUpdate);
54548
+ v.props = Me, Y(), je.interactiveDebounce !== Me.interactiveDebounce && (z(), f = nT(N, Me.interactiveDebounce)), je.triggerTarget && !Me.triggerTarget ? op(je.triggerTarget).forEach(function(Ae) {
54549
+ Ae.removeAttribute("aria-expanded");
54550
+ }) : Me.triggerTarget && e.removeAttribute("aria-expanded"), q(), L(), D && D(je, Me), v.popperInstance && (V(), De().forEach(function(Ae) {
54551
+ requestAnimationFrame(Ae._tippy.popperInstance.forceUpdate);
54552
54552
  })), P("onAfterUpdate", [v, me]);
54553
54553
  }
54554
54554
  }
@@ -54559,8 +54559,8 @@ function e4e(e, t) {
54559
54559
  }
54560
54560
  function pe() {
54561
54561
  process.env.NODE_ENV !== "production" && qa(v.state.isDestroyed, Pd("show"));
54562
- var me = v.state.isVisible, je = v.state.isDestroyed, Me = !v.state.isEnabled, Te = Ws.isTouch && !v.props.touch, Ne = x4(v.props.duration, 0, xi.duration);
54563
- if (!(me || je || Me || Te) && !O().hasAttribute("disabled") && (P("onShow", [v], !1), v.props.onShow(v) !== !1)) {
54562
+ var me = v.state.isVisible, je = v.state.isDestroyed, Me = !v.state.isEnabled, Ae = Ws.isTouch && !v.props.touch, Ne = x4(v.props.duration, 0, xi.duration);
54563
+ if (!(me || je || Me || Ae) && !O().hasAttribute("disabled") && (P("onShow", [v], !1), v.props.onShow(v) !== !1)) {
54564
54564
  if (v.state.isVisible = !0, _() && (w.style.visibility = "visible"), L(), ee(), v.state.isMounted || (w.style.transition = "none"), _()) {
54565
54565
  var Je = T(), st = Je.box, wt = Je.content;
54566
54566
  v4([st, wt], 0);
@@ -54581,13 +54581,13 @@ function e4e(e, t) {
54581
54581
  }
54582
54582
  function ye() {
54583
54583
  process.env.NODE_ENV !== "production" && qa(v.state.isDestroyed, Pd("hide"));
54584
- var me = !v.state.isVisible, je = v.state.isDestroyed, Me = !v.state.isEnabled, Te = x4(v.props.duration, 1, xi.duration);
54584
+ var me = !v.state.isVisible, je = v.state.isDestroyed, Me = !v.state.isEnabled, Ae = x4(v.props.duration, 1, xi.duration);
54585
54585
  if (!(me || je || Me) && (P("onHide", [v], !1), v.props.onHide(v) !== !1)) {
54586
54586
  if (v.state.isVisible = !1, v.state.isShown = !1, u = !1, s = !1, _() && (w.style.visibility = "hidden"), z(), K(), L(!0), _()) {
54587
54587
  var Ne = T(), Je = Ne.box, st = Ne.content;
54588
- v.props.animation && (v4([Je, st], Te), iT([Je, st], "hidden"));
54588
+ v.props.animation && (v4([Je, st], Ae), iT([Je, st], "hidden"));
54589
54589
  }
54590
- $(), q(), v.props.animation ? _() && re(Te, v.unmount) : v.unmount();
54590
+ $(), q(), v.props.animation ? _() && re(Ae, v.unmount) : v.unmount();
54591
54591
  }
54592
54592
  }
54593
54593
  function ve(me) {
@@ -69149,15 +69149,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
69149
69149
  for (ie.max_code = W, he = V.heap_len >> 1; 1 <= he; he--) Y(V, de, he);
69150
69150
  for (be = R; he = V.heap[1], V.heap[1] = V.heap[V.heap_len--], Y(V, de, 1), De = V.heap[1], V.heap[--V.heap_max] = he, V.heap[--V.heap_max] = De, de[2 * be] = de[2 * he] + de[2 * De], V.depth[be] = (V.depth[he] >= V.depth[De] ? V.depth[he] : V.depth[De]) + 1, de[2 * he + 1] = de[2 * De + 1] = be, V.heap[1] = be++, Y(V, de, 1), 2 <= V.heap_len; ) ;
69151
69151
  V.heap[--V.heap_max] = V.heap[1], function(ne, pe) {
69152
- var ye, ve, Ee, Ce, me, je, Me = pe.dyn_tree, Te = pe.max_code, Ne = pe.stat_desc.static_tree, Je = pe.stat_desc.has_stree, st = pe.stat_desc.extra_bits, wt = pe.stat_desc.extra_base, Ae = pe.stat_desc.max_length, Pe = 0;
69152
+ var ye, ve, Ee, Ce, me, je, Me = pe.dyn_tree, Ae = pe.max_code, Ne = pe.stat_desc.static_tree, Je = pe.stat_desc.has_stree, st = pe.stat_desc.extra_bits, wt = pe.stat_desc.extra_base, Se = pe.stat_desc.max_length, Pe = 0;
69153
69153
  for (Ce = 0; Ce <= m; Ce++) ne.bl_count[Ce] = 0;
69154
- for (Me[2 * ne.heap[ne.heap_max] + 1] = 0, ye = ne.heap_max + 1; ye < g; ye++) Ae < (Ce = Me[2 * Me[2 * (ve = ne.heap[ye]) + 1] + 1] + 1) && (Ce = Ae, Pe++), Me[2 * ve + 1] = Ce, Te < ve || (ne.bl_count[Ce]++, me = 0, wt <= ve && (me = st[ve - wt]), je = Me[2 * ve], ne.opt_len += je * (Ce + me), Je && (ne.static_len += je * (Ne[2 * ve + 1] + me)));
69154
+ for (Me[2 * ne.heap[ne.heap_max] + 1] = 0, ye = ne.heap_max + 1; ye < g; ye++) Se < (Ce = Me[2 * Me[2 * (ve = ne.heap[ye]) + 1] + 1] + 1) && (Ce = Se, Pe++), Me[2 * ve + 1] = Ce, Ae < ve || (ne.bl_count[Ce]++, me = 0, wt <= ve && (me = st[ve - wt]), je = Me[2 * ve], ne.opt_len += je * (Ce + me), Je && (ne.static_len += je * (Ne[2 * ve + 1] + me)));
69155
69155
  if (Pe !== 0) {
69156
69156
  do {
69157
- for (Ce = Ae - 1; ne.bl_count[Ce] === 0; ) Ce--;
69158
- ne.bl_count[Ce]--, ne.bl_count[Ce + 1] += 2, ne.bl_count[Ae]--, Pe -= 2;
69157
+ for (Ce = Se - 1; ne.bl_count[Ce] === 0; ) Ce--;
69158
+ ne.bl_count[Ce]--, ne.bl_count[Ce + 1] += 2, ne.bl_count[Se]--, Pe -= 2;
69159
69159
  } while (0 < Pe);
69160
- for (Ce = Ae; Ce !== 0; Ce--) for (ve = ne.bl_count[Ce]; ve !== 0; ) Te < (Ee = ne.heap[--ye]) || (Me[2 * Ee + 1] !== Ce && (ne.opt_len += (Ce - Me[2 * Ee + 1]) * Me[2 * Ee], Me[2 * Ee + 1] = Ce), ve--);
69160
+ for (Ce = Se; Ce !== 0; Ce--) for (ve = ne.bl_count[Ce]; ve !== 0; ) Ae < (Ee = ne.heap[--ye]) || (Me[2 * Ee + 1] !== Ce && (ne.opt_len += (Ce - Me[2 * Ee + 1]) * Me[2 * Ee], Me[2 * Ee + 1] = Ce), ve--);
69161
69161
  }
69162
69162
  }(V, ie), re(de, W, V.bl_count);
69163
69163
  }
@@ -106739,19 +106739,19 @@ function jOe({
106739
106739
  var sX = jOe;
106740
106740
  const aX = sr(
106741
106741
  (e, t) => {
106742
- const [n, r] = Be(0), o = Se(
106742
+ const [n, r] = Be(0), o = Te(
106743
106743
  (l) => {
106744
106744
  const u = e.items[l];
106745
106745
  u && e.command(u);
106746
106746
  },
106747
106747
  [e]
106748
- ), i = Se(() => {
106748
+ ), i = Te(() => {
106749
106749
  r(
106750
106750
  (l) => (l + e.items.length - 1) % e.items.length
106751
106751
  );
106752
- }, [e.items.length]), s = Se(() => {
106752
+ }, [e.items.length]), s = Te(() => {
106753
106753
  r((l) => (l + 1) % e.items.length);
106754
- }, [e.items.length]), a = Se(() => {
106754
+ }, [e.items.length]), a = Te(() => {
106755
106755
  o(n);
106756
106756
  }, [o, n]);
106757
106757
  return Re(() => {
@@ -167425,7 +167425,7 @@ const qOe = ({
167425
167425
  command: t,
167426
167426
  editor: n
167427
167427
  }) => {
167428
- const [r, o] = Be(0), [i, s] = Be(e), a = Rn("(max-width: 640px)"), l = Om(n, "callout"), u = Om(n, "codeBlock"), c = Om(n, "column"), d = Om(n, "table"), p = Se(
167428
+ const [r, o] = Be(0), [i, s] = Be(e), a = Rn("(max-width: 640px)"), l = Om(n, "callout"), u = Om(n, "codeBlock"), c = Om(n, "column"), d = Om(n, "table"), p = Te(
167429
167429
  (f) => {
167430
167430
  const g = i[f];
167431
167431
  g && (g.title === "Continue writing" || t(g));
@@ -169118,7 +169118,7 @@ const PM = () => {
169118
169118
  }, [u]), Re(() => {
169119
169119
  c(A), p(!!M);
169120
169120
  }, [A, M]);
169121
- const U = Se(() => {
169121
+ const U = Te(() => {
169122
169122
  var pe, ye;
169123
169123
  if (!k) return "";
169124
169124
  const V = t.getJSON();
@@ -169150,7 +169150,7 @@ const PM = () => {
169150
169150
  }
169151
169151
  return De = (de + R).trim(), De && (De = `Document context (${ue} chars before, ${W} chars after):
169152
169152
  ${De}`), De;
169153
- }, [t, n, k]), X = Se(async () => {
169153
+ }, [t, n, k]), X = Te(async () => {
169154
169154
  var V;
169155
169155
  if (u.trim())
169156
169156
  try {
@@ -169207,7 +169207,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169207
169207
  U,
169208
169208
  k,
169209
169209
  r
169210
- ]), oe = Se(() => {
169210
+ ]), oe = Te(() => {
169211
169211
  if (P.current) {
169212
169212
  P.current.abort(), l(!1), s(!1);
169213
169213
  const V = setTimeout(() => {
@@ -169219,7 +169219,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169219
169219
  }, 0);
169220
169220
  return () => clearTimeout(V);
169221
169221
  }
169222
- }, []), ee = Se(() => {
169222
+ }, []), ee = Te(() => {
169223
169223
  if (typeof n == "function") {
169224
169224
  m(!0);
169225
169225
  const V = setTimeout(() => {
@@ -169238,7 +169238,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169238
169238
  }, 150);
169239
169239
  return () => clearTimeout(V);
169240
169240
  }
169241
- }, [n, t, e.nodeSize, M, o]), K = Se(() => {
169241
+ }, [n, t, e.nodeSize, M, o]), K = Te(() => {
169242
169242
  if (typeof n == "function") {
169243
169243
  m(!0);
169244
169244
  const V = setTimeout(() => {
@@ -169257,14 +169257,14 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169257
169257
  }, 150);
169258
169258
  return () => clearTimeout(V);
169259
169259
  }
169260
- }, [n, t, e.nodeSize, o]), re = Se(
169260
+ }, [n, t, e.nodeSize, o]), re = Te(
169261
169261
  (V) => {
169262
169262
  c(V.target.value);
169263
169263
  },
169264
169264
  []
169265
- ), J = Se(() => {
169265
+ ), J = Te(() => {
169266
169266
  r && u !== A && r({ prompt: u });
169267
- }, [r, u, A]), ae = Se(
169267
+ }, [r, u, A]), ae = Te(
169268
169268
  (V) => {
169269
169269
  r == null || r({ model: V });
169270
169270
  const ie = L == null ? void 0 : L.defaultModels.find(
@@ -169273,22 +169273,22 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169273
169273
  ie && (L != null && L.setActiveModel) && L.setActiveModel(ie);
169274
169274
  },
169275
169275
  [r, L]
169276
- ), B = Se(() => {
169276
+ ), B = Te(() => {
169277
169277
  var ie, he;
169278
169278
  if (r == null || r({ content: "" }), p(!1), f(""), !j.current) return;
169279
169279
  (ie = j.current) == null || ie.focus();
169280
169280
  const V = j.current.value.length;
169281
169281
  (he = j.current) == null || he.setSelectionRange(V, V), j.current.scrollTop = j.current.scrollHeight;
169282
- }, [r]), Y = Se(() => {
169282
+ }, [r]), Y = Te(() => {
169283
169283
  y(!0);
169284
- }, []), Q = Se(() => {
169284
+ }, []), Q = Te(() => {
169285
169285
  if (z) {
169286
169286
  const V = z.getHTML();
169287
169287
  y(!1), r == null || r({ content: V }), f(V);
169288
169288
  }
169289
- }, [z, r]), ce = Se(() => {
169289
+ }, [z, r]), ce = Te(() => {
169290
169290
  y(!1), z && z.commands.setContent(h || M || "");
169291
- }, [z, h, M]), N = Se(
169291
+ }, [z, h, M]), N = Te(
169292
169292
  (V) => {
169293
169293
  V.key === "Enter" && (V.ctrlKey || V.metaKey) && !V.shiftKey ? (V.preventDefault(), d && ee()) : V.key === "Enter" && !V.shiftKey && !b ? (V.preventDefault(), u.trim() && X()) : V.key === "Escape" ? (V.preventDefault(), a ? oe() : K()) : V.key === " " && !u.trim() ? (V.preventDefault(), K()) : V.key === "r" && (V.ctrlKey || V.metaKey) ? (V.preventDefault(), B()) : V.key === "e" && (V.ctrlKey || V.metaKey) && (V.preventDefault(), Y());
169294
169294
  },
@@ -169304,7 +169304,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169304
169304
  a,
169305
169305
  oe
169306
169306
  ]
169307
- ), te = Se((V) => {
169307
+ ), te = Te((V) => {
169308
169308
  V ? localStorage.setItem("include-ddoc-context", "true") : localStorage.removeItem("include-ddoc-context");
169309
169309
  }, []);
169310
169310
  Re(() => {
@@ -169338,7 +169338,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169338
169338
  return () => clearInterval(V);
169339
169339
  }
169340
169340
  }, [i]);
169341
- const le = Se(
169341
+ const le = Te(
169342
169342
  () => /* @__PURE__ */ F.jsx("span", { className: "text-body-sm color-text-secondary pt-1 flex items-center gap-1", children: /* @__PURE__ */ F.jsx(fh, { mode: "wait", children: /* @__PURE__ */ F.jsxs(
169343
169343
  "span",
169344
169344
  {
@@ -169654,31 +169654,31 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169654
169654
  initialContent: i,
169655
169655
  collaboration: s,
169656
169656
  isReady: a,
169657
- awareness: l,
169658
- disableInlineComment: u,
169659
- onCommentInteraction: c,
169660
- onError: d,
169661
- ipfsImageUploadFn: p,
169662
- metadataProxyUrl: h,
169663
- onCopyHeadingLink: f,
169664
- ipfsImageFetchFn: g,
169665
- fetchV1ImageFn: m,
169666
- isConnected: b,
169667
- activeModel: y,
169668
- maxTokens: x,
169669
- isAIAgentEnabled: v,
169670
- setCharacterCount: k,
169671
- setWordCount: w,
169672
- setIsContentLoading: D,
169673
- setIsCollabContentLoading: C,
169674
- unFocused: A,
169675
- zoomLevel: M,
169676
- isPresentationMode: j,
169677
- onInvalidContentError: _,
169678
- ignoreCorruptedData: O,
169679
- onCollaboratorChange: E,
169680
- onConnect: T,
169681
- hasCollabContentInitialised: S,
169657
+ isSyncing: l,
169658
+ awareness: u,
169659
+ disableInlineComment: c,
169660
+ onCommentInteraction: d,
169661
+ onError: p,
169662
+ ipfsImageUploadFn: h,
169663
+ metadataProxyUrl: f,
169664
+ onCopyHeadingLink: g,
169665
+ ipfsImageFetchFn: m,
169666
+ fetchV1ImageFn: b,
169667
+ isConnected: y,
169668
+ activeModel: x,
169669
+ maxTokens: v,
169670
+ isAIAgentEnabled: k,
169671
+ setCharacterCount: w,
169672
+ setWordCount: D,
169673
+ setIsContentLoading: C,
169674
+ setIsCollabContentLoading: A,
169675
+ unFocused: M,
169676
+ zoomLevel: j,
169677
+ isPresentationMode: _,
169678
+ onInvalidContentError: O,
169679
+ ignoreCorruptedData: E,
169680
+ onCollaboratorChange: T,
169681
+ onConnect: S,
169682
169682
  initialiseYjsIndexedDbProvider: L,
169683
169683
  externalExtensions: P,
169684
169684
  isContentLoading: $,
@@ -169686,39 +169686,39 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169686
169686
  theme: z,
169687
169687
  editorRef: U
169688
169688
  }) => {
169689
- const X = (s == null ? void 0 : s.enabled) === !0, oe = X ? s.connection : null, { activeCommentId: ee, setActiveCommentId: K, focusCommentWithActiveId: re } = NRe(), J = !!(y && v), { tocItems: ae, setTocItems: B, handleTocUpdate: Y } = MRe(q), { extensions: Q } = ORe({
169689
+ const X = (s == null ? void 0 : s.enabled) === !0, oe = X ? s.connection : null, { activeCommentId: ee, setActiveCommentId: K, focusCommentWithActiveId: re } = NRe(), J = !!(x && k), { tocItems: ae, setTocItems: B, handleTocUpdate: Y } = MRe(q), { extensions: Q } = ORe({
169690
169690
  ydoc: e,
169691
- onError: d,
169692
- ipfsImageUploadFn: p,
169693
- metadataProxyUrl: h,
169694
- onCopyHeadingLink: f,
169695
- ipfsImageFetchFn: g,
169696
- fetchV1ImageFn: m,
169691
+ onError: p,
169692
+ ipfsImageUploadFn: h,
169693
+ metadataProxyUrl: f,
169694
+ onCopyHeadingLink: g,
169695
+ ipfsImageFetchFn: m,
169696
+ fetchV1ImageFn: b,
169697
169697
  enableCollaboration: X,
169698
- disableInlineComment: u,
169699
- isConnected: b,
169700
- activeModel: y,
169701
- maxTokens: x,
169702
- isAIAgentEnabled: v,
169698
+ disableInlineComment: c,
169699
+ isConnected: y,
169700
+ activeModel: x,
169701
+ maxTokens: v,
169702
+ isAIAgentEnabled: k,
169703
169703
  hasAvailableModels: J,
169704
- onCommentActivated: (Te) => {
169705
- K(Te), Te && setTimeout(() => re(Te));
169704
+ onCommentActivated: (Ae) => {
169705
+ K(Ae), Ae && setTimeout(() => re(Ae));
169706
169706
  },
169707
169707
  onTocUpdate: Y,
169708
169708
  externalExtensions: P,
169709
169709
  activeTabId: q
169710
169710
  }), { handleCommentInteraction: ce, handleCommentClick: N } = RRe({
169711
- onCommentInteraction: c
169711
+ onCommentInteraction: d
169712
169712
  }), te = Ve(!0), [le, G] = Be([]), V = Ft(() => Q, [Q]);
169713
169713
  Re(() => {
169714
169714
  q && K(null);
169715
169715
  }, [q, K]);
169716
- const ie = (Te, Ne) => {
169717
- const { state: Je } = Te, { selection: st } = Je, { from: wt, to: Ae, empty: Pe } = st;
169716
+ const ie = (Ae, Ne) => {
169717
+ const { state: Je } = Ae, { selection: st } = Je, { from: wt, to: Se, empty: Pe } = st;
169718
169718
  if (Ne.key === "Backspace" || Ne.key === "Delete") {
169719
169719
  let nt = !1;
169720
169720
  if (!Pe)
169721
- Je.doc.nodesBetween(wt, Ae, (ct) => {
169721
+ Je.doc.nodesBetween(wt, Se, (ct) => {
169722
169722
  ct.type.name === "reminderBlock" && (nt = !0);
169723
169723
  });
169724
169724
  else {
@@ -169732,16 +169732,16 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169732
169732
  {
169733
169733
  extensions: V,
169734
169734
  editorProps: {
169735
- clipboardTextSerializer(Te) {
169736
- return Te.content.textBetween(0, Te.content.size, `
169735
+ clipboardTextSerializer(Ae) {
169736
+ return Ae.content.textBetween(0, Ae.content.size, `
169737
169737
 
169738
169738
  `);
169739
169739
  },
169740
169740
  ...uge,
169741
169741
  handleDOMEvents: {
169742
169742
  mouseover: ce,
169743
- keydown: (Te, Ne) => {
169744
- if (ie(Te, Ne), ["ArrowUp", "ArrowDown", "Enter"].includes(Ne.key)) {
169743
+ keydown: (Ae, Ne) => {
169744
+ if (ie(Ae, Ne), ["ArrowUp", "ArrowDown", "Enter"].includes(Ne.key)) {
169745
169745
  const Je = document.querySelector("#slash-command"), st = document.querySelector("#emoji-list");
169746
169746
  if (Je || st)
169747
169747
  return !0;
@@ -169751,28 +169751,28 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169751
169751
  he == null || he.commands.unsetCommentActive();
169752
169752
  }
169753
169753
  },
169754
- handleClick: (Te, Ne, Je) => {
169755
- const st = Je.metaKey || Je.ctrlKey, Ae = Je.target.closest("a");
169756
- if (Ae && Ae.href) {
169754
+ handleClick: (Ae, Ne, Je) => {
169755
+ const st = Je.metaKey || Je.ctrlKey, Se = Je.target.closest("a");
169756
+ if (Se && Se.href) {
169757
169757
  if (o)
169758
169758
  return !1;
169759
- if (Ae.textContent.match(E7)) {
169759
+ if (Se.textContent.match(E7)) {
169760
169760
  if (st)
169761
- return Je.preventDefault(), window.open(Ae.href, "_blank"), !0;
169761
+ return Je.preventDefault(), window.open(Se.href, "_blank"), !0;
169762
169762
  } else
169763
- return Je.preventDefault(), window.open(Ae.href, "_blank"), !0;
169763
+ return Je.preventDefault(), window.open(Se.href, "_blank"), !0;
169764
169764
  }
169765
- return N ? N(Te, Ne, Je) : !1;
169765
+ return N ? N(Ae, Ne, Je) : !1;
169766
169766
  },
169767
169767
  attributes: {
169768
169768
  spellCheck: "true"
169769
169769
  }
169770
169770
  },
169771
- autofocus: A || !te.current ? !1 : "start",
169771
+ autofocus: M || !te.current ? !1 : "start",
169772
169772
  immediatelyRender: !1,
169773
169773
  shouldRerenderOnTransaction: !1
169774
169774
  },
169775
- [V, j, o]
169775
+ [V, _, o]
169776
169776
  );
169777
169777
  Re(() => {
169778
169778
  U && (U.current = he ?? null);
@@ -169784,73 +169784,72 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169784
169784
  const be = Ve(null);
169785
169785
  Re(() => {
169786
169786
  if (!he) return;
169787
- const Te = () => {
169787
+ const Ae = () => {
169788
169788
  he && !he.isDestroyed && (be.current && clearTimeout(be.current), be.current = setTimeout(() => {
169789
169789
  be.current = null, he.isDestroyed || he.commands.updateTableOfContents();
169790
169790
  }, 300));
169791
169791
  };
169792
- return he.on("update", Te), () => {
169793
- he.off("update", Te), be.current && clearTimeout(be.current);
169792
+ return he.on("update", Ae), () => {
169793
+ he.off("update", Ae), be.current && clearTimeout(be.current);
169794
169794
  };
169795
169795
  }, [he]);
169796
- const de = Ft(() => De ? !!(S && a) : !o, [
169797
- De,
169798
- S,
169799
- o,
169800
- a
169801
- ]);
169796
+ const de = Ft(() => o ? !1 : De ? !l : !0, [o, De, l]);
169802
169797
  Re(() => {
169803
- he == null || he.setEditable(de);
169798
+ if (!he) return;
169799
+ const Ae = document.getElementById("editor-canvas"), Ne = (Ae == null ? void 0 : Ae.scrollTop) ?? 0;
169800
+ he.setEditable(de), Ae && Ne > 0 && requestAnimationFrame(() => {
169801
+ Ae.scrollTop = Ne;
169802
+ });
169804
169803
  }, [he, de]), Re(() => {
169805
- De && C(!a);
169804
+ De && A(!a);
169806
169805
  }, [De, a]);
169807
- const ue = Ve(!1), ge = Ve(null), R = Se(
169808
- (Te) => {
169809
- const Ne = Te.map((Je) => io(Je));
169806
+ const ue = Ve(!1), ge = Ve(null), R = Te(
169807
+ (Ae) => {
169808
+ const Ne = Ae.map((Je) => io(Je));
169810
169809
  na(e, ku(Ne), "self");
169811
169810
  },
169812
169811
  [e]
169813
- ), W = Se(
169814
- (Te) => Array.isArray(Te) || typeof Te == "string" && !hX(Te),
169812
+ ), W = Te(
169813
+ (Ae) => Array.isArray(Ae) || typeof Ae == "string" && !hX(Ae),
169815
169814
  []
169816
169815
  );
169817
169816
  Re(() => {
169818
169817
  if (!he || !e)
169819
169818
  return;
169820
169819
  if (X) {
169821
- D(!1);
169820
+ C(!1);
169822
169821
  return;
169823
169822
  }
169824
169823
  if (i === null) {
169825
- D(!0);
169824
+ C(!0);
169826
169825
  return;
169827
169826
  }
169828
169827
  if (t && n && !q) {
169829
- D(!0);
169828
+ C(!0);
169830
169829
  return;
169831
169830
  }
169832
169831
  const Ne = `${r || "no-version-id"}:${q || "default"}`;
169833
169832
  if (!t && ue.current) {
169834
- D(!1);
169833
+ C(!1);
169835
169834
  return;
169836
169835
  }
169837
169836
  if (t && ge.current === Ne) {
169838
- D(!1);
169837
+ C(!1);
169839
169838
  return;
169840
169839
  }
169841
- D(!0), queueMicrotask(() => {
169840
+ C(!0), queueMicrotask(() => {
169842
169841
  if (i !== "" && i !== void 0 && (W(i) ? Array.isArray(i) ? R(i) : na(e, io(i), "self") : he.commands.setContent(
169843
169842
  fX({
169844
169843
  data: i,
169845
- ignoreCorruptedData: O,
169846
- onInvalidContentError: _
169844
+ ignoreCorruptedData: E,
169845
+ onInvalidContentError: O
169847
169846
  })
169848
- )), M && b6.setZoom(M), t) {
169849
- ge.current = Ne, D(!1);
169847
+ )), j && b6.setZoom(j), t) {
169848
+ ge.current = Ne, C(!1);
169850
169849
  return;
169851
169850
  }
169852
169851
  L().finally(() => {
169853
- D(!1);
169852
+ C(!1);
169854
169853
  });
169855
169854
  }), ue.current = !0;
169856
169855
  }, [
@@ -169858,14 +169857,14 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169858
169857
  X,
169859
169858
  he,
169860
169859
  e,
169861
- M,
169860
+ j,
169862
169861
  t,
169863
169862
  n,
169864
169863
  q,
169865
169864
  r,
169866
- D,
169865
+ C,
169866
+ E,
169867
169867
  O,
169868
- _,
169869
169868
  R,
169870
169869
  W,
169871
169870
  L
@@ -169875,43 +169874,43 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169875
169874
  IRe({
169876
169875
  editor: he,
169877
169876
  isReady: a,
169878
- awareness: l,
169877
+ awareness: u,
169879
169878
  collaboration: s,
169880
169879
  collaborationCleanupRef: ne,
169881
- onCollaboratorChange: E
169880
+ onCollaboratorChange: T
169882
169881
  }), Re(() => {
169883
- if (!M) return;
169884
- b6.setZoom(M);
169885
- const Te = window.setTimeout(() => {
169886
- b6.setZoom(M);
169882
+ if (!j) return;
169883
+ b6.setZoom(j);
169884
+ const Ae = window.setTimeout(() => {
169885
+ b6.setZoom(j);
169887
169886
  }, 100);
169888
- return () => clearTimeout(Te);
169889
- }, [M, $, i, he == null ? void 0 : he.isEmpty]), Re(() => {
169887
+ return () => clearTimeout(Ae);
169888
+ }, [j, $, i, he == null ? void 0 : he.isEmpty]), Re(() => {
169890
169889
  if (!he) return;
169891
- const Te = ({ editor: Ne }) => {
169890
+ const Ae = ({ editor: Ne }) => {
169892
169891
  const Je = Ne.state.selection.from;
169893
169892
  setTimeout(() => {
169894
169893
  const st = Ne.state.selection.from, wt = [];
169895
169894
  Ne.state.doc.nodesBetween(
169896
169895
  Je,
169897
169896
  st,
169898
- (Ae, Pe) => {
169899
- Ae.marks && Ae.marks.forEach((nt) => {
169897
+ (Se, Pe) => {
169898
+ Se.marks && Se.marks.forEach((nt) => {
169900
169899
  nt.type.name === "textStyle" && nt.attrs.color && wt.push({
169901
169900
  from: Pe,
169902
- to: Pe + Ae.nodeSize,
169901
+ to: Pe + Se.nodeSize,
169903
169902
  mark: nt
169904
169903
  });
169905
169904
  });
169906
169905
  }
169907
- ), Ne.chain().setTextSelection({ from: Je, to: st }).setColor("").run(), wt.forEach(({ from: Ae, to: Pe, mark: nt }) => {
169906
+ ), Ne.chain().setTextSelection({ from: Je, to: st }).setColor("").run(), wt.forEach(({ from: Se, to: Pe, mark: nt }) => {
169908
169907
  const ct = nt.attrs.color;
169909
- lz(ct) || Ne.chain().setTextSelection({ from: Ae, to: Pe }).setColor(ct).run();
169908
+ lz(ct) || Ne.chain().setTextSelection({ from: Se, to: Pe }).setColor(ct).run();
169910
169909
  }), Ne.commands.setTextSelection(st);
169911
169910
  }, 0);
169912
169911
  };
169913
- return he.on("paste", Te), () => {
169914
- he.off("paste", Te);
169912
+ return he.on("paste", Ae), () => {
169913
+ he.off("paste", Ae);
169915
169914
  };
169916
169915
  }, [he]);
169917
169916
  const ye = Ve(
@@ -169919,22 +169918,22 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169919
169918
  );
169920
169919
  Re(() => {
169921
169920
  if (!he) return;
169922
- const Te = () => {
169921
+ const Ae = () => {
169923
169922
  ye.current && clearTimeout(ye.current), ye.current = setTimeout(() => {
169924
- ye.current = null, he && !he.isDestroyed && (k == null || k(he.storage.characterCount.characters() ?? 0), w == null || w(he.storage.characterCount.words() ?? 0));
169923
+ ye.current = null, he && !he.isDestroyed && (w == null || w(he.storage.characterCount.characters() ?? 0), D == null || D(he.storage.characterCount.words() ?? 0));
169925
169924
  }, 500);
169926
169925
  };
169927
- return Te(), he.on("update", Te), () => {
169928
- he.off("update", Te), ye.current && clearTimeout(ye.current);
169926
+ return Ae(), he.on("update", Ae), () => {
169927
+ he.off("update", Ae), ye.current && clearTimeout(ye.current);
169929
169928
  };
169930
169929
  }, [he]), Re(() => {
169931
- const Te = (Ne) => {
169932
- (Ne.ctrlKey || Ne.metaKey) && Ne.key === "p" && (Ne.preventDefault(), he && (j ? QL(le) : tx(he.getHTML())));
169930
+ const Ae = (Ne) => {
169931
+ (Ne.ctrlKey || Ne.metaKey) && Ne.key === "p" && (Ne.preventDefault(), he && (_ ? QL(le) : tx(he.getHTML())));
169933
169932
  };
169934
- return window.addEventListener("keydown", Te), () => {
169935
- window.removeEventListener("keydown", Te);
169933
+ return window.addEventListener("keydown", Ae), () => {
169934
+ window.removeEventListener("keydown", Ae);
169936
169935
  };
169937
- }, [he, j, le]), Re(() => (X && oe && T(oe), () => {
169936
+ }, [he, _, le]), Re(() => (X && oe && S(oe), () => {
169938
169937
  ne.current();
169939
169938
  }), [
169940
169939
  X,
@@ -169942,23 +169941,23 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169942
169941
  oe == null ? void 0 : oe.roomId,
169943
169942
  oe == null ? void 0 : oe.wsUrl
169944
169943
  ]);
169945
- const ve = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, { isNativeMobile: Ee } = _l(), Ce = new URLSearchParams(ve), me = Ce.get("heading"), je = me == null ? void 0 : me.split("-").pop(), Me = Se(
169946
- (Te) => {
169944
+ const ve = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, { isNativeMobile: Ee } = _l(), Ce = new URLSearchParams(ve), me = Ce.get("heading"), je = me == null ? void 0 : me.split("-").pop(), Me = Te(
169945
+ (Ae) => {
169947
169946
  if (he)
169948
169947
  try {
169949
169948
  const Ne = he.view.dom.querySelectorAll("[data-toc-id]"), Je = Array.from(Ne).find(
169950
169949
  (ht) => {
169951
169950
  var _t;
169952
- return (_t = ht.dataset.tocId) == null ? void 0 : _t.includes(Te);
169951
+ return (_t = ht.dataset.tocId) == null ? void 0 : _t.includes(Ae);
169953
169952
  }
169954
169953
  );
169955
169954
  if (!Je) return;
169956
169955
  const st = B8(
169957
169956
  Je == null ? void 0 : Je.textContent
169958
169957
  ), wt = me == null ? void 0 : me.split("-").slice(0, -1).join("-");
169959
- st !== wt && (Ce.set("heading", `${st}-${Te}`), window.location.hash = Ce.toString());
169960
- const Ae = he.view.posAtDOM(Je, 0), Pe = he.view.state.tr;
169961
- Pe.setSelection(new ut(Pe.doc.resolve(Ae))), he.view.dispatch(Pe);
169958
+ st !== wt && (Ce.set("heading", `${st}-${Ae}`), window.location.hash = Ce.toString());
169959
+ const Se = he.view.posAtDOM(Je, 0), Pe = he.view.state.tr;
169960
+ Pe.setSelection(new ut(Pe.doc.resolve(Se))), he.view.dispatch(Pe);
169962
169961
  const Ke = [
169963
169962
  document.getElementById("editor-canvas"),
169964
169963
  document.querySelector(".ProseMirror"),
@@ -169995,10 +169994,10 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
169995
169994
  ]), Re(() => {
169996
169995
  if (!he || $ || !i)
169997
169996
  return;
169998
- const Te = setTimeout(() => {
169997
+ const Ae = setTimeout(() => {
169999
169998
  const { tr: Ne, doc: Je } = he.state;
170000
169999
  let st = !1;
170001
- Je.descendants((wt, Ae) => {
170000
+ Je.descendants((wt, Se) => {
170002
170001
  if (!wt.marks || wt.marks.length === 0) return;
170003
170002
  const Pe = wt.marks.find(
170004
170003
  (Ke) => Ke.type.name === "textStyle" && Ke.attrs.color
@@ -170015,11 +170014,11 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170015
170014
  color: ct,
170016
170015
  "data-original-color": nt
170017
170016
  });
170018
- Ne.removeMark(Ae, Ae + wt.nodeSize, Pe), Ne.addMark(Ae, Ae + wt.nodeSize, Ke);
170017
+ Ne.removeMark(Se, Se + wt.nodeSize, Pe), Ne.addMark(Se, Se + wt.nodeSize, Ke);
170019
170018
  }
170020
170019
  }), st && (Ne.setMeta("addToHistory", !1), he.view.dispatch(Ne));
170021
170020
  }, 0);
170022
- return () => clearTimeout(Te);
170021
+ return () => clearTimeout(Ae);
170023
170022
  }, [he, i, $, z]), Re(() => () => {
170024
170023
  he && he.destroy();
170025
170024
  }, [he]), LRe(he, i, !1), {
@@ -170035,7 +170034,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170035
170034
  isContentLoading: $
170036
170035
  };
170037
170036
  }, NRe = () => {
170038
- const [e, t] = Be(null), n = Ve(null), r = Se((o) => {
170037
+ const [e, t] = Be(null), n = Ve(null), r = Te((o) => {
170039
170038
  if (!n.current) return;
170040
170039
  const i = n.current.querySelector(`input#${o}`);
170041
170040
  i && i.scrollIntoView({
@@ -170058,7 +170057,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170058
170057
  const a = o.current[e];
170059
170058
  a && n(a);
170060
170059
  }, [e]);
170061
- const s = Se(
170060
+ const s = Te(
170062
170061
  (a, l) => {
170063
170062
  const u = e, c = () => {
170064
170063
  o.current = {
@@ -170115,7 +170114,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170115
170114
  disableInlineComment: l
170116
170115
  };
170117
170116
  }, [u, a, l]);
170118
- const x = Se(
170117
+ const x = Te(
170119
170118
  () => JOe(
170120
170119
  (C) => t == null ? void 0 : t(C),
170121
170120
  n,
@@ -170130,7 +170129,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170130
170129
  onCommentActivated: f
170131
170130
  }),
170132
170131
  [f]
170133
- ), k = Se(() => [
170132
+ ), k = Te(() => [
170134
170133
  ...lX({
170135
170134
  onError: (A) => t == null ? void 0 : t(A),
170136
170135
  ipfsImageUploadFn: n,
@@ -170192,7 +170191,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170192
170191
  }, RRe = ({
170193
170192
  onCommentInteraction: e
170194
170193
  }) => {
170195
- const t = Se(
170194
+ const t = Te(
170196
170195
  (o, i, s) => {
170197
170196
  let a = !1;
170198
170197
  return o.doc.nodesBetween(i, s, (l) => {
@@ -170202,7 +170201,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170202
170201
  }), a;
170203
170202
  },
170204
170203
  []
170205
- ), n = Se(
170204
+ ), n = Te(
170206
170205
  (o, i) => {
170207
170206
  const s = i.target;
170208
170207
  if (!s || s.nodeName !== "MARK" || s.dataset.color !== "yellow")
@@ -170225,7 +170224,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170225
170224
  e == null || e(p);
170226
170225
  },
170227
170226
  [t, e]
170228
- ), r = Se(
170227
+ ), r = Te(
170229
170228
  (o, i, s) => n(o, s),
170230
170229
  [n]
170231
170230
  );
@@ -170306,7 +170305,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170306
170305
  return () => window.clearTimeout(i);
170307
170306
  }, [e, t, n]);
170308
170307
  }, URe = (e) => {
170309
- const t = Ve([]), n = Ve([]), r = Ve(!1), o = Se(
170308
+ const t = Ve([]), n = Ve([]), r = Ve(!1), o = Te(
170310
170309
  (l, u) => {
170311
170310
  const { tabs: c } = Zl(e), d = c.get(l.tabId);
170312
170311
  if (!(d instanceof qr))
@@ -170323,15 +170322,15 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170323
170322
  return !0;
170324
170323
  },
170325
170324
  [e]
170326
- ), i = Se(() => {
170325
+ ), i = Te(() => {
170327
170326
  const l = t.current.length > 0 ? t.current[t.current.length - 1] : void 0;
170328
170327
  return !l || !o(l, "undo") ? !1 : (t.current.pop(), n.current.push(l), !0);
170329
- }, [o]), s = Se(() => {
170328
+ }, [o]), s = Te(() => {
170330
170329
  const l = n.current, u = l.length ? l[l.length - 1] : void 0;
170331
170330
  return !u || !o(u, "redo") ? !1 : (l.pop(), t.current.push(u), !0);
170332
170331
  }, [o]);
170333
170332
  return {
170334
- applyRename: Se(
170333
+ applyRename: Te(
170335
170334
  ({ tabId: l, newName: u, emoji: c }) => {
170336
170335
  const { tabs: d } = Zl(e), p = d.get(l);
170337
170336
  if (!(p instanceof qr))
@@ -170393,7 +170392,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170393
170392
  const T = p || null;
170394
170393
  a == null || a(T);
170395
170394
  }, [p, a]);
170396
- const D = Se(
170395
+ const D = Te(
170397
170396
  (T) => {
170398
170397
  if (!e || T === p) return;
170399
170398
  if (!i || !c) {
@@ -170447,7 +170446,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170447
170446
  T.unobserveDeep(S);
170448
170447
  };
170449
170448
  }, [e, s, i, c]);
170450
- const C = Se(() => {
170449
+ const C = Te(() => {
170451
170450
  const T = e.getMap("ddocTabs"), S = T.get("order"), L = T.get("tabs"), P = T.get("activeTabId");
170452
170451
  if (!(S instanceof il))
170453
170452
  throw new Error("Invalid ddocTabs.order");
@@ -170462,7 +170461,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170462
170461
  const z = new qr();
170463
170462
  z.set("name", q.name), z.set("emoji", q.emoji), L.set(q.id, z), e.getXmlFragment(q.id), i && P instanceof Ko && (P.delete(0, P.length), P.insert(0, $)), S.push([q.id]);
170464
170463
  }), h($), l == null || l(), $;
170465
- }, [i, e, l]), A = Se(
170464
+ }, [i, e, l]), A = Te(
170466
170465
  (T) => {
170467
170466
  const { order: S, tabs: L, activeTab: P } = Zl(e);
170468
170467
  if (S.length <= 1)
@@ -170484,7 +170483,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170484
170483
  }), U && X && h(X), l == null || l();
170485
170484
  },
170486
170485
  [e, i, l]
170487
- ), M = Se(() => {
170486
+ ), M = Te(() => {
170488
170487
  const T = b.current;
170489
170488
  if (!T) return !1;
170490
170489
  if (Date.now() - T.timestamp > HM)
@@ -170496,7 +170495,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170496
170495
  const q = Math.min(T.orderIndex, S.length);
170497
170496
  S.insert(q, [T.tabId]), i && P instanceof Ko && (P.delete(0, P.length), P.insert(0, T.tabId));
170498
170497
  }), h(T.tabId), b.current = null, l == null || l(), !0);
170499
- }, [e, i, l]), j = Se(() => {
170498
+ }, [e, i, l]), j = Te(() => {
170500
170499
  const T = u == null ? void 0 : u();
170501
170500
  if (!T || T.isDestroyed)
170502
170501
  return !0;
@@ -170522,7 +170521,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170522
170521
  M,
170523
170522
  k
170524
170523
  ]);
170525
- const _ = Se(
170524
+ const _ = Te(
170526
170525
  (T, { newName: S, emoji: L }) => {
170527
170526
  v({ tabId: T, newName: S, emoji: L }).tabNotFound && UD({
170528
170527
  title: "Rename tab error",
@@ -170530,7 +170529,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170530
170529
  }), l == null || l();
170531
170530
  },
170532
170531
  [v, l]
170533
- ), O = Se(
170532
+ ), O = Te(
170534
170533
  (T) => {
170535
170534
  const { tabs: S, order: L, activeTab: P } = Zl(e), $ = S.get(T);
170536
170535
  if (!$ || !($ instanceof qr)) {
@@ -170548,7 +170547,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
170548
170547
  }), h(q), l == null || l(), q;
170549
170548
  },
170550
170549
  [e, i, l]
170551
- ), E = Se(
170550
+ ), E = Te(
170552
170551
  (T, S) => {
170553
170552
  const { order: L } = Zl(e), P = L.toArray(), $ = P.indexOf(S), q = P.indexOf(T);
170554
170553
  $ === -1 || q === -1 || (e.transact(() => {
@@ -174184,8 +174183,8 @@ var eZ = {};
174184
174183
  re[B] = J[B] - ae[B];
174185
174184
  }
174186
174185
  function D(re, J, ae) {
174187
- let B, Y, Q = 0, ce = 0, N = 0, te = 0, le = 0, G = 0, V = 0, ie = 0, he = 0, De = 0, be = 0, de = 0, ue = 0, ge = 0, R = 0, W = 0, ne = 0, pe = 0, ye = 0, ve = 0, Ee = 0, Ce = 0, me = 0, je = 0, Me = 0, Te = 0, Ne = 0, Je = 0, st = 0, wt = 0, Ae = 0, Pe = ae[0], nt = ae[1], ct = ae[2], Ke = ae[3], ht = ae[4], _t = ae[5], Gt = ae[6], En = ae[7], Xt = ae[8], bn = ae[9], Ln = ae[10], cn = ae[11], wn = ae[12], $n = ae[13], Fe = ae[14], Ie = ae[15];
174188
- B = J[0], Q += B * Pe, ce += B * nt, N += B * ct, te += B * Ke, le += B * ht, G += B * _t, V += B * Gt, ie += B * En, he += B * Xt, De += B * bn, be += B * Ln, de += B * cn, ue += B * wn, ge += B * $n, R += B * Fe, W += B * Ie, B = J[1], ce += B * Pe, N += B * nt, te += B * ct, le += B * Ke, G += B * ht, V += B * _t, ie += B * Gt, he += B * En, De += B * Xt, be += B * bn, de += B * Ln, ue += B * cn, ge += B * wn, R += B * $n, W += B * Fe, ne += B * Ie, B = J[2], N += B * Pe, te += B * nt, le += B * ct, G += B * Ke, V += B * ht, ie += B * _t, he += B * Gt, De += B * En, be += B * Xt, de += B * bn, ue += B * Ln, ge += B * cn, R += B * wn, W += B * $n, ne += B * Fe, pe += B * Ie, B = J[3], te += B * Pe, le += B * nt, G += B * ct, V += B * Ke, ie += B * ht, he += B * _t, De += B * Gt, be += B * En, de += B * Xt, ue += B * bn, ge += B * Ln, R += B * cn, W += B * wn, ne += B * $n, pe += B * Fe, ye += B * Ie, B = J[4], le += B * Pe, G += B * nt, V += B * ct, ie += B * Ke, he += B * ht, De += B * _t, be += B * Gt, de += B * En, ue += B * Xt, ge += B * bn, R += B * Ln, W += B * cn, ne += B * wn, pe += B * $n, ye += B * Fe, ve += B * Ie, B = J[5], G += B * Pe, V += B * nt, ie += B * ct, he += B * Ke, De += B * ht, be += B * _t, de += B * Gt, ue += B * En, ge += B * Xt, R += B * bn, W += B * Ln, ne += B * cn, pe += B * wn, ye += B * $n, ve += B * Fe, Ee += B * Ie, B = J[6], V += B * Pe, ie += B * nt, he += B * ct, De += B * Ke, be += B * ht, de += B * _t, ue += B * Gt, ge += B * En, R += B * Xt, W += B * bn, ne += B * Ln, pe += B * cn, ye += B * wn, ve += B * $n, Ee += B * Fe, Ce += B * Ie, B = J[7], ie += B * Pe, he += B * nt, De += B * ct, be += B * Ke, de += B * ht, ue += B * _t, ge += B * Gt, R += B * En, W += B * Xt, ne += B * bn, pe += B * Ln, ye += B * cn, ve += B * wn, Ee += B * $n, Ce += B * Fe, me += B * Ie, B = J[8], he += B * Pe, De += B * nt, be += B * ct, de += B * Ke, ue += B * ht, ge += B * _t, R += B * Gt, W += B * En, ne += B * Xt, pe += B * bn, ye += B * Ln, ve += B * cn, Ee += B * wn, Ce += B * $n, me += B * Fe, je += B * Ie, B = J[9], De += B * Pe, be += B * nt, de += B * ct, ue += B * Ke, ge += B * ht, R += B * _t, W += B * Gt, ne += B * En, pe += B * Xt, ye += B * bn, ve += B * Ln, Ee += B * cn, Ce += B * wn, me += B * $n, je += B * Fe, Me += B * Ie, B = J[10], be += B * Pe, de += B * nt, ue += B * ct, ge += B * Ke, R += B * ht, W += B * _t, ne += B * Gt, pe += B * En, ye += B * Xt, ve += B * bn, Ee += B * Ln, Ce += B * cn, me += B * wn, je += B * $n, Me += B * Fe, Te += B * Ie, B = J[11], de += B * Pe, ue += B * nt, ge += B * ct, R += B * Ke, W += B * ht, ne += B * _t, pe += B * Gt, ye += B * En, ve += B * Xt, Ee += B * bn, Ce += B * Ln, me += B * cn, je += B * wn, Me += B * $n, Te += B * Fe, Ne += B * Ie, B = J[12], ue += B * Pe, ge += B * nt, R += B * ct, W += B * Ke, ne += B * ht, pe += B * _t, ye += B * Gt, ve += B * En, Ee += B * Xt, Ce += B * bn, me += B * Ln, je += B * cn, Me += B * wn, Te += B * $n, Ne += B * Fe, Je += B * Ie, B = J[13], ge += B * Pe, R += B * nt, W += B * ct, ne += B * Ke, pe += B * ht, ye += B * _t, ve += B * Gt, Ee += B * En, Ce += B * Xt, me += B * bn, je += B * Ln, Me += B * cn, Te += B * wn, Ne += B * $n, Je += B * Fe, st += B * Ie, B = J[14], R += B * Pe, W += B * nt, ne += B * ct, pe += B * Ke, ye += B * ht, ve += B * _t, Ee += B * Gt, Ce += B * En, me += B * Xt, je += B * bn, Me += B * Ln, Te += B * cn, Ne += B * wn, Je += B * $n, st += B * Fe, wt += B * Ie, B = J[15], W += B * Pe, ne += B * nt, pe += B * ct, ye += B * Ke, ve += B * ht, Ee += B * _t, Ce += B * Gt, me += B * En, je += B * Xt, Me += B * bn, Te += B * Ln, Ne += B * cn, Je += B * wn, st += B * $n, wt += B * Fe, Ae += B * Ie, Q += 38 * ne, ce += 38 * pe, N += 38 * ye, te += 38 * ve, le += 38 * Ee, G += 38 * Ce, V += 38 * me, ie += 38 * je, he += 38 * Me, De += 38 * Te, be += 38 * Ne, de += 38 * Je, ue += 38 * st, ge += 38 * wt, R += 38 * Ae, Y = 1, B = Q + Y + 65535, Y = Math.floor(B / 65536), Q = B - Y * 65536, B = ce + Y + 65535, Y = Math.floor(B / 65536), ce = B - Y * 65536, B = N + Y + 65535, Y = Math.floor(B / 65536), N = B - Y * 65536, B = te + Y + 65535, Y = Math.floor(B / 65536), te = B - Y * 65536, B = le + Y + 65535, Y = Math.floor(B / 65536), le = B - Y * 65536, B = G + Y + 65535, Y = Math.floor(B / 65536), G = B - Y * 65536, B = V + Y + 65535, Y = Math.floor(B / 65536), V = B - Y * 65536, B = ie + Y + 65535, Y = Math.floor(B / 65536), ie = B - Y * 65536, B = he + Y + 65535, Y = Math.floor(B / 65536), he = B - Y * 65536, B = De + Y + 65535, Y = Math.floor(B / 65536), De = B - Y * 65536, B = be + Y + 65535, Y = Math.floor(B / 65536), be = B - Y * 65536, B = de + Y + 65535, Y = Math.floor(B / 65536), de = B - Y * 65536, B = ue + Y + 65535, Y = Math.floor(B / 65536), ue = B - Y * 65536, B = ge + Y + 65535, Y = Math.floor(B / 65536), ge = B - Y * 65536, B = R + Y + 65535, Y = Math.floor(B / 65536), R = B - Y * 65536, B = W + Y + 65535, Y = Math.floor(B / 65536), W = B - Y * 65536, Q += Y - 1 + 37 * (Y - 1), Y = 1, B = Q + Y + 65535, Y = Math.floor(B / 65536), Q = B - Y * 65536, B = ce + Y + 65535, Y = Math.floor(B / 65536), ce = B - Y * 65536, B = N + Y + 65535, Y = Math.floor(B / 65536), N = B - Y * 65536, B = te + Y + 65535, Y = Math.floor(B / 65536), te = B - Y * 65536, B = le + Y + 65535, Y = Math.floor(B / 65536), le = B - Y * 65536, B = G + Y + 65535, Y = Math.floor(B / 65536), G = B - Y * 65536, B = V + Y + 65535, Y = Math.floor(B / 65536), V = B - Y * 65536, B = ie + Y + 65535, Y = Math.floor(B / 65536), ie = B - Y * 65536, B = he + Y + 65535, Y = Math.floor(B / 65536), he = B - Y * 65536, B = De + Y + 65535, Y = Math.floor(B / 65536), De = B - Y * 65536, B = be + Y + 65535, Y = Math.floor(B / 65536), be = B - Y * 65536, B = de + Y + 65535, Y = Math.floor(B / 65536), de = B - Y * 65536, B = ue + Y + 65535, Y = Math.floor(B / 65536), ue = B - Y * 65536, B = ge + Y + 65535, Y = Math.floor(B / 65536), ge = B - Y * 65536, B = R + Y + 65535, Y = Math.floor(B / 65536), R = B - Y * 65536, B = W + Y + 65535, Y = Math.floor(B / 65536), W = B - Y * 65536, Q += Y - 1 + 37 * (Y - 1), re[0] = Q, re[1] = ce, re[2] = N, re[3] = te, re[4] = le, re[5] = G, re[6] = V, re[7] = ie, re[8] = he, re[9] = De, re[10] = be, re[11] = de, re[12] = ue, re[13] = ge, re[14] = R, re[15] = W;
174186
+ let B, Y, Q = 0, ce = 0, N = 0, te = 0, le = 0, G = 0, V = 0, ie = 0, he = 0, De = 0, be = 0, de = 0, ue = 0, ge = 0, R = 0, W = 0, ne = 0, pe = 0, ye = 0, ve = 0, Ee = 0, Ce = 0, me = 0, je = 0, Me = 0, Ae = 0, Ne = 0, Je = 0, st = 0, wt = 0, Se = 0, Pe = ae[0], nt = ae[1], ct = ae[2], Ke = ae[3], ht = ae[4], _t = ae[5], Gt = ae[6], En = ae[7], Xt = ae[8], bn = ae[9], Ln = ae[10], cn = ae[11], wn = ae[12], $n = ae[13], Fe = ae[14], Ie = ae[15];
174187
+ B = J[0], Q += B * Pe, ce += B * nt, N += B * ct, te += B * Ke, le += B * ht, G += B * _t, V += B * Gt, ie += B * En, he += B * Xt, De += B * bn, be += B * Ln, de += B * cn, ue += B * wn, ge += B * $n, R += B * Fe, W += B * Ie, B = J[1], ce += B * Pe, N += B * nt, te += B * ct, le += B * Ke, G += B * ht, V += B * _t, ie += B * Gt, he += B * En, De += B * Xt, be += B * bn, de += B * Ln, ue += B * cn, ge += B * wn, R += B * $n, W += B * Fe, ne += B * Ie, B = J[2], N += B * Pe, te += B * nt, le += B * ct, G += B * Ke, V += B * ht, ie += B * _t, he += B * Gt, De += B * En, be += B * Xt, de += B * bn, ue += B * Ln, ge += B * cn, R += B * wn, W += B * $n, ne += B * Fe, pe += B * Ie, B = J[3], te += B * Pe, le += B * nt, G += B * ct, V += B * Ke, ie += B * ht, he += B * _t, De += B * Gt, be += B * En, de += B * Xt, ue += B * bn, ge += B * Ln, R += B * cn, W += B * wn, ne += B * $n, pe += B * Fe, ye += B * Ie, B = J[4], le += B * Pe, G += B * nt, V += B * ct, ie += B * Ke, he += B * ht, De += B * _t, be += B * Gt, de += B * En, ue += B * Xt, ge += B * bn, R += B * Ln, W += B * cn, ne += B * wn, pe += B * $n, ye += B * Fe, ve += B * Ie, B = J[5], G += B * Pe, V += B * nt, ie += B * ct, he += B * Ke, De += B * ht, be += B * _t, de += B * Gt, ue += B * En, ge += B * Xt, R += B * bn, W += B * Ln, ne += B * cn, pe += B * wn, ye += B * $n, ve += B * Fe, Ee += B * Ie, B = J[6], V += B * Pe, ie += B * nt, he += B * ct, De += B * Ke, be += B * ht, de += B * _t, ue += B * Gt, ge += B * En, R += B * Xt, W += B * bn, ne += B * Ln, pe += B * cn, ye += B * wn, ve += B * $n, Ee += B * Fe, Ce += B * Ie, B = J[7], ie += B * Pe, he += B * nt, De += B * ct, be += B * Ke, de += B * ht, ue += B * _t, ge += B * Gt, R += B * En, W += B * Xt, ne += B * bn, pe += B * Ln, ye += B * cn, ve += B * wn, Ee += B * $n, Ce += B * Fe, me += B * Ie, B = J[8], he += B * Pe, De += B * nt, be += B * ct, de += B * Ke, ue += B * ht, ge += B * _t, R += B * Gt, W += B * En, ne += B * Xt, pe += B * bn, ye += B * Ln, ve += B * cn, Ee += B * wn, Ce += B * $n, me += B * Fe, je += B * Ie, B = J[9], De += B * Pe, be += B * nt, de += B * ct, ue += B * Ke, ge += B * ht, R += B * _t, W += B * Gt, ne += B * En, pe += B * Xt, ye += B * bn, ve += B * Ln, Ee += B * cn, Ce += B * wn, me += B * $n, je += B * Fe, Me += B * Ie, B = J[10], be += B * Pe, de += B * nt, ue += B * ct, ge += B * Ke, R += B * ht, W += B * _t, ne += B * Gt, pe += B * En, ye += B * Xt, ve += B * bn, Ee += B * Ln, Ce += B * cn, me += B * wn, je += B * $n, Me += B * Fe, Ae += B * Ie, B = J[11], de += B * Pe, ue += B * nt, ge += B * ct, R += B * Ke, W += B * ht, ne += B * _t, pe += B * Gt, ye += B * En, ve += B * Xt, Ee += B * bn, Ce += B * Ln, me += B * cn, je += B * wn, Me += B * $n, Ae += B * Fe, Ne += B * Ie, B = J[12], ue += B * Pe, ge += B * nt, R += B * ct, W += B * Ke, ne += B * ht, pe += B * _t, ye += B * Gt, ve += B * En, Ee += B * Xt, Ce += B * bn, me += B * Ln, je += B * cn, Me += B * wn, Ae += B * $n, Ne += B * Fe, Je += B * Ie, B = J[13], ge += B * Pe, R += B * nt, W += B * ct, ne += B * Ke, pe += B * ht, ye += B * _t, ve += B * Gt, Ee += B * En, Ce += B * Xt, me += B * bn, je += B * Ln, Me += B * cn, Ae += B * wn, Ne += B * $n, Je += B * Fe, st += B * Ie, B = J[14], R += B * Pe, W += B * nt, ne += B * ct, pe += B * Ke, ye += B * ht, ve += B * _t, Ee += B * Gt, Ce += B * En, me += B * Xt, je += B * bn, Me += B * Ln, Ae += B * cn, Ne += B * wn, Je += B * $n, st += B * Fe, wt += B * Ie, B = J[15], W += B * Pe, ne += B * nt, pe += B * ct, ye += B * Ke, ve += B * ht, Ee += B * _t, Ce += B * Gt, me += B * En, je += B * Xt, Me += B * bn, Ae += B * Ln, Ne += B * cn, Je += B * wn, st += B * $n, wt += B * Fe, Se += B * Ie, Q += 38 * ne, ce += 38 * pe, N += 38 * ye, te += 38 * ve, le += 38 * Ee, G += 38 * Ce, V += 38 * me, ie += 38 * je, he += 38 * Me, De += 38 * Ae, be += 38 * Ne, de += 38 * Je, ue += 38 * st, ge += 38 * wt, R += 38 * Se, Y = 1, B = Q + Y + 65535, Y = Math.floor(B / 65536), Q = B - Y * 65536, B = ce + Y + 65535, Y = Math.floor(B / 65536), ce = B - Y * 65536, B = N + Y + 65535, Y = Math.floor(B / 65536), N = B - Y * 65536, B = te + Y + 65535, Y = Math.floor(B / 65536), te = B - Y * 65536, B = le + Y + 65535, Y = Math.floor(B / 65536), le = B - Y * 65536, B = G + Y + 65535, Y = Math.floor(B / 65536), G = B - Y * 65536, B = V + Y + 65535, Y = Math.floor(B / 65536), V = B - Y * 65536, B = ie + Y + 65535, Y = Math.floor(B / 65536), ie = B - Y * 65536, B = he + Y + 65535, Y = Math.floor(B / 65536), he = B - Y * 65536, B = De + Y + 65535, Y = Math.floor(B / 65536), De = B - Y * 65536, B = be + Y + 65535, Y = Math.floor(B / 65536), be = B - Y * 65536, B = de + Y + 65535, Y = Math.floor(B / 65536), de = B - Y * 65536, B = ue + Y + 65535, Y = Math.floor(B / 65536), ue = B - Y * 65536, B = ge + Y + 65535, Y = Math.floor(B / 65536), ge = B - Y * 65536, B = R + Y + 65535, Y = Math.floor(B / 65536), R = B - Y * 65536, B = W + Y + 65535, Y = Math.floor(B / 65536), W = B - Y * 65536, Q += Y - 1 + 37 * (Y - 1), Y = 1, B = Q + Y + 65535, Y = Math.floor(B / 65536), Q = B - Y * 65536, B = ce + Y + 65535, Y = Math.floor(B / 65536), ce = B - Y * 65536, B = N + Y + 65535, Y = Math.floor(B / 65536), N = B - Y * 65536, B = te + Y + 65535, Y = Math.floor(B / 65536), te = B - Y * 65536, B = le + Y + 65535, Y = Math.floor(B / 65536), le = B - Y * 65536, B = G + Y + 65535, Y = Math.floor(B / 65536), G = B - Y * 65536, B = V + Y + 65535, Y = Math.floor(B / 65536), V = B - Y * 65536, B = ie + Y + 65535, Y = Math.floor(B / 65536), ie = B - Y * 65536, B = he + Y + 65535, Y = Math.floor(B / 65536), he = B - Y * 65536, B = De + Y + 65535, Y = Math.floor(B / 65536), De = B - Y * 65536, B = be + Y + 65535, Y = Math.floor(B / 65536), be = B - Y * 65536, B = de + Y + 65535, Y = Math.floor(B / 65536), de = B - Y * 65536, B = ue + Y + 65535, Y = Math.floor(B / 65536), ue = B - Y * 65536, B = ge + Y + 65535, Y = Math.floor(B / 65536), ge = B - Y * 65536, B = R + Y + 65535, Y = Math.floor(B / 65536), R = B - Y * 65536, B = W + Y + 65535, Y = Math.floor(B / 65536), W = B - Y * 65536, Q += Y - 1 + 37 * (Y - 1), re[0] = Q, re[1] = ce, re[2] = N, re[3] = te, re[4] = le, re[5] = G, re[6] = V, re[7] = ie, re[8] = he, re[9] = De, re[10] = be, re[11] = de, re[12] = ue, re[13] = ge, re[14] = R, re[15] = W;
174189
174188
  }
174190
174189
  function C(re, J) {
174191
174190
  D(re, J, J);
@@ -174643,11 +174642,11 @@ var aZ = { exports: {} };
174643
174642
  return new p(this.value >= 0 ? this.value : -this.value);
174644
174643
  };
174645
174644
  function A(R, W) {
174646
- var ne = R.length, pe = W.length, ye = ne + pe, ve = b(ye), Ee = r, Ce, me, je, Me, Te;
174645
+ var ne = R.length, pe = W.length, ye = ne + pe, ve = b(ye), Ee = r, Ce, me, je, Me, Ae;
174647
174646
  for (je = 0; je < ne; ++je) {
174648
174647
  Me = R[je];
174649
174648
  for (var Ne = 0; Ne < pe; ++Ne)
174650
- Te = W[Ne], Ce = Me * Te + ve[je + Ne], me = Math.floor(Ce / Ee), ve[je + Ne] = Ce - me * Ee, ve[je + Ne + 1] += me;
174649
+ Ae = W[Ne], Ce = Me * Ae + ve[je + Ne], me = Math.floor(Ce / Ee), ve[je + Ne] = Ce - me * Ee, ve[je + Ne + 1] += me;
174651
174650
  }
174652
174651
  return m(ve), ve;
174653
174652
  }
@@ -174716,31 +174715,31 @@ var aZ = { exports: {} };
174716
174715
  return new p(this.value * this.value);
174717
174716
  };
174718
174717
  function S(R, W) {
174719
- var ne = R.length, pe = W.length, ye = r, ve = b(W.length), Ee = W[pe - 1], Ce = Math.ceil(ye / (2 * Ee)), me = M(R, Ce), je = M(W, Ce), Me, Te, Ne, Je, st, wt, Ae;
174720
- for (me.length <= ne && me.push(0), je.push(0), Ee = je[pe - 1], Te = ne - pe; Te >= 0; Te--) {
174721
- for (Me = ye - 1, me[Te + pe] !== Ee && (Me = Math.floor((me[Te + pe] * ye + me[Te + pe - 1]) / Ee)), Ne = 0, Je = 0, wt = je.length, st = 0; st < wt; st++)
174722
- Ne += Me * je[st], Ae = Math.floor(Ne / ye), Je += me[Te + st] - (Ne - Ae * ye), Ne = Ae, Je < 0 ? (me[Te + st] = Je + ye, Je = -1) : (me[Te + st] = Je, Je = 0);
174718
+ var ne = R.length, pe = W.length, ye = r, ve = b(W.length), Ee = W[pe - 1], Ce = Math.ceil(ye / (2 * Ee)), me = M(R, Ce), je = M(W, Ce), Me, Ae, Ne, Je, st, wt, Se;
174719
+ for (me.length <= ne && me.push(0), je.push(0), Ee = je[pe - 1], Ae = ne - pe; Ae >= 0; Ae--) {
174720
+ for (Me = ye - 1, me[Ae + pe] !== Ee && (Me = Math.floor((me[Ae + pe] * ye + me[Ae + pe - 1]) / Ee)), Ne = 0, Je = 0, wt = je.length, st = 0; st < wt; st++)
174721
+ Ne += Me * je[st], Se = Math.floor(Ne / ye), Je += me[Ae + st] - (Ne - Se * ye), Ne = Se, Je < 0 ? (me[Ae + st] = Je + ye, Je = -1) : (me[Ae + st] = Je, Je = 0);
174723
174722
  for (; Je !== 0; ) {
174724
174723
  for (Me -= 1, Ne = 0, st = 0; st < wt; st++)
174725
- Ne += me[Te + st] - ye + je[st], Ne < 0 ? (me[Te + st] = Ne + ye, Ne = 0) : (me[Te + st] = Ne, Ne = 1);
174724
+ Ne += me[Ae + st] - ye + je[st], Ne < 0 ? (me[Ae + st] = Ne + ye, Ne = 0) : (me[Ae + st] = Ne, Ne = 1);
174726
174725
  Je += Ne;
174727
174726
  }
174728
- ve[Te] = Me;
174727
+ ve[Ae] = Me;
174729
174728
  }
174730
174729
  return me = P(me, Ce)[0], [g(ve), g(me)];
174731
174730
  }
174732
174731
  function L(R, W) {
174733
- for (var ne = R.length, pe = W.length, ye = [], ve = [], Ee = r, Ce, me, je, Me, Te; ne; ) {
174732
+ for (var ne = R.length, pe = W.length, ye = [], ve = [], Ee = r, Ce, me, je, Me, Ae; ne; ) {
174734
174733
  if (ve.unshift(R[--ne]), m(ve), q(ve, W) < 0) {
174735
174734
  ye.push(0);
174736
174735
  continue;
174737
174736
  }
174738
174737
  me = ve.length, je = ve[me - 1] * Ee + ve[me - 2], Me = W[pe - 1] * Ee + W[pe - 2], me > pe && (je = (je + 1) * Ee), Ce = Math.ceil(je / Me);
174739
174738
  do {
174740
- if (Te = M(W, Ce), q(Te, ve) <= 0) break;
174739
+ if (Ae = M(W, Ce), q(Ae, ve) <= 0) break;
174741
174740
  Ce--;
174742
174741
  } while (Ce);
174743
- ye.push(Ce), ve = w(ve, Te);
174742
+ ye.push(Ce), ve = w(ve, Ae);
174744
174743
  }
174745
174744
  return ye.reverse(), [g(ye), g(ve)];
174746
174745
  }
@@ -174773,8 +174772,8 @@ var aZ = { exports: {} };
174773
174772
  if (je === -1) return [u[0], R];
174774
174773
  if (je === 0) return [u[R.sign === pe.sign ? 1 : -1], u[0]];
174775
174774
  ye.length + ve.length <= 200 ? ne = S(ye, ve) : ne = L(ye, ve), Ee = ne[0];
174776
- var Me = R.sign !== pe.sign, Te = ne[1], Ne = R.sign;
174777
- return typeof Ee == "number" ? (Me && (Ee = -Ee), Ee = new d(Ee)) : Ee = new c(Ee, Me), typeof Te == "number" ? (Ne && (Te = -Te), Te = new d(Te)) : Te = new c(Te, Ne), [Ee, Te];
174775
+ var Me = R.sign !== pe.sign, Ae = ne[1], Ne = R.sign;
174776
+ return typeof Ee == "number" ? (Me && (Ee = -Ee), Ee = new d(Ee)) : Ee = new c(Ee, Me), typeof Ae == "number" ? (Ne && (Ae = -Ae), Ae = new d(Ae)) : Ae = new c(Ae, Ne), [Ee, Ae];
174778
174777
  }
174779
174778
  c.prototype.divmod = function(R) {
174780
174779
  var W = $(this, R);
@@ -174992,10 +174991,10 @@ var aZ = { exports: {} };
174992
174991
  }, p.prototype.shiftRight = d.prototype.shiftRight = c.prototype.shiftRight;
174993
174992
  function re(R, W, ne) {
174994
174993
  W = ue(W);
174995
- for (var pe = R.isNegative(), ye = W.isNegative(), ve = pe ? R.not() : R, Ee = ye ? W.not() : W, Ce = 0, me = 0, je = null, Me = null, Te = []; !ve.isZero() || !Ee.isZero(); )
174996
- je = $(ve, ee), Ce = je[1].toJSNumber(), pe && (Ce = ee - 1 - Ce), Me = $(Ee, ee), me = Me[1].toJSNumber(), ye && (me = ee - 1 - me), ve = je[0], Ee = Me[0], Te.push(ne(Ce, me));
174997
- for (var Ne = ne(pe ? 1 : 0, ye ? 1 : 0) !== 0 ? t(-1) : t(0), Je = Te.length - 1; Je >= 0; Je -= 1)
174998
- Ne = Ne.multiply(ee).add(t(Te[Je]));
174994
+ for (var pe = R.isNegative(), ye = W.isNegative(), ve = pe ? R.not() : R, Ee = ye ? W.not() : W, Ce = 0, me = 0, je = null, Me = null, Ae = []; !ve.isZero() || !Ee.isZero(); )
174995
+ je = $(ve, ee), Ce = je[1].toJSNumber(), pe && (Ce = ee - 1 - Ce), Me = $(Ee, ee), me = Me[1].toJSNumber(), ye && (me = ee - 1 - me), ve = je[0], Ee = Me[0], Ae.push(ne(Ce, me));
174996
+ for (var Ne = ne(pe ? 1 : 0, ye ? 1 : 0) !== 0 ? t(-1) : t(0), Je = Ae.length - 1; Je >= 0; Je -= 1)
174997
+ Ne = Ne.multiply(ee).add(t(Ae[Je]));
174999
174998
  return Ne;
175000
174999
  }
175001
175000
  c.prototype.not = function() {
@@ -175058,7 +175057,7 @@ var aZ = { exports: {} };
175058
175057
  var pe = ne || Math.random, ye = ce(R, W), ve = Q(R, W), Ee = ve.subtract(ye).add(1);
175059
175058
  if (Ee.isSmall) return ye.add(Math.floor(pe() * Ee));
175060
175059
  for (var Ce = he(Ee, r).value, me = [], je = !0, Me = 0; Me < Ce.length; Me++) {
175061
- var Te = je ? Ce[Me] + (Me + 1 < Ce.length ? Ce[Me + 1] / r : 0) : r, Ne = y(pe() * Te);
175060
+ var Ae = je ? Ce[Me] + (Me + 1 < Ce.length ? Ce[Me + 1] / r : 0) : r, Ne = y(pe() * Ae);
175062
175061
  me.push(Ne), Ne < Ce[Me] && (je = !1);
175063
175062
  }
175064
175063
  return ye.add(u.fromArray(me, r, !1));
@@ -175081,11 +175080,11 @@ var aZ = { exports: {} };
175081
175080
  var me = R[ve];
175082
175081
  if (me in Ce) je.push(ue(Ce[me]));
175083
175082
  else if (me === "<") {
175084
- var Te = ve;
175083
+ var Ae = ve;
175085
175084
  do
175086
175085
  ve++;
175087
175086
  while (R[ve] !== ">" && ve < R.length);
175088
- je.push(ue(R.slice(Te + 1, ve)));
175087
+ je.push(ue(R.slice(Ae + 1, ve)));
175089
175088
  } else throw new Error(me + " is not a valid character");
175090
175089
  }
175091
175090
  return V(je, W, Me);
@@ -175184,8 +175183,8 @@ var aZ = { exports: {} };
175184
175183
  if (!Ce) throw new Error("Invalid integer: " + R);
175185
175184
  if (l)
175186
175185
  return new p(BigInt(ne ? "-" + R : R));
175187
- for (var me = [], je = R.length, Me = o, Te = je - Me; je > 0; )
175188
- me.push(+R.slice(Te, je)), Te -= Me, Te < 0 && (Te = 0), je -= Me;
175186
+ for (var me = [], je = R.length, Me = o, Ae = je - Me; je > 0; )
175187
+ me.push(+R.slice(Ae, je)), Ae -= Me, Ae < 0 && (Ae = 0), je -= Me;
175189
175188
  return m(me), new c(me, ne);
175190
175189
  }
175191
175190
  function de(R) {
@@ -179267,7 +179266,7 @@ class a$e {
179267
179266
  return (s = (i = this.callbacksRef) == null ? void 0 : i.onStateChange) == null || s.call(i, o), this.onCollabStateChange(o), !0;
179268
179267
  }
179269
179268
  runExitActions(t, n) {
179270
- t === "ready" && n === "reconnecting" && this.cleanupAwareness(), n === "idle" && this.cleanupAwareness();
179269
+ n === "idle" && this.cleanupAwareness();
179271
179270
  }
179272
179271
  runEntryActions(t, n) {
179273
179272
  var r, o;
@@ -179764,48 +179763,49 @@ const l$e = { status: "idle" }, u$e = (e) => {
179764
179763
  r.current || (r.current = new a$e(e, n));
179765
179764
  const o = r.current;
179766
179765
  o.updateRefs(e.services, e.callbacks, e.onLocalUpdate);
179767
- const i = o.isReady, s = o.awareness;
179766
+ const i = o.isConnected, s = o.awareness;
179768
179767
  Re(() => {
179769
179768
  if (!i || !e.ydoc) return;
179770
- const d = (p, h) => {
179771
- h === "self" || !o.isReady || o.enqueueLocalUpdate(p);
179769
+ const h = (f, g) => {
179770
+ g === "self" || !o.isConnected || o.enqueueLocalUpdate(f);
179772
179771
  };
179773
- return e.ydoc.on("update", d), () => {
179774
- e.ydoc.off("update", d);
179772
+ return e.ydoc.on("update", h), () => {
179773
+ e.ydoc.off("update", h);
179775
179774
  };
179776
179775
  }, [e.ydoc, i]), Re(() => {
179777
179776
  if (!s) return;
179778
- const d = () => {
179777
+ const h = () => {
179779
179778
  Wc(s, [e.ydoc.clientID], "window unload");
179780
179779
  };
179781
- return typeof window < "u" && typeof window.addEventListener == "function" && window.addEventListener("beforeunload", d), () => {
179782
- Wc(s, [e.ydoc.clientID], "hook unmount"), typeof window < "u" && typeof window.removeEventListener == "function" && window.removeEventListener("beforeunload", d);
179780
+ return typeof window < "u" && typeof window.addEventListener == "function" && window.addEventListener("beforeunload", h), () => {
179781
+ Wc(s, [e.ydoc.clientID], "hook unmount"), typeof window < "u" && typeof window.removeEventListener == "function" && window.removeEventListener("beforeunload", h);
179783
179782
  };
179784
179783
  }, [s !== void 0]), Re(() => () => {
179785
- var d;
179786
- (d = r.current) == null || d.forceCleanup();
179784
+ var h;
179785
+ (h = r.current) == null || h.forceCleanup();
179787
179786
  }, []);
179788
- const a = Se(
179789
- (d) => {
179790
- o.connect(d).catch((p) => {
179791
- console.error("useSyncManager: connect failed", p);
179787
+ const a = Te(
179788
+ (h) => {
179789
+ o.connect(h).catch((f) => {
179790
+ console.error("useSyncManager: connect failed", f);
179792
179791
  });
179793
179792
  },
179794
179793
  // eslint-disable-next-line react-hooks/exhaustive-deps
179795
179794
  [e.ydoc]
179796
- ), l = Se(() => {
179795
+ ), l = Te(() => {
179797
179796
  o.disconnect();
179798
- }, [o]), u = Se(() => {
179797
+ }, [o]), u = Te(() => {
179799
179798
  o.terminateSession();
179800
- }, [o]), c = t.status === "ready" || t.status === "reconnecting";
179799
+ }, [o]), c = t.status === "syncing", d = t.status === "ready" && !!s, p = t.status === "ready" || t.status === "reconnecting";
179801
179800
  return {
179802
179801
  state: t,
179803
179802
  connect: a,
179804
179803
  disconnect: l,
179805
179804
  terminateSession: u,
179806
- isReady: t.status === "ready" && !!s,
179805
+ isReady: d,
179806
+ isSyncing: c,
179807
179807
  awareness: s,
179808
- hasCollabContentInitialised: c
179808
+ hasCollabContentInitialised: p
179809
179809
  };
179810
179810
  }, c$e = ({
179811
179811
  onChange: e,
@@ -179817,53 +179817,55 @@ const l$e = { status: "idle" }, u$e = (e) => {
179817
179817
  const [i] = Be(new Cl()), s = (r == null ? void 0 : r.enabled) === !0, a = s ? r.services : void 0, l = s ? r.on : void 0, {
179818
179818
  connect: u,
179819
179819
  isReady: c,
179820
- terminateSession: d,
179821
- awareness: p,
179822
- hasCollabContentInitialised: h,
179823
- state: f
179820
+ isSyncing: d,
179821
+ terminateSession: p,
179822
+ awareness: h,
179823
+ hasCollabContentInitialised: f,
179824
+ state: g
179824
179825
  } = u$e({
179825
179826
  ydoc: i,
179826
179827
  services: a,
179827
179828
  callbacks: l,
179828
179829
  onLocalUpdate: e
179829
- }), g = Ve(null), m = Se(async () => {
179830
- const x = g.current;
179831
- if (x && await x.destroy(), t && n)
179830
+ }), m = Ve(null), b = Te(async () => {
179831
+ const v = m.current;
179832
+ if (v && await v.destroy(), t && n)
179832
179833
  try {
179833
- const v = new tIe(n, i);
179834
- await v.whenSynced, g.current = v;
179835
- } catch (v) {
179836
- console.error("IndexedDB initialization failed:", v), o == null || o(
179837
- v instanceof Error ? v : new Error(String(v))
179834
+ const k = new tIe(n, i);
179835
+ await k.whenSynced, m.current = k;
179836
+ } catch (k) {
179837
+ console.error("IndexedDB initialization failed:", k), o == null || o(
179838
+ k instanceof Error ? k : new Error(String(k))
179838
179839
  );
179839
179840
  }
179840
- }, [t, n, i, o]), b = Ve(
179841
+ }, [t, n, i, o]), y = Ve(
179841
179842
  null
179842
- ), y = Se(() => {
179843
- b.current && (clearTimeout(b.current), b.current = null), e == null || e(Vr(Wo(i)), "");
179843
+ ), x = Te(() => {
179844
+ y.current && (clearTimeout(y.current), y.current = null), e == null || e(Vr(Wo(i)), "");
179844
179845
  }, [i, e]);
179845
179846
  return Re(() => {
179846
- const x = (v, k) => {
179847
- if (k === "self") return;
179848
- const w = Vr(v);
179849
- b.current && clearTimeout(b.current), b.current = setTimeout(() => {
179850
- b.current = null, e == null || e(Vr(Wo(i)), w);
179847
+ const v = (k, w) => {
179848
+ if (w === "self") return;
179849
+ const D = Vr(k);
179850
+ y.current && clearTimeout(y.current), y.current = setTimeout(() => {
179851
+ y.current = null, e == null || e(Vr(Wo(i)), D);
179851
179852
  }, 300);
179852
179853
  };
179853
- return i && i.on("update", x), () => {
179854
- i == null || i.off("update", x), b.current && clearTimeout(b.current);
179854
+ return i && i.on("update", v), () => {
179855
+ i == null || i.off("update", v), y.current && clearTimeout(y.current);
179855
179856
  };
179856
179857
  }, [i]), {
179857
179858
  ydoc: i,
179858
179859
  onConnect: u,
179859
179860
  isReady: c,
179860
- terminateSession: d,
179861
- awareness: p,
179862
- hasCollabContentInitialised: h,
179863
- initialiseYjsIndexedDbProvider: m,
179864
- refreshYjsIndexedDbProvider: m,
179865
- flushPendingUpdate: y,
179866
- collabState: f
179861
+ isSyncing: d,
179862
+ terminateSession: p,
179863
+ awareness: h,
179864
+ hasCollabContentInitialised: f,
179865
+ initialiseYjsIndexedDbProvider: b,
179866
+ refreshYjsIndexedDbProvider: b,
179867
+ flushPendingUpdate: x,
179868
+ collabState: g
179867
179869
  };
179868
179870
  }, qZ = ({
179869
179871
  isPreviewMode: e,
@@ -179923,6 +179925,7 @@ const l$e = { status: "idle" }, u$e = (e) => {
179923
179925
  collaboration: r,
179924
179926
  versionId: n == null ? void 0 : n.versionId,
179925
179927
  isReady: X.isReady,
179928
+ isSyncing: X.isSyncing,
179926
179929
  awareness: X.awareness,
179927
179930
  disableInlineComment: O,
179928
179931
  onCommentInteraction: s,
@@ -179948,7 +179951,6 @@ const l$e = { status: "idle" }, u$e = (e) => {
179948
179951
  ignoreCorruptedData: b,
179949
179952
  onCollaboratorChange: i,
179950
179953
  onConnect: X.onConnect,
179951
- hasCollabContentInitialised: X.hasCollabContentInitialised,
179952
179954
  initialiseYjsIndexedDbProvider: X.initialiseYjsIndexedDbProvider,
179953
179955
  externalExtensions: v,
179954
179956
  activeTabId: oe.activeTabId,
@@ -180831,7 +180833,7 @@ const C$e = ({
180831
180833
  ].includes(ee.name)
180832
180834
  ),
180833
180835
  editable: !a
180834
- }), [a]), P = Se(async () => {
180836
+ }), [a]), P = Te(async () => {
180835
180837
  var B;
180836
180838
  if (!e || !((B = e.view) != null && B.dom)) return;
180837
180839
  if (!a && e.view.dom.querySelector(".is-editor-empty")) {
@@ -180874,13 +180876,13 @@ const C$e = ({
180874
180876
  Re(() => {
180875
180877
  P();
180876
180878
  }, [e.state.doc]);
180877
- const $ = Se(() => {
180879
+ const $ = Te(() => {
180878
180880
  C ? r((ee) => !ee) : document.fullscreenElement ? document.exitFullscreen ? document.exitFullscreen().then(() => r(!1)).catch(() => {
180879
180881
  r(!1);
180880
180882
  }) : r(!1) : document.documentElement.requestFullscreen ? document.documentElement.requestFullscreen().then(() => r(!0)).catch(() => {
180881
180883
  r(!0);
180882
180884
  }) : r(!0);
180883
- }, [C]), q = Se(
180885
+ }, [C]), q = Te(
180884
180886
  (ee) => {
180885
180887
  ee.key === "ArrowRight" || ee.key === "ArrowDown" || ee.code === "Space" ? (ee.preventDefault(), ee.stopPropagation(), T("forward"), k((K) => Math.min(K + 1, c.length - 1))) : ee.key === "ArrowLeft" || ee.key === "ArrowUp" ? (T("backward"), k((K) => Math.max(K - 1, 0))) : ee.key === "Escape" ? !a && t() : (ee.key === "f" || ee.key === "F") && $();
180886
180888
  },
@@ -180898,7 +180900,7 @@ const C$e = ({
180898
180900
  _(null), M(ee.targetTouches[0].clientX);
180899
180901
  }, U = (ee) => {
180900
180902
  _(ee.targetTouches[0].clientX);
180901
- }, X = Se(() => {
180903
+ }, X = Te(() => {
180902
180904
  if (!A || !j) return;
180903
180905
  const ee = A - j, K = ee > O, re = ee < -O;
180904
180906
  K && (T("forward"), k((J) => Math.min(J + 1, c.length - 1))), re && (T("backward"), k((J) => Math.max(J - 1, 0)));
@@ -181669,7 +181671,7 @@ const C$e = ({
181669
181671
  orientation: r
181670
181672
  // onItemRemove,
181671
181673
  }) => {
181672
- const o = Se(
181674
+ const o = Te(
181673
181675
  (a) => {
181674
181676
  a.preventDefault(), a.stopPropagation(), t(a, e.id);
181675
181677
  },
@@ -181711,7 +181713,7 @@ const YZ = dh(
181711
181713
  const [o, i] = Be(null), s = Rn("(max-width: 1280px)"), a = Ve(null), l = Ve(0), u = Ve(null), c = Ft(() => e.map((m) => ({
181712
181714
  ...m,
181713
181715
  isActive: m.id === o
181714
- })), [e, o]), d = Se(() => {
181716
+ })), [e, o]), d = Te(() => {
181715
181717
  var m;
181716
181718
  if (t && ((m = t.view) != null && m.dom) && (!a.current || Date.now() - l.current > 250)) {
181717
181719
  const b = /* @__PURE__ */ new Map();
@@ -181733,7 +181735,7 @@ const YZ = dh(
181733
181735
  t.off("update", m), t.off("selectionUpdate", m), u.current && cancelAnimationFrame(u.current);
181734
181736
  };
181735
181737
  }, [t, d]);
181736
- const p = Se(
181738
+ const p = Te(
181737
181739
  (m) => {
181738
181740
  if (!t) return;
181739
181741
  const { doc: b } = t.state;
@@ -181748,7 +181750,7 @@ const YZ = dh(
181748
181750
  }), y !== -1 && t.chain().setNodeSelection(y).updateAttributes("heading", { isCollapsed: !1 }).run();
181749
181751
  },
181750
181752
  [t]
181751
- ), h = Se(
181753
+ ), h = Te(
181752
181754
  (m) => {
181753
181755
  if (!t) return;
181754
181756
  p(m);
@@ -181776,7 +181778,7 @@ const YZ = dh(
181776
181778
  }
181777
181779
  },
181778
181780
  [e, t, p]
181779
- ), f = Se(
181781
+ ), f = Te(
181780
181782
  (m, b) => {
181781
181783
  var y;
181782
181784
  if (m.preventDefault(), m.stopPropagation(), i(b), t && ((y = t.view) != null && y.dom)) {
@@ -181811,7 +181813,7 @@ const YZ = dh(
181811
181813
  }
181812
181814
  },
181813
181815
  [t, h, d, s]
181814
- ), g = Se(
181816
+ ), g = Te(
181815
181817
  (m, b) => {
181816
181818
  m.preventDefault(), m.stopPropagation(), n((y) => {
181817
181819
  var k;
@@ -181949,7 +181951,7 @@ const U$e = [
181949
181951
  // @ts-ignore
181950
181952
  !a.current.contains(g.target) && s(!1);
181951
181953
  });
181952
- const f = Se(() => {
181954
+ const f = Te(() => {
181953
181955
  var m;
181954
181956
  const g = (m = l.current) == null ? void 0 : m.getBoundingClientRect();
181955
181957
  if (g) {
@@ -182653,10 +182655,10 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
182653
182655
  ), M = Ft(
182654
182656
  () => e.find((z) => z.id === D),
182655
182657
  [e, D]
182656
- ), [j, _] = Be(null), [O, E] = Be(!1), [T, S] = Be({}), L = Se(
182658
+ ), [j, _] = Be(null), [O, E] = Be(!1), [T, S] = Be({}), L = Te(
182657
182659
  (z) => z === t ? T[z] ?? !1 : !1,
182658
182660
  [t, T]
182659
- ), P = Se(
182661
+ ), P = Te(
182660
182662
  (z, U) => {
182661
182663
  if (z !== t) {
182662
182664
  n(z), S((X) => ({
@@ -182672,7 +182674,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
182672
182674
  }));
182673
182675
  },
182674
182676
  [t, n]
182675
- ), $ = Se(
182677
+ ), $ = Te(
182676
182678
  (z) => {
182677
182679
  if (z !== t) {
182678
182680
  n(z), S((U) => ({
@@ -183534,15 +183536,15 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
183534
183536
  )) return !1;
183535
183537
  const { state: p } = u, { selection: h } = p, f = Iy(h.$from, u.schema.marks.link);
183536
183538
  return f ? p.doc.textBetween(f.from, f.to) === c : !1;
183537
- }, i = Se(() => {
183539
+ }, i = Te(() => {
183538
183540
  const u = e.state.selection.to, c = e.getAttributes("link").href;
183539
183541
  e.commands.extendMarkRange("link", { href: c }), e.chain().focus().setTextSelection(u).unsetMark("link").insertContent(" ").run();
183540
- }, [e]), s = Se(
183542
+ }, [e]), s = Te(
183541
183543
  (u) => {
183542
183544
  r.current && r.current.contains(u.target) || i();
183543
183545
  },
183544
183546
  [i]
183545
- ), a = Se(
183547
+ ), a = Te(
183546
183548
  (u) => {
183547
183549
  var f, g;
183548
183550
  const { key: c } = u, d = document.activeElement;
@@ -183736,36 +183738,36 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
183736
183738
  onCopyHeadingLink: me,
183737
183739
  tabConfig: je,
183738
183740
  footerHeight: Me,
183739
- ipfsImageFetchFn: Te,
183741
+ ipfsImageFetchFn: Ae,
183740
183742
  fetchV1ImageFn: Ne,
183741
183743
  activeModel: Je,
183742
183744
  maxTokens: st,
183743
183745
  isAIAgentEnabled: wt,
183744
183746
  // Document styling object
183745
- documentStyling: Ae,
183747
+ documentStyling: Se,
183746
183748
  ...Pe
183747
183749
  }, nt) => {
183748
183750
  const [ct, Ke] = Be(!1), [ht, _t] = Be(!1), Gt = Ve(null), Xt = (() => {
183749
- if (!Ae)
183751
+ if (!Se)
183750
183752
  return { canvas: void 0, background: void 0 };
183751
183753
  const At = {}, Dt = {}, St = De ?? "light";
183752
- if (Ae.canvasBackground) {
183754
+ if (Se.canvasBackground) {
183753
183755
  const sn = md(
183754
- Ae.canvasBackground,
183756
+ Se.canvasBackground,
183755
183757
  St
183756
183758
  );
183757
183759
  At.backgroundColor = sn;
183758
183760
  }
183759
- if (Ae.textColor) {
183761
+ if (Se.textColor) {
183760
183762
  const sn = x7(
183761
- Ae.textColor,
183763
+ Se.textColor,
183762
183764
  St
183763
183765
  );
183764
183766
  sn && (At.color = sn);
183765
183767
  }
183766
- if (Ae.fontFamily && (At.fontFamily = Ae.fontFamily), Ae.background) {
183768
+ if (Se.fontFamily && (At.fontFamily = Se.fontFamily), Se.background) {
183767
183769
  const sn = md(
183768
- Ae.background,
183770
+ Se.background,
183769
183771
  St
183770
183772
  );
183771
183773
  Dt.background = sn;
@@ -183779,7 +183781,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
183779
183781
  return {
183780
183782
  minHeight: "100vh"
183781
183783
  };
183782
- const At = (Ae == null ? void 0 : Ae.orientation) === "landscape" ? "landscape" : "portrait", Dt = rHe[At][_];
183784
+ const At = (Se == null ? void 0 : Se.orientation) === "landscape" ? "landscape" : "portrait", Dt = rHe[At][_];
183783
183785
  if (!Dt) return {};
183784
183786
  const St = {}, sn = nHe[At];
183785
183787
  return typeof Dt.width == "number" ? (St.width = `${Dt.width}px`, St.maxWidth = `${Dt.width}px`) : (St.width = sn.zoomFitWidth, St.maxWidth = `${sn.zoomFitMaxWidth}px`), Dt.minHeight && (St.minHeight = Dt.minHeight), St;
@@ -183814,8 +183816,8 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
183814
183816
  orderTab: uJ,
183815
183817
  deleteTab: cJ
183816
183818
  } = qZ({
183817
- documentStyling: Ae,
183818
- ipfsImageFetchFn: Te,
183819
+ documentStyling: Se,
183820
+ ipfsImageFetchFn: Ae,
183819
183821
  fetchV1ImageFn: Ne,
183820
183822
  enableIndexeddbSync: M,
183821
183823
  ddocId: j,
@@ -183994,7 +183996,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
183994
183996
  {}
183995
183997
  ), [ce]), W7 = () => {
183996
183998
  var St, sn, Rs;
183997
- const At = Dg.length > 0 || Hh.length > 0 && !((St = Pe.versionHistoryState) != null && St.enabled), Dt = be && !dt && _ === "1" && (Ae == null ? void 0 : Ae.orientation) === "landscape" && rt && !Ie;
183999
+ const At = Dg.length > 0 || Hh.length > 0 && !((St = Pe.versionHistoryState) != null && St.enabled), Dt = be && !dt && _ === "1" && (Se == null ? void 0 : Se.orientation) === "landscape" && rt && !Ie;
183998
184000
  return /* @__PURE__ */ F.jsx(fh, { children: /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
183999
184001
  !e && /* @__PURE__ */ F.jsx(
184000
184002
  "div",
@@ -184024,7 +184026,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184024
184026
  onTxtExport: oe,
184025
184027
  onDocxImport: ee,
184026
184028
  isLoading: !fe || ot,
184027
- ipfsImageFetchFn: Te,
184029
+ ipfsImageFetchFn: Ae,
184028
184030
  fetchV1ImageFn: Ne,
184029
184031
  isConnected: ue,
184030
184032
  tabs: Dg,
@@ -184052,7 +184054,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184052
184054
  onPdfExport: U,
184053
184055
  onHtmlExport: X,
184054
184056
  onTxtExport: oe,
184055
- ipfsImageFetchFn: Te,
184057
+ ipfsImageFetchFn: Ae,
184056
184058
  onDocxImport: ee,
184057
184059
  fetchV1ImageFn: Ne,
184058
184060
  isConnected: ue
@@ -184075,8 +184077,8 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184075
184077
  setSlides: yr,
184076
184078
  renderThemeToggle: ve,
184077
184079
  isContentLoading: ot,
184078
- ipfsImageFetchFn: Te,
184079
- documentStyling: Ae,
184080
+ ipfsImageFetchFn: Ae,
184081
+ documentStyling: Se,
184080
184082
  fetchV1ImageFn: Ne,
184081
184083
  theme: De ?? "light"
184082
184084
  }
@@ -184091,7 +184093,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184091
184093
  showTOC: be,
184092
184094
  setShowTOC: de,
184093
184095
  isPreviewMode: e || !S,
184094
- orientation: Ae == null ? void 0 : Ae.orientation,
184096
+ orientation: Se == null ? void 0 : Se.orientation,
184095
184097
  tabs: Dg,
184096
184098
  setTabs: oJ,
184097
184099
  activeTabId: z7,
@@ -184113,7 +184115,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184113
184115
  id: "editor-wrapper",
184114
184116
  className: tt(
184115
184117
  "w-full mx-auto rounded transition-all duration-300 ease-in-out",
184116
- !(Ae != null && Ae.canvasBackground) && "color-bg-default",
184118
+ !(Se != null && Se.canvasBackground) && "color-bg-default",
184117
184119
  !e && (S ? "-mt-[1.5rem] md:!mt-[0.8rem] pt-0 md:pt-[5rem]" : "pt-0 md:pt-[1.5rem]"),
184118
184120
  e && "md:!mt-[1rem] pt-0 md:!pt-[5rem]",
184119
184121
  { "md:!mt-[0.7rem]": !e },
@@ -184151,7 +184153,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184151
184153
  "w-full h-full pt-8 md:pt-0",
184152
184154
  { "custom-ios-padding": Qt },
184153
184155
  {
184154
- "color-bg-default": !(Ae != null && Ae.canvasBackground) && (_ === "1.4" || _ === "1.5")
184156
+ "color-bg-default": !(Se != null && Se.canvasBackground) && (_ === "1.4" || _ === "1.5")
184155
184157
  }
184156
184158
  ),
184157
184159
  style: {
@@ -184177,7 +184179,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184177
184179
  onInlineComment: $,
184178
184180
  activeCommentId: er,
184179
184181
  isCollabDocumentPublished: pe,
184180
- ipfsImageFetchFn: Te,
184182
+ ipfsImageFetchFn: Ae,
184181
184183
  fetchV1ImageFn: Ne,
184182
184184
  ipfsImageUploadFn: f,
184183
184185
  onReminderCreate: (Rs = (sn = Ce == null ? void 0 : Ce.find(
@@ -184333,7 +184335,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184333
184335
  setIsNavbarVisible: L,
184334
184336
  ipfsImageUploadFn: f,
184335
184337
  isLoading: !fe || ot,
184336
- ipfsImageFetchFn: Te,
184338
+ ipfsImageFetchFn: Ae,
184337
184339
  fetchV1ImageFn: Ne
184338
184340
  }
184339
184341
  )
@@ -184365,7 +184367,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184365
184367
  return /* @__PURE__ */ F.jsx(
184366
184368
  dX,
184367
184369
  {
184368
- documentStyling: Ae,
184370
+ documentStyling: Se,
184369
184371
  theme: De ?? "light",
184370
184372
  children: /* @__PURE__ */ F.jsx(
184371
184373
  "div",
@@ -184830,20 +184832,20 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184830
184832
  "html",
184831
184833
  "txt"
184832
184834
  ], uHe = (e) => e !== void 0 && lHe.includes(e), nWe = (e) => {
184833
- const t = Ve(null), n = Ve(!1), [r, o] = Be(null), [i, s] = Be(!1), a = aHe(e), { getEditor: l, setContent: u } = a, c = Se(
184835
+ const t = Ve(null), n = Ve(!1), [r, o] = Be(null), [i, s] = Be(!1), a = aHe(e), { getEditor: l, setContent: u } = a, c = Te(
184834
184836
  (A, M) => {
184835
184837
  A && !A.isDestroyed && A.destroy(), M && !M.isDestroyed && M.destroy();
184836
184838
  },
184837
184839
  []
184838
- ), d = Se(
184840
+ ), d = Te(
184839
184841
  (A) => {
184840
184842
  const M = t.current;
184841
184843
  M && c(M.editor, M.ydoc), t.current = A, o(A);
184842
184844
  },
184843
184845
  [c]
184844
- ), p = Se(() => {
184846
+ ), p = Te(() => {
184845
184847
  s(!1), d(null);
184846
- }, [d]), h = Se(
184848
+ }, [d]), h = Te(
184847
184849
  (A) => {
184848
184850
  s(A), !A && (n.current || d(null));
184849
184851
  },
@@ -184855,15 +184857,15 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184855
184857
  t.current.ydoc
184856
184858
  ), t.current = null);
184857
184859
  }, [c]);
184858
- const f = Se((A, M) => {
184860
+ const f = Te((A, M) => {
184859
184861
  const j = A.getXmlFragment(M);
184860
184862
  return Bz(j);
184861
- }, []), g = Se((A) => $0(
184863
+ }, []), g = Te((A) => $0(
184862
184864
  A
184863
- ) || null, []), m = Se((A, M) => {
184865
+ ) || null, []), m = Te((A, M) => {
184864
184866
  const j = document.createElement("a");
184865
184867
  j.href = A, j.download = M, document.body.appendChild(j), j.click(), document.body.removeChild(j), URL.revokeObjectURL(A);
184866
- }, []), b = Se(() => {
184868
+ }, []), b = Te(() => {
184867
184869
  if (!r) return null;
184868
184870
  const A = r.activeTabId, M = f(r.ydoc, A);
184869
184871
  return kh(r.editor, M);
@@ -184952,7 +184954,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184952
184954
  }), k = Ft(() => !r || r.tabs.length <= 1 ? [{ id: "current", label: "Current tab" }] : [
184953
184955
  { id: "current", label: "Current tab" },
184954
184956
  { id: "all", label: "All tabs" }
184955
- ], [r]), w = Se(
184957
+ ], [r]), w = Te(
184956
184958
  (A) => {
184957
184959
  var _;
184958
184960
  if (n.current) return;
@@ -184983,7 +184985,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
184983
184985
  d,
184984
184986
  s
184985
184987
  ]
184986
- ), D = Se(
184988
+ ), D = Te(
184987
184989
  async ({ format: A, tab: M }) => {
184988
184990
  r && (n.current = !0, v({
184989
184991
  format: A,
@@ -185032,7 +185034,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
185032
185034
  ({ node: e, editor: t, deleteNode: n }) => {
185033
185035
  const r = e.attrs.reminder, [o, i] = Be(
185034
185036
  r != null && r.timestamp ? new Date(r.timestamp).getTime() < Date.now() : !1
185035
- ), s = t.isEditable === !1, a = Se(() => {
185037
+ ), s = t.isEditable === !1, a = Te(() => {
185036
185038
  const c = [];
185037
185039
  return t.state.doc.descendants((d) => {
185038
185040
  d.type.name === "reminderBlock" && c.push({
@@ -185042,7 +185044,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
185042
185044
  }), c.sort(
185043
185045
  (d, p) => new Date(d.timestamp).getTime() - new Date(p.timestamp).getTime()
185044
185046
  );
185045
- }, [t]), l = Se(
185047
+ }, [t]), l = Te(
185046
185048
  (c) => {
185047
185049
  const d = a(), p = d.findIndex((g) => g.id === r.id);
185048
185050
  if (p === -1) return;
@@ -185075,7 +185077,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
185075
185077
  return () => clearTimeout(h);
185076
185078
  }
185077
185079
  }, [o, r.timestamp]);
185078
- const u = Se(() => {
185080
+ const u = Te(() => {
185079
185081
  var d;
185080
185082
  const c = (d = t.extensionManager.extensions.find(
185081
185083
  (p) => p.name === "reminderBlock"