teodor-new-chat-ui 3.0.56 → 3.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -2,12 +2,12 @@ import * as f from "react";
2
2
  import K, { useState as fe, useRef as bt, useCallback as Ye, useEffect as Ve, useReducer as Pp, useMemo as wn, createContext as gc, useContext as vc, createElement as to, useLayoutEffect as _p } from "react";
3
3
  import * as Bo from "react-dom";
4
4
  import xc from "react-dom";
5
- import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as bc, FileText as Ha, Loader as Fp, ChevronUp as hr, ChevronDown as Un, Copy as $a, Edit as za, RotateCcw as qs, Bot as Ua, Wrench as Bp, User as Hp, ChevronRight as $p, Check as Oi, Circle as zp, Edit3 as wc, Paperclip as Wa, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as Xp, PanelLeft as qp, Settings as Jp, Server as Zp, EyeOff as Qp, Eye as em, Layout as tm, MessageCircle as nm, Save as rm } from "lucide-react";
5
+ import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as bc, FileText as $a, Loader as Fp, ChevronUp as hr, ChevronDown as Un, Copy as Ha, Edit as za, RotateCcw as qs, Bot as Ua, Wrench as Bp, User as $p, ChevronRight as Hp, Check as Oi, Circle as zp, Edit3 as wc, Paperclip as Wa, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as Xp, PanelLeft as qp, Settings as Zp, Server as Jp, EyeOff as Qp, Eye as em, Layout as tm, MessageCircle as nm, Save as rm } from "lucide-react";
6
6
  import { Slot as Qn, createSlot as Yn, createSlottable as om } from "@radix-ui/react-slot";
7
7
  import { cva as Pr } from "class-variance-authority";
8
8
  import { clsx as sm } from "clsx";
9
9
  import { twMerge as im } from "tailwind-merge";
10
- var Js = { exports: {} }, cr = {};
10
+ var Zs = { exports: {} }, cr = {};
11
11
  /**
12
12
  * @license React
13
13
  * react-jsx-runtime.production.min.js
@@ -133,13 +133,13 @@ function lm() {
133
133
  }
134
134
  return null;
135
135
  }
136
- var N = Object.assign, $ = 0, L, X, O, _, z, q, oe;
136
+ var N = Object.assign, H = 0, L, X, O, _, z, q, oe;
137
137
  function F() {
138
138
  }
139
139
  F.__reactDisabledLog = !0;
140
140
  function Q() {
141
141
  {
142
- if ($ === 0) {
142
+ if (H === 0) {
143
143
  L = console.log, X = console.info, O = console.warn, _ = console.error, z = console.group, q = console.groupCollapsed, oe = console.groupEnd;
144
144
  var T = {
145
145
  configurable: !0,
@@ -157,12 +157,12 @@ function lm() {
157
157
  groupEnd: T
158
158
  });
159
159
  }
160
- $++;
160
+ H++;
161
161
  }
162
162
  }
163
163
  function de() {
164
164
  {
165
- if ($--, $ === 0) {
165
+ if (H--, H === 0) {
166
166
  var T = {
167
167
  configurable: !0,
168
168
  enumerable: !0,
@@ -192,7 +192,7 @@ function lm() {
192
192
  })
193
193
  });
194
194
  }
195
- $ < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
195
+ H < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
196
196
  }
197
197
  }
198
198
  var be = b.ReactCurrentDispatcher, Y;
@@ -209,13 +209,13 @@ function lm() {
209
209
  ` + Y + T;
210
210
  }
211
211
  }
212
- var Z = !1, ne;
212
+ var J = !1, ne;
213
213
  {
214
214
  var le = typeof WeakMap == "function" ? WeakMap : Map;
215
215
  ne = new le();
216
216
  }
217
217
  function ie(T, U) {
218
- if (!T || Z)
218
+ if (!T || J)
219
219
  return "";
220
220
  {
221
221
  var te = ne.get(T);
@@ -223,7 +223,7 @@ function lm() {
223
223
  return te;
224
224
  }
225
225
  var ge;
226
- Z = !0;
226
+ J = !0;
227
227
  var _e = Error.prepareStackTrace;
228
228
  Error.prepareStackTrace = void 0;
229
229
  var Me;
@@ -264,23 +264,23 @@ function lm() {
264
264
  if (tn && ge && typeof tn.stack == "string") {
265
265
  for (var Ee = tn.stack.split(`
266
266
  `), dt = ge.stack.split(`
267
- `), Ke = Ee.length - 1, Je = dt.length - 1; Ke >= 1 && Je >= 0 && Ee[Ke] !== dt[Je]; )
268
- Je--;
269
- for (; Ke >= 1 && Je >= 0; Ke--, Je--)
270
- if (Ee[Ke] !== dt[Je]) {
271
- if (Ke !== 1 || Je !== 1)
267
+ `), Ke = Ee.length - 1, Ze = dt.length - 1; Ke >= 1 && Ze >= 0 && Ee[Ke] !== dt[Ze]; )
268
+ Ze--;
269
+ for (; Ke >= 1 && Ze >= 0; Ke--, Ze--)
270
+ if (Ee[Ke] !== dt[Ze]) {
271
+ if (Ke !== 1 || Ze !== 1)
272
272
  do
273
- if (Ke--, Je--, Je < 0 || Ee[Ke] !== dt[Je]) {
273
+ if (Ke--, Ze--, Ze < 0 || Ee[Ke] !== dt[Ze]) {
274
274
  var Et = `
275
275
  ` + Ee[Ke].replace(" at new ", " at ");
276
276
  return T.displayName && Et.includes("<anonymous>") && (Et = Et.replace("<anonymous>", T.displayName)), typeof T == "function" && ne.set(T, Et), Et;
277
277
  }
278
- while (Ke >= 1 && Je >= 0);
278
+ while (Ke >= 1 && Ze >= 0);
279
279
  break;
280
280
  }
281
281
  }
282
282
  } finally {
283
- Z = !1, be.current = Me, de(), Error.prepareStackTrace = _e;
283
+ J = !1, be.current = Me, de(), Error.prepareStackTrace = _e;
284
284
  }
285
285
  var Fn = T ? T.displayName || T.name : "", Ba = Fn ? P(Fn) : "";
286
286
  return typeof T == "function" && ne.set(T, Ba), Ba;
@@ -322,7 +322,7 @@ function lm() {
322
322
  return "";
323
323
  }
324
324
  var ce = Object.prototype.hasOwnProperty, Ae = {}, ve = b.ReactDebugCurrentFrame;
325
- function H(T) {
325
+ function $(T) {
326
326
  if (T) {
327
327
  var U = T._owner, te = Le(T.type, T._source, U ? U.type : null);
328
328
  ve.setExtraStackFrame(te);
@@ -344,7 +344,7 @@ function lm() {
344
344
  } catch (Ke) {
345
345
  Ee = Ke;
346
346
  }
347
- Ee && !(Ee instanceof Error) && (H(_e), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ge || "React class", te, Ie, typeof Ee), H(null)), Ee instanceof Error && !(Ee.message in Ae) && (Ae[Ee.message] = !0, H(_e), w("Failed %s type: %s", te, Ee.message), H(null));
347
+ Ee && !(Ee instanceof Error) && ($(_e), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ge || "React class", te, Ie, typeof Ee), $(null)), Ee instanceof Error && !(Ee.message in Ae) && (Ae[Ee.message] = !0, $(_e), w("Failed %s type: %s", te, Ee.message), $(null));
348
348
  }
349
349
  }
350
350
  }
@@ -460,13 +460,13 @@ function lm() {
460
460
  Ie[Me] === void 0 && (Ie[Me] = Ke[Me]);
461
461
  }
462
462
  if (Ee || dt) {
463
- var Je = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
- Ee && Ue(Ie, Je), dt && lr(Ie, Je);
463
+ var Ze = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
+ Ee && Ue(Ie, Ze), dt && lr(Ie, Ze);
465
465
  }
466
466
  return Cs(T, Ee, dt, _e, ge, We.current, Ie);
467
467
  }
468
468
  }
469
- var J = b.ReactCurrentOwner, se = b.ReactDebugCurrentFrame;
469
+ var Z = b.ReactCurrentOwner, se = b.ReactDebugCurrentFrame;
470
470
  function Ce(T) {
471
471
  if (T) {
472
472
  var U = T._owner, te = Le(T.type, T._source, U ? U.type : null);
@@ -481,8 +481,8 @@ function lm() {
481
481
  }
482
482
  function Ot() {
483
483
  {
484
- if (J.current) {
485
- var T = G(J.current.type);
484
+ if (Z.current) {
485
+ var T = G(Z.current.type);
486
486
  if (T)
487
487
  return `
488
488
 
@@ -517,7 +517,7 @@ Check the top-level render call using <` + te + ">.");
517
517
  return;
518
518
  Ma[te] = !0;
519
519
  var ge = "";
520
- T && T._owner && T._owner !== J.current && (ge = " It was passed a child from " + G(T._owner.type) + "."), Ce(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', te, ge), Ce(null);
520
+ T && T._owner && T._owner !== Z.current && (ge = " It was passed a child from " + G(T._owner.type) + "."), Ce(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', te, ge), Ce(null);
521
521
  }
522
522
  }
523
523
  function La(T, U) {
@@ -587,9 +587,9 @@ Check the top-level render call using <` + te + ">.");
587
587
  var Ke;
588
588
  T === null ? Ke = "null" : nt(T) ? Ke = "array" : T !== void 0 && T.$$typeof === t ? (Ke = "<" + (G(T.type) || "Unknown") + " />", Ee = " Did you accidentally export a JSX literal instead of a component?") : Ke = typeof T, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ke, Ee);
589
589
  }
590
- var Je = Ts(T, U, te, _e, Me);
591
- if (Je == null)
592
- return Je;
590
+ var Ze = Ts(T, U, te, _e, Me);
591
+ if (Ze == null)
592
+ return Ze;
593
593
  if (Ie) {
594
594
  var Et = U.children;
595
595
  if (Et !== void 0)
@@ -603,7 +603,7 @@ Check the top-level render call using <` + te + ">.");
603
603
  else
604
604
  La(Et, T);
605
605
  }
606
- return T === r ? Ip(Je) : Rp(Je), Je;
606
+ return T === r ? Ip(Ze) : Rp(Ze), Ze;
607
607
  }
608
608
  }
609
609
  function Np(T, U, te) {
@@ -616,17 +616,17 @@ Check the top-level render call using <` + te + ">.");
616
616
  ur.Fragment = r, ur.jsx = Ap, ur.jsxs = kp;
617
617
  }()), ur;
618
618
  }
619
- process.env.NODE_ENV === "production" ? Js.exports = am() : Js.exports = lm();
620
- var l = Js.exports;
619
+ process.env.NODE_ENV === "production" ? Zs.exports = am() : Zs.exports = lm();
620
+ var l = Zs.exports;
621
621
  function yc(e, t) {
622
622
  return function() {
623
623
  return e.apply(t, arguments);
624
624
  };
625
625
  }
626
- const { toString: cm } = Object.prototype, { getPrototypeOf: Mi } = Object, { iterator: Ho, toStringTag: Sc } = Symbol, $o = /* @__PURE__ */ ((e) => (t) => {
626
+ const { toString: cm } = Object.prototype, { getPrototypeOf: Mi } = Object, { iterator: $o, toStringTag: Sc } = Symbol, Ho = /* @__PURE__ */ ((e) => (t) => {
627
627
  const n = cm.call(t);
628
628
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
629
- })(/* @__PURE__ */ Object.create(null)), zt = (e) => (e = e.toLowerCase(), (t) => $o(t) === e), zo = (e) => (t) => typeof t === e, { isArray: er } = Array, Xn = zo("undefined");
629
+ })(/* @__PURE__ */ Object.create(null)), zt = (e) => (e = e.toLowerCase(), (t) => Ho(t) === e), zo = (e) => (t) => typeof t === e, { isArray: er } = Array, Xn = zo("undefined");
630
630
  function _r(e) {
631
631
  return e !== null && !Xn(e) && e.constructor !== null && !Xn(e.constructor) && pt(e.constructor.isBuffer) && e.constructor.isBuffer(e);
632
632
  }
@@ -636,10 +636,10 @@ function um(e) {
636
636
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Cc(e.buffer), t;
637
637
  }
638
638
  const dm = zo("string"), pt = zo("function"), Tc = zo("number"), Or = (e) => e !== null && typeof e == "object", fm = (e) => e === !0 || e === !1, no = (e) => {
639
- if ($o(e) !== "object")
639
+ if (Ho(e) !== "object")
640
640
  return !1;
641
641
  const t = Mi(e);
642
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Sc in e) && !(Ho in e);
642
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Sc in e) && !($o in e);
643
643
  }, hm = (e) => {
644
644
  if (!Or(e) || _r(e))
645
645
  return !1;
@@ -650,7 +650,7 @@ const dm = zo("string"), pt = zo("function"), Tc = zo("number"), Or = (e) => e !
650
650
  }
651
651
  }, pm = zt("Date"), mm = zt("File"), gm = zt("Blob"), vm = zt("FileList"), xm = (e) => Or(e) && pt(e.pipe), bm = (e) => {
652
652
  let t;
653
- return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t = $o(e)) === "formdata" || // detect form-data instance
653
+ return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t = Ho(e)) === "formdata" || // detect form-data instance
654
654
  t === "object" && pt(e.toString) && e.toString() === "[object FormData]"));
655
655
  }, wm = zt("URLSearchParams"), [ym, Sm, Cm, Tm] = ["ReadableStream", "Request", "Response", "Headers"].map(zt), Em = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
656
656
  function Mr(e, t, { allOwnKeys: n = !1 } = {}) {
@@ -681,10 +681,10 @@ function Ec(e, t) {
681
681
  return null;
682
682
  }
683
683
  const yn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Rc = (e) => !Xn(e) && e !== yn;
684
- function Zs() {
684
+ function Js() {
685
685
  const { caseless: e, skipUndefined: t } = Rc(this) && this || {}, n = {}, r = (o, s) => {
686
686
  const i = e && Ec(n, s) || s;
687
- no(n[i]) && no(o) ? n[i] = Zs(n[i], o) : no(o) ? n[i] = Zs({}, o) : er(o) ? n[i] = o.slice() : (!t || !Xn(o)) && (n[i] = o);
687
+ no(n[i]) && no(o) ? n[i] = Js(n[i], o) : no(o) ? n[i] = Js({}, o) : er(o) ? n[i] = o.slice() : (!t || !Xn(o)) && (n[i] = o);
688
688
  };
689
689
  for (let o = 0, s = arguments.length; o < s; o++)
690
690
  arguments[o] && Mr(arguments[o], r);
@@ -720,7 +720,7 @@ const Rm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
720
720
  n[t] = e[t];
721
721
  return n;
722
722
  }, Pm = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Mi(Uint8Array)), _m = (e, t) => {
723
- const r = (e && e[Ho]).call(e);
723
+ const r = (e && e[$o]).call(e);
724
724
  let o;
725
725
  for (; (o = r.next()) && !o.done; ) {
726
726
  const s = o.value;
@@ -765,10 +765,10 @@ const Rm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
765
765
  });
766
766
  };
767
767
  return er(e) ? r(e) : r(String(e).split(t)), n;
768
- }, Hm = () => {
769
- }, $m = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
768
+ }, $m = () => {
769
+ }, Hm = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
770
770
  function zm(e) {
771
- return !!(e && pt(e.append) && e[Sc] === "FormData" && e[Ho]);
771
+ return !!(e && pt(e.append) && e[Sc] === "FormData" && e[$o]);
772
772
  }
