@versini/sassysaint 8.15.0 → 8.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,9 +4,9 @@ var $o = (e) => {
4
4
  var qr = (e, t, r) => t.has(e) || $o("Cannot " + r);
5
5
  var O = (e, t, r) => (qr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ge = (e, t, r) => t.has(e) ? $o("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), le = (e, t, r, a) => (qr(e, t, "write to private field"), a ? a.call(e, r) : t.set(e, r), r), fe = (e, t, r) => (qr(e, t, "access private method"), r);
6
6
  import { jsx as c, jsxs as N, Fragment as de } from "react/jsx-runtime";
7
- import { Subscribable as Gi, pendingThenable as Lo, resolveEnabled as He, shallowEqualObjects as ha, resolveStaleTime as xr, noop as ji, isServer as ma, isValidTimeout as Mo, focusManager as Wi, fetchState as qi, replaceData as Do, notifyManager as qn, timeUntilStale as Yi, useQueryClient as Ji, I as ne, ACTION_SORT as pa, ACTION_SEARCH as Yn, ACTION_RESET_PROMPT as Jn, ACTION_TOGGLE_PROMPT as Kn, re as Ne, DEFAULT_ICON_ACTION_SIZE as Ye, Qr as Oe, isElectron as ga, isProbablyiPhone as ya, L as ar, j as We, C as yt, LOCAL_STORAGE_PREFIX as bt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as Ki, LOCAL_STORAGE_REASONING_DISCLOSURE as Qi, TOAST_CHAT_SAVED as Xi, toastOptions as Ir, TOAST_PROVIDER_CHANGED as Qn, PROMPT_CLASSNAME as Zi, PROMPT_EDITABLE_AREA_CLASSNAME as el, ERROR_MESSAGE as tl, ROLE_INTERNAL as ba, CLIPBOARD_PROMPT as Bo, isProbablyMobile as st, qr as Xn, GRANTS as Zn, INPUT_PLACEHOLDER_TEXT as Po, FOOTER_DISCLAIMER as rl, S as Me, renderDataAsList as Sr, CARDS as ce, pluralize as Yt, ABOUT_TITLE as al, INFINITE_SCROLL_LIMIT as zo, INFINITE_SCROLL_THRESHOLD as Vo, LOCAL_STORAGE_SORT as es, APP_CLASSNAME as ts, TOAST_CHAT_DELETED as ol, LOCAL_STORAGE_SEARCH as rs, HISTORY_TITLE as nl, fe as sl, debounce as il, x as ll, l as Fo, PROFILE_TITLE as cl, LOCAL_STORAGE_CHAT_DETAILS as dl, SETTINGS_TITLE as ul, APP_NAME as fl, PROMPTS_DESCRIPTION as hl, getCurrentGeoLocation as ml, USAGE_TITLE as pl, LOG_OUT as Uo, getMessageContaintWrapperClass as gl, UI_FOOTER_BUFFER as as, UI_BUTTON_SCROLL_BUFFER as yl, Logo as bl, UI_DEFAULT_MAIN_HEIGHT as Ho, getMainPaddingClass as Go, r as vl } from "./index.BVTbakGo.js";
7
+ import { Subscribable as Gi, pendingThenable as Lo, resolveEnabled as He, shallowEqualObjects as ha, resolveStaleTime as xr, noop as ji, isServer as ma, isValidTimeout as Mo, focusManager as Wi, fetchState as qi, replaceData as Do, notifyManager as qn, timeUntilStale as Yi, useQueryClient as Ji, I as ne, ACTION_SORT as pa, ACTION_SEARCH as Yn, ACTION_RESET_PROMPT as Jn, ACTION_TOGGLE_PROMPT as Kn, re as Ne, DEFAULT_ICON_ACTION_SIZE as Ye, Qr as Oe, isElectron as ga, isProbablyiPhone as ya, L as ar, j as We, C as yt, LOCAL_STORAGE_PREFIX as bt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as Ki, LOCAL_STORAGE_REASONING_DISCLOSURE as Qi, TOAST_CHAT_SAVED as Xi, toastOptions as Ir, TOAST_PROVIDER_CHANGED as Qn, PROMPT_CLASSNAME as Zi, PROMPT_EDITABLE_AREA_CLASSNAME as el, ERROR_MESSAGE as tl, ROLE_INTERNAL as ba, CLIPBOARD_PROMPT as Bo, isProbablyMobile as st, qr as Xn, GRANTS as Zn, INPUT_PLACEHOLDER_TEXT as Po, FOOTER_DISCLAIMER as rl, S as Me, renderDataAsList as Sr, CARDS as ce, pluralize as Yt, ABOUT_TITLE as al, INFINITE_SCROLL_LIMIT as zo, INFINITE_SCROLL_THRESHOLD as Vo, LOCAL_STORAGE_SORT as es, APP_CLASSNAME as ts, TOAST_CHAT_DELETED as ol, LOCAL_STORAGE_SEARCH as rs, HISTORY_TITLE as nl, fe as sl, debounce as il, x as ll, l as Fo, PROFILE_TITLE as cl, LOCAL_STORAGE_CHAT_DETAILS as dl, SETTINGS_TITLE as ul, APP_NAME as fl, PROMPTS_DESCRIPTION as hl, getCurrentGeoLocation as ml, USAGE_TITLE as pl, LOG_OUT as Uo, getMessageContaintWrapperClass as gl, UI_FOOTER_BUFFER as as, UI_BUTTON_SCROLL_BUFFER as yl, Logo as bl, UI_DEFAULT_MAIN_HEIGHT as Ho, getMainPaddingClass as Go, r as vl } from "./index.CrsTcS1q.js";
8
8
  import * as oe from "react";
9
- import U, { useEffect as z, useRef as L, useState as V, useCallback as Y, useSyncExternalStore as os, useMemo as $e, useId as Lr, useContext as re, useLayoutEffect as we, isValidElement as Mr, cloneElement as eo, createContext as ns, useDebugValue as _l, forwardRef as ss, Suspense as to, lazy as ro, Fragment as wl, useReducer as jt } from "react";
9
+ import U, { useEffect as P, useRef as L, useState as z, useCallback as Y, useSyncExternalStore as os, useMemo as $e, useId as Lr, useContext as re, useLayoutEffect as we, isValidElement as Mr, cloneElement as eo, createContext as ns, useDebugValue as _l, forwardRef as ss, Suspense as to, lazy as ro, Fragment as wl, useReducer as jt } from "react";
10
10
  import g from "clsx";
11
11
  import { useMergeRefs as ao, FloatingPortal as is, FloatingOverlay as kl, FloatingFocusManager as ls, useFloating as cs, useClick as ds, useDismiss as us, useRole as fs, useInteractions as hs, FloatingTree as xl, useFloatingTree as ms, useFloatingNodeId as Tl, useListItem as ps, autoUpdate as El, offset as Cl, flip as Il, shift as Sl, useListNavigation as Nl, useTypeahead as Rl, FloatingNode as Al, FloatingList as Ol } from "@floating-ui/react";
12
12
  var Se, q, tr, ke, mt, Rt, rt, at, rr, At, Ot, pt, gt, ot, $t, te, Wt, va, _a, wa, ka, xa, Ta, Ea, gs, Wn, $l = (Wn = class extends Gi {
@@ -1083,7 +1083,7 @@ function wc(e, t, r = !1) {
1083
1083
  return e.target instanceof HTMLElement ? (r || !e.target.isContentEditable) && !t.includes(e.target.tagName) : !0;
1084
1084
  }
1085
1085
  function ws(e, t = ["INPUT", "TEXTAREA", "SELECT"], r = !1) {
1086
- z(() => {
1086
+ P(() => {
1087
1087
  const a = (o) => {
1088
1088
  e.forEach(
1089
1089
  ([n, s, l = { preventDefault: !0 }]) => {
@@ -1095,7 +1095,7 @@ function ws(e, t = ["INPUT", "TEXTAREA", "SELECT"], r = !1) {
1095
1095
  }, [e, t, r]);
1096
1096
  }
1097
1097
  function kc() {
1098
- const e = L(null), [t, r] = V(!1);
1098
+ const e = L(null), [t, r] = z(!1);
1099
1099
  return { ref: Y((a) => {
1100
1100
  var o, n;
1101
1101
  typeof IntersectionObserver < "u" && (a && !e.current ? e.current = new IntersectionObserver(
@@ -1105,7 +1105,7 @@ function kc() {
1105
1105
  }
1106
1106
  function xc() {
1107
1107
  const e = L(!1);
1108
- return z(() => (e.current = !0, () => {
1108
+ return P(() => (e.current = !0, () => {
1109
1109
  e.current = !1;
1110
1110
  }), []), Y(() => e.current, []);
1111
1111
  }
@@ -1139,7 +1139,7 @@ function vt({
1139
1139
  }, [t, a]), n = Y(() => {
1140
1140
  a(null);
1141
1141
  }, [a]);
1142
- return z(() => {
1142
+ return P(() => {
1143
1143
  try {
1144
1144
  Ko(e) === null && typeof t < "u" && Jo(e, t);
1145
1145
  } catch (s) {
@@ -1158,13 +1158,13 @@ const Cc = {
1158
1158
  right: 0
1159
1159
  };
1160
1160
  function xs(e) {
1161
- const t = xc(), r = L(0), a = L(null), [o, n] = V(Cc), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
1161
+ const t = xc(), r = L(0), a = L(null), [o, n] = z(Cc), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
1162
1162
  const i = l[0];
1163
1163
  i && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
1164
1164
  a.current && t() && n(i.contentRect);
1165
1165
  }));
1166
1166
  }), [t]);
1167
- return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
1167
+ return P(() => (a.current && (s == null || s.observe(a.current, e)), () => {
1168
1168
  s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
1169
1169
  }), [s, e]), [a, o];
1170
1170
  }
@@ -1172,12 +1172,12 @@ function Kt(e) {
1172
1172
  return Lr();
1173
1173
  }
1174
1174
  function Qo(e, t) {
1175
- z(() => (window.addEventListener(e, t, {
1175
+ P(() => (window.addEventListener(e, t, {
1176
1176
  passive: !0
1177
1177
  }), () => window.removeEventListener(e, t)), [e, t]);
1178
1178
  }
1179
1179
  function Ic() {
1180
- const [e, t] = V({
1180
+ const [e, t] = z({
1181
1181
  width: 0,
1182
1182
  height: 0
1183
1183
  }), r = Y(() => {
@@ -1186,10 +1186,10 @@ function Ic() {
1186
1186
  height: window.innerHeight || 0
1187
1187
  });
1188
1188
  }, []);
1189
- return Qo("resize", r), Qo("orientationchange", r), z(r, []), e;
1189
+ return Qo("resize", r), Qo("orientationchange", r), P(r, []), e;
1190
1190
  }
1191
1191
  function Sc() {
1192
- const [e, t] = V({
1192
+ const [e, t] = z({
1193
1193
  width: 0,
1194
1194
  height: 0
1195
1195
  }), r = Y(() => {
@@ -1199,7 +1199,7 @@ function Sc() {
1199
1199
  height: ((o = window == null ? void 0 : window.visualViewport) == null ? void 0 : o.height) || window.innerHeight || 0
1200
1200
  });
1201
1201
  }, []);
1202
- return z(() => (r(), window.visualViewport && (window.visualViewport.addEventListener("resize", r, {
1202
+ return P(() => (r(), window.visualViewport && (window.visualViewport.addEventListener("resize", r, {
1203
1203
  passive: !0
1204
1204
  }), window.visualViewport.addEventListener("orientationchange", r, {
1205
1205
  passive: !0
@@ -1634,7 +1634,7 @@ const Dr = "thead", so = "tfoot", It = "tbody", Ge = {
1634
1634
  Es.displayName = "BaseButton";
1635
1635
  function Yc() {
1636
1636
  const e = L(!1);
1637
- return z(() => (e.current = !0, () => {
1637
+ return P(() => (e.current = !0, () => {
1638
1638
  e.current = !1;
1639
1639
  }), []), Y(() => e.current, []);
1640
1640
  }
@@ -1657,13 +1657,13 @@ const Kc = {
1657
1657
  right: 0
1658
1658
  };
1659
1659
  function Yr(e) {
1660
- const t = Yc(), r = L(0), a = L(null), [o, n] = V(Kc), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
1660
+ const t = Yc(), r = L(0), a = L(null), [o, n] = z(Kc), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
1661
1661
  const i = l[0];
1662
1662
  i && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
1663
1663
  a.current && t() && n(i.contentRect);
1664
1664
  }));
1665
1665
  }), [t]);
1666
- return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
1666
+ return P(() => (a.current && (s == null || s.observe(a.current, e)), () => {
1667
1667
  s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
1668
1668
  }), [s, e]), [a, o];
1669
1669
  }
@@ -1722,11 +1722,11 @@ const Qc = {
1722
1722
  radius: b,
1723
1723
  variant: v,
1724
1724
  animated: k
1725
- }), x = Gc({ mode: r, raw: l, iconClassName: w }), E = jc({ animated: k }), [T, S] = Yr(), [R, $] = Yr(), [A, M] = Yr(), P = L(0), D = L(null), j = Jc([I, D]);
1725
+ }), x = Gc({ mode: r, raw: l, iconClassName: w }), E = jc({ animated: k }), [T, S] = Yr(), [R, $] = Yr(), [A, D] = Yr(), F = L(0), M = L(null), j = Jc([I, M]);
1726
1726
  return we(() => {
1727
- A && A.current && k && (P.current = M.width + Xc[u] + (i ? 0 : Zc));
1728
- }, [M, A, u, i, k]), we(() => {
1729
- D && D.current && k && (h && T && S.width > 0 ? (T.current && (T.current.style.opacity = "100"), D.current.style.width = `${S.width + P.current}px`) : m && $.width > 0 ? (R.current && (R.current.style.opacity = "100"), D.current.style.width = `${$.width + P.current}px`) : (T.current && (T.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), D.current.style.width = `${Qc[u]}px`));
1727
+ A && A.current && k && (F.current = D.width + Xc[u] + (i ? 0 : Zc));
1728
+ }, [D, A, u, i, k]), we(() => {
1729
+ M && M.current && k && (h && T && S.width > 0 ? (T.current && (T.current.style.opacity = "100"), M.current.style.width = `${S.width + F.current}px`) : m && $.width > 0 ? (R.current && (R.current.style.opacity = "100"), M.current.style.width = `${$.width + F.current}px`) : (T.current && (T.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), M.current.style.width = `${Qc[u]}px`));
1730
1730
  }, [
1731
1731
  S,
1732
1732
  h,
@@ -2168,7 +2168,7 @@ function Ss({ enter: e, exit: t, appendPosition: r = !1, collapse: a = !0, colla
2168
2168
  w.target === d.current && (u(), y.removeEventListener("animationend", v), y.removeEventListener("animationcancel", v), p.current === 0 && w.type !== "animationcancel" && y.classList.remove(...b));
2169
2169
  };
2170
2170
  y.classList.add(...b), y.addEventListener("animationend", v), y.addEventListener("animationcancel", v);
2171
- }, []), z(() => {
2171
+ }, []), P(() => {
2172
2172
  let y = d.current, b = () => {
2173
2173
  y.removeEventListener("animationend", b), a ? pd(y, i, o) : i();
2174
2174
  };
@@ -2400,8 +2400,8 @@ function Ad(e) {
2400
2400
  return { getToastToRender: s, isToastActive: Os, count: n == null ? void 0 : n.length };
2401
2401
  }
2402
2402
  function Od(e) {
2403
- let [t, r] = V(!1), [a, o] = V(!1), n = L(null), s = L({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, didMove: !1 }).current, { autoClose: l, pauseOnHover: i, closeToast: d, onClick: f, closeOnClick: u } = e;
2404
- Ed({ id: e.toastId, containerId: e.containerId, fn: r }), z(() => {
2403
+ let [t, r] = z(!1), [a, o] = z(!1), n = L(null), s = L({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, didMove: !1 }).current, { autoClose: l, pauseOnHover: i, closeToast: d, onClick: f, closeOnClick: u } = e;
2404
+ Ed({ id: e.toastId, containerId: e.containerId, fn: r }), P(() => {
2405
2405
  if (e.pauseOnFocusLoss) return h(), () => {
2406
2406
  m();
2407
2407
  };
@@ -2459,7 +2459,7 @@ function Od(e) {
2459
2459
  f && f(x), s.canCloseOnClick && d(!0);
2460
2460
  }), { playToast: b, pauseToast: v, isRunning: t, preventExitTransition: a, toastRef: n, eventHandlers: _ };
2461
2461
  }
2462
- var $d = typeof window < "u" ? we : z, zr = ({ theme: e, type: t, isLoading: r, ...a }) => U.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: e === "colored" ? "currentColor" : `var(--toastify-icon-color-${t})`, ...a });
2462
+ var $d = typeof window < "u" ? we : P, zr = ({ theme: e, type: t, isLoading: r, ...a }) => U.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: e === "colored" ? "currentColor" : `var(--toastify-icon-color-${t})`, ...a });
2463
2463
  function Ld(e) {
2464
2464
  return U.createElement(zr, { ...e }, U.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
2465
2465
  }
@@ -2481,11 +2481,11 @@ function Vd({ theme: e, type: t, isLoading: r, icon: a }) {
2481
2481
  return a === !1 || (Ze(a) ? o = a({ ...n, isLoading: r }) : Mr(a) ? o = eo(a, n) : r ? o = Aa.spinner() : zd(t) && (o = Aa[t](n))), o;
2482
2482
  }
2483
2483
  var Fd = (e) => {
2484
- let { isRunning: t, preventExitTransition: r, toastRef: a, eventHandlers: o, playToast: n } = Od(e), { closeButton: s, children: l, autoClose: i, onClick: d, type: f, hideProgressBar: u, closeToast: h, transition: m, position: p, className: y, style: b, progressClassName: v, updateId: w, role: k, progress: C, rtl: I, toastId: _, deleteToast: x, isIn: E, isLoading: T, closeOnClick: S, theme: R, ariaLabel: $ } = e, A = g("Toastify__toast", `Toastify__toast-theme--${R}`, `Toastify__toast--${f}`, { "Toastify__toast--rtl": I }, { "Toastify__toast--close-on-click": S }), M = Ze(y) ? y({ rtl: I, position: p, type: f, defaultClassName: A }) : g(A, y), P = Vd(e), D = !!C || !i, j = { closeToast: h, type: f, theme: R }, H = null;
2485
- return s === !1 || (Ze(s) ? H = s(j) : Mr(s) ? H = eo(s, j) : H = gd(j)), U.createElement(m, { isIn: E, done: x, position: p, preventExitTransition: r, nodeRef: a, playToast: n }, U.createElement("div", { id: _, tabIndex: 0, onClick: d, "data-in": E, className: M, ...o, style: b, ref: a, ...E && { role: k, "aria-label": $ } }, P != null && U.createElement("div", { className: g("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !T }) }, P), Ns(l, e, !t), H, !e.customProgressBar && U.createElement(yd, { ...w && !D ? { key: `p-${w}` } : {}, rtl: I, theme: R, delay: i, isRunning: t, isIn: E, closeToast: h, hide: u, type: f, className: v, controlledProgress: D, progress: C || 0 })));
2484
+ let { isRunning: t, preventExitTransition: r, toastRef: a, eventHandlers: o, playToast: n } = Od(e), { closeButton: s, children: l, autoClose: i, onClick: d, type: f, hideProgressBar: u, closeToast: h, transition: m, position: p, className: y, style: b, progressClassName: v, updateId: w, role: k, progress: C, rtl: I, toastId: _, deleteToast: x, isIn: E, isLoading: T, closeOnClick: S, theme: R, ariaLabel: $ } = e, A = g("Toastify__toast", `Toastify__toast-theme--${R}`, `Toastify__toast--${f}`, { "Toastify__toast--rtl": I }, { "Toastify__toast--close-on-click": S }), D = Ze(y) ? y({ rtl: I, position: p, type: f, defaultClassName: A }) : g(A, y), F = Vd(e), M = !!C || !i, j = { closeToast: h, type: f, theme: R }, H = null;
2485
+ return s === !1 || (Ze(s) ? H = s(j) : Mr(s) ? H = eo(s, j) : H = gd(j)), U.createElement(m, { isIn: E, done: x, position: p, preventExitTransition: r, nodeRef: a, playToast: n }, U.createElement("div", { id: _, tabIndex: 0, onClick: d, "data-in": E, className: D, ...o, style: b, ref: a, ...E && { role: k, "aria-label": $ } }, F != null && U.createElement("div", { className: g("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !T }) }, F), Ns(l, e, !t), H, !e.customProgressBar && U.createElement(yd, { ...w && !M ? { key: `p-${w}` } : {}, rtl: I, theme: R, delay: i, isRunning: t, isIn: E, closeToast: h, hide: u, type: f, className: v, controlledProgress: M, progress: C || 0 })));
2486
2486
  }, Ms = (e, t = !1) => ({ enter: `Toastify--animate Toastify__${e}-enter`, exit: `Toastify--animate Toastify__${e}-exit`, appendPosition: t }), Ud = Ss(Ms("bounce", !0)), Nr = Ss(Ms("slide", !0)), Hd = { position: "top-right", transition: Ud, autoClose: 5e3, closeButton: !0, pauseOnHover: !0, pauseOnFocusLoss: !0, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light", "aria-label": "Notifications Alt+T", hotKeys: (e) => e.altKey && e.code === "KeyT" };
2487
2487
  function Oa(e) {
2488
- let t = { ...Hd, ...e }, r = e.stacked, [a, o] = V(!0), n = L(null), { getToastToRender: s, isToastActive: l, count: i } = Ad(t), { className: d, style: f, rtl: u, containerId: h, hotKeys: m } = t;
2488
+ let t = { ...Hd, ...e }, r = e.stacked, [a, o] = z(!0), n = L(null), { getToastToRender: s, isToastActive: l, count: i } = Ad(t), { className: d, style: f, rtl: u, containerId: h, hotKeys: m } = t;
2489
2489
  function p(b) {
2490
2490
  let v = g("Toastify__toast-container", `Toastify__toast-container--${b}`, { "Toastify__toast-container--rtl": u });
2491
2491
  return Ze(d) ? d({ position: b, rtl: u, defaultClassName: v }) : g(v, Sa(d));
@@ -2504,7 +2504,7 @@ function Oa(e) {
2504
2504
  E.style.setProperty("--y", `${k ? T : T * -1}px`), E.style.setProperty("--g", `${w}`), E.style.setProperty("--s", `${1 - (a ? I : 0)}`), C += E.offsetHeight, I += 0.025;
2505
2505
  });
2506
2506
  }
2507
- }, [a, i, r]), z(() => {
2507
+ }, [a, i, r]), P(() => {
2508
2508
  function b(v) {
2509
2509
  var w;
2510
2510
  let k = n.current;
@@ -2550,13 +2550,14 @@ const Jt = "FOOTER_BOTTOM", $a = "FOOTER_TOP", Tr = "APP_SET_FOOTER_POSITION", D
2550
2550
  attachments: t.payload.attachments
2551
2551
  };
2552
2552
  case ht: {
2553
- let i = !1, d = !1, f = !1, u = !1;
2554
- return typeof ((r = t == null ? void 0 : t.payload) == null ? void 0 : r.loading) == "boolean" ? f = t.payload.loading : typeof e.loading == "boolean" && (f = e.loading), typeof ((a = t == null ? void 0 : t.payload) == null ? void 0 : a.streaming) == "boolean" ? d = t.payload.streaming : typeof e.streaming == "boolean" && (d = e.streaming), typeof ((o = t == null ? void 0 : t.payload) == null ? void 0 : o.restoring) == "boolean" ? i = t.payload.restoring : typeof e.restoring == "boolean" && (i = e.restoring), typeof ((n = t == null ? void 0 : t.payload) == null ? void 0 : n.aborted) == "boolean" ? u = t.payload.aborted : typeof e.aborted == "boolean" && (u = e.aborted), (d || f) && (i = !1, u = !1), {
2553
+ let i = !1, d = !1, f = !1, u = !1, h = "";
2554
+ return typeof ((r = t == null ? void 0 : t.payload) == null ? void 0 : r.loading) == "boolean" ? f = t.payload.loading : typeof e.loading == "boolean" && (f = e.loading), typeof ((a = t == null ? void 0 : t.payload) == null ? void 0 : a.streaming) == "boolean" ? d = t.payload.streaming : typeof e.streaming == "boolean" && (d = e.streaming), typeof ((o = t == null ? void 0 : t.payload) == null ? void 0 : o.restoring) == "boolean" ? (i = t.payload.restoring, h = t.payload.restoredModel || "") : typeof e.restoring == "boolean" && (i = e.restoring, h = e.restoredModel || ""), typeof ((n = t == null ? void 0 : t.payload) == null ? void 0 : n.aborted) == "boolean" ? u = t.payload.aborted : typeof e.aborted == "boolean" && (u = e.aborted), (d || f) && (i = !1, h = "", u = !1), {
2555
2555
  ...e,
2556
2556
  reseting: !1,
2557
2557
  streaming: d,
2558
2558
  loading: f,
2559
2559
  restoring: i,
2560
+ restoredModel: h,
2560
2561
  aborted: u,
2561
2562
  usage: t.payload.usage || e.usage,
2562
2563
  attachments: t.payload.attachments !== void 0 ? t.payload.attachments : e.attachments,
@@ -4418,7 +4419,7 @@ const Zu = () => Fa, [Ua, Ha] = ir && window.addEventListener ? [
4418
4419
  }, of = {
4419
4420
  initFocus: tf,
4420
4421
  initReconnect: rf
4421
- }, hn = !U.useId, Xt = !ir || Qu, nf = (e) => Xu() ? window.requestAnimationFrame(e) : setTimeout(e, 1), ta = Xt ? z : we, ra = typeof navigator < "u" && navigator.connection, mn = !Xt && ra && ([
4422
+ }, hn = !U.useId, Xt = !ir || Qu, nf = (e) => Xu() ? window.requestAnimationFrame(e) : setTimeout(e, 1), ta = Xt ? P : we, ra = typeof navigator < "u" && navigator.connection, mn = !Xt && ra && ([
4422
4423
  "slow-2g",
4423
4424
  "2g"
4424
4425
  ].includes(ra.effectiveType) || ra.saveData), gr = /* @__PURE__ */ new WeakMap(), aa = (e, t) => za.prototype.toString.call(e) === `[object ${t}]`;
@@ -4670,30 +4671,30 @@ const oa = U.use || // This extra generic is to avoid TypeScript mixing up the g
4670
4671
  }), na = {
4671
4672
  dedupe: !0
4672
4673
  }, Ef = (e, t, r) => {
4673
- const { cache: a, compare: o, suspense: n, fallbackData: s, revalidateOnMount: l, revalidateIfStale: i, refreshInterval: d, refreshWhenHidden: f, refreshWhenOffline: u, keepPreviousData: h } = r, [m, p, y, b] = Xe.get(a), [v, w] = go(e), k = L(!1), C = L(!1), I = L(v), _ = L(t), x = L(r), E = () => x.current, T = () => E().isVisible() && E().isOnline(), [S, R, $, A] = ni(a, v), M = L({}).current, P = Q(s) ? Q(r.fallback) ? xe : r.fallback[v] : s, D = (B, F) => {
4674
- for (const K in M) {
4674
+ const { cache: a, compare: o, suspense: n, fallbackData: s, revalidateOnMount: l, revalidateIfStale: i, refreshInterval: d, refreshWhenHidden: f, refreshWhenOffline: u, keepPreviousData: h } = r, [m, p, y, b] = Xe.get(a), [v, w] = go(e), k = L(!1), C = L(!1), I = L(v), _ = L(t), x = L(r), E = () => x.current, T = () => E().isVisible() && E().isOnline(), [S, R, $, A] = ni(a, v), D = L({}).current, F = Q(s) ? Q(r.fallback) ? xe : r.fallback[v] : s, M = (B, V) => {
4675
+ for (const K in D) {
4675
4676
  const X = K;
4676
4677
  if (X === "data") {
4677
- if (!o(B[X], F[X]) && (!Q(B[X]) || !o(W, F[X])))
4678
+ if (!o(B[X], V[X]) && (!Q(B[X]) || !o(W, V[X])))
4678
4679
  return !1;
4679
- } else if (F[X] !== B[X])
4680
+ } else if (V[X] !== B[X])
4680
4681
  return !1;
4681
4682
  }
4682
4683
  return !0;
4683
4684
  }, j = $e(() => {
4684
- const B = !v || !t ? !1 : Q(l) ? E().isPaused() || n ? !1 : i !== !1 : l, F = (pe) => {
4685
+ const B = !v || !t ? !1 : Q(l) ? E().isPaused() || n ? !1 : i !== !1 : l, V = (pe) => {
4685
4686
  const Pe = lt(pe);
4686
4687
  return delete Pe._k, B ? {
4687
4688
  isValidating: !0,
4688
4689
  isLoading: !0,
4689
4690
  ...Pe
4690
4691
  } : Pe;
4691
- }, K = S(), X = A(), ue = F(K), _e = K === X ? ue : F(X);
4692
+ }, K = S(), X = A(), ue = V(K), _e = K === X ? ue : V(X);
4692
4693
  let ie = ue;
4693
4694
  return [
4694
4695
  () => {
4695
- const pe = F(S());
4696
- return D(pe, ie) ? (ie.data = pe.data, ie.isLoading = pe.isLoading, ie.isValidating = pe.isValidating, ie.error = pe.error, ie) : (ie = pe, pe);
4696
+ const pe = V(S());
4697
+ return M(pe, ie) ? (ie.data = pe.data, ie.isLoading = pe.isLoading, ie.isValidating = pe.isValidating, ie.error = pe.error, ie) : (ie = pe, pe);
4697
4698
  },
4698
4699
  () => _e
4699
4700
  ];
@@ -4701,18 +4702,18 @@ const oa = U.use || // This extra generic is to avoid TypeScript mixing up the g
4701
4702
  a,
4702
4703
  v
4703
4704
  ]), H = Ku.useSyncExternalStore(Y(
4704
- (B) => $(v, (F, K) => {
4705
- D(K, F) || B();
4705
+ (B) => $(v, (V, K) => {
4706
+ M(K, V) || B();
4706
4707
  }),
4707
4708
  // eslint-disable-next-line react-hooks/exhaustive-deps
4708
4709
  [
4709
4710
  a,
4710
4711
  v
4711
4712
  ]
4712
- ), j[0], j[1]), J = !k.current, he = m[v] && m[v].length > 0, Le = H.data, Ee = Q(Le) ? P && oi(P) ? oa(P) : P : Le, Be = H.error, Ke = L(Ee), W = h ? Q(Le) ? Q(Ke.current) ? Ee : Ke.current : Le : Ee, ae = he && !Q(Be) ? !1 : J && !Q(l) ? l : E().isPaused() ? !1 : n ? Q(Ee) ? !1 : i : Q(Ee) || i, se = !!(v && t && J && ae), be = Q(H.isValidating) ? se : H.isValidating, Ce = Q(H.isLoading) ? se : H.isLoading, ve = Y(
4713
+ ), j[0], j[1]), J = !k.current, he = m[v] && m[v].length > 0, Le = H.data, Ee = Q(Le) ? F && oi(F) ? oa(F) : F : Le, Be = H.error, Ke = L(Ee), W = h ? Q(Le) ? Q(Ke.current) ? Ee : Ke.current : Le : Ee, ae = he && !Q(Be) ? !1 : J && !Q(l) ? l : E().isPaused() ? !1 : n ? Q(Ee) ? !1 : i : Q(Ee) || i, se = !!(v && t && J && ae), be = Q(H.isValidating) ? se : H.isValidating, Ce = Q(H.isLoading) ? se : H.isLoading, ve = Y(
4713
4714
  async (B) => {
4714
- const F = _.current;
4715
- if (!v || !F || C.current || E().isPaused())
4715
+ const V = _.current;
4716
+ if (!v || !V || C.current || E().isPaused())
4716
4717
  return !1;
4717
4718
  let K, X, ue = !0;
4718
4719
  const _e = B || {}, ie = !y[v] || !_e.dedupe, pe = () => hn ? !C.current && v === I.current && k.current : v === I.current, Pe = {
@@ -4731,7 +4732,7 @@ const oa = U.use || // This extra generic is to avoid TypeScript mixing up the g
4731
4732
  if (ie && (R(Tt), r.loadingTimeout && Q(S().data) && setTimeout(() => {
4732
4733
  ue && pe() && E().onLoadingSlow(v, r);
4733
4734
  }, r.loadingTimeout), y[v] = [
4734
- F(w),
4735
+ V(w),
4735
4736
  ja()
4736
4737
  ]), [K, X] = y[v], K = await K, ie && setTimeout(Gt, r.dedupingInterval), !y[v] || y[v][1] !== X)
4737
4738
  return ie && pe() && E().onDiscarded(v), !1;
@@ -4783,11 +4784,11 @@ const oa = U.use || // This extra generic is to avoid TypeScript mixing up the g
4783
4784
  }), ta(() => {
4784
4785
  if (!v) return;
4785
4786
  const B = ve.bind(xe, na);
4786
- let F = 0;
4787
+ let V = 0;
4787
4788
  const X = Tf(v, m, (ue, _e = {}) => {
4788
4789
  if (ue == ti) {
4789
4790
  const ie = Date.now();
4790
- E().revalidateOnFocus && ie > F && T() && (F = ie + E().focusThrottleInterval, B());
4791
+ E().revalidateOnFocus && ie > V && T() && (V = ie + E().focusThrottleInterval, B());
4791
4792
  } else if (ue == ri)
4792
4793
  E().revalidateOnReconnect && T() && B();
4793
4794
  else {
@@ -4806,14 +4807,14 @@ const oa = U.use || // This extra generic is to avoid TypeScript mixing up the g
4806
4807
  v
4807
4808
  ]), ta(() => {
4808
4809
  let B;
4809
- function F() {
4810
+ function V() {
4810
4811
  const X = je(d) ? d(S().data) : d;
4811
4812
  X && B !== -1 && (B = setTimeout(K, X));
4812
4813
  }
4813
4814
  function K() {
4814
- !S().error && (f || E().isVisible()) && (u || E().isOnline()) ? ve(na).then(F) : F();
4815
+ !S().error && (f || E().isVisible()) && (u || E().isOnline()) ? ve(na).then(V) : V();
4815
4816
  }
4816
- return F(), () => {
4817
+ return V(), () => {
4817
4818
  B && (clearTimeout(B), B = -1);
4818
4819
  };
4819
4820
  }, [
@@ -4827,28 +4828,28 @@ const oa = U.use || // This extra generic is to avoid TypeScript mixing up the g
4827
4828
  _.current = t, x.current = r, C.current = !1;
4828
4829
  const B = b[v];
4829
4830
  if (!Q(B)) {
4830
- const F = G(B);
4831
- oa(F);
4831
+ const V = G(B);
4832
+ oa(V);
4832
4833
  }
4833
4834
  if (Q(Be)) {
4834
- const F = ve(na);
4835
- Q(W) || (F.status = "fulfilled", F.value = !0), oa(F);
4835
+ const V = ve(na);
4836
+ Q(W) || (V.status = "fulfilled", V.value = !0), oa(V);
4836
4837
  } else
4837
4838
  throw Be;
4838
4839
  }
4839
4840
  return {
4840
4841
  mutate: G,
4841
4842
  get data() {
4842
- return M.data = !0, W;
4843
+ return D.data = !0, W;
4843
4844
  },
4844
4845
  get error() {
4845
- return M.error = !0, Be;
4846
+ return D.error = !0, Be;
4846
4847
  },
4847
4848
  get isValidating() {
4848
- return M.isValidating = !0, be;
4849
+ return D.isValidating = !0, be;
4849
4850
  },
4850
4851
  get isLoading() {
4851
- return M.isLoading = !0, Ce;
4852
+ return D.isLoading = !0, Ce;
4852
4853
  }
4853
4854
  };
4854
4855
  }, yr = xf(Ef);
@@ -4876,8 +4877,8 @@ function yn(e, t) {
4876
4877
  return t != null ? Sf(e, t) : e;
4877
4878
  }
4878
4879
  function Nf(e) {
4879
- const [t, r] = V(e);
4880
- return z(() => {
4880
+ const [t, r] = z(e);
4881
+ return P(() => {
4881
4882
  Ba(e, t) || r(e);
4882
4883
  }, [e, t]), t;
4883
4884
  }
@@ -4902,7 +4903,7 @@ function Rf({
4902
4903
  keepLastMessageOnError: v = !0,
4903
4904
  experimental_throttle: w
4904
4905
  } = {}) {
4905
- const [k] = V(y), C = t ?? k, I = typeof e == "string" ? [e, C] : C, _ = Nf(r ?? []), x = $e(
4906
+ const [k] = z(y), C = t ?? k, I = typeof e == "string" ? [e, C] : C, _ = Nf(r ?? []), x = $e(
4906
4907
  () => Qr(_),
4907
4908
  [_]
4908
4909
  ), { data: E, mutate: T } = yr(
@@ -4910,19 +4911,19 @@ function Rf({
4910
4911
  null,
4911
4912
  { fallbackData: x }
4912
4913
  ), S = L(E || []);
4913
- z(() => {
4914
+ P(() => {
4914
4915
  S.current = E || [];
4915
4916
  }, [E]);
4916
4917
  const { data: R, mutate: $ } = yr([I, "streamData"], null), A = L(R);
4917
- z(() => {
4918
+ P(() => {
4918
4919
  A.current = R;
4919
4920
  }, [R]);
4920
- const { data: M = "ready", mutate: P } = yr([I, "status"], null), { data: D = void 0, mutate: j } = yr([I, "error"], null), H = L(null), J = L({
4921
+ const { data: D = "ready", mutate: F } = yr([I, "status"], null), { data: M = void 0, mutate: j } = yr([I, "error"], null), H = L(null), J = L({
4921
4922
  credentials: h,
4922
4923
  headers: m,
4923
4924
  body: p
4924
4925
  });
4925
- z(() => {
4926
+ P(() => {
4926
4927
  J.current = {
4927
4928
  credentials: h,
4928
4929
  headers: m,
@@ -4932,9 +4933,9 @@ function Rf({
4932
4933
  const he = Y(
4933
4934
  async (G) => {
4934
4935
  var ee, B;
4935
- P("submitted"), j(void 0);
4936
- const F = Qr(G.messages), K = F.length, X = Da(
4937
- (ee = F[F.length - 1]) == null ? void 0 : ee.toolInvocations
4936
+ F("submitted"), j(void 0);
4937
+ const V = Qr(G.messages), K = V.length, X = Da(
4938
+ (ee = V[V.length - 1]) == null ? void 0 : ee.toolInvocations
4938
4939
  );
4939
4940
  try {
4940
4941
  const _e = new AbortController();
@@ -4943,8 +4944,8 @@ function Rf({
4943
4944
  $,
4944
4945
  w
4945
4946
  ), Pe = S.current;
4946
- ie(F, !1);
4947
- const fr = o ? F : F.map(
4947
+ ie(V, !1);
4948
+ const fr = o ? V : V.map(
4948
4949
  ({
4949
4950
  role: Tt,
4950
4951
  content: me,
@@ -4969,7 +4970,7 @@ function Rf({
4969
4970
  api: e,
4970
4971
  body: (B = s == null ? void 0 : s({
4971
4972
  id: C,
4972
- messages: F,
4973
+ messages: V,
4973
4974
  requestData: G.data,
4974
4975
  requestBody: G.body
4975
4976
  })) != null ? B : {
@@ -4991,9 +4992,9 @@ function Rf({
4991
4992
  },
4992
4993
  onResponse: d,
4993
4994
  onUpdate({ message: Tt, data: me, replaceLastMessage: Ie }) {
4994
- P("streaming"), ie(
4995
+ F("streaming"), ie(
4995
4996
  [
4996
- ...Ie ? F.slice(0, F.length - 1) : F,
4997
+ ...Ie ? V.slice(0, V.length - 1) : V,
4997
4998
  Tt
4998
4999
  ],
4999
5000
  !1
@@ -5006,12 +5007,12 @@ function Rf({
5006
5007
  onFinish: f,
5007
5008
  generateId: y,
5008
5009
  fetch: b,
5009
- lastMessage: F[F.length - 1]
5010
- }), H.current = null, P("ready");
5010
+ lastMessage: V[V.length - 1]
5011
+ }), H.current = null, F("ready");
5011
5012
  } catch (_e) {
5012
5013
  if (_e.name === "AbortError")
5013
- return H.current = null, P("ready"), null;
5014
- u && _e instanceof Error && u(_e), j(_e), P("error");
5014
+ return H.current = null, F("ready"), null;
5015
+ u && _e instanceof Error && u(_e), j(_e), F("error");
5015
5016
  }
5016
5017
  const ue = S.current;
5017
5018
  ju({
@@ -5023,7 +5024,7 @@ function Rf({
5023
5024
  },
5024
5025
  [
5025
5026
  T,
5026
- P,
5027
+ F,
5027
5028
  e,
5028
5029
  J,
5029
5030
  d,
@@ -5049,7 +5050,7 @@ function Rf({
5049
5050
  async (G, {
5050
5051
  data: ee,
5051
5052
  headers: B,
5052
- body: F,
5053
+ body: V,
5053
5054
  experimental_attachments: K
5054
5055
  } = {}) => {
5055
5056
  var X, ue;
@@ -5062,17 +5063,17 @@ function Rf({
5062
5063
  experimental_attachments: _e.length > 0 ? _e : void 0,
5063
5064
  parts: Zs(G)
5064
5065
  });
5065
- return he({ messages: ie, headers: B, body: F, data: ee });
5066
+ return he({ messages: ie, headers: B, body: V, data: ee });
5066
5067
  },
5067
5068
  [he, y]
5068
5069
  ), Ee = Y(
5069
5070
  async ({ data: G, headers: ee, body: B } = {}) => {
5070
- const F = S.current;
5071
- if (F.length === 0)
5071
+ const V = S.current;
5072
+ if (V.length === 0)
5072
5073
  return null;
5073
- const K = F[F.length - 1];
5074
+ const K = V[V.length - 1];
5074
5075
  return he({
5075
- messages: K.role === "assistant" ? F.slice(0, -1) : F,
5076
+ messages: K.role === "assistant" ? V.slice(0, -1) : V,
5076
5077
  headers: ee,
5077
5078
  body: B,
5078
5079
  data: G
@@ -5093,10 +5094,10 @@ function Rf({
5093
5094
  typeof G == "function" && (G = G(A.current)), $(G, !1), A.current = G;
5094
5095
  },
5095
5096
  [$]
5096
- ), [ae, se] = V(a), be = Y(
5097
+ ), [ae, se] = z(a), be = Y(
5097
5098
  async (G, ee = {}, B) => {
5098
- var F;
5099
- if ((F = G == null ? void 0 : G.preventDefault) == null || F.call(G), !ae && !ee.allowEmptySubmit)
5099
+ var V;
5100
+ if ((V = G == null ? void 0 : G.preventDefault) == null || V.call(G), !ae && !ee.allowEmptySubmit)
5100
5101
  return;
5101
5102
  B && (J.current = {
5102
5103
  ...J.current,
@@ -5135,12 +5136,12 @@ function Rf({
5135
5136
  { ...B[B.length - 1] }
5136
5137
  ],
5137
5138
  !1
5138
- ), M === "submitted" || M === "streaming")
5139
+ ), D === "submitted" || D === "streaming")
5139
5140
  return;
5140
- const F = B[B.length - 1];
5141
- ei(F) && he({ messages: B });
5141
+ const V = B[B.length - 1];
5142
+ ei(V) && he({ messages: B });
5142
5143
  },
5143
- [T, M, he]
5144
+ [T, D, he]
5144
5145
  );
5145
5146
  return {
5146
5147
  messages: E ?? [],
@@ -5148,7 +5149,7 @@ function Rf({
5148
5149
  setMessages: Ke,
5149
5150
  data: R,
5150
5151
  setData: W,
5151
- error: D,
5152
+ error: M,
5152
5153
  append: Le,
5153
5154
  reload: Ee,
5154
5155
  stop: Be,
@@ -5156,8 +5157,8 @@ function Rf({
5156
5157
  setInput: se,
5157
5158
  handleInputChange: Ce,
5158
5159
  handleSubmit: be,
5159
- isLoading: M === "submitted" || M === "streaming",
5160
- status: M,
5160
+ isLoading: D === "submitted" || D === "streaming",
5161
+ status: D,
5161
5162
  addToolResult: ve
5162
5163
  };
5163
5164
  }
@@ -5172,9 +5173,9 @@ function xt(e = {}) {
5172
5173
  if (!t)
5173
5174
  throw new Error("useAiChat must be used within a AiChatProvider");
5174
5175
  const r = L(e);
5175
- return z(() => {
5176
+ return P(() => {
5176
5177
  r.current = e;
5177
- }, [e]), z(() => {
5178
+ }, [e]), P(() => {
5178
5179
  const { onFinish: a, onError: o, onResponse: n, onToolCall: s } = r.current;
5179
5180
  return a && t.handlers.onFinish.add(a), o && t.handlers.onError.add(o), n && t.handlers.onResponse.add(n), s && t.handlers.onToolCall.add(s), () => {
5180
5181
  a && t.handlers.onFinish.delete(a), o && t.handlers.onError.delete(o), n && t.handlers.onResponse.delete(n), s && t.handlers.onToolCall.delete(s);
@@ -5186,7 +5187,7 @@ function Af({
5186
5187
  value: t
5187
5188
  }) {
5188
5189
  const r = L(bn());
5189
- z(() => {
5190
+ P(() => {
5190
5191
  r.current = bn();
5191
5192
  }, [t]);
5192
5193
  const a = Y(
@@ -5565,17 +5566,17 @@ const eh = (e) => ({
5565
5566
  }, m = ko(o), p = wo(m), y = await s.getDimensions(d), b = m === "y", v = b ? "top" : "left", w = b ? "bottom" : "right", k = b ? "clientHeight" : "clientWidth", C = n.reference[p] + n.reference[m] - h[m] - n.floating[p], I = h[m] - n.reference[m], _ = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(d));
5566
5567
  let x = _ ? _[k] : 0;
5567
5568
  (!x || !await (s.isElement == null ? void 0 : s.isElement(_))) && (x = l.floating[k] || n.floating[p]);
5568
- const E = C / 2 - I / 2, T = x / 2 - y[p] / 2 - 1, S = Zt(u[v], T), R = Zt(u[w], T), $ = S, A = x - y[p] - R, M = x / 2 - y[p] / 2 + E, P = Wa($, M, A), D = !i.arrow && dr(o) != null && M !== P && n.reference[p] / 2 - (M < $ ? S : R) - y[p] / 2 < 0, j = D ? M < $ ? M - $ : M - A : 0;
5569
+ const E = C / 2 - I / 2, T = x / 2 - y[p] / 2 - 1, S = Zt(u[v], T), R = Zt(u[w], T), $ = S, A = x - y[p] - R, D = x / 2 - y[p] / 2 + E, F = Wa($, D, A), M = !i.arrow && dr(o) != null && D !== F && n.reference[p] / 2 - (D < $ ? S : R) - y[p] / 2 < 0, j = M ? D < $ ? D - $ : D - A : 0;
5569
5570
  return {
5570
5571
  [m]: h[m] + j,
5571
5572
  data: {
5572
- [m]: P,
5573
- centerOffset: M - P - j,
5574
- ...D && {
5573
+ [m]: F,
5574
+ centerOffset: D - F - j,
5575
+ ...M && {
5575
5576
  alignmentOffset: j
5576
5577
  }
5577
5578
  },
5578
- reset: D
5579
+ reset: M
5579
5580
  };
5580
5581
  }
5581
5582
  }), th = function(e) {
@@ -5607,27 +5608,27 @@ const eh = (e) => ({
5607
5608
  const x = [l, ...I], E = await fi(t, b), T = [];
5608
5609
  let S = ((a = n.flip) == null ? void 0 : a.overflows) || [];
5609
5610
  if (f && T.push(E[v]), u) {
5610
- const M = Yf(o, s, C);
5611
- T.push(E[M[0]], E[M[1]]);
5611
+ const D = Yf(o, s, C);
5612
+ T.push(E[D[0]], E[D[1]]);
5612
5613
  }
5613
5614
  if (S = [...S, {
5614
5615
  placement: o,
5615
5616
  overflows: T
5616
- }], !T.every((M) => M <= 0)) {
5617
+ }], !T.every((D) => D <= 0)) {
5617
5618
  var R, $;
5618
- const M = (((R = n.flip) == null ? void 0 : R.index) || 0) + 1, P = x[M];
5619
- if (P)
5619
+ const D = (((R = n.flip) == null ? void 0 : R.index) || 0) + 1, F = x[D];
5620
+ if (F)
5620
5621
  return {
5621
5622
  data: {
5622
- index: M,
5623
+ index: D,
5623
5624
  overflows: S
5624
5625
  },
5625
5626
  reset: {
5626
- placement: P
5627
+ placement: F
5627
5628
  }
5628
5629
  };
5629
- let D = ($ = S.filter((j) => j.overflows[0] <= 0).sort((j, H) => j.overflows[1] - H.overflows[1])[0]) == null ? void 0 : $.placement;
5630
- if (!D)
5630
+ let M = ($ = S.filter((j) => j.overflows[0] <= 0).sort((j, H) => j.overflows[1] - H.overflows[1])[0]) == null ? void 0 : $.placement;
5631
+ if (!M)
5631
5632
  switch (m) {
5632
5633
  case "bestFit": {
5633
5634
  var A;
@@ -5640,17 +5641,17 @@ const eh = (e) => ({
5640
5641
  }
5641
5642
  return !0;
5642
5643
  }).map((H) => [H.placement, H.overflows.filter((J) => J > 0).reduce((J, he) => J + he, 0)]).sort((H, J) => H[1] - J[1])[0]) == null ? void 0 : A[0];
5643
- j && (D = j);
5644
+ j && (M = j);
5644
5645
  break;
5645
5646
  }
5646
5647
  case "initialPlacement":
5647
- D = l;
5648
+ M = l;
5648
5649
  break;
5649
5650
  }
5650
- if (o !== D)
5651
+ if (o !== M)
5651
5652
  return {
5652
5653
  reset: {
5653
- placement: D
5654
+ placement: M
5654
5655
  }
5655
5656
  };
5656
5657
  }
@@ -6164,7 +6165,7 @@ const _h = {
6164
6165
  }, En = ["mousedown", "touchstart"];
6165
6166
  function Ch(e, t, r) {
6166
6167
  const a = L(null);
6167
- return z(() => {
6168
+ return P(() => {
6168
6169
  const o = (n) => {
6169
6170
  const s = n ? n.target : void 0;
6170
6171
  if (Array.isArray(r)) {
@@ -6184,12 +6185,12 @@ function Ch(e, t, r) {
6184
6185
  }, [e, r, t]), a;
6185
6186
  }
6186
6187
  function Ih(e, t) {
6187
- const [r, a] = V(!1), o = L(null), n = L(null), s = Y(() => {
6188
+ const [r, a] = z(!1), o = L(null), n = L(null), s = Y(() => {
6188
6189
  a((i) => (!i && (!o.current || o.current === -1) && (o.current = window.setInterval(n.current, t)), !0));
6189
6190
  }, [t]), l = Y(() => {
6190
6191
  a(!1), window.clearInterval(o.current || -1), o.current = -1;
6191
6192
  }, []);
6192
- return z(() => (n.current = e, r && s(), l), [e, r, s, l]), { start: s, stop: l, active: r };
6193
+ return P(() => (n.current = e, r && s(), l), [e, r, s, l]), { start: s, stop: l, active: r };
6193
6194
  }
6194
6195
  const br = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Sh = () => g("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), Cn = ({
6195
6196
  mode: e
@@ -6238,7 +6239,7 @@ const br = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Sh = (
6238
6239
  }) => {
6239
6240
  const i = Ch(() => {
6240
6241
  y.stop(), p(!1);
6241
- }), d = L(null), f = L(null), [u, h] = V(!1), [m, p] = V(!1), y = Ih(() => {
6242
+ }), d = L(null), f = L(null), [u, h] = z(!1), [m, p] = z(!1), y = Ih(() => {
6242
6243
  p(!1);
6243
6244
  }, $h), b = Ah({
6244
6245
  mode: a,
@@ -6270,7 +6271,7 @@ const br = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Sh = (
6270
6271
  top: br(R),
6271
6272
  ...v
6272
6273
  });
6273
- const M = {
6274
+ const D = {
6274
6275
  top: "bottom",
6275
6276
  right: "left",
6276
6277
  bottom: "top",
@@ -6281,11 +6282,11 @@ const br = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, Sh = (
6281
6282
  top: br((T = $.arrow) == null ? void 0 : T.y),
6282
6283
  right: "",
6283
6284
  bottom: "",
6284
- [M]: "-4px"
6285
+ [D]: "-4px"
6285
6286
  });
6286
6287
  }
6287
6288
  }, [r, v, i]);
6288
- z(() => {
6289
+ P(() => {
6289
6290
  (async () => u && await w())();
6290
6291
  }, [w, u]);
6291
6292
  const k = () => {
@@ -6425,7 +6426,7 @@ const Lh = ({
6425
6426
  }, p = (y) => {
6426
6427
  y.preventDefault(), h();
6427
6428
  };
6428
- return z(() => {
6429
+ return P(() => {
6429
6430
  ya() || ((r === !0 || a === !0) && !u.current && f.current && (u.current = !0, f.current.focus()), r === !1 && u.current && (u.current = !1));
6430
6431
  }, [r, a]), /* @__PURE__ */ c(
6431
6432
  tt,
@@ -6760,7 +6761,7 @@ const Lh = ({
6760
6761
  xi.displayName = "BaseButton";
6761
6762
  function Jh() {
6762
6763
  const e = L(!1);
6763
- return z(() => (e.current = !0, () => {
6764
+ return P(() => (e.current = !0, () => {
6764
6765
  e.current = !1;
6765
6766
  }), []), Y(() => e.current, []);
6766
6767
  }
@@ -6783,13 +6784,13 @@ const Qh = {
6783
6784
  right: 0
6784
6785
  };
6785
6786
  function la(e) {
6786
- const t = Jh(), r = L(0), a = L(null), [o, n] = V(Qh), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
6787
+ const t = Jh(), r = L(0), a = L(null), [o, n] = z(Qh), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
6787
6788
  const i = l[0];
6788
6789
  i && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
6789
6790
  a.current && t() && n(i.contentRect);
6790
6791
  }));
6791
6792
  }), [t]);
6792
- return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
6793
+ return P(() => (a.current && (s == null || s.observe(a.current, e)), () => {
6793
6794
  s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
6794
6795
  }), [s, e]), [a, o];
6795
6796
  }
@@ -6848,11 +6849,11 @@ const Xh = {
6848
6849
  radius: b,
6849
6850
  variant: v,
6850
6851
  animated: k
6851
- }), x = jh({ mode: r, raw: l, iconClassName: w }), E = Wh({ animated: k }), [T, S] = la(), [R, $] = la(), [A, M] = la(), P = L(0), D = L(null), j = Kh([I, D]);
6852
+ }), x = jh({ mode: r, raw: l, iconClassName: w }), E = Wh({ animated: k }), [T, S] = la(), [R, $] = la(), [A, D] = la(), F = L(0), M = L(null), j = Kh([I, M]);
6852
6853
  return we(() => {
6853
- A && A.current && k && (P.current = M.width + Zh[u] + (i ? 0 : em));
6854
- }, [M, A, u, i, k]), we(() => {
6855
- D && D.current && k && (h && T && S.width > 0 ? (T.current && (T.current.style.opacity = "100"), D.current.style.width = `${S.width + P.current}px`) : m && $.width > 0 ? (R.current && (R.current.style.opacity = "100"), D.current.style.width = `${$.width + P.current}px`) : (T.current && (T.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), D.current.style.width = `${Xh[u]}px`));
6854
+ A && A.current && k && (F.current = D.width + Zh[u] + (i ? 0 : em));
6855
+ }, [D, A, u, i, k]), we(() => {
6856
+ M && M.current && k && (h && T && S.width > 0 ? (T.current && (T.current.style.opacity = "100"), M.current.style.width = `${S.width + F.current}px`) : m && $.width > 0 ? (R.current && (R.current.style.opacity = "100"), M.current.style.width = `${$.width + F.current}px`) : (T.current && (T.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), M.current.style.width = `${Xh[u]}px`));
6856
6857
  }, [
6857
6858
  S,
6858
6859
  h,
@@ -7155,7 +7156,7 @@ const qt = "panel", vr = "messagebox", dm = ({
7155
7156
  animation: i = !1,
7156
7157
  animationType: d = um
7157
7158
  }) => {
7158
- const f = L(""), [u, h] = V(
7159
+ const f = L(""), [u, h] = z(
7159
7160
  i ? d === An ? { opacity: 0 } : {
7160
7161
  transform: "translateY(-100vh)"
7161
7162
  } : {}
@@ -7165,9 +7166,9 @@ const qt = "panel", vr = "messagebox", dm = ({
7165
7166
  borderMode: n,
7166
7167
  animation: i
7167
7168
  });
7168
- return z(() => (e && (f.current = document.title, document.title = `${r} | ${f.current}`), () => {
7169
+ return P(() => (e && (f.current = document.title, document.title = `${r} | ${f.current}`), () => {
7169
7170
  e && (document.title = f.current);
7170
- }), [r, e]), z(() => {
7171
+ }), [r, e]), P(() => {
7171
7172
  if (i && e) {
7172
7173
  h(
7173
7174
  i ? d === An ? { opacity: 0 } : {
@@ -7273,7 +7274,7 @@ const dt = ({
7273
7274
  dispatch: a,
7274
7275
  setChatId: o,
7275
7276
  setInitialMessages: n
7276
- } = re(Re), [s, l] = V(!1), [i, d] = V(!1), [f, u] = vt({
7277
+ } = re(Re), [s, l] = z(!1), [i, d] = z(!1), [f, u] = vt({
7277
7278
  key: bt + Ki,
7278
7279
  initialValue: ""
7279
7280
  }), h = (p) => {
@@ -7379,7 +7380,7 @@ const dt = ({
7379
7380
  focusMode: s = "system",
7380
7381
  ...l
7381
7382
  }, i) => {
7382
- const [d, f] = V(!1), [u, h] = V(!1), [m, p] = V(null), y = L([]), b = L([]), v = re(Ja), w = ms(), k = Tl(), C = ps(), { floatingStyles: I, refs: _, context: x } = cs({
7383
+ const [d, f] = z(!1), [u, h] = z(!1), [m, p] = z(null), y = L([]), b = L([]), v = re(Ja), w = ms(), k = Tl(), C = ps(), { floatingStyles: I, refs: _, context: x } = cs({
7383
7384
  nodeId: k,
7384
7385
  open: d,
7385
7386
  onOpenChange: (J) => {
@@ -7403,8 +7404,8 @@ const dt = ({
7403
7404
  listRef: b,
7404
7405
  onMatch: d ? p : void 0,
7405
7406
  activeIndex: m
7406
- }), { getReferenceProps: A, getFloatingProps: M, getItemProps: P } = hs([E, T, S, R, $]), D = On(e) === "Button" || On(e) === "ButtonIcon", j = D ? {
7407
- noInternalClick: D,
7407
+ }), { getReferenceProps: A, getFloatingProps: D, getItemProps: F } = hs([E, T, S, R, $]), M = On(e) === "Button" || On(e) === "ButtonIcon", j = M ? {
7408
+ noInternalClick: M,
7408
7409
  focusMode: s,
7409
7410
  mode: n
7410
7411
  } : {}, H = U.cloneElement(
@@ -7422,7 +7423,7 @@ const dt = ({
7422
7423
  )
7423
7424
  }
7424
7425
  );
7425
- return z(() => {
7426
+ return P(() => {
7426
7427
  if (!w)
7427
7428
  return;
7428
7429
  function J() {
@@ -7431,7 +7432,7 @@ const dt = ({
7431
7432
  return w.events.on("click", J), () => {
7432
7433
  w.events.off("click", J);
7433
7434
  };
7434
- }, [w, o]), z(() => {
7435
+ }, [w, o]), P(() => {
7435
7436
  d && w && w.events.emit("menuopen", { nodeId: k });
7436
7437
  }, [w, d, k]), /* @__PURE__ */ N(Al, { id: k, children: [
7437
7438
  H,
@@ -7441,7 +7442,7 @@ const dt = ({
7441
7442
  value: {
7442
7443
  activeIndex: m,
7443
7444
  setActiveIndex: p,
7444
- getItemProps: P,
7445
+ getItemProps: F,
7445
7446
  setHasFocusInside: h,
7446
7447
  isOpen: d
7447
7448
  },
@@ -7458,7 +7459,7 @@ const dt = ({
7458
7459
  ref: _.setFloating,
7459
7460
  className: "rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-4 sm:p-2",
7460
7461
  style: I,
7461
- ...M(),
7462
+ ...D(),
7462
7463
  children: t
7463
7464
  }
7464
7465
  )
@@ -7727,7 +7728,7 @@ const pm = (e) => {
7727
7728
  dispatch: a,
7728
7729
  setChatId: o,
7729
7730
  setInitialMessages: n
7730
- } = re(Re), [s, l] = V(!1), [i, d] = V(!1), [f, u] = vt({
7731
+ } = re(Re), [s, l] = z(!1), [i, d] = z(!1), [f, u] = vt({
7731
7732
  key: bt + Qi,
7732
7733
  initialValue: ""
7733
7734
  }), h = (p) => {
@@ -7814,7 +7815,7 @@ const pm = (e) => {
7814
7815
  searchString: d.searchString,
7815
7816
  sortDirection: d.sortDirection,
7816
7817
  getAccessToken: r
7817
- }), [u, h] = V(!1), [m, p] = V(!1), y = async () => {
7818
+ }), [u, h] = z(!1), [m, p] = z(!1), y = async () => {
7818
7819
  try {
7819
7820
  if (i && l && n) {
7820
7821
  const v = l.filter(({ content: w }) => w).map(({ role: w, content: k, id: C }) => ({
@@ -7850,7 +7851,7 @@ const pm = (e) => {
7850
7851
  }, b = (v) => {
7851
7852
  v && v.preventDefault(), o > 0 ? p(!m) : y();
7852
7853
  };
7853
- return z(() => {
7854
+ return P(() => {
7854
7855
  s && (l == null ? void 0 : l.length) > 0 ? h(!0) : h(!1);
7855
7856
  }, [s, l]), /* @__PURE__ */ N(de, { children: [
7856
7857
  m && /* @__PURE__ */ c(
@@ -8047,30 +8048,7 @@ const pm = (e) => {
8047
8048
  )
8048
8049
  }
8049
8050
  ) }) : null;
8050
- }, _m = [
8051
- ".doc",
8052
- ".docx",
8053
- ".xls",
8054
- ".xlsx",
8055
- ".ppt",
8056
- ".pptx",
8057
- ".pdf",
8058
- ".txt"
8059
- ], wm = [
8060
- ".ppt",
8061
- ".pptx",
8062
- ".key",
8063
- ".odp",
8064
- ".pps",
8065
- ".ppsx"
8066
- ], km = [
8067
- ".xls",
8068
- ".xlsx",
8069
- ".ods",
8070
- ".csv",
8071
- ".tsv",
8072
- ".numbers"
8073
- ], xm = [
8051
+ }, _m = [".pdf", ".txt"], wm = [
8074
8052
  ".js",
8075
8053
  ".cjs",
8076
8054
  ".mjs",
@@ -8086,31 +8064,29 @@ const pm = (e) => {
8086
8064
  ".md"
8087
8065
  ], ca = [
8088
8066
  ..._m,
8089
- ...wm,
8090
- ...km,
8091
- ...xm
8092
- ], Ka = 400 * 1024, Tm = "text/plain", Em = () => g(
8067
+ ...wm
8068
+ ], Ka = 400 * 1024, km = "text/plain", xm = () => g(
8093
8069
  "relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
8094
- ), Ln = () => g("bg-surface-darker"), Cm = () => g("text-copy-lighter caret-copy-light"), Im = () => g(
8070
+ ), Ln = () => g("bg-surface-darker"), Tm = () => g("text-copy-lighter caret-copy-light"), Em = () => g(
8095
8071
  "has-[.av-prompt-editable:focus]:outline",
8096
8072
  "has-[.av-prompt-editable:focus]:outline-2",
8097
8073
  "has-[.av-prompt-editable:focus]:outline-offset-2",
8098
8074
  "has-[.av-prompt-editable:focus]:outline-focus-light"
8099
- ), Sm = () => g(
8075
+ ), Cm = () => g(
8100
8076
  "peer",
8101
8077
  "text-base resize-none overflow-hidden w-full text-inherit outline-none",
8102
8078
  "h-6 pr-2 pl-4"
8103
- ), Nm = ({ className: e }) => {
8079
+ ), Im = ({ className: e }) => {
8104
8080
  const t = g(
8105
8081
  Zi,
8106
- Em(),
8082
+ xm(),
8107
8083
  Ln(),
8108
- Cm(),
8109
- Im(),
8084
+ Tm(),
8085
+ Em(),
8110
8086
  e
8111
8087
  ), r = g(
8112
8088
  el,
8113
- Sm(),
8089
+ Cm(),
8114
8090
  Ln()
8115
8091
  );
8116
8092
  return {
@@ -8122,15 +8098,15 @@ const pm = (e) => {
8122
8098
  return "0 Bytes";
8123
8099
  const t = 1024, r = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
8124
8100
  return parseFloat((e / Math.pow(t, a)).toFixed(2)) + " " + r[a];
8125
- }, Ri = (e) => e.reduce((t, r) => t + r.size, 0), Rm = (e) => e.type ? e : new File(
8101
+ }, Ri = (e) => e.reduce((t, r) => t + r.size, 0), Sm = (e) => e.type ? e : new File(
8126
8102
  [e],
8127
8103
  // Use the original file content
8128
8104
  e.name,
8129
8105
  {
8130
- type: Tm,
8106
+ type: km,
8131
8107
  lastModified: e.lastModified
8132
8108
  }
8133
- ), Am = ({
8109
+ ), Nm = ({
8134
8110
  files: e,
8135
8111
  clearFile: t
8136
8112
  }) => e && e.length > 0 && /* @__PURE__ */ N("div", { className: "px-4 py-2", children: [
@@ -8169,10 +8145,10 @@ const pm = (e) => {
8169
8145
  " ",
8170
8146
  Er(Ka)
8171
8147
  ] })
8172
- ] }), Ai = 24, Om = 500, Oi = 2, $m = 5, Lm = Ai * Oi, Mn = $m * Ai, Mm = "ready", Dm = "streaming", Bm = "error", Pm = "submitted", _r = (e) => {
8173
- e.current && (e.current.style.height = `${Lm}px`);
8174
- }, zm = () => {
8175
- const { user: e, getAccessToken: t } = Oe(), [r, a] = V(!1), [o, n] = V(null), [s, l] = V(!1), {
8148
+ ] }), Ai = 24, Rm = 500, Oi = 2, Am = 5, Om = Ai * Oi, Mn = Am * Ai, $m = "ready", Lm = "streaming", Mm = "error", Dm = "submitted", _r = (e) => {
8149
+ e.current && (e.current.style.height = `${Om}px`);
8150
+ }, Bm = () => {
8151
+ const { user: e, getAccessToken: t } = Oe(), [r, a] = z(!1), [o, n] = z(null), [s, l] = z(!1), {
8176
8152
  dispatch: i,
8177
8153
  state: { reasoning: d, streaming: f, aborted: u, lastResetTimestamp: h, attachments: m }
8178
8154
  } = re(Re), { state: p, dispatch: y } = re(vo), { state: b } = re(lr), { refetch: v } = fo({
@@ -8181,16 +8157,16 @@ const pm = (e) => {
8181
8157
  searchString: b.searchString,
8182
8158
  sortDirection: b.sortDirection,
8183
8159
  getAccessToken: t
8184
- }), w = L(null), k = L(null), C = L(!1), I = L(0), _ = L(null), x = L(null), E = Kt(), T = Nm({
8160
+ }), w = L(null), k = L(null), C = L(!1), I = L(0), _ = L(null), x = L(null), E = Kt(), T = Im({
8185
8161
  className: ""
8186
8162
  }), {
8187
8163
  input: S,
8188
8164
  setInput: R,
8189
8165
  handleInputChange: $,
8190
8166
  handleSubmit: A,
8191
- setMessages: M,
8192
- status: P,
8193
- id: D
8167
+ setMessages: D,
8168
+ status: F,
8169
+ id: M
8194
8170
  } = xt({
8195
8171
  onFinish: (W, { usage: ae }) => {
8196
8172
  v(), i({
@@ -8202,32 +8178,32 @@ const pm = (e) => {
8202
8178
  }
8203
8179
  }), j = Y(
8204
8180
  async (W) => {
8205
- W === Mm && i({
8181
+ W === $m && i({
8206
8182
  type: ht,
8207
8183
  payload: {
8208
8184
  loading: !1,
8209
8185
  streaming: !1
8210
8186
  }
8211
- }), W === Pm && i({
8187
+ }), W === Dm && i({
8212
8188
  type: ht,
8213
8189
  payload: {
8214
8190
  loading: !0,
8215
8191
  streaming: !1
8216
8192
  }
8217
- }), W === Dm && i({
8193
+ }), W === Lm && i({
8218
8194
  type: ht,
8219
8195
  payload: {
8220
8196
  loading: !1,
8221
8197
  streaming: !0
8222
8198
  }
8223
- }), W === Bm && setTimeout(() => {
8199
+ }), W === Mm && setTimeout(() => {
8224
8200
  u || (i({
8225
8201
  type: ht,
8226
8202
  payload: {
8227
8203
  loading: !1,
8228
8204
  streaming: !1
8229
8205
  }
8230
- }), M((ae) => [
8206
+ }), D((ae) => [
8231
8207
  ...ae,
8232
8208
  {
8233
8209
  id: it(),
@@ -8237,11 +8213,11 @@ const pm = (e) => {
8237
8213
  ]));
8238
8214
  }, 1e3);
8239
8215
  },
8240
- [i, M, u]
8216
+ [i, D, u]
8241
8217
  );
8242
- z(() => {
8243
- P && j(P);
8244
- }, [P, j]);
8218
+ P(() => {
8219
+ F && j(F);
8220
+ }, [F, j]);
8245
8221
  const H = Y(() => {
8246
8222
  if (!x.current)
8247
8223
  return;
@@ -8307,7 +8283,7 @@ const pm = (e) => {
8307
8283
  let se;
8308
8284
  if (o && o.length > 0) {
8309
8285
  const be = Array.from(o).map(
8310
- (ve) => Rm(ve)
8286
+ (ve) => Sm(ve)
8311
8287
  ), Ce = new DataTransfer();
8312
8288
  be.forEach((ve) => Ce.items.add(ve)), se = Ce.files;
8313
8289
  }
@@ -8315,7 +8291,7 @@ const pm = (e) => {
8315
8291
  headers: {
8316
8292
  "Content-Type": "application/json",
8317
8293
  authorization: `Bearer ${ae}`,
8318
- [Uf]: D
8294
+ [Uf]: M
8319
8295
  },
8320
8296
  body: {
8321
8297
  reasoning: d
@@ -8332,7 +8308,7 @@ const pm = (e) => {
8332
8308
  x && x.current && !ya() && x.current.focus();
8333
8309
  }
8334
8310
  ]
8335
- ]), z(() => {
8311
+ ]), P(() => {
8336
8312
  if (p.prompt !== "") {
8337
8313
  const W = p.prompt.endsWith(":") && !p.prompt.endsWith(": ") ? p.prompt + " " : p.prompt;
8338
8314
  W.indexOf(Bo) !== -1 ? navigator.clipboard.readText().then((se) => {
@@ -8341,26 +8317,26 @@ const pm = (e) => {
8341
8317
  type: Jn
8342
8318
  });
8343
8319
  }
8344
- }, [p, y, R]), z(() => {
8320
+ }, [p, y, R]), P(() => {
8345
8321
  if (C.current === !1) {
8346
8322
  C.current = !0, !S && _r(x);
8347
8323
  return;
8348
8324
  }
8349
8325
  h > 0 && h !== I.current ? (I.current = h, setTimeout(() => {
8350
8326
  x.current && (!S && _r(x), x.current.focus());
8351
- }, Om)) : f === !1 && !S && (_r(x), x.current && x.current.focus());
8352
- }, [h, f, S]), z(() => {
8327
+ }, Rm)) : f === !1 && !S && (_r(x), x.current && x.current.focus());
8328
+ }, [h, f, S]), P(() => {
8353
8329
  p.lastTriggeredTimestamp && setTimeout(() => {
8354
8330
  H();
8355
8331
  }, 100);
8356
- }, [p.lastTriggeredTimestamp, H]), z(() => {
8332
+ }, [p.lastTriggeredTimestamp, H]), P(() => {
8357
8333
  (async () => {
8358
8334
  if (st())
8359
8335
  return;
8360
8336
  const W = await t(), ae = await Xn(W, [Zn.REASONING]);
8361
8337
  a(ae);
8362
8338
  })();
8363
- }, [t]), z(() => {
8339
+ }, [t]), P(() => {
8364
8340
  m === 0 && (k.current && (k.current.value = ""), n(null));
8365
8341
  }, [m]), /* @__PURE__ */ N(de, { children: [
8366
8342
  /* @__PURE__ */ c(
@@ -8410,7 +8386,7 @@ const pm = (e) => {
8410
8386
  }
8411
8387
  )
8412
8388
  ] }),
8413
- /* @__PURE__ */ c(Am, { files: o, clearFile: Le }),
8389
+ /* @__PURE__ */ c(Nm, { files: o, clearFile: Le }),
8414
8390
  /* @__PURE__ */ N("div", { className: "p-2 flex items-center", children: [
8415
8391
  /* @__PURE__ */ c(bm, { className: "order-6 ml-auto" }),
8416
8392
  /* @__PURE__ */ c(Mh, { className: "order-1 mr-4 sm:mr-2" }),
@@ -8430,21 +8406,21 @@ const pm = (e) => {
8430
8406
  ] })
8431
8407
  ] }) })
8432
8408
  ] });
8433
- }, wr = "--sassy-bottom", Dn = 16, Bn = 76, Vm = ({ isComponent: e }) => {
8409
+ }, wr = "--sassy-bottom", Dn = 16, Bn = 76, Pm = ({ isComponent: e }) => {
8434
8410
  const {
8435
8411
  state: { loading: t, streaming: r, restoring: a }
8436
8412
  } = re(Re), {
8437
8413
  state: { footerHeight: o, footerPosition: n },
8438
8414
  dispatch: s
8439
8415
  } = re(_o), { messages: l } = xt(), { height: i } = Ic(), { height: d } = Sc(), [f, u] = xs();
8440
- return z(() => {
8416
+ return P(() => {
8441
8417
  o !== u.height && s({
8442
8418
  type: Ds,
8443
8419
  payload: {
8444
8420
  footerHeight: u.height
8445
8421
  }
8446
8422
  });
8447
- }, [u.height, o, s]), z(() => {
8423
+ }, [u.height, o, s]), P(() => {
8448
8424
  var p, y, b, v;
8449
8425
  if (!f || !f.current)
8450
8426
  return;
@@ -8506,17 +8482,17 @@ const pm = (e) => {
8506
8482
  Of
8507
8483
  ),
8508
8484
  children: [
8509
- /* @__PURE__ */ c(zm, {}),
8485
+ /* @__PURE__ */ c(Bm, {}),
8510
8486
  /* @__PURE__ */ c("div", { className: "w-full text-center text-xs text-copy-lighter pt-2", children: rl })
8511
8487
  ]
8512
8488
  }
8513
8489
  );
8514
- }, Fm = ro(
8490
+ }, zm = ro(
8515
8491
  () => import(
8516
8492
  /* webpackChunkName: "LazyAboutChangelog" */
8517
- "./AboutChangelog.DiL_Lfz8.js"
8493
+ "./AboutChangelog.BbBaKqm1.js"
8518
8494
  )
8519
- ), Um = () => {
8495
+ ), Vm = () => {
8520
8496
  const e = Kt(), t = Kt(), { data: r, isSuccess: a } = Yd(), { data: o, isSuccess: n } = Jd(), s = (r == null ? void 0 : r.version) || "", l = (r == null ? void 0 : r.models) || [];
8521
8497
  return /* @__PURE__ */ N(de, { children: [
8522
8498
  /* @__PURE__ */ c(
@@ -8525,8 +8501,8 @@ const pm = (e) => {
8525
8501
  header: ce.ABOUT.TITLE_CLIENT,
8526
8502
  className: "prose-dark dark:prose-lighter mb-4",
8527
8503
  children: Sr(e, {
8528
- [ce.ABOUT.VERSION]: "8.15.0",
8529
- [ce.ABOUT.BUILD_TIMESTAMP]: "04/23/2025 10:04 AM EDT"
8504
+ [ce.ABOUT.VERSION]: "8.15.2",
8505
+ [ce.ABOUT.BUILD_TIMESTAMP]: "04/24/2025 05:36 PM EDT"
8530
8506
  })
8531
8507
  }
8532
8508
  ),
@@ -8548,18 +8524,18 @@ const pm = (e) => {
8548
8524
  header: ce.ABOUT.TITLE_CHANGELOG,
8549
8525
  headerClassName: "av-card__header mt-0 border-b-2 border-border-accent mb-4 leading-10",
8550
8526
  className: "prose-lighter dark:prose-lighter min-h-[334px]",
8551
- children: n ? /* @__PURE__ */ c(to, { fallback: /* @__PURE__ */ c("div", { children: "Loading..." }), children: /* @__PURE__ */ c(Fm, { content: o.client }) }) : null
8527
+ children: n ? /* @__PURE__ */ c(to, { fallback: /* @__PURE__ */ c("div", { children: "Loading..." }), children: /* @__PURE__ */ c(zm, { content: o.client }) }) : null
8552
8528
  }
8553
8529
  )
8554
8530
  ] });
8555
- }, Hm = ({
8531
+ }, Fm = ({
8556
8532
  open: e,
8557
8533
  onOpenChange: t
8558
- }) => /* @__PURE__ */ c(Ht, { open: e, onOpenChange: t, title: al, children: /* @__PURE__ */ c(Um, {}) }), Gm = {
8534
+ }) => /* @__PURE__ */ c(Ht, { open: e, onOpenChange: t, title: al, children: /* @__PURE__ */ c(Vm, {}) }), Um = {
8559
8535
  [yo]: ys,
8560
8536
  [Vr]: vs,
8561
8537
  [bo]: bs
8562
- }, jm = ({
8538
+ }, Hm = ({
8563
8539
  filteredHistory: e,
8564
8540
  dispatch: t,
8565
8541
  onOpenChange: r,
@@ -8570,7 +8546,7 @@ const pm = (e) => {
8570
8546
  id: "",
8571
8547
  timestamp: "",
8572
8548
  message: ""
8573
- }), [i, d] = V(!1), [f, u] = V(
8549
+ }), [i, d] = z(!1), [f, u] = z(
8574
8550
  zo + Vo
8575
8551
  ), { state: h, dispatch: m } = re(lr), {
8576
8552
  state: { provider: p },
@@ -8623,26 +8599,27 @@ const pm = (e) => {
8623
8599
  );
8624
8600
  } catch {
8625
8601
  }
8626
- }, _ = async (T, S, R, $, A, M) => {
8602
+ }, _ = async (T, S, R, $, A, D) => {
8603
+ var F;
8627
8604
  try {
8628
- const P = await Mt({
8605
+ const M = await Mt({
8629
8606
  accessToken: $,
8630
8607
  type: De.GET_CHAT,
8631
8608
  params: {
8632
8609
  id: T.id
8633
8610
  }
8634
8611
  });
8635
- P.status === 200 && (P.data.provider !== M && (await Ps({
8636
- provider: P.data.provider,
8612
+ M.status === 200 && (M.data.provider !== D && (await Ps({
8613
+ provider: M.data.provider,
8637
8614
  accessToken: $,
8638
8615
  username: A
8639
8616
  }), S({
8640
8617
  type: co,
8641
8618
  payload: {
8642
- provider: P.data.provider
8619
+ provider: M.data.provider
8643
8620
  }
8644
8621
  }), k(), Z.success(
8645
- `${Qn} ${P.data.provider}`,
8622
+ `${Qn} ${M.data.provider}`,
8646
8623
  Ir({
8647
8624
  containerId: "toggle-provider",
8648
8625
  transition: Nr
@@ -8650,15 +8627,16 @@ const pm = (e) => {
8650
8627
  )), S({
8651
8628
  type: ht,
8652
8629
  payload: {
8653
- restoring: !0
8630
+ restoring: !0,
8631
+ restoredModel: ((F = M.data) == null ? void 0 : F.model) || ""
8654
8632
  }
8655
- }), v(""), y(T.id), b(P.data.messages), R(!1));
8633
+ }), v(""), y(T.id), b(M.data.messages), R(!1));
8656
8634
  } catch {
8657
8635
  }
8658
8636
  }, x = Y((T) => {
8659
8637
  T[0].isIntersecting && u((R) => R + zo);
8660
8638
  }, []);
8661
- return z(() => {
8639
+ return P(() => {
8662
8640
  const T = {
8663
8641
  // root: null,
8664
8642
  rootMargin: "20px"
@@ -8716,9 +8694,9 @@ const pm = (e) => {
8716
8694
  /* @__PURE__ */ c(Ve, { className: "text-xs sm:text-sm text-right", children: "Actions" })
8717
8695
  ] }) }),
8718
8696
  /* @__PURE__ */ c(sd, { children: e.slice(0, f).map((T, S) => {
8719
- var M, P;
8720
- const R = T.summary || (T.messages.length > 0 ? (M = T.messages[0]) == null ? void 0 : M.content : ""), $ = T.model ? Hf(T.model) : null, A = $ ? Gm[$] : null;
8721
- return ((P = T == null ? void 0 : T.messages) == null ? void 0 : P.length) > 0 ? /* @__PURE__ */ N(wl, { children: [
8697
+ var D, F;
8698
+ const R = T.summary || (T.messages.length > 0 ? (D = T.messages[0]) == null ? void 0 : D.content : ""), $ = T.model ? Hf(T.model) : null, A = $ ? Um[$] : null;
8699
+ return ((F = T == null ? void 0 : T.messages) == null ? void 0 : F.length) > 0 ? /* @__PURE__ */ N(wl, { children: [
8722
8700
  S === f - Vo && /* @__PURE__ */ c("tr", { ref: s }),
8723
8701
  /* @__PURE__ */ N(Jr, { children: [
8724
8702
  /* @__PURE__ */ c(Ve, { children: S + 1 }),
@@ -8760,12 +8738,12 @@ const pm = (e) => {
8760
8738
  noBorder: !0,
8761
8739
  label: "Restore chat",
8762
8740
  onClick: async () => {
8763
- const D = await n();
8741
+ const M = await n();
8764
8742
  _(
8765
8743
  T,
8766
8744
  t,
8767
8745
  r,
8768
- D,
8746
+ M,
8769
8747
  (o == null ? void 0 : o.username) || "",
8770
8748
  p
8771
8749
  );
@@ -8780,11 +8758,11 @@ const pm = (e) => {
8780
8758
  noBorder: !0,
8781
8759
  label: "Delete chat",
8782
8760
  onClick: () => {
8783
- var D;
8761
+ var M;
8784
8762
  l.current = {
8785
8763
  id: T.id,
8786
8764
  timestamp: T.timestamp,
8787
- message: T.messages.length > 0 ? (D = T.messages[0]) == null ? void 0 : D.content : ""
8765
+ message: T.messages.length > 0 ? (M = T.messages[0]) == null ? void 0 : M.content : ""
8788
8766
  }, d(!i);
8789
8767
  },
8790
8768
  children: /* @__PURE__ */ c("div", { className: "text-red-400", children: /* @__PURE__ */ c(Zl, { size: "size-3", monotone: !0 }) })
@@ -8800,11 +8778,11 @@ const pm = (e) => {
8800
8778
  ) }) }) }) })
8801
8779
  ] })
8802
8780
  ] });
8803
- }, Wm = ({
8781
+ }, Gm = ({
8804
8782
  open: e,
8805
8783
  onOpenChange: t
8806
8784
  }) => {
8807
- const { getAccessToken: r, user: a } = Oe(), { dispatch: o } = re(Re), [n, s] = V([]), l = L(null), { state: i, dispatch: d } = re(lr), [f, u] = V(
8785
+ const { getAccessToken: r, user: a } = Oe(), { dispatch: o } = re(Re), [n, s] = z([]), l = L(null), { state: i, dispatch: d } = re(lr), [f, u] = z(
8808
8786
  i.sortDirection
8809
8787
  ), { data: h, refetch: m } = fo({
8810
8788
  enabled: e,
@@ -8816,9 +8794,9 @@ const pm = (e) => {
8816
8794
  key: bt + rs,
8817
8795
  initialValue: i.searchString
8818
8796
  });
8819
- z(() => {
8797
+ P(() => {
8820
8798
  i.sortDirection !== f && u(i.sortDirection);
8821
- }, [i, f]), z(() => {
8799
+ }, [i, f]), P(() => {
8822
8800
  h && s(h);
8823
8801
  }, [h]);
8824
8802
  const y = async (w) => {
@@ -8874,7 +8852,7 @@ const pm = (e) => {
8874
8852
  }
8875
8853
  ) }),
8876
8854
  /* @__PURE__ */ c("div", { className: "flex flex-col sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ c(
8877
- jm,
8855
+ Hm,
8878
8856
  {
8879
8857
  mutate: m,
8880
8858
  filteredHistory: n,
@@ -8885,7 +8863,7 @@ const pm = (e) => {
8885
8863
  ] })
8886
8864
  }
8887
8865
  );
8888
- }, qm = () => {
8866
+ }, jm = () => {
8889
8867
  const { isAuthenticated: e, user: t, registeringForPasskey: r, authenticationType: a } = Oe(), o = Kt(), n = (t == null ? void 0 : t.username) || "";
8890
8868
  return e && n ? /* @__PURE__ */ N(de, { children: [
8891
8869
  /* @__PURE__ */ c(
@@ -8923,7 +8901,7 @@ const pm = (e) => {
8923
8901
  }
8924
8902
  )
8925
8903
  ] }) : null;
8926
- }, Ym = ({
8904
+ }, Wm = ({
8927
8905
  open: e,
8928
8906
  onOpenChange: t
8929
8907
  }) => /* @__PURE__ */ c(
@@ -8933,16 +8911,16 @@ const pm = (e) => {
8933
8911
  open: e,
8934
8912
  onOpenChange: t,
8935
8913
  title: cl,
8936
- children: /* @__PURE__ */ c(qm, {})
8914
+ children: /* @__PURE__ */ c(jm, {})
8937
8915
  }
8938
- ), $i = "av-text-area", Jm = "av-text-area-wrapper", da = "av-text-area-helper-text", Km = "av-text-area__control--right", Qm = "av-text-area__control--left";
8939
- function Xm() {
8916
+ ), $i = "av-text-area", qm = "av-text-area-wrapper", da = "av-text-area-helper-text", Ym = "av-text-area__control--right", Jm = "av-text-area__control--left";
8917
+ function Km() {
8940
8918
  const e = L(!1);
8941
- return z(() => (e.current = !0, () => {
8919
+ return P(() => (e.current = !0, () => {
8942
8920
  e.current = !1;
8943
8921
  }), []), Y(() => e.current, []);
8944
8922
  }
8945
- function Zm(e) {
8923
+ function Qm(e) {
8946
8924
  return $e(() => e.every((t) => t == null) ? () => {
8947
8925
  } : (t) => {
8948
8926
  e.forEach((r) => {
@@ -8950,7 +8928,7 @@ function Zm(e) {
8950
8928
  });
8951
8929
  }, e);
8952
8930
  }
8953
- const ep = {
8931
+ const Xm = {
8954
8932
  x: 0,
8955
8933
  y: 0,
8956
8934
  width: 0,
@@ -8961,17 +8939,17 @@ const ep = {
8961
8939
  right: 0
8962
8940
  };
8963
8941
  function Pn(e) {
8964
- const t = Xm(), r = L(0), a = L(null), [o, n] = V(ep), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
8942
+ const t = Km(), r = L(0), a = L(null), [o, n] = z(Xm), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
8965
8943
  const i = l[0];
8966
8944
  i && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
8967
8945
  a.current && t() && n(i.contentRect);
8968
8946
  }));
8969
8947
  }), [t]);
8970
- return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
8948
+ return P(() => (a.current && (s == null || s.observe(a.current, e)), () => {
8971
8949
  s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
8972
8950
  }), [s, e]), [a, o];
8973
8951
  }
8974
- function tp({
8952
+ function Zm({
8975
8953
  value: e,
8976
8954
  defaultValue: t,
8977
8955
  finalValue: r,
@@ -8979,18 +8957,18 @@ function tp({
8979
8957
  },
8980
8958
  initialControlledDelay: o = 0
8981
8959
  }) {
8982
- const [n, s] = V(!1), [l, i] = V(
8960
+ const [n, s] = z(!1), [l, i] = z(
8983
8961
  t !== void 0 ? t : r
8984
8962
  ), d = (f) => {
8985
8963
  i(f), a == null || a(f);
8986
8964
  };
8987
- return z(() => {
8965
+ return P(() => {
8988
8966
  (async () => e !== void 0 && !n && o > 0 && (await new Promise(
8989
8967
  (f) => setTimeout(f, o)
8990
8968
  ), s(!0)))();
8991
8969
  }, [e, o, n]), e !== void 0 ? !n && o > 0 ? ["", a, !0] : [e, a, !0] : [l, d, !1];
8992
8970
  }
8993
- function rp(e) {
8971
+ function ep(e) {
8994
8972
  const t = Lr();
8995
8973
  if (!e)
8996
8974
  return t;
@@ -9001,7 +8979,7 @@ function rp(e) {
9001
8979
  return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
9002
8980
  }
9003
8981
  }
9004
- const Li = "SET_ANNOUNCEMENT", Mi = "CLEAR_ANNOUNCEMENT", ap = {
8982
+ const Li = "SET_ANNOUNCEMENT", Mi = "CLEAR_ANNOUNCEMENT", tp = {
9005
8983
  alert: null,
9006
8984
  alertdialog: null,
9007
8985
  log: "polite",
@@ -9009,7 +8987,7 @@ const Li = "SET_ANNOUNCEMENT", Mi = "CLEAR_ANNOUNCEMENT", ap = {
9009
8987
  progressbar: null,
9010
8988
  status: "polite",
9011
8989
  timer: "assertive"
9012
- }, op = (e, t) => {
8990
+ }, rp = (e, t) => {
9013
8991
  switch (t == null ? void 0 : t.type) {
9014
8992
  case Li:
9015
8993
  return {
@@ -9024,7 +9002,7 @@ const Li = "SET_ANNOUNCEMENT", Mi = "CLEAR_ANNOUNCEMENT", ap = {
9024
9002
  default:
9025
9003
  return e;
9026
9004
  }
9027
- }, np = ({
9005
+ }, ap = ({
9028
9006
  onAnnouncementClear: e,
9029
9007
  dispatch: t
9030
9008
  }) => {
@@ -9042,13 +9020,13 @@ const Li = "SET_ANNOUNCEMENT", Mi = "CLEAR_ANNOUNCEMENT", ap = {
9042
9020
  type: Li,
9043
9021
  payload: e
9044
9022
  }), t && (r.current = setTimeout(
9045
- () => np({
9023
+ () => ap({
9046
9024
  onAnnouncementClear: a,
9047
9025
  dispatch: o
9048
9026
  }),
9049
9027
  t
9050
9028
  ));
9051
- }, sp = ({
9029
+ }, op = ({
9052
9030
  children: e,
9053
9031
  announcementTimeoutRef: t,
9054
9032
  announcementDelay: r,
@@ -9071,7 +9049,7 @@ const Li = "SET_ANNOUNCEMENT", Mi = "CLEAR_ANNOUNCEMENT", ap = {
9071
9049
  dispatch: s
9072
9050
  });
9073
9051
  };
9074
- function ip({
9052
+ function np({
9075
9053
  children: e,
9076
9054
  className: t,
9077
9055
  politeness: r,
@@ -9082,12 +9060,12 @@ function ip({
9082
9060
  visible: l,
9083
9061
  ...i
9084
9062
  }) {
9085
- const d = L(null), f = L(null), [u, h] = jt(op, {
9063
+ const d = L(null), f = L(null), [u, h] = jt(rp, {
9086
9064
  announcement: null
9087
9065
  });
9088
9066
  let m = r;
9089
- typeof m > "u" && (m = a ? ap[a] : "assertive"), z(() => {
9090
- sp({
9067
+ typeof m > "u" && (m = a ? tp[a] : "assertive"), P(() => {
9068
+ op({
9091
9069
  announcementTimeoutRef: d,
9092
9070
  announcementDelay: o,
9093
9071
  children: e,
@@ -9129,19 +9107,19 @@ try {
9129
9107
  });
9130
9108
  } catch {
9131
9109
  }
9132
- const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", cp = ({ mode: e }) => g({
9110
+ const sp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", ip = ({ mode: e }) => g({
9133
9111
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
9134
9112
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
9135
9113
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
9136
9114
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
9137
- }), dp = ({
9115
+ }), lp = ({
9138
9116
  focusMode: e
9139
9117
  }) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
9140
9118
  "focus:outline-focus-dark": e === "dark",
9141
9119
  "focus:outline-focus-light": e === "light",
9142
9120
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
9143
9121
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
9144
- }), up = ({
9122
+ }), cp = ({
9145
9123
  noBorder: e,
9146
9124
  error: t
9147
9125
  }) => g("border-2", {
@@ -9149,7 +9127,7 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9149
9127
  "focus:border-border-dark": !e && t,
9150
9128
  "border-border-error-dark": !e && t,
9151
9129
  "border-transparent": e
9152
- }), fp = ({
9130
+ }), dp = ({
9153
9131
  disabled: e,
9154
9132
  raw: t,
9155
9133
  error: r,
@@ -9188,7 +9166,7 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9188
9166
  "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
9189
9167
  }
9190
9168
  );
9191
- }, hp = ({
9169
+ }, up = ({
9192
9170
  error: e,
9193
9171
  raw: t,
9194
9172
  mode: r,
@@ -9215,7 +9193,7 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9215
9193
  "text-copy-error-dark dark:text-copy-error-light": r === "system",
9216
9194
  "dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
9217
9195
  });
9218
- }, mp = ({
9196
+ }, fp = ({
9219
9197
  className: e,
9220
9198
  textAreaClassName: t,
9221
9199
  raw: r,
@@ -9229,34 +9207,34 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9229
9207
  }) => {
9230
9208
  const f = r ? e : g(
9231
9209
  "relative flex w-full flex-col justify-center",
9232
- Jm,
9210
+ qm,
9233
9211
  e
9234
9212
  ), u = r ? g(t) : g(
9235
9213
  $i,
9236
9214
  t,
9237
- lp(),
9238
- cp({ mode: l }),
9239
- dp({ focusMode: a }),
9240
- up({
9215
+ sp(),
9216
+ ip({ mode: l }),
9217
+ lp({ focusMode: a }),
9218
+ cp({
9241
9219
  noBorder: n,
9242
9220
  error: s
9243
9221
  }),
9244
9222
  {
9245
9223
  "disabled:cursor-not-allowed disabled:opacity-50": o
9246
9224
  }
9247
- ), h = r ? void 0 : "sr-only", m = fp({
9225
+ ), h = r ? void 0 : "sr-only", m = dp({
9248
9226
  disabled: o,
9249
9227
  raw: r,
9250
9228
  error: s,
9251
9229
  mode: l,
9252
9230
  rightElement: d,
9253
9231
  leftElement: i
9254
- }), p = hp({
9232
+ }), p = up({
9255
9233
  error: s,
9256
9234
  raw: r,
9257
9235
  mode: l,
9258
9236
  disabled: o
9259
- }), y = r ? void 0 : g(Km, "absolute"), b = r ? void 0 : g(Qm, "absolute");
9237
+ }), y = r ? void 0 : g(Ym, "absolute"), b = r ? void 0 : g(Jm, "absolute");
9260
9238
  return {
9261
9239
  wrapper: f,
9262
9240
  textArea: u,
@@ -9266,7 +9244,7 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9266
9244
  rightElement: y,
9267
9245
  leftElement: b
9268
9246
  };
9269
- }, pp = ({
9247
+ }, hp = ({
9270
9248
  scrollHeight: e,
9271
9249
  currentHeight: t,
9272
9250
  currentLabelOffset: r = 0,
@@ -9308,9 +9286,9 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9308
9286
  ...I
9309
9287
  }, _) => {
9310
9288
  var x;
9311
- const E = L(null), T = Zm([_, E]), [S, R] = Pn(), [$, A] = Pn(), M = L(80), P = L(-25), D = L(null), j = L(30), H = L(null), J = rp({ id: e, prefix: `${$i}-` }), [he, Le] = V(0), [Ee, Be] = V(0), [Ke, W] = V(
9289
+ const E = L(null), T = Qm([_, E]), [S, R] = Pn(), [$, A] = Pn(), D = L(80), F = L(-25), M = L(null), j = L(30), H = L(null), J = ep({ id: e, prefix: `${$i}-` }), [he, Le] = z(0), [Ee, Be] = z(0), [Ke, W] = z(
9312
9290
  !!(!y && p)
9313
- ), ae = `${t} error, ${p}`, se = mp({
9291
+ ), ae = `${t} error, ${p}`, se = fp({
9314
9292
  className: n,
9315
9293
  textAreaClassName: s,
9316
9294
  error: a,
@@ -9321,7 +9299,7 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9321
9299
  mode: l,
9322
9300
  rightElement: !!b,
9323
9301
  leftElement: !!v
9324
- }), [be, Ce] = tp({
9302
+ }), [be, Ce] = Zm({
9325
9303
  value: d,
9326
9304
  initialControlledDelay: 20,
9327
9305
  defaultValue: f,
@@ -9348,29 +9326,29 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9348
9326
  }, [be, o]), we(() => {
9349
9327
  o || setTimeout(() => {
9350
9328
  var B;
9351
- (B = D == null ? void 0 : D.current) == null || B.style.setProperty(
9329
+ (B = M == null ? void 0 : M.current) == null || B.style.setProperty(
9352
9330
  "--av-text-area-wrapper-transition",
9353
9331
  be ? "none" : "all 0.2s ease-out"
9354
9332
  );
9355
9333
  }, 0);
9356
9334
  }, [be, o]), we(() => {
9357
- var B, F;
9335
+ var B, V;
9358
9336
  if (!o && E && E.current && be !== void 0) {
9359
- const { labelOffset: K, helperTextOffset: X, scrollHeight: ue } = pp({
9337
+ const { labelOffset: K, helperTextOffset: X, scrollHeight: ue } = hp({
9360
9338
  scrollHeight: E.current.scrollHeight,
9361
- currentHeight: M.current,
9362
- currentLabelOffset: P.current,
9339
+ currentHeight: D.current,
9340
+ currentLabelOffset: F.current,
9363
9341
  currentHelperTextOffset: j.current
9364
9342
  });
9365
- K && (P.current = K, (B = D == null ? void 0 : D.current) == null || B.style.setProperty(
9343
+ K && (F.current = K, (B = M == null ? void 0 : M.current) == null || B.style.setProperty(
9366
9344
  "--av-text-area-label",
9367
9345
  `${K}px`
9368
- )), X && (j.current = X, (F = H == null ? void 0 : H.current) == null || F.style.setProperty(
9346
+ )), X && (j.current = X, (V = H == null ? void 0 : H.current) == null || V.style.setProperty(
9369
9347
  "--av-text-area-helper-text",
9370
9348
  `${X}px`
9371
- )), M.current = ue || M.current;
9349
+ )), D.current = ue || D.current;
9372
9350
  }
9373
- }, [be, o]), A.width > 0 && ((x = D == null ? void 0 : D.current) == null || x.style.setProperty(
9351
+ }, [be, o]), A.width > 0 && ((x = M == null ? void 0 : M.current) == null || x.style.setProperty(
9374
9352
  "--tw-translate-x",
9375
9353
  `${12 + A.width + 5}px`
9376
9354
  )), /* @__PURE__ */ N("div", { className: se.wrapper, children: [
@@ -9421,7 +9399,7 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9421
9399
  !o && /* @__PURE__ */ c(
9422
9400
  "label",
9423
9401
  {
9424
- ref: D,
9402
+ ref: M,
9425
9403
  "aria-hidden": !0,
9426
9404
  htmlFor: J,
9427
9405
  className: `${se.visibleLabel}`,
@@ -9445,7 +9423,7 @@ const lp = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
9445
9423
  children: b
9446
9424
  }
9447
9425
  ),
9448
- a && p && /* @__PURE__ */ c(ip, { politeness: "polite", clearAnnouncementDelay: 500, children: ae })
9426
+ a && p && /* @__PURE__ */ c(np, { politeness: "polite", clearAnnouncementDelay: 500, children: ae })
9449
9427
  ] });
9450
9428
  }
9451
9429
  );
@@ -9463,7 +9441,7 @@ try {
9463
9441
  });
9464
9442
  } catch {
9465
9443
  }
9466
- const gp = "av-toggle", yp = () => g("peer", "h-6", "w-11", "rounded-full"), bp = ({
9444
+ const mp = "av-toggle", pp = () => g("peer", "h-6", "w-11", "rounded-full"), gp = ({
9467
9445
  focusMode: e
9468
9446
  }) => g(
9469
9447
  "peer-focus:outline",
@@ -9475,14 +9453,14 @@ const gp = "av-toggle", yp = () => g("peer", "h-6", "w-11", "rounded-full"), bp
9475
9453
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
9476
9454
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
9477
9455
  }
9478
- ), vp = () => g(
9456
+ ), yp = () => g(
9479
9457
  "peer-checked:after:translate-x-full",
9480
9458
  // background color when checked
9481
9459
  "peer-checked:bg-violet-500",
9482
9460
  // knob circle and border color when checked
9483
9461
  "peer-checked:after:bg-white",
9484
9462
  "peer-checked:after:border-white"
9485
- ), _p = () => g(
9463
+ ), bp = () => g(
9486
9464
  "after:left-[2px]",
9487
9465
  "after:top-[2px]",
9488
9466
  "after:border",
@@ -9494,7 +9472,7 @@ const gp = "av-toggle", yp = () => g("peer", "h-6", "w-11", "rounded-full"), bp
9494
9472
  "after:rounded-full",
9495
9473
  "after:transition-all",
9496
9474
  "after:content-['']"
9497
- ), wp = ({
9475
+ ), vp = ({
9498
9476
  mode: e,
9499
9477
  noBorder: t
9500
9478
  }) => g({
@@ -9503,7 +9481,7 @@ const gp = "av-toggle", yp = () => g("peer", "h-6", "w-11", "rounded-full"), bp
9503
9481
  "border-border-light bg-surface-darker": e === "dark",
9504
9482
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
9505
9483
  "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
9506
- }), kp = ({
9484
+ }), _p = ({
9507
9485
  mode: e,
9508
9486
  labelHidden: t
9509
9487
  }) => t ? "sr-only" : g("ml-2 text-sm", {
@@ -9511,11 +9489,11 @@ const gp = "av-toggle", yp = () => g("peer", "h-6", "w-11", "rounded-full"), bp
9511
9489
  "text-copy-lighter": e === "dark",
9512
9490
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
9513
9491
  "text-copy-dark dark:text-copy-lighter": e === "system"
9514
- }), xp = ({ className: e }) => g(
9515
- gp,
9492
+ }), wp = ({ className: e }) => g(
9493
+ mp,
9516
9494
  "relative flex cursor-pointer items-center",
9517
9495
  e
9518
- ), Tp = ({
9496
+ ), kp = ({
9519
9497
  mode: e,
9520
9498
  focusMode: t,
9521
9499
  labelHidden: r,
@@ -9523,15 +9501,15 @@ const gp = "av-toggle", yp = () => g("peer", "h-6", "w-11", "rounded-full"), bp
9523
9501
  noBorder: o
9524
9502
  }) => ({
9525
9503
  toggle: g(
9526
- yp(),
9527
- wp({ mode: e, noBorder: o }),
9528
- bp({ focusMode: t }),
9529
- _p(),
9530
- vp()
9504
+ pp(),
9505
+ vp({ mode: e, noBorder: o }),
9506
+ gp({ focusMode: t }),
9507
+ bp(),
9508
+ yp()
9531
9509
  ),
9532
- label: kp({ mode: e, labelHidden: r }),
9510
+ label: _p({ mode: e, labelHidden: r }),
9533
9511
  input: "peer sr-only",
9534
- wrapper: xp({ className: a })
9512
+ wrapper: wp({ className: a })
9535
9513
  }), kr = ({
9536
9514
  checked: e = !1,
9537
9515
  onChange: t,
@@ -9543,7 +9521,7 @@ const gp = "av-toggle", yp = () => g("peer", "h-6", "w-11", "rounded-full"), bp
9543
9521
  className: l,
9544
9522
  noBorder: i = !1
9545
9523
  }) => {
9546
- const d = Tp({
9524
+ const d = kp({
9547
9525
  mode: n,
9548
9526
  focusMode: s,
9549
9527
  labelHidden: a,
@@ -9580,7 +9558,7 @@ try {
9580
9558
  });
9581
9559
  } catch {
9582
9560
  }
9583
- const Ep = ({
9561
+ const xp = ({
9584
9562
  open: e,
9585
9563
  onOpenChange: t
9586
9564
  }) => {
@@ -9591,11 +9569,11 @@ const Ep = ({
9591
9569
  } = sr({
9592
9570
  user: a == null ? void 0 : a.username,
9593
9571
  getAccessToken: r
9594
- }), [l, i] = V({
9572
+ }), [l, i] = z({
9595
9573
  loadingLocation: !1
9596
- }), [d, f] = V({
9574
+ }), [d, f] = z({
9597
9575
  prompts: []
9598
- }), [u, h] = V(""), [m, p] = V(""), [y, b] = vt({
9576
+ }), [u, h] = z(""), [m, p] = z(""), [y, b] = vt({
9599
9577
  key: bt + dl,
9600
9578
  initialValue: !1
9601
9579
  }), v = (_) => {
@@ -9632,10 +9610,10 @@ const Ep = ({
9632
9610
  }
9633
9611
  }), S = Date.now() - _;
9634
9612
  if (S < 2e3 && await new Promise((R) => setTimeout(R, 2e3 - S)), E.status === 200) {
9635
- const { city: R, state: $, country: A, displayName: M } = E.data, P = R && $ && A ? `${R}, ${$}, ${A}` : M;
9613
+ const { city: R, state: $, country: A, displayName: D } = E.data, F = R && $ && A ? `${R}, ${$}, ${A}` : D;
9636
9614
  i({
9637
9615
  loadingLocation: !1
9638
- }), p(P);
9616
+ }), p(F);
9639
9617
  } else
9640
9618
  i({
9641
9619
  loadingLocation: !1
@@ -9658,7 +9636,7 @@ const Ep = ({
9658
9636
  clipboardAccess: E
9659
9637
  };
9660
9638
  E ? $.content = $.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : $.content = $.content.replace(/{{clipboard}}/g, "");
9661
- const A = R.findIndex((M) => M.slot === T.slot);
9639
+ const A = R.findIndex((D) => D.slot === T.slot);
9662
9640
  return A === -1 ? {
9663
9641
  ...S,
9664
9642
  prompts: [...R, { ...$ }]
@@ -9668,7 +9646,7 @@ const Ep = ({
9668
9646
  });
9669
9647
  });
9670
9648
  };
9671
- return z(() => {
9649
+ return P(() => {
9672
9650
  o != null && o.instructions && h(o.instructions), o != null && o.location && p(o.location), o != null && o.tags && f({ prompts: o.tags });
9673
9651
  }, [o]), n ? /* @__PURE__ */ c(
9674
9652
  Ht,
@@ -9872,10 +9850,10 @@ const Ep = ({
9872
9850
  ] })
9873
9851
  }
9874
9852
  ) : null;
9875
- }, ft = [0, 3, 6, 9], Cp = ro(() => import(
9853
+ }, ft = [0, 3, 6, 9], Tp = ro(() => import(
9876
9854
  /* webpackChunkName: "LazyChart" */
9877
- "./Chart.kZTvVvsD.js"
9878
- )), Ip = ({
9855
+ "./Chart.B64KeIkK.js"
9856
+ )), Ep = ({
9879
9857
  open: e,
9880
9858
  onOpenChange: t
9881
9859
  }) => {
@@ -9885,7 +9863,7 @@ const Ep = ({
9885
9863
  }), { data: l, isSuccess: i } = Qd({
9886
9864
  user: a == null ? void 0 : a.username,
9887
9865
  getAccessToken: r
9888
- }), d = Math.floor((/* @__PURE__ */ new Date()).getMonth() / 3) * 3, [f, u] = V(d), h = (p) => {
9866
+ }), d = Math.floor((/* @__PURE__ */ new Date()).getMonth() / 3) * 3, [f, u] = z(d), h = (p) => {
9889
9867
  p.preventDefault();
9890
9868
  const b = (ft.indexOf(f) + 1) % ft.length;
9891
9869
  u(ft[b]);
@@ -9931,7 +9909,7 @@ const Ep = ({
9931
9909
  className: "prose-dark dark:prose-lighter mt-4 min-h-[535px]",
9932
9910
  children: i && l && l.usage && l.usage.series && l.usage.series.length ? /* @__PURE__ */ N(to, { fallback: /* @__PURE__ */ c("div", {}), children: [
9933
9911
  /* @__PURE__ */ c("div", { className: "pt-4" }),
9934
- /* @__PURE__ */ c(Cp, { usage: l.usage.series, page: f }),
9912
+ /* @__PURE__ */ c(Tp, { usage: l.usage.series, page: f }),
9935
9913
  /* @__PURE__ */ c(ar, { className: "mt-2", alignHorizontal: "center", children: /* @__PURE__ */ N(We, { children: [
9936
9914
  /* @__PURE__ */ c(
9937
9915
  yt,
@@ -9960,10 +9938,10 @@ const Ep = ({
9960
9938
  ] })
9961
9939
  }
9962
9940
  );
9963
- }, Sp = ({
9941
+ }, Cp = ({
9964
9942
  isComponent: e = !1
9965
9943
  }) => {
9966
- const { logout: t, getAccessToken: r } = Oe(), [a, o] = V(!1), [n, s] = V(!1), [l, i] = V(!1), [d, f] = V(!1), [u, h] = V(!1), [m, p] = V(!1), [y, b] = V(!1), v = () => {
9944
+ const { logout: t, getAccessToken: r } = Oe(), [a, o] = z(!1), [n, s] = z(!1), [l, i] = z(!1), [d, f] = z(!1), [u, h] = z(!1), [m, p] = z(!1), [y, b] = z(!1), v = () => {
9967
9945
  o(!a);
9968
9946
  }, w = () => {
9969
9947
  s(!n);
@@ -9976,7 +9954,7 @@ const Ep = ({
9976
9954
  }, _ = () => {
9977
9955
  b(!y);
9978
9956
  };
9979
- return z(() => {
9957
+ return P(() => {
9980
9958
  (async () => {
9981
9959
  if (!st())
9982
9960
  return;
@@ -9998,11 +9976,11 @@ const Ep = ({
9998
9976
  children: /* @__PURE__ */ c("p", { children: "Are you sure you want to log out?" })
9999
9977
  }
10000
9978
  ),
10001
- a && /* @__PURE__ */ c(Ym, { open: a, onOpenChange: o }),
10002
- n && /* @__PURE__ */ c(Ep, { open: n, onOpenChange: s }),
10003
- l && /* @__PURE__ */ c(Wm, { open: l, onOpenChange: i }),
10004
- d && /* @__PURE__ */ c(Hm, { open: d, onOpenChange: f }),
10005
- u && /* @__PURE__ */ c(Ip, { open: u, onOpenChange: h }),
9979
+ a && /* @__PURE__ */ c(Wm, { open: a, onOpenChange: o }),
9980
+ n && /* @__PURE__ */ c(xp, { open: n, onOpenChange: s }),
9981
+ l && /* @__PURE__ */ c(Gm, { open: l, onOpenChange: i }),
9982
+ d && /* @__PURE__ */ c(Fm, { open: d, onOpenChange: f }),
9983
+ u && /* @__PURE__ */ c(Ep, { open: u, onOpenChange: h }),
10006
9984
  /* @__PURE__ */ c("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ N(
10007
9985
  ar,
10008
9986
  {
@@ -10091,7 +10069,7 @@ const Ep = ({
10091
10069
  }
10092
10070
  ) })
10093
10071
  ] });
10094
- }, Cr = "av-bubble", Vn = "av-button", So = "icon", Di = "button", Xa = "link", Np = ({
10072
+ }, Cr = "av-bubble", Vn = "av-button", So = "icon", Di = "button", Xa = "link", Ip = ({
10095
10073
  type: e,
10096
10074
  size: t,
10097
10075
  labelRight: r,
@@ -10127,7 +10105,7 @@ const Ep = ({
10127
10105
  "h-12": t === "large" && n && (r || a)
10128
10106
  });
10129
10107
  }
10130
- }, Rp = ({
10108
+ }, Sp = ({
10131
10109
  type: e,
10132
10110
  size: t,
10133
10111
  labelRight: r,
@@ -10150,7 +10128,7 @@ const Ep = ({
10150
10128
  [s]: t === "large" && (r || a)
10151
10129
  });
10152
10130
  }
10153
- }, Ap = ({
10131
+ }, Np = ({
10154
10132
  mode: e,
10155
10133
  noBackground: t,
10156
10134
  truncate: r,
@@ -10186,7 +10164,7 @@ const Ep = ({
10186
10164
  return g("not-prose text-copy-lighter", {
10187
10165
  truncate: r
10188
10166
  });
10189
- }, Op = ({
10167
+ }, Rp = ({
10190
10168
  mode: e,
10191
10169
  noBackground: t,
10192
10170
  variant: r
@@ -10216,13 +10194,13 @@ const Ep = ({
10216
10194
  if (r === "selected")
10217
10195
  return "bg-action-selected-dark";
10218
10196
  }
10219
- }, $p = ({
10197
+ }, Ap = ({
10220
10198
  radius: e
10221
10199
  }) => g({
10222
10200
  "rounded-full": e === "large",
10223
10201
  "rounded-md": e === "medium",
10224
10202
  "rounded-xs": e === "small"
10225
- }), Lp = ({
10203
+ }), Op = ({
10226
10204
  mode: e,
10227
10205
  disabled: t,
10228
10206
  variant: r
@@ -10252,7 +10230,7 @@ const Ep = ({
10252
10230
  });
10253
10231
  if (r === "selected")
10254
10232
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
10255
- }, Mp = ({
10233
+ }, $p = ({
10256
10234
  mode: e,
10257
10235
  disabled: t,
10258
10236
  variant: r
@@ -10282,7 +10260,7 @@ const Ep = ({
10282
10260
  });
10283
10261
  if (r === "selected")
10284
10262
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
10285
- }, Dp = ({
10263
+ }, Lp = ({
10286
10264
  mode: e,
10287
10265
  noBorder: t,
10288
10266
  variant: r
@@ -10312,14 +10290,14 @@ const Ep = ({
10312
10290
  });
10313
10291
  if (r === "selected")
10314
10292
  return "border border-border-selected-dark";
10315
- }, Bp = ({
10293
+ }, Mp = ({
10316
10294
  focusMode: e
10317
10295
  }) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
10318
10296
  "focus:outline-focus-dark": e === "dark",
10319
10297
  "focus:outline-focus-light": e === "light",
10320
10298
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
10321
10299
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
10322
- }), Pp = ({
10300
+ }), Dp = ({
10323
10301
  mode: e,
10324
10302
  raw: t,
10325
10303
  iconClassName: r
@@ -10331,11 +10309,11 @@ const Ep = ({
10331
10309
  "dark:text-copy-accent-dark": e === "system"
10332
10310
  },
10333
10311
  r
10334
- ), zp = ({
10312
+ ), Bp = ({
10335
10313
  animated: e
10336
10314
  }) => g({
10337
10315
  "transition-opacity duration-300 ease-in": e
10338
- }), Vp = ({
10316
+ }), Pp = ({
10339
10317
  type: e,
10340
10318
  className: t,
10341
10319
  raw: r,
@@ -10355,15 +10333,15 @@ const Ep = ({
10355
10333
  animated: b
10356
10334
  }) => (h || (h = "primary"), r ? g(Vn, t) : g(
10357
10335
  Vn,
10358
- Ap({
10336
+ Np({
10359
10337
  mode: a,
10360
10338
  variant: h,
10361
10339
  noBackground: u,
10362
10340
  truncate: m
10363
10341
  }),
10364
- Op({ mode: a, noBackground: u, variant: h }),
10365
- $p({ radius: y }),
10366
- Np({
10342
+ Rp({ mode: a, noBackground: u, variant: h }),
10343
+ Ap({ radius: y }),
10344
+ Ip({
10367
10345
  type: e,
10368
10346
  size: l,
10369
10347
  labelRight: d,
@@ -10371,11 +10349,11 @@ const Ep = ({
10371
10349
  align: p,
10372
10350
  animated: b
10373
10351
  }),
10374
- Rp({ type: e, size: l, labelRight: d, labelLeft: f }),
10375
- Dp({ mode: a, variant: h, noBorder: i }),
10376
- Bp({ focusMode: o }),
10377
- Lp({ mode: a, variant: h, disabled: n }),
10378
- Mp({ mode: a, variant: h, disabled: n }),
10352
+ Sp({ type: e, size: l, labelRight: d, labelLeft: f }),
10353
+ Lp({ mode: a, variant: h, noBorder: i }),
10354
+ Mp({ focusMode: o }),
10355
+ Op({ mode: a, variant: h, disabled: n }),
10356
+ $p({ mode: a, variant: h, disabled: n }),
10379
10357
  {
10380
10358
  "w-full": s,
10381
10359
  "disabled:cursor-not-allowed disabled:opacity-50": n
@@ -10384,7 +10362,7 @@ const Ep = ({
10384
10362
  "transition-[width] duration-300 ease-in-out": b
10385
10363
  }),
10386
10364
  t
10387
- )), Fp = (e, t, r) => {
10365
+ )), zp = (e, t, r) => {
10388
10366
  var a;
10389
10367
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
10390
10368
  }, Bi = U.forwardRef((e, t) => {
@@ -10394,20 +10372,20 @@ const Ep = ({
10394
10372
  {
10395
10373
  ref: t,
10396
10374
  onClick: (n) => {
10397
- Fp(n, a, r);
10375
+ zp(n, a, r);
10398
10376
  },
10399
10377
  ...o
10400
10378
  }
10401
10379
  );
10402
10380
  });
10403
10381
  Bi.displayName = "BaseButton";
10404
- function Up() {
10382
+ function Vp() {
10405
10383
  const e = L(!1);
10406
- return z(() => (e.current = !0, () => {
10384
+ return P(() => (e.current = !0, () => {
10407
10385
  e.current = !1;
10408
10386
  }), []), Y(() => e.current, []);
10409
10387
  }
10410
- function Hp(e) {
10388
+ function Fp(e) {
10411
10389
  return $e(() => e.every((t) => t == null) ? () => {
10412
10390
  } : (t) => {
10413
10391
  e.forEach((r) => {
@@ -10415,7 +10393,7 @@ function Hp(e) {
10415
10393
  });
10416
10394
  }, e);
10417
10395
  }
10418
- const Gp = {
10396
+ const Up = {
10419
10397
  x: 0,
10420
10398
  y: 0,
10421
10399
  width: 0,
@@ -10426,31 +10404,31 @@ const Gp = {
10426
10404
  right: 0
10427
10405
  };
10428
10406
  function ua(e) {
10429
- const t = Up(), r = L(0), a = L(null), [o, n] = V(Gp), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
10407
+ const t = Vp(), r = L(0), a = L(null), [o, n] = z(Up), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
10430
10408
  const i = l[0];
10431
10409
  i && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
10432
10410
  a.current && t() && n(i.contentRect);
10433
10411
  }));
10434
10412
  }), [t]);
10435
- return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
10413
+ return P(() => (a.current && (s == null || s.observe(a.current, e)), () => {
10436
10414
  s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
10437
10415
  }), [s, e]), [a, o];
10438
10416
  }
10439
- const jp = {
10417
+ const Hp = {
10440
10418
  small: 24,
10441
10419
  // w-6
10442
10420
  medium: 32,
10443
10421
  // w-8
10444
10422
  large: 48
10445
10423
  // w-12
10446
- }, Wp = {
10424
+ }, Gp = {
10447
10425
  small: 8 * 2,
10448
10426
  // px-2 x 2
10449
10427
  medium: 12 * 2,
10450
10428
  // px-3 x 2
10451
10429
  large: 16 * 2
10452
10430
  // px-4 x 2
10453
- }, qp = 2, No = U.forwardRef(
10431
+ }, jp = 2, No = U.forwardRef(
10454
10432
  ({
10455
10433
  children: e,
10456
10434
  disabled: t = !1,
@@ -10474,7 +10452,7 @@ const jp = {
10474
10452
  animated: k = !1,
10475
10453
  ...C
10476
10454
  }, I) => {
10477
- const _ = Vp({
10455
+ const _ = Pp({
10478
10456
  type: So,
10479
10457
  mode: r,
10480
10458
  focusMode: a,
@@ -10491,11 +10469,11 @@ const jp = {
10491
10469
  radius: b,
10492
10470
  variant: v,
10493
10471
  animated: k
10494
- }), x = Pp({ mode: r, raw: l, iconClassName: w }), E = zp({ animated: k }), [T, S] = ua(), [R, $] = ua(), [A, M] = ua(), P = L(0), D = L(null), j = Hp([I, D]);
10472
+ }), x = Dp({ mode: r, raw: l, iconClassName: w }), E = Bp({ animated: k }), [T, S] = ua(), [R, $] = ua(), [A, D] = ua(), F = L(0), M = L(null), j = Fp([I, M]);
10495
10473
  return we(() => {
10496
- A && A.current && k && (P.current = M.width + Wp[u] + (i ? 0 : qp));
10497
- }, [M, A, u, i, k]), we(() => {
10498
- D && D.current && k && (h && T && S.width > 0 ? (T.current && (T.current.style.opacity = "100"), D.current.style.width = `${S.width + P.current}px`) : m && $.width > 0 ? (R.current && (R.current.style.opacity = "100"), D.current.style.width = `${$.width + P.current}px`) : (T.current && (T.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), D.current.style.width = `${jp[u]}px`));
10474
+ A && A.current && k && (F.current = D.width + Gp[u] + (i ? 0 : jp));
10475
+ }, [D, A, u, i, k]), we(() => {
10476
+ M && M.current && k && (h && T && S.width > 0 ? (T.current && (T.current.style.opacity = "100"), M.current.style.width = `${S.width + F.current}px`) : m && $.width > 0 ? (R.current && (R.current.style.opacity = "100"), M.current.style.width = `${$.width + F.current}px`) : (T.current && (T.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), M.current.style.width = `${Hp[u]}px`));
10499
10477
  }, [
10500
10478
  S,
10501
10479
  h,
@@ -10558,7 +10536,7 @@ try {
10558
10536
  });
10559
10537
  } catch {
10560
10538
  }
10561
- const Yp = U.forwardRef(
10539
+ const Wp = U.forwardRef(
10562
10540
  ({
10563
10541
  children: e,
10564
10542
  mode: t = "system",
@@ -10596,7 +10574,7 @@ const Yp = U.forwardRef(
10596
10574
  ) });
10597
10575
  }
10598
10576
  );
10599
- Yp.displayName = "ButtonSort";
10577
+ Wp.displayName = "ButtonSort";
10600
10578
  const Pi = ({
10601
10579
  children: e,
10602
10580
  fill: t,
@@ -10640,7 +10618,7 @@ try {
10640
10618
  });
10641
10619
  } catch {
10642
10620
  }
10643
- const Jp = ({
10621
+ const qp = ({
10644
10622
  className: e,
10645
10623
  viewBox: t,
10646
10624
  title: r,
@@ -10666,7 +10644,7 @@ const Jp = ({
10666
10644
  /* @__PURE__ */ c("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
10667
10645
  ]
10668
10646
  }
10669
- ), Kp = ({
10647
+ ), Yp = ({
10670
10648
  className: e,
10671
10649
  viewBox: t,
10672
10650
  title: r,
@@ -10697,20 +10675,20 @@ try {
10697
10675
  });
10698
10676
  } catch {
10699
10677
  }
10700
- const Qp = ({ kind: e, noMaxWidth: t }) => g("px-4 py-2", {
10678
+ const Jp = ({ kind: e, noMaxWidth: t }) => g("px-4 py-2", {
10701
10679
  "max-w-xs sm:max-w-md md:max-w-2xl": !t,
10702
10680
  "lg:max-w-3xl": e === "left" && !t
10703
- }), Xp = ({ kind: e }) => g({
10681
+ }), Kp = ({ kind: e }) => g({
10704
10682
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
10705
10683
  "bg-surface-accent": e === "right"
10706
- }), Zp = ({ kind: e }) => g(
10684
+ }), Qp = ({ kind: e }) => g(
10707
10685
  "prose prose-dark dark:prose-lighter",
10708
10686
  "prose-blockquote:my-1",
10709
10687
  "prose-ol:my-1 prose-ul:my-1",
10710
10688
  {
10711
10689
  "text-copy-lighter": e === "right"
10712
10690
  }
10713
- ), eg = ({ kind: e, tail: t }) => {
10691
+ ), Xp = ({ kind: e, tail: t }) => {
10714
10692
  if (t)
10715
10693
  return g(
10716
10694
  `${Cr}-${e}-tail`,
@@ -10731,7 +10709,7 @@ const Qp = ({ kind: e, noMaxWidth: t }) => g("px-4 py-2", {
10731
10709
  "rounded-tr-xl": e === "left",
10732
10710
  "rounded-tl-xl": e === "right"
10733
10711
  });
10734
- }, tg = ({
10712
+ }, Zp = ({
10735
10713
  kind: e,
10736
10714
  className: t,
10737
10715
  contentClassName: r,
@@ -10749,10 +10727,10 @@ const Qp = ({ kind: e, noMaxWidth: t }) => g("px-4 py-2", {
10749
10727
  ), s = g(
10750
10728
  `${Cr}-content`,
10751
10729
  "flex flex-col empty:hidden",
10752
- Qp({ kind: e, noMaxWidth: a }),
10753
- Zp({ kind: e }),
10754
- Xp({ kind: e }),
10755
- eg({ kind: e, tail: o }),
10730
+ Jp({ kind: e, noMaxWidth: a }),
10731
+ Qp({ kind: e }),
10732
+ Kp({ kind: e }),
10733
+ Xp({ kind: e, tail: o }),
10756
10734
  r
10757
10735
  ), l = "pr-2 pt-1 text-end text-xs text-copy-light", i = g("flex flex-col-reverse sm:flex-row", {
10758
10736
  "ml-2": e === "left" && !o,
@@ -10779,7 +10757,7 @@ const Qp = ({ kind: e, noMaxWidth: t }) => g("px-4 py-2", {
10779
10757
  noMaxWidth: d = !1,
10780
10758
  tail: f = !1
10781
10759
  }) => {
10782
- const [u, h] = V(!1), m = tg({
10760
+ const [u, h] = z(!1), m = Zp({
10783
10761
  kind: t,
10784
10762
  className: r,
10785
10763
  contentClassName: a,
@@ -10788,7 +10766,7 @@ const Qp = ({ kind: e, noMaxWidth: t }) => g("px-4 py-2", {
10788
10766
  }), p = !!s && (typeof s == "function" || typeof s == "string" || typeof e == "string"), y = () => {
10789
10767
  h(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
10790
10768
  };
10791
- return z(() => {
10769
+ return P(() => {
10792
10770
  let b;
10793
10771
  return u && (b = window.setTimeout(() => {
10794
10772
  h(!1);
@@ -10816,7 +10794,7 @@ const Qp = ({ kind: e, noMaxWidth: t }) => g("px-4 py-2", {
10816
10794
  label: u ? "Copied to clipboard" : "Copy to clipboard",
10817
10795
  onClick: y,
10818
10796
  disabled: u,
10819
- children: u ? /* @__PURE__ */ c(Jp, { size: "size-3" }) : /* @__PURE__ */ c(Kp, { size: "size-3" })
10797
+ children: u ? /* @__PURE__ */ c(qp, { size: "size-3" }) : /* @__PURE__ */ c(Yp, { size: "size-3" })
10820
10798
  }
10821
10799
  ) })
10822
10800
  ] });
@@ -10834,7 +10812,7 @@ try {
10834
10812
  });
10835
10813
  } catch {
10836
10814
  }
10837
- const Un = "av-spinner", rg = ({
10815
+ const Un = "av-spinner", eg = ({
10838
10816
  spinnerRef: e,
10839
10817
  mode: t = "system",
10840
10818
  type: r = "circle",
@@ -10881,7 +10859,7 @@ try {
10881
10859
  });
10882
10860
  } catch {
10883
10861
  }
10884
- const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
10862
+ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", tg = ({
10885
10863
  type: e,
10886
10864
  size: t,
10887
10865
  labelRight: r,
@@ -10917,7 +10895,7 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
10917
10895
  "h-12": t === "large" && n && (r || a)
10918
10896
  });
10919
10897
  }
10920
- }, og = ({
10898
+ }, rg = ({
10921
10899
  type: e,
10922
10900
  size: t,
10923
10901
  labelRight: r,
@@ -10940,7 +10918,7 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
10940
10918
  [s]: t === "large" && (r || a)
10941
10919
  });
10942
10920
  }
10943
- }, ng = ({
10921
+ }, ag = ({
10944
10922
  mode: e,
10945
10923
  noBackground: t,
10946
10924
  truncate: r,
@@ -10976,7 +10954,7 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
10976
10954
  return g("not-prose text-copy-lighter", {
10977
10955
  truncate: r
10978
10956
  });
10979
- }, sg = ({
10957
+ }, og = ({
10980
10958
  mode: e,
10981
10959
  noBackground: t,
10982
10960
  variant: r
@@ -11006,13 +10984,13 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11006
10984
  if (r === "selected")
11007
10985
  return "bg-action-selected-dark";
11008
10986
  }
11009
- }, ig = ({
10987
+ }, ng = ({
11010
10988
  radius: e
11011
10989
  }) => g({
11012
10990
  "rounded-full": e === "large",
11013
10991
  "rounded-md": e === "medium",
11014
10992
  "rounded-xs": e === "small"
11015
- }), lg = ({
10993
+ }), sg = ({
11016
10994
  mode: e,
11017
10995
  disabled: t,
11018
10996
  variant: r
@@ -11042,7 +11020,7 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11042
11020
  });
11043
11021
  if (r === "selected")
11044
11022
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
11045
- }, cg = ({
11023
+ }, ig = ({
11046
11024
  mode: e,
11047
11025
  disabled: t,
11048
11026
  variant: r
@@ -11072,7 +11050,7 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11072
11050
  });
11073
11051
  if (r === "selected")
11074
11052
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
11075
- }, dg = ({
11053
+ }, lg = ({
11076
11054
  mode: e,
11077
11055
  noBorder: t,
11078
11056
  variant: r
@@ -11102,14 +11080,14 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11102
11080
  });
11103
11081
  if (r === "selected")
11104
11082
  return "border border-border-selected-dark";
11105
- }, ug = ({
11083
+ }, cg = ({
11106
11084
  focusMode: e
11107
11085
  }) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
11108
11086
  "focus:outline-focus-dark": e === "dark",
11109
11087
  "focus:outline-focus-light": e === "light",
11110
11088
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
11111
11089
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
11112
- }), fg = ({
11090
+ }), dg = ({
11113
11091
  mode: e,
11114
11092
  raw: t,
11115
11093
  iconClassName: r
@@ -11121,7 +11099,7 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11121
11099
  "dark:text-copy-accent-dark": e === "system"
11122
11100
  },
11123
11101
  r
11124
- ), hg = ({
11102
+ ), ug = ({
11125
11103
  animated: e
11126
11104
  }) => g({
11127
11105
  "transition-opacity duration-300 ease-in": e
@@ -11145,15 +11123,15 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11145
11123
  animated: b
11146
11124
  }) => (h || (h = "primary"), r ? g(Hn, t) : g(
11147
11125
  Hn,
11148
- ng({
11126
+ ag({
11149
11127
  mode: a,
11150
11128
  variant: h,
11151
11129
  noBackground: u,
11152
11130
  truncate: m
11153
11131
  }),
11154
- sg({ mode: a, noBackground: u, variant: h }),
11155
- ig({ radius: y }),
11156
- ag({
11132
+ og({ mode: a, noBackground: u, variant: h }),
11133
+ ng({ radius: y }),
11134
+ tg({
11157
11135
  type: e,
11158
11136
  size: l,
11159
11137
  labelRight: d,
@@ -11161,11 +11139,11 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11161
11139
  align: p,
11162
11140
  animated: b
11163
11141
  }),
11164
- og({ type: e, size: l, labelRight: d, labelLeft: f }),
11165
- dg({ mode: a, variant: h, noBorder: i }),
11166
- ug({ focusMode: o }),
11167
- lg({ mode: a, variant: h, disabled: n }),
11168
- cg({ mode: a, variant: h, disabled: n }),
11142
+ rg({ type: e, size: l, labelRight: d, labelLeft: f }),
11143
+ lg({ mode: a, variant: h, noBorder: i }),
11144
+ cg({ focusMode: o }),
11145
+ sg({ mode: a, variant: h, disabled: n }),
11146
+ ig({ mode: a, variant: h, disabled: n }),
11169
11147
  {
11170
11148
  "w-full": s,
11171
11149
  "disabled:cursor-not-allowed disabled:opacity-50": n
@@ -11174,7 +11152,7 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11174
11152
  "transition-[width] duration-300 ease-in-out": e === Wr && b
11175
11153
  }),
11176
11154
  t
11177
- )), mg = (e, t, r) => {
11155
+ )), fg = (e, t, r) => {
11178
11156
  var a;
11179
11157
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
11180
11158
  }, Ao = U.forwardRef((e, t) => {
@@ -11184,7 +11162,7 @@ const Hn = "av-button", Wr = "icon", Ro = "button", Za = "link", ag = ({
11184
11162
  {
11185
11163
  ref: t,
11186
11164
  onClick: (n) => {
11187
- mg(n, a, r);
11165
+ fg(n, a, r);
11188
11166
  },
11189
11167
  ...o
11190
11168
  }
@@ -11234,13 +11212,13 @@ const Fi = U.forwardRef(
11234
11212
  }
11235
11213
  );
11236
11214
  Fi.displayName = "Button";
11237
- function pg() {
11215
+ function hg() {
11238
11216
  const e = L(!1);
11239
- return z(() => (e.current = !0, () => {
11217
+ return P(() => (e.current = !0, () => {
11240
11218
  e.current = !1;
11241
11219
  }), []), Y(() => e.current, []);
11242
11220
  }
11243
- function gg(e) {
11221
+ function mg(e) {
11244
11222
  return $e(() => e.every((t) => t == null) ? () => {
11245
11223
  } : (t) => {
11246
11224
  e.forEach((r) => {
@@ -11248,7 +11226,7 @@ function gg(e) {
11248
11226
  });
11249
11227
  }, e);
11250
11228
  }
11251
- const yg = {
11229
+ const pg = {
11252
11230
  x: 0,
11253
11231
  y: 0,
11254
11232
  width: 0,
@@ -11259,31 +11237,31 @@ const yg = {
11259
11237
  right: 0
11260
11238
  };
11261
11239
  function fa(e) {
11262
- const t = pg(), r = L(0), a = L(null), [o, n] = V(yg), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
11240
+ const t = hg(), r = L(0), a = L(null), [o, n] = z(pg), s = $e(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((l) => {
11263
11241
  const i = l[0];
11264
11242
  i && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
11265
11243
  a.current && t() && n(i.contentRect);
11266
11244
  }));
11267
11245
  }), [t]);
11268
- return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
11246
+ return P(() => (a.current && (s == null || s.observe(a.current, e)), () => {
11269
11247
  s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
11270
11248
  }), [s, e]), [a, o];
11271
11249
  }
11272
- const bg = {
11250
+ const gg = {
11273
11251
  small: 24,
11274
11252
  // w-6
11275
11253
  medium: 32,
11276
11254
  // w-8
11277
11255
  large: 48
11278
11256
  // w-12
11279
- }, vg = {
11257
+ }, yg = {
11280
11258
  small: 8 * 2,
11281
11259
  // px-2 x 2
11282
11260
  medium: 12 * 2,
11283
11261
  // px-3 x 2
11284
11262
  large: 16 * 2
11285
11263
  // px-4 x 2
11286
- }, _g = 2, Ui = U.forwardRef(
11264
+ }, bg = 2, Ui = U.forwardRef(
11287
11265
  ({
11288
11266
  children: e,
11289
11267
  disabled: t = !1,
@@ -11324,11 +11302,11 @@ const bg = {
11324
11302
  radius: b,
11325
11303
  variant: v,
11326
11304
  animated: k
11327
- }), x = fg({ mode: r, raw: l, iconClassName: w }), E = hg({ animated: k }), [T, S] = fa(), [R, $] = fa(), [A, M] = fa(), P = L(0), D = L(null), j = gg([I, D]);
11305
+ }), x = dg({ mode: r, raw: l, iconClassName: w }), E = ug({ animated: k }), [T, S] = fa(), [R, $] = fa(), [A, D] = fa(), F = L(0), M = L(null), j = mg([I, M]);
11328
11306
  return we(() => {
11329
- A && A.current && k && (P.current = M.width + vg[u] + (i ? 0 : _g));
11330
- }, [M, A, u, i, k]), we(() => {
11331
- D && D.current && k && (h && T && S.width > 0 ? (T.current && (T.current.style.opacity = "100"), D.current.style.width = `${S.width + P.current}px`) : m && $.width > 0 ? (R.current && (R.current.style.opacity = "100"), D.current.style.width = `${$.width + P.current}px`) : (T.current && (T.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), D.current.style.width = `${bg[u]}px`));
11307
+ A && A.current && k && (F.current = D.width + yg[u] + (i ? 0 : bg));
11308
+ }, [D, A, u, i, k]), we(() => {
11309
+ M && M.current && k && (h && T && S.width > 0 ? (T.current && (T.current.style.opacity = "100"), M.current.style.width = `${S.width + F.current}px`) : m && $.width > 0 ? (R.current && (R.current.style.opacity = "100"), M.current.style.width = `${$.width + F.current}px`) : (T.current && (T.current.style.opacity = "0"), R.current && (R.current.style.opacity = "0"), M.current.style.width = `${gg[u]}px`));
11332
11310
  }, [
11333
11311
  S,
11334
11312
  h,
@@ -11391,7 +11369,7 @@ try {
11391
11369
  });
11392
11370
  } catch {
11393
11371
  }
11394
- const wg = U.forwardRef(
11372
+ const vg = U.forwardRef(
11395
11373
  ({
11396
11374
  children: e,
11397
11375
  mode: t = "system",
@@ -11429,10 +11407,10 @@ const wg = U.forwardRef(
11429
11407
  ) });
11430
11408
  }
11431
11409
  );
11432
- wg.displayName = "ButtonSort";
11433
- const kg = 200, xg = ({
11410
+ vg.displayName = "ButtonSort";
11411
+ const _g = 200, wg = ({
11434
11412
  string: e,
11435
- idealLength: t = kg
11413
+ idealLength: t = _g
11436
11414
  }) => {
11437
11415
  if (e.length <= t)
11438
11416
  return { string: e, isTruncated: !1 };
@@ -11443,16 +11421,16 @@ const kg = 200, xg = ({
11443
11421
  string: e.slice(0, t + r),
11444
11422
  isTruncated: !0
11445
11423
  };
11446
- }, Tg = ({
11424
+ }, kg = ({
11447
11425
  children: e,
11448
11426
  length: t = 200,
11449
11427
  mode: r = "system",
11450
11428
  focusMode: a = "system"
11451
11429
  }) => {
11452
- const [o, n] = V(!1);
11430
+ const [o, n] = z(!1);
11453
11431
  if (typeof e != "string")
11454
11432
  return e;
11455
- const { string: s, isTruncated: l } = xg({
11433
+ const { string: s, isTruncated: l } = wg({
11456
11434
  string: e,
11457
11435
  idealLength: t
11458
11436
  });
@@ -11486,7 +11464,7 @@ try {
11486
11464
  });
11487
11465
  } catch {
11488
11466
  }
11489
- const Eg = ({ content: e }) => /* @__PURE__ */ c(
11467
+ const xg = ({ content: e }) => /* @__PURE__ */ c(
11490
11468
  zi,
11491
11469
  {
11492
11470
  tail: !0,
@@ -11494,14 +11472,14 @@ const Eg = ({ content: e }) => /* @__PURE__ */ c(
11494
11472
  copyToClipboard: e,
11495
11473
  copyToClipboardFocusMode: "light",
11496
11474
  className: "mt-3",
11497
- children: /* @__PURE__ */ c(Tg, { mode: "light", focusMode: "light", children: e })
11475
+ children: /* @__PURE__ */ c(kg, { mode: "light", focusMode: "light", children: e })
11498
11476
  }
11499
- ), jn = 2, Cg = ro(
11477
+ ), jn = 2, Tg = ro(
11500
11478
  () => import(
11501
11479
  /* webpackChunkName: "LazyMessageAssistant" */
11502
- "./ChatBubbleAssistant.CZn5WUNj.js"
11480
+ "./ChatBubbleAssistant.CzXzTRSG.js"
11503
11481
  )
11504
- ), Ig = U.memo(
11482
+ ), Eg = U.memo(
11505
11483
  ({
11506
11484
  role: e,
11507
11485
  content: t,
@@ -11511,8 +11489,8 @@ const Eg = ({ content: e }) => /* @__PURE__ */ c(
11511
11489
  const {
11512
11490
  state: { restoring: o, streaming: n }
11513
11491
  } = re(Re);
11514
- return e === Lf && t ? /* @__PURE__ */ c(Eg, { content: t }) : n && (e === vn || e === ba) && (!t || t && t.length < jn) ? /* @__PURE__ */ c(zi, { tail: !0, children: /* @__PURE__ */ c(rg, { type: "dots" }) }) : (e === vn || e === ba) && t && t.length >= jn ? /* @__PURE__ */ c(to, { fallback: /* @__PURE__ */ c("span", {}), children: /* @__PURE__ */ c(
11515
- Cg,
11492
+ return e === Lf && t ? /* @__PURE__ */ c(xg, { content: t }) : n && (e === vn || e === ba) && (!t || t && t.length < jn) ? /* @__PURE__ */ c(zi, { tail: !0, children: /* @__PURE__ */ c(eg, { type: "dots" }) }) : (e === vn || e === ba) && t && t.length >= jn ? /* @__PURE__ */ c(to, { fallback: /* @__PURE__ */ c("span", {}), children: /* @__PURE__ */ c(
11493
+ Tg,
11516
11494
  {
11517
11495
  role: e,
11518
11496
  content: t,
@@ -11522,7 +11500,7 @@ const Eg = ({ content: e }) => /* @__PURE__ */ c(
11522
11500
  }
11523
11501
  ) }) : null;
11524
11502
  }
11525
- ), Sg = () => {
11503
+ ), Cg = () => {
11526
11504
  const { messages: e } = xt();
11527
11505
  return e && e.length > 0 ? /* @__PURE__ */ c("div", { className: "space-y-6 mt-2 @container", children: e == null ? void 0 : e.map((t, r) => {
11528
11506
  let a;
@@ -11539,7 +11517,7 @@ const Eg = ({ content: e }) => /* @__PURE__ */ c(
11539
11517
  }), s = n && n.length > 0 ? n.filter(Boolean).join(`
11540
11518
  `) : void 0;
11541
11519
  return /* @__PURE__ */ c(
11542
- Ig,
11520
+ Eg,
11543
11521
  {
11544
11522
  role: t.role,
11545
11523
  content: s,
@@ -11549,7 +11527,7 @@ const Eg = ({ content: e }) => /* @__PURE__ */ c(
11549
11527
  o
11550
11528
  );
11551
11529
  }) }) : null;
11552
- }, Ng = () => {
11530
+ }, Ig = () => {
11553
11531
  const { isAuthenticated: e } = Oe(), { ref: t, inViewport: r } = kc(), a = L(null), o = L(null), {
11554
11532
  state: { footerPosition: n, footerHeight: s, footerOffset: l }
11555
11533
  } = re(_o), {
@@ -11563,14 +11541,14 @@ const Eg = ({ content: e }) => /* @__PURE__ */ c(
11563
11541
  block: "end"
11564
11542
  });
11565
11543
  }, []);
11566
- return z(() => {
11544
+ return P(() => {
11567
11545
  i && u();
11568
- }, [i, u]), z(() => {
11546
+ }, [i, u]), P(() => {
11569
11547
  d.current = n === Jt ? s + l + as + yl : 0;
11570
11548
  }, [n, s, l]), /* @__PURE__ */ N(de, { children: [
11571
11549
  /* @__PURE__ */ N("div", { className: f, ref: a, children: [
11572
11550
  /* @__PURE__ */ c(bl, {}),
11573
- /* @__PURE__ */ c(Sg, {}),
11551
+ /* @__PURE__ */ c(Cg, {}),
11574
11552
  /* @__PURE__ */ c("div", { ref: t, className: "scroll-marker" }),
11575
11553
  /* @__PURE__ */ c("div", { ref: o, className: "pt-20" })
11576
11554
  ] }),
@@ -11588,7 +11566,7 @@ function Hi({
11588
11566
  isComponent: e = !1,
11589
11567
  headerHeight: t = 0
11590
11568
  }) {
11591
- const { user: r, getAccessToken: a } = Oe(), [o, n] = V(`${Ho}px`), [s, l] = xs(), [i, d] = V(it()), [f, u] = V([]), [h] = vt({
11569
+ const { user: r, getAccessToken: a } = Oe(), [o, n] = z(`${Ho}px`), [s, l] = xs(), [i, d] = z(it()), [f, u] = z([]), [h] = vt({
11592
11570
  key: bt + rs,
11593
11571
  initialValue: ""
11594
11572
  }), [m] = vt({
@@ -11622,20 +11600,20 @@ function Hi({
11622
11600
  user: r == null ? void 0 : r.username,
11623
11601
  getAccessToken: a
11624
11602
  });
11625
- return z(() => {
11603
+ return P(() => {
11626
11604
  var x;
11627
11605
  (x = document.getElementById("logo")) == null || x.classList.add("fadeOut"), setTimeout(() => {
11628
11606
  var E;
11629
11607
  (E = document.getElementById("root")) == null || E.classList.replace("app-hidden", "fadeIn");
11630
11608
  }, 500);
11631
- }), z(() => {
11609
+ }), P(() => {
11632
11610
  _ && _.provider && I({
11633
11611
  type: co,
11634
11612
  payload: {
11635
11613
  provider: _.provider
11636
11614
  }
11637
11615
  });
11638
- }, [_]), z(() => {
11616
+ }, [_]), P(() => {
11639
11617
  if (p.footerPosition === "FOOTER_BOTTOM") {
11640
11618
  const x = `calc(${l.height}px + 20px)`;
11641
11619
  n(
@@ -11697,7 +11675,7 @@ function Hi({
11697
11675
  className: Go({
11698
11676
  extraClass: "mt-5"
11699
11677
  }),
11700
- children: /* @__PURE__ */ c(Sp, { isComponent: e })
11678
+ children: /* @__PURE__ */ c(Cp, { isComponent: e })
11701
11679
  }
11702
11680
  ),
11703
11681
  /* @__PURE__ */ c(
@@ -11711,10 +11689,10 @@ function Hi({
11711
11689
  style: {
11712
11690
  height: o
11713
11691
  },
11714
- children: /* @__PURE__ */ c(Ng, {})
11692
+ children: /* @__PURE__ */ c(Ig, {})
11715
11693
  }
11716
11694
  ),
11717
- /* @__PURE__ */ c(Vm, { isComponent: e })
11695
+ /* @__PURE__ */ c(Pm, { isComponent: e })
11718
11696
  ]
11719
11697
  }
11720
11698
  )
@@ -11726,9 +11704,9 @@ function Hi({
11726
11704
  );
11727
11705
  }
11728
11706
  Hi.displayName = "App";
11729
- const Dg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Hi }, Symbol.toStringTag, { value: "Module" }));
11707
+ const Lg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Hi }, Symbol.toStringTag, { value: "Module" }));
11730
11708
  export {
11731
- Dg as App,
11709
+ Lg as App,
11732
11710
  ym as ButtonScroll,
11733
11711
  Re as ChatContext,
11734
11712
  vt as E,