@versini/sassysaint 8.74.2 → 8.75.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 (27) hide show
  1. package/dist/chunks/{AboutChangelog.CKksZqHG.js → AboutChangelog.DcM6n0DU.js} +2 -2
  2. package/dist/chunks/{AboutEntry.glCt_1V2.js → AboutEntry.Cw1HwXLd.js} +5 -5
  3. package/dist/chunks/{App.fPigJREV.js → App.uyXRdmU-.js} +16 -16
  4. package/dist/chunks/{Chart.B9hB35Ov.js → Chart.DRajQTb7.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.cQmeFm3l.js → ChatBubbleAssistant.VAH8SC2k.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.QckqWgJe.js → ChatBubbleUser.wNyLePBu.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.DTewVIoT.js → ChatHistoryTable.BY7dwrJj.js} +37 -63
  8. package/dist/chunks/{HistoryEntry.CTG2HMFf.js → HistoryEntry.BgfbZLTU.js} +3 -3
  9. package/dist/chunks/{ProfileEntry.DYYzBE5s.js → ProfileEntry.BnRj4H6W.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.D29H8z_6.js → SettingsEntry.Tt7iC8lW.js} +3 -3
  11. package/dist/chunks/{Table.4AY7ytZo.js → Table.C-82Inko.js} +83 -56
  12. package/dist/chunks/{UsageEntry.BUPgYfi_.js → UsageEntry.CIIbHmah.js} +3 -3
  13. package/dist/chunks/UserMemoriesPanel.DRGRbfMe.js +769 -0
  14. package/dist/chunks/{index.i2-wyoMZ.js → index.00VWaqRF.js} +1 -1
  15. package/dist/chunks/{index.DWl4Hcyk.js → index.B2ewgHV7.js} +899 -794
  16. package/dist/chunks/{index.B87G0G-b.js → index.BqHD1i5Y.js} +1 -1
  17. package/dist/chunks/{index.C58UQ9Se.js → index.C6dF5Qd0.js} +1 -1
  18. package/dist/chunks/{index.ChttSd_v.js → index.DJG4vhyT.js} +2 -2
  19. package/dist/chunks/{index.x0F3_X3L.js → index.Dfu0cyIO.js} +1 -1
  20. package/dist/chunks/{index.CpOVLW1-.js → index.Do5VInFn.js} +1 -1
  21. package/dist/chunks/{index.BqIB-hbB.js → index.syVj4kfz.js} +3 -3
  22. package/dist/chunks/{useMarkdown.CDrOqrBw.js → useMarkdown.C4rtvGDg.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +1 -1
  26. package/package.json +3 -3
  27. package/dist/chunks/UserMemoriesPanel.Dpnz-uAb.js +0 -429
@@ -1,8 +1,8 @@
1
- import { jsx as h, jsxs as V, Fragment as kr } from "react/jsx-runtime";
2
- import * as H from "react";
3
- import oe, { createContext as Ft, useReducer as Nr, useCallback as X, useRef as j, useEffect as W, useSyncExternalStore as Gs, useContext as ct, useState as ie, useMemo as ze, useId as Bs, useLayoutEffect as Xe, Suspense as qs, lazy as Ws } from "react";
1
+ import { jsx as h, jsxs as j, Fragment as kr } from "react/jsx-runtime";
2
+ import * as q from "react";
3
+ import le, { createContext as Ft, useReducer as Nr, useCallback as X, useRef as Q, useEffect as V, useSyncExternalStore as Gs, useContext as ct, useState as ce, useMemo as ze, useId as qs, useLayoutEffect as Xe, Suspense as Bs, lazy as Ws } from "react";
4
4
  import y from "clsx";
5
- var Ne = class {
5
+ var Pe = class {
6
6
  constructor() {
7
7
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
8
8
  }
@@ -60,23 +60,23 @@ var Ne = class {
60
60
  clearInterval(e) {
61
61
  this.#e.clearInterval(e);
62
62
  }
63
- }, ge = new js();
63
+ }, Ee = new js();
64
64
  function Qs(e) {
65
65
  setTimeout(e, 0);
66
66
  }
67
67
  var be = typeof window > "u" || "Deno" in globalThis;
68
- function q() {
68
+ function W() {
69
69
  }
70
70
  function Js(e, t) {
71
71
  return typeof e == "function" ? e(t) : e;
72
72
  }
73
- function Ct(e) {
73
+ function Ot(e) {
74
74
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
75
75
  }
76
76
  function Pr(e, t) {
77
77
  return Math.max(e + (t || 0) - Date.now(), 0);
78
78
  }
79
- function de(e, t) {
79
+ function pe(e, t) {
80
80
  return typeof e == "function" ? e(t) : e;
81
81
  }
82
82
  function Y(e, t) {
@@ -111,7 +111,7 @@ function tr(e, t) {
111
111
  if (!t.options.mutationKey)
112
112
  return !1;
113
113
  if (r) {
114
- if (Ee(t.options.mutationKey) !== Ee(n))
114
+ if (Se(t.options.mutationKey) !== Se(n))
115
115
  return !1;
116
116
  } else if (!De(t.options.mutationKey, n))
117
117
  return !1;
@@ -119,9 +119,9 @@ function tr(e, t) {
119
119
  return !(s && t.state.status !== s || a && !a(t));
120
120
  }
121
121
  function Ht(e, t) {
122
- return (t?.queryKeyHashFn || Ee)(e);
122
+ return (t?.queryKeyHashFn || Se)(e);
123
123
  }
124
- function Ee(e) {
124
+ function Se(e) {
125
125
  return JSON.stringify(
126
126
  e,
127
127
  (t, r) => kt(r) ? Object.keys(r).sort().reduce((s, a) => (s[a] = r[a], s), {}) : r
@@ -131,7 +131,7 @@ function De(e, t) {
131
131
  return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((r) => De(e[r], t[r])) : !1;
132
132
  }
133
133
  var Ys = Object.prototype.hasOwnProperty;
134
- function Ot(e, t) {
134
+ function Ct(e, t) {
135
135
  if (e === t)
136
136
  return e;
137
137
  const r = rr(e) && rr(t);
@@ -148,7 +148,7 @@ function Ot(e, t) {
148
148
  o[d] = l;
149
149
  continue;
150
150
  }
151
- const m = Ot(u, l);
151
+ const m = Ct(u, l);
152
152
  o[d] = m, m === u && c++;
153
153
  }
154
154
  return a === i && c === a ? e : o;
@@ -178,7 +178,7 @@ function sr(e) {
178
178
  }
179
179
  function zs(e) {
180
180
  return new Promise((t) => {
181
- ge.setTimeout(t, e);
181
+ Ee.setTimeout(t, e);
182
182
  });
183
183
  }
184
184
  function Nt(e, t, r) {
@@ -187,13 +187,13 @@ function Nt(e, t, r) {
187
187
  if (r.structuralSharing !== !1) {
188
188
  if (process.env.NODE_ENV !== "production")
189
189
  try {
190
- return Ot(e, t);
190
+ return Ct(e, t);
191
191
  } catch (s) {
192
192
  throw console.error(
193
193
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`
194
194
  ), s;
195
195
  }
196
- return Ot(e, t);
196
+ return Ct(e, t);
197
197
  }
198
198
  return t;
199
199
  }
@@ -211,10 +211,10 @@ function $r(e, t) {
211
211
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
212
212
  ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === et ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
213
213
  }
214
- function xr(e, t) {
214
+ function Mr(e, t) {
215
215
  return typeof e == "function" ? e(...t) : !!e;
216
216
  }
217
- var ea = class extends Ne {
217
+ var ea = class extends Pe {
218
218
  #e;
219
219
  #t;
220
220
  #r;
@@ -334,7 +334,7 @@ function ra() {
334
334
  }
335
335
  };
336
336
  }
337
- var $ = ra(), sa = class extends Ne {
337
+ var M = ra(), sa = class extends Pe {
338
338
  #e = !0;
339
339
  #t;
340
340
  #r;
@@ -369,7 +369,7 @@ var $ = ra(), sa = class extends Ne {
369
369
  function aa(e) {
370
370
  return Math.min(1e3 * 2 ** e, 3e4);
371
371
  }
372
- function Mr(e) {
372
+ function xr(e) {
373
373
  return (e ?? "online") === "online" ? tt.isOnline() : !0;
374
374
  }
375
375
  var $t = class extends Error {
@@ -381,20 +381,20 @@ function Dr(e) {
381
381
  let t = !1, r = 0, s;
382
382
  const a = Pt(), n = () => a.status !== "pending", i = (g) => {
383
383
  if (!n()) {
384
- const b = new $t(g);
385
- l(b), e.onCancel?.(b);
384
+ const E = new $t(g);
385
+ l(E), e.onCancel?.(E);
386
386
  }
387
387
  }, o = () => {
388
388
  t = !0;
389
389
  }, c = () => {
390
390
  t = !1;
391
- }, f = () => Kt.isFocused() && (e.networkMode === "always" || tt.isOnline()) && e.canRun(), d = () => Mr(e.networkMode) && e.canRun(), u = (g) => {
391
+ }, f = () => Kt.isFocused() && (e.networkMode === "always" || tt.isOnline()) && e.canRun(), d = () => xr(e.networkMode) && e.canRun(), u = (g) => {
392
392
  n() || (s?.(), a.resolve(g));
393
393
  }, l = (g) => {
394
394
  n() || (s?.(), a.reject(g));
395
395
  }, m = () => new Promise((g) => {
396
- s = (b) => {
397
- (n() || f()) && g(b);
396
+ s = (E) => {
397
+ (n() || f()) && g(E);
398
398
  }, e.onPause?.();
399
399
  }).then(() => {
400
400
  s = void 0, n() || e.onContinue?.();
@@ -402,22 +402,22 @@ function Dr(e) {
402
402
  if (n())
403
403
  return;
404
404
  let g;
405
- const b = r === 0 ? e.initialPromise : void 0;
405
+ const E = r === 0 ? e.initialPromise : void 0;
406
406
  try {
407
- g = b ?? e.fn();
408
- } catch (E) {
409
- g = Promise.reject(E);
407
+ g = E ?? e.fn();
408
+ } catch (b) {
409
+ g = Promise.reject(b);
410
410
  }
411
- Promise.resolve(g).then(u).catch((E) => {
411
+ Promise.resolve(g).then(u).catch((b) => {
412
412
  if (n())
413
413
  return;
414
- const O = e.retry ?? (be ? 0 : 3), A = e.retryDelay ?? aa, K = typeof A == "function" ? A(r, E) : A, R = O === !0 || typeof O == "number" && r < O || typeof O == "function" && O(r, E);
414
+ const C = e.retry ?? (be ? 0 : 3), I = e.retryDelay ?? aa, B = typeof I == "function" ? I(r, b) : I, R = C === !0 || typeof C == "number" && r < C || typeof C == "function" && C(r, b);
415
415
  if (t || !R) {
416
- l(E);
416
+ l(b);
417
417
  return;
418
418
  }
419
- r++, e.onFail?.(r, E), zs(K).then(() => f() ? void 0 : m()).then(() => {
420
- t ? l(E) : p();
419
+ r++, e.onFail?.(r, b), zs(B).then(() => f() ? void 0 : m()).then(() => {
420
+ t ? l(b) : p();
421
421
  });
422
422
  });
423
423
  };
@@ -438,7 +438,7 @@ var Lr = class {
438
438
  this.clearGcTimeout();
439
439
  }
440
440
  scheduleGc() {
441
- this.clearGcTimeout(), Ct(this.gcTime) && (this.#e = ge.setTimeout(() => {
441
+ this.clearGcTimeout(), Ot(this.gcTime) && (this.#e = Ee.setTimeout(() => {
442
442
  this.optionalRemove();
443
443
  }, this.gcTime));
444
444
  }
@@ -449,7 +449,7 @@ var Lr = class {
449
449
  );
450
450
  }
451
451
  clearGcTimeout() {
452
- this.#e && (ge.clearTimeout(this.#e), this.#e = void 0);
452
+ this.#e && (Ee.clearTimeout(this.#e), this.#e = void 0);
453
453
  }
454
454
  }, na = class extends Lr {
455
455
  #e;
@@ -494,7 +494,7 @@ var Lr = class {
494
494
  }
495
495
  cancel(e) {
496
496
  const t = this.#s?.promise;
497
- return this.#s?.cancel(e), t ? t.then(q).catch(q) : Promise.resolve();
497
+ return this.#s?.cancel(e), t ? t.then(W).catch(W) : Promise.resolve();
498
498
  }
499
499
  destroy() {
500
500
  super.destroy(), this.cancel({ silent: !0 });
@@ -512,7 +512,7 @@ var Lr = class {
512
512
  }
513
513
  isStatic() {
514
514
  return this.getObserversCount() > 0 ? this.observers.some(
515
- (e) => de(e.options.staleTime, this) === "static"
515
+ (e) => pe(e.options.staleTime, this) === "static"
516
516
  ) : !1;
517
517
  }
518
518
  isStale() {
@@ -712,7 +712,7 @@ var Lr = class {
712
712
  };
713
713
  }
714
714
  };
715
- this.state = t(this.state), $.batch(() => {
715
+ this.state = t(this.state), M.batch(() => {
716
716
  this.observers.forEach((r) => {
717
717
  r.onQueryUpdate();
718
718
  }), this.#r.notify({ query: this, type: "updated", action: e });
@@ -723,7 +723,7 @@ function Ur(e, t) {
723
723
  return {
724
724
  fetchFailureCount: 0,
725
725
  fetchFailureReason: null,
726
- fetchStatus: Mr(t.networkMode) ? "fetching" : "paused",
726
+ fetchStatus: xr(t.networkMode) ? "fetching" : "paused",
727
727
  ...e === void 0 && {
728
728
  error: null,
729
729
  status: "pending"
@@ -747,7 +747,7 @@ function ar(e) {
747
747
  fetchStatus: "idle"
748
748
  };
749
749
  }
750
- var ia = class extends Ne {
750
+ var ia = class extends Pe {
751
751
  constructor(e, t) {
752
752
  super(), this.options = t, this.#e = e, this.#n = null, this.#o = Pt(), this.bindMethods(), this.setOptions(t);
753
753
  }
@@ -772,27 +772,27 @@ var ia = class extends Ne {
772
772
  this.refetch = this.refetch.bind(this);
773
773
  }
774
774
  onSubscribe() {
775
- this.listeners.size === 1 && (this.#t.addObserver(this), nr(this.#t, this.options) ? this.#d() : this.updateResult(), this.#E());
775
+ this.listeners.size === 1 && (this.#t.addObserver(this), nr(this.#t, this.options) ? this.#d() : this.updateResult(), this.#b());
776
776
  }
777
777
  onUnsubscribe() {
778
778
  this.hasListeners() || this.destroy();
779
779
  }
780
780
  shouldFetchOnReconnect() {
781
- return xt(
781
+ return Mt(
782
782
  this.#t,
783
783
  this.options,
784
784
  this.options.refetchOnReconnect
785
785
  );
786
786
  }
787
787
  shouldFetchOnWindowFocus() {
788
- return xt(
788
+ return Mt(
789
789
  this.#t,
790
790
  this.options,
791
791
  this.options.refetchOnWindowFocus
792
792
  );
793
793
  }
794
794
  destroy() {
795
- this.listeners = /* @__PURE__ */ new Set(), this.#w(), this.#S(), this.#t.removeObserver(this);
795
+ this.listeners = /* @__PURE__ */ new Set(), this.#S(), this.#w(), this.#t.removeObserver(this);
796
796
  }
797
797
  setOptions(e) {
798
798
  const t = this.options, r = this.#t;
@@ -811,9 +811,9 @@ var ia = class extends Ne {
811
811
  r,
812
812
  this.options,
813
813
  t
814
- ) && this.#d(), this.updateResult(), s && (this.#t !== r || Y(this.options.enabled, this.#t) !== Y(t.enabled, this.#t) || de(this.options.staleTime, this.#t) !== de(t.staleTime, this.#t)) && this.#y();
814
+ ) && this.#d(), this.updateResult(), s && (this.#t !== r || Y(this.options.enabled, this.#t) !== Y(t.enabled, this.#t) || pe(this.options.staleTime, this.#t) !== pe(t.staleTime, this.#t)) && this.#y();
815
815
  const a = this.#g();
816
- s && (this.#t !== r || Y(this.options.enabled, this.#t) !== Y(t.enabled, this.#t) || a !== this.#c) && this.#b(a);
816
+ s && (this.#t !== r || Y(this.options.enabled, this.#t) !== Y(t.enabled, this.#t) || a !== this.#c) && this.#E(a);
817
817
  }
818
818
  getOptimisticResult(e) {
819
819
  const t = this.#e.getQueryCache().build(this.#e, e), r = this.createResult(t, e);
@@ -858,54 +858,54 @@ var ia = class extends Ne {
858
858
  this.options,
859
859
  e
860
860
  );
861
- return e?.throwOnError || (t = t.catch(q)), t;
861
+ return e?.throwOnError || (t = t.catch(W)), t;
862
862
  }
863
863
  #y() {
864
- this.#w();
865
- const e = de(
864
+ this.#S();
865
+ const e = pe(
866
866
  this.options.staleTime,
867
867
  this.#t
868
868
  );
869
- if (be || this.#a.isStale || !Ct(e))
869
+ if (be || this.#a.isStale || !Ot(e))
870
870
  return;
871
871
  const r = Pr(this.#a.dataUpdatedAt, e) + 1;
872
- this.#l = ge.setTimeout(() => {
872
+ this.#l = Ee.setTimeout(() => {
873
873
  this.#a.isStale || this.updateResult();
874
874
  }, r);
875
875
  }
876
876
  #g() {
877
877
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
878
878
  }
879
- #b(e) {
880
- this.#S(), this.#c = e, !(be || Y(this.options.enabled, this.#t) === !1 || !Ct(this.#c) || this.#c === 0) && (this.#u = ge.setInterval(() => {
879
+ #E(e) {
880
+ this.#w(), this.#c = e, !(be || Y(this.options.enabled, this.#t) === !1 || !Ot(this.#c) || this.#c === 0) && (this.#u = Ee.setInterval(() => {
881
881
  (this.options.refetchIntervalInBackground || Kt.isFocused()) && this.#d();
882
882
  }, this.#c));
883
883
  }
884
- #E() {
885
- this.#y(), this.#b(this.#g());
886
- }
887
- #w() {
888
- this.#l && (ge.clearTimeout(this.#l), this.#l = void 0);
884
+ #b() {
885
+ this.#y(), this.#E(this.#g());
889
886
  }
890
887
  #S() {
891
- this.#u && (ge.clearInterval(this.#u), this.#u = void 0);
888
+ this.#l && (Ee.clearTimeout(this.#l), this.#l = void 0);
889
+ }
890
+ #w() {
891
+ this.#u && (Ee.clearInterval(this.#u), this.#u = void 0);
892
892
  }
893
893
  createResult(e, t) {
894
894
  const r = this.#t, s = this.options, a = this.#a, n = this.#s, i = this.#i, c = e !== r ? e.state : this.#r, { state: f } = e;
895
895
  let d = { ...f }, u = !1, l;
896
896
  if (t._optimisticResults) {
897
- const v = this.hasListeners(), x = !v && nr(e, t), _ = v && ir(e, r, t, s);
898
- (x || _) && (d = {
897
+ const v = this.hasListeners(), L = !v && nr(e, t), _ = v && ir(e, r, t, s);
898
+ (L || _) && (d = {
899
899
  ...d,
900
900
  ...Ur(f.data, e.options)
901
901
  }), t._optimisticResults === "isRestoring" && (d.fetchStatus = "idle");
902
902
  }
903
903
  let { error: m, errorUpdatedAt: p, status: g } = d;
904
904
  l = d.data;
905
- let b = !1;
905
+ let E = !1;
906
906
  if (t.placeholderData !== void 0 && l === void 0 && g === "pending") {
907
907
  let v;
908
- a?.isPlaceholderData && t.placeholderData === i?.placeholderData ? (v = a.data, b = !0) : v = typeof t.placeholderData == "function" ? t.placeholderData(
908
+ a?.isPlaceholderData && t.placeholderData === i?.placeholderData ? (v = a.data, E = !0) : v = typeof t.placeholderData == "function" ? t.placeholderData(
909
909
  this.#f?.state.data,
910
910
  this.#f
911
911
  ) : t.placeholderData, v !== void 0 && (g = "success", l = Nt(
@@ -914,7 +914,7 @@ var ia = class extends Ne {
914
914
  t
915
915
  ), u = !0);
916
916
  }
917
- if (t.select && l !== void 0 && !b)
917
+ if (t.select && l !== void 0 && !E)
918
918
  if (a && l === n?.data && t.select === this.#p)
919
919
  l = this.#h;
920
920
  else
@@ -924,14 +924,14 @@ var ia = class extends Ne {
924
924
  this.#n = v;
925
925
  }
926
926
  this.#n && (m = this.#n, l = this.#h, p = Date.now(), g = "error");
927
- const E = d.fetchStatus === "fetching", O = g === "pending", A = g === "error", K = O && E, R = l !== void 0, C = {
927
+ const b = d.fetchStatus === "fetching", C = g === "pending", I = g === "error", B = C && b, R = l !== void 0, O = {
928
928
  status: g,
929
929
  fetchStatus: d.fetchStatus,
930
- isPending: O,
930
+ isPending: C,
931
931
  isSuccess: g === "success",
932
- isError: A,
933
- isInitialLoading: K,
934
- isLoading: K,
932
+ isError: I,
933
+ isInitialLoading: B,
934
+ isLoading: B,
935
935
  data: l,
936
936
  dataUpdatedAt: d.dataUpdatedAt,
937
937
  error: m,
@@ -941,37 +941,37 @@ var ia = class extends Ne {
941
941
  errorUpdateCount: d.errorUpdateCount,
942
942
  isFetched: d.dataUpdateCount > 0 || d.errorUpdateCount > 0,
943
943
  isFetchedAfterMount: d.dataUpdateCount > c.dataUpdateCount || d.errorUpdateCount > c.errorUpdateCount,
944
- isFetching: E,
945
- isRefetching: E && !O,
946
- isLoadingError: A && !R,
944
+ isFetching: b,
945
+ isRefetching: b && !C,
946
+ isLoadingError: I && !R,
947
947
  isPaused: d.fetchStatus === "paused",
948
948
  isPlaceholderData: u,
949
- isRefetchError: A && R,
949
+ isRefetchError: I && R,
950
950
  isStale: Gt(e, t),
951
951
  refetch: this.refetch,
952
952
  promise: this.#o,
953
953
  isEnabled: Y(t.enabled, e) !== !1
954
954
  };
955
955
  if (this.options.experimental_prefetchInRender) {
956
- const v = (I) => {
957
- C.status === "error" ? I.reject(C.error) : C.data !== void 0 && I.resolve(C.data);
958
- }, x = () => {
959
- const I = this.#o = C.promise = Pt();
960
- v(I);
956
+ const v = (A) => {
957
+ O.status === "error" ? A.reject(O.error) : O.data !== void 0 && A.resolve(O.data);
958
+ }, L = () => {
959
+ const A = this.#o = O.promise = Pt();
960
+ v(A);
961
961
  }, _ = this.#o;
962
962
  switch (_.status) {
963
963
  case "pending":
964
964
  e.queryHash === r.queryHash && v(_);
965
965
  break;
966
966
  case "fulfilled":
967
- (C.status === "error" || C.data !== _.value) && x();
967
+ (O.status === "error" || O.data !== _.value) && L();
968
968
  break;
969
969
  case "rejected":
970
- (C.status !== "error" || C.error !== _.reason) && x();
970
+ (O.status !== "error" || O.error !== _.reason) && L();
971
971
  break;
972
972
  }
973
973
  }
974
- return C;
974
+ return O;
975
975
  }
976
976
  updateResult() {
977
977
  const e = this.#a, t = this.createResult(this.#t, this.options);
@@ -1002,10 +1002,10 @@ var ia = class extends Ne {
1002
1002
  this.#t = e, this.#r = e.state, this.hasListeners() && (t?.removeObserver(this), e.addObserver(this));
1003
1003
  }
1004
1004
  onQueryUpdate() {
1005
- this.updateResult(), this.hasListeners() && this.#E();
1005
+ this.updateResult(), this.hasListeners() && this.#b();
1006
1006
  }
1007
1007
  #T(e) {
1008
- $.batch(() => {
1008
+ M.batch(() => {
1009
1009
  e.listeners && this.listeners.forEach((t) => {
1010
1010
  t(this.#a);
1011
1011
  }), this.#e.getQueryCache().notify({
@@ -1019,10 +1019,10 @@ function oa(e, t) {
1019
1019
  return Y(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1020
1020
  }
1021
1021
  function nr(e, t) {
1022
- return oa(e, t) || e.state.data !== void 0 && xt(e, t, t.refetchOnMount);
1022
+ return oa(e, t) || e.state.data !== void 0 && Mt(e, t, t.refetchOnMount);
1023
1023
  }
1024
- function xt(e, t, r) {
1025
- if (Y(t.enabled, e) !== !1 && de(t.staleTime, e) !== "static") {
1024
+ function Mt(e, t, r) {
1025
+ if (Y(t.enabled, e) !== !1 && pe(t.staleTime, e) !== "static") {
1026
1026
  const s = typeof r == "function" ? r(e) : r;
1027
1027
  return s === "always" || s !== !1 && Gt(e, t);
1028
1028
  }
@@ -1032,7 +1032,7 @@ function ir(e, t, r, s) {
1032
1032
  return (e !== t || Y(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Gt(e, r);
1033
1033
  }
1034
1034
  function Gt(e, t) {
1035
- return Y(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
1035
+ return Y(t.enabled, e) !== !1 && e.isStaleByTime(pe(t.staleTime, e));
1036
1036
  }
1037
1037
  function ca(e, t) {
1038
1038
  return !Ze(e.getCurrentResult(), t);
@@ -1051,32 +1051,32 @@ function or(e) {
1051
1051
  d = !0;
1052
1052
  }), t.signal)
1053
1053
  });
1054
- }, l = $r(t.options, t.fetchOptions), m = async (p, g, b) => {
1054
+ }, l = $r(t.options, t.fetchOptions), m = async (p, g, E) => {
1055
1055
  if (d)
1056
1056
  return Promise.reject();
1057
1057
  if (g == null && p.pages.length)
1058
1058
  return Promise.resolve(p);
1059
- const O = (() => {
1059
+ const C = (() => {
1060
1060
  const z = {
1061
1061
  client: t.client,
1062
1062
  queryKey: t.queryKey,
1063
1063
  pageParam: g,
1064
- direction: b ? "backward" : "forward",
1064
+ direction: E ? "backward" : "forward",
1065
1065
  meta: t.options.meta
1066
1066
  };
1067
1067
  return u(z), z;
1068
- })(), A = await l(O), { maxPages: K } = t.options, R = b ? Zs : Xs;
1068
+ })(), I = await l(C), { maxPages: B } = t.options, R = E ? Zs : Xs;
1069
1069
  return {
1070
- pages: R(p.pages, A, K),
1071
- pageParams: R(p.pageParams, g, K)
1070
+ pages: R(p.pages, I, B),
1071
+ pageParams: R(p.pageParams, g, B)
1072
1072
  };
1073
1073
  };
1074
1074
  if (a && n.length) {
1075
- const p = a === "backward", g = p ? la : cr, b = {
1075
+ const p = a === "backward", g = p ? la : cr, E = {
1076
1076
  pages: n,
1077
1077
  pageParams: i
1078
- }, E = g(s, b);
1079
- o = await m(b, E, p);
1078
+ }, b = g(s, E);
1079
+ o = await m(E, b, p);
1080
1080
  } else {
1081
1081
  const p = e ?? n.length;
1082
1082
  do {
@@ -1305,7 +1305,7 @@ var ua = class extends Lr {
1305
1305
  };
1306
1306
  }
1307
1307
  };
1308
- this.state = t(this.state), $.batch(() => {
1308
+ this.state = t(this.state), M.batch(() => {
1309
1309
  this.#t.forEach((r) => {
1310
1310
  r.onMutationUpdate(e);
1311
1311
  }), this.#r.notify({
@@ -1329,7 +1329,7 @@ function Fr() {
1329
1329
  submittedAt: 0
1330
1330
  };
1331
1331
  }
1332
- var da = class extends Ne {
1332
+ var da = class extends Pe {
1333
1333
  constructor(e = {}) {
1334
1334
  super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#r = 0;
1335
1335
  }
@@ -1384,7 +1384,7 @@ var da = class extends Ne {
1384
1384
  return typeof t == "string" ? this.#t.get(t)?.find((s) => s !== e && s.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
1385
1385
  }
1386
1386
  clear() {
1387
- $.batch(() => {
1387
+ M.batch(() => {
1388
1388
  this.#e.forEach((e) => {
1389
1389
  this.notify({ type: "removed", mutation: e });
1390
1390
  }), this.#e.clear(), this.#t.clear();
@@ -1403,7 +1403,7 @@ var da = class extends Ne {
1403
1403
  return this.getAll().filter((t) => tr(e, t));
1404
1404
  }
1405
1405
  notify(e) {
1406
- $.batch(() => {
1406
+ M.batch(() => {
1407
1407
  this.listeners.forEach((t) => {
1408
1408
  t(e);
1409
1409
  });
@@ -1411,9 +1411,9 @@ var da = class extends Ne {
1411
1411
  }
1412
1412
  resumePausedMutations() {
1413
1413
  const e = this.getAll().filter((t) => t.state.isPaused);
1414
- return $.batch(
1414
+ return M.batch(
1415
1415
  () => Promise.all(
1416
- e.map((t) => t.continue().catch(q))
1416
+ e.map((t) => t.continue().catch(W))
1417
1417
  )
1418
1418
  );
1419
1419
  }
@@ -1421,7 +1421,7 @@ var da = class extends Ne {
1421
1421
  function Ke(e) {
1422
1422
  return e.options.scope?.id;
1423
1423
  }
1424
- var ha = class extends Ne {
1424
+ var ha = class extends Pe {
1425
1425
  #e;
1426
1426
  #t = void 0;
1427
1427
  #r;
@@ -1438,7 +1438,7 @@ var ha = class extends Ne {
1438
1438
  type: "observerOptionsUpdated",
1439
1439
  mutation: this.#r,
1440
1440
  observer: this
1441
- }), t?.mutationKey && this.options.mutationKey && Ee(t.mutationKey) !== Ee(this.options.mutationKey) ? this.reset() : this.#r?.state.status === "pending" && this.#r.setOptions(this.options);
1441
+ }), t?.mutationKey && this.options.mutationKey && Se(t.mutationKey) !== Se(this.options.mutationKey) ? this.reset() : this.#r?.state.status === "pending" && this.#r.setOptions(this.options);
1442
1442
  }
1443
1443
  onUnsubscribe() {
1444
1444
  this.hasListeners() || this.#r?.removeObserver(this);
@@ -1468,7 +1468,7 @@ var ha = class extends Ne {
1468
1468
  };
1469
1469
  }
1470
1470
  #i(e) {
1471
- $.batch(() => {
1471
+ M.batch(() => {
1472
1472
  if (this.#a && this.hasListeners()) {
1473
1473
  const t = this.#t.variables, r = this.#t.context, s = {
1474
1474
  client: this.#e,
@@ -1504,7 +1504,7 @@ var ha = class extends Ne {
1504
1504
  });
1505
1505
  });
1506
1506
  }
1507
- }, fa = class extends Ne {
1507
+ }, fa = class extends Pe {
1508
1508
  constructor(e = {}) {
1509
1509
  super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
1510
1510
  }
@@ -1532,7 +1532,7 @@ var ha = class extends Ne {
1532
1532
  t && (e.destroy(), t === e && this.#e.delete(e.queryHash), this.notify({ type: "removed", query: e }));
1533
1533
  }
1534
1534
  clear() {
1535
- $.batch(() => {
1535
+ M.batch(() => {
1536
1536
  this.getAll().forEach((e) => {
1537
1537
  this.remove(e);
1538
1538
  });
@@ -1555,21 +1555,21 @@ var ha = class extends Ne {
1555
1555
  return Object.keys(e).length > 0 ? t.filter((r) => er(e, r)) : t;
1556
1556
  }
1557
1557
  notify(e) {
1558
- $.batch(() => {
1558
+ M.batch(() => {
1559
1559
  this.listeners.forEach((t) => {
1560
1560
  t(e);
1561
1561
  });
1562
1562
  });
1563
1563
  }
1564
1564
  onFocus() {
1565
- $.batch(() => {
1565
+ M.batch(() => {
1566
1566
  this.getAll().forEach((e) => {
1567
1567
  e.onFocus();
1568
1568
  });
1569
1569
  });
1570
1570
  }
1571
1571
  onOnline() {
1572
- $.batch(() => {
1572
+ M.batch(() => {
1573
1573
  this.getAll().forEach((e) => {
1574
1574
  e.onOnline();
1575
1575
  });
@@ -1616,7 +1616,7 @@ var ha = class extends Ne {
1616
1616
  }
1617
1617
  ensureQueryData(e) {
1618
1618
  const t = this.defaultQueryOptions(e), r = this.#e.build(this, t), s = r.state.data;
1619
- return s === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && r.isStaleByTime(de(t.staleTime, r)) && this.prefetchQuery(t), Promise.resolve(s));
1619
+ return s === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && r.isStaleByTime(pe(t.staleTime, r)) && this.prefetchQuery(t), Promise.resolve(s));
1620
1620
  }
1621
1621
  getQueriesData(e) {
1622
1622
  return this.#e.findAll(e).map(({ queryKey: t, state: r }) => {
@@ -1632,7 +1632,7 @@ var ha = class extends Ne {
1632
1632
  return this.#e.build(this, s).setData(i, { ...r, manual: !0 });
1633
1633
  }
1634
1634
  setQueriesData(e, t, r) {
1635
- return $.batch(
1635
+ return M.batch(
1636
1636
  () => this.#e.findAll(e).map(({ queryKey: s }) => [
1637
1637
  s,
1638
1638
  this.setQueryData(s, t, r)
@@ -1647,7 +1647,7 @@ var ha = class extends Ne {
1647
1647
  }
1648
1648
  removeQueries(e) {
1649
1649
  const t = this.#e;
1650
- $.batch(() => {
1650
+ M.batch(() => {
1651
1651
  t.findAll(e).forEach((r) => {
1652
1652
  t.remove(r);
1653
1653
  });
@@ -1655,7 +1655,7 @@ var ha = class extends Ne {
1655
1655
  }
1656
1656
  resetQueries(e, t) {
1657
1657
  const r = this.#e;
1658
- return $.batch(() => (r.findAll(e).forEach((s) => {
1658
+ return M.batch(() => (r.findAll(e).forEach((s) => {
1659
1659
  s.reset();
1660
1660
  }), this.refetchQueries(
1661
1661
  {
@@ -1666,13 +1666,13 @@ var ha = class extends Ne {
1666
1666
  )));
1667
1667
  }
1668
1668
  cancelQueries(e, t = {}) {
1669
- const r = { revert: !0, ...t }, s = $.batch(
1669
+ const r = { revert: !0, ...t }, s = M.batch(
1670
1670
  () => this.#e.findAll(e).map((a) => a.cancel(r))
1671
1671
  );
1672
- return Promise.all(s).then(q).catch(q);
1672
+ return Promise.all(s).then(W).catch(W);
1673
1673
  }
1674
1674
  invalidateQueries(e, t = {}) {
1675
- return $.batch(() => (this.#e.findAll(e).forEach((r) => {
1675
+ return M.batch(() => (this.#e.findAll(e).forEach((r) => {
1676
1676
  r.invalidate();
1677
1677
  }), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries(
1678
1678
  {
@@ -1686,30 +1686,30 @@ var ha = class extends Ne {
1686
1686
  const r = {
1687
1687
  ...t,
1688
1688
  cancelRefetch: t.cancelRefetch ?? !0
1689
- }, s = $.batch(
1689
+ }, s = M.batch(
1690
1690
  () => this.#e.findAll(e).filter((a) => !a.isDisabled() && !a.isStatic()).map((a) => {
1691
1691
  let n = a.fetch(void 0, r);
1692
- return r.throwOnError || (n = n.catch(q)), a.state.fetchStatus === "paused" ? Promise.resolve() : n;
1692
+ return r.throwOnError || (n = n.catch(W)), a.state.fetchStatus === "paused" ? Promise.resolve() : n;
1693
1693
  })
1694
1694
  );
1695
- return Promise.all(s).then(q);
1695
+ return Promise.all(s).then(W);
1696
1696
  }
1697
1697
  fetchQuery(e) {
1698
1698
  const t = this.defaultQueryOptions(e);
1699
1699
  t.retry === void 0 && (t.retry = !1);
1700
1700
  const r = this.#e.build(this, t);
1701
1701
  return r.isStaleByTime(
1702
- de(t.staleTime, r)
1702
+ pe(t.staleTime, r)
1703
1703
  ) ? r.fetch(t) : Promise.resolve(r.state.data);
1704
1704
  }
1705
1705
  prefetchQuery(e) {
1706
- return this.fetchQuery(e).then(q).catch(q);
1706
+ return this.fetchQuery(e).then(W).catch(W);
1707
1707
  }
1708
1708
  fetchInfiniteQuery(e) {
1709
1709
  return e.behavior = or(e.pages), this.fetchQuery(e);
1710
1710
  }
1711
1711
  prefetchInfiniteQuery(e) {
1712
- return this.fetchInfiniteQuery(e).then(q).catch(q);
1712
+ return this.fetchInfiniteQuery(e).then(W).catch(W);
1713
1713
  }
1714
1714
  ensureInfiniteQueryData(e) {
1715
1715
  return e.behavior = or(e.pages), this.ensureQueryData(e);
@@ -1730,7 +1730,7 @@ var ha = class extends Ne {
1730
1730
  this.#r = e;
1731
1731
  }
1732
1732
  setQueryDefaults(e, t) {
1733
- this.#a.set(Ee(e), {
1733
+ this.#a.set(Se(e), {
1734
1734
  queryKey: e,
1735
1735
  defaultOptions: t
1736
1736
  });
@@ -1742,7 +1742,7 @@ var ha = class extends Ne {
1742
1742
  }), r;
1743
1743
  }
1744
1744
  setMutationDefaults(e, t) {
1745
- this.#s.set(Ee(e), {
1745
+ this.#s.set(Se(e), {
1746
1746
  mutationKey: e,
1747
1747
  defaultOptions: t
1748
1748
  });
@@ -1778,20 +1778,20 @@ var ha = class extends Ne {
1778
1778
  clear() {
1779
1779
  this.#e.clear(), this.#t.clear();
1780
1780
  }
1781
- }, Hr = H.createContext(
1781
+ }, Hr = q.createContext(
1782
1782
  void 0
1783
- ), he = (e) => {
1784
- const t = H.useContext(Hr);
1783
+ ), se = (e) => {
1784
+ const t = q.useContext(Hr);
1785
1785
  if (!t)
1786
1786
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1787
1787
  return t;
1788
1788
  }, pa = ({
1789
1789
  client: e,
1790
1790
  children: t
1791
- }) => (H.useEffect(() => (e.mount(), () => {
1791
+ }) => (q.useEffect(() => (e.mount(), () => {
1792
1792
  e.unmount();
1793
- }), [e]), /* @__PURE__ */ h(Hr.Provider, { value: e, children: t })), ya = H.createContext(!1), ga = () => H.useContext(ya);
1794
- function ba() {
1793
+ }), [e]), /* @__PURE__ */ h(Hr.Provider, { value: e, children: t })), ya = q.createContext(!1), ga = () => q.useContext(ya);
1794
+ function Ea() {
1795
1795
  let e = !1;
1796
1796
  return {
1797
1797
  clearReset: () => {
@@ -1803,10 +1803,10 @@ function ba() {
1803
1803
  isReset: () => e
1804
1804
  };
1805
1805
  }
1806
- var Ea = H.createContext(ba()), wa = () => H.useContext(Ea), Sa = (e, t) => {
1806
+ var ba = q.createContext(Ea()), Sa = () => q.useContext(ba), wa = (e, t) => {
1807
1807
  (e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
1808
1808
  }, va = (e) => {
1809
- H.useEffect(() => {
1809
+ q.useEffect(() => {
1810
1810
  e.clearReset();
1811
1811
  }, [e]);
1812
1812
  }, Ta = ({
@@ -1815,7 +1815,7 @@ var Ea = H.createContext(ba()), wa = () => H.useContext(Ea), Sa = (e, t) => {
1815
1815
  throwOnError: r,
1816
1816
  query: s,
1817
1817
  suspense: a
1818
- }) => e.isError && !t.isReset() && !e.isFetching && s && (a && e.data === void 0 || xr(r, [e.error, s])), Aa = (e) => {
1818
+ }) => e.isError && !t.isReset() && !e.isFetching && s && (a && e.data === void 0 || Mr(r, [e.error, s])), Ia = (e) => {
1819
1819
  if (e.suspense) {
1820
1820
  const r = (a) => a === "static" ? a : Math.max(a ?? 1e3, 1e3), s = e.staleTime;
1821
1821
  e.staleTime = typeof s == "function" ? (...a) => r(s(...a)) : r(s), typeof e.gcTime == "number" && (e.gcTime = Math.max(
@@ -1823,7 +1823,7 @@ var Ea = H.createContext(ba()), wa = () => H.useContext(Ea), Sa = (e, t) => {
1823
1823
  1e3
1824
1824
  ));
1825
1825
  }
1826
- }, Ia = (e, t) => e.isLoading && e.isFetching && !t, _a = (e, t) => e?.suspense && t.isPending, lr = (e, t, r) => t.fetchOptimistic(e).catch(() => {
1826
+ }, Aa = (e, t) => e.isLoading && e.isFetching && !t, _a = (e, t) => e?.suspense && t.isPending, lr = (e, t, r) => t.fetchOptimistic(e).catch(() => {
1827
1827
  r.clearReset();
1828
1828
  });
1829
1829
  function Ra(e, t, r) {
@@ -1831,29 +1831,29 @@ function Ra(e, t, r) {
1831
1831
  throw new Error(
1832
1832
  'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
1833
1833
  );
1834
- const s = ga(), a = wa(), n = he(), i = n.defaultQueryOptions(e);
1834
+ const s = ga(), a = Sa(), n = se(), i = n.defaultQueryOptions(e);
1835
1835
  n.getDefaultOptions().queries?._experimental_beforeQuery?.(
1836
1836
  i
1837
1837
  ), process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
1838
1838
  `[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
1839
- )), i._optimisticResults = s ? "isRestoring" : "optimistic", Aa(i), Sa(i, a), va(a);
1840
- const o = !n.getQueryCache().get(i.queryHash), [c] = H.useState(
1839
+ )), i._optimisticResults = s ? "isRestoring" : "optimistic", Ia(i), wa(i, a), va(a);
1840
+ const o = !n.getQueryCache().get(i.queryHash), [c] = q.useState(
1841
1841
  () => new t(
1842
1842
  n,
1843
1843
  i
1844
1844
  )
1845
1845
  ), f = c.getOptimisticResult(i), d = !s && e.subscribed !== !1;
1846
- if (H.useSyncExternalStore(
1847
- H.useCallback(
1846
+ if (q.useSyncExternalStore(
1847
+ q.useCallback(
1848
1848
  (u) => {
1849
- const l = d ? c.subscribe($.batchCalls(u)) : q;
1849
+ const l = d ? c.subscribe(M.batchCalls(u)) : W;
1850
1850
  return c.updateResult(), l;
1851
1851
  },
1852
1852
  [c, d]
1853
1853
  ),
1854
1854
  () => c.getCurrentResult(),
1855
1855
  () => c.getCurrentResult()
1856
- ), H.useEffect(() => {
1856
+ ), q.useEffect(() => {
1857
1857
  c.setOptions(i);
1858
1858
  }, [i, c]), _a(i, f))
1859
1859
  throw lr(i, c, a);
@@ -1868,43 +1868,43 @@ function Ra(e, t, r) {
1868
1868
  return n.getDefaultOptions().queries?._experimental_afterQuery?.(
1869
1869
  i,
1870
1870
  f
1871
- ), i.experimental_prefetchInRender && !be && Ia(f, s) && (o ? (
1871
+ ), i.experimental_prefetchInRender && !be && Aa(f, s) && (o ? (
1872
1872
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1873
1873
  lr(i, c, a)
1874
1874
  ) : (
1875
1875
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1876
1876
  n.getQueryCache().get(i.queryHash)?.promise
1877
- ))?.catch(q).finally(() => {
1877
+ ))?.catch(W).finally(() => {
1878
1878
  c.updateResult();
1879
1879
  }), i.notifyOnChangeProps ? f : c.trackResult(f);
1880
1880
  }
1881
- function fe(e, t) {
1881
+ function ue(e, t) {
1882
1882
  return Ra(e, ia);
1883
1883
  }
1884
- function Pe(e, t) {
1885
- const r = he(), [s] = H.useState(
1884
+ function ye(e, t) {
1885
+ const r = se(), [s] = q.useState(
1886
1886
  () => new ha(
1887
1887
  r,
1888
1888
  e
1889
1889
  )
1890
1890
  );
1891
- H.useEffect(() => {
1891
+ q.useEffect(() => {
1892
1892
  s.setOptions(e);
1893
1893
  }, [s, e]);
1894
- const a = H.useSyncExternalStore(
1895
- H.useCallback(
1896
- (i) => s.subscribe($.batchCalls(i)),
1894
+ const a = q.useSyncExternalStore(
1895
+ q.useCallback(
1896
+ (i) => s.subscribe(M.batchCalls(i)),
1897
1897
  [s]
1898
1898
  ),
1899
1899
  () => s.getCurrentResult(),
1900
1900
  () => s.getCurrentResult()
1901
- ), n = H.useCallback(
1901
+ ), n = q.useCallback(
1902
1902
  (i, o) => {
1903
- s.mutate(i, o).catch(q);
1903
+ s.mutate(i, o).catch(W);
1904
1904
  },
1905
1905
  [s]
1906
1906
  );
1907
- if (a.error && xr(s.options.throwOnError, [a.error]))
1907
+ if (a.error && Mr(s.options.throwOnError, [a.error]))
1908
1908
  throw a.error;
1909
1909
  return { ...a, mutate: n, mutateAsync: a.mutate };
1910
1910
  }
@@ -1921,13 +1921,13 @@ try {
1921
1921
  });
1922
1922
  } catch {
1923
1923
  }
1924
- const xe = {
1924
+ const Me = {
1925
1925
  CODE: "code",
1926
1926
  REFRESH_TOKEN: "refresh_token",
1927
1927
  PASSKEY: "passkey"
1928
1928
  }, Kr = {
1929
1929
  CLIENT_ID: "X-Auth-ClientId"
1930
- }, F = {
1930
+ }, G = {
1931
1931
  ALG: "RS256",
1932
1932
  USER_ID_KEY: "sub",
1933
1933
  USERNAME_KEY: "username",
@@ -1935,7 +1935,7 @@ const xe = {
1935
1935
  NONCE_KEY: "_nonce",
1936
1936
  AUTH_TYPE_KEY: "auth_type",
1937
1937
  ISSUER: "gizmette.com"
1938
- }, Ca = `-----BEGIN PUBLIC KEY-----
1938
+ }, Oa = `-----BEGIN PUBLIC KEY-----
1939
1939
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
1940
1940
  w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
1941
1941
  i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
@@ -1948,8 +1948,8 @@ awIDAQAB
1948
1948
  LOGOUT: "logout",
1949
1949
  LOGIN: "login",
1950
1950
  REFRESH: "refresh"
1951
- }, Ge = new TextEncoder(), ke = new TextDecoder();
1952
- function Oa(...e) {
1951
+ }, Ge = new TextEncoder(), Ne = new TextDecoder();
1952
+ function Ca(...e) {
1953
1953
  const t = e.reduce((a, { length: n }) => a + n, 0), r = new Uint8Array(t);
1954
1954
  let s = 0;
1955
1955
  for (const a of e)
@@ -1964,13 +1964,13 @@ function Gr(e) {
1964
1964
  r[s] = t.charCodeAt(s);
1965
1965
  return r;
1966
1966
  }
1967
- function Me(e) {
1967
+ function xe(e) {
1968
1968
  if (Uint8Array.fromBase64)
1969
- return Uint8Array.fromBase64(typeof e == "string" ? e : ke.decode(e), {
1969
+ return Uint8Array.fromBase64(typeof e == "string" ? e : Ne.decode(e), {
1970
1970
  alphabet: "base64url"
1971
1971
  });
1972
1972
  let t = e;
1973
- t instanceof Uint8Array && (t = ke.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
1973
+ t instanceof Uint8Array && (t = Ne.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
1974
1974
  try {
1975
1975
  return Gr(t);
1976
1976
  } catch {
@@ -2004,15 +2004,15 @@ let we = class extends Error {
2004
2004
  }, ka = class extends we {
2005
2005
  static code = "ERR_JOSE_ALG_NOT_ALLOWED";
2006
2006
  code = "ERR_JOSE_ALG_NOT_ALLOWED";
2007
- }, ne = class extends we {
2007
+ }, oe = class extends we {
2008
2008
  static code = "ERR_JOSE_NOT_SUPPORTED";
2009
2009
  code = "ERR_JOSE_NOT_SUPPORTED";
2010
2010
  };
2011
- class L extends we {
2011
+ class H extends we {
2012
2012
  static code = "ERR_JWS_INVALID";
2013
2013
  code = "ERR_JWS_INVALID";
2014
2014
  }
2015
- let se = class extends we {
2015
+ let ne = class extends we {
2016
2016
  static code = "ERR_JWT_INVALID";
2017
2017
  code = "ERR_JWT_INVALID";
2018
2018
  };
@@ -2026,7 +2026,7 @@ class Na extends we {
2026
2026
  function ee(e, t = "algorithm.name") {
2027
2027
  return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
2028
2028
  }
2029
- function Te(e, t) {
2029
+ function Ie(e, t) {
2030
2030
  return e.name === t;
2031
2031
  }
2032
2032
  function pt(e) {
@@ -2048,12 +2048,12 @@ function $a(e, t) {
2048
2048
  if (!e.usages.includes(t))
2049
2049
  throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`);
2050
2050
  }
2051
- function xa(e, t, r) {
2051
+ function Ma(e, t, r) {
2052
2052
  switch (t) {
2053
2053
  case "HS256":
2054
2054
  case "HS384":
2055
2055
  case "HS512": {
2056
- if (!Te(e.algorithm, "HMAC"))
2056
+ if (!Ie(e.algorithm, "HMAC"))
2057
2057
  throw ee("HMAC");
2058
2058
  const s = parseInt(t.slice(2), 10);
2059
2059
  if (pt(e.algorithm.hash) !== s)
@@ -2063,7 +2063,7 @@ function xa(e, t, r) {
2063
2063
  case "RS256":
2064
2064
  case "RS384":
2065
2065
  case "RS512": {
2066
- if (!Te(e.algorithm, "RSASSA-PKCS1-v1_5"))
2066
+ if (!Ie(e.algorithm, "RSASSA-PKCS1-v1_5"))
2067
2067
  throw ee("RSASSA-PKCS1-v1_5");
2068
2068
  const s = parseInt(t.slice(2), 10);
2069
2069
  if (pt(e.algorithm.hash) !== s)
@@ -2073,7 +2073,7 @@ function xa(e, t, r) {
2073
2073
  case "PS256":
2074
2074
  case "PS384":
2075
2075
  case "PS512": {
2076
- if (!Te(e.algorithm, "RSA-PSS"))
2076
+ if (!Ie(e.algorithm, "RSA-PSS"))
2077
2077
  throw ee("RSA-PSS");
2078
2078
  const s = parseInt(t.slice(2), 10);
2079
2079
  if (pt(e.algorithm.hash) !== s)
@@ -2082,21 +2082,21 @@ function xa(e, t, r) {
2082
2082
  }
2083
2083
  case "Ed25519":
2084
2084
  case "EdDSA": {
2085
- if (!Te(e.algorithm, "Ed25519"))
2085
+ if (!Ie(e.algorithm, "Ed25519"))
2086
2086
  throw ee("Ed25519");
2087
2087
  break;
2088
2088
  }
2089
2089
  case "ML-DSA-44":
2090
2090
  case "ML-DSA-65":
2091
2091
  case "ML-DSA-87": {
2092
- if (!Te(e.algorithm, t))
2092
+ if (!Ie(e.algorithm, t))
2093
2093
  throw ee(t);
2094
2094
  break;
2095
2095
  }
2096
2096
  case "ES256":
2097
2097
  case "ES384":
2098
2098
  case "ES512": {
2099
- if (!Te(e.algorithm, "ECDSA"))
2099
+ if (!Ie(e.algorithm, "ECDSA"))
2100
2100
  throw ee("ECDSA");
2101
2101
  const s = Pa(t);
2102
2102
  if (e.algorithm.namedCurve !== s)
@@ -2108,16 +2108,16 @@ function xa(e, t, r) {
2108
2108
  }
2109
2109
  $a(e, r);
2110
2110
  }
2111
- function Br(e, t, ...r) {
2111
+ function qr(e, t, ...r) {
2112
2112
  if (r = r.filter(Boolean), r.length > 2) {
2113
2113
  const s = r.pop();
2114
2114
  e += `one of type ${r.join(", ")}, or ${s}.`;
2115
2115
  } else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
2116
2116
  return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && t.constructor?.name && (e += ` Received an instance of ${t.constructor.name}`), e;
2117
2117
  }
2118
- const Ma = (e, ...t) => Br("Key must be ", e, ...t);
2119
- function qr(e, t, ...r) {
2120
- return Br(`Key for the ${e} algorithm must be `, t, ...r);
2118
+ const xa = (e, ...t) => qr("Key must be ", e, ...t);
2119
+ function Br(e, t, ...r) {
2120
+ return qr(`Key for the ${e} algorithm must be `, t, ...r);
2121
2121
  }
2122
2122
  function Wr(e) {
2123
2123
  return e?.[Symbol.toStringTag] === "CryptoKey";
@@ -2211,7 +2211,7 @@ const Ga = (e) => {
2211
2211
  if (yt(s, n))
2212
2212
  return a;
2213
2213
  throw new Error("Unsupported named curve");
2214
- }, Ba = async (e, t, r, s) => {
2214
+ }, qa = async (e, t, r, s) => {
2215
2215
  let a, n;
2216
2216
  const i = () => ["verify"], o = () => ["encrypt", "wrapKey"];
2217
2217
  switch (r) {
@@ -2248,7 +2248,7 @@ const Ga = (e) => {
2248
2248
  const c = s.getNamedCurve(t);
2249
2249
  a = c === "X25519" ? { name: "X25519" } : { name: "ECDH", namedCurve: c };
2250
2250
  } catch {
2251
- throw new ne("Invalid or unsupported key format");
2251
+ throw new oe("Invalid or unsupported key format");
2252
2252
  }
2253
2253
  n = [];
2254
2254
  break;
@@ -2263,16 +2263,16 @@ const Ga = (e) => {
2263
2263
  a = { name: r }, n = i();
2264
2264
  break;
2265
2265
  default:
2266
- throw new ne('Invalid or unsupported "alg" (Algorithm) value');
2266
+ throw new oe('Invalid or unsupported "alg" (Algorithm) value');
2267
2267
  }
2268
2268
  return crypto.subtle.importKey(e, t, a, s?.extractable ?? !0, n);
2269
- }, qa = (e, t) => Gr(e.replace(t, "")), Wa = (e, t, r) => {
2270
- const s = qa(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
2269
+ }, Ba = (e, t) => Gr(e.replace(t, "")), Wa = (e, t, r) => {
2270
+ const s = Ba(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
2271
2271
  let a = r;
2272
2272
  return t?.startsWith?.("ECDH-ES") && (a ||= {}, a.getNamedCurve = (n) => {
2273
2273
  const i = Fa(n);
2274
2274
  return Ka(i), Ga(i);
2275
- }), Ba("spki", s, t, a);
2275
+ }), qa("spki", s, t, a);
2276
2276
  };
2277
2277
  function Va(e) {
2278
2278
  let t, r;
@@ -2285,7 +2285,7 @@ function Va(e) {
2285
2285
  t = { name: e.alg }, r = e.priv ? ["sign"] : ["verify"];
2286
2286
  break;
2287
2287
  default:
2288
- throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2288
+ throw new oe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2289
2289
  }
2290
2290
  break;
2291
2291
  }
@@ -2311,7 +2311,7 @@ function Va(e) {
2311
2311
  }, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
2312
2312
  break;
2313
2313
  default:
2314
- throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2314
+ throw new oe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2315
2315
  }
2316
2316
  break;
2317
2317
  }
@@ -2333,7 +2333,7 @@ function Va(e) {
2333
2333
  t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
2334
2334
  break;
2335
2335
  default:
2336
- throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2336
+ throw new oe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2337
2337
  }
2338
2338
  break;
2339
2339
  }
@@ -2350,12 +2350,12 @@ function Va(e) {
2350
2350
  t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
2351
2351
  break;
2352
2352
  default:
2353
- throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2353
+ throw new oe('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2354
2354
  }
2355
2355
  break;
2356
2356
  }
2357
2357
  default:
2358
- throw new ne('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
2358
+ throw new oe('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
2359
2359
  }
2360
2360
  return { algorithm: t, keyUsages: r };
2361
2361
  }
@@ -2381,7 +2381,7 @@ const Ja = (e, t, r, s, a) => {
2381
2381
  r !== void 0 ? n = new Map([...Object.entries(r), ...t.entries()]) : n = t;
2382
2382
  for (const i of s.crit) {
2383
2383
  if (!n.has(i))
2384
- throw new ne(`Extension Header Parameter "${i}" is not recognized`);
2384
+ throw new oe(`Extension Header Parameter "${i}" is not recognized`);
2385
2385
  if (a[i] === void 0)
2386
2386
  throw new e(`Extension Header Parameter "${i}" is missing`);
2387
2387
  if (n.get(i) && s[i] === void 0)
@@ -2394,7 +2394,7 @@ const Ja = (e, t, r, s, a) => {
2394
2394
  if (t)
2395
2395
  return new Set(t);
2396
2396
  };
2397
- function Bt(e) {
2397
+ function qt(e) {
2398
2398
  return Le(e) && typeof e.kty == "string";
2399
2399
  }
2400
2400
  function za(e) {
@@ -2406,17 +2406,17 @@ function Xa(e) {
2406
2406
  function Za(e) {
2407
2407
  return e.kty === "oct" && typeof e.k == "string";
2408
2408
  }
2409
- let Oe;
2409
+ let ke;
2410
2410
  const dr = async (e, t, r, s = !1) => {
2411
- Oe ||= /* @__PURE__ */ new WeakMap();
2412
- let a = Oe.get(e);
2411
+ ke ||= /* @__PURE__ */ new WeakMap();
2412
+ let a = ke.get(e);
2413
2413
  if (a?.[r])
2414
2414
  return a[r];
2415
2415
  const n = await ja({ ...t, alg: r });
2416
- return s && Object.freeze(e), a ? a[r] = n : Oe.set(e, { [r]: n }), n;
2416
+ return s && Object.freeze(e), a ? a[r] = n : ke.set(e, { [r]: n }), n;
2417
2417
  }, en = (e, t) => {
2418
- Oe ||= /* @__PURE__ */ new WeakMap();
2419
- let r = Oe.get(e);
2418
+ ke ||= /* @__PURE__ */ new WeakMap();
2419
+ let r = ke.get(e);
2420
2420
  if (r?.[t])
2421
2421
  return r[t];
2422
2422
  const s = e.type === "public", a = !!s;
@@ -2509,7 +2509,7 @@ const dr = async (e, t, r, s = !1) => {
2509
2509
  }
2510
2510
  if (!n)
2511
2511
  throw new TypeError("given KeyObject instance cannot be used for this algorithm");
2512
- return r ? r[t] = n : Oe.set(e, { [t]: n }), n;
2512
+ return r ? r[t] = n : ke.set(e, { [t]: n }), n;
2513
2513
  }, tn = async (e, t) => {
2514
2514
  if (e instanceof Uint8Array || Wr(e))
2515
2515
  return e;
@@ -2526,10 +2526,10 @@ const dr = async (e, t, r, s = !1) => {
2526
2526
  let r = e.export({ format: "jwk" });
2527
2527
  return dr(e, r, t);
2528
2528
  }
2529
- if (Bt(e))
2530
- return e.k ? Me(e.k) : dr(e, e, t, !0);
2529
+ if (qt(e))
2530
+ return e.k ? xe(e.k) : dr(e, e, t, !0);
2531
2531
  throw new Error("unreachable");
2532
- }, Ce = (e) => e?.[Symbol.toStringTag], Mt = (e, t, r) => {
2532
+ }, Ce = (e) => e?.[Symbol.toStringTag], xt = (e, t, r) => {
2533
2533
  if (t.use !== void 0) {
2534
2534
  let s;
2535
2535
  switch (r) {
@@ -2574,32 +2574,32 @@ const dr = async (e, t, r, s = !1) => {
2574
2574
  return !0;
2575
2575
  }, rn = (e, t, r) => {
2576
2576
  if (!(t instanceof Uint8Array)) {
2577
- if (Bt(t)) {
2578
- if (Za(t) && Mt(e, t, r))
2577
+ if (qt(t)) {
2578
+ if (Za(t) && xt(e, t, r))
2579
2579
  return;
2580
2580
  throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
2581
2581
  }
2582
2582
  if (!jr(t))
2583
- throw new TypeError(qr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2583
+ throw new TypeError(Br(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2584
2584
  if (t.type !== "secret")
2585
2585
  throw new TypeError(`${Ce(t)} instances for symmetric algorithms must be of type "secret"`);
2586
2586
  }
2587
2587
  }, sn = (e, t, r) => {
2588
- if (Bt(t))
2588
+ if (qt(t))
2589
2589
  switch (r) {
2590
2590
  case "decrypt":
2591
2591
  case "sign":
2592
- if (za(t) && Mt(e, t, r))
2592
+ if (za(t) && xt(e, t, r))
2593
2593
  return;
2594
2594
  throw new TypeError("JSON Web Key for this operation be a private JWK");
2595
2595
  case "encrypt":
2596
2596
  case "verify":
2597
- if (Xa(t) && Mt(e, t, r))
2597
+ if (Xa(t) && xt(e, t, r))
2598
2598
  return;
2599
2599
  throw new TypeError("JSON Web Key for this operation be a public JWK");
2600
2600
  }
2601
2601
  if (!jr(t))
2602
- throw new TypeError(qr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2602
+ throw new TypeError(Br(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2603
2603
  if (t.type === "secret")
2604
2604
  throw new TypeError(`${Ce(t)} instances for asymmetric algorithms must not be of type "secret"`);
2605
2605
  if (t.type === "public")
@@ -2645,15 +2645,15 @@ const dr = async (e, t, r, s = !1) => {
2645
2645
  case "ML-DSA-87":
2646
2646
  return { name: e };
2647
2647
  default:
2648
- throw new ne(`alg ${e} is not supported either by JOSE or your javascript runtime`);
2648
+ throw new oe(`alg ${e} is not supported either by JOSE or your javascript runtime`);
2649
2649
  }
2650
2650
  }, on = async (e, t, r) => {
2651
2651
  if (t instanceof Uint8Array) {
2652
2652
  if (!e.startsWith("HS"))
2653
- throw new TypeError(Ma(t, "CryptoKey", "KeyObject", "JSON Web Key"));
2653
+ throw new TypeError(xa(t, "CryptoKey", "KeyObject", "JSON Web Key"));
2654
2654
  return crypto.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
2655
2655
  }
2656
- return xa(t, e, r), t;
2656
+ return Ma(t, e, r), t;
2657
2657
  }, cn = async (e, t, r, s) => {
2658
2658
  const a = await on(e, t, "verify");
2659
2659
  Ua(e, a);
@@ -2666,53 +2666,53 @@ const dr = async (e, t, r, s = !1) => {
2666
2666
  };
2667
2667
  async function ln(e, t, r) {
2668
2668
  if (!Le(e))
2669
- throw new L("Flattened JWS must be an object");
2669
+ throw new H("Flattened JWS must be an object");
2670
2670
  if (e.protected === void 0 && e.header === void 0)
2671
- throw new L('Flattened JWS must have either of the "protected" or "header" members');
2671
+ throw new H('Flattened JWS must have either of the "protected" or "header" members');
2672
2672
  if (e.protected !== void 0 && typeof e.protected != "string")
2673
- throw new L("JWS Protected Header incorrect type");
2673
+ throw new H("JWS Protected Header incorrect type");
2674
2674
  if (e.payload === void 0)
2675
- throw new L("JWS Payload missing");
2675
+ throw new H("JWS Payload missing");
2676
2676
  if (typeof e.signature != "string")
2677
- throw new L("JWS Signature missing or incorrect type");
2677
+ throw new H("JWS Signature missing or incorrect type");
2678
2678
  if (e.header !== void 0 && !Le(e.header))
2679
- throw new L("JWS Unprotected Header incorrect type");
2679
+ throw new H("JWS Unprotected Header incorrect type");
2680
2680
  let s = {};
2681
2681
  if (e.protected)
2682
2682
  try {
2683
- const g = Me(e.protected);
2684
- s = JSON.parse(ke.decode(g));
2683
+ const g = xe(e.protected);
2684
+ s = JSON.parse(Ne.decode(g));
2685
2685
  } catch {
2686
- throw new L("JWS Protected Header is invalid");
2686
+ throw new H("JWS Protected Header is invalid");
2687
2687
  }
2688
2688
  if (!Da(s, e.header))
2689
- throw new L("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
2689
+ throw new H("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
2690
2690
  const a = {
2691
2691
  ...s,
2692
2692
  ...e.header
2693
- }, n = Ja(L, /* @__PURE__ */ new Map([["b64", !0]]), r?.crit, s, a);
2693
+ }, n = Ja(H, /* @__PURE__ */ new Map([["b64", !0]]), r?.crit, s, a);
2694
2694
  let i = !0;
2695
2695
  if (n.has("b64") && (i = s.b64, typeof i != "boolean"))
2696
- throw new L('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
2696
+ throw new H('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
2697
2697
  const { alg: o } = a;
2698
2698
  if (typeof o != "string" || !o)
2699
- throw new L('JWS "alg" (Algorithm) Header Parameter missing or invalid');
2699
+ throw new H('JWS "alg" (Algorithm) Header Parameter missing or invalid');
2700
2700
  const c = r && Ya("algorithms", r.algorithms);
2701
2701
  if (c && !c.has(o))
2702
2702
  throw new ka('"alg" (Algorithm) Header Parameter value not allowed');
2703
2703
  if (i) {
2704
2704
  if (typeof e.payload != "string")
2705
- throw new L("JWS Payload must be a string");
2705
+ throw new H("JWS Payload must be a string");
2706
2706
  } else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
2707
- throw new L("JWS Payload must be a string or an Uint8Array instance");
2707
+ throw new H("JWS Payload must be a string or an Uint8Array instance");
2708
2708
  let f = !1;
2709
2709
  typeof t == "function" && (t = await t(s, e), f = !0), an(o, t, "verify");
2710
- const d = Oa(Ge.encode(e.protected ?? ""), Ge.encode("."), typeof e.payload == "string" ? Ge.encode(e.payload) : e.payload);
2710
+ const d = Ca(Ge.encode(e.protected ?? ""), Ge.encode("."), typeof e.payload == "string" ? Ge.encode(e.payload) : e.payload);
2711
2711
  let u;
2712
2712
  try {
2713
- u = Me(e.signature);
2713
+ u = xe(e.signature);
2714
2714
  } catch {
2715
- throw new L("Failed to base64url decode the signature");
2715
+ throw new H("Failed to base64url decode the signature");
2716
2716
  }
2717
2717
  const l = await tn(t, o);
2718
2718
  if (!await cn(o, l, u, d))
@@ -2720,24 +2720,24 @@ async function ln(e, t, r) {
2720
2720
  let m;
2721
2721
  if (i)
2722
2722
  try {
2723
- m = Me(e.payload);
2723
+ m = xe(e.payload);
2724
2724
  } catch {
2725
- throw new L("Failed to base64url decode the payload");
2725
+ throw new H("Failed to base64url decode the payload");
2726
2726
  }
2727
2727
  else typeof e.payload == "string" ? m = Ge.encode(e.payload) : m = e.payload;
2728
2728
  const p = { payload: m };
2729
2729
  return e.protected !== void 0 && (p.protectedHeader = s), e.header !== void 0 && (p.unprotectedHeader = e.header), f ? { ...p, key: l } : p;
2730
2730
  }
2731
2731
  async function un(e, t, r) {
2732
- if (e instanceof Uint8Array && (e = ke.decode(e)), typeof e != "string")
2733
- throw new L("Compact JWS must be a string or Uint8Array");
2732
+ if (e instanceof Uint8Array && (e = Ne.decode(e)), typeof e != "string")
2733
+ throw new H("Compact JWS must be a string or Uint8Array");
2734
2734
  const { 0: s, 1: a, 2: n, length: i } = e.split(".");
2735
2735
  if (i !== 3)
2736
- throw new L("Invalid Compact JWS");
2736
+ throw new H("Invalid Compact JWS");
2737
2737
  const o = await ln({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
2738
2738
  return typeof t == "function" ? { ...c, key: o.key } : c;
2739
2739
  }
2740
- const dn = (e) => Math.floor(e.getTime() / 1e3), Jr = 60, Yr = Jr * 60, qt = Yr * 24, hn = qt * 7, fn = qt * 365.25, mn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, hr = (e) => {
2740
+ const dn = (e) => Math.floor(e.getTime() / 1e3), Jr = 60, Yr = Jr * 60, Bt = Yr * 24, hn = Bt * 7, fn = Bt * 365.25, mn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, hr = (e) => {
2741
2741
  const t = mn.exec(e);
2742
2742
  if (!t || t[4] && t[1])
2743
2743
  throw new TypeError("Invalid time period format");
@@ -2768,7 +2768,7 @@ const dn = (e) => Math.floor(e.getTime() / 1e3), Jr = 60, Yr = Jr * 60, qt = Yr
2768
2768
  case "day":
2769
2769
  case "days":
2770
2770
  case "d":
2771
- a = Math.round(r * qt);
2771
+ a = Math.round(r * Bt);
2772
2772
  break;
2773
2773
  case "week":
2774
2774
  case "weeks":
@@ -2784,11 +2784,11 @@ const dn = (e) => Math.floor(e.getTime() / 1e3), Jr = 60, Yr = Jr * 60, qt = Yr
2784
2784
  function yn(e, t, r = {}) {
2785
2785
  let s;
2786
2786
  try {
2787
- s = JSON.parse(ke.decode(t));
2787
+ s = JSON.parse(Ne.decode(t));
2788
2788
  } catch {
2789
2789
  }
2790
2790
  if (!Le(s))
2791
- throw new se("JWT Claims Set must be a top-level JSON object");
2791
+ throw new ne("JWT Claims Set must be a top-level JSON object");
2792
2792
  const { typ: a } = r;
2793
2793
  if (a && (typeof e.typ != "string" || fr(e.typ) !== fr(a)))
2794
2794
  throw new Z('unexpected "typ" JWT header value', s, "typ", "check_failed");
@@ -2844,66 +2844,66 @@ function yn(e, t, r = {}) {
2844
2844
  async function gn(e, t, r) {
2845
2845
  const s = await un(e, t, r);
2846
2846
  if (s.protectedHeader.crit?.includes("b64") && s.protectedHeader.b64 === !1)
2847
- throw new se("JWTs MUST NOT use unencoded payload");
2847
+ throw new ne("JWTs MUST NOT use unencoded payload");
2848
2848
  const a = { payload: yn(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
2849
2849
  return typeof t == "function" ? { ...a, key: s.key } : a;
2850
2850
  }
2851
- function bn(e) {
2851
+ function En(e) {
2852
2852
  if (typeof e != "string")
2853
- throw new se("JWTs must use Compact JWS serialization, JWT must be a string");
2853
+ throw new ne("JWTs must use Compact JWS serialization, JWT must be a string");
2854
2854
  const { 1: t, length: r } = e.split(".");
2855
2855
  if (r === 5)
2856
- throw new se("Only JWTs using Compact JWS serialization can be decoded");
2856
+ throw new ne("Only JWTs using Compact JWS serialization can be decoded");
2857
2857
  if (r !== 3)
2858
- throw new se("Invalid JWT");
2858
+ throw new ne("Invalid JWT");
2859
2859
  if (!t)
2860
- throw new se("JWTs must contain a payload");
2860
+ throw new ne("JWTs must contain a payload");
2861
2861
  let s;
2862
2862
  try {
2863
- s = Me(t);
2863
+ s = xe(t);
2864
2864
  } catch {
2865
- throw new se("Failed to base64url decode the payload");
2865
+ throw new ne("Failed to base64url decode the payload");
2866
2866
  }
2867
2867
  let a;
2868
2868
  try {
2869
- a = JSON.parse(ke.decode(s));
2869
+ a = JSON.parse(Ne.decode(s));
2870
2870
  } catch {
2871
- throw new se("Failed to parse the decoded payload as JSON");
2871
+ throw new ne("Failed to parse the decoded payload as JSON");
2872
2872
  }
2873
2873
  if (!Le(a))
2874
- throw new se("Invalid JWT Claims Set");
2874
+ throw new ne("Invalid JWT Claims Set");
2875
2875
  return a;
2876
2876
  }
2877
2877
  const Ue = async (e) => {
2878
2878
  try {
2879
- const t = F.ALG, r = await Qa(Ca, t);
2879
+ const t = G.ALG, r = await Qa(Oa, t);
2880
2880
  return await gn(e, r, {
2881
- issuer: F.ISSUER
2881
+ issuer: G.ISSUER
2882
2882
  });
2883
2883
  } catch {
2884
2884
  return;
2885
2885
  }
2886
- }, En = (e) => {
2886
+ }, bn = (e) => {
2887
2887
  try {
2888
- return bn(e);
2888
+ return En(e);
2889
2889
  } catch {
2890
2890
  return;
2891
2891
  }
2892
- }, M = [];
2892
+ }, U = [];
2893
2893
  for (let e = 0; e < 256; ++e)
2894
- M.push((e + 256).toString(16).slice(1));
2895
- function wn(e, t = 0) {
2896
- return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
2894
+ U.push((e + 256).toString(16).slice(1));
2895
+ function Sn(e, t = 0) {
2896
+ return (U[e[t + 0]] + U[e[t + 1]] + U[e[t + 2]] + U[e[t + 3]] + "-" + U[e[t + 4]] + U[e[t + 5]] + "-" + U[e[t + 6]] + U[e[t + 7]] + "-" + U[e[t + 8]] + U[e[t + 9]] + "-" + U[e[t + 10]] + U[e[t + 11]] + U[e[t + 12]] + U[e[t + 13]] + U[e[t + 14]] + U[e[t + 15]]).toLowerCase();
2897
2897
  }
2898
2898
  let gt;
2899
- const Sn = new Uint8Array(16);
2899
+ const wn = new Uint8Array(16);
2900
2900
  function vn() {
2901
2901
  if (!gt) {
2902
2902
  if (typeof crypto > "u" || !crypto.getRandomValues)
2903
2903
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2904
2904
  gt = crypto.getRandomValues.bind(crypto);
2905
2905
  }
2906
- return gt(Sn);
2906
+ return gt(wn);
2907
2907
  }
2908
2908
  const Tn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mr = { randomUUID: Tn };
2909
2909
  function pr(e, t, r) {
@@ -2913,9 +2913,9 @@ function pr(e, t, r) {
2913
2913
  const s = e.random ?? e.rng?.() ?? vn();
2914
2914
  if (s.length < 16)
2915
2915
  throw new Error("Random bytes length must be >= 16");
2916
- return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, wn(s);
2916
+ return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Sn(s);
2917
2917
  }
2918
- const yr = globalThis.crypto, An = (e) => `${pr()}${pr()}`.slice(0, e), In = (e) => btoa(
2918
+ const yr = globalThis.crypto, In = (e) => `${pr()}${pr()}`.slice(0, e), An = (e) => btoa(
2919
2919
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
2920
2920
  );
2921
2921
  async function _n(e) {
@@ -2924,17 +2924,17 @@ async function _n(e) {
2924
2924
  "crypto.subtle is available only in secure contexts (HTTPS)."
2925
2925
  );
2926
2926
  const t = new TextEncoder().encode(e), r = await yr.subtle.digest("SHA-256", t);
2927
- return In(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2927
+ return An(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2928
2928
  }
2929
2929
  async function Rn(e) {
2930
- const r = An(43), s = await _n(r);
2930
+ const r = In(43), s = await _n(r);
2931
2931
  return {
2932
2932
  code_verifier: r,
2933
2933
  code_challenge: s
2934
2934
  };
2935
2935
  }
2936
2936
  const zr = Ft(null);
2937
- var Cn = Object.defineProperty, On = (e, t, r) => t in e ? Cn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, bt = (e, t, r) => On(e, typeof t != "symbol" ? t + "" : t, r);
2937
+ var On = Object.defineProperty, Cn = (e, t, r) => t in e ? On(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Et = (e, t, r) => Cn(e, typeof t != "symbol" ? t + "" : t, r);
2938
2938
  /*!
2939
2939
  @versini/auth-provider v8.0.5
2940
2940
  © 2025 gizmette.com
@@ -2986,7 +2986,7 @@ function Zr(e) {
2986
2986
  e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
2987
2987
  );
2988
2988
  }
2989
- let U = class extends Error {
2989
+ let K = class extends Error {
2990
2990
  constructor({ message: t, code: r, cause: s, name: a }) {
2991
2991
  super(t, { cause: s }), Object.defineProperty(this, "code", {
2992
2992
  enumerable: !0,
@@ -3002,14 +3002,14 @@ function Nn({ error: e, options: t }) {
3002
3002
  throw Error("options was missing required publicKey property");
3003
3003
  if (e.name === "AbortError") {
3004
3004
  if (t.signal instanceof AbortSignal)
3005
- return new U({
3005
+ return new K({
3006
3006
  message: "Registration ceremony was sent an abort signal",
3007
3007
  code: "ERROR_CEREMONY_ABORTED",
3008
3008
  cause: e
3009
3009
  });
3010
3010
  } else if (e.name === "ConstraintError") {
3011
3011
  if (r.authenticatorSelection?.requireResidentKey === !0)
3012
- return new U({
3012
+ return new K({
3013
3013
  message: "Discoverable credentials were required but no available authenticator supported it",
3014
3014
  code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
3015
3015
  cause: e
@@ -3018,36 +3018,36 @@ function Nn({ error: e, options: t }) {
3018
3018
  // @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024
3019
3019
  t.mediation === "conditional" && r.authenticatorSelection?.userVerification === "required"
3020
3020
  )
3021
- return new U({
3021
+ return new K({
3022
3022
  message: "User verification was required during automatic registration but it could not be performed",
3023
3023
  code: "ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",
3024
3024
  cause: e
3025
3025
  });
3026
3026
  if (r.authenticatorSelection?.userVerification === "required")
3027
- return new U({
3027
+ return new K({
3028
3028
  message: "User verification was required but no available authenticator supported it",
3029
3029
  code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
3030
3030
  cause: e
3031
3031
  });
3032
3032
  } else {
3033
3033
  if (e.name === "InvalidStateError")
3034
- return new U({
3034
+ return new K({
3035
3035
  message: "The authenticator was previously registered",
3036
3036
  code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
3037
3037
  cause: e
3038
3038
  });
3039
3039
  if (e.name === "NotAllowedError")
3040
- return new U({
3040
+ return new K({
3041
3041
  message: e.message,
3042
3042
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
3043
3043
  cause: e
3044
3044
  });
3045
3045
  if (e.name === "NotSupportedError")
3046
- return r.pubKeyCredParams.filter((s) => s.type === "public-key").length === 0 ? new U({
3046
+ return r.pubKeyCredParams.filter((s) => s.type === "public-key").length === 0 ? new K({
3047
3047
  message: 'No entry in pubKeyCredParams was of type "public-key"',
3048
3048
  code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
3049
3049
  cause: e
3050
- }) : new U({
3050
+ }) : new K({
3051
3051
  message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
3052
3052
  code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
3053
3053
  cause: e
@@ -3056,25 +3056,25 @@ function Nn({ error: e, options: t }) {
3056
3056
  const s = globalThis.location.hostname;
3057
3057
  if (Zr(s)) {
3058
3058
  if (r.rp.id !== s)
3059
- return new U({
3059
+ return new K({
3060
3060
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
3061
3061
  code: "ERROR_INVALID_RP_ID",
3062
3062
  cause: e
3063
3063
  });
3064
- } else return new U({
3064
+ } else return new K({
3065
3065
  message: `${globalThis.location.hostname} is an invalid domain`,
3066
3066
  code: "ERROR_INVALID_DOMAIN",
3067
3067
  cause: e
3068
3068
  });
3069
3069
  } else if (e.name === "TypeError") {
3070
3070
  if (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
3071
- return new U({
3071
+ return new K({
3072
3072
  message: "User ID was not between 1 and 64 characters",
3073
3073
  code: "ERROR_INVALID_USER_ID_LENGTH",
3074
3074
  cause: e
3075
3075
  });
3076
3076
  } else if (e.name === "UnknownError")
3077
- return new U({
3077
+ return new K({
3078
3078
  message: "The authenticator was unable to process the specified options, or could not create a new credential",
3079
3079
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
3080
3080
  cause: e
@@ -3111,7 +3111,7 @@ function ts(e) {
3111
3111
  if (e && !($n.indexOf(e) < 0))
3112
3112
  return e;
3113
3113
  }
3114
- async function xn(e) {
3114
+ async function Mn(e) {
3115
3115
  !e.optionsJSON && e.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
3116
3116
  const { optionsJSON: t, useAutoRegister: r = !1 } = e;
3117
3117
  if (!Wt())
@@ -3142,7 +3142,7 @@ async function xn(e) {
3142
3142
  try {
3143
3143
  u = c.getPublicKeyAlgorithm();
3144
3144
  } catch (p) {
3145
- Et("getPublicKeyAlgorithm()", p);
3145
+ bt("getPublicKeyAlgorithm()", p);
3146
3146
  }
3147
3147
  let l;
3148
3148
  if (typeof c.getPublicKey == "function")
@@ -3150,14 +3150,14 @@ async function xn(e) {
3150
3150
  const p = c.getPublicKey();
3151
3151
  p !== null && (l = te(p));
3152
3152
  } catch (p) {
3153
- Et("getPublicKey()", p);
3153
+ bt("getPublicKey()", p);
3154
3154
  }
3155
3155
  let m;
3156
3156
  if (typeof c.getAuthenticatorData == "function")
3157
3157
  try {
3158
3158
  m = te(c.getAuthenticatorData());
3159
3159
  } catch (p) {
3160
- Et("getAuthenticatorData()", p);
3160
+ bt("getAuthenticatorData()", p);
3161
3161
  }
3162
3162
  return {
3163
3163
  id: i,
@@ -3175,17 +3175,17 @@ async function xn(e) {
3175
3175
  authenticatorAttachment: ts(n.authenticatorAttachment)
3176
3176
  };
3177
3177
  }
3178
- function Et(e, t) {
3178
+ function bt(e, t) {
3179
3179
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
3180
3180
  `, t);
3181
3181
  }
3182
- function Mn() {
3182
+ function xn() {
3183
3183
  if (!Wt())
3184
- return wt.stubThis(new Promise((t) => t(!1)));
3184
+ return St.stubThis(new Promise((t) => t(!1)));
3185
3185
  const e = globalThis.PublicKeyCredential;
3186
- return e?.isConditionalMediationAvailable === void 0 ? wt.stubThis(new Promise((t) => t(!1))) : wt.stubThis(e.isConditionalMediationAvailable());
3186
+ return e?.isConditionalMediationAvailable === void 0 ? St.stubThis(new Promise((t) => t(!1))) : St.stubThis(e.isConditionalMediationAvailable());
3187
3187
  }
3188
- const wt = {
3188
+ const St = {
3189
3189
  stubThis: (e) => e
3190
3190
  };
3191
3191
  function Dn({ error: e, options: t }) {
@@ -3194,14 +3194,14 @@ function Dn({ error: e, options: t }) {
3194
3194
  throw Error("options was missing required publicKey property");
3195
3195
  if (e.name === "AbortError") {
3196
3196
  if (t.signal instanceof AbortSignal)
3197
- return new U({
3197
+ return new K({
3198
3198
  message: "Authentication ceremony was sent an abort signal",
3199
3199
  code: "ERROR_CEREMONY_ABORTED",
3200
3200
  cause: e
3201
3201
  });
3202
3202
  } else {
3203
3203
  if (e.name === "NotAllowedError")
3204
- return new U({
3204
+ return new K({
3205
3205
  message: e.message,
3206
3206
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
3207
3207
  cause: e
@@ -3210,18 +3210,18 @@ function Dn({ error: e, options: t }) {
3210
3210
  const s = globalThis.location.hostname;
3211
3211
  if (Zr(s)) {
3212
3212
  if (r.rpId !== s)
3213
- return new U({
3213
+ return new K({
3214
3214
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
3215
3215
  code: "ERROR_INVALID_RP_ID",
3216
3216
  cause: e
3217
3217
  });
3218
- } else return new U({
3218
+ } else return new K({
3219
3219
  message: `${globalThis.location.hostname} is an invalid domain`,
3220
3220
  code: "ERROR_INVALID_DOMAIN",
3221
3221
  cause: e
3222
3222
  });
3223
3223
  } else if (e.name === "UnknownError")
3224
- return new U({
3224
+ return new K({
3225
3225
  message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
3226
3226
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
3227
3227
  cause: e
@@ -3242,7 +3242,7 @@ async function Ln(e) {
3242
3242
  allowCredentials: a
3243
3243
  }, i = {};
3244
3244
  if (r) {
3245
- if (!await Mn())
3245
+ if (!await xn())
3246
3246
  throw Error("Browser does not support WebAuthn autofill");
3247
3247
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && s)
3248
3248
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
@@ -3283,12 +3283,12 @@ const gr = (e, t) => {
3283
3283
  window.localStorage.setItem(e, r), rs(e, r);
3284
3284
  }, Un = (e) => {
3285
3285
  window.localStorage.removeItem(e), rs(e, null);
3286
- }, br = (e) => window.localStorage.getItem(e), Fn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3287
- function Be({
3286
+ }, Er = (e) => window.localStorage.getItem(e), Fn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3287
+ function qe({
3288
3288
  key: e,
3289
3289
  initialValue: t
3290
3290
  }) {
3291
- const r = Gs(Fn, () => br(e)), s = X(
3291
+ const r = Gs(Fn, () => Er(e)), s = X(
3292
3292
  (i) => {
3293
3293
  try {
3294
3294
  const o = typeof i == "function" ? i(JSON.parse(r)) : i;
@@ -3303,41 +3303,41 @@ function Be({
3303
3303
  }, [t, s]), n = X(() => {
3304
3304
  s(null);
3305
3305
  }, [s]);
3306
- return W(() => {
3306
+ return V(() => {
3307
3307
  try {
3308
- br(e) === null && typeof t < "u" && gr(e, t);
3308
+ Er(e) === null && typeof t < "u" && gr(e, t);
3309
3309
  } catch (i) {
3310
3310
  console.warn(i);
3311
3311
  }
3312
3312
  }, [e, t]), [r ? JSON.parse(r) : null, s, a, n];
3313
3313
  }
3314
- const D = [];
3314
+ const F = [];
3315
3315
  for (let e = 0; e < 256; ++e)
3316
- D.push((e + 256).toString(16).slice(1));
3316
+ F.push((e + 256).toString(16).slice(1));
3317
3317
  function Hn(e, t = 0) {
3318
- return (D[e[t + 0]] + D[e[t + 1]] + D[e[t + 2]] + D[e[t + 3]] + "-" + D[e[t + 4]] + D[e[t + 5]] + "-" + D[e[t + 6]] + D[e[t + 7]] + "-" + D[e[t + 8]] + D[e[t + 9]] + "-" + D[e[t + 10]] + D[e[t + 11]] + D[e[t + 12]] + D[e[t + 13]] + D[e[t + 14]] + D[e[t + 15]]).toLowerCase();
3318
+ return (F[e[t + 0]] + F[e[t + 1]] + F[e[t + 2]] + F[e[t + 3]] + "-" + F[e[t + 4]] + F[e[t + 5]] + "-" + F[e[t + 6]] + F[e[t + 7]] + "-" + F[e[t + 8]] + F[e[t + 9]] + "-" + F[e[t + 10]] + F[e[t + 11]] + F[e[t + 12]] + F[e[t + 13]] + F[e[t + 14]] + F[e[t + 15]]).toLowerCase();
3319
3319
  }
3320
- let St;
3320
+ let wt;
3321
3321
  const Kn = new Uint8Array(16);
3322
3322
  function Gn() {
3323
- if (!St) {
3323
+ if (!wt) {
3324
3324
  if (typeof crypto > "u" || !crypto.getRandomValues)
3325
3325
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3326
- St = crypto.getRandomValues.bind(crypto);
3326
+ wt = crypto.getRandomValues.bind(crypto);
3327
3327
  }
3328
- return St(Kn);
3328
+ return wt(Kn);
3329
3329
  }
3330
- const Bn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Er = { randomUUID: Bn };
3330
+ const qn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), br = { randomUUID: qn };
3331
3331
  function vt(e, t, r) {
3332
- if (Er.randomUUID && !e)
3333
- return Er.randomUUID();
3332
+ if (br.randomUUID && !e)
3333
+ return br.randomUUID();
3334
3334
  e = e || {};
3335
3335
  const s = e.random ?? e.rng?.() ?? Gn();
3336
3336
  if (s.length < 16)
3337
3337
  throw new Error("Random bytes length must be >= 16");
3338
3338
  return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Hn(s);
3339
3339
  }
3340
- const Ae = "Your session has expired. For your security, please log in again to continue.", qn = "Your session has been successfully terminated.", Tt = "Login failed. Please try again.", Wn = "Error getting access token, please re-authenticate.", Vn = "You forgot to wrap your component in <AuthProvider>.", qe = "@@auth@@", $e = "LOADING", Qe = "LOGIN", ss = "LOGOUT", Fe = "success", re = "failure", as = "include", ns = "POST", is = "application/json", We = {
3340
+ const Ae = "Your session has expired. For your security, please log in again to continue.", Bn = "Your session has been successfully terminated.", Tt = "Login failed. Please try again.", Wn = "Error getting access token, please re-authenticate.", Vn = "You forgot to wrap your component in <AuthProvider>.", Be = "@@auth@@", $e = "LOADING", Qe = "LOGIN", ss = "LOGOUT", Fe = "success", re = "failure", as = "include", ns = "POST", is = "application/json", We = {
3341
3341
  GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
3342
3342
  $clientId: String!,
3343
3343
  $username: String!,
@@ -3418,7 +3418,7 @@ const Ae = "Your session has expired. For your security, please log in again to
3418
3418
  email
3419
3419
  }
3420
3420
  }`
3421
- }, Ie = {
3421
+ }, _e = {
3422
3422
  GET_REGISTRATION_OPTIONS: {
3423
3423
  schema: We.GET_REGISTRATION_OPTIONS,
3424
3424
  method: "getPasskeyRegistrationOptions"
@@ -3435,7 +3435,7 @@ const Ae = "Your session has expired. For your security, please log in again to
3435
3435
  schema: We.VERIFY_AUTHENTICATION,
3436
3436
  method: "verifyPasskeyAuthentication"
3437
3437
  }
3438
- }, _e = async ({
3438
+ }, Re = async ({
3439
3439
  accessToken: e,
3440
3440
  type: t,
3441
3441
  clientId: r,
@@ -3501,8 +3501,8 @@ const Ae = "Your session has expired. For your security, please log in again to
3501
3501
  authenticationType: ""
3502
3502
  }, Jn = (e) => {
3503
3503
  try {
3504
- const t = En(e);
3505
- return t ? t[F.USER_ID_KEY] : "";
3504
+ const t = bn(e);
3505
+ return t ? t[G.USER_ID_KEY] : "";
3506
3506
  } catch {
3507
3507
  return "";
3508
3508
  }
@@ -3561,12 +3561,12 @@ const Ae = "Your session has expired. For your security, please log in again to
3561
3561
  ua: f
3562
3562
  }
3563
3563
  }), l = await Ue(u?.data?.idToken);
3564
- return l && l.payload[F.USER_ID_KEY] !== "" && l.payload[F.NONCE_KEY] === s ? {
3564
+ return l && l.payload[G.USER_ID_KEY] !== "" && l.payload[G.NONCE_KEY] === s ? {
3565
3565
  idToken: u.data.idToken,
3566
3566
  accessToken: u.data.accessToken,
3567
3567
  refreshToken: u.data.refreshToken,
3568
- userId: l.payload[F.USER_ID_KEY],
3569
- email: l.payload[F.EMAIL_KEY],
3568
+ userId: l.payload[G.USER_ID_KEY],
3569
+ email: l.payload[G.EMAIL_KEY],
3570
3570
  status: !0
3571
3571
  } : {
3572
3572
  status: !1
@@ -3588,7 +3588,7 @@ const Ae = "Your session has expired. For your security, please log in again to
3588
3588
  type: lt.CODE,
3589
3589
  clientId: t,
3590
3590
  params: {
3591
- type: xe.CODE,
3591
+ type: Me.CODE,
3592
3592
  nonce: e,
3593
3593
  code_challenge: r
3594
3594
  }
@@ -3621,7 +3621,7 @@ const Ae = "Your session has expired. For your security, please log in again to
3621
3621
  type: lt.REFRESH,
3622
3622
  clientId: e,
3623
3623
  params: {
3624
- type: xe.REFRESH_TOKEN,
3624
+ type: Me.REFRESH_TOKEN,
3625
3625
  userId: t,
3626
3626
  nonce: r,
3627
3627
  refreshToken: s,
@@ -3629,10 +3629,10 @@ const Ae = "Your session has expired. For your security, please log in again to
3629
3629
  domain: n
3630
3630
  }
3631
3631
  }), c = await Ue(o?.data?.accessToken);
3632
- return c && c.payload[F.USER_ID_KEY] !== "" && c.payload[F.NONCE_KEY] === r ? {
3632
+ return c && c.payload[G.USER_ID_KEY] !== "" && c.payload[G.NONCE_KEY] === r ? {
3633
3633
  accessToken: o.data.accessToken,
3634
3634
  refreshToken: o.data.refreshToken,
3635
- userId: c.payload[F.USER_ID_KEY],
3635
+ userId: c.payload[G.USER_ID_KEY],
3636
3636
  status: !0
3637
3637
  } : {
3638
3638
  status: !1
@@ -3645,7 +3645,7 @@ const Ae = "Your session has expired. For your security, please log in again to
3645
3645
  };
3646
3646
  class ei {
3647
3647
  constructor(t = null, r = null) {
3648
- bt(this, "refreshTokenPromise", null), bt(this, "accessToken"), bt(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
3648
+ Et(this, "refreshTokenPromise", null), Et(this, "accessToken"), Et(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
3649
3649
  }
3650
3650
  async refreshtoken({
3651
3651
  clientId: t,
@@ -3675,7 +3675,7 @@ class ei {
3675
3675
  domain: n
3676
3676
  }) {
3677
3677
  const i = await Ue(this.refreshToken);
3678
- if (i && i.payload[F.USER_ID_KEY] !== "") {
3678
+ if (i && i.payload[G.USER_ID_KEY] !== "") {
3679
3679
  const o = await Zn({
3680
3680
  endpoint: t,
3681
3681
  clientId: r,
@@ -3698,17 +3698,17 @@ class ei {
3698
3698
  };
3699
3699
  }
3700
3700
  }
3701
- const Re = () => {
3701
+ const Oe = () => {
3702
3702
  throw new Error(Vn);
3703
3703
  }, cs = Ft({
3704
3704
  isAuthenticated: !1,
3705
3705
  isLoading: !1,
3706
- login: Re,
3707
- logout: Re,
3708
- getAccessToken: Re,
3709
- getIdToken: Re,
3710
- registeringForPasskey: Re,
3711
- loginWithPasskey: Re,
3706
+ login: Oe,
3707
+ logout: Oe,
3708
+ getAccessToken: Oe,
3709
+ getIdToken: Oe,
3710
+ registeringForPasskey: Oe,
3711
+ loginWithPasskey: Oe,
3712
3712
  logoutReason: "",
3713
3713
  authenticationType: ""
3714
3714
  }), ti = () => ({
@@ -3718,7 +3718,7 @@ const Re = () => {
3718
3718
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
3719
3719
  },
3720
3720
  [e]
3721
- ), si = oe.createContext({
3721
+ ), si = le.createContext({
3722
3722
  state: os,
3723
3723
  dispatch: () => {
3724
3724
  }
@@ -3742,7 +3742,7 @@ const Re = () => {
3742
3742
  } : e, ni = ({ children: e }) => {
3743
3743
  const t = ti();
3744
3744
  return /* @__PURE__ */ h(zr.Provider, { value: t, children: e });
3745
- }, wr = ({
3745
+ }, Sr = ({
3746
3746
  children: e,
3747
3747
  sessionExpiration: t,
3748
3748
  clientId: r,
@@ -3753,50 +3753,50 @@ const Re = () => {
3753
3753
  const [i, o] = Nr(ai, {
3754
3754
  ...os,
3755
3755
  debug: a
3756
- }), c = ri(a), f = j(!1), [d, u, , l] = Be({
3757
- key: `${qe}::${r}::@@user@@`
3758
- }), [m, p, , g] = Be({
3759
- key: `${qe}::${r}::@@access@@`
3760
- }), [b, E, , O] = Be(
3756
+ }), c = ri(a), f = Q(!1), [d, u, , l] = qe({
3757
+ key: `${Be}::${r}::@@user@@`
3758
+ }), [m, p, , g] = qe({
3759
+ key: `${Be}::${r}::@@access@@`
3760
+ }), [E, b, , C] = qe(
3761
3761
  {
3762
- key: `${qe}::${r}::@@refresh@@`
3762
+ key: `${Be}::${r}::@@refresh@@`
3763
3763
  }
3764
- ), [A, K, , R] = Be({
3765
- key: `${qe}::${r}::@@nonce@@`
3766
- }), z = new ei(m, b), C = X(() => {
3767
- c("removeLocalStorage: removing local storage"), l(), g(), O(), R();
3764
+ ), [I, B, , R] = qe({
3765
+ key: `${Be}::${r}::@@nonce@@`
3766
+ }), z = new ei(m, E), O = X(() => {
3767
+ c("removeLocalStorage: removing local storage"), l(), g(), C(), R();
3768
3768
  }, [
3769
3769
  g,
3770
3770
  l,
3771
3771
  R,
3772
- O,
3772
+ C,
3773
3773
  c
3774
3774
  ]), v = X(
3775
- (w) => {
3775
+ (S) => {
3776
3776
  c(
3777
3777
  "removeStateAndLocalStorage: removing state and local storage with reason: ",
3778
- w
3778
+ S
3779
3779
  ), o({
3780
3780
  type: ss,
3781
3781
  payload: {
3782
- logoutReason: w || Ae
3782
+ logoutReason: S || Ae
3783
3783
  }
3784
- }), C(), o({ type: $e, payload: { isLoading: !1 } });
3784
+ }), O(), o({ type: $e, payload: { isLoading: !1 } });
3785
3785
  },
3786
- [C, c]
3787
- ), x = X(
3788
- async (w) => {
3786
+ [O, c]
3787
+ ), L = X(
3788
+ async (S) => {
3789
3789
  c("invalidateAndLogout: invalidating and logging out");
3790
- const { user: T } = i, S = T?.userId || Jn(d);
3791
- S || c(
3790
+ const { user: T } = i, w = T?.userId || Jn(d);
3791
+ w || c(
3792
3792
  "invalidateAndLogout: user cannot be identified, logging out without userId"
3793
3793
  ), await Yn({
3794
- userId: S,
3794
+ userId: w,
3795
3795
  clientId: r,
3796
3796
  domain: s,
3797
3797
  idToken: d,
3798
3798
  endpoint: n
3799
- }), v(w || Ae);
3799
+ }), v(S || Ae);
3800
3800
  },
3801
3801
  [
3802
3802
  d,
@@ -3808,201 +3808,201 @@ const Re = () => {
3808
3808
  n
3809
3809
  ]
3810
3810
  );
3811
- W(() => {
3811
+ V(() => {
3812
3812
  if (!f.current)
3813
3813
  return i.isLoading && d !== null ? (async () => {
3814
3814
  try {
3815
- const w = await Ue(d);
3816
- w && w.payload[F.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
3815
+ const S = await Ue(d);
3816
+ S && S.payload[G.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
3817
3817
  type: Qe,
3818
3818
  payload: {
3819
- authenticationType: w.payload[F.AUTH_TYPE_KEY],
3819
+ authenticationType: S.payload[G.AUTH_TYPE_KEY],
3820
3820
  user: {
3821
- userId: w.payload[F.USER_ID_KEY],
3822
- username: w.payload[F.USERNAME_KEY],
3823
- email: w.payload[F.EMAIL_KEY]
3821
+ userId: S.payload[G.USER_ID_KEY],
3822
+ username: S.payload[G.USERNAME_KEY],
3823
+ email: S.payload[G.EMAIL_KEY]
3824
3824
  }
3825
3825
  }
3826
- })) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(Ae));
3826
+ })) : (c("useEffect: invalid JWT, invalidating and logging out"), await L(Ae));
3827
3827
  } catch {
3828
3828
  c(
3829
3829
  "useEffect: exception validating JWT, invalidating and logging out"
3830
- ), await x(Ae);
3830
+ ), await L(Ae);
3831
3831
  }
3832
3832
  })() : (c("useEffect: setting the loading state to false"), o({ type: $e, payload: { isLoading: !1 } })), () => {
3833
3833
  f.current = !0;
3834
3834
  };
3835
- }, [i.isLoading, d, x, c]);
3836
- const _ = async (w, T) => {
3837
- o({ type: $e, payload: { isLoading: !0 } }), C();
3838
- const S = vt();
3839
- K(S), c("login: Logging in with password");
3840
- const { code_verifier: le, code_challenge: ue } = await Rn(), Zt = await Xn({
3835
+ }, [i.isLoading, d, L, c]);
3836
+ const _ = async (S, T) => {
3837
+ o({ type: $e, payload: { isLoading: !0 } }), O();
3838
+ const w = vt();
3839
+ B(w), c("login: Logging in with password");
3840
+ const { code_verifier: fe, code_challenge: me } = await Rn(), Zt = await Xn({
3841
3841
  endpoint: n,
3842
- nonce: S,
3842
+ nonce: w,
3843
3843
  clientId: r,
3844
- code_challenge: ue
3844
+ code_challenge: me
3845
3845
  });
3846
3846
  if (Zt.status) {
3847
- const ve = await zn({
3847
+ const Te = await zn({
3848
3848
  endpoint: n,
3849
- username: w,
3849
+ username: S,
3850
3850
  password: T,
3851
3851
  clientId: r,
3852
3852
  sessionExpiration: t,
3853
- nonce: S,
3854
- type: xe.CODE,
3853
+ nonce: w,
3854
+ type: Me.CODE,
3855
3855
  code: Zt.data,
3856
- code_verifier: le,
3856
+ code_verifier: fe,
3857
3857
  domain: s,
3858
3858
  ua: navigator.userAgent
3859
3859
  });
3860
- return ve.status ? (u(ve.idToken), p(ve.accessToken), E(ve.refreshToken), o({
3860
+ return Te.status ? (u(Te.idToken), p(Te.accessToken), b(Te.refreshToken), o({
3861
3861
  type: Qe,
3862
3862
  payload: {
3863
- authenticationType: xe.CODE,
3863
+ authenticationType: Me.CODE,
3864
3864
  user: {
3865
- userId: ve.userId,
3866
- username: w,
3867
- email: ve.email
3865
+ userId: Te.userId,
3866
+ username: S,
3867
+ email: Te.email
3868
3868
  }
3869
3869
  }
3870
3870
  }), !0) : (v(Tt), !1);
3871
3871
  }
3872
3872
  return !1;
3873
- }, I = async (w) => {
3874
- w?.preventDefault(), await x(qn);
3873
+ }, A = async (S) => {
3874
+ S?.preventDefault(), await L(Bn);
3875
3875
  }, N = async () => {
3876
- const { isAuthenticated: w, user: T } = i;
3876
+ const { isAuthenticated: S, user: T } = i;
3877
3877
  try {
3878
- if (w && T && T.userId) {
3878
+ if (S && T && T.userId) {
3879
3879
  if (m) {
3880
3880
  c("getAccessToken");
3881
- const le = await Ue(m);
3882
- if (le && le.payload[F.USER_ID_KEY] !== "")
3881
+ const fe = await Ue(m);
3882
+ if (fe && fe.payload[G.USER_ID_KEY] !== "")
3883
3883
  return m;
3884
3884
  }
3885
3885
  c("getAccessToken: invalid access token, trying to refresh it");
3886
- const S = await z.refreshtoken({
3886
+ const w = await z.refreshtoken({
3887
3887
  endpoint: n,
3888
3888
  clientId: r,
3889
3889
  userId: T.userId,
3890
- nonce: A,
3890
+ nonce: I,
3891
3891
  domain: s
3892
3892
  });
3893
- return S.status && S.status === "success" && S.newAccessToken ? (p(S.newAccessToken), E(S.newRefreshToken), S.newAccessToken) : (c(
3893
+ return w.status && w.status === "success" && w.newAccessToken ? (p(w.newAccessToken), b(w.newRefreshToken), w.newAccessToken) : (c(
3894
3894
  "getAccessToken: invalid refresh token, need to re-authenticate"
3895
- ), await x(Ae), "");
3895
+ ), await L(Ae), "");
3896
3896
  }
3897
3897
  return c(
3898
3898
  "getAccessToken: user is not authenticated, cannot get access token"
3899
- ), await x(Ae), "";
3899
+ ), await L(Ae), "";
3900
3900
  } catch {
3901
3901
  return c(
3902
3902
  "getAccessToken: exception occurred, invalidating and logging out"
3903
- ), await x(Wn), "";
3903
+ ), await L(Wn), "";
3904
3904
  }
3905
- }, J = () => i.isAuthenticated && d ? d : "", ce = async () => {
3906
- const { user: w } = i;
3907
- let T = await _e({
3905
+ }, J = () => i.isAuthenticated && d ? d : "", he = async () => {
3906
+ const { user: S } = i;
3907
+ let T = await Re({
3908
3908
  endpoint: n,
3909
3909
  accessToken: m,
3910
3910
  clientId: r,
3911
- type: Ie.GET_REGISTRATION_OPTIONS,
3911
+ type: _e.GET_REGISTRATION_OPTIONS,
3912
3912
  params: {
3913
3913
  clientId: r,
3914
- id: w?.userId,
3915
- username: w?.username
3914
+ id: S?.userId,
3915
+ username: S?.username
3916
3916
  }
3917
3917
  });
3918
3918
  if (T.status)
3919
3919
  try {
3920
- const S = await xn({
3920
+ const w = await Mn({
3921
3921
  optionsJSON: T.data
3922
3922
  });
3923
- return T = await _e({
3923
+ return T = await Re({
3924
3924
  endpoint: n,
3925
3925
  accessToken: m,
3926
3926
  clientId: r,
3927
- type: Ie.VERIFY_REGISTRATION,
3927
+ type: _e.VERIFY_REGISTRATION,
3928
3928
  params: {
3929
3929
  clientId: r,
3930
- id: w?.userId,
3931
- username: w?.username,
3932
- registration: S
3930
+ id: S?.userId,
3931
+ username: S?.username,
3932
+ registration: w
3933
3933
  }
3934
3934
  }), !!(T.status && T.data.length > 0);
3935
3935
  } catch {
3936
- return await _e({
3936
+ return await Re({
3937
3937
  endpoint: n,
3938
3938
  accessToken: m,
3939
3939
  clientId: r,
3940
- type: Ie.VERIFY_REGISTRATION,
3940
+ type: _e.VERIFY_REGISTRATION,
3941
3941
  params: {
3942
3942
  clientId: r,
3943
- id: w?.userId,
3944
- username: w?.username,
3943
+ id: S?.userId,
3944
+ username: S?.username,
3945
3945
  registration: {}
3946
3946
  }
3947
3947
  }), !1;
3948
3948
  }
3949
3949
  return !1;
3950
- }, Se = async () => {
3951
- o({ type: $e, payload: { isLoading: !0 } }), C();
3952
- const w = vt();
3953
- K(w), c("loginWithPasskey");
3950
+ }, ve = async () => {
3951
+ o({ type: $e, payload: { isLoading: !0 } }), O();
3952
+ const S = vt();
3953
+ B(S), c("loginWithPasskey");
3954
3954
  const T = vt();
3955
- let S = await _e({
3955
+ let w = await Re({
3956
3956
  endpoint: n,
3957
3957
  accessToken: m,
3958
3958
  clientId: r,
3959
- type: Ie.GET_AUTHENTICATION_OPTIONS,
3959
+ type: _e.GET_AUTHENTICATION_OPTIONS,
3960
3960
  params: {
3961
3961
  id: T,
3962
3962
  clientId: r
3963
3963
  }
3964
3964
  });
3965
- if (S.status)
3965
+ if (w.status)
3966
3966
  try {
3967
- const le = await Ln({
3968
- optionsJSON: S.data
3967
+ const fe = await Ln({
3968
+ optionsJSON: w.data
3969
3969
  });
3970
- return S = await _e({
3970
+ return w = await Re({
3971
3971
  endpoint: n,
3972
3972
  accessToken: m,
3973
3973
  clientId: r,
3974
- type: Ie.VERIFY_AUTHENTICATION,
3974
+ type: _e.VERIFY_AUTHENTICATION,
3975
3975
  params: {
3976
3976
  clientId: r,
3977
3977
  id: T,
3978
- authentication: le,
3979
- nonce: w,
3978
+ authentication: fe,
3979
+ nonce: S,
3980
3980
  domain: s,
3981
3981
  sessionExpiration: t,
3982
3982
  ua: navigator.userAgent
3983
3983
  }
3984
- }), S.data.status === Fe ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
3984
+ }), w.data.status === Fe ? (u(w.data.idToken), p(w.data.accessToken), b(w.data.refreshToken), o({
3985
3985
  type: Qe,
3986
3986
  payload: {
3987
- authenticationType: xe.PASSKEY,
3987
+ authenticationType: Me.PASSKEY,
3988
3988
  user: {
3989
- userId: S.data.userId,
3990
- username: S.data.username,
3991
- email: S.data.email
3989
+ userId: w.data.userId,
3990
+ username: w.data.username,
3991
+ email: w.data.email
3992
3992
  }
3993
3993
  }
3994
3994
  }), !0) : (v(Tt), !1);
3995
3995
  } catch {
3996
- return await _e({
3996
+ return await Re({
3997
3997
  endpoint: n,
3998
3998
  accessToken: m,
3999
3999
  clientId: r,
4000
- type: Ie.VERIFY_AUTHENTICATION,
4000
+ type: _e.VERIFY_AUTHENTICATION,
4001
4001
  params: {
4002
4002
  clientId: r,
4003
4003
  id: T,
4004
4004
  authentication: {},
4005
- nonce: w,
4005
+ nonce: S,
4006
4006
  domain: s,
4007
4007
  sessionExpiration: t
4008
4008
  }
@@ -4016,11 +4016,11 @@ const Re = () => {
4016
4016
  value: {
4017
4017
  ...i,
4018
4018
  login: _,
4019
- logout: I,
4019
+ logout: A,
4020
4020
  getAccessToken: N,
4021
4021
  getIdToken: J,
4022
- registeringForPasskey: ce,
4023
- loginWithPasskey: Se
4022
+ registeringForPasskey: he,
4023
+ loginWithPasskey: ve
4024
4024
  },
4025
4025
  children: /* @__PURE__ */ h(ni, { children: e })
4026
4026
  }
@@ -4044,10 +4044,10 @@ const ls = () => {
4044
4044
  if (!e)
4045
4045
  throw new Error("useAuth must be used within an AuthHookProvider");
4046
4046
  return e;
4047
- }, oc = "I'm having trouble right now. Please try again later.", cc = "action-search", lc = "action-sort", uc = "action-toggle-prompt", dc = "action-reset-prompt", us = "sassy-saint-", hc = "search", fc = "sort", mc = "sort-timestamp", pc = "sort-token-usage", yc = "sort-memory-direction", gc = "sort-memory-column", bc = "favorites-only", Ec = "private-disclosure", wc = "reasoning-disclosure", ds = "service-worker", Sc = "chat-id", vc = "sassysaint-oled-mode", Tc = "sassysaint-full-screen", Sr = "data-oled-mode", vr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ac = 20, Ic = 30, _c = "av-prompt", Rc = "av-prompt-editable", Cc = "size-5 sm:size-4", Oc = 30, kc = 15, Nc = 130, Pc = 160, $c = 16, xc = 24, Mc = 76, Dc = 76;
4048
- let At = null, ae = !1;
4047
+ }, oc = "I'm having trouble right now. Please try again later.", cc = "action-search", lc = "action-sort", uc = "action-toggle-prompt", dc = "action-reset-prompt", us = "sassy-saint-", hc = "search", fc = "sort", mc = "sort-timestamp", pc = "sort-token-usage", yc = "sort-memory-direction", gc = "sort-memory-column", Ec = "favorites-only", bc = "private-disclosure", Sc = "reasoning-disclosure", ds = "service-worker", wc = "chat-id", vc = "sassysaint-oled-mode", Tc = "sassysaint-full-screen", wr = "data-oled-mode", vr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ic = 20, Ac = 30, _c = "av-prompt", Rc = "av-prompt-editable", Oc = "size-5 sm:size-4", Cc = 30, kc = 15, Nc = 130, Pc = 160, $c = 16, Mc = 24, xc = 76, Dc = 76;
4048
+ let It = null, ie = !1;
4049
4049
  typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
4050
- ae && (ae = !1, window.location.reload());
4050
+ ie && (ie = !1, window.location.reload());
4051
4051
  });
4052
4052
  function Vt() {
4053
4053
  return "serviceWorker" in navigator;
@@ -4070,10 +4070,10 @@ async function hs() {
4070
4070
  if (!Vt())
4071
4071
  return console.warn("[SW] Service workers not supported"), !1;
4072
4072
  try {
4073
- return At = await navigator.serviceWorker.register("/sw.js", {
4073
+ return It = await navigator.serviceWorker.register("/sw.js", {
4074
4074
  scope: "/"
4075
- }), At.addEventListener("updatefound", () => {
4076
- const e = At?.installing;
4075
+ }), It.addEventListener("updatefound", () => {
4076
+ const e = It?.installing;
4077
4077
  e && e.addEventListener("statechange", () => {
4078
4078
  e.state === "installed" && navigator.serviceWorker.controller && confirm(
4079
4079
  "A new version of the app is available. Reload to update cache?"
@@ -4096,17 +4096,17 @@ async function oi() {
4096
4096
  }
4097
4097
  async function Lc(e) {
4098
4098
  if (ii(e), e) {
4099
- ae = !0;
4099
+ ie = !0;
4100
4100
  try {
4101
4101
  sessionStorage.setItem("sw-toggle-pending", "enabled");
4102
4102
  } catch {
4103
4103
  }
4104
- await hs(), navigator.serviceWorker.controller && ae && (ae = !1, window.location.reload());
4104
+ await hs(), navigator.serviceWorker.controller && ie && (ie = !1, window.location.reload());
4105
4105
  try {
4106
4106
  navigator.serviceWorker.ready.then(() => {
4107
- ae && Dt() && (ae = !1, window.location.reload());
4107
+ ie && Dt() && (ie = !1, window.location.reload());
4108
4108
  }), setTimeout(() => {
4109
- ae && Dt() && (ae = !1, window.location.reload());
4109
+ ie && Dt() && (ie = !1, window.location.reload());
4110
4110
  }, 3e3);
4111
4111
  } catch {
4112
4112
  }
@@ -4146,13 +4146,13 @@ async function ci() {
4146
4146
  console.warn("[SW] Failed to invalidate cache:", e);
4147
4147
  }
4148
4148
  }
4149
- function It() {
4149
+ function At() {
4150
4150
  return "unknown";
4151
4151
  }
4152
4152
  async function Uc(e = {}) {
4153
4153
  const { urlLimitPerCache: t } = e;
4154
4154
  if (!("caches" in window))
4155
- return { version: It(), caches: [], totalItems: 0 };
4155
+ return { version: At(), caches: [], totalItems: 0 };
4156
4156
  try {
4157
4157
  const r = await caches.keys(), s = [];
4158
4158
  let a = 0;
@@ -4168,40 +4168,40 @@ async function Uc(e = {}) {
4168
4168
  console.warn("[SW] Failed reading cache", n, i);
4169
4169
  }
4170
4170
  return {
4171
- version: It(),
4171
+ version: At(),
4172
4172
  caches: s,
4173
4173
  totalItems: a
4174
4174
  };
4175
4175
  } catch (r) {
4176
- return console.warn("[SW] getCacheInfo failed:", r), { version: It(), caches: [], totalItems: 0 };
4176
+ return console.warn("[SW] getCacheInfo failed:", r), { version: At(), caches: [], totalItems: 0 };
4177
4177
  }
4178
4178
  }
4179
4179
  const Fc = "user", Hc = "assistant", Kc = "data", He = "OpenAI", dt = "Anthropic", ht = "Google", fs = "Perplexity", Gc = He, li = [
4180
4180
  He,
4181
4181
  dt,
4182
4182
  ht
4183
- ], ms = "gpt-5", ps = "gpt-5-mini", ys = "gpt-5-nano", gs = "gpt-4.1-nano", bs = "claude-haiku-4-5-20251001", Es = "claude-sonnet-4-5-20250929", ws = "gemini-2.5-flash", Ss = "gemini-2.5-pro", vs = "sonar", Ts = "sonar-pro", Bc = {
4183
+ ], ms = "gpt-5", ps = "gpt-5-mini", ys = "gpt-5-nano", gs = "gpt-4.1-nano", Es = "claude-haiku-4-5", bs = "claude-sonnet-4-5", Ss = "gemini-2.5-flash", ws = "gemini-2.5-pro", vs = "sonar", Ts = "sonar-pro", qc = {
4184
4184
  [ms]: "GPT-5",
4185
4185
  [ps]: "GPT-5 Mini",
4186
4186
  [ys]: "GPT-5 Nano",
4187
4187
  [gs]: "GPT-4.1 Nano",
4188
- [bs]: "Claude Haiku 4.5",
4189
- [Es]: "Claude Sonnet 4.5",
4190
- [ws]: "Gemini 2.5 Flash",
4191
- [Ss]: "Gemini 2.5 Pro",
4188
+ [Es]: "Claude Haiku 4.5",
4189
+ [bs]: "Claude Sonnet 4.5",
4190
+ [Ss]: "Gemini 2.5 Flash",
4191
+ [ws]: "Gemini 2.5 Pro",
4192
4192
  [vs]: "Sonar",
4193
4193
  [Ts]: "Sonar Pro"
4194
- }, As = {
4194
+ }, Is = {
4195
4195
  [He]: [
4196
4196
  gs,
4197
4197
  ms,
4198
4198
  ps,
4199
4199
  ys
4200
4200
  ],
4201
- [dt]: [bs, Es],
4202
- [ht]: [ws, Ss],
4201
+ [dt]: [Es, bs],
4202
+ [ht]: [Ss, ws],
4203
4203
  [fs]: [vs, Ts]
4204
- }, ui = "claude-sonnet-4", di = "claude-haiku-4", hi = "claude-3", fi = "gpt-", mi = "o3", pi = "o4", yi = "gemini", gi = "sonar", bi = {
4204
+ }, ui = "claude-sonnet-4", di = "claude-haiku-4", hi = "claude-3", fi = "gpt-", mi = "o3", pi = "o4", yi = "gemini", gi = "sonar", Ei = {
4205
4205
  [dt]: [
4206
4206
  ui,
4207
4207
  di,
@@ -4214,7 +4214,7 @@ const Fc = "user", Hc = "assistant", Kc = "data", He = "OpenAI", dt = "Anthropic
4214
4214
  ],
4215
4215
  [ht]: [yi],
4216
4216
  [fs]: [gi]
4217
- }, qc = "x-diggidy-chat-id", Wc = "timestamp", Vc = "tokenUsage", k = "Diggidy", jc = {
4217
+ }, Bc = "x-diggidy-chat-id", Wc = "timestamp", Vc = "tokenUsage", k = "Diggidy", jc = {
4218
4218
  TOOL: {
4219
4219
  MEMORIES: "getUserMemories"
4220
4220
  },
@@ -4224,7 +4224,7 @@ const Fc = "user", Hc = "assistant", Kc = "data", He = "OpenAI", dt = "Anthropic
4224
4224
  }
4225
4225
  }, Qc = (e) => {
4226
4226
  for (const [t, r] of Object.entries(
4227
- bi
4227
+ Ei
4228
4228
  ))
4229
4229
  if (r.some((s) => e.startsWith(s)))
4230
4230
  return t;
@@ -4235,17 +4235,17 @@ const Fc = "user", Hc = "assistant", Kc = "data", He = "OpenAI", dt = "Anthropic
4235
4235
  const t = /* @__PURE__ */ new Set();
4236
4236
  for (const r of e)
4237
4237
  for (const [s, a] of Object.entries(
4238
- As
4238
+ Is
4239
4239
  ))
4240
4240
  a.includes(r) && (s === He || s === dt || s === ht) && t.add(s);
4241
4241
  return li.filter((r) => t.has(r));
4242
- }, Ei = (e) => {
4242
+ }, bi = (e) => {
4243
4243
  const t = /* @__PURE__ */ new Map();
4244
4244
  if (!e || e.length === 0)
4245
4245
  return t;
4246
4246
  for (const r of e)
4247
4247
  for (const [s, a] of Object.entries(
4248
- As
4248
+ Is
4249
4249
  ))
4250
4250
  if (a.includes(r)) {
4251
4251
  t.has(s) || t.set(s, []), t.get(s)?.push(r);
@@ -4253,22 +4253,22 @@ const Fc = "user", Hc = "assistant", Kc = "data", He = "OpenAI", dt = "Anthropic
4253
4253
  }
4254
4254
  return t;
4255
4255
  }, Yc = (e) => {
4256
- const t = Ei(e);
4256
+ const t = bi(e);
4257
4257
  for (const r of t.values())
4258
4258
  if (r.length > 1)
4259
4259
  return !0;
4260
4260
  return !1;
4261
4261
  }, zc = (e, t) => !e || !t || t.length === 0 ? !1 : t.includes(e);
4262
- function wi(e) {
4262
+ function Si(e) {
4263
4263
  return e ? new Set(e) : null;
4264
4264
  }
4265
- function Si(e, t, r) {
4265
+ function wi(e, t, r) {
4266
4266
  if (!t || Array.isArray(t) && t.length === 0)
4267
4267
  return !0;
4268
- const s = e instanceof Set ? e : wi(e);
4268
+ const s = e instanceof Set ? e : Si(e);
4269
4269
  return !s || s.size === 0 ? !1 : typeof t == "string" ? s.has(t) : r?.any === !0 ? t.some((a) => s.has(a)) : t.every((a) => s.has(a));
4270
4270
  }
4271
- const G = {
4271
+ const $ = {
4272
4272
  GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
4273
4273
  location(latitude: $latitude, longitude: $longitude) {
4274
4274
  country
@@ -4454,6 +4454,30 @@ const G = {
4454
4454
  sourceType
4455
4455
  confidence
4456
4456
  status
4457
+ expiration
4458
+ expiresAt
4459
+ createdAt
4460
+ updatedAt
4461
+ version
4462
+ quote
4463
+ }
4464
+ total
4465
+ totalTokenUsage
4466
+ }
4467
+ }`,
4468
+ GET_EXPIRED_MEMORIES: `query GetExpiredMemories($user: String!, $query: String) {
4469
+ getExpiredMemories(user: $user, query: $query) {
4470
+ items {
4471
+ memoryId
4472
+ text
4473
+ description
4474
+ categories
4475
+ canonicalText
4476
+ sourceType
4477
+ confidence
4478
+ status
4479
+ expiration
4480
+ expiresAt
4457
4481
  createdAt
4458
4482
  updatedAt
4459
4483
  version
@@ -4466,76 +4490,94 @@ const G = {
4466
4490
  DELETE_MEMORY: `mutation DeleteMemory($user: String!, $memoryId: String!) {
4467
4491
  deleteMemory(user: $user, memoryId: $memoryId)
4468
4492
  }`,
4469
- UPDATE_MEMORY: `mutation UpdateMemory($user: String!, $memoryId: String!, $description: String!) {
4470
- updateMemory(user: $user, memoryId: $memoryId, description: $description)
4493
+ UPDATE_MEMORY: `mutation UpdateMemory($user: String!, $memoryId: String!, $description: String!, $expiration: String) {
4494
+ updateMemory(user: $user, memoryId: $memoryId, description: $description, expiration: $expiration)
4495
+ }`,
4496
+ DELETE_ACTIVE_MEMORIES: `mutation DeleteActiveMemories($user: String!) {
4497
+ deleteActiveMemories(user: $user)
4471
4498
  }`,
4472
- DELETE_MEMORIES: `mutation DeleteMemories($user: String!) {
4473
- deleteMemories(user: $user)
4499
+ DELETE_EXPIRED_MEMORIES: `mutation DeleteExpiredMemories($user: String!) {
4500
+ deleteExpiredMemories(user: $user)
4501
+ }`,
4502
+ RESTORE_MEMORY: `mutation RestoreMemory($user: String!, $memoryId: String!) {
4503
+ restoreMemory(user: $user, memoryId: $memoryId)
4474
4504
  }`
4475
- }, B = {
4505
+ }, D = {
4476
4506
  GET_LOCATION: {
4477
- schema: G.GET_LOCATION,
4507
+ schema: $.GET_LOCATION,
4478
4508
  method: "location"
4479
4509
  },
4480
4510
  GET_CHATS: {
4481
- schema: G.GET_CHATS,
4511
+ schema: $.GET_CHATS,
4482
4512
  method: "chats"
4483
4513
  },
4484
4514
  GET_CHATS_STATS: {
4485
- schema: G.GET_CHATS_STATS,
4515
+ schema: $.GET_CHATS_STATS,
4486
4516
  method: "chatsStats"
4487
4517
  },
4488
4518
  GET_CHAT: {
4489
- schema: G.GET_CHAT,
4519
+ schema: $.GET_CHAT,
4490
4520
  method: "chatById"
4491
4521
  },
4492
4522
  DELETE_CHAT: {
4493
- schema: G.DELETE_CHAT,
4523
+ schema: $.DELETE_CHAT,
4494
4524
  method: "deleteChat"
4495
4525
  },
4496
4526
  TOGGLE_FAVORITE_CHAT: {
4497
- schema: G.TOGGLE_FAVORITE_CHAT,
4527
+ schema: $.TOGGLE_FAVORITE_CHAT,
4498
4528
  method: "toggleFavoriteChat"
4499
4529
  },
4500
4530
  SAVE_CHAT: {
4501
- schema: G.SAVE_CHAT,
4531
+ schema: $.SAVE_CHAT,
4502
4532
  method: "saveChat"
4503
4533
  },
4504
4534
  GET_SERVER_CAPABILITIES: {
4505
- schema: G.GET_SERVER_CAPABILITIES,
4535
+ schema: $.GET_SERVER_CAPABILITIES,
4506
4536
  method: "getServerCapabilities"
4507
4537
  },
4508
4538
  GET_CHANGELOGS: {
4509
- schema: G.GET_CHANGELOGS,
4539
+ schema: $.GET_CHANGELOGS,
4510
4540
  method: "getChangelogs"
4511
4541
  },
4512
4542
  GET_USER_PREFERENCES: {
4513
- schema: G.GET_USER_PREFERENCES,
4543
+ schema: $.GET_USER_PREFERENCES,
4514
4544
  method: "getUserPreferences"
4515
4545
  },
4516
4546
  SET_USER_PREFERENCES: {
4517
- schema: G.SET_USER_PREFERENCES,
4547
+ schema: $.SET_USER_PREFERENCES,
4518
4548
  method: "setUserPreferences"
4519
4549
  },
4520
4550
  GET_USAGE: {
4521
- schema: G.GET_USAGE,
4551
+ schema: $.GET_USAGE,
4522
4552
  method: "usage"
4523
4553
  },
4524
4554
  GET_USER_MEMORIES: {
4525
- schema: G.GET_USER_MEMORIES,
4555
+ schema: $.GET_USER_MEMORIES,
4526
4556
  method: "getUserMemories"
4527
4557
  },
4558
+ GET_EXPIRED_MEMORIES: {
4559
+ schema: $.GET_EXPIRED_MEMORIES,
4560
+ method: "getExpiredMemories"
4561
+ },
4528
4562
  DELETE_MEMORY: {
4529
- schema: G.DELETE_MEMORY,
4563
+ schema: $.DELETE_MEMORY,
4530
4564
  method: "deleteMemory"
4531
4565
  },
4532
4566
  UPDATE_MEMORY: {
4533
- schema: G.UPDATE_MEMORY,
4567
+ schema: $.UPDATE_MEMORY,
4534
4568
  method: "updateMemory"
4535
4569
  },
4536
- DELETE_MEMORIES: {
4537
- schema: G.DELETE_MEMORIES,
4538
- method: "deleteMemories"
4570
+ DELETE_ACTIVE_MEMORIES: {
4571
+ schema: $.DELETE_ACTIVE_MEMORIES,
4572
+ method: "deleteActiveMemories"
4573
+ },
4574
+ DELETE_EXPIRED_MEMORIES: {
4575
+ schema: $.DELETE_EXPIRED_MEMORIES,
4576
+ method: "deleteExpiredMemories"
4577
+ },
4578
+ RESTORE_MEMORY: {
4579
+ schema: $.RESTORE_MEMORY,
4580
+ method: "restoreMemory"
4539
4581
  }
4540
4582
  }, vi = process.env.PUBLIC_SASSY_API_SERVER_URL, nt = async ({
4541
4583
  query: e,
@@ -4555,7 +4597,7 @@ const G = {
4555
4597
  variables: t
4556
4598
  }),
4557
4599
  ...s
4558
- }), me = async (e) => {
4600
+ }), ae = async (e) => {
4559
4601
  const t = e.type?.data ? e.type.data(e.params) : e.params;
4560
4602
  try {
4561
4603
  let r;
@@ -4597,23 +4639,23 @@ const G = {
4597
4639
  user: s,
4598
4640
  provider: e
4599
4641
  };
4600
- return t && (a.model = t), await me({
4642
+ return t && (a.model = t), await ae({
4601
4643
  accessToken: r,
4602
- type: B.SET_USER_PREFERENCES,
4644
+ type: D.SET_USER_PREFERENCES,
4603
4645
  params: a
4604
4646
  });
4605
4647
  }, Zc = async ({
4606
4648
  plan: e,
4607
4649
  accessToken: t,
4608
4650
  username: r
4609
- }) => await me({
4651
+ }) => await ae({
4610
4652
  accessToken: t,
4611
- type: B.SET_USER_PREFERENCES,
4653
+ type: D.SET_USER_PREFERENCES,
4612
4654
  params: {
4613
4655
  user: r,
4614
4656
  plan: e
4615
4657
  }
4616
- }), Q = {
4658
+ }), x = {
4617
4659
  CHAT: "chat",
4618
4660
  CHATS: "chats",
4619
4661
  CHATS_STATS: "chatsStats",
@@ -4621,17 +4663,18 @@ const G = {
4621
4663
  CHANGELOGS: "changelogs",
4622
4664
  PREFERENCES: "preferences",
4623
4665
  USAGE: "usage",
4624
- USER_MEMORIES: "userMemories"
4625
- }, el = () => fe({
4626
- queryKey: [Q.CAPABILITIES],
4627
- queryFn: async () => await pe({
4628
- type: B.GET_SERVER_CAPABILITIES,
4666
+ USER_MEMORIES: "userMemories",
4667
+ EXPIRED_MEMORIES: "expiredMemories"
4668
+ }, el = () => ue({
4669
+ queryKey: [x.CAPABILITIES],
4670
+ queryFn: async () => await de({
4671
+ type: D.GET_SERVER_CAPABILITIES,
4629
4672
  noAuth: !0
4630
4673
  })
4631
- }), tl = () => fe({
4632
- queryKey: [Q.CHANGELOGS],
4633
- queryFn: async () => await pe({
4634
- type: B.GET_CHANGELOGS,
4674
+ }), tl = () => ue({
4675
+ queryKey: [x.CHANGELOGS],
4676
+ queryFn: async () => await de({
4677
+ type: D.GET_CHANGELOGS,
4635
4678
  noAuth: !0,
4636
4679
  params: {
4637
4680
  client: !0
@@ -4640,25 +4683,25 @@ const G = {
4640
4683
  }), Ti = ({
4641
4684
  user: e,
4642
4685
  getAccessToken: t
4643
- }) => fe({
4644
- queryKey: [Q.PREFERENCES, e],
4645
- queryFn: async () => await pe({
4686
+ }) => ue({
4687
+ queryKey: [x.PREFERENCES, e],
4688
+ queryFn: async () => await de({
4646
4689
  params: {
4647
4690
  user: e
4648
4691
  },
4649
- type: B.GET_USER_PREFERENCES,
4692
+ type: D.GET_USER_PREFERENCES,
4650
4693
  getAccessToken: t
4651
4694
  })
4652
4695
  }), rl = ({
4653
4696
  user: e,
4654
4697
  getAccessToken: t
4655
- }) => fe({
4656
- queryKey: [Q.CHATS_STATS, e],
4657
- queryFn: async () => await pe({
4698
+ }) => ue({
4699
+ queryKey: [x.CHATS_STATS, e],
4700
+ queryFn: async () => await de({
4658
4701
  params: {
4659
4702
  user: e
4660
4703
  },
4661
- type: B.GET_CHATS_STATS,
4704
+ type: D.GET_CHATS_STATS,
4662
4705
  getAccessToken: t
4663
4706
  })
4664
4707
  }), sl = ({
@@ -4668,12 +4711,12 @@ const G = {
4668
4711
  sortedCell: s,
4669
4712
  getAccessToken: a,
4670
4713
  enabled: n = !0
4671
- }) => fe({
4714
+ }) => ue({
4672
4715
  enabled: n,
4673
4716
  staleTime: 60 * 1e3,
4674
4717
  // 1 minute
4675
- queryKey: [Q.CHATS, e, t, r, s],
4676
- queryFn: async () => await pe({
4718
+ queryKey: [x.CHATS, e, t, r, s],
4719
+ queryFn: async () => await de({
4677
4720
  params: {
4678
4721
  user: e,
4679
4722
  searchString: t,
@@ -4682,26 +4725,26 @@ const G = {
4682
4725
  limit: 1,
4683
4726
  truncateSize: 100
4684
4727
  },
4685
- type: B.GET_CHATS,
4728
+ type: D.GET_CHATS,
4686
4729
  getAccessToken: a
4687
4730
  })
4688
4731
  }), al = ({
4689
4732
  chatId: e,
4690
4733
  getAccessToken: t,
4691
4734
  enabled: r = !0
4692
- }) => fe({
4735
+ }) => ue({
4693
4736
  enabled: r && !!e,
4694
- queryKey: [Q.CHAT, e],
4695
- queryFn: async () => await pe({
4737
+ queryKey: [x.CHAT, e],
4738
+ queryFn: async () => await de({
4696
4739
  params: { id: e },
4697
- type: B.GET_CHAT,
4740
+ type: D.GET_CHAT,
4698
4741
  getAccessToken: t
4699
4742
  })
4700
4743
  }), nl = ({
4701
4744
  getAccessToken: e
4702
4745
  }) => {
4703
- const t = he();
4704
- return Pe({
4746
+ const t = se();
4747
+ return ye({
4705
4748
  mutationFn: async ({
4706
4749
  userId: r,
4707
4750
  id: s,
@@ -4710,48 +4753,48 @@ const G = {
4710
4753
  tokenUsage: i
4711
4754
  }) => {
4712
4755
  const o = await e();
4713
- return (await me({
4756
+ return (await ae({
4714
4757
  accessToken: o,
4715
- type: B.SAVE_CHAT,
4758
+ type: D.SAVE_CHAT,
4716
4759
  params: { userId: r, id: s, messages: a, provider: n, tokenUsage: i }
4717
4760
  })).data;
4718
4761
  },
4719
4762
  onSuccess: (r, s) => {
4720
- t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
4763
+ t.invalidateQueries({ queryKey: [x.CHATS, s.userId] });
4721
4764
  }
4722
4765
  });
4723
4766
  }, il = ({
4724
4767
  getAccessToken: e
4725
4768
  }) => {
4726
- const t = he();
4727
- return Pe({
4769
+ const t = se();
4770
+ return ye({
4728
4771
  mutationFn: async ({ userId: r, id: s }) => {
4729
4772
  const a = await e();
4730
- return (await me({
4773
+ return (await ae({
4731
4774
  accessToken: a,
4732
- type: B.DELETE_CHAT,
4775
+ type: D.DELETE_CHAT,
4733
4776
  params: { userId: r, id: s }
4734
4777
  })).data;
4735
4778
  },
4736
4779
  onSuccess: (r, s) => {
4737
- t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
4780
+ t.invalidateQueries({ queryKey: [x.CHATS, s.userId] });
4738
4781
  }
4739
4782
  });
4740
4783
  }, ol = ({
4741
4784
  getAccessToken: e
4742
4785
  }) => {
4743
- const t = he();
4744
- return Pe({
4786
+ const t = se();
4787
+ return ye({
4745
4788
  mutationFn: async ({ userId: r, id: s }) => {
4746
4789
  const a = await e();
4747
- return (await me({
4790
+ return (await ae({
4748
4791
  accessToken: a,
4749
- type: B.TOGGLE_FAVORITE_CHAT,
4792
+ type: D.TOGGLE_FAVORITE_CHAT,
4750
4793
  params: { userId: r, id: s }
4751
4794
  })).data;
4752
4795
  },
4753
4796
  onSuccess: (r, s) => {
4754
- t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
4797
+ t.invalidateQueries({ queryKey: [x.CHATS, s.userId] });
4755
4798
  }
4756
4799
  });
4757
4800
  }, cl = ({
@@ -4760,16 +4803,16 @@ const G = {
4760
4803
  year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
4761
4804
  getAccessToken: s,
4762
4805
  enabled: a = !0
4763
- }) => fe({
4806
+ }) => ue({
4764
4807
  enabled: a,
4765
- queryKey: [Q.USAGE, e, t, r],
4766
- queryFn: async () => await pe({
4808
+ queryKey: [x.USAGE, e, t, r],
4809
+ queryFn: async () => await de({
4767
4810
  params: {
4768
4811
  user: e,
4769
4812
  month: t,
4770
4813
  year: r
4771
4814
  },
4772
- type: B.GET_USAGE,
4815
+ type: D.GET_USAGE,
4773
4816
  getAccessToken: s
4774
4817
  })
4775
4818
  }), ll = ({
@@ -4777,79 +4820,138 @@ const G = {
4777
4820
  query: t,
4778
4821
  getAccessToken: r,
4779
4822
  enabled: s = !0
4780
- }) => fe({
4823
+ }) => ue({
4781
4824
  enabled: s && !!e,
4782
- queryKey: [Q.USER_MEMORIES, e, t],
4783
- queryFn: async () => await pe({
4825
+ queryKey: [x.USER_MEMORIES, e, t],
4826
+ queryFn: async () => await de({
4784
4827
  params: { user: e, query: t },
4785
- type: B.GET_USER_MEMORIES,
4828
+ type: D.GET_USER_MEMORIES,
4786
4829
  getAccessToken: r
4787
4830
  })
4788
4831
  }), ul = ({
4789
4832
  getAccessToken: e
4790
4833
  }) => {
4791
- const t = he();
4792
- return Pe({
4834
+ const t = se();
4835
+ return ye({
4793
4836
  mutationFn: async ({
4794
4837
  user: r,
4795
4838
  memoryId: s,
4796
- description: a
4839
+ description: a,
4840
+ expiration: n
4797
4841
  }) => {
4798
- const n = await e();
4799
- return (await me({
4800
- accessToken: n,
4801
- type: B.UPDATE_MEMORY,
4802
- params: { user: r, memoryId: s, description: a }
4842
+ const i = await e();
4843
+ return (await ae({
4844
+ accessToken: i,
4845
+ type: D.UPDATE_MEMORY,
4846
+ params: { user: r, memoryId: s, description: a, expiration: n }
4803
4847
  })).data;
4804
4848
  },
4805
4849
  onSuccess: (r, s) => {
4806
4850
  t.invalidateQueries({
4807
- queryKey: [Q.USER_MEMORIES, s.user]
4851
+ queryKey: [x.USER_MEMORIES, s.user]
4808
4852
  });
4809
4853
  }
4810
4854
  });
4811
4855
  }, dl = ({
4812
4856
  getAccessToken: e
4813
4857
  }) => {
4814
- const t = he();
4815
- return Pe({
4858
+ const t = se();
4859
+ return ye({
4816
4860
  mutationFn: async ({
4817
4861
  user: r,
4818
4862
  memoryId: s
4819
4863
  }) => {
4820
4864
  const a = await e();
4821
- return (await me({
4865
+ return (await ae({
4822
4866
  accessToken: a,
4823
- type: B.DELETE_MEMORY,
4867
+ type: D.DELETE_MEMORY,
4824
4868
  params: { user: r, memoryId: s }
4825
4869
  })).data;
4826
4870
  },
4827
4871
  onSuccess: (r, s) => {
4828
4872
  t.invalidateQueries({
4829
- queryKey: [Q.USER_MEMORIES, s.user]
4873
+ queryKey: [x.USER_MEMORIES, s.user]
4874
+ }), t.invalidateQueries({
4875
+ queryKey: [x.EXPIRED_MEMORIES, s.user]
4830
4876
  });
4831
4877
  }
4832
4878
  });
4833
4879
  }, hl = ({
4834
4880
  getAccessToken: e
4835
4881
  }) => {
4836
- const t = he();
4837
- return Pe({
4882
+ const t = se();
4883
+ return ye({
4884
+ mutationFn: async ({ user: r }) => {
4885
+ const s = await e();
4886
+ return (await ae({
4887
+ accessToken: s,
4888
+ type: D.DELETE_ACTIVE_MEMORIES,
4889
+ params: { user: r }
4890
+ })).data;
4891
+ },
4892
+ onSuccess: (r, s) => {
4893
+ t.invalidateQueries({
4894
+ queryKey: [x.USER_MEMORIES, s.user]
4895
+ });
4896
+ }
4897
+ });
4898
+ }, fl = ({
4899
+ getAccessToken: e
4900
+ }) => {
4901
+ const t = se();
4902
+ return ye({
4838
4903
  mutationFn: async ({ user: r }) => {
4839
4904
  const s = await e();
4840
- return (await me({
4905
+ return (await ae({
4841
4906
  accessToken: s,
4842
- type: B.DELETE_MEMORIES,
4907
+ type: D.DELETE_EXPIRED_MEMORIES,
4843
4908
  params: { user: r }
4844
4909
  })).data;
4845
4910
  },
4846
4911
  onSuccess: (r, s) => {
4847
4912
  t.invalidateQueries({
4848
- queryKey: [Q.USER_MEMORIES, s.user]
4913
+ queryKey: [x.EXPIRED_MEMORIES, s.user]
4849
4914
  });
4850
4915
  }
4851
4916
  });
4852
- }, pe = async ({
4917
+ }, ml = ({
4918
+ user: e,
4919
+ query: t,
4920
+ getAccessToken: r,
4921
+ enabled: s = !0
4922
+ }) => ue({
4923
+ enabled: s && !!e,
4924
+ queryKey: [x.EXPIRED_MEMORIES, e, t],
4925
+ queryFn: async () => await de({
4926
+ params: { user: e, query: t },
4927
+ type: D.GET_EXPIRED_MEMORIES,
4928
+ getAccessToken: r
4929
+ })
4930
+ }), pl = ({
4931
+ getAccessToken: e
4932
+ }) => {
4933
+ const t = se();
4934
+ return ye({
4935
+ mutationFn: async ({
4936
+ user: r,
4937
+ memoryId: s
4938
+ }) => {
4939
+ const a = await e();
4940
+ return (await ae({
4941
+ accessToken: a,
4942
+ type: D.RESTORE_MEMORY,
4943
+ params: { user: r, memoryId: s }
4944
+ })).data;
4945
+ },
4946
+ onSuccess: (r, s) => {
4947
+ t.invalidateQueries({
4948
+ queryKey: [x.USER_MEMORIES, s.user]
4949
+ }), t.invalidateQueries({
4950
+ queryKey: [x.EXPIRED_MEMORIES, s.user]
4951
+ });
4952
+ }
4953
+ });
4954
+ }, de = async ({
4853
4955
  params: e,
4854
4956
  type: t,
4855
4957
  noAuth: r,
@@ -4885,19 +4987,19 @@ const G = {
4885
4987
  } catch (a) {
4886
4988
  return Promise.reject(a);
4887
4989
  }
4888
- }, Is = Ft(
4990
+ }, As = Ft(
4889
4991
  void 0
4890
4992
  ), Tr = {
4891
4993
  capabilities: /* @__PURE__ */ new Set(),
4892
4994
  allowedModels: [],
4893
4995
  version: null,
4894
4996
  status: "idle"
4895
- }, Ai = ({
4997
+ }, Ii = ({
4896
4998
  user: e,
4897
4999
  getAccessToken: t,
4898
5000
  children: r
4899
5001
  }) => {
4900
- const [s, a] = ie(Tr), n = ze(
5002
+ const [s, a] = ce(Tr), n = ze(
4901
5003
  () => e ? `entitlements:${e}` : null,
4902
5004
  [e]
4903
5005
  ), i = X(() => {
@@ -4919,19 +5021,19 @@ const G = {
4919
5021
  }
4920
5022
  return !1;
4921
5023
  }, [n]);
4922
- W(() => {
5024
+ V(() => {
4923
5025
  s.status === "idle" && i();
4924
5026
  }, [i, s.status]);
4925
5027
  const o = Ti({ user: e, getAccessToken: t });
4926
- W(() => {
5028
+ V(() => {
4927
5029
  o.isLoading && s.status === "idle" && a((u) => ({ ...u, status: "loading" }));
4928
- }, [o.isLoading, s.status]), W(() => {
5030
+ }, [o.isLoading, s.status]), V(() => {
4929
5031
  o.isError && a((u) => ({
4930
5032
  ...u,
4931
5033
  status: "error",
4932
5034
  error: String(o.error)
4933
5035
  }));
4934
- }, [o.isError, o.error]), W(() => {
5036
+ }, [o.isError, o.error]), V(() => {
4935
5037
  const u = o.data?.entitlements;
4936
5038
  if (u && (a({
4937
5039
  capabilities: new Set(u.capabilities || []),
@@ -4982,30 +5084,30 @@ const G = {
4982
5084
  }, [n]), d = ze(
4983
5085
  () => ({
4984
5086
  ...s,
4985
- check: (u, l) => s.status !== "ready" ? !1 : Si(s.capabilities, u, { any: l?.any }),
5087
+ check: (u, l) => s.status !== "ready" ? !1 : wi(s.capabilities, u, { any: l?.any }),
4986
5088
  loadFromProfile: c,
4987
5089
  reset: f
4988
5090
  }),
4989
5091
  [s, c, f]
4990
5092
  );
4991
- return /* @__PURE__ */ h(Is.Provider, { value: d, children: r });
5093
+ return /* @__PURE__ */ h(As.Provider, { value: d, children: r });
4992
5094
  };
4993
- function fl() {
4994
- const e = ct(Is);
5095
+ function yl() {
5096
+ const e = ct(As);
4995
5097
  if (!e)
4996
5098
  throw new Error("useEntitlements must be used within EntitlementsProvider");
4997
5099
  return e;
4998
5100
  }
4999
- const Ar = (e) => Number.isFinite(e) ? e : 0;
5000
- function Ii(e) {
5101
+ const Ir = (e) => Number.isFinite(e) ? e : 0;
5102
+ function Ai(e) {
5001
5103
  return {
5002
5104
  days: Math.trunc(e / 864e5),
5003
5105
  hours: Math.trunc(e / 36e5 % 24),
5004
5106
  minutes: Math.trunc(e / 6e4 % 60),
5005
5107
  seconds: Math.trunc(e / 1e3 % 60),
5006
5108
  milliseconds: Math.trunc(e % 1e3),
5007
- microseconds: Math.trunc(Ar(e * 1e3) % 1e3),
5008
- nanoseconds: Math.trunc(Ar(e * 1e6) % 1e3)
5109
+ microseconds: Math.trunc(Ir(e * 1e3) % 1e3),
5110
+ nanoseconds: Math.trunc(Ir(e * 1e6) % 1e3)
5009
5111
  };
5010
5112
  }
5011
5113
  function _i(e) {
@@ -5023,7 +5125,7 @@ function Ri(e) {
5023
5125
  switch (typeof e) {
5024
5126
  case "number": {
5025
5127
  if (Number.isFinite(e))
5026
- return Ii(e);
5128
+ return Ai(e);
5027
5129
  break;
5028
5130
  }
5029
5131
  case "bigint":
@@ -5031,7 +5133,7 @@ function Ri(e) {
5031
5133
  }
5032
5134
  throw new TypeError("Expected a finite number or bigint");
5033
5135
  }
5034
- const Ci = (e) => e === 0 || e === 0n, Oi = (e, t) => t === 1 || t === 1n ? e : `${e}s`, ki = 1e-7, Ni = 24n * 60n * 60n * 1000n;
5136
+ const Oi = (e) => e === 0 || e === 0n, Ci = (e, t) => t === 1 || t === 1n ? e : `${e}s`, ki = 1e-7, Ni = 24n * 60n * 60n * 1000n;
5035
5137
  function Pi(e, t) {
5036
5138
  const r = typeof e == "bigint";
5037
5139
  if (!r && !Number.isFinite(e))
@@ -5044,12 +5146,12 @@ function Pi(e, t) {
5044
5146
  const l = Math.floor(d * 10 ** u + ki);
5045
5147
  return (Math.round(l) / 10 ** u).toFixed(u);
5046
5148
  }, i = (d, u, l, m) => {
5047
- if (!((a.length === 0 || !t.colonNotation) && Ci(d) && !(t.colonNotation && l === "m"))) {
5149
+ if (!((a.length === 0 || !t.colonNotation) && Oi(d) && !(t.colonNotation && l === "m"))) {
5048
5150
  if (m ??= String(d), t.colonNotation) {
5049
5151
  const p = m.includes(".") ? m.split(".")[0].length : m.length, g = a.length > 0 ? 2 : 1;
5050
5152
  m = "0".repeat(Math.max(0, g - p)) + m;
5051
5153
  } else
5052
- m += t.verbose ? " " + Oi(u, d) : l;
5154
+ m += t.verbose ? " " + Ci(u, d) : l;
5053
5155
  a.push(m);
5054
5156
  }
5055
5157
  }, o = Ri(e), c = BigInt(o.days);
@@ -5059,12 +5161,12 @@ function Pi(e, t) {
5059
5161
  if (i(d, "second", "s"), t.formatSubMilliseconds)
5060
5162
  i(u, "millisecond", "ms"), i(l, "microsecond", "µs"), i(m, "nanosecond", "ns");
5061
5163
  else {
5062
- const p = u + l / 1e3 + m / 1e6, g = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, b = p >= 1 ? Math.round(p) : Math.ceil(p), E = g ? p.toFixed(g) : b;
5164
+ const p = u + l / 1e3 + m / 1e6, g = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, E = p >= 1 ? Math.round(p) : Math.ceil(p), b = g ? p.toFixed(g) : E;
5063
5165
  i(
5064
- Number.parseFloat(E),
5166
+ Number.parseFloat(b),
5065
5167
  "millisecond",
5066
5168
  "ms",
5067
- E
5169
+ b
5068
5170
  );
5069
5171
  }
5070
5172
  } else {
@@ -5089,12 +5191,12 @@ const _s = process.env.NODE_ENV === "production", jt = !_s, Rs = jt ? "gizmette.
5089
5191
  return "N/A";
5090
5192
  const t = Qt(e, !1);
5091
5193
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
5092
- }, xi = (e) => {
5194
+ }, Mi = (e) => {
5093
5195
  if (!e && e !== 0)
5094
5196
  return "N/A";
5095
5197
  const t = Qt(e, !0);
5096
5198
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
5097
- }, Mi = async () => {
5199
+ }, xi = async () => {
5098
5200
  const e = {
5099
5201
  /**
5100
5202
  * A boolean value that indicates the application would like to receive the
@@ -5148,7 +5250,7 @@ const _s = process.env.NODE_ENV === "production", jt = !_s, Rs = jt ? "gizmette.
5148
5250
  window.atob(e).split("").map(function(t) {
5149
5251
  return `%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`;
5150
5252
  }).join("")
5151
- ), Ui = (e, t, r) => t ? Object.keys(t).map((s) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ V("div", { className: "flex items-center justify-between", children: [
5253
+ ), Ui = (e, t, r) => t ? Object.keys(t).map((s) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ j("div", { className: "flex items-center justify-between", children: [
5152
5254
  /* @__PURE__ */ h(
5153
5255
  "dt",
5154
5256
  {
@@ -5190,14 +5292,14 @@ const Hi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5190
5292
  }), Gi = (e) => e > 0 ? Pi(e, {
5191
5293
  secondsDecimalDigits: 2,
5192
5294
  unitCount: 2
5193
- }) : "N/A", Cs = ({
5295
+ }) : "N/A", Os = ({
5194
5296
  isAuthenticated: e,
5195
5297
  extraClass: t,
5196
5298
  oledMode: r
5197
5299
  }) => y("px-4", "flex-1 overflow-y-auto", e ? "pt-0" : "pt-10", t, {
5198
5300
  "bg-slate-900/95 dark:bg-slate-900": r,
5199
5301
  "bg-slate-900": !r
5200
- }), Os = ({
5302
+ }), Cs = ({
5201
5303
  extraClass: e,
5202
5304
  fullScreen: t
5203
5305
  } = {}) => y(
@@ -5210,7 +5312,7 @@ const Hi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5210
5312
  "md:max-w-svw": t
5211
5313
  },
5212
5314
  e
5213
- ), Bi = (e, t) => t === 1 ? e : `${e}s`, qi = (e, t) => {
5315
+ ), qi = (e, t) => t === 1 ? e : `${e}s`, Bi = (e, t) => {
5214
5316
  let r;
5215
5317
  return (...s) => {
5216
5318
  window.clearTimeout(r), r = window.setTimeout(() => e(...s), t);
@@ -5249,8 +5351,8 @@ const Hi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5249
5351
  transition: f,
5250
5352
  icon: d
5251
5353
  }), Yi = (e, t) => t === "ready" && !!e && e.length > 0, zi = (e) => {
5252
- e ? document.documentElement.setAttribute(Sr, "true") : document.documentElement.removeAttribute(Sr);
5253
- }, ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: Rs, applyOledMode: zi, canEvaluateModels: Yi, convertCamelCaseToReadable: Qi, convertDDToDMS: Qt, convertLatitudeToDMS: $i, convertLongitudeToDMS: xi, debounce: qi, durationFormatter: Gi, extractAverage: Fi, getCurrentGeoLocation: Mi, getLayoutPaddingClass: Os, getMessageContaintWrapperClass: Cs, isDev: jt, isLastMessageFromRole: Hi, isPWAMode: ji, isProbablyMobile: Ns, isProbablyTablet: Ps, isProbablyiPad: Vi, isProbablyiPhone: Wi, isProd: _s, isTauri: ks, numberFormatter: Ki, obfuscate: Di, pluralize: Bi, renderDataAsList: Ui, toastOptions: Ji, unObfuscate: Li }, Symbol.toStringTag, { value: "Module" })), Ir = "av-button", ft = "icon", Jt = "button", Lt = "link", Xi = ({
5354
+ e ? document.documentElement.setAttribute(wr, "true") : document.documentElement.removeAttribute(wr);
5355
+ }, gl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: Rs, applyOledMode: zi, canEvaluateModels: Yi, convertCamelCaseToReadable: Qi, convertDDToDMS: Qt, convertLatitudeToDMS: $i, convertLongitudeToDMS: Mi, debounce: Bi, durationFormatter: Gi, extractAverage: Fi, getCurrentGeoLocation: xi, getLayoutPaddingClass: Cs, getMessageContaintWrapperClass: Os, isDev: jt, isLastMessageFromRole: Hi, isPWAMode: ji, isProbablyMobile: Ns, isProbablyTablet: Ps, isProbablyiPad: Vi, isProbablyiPhone: Wi, isProd: _s, isTauri: ks, numberFormatter: Ki, obfuscate: Di, pluralize: qi, renderDataAsList: Ui, toastOptions: Ji, unObfuscate: Li }, Symbol.toStringTag, { value: "Module" })), Ar = "av-button", ft = "icon", Jt = "button", Lt = "link", Xi = ({
5254
5356
  type: e,
5255
5357
  size: t,
5256
5358
  labelRight: r,
@@ -5542,9 +5644,9 @@ const Hi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5542
5644
  truncate: m,
5543
5645
  align: p,
5544
5646
  radius: g,
5545
- animated: b
5546
- }) => (l || (l = "primary"), r ? y(Ir, t) : y(
5547
- Ir,
5647
+ animated: E
5648
+ }) => (l || (l = "primary"), r ? y(Ar, t) : y(
5649
+ Ar,
5548
5650
  eo({
5549
5651
  mode: s,
5550
5652
  variant: l,
@@ -5559,7 +5661,7 @@ const Hi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5559
5661
  labelRight: f,
5560
5662
  labelLeft: d,
5561
5663
  align: p,
5562
- animated: b
5664
+ animated: E
5563
5665
  }),
5564
5666
  Zi({ type: e, size: o, labelRight: f, labelLeft: d }),
5565
5667
  no({ mode: s, variant: l, noBorder: c }),
@@ -5571,12 +5673,12 @@ const Hi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5571
5673
  "disabled:cursor-not-allowed disabled:opacity-50": n
5572
5674
  },
5573
5675
  y({
5574
- "transition-[width] duration-300 ease-in": e === ft && b
5676
+ "transition-[width] duration-300 ease-in": e === ft && E
5575
5677
  }),
5576
5678
  t
5577
5679
  )), lo = (e, t, r) => {
5578
5680
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
5579
- }, Yt = oe.forwardRef((e, t) => {
5681
+ }, Yt = le.forwardRef((e, t) => {
5580
5682
  const { onClick: r, noInternalClick: s = !1, ...a } = e;
5581
5683
  return /* @__PURE__ */ h(
5582
5684
  "button",
@@ -5590,7 +5692,7 @@ const Hi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5590
5692
  );
5591
5693
  });
5592
5694
  Yt.displayName = "BaseButton";
5593
- const xs = oe.forwardRef(
5695
+ const Ms = le.forwardRef(
5594
5696
  ({
5595
5697
  children: e,
5596
5698
  disabled: t = !1,
@@ -5632,14 +5734,14 @@ const xs = oe.forwardRef(
5632
5734
  );
5633
5735
  }
5634
5736
  );
5635
- xs.displayName = "Button";
5737
+ Ms.displayName = "Button";
5636
5738
  function uo() {
5637
- const e = j(!1);
5638
- return W(() => (e.current = !0, () => {
5739
+ const e = Q(!1);
5740
+ return V(() => (e.current = !0, () => {
5639
5741
  e.current = !1;
5640
5742
  }), []), X(() => e.current, []);
5641
5743
  }
5642
- function Ms(e) {
5744
+ function xs(e) {
5643
5745
  return ze(() => e.every((t) => t == null) ? () => {
5644
5746
  } : (t) => {
5645
5747
  e.forEach((r) => {
@@ -5658,18 +5760,18 @@ const ho = {
5658
5760
  right: 0
5659
5761
  };
5660
5762
  function Je(e) {
5661
- const t = uo(), r = j(0), s = j(null), [a, n] = ie(ho), i = ze(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
5763
+ const t = uo(), r = Q(0), s = Q(null), [a, n] = ce(ho), i = ze(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
5662
5764
  const c = o[0];
5663
5765
  c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
5664
5766
  s.current && t() && n(c.contentRect);
5665
5767
  }));
5666
5768
  }), [t]);
5667
- return W(() => (s.current && i?.observe(s.current, e), () => {
5769
+ return V(() => (s.current && i?.observe(s.current, e), () => {
5668
5770
  i?.disconnect(), r.current && cancelAnimationFrame(r.current);
5669
5771
  }), [i, e]), [s, a];
5670
5772
  }
5671
5773
  function Ds(e) {
5672
- const t = Bs();
5774
+ const t = qs();
5673
5775
  if (!e)
5674
5776
  return t;
5675
5777
  if (typeof e == "number" || typeof e == "string")
@@ -5693,7 +5795,7 @@ const Ve = {
5693
5795
  // px-3 x 2
5694
5796
  large: 32
5695
5797
  // px-4 x 2
5696
- }, mo = 2, po = 300, it = oe.forwardRef(
5798
+ }, mo = 2, po = 300, it = le.forwardRef(
5697
5799
  ({
5698
5800
  children: e,
5699
5801
  disabled: t = !1,
@@ -5711,11 +5813,11 @@ const Ve = {
5711
5813
  labelLeft: m,
5712
5814
  noBackground: p = !1,
5713
5815
  align: g = "center",
5714
- radius: b = "large",
5715
- variant: E = "secondary",
5716
- iconClassName: O,
5717
- animated: A = !1,
5718
- ...K
5816
+ radius: E = "large",
5817
+ variant: b = "secondary",
5818
+ iconClassName: C,
5819
+ animated: I = !1,
5820
+ ...B
5719
5821
  }, R) => {
5720
5822
  const z = $s({
5721
5823
  type: ft,
@@ -5731,40 +5833,40 @@ const Ve = {
5731
5833
  labelLeft: m,
5732
5834
  noBackground: p,
5733
5835
  align: g,
5734
- radius: b,
5735
- variant: E,
5736
- animated: A
5737
- }), C = oo({ mode: r, raw: o, iconClassName: O, variant: E }), v = co({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] = Je(), [N, J] = Je(), [ce, Se] = Je(), w = j(0), T = j(null), S = j(null), le = Ms([R, T]);
5836
+ radius: E,
5837
+ variant: b,
5838
+ animated: I
5839
+ }), O = oo({ mode: r, raw: o, iconClassName: C, variant: b }), v = co({ animated: I }), L = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, A] = Je(), [N, J] = Je(), [he, ve] = Je(), S = Q(0), T = Q(null), w = Q(null), fe = xs([R, T]);
5738
5840
  return Xe(() => {
5739
- ce && ce.current && A && (w.current = Se.width + fo[u] + (c ? 0 : mo), T.current && !T.current.style.width && (T.current.style.width = `${Ve[u]}px`));
5740
- }, [Se, ce, u, c, A]), Xe(() => {
5741
- if (T && T.current && A) {
5742
- let ue = Ve[u];
5743
- l && _ && I.width > 0 ? ue = I.width + w.current : m && N && J.width > 0 && (ue = J.width + w.current), S.current && clearTimeout(S.current), ue !== parseInt(T.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"), T.current.style.width = `${ue}px`, ue > Ve[u] && (S.current = setTimeout(() => {
5744
- _.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), S.current = null;
5745
- }, po * 0.8))), ue === Ve[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5841
+ he && he.current && I && (S.current = ve.width + fo[u] + (c ? 0 : mo), T.current && !T.current.style.width && (T.current.style.width = `${Ve[u]}px`));
5842
+ }, [ve, he, u, c, I]), Xe(() => {
5843
+ if (T && T.current && I) {
5844
+ let me = Ve[u];
5845
+ l && _ && A.width > 0 ? me = A.width + S.current : m && N && J.width > 0 && (me = J.width + S.current), w.current && clearTimeout(w.current), me !== parseInt(T.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"), T.current.style.width = `${me}px`, me > Ve[u] && (w.current = setTimeout(() => {
5846
+ _.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), w.current = null;
5847
+ }, po * 0.8))), me === Ve[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5746
5848
  }
5747
5849
  }, [
5748
- I,
5850
+ A,
5749
5851
  l,
5750
5852
  _,
5751
5853
  J,
5752
5854
  m,
5753
5855
  N,
5754
5856
  u,
5755
- A
5756
- ]), W(() => () => {
5757
- S.current && clearTimeout(S.current);
5857
+ I
5858
+ ]), V(() => () => {
5859
+ w.current && clearTimeout(w.current);
5758
5860
  }, []), /* @__PURE__ */ h(
5759
5861
  Yt,
5760
5862
  {
5761
- ref: le,
5863
+ ref: fe,
5762
5864
  className: z,
5763
5865
  disabled: t,
5764
5866
  type: i,
5765
5867
  "aria-label": f || d,
5766
- ...K,
5767
- children: /* @__PURE__ */ V("div", { className: x, children: [
5868
+ ...B,
5869
+ children: /* @__PURE__ */ j("div", { className: L, children: [
5768
5870
  /* @__PURE__ */ h(
5769
5871
  _r,
5770
5872
  {
@@ -5772,10 +5874,10 @@ const Ve = {
5772
5874
  labelRef: N,
5773
5875
  labelClass: v,
5774
5876
  labelInnerClass: "pr-2",
5775
- initiallyHidden: A
5877
+ initiallyHidden: I
5776
5878
  }
5777
5879
  ),
5778
- /* @__PURE__ */ h("span", { ref: ce, className: C, children: e }),
5880
+ /* @__PURE__ */ h("span", { ref: he, className: O, children: e }),
5779
5881
  /* @__PURE__ */ h(
5780
5882
  _r,
5781
5883
  {
@@ -5783,7 +5885,7 @@ const Ve = {
5783
5885
  labelRef: _,
5784
5886
  labelClass: v,
5785
5887
  labelInnerClass: "pl-2",
5786
- initiallyHidden: A
5888
+ initiallyHidden: I
5787
5889
  }
5788
5890
  )
5789
5891
  ] })
@@ -5819,7 +5921,7 @@ try {
5819
5921
  });
5820
5922
  } catch {
5821
5923
  }
5822
- const yo = oe.forwardRef(
5924
+ const yo = le.forwardRef(
5823
5925
  ({
5824
5926
  children: e,
5825
5927
  mode: t = "system",
@@ -5900,7 +6002,7 @@ const Ye = "av-card", go = ({
5900
6002
  footer: d
5901
6003
  };
5902
6004
  };
5903
- function bo({
6005
+ function Eo({
5904
6006
  id: e,
5905
6007
  content: t,
5906
6008
  userAriaLabelledby: r,
@@ -5908,7 +6010,7 @@ function bo({
5908
6010
  }) {
5909
6011
  return typeof t == "string" ? /* @__PURE__ */ h("h2", { id: e, className: s, children: t }) : r ? /* @__PURE__ */ h("div", { className: s, children: t }) : t ? /* @__PURE__ */ h("div", { className: s, id: e, children: t }) : null;
5910
6012
  }
5911
- const Eo = ({
6013
+ const bo = ({
5912
6014
  header: e,
5913
6015
  headerClassName: t,
5914
6016
  footer: r,
@@ -5923,7 +6025,7 @@ const Eo = ({
5923
6025
  ...u
5924
6026
  }) => {
5925
6027
  let l = null, m = null;
5926
- const p = typeof e == "string", g = Ds(Ye), b = go({
6028
+ const p = typeof e == "string", g = Ds(Ye), E = go({
5927
6029
  className: n,
5928
6030
  headerClassName: t,
5929
6031
  bodyClassName: i,
@@ -5932,26 +6034,26 @@ const Eo = ({
5932
6034
  compact: f,
5933
6035
  noBorder: d
5934
6036
  });
5935
- return p ? (l = g, m = l) : !p && e && o ? (l = null, m = o) : !p && e && !o ? (l = g, m = l) : (l = null, m = o || null), /* @__PURE__ */ h("div", { className: b.wrapper, children: /* @__PURE__ */ V(
6037
+ return p ? (l = g, m = l) : !p && e && o ? (l = null, m = o) : !p && e && !o ? (l = g, m = l) : (l = null, m = o || null), /* @__PURE__ */ h("div", { className: E.wrapper, children: /* @__PURE__ */ j(
5936
6038
  "section",
5937
6039
  {
5938
6040
  ...m && {
5939
6041
  "aria-labelledby": m
5940
6042
  },
5941
- className: b.body,
6043
+ className: E.body,
5942
6044
  ...u,
5943
6045
  children: [
5944
6046
  /* @__PURE__ */ h(
5945
- bo,
6047
+ Eo,
5946
6048
  {
5947
6049
  ...l && { id: l },
5948
6050
  content: e,
5949
- className: b.header,
6051
+ className: E.header,
5950
6052
  userAriaLabelledby: o
5951
6053
  }
5952
6054
  ),
5953
6055
  /* @__PURE__ */ h("div", { children: a }),
5954
- r ? /* @__PURE__ */ h("div", { className: b.footer, children: r }) : null
6056
+ r ? /* @__PURE__ */ h("div", { className: E.footer, children: r }) : null
5955
6057
  ]
5956
6058
  }
5957
6059
  ) });
@@ -5981,7 +6083,7 @@ const mt = ({
5981
6083
  ...c
5982
6084
  }) => {
5983
6085
  const f = y(n, s);
5984
- return /* @__PURE__ */ V(
6086
+ return /* @__PURE__ */ j(
5985
6087
  "svg",
5986
6088
  {
5987
6089
  xmlns: "http://www.w3.org/2000/svg",
@@ -6012,7 +6114,7 @@ try {
6012
6114
  });
6013
6115
  } catch {
6014
6116
  }
6015
- const wo = ({
6117
+ const So = ({
6016
6118
  className: e,
6017
6119
  viewBox: t,
6018
6120
  title: r,
@@ -6029,13 +6131,13 @@ const wo = ({
6029
6131
  ...a,
6030
6132
  children: /* @__PURE__ */ h("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
6031
6133
  }
6032
- ), So = ({
6134
+ ), wo = ({
6033
6135
  className: e,
6034
6136
  viewBox: t,
6035
6137
  title: r,
6036
6138
  monotone: s,
6037
6139
  ...a
6038
- }) => /* @__PURE__ */ V(
6140
+ }) => /* @__PURE__ */ j(
6039
6141
  mt,
6040
6142
  {
6041
6143
  defaultViewBox: "0 0 640 512",
@@ -6063,7 +6165,7 @@ const wo = ({
6063
6165
  ...a
6064
6166
  }) => {
6065
6167
  const n = s ? "1" : "0.4";
6066
- return /* @__PURE__ */ V(
6168
+ return /* @__PURE__ */ j(
6067
6169
  mt,
6068
6170
  {
6069
6171
  defaultViewBox: "0 0 190 190",
@@ -6097,7 +6199,7 @@ const wo = ({
6097
6199
  title: r,
6098
6200
  monotone: s,
6099
6201
  ...a
6100
- }) => /* @__PURE__ */ V(
6202
+ }) => /* @__PURE__ */ j(
6101
6203
  mt,
6102
6204
  {
6103
6205
  defaultViewBox: "0 0 576 512",
@@ -6131,10 +6233,10 @@ try {
6131
6233
  });
6132
6234
  } catch {
6133
6235
  }
6134
- const Ao = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createContext({
6236
+ const Io = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = le.createContext({
6135
6237
  columnGap: 0,
6136
6238
  rowGap: 0
6137
- }), Io = ({
6239
+ }), Ao = ({
6138
6240
  children: e,
6139
6241
  className: t,
6140
6242
  columnGap: r = 1,
@@ -6160,7 +6262,7 @@ const Ao = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createCont
6160
6262
  marginLeft: r * -1 * ot + "rem",
6161
6263
  marginTop: s * -1 * ot + "rem"
6162
6264
  }, u = y(
6163
- Ao,
6265
+ Io,
6164
6266
  "box-border flex flex-wrap"
6165
6267
  ), l = { columnGap: r, rowGap: s };
6166
6268
  return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Ut.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Ut.Provider, { value: l, children: e }) });
@@ -6260,7 +6362,7 @@ const Ao = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createCont
6260
6362
  r
6261
6363
  );
6262
6364
  }
6263
- }, ye = ({
6365
+ }, ge = ({
6264
6366
  children: e,
6265
6367
  className: t,
6266
6368
  span: r,
@@ -6296,7 +6398,7 @@ const Ls = "SET_ANNOUNCEMENT", Us = "CLEAR_ANNOUNCEMENT", Ro = {
6296
6398
  progressbar: null,
6297
6399
  status: "polite",
6298
6400
  timer: "assertive"
6299
- }, Co = (e, t) => {
6401
+ }, Oo = (e, t) => {
6300
6402
  switch (t?.type) {
6301
6403
  case Ls:
6302
6404
  return {
@@ -6311,7 +6413,7 @@ const Ls = "SET_ANNOUNCEMENT", Us = "CLEAR_ANNOUNCEMENT", Ro = {
6311
6413
  default:
6312
6414
  return e;
6313
6415
  }
6314
- }, Oo = ({
6416
+ }, Co = ({
6315
6417
  onAnnouncementClear: e,
6316
6418
  dispatch: t
6317
6419
  }) => {
@@ -6329,7 +6431,7 @@ const Ls = "SET_ANNOUNCEMENT", Us = "CLEAR_ANNOUNCEMENT", Ro = {
6329
6431
  type: Ls,
6330
6432
  payload: e
6331
6433
  }), t && (r.current = setTimeout(
6332
- () => Oo({
6434
+ () => Co({
6333
6435
  onAnnouncementClear: s,
6334
6436
  dispatch: a
6335
6437
  }),
@@ -6369,11 +6471,11 @@ function Fs({
6369
6471
  visible: o,
6370
6472
  ...c
6371
6473
  }) {
6372
- const f = j(null), d = j(null), [u, l] = Nr(Co, {
6474
+ const f = Q(null), d = Q(null), [u, l] = Nr(Oo, {
6373
6475
  announcement: null
6374
6476
  });
6375
6477
  let m = r;
6376
- typeof m > "u" && (m = s ? Ro[s] : "assertive"), W(() => {
6478
+ typeof m > "u" && (m = s ? Ro[s] : "assertive"), V(() => {
6377
6479
  ko({
6378
6480
  announcementTimeoutRef: f,
6379
6481
  announcementDelay: a,
@@ -6430,7 +6532,7 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6430
6532
  "focus:outline-focus-light": e === "light",
6431
6533
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
6432
6534
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
6433
- }), xo = ({
6535
+ }), Mo = ({
6434
6536
  noBorder: e,
6435
6537
  error: t
6436
6538
  }) => y("border-2", {
@@ -6438,7 +6540,7 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6438
6540
  "focus:border-border-dark": !e && t,
6439
6541
  "border-border-error-dark": !e && t,
6440
6542
  "border-transparent": e
6441
- }), Mo = ({
6543
+ }), xo = ({
6442
6544
  disabled: e,
6443
6545
  raw: t,
6444
6546
  error: r,
@@ -6530,12 +6632,12 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6530
6632
  "rounded-md text-base px-4",
6531
6633
  Po({ mode: i }),
6532
6634
  $o({ focusMode: o }),
6533
- xo({ noBorder: a, error: n }),
6635
+ Mo({ noBorder: a, error: n }),
6534
6636
  {
6535
6637
  "disabled:cursor-not-allowed disabled:opacity-50": s
6536
6638
  },
6537
6639
  t
6538
- ), m = r ? void 0 : "sr-only", p = Mo({
6640
+ ), m = r ? void 0 : "sr-only", p = xo({
6539
6641
  disabled: s,
6540
6642
  raw: r,
6541
6643
  error: n,
@@ -6545,16 +6647,16 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6545
6647
  raw: r,
6546
6648
  mode: i,
6547
6649
  disabled: s
6548
- }), b = r ? void 0 : y("absolute right-3", f);
6650
+ }), E = r ? void 0 : y("absolute right-3", f);
6549
6651
  return {
6550
6652
  wrapper: d,
6551
6653
  input: l,
6552
6654
  accessibleLabel: m,
6553
6655
  visibleLabel: p,
6554
6656
  helperText: g,
6555
- rightElement: b
6657
+ rightElement: E
6556
6658
  };
6557
- }, zt = oe.forwardRef(
6659
+ }, zt = le.forwardRef(
6558
6660
  ({
6559
6661
  id: e,
6560
6662
  name: t,
@@ -6572,11 +6674,11 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6572
6674
  type: m = "text",
6573
6675
  helperText: p = "",
6574
6676
  rightElement: g,
6575
- rightElementClassName: b,
6576
- size: E = "md",
6577
- ...O
6578
- }, A) => {
6579
- const [K, R] = Je(), [z, C] = ie(0), v = Ds({ id: e, prefix: `${Hs}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
6677
+ rightElementClassName: E,
6678
+ size: b = "md",
6679
+ ...C
6680
+ }, I) => {
6681
+ const [B, R] = Je(), [z, O] = ce(0), v = Ds({ id: e, prefix: `${Hs}-` }), L = `${t} error, ${p}`, _ = Q(null), A = Q(null), N = {
6580
6682
  xs: { label: "-25px", helperText: "30px" },
6581
6683
  sm: { label: "-29px", helperText: "34px" },
6582
6684
  md: { label: "-33px", helperText: "38px" },
@@ -6591,18 +6693,18 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6591
6693
  disabled: f,
6592
6694
  noBorder: d,
6593
6695
  mode: o,
6594
- size: E,
6595
- rightElementClassName: b
6696
+ size: b,
6697
+ rightElementClassName: E
6596
6698
  });
6597
6699
  return Xe(() => {
6598
- R && R.width && C(R.width + 18 + 10);
6700
+ R && R.width && O(R.width + 18 + 10);
6599
6701
  }, [R]), Xe(() => {
6600
- const { label: ce, helperText: Se } = N[E];
6601
- _?.current?.style.setProperty("--av-text-input-label", ce), I?.current?.style.setProperty(
6702
+ const { label: he, helperText: ve } = N[b];
6703
+ _?.current?.style.setProperty("--av-text-input-label", he), A?.current?.style.setProperty(
6602
6704
  "--av-text-input-helper-text",
6603
- Se
6705
+ ve
6604
6706
  );
6605
- }, [E]), /* @__PURE__ */ V("div", { className: J.wrapper, children: [
6707
+ }, [b]), /* @__PURE__ */ j("div", { className: J.wrapper, children: [
6606
6708
  /* @__PURE__ */ h(
6607
6709
  "label",
6608
6710
  {
@@ -6615,7 +6717,7 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6615
6717
  /* @__PURE__ */ h(
6616
6718
  "input",
6617
6719
  {
6618
- ref: A,
6720
+ ref: I,
6619
6721
  id: v,
6620
6722
  name: t,
6621
6723
  type: m,
@@ -6625,7 +6727,7 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6625
6727
  ...p && { "aria-describedby": `${v}-helper` },
6626
6728
  ...s && { "aria-invalid": "true" },
6627
6729
  ...g && !a && { style: { paddingRight: z } },
6628
- ...O
6730
+ ...C
6629
6731
  }
6630
6732
  ),
6631
6733
  !a && !l && /* @__PURE__ */ h(
@@ -6641,7 +6743,7 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6641
6743
  p && /* @__PURE__ */ h(
6642
6744
  "div",
6643
6745
  {
6644
- ref: I,
6746
+ ref: A,
6645
6747
  id: `${v}-helper`,
6646
6748
  className: J.helperText,
6647
6749
  children: p
@@ -6650,17 +6752,17 @@ const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-he
6650
6752
  g && /* @__PURE__ */ h(
6651
6753
  "div",
6652
6754
  {
6653
- ref: K,
6755
+ ref: B,
6654
6756
  className: J.rightElement,
6655
6757
  children: g
6656
6758
  }
6657
6759
  ),
6658
- s && p && /* @__PURE__ */ h(Fs, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
6760
+ s && p && /* @__PURE__ */ h(Fs, { politeness: "polite", clearAnnouncementDelay: 500, children: L })
6659
6761
  ] });
6660
6762
  }
6661
6763
  );
6662
6764
  zt.displayName = "TextInput";
6663
- const Uo = 500, Fo = 5e3, Ho = 2e4, Ks = oe.forwardRef(
6765
+ const Uo = 500, Fo = 5e3, Ho = 2e4, Ks = le.forwardRef(
6664
6766
  ({
6665
6767
  name: e,
6666
6768
  disabled: t,
@@ -6674,55 +6776,55 @@ const Uo = 500, Fo = 5e3, Ho = 2e4, Ks = oe.forwardRef(
6674
6776
  rightElement: f,
6675
6777
  ...d
6676
6778
  }, u) => {
6677
- const [l, m] = ie(!0), [p, g] = ie({
6779
+ const [l, m] = ce(!0), [p, g] = ce({
6678
6780
  message: null,
6679
6781
  politeness: null
6680
- }), b = j(!0), E = j(null), O = j(null), A = Ms([u, O]), K = l ? "Show" : "Hide", R = () => {
6681
- E.current && clearTimeout(E.current), b.current || (E.current = setTimeout(() => {
6682
- b.current = !0, m(!0), g({
6782
+ }), E = Q(!0), b = Q(null), C = Q(null), I = xs([u, C]), B = l ? "Show" : "Hide", R = () => {
6783
+ b.current && clearTimeout(b.current), E.current || (b.current = setTimeout(() => {
6784
+ E.current = !0, m(!0), g({
6683
6785
  announcementTimeout: Fo,
6684
6786
  politeness: "polite",
6685
6787
  message: `${r} hiding characters`
6686
6788
  }), a && a(!0);
6687
6789
  }, Ho));
6688
- }, z = (I) => {
6689
- I.preventDefault();
6690
- const N = !b.current;
6691
- b.current = N, R(), m(N), g({
6790
+ }, z = (A) => {
6791
+ A.preventDefault();
6792
+ const N = !E.current;
6793
+ E.current = N, R(), m(N), g({
6692
6794
  announcementTimeout: Uo,
6693
6795
  politeness: "assertive",
6694
6796
  message: N ? "Characters hidden" : "Characters showing"
6695
6797
  }), a && a(N);
6696
- }, C = (I) => {
6697
- const { relatedTarget: N } = I;
6698
- O.current?.parentElement?.contains(N) || c && c();
6699
- }, v = (I) => {
6700
- R(), i && i(I), C(I);
6701
- }, x = (I) => {
6702
- R(), o && o(I);
6703
- }, _ = (I) => {
6704
- R(), n && n(I);
6798
+ }, O = (A) => {
6799
+ const { relatedTarget: N } = A;
6800
+ C.current?.parentElement?.contains(N) || c && c();
6801
+ }, v = (A) => {
6802
+ R(), i && i(A), O(A);
6803
+ }, L = (A) => {
6804
+ R(), o && o(A);
6805
+ }, _ = (A) => {
6806
+ R(), n && n(A);
6705
6807
  };
6706
- return W(() => () => {
6707
- E.current && clearTimeout(E.current);
6708
- }, []), /* @__PURE__ */ V(kr, { children: [
6808
+ return V(() => () => {
6809
+ b.current && clearTimeout(b.current);
6810
+ }, []), /* @__PURE__ */ j(kr, { children: [
6709
6811
  /* @__PURE__ */ h(
6710
6812
  zt,
6711
6813
  {
6712
- ref: A,
6814
+ ref: I,
6713
6815
  name: e,
6714
6816
  label: r,
6715
6817
  labelHidden: s,
6716
6818
  type: l ? "password" : "text",
6717
6819
  disabled: t,
6718
6820
  onBlur: v,
6719
- onFocus: x,
6821
+ onFocus: L,
6720
6822
  onChange: _,
6721
- rightElement: oe.cloneElement(f, {
6823
+ rightElement: le.cloneElement(f, {
6722
6824
  ref: u,
6723
- label: K,
6825
+ label: B,
6724
6826
  onClick: z,
6725
- onBlur: C,
6827
+ onBlur: O,
6726
6828
  disabled: t
6727
6829
  }),
6728
6830
  ...d
@@ -6754,9 +6856,9 @@ try {
6754
6856
  });
6755
6857
  } catch {
6756
6858
  }
6757
- const Ko = "ASK! ME! ANYTHING!", Go = "Log in with a password", Bo = "Log in with a Passkey", pl = "Log out", qo = "Password", yl = "Usage", gl = "Profile", bl = "Settings", El = "Chat history", wl = "About", Xt = "Type your message here.", Sl = Xt, vl = `${Xt}
6758
- Press Enter to send it or Shift+Enter for new line.`, Tl = `${Xt}
6759
- Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "Review important details.", Il = [
6859
+ const Ko = "ASK! ME! ANYTHING!", Go = "Log in with a password", qo = "Log in with a Passkey", El = "Log out", Bo = "Password", bl = "Usage", Sl = "Profile", wl = "Settings", vl = "Chat history", Tl = "About", Xt = "Type your message here.", Il = Xt, Al = `${Xt}
6860
+ Press Enter to send it or Shift+Enter for new line.`, _l = `${Xt}
6861
+ Press Ctrl+Enter to send it or Enter for new line.`, Rl = "{{clipboard}}", P = "Review important details.", Ol = [
6760
6862
  `Sometimes, ${k} just makes stuff up. ${P}`,
6761
6863
  `${k} may invent facts on the fly. ${P}`,
6762
6864
  `${k} may be confidently wrong. ${P}`,
@@ -6777,17 +6879,17 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6777
6879
  `Sometimes, ${k} howls at the moon. ${P}`,
6778
6880
  `${k} may dig up imaginary bones. ${P}`,
6779
6881
  `${k} may sniff out nonsense. ${P}`
6780
- ], _l = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Private Chat' checkbox, the corresponding chat will not be saved. If you select the 'Clipboard Access' checkbox, your clipboard content (if any) will be provided to the request.", Rl = "Default provider set to", Cl = "Chat successfully deleted!", Ol = "Chat successfully saved!", kl = "Caching enabled. Assets are now stored locally.", Nl = "Caching disabled. Local asset cache cleared.", Pl = "av-sassy", $l = {
6882
+ ], Cl = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Private Chat' checkbox, the corresponding chat will not be saved. If you select the 'Clipboard Access' checkbox, your clipboard content (if any) will be provided to the request.", kl = "Default provider set to", Nl = "Chat successfully deleted!", Pl = "Chat successfully saved!", $l = "Caching enabled. Assets are now stored locally.", Ml = "Caching disabled. Local asset cache cleared.", xl = "av-sassy", Dl = {
6781
6883
  0: ["January", "February", "March"],
6782
6884
  3: ["April", "May", "June"],
6783
6885
  6: ["July", "August", "September"],
6784
6886
  9: ["October", "November", "December"]
6785
- }, xl = {
6887
+ }, Ll = {
6786
6888
  0: ["Jan", "Feb", "Mar"],
6787
6889
  3: ["Apr", "May", "Jun"],
6788
6890
  6: ["Jul", "Aug", "Sep"],
6789
6891
  9: ["Oct", "Nov", "Dec"]
6790
- }, Ml = {
6892
+ }, Ul = {
6791
6893
  PREFERENCES: {
6792
6894
  TITLE: "User profile",
6793
6895
  USERNAME: "Username",
@@ -6843,7 +6945,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6843
6945
  isCapabilitiesSuccess: t,
6844
6946
  capabilities: r,
6845
6947
  oledMode: s
6846
- }) => /* @__PURE__ */ V(
6948
+ }) => /* @__PURE__ */ j(
6847
6949
  "div",
6848
6950
  {
6849
6951
  className: y(
@@ -6852,8 +6954,8 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6852
6954
  "flex items-center justify-center"
6853
6955
  ),
6854
6956
  children: [
6855
- /* @__PURE__ */ h("div", { className: "basis-1/4 text-slate-300", children: /* @__PURE__ */ h(wo, {}) }),
6856
- /* @__PURE__ */ V(
6957
+ /* @__PURE__ */ h("div", { className: "basis-1/4 text-slate-300", children: /* @__PURE__ */ h(So, {}) }),
6958
+ /* @__PURE__ */ j(
6857
6959
  "div",
6858
6960
  {
6859
6961
  className: y(
@@ -6875,31 +6977,31 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6875
6977
  ]
6876
6978
  }
6877
6979
  ), Vo = () => {
6878
- const { login: e, logoutReason: t, loginWithPasskey: r } = ls(), [s, a] = ie(""), [n, i] = ie(""), [o, c] = ie(!0), [f, d] = ie({
6980
+ const { login: e, logoutReason: t, loginWithPasskey: r } = ls(), [s, a] = ce(""), [n, i] = ce(""), [o, c] = ce(!0), [f, d] = ce({
6879
6981
  username: "",
6880
6982
  password: ""
6881
6983
  }), u = async (l) => {
6882
6984
  l.preventDefault(), await e(f.username, f.password) || (i(""), a("Invalid username or password"));
6883
6985
  };
6884
- return W(() => {
6986
+ return V(() => {
6885
6987
  document.getElementById("logo")?.classList.add("fadeOut"), setTimeout(() => {
6886
6988
  document.getElementById("root")?.classList.replace("app-hidden", "fadeIn");
6887
6989
  }, 500);
6888
- }), W(() => {
6990
+ }), V(() => {
6889
6991
  t && i(t);
6890
- }, [t]), /* @__PURE__ */ V("main", { className: Os({ extraClass: "mt-5" }), children: [
6992
+ }, [t]), /* @__PURE__ */ j("main", { className: Cs({ extraClass: "mt-5" }), children: [
6891
6993
  /* @__PURE__ */ h(
6892
6994
  "div",
6893
6995
  {
6894
- className: Cs({
6996
+ className: Os({
6895
6997
  extraClass: "rounded-md pb-10"
6896
6998
  }),
6897
6999
  children: /* @__PURE__ */ h(Wo, {})
6898
7000
  }
6899
7001
  ),
6900
- /* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(Io, { alignHorizontal: "center", children: /* @__PURE__ */ h(ye, { span: 6, children: /* @__PURE__ */ V(Eo, { mode: "dark", children: [
6901
- /* @__PURE__ */ h(ye, { span: 12, className: "mt-7", children: n && /* @__PURE__ */ h("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
6902
- /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
7002
+ /* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(Ao, { alignHorizontal: "center", children: /* @__PURE__ */ h(ge, { span: 6, children: /* @__PURE__ */ j(bo, { mode: "dark", children: [
7003
+ /* @__PURE__ */ h(ge, { span: 12, className: "mt-7", children: n && /* @__PURE__ */ h("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
7004
+ /* @__PURE__ */ h(ge, { span: 12, children: /* @__PURE__ */ h(
6903
7005
  zt,
6904
7006
  {
6905
7007
  className: "mt-7",
@@ -6920,7 +7022,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6920
7022
  error: s !== ""
6921
7023
  }
6922
7024
  ) }),
6923
- /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
7025
+ /* @__PURE__ */ h(ge, { span: 12, children: /* @__PURE__ */ h(
6924
7026
  Ks,
6925
7027
  {
6926
7028
  className: "mt-7",
@@ -6931,14 +7033,14 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6931
7033
  mode: "dark",
6932
7034
  focusMode: "light",
6933
7035
  name: "password",
6934
- label: qo,
7036
+ label: Bo,
6935
7037
  rightElement: /* @__PURE__ */ h(
6936
7038
  it,
6937
7039
  {
6938
7040
  focusMode: "light",
6939
7041
  mode: "dark",
6940
7042
  label: o ? "Show" : "Hide",
6941
- children: o ? /* @__PURE__ */ h(To, {}) : /* @__PURE__ */ h(So, {})
7043
+ children: o ? /* @__PURE__ */ h(To, {}) : /* @__PURE__ */ h(wo, {})
6942
7044
  }
6943
7045
  ),
6944
7046
  onMaskChange: c,
@@ -6952,8 +7054,8 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6952
7054
  helperText: s
6953
7055
  }
6954
7056
  ) }),
6955
- /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
6956
- xs,
7057
+ /* @__PURE__ */ h(ge, { span: 12, children: /* @__PURE__ */ h(
7058
+ Ms,
6957
7059
  {
6958
7060
  mode: "dark",
6959
7061
  focusMode: "light",
@@ -6964,9 +7066,9 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6964
7066
  children: Go
6965
7067
  }
6966
7068
  ) }),
6967
- !ks() && /* @__PURE__ */ V(kr, { children: [
6968
- /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
6969
- /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
7069
+ !ks() && /* @__PURE__ */ j(kr, { children: [
7070
+ /* @__PURE__ */ h(ge, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
7071
+ /* @__PURE__ */ h(ge, { span: 12, children: /* @__PURE__ */ h(
6970
7072
  it,
6971
7073
  {
6972
7074
  variant: "selected",
@@ -6974,7 +7076,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6974
7076
  focusMode: "light",
6975
7077
  fullWidth: !0,
6976
7078
  className: "mb-4",
6977
- labelRight: Bo,
7079
+ labelRight: qo,
6978
7080
  onClick: r,
6979
7081
  children: /* @__PURE__ */ h(vo, { size: "size-7" })
6980
7082
  }
@@ -6982,16 +7084,16 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
6982
7084
  ] })
6983
7085
  ] }) }) }) })
6984
7086
  ] });
6985
- }, jo = new URL(document.location.href).searchParams, Cr = !!jo.get("debug") || !1, Qo = Ws(() => import(
7087
+ }, jo = new URL(document.location.href).searchParams, Or = !!jo.get("debug") || !1, Qo = Ws(() => import(
6986
7088
  /* webpackChunkName: "LazyApp" */
6987
- "./App.fPigJREV.js"
6988
- ).then((e) => e.App)), Jo = new ma(), Or = ({
7089
+ "./App.uyXRdmU-.js"
7090
+ ).then((e) => e.App)), Jo = new ma(), Cr = ({
6989
7091
  isComponent: e,
6990
7092
  headerHeight: t
6991
7093
  }) => {
6992
7094
  const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } = ls();
6993
- return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(qs, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(pa, { client: Jo, children: /* @__PURE__ */ h(
6994
- Ai,
7095
+ return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(Bs, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(pa, { client: Jo, children: /* @__PURE__ */ h(
7096
+ Ii,
6995
7097
  {
6996
7098
  user: a?.username,
6997
7099
  getAccessToken: n,
@@ -7002,20 +7104,20 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
7002
7104
  isComponent: e = !1,
7003
7105
  headerHeight: t = 0,
7004
7106
  domain: r = Rs
7005
- }) => (W(() => {
7107
+ }) => (V(() => {
7006
7108
  e || hs().catch((s) => {
7007
7109
  console.error("[SW] Failed to register service worker:", s);
7008
7110
  });
7009
7111
  }, [e]), jt ? /* @__PURE__ */ h(
7010
- wr,
7112
+ Sr,
7011
7113
  {
7012
7114
  clientId: vr,
7013
7115
  domain: r,
7014
- debug: Cr,
7116
+ debug: Or,
7015
7117
  endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
7016
- children: /* @__PURE__ */ h(Or, { isComponent: e, headerHeight: t })
7118
+ children: /* @__PURE__ */ h(Cr, { isComponent: e, headerHeight: t })
7017
7119
  }
7018
- ) : /* @__PURE__ */ h(wr, { clientId: vr, domain: r, debug: Cr, children: /* @__PURE__ */ h(Or, { isComponent: e, headerHeight: t }) })), Dl = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
7120
+ ) : /* @__PURE__ */ h(Sr, { clientId: vr, domain: r, debug: Or, children: /* @__PURE__ */ h(Cr, { isComponent: e, headerHeight: t }) })), Fl = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
7019
7121
  Yo,
7020
7122
  {
7021
7123
  isComponent: !0,
@@ -7025,88 +7127,88 @@ Press Ctrl+Enter to send it or Enter for new line.`, Al = "{{clipboard}}", P = "
7025
7127
  );
7026
7128
  export {
7027
7129
  k as $,
7028
- wl as ABOUT_TITLE,
7130
+ Tl as ABOUT_TITLE,
7029
7131
  dc as ACTION_RESET_PROMPT,
7030
7132
  cc as ACTION_SEARCH,
7031
7133
  lc as ACTION_SORT,
7032
7134
  uc as ACTION_TOGGLE_PROMPT,
7033
- Pl as APP_CLASSNAME,
7034
- xs as C,
7035
- Ml as CARDS,
7036
- Al as CLIPBOARD_PROMPT,
7037
- Cc as DEFAULT_ICON_ACTION_SIZE,
7135
+ xl as APP_CLASSNAME,
7136
+ Ms as C,
7137
+ Ul as CARDS,
7138
+ Rl as CLIPBOARD_PROMPT,
7139
+ Oc as DEFAULT_ICON_ACTION_SIZE,
7038
7140
  Hc as E,
7039
7141
  oc as ERROR_MESSAGE,
7040
7142
  Yc as Et,
7041
7143
  Gc as F,
7042
- Il as FOOTER_DISCLAIMERS,
7043
- El as HISTORY_TITLE,
7144
+ Ol as FOOTER_DISCLAIMERS,
7145
+ vl as HISTORY_TITLE,
7044
7146
  mt as I,
7045
- Ic as INFINITE_SCROLL_LIMIT,
7046
- Ac as INFINITE_SCROLL_THRESHOLD,
7147
+ Ac as INFINITE_SCROLL_LIMIT,
7148
+ Ic as INFINITE_SCROLL_THRESHOLD,
7047
7149
  $c as INPUT_BOTTOM_OFFSET,
7048
7150
  Dc as INPUT_BOTTOM_OFFSET_EXTRA,
7049
- Mc as INPUT_BOTTOM_OFFSET_IPAD,
7050
- xc as INPUT_BOTTOM_OFFSET_IPHONE,
7051
- Tl as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
7052
- vl as INPUT_PLACEHOLDER_TEXT_ENTER,
7053
- Sl as INPUT_PLACEHOLDER_TEXT_MOBILE,
7151
+ xc as INPUT_BOTTOM_OFFSET_IPAD,
7152
+ Mc as INPUT_BOTTOM_OFFSET_IPHONE,
7153
+ _l as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
7154
+ Al as INPUT_PLACEHOLDER_TEXT_ENTER,
7155
+ Il as INPUT_PLACEHOLDER_TEXT_MOBILE,
7054
7156
  Wc as J,
7055
- Io as L,
7056
- Sc as LOCAL_STORAGE_CHAT_ID,
7057
- bc as LOCAL_STORAGE_FAVORITES_ONLY,
7157
+ Ao as L,
7158
+ wc as LOCAL_STORAGE_CHAT_ID,
7159
+ Ec as LOCAL_STORAGE_FAVORITES_ONLY,
7058
7160
  Tc as LOCAL_STORAGE_FULL_SCREEN,
7059
7161
  vc as LOCAL_STORAGE_OLED_MODE,
7060
7162
  us as LOCAL_STORAGE_PREFIX,
7061
- Ec as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
7062
- wc as LOCAL_STORAGE_REASONING_DISCLOSURE,
7163
+ bc as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
7164
+ Sc as LOCAL_STORAGE_REASONING_DISCLOSURE,
7063
7165
  hc as LOCAL_STORAGE_SEARCH,
7064
7166
  fc as LOCAL_STORAGE_SORT,
7065
7167
  gc as LOCAL_STORAGE_SORT_MEMORY_COLUMN,
7066
7168
  yc as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
7067
7169
  mc as LOCAL_STORAGE_SORT_TIMESTAMP,
7068
7170
  pc as LOCAL_STORAGE_SORT_TOKEN_USAGE,
7069
- pl as LOG_OUT,
7171
+ El as LOG_OUT,
7070
7172
  Wo as Logo,
7071
7173
  dt as O,
7072
- gl as PROFILE_TITLE,
7073
- _l as PROMPTS_DESCRIPTION,
7174
+ Sl as PROFILE_TITLE,
7175
+ Cl as PROMPTS_DESCRIPTION,
7074
7176
  _c as PROMPT_CLASSNAME,
7075
7177
  Rc as PROMPT_EDITABLE_AREA_CLASSNAME,
7076
7178
  Vc as Q,
7077
- Eo as S,
7078
- B as SERVICE_TYPES,
7079
- bl as SETTINGS_TITLE,
7080
- Dl as SassySaint,
7081
- Nl as TOAST_CACHE_DISABLED,
7082
- kl as TOAST_CACHE_ENABLED,
7083
- Cl as TOAST_CHAT_DELETED,
7084
- Ol as TOAST_CHAT_SAVED,
7085
- Rl as TOAST_PROVIDER_CHANGED,
7086
- $l as TRIMESTERS,
7087
- xl as TRIMESTERS_SHORT,
7179
+ bo as S,
7180
+ D as SERVICE_TYPES,
7181
+ wl as SETTINGS_TITLE,
7182
+ Fl as SassySaint,
7183
+ Ml as TOAST_CACHE_DISABLED,
7184
+ $l as TOAST_CACHE_ENABLED,
7185
+ Nl as TOAST_CHAT_DELETED,
7186
+ Pl as TOAST_CHAT_SAVED,
7187
+ kl as TOAST_PROVIDER_CHANGED,
7188
+ Dl as TRIMESTERS,
7189
+ Ll as TRIMESTERS_SHORT,
7088
7190
  kc as UI_BUTTON_SCROLL_BUFFER,
7089
7191
  Nc as UI_DEFAULT_MAIN_HEIGHT,
7090
7192
  Pc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
7091
- Oc as UI_FOOTER_BUFFER,
7092
- yl as USAGE_TITLE,
7093
- Ei as V,
7193
+ Cc as UI_FOOTER_BUFFER,
7194
+ bl as USAGE_TITLE,
7195
+ bi as V,
7094
7196
  zt as Y,
7095
- qc as Z,
7197
+ Bc as Z,
7096
7198
  zi as applyOledMode,
7097
7199
  Kc as b,
7098
7200
  yo as b$1,
7099
7201
  ht as c,
7100
7202
  Yi as canEvaluateModels,
7101
7203
  Qi as convertCamelCaseToReadable,
7102
- qi as debounce,
7204
+ Bi as debounce,
7103
7205
  Fc as e,
7104
7206
  Jc as et,
7105
7207
  Uc as getCacheInfo,
7106
- Mi as getCurrentGeoLocation,
7107
- Os as getLayoutPaddingClass,
7108
- Cs as getMessageContaintWrapperClass,
7109
- me as graphQLRequest,
7208
+ xi as getCurrentGeoLocation,
7209
+ Cs as getLayoutPaddingClass,
7210
+ Os as getMessageContaintWrapperClass,
7211
+ ae as graphQLRequest,
7110
7212
  Je as h,
7111
7213
  Lc as handleServiceWorkerToggle,
7112
7214
  Ds as i,
@@ -7117,16 +7219,16 @@ export {
7117
7219
  Wi as isProbablyiPhone,
7118
7220
  Dt as isServiceWorkerEnabled,
7119
7221
  ks as isTauri,
7120
- xe as it,
7121
- ye as j,
7122
- Bc as j$1,
7222
+ Me as it,
7223
+ ge as j,
7224
+ qc as j$1,
7123
7225
  vo as l,
7124
7226
  ls as n,
7125
7227
  Ki as numberFormatter,
7126
- Ms as o,
7228
+ xs as o,
7127
7229
  Di as obfuscate,
7128
7230
  jc as ot,
7129
- Bi as pluralize,
7231
+ qi as pluralize,
7130
7232
  He as r,
7131
7233
  Ui as renderDataAsList,
7132
7234
  zc as rt,
@@ -7140,11 +7242,14 @@ export {
7140
7242
  al as useChat,
7141
7243
  sl as useChatsHistory,
7142
7244
  cl as useChatsUsage,
7143
- hl as useDeleteAllMemories,
7245
+ hl as useDeleteAllActiveMemories,
7246
+ fl as useDeleteAllExpiredMemories,
7144
7247
  il as useDeleteChat,
7145
7248
  dl as useDeleteMemory,
7146
- fl as useEntitlements,
7147
- he as useQueryClient,
7249
+ yl as useEntitlements,
7250
+ ml as useExpiredMemories,
7251
+ se as useQueryClient,
7252
+ pl as useRestoreMemory,
7148
7253
  nl as useSaveChat,
7149
7254
  el as useServerCapabilities,
7150
7255
  ol as useToggleFavoriteChat,
@@ -7152,6 +7257,6 @@ export {
7152
7257
  rl as useUserChatStats,
7153
7258
  ll as useUserMemories,
7154
7259
  Ti as useUserPreferences,
7155
- ml as utilities,
7260
+ gl as utilities,
7156
7261
  Fs as x
7157
7262
  };