@versini/sassysaint 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  import { jsxs as c, jsx as t, Fragment as w } from "react/jsx-runtime";
2
- import { O, i$1 as Le, N as De, p as Oe, o as _e, g as A, N$1 as _, CARDS as C, renderDataAsList as P, pluralize as q, ABOUT_TITLE as ze, MODEL_GPT4 as Be, numberFormatter as Ve, durationFormatter as fe, NA as Pe, ROLE_ASSISTANT as Fe, extractAverage as $e, GPT4_MAX_TOKENS as Ge, Cr as G, STATS as ge, b as X, j as M, x as Q, LOCAL_STORAGE_PREFIX as Z, LOCAL_STORAGE_SORT as Ue, ACTION_RESET as je, ACTION_RESTORE as Ke, truncate as Ye, ACTION_SORT as re, LOCAL_STORAGE_SEARCH as We, G as Xe, ACTION_SEARCH as Je, HISTORY_TITLE as qe, LOCAL_STORAGE_CHAT_DETAILS as Qe, LOCAL_STORAGE_LOCATION as Ze, j$1 as et, f$2 as tt, ACTION_LOCATION as le, getCurrentGeoLocation as st, convertLatitudeToDMS as at, convertLongitudeToDMS as rt, PROFILE_TITLE as nt, LOG_OUT as de } from "./index.DcXJ8skl.js";
2
+ import { O as D, i$1 as le, N as de, p as De, o as _e, g as A, N$1 as _, CARDS as C, renderDataAsList as F, pluralize as Q, ABOUT_TITLE as ze, MODEL_GPT4 as Be, numberFormatter as Ve, durationFormatter as Ce, NA as Pe, ROLE_ASSISTANT as Fe, extractAverage as Ge, GPT4_MAX_TOKENS as $e, Wr as U, STATS as Ne, b as q, j as M, x as Z, LOCAL_STORAGE_PREFIX as ee, LOCAL_STORAGE_SORT as Ue, ACTION_RESET as je, ACTION_RESTORE as Ke, truncate as Ye, ACTION_SORT as re, LOCAL_STORAGE_SEARCH as We, G as Xe, ACTION_SEARCH as Je, HISTORY_TITLE as qe, LOCAL_STORAGE_CHAT_DETAILS as Qe, LOCAL_STORAGE_LOCATION as Ze, G$1 as et, f$2 as tt, ACTION_LOCATION as me, getCurrentGeoLocation as st, convertLatitudeToDMS as at, convertLongitudeToDMS as nt, PROFILE_TITLE as rt, LOG_OUT as ue } from "./index.Ctkx8F84.js";
3
3
  import * as ce from "react";
