teodor-new-chat-ui 4.3.246 → 4.3.247

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
@@ -66,8 +66,8 @@ function Dm() {
66
66
  {
67
67
  var we = g.ReactDebugCurrentFrame, Ye = we.getStackAddendum();
68
68
  Ye !== "" && (K += "%s", ie = ie.concat([Ye]));
69
- var at = ie.map(function(He) {
70
- return String(He);
69
+ var at = ie.map(function(Ue) {
70
+ return String(Ue);
71
71
  });
72
72
  at.unshift("Warning: " + K), Function.prototype.apply.call(console[R], console, at);
73
73
  }
@@ -126,9 +126,9 @@ function Dm() {
126
126
  var we = R.displayName || null;
127
127
  return we !== null ? we : F(R.type) || "Memo";
128
128
  case p: {
129
- var Ye = R, at = Ye._payload, He = Ye._init;
129
+ var Ye = R, at = Ye._payload, Ue = Ye._init;
130
130
  try {
131
- return F(He(at));
131
+ return F(Ue(at));
132
132
  } catch {
133
133
  return null;
134
134
  }
@@ -233,27 +233,27 @@ function Dm() {
233
233
  at = ee.current, ee.current = null, Ee();
234
234
  try {
235
235
  if (K) {
236
- var He = function() {
236
+ var Ue = function() {
237
237
  throw Error();
238
238
  };
239
- if (Object.defineProperty(He.prototype, "props", {
239
+ if (Object.defineProperty(Ue.prototype, "props", {
240
240
  set: function() {
241
241
  throw Error();
242
242
  }
243
243
  }), typeof Reflect == "object" && Reflect.construct) {
244
244
  try {
245
- Reflect.construct(He, []);
245
+ Reflect.construct(Ue, []);
246
246
  } catch (Ft) {
247
247
  we = Ft;
248
248
  }
249
- Reflect.construct(R, [], He);
249
+ Reflect.construct(R, [], Ue);
250
250
  } else {
251
251
  try {
252
- He.call();
252
+ Ue.call();
253
253
  } catch (Ft) {
254
254
  we = Ft;
255
255
  }
256
- R.call(He.prototype);
256
+ R.call(Ue.prototype);
257
257
  }
258
258
  } else {
259
259
  try {
@@ -288,7 +288,7 @@ function Dm() {
288
288
  var Fn = R ? R.displayName || R.name : "", Nn = Fn ? P(Fn) : "";
289
289
  return typeof R == "function" && te.set(R, Nn), Nn;
290
290
  }
291
- function Me(R, K, ie) {
291
+ function De(R, K, ie) {
292
292
  return re(R, !1);
293
293
  }
294
294
  function Y(R) {
@@ -311,7 +311,7 @@ function Dm() {
311
311
  if (typeof R == "object")
312
312
  switch (R.$$typeof) {
313
313
  case l:
314
- return Me(R.render);
314
+ return De(R.render);
315
315
  case f:
316
316
  return de(R.type, K, ie);
317
317
  case p: {
@@ -332,22 +332,22 @@ function Dm() {
332
332
  } else
333
333
  ze.setExtraStackFrame(null);
334
334
  }
335
- function Ue(R, K, ie, we, Ye) {
335
+ function We(R, K, ie, we, Ye) {
336
336
  {
337
337
  var at = Function.call.bind(ke);
338
- for (var He in R)
339
- if (at(R, He)) {
338
+ for (var Ue in R)
339
+ if (at(R, Ue)) {
340
340
  var $e = void 0;
341
341
  try {
342
- if (typeof R[He] != "function") {
343
- var Ot = Error((we || "React class") + ": " + ie + " type `" + He + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof R[He] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
342
+ if (typeof R[Ue] != "function") {
343
+ var Ot = Error((we || "React class") + ": " + ie + " type `" + Ue + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof R[Ue] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
344
  throw Ot.name = "Invariant Violation", Ot;
345
345
  }
346
- $e = R[He](K, He, we, ie, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
346
+ $e = R[Ue](K, Ue, we, ie, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
347
  } catch (bt) {
348
348
  $e = bt;
349
349
  }
350
- $e && !($e instanceof Error) && (Be(Ye), 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).", we || "React class", ie, He, typeof $e), Be(null)), $e instanceof Error && !($e.message in Ne) && (Ne[$e.message] = !0, Be(Ye), w("Failed %s type: %s", ie, $e.message), Be(null));
350
+ $e && !($e instanceof Error) && (Be(Ye), 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).", we || "React class", ie, Ue, typeof $e), Be(null)), $e instanceof Error && !($e.message in Ne) && (Ne[$e.message] = !0, Be(Ye), w("Failed %s type: %s", ie, $e.message), Be(null));
351
351
  }
352
352
  }
353
353
  }
@@ -389,7 +389,7 @@ function Dm() {
389
389
  }
390
390
  return R.ref !== void 0;
391
391
  }
392
- function De(R) {
392
+ function Ae(R) {
393
393
  if (ke.call(R, "key")) {
394
394
  var K = Object.getOwnPropertyDescriptor(R, "key").get;
395
395
  if (K && K.isReactWarning)
@@ -397,10 +397,10 @@ function Dm() {
397
397
  }
398
398
  return R.key !== void 0;
399
399
  }
400
- function We(R, K) {
400
+ function He(R, K) {
401
401
  typeof R.ref == "string" && mt.current;
402
402
  }
403
- function Pe(R, K) {
403
+ function Oe(R, K) {
404
404
  {
405
405
  var ie = function() {
406
406
  Ct || (Ct = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", K));
@@ -422,7 +422,7 @@ function Dm() {
422
422
  });
423
423
  }
424
424
  }
425
- var Ze = function(R, K, ie, we, Ye, at, He) {
425
+ var Ze = function(R, K, ie, we, Ye, at, Ue) {
426
426
  var $e = {
427
427
  // This tag allows us to uniquely identify this as a React Element
428
428
  $$typeof: t,
@@ -430,7 +430,7 @@ function Dm() {
430
430
  type: R,
431
431
  key: K,
432
432
  ref: ie,
433
- props: He,
433
+ props: Ue,
434
434
  // Record the component responsible for creating this element.
435
435
  _owner: at
436
436
  };
@@ -453,20 +453,20 @@ function Dm() {
453
453
  };
454
454
  function Fe(R, K, ie, we, Ye) {
455
455
  {
456
- var at, He = {}, $e = null, Ot = null;
457
- ie !== void 0 && (St(ie), $e = "" + ie), De(K) && (St(K.key), $e = "" + K.key), ne(K) && (Ot = K.ref, We(K, Ye));
456
+ var at, Ue = {}, $e = null, Ot = null;
457
+ ie !== void 0 && (St(ie), $e = "" + ie), Ae(K) && (St(K.key), $e = "" + K.key), ne(K) && (Ot = K.ref, He(K, Ye));
458
458
  for (at in K)
459
- ke.call(K, at) && !ct.hasOwnProperty(at) && (He[at] = K[at]);
459
+ ke.call(K, at) && !ct.hasOwnProperty(at) && (Ue[at] = K[at]);
460
460
  if (R && R.defaultProps) {
461
461
  var bt = R.defaultProps;
462
462
  for (at in bt)
463
- He[at] === void 0 && (He[at] = bt[at]);
463
+ Ue[at] === void 0 && (Ue[at] = bt[at]);
464
464
  }
465
465
  if ($e || Ot) {
466
466
  var vt = typeof R == "function" ? R.displayName || R.name || "Unknown" : R;
467
- $e && Pe(He, vt), Ot && tt(He, vt);
467
+ $e && Oe(Ue, vt), Ot && tt(Ue, vt);
468
468
  }
469
- return Ze(R, $e, Ot, Ye, we, mt.current, He);
469
+ return Ze(R, $e, Ot, Ye, we, mt.current, Ue);
470
470
  }
471
471
  }
472
472
  var Pt = g.ReactCurrentOwner, jt = g.ReactDebugCurrentFrame;
@@ -498,7 +498,7 @@ Check the render method of \`` + R + "`.";
498
498
  return "";
499
499
  }
500
500
  var Tt = {};
501
- function je(R) {
501
+ function _e(R) {
502
502
  {
503
503
  var K = ht();
504
504
  if (!K) {
@@ -515,7 +515,7 @@ Check the top-level render call using <` + ie + ">.");
515
515
  if (!R._store || R._store.validated || R.key != null)
516
516
  return;
517
517
  R._store.validated = !0;
518
- var ie = je(K);
518
+ var ie = _e(K);
519
519
  if (Tt[ie])
520
520
  return;
521
521
  Tt[ie] = !0;
@@ -537,8 +537,8 @@ Check the top-level render call using <` + ie + ">.");
537
537
  else if (R) {
538
538
  var Ye = y(R);
539
539
  if (typeof Ye == "function" && Ye !== R.entries)
540
- for (var at = Ye.call(R), He; !(He = at.next()).done; )
541
- xe(He.value) && Vt(He.value, K);
540
+ for (var at = Ye.call(R), Ue; !(Ue = at.next()).done; )
541
+ xe(Ue.value) && Vt(Ue.value, K);
542
542
  }
543
543
  }
544
544
  }
@@ -558,7 +558,7 @@ Check the top-level render call using <` + ie + ">.");
558
558
  return;
559
559
  if (ie) {
560
560
  var we = F(K);
561
- Ue(ie, R.props, "prop", we, R);
561
+ We(ie, R.props, "prop", we, R);
562
562
  } else if (K.PropTypes !== void 0 && !ve) {
563
563
  ve = !0;
564
564
  var Ye = F(K);
@@ -582,8 +582,8 @@ Check the top-level render call using <` + ie + ">.");
582
582
  var Jn = {};
583
583
  function Ln(R, K, ie, we, Ye, at) {
584
584
  {
585
- var He = I(R);
586
- if (!He) {
585
+ var Ue = I(R);
586
+ if (!Ue) {
587
587
  var $e = "";
588
588
  (R === void 0 || typeof R == "object" && R !== null && Object.keys(R).length === 0) && ($e += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
589
589
  var Ot = gt();
@@ -594,7 +594,7 @@ Check the top-level render call using <` + ie + ">.");
594
594
  var vt = Fe(R, K, ie, Ye, at);
595
595
  if (vt == null)
596
596
  return vt;
597
- if (He) {
597
+ if (Ue) {
598
598
  var Kt = K.children;
599
599
  if (Kt !== void 0)
600
600
  if (we)
@@ -874,10 +874,10 @@ const xg = (e) => {
874
874
  asap: wg,
875
875
  isIterable: bg
876
876
  };
877
- function _e(e, t, n, r, o) {
877
+ function Pe(e, t, n, r, o) {
878
878
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
879
879
  }
880
- _.inherits(_e, Error, {
880
+ _.inherits(Pe, Error, {
881
881
  toJSON: function() {
882
882
  return {
883
883
  // Standard
@@ -898,7 +898,7 @@ _.inherits(_e, Error, {
898
898
  };
899
899
  }
900
900
  });
901
- const au = _e.prototype, lu = {};
901
+ const au = Pe.prototype, lu = {};
902
902
  [
903
903
  "ERR_BAD_OPTION_VALUE",
904
904
  "ERR_BAD_OPTION",
@@ -916,15 +916,15 @@ const au = _e.prototype, lu = {};
916
916
  ].forEach((e) => {
917
917
  lu[e] = { value: e };
918
918
  });
919
- Object.defineProperties(_e, lu);
919
+ Object.defineProperties(Pe, lu);
920
920
  Object.defineProperty(au, "isAxiosError", { value: !0 });
921
- _e.from = (e, t, n, r, o, s) => {
921
+ Pe.from = (e, t, n, r, o, s) => {
922
922
  const i = Object.create(au);
923
923
  _.toFlatObject(e, i, function(d) {
924
924
  return d !== Error.prototype;
925
925
  }, (c) => c !== "isAxiosError");
926
926
  const a = e && e.message ? e.message : "Error", l = t == null && e ? e.code : t;
927
- return _e.call(i, a, l, n, r, o), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", s && Object.assign(i, s), i;
927
+ return Pe.call(i, a, l, n, r, o), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", s && Object.assign(i, s), i;
928
928
  };
929
929
  const Sg = null;
930
930
  function Mi(e) {
@@ -964,7 +964,7 @@ function Ts(e, t, n) {
964
964
  if (_.isBoolean(m))
965
965
  return m.toString();
966
966
  if (!l && _.isBlob(m))
967
- throw new _e("Blob is not supported. Use a Buffer instead.");
967
+ throw new Pe("Blob is not supported. Use a Buffer instead.");
968
968
  return _.isArrayBuffer(m) || _.isTypedArray(m) ? l && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
969
969
  }
970
970
  function d(m, x, y) {
@@ -1215,7 +1215,7 @@ const ho = {
1215
1215
  return JSON.parse(t, this.parseReviver);
1216
1216
  } catch (a) {
1217
1217
  if (i)
1218
- throw a.name === "SyntaxError" ? _e.from(a, _e.ERR_BAD_RESPONSE, this, null, this.response) : a;
1218
+ throw a.name === "SyntaxError" ? Pe.from(a, Pe.ERR_BAD_RESPONSE, this, null, this.response) : a;
1219
1219
  }
1220
1220
  }
1221
1221
  return t;
@@ -1458,16 +1458,16 @@ function hu(e) {
1458
1458
  return !!(e && e.__CANCEL__);
1459
1459
  }
1460
1460
  function Ar(e, t, n) {
1461
- _e.call(this, e ?? "canceled", _e.ERR_CANCELED, t, n), this.name = "CanceledError";
1461
+ Pe.call(this, e ?? "canceled", Pe.ERR_CANCELED, t, n), this.name = "CanceledError";
1462
1462
  }
1463
- _.inherits(Ar, _e, {
1463
+ _.inherits(Ar, Pe, {
1464
1464
  __CANCEL__: !0
1465
1465
  });
1466
1466
  function mu(e, t, n) {
1467
1467
  const r = n.config.validateStatus;
1468
- !n.status || !r || r(n.status) ? e(n) : t(new _e(
1468
+ !n.status || !r || r(n.status) ? e(n) : t(new Pe(
1469
1469
  "Request failed with status code " + n.status,
1470
- [_e.ERR_BAD_REQUEST, _e.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1470
+ [Pe.ERR_BAD_REQUEST, Pe.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1471
1471
  n.config,
1472
1472
  n.request,
1473
1473
  n
@@ -1690,16 +1690,16 @@ const xu = (e) => {
1690
1690
  "onloadend" in y ? y.onloadend = g : y.onreadystatechange = function() {
1691
1691
  !y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(g);
1692
1692
  }, y.onabort = function() {
1693
- y && (r(new _e("Request aborted", _e.ECONNABORTED, e, y)), y = null);
1693
+ y && (r(new Pe("Request aborted", Pe.ECONNABORTED, e, y)), y = null);
1694
1694
  }, y.onerror = function(T) {
1695
- const C = T && T.message ? T.message : "Network Error", S = new _e(C, _e.ERR_NETWORK, e, y);
1695
+ const C = T && T.message ? T.message : "Network Error", S = new Pe(C, Pe.ERR_NETWORK, e, y);
1696
1696
  S.event = T || null, r(S), y = null;
1697
1697
  }, y.ontimeout = function() {
1698
1698
  let T = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1699
1699
  const C = o.transitional || fu;
1700
- o.timeoutErrorMessage && (T = o.timeoutErrorMessage), r(new _e(
1700
+ o.timeoutErrorMessage && (T = o.timeoutErrorMessage), r(new Pe(
1701
1701
  T,
1702
- C.clarifyTimeoutError ? _e.ETIMEDOUT : _e.ECONNABORTED,
1702
+ C.clarifyTimeoutError ? Pe.ETIMEDOUT : Pe.ECONNABORTED,
1703
1703
  e,
1704
1704
  y
1705
1705
  )), y = null;
@@ -1710,7 +1710,7 @@ const xu = (e) => {
1710
1710
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
1711
1711
  const w = Wg(o.url);
1712
1712
  if (w && zt.protocols.indexOf(w) === -1) {
1713
- r(new _e("Unsupported protocol " + w + ":", _e.ERR_BAD_REQUEST, e));
1713
+ r(new Pe("Unsupported protocol " + w + ":", Pe.ERR_BAD_REQUEST, e));
1714
1714
  return;
1715
1715
  }
1716
1716
  y.send(s || null);
@@ -1723,11 +1723,11 @@ const xu = (e) => {
1723
1723
  if (!o) {
1724
1724
  o = !0, a();
1725
1725
  const d = c instanceof Error ? c : this.reason;
1726
- r.abort(d instanceof _e ? d : new Ar(d instanceof Error ? d.message : d));
1726
+ r.abort(d instanceof Pe ? d : new Ar(d instanceof Error ? d.message : d));
1727
1727
  }
1728
1728
  };
1729
1729
  let i = t && setTimeout(() => {
1730
- i = null, s(new _e(`timeout ${t} of ms exceeded`, _e.ETIMEDOUT));
1730
+ i = null, s(new Pe(`timeout ${t} of ms exceeded`, Pe.ETIMEDOUT));
1731
1731
  }, t);
1732
1732
  const a = () => {
1733
1733
  e && (i && clearTimeout(i), i = null, e.forEach((c) => {
@@ -1832,7 +1832,7 @@ const xu = (e) => {
1832
1832
  let g = x && x[m];
1833
1833
  if (g)
1834
1834
  return g.call(x);
1835
- throw new _e(`Response type '${m}' is not supported`, _e.ERR_NOT_SUPPORT, y);
1835
+ throw new Pe(`Response type '${m}' is not supported`, Pe.ERR_NOT_SUPPORT, y);
1836
1836
  });
1837
1837
  });
1838
1838
  const p = async (m) => {
@@ -1932,11 +1932,11 @@ const xu = (e) => {
1932
1932
  });
1933
1933
  } catch (A) {
1934
1934
  throw j && j(), A && A.name === "TypeError" && /Load failed|fetch/i.test(A.message) ? Object.assign(
1935
- new _e("Network Error", _e.ERR_NETWORK, m, F),
1935
+ new Pe("Network Error", Pe.ERR_NETWORK, m, F),
1936
1936
  {
1937
1937
  cause: A.cause || A
1938
1938
  }
1939
- ) : _e.from(A, A && A.code, m, F);
1939
+ ) : Pe.from(A, A && A.code, m, F);
1940
1940
  }
1941
1941
  };
1942
1942
  }, sx = /* @__PURE__ */ new Map(), yu = (e) => {
@@ -1978,7 +1978,7 @@ const Il = (e) => `- ${e}`, ix = (e) => _.isFunction(e) || e === null || e === !
1978
1978
  r = e[i];
1979
1979
  let a;
1980
1980
  if (o = r, !ix(r) && (o = Li[(a = String(r)).toLowerCase()], o === void 0))
1981
- throw new _e(`Unknown adapter '${a}'`);
1981
+ throw new Pe(`Unknown adapter '${a}'`);
1982
1982
  if (o && (_.isFunction(o) || (o = o.get(t))))
1983
1983
  break;
1984
1984
  s[a || "#" + i] = o;
@@ -1990,7 +1990,7 @@ const Il = (e) => `- ${e}`, ix = (e) => _.isFunction(e) || e === null || e === !
1990
1990
  let a = n ? i.length > 1 ? `since :
1991
1991
  ` + i.map(Il).join(`
1992
1992
  `) : " " + Il(i[0]) : "as no adapter specified";
1993
- throw new _e(
1993
+ throw new Pe(
1994
1994
  "There is no suitable adapter to dispatch the request " + a,
1995
1995
  "ERR_NOT_SUPPORT"
1996
1996
  );
@@ -2034,9 +2034,9 @@ ks.transitional = function(t, n, r) {
2034
2034
  }
2035
2035
  return (s, i, a) => {
2036
2036
  if (t === !1)
2037
- throw new _e(
2037
+ throw new Pe(
2038
2038
  o(i, " has been removed" + (n ? " in " + n : "")),
2039
- _e.ERR_DEPRECATED
2039
+ Pe.ERR_DEPRECATED
2040
2040
  );
2041
2041
  return n && !Al[i] && (Al[i] = !0, console.warn(
2042
2042
  o(
@@ -2051,7 +2051,7 @@ ks.spelling = function(t) {
2051
2051
  };
2052
2052
  function ax(e, t, n) {
2053
2053
  if (typeof e != "object")
2054
- throw new _e("options must be an object", _e.ERR_BAD_OPTION_VALUE);
2054
+ throw new Pe("options must be an object", Pe.ERR_BAD_OPTION_VALUE);
2055
2055
  const r = Object.keys(e);
2056
2056
  let o = r.length;
2057
2057
  for (; o-- > 0; ) {
@@ -2059,11 +2059,11 @@ function ax(e, t, n) {
2059
2059
  if (i) {
2060
2060
  const a = e[s], l = a === void 0 || i(a, s, e);
2061
2061
  if (l !== !0)
2062
- throw new _e("option " + s + " must be " + l, _e.ERR_BAD_OPTION_VALUE);
2062
+ throw new Pe("option " + s + " must be " + l, Pe.ERR_BAD_OPTION_VALUE);
2063
2063
  continue;
2064
2064
  }
2065
2065
  if (n !== !0)
2066
- throw new _e("Unknown option " + s, _e.ERR_BAD_OPTION);
2066
+ throw new Pe("Unknown option " + s, Pe.ERR_BAD_OPTION);
2067
2067
  }
2068
2068
  }
2069
2069
  const $o = {
@@ -2356,7 +2356,7 @@ It.CancelToken = lx;
2356
2356
  It.isCancel = hu;
2357
2357
  It.VERSION = wu;
2358
2358
  It.toFormData = Ts;
2359
- It.AxiosError = _e;
2359
+ It.AxiosError = Pe;
2360
2360
  It.Cancel = It.CanceledError;
2361
2361
  It.all = function(t) {
2362
2362
  return Promise.all(t);
@@ -3415,24 +3415,24 @@ function Kx(e = {}) {
3415
3415
  threadId: j.threadId ?? null,
3416
3416
  headers: {}
3417
3417
  }, (async () => {
3418
- var pe, Re, Ee, W, ee, q, P, H, te, se, re, Me, Y, de, ke, Ne, ze, Be;
3419
- const J = (Ue) => {
3418
+ var pe, Re, Ee, W, ee, q, P, H, te, se, re, De, Y, de, ke, Ne, ze, Be;
3419
+ const J = (We) => {
3420
3420
  var qe;
3421
3421
  try {
3422
- const Ge = JSON.parse(JSON.stringify(Ue));
3422
+ const Ge = JSON.parse(JSON.stringify(We));
3423
3423
  return (qe = Ge == null ? void 0 : Ge.payload) != null && qe.files_info && Array.isArray(Ge.payload.files_info) && (Ge.payload.files_info = Ge.payload.files_info.map((et) => ({
3424
3424
  ...et,
3425
3425
  data: et != null && et.data ? `<base64 ${String(et.data).length} chars>` : et == null ? void 0 : et.data
3426
3426
  }))), Ge;
3427
3427
  } catch {
3428
- return Ue;
3428
+ return We;
3429
3429
  }
3430
3430
  };
3431
3431
  try {
3432
- let Ue = {};
3432
+ let We = {};
3433
3433
  try {
3434
3434
  if (r)
3435
- Ue = { Authorization: `Bearer ${r}` };
3435
+ We = { Authorization: `Bearer ${r}` };
3436
3436
  else if (typeof window < "u") {
3437
3437
  const Fe = window.__AUTH_TOKEN__, Pt = ((pe = window.localStorage) == null ? void 0 : pe.getItem("authToken")) || null;
3438
3438
  let jt = null;
@@ -3442,7 +3442,7 @@ function Kx(e = {}) {
3442
3442
  } catch {
3443
3443
  }
3444
3444
  const V = Fe || Pt || jt || null;
3445
- V && (Ue = { Authorization: `Bearer ${V}` });
3445
+ V && (We = { Authorization: `Bearer ${V}` });
3446
3446
  }
3447
3447
  } catch {
3448
3448
  }
@@ -3459,7 +3459,7 @@ function Kx(e = {}) {
3459
3459
  } catch {
3460
3460
  }
3461
3461
  const Ge = {
3462
- ...Ue,
3462
+ ...We,
3463
3463
  ...qe,
3464
3464
  ...s.current
3465
3465
  }, et = {
@@ -3494,13 +3494,13 @@ function Kx(e = {}) {
3494
3494
  ct = [], T.current && p((Fe) => Fe + Ze);
3495
3495
  }
3496
3496
  le = null;
3497
- }, De = () => {
3497
+ }, Ae = () => {
3498
3498
  typeof window < "u" && le == null && (le = requestAnimationFrame(ne));
3499
3499
  };
3500
- let We = Date.now();
3501
- const Pe = setInterval(() => {
3500
+ let He = Date.now();
3501
+ const Oe = setInterval(() => {
3502
3502
  var Ze;
3503
- if (Date.now() - We > 18e5) {
3503
+ if (Date.now() - He > 18e5) {
3504
3504
  const Fe = "Stream idle timeout";
3505
3505
  d(Fe), D = "error", M = Fe, B.abort(), (Ze = A == null ? void 0 : A.onError) == null || Ze.call(A, Fe);
3506
3506
  }
@@ -3529,60 +3529,60 @@ function Kx(e = {}) {
3529
3529
  console.debug("[use-chat] malformed SSE:", gt.slice(0, 200));
3530
3530
  continue;
3531
3531
  }
3532
- const je = qx(Tt) ? Tt.data : Tt;
3533
- We = Date.now();
3534
- const Vt = je.seq;
3532
+ const _e = qx(Tt) ? Tt.data : Tt;
3533
+ He = Date.now();
3534
+ const Vt = _e.seq;
3535
3535
  if (Vt !== void 0) {
3536
3536
  if (Vt <= Ct) {
3537
- console.debug("[use-chat] drop duplicate/out-of-order event", { seq: Vt, lastProcessedSeq: Ct, type: je.type });
3537
+ console.debug("[use-chat] drop duplicate/out-of-order event", { seq: Vt, lastProcessedSeq: Ct, type: _e.type });
3538
3538
  continue;
3539
3539
  }
3540
3540
  Ct > 0 && Vt > Ct + 1 && ((P = A == null ? void 0 : A.onGap) == null || P.call(A, { from: Ct, to: Vt })), Ct = Vt, C.current = Vt, y(Vt);
3541
3541
  }
3542
3542
  if (console.debug("[use-chat] received event", {
3543
- seq: je.seq,
3544
- type: je.type,
3543
+ seq: _e.seq,
3544
+ type: _e.type,
3545
3545
  preview: (() => {
3546
3546
  var ut;
3547
3547
  try {
3548
- return je.type === "message_delta" ? { deltaTypes: (ut = je.delta) == null ? void 0 : ut.map((kt) => kt.type), textLen: (je.delta || []).filter((kt) => kt.type === "text").map((kt) => String(kt.text || "").length) } : je.content || je.delta ? { hasContent: !0 } : {};
3548
+ return _e.type === "message_delta" ? { deltaTypes: (ut = _e.delta) == null ? void 0 : ut.map((kt) => kt.type), textLen: (_e.delta || []).filter((kt) => kt.type === "text").map((kt) => String(kt.text || "").length) } : _e.content || _e.delta ? { hasContent: !0 } : {};
3549
3549
  } catch (kt) {
3550
3550
  return { err: String(kt) };
3551
3551
  }
3552
3552
  })()
3553
- }), je.type === "checkpoint")
3554
- k.current = je.checkpointId ?? null, N.current = je.checkpointNs ?? null, m(je.checkpointId ?? null);
3555
- else if (je.type === "state_history") {
3556
- E.current = je;
3553
+ }), _e.type === "checkpoint")
3554
+ k.current = _e.checkpointId ?? null, N.current = _e.checkpointNs ?? null, m(_e.checkpointId ?? null);
3555
+ else if (_e.type === "state_history") {
3556
+ E.current = _e;
3557
3557
  try {
3558
- const kt = Ur(je).latest;
3558
+ const kt = Ur(_e).latest;
3559
3559
  kt && (k.current = kt.checkpointId ?? null, N.current = kt.checkpointNs ?? null, m(kt.checkpointId ?? null));
3560
3560
  } catch (ut) {
3561
3561
  console.warn("[use-chat] Failed to hydrate state_history payload", ut);
3562
3562
  }
3563
3563
  }
3564
3564
  try {
3565
- $ == null || $(je);
3565
+ $ == null || $(_e);
3566
3566
  } catch (ut) {
3567
- console.error("[use-chat] Error in onEvent callback:", ut, "for event:", je.type);
3567
+ console.error("[use-chat] Error in onEvent callback:", ut, "for event:", _e.type);
3568
3568
  }
3569
- if (je.type === "token" && e.autoAppendAssistant !== !1)
3570
- ct.push(je.content), De();
3571
- else if (je.type === "message_delta") {
3572
- const ut = je.delta.filter((kt) => kt.type === "text").map((kt) => kt.text).join("");
3573
- ut && e.autoAppendAssistant !== !1 && (ct.push(ut), De());
3574
- } else if (je.type === "heartbeat") {
3569
+ if (_e.type === "token" && e.autoAppendAssistant !== !1)
3570
+ ct.push(_e.content), Ae();
3571
+ else if (_e.type === "message_delta") {
3572
+ const ut = _e.delta.filter((kt) => kt.type === "text").map((kt) => kt.text).join("");
3573
+ ut && e.autoAppendAssistant !== !1 && (ct.push(ut), Ae());
3574
+ } else if (_e.type === "heartbeat") {
3575
3575
  console.debug("[use-chat] heartbeat received");
3576
3576
  try {
3577
- (H = A == null ? void 0 : A.onHeartbeat) == null || H.call(A, je);
3577
+ (H = A == null ? void 0 : A.onHeartbeat) == null || H.call(A, _e);
3578
3578
  } catch (ut) {
3579
3579
  console.warn("[use-chat] heartbeat callback failed", ut);
3580
3580
  }
3581
- } else if (le !== null && cancelAnimationFrame(le), ne(), je.type === "checkpoint")
3582
- m(je.checkpointId);
3583
- else if (je.type === "error") {
3584
- const ut = je;
3585
- if (d(ut.message), D = "error", M = ut.message, ut.error_type === "auth_error" || ut.code === "TOKEN_EXPIRED" || ((te = ut.message) == null ? void 0 : te.includes("token")) || ((se = ut.message) == null ? void 0 : se.includes("401")) || ((re = ut.message) == null ? void 0 : re.includes("unauthorized")) || ((Me = ut.message) == null ? void 0 : Me.includes("Unauthorized"))) {
3581
+ } else if (le !== null && cancelAnimationFrame(le), ne(), _e.type === "checkpoint")
3582
+ m(_e.checkpointId);
3583
+ else if (_e.type === "error") {
3584
+ const ut = _e;
3585
+ if (d(ut.message), D = "error", M = ut.message, ut.error_type === "auth_error" || ut.code === "TOKEN_EXPIRED" || ((te = ut.message) == null ? void 0 : te.includes("token")) || ((se = ut.message) == null ? void 0 : se.includes("401")) || ((re = ut.message) == null ? void 0 : re.includes("unauthorized")) || ((De = ut.message) == null ? void 0 : De.includes("Unauthorized"))) {
3586
3586
  console.error("[use-chat] Auth error detected:", ut.message);
3587
3587
  try {
3588
3588
  (Y = A == null ? void 0 : A.onAuthError) == null || Y.call(A, ut.message);
@@ -3609,21 +3609,21 @@ function Kx(e = {}) {
3609
3609
  } finally {
3610
3610
  (ke = ot.releaseLock) == null || ke.call(ot);
3611
3611
  }
3612
- le !== null && typeof window < "u" && window.cancelAnimationFrame(le), clearInterval(Pe);
3612
+ le !== null && typeof window < "u" && window.cancelAnimationFrame(le), clearInterval(Oe);
3613
3613
  }
3614
- } catch (Ue) {
3615
- if (Ue.name === "AbortError")
3614
+ } catch (We) {
3615
+ if (We.name === "AbortError")
3616
3616
  D = D ?? "aborted";
3617
3617
  else {
3618
- const qe = Ue.message || String(Ue);
3618
+ const qe = We.message || String(We);
3619
3619
  D = "error", M = qe, d(qe), (Ne = A == null ? void 0 : A.onError) == null || Ne.call(A, qe), Z || ((ze = A == null ? void 0 : A.onConnectionError) == null || ze.call(A, qe), Z = !0);
3620
3620
  }
3621
3621
  } finally {
3622
- const Ue = C.current, qe = k.current, Ge = N.current, et = E.current, Je = D ?? (B.signal.aborted ? "aborted" : M ? "error" : "complete");
3622
+ const We = C.current, qe = k.current, Ge = N.current, et = E.current, Je = D ?? (B.signal.aborted ? "aborted" : M ? "error" : "complete");
3623
3623
  try {
3624
3624
  (Be = A == null ? void 0 : A.onClosed) == null || Be.call(A, {
3625
3625
  reason: Je,
3626
- lastSeq: Ue,
3626
+ lastSeq: We,
3627
3627
  lastCheckpointId: qe,
3628
3628
  lastCheckpointNs: Ge,
3629
3629
  lastStateHistory: et,
@@ -3879,7 +3879,7 @@ function Xx({
3879
3879
  Et(() => {
3880
3880
  W.current = m;
3881
3881
  }, [m]);
3882
- const P = Qe(), { startStream: H, stop: te, isStreaming: se, error: re, setAuthToken: Me } = Yx({
3882
+ const P = Qe(), { startStream: H, stop: te, isStreaming: se, error: re, setAuthToken: De } = Yx({
3883
3883
  baseUrl: f,
3884
3884
  onThreadInfo: (le) => {
3885
3885
  console.log("[ChatSessionProvider] Thread info:", le.threadId), W.current !== le.threadId && (!W.current && N.messages.length <= 1 && (q.current = le.threadId), x(le.threadId));
@@ -3923,19 +3923,19 @@ function Xx({
3923
3923
  async (le, ne) => {
3924
3924
  try {
3925
3925
  await c.updateThread(le, ne), await Y();
3926
- } catch (De) {
3927
- s == null || s(String(De));
3926
+ } catch (Ae) {
3927
+ s == null || s(String(Ae));
3928
3928
  }
3929
3929
  },
3930
3930
  [c, Y, s]
3931
3931
  ), ze = Ce(
3932
- (le, ne, De) => {
3933
- const We = ne.filter((Pe) => Pe.checkpointId).map((Pe) => ({
3934
- checkpointId: Pe.checkpointId,
3935
- checkpointNs: Pe.checkpointNs ?? void 0,
3936
- createdAt: Pe.createdAt ?? ""
3932
+ (le, ne, Ae) => {
3933
+ const He = ne.filter((Oe) => Oe.checkpointId).map((Oe) => ({
3934
+ checkpointId: Oe.checkpointId,
3935
+ checkpointNs: Oe.checkpointNs ?? void 0,
3936
+ createdAt: Oe.createdAt ?? ""
3937
3937
  }));
3938
- console.log(`[ChatSessionProvider] Cached metadata for ${We.length} checkpoints from ${De}`), Ee(le, We);
3938
+ console.log(`[ChatSessionProvider] Cached metadata for ${He.length} checkpoints from ${Ae}`), Ee(le, He);
3939
3939
  },
3940
3940
  [Ee]
3941
3941
  ), Be = Ce(
@@ -3943,20 +3943,20 @@ function Xx({
3943
3943
  if (le) {
3944
3944
  C(!0), k(null);
3945
3945
  try {
3946
- const De = await c.getStateHistory({
3946
+ const Ae = await c.getStateHistory({
3947
3947
  threadId: le,
3948
3948
  checkpointId: ne || void 0
3949
3949
  // Let backend pick latest if not specified
3950
- }), { checkpoints: We } = Ur(De);
3951
- ze(le, We, `thread load (requested: ${ne})`);
3952
- const Pe = We.find((tt) => tt.messages && tt.messages.length > 0) ?? (ne ? We.find((tt) => tt.checkpointId === ne) : null) ?? We[0];
3953
- E((Pe == null ? void 0 : Pe.messages) ?? [], {
3954
- checkpointId: (Pe == null ? void 0 : Pe.checkpointId) ?? null,
3955
- checkpointNs: (Pe == null ? void 0 : Pe.checkpointNs) ?? null
3956
- }), Z(We), j(!!(Pe != null && Pe.nextCursor)), D((Pe == null ? void 0 : Pe.nextCursor) ?? null);
3957
- } catch (De) {
3958
- const We = String(De);
3959
- k(We), s == null || s(We);
3950
+ }), { checkpoints: He } = Ur(Ae);
3951
+ ze(le, He, `thread load (requested: ${ne})`);
3952
+ const Oe = He.find((tt) => tt.messages && tt.messages.length > 0) ?? (ne ? He.find((tt) => tt.checkpointId === ne) : null) ?? He[0];
3953
+ E((Oe == null ? void 0 : Oe.messages) ?? [], {
3954
+ checkpointId: (Oe == null ? void 0 : Oe.checkpointId) ?? null,
3955
+ checkpointNs: (Oe == null ? void 0 : Oe.checkpointNs) ?? null
3956
+ }), Z(He), j(!!(Oe != null && Oe.nextCursor)), D((Oe == null ? void 0 : Oe.nextCursor) ?? null);
3957
+ } catch (Ae) {
3958
+ const He = String(Ae);
3959
+ k(He), s == null || s(He);
3960
3960
  } finally {
3961
3961
  C(!1);
3962
3962
  }
@@ -3967,31 +3967,31 @@ function Xx({
3967
3967
  Et(() => {
3968
3968
  P.current = Be;
3969
3969
  }, [Be]);
3970
- const Ue = Ce(
3970
+ const We = Ce(
3971
3971
  async (le, ne) => {
3972
- const De = W.current;
3973
- if (De) {
3972
+ const Ae = W.current;
3973
+ if (Ae) {
3974
3974
  pe(!0);
3975
3975
  try {
3976
- const We = await c.getStateHistory({
3977
- threadId: De,
3976
+ const He = await c.getStateHistory({
3977
+ threadId: Ae,
3978
3978
  checkpointId: le,
3979
3979
  checkpointNs: ne ?? void 0
3980
- }), { checkpoints: Pe } = Ur(We);
3981
- ze(De, Pe, "checkpoint navigation");
3982
- const tt = Pe.find(
3980
+ }), { checkpoints: Oe } = Ur(He);
3981
+ ze(Ae, Oe, "checkpoint navigation");
3982
+ const tt = Oe.find(
3983
3983
  (Ze) => Ze.checkpointId === le && (ne ? Ze.checkpointNs === ne : !0)
3984
3984
  );
3985
3985
  if (!tt) {
3986
3986
  console.warn("[ChatSessionProvider] Requested checkpoint not found:", { checkpointId: le, checkpointNs: ne });
3987
3987
  return;
3988
3988
  }
3989
- Z(Pe), E(tt.messages ?? [], {
3989
+ Z(Oe), E(tt.messages ?? [], {
3990
3990
  checkpointId: tt.checkpointId ?? null,
3991
3991
  checkpointNs: tt.checkpointNs ?? null
3992
3992
  });
3993
- } catch (We) {
3994
- s == null || s(String(We));
3993
+ } catch (He) {
3994
+ s == null || s(String(He));
3995
3995
  } finally {
3996
3996
  pe(!1);
3997
3997
  }
@@ -4017,8 +4017,8 @@ function Xx({
4017
4017
  checkpointId: B
4018
4018
  }), { checkpoints: ne } = Ur(le);
4019
4019
  if (ne.length > 0) {
4020
- const De = ne[ne.length - 1];
4021
- I((De == null ? void 0 : De.messages) ?? []), j(!!(De != null && De.nextCursor)), D((De == null ? void 0 : De.nextCursor) ?? null);
4020
+ const Ae = ne[ne.length - 1];
4021
+ I((Ae == null ? void 0 : Ae.messages) ?? []), j(!!(Ae != null && Ae.nextCursor)), D((Ae == null ? void 0 : Ae.nextCursor) ?? null);
4022
4022
  }
4023
4023
  } catch (le) {
4024
4024
  s == null || s(String(le));
@@ -4029,18 +4029,18 @@ function Xx({
4029
4029
  }, [c, B, I, s]), Je = Ce(async () => {
4030
4030
  E([], {}), x(null), te(), Z([]), j(!1), D(null);
4031
4031
  }, [E, te]), ot = Ce(
4032
- async (le, ne, De) => {
4033
- const We = W.current;
4034
- if (!We)
4032
+ async (le, ne, Ae) => {
4033
+ const He = W.current;
4034
+ if (!He)
4035
4035
  throw new Error("No active thread to handle interrupt");
4036
- const Pe = ne ? De ?? !0 : !1;
4036
+ const Oe = ne ? Ae ?? !0 : !1;
4037
4037
  try {
4038
4038
  const tt = {
4039
- threadId: We,
4039
+ threadId: He,
4040
4040
  checkpointId: N.lastCheckpointId ?? void 0,
4041
4041
  checkpointNs: N.lastCheckpointNs ?? void 0,
4042
4042
  // The command is the key: backend extracts this and routes to LangGraph
4043
- command: { kind: "resume", value: Pe }
4043
+ command: { kind: "resume", value: Oe }
4044
4044
  };
4045
4045
  H(tt);
4046
4046
  } catch (tt) {
@@ -4065,13 +4065,15 @@ function Xx({
4065
4065
  }, [m, a]);
4066
4066
  const St = Ce(
4067
4067
  async (le, ne) => {
4068
- const De = W.current, We = (le == null ? void 0 : le.text) ?? "";
4069
- if (!De && !We) return;
4070
- const { contentParts: Pe } = await wx(
4068
+ let Ae = W.current;
4069
+ const He = (le == null ? void 0 : le.text) ?? "";
4070
+ if (!Ae && !He) return;
4071
+ !Ae && He && (Ae = `thread-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, q.current = Ae, x(Ae));
4072
+ const { contentParts: Oe } = await wx(
4071
4073
  c,
4072
4074
  (le == null ? void 0 : le.attachments) ?? []
4073
- ), tt = [...Pe];
4074
- We != null && We.trim() && tt.push({ type: "text", text: We });
4075
+ ), tt = [...Oe];
4076
+ He != null && He.trim() && tt.push({ type: "text", text: He });
4075
4077
  const Ze = {
4076
4078
  id: `msg-${Date.now()}`,
4077
4079
  role: "user",
@@ -4080,7 +4082,7 @@ function Xx({
4080
4082
  };
4081
4083
  O(Ze);
4082
4084
  const Fe = {
4083
- threadId: De,
4085
+ threadId: Ae,
4084
4086
  payload: {
4085
4087
  messages: [Ze]
4086
4088
  },
@@ -4123,7 +4125,7 @@ function Xx({
4123
4125
  hasMore: F,
4124
4126
  loadOlder: et,
4125
4127
  clearState: Je,
4126
- navigateToCheckpoint: Ue,
4128
+ navigateToCheckpoint: We,
4127
4129
  setCurrentCheckpointId: qe,
4128
4130
  returnToLatest: Ge,
4129
4131
  loadThread: Be,
@@ -4141,7 +4143,7 @@ function Xx({
4141
4143
  F,
4142
4144
  et,
4143
4145
  Je,
4144
- Ue,
4146
+ We,
4145
4147
  qe,
4146
4148
  Ge,
4147
4149
  Be,
@@ -4155,9 +4157,9 @@ function Xx({
4155
4157
  submit: St,
4156
4158
  send: St,
4157
4159
  stop: te,
4158
- setAuthToken: Me
4160
+ setAuthToken: De
4159
4161
  }),
4160
- [se, re, St, te, Me]
4162
+ [se, re, St, te, De]
4161
4163
  );
4162
4164
  return /* @__PURE__ */ u.jsx(Au.Provider, { value: mt, children: /* @__PURE__ */ u.jsx(ju.Provider, { value: ct, children: /* @__PURE__ */ u.jsx(_u.Provider, { value: Ct, children: e }) }) });
4163
4165
  }
@@ -4533,7 +4535,7 @@ var iy = [
4533
4535
  "span",
4534
4536
  "svg",
4535
4537
  "ul"
4536
- ], Ae = iy.reduce((e, t) => {
4538
+ ], je = iy.reduce((e, t) => {
4537
4539
  const n = Tr(`Primitive.${t}`), r = v.forwardRef((o, s) => {
4538
4540
  const { asChild: i, ...a } = o, l = i ? n : t;
4539
4541
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(l, { ...a, ref: s });
@@ -4640,7 +4642,7 @@ var cy = "DismissableLayer", Bi = "dismissableLayer.update", uy = "dismissableLa
4640
4642
  const k = () => h({});
4641
4643
  return document.addEventListener(Bi, k), () => document.removeEventListener(Bi, k);
4642
4644
  }, []), /* @__PURE__ */ u.jsx(
4643
- Ae.div,
4645
+ je.div,
4644
4646
  {
4645
4647
  ...l,
4646
4648
  ref: m,
@@ -4667,7 +4669,7 @@ var fy = "DismissableLayerBranch", py = v.forwardRef((e, t) => {
4667
4669
  return n.branches.add(s), () => {
4668
4670
  n.branches.delete(s);
4669
4671
  };
4670
- }, [n.branches]), /* @__PURE__ */ u.jsx(Ae.div, { ...e, ref: o });
4672
+ }, [n.branches]), /* @__PURE__ */ u.jsx(je.div, { ...e, ref: o });
4671
4673
  });
4672
4674
  py.displayName = fy;
4673
4675
  function hy(e, t = globalThis == null ? void 0 : globalThis.document) {
@@ -4799,7 +4801,7 @@ var hi = "focusScope.autoFocusOnMount", mi = "focusScope.autoFocusOnUnmount", Kl
4799
4801
  },
4800
4802
  [n, r, h.paused]
4801
4803
  );
4802
- return /* @__PURE__ */ u.jsx(Ae.div, { tabIndex: -1, ...i, ref: p, onKeyDown: m });
4804
+ return /* @__PURE__ */ u.jsx(je.div, { tabIndex: -1, ...i, ref: p, onKeyDown: m });
4803
4805
  });
4804
4806
  Is.displayName = gy;
4805
4807
  function xy(e, { select: t = !1 } = {}) {
@@ -6185,7 +6187,7 @@ const Ev = (e) => {
6185
6187
  var Mv = "Arrow", Yu = v.forwardRef((e, t) => {
6186
6188
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
6187
6189
  return /* @__PURE__ */ u.jsx(
6188
- Ae.svg,
6190
+ je.svg,
6189
6191
  {
6190
6192
  ...s,
6191
6193
  ref: t,
@@ -6232,7 +6234,7 @@ var ed = "PopperAnchor", td = v.forwardRef(
6232
6234
  return v.useEffect(() => {
6233
6235
  const c = l.current;
6234
6236
  l.current = (r == null ? void 0 : r.current) || i.current, c !== l.current && s.onAnchorChange(l.current);
6235
- }), r ? null : /* @__PURE__ */ u.jsx(Ae.div, { ...o, ref: a });
6237
+ }), r ? null : /* @__PURE__ */ u.jsx(je.div, { ...o, ref: a });
6236
6238
  }
6237
6239
  );
6238
6240
  td.displayName = ed;
@@ -6254,7 +6256,7 @@ var Na = "PopperContent", [Fv, $v] = Ju(Na), nd = v.forwardRef(
6254
6256
  updatePositionStrategy: h = "optimized",
6255
6257
  onPlaced: m,
6256
6258
  ...x
6257
- } = e, y = Zu(Na, n), [g, w] = v.useState(null), b = Ke(t, (Me) => w(Me)), [T, C] = v.useState(null), S = Xu(T), k = (S == null ? void 0 : S.width) ?? 0, N = (S == null ? void 0 : S.height) ?? 0, E = r + (s !== "center" ? "-" + s : ""), I = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, O = Array.isArray(c) ? c : [c], L = O.length > 0, F = {
6259
+ } = e, y = Zu(Na, n), [g, w] = v.useState(null), b = Ke(t, (De) => w(De)), [T, C] = v.useState(null), S = Xu(T), k = (S == null ? void 0 : S.width) ?? 0, N = (S == null ? void 0 : S.height) ?? 0, E = r + (s !== "center" ? "-" + s : ""), I = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, O = Array.isArray(c) ? c : [c], L = O.length > 0, F = {
6258
6260
  padding: I,
6259
6261
  boundary: O.filter(Bv),
6260
6262
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -6263,7 +6265,7 @@ var Na = "PopperContent", [Fv, $v] = Ju(Na), nd = v.forwardRef(
6263
6265
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
6264
6266
  strategy: "fixed",
6265
6267
  placement: E,
6266
- whileElementsMounted: (...Me) => gv(...Me, {
6268
+ whileElementsMounted: (...De) => gv(...De, {
6267
6269
  animationFrame: h === "always"
6268
6270
  }),
6269
6271
  elements: {
@@ -6280,8 +6282,8 @@ var Na = "PopperContent", [Fv, $v] = Ju(Na), nd = v.forwardRef(
6280
6282
  l && jv({ ...F }),
6281
6283
  _v({
6282
6284
  ...F,
6283
- apply: ({ elements: Me, rects: Y, availableWidth: de, availableHeight: ke }) => {
6284
- const { width: Ne, height: ze } = Y.reference, Be = Me.floating.style;
6285
+ apply: ({ elements: De, rects: Y, availableWidth: de, availableHeight: ke }) => {
6286
+ const { width: Ne, height: ze } = Y.reference, Be = De.floating.style;
6285
6287
  Be.setProperty("--radix-popper-available-width", `${de}px`), Be.setProperty("--radix-popper-available-height", `${ke}px`), Be.setProperty("--radix-popper-anchor-width", `${Ne}px`), Be.setProperty("--radix-popper-anchor-height", `${ze}px`);
6286
6288
  }
6287
6289
  }),
@@ -6330,7 +6332,7 @@ var Na = "PopperContent", [Fv, $v] = Ju(Na), nd = v.forwardRef(
6330
6332
  arrowY: Re,
6331
6333
  shouldHideArrow: Ee,
6332
6334
  children: /* @__PURE__ */ u.jsx(
6333
- Ae.div,
6335
+ je.div,
6334
6336
  {
6335
6337
  "data-side": M,
6336
6338
  "data-align": Z,
@@ -6424,7 +6426,7 @@ var id = Qu, ad = td, ld = nd, cd = od, Uv = "Portal", Os = v.forwardRef((e, t)
6424
6426
  const { container: n, ...r } = e, [o, s] = v.useState(!1);
6425
6427
  Lt(() => s(!0), []);
6426
6428
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
6427
- return i ? Zc.createPortal(/* @__PURE__ */ u.jsx(Ae.div, { ...r, ref: t }), i) : null;
6429
+ return i ? Zc.createPortal(/* @__PURE__ */ u.jsx(je.div, { ...r, ref: t }), i) : null;
6428
6430
  });
6429
6431
  Os.displayName = Uv;
6430
6432
  function Wv(e, t) {
@@ -6543,7 +6545,7 @@ var Zv = v.forwardRef((e, t) => {
6543
6545
  []
6544
6546
  ),
6545
6547
  children: /* @__PURE__ */ u.jsx(
6546
- Ae.div,
6548
+ je.div,
6547
6549
  {
6548
6550
  tabIndex: g || S === 0 ? -1 : 0,
6549
6551
  "data-orientation": r,
@@ -6592,7 +6594,7 @@ var Zv = v.forwardRef((e, t) => {
6592
6594
  focusable: r,
6593
6595
  active: o,
6594
6596
  children: /* @__PURE__ */ u.jsx(
6595
- Ae.span,
6597
+ je.span,
6596
6598
  {
6597
6599
  tabIndex: f ? 0 : -1,
6598
6600
  "data-orientation": d.orientation,
@@ -7414,14 +7416,14 @@ Ad.displayName = an;
7414
7416
  var ob = "MenuGroup", Ma = v.forwardRef(
7415
7417
  (e, t) => {
7416
7418
  const { __scopeMenu: n, ...r } = e;
7417
- return /* @__PURE__ */ u.jsx(Ae.div, { role: "group", ...r, ref: t });
7419
+ return /* @__PURE__ */ u.jsx(je.div, { role: "group", ...r, ref: t });
7418
7420
  }
7419
7421
  );
7420
7422
  Ma.displayName = ob;
7421
7423
  var sb = "MenuLabel", jd = v.forwardRef(
7422
7424
  (e, t) => {
7423
7425
  const { __scopeMenu: n, ...r } = e;
7424
- return /* @__PURE__ */ u.jsx(Ae.div, { ...r, ref: t });
7426
+ return /* @__PURE__ */ u.jsx(je.div, { ...r, ref: t });
7425
7427
  }
7426
7428
  );
7427
7429
  jd.displayName = sb;
@@ -7471,7 +7473,7 @@ var _d = v.forwardRef(
7471
7473
  disabled: r,
7472
7474
  textValue: o ?? p,
7473
7475
  children: /* @__PURE__ */ u.jsx(ow, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ u.jsx(
7474
- Ae.div,
7476
+ je.div,
7475
7477
  {
7476
7478
  role: "menuitem",
7477
7479
  "data-highlighted": d ? "" : void 0,
@@ -7563,7 +7565,7 @@ var Da = "MenuItemIndicator", [Fd, cb] = dr(
7563
7565
  {
7564
7566
  present: r || rs(s.checked) || s.checked === !0,
7565
7567
  children: /* @__PURE__ */ u.jsx(
7566
- Ae.span,
7568
+ je.span,
7567
7569
  {
7568
7570
  ...o,
7569
7571
  ref: t,
@@ -7579,7 +7581,7 @@ var ub = "MenuSeparator", zd = v.forwardRef(
7579
7581
  (e, t) => {
7580
7582
  const { __scopeMenu: n, ...r } = e;
7581
7583
  return /* @__PURE__ */ u.jsx(
7582
- Ae.div,
7584
+ je.div,
7583
7585
  {
7584
7586
  role: "separator",
7585
7587
  "aria-orientation": "horizontal",
@@ -7785,7 +7787,7 @@ var Yd = "DropdownMenuTrigger", Xd = v.forwardRef(
7785
7787
  (e, t) => {
7786
7788
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = qd(Yd, n), i = Ut(n);
7787
7789
  return /* @__PURE__ */ u.jsx(vb, { asChild: !0, ...i, children: /* @__PURE__ */ u.jsx(
7788
- Ae.button,
7790
+ je.button,
7789
7791
  {
7790
7792
  type: "button",
7791
7793
  id: s.triggerId,
@@ -8111,7 +8113,7 @@ function yt(...e) {
8111
8113
  function it(e, t) {
8112
8114
  return e(Kn, t);
8113
8115
  }
8114
- function Oe(e, t) {
8116
+ function Me(e, t) {
8115
8117
  e(zs, t);
8116
8118
  }
8117
8119
  function $a(e) {
@@ -8291,7 +8293,7 @@ function At(...e) {
8291
8293
  return e.forEach((s, i) => {
8292
8294
  const a = Math.pow(2, i);
8293
8295
  it(s, (l) => {
8294
- n[i] = l, r = r | a, r === o && Oe(t, n);
8296
+ n[i] = l, r = r | a, r === o && Me(t, n);
8295
8297
  });
8296
8298
  }), function(s, i) {
8297
8299
  switch (s) {
@@ -8887,10 +8889,10 @@ const P0 = {
8887
8889
  (C) => {
8888
8890
  const { groupIndices: S } = Rt(x);
8889
8891
  if (C > 0)
8890
- Oe(t, !0), Oe(s, C + yc(C, S));
8892
+ Me(t, !0), Me(s, C + yc(C, S));
8891
8893
  else if (C < 0) {
8892
8894
  const k = Rt(y);
8893
- k.length > 0 && (C -= yc(-C, k)), Oe(i, C);
8895
+ k.length > 0 && (C -= yc(-C, k)), Me(i, C);
8894
8896
  }
8895
8897
  }
8896
8898
  ), it(U(a, Le(e)), ([C, S]) => {
@@ -9109,7 +9111,7 @@ const vo = nt(
9109
9111
  const h = Ve(), m = Ve(), x = X(0);
9110
9112
  let y = null, g = null, w = null;
9111
9113
  function b() {
9112
- y && (y(), y = null), w && (w(), w = null), g && (clearTimeout(g), g = null), Oe(l, !1);
9114
+ y && (y(), y = null), w && (w(), w = null), g && (clearTimeout(g), g = null), Me(l, !1);
9113
9115
  }
9114
9116
  return he(
9115
9117
  U(
@@ -9127,7 +9129,7 @@ const vo = nt(
9127
9129
  let J = so(Z, C.offsetTree, L) + E;
9128
9130
  A === "end" ? (J += F + gn(C.sizeTree, Z)[1] - S + j, Z === M && (J += I)) : A === "center" ? J += (F + gn(C.sizeTree, Z)[1] - S + j) / 2 : J -= N, D && (J += D);
9129
9131
  const pe = (Re) => {
9130
- b(), Re ? (O("retrying to scroll to", { location: T }, Xt.DEBUG), Oe(h, T)) : (Oe(m, !0), O("list did not change, scroll successful", {}, Xt.DEBUG));
9132
+ b(), Re ? (O("retrying to scroll to", { location: T }, Xt.DEBUG), Me(h, T)) : (Me(m, !0), O("list did not change, scroll successful", {}, Xt.DEBUG));
9131
9133
  };
9132
9134
  if (b(), B === "smooth") {
9133
9135
  let Re = !1;
@@ -9140,7 +9142,7 @@ const vo = nt(
9140
9142
  y = pn(U(t, D0(150)), pe);
9141
9143
  return g = setTimeout(() => {
9142
9144
  b();
9143
- }, 1200), Oe(l, !0), O("scrolling from index to", { behavior: B, index: Z, top: J }, Xt.DEBUG), { behavior: B, top: J };
9145
+ }, 1200), Me(l, !0), O("scrolling from index to", { behavior: B, index: Z, top: J }, Xt.DEBUG), { behavior: B, top: J };
9144
9146
  }
9145
9147
  )
9146
9148
  ),
@@ -9201,11 +9203,11 @@ const wo = nt(
9201
9203
  ),
9202
9204
  ([, d]) => {
9203
9205
  pn(o, () => {
9204
- Oe(c, !0);
9206
+ Me(c, !0);
9205
9207
  }), Ua(4, () => {
9206
9208
  pn(r, () => {
9207
- Oe(a, !0);
9208
- }), Oe(s, d);
9209
+ Me(a, !0);
9210
+ }), Me(s, d);
9209
9211
  });
9210
9212
  }
9211
9213
  ), {
@@ -9778,7 +9780,7 @@ const U0 = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), W0 = nt(
9778
9780
  const m = X(!1), x = Ve();
9779
9781
  let y = null;
9780
9782
  function g(C) {
9781
- Oe(i, {
9783
+ Me(i, {
9782
9784
  align: "end",
9783
9785
  behavior: C,
9784
9786
  index: "LAST"
@@ -9850,9 +9852,9 @@ const U0 = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), W0 = nt(
9850
9852
  ),
9851
9853
  (C) => {
9852
9854
  y && (y(), y = null), Rt(n) ? requestAnimationFrame(() => {
9853
- Rt(d)("scrolling into view", {}), Oe(h, C);
9855
+ Rt(d)("scrolling into view", {}), Me(h, C);
9854
9856
  }) : y = pn(e, () => {
9855
- Rt(d)("scrolling into view", {}), Oe(h, C), y = null;
9857
+ Rt(d)("scrolling into view", {}), Me(h, C), y = null;
9856
9858
  });
9857
9859
  }
9858
9860
  ), { autoscrollToBottom: x, followOutput: m, scrollIntoViewOnChange: b };
@@ -9900,7 +9902,7 @@ const U0 = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), W0 = nt(
9900
9902
  ),
9901
9903
  () => {
9902
9904
  requestAnimationFrame(() => {
9903
- Oe(t, o);
9905
+ Me(t, o);
9904
9906
  });
9905
9907
  }
9906
9908
  );
@@ -10052,10 +10054,10 @@ const X0 = zf(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10052
10054
  )
10053
10055
  );
10054
10056
  function y(g) {
10055
- g > 0 ? (Oe(t, { behavior: "auto", top: -g }), Oe(e, 0)) : (Oe(e, 0), Oe(t, { behavior: "auto", top: -g }));
10057
+ g > 0 ? (Me(t, { behavior: "auto", top: -g }), Me(e, 0)) : (Me(e, 0), Me(t, { behavior: "auto", top: -g }));
10056
10058
  }
10057
10059
  return it(U(x, Le(e, s)), ([g, w, b]) => {
10058
- b && X0() ? Oe(e, w - g) : y(-g);
10060
+ b && X0() ? Me(e, w - g) : y(-g);
10059
10061
  }), it(
10060
10062
  U(
10061
10063
  At(Ht(s, !1), e, m),
@@ -10094,9 +10096,9 @@ const X0 = zf(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10094
10096
  })
10095
10097
  ),
10096
10098
  (g) => {
10097
- Oe(e, g), requestAnimationFrame(() => {
10098
- Oe(t, { top: g }), requestAnimationFrame(() => {
10099
- Oe(e, 0), Oe(m, !1);
10099
+ Me(e, g), requestAnimationFrame(() => {
10100
+ Me(t, { top: g }), requestAnimationFrame(() => {
10101
+ Me(e, 0), Me(m, !1);
10100
10102
  });
10101
10103
  });
10102
10104
  }
@@ -10233,22 +10235,22 @@ const _o = typeof document < "u" ? z.useLayoutEffect : z.useEffect;
10233
10235
  function Hf(e, t, n) {
10234
10236
  const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), s = Object.keys(t.methods || {}), i = Object.keys(t.events || {}), a = z.createContext({});
10235
10237
  function l(y, g) {
10236
- y.propsReady && Oe(y.propsReady, !1);
10238
+ y.propsReady && Me(y.propsReady, !1);
10237
10239
  for (const w of r) {
10238
10240
  const b = y[t.required[w]];
10239
- Oe(b, g[w]);
10241
+ Me(b, g[w]);
10240
10242
  }
10241
10243
  for (const w of o)
10242
10244
  if (w in g) {
10243
10245
  const b = y[t.optional[w]];
10244
- Oe(b, g[w]);
10246
+ Me(b, g[w]);
10245
10247
  }
10246
- y.propsReady && Oe(y.propsReady, !0);
10248
+ y.propsReady && Me(y.propsReady, !0);
10247
10249
  }
10248
10250
  function c(y) {
10249
10251
  return s.reduce((g, w) => (g[w] = (b) => {
10250
10252
  const T = y[t.methods[w]];
10251
- Oe(T, b);
10253
+ Me(T, b);
10252
10254
  }, g), {});
10253
10255
  }
10254
10256
  function d(y) {
@@ -10273,7 +10275,7 @@ function Hf(e, t, n) {
10273
10275
  const g = z.useContext(a);
10274
10276
  return z.useCallback(
10275
10277
  (w) => {
10276
- Oe(g[y], w);
10278
+ Me(g[y], w);
10277
10279
  },
10278
10280
  [g, y]
10279
10281
  );
@@ -10768,7 +10770,7 @@ const TS = /* @__PURE__ */ nt(
10768
10770
  Te(([P, H]) => !!H)
10769
10771
  ),
10770
10772
  () => {
10771
- Oe(Z, !1);
10773
+ Me(Z, !1);
10772
10774
  }
10773
10775
  ), it(
10774
10776
  U(
@@ -10776,10 +10778,10 @@ const TS = /* @__PURE__ */ nt(
10776
10778
  Te(([P, H, te, se, , re]) => P && !H && te.height !== 0 && se.height !== 0 && !re)
10777
10779
  ),
10778
10780
  ([, , , , P]) => {
10779
- Oe(J, !0), Ua(1, () => {
10780
- Oe(O, P);
10781
+ Me(J, !0), Ua(1, () => {
10782
+ Me(O, P);
10781
10783
  }), pn(U(c), () => {
10782
- Oe(t, [0, 0]), Oe(Z, !0);
10784
+ Me(t, [0, 0]), Me(Z, !0);
10783
10785
  });
10784
10786
  }
10785
10787
  ), he(
@@ -10796,9 +10798,9 @@ const TS = /* @__PURE__ */ nt(
10796
10798
  Te(([, P]) => P != null)
10797
10799
  ),
10798
10800
  ([, P]) => {
10799
- P && (Oe(E, P.viewport), Oe(I, P.item), Oe($, P.gap), P.scrollTop > 0 && (Oe(D, !0), pn(U(c, ar(1)), (H) => {
10800
- Oe(D, !1);
10801
- }), Oe(l, { top: P.scrollTop })));
10801
+ P && (Me(E, P.viewport), Me(I, P.item), Me($, P.gap), P.scrollTop > 0 && (Me(D, !0), pn(U(c, ar(1)), (H) => {
10802
+ Me(D, !1);
10803
+ }), Me(l, { top: P.scrollTop })));
10802
10804
  }
10803
10805
  ), he(
10804
10806
  U(
@@ -10843,25 +10845,25 @@ const TS = /* @__PURE__ */ nt(
10843
10845
  [H, te],
10844
10846
  se,
10845
10847
  re,
10846
- Me,
10848
+ De,
10847
10849
  Y,
10848
10850
  de,
10849
10851
  ,
10850
10852
  ke,
10851
10853
  Ne
10852
10854
  ]) => {
10853
- const { column: ze, row: Be } = se, { height: Ue, width: qe } = re, { width: Ge } = Me;
10855
+ const { column: ze, row: Be } = se, { height: We, width: qe } = re, { width: Ge } = De;
10854
10856
  if (de === 0 && (P === 0 || Ge === 0))
10855
10857
  return Rc;
10856
10858
  if (qe === 0) {
10857
- const ne = Wa(Ne, P), De = ne + Math.max(de - 1, 0);
10858
- return SS(Nc(ne, De, Y));
10859
+ const ne = Wa(Ne, P), Ae = ne + Math.max(de - 1, 0);
10860
+ return SS(Nc(ne, Ae, Y));
10859
10861
  }
10860
10862
  const et = Xf(Ge, qe, ze);
10861
10863
  let Je, ot;
10862
- ke ? H === 0 && te === 0 && de > 0 ? (Je = 0, ot = de - 1) : (Je = et * as((H + Be) / (Ue + Be)), ot = et * Ec((te + Be) / (Ue + Be)) - 1, ot = Ei(P - 1, Kr(ot, et - 1)), Je = Ei(ot, Kr(0, Je))) : (Je = 0, ot = -1);
10863
- const St = Nc(Je, ot, Y), { bottom: mt, top: ct } = Ac(Me, se, re, St), Ct = Ec(P / et), le = Ct * Ue + (Ct - 1) * Be - mt;
10864
- return { bottom: mt, itemHeight: Ue, items: St, itemWidth: qe, offsetBottom: le, offsetTop: ct, top: ct };
10864
+ ke ? H === 0 && te === 0 && de > 0 ? (Je = 0, ot = de - 1) : (Je = et * as((H + Be) / (We + Be)), ot = et * Ec((te + Be) / (We + Be)) - 1, ot = Ei(P - 1, Kr(ot, et - 1)), Je = Ei(ot, Kr(0, Je))) : (Je = 0, ot = -1);
10865
+ const St = Nc(Je, ot, Y), { bottom: mt, top: ct } = Ac(De, se, re, St), Ct = Ec(P / et), le = Ct * We + (Ct - 1) * Be - mt;
10866
+ return { bottom: mt, itemHeight: We, items: St, itemWidth: qe, offsetBottom: le, offsetTop: ct, top: ct };
10865
10867
  }
10866
10868
  )
10867
10869
  ),
@@ -10878,8 +10880,8 @@ const TS = /* @__PURE__ */ nt(
10878
10880
  At(E, I, N, $),
10879
10881
  Te(([P, H, { items: te }]) => te.length > 0 && H.height !== 0 && P.height !== 0),
10880
10882
  ce(([P, H, { items: te }, se]) => {
10881
- const { bottom: re, top: Me } = Ac(P, se, H, te);
10882
- return [Me, re];
10883
+ const { bottom: re, top: De } = Ac(P, se, H, te);
10884
+ return [De, re];
10883
10885
  }),
10884
10886
  xt(oo)
10885
10887
  ),
@@ -10931,8 +10933,8 @@ const TS = /* @__PURE__ */ nt(
10931
10933
  O,
10932
10934
  Le(E, I, S, $),
10933
10935
  ce(([P, H, te, se, re]) => {
10934
- const Me = Pf(P), { align: Y, behavior: de, offset: ke } = Me;
10935
- let Ne = Me.index;
10936
+ const De = Pf(P), { align: Y, behavior: de, offset: ke } = De;
10937
+ let Ne = De.index;
10936
10938
  Ne === "LAST" && (Ne = se - 1), Ne = Kr(0, Ne, Ei(se - 1, Ne));
10937
10939
  let ze = ea(H, re, te, Ne);
10938
10940
  return Y === "end" ? ze = Ic(ze - H.height + te.height) : Y === "center" && (ze = Ic(ze - H.height / 2 + te.height / 2)), ke && (ze += ke), { behavior: de, top: ze };
@@ -11511,7 +11513,7 @@ var sp = "DialogTrigger", ip = v.forwardRef(
11511
11513
  (e, t) => {
11512
11514
  const { __scopeDialog: n, ...r } = e, o = yn(sp, n), s = Ke(t, o.triggerRef);
11513
11515
  return /* @__PURE__ */ u.jsx(
11514
- Ae.button,
11516
+ je.button,
11515
11517
  {
11516
11518
  type: "button",
11517
11519
  "aria-haspopup": "dialog",
@@ -11547,7 +11549,7 @@ var qS = Tr("DialogOverlay.RemoveScroll"), GS = v.forwardRef(
11547
11549
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
11548
11550
  // ie. when `Overlay` and `Content` are siblings
11549
11551
  /* @__PURE__ */ u.jsx(Ds, { as: qS, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ u.jsx(
11550
- Ae.div,
11552
+ je.div,
11551
11553
  {
11552
11554
  "data-state": el(o.open),
11553
11555
  ...r,
@@ -11651,14 +11653,14 @@ var YS = v.forwardRef(
11651
11653
  ), Qa = "DialogTitle", fp = v.forwardRef(
11652
11654
  (e, t) => {
11653
11655
  const { __scopeDialog: n, ...r } = e, o = yn(Qa, n);
11654
- return /* @__PURE__ */ u.jsx(Ae.h2, { id: o.titleId, ...r, ref: t });
11656
+ return /* @__PURE__ */ u.jsx(je.h2, { id: o.titleId, ...r, ref: t });
11655
11657
  }
11656
11658
  );
11657
11659
  fp.displayName = Qa;
11658
11660
  var pp = "DialogDescription", hp = v.forwardRef(
11659
11661
  (e, t) => {
11660
11662
  const { __scopeDialog: n, ...r } = e, o = yn(pp, n);
11661
- return /* @__PURE__ */ u.jsx(Ae.p, { id: o.descriptionId, ...r, ref: t });
11663
+ return /* @__PURE__ */ u.jsx(je.p, { id: o.descriptionId, ...r, ref: t });
11662
11664
  }
11663
11665
  );
11664
11666
  hp.displayName = pp;
@@ -11666,7 +11668,7 @@ var mp = "DialogClose", gp = v.forwardRef(
11666
11668
  (e, t) => {
11667
11669
  const { __scopeDialog: n, ...r } = e, o = yn(mp, n);
11668
11670
  return /* @__PURE__ */ u.jsx(
11669
- Ae.button,
11671
+ je.button,
11670
11672
  {
11671
11673
  type: "button",
11672
11674
  ...r,
@@ -13628,7 +13630,7 @@ const Bc = z.memo(function({
13628
13630
  }, [M]), te = lt(() => J ? "" : CC(t.content), [J, t]), se = lt(() => J ? {} : Pp(t), [J, t]), re = lt(
13629
13631
  () => J ? [] : t.content.filter((V) => V.type === "image_url"),
13630
13632
  [J, t]
13631
- ), Me = lt(
13633
+ ), De = lt(
13632
13634
  () => J ? [] : t.content.filter((V) => V.type === "file"),
13633
13635
  [J, t]
13634
13636
  ), Y = lt(
@@ -13657,7 +13659,7 @@ const Bc = z.memo(function({
13657
13659
  } catch (xe) {
13658
13660
  console.error("Failed to copy:", xe);
13659
13661
  }
13660
- }, [Z, ze, te, y]), Ue = z.useCallback(() => {
13662
+ }, [Z, ze, te, y]), We = z.useCallback(() => {
13661
13663
  if (!h) return;
13662
13664
  const V = Z ? ze : te, ve = "type" in t && t.type === "default_message" ? void 0 : {
13663
13665
  checkpointId: t.checkpointId ?? null,
@@ -13828,11 +13830,11 @@ const Bc = z.memo(function({
13828
13830
  if (V.type === "interrupt") {
13829
13831
  const xe = V, ht = Mo(
13830
13832
  (xe == null ? void 0 : xe.id) ?? (xe == null ? void 0 : xe.interrupt_id)
13831
- ), gt = !!(ke && ht && ht === ke), Tt = gt ? Ne ?? (xe == null ? void 0 : xe.value) : xe == null ? void 0 : xe.value, je = ht ? { ...xe, id: ht, interrupt_id: ht } : xe;
13833
+ ), gt = !!(ke && ht && ht === ke), Tt = gt ? Ne ?? (xe == null ? void 0 : xe.value) : xe == null ? void 0 : xe.value, _e = ht ? { ...xe, id: ht, interrupt_id: ht } : xe;
13832
13834
  return /* @__PURE__ */ u.jsx(
13833
13835
  EC,
13834
13836
  {
13835
- interruptPart: je,
13837
+ interruptPart: _e,
13836
13838
  onApprove: ot,
13837
13839
  onReject: St,
13838
13840
  disabled: w,
@@ -13862,8 +13864,8 @@ const Bc = z.memo(function({
13862
13864
  /* @__PURE__ */ u.jsx(ji, { className: "h-4 w-4 text-muted-foreground" }),
13863
13865
  /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "File upload" })
13864
13866
  ] }), []), Ct = z.useCallback(() => {
13865
- const V = te.trim().length > 0 || re.length > 0 || Me.length > 0 || Y.length > 0;
13866
- if (!Z && Me.length > 0 && !r)
13867
+ const V = te.trim().length > 0 || re.length > 0 || De.length > 0 || Y.length > 0;
13868
+ if (!Z && De.length > 0 && !r)
13867
13869
  return ct();
13868
13870
  if (!Z && !V && !r)
13869
13871
  return null;
@@ -13886,24 +13888,24 @@ const Bc = z.memo(function({
13886
13888
  }, [
13887
13889
  te,
13888
13890
  re.length,
13889
- Me.length,
13891
+ De.length,
13890
13892
  Y.length,
13891
13893
  r,
13892
13894
  Z,
13893
13895
  L,
13894
13896
  ct,
13895
13897
  H
13896
- ]), le = lt(() => J ? "Assistant" : kC(t), [J, t]), ne = z.useMemo(() => J ? [] : Array.isArray(C) ? C : [], [C, J]), De = z.useMemo(() => {
13898
+ ]), le = lt(() => J ? "Assistant" : kC(t), [J, t]), ne = z.useMemo(() => J ? [] : Array.isArray(C) ? C : [], [C, J]), Ae = z.useMemo(() => {
13897
13899
  var V;
13898
13900
  return ne.length ? N && ne.some((ve) => ve.id === N) ? N : ((V = ne[0]) == null ? void 0 : V.id) ?? null : null;
13899
- }, [N, ne]), Pe = z.useMemo(() => !ne.length || !S ? null : ne.some((V) => V.id === S) ? S : null, [S, ne]) ?? De, tt = M === "user" && ne.length > 0 && typeof k == "function", Ze = z.useCallback(
13901
+ }, [N, ne]), Oe = z.useMemo(() => !ne.length || !S ? null : ne.some((V) => V.id === S) ? S : null, [S, ne]) ?? Ae, tt = M === "user" && ne.length > 0 && typeof k == "function", Ze = z.useCallback(
13900
13902
  (V) => {
13901
13903
  if (!k) return;
13902
13904
  const ve = (V == null ? void 0 : V.id) ?? null, xe = (V == null ? void 0 : V.parentId) ?? E ?? null;
13903
13905
  k(ve, xe);
13904
13906
  },
13905
13907
  [E, k]
13906
- ), Fe = z.useMemo(() => Pe ? ne.findIndex((V) => V.id === Pe) : -1, [Pe, ne]), Pt = z.useMemo(() => Fe < 0 ? null : ne[Fe] ?? null, [Fe, ne]), jt = z.useCallback((V) => {
13908
+ ), Fe = z.useMemo(() => Oe ? ne.findIndex((V) => V.id === Oe) : -1, [Oe, ne]), Pt = z.useMemo(() => Fe < 0 ? null : ne[Fe] ?? null, [Fe, ne]), jt = z.useCallback((V) => {
13907
13909
  const ve = [];
13908
13910
  if (V.step !== null && ve.push(`Step ${V.step}`), V.source && ve.push(V.source), !V.createdAt)
13909
13911
  return ve.length ? ve.join(" • ") : V.id.slice(0, 8);
@@ -14041,7 +14043,7 @@ const Bc = z.memo(function({
14041
14043
  {
14042
14044
  variant: "ghost",
14043
14045
  size: "sm",
14044
- onClick: Ue,
14046
+ onClick: We,
14045
14047
  className: Q("h-6 w-6 p-0 hover:bg-foreground/10", H, D && "h-5 w-5"),
14046
14048
  "aria-label": "Edit message",
14047
14049
  children: /* @__PURE__ */ u.jsx(fl, { className: Q(H, D ? "h-3 w-3" : "h-4 w-4") })
@@ -14100,7 +14102,7 @@ const Bc = z.memo(function({
14100
14102
  {
14101
14103
  variant: "ghost",
14102
14104
  size: "sm",
14103
- onClick: Ue,
14105
+ onClick: We,
14104
14106
  className: Q("h-6 w-6 p-0 hover:bg-background/50 text-current", D && "h-5 w-5"),
14105
14107
  children: /* @__PURE__ */ u.jsx(fl, { className: Q("text-current", D ? "h-3 w-3" : "h-4 w-4") })
14106
14108
  }
@@ -14523,7 +14525,7 @@ const Hc = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, jC = (e) =>
14523
14525
  onCancelEdit: () => {
14524
14526
  }
14525
14527
  }
14526
- ) }) }) : /* @__PURE__ */ u.jsx("div", { className: "flex h-full items-center justify-center py-8 text-center text-muted-foreground", children: h ?? "No messages yet. Start a conversation!" }), Me = pe.length > 0;
14528
+ ) }) }) : /* @__PURE__ */ u.jsx("div", { className: "flex h-full items-center justify-center py-8 text-center text-muted-foreground", children: h ?? "No messages yet. Start a conversation!" }), De = pe.length > 0;
14527
14529
  return lm(
14528
14530
  L,
14529
14531
  () => ({
@@ -14550,7 +14552,7 @@ const Hc = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, jC = (e) =>
14550
14552
  [pe]
14551
14553
  ), /* @__PURE__ */ u.jsxs("div", { className: se, style: p, children: [
14552
14554
  te,
14553
- /* @__PURE__ */ u.jsx("div", { className: "relative flex-1 min-h-0", children: Me ? /* @__PURE__ */ u.jsx(
14555
+ /* @__PURE__ */ u.jsx("div", { className: "relative flex-1 min-h-0", children: De ? /* @__PURE__ */ u.jsx(
14554
14556
  vS,
14555
14557
  {
14556
14558
  ref: (Y) => {
@@ -14575,20 +14577,20 @@ const Hc = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, jC = (e) =>
14575
14577
  itemContent: (Y, de) => {
14576
14578
  var ot;
14577
14579
  const ke = Hc(de, Y), Ne = "type" in de && de.type === "default_message";
14578
- let ze = [], Be = null, Ue = {}, qe = {}, Ge = null, et = null;
14580
+ let ze = [], Be = null, We = {}, qe = {}, Ge = null, et = null;
14579
14581
  if (!Ne) {
14580
14582
  const St = de, mt = St.checkpointId ?? null;
14581
- Ue = St.additionalKwargs ?? {}, qe = St.responseMetadata ?? {};
14583
+ We = St.additionalKwargs ?? {}, qe = St.responseMetadata ?? {};
14582
14584
  const ct = mt && k ? k.get(mt) ?? null : null;
14583
- Ge = typeof Ue.step == "number" ? Ue.step : typeof qe.step == "number" ? qe.step : (ct == null ? void 0 : ct.step) ?? null;
14584
- const Ct = typeof Ue.source == "string" ? Ue.source : typeof qe.source == "string" ? qe.source : (ct == null ? void 0 : ct.source) ?? null;
14585
+ Ge = typeof We.step == "number" ? We.step : typeof qe.step == "number" ? qe.step : (ct == null ? void 0 : ct.step) ?? null;
14586
+ const Ct = typeof We.source == "string" ? We.source : typeof qe.source == "string" ? qe.source : (ct == null ? void 0 : ct.source) ?? null;
14585
14587
  et = Ct ? String(Ct) : null;
14586
14588
  const le = Ge !== null && et ? `${Ge}:${et}` : null;
14587
14589
  le && (N != null && N.has(le)) ? ze = N.get(le) ?? [] : mt && ct && (ze = [ct]), Be = mt ?? ((ot = ze[0]) == null ? void 0 : ot.id) ?? null;
14588
14590
  }
14589
14591
  const Je = (() => {
14590
- if (typeof Ue.parentCheckpointId == "string")
14591
- return Ue.parentCheckpointId;
14592
+ if (typeof We.parentCheckpointId == "string")
14593
+ return We.parentCheckpointId;
14592
14594
  if (typeof qe.parentCheckpointId == "string")
14593
14595
  return qe.parentCheckpointId;
14594
14596
  })();
@@ -14677,7 +14679,7 @@ function Ai({
14677
14679
  Ee(!0);
14678
14680
  }, []), ee = Ce(() => {
14679
14681
  Ee(!1);
14680
- }, []), q = !!pe || Re, [P, H] = ge(null), [te, se] = ge(""), [re, Me] = ge(null), [Y, de] = ge(null), [ke, Ne] = ge([]), [ze, Be] = ge(0), [Ue, qe] = ge(0), [Ge, et] = ge(!1), [Je, ot] = ge(null), [St, mt] = ge(null), [ct, Ct] = ge(!1), [le, ne] = ge(null), [De, We] = ge(!1), Pe = Qe(!1), [tt, Ze] = ge(() => Uc.value), Fe = Qe(tt), Pt = Qe(null), jt = Ce((G) => {
14682
+ }, []), q = !!pe || Re, [P, H] = ge(null), [te, se] = ge(""), [re, De] = ge(null), [Y, de] = ge(null), [ke, Ne] = ge([]), [ze, Be] = ge(0), [We, qe] = ge(0), [Ge, et] = ge(!1), [Je, ot] = ge(null), [St, mt] = ge(null), [ct, Ct] = ge(!1), [le, ne] = ge(null), [Ae, He] = ge(!1), Oe = Qe(!1), [tt, Ze] = ge(() => Uc.value), Fe = Qe(tt), Pt = Qe(null), jt = Ce((G) => {
14681
14683
  Uc.value = G, Ze(G);
14682
14684
  }, []), [V, ve] = ge(!1), xe = Qe(null), ht = Ce((G) => {
14683
14685
  if (!Array.isArray(G))
@@ -14706,7 +14708,7 @@ function Ai({
14706
14708
  return typeof ae == "string" && ae.trim() ? ae : null;
14707
14709
  },
14708
14710
  []
14709
- ), je = lt(() => {
14711
+ ), _e = lt(() => {
14710
14712
  const G = (be) => {
14711
14713
  if (!Array.isArray(be) || be.length === 0)
14712
14714
  return null;
@@ -14740,7 +14742,7 @@ function Ai({
14740
14742
  }), oe;
14741
14743
  }, [I, gt]), { checkpointMetaById: Vt, checkpointIndexByKey: ut } = lt(() => {
14742
14744
  const G = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ new Map();
14743
- for (const ae of je) {
14745
+ for (const ae of _e) {
14744
14746
  const be = ae.checkpointId ?? null;
14745
14747
  if (!be) continue;
14746
14748
  const dt = gt(ae.metadata, "step"), Xe = Tt(ae.metadata, "source"), rt = {
@@ -14762,10 +14764,10 @@ function Ai({
14762
14764
  return (dt.createdAt ?? "").localeCompare(Xe);
14763
14765
  });
14764
14766
  return { checkpointMetaById: G, checkpointIndexByKey: oe };
14765
- }, [je, gt, Tt]), kt = lt(() => {
14767
+ }, [_e, gt, Tt]), kt = lt(() => {
14766
14768
  var Xe;
14767
- if (!je.length) return [];
14768
- const G = [...je].reverse(), oe = (rt, Mt) => {
14769
+ if (!_e.length) return [];
14770
+ const G = [..._e].reverse(), oe = (rt, Mt) => {
14769
14771
  const tn = rt.checkpointId ?? null;
14770
14772
  if (!tn) return null;
14771
14773
  const Zn = Tt(rt.metadata, "source");
@@ -14792,7 +14794,7 @@ function Ai({
14792
14794
  const Mt = oe(rt);
14793
14795
  Mt && !be.has(Mt.id) && (ae.push(Mt), be.add(Mt.id));
14794
14796
  }
14795
- const dt = je.find((rt) => {
14797
+ const dt = _e.find((rt) => {
14796
14798
  var tn;
14797
14799
  return (((tn = Tt(rt.metadata, "source")) == null ? void 0 : tn.toLowerCase()) ?? null) === "loop";
14798
14800
  });
@@ -14801,7 +14803,7 @@ function Ai({
14801
14803
  rt && !be.has(rt.id) && (ae.push(rt), be.add(rt.id));
14802
14804
  }
14803
14805
  return ae;
14804
- }, [je, ht, gt, Tt]), Dn = Qe(null), Jn = Qe(null), Ln = Ce(() => {
14806
+ }, [_e, ht, gt, Tt]), Dn = Qe(null), Jn = Qe(null), Ln = Ce(() => {
14805
14807
  Dn.current && (Dn.current.value = ""), Jn.current && (Jn.current.value = ""), Be((G) => G + 1), qe((G) => G + 1);
14806
14808
  }, []), ti = Ce(
14807
14809
  (G) => {
@@ -14820,7 +14822,7 @@ function Ai({
14820
14822
  };
14821
14823
  return G(), window.addEventListener("resize", G), () => window.removeEventListener("resize", G);
14822
14824
  }, []), Et(() => {
14823
- We(!1), Pe.current = !1;
14825
+ He(!1), Oe.current = !1;
14824
14826
  }, [D]), Et(() => {
14825
14827
  Fe.current = tt;
14826
14828
  }, [tt]), Et(() => {
@@ -14831,13 +14833,13 @@ function Ai({
14831
14833
  Pt.current === null && (Pt.current = Fe.current), jt(te ?? "");
14832
14834
  }, [te, P, jt]);
14833
14835
  const R = Ce(async () => {
14834
- if (!(!b || T || !De))
14836
+ if (!(!b || T || !Ae))
14835
14837
  try {
14836
14838
  await S();
14837
14839
  } catch (G) {
14838
14840
  console.warn("loadOlder failed", G);
14839
14841
  }
14840
- }, [b, De, T, S]);
14842
+ }, [b, Ae, T, S]);
14841
14843
  Et(() => {
14842
14844
  (async () => {
14843
14845
  if (!x.baseUrl) {
@@ -14889,7 +14891,7 @@ function Ai({
14889
14891
  checkpointId: ae,
14890
14892
  checkpointNs: be
14891
14893
  }
14892
- ), p == null || p(oe), jt(""), de(null), Ne([]), Ln(), H(null), se(""), Me(null);
14894
+ ), p == null || p(oe), jt(""), de(null), Ne([]), Ln(), H(null), se(""), De(null);
14893
14895
  } catch (ae) {
14894
14896
  const be = (ae == null ? void 0 : ae.message) || "Failed to send message";
14895
14897
  de(be), m == null || m(be);
@@ -14897,20 +14899,20 @@ function Ai({
14897
14899
  }
14898
14900
  }, we = z.useCallback(
14899
14901
  (G, oe, ae) => {
14900
- c && (Pt.current = tt, H(G), se(oe), jt(oe), de(null), Me({
14902
+ c && (Pt.current = tt, H(G), se(oe), jt(oe), de(null), De({
14901
14903
  checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? null,
14902
14904
  checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? null
14903
14905
  }));
14904
14906
  },
14905
14907
  [tt, c, jt]
14906
14908
  ), Ye = z.useCallback(() => {
14907
- H(null), se(""), Me(null), de(null), jt(Pt.current ?? tt), Pt.current = null;
14909
+ H(null), se(""), De(null), de(null), jt(Pt.current ?? tt), Pt.current = null;
14908
14910
  }, [tt, jt]), at = Ce(
14909
14911
  (G, oe, ae) => {
14910
14912
  we(G, oe, ae);
14911
14913
  },
14912
14914
  [we]
14913
- ), He = Ce((G) => {
14915
+ ), Ue = Ce((G) => {
14914
14916
  for (let oe = G - 1; oe >= 0; oe--)
14915
14917
  if (w[oe].role === "user") {
14916
14918
  const ae = w[oe].content || [], dt = ae.filter((Xe) => Xe.type === "text").map((Xe) => Xe.text).join("") || (() => {
@@ -14963,14 +14965,14 @@ function Ai({
14963
14965
  ve(!0);
14964
14966
  try {
14965
14967
  if (!G) {
14966
- await N(), We(!1), requestAnimationFrame(() => {
14968
+ await N(), He(!1), requestAnimationFrame(() => {
14967
14969
  var be;
14968
14970
  (be = xe.current) == null || be.scrollToLatest();
14969
14971
  });
14970
14972
  return;
14971
14973
  }
14972
- const oe = je.find((be) => be.checkpointId === G), ae = (oe == null ? void 0 : oe.checkpointNs) ?? null;
14973
- await k(G, ae), We(!0), requestAnimationFrame(() => {
14974
+ const oe = _e.find((be) => be.checkpointId === G), ae = (oe == null ? void 0 : oe.checkpointNs) ?? null;
14975
+ await k(G, ae), He(!0), requestAnimationFrame(() => {
14974
14976
  var be;
14975
14977
  (be = xe.current) == null || be.scrollToTop();
14976
14978
  });
@@ -15009,7 +15011,7 @@ function Ai({
15009
15011
  }
15010
15012
  )
15011
15013
  ] }),
15012
- y && je.length > 0 && /* @__PURE__ */ u.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: [
15014
+ y && _e.length > 0 && /* @__PURE__ */ u.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: [
15013
15015
  /* @__PURE__ */ u.jsx("span", { className: "opacity-70", children: "Checkpoint:" }),
15014
15016
  /* @__PURE__ */ u.jsxs(
15015
15017
  "select",
@@ -15022,7 +15024,7 @@ function Ai({
15022
15024
  },
15023
15025
  children: [
15024
15026
  /* @__PURE__ */ u.jsx("option", { value: "", children: "Latest" }),
15025
- je.map((G) => {
15027
+ _e.map((G) => {
15026
15028
  const oe = Vt.get(G.checkpointId ?? "") ?? null;
15027
15029
  return /* @__PURE__ */ u.jsx("option", { value: G.checkpointId ?? void 0, children: Dr(oe) }, G.checkpointId);
15028
15030
  })
@@ -15051,17 +15053,17 @@ function Ai({
15051
15053
  enableMessageEditing: c,
15052
15054
  editingMessageId: P,
15053
15055
  onStartReached: () => {
15054
- De && R();
15056
+ Ae && R();
15055
15057
  },
15056
15058
  onScrollAway: (G) => {
15057
- if (!Pe.current) {
15058
- Pe.current = !0;
15059
+ if (!Oe.current) {
15060
+ Oe.current = !0;
15059
15061
  return;
15060
15062
  }
15061
- G && We(!0);
15063
+ G && He(!0);
15062
15064
  },
15063
15065
  onEdit: at,
15064
- onRegenerate: He,
15066
+ onRegenerate: Ue,
15065
15067
  onCancelEdit: Ye,
15066
15068
  emptyMessage: le ?? void 0,
15067
15069
  isNavigatingCheckpoint: V,
@@ -15149,7 +15151,7 @@ function Ai({
15149
15151
  onChange: bt,
15150
15152
  className: "hidden"
15151
15153
  },
15152
- Ue
15154
+ We
15153
15155
  ),
15154
15156
  Ge && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
15155
15157
  /* @__PURE__ */ u.jsx(zr, { className: "h-4 w-4 animate-spin" }),
@@ -15273,7 +15275,7 @@ var rl = "ScrollArea", [Dp, vk] = Mn(rl), [PC, un] = Dp(rl), Lp = v.forwardRef(
15273
15275
  onCornerWidthChange: w,
15274
15276
  onCornerHeightChange: T,
15275
15277
  children: /* @__PURE__ */ u.jsx(
15276
- Ae.div,
15278
+ je.div,
15277
15279
  {
15278
15280
  dir: I,
15279
15281
  ...i,
@@ -15306,7 +15308,7 @@ var Fp = "ScrollAreaViewport", $p = v.forwardRef(
15306
15308
  }
15307
15309
  ),
15308
15310
  /* @__PURE__ */ u.jsx(
15309
- Ae.div,
15311
+ je.div,
15310
15312
  {
15311
15313
  "data-radix-scroll-area-viewport": "",
15312
15314
  ...s,
@@ -15595,7 +15597,7 @@ var OC = v.forwardRef((e, t) => {
15595
15597
  onThumbPositionChange: S,
15596
15598
  onThumbPointerDown: Dt(a),
15597
15599
  children: /* @__PURE__ */ u.jsx(
15598
- Ae.div,
15600
+ je.div,
15599
15601
  {
15600
15602
  ...p,
15601
15603
  ref: y,
@@ -15637,7 +15639,7 @@ var OC = v.forwardRef((e, t) => {
15637
15639
  return a(), f.addEventListener("scroll", p), () => f.removeEventListener("scroll", p);
15638
15640
  }
15639
15641
  }, [s.viewport, d, a]), /* @__PURE__ */ u.jsx(
15640
- Ae.div,
15642
+ je.div,
15641
15643
  {
15642
15644
  "data-state": i.hasThumb ? "visible" : "hidden",
15643
15645
  ...o,
@@ -15675,7 +15677,7 @@ var zC = v.forwardRef((e, t) => {
15675
15677
  const d = ((f = o.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
15676
15678
  o.onCornerWidthChange(d), i(d);
15677
15679
  }), c ? /* @__PURE__ */ u.jsx(
15678
- Ae.div,
15680
+ je.div,
15679
15681
  {
15680
15682
  ...r,
15681
15683
  ref: t,
@@ -16045,7 +16047,7 @@ function bk(e) {
16045
16047
  }), YC(e);
16046
16048
  }
16047
16049
  var XC = "Label", th = v.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
16048
- Ae.label,
16050
+ je.label,
16049
16051
  {
16050
16052
  ...e,
16051
16053
  ref: t,
@@ -16093,7 +16095,7 @@ var Js = "Switch", [ZC, Sk] = Mn(Js), [QC, eT] = ZC(Js), oh = v.forwardRef(
16093
16095
  });
16094
16096
  return /* @__PURE__ */ u.jsxs(QC, { scope: n, checked: g, disabled: a, children: [
16095
16097
  /* @__PURE__ */ u.jsx(
16096
- Ae.button,
16098
+ je.button,
16097
16099
  {
16098
16100
  type: "button",
16099
16101
  role: "switch",
@@ -16132,7 +16134,7 @@ var sh = "SwitchThumb", ih = v.forwardRef(
16132
16134
  (e, t) => {
16133
16135
  const { __scopeSwitch: n, ...r } = e, o = eT(sh, n);
16134
16136
  return /* @__PURE__ */ u.jsx(
16135
- Ae.span,
16137
+ je.span,
16136
16138
  {
16137
16139
  "data-state": lh(o.checked),
16138
16140
  "data-disabled": o.disabled ? "" : void 0,
@@ -16223,7 +16225,7 @@ var uh = Object.freeze({
16223
16225
  wordWrap: "normal"
16224
16226
  }), rT = "VisuallyHidden", oT = v.forwardRef(
16225
16227
  (e, t) => /* @__PURE__ */ u.jsx(
16226
- Ae.span,
16228
+ je.span,
16227
16229
  {
16228
16230
  ...e,
16229
16231
  ref: t,
@@ -16334,7 +16336,7 @@ var fh = "SelectTrigger", ph = v.forwardRef(
16334
16336
  });
16335
16337
  };
16336
16338
  return /* @__PURE__ */ u.jsx(ad, { asChild: !0, ...s, children: /* @__PURE__ */ u.jsx(
16337
- Ae.button,
16339
+ je.button,
16338
16340
  {
16339
16341
  type: "button",
16340
16342
  role: "combobox",
@@ -16372,7 +16374,7 @@ var hh = "SelectValue", mh = v.forwardRef(
16372
16374
  return Lt(() => {
16373
16375
  c(d);
16374
16376
  }, [c, d]), /* @__PURE__ */ u.jsx(
16375
- Ae.span,
16377
+ je.span,
16376
16378
  {
16377
16379
  ...a,
16378
16380
  ref: f,
@@ -16386,7 +16388,7 @@ mh.displayName = hh;
16386
16388
  var dT = "SelectIcon", gh = v.forwardRef(
16387
16389
  (e, t) => {
16388
16390
  const { __scopeSelect: n, children: r, ...o } = e;
16389
- return /* @__PURE__ */ u.jsx(Ae.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
16391
+ return /* @__PURE__ */ u.jsx(je.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
16390
16392
  }
16391
16393
  );
16392
16394
  gh.displayName = dT;
@@ -16584,7 +16586,7 @@ var mT = "SelectItemAlignedPosition", bh = v.forwardRef((e, t) => {
16584
16586
  if (s.trigger && s.valueNode && a && c && x && y && g) {
16585
16587
  const k = s.trigger.getBoundingClientRect(), N = c.getBoundingClientRect(), E = s.valueNode.getBoundingClientRect(), I = g.getBoundingClientRect();
16586
16588
  if (s.dir !== "rtl") {
16587
- const se = I.left - N.left, re = E.left - se, Me = k.left - re, Y = k.width + Me, de = Math.max(Y, N.width), ke = window.innerWidth - dn, Ne = ta(re, [
16589
+ const se = I.left - N.left, re = E.left - se, De = k.left - re, Y = k.width + De, de = Math.max(Y, N.width), ke = window.innerWidth - dn, Ne = ta(re, [
16588
16590
  dn,
16589
16591
  // Prevents the content from going off the starting edge of the
16590
16592
  // viewport. It may still go off the ending edge, but this can be
@@ -16595,7 +16597,7 @@ var mT = "SelectItemAlignedPosition", bh = v.forwardRef((e, t) => {
16595
16597
  ]);
16596
16598
  a.style.minWidth = Y + "px", a.style.left = Ne + "px";
16597
16599
  } else {
16598
- const se = N.right - I.right, re = window.innerWidth - E.right - se, Me = window.innerWidth - k.right - re, Y = k.width + Me, de = Math.max(Y, N.width), ke = window.innerWidth - dn, Ne = ta(re, [
16600
+ const se = N.right - I.right, re = window.innerWidth - E.right - se, De = window.innerWidth - k.right - re, Y = k.width + De, de = Math.max(Y, N.width), ke = window.innerWidth - dn, Ne = ta(re, [
16599
16601
  dn,
16600
16602
  Math.max(dn, ke - de)
16601
16603
  ]);
@@ -16605,21 +16607,21 @@ var mT = "SelectItemAlignedPosition", bh = v.forwardRef((e, t) => {
16605
16607
  if (P <= Ee) {
16606
16608
  const se = O.length > 0 && y === O[O.length - 1].ref.current;
16607
16609
  a.style.bottom = "0px";
16608
- const re = c.clientHeight - x.offsetTop - x.offsetHeight, Me = Math.max(
16610
+ const re = c.clientHeight - x.offsetTop - x.offsetHeight, De = Math.max(
16609
16611
  W,
16610
16612
  ee + // viewport might have padding bottom, include it to avoid a scrollable viewport
16611
16613
  (se ? Re : 0) + re + B
16612
- ), Y = P + Me;
16614
+ ), Y = P + De;
16613
16615
  a.style.height = Y + "px";
16614
16616
  } else {
16615
16617
  const se = O.length > 0 && y === O[0].ref.current;
16616
16618
  a.style.top = "0px";
16617
- const Me = Math.max(
16619
+ const De = Math.max(
16618
16620
  Ee,
16619
16621
  $ + x.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
16620
16622
  (se ? pe : 0) + ee
16621
16623
  ) + H;
16622
- a.style.height = Me + "px", x.scrollTop = P - Ee + x.offsetTop;
16624
+ a.style.height = De + "px", x.scrollTop = P - Ee + x.offsetTop;
16623
16625
  }
16624
16626
  a.style.margin = `${dn}px 0`, a.style.minHeight = Z + "px", a.style.maxHeight = L + "px", r == null || r(), requestAnimationFrame(() => h.current = !0);
16625
16627
  }
@@ -16664,7 +16666,7 @@ var mT = "SelectItemAlignedPosition", bh = v.forwardRef((e, t) => {
16664
16666
  zIndex: T
16665
16667
  },
16666
16668
  children: /* @__PURE__ */ u.jsx(
16667
- Ae.div,
16669
+ je.div,
16668
16670
  {
16669
16671
  ...o,
16670
16672
  ref: f,
@@ -16727,7 +16729,7 @@ var [xT, al] = Mr(ur, {}), ra = "SelectViewport", Sh = v.forwardRef(
16727
16729
  }
16728
16730
  ),
16729
16731
  /* @__PURE__ */ u.jsx(Zs.Slot, { scope: n, children: /* @__PURE__ */ u.jsx(
16730
- Ae.div,
16732
+ je.div,
16731
16733
  {
16732
16734
  "data-radix-select-viewport": "",
16733
16735
  role: "presentation",
@@ -16769,14 +16771,14 @@ Sh.displayName = ra;
16769
16771
  var Ch = "SelectGroup", [yT, vT] = Mr(Ch), wT = v.forwardRef(
16770
16772
  (e, t) => {
16771
16773
  const { __scopeSelect: n, ...r } = e, o = jn();
16772
- return /* @__PURE__ */ u.jsx(yT, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(Ae.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
16774
+ return /* @__PURE__ */ u.jsx(yT, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(je.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
16773
16775
  }
16774
16776
  );
16775
16777
  wT.displayName = Ch;
16776
16778
  var Th = "SelectLabel", kh = v.forwardRef(
16777
16779
  (e, t) => {
16778
16780
  const { __scopeSelect: n, ...r } = e, o = vT(Th, n);
16779
- return /* @__PURE__ */ u.jsx(Ae.div, { id: o.id, ...r, ref: t });
16781
+ return /* @__PURE__ */ u.jsx(je.div, { id: o.id, ...r, ref: t });
16780
16782
  }
16781
16783
  );
16782
16784
  kh.displayName = Th;
@@ -16820,7 +16822,7 @@ var gs = "SelectItem", [bT, Rh] = Mr(gs), Eh = v.forwardRef(
16820
16822
  disabled: o,
16821
16823
  textValue: d,
16822
16824
  children: /* @__PURE__ */ u.jsx(
16823
- Ae.div,
16825
+ je.div,
16824
16826
  {
16825
16827
  role: "option",
16826
16828
  "aria-labelledby": x,
@@ -16879,7 +16881,7 @@ var Hr = "SelectItemText", Ih = v.forwardRef(
16879
16881
  [l.disabled, l.value, h]
16880
16882
  ), { onNativeOptionAdd: x, onNativeOptionRemove: y } = c;
16881
16883
  return Lt(() => (x(m), () => y(m)), [x, y, m]), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
16882
- /* @__PURE__ */ u.jsx(Ae.span, { id: l.textId, ...s, ref: p }),
16884
+ /* @__PURE__ */ u.jsx(je.span, { id: l.textId, ...s, ref: p }),
16883
16885
  l.isSelected && i.valueNode && !i.valueNodeHasChildren ? ws.createPortal(s.children, i.valueNode) : null
16884
16886
  ] });
16885
16887
  }
@@ -16888,7 +16890,7 @@ Ih.displayName = Hr;
16888
16890
  var Nh = "SelectItemIndicator", Ah = v.forwardRef(
16889
16891
  (e, t) => {
16890
16892
  const { __scopeSelect: n, ...r } = e;
16891
- return Rh(Nh, n).isSelected ? /* @__PURE__ */ u.jsx(Ae.span, { "aria-hidden": !0, ...r, ref: t }) : null;
16893
+ return Rh(Nh, n).isSelected ? /* @__PURE__ */ u.jsx(je.span, { "aria-hidden": !0, ...r, ref: t }) : null;
16892
16894
  }
16893
16895
  );
16894
16896
  Ah.displayName = Nh;
@@ -16949,7 +16951,7 @@ var Ph = v.forwardRef((e, t) => {
16949
16951
  const c = a().find((f) => f.ref.current === document.activeElement);
16950
16952
  (d = c == null ? void 0 : c.ref.current) == null || d.scrollIntoView({ block: "nearest" });
16951
16953
  }, [a]), /* @__PURE__ */ u.jsx(
16952
- Ae.div,
16954
+ je.div,
16953
16955
  {
16954
16956
  "aria-hidden": !0,
16955
16957
  ...o,
@@ -16970,7 +16972,7 @@ var Ph = v.forwardRef((e, t) => {
16970
16972
  }), ST = "SelectSeparator", Oh = v.forwardRef(
16971
16973
  (e, t) => {
16972
16974
  const { __scopeSelect: n, ...r } = e;
16973
- return /* @__PURE__ */ u.jsx(Ae.div, { "aria-hidden": !0, ...r, ref: t });
16975
+ return /* @__PURE__ */ u.jsx(je.div, { "aria-hidden": !0, ...r, ref: t });
16974
16976
  }
16975
16977
  );
16976
16978
  Oh.displayName = ST;
@@ -16996,7 +16998,7 @@ var TT = "SelectBubbleInput", Mh = v.forwardRef(
16996
16998
  d.call(a, t), a.dispatchEvent(f);
16997
16999
  }
16998
17000
  }, [i, t]), /* @__PURE__ */ u.jsx(
16999
- Ae.select,
17001
+ je.select,
17000
17002
  {
17001
17003
  ...n,
17002
17004
  style: { ...uh, ...n.style },
@@ -17144,7 +17146,7 @@ OT.displayName = Vh.displayName;
17144
17146
  var MT = "Separator", Yc = "horizontal", DT = ["horizontal", "vertical"], Gh = v.forwardRef((e, t) => {
17145
17147
  const { decorative: n, orientation: r = Yc, ...o } = e, s = LT(r) ? r : Yc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
17146
17148
  return /* @__PURE__ */ u.jsx(
17147
- Ae.div,
17149
+ je.div,
17148
17150
  {
17149
17151
  "data-orientation": s,
17150
17152
  ...a,