@versini/sassysaint 6.6.11 → 7.0.1

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,12 +1,12 @@
1
1
  import { jsxs as i, jsx as e, Fragment as O } from "react/jsx-runtime";
2
- import { f as $, un as V, R as z, CARDS as N, renderDataAsList as de, pluralize as ue, ABOUT_TITLE as Qe, INFINITE_SCROLL_LIMIT as we, INFINITE_SCROLL_THRESHOLD as ve, LOCAL_STORAGE_PREFIX as ke, LOCAL_STORAGE_SORT as Ze, re as oe, ACTION_RESET as Je, ACTION_RESTORE as et, ACTION_SORT as Ae, LOCAL_STORAGE_SEARCH as tt, HISTORY_TITLE as rt, fe as be, C as X, ACTION_SEARCH as nt, debounce as at, M as ot, isElectron as st, L as q, j as P, l as Ie, durationFormatter as lt, PROFILE_TITLE as ct, PROMPTS_DESCRIPTION as it, DEFAULT_AI_ENGINE as dt, LOCAL_STORAGE_CHAT_DETAILS as ut, SETTINGS_TITLE as mt, ENGINE_OPENAI as W, ENGINE_ANTHROPIC as ee, APP_NAME as ht, getCurrentGeoLocation as ft, LOG_OUT as _e } from "./index.BiSTuu2f.js";
3
- import { i as me, useServerCapabilities as pt, Ze as ce, HistoryContext as Me, E as Ce, ConfirmationPanel as Pe, Ue as gt, je as yt, Fe as ge, Le as M, De as bt, $e as xt, p as kt, z as Ct, We as Et, serviceCall as se, SERVICE_TYPES as le, B as te, AppContext as Oe, useChatsHistory as Tt, useUserChatStats as Nt, useUserPreferences as ze, m as St, _e as wt, me as vt, R as re, P as At } from "./App.BO5ERHO6.js";
4
- import It, { useRef as v, useState as C, useContext as he, useCallback as Be, useEffect as F, Fragment as _t, useLayoutEffect as ne, useMemo as He, useId as Rt, useReducer as Lt } from "react";
2
+ import { f as $, un as V, R as z, CARDS as T, renderDataAsList as de, pluralize as ue, ABOUT_TITLE as qe, INFINITE_SCROLL_LIMIT as we, INFINITE_SCROLL_THRESHOLD as ve, LOCAL_STORAGE_PREFIX as ke, LOCAL_STORAGE_SORT as Qe, re as oe, ACTION_SORT as Ae, LOCAL_STORAGE_SEARCH as Ze, HISTORY_TITLE as Je, fe as ye, C as X, ACTION_SEARCH as et, debounce as tt, M as rt, isElectron as nt, L as q, j as P, l as Ie, durationFormatter as at, PROFILE_TITLE as ot, PROMPTS_DESCRIPTION as st, DEFAULT_AI_ENGINE as lt, LOCAL_STORAGE_CHAT_DETAILS as ct, SETTINGS_TITLE as it, ENGINE_OPENAI as W, ENGINE_ANTHROPIC as ee, APP_NAME as dt, getCurrentGeoLocation as ut, LOG_OUT as _e } from "./index.Dyd6jXma.js";
3
+ import { i as me, useServerCapabilities as mt, Ze as ce, HistoryContext as Me, E as Ce, ConfirmationPanel as Pe, Ue as ht, je as ft, Fe as pe, Le as M, De as pt, $e as gt, p as yt, z as bt, We as xt, serviceCall as se, SERVICE_TYPES as le, CHAT_RESTORE as kt, B as te, ChatContext as Ct, useChatsHistory as Et, useUserChatStats as Tt, useUserPreferences as Oe, m as Nt, _e as St, me as wt, R as re, P as vt } from "./App.CISJHSam.js";
4
+ import At, { useRef as v, useState as k, useContext as be, useCallback as ze, useEffect as F, Fragment as It, useLayoutEffect as ne, useMemo as Be, useId as _t, useReducer as Lt } from "react";
5
5
  import y from "clsx";
