@versini/sassysaint 8.44.3 → 8.45.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.
Files changed (23) hide show
  1. package/dist/chunks/{AboutChangelog.BdZzSUba.js → AboutChangelog.BcZ_t0GJ.js} +2 -2
  2. package/dist/chunks/{AboutEntry.DzSi7ibC.js → AboutEntry.CM9v8Use.js} +6 -6
  3. package/dist/chunks/{App.DDTKqerX.js → App.DuT94v-y.js} +1760 -1753
  4. package/dist/chunks/{Chart.PHloGZi7.js → Chart.DWH1W2PS.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.DxGv-_Rb.js → ChatBubbleAssistant.BCYTQSu_.js} +3 -3
  6. package/dist/chunks/{ChatHistoryTable.DnkLt1Je.js → ChatHistoryTable.D41Yr90v.js} +2 -2
  7. package/dist/chunks/{HistoryEntry.De2vGpPR.js → HistoryEntry.BcyOwxN9.js} +3 -3
  8. package/dist/chunks/{LNWAZHJI.DBPRjK8f.js → LNWAZHJI.DuCb1xij.js} +1 -1
  9. package/dist/chunks/{ProfileEntry.B9ur9Dzf.js → ProfileEntry.56sQII3J.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.DeQAT_-t.js → SettingsEntry.BcIoX32W.js} +400 -365
  11. package/dist/chunks/{UsageEntry.BmEHDYHp.js → UsageEntry.BEYYLBtG.js} +3 -3
  12. package/dist/chunks/{index.C1S2cFkO.js → index.BQssJX2O.js} +2 -2
  13. package/dist/chunks/{index.B8EJY2WR.js → index.BwP0kG4H.js} +1 -1
  14. package/dist/chunks/{index.DI9PexVP.js → index.C2zACTA7.js} +1 -1
  15. package/dist/chunks/{index.CsbwtA6h.js → index.CChT-aSg.js} +1 -1
  16. package/dist/chunks/{index.CrwhT53o.js → index.Cal0mNNL.js} +3 -3
  17. package/dist/chunks/{index.CvN58Fp8.js → index.Cgt3oTZg.js} +1 -1
  18. package/dist/chunks/{index.DNSGhajh.js → index.DiDmMMwR.js} +1443 -1393
  19. package/dist/chunks/{useMarkdown.CujEnDtN.js → useMarkdown.Bdci3-9i.js} +6 -6
  20. package/dist/components/SassySaint/SassySaint.js +1 -1
  21. package/dist/index.js +4 -4
  22. package/dist/style.css +1 -1
  23. package/package.json +3 -3
@@ -1,24 +1,24 @@
1
- import { jsxs as N, jsx as l } from "react/jsx-runtime";
2
- import { n as ke, LOCAL_STORAGE_PREFIX as xe, LOCAL_STORAGE_SERVICE_WORKER as Ee, isServiceWorkerEnabled as Te, SETTINGS_TITLE as we, S as $, CARDS as P, Oe as Ne, C as re, PROMPTS_DESCRIPTION as ve, L as _e, j as ne, getCurrentGeoLocation as Ce, handleServiceWorkerToggle as Se } from "./index.DNSGhajh.js";
3
- import { useUserPreferences as Ie, E as Ae, tt as Le, mutateCall as se, SERVICE_TYPES as le } from "./App.DDTKqerX.js";
4
- import Re, { useRef as v, useState as h, useLayoutEffect as j, useMemo as de, useEffect as X, useId as Me, useReducer as Oe, useCallback as De } from "react";
1
+ import { jsxs as b, jsx as s } from "react/jsx-runtime";
2
+ import { n as xe, getCacheInfo as we, isServiceWorkerEnabled as Ne, SETTINGS_TITLE as Te, S as H, CARDS as P, Oe as Ee, C as se, PROMPTS_DESCRIPTION as ve, L as Ce, j as ie, getCurrentGeoLocation as Ie, handleServiceWorkerToggle as _e } from "./index.DiDmMMwR.js";
3
+ import { useUserPreferences as Se, tt as Ae, mutateCall as de, SERVICE_TYPES as ue } from "./App.DuT94v-y.js";
4
+ import Le, { useRef as v, useState as p, useLayoutEffect as J, useMemo as he, useEffect as $, useId as Me, useReducer as Re, useCallback as pe } from "react";
5
5
  import i from "clsx";
