@versini/sassysaint 8.46.0 → 8.47.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 (22) hide show
  1. package/dist/chunks/{AboutChangelog.Dn5w_I40.js → AboutChangelog.CrPmttGh.js} +2 -2
  2. package/dist/chunks/{AboutEntry.B5i-spF2.js → AboutEntry.CW6LSgBo.js} +7 -7
  3. package/dist/chunks/{App.BRLXTPuI.js → App.P8VuaklL.js} +3255 -4024
  4. package/dist/chunks/{Chart.CMXUufSF.js → Chart.v46ZrHpO.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.C8s8IJji.js → ChatBubbleAssistant.Dm3w8aPQ.js} +10 -10
  6. package/dist/chunks/{ChatHistoryTable.DSIpfU3W.js → ChatHistoryTable.DiXFgbUY.js} +25 -25
  7. package/dist/chunks/{HistoryEntry.2bNTf4-u.js → HistoryEntry.8-r_XaOl.js} +22 -22
  8. package/dist/chunks/{LNWAZHJI.BmS0H8zm.js → LNWAZHJI.ucCV8_lF.js} +1 -1
  9. package/dist/chunks/{ProfileEntry.Dn_Yvyfp.js → ProfileEntry.Db0i4H1-.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.C3v0uw1a.js → SettingsEntry.DiEffW-W.js} +267 -265
  11. package/dist/chunks/{UsageEntry.DvPh7Q08.js → UsageEntry.DTwtBL3G.js} +8 -8
  12. package/dist/chunks/{index.DGWKv05_.js → index.B6LTE4XZ.js} +2 -2
  13. package/dist/chunks/{index.BIiKYak6.js → index.BdOUWeMA.js} +1 -1
  14. package/dist/chunks/{index.ihPfo4Pu.js → index.D6DtPtKF.js} +1 -1
  15. package/dist/chunks/{index.DFaB5gt5.js → index.DAma765y.js} +1 -1
  16. package/dist/chunks/{index.CZTwv4Z4.js → index.DxRpe0Fx.js} +2906 -2043
  17. package/dist/chunks/{index.BJOyhdWZ.js → index.WoNpwqiR.js} +3 -3
  18. package/dist/chunks/{index.CDYuHLT5.js → index.ihYh1tax.js} +1 -1
  19. package/dist/chunks/{useMarkdown.x-5Fhdu8.js → useMarkdown.CrlE9bFj.js} +6 -6
  20. package/dist/components/SassySaint/SassySaint.js +1 -1
  21. package/dist/index.js +4 -4
  22. package/package.json +3 -3
@@ -1,9 +1,9 @@
1
- import { jsxs as g, jsx as a } from "react/jsx-runtime";
2
- import { o as pe, h as ie, i as ge, x as ye, n as be, getCacheInfo as xe, isServiceWorkerEnabled as ke, SETTINGS_TITLE as we, S as H, CARDS as O, Oe as Ne, C as se, PROMPTS_DESCRIPTION as Ee, L as Te, j as de, getCurrentGeoLocation as ve, handleServiceWorkerToggle as Se } from "./index.CZTwv4Z4.js";
3
- import { useUserPreferences as Ce, se as Ie, mutateCall as ue, SERVICE_TYPES as me } from "./App.BRLXTPuI.js";
4
- import _e, { useState as f, useEffect as ne, useRef as U, useLayoutEffect as q, useCallback as Le } from "react";
1
+ import { jsxs as m, jsx as a, Fragment as pe } from "react/jsx-runtime";
2
+ import { o as ge, h as ie, i as ye, x as be, n as xe, useUserPreferences as ke, pe as we, getCacheInfo as Ne, isServiceWorkerEnabled as Ee, SETTINGS_TITLE as Te, S as V, CARDS as R, de as ve, C as se, PROMPTS_DESCRIPTION as Se, L as Ce, j as de, getCurrentGeoLocation as Ie, mutateCall as ue, handleServiceWorkerToggle as _e, SERVICE_TYPES as me } from "./index.DxRpe0Fx.js";
3
+ import { useCapability as Le, se as Me } from "./App.P8VuaklL.js";
4
+ import Oe, { useState as f, useEffect as ne, useRef as W, useLayoutEffect as Y, useCallback as Pe } from "react";
5
5
  import c from "clsx";