6
- const Mt = ({
6
+ const Rt = ({
7
7
  className: t,
8
- viewBox: a,
9
- title: o,
8
+ viewBox: o,
9
+ title: a,
10
10
  monotone: n,
11
11
  ...r
12
12
  }) => /* @__PURE__ */ i(
@@ -14,9 +14,9 @@ const Mt = ({
14
14
  {
15
15
  defaultViewBox: "0 0 512 512",
16
16
  size: "size-5",
17
- viewBox: a,
17
+ viewBox: o,
18
18
  className: t,
19
- title: o || "Back",
19
+ title: a || "Back",
20
20
  ...r,
21
21
  children: [
22
22
  /* @__PURE__ */ e(
@@ -29,10 +29,10 @@ const Mt = ({
29
29
  /* @__PURE__ */ e("path", { d: "M32 0h160c17.7 0 32 14.3 32 32s-14.3 32-32 32h-82.7l233.3 233.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32S0 209.7 0 192V32C0 14.3 14.3 0 32 0" })
30
30
  ]
31
31
  }
32
- ), Pt = ({
32
+ ), Mt = ({
33
33
  className: t,
34
- viewBox: a,
35
- title: o,
34
+ viewBox: o,
35
+ title: a,
36
36
  monotone: n,
37
37
  ...r
38
38
  }) => /* @__PURE__ */ i(
@@ -40,9 +40,9 @@ const Mt = ({
40
40
  {
41
41
  defaultViewBox: "0 0 448 512",
42
42
  size: "size-5",
43
- viewBox: a,
43
+ viewBox: o,
44
44
  className: t,
45
- title: o || "Delete",
45
+ title: a || "Delete",
46
46
  ...r,
47
47
  children: [
48
48
  /* @__PURE__ */ e(
@@ -55,10 +55,10 @@ const Mt = ({
55
55
  /* @__PURE__ */ e("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96l-7.2-14.3C307.4 6.8 296.3 0 284.2 0z" })
56
56
  ]
57
57
  }
58
- ), Ot = ({
58
+ ), Pt = ({
59
59
  className: t,
60
- viewBox: a,
61
- title: o,
60
+ viewBox: o,
61
+ title: a,
62
62
  monotone: n,
63
63
  ...r
64
64
  }) => /* @__PURE__ */ i(
@@ -66,9 +66,9 @@ const Mt = ({
66
66
  {
67
67
  defaultViewBox: "0 0 512 512",
68
68
  size: "size-5",
69
- viewBox: a,
69
+ viewBox: o,
70
70
  className: t,
71
- title: o || "History",
71
+ title: a || "History",
72
72
  ...r,
73
73
  children: [
74
74
  /* @__PURE__ */ e(
@@ -81,10 +81,10 @@ const Mt = ({
81
81
  /* @__PURE__ */ e("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
82
82
  ]
83
83
  }
84
- ), zt = ({
84
+ ), Ot = ({
85
85
  className: t,
86
- viewBox: a,
87
- title: o,
86
+ viewBox: o,
87
+ title: a,
88
88
  monotone: n,
89
89
  ...r
90
90
  }) => /* @__PURE__ */ i(
@@ -92,9 +92,9 @@ const Mt = ({
92
92
  {
93
93
  defaultViewBox: "0 0 512 512",
94
94
  size: "size-5",
95
- viewBox: a,
95
+ viewBox: o,
96
96
  className: t,
97
- title: o || "Info",
97
+ title: a || "Info",
98
98
  ...r,
99
99
  children: [
100
100
  /* @__PURE__ */ e(
@@ -107,10 +107,10 @@ const Mt = ({
107
107
  /* @__PURE__ */ e("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64m-64 120c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-80c-13.3 0-24-10.7-24-24s10.7-24 24-24h24v-64h-24c-13.3 0-24-10.7-24-24" })
108
108
  ]
109
109
  }
110
- ), Bt = ({
110
+ ), zt = ({
111
111
  className: t,
112
- viewBox: a,
113
- title: o,
112
+ viewBox: o,
113
+ title: a,
114
114
  monotone: n,
115
115
  ...r
116
116
  }) => /* @__PURE__ */ i(
@@ -118,9 +118,9 @@ const Mt = ({
118
118
  {
119
119
  defaultViewBox: "0 0 576 512",
120
120
  size: "size-5",
121
- viewBox: a,
121
+ viewBox: o,
122
122
  className: t,
123
- title: o || "Profile",
123
+ title: a || "Profile",
124
124
  ...r,
125
125
  children: [
126
126
  /* @__PURE__ */ e(
@@ -133,10 +133,10 @@ const Mt = ({
133
133
  /* @__PURE__ */ e("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128m-32 32c-44.2 0-80 35.8-80 80 0 8.8 7.2 16 16 16h192c8.8 0 16-7.2 16-16 0-44.2-35.8-80-80-80z" })
134
134
  ]
135
135
  }
136
- ), Ht = ({
136
+ ), Bt = ({
137
137
  className: t,
138
- viewBox: a,
139
- title: o,
138
+ viewBox: o,
139
+ title: a,
140
140
  monotone: n,
141
141
  ...r
142
142
  }) => /* @__PURE__ */ i(
@@ -144,9 +144,9 @@ const Mt = ({
144
144
  {
145
145
  defaultViewBox: "0 0 512 512",
146
146
  size: "size-5",
147
- viewBox: a,
147
+ viewBox: o,
148
148
  className: t,
149
- title: o || "Restore",
149
+ title: a || "Restore",
150
150
  ...r,
151
151
  children: [
152
152
  /* @__PURE__ */ e(
@@ -159,10 +159,10 @@ const Mt = ({
159
159
  /* @__PURE__ */ e("path", { d: "M64 128c-35.3 0-64 28.7-64 64v256c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zm32 64h192c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32" })
160
160
  ]
161
161
  }
162
- ), Dt = ({
162
+ ), Ht = ({
163
163
  className: t,
164
- viewBox: a,
165
- title: o,
164
+ viewBox: o,
165
+ title: a,
166
166
  monotone: n,
167
167
  ...r
168
168
  }) => /* @__PURE__ */ e(
@@ -170,16 +170,16 @@ const Mt = ({
170
170
  {
171
171
  defaultViewBox: "0 0 448 512",
172
172
  size: "size-5",
173
- viewBox: a,
173
+ viewBox: o,
174
174
  className: t,
175
- title: o || "Settings",
175
+ title: a || "Settings",
176
176
  ...r,
177
177
  children: /* @__PURE__ */ e("path", { d: "M432 256a48 48 0 1 1-96 0 48 48 0 1 1 96 0m-160 0a48 48 0 1 1-96 0 48 48 0 1 1 96 0M64 304a48 48 0 1 1 0-96 48 48 0 1 1 0 96" })
178
178
  }
179
- ), $t = ({
179
+ ), Dt = ({
180
180
  className: t,
181
- viewBox: a,
182
- title: o,
181
+ viewBox: o,
182
+ title: a,
183
183
  monotone: n,
184
184
  ...r
185
185
  }) => /* @__PURE__ */ i(
@@ -187,9 +187,9 @@ const Mt = ({
187
187
  {
188
188
  defaultViewBox: "0 0 512 512",
189
189
  size: "size-5",
190
- viewBox: a,
190
+ viewBox: o,
191
191
  className: t,
192
- title: o || "Sliders",
192
+ title: a || "Sliders",
193
193
  ...r,
194
194
  children: [
195
195
  /* @__PURE__ */ e(
@@ -202,43 +202,43 @@ const Mt = ({
202
202
  /* @__PURE__ */ e("path", { d: "M128 416a32 32 0 1 1 64 0 32 32 0 1 1-64 0m112 0a80 80 0 1 0-160 0 80 80 0 1 0 160 0m80-160a32 32 0 1 1 64 0 32 32 0 1 1-64 0m112 0a80 80 0 1 0-160 0 80 80 0 1 0 160 0M192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64m0-112a80 80 0 1 0 0 160 80 80 0 1 0 0-160" })
203
203
  ]
204
204
  }
205
- ), Vt = () => {
206
- const { getAccessToken: t } = V(), a = me(), o = me(), {
205
+ ), $t = () => {
206
+ const { getAccessToken: t } = V(), o = me(), a = me(), {
207
207
  data: n,
208
208
  error: r,
209
209
  isLoading: c
210
- } = pt({
210
+ } = mt({
211
211
  getAccessToken: t
212
212
  }), s = (n == null ? void 0 : n.plugins) || [], d = (n == null ? void 0 : n.version) || "", m = (n == null ? void 0 : n.models) || [];
213
213
  return /* @__PURE__ */ i(O, { children: [
214
214
  /* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e(
215
215
  z,
216
216
  {
217
- header: N.ABOUT.TITLE_CLIENT,
217
+ header: T.ABOUT.TITLE_CLIENT,
218
218
  className: "prose-dark dark:prose-lighter",
219
- children: de(a, {
220
- [N.ABOUT.VERSION]: "6.6.11",
221
- [N.ABOUT.BUILD_TIMESTAMP]: "02/02/2025 03:08 PM EST"
219
+ children: de(o, {
220
+ [T.ABOUT.VERSION]: "7.0.1",
221
+ [T.ABOUT.BUILD_TIMESTAMP]: "02/07/2025 10:23 PM EST"
222
222
  })
223
223
  }
224
224
  ) }),
225
225
  r || c ? null : /* @__PURE__ */ e(
226
226
  z,
227
227
  {
228
- header: N.ABOUT.TITLE_SERVER,
228
+ header: T.ABOUT.TITLE_SERVER,
229
229
  className: "prose-dark dark:prose-lighter",
230
- children: de(o, {
231
- [N.ABOUT.VERSION]: d,
232
- [ue(N.ABOUT.ENGINE, m.length)]: /* @__PURE__ */ e(O, { children: m.map((f) => /* @__PURE__ */ e("div", { className: "text-right", children: f }, f)) }),
233
- [ue(N.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ e(O, { children: s.map((f) => /* @__PURE__ */ e("div", { className: "text-right", children: f }, f)) })
230
+ children: de(a, {
231
+ [T.ABOUT.VERSION]: d,
232
+ [ue(T.ABOUT.ENGINE, m.length)]: /* @__PURE__ */ e(O, { children: m.map((h) => /* @__PURE__ */ e("div", { className: "text-right", children: h }, h)) }),
233
+ [ue(T.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ e(O, { children: s.map((h) => /* @__PURE__ */ e("div", { className: "text-right", children: h }, h)) })
234
234
  })
235
235
  }
236
236
  )
237
237
  ] });
238
- }, Ft = ({
238
+ }, Vt = ({
239
239
  open: t,
240
- onOpenChange: a
241
- }) => /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: Qe, children: /* @__PURE__ */ e(Vt, {}) }), Gt = async (t, a, o, n) => {
240
+ onOpenChange: o
241
+ }) => /* @__PURE__ */ e(ce, { open: t, onOpenChange: o, title: qe, children: /* @__PURE__ */ e($t, {}) }), Ft = async (t, o, a, n) => {
242
242
  try {
243
243
  const r = await se({
244
244
  accessToken: n,
@@ -247,23 +247,21 @@ const Mt = ({
247
247
  id: t.id
248
248
  }
249
249
  });
250
- r.status === 200 && (a({
251
- type: Je
252
- }), a({
253
- type: et,
250
+ r.status === 200 && (o({
251
+ type: kt,
254
252
  payload: {
255
253
  id: t.id,
256
254
  model: r.data.model,
257
255
  usage: r.data.usage,
258
256
  messages: r.data.messages
259
257
  }
260
- }), o(!1));
258
+ }), a(!1));
261
259
  } catch {
262
260
  }
263
- }, Ut = ({
261
+ }, Gt = ({
264
262
  filteredHistory: t,
265
- dispatch: a,
266
- onOpenChange: o,
263
+ dispatch: o,
264
+ onOpenChange: a,
267
265
  mutate: n
268
266
  }) => {
269
267
  var I;
@@ -271,15 +269,15 @@ const Mt = ({
271
269
  id: 0,
272
270
  timestamp: "",
273
271
  message: ""
274
- }), [m, f] = C(!1), [p, b] = C(
272
+ }), [m, h] = k(!1), [p, b] = k(
275
273
  we + ve
276
- ), { state: x, dispatch: l } = he(Me), [, h] = Ce({
277
- key: ke + Ze,
278
- initialValue: x.sortDirection
279
- }), T = (u) => {
280
- switch (x.sortDirection) {
274
+ ), { state: C, dispatch: l } = be(Me), [, f] = Ce({
275
+ key: ke + Qe,
276
+ initialValue: C.sortDirection
277
+ }), N = (u) => {
278
+ switch (C.sortDirection) {
281
279
  case te.ASC:
282
- h(te.DESC), l({
280
+ f(te.DESC), l({
283
281
  type: Ae,
284
282
  payload: {
285
283
  sortedCell: u,
@@ -288,7 +286,7 @@ const Mt = ({
288
286
  });
289
287
  break;
290
288
  default:
291
- h(te.ASC), l({
289
+ f(te.ASC), l({
292
290
  type: Ae,
293
291
  payload: {
294
292
  sortedCell: u,
@@ -310,8 +308,8 @@ const Mt = ({
310
308
  }), n();
311
309
  } catch {
312
310
  }
313
- }, g = Be((u) => {
314
- u[0].isIntersecting && b((R) => R + we);
311
+ }, g = ze((u) => {
312
+ u[0].isIntersecting && b((L) => L + we);
315
313
  }, []);
316
314
  return F(() => {
317
315
  const u = {
@@ -324,7 +322,7 @@ const Mt = ({
324
322
  Pe,
325
323
  {
326
324
  showConfirmation: m,
327
- setShowConfirmation: f,
325
+ setShowConfirmation: h,
328
326
  action: E,
329
327
  customStrings: {
330
328
  confirmAction: "Delete",
@@ -348,19 +346,19 @@ const Mt = ({
348
346
  ]
349
347
  }
350
348
  ),
351
- /* @__PURE__ */ i(gt, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
352
- /* @__PURE__ */ e(yt, { children: /* @__PURE__ */ i(ge, { children: [
349
+ /* @__PURE__ */ i(ht, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
350
+ /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ i(pe, { children: [
353
351
  /* @__PURE__ */ e(M, { className: "sr-only", children: "Row" }),
354
352
  /* @__PURE__ */ e(
355
- bt,
353
+ pt,
356
354
  {
357
355
  buttonClassName: "text-xs sm:text-sm",
358
356
  cellId: "timestamp",
359
357
  align: "left",
360
- sortDirection: x.sortDirection,
361
- sortedCell: x.sortedCell,
358
+ sortDirection: C.sortDirection,
359
+ sortedCell: C.sortedCell,
362
360
  onClick: () => {
363
- T("timestamp");
361
+ N("timestamp");
364
362
  },
365
363
  children: "Date"
366
364
  }
@@ -369,12 +367,12 @@ const Mt = ({
369
367
  /* @__PURE__ */ e(M, { className: "text-xs sm:text-sm", children: "Model" }),
370
368
  /* @__PURE__ */ e(M, { className: "text-xs sm:text-sm text-right", children: "Actions" })
371
369
  ] }) }),
372
- /* @__PURE__ */ e(xt, { children: t.slice(0, p).map((u, w) => {
370
+ /* @__PURE__ */ e(gt, { children: t.slice(0, p).map((u, w) => {
373
371
  var B, H;
374
- const R = u.summary || (u.messages.length > 0 ? (B = u.messages[0]) == null ? void 0 : B.content : "");
375
- return ((H = u == null ? void 0 : u.messages) == null ? void 0 : H.length) > 0 ? /* @__PURE__ */ i(_t, { children: [
372
+ const L = u.summary || (u.messages.length > 0 ? (B = u.messages[0]) == null ? void 0 : B.content : "");
373
+ return ((H = u == null ? void 0 : u.messages) == null ? void 0 : H.length) > 0 ? /* @__PURE__ */ i(It, { children: [
376
374
  w === p - ve && /* @__PURE__ */ e("tr", { ref: s }),
377
- /* @__PURE__ */ i(ge, { children: [
375
+ /* @__PURE__ */ i(pe, { children: [
378
376
  /* @__PURE__ */ e(M, { children: w + 1 }),
379
377
  /* @__PURE__ */ e(
380
378
  M,
@@ -392,7 +390,7 @@ const Mt = ({
392
390
  style: {
393
391
  wordBreak: "break-word"
394
392
  },
395
- children: R
393
+ children: L
396
394
  }
397
395
  ),
398
396
  /* @__PURE__ */ i(
@@ -403,8 +401,8 @@ const Mt = ({
403
401
  className: "text-gray-400",
404
402
  align: "center",
405
403
  children: [
406
- u.model && u.model.startsWith("claude") && /* @__PURE__ */ e(kt, { size: "size-4 sm:size-5" }),
407
- u.model && u.model.startsWith("gpt") && /* @__PURE__ */ e(Ct, { size: "size-4 sm:size-5" })
404
+ u.model && u.model.startsWith("claude") && /* @__PURE__ */ e(yt, { size: "size-4 sm:size-5" }),
405
+ u.model && u.model.startsWith("gpt") && /* @__PURE__ */ e(bt, { size: "size-4 sm:size-5" })
408
406
  ]
409
407
  }
410
408
  ),
@@ -418,14 +416,14 @@ const Mt = ({
418
416
  label: "Restore chat",
419
417
  onClick: async () => {
420
418
  const S = await c();
421
- Gt(
419
+ Ft(
422
420
  u,
423
- a,
424
421
  o,
422
+ a,
425
423
  S
426
424
  );
427
425
  },
428
- children: /* @__PURE__ */ e(Ht, { size: "size-3", monotone: !0 })
426
+ children: /* @__PURE__ */ e(Bt, { size: "size-3", monotone: !0 })
429
427
  }
430
428
  ),
431
429
  /* @__PURE__ */ e(
@@ -440,53 +438,56 @@ const Mt = ({
440
438
  id: u.id,
441
439
  timestamp: u.timestamp,
442
440
  message: u.messages.length > 0 ? (S = u.messages[0]) == null ? void 0 : S.content : ""
443
- }, f(!m);
441
+ }, h(!m);
444
442
  },
445
- children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Pt, { size: "size-3", monotone: !0 }) })
443
+ children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Mt, { size: "size-3", monotone: !0 }) })
446
444
  }
447
445
  )
448
446
  ] })
449
447
  ] })
450
- ] }, `${N.HISTORY.TITLE}-${u.id}-${w}`) : null;
448
+ ] }, `${T.HISTORY.TITLE}-${u.id}-${w}`) : null;
451
449
  }) }),
452
- /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(M, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: ue(
450
+ /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(M, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: ue(
453
451
  `${t.length} chat`,
454
452
  t.length
455
453
  ) }) }) }) })
456
454
  ] })
457
455
  ] });
458
- }, Yt = ({
456
+ }, Ut = ({
459
457
  open: t,
460
- onOpenChange: a
458
+ onOpenChange: o
461
459
  }) => {
462
- const { getAccessToken: o, user: n } = V(), { state: r, dispatch: c } = he(Oe), { state: s, dispatch: d } = he(Me), { data: m, mutate: f } = Tt({
460
+ const { getAccessToken: a, user: n } = V(), {
461
+ state: { lastTriggeredTimestamp: r },
462
+ dispatch: c
463
+ } = be(Ct), { state: s, dispatch: d } = be(Me), { data: m, mutate: h } = Et({
463
464
  keys: [
464
465
  n == null ? void 0 : n.username,
465
466
  s.searchString,
466
467
  s.sortDirection,
467
- (r == null ? void 0 : r.lastTriggeredTimestamp) || 0
468
+ r || 0
468
469
  ],
469
- getAccessToken: o
470
+ getAccessToken: a
470
471
  }), p = v(null), [, b] = Ce({
471
- key: ke + tt,
472
+ key: ke + Ze,
472
473
  initialValue: s.searchString
473
- }), [x, l] = C([]);
474
+ }), [C, l] = k([]);
474
475
  F(() => {
475
476
  m && l(m);
476
477
  }, [m]);
477
- const h = async (g) => {
478
+ const f = async (g) => {
478
479
  b(g), d({
479
- type: nt,
480
+ type: et,
480
481
  payload: { searchString: g }
481
482
  });
482
- }, T = at((g) => {
483
- h(g.target.value.trim());
483
+ }, N = tt((g) => {
484
+ f(g.target.value.trim());
484
485
  }, 500);
485
- return /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: rt, children: /* @__PURE__ */ i(O, { children: [
486
+ return /* @__PURE__ */ e(ce, { open: t, onOpenChange: o, title: Je, children: /* @__PURE__ */ i(O, { children: [
486
487
  /* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (g) => {
487
488
  g.preventDefault();
488
489
  }, children: /* @__PURE__ */ e(
489
- be,
490
+ ye,
490
491
  {
491
492
  autoCapitalize: "off",
492
493
  autoComplete: "off",
@@ -497,7 +498,7 @@ const Mt = ({
497
498
  mode: "dark",
498
499
  name: "Search",
499
500
  label: "Search",
500
- onChange: T,
501
+ onChange: N,
501
502
  className: "mt-2 mb-2",
502
503
  ...s.searchString && {
503
504
  rightElement: /* @__PURE__ */ e(
@@ -511,7 +512,7 @@ const Mt = ({
511
512
  size: "small",
512
513
  onClick: () => {
513
514
  var g;
514
- h(""), (g = p.current) != null && g.value && (p.current.value = "", p.current.focus());
515
+ f(""), (g = p.current) != null && g.value && (p.current.value = "", p.current.focus());
515
516
  },
516
517
  children: "Reset"
517
518
  }
@@ -520,46 +521,46 @@ const Mt = ({
520
521
  }
521
522
  ) }),
522
523
  /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ e(
523
- Ut,
524
+ Gt,
524
525
  {
525
- mutate: f,
526
- filteredHistory: x,
526
+ mutate: h,
527
+ filteredHistory: C,
527
528
  dispatch: c,
528
- onOpenChange: a
529
+ onOpenChange: o
529
530
  }
530
531
  ) })
531
532
  ] }) });
532
- }, jt = ({ stats: t }) => {
533
- const { isAuthenticated: a, user: o, registeringForPasskey: n, authenticationType: r } = V(), c = me(), s = me(), d = (o == null ? void 0 : o.username) || "";
534
- return a && d ? /* @__PURE__ */ i(O, { children: [
533
+ }, Yt = ({ stats: t }) => {
534
+ const { isAuthenticated: o, user: a, registeringForPasskey: n, authenticationType: r } = V(), c = me(), s = me(), d = (a == null ? void 0 : a.username) || "";
535
+ return o && d ? /* @__PURE__ */ i(O, { children: [
535
536
  /* @__PURE__ */ e(
536
537
  z,
537
538
  {
538
- header: N.PREFERENCES.TITLE,
539
+ header: T.PREFERENCES.TITLE,
539
540
  className: "prose-dark dark:prose-lighter",
540
541
  children: de(c, {
541
- [N.PREFERENCES.NAME]: d,
542
- [N.PREFERENCES.EMAIL]: (o == null ? void 0 : o.email) || ""
542
+ [T.PREFERENCES.NAME]: d,
543
+ [T.PREFERENCES.EMAIL]: (a == null ? void 0 : a.email) || ""
543
544
  })
544
545
  }
545
546
  ),
546
- r !== ot.PASSKEY && !st() && /* @__PURE__ */ i(
547
+ r !== rt.PASSKEY && !nt() && /* @__PURE__ */ i(
547
548
  z,
548
549
  {
549
550
  className: "prose-dark dark:prose-lighter mt-4",
550
551
  header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ i(q, { columnGap: 3, alignVertical: "center", children: [
551
552
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(Ie, { size: "size-8" }) }),
552
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
553
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e("div", { children: T.PREFERENCES.PASSKEY_TITLE }) })
553
554
  ] }) }),
554
555
  children: [
555
- /* @__PURE__ */ e("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
556
+ /* @__PURE__ */ e("p", { children: T.PREFERENCES.PASSKEY_INSTRUCTIONS }),
556
557
  /* @__PURE__ */ e(
557
558
  oe,
558
559
  {
559
560
  size: "small",
560
561
  className: "mt-2",
561
562
  onClick: n,
562
- labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
563
+ labelLeft: T.PREFERENCES.PASSKEY_BUTTON,
563
564
  children: /* @__PURE__ */ e(Ie, { size: "size-5", monotone: !0 })
564
565
  }
565
566
  )
@@ -569,30 +570,30 @@ const Mt = ({
569
570
  /* @__PURE__ */ e(
570
571
  z,
571
572
  {
572
- header: N.MAIN_STATISTICS.TITLE,
573
+ header: T.MAIN_STATISTICS.TITLE,
573
574
  className: "prose-dark dark:prose-lighter mt-4",
574
575
  children: de(s, {
575
- [ue(N.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
576
- [N.MAIN_STATISTICS.PROCESSING_TIME]: lt(
576
+ [ue(T.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
577
+ [T.MAIN_STATISTICS.PROCESSING_TIME]: at(
577
578
  t.averageProcessingTimes
578
579
  )
579
580
  })
580
581
  }
581
582
  )
582
583
  ] }) : null;
583
- }, Kt = ({
584
+ }, jt = ({
584
585
  open: t,
585
- onOpenChange: a
586
+ onOpenChange: o
586
587
  }) => {
587
- const { getAccessToken: o, user: n } = V(), {
588
+ const { getAccessToken: a, user: n } = V(), {
588
589
  data: r,
589
590
  error: c,
590
591
  isLoading: s
591
- } = Nt({
592
+ } = Tt({
592
593
  keys: [n == null ? void 0 : n.username],
593
- getAccessToken: o
594
+ getAccessToken: a
594
595
  });
595
- return c || s ? null : /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: ct, children: /* @__PURE__ */ e(jt, { stats: r }) });
596
+ return c || s ? null : /* @__PURE__ */ e(ce, { open: t, onOpenChange: o, title: ot, children: /* @__PURE__ */ e(Yt, { stats: r }) });
596
597
  };
597
598
  /*!
598
599
  @versini/ui-textarea v3.0.13
@@ -607,22 +608,22 @@ try {
607
608
  });
608
609
  } catch {
609
610
  }
610
- const De = "av-text-area", Wt = "av-text-area-wrapper", ye = "av-text-area-helper-text", Xt = "av-text-area__control--right", qt = "av-text-area__control--left";
611
- function Qt() {
611
+ const He = "av-text-area", Kt = "av-text-area-wrapper", ge = "av-text-area-helper-text", Wt = "av-text-area__control--right", Xt = "av-text-area__control--left";
612
+ function qt() {
612
613
  const t = v(!1);
613
614
  return F(() => (t.current = !0, () => {
614
615
  t.current = !1;
615
- }), []), Be(() => t.current, []);
616
+ }), []), ze(() => t.current, []);
616
617
  }
617
- function Zt(t) {
618
- return He(() => t.every((a) => a == null) ? () => {
619
- } : (a) => {
620
- t.forEach((o) => {
621
- typeof o == "function" ? o(a) : o != null && (o.current = a);
618
+ function Qt(t) {
619
+ return Be(() => t.every((o) => o == null) ? () => {
620
+ } : (o) => {
621
+ t.forEach((a) => {
622
+ typeof a == "function" ? a(o) : a != null && (a.current = o);
622
623
  });
623
624
  }, t);
624
625
  }
625
- const Jt = {
626
+ const Zt = {
626
627
  x: 0,
627
628
  y: 0,
628
629
  width: 0,
@@ -632,48 +633,48 @@ const Jt = {
632
633
  bottom: 0,
633
634
  right: 0
634
635
  };
635
- function Re(t) {
636
- const a = Qt(), o = v(0), n = v(null), [r, c] = C(Jt), s = He(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
636
+ function Le(t) {
637
+ const o = qt(), a = v(0), n = v(null), [r, c] = k(Zt), s = Be(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
637
638
  const m = d[0];
638
- m && (cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
639
- n.current && a() && c(m.contentRect);
639
+ m && (cancelAnimationFrame(a.current), a.current = requestAnimationFrame(() => {
640
+ n.current && o() && c(m.contentRect);
640
641
  }));
641
- }), [a]);
642
+ }), [o]);
642
643
  return F(() => (n.current && (s == null || s.observe(n.current, t)), () => {
643
- s == null || s.disconnect(), o.current && cancelAnimationFrame(o.current);
644
+ s == null || s.disconnect(), a.current && cancelAnimationFrame(a.current);
644
645
  }), [s, t]), [n, r];
645
646
  }
646
- function er({
647
+ function Jt({
647
648
  value: t,
648
- defaultValue: a,
649
- finalValue: o,
649
+ defaultValue: o,
650
+ finalValue: a,
650
651
  onChange: n = () => {
651
652
  },
652
653
  initialControlledDelay: r = 0
653
654
  }) {
654
- const [c, s] = C(!1), [d, m] = C(
655
- a !== void 0 ? a : o
656
- ), f = (p) => {
655
+ const [c, s] = k(!1), [d, m] = k(
656
+ o !== void 0 ? o : a
657
+ ), h = (p) => {
657
658
  m(p), n == null || n(p);
658
659
  };
659
660
  return F(() => {
660
661
  (async () => t !== void 0 && !c && r > 0 && (await new Promise(
661
662
  (p) => setTimeout(p, r)
662
663
  ), s(!0)))();
663
- }, [t, r, c]), t !== void 0 ? !c && r > 0 ? ["", n, !0] : [t, n, !0] : [d, f, !1];
664
+ }, [t, r, c]), t !== void 0 ? !c && r > 0 ? ["", n, !0] : [t, n, !0] : [d, h, !1];
664
665
  }
665
- function tr(t) {
666
- const a = Rt();
666
+ function er(t) {
667
+ const o = _t();
667
668
  if (!t)
668
- return a;
669
+ return o;
669
670
  if (typeof t == "number" || typeof t == "string")
670
- return `${t}${a}`;
671
+ return `${t}${o}`;
671
672
  if (typeof t == "object") {
672
- const { id: o, prefix: n = "" } = t;
673
- return typeof o == "number" || typeof o == "string" ? `${n}${o}` : `${n}${a}`;
673
+ const { id: a, prefix: n = "" } = t;
674
+ return typeof a == "number" || typeof a == "string" ? `${n}${a}` : `${n}${o}`;
674
675
  }
675
676
  }
676
- const $e = "SET_ANNOUNCEMENT", Ve = "CLEAR_ANNOUNCEMENT", rr = {
677
+ const De = "SET_ANNOUNCEMENT", $e = "CLEAR_ANNOUNCEMENT", tr = {
677
678
  alert: null,
678
679
  alertdialog: null,
679
680
  log: "polite",
@@ -681,14 +682,14 @@ const $e = "SET_ANNOUNCEMENT", Ve = "CLEAR_ANNOUNCEMENT", rr = {
681
682
  progressbar: null,
682
683
  status: "polite",
683
684
  timer: "assertive"
684
- }, nr = (t, a) => {
685
- switch (a == null ? void 0 : a.type) {
686
- case $e:
685
+ }, rr = (t, o) => {
686
+ switch (o == null ? void 0 : o.type) {
687
+ case De:
687
688
  return {
688
689
  ...t,
689
- announcement: a.payload
690
+ announcement: o.payload
690
691
  };
691
- case Ve:
692
+ case $e:
692
693
  return {
693
694
  ...t,
694
695
  announcement: null
@@ -696,46 +697,46 @@ const $e = "SET_ANNOUNCEMENT", Ve = "CLEAR_ANNOUNCEMENT", rr = {
696
697
  default:
697
698
  return t;
698
699
  }
699
- }, ar = ({
700
+ }, nr = ({
700
701
  onAnnouncementClear: t,
701
- dispatch: a
702
+ dispatch: o
702
703
  }) => {
703
- a({
704
- type: Ve
704
+ o({
705
+ type: $e
705
706
  }), typeof t == "function" && t();
706
- }, Le = ({
707
+ }, Re = ({
707
708
  children: t,
708
- clearAnnouncementDelay: a,
709
- clearAnnouncementTimeoutRef: o,
709
+ clearAnnouncementDelay: o,
710
+ clearAnnouncementTimeoutRef: a,
710
711
  onAnnouncementClear: n,
711
712
  dispatch: r
712
713
  }) => {
713
- clearTimeout(o.current), t !== null && r({
714
- type: $e,
714
+ clearTimeout(a.current), t !== null && r({
715
+ type: De,
715
716
  payload: t
716
- }), a && (o.current = setTimeout(
717
- () => ar({
717
+ }), o && (a.current = setTimeout(
718
+ () => nr({
718
719
  onAnnouncementClear: n,
719
720
  dispatch: r
720
721
  }),
721
- a
722
+ o
722
723
  ));
723
- }, or = ({
724
+ }, ar = ({
724
725
  children: t,
725
- announcementTimeoutRef: a,
726
- announcementDelay: o,
726
+ announcementTimeoutRef: o,
727
+ announcementDelay: a,
727
728
  clearAnnouncementDelay: n,
728
729
  clearAnnouncementTimeoutRef: r,
729
730
  onAnnouncementClear: c,
730
731
  dispatch: s
731
732
  }) => {
732
- clearTimeout(a.current), o ? a.current = setTimeout(Le, o, {
733
+ clearTimeout(o.current), a ? o.current = setTimeout(Re, a, {
733
734
  children: t,
734
735
  clearAnnouncementDelay: n,
735
736
  clearAnnouncementTimeoutRef: r,
736
737
  onAnnouncementClear: c,
737
738
  dispatch: s
738
- }) : Le({
739
+ }) : Re({
739
740
  children: t,
740
741
  clearAnnouncementDelay: n,
741
742
  clearAnnouncementTimeoutRef: r,
@@ -743,10 +744,10 @@ const $e = "SET_ANNOUNCEMENT", Ve = "CLEAR_ANNOUNCEMENT", rr = {
743
744
  dispatch: s
744
745
  });
745
746
  };
746
- function sr({
747
+ function or({
747
748
  children: t,
748
- className: a,
749
- politeness: o,
749
+ className: o,
750
+ politeness: a,
750
751
  role: n = null,
751
752
  announcementDelay: r,
752
753
  clearAnnouncementDelay: c,
@@ -754,19 +755,19 @@ function sr({
754
755
  visible: d,
755
756
  ...m
756
757
  }) {
757
- const f = v(null), p = v(null), [b, x] = Lt(nr, {
758
+ const h = v(null), p = v(null), [b, C] = Lt(rr, {
758
759
  announcement: null
759
760
  });
760
- let l = o;
761
- typeof l > "u" && (l = n ? rr[n] : "assertive"), F(() => {
762
- or({
763
- announcementTimeoutRef: f,
761
+ let l = a;
762
+ typeof l > "u" && (l = n ? tr[n] : "assertive"), F(() => {
763
+ ar({
764
+ announcementTimeoutRef: h,
764
765
  announcementDelay: r,
765
766
  children: t,
766
767
  clearAnnouncementDelay: c,
767
768
  clearAnnouncementTimeoutRef: p,
768
769
  onAnnouncementClear: s,
769
- dispatch: x
770
+ dispatch: C
770
771
  });
771
772
  }, [
772
773
  t,
@@ -774,7 +775,7 @@ function sr({
774
775
  c,
775
776
  s
776
777
  ]);
777
- const h = y(a, {
778
+ const f = y(o, {
778
779
  "sr-only": !d
779
780
  });
780
781
  return /* @__PURE__ */ e(
@@ -782,7 +783,7 @@ function sr({
782
783
  {
783
784
  "aria-live": l,
784
785
  ...n && { role: n },
785
- className: h,
786
+ className: f,
786
787
  ...m,
787
788
  children: b.announcement
788
789
  }
@@ -801,35 +802,35 @@ try {
801
802
  });
802
803
  } catch {
803
804
  }
804
- const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", cr = ({ mode: t }) => y({
805
+ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", lr = ({ mode: t }) => y({
805
806
  "bg-surface-darker text-copy-lighter caret-copy-light": t === "dark",
806
807
  "bg-surface-lighter text-copy-dark caret-copy-dark": t === "light",
807
808
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": t === "system",
808
809
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": t === "alt-system"
809
- }), ir = ({
810
+ }), cr = ({
810
811
  focusMode: t
811
812
  }) => y("focus:outline focus:outline-2 focus:outline-offset-2", {
812
813
  "focus:outline-focus-dark": t === "dark",
813
814
  "focus:outline-focus-light": t === "light",
814
815
  "focus:outline-focus-light dark:focus:outline-focus-dark": t === "alt-system",
815
816
  "focus:outline-focus-dark dark:focus:outline-focus-light": t === "system"
816
- }), dr = ({
817
+ }), ir = ({
817
818
  noBorder: t,
818
- error: a
819
+ error: o
819
820
  }) => y("border-2", {
820
- "border-border-dark": !t && !a,
821
- "focus:border-border-dark": !t && a,
822
- "border-border-error-dark": !t && a,
821
+ "border-border-dark": !t && !o,
822
+ "focus:border-border-dark": !t && o,
823
+ "border-border-error-dark": !t && o,
823
824
  "border-transparent": t
824
- }), ur = ({
825
+ }), dr = ({
825
826
  disabled: t,
826
- raw: a,
827
- error: o,
827
+ raw: o,
828
+ error: a,
828
829
  mode: n,
829
830
  leftElement: r,
830
831
  rightElement: c
831
832
  }) => {
832
- if (a)
833
+ if (o)
833
834
  return "";
834
835
  if (t)
835
836
  return y(
@@ -838,7 +839,7 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
838
839
  "translate-x-[12px]": c === !0 && !r || !c && !r
839
840
  }
840
841
  );
841
- if (!o)
842
+ if (!a)
842
843
  return y(
843
844
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
844
845
  {
@@ -849,7 +850,7 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
849
850
  "text-copy-medium dark:text-copy-dark": n === "alt-system"
850
851
  }
851
852
  );
852
- if (o)
853
+ if (a)
853
854
  return y(
854
855
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
855
856
  {
@@ -860,141 +861,141 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
860
861
  "text-copy-medium dark:text-copy-error-dark": n === "alt-system"
861
862
  }
862
863
  );
863
- }, mr = ({
864
+ }, ur = ({
864
865
  error: t,
865
- raw: a,
866
- mode: o,
866
+ raw: o,
867
+ mode: a,
867
868
  disabled: n
868
869
  }) => {
869
- if (a)
870
+ if (o)
870
871
  return "";
871
872
  if (n)
872
873
  return y(
873
- ye,
874
+ ge,
874
875
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
875
876
  );
876
877
  if (!t)
877
- return y(ye, "absolute px-2 font-medium", {
878
- "text-copy-medium": o === "dark",
879
- "text-copy-dark": o === "light",
880
- "text-copy-dark dark:text-copy-medium": o === "system",
881
- "text-copy-medium dark:text-copy-dark": o === "alt-system"
878
+ return y(ge, "absolute px-2 font-medium", {
879
+ "text-copy-medium": a === "dark",
880
+ "text-copy-dark": a === "light",
881
+ "text-copy-dark dark:text-copy-medium": a === "system",
882
+ "text-copy-medium dark:text-copy-dark": a === "alt-system"
882
883
  });
883
884
  if (t)
884
- return y(ye, "absolute px-2 font-medium", {
885
- "text-copy-error-light": o === "dark",
886
- "text-copy-error-dark": o === "light",
887
- "text-copy-error-dark dark:text-copy-error-light": o === "system",
888
- "dark:text-copy-error-dark text-copy-error-light": o === "alt-system"
885
+ return y(ge, "absolute px-2 font-medium", {
886
+ "text-copy-error-light": a === "dark",
887
+ "text-copy-error-dark": a === "light",
888
+ "text-copy-error-dark dark:text-copy-error-light": a === "system",
889
+ "dark:text-copy-error-dark text-copy-error-light": a === "alt-system"
889
890
  });
890
- }, hr = ({
891
+ }, mr = ({
891
892
  className: t,
892
- textAreaClassName: a,
893
- raw: o,
893
+ textAreaClassName: o,
894
+ raw: a,
894
895
  focusMode: n,
895
896
  disabled: r,
896
897
  noBorder: c,
897
898
  error: s,
898
899
  mode: d,
899
900
  leftElement: m,
900
- rightElement: f
901
+ rightElement: h
901
902
  }) => {
902
- const p = o ? t : y(
903
+ const p = a ? t : y(
903
904
  "relative flex w-full flex-col justify-center",
904
- Wt,
905
+ Kt,
905
906
  t
906
- ), b = o ? y(a) : y(
907
- De,
908
- a,
909
- lr(),
910
- cr({ mode: d }),
911
- ir({ focusMode: n }),
912
- dr({
907
+ ), b = a ? y(o) : y(
908
+ He,
909
+ o,
910
+ sr(),
911
+ lr({ mode: d }),
912
+ cr({ focusMode: n }),
913
+ ir({
913
914
  noBorder: c,
914
915
  error: s
915
916
  }),
916
917
  {
917
918
  "disabled:cursor-not-allowed disabled:opacity-50": r
918
919
  }
919
- ), x = o ? void 0 : "sr-only", l = ur({
920
+ ), C = a ? void 0 : "sr-only", l = dr({
920
921
  disabled: r,
921
- raw: o,
922
+ raw: a,
922
923
  error: s,
923
924
  mode: d,
924
- rightElement: f,
925
+ rightElement: h,
925
926
  leftElement: m
926
- }), h = mr({
927
+ }), f = ur({
927
928
  error: s,
928
- raw: o,
929
+ raw: a,
929
930
  mode: d,
930
931
  disabled: r
931
- }), T = o ? void 0 : y(Xt, "absolute"), E = o ? void 0 : y(qt, "absolute");
932
+ }), N = a ? void 0 : y(Wt, "absolute"), E = a ? void 0 : y(Xt, "absolute");
932
933
  return {
933
934
  wrapper: p,
934
935
  textArea: b,
935
- accessibleLabel: x,
936
+ accessibleLabel: C,
936
937
  visibleLabel: l,
937
- helperText: h,
938
- rightElement: T,
938
+ helperText: f,
939
+ rightElement: N,
939
940
  leftElement: E
940
941
  };
941
- }, fr = ({
942
+ }, hr = ({
942
943
  scrollHeight: t,
943
- currentHeight: a,
944
- currentLabelOffset: o = 0,
944
+ currentHeight: o,
945
+ currentLabelOffset: a = 0,
945
946
  currentHelperTextOffset: n = 0
946
947
  }) => {
947
948
  let r, c;
948
- if (t > 0 && t !== a) {
949
- const s = t - a, d = Math.abs(s / 24);
950
- r = o + -1 * Math.sign(s) * (12 * d), c = n + Math.sign(s) * (12 * d);
949
+ if (t > 0 && t !== o) {
950
+ const s = t - o, d = Math.abs(s / 24);
951
+ r = a + -1 * Math.sign(s) * (12 * d), c = n + Math.sign(s) * (12 * d);
951
952
  }
952
953
  return {
953
954
  labelOffset: r,
954
955
  helperTextOffset: c,
955
956
  scrollHeight: t
956
957
  };
957
- }, xe = It.forwardRef(
958
+ }, xe = At.forwardRef(
958
959
  ({
959
960
  id: t,
960
- name: a,
961
- label: o,
961
+ name: o,
962
+ label: a,
962
963
  error: n = !1,
963
964
  raw: r = !1,
964
965
  className: c,
965
966
  textAreaClassName: s,
966
967
  mode: d = "system",
967
968
  focusMode: m = "system",
968
- value: f,
969
+ value: h,
969
970
  defaultValue: p,
970
971
  disabled: b = !1,
971
- noBorder: x = !1,
972
+ noBorder: C = !1,
972
973
  labelId: l,
973
- helperText: h = "",
974
- helperTextOnFocus: T = !1,
974
+ helperText: f = "",
975
+ helperTextOnFocus: N = !1,
975
976
  rightElement: E,
976
977
  leftElement: g,
977
978
  onChange: I,
978
979
  onFocus: u,
979
980
  onBlur: w,
980
- ...R
981
+ ...L
981
982
  }, B) => {
982
983
  var H;
983
- const S = v(null), ie = Zt([B, S]), [k, _] = Re(), [Q, G] = Re(), K = v(80), U = v(-25), L = v(null), Z = v(30), J = v(null), Y = tr({ id: t, prefix: `${De}-` }), [Ee, Fe] = C(0), [Te, Ge] = C(0), [Ue, Ne] = C(
984
- !!(!T && h)
985
- ), Ye = `${a} error, ${h}`, j = hr({
984
+ const S = v(null), ie = Qt([B, S]), [x, _] = Le(), [Q, G] = Le(), K = v(80), U = v(-25), R = v(null), Z = v(30), J = v(null), Y = er({ id: t, prefix: `${He}-` }), [Ee, Ve] = k(0), [Te, Fe] = k(0), [Ge, Ne] = k(
985
+ !!(!N && f)
986
+ ), Ue = `${o} error, ${f}`, j = mr({
986
987
  className: c,
987
988
  textAreaClassName: s,
988
989
  error: n,
989
990
  raw: r,
990
991
  focusMode: m,
991
992
  disabled: b,
992
- noBorder: x,
993
+ noBorder: C,
993
994
  mode: d,
994
995
  rightElement: !!E,
995
996
  leftElement: !!g
996
- }), [D, je] = er({
997
- value: f,
997
+ }), [D, Ye] = Jt({
998
+ value: h,
998
999
  initialControlledDelay: 20,
999
1000
  defaultValue: p,
1000
1001
  onChange: (A) => {
@@ -1004,23 +1005,23 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1004
1005
  }
1005
1006
  });
1006
1007
  }
1007
- }), Ke = (A) => {
1008
- je(A.target.value);
1008
+ }), je = (A) => {
1009
+ Ye(A.target.value);
1010
+ }, Ke = (A) => {
1011
+ N && f && Ne(!0), u && u(A);
1009
1012
  }, We = (A) => {
1010
- T && h && Ne(!0), u && u(A);
1011
- }, Xe = (A) => {
1012
- T && h && !D && Ne(!1), w && w(A);
1013
+ N && f && !D && Ne(!1), w && w(A);
1013
1014
  };
1014
1015
  return ne(() => {
1015
- _ && _.width && Fe(_.width + 18 + 10);
1016
+ _ && _.width && Ve(_.width + 18 + 10);
1016
1017
  }, [_]), ne(() => {
1017
- G && G.width && Ge(G.width + 18 + 10);
1018
+ G && G.width && Fe(G.width + 18 + 10);
1018
1019
  }, [G]), ne(() => {
1019
1020
  r || S && S.current && D !== void 0 && (S.current.style.height = "inherit", S.current.style.height = S.current.scrollHeight + "px");
1020
1021
  }, [D, r]), ne(() => {
1021
1022
  r || setTimeout(() => {
1022
1023
  var A;
1023
- (A = L == null ? void 0 : L.current) == null || A.style.setProperty(
1024
+ (A = R == null ? void 0 : R.current) == null || A.style.setProperty(
1024
1025
  "--av-text-area-wrapper-transition",
1025
1026
  D ? "none" : "all 0.2s ease-out"
1026
1027
  );
@@ -1028,21 +1029,21 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1028
1029
  }, [D, r]), ne(() => {
1029
1030
  var A, Se;
1030
1031
  if (!r && S && S.current && D !== void 0) {
1031
- const { labelOffset: fe, helperTextOffset: pe, scrollHeight: qe } = fr({
1032
+ const { labelOffset: he, helperTextOffset: fe, scrollHeight: Xe } = hr({
1032
1033
  scrollHeight: S.current.scrollHeight,
1033
1034
  currentHeight: K.current,
1034
1035
  currentLabelOffset: U.current,
1035
1036
  currentHelperTextOffset: Z.current
1036
1037
  });
1037
- fe && (U.current = fe, (A = L == null ? void 0 : L.current) == null || A.style.setProperty(
1038
+ he && (U.current = he, (A = R == null ? void 0 : R.current) == null || A.style.setProperty(
1038
1039
  "--av-text-area-label",
1039
- `${fe}px`
1040
- )), pe && (Z.current = pe, (Se = J == null ? void 0 : J.current) == null || Se.style.setProperty(
1040
+ `${he}px`
1041
+ )), fe && (Z.current = fe, (Se = J == null ? void 0 : J.current) == null || Se.style.setProperty(
1041
1042
  "--av-text-area-helper-text",
1042
- `${pe}px`
1043
- )), K.current = qe || K.current;
1043
+ `${fe}px`
1044
+ )), K.current = Xe || K.current;
1044
1045
  }
1045
- }, [D, r]), G.width > 0 && ((H = L == null ? void 0 : L.current) == null || H.style.setProperty(
1046
+ }, [D, r]), G.width > 0 && ((H = R == null ? void 0 : R.current) == null || H.style.setProperty(
1046
1047
  "--tw-translate-x",
1047
1048
  `${12 + G.width + 5}px`
1048
1049
  )), /* @__PURE__ */ i("div", { className: j.wrapper, children: [
@@ -1052,7 +1053,7 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1052
1053
  htmlFor: Y,
1053
1054
  id: l,
1054
1055
  className: j.accessibleLabel,
1055
- children: o
1056
+ children: a
1056
1057
  }
1057
1058
  ),
1058
1059
  g && /* @__PURE__ */ e(
@@ -1068,12 +1069,12 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1068
1069
  {
1069
1070
  ref: ie,
1070
1071
  id: Y,
1071
- name: a,
1072
+ name: o,
1072
1073
  disabled: b,
1073
1074
  placeholder: r ? void 0 : " ",
1074
1075
  className: j.textArea,
1075
1076
  rows: 1,
1076
- ...h && { "aria-describedby": `${Y}-helper` },
1077
+ ...f && { "aria-describedby": `${Y}-helper` },
1077
1078
  ...n && { "aria-invalid": "true" },
1078
1079
  ...E && !g && !r && { style: { paddingRight: Ee } },
1079
1080
  ...g && !E && !r && { style: { paddingLeft: Te } },
@@ -1084,40 +1085,40 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1084
1085
  }
1085
1086
  },
1086
1087
  value: D,
1087
- onChange: Ke,
1088
- onFocus: We,
1089
- onBlur: Xe,
1090
- ...R
1088
+ onChange: je,
1089
+ onFocus: Ke,
1090
+ onBlur: We,
1091
+ ...L
1091
1092
  }
1092
1093
  ),
1093
1094
  !r && /* @__PURE__ */ e(
1094
1095
  "label",
1095
1096
  {
1096
- ref: L,
1097
+ ref: R,
1097
1098
  "aria-hidden": !0,
1098
1099
  htmlFor: Y,
1099
1100
  className: `${j.visibleLabel}`,
1100
- children: o
1101
+ children: a
1101
1102
  }
1102
1103
  ),
1103
- Ue && /* @__PURE__ */ e(
1104
+ Ge && /* @__PURE__ */ e(
1104
1105
  "div",
1105
1106
  {
1106
1107
  ref: J,
1107
1108
  id: `${Y}-helper`,
1108
1109
  className: j.helperText,
1109
- children: h
1110
+ children: f
1110
1111
  }
1111
1112
  ),
1112
1113
  E && /* @__PURE__ */ e(
1113
1114
  "div",
1114
1115
  {
1115
- ref: k,
1116
+ ref: x,
1116
1117
  className: j.rightElement,
1117
1118
  children: E
1118
1119
  }
1119
1120
  ),
1120
- n && h && /* @__PURE__ */ e(sr, { politeness: "polite", clearAnnouncementDelay: 500, children: Ye })
1121
+ n && f && /* @__PURE__ */ e(or, { politeness: "polite", clearAnnouncementDelay: 500, children: Ue })
1121
1122
  ] });
1122
1123
  }
1123
1124
  );
@@ -1135,7 +1136,7 @@ try {
1135
1136
  });
1136
1137
  } catch {
1137
1138
  }
1138
- const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr = ({
1139
+ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr = ({
1139
1140
  focusMode: t
1140
1141
  }) => y(
1141
1142
  "peer-focus:outline",
@@ -1147,14 +1148,14 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1147
1148
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": t === "alt-system",
1148
1149
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": t === "system"
1149
1150
  }
1150
- ), br = () => y(
1151
+ ), yr = () => y(
1151
1152
  "peer-checked:after:translate-x-full",
1152
1153
  // background color when checked
1153
1154
  "peer-checked:bg-violet-500",
1154
1155
  // knob circle and border color when checked
1155
1156
  "peer-checked:after:bg-white",
1156
1157
  "peer-checked:after:border-white"
1157
- ), xr = () => y(
1158
+ ), br = () => y(
1158
1159
  "after:left-[2px]",
1159
1160
  "after:top-[2px]",
1160
1161
  "after:border",
@@ -1166,48 +1167,48 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1166
1167
  "after:rounded-full",
1167
1168
  "after:transition-all",
1168
1169
  "after:content-['']"
1169
- ), kr = ({
1170
+ ), xr = ({
1170
1171
  mode: t,
1171
- noBorder: a
1172
+ noBorder: o
1172
1173
  }) => y({
1173
- border: !a,
1174
+ border: !o,
1174
1175
  "border-border-dark bg-surface-medium": t === "light",
1175
1176
  "border-border-light bg-surface-darker": t === "dark",
1176
1177
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": t === "alt-system",
1177
1178
  "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": t === "system"
1178
- }), Cr = ({
1179
+ }), kr = ({
1179
1180
  mode: t,
1180
- labelHidden: a
1181
- }) => a ? "sr-only" : y("ml-2 text-sm", {
1181
+ labelHidden: o
1182
+ }) => o ? "sr-only" : y("ml-2 text-sm", {
1182
1183
  "text-copy-dark": t === "light",
1183
1184
  "text-copy-lighter": t === "dark",
1184
1185
  "text-copy-lighter dark:text-copy-dark": t === "alt-system",
1185
1186
  "text-copy-dark dark:text-copy-lighter": t === "system"
1186
- }), Er = ({ className: t }) => y(
1187
- pr,
1187
+ }), Cr = ({ className: t }) => y(
1188
+ fr,
1188
1189
  "relative flex cursor-pointer items-center",
1189
1190
  t
1190
- ), Tr = ({
1191
+ ), Er = ({
1191
1192
  mode: t,
1192
- focusMode: a,
1193
- labelHidden: o,
1193
+ focusMode: o,
1194
+ labelHidden: a,
1194
1195
  className: n,
1195
1196
  noBorder: r
1196
1197
  }) => ({
1197
1198
  toggle: y(
1198
- gr(),
1199
- kr({ mode: t, noBorder: r }),
1200
- yr({ focusMode: a }),
1201
- xr(),
1202
- br()
1199
+ pr(),
1200
+ xr({ mode: t, noBorder: r }),
1201
+ gr({ focusMode: o }),
1202
+ br(),
1203
+ yr()
1203
1204
  ),
1204
- label: Cr({ mode: t, labelHidden: o }),
1205
+ label: kr({ mode: t, labelHidden: a }),
1205
1206
  input: "peer sr-only",
1206
- wrapper: Er({ className: n })
1207
+ wrapper: Cr({ className: n })
1207
1208
  }), ae = ({
1208
1209
  checked: t = !1,
1209
- onChange: a,
1210
- label: o,
1210
+ onChange: o,
1211
+ label: a,
1211
1212
  labelHidden: n = !1,
1212
1213
  name: r,
1213
1214
  mode: c = "system",
@@ -1215,63 +1216,63 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1215
1216
  className: d,
1216
1217
  noBorder: m = !1
1217
1218
  }) => {
1218
- const f = Tr({
1219
+ const h = Er({
1219
1220
  mode: c,
1220
1221
  focusMode: s,
1221
1222
  labelHidden: n,
1222
1223
  className: d,
1223
1224
  noBorder: m
1224
1225
  }), p = (b) => {
1225
- a == null || a(b.target.checked);
1226
+ o == null || o(b.target.checked);
1226
1227
  };
1227
- return /* @__PURE__ */ i("label", { className: f.wrapper, children: [
1228
+ return /* @__PURE__ */ i("label", { className: h.wrapper, children: [
1228
1229
  /* @__PURE__ */ e(
1229
1230
  "input",
1230
1231
  {
1231
1232
  name: r,
1232
1233
  checked: t,
1233
1234
  type: "checkbox",
1234
- className: f.input,
1235
+ className: h.input,
1235
1236
  onChange: p
1236
1237
  }
1237
1238
  ),
1238
- /* @__PURE__ */ e("div", { className: f.toggle }),
1239
- /* @__PURE__ */ e("span", { className: f.label, children: o })
1239
+ /* @__PURE__ */ e("div", { className: h.toggle }),
1240
+ /* @__PURE__ */ e("span", { className: h.label, children: a })
1240
1241
  ] });
1241
- }, Nr = ({
1242
+ }, Tr = ({
1242
1243
  open: t,
1243
- onOpenChange: a
1244
+ onOpenChange: o
1244
1245
  }) => {
1245
- const { getAccessToken: o, user: n } = V(), {
1246
+ const { getAccessToken: a, user: n } = V(), {
1246
1247
  data: r,
1247
1248
  error: c,
1248
1249
  isLoading: s,
1249
1250
  mutate: d
1250
- } = ze({
1251
+ } = Oe({
1251
1252
  keys: [n == null ? void 0 : n.username],
1252
- getAccessToken: o,
1253
+ getAccessToken: a,
1253
1254
  isPaused: !0
1254
- }), [m, f] = C({
1255
+ }), [m, h] = k({
1255
1256
  prompts: []
1256
1257
  }), p = ({
1257
1258
  slot: l,
1258
- checked: h,
1259
- label: T,
1259
+ checked: f,
1260
+ label: N,
1260
1261
  content: E,
1261
1262
  privateChat: g = !1
1262
1263
  }) => {
1263
- f((I) => {
1264
+ h((I) => {
1264
1265
  const u = I.prompts, w = {
1265
1266
  slot: l,
1266
- label: T,
1267
+ label: N,
1267
1268
  content: E,
1268
- enabled: h,
1269
+ enabled: f,
1269
1270
  privateChat: g
1270
- }, R = u.findIndex((B) => B.slot === l);
1271
- return R === -1 ? {
1271
+ }, L = u.findIndex((B) => B.slot === l);
1272
+ return L === -1 ? {
1272
1273
  ...I,
1273
1274
  prompts: [...u, { ...w, slot: l }]
1274
- } : (u[R] = w, {
1275
+ } : (u[L] = w, {
1275
1276
  ...I,
1276
1277
  prompts: [...u]
1277
1278
  });
@@ -1280,7 +1281,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1280
1281
  l.preventDefault();
1281
1282
  try {
1282
1283
  await se({
1283
- accessToken: await o(),
1284
+ accessToken: await a(),
1284
1285
  type: le.SET_USER_PREFERENCES,
1285
1286
  params: {
1286
1287
  user: n == null ? void 0 : n.username,
@@ -1289,16 +1290,16 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1289
1290
  });
1290
1291
  } catch {
1291
1292
  }
1292
- }, x = () => {
1293
- d({ ...r }), a(!1);
1293
+ }, C = () => {
1294
+ d({ ...r }), o(!1);
1294
1295
  };
1295
1296
  return F(() => {
1296
- r != null && r.tags && f({ prompts: r.tags });
1297
+ r != null && r.tags && h({ prompts: r.tags });
1297
1298
  }, [r]), c || s ? null : /* @__PURE__ */ i(
1298
1299
  ce,
1299
1300
  {
1300
1301
  open: t,
1301
- onOpenChange: x,
1302
+ onOpenChange: C,
1302
1303
  title: "Prompts",
1303
1304
  footer: /* @__PURE__ */ i(
1304
1305
  q,
@@ -1313,7 +1314,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1313
1314
  mode: "dark",
1314
1315
  variant: "secondary",
1315
1316
  focusMode: "light",
1316
- onClick: x,
1317
+ onClick: C,
1317
1318
  children: "Cancel"
1318
1319
  }
1319
1320
  ) }),
@@ -1324,7 +1325,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1324
1325
  variant: "danger",
1325
1326
  focusMode: "light",
1326
1327
  onClick: async (l) => {
1327
- a(!1), await b(l);
1328
+ o(!1), await b(l);
1328
1329
  },
1329
1330
  children: "Save"
1330
1331
  }
@@ -1333,7 +1334,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1333
1334
  }
1334
1335
  ),
1335
1336
  children: [
1336
- /* @__PURE__ */ e("p", { children: it }),
1337
+ /* @__PURE__ */ e("p", { children: st }),
1337
1338
  m.prompts && m.prompts.map((l) => /* @__PURE__ */ i(
1338
1339
  z,
1339
1340
  {
@@ -1342,33 +1343,33 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1342
1343
  children: [
1343
1344
  /* @__PURE__ */ i(q, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
1344
1345
  /* @__PURE__ */ e(P, { span: 12, children: /* @__PURE__ */ e(
1345
- be,
1346
+ ye,
1346
1347
  {
1347
1348
  label: "Label",
1348
1349
  name: `prompt${l.slot}-label`,
1349
1350
  value: l.label,
1350
- onChange: (h) => {
1351
+ onChange: (f) => {
1351
1352
  p({
1352
1353
  slot: l.slot,
1353
1354
  checked: l.enabled,
1354
- label: h.target.value,
1355
+ label: f.target.value,
1355
1356
  content: l.content
1356
1357
  });
1357
1358
  }
1358
1359
  }
1359
1360
  ) }),
1360
1361
  /* @__PURE__ */ e(P, { span: 12, children: /* @__PURE__ */ e(
1361
- be,
1362
+ ye,
1362
1363
  {
1363
1364
  label: "Content",
1364
1365
  name: `prompt${l.slot}-content`,
1365
1366
  value: l.content,
1366
- onChange: (h) => {
1367
+ onChange: (f) => {
1367
1368
  p({
1368
1369
  slot: l.slot,
1369
1370
  checked: l.enabled,
1370
1371
  label: l.label,
1371
- content: h.target.value
1372
+ content: f.target.value
1372
1373
  });
1373
1374
  }
1374
1375
  }
@@ -1381,10 +1382,10 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1381
1382
  noBorder: !0,
1382
1383
  label: "Enabled",
1383
1384
  name: l.slot.toString(),
1384
- onChange: (h) => {
1385
+ onChange: (f) => {
1385
1386
  p({
1386
1387
  slot: l.slot,
1387
- checked: h,
1388
+ checked: f,
1388
1389
  label: l.label,
1389
1390
  content: l.content
1390
1391
  });
@@ -1399,13 +1400,13 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1399
1400
  noBorder: !0,
1400
1401
  label: "Temporary Chat",
1401
1402
  name: `private-${l.slot.toString()}`,
1402
- onChange: (h) => {
1403
+ onChange: (f) => {
1403
1404
  p({
1404
1405
  slot: l.slot,
1405
1406
  checked: l.enabled,
1406
1407
  label: l.label,
1407
1408
  content: l.content,
1408
- privateChat: h
1409
+ privateChat: f
1409
1410
  });
1410
1411
  },
1411
1412
  checked: l.privateChat
@@ -1418,35 +1419,35 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1418
1419
  ]
1419
1420
  }
1420
1421
  );
1421
- }, Sr = ({
1422
+ }, Nr = ({
1422
1423
  open: t,
1423
- onOpenChange: a
1424
+ onOpenChange: o
1424
1425
  }) => {
1425
- const { getAccessToken: o, user: n } = V(), {
1426
+ const { getAccessToken: a, user: n } = V(), {
1426
1427
  data: r,
1427
1428
  error: c,
1428
1429
  isLoading: s,
1429
1430
  mutate: d
1430
- } = ze({
1431
+ } = Oe({
1431
1432
  keys: [n == null ? void 0 : n.username],
1432
- getAccessToken: o
1433
- }), [m, f] = C(!1), [p, b] = C({
1433
+ getAccessToken: a
1434
+ }), [m, h] = k(!1), [p, b] = k({
1434
1435
  loadingLocation: !1
1435
- }), [x, l] = C(""), [h, T] = C(""), [E, g] = C(dt), [I, u] = Ce({
1436
- key: ke + ut,
1436
+ }), [C, l] = k(""), [f, N] = k(""), [E, g] = k(lt), [I, u] = Ce({
1437
+ key: ke + ct,
1437
1438
  initialValue: !1
1438
- }), w = (k) => {
1439
- u(k);
1440
- }, R = async (k) => {
1441
- k.preventDefault();
1439
+ }), w = (x) => {
1440
+ u(x);
1441
+ }, L = async (x) => {
1442
+ x.preventDefault();
1442
1443
  try {
1443
1444
  await se({
1444
- accessToken: await o(),
1445
+ accessToken: await a(),
1445
1446
  type: le.SET_USER_PREFERENCES,
1446
1447
  params: {
1447
1448
  user: n == null ? void 0 : n.username,
1448
- instructions: x,
1449
- location: h,
1449
+ instructions: C,
1450
+ location: f,
1450
1451
  engine: E
1451
1452
  }
1452
1453
  }), d(), b({
@@ -1457,42 +1458,42 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1457
1458
  }, B = async () => {
1458
1459
  b({
1459
1460
  loadingLocation: !0
1460
- }), T("...");
1461
+ }), N("...");
1461
1462
  try {
1462
- const k = Date.now(), _ = await ft(), Q = await se({
1463
- accessToken: await o(),
1463
+ const x = Date.now(), _ = await ut(), Q = await se({
1464
+ accessToken: await a(),
1464
1465
  type: le.GET_LOCATION,
1465
1466
  params: {
1466
1467
  latitude: _.latitude,
1467
1468
  longitude: _.longitude
1468
1469
  }
1469
- }), K = Date.now() - k;
1470
+ }), K = Date.now() - x;
1470
1471
  if (K < 2e3 && await new Promise((U) => setTimeout(U, 2e3 - K)), Q.status === 200) {
1471
- const { city: U, state: L, country: Z, displayName: J } = Q.data, Y = U && L && Z ? `${U}, ${L}, ${Z}` : J;
1472
+ const { city: U, state: R, country: Z, displayName: J } = Q.data, Y = U && R && Z ? `${U}, ${R}, ${Z}` : J;
1472
1473
  b({
1473
1474
  loadingLocation: !1
1474
- }), T(Y);
1475
+ }), N(Y);
1475
1476
  } else
1476
1477
  b({
1477
1478
  loadingLocation: !1
1478
1479
  });
1479
1480
  } catch {
1480
1481
  }
1481
- }, H = (k, _) => {
1482
- g(k ? _ : _ === W ? ee : W);
1482
+ }, H = (x, _) => {
1483
+ g(x ? _ : _ === W ? ee : W);
1483
1484
  }, S = () => {
1484
- f(!m);
1485
+ h(!m);
1485
1486
  }, ie = () => {
1486
- d({ ...r }), a(!1);
1487
+ d({ ...r }), o(!1);
1487
1488
  };
1488
1489
  return F(() => {
1489
- r != null && r.instructions && l(r.instructions), r != null && r.location && T(r.location), r != null && r.engine && g(r.engine);
1490
+ r != null && r.instructions && l(r.instructions), r != null && r.location && N(r.location), r != null && r.engine && g(r.engine);
1490
1491
  }, [r]), c || s ? null : /* @__PURE__ */ e(
1491
1492
  ce,
1492
1493
  {
1493
1494
  open: t,
1494
1495
  onOpenChange: ie,
1495
- title: mt,
1496
+ title: it,
1496
1497
  footer: /* @__PURE__ */ i(
1497
1498
  q,
1498
1499
  {
@@ -1516,8 +1517,8 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1516
1517
  mode: "dark",
1517
1518
  variant: "danger",
1518
1519
  focusMode: "light",
1519
- onClick: async (k) => {
1520
- a(!1), await R(k);
1520
+ onClick: async (x) => {
1521
+ o(!1), await L(x);
1521
1522
  },
1522
1523
  children: "Save"
1523
1524
  }
@@ -1526,11 +1527,11 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1526
1527
  }
1527
1528
  ),
1528
1529
  children: /* @__PURE__ */ i(O, { children: [
1529
- m && /* @__PURE__ */ e(Nr, { open: m, onOpenChange: f }),
1530
+ m && /* @__PURE__ */ e(Tr, { open: m, onOpenChange: h }),
1530
1531
  /* @__PURE__ */ i(
1531
1532
  z,
1532
1533
  {
1533
- header: N.SETTINGS_ENGINE.TITLE,
1534
+ header: T.SETTINGS_ENGINE.TITLE,
1534
1535
  className: "prose-dark dark:prose-lighter",
1535
1536
  children: [
1536
1537
  /* @__PURE__ */ e("p", { className: "text-sm", children: "Select the AI engine that will be used to generate responses." }),
@@ -1540,7 +1541,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1540
1541
  noBorder: !0,
1541
1542
  label: W,
1542
1543
  name: W,
1543
- onChange: (k) => H(k, W),
1544
+ onChange: (x) => H(x, W),
1544
1545
  checked: E === W
1545
1546
  }
1546
1547
  ),
@@ -1551,7 +1552,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1551
1552
  noBorder: !0,
1552
1553
  label: ee,
1553
1554
  name: ee,
1554
- onChange: (k) => H(k, ee),
1555
+ onChange: (x) => H(x, ee),
1555
1556
  checked: E === ee
1556
1557
  }
1557
1558
  ),
@@ -1575,7 +1576,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1575
1576
  size: "small",
1576
1577
  onClick: S,
1577
1578
  labelLeft: "Edit Custom Prompts",
1578
- children: /* @__PURE__ */ e(St, { size: "size-3", monotone: !0 })
1579
+ children: /* @__PURE__ */ e(Nt, { size: "size-3", monotone: !0 })
1579
1580
  }
1580
1581
  )
1581
1582
  ]
@@ -1589,7 +1590,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1589
1590
  children: [
1590
1591
  /* @__PURE__ */ i("p", { className: "text-sm", children: [
1591
1592
  "What would you like ",
1592
- /* @__PURE__ */ e("em", { children: ht }),
1593
+ /* @__PURE__ */ e("em", { children: dt }),
1593
1594
  " to know about you to provide better responses?"
1594
1595
  ] }),
1595
1596
  /* @__PURE__ */ e(
@@ -1601,9 +1602,9 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1601
1602
  autoCorrect: "off",
1602
1603
  name: "customInstructions",
1603
1604
  label: "Custom Instructions",
1604
- value: x,
1605
- onChange: (k) => {
1606
- l(k.target.value);
1605
+ value: C,
1606
+ onChange: (x) => {
1607
+ l(x.target.value);
1607
1608
  },
1608
1609
  helperText: "Press ENTER to add a new line."
1609
1610
  }
@@ -1624,9 +1625,9 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1624
1625
  mode: "alt-system",
1625
1626
  name: "location",
1626
1627
  label: "Location",
1627
- value: h,
1628
- onChange: (k) => {
1629
- T(k.target.value);
1628
+ value: f,
1629
+ onChange: (x) => {
1630
+ N(x.target.value);
1630
1631
  },
1631
1632
  helperText: "Enter your location or press auto-detect."
1632
1633
  }
@@ -1648,25 +1649,15 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1648
1649
  ] })
1649
1650
  }
1650
1651
  );
1651
- }, Rr = () => {
1652
- const { logout: t } = V(), { state: a } = he(Oe), [o, n] = C(!1), [r, c] = C(!1), [s, d] = C(!1), [m, f] = C(!1), [p, b] = C(!1), x = () => {
1653
- n(!o);
1654
- }, l = () => {
1655
- c(!r);
1656
- }, h = () => {
1657
- d(!s);
1658
- }, T = () => {
1659
- f(!m);
1660
- }, E = () => {
1661
- b(!p);
1662
- };
1652
+ }, _r = ({ isComponent: t = !1 }) => {
1653
+ const { logout: o } = V(), [a, n] = k(!1), [r, c] = k(!1), [s, d] = k(!1), [m, h] = k(!1), [p, b] = k(!1);
1663
1654
  return /* @__PURE__ */ i(O, { children: [
1664
1655
  /* @__PURE__ */ e(
1665
1656
  Pe,
1666
1657
  {
1667
1658
  showConfirmation: p,
1668
1659
  setShowConfirmation: b,
1669
- action: t,
1660
+ action: o,
1670
1661
  customStrings: {
1671
1662
  confirmAction: _e,
1672
1663
  cancelAction: "Cancel",
@@ -1675,64 +1666,74 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1675
1666
  children: /* @__PURE__ */ e("p", { children: "Are you sure you want to log out?" })
1676
1667
  }
1677
1668
  ),
1678
- /* @__PURE__ */ e(Kt, { open: o, onOpenChange: n }),
1679
- /* @__PURE__ */ e(Sr, { open: r, onOpenChange: c }),
1680
- s && /* @__PURE__ */ e(Yt, { open: s, onOpenChange: d }),
1681
- /* @__PURE__ */ e(Ft, { open: m, onOpenChange: f }),
1669
+ /* @__PURE__ */ e(jt, { open: a, onOpenChange: n }),
1670
+ /* @__PURE__ */ e(Nr, { open: r, onOpenChange: c }),
1671
+ s && /* @__PURE__ */ e(Ut, { open: s, onOpenChange: d }),
1672
+ /* @__PURE__ */ e(Vt, { open: m, onOpenChange: h }),
1682
1673
  /* @__PURE__ */ e("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ e(q, { alignHorizontal: "flex-end", alignVertical: "center", children: /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
1683
- wt,
1674
+ St,
1684
1675
  {
1685
1676
  label: "Profile, Settings, etc.",
1686
1677
  mode: "light",
1687
1678
  placement: "left",
1688
1679
  trigger: /* @__PURE__ */ i(
1689
- vt,
1680
+ wt,
1690
1681
  {
1691
1682
  mode: "dark",
1692
1683
  focusMode: "light",
1693
- trigger: /* @__PURE__ */ e(oe, { label: "Settings", children: /* @__PURE__ */ e(Dt, {}) }),
1684
+ trigger: /* @__PURE__ */ e(oe, { label: "Settings", children: /* @__PURE__ */ e(Ht, {}) }),
1694
1685
  defaultPlacement: "bottom-end",
1695
1686
  children: [
1696
1687
  /* @__PURE__ */ e(
1697
1688
  re,
1698
1689
  {
1699
1690
  label: "Profile",
1700
- onClick: x,
1701
- icon: /* @__PURE__ */ e(Bt, {})
1691
+ onClick: () => {
1692
+ n(!a);
1693
+ },
1694
+ icon: /* @__PURE__ */ e(zt, {})
1702
1695
  }
1703
1696
  ),
1704
1697
  /* @__PURE__ */ e(
1705
1698
  re,
1706
1699
  {
1707
1700
  label: "Settings",
1708
- onClick: l,
1709
- icon: /* @__PURE__ */ e($t, {})
1701
+ onClick: () => {
1702
+ c(!r);
1703
+ },
1704
+ icon: /* @__PURE__ */ e(Dt, {})
1710
1705
  }
1711
1706
  ),
1712
1707
  /* @__PURE__ */ e(
1713
1708
  re,
1714
1709
  {
1715
1710
  label: "History",
1716
- onClick: h,
1717
- icon: /* @__PURE__ */ e(Ot, {})
1711
+ onClick: () => {
1712
+ d(!s);
1713
+ },
1714
+ icon: /* @__PURE__ */ e(Pt, {})
1718
1715
  }
1719
1716
  ),
1720
1717
  /* @__PURE__ */ e(
1721
1718
  re,
1722
1719
  {
1723
1720
  label: "About",
1724
- onClick: T,
1725
- icon: /* @__PURE__ */ e(zt, {})
1721
+ onClick: () => {
1722
+ h(!m);
1723
+ },
1724
+ icon: /* @__PURE__ */ e(Ot, {})
1726
1725
  }
1727
1726
  ),
1728
- a && a.id && !a.isComponent && /* @__PURE__ */ i(O, { children: [
1729
- /* @__PURE__ */ e(At, {}),
1727
+ !t && /* @__PURE__ */ i(O, { children: [
1728
+ /* @__PURE__ */ e(vt, {}),
1730
1729
  /* @__PURE__ */ e(
1731
1730
  re,
1732
1731
  {
1733
1732
  label: "Log out",
1734
- onClick: E,
1735
- icon: /* @__PURE__ */ e("div", { className: "text-red-700", children: /* @__PURE__ */ e(Mt, { monotone: !0 }) })
1733
+ onClick: () => {
1734
+ b(!p);
1735
+ },
1736
+ icon: /* @__PURE__ */ e("div", { className: "text-red-700", children: /* @__PURE__ */ e(Rt, { monotone: !0 }) })
1736
1737
  }
1737
1738
  )
1738
1739
  ] })
@@ -1744,5 +1745,5 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1744
1745
  ] });
1745
1746
  };
1746
1747
  export {
1747
- Rr as default
1748
+ _r as default
1748
1749
  };