@versini/sassysaint 8.39.4 → 8.39.5

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as i, jsxs as T, Fragment as me } from "react/jsx-runtime";
2
- import { Subscribable as yo, pendingThenable as _a, resolveEnabled as Ee, shallowEqualObjects as Er, resolveStaleTime as gt, noop as _r, isServer as Sr, isValidTimeout as Sa, focusManager as bo, fetchState as vo, replaceData as Ta, notifyManager as xs, timeUntilStale as wo, shouldThrowError as ko, useQueryClient as Eo, I as ae, ACTION_SORT as _o, ACTION_SEARCH as So, ACTION_RESET_PROMPT as Cs, ACTION_TOGGLE_PROMPT as Is, isProbablyiPhone as _e, ue as xe, DEFAULT_ICON_ACTION_SIZE as Te, isTauri as Wt, n as Ve, L as Rs, j as yt, C as xa, LOCAL_STORAGE_PREFIX as Kt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as To, LOCAL_STORAGE_REASONING_DISCLOSURE as xo, TOAST_CHAT_SAVED as Co, PROMPT_CLASSNAME as Io, PROMPT_EDITABLE_AREA_CLASSNAME as Ro, ERROR_MESSAGE as Ao, ROLE_INTERNAL as Tr, CLIPBOARD_PROMPT as Ca, isProbablyMobile as Ge, INPUT_PLACEHOLDER_TEXT_MOBILE as Ia, INPUT_PLACEHOLDER_TEXT_ENTER as Ra, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as Aa, FOOTER_DISCLAIMERS as Na, INPUT_BOTTOM_OFFSET_EXTRA as No, INPUT_BOTTOM_OFFSET_IPHONE as Oo, INPUT_BOTTOM_OFFSET as As, TOAST_PROVIDER_CHANGED as $o, LOG_OUT as Oa, getMessageContaintWrapperClass as Po, UI_FOOTER_BUFFER as Ns, UI_BUTTON_SCROLL_BUFFER as Mo, Logo as Lo, UI_DEFAULT_MAIN_HEIGHT as $a, APP_CLASSNAME as Do, getMainPaddingClass as Pa, r as Bo, LOCAL_STORAGE_SORT as Uo, LOCAL_STORAGE_SEARCH as Vo } from "./index.CwmqrHgC.js";
2
+ import { Subscribable as yo, pendingThenable as _a, resolveEnabled as ke, shallowEqualObjects as Er, resolveStaleTime as gt, noop as _r, isServer as Sr, isValidTimeout as Sa, focusManager as bo, fetchState as vo, replaceData as Ta, notifyManager as xs, timeUntilStale as wo, shouldThrowError as ko, useQueryClient as Eo, I as ae, ACTION_SORT as _o, ACTION_SEARCH as So, ACTION_RESET_PROMPT as Cs, ACTION_TOGGLE_PROMPT as Is, isProbablyiPhone as Ee, ue as xe, DEFAULT_ICON_ACTION_SIZE as Te, isTauri as Wt, n as Ve, L as Rs, j as yt, C as xa, LOCAL_STORAGE_PREFIX as Kt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as To, LOCAL_STORAGE_REASONING_DISCLOSURE as xo, TOAST_CHAT_SAVED as Co, PROMPT_CLASSNAME as Io, PROMPT_EDITABLE_AREA_CLASSNAME as Ro, ERROR_MESSAGE as Ao, ROLE_INTERNAL as Tr, CLIPBOARD_PROMPT as Ca, isProbablyMobile as Ge, INPUT_PLACEHOLDER_TEXT_MOBILE as Ia, INPUT_PLACEHOLDER_TEXT_ENTER as Ra, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as Aa, FOOTER_DISCLAIMERS as Na, INPUT_BOTTOM_OFFSET_EXTRA as No, INPUT_BOTTOM_OFFSET_IPHONE as Oo, INPUT_BOTTOM_OFFSET as As, TOAST_PROVIDER_CHANGED as $o, LOG_OUT as Oa, getMessageContaintWrapperClass as Po, UI_FOOTER_BUFFER as Ns, UI_BUTTON_SCROLL_BUFFER as Mo, Logo as Lo, UI_DEFAULT_MAIN_HEIGHT as $a, APP_CLASSNAME as Do, getMainPaddingClass as Pa, r as Bo, LOCAL_STORAGE_SORT as Uo, LOCAL_STORAGE_SEARCH as Vo } from "./index.CHQol69z.js";
3
3
  import * as Y from "react";
4
- import Z, { useEffect as N, useRef as R, useState as F, useCallback as W, useSyncExternalStore as Ho, useMemo as he, useId as Gr, useContext as Q, useLayoutEffect as Ne, createContext as Jr, useDebugValue as zo, forwardRef as Os, Suspense as $s, lazy as it, useReducer as St } from "react";
4
+ import Z, { useEffect as N, useRef as R, useState as z, useCallback as W, useSyncExternalStore as Ho, useMemo as he, useId as Gr, useContext as X, useLayoutEffect as Ne, createContext as Jr, useDebugValue as zo, forwardRef as Os, Suspense as $s, lazy as it, useReducer as St } from "react";
5
5
  import p from "clsx";
6
6
  import { computePosition as Fo, offset as Ps, flip as Ms, shift as Ls, arrow as Wo, useMergeRefs as qr, FloatingPortal as Ds, FloatingOverlay as Ko, FloatingFocusManager as Bs, useFloating as Us, useClick as Vs, useDismiss as Hs, useRole as zs, useInteractions as Fs, FloatingTree as jo, useFloatingTree as Ws, useFloatingNodeId as Go, useListItem as Ks, autoUpdate as Jo, useListNavigation as qo, useTypeahead as Yo, FloatingNode as Qo, FloatingList as Xo } from "@floating-ui/react";