773
773
  const Um = (e) => {
774
774
  const t = new Array(10), n = (r, o) => {
@@ -796,7 +796,7 @@ const Um = (e) => {
796
796
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
797
797
  typeof setImmediate == "function",
798
798
  pt(yn.postMessage)
799
- ), Gm = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || Nc, Km = (e) => e != null && pt(e[Ho]), j = {
799
+ ), Gm = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || Nc, Km = (e) => e != null && pt(e[$o]), j = {
800
800
  isArray: er,
801
801
  isArrayBuffer: Cc,
802
802
  isBuffer: _r,
@@ -823,13 +823,13 @@ const Um = (e) => {
823
823
  isTypedArray: Pm,
824
824
  isFileList: vm,
825
825
  forEach: Mr,
826
- merge: Zs,
826
+ merge: Js,
827
827
  extend: Rm,
828
828
  trim: Em,
829
829
  stripBOM: Im,
830
830
  inherits: Nm,
831
831
  toFlatObject: jm,
832
- kindOf: $o,
832
+ kindOf: Ho,
833
833
  kindOfTest: zt,
834
834
  endsWith: Am,
835
835
  toArray: km,
@@ -843,8 +843,8 @@ const Um = (e) => {
843
843
  freezeMethods: Fm,
844
844
  toObjectSet: Bm,
845
845
  toCamelCase: Dm,
846
- noop: Hm,
847
- toFiniteNumber: $m,
846
+ noop: $m,
847
+ toFiniteNumber: Hm,
848
848
  findKey: Ec,
849
849
  global: yn,
850
850
  isContextDefined: Rc,
@@ -1018,13 +1018,13 @@ Pc.toString = function(t) {
1018
1018
  return n(o[0]) + "=" + n(o[1]);
1019
1019
  }, "").join("&");
1020
1020
  };
1021
- function Jm(e) {
1021
+ function Zm(e) {
1022
1022
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
1023
1023
  }
1024
1024
  function _c(e, t, n) {
1025
1025
  if (!t)
1026
1026
  return e;
1027
- const r = n && n.encode || Jm;
1027
+ const r = n && n.encode || Zm;
1028
1028
  j.isFunction(n) && (n = {
1029
1029
  serialize: n
1030
1030
  });
@@ -1094,10 +1094,10 @@ const Oc = {
1094
1094
  silentJSONParsing: !0,
1095
1095
  forcedJSONParsing: !0,
1096
1096
  clarifyTimeoutError: !1
1097
- }, Zm = typeof URLSearchParams < "u" ? URLSearchParams : Di, Qm = typeof FormData < "u" ? FormData : null, eg = typeof Blob < "u" ? Blob : null, tg = {
1097
+ }, Jm = typeof URLSearchParams < "u" ? URLSearchParams : Di, Qm = typeof FormData < "u" ? FormData : null, eg = typeof Blob < "u" ? Blob : null, tg = {
1098
1098
  isBrowser: !0,
1099
1099
  classes: {
1100
- URLSearchParams: Zm,
1100
+ URLSearchParams: Jm,
1101
1101
  FormData: Qm,
1102
1102
  Blob: eg
1103
1103
  },
@@ -1253,7 +1253,7 @@ const ug = j.toObjectSet([
1253
1253
  `).forEach(function(i) {
1254
1254
  o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && ug[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
1255
1255
  }), t;
1256
- }, Ja = Symbol("internals");
1256
+ }, Za = Symbol("internals");
1257
1257
  function dr(e) {
1258
1258
  return e && String(e).trim().toLowerCase();
1259
1259
  }
@@ -1408,7 +1408,7 @@ let mt = class {
1408
1408
  return n.forEach((o) => r.set(o)), r;
1409
1409
  }
1410
1410
  static accessor(t) {
1411
- const r = (this[Ja] = this[Ja] = {
1411
+ const r = (this[Za] = this[Za] = {
1412
1412
  accessors: {}
1413
1413
  }).accessors, o = this.prototype;
1414
1414
  function s(i) {
@@ -1506,7 +1506,7 @@ const So = (e, t, n = 3) => {
1506
1506
  };
1507
1507
  e(h);
1508
1508
  }, n);
1509
- }, Za = (e, t) => {
1509
+ }, Ja = (e, t) => {
1510
1510
  const n = e != null;
1511
1511
  return [(r) => t[0]({
1512
1512
  lengthComputable: n,
@@ -1855,17 +1855,17 @@ const Bc = (e) => {
1855
1855
  const N = W && W.unsubscribe && (() => {
1856
1856
  W.unsubscribe();
1857
1857
  });
1858
- let $;
1858
+ let H;
1859
1859
  try {
1860
- if (C && u && m !== "get" && m !== "head" && ($ = await x(I, b)) !== 0) {
1860
+ if (C && u && m !== "get" && m !== "head" && (H = await x(I, b)) !== 0) {
1861
1861
  let q = new n(v, {
1862
1862
  method: "POST",
1863
1863
  body: b,
1864
1864
  duplex: "half"
1865
1865
  }), oe;
1866
1866
  if (j.isFormData(b) && (oe = q.headers.get("content-type")) && I.setContentType(oe), q.body) {
1867
- const [F, Q] = Za(
1868
- $,
1867
+ const [F, Q] = Ja(
1868
+ H,
1869
1869
  So(Qa(C))
1870
1870
  );
1871
1871
  b = tl(q.body, nl, F, Q);
@@ -1889,7 +1889,7 @@ const Bc = (e) => {
1889
1889
  ["status", "statusText", "headers"].forEach((de) => {
1890
1890
  q[de] = O[de];
1891
1891
  });
1892
- const oe = j.toFiniteNumber(O.headers.get("content-length")), [F, Q] = S && Za(
1892
+ const oe = j.toFiniteNumber(O.headers.get("content-length")), [F, Q] = S && Ja(
1893
1893
  oe,
1894
1894
  So(Qa(S), !0)
1895
1895
  ) || [];
@@ -1921,7 +1921,7 @@ const Bc = (e) => {
1921
1921
  ) : we.from(L, L && L.code, g, G);
1922
1922
  }
1923
1923
  };
1924
- }, kg = /* @__PURE__ */ new Map(), Hc = (e) => {
1924
+ }, kg = /* @__PURE__ */ new Map(), $c = (e) => {
1925
1925
  let t = e ? e.env : {};
1926
1926
  const { fetch: n, Request: r, Response: o } = t, s = [
1927
1927
  r,
@@ -1933,12 +1933,12 @@ const Bc = (e) => {
1933
1933
  c = s[a], u = d.get(c), u === void 0 && d.set(c, u = a ? /* @__PURE__ */ new Map() : Ag(t)), d = u;
1934
1934
  return u;
1935
1935
  };
1936
- Hc();
1936
+ $c();
1937
1937
  const ti = {
1938
1938
  http: Ym,
1939
1939
  xhr: Tg,
1940
1940
  fetch: {
1941
- get: Hc
1941
+ get: $c
1942
1942
  }
1943
1943
  };
1944
1944
  j.forEach(ti, (e, t) => {
@@ -1950,7 +1950,7 @@ j.forEach(ti, (e, t) => {
1950
1950
  Object.defineProperty(e, "adapterName", { value: t });
1951
1951
  }
1952
1952
  });
1953
- const il = (e) => `- ${e}`, Pg = (e) => j.isFunction(e) || e === null || e === !1, $c = {
1953
+ const il = (e) => `- ${e}`, Pg = (e) => j.isFunction(e) || e === null || e === !1, Hc = {
1954
1954
  getAdapter: (e, t) => {
1955
1955
  e = j.isArray(e) ? e : [e];
1956
1956
  const { length: n } = e;
@@ -1989,7 +1989,7 @@ function al(e) {
1989
1989
  return Is(e), e.headers = mt.from(e.headers), e.data = Rs.call(
1990
1990
  e,
1991
1991
  e.transformRequest
1992
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), $c.getAdapter(e.adapter || Dr.adapter, e)(e).then(function(r) {
1992
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Hc.getAdapter(e.adapter || Dr.adapter, e)(e).then(function(r) {
1993
1993
  return Is(e), r.data = Rs.call(
1994
1994
  e,
1995
1995
  e.transformResponse,
@@ -2348,14 +2348,14 @@ qe.isAxiosError = Dg;
2348
2348
  qe.mergeConfig = En;
2349
2349
  qe.AxiosHeaders = mt;
2350
2350
  qe.formToJSON = (e) => Mc(j.isHTMLForm(e) ? new FormData(e) : e);
2351
- qe.getAdapter = $c.getAdapter;
2351
+ qe.getAdapter = Hc.getAdapter;
2352
2352
  qe.HttpStatusCode = ni;
2353
2353
  qe.default = qe;
2354
2354
  const {
2355
2355
  Axios: FT,
2356
2356
  AxiosError: BT,
2357
- CanceledError: HT,
2358
- isCancel: $T,
2357
+ CanceledError: $T,
2358
+ isCancel: HT,
2359
2359
  CancelToken: zT,
2360
2360
  VERSION: UT,
2361
2361
  all: WT,
@@ -2365,8 +2365,8 @@ const {
2365
2365
  toFormData: YT,
2366
2366
  AxiosHeaders: XT,
2367
2367
  HttpStatusCode: qT,
2368
- formToJSON: JT,
2369
- getAdapter: ZT,
2368
+ formToJSON: ZT,
2369
+ getAdapter: JT,
2370
2370
  mergeConfig: QT
2371
2371
  } = qe, Ns = {};
2372
2372
  function cl() {
@@ -2387,7 +2387,7 @@ function Bg() {
2387
2387
  function dl(e) {
2388
2388
  Co = e, oi.forEach((t) => t(e));
2389
2389
  }
2390
- function Hg(e) {
2390
+ function $g(e) {
2391
2391
  return oi.add(e), () => oi.delete(e);
2392
2392
  }
2393
2393
  const At = qe.create({
@@ -2408,7 +2408,7 @@ async function Mt(e, t) {
2408
2408
  async function fl(e, t, n) {
2409
2409
  return At.defaults.baseURL ? (await At.post(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2410
2410
  }
2411
- async function $g(e, t, n) {
2411
+ async function Hg(e, t, n) {
2412
2412
  return At.defaults.baseURL ? (await At.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2413
2413
  }
2414
2414
  async function zg(e, t) {
@@ -2434,7 +2434,7 @@ class Ug {
2434
2434
  dl(t);
2435
2435
  }
2436
2436
  onTokenChange(t) {
2437
- return Hg(t);
2437
+ return $g(t);
2438
2438
  }
2439
2439
  // ---- Thread Management ----
2440
2440
  async listThreads() {
@@ -2446,7 +2446,7 @@ class Ug {
2446
2446
  return xt(r);
2447
2447
  }
2448
2448
  async updateThread(t, n) {
2449
- const r = await $g(`/chat/threads/${t}`, { title: n });
2449
+ const r = await Hg(`/chat/threads/${t}`, { title: n });
2450
2450
  return xt(r);
2451
2451
  }
2452
2452
  async deleteThread(t) {
@@ -2544,10 +2544,10 @@ function Wg(e = {}) {
2544
2544
  return !1;
2545
2545
  }
2546
2546
  })(), I = (N) => {
2547
- var $;
2547
+ var H;
2548
2548
  try {
2549
2549
  const L = JSON.parse(JSON.stringify(N));
2550
- return ($ = L == null ? void 0 : L.payload) != null && $.files_info && Array.isArray(L.payload.files_info) && (L.payload.files_info = L.payload.files_info.map((X) => ({
2550
+ return (H = L == null ? void 0 : L.payload) != null && H.files_info && Array.isArray(L.payload.files_info) && (L.payload.files_info = L.payload.files_info.map((X) => ({
2551
2551
  ...X,
2552
2552
  data: X != null && X.data ? `<base64 ${String(X.data).length} chars>` : X == null ? void 0 : X.data
2553
2553
  }))), L;
@@ -2574,7 +2574,7 @@ function Wg(e = {}) {
2574
2574
  } catch {
2575
2575
  }
2576
2576
  E && console.debug("[use-chat] POST", t + n, I(y));
2577
- const $ = await fetch(t + n, {
2577
+ const H = await fetch(t + n, {
2578
2578
  method: "POST",
2579
2579
  headers: {
2580
2580
  "Content-Type": "application/json",
@@ -2585,12 +2585,12 @@ function Wg(e = {}) {
2585
2585
  body: JSON.stringify(y),
2586
2586
  signal: C.signal
2587
2587
  });
2588
- if (!$.ok || !$.body) {
2589
- const _ = await $.text().catch(() => "");
2590
- throw E && console.debug("[use-chat] non-OK response", $.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${$.status}${_ ? ": " + _ : ""}`);
2588
+ if (!H.ok || !H.body) {
2589
+ const _ = await H.text().catch(() => "");
2590
+ throw E && console.debug("[use-chat] non-OK response", H.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${H.status}${_ ? ": " + _ : ""}`);
2591
2591
  }
2592
2592
  try {
2593
- const _ = $.headers.get("X-Thread-Id") || $.headers.get("x-thread-id"), z = $.headers.get("X-Thread-Created") || $.headers.get("x-thread-created"), q = _ ?? null, oe = String(z ?? "").toLowerCase() === "true";
2593
+ const _ = H.headers.get("X-Thread-Id") || H.headers.get("x-thread-id"), z = H.headers.get("X-Thread-Created") || H.headers.get("x-thread-created"), q = _ ?? null, oe = String(z ?? "").toLowerCase() === "true";
2594
2594
  try {
2595
2595
  (W = S == null ? void 0 : S.onOpen) == null || W.call(S, { threadId: q, created: oe });
2596
2596
  } catch (F) {
@@ -2599,7 +2599,7 @@ function Wg(e = {}) {
2599
2599
  } catch (_) {
2600
2600
  E && console.debug("[use-chat] failed to read headers:", _);
2601
2601
  }
2602
- const L = $.body.getReader(), X = new TextDecoder();
2602
+ const L = H.body.getReader(), X = new TextDecoder();
2603
2603
  let O = "";
2604
2604
  for (; ; ) {
2605
2605
  const { value: _, done: z } = await L.read();
@@ -2631,8 +2631,8 @@ function Wg(e = {}) {
2631
2631
  }
2632
2632
  } catch (N) {
2633
2633
  if ((N == null ? void 0 : N.name) === "AbortError") return;
2634
- const $ = (N == null ? void 0 : N.message) || String(N);
2635
- E && console.debug("[use-chat] error:", $), u($), (G = S == null ? void 0 : S.onError) == null || G.call(S, $);
2634
+ const H = (N == null ? void 0 : N.message) || String(N);
2635
+ E && console.debug("[use-chat] error:", H), u(H), (G = S == null ? void 0 : S.onError) == null || G.call(S, H);
2636
2636
  } finally {
2637
2637
  a(!1), g.current = null;
2638
2638
  }
@@ -2757,7 +2757,7 @@ function Yg(e, t) {
2757
2757
  return { ...e, messages: u };
2758
2758
  }
2759
2759
  if (o.type === "checkpoint") {
2760
- const s = Zg(e.messages, o.checkpointId);
2760
+ const s = Jg(e.messages, o.checkpointId);
2761
2761
  return { ...e, lastCheckpointId: o.checkpointId, messages: s };
2762
2762
  }
2763
2763
  if (o.type === "branch") {
@@ -2816,9 +2816,9 @@ function qg(e, t, n) {
2816
2816
  });
2817
2817
  }
2818
2818
  function hl(e, t, n) {
2819
- return e.map((r) => r.id === t ? { ...r, content: Jg(r.content, n) } : r);
2819
+ return e.map((r) => r.id === t ? { ...r, content: Zg(r.content, n) } : r);
2820
2820
  }
2821
- function Jg(e, t) {
2821
+ function Zg(e, t) {
2822
2822
  const n = e.slice();
2823
2823
  for (const r of t)
2824
2824
  if (r.type === "text") {
@@ -2828,7 +2828,7 @@ function Jg(e, t) {
2828
2828
  n.push(r);
2829
2829
  return n;
2830
2830
  }
2831
- function Zg(e, t) {
2831
+ function Jg(e, t) {
2832
2832
  for (let n = e.length - 1; n >= 0; n--)
2833
2833
  if (e[n].role === "assistant") {
2834
2834
  const o = { ...e[n], checkpointId: t };
@@ -2943,27 +2943,27 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2943
2943
  }), [v, m] = fe(() => typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
2944
2944
  Ve(() => {
2945
2945
  g(typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
2946
- const H = u.onTokenChange((ae) => {
2946
+ const $ = u.onTokenChange((ae) => {
2947
2947
  m(ae), g(ae);
2948
2948
  });
2949
2949
  return () => {
2950
- H();
2950
+ $();
2951
2951
  };
2952
2952
  }, [u, g]);
2953
- const b = Ye((H) => {
2954
- u.setAuthToken(H);
2955
- }, [u]), { state: w, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Xg(), I = s && s > 0 ? s : 6, [A, k] = fe(!1), [M, W] = fe(!1), [G, N] = fe(null), [$, L] = fe(void 0), X = Ye(
2956
- (H, ae) => {
2957
- const Be = Array.isArray(H == null ? void 0 : H.messages) ? H.messages : [];
2958
- ae === "replace" ? y(Be) : ae === "prepend" && Be.length && R(Be), N((H == null ? void 0 : H.nextCursor) ?? null), k(!!(H != null && H.hasMore)), L((nt) => (H == null ? void 0 : H.checkpointId) ?? nt ?? void 0);
2953
+ const b = Ye(($) => {
2954
+ u.setAuthToken($);
2955
+ }, [u]), { state: w, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Xg(), I = s && s > 0 ? s : 6, [A, k] = fe(!1), [M, W] = fe(!1), [G, N] = fe(null), [H, L] = fe(void 0), X = Ye(
2956
+ ($, ae) => {
2957
+ const Be = Array.isArray($ == null ? void 0 : $.messages) ? $.messages : [];
2958
+ ae === "replace" ? y(Be) : ae === "prepend" && Be.length && R(Be), N(($ == null ? void 0 : $.nextCursor) ?? null), k(!!($ != null && $.hasMore)), L((nt) => ($ == null ? void 0 : $.checkpointId) ?? nt ?? void 0);
2959
2959
  },
2960
2960
  [y, R]
2961
2961
  ), [O, _] = fe([]), [z, q] = fe(null), oe = Ye(async () => {
2962
- const H = await u.listThreads();
2963
- _(H);
2962
+ const $ = await u.listThreads();
2963
+ _($);
2964
2964
  }, [u]), [F, Q] = fe(!1), de = Ye(
2965
- async (H) => {
2966
- const ae = (H == null ? void 0 : H.maxAttempts) ?? 5, Be = (H == null ? void 0 : H.baseDelayMs) ?? 500, nt = (H == null ? void 0 : H.timeoutMs) ?? 2e3;
2965
+ async ($) => {
2966
+ const ae = ($ == null ? void 0 : $.maxAttempts) ?? 5, Be = ($ == null ? void 0 : $.baseDelayMs) ?? 500, nt = ($ == null ? void 0 : $.timeoutMs) ?? 2e3;
2967
2967
  if (!u.baseUrl) return !1;
2968
2968
  const ut = u.baseUrl.replace(/\/+$/, ""), rt = [
2969
2969
  "/health",
@@ -3004,7 +3004,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3004
3004
  [u.baseUrl]
3005
3005
  );
3006
3006
  Ve(() => {
3007
- let H = !0;
3007
+ let $ = !0;
3008
3008
  if (!u.baseUrl) {
3009
3009
  console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
3010
3010
  return;
@@ -3012,13 +3012,13 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3012
3012
  return (async () => {
3013
3013
  try {
3014
3014
  const ae = await de();
3015
- if (!H) return;
3015
+ if (!$) return;
3016
3016
  ae ? oe().catch(() => {
3017
3017
  }) : console.warn("[ChatProvider] backend health-check failed — skipping initial loads");
3018
3018
  } catch {
3019
3019
  }
3020
3020
  })(), () => {
3021
- H = !1;
3021
+ $ = !1;
3022
3022
  };
3023
3023
  }, [oe, u.baseUrl, de]), Ve(() => {
3024
3024
  r == null || r(z);
@@ -3039,37 +3039,37 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3039
3039
  }
3040
3040
  }, [o, i, u.baseUrl, F]);
3041
3041
  const Y = bt(null), P = Ye(
3042
- async (H, ae, Be) => {
3042
+ async ($, ae, Be) => {
3043
3043
  if (!u.baseUrl) {
3044
3044
  console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
3045
3045
  return;
3046
3046
  }
3047
- if (Y.current !== H) {
3048
- Y.current = H;
3047
+ if (Y.current !== $) {
3048
+ Y.current = $;
3049
3049
  try {
3050
3050
  k(!1), N(null), L(void 0);
3051
3051
  const nt = await u.getMessages({
3052
- threadId: H,
3052
+ threadId: $,
3053
3053
  checkpointId: ae,
3054
3054
  checkpointNs: Be,
3055
3055
  limit: I
3056
3056
  });
3057
- q(H), X(nt, "replace");
3057
+ q($), X(nt, "replace");
3058
3058
  } finally {
3059
3059
  Y.current = null;
3060
3060
  }
3061
3061
  }
3062
3062
  },
3063
3063
  [u, X]
3064
- ), Z = Ye(async (H) => {
3065
- const ae = await u.listCheckpoints(H);
3066
- return ev(ae, H);
3067
- }, [u]), ne = Ye(async (H) => {
3064
+ ), J = Ye(async ($) => {
3065
+ const ae = await u.listCheckpoints($);
3066
+ return ev(ae, $);
3067
+ }, [u]), ne = Ye(async ($) => {
3068
3068
  if (!z) throw new Error("No active thread");
3069
3069
  k(!1), N(null), L(void 0);
3070
3070
  const ae = await u.getMessages({
3071
3071
  threadId: z,
3072
- checkpointId: H,
3072
+ checkpointId: $,
3073
3073
  limit: I
3074
3074
  });
3075
3075
  X(ae, "replace");
@@ -3078,8 +3078,8 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3078
3078
  await P(z);
3079
3079
  }, [z, P]), ie = bt(!1);
3080
3080
  Ve(() => {
3081
- const H = ie.current;
3082
- if (ie.current = d, H && !d && z) {
3081
+ const $ = ie.current;
3082
+ if (ie.current = d, $ && !d && z) {
3083
3083
  const ae = w.lastCheckpointId ?? void 0;
3084
3084
  (async () => {
3085
3085
  try {
@@ -3098,14 +3098,14 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3098
3098
  })();
3099
3099
  }
3100
3100
  }, [d, z, w.lastCheckpointId, u, X, oe]);
3101
- const Pe = Ye(async (H) => {
3102
- const ae = await u.createThread(H);
3101
+ const Pe = Ye(async ($) => {
3102
+ const ae = await u.createThread($);
3103
3103
  return await oe(), await P(ae.threadId), ae.threadId;
3104
- }, [u, oe, P]), Fe = Ye(async (H) => {
3105
- await u.deleteThread(H), await oe(), z === H && (q(null), E([]), k(!1), N(null), L(void 0));
3106
- }, [u, oe, z, E]), Le = Ye(async (H, ae) => {
3107
- await u.updateThread(H, ae), await oe();
3108
- }, [u, oe]), ce = Ye(async (H, ae) => {
3104
+ }, [u, oe, P]), Fe = Ye(async ($) => {
3105
+ await u.deleteThread($), await oe(), z === $ && (q(null), E([]), k(!1), N(null), L(void 0));
3106
+ }, [u, oe, z, E]), Le = Ye(async ($, ae) => {
3107
+ await u.updateThread($, ae), await oe();
3108
+ }, [u, oe]), ce = Ye(async ($, ae) => {
3109
3109
  var Dn;
3110
3110
  const Be = (ae == null ? void 0 : ae.attachments) || [], { contentParts: nt, filesInfo: ut } = await rv(
3111
3111
  u,
@@ -3115,7 +3115,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3115
3115
  c,
3116
3116
  z
3117
3117
  ), rt = [];
3118
- H && rt.push({ type: "text", text: H });
3118
+ $ && rt.push({ type: "text", text: $ });
3119
3119
  for (const Ue of nt) rt.push(Ue);
3120
3120
  const Qe = {
3121
3121
  id: ((Dn = crypto.randomUUID) == null ? void 0 : Dn.call(crypto)) || `user-${Date.now()}`,
@@ -3156,7 +3156,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3156
3156
  }
3157
3157
  );
3158
3158
  }, [z, S, p, C, w.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, oe, q, a, c]), Ae = Ye(
3159
- async (H) => {
3159
+ async ($) => {
3160
3160
  if (!z) throw new Error("No active thread");
3161
3161
  if (M || !A) return;
3162
3162
  const ae = G;
@@ -3165,8 +3165,8 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3165
3165
  try {
3166
3166
  const Be = await u.getMessages({
3167
3167
  threadId: z,
3168
- checkpointId: $,
3169
- limit: (H == null ? void 0 : H.limit) ?? I,
3168
+ checkpointId: H,
3169
+ limit: ($ == null ? void 0 : $.limit) ?? I,
3170
3170
  beforeId: ae
3171
3171
  });
3172
3172
  X(Be, "prepend");
@@ -3175,7 +3175,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3175
3175
  }
3176
3176
  }
3177
3177
  },
3178
- [u, z, $, G, A, M, X]
3178
+ [u, z, H, G, A, M, X]
3179
3179
  ), ve = {
3180
3180
  baseUrl: u.baseUrl,
3181
3181
  token: v,
@@ -3193,7 +3193,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3193
3193
  isLoadingHistory: M,
3194
3194
  loadOlderMessages: Ae,
3195
3195
  historyPageSize: I,
3196
- listCheckpoints: Z,
3196
+ listCheckpoints: J,
3197
3197
  navigateToCheckpoint: ne,
3198
3198
  returnToLatest: le,
3199
3199
  refreshThreads: oe,
@@ -3243,7 +3243,7 @@ function Go(e, t) {
3243
3243
  function av(e, t) {
3244
3244
  return t(e);
3245
3245
  }
3246
- function $e(...e) {
3246
+ function He(...e) {
3247
3247
  return e;
3248
3248
  }
3249
3249
  function Oe(e, t) {
@@ -3252,7 +3252,7 @@ function Oe(e, t) {
3252
3252
  function ye(e, t) {
3253
3253
  e(Vo, t);
3254
3254
  }
3255
- function Hi(e) {
3255
+ function $i(e) {
3256
3256
  e(nr);
3257
3257
  }
3258
3258
  function Xe(e) {
@@ -3278,7 +3278,7 @@ function gl(e) {
3278
3278
  function Yc(e, t) {
3279
3279
  return e === t;
3280
3280
  }
3281
- function He(e = Yc) {
3281
+ function $e(e = Yc) {
3282
3282
  let t;
3283
3283
  return (n) => (r) => {
3284
3284
  e(t, r) || (t = r, n(r));
@@ -3302,7 +3302,7 @@ function B(e, ...t) {
3302
3302
  return (r, o) => {
3303
3303
  switch (r) {
3304
3304
  case nr:
3305
- Hi(e);
3305
+ $i(e);
3306
3306
  return;
3307
3307
  case hn:
3308
3308
  return Oe(e, n(o));
@@ -3422,7 +3422,7 @@ function dv(e) {
3422
3422
  };
3423
3423
  return n(e);
3424
3424
  }
3425
- function Ze(...e) {
3425
+ function Je(...e) {
3426
3426
  const t = Re(), n = new Array(e.length);
3427
3427
  let r = 0;
3428
3428
  const o = Math.pow(2, e.length) - 1;
@@ -3434,7 +3434,7 @@ function Ze(...e) {
3434
3434
  }), function(s, i) {
3435
3435
  switch (s) {
3436
3436
  case nr: {
3437
- Hi(t);
3437
+ $i(t);
3438
3438
  return;
3439
3439
  }
3440
3440
  case hn:
@@ -3443,7 +3443,7 @@ function Ze(...e) {
3443
3443
  };
3444
3444
  }
3445
3445
  function he(e, t = Yc) {
3446
- return B(e, He(t));
3446
+ return B(e, $e(t));
3447
3447
  }
3448
3448
  function ii(...e) {
3449
3449
  return function(t, n) {
@@ -3486,9 +3486,9 @@ const fv = {
3486
3486
  { singleton: !0 }
3487
3487
  );
3488
3488
  function Pn(e, t, n) {
3489
- return $i(e, t, n).callbackRef;
3489
+ return Hi(e, t, n).callbackRef;
3490
3490
  }
3491
- function $i(e, t, n) {
3491
+ function Hi(e, t, n) {
3492
3492
  const r = K.useRef(null);
3493
3493
  let o = (i) => {
3494
3494
  };
@@ -3524,7 +3524,7 @@ function pv(e, t, n, r, o, s, i, a, c) {
3524
3524
  },
3525
3525
  [e, t, o, s, i, r, a]
3526
3526
  );
3527
- return $i(u, n, c);
3527
+ return Hi(u, n, c);
3528
3528
  }
3529
3529
  function mv(e, t, n, r) {
3530
3530
  const o = e.length;
@@ -3568,7 +3568,7 @@ function Xc(e, t, n) {
3568
3568
  },
3569
3569
  // eslint-disable-next-line react-hooks/exhaustive-deps
3570
3570
  [e, t]
3571
- ), { callbackRef: s, ref: i } = $i(o, !0, n), a = K.useCallback(() => {
3571
+ ), { callbackRef: s, ref: i } = Hi(o, !0, n), a = K.useCallback(() => {
3572
3572
  o(i.current);
3573
3573
  }, [o, i]);
3574
3574
  return K.useEffect(() => {
@@ -3680,8 +3680,8 @@ function ai(e, t) {
3680
3680
  if (De(o))
3681
3681
  return r;
3682
3682
  {
3683
- const [s, i] = Zc(r);
3684
- return io(et(e, { k: s, l: Jc(r), v: i }));
3683
+ const [s, i] = Jc(r);
3684
+ return io(et(e, { k: s, l: Zc(r), v: i }));
3685
3685
  }
3686
3686
  } else return t < n ? io(et(e, { l: ai(r, t) })) : io(et(e, { r: ai(o, t) }));
3687
3687
  }
@@ -3738,14 +3738,14 @@ function et(e, t) {
3738
3738
  t.r !== void 0 ? t.r : e.r
3739
3739
  );
3740
3740
  }
3741
- function Jc(e) {
3742
- return De(e.r) ? e.l : io(et(e, { r: Jc(e.r) }));
3741
+ function Zc(e) {
3742
+ return De(e.r) ? e.l : io(et(e, { r: Zc(e.r) }));
3743
3743
  }
3744
3744
  function ks(e) {
3745
3745
  return De(e) || e.lvl > e.r.lvl;
3746
3746
  }
3747
- function Zc(e) {
3748
- return De(e.r) ? [e.k, e.v] : Zc(e.r);
3747
+ function Jc(e) {
3748
+ return De(e.r) ? [e.k, e.v] : Jc(e.r);
3749
3749
  }
3750
3750
  function Qc(e, t, n, r = yr, o = yr) {
3751
3751
  return { k: e, l: r, lvl: n, r: o, v: t };
@@ -3937,15 +3937,15 @@ function Rv(e) {
3937
3937
  const Iv = {
3938
3938
  offsetHeight: "height",
3939
3939
  offsetWidth: "width"
3940
- }, Zt = je(
3940
+ }, Jt = je(
3941
3941
  ([{ log: e }, { recalcInProgress: t }]) => {
3942
3942
  const n = Re(), r = Re(), o = ct(r, 0), s = Re(), i = Re(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S, C) => cn(S, Iv[C])), p = V(void 0), x = V(0), g = xv(), v = ct(
3943
- B(n, Se(c, e, x), Yt(Cv, g), He()),
3943
+ B(n, Se(c, e, x), Yt(Cv, g), $e()),
3944
3944
  g
3945
3945
  ), m = ct(
3946
3946
  B(
3947
3947
  c,
3948
- He(),
3948
+ $e(),
3949
3949
  Yt((S, C) => ({ current: C, prev: S.current }), {
3950
3950
  current: [],
3951
3951
  prev: []
@@ -4049,30 +4049,30 @@ const Iv = {
4049
4049
  const k = Sr(C.sizeTree, 0);
4050
4050
  let M = 0, W = 0;
4051
4051
  for (; M < S; ) {
4052
- const N = C.groupIndices[W], $ = C.groupIndices.length === W + 1 ? 1 / 0 : C.groupIndices[W + 1] - N - 1;
4052
+ const N = C.groupIndices[W], H = C.groupIndices.length === W + 1 ? 1 / 0 : C.groupIndices[W + 1] - N - 1;
4053
4053
  I.push({
4054
4054
  endIndex: N,
4055
4055
  size: k,
4056
4056
  startIndex: N
4057
4057
  }), I.push({
4058
- endIndex: N + 1 + $ - 1,
4058
+ endIndex: N + 1 + H - 1,
4059
4059
  size: A,
4060
4060
  startIndex: N + 1
4061
- }), W++, M += $ + 1;
4061
+ }), W++, M += H + 1;
4062
4062
  }
4063
4063
  const G = Sn(C.sizeTree);
4064
4064
  return M !== S && G.shift(), G.reduce(
4065
- (N, { k: $, v: L }) => {
4065
+ (N, { k: H, v: L }) => {
4066
4066
  let X = N.ranges;
4067
4067
  return N.prevSize !== 0 && (X = [
4068
4068
  ...N.ranges,
4069
4069
  {
4070
- endIndex: $ + S - 1,
4070
+ endIndex: H + S - 1,
4071
4071
  size: N.prevSize,
4072
4072
  startIndex: N.prevIndex
4073
4073
  }
4074
4074
  ]), {
4075
- prevIndex: $ + S,
4075
+ prevIndex: H + S,
4076
4076
  prevSize: L,
4077
4077
  ranges: X
4078
4078
  };
@@ -4126,7 +4126,7 @@ const Iv = {
4126
4126
  const G = A[M + 1] - W - 1;
4127
4127
  M++, k += G + 1;
4128
4128
  }
4129
- if (I = Sn(C.sizeTree).reduce((G, { k: N, v: $ }) => yt(G, Math.max(0, N + S), $), I), k !== -S) {
4129
+ if (I = Sn(C.sizeTree).reduce((G, { k: N, v: H }) => yt(G, Math.max(0, N + S), H), I), k !== -S) {
4130
4130
  const G = Sr(C.sizeTree, W);
4131
4131
  I = yt(I, 0, G);
4132
4132
  const N = Bt(C.sizeTree, -S + 1)[1];
@@ -4170,7 +4170,7 @@ const Iv = {
4170
4170
  unshiftWith: s
4171
4171
  };
4172
4172
  },
4173
- $e(pn, zi),
4173
+ He(pn, zi),
4174
4174
  { singleton: !0 }
4175
4175
  );
4176
4176
  function Nv(e) {
@@ -4199,30 +4199,30 @@ const su = je(
4199
4199
  e
4200
4200
  ), ue(
4201
4201
  B(
4202
- Ze(o, t, r),
4202
+ Je(o, t, r),
4203
4203
  pe(([c, u]) => Yo(u)),
4204
4204
  re(([c, u, d]) => Bt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
4205
- He(),
4205
+ $e(),
4206
4206
  re((c) => [c])
4207
4207
  ),
4208
4208
  i
4209
4209
  ), { groupCounts: s, topItemsIndexes: i };
4210
4210
  },
4211
- $e(Zt, ft)
4211
+ He(Jt, ft)
4212
4212
  ), mn = je(
4213
4213
  ([{ log: e }]) => {
4214
4214
  const t = V(!1), n = St(
4215
4215
  B(
4216
4216
  t,
4217
4217
  pe((r) => r),
4218
- He()
4218
+ $e()
4219
4219
  )
4220
4220
  );
4221
4221
  return Oe(t, (r) => {
4222
4222
  r && Xe(e)("props updated", {}, gt.DEBUG);
4223
4223
  }), { didMount: n, propsReady: t };
4224
4224
  },
4225
- $e(pn),
4225
+ He(pn),
4226
4226
  { singleton: !0 }
4227
4227
  ), jv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4228
4228
  function iu(e) {
@@ -4261,7 +4261,7 @@ const Lr = je(
4261
4261
  G,
4262
4262
  N
4263
4263
  ]) => {
4264
- const $ = iu(R), { align: L, behavior: X, offset: O } = $, _ = E - 1, z = ou($, S, _);
4264
+ const H = iu(R), { align: L, behavior: X, offset: O } = H, _ = E - 1, z = ou(H, S, _);
4265
4265
  let q = Tr(z, S.offsetTree, W) + A;
4266
4266
  L === "end" ? (q += G + Bt(S.sizeTree, z)[1] - C + N, z === _ && (q += k)) : L === "center" ? q += (G + Bt(S.sizeTree, z)[1] - C + N) / 2 : q -= I, O && (q += O);
4267
4267
  const oe = (F) => {
@@ -4289,7 +4289,7 @@ const Lr = je(
4289
4289
  topListHeight: v
4290
4290
  };
4291
4291
  },
4292
- $e(Zt, ft, pn),
4292
+ He(Jt, ft, pn),
4293
4293
  { singleton: !0 }
4294
4294
  );
4295
4295
  function Av(e) {
@@ -4332,7 +4332,7 @@ const Fr = je(
4332
4332
  u
4333
4333
  ), Oe(
4334
4334
  B(
4335
- Ze(t, i),
4335
+ Je(t, i),
4336
4336
  Se(a, n, e, u),
4337
4337
  pe(([[, d], h, { sizeTree: p }, x, g]) => d && (!De(p) || Bi(x)) && !h && !g),
4338
4338
  Se(c)
@@ -4352,7 +4352,7 @@ const Fr = je(
4352
4352
  scrolledToInitialItem: a
4353
4353
  };
4354
4354
  },
4355
- $e(Zt, ft, Lr, mn),
4355
+ He(Jt, ft, Lr, mn),
4356
4356
  { singleton: !0 }
4357
4357
  );
4358
4358
  function au(e, t) {
@@ -4371,24 +4371,24 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4371
4371
  const i = V(!1), a = V(!0), c = Re(), u = Re(), d = V(4), h = V(_v), p = ct(
4372
4372
  B(
4373
4373
  ii(B(he(o), In(1), Gt(!0)), B(he(o), In(1), Gt(!1), gl(100))),
4374
- He()
4374
+ $e()
4375
4375
  ),
4376
4376
  !1
4377
4377
  ), x = ct(
4378
- B(ii(B(n, Gt(!0)), B(n, Gt(!1), gl(200))), He()),
4378
+ B(ii(B(n, Gt(!0)), B(n, Gt(!1), gl(200))), $e()),
4379
4379
  !1
4380
4380
  );
4381
4381
  ue(
4382
4382
  B(
4383
- Ze(he(o), he(h)),
4383
+ Je(he(o), he(h)),
4384
4384
  re(([w, y]) => w <= y),
4385
- He()
4385
+ $e()
4386
4386
  ),
4387
4387
  a
4388
4388
  ), ue(B(a, nn(50)), u);
4389
4389
  const g = St(
4390
4390
  B(
4391
- Ze(r, he(s), he(t), he(e), he(d)),
4391
+ Je(r, he(s), he(t), he(e), he(d)),
4392
4392
  Yt((w, [{ scrollHeight: y, scrollTop: R }, S, C, E, I]) => {
4393
4393
  const A = R + S - y > -I, k = {
4394
4394
  scrollHeight: y,
@@ -4411,7 +4411,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4411
4411
  state: k
4412
4412
  };
4413
4413
  }, Pv),
4414
- He((w, y) => w && w.atBottom === y.atBottom)
4414
+ $e((w, y) => w && w.atBottom === y.atBottom)
4415
4415
  )
4416
4416
  ), v = ct(
4417
4417
  B(
@@ -4459,7 +4459,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4459
4459
  B(
4460
4460
  r,
4461
4461
  re(({ scrollTop: w }) => w),
4462
- He(),
4462
+ $e(),
4463
4463
  Yt(
4464
4464
  (w, y) => Xe(x) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? Er : gr, prevScrollTop: y },
4465
4465
  { direction: gr, prevScrollTop: 0 }
@@ -4499,7 +4499,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4499
4499
  scrollDirection: m,
4500
4500
  scrollVelocity: b
4501
4501
  };
4502
- }, $e(ft)), Eo = "top", Ro = "bottom", wl = "none";
4502
+ }, He(ft)), Eo = "top", Ro = "bottom", wl = "none";
4503
4503
  function yl(e, t, n) {
4504
4504
  return typeof e == "number" ? n === Er && t === Eo || n === gr && t === Ro ? e : 0 : n === Er ? t === Eo ? e.main : e.reverse : t === Ro ? e.main : e.reverse;
4505
4505
  }
@@ -4511,7 +4511,7 @@ const Gi = je(
4511
4511
  ([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
4512
4512
  const s = Re(), i = V(0), a = V(0), c = V(0), u = ct(
4513
4513
  B(
4514
- Ze(
4514
+ Je(
4515
4515
  he(r),
4516
4516
  he(o),
4517
4517
  he(n),
@@ -4544,7 +4544,7 @@ const Gi = je(
4544
4544
  }
4545
4545
  ),
4546
4546
  pe((d) => d != null),
4547
- He(Cr)
4547
+ $e(Cr)
4548
4548
  ),
4549
4549
  [0, 0]
4550
4550
  );
@@ -4558,7 +4558,7 @@ const Gi = je(
4558
4558
  visibleRange: u
4559
4559
  };
4560
4560
  },
4561
- $e(ft),
4561
+ He(ft),
4562
4562
  { singleton: !0 }
4563
4563
  );
4564
4564
  function Ov(e, t, n) {
@@ -4660,7 +4660,7 @@ const _n = je(
4660
4660
  ue(s.topItemsIndexes, v);
4661
4661
  const w = ct(
4662
4662
  B(
4663
- Ze(
4663
+ Je(
4664
4664
  x,
4665
4665
  g,
4666
4666
  he(c, Cr),
@@ -4689,16 +4689,16 @@ const _n = je(
4689
4689
  W,
4690
4690
  G,
4691
4691
  N,
4692
- $
4692
+ H
4693
4693
  ]) => {
4694
4694
  const L = A, { offsetTree: X, sizeTree: O } = L, _ = Xe(m);
4695
4695
  if (I === 0)
4696
4696
  return { ...Ps, totalCount: I };
4697
4697
  if (C === 0 && E === 0)
4698
- return _ === 0 ? { ...Ps, totalCount: I } : lu(_, k, A, G, N, $ || []);
4698
+ return _ === 0 ? { ...Ps, totalCount: I } : lu(_, k, A, G, N, H || []);
4699
4699
  if (De(O))
4700
4700
  return _ > 0 ? null : ao(
4701
- Ov(Vi(k, I), L, $),
4701
+ Ov(Vi(k, I), L, H),
4702
4702
  [],
4703
4703
  I,
4704
4704
  N,
@@ -4710,9 +4710,9 @@ const _n = je(
4710
4710
  const de = W[0], be = W[W.length - 1];
4711
4711
  let Y = 0;
4712
4712
  for (const P of Ko(O, de, be)) {
4713
- const Z = P.value, ne = Math.max(P.start, de), le = Math.min(P.end, be);
4713
+ const J = P.value, ne = Math.max(P.start, de), le = Math.min(P.end, be);
4714
4714
  for (let ie = ne; ie <= le; ie++)
4715
- z.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: Y, size: Z }), Y += Z;
4715
+ z.push({ data: H == null ? void 0 : H[ie], index: ie, offset: Y, size: J }), Y += J;
4716
4716
  }
4717
4717
  }
4718
4718
  if (!M)
@@ -4723,17 +4723,17 @@ const _n = je(
4723
4723
  const F = I - 1, Q = Go([], (de) => {
4724
4724
  for (const be of oe) {
4725
4725
  const Y = be.value;
4726
- let P = Y.offset, Z = be.start;
4726
+ let P = Y.offset, J = be.start;
4727
4727
  const ne = Y.size;
4728
4728
  if (Y.offset < C) {
4729
- Z += Math.floor((C - Y.offset + N) / (ne + N));
4730
- const ie = Z - be.start;
4729
+ J += Math.floor((C - Y.offset + N) / (ne + N));
4730
+ const ie = J - be.start;
4731
4731
  P += ie * ne + ie * N;
4732
4732
  }
4733
- Z < q && (P += (q - Z) * ne, Z = q);
4733
+ J < q && (P += (q - J) * ne, J = q);
4734
4734
  const le = Math.min(be.end, F);
4735
- for (let ie = Z; ie <= le && !(P >= E); ie++)
4736
- de.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: P, size: ne }), P += ne + N;
4735
+ for (let ie = J; ie <= le && !(P >= E); ie++)
4736
+ de.push({ data: H == null ? void 0 : H[ie], index: ie, offset: P, size: ne }), P += ne + N;
4737
4737
  }
4738
4738
  });
4739
4739
  return ao(Q, z, I, N, L, G);
@@ -4741,7 +4741,7 @@ const _n = je(
4741
4741
  ),
4742
4742
  //@ts-expect-error filter needs to be fixed
4743
4743
  pe((C) => C !== null),
4744
- He()
4744
+ $e()
4745
4745
  ),
4746
4746
  Ps
4747
4747
  );
@@ -4778,7 +4778,7 @@ const _n = je(
4778
4778
  Se(o, e),
4779
4779
  pe(([{ items: C }, E]) => C[C.length - 1].originalIndex === E - 1),
4780
4780
  re(([, C, E]) => [C - 1, E]),
4781
- He(Cr),
4781
+ $e(Cr),
4782
4782
  re(([C]) => C)
4783
4783
  )
4784
4784
  ), R = St(
@@ -4787,7 +4787,7 @@ const _n = je(
4787
4787
  nn(200),
4788
4788
  pe(({ items: C, topItems: E }) => C.length > 0 && C[0].originalIndex === E.length),
4789
4789
  re(({ items: C }) => C[0].index),
4790
- He()
4790
+ $e()
4791
4791
  )
4792
4792
  ), S = St(
4793
4793
  B(
@@ -4804,13 +4804,13 @@ const _n = je(
4804
4804
  startIndex: C[E].index
4805
4805
  };
4806
4806
  }),
4807
- He(tu)
4807
+ $e(tu)
4808
4808
  )
4809
4809
  );
4810
4810
  return { endReached: y, initialItemCount: m, itemsRendered: b, listState: w, rangeChanged: S, startReached: R, topItemsIndexes: v, ...p };
4811
4811
  },
4812
- $e(
4813
- Zt,
4812
+ He(
4813
+ Jt,
4814
4814
  su,
4815
4815
  Gi,
4816
4816
  Fr,
@@ -4824,30 +4824,30 @@ const _n = je(
4824
4824
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
4825
4825
  const s = Re(), i = ct(
4826
4826
  B(
4827
- Ze(n, e, r, t, o),
4827
+ Je(n, e, r, t, o),
4828
4828
  re(([a, c, u, d, h]) => a + c + u + d + h.offsetBottom + h.bottom)
4829
4829
  ),
4830
4830
  0
4831
4831
  );
4832
4832
  return ue(he(i), s), { totalListHeight: i, totalListHeightChanged: s };
4833
4833
  },
4834
- $e(ft, _n),
4834
+ He(ft, _n),
4835
4835
  { singleton: !0 }
4836
4836
  ), Mv = je(
4837
4837
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
4838
4838
  const n = V(!1), r = ct(
4839
4839
  B(
4840
- Ze(n, e, t),
4840
+ Je(n, e, t),
4841
4841
  pe(([o]) => o),
4842
4842
  re(([, o, s]) => Math.max(0, o - s)),
4843
4843
  nn(0),
4844
- He()
4844
+ $e()
4845
4845
  ),
4846
4846
  0
4847
4847
  );
4848
4848
  return { alignToBottom: n, paddingTopAddition: r };
4849
4849
  },
4850
- $e(ft, cu),
4850
+ He(ft, cu),
4851
4851
  { singleton: !0 }
4852
4852
  ), uu = je(() => ({
4853
4853
  context: V(null)
@@ -4880,7 +4880,7 @@ const _n = je(
4880
4880
  return N ? E && Lt(
4881
4881
  B(
4882
4882
  i,
4883
- pe(($) => !$),
4883
+ pe((H) => !H),
4884
4884
  // skips the initial publish of false, and the cleanup call.
4885
4885
  // but if scrollingInProgress is true, we skip the initial publish.
4886
4886
  In(Xe(i) ? 1 : 2)
@@ -4895,7 +4895,7 @@ const _n = je(
4895
4895
  scrollIntoView: d
4896
4896
  };
4897
4897
  },
4898
- $e(Zt, ft, Lr, _n, pn),
4898
+ He(Jt, ft, Lr, _n, pn),
4899
4899
  { singleton: !0 }
4900
4900
  );
4901
4901
  function Tl(e) {
@@ -4924,7 +4924,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4924
4924
  }
4925
4925
  Oe(
4926
4926
  B(
4927
- Ze(B(he(t), In(1)), c),
4927
+ Je(B(he(t), In(1)), c),
4928
4928
  Se(he(g), s, a, h),
4929
4929
  re(([[S, C], E, I, A, k]) => {
4930
4930
  let M = C && A, W = "auto";
@@ -4948,7 +4948,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4948
4948
  }
4949
4949
  Oe(
4950
4950
  B(
4951
- Ze(he(g), t, u),
4951
+ Je(he(g), t, u),
4952
4952
  pe(([S, , C]) => S && C),
4953
4953
  Yt(
4954
4954
  ({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
@@ -4962,7 +4962,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4962
4962
  }
4963
4963
  ), Oe(v, () => {
4964
4964
  w(Xe(g) !== !1);
4965
- }), Oe(Ze(he(g), o), ([S, C]) => {
4965
+ }), Oe(Je(he(g), o), ([S, C]) => {
4966
4966
  S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && b("auto");
4967
4967
  });
4968
4968
  const y = V(null), R = Re();
@@ -4980,7 +4980,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4980
4980
  R
4981
4981
  ), Oe(
4982
4982
  B(
4983
- Ze(B(R, In(1)), c),
4983
+ Je(B(R, In(1)), c),
4984
4984
  Se(he(y), a, h, p),
4985
4985
  re(([[S, C], E, I, A, k]) => C && I && (E == null ? void 0 : E({ context: k, totalCount: S, scrollingInProgress: A }))),
4986
4986
  pe((S) => !!S),
@@ -4995,8 +4995,8 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4995
4995
  }
4996
4996
  ), { autoscrollToBottom: v, followOutput: g, scrollIntoViewOnChange: y };
4997
4997
  },
4998
- $e(
4999
- Zt,
4998
+ He(
4999
+ Jt,
5000
5000
  Br,
5001
5001
  Lr,
5002
5002
  Fr,
@@ -5017,9 +5017,9 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5017
5017
  ),
5018
5018
  i
5019
5019
  ), {}),
5020
- $e(Zt, Fr, _n, mn),
5020
+ He(Jt, Fr, _n, mn),
5021
5021
  { singleton: !0 }
5022
- ), Hv = je(
5022
+ ), $v = je(
5023
5023
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
5024
5024
  const r = V(0);
5025
5025
  return Oe(
@@ -5047,7 +5047,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5047
5047
  initialScrollTop: r
5048
5048
  };
5049
5049
  },
5050
- $e(mn, ft, _n),
5050
+ He(mn, ft, _n),
5051
5051
  { singleton: !0 }
5052
5052
  ), fu = je(
5053
5053
  ([{ scrollVelocity: e }]) => {
@@ -5066,23 +5066,23 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5066
5066
  return !0;
5067
5067
  return i;
5068
5068
  }),
5069
- He()
5069
+ $e()
5070
5070
  ),
5071
5071
  t
5072
5072
  ), Oe(
5073
- B(Ze(t, e, n), Se(r)),
5073
+ B(Je(t, e, n), Se(r)),
5074
5074
  ([[o, s, i], a]) => {
5075
5075
  o && a && a.change && a.change(s, i);
5076
5076
  }
5077
5077
  ), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
5078
5078
  },
5079
- $e(Br),
5079
+ He(Br),
5080
5080
  { singleton: !0 }
5081
5081
  ), Ki = je(([{ scrollContainerState: e, scrollTo: t }]) => {
5082
5082
  const n = Re(), r = Re(), o = Re(), s = V(!1), i = V(void 0);
5083
5083
  return ue(
5084
5084
  B(
5085
- Ze(n, r),
5085
+ Je(n, r),
5086
5086
  re(([{ scrollHeight: a, scrollTop: c, viewportHeight: u }, { offsetTop: d }]) => ({
5087
5087
  scrollHeight: a,
5088
5088
  scrollTop: Math.max(0, c - d),
@@ -5110,7 +5110,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5110
5110
  windowScrollTo: o,
5111
5111
  windowViewportRect: r
5112
5112
  };
5113
- }, $e(ft)), $v = je(
5113
+ }, He(ft)), Hv = je(
5114
5114
  ([
5115
5115
  { sizeRanges: e, sizes: t },
5116
5116
  { headerHeight: n, scrollTop: r },
@@ -5133,7 +5133,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5133
5133
  s,
5134
5134
  Se(d),
5135
5135
  pe(([, x]) => x !== void 0),
5136
- He(),
5136
+ $e(),
5137
5137
  re(([, x]) => x.ranges)
5138
5138
  ),
5139
5139
  e
@@ -5142,7 +5142,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5142
5142
  restoreStateFrom: d
5143
5143
  };
5144
5144
  },
5145
- $e(Zt, ft, Fr, mn, Ki)
5145
+ He(Jt, ft, Fr, mn, Ki)
5146
5146
  );
5147
5147
  function zv(e) {
5148
5148
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -5157,7 +5157,7 @@ const Uv = je(([{ topItemsIndexes: e }]) => {
5157
5157
  ),
5158
5158
  e
5159
5159
  ), { topItemCount: t };
5160
- }, $e(_n));
5160
+ }, He(_n));
5161
5161
  function hu(e) {
5162
5162
  let t = !1, n;
5163
5163
  return () => (t || (t = !0, n = e()), n);
@@ -5196,7 +5196,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5196
5196
  y && Wv() ? ye(e, w - b) : m(-b);
5197
5197
  }), Oe(
5198
5198
  B(
5199
- Ze(ct(s, !1), e, g),
5199
+ Je(ct(s, !1), e, g),
5200
5200
  pe(([b, w, y]) => !b && !y && w !== 0),
5201
5201
  re(([b, w]) => w),
5202
5202
  nn(1)
@@ -5240,7 +5240,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5240
5240
  }
5241
5241
  ), { deviation: e };
5242
5242
  },
5243
- $e(ft, Br, _n, Zt, pn, zi)
5243
+ He(ft, Br, _n, Jt, pn, zi)
5244
5244
  ), Gv = je(
5245
5245
  ([
5246
5246
  e,
@@ -5267,13 +5267,13 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5267
5267
  ...u,
5268
5268
  ...d
5269
5269
  }),
5270
- $e(
5270
+ He(
5271
5271
  Gi,
5272
5272
  Bv,
5273
5273
  mn,
5274
5274
  fu,
5275
5275
  cu,
5276
- Hv,
5276
+ $v,
5277
5277
  Mv,
5278
5278
  Ki,
5279
5279
  du,
@@ -5343,11 +5343,11 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5343
5343
  sizes: c,
5344
5344
  ...m
5345
5345
  }),
5346
- $e(
5347
- Zt,
5346
+ He(
5347
+ Jt,
5348
5348
  Fr,
5349
5349
  ft,
5350
- $v,
5350
+ Hv,
5351
5351
  Fv,
5352
5352
  _n,
5353
5353
  Lr,
@@ -5400,7 +5400,7 @@ function mu(e, t, n) {
5400
5400
  for (const E of i)
5401
5401
  E in y && Oe(S[E], y[E]);
5402
5402
  return () => {
5403
- Object.values(S).map(Hi);
5403
+ Object.values(S).map($i);
5404
5404
  };
5405
5405
  }, [y, S, R]), Gr(() => {
5406
5406
  c(R, y);
@@ -5516,7 +5516,7 @@ const Xv = /* @__PURE__ */ je(() => {
5516
5516
  B(
5517
5517
  n,
5518
5518
  re((u) => u[a]),
5519
- He()
5519
+ $e()
5520
5520
  ),
5521
5521
  c
5522
5522
  );
@@ -5539,8 +5539,8 @@ const Xv = /* @__PURE__ */ je(() => {
5539
5539
  };
5540
5540
  }), qv = /* @__PURE__ */ je(
5541
5541
  ([e, t]) => ({ ...e, ...t }),
5542
- $e(pu, Xv)
5543
- ), Jv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Zv = { overflowAnchor: "none", position: Yi(), zIndex: 1 }, wu = { overflowAnchor: "none" }, Qv = { ...wu, display: "inline-block", height: "100%" }, Rl = /* @__PURE__ */ K.memo(function({ showTopList: e = !1 }) {
5542
+ He(pu, Xv)
5543
+ ), Zv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Jv = { overflowAnchor: "none", position: Yi(), zIndex: 1 }, wu = { overflowAnchor: "none" }, Qv = { ...wu, display: "inline-block", height: "100%" }, Rl = /* @__PURE__ */ K.memo(function({ showTopList: e = !1 }) {
5544
5544
  const t = xe("listState"), n = It("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = It("windowScrollContainerState"), i = It("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), h = xe("trackItemSizes"), p = xe("itemSize"), x = xe("log"), g = It("gap"), v = xe("horizontalDirection"), { callbackRef: m } = pv(
5545
5545
  n,
5546
5546
  p,
@@ -5555,7 +5555,7 @@ const Xv = /* @__PURE__ */ je(() => {
5555
5555
  qi("deviation", (N) => {
5556
5556
  b !== N && w(N);
5557
5557
  });
5558
- const y = xe("EmptyPlaceholder"), R = xe("ScrollSeekPlaceholder") || Jv, S = xe("ListComponent"), C = xe("ItemComponent"), E = xe("GroupComponent"), I = xe("computeItemKey"), A = xe("isSeeking"), k = xe("groupIndices").length > 0, M = xe("alignToBottom"), W = xe("initialItemFinalLocationReached"), G = e ? {} : {
5558
+ const y = xe("EmptyPlaceholder"), R = xe("ScrollSeekPlaceholder") || Zv, S = xe("ListComponent"), C = xe("ItemComponent"), E = xe("GroupComponent"), I = xe("computeItemKey"), A = xe("isSeeking"), k = xe("groupIndices").length > 0, M = xe("alignToBottom"), W = xe("initialItemFinalLocationReached"), G = e ? {} : {
5559
5559
  boxSizing: "border-box",
5560
5560
  ...v ? {
5561
5561
  display: "inline-block",
@@ -5579,7 +5579,7 @@ const Xv = /* @__PURE__ */ je(() => {
5579
5579
  ref: m,
5580
5580
  style: G,
5581
5581
  children: (e ? t.topItems : t.items).map((N) => {
5582
- const $ = N.originalIndex, L = I($ + t.firstItemIndex, N.data, u);
5582
+ const H = N.originalIndex, L = I(H + t.firstItemIndex, N.data, u);
5583
5583
  return A ? /* @__PURE__ */ to(
5584
5584
  R,
5585
5585
  {
@@ -5594,11 +5594,11 @@ const Xv = /* @__PURE__ */ je(() => {
5594
5594
  E,
5595
5595
  {
5596
5596
  ...lt(E, u),
5597
- "data-index": $,
5597
+ "data-index": H,
5598
5598
  "data-item-index": N.index,
5599
5599
  "data-known-size": N.size,
5600
5600
  key: L,
5601
- style: Zv
5601
+ style: Jv
5602
5602
  },
5603
5603
  d(N.index, u)
5604
5604
  ) : /* @__PURE__ */ to(
@@ -5606,7 +5606,7 @@ const Xv = /* @__PURE__ */ je(() => {
5606
5606
  {
5607
5607
  ...lt(C, u),
5608
5608
  ...rx(C, N.data),
5609
- "data-index": $,
5609
+ "data-index": H,
5610
5610
  "data-item-group-index": N.groupIndex,
5611
5611
  "data-item-index": N.index,
5612
5612
  "data-known-size": N.size,
@@ -5829,7 +5829,7 @@ const ix = ({ children: e }) => {
5829
5829
  B(
5830
5830
  s,
5831
5831
  re((h) => h[u]),
5832
- He()
5832
+ $e()
5833
5833
  ),
5834
5834
  d
5835
5835
  );
@@ -5854,7 +5854,7 @@ const ix = ({ children: e }) => {
5854
5854
  GroupComponent: c("Group", "tr")
5855
5855
  };
5856
5856
  });
5857
- $e(pu, px);
5857
+ He(pu, px);
5858
5858
  Yi();
5859
5859
  const Il = {
5860
5860
  bottom: 0,
@@ -5898,20 +5898,20 @@ const xx = /* @__PURE__ */ je(
5898
5898
  { customScrollParent: m, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: R },
5899
5899
  S
5900
5900
  ]) => {
5901
- const C = V(0), E = V(0), I = V(Il), A = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Re(), W = Re(), G = V(0), N = V(null), $ = V({ column: 0, row: 0 }), L = Re(), X = Re(), O = V(!1), _ = V(0), z = V(!0), q = V(!1), oe = V(!1);
5901
+ const C = V(0), E = V(0), I = V(Il), A = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Re(), W = Re(), G = V(0), N = V(null), H = V({ column: 0, row: 0 }), L = Re(), X = Re(), O = V(!1), _ = V(0), z = V(!0), q = V(!1), oe = V(!1);
5902
5902
  Oe(
5903
5903
  B(
5904
5904
  g,
5905
5905
  Se(_),
5906
- pe(([P, Z]) => !!Z)
5906
+ pe(([P, J]) => !!J)
5907
5907
  ),
5908
5908
  () => {
5909
5909
  ye(z, !1);
5910
5910
  }
5911
5911
  ), Oe(
5912
5912
  B(
5913
- Ze(g, z, k, A, _, q),
5914
- pe(([P, Z, ne, le, , ie]) => P && !Z && ne.height !== 0 && le.height !== 0 && !ie)
5913
+ Je(g, z, k, A, _, q),
5914
+ pe(([P, J, ne, le, , ie]) => P && !J && ne.height !== 0 && le.height !== 0 && !ie)
5915
5915
  ),
5916
5916
  ([, , , , P]) => {
5917
5917
  ye(q, !0), Wi(1, () => {
@@ -5934,7 +5934,7 @@ const xx = /* @__PURE__ */ je(
5934
5934
  pe(([, P]) => P != null)
5935
5935
  ),
5936
5936
  ([, P]) => {
5937
- P && (ye(A, P.viewport), ye(k, P.item), ye($, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (Z) => {
5937
+ P && (ye(A, P.viewport), ye(k, P.item), ye(H, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (J) => {
5938
5938
  ye(O, !1);
5939
5939
  }), ye(c, { top: P.scrollTop })));
5940
5940
  }
@@ -5946,15 +5946,15 @@ const xx = /* @__PURE__ */ je(
5946
5946
  h
5947
5947
  ), ue(
5948
5948
  B(
5949
- Ze(
5949
+ Je(
5950
5950
  he(A, Kr),
5951
5951
  he(k, Kr),
5952
- he($, (P, Z) => P && P.column === Z.column && P.row === Z.row),
5952
+ he(H, (P, J) => P && P.column === J.column && P.row === J.row),
5953
5953
  he(u)
5954
5954
  ),
5955
- re(([P, Z, ne, le]) => ({
5955
+ re(([P, J, ne, le]) => ({
5956
5956
  gap: ne,
5957
- item: Z,
5957
+ item: J,
5958
5958
  scrollTop: le,
5959
5959
  viewport: P
5960
5960
  }))
@@ -5962,10 +5962,10 @@ const xx = /* @__PURE__ */ je(
5962
5962
  L
5963
5963
  ), ue(
5964
5964
  B(
5965
- Ze(
5965
+ Je(
5966
5966
  he(C),
5967
5967
  r,
5968
- he($, vx),
5968
+ he(H, vx),
5969
5969
  he(k, Kr),
5970
5970
  he(A, Kr),
5971
5971
  he(N),
@@ -5978,7 +5978,7 @@ const xx = /* @__PURE__ */ je(
5978
5978
  re(
5979
5979
  ([
5980
5980
  P,
5981
- [Z, ne],
5981
+ [J, ne],
5982
5982
  le,
5983
5983
  ie,
5984
5984
  Pe,
@@ -5988,7 +5988,7 @@ const xx = /* @__PURE__ */ je(
5988
5988
  ce,
5989
5989
  Ae
5990
5990
  ]) => {
5991
- const { column: ve, row: H } = le, { height: ae, width: Be } = ie, { width: nt } = Pe;
5991
+ const { column: ve, row: $ } = le, { height: ae, width: Be } = ie, { width: nt } = Pe;
5992
5992
  if (Le === 0 && (P === 0 || nt === 0))
5993
5993
  return Il;
5994
5994
  if (Be === 0) {
@@ -5997,8 +5997,8 @@ const xx = /* @__PURE__ */ je(
5997
5997
  }
5998
5998
  const ut = Cu(nt, Be, ve);
5999
5999
  let rt, Qe;
6000
- ce ? Z === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((Z + H) / (ae + H)), Qe = ut * Nl((ne + H) / (ae + H)) - 1, Qe = Ms(P - 1, vr(Qe, ut - 1)), rt = Ms(Qe, vr(0, rt))) : (rt = 0, Qe = -1);
6001
- const Tt = Al(rt, Qe, Fe), { bottom: We, top: st } = kl(Pe, le, ie, Tt), Ge = Nl(P / ut), it = Ge * ae + (Ge - 1) * H - We;
6000
+ ce ? J === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((J + $) / (ae + $)), Qe = ut * Nl((ne + $) / (ae + $)) - 1, Qe = Ms(P - 1, vr(Qe, ut - 1)), rt = Ms(Qe, vr(0, rt))) : (rt = 0, Qe = -1);
6001
+ const Tt = Al(rt, Qe, Fe), { bottom: We, top: st } = kl(Pe, le, ie, Tt), Ge = Nl(P / ut), it = Ge * ae + (Ge - 1) * $ - We;
6002
6002
  return { bottom: We, itemHeight: ae, items: Tt, itemWidth: Be, offsetBottom: it, offsetTop: st, top: st };
6003
6003
  }
6004
6004
  )
@@ -6013,13 +6013,13 @@ const xx = /* @__PURE__ */ je(
6013
6013
  C
6014
6014
  ), ue(
6015
6015
  B(
6016
- Ze(A, k, I, $),
6017
- pe(([P, Z, { items: ne }]) => ne.length > 0 && Z.height !== 0 && P.height !== 0),
6018
- re(([P, Z, { items: ne }, le]) => {
6019
- const { bottom: ie, top: Pe } = kl(P, le, Z, ne);
6016
+ Je(A, k, I, H),
6017
+ pe(([P, J, { items: ne }]) => ne.length > 0 && J.height !== 0 && P.height !== 0),
6018
+ re(([P, J, { items: ne }, le]) => {
6019
+ const { bottom: ie, top: Pe } = kl(P, le, J, ne);
6020
6020
  return [Pe, ie];
6021
6021
  }),
6022
- He(Cr)
6022
+ $e(Cr)
6023
6023
  ),
6024
6024
  t
6025
6025
  );
@@ -6028,52 +6028,52 @@ const xx = /* @__PURE__ */ je(
6028
6028
  B(
6029
6029
  u,
6030
6030
  Se(F),
6031
- re(([P, Z]) => Z || P !== 0)
6031
+ re(([P, J]) => J || P !== 0)
6032
6032
  ),
6033
6033
  F
6034
6034
  );
6035
6035
  const Q = St(
6036
6036
  B(
6037
- Ze(I, C),
6037
+ Je(I, C),
6038
6038
  pe(([{ items: P }]) => P.length > 0),
6039
6039
  Se(F),
6040
- pe(([[P, Z], ne]) => {
6041
- const le = P.items[P.items.length - 1].index === Z - 1;
6042
- return (ne || P.bottom > 0 && P.itemHeight > 0 && P.offsetBottom === 0 && P.items.length === Z) && le;
6040
+ pe(([[P, J], ne]) => {
6041
+ const le = P.items[P.items.length - 1].index === J - 1;
6042
+ return (ne || P.bottom > 0 && P.itemHeight > 0 && P.offsetBottom === 0 && P.items.length === J) && le;
6043
6043
  }),
6044
6044
  re(([[, P]]) => P - 1),
6045
- He()
6045
+ $e()
6046
6046
  )
6047
6047
  ), de = St(
6048
6048
  B(
6049
6049
  he(I),
6050
6050
  pe(({ items: P }) => P.length > 0 && P[0].index === 0),
6051
6051
  Gt(0),
6052
- He()
6052
+ $e()
6053
6053
  )
6054
6054
  ), be = St(
6055
6055
  B(
6056
6056
  he(I),
6057
6057
  Se(O),
6058
- pe(([{ items: P }, Z]) => P.length > 0 && !Z),
6058
+ pe(([{ items: P }, J]) => P.length > 0 && !J),
6059
6059
  re(([{ items: P }]) => ({
6060
6060
  endIndex: P[P.length - 1].index,
6061
6061
  startIndex: P[0].index
6062
6062
  })),
6063
- He(tu),
6063
+ $e(tu),
6064
6064
  nn(0)
6065
6065
  )
6066
6066
  );
6067
6067
  ue(be, x.scrollSeekRangeChanged), ue(
6068
6068
  B(
6069
6069
  M,
6070
- Se(A, k, C, $),
6071
- re(([P, Z, ne, le, ie]) => {
6070
+ Se(A, k, C, H),
6071
+ re(([P, J, ne, le, ie]) => {
6072
6072
  const Pe = iu(P), { align: Fe, behavior: Le, offset: ce } = Pe;
6073
6073
  let Ae = Pe.index;
6074
6074
  Ae === "LAST" && (Ae = le - 1), Ae = vr(0, Ae, Ms(le - 1, Ae));
6075
- let ve = di(Z, ie, ne, Ae);
6076
- return Fe === "end" ? ve = jl(ve - Z.height + ne.height) : Fe === "center" && (ve = jl(ve - Z.height / 2 + ne.height / 2)), ce && (ve += ce), { behavior: Le, top: ve };
6075
+ let ve = di(J, ie, ne, Ae);
6076
+ return Fe === "end" ? ve = jl(ve - J.height + ne.height) : Fe === "center" && (ve = jl(ve - J.height / 2 + ne.height / 2)), ce && (ve += ce), { behavior: Le, top: ve };
6077
6077
  })
6078
6078
  ),
6079
6079
  c
@@ -6097,7 +6097,7 @@ const xx = /* @__PURE__ */ je(
6097
6097
  data: N,
6098
6098
  deviation: G,
6099
6099
  footerHeight: o,
6100
- gap: $,
6100
+ gap: H,
6101
6101
  headerHeight: s,
6102
6102
  increaseViewportBy: e,
6103
6103
  initialItemCount: E,
@@ -6133,7 +6133,7 @@ const xx = /* @__PURE__ */ je(
6133
6133
  ...S
6134
6134
  };
6135
6135
  },
6136
- $e(Gi, ft, Br, fu, mn, Ki, pn)
6136
+ He(Gi, ft, Br, fu, mn, Ki, pn)
6137
6137
  );
6138
6138
  function Cu(e, t, n) {
6139
6139
  return vr(1, Io((e + n) / (Io(t) + n)));
@@ -6154,7 +6154,7 @@ const bx = /* @__PURE__ */ je(() => {
6154
6154
  B(
6155
6155
  t,
6156
6156
  re((x) => x[h]),
6157
- He()
6157
+ $e()
6158
6158
  ),
6159
6159
  p
6160
6160
  ), u = V(!1), d = V(!1);
@@ -6178,7 +6178,7 @@ const bx = /* @__PURE__ */ je(() => {
6178
6178
  };
6179
6179
  }), wx = /* @__PURE__ */ je(
6180
6180
  ([e, t]) => ({ ...e, ...t }),
6181
- $e(xx, bx)
6181
+ He(xx, bx)
6182
6182
  ), yx = /* @__PURE__ */ K.memo(function() {
6183
6183
  const e = ze("gridState"), t = ze("listClassName"), n = ze("itemClassName"), r = ze("itemContent"), o = ze("computeItemKey"), s = ze("isSeeking"), i = Nt("scrollHeight"), a = ze("ItemComponent"), c = ze("ListComponent"), u = ze("ScrollSeekPlaceholder"), d = ze("context"), h = Nt("itemDimensions"), p = Nt("gap"), x = ze("log"), g = ze("stateRestoreInProgress"), v = Nt("reportReadyState"), m = Pn(
6184
6184
  K.useMemo(
@@ -6625,7 +6625,7 @@ function _l(e, t) {
6625
6625
  return e(t);
6626
6626
  e != null && (e.current = t);
6627
6627
  }
6628
- function Ji(...e) {
6628
+ function Zi(...e) {
6629
6629
  return (t) => {
6630
6630
  let n = !1;
6631
6631
  const r = e.map((o) => {
@@ -6642,7 +6642,7 @@ function Ji(...e) {
6642
6642
  };
6643
6643
  }
6644
6644
  function Te(...e) {
6645
- return f.useCallback(Ji(...e), e);
6645
+ return f.useCallback(Zi(...e), e);
6646
6646
  }
6647
6647
  var Fx = [
6648
6648
  "a",
@@ -6676,11 +6676,11 @@ function Bx(e, t) {
6676
6676
  return f.useReducer((n, r) => t[n][r] ?? n, e);
6677
6677
  }
6678
6678
  var vt = (e) => {
6679
- const { present: t, children: n } = e, r = Hx(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = Te(r.ref, $x(o));
6679
+ const { present: t, children: n } = e, r = $x(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = Te(r.ref, Hx(o));
6680
6680
  return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: s }) : null;
6681
6681
  };
6682
6682
  vt.displayName = "Presence";
6683
- function Hx(e) {
6683
+ function $x(e) {
6684
6684
  const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), s = f.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = Bx(i, {
6685
6685
  mounted: {
6686
6686
  UNMOUNT: "unmounted",
@@ -6732,7 +6732,7 @@ function Hx(e) {
6732
6732
  function Yr(e) {
6733
6733
  return (e == null ? void 0 : e.animationName) || "none";
6734
6734
  }
6735
- function $x(e) {
6735
+ function Hx(e) {
6736
6736
  var r, o;
6737
6737
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
6738
6738
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
@@ -6745,7 +6745,7 @@ function Ft(e) {
6745
6745
  n((r) => r ?? String(Ux++));
6746
6746
  }, [e]), e || (t ? `radix-${t}` : "");
6747
6747
  }
6748
- var qo = "Collapsible", [Wx, eE] = Ut(qo), [Vx, Zi] = Wx(qo), Nu = f.forwardRef(
6748
+ var qo = "Collapsible", [Wx, eE] = Ut(qo), [Vx, Ji] = Wx(qo), Nu = f.forwardRef(
6749
6749
  (e, t) => {
6750
6750
  const {
6751
6751
  __scopeCollapsible: n,
@@ -6784,7 +6784,7 @@ var qo = "Collapsible", [Wx, eE] = Ut(qo), [Vx, Zi] = Wx(qo), Nu = f.forwardRef(
6784
6784
  Nu.displayName = qo;
6785
6785
  var ju = "CollapsibleTrigger", Au = f.forwardRef(
6786
6786
  (e, t) => {
6787
- const { __scopeCollapsible: n, ...r } = e, o = Zi(ju, n);
6787
+ const { __scopeCollapsible: n, ...r } = e, o = Ji(ju, n);
6788
6788
  return /* @__PURE__ */ l.jsx(
6789
6789
  me.button,
6790
6790
  {
@@ -6804,13 +6804,13 @@ var ju = "CollapsibleTrigger", Au = f.forwardRef(
6804
6804
  Au.displayName = ju;
6805
6805
  var Qi = "CollapsibleContent", Gx = f.forwardRef(
6806
6806
  (e, t) => {
6807
- const { forceMount: n, ...r } = e, o = Zi(Qi, e.__scopeCollapsible);
6807
+ const { forceMount: n, ...r } = e, o = Ji(Qi, e.__scopeCollapsible);
6808
6808
  return /* @__PURE__ */ l.jsx(vt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(Kx, { ...r, ref: t, present: s }) });
6809
6809
  }
6810
6810
  );
6811
6811
  Gx.displayName = Qi;
6812
6812
  var Kx = f.forwardRef((e, t) => {
6813
- const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = Zi(Qi, n), [a, c] = f.useState(r), u = f.useRef(null), d = Te(t, u), h = f.useRef(0), p = h.current, x = f.useRef(0), g = x.current, v = i.open || a, m = f.useRef(v), b = f.useRef(void 0);
6813
+ const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = Ji(Qi, n), [a, c] = f.useState(r), u = f.useRef(null), d = Te(t, u), h = f.useRef(0), p = h.current, x = f.useRef(0), g = x.current, v = i.open || a, m = f.useRef(v), b = f.useRef(void 0);
6814
6814
  return f.useEffect(() => {
6815
6815
  const w = requestAnimationFrame(() => m.current = !1);
6816
6816
  return () => cancelAnimationFrame(w);
@@ -6846,7 +6846,7 @@ function ea(e) {
6846
6846
  return e ? "open" : "closed";
6847
6847
  }
6848
6848
  var Yx = Nu;
6849
- const Ol = Yx, Ml = Au, ku = new URL("data:video/mp2t;base64,aW1wb3J0IHsgcGFyc2UgfSBmcm9tICdtYXJrZWQnOwoKY29uc29sZS5sb2coJ1tNYXJrZG93bldvcmtlcl0gd29ya2VyIHNjcmlwdCBsb2FkZWQnKTsKLy8gU2lnbmFsIHRvIHRoZSBtYWluIHRocmVhZCB0aGF0IHRoZSB3b3JrZXIgaXMgcmVhZHkgdG8gcmVjZWl2ZSB3b3JrLgovLyBUaGlzIGhlbHBzIGNhbGxlcnMgYXZvaWQgcG9zdGluZyBtZXNzYWdlcyBiZWZvcmUgdGhlIHdvcmtlciBoYXMgZmluaXNoZWQgaW5pdGlhbGl6aW5nLgo7KHNlbGYgYXMgYW55KS5wb3N0TWVzc2FnZT8uKHsgX193b3JrZXJfcmVhZHk6IHRydWUgfSk7CgpzZWxmLmFkZEV2ZW50TGlzdGVuZXIoJ21lc3NhZ2UnLCAoZXY6IE1lc3NhZ2VFdmVudCkgPT4gewogIGNvbnN0IHsgaWQsIHNvdXJjZSB9ID0gZXYuZGF0YSBhcyB7IGlkOiBzdHJpbmc7IHNvdXJjZTogc3RyaW5nIH07CiAgdHJ5IHsKICAgIGNvbnNvbGUubG9nKCdbTWFya2Rvd25Xb3JrZXJdIHJlY2VpdmVkIHdvcmsnLCBpZCwgJ3NvdXJjZUxlbicsIHNvdXJjZT8ubGVuZ3RoID8/IDApOwogICAgY29uc3QgaHRtbCA9IHBhcnNlKHNvdXJjZSk7CiAgICBjb25zb2xlLmxvZygnW01hcmtkb3duV29ya2VyXSBwYXJzZWQgaHRtbCBsZW5ndGgnLCBodG1sPy5sZW5ndGggPz8gMCwgJ2ZvcicsIGlkKTsKICAgIC8vIFJldHVybiB0aGUgZ2VuZXJhdGVkIEhUTUwgZm9yIHRoZSBjYWxsZXIgdG8gY2FjaGUgYW5kIHJlbmRlcgogICAgLy8gS2VlcCB0aGUgcGF5bG9hZCBzbWFsbDogc2VuZCBpZCArIGh0bWwKICAgIC8vIE1hcmtlZCBvdXRwdXQgc2hvdWxkIGJlIHNhZmUtZW5vdWdoIGZvciBpbnRlcm5hbCBVSXM7IGNhbGxlcnMgbWF5IGZ1cnRoZXIgc2FuaXRpemUgaWYgcmVxdWlyZWQuCiAgICAoc2VsZiBhcyBhbnkpLnBvc3RNZXNzYWdlKHsgaWQsIGh0bWwgfSk7CiAgfSBjYXRjaCAoZXJyKSB7CiAgICBjb25zb2xlLmVycm9yKCdbTWFya2Rvd25Xb3JrZXJdIHJlbmRlciBlcnJvcicsIGVycik7CiAgICAoc2VsZiBhcyBhbnkpLnBvc3RNZXNzYWdlKHsgaWQsIGh0bWw6IGA8cHJlPkVycm9yIHJlbmRlcmluZyBtYXJrZG93bjogJHtTdHJpbmcoZXJyKX08L3ByZT5gIH0pOwogIH0KfSk7Cg==", import.meta.url), lo = ku.toString();
6849
+ const Ol = Yx, Ml = Au, ku = new URL("data:video/mp2t;base64,aW1wb3J0IHsgcGFyc2UgfSBmcm9tICdtYXJrZWQnOwoKY29uc3Qgc2NvcGU6IGFueSA9IHNlbGY7Cgpjb25zb2xlLmxvZygnW01hcmtkb3duV29ya2VyXSB3b3JrZXIgc2NyaXB0IGxvYWRlZCcpOwovLyBTaWduYWwgdG8gdGhlIG1haW4gdGhyZWFkIHRoYXQgdGhlIHdvcmtlciBpcyByZWFkeSB0byByZWNlaXZlIHdvcmsuCi8vIFRoaXMgaGVscHMgY2FsbGVycyBhdm9pZCBwb3N0aW5nIG1lc3NhZ2VzIGJlZm9yZSB0aGUgd29ya2VyIGhhcyBmaW5pc2hlZCBpbml0aWFsaXppbmcuCnNjb3BlLnBvc3RNZXNzYWdlPy4oeyBfX3dvcmtlcl9yZWFkeTogdHJ1ZSB9KTsKCnNjb3BlLmFkZEV2ZW50TGlzdGVuZXIoJ21lc3NhZ2UnLCAoZXZlbnQ6IE1lc3NhZ2VFdmVudCkgPT4gewogIGNvbnN0IHBheWxvYWQ6IGFueSA9IGV2ZW50Py5kYXRhID8/IHt9OwogIGNvbnN0IGlkID0gdHlwZW9mIHBheWxvYWQuaWQgPT09ICdzdHJpbmcnID8gcGF5bG9hZC5pZCA6IHVuZGVmaW5lZDsKICBjb25zdCBzb3VyY2UgPSB0eXBlb2YgcGF5bG9hZC5zb3VyY2UgPT09ICdzdHJpbmcnID8gcGF5bG9hZC5zb3VyY2UgOiB1bmRlZmluZWQ7CiAgaWYgKCFpZCB8fCB0eXBlb2Ygc291cmNlICE9PSAnc3RyaW5nJykgewogICAgcmV0dXJuOwogIH0KICB0cnkgewogICAgY29uc29sZS5sb2coJ1tNYXJrZG93bldvcmtlcl0gcmVjZWl2ZWQgd29yaycsIGlkLCAnc291cmNlTGVuJywgc291cmNlPy5sZW5ndGggPz8gMCk7CiAgICBjb25zdCBodG1sID0gcGFyc2Uoc291cmNlKTsKICAgIGNvbnNvbGUubG9nKCdbTWFya2Rvd25Xb3JrZXJdIHBhcnNlZCBodG1sIGxlbmd0aCcsIGh0bWw/Lmxlbmd0aCA/PyAwLCAnZm9yJywgaWQpOwogICAgLy8gUmV0dXJuIHRoZSBnZW5lcmF0ZWQgSFRNTCBmb3IgdGhlIGNhbGxlciB0byBjYWNoZSBhbmQgcmVuZGVyCiAgICAvLyBLZWVwIHRoZSBwYXlsb2FkIHNtYWxsOiBzZW5kIGlkICsgaHRtbAogICAgLy8gTWFya2VkIG91dHB1dCBzaG91bGQgYmUgc2FmZS1lbm91Z2ggZm9yIGludGVybmFsIFVJczsgY2FsbGVycyBtYXkgZnVydGhlciBzYW5pdGl6ZSBpZiByZXF1aXJlZC4KICAgIHNjb3BlLnBvc3RNZXNzYWdlKHsgaWQsIGh0bWwgfSk7CiAgfSBjYXRjaCAoZXJyKSB7CiAgICBjb25zb2xlLmVycm9yKCdbTWFya2Rvd25Xb3JrZXJdIHJlbmRlciBlcnJvcicsIGVycik7CiAgICBzY29wZS5wb3N0TWVzc2FnZSh7IGlkLCBodG1sOiBgPHByZT5FcnJvciByZW5kZXJpbmcgbWFya2Rvd246ICR7U3RyaW5nKGVycil9PC9wcmU+YCB9KTsKICB9Cn0pOwo=", import.meta.url), lo = ku.toString();
6850
6850
  console.log("[MarkdownContent] worker url", lo);
6851
6851
  const fi = [];
6852
6852
  let hi = !1;
@@ -6950,12 +6950,12 @@ async function qx(e) {
6950
6950
  }
6951
6951
  })();
6952
6952
  const fr = /* @__PURE__ */ new Map();
6953
- function Jx(e) {
6953
+ function Zx(e) {
6954
6954
  const t = e.slice(0, 64), n = e.length > 64 ? e.slice(-64) : "";
6955
6955
  return `${e.length}:${t}:${n}`;
6956
6956
  }
6957
6957
  function Xr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx("div", { "aria-busy": !0, children: "Rendering…" }) }) {
6958
- const r = Jx(e), [o, s] = fe(() => fr.get(r) ?? null);
6958
+ const r = Zx(e), [o, s] = fe(() => fr.get(r) ?? null);
6959
6959
  Ve(() => {
6960
6960
  if (fr.has(r)) {
6961
6961
  const g = fr.get(r) ?? null;
@@ -7048,7 +7048,7 @@ async function _u(e, t) {
7048
7048
  async function Ll(e, t) {
7049
7049
  return await (await _u(`/chat/files/${e}/view`, t)).text();
7050
7050
  }
7051
- async function Zx(e, t) {
7051
+ async function Jx(e, t) {
7052
7052
  const n = await _u(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
7053
7053
  let o = `file_${e}`;
7054
7054
  try {
@@ -7172,7 +7172,7 @@ var sb = "DismissableLayer", mi = "dismissableLayer.update", ib = "dismissableLa
7172
7172
  layers: /* @__PURE__ */ new Set(),
7173
7173
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
7174
7174
  branches: /* @__PURE__ */ new Set()
7175
- }), Hr = f.forwardRef(
7175
+ }), $r = f.forwardRef(
7176
7176
  (e, t) => {
7177
7177
  const {
7178
7178
  disableOutsidePointerEvents: n = !1,
@@ -7193,11 +7193,11 @@ var sb = "DismissableLayer", mi = "dismissableLayer.update", ib = "dismissableLa
7193
7193
  w === u.layers.size - 1 && (r == null || r(E), !E.defaultPrevented && a && (E.preventDefault(), a()));
7194
7194
  }, p), f.useEffect(() => {
7195
7195
  if (d)
7196
- return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Bl = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), Hl(), () => {
7196
+ return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Bl = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), $l(), () => {
7197
7197
  n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Bl);
7198
7198
  };
7199
7199
  }, [d, p, n, u]), f.useEffect(() => () => {
7200
- d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), Hl());
7200
+ d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), $l());
7201
7201
  }, [d, u]), f.useEffect(() => {
7202
7202
  const E = () => x({});
7203
7203
  return document.addEventListener(mi, E), () => document.removeEventListener(mi, E);
@@ -7220,7 +7220,7 @@ var sb = "DismissableLayer", mi = "dismissableLayer.update", ib = "dismissableLa
7220
7220
  );
7221
7221
  }
7222
7222
  );
7223
- Hr.displayName = sb;
7223
+ $r.displayName = sb;
7224
7224
  var lb = "DismissableLayerBranch", cb = f.forwardRef((e, t) => {
7225
7225
  const n = f.useContext(Ou), r = f.useRef(null), o = Te(t, r);
7226
7226
  return f.useEffect(() => {
@@ -7276,7 +7276,7 @@ function db(e, t = globalThis == null ? void 0 : globalThis.document) {
7276
7276
  onBlurCapture: () => r.current = !1
7277
7277
  };
7278
7278
  }
7279
- function Hl() {
7279
+ function $l() {
7280
7280
  const e = new CustomEvent(mi);
7281
7281
  document.dispatchEvent(e);
7282
7282
  }
@@ -7284,7 +7284,7 @@ function Mu(e, t, n, { discrete: r }) {
7284
7284
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
7285
7285
  t && o.addEventListener(e, t, { once: !0 }), r ? Iu(o, s) : o.dispatchEvent(s);
7286
7286
  }
7287
- var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l = { bubbles: !1, cancelable: !0 }, fb = "FocusScope", Jo = f.forwardRef((e, t) => {
7287
+ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", Hl = { bubbles: !1, cancelable: !0 }, fb = "FocusScope", Zo = f.forwardRef((e, t) => {
7288
7288
  const {
7289
7289
  loop: n = !1,
7290
7290
  trapped: r = !1,
@@ -7326,12 +7326,12 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l
7326
7326
  Ul.add(x);
7327
7327
  const v = document.activeElement;
7328
7328
  if (!a.contains(v)) {
7329
- const b = new CustomEvent(Fs, $l);
7329
+ const b = new CustomEvent(Fs, Hl);
7330
7330
  a.addEventListener(Fs, u), a.dispatchEvent(b), b.defaultPrevented || (hb(xb(Du(a)), { select: !0 }), document.activeElement === v && sn(a));
7331
7331
  }
7332
7332
  return () => {
7333
7333
  a.removeEventListener(Fs, u), setTimeout(() => {
7334
- const b = new CustomEvent(Bs, $l);
7334
+ const b = new CustomEvent(Bs, Hl);
7335
7335
  a.addEventListener(Bs, d), a.dispatchEvent(b), b.defaultPrevented || sn(v ?? document.body, { select: !0 }), a.removeEventListener(Bs, d), Ul.remove(x);
7336
7336
  }, 0);
7337
7337
  };
@@ -7350,7 +7350,7 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l
7350
7350
  );
7351
7351
  return /* @__PURE__ */ l.jsx(me.div, { tabIndex: -1, ...i, ref: p, onKeyDown: g });
7352
7352
  });
7353
- Jo.displayName = fb;
7353
+ Zo.displayName = fb;
7354
7354
  function hb(e, { select: t = !1 } = {}) {
7355
7355
  const n = document.activeElement;
7356
7356
  for (const r of e)
@@ -7413,20 +7413,20 @@ function Wl(e, t) {
7413
7413
  function xb(e) {
7414
7414
  return e.filter((t) => t.tagName !== "A");
7415
7415
  }
7416
- var bb = "Portal", Zo = f.forwardRef((e, t) => {
7416
+ var bb = "Portal", Jo = f.forwardRef((e, t) => {
7417
7417
  var a;
7418
7418
  const { container: n, ...r } = e, [o, s] = f.useState(!1);
7419
7419
  tt(() => s(!0), []);
7420
7420
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
7421
7421
  return i ? xc.createPortal(/* @__PURE__ */ l.jsx(me.div, { ...r, ref: t }), i) : null;
7422
7422
  });
7423
- Zo.displayName = bb;
7424
- var Hs = 0;
7423
+ Jo.displayName = bb;
7424
+ var $s = 0;
7425
7425
  function na() {
7426
7426
  f.useEffect(() => {
7427
7427
  const e = document.querySelectorAll("[data-radix-focus-guard]");
7428
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Vl()), document.body.insertAdjacentElement("beforeend", e[1] ?? Vl()), Hs++, () => {
7429
- Hs === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Hs--;
7428
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Vl()), document.body.insertAdjacentElement("beforeend", e[1] ?? Vl()), $s++, () => {
7429
+ $s === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), $s--;
7430
7430
  };
7431
7431
  }, []);
7432
7432
  }
@@ -7457,7 +7457,7 @@ function wb(e, t, n) {
7457
7457
  return e.concat(s || Array.prototype.slice.call(t));
7458
7458
  }
7459
7459
  var fo = "right-scroll-bar-position", ho = "width-before-scroll-bar", yb = "with-scroll-bars-hidden", Sb = "--removed-body-scroll-bar-size";
7460
- function $s(e, t) {
7460
+ function Hs(e, t) {
7461
7461
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
7462
7462
  }
7463
7463
  function Cb(e, t) {
@@ -7485,7 +7485,7 @@ var Tb = typeof window < "u" ? f.useLayoutEffect : f.useEffect, Gl = /* @__PURE_
7485
7485
  function Eb(e, t) {
7486
7486
  var n = Cb(null, function(r) {
7487
7487
  return e.forEach(function(o) {
7488
- return $s(o, r);
7488
+ return Hs(o, r);
7489
7489
  });
7490
7490
  });
7491
7491
  return Tb(function() {
@@ -7493,9 +7493,9 @@ function Eb(e, t) {
7493
7493
  if (r) {
7494
7494
  var o = new Set(r), s = new Set(e), i = n.current;
7495
7495
  o.forEach(function(a) {
7496
- s.has(a) || $s(a, null);
7496
+ s.has(a) || Hs(a, null);
7497
7497
  }), s.forEach(function(a) {
7498
- o.has(a) || $s(a, i);
7498
+ o.has(a) || Hs(a, i);
7499
7499
  });
7500
7500
  }
7501
7501
  Gl.set(n, e);
@@ -7638,7 +7638,7 @@ var Ob = function() {
7638
7638
  };
7639
7639
  }, [t && n]);
7640
7640
  };
7641
- }, Hu = function() {
7641
+ }, $u = function() {
7642
7642
  var e = Mb(), t = function(n) {
7643
7643
  var r = n.styles, o = n.dynamic;
7644
7644
  return e(r, o), null;
@@ -7664,7 +7664,7 @@ var Ob = function() {
7664
7664
  right: t[2],
7665
7665
  gap: Math.max(0, r - n + t[2] - t[0])
7666
7666
  };
7667
- }, Bb = Hu(), Gn = "data-scroll-locked", Hb = function(e, t, n, r) {
7667
+ }, Bb = $u(), Gn = "data-scroll-locked", $b = function(e, t, n, r) {
7668
7668
  var o = e.left, s = e.top, i = e.right, a = e.gap;
7669
7669
  return n === void 0 && (n = "margin"), `
7670
7670
  .`.concat(yb, ` {
@@ -7711,7 +7711,7 @@ var Ob = function() {
7711
7711
  }, Kl = function() {
7712
7712
  var e = parseInt(document.body.getAttribute(Gn) || "0", 10);
7713
7713
  return isFinite(e) ? e : 0;
7714
- }, $b = function() {
7714
+ }, Hb = function() {
7715
7715
  f.useEffect(function() {
7716
7716
  return document.body.setAttribute(Gn, (Kl() + 1).toString()), function() {
7717
7717
  var e = Kl() - 1;
@@ -7720,11 +7720,11 @@ var Ob = function() {
7720
7720
  }, []);
7721
7721
  }, zb = function(e) {
7722
7722
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
7723
- $b();
7723
+ Hb();
7724
7724
  var s = f.useMemo(function() {
7725
7725
  return Fb(o);
7726
7726
  }, [o]);
7727
- return f.createElement(Bb, { styles: Hb(s, !t, o, n ? "" : "!important") });
7727
+ return f.createElement(Bb, { styles: $b(s, !t, o, n ? "" : "!important") });
7728
7728
  }, gi = !1;
7729
7729
  if (typeof window < "u")
7730
7730
  try {
@@ -7739,7 +7739,7 @@ if (typeof window < "u")
7739
7739
  }
7740
7740
  var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7741
7741
  return e.tagName === "TEXTAREA";
7742
- }, $u = function(e, t) {
7742
+ }, Hu = function(e, t) {
7743
7743
  if (!(e instanceof Element))
7744
7744
  return !1;
7745
7745
  var n = window.getComputedStyle(e);
@@ -7749,9 +7749,9 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7749
7749
  !(n.overflowY === n.overflowX && !Ub(e) && n[t] === "visible")
7750
7750
  );
7751
7751
  }, Wb = function(e) {
7752
- return $u(e, "overflowY");
7752
+ return Hu(e, "overflowY");
7753
7753
  }, Vb = function(e) {
7754
- return $u(e, "overflowX");
7754
+ return Hu(e, "overflowX");
7755
7755
  }, Yl = function(e, t) {
7756
7756
  var n = t.ownerDocument, r = t;
7757
7757
  do {
@@ -7800,7 +7800,7 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7800
7800
  c && (t.contains(a) || t === a)
7801
7801
  );
7802
7802
  return (d && Math.abs(h) < 1 || !d && Math.abs(p) < 1) && (u = !0), u;
7803
- }, Jr = function(e) {
7803
+ }, Zr = function(e) {
7804
7804
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
7805
7805
  }, Xl = function(e) {
7806
7806
  return [e.deltaX, e.deltaY];
@@ -7808,14 +7808,14 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7808
7808
  return e && "current" in e ? e.current : e;
7809
7809
  }, qb = function(e, t) {
7810
7810
  return e[0] === t[0] && e[1] === t[1];
7811
- }, Jb = function(e) {
7811
+ }, Zb = function(e) {
7812
7812
  return `
7813
7813
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
7814
7814
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
7815
7815
  `);
7816
- }, Zb = 0, Hn = [];
7816
+ }, Jb = 0, $n = [];
7817
7817
  function Qb(e) {
7818
- var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Zb++)[0], s = f.useState(Hu)[0], i = f.useRef(e);
7818
+ var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Jb++)[0], s = f.useState($u)[0], i = f.useRef(e);
7819
7819
  f.useEffect(function() {
7820
7820
  i.current = e;
7821
7821
  }, [e]), f.useEffect(function() {
@@ -7834,7 +7834,7 @@ function Qb(e) {
7834
7834
  var a = f.useCallback(function(v, m) {
7835
7835
  if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
7836
7836
  return !i.current.allowPinchZoom;
7837
- var b = Jr(v), w = n.current, y = "deltaX" in v ? v.deltaX : w[0] - b[0], R = "deltaY" in v ? v.deltaY : w[1] - b[1], S, C = v.target, E = Math.abs(y) > Math.abs(R) ? "h" : "v";
7837
+ var b = Zr(v), w = n.current, y = "deltaX" in v ? v.deltaX : w[0] - b[0], R = "deltaY" in v ? v.deltaY : w[1] - b[1], S, C = v.target, E = Math.abs(y) > Math.abs(R) ? "h" : "v";
7838
7838
  if ("touches" in v && E === "h" && C.type === "range")
7839
7839
  return !1;
7840
7840
  var I = Yl(E, C);
@@ -7848,8 +7848,8 @@ function Qb(e) {
7848
7848
  return Xb(A, m, v, A === "h" ? y : R);
7849
7849
  }, []), c = f.useCallback(function(v) {
7850
7850
  var m = v;
7851
- if (!(!Hn.length || Hn[Hn.length - 1] !== s)) {
7852
- var b = "deltaY" in m ? Xl(m) : Jr(m), w = t.current.filter(function(S) {
7851
+ if (!(!$n.length || $n[$n.length - 1] !== s)) {
7852
+ var b = "deltaY" in m ? Xl(m) : Zr(m), w = t.current.filter(function(S) {
7853
7853
  return S.name === m.type && (S.target === m.target || m.target === S.shadowParent) && qb(S.delta, b);
7854
7854
  })[0];
7855
7855
  if (w && w.should) {
@@ -7871,19 +7871,19 @@ function Qb(e) {
7871
7871
  });
7872
7872
  }, 1);
7873
7873
  }, []), d = f.useCallback(function(v) {
7874
- n.current = Jr(v), r.current = void 0;
7874
+ n.current = Zr(v), r.current = void 0;
7875
7875
  }, []), h = f.useCallback(function(v) {
7876
7876
  u(v.type, Xl(v), v.target, a(v, e.lockRef.current));
7877
7877
  }, []), p = f.useCallback(function(v) {
7878
- u(v.type, Jr(v), v.target, a(v, e.lockRef.current));
7878
+ u(v.type, Zr(v), v.target, a(v, e.lockRef.current));
7879
7879
  }, []);
7880
7880
  f.useEffect(function() {
7881
- return Hn.push(s), e.setCallbacks({
7881
+ return $n.push(s), e.setCallbacks({
7882
7882
  onScrollCapture: h,
7883
7883
  onWheelCapture: h,
7884
7884
  onTouchMoveCapture: p
7885
7885
  }), document.addEventListener("wheel", c, Bn), document.addEventListener("touchmove", c, Bn), document.addEventListener("touchstart", d, Bn), function() {
7886
- Hn = Hn.filter(function(v) {
7886
+ $n = $n.filter(function(v) {
7887
7887
  return v !== s;
7888
7888
  }), document.removeEventListener("wheel", c, Bn), document.removeEventListener("touchmove", c, Bn), document.removeEventListener("touchstart", d, Bn);
7889
7889
  };
@@ -7892,7 +7892,7 @@ function Qb(e) {
7892
7892
  return f.createElement(
7893
7893
  f.Fragment,
7894
7894
  null,
7895
- g ? f.createElement(s, { styles: Jb(o) }) : null,
7895
+ g ? f.createElement(s, { styles: Zb(o) }) : null,
7896
7896
  x ? f.createElement(zb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
7897
7897
  );
7898
7898
  }
@@ -7911,7 +7911,7 @@ var nw = function(e) {
7911
7911
  return null;
7912
7912
  var t = Array.isArray(e) ? e[0] : e;
7913
7913
  return t.ownerDocument.body;
7914
- }, $n = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = {}, Ws = 0, Wu = function(e) {
7914
+ }, Hn = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Qr = {}, Ws = 0, Wu = function(e) {
7915
7915
  return e && (e.host || Wu(e.parentNode));
7916
7916
  }, rw = function(e, t) {
7917
7917
  return t.map(function(n) {
@@ -7935,8 +7935,8 @@ var nw = function(e) {
7935
7935
  d(p);
7936
7936
  else
7937
7937
  try {
7938
- var x = p.getAttribute(r), g = x !== null && x !== "false", v = ($n.get(p) || 0) + 1, m = (s.get(p) || 0) + 1;
7939
- $n.set(p, v), s.set(p, m), i.push(p), v === 1 && g && Zr.set(p, !0), m === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
7938
+ var x = p.getAttribute(r), g = x !== null && x !== "false", v = (Hn.get(p) || 0) + 1, m = (s.get(p) || 0) + 1;
7939
+ Hn.set(p, v), s.set(p, m), i.push(p), v === 1 && g && Jr.set(p, !0), m === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
7940
7940
  } catch (b) {
7941
7941
  console.error("aria-hidden: cannot operate on ", p, b);
7942
7942
  }
@@ -7944,9 +7944,9 @@ var nw = function(e) {
7944
7944
  };
7945
7945
  return d(t), a.clear(), Ws++, function() {
7946
7946
  i.forEach(function(h) {
7947
- var p = $n.get(h) - 1, x = s.get(h) - 1;
7948
- $n.set(h, p), s.set(h, x), p || (Zr.has(h) || h.removeAttribute(r), Zr.delete(h)), x || h.removeAttribute(n);
7949
- }), Ws--, Ws || ($n = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = {});
7947
+ var p = Hn.get(h) - 1, x = s.get(h) - 1;
7948
+ Hn.set(h, p), s.set(h, x), p || (Jr.has(h) || h.removeAttribute(r), Jr.delete(h)), x || h.removeAttribute(n);
7949
+ }), Ws--, Ws || (Hn = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Qr = {});
7950
7950
  };
7951
7951
  }, ra = function(e, t, n) {
7952
7952
  n === void 0 && (n = "data-aria-hidden");
@@ -8009,16 +8009,16 @@ var oa = "DialogPortal", [iw, Xu] = Vu(oa, {
8009
8009
  forceMount: void 0
8010
8010
  }), qu = (e) => {
8011
8011
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Wt(oa, t);
8012
- return /* @__PURE__ */ l.jsx(iw, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: i }) })) });
8012
+ return /* @__PURE__ */ l.jsx(iw, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Jo, { asChild: !0, container: o, children: i }) })) });
8013
8013
  };
8014
8014
  qu.displayName = oa;
8015
- var No = "DialogOverlay", Ju = f.forwardRef(
8015
+ var No = "DialogOverlay", Zu = f.forwardRef(
8016
8016
  (e, t) => {
8017
8017
  const n = Xu(No, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(No, e.__scopeDialog);
8018
8018
  return s.modal ? /* @__PURE__ */ l.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(lw, { ...o, ref: t }) }) : null;
8019
8019
  }
8020
8020
  );
8021
- Ju.displayName = No;
8021
+ Zu.displayName = No;
8022
8022
  var aw = Yn("DialogOverlay.RemoveScroll"), lw = f.forwardRef(
8023
8023
  (e, t) => {
8024
8024
  const { __scopeDialog: n, ...r } = e, o = Wt(No, n);
@@ -8036,13 +8036,13 @@ var aw = Yn("DialogOverlay.RemoveScroll"), lw = f.forwardRef(
8036
8036
  ) })
8037
8037
  );
8038
8038
  }
8039
- ), Nn = "DialogContent", Zu = f.forwardRef(
8039
+ ), Nn = "DialogContent", Ju = f.forwardRef(
8040
8040
  (e, t) => {
8041
8041
  const n = Xu(Nn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(Nn, e.__scopeDialog);
8042
8042
  return /* @__PURE__ */ l.jsx(vt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(cw, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(uw, { ...o, ref: t }) });
8043
8043
  }
8044
8044
  );
8045
- Zu.displayName = Nn;
8045
+ Ju.displayName = Nn;
8046
8046
  var cw = f.forwardRef(
8047
8047
  (e, t) => {
8048
8048
  const n = Wt(Nn, e.__scopeDialog), r = f.useRef(null), o = Te(t, n.contentRef, r);
@@ -8099,7 +8099,7 @@ var cw = f.forwardRef(
8099
8099
  const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Wt(Nn, n), c = f.useRef(null), u = Te(t, c);
8100
8100
  return na(), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8101
8101
  /* @__PURE__ */ l.jsx(
8102
- Jo,
8102
+ Zo,
8103
8103
  {
8104
8104
  asChild: !0,
8105
8105
  loop: !0,
@@ -8107,7 +8107,7 @@ var cw = f.forwardRef(
8107
8107
  onMountAutoFocus: o,
8108
8108
  onUnmountAutoFocus: s,
8109
8109
  children: /* @__PURE__ */ l.jsx(
8110
- Hr,
8110
+ $r,
8111
8111
  {
8112
8112
  role: "dialog",
8113
8113
  id: a.contentId,
@@ -8179,7 +8179,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
8179
8179
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
8180
8180
  t && o && (document.getElementById(t) || console.warn(r));
8181
8181
  }, [r, e, t]), null;
8182
- }, ad = Gu, pw = Yu, ld = qu, ns = Ju, rs = Zu, Tn = ed, os = nd, cd = od;
8182
+ }, ad = Gu, pw = Yu, ld = qu, ns = Zu, rs = Ju, Tn = ed, os = nd, cd = od;
8183
8183
  const mw = ad, gw = ld, ud = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
8184
8184
  ns,
8185
8185
  {
@@ -8287,7 +8287,7 @@ function xw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8287
8287
  }, x = async () => {
8288
8288
  if (n)
8289
8289
  try {
8290
- await Zx(n), h({ title: "Download started", description: `Downloading ${r}` });
8290
+ await Jx(n), h({ title: "Download started", description: `Downloading ${r}` });
8291
8291
  } catch (b) {
8292
8292
  console.error("Failed to download file:", b), h({ title: "Download failed", description: String(b), variant: "destructive" });
8293
8293
  }
@@ -8321,7 +8321,7 @@ function xw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8321
8321
  title: r
8322
8322
  }
8323
8323
  ) }) : o.startsWith("text/") || o.includes("json") || o.includes("xml") ? /* @__PURE__ */ l.jsx("div", { className: "bg-gray-50 dark:bg-gray-900 rounded-lg p-4 max-h-[70vh] overflow-auto", children: /* @__PURE__ */ l.jsx("pre", { className: "whitespace-pre-wrap font-mono text-sm", children: a }) }) : /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [
8324
- /* @__PURE__ */ l.jsx(Ha, { className: "h-16 w-16 text-gray-400 mb-4" }),
8324
+ /* @__PURE__ */ l.jsx($a, { className: "h-16 w-16 text-gray-400 mb-4" }),
8325
8325
  /* @__PURE__ */ l.jsx("p", { className: "text-lg font-medium mb-2", children: r }),
8326
8326
  /* @__PURE__ */ l.jsxs("p", { className: "text-sm text-muted-foreground mb-4", children: [
8327
8327
  o,
@@ -8330,7 +8330,7 @@ function xw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8330
8330
  " bytes"
8331
8331
  ] }),
8332
8332
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "This file type cannot be previewed. Use download or external view." })
8333
- ] }) : /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ l.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), m = () => o.startsWith("image/") ? /* @__PURE__ */ l.jsx(bc, { className: "h-5 w-5" }) : /* @__PURE__ */ l.jsx(Ha, { className: "h-5 w-5" });
8333
+ ] }) : /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ l.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), m = () => o.startsWith("image/") ? /* @__PURE__ */ l.jsx(bc, { className: "h-5 w-5" }) : /* @__PURE__ */ l.jsx($a, { className: "h-5 w-5" });
8334
8334
  return /* @__PURE__ */ l.jsx(mw, { open: e, onOpenChange: t, children: /* @__PURE__ */ l.jsxs(dd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
8335
8335
  /* @__PURE__ */ l.jsx(fd, { children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
8336
8336
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-3", children: [
@@ -8415,7 +8415,7 @@ const ww = K.memo(function({
8415
8415
  }) {
8416
8416
  const [y, R] = fe(!1), [S, C] = fe(!1), [E, I] = fe(!1), [A, k] = fe(!1), { currentThreadId: M } = Fi();
8417
8417
  ta();
8418
- const [W, G] = fe({}), [N, $] = fe(!1), [L, X] = fe(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", q = K.useMemo(() => {
8418
+ const [W, G] = fe({}), [N, H] = fe(!1), [L, X] = fe(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", q = K.useMemo(() => {
8419
8419
  switch (_) {
8420
8420
  case "user":
8421
8421
  return "text-[hsl(var(--chat-bubble-user-text))]";
@@ -8450,11 +8450,11 @@ const ww = K.memo(function({
8450
8450
  if (!v) return;
8451
8451
  const ce = z ? zn(t.content) : oe;
8452
8452
  v(t.id, ce);
8453
- }, Z = () => m == null ? void 0 : m(n), ne = () => {
8453
+ }, J = () => m == null ? void 0 : m(n), ne = () => {
8454
8454
  const Ae = D(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", q);
8455
8455
  switch (_) {
8456
8456
  case "user":
8457
- return /* @__PURE__ */ l.jsx(Hp, { className: Ae });
8457
+ return /* @__PURE__ */ l.jsx($p, { className: Ae });
8458
8458
  case "assistant":
8459
8459
  return /* @__PURE__ */ l.jsx(Ua, { className: Ae });
8460
8460
  case "tool":
@@ -8515,12 +8515,12 @@ const ww = K.memo(function({
8515
8515
  }
8516
8516
  }, Fe = () => {
8517
8517
  if (t.model === "reflection") {
8518
- const ve = oe.trim(), H = Vs(ve);
8519
- if (H && typeof H == "object")
8520
- return /* @__PURE__ */ l.jsx(jw, { data: H });
8518
+ const ve = oe.trim(), $ = Vs(ve);
8519
+ if ($ && typeof $ == "object")
8520
+ return /* @__PURE__ */ l.jsx(jw, { data: $ });
8521
8521
  }
8522
8522
  if (z && F.name === "get_issues") {
8523
- const ve = t.content.find((Be) => Be.type === "tool_result"), H = (ve == null ? void 0 : ve.output) ?? zn(t.content), ae = md(H);
8523
+ const ve = t.content.find((Be) => Be.type === "tool_result"), $ = (ve == null ? void 0 : ve.output) ?? zn(t.content), ae = md($);
8524
8524
  if (ae) return /* @__PURE__ */ l.jsx(Aw, { issues: ae });
8525
8525
  }
8526
8526
  if (z && !E) {
@@ -8531,10 +8531,10 @@ const ww = K.memo(function({
8531
8531
  ] }) });
8532
8532
  }
8533
8533
  if (z && d) {
8534
- const ve = zn(t.content), H = ve.length > h;
8534
+ const ve = zn(t.content), $ = ve.length > h;
8535
8535
  return /* @__PURE__ */ l.jsx(Ol, { open: S, onOpenChange: C, children: /* @__PURE__ */ l.jsxs("div", { className: "font-mono text-sm text-current", children: [
8536
- /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: H && !S ? ve.substring(0, h) + "..." : ve }),
8537
- H && /* @__PURE__ */ l.jsx(Ml, { asChild: !0, children: /* @__PURE__ */ l.jsx(ke, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8536
+ /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: $ && !S ? ve.substring(0, h) + "..." : ve }),
8537
+ $ && /* @__PURE__ */ l.jsx(Ml, { asChild: !0, children: /* @__PURE__ */ l.jsx(ke, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8538
8538
  /* @__PURE__ */ l.jsx(hr, { className: "h-3 w-3 mr-1" }),
8539
8539
  "Show less"
8540
8540
  ] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
@@ -8549,26 +8549,26 @@ const ww = K.memo(function({
8549
8549
  const ve = kw(t.content);
8550
8550
  if (ve && Sw(ve))
8551
8551
  return /* @__PURE__ */ l.jsx(Xr, { content: ve.trim() });
8552
- const H = zn(t.content);
8553
- return /* @__PURE__ */ l.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: H }) });
8552
+ const $ = zn(t.content);
8553
+ return /* @__PURE__ */ l.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: $ }) });
8554
8554
  }
8555
8555
  const ce = Q.length > 0 && _ !== "tool", Ae = de.length > 0 && _ !== "tool" && !1;
8556
8556
  return /* @__PURE__ */ l.jsxs("div", { children: [
8557
8557
  r ? /* @__PURE__ */ l.jsxs("div", { className: "relative", children: [
8558
8558
  (() => {
8559
8559
  const ve = Vs(be);
8560
- return ve !== null ? /* @__PURE__ */ l.jsx(Jl, { data: ve }) : /* @__PURE__ */ l.jsx(Xr, { content: Tw(Cw(be)) });
8560
+ return ve !== null ? /* @__PURE__ */ l.jsx(Zl, { data: ve }) : /* @__PURE__ */ l.jsx(Xr, { content: Tw(Cw(be)) });
8561
8561
  })(),
8562
8562
  /* @__PURE__ */ l.jsx(bw, { className: D(q, O ? "text-xs" : "text-sm") })
8563
8563
  ] }) : (() => {
8564
8564
  const ve = Vs(oe.trim());
8565
- if (ve !== null) return /* @__PURE__ */ l.jsx(Jl, { data: ve });
8565
+ if (ve !== null) return /* @__PURE__ */ l.jsx(Zl, { data: ve });
8566
8566
  if (_ === "user" && p) {
8567
- const H = oe.trim();
8568
- if (H.length > x)
8567
+ const $ = oe.trim();
8568
+ if ($.length > x)
8569
8569
  return /* @__PURE__ */ l.jsxs(Ol, { open: A, onOpenChange: k, children: [
8570
- /* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: A ? /* @__PURE__ */ l.jsx(Xr, { content: H }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8571
- H.substring(0, x),
8570
+ /* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: A ? /* @__PURE__ */ l.jsx(Xr, { content: $ }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8571
+ $.substring(0, x),
8572
8572
  "..."
8573
8573
  ] }) }),
8574
8574
  /* @__PURE__ */ l.jsx(Ml, { asChild: !0, children: /* @__PURE__ */ l.jsx(
@@ -8583,7 +8583,7 @@ const ww = K.memo(function({
8583
8583
  ] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8584
8584
  /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3 mr-1" }),
8585
8585
  " Show more (",
8586
- H.length - x,
8586
+ $.length - x,
8587
8587
  " chars)"
8588
8588
  ] })
8589
8589
  }
@@ -8592,13 +8592,13 @@ const ww = K.memo(function({
8592
8592
  }
8593
8593
  return /* @__PURE__ */ l.jsx(Xr, { content: oe.trim() });
8594
8594
  })(),
8595
- ce && /* @__PURE__ */ l.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Q.map((ve, H) => /* @__PURE__ */ l.jsxs("div", { className: "relative border rounded overflow-hidden", children: [
8595
+ ce && /* @__PURE__ */ l.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Q.map((ve, $) => /* @__PURE__ */ l.jsxs("div", { className: "relative border rounded overflow-hidden", children: [
8596
8596
  /* @__PURE__ */ l.jsx("img", { src: ve.url, alt: ve.alt ?? "image", className: "w-full h-auto" }),
8597
8597
  /* @__PURE__ */ l.jsxs("div", { className: "absolute top-1 right-1 bg-background/70 rounded px-1 py-0.5 text-[10px] flex items-center gap-1", children: [
8598
8598
  /* @__PURE__ */ l.jsx(bc, { className: "h-3 w-3" }),
8599
8599
  /* @__PURE__ */ l.jsx("span", { children: "image" })
8600
8600
  ] })
8601
- ] }, H)) }),
8601
+ ] }, $)) }),
8602
8602
  Ae
8603
8603
  ] });
8604
8604
  }, Le = wn(() => Iw(t), [t]);
@@ -8667,7 +8667,7 @@ const ww = K.memo(function({
8667
8667
  onClick: Y,
8668
8668
  className: D("h-6 w-6 p-0 hover:bg-foreground/10", q, O && "h-5 w-5"),
8669
8669
  children: /* @__PURE__ */ l.jsx(
8670
- $a,
8670
+ Ha,
8671
8671
  {
8672
8672
  className: D(
8673
8673
  y ? "text-success" : q,
@@ -8692,7 +8692,7 @@ const ww = K.memo(function({
8692
8692
  {
8693
8693
  variant: "ghost",
8694
8694
  size: "sm",
8695
- onClick: Z,
8695
+ onClick: J,
8696
8696
  className: D("h-6 w-6 p-0 hover:bg-foreground/10", q, O && "h-5 w-5"),
8697
8697
  children: /* @__PURE__ */ l.jsx(qs, { className: D(q, O ? "h-3 w-3" : "h-4 w-4") })
8698
8698
  }
@@ -8731,7 +8731,7 @@ const ww = K.memo(function({
8731
8731
  size: "sm",
8732
8732
  onClick: Y,
8733
8733
  className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8734
- children: /* @__PURE__ */ l.jsx($a, { className: D(y ? "text-success" : "text-current", O ? "h-3 w-3" : "h-4 w-4") })
8734
+ children: /* @__PURE__ */ l.jsx(Ha, { className: D(y ? "text-success" : "text-current", O ? "h-3 w-3" : "h-4 w-4") })
8735
8735
  }
8736
8736
  ),
8737
8737
  _ === "user" && v && /* @__PURE__ */ l.jsx(
@@ -8749,7 +8749,7 @@ const ww = K.memo(function({
8749
8749
  {
8750
8750
  variant: "ghost",
8751
8751
  size: "sm",
8752
- onClick: Z,
8752
+ onClick: J,
8753
8753
  className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8754
8754
  children: /* @__PURE__ */ l.jsx(qs, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
8755
8755
  }
@@ -8763,7 +8763,7 @@ const ww = K.memo(function({
8763
8763
  {
8764
8764
  isOpen: N,
8765
8765
  onClose: () => {
8766
- $(!1), X(null);
8766
+ H(!1), X(null);
8767
8767
  },
8768
8768
  fileId: L.id,
8769
8769
  fileName: L.name,
@@ -8807,7 +8807,7 @@ function Vs(e) {
8807
8807
  return null;
8808
8808
  }
8809
8809
  }
8810
- function Jl({ data: e }) {
8810
+ function Zl({ data: e }) {
8811
8811
  if (Array.isArray(e))
8812
8812
  return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ l.jsx("div", { className: po, children: /* @__PURE__ */ l.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ l.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ l.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: br(e) });
8813
8813
  if (e && typeof e == "object") {
@@ -9120,25 +9120,25 @@ function Xt(e) {
9120
9120
  function ua(e) {
9121
9121
  return la(Xt(e));
9122
9122
  }
9123
- function Hw(e, t, n) {
9123
+ function $w(e, t, n) {
9124
9124
  n === void 0 && (n = !1);
9125
9125
  const r = or(e), o = ua(e), s = ca(o);
9126
9126
  let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
9127
9127
  return t.reference[s] > t.floating[s] && (i = ko(i)), [i, ko(i)];
9128
9128
  }
9129
- function $w(e) {
9129
+ function Hw(e) {
9130
9130
  const t = ko(e);
9131
9131
  return [xi(e), t, xi(t)];
9132
9132
  }
9133
9133
  function xi(e) {
9134
9134
  return e.replace(/start|end/g, (t) => Fw[t]);
9135
9135
  }
9136
- const Zl = ["left", "right"], Ql = ["right", "left"], zw = ["top", "bottom"], Uw = ["bottom", "top"];
9136
+ const Jl = ["left", "right"], Ql = ["right", "left"], zw = ["top", "bottom"], Uw = ["bottom", "top"];
9137
9137
  function Ww(e, t, n) {
9138
9138
  switch (e) {
9139
9139
  case "top":
9140
9140
  case "bottom":
9141
- return n ? t ? Ql : Zl : t ? Zl : Ql;
9141
+ return n ? t ? Ql : Jl : t ? Jl : Ql;
9142
9142
  case "left":
9143
9143
  case "right":
9144
9144
  return t ? zw : Uw;
@@ -9367,12 +9367,12 @@ const Yw = (e) => ({
9367
9367
  }, x = ua(o), g = ca(x), v = await i.getDimensions(u), m = x === "y", b = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", R = s.reference[g] + s.reference[x] - p[x] - s.floating[g], S = p[x] - s.reference[x], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
9368
9368
  let E = C ? C[y] : 0;
9369
9369
  (!E || !await (i.isElement == null ? void 0 : i.isElement(C))) && (E = a.floating[y] || s.floating[g]);
9370
- const I = R / 2 - S / 2, A = E / 2 - v[g] / 2 - 1, k = dn(h[b], A), M = dn(h[w], A), W = k, G = E - v[g] - M, N = E / 2 - v[g] / 2 + I, $ = vi(W, N, G), L = !c.arrow && or(o) != null && N !== $ && s.reference[g] / 2 - (N < W ? k : M) - v[g] / 2 < 0, X = L ? N < W ? N - W : N - G : 0;
9370
+ const I = R / 2 - S / 2, A = E / 2 - v[g] / 2 - 1, k = dn(h[b], A), M = dn(h[w], A), W = k, G = E - v[g] - M, N = E / 2 - v[g] / 2 + I, H = vi(W, N, G), L = !c.arrow && or(o) != null && N !== H && s.reference[g] / 2 - (N < W ? k : M) - v[g] / 2 < 0, X = L ? N < W ? N - W : N - G : 0;
9371
9371
  return {
9372
9372
  [x]: p[x] + X,
9373
9373
  data: {
9374
- [x]: $,
9375
- centerOffset: N - $ - X,
9374
+ [x]: H,
9375
+ centerOffset: N - H - X,
9376
9376
  ...L && {
9377
9377
  alignmentOffset: X
9378
9378
  }
@@ -9404,12 +9404,12 @@ const Yw = (e) => ({
9404
9404
  } = rn(e, t);
9405
9405
  if ((n = s.arrow) != null && n.alignmentOffset)
9406
9406
  return {};
9407
- const b = on(o), w = Xt(a), y = on(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !v ? [ko(a)] : $w(a)), C = g !== "none";
9407
+ const b = on(o), w = Xt(a), y = on(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !v ? [ko(a)] : Hw(a)), C = g !== "none";
9408
9408
  !p && C && S.push(...Vw(a, v, g, R));
9409
9409
  const E = [a, ...S], I = await Rr(t, m), A = [];
9410
9410
  let k = ((r = s.flip) == null ? void 0 : r.overflows) || [];
9411
9411
  if (d && A.push(I[b]), h) {
9412
- const N = Hw(o, i, R);
9412
+ const N = $w(o, i, R);
9413
9413
  A.push(I[N[0]], I[N[1]]);
9414
9414
  }
9415
9415
  if (k = [...k, {
@@ -9417,8 +9417,8 @@ const Yw = (e) => ({
9417
9417
  overflows: A
9418
9418
  }], !A.every((N) => N <= 0)) {
9419
9419
  var M, W;
9420
- const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, $ = E[N];
9421
- if ($ && (!(h === "alignment" ? w !== Xt($) : !1) || // We leave the current main axis only if every placement on that axis
9420
+ const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, H = E[N];
9421
+ if (H && (!(h === "alignment" ? w !== Xt(H) : !1) || // We leave the current main axis only if every placement on that axis
9422
9422
  // overflows the main axis.
9423
9423
  k.every((O) => Xt(O.placement) === w ? O.overflows[0] > 0 : !0)))
9424
9424
  return {
@@ -9427,7 +9427,7 @@ const Yw = (e) => ({
9427
9427
  overflows: k
9428
9428
  },
9429
9429
  reset: {
9430
- placement: $
9430
+ placement: H
9431
9431
  }
9432
9432
  };
9433
9433
  let L = (W = k.filter((X) => X.overflows[0] <= 0).sort((X, O) => X.overflows[1] - O.overflows[1])[0]) == null ? void 0 : W.placement;
@@ -9515,7 +9515,7 @@ const qw = function(e) {
9515
9515
  }
9516
9516
  };
9517
9517
  }, vd = /* @__PURE__ */ new Set(["left", "top"]);
9518
- async function Jw(e, t) {
9518
+ async function Zw(e, t) {
9519
9519
  const {
9520
9520
  placement: n,
9521
9521
  platform: r,
@@ -9542,7 +9542,7 @@ async function Jw(e, t) {
9542
9542
  y: x * d
9543
9543
  };
9544
9544
  }
9545
- const Zw = function(e) {
9545
+ const Jw = function(e) {
9546
9546
  return e === void 0 && (e = 0), {
9547
9547
  name: "offset",
9548
9548
  options: e,
@@ -9553,7 +9553,7 @@ const Zw = function(e) {
9553
9553
  y: s,
9554
9554
  placement: i,
9555
9555
  middlewareData: a
9556
- } = t, c = await Jw(t, e);
9556
+ } = t, c = await Zw(t, e);
9557
9557
  return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
9558
9558
  x: o + c.x,
9559
9559
  y: s + c.y,
@@ -9720,23 +9720,23 @@ function Qt(e) {
9720
9720
  function xd(e) {
9721
9721
  return is() ? e instanceof Node || e instanceof Ct(e).Node : !1;
9722
9722
  }
9723
- function Ht(e) {
9723
+ function $t(e) {
9724
9724
  return is() ? e instanceof Element || e instanceof Ct(e).Element : !1;
9725
9725
  }
9726
- function Jt(e) {
9726
+ function Zt(e) {
9727
9727
  return is() ? e instanceof HTMLElement || e instanceof Ct(e).HTMLElement : !1;
9728
9728
  }
9729
9729
  function rc(e) {
9730
9730
  return !is() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Ct(e).ShadowRoot;
9731
9731
  }
9732
9732
  const ny = /* @__PURE__ */ new Set(["inline", "contents"]);
9733
- function $r(e) {
9733
+ function Hr(e) {
9734
9734
  const {
9735
9735
  overflow: t,
9736
9736
  overflowX: n,
9737
9737
  overflowY: r,
9738
9738
  display: o
9739
- } = $t(e);
9739
+ } = Ht(e);
9740
9740
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !ny.has(o);
9741
9741
  }
9742
9742
  const ry = /* @__PURE__ */ new Set(["table", "td", "th"]);
@@ -9755,12 +9755,12 @@ function as(e) {
9755
9755
  }
9756
9756
  const iy = ["transform", "translate", "scale", "rotate", "perspective"], ay = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ly = ["paint", "layout", "strict", "content"];
9757
9757
  function da(e) {
9758
- const t = fa(), n = Ht(e) ? $t(e) : e;
9758
+ const t = fa(), n = $t(e) ? Ht(e) : e;
9759
9759
  return iy.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ay.some((r) => (n.willChange || "").includes(r)) || ly.some((r) => (n.contain || "").includes(r));
9760
9760
  }
9761
9761
  function cy(e) {
9762
9762
  let t = fn(e);
9763
- for (; Jt(t) && !qn(t); ) {
9763
+ for (; Zt(t) && !qn(t); ) {
9764
9764
  if (da(t))
9765
9765
  return t;
9766
9766
  if (as(t))
@@ -9776,11 +9776,11 @@ const uy = /* @__PURE__ */ new Set(["html", "body", "#document"]);
9776
9776
  function qn(e) {
9777
9777
  return uy.has(sr(e));
9778
9778
  }
9779
- function $t(e) {
9779
+ function Ht(e) {
9780
9780
  return Ct(e).getComputedStyle(e);
9781
9781
  }
9782
9782
  function ls(e) {
9783
- return Ht(e) ? {
9783
+ return $t(e) ? {
9784
9784
  scrollLeft: e.scrollLeft,
9785
9785
  scrollTop: e.scrollTop
9786
9786
  } : {
@@ -9802,7 +9802,7 @@ function fn(e) {
9802
9802
  }
9803
9803
  function bd(e) {
9804
9804
  const t = fn(e);
9805
- return qn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jt(t) && $r(t) ? t : bd(t);
9805
+ return qn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Zt(t) && Hr(t) ? t : bd(t);
9806
9806
  }
9807
9807
  function Ir(e, t, n) {
9808
9808
  var r;
@@ -9810,7 +9810,7 @@ function Ir(e, t, n) {
9810
9810
  const o = bd(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Ct(o);
9811
9811
  if (s) {
9812
9812
  const a = bi(i);
9813
- return t.concat(i, i.visualViewport || [], $r(o) ? o : [], a && n ? Ir(a) : []);
9813
+ return t.concat(i, i.visualViewport || [], Hr(o) ? o : [], a && n ? Ir(a) : []);
9814
9814
  }
9815
9815
  return t.concat(o, Ir(o, [], n));
9816
9816
  }
@@ -9818,9 +9818,9 @@ function bi(e) {
9818
9818
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
9819
9819
  }
9820
9820
  function wd(e) {
9821
- const t = $t(e);
9821
+ const t = Ht(e);
9822
9822
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
9823
- const o = Jt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
9823
+ const o = Zt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
9824
9824
  return a && (n = s, r = i), {
9825
9825
  width: n,
9826
9826
  height: r,
@@ -9828,11 +9828,11 @@ function wd(e) {
9828
9828
  };
9829
9829
  }
9830
9830
  function ha(e) {
9831
- return Ht(e) ? e : e.contextElement;
9831
+ return $t(e) ? e : e.contextElement;
9832
9832
  }
9833
9833
  function Kn(e) {
9834
9834
  const t = ha(e);
9835
- if (!Jt(t))
9835
+ if (!Zt(t))
9836
9836
  return qt(1);
9837
9837
  const n = t.getBoundingClientRect(), {
9838
9838
  width: r,
@@ -9860,14 +9860,14 @@ function jn(e, t, n, r) {
9860
9860
  t === void 0 && (t = !1), n === void 0 && (n = !1);
9861
9861
  const o = e.getBoundingClientRect(), s = ha(e);
9862
9862
  let i = qt(1);
9863
- t && (r ? Ht(r) && (i = Kn(r)) : i = Kn(e));
9863
+ t && (r ? $t(r) && (i = Kn(r)) : i = Kn(e));
9864
9864
  const a = fy(s, n, r) ? yd(s) : qt(0);
9865
9865
  let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, h = o.height / i.y;
9866
9866
  if (s) {
9867
- const p = Ct(s), x = r && Ht(r) ? Ct(r) : r;
9867
+ const p = Ct(s), x = r && $t(r) ? Ct(r) : r;
9868
9868
  let g = p, v = bi(g);
9869
9869
  for (; v && r && x !== g; ) {
9870
- const m = Kn(v), b = v.getBoundingClientRect(), w = $t(v), y = b.left + (v.clientLeft + parseFloat(w.paddingLeft)) * m.x, R = b.top + (v.clientTop + parseFloat(w.paddingTop)) * m.y;
9870
+ const m = Kn(v), b = v.getBoundingClientRect(), w = Ht(v), y = b.left + (v.clientLeft + parseFloat(w.paddingLeft)) * m.x, R = b.top + (v.clientTop + parseFloat(w.paddingTop)) * m.y;
9871
9871
  c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u += R, g = Ct(v), v = bi(g);
9872
9872
  }
9873
9873
  }
@@ -9903,8 +9903,8 @@ function hy(e) {
9903
9903
  scrollLeft: 0,
9904
9904
  scrollTop: 0
9905
9905
  }, u = qt(1);
9906
- const d = qt(0), h = Jt(r);
9907
- if ((h || !h && !s) && ((sr(r) !== "body" || $r(i)) && (c = ls(r)), Jt(r))) {
9906
+ const d = qt(0), h = Zt(r);
9907
+ if ((h || !h && !s) && ((sr(r) !== "body" || Hr(i)) && (c = ls(r)), Zt(r))) {
9908
9908
  const x = jn(r);
9909
9909
  u = Kn(r), d.x = x.x + r.clientLeft, d.y = x.y + r.clientTop;
9910
9910
  }
@@ -9923,7 +9923,7 @@ function my(e) {
9923
9923
  const t = Qt(e), n = ls(e), r = e.ownerDocument.body, o = wt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = wt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
9924
9924
  let i = -n.scrollLeft + cs(e);
9925
9925
  const a = -n.scrollTop;
9926
- return $t(r).direction === "rtl" && (i += wt(t.clientWidth, r.clientWidth) - o), {
9926
+ return Ht(r).direction === "rtl" && (i += wt(t.clientWidth, r.clientWidth) - o), {
9927
9927
  width: o,
9928
9928
  height: s,
9929
9929
  x: i,
@@ -9953,7 +9953,7 @@ function gy(e, t) {
9953
9953
  }
9954
9954
  const vy = /* @__PURE__ */ new Set(["absolute", "fixed"]);
9955
9955
  function xy(e, t) {
9956
- const n = jn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Jt(e) ? Kn(e) : qt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
9956
+ const n = jn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Zt(e) ? Kn(e) : qt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
9957
9957
  return {
9958
9958
  width: i,
9959
9959
  height: a,
@@ -9967,7 +9967,7 @@ function sc(e, t, n) {
9967
9967
  r = gy(e, n);
9968
9968
  else if (t === "document")
9969
9969
  r = my(Qt(e));
9970
- else if (Ht(t))
9970
+ else if ($t(t))
9971
9971
  r = xy(t, n);
9972
9972
  else {
9973
9973
  const o = yd(e);
@@ -9982,18 +9982,18 @@ function sc(e, t, n) {
9982
9982
  }
9983
9983
  function Cd(e, t) {
9984
9984
  const n = fn(e);
9985
- return n === t || !Ht(n) || qn(n) ? !1 : $t(n).position === "fixed" || Cd(n, t);
9985
+ return n === t || !$t(n) || qn(n) ? !1 : Ht(n).position === "fixed" || Cd(n, t);
9986
9986
  }
9987
9987
  function by(e, t) {
9988
9988
  const n = t.get(e);
9989
9989
  if (n)
9990
9990
  return n;
9991
- let r = Ir(e, [], !1).filter((a) => Ht(a) && sr(a) !== "body"), o = null;
9992
- const s = $t(e).position === "fixed";
9991
+ let r = Ir(e, [], !1).filter((a) => $t(a) && sr(a) !== "body"), o = null;
9992
+ const s = Ht(e).position === "fixed";
9993
9993
  let i = s ? fn(e) : e;
9994
- for (; Ht(i) && !qn(i); ) {
9995
- const a = $t(i), c = da(i);
9996
- !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && vy.has(o.position) || $r(i) && !c && Cd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fn(i);
9994
+ for (; $t(i) && !qn(i); ) {
9995
+ const a = Ht(i), c = da(i);
9996
+ !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && vy.has(o.position) || Hr(i) && !c && Cd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fn(i);
9997
9997
  }
9998
9998
  return t.set(e, r), r;
9999
9999
  }
@@ -10026,7 +10026,7 @@ function yy(e) {
10026
10026
  };
10027
10027
  }
10028
10028
  function Sy(e, t, n) {
10029
- const r = Jt(t), o = Qt(t), s = n === "fixed", i = jn(e, !0, s, t);
10029
+ const r = Zt(t), o = Qt(t), s = n === "fixed", i = jn(e, !0, s, t);
10030
10030
  let a = {
10031
10031
  scrollLeft: 0,
10032
10032
  scrollTop: 0
@@ -10036,7 +10036,7 @@ function Sy(e, t, n) {
10036
10036
  c.x = cs(o);
10037
10037
  }
10038
10038
  if (r || !r && !s)
10039
- if ((sr(t) !== "body" || $r(o)) && (a = ls(t)), r) {
10039
+ if ((sr(t) !== "body" || Hr(o)) && (a = ls(t)), r) {
10040
10040
  const x = jn(t, !0, s, t);
10041
10041
  c.x = x.x + t.clientLeft, c.y = x.y + t.clientTop;
10042
10042
  } else o && u();
@@ -10050,10 +10050,10 @@ function Sy(e, t, n) {
10050
10050
  };
10051
10051
  }
10052
10052
  function Gs(e) {
10053
- return $t(e).position === "static";
10053
+ return Ht(e).position === "static";
10054
10054
  }
10055
10055
  function ic(e, t) {
10056
- if (!Jt(e) || $t(e).position === "fixed")
10056
+ if (!Zt(e) || Ht(e).position === "fixed")
10057
10057
  return null;
10058
10058
  if (t)
10059
10059
  return t(e);
@@ -10064,10 +10064,10 @@ function Td(e, t) {
10064
10064
  const n = Ct(e);
10065
10065
  if (as(e))
10066
10066
  return n;
10067
- if (!Jt(e)) {
10067
+ if (!Zt(e)) {
10068
10068
  let o = fn(e);
10069
10069
  for (; o && !qn(o); ) {
10070
- if (Ht(o) && !Gs(o))
10070
+ if ($t(o) && !Gs(o))
10071
10071
  return o;
10072
10072
  o = fn(o);
10073
10073
  }
@@ -10091,7 +10091,7 @@ const Cy = async function(e) {
10091
10091
  };
10092
10092
  };
10093
10093
  function Ty(e) {
10094
- return $t(e).direction === "rtl";
10094
+ return Ht(e).direction === "rtl";
10095
10095
  }
10096
10096
  const Ey = {
10097
10097
  convertOffsetParentRelativeRectToViewportRelativeRect: hy,
@@ -10102,7 +10102,7 @@ const Ey = {
10102
10102
  getClientRects: py,
10103
10103
  getDimensions: yy,
10104
10104
  getScale: Kn,
10105
- isElement: Ht,
10105
+ isElement: $t,
10106
10106
  isRTL: Ty
10107
10107
  };
10108
10108
  function Ed(e, t) {
@@ -10190,7 +10190,7 @@ function Iy(e, t, n, r) {
10190
10190
  }), h == null || h(), (b = x) == null || b.disconnect(), x = null, c && cancelAnimationFrame(g);
10191
10191
  };
10192
10192
  }
10193
- const Ny = Zw, jy = Qw, Ay = Xw, ky = ty, Py = qw, ac = Yw, _y = ey, Oy = (e, t, n) => {
10193
+ const Ny = Jw, jy = Qw, Ay = Xw, ky = ty, Py = qw, ac = Yw, _y = ey, Oy = (e, t, n) => {
10194
10194
  const r = /* @__PURE__ */ new Map(), o = {
10195
10195
  platform: Ey,
10196
10196
  ...n
@@ -10313,7 +10313,7 @@ function Ly(e) {
10313
10313
  G();
10314
10314
  }
10315
10315
  }, [R, S, G, k, A]);
10316
- const $ = f.useMemo(() => ({
10316
+ const H = f.useMemo(() => ({
10317
10317
  reference: C,
10318
10318
  floating: E,
10319
10319
  setReference: w,
@@ -10345,10 +10345,10 @@ function Ly(e) {
10345
10345
  return f.useMemo(() => ({
10346
10346
  ...d,
10347
10347
  update: G,
10348
- refs: $,
10348
+ refs: H,
10349
10349
  elements: L,
10350
10350
  floatingStyles: X
10351
- }), [d, G, $, L, X]);
10351
+ }), [d, G, H, L, X]);
10352
10352
  }
10353
10353
  const Fy = (e) => {
10354
10354
  function t(n) {
@@ -10374,10 +10374,10 @@ const Fy = (e) => {
10374
10374
  }, By = (e, t) => ({
10375
10375
  ...Ny(e),
10376
10376
  options: [e, t]
10377
- }), Hy = (e, t) => ({
10377
+ }), $y = (e, t) => ({
10378
10378
  ...jy(e),
10379
10379
  options: [e, t]
10380
- }), $y = (e, t) => ({
10380
+ }), Hy = (e, t) => ({
10381
10381
  ..._y(e),
10382
10382
  options: [e, t]
10383
10383
  }), zy = (e, t) => ({
@@ -10449,7 +10449,7 @@ var Pd = "PopperAnchor", _d = f.forwardRef(
10449
10449
  _d.displayName = Pd;
10450
10450
  var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10451
10451
  (e, t) => {
10452
- var Y, P, Z, ne, le, ie;
10452
+ var Y, P, J, ne, le, ie;
10453
10453
  const {
10454
10454
  __scopePopper: n,
10455
10455
  side: r = "bottom",
@@ -10467,10 +10467,10 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10467
10467
  ...v
10468
10468
  } = e, m = Ad(ma, n), [b, w] = f.useState(null), y = Te(t, (Pe) => w(Pe)), [R, S] = f.useState(null), C = Nd(R), E = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
10469
10469
  padding: k,
10470
- boundary: M.filter(Zy),
10470
+ boundary: M.filter(Jy),
10471
10471
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
10472
10472
  altBoundary: W
10473
- }, { refs: N, floatingStyles: $, placement: L, isPositioned: X, middlewareData: O } = Ly({
10473
+ }, { refs: N, floatingStyles: H, placement: L, isPositioned: X, middlewareData: O } = Ly({
10474
10474
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
10475
10475
  strategy: "fixed",
10476
10476
  placement: A,
@@ -10482,18 +10482,18 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10482
10482
  },
10483
10483
  middleware: [
10484
10484
  By({ mainAxis: o + I, alignmentAxis: i }),
10485
- c && Hy({
10485
+ c && $y({
10486
10486
  mainAxis: !0,
10487
10487
  crossAxis: !1,
10488
- limiter: h === "partial" ? $y() : void 0,
10488
+ limiter: h === "partial" ? Hy() : void 0,
10489
10489
  ...G
10490
10490
  }),
10491
10491
  c && zy({ ...G }),
10492
10492
  Uy({
10493
10493
  ...G,
10494
10494
  apply: ({ elements: Pe, rects: Fe, availableWidth: Le, availableHeight: ce }) => {
10495
- const { width: Ae, height: ve } = Fe.reference, H = Pe.floating.style;
10496
- H.setProperty("--radix-popper-available-width", `${Le}px`), H.setProperty("--radix-popper-available-height", `${ce}px`), H.setProperty("--radix-popper-anchor-width", `${Ae}px`), H.setProperty("--radix-popper-anchor-height", `${ve}px`);
10495
+ const { width: Ae, height: ve } = Fe.reference, $ = Pe.floating.style;
10496
+ $.setProperty("--radix-popper-available-width", `${Le}px`), $.setProperty("--radix-popper-available-height", `${ce}px`), $.setProperty("--radix-popper-anchor-width", `${Ae}px`), $.setProperty("--radix-popper-anchor-height", `${ve}px`);
10497
10497
  }
10498
10498
  }),
10499
10499
  R && Vy({ element: R, padding: a }),
@@ -10504,7 +10504,7 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10504
10504
  tt(() => {
10505
10505
  X && (q == null || q());
10506
10506
  }, [X, q]);
10507
- const oe = (Y = O.arrow) == null ? void 0 : Y.x, F = (P = O.arrow) == null ? void 0 : P.y, Q = ((Z = O.arrow) == null ? void 0 : Z.centerOffset) !== 0, [de, be] = f.useState();
10507
+ const oe = (Y = O.arrow) == null ? void 0 : Y.x, F = (P = O.arrow) == null ? void 0 : P.y, Q = ((J = O.arrow) == null ? void 0 : J.centerOffset) !== 0, [de, be] = f.useState();
10508
10508
  return tt(() => {
10509
10509
  b && be(window.getComputedStyle(b).zIndex);
10510
10510
  }, [b]), /* @__PURE__ */ l.jsx(
@@ -10513,8 +10513,8 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10513
10513
  ref: N.setFloating,
10514
10514
  "data-radix-popper-content-wrapper": "",
10515
10515
  style: {
10516
- ...$,
10517
- transform: X ? $.transform : "translate(0, -200%)",
10516
+ ...H,
10517
+ transform: X ? H.transform : "translate(0, -200%)",
10518
10518
  // keep off the page when measuring
10519
10519
  minWidth: "max-content",
10520
10520
  zIndex: de,
@@ -10562,13 +10562,13 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10562
10562
  }
10563
10563
  );
10564
10564
  Od.displayName = ma;
10565
- var Md = "PopperArrow", Jy = {
10565
+ var Md = "PopperArrow", Zy = {
10566
10566
  top: "bottom",
10567
10567
  right: "left",
10568
10568
  bottom: "top",
10569
10569
  left: "right"
10570
10570
  }, Dd = f.forwardRef(function(t, n) {
10571
- const { __scopePopper: r, ...o } = t, s = qy(Md, r), i = Jy[s.placedSide];
10571
+ const { __scopePopper: r, ...o } = t, s = qy(Md, r), i = Zy[s.placedSide];
10572
10572
  return (
10573
10573
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
10574
10574
  // doesn't report size as we'd expect on SVG elements.
@@ -10613,7 +10613,7 @@ var Md = "PopperArrow", Jy = {
10613
10613
  );
10614
10614
  });
10615
10615
  Dd.displayName = Md;
10616
- function Zy(e) {
10616
+ function Jy(e) {
10617
10617
  return e !== null;
10618
10618
  }
10619
10619
  var Qy = (e) => ({
@@ -10633,10 +10633,10 @@ function Ld(e) {
10633
10633
  var ga = kd, va = _d, xa = Od, ba = Dd, Ys = "rovingFocusGroup.onEntryFocus", eS = { bubbles: !1, cancelable: !0 }, zr = "RovingFocusGroup", [wi, Fd, tS] = aa(zr), [nS, Bd] = Ut(
10634
10634
  zr,
10635
10635
  [tS]
10636
- ), [rS, oS] = nS(zr), Hd = f.forwardRef(
10636
+ ), [rS, oS] = nS(zr), $d = f.forwardRef(
10637
10637
  (e, t) => /* @__PURE__ */ l.jsx(wi.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(wi.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(sS, { ...e, ref: t }) }) })
10638
10638
  );
10639
- Hd.displayName = zr;
10639
+ $d.displayName = zr;
10640
10640
  var sS = f.forwardRef((e, t) => {
10641
10641
  const {
10642
10642
  __scopeRovingFocusGroup: n,
@@ -10696,10 +10696,10 @@ var sS = f.forwardRef((e, t) => {
10696
10696
  if (I.target === I.currentTarget && A && !b) {
10697
10697
  const k = new CustomEvent(Ys, eS);
10698
10698
  if (I.currentTarget.dispatchEvent(k), !k.defaultPrevented) {
10699
- const M = R().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === v), $ = [W, G, ...M].filter(
10699
+ const M = R().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === v), H = [W, G, ...M].filter(
10700
10700
  Boolean
10701
10701
  ).map((L) => L.ref.current);
10702
- Ud($, d);
10702
+ Ud(H, d);
10703
10703
  }
10704
10704
  }
10705
10705
  S.current = !1;
@@ -10709,7 +10709,7 @@ var sS = f.forwardRef((e, t) => {
10709
10709
  )
10710
10710
  }
10711
10711
  );
10712
- }), $d = "RovingFocusGroupItem", zd = f.forwardRef(
10712
+ }), Hd = "RovingFocusGroupItem", zd = f.forwardRef(
10713
10713
  (e, t) => {
10714
10714
  const {
10715
10715
  __scopeRovingFocusGroup: n,
@@ -10718,7 +10718,7 @@ var sS = f.forwardRef((e, t) => {
10718
10718
  tabStopId: s,
10719
10719
  children: i,
10720
10720
  ...a
10721
- } = e, c = Ft(), u = s || c, d = oS($d, n), h = d.currentTabStopId === u, p = Fd(n), { onFocusableItemAdd: x, onFocusableItemRemove: g, currentTabStopId: v } = d;
10721
+ } = e, c = Ft(), u = s || c, d = oS(Hd, n), h = d.currentTabStopId === u, p = Fd(n), { onFocusableItemAdd: x, onFocusableItemRemove: g, currentTabStopId: v } = d;
10722
10722
  return f.useEffect(() => {
10723
10723
  if (r)
10724
10724
  return x(), () => g();
@@ -10767,7 +10767,7 @@ var sS = f.forwardRef((e, t) => {
10767
10767
  );
10768
10768
  }
10769
10769
  );
10770
- zd.displayName = $d;
10770
+ zd.displayName = Hd;
10771
10771
  var iS = {
10772
10772
  ArrowLeft: "prev",
10773
10773
  ArrowUp: "prev",
@@ -10794,7 +10794,7 @@ function Ud(e, t = !1) {
10794
10794
  function cS(e, t) {
10795
10795
  return e.map((n, r) => e[(t + r) % e.length]);
10796
10796
  }
10797
- var uS = Hd, dS = zd, yi = ["Enter", " "], fS = ["ArrowDown", "PageUp", "Home"], Wd = ["ArrowUp", "PageDown", "End"], hS = [...fS, ...Wd], pS = {
10797
+ var uS = $d, dS = zd, yi = ["Enter", " "], fS = ["ArrowDown", "PageUp", "Home"], Wd = ["ArrowUp", "PageDown", "End"], hS = [...fS, ...Wd], pS = {
10798
10798
  ltr: [...yi, "ArrowRight"],
10799
10799
  rtl: [...yi, "ArrowLeft"]
10800
10800
  }, mS = {
@@ -10847,7 +10847,7 @@ var ya = "MenuPortal", [yS, Yd] = On(ya, {
10847
10847
  forceMount: void 0
10848
10848
  }), Xd = (e) => {
10849
10849
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Mn(ya, t);
10850
- return /* @__PURE__ */ l.jsx(yS, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: r }) }) });
10850
+ return /* @__PURE__ */ l.jsx(yS, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Jo, { asChild: !0, container: o, children: r }) }) });
10851
10851
  };
10852
10852
  Xd.displayName = ya;
10853
10853
  var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
@@ -10908,11 +10908,11 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
10908
10908
  onDismiss: x,
10909
10909
  disableOutsideScroll: g,
10910
10910
  ...v
10911
- } = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Gd(n), R = gS(n), [S, C] = f.useState(null), E = f.useRef(null), I = Te(t, E, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), $ = g ? es : f.Fragment, L = g ? { as: ES, allowPinchZoom: !0 } : void 0, X = (_) => {
10911
+ } = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Gd(n), R = gS(n), [S, C] = f.useState(null), E = f.useRef(null), I = Te(t, E, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: ES, allowPinchZoom: !0 } : void 0, X = (_) => {
10912
10912
  var Y, P;
10913
- const z = k.current + _, q = R().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = q.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, Q = q.map((Z) => Z.textValue), de = LS(Q, z, F), be = (P = q.find((Z) => Z.textValue === de)) == null ? void 0 : P.ref.current;
10914
- (function Z(ne) {
10915
- k.current = ne, window.clearTimeout(A.current), ne !== "" && (A.current = window.setTimeout(() => Z(""), 1e3));
10913
+ const z = k.current + _, q = R().filter((J) => !J.disabled), oe = document.activeElement, F = (Y = q.find((J) => J.ref.current === oe)) == null ? void 0 : Y.textValue, Q = q.map((J) => J.textValue), de = LS(Q, z, F), be = (P = q.find((J) => J.textValue === de)) == null ? void 0 : P.ref.current;
10914
+ (function J(ne) {
10915
+ k.current = ne, window.clearTimeout(A.current), ne !== "" && (A.current = window.setTimeout(() => J(""), 1e3));
10916
10916
  })(z), be && setTimeout(() => be.focus());
10917
10917
  };
10918
10918
  f.useEffect(() => () => window.clearTimeout(A.current), []), na();
@@ -10948,8 +10948,8 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
10948
10948
  onPointerGraceIntentChange: f.useCallback((_) => {
10949
10949
  W.current = _;
10950
10950
  }, []),
10951
- children: /* @__PURE__ */ l.jsx($, { ...L, children: /* @__PURE__ */ l.jsx(
10952
- Jo,
10951
+ children: /* @__PURE__ */ l.jsx(H, { ...L, children: /* @__PURE__ */ l.jsx(
10952
+ Zo,
10953
10953
  {
10954
10954
  asChild: !0,
10955
10955
  trapped: o,
@@ -10959,7 +10959,7 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
10959
10959
  }),
10960
10960
  onUnmountAutoFocus: i,
10961
10961
  children: /* @__PURE__ */ l.jsx(
10962
- Hr,
10962
+ $r,
10963
10963
  {
10964
10964
  asChild: !0,
10965
10965
  disableOutsidePointerEvents: a,
@@ -11036,13 +11036,13 @@ var RS = "MenuGroup", Ta = f.forwardRef(
11036
11036
  }
11037
11037
  );
11038
11038
  Ta.displayName = RS;
11039
- var IS = "MenuLabel", Jd = f.forwardRef(
11039
+ var IS = "MenuLabel", Zd = f.forwardRef(
11040
11040
  (e, t) => {
11041
11041
  const { __scopeMenu: n, ...r } = e;
11042
11042
  return /* @__PURE__ */ l.jsx(me.div, { ...r, ref: t });
11043
11043
  }
11044
11044
  );
11045
- Jd.displayName = IS;
11045
+ Zd.displayName = IS;
11046
11046
  var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
11047
11047
  (e, t) => {
11048
11048
  const { disabled: n = !1, onSelect: r, ...o } = e, s = f.useRef(null), i = Wr(Oo, e.__scopeMenu), a = Sa(Oo, e.__scopeMenu), c = Te(t, s), u = f.useRef(!1), d = () => {
@@ -11053,7 +11053,7 @@ var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
11053
11053
  }
11054
11054
  };
11055
11055
  return /* @__PURE__ */ l.jsx(
11056
- Zd,
11056
+ Jd,
11057
11057
  {
11058
11058
  ...o,
11059
11059
  ref: c,
@@ -11076,7 +11076,7 @@ var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
11076
11076
  }
11077
11077
  );
11078
11078
  ds.displayName = Oo;
11079
- var Zd = f.forwardRef(
11079
+ var Jd = f.forwardRef(
11080
11080
  (e, t) => {
11081
11081
  const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Sa(Oo, n), a = Gd(n), c = f.useRef(null), u = Te(t, c), [d, h] = f.useState(!1), [p, x] = f.useState("");
11082
11082
  return f.useEffect(() => {
@@ -11226,7 +11226,7 @@ var OS = "MenuSub", [rE, cf] = On(OS), pr = "MenuSubTrigger", uf = f.forwardRef(
11226
11226
  window.clearTimeout(h), c(null);
11227
11227
  };
11228
11228
  }, [a, c]), /* @__PURE__ */ l.jsx(wa, { asChild: !0, ...u, children: /* @__PURE__ */ l.jsx(
11229
- Zd,
11229
+ Jd,
11230
11230
  {
11231
11231
  id: o.triggerId,
11232
11232
  "aria-haspopup": "menu",
@@ -11234,7 +11234,7 @@ var OS = "MenuSub", [rE, cf] = On(OS), pr = "MenuSubTrigger", uf = f.forwardRef(
11234
11234
  "aria-controls": o.contentId,
11235
11235
  "data-state": hf(n.open),
11236
11236
  ...e,
11237
- ref: Ji(t, o.onTriggerChange),
11237
+ ref: Zi(t, o.onTriggerChange),
11238
11238
  onClick: (h) => {
11239
11239
  var p;
11240
11240
  (p = e.onClick) == null || p.call(e, h), !(e.disabled || h.defaultPrevented) && (h.currentTarget.focus(), n.open || n.onOpenChange(!0));
@@ -11365,7 +11365,7 @@ function BS(e, t) {
11365
11365
  function jr(e) {
11366
11366
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
11367
11367
  }
11368
- var HS = Kd, $S = wa, zS = Xd, US = qd, WS = Ta, VS = Jd, GS = ds, KS = Qd, YS = tf, XS = rf, qS = sf, JS = af, ZS = lf, QS = uf, e0 = ff, fs = "DropdownMenu", [t0, oE] = Ut(
11368
+ var $S = Kd, HS = wa, zS = Xd, US = qd, WS = Ta, VS = Zd, GS = ds, KS = Qd, YS = tf, XS = rf, qS = sf, ZS = af, JS = lf, QS = uf, e0 = ff, fs = "DropdownMenu", [t0, oE] = Ut(
11369
11369
  fs,
11370
11370
  [Vd]
11371
11371
  ), ht = Vd(), [n0, pf] = t0(fs), mf = (e) => {
@@ -11394,7 +11394,7 @@ var HS = Kd, $S = wa, zS = Xd, US = qd, WS = Ta, VS = Jd, GS = ds, KS = Qd, YS =
11394
11394
  onOpenChange: h,
11395
11395
  onOpenToggle: f.useCallback(() => h((p) => !p), [h]),
11396
11396
  modal: a,
11397
- children: /* @__PURE__ */ l.jsx(HS, { ...c, open: d, onOpenChange: h, dir: r, modal: a, children: n })
11397
+ children: /* @__PURE__ */ l.jsx($S, { ...c, open: d, onOpenChange: h, dir: r, modal: a, children: n })
11398
11398
  }
11399
11399
  );
11400
11400
  };
@@ -11402,7 +11402,7 @@ mf.displayName = fs;
11402
11402
  var gf = "DropdownMenuTrigger", vf = f.forwardRef(
11403
11403
  (e, t) => {
11404
11404
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = pf(gf, n), i = ht(n);
11405
- return /* @__PURE__ */ l.jsx($S, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
11405
+ return /* @__PURE__ */ l.jsx(HS, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
11406
11406
  me.button,
11407
11407
  {
11408
11408
  type: "button",
@@ -11414,7 +11414,7 @@ var gf = "DropdownMenuTrigger", vf = f.forwardRef(
11414
11414
  "data-disabled": r ? "" : void 0,
11415
11415
  disabled: r,
11416
11416
  ...o,
11417
- ref: Ji(t, s.triggerRef),
11417
+ ref: Zi(t, s.triggerRef),
11418
11418
  onPointerDown: ee(e.onPointerDown, (a) => {
11419
11419
  !r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
11420
11420
  }),
@@ -11506,13 +11506,13 @@ var f0 = "DropdownMenuItemIndicator", Ef = f.forwardRef((e, t) => {
11506
11506
  Ef.displayName = f0;
11507
11507
  var h0 = "DropdownMenuSeparator", Rf = f.forwardRef((e, t) => {
11508
11508
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11509
- return /* @__PURE__ */ l.jsx(JS, { ...o, ...r, ref: t });
11509
+ return /* @__PURE__ */ l.jsx(ZS, { ...o, ...r, ref: t });
11510
11510
  });
11511
11511
  Rf.displayName = h0;
11512
11512
  var p0 = "DropdownMenuArrow", m0 = f.forwardRef(
11513
11513
  (e, t) => {
11514
11514
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11515
- return /* @__PURE__ */ l.jsx(ZS, { ...o, ...r, ref: t });
11515
+ return /* @__PURE__ */ l.jsx(JS, { ...o, ...r, ref: t });
11516
11516
  }
11517
11517
  );
11518
11518
  m0.displayName = p0;
@@ -11554,7 +11554,7 @@ const y0 = x0, S0 = b0, C0 = f.forwardRef(({ className: e, inset: t, children: n
11554
11554
  ...r,
11555
11555
  children: [
11556
11556
  n,
11557
- /* @__PURE__ */ l.jsx($p, { className: "ml-auto h-4 w-4" })
11557
+ /* @__PURE__ */ l.jsx(Hp, { className: "ml-auto h-4 w-4" })
11558
11558
  ]
11559
11559
  }
11560
11560
  ));
@@ -11682,46 +11682,46 @@ function vo({
11682
11682
  isLoadingHistory: I,
11683
11683
  loadOlderMessages: A,
11684
11684
  api: k
11685
- } = Fi(), [M, W] = fe(null), [G, N] = fe(""), [$, L] = fe(null), [X, O] = fe([]), [_, z] = fe(!1), [q, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [Z, ne] = fe([]), [le, ie] = fe(null);
11685
+ } = Fi(), [M, W] = fe(null), [G, N] = fe(""), [H, L] = fe(null), [X, O] = fe([]), [_, z] = fe(!1), [q, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [J, ne] = fe([]), [le, ie] = fe(null);
11686
11686
  bt(null);
11687
- const Pe = bt(null), Fe = bt(null), Le = bt(null), ce = bt(!1), Ae = bt(!0), ve = bt(0), H = bt(null), [ae, Be] = fe("desktop");
11687
+ const Pe = bt(null), Fe = bt(null), Le = bt(null), ce = bt(!1), Ae = bt(!0), ve = bt(0), $ = bt(null), [ae, Be] = fe("desktop");
11688
11688
  Ve(() => {
11689
- const J = () => {
11689
+ const Z = () => {
11690
11690
  const se = window.innerWidth;
11691
11691
  Be(se < 640 ? "phone" : se < 1024 ? "tablet" : "desktop");
11692
11692
  };
11693
- return J(), window.addEventListener("resize", J), () => window.removeEventListener("resize", J);
11693
+ return Z(), window.addEventListener("resize", Z), () => window.removeEventListener("resize", Z);
11694
11694
  }, []), Ve(() => {
11695
- let J = !1;
11695
+ let Z = !1;
11696
11696
  if (!p) {
11697
- ne([]), ie(null), H.current = null;
11697
+ ne([]), ie(null), $.current = null;
11698
11698
  return;
11699
11699
  }
11700
11700
  const se = {
11701
11701
  threadId: p,
11702
11702
  checkpointId: y ?? null
11703
- }, Ce = H.current;
11703
+ }, Ce = $.current;
11704
11704
  if (!(Ce && Ce.threadId === se.threadId && Ce.checkpointId === se.checkpointId))
11705
11705
  return R(p).then((Ne) => {
11706
- if (J) return;
11706
+ if (Z) return;
11707
11707
  const _t = ((Ne == null ? void 0 : Ne.checkpoints) ?? []).slice().sort((Ot, Ln) => new Date(Ln.createdAt).getTime() - new Date(Ot.createdAt).getTime());
11708
11708
  ne(_t), ie((Ot) => {
11709
11709
  var Ln;
11710
11710
  return Ot ?? ((Ln = _t[0]) == null ? void 0 : Ln.checkpointId) ?? null;
11711
- }), H.current = se;
11711
+ }), $.current = se;
11712
11712
  }).catch((Ne) => {
11713
- console.error("ChatInterface - listCheckpoints error:", Ne), J || (ne([]), H.current = null);
11713
+ console.error("ChatInterface - listCheckpoints error:", Ne), Z || (ne([]), $.current = null);
11714
11714
  }), () => {
11715
- J = !0;
11715
+ Z = !0;
11716
11716
  };
11717
11717
  }, [p, y, R]), Ve(() => {
11718
11718
  y && ie(y);
11719
11719
  }, [y]);
11720
11720
  const nt = Ye(async () => {
11721
11721
  if (!E || I) return;
11722
- const J = Le.current;
11723
- if (!J) return;
11724
- const se = J.scrollHeight, Ce = J.scrollTop;
11722
+ const Z = Le.current;
11723
+ if (!Z) return;
11724
+ const se = Z.scrollHeight, Ce = Z.scrollTop;
11725
11725
  ce.current = !0;
11726
11726
  try {
11727
11727
  await A();
@@ -11744,8 +11744,8 @@ function vo({
11744
11744
  Ve(() => {
11745
11745
  x.length < ve.current && (Ae.current = !0), ve.current = x.length;
11746
11746
  }, [x.length]), Ve(() => {
11747
- const J = Le.current;
11748
- J && (ce.current || Ae.current && (J.scrollTop = J.scrollHeight, Ae.current = !0));
11747
+ const Z = Le.current;
11748
+ Z && (ce.current || Ae.current && (Z.scrollTop = Z.scrollHeight, Ae.current = !0));
11749
11749
  }, [x]), Ve(() => {
11750
11750
  (async () => {
11751
11751
  try {
@@ -11758,24 +11758,24 @@ function vo({
11758
11758
  }, [k]), Ve(() => {
11759
11759
  m && !de && (h == null || h(m));
11760
11760
  }, [m, de, h]);
11761
- const ut = (J) => {
11762
- if (J.length > mo)
11763
- return `Message too long (${J.length}/${mo} characters)`;
11761
+ const ut = (Z) => {
11762
+ if (Z.length > mo)
11763
+ return `Message too long (${Z.length}/${mo} characters)`;
11764
11764
  try {
11765
- return Ow(J), null;
11765
+ return Ow(Z), null;
11766
11766
  } catch (se) {
11767
11767
  return (se == null ? void 0 : se.message) || "Invalid message";
11768
11768
  }
11769
- }, rt = (J) => {
11770
- const se = J.content || [], Ce = se.filter((Ne) => Ne.type === "text").map((Ne) => Ne.text).join("");
11769
+ }, rt = (Z) => {
11770
+ const se = Z.content || [], Ce = se.filter((Ne) => Ne.type === "text").map((Ne) => Ne.text).join("");
11771
11771
  if (Ce) return Ce;
11772
11772
  try {
11773
11773
  return JSON.stringify(se, null, 2);
11774
11774
  } catch {
11775
11775
  return String(se);
11776
11776
  }
11777
- }, Qe = async (J) => {
11778
- const se = J.trim();
11777
+ }, Qe = async (Z) => {
11778
+ const se = Z.trim();
11779
11779
  if (!(!se && X.length === 0)) {
11780
11780
  if (se) {
11781
11781
  const Ce = ut(se);
@@ -11791,24 +11791,24 @@ function vo({
11791
11791
  L(Ne), h == null || h(Ne);
11792
11792
  }
11793
11793
  }
11794
- }, Tt = K.useCallback((J, se) => {
11795
- a && (W(J), N(se), L(null));
11794
+ }, Tt = K.useCallback((Z, se) => {
11795
+ a && (W(Z), N(se), L(null));
11796
11796
  }, [a]), We = K.useCallback(() => {
11797
11797
  W(null), N(""), L(null);
11798
- }, []), st = Ye((J, se) => {
11799
- Tt(J, se);
11800
- }, [Tt]), Ge = Ye((J) => {
11801
- for (let se = J - 1; se >= 0; se--)
11798
+ }, []), st = Ye((Z, se) => {
11799
+ Tt(Z, se);
11800
+ }, [Tt]), Ge = Ye((Z) => {
11801
+ for (let se = Z - 1; se >= 0; se--)
11802
11802
  if (x[se].role === "user") {
11803
11803
  const Ce = rt(x[se]);
11804
11804
  Ce && b(Ce, { checkpointId: le || y || void 0 });
11805
11805
  break;
11806
11806
  }
11807
- }, [x, b, le, y, rt]), it = (J) => {
11808
- const se = Array.from(J.target.files || []);
11807
+ }, [x, b, le, y, rt]), it = (Z) => {
11808
+ const se = Array.from(Z.target.files || []);
11809
11809
  O((Ce) => [...Ce, ...se]);
11810
- }, Pt = (J) => O((se) => se.filter((Ce, Ne) => J !== Ne)), xn = async (J) => {
11811
- const se = (J.target.files || [])[0];
11810
+ }, Pt = (Z) => O((se) => se.filter((Ce, Ne) => Z !== Ne)), xn = async (Z) => {
11811
+ const se = (Z.target.files || [])[0];
11812
11812
  if (se) {
11813
11813
  oe(null), Q(null), z(!0);
11814
11814
  try {
@@ -11818,20 +11818,20 @@ function vo({
11818
11818
  const Ne = Ce instanceof Error ? Ce.message : "Failed to upload Excel file";
11819
11819
  console.error("Excel upload failed", Ce), oe(Ne), h == null || h(Ne);
11820
11820
  } finally {
11821
- z(!1), J.target.value = "";
11821
+ z(!1), Z.target.value = "";
11822
11822
  }
11823
11823
  }
11824
- }, Dn = (J) => {
11825
- if (!J) return "Unknown";
11826
- const se = Date.parse(J);
11827
- return Number.isNaN(se) ? J : new Date(se).toLocaleString();
11828
- }, Ue = async (J) => {
11824
+ }, Dn = (Z) => {
11825
+ if (!Z) return "Unknown";
11826
+ const se = Date.parse(Z);
11827
+ return Number.isNaN(se) ? Z : new Date(se).toLocaleString();
11828
+ }, Ue = async (Z) => {
11829
11829
  if (p) {
11830
- if (!J) {
11830
+ if (!Z) {
11831
11831
  await C(), ie(null);
11832
11832
  return;
11833
11833
  }
11834
- await S(J), ie(J);
11834
+ await S(Z), ie(Z);
11835
11835
  }
11836
11836
  }, lr = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${c.container || ""}`, Cs = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 space-y-4 bg-transparent ${c.messagesArea || ""}`, Ts = `flex-shrink-0 w-full border-t p-4 bg-transparent ${c.inputArea || ""}`;
11837
11837
  return /* @__PURE__ */ l.jsxs("div", { className: lr, children: [
@@ -11849,23 +11849,23 @@ function vo({
11849
11849
  }
11850
11850
  )
11851
11851
  ] }),
11852
- p && Z.length > 0 && /* @__PURE__ */ l.jsxs("div", { className: "flex-shrink-0 flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/60 text-xs dark:bg-muted/50", children: [
11852
+ p && J.length > 0 && /* @__PURE__ */ l.jsxs("div", { className: "flex-shrink-0 flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/60 text-xs dark:bg-muted/50", children: [
11853
11853
  /* @__PURE__ */ l.jsx("span", { className: "opacity-70", children: "Checkpoint:" }),
11854
11854
  /* @__PURE__ */ l.jsxs(
11855
11855
  "select",
11856
11856
  {
11857
11857
  className: "border border-border rounded px-2 py-1 text-xs bg-card text-foreground focus:outline-none focus:ring-1 focus:ring-ring dark:bg-secondary",
11858
11858
  value: le ?? "",
11859
- onChange: (J) => {
11860
- const se = J.target.value || null;
11859
+ onChange: (Z) => {
11860
+ const se = Z.target.value || null;
11861
11861
  Ue(se);
11862
11862
  },
11863
11863
  children: [
11864
11864
  /* @__PURE__ */ l.jsx("option", { value: "", children: "Latest" }),
11865
- Z.map((J) => /* @__PURE__ */ l.jsxs("option", { value: J.checkpointId, children: [
11866
- Dn(J.createdAt),
11867
- J.preview ? ` — ${J.preview.slice(0, 40)}` : ""
11868
- ] }, J.checkpointId))
11865
+ J.map((Z) => /* @__PURE__ */ l.jsxs("option", { value: Z.checkpointId, children: [
11866
+ Dn(Z.createdAt),
11867
+ Z.preview ? ` — ${Z.preview.slice(0, 40)}` : ""
11868
+ ] }, Z.checkpointId))
11869
11869
  ]
11870
11870
  }
11871
11871
  )
@@ -11887,24 +11887,24 @@ function vo({
11887
11887
  },
11888
11888
  style: { height: "100%", overscrollBehavior: "contain" },
11889
11889
  components: {
11890
- Scroller: K.forwardRef((J, se) => /* @__PURE__ */ l.jsx(
11890
+ Scroller: K.forwardRef((Z, se) => /* @__PURE__ */ l.jsx(
11891
11891
  "div",
11892
11892
  {
11893
- ...J,
11893
+ ...Z,
11894
11894
  ref: se,
11895
11895
  style: {
11896
11896
  overflowAnchor: "auto",
11897
11897
  willChange: "transform",
11898
- ...(J == null ? void 0 : J.style) ?? {}
11898
+ ...(Z == null ? void 0 : Z.style) ?? {}
11899
11899
  }
11900
11900
  }
11901
11901
  ))
11902
11902
  },
11903
- itemContent: (J, se) => /* @__PURE__ */ l.jsx(
11903
+ itemContent: (Z, se) => /* @__PURE__ */ l.jsx(
11904
11904
  ww,
11905
11905
  {
11906
11906
  message: se,
11907
- messageIndex: J,
11907
+ messageIndex: Z,
11908
11908
  isStreamingMessage: g && v === se.id,
11909
11909
  streamingDebounceMs: o,
11910
11910
  isEditing: M === se.id,
@@ -11915,10 +11915,10 @@ function vo({
11915
11915
  truncateToolMessages: !1,
11916
11916
  toolMessagePreviewLength: 200,
11917
11917
  onEdit: st,
11918
- onRegenerate: () => Ge(J),
11918
+ onRegenerate: () => Ge(Z),
11919
11919
  onCancelEdit: We
11920
11920
  },
11921
- se.id ?? `msg-${se.role}-${J}-${se.createdAt ?? ""}`
11921
+ se.id ?? `msg-${se.role}-${Z}-${se.createdAt ?? ""}`
11922
11922
  )
11923
11923
  }
11924
11924
  )
@@ -11949,13 +11949,13 @@ function vo({
11949
11949
  ref: Pe,
11950
11950
  type: "file",
11951
11951
  multiple: !0,
11952
- onChange: (J) => it(J),
11952
+ onChange: (Z) => it(Z),
11953
11953
  className: "hidden"
11954
11954
  }
11955
11955
  ),
11956
- X.length > 0 && /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: X.map((J, se) => /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
11956
+ X.length > 0 && /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: X.map((Z, se) => /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
11957
11957
  /* @__PURE__ */ l.jsx(Wa, { size: 14 }),
11958
- /* @__PURE__ */ l.jsx("span", { className: "truncate max-w-[150px]", children: J.name }),
11958
+ /* @__PURE__ */ l.jsx("span", { className: "truncate max-w-[150px]", children: Z.name }),
11959
11959
  /* @__PURE__ */ l.jsx(
11960
11960
  ke,
11961
11961
  {
@@ -11963,7 +11963,7 @@ function vo({
11963
11963
  size: "sm",
11964
11964
  onClick: () => Pt(se),
11965
11965
  className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
11966
- "aria-label": `Remove ${J.name}`,
11966
+ "aria-label": `Remove ${Z.name}`,
11967
11967
  children: /* @__PURE__ */ l.jsx(Wn, { size: 12 })
11968
11968
  }
11969
11969
  )
@@ -11988,7 +11988,7 @@ function vo({
11988
11988
  q && !_ && /* @__PURE__ */ l.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: q })
11989
11989
  ] })
11990
11990
  ] }),
11991
- $ && /* @__PURE__ */ l.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: $ }),
11991
+ H && /* @__PURE__ */ l.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: H }),
11992
11992
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-end gap-2", children: [
11993
11993
  (s || i) && /* @__PURE__ */ l.jsxs(y0, { children: [
11994
11994
  /* @__PURE__ */ l.jsx(S0, { asChild: !0, children: /* @__PURE__ */ l.jsx(
@@ -12005,8 +12005,8 @@ function vo({
12005
12005
  ) }),
12006
12006
  /* @__PURE__ */ l.jsxs(Ff, { align: "start", sideOffset: 6, className: "w-52", children: [
12007
12007
  s && /* @__PURE__ */ l.jsxs(Si, { onClick: () => {
12008
- var J;
12009
- return (J = Pe.current) == null ? void 0 : J.click();
12008
+ var Z;
12009
+ return (Z = Pe.current) == null ? void 0 : Z.click();
12010
12010
  }, className: "cursor-pointer", children: [
12011
12011
  /* @__PURE__ */ l.jsx(Wa, { className: "h-4 w-4 mr-2" }),
12012
12012
  " Attach files or images"
@@ -12015,8 +12015,8 @@ function vo({
12015
12015
  Si,
12016
12016
  {
12017
12017
  onClick: () => {
12018
- var J;
12019
- _ || (J = Fe.current) == null || J.click();
12018
+ var Z;
12019
+ _ || (Z = Fe.current) == null || Z.click();
12020
12020
  },
12021
12021
  className: `cursor-pointer ${_ ? "opacity-60 pointer-events-none" : ""}`,
12022
12022
  children: [
@@ -12040,7 +12040,7 @@ function vo({
12040
12040
  onCancelEdit: We,
12041
12041
  onStop: w,
12042
12042
  allowEmptySend: X.length > 0,
12043
- textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${M ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${$ ? "border-red-400" : ""} ${c.textarea || ""}`
12043
+ textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${M ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${H ? "border-red-400" : ""} ${c.textarea || ""}`
12044
12044
  }
12045
12045
  ) })
12046
12046
  ] })
@@ -12068,7 +12068,7 @@ function Ci(e, [t, n]) {
12068
12068
  function j0(e, t) {
12069
12069
  return f.useReducer((n, r) => t[n][r] ?? n, e);
12070
12070
  }
12071
- var Ia = "ScrollArea", [Bf, sE] = Ut(Ia), [A0, kt] = Bf(Ia), Hf = f.forwardRef(
12071
+ var Ia = "ScrollArea", [Bf, sE] = Ut(Ia), [A0, kt] = Bf(Ia), $f = f.forwardRef(
12072
12072
  (e, t) => {
12073
12073
  const {
12074
12074
  __scopeScrollArea: n,
@@ -12118,10 +12118,10 @@ var Ia = "ScrollArea", [Bf, sE] = Ut(Ia), [A0, kt] = Bf(Ia), Hf = f.forwardRef(
12118
12118
  );
12119
12119
  }
12120
12120
  );
12121
- Hf.displayName = Ia;
12122
- var $f = "ScrollAreaViewport", zf = f.forwardRef(
12121
+ $f.displayName = Ia;
12122
+ var Hf = "ScrollAreaViewport", zf = f.forwardRef(
12123
12123
  (e, t) => {
12124
- const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = kt($f, n), a = f.useRef(null), c = Te(t, a, i.onViewportChange);
12124
+ const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = kt(Hf, n), a = f.useRef(null), c = Te(t, a, i.onViewportChange);
12125
12125
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
12126
12126
  /* @__PURE__ */ l.jsx(
12127
12127
  "style",
@@ -12160,7 +12160,7 @@ var $f = "ScrollAreaViewport", zf = f.forwardRef(
12160
12160
  ] });
12161
12161
  }
12162
12162
  );
12163
- zf.displayName = $f;
12163
+ zf.displayName = Hf;
12164
12164
  var en = "ScrollAreaScrollbar", Na = f.forwardRef(
12165
12165
  (e, t) => {
12166
12166
  const { forceMount: n, ...r } = e, o = kt(en, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
@@ -12244,7 +12244,7 @@ var k0 = f.forwardRef((e, t) => {
12244
12244
  i(a ? u : d);
12245
12245
  }
12246
12246
  }, 10);
12247
- return Jn(n.viewport, c), Jn(n.content, c), /* @__PURE__ */ l.jsx(vt, { present: r || s, children: /* @__PURE__ */ l.jsx(
12247
+ return Zn(n.viewport, c), Zn(n.content, c), /* @__PURE__ */ l.jsx(vt, { present: r || s, children: /* @__PURE__ */ l.jsx(
12248
12248
  ja,
12249
12249
  {
12250
12250
  "data-state": s ? "visible" : "hidden",
@@ -12411,7 +12411,7 @@ var k0 = f.forwardRef((e, t) => {
12411
12411
  (g == null ? void 0 : g.contains(M)) && S(k, R);
12412
12412
  };
12413
12413
  return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
12414
- }, [y, g, R, S]), f.useEffect(C, [r, C]), Jn(g, E), Jn(x.content, E), /* @__PURE__ */ l.jsx(
12414
+ }, [y, g, R, S]), f.useEffect(C, [r, C]), Zn(g, E), Zn(x.content, E), /* @__PURE__ */ l.jsx(
12415
12415
  M0,
12416
12416
  {
12417
12417
  scope: n,
@@ -12493,11 +12493,11 @@ var Aa = "ScrollAreaCorner", Kf = f.forwardRef(
12493
12493
  Kf.displayName = Aa;
12494
12494
  var L0 = f.forwardRef((e, t) => {
12495
12495
  const { __scopeScrollArea: n, ...r } = e, o = kt(Aa, n), [s, i] = f.useState(0), [a, c] = f.useState(0), u = !!(s && a);
12496
- return Jn(o.scrollbarX, () => {
12496
+ return Zn(o.scrollbarX, () => {
12497
12497
  var h;
12498
12498
  const d = ((h = o.scrollbarX) == null ? void 0 : h.offsetHeight) || 0;
12499
12499
  o.onCornerHeightChange(d), c(d);
12500
- }), Jn(o.scrollbarY, () => {
12500
+ }), Zn(o.scrollbarY, () => {
12501
12501
  var h;
12502
12502
  const d = ((h = o.scrollbarY) == null ? void 0 : h.offsetWidth) || 0;
12503
12503
  o.onCornerWidthChange(d), i(d);
@@ -12561,7 +12561,7 @@ function ps(e, t) {
12561
12561
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
12562
12562
  }, [n, t]);
12563
12563
  }
12564
- function Jn(e, t) {
12564
+ function Zn(e, t) {
12565
12565
  const n = ot(t);
12566
12566
  tt(() => {
12567
12567
  let r = 0;
@@ -12575,21 +12575,21 @@ function Jn(e, t) {
12575
12575
  }
12576
12576
  }, [e, n]);
12577
12577
  }
12578
- var Jf = Hf, H0 = zf, $0 = Kf;
12579
- const Zf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
12580
- Jf,
12578
+ var Zf = $f, $0 = zf, H0 = Kf;
12579
+ const Jf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
12580
+ Zf,
12581
12581
  {
12582
12582
  ref: r,
12583
12583
  className: D("relative overflow-hidden", e),
12584
12584
  ...n,
12585
12585
  children: [
12586
- /* @__PURE__ */ l.jsx(H0, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
12586
+ /* @__PURE__ */ l.jsx($0, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
12587
12587
  /* @__PURE__ */ l.jsx(Qf, {}),
12588
- /* @__PURE__ */ l.jsx($0, {})
12588
+ /* @__PURE__ */ l.jsx(H0, {})
12589
12589
  ]
12590
12590
  }
12591
12591
  ));
12592
- Zf.displayName = Jf.displayName;
12592
+ Jf.displayName = Zf.displayName;
12593
12593
  const Qf = f.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ l.jsx(
12594
12594
  Na,
12595
12595
  {
@@ -12637,7 +12637,7 @@ function Ti({
12637
12637
  } catch (Q) {
12638
12638
  console.error("Failed to select thread:", Q);
12639
12639
  }
12640
- }, $ = async () => {
12640
+ }, H = async () => {
12641
12641
  try {
12642
12642
  G(!0);
12643
12643
  const F = await v();
@@ -12680,7 +12680,7 @@ function Ti({
12680
12680
  t && /* @__PURE__ */ l.jsx("div", { className: s.header || "flex-shrink-0 p-2 border-b bg-slate-800 border-slate-700 text-slate-100 flex justify-end", children: /* @__PURE__ */ l.jsx(
12681
12681
  ke,
12682
12682
  {
12683
- onClick: $,
12683
+ onClick: H,
12684
12684
  disabled: W || R,
12685
12685
  className: s.createButton || "p-2",
12686
12686
  size: "sm",
@@ -12690,7 +12690,7 @@ function Ti({
12690
12690
  }
12691
12691
  ) }),
12692
12692
  /* @__PURE__ */ l.jsx(
12693
- Zf,
12693
+ Jf,
12694
12694
  {
12695
12695
  className: `flex-1 min-h-0 ${s.threadList || ""}`,
12696
12696
  style: o ? { maxHeight: o } : void 0,
@@ -12831,7 +12831,7 @@ function Y0() {
12831
12831
  }, []), !!e;
12832
12832
  }
12833
12833
  var X0 = "Separator", fc = "horizontal", q0 = ["horizontal", "vertical"], nh = f.forwardRef((e, t) => {
12834
- const { decorative: n, orientation: r = fc, ...o } = e, s = J0(r) ? r : fc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
12834
+ const { decorative: n, orientation: r = fc, ...o } = e, s = Z0(r) ? r : fc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
12835
12835
  return /* @__PURE__ */ l.jsx(
12836
12836
  me.div,
12837
12837
  {
@@ -12843,7 +12843,7 @@ var X0 = "Separator", fc = "horizontal", q0 = ["horizontal", "vertical"], nh = f
12843
12843
  );
12844
12844
  });
12845
12845
  nh.displayName = X0;
12846
- function J0(e) {
12846
+ function Z0(e) {
12847
12847
  return q0.includes(e);
12848
12848
  }
12849
12849
  var rh = nh;
@@ -12864,7 +12864,7 @@ const ka = f.forwardRef(
12864
12864
  )
12865
12865
  );
12866
12866
  ka.displayName = rh.displayName;
12867
- const oh = ad, Z0 = pw, Q0 = ld, sh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
12867
+ const oh = ad, J0 = pw, Q0 = ld, sh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
12868
12868
  ns,
12869
12869
  {
12870
12870
  className: D(
@@ -13096,13 +13096,13 @@ var Ri = "TooltipTrigger", ph = f.forwardRef(
13096
13096
  ph.displayName = Ri;
13097
13097
  var iC = "TooltipPortal", [dE, aC] = ms(iC, {
13098
13098
  forceMount: void 0
13099
- }), Zn = "TooltipContent", mh = f.forwardRef(
13099
+ }), Jn = "TooltipContent", mh = f.forwardRef(
13100
13100
  (e, t) => {
13101
- const n = aC(Zn, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = vs(Zn, e.__scopeTooltip);
13101
+ const n = aC(Jn, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = vs(Jn, e.__scopeTooltip);
13102
13102
  return /* @__PURE__ */ l.jsx(vt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ l.jsx(gh, { side: o, ...s, ref: t }) : /* @__PURE__ */ l.jsx(lC, { side: o, ...s, ref: t }) });
13103
13103
  }
13104
13104
  ), lC = f.forwardRef((e, t) => {
13105
- const n = vs(Zn, e.__scopeTooltip), r = _a(Zn, e.__scopeTooltip), o = f.useRef(null), s = Te(t, o), [i, a] = f.useState(null), { trigger: c, onClose: u } = n, d = o.current, { onPointerInTransitChange: h } = r, p = f.useCallback(() => {
13105
+ const n = vs(Jn, e.__scopeTooltip), r = _a(Jn, e.__scopeTooltip), o = f.useRef(null), s = Te(t, o), [i, a] = f.useState(null), { trigger: c, onClose: u } = n, d = o.current, { onPointerInTransitChange: h } = r, p = f.useCallback(() => {
13106
13106
  a(null), h(!1);
13107
13107
  }, [h]), x = f.useCallback(
13108
13108
  (g, v) => {
@@ -13136,7 +13136,7 @@ var iC = "TooltipPortal", [dE, aC] = ms(iC, {
13136
13136
  onEscapeKeyDown: s,
13137
13137
  onPointerDownOutside: i,
13138
13138
  ...a
13139
- } = e, c = vs(Zn, n), u = gs(n), { onClose: d } = c;
13139
+ } = e, c = vs(Jn, n), u = gs(n), { onClose: d } = c;
13140
13140
  return f.useEffect(() => (document.addEventListener(Ei, d), () => document.removeEventListener(Ei, d)), [d]), f.useEffect(() => {
13141
13141
  if (c.trigger) {
13142
13142
  const h = (p) => {
@@ -13146,7 +13146,7 @@ var iC = "TooltipPortal", [dE, aC] = ms(iC, {
13146
13146
  return window.addEventListener("scroll", h, { capture: !0 }), () => window.removeEventListener("scroll", h, { capture: !0 });
13147
13147
  }
13148
13148
  }, [c.trigger, d]), /* @__PURE__ */ l.jsx(
13149
- Hr,
13149
+ $r,
13150
13150
  {
13151
13151
  asChild: !0,
13152
13152
  disableOutsidePointerEvents: !1,
@@ -13179,7 +13179,7 @@ var iC = "TooltipPortal", [dE, aC] = ms(iC, {
13179
13179
  );
13180
13180
  }
13181
13181
  );
13182
- mh.displayName = Zn;
13182
+ mh.displayName = Jn;
13183
13183
  var vh = "TooltipArrow", fC = f.forwardRef(
13184
13184
  (e, t) => {
13185
13185
  const { __scopeTooltip: n, ...r } = e, o = gs(n);
@@ -13761,7 +13761,7 @@ const BC = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
13761
13761
  );
13762
13762
  });
13763
13763
  BC.displayName = "SidebarMenuSkeleton";
13764
- const HC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13764
+ const $C = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13765
13765
  "ul",
13766
13766
  {
13767
13767
  ref: n,
@@ -13774,9 +13774,9 @@ const HC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13774
13774
  ...t
13775
13775
  }
13776
13776
  ));
13777
- HC.displayName = "SidebarMenuSub";
13778
- const $C = f.forwardRef(({ ...e }, t) => /* @__PURE__ */ l.jsx("li", { ref: t, ...e }));
13779
- $C.displayName = "SidebarMenuSubItem";
13777
+ $C.displayName = "SidebarMenuSub";
13778
+ const HC = f.forwardRef(({ ...e }, t) => /* @__PURE__ */ l.jsx("li", { ref: t, ...e }));
13779
+ HC.displayName = "SidebarMenuSubItem";
13780
13780
  const zC = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...o }, s) => {
13781
13781
  const i = e ? Qn : "a";
13782
13782
  return /* @__PURE__ */ l.jsx(
@@ -13889,7 +13889,7 @@ var bs = "Switch", [VC, hE] = Ut(bs), [GC, KC] = VC(bs), Dh = f.forwardRef(
13889
13889
  role: "switch",
13890
13890
  "aria-checked": b,
13891
13891
  "aria-required": i,
13892
- "data-state": Hh(b),
13892
+ "data-state": $h(b),
13893
13893
  "data-disabled": a ? "" : void 0,
13894
13894
  disabled: a,
13895
13895
  value: c,
@@ -13924,7 +13924,7 @@ var Lh = "SwitchThumb", Fh = f.forwardRef(
13924
13924
  return /* @__PURE__ */ l.jsx(
13925
13925
  me.span,
13926
13926
  {
13927
- "data-state": Hh(o.checked),
13927
+ "data-state": $h(o.checked),
13928
13928
  "data-disabled": o.disabled ? "" : void 0,
13929
13929
  ...r,
13930
13930
  ref: t
@@ -13975,12 +13975,12 @@ var YC = "SwitchBubbleInput", Bh = f.forwardRef(
13975
13975
  }
13976
13976
  );
13977
13977
  Bh.displayName = YC;
13978
- function Hh(e) {
13978
+ function $h(e) {
13979
13979
  return e ? "checked" : "unchecked";
13980
13980
  }
13981
- var $h = Dh, XC = Fh;
13981
+ var Hh = Dh, XC = Fh;
13982
13982
  const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13983
- $h,
13983
+ Hh,
13984
13984
  {
13985
13985
  className: D(
13986
13986
  "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
@@ -13998,9 +13998,9 @@ const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13998
13998
  )
13999
13999
  }
14000
14000
  ));
14001
- an.displayName = $h.displayName;
14002
- var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], JC = [" ", "Enter"], An = "Select", [ws, ys, ZC] = aa(An), [ar, pE] = Ut(An, [
14003
- ZC,
14001
+ an.displayName = Hh.displayName;
14002
+ var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], ZC = [" ", "Enter"], An = "Select", [ws, ys, JC] = aa(An), [ar, pE] = Ut(An, [
14003
+ JC,
14004
14004
  ir
14005
14005
  ]), Ss = ir(), [QC, gn] = ar(An), [eT, tT] = ar(An), zh = (e) => {
14006
14006
  const {
@@ -14028,7 +14028,7 @@ var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], JC = [" ", "Enter"], An = "Sele
14028
14028
  defaultProp: a,
14029
14029
  onChange: c,
14030
14030
  caller: An
14031
- }), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, N] = f.useState(/* @__PURE__ */ new Set()), $ = Array.from(G).map((L) => L.props.value).join(";");
14031
+ }), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, N] = f.useState(/* @__PURE__ */ new Set()), H = Array.from(G).map((L) => L.props.value).join(";");
14032
14032
  return /* @__PURE__ */ l.jsx(ga, { ...v, children: /* @__PURE__ */ l.jsxs(
14033
14033
  QC,
14034
14034
  {
@@ -14082,7 +14082,7 @@ var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], JC = [" ", "Enter"], An = "Sele
14082
14082
  Array.from(G)
14083
14083
  ]
14084
14084
  },
14085
- $
14085
+ H
14086
14086
  ) : null
14087
14087
  ]
14088
14088
  }
@@ -14157,7 +14157,7 @@ var nT = "SelectIcon", Kh = f.forwardRef(
14157
14157
  }
14158
14158
  );
14159
14159
  Kh.displayName = nT;
14160
- var rT = "SelectPortal", Yh = (e) => /* @__PURE__ */ l.jsx(Zo, { asChild: !0, ...e });
14160
+ var rT = "SelectPortal", Yh = (e) => /* @__PURE__ */ l.jsx(Jo, { asChild: !0, ...e });
14161
14161
  Yh.displayName = rT;
14162
14162
  var kn = "SelectContent", Xh = f.forwardRef(
14163
14163
  (e, t) => {
@@ -14171,11 +14171,11 @@ var kn = "SelectContent", Xh = f.forwardRef(
14171
14171
  s
14172
14172
  ) : null;
14173
14173
  }
14174
- return /* @__PURE__ */ l.jsx(Jh, { ...e, ref: t });
14174
+ return /* @__PURE__ */ l.jsx(Zh, { ...e, ref: t });
14175
14175
  }
14176
14176
  );
14177
14177
  Xh.displayName = kn;
14178
- var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent.RemoveScroll"), Jh = f.forwardRef(
14178
+ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent.RemoveScroll"), Zh = f.forwardRef(
14179
14179
  (e, t) => {
14180
14180
  const {
14181
14181
  __scopeSelect: n,
@@ -14199,13 +14199,13 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14199
14199
  ...b
14200
14200
  } = e, w = gn(kn, n), [y, R] = f.useState(null), [S, C] = f.useState(null), E = Te(t, (Y) => R(Y)), [I, A] = f.useState(null), [k, M] = f.useState(
14201
14201
  null
14202
- ), W = ys(n), [G, N] = f.useState(!1), $ = f.useRef(!1);
14202
+ ), W = ys(n), [G, N] = f.useState(!1), H = f.useRef(!1);
14203
14203
  f.useEffect(() => {
14204
14204
  if (y) return ra(y);
14205
14205
  }, [y]), na();
14206
14206
  const L = f.useCallback(
14207
14207
  (Y) => {
14208
- const [P, ...Z] = W().map((ie) => ie.ref.current), [ne] = Z.slice(-1), le = document.activeElement;
14208
+ const [P, ...J] = W().map((ie) => ie.ref.current), [ne] = J.slice(-1), le = document.activeElement;
14209
14209
  for (const ie of Y)
14210
14210
  if (ie === le || (ie == null || ie.scrollIntoView({ block: "nearest" }), ie === P && S && (S.scrollTop = 0), ie === ne && S && (S.scrollTop = S.scrollHeight), ie == null || ie.focus(), document.activeElement !== le)) return;
14211
14211
  },
@@ -14227,11 +14227,11 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14227
14227
  x: Math.abs(Math.round(ne.pageX) - (((le = _.current) == null ? void 0 : le.x) ?? 0)),
14228
14228
  y: Math.abs(Math.round(ne.pageY) - (((ie = _.current) == null ? void 0 : ie.y) ?? 0))
14229
14229
  };
14230
- }, Z = (ne) => {
14230
+ }, J = (ne) => {
14231
14231
  Y.x <= 10 && Y.y <= 10 ? ne.preventDefault() : y.contains(ne.target) || O(!1), document.removeEventListener("pointermove", P), _.current = null;
14232
14232
  };
14233
- return _.current !== null && (document.addEventListener("pointermove", P), document.addEventListener("pointerup", Z, { capture: !0, once: !0 })), () => {
14234
- document.removeEventListener("pointermove", P), document.removeEventListener("pointerup", Z, { capture: !0 });
14233
+ return _.current !== null && (document.addEventListener("pointermove", P), document.addEventListener("pointerup", J, { capture: !0, once: !0 })), () => {
14234
+ document.removeEventListener("pointermove", P), document.removeEventListener("pointerup", J, { capture: !0 });
14235
14235
  };
14236
14236
  }
14237
14237
  }, [y, O, _]), f.useEffect(() => {
@@ -14241,21 +14241,21 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14241
14241
  };
14242
14242
  }, [O]);
14243
14243
  const [z, q] = pp((Y) => {
14244
- const P = W().filter((le) => !le.disabled), Z = P.find((le) => le.ref.current === document.activeElement), ne = mp(P, Y, Z);
14244
+ const P = W().filter((le) => !le.disabled), J = P.find((le) => le.ref.current === document.activeElement), ne = mp(P, Y, J);
14245
14245
  ne && setTimeout(() => ne.ref.current.focus());
14246
14246
  }), oe = f.useCallback(
14247
- (Y, P, Z) => {
14248
- const ne = !$.current && !Z;
14249
- (w.value !== void 0 && w.value === P || ne) && (A(Y), ne && ($.current = !0));
14247
+ (Y, P, J) => {
14248
+ const ne = !H.current && !J;
14249
+ (w.value !== void 0 && w.value === P || ne) && (A(Y), ne && (H.current = !0));
14250
14250
  },
14251
14251
  [w.value]
14252
14252
  ), F = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Q = f.useCallback(
14253
- (Y, P, Z) => {
14254
- const ne = !$.current && !Z;
14253
+ (Y, P, J) => {
14254
+ const ne = !H.current && !J;
14255
14255
  (w.value !== void 0 && w.value === P || ne) && M(Y);
14256
14256
  },
14257
14257
  [w.value]
14258
- ), de = r === "popper" ? Ii : Zh, be = de === Ii ? {
14258
+ ), de = r === "popper" ? Ii : Jh, be = de === Ii ? {
14259
14259
  side: a,
14260
14260
  sideOffset: c,
14261
14261
  align: u,
@@ -14284,7 +14284,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14284
14284
  isPositioned: G,
14285
14285
  searchRef: z,
14286
14286
  children: /* @__PURE__ */ l.jsx(es, { as: sT, allowPinchZoom: !0, children: /* @__PURE__ */ l.jsx(
14287
- Jo,
14287
+ Zo,
14288
14288
  {
14289
14289
  asChild: !0,
14290
14290
  trapped: w.open,
@@ -14296,7 +14296,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14296
14296
  (P = w.trigger) == null || P.focus({ preventScroll: !0 }), Y.preventDefault();
14297
14297
  }),
14298
14298
  children: /* @__PURE__ */ l.jsx(
14299
- Hr,
14299
+ $r,
14300
14300
  {
14301
14301
  asChild: !0,
14302
14302
  disableOutsidePointerEvents: !0,
@@ -14345,8 +14345,8 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14345
14345
  );
14346
14346
  }
14347
14347
  );
14348
- Jh.displayName = oT;
14349
- var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
14348
+ Zh.displayName = oT;
14349
+ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
14350
14350
  const { __scopeSelect: n, onPlaced: r, ...o } = e, s = gn(kn, n), i = vn(kn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Te(t, (E) => d(E)), p = ys(n), x = f.useRef(!1), g = f.useRef(!0), { viewport: v, selectedItem: m, selectedItemText: b, focusSelectedItem: w } = i, y = f.useCallback(() => {
14351
14351
  if (s.trigger && s.valueNode && a && u && v && m && b) {
14352
14352
  const E = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), k = b.getBoundingClientRect();
@@ -14368,7 +14368,7 @@ var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
14368
14368
  ]);
14369
14369
  a.style.minWidth = Fe + "px", a.style.right = Ae + "px";
14370
14370
  }
14371
- const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), $ = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), X = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = $ + L + G + O + X, z = Math.min(m.offsetHeight * 5, _), q = window.getComputedStyle(v), oe = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), Q = E.top + E.height / 2 - Dt, de = W - Q, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = $ + L + Y, Z = _ - P;
14371
+ const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), H = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), X = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = H + L + G + O + X, z = Math.min(m.offsetHeight * 5, _), q = window.getComputedStyle(v), oe = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), Q = E.top + E.height / 2 - Dt, de = W - Q, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = H + L + Y, J = _ - P;
14372
14372
  if (P <= Q) {
14373
14373
  const le = M.length > 0 && m === M[M.length - 1].ref.current;
14374
14374
  a.style.bottom = "0px";
@@ -14383,9 +14383,9 @@ var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
14383
14383
  a.style.top = "0px";
14384
14384
  const Pe = Math.max(
14385
14385
  Q,
14386
- $ + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
14386
+ H + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
14387
14387
  (le ? oe : 0) + be
14388
- ) + Z;
14388
+ ) + J;
14389
14389
  a.style.height = Pe + "px", v.scrollTop = P - Q + v.offsetTop;
14390
14390
  }
14391
14391
  a.style.margin = `${Dt}px 0`, a.style.minHeight = z + "px", a.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => x.current = !0);
@@ -14450,7 +14450,7 @@ var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
14450
14450
  }
14451
14451
  );
14452
14452
  });
14453
- Zh.displayName = iT;
14453
+ Jh.displayName = iT;
14454
14454
  var aT = "SelectPopperPosition", Ii = f.forwardRef((e, t) => {
14455
14455
  const {
14456
14456
  __scopeSelect: n,
@@ -14620,7 +14620,7 @@ var Fo = "SelectItem", [fT, rp] = ar(Fo), op = f.forwardRef(
14620
14620
  }),
14621
14621
  onKeyDown: ee(i.onKeyDown, (w) => {
14622
14622
  var R;
14623
- ((R = c.searchRef) == null ? void 0 : R.current) !== "" && w.key === " " || (JC.includes(w.key) && b(), w.key === " " && w.preventDefault());
14623
+ ((R = c.searchRef) == null ? void 0 : R.current) !== "" && w.key === " " || (ZC.includes(w.key) && b(), w.key === " " && w.preventDefault());
14624
14624
  })
14625
14625
  }
14626
14626
  )
@@ -15016,8 +15016,8 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
15016
15016
  }
15017
15017
  };
15018
15018
  return /* @__PURE__ */ l.jsxs(oh, { open: r, onOpenChange: o, children: [
15019
- /* @__PURE__ */ l.jsx(Z0, { asChild: !0, children: /* @__PURE__ */ l.jsxs(ke, { variant: "outline", size: "sm", className: n, children: [
15020
- /* @__PURE__ */ l.jsx(Jp, { className: "h-4 w-4 mr-2" }),
15019
+ /* @__PURE__ */ l.jsx(J0, { asChild: !0, children: /* @__PURE__ */ l.jsxs(ke, { variant: "outline", size: "sm", className: n, children: [
15020
+ /* @__PURE__ */ l.jsx(Zp, { className: "h-4 w-4 mr-2" }),
15021
15021
  "Settings",
15022
15022
  u && /* @__PURE__ */ l.jsx(Ru, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
15023
15023
  ] }) }),
@@ -15029,7 +15029,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
15029
15029
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-6 py-6", children: [
15030
15030
  /* @__PURE__ */ l.jsxs(xo, { children: [
15031
15031
  /* @__PURE__ */ l.jsx(bo, { className: "pb-3", children: /* @__PURE__ */ l.jsxs(wo, { className: "text-lg flex items-center gap-2", children: [
15032
- /* @__PURE__ */ l.jsx(Zp, { className: "h-5 w-5" }),
15032
+ /* @__PURE__ */ l.jsx(Jp, { className: "h-5 w-5" }),
15033
15033
  "API Configuration"
15034
15034
  ] }) }),
15035
15035
  /* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
@@ -15361,9 +15361,9 @@ export {
15361
15361
  lE as getCurrentSettings,
15362
15362
  W0 as getDefaultApiConfig,
15363
15363
  V0 as getDefaultChatSettings,
15364
- Hg as onChatTokenChanged,
15364
+ $g as onChatTokenChanged,
15365
15365
  fl as post,
15366
- $g as put,
15366
+ Hg as put,
15367
15367
  dl as setChatToken,
15368
15368
  Fi as useChat,
15369
15369
  aE as useChatRouting,