4
- import ot, { forwardRef as Ce, useState as T, useRef as F, useContext as R, useEffect as L, Suspense as ct, lazy as it, useId as lt } from "react";
5
- import { g as dt, AppContext as U, serviceCall as te, SERVICE_TYPES as se, HistoryContext as Ne, E as ee, k as v, et as ut, at as mt, lt as ne, J as H, ct as ht, st as pt, rt as ft } from "./useLocalStorage.Cx1iecci.js";
6
- import E from "clsx";
7
- import { useFloatingTree as Te, useFloatingNodeId as gt, useListItem as ye, useFloating as Ct, offset as Nt, flip as Tt, shift as yt, autoUpdate as bt, useClick as St, useRole as wt, useDismiss as Et, useListNavigation as kt, useTypeahead as xt, useInteractions as vt, useMergeRefs as be, FloatingNode as At, FloatingList as It, FloatingPortal as Ht, FloatingFocusManager as Mt, FloatingTree as Rt } from "@floating-ui/react";
4
+ import ot, { forwardRef as Te, useState as T, useRef as G, useContext as R, useEffect as L, Suspense as ct, lazy as it, useId as lt } from "react";
5
+ import { g as dt, AppContext as j, serviceCall as se, SERVICE_TYPES as ae, HistoryContext as ye, E as te, k as v, et as mt, at as ut, lt as oe, J as H, ct as ht, st as pt, rt as ft } from "./useLocalStorage.D_0bF6Yy.js";
6
+ import k from "clsx";
7
+ import { useFloatingTree as be, useFloatingNodeId as gt, useListItem as Se, useFloating as Ct, offset as Nt, flip as Tt, shift as yt, autoUpdate as bt, useClick as St, useRole as wt, useDismiss as kt, useListNavigation as Et, useTypeahead as xt, useInteractions as vt, useMergeRefs as we, FloatingNode as At, FloatingList as It, FloatingPortal as Ht, FloatingFocusManager as Mt, FloatingTree as Rt } from "@floating-ui/react";
8
8
  const ie = ce.createContext({
9
9
  getItemProps: () => ({}),
10
10
  activeIndex: null,
@@ -14,7 +14,7 @@ const ie = ce.createContext({
14
14
  setHasFocusInside: () => {
15
15
  },
16
16
  isOpen: !1
17
- }), ue = (e) => {
17
+ }), he = (e) => {
18
18
  if (typeof e == "string")
19
19
  return e;
20
20
  if (typeof e == "function")
@@ -25,54 +25,54 @@ const ie = ce.createContext({
25
25
  return s.displayName || s.name || "Component";
26
26
  }
27
27
  return "Element";
28
- }, Se = Ce(
28
+ }, ke = Te(
29
29
  ({
30
30
  trigger: e,
31
31
  children: s,
32
32
  label: a = "Open menu",
33
- defaultPlacement: r = "bottom-start",
34
- onOpenChange: n,
33
+ defaultPlacement: n = "bottom-start",
34
+ onOpenChange: r,
35
35
  spacing: o,
36
36
  mode: l = "system",
37
37
  focusMode: d = "system",
38
- ...u
39
- }, f) => {
40
- const [N, m] = T(!1), [y, b] = T(!1), [S, p] = T(null), k = F([]), i = F([]), h = R(ie), g = Te(), x = gt(), z = ye(), { floatingStyles: ae, refs: Y, context: I } = Ct({
38
+ ...h
39
+ }, m) => {
40
+ const [N, u] = T(!1), [y, b] = T(!1), [S, f] = T(null), E = G([]), i = G([]), p = R(ie), g = be(), x = gt(), z = Se(), { floatingStyles: ne, refs: W, context: I } = Ct({
41
41
  nodeId: x,
42
42
  open: N,
43
43
  onOpenChange: (V) => {
44
- m(V), n == null || n(V);
44
+ u(V), r == null || r(V);
45
45
  },
46
- placement: r,
46
+ placement: n,
47
47
  strategy: "fixed",
48
48
  middleware: [Nt({ mainAxis: 10 }), Tt(), yt()],
49
49
  whileElementsMounted: bt
50
- }), W = St(I, {
50
+ }), X = St(I, {
51
51
  event: "mousedown",
52
52
  toggle: !0,
53
53
  ignoreMouse: !1
54
- }), B = wt(I, { role: "menu" }), ke = Et(I, { bubbles: !0 }), xe = kt(I, {
55
- listRef: k,
54
+ }), B = wt(I, { role: "menu" }), ve = kt(I, { bubbles: !0 }), Ae = Et(I, {
55
+ listRef: E,
56
56
  activeIndex: S,
57
57
  nested: !1,
58
- onNavigate: p,
58
+ onNavigate: f,
59
59
  loop: !0
60
- }), ve = xt(I, {
60
+ }), Ie = xt(I, {
61
61
  listRef: i,
62
- onMatch: N ? p : void 0,
62
+ onMatch: N ? f : void 0,
63
63
  activeIndex: S
64
- }), { getReferenceProps: Ae, getFloatingProps: Ie, getItemProps: He } = vt([W, B, ke, xe, ve]), Me = ue(e) === "Button" || ue(e) === "ButtonIcon", Re = ot.cloneElement(e, {
64
+ }), { getReferenceProps: He, getFloatingProps: Me, getItemProps: Re } = vt([X, B, ve, Ae, Ie]), Le = he(e) === "Button" || he(e) === "ButtonIcon", Oe = ot.cloneElement(e, {
65
65
  mode: l,
66
66
  focusMode: d,
67
67
  spacing: o,
68
- noInternalClick: Me,
68
+ noInternalClick: Le,
69
69
  "aria-label": a,
70
70
  "data-open": N ? "" : void 0,
71
71
  "data-focus-inside": y ? "" : void 0,
72
- ref: be([Y.setReference, z.ref, f]),
73
- ...Ae(
74
- h.getItemProps({
75
- ...u
72
+ ref: we([W.setReference, z.ref, m]),
73
+ ...He(
74
+ p.getItemProps({
75
+ ...h
76
76
  })
77
77
  )
78
78
  });
@@ -80,26 +80,26 @@ const ie = ce.createContext({
80
80
  if (!g)
81
81
  return;
82
82
  function V() {
83
- m(!1), n == null || n(!1);
83
+ u(!1), r == null || r(!1);
84
84
  }
85
85
  return g.events.on("click", V), () => {
86
86
  g.events.off("click", V);
87
87
  };
88
- }, [g, n]), L(() => {
88
+ }, [g, r]), L(() => {
89
89
  N && g && g.events.emit("menuopen", { nodeId: x });
90
90
  }, [g, N, x]), /* @__PURE__ */ c(At, { id: x, children: [
91
- Re,
91
+ Oe,
92
92
  /* @__PURE__ */ t(
93
93
  ie.Provider,
94
94
  {
95
95
  value: {
96
96
  activeIndex: S,
97
- setActiveIndex: p,
98
- getItemProps: He,
97
+ setActiveIndex: f,
98
+ getItemProps: Re,
99
99
  setHasFocusInside: b,
100
100
  isOpen: N
101
101
  },
102
- children: /* @__PURE__ */ t(It, { elementsRef: k, labelsRef: i, children: N && /* @__PURE__ */ t(Ht, { children: /* @__PURE__ */ t(
102
+ children: /* @__PURE__ */ t(It, { elementsRef: E, labelsRef: i, children: N && /* @__PURE__ */ t(Ht, { children: /* @__PURE__ */ t(
103
103
  Mt,
104
104
  {
105
105
  context: I,
@@ -109,10 +109,10 @@ const ie = ce.createContext({
109
109
  children: /* @__PURE__ */ t(
110
110
  "div",
111
111
  {
112
- ref: Y.setFloating,
112
+ ref: W.setFloating,
113
113
  className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
114
- style: ae,
115
- ...Ie(),
114
+ style: ne,
115
+ ...Me(),
116
116
  children: s
117
117
  }
118
118
  )
@@ -122,28 +122,28 @@ const ie = ce.createContext({
122
122
  )
123
123
  ] });
124
124
  }
125
- ), we = Ce((e, s) => /* @__PURE__ */ t(Rt, { children: /* @__PURE__ */ t(Se, { ...e, ref: s }) }));
126
- we.displayName = "Menu";
127
- Se.displayName = "MenuComponent";
128
- const D = ce.forwardRef(({ label: e, disabled: s, icon: a, ...r }, n) => {
129
- const o = ce.useContext(ie), l = ye({ label: s ? null : e }), d = Te();
125
+ ), Ee = Te((e, s) => /* @__PURE__ */ t(Rt, { children: /* @__PURE__ */ t(ke, { ...e, ref: s }) }));
126
+ Ee.displayName = "Menu";
127
+ ke.displayName = "MenuComponent";
128
+ const O = ce.forwardRef(({ label: e, disabled: s, icon: a, ...n }, r) => {
129
+ const o = ce.useContext(ie), l = Se({ label: s ? null : e }), d = be();
130
130
  return /* @__PURE__ */ c(
131
131
  "button",
132
132
  {
133
- ...r,
134
- ref: be([l.ref, n]),
133
+ ...n,
134
+ ref: we([l.ref, r]),
135
135
  role: "menuitem",
136
136
  className: "m-0 flex w-full rounded-md border border-transparent bg-none px-3 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
137
137
  tabIndex: 0,
138
138
  disabled: s,
139
139
  ...o.getItemProps({
140
- onClick(u) {
141
- var f;
142
- (f = r.onClick) == null || f.call(r, u), d == null || d.events.emit("click");
140
+ onClick(h) {
141
+ var m;
142
+ (m = n.onClick) == null || m.call(n, h), d == null || d.events.emit("click");
143
143
  },
144
- onFocus(u) {
145
- var f;
146
- (f = r.onFocus) == null || f.call(r, u), o.setHasFocusInside(!0);
144
+ onFocus(h) {
145
+ var m;
146
+ (m = n.onFocus) == null || m.call(n, h), o.setHasFocusInside(!0);
147
147
  }
148
148
  }),
149
149
  children: [
@@ -153,16 +153,16 @@ const D = ce.forwardRef(({ label: e, disabled: s, icon: a, ...r }, n) => {
153
153
  }
154
154
  );
155
155
  });
156
- D.displayName = "MenuItem";
156
+ O.displayName = "MenuItem";
157
157
  const Lt = ({ className: e, ...s }) => {
158
- const a = E(e, "my-1 border-t border-border-medium");
158
+ const a = k(e, "my-1 border-t border-border-medium");
159
159
  return /* @__PURE__ */ t("div", { className: a, ...s });
160
- }, Dt = ({
160
+ }, Ot = ({
161
161
  className: e,
162
162
  viewBox: s,
163
163
  spacing: a,
164
- title: r,
165
- monotone: n,
164
+ title: n,
165
+ monotone: r,
166
166
  ...o
167
167
  }) => /* @__PURE__ */ t(
168
168
  dt,
@@ -172,71 +172,73 @@ const Lt = ({ className: e, ...s }) => {
172
172
  viewBox: s,
173
173
  className: e,
174
174
  spacing: a,
175
- title: r || "Close",
175
+ title: n || "Close",
176
176
  ...o,
177
177
  children: /* @__PURE__ */ t("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
178
178
  }
179
- ), J = "panel", oe = "messagebox", Ot = ({
180
- kind: e,
181
- borderMode: s
179
+ ), P = "panel", J = "messagebox", Dt = ({
180
+ className: e,
181
+ kind: s,
182
+ borderMode: a
182
183
  }) => ({
183
- main: E(
184
- "prose prose-lighter flex flex-col bg-surface-medium md:max-w-2xl",
185
- {
186
- [`${Le} h-full min-h-[95%] w-full sm:h-auto sm:min-h-[10rem] sm:w-[95%] sm:rounded-lg sm:border-2`]: e === J,
187
- [`${De} w-[95%] rounded-lg border-2 sm:w-[50%]`]: e === oe,
188
- "sm:border-border-dark": s === "dark" && e === J,
189
- "sm:border-border-accent": s === "light" && e === J,
190
- "border-border-dark": s === "dark" && e === oe,
191
- "border-border-accent": s === "light" && e === oe
192
- }
193
- ),
184
+ main: k("prose prose-lighter flex flex-col bg-surface-medium", {
185
+ [`${le} h-full min-h-[95%] sm:h-auto sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: s === P,
186
+ [`${le} w-full sm:w-[95%] md:max-w-2xl`]: s === P && !e,
187
+ [`${de} rounded-lg border-2`]: s === J,
188
+ [`${de} w-[95%] sm:w-[50%] md:max-w-2xl`]: s === J && !e,
189
+ [`${e}`]: !!e,
190
+ "sm:border-border-dark": a === "dark" && s === P,
191
+ "sm:border-border-accent": a === "light" && s === P,
192
+ "border-border-dark": a === "dark" && s === J,
193
+ "border-border-accent": a === "light" && s === J
194
+ }),
194
195
  content: "flex flex-grow flex-col py-2 sm:py-4 px-4",
195
196
  footer: "flex flex-grow flex-col p-4",
196
197
  header: "p-4 mb-0",
197
198
  close: "p-4"
198
- }), j = (e) => it(
199
- () => import("./index.DruzEDnN.C6Ffe-lT.js").then((s) => ({
199
+ }), K = (e) => it(
200
+ () => import("./index.BcV6McvW.De7qagut.js").then((s) => ({
200
201
  default: s[e]
201
202
  }))
202
- ), _t = j("Modal"), zt = j("ModalClose"), Bt = j("ModalContent"), Vt = j("ModalDescription"), Pt = j("ModalHeading"), K = ({
203
+ ), _t = K("Modal"), zt = K("ModalClose"), Bt = K("ModalContent"), Vt = K("ModalDescription"), Pt = K("ModalHeading"), Y = ({
203
204
  open: e,
204
205
  onOpenChange: s,
205
206
  title: a,
206
- children: r,
207
- footer: n,
207
+ children: n,
208
+ footer: r,
208
209
  borderMode: o = "light",
209
- kind: l = J
210
+ kind: l = P,
211
+ className: d
210
212
  }) => {
211
- const d = F(""), u = Ot({ kind: l, borderMode: o });
212
- return L(() => (e && (d.current = document.title, document.title = `${a} | ${d.current}`), () => {
213
- e && (document.title = d.current);
214
- }), [a, e]), /* @__PURE__ */ t(ct, { fallback: /* @__PURE__ */ t("div", {}), children: e && /* @__PURE__ */ t(_t, { open: e, onOpenChange: s, children: /* @__PURE__ */ c(Bt, { className: u.main, children: [
213
+ const h = G(""), m = Dt({ className: d, kind: l, borderMode: o });
214
+ return L(() => (e && (h.current = document.title, document.title = `${a} | ${h.current}`), () => {
215
+ e && (document.title = h.current);
216
+ }), [a, e]), /* @__PURE__ */ t(ct, { fallback: /* @__PURE__ */ t("div", {}), children: e && /* @__PURE__ */ t(_t, { open: e, onOpenChange: s, children: /* @__PURE__ */ c(Bt, { className: m.main, children: [
215
217
  /* @__PURE__ */ c("div", { className: "flex flex-row-reverse items-center justify-between", children: [
216
218
  /* @__PURE__ */ t(
217
219
  zt,
218
220
  {
219
- className: u.close,
221
+ className: m.close,
220
222
  trigger: /* @__PURE__ */ t(
221
- O,
223
+ D,
222
224
  {
223
225
  mode: "dark",
224
226
  focusMode: "light",
225
227
  noBorder: !0,
226
228
  label: "Close",
227
- children: /* @__PURE__ */ t(Dt, {})
229
+ children: /* @__PURE__ */ t(Ot, {})
228
230
  }
229
231
  )
230
232
  }
231
233
  ),
232
- /* @__PURE__ */ t(Pt, { className: u.header, children: a })
234
+ /* @__PURE__ */ t(Pt, { className: m.header, children: a })
233
235
  ] }),
234
- /* @__PURE__ */ t(Vt, { className: u.content, children: r }),
235
- n && /* @__PURE__ */ t("div", { className: u.footer, children: n })
236
+ /* @__PURE__ */ t(Vt, { className: m.content, children: n }),
237
+ r && /* @__PURE__ */ t("div", { className: m.footer, children: r })
236
238
  ] }) }) });
237
- }, Ft = () => E("peer", "h-6", "w-11", "rounded-full"), $t = ({
239
+ }, Ft = () => k("peer", "h-6", "w-11", "rounded-full"), Gt = ({
238
240
  focusMode: e
239
- }) => E(
241
+ }) => k(
240
242
  "peer-focus:outline",
241
243
  "peer-focus:outline-2",
242
244
  "peer-focus:outline-offset-2",
@@ -246,14 +248,14 @@ const Lt = ({ className: e, ...s }) => {
246
248
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
247
249
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
248
250
  }
249
- ), Gt = () => E(
251
+ ), $t = () => k(
250
252
  "peer-checked:after:translate-x-full",
251
253
  // background color when checked
252
254
  "peer-checked:bg-violet-500",
253
255
  // knob circle and border color when checked
254
256
  "peer-checked:after:bg-white",
255
257
  "peer-checked:after:border-white"
256
- ), Ut = () => E(
258
+ ), Ut = () => k(
257
259
  "after:left-[2px]",
258
260
  "after:top-[2px]",
259
261
  "after:border",
@@ -268,7 +270,7 @@ const Lt = ({ className: e, ...s }) => {
268
270
  ), jt = ({
269
271
  mode: e,
270
272
  noBorder: s
271
- }) => E({
273
+ }) => k({
272
274
  border: !s,
273
275
  "border-border-dark bg-surface-medium": e === "light",
274
276
  "border-border-light bg-surface-darker": e === "dark",
@@ -277,72 +279,72 @@ const Lt = ({ className: e, ...s }) => {
277
279
  }), Kt = ({
278
280
  mode: e,
279
281
  labelHidden: s
280
- }) => s ? "sr-only" : E("ml-2 text-sm", {
282
+ }) => s ? "sr-only" : k("ml-2 text-sm", {
281
283
  "text-copy-dark": e === "light",
282
284
  "text-copy-lighter": e === "dark",
283
285
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
284
286
  "text-copy-dark dark:text-copy-lighter": e === "system"
285
- }), Yt = ({ spacing: e }) => E(
286
- Oe,
287
+ }), Yt = ({ spacing: e }) => k(
288
+ De,
287
289
  "relative flex cursor-pointer items-center",
288
290
  _e(e)
289
291
  ), Wt = ({
290
292
  mode: e,
291
293
  focusMode: s,
292
294
  labelHidden: a,
293
- spacing: r,
294
- noBorder: n
295
+ spacing: n,
296
+ noBorder: r
295
297
  }) => ({
296
- toggle: E(
298
+ toggle: k(
297
299
  Ft(),
298
- jt({ mode: e, noBorder: n }),
299
- $t({ focusMode: s }),
300
+ jt({ mode: e, noBorder: r }),
301
+ Gt({ focusMode: s }),
300
302
  Ut(),
301
- Gt()
303
+ $t()
302
304
  ),
303
305
  label: Kt({ mode: e, labelHidden: a }),
304
306
  input: "peer sr-only",
305
- wrapper: Yt({ spacing: r })
307
+ wrapper: Yt({ spacing: n })
306
308
  }), Xt = ({
307
309
  checked: e = !1,
308
310
  onChange: s,
309
311
  label: a,
310
- labelHidden: r = !1,
311
- name: n,
312
+ labelHidden: n = !1,
313
+ name: r,
312
314
  mode: o = "system",
313
315
  focusMode: l = "system",
314
316
  spacing: d,
315
- noBorder: u = !1
317
+ noBorder: h = !1
316
318
  }) => {
317
- const f = Wt({
319
+ const m = Wt({
318
320
  mode: o,
319
321
  focusMode: l,
320
- labelHidden: r,
322
+ labelHidden: n,
321
323
  spacing: d,
322
- noBorder: u
323
- }), N = (m) => {
324
- s == null || s(m.target.checked);
324
+ noBorder: h
325
+ }), N = (u) => {
326
+ s == null || s(u.target.checked);
325
327
  };
326
- return /* @__PURE__ */ c("label", { className: f.wrapper, children: [
328
+ return /* @__PURE__ */ c("label", { className: m.wrapper, children: [
327
329
  /* @__PURE__ */ t(
328
330
  "input",
329
331
  {
330
- name: n,
332
+ name: r,
331
333
  checked: e,
332
334
  type: "checkbox",
333
- className: f.input,
335
+ className: m.input,
334
336
  onChange: N
335
337
  }
336
338
  ),
337
- /* @__PURE__ */ t("div", { className: f.toggle }),
338
- /* @__PURE__ */ t("span", { className: f.label, children: a })
339
+ /* @__PURE__ */ t("div", { className: m.toggle }),
340
+ /* @__PURE__ */ t("span", { className: m.label, children: a })
339
341
  ] });
340
342
  }, Jt = ({
341
343
  className: e,
342
344
  viewBox: s,
343
345
  spacing: a,
344
- title: r,
345
- monotone: n,
346
+ title: n,
347
+ monotone: r,
346
348
  ...o
347
349
  }) => /* @__PURE__ */ c(
348
350
  A,
@@ -352,13 +354,13 @@ const Lt = ({ className: e, ...s }) => {
352
354
  viewBox: s,
353
355
  className: e,
354
356
  spacing: a,
355
- title: r || "Back",
357
+ title: n || "Back",
356
358
  ...o,
357
359
  children: [
358
360
  /* @__PURE__ */ t(
359
361
  "path",
360
362
  {
361
- opacity: n ? "1" : "0.4",
363
+ opacity: r ? "1" : "0.4",
362
364
  d: "M288.4 93.4c2.9-17.4 19.4-29.2 36.9-26.3C431.3 84.9 512 177 512 288c0 123.7-100.3 224-224 224C177 512 84.9 431.3 67.1 325.3c-2.9-17.4 8.8-33.9 26.3-36.9s33.9 8.8 36.9 26.3C142.9 390.4 208.8 448 288 448c88.4 0 160-71.6 160-160c0-79.2-57.6-145.1-133.3-157.8c-17.4-2.9-29.2-19.4-26.3-36.9z"
363
365
  }
364
366
  ),
@@ -369,8 +371,8 @@ const Lt = ({ className: e, ...s }) => {
369
371
  className: e,
370
372
  viewBox: s,
371
373
  spacing: a,
372
- title: r,
373
- monotone: n,
374
+ title: n,
375
+ monotone: r,
374
376
  ...o
375
377
  }) => /* @__PURE__ */ c(
376
378
  A,
@@ -380,13 +382,13 @@ const Lt = ({ className: e, ...s }) => {
380
382
  viewBox: s,
381
383
  className: e,
382
384
  spacing: a,
383
- title: r || "Chart",
385
+ title: n || "Chart",
384
386
  ...o,
385
387
  children: [
386
388
  /* @__PURE__ */ t(
387
389
  "path",
388
390
  {
389
- opacity: n ? "1" : "0.4",
391
+ opacity: r ? "1" : "0.4",
390
392
  d: "M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80z"
391
393
  }
392
394
  ),
@@ -397,8 +399,8 @@ const Lt = ({ className: e, ...s }) => {
397
399
  className: e,
398
400
  viewBox: s,
399
401
  spacing: a,
400
- title: r,
401
- monotone: n,
402
+ title: n,
403
+ monotone: r,
402
404
  ...o
403
405
  }) => /* @__PURE__ */ c(
404
406
  A,
@@ -408,13 +410,13 @@ const Lt = ({ className: e, ...s }) => {
408
410
  viewBox: s,
409
411
  className: e,
410
412
  spacing: a,
411
- title: r || "Delete",
413
+ title: n || "Delete",
412
414
  ...o,
413
415
  children: [
414
416
  /* @__PURE__ */ t(
415
417
  "path",
416
418
  {
417
- opacity: n ? "1" : "0.4",
419
+ opacity: r ? "1" : "0.4",
418
420
  d: "M416 96H32V448c0 35.3 28.7 64 64 64H352c35.3 0 64-28.7 64-64V96zM144 176V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16z"
419
421
  }
420
422
  ),
@@ -425,8 +427,8 @@ const Lt = ({ className: e, ...s }) => {
425
427
  className: e,
426
428
  viewBox: s,
427
429
  spacing: a,
428
- title: r,
429
- monotone: n,
430
+ title: n,
431
+ monotone: r,
430
432
  ...o
431
433
  }) => /* @__PURE__ */ c(
432
434
  A,
@@ -436,13 +438,13 @@ const Lt = ({ className: e, ...s }) => {
436
438
  viewBox: s,
437
439
  className: e,
438
440
  spacing: a,
439
- title: r || "History",
441
+ title: n || "History",
440
442
  ...o,
441
443
  children: [
442
444
  /* @__PURE__ */ t(
443
445
  "path",
444
446
  {
445
- opacity: n ? "1" : "0.4",
447
+ opacity: r ? "1" : "0.4",
446
448
  d: "M120.2 120.2C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24H134.1c21.4 0 32.1-25.9 17-41l-30.8-30.8z"
447
449
  }
448
450
  ),
@@ -453,8 +455,8 @@ const Lt = ({ className: e, ...s }) => {
453
455
  className: e,
454
456
  viewBox: s,
455
457
  spacing: a,
456
- title: r,
457
- monotone: n,
458
+ title: n,
459
+ monotone: r,
458
460
  ...o
459
461
  }) => /* @__PURE__ */ c(
460
462
  A,
@@ -464,7 +466,7 @@ const Lt = ({ className: e, ...s }) => {
464
466
  viewBox: s,
465
467
  className: e,
466
468
  spacing: a,
467
- title: r || "Info",
469
+ title: n || "Info",
468
470
  ...o,
469
471
  children: [
470
472
  /* @__PURE__ */ t(
@@ -481,8 +483,8 @@ const Lt = ({ className: e, ...s }) => {
481
483
  className: e,
482
484
  viewBox: s,
483
485
  spacing: a,
484
- title: r,
485
- monotone: n,
486
+ title: n,
487
+ monotone: r,
486
488
  ...o
487
489
  }) => /* @__PURE__ */ c(
488
490
  A,
@@ -492,7 +494,7 @@ const Lt = ({ className: e, ...s }) => {
492
494
  viewBox: s,
493
495
  className: e,
494
496
  spacing: a,
495
- title: r || "Profile",
497
+ title: n || "Profile",
496
498
  ...o,
497
499
  children: [
498
500
  /* @__PURE__ */ t(
@@ -505,12 +507,12 @@ const Lt = ({ className: e, ...s }) => {
505
507
  /* @__PURE__ */ t("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
506
508
  ]
507
509
  }
508
- ), me = ({
510
+ ), pe = ({
509
511
  className: e,
510
512
  viewBox: s,
511
513
  spacing: a,
512
- title: r,
513
- monotone: n,
514
+ title: n,
515
+ monotone: r,
514
516
  ...o
515
517
  }) => /* @__PURE__ */ c(
516
518
  A,
@@ -520,14 +522,14 @@ const Lt = ({ className: e, ...s }) => {
520
522
  viewBox: s,
521
523
  className: e,
522
524
  spacing: a,
523
- title: r || "Refresh",
525
+ title: n || "Refresh",
524
526
  ...o,
525
527
  children: [
526
528
  /* @__PURE__ */ t(
527
529
  "path",
528
530
  {
529
531
  className: "fa-secondary",
530
- opacity: n ? "1" : "0.4",
532
+ opacity: r ? "1" : "0.4",
531
533
  d: "M80 396.9V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V320c0-17.7 14.3-32 32-32H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H125.6l17.2 17.1c62.5 62.5 163.8 62.5 226.3 0c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.5 87.5-229.3 87.5-316.7 0L80 396.9z"
532
534
  }
533
535
  ),
@@ -544,8 +546,8 @@ const Lt = ({ className: e, ...s }) => {
544
546
  className: e,
545
547
  viewBox: s,
546
548
  spacing: a,
547
- title: r,
548
- monotone: n,
549
+ title: n,
550
+ monotone: r,
549
551
  ...o
550
552
  }) => /* @__PURE__ */ c(
551
553
  A,
@@ -555,13 +557,13 @@ const Lt = ({ className: e, ...s }) => {
555
557
  viewBox: s,
556
558
  className: e,
557
559
  spacing: a,
558
- title: r || "Restore",
560
+ title: n || "Restore",
559
561
  ...o,
560
562
  children: [
561
563
  /* @__PURE__ */ t(
562
564
  "path",
563
565
  {
564
- opacity: n ? "1" : "0.4",
566
+ opacity: r ? "1" : "0.4",
565
567
  d: "M208 64H432c8.8 0 16 7.2 16 16V304c0 8.8-7.2 16-16 16H416v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80V96h64V80c0-8.8 7.2-16 16-16z"
566
568
  }
567
569
  ),
@@ -572,8 +574,8 @@ const Lt = ({ className: e, ...s }) => {
572
574
  className: e,
573
575
  viewBox: s,
574
576
  spacing: a,
575
- title: r,
576
- monotone: n,
577
+ title: n,
578
+ monotone: r,
577
579
  ...o
578
580
  }) => /* @__PURE__ */ t(
579
581
  A,
@@ -583,7 +585,7 @@ const Lt = ({ className: e, ...s }) => {
583
585
  viewBox: s,
584
586
  className: e,
585
587
  spacing: a,
586
- title: r || "Settings",
588
+ title: n || "Settings",
587
589
  ...o,
588
590
  children: /* @__PURE__ */ t("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
589
591
  }
@@ -591,17 +593,17 @@ const Lt = ({ className: e, ...s }) => {
591
593
  function $(e) {
592
594
  return lt();
593
595
  }
594
- const rs = ({ stats: e }) => {
595
- const s = (e == null ? void 0 : e.plugins) || [], a = (e == null ? void 0 : e.version) || "", r = (e == null ? void 0 : e.models) || [], n = $(), o = $();
596
+ const ns = ({ stats: e }) => {
597
+ const s = (e == null ? void 0 : e.plugins) || [], a = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], r = $(), o = $();
596
598
  return /* @__PURE__ */ c(w, { children: [
597
599
  /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
598
600
  _,
599
601
  {
600
602
  header: C.ABOUT.TITLE_CLIENT,
601
603
  className: "prose-dark dark:prose-lighter",
602
- children: P(n, {
603
- [C.ABOUT.VERSION]: "3.4.2",
604
- [C.ABOUT.BUILD_TIMESTAMP]: "07/18/2024 12:59 PM EDT"
604
+ children: F(r, {
605
+ [C.ABOUT.VERSION]: "3.4.4",
606
+ [C.ABOUT.BUILD_TIMESTAMP]: "08/01/2024 08:14 AM EDT"
605
607
  })
606
608
  }
607
609
  ) }),
@@ -610,30 +612,30 @@ const rs = ({ stats: e }) => {
610
612
  {
611
613
  header: C.ABOUT.TITLE_SERVER,
612
614
  className: "prose-dark dark:prose-lighter",
613
- children: P(o, {
615
+ children: F(o, {
614
616
  [C.ABOUT.VERSION]: a,
615
- [q(C.ABOUT.ENGINE, r.length)]: /* @__PURE__ */ t(w, { children: r.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) }),
616
- [q(C.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ t(w, { children: s.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) })
617
+ [Q(C.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ t(w, { children: n.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) }),
618
+ [Q(C.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ t(w, { children: s.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) })
617
619
  })
618
620
  }
619
621
  )
620
622
  ] });
621
- }, ns = ({
623
+ }, rs = ({
622
624
  open: e,
623
625
  onOpenChange: s
624
626
  }) => {
625
- const { serverStats: a } = R(U);
626
- return /* @__PURE__ */ t(K, { open: e, onOpenChange: s, title: ze, children: /* @__PURE__ */ t(rs, { stats: a }) });
627
- }, os = (e) => fe(e), cs = (e) => {
627
+ const { serverStats: a } = R(j);
628
+ return /* @__PURE__ */ t(Y, { open: e, onOpenChange: s, title: ze, children: /* @__PURE__ */ t(ns, { stats: a }) });
629
+ }, os = (e) => Ce(e), cs = (e) => {
628
630
  if (!e || e.length === 0)
629
631
  return Pe;
630
632
  const s = e.filter(
631
633
  (a) => {
632
- var r, n;
633
- return ((r = a == null ? void 0 : a.message) == null ? void 0 : r.role) === Fe && typeof ((n = a == null ? void 0 : a.message) == null ? void 0 : n.processingTime) == "number";
634
+ var n, r;
635
+ return ((n = a == null ? void 0 : a.message) == null ? void 0 : n.role) === Fe && typeof ((r = a == null ? void 0 : a.message) == null ? void 0 : r.processingTime) == "number";
634
636
  }
635
637
  ).map((a) => a.message.processingTime);
636
- return $e({
638
+ return Ge({
637
639
  data: s,
638
640
  formatter: os
639
641
  });
@@ -641,17 +643,17 @@ const rs = ({ stats: e }) => {
641
643
  isAuthenticated: e,
642
644
  stats: s
643
645
  }) => {
644
- const { state: a } = R(U), r = Ge - Number(a == null ? void 0 : a.usage), n = $(), o = $();
646
+ const { state: a } = R(j), n = $e - Number(a == null ? void 0 : a.usage), r = $(), o = $();
645
647
  return e ? /* @__PURE__ */ c(w, { children: [
646
648
  a && a.messages.length > 0 && /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
647
649
  _,
648
650
  {
649
651
  header: C.CURRENT_STATISTICS.TITLE,
650
652
  className: "prose-dark dark:prose-lighter",
651
- children: P(n, {
653
+ children: F(r, {
652
654
  [C.CURRENT_STATISTICS.MODEL_NAME]: (a == null ? void 0 : a.model) || Be,
653
655
  [C.CURRENT_STATISTICS.TOKENS_USED]: a == null ? void 0 : a.usage,
654
- [C.CURRENT_STATISTICS.REMAINING_TOKENS]: Ve.format(r),
656
+ [C.CURRENT_STATISTICS.REMAINING_TOKENS]: Ve.format(n),
655
657
  [C.CURRENT_STATISTICS.PROCESSING_TIME]: cs(a == null ? void 0 : a.messages)
656
658
  })
657
659
  }
@@ -661,9 +663,9 @@ const rs = ({ stats: e }) => {
661
663
  {
662
664
  header: C.MAIN_STATISTICS.TITLE,
663
665
  className: "prose-dark dark:prose-lighter",
664
- children: P(o, {
665
- [q(C.MAIN_STATISTICS.TOTAL, s.totalChats)]: s.totalChats,
666
- [C.MAIN_STATISTICS.PROCESSING_TIME]: fe(
666
+ children: F(o, {
667
+ [Q(C.MAIN_STATISTICS.TOTAL, s.totalChats)]: s.totalChats,
668
+ [C.MAIN_STATISTICS.PROCESSING_TIME]: Ce(
667
669
  s.averageProcessingTimes
668
670
  )
669
671
  })
@@ -674,41 +676,41 @@ const rs = ({ stats: e }) => {
674
676
  open: e,
675
677
  onOpenChange: s
676
678
  }) => {
677
- const [a, r] = T({
679
+ const [a, n] = T({
678
680
  averageProcessingTimes: 0,
679
681
  totalChats: 0
680
- }), { isAuthenticated: n, getAccessToken: o, user: l } = G();
682
+ }), { isAuthenticated: r, getAccessToken: o, user: l } = U();
681
683
  return L(() => {
682
684
  !e || !l || (async () => {
683
685
  try {
684
- const d = await te({
686
+ const d = await se({
685
687
  accessToken: await o(),
686
- type: se.GET_CHATS_STATS,
688
+ type: ae.GET_CHATS_STATS,
687
689
  params: {
688
690
  userId: l.username
689
691
  }
690
692
  });
691
- d.status === 200 && r(d.data);
693
+ d.status === 200 && n(d.data);
692
694
  } catch {
693
695
  }
694
696
  })();
695
- }, [e, o, l]), /* @__PURE__ */ t(K, { open: e, onOpenChange: s, title: ge, children: /* @__PURE__ */ t(is, { isAuthenticated: n, stats: a }) });
696
- }, Ee = ({
697
+ }, [e, o, l]), /* @__PURE__ */ t(Y, { open: e, onOpenChange: s, title: Ne, children: /* @__PURE__ */ t(is, { isAuthenticated: r, stats: a }) });
698
+ }, xe = ({
697
699
  showConfirmation: e,
698
700
  setShowConfirmation: s,
699
701
  action: a,
700
- children: r,
701
- customStrings: n
702
+ children: n,
703
+ customStrings: r
702
704
  }) => /* @__PURE__ */ t(
703
- K,
705
+ Y,
704
706
  {
705
707
  kind: "messagebox",
706
708
  open: e,
707
709
  onOpenChange: s,
708
- title: n.title,
709
- footer: /* @__PURE__ */ c(X, { columnGap: 2, alignHorizontal: "flex-end", children: [
710
+ title: r.title,
711
+ footer: /* @__PURE__ */ c(q, { columnGap: 2, alignHorizontal: "flex-end", children: [
710
712
  /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
711
- Q,
713
+ Z,
712
714
  {
713
715
  mode: "dark",
714
716
  variant: "secondary",
@@ -716,11 +718,11 @@ const rs = ({ stats: e }) => {
716
718
  onClick: () => {
717
719
  s(!1);
718
720
  },
719
- children: n.cancelAction
721
+ children: r.cancelAction
720
722
  }
721
723
  ) }),
722
724
  /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
723
- Q,
725
+ Z,
724
726
  {
725
727
  mode: "dark",
726
728
  variant: "danger",
@@ -728,87 +730,87 @@ const rs = ({ stats: e }) => {
728
730
  onClick: () => {
729
731
  s(!1), a();
730
732
  },
731
- children: n.confirmAction
733
+ children: r.confirmAction
732
734
  }
733
735
  ) })
734
736
  ] }),
735
- children: r
737
+ children: n
736
738
  }
737
739
  );
738
- var ds = typeof window < "u", us = function(e, s) {
740
+ var ds = typeof window < "u", ms = function(e, s) {
739
741
  return ds ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
740
- }, ms = function(e, s) {
741
- var a = T(us(e)), r = a[0], n = a[1];
742
+ }, us = function(e, s) {
743
+ var a = T(ms(e)), n = a[0], r = a[1];
742
744
  return L(function() {
743
745
  var o = !0, l = window.matchMedia(e), d = function() {
744
- o && n(!!l.matches);
746
+ o && r(!!l.matches);
745
747
  };
746
- return l.addEventListener("change", d), n(l.matches), function() {
748
+ return l.addEventListener("change", d), r(l.matches), function() {
747
749
  o = !1, l.removeEventListener("change", d);
748
750
  };
749
- }, [e]), r;
751
+ }, [e]), n;
750
752
  };
751
- const hs = async (e, s, a, r) => {
753
+ const hs = async (e, s, a, n) => {
752
754
  try {
753
- const n = await te({
754
- accessToken: r,
755
- type: se.GET_CHAT,
755
+ const r = await se({
756
+ accessToken: n,
757
+ type: ae.GET_CHAT,
756
758
  params: {
757
759
  id: e.id
758
760
  }
759
761
  });
760
- n.status === 200 && (s({
762
+ r.status === 200 && (s({
761
763
  type: je
762
764
  }), s({
763
765
  type: Ke,
764
766
  payload: {
765
767
  id: e.id,
766
- model: n.data.model,
767
- usage: n.data.usage,
768
- messages: n.data.messages
768
+ model: r.data.model,
769
+ usage: r.data.usage,
770
+ messages: r.data.messages
769
771
  }
770
772
  }), a(!1));
771
773
  } catch {
772
774
  }
773
- }, he = (e) => {
775
+ }, fe = (e) => {
774
776
  const s = e[0];
775
777
  return Ye(s == null ? void 0 : s.content, 100);
776
778
  }, ps = ({
777
779
  filteredHistory: e,
778
780
  setFilteredHistory: s,
779
781
  setFullHistory: a,
780
- dispatch: r,
781
- onOpenChange: n
782
+ dispatch: n,
783
+ onOpenChange: r
782
784
  }) => {
783
785
  var i;
784
- const { user: o, getAccessToken: l } = G(), d = F({
786
+ const { user: o, getAccessToken: l } = U(), d = G({
785
787
  id: 0,
786
788
  timestamp: "",
787
789
  message: ""
788
- }), [u, f] = T(!1), N = ms("(min-width: 480px)"), { state: m, dispatch: y } = R(Ne), [, b] = ee({
789
- key: Z + Ue,
790
- initialValue: m.sortDirection
790
+ }), [h, m] = T(!1), N = us("(min-width: 480px)"), { state: u, dispatch: y } = R(ye), [, b] = te({
791
+ key: ee + Ue,
792
+ initialValue: u.sortDirection
791
793
  }), S = e.data.sort(
792
- (h, g) => {
793
- switch (m.sortedCell) {
794
+ (p, g) => {
795
+ switch (u.sortedCell) {
794
796
  case "timestamp":
795
- if (m.sortDirection === v.ASC)
796
- return new Date(h[m.sortedCell]).getTime() - new Date(g[m.sortedCell]).getTime();
797
- if (m.sortDirection === v.DESC)
798
- return new Date(g[m.sortedCell]).getTime() - new Date(h[m.sortedCell]).getTime();
797
+ if (u.sortDirection === v.ASC)
798
+ return new Date(p[u.sortedCell]).getTime() - new Date(g[u.sortedCell]).getTime();
799
+ if (u.sortDirection === v.DESC)
800
+ return new Date(g[u.sortedCell]).getTime() - new Date(p[u.sortedCell]).getTime();
799
801
  break;
800
802
  default:
801
803
  return 0;
802
804
  }
803
805
  return 0;
804
806
  }
805
- ), p = (h) => {
806
- switch (m.sortDirection) {
807
+ ), f = (p) => {
808
+ switch (u.sortDirection) {
807
809
  case !1:
808
810
  b(v.ASC), y({
809
811
  type: re,
810
812
  payload: {
811
- sortedCell: h,
813
+ sortedCell: p,
812
814
  sortDirection: v.ASC
813
815
  }
814
816
  });
@@ -817,7 +819,7 @@ const hs = async (e, s, a, r) => {
817
819
  b(v.DESC), y({
818
820
  type: re,
819
821
  payload: {
820
- sortedCell: h,
822
+ sortedCell: p,
821
823
  sortDirection: v.DESC
822
824
  }
823
825
  });
@@ -826,7 +828,7 @@ const hs = async (e, s, a, r) => {
826
828
  b(v.ASC), y({
827
829
  type: re,
828
830
  payload: {
829
- sortedCell: h,
831
+ sortedCell: p,
830
832
  sortDirection: v.ASC
831
833
  }
832
834
  });
@@ -835,19 +837,19 @@ const hs = async (e, s, a, r) => {
835
837
  };
836
838
  return /* @__PURE__ */ c(w, { children: [
837
839
  /* @__PURE__ */ c(
838
- Ee,
840
+ xe,
839
841
  {
840
- showConfirmation: u,
841
- setShowConfirmation: f,
842
+ showConfirmation: h,
843
+ setShowConfirmation: m,
842
844
  action: async () => {
843
- const h = d.current;
845
+ const p = d.current;
844
846
  try {
845
- const g = await te({
847
+ const g = await se({
846
848
  accessToken: await l(),
847
- type: se.DELETE_CHAT,
849
+ type: ae.DELETE_CHAT,
848
850
  params: {
849
851
  userId: (o == null ? void 0 : o.username) || "",
850
- id: h.id
852
+ id: p.id
851
853
  }
852
854
  });
853
855
  g.status === 200 && (a(g.data), s({ data: g.data }));
@@ -876,18 +878,18 @@ const hs = async (e, s, a, r) => {
876
878
  ]
877
879
  }
878
880
  ),
879
- /* @__PURE__ */ c(ut, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
880
- /* @__PURE__ */ t(mt, { children: /* @__PURE__ */ c(ne, { children: [
881
+ /* @__PURE__ */ c(mt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
882
+ /* @__PURE__ */ t(ut, { children: /* @__PURE__ */ c(oe, { children: [
881
883
  N && /* @__PURE__ */ t(H, { className: "sr-only", children: "Row" }),
882
884
  /* @__PURE__ */ t(
883
885
  ht,
884
886
  {
885
887
  cellId: "timestamp",
886
888
  align: "left",
887
- sortDirection: m.sortDirection,
888
- sortedCell: m.sortedCell,
889
+ sortDirection: u.sortDirection,
890
+ sortedCell: u.sortedCell,
889
891
  onClick: () => {
890
- p("timestamp");
892
+ f("timestamp");
891
893
  },
892
894
  children: "Date"
893
895
  }
@@ -895,9 +897,9 @@ const hs = async (e, s, a, r) => {
895
897
  /* @__PURE__ */ t(H, { children: "First message" }),
896
898
  /* @__PURE__ */ t(H, { className: "text-right", children: "Actions" })
897
899
  ] }) }),
898
- /* @__PURE__ */ t(pt, { children: S.map((h, g) => {
900
+ /* @__PURE__ */ t(pt, { children: S.map((p, g) => {
899
901
  var x;
900
- return ((x = h == null ? void 0 : h.messages) == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ c(ne, { children: [
902
+ return ((x = p == null ? void 0 : p.messages) == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ c(oe, { children: [
901
903
  N && /* @__PURE__ */ t(H, { children: g + 1 }),
902
904
  /* @__PURE__ */ t(
903
905
  H,
@@ -905,13 +907,13 @@ const hs = async (e, s, a, r) => {
905
907
  component: "th",
906
908
  scope: "row",
907
909
  className: "font-medium text-gray-400 sm:whitespace-nowrap",
908
- children: h.timestamp
910
+ children: p.timestamp
909
911
  }
910
912
  ),
911
- /* @__PURE__ */ t(H, { className: "max-w-[100px] text-white sm:max-w-full", children: he(h.messages) }),
913
+ /* @__PURE__ */ t(H, { className: "max-w-[100px] text-white sm:max-w-full", children: fe(p.messages) }),
912
914
  /* @__PURE__ */ t(H, { children: /* @__PURE__ */ c("div", { className: "flex justify-end gap-2", children: [
913
915
  /* @__PURE__ */ t(
914
- O,
916
+ D,
915
917
  {
916
918
  focusMode: "alt-system",
917
919
  noBorder: !0,
@@ -919,9 +921,9 @@ const hs = async (e, s, a, r) => {
919
921
  onClick: async () => {
920
922
  const z = await l();
921
923
  hs(
922
- h,
923
- r,
924
+ p,
924
925
  n,
926
+ r,
925
927
  z
926
928
  );
927
929
  },
@@ -929,35 +931,35 @@ const hs = async (e, s, a, r) => {
929
931
  }
930
932
  ),
931
933
  /* @__PURE__ */ t(
932
- O,
934
+ D,
933
935
  {
934
936
  focusMode: "alt-system",
935
937
  noBorder: !0,
936
938
  label: "Delete chat",
937
939
  onClick: () => {
938
940
  d.current = {
939
- id: h.id,
940
- timestamp: h.timestamp,
941
- message: he(h.messages)
942
- }, f(!u);
941
+ id: p.id,
942
+ timestamp: p.timestamp,
943
+ message: fe(p.messages)
944
+ }, m(!h);
943
945
  },
944
946
  children: /* @__PURE__ */ t("div", { className: "text-red-400", children: /* @__PURE__ */ t(Qt, { className: "h-3 w-3", monotone: !0 }) })
945
947
  }
946
948
  )
947
949
  ] }) })
948
- ] }, `${C.HISTORY.TITLE}-${h.id}-${g}`) : null;
950
+ ] }, `${C.HISTORY.TITLE}-${p.id}-${g}`) : null;
949
951
  }) }),
950
- /* @__PURE__ */ t(ft, { children: /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(H, { colSpan: 4, children: /* @__PURE__ */ t("div", { children: q(
952
+ /* @__PURE__ */ t(ft, { children: /* @__PURE__ */ t(oe, { children: /* @__PURE__ */ t(H, { colSpan: 4, children: /* @__PURE__ */ t("div", { children: Q(
951
953
  `${e.data.length} chat`,
952
954
  e.data.length
953
955
  ) }) }) }) })
954
956
  ] })
955
957
  ] });
956
958
  };
957
- function pe(e, s) {
959
+ function ge(e, s) {
958
960
  return s ? e.filter(
959
961
  (a) => a.messages.some(
960
- (r) => r.content !== null && r.content.toLowerCase().includes(s.toLowerCase())
962
+ (n) => n.content !== null && n.content.toLowerCase().includes(s.toLowerCase())
961
963
  )
962
964
  ) : e;
963
965
  }
@@ -965,37 +967,37 @@ const fs = ({
965
967
  onOpenChange: e,
966
968
  historyData: s
967
969
  }) => {
968
- const { isAuthenticated: a } = G(), r = F(null), { dispatch: n } = R(U), { state: o, dispatch: l } = R(Ne), [, d] = ee({
969
- key: Z + We,
970
+ const { isAuthenticated: a } = U(), n = G(null), { dispatch: r } = R(j), { state: o, dispatch: l } = R(ye), [, d] = te({
971
+ key: ee + We,
970
972
  initialValue: o.searchString
971
- }), [u, f] = T(s), [N, m] = T({
972
- data: u
973
- }), y = (p) => {
974
- const k = pe(u, p);
975
- m({
976
- data: k
977
- }), d(p), l({
973
+ }), [h, m] = T(s), [N, u] = T({
974
+ data: h
975
+ }), y = (f) => {
976
+ const E = ge(h, f);
977
+ u({
978
+ data: E
979
+ }), d(f), l({
978
980
  type: Je,
979
- payload: { searchString: p }
981
+ payload: { searchString: f }
980
982
  });
981
- }, b = (p) => {
982
- y(p.target.value);
983
- }, S = async (p) => {
984
- p.preventDefault();
983
+ }, b = (f) => {
984
+ y(f.target.value);
985
+ }, S = async (f) => {
986
+ f.preventDefault();
985
987
  };
986
988
  return L(() => {
987
- const p = pe(
988
- u,
989
+ const f = ge(
990
+ h,
989
991
  o.searchString
990
992
  );
991
- m({
992
- data: p
993
+ u({
994
+ data: f
993
995
  });
994
- }, [u, o.searchString]), a ? N && N.data && /* @__PURE__ */ c(w, { children: [
996
+ }, [h, o.searchString]), a ? N && N.data && /* @__PURE__ */ c(w, { children: [
995
997
  /* @__PURE__ */ t("form", { autoComplete: "off", onSubmit: S, children: /* @__PURE__ */ t(
996
998
  Xe,
997
999
  {
998
- ref: r,
1000
+ ref: n,
999
1001
  defaultValue: o.searchString,
1000
1002
  focusMode: "light",
1001
1003
  name: "Search",
@@ -1004,15 +1006,15 @@ const fs = ({
1004
1006
  spacing: { t: 2, b: 2 },
1005
1007
  ...o.searchString && {
1006
1008
  rightElement: /* @__PURE__ */ t(
1007
- Q,
1009
+ Z,
1008
1010
  {
1009
1011
  disabled: !o.searchString,
1010
1012
  mode: "dark",
1011
1013
  noBorder: !0,
1012
1014
  size: "small",
1013
1015
  onClick: () => {
1014
- var p;
1015
- y(""), (p = r.current) != null && p.value && (r.current.value = "", r.current.focus());
1016
+ var f;
1017
+ y(""), (f = n.current) != null && f.value && (n.current.value = "", n.current.focus());
1016
1018
  },
1017
1019
  children: "Reset"
1018
1020
  }
@@ -1024,9 +1026,9 @@ const fs = ({
1024
1026
  ps,
1025
1027
  {
1026
1028
  filteredHistory: N,
1027
- setFilteredHistory: m,
1028
- setFullHistory: f,
1029
- dispatch: n,
1029
+ setFilteredHistory: u,
1030
+ setFullHistory: m,
1031
+ dispatch: r,
1030
1032
  onOpenChange: e
1031
1033
  }
1032
1034
  ) })
@@ -1035,18 +1037,18 @@ const fs = ({
1035
1037
  open: e,
1036
1038
  onOpenChange: s,
1037
1039
  historyData: a
1038
- }) => /* @__PURE__ */ t(K, { open: e, onOpenChange: s, title: qe, children: /* @__PURE__ */ t(fs, { onOpenChange: s, historyData: a }) }), Cs = () => {
1039
- const { isAuthenticated: e, user: s, registeringForPasskey: a, authenticationType: r } = G(), [n, o] = ee({
1040
- key: Z + Qe,
1040
+ }) => /* @__PURE__ */ t(Y, { open: e, onOpenChange: s, title: qe, children: /* @__PURE__ */ t(fs, { onOpenChange: s, historyData: a }) }), Cs = () => {
1041
+ const { isAuthenticated: e, user: s, registeringForPasskey: a, authenticationType: n } = U(), [r, o] = te({
1042
+ key: ee + Qe,
1041
1043
  initialValue: !1
1042
- }), [, l, d] = ee({
1043
- key: Z + Ze,
1044
+ }), [, l, d] = te({
1045
+ key: ee + Ze,
1044
1046
  initialValue: { latitude: 0, longitude: 0, accuracy: 0 }
1045
- }), [u, f] = T(!0), N = $(), { state: m, dispatch: y } = R(U), b = (s == null ? void 0 : s.username) || "", S = (i) => {
1047
+ }), [h, m] = T(!0), N = $(), { state: u, dispatch: y } = R(j), b = (s == null ? void 0 : s.username) || "", S = (i) => {
1046
1048
  o(i);
1047
- }, p = async () => {
1048
- f(!1), d(), y({
1049
- type: le,
1049
+ }, f = async () => {
1050
+ m(!1), d(), y({
1051
+ type: me,
1050
1052
  payload: {
1051
1053
  location: {
1052
1054
  latitude: 0,
@@ -1057,7 +1059,7 @@ const fs = ({
1057
1059
  });
1058
1060
  const i = await st();
1059
1061
  l(i), y({
1060
- type: le,
1062
+ type: me,
1061
1063
  payload: {
1062
1064
  location: i
1063
1065
  }
@@ -1065,15 +1067,15 @@ const fs = ({
1065
1067
  };
1066
1068
  L(() => {
1067
1069
  let i;
1068
- return u || (i = window.setTimeout(() => {
1069
- f(!0);
1070
+ return h || (i = window.setTimeout(() => {
1071
+ m(!0);
1070
1072
  }, 3e3)), () => {
1071
1073
  clearTimeout(i);
1072
1074
  };
1073
- }, [u]);
1074
- const k = (i) => {
1075
+ }, [h]);
1076
+ const E = (i) => {
1075
1077
  if (i != null && i.city && (i != null && i.country) && (i != null && i.region))
1076
- return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(X, { alignVertical: "center", columnGap: 4, children: [
1078
+ return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(q, { alignVertical: "center", columnGap: 4, children: [
1077
1079
  /* @__PURE__ */ c(M, { children: [
1078
1080
  /* @__PURE__ */ c("div", { className: "text-right", children: [
1079
1081
  i.city,
@@ -1083,29 +1085,29 @@ const fs = ({
1083
1085
  /* @__PURE__ */ t("div", { className: "text-right", children: i.country })
1084
1086
  ] }),
1085
1087
  /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
1086
- O,
1088
+ D,
1087
1089
  {
1088
- disabled: !u,
1090
+ disabled: !h,
1089
1091
  size: "small",
1090
1092
  className: "mt-2",
1091
- onClick: p,
1092
- children: /* @__PURE__ */ t(me, { className: "size-3", monotone: !0 })
1093
+ onClick: f,
1094
+ children: /* @__PURE__ */ t(pe, { className: "size-3", monotone: !0 })
1093
1095
  }
1094
1096
  ) })
1095
1097
  ] }) });
1096
- const h = at(i == null ? void 0 : i.latitude), g = rt(i == null ? void 0 : i.longitude);
1097
- return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(X, { alignVertical: "center", columnGap: 4, children: [
1098
+ const p = at(i == null ? void 0 : i.latitude), g = nt(i == null ? void 0 : i.longitude);
1099
+ return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(q, { alignVertical: "center", columnGap: 4, children: [
1098
1100
  /* @__PURE__ */ c(M, { children: [
1099
- /* @__PURE__ */ t("div", { children: h }),
1101
+ /* @__PURE__ */ t("div", { children: p }),
1100
1102
  /* @__PURE__ */ t("div", { children: g })
1101
1103
  ] }),
1102
1104
  /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(
1103
- O,
1105
+ D,
1104
1106
  {
1105
1107
  size: "small",
1106
1108
  className: "mt-2",
1107
- onClick: p,
1108
- children: /* @__PURE__ */ t(me, { className: "size-3", monotone: !0 })
1109
+ onClick: f,
1110
+ children: /* @__PURE__ */ t(pe, { className: "size-3", monotone: !0 })
1109
1111
  }
1110
1112
  ) })
1111
1113
  ] }) });
@@ -1116,7 +1118,7 @@ const fs = ({
1116
1118
  {
1117
1119
  header: C.PREFERENCES.TITLE,
1118
1120
  className: "prose-dark dark:prose-lighter",
1119
- children: P(N, {
1121
+ children: F(N, {
1120
1122
  [C.PREFERENCES.NAME]: b,
1121
1123
  // [CARDS.PREFERENCES.EMAIL]: endUser.email,
1122
1124
  [C.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ t(
@@ -1127,25 +1129,25 @@ const fs = ({
1127
1129
  label: C.PREFERENCES.ENGINE_DETAILS,
1128
1130
  name: C.PREFERENCES.ENGINE_DETAILS,
1129
1131
  onChange: S,
1130
- checked: n
1132
+ checked: r
1131
1133
  }
1132
1134
  ),
1133
- [C.PREFERENCES.LOCATION]: k(m == null ? void 0 : m.location)
1135
+ [C.PREFERENCES.LOCATION]: E(u == null ? void 0 : u.location)
1134
1136
  })
1135
1137
  }
1136
1138
  ),
1137
- r !== et.PASSKEY && /* @__PURE__ */ c(
1139
+ n !== et.PASSKEY && /* @__PURE__ */ c(
1138
1140
  _,
1139
1141
  {
1140
1142
  spacing: { t: 4 },
1141
1143
  className: "prose-dark dark:prose-lighter",
1142
- header: /* @__PURE__ */ t("h2", { className: "m-0", children: /* @__PURE__ */ c(X, { columnGap: 3, alignVertical: "center", children: [
1144
+ header: /* @__PURE__ */ t("h2", { className: "m-0", children: /* @__PURE__ */ c(q, { columnGap: 3, alignVertical: "center", children: [
1143
1145
  /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(tt, { className: "size-6 text-center" }) }),
1144
1146
  /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t("div", { children: "Passkey" }) })
1145
1147
  ] }) }),
1146
1148
  children: [
1147
1149
  "Sign in without a password using a passkey (face or fingerprint sign-in).",
1148
- /* @__PURE__ */ t(Q, { spacing: { t: 2 }, onClick: a, children: "Create a Passkey" })
1150
+ /* @__PURE__ */ t(Z, { spacing: { t: 2 }, onClick: a, children: "Create a Passkey" })
1149
1151
  ]
1150
1152
  }
1151
1153
  )
@@ -1153,31 +1155,31 @@ const fs = ({
1153
1155
  }, Ns = ({
1154
1156
  open: e,
1155
1157
  onOpenChange: s
1156
- }) => /* @__PURE__ */ t(K, { open: e, onOpenChange: s, title: nt, children: /* @__PURE__ */ t(Cs, {}) }), ks = () => {
1157
- const { state: e } = R(U), [s, a] = T(!1), [r, n] = T(!1), [o, l] = T(!1), [d, u] = T(!1), [f, N] = T([]), [m, y] = T(!1), [b, S] = T({
1158
+ }) => /* @__PURE__ */ t(Y, { open: e, onOpenChange: s, title: rt, children: /* @__PURE__ */ t(Cs, {}) }), Es = () => {
1159
+ const { state: e } = R(j), [s, a] = T(!1), [n, r] = T(!1), [o, l] = T(!1), [d, h] = T(!1), [m, N] = T([]), [u, y] = T(!1), [b, S] = T({
1158
1160
  done: !1,
1159
1161
  progress: !1,
1160
1162
  timestamp: Date.now()
1161
- }), { logout: p, getAccessToken: k, user: i } = G(), h = () => {
1163
+ }), { logout: f, getAccessToken: E, user: i } = U(), p = () => {
1162
1164
  a(!s);
1163
1165
  }, g = () => {
1164
- n(!r);
1166
+ r(!n);
1165
1167
  }, x = () => {
1166
1168
  l(!o);
1167
1169
  }, z = () => {
1168
- u(!d);
1169
- }, ae = async (I) => {
1170
- const W = Date.now();
1171
- if (I && !(!i || !e || b.progress || b.done === !0 && W - b.timestamp < 5e3)) {
1170
+ h(!d);
1171
+ }, ne = async (I) => {
1172
+ const X = Date.now();
1173
+ if (I && !(!i || !e || b.progress || b.done === !0 && X - b.timestamp < 5e3)) {
1172
1174
  S({
1173
1175
  done: !0,
1174
1176
  progress: !0,
1175
- timestamp: W
1177
+ timestamp: X
1176
1178
  });
1177
1179
  try {
1178
- const B = await te({
1179
- accessToken: await k(),
1180
- type: se.GET_CHATS,
1180
+ const B = await se({
1181
+ accessToken: await E(),
1182
+ type: ae.GET_CHATS,
1181
1183
  params: {
1182
1184
  userId: i.username
1183
1185
  }
@@ -1195,62 +1197,62 @@ const fs = ({
1195
1197
  });
1196
1198
  }
1197
1199
  }
1198
- }, Y = () => {
1199
- y(!m);
1200
+ }, W = () => {
1201
+ y(!u);
1200
1202
  };
1201
1203
  return /* @__PURE__ */ c(w, { children: [
1202
1204
  /* @__PURE__ */ t(
1203
- Ee,
1205
+ xe,
1204
1206
  {
1205
- showConfirmation: m,
1207
+ showConfirmation: u,
1206
1208
  setShowConfirmation: y,
1207
- action: p,
1209
+ action: f,
1208
1210
  customStrings: {
1209
- confirmAction: de,
1211
+ confirmAction: ue,
1210
1212
  cancelAction: "Cancel",
1211
- title: de
1213
+ title: ue
1212
1214
  },
1213
1215
  children: /* @__PURE__ */ t("p", { children: "Are you sure you want to log out?" })
1214
1216
  }
1215
1217
  ),
1216
1218
  /* @__PURE__ */ t(Ns, { open: s, onOpenChange: a }),
1217
- /* @__PURE__ */ t(ls, { open: r, onOpenChange: n }),
1219
+ /* @__PURE__ */ t(ls, { open: n, onOpenChange: r }),
1218
1220
  /* @__PURE__ */ t(
1219
1221
  gs,
1220
1222
  {
1221
1223
  open: o,
1222
1224
  onOpenChange: l,
1223
- historyData: f
1225
+ historyData: m
1224
1226
  }
1225
1227
  ),
1226
- /* @__PURE__ */ t(ns, { open: d, onOpenChange: u }),
1228
+ /* @__PURE__ */ t(rs, { open: d, onOpenChange: h }),
1227
1229
  /* @__PURE__ */ t("div", { className: "relative", children: /* @__PURE__ */ t("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ c(
1228
- we,
1230
+ Ee,
1229
1231
  {
1230
1232
  mode: "dark",
1231
1233
  focusMode: "light",
1232
- trigger: /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(as, {}) }),
1234
+ trigger: /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(as, {}) }),
1233
1235
  defaultPlacement: "bottom-end",
1234
- onOpenChange: ae,
1236
+ onOpenChange: ne,
1235
1237
  children: [
1236
1238
  /* @__PURE__ */ t(
1237
- D,
1239
+ O,
1238
1240
  {
1239
1241
  label: "Profile",
1240
- onClick: h,
1242
+ onClick: p,
1241
1243
  icon: /* @__PURE__ */ t(ts, {})
1242
1244
  }
1243
1245
  ),
1244
1246
  /* @__PURE__ */ t(
1245
- D,
1247
+ O,
1246
1248
  {
1247
- label: ge,
1249
+ label: Ne,
1248
1250
  onClick: g,
1249
1251
  icon: /* @__PURE__ */ t(qt, {})
1250
1252
  }
1251
1253
  ),
1252
1254
  /* @__PURE__ */ t(
1253
- D,
1255
+ O,
1254
1256
  {
1255
1257
  label: "History",
1256
1258
  onClick: x,
@@ -1258,7 +1260,7 @@ const fs = ({
1258
1260
  }
1259
1261
  ),
1260
1262
  /* @__PURE__ */ t(
1261
- D,
1263
+ O,
1262
1264
  {
1263
1265
  label: "About",
1264
1266
  onClick: z,
@@ -1268,10 +1270,10 @@ const fs = ({
1268
1270
  e && e.id && !e.isComponent && /* @__PURE__ */ c(w, { children: [
1269
1271
  /* @__PURE__ */ t(Lt, {}),
1270
1272
  /* @__PURE__ */ t(
1271
- D,
1273
+ O,
1272
1274
  {
1273
1275
  label: "Log out",
1274
- onClick: Y,
1276
+ onClick: W,
1275
1277
  icon: /* @__PURE__ */ t("div", { className: "text-red-700", children: /* @__PURE__ */ t(Jt, { monotone: !0 }) })
1276
1278
  }
1277
1279
  )
@@ -1282,5 +1284,5 @@ const fs = ({
1282
1284
  ] });
1283
1285
  };
1284
1286
  export {
1285
- ks as default
1287
+ Es as default
1286
1288
  };