7
7
  var Zo = class extends yo {
@@ -55,7 +55,7 @@ var Zo = class extends yo {
55
55
  }
56
56
  setOptions(e) {
57
57
  const t = this.options, r = this.#e;
58
- if (this.options = this.#r.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Ee(this.options.enabled, this.#e) != "boolean")
58
+ if (this.options = this.#r.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof ke(this.options.enabled, this.#e) != "boolean")
59
59
  throw new Error(
60
60
  "Expected enabled to be a boolean or a callback that returns a boolean"
61
61
  );
@@ -70,9 +70,9 @@ var Zo = class extends yo {
70
70
  r,
71
71
  this.options,
72
72
  t
73
- ) && this.#l(), this.updateResult(), a && (this.#e !== r || Ee(this.options.enabled, this.#e) !== Ee(t.enabled, this.#e) || gt(this.options.staleTime, this.#e) !== gt(t.staleTime, this.#e)) && this.#g();
73
+ ) && this.#l(), this.updateResult(), a && (this.#e !== r || ke(this.options.enabled, this.#e) !== ke(t.enabled, this.#e) || gt(this.options.staleTime, this.#e) !== gt(t.staleTime, this.#e)) && this.#g();
74
74
  const s = this.#y();
75
- a && (this.#e !== r || Ee(this.options.enabled, this.#e) !== Ee(t.enabled, this.#e) || s !== this.#n) && this.#b(s);
75
+ a && (this.#e !== r || ke(this.options.enabled, this.#e) !== ke(t.enabled, this.#e) || s !== this.#n) && this.#b(s);
76
76
  }
77
77
  getOptimisticResult(e) {
78
78
  const t = this.#r.getQueryCache().build(this.#r, e), r = this.createResult(t, e);
@@ -132,7 +132,7 @@ var Zo = class extends yo {
132
132
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#e) : this.options.refetchInterval) ?? !1;
133
133
  }
134
134
  #b(e) {
135
- this.#k(), this.#n = e, !(Sr || Ee(this.options.enabled, this.#e) === !1 || !Sa(this.#n) || this.#n === 0) && (this.#c = setInterval(() => {
135
+ this.#k(), this.#n = e, !(Sr || ke(this.options.enabled, this.#e) === !1 || !Sa(this.#n) || this.#n === 0) && (this.#c = setInterval(() => {
136
136
  (this.options.refetchIntervalInBackground || bo.isFocused()) && this.#l();
137
137
  }, this.#n));
138
138
  }
@@ -205,7 +205,7 @@ var Zo = class extends yo {
205
205
  isStale: Yr(e, t),
206
206
  refetch: this.refetch,
207
207
  promise: this.#a,
208
- isEnabled: Ee(t.enabled, e) !== !1
208
+ isEnabled: ke(t.enabled, e) !== !1
209
209
  };
210
210
  if (this.options.experimental_prefetchInRender) {
211
211
  const E = (A) => {
@@ -271,23 +271,23 @@ var Zo = class extends yo {
271
271
  }
272
272
  };
273
273
  function ei(e, t) {
274
- return Ee(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
274
+ return ke(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
275
275
  }
276
276
  function Ma(e, t) {
277
277
  return ei(e, t) || e.state.data !== void 0 && xr(e, t, t.refetchOnMount);
278
278
  }
279
279
  function xr(e, t, r) {
280
- if (Ee(t.enabled, e) !== !1 && gt(t.staleTime, e) !== "static") {
280
+ if (ke(t.enabled, e) !== !1 && gt(t.staleTime, e) !== "static") {
281
281
  const a = typeof r == "function" ? r(e) : r;
282
282
  return a === "always" || a !== !1 && Yr(e, t);
283
283
  }
284
284
  return !1;
285
285
  }
286
286
  function La(e, t, r, a) {
287
- return (e !== t || Ee(a.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Yr(e, r);
287
+ return (e !== t || ke(a.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Yr(e, r);
288
288
  }
289
289
  function Yr(e, t) {
290
- return Ee(t.enabled, e) !== !1 && e.isStaleByTime(gt(t.staleTime, e));
290
+ return ke(t.enabled, e) !== !1 && e.isStaleByTime(gt(t.staleTime, e));
291
291
  }
292
292
  function ti(e, t) {
293
293
  return !Er(e.getCurrentResult(), t);
@@ -1020,7 +1020,7 @@ function Qr(e, t = ["INPUT", "TEXTAREA", "SELECT"], r = !1) {
1020
1020
  }, [e, t, r]);
1021
1021
  }
1022
1022
  function Fi() {
1023
- const e = R(null), [t, r] = F(!1);
1023
+ const e = R(null), [t, r] = z(!1);
1024
1024
  return { ref: W((a) => {
1025
1025
  var s, n;
1026
1026
  typeof IntersectionObserver < "u" && (a && !e.current ? e.current = new IntersectionObserver(
@@ -1083,7 +1083,7 @@ const Gi = {
1083
1083
  right: 0
1084
1084
  };
1085
1085
  function Js(e) {
1086
- const t = Wi(), r = R(0), a = R(null), [s, n] = F(Gi), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
1086
+ const t = Wi(), r = R(0), a = R(null), [s, n] = z(Gi), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
1087
1087
  const l = c[0];
1088
1088
  l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
1089
1089
  a.current && t() && n(l.contentRect);
@@ -1102,7 +1102,7 @@ function Va(e, t) {
1102
1102
  }), () => window.removeEventListener(e, t)), [e, t]);
1103
1103
  }
1104
1104
  function qi() {
1105
- const [e, t] = F({
1105
+ const [e, t] = z({
1106
1106
  width: 0,
1107
1107
  height: 0
1108
1108
  }), r = W(() => {
@@ -1114,7 +1114,7 @@ function qi() {
1114
1114
  return Va("resize", r), Va("orientationchange", r), N(r, []), e;
1115
1115
  }
1116
1116
  function Yi() {
1117
- const [e, t] = F({
1117
+ const [e, t] = z({
1118
1118
  width: 0,
1119
1119
  height: 0
1120
1120
  }), r = W(() => {
@@ -1497,7 +1497,7 @@ const hc = {
1497
1497
  right: 0
1498
1498
  };
1499
1499
  function rr(e) {
1500
- const t = dc(), r = R(0), a = R(null), [s, n] = F(hc), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
1500
+ const t = dc(), r = R(0), a = R(null), [s, n] = z(hc), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
1501
1501
  const l = c[0];
1502
1502
  l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
1503
1503
  a.current && t() && n(l.contentRect);
@@ -1562,15 +1562,15 @@ const Tt = {
1562
1562
  radius: w,
1563
1563
  variant: b,
1564
1564
  animated: S
1565
- }), k = oc({ mode: r, raw: c, iconClassName: x, variant: b }), E = ic({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = rr(), [O, K] = rr(), [M, G] = rr(), X = R(0), U = R(null), D = R(null), q = uc([C, U]);
1565
+ }), k = oc({ mode: r, raw: c, iconClassName: x, variant: b }), E = ic({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = rr(), [O, K] = rr(), [M, G] = rr(), Q = R(0), U = R(null), D = R(null), q = uc([C, U]);
1566
1566
  return Ne(() => {
1567
- M && M.current && S && (X.current = G.width + mc[d] + (l ? 0 : fc), U.current && !U.current.style.width && (U.current.style.width = `${Tt[d]}px`));
1567
+ M && M.current && S && (Q.current = G.width + mc[d] + (l ? 0 : fc), U.current && !U.current.style.width && (U.current.style.width = `${Tt[d]}px`));
1568
1568
  }, [G, M, d, l, S]), Ne(() => {
1569
1569
  if (U && U.current && S) {
1570
- let z = Tt[d];
1571
- h && _ && A.width > 0 ? z = A.width + X.current : f && O && K.width > 0 && (z = K.width + X.current), D.current && clearTimeout(D.current), z !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${z}px`, z > Tt[d] && (D.current = setTimeout(() => {
1570
+ let F = Tt[d];
1571
+ h && _ && A.width > 0 ? F = A.width + Q.current : f && O && K.width > 0 && (F = K.width + Q.current), D.current && clearTimeout(D.current), F !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${F}px`, F > Tt[d] && (D.current = setTimeout(() => {
1572
1572
  _.current && h && (_.current.style.opacity = "1"), O.current && f && (O.current.style.opacity = "1"), D.current = null;
1573
- }, pc * 0.8))), z === Tt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
1573
+ }, pc * 0.8))), F === Tt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
1574
1574
  }
1575
1575
  }, [
1576
1576
  A,
@@ -1988,7 +1988,7 @@ const lt = Z.createContext({
1988
1988
  className: t,
1989
1989
  ...r
1990
1990
  }) => {
1991
- const a = Q(lt);
1991
+ const a = X(lt);
1992
1992
  a.cellWrapper = Qt;
1993
1993
  const s = wc({
1994
1994
  className: t,
@@ -2001,7 +2001,7 @@ const lt = Z.createContext({
2001
2001
  className: t,
2002
2002
  ...r
2003
2003
  }) => {
2004
- const a = Q(lt);
2004
+ const a = X(lt);
2005
2005
  a.cellWrapper = ea;
2006
2006
  const s = kc({
2007
2007
  className: t,
@@ -2010,14 +2010,14 @@ const lt = Z.createContext({
2010
2010
  });
2011
2011
  return /* @__PURE__ */ i("tfoot", { className: s, ...r, children: e });
2012
2012
  }, Xm = ({ children: e, ...t }) => {
2013
- const r = Q(lt);
2013
+ const r = X(lt);
2014
2014
  return r.cellWrapper = rt, /* @__PURE__ */ i("tbody", { ...t, children: e });
2015
2015
  }, Zm = ({
2016
2016
  children: e,
2017
2017
  className: t,
2018
2018
  ...r
2019
2019
  }) => {
2020
- const a = Q(lt), s = Ec({
2020
+ const a = X(lt), s = Ec({
2021
2021
  mode: a.mode,
2022
2022
  cellWrapper: a.cellWrapper,
2023
2023
  className: t
@@ -2030,7 +2030,7 @@ const lt = Z.createContext({
2030
2030
  align: a,
2031
2031
  ...s
2032
2032
  }) => {
2033
- const n = Q(lt), o = t || (n.cellWrapper === Qt ? "th" : "td"), { mainClasses: c, alignClasses: l } = _c({
2033
+ const n = X(lt), o = t || (n.cellWrapper === Qt ? "th" : "td"), { mainClasses: c, alignClasses: l } = _c({
2034
2034
  cellWrapper: n.cellWrapper,
2035
2035
  className: r,
2036
2036
  mode: n.mode,
@@ -2218,7 +2218,7 @@ const Je = "FOOTER_BOTTOM", Gt = "FOOTER_TOP", pt = "APP_SET_FOOTER_POSITION", Z
2218
2218
  default:
2219
2219
  return e;
2220
2220
  }
2221
- }, we = {
2221
+ }, ve = {
2222
2222
  GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
2223
2223
  location(latitude: $latitude, longitude: $longitude) {
2224
2224
  country
@@ -2356,47 +2356,47 @@ const Je = "FOOTER_BOTTOM", Gt = "FOOTER_TOP", pt = "APP_SET_FOOTER_POSITION", Z
2356
2356
  }`
2357
2357
  }, He = {
2358
2358
  GET_LOCATION: {
2359
- schema: we.GET_LOCATION,
2359
+ schema: ve.GET_LOCATION,
2360
2360
  method: "location"
2361
2361
  },
2362
2362
  GET_CHATS: {
2363
- schema: we.GET_CHATS,
2363
+ schema: ve.GET_CHATS,
2364
2364
  method: "chats"
2365
2365
  },
2366
2366
  GET_CHATS_STATS: {
2367
- schema: we.GET_CHATS_STATS,
2367
+ schema: ve.GET_CHATS_STATS,
2368
2368
  method: "chatsStats"
2369
2369
  },
2370
2370
  GET_CHAT: {
2371
- schema: we.GET_CHAT,
2371
+ schema: ve.GET_CHAT,
2372
2372
  method: "chatById"
2373
2373
  },
2374
2374
  DELETE_CHAT: {
2375
- schema: we.DELETE_CHAT,
2375
+ schema: ve.DELETE_CHAT,
2376
2376
  method: "deleteChat"
2377
2377
  },
2378
2378
  SAVE_CHAT: {
2379
- schema: we.SAVE_CHAT,
2379
+ schema: ve.SAVE_CHAT,
2380
2380
  method: "saveChat"
2381
2381
  },
2382
2382
  GET_SERVER_CAPABILITIES: {
2383
- schema: we.GET_SERVER_CAPABILITIES,
2383
+ schema: ve.GET_SERVER_CAPABILITIES,
2384
2384
  method: "getServerCapabilities"
2385
2385
  },
2386
2386
  GET_CHANGELOGS: {
2387
- schema: we.GET_CHANGELOGS,
2387
+ schema: ve.GET_CHANGELOGS,
2388
2388
  method: "getChangelogs"
2389
2389
  },
2390
2390
  GET_USER_PREFERENCES: {
2391
- schema: we.GET_USER_PREFERENCES,
2391
+ schema: ve.GET_USER_PREFERENCES,
2392
2392
  method: "getUserPreferences"
2393
2393
  },
2394
2394
  SET_USER_PREFERENCES: {
2395
- schema: we.SET_USER_PREFERENCES,
2395
+ schema: ve.SET_USER_PREFERENCES,
2396
2396
  method: "setUserPreferences"
2397
2397
  },
2398
2398
  GET_USAGE: {
2399
- schema: we.GET_USAGE,
2399
+ schema: ve.GET_USAGE,
2400
2400
  method: "usage"
2401
2401
  }
2402
2402
  }, ta = process.env.PUBLIC_SASSY_API_SERVER_URL, Jt = async ({
@@ -4124,7 +4124,7 @@ const rs = (e, t) => {
4124
4124
  null,
4125
4125
  (e[1] === null ? e[2] : e[1]) || {}
4126
4126
  ], ad = () => {
4127
- const e = Q(Xl);
4127
+ const e = X(Xl);
4128
4128
  return he(() => Ue(Yl, e), [
4129
4129
  e
4130
4130
  ]);
@@ -4171,7 +4171,7 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
4171
4171
  }), hr = {
4172
4172
  dedupe: !0
4173
4173
  }, as = Promise.resolve(de), cd = (e, t, r) => {
4174
- const { cache: a, compare: s, suspense: n, fallbackData: o, revalidateOnMount: c, revalidateIfStale: l, refreshInterval: u, refreshWhenHidden: m, refreshWhenOffline: d, keepPreviousData: h } = r, [f, y, g, w] = Ae.get(a), [b, x] = na(e), S = R(!1), P = R(!1), C = R(b), v = R(t), k = R(r), E = () => k.current, I = () => E().isVisible() && E().isOnline(), [_, A, O, K] = Sn(a, b), M = R({}).current, G = j(o) ? j(r.fallback) ? de : r.fallback[b] : o, X = ($, B) => {
4174
+ const { cache: a, compare: s, suspense: n, fallbackData: o, revalidateOnMount: c, revalidateIfStale: l, refreshInterval: u, refreshWhenHidden: m, refreshWhenOffline: d, keepPreviousData: h } = r, [f, y, g, w] = Ae.get(a), [b, x] = na(e), S = R(!1), P = R(!1), C = R(b), v = R(t), k = R(r), E = () => k.current, I = () => E().isVisible() && E().isOnline(), [_, A, O, K] = Sn(a, b), M = R({}).current, G = j(o) ? j(r.fallback) ? de : r.fallback[b] : o, Q = ($, B) => {
4175
4175
  for (const H in M) {
4176
4176
  const L = H;
4177
4177
  if (L === "data") {
@@ -4194,7 +4194,7 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
4194
4194
  return [
4195
4195
  () => {
4196
4196
  const ee = B(_());
4197
- return X(ee, re) ? (re.data = ee.data, re.isLoading = ee.isLoading, re.isValidating = ee.isValidating, re.error = ee.error, re) : (re = ee, ee);
4197
+ return Q(ee, re) ? (re.data = ee.data, re.isLoading = ee.isLoading, re.isValidating = ee.isValidating, re.error = ee.error, re) : (re = ee, ee);
4198
4198
  },
4199
4199
  () => ce
4200
4200
  ];
@@ -4203,14 +4203,14 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
4203
4203
  b
4204
4204
  ]), D = $l.useSyncExternalStore(W(
4205
4205
  ($) => O(b, (B, H) => {
4206
- X(H, B) || $();
4206
+ Q(H, B) || $();
4207
4207
  }),
4208
4208
  // eslint-disable-next-line react-hooks/exhaustive-deps
4209
4209
  [
4210
4210
  a,
4211
4211
  b
4212
4212
  ]
4213
- ), U[0], U[1]), q = !S.current, z = f[b] && f[b].length > 0, be = D.data, fe = j(be) ? G && _n(G) ? ur(G) : G : be, $e = D.error, Fe = R(fe), Pe = h ? j(be) ? j(Fe.current) ? fe : Fe.current : be : fe, Xe = z && !j($e) ? !1 : q && !j(c) ? c : E().isPaused() ? !1 : n ? j(fe) ? !1 : l : j(fe) || l, ve = !!(b && t && q && Xe), We = j(D.isValidating) ? ve : D.isValidating, J = j(D.isLoading) ? ve : D.isLoading, te = W(
4213
+ ), U[0], U[1]), q = !S.current, F = f[b] && f[b].length > 0, ye = D.data, fe = j(ye) ? G && _n(G) ? ur(G) : G : ye, $e = D.error, Fe = R(fe), Pe = h ? j(ye) ? j(Fe.current) ? fe : Fe.current : ye : fe, Xe = F && !j($e) ? !1 : q && !j(c) ? c : E().isPaused() ? !1 : n ? j(fe) ? !1 : l : j(fe) || l, be = !!(b && t && q && Xe), We = j(D.isValidating) ? be : D.isValidating, J = j(D.isLoading) ? be : D.isLoading, te = W(
4214
4214
  async ($) => {
4215
4215
  const B = v.current;
4216
4216
  if (!b || !B || P.current || E().isPaused())
@@ -4280,7 +4280,7 @@ const ur = Z.use || // This extra generic is to avoid TypeScript mixing up the g
4280
4280
  []
4281
4281
  );
4282
4282
  if (cr(() => {
4283
- v.current = t, k.current = r, j(be) || (Fe.current = be);
4283
+ v.current = t, k.current = r, j(ye) || (Fe.current = ye);
4284
4284
  }), cr(() => {
4285
4285
  if (!b) return;
4286
4286
  const $ = te.bind(de, hr);
@@ -4374,7 +4374,7 @@ function ns(e, t) {
4374
4374
  return t != null ? ud(e, t) : e;
4375
4375
  }
4376
4376
  function hd(e) {
4377
- const [t, r] = F(e);
4377
+ const [t, r] = z(e);
4378
4378
  return N(() => {
4379
4379
  Nr(e, t) || r(e);
4380
4380
  }, [e, t]), t;
@@ -4400,7 +4400,7 @@ function md({
4400
4400
  keepLastMessageOnError: b = !0,
4401
4401
  experimental_throttle: x
4402
4402
  } = {}) {
4403
- const [S] = F(g), P = t ?? S, C = typeof e == "string" ? [e, P] : P, v = hd(r ?? []), k = he(
4403
+ const [S] = z(g), P = t ?? S, C = typeof e == "string" ? [e, P] : P, v = hd(r ?? []), k = he(
4404
4404
  () => sr(v),
4405
4405
  [v]
4406
4406
  ), { data: E, mutate: I } = Rt(
@@ -4415,7 +4415,7 @@ function md({
4415
4415
  N(() => {
4416
4416
  K.current = A;
4417
4417
  }, [A]);
4418
- const { data: M = "ready", mutate: G } = Rt([C, "status"], null), { data: X = void 0, mutate: U } = Rt([C, "error"], null), D = R(null), q = R({
4418
+ const { data: M = "ready", mutate: G } = Rt([C, "status"], null), { data: Q = void 0, mutate: U } = Rt([C, "error"], null), D = R(null), q = R({
4419
4419
  credentials: h,
4420
4420
  headers: f,
4421
4421
  body: y
@@ -4427,7 +4427,7 @@ function md({
4427
4427
  body: y
4428
4428
  };
4429
4429
  }, [h, f, y]);
4430
- const z = W(
4430
+ const F = W(
4431
4431
  async (V, $ = "generate") => {
4432
4432
  var B, H;
4433
4433
  G("submitted"), U(void 0);
@@ -4518,7 +4518,7 @@ function md({
4518
4518
  originalMessageCount: ne,
4519
4519
  maxSteps: c,
4520
4520
  messages: re
4521
- }) && await z({ messages: re });
4521
+ }) && await F({ messages: re });
4522
4522
  },
4523
4523
  [
4524
4524
  I,
@@ -4544,7 +4544,7 @@ function md({
4544
4544
  x,
4545
4545
  P
4546
4546
  ]
4547
- ), be = W(
4547
+ ), ye = W(
4548
4548
  async (V, {
4549
4549
  data: $,
4550
4550
  headers: B,
@@ -4561,29 +4561,29 @@ function md({
4561
4561
  experimental_attachments: re.length > 0 ? re : void 0,
4562
4562
  parts: bn(V)
4563
4563
  });
4564
- return z({ messages: ee, headers: B, body: H, data: $ });
4564
+ return F({ messages: ee, headers: B, body: H, data: $ });
4565
4565
  },
4566
- [z, g]
4566
+ [F, g]
4567
4567
  ), fe = W(
4568
4568
  async ({ data: V, headers: $, body: B } = {}) => {
4569
4569
  const H = _.current;
4570
4570
  if (H.length === 0)
4571
4571
  return null;
4572
4572
  const L = H[H.length - 1];
4573
- return z({
4573
+ return F({
4574
4574
  messages: L.role === "assistant" ? H.slice(0, -1) : H,
4575
4575
  headers: $,
4576
4576
  body: B,
4577
4577
  data: V
4578
4578
  });
4579
4579
  },
4580
- [z]
4580
+ [F]
4581
4581
  ), $e = W(() => {
4582
4582
  D.current && (D.current.abort(), D.current = null);
4583
4583
  }, []), Fe = W(async () => {
4584
4584
  const V = _.current;
4585
- z({ messages: V }, "resume");
4586
- }, [z]), Pe = W(
4585
+ F({ messages: V }, "resume");
4586
+ }, [F]), Pe = W(
4587
4587
  (V) => {
4588
4588
  typeof V == "function" && (V = V(_.current));
4589
4589
  const $ = sr(V);
@@ -4595,10 +4595,10 @@ function md({
4595
4595
  typeof V == "function" && (V = V(K.current)), O(V, !1), K.current = V;
4596
4596
  },
4597
4597
  [O]
4598
- ), [ve, We] = F(a), J = W(
4598
+ ), [be, We] = z(a), J = W(
4599
4599
  async (V, $ = {}, B) => {
4600
4600
  var H;
4601
- if ((H = V?.preventDefault) == null || H.call(V), !ve && !$.allowEmptySubmit)
4601
+ if ((H = V?.preventDefault) == null || H.call(V), !be && !$.allowEmptySubmit)
4602
4602
  return;
4603
4603
  B && (q.current = {
4604
4604
  ...q.current,
@@ -4611,17 +4611,17 @@ function md({
4611
4611
  id: g(),
4612
4612
  createdAt: /* @__PURE__ */ new Date(),
4613
4613
  role: "user",
4614
- content: ve,
4614
+ content: be,
4615
4615
  experimental_attachments: L.length > 0 ? L : void 0,
4616
- parts: [{ type: "text", text: ve }]
4616
+ parts: [{ type: "text", text: be }]
4617
4617
  }),
4618
4618
  headers: $.headers,
4619
4619
  body: $.body,
4620
4620
  data: $.data
4621
4621
  };
4622
- z(ce), We("");
4622
+ F(ce), We("");
4623
4623
  },
4624
- [ve, g, z]
4624
+ [be, g, F]
4625
4625
  ), te = (V) => {
4626
4626
  We(V.target.value);
4627
4627
  }, ie = W(
@@ -4640,9 +4640,9 @@ function md({
4640
4640
  ), M === "submitted" || M === "streaming")
4641
4641
  return;
4642
4642
  const H = B[B.length - 1];
4643
- vn(H) && z({ messages: B });
4643
+ vn(H) && F({ messages: B });
4644
4644
  },
4645
- [I, M, z]
4645
+ [I, M, F]
4646
4646
  );
4647
4647
  return {
4648
4648
  messages: E ?? [],
@@ -4650,12 +4650,12 @@ function md({
4650
4650
  setMessages: Pe,
4651
4651
  data: A,
4652
4652
  setData: Xe,
4653
- error: X,
4654
- append: be,
4653
+ error: Q,
4654
+ append: ye,
4655
4655
  reload: fe,
4656
4656
  stop: $e,
4657
4657
  experimental_resume: Fe,
4658
- input: ve,
4658
+ input: be,
4659
4659
  setInput: We,
4660
4660
  handleInputChange: te,
4661
4661
  handleSubmit: J,
@@ -4671,7 +4671,7 @@ const os = () => ({
4671
4671
  onToolCall: /* @__PURE__ */ new Set()
4672
4672
  }), In = Jr(null);
4673
4673
  function Qe(e = {}) {
4674
- const t = Q(In);
4674
+ const t = X(In);
4675
4675
  if (!t)
4676
4676
  throw new Error("useAiChat must be used within a AiChatProvider");
4677
4677
  const r = R(e);
@@ -4739,7 +4739,7 @@ const is = ({
4739
4739
  containerId: e,
4740
4740
  ...t
4741
4741
  }) => {
4742
- const [r, a] = F(At);
4742
+ const [r, a] = z(At);
4743
4743
  return N(() => {
4744
4744
  if (!At) {
4745
4745
  const s = async () => {
@@ -4758,9 +4758,9 @@ const is = ({
4758
4758
  }
4759
4759
  }, []), r && fr ? /* @__PURE__ */ i(fr, { containerId: e, ...t }) : null;
4760
4760
  }, pd = () => {
4761
- const [e, t] = F(!1), [r, a] = F(!1);
4761
+ const [e, t] = z(!1), [r, a] = z(!1);
4762
4762
  N(() => {
4763
- if (!_e() || !window.visualViewport)
4763
+ if (!Ee() || !window.visualViewport)
4764
4764
  return;
4765
4765
  const o = window.visualViewport, c = window.innerHeight, l = 150, u = () => {
4766
4766
  const d = c - o.height > l;
@@ -4772,7 +4772,7 @@ const is = ({
4772
4772
  }, []);
4773
4773
  const s = (o) => {
4774
4774
  a(o);
4775
- }, n = _e() && r && e;
4775
+ }, n = Ee() && r && e;
4776
4776
  return {
4777
4777
  isVirtualKeyboardVisible: e,
4778
4778
  isInputFocused: r,
@@ -4783,7 +4783,7 @@ const is = ({
4783
4783
  const t = pd();
4784
4784
  return /* @__PURE__ */ i(Rn.Provider, { value: t, children: e });
4785
4785
  }, An = () => {
4786
- const e = Q(Rn);
4786
+ const e = X(Rn);
4787
4787
  if (e === void 0)
4788
4788
  throw new Error(
4789
4789
  "useVirtualKeyboardContext must be used within a VirtualKeyboardProvider"
@@ -4942,7 +4942,7 @@ const is = ({
4942
4942
  state: { prompt: "", lastTriggeredTimestamp: 0 },
4943
4943
  dispatch: () => {
4944
4944
  }
4945
- }), ye = Z.createContext({
4945
+ }), _e = Z.createContext({
4946
4946
  state: {
4947
4947
  provider: wd,
4948
4948
  privateChat: !1,
@@ -5036,12 +5036,12 @@ class ze extends Error {
5036
5036
  }
5037
5037
  }
5038
5038
  se(ze, "code", "ERR_JOSE_GENERIC");
5039
- class ke extends ze {
5039
+ class we extends ze {
5040
5040
  constructor(t, r, a = "unspecified", s = "unspecified") {
5041
5041
  super(t, { cause: { claim: a, reason: s, payload: r } }), se(this, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"), se(this, "claim"), se(this, "reason"), se(this, "payload"), this.claim = a, this.reason = s, this.payload = r;
5042
5042
  }
5043
5043
  }
5044
- se(ke, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED");
5044
+ se(we, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED");
5045
5045
  let Vr = class extends ze {
5046
5046
  constructor(t, r, a = "unspecified", s = "unspecified") {
5047
5047
  super(t, { cause: { claim: a, reason: s, payload: r } }), se(this, "code", "ERR_JWT_EXPIRED"), se(this, "claim"), se(this, "reason"), se(this, "payload"), this.claim = a, this.reason = s, this.payload = r;
@@ -5770,18 +5770,18 @@ function fu(e, t, r = {}) {
5770
5770
  throw new da("JWT Claims Set must be a top-level JSON object");
5771
5771
  const { typ: s } = r;
5772
5772
  if (s && (typeof e.typ != "string" || ds(e.typ) !== ds(s)))
5773
- throw new ke('unexpected "typ" JWT header value', a, "typ", "check_failed");
5773
+ throw new we('unexpected "typ" JWT header value', a, "typ", "check_failed");
5774
5774
  const { requiredClaims: n = [], issuer: o, subject: c, audience: l, maxTokenAge: u } = r, m = [...n];
5775
5775
  u !== void 0 && m.push("iat"), l !== void 0 && m.push("aud"), c !== void 0 && m.push("sub"), o !== void 0 && m.push("iss");
5776
5776
  for (const y of new Set(m.reverse()))
5777
5777
  if (!(y in a))
5778
- throw new ke(`missing required "${y}" claim`, a, y, "missing");
5778
+ throw new we(`missing required "${y}" claim`, a, y, "missing");
5779
5779
  if (o && !(Array.isArray(o) ? o : [o]).includes(a.iss))
5780
- throw new ke('unexpected "iss" claim value', a, "iss", "check_failed");
5780
+ throw new we('unexpected "iss" claim value', a, "iss", "check_failed");
5781
5781
  if (c && a.sub !== c)
5782
- throw new ke('unexpected "sub" claim value', a, "sub", "check_failed");
5782
+ throw new we('unexpected "sub" claim value', a, "sub", "check_failed");
5783
5783
  if (l && !mu(a.aud, typeof l == "string" ? [l] : l))
5784
- throw new ke('unexpected "aud" claim value', a, "aud", "check_failed");
5784
+ throw new we('unexpected "aud" claim value', a, "aud", "check_failed");
5785
5785
  let d;
5786
5786
  switch (typeof r.clockTolerance) {
5787
5787
  case "string":
@@ -5798,16 +5798,16 @@ function fu(e, t, r = {}) {
5798
5798
  }
5799
5799
  const { currentDate: h } = r, f = lu(h || /* @__PURE__ */ new Date());
5800
5800
  if ((a.iat !== void 0 || u) && typeof a.iat != "number")
5801
- throw new ke('"iat" claim must be a number', a, "iat", "invalid");
5801
+ throw new we('"iat" claim must be a number', a, "iat", "invalid");
5802
5802
  if (a.nbf !== void 0) {
5803
5803
  if (typeof a.nbf != "number")
5804
- throw new ke('"nbf" claim must be a number', a, "nbf", "invalid");
5804
+ throw new we('"nbf" claim must be a number', a, "nbf", "invalid");
5805
5805
  if (a.nbf > f + d)
5806
- throw new ke('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
5806
+ throw new we('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
5807
5807
  }
5808
5808
  if (a.exp !== void 0) {
5809
5809
  if (typeof a.exp != "number")
5810
- throw new ke('"exp" claim must be a number', a, "exp", "invalid");
5810
+ throw new we('"exp" claim must be a number', a, "exp", "invalid");
5811
5811
  if (a.exp <= f - d)
5812
5812
  throw new Vr('"exp" claim timestamp check failed', a, "exp", "check_failed");
5813
5813
  }
@@ -5816,7 +5816,7 @@ function fu(e, t, r = {}) {
5816
5816
  if (y - d > g)
5817
5817
  throw new Vr('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
5818
5818
  if (y < 0 - d)
5819
- throw new ke('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
5819
+ throw new we('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
5820
5820
  }
5821
5821
  return a;
5822
5822
  }
@@ -5878,7 +5878,7 @@ function wu(e, t, r) {
5878
5878
  }, [e, r, t]), a;
5879
5879
  }
5880
5880
  function ku(e, t) {
5881
- const [r, a] = F(!1), s = R(null), n = R(null), o = W(() => {
5881
+ const [r, a] = z(!1), s = R(null), n = R(null), o = W(() => {
5882
5882
  a((l) => (!l && (!s.current || s.current === -1) && (s.current = window.setInterval(n.current, t)), !0));
5883
5883
  }, [t]), c = W(() => {
5884
5884
  a(!1), window.clearInterval(s.current || -1), s.current = -1;
@@ -5932,7 +5932,7 @@ const Ot = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Eu = (
5932
5932
  }) => {
5933
5933
  const l = wu(() => {
5934
5934
  g.stop(), y(!1);
5935
- }), u = R(null), m = R(null), [d, h] = F(!1), [f, y] = F(!1), g = ku(() => {
5935
+ }), u = R(null), m = R(null), [d, h] = z(!1), [f, y] = z(!1), g = ku(() => {
5936
5936
  y(!1);
5937
5937
  }, Cu), w = Tu({
5938
5938
  mode: a,
@@ -6067,7 +6067,7 @@ const Ru = ({
6067
6067
  dispatch: s,
6068
6068
  setChatId: n,
6069
6069
  setInitialMessages: o
6070
- } = Q(ye), { id: c, setInput: l, stop: u } = Qe(), m = R(null), d = R(!1), h = W(() => {
6070
+ } = X(_e), { id: c, setInput: l, stop: u } = Qe(), m = R(null), d = R(!1), h = W(() => {
6071
6071
  n(Be()), o([]), l(""), s({
6072
6072
  type: Ye,
6073
6073
  payload: {
@@ -6129,7 +6129,7 @@ const Ru = ({
6129
6129
  g.preventDefault(), h();
6130
6130
  };
6131
6131
  return N(() => {
6132
- _e() || ((r === !0 || a === !0) && !d.current && m.current && (d.current = !0, m.current.focus()), r === !1 && d.current && (d.current = !1));
6132
+ Ee() || ((r === !0 || a === !0) && !d.current && m.current && (d.current = !0, m.current.focus()), r === !1 && d.current && (d.current = !1));
6133
6133
  }, [r, a]), /* @__PURE__ */ i(
6134
6134
  Oe,
6135
6135
  {
@@ -6517,7 +6517,7 @@ const Ku = {
6517
6517
  right: 0
6518
6518
  };
6519
6519
  function gr(e) {
6520
- const t = Fu(), r = R(0), a = R(null), [s, n] = F(Ku), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
6520
+ const t = Fu(), r = R(0), a = R(null), [s, n] = z(Ku), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
6521
6521
  const l = c[0];
6522
6522
  l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
6523
6523
  a.current && t() && n(l.contentRect);
@@ -6582,15 +6582,15 @@ const Pt = {
6582
6582
  radius: w,
6583
6583
  variant: b,
6584
6584
  animated: S
6585
- }), k = Uu({ mode: r, raw: c, iconClassName: x, variant: b }), E = Vu({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = gr(), [O, K] = gr(), [M, G] = gr(), X = R(0), U = R(null), D = R(null), q = Wu([C, U]);
6585
+ }), k = Uu({ mode: r, raw: c, iconClassName: x, variant: b }), E = Vu({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = gr(), [O, K] = gr(), [M, G] = gr(), Q = R(0), U = R(null), D = R(null), q = Wu([C, U]);
6586
6586
  return Ne(() => {
6587
- M && M.current && S && (X.current = G.width + ju[d] + (l ? 0 : Gu), U.current && !U.current.style.width && (U.current.style.width = `${Pt[d]}px`));
6587
+ M && M.current && S && (Q.current = G.width + ju[d] + (l ? 0 : Gu), U.current && !U.current.style.width && (U.current.style.width = `${Pt[d]}px`));
6588
6588
  }, [G, M, d, l, S]), Ne(() => {
6589
6589
  if (U && U.current && S) {
6590
- let z = Pt[d];
6591
- h && _ && A.width > 0 ? z = A.width + X.current : f && O && K.width > 0 && (z = K.width + X.current), D.current && clearTimeout(D.current), z !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${z}px`, z > Pt[d] && (D.current = setTimeout(() => {
6590
+ let F = Pt[d];
6591
+ h && _ && A.width > 0 ? F = A.width + Q.current : f && O && K.width > 0 && (F = K.width + Q.current), D.current && clearTimeout(D.current), F !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${F}px`, F > Pt[d] && (D.current = setTimeout(() => {
6592
6592
  _.current && h && (_.current.style.opacity = "1"), O.current && f && (O.current.style.opacity = "1"), D.current = null;
6593
- }, Ju * 0.8))), z === Pt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
6593
+ }, Ju * 0.8))), F === Pt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
6594
6594
  }
6595
6595
  }, [
6596
6596
  A,
@@ -6913,7 +6913,7 @@ const je = "panel", Mt = "messagebox", sh = ({
6913
6913
  animationType: u = nh,
6914
6914
  maxWidth: m = "medium"
6915
6915
  }) => {
6916
- const d = R(""), [h, f] = F(
6916
+ const d = R(""), [h, f] = z(
6917
6917
  l ? u === gs ? { opacity: 0 } : {
6918
6918
  transform: "translateY(-100vh)"
6919
6919
  } : {}
@@ -7032,7 +7032,7 @@ const qe = ({
7032
7032
  dispatch: a,
7033
7033
  setChatId: s,
7034
7034
  setInitialMessages: n
7035
- } = Q(ye), [o, c] = F(!1), [l, u] = F(!1), [m, d] = jt({
7035
+ } = X(_e), [o, c] = z(!1), [l, u] = z(!1), [m, d] = jt({
7036
7036
  key: Kt + To,
7037
7037
  initialValue: ""
7038
7038
  }), h = (y) => {
@@ -7143,7 +7143,7 @@ const qe = ({
7143
7143
  focusMode: o = "system",
7144
7144
  ...c
7145
7145
  }, l) => {
7146
- const [u, m] = F(!1), [d, h] = F(!1), [f, y] = F(null), g = R([]), w = R([]), b = Q(Fr), x = Ws(), S = Go(), P = Ks(), { floatingStyles: C, refs: v, context: k } = Us({
7146
+ const [u, m] = z(!1), [d, h] = z(!1), [f, y] = z(null), g = R([]), w = R([]), b = X(Fr), x = Ws(), S = Go(), P = Ks(), { floatingStyles: C, refs: v, context: k } = Us({
7147
7147
  nodeId: S,
7148
7148
  open: u,
7149
7149
  onOpenChange: (q) => {
@@ -7167,8 +7167,8 @@ const qe = ({
7167
7167
  listRef: w,
7168
7168
  onMatch: u ? y : void 0,
7169
7169
  activeIndex: f
7170
- }), { getReferenceProps: K, getFloatingProps: M, getItemProps: G } = Fs([E, I, _, A, O]), X = ys(e) === "Button" || ys(e) === "ButtonIcon", U = X ? {
7171
- noInternalClick: X,
7170
+ }), { getReferenceProps: K, getFloatingProps: M, getItemProps: G } = Fs([E, I, _, A, O]), Q = ys(e) === "Button" || ys(e) === "ButtonIcon", U = Q ? {
7171
+ noInternalClick: Q,
7172
7172
  focusMode: o,
7173
7173
  mode: n
7174
7174
  } : {}, D = Z.cloneElement(
@@ -7414,7 +7414,7 @@ const dh = (e) => {
7414
7414
  className: e,
7415
7415
  defaultPlacement: t = "top-start"
7416
7416
  }) => {
7417
- const { dispatch: r, setChatId: a, setInitialMessages: s } = Q(ye), { dispatch: n } = Q(ca), { getAccessToken: o, user: c } = Ve(), { data: l, isSuccess: u } = Xt({
7417
+ const { dispatch: r, setChatId: a, setInitialMessages: s } = X(_e), { dispatch: n } = X(ca), { getAccessToken: o, user: c } = Ve(), { data: l, isSuccess: u } = Xt({
7418
7418
  user: c?.username,
7419
7419
  getAccessToken: o
7420
7420
  }), m = (f, y, g) => {
@@ -7493,7 +7493,7 @@ const dh = (e) => {
7493
7493
  dispatch: a,
7494
7494
  setChatId: s,
7495
7495
  setInitialMessages: n
7496
- } = Q(ye), [o, c] = F(!1), [l, u] = F(!1), [m, d] = jt({
7496
+ } = X(_e), [o, c] = z(!1), [l, u] = z(!1), [m, d] = jt({
7497
7497
  key: Kt + xo,
7498
7498
  initialValue: ""
7499
7499
  }), h = (y) => {
@@ -7571,7 +7571,7 @@ const dh = (e) => {
7571
7571
  ] });
7572
7572
  };
7573
7573
  let yr = null, br = null;
7574
- const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = async () => (br || (br = import("./index.CwmqrHgC.js").then((e) => e.utilities)), br), hh = async () => {
7574
+ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = async () => (br || (br = import("./index.CHQol69z.js").then((e) => e.utilities)), br), hh = async () => {
7575
7575
  try {
7576
7576
  await Promise.all([eo(), to()]);
7577
7577
  } catch {
@@ -7598,14 +7598,14 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7598
7598
  const { user: t, getAccessToken: r } = Ve(), {
7599
7599
  dispatch: a,
7600
7600
  state: { tokenUsage: s, provider: n, privateChat: o }
7601
- } = Q(ye), { messages: c, id: l } = Qe(), { state: u } = Q(ia), { refetch: m } = Nn({
7601
+ } = X(_e), { messages: c, id: l } = Qe(), { state: u } = X(ia), { refetch: m } = Nn({
7602
7602
  enabled: !1,
7603
7603
  user: t?.username || "",
7604
7604
  searchString: u.searchString,
7605
7605
  sortDirection: u.sortDirection,
7606
7606
  sortedCell: u.sortedCell,
7607
7607
  getAccessToken: r
7608
- }), [d, h] = F(!1), [f, y] = F(!1), g = async () => {
7608
+ }), [d, h] = z(!1), [f, y] = z(!1), g = async () => {
7609
7609
  try {
7610
7610
  if (l && c && n) {
7611
7611
  const b = c.filter(({ content: x }) => x).map(({ role: x, content: S, id: P }) => ({
@@ -7682,7 +7682,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7682
7682
  }) => {
7683
7683
  const {
7684
7684
  state: { loading: t, streaming: r }
7685
- } = Q(ye);
7685
+ } = X(_e);
7686
7686
  return /* @__PURE__ */ i(
7687
7687
  Oe,
7688
7688
  {
@@ -7805,10 +7805,10 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7805
7805
  ] }), oo = 24, Sh = 500, io = 2, Th = 5, xh = oo * io, vs = Th * oo, Ch = "ready", Ih = "streaming", Rh = "error", Ah = "submitted", Lt = (e) => {
7806
7806
  e.current && (e.current.style.height = `${xh}px`);
7807
7807
  }, Nh = () => {
7808
- const { user: e, getAccessToken: t } = Ve(), { setInputFocus: r } = An(), [a, s] = F(!1), [n, o] = F(null), [c, l] = F(!1), [u, m] = F(!1), {
7808
+ const { user: e, getAccessToken: t } = Ve(), { setInputFocus: r } = An(), [a, s] = z(!1), [n, o] = z(null), [c, l] = z(!1), [u, m] = z(!1), {
7809
7809
  dispatch: d,
7810
7810
  state: { reasoning: h, streaming: f, aborted: y, lastResetTimestamp: g, attachments: w }
7811
- } = Q(ye), { state: b, dispatch: x } = Q(ca), { state: S } = Q(ia), { refetch: P } = Nn({
7811
+ } = X(_e), { state: b, dispatch: x } = X(ca), { state: S } = X(ia), { refetch: P } = Nn({
7812
7812
  enabled: !1,
7813
7813
  user: e?.username || "",
7814
7814
  searchString: S.searchString,
@@ -7823,11 +7823,11 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7823
7823
  }), {
7824
7824
  input: M,
7825
7825
  setInput: G,
7826
- handleInputChange: X,
7826
+ handleInputChange: Q,
7827
7827
  handleSubmit: U,
7828
7828
  setMessages: D,
7829
7829
  status: q,
7830
- id: z
7830
+ id: F
7831
7831
  } = Qe({
7832
7832
  onFinish: (J, { usage: te }) => {
7833
7833
  P(), d({
@@ -7837,7 +7837,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7837
7837
  }
7838
7838
  });
7839
7839
  }
7840
- }), be = W(
7840
+ }), ye = W(
7841
7841
  async (J) => {
7842
7842
  J === Ch && d({
7843
7843
  type: at,
@@ -7877,8 +7877,8 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7877
7877
  [d, D, y]
7878
7878
  );
7879
7879
  N(() => {
7880
- q && be(q);
7881
- }, [q, be]), N(() => {
7880
+ q && ye(q);
7881
+ }, [q, ye]), N(() => {
7882
7882
  C?.sendOnEnter !== void 0 && m(C.sendOnEnter);
7883
7883
  }, [C]);
7884
7884
  const fe = W(() => {
@@ -7939,7 +7939,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7939
7939
  }), k.current && (k.current.value = "");
7940
7940
  }, Xe = W(() => {
7941
7941
  k.current && (k.current.value = ""), o(null);
7942
- }, []), ve = async (J) => {
7942
+ }, []), be = async (J) => {
7943
7943
  J.preventDefault(), Lt(A);
7944
7944
  const te = await t();
7945
7945
  let ie;
@@ -7953,7 +7953,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7953
7953
  headers: {
7954
7954
  "Content-Type": "application/json",
7955
7955
  authorization: `Bearer ${te}`,
7956
- [Rd]: z
7956
+ [Rd]: F
7957
7957
  },
7958
7958
  body: {
7959
7959
  reasoning: h
@@ -7961,13 +7961,13 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7961
7961
  experimental_attachments: ie
7962
7962
  }), Xe();
7963
7963
  }, We = (J) => {
7964
- fe(), X(J);
7964
+ fe(), Q(J);
7965
7965
  };
7966
7966
  return Qr([
7967
7967
  [
7968
7968
  "mod+K",
7969
7969
  () => {
7970
- A && A.current && !_e() && A.current.focus();
7970
+ A && A.current && !Ee() && A.current.focus();
7971
7971
  }
7972
7972
  ]
7973
7973
  ]), N(() => {
@@ -7976,7 +7976,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7976
7976
  J.indexOf(Ca) !== -1 ? navigator.clipboard.readText().then((ie) => {
7977
7977
  const $ = ie.startsWith("http://") || ie.startsWith("https://") ? ie : `"""${ie}"""`;
7978
7978
  G(J.replace(Ca, $));
7979
- }) : G(J), !_e() && A.current && A.current.focus(), x({
7979
+ }) : G(J), !Ee() && A.current && A.current.focus(), x({
7980
7980
  type: Cs
7981
7981
  });
7982
7982
  }
@@ -7987,7 +7987,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
7987
7987
  }
7988
7988
  g > 0 && g !== I.current ? (I.current = g, setTimeout(() => {
7989
7989
  A.current && (!M && Lt(A), A.current.focus());
7990
- }, Sh)) : f === !1 && !M && (Lt(A), !_e() && A.current && A.current.focus());
7990
+ }, Sh)) : f === !1 && !M && (Lt(A), !Ee() && A.current && A.current.focus());
7991
7991
  }, [g, f, M]), N(() => {
7992
7992
  b.lastTriggeredTimestamp && setTimeout(() => {
7993
7993
  fe();
@@ -8018,7 +8018,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
8018
8018
  children: /* @__PURE__ */ i("p", { className: "m-0", children: v.current })
8019
8019
  }
8020
8020
  ),
8021
- /* @__PURE__ */ i("div", { className: K.wrapper, ref: _, children: /* @__PURE__ */ T("form", { onSubmit: ve, children: [
8021
+ /* @__PURE__ */ i("div", { className: K.wrapper, ref: _, children: /* @__PURE__ */ T("form", { onSubmit: be, children: [
8022
8022
  /* @__PURE__ */ i("div", { id: O, className: "sr-only", children: Ge() ? Ia : u ? Ra : Aa }),
8023
8023
  /* @__PURE__ */ T("div", { className: "relative", children: [
8024
8024
  /* @__PURE__ */ i(
@@ -8032,13 +8032,13 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
8032
8032
  onChange: We,
8033
8033
  value: M,
8034
8034
  onKeyDown: Hi([
8035
- [u ? "enter" : "mod+Enter", ve]
8035
+ [u ? "enter" : "mod+Enter", be]
8036
8036
  ]),
8037
8037
  onFocus: () => {
8038
- _e() && (document.body.setAttribute("data-input-focused", "true"), r(!0));
8038
+ Ee() && (document.body.setAttribute("data-input-focused", "true"), r(!0));
8039
8039
  },
8040
8040
  onBlur: () => {
8041
- _e() && (document.body.removeAttribute("data-input-focused"), r(!1));
8041
+ Ee() && (document.body.removeAttribute("data-input-focused"), r(!1));
8042
8042
  },
8043
8043
  className: K.textArea,
8044
8044
  "aria-labelledby": O
@@ -8080,12 +8080,12 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
8080
8080
  }, mt = "--sassy-bottom", Oh = ({ isComponent: e }) => {
8081
8081
  const {
8082
8082
  state: { loading: t, streaming: r, restoring: a }
8083
- } = Q(ye), {
8083
+ } = X(_e), {
8084
8084
  state: { footerHeight: s, footerPosition: n },
8085
8085
  dispatch: o
8086
- } = Q(la), [c] = F(
8086
+ } = X(la), [c] = z(
8087
8087
  () => Na[Math.floor(Math.random() * Na.length)]
8088
- ), { messages: l } = Qe(), { height: u } = qi(), { height: m } = Yi(), [d, h] = Js(), f = he(() => _e(), []), y = u - m, g = he(() => {
8088
+ ), { messages: l } = Qe(), { height: u } = qi(), { height: m } = Yi(), [d, h] = Js(), f = he(() => Ee(), []), y = u - m, g = he(() => {
8089
8089
  const w = f ? Oo : As;
8090
8090
  return y > 0 && y < 100 ? No : w;
8091
8091
  }, [y, f]);
@@ -8196,7 +8196,7 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
8196
8196
  state: { privateChat: r },
8197
8197
  setChatId: a,
8198
8198
  setInitialMessages: s
8199
- } = Q(ye), { getAccessToken: n, user: o } = Ve(), { status: c } = Qe(), [l, u] = F(!1), m = W(() => {
8199
+ } = X(_e), { getAccessToken: n, user: o } = Ve(), { status: c } = Qe(), [l, u] = z(!1), m = W(() => {
8200
8200
  l || (hh(), u(!0));
8201
8201
  }, [l]), { isSuccess: d, refetch: h, data: f } = Xt({
8202
8202
  user: o?.username,
@@ -8267,21 +8267,21 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
8267
8267
  }
8268
8268
  ) : /* @__PURE__ */ i("div", { className: e, children: b });
8269
8269
  }, Ph = it(
8270
- () => import("./ProfileEntry.hC-mRukT.js").then((e) => ({
8270
+ () => import("./ProfileEntry.BX4dtHsi.js").then((e) => ({
8271
8271
  default: e.Profile
8272
8272
  }))
8273
8273
  ), Mh = it(
8274
- () => import("./SettingsEntry.vgcJ35_E.js").then((e) => ({
8274
+ () => import("./SettingsEntry.CMfHiyym.js").then((e) => ({
8275
8275
  default: e.SettingsPanel
8276
8276
  }))
8277
8277
  ), Lh = it(
8278
- () => import("./HistoryEntry.-djMdZ5t.js").then((e) => ({
8278
+ () => import("./HistoryEntry.CPv7U8RE.js").then((e) => ({
8279
8279
  default: e.HistoryPanel
8280
8280
  }))
8281
8281
  ), Dh = it(
8282
- () => import("./AboutEntry.DEXtlc2D.js").then((e) => ({ default: e.About }))
8282
+ () => import("./AboutEntry.DKhpvbZ4.js").then((e) => ({ default: e.About }))
8283
8283
  ), Bh = it(
8284
- () => import("./UsageEntry.0S_oclaD.js").then((e) => ({ default: e.Usage }))
8284
+ () => import("./UsageEntry.DlpQVaMh.js").then((e) => ({ default: e.Usage }))
8285
8285
  ), Uh = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ i($s, { fallback: /* @__PURE__ */ i("div", {}), children: (() => {
8286
8286
  switch (e) {
8287
8287
  case "profile":
@@ -8300,8 +8300,8 @@ const eo = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), to = as
8300
8300
  })() }) : null, Vh = ({
8301
8301
  isComponent: e = !1
8302
8302
  }) => {
8303
- const { logout: t, getAccessToken: r } = Ve(), [a, s] = F(null), [n, o] = F(!1), [c, l] = F(!1), [u, m] = F(!1), d = W(() => {
8304
- u || (import("./ProfileEntry.hC-mRukT.js"), import("./SettingsEntry.vgcJ35_E.js"), import("./HistoryEntry.-djMdZ5t.js"), import("./AboutEntry.DEXtlc2D.js"), import("./UsageEntry.0S_oclaD.js"), m(!0));
8303
+ const { logout: t, getAccessToken: r } = Ve(), [a, s] = z(null), [n, o] = z(!1), [c, l] = z(!1), [u, m] = z(!1), d = W(() => {
8304
+ u || (import("./ProfileEntry.BX4dtHsi.js"), import("./SettingsEntry.CMfHiyym.js"), import("./HistoryEntry.CPv7U8RE.js"), import("./AboutEntry.DKhpvbZ4.js"), import("./UsageEntry.DlpQVaMh.js"), m(!0));
8305
8305
  }, [u]), h = W((w) => {
8306
8306
  s(w);
8307
8307
  }, []), f = W(() => {
@@ -8866,7 +8866,7 @@ const am = {
8866
8866
  right: 0
8867
8867
  };
8868
8868
  function wr(e) {
8869
- const t = tm(), r = R(0), a = R(null), [s, n] = F(am), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
8869
+ const t = tm(), r = R(0), a = R(null), [s, n] = z(am), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
8870
8870
  const l = c[0];
8871
8871
  l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
8872
8872
  a.current && t() && n(l.contentRect);
@@ -8931,15 +8931,15 @@ const Bt = {
8931
8931
  radius: w,
8932
8932
  variant: b,
8933
8933
  animated: S
8934
- }), k = Qh({ mode: r, raw: c, iconClassName: x, variant: b }), E = Xh({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = wr(), [O, K] = wr(), [M, G] = wr(), X = R(0), U = R(null), D = R(null), q = rm([C, U]);
8934
+ }), k = Qh({ mode: r, raw: c, iconClassName: x, variant: b }), E = Xh({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = wr(), [O, K] = wr(), [M, G] = wr(), Q = R(0), U = R(null), D = R(null), q = rm([C, U]);
8935
8935
  return Ne(() => {
8936
- M && M.current && S && (X.current = G.width + sm[d] + (l ? 0 : nm), U.current && !U.current.style.width && (U.current.style.width = `${Bt[d]}px`));
8936
+ M && M.current && S && (Q.current = G.width + sm[d] + (l ? 0 : nm), U.current && !U.current.style.width && (U.current.style.width = `${Bt[d]}px`));
8937
8937
  }, [G, M, d, l, S]), Ne(() => {
8938
8938
  if (U && U.current && S) {
8939
- let z = Bt[d];
8940
- h && _ && A.width > 0 ? z = A.width + X.current : f && O && K.width > 0 && (z = K.width + X.current), D.current && clearTimeout(D.current), z !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${z}px`, z > Bt[d] && (D.current = setTimeout(() => {
8939
+ let F = Bt[d];
8940
+ h && _ && A.width > 0 ? F = A.width + Q.current : f && O && K.width > 0 && (F = K.width + Q.current), D.current && clearTimeout(D.current), F !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${F}px`, F > Bt[d] && (D.current = setTimeout(() => {
8941
8941
  _.current && h && (_.current.style.opacity = "1"), O.current && f && (O.current.style.opacity = "1"), D.current = null;
8942
- }, om * 0.8))), z === Bt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
8942
+ }, om * 0.8))), F === Bt[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
8943
8943
  }
8944
8944
  }, [
8945
8945
  A,
@@ -9239,7 +9239,7 @@ const dm = ({ kind: e, noMaxWidth: t }) => p("px-4 py-2", {
9239
9239
  noMaxWidth: u = !1,
9240
9240
  tail: m = !1
9241
9241
  }) => {
9242
- const [d, h] = F(!1), f = fm({
9242
+ const [d, h] = z(!1), f = fm({
9243
9243
  kind: t,
9244
9244
  className: r,
9245
9245
  contentClassName: a,
@@ -9752,7 +9752,7 @@ const Am = {
9752
9752
  right: 0
9753
9753
  };
9754
9754
  function kr(e) {
9755
- const t = Im(), r = R(0), a = R(null), [s, n] = F(Am), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
9755
+ const t = Im(), r = R(0), a = R(null), [s, n] = z(Am), o = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
9756
9756
  const l = c[0];
9757
9757
  l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
9758
9758
  a.current && t() && n(l.contentRect);
@@ -9817,15 +9817,15 @@ const Ut = {
9817
9817
  radius: w,
9818
9818
  variant: b,
9819
9819
  animated: S
9820
- }), k = Tm({ mode: r, raw: c, iconClassName: x, variant: b }), E = xm({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = kr(), [O, K] = kr(), [M, G] = kr(), X = R(0), U = R(null), D = R(null), q = Rm([C, U]);
9820
+ }), k = Tm({ mode: r, raw: c, iconClassName: x, variant: b }), E = xm({ animated: S }), I = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = kr(), [O, K] = kr(), [M, G] = kr(), Q = R(0), U = R(null), D = R(null), q = Rm([C, U]);
9821
9821
  return Ne(() => {
9822
- M && M.current && S && (X.current = G.width + Nm[d] + (l ? 0 : Om), U.current && !U.current.style.width && (U.current.style.width = `${Ut[d]}px`));
9822
+ M && M.current && S && (Q.current = G.width + Nm[d] + (l ? 0 : Om), U.current && !U.current.style.width && (U.current.style.width = `${Ut[d]}px`));
9823
9823
  }, [G, M, d, l, S]), Ne(() => {
9824
9824
  if (U && U.current && S) {
9825
- let z = Ut[d];
9826
- h && _ && A.width > 0 ? z = A.width + X.current : f && O && K.width > 0 && (z = K.width + X.current), D.current && clearTimeout(D.current), z !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${z}px`, z > Ut[d] && (D.current = setTimeout(() => {
9825
+ let F = Ut[d];
9826
+ h && _ && A.width > 0 ? F = A.width + Q.current : f && O && K.width > 0 && (F = K.width + Q.current), D.current && clearTimeout(D.current), F !== parseInt(U.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"), U.current.style.width = `${F}px`, F > Ut[d] && (D.current = setTimeout(() => {
9827
9827
  _.current && h && (_.current.style.opacity = "1"), O.current && f && (O.current.style.opacity = "1"), D.current = null;
9828
- }, $m * 0.8))), z === Ut[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
9828
+ }, $m * 0.8))), F === Ut[d] && (_.current && (_.current.style.opacity = "0"), O.current && (O.current.style.opacity = "0"));
9829
9829
  }
9830
9830
  }, [
9831
9831
  A,
@@ -9962,7 +9962,7 @@ const Mm = 200, Lm = ({
9962
9962
  mode: r = "system",
9963
9963
  focusMode: a = "system"
9964
9964
  }) => {
9965
- const [s, n] = F(!1);
9965
+ const [s, n] = z(!1);
9966
9966
  if (typeof e != "string")
9967
9967
  return e;
9968
9968
  const { string: o, isTruncated: c } = Lm({
@@ -10012,7 +10012,7 @@ const Bm = ({ content: e }) => /* @__PURE__ */ i(
10012
10012
  ), Ts = 1, Um = 150, Vm = it(
10013
10013
  () => import(
10014
10014
  /* webpackChunkName: "LazyMessageAssistant" */
10015
- "./ChatBubbleAssistant.36RmgPOi.js"
10015
+ "./ChatBubbleAssistant.lWp5OegL.js"
10016
10016
  )
10017
10017
  ), Hm = Z.memo(
10018
10018
  ({
@@ -10023,22 +10023,22 @@ const Bm = ({ content: e }) => /* @__PURE__ */ i(
10023
10023
  isLastAssistantMessage: s = !1,
10024
10024
  status: n
10025
10025
  }) => {
10026
- const {
10027
- state: { restoring: o }
10028
- } = Q(ye), [c, l] = F(!0), u = R(Date.now());
10026
+ const [o, c] = z(!0), l = R(Date.now()), [u] = z(
10027
+ () => s && (n === "streaming" || n === "submitted")
10028
+ );
10029
10029
  return N(() => {
10030
- if (s && c && t && t.trim().length >= Ts) {
10031
- const d = Date.now() - u.current, h = Um - d;
10030
+ if (s && o && t && t.trim().length >= Ts) {
10031
+ const d = Date.now() - l.current, h = Um - d;
10032
10032
  if (h > 0) {
10033
10033
  const f = setTimeout(
10034
- () => l(!1),
10034
+ () => c(!1),
10035
10035
  h
10036
10036
  );
10037
10037
  return () => clearTimeout(f);
10038
10038
  }
10039
- l(!1);
10039
+ c(!1);
10040
10040
  }
10041
- }, [t, c, s]), e === On && t ? /* @__PURE__ */ i(Bm, { content: t }) : (e === qt || e === Tr) && s && (n === "submitted" || n === "streaming") && c ? /* @__PURE__ */ i(ya, { tail: !0, children: /* @__PURE__ */ i(ho, { type: "dots" }) }) : (e === qt || e === Tr) && t && t.trim().length >= Ts ? /* @__PURE__ */ i($s, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(
10041
+ }, [t, o, s]), e === On && t ? /* @__PURE__ */ i(Bm, { content: t }) : (e === qt || e === Tr) && s && (n === "submitted" || n === "streaming") && o ? /* @__PURE__ */ i(ya, { tail: !0, children: /* @__PURE__ */ i(ho, { type: "dots" }) }) : (e === qt || e === Tr) && t && t.trim().length >= Ts ? /* @__PURE__ */ i($s, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(
10042
10042
  Vm,
10043
10043
  {
10044
10044
  role: e,
@@ -10046,7 +10046,7 @@ const Bm = ({ content: e }) => /* @__PURE__ */ i(
10046
10046
  annotations: r,
10047
10047
  toolName: a,
10048
10048
  isLastAssistantMessage: s,
10049
- smooth: !o
10049
+ smooth: u
10050
10050
  }
10051
10051
  ) }) : null;
10052
10052
  }
@@ -10089,13 +10089,13 @@ const Bm = ({ content: e }) => /* @__PURE__ */ i(
10089
10089
  }, Fm = () => {
10090
10090
  const { isAuthenticated: e } = Ve(), { ref: t, inViewport: r } = Fi(), a = R(null), s = R(null), { isVirtualKeyboardActive: n } = An(), {
10091
10091
  state: { footerPosition: o, footerHeight: c, footerOffset: l }
10092
- } = Q(la), {
10092
+ } = X(la), {
10093
10093
  state: { loading: u }
10094
- } = Q(ye), { messages: m } = Qe(), d = R(0), h = Po({
10094
+ } = X(_e), { messages: m } = Qe(), d = R(0), h = Po({
10095
10095
  isAuthenticated: e,
10096
10096
  extraClass: "rounded-b-md relative border-b-16 border-slate-900"
10097
10097
  }), y = (!m || m.length === 0) && // no current chat session OR no messages
10098
- _e() && // AND isProbablyiPhone() is true
10098
+ Ee() && // AND isProbablyiPhone() is true
10099
10099
  n ? "iphone-logo-conditional" : Ge() ? "mt-4" : "", g = W(() => {
10100
10100
  s.current && s.current.scrollIntoView({
10101
10101
  behavior: "smooth",
@@ -10127,14 +10127,14 @@ function go({
10127
10127
  isComponent: e = !1,
10128
10128
  headerHeight: t = 0
10129
10129
  }) {
10130
- const { user: r, getAccessToken: a } = Ve(), [s, n] = F(`${$a}px`), [o, c] = Js(), [l, u] = F(Be()), [m, d] = F([]), [h] = jt({
10130
+ const { user: r, getAccessToken: a } = Ve(), [s, n] = z(`${$a}px`), [o, c] = Js(), [l, u] = z(Be()), [m, d] = z([]), [h] = jt({
10131
10131
  key: Kt + Vo,
10132
10132
  initialValue: ""
10133
10133
  }), [f] = jt({
10134
10134
  key: Kt + Uo,
10135
10135
  initialValue: ft.ASC
10136
10136
  }), y = he(() => {
10137
- const E = _e();
10137
+ const E = Ee();
10138
10138
  return {
10139
10139
  footerPosition: E ? Je : Gt,
10140
10140
  footerHeight: 0,
@@ -10193,7 +10193,7 @@ function go({
10193
10193
  {
10194
10194
  value: { state: S, dispatch: P },
10195
10195
  children: /* @__PURE__ */ i(
10196
- ye.Provider,
10196
+ _e.Provider,
10197
10197
  {
10198
10198
  value: {
10199
10199
  state: C,
@@ -10270,7 +10270,7 @@ export {
10270
10270
  Hh as ButtonScroll,
10271
10271
  tn as CHAT_SET_PROVIDER,
10272
10272
  at as CHAT_SET_STATUS,
10273
- ye as ChatContext,
10273
+ _e as ChatContext,
10274
10274
  qe as ConfirmationPanel,
10275
10275
  qm as De,
10276
10276
  jt as E,