6
- function Me({
6
+ function Ae({
7
7
  value: e,
8
8
  defaultValue: s,
9
9
  finalValue: o,
@@ -11,30 +11,30 @@ function Me({
11
11
  },
12
12
  initialControlledDelay: r = 0
13
13
  }) {
14
- const [n, u] = f(!1), [h, x] = f(
14
+ const [n, d] = f(!1), [h, x] = f(
15
15
  s !== void 0 ? s : o
16
- ), k = (m) => {
17
- x(m), l?.(m);
16
+ ), k = (u) => {
17
+ x(u), l?.(u);
18
18
  };
19
19
  return ne(() => {
20
20
  (async () => e !== void 0 && !n && r > 0 && (await new Promise(
21
- (m) => setTimeout(m, r)
22
- ), u(!0)))();
21
+ (u) => setTimeout(u, r)
22
+ ), d(!0)))();
23
23
  }, [e, r, n]), e !== void 0 ? !n && r > 0 ? ["", l, !0] : [e, l, !0] : [h, k, !1];
24
24
  }
25
- const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helper-text", Ae = "av-text-area__control--right", Oe = "av-text-area__control--left", Be = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", De = ({ mode: e }) => c({
25
+ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helper-text", Be = "av-text-area__control--right", De = "av-text-area__control--left", Ge = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", He = ({ mode: e }) => c({
26
26
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
27
27
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
28
28
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
29
29
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
30
- }), Re = ({
30
+ }), Ue = ({
31
31
  focusMode: e
32
32
  }) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
33
33
  "focus:outline-focus-dark": e === "dark",
34
34
  "focus:outline-focus-light": e === "light",
35
35
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
36
36
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
37
- }), Ge = ({
37
+ }), $e = ({
38
38
  noBorder: e,
39
39
  error: s
40
40
  }) => c("border-2", {
@@ -42,7 +42,7 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
42
42
  "focus:border-border-dark": !e && s,
43
43
  "border-border-error-dark": !e && s,
44
44
  "border-transparent": e
45
- }), He = ({
45
+ }), Ve = ({
46
46
  disabled: e,
47
47
  raw: s,
48
48
  error: o,
@@ -81,7 +81,7 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
81
81
  "text-copy-medium dark:text-copy-error-dark": l === "alt-system"
82
82
  }
83
83
  );
84
- }, Ue = ({
84
+ }, We = ({
85
85
  error: e,
86
86
  raw: s,
87
87
  mode: o,
@@ -108,58 +108,58 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
108
108
  "text-copy-error-dark dark:text-copy-error-light": o === "system",
109
109
  "dark:text-copy-error-dark text-copy-error-light": o === "alt-system"
110
110
  });
111
- }, Ve = ({
111
+ }, ze = ({
112
112
  className: e,
113
113
  textAreaClassName: s,
114
114
  raw: o,
115
115
  focusMode: l,
116
116
  disabled: r,
117
117
  noBorder: n,
118
- error: u,
118
+ error: d,
119
119
  mode: h,
120
120
  leftElement: x,
121
121
  rightElement: k
122
122
  }) => {
123
- const m = o ? e : c(
123
+ const u = o ? e : c(
124
124
  "relative flex w-full flex-col justify-center",
125
- Pe,
125
+ Re,
126
126
  e
127
- ), T = o ? c(s) : c(
127
+ ), v = o ? c(s) : c(
128
128
  fe,
129
129
  s,
130
- Be(),
131
- De({ mode: h }),
132
- Re({ focusMode: l }),
133
- Ge({
130
+ Ge(),
131
+ He({ mode: h }),
132
+ Ue({ focusMode: l }),
133
+ $e({
134
134
  noBorder: n,
135
- error: u
135
+ error: d
136
136
  }),
137
137
  {
138
138
  "disabled:cursor-not-allowed disabled:opacity-50": r
139
139
  }
140
- ), C = o ? void 0 : "sr-only", D = He({
140
+ ), I = o ? void 0 : "sr-only", D = Ve({
141
141
  disabled: r,
142
142
  raw: o,
143
- error: u,
143
+ error: d,
144
144
  mode: h,
145
145
  rightElement: k,
146
146
  leftElement: x
147
- }), y = Ue({
148
- error: u,
147
+ }), y = We({
148
+ error: d,
149
149
  raw: o,
150
150
  mode: h,
151
151
  disabled: r
152
- }), I = o ? void 0 : c(Ae, "absolute"), w = o ? void 0 : c(Oe, "absolute");
152
+ }), _ = o ? void 0 : c(Be, "absolute"), w = o ? void 0 : c(De, "absolute");
153
153
  return {
154
- wrapper: m,
155
- textArea: T,
156
- accessibleLabel: C,
154
+ wrapper: u,
155
+ textArea: v,
156
+ accessibleLabel: I,
157
157
  visibleLabel: D,
158
158
  helperText: y,
159
- rightElement: I,
159
+ rightElement: _,
160
160
  leftElement: w
161
161
  };
162
- }, $e = ({
162
+ }, Fe = ({
163
163
  scrollHeight: e,
164
164
  currentHeight: s,
165
165
  currentLabelOffset: o = 0,
@@ -167,15 +167,15 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
167
167
  }) => {
168
168
  let r, n;
169
169
  if (e > 0 && e !== s) {
170
- const u = e - s, h = Math.abs(u / 24);
171
- r = o + -1 * Math.sign(u) * (12 * h), n = l + Math.sign(u) * (12 * h);
170
+ const d = e - s, h = Math.abs(d / 24);
171
+ r = o + -1 * Math.sign(d) * (12 * h), n = l + Math.sign(d) * (12 * h);
172
172
  }
173
173
  return {
174
174
  labelOffset: r,
175
175
  helperTextOffset: n,
176
176
  scrollHeight: e
177
177
  };
178
- }, ce = _e.forwardRef(
178
+ }, ce = Oe.forwardRef(
179
179
  ({
180
180
  id: e,
181
181
  name: s,
@@ -183,159 +183,159 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
183
183
  error: l = !1,
184
184
  raw: r = !1,
185
185
  className: n,
186
- textAreaClassName: u,
186
+ textAreaClassName: d,
187
187
  mode: h = "system",
188
188
  focusMode: x = "system",
189
189
  value: k,
190
- defaultValue: m,
191
- disabled: T = !1,
192
- noBorder: C = !1,
190
+ defaultValue: u,
191
+ disabled: v = !1,
192
+ noBorder: I = !1,
193
193
  labelId: D,
194
194
  helperText: y = "",
195
- helperTextOnFocus: I = !1,
195
+ helperTextOnFocus: _ = !1,
196
196
  rightElement: w,
197
- leftElement: v,
198
- onChange: V,
197
+ leftElement: S,
198
+ onChange: z,
199
199
  onFocus: L,
200
- onBlur: $,
201
- ...R
202
- }, J) => {
203
- const p = U(null), K = pe([J, p]), [Q, M] = ie(), [Z, S] = ie(), W = U(80), ee = U(-25), G = U(null), re = U(30), te = U(null), P = ge({ id: e, prefix: `${fe}-` }), [z, j] = f(0), [F, t] = f(0), [d, _] = f(
204
- !!(!I && y)
205
- ), Y = `${s} error, ${y}`, b = Ve({
200
+ onBlur: F,
201
+ ...G
202
+ }, X) => {
203
+ const p = W(null), q = ge([X, p]), [J, M] = ie(), [K, C] = ie(), H = W(80), Q = W(-25), U = W(null), Z = W(30), ee = W(null), O = ye({ id: e, prefix: `${fe}-` }), [re, te] = f(0), [$, ae] = f(0), [t, i] = f(
204
+ !!(!_ && y)
205
+ ), P = `${s} error, ${y}`, N = ze({
206
206
  className: n,
207
- textAreaClassName: u,
207
+ textAreaClassName: d,
208
208
  error: l,
209
209
  raw: r,
210
210
  focusMode: x,
211
- disabled: T,
212
- noBorder: C,
211
+ disabled: v,
212
+ noBorder: I,
213
213
  mode: h,
214
214
  rightElement: !!w,
215
- leftElement: !!v
216
- }), [i, N] = Me({
215
+ leftElement: !!S
216
+ }), [g, E] = Ae({
217
217
  value: k,
218
218
  initialControlledDelay: 20,
219
- defaultValue: m,
220
- onChange: (E) => {
221
- V && V({
219
+ defaultValue: u,
220
+ onChange: (b) => {
221
+ z && z({
222
222
  target: {
223
- value: E
223
+ value: b
224
224
  }
225
225
  });
226
226
  }
227
- }), A = (E) => {
228
- N(E.target.value);
229
- }, X = (E) => {
230
- I && y && _(!0), L && L(E);
231
- }, ae = (E) => {
232
- I && y && !i && _(!1), $ && $(E);
227
+ }), T = (b) => {
228
+ E(b.target.value);
229
+ }, A = (b) => {
230
+ _ && y && i(!0), L && L(b);
231
+ }, j = (b) => {
232
+ _ && y && !g && i(!1), F && F(b);
233
233
  };
234
- return q(() => {
235
- M && M.width && j(M.width + 18 + 10);
236
- }, [M]), q(() => {
237
- S && S.width && t(S.width + 18 + 10);
238
- }, [S]), q(() => {
239
- r || p && p.current && i !== void 0 && (p.current.style.height = "inherit", p.current.style.height = p.current.scrollHeight + "px");
240
- }, [i, r]), q(() => {
234
+ return Y(() => {
235
+ M && M.width && te(M.width + 18 + 10);
236
+ }, [M]), Y(() => {
237
+ C && C.width && ae(C.width + 18 + 10);
238
+ }, [C]), Y(() => {
239
+ r || p && p.current && g !== void 0 && (p.current.style.height = "inherit", p.current.style.height = p.current.scrollHeight + "px");
240
+ }, [g, r]), Y(() => {
241
241
  r || setTimeout(() => {
242
- G?.current?.style.setProperty(
242
+ U?.current?.style.setProperty(
243
243
  "--av-text-area-wrapper-transition",
244
- i ? "none" : "all 0.2s ease-out"
244
+ g ? "none" : "all 0.2s ease-out"
245
245
  );
246
246
  }, 0);
247
- }, [i, r]), q(() => {
248
- if (!r && p && p.current && i !== void 0) {
249
- const { labelOffset: E, helperTextOffset: oe, scrollHeight: he } = $e({
247
+ }, [g, r]), Y(() => {
248
+ if (!r && p && p.current && g !== void 0) {
249
+ const { labelOffset: b, helperTextOffset: oe, scrollHeight: he } = Fe({
250
250
  scrollHeight: p.current.scrollHeight,
251
- currentHeight: W.current,
252
- currentLabelOffset: ee.current,
253
- currentHelperTextOffset: re.current
251
+ currentHeight: H.current,
252
+ currentLabelOffset: Q.current,
253
+ currentHelperTextOffset: Z.current
254
254
  });
255
- E && (ee.current = E, G?.current?.style.setProperty(
255
+ b && (Q.current = b, U?.current?.style.setProperty(
256
256
  "--av-text-area-label",
257
- `${E}px`
258
- )), oe && (re.current = oe, te?.current?.style.setProperty(
257
+ `${b}px`
258
+ )), oe && (Z.current = oe, ee?.current?.style.setProperty(
259
259
  "--av-text-area-helper-text",
260
260
  `${oe}px`
261
- )), W.current = he || W.current;
261
+ )), H.current = he || H.current;
262
262
  }
263
- }, [i, r]), S.width > 0 && G?.current?.style.setProperty(
263
+ }, [g, r]), C.width > 0 && U?.current?.style.setProperty(
264
264
  "--tw-translate-x",
265
- `${12 + S.width + 5}px`
266
- ), /* @__PURE__ */ g("div", { className: b.wrapper, children: [
265
+ `${12 + C.width + 5}px`
266
+ ), /* @__PURE__ */ m("div", { className: N.wrapper, children: [
267
267
  /* @__PURE__ */ a(
268
268
  "label",
269
269
  {
270
- htmlFor: P,
270
+ htmlFor: O,
271
271
  id: D,
272
- className: b.accessibleLabel,
272
+ className: N.accessibleLabel,
273
273
  children: o
274
274
  }
275
275
  ),
276
- v && /* @__PURE__ */ a(
276
+ S && /* @__PURE__ */ a(
277
277
  "div",
278
278
  {
279
- ref: Z,
280
- className: b.leftElement,
281
- children: v
279
+ ref: K,
280
+ className: N.leftElement,
281
+ children: S
282
282
  }
283
283
  ),
284
284
  /* @__PURE__ */ a(
285
285
  "textarea",
286
286
  {
287
- ref: K,
288
- id: P,
287
+ ref: q,
288
+ id: O,
289
289
  name: s,
290
- disabled: T,
290
+ disabled: v,
291
291
  placeholder: r ? void 0 : " ",
292
- className: b.textArea,
292
+ className: N.textArea,
293
293
  rows: 1,
294
- ...y && { "aria-describedby": `${P}-helper` },
294
+ ...y && { "aria-describedby": `${O}-helper` },
295
295
  ...l && { "aria-invalid": "true" },
296
- ...w && !v && !r && { style: { paddingRight: z } },
297
- ...v && !w && !r && { style: { paddingLeft: F } },
298
- ...w && v && !r && {
296
+ ...w && !S && !r && { style: { paddingRight: re } },
297
+ ...S && !w && !r && { style: { paddingLeft: $ } },
298
+ ...w && S && !r && {
299
299
  style: {
300
- paddingRight: z,
301
- paddingLeft: F
300
+ paddingRight: re,
301
+ paddingLeft: $
302
302
  }
303
303
  },
304
- value: i,
305
- onChange: A,
306
- onFocus: X,
307
- onBlur: ae,
308
- ...R
304
+ value: g,
305
+ onChange: T,
306
+ onFocus: A,
307
+ onBlur: j,
308
+ ...G
309
309
  }
310
310
  ),
311
311
  !r && /* @__PURE__ */ a(
312
312
  "label",
313
313
  {
314
- ref: G,
314
+ ref: U,
315
315
  "aria-hidden": !0,
316
- htmlFor: P,
317
- className: `${b.visibleLabel}`,
316
+ htmlFor: O,
317
+ className: `${N.visibleLabel}`,
318
318
  children: o
319
319
  }
320
320
  ),
321
- d && /* @__PURE__ */ a(
321
+ t && /* @__PURE__ */ a(
322
322
  "div",
323
323
  {
324
- ref: te,
325
- id: `${P}-helper`,
326
- className: b.helperText,
324
+ ref: ee,
325
+ id: `${O}-helper`,
326
+ className: N.helperText,
327
327
  children: y
328
328
  }
329
329
  ),
330
330
  w && /* @__PURE__ */ a(
331
331
  "div",
332
332
  {
333
- ref: Q,
334
- className: b.rightElement,
333
+ ref: J,
334
+ className: N.rightElement,
335
335
  children: w
336
336
  }
337
337
  ),
338
- l && y && /* @__PURE__ */ a(ye, { politeness: "polite", clearAnnouncementDelay: 500, children: Y })
338
+ l && y && /* @__PURE__ */ a(be, { politeness: "polite", clearAnnouncementDelay: 500, children: P })
339
339
  ] });
340
340
  }
341
341
  );
@@ -353,7 +353,7 @@ try {
353
353
  });
354
354
  } catch {
355
355
  }
356
- const We = "av-toggle", ze = ({ narrow: e }) => c(
356
+ const je = "av-toggle", Ye = ({ narrow: e }) => c(
357
357
  "peer",
358
358
  "rounded-full",
359
359
  {
@@ -362,7 +362,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
362
362
  },
363
363
  // Smooth background/border transition when toggling
364
364
  "transition-colors duration-300 ease-in-out motion-reduce:transition-none"
365
- ), je = ({
365
+ ), Xe = ({
366
366
  focusMode: e
367
367
  }) => c(
368
368
  "peer-focus:outline",
@@ -374,7 +374,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
374
374
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
375
375
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
376
376
  }
377
- ), Fe = ({ narrow: e }) => c(
377
+ ), qe = ({ narrow: e }) => c(
378
378
  {
379
379
  "peer-checked:after:translate-x-full": !e,
380
380
  "peer-checked:after:translate-x-4": e
@@ -384,7 +384,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
384
384
  // knob circle and border color when checked
385
385
  "peer-checked:after:bg-white",
386
386
  "peer-checked:after:border-white"
387
- ), Ye = ({ narrow: e }) => c(
387
+ ), Je = ({ narrow: e }) => c(
388
388
  "after:left-[2px]",
389
389
  "after:top-[2px]",
390
390
  "after:border",
@@ -400,7 +400,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
400
400
  // Narrow toggle knob (oval)
401
401
  " after:h-4 after:w-7": e
402
402
  }
403
- ), Xe = ({
403
+ ), Ke = ({
404
404
  mode: e,
405
405
  noBorder: s
406
406
  }) => c({
@@ -409,7 +409,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
409
409
  "border-border-light bg-surface-darker": e === "dark",
410
410
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
411
411
  "border-border-medium bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
412
- }), qe = ({
412
+ }), Qe = ({
413
413
  mode: e,
414
414
  labelHidden: s
415
415
  }) => s ? "sr-only" : c("ml-2 text-sm", {
@@ -417,11 +417,11 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
417
417
  "text-copy-lighter": e === "dark",
418
418
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
419
419
  "text-copy-dark dark:text-copy-lighter": e === "system"
420
- }), Je = ({ className: e }) => c(
421
- We,
420
+ }), Ze = ({ className: e }) => c(
421
+ je,
422
422
  "relative flex cursor-pointer items-center",
423
423
  e
424
- ), Ke = ({
424
+ ), er = ({
425
425
  mode: e,
426
426
  focusMode: s,
427
427
  labelHidden: o,
@@ -430,15 +430,15 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
430
430
  narrow: n
431
431
  }) => ({
432
432
  toggle: c(
433
- ze({ narrow: n }),
434
- Xe({ mode: e, noBorder: r }),
435
- je({ focusMode: s }),
436
433
  Ye({ narrow: n }),
437
- Fe({ narrow: n })
434
+ Ke({ mode: e, noBorder: r }),
435
+ Xe({ focusMode: s }),
436
+ Je({ narrow: n }),
437
+ qe({ narrow: n })
438
438
  ),
439
- label: qe({ mode: e, labelHidden: o }),
439
+ label: Qe({ mode: e, labelHidden: o }),
440
440
  input: "peer sr-only",
441
- wrapper: Je({ className: l })
441
+ wrapper: Ze({ className: l })
442
442
  }), B = ({
443
443
  checked: e = !1,
444
444
  onChange: s,
@@ -446,34 +446,34 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
446
446
  labelHidden: l = !1,
447
447
  name: r,
448
448
  mode: n = "system",
449
- focusMode: u = "system",
449
+ focusMode: d = "system",
450
450
  className: h,
451
451
  noBorder: x = !1,
452
452
  narrow: k = !1
453
453
  }) => {
454
- const m = Ke({
454
+ const u = er({
455
455
  mode: n,
456
- focusMode: u,
456
+ focusMode: d,
457
457
  labelHidden: l,
458
458
  className: h,
459
459
  noBorder: x,
460
460
  narrow: k
461
- }), T = (C) => {
462
- s?.(C.target.checked);
461
+ }), v = (I) => {
462
+ s?.(I.target.checked);
463
463
  };
464
- return /* @__PURE__ */ g("label", { className: m.wrapper, children: [
464
+ return /* @__PURE__ */ m("label", { className: u.wrapper, children: [
465
465
  /* @__PURE__ */ a(
466
466
  "input",
467
467
  {
468
468
  name: r,
469
469
  checked: e,
470
470
  type: "checkbox",
471
- className: m.input,
472
- onChange: T
471
+ className: u.input,
472
+ onChange: v
473
473
  }
474
474
  ),
475
- /* @__PURE__ */ a("div", { className: m.toggle }),
476
- /* @__PURE__ */ a("span", { className: m.label, children: o })
475
+ /* @__PURE__ */ a("div", { className: u.toggle }),
476
+ /* @__PURE__ */ a("span", { className: u.label, children: o })
477
477
  ] });
478
478
  };
479
479
  /*!
@@ -489,30 +489,30 @@ try {
489
489
  });
490
490
  } catch {
491
491
  }
492
- const ar = ({
492
+ const lr = ({
493
493
  open: e,
494
494
  onOpenChange: s
495
495
  }) => {
496
- const { getAccessToken: o, user: l } = be(), {
496
+ const { getAccessToken: o, user: l } = xe(), {
497
497
  data: r,
498
498
  isSuccess: n,
499
- refetch: u
500
- } = Ce({
499
+ refetch: d
500
+ } = ke({
501
501
  user: l?.username,
502
502
  getAccessToken: o
503
503
  }), [h, x] = f({
504
504
  loadingLocation: !1
505
- }), [k, m] = f({
505
+ }), [k, u] = f({
506
506
  prompts: []
507
- }), [T, C] = f(""), [D, y] = f(""), [I, w] = f(!1), [v, V] = f(!1), [L, $] = f(!1), [R, J] = f(!1), [p, K] = f(null), [Q, M] = f(!1), [Z, S] = f(!1), W = (t) => {
508
- S(t);
509
- }, ee = (t) => {
507
+ }), [v, I] = f(""), [D, y] = f(""), [_, w] = f(!1), [S, z] = f(!1), [L, F] = f(!1), [G, X] = f(!1), [p, q] = f(null), [J, M] = f(!1), [K, C] = f(!1), H = Le(we.TOOL.MEMORIES), Q = (t) => {
508
+ C(t);
509
+ }, U = (t) => {
510
510
  w(t);
511
- }, G = (t) => {
512
- V(t);
513
- }, re = (t) => {
514
- J(t);
515
- }, te = async (t) => {
511
+ }, Z = (t) => {
512
+ H && z(t);
513
+ }, ee = (t) => {
514
+ X(t);
515
+ }, O = async (t) => {
516
516
  t.preventDefault();
517
517
  try {
518
518
  await ue({
@@ -520,73 +520,73 @@ const ar = ({
520
520
  type: me.SET_USER_PREFERENCES,
521
521
  params: {
522
522
  user: l?.username,
523
- instructions: T,
523
+ instructions: v,
524
524
  location: D,
525
525
  provider: r?.provider,
526
526
  tags: k.prompts,
527
- sendOnEnter: I,
528
- useMemory: v,
529
- showDetails: Z
527
+ sendOnEnter: _,
528
+ useMemory: S,
529
+ showDetails: K
530
530
  }
531
- }), R !== L && (await Se(R), $(R)), u(), x({
531
+ }), G !== L && (await _e(G), F(G)), d(), x({
532
532
  loadingLocation: !1
533
533
  });
534
534
  } catch {
535
535
  }
536
- }, P = async () => {
536
+ }, re = async () => {
537
537
  x({
538
538
  loadingLocation: !0
539
539
  }), y("...");
540
540
  try {
541
- const t = Date.now(), d = await ve(), _ = await ue({
541
+ const t = Date.now(), i = await Ie(), P = await ue({
542
542
  accessToken: await o(),
543
543
  type: me.GET_LOCATION,
544
544
  params: {
545
- latitude: d.latitude,
546
- longitude: d.longitude
545
+ latitude: i.latitude,
546
+ longitude: i.longitude
547
547
  }
548
- }), b = Date.now() - t;
549
- if (b < 2e3 && await new Promise((i) => setTimeout(i, 2e3 - b)), _.status === 200) {
550
- const { city: i, state: N, country: A, displayName: X } = _.data, ae = i && N && A ? `${i}, ${N}, ${A}` : X;
548
+ }), g = Date.now() - t;
549
+ if (g < 2e3 && await new Promise((E) => setTimeout(E, 2e3 - g)), P.status === 200) {
550
+ const { city: E, state: T, country: A, displayName: j } = P.data, b = E && T && A ? `${E}, ${T}, ${A}` : j;
551
551
  x({
552
552
  loadingLocation: !1
553
- }), y(ae);
553
+ }), y(b);
554
554
  } else
555
555
  x({
556
556
  loadingLocation: !1
557
557
  });
558
558
  } catch {
559
559
  }
560
- }, z = () => {
561
- u(), s(!1);
562
- }, j = ({
560
+ }, te = () => {
561
+ d(), s(!1);
562
+ }, $ = ({
563
563
  enabled: t = !1,
564
- privateChat: d = !1,
565
- clipboardAccess: _ = !1,
566
- ...Y
564
+ privateChat: i = !1,
565
+ clipboardAccess: P = !1,
566
+ ...N
567
567
  }) => {
568
- m((b) => {
569
- const i = b.prompts, N = {
570
- ...Y,
568
+ u((g) => {
569
+ const E = g.prompts, T = {
570
+ ...N,
571
571
  enabled: t,
572
- privateChat: d,
573
- clipboardAccess: _
572
+ privateChat: i,
573
+ clipboardAccess: P
574
574
  };
575
- _ ? N.content = N.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : N.content = N.content.replace(/{{clipboard}}/g, "");
576
- const A = i.findIndex((X) => X.slot === Y.slot);
575
+ P ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
576
+ const A = E.findIndex((j) => j.slot === N.slot);
577
577
  return A === -1 ? {
578
- ...b,
579
- prompts: [...i, { ...N }]
580
- } : (i[A] = N, {
581
- ...b,
582
- prompts: [...i]
578
+ ...g,
579
+ prompts: [...E, { ...T }]
580
+ } : (E[A] = T, {
581
+ ...g,
582
+ prompts: [...E]
583
583
  });
584
584
  });
585
- }, F = Le(async () => {
585
+ }, ae = Pe(async () => {
586
586
  try {
587
587
  M(!0);
588
- const t = await xe();
589
- K(t);
588
+ const t = await Ne();
589
+ q(t);
590
590
  } catch {
591
591
  } finally {
592
592
  M(!1);
@@ -595,21 +595,21 @@ const ar = ({
595
595
  return ne(() => {
596
596
  if (!r)
597
597
  return;
598
- r.instructions && C(r.instructions), r.location && y(r.location), r.tags && m({ prompts: r.tags }), r.sendOnEnter !== void 0 && w(r.sendOnEnter), r.useMemory !== void 0 && V(r.useMemory), r.showDetails !== void 0 && S(r.showDetails);
599
- const t = ke();
600
- $(t), J(t);
598
+ r.instructions && I(r.instructions), r.location && y(r.location), r.tags && u({ prompts: r.tags }), r.sendOnEnter !== void 0 && w(r.sendOnEnter), r.useMemory !== void 0 && z(r.useMemory), r.showDetails !== void 0 && C(r.showDetails);
599
+ const t = Ee();
600
+ F(t), X(t);
601
601
  }, [r]), ne(() => {
602
- L ? F() : K(null);
603
- }, [L, F]), n ? /* @__PURE__ */ g(
604
- Ie,
602
+ L ? ae() : q(null);
603
+ }, [L, ae]), n ? /* @__PURE__ */ m(
604
+ Me,
605
605
  {
606
606
  open: e,
607
- onOpenChange: z,
608
- title: we,
607
+ onOpenChange: te,
608
+ title: Te,
609
609
  animation: !0,
610
610
  animationType: "fade",
611
- footer: /* @__PURE__ */ g(
612
- Te,
611
+ footer: /* @__PURE__ */ m(
612
+ Ce,
613
613
  {
614
614
  columnGap: 2,
615
615
  alignHorizontal: "flex-end",
@@ -622,7 +622,7 @@ const ar = ({
622
622
  variant: "secondary",
623
623
  focusMode: "light",
624
624
  noBorder: !0,
625
- onClick: z,
625
+ onClick: te,
626
626
  children: "Cancel"
627
627
  }
628
628
  ) }),
@@ -632,7 +632,7 @@ const ar = ({
632
632
  mode: "dark",
633
633
  focusMode: "light",
634
634
  onClick: async (t) => {
635
- s(!1), await te(t);
635
+ s(!1), await O(t);
636
636
  },
637
637
  children: "Save"
638
638
  }
@@ -641,14 +641,14 @@ const ar = ({
641
641
  }
642
642
  ),
643
643
  children: [
644
- /* @__PURE__ */ g(
645
- H,
644
+ /* @__PURE__ */ m(
645
+ V,
646
646
  {
647
- header: O.SETTINGS_DETAILS.TITLE,
647
+ header: R.SETTINGS_DETAILS.TITLE,
648
648
  className: "prose-dark dark:prose-lighter",
649
649
  noBorder: !0,
650
650
  children: [
651
- /* @__PURE__ */ a("p", { className: "text-sm", children: O.SETTINGS_DETAILS.DETAILS }),
651
+ /* @__PURE__ */ a("p", { className: "text-sm", children: R.SETTINGS_DETAILS.DETAILS }),
652
652
  /* @__PURE__ */ a(
653
653
  B,
654
654
  {
@@ -656,11 +656,11 @@ const ar = ({
656
656
  className: "mt-2",
657
657
  label: "Show Message Statistics",
658
658
  name: "show-message-statistics",
659
- onChange: W,
660
- checked: Z
659
+ onChange: Q,
660
+ checked: K
661
661
  }
662
662
  ),
663
- /* @__PURE__ */ a("p", { className: "text-sm mt-5", children: O.SETTINGS_DETAILS.SEND_ON_ENTER }),
663
+ /* @__PURE__ */ a("p", { className: "text-sm mt-5", children: R.SETTINGS_DETAILS.SEND_ON_ENTER }),
664
664
  /* @__PURE__ */ a(
665
665
  B,
666
666
  {
@@ -668,35 +668,37 @@ const ar = ({
668
668
  className: "mt-2",
669
669
  label: "Send Message on Enter",
670
670
  name: "send-message-on-enter",
671
- onChange: ee,
672
- checked: I
671
+ onChange: U,
672
+ checked: _
673
673
  }
674
674
  ),
675
- /* @__PURE__ */ a("p", { className: "text-sm mt-5", children: O.SETTINGS_DETAILS.USE_MEMORY }),
676
- /* @__PURE__ */ a(
677
- B,
678
- {
679
- narrow: !0,
680
- className: "mt-2",
681
- label: "Use Memory",
682
- name: "use-memory",
683
- onChange: G,
684
- checked: v
685
- }
686
- )
675
+ H && /* @__PURE__ */ m(pe, { children: [
676
+ /* @__PURE__ */ a("p", { className: "text-sm mt-5", children: R.SETTINGS_DETAILS.USE_MEMORY }),
677
+ /* @__PURE__ */ a(
678
+ B,
679
+ {
680
+ narrow: !0,
681
+ className: "mt-2",
682
+ label: "Use Memory",
683
+ name: "use-memory",
684
+ onChange: Z,
685
+ checked: S
686
+ }
687
+ )
688
+ ] })
687
689
  ]
688
690
  }
689
691
  ),
690
- /* @__PURE__ */ g(
691
- H,
692
+ /* @__PURE__ */ m(
693
+ V,
692
694
  {
693
695
  header: "Custom Instructions",
694
696
  className: "prose-dark dark:prose-lighter mt-4",
695
697
  noBorder: !0,
696
698
  children: [
697
- /* @__PURE__ */ g("p", { className: "text-sm", children: [
699
+ /* @__PURE__ */ m("p", { className: "text-sm", children: [
698
700
  "What would you like ",
699
- /* @__PURE__ */ a("em", { children: Ne }),
701
+ /* @__PURE__ */ a("em", { children: ve }),
700
702
  " to know about you to provide better responses?"
701
703
  ] }),
702
704
  /* @__PURE__ */ a(
@@ -708,9 +710,9 @@ const ar = ({
708
710
  autoCorrect: "off",
709
711
  name: "customInstructions",
710
712
  label: "Custom Instructions",
711
- value: T,
713
+ value: v,
712
714
  onChange: (t) => {
713
- C(t.target.value);
715
+ I(t.target.value);
714
716
  },
715
717
  helperText: "Press ENTER to add a new line."
716
718
  }
@@ -718,8 +720,8 @@ const ar = ({
718
720
  ]
719
721
  }
720
722
  ),
721
- /* @__PURE__ */ g(
722
- H,
723
+ /* @__PURE__ */ m(
724
+ V,
723
725
  {
724
726
  header: "Location",
725
727
  className: "prose-dark dark:prose-lighter mt-4",
@@ -747,23 +749,23 @@ const ar = ({
747
749
  noBorder: !0,
748
750
  variant: "secondary",
749
751
  disabled: h.loadingLocation,
750
- onClick: P,
752
+ onClick: re,
751
753
  children: h.loadingLocation ? "Detecting..." : "Auto-detect"
752
754
  }
753
755
  )
754
756
  ]
755
757
  }
756
758
  ),
757
- /* @__PURE__ */ g(
758
- H,
759
+ /* @__PURE__ */ m(
760
+ V,
759
761
  {
760
- header: O.SETTINGS_PROMPTS.TITLE,
762
+ header: R.SETTINGS_PROMPTS.TITLE,
761
763
  className: "prose-dark dark:prose-lighter mt-4",
762
764
  noBorder: !0,
763
765
  children: [
764
- /* @__PURE__ */ a("p", { className: "text-sm", children: Ee }),
765
- k.prompts && k.prompts.slice(0, 3).map((t) => /* @__PURE__ */ g(
766
- H,
766
+ /* @__PURE__ */ a("p", { className: "text-sm", children: Se }),
767
+ k.prompts && k.prompts.slice(0, 3).map((t) => /* @__PURE__ */ m(
768
+ V,
767
769
  {
768
770
  mode: "dark",
769
771
  noBorder: !0,
@@ -781,10 +783,10 @@ const ar = ({
781
783
  noBorder: !0,
782
784
  label: "Enabled",
783
785
  name: t.slot.toString(),
784
- onChange: (d) => {
785
- j({
786
+ onChange: (i) => {
787
+ $({
786
788
  ...t,
787
- enabled: d
789
+ enabled: i
788
790
  });
789
791
  },
790
792
  checked: t.enabled
@@ -800,10 +802,10 @@ const ar = ({
800
802
  noBorder: !0,
801
803
  label: "Private Chat",
802
804
  name: `private-${t.slot.toString()}`,
803
- onChange: (d) => {
804
- j({
805
+ onChange: (i) => {
806
+ $({
805
807
  ...t,
806
- privateChat: d
808
+ privateChat: i
807
809
  });
808
810
  },
809
811
  checked: t.privateChat
@@ -819,10 +821,10 @@ const ar = ({
819
821
  noBorder: !0,
820
822
  label: "Use Clipboard",
821
823
  name: `clipboard-${t.slot.toString()}`,
822
- onChange: (d) => {
823
- j({
824
+ onChange: (i) => {
825
+ $({
824
826
  ...t,
825
- clipboardAccess: d
827
+ clipboardAccess: i
826
828
  });
827
829
  },
828
830
  checked: t.clipboardAccess
@@ -835,14 +837,14 @@ const ar = ({
835
837
  ]
836
838
  }
837
839
  ),
838
- /* @__PURE__ */ g(
839
- H,
840
+ /* @__PURE__ */ m(
841
+ V,
840
842
  {
841
- header: O.SETTINGS_CACHING.TITLE,
843
+ header: R.SETTINGS_CACHING.TITLE,
842
844
  className: "prose-dark dark:prose-lighter mt-4 ",
843
845
  noBorder: !0,
844
846
  children: [
845
- /* @__PURE__ */ a("p", { className: "text-sm", children: O.SETTINGS_CACHING.DESCRIPTION }),
847
+ /* @__PURE__ */ a("p", { className: "text-sm", children: R.SETTINGS_CACHING.DESCRIPTION }),
846
848
  /* @__PURE__ */ a(
847
849
  B,
848
850
  {
@@ -850,32 +852,32 @@ const ar = ({
850
852
  className: "mt-2",
851
853
  label: "Enable Assets Caching",
852
854
  name: "enable-service-worker",
853
- onChange: re,
854
- checked: R
855
+ onChange: ee,
856
+ checked: G
855
857
  }
856
858
  ),
857
- L && /* @__PURE__ */ g("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
859
+ L && /* @__PURE__ */ m("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
858
860
  /* @__PURE__ */ a("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
859
- p ? /* @__PURE__ */ g("div", { className: "text-xs space-y-2", children: [
860
- /* @__PURE__ */ g("p", { className: "m-0", children: [
861
+ p ? /* @__PURE__ */ m("div", { className: "text-xs space-y-2", children: [
862
+ /* @__PURE__ */ m("p", { className: "m-0", children: [
861
863
  "Version: ",
862
864
  /* @__PURE__ */ a("strong", { children: p.version })
863
865
  ] }),
864
- /* @__PURE__ */ g("p", { className: "m-0", children: [
866
+ /* @__PURE__ */ m("p", { className: "m-0", children: [
865
867
  "Total Items: ",
866
868
  /* @__PURE__ */ a("strong", { children: p.totalItems })
867
869
  ] }),
868
- p.caches.map((t) => /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: t.urls.map((d) => /* @__PURE__ */ a(
870
+ p.caches.map((t) => /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: t.urls.map((i) => /* @__PURE__ */ a(
869
871
  "li",
870
872
  {
871
873
  className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
872
- title: d,
873
- children: new URL(d).pathname
874
+ title: i,
875
+ children: new URL(i).pathname
874
876
  },
875
- d
877
+ i
876
878
  )) }) }, t.name)),
877
- p.totalItems === 0 && !Q && /* @__PURE__ */ a("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
878
- ] }) : /* @__PURE__ */ a("p", { className: "text-xs opacity-70 m-0", children: Q ? "Loading cache info..." : "No cache info available." })
879
+ p.totalItems === 0 && !J && /* @__PURE__ */ a("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
880
+ ] }) : /* @__PURE__ */ a("p", { className: "text-xs opacity-70 m-0", children: J ? "Loading cache info..." : "No cache info available." })
879
881
  ] })
880
882
  ]
881
883
  }
@@ -885,5 +887,5 @@ const ar = ({
885
887
  ) : null;
886
888
  };
887
889
  export {
888
- ar as SettingsPanel
890
+ lr as SettingsPanel
889
891
  };