6
- const ue = "av-text-area", Pe = "av-text-area-wrapper", ae = "av-text-area-helper-text", Be = "av-text-area__control--right", Ge = "av-text-area__control--left";
7
- function He() {
6
+ const ge = "av-text-area", De = "av-text-area-wrapper", le = "av-text-area-helper-text", Oe = "av-text-area__control--right", Pe = "av-text-area__control--left";
7
+ function Be() {
8
8
  const e = v(!1);
9
- return X(() => (e.current = !0, () => {
9
+ return $(() => (e.current = !0, () => {
10
10
  e.current = !1;
11
- }), []), De(() => e.current, []);
11
+ }), []), pe(() => e.current, []);
12
12
  }
13
- function Ue(e) {
14
- return de(() => e.every((a) => a == null) ? () => {
13
+ function Ge(e) {
14
+ return he(() => e.every((a) => a == null) ? () => {
15
15
  } : (a) => {
16
16
  e.forEach((r) => {
17
17
  typeof r == "function" ? r(a) : r != null && (r.current = a);
18
18
  });
19
19
  }, [...e]);
20
20
  }
21
- const $e = {
21
+ const Ue = {
22
22
  x: 0,
23
23
  y: 0,
24
24
  width: 0,
@@ -28,18 +28,18 @@ const $e = {
28
28
  bottom: 0,
29
29
  right: 0
30
30
  };
31
- function ce(e) {
32
- const a = He(), r = v(0), o = v(null), [t, s] = h($e), c = de(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
33
- const m = d[0];
34
- m && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
35
- o.current && a() && s(m.contentRect);
31
+ function me(e) {
32
+ const a = Be(), r = v(0), o = v(null), [t, l] = p(Ue), c = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
33
+ const f = d[0];
34
+ f && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
35
+ o.current && a() && l(f.contentRect);
36
36
  }));
37
37
  }), [a]);
38
- return X(() => (o.current && c?.observe(o.current, e), () => {
38
+ return $(() => (o.current && c?.observe(o.current, e), () => {
39
39
  c?.disconnect(), r.current && cancelAnimationFrame(r.current);
40
40
  }), [c, e]), [o, t];
41
41
  }
42
- function Ve({
42
+ function He({
43
43
  value: e,
44
44
  defaultValue: a,
45
45
  finalValue: r,
@@ -47,18 +47,18 @@ function Ve({
47
47
  },
48
48
  initialControlledDelay: t = 0
49
49
  }) {
50
- const [s, c] = h(!1), [d, m] = h(
50
+ const [l, c] = p(!1), [d, f] = p(
51
51
  a !== void 0 ? a : r
52
- ), g = (u) => {
53
- m(u), o?.(u);
52
+ ), x = (u) => {
53
+ f(u), o?.(u);
54
54
  };
55
- return X(() => {
56
- (async () => e !== void 0 && !s && t > 0 && (await new Promise(
55
+ return $(() => {
56
+ (async () => e !== void 0 && !l && t > 0 && (await new Promise(
57
57
  (u) => setTimeout(u, t)
58
58
  ), c(!0)))();
59
- }, [e, t, s]), e !== void 0 ? !s && t > 0 ? ["", o, !0] : [e, o, !0] : [d, g, !1];
59
+ }, [e, t, l]), e !== void 0 ? !l && t > 0 ? ["", o, !0] : [e, o, !0] : [d, x, !1];
60
60
  }
61
- function Fe(e) {
61
+ function $e(e) {
62
62
  const a = Me();
63
63
  if (!e)
64
64
  return a;
@@ -69,7 +69,7 @@ function Fe(e) {
69
69
  return typeof r == "number" || typeof r == "string" ? `${o}${r}` : `${o}${a}`;
70
70
  }
71
71
  }
72
- const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
72
+ const ye = "SET_ANNOUNCEMENT", be = "CLEAR_ANNOUNCEMENT", Ve = {
73
73
  alert: null,
74
74
  alertdialog: null,
75
75
  log: "polite",
@@ -77,14 +77,14 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
77
77
  progressbar: null,
78
78
  status: "polite",
79
79
  timer: "assertive"
80
- }, ze = (e, a) => {
80
+ }, Fe = (e, a) => {
81
81
  switch (a?.type) {
82
- case me:
82
+ case ye:
83
83
  return {
84
84
  ...e,
85
85
  announcement: a.payload
86
86
  };
87
- case fe:
87
+ case be:
88
88
  return {
89
89
  ...e,
90
90
  announcement: null
@@ -92,14 +92,14 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
92
92
  default:
93
93
  return e;
94
94
  }
95
- }, je = ({
95
+ }, ze = ({
96
96
  onAnnouncementClear: e,
97
97
  dispatch: a
98
98
  }) => {
99
99
  a({
100
- type: fe
100
+ type: be
101
101
  }), typeof e == "function" && e();
102
- }, ie = ({
102
+ }, fe = ({
103
103
  children: e,
104
104
  clearAnnouncementDelay: a,
105
105
  clearAnnouncementTimeoutRef: r,
@@ -107,80 +107,80 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
107
107
  dispatch: t
108
108
  }) => {
109
109
  clearTimeout(r.current), e !== null && t({
110
- type: me,
110
+ type: ye,
111
111
  payload: e
112
112
  }), a && (r.current = setTimeout(
113
- () => je({
113
+ () => ze({
114
114
  onAnnouncementClear: o,
115
115
  dispatch: t
116
116
  }),
117
117
  a
118
118
  ));
119
- }, Xe = ({
119
+ }, We = ({
120
120
  children: e,
121
121
  announcementTimeoutRef: a,
122
122
  announcementDelay: r,
123
123
  clearAnnouncementDelay: o,
124
124
  clearAnnouncementTimeoutRef: t,
125
- onAnnouncementClear: s,
125
+ onAnnouncementClear: l,
126
126
  dispatch: c
127
127
  }) => {
128
- clearTimeout(a.current), r ? a.current = setTimeout(ie, r, {
128
+ clearTimeout(a.current), r ? a.current = setTimeout(fe, r, {
129
129
  children: e,
130
130
  clearAnnouncementDelay: o,
131
131
  clearAnnouncementTimeoutRef: t,
132
- onAnnouncementClear: s,
132
+ onAnnouncementClear: l,
133
133
  dispatch: c
134
- }) : ie({
134
+ }) : fe({
135
135
  children: e,
136
136
  clearAnnouncementDelay: o,
137
137
  clearAnnouncementTimeoutRef: t,
138
- onAnnouncementClear: s,
138
+ onAnnouncementClear: l,
139
139
  dispatch: c
140
140
  });
141
141
  };
142
- function Ye({
142
+ function je({
143
143
  children: e,
144
144
  className: a,
145
145
  politeness: r,
146
146
  role: o = null,
147
147
  announcementDelay: t,
148
- clearAnnouncementDelay: s,
148
+ clearAnnouncementDelay: l,
149
149
  onAnnouncementClear: c,
150
150
  visible: d,
151
- ...m
151
+ ...f
152
152
  }) {
153
- const g = v(null), u = v(null), [b, _] = Oe(ze, {
153
+ const x = v(null), u = v(null), [w, C] = Re(Fe, {
154
154
  announcement: null
155
155
  });
156
- let C = r;
157
- typeof C > "u" && (C = o ? We[o] : "assertive"), X(() => {
158
- Xe({
159
- announcementTimeoutRef: g,
156
+ let I = r;
157
+ typeof I > "u" && (I = o ? Ve[o] : "assertive"), $(() => {
158
+ We({
159
+ announcementTimeoutRef: x,
160
160
  announcementDelay: t,
161
161
  children: e,
162
- clearAnnouncementDelay: s,
162
+ clearAnnouncementDelay: l,
163
163
  clearAnnouncementTimeoutRef: u,
164
164
  onAnnouncementClear: c,
165
- dispatch: _
165
+ dispatch: C
166
166
  });
167
167
  }, [
168
168
  e,
169
169
  t,
170
- s,
170
+ l,
171
171
  c
172
172
  ]);
173
- const f = i(a, {
173
+ const g = i(a, {
174
174
  "sr-only": !d
175
175
  });
176
- return /* @__PURE__ */ l(
176
+ return /* @__PURE__ */ s(
177
177
  "div",
178
178
  {
179
- "aria-live": C,
179
+ "aria-live": I,
180
180
  ...o && { role: o },
181
- className: f,
182
- ...m,
183
- children: b.announcement
181
+ className: g,
182
+ ...f,
183
+ children: w.announcement
184
184
  }
185
185
  );
186
186
  }
@@ -197,19 +197,19 @@ try {
197
197
  });
198
198
  } catch {
199
199
  }
200
- const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Je = ({ mode: e }) => i({
200
+ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Ye = ({ mode: e }) => i({
201
201
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
202
202
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
203
203
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
204
204
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
205
- }), Ke = ({
205
+ }), Xe = ({
206
206
  focusMode: e
207
207
  }) => i("focus:outline focus:outline-2 focus:outline-offset-2", {
208
208
  "focus:outline-focus-dark": e === "dark",
209
209
  "focus:outline-focus-light": e === "light",
210
210
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
211
211
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
212
- }), Ze = ({
212
+ }), Je = ({
213
213
  noBorder: e,
214
214
  error: a
215
215
  }) => i("border-2", {
@@ -217,13 +217,13 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
217
217
  "focus:border-border-dark": !e && a,
218
218
  "border-border-error-dark": !e && a,
219
219
  "border-transparent": e
220
- }), Qe = ({
220
+ }), Ze = ({
221
221
  disabled: e,
222
222
  raw: a,
223
223
  error: r,
224
224
  mode: o,
225
225
  leftElement: t,
226
- rightElement: s
226
+ rightElement: l
227
227
  }) => {
228
228
  if (a)
229
229
  return "";
@@ -231,14 +231,14 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
231
231
  return i(
232
232
  "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
233
233
  {
234
- "translate-x-[12px]": s === !0 && !t || !s && !t
234
+ "translate-x-[12px]": l === !0 && !t || !l && !t
235
235
  }
236
236
  );
237
237
  if (!r)
238
238
  return i(
239
239
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
240
240
  {
241
- "translate-x-[12px]": s === !0 && !t || !s && !t,
241
+ "translate-x-[12px]": l === !0 && !t || !l && !t,
242
242
  "text-copy-medium": o === "dark",
243
243
  "text-copy-dark": o === "light",
244
244
  "text-copy-dark dark:text-copy-medium": o === "system",
@@ -249,14 +249,14 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
249
249
  return i(
250
250
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
251
251
  {
252
- "translate-x-[12px]": s === !0 && !t || !s && !t,
252
+ "translate-x-[12px]": l === !0 && !t || !l && !t,
253
253
  "text-copy-medium": o === "dark",
254
254
  "text-copy-error-dark": o === "light",
255
255
  "text-copy-error-dark dark:text-copy-error-light": o === "system",
256
256
  "text-copy-medium dark:text-copy-error-dark": o === "alt-system"
257
257
  }
258
258
  );
259
- }, et = ({
259
+ }, Ke = ({
260
260
  error: e,
261
261
  raw: a,
262
262
  mode: r,
@@ -266,255 +266,255 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
266
266
  return "";
267
267
  if (o)
268
268
  return i(
269
- ae,
269
+ le,
270
270
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
271
271
  );
272
272
  if (!e)
273
- return i(ae, "absolute px-2 font-medium", {
273
+ return i(le, "absolute px-2 font-medium", {
274
274
  "text-copy-medium": r === "dark",
275
275
  "text-copy-dark": r === "light",
276
276
  "text-copy-dark dark:text-copy-medium": r === "system",
277
277
  "text-copy-medium dark:text-copy-dark": r === "alt-system"
278
278
  });
279
279
  if (e)
280
- return i(ae, "absolute px-2 font-medium", {
280
+ return i(le, "absolute px-2 font-medium", {
281
281
  "text-copy-error-light": r === "dark",
282
282
  "text-copy-error-dark": r === "light",
283
283
  "text-copy-error-dark dark:text-copy-error-light": r === "system",
284
284
  "dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
285
285
  });
286
- }, tt = ({
286
+ }, Qe = ({
287
287
  className: e,
288
288
  textAreaClassName: a,
289
289
  raw: r,
290
290
  focusMode: o,
291
291
  disabled: t,
292
- noBorder: s,
292
+ noBorder: l,
293
293
  error: c,
294
294
  mode: d,
295
- leftElement: m,
296
- rightElement: g
295
+ leftElement: f,
296
+ rightElement: x
297
297
  }) => {
298
298
  const u = r ? e : i(
299
299
  "relative flex w-full flex-col justify-center",
300
- Pe,
300
+ De,
301
301
  e
302
- ), b = r ? i(a) : i(
303
- ue,
302
+ ), w = r ? i(a) : i(
303
+ ge,
304
304
  a,
305
305
  qe(),
306
- Je({ mode: d }),
307
- Ke({ focusMode: o }),
308
- Ze({
309
- noBorder: s,
306
+ Ye({ mode: d }),
307
+ Xe({ focusMode: o }),
308
+ Je({
309
+ noBorder: l,
310
310
  error: c
311
311
  }),
312
312
  {
313
313
  "disabled:cursor-not-allowed disabled:opacity-50": t
314
314
  }
315
- ), _ = r ? void 0 : "sr-only", C = Qe({
315
+ ), C = r ? void 0 : "sr-only", I = Ze({
316
316
  disabled: t,
317
317
  raw: r,
318
318
  error: c,
319
319
  mode: d,
320
- rightElement: g,
321
- leftElement: m
322
- }), f = et({
320
+ rightElement: x,
321
+ leftElement: f
322
+ }), g = Ke({
323
323
  error: c,
324
324
  raw: r,
325
325
  mode: d,
326
326
  disabled: t
327
- }), I = r ? void 0 : i(Be, "absolute"), k = r ? void 0 : i(Ge, "absolute");
327
+ }), A = r ? void 0 : i(Oe, "absolute"), N = r ? void 0 : i(Pe, "absolute");
328
328
  return {
329
329
  wrapper: u,
330
- textArea: b,
331
- accessibleLabel: _,
332
- visibleLabel: C,
333
- helperText: f,
334
- rightElement: I,
335
- leftElement: k
330
+ textArea: w,
331
+ accessibleLabel: C,
332
+ visibleLabel: I,
333
+ helperText: g,
334
+ rightElement: A,
335
+ leftElement: N
336
336
  };
337
- }, rt = ({
337
+ }, et = ({
338
338
  scrollHeight: e,
339
339
  currentHeight: a,
340
340
  currentLabelOffset: r = 0,
341
341
  currentHelperTextOffset: o = 0
342
342
  }) => {
343
- let t, s;
343
+ let t, l;
344
344
  if (e > 0 && e !== a) {
345
345
  const c = e - a, d = Math.abs(c / 24);
346
- t = r + -1 * Math.sign(c) * (12 * d), s = o + Math.sign(c) * (12 * d);
346
+ t = r + -1 * Math.sign(c) * (12 * d), l = o + Math.sign(c) * (12 * d);
347
347
  }
348
348
  return {
349
349
  labelOffset: t,
350
- helperTextOffset: s,
350
+ helperTextOffset: l,
351
351
  scrollHeight: e
352
352
  };
353
- }, oe = Re.forwardRef(
353
+ }, ce = Le.forwardRef(
354
354
  ({
355
355
  id: e,
356
356
  name: a,
357
357
  label: r,
358
358
  error: o = !1,
359
359
  raw: t = !1,
360
- className: s,
360
+ className: l,
361
361
  textAreaClassName: c,
362
362
  mode: d = "system",
363
- focusMode: m = "system",
364
- value: g,
363
+ focusMode: f = "system",
364
+ value: x,
365
365
  defaultValue: u,
366
- disabled: b = !1,
367
- noBorder: _ = !1,
368
- labelId: C,
369
- helperText: f = "",
370
- helperTextOnFocus: I = !1,
371
- rightElement: k,
372
- leftElement: S,
366
+ disabled: w = !1,
367
+ noBorder: C = !1,
368
+ labelId: I,
369
+ helperText: g = "",
370
+ helperTextOnFocus: A = !1,
371
+ rightElement: N,
372
+ leftElement: _,
373
373
  onChange: V,
374
- onFocus: Y,
374
+ onFocus: M,
375
375
  onBlur: F,
376
- ...q
377
- }, J) => {
378
- const x = v(null), K = Ue([J, x]), [Z, G] = ce(), [Q, A] = ce(), W = v(80), z = v(-25), L = v(null), n = v(30), p = v(null), E = Fe({ id: e, prefix: `${ue}-` }), [H, R] = h(0), [y, T] = h(0), [O, U] = h(
379
- !!(!I && f)
380
- ), ee = `${a} error, ${f}`, D = tt({
381
- className: s,
376
+ ...G
377
+ }, Z) => {
378
+ const y = v(null), K = Ge([Z, y]), [Q, R] = me(), [ee, S] = me(), z = v(80), te = v(-25), U = v(null), re = v(30), ae = v(null), D = $e({ id: e, prefix: `${ge}-` }), [W, j] = p(0), [q, n] = p(0), [h, L] = p(
379
+ !!(!A && g)
380
+ ), Y = `${a} error, ${g}`, k = Qe({
381
+ className: l,
382
382
  textAreaClassName: c,
383
383
  error: o,
384
384
  raw: t,
385
- focusMode: m,
386
- disabled: b,
387
- noBorder: _,
385
+ focusMode: f,
386
+ disabled: w,
387
+ noBorder: C,
388
388
  mode: d,
389
- rightElement: !!k,
390
- leftElement: !!S
391
- }), [M, pe] = Ve({
392
- value: g,
389
+ rightElement: !!N,
390
+ leftElement: !!_
391
+ }), [m, T] = He({
392
+ value: x,
393
393
  initialControlledDelay: 20,
394
394
  defaultValue: u,
395
- onChange: (w) => {
395
+ onChange: (E) => {
396
396
  V && V({
397
397
  target: {
398
- value: w
398
+ value: E
399
399
  }
400
400
  });
401
401
  }
402
- }), he = (w) => {
403
- pe(w.target.value);
404
- }, ge = (w) => {
405
- I && f && U(!0), Y && Y(w);
406
- }, ye = (w) => {
407
- I && f && !M && U(!1), F && F(w);
402
+ }), O = (E) => {
403
+ T(E.target.value);
404
+ }, X = (E) => {
405
+ A && g && L(!0), M && M(E);
406
+ }, oe = (E) => {
407
+ A && g && !m && L(!1), F && F(E);
408
408
  };
409
- return j(() => {
410
- G && G.width && R(G.width + 18 + 10);
411
- }, [G]), j(() => {
412
- A && A.width && T(A.width + 18 + 10);
413
- }, [A]), j(() => {
414
- t || x && x.current && M !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
415
- }, [M, t]), j(() => {
409
+ return J(() => {
410
+ R && R.width && j(R.width + 18 + 10);
411
+ }, [R]), J(() => {
412
+ S && S.width && n(S.width + 18 + 10);
413
+ }, [S]), J(() => {
414
+ t || y && y.current && m !== void 0 && (y.current.style.height = "inherit", y.current.style.height = y.current.scrollHeight + "px");
415
+ }, [m, t]), J(() => {
416
416
  t || setTimeout(() => {
417
- L?.current?.style.setProperty(
417
+ U?.current?.style.setProperty(
418
418
  "--av-text-area-wrapper-transition",
419
- M ? "none" : "all 0.2s ease-out"
419
+ m ? "none" : "all 0.2s ease-out"
420
420
  );
421
421
  }, 0);
422
- }, [M, t]), j(() => {
423
- if (!t && x && x.current && M !== void 0) {
424
- const { labelOffset: w, helperTextOffset: te, scrollHeight: be } = rt({
425
- scrollHeight: x.current.scrollHeight,
426
- currentHeight: W.current,
427
- currentLabelOffset: z.current,
428
- currentHelperTextOffset: n.current
422
+ }, [m, t]), J(() => {
423
+ if (!t && y && y.current && m !== void 0) {
424
+ const { labelOffset: E, helperTextOffset: ne, scrollHeight: ke } = et({
425
+ scrollHeight: y.current.scrollHeight,
426
+ currentHeight: z.current,
427
+ currentLabelOffset: te.current,
428
+ currentHelperTextOffset: re.current
429
429
  });
430
- w && (z.current = w, L?.current?.style.setProperty(
430
+ E && (te.current = E, U?.current?.style.setProperty(
431
431
  "--av-text-area-label",
432
- `${w}px`
433
- )), te && (n.current = te, p?.current?.style.setProperty(
432
+ `${E}px`
433
+ )), ne && (re.current = ne, ae?.current?.style.setProperty(
434
434
  "--av-text-area-helper-text",
435
- `${te}px`
436
- )), W.current = be || W.current;
435
+ `${ne}px`
436
+ )), z.current = ke || z.current;
437
437
  }
438
- }, [M, t]), A.width > 0 && L?.current?.style.setProperty(
438
+ }, [m, t]), S.width > 0 && U?.current?.style.setProperty(
439
439
  "--tw-translate-x",
440
- `${12 + A.width + 5}px`
441
- ), /* @__PURE__ */ N("div", { className: D.wrapper, children: [
442
- /* @__PURE__ */ l(
440
+ `${12 + S.width + 5}px`
441
+ ), /* @__PURE__ */ b("div", { className: k.wrapper, children: [
442
+ /* @__PURE__ */ s(
443
443
  "label",
444
444
  {
445
- htmlFor: E,
446
- id: C,
447
- className: D.accessibleLabel,
445
+ htmlFor: D,
446
+ id: I,
447
+ className: k.accessibleLabel,
448
448
  children: r
449
449
  }
450
450
  ),
451
- S && /* @__PURE__ */ l(
451
+ _ && /* @__PURE__ */ s(
452
452
  "div",
453
453
  {
454
- ref: Q,
455
- className: D.leftElement,
456
- children: S
454
+ ref: ee,
455
+ className: k.leftElement,
456
+ children: _
457
457
  }
458
458
  ),
459
- /* @__PURE__ */ l(
459
+ /* @__PURE__ */ s(
460
460
  "textarea",
461
461
  {
462
462
  ref: K,
463
- id: E,
463
+ id: D,
464
464
  name: a,
465
- disabled: b,
465
+ disabled: w,
466
466
  placeholder: t ? void 0 : " ",
467
- className: D.textArea,
467
+ className: k.textArea,
468
468
  rows: 1,
469
- ...f && { "aria-describedby": `${E}-helper` },
469
+ ...g && { "aria-describedby": `${D}-helper` },
470
470
  ...o && { "aria-invalid": "true" },
471
- ...k && !S && !t && { style: { paddingRight: H } },
472
- ...S && !k && !t && { style: { paddingLeft: y } },
473
- ...k && S && !t && {
471
+ ...N && !_ && !t && { style: { paddingRight: W } },
472
+ ..._ && !N && !t && { style: { paddingLeft: q } },
473
+ ...N && _ && !t && {
474
474
  style: {
475
- paddingRight: H,
476
- paddingLeft: y
475
+ paddingRight: W,
476
+ paddingLeft: q
477
477
  }
478
478
  },
479
- value: M,
480
- onChange: he,
481
- onFocus: ge,
482
- onBlur: ye,
483
- ...q
479
+ value: m,
480
+ onChange: O,
481
+ onFocus: X,
482
+ onBlur: oe,
483
+ ...G
484
484
  }
485
485
  ),
486
- !t && /* @__PURE__ */ l(
486
+ !t && /* @__PURE__ */ s(
487
487
  "label",
488
488
  {
489
- ref: L,
489
+ ref: U,
490
490
  "aria-hidden": !0,
491
- htmlFor: E,
492
- className: `${D.visibleLabel}`,
491
+ htmlFor: D,
492
+ className: `${k.visibleLabel}`,
493
493
  children: r
494
494
  }
495
495
  ),
496
- O && /* @__PURE__ */ l(
496
+ h && /* @__PURE__ */ s(
497
497
  "div",
498
498
  {
499
- ref: p,
500
- id: `${E}-helper`,
501
- className: D.helperText,
502
- children: f
499
+ ref: ae,
500
+ id: `${D}-helper`,
501
+ className: k.helperText,
502
+ children: g
503
503
  }
504
504
  ),
505
- k && /* @__PURE__ */ l(
505
+ N && /* @__PURE__ */ s(
506
506
  "div",
507
507
  {
508
- ref: Z,
509
- className: D.rightElement,
510
- children: k
508
+ ref: Q,
509
+ className: k.rightElement,
510
+ children: N
511
511
  }
512
512
  ),
513
- o && f && /* @__PURE__ */ l(Ye, { politeness: "polite", clearAnnouncementDelay: 500, children: ee })
513
+ o && g && /* @__PURE__ */ s(je, { politeness: "polite", clearAnnouncementDelay: 500, children: Y })
514
514
  ] });
515
515
  }
516
516
  );
517
- oe.displayName = "TextArea";
517
+ ce.displayName = "TextArea";
518
518
  /*!
519
519
  @versini/ui-textarea v4.0.11
520
520
  © 2025 gizmette.com
@@ -528,7 +528,7 @@ try {
528
528
  });
529
529
  } catch {
530
530
  }
531
- const at = "av-toggle", ot = ({ narrow: e }) => i(
531
+ const tt = "av-toggle", rt = ({ narrow: e }) => i(
532
532
  "peer",
533
533
  "rounded-full",
534
534
  {
@@ -537,7 +537,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
537
537
  },
538
538
  // Smooth background/border transition when toggling
539
539
  "transition-colors duration-300 ease-in-out motion-reduce:transition-none"
540
- ), nt = ({
540
+ ), at = ({
541
541
  focusMode: e
542
542
  }) => i(
543
543
  "peer-focus:outline",
@@ -549,7 +549,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
549
549
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
550
550
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
551
551
  }
552
- ), st = ({ narrow: e }) => i(
552
+ ), ot = ({ narrow: e }) => i(
553
553
  {
554
554
  "peer-checked:after:translate-x-full": !e,
555
555
  "peer-checked:after:translate-x-4": e
@@ -559,7 +559,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
559
559
  // knob circle and border color when checked
560
560
  "peer-checked:after:bg-white",
561
561
  "peer-checked:after:border-white"
562
- ), lt = ({ narrow: e }) => i(
562
+ ), nt = ({ narrow: e }) => i(
563
563
  "after:left-[2px]",
564
564
  "after:top-[2px]",
565
565
  "after:border",
@@ -575,7 +575,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
575
575
  // Narrow toggle knob (oval)
576
576
  " after:h-4 after:w-7": e
577
577
  }
578
- ), ct = ({
578
+ ), st = ({
579
579
  mode: e,
580
580
  noBorder: a
581
581
  }) => i({
@@ -584,7 +584,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
584
584
  "border-border-light bg-surface-darker": e === "dark",
585
585
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
586
586
  "border-border-medium bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
587
- }), it = ({
587
+ }), lt = ({
588
588
  mode: e,
589
589
  labelHidden: a
590
590
  }) => a ? "sr-only" : i("ml-2 text-sm", {
@@ -592,63 +592,63 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
592
592
  "text-copy-lighter": e === "dark",
593
593
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
594
594
  "text-copy-dark dark:text-copy-lighter": e === "system"
595
- }), dt = ({ className: e }) => i(
596
- at,
595
+ }), ct = ({ className: e }) => i(
596
+ tt,
597
597
  "relative flex cursor-pointer items-center",
598
598
  e
599
- ), ut = ({
599
+ ), it = ({
600
600
  mode: e,
601
601
  focusMode: a,
602
602
  labelHidden: r,
603
603
  className: o,
604
604
  noBorder: t,
605
- narrow: s
605
+ narrow: l
606
606
  }) => ({
607
607
  toggle: i(
608
- ot({ narrow: s }),
609
- ct({ mode: e, noBorder: t }),
610
- nt({ focusMode: a }),
611
- lt({ narrow: s }),
612
- st({ narrow: s })
608
+ rt({ narrow: l }),
609
+ st({ mode: e, noBorder: t }),
610
+ at({ focusMode: a }),
611
+ nt({ narrow: l }),
612
+ ot({ narrow: l })
613
613
  ),
614
- label: it({ mode: e, labelHidden: r }),
614
+ label: lt({ mode: e, labelHidden: r }),
615
615
  input: "peer sr-only",
616
- wrapper: dt({ className: o })
616
+ wrapper: ct({ className: o })
617
617
  }), B = ({
618
618
  checked: e = !1,
619
619
  onChange: a,
620
620
  label: r,
621
621
  labelHidden: o = !1,
622
622
  name: t,
623
- mode: s = "system",
623
+ mode: l = "system",
624
624
  focusMode: c = "system",
625
625
  className: d,
626
- noBorder: m = !1,
627
- narrow: g = !1
626
+ noBorder: f = !1,
627
+ narrow: x = !1
628
628
  }) => {
629
- const u = ut({
630
- mode: s,
629
+ const u = it({
630
+ mode: l,
631
631
  focusMode: c,
632
632
  labelHidden: o,
633
633
  className: d,
634
- noBorder: m,
635
- narrow: g
636
- }), b = (_) => {
637
- a?.(_.target.checked);
634
+ noBorder: f,
635
+ narrow: x
636
+ }), w = (C) => {
637
+ a?.(C.target.checked);
638
638
  };
639
- return /* @__PURE__ */ N("label", { className: u.wrapper, children: [
640
- /* @__PURE__ */ l(
639
+ return /* @__PURE__ */ b("label", { className: u.wrapper, children: [
640
+ /* @__PURE__ */ s(
641
641
  "input",
642
642
  {
643
643
  name: t,
644
644
  checked: e,
645
645
  type: "checkbox",
646
646
  className: u.input,
647
- onChange: b
647
+ onChange: w
648
648
  }
649
649
  ),
650
- /* @__PURE__ */ l("div", { className: u.toggle }),
651
- /* @__PURE__ */ l("span", { className: u.label, children: r })
650
+ /* @__PURE__ */ s("div", { className: u.toggle }),
651
+ /* @__PURE__ */ s("span", { className: u.label, children: r })
652
652
  ] });
653
653
  };
654
654
  /*!
@@ -664,138 +664,150 @@ try {
664
664
  });
665
665
  } catch {
666
666
  }
667
- const yt = ({
667
+ const pt = ({
668
668
  open: e,
669
669
  onOpenChange: a
670
670
  }) => {
671
- const { getAccessToken: r, user: o } = ke(), {
671
+ const { getAccessToken: r, user: o } = xe(), {
672
672
  data: t,
673
- isSuccess: s,
673
+ isSuccess: l,
674
674
  refetch: c
675
- } = Ie({
675
+ } = Se({
676
676
  user: o?.username,
677
677
  getAccessToken: r
678
- }), [d, m] = h({
678
+ }), [d, f] = p({
679
679
  loadingLocation: !1
680
- }), [g, u] = h({
680
+ }), [x, u] = p({
681
681
  prompts: []
682
- }), [b, _] = h(""), [C, f] = h(""), [I, k] = h(!1), [S, V] = h(!1), [Y, F] = h(!1), [q, J] = h(!1), [, x] = Ae({
683
- key: xe + Ee,
684
- initialValue: !1
685
- }), K = (n) => {
686
- J(n);
687
- }, Z = (n) => {
688
- k(n);
689
- }, G = (n) => {
682
+ }), [w, C] = p(""), [I, g] = p(""), [A, N] = p(!1), [_, V] = p(!1), [M, F] = p(!1), [G, Z] = p(!1), [y, K] = p(null), [Q, R] = p(!1), [ee, S] = p(!1), z = (n) => {
683
+ S(n);
684
+ }, te = (n) => {
685
+ N(n);
686
+ }, U = (n) => {
690
687
  V(n);
691
- }, Q = async (n) => {
692
- x(n), F(n), await Se(n);
693
- }, A = async (n) => {
688
+ }, re = (n) => {
689
+ Z(n);
690
+ }, ae = async (n) => {
694
691
  n.preventDefault();
695
692
  try {
696
- await se({
693
+ await de({
697
694
  accessToken: await r(),
698
- type: le.SET_USER_PREFERENCES,
695
+ type: ue.SET_USER_PREFERENCES,
699
696
  params: {
700
697
  user: o?.username,
701
- instructions: b,
702
- location: C,
698
+ instructions: w,
699
+ location: I,
703
700
  provider: t?.provider,
704
- tags: g.prompts,
705
- sendOnEnter: I,
706
- useMemory: S,
707
- showDetails: q
701
+ tags: x.prompts,
702
+ sendOnEnter: A,
703
+ useMemory: _,
704
+ showDetails: ee
708
705
  }
709
- }), c(), m({
706
+ }), G !== M && (await _e(G), F(G)), c(), f({
710
707
  loadingLocation: !1
711
708
  });
712
709
  } catch {
713
710
  }
714
- }, W = async () => {
715
- m({
711
+ }, D = async () => {
712
+ f({
716
713
  loadingLocation: !0
717
- }), f("...");
714
+ }), g("...");
718
715
  try {
719
- const n = Date.now(), p = await Ce(), E = await se({
716
+ const n = Date.now(), h = await Ie(), L = await de({
720
717
  accessToken: await r(),
721
- type: le.GET_LOCATION,
718
+ type: ue.GET_LOCATION,
722
719
  params: {
723
- latitude: p.latitude,
724
- longitude: p.longitude
720
+ latitude: h.latitude,
721
+ longitude: h.longitude
725
722
  }
726
- }), R = Date.now() - n;
727
- if (R < 2e3 && await new Promise((y) => setTimeout(y, 2e3 - R)), E.status === 200) {
728
- const { city: y, state: T, country: O, displayName: U } = E.data, ee = y && T && O ? `${y}, ${T}, ${O}` : U;
729
- m({
723
+ }), k = Date.now() - n;
724
+ if (k < 2e3 && await new Promise((m) => setTimeout(m, 2e3 - k)), L.status === 200) {
725
+ const { city: m, state: T, country: O, displayName: X } = L.data, oe = m && T && O ? `${m}, ${T}, ${O}` : X;
726
+ f({
730
727
  loadingLocation: !1
731
- }), f(ee);
728
+ }), g(oe);
732
729
  } else
733
- m({
730
+ f({
734
731
  loadingLocation: !1
735
732
  });
736
733
  } catch {
737
734
  }
738
- }, z = () => {
735
+ }, W = () => {
739
736
  c(), a(!1);
740
- }, L = ({
737
+ }, j = ({
741
738
  enabled: n = !1,
742
- privateChat: p = !1,
743
- clipboardAccess: E = !1,
744
- ...H
739
+ privateChat: h = !1,
740
+ clipboardAccess: L = !1,
741
+ ...Y
745
742
  }) => {
746
- u((R) => {
747
- const y = R.prompts, T = {
748
- ...H,
743
+ u((k) => {
744
+ const m = k.prompts, T = {
745
+ ...Y,
749
746
  enabled: n,
750
- privateChat: p,
751
- clipboardAccess: E
747
+ privateChat: h,
748
+ clipboardAccess: L
752
749
  };
753
- E ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
754
- const O = y.findIndex((U) => U.slot === H.slot);
750
+ L ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
751
+ const O = m.findIndex((X) => X.slot === Y.slot);
755
752
  return O === -1 ? {
756
- ...R,
757
- prompts: [...y, { ...T }]
758
- } : (y[O] = T, {
759
- ...R,
760
- prompts: [...y]
753
+ ...k,
754
+ prompts: [...m, { ...T }]
755
+ } : (m[O] = T, {
756
+ ...k,
757
+ prompts: [...m]
761
758
  });
762
759
  });
763
- };
764
- return X(() => {
765
- t?.instructions && _(t.instructions), t?.location && f(t.location), t?.tags && u({ prompts: t.tags }), t?.sendOnEnter !== void 0 && k(t.sendOnEnter), t?.useMemory !== void 0 && V(t.useMemory), t?.showDetails !== void 0 && J(t.showDetails), F(Te());
766
- }, [t]), s ? /* @__PURE__ */ N(
767
- Le,
760
+ }, q = pe(async () => {
761
+ try {
762
+ R(!0);
763
+ const n = await we();
764
+ K(n);
765
+ } catch {
766
+ } finally {
767
+ R(!1);
768
+ }
769
+ }, []);
770
+ return $(() => {
771
+ if (!t)
772
+ return;
773
+ t.instructions && C(t.instructions), t.location && g(t.location), t.tags && u({ prompts: t.tags }), t.sendOnEnter !== void 0 && N(t.sendOnEnter), t.useMemory !== void 0 && V(t.useMemory), t.showDetails !== void 0 && S(t.showDetails);
774
+ const n = Ne();
775
+ F(n), Z(n);
776
+ }, [t]), $(() => {
777
+ M ? q() : K(null);
778
+ }, [M, q]), l ? /* @__PURE__ */ b(
779
+ Ae,
768
780
  {
769
781
  open: e,
770
- onOpenChange: z,
771
- title: we,
782
+ onOpenChange: W,
783
+ title: Te,
772
784
  animation: !0,
773
785
  animationType: "fade",
774
- footer: /* @__PURE__ */ N(
775
- _e,
786
+ footer: /* @__PURE__ */ b(
787
+ Ce,
776
788
  {
777
789
  columnGap: 2,
778
790
  alignHorizontal: "flex-end",
779
791
  className: "pb-8 sm:pb-0",
780
792
  children: [
781
- /* @__PURE__ */ l(ne, { children: /* @__PURE__ */ l(
782
- re,
793
+ /* @__PURE__ */ s(ie, { children: /* @__PURE__ */ s(
794
+ se,
783
795
  {
784
796
  mode: "dark",
785
797
  variant: "secondary",
786
798
  focusMode: "light",
787
799
  noBorder: !0,
788
- onClick: z,
800
+ onClick: W,
789
801
  children: "Cancel"
790
802
  }
791
803
  ) }),
792
- /* @__PURE__ */ l(ne, { children: /* @__PURE__ */ l(
793
- re,
804
+ /* @__PURE__ */ s(ie, { children: /* @__PURE__ */ s(
805
+ se,
794
806
  {
795
807
  mode: "dark",
796
808
  focusMode: "light",
797
809
  onClick: async (n) => {
798
- a(!1), await A(n);
810
+ a(!1), await ae(n);
799
811
  },
800
812
  children: "Save"
801
813
  }
@@ -804,66 +816,66 @@ const yt = ({
804
816
  }
805
817
  ),
806
818
  children: [
807
- /* @__PURE__ */ N(
808
- $,
819
+ /* @__PURE__ */ b(
820
+ H,
809
821
  {
810
822
  header: P.SETTINGS_DETAILS.TITLE,
811
823
  className: "prose-dark dark:prose-lighter",
812
824
  noBorder: !0,
813
825
  children: [
814
- /* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_DETAILS.DETAILS }),
815
- /* @__PURE__ */ l(
826
+ /* @__PURE__ */ s("p", { className: "text-sm", children: P.SETTINGS_DETAILS.DETAILS }),
827
+ /* @__PURE__ */ s(
816
828
  B,
817
829
  {
818
830
  narrow: !0,
819
831
  className: "mt-2",
820
832
  label: "Show Message Statistics",
821
833
  name: "show-message-statistics",
822
- onChange: K,
823
- checked: q
834
+ onChange: z,
835
+ checked: ee
824
836
  }
825
837
  ),
826
- /* @__PURE__ */ l("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.SEND_ON_ENTER }),
827
- /* @__PURE__ */ l(
838
+ /* @__PURE__ */ s("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.SEND_ON_ENTER }),
839
+ /* @__PURE__ */ s(
828
840
  B,
829
841
  {
830
842
  narrow: !0,
831
843
  className: "mt-2",
832
844
  label: "Send Message on Enter",
833
845
  name: "send-message-on-enter",
834
- onChange: Z,
835
- checked: I
846
+ onChange: te,
847
+ checked: A
836
848
  }
837
849
  ),
838
- /* @__PURE__ */ l("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.USE_MEMORY }),
839
- /* @__PURE__ */ l(
850
+ /* @__PURE__ */ s("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.USE_MEMORY }),
851
+ /* @__PURE__ */ s(
840
852
  B,
841
853
  {
842
854
  narrow: !0,
843
855
  className: "mt-2",
844
856
  label: "Use Memory",
845
857
  name: "use-memory",
846
- onChange: G,
847
- checked: S
858
+ onChange: U,
859
+ checked: _
848
860
  }
849
861
  )
850
862
  ]
851
863
  }
852
864
  ),
853
- /* @__PURE__ */ N(
854
- $,
865
+ /* @__PURE__ */ b(
866
+ H,
855
867
  {
856
868
  header: "Custom Instructions",
857
869
  className: "prose-dark dark:prose-lighter mt-4",
858
870
  noBorder: !0,
859
871
  children: [
860
- /* @__PURE__ */ N("p", { className: "text-sm", children: [
872
+ /* @__PURE__ */ b("p", { className: "text-sm", children: [
861
873
  "What would you like ",
862
- /* @__PURE__ */ l("em", { children: Ne }),
874
+ /* @__PURE__ */ s("em", { children: Ee }),
863
875
  " to know about you to provide better responses?"
864
876
  ] }),
865
- /* @__PURE__ */ l(
866
- oe,
877
+ /* @__PURE__ */ s(
878
+ ce,
867
879
  {
868
880
  mode: "alt-system",
869
881
  autoCapitalize: "off",
@@ -871,9 +883,9 @@ const yt = ({
871
883
  autoCorrect: "off",
872
884
  name: "customInstructions",
873
885
  label: "Custom Instructions",
874
- value: b,
886
+ value: w,
875
887
  onChange: (n) => {
876
- _(n.target.value);
888
+ C(n.target.value);
877
889
  },
878
890
  helperText: "Press ENTER to add a new line."
879
891
  }
@@ -881,82 +893,60 @@ const yt = ({
881
893
  ]
882
894
  }
883
895
  ),
884
- /* @__PURE__ */ N(
885
- $,
896
+ /* @__PURE__ */ b(
897
+ H,
886
898
  {
887
899
  header: "Location",
888
900
  className: "prose-dark dark:prose-lighter mt-4",
889
901
  noBorder: !0,
890
902
  children: [
891
- /* @__PURE__ */ l("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
892
- /* @__PURE__ */ l(
893
- oe,
903
+ /* @__PURE__ */ s("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
904
+ /* @__PURE__ */ s(
905
+ ce,
894
906
  {
895
907
  mode: "alt-system",
896
908
  name: "location",
897
909
  label: "Location",
898
- value: C,
910
+ value: I,
899
911
  onChange: (n) => {
900
- f(n.target.value);
912
+ g(n.target.value);
901
913
  },
902
914
  helperText: "Enter your location or press auto-detect."
903
915
  }
904
916
  ),
905
- /* @__PURE__ */ l(
906
- re,
917
+ /* @__PURE__ */ s(
918
+ se,
907
919
  {
908
920
  className: "mt-2",
909
921
  size: "small",
910
922
  noBorder: !0,
911
923
  variant: "secondary",
912
924
  disabled: d.loadingLocation,
913
- onClick: W,
925
+ onClick: D,
914
926
  children: d.loadingLocation ? "Detecting..." : "Auto-detect"
915
927
  }
916
928
  )
917
929
  ]
918
930
  }
919
931
  ),
920
- /* @__PURE__ */ N(
921
- $,
922
- {
923
- header: P.SETTINGS_CACHING.TITLE,
924
- className: "prose-dark dark:prose-lighter mt-4",
925
- noBorder: !0,
926
- children: [
927
- /* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_CACHING.DESCRIPTION }),
928
- /* @__PURE__ */ l(
929
- B,
930
- {
931
- narrow: !0,
932
- className: "mt-2",
933
- label: "Enable Assets Caching",
934
- name: "enable-service-worker",
935
- onChange: Q,
936
- checked: Y
937
- }
938
- )
939
- ]
940
- }
941
- ),
942
- /* @__PURE__ */ N(
943
- $,
932
+ /* @__PURE__ */ b(
933
+ H,
944
934
  {
945
935
  header: P.SETTINGS_PROMPTS.TITLE,
946
936
  className: "prose-dark dark:prose-lighter mt-4",
947
937
  noBorder: !0,
948
938
  children: [
949
- /* @__PURE__ */ l("p", { className: "text-sm", children: ve }),
950
- g.prompts && g.prompts.slice(0, 3).map((n) => /* @__PURE__ */ N(
951
- $,
939
+ /* @__PURE__ */ s("p", { className: "text-sm", children: ve }),
940
+ x.prompts && x.prompts.slice(0, 3).map((n) => /* @__PURE__ */ b(
941
+ H,
952
942
  {
953
943
  mode: "dark",
954
944
  noBorder: !0,
955
945
  header: n.label.replace("...", ""),
956
946
  className: "prose-light mb-2",
957
947
  children: [
958
- /* @__PURE__ */ l("p", { className: "text-sm", children: n.description }),
959
- /* @__PURE__ */ l(
948
+ /* @__PURE__ */ s("p", { className: "text-sm", children: n.description }),
949
+ /* @__PURE__ */ s(
960
950
  B,
961
951
  {
962
952
  narrow: !0,
@@ -966,16 +956,16 @@ const yt = ({
966
956
  noBorder: !0,
967
957
  label: "Enabled",
968
958
  name: n.slot.toString(),
969
- onChange: (p) => {
970
- L({
959
+ onChange: (h) => {
960
+ j({
971
961
  ...n,
972
- enabled: p
962
+ enabled: h
973
963
  });
974
964
  },
975
965
  checked: n.enabled
976
966
  }
977
967
  ),
978
- /* @__PURE__ */ l(
968
+ /* @__PURE__ */ s(
979
969
  B,
980
970
  {
981
971
  narrow: !0,
@@ -985,16 +975,16 @@ const yt = ({
985
975
  noBorder: !0,
986
976
  label: "Private Chat",
987
977
  name: `private-${n.slot.toString()}`,
988
- onChange: (p) => {
989
- L({
978
+ onChange: (h) => {
979
+ j({
990
980
  ...n,
991
- privateChat: p
981
+ privateChat: h
992
982
  });
993
983
  },
994
984
  checked: n.privateChat
995
985
  }
996
986
  ),
997
- /* @__PURE__ */ l(
987
+ /* @__PURE__ */ s(
998
988
  B,
999
989
  {
1000
990
  narrow: !0,
@@ -1004,10 +994,10 @@ const yt = ({
1004
994
  noBorder: !0,
1005
995
  label: "Use Clipboard",
1006
996
  name: `clipboard-${n.slot.toString()}`,
1007
- onChange: (p) => {
1008
- L({
997
+ onChange: (h) => {
998
+ j({
1009
999
  ...n,
1010
- clipboardAccess: p
1000
+ clipboardAccess: h
1011
1001
  });
1012
1002
  },
1013
1003
  checked: n.clipboardAccess
@@ -1019,11 +1009,56 @@ const yt = ({
1019
1009
  ))
1020
1010
  ]
1021
1011
  }
1012
+ ),
1013
+ /* @__PURE__ */ b(
1014
+ H,
1015
+ {
1016
+ header: P.SETTINGS_CACHING.TITLE,
1017
+ className: "prose-dark dark:prose-lighter mt-4 ",
1018
+ noBorder: !0,
1019
+ children: [
1020
+ /* @__PURE__ */ s("p", { className: "text-sm", children: P.SETTINGS_CACHING.DESCRIPTION }),
1021
+ /* @__PURE__ */ s(
1022
+ B,
1023
+ {
1024
+ narrow: !0,
1025
+ className: "mt-2",
1026
+ label: "Enable Assets Caching",
1027
+ name: "enable-service-worker",
1028
+ onChange: re,
1029
+ checked: G
1030
+ }
1031
+ ),
1032
+ M && /* @__PURE__ */ b("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
1033
+ /* @__PURE__ */ s("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
1034
+ y ? /* @__PURE__ */ b("div", { className: "text-xs space-y-2", children: [
1035
+ /* @__PURE__ */ b("p", { className: "m-0", children: [
1036
+ "Version: ",
1037
+ /* @__PURE__ */ s("strong", { children: y.version })
1038
+ ] }),
1039
+ /* @__PURE__ */ b("p", { className: "m-0", children: [
1040
+ "Total Items: ",
1041
+ /* @__PURE__ */ s("strong", { children: y.totalItems })
1042
+ ] }),
1043
+ y.caches.map((n) => /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: n.urls.map((h) => /* @__PURE__ */ s(
1044
+ "li",
1045
+ {
1046
+ className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
1047
+ title: h,
1048
+ children: new URL(h).pathname
1049
+ },
1050
+ h
1051
+ )) }) }, n.name)),
1052
+ y.totalItems === 0 && !Q && /* @__PURE__ */ s("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
1053
+ ] }) : /* @__PURE__ */ s("p", { className: "text-xs opacity-70 m-0", children: Q ? "Loading cache info..." : "No cache info available." })
1054
+ ] })
1055
+ ]
1056
+ }
1022
1057
  )
1023
1058
  ]
1024
1059
  }
1025
1060
  ) : null;
1026
1061
  };
1027
1062
  export {
1028
- yt as SettingsPanel
1063
+ pt as SettingsPanel
1029
1064
  };