@versini/sassysaint 8.59.4 → 8.60.0

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 (26) hide show
  1. package/dist/chunks/{AboutChangelog.Ce5xKXvl.js → AboutChangelog.D7rARJQu.js} +2 -2
  2. package/dist/chunks/{AboutEntry.BIxJ0nBU.js → AboutEntry.2nf0TV4n.js} +5 -5
  3. package/dist/chunks/{App.C0TMLCXL.js → App.Ch8FU2zW.js} +17 -17
  4. package/dist/chunks/{Chart.Dm1awtwo.js → Chart.Iz1BoL-_.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.Dq5_Eygw.js → ChatBubbleAssistant.M4WRDuaw.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.BklufN6-.js → ChatBubbleUser.CJHFRmMF.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BG-EQekK.js → ChatHistoryTable.B2mRc_wV.js} +9 -9
  8. package/dist/chunks/{HistoryEntry.DEz9BkNK.js → HistoryEntry.71E6Pz_O.js} +3 -3
  9. package/dist/chunks/{ProfileEntry.DlK0mggZ.js → ProfileEntry.BWsYCeof.js} +2 -2
  10. package/dist/chunks/SettingsEntry.Qi5gQD0-.js +781 -0
  11. package/dist/chunks/{Table.DMMefioh.js → Table.SHD8KKEE.js} +2 -2
  12. package/dist/chunks/{UsageEntry.By1Tqk3d.js → UsageEntry.DPhNHm9B.js} +3 -3
  13. package/dist/chunks/UserMemoriesPanel.CT_7TJ_Z.js +208 -0
  14. package/dist/chunks/{index._DAcm-25.js → index.BBAApLM_.js} +1 -1
  15. package/dist/chunks/{index.Cnzsl-SW.js → index.BJqzFaBo.js} +2 -2
  16. package/dist/chunks/{index._ok9-Gz7.js → index.CEgF3L_6.js} +3 -3
  17. package/dist/chunks/{index.BQNxqtEh.js → index.CqKtw4TJ.js} +1 -1
  18. package/dist/chunks/{index.CowNGsFh.js → index.DG2NgWZ6.js} +1 -1
  19. package/dist/chunks/{index.DxCuShZW.js → index.DnHjiSVh.js} +604 -637
  20. package/dist/chunks/{index.B1gwgNLh.js → index.HkxzuofI.js} +1 -1
  21. package/dist/chunks/{useMarkdown.BF3V5ODx.js → useMarkdown.BBFa2GkT.js} +6 -6
  22. package/dist/components/SassySaint/SassySaint.js +1 -1
  23. package/dist/index.js +4 -4
  24. package/package.json +3 -3
  25. package/dist/chunks/SettingsEntry.DqU_B5BR.js +0 -430
  26. package/dist/chunks/UserMemoriesPanel.BaEGaQVG.js +0 -692
@@ -1,6 +1,6 @@
1
- import { jsx as h, jsxs as W, Fragment as Ir } from "react/jsx-runtime";
1
+ import { jsx as h, jsxs as q, Fragment as Ar } from "react/jsx-runtime";
2
2
  import * as H from "react";
3
- import oe, { createContext as xt, useReducer as _r, useCallback as Y, useRef as j, useEffect as q, useSyncExternalStore as _s, useContext as nt, useState as ie, useMemo as Je, useId as Rs, useLayoutEffect as Ye, Suspense as Cs, lazy as Os } from "react";
3
+ import ie, { createContext as xt, useReducer as Ir, useCallback as Y, useRef as j, useEffect as W, useSyncExternalStore as _s, useContext as at, useState as ne, useMemo as Je, useId as Rs, useLayoutEffect as Qe, Suspense as Cs, lazy as Os } from "react";
4
4
  import y from "clsx";
5
5
  var ke = class {
6
6
  constructor() {
@@ -73,16 +73,16 @@ function $s(e, t) {
73
73
  function Tt(e) {
74
74
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
75
75
  }
76
- function Rr(e, t) {
76
+ function _r(e, t) {
77
77
  return Math.max(e + (t || 0) - Date.now(), 0);
78
78
  }
79
79
  function de(e, t) {
80
80
  return typeof e == "function" ? e(t) : e;
81
81
  }
82
- function Q(e, t) {
82
+ function J(e, t) {
83
83
  return typeof e == "function" ? e(t) : e;
84
84
  }
85
- function Yt(e, t) {
85
+ function Qt(e, t) {
86
86
  const {
87
87
  type: r = "all",
88
88
  exact: s,
@@ -93,7 +93,7 @@ function Yt(e, t) {
93
93
  } = e;
94
94
  if (i) {
95
95
  if (s) {
96
- if (t.queryHash !== Mt(i, t.options))
96
+ if (t.queryHash !== Dt(i, t.options))
97
97
  return !1;
98
98
  } else if (!xe(t.queryKey, i))
99
99
  return !1;
@@ -105,7 +105,7 @@ function Yt(e, t) {
105
105
  }
106
106
  return !(typeof o == "boolean" && t.isStale() !== o || a && a !== t.state.fetchStatus || n && !n(t));
107
107
  }
108
- function zt(e, t) {
108
+ function Yt(e, t) {
109
109
  const { exact: r, status: s, predicate: a, mutationKey: n } = e;
110
110
  if (n) {
111
111
  if (!t.options.mutationKey)
@@ -118,7 +118,7 @@ function zt(e, t) {
118
118
  }
119
119
  return !(s && t.state.status !== s || a && !a(t));
120
120
  }
121
- function Mt(e, t) {
121
+ function Dt(e, t) {
122
122
  return (t?.queryKeyHashFn || pe)(e);
123
123
  }
124
124
  function pe(e) {
@@ -134,7 +134,7 @@ var xs = Object.prototype.hasOwnProperty;
134
134
  function At(e, t) {
135
135
  if (e === t)
136
136
  return e;
137
- const r = Xt(e) && Xt(t);
137
+ const r = zt(e) && zt(t);
138
138
  if (!r && !(It(e) && It(t))) return t;
139
139
  const a = (r ? e : Object.keys(e)).length, n = r ? t : Object.keys(t), i = n.length, o = r ? new Array(i) : {};
140
140
  let c = 0;
@@ -153,7 +153,7 @@ function At(e, t) {
153
153
  }
154
154
  return a === i && c === a ? e : o;
155
155
  }
156
- function ze(e, t) {
156
+ function Ye(e, t) {
157
157
  if (!t || Object.keys(e).length !== Object.keys(t).length)
158
158
  return !1;
159
159
  for (const r in e)
@@ -161,22 +161,22 @@ function ze(e, t) {
161
161
  return !1;
162
162
  return !0;
163
163
  }
164
- function Xt(e) {
164
+ function zt(e) {
165
165
  return Array.isArray(e) && e.length === Object.keys(e).length;
166
166
  }
167
167
  function It(e) {
168
- if (!Zt(e))
168
+ if (!Xt(e))
169
169
  return !1;
170
170
  const t = e.constructor;
171
171
  if (t === void 0)
172
172
  return !0;
173
173
  const r = t.prototype;
174
- return !(!Zt(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
174
+ return !(!Xt(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
175
175
  }
176
- function Zt(e) {
176
+ function Xt(e) {
177
177
  return Object.prototype.toString.call(e) === "[object Object]";
178
178
  }
179
- function Ms(e) {
179
+ function Ds(e) {
180
180
  return new Promise((t) => {
181
181
  fe.setTimeout(t, e);
182
182
  });
@@ -197,7 +197,7 @@ function _t(e, t, r) {
197
197
  }
198
198
  return t;
199
199
  }
200
- function Ds(e, t, r = 0) {
200
+ function Ms(e, t, r = 0) {
201
201
  const s = [...e, t];
202
202
  return r && s.length > r ? s.slice(1) : s;
203
203
  }
@@ -205,13 +205,13 @@ function Ls(e, t, r = 0) {
205
205
  const s = [t, ...e];
206
206
  return r && s.length > r ? s.slice(0, -1) : s;
207
207
  }
208
- var Xe = Symbol();
209
- function Cr(e, t) {
210
- return process.env.NODE_ENV !== "production" && e.queryFn === Xe && console.error(
208
+ var ze = Symbol();
209
+ function Rr(e, t) {
210
+ return process.env.NODE_ENV !== "production" && e.queryFn === ze && console.error(
211
211
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
212
- ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === Xe ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
212
+ ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === ze ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
213
213
  }
214
- function Or(e, t) {
214
+ function Cr(e, t) {
215
215
  return typeof e == "function" ? e(...t) : !!e;
216
216
  }
217
217
  var Us = class extends ke {
@@ -251,7 +251,7 @@ var Us = class extends ke {
251
251
  isFocused() {
252
252
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
253
253
  }
254
- }, Dt = new Us();
254
+ }, Mt = new Us();
255
255
  function Rt() {
256
256
  let e, t;
257
257
  const r = new Promise((a, n) => {
@@ -365,19 +365,19 @@ var $ = Hs(), Ks = class extends ke {
365
365
  isOnline() {
366
366
  return this.#e;
367
367
  }
368
- }, Ze = new Ks();
368
+ }, Xe = new Ks();
369
369
  function Gs(e) {
370
370
  return Math.min(1e3 * 2 ** e, 3e4);
371
371
  }
372
- function kr(e) {
373
- return (e ?? "online") === "online" ? Ze.isOnline() : !0;
372
+ function Or(e) {
373
+ return (e ?? "online") === "online" ? Xe.isOnline() : !0;
374
374
  }
375
375
  var Ct = class extends Error {
376
376
  constructor(e) {
377
377
  super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
378
378
  }
379
379
  };
380
- function Nr(e) {
380
+ function kr(e) {
381
381
  let t = !1, r = 0, s;
382
382
  const a = Rt(), n = () => a.status !== "pending", i = (g) => {
383
383
  if (!n()) {
@@ -388,7 +388,7 @@ function Nr(e) {
388
388
  t = !0;
389
389
  }, c = () => {
390
390
  t = !1;
391
- }, f = () => Dt.isFocused() && (e.networkMode === "always" || Ze.isOnline()) && e.canRun(), d = () => kr(e.networkMode) && e.canRun(), u = (g) => {
391
+ }, f = () => Mt.isFocused() && (e.networkMode === "always" || Xe.isOnline()) && e.canRun(), d = () => Or(e.networkMode) && e.canRun(), u = (g) => {
392
392
  n() || (s?.(), a.resolve(g));
393
393
  }, l = (g) => {
394
394
  n() || (s?.(), a.reject(g));
@@ -416,7 +416,7 @@ function Nr(e) {
416
416
  l(E);
417
417
  return;
418
418
  }
419
- r++, e.onFail?.(r, E), Ms(K).then(() => f() ? void 0 : m()).then(() => {
419
+ r++, e.onFail?.(r, E), Ds(K).then(() => f() ? void 0 : m()).then(() => {
420
420
  t ? l(E) : p();
421
421
  });
422
422
  });
@@ -432,7 +432,7 @@ function Nr(e) {
432
432
  start: () => (d() ? p() : m().then(p), a)
433
433
  };
434
434
  }
435
- var Pr = class {
435
+ var Nr = class {
436
436
  #e;
437
437
  destroy() {
438
438
  this.clearGcTimeout();
@@ -451,7 +451,7 @@ var Pr = class {
451
451
  clearGcTimeout() {
452
452
  this.#e && (fe.clearTimeout(this.#e), this.#e = void 0);
453
453
  }
454
- }, Bs = class extends Pr {
454
+ }, Bs = class extends Nr {
455
455
  #e;
456
456
  #t;
457
457
  #r;
@@ -460,7 +460,7 @@ var Pr = class {
460
460
  #i;
461
461
  #o;
462
462
  constructor(e) {
463
- super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#a = e.client, this.#r = this.#a.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = er(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
463
+ super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#a = e.client, this.#r = this.#a.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = Zt(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
464
464
  }
465
465
  get meta() {
466
466
  return this.options.meta;
@@ -470,7 +470,7 @@ var Pr = class {
470
470
  }
471
471
  setOptions(e) {
472
472
  if (this.options = { ...this.#i, ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
473
- const t = er(this.options);
473
+ const t = Zt(this.options);
474
474
  t.data !== void 0 && (this.setData(t.data, {
475
475
  updatedAt: t.dataUpdatedAt,
476
476
  manual: !0
@@ -504,11 +504,11 @@ var Pr = class {
504
504
  }
505
505
  isActive() {
506
506
  return this.observers.some(
507
- (e) => Q(e.options.enabled, this) !== !1
507
+ (e) => J(e.options.enabled, this) !== !1
508
508
  );
509
509
  }
510
510
  isDisabled() {
511
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === Xe || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
511
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === ze || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
512
512
  }
513
513
  isStatic() {
514
514
  return this.getObserversCount() > 0 ? this.observers.some(
@@ -521,7 +521,7 @@ var Pr = class {
521
521
  ) : this.state.data === void 0 || this.state.isInvalidated;
522
522
  }
523
523
  isStaleByTime(e = 0) {
524
- return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !Rr(this.state.dataUpdatedAt, e);
524
+ return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !_r(this.state.dataUpdatedAt, e);
525
525
  }
526
526
  onFocus() {
527
527
  this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#s?.continue();
@@ -564,7 +564,7 @@ var Pr = class {
564
564
  get: () => (this.#o = !0, r.signal)
565
565
  });
566
566
  }, a = () => {
567
- const o = Cr(this.options, t), f = (() => {
567
+ const o = Rr(this.options, t), f = (() => {
568
568
  const d = {
569
569
  client: this.#a,
570
570
  queryKey: this.queryKey,
@@ -588,7 +588,7 @@ var Pr = class {
588
588
  };
589
589
  return s(o), o;
590
590
  })();
591
- this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#n({ type: "fetch", meta: i.fetchOptions?.meta }), this.#s = Nr({
591
+ this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#n({ type: "fetch", meta: i.fetchOptions?.meta }), this.#s = kr({
592
592
  initialPromise: t?.initialPromise,
593
593
  fn: i.fetchFn,
594
594
  onCancel: (o) => {
@@ -669,7 +669,7 @@ var Pr = class {
669
669
  case "fetch":
670
670
  return {
671
671
  ...r,
672
- ...$r(r.data, this.options),
672
+ ...Pr(r.data, this.options),
673
673
  fetchMeta: e.meta ?? null
674
674
  };
675
675
  case "success":
@@ -719,18 +719,18 @@ var Pr = class {
719
719
  });
720
720
  }
721
721
  };
722
- function $r(e, t) {
722
+ function Pr(e, t) {
723
723
  return {
724
724
  fetchFailureCount: 0,
725
725
  fetchFailureReason: null,
726
- fetchStatus: kr(t.networkMode) ? "fetching" : "paused",
726
+ fetchStatus: Or(t.networkMode) ? "fetching" : "paused",
727
727
  ...e === void 0 && {
728
728
  error: null,
729
729
  status: "pending"
730
730
  }
731
731
  };
732
732
  }
733
- function er(e) {
733
+ function Zt(e) {
734
734
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, r = t !== void 0, s = r ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
735
735
  return {
736
736
  data: t,
@@ -747,7 +747,7 @@ function er(e) {
747
747
  fetchStatus: "idle"
748
748
  };
749
749
  }
750
- var qs = class extends ke {
750
+ var Ws = class extends ke {
751
751
  constructor(e, t) {
752
752
  super(), this.options = t, this.#e = e, this.#n = null, this.#o = Rt(), this.bindMethods(), this.setOptions(t);
753
753
  }
@@ -772,7 +772,7 @@ var qs = class extends ke {
772
772
  this.refetch = this.refetch.bind(this);
773
773
  }
774
774
  onSubscribe() {
775
- this.listeners.size === 1 && (this.#t.addObserver(this), tr(this.#t, this.options) ? this.#d() : this.updateResult(), this.#E());
775
+ this.listeners.size === 1 && (this.#t.addObserver(this), er(this.#t, this.options) ? this.#d() : this.updateResult(), this.#E());
776
776
  }
777
777
  onUnsubscribe() {
778
778
  this.hasListeners() || this.destroy();
@@ -796,24 +796,24 @@ var qs = class extends ke {
796
796
  }
797
797
  setOptions(e) {
798
798
  const t = this.options, r = this.#t;
799
- if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Q(this.options.enabled, this.#t) != "boolean")
799
+ if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof J(this.options.enabled, this.#t) != "boolean")
800
800
  throw new Error(
801
801
  "Expected enabled to be a boolean or a callback that returns a boolean"
802
802
  );
803
- this.#v(), this.#t.setOptions(this.options), t._defaulted && !ze(this.options, t) && this.#e.getQueryCache().notify({
803
+ this.#v(), this.#t.setOptions(this.options), t._defaulted && !Ye(this.options, t) && this.#e.getQueryCache().notify({
804
804
  type: "observerOptionsUpdated",
805
805
  query: this.#t,
806
806
  observer: this
807
807
  });
808
808
  const s = this.hasListeners();
809
- s && rr(
809
+ s && tr(
810
810
  this.#t,
811
811
  r,
812
812
  this.options,
813
813
  t
814
- ) && this.#d(), this.updateResult(), s && (this.#t !== r || Q(this.options.enabled, this.#t) !== Q(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 || J(this.options.enabled, this.#t) !== J(t.enabled, this.#t) || de(this.options.staleTime, this.#t) !== de(t.staleTime, this.#t)) && this.#y();
815
815
  const a = this.#g();
816
- s && (this.#t !== r || Q(this.options.enabled, this.#t) !== Q(t.enabled, this.#t) || a !== this.#c) && this.#b(a);
816
+ s && (this.#t !== r || J(this.options.enabled, this.#t) !== J(t.enabled, this.#t) || a !== this.#c) && this.#b(a);
817
817
  }
818
818
  getOptimisticResult(e) {
819
819
  const t = this.#e.getQueryCache().build(this.#e, e), r = this.createResult(t, e);
@@ -868,7 +868,7 @@ var qs = class extends ke {
868
868
  );
869
869
  if (me || this.#a.isStale || !Tt(e))
870
870
  return;
871
- const r = Rr(this.#a.dataUpdatedAt, e) + 1;
871
+ const r = _r(this.#a.dataUpdatedAt, e) + 1;
872
872
  this.#l = fe.setTimeout(() => {
873
873
  this.#a.isStale || this.updateResult();
874
874
  }, r);
@@ -877,8 +877,8 @@ var qs = class extends ke {
877
877
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
878
878
  }
879
879
  #b(e) {
880
- this.#S(), this.#c = e, !(me || Q(this.options.enabled, this.#t) === !1 || !Tt(this.#c) || this.#c === 0) && (this.#u = fe.setInterval(() => {
881
- (this.options.refetchIntervalInBackground || Dt.isFocused()) && this.#d();
880
+ this.#S(), this.#c = e, !(me || J(this.options.enabled, this.#t) === !1 || !Tt(this.#c) || this.#c === 0) && (this.#u = fe.setInterval(() => {
881
+ (this.options.refetchIntervalInBackground || Mt.isFocused()) && this.#d();
882
882
  }, this.#c));
883
883
  }
884
884
  #E() {
@@ -894,10 +894,10 @@ var qs = class extends ke {
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 && tr(e, t), _ = v && rr(e, r, t, s);
897
+ const v = this.hasListeners(), x = !v && er(e, t), _ = v && tr(e, r, t, s);
898
898
  (x || _) && (d = {
899
899
  ...d,
900
- ...$r(f.data, e.options)
900
+ ...Pr(f.data, e.options)
901
901
  }), t._optimisticResults === "isRestoring" && (d.fetchStatus = "idle");
902
902
  }
903
903
  let { error: m, errorUpdatedAt: p, status: g } = d;
@@ -950,7 +950,7 @@ var qs = class extends ke {
950
950
  isStale: Lt(e, t),
951
951
  refetch: this.refetch,
952
952
  promise: this.#o,
953
- isEnabled: Q(t.enabled, e) !== !1
953
+ isEnabled: J(t.enabled, e) !== !1
954
954
  };
955
955
  if (this.options.experimental_prefetchInRender) {
956
956
  const v = (I) => {
@@ -975,7 +975,7 @@ var qs = class extends ke {
975
975
  }
976
976
  updateResult() {
977
977
  const e = this.#a, t = this.createResult(this.#t, this.options);
978
- if (this.#s = this.#t.state, this.#i = this.options, this.#s.data !== void 0 && (this.#f = this.#t), ze(t, e))
978
+ if (this.#s = this.#t.state, this.#i = this.options, this.#s.data !== void 0 && (this.#f = this.#t), Ye(t, e))
979
979
  return;
980
980
  this.#a = t;
981
981
  const r = () => {
@@ -1015,29 +1015,29 @@ var qs = class extends ke {
1015
1015
  });
1016
1016
  }
1017
1017
  };
1018
- function Ws(e, t) {
1019
- return Q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1018
+ function qs(e, t) {
1019
+ return J(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1020
1020
  }
1021
- function tr(e, t) {
1022
- return Ws(e, t) || e.state.data !== void 0 && Ot(e, t, t.refetchOnMount);
1021
+ function er(e, t) {
1022
+ return qs(e, t) || e.state.data !== void 0 && Ot(e, t, t.refetchOnMount);
1023
1023
  }
1024
1024
  function Ot(e, t, r) {
1025
- if (Q(t.enabled, e) !== !1 && de(t.staleTime, e) !== "static") {
1025
+ if (J(t.enabled, e) !== !1 && de(t.staleTime, e) !== "static") {
1026
1026
  const s = typeof r == "function" ? r(e) : r;
1027
1027
  return s === "always" || s !== !1 && Lt(e, t);
1028
1028
  }
1029
1029
  return !1;
1030
1030
  }
1031
- function rr(e, t, r, s) {
1032
- return (e !== t || Q(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Lt(e, r);
1031
+ function tr(e, t, r, s) {
1032
+ return (e !== t || J(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Lt(e, r);
1033
1033
  }
1034
1034
  function Lt(e, t) {
1035
- return Q(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
1035
+ return J(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
1036
1036
  }
1037
1037
  function js(e, t) {
1038
- return !ze(e.getCurrentResult(), t);
1038
+ return !Ye(e.getCurrentResult(), t);
1039
1039
  }
1040
- function sr(e) {
1040
+ function rr(e) {
1041
1041
  return {
1042
1042
  onFetch: (t, r) => {
1043
1043
  const s = t.options, a = t.fetchOptions?.meta?.fetchMore?.direction, n = t.state.data?.pages || [], i = t.state.data?.pageParams || [];
@@ -1051,28 +1051,28 @@ function sr(e) {
1051
1051
  d = !0;
1052
1052
  }), t.signal)
1053
1053
  });
1054
- }, l = Cr(t.options, t.fetchOptions), m = async (p, g, b) => {
1054
+ }, l = Rr(t.options, t.fetchOptions), m = async (p, g, b) => {
1055
1055
  if (d)
1056
1056
  return Promise.reject();
1057
1057
  if (g == null && p.pages.length)
1058
1058
  return Promise.resolve(p);
1059
1059
  const O = (() => {
1060
- const J = {
1060
+ const Q = {
1061
1061
  client: t.client,
1062
1062
  queryKey: t.queryKey,
1063
1063
  pageParam: g,
1064
1064
  direction: b ? "backward" : "forward",
1065
1065
  meta: t.options.meta
1066
1066
  };
1067
- return u(J), J;
1068
- })(), A = await l(O), { maxPages: K } = t.options, R = b ? Ls : Ds;
1067
+ return u(Q), Q;
1068
+ })(), A = await l(O), { maxPages: K } = t.options, R = b ? Ls : Ms;
1069
1069
  return {
1070
1070
  pages: R(p.pages, A, K),
1071
1071
  pageParams: R(p.pageParams, g, K)
1072
1072
  };
1073
1073
  };
1074
1074
  if (a && n.length) {
1075
- const p = a === "backward", g = p ? Vs : ar, b = {
1075
+ const p = a === "backward", g = p ? Vs : sr, b = {
1076
1076
  pages: n,
1077
1077
  pageParams: i
1078
1078
  }, E = g(s, b);
@@ -1080,7 +1080,7 @@ function sr(e) {
1080
1080
  } else {
1081
1081
  const p = e ?? n.length;
1082
1082
  do {
1083
- const g = c === 0 ? i[0] ?? s.initialPageParam : ar(s, o);
1083
+ const g = c === 0 ? i[0] ?? s.initialPageParam : sr(s, o);
1084
1084
  if (c > 0 && g == null)
1085
1085
  break;
1086
1086
  o = await m(o, g), c++;
@@ -1101,7 +1101,7 @@ function sr(e) {
1101
1101
  }
1102
1102
  };
1103
1103
  }
1104
- function ar(e, { pages: t, pageParams: r }) {
1104
+ function sr(e, { pages: t, pageParams: r }) {
1105
1105
  const s = t.length - 1;
1106
1106
  return t.length > 0 ? e.getNextPageParam(
1107
1107
  t[s],
@@ -1113,13 +1113,13 @@ function ar(e, { pages: t, pageParams: r }) {
1113
1113
  function Vs(e, { pages: t, pageParams: r }) {
1114
1114
  return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, r[0], r) : void 0;
1115
1115
  }
1116
- var Qs = class extends Pr {
1116
+ var Js = class extends Nr {
1117
1117
  #e;
1118
1118
  #t;
1119
1119
  #r;
1120
1120
  #a;
1121
1121
  constructor(e) {
1122
- super(), this.#e = e.client, this.mutationId = e.mutationId, this.#r = e.mutationCache, this.#t = [], this.state = e.state || xr(), this.setOptions(e.options), this.scheduleGc();
1122
+ super(), this.#e = e.client, this.mutationId = e.mutationId, this.#r = e.mutationCache, this.#t = [], this.state = e.state || $r(), this.setOptions(e.options), this.scheduleGc();
1123
1123
  }
1124
1124
  setOptions(e) {
1125
1125
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -1156,7 +1156,7 @@ var Qs = class extends Pr {
1156
1156
  meta: this.options.meta,
1157
1157
  mutationKey: this.options.mutationKey
1158
1158
  };
1159
- this.#a = Nr({
1159
+ this.#a = kr({
1160
1160
  fn: () => this.options.mutationFn ? this.options.mutationFn(e, r) : Promise.reject(new Error("No mutationFn found")),
1161
1161
  onFail: (n, i) => {
1162
1162
  this.#s({ type: "failed", failureCount: n, error: i });
@@ -1316,7 +1316,7 @@ var Qs = class extends Pr {
1316
1316
  });
1317
1317
  }
1318
1318
  };
1319
- function xr() {
1319
+ function $r() {
1320
1320
  return {
1321
1321
  context: void 0,
1322
1322
  data: void 0,
@@ -1329,7 +1329,7 @@ function xr() {
1329
1329
  submittedAt: 0
1330
1330
  };
1331
1331
  }
1332
- var Js = class extends ke {
1332
+ var Qs = class extends ke {
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
  }
@@ -1337,7 +1337,7 @@ var Js = class extends ke {
1337
1337
  #t;
1338
1338
  #r;
1339
1339
  build(e, t, r) {
1340
- const s = new Qs({
1340
+ const s = new Js({
1341
1341
  client: e,
1342
1342
  mutationCache: this,
1343
1343
  mutationId: ++this.#r,
@@ -1348,7 +1348,7 @@ var Js = class extends ke {
1348
1348
  }
1349
1349
  add(e) {
1350
1350
  this.#e.add(e);
1351
- const t = Fe(e);
1351
+ const t = Ue(e);
1352
1352
  if (typeof t == "string") {
1353
1353
  const r = this.#t.get(t);
1354
1354
  r ? r.push(e) : this.#t.set(t, [e]);
@@ -1357,7 +1357,7 @@ var Js = class extends ke {
1357
1357
  }
1358
1358
  remove(e) {
1359
1359
  if (this.#e.delete(e)) {
1360
- const t = Fe(e);
1360
+ const t = Ue(e);
1361
1361
  if (typeof t == "string") {
1362
1362
  const r = this.#t.get(t);
1363
1363
  if (r)
@@ -1370,7 +1370,7 @@ var Js = class extends ke {
1370
1370
  this.notify({ type: "removed", mutation: e });
1371
1371
  }
1372
1372
  canRun(e) {
1373
- const t = Fe(e);
1373
+ const t = Ue(e);
1374
1374
  if (typeof t == "string") {
1375
1375
  const s = this.#t.get(t)?.find(
1376
1376
  (a) => a.state.status === "pending"
@@ -1380,7 +1380,7 @@ var Js = class extends ke {
1380
1380
  return !0;
1381
1381
  }
1382
1382
  runNext(e) {
1383
- const t = Fe(e);
1383
+ const t = Ue(e);
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() {
@@ -1396,11 +1396,11 @@ var Js = class extends ke {
1396
1396
  find(e) {
1397
1397
  const t = { exact: !0, ...e };
1398
1398
  return this.getAll().find(
1399
- (r) => zt(t, r)
1399
+ (r) => Yt(t, r)
1400
1400
  );
1401
1401
  }
1402
1402
  findAll(e = {}) {
1403
- return this.getAll().filter((t) => zt(e, t));
1403
+ return this.getAll().filter((t) => Yt(e, t));
1404
1404
  }
1405
1405
  notify(e) {
1406
1406
  $.batch(() => {
@@ -1418,7 +1418,7 @@ var Js = class extends ke {
1418
1418
  );
1419
1419
  }
1420
1420
  };
1421
- function Fe(e) {
1421
+ function Ue(e) {
1422
1422
  return e.options.scope?.id;
1423
1423
  }
1424
1424
  var Ys = class extends ke {
@@ -1434,7 +1434,7 @@ var Ys = class extends ke {
1434
1434
  }
1435
1435
  setOptions(e) {
1436
1436
  const t = this.options;
1437
- this.options = this.#e.defaultMutationOptions(e), ze(this.options, t) || this.#e.getMutationCache().notify({
1437
+ this.options = this.#e.defaultMutationOptions(e), Ye(this.options, t) || this.#e.getMutationCache().notify({
1438
1438
  type: "observerOptionsUpdated",
1439
1439
  mutation: this.#r,
1440
1440
  observer: this
@@ -1456,7 +1456,7 @@ var Ys = class extends ke {
1456
1456
  return this.#a = t, this.#r?.removeObserver(this), this.#r = this.#e.getMutationCache().build(this.#e, this.options), this.#r.addObserver(this), this.#r.execute(e);
1457
1457
  }
1458
1458
  #s() {
1459
- const e = this.#r?.state ?? xr();
1459
+ const e = this.#r?.state ?? $r();
1460
1460
  this.#t = {
1461
1461
  ...e,
1462
1462
  isPending: e.status === "pending",
@@ -1510,7 +1510,7 @@ var Ys = class extends ke {
1510
1510
  }
1511
1511
  #e;
1512
1512
  build(e, t, r) {
1513
- const s = t.queryKey, a = t.queryHash ?? Mt(s, t);
1513
+ const s = t.queryKey, a = t.queryHash ?? Dt(s, t);
1514
1514
  let n = this.get(a);
1515
1515
  return n || (n = new Bs({
1516
1516
  client: e,
@@ -1547,12 +1547,12 @@ var Ys = class extends ke {
1547
1547
  find(e) {
1548
1548
  const t = { exact: !0, ...e };
1549
1549
  return this.getAll().find(
1550
- (r) => Yt(t, r)
1550
+ (r) => Qt(t, r)
1551
1551
  );
1552
1552
  }
1553
1553
  findAll(e = {}) {
1554
1554
  const t = this.getAll();
1555
- return Object.keys(e).length > 0 ? t.filter((r) => Yt(e, r)) : t;
1555
+ return Object.keys(e).length > 0 ? t.filter((r) => Qt(e, r)) : t;
1556
1556
  }
1557
1557
  notify(e) {
1558
1558
  $.batch(() => {
@@ -1585,12 +1585,12 @@ var Ys = class extends ke {
1585
1585
  #o;
1586
1586
  #n;
1587
1587
  constructor(e = {}) {
1588
- this.#e = e.queryCache || new zs(), this.#t = e.mutationCache || new Js(), this.#r = e.defaultOptions || {}, this.#a = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#i = 0;
1588
+ this.#e = e.queryCache || new zs(), this.#t = e.mutationCache || new Qs(), this.#r = e.defaultOptions || {}, this.#a = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#i = 0;
1589
1589
  }
1590
1590
  mount() {
1591
- this.#i++, this.#i === 1 && (this.#o = Dt.subscribe(async (e) => {
1591
+ this.#i++, this.#i === 1 && (this.#o = Mt.subscribe(async (e) => {
1592
1592
  e && (await this.resumePausedMutations(), this.#e.onFocus());
1593
- }), this.#n = Ze.subscribe(async (e) => {
1593
+ }), this.#n = Xe.subscribe(async (e) => {
1594
1594
  e && (await this.resumePausedMutations(), this.#e.onOnline());
1595
1595
  }));
1596
1596
  }
@@ -1706,16 +1706,16 @@ var Ys = class extends ke {
1706
1706
  return this.fetchQuery(e).then(B).catch(B);
1707
1707
  }
1708
1708
  fetchInfiniteQuery(e) {
1709
- return e.behavior = sr(e.pages), this.fetchQuery(e);
1709
+ return e.behavior = rr(e.pages), this.fetchQuery(e);
1710
1710
  }
1711
1711
  prefetchInfiniteQuery(e) {
1712
1712
  return this.fetchInfiniteQuery(e).then(B).catch(B);
1713
1713
  }
1714
1714
  ensureInfiniteQueryData(e) {
1715
- return e.behavior = sr(e.pages), this.ensureQueryData(e);
1715
+ return e.behavior = rr(e.pages), this.ensureQueryData(e);
1716
1716
  }
1717
1717
  resumePausedMutations() {
1718
- return Ze.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
1718
+ return Xe.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
1719
1719
  }
1720
1720
  getQueryCache() {
1721
1721
  return this.#e;
@@ -1762,10 +1762,10 @@ var Ys = class extends ke {
1762
1762
  ...e,
1763
1763
  _defaulted: !0
1764
1764
  };
1765
- return t.queryHash || (t.queryHash = Mt(
1765
+ return t.queryHash || (t.queryHash = Dt(
1766
1766
  t.queryKey,
1767
1767
  t
1768
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === Xe && (t.enabled = !1), t;
1768
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === ze && (t.enabled = !1), t;
1769
1769
  }
1770
1770
  defaultMutationOptions(e) {
1771
1771
  return e?._defaulted ? e : {
@@ -1778,10 +1778,10 @@ var Ys = class extends ke {
1778
1778
  clear() {
1779
1779
  this.#e.clear(), this.#t.clear();
1780
1780
  }
1781
- }, Mr = H.createContext(
1781
+ }, xr = H.createContext(
1782
1782
  void 0
1783
- ), Le = (e) => {
1784
- const t = H.useContext(Mr);
1783
+ ), nt = (e) => {
1784
+ const t = H.useContext(xr);
1785
1785
  if (!t)
1786
1786
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1787
1787
  return t;
@@ -1790,7 +1790,7 @@ var Ys = class extends ke {
1790
1790
  children: t
1791
1791
  }) => (H.useEffect(() => (e.mount(), () => {
1792
1792
  e.unmount();
1793
- }), [e]), /* @__PURE__ */ h(Mr.Provider, { value: e, children: t })), ea = H.createContext(!1), ta = () => H.useContext(ea);
1793
+ }), [e]), /* @__PURE__ */ h(xr.Provider, { value: e, children: t })), ea = H.createContext(!1), ta = () => H.useContext(ea);
1794
1794
  function ra() {
1795
1795
  let e = !1;
1796
1796
  return {
@@ -1815,7 +1815,7 @@ var sa = H.createContext(ra()), aa = () => H.useContext(sa), na = (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 || Or(r, [e.error, s])), ca = (e) => {
1818
+ }) => e.isError && !t.isReset() && !e.isFetching && s && (a && e.data === void 0 || Cr(r, [e.error, s])), ca = (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 sa = H.createContext(ra()), aa = () => H.useContext(sa), na = (e, t) => {
1823
1823
  1e3
1824
1824
  ));
1825
1825
  }
1826
- }, la = (e, t) => e.isLoading && e.isFetching && !t, ua = (e, t) => e?.suspense && t.isPending, nr = (e, t, r) => t.fetchOptimistic(e).catch(() => {
1826
+ }, la = (e, t) => e.isLoading && e.isFetching && !t, ua = (e, t) => e?.suspense && t.isPending, ar = (e, t, r) => t.fetchOptimistic(e).catch(() => {
1827
1827
  r.clearReset();
1828
1828
  });
1829
1829
  function da(e, t, r) {
@@ -1831,7 +1831,7 @@ function da(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 = ta(), a = aa(), n = Le(), i = n.defaultQueryOptions(e);
1834
+ const s = ta(), a = aa(), n = nt(), 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(
@@ -1856,7 +1856,7 @@ function da(e, t, r) {
1856
1856
  ), H.useEffect(() => {
1857
1857
  c.setOptions(i);
1858
1858
  }, [i, c]), ua(i, f))
1859
- throw nr(i, c, a);
1859
+ throw ar(i, c, a);
1860
1860
  if (oa({
1861
1861
  result: f,
1862
1862
  errorResetBoundary: a,
@@ -1870,7 +1870,7 @@ function da(e, t, r) {
1870
1870
  f
1871
1871
  ), i.experimental_prefetchInRender && !me && la(f, s) && (o ? (
1872
1872
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1873
- nr(i, c, a)
1873
+ ar(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
@@ -1878,11 +1878,11 @@ function da(e, t, r) {
1878
1878
  c.updateResult();
1879
1879
  }), i.notifyOnChangeProps ? f : c.trackResult(f);
1880
1880
  }
1881
- function ge(e, t) {
1882
- return da(e, qs);
1881
+ function ye(e, t) {
1882
+ return da(e, Ws);
1883
1883
  }
1884
- function Ut(e, t) {
1885
- const r = Le(), [s] = H.useState(
1884
+ function Dr(e, t) {
1885
+ const r = nt(), [s] = H.useState(
1886
1886
  () => new Ys(
1887
1887
  r,
1888
1888
  e
@@ -1904,7 +1904,7 @@ function Ut(e, t) {
1904
1904
  },
1905
1905
  [s]
1906
1906
  );
1907
- if (a.error && Or(s.options.throwOnError, [a.error]))
1907
+ if (a.error && Cr(s.options.throwOnError, [a.error]))
1908
1908
  throw a.error;
1909
1909
  return { ...a, mutate: n, mutateAsync: a.mutate };
1910
1910
  }
@@ -1925,7 +1925,7 @@ const Pe = {
1925
1925
  CODE: "code",
1926
1926
  REFRESH_TOKEN: "refresh_token",
1927
1927
  PASSKEY: "passkey"
1928
- }, Dr = {
1928
+ }, Mr = {
1929
1929
  CLIENT_ID: "X-Auth-ClientId"
1930
1930
  }, F = {
1931
1931
  ALG: "RS256",
@@ -1948,7 +1948,7 @@ awIDAQAB
1948
1948
  LOGOUT: "logout",
1949
1949
  LOGIN: "login",
1950
1950
  REFRESH: "refresh"
1951
- }, He = new TextEncoder(), Oe = new TextDecoder();
1951
+ }, Fe = new TextEncoder(), Ce = new TextDecoder();
1952
1952
  function fa(...e) {
1953
1953
  const t = e.reduce((a, { length: n }) => a + n, 0), r = new Uint8Array(t);
1954
1954
  let s = 0;
@@ -1966,24 +1966,24 @@ function Lr(e) {
1966
1966
  }
1967
1967
  function $e(e) {
1968
1968
  if (Uint8Array.fromBase64)
1969
- return Uint8Array.fromBase64(typeof e == "string" ? e : Oe.decode(e), {
1969
+ return Uint8Array.fromBase64(typeof e == "string" ? e : Ce.decode(e), {
1970
1970
  alphabet: "base64url"
1971
1971
  });
1972
1972
  let t = e;
1973
- t instanceof Uint8Array && (t = Oe.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
1973
+ t instanceof Uint8Array && (t = Ce.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
1974
1974
  try {
1975
1975
  return Lr(t);
1976
1976
  } catch {
1977
1977
  throw new TypeError("The input to be decoded is not correctly encoded.");
1978
1978
  }
1979
1979
  }
1980
- let be = class extends Error {
1980
+ let ge = class extends Error {
1981
1981
  static code = "ERR_JOSE_GENERIC";
1982
1982
  code = "ERR_JOSE_GENERIC";
1983
1983
  constructor(t, r) {
1984
1984
  super(t, r), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
1985
1985
  }
1986
- }, X = class extends be {
1986
+ }, z = class extends ge {
1987
1987
  static code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
1988
1988
  code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
1989
1989
  claim;
@@ -1992,7 +1992,7 @@ let be = class extends Error {
1992
1992
  constructor(t, r, s = "unspecified", a = "unspecified") {
1993
1993
  super(t, { cause: { claim: s, reason: a, payload: r } }), this.claim = s, this.reason = a, this.payload = r;
1994
1994
  }
1995
- }, ir = class extends be {
1995
+ }, nr = class extends ge {
1996
1996
  static code = "ERR_JWT_EXPIRED";
1997
1997
  code = "ERR_JWT_EXPIRED";
1998
1998
  claim;
@@ -2001,32 +2001,30 @@ let be = class extends Error {
2001
2001
  constructor(t, r, s = "unspecified", a = "unspecified") {
2002
2002
  super(t, { cause: { claim: s, reason: a, payload: r } }), this.claim = s, this.reason = a, this.payload = r;
2003
2003
  }
2004
- }, ma = class extends be {
2004
+ }, ma = class extends ge {
2005
2005
  static code = "ERR_JOSE_ALG_NOT_ALLOWED";
2006
2006
  code = "ERR_JOSE_ALG_NOT_ALLOWED";
2007
- }, ne = class extends be {
2007
+ }, ae = class extends ge {
2008
2008
  static code = "ERR_JOSE_NOT_SUPPORTED";
2009
2009
  code = "ERR_JOSE_NOT_SUPPORTED";
2010
- };
2011
- class L extends be {
2010
+ }, L = class extends ge {
2012
2011
  static code = "ERR_JWS_INVALID";
2013
2012
  code = "ERR_JWS_INVALID";
2014
- }
2015
- let se = class extends be {
2013
+ }, re = class extends ge {
2016
2014
  static code = "ERR_JWT_INVALID";
2017
2015
  code = "ERR_JWT_INVALID";
2018
2016
  };
2019
- class pa extends be {
2017
+ class pa extends ge {
2020
2018
  static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2021
2019
  code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2022
2020
  constructor(t = "signature verification failed", r) {
2023
2021
  super(t, r);
2024
2022
  }
2025
2023
  }
2026
- function Z(e, t = "algorithm.name") {
2024
+ function X(e, t = "algorithm.name") {
2027
2025
  return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
2028
2026
  }
2029
- function ve(e, t) {
2027
+ function Se(e, t) {
2030
2028
  return e.name === t;
2031
2029
  }
2032
2030
  function ut(e) {
@@ -2053,54 +2051,54 @@ function ba(e, t, r) {
2053
2051
  case "HS256":
2054
2052
  case "HS384":
2055
2053
  case "HS512": {
2056
- if (!ve(e.algorithm, "HMAC"))
2057
- throw Z("HMAC");
2054
+ if (!Se(e.algorithm, "HMAC"))
2055
+ throw X("HMAC");
2058
2056
  const s = parseInt(t.slice(2), 10);
2059
2057
  if (ut(e.algorithm.hash) !== s)
2060
- throw Z(`SHA-${s}`, "algorithm.hash");
2058
+ throw X(`SHA-${s}`, "algorithm.hash");
2061
2059
  break;
2062
2060
  }
2063
2061
  case "RS256":
2064
2062
  case "RS384":
2065
2063
  case "RS512": {
2066
- if (!ve(e.algorithm, "RSASSA-PKCS1-v1_5"))
2067
- throw Z("RSASSA-PKCS1-v1_5");
2064
+ if (!Se(e.algorithm, "RSASSA-PKCS1-v1_5"))
2065
+ throw X("RSASSA-PKCS1-v1_5");
2068
2066
  const s = parseInt(t.slice(2), 10);
2069
2067
  if (ut(e.algorithm.hash) !== s)
2070
- throw Z(`SHA-${s}`, "algorithm.hash");
2068
+ throw X(`SHA-${s}`, "algorithm.hash");
2071
2069
  break;
2072
2070
  }
2073
2071
  case "PS256":
2074
2072
  case "PS384":
2075
2073
  case "PS512": {
2076
- if (!ve(e.algorithm, "RSA-PSS"))
2077
- throw Z("RSA-PSS");
2074
+ if (!Se(e.algorithm, "RSA-PSS"))
2075
+ throw X("RSA-PSS");
2078
2076
  const s = parseInt(t.slice(2), 10);
2079
2077
  if (ut(e.algorithm.hash) !== s)
2080
- throw Z(`SHA-${s}`, "algorithm.hash");
2078
+ throw X(`SHA-${s}`, "algorithm.hash");
2081
2079
  break;
2082
2080
  }
2083
2081
  case "Ed25519":
2084
2082
  case "EdDSA": {
2085
- if (!ve(e.algorithm, "Ed25519"))
2086
- throw Z("Ed25519");
2083
+ if (!Se(e.algorithm, "Ed25519"))
2084
+ throw X("Ed25519");
2087
2085
  break;
2088
2086
  }
2089
2087
  case "ML-DSA-44":
2090
2088
  case "ML-DSA-65":
2091
2089
  case "ML-DSA-87": {
2092
- if (!ve(e.algorithm, t))
2093
- throw Z(t);
2090
+ if (!Se(e.algorithm, t))
2091
+ throw X(t);
2094
2092
  break;
2095
2093
  }
2096
2094
  case "ES256":
2097
2095
  case "ES384":
2098
2096
  case "ES512": {
2099
- if (!ve(e.algorithm, "ECDSA"))
2100
- throw Z("ECDSA");
2097
+ if (!Se(e.algorithm, "ECDSA"))
2098
+ throw X("ECDSA");
2101
2099
  const s = ya(t);
2102
2100
  if (e.algorithm.namedCurve !== s)
2103
- throw Z(s, "algorithm.namedCurve");
2101
+ throw X(s, "algorithm.namedCurve");
2104
2102
  break;
2105
2103
  }
2106
2104
  default:
@@ -2147,7 +2145,7 @@ const Gr = (e) => Hr(e) || Kr(e), wa = (...e) => {
2147
2145
  function Sa(e) {
2148
2146
  return typeof e == "object" && e !== null;
2149
2147
  }
2150
- const Me = (e) => {
2148
+ const De = (e) => {
2151
2149
  if (!Sa(e) || Object.prototype.toString.call(e) !== "[object Object]")
2152
2150
  return !1;
2153
2151
  if (Object.getPrototypeOf(e) === null)
@@ -2169,7 +2167,7 @@ const Me = (e) => {
2169
2167
  if (e[r] !== t[r])
2170
2168
  return !1;
2171
2169
  return !0;
2172
- }, Ta = (e) => ({ data: e, pos: 0 }), et = (e) => {
2170
+ }, Ta = (e) => ({ data: e, pos: 0 }), Ze = (e) => {
2173
2171
  const t = e.data[e.pos++];
2174
2172
  if (t & 128) {
2175
2173
  const r = t & 127;
@@ -2179,20 +2177,20 @@ const Me = (e) => {
2179
2177
  return s;
2180
2178
  }
2181
2179
  return t;
2182
- }, tt = (e, t, r) => {
2180
+ }, et = (e, t, r) => {
2183
2181
  if (e.data[e.pos++] !== t)
2184
2182
  throw new Error(r);
2185
2183
  }, Br = (e, t) => {
2186
2184
  const r = e.data.subarray(e.pos, e.pos + t);
2187
2185
  return e.pos += t, r;
2188
2186
  }, Aa = (e) => {
2189
- tt(e, 6, "Expected algorithm OID");
2190
- const t = et(e);
2187
+ et(e, 6, "Expected algorithm OID");
2188
+ const t = Ze(e);
2191
2189
  return Br(e, t);
2192
2190
  };
2193
2191
  function Ia(e) {
2194
- tt(e, 48, "Invalid SPKI structure"), et(e), tt(e, 48, "Expected algorithm identifier");
2195
- const t = et(e);
2192
+ et(e, 48, "Invalid SPKI structure"), Ze(e), et(e, 48, "Expected algorithm identifier");
2193
+ const t = Ze(e);
2196
2194
  return { algIdStart: e.pos, algIdLength: t };
2197
2195
  }
2198
2196
  const _a = (e) => {
@@ -2201,8 +2199,8 @@ const _a = (e) => {
2201
2199
  return "X25519";
2202
2200
  if (!dt(t, [42, 134, 72, 206, 61, 2, 1]))
2203
2201
  throw new Error("Unsupported key algorithm");
2204
- tt(e, 6, "Expected curve OID");
2205
- const r = et(e), s = Br(e, r);
2202
+ et(e, 6, "Expected curve OID");
2203
+ const r = Ze(e), s = Br(e, r);
2206
2204
  for (const { name: a, oid: n } of [
2207
2205
  { name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
2208
2206
  { name: "P-384", oid: [43, 129, 4, 0, 34] },
@@ -2248,7 +2246,7 @@ const _a = (e) => {
2248
2246
  const c = s.getNamedCurve(t);
2249
2247
  a = c === "X25519" ? { name: "X25519" } : { name: "ECDH", namedCurve: c };
2250
2248
  } catch {
2251
- throw new ne("Invalid or unsupported key format");
2249
+ throw new ae("Invalid or unsupported key format");
2252
2250
  }
2253
2251
  n = [];
2254
2252
  break;
@@ -2263,7 +2261,7 @@ const _a = (e) => {
2263
2261
  a = { name: r }, n = i();
2264
2262
  break;
2265
2263
  default:
2266
- throw new ne('Invalid or unsupported "alg" (Algorithm) value');
2264
+ throw new ae('Invalid or unsupported "alg" (Algorithm) value');
2267
2265
  }
2268
2266
  return crypto.subtle.importKey(e, t, a, s?.extractable ?? !0, n);
2269
2267
  }, Ca = (e, t) => Lr(e.replace(t, "")), Oa = (e, t, r) => {
@@ -2285,7 +2283,7 @@ function ka(e) {
2285
2283
  t = { name: e.alg }, r = e.priv ? ["sign"] : ["verify"];
2286
2284
  break;
2287
2285
  default:
2288
- throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2286
+ throw new ae('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2289
2287
  }
2290
2288
  break;
2291
2289
  }
@@ -2311,7 +2309,7 @@ function ka(e) {
2311
2309
  }, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
2312
2310
  break;
2313
2311
  default:
2314
- throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2312
+ throw new ae('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2315
2313
  }
2316
2314
  break;
2317
2315
  }
@@ -2333,7 +2331,7 @@ function ka(e) {
2333
2331
  t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
2334
2332
  break;
2335
2333
  default:
2336
- throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2334
+ throw new ae('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2337
2335
  }
2338
2336
  break;
2339
2337
  }
@@ -2350,12 +2348,12 @@ function ka(e) {
2350
2348
  t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
2351
2349
  break;
2352
2350
  default:
2353
- throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2351
+ throw new ae('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2354
2352
  }
2355
2353
  break;
2356
2354
  }
2357
2355
  default:
2358
- throw new ne('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
2356
+ throw new ae('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
2359
2357
  }
2360
2358
  return { algorithm: t, keyUsages: r };
2361
2359
  }
@@ -2381,7 +2379,7 @@ const $a = (e, t, r, s, a) => {
2381
2379
  r !== void 0 ? n = new Map([...Object.entries(r), ...t.entries()]) : n = t;
2382
2380
  for (const i of s.crit) {
2383
2381
  if (!n.has(i))
2384
- throw new ne(`Extension Header Parameter "${i}" is not recognized`);
2382
+ throw new ae(`Extension Header Parameter "${i}" is not recognized`);
2385
2383
  if (a[i] === void 0)
2386
2384
  throw new e(`Extension Header Parameter "${i}" is missing`);
2387
2385
  if (n.get(i) && s[i] === void 0)
@@ -2394,29 +2392,29 @@ const $a = (e, t, r, s, a) => {
2394
2392
  if (t)
2395
2393
  return new Set(t);
2396
2394
  };
2397
- function Ft(e) {
2398
- return Me(e) && typeof e.kty == "string";
2395
+ function Ut(e) {
2396
+ return De(e) && typeof e.kty == "string";
2399
2397
  }
2400
- function Ma(e) {
2398
+ function Da(e) {
2401
2399
  return e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string");
2402
2400
  }
2403
- function Da(e) {
2401
+ function Ma(e) {
2404
2402
  return e.kty !== "oct" && typeof e.d > "u" && typeof e.priv > "u";
2405
2403
  }
2406
2404
  function La(e) {
2407
2405
  return e.kty === "oct" && typeof e.k == "string";
2408
2406
  }
2409
- let Ce;
2410
- const or = async (e, t, r, s = !1) => {
2411
- Ce ||= /* @__PURE__ */ new WeakMap();
2412
- let a = Ce.get(e);
2407
+ let Re;
2408
+ const ir = async (e, t, r, s = !1) => {
2409
+ Re ||= /* @__PURE__ */ new WeakMap();
2410
+ let a = Re.get(e);
2413
2411
  if (a?.[r])
2414
2412
  return a[r];
2415
2413
  const n = await Na({ ...t, alg: r });
2416
- return s && Object.freeze(e), a ? a[r] = n : Ce.set(e, { [r]: n }), n;
2414
+ return s && Object.freeze(e), a ? a[r] = n : Re.set(e, { [r]: n }), n;
2417
2415
  }, Ua = (e, t) => {
2418
- Ce ||= /* @__PURE__ */ new WeakMap();
2419
- let r = Ce.get(e);
2416
+ Re ||= /* @__PURE__ */ new WeakMap();
2417
+ let r = Re.get(e);
2420
2418
  if (r?.[t])
2421
2419
  return r[t];
2422
2420
  const s = e.type === "public", a = !!s;
@@ -2509,7 +2507,7 @@ const or = async (e, t, r, s = !1) => {
2509
2507
  }
2510
2508
  if (!n)
2511
2509
  throw new TypeError("given KeyObject instance cannot be used for this algorithm");
2512
- return r ? r[t] = n : Ce.set(e, { [t]: n }), n;
2510
+ return r ? r[t] = n : Re.set(e, { [t]: n }), n;
2513
2511
  }, Fa = async (e, t) => {
2514
2512
  if (e instanceof Uint8Array || Hr(e))
2515
2513
  return e;
@@ -2524,12 +2522,12 @@ const or = async (e, t, r, s = !1) => {
2524
2522
  throw s;
2525
2523
  }
2526
2524
  let r = e.export({ format: "jwk" });
2527
- return or(e, r, t);
2525
+ return ir(e, r, t);
2528
2526
  }
2529
- if (Ft(e))
2530
- return e.k ? $e(e.k) : or(e, e, t, !0);
2527
+ if (Ut(e))
2528
+ return e.k ? $e(e.k) : ir(e, e, t, !0);
2531
2529
  throw new Error("unreachable");
2532
- }, Re = (e) => e?.[Symbol.toStringTag], kt = (e, t, r) => {
2530
+ }, _e = (e) => e?.[Symbol.toStringTag], kt = (e, t, r) => {
2533
2531
  if (t.use !== void 0) {
2534
2532
  let s;
2535
2533
  switch (r) {
@@ -2574,7 +2572,7 @@ const or = async (e, t, r, s = !1) => {
2574
2572
  return !0;
2575
2573
  }, Ha = (e, t, r) => {
2576
2574
  if (!(t instanceof Uint8Array)) {
2577
- if (Ft(t)) {
2575
+ if (Ut(t)) {
2578
2576
  if (La(t) && kt(e, t, r))
2579
2577
  return;
2580
2578
  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');
@@ -2582,39 +2580,39 @@ const or = async (e, t, r, s = !1) => {
2582
2580
  if (!Gr(t))
2583
2581
  throw new TypeError(Fr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2584
2582
  if (t.type !== "secret")
2585
- throw new TypeError(`${Re(t)} instances for symmetric algorithms must be of type "secret"`);
2583
+ throw new TypeError(`${_e(t)} instances for symmetric algorithms must be of type "secret"`);
2586
2584
  }
2587
2585
  }, Ka = (e, t, r) => {
2588
- if (Ft(t))
2586
+ if (Ut(t))
2589
2587
  switch (r) {
2590
2588
  case "decrypt":
2591
2589
  case "sign":
2592
- if (Ma(t) && kt(e, t, r))
2590
+ if (Da(t) && kt(e, t, r))
2593
2591
  return;
2594
2592
  throw new TypeError("JSON Web Key for this operation be a private JWK");
2595
2593
  case "encrypt":
2596
2594
  case "verify":
2597
- if (Da(t) && kt(e, t, r))
2595
+ if (Ma(t) && kt(e, t, r))
2598
2596
  return;
2599
2597
  throw new TypeError("JSON Web Key for this operation be a public JWK");
2600
2598
  }
2601
2599
  if (!Gr(t))
2602
2600
  throw new TypeError(Fr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2603
2601
  if (t.type === "secret")
2604
- throw new TypeError(`${Re(t)} instances for asymmetric algorithms must not be of type "secret"`);
2602
+ throw new TypeError(`${_e(t)} instances for asymmetric algorithms must not be of type "secret"`);
2605
2603
  if (t.type === "public")
2606
2604
  switch (r) {
2607
2605
  case "sign":
2608
- throw new TypeError(`${Re(t)} instances for asymmetric algorithm signing must be of type "private"`);
2606
+ throw new TypeError(`${_e(t)} instances for asymmetric algorithm signing must be of type "private"`);
2609
2607
  case "decrypt":
2610
- throw new TypeError(`${Re(t)} instances for asymmetric algorithm decryption must be of type "private"`);
2608
+ throw new TypeError(`${_e(t)} instances for asymmetric algorithm decryption must be of type "private"`);
2611
2609
  }
2612
2610
  if (t.type === "private")
2613
2611
  switch (r) {
2614
2612
  case "verify":
2615
- throw new TypeError(`${Re(t)} instances for asymmetric algorithm verifying must be of type "public"`);
2613
+ throw new TypeError(`${_e(t)} instances for asymmetric algorithm verifying must be of type "public"`);
2616
2614
  case "encrypt":
2617
- throw new TypeError(`${Re(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2615
+ throw new TypeError(`${_e(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2618
2616
  }
2619
2617
  }, Ga = (e, t, r) => {
2620
2618
  e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e) ? Ha(e, t, r) : Ka(e, t, r);
@@ -2645,17 +2643,17 @@ const or = async (e, t, r, s = !1) => {
2645
2643
  case "ML-DSA-87":
2646
2644
  return { name: e };
2647
2645
  default:
2648
- throw new ne(`alg ${e} is not supported either by JOSE or your javascript runtime`);
2646
+ throw new ae(`alg ${e} is not supported either by JOSE or your javascript runtime`);
2649
2647
  }
2650
- }, qa = async (e, t, r) => {
2648
+ }, Wa = async (e, t, r) => {
2651
2649
  if (t instanceof Uint8Array) {
2652
2650
  if (!e.startsWith("HS"))
2653
2651
  throw new TypeError(Ea(t, "CryptoKey", "KeyObject", "JSON Web Key"));
2654
2652
  return crypto.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
2655
2653
  }
2656
2654
  return ba(t, e, r), t;
2657
- }, Wa = async (e, t, r, s) => {
2658
- const a = await qa(e, t, "verify");
2655
+ }, qa = async (e, t, r, s) => {
2656
+ const a = await Wa(e, t, "verify");
2659
2657
  va(e, a);
2660
2658
  const n = Ba(e, a.algorithm);
2661
2659
  try {
@@ -2665,7 +2663,7 @@ const or = async (e, t, r, s = !1) => {
2665
2663
  }
2666
2664
  };
2667
2665
  async function ja(e, t, r) {
2668
- if (!Me(e))
2666
+ if (!De(e))
2669
2667
  throw new L("Flattened JWS must be an object");
2670
2668
  if (e.protected === void 0 && e.header === void 0)
2671
2669
  throw new L('Flattened JWS must have either of the "protected" or "header" members');
@@ -2675,13 +2673,13 @@ async function ja(e, t, r) {
2675
2673
  throw new L("JWS Payload missing");
2676
2674
  if (typeof e.signature != "string")
2677
2675
  throw new L("JWS Signature missing or incorrect type");
2678
- if (e.header !== void 0 && !Me(e.header))
2676
+ if (e.header !== void 0 && !De(e.header))
2679
2677
  throw new L("JWS Unprotected Header incorrect type");
2680
2678
  let s = {};
2681
2679
  if (e.protected)
2682
2680
  try {
2683
2681
  const g = $e(e.protected);
2684
- s = JSON.parse(Oe.decode(g));
2682
+ s = JSON.parse(Ce.decode(g));
2685
2683
  } catch {
2686
2684
  throw new L("JWS Protected Header is invalid");
2687
2685
  }
@@ -2707,7 +2705,7 @@ async function ja(e, t, r) {
2707
2705
  throw new L("JWS Payload must be a string or an Uint8Array instance");
2708
2706
  let f = !1;
2709
2707
  typeof t == "function" && (t = await t(s, e), f = !0), Ga(o, t, "verify");
2710
- const d = fa(He.encode(e.protected ?? ""), He.encode("."), typeof e.payload == "string" ? He.encode(e.payload) : e.payload);
2708
+ const d = fa(Fe.encode(e.protected ?? ""), Fe.encode("."), typeof e.payload == "string" ? Fe.encode(e.payload) : e.payload);
2711
2709
  let u;
2712
2710
  try {
2713
2711
  u = $e(e.signature);
@@ -2715,7 +2713,7 @@ async function ja(e, t, r) {
2715
2713
  throw new L("Failed to base64url decode the signature");
2716
2714
  }
2717
2715
  const l = await Fa(t, o);
2718
- if (!await Wa(o, l, u, d))
2716
+ if (!await qa(o, l, u, d))
2719
2717
  throw new pa();
2720
2718
  let m;
2721
2719
  if (i)
@@ -2724,12 +2722,12 @@ async function ja(e, t, r) {
2724
2722
  } catch {
2725
2723
  throw new L("Failed to base64url decode the payload");
2726
2724
  }
2727
- else typeof e.payload == "string" ? m = He.encode(e.payload) : m = e.payload;
2725
+ else typeof e.payload == "string" ? m = Fe.encode(e.payload) : m = e.payload;
2728
2726
  const p = { payload: m };
2729
2727
  return e.protected !== void 0 && (p.protectedHeader = s), e.header !== void 0 && (p.unprotectedHeader = e.header), f ? { ...p, key: l } : p;
2730
2728
  }
2731
2729
  async function Va(e, t, r) {
2732
- if (e instanceof Uint8Array && (e = Oe.decode(e)), typeof e != "string")
2730
+ if (e instanceof Uint8Array && (e = Ce.decode(e)), typeof e != "string")
2733
2731
  throw new L("Compact JWS must be a string or Uint8Array");
2734
2732
  const { 0: s, 1: a, 2: n, length: i } = e.split(".");
2735
2733
  if (i !== 3)
@@ -2737,7 +2735,7 @@ async function Va(e, t, r) {
2737
2735
  const o = await ja({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
2738
2736
  return typeof t == "function" ? { ...c, key: o.key } : c;
2739
2737
  }
2740
- const Qa = (e) => Math.floor(e.getTime() / 1e3), qr = 60, Wr = qr * 60, Ht = Wr * 24, Ja = Ht * 7, Ya = Ht * 365.25, za = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, cr = (e) => {
2738
+ const Ja = (e) => Math.floor(e.getTime() / 1e3), Wr = 60, qr = Wr * 60, Ft = qr * 24, Qa = Ft * 7, Ya = Ft * 365.25, za = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, or = (e) => {
2741
2739
  const t = za.exec(e);
2742
2740
  if (!t || t[4] && t[1])
2743
2741
  throw new TypeError("Invalid time period format");
@@ -2756,57 +2754,57 @@ const Qa = (e) => Math.floor(e.getTime() / 1e3), qr = 60, Wr = qr * 60, Ht = Wr
2756
2754
  case "min":
2757
2755
  case "mins":
2758
2756
  case "m":
2759
- a = Math.round(r * qr);
2757
+ a = Math.round(r * Wr);
2760
2758
  break;
2761
2759
  case "hour":
2762
2760
  case "hours":
2763
2761
  case "hr":
2764
2762
  case "hrs":
2765
2763
  case "h":
2766
- a = Math.round(r * Wr);
2764
+ a = Math.round(r * qr);
2767
2765
  break;
2768
2766
  case "day":
2769
2767
  case "days":
2770
2768
  case "d":
2771
- a = Math.round(r * Ht);
2769
+ a = Math.round(r * Ft);
2772
2770
  break;
2773
2771
  case "week":
2774
2772
  case "weeks":
2775
2773
  case "w":
2776
- a = Math.round(r * Ja);
2774
+ a = Math.round(r * Qa);
2777
2775
  break;
2778
2776
  default:
2779
2777
  a = Math.round(r * Ya);
2780
2778
  break;
2781
2779
  }
2782
2780
  return t[1] === "-" || t[4] === "ago" ? -a : a;
2783
- }, lr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, Xa = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
2781
+ }, cr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, Xa = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
2784
2782
  function Za(e, t, r = {}) {
2785
2783
  let s;
2786
2784
  try {
2787
- s = JSON.parse(Oe.decode(t));
2785
+ s = JSON.parse(Ce.decode(t));
2788
2786
  } catch {
2789
2787
  }
2790
- if (!Me(s))
2791
- throw new se("JWT Claims Set must be a top-level JSON object");
2788
+ if (!De(s))
2789
+ throw new re("JWT Claims Set must be a top-level JSON object");
2792
2790
  const { typ: a } = r;
2793
- if (a && (typeof e.typ != "string" || lr(e.typ) !== lr(a)))
2794
- throw new X('unexpected "typ" JWT header value', s, "typ", "check_failed");
2791
+ if (a && (typeof e.typ != "string" || cr(e.typ) !== cr(a)))
2792
+ throw new z('unexpected "typ" JWT header value', s, "typ", "check_failed");
2795
2793
  const { requiredClaims: n = [], issuer: i, subject: o, audience: c, maxTokenAge: f } = r, d = [...n];
2796
2794
  f !== void 0 && d.push("iat"), c !== void 0 && d.push("aud"), o !== void 0 && d.push("sub"), i !== void 0 && d.push("iss");
2797
2795
  for (const p of new Set(d.reverse()))
2798
2796
  if (!(p in s))
2799
- throw new X(`missing required "${p}" claim`, s, p, "missing");
2797
+ throw new z(`missing required "${p}" claim`, s, p, "missing");
2800
2798
  if (i && !(Array.isArray(i) ? i : [i]).includes(s.iss))
2801
- throw new X('unexpected "iss" claim value', s, "iss", "check_failed");
2799
+ throw new z('unexpected "iss" claim value', s, "iss", "check_failed");
2802
2800
  if (o && s.sub !== o)
2803
- throw new X('unexpected "sub" claim value', s, "sub", "check_failed");
2801
+ throw new z('unexpected "sub" claim value', s, "sub", "check_failed");
2804
2802
  if (c && !Xa(s.aud, typeof c == "string" ? [c] : c))
2805
- throw new X('unexpected "aud" claim value', s, "aud", "check_failed");
2803
+ throw new z('unexpected "aud" claim value', s, "aud", "check_failed");
2806
2804
  let u;
2807
2805
  switch (typeof r.clockTolerance) {
2808
2806
  case "string":
2809
- u = cr(r.clockTolerance);
2807
+ u = or(r.clockTolerance);
2810
2808
  break;
2811
2809
  case "number":
2812
2810
  u = r.clockTolerance;
@@ -2817,64 +2815,64 @@ function Za(e, t, r = {}) {
2817
2815
  default:
2818
2816
  throw new TypeError("Invalid clockTolerance option type");
2819
2817
  }
2820
- const { currentDate: l } = r, m = Qa(l || /* @__PURE__ */ new Date());
2818
+ const { currentDate: l } = r, m = Ja(l || /* @__PURE__ */ new Date());
2821
2819
  if ((s.iat !== void 0 || f) && typeof s.iat != "number")
2822
- throw new X('"iat" claim must be a number', s, "iat", "invalid");
2820
+ throw new z('"iat" claim must be a number', s, "iat", "invalid");
2823
2821
  if (s.nbf !== void 0) {
2824
2822
  if (typeof s.nbf != "number")
2825
- throw new X('"nbf" claim must be a number', s, "nbf", "invalid");
2823
+ throw new z('"nbf" claim must be a number', s, "nbf", "invalid");
2826
2824
  if (s.nbf > m + u)
2827
- throw new X('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
2825
+ throw new z('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
2828
2826
  }
2829
2827
  if (s.exp !== void 0) {
2830
2828
  if (typeof s.exp != "number")
2831
- throw new X('"exp" claim must be a number', s, "exp", "invalid");
2829
+ throw new z('"exp" claim must be a number', s, "exp", "invalid");
2832
2830
  if (s.exp <= m - u)
2833
- throw new ir('"exp" claim timestamp check failed', s, "exp", "check_failed");
2831
+ throw new nr('"exp" claim timestamp check failed', s, "exp", "check_failed");
2834
2832
  }
2835
2833
  if (f) {
2836
- const p = m - s.iat, g = typeof f == "number" ? f : cr(f);
2834
+ const p = m - s.iat, g = typeof f == "number" ? f : or(f);
2837
2835
  if (p - u > g)
2838
- throw new ir('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
2836
+ throw new nr('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
2839
2837
  if (p < 0 - u)
2840
- throw new X('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
2838
+ throw new z('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
2841
2839
  }
2842
2840
  return s;
2843
2841
  }
2844
2842
  async function en(e, t, r) {
2845
2843
  const s = await Va(e, t, r);
2846
2844
  if (s.protectedHeader.crit?.includes("b64") && s.protectedHeader.b64 === !1)
2847
- throw new se("JWTs MUST NOT use unencoded payload");
2845
+ throw new re("JWTs MUST NOT use unencoded payload");
2848
2846
  const a = { payload: Za(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
2849
2847
  return typeof t == "function" ? { ...a, key: s.key } : a;
2850
2848
  }
2851
2849
  function tn(e) {
2852
2850
  if (typeof e != "string")
2853
- throw new se("JWTs must use Compact JWS serialization, JWT must be a string");
2851
+ throw new re("JWTs must use Compact JWS serialization, JWT must be a string");
2854
2852
  const { 1: t, length: r } = e.split(".");
2855
2853
  if (r === 5)
2856
- throw new se("Only JWTs using Compact JWS serialization can be decoded");
2854
+ throw new re("Only JWTs using Compact JWS serialization can be decoded");
2857
2855
  if (r !== 3)
2858
- throw new se("Invalid JWT");
2856
+ throw new re("Invalid JWT");
2859
2857
  if (!t)
2860
- throw new se("JWTs must contain a payload");
2858
+ throw new re("JWTs must contain a payload");
2861
2859
  let s;
2862
2860
  try {
2863
2861
  s = $e(t);
2864
2862
  } catch {
2865
- throw new se("Failed to base64url decode the payload");
2863
+ throw new re("Failed to base64url decode the payload");
2866
2864
  }
2867
2865
  let a;
2868
2866
  try {
2869
- a = JSON.parse(Oe.decode(s));
2867
+ a = JSON.parse(Ce.decode(s));
2870
2868
  } catch {
2871
- throw new se("Failed to parse the decoded payload as JSON");
2869
+ throw new re("Failed to parse the decoded payload as JSON");
2872
2870
  }
2873
- if (!Me(a))
2874
- throw new se("Invalid JWT Claims Set");
2871
+ if (!De(a))
2872
+ throw new re("Invalid JWT Claims Set");
2875
2873
  return a;
2876
2874
  }
2877
- const De = async (e) => {
2875
+ const Me = async (e) => {
2878
2876
  try {
2879
2877
  const t = F.ALG, r = await Pa(ha, t);
2880
2878
  return await en(e, r, {
@@ -2889,11 +2887,11 @@ const De = async (e) => {
2889
2887
  } catch {
2890
2888
  return;
2891
2889
  }
2892
- }, M = [];
2890
+ }, D = [];
2893
2891
  for (let e = 0; e < 256; ++e)
2894
- M.push((e + 256).toString(16).slice(1));
2892
+ D.push((e + 256).toString(16).slice(1));
2895
2893
  function sn(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
+ 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();
2897
2895
  }
2898
2896
  let ht;
2899
2897
  const an = new Uint8Array(16);
@@ -2905,25 +2903,25 @@ function nn() {
2905
2903
  }
2906
2904
  return ht(an);
2907
2905
  }
2908
- const on = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ur = { randomUUID: on };
2909
- function dr(e, t, r) {
2910
- if (ur.randomUUID && !e)
2911
- return ur.randomUUID();
2906
+ const on = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), lr = { randomUUID: on };
2907
+ function ur(e, t, r) {
2908
+ if (lr.randomUUID && !e)
2909
+ return lr.randomUUID();
2912
2910
  e = e || {};
2913
2911
  const s = e.random ?? e.rng?.() ?? nn();
2914
2912
  if (s.length < 16)
2915
2913
  throw new Error("Random bytes length must be >= 16");
2916
2914
  return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, sn(s);
2917
2915
  }
2918
- const hr = globalThis.crypto, cn = (e) => `${dr()}${dr()}`.slice(0, e), ln = (e) => btoa(
2916
+ const dr = globalThis.crypto, cn = (e) => `${ur()}${ur()}`.slice(0, e), ln = (e) => btoa(
2919
2917
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
2920
2918
  );
2921
2919
  async function un(e) {
2922
- if (!hr.subtle)
2920
+ if (!dr.subtle)
2923
2921
  throw new Error(
2924
2922
  "crypto.subtle is available only in secure contexts (HTTPS)."
2925
2923
  );
2926
- const t = new TextEncoder().encode(e), r = await hr.subtle.digest("SHA-256", t);
2924
+ const t = new TextEncoder().encode(e), r = await dr.subtle.digest("SHA-256", t);
2927
2925
  return ln(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2928
2926
  }
2929
2927
  async function dn(e) {
@@ -2948,20 +2946,20 @@ try {
2948
2946
  });
2949
2947
  } catch {
2950
2948
  }
2951
- function ee(e) {
2949
+ function Z(e) {
2952
2950
  const t = new Uint8Array(e);
2953
2951
  let r = "";
2954
2952
  for (const s of t)
2955
2953
  r += String.fromCharCode(s);
2956
2954
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2957
2955
  }
2958
- function rt(e) {
2956
+ function tt(e) {
2959
2957
  const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, s = t.padEnd(t.length + r, "="), a = atob(s), n = new ArrayBuffer(a.length), i = new Uint8Array(n);
2960
2958
  for (let o = 0; o < a.length; o++)
2961
2959
  i[o] = a.charCodeAt(o);
2962
2960
  return n;
2963
2961
  }
2964
- function Kt() {
2962
+ function Ht() {
2965
2963
  return mn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2966
2964
  }
2967
2965
  const mn = {
@@ -2971,7 +2969,7 @@ function Vr(e) {
2971
2969
  const { id: t } = e;
2972
2970
  return {
2973
2971
  ...e,
2974
- id: rt(t),
2972
+ id: tt(t),
2975
2973
  /**
2976
2974
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2977
2975
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2980,7 +2978,7 @@ function Vr(e) {
2980
2978
  transports: e.transports
2981
2979
  };
2982
2980
  }
2983
- function Qr(e) {
2981
+ function Jr(e) {
2984
2982
  return (
2985
2983
  // Consider localhost valid as well since it's okay wrt Secure Contexts
2986
2984
  e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
@@ -3054,7 +3052,7 @@ function pn({ error: e, options: t }) {
3054
3052
  });
3055
3053
  if (e.name === "SecurityError") {
3056
3054
  const s = globalThis.location.hostname;
3057
- if (Qr(s)) {
3055
+ if (Jr(s)) {
3058
3056
  if (r.rp.id !== s)
3059
3057
  return new U({
3060
3058
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
@@ -3106,7 +3104,7 @@ class yn {
3106
3104
  }
3107
3105
  }
3108
3106
  }
3109
- const Jr = new yn(), gn = ["cross-platform", "platform"];
3107
+ const Qr = new yn(), gn = ["cross-platform", "platform"];
3110
3108
  function Yr(e) {
3111
3109
  if (e && !(gn.indexOf(e) < 0))
3112
3110
  return e;
@@ -3114,18 +3112,18 @@ function Yr(e) {
3114
3112
  async function bn(e) {
3115
3113
  !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
3114
  const { optionsJSON: t, useAutoRegister: r = !1 } = e;
3117
- if (!Kt())
3115
+ if (!Ht())
3118
3116
  throw new Error("WebAuthn is not supported in this browser");
3119
3117
  const s = {
3120
3118
  ...t,
3121
- challenge: rt(t.challenge),
3119
+ challenge: tt(t.challenge),
3122
3120
  user: {
3123
3121
  ...t.user,
3124
- id: rt(t.user.id)
3122
+ id: tt(t.user.id)
3125
3123
  },
3126
3124
  excludeCredentials: t.excludeCredentials?.map(Vr)
3127
3125
  }, a = {};
3128
- r && (a.mediation = "conditional"), a.publicKey = s, a.signal = Jr.createNewAbortSignal();
3126
+ r && (a.mediation = "conditional"), a.publicKey = s, a.signal = Qr.createNewAbortSignal();
3129
3127
  let n;
3130
3128
  try {
3131
3129
  n = await navigator.credentials.create(a);
@@ -3148,23 +3146,23 @@ async function bn(e) {
3148
3146
  if (typeof c.getPublicKey == "function")
3149
3147
  try {
3150
3148
  const p = c.getPublicKey();
3151
- p !== null && (l = ee(p));
3149
+ p !== null && (l = Z(p));
3152
3150
  } catch (p) {
3153
3151
  mt("getPublicKey()", p);
3154
3152
  }
3155
3153
  let m;
3156
3154
  if (typeof c.getAuthenticatorData == "function")
3157
3155
  try {
3158
- m = ee(c.getAuthenticatorData());
3156
+ m = Z(c.getAuthenticatorData());
3159
3157
  } catch (p) {
3160
3158
  mt("getAuthenticatorData()", p);
3161
3159
  }
3162
3160
  return {
3163
3161
  id: i,
3164
- rawId: ee(o),
3162
+ rawId: Z(o),
3165
3163
  response: {
3166
- attestationObject: ee(c.attestationObject),
3167
- clientDataJSON: ee(c.clientDataJSON),
3164
+ attestationObject: Z(c.attestationObject),
3165
+ clientDataJSON: Z(c.clientDataJSON),
3168
3166
  transports: d,
3169
3167
  publicKeyAlgorithm: u,
3170
3168
  publicKey: l,
@@ -3180,7 +3178,7 @@ function mt(e, t) {
3180
3178
  `, t);
3181
3179
  }
3182
3180
  function En() {
3183
- if (!Kt())
3181
+ if (!Ht())
3184
3182
  return pt.stubThis(new Promise((t) => t(!1)));
3185
3183
  const e = globalThis.PublicKeyCredential;
3186
3184
  return e?.isConditionalMediationAvailable === void 0 ? pt.stubThis(new Promise((t) => t(!1))) : pt.stubThis(e.isConditionalMediationAvailable());
@@ -3208,7 +3206,7 @@ function wn({ error: e, options: t }) {
3208
3206
  });
3209
3207
  if (e.name === "SecurityError") {
3210
3208
  const s = globalThis.location.hostname;
3211
- if (Qr(s)) {
3209
+ if (Jr(s)) {
3212
3210
  if (r.rpId !== s)
3213
3211
  return new U({
3214
3212
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
@@ -3232,13 +3230,13 @@ function wn({ error: e, options: t }) {
3232
3230
  async function Sn(e) {
3233
3231
  !e.optionsJSON && e.challenge && (console.warn("startAuthentication() 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 });
3234
3232
  const { optionsJSON: t, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: s = !0 } = e;
3235
- if (!Kt())
3233
+ if (!Ht())
3236
3234
  throw new Error("WebAuthn is not supported in this browser");
3237
3235
  let a;
3238
3236
  t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(Vr));
3239
3237
  const n = {
3240
3238
  ...t,
3241
- challenge: rt(t.challenge),
3239
+ challenge: tt(t.challenge),
3242
3240
  allowCredentials: a
3243
3241
  }, i = {};
3244
3242
  if (r) {
@@ -3248,7 +3246,7 @@ async function Sn(e) {
3248
3246
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
3249
3247
  i.mediation = "conditional", n.allowCredentials = [];
3250
3248
  }
3251
- i.publicKey = n, i.signal = Jr.createNewAbortSignal();
3249
+ i.publicKey = n, i.signal = Qr.createNewAbortSignal();
3252
3250
  let o;
3253
3251
  try {
3254
3252
  o = await navigator.credentials.get(i);
@@ -3259,13 +3257,13 @@ async function Sn(e) {
3259
3257
  throw new Error("Authentication was not completed");
3260
3258
  const { id: c, rawId: f, response: d, type: u } = o;
3261
3259
  let l;
3262
- return d.userHandle && (l = ee(d.userHandle)), {
3260
+ return d.userHandle && (l = Z(d.userHandle)), {
3263
3261
  id: c,
3264
- rawId: ee(f),
3262
+ rawId: Z(f),
3265
3263
  response: {
3266
- authenticatorData: ee(d.authenticatorData),
3267
- clientDataJSON: ee(d.clientDataJSON),
3268
- signature: ee(d.signature),
3264
+ authenticatorData: Z(d.authenticatorData),
3265
+ clientDataJSON: Z(d.clientDataJSON),
3266
+ signature: Z(d.signature),
3269
3267
  userHandle: l
3270
3268
  },
3271
3269
  type: u,
@@ -3276,23 +3274,23 @@ async function Sn(e) {
3276
3274
  function zr(e, t) {
3277
3275
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
3278
3276
  }
3279
- const fr = (e, t) => {
3277
+ const hr = (e, t) => {
3280
3278
  const r = JSON.stringify(
3281
3279
  typeof t == "function" ? t() : t
3282
3280
  );
3283
3281
  window.localStorage.setItem(e, r), zr(e, r);
3284
3282
  }, vn = (e) => {
3285
3283
  window.localStorage.removeItem(e), zr(e, null);
3286
- }, mr = (e) => window.localStorage.getItem(e), Tn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3287
- function Ke({
3284
+ }, fr = (e) => window.localStorage.getItem(e), Tn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3285
+ function He({
3288
3286
  key: e,
3289
3287
  initialValue: t
3290
3288
  }) {
3291
- const r = _s(Tn, () => mr(e)), s = Y(
3289
+ const r = _s(Tn, () => fr(e)), s = Y(
3292
3290
  (i) => {
3293
3291
  try {
3294
3292
  const o = typeof i == "function" ? i(JSON.parse(r)) : i;
3295
- o == null ? vn(e) : fr(e, o);
3293
+ o == null ? vn(e) : hr(e, o);
3296
3294
  } catch (o) {
3297
3295
  console.warn(o);
3298
3296
  }
@@ -3303,19 +3301,19 @@ function Ke({
3303
3301
  }, [t, s]), n = Y(() => {
3304
3302
  s(null);
3305
3303
  }, [s]);
3306
- return q(() => {
3304
+ return W(() => {
3307
3305
  try {
3308
- mr(e) === null && typeof t < "u" && fr(e, t);
3306
+ fr(e) === null && typeof t < "u" && hr(e, t);
3309
3307
  } catch (i) {
3310
3308
  console.warn(i);
3311
3309
  }
3312
3310
  }, [e, t]), [r ? JSON.parse(r) : null, s, a, n];
3313
3311
  }
3314
- const D = [];
3312
+ const M = [];
3315
3313
  for (let e = 0; e < 256; ++e)
3316
- D.push((e + 256).toString(16).slice(1));
3314
+ M.push((e + 256).toString(16).slice(1));
3317
3315
  function An(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();
3316
+ 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();
3319
3317
  }
3320
3318
  let yt;
3321
3319
  const In = new Uint8Array(16);
@@ -3327,17 +3325,17 @@ function _n() {
3327
3325
  }
3328
3326
  return yt(In);
3329
3327
  }
3330
- const Rn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), pr = { randomUUID: Rn };
3328
+ const Rn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mr = { randomUUID: Rn };
3331
3329
  function gt(e, t, r) {
3332
- if (pr.randomUUID && !e)
3333
- return pr.randomUUID();
3330
+ if (mr.randomUUID && !e)
3331
+ return mr.randomUUID();
3334
3332
  e = e || {};
3335
3333
  const s = e.random ?? e.rng?.() ?? _n();
3336
3334
  if (s.length < 16)
3337
3335
  throw new Error("Random bytes length must be >= 16");
3338
3336
  return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, An(s);
3339
3337
  }
3340
- const Te = "Your session has expired. For your security, please log in again to continue.", Cn = "Your session has been successfully terminated.", bt = "Login failed. Please try again.", On = "Error getting access token, please re-authenticate.", kn = "You forgot to wrap your component in <AuthProvider>.", Ge = "@@auth@@", Ne = "LOADING", je = "LOGIN", Xr = "LOGOUT", Ue = "success", te = "failure", Zr = "include", es = "POST", ts = "application/json", Be = {
3338
+ const ve = "Your session has expired. For your security, please log in again to continue.", Cn = "Your session has been successfully terminated.", bt = "Login failed. Please try again.", On = "Error getting access token, please re-authenticate.", kn = "You forgot to wrap your component in <AuthProvider>.", Ke = "@@auth@@", Ne = "LOADING", qe = "LOGIN", Xr = "LOGOUT", Le = "success", ee = "failure", Zr = "include", es = "POST", ts = "application/json", Ge = {
3341
3339
  GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
3342
3340
  $clientId: String!,
3343
3341
  $username: String!,
@@ -3418,24 +3416,24 @@ const Te = "Your session has expired. For your security, please log in again to
3418
3416
  email
3419
3417
  }
3420
3418
  }`
3421
- }, Ae = {
3419
+ }, Te = {
3422
3420
  GET_REGISTRATION_OPTIONS: {
3423
- schema: Be.GET_REGISTRATION_OPTIONS,
3421
+ schema: Ge.GET_REGISTRATION_OPTIONS,
3424
3422
  method: "getPasskeyRegistrationOptions"
3425
3423
  },
3426
3424
  VERIFY_REGISTRATION: {
3427
- schema: Be.VERIFY_REGISTRATION,
3425
+ schema: Ge.VERIFY_REGISTRATION,
3428
3426
  method: "verifyPasskeyRegistration"
3429
3427
  },
3430
3428
  GET_AUTHENTICATION_OPTIONS: {
3431
- schema: Be.GET_AUTHENTICATION_OPTIONS,
3429
+ schema: Ge.GET_AUTHENTICATION_OPTIONS,
3432
3430
  method: "getPasskeyAuthenticationOptions"
3433
3431
  },
3434
3432
  VERIFY_AUTHENTICATION: {
3435
- schema: Be.VERIFY_AUTHENTICATION,
3433
+ schema: Ge.VERIFY_AUTHENTICATION,
3436
3434
  method: "verifyPasskeyAuthentication"
3437
3435
  }
3438
- }, Ie = async ({
3436
+ }, Ae = async ({
3439
3437
  accessToken: e,
3440
3438
  type: t,
3441
3439
  clientId: r,
@@ -3449,7 +3447,7 @@ const Te = "Your session has expired. For your security, please log in again to
3449
3447
  headers: {
3450
3448
  authorization: n,
3451
3449
  "Content-Type": ts,
3452
- [Dr.CLIENT_ID]: `${r}`
3450
+ [Mr.CLIENT_ID]: `${r}`
3453
3451
  },
3454
3452
  body: JSON.stringify({
3455
3453
  query: t.schema,
@@ -3457,14 +3455,14 @@ const Te = "Your session has expired. For your security, please log in again to
3457
3455
  })
3458
3456
  });
3459
3457
  if (i.status !== 200)
3460
- return { status: te, data: [] };
3458
+ return { status: ee, data: [] };
3461
3459
  const { data: o } = await i.json();
3462
3460
  return {
3463
- status: Ue,
3461
+ status: Le,
3464
3462
  data: o[t.method]
3465
3463
  };
3466
3464
  } catch (n) {
3467
- return console.error(n), { status: te, data: [] };
3465
+ return console.error(n), { status: ee, data: [] };
3468
3466
  }
3469
3467
  }, ot = async ({
3470
3468
  type: e,
@@ -3478,19 +3476,19 @@ const Te = "Your session has expired. For your security, please log in again to
3478
3476
  method: es,
3479
3477
  headers: {
3480
3478
  "Content-Type": ts,
3481
- [Dr.CLIENT_ID]: `${t}`
3479
+ [Mr.CLIENT_ID]: `${t}`
3482
3480
  },
3483
3481
  body: JSON.stringify(r)
3484
3482
  });
3485
3483
  if (a.status !== 200)
3486
- return { status: te, data: [] };
3484
+ return { status: ee, data: [] };
3487
3485
  const { data: n } = await a.json();
3488
3486
  return {
3489
- status: Ue,
3487
+ status: Le,
3490
3488
  data: n || []
3491
3489
  };
3492
3490
  } catch (a) {
3493
- return console.error(a), { status: te, data: [] };
3491
+ return console.error(a), { status: ee, data: [] };
3494
3492
  }
3495
3493
  }, Nn = process.env.NODE_ENV === "production", Pn = !Nn, rs = {
3496
3494
  isLoading: !0,
@@ -3524,14 +3522,14 @@ const Te = "Your session has expired. For your security, please log in again to
3524
3522
  domain: r,
3525
3523
  idToken: s
3526
3524
  }
3527
- }))?.status || te
3525
+ }))?.status || ee
3528
3526
  };
3529
3527
  } catch {
3530
3528
  return {
3531
- status: te
3529
+ status: ee
3532
3530
  };
3533
3531
  }
3534
- }, Mn = async ({
3532
+ }, Dn = async ({
3535
3533
  username: e,
3536
3534
  password: t,
3537
3535
  clientId: r,
@@ -3560,7 +3558,7 @@ const Te = "Your session has expired. For your security, please log in again to
3560
3558
  domain: c,
3561
3559
  ua: f
3562
3560
  }
3563
- }), l = await De(u?.data?.idToken);
3561
+ }), l = await Me(u?.data?.idToken);
3564
3562
  return l && l.payload[F.USER_ID_KEY] !== "" && l.payload[F.NONCE_KEY] === s ? {
3565
3563
  idToken: u.data.idToken,
3566
3564
  accessToken: u.data.accessToken,
@@ -3576,7 +3574,7 @@ const Te = "Your session has expired. For your security, please log in again to
3576
3574
  status: !1
3577
3575
  };
3578
3576
  }
3579
- }, Dn = async ({
3577
+ }, Mn = async ({
3580
3578
  nonce: e,
3581
3579
  clientId: t,
3582
3580
  code_challenge: r,
@@ -3594,15 +3592,15 @@ const Te = "Your session has expired. For your security, please log in again to
3594
3592
  }
3595
3593
  });
3596
3594
  return a?.data?.code ? {
3597
- status: Ue,
3595
+ status: Le,
3598
3596
  data: a.data.code
3599
3597
  } : {
3600
- status: te,
3598
+ status: ee,
3601
3599
  data: ""
3602
3600
  };
3603
3601
  } catch {
3604
3602
  return {
3605
- status: te,
3603
+ status: ee,
3606
3604
  data: ""
3607
3605
  };
3608
3606
  }
@@ -3628,7 +3626,7 @@ const Te = "Your session has expired. For your security, please log in again to
3628
3626
  accessToken: a,
3629
3627
  domain: n
3630
3628
  }
3631
- }), c = await De(o?.data?.accessToken);
3629
+ }), c = await Me(o?.data?.accessToken);
3632
3630
  return c && c.payload[F.USER_ID_KEY] !== "" && c.payload[F.NONCE_KEY] === r ? {
3633
3631
  accessToken: o.data.accessToken,
3634
3632
  refreshToken: o.data.refreshToken,
@@ -3674,7 +3672,7 @@ class Un {
3674
3672
  nonce: a,
3675
3673
  domain: n
3676
3674
  }) {
3677
- const i = await De(this.refreshToken);
3675
+ const i = await Me(this.refreshToken);
3678
3676
  if (i && i.payload[F.USER_ID_KEY] !== "") {
3679
3677
  const o = await Ln({
3680
3678
  endpoint: t,
@@ -3686,46 +3684,46 @@ class Un {
3686
3684
  domain: n
3687
3685
  });
3688
3686
  return o.status ? (this.accessToken = o.accessToken, this.refreshToken = o.refreshToken, {
3689
- status: Ue,
3687
+ status: Le,
3690
3688
  newAccessToken: o.accessToken,
3691
3689
  newRefreshToken: o.refreshToken
3692
3690
  }) : {
3693
- status: te
3691
+ status: ee
3694
3692
  };
3695
3693
  } else
3696
3694
  return {
3697
- status: te
3695
+ status: ee
3698
3696
  };
3699
3697
  }
3700
3698
  }
3701
- const _e = () => {
3699
+ const Ie = () => {
3702
3700
  throw new Error(kn);
3703
3701
  }, ss = xt({
3704
3702
  isAuthenticated: !1,
3705
3703
  isLoading: !1,
3706
- login: _e,
3707
- logout: _e,
3708
- getAccessToken: _e,
3709
- getIdToken: _e,
3710
- registeringForPasskey: _e,
3711
- loginWithPasskey: _e,
3704
+ login: Ie,
3705
+ logout: Ie,
3706
+ getAccessToken: Ie,
3707
+ getIdToken: Ie,
3708
+ registeringForPasskey: Ie,
3709
+ loginWithPasskey: Ie,
3712
3710
  logoutReason: "",
3713
3711
  authenticationType: ""
3714
3712
  }), Fn = () => ({
3715
- ...nt(ss)
3713
+ ...at(ss)
3716
3714
  }), Hn = (e) => Y(
3717
3715
  (...t) => {
3718
3716
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
3719
3717
  },
3720
3718
  [e]
3721
- ), Kn = oe.createContext({
3719
+ ), Kn = ie.createContext({
3722
3720
  state: rs,
3723
3721
  dispatch: () => {
3724
3722
  }
3725
3723
  }), Gn = (e, t) => t?.type === Ne ? {
3726
3724
  ...e,
3727
3725
  isLoading: t.payload.isLoading
3728
- } : t?.type === je ? {
3726
+ } : t?.type === qe ? {
3729
3727
  ...e,
3730
3728
  isLoading: !1,
3731
3729
  isAuthenticated: !0,
@@ -3742,7 +3740,7 @@ const _e = () => {
3742
3740
  } : e, Bn = ({ children: e }) => {
3743
3741
  const t = Fn();
3744
3742
  return /* @__PURE__ */ h(jr.Provider, { value: t, children: e });
3745
- }, yr = ({
3743
+ }, pr = ({
3746
3744
  children: e,
3747
3745
  sessionExpiration: t,
3748
3746
  clientId: r,
@@ -3750,20 +3748,20 @@ const _e = () => {
3750
3748
  debug: a = !1,
3751
3749
  endpoint: n = Pn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
3752
3750
  }) => {
3753
- const [i, o] = _r(Gn, {
3751
+ const [i, o] = Ir(Gn, {
3754
3752
  ...rs,
3755
3753
  debug: a
3756
- }), c = Hn(a), f = j(!1), [d, u, , l] = Ke({
3757
- key: `${Ge}::${r}::@@user@@`
3758
- }), [m, p, , g] = Ke({
3759
- key: `${Ge}::${r}::@@access@@`
3760
- }), [b, E, , O] = Ke(
3754
+ }), c = Hn(a), f = j(!1), [d, u, , l] = He({
3755
+ key: `${Ke}::${r}::@@user@@`
3756
+ }), [m, p, , g] = He({
3757
+ key: `${Ke}::${r}::@@access@@`
3758
+ }), [b, E, , O] = He(
3761
3759
  {
3762
- key: `${Ge}::${r}::@@refresh@@`
3760
+ key: `${Ke}::${r}::@@refresh@@`
3763
3761
  }
3764
- ), [A, K, , R] = Ke({
3765
- key: `${Ge}::${r}::@@nonce@@`
3766
- }), J = new Un(m, b), C = Y(() => {
3762
+ ), [A, K, , R] = He({
3763
+ key: `${Ke}::${r}::@@nonce@@`
3764
+ }), Q = new Un(m, b), C = Y(() => {
3767
3765
  c("removeLocalStorage: removing local storage"), l(), g(), O(), R();
3768
3766
  }, [
3769
3767
  g,
@@ -3779,7 +3777,7 @@ const _e = () => {
3779
3777
  ), o({
3780
3778
  type: Xr,
3781
3779
  payload: {
3782
- logoutReason: w || Te
3780
+ logoutReason: w || ve
3783
3781
  }
3784
3782
  }), C(), o({ type: Ne, payload: { isLoading: !1 } });
3785
3783
  },
@@ -3796,7 +3794,7 @@ const _e = () => {
3796
3794
  domain: s,
3797
3795
  idToken: d,
3798
3796
  endpoint: n
3799
- }), v(w || Te);
3797
+ }), v(w || ve);
3800
3798
  },
3801
3799
  [
3802
3800
  d,
@@ -3808,13 +3806,13 @@ const _e = () => {
3808
3806
  n
3809
3807
  ]
3810
3808
  );
3811
- q(() => {
3809
+ W(() => {
3812
3810
  if (!f.current)
3813
3811
  return i.isLoading && d !== null ? (async () => {
3814
3812
  try {
3815
- const w = await De(d);
3813
+ const w = await Me(d);
3816
3814
  w && w.payload[F.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
3817
- type: je,
3815
+ type: qe,
3818
3816
  payload: {
3819
3817
  authenticationType: w.payload[F.AUTH_TYPE_KEY],
3820
3818
  user: {
@@ -3823,11 +3821,11 @@ const _e = () => {
3823
3821
  email: w.payload[F.EMAIL_KEY]
3824
3822
  }
3825
3823
  }
3826
- })) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(Te));
3824
+ })) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(ve));
3827
3825
  } catch {
3828
3826
  c(
3829
3827
  "useEffect: exception validating JWT, invalidating and logging out"
3830
- ), await x(Te);
3828
+ ), await x(ve);
3831
3829
  }
3832
3830
  })() : (c("useEffect: setting the loading state to false"), o({ type: Ne, payload: { isLoading: !1 } })), () => {
3833
3831
  f.current = !0;
@@ -3837,14 +3835,14 @@ const _e = () => {
3837
3835
  o({ type: Ne, payload: { isLoading: !0 } }), C();
3838
3836
  const S = gt();
3839
3837
  K(S), c("login: Logging in with password");
3840
- const { code_verifier: le, code_challenge: ue } = await dn(), Jt = await Dn({
3838
+ const { code_verifier: le, code_challenge: ue } = await dn(), Jt = await Mn({
3841
3839
  endpoint: n,
3842
3840
  nonce: S,
3843
3841
  clientId: r,
3844
3842
  code_challenge: ue
3845
3843
  });
3846
3844
  if (Jt.status) {
3847
- const Se = await Mn({
3845
+ const we = await Dn({
3848
3846
  endpoint: n,
3849
3847
  username: w,
3850
3848
  password: T,
@@ -3857,14 +3855,14 @@ const _e = () => {
3857
3855
  domain: s,
3858
3856
  ua: navigator.userAgent
3859
3857
  });
3860
- return Se.status ? (u(Se.idToken), p(Se.accessToken), E(Se.refreshToken), o({
3861
- type: je,
3858
+ return we.status ? (u(we.idToken), p(we.accessToken), E(we.refreshToken), o({
3859
+ type: qe,
3862
3860
  payload: {
3863
3861
  authenticationType: Pe.CODE,
3864
3862
  user: {
3865
- userId: Se.userId,
3863
+ userId: we.userId,
3866
3864
  username: w,
3867
- email: Se.email
3865
+ email: we.email
3868
3866
  }
3869
3867
  }
3870
3868
  }), !0) : (v(bt), !1);
@@ -3878,12 +3876,12 @@ const _e = () => {
3878
3876
  if (w && T && T.userId) {
3879
3877
  if (m) {
3880
3878
  c("getAccessToken");
3881
- const le = await De(m);
3879
+ const le = await Me(m);
3882
3880
  if (le && le.payload[F.USER_ID_KEY] !== "")
3883
3881
  return m;
3884
3882
  }
3885
3883
  c("getAccessToken: invalid access token, trying to refresh it");
3886
- const S = await J.refreshtoken({
3884
+ const S = await Q.refreshtoken({
3887
3885
  endpoint: n,
3888
3886
  clientId: r,
3889
3887
  userId: T.userId,
@@ -3892,11 +3890,11 @@ const _e = () => {
3892
3890
  });
3893
3891
  return S.status && S.status === "success" && S.newAccessToken ? (p(S.newAccessToken), E(S.newRefreshToken), S.newAccessToken) : (c(
3894
3892
  "getAccessToken: invalid refresh token, need to re-authenticate"
3895
- ), await x(Te), "");
3893
+ ), await x(ve), "");
3896
3894
  }
3897
3895
  return c(
3898
3896
  "getAccessToken: user is not authenticated, cannot get access token"
3899
- ), await x(Te), "";
3897
+ ), await x(ve), "";
3900
3898
  } catch {
3901
3899
  return c(
3902
3900
  "getAccessToken: exception occurred, invalidating and logging out"
@@ -3904,11 +3902,11 @@ const _e = () => {
3904
3902
  }
3905
3903
  }, V = () => i.isAuthenticated && d ? d : "", ce = async () => {
3906
3904
  const { user: w } = i;
3907
- let T = await Ie({
3905
+ let T = await Ae({
3908
3906
  endpoint: n,
3909
3907
  accessToken: m,
3910
3908
  clientId: r,
3911
- type: Ae.GET_REGISTRATION_OPTIONS,
3909
+ type: Te.GET_REGISTRATION_OPTIONS,
3912
3910
  params: {
3913
3911
  clientId: r,
3914
3912
  id: w?.userId,
@@ -3920,11 +3918,11 @@ const _e = () => {
3920
3918
  const S = await bn({
3921
3919
  optionsJSON: T.data
3922
3920
  });
3923
- return T = await Ie({
3921
+ return T = await Ae({
3924
3922
  endpoint: n,
3925
3923
  accessToken: m,
3926
3924
  clientId: r,
3927
- type: Ae.VERIFY_REGISTRATION,
3925
+ type: Te.VERIFY_REGISTRATION,
3928
3926
  params: {
3929
3927
  clientId: r,
3930
3928
  id: w?.userId,
@@ -3933,11 +3931,11 @@ const _e = () => {
3933
3931
  }
3934
3932
  }), !!(T.status && T.data.length > 0);
3935
3933
  } catch {
3936
- return await Ie({
3934
+ return await Ae({
3937
3935
  endpoint: n,
3938
3936
  accessToken: m,
3939
3937
  clientId: r,
3940
- type: Ae.VERIFY_REGISTRATION,
3938
+ type: Te.VERIFY_REGISTRATION,
3941
3939
  params: {
3942
3940
  clientId: r,
3943
3941
  id: w?.userId,
@@ -3947,16 +3945,16 @@ const _e = () => {
3947
3945
  }), !1;
3948
3946
  }
3949
3947
  return !1;
3950
- }, we = async () => {
3948
+ }, Ee = async () => {
3951
3949
  o({ type: Ne, payload: { isLoading: !0 } }), C();
3952
3950
  const w = gt();
3953
3951
  K(w), c("loginWithPasskey");
3954
3952
  const T = gt();
3955
- let S = await Ie({
3953
+ let S = await Ae({
3956
3954
  endpoint: n,
3957
3955
  accessToken: m,
3958
3956
  clientId: r,
3959
- type: Ae.GET_AUTHENTICATION_OPTIONS,
3957
+ type: Te.GET_AUTHENTICATION_OPTIONS,
3960
3958
  params: {
3961
3959
  id: T,
3962
3960
  clientId: r
@@ -3967,11 +3965,11 @@ const _e = () => {
3967
3965
  const le = await Sn({
3968
3966
  optionsJSON: S.data
3969
3967
  });
3970
- return S = await Ie({
3968
+ return S = await Ae({
3971
3969
  endpoint: n,
3972
3970
  accessToken: m,
3973
3971
  clientId: r,
3974
- type: Ae.VERIFY_AUTHENTICATION,
3972
+ type: Te.VERIFY_AUTHENTICATION,
3975
3973
  params: {
3976
3974
  clientId: r,
3977
3975
  id: T,
@@ -3981,8 +3979,8 @@ const _e = () => {
3981
3979
  sessionExpiration: t,
3982
3980
  ua: navigator.userAgent
3983
3981
  }
3984
- }), S.data.status === Ue ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
3985
- type: je,
3982
+ }), S.data.status === Le ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
3983
+ type: qe,
3986
3984
  payload: {
3987
3985
  authenticationType: Pe.PASSKEY,
3988
3986
  user: {
@@ -3993,11 +3991,11 @@ const _e = () => {
3993
3991
  }
3994
3992
  }), !0) : (v(bt), !1);
3995
3993
  } catch {
3996
- return await Ie({
3994
+ return await Ae({
3997
3995
  endpoint: n,
3998
3996
  accessToken: m,
3999
3997
  clientId: r,
4000
- type: Ae.VERIFY_AUTHENTICATION,
3998
+ type: Te.VERIFY_AUTHENTICATION,
4001
3999
  params: {
4002
4000
  clientId: r,
4003
4001
  id: T,
@@ -4020,7 +4018,7 @@ const _e = () => {
4020
4018
  getAccessToken: N,
4021
4019
  getIdToken: V,
4022
4020
  registeringForPasskey: ce,
4023
- loginWithPasskey: we
4021
+ loginWithPasskey: Ee
4024
4022
  },
4025
4023
  children: /* @__PURE__ */ h(Bn, { children: e })
4026
4024
  }
@@ -4040,16 +4038,16 @@ try {
4040
4038
  } catch {
4041
4039
  }
4042
4040
  const as = () => {
4043
- const e = nt(jr);
4041
+ const e = at(jr);
4044
4042
  if (!e)
4045
4043
  throw new Error("useAuth must be used within an AuthHookProvider");
4046
4044
  return e;
4047
- }, Wo = "I'm having trouble right now. Please try again later.", jo = "action-search", Vo = "action-sort", Qo = "action-toggle-prompt", Jo = "action-reset-prompt", ns = "sassy-saint-", Yo = "search", zo = "sort", Xo = "sort-timestamp", Zo = "sort-token-usage", ec = "sort-memory-direction", tc = "sort-memory-column", rc = "favorites-only", sc = "private-disclosure", ac = "reasoning-disclosure", is = "service-worker", gr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", nc = 10, ic = 30, oc = "av-prompt", cc = "av-prompt-editable", lc = "size-5 sm:size-4", uc = 30, dc = 15, hc = 130, fc = 160, mc = 16, pc = 24, yc = 76, gc = 76;
4048
- let Et = null, ae = !1;
4045
+ }, jo = "I'm having trouble right now. Please try again later.", Vo = "action-search", Jo = "action-sort", Qo = "action-toggle-prompt", Yo = "action-reset-prompt", ns = "sassy-saint-", zo = "search", Xo = "sort", Zo = "sort-timestamp", ec = "sort-token-usage", tc = "sort-memory-direction", rc = "sort-memory-column", sc = "favorites-only", ac = "private-disclosure", nc = "reasoning-disclosure", is = "service-worker", yr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", ic = 10, oc = 30, cc = "av-prompt", lc = "av-prompt-editable", uc = "size-5 sm:size-4", dc = 30, hc = 15, fc = 130, mc = 160, pc = 16, yc = 24, gc = 76, bc = 76;
4046
+ let Et = null, se = !1;
4049
4047
  typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
4050
- ae && (ae = !1, window.location.reload());
4048
+ se && (se = !1, window.location.reload());
4051
4049
  });
4052
- function Gt() {
4050
+ function Kt() {
4053
4051
  return "serviceWorker" in navigator;
4054
4052
  }
4055
4053
  function Nt() {
@@ -4058,7 +4056,7 @@ function Nt() {
4058
4056
  );
4059
4057
  return e === null ? !1 : e === "true";
4060
4058
  }
4061
- function qn(e) {
4059
+ function Wn(e) {
4062
4060
  localStorage.setItem(
4063
4061
  ns + is,
4064
4062
  e.toString()
@@ -4067,7 +4065,7 @@ function qn(e) {
4067
4065
  async function os() {
4068
4066
  if (!Nt())
4069
4067
  return !1;
4070
- if (!Gt())
4068
+ if (!Kt())
4071
4069
  return console.warn("[SW] Service workers not supported"), !1;
4072
4070
  try {
4073
4071
  return Et = await navigator.serviceWorker.register("/sw.js", {
@@ -4084,8 +4082,8 @@ async function os() {
4084
4082
  return console.error("[SW] Service worker registration failed:", e), !1;
4085
4083
  }
4086
4084
  }
4087
- async function Wn() {
4088
- if (!Gt())
4085
+ async function qn() {
4086
+ if (!Kt())
4089
4087
  return !1;
4090
4088
  try {
4091
4089
  const e = await navigator.serviceWorker.getRegistration();
@@ -4094,19 +4092,19 @@ async function Wn() {
4094
4092
  return console.error("[SW] Service worker un-registration failed:", e), !1;
4095
4093
  }
4096
4094
  }
4097
- async function bc(e) {
4098
- if (qn(e), e) {
4099
- ae = !0;
4095
+ async function Ec(e) {
4096
+ if (Wn(e), e) {
4097
+ se = !0;
4100
4098
  try {
4101
4099
  sessionStorage.setItem("sw-toggle-pending", "enabled");
4102
4100
  } catch {
4103
4101
  }
4104
- await os(), navigator.serviceWorker.controller && ae && (ae = !1, window.location.reload());
4102
+ await os(), navigator.serviceWorker.controller && se && (se = !1, window.location.reload());
4105
4103
  try {
4106
4104
  navigator.serviceWorker.ready.then(() => {
4107
- ae && Nt() && (ae = !1, window.location.reload());
4105
+ se && Nt() && (se = !1, window.location.reload());
4108
4106
  }), setTimeout(() => {
4109
- ae && Nt() && (ae = !1, window.location.reload());
4107
+ se && Nt() && (se = !1, window.location.reload());
4110
4108
  }, 3e3);
4111
4109
  } catch {
4112
4110
  }
@@ -4116,11 +4114,11 @@ async function bc(e) {
4116
4114
  } catch {
4117
4115
  }
4118
4116
  try {
4119
- Gt() && await jn();
4117
+ Kt() && await jn();
4120
4118
  } catch (t) {
4121
4119
  console.warn("[SW] Failed to invalidate cache:", t);
4122
4120
  }
4123
- await Wn(), window.location.reload();
4121
+ await qn(), window.location.reload();
4124
4122
  }
4125
4123
  }
4126
4124
  async function jn() {
@@ -4149,7 +4147,7 @@ async function jn() {
4149
4147
  function wt() {
4150
4148
  return "unknown";
4151
4149
  }
4152
- async function Ec(e = {}) {
4150
+ async function wc(e = {}) {
4153
4151
  const { urlLimitPerCache: t } = e;
4154
4152
  if (!("caches" in window))
4155
4153
  return { version: wt(), caches: [], totalItems: 0 };
@@ -4176,7 +4174,7 @@ async function Ec(e = {}) {
4176
4174
  return console.warn("[SW] getCacheInfo failed:", r), { version: wt(), caches: [], totalItems: 0 };
4177
4175
  }
4178
4176
  }
4179
- const wc = "user", Sc = "assistant", vc = "data", cs = "OpenAI", Vn = "Anthropic", Qn = "Google", Jn = "Perplexity", Tc = cs, Yn = "claude-sonnet-4", zn = "claude-3", Xn = "gpt-", Zn = "o3", ei = "o4", ti = "gemini", ri = "sonar", si = {
4177
+ const Sc = "user", vc = "assistant", Tc = "data", cs = "OpenAI", Vn = "Anthropic", Jn = "Google", Qn = "Perplexity", Ac = cs, Yn = "claude-sonnet-4", zn = "claude-3", Xn = "gpt-", Zn = "o3", ei = "o4", ti = "gemini", ri = "sonar", si = {
4180
4178
  [Vn]: [
4181
4179
  Yn,
4182
4180
  zn
@@ -4186,16 +4184,16 @@ const wc = "user", Sc = "assistant", vc = "data", cs = "OpenAI", Vn = "Anthropic
4186
4184
  Zn,
4187
4185
  ei
4188
4186
  ],
4189
- [Qn]: [ti],
4190
- [Jn]: [ri]
4191
- }, Ac = "x-diggidy-chat-id", Ic = (e) => {
4187
+ [Jn]: [ti],
4188
+ [Qn]: [ri]
4189
+ }, Ic = "x-diggidy-chat-id", _c = (e) => {
4192
4190
  for (const [t, r] of Object.entries(
4193
4191
  si
4194
4192
  ))
4195
4193
  if (r.some((s) => e.startsWith(s)))
4196
4194
  return t;
4197
4195
  return null;
4198
- }, _c = "timestamp", Rc = "tokenUsage", k = "Diggidy", Cc = {
4196
+ }, Rc = "timestamp", Cc = "tokenUsage", k = "Diggidy", Oc = {
4199
4197
  TOOL: {
4200
4198
  MEMORIES: "getUserMemories"
4201
4199
  },
@@ -4373,6 +4371,7 @@ const G = {
4373
4371
  items {
4374
4372
  memoryId
4375
4373
  text
4374
+ description
4376
4375
  categories
4377
4376
  sourceType
4378
4377
  confidence
@@ -4384,16 +4383,13 @@ const G = {
4384
4383
  total
4385
4384
  }
4386
4385
  }`,
4387
- UPDATE_MEMORY: `mutation UpdateMemory($user: String!, $memoryId: String!, $text: String!) {
4388
- updateMemory(user: $user, memoryId: $memoryId, text: $text)
4389
- }`,
4390
4386
  DELETE_MEMORY: `mutation DeleteMemory($user: String!, $memoryId: String!) {
4391
4387
  deleteMemory(user: $user, memoryId: $memoryId)
4392
4388
  }`,
4393
4389
  DELETE_MEMORIES: `mutation DeleteMemories($user: String!) {
4394
4390
  deleteMemories(user: $user)
4395
4391
  }`
4396
- }, z = {
4392
+ }, te = {
4397
4393
  GET_LOCATION: {
4398
4394
  schema: G.GET_LOCATION,
4399
4395
  method: "location"
@@ -4446,16 +4442,13 @@ const G = {
4446
4442
  schema: G.GET_USER_MEMORIES,
4447
4443
  method: "getUserMemories"
4448
4444
  },
4449
- UPDATE_MEMORY: {
4450
- schema: G.UPDATE_MEMORY
4451
- },
4452
4445
  DELETE_MEMORY: {
4453
4446
  schema: G.DELETE_MEMORY
4454
4447
  },
4455
4448
  DELETE_MEMORIES: {
4456
4449
  schema: G.DELETE_MEMORIES
4457
4450
  }
4458
- }, ii = process.env.PUBLIC_SASSY_API_SERVER_URL, ye = async ({
4451
+ }, ii = process.env.PUBLIC_SASSY_API_SERVER_URL, Oe = async ({
4459
4452
  query: e,
4460
4453
  data: t,
4461
4454
  headers: r = {},
@@ -4478,13 +4471,13 @@ const G = {
4478
4471
  try {
4479
4472
  let r;
4480
4473
  if (e.noAuth === !0)
4481
- r = await ye({
4474
+ r = await Oe({
4482
4475
  query: e.type.schema,
4483
4476
  data: t
4484
4477
  });
4485
4478
  else {
4486
4479
  const n = `Bearer ${e.accessToken}`;
4487
- r = await ye({
4480
+ r = await Oe({
4488
4481
  headers: {
4489
4482
  authorization: n
4490
4483
  },
@@ -4503,7 +4496,7 @@ const G = {
4503
4496
  } catch (r) {
4504
4497
  return console.error(r), { status: 500, data: [] };
4505
4498
  }
4506
- }, Oc = async ({
4499
+ }, kc = async ({
4507
4500
  provider: e,
4508
4501
  accessToken: t,
4509
4502
  username: r
@@ -4511,7 +4504,7 @@ const G = {
4511
4504
  try {
4512
4505
  await oi({
4513
4506
  accessToken: t,
4514
- type: z.SET_USER_PREFERENCES,
4507
+ type: te.SET_USER_PREFERENCES,
4515
4508
  params: {
4516
4509
  user: r,
4517
4510
  provider: e
@@ -4519,7 +4512,7 @@ const G = {
4519
4512
  });
4520
4513
  } catch {
4521
4514
  }
4522
- }, re = {
4515
+ }, oe = {
4523
4516
  CHATS: "chats",
4524
4517
  CHATS_STATS: "chatsStats",
4525
4518
  CAPABILITIES: "capabilities",
@@ -4527,16 +4520,16 @@ const G = {
4527
4520
  PREFERENCES: "preferences",
4528
4521
  USAGE: "usage",
4529
4522
  USER_MEMORIES: "userMemories"
4530
- }, kc = () => ge({
4531
- queryKey: [re.CAPABILITIES],
4532
- queryFn: async () => await Ee({
4533
- type: z.GET_SERVER_CAPABILITIES,
4523
+ }, Nc = () => ye({
4524
+ queryKey: [oe.CAPABILITIES],
4525
+ queryFn: async () => await be({
4526
+ type: te.GET_SERVER_CAPABILITIES,
4534
4527
  noAuth: !0
4535
4528
  })
4536
- }), Nc = () => ge({
4537
- queryKey: [re.CHANGELOGS],
4538
- queryFn: async () => await Ee({
4539
- type: z.GET_CHANGELOGS,
4529
+ }), Pc = () => ye({
4530
+ queryKey: [oe.CHANGELOGS],
4531
+ queryFn: async () => await be({
4532
+ type: te.GET_CHANGELOGS,
4540
4533
  noAuth: !0,
4541
4534
  params: {
4542
4535
  client: !0
@@ -4545,40 +4538,40 @@ const G = {
4545
4538
  }), ci = ({
4546
4539
  user: e,
4547
4540
  getAccessToken: t
4548
- }) => ge({
4549
- queryKey: [re.PREFERENCES, e],
4550
- queryFn: async () => await Ee({
4541
+ }) => ye({
4542
+ queryKey: [oe.PREFERENCES, e],
4543
+ queryFn: async () => await be({
4551
4544
  params: {
4552
4545
  user: e
4553
4546
  },
4554
- type: z.GET_USER_PREFERENCES,
4547
+ type: te.GET_USER_PREFERENCES,
4555
4548
  getAccessToken: t
4556
4549
  })
4557
- }), Pc = ({
4550
+ }), $c = ({
4558
4551
  user: e,
4559
4552
  getAccessToken: t
4560
- }) => ge({
4561
- queryKey: [re.CHATS_STATS, e],
4562
- queryFn: async () => await Ee({
4553
+ }) => ye({
4554
+ queryKey: [oe.CHATS_STATS, e],
4555
+ queryFn: async () => await be({
4563
4556
  params: {
4564
4557
  user: e
4565
4558
  },
4566
- type: z.GET_CHATS_STATS,
4559
+ type: te.GET_CHATS_STATS,
4567
4560
  getAccessToken: t
4568
4561
  })
4569
- }), $c = ({
4562
+ }), xc = ({
4570
4563
  user: e,
4571
4564
  searchString: t,
4572
4565
  sortDirection: r,
4573
4566
  sortedCell: s,
4574
4567
  getAccessToken: a,
4575
4568
  enabled: n = !0
4576
- }) => ge({
4569
+ }) => ye({
4577
4570
  enabled: n,
4578
4571
  staleTime: 60 * 1e3,
4579
4572
  // 1 minute
4580
- queryKey: [re.CHATS, e, t, r, s],
4581
- queryFn: async () => await Ee({
4573
+ queryKey: [oe.CHATS, e, t, r, s],
4574
+ queryFn: async () => await be({
4582
4575
  params: {
4583
4576
  user: e,
4584
4577
  searchString: t,
@@ -4587,25 +4580,25 @@ const G = {
4587
4580
  limit: 1,
4588
4581
  truncateSize: 100
4589
4582
  },
4590
- type: z.GET_CHATS,
4583
+ type: te.GET_CHATS,
4591
4584
  getAccessToken: a
4592
4585
  })
4593
- }), xc = ({
4586
+ }), Dc = ({
4594
4587
  user: e,
4595
4588
  month: t,
4596
4589
  year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
4597
4590
  getAccessToken: s,
4598
4591
  enabled: a = !0
4599
- }) => ge({
4592
+ }) => ye({
4600
4593
  enabled: a,
4601
- queryKey: [re.USAGE, e, t, r],
4602
- queryFn: async () => await Ee({
4594
+ queryKey: [oe.USAGE, e, t, r],
4595
+ queryFn: async () => await be({
4603
4596
  params: {
4604
4597
  user: e,
4605
4598
  month: t,
4606
4599
  year: r
4607
4600
  },
4608
- type: z.GET_USAGE,
4601
+ type: te.GET_USAGE,
4609
4602
  getAccessToken: s
4610
4603
  })
4611
4604
  }), Mc = ({
@@ -4613,50 +4606,25 @@ const G = {
4613
4606
  query: t,
4614
4607
  getAccessToken: r,
4615
4608
  enabled: s = !0
4616
- }) => ge({
4609
+ }) => ye({
4617
4610
  enabled: s && !!e,
4618
- queryKey: [re.USER_MEMORIES, e, t],
4619
- queryFn: async () => await Ee({
4611
+ queryKey: [oe.USER_MEMORIES, e, t],
4612
+ queryFn: async () => await be({
4620
4613
  params: { user: e, query: t },
4621
- type: z.GET_USER_MEMORIES,
4614
+ type: te.GET_USER_MEMORIES,
4622
4615
  getAccessToken: r
4623
4616
  })
4624
- }), Dc = ({
4625
- getAccessToken: e
4626
- }) => {
4627
- const t = Le();
4628
- return Ut({
4629
- mutationFn: async ({
4630
- user: r,
4631
- memoryId: s,
4632
- text: a
4633
- }) => {
4634
- const n = await e(), i = await ye({
4635
- query: z.UPDATE_MEMORY.schema,
4636
- data: { user: r, memoryId: s, text: a },
4637
- headers: { authorization: `Bearer ${n}` }
4638
- }), { data: o, errors: c } = await i.json();
4639
- if (c)
4640
- throw new Error(c[0]?.message || "Update memory failed");
4641
- return o.updateMemory;
4642
- },
4643
- onSuccess: (r, s) => {
4644
- t.invalidateQueries({
4645
- queryKey: [re.USER_MEMORIES, s.user]
4646
- });
4647
- }
4648
- });
4649
- }, Lc = ({
4617
+ }), Lc = ({
4650
4618
  getAccessToken: e
4651
4619
  }) => {
4652
- const t = Le();
4653
- return Ut({
4620
+ const t = nt();
4621
+ return Dr({
4654
4622
  mutationFn: async ({
4655
4623
  user: r,
4656
4624
  memoryId: s
4657
4625
  }) => {
4658
- const a = await e(), n = await ye({
4659
- query: z.DELETE_MEMORY.schema,
4626
+ const a = await e(), n = await Oe({
4627
+ query: te.DELETE_MEMORY.schema,
4660
4628
  data: { user: r, memoryId: s },
4661
4629
  headers: { authorization: `Bearer ${a}` }
4662
4630
  }), { data: i, errors: o } = await n.json();
@@ -4666,18 +4634,18 @@ const G = {
4666
4634
  },
4667
4635
  onSuccess: (r, s) => {
4668
4636
  t.invalidateQueries({
4669
- queryKey: [re.USER_MEMORIES, s.user]
4637
+ queryKey: [oe.USER_MEMORIES, s.user]
4670
4638
  });
4671
4639
  }
4672
4640
  });
4673
4641
  }, Uc = ({
4674
4642
  getAccessToken: e
4675
4643
  }) => {
4676
- const t = Le();
4677
- return Ut({
4644
+ const t = nt();
4645
+ return Dr({
4678
4646
  mutationFn: async ({ user: r }) => {
4679
- const s = await e(), a = await ye({
4680
- query: z.DELETE_MEMORIES.schema,
4647
+ const s = await e(), a = await Oe({
4648
+ query: te.DELETE_MEMORIES.schema,
4681
4649
  data: { user: r },
4682
4650
  headers: { authorization: `Bearer ${s}` }
4683
4651
  }), { data: n, errors: i } = await a.json();
@@ -4687,11 +4655,11 @@ const G = {
4687
4655
  },
4688
4656
  onSuccess: (r, s) => {
4689
4657
  t.invalidateQueries({
4690
- queryKey: [re.USER_MEMORIES, s.user]
4658
+ queryKey: [oe.USER_MEMORIES, s.user]
4691
4659
  });
4692
4660
  }
4693
4661
  });
4694
- }, Ee = async ({
4662
+ }, be = async ({
4695
4663
  params: e,
4696
4664
  type: t,
4697
4665
  noAuth: r,
@@ -4701,13 +4669,13 @@ const G = {
4701
4669
  const a = t?.data ? t.data(e) : e;
4702
4670
  let n;
4703
4671
  if (r === !0)
4704
- n = await ye({
4672
+ n = await Oe({
4705
4673
  query: t.schema,
4706
4674
  data: a
4707
4675
  });
4708
4676
  else if (s) {
4709
4677
  const f = await s();
4710
- n = await ye({
4678
+ n = await Oe({
4711
4679
  headers: {
4712
4680
  authorization: `Bearer ${f}`
4713
4681
  },
@@ -4729,7 +4697,7 @@ const G = {
4729
4697
  }
4730
4698
  }, ls = xt(
4731
4699
  void 0
4732
- ), br = {
4700
+ ), gr = {
4733
4701
  capabilities: /* @__PURE__ */ new Set(),
4734
4702
  version: null,
4735
4703
  status: "idle"
@@ -4738,7 +4706,7 @@ const G = {
4738
4706
  getAccessToken: t,
4739
4707
  children: r
4740
4708
  }) => {
4741
- const [s, a] = ie(br), n = Je(
4709
+ const [s, a] = ne(gr), n = Je(
4742
4710
  () => e ? `entitlements:${e}` : null,
4743
4711
  [e]
4744
4712
  ), i = Y(() => {
@@ -4759,19 +4727,19 @@ const G = {
4759
4727
  }
4760
4728
  return !1;
4761
4729
  }, [n]);
4762
- q(() => {
4730
+ W(() => {
4763
4731
  s.status === "idle" && i();
4764
4732
  }, [i, s.status]);
4765
4733
  const o = ci({ user: e, getAccessToken: t });
4766
- q(() => {
4734
+ W(() => {
4767
4735
  o.isLoading && s.status === "idle" && a((u) => ({ ...u, status: "loading" }));
4768
- }, [o.isLoading, s.status]), q(() => {
4736
+ }, [o.isLoading, s.status]), W(() => {
4769
4737
  o.isError && a((u) => ({
4770
4738
  ...u,
4771
4739
  status: "error",
4772
4740
  error: String(o.error)
4773
4741
  }));
4774
- }, [o.isError, o.error]), q(() => {
4742
+ }, [o.isError, o.error]), W(() => {
4775
4743
  const u = o.data?.entitlements;
4776
4744
  if (u && (a({
4777
4745
  capabilities: new Set(u.capabilities || []),
@@ -4810,7 +4778,7 @@ const G = {
4810
4778
  },
4811
4779
  [n]
4812
4780
  ), f = Y(() => {
4813
- if (a(br), n)
4781
+ if (a(gr), n)
4814
4782
  try {
4815
4783
  sessionStorage.removeItem(n);
4816
4784
  } catch {
@@ -4827,12 +4795,12 @@ const G = {
4827
4795
  return /* @__PURE__ */ h(ls.Provider, { value: d, children: r });
4828
4796
  };
4829
4797
  function Fc() {
4830
- const e = nt(ls);
4798
+ const e = at(ls);
4831
4799
  if (!e)
4832
4800
  throw new Error("useEntitlements must be used within EntitlementsProvider");
4833
4801
  return e;
4834
4802
  }
4835
- const Er = (e) => Number.isFinite(e) ? e : 0;
4803
+ const br = (e) => Number.isFinite(e) ? e : 0;
4836
4804
  function ui(e) {
4837
4805
  return {
4838
4806
  days: Math.trunc(e / 864e5),
@@ -4840,8 +4808,8 @@ function ui(e) {
4840
4808
  minutes: Math.trunc(e / 6e4 % 60),
4841
4809
  seconds: Math.trunc(e / 1e3 % 60),
4842
4810
  milliseconds: Math.trunc(e % 1e3),
4843
- microseconds: Math.trunc(Er(e * 1e3) % 1e3),
4844
- nanoseconds: Math.trunc(Er(e * 1e6) % 1e3)
4811
+ microseconds: Math.trunc(br(e * 1e3) % 1e3),
4812
+ nanoseconds: Math.trunc(br(e * 1e6) % 1e3)
4845
4813
  };
4846
4814
  }
4847
4815
  function di(e) {
@@ -4912,7 +4880,7 @@ function gi(e, t) {
4912
4880
  const f = t.colonNotation ? ":" : " ";
4913
4881
  return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), s + a.join(f);
4914
4882
  }
4915
- const us = process.env.NODE_ENV === "production", Bt = !us, ds = Bt ? "gizmette.local.com" : "gizmette.com", qt = (e, t) => {
4883
+ const us = process.env.NODE_ENV === "production", Gt = !us, ds = Gt ? "gizmette.local.com" : "gizmette.com", Bt = (e, t) => {
4916
4884
  const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", s = 0 | Math.abs(e), a = 0 | Math.abs(e) * 60 % 60, n = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
4917
4885
  return {
4918
4886
  dir: r,
@@ -4923,12 +4891,12 @@ const us = process.env.NODE_ENV === "production", Bt = !us, ds = Bt ? "gizmette.
4923
4891
  }, bi = (e) => {
4924
4892
  if (!e && e !== 0)
4925
4893
  return "N/A";
4926
- const t = qt(e, !1);
4894
+ const t = Bt(e, !1);
4927
4895
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
4928
4896
  }, Ei = (e) => {
4929
4897
  if (!e && e !== 0)
4930
4898
  return "N/A";
4931
- const t = qt(e, !0);
4899
+ const t = Bt(e, !0);
4932
4900
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
4933
4901
  }, wi = async () => {
4934
4902
  const e = {
@@ -4984,7 +4952,7 @@ const us = process.env.NODE_ENV === "production", Bt = !us, ds = Bt ? "gizmette.
4984
4952
  window.atob(e).split("").map(function(t) {
4985
4953
  return `%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`;
4986
4954
  }).join("")
4987
- ), Ti = (e, t, r) => t ? Object.keys(t).map((s) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ W("div", { className: "flex items-center justify-between", children: [
4955
+ ), Ti = (e, t, r) => t ? Object.keys(t).map((s) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ q("div", { className: "flex items-center justify-between", children: [
4988
4956
  /* @__PURE__ */ h(
4989
4957
  "dt",
4990
4958
  {
@@ -5081,7 +5049,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5081
5049
  theme: c,
5082
5050
  transition: f,
5083
5051
  icon: d
5084
- }), Hc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: ds, convertCamelCaseToReadable: $i, convertDDToDMS: qt, convertLatitudeToDMS: bi, convertLongitudeToDMS: Ei, debounce: Oi, durationFormatter: Ri, extractAverage: Ai, getCurrentGeoLocation: wi, getLayoutPaddingClass: fs, getMessageContaintWrapperClass: hs, isDev: Bt, isLastMessageFromRole: Ii, isPWAMode: Pi, isProbablyMobile: ps, isProbablyTablet: ys, isProbablyiPad: Ni, isProbablyiPhone: ki, isProd: us, isTauri: ms, numberFormatter: _i, obfuscate: Si, pluralize: Ci, renderDataAsList: Ti, toastOptions: xi, unObfuscate: vi }, Symbol.toStringTag, { value: "Module" })), wr = "av-button", ct = "icon", Wt = "button", Pt = "link", Mi = ({
5052
+ }), Hc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: ds, convertCamelCaseToReadable: $i, convertDDToDMS: Bt, convertLatitudeToDMS: bi, convertLongitudeToDMS: Ei, debounce: Oi, durationFormatter: Ri, extractAverage: Ai, getCurrentGeoLocation: wi, getLayoutPaddingClass: fs, getMessageContaintWrapperClass: hs, isDev: Gt, isLastMessageFromRole: Ii, isPWAMode: Pi, isProbablyMobile: ps, isProbablyTablet: ys, isProbablyiPad: Ni, isProbablyiPhone: ki, isProd: us, isTauri: ms, numberFormatter: _i, obfuscate: Si, pluralize: Ci, renderDataAsList: Ti, toastOptions: xi, unObfuscate: vi }, Symbol.toStringTag, { value: "Module" })), Er = "av-button", ct = "icon", Wt = "button", Pt = "link", Di = ({
5085
5053
  type: e,
5086
5054
  size: t,
5087
5055
  labelRight: r,
@@ -5117,7 +5085,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5117
5085
  "h-12": t === "large" && n && (r || s)
5118
5086
  });
5119
5087
  }
5120
- }, Di = ({
5088
+ }, Mi = ({
5121
5089
  type: e,
5122
5090
  size: t,
5123
5091
  labelRight: r,
@@ -5325,7 +5293,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5325
5293
  "focus:outline-focus-light": e === "light",
5326
5294
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
5327
5295
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
5328
- }), qi = ({
5296
+ }), Wi = ({
5329
5297
  mode: e,
5330
5298
  raw: t,
5331
5299
  iconClassName: r,
@@ -5352,7 +5320,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5352
5320
  } : s === "selected" && (a = {
5353
5321
  "text-copy-lighter": !0
5354
5322
  }), y(a, r);
5355
- }, Wi = ({
5323
+ }, qi = ({
5356
5324
  animated: e
5357
5325
  }) => y({
5358
5326
  "transition-opacity duration-300 ease-in-out": e
@@ -5374,8 +5342,8 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5374
5342
  align: p,
5375
5343
  radius: g,
5376
5344
  animated: b
5377
- }) => (l || (l = "primary"), r ? y(wr, t) : y(
5378
- wr,
5345
+ }) => (l || (l = "primary"), r ? y(Er, t) : y(
5346
+ Er,
5379
5347
  Li({
5380
5348
  mode: s,
5381
5349
  variant: l,
@@ -5384,7 +5352,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5384
5352
  }),
5385
5353
  Ui({ mode: s, noBackground: u, variant: l }),
5386
5354
  Fi({ radius: g }),
5387
- Mi({
5355
+ Di({
5388
5356
  type: e,
5389
5357
  size: o,
5390
5358
  labelRight: f,
@@ -5392,7 +5360,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5392
5360
  align: p,
5393
5361
  animated: b
5394
5362
  }),
5395
- Di({ type: e, size: o, labelRight: f, labelLeft: d }),
5363
+ Mi({ type: e, size: o, labelRight: f, labelLeft: d }),
5396
5364
  Gi({ mode: s, variant: l, noBorder: c }),
5397
5365
  Bi({ focusMode: a }),
5398
5366
  Hi({ mode: s, variant: l, disabled: n }),
@@ -5407,7 +5375,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5407
5375
  t
5408
5376
  )), ji = (e, t, r) => {
5409
5377
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
5410
- }, jt = oe.forwardRef((e, t) => {
5378
+ }, qt = ie.forwardRef((e, t) => {
5411
5379
  const { onClick: r, noInternalClick: s = !1, ...a } = e;
5412
5380
  return /* @__PURE__ */ h(
5413
5381
  "button",
@@ -5420,8 +5388,8 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5420
5388
  }
5421
5389
  );
5422
5390
  });
5423
- jt.displayName = "BaseButton";
5424
- const bs = oe.forwardRef(
5391
+ qt.displayName = "BaseButton";
5392
+ const bs = ie.forwardRef(
5425
5393
  ({
5426
5394
  children: e,
5427
5395
  disabled: t = !1,
@@ -5452,7 +5420,7 @@ const bs = oe.forwardRef(
5452
5420
  radius: u
5453
5421
  });
5454
5422
  return /* @__PURE__ */ h(
5455
- jt,
5423
+ qt,
5456
5424
  {
5457
5425
  ref: m,
5458
5426
  className: p,
@@ -5466,7 +5434,7 @@ const bs = oe.forwardRef(
5466
5434
  bs.displayName = "Button";
5467
5435
  function Vi() {
5468
5436
  const e = j(!1);
5469
- return q(() => (e.current = !0, () => {
5437
+ return W(() => (e.current = !0, () => {
5470
5438
  e.current = !1;
5471
5439
  }), []), Y(() => e.current, []);
5472
5440
  }
@@ -5478,7 +5446,7 @@ function Es(e) {
5478
5446
  });
5479
5447
  }, [...e]);
5480
5448
  }
5481
- const Qi = {
5449
+ const Ji = {
5482
5450
  x: 0,
5483
5451
  y: 0,
5484
5452
  width: 0,
@@ -5488,14 +5456,14 @@ const Qi = {
5488
5456
  bottom: 0,
5489
5457
  right: 0
5490
5458
  };
5491
- function Ve(e) {
5492
- const t = Vi(), r = j(0), s = j(null), [a, n] = ie(Qi), i = Je(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
5459
+ function je(e) {
5460
+ const t = Vi(), r = j(0), s = j(null), [a, n] = ne(Ji), i = Je(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
5493
5461
  const c = o[0];
5494
5462
  c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
5495
5463
  s.current && t() && n(c.contentRect);
5496
5464
  }));
5497
5465
  }), [t]);
5498
- return q(() => (s.current && i?.observe(s.current, e), () => {
5466
+ return W(() => (s.current && i?.observe(s.current, e), () => {
5499
5467
  i?.disconnect(), r.current && cancelAnimationFrame(r.current);
5500
5468
  }), [i, e]), [s, a];
5501
5469
  }
@@ -5510,21 +5478,21 @@ function ws(e) {
5510
5478
  return typeof r == "number" || typeof r == "string" ? `${s}${r}` : `${s}${t}`;
5511
5479
  }
5512
5480
  }
5513
- const qe = {
5481
+ const Be = {
5514
5482
  small: 24,
5515
5483
  // w-6
5516
5484
  medium: 32,
5517
5485
  // w-8
5518
5486
  large: 48
5519
5487
  // w-12
5520
- }, Ji = {
5488
+ }, Qi = {
5521
5489
  small: 16,
5522
5490
  // px-2 x 2
5523
5491
  medium: 24,
5524
5492
  // px-3 x 2
5525
5493
  large: 32
5526
5494
  // px-4 x 2
5527
- }, Yi = 2, zi = 300, st = oe.forwardRef(
5495
+ }, Yi = 2, zi = 300, rt = ie.forwardRef(
5528
5496
  ({
5529
5497
  children: e,
5530
5498
  disabled: t = !1,
@@ -5548,7 +5516,7 @@ const qe = {
5548
5516
  animated: A = !1,
5549
5517
  ...K
5550
5518
  }, R) => {
5551
- const J = gs({
5519
+ const Q = gs({
5552
5520
  type: ct,
5553
5521
  mode: r,
5554
5522
  focusMode: s,
@@ -5565,15 +5533,15 @@ const qe = {
5565
5533
  radius: b,
5566
5534
  variant: E,
5567
5535
  animated: A
5568
- }), C = qi({ mode: r, raw: o, iconClassName: O, variant: E }), v = Wi({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] = Ve(), [N, V] = Ve(), [ce, we] = Ve(), w = j(0), T = j(null), S = j(null), le = Es([R, T]);
5569
- return Ye(() => {
5570
- ce && ce.current && A && (w.current = we.width + Ji[u] + (c ? 0 : Yi), T.current && !T.current.style.width && (T.current.style.width = `${qe[u]}px`));
5571
- }, [we, ce, u, c, A]), Ye(() => {
5536
+ }), C = Wi({ mode: r, raw: o, iconClassName: O, variant: E }), v = qi({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] = je(), [N, V] = je(), [ce, Ee] = je(), w = j(0), T = j(null), S = j(null), le = Es([R, T]);
5537
+ return Qe(() => {
5538
+ ce && ce.current && A && (w.current = Ee.width + Qi[u] + (c ? 0 : Yi), T.current && !T.current.style.width && (T.current.style.width = `${Be[u]}px`));
5539
+ }, [Ee, ce, u, c, A]), Qe(() => {
5572
5540
  if (T && T.current && A) {
5573
- let ue = qe[u];
5574
- l && _ && I.width > 0 ? ue = I.width + w.current : m && N && V.width > 0 && (ue = V.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 > qe[u] && (S.current = setTimeout(() => {
5541
+ let ue = Be[u];
5542
+ l && _ && I.width > 0 ? ue = I.width + w.current : m && N && V.width > 0 && (ue = V.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 > Be[u] && (S.current = setTimeout(() => {
5575
5543
  _.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), S.current = null;
5576
- }, zi * 0.8))), ue === qe[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5544
+ }, zi * 0.8))), ue === Be[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5577
5545
  }
5578
5546
  }, [
5579
5547
  I,
@@ -5584,20 +5552,20 @@ const qe = {
5584
5552
  N,
5585
5553
  u,
5586
5554
  A
5587
- ]), q(() => () => {
5555
+ ]), W(() => () => {
5588
5556
  S.current && clearTimeout(S.current);
5589
5557
  }, []), /* @__PURE__ */ h(
5590
- jt,
5558
+ qt,
5591
5559
  {
5592
5560
  ref: le,
5593
- className: J,
5561
+ className: Q,
5594
5562
  disabled: t,
5595
5563
  type: i,
5596
5564
  "aria-label": f || d,
5597
5565
  ...K,
5598
- children: /* @__PURE__ */ W("div", { className: x, children: [
5566
+ children: /* @__PURE__ */ q("div", { className: x, children: [
5599
5567
  /* @__PURE__ */ h(
5600
- Sr,
5568
+ wr,
5601
5569
  {
5602
5570
  label: m,
5603
5571
  labelRef: N,
@@ -5608,7 +5576,7 @@ const qe = {
5608
5576
  ),
5609
5577
  /* @__PURE__ */ h("span", { ref: ce, className: C, children: e }),
5610
5578
  /* @__PURE__ */ h(
5611
- Sr,
5579
+ wr,
5612
5580
  {
5613
5581
  label: l,
5614
5582
  labelRef: _,
@@ -5621,7 +5589,7 @@ const qe = {
5621
5589
  }
5622
5590
  );
5623
5591
  }
5624
- ), Sr = ({
5592
+ ), wr = ({
5625
5593
  labelRef: e,
5626
5594
  labelClass: t,
5627
5595
  label: r,
@@ -5636,7 +5604,7 @@ const qe = {
5636
5604
  children: r && /* @__PURE__ */ h("span", { className: s, children: r })
5637
5605
  }
5638
5606
  );
5639
- st.displayName = "ButtonIcon";
5607
+ rt.displayName = "ButtonIcon";
5640
5608
  /*!
5641
5609
  @versini/ui-button v8.0.1
5642
5610
  © 2025 gizmette.com
@@ -5650,7 +5618,7 @@ try {
5650
5618
  });
5651
5619
  } catch {
5652
5620
  }
5653
- const Xi = oe.forwardRef(
5621
+ const Xi = ie.forwardRef(
5654
5622
  ({
5655
5623
  children: e,
5656
5624
  mode: t = "system",
@@ -5676,7 +5644,7 @@ const Xi = oe.forwardRef(
5676
5644
  }
5677
5645
  ) : "";
5678
5646
  return /* @__PURE__ */ h("div", { className: i, children: /* @__PURE__ */ h(
5679
- st,
5647
+ rt,
5680
5648
  {
5681
5649
  className: r,
5682
5650
  ref: n,
@@ -5691,7 +5659,7 @@ const Xi = oe.forwardRef(
5691
5659
  }
5692
5660
  );
5693
5661
  Xi.displayName = "ButtonSort";
5694
- const Qe = "av-card", Zi = ({
5662
+ const Ve = "av-card", Zi = ({
5695
5663
  className: e,
5696
5664
  headerClassName: t,
5697
5665
  bodyClassName: r,
@@ -5701,7 +5669,7 @@ const Qe = "av-card", Zi = ({
5701
5669
  noBorder: i
5702
5670
  }) => {
5703
5671
  const o = y(
5704
- Qe,
5672
+ Ve,
5705
5673
  "rounded-md",
5706
5674
  {
5707
5675
  "border-none": i,
@@ -5715,7 +5683,7 @@ const Qe = "av-card", Zi = ({
5715
5683
  "border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": a === "alt-system"
5716
5684
  },
5717
5685
  e
5718
- ), c = t || y(`${Qe}__header mt-0 border-b-2`, {
5686
+ ), c = t || y(`${Ve}__header mt-0 border-b-2`, {
5719
5687
  "text-copy-light border-border-accent": a === "darker",
5720
5688
  "border-border-accent": a === "dark",
5721
5689
  "border-border-medium": a === "light",
@@ -5723,7 +5691,7 @@ const Qe = "av-card", Zi = ({
5723
5691
  "border-border-accent dark:border-border-medium": a === "alt-system",
5724
5692
  "mb-4": !n,
5725
5693
  "mb-2": n
5726
- }), f = y(r), d = s || y(`${Qe}__footer pt-2`);
5694
+ }), f = y(r), d = s || y(`${Ve}__footer pt-2`);
5727
5695
  return {
5728
5696
  wrapper: o,
5729
5697
  header: c,
@@ -5754,7 +5722,7 @@ const to = ({
5754
5722
  ...u
5755
5723
  }) => {
5756
5724
  let l = null, m = null;
5757
- const p = typeof e == "string", g = ws(Qe), b = Zi({
5725
+ const p = typeof e == "string", g = ws(Ve), b = Zi({
5758
5726
  className: n,
5759
5727
  headerClassName: t,
5760
5728
  bodyClassName: i,
@@ -5763,7 +5731,7 @@ const to = ({
5763
5731
  compact: f,
5764
5732
  noBorder: d
5765
5733
  });
5766
- 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__ */ W(
5734
+ 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__ */ q(
5767
5735
  "section",
5768
5736
  {
5769
5737
  ...m && {
@@ -5812,7 +5780,7 @@ const lt = ({
5812
5780
  ...c
5813
5781
  }) => {
5814
5782
  const f = y(n, s);
5815
- return /* @__PURE__ */ W(
5783
+ return /* @__PURE__ */ q(
5816
5784
  "svg",
5817
5785
  {
5818
5786
  xmlns: "http://www.w3.org/2000/svg",
@@ -5866,7 +5834,7 @@ const ro = ({
5866
5834
  title: r,
5867
5835
  monotone: s,
5868
5836
  ...a
5869
- }) => /* @__PURE__ */ W(
5837
+ }) => /* @__PURE__ */ q(
5870
5838
  lt,
5871
5839
  {
5872
5840
  defaultViewBox: "0 0 640 512",
@@ -5894,7 +5862,7 @@ const ro = ({
5894
5862
  ...a
5895
5863
  }) => {
5896
5864
  const n = s ? "1" : "0.4";
5897
- return /* @__PURE__ */ W(
5865
+ return /* @__PURE__ */ q(
5898
5866
  lt,
5899
5867
  {
5900
5868
  defaultViewBox: "0 0 190 190",
@@ -5928,7 +5896,7 @@ const ro = ({
5928
5896
  title: r,
5929
5897
  monotone: s,
5930
5898
  ...a
5931
- }) => /* @__PURE__ */ W(
5899
+ }) => /* @__PURE__ */ q(
5932
5900
  lt,
5933
5901
  {
5934
5902
  defaultViewBox: "0 0 576 512",
@@ -5962,7 +5930,7 @@ try {
5962
5930
  });
5963
5931
  } catch {
5964
5932
  }
5965
- const io = "av-flexgrid", We = "av-flexgrid-item", at = 0.25, $t = oe.createContext({
5933
+ const io = "av-flexgrid", We = "av-flexgrid-item", st = 0.25, $t = ie.createContext({
5966
5934
  columnGap: 0,
5967
5935
  rowGap: 0
5968
5936
  }), oo = ({
@@ -5988,8 +5956,8 @@ const io = "av-flexgrid", We = "av-flexgrid-item", at = 0.25, $t = oe.createCont
5988
5956
  * by the columnGap and rowGap that will be applied
5989
5957
  * to all FlexgridItems (see context and paddings).
5990
5958
  */
5991
- marginLeft: r * -1 * at + "rem",
5992
- marginTop: s * -1 * at + "rem"
5959
+ marginLeft: r * -1 * st + "rem",
5960
+ marginTop: s * -1 * st + "rem"
5993
5961
  }, u = y(
5994
5962
  io,
5995
5963
  "box-border flex flex-wrap"
@@ -6097,9 +6065,9 @@ const io = "av-flexgrid", We = "av-flexgrid-item", at = 0.25, $t = oe.createCont
6097
6065
  span: r,
6098
6066
  ...s
6099
6067
  }) => {
6100
- const { columnGap: a, rowGap: n } = nt($t), i = {
6101
- paddingLeft: a * at + "rem",
6102
- paddingTop: n * at + "rem"
6068
+ const { columnGap: a, rowGap: n } = at($t), i = {
6069
+ paddingLeft: a * st + "rem",
6070
+ paddingTop: n * st + "rem"
6103
6071
  }, o = co({
6104
6072
  className: t,
6105
6073
  span: r
@@ -6149,7 +6117,7 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6149
6117
  t({
6150
6118
  type: vs
6151
6119
  }), typeof e == "function" && e();
6152
- }, vr = ({
6120
+ }, Sr = ({
6153
6121
  children: e,
6154
6122
  clearAnnouncementDelay: t,
6155
6123
  clearAnnouncementTimeoutRef: r,
@@ -6175,13 +6143,13 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6175
6143
  onAnnouncementClear: n,
6176
6144
  dispatch: i
6177
6145
  }) => {
6178
- clearTimeout(t.current), r ? t.current = setTimeout(vr, r, {
6146
+ clearTimeout(t.current), r ? t.current = setTimeout(Sr, r, {
6179
6147
  children: e,
6180
6148
  clearAnnouncementDelay: s,
6181
6149
  clearAnnouncementTimeoutRef: a,
6182
6150
  onAnnouncementClear: n,
6183
6151
  dispatch: i
6184
- }) : vr({
6152
+ }) : Sr({
6185
6153
  children: e,
6186
6154
  clearAnnouncementDelay: s,
6187
6155
  clearAnnouncementTimeoutRef: a,
@@ -6200,11 +6168,11 @@ function Ts({
6200
6168
  visible: o,
6201
6169
  ...c
6202
6170
  }) {
6203
- const f = j(null), d = j(null), [u, l] = _r(uo, {
6171
+ const f = j(null), d = j(null), [u, l] = Ir(uo, {
6204
6172
  announcement: null
6205
6173
  });
6206
6174
  let m = r;
6207
- typeof m > "u" && (m = s ? lo[s] : "assertive"), q(() => {
6175
+ typeof m > "u" && (m = s ? lo[s] : "assertive"), W(() => {
6208
6176
  fo({
6209
6177
  announcementTimeoutRef: f,
6210
6178
  announcementDelay: a,
@@ -6385,7 +6353,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6385
6353
  helperText: g,
6386
6354
  rightElement: b
6387
6355
  };
6388
- }, Vt = oe.forwardRef(
6356
+ }, jt = ie.forwardRef(
6389
6357
  ({
6390
6358
  id: e,
6391
6359
  name: t,
@@ -6407,7 +6375,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6407
6375
  size: E = "md",
6408
6376
  ...O
6409
6377
  }, A) => {
6410
- const [K, R] = Ve(), [J, C] = ie(0), v = ws({ id: e, prefix: `${As}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
6378
+ const [K, R] = je(), [Q, C] = ne(0), v = ws({ id: e, prefix: `${As}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
6411
6379
  xs: { label: "-25px", helperText: "30px" },
6412
6380
  sm: { label: "-29px", helperText: "34px" },
6413
6381
  md: { label: "-33px", helperText: "38px" },
@@ -6425,15 +6393,15 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6425
6393
  size: E,
6426
6394
  rightElementClassName: b
6427
6395
  });
6428
- return Ye(() => {
6396
+ return Qe(() => {
6429
6397
  R && R.width && C(R.width + 18 + 10);
6430
- }, [R]), Ye(() => {
6431
- const { label: ce, helperText: we } = N[E];
6398
+ }, [R]), Qe(() => {
6399
+ const { label: ce, helperText: Ee } = N[E];
6432
6400
  _?.current?.style.setProperty("--av-text-input-label", ce), I?.current?.style.setProperty(
6433
6401
  "--av-text-input-helper-text",
6434
- we
6402
+ Ee
6435
6403
  );
6436
- }, [E]), /* @__PURE__ */ W("div", { className: V.wrapper, children: [
6404
+ }, [E]), /* @__PURE__ */ q("div", { className: V.wrapper, children: [
6437
6405
  /* @__PURE__ */ h(
6438
6406
  "label",
6439
6407
  {
@@ -6455,7 +6423,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6455
6423
  className: V.input,
6456
6424
  ...p && { "aria-describedby": `${v}-helper` },
6457
6425
  ...s && { "aria-invalid": "true" },
6458
- ...g && !a && { style: { paddingRight: J } },
6426
+ ...g && !a && { style: { paddingRight: Q } },
6459
6427
  ...O
6460
6428
  }
6461
6429
  ),
@@ -6490,8 +6458,8 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6490
6458
  ] });
6491
6459
  }
6492
6460
  );
6493
- Vt.displayName = "TextInput";
6494
- const So = 500, vo = 5e3, To = 2e4, Is = oe.forwardRef(
6461
+ jt.displayName = "TextInput";
6462
+ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6495
6463
  ({
6496
6464
  name: e,
6497
6465
  disabled: t,
@@ -6505,7 +6473,7 @@ const So = 500, vo = 5e3, To = 2e4, Is = oe.forwardRef(
6505
6473
  rightElement: f,
6506
6474
  ...d
6507
6475
  }, u) => {
6508
- const [l, m] = ie(!0), [p, g] = ie({
6476
+ const [l, m] = ne(!0), [p, g] = ne({
6509
6477
  message: null,
6510
6478
  politeness: null
6511
6479
  }), b = j(!0), E = j(null), O = j(null), A = Es([u, O]), K = l ? "Show" : "Hide", R = () => {
@@ -6516,7 +6484,7 @@ const So = 500, vo = 5e3, To = 2e4, Is = oe.forwardRef(
6516
6484
  message: `${r} hiding characters`
6517
6485
  }), a && a(!0);
6518
6486
  }, To));
6519
- }, J = (I) => {
6487
+ }, Q = (I) => {
6520
6488
  I.preventDefault();
6521
6489
  const N = !b.current;
6522
6490
  b.current = N, R(), m(N), g({
@@ -6534,11 +6502,11 @@ const So = 500, vo = 5e3, To = 2e4, Is = oe.forwardRef(
6534
6502
  }, _ = (I) => {
6535
6503
  R(), n && n(I);
6536
6504
  };
6537
- return q(() => () => {
6505
+ return W(() => () => {
6538
6506
  E.current && clearTimeout(E.current);
6539
- }, []), /* @__PURE__ */ W(Ir, { children: [
6507
+ }, []), /* @__PURE__ */ q(Ar, { children: [
6540
6508
  /* @__PURE__ */ h(
6541
- Vt,
6509
+ jt,
6542
6510
  {
6543
6511
  ref: A,
6544
6512
  name: e,
@@ -6549,10 +6517,10 @@ const So = 500, vo = 5e3, To = 2e4, Is = oe.forwardRef(
6549
6517
  onBlur: v,
6550
6518
  onFocus: x,
6551
6519
  onChange: _,
6552
- rightElement: oe.cloneElement(f, {
6520
+ rightElement: ie.cloneElement(f, {
6553
6521
  ref: u,
6554
6522
  label: K,
6555
- onClick: J,
6523
+ onClick: Q,
6556
6524
  onBlur: C,
6557
6525
  disabled: t
6558
6526
  }),
@@ -6585,8 +6553,8 @@ try {
6585
6553
  });
6586
6554
  } catch {
6587
6555
  }
6588
- const Ao = "ASK! ME! ANYTHING!", Io = "⭐︎ AI DEV MODE ⭐︎", _o = "Log in with a password", Ro = "Log in with a Passkey", Kc = "Log out", Co = "Password", Gc = "Usage", Bc = "Profile", qc = "Settings", Wc = "Chat history", jc = "About", Qt = "Type your message here.", Vc = Qt, Qc = `${Qt}
6589
- Press Enter to send it or Shift+Enter for new line.`, Jc = `${Qt}
6556
+ const Ao = "ASK! ME! ANYTHING!", Io = "⭐︎ AI DEV MODE ⭐︎", _o = "Log in with a password", Ro = "Log in with a Passkey", Kc = "Log out", Co = "Password", Gc = "Usage", Bc = "Profile", Wc = "Settings", qc = "Chat history", jc = "About", Vt = "Type your message here.", Vc = Vt, Jc = `${Vt}
6557
+ Press Enter to send it or Shift+Enter for new line.`, Qc = `${Vt}
6590
6558
  Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "Review important details.", zc = [
6591
6559
  `Sometimes, ${k} just makes stuff up. ${P}`,
6592
6560
  `${k} may invent facts on the fly. ${P}`,
@@ -6662,7 +6630,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "
6662
6630
  className: e,
6663
6631
  isCapabilitiesSuccess: t,
6664
6632
  capabilities: r
6665
- }) => /* @__PURE__ */ W(
6633
+ }) => /* @__PURE__ */ q(
6666
6634
  "div",
6667
6635
  {
6668
6636
  className: y(
@@ -6671,26 +6639,26 @@ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "
6671
6639
  ),
6672
6640
  children: [
6673
6641
  /* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(ro, {}) }),
6674
- /* @__PURE__ */ W("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
6642
+ /* @__PURE__ */ q("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
6675
6643
  /* @__PURE__ */ h("h1", { children: k }),
6676
6644
  /* @__PURE__ */ h("h2", { children: t && r?.runningMode === "development" ? Io : Ao })
6677
6645
  ] })
6678
6646
  ]
6679
6647
  }
6680
6648
  ), ko = () => {
6681
- const { login: e, logoutReason: t, loginWithPasskey: r } = as(), [s, a] = ie(""), [n, i] = ie(""), [o, c] = ie(!0), [f, d] = ie({
6649
+ const { login: e, logoutReason: t, loginWithPasskey: r } = as(), [s, a] = ne(""), [n, i] = ne(""), [o, c] = ne(!0), [f, d] = ne({
6682
6650
  username: "",
6683
6651
  password: ""
6684
6652
  }), u = async (l) => {
6685
6653
  l.preventDefault(), await e(f.username, f.password) || (i(""), a("Invalid username or password"));
6686
6654
  };
6687
- return q(() => {
6655
+ return W(() => {
6688
6656
  document.getElementById("logo")?.classList.add("fadeOut"), setTimeout(() => {
6689
6657
  document.getElementById("root")?.classList.replace("app-hidden", "fadeIn");
6690
6658
  }, 500);
6691
- }), q(() => {
6659
+ }), W(() => {
6692
6660
  t && i(t);
6693
- }, [t]), /* @__PURE__ */ W("main", { className: fs({ extraClass: "mt-5" }), children: [
6661
+ }, [t]), /* @__PURE__ */ q("main", { className: fs({ extraClass: "mt-5" }), children: [
6694
6662
  /* @__PURE__ */ h(
6695
6663
  "div",
6696
6664
  {
@@ -6700,10 +6668,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "
6700
6668
  children: /* @__PURE__ */ h(Oo, {})
6701
6669
  }
6702
6670
  ),
6703
- /* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(oo, { alignHorizontal: "center", children: /* @__PURE__ */ h(he, { span: 6, children: /* @__PURE__ */ W(to, { mode: "dark", children: [
6671
+ /* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(oo, { alignHorizontal: "center", children: /* @__PURE__ */ h(he, { span: 6, children: /* @__PURE__ */ q(to, { mode: "dark", children: [
6704
6672
  /* @__PURE__ */ h(he, { 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 }) }),
6705
6673
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6706
- Vt,
6674
+ jt,
6707
6675
  {
6708
6676
  className: "mt-7",
6709
6677
  required: !0,
@@ -6736,7 +6704,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "
6736
6704
  name: "password",
6737
6705
  label: Co,
6738
6706
  rightElement: /* @__PURE__ */ h(
6739
- st,
6707
+ rt,
6740
6708
  {
6741
6709
  focusMode: "light",
6742
6710
  mode: "dark",
@@ -6767,10 +6735,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "
6767
6735
  children: _o
6768
6736
  }
6769
6737
  ) }),
6770
- !ms() && /* @__PURE__ */ W(Ir, { children: [
6738
+ !ms() && /* @__PURE__ */ q(Ar, { children: [
6771
6739
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
6772
6740
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6773
- st,
6741
+ rt,
6774
6742
  {
6775
6743
  variant: "selected",
6776
6744
  mode: "dark",
@@ -6785,10 +6753,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "
6785
6753
  ] })
6786
6754
  ] }) }) }) })
6787
6755
  ] });
6788
- }, No = new URL(document.location.href).searchParams, Tr = !!No.get("debug") || !1, Po = Os(() => import(
6756
+ }, No = new URL(document.location.href).searchParams, vr = !!No.get("debug") || !1, Po = Os(() => import(
6789
6757
  /* webpackChunkName: "LazyApp" */
6790
- "./App.C0TMLCXL.js"
6791
- ).then((e) => e.App)), $o = new Xs(), Ar = ({
6758
+ "./App.Ch8FU2zW.js"
6759
+ ).then((e) => e.App)), $o = new Xs(), Tr = ({
6792
6760
  isComponent: e,
6793
6761
  headerHeight: t
6794
6762
  }) => {
@@ -6805,20 +6773,20 @@ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "
6805
6773
  isComponent: e = !1,
6806
6774
  headerHeight: t = 0,
6807
6775
  domain: r = ds
6808
- }) => (q(() => {
6776
+ }) => (W(() => {
6809
6777
  e || os().catch((s) => {
6810
6778
  console.error("[SW] Failed to register service worker:", s);
6811
6779
  });
6812
- }, [e]), Bt ? /* @__PURE__ */ h(
6813
- yr,
6780
+ }, [e]), Gt ? /* @__PURE__ */ h(
6781
+ pr,
6814
6782
  {
6815
- clientId: gr,
6783
+ clientId: yr,
6816
6784
  domain: r,
6817
- debug: Tr,
6785
+ debug: vr,
6818
6786
  endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
6819
- children: /* @__PURE__ */ h(Ar, { isComponent: e, headerHeight: t })
6787
+ children: /* @__PURE__ */ h(Tr, { isComponent: e, headerHeight: t })
6820
6788
  }
6821
- ) : /* @__PURE__ */ h(yr, { clientId: gr, domain: r, debug: Tr, children: /* @__PURE__ */ h(Ar, { isComponent: e, headerHeight: t }) })), cl = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
6789
+ ) : /* @__PURE__ */ h(pr, { clientId: yr, domain: r, debug: vr, children: /* @__PURE__ */ h(Tr, { isComponent: e, headerHeight: t }) })), cl = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
6822
6790
  xo,
6823
6791
  {
6824
6792
  isComponent: !0,
@@ -6828,50 +6796,51 @@ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "
6828
6796
  );
6829
6797
  export {
6830
6798
  jc as ABOUT_TITLE,
6831
- Jo as ACTION_RESET_PROMPT,
6832
- jo as ACTION_SEARCH,
6833
- Vo as ACTION_SORT,
6799
+ Yo as ACTION_RESET_PROMPT,
6800
+ Vo as ACTION_SEARCH,
6801
+ Jo as ACTION_SORT,
6834
6802
  Qo as ACTION_TOGGLE_PROMPT,
6835
6803
  al as APP_CLASSNAME,
6836
6804
  bs as C,
6837
6805
  ol as CARDS,
6838
6806
  Yc as CLIPBOARD_PROMPT,
6839
- lc as DEFAULT_ICON_ACTION_SIZE,
6807
+ uc as DEFAULT_ICON_ACTION_SIZE,
6840
6808
  Vn as E,
6841
- Wo as ERROR_MESSAGE,
6809
+ jo as ERROR_MESSAGE,
6842
6810
  zc as FOOTER_DISCLAIMERS,
6843
- Wc as HISTORY_TITLE,
6811
+ qc as HISTORY_TITLE,
6844
6812
  lt as I,
6845
- ic as INFINITE_SCROLL_LIMIT,
6846
- nc as INFINITE_SCROLL_THRESHOLD,
6847
- mc as INPUT_BOTTOM_OFFSET,
6848
- gc as INPUT_BOTTOM_OFFSET_EXTRA,
6849
- yc as INPUT_BOTTOM_OFFSET_IPAD,
6850
- pc as INPUT_BOTTOM_OFFSET_IPHONE,
6851
- Jc as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
6852
- Qc as INPUT_PLACEHOLDER_TEXT_ENTER,
6813
+ oc as INFINITE_SCROLL_LIMIT,
6814
+ ic as INFINITE_SCROLL_THRESHOLD,
6815
+ pc as INPUT_BOTTOM_OFFSET,
6816
+ bc as INPUT_BOTTOM_OFFSET_EXTRA,
6817
+ gc as INPUT_BOTTOM_OFFSET_IPAD,
6818
+ yc as INPUT_BOTTOM_OFFSET_IPHONE,
6819
+ Qc as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
6820
+ Jc as INPUT_PLACEHOLDER_TEXT_ENTER,
6853
6821
  Vc as INPUT_PLACEHOLDER_TEXT_MOBILE,
6854
6822
  oo as L,
6855
- rc as LOCAL_STORAGE_FAVORITES_ONLY,
6823
+ sc as LOCAL_STORAGE_FAVORITES_ONLY,
6856
6824
  ns as LOCAL_STORAGE_PREFIX,
6857
- sc as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
6858
- ac as LOCAL_STORAGE_REASONING_DISCLOSURE,
6859
- Yo as LOCAL_STORAGE_SEARCH,
6860
- zo as LOCAL_STORAGE_SORT,
6861
- tc as LOCAL_STORAGE_SORT_MEMORY_COLUMN,
6862
- ec as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
6863
- Xo as LOCAL_STORAGE_SORT_TIMESTAMP,
6864
- Zo as LOCAL_STORAGE_SORT_TOKEN_USAGE,
6825
+ ac as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
6826
+ nc as LOCAL_STORAGE_REASONING_DISCLOSURE,
6827
+ zo as LOCAL_STORAGE_SEARCH,
6828
+ Xo as LOCAL_STORAGE_SORT,
6829
+ rc as LOCAL_STORAGE_SORT_MEMORY_COLUMN,
6830
+ tc as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
6831
+ Zo as LOCAL_STORAGE_SORT_TIMESTAMP,
6832
+ ec as LOCAL_STORAGE_SORT_TOKEN_USAGE,
6865
6833
  Kc as LOG_OUT,
6866
6834
  Oo as Logo,
6867
6835
  _c as Oe,
6868
6836
  Bc as PROFILE_TITLE,
6869
6837
  Xc as PROMPTS_DESCRIPTION,
6870
- oc as PROMPT_CLASSNAME,
6871
- cc as PROMPT_EDITABLE_AREA_CLASSNAME,
6838
+ cc as PROMPT_CLASSNAME,
6839
+ lc as PROMPT_EDITABLE_AREA_CLASSNAME,
6840
+ Oc as Pe,
6872
6841
  to as S,
6873
- z as SERVICE_TYPES,
6874
- qc as SETTINGS_TITLE,
6842
+ te as SERVICE_TYPES,
6843
+ Wc as SETTINGS_TITLE,
6875
6844
  cl as SassySaint,
6876
6845
  sl as TOAST_CACHE_DISABLED,
6877
6846
  rl as TOAST_CACHE_ENABLED,
@@ -6880,25 +6849,24 @@ export {
6880
6849
  Zc as TOAST_PROVIDER_CHANGED,
6881
6850
  nl as TRIMESTERS,
6882
6851
  il as TRIMESTERS_SHORT,
6883
- dc as UI_BUTTON_SCROLL_BUFFER,
6884
- hc as UI_DEFAULT_MAIN_HEIGHT,
6885
- fc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
6886
- uc as UI_FOOTER_BUFFER,
6852
+ hc as UI_BUTTON_SCROLL_BUFFER,
6853
+ fc as UI_DEFAULT_MAIN_HEIGHT,
6854
+ mc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
6855
+ dc as UI_FOOTER_BUFFER,
6887
6856
  Gc as USAGE_TITLE,
6888
- Vt as Y,
6889
- wc as a,
6857
+ jt as Y,
6858
+ k as _e,
6859
+ Sc as a,
6890
6860
  Xi as b,
6891
- Sc as c,
6861
+ vc as c,
6892
6862
  $i as convertCamelCaseToReadable,
6893
- Ic as de,
6894
6863
  Oi as debounce,
6895
- Cc as fe,
6896
- Ec as getCacheInfo,
6864
+ wc as getCacheInfo,
6897
6865
  wi as getCurrentGeoLocation,
6898
6866
  fs as getLayoutPaddingClass,
6899
6867
  hs as getMessageContaintWrapperClass,
6900
- Ve as h,
6901
- bc as handleServiceWorkerToggle,
6868
+ je as h,
6869
+ Ec as handleServiceWorkerToggle,
6902
6870
  ws as i,
6903
6871
  cs as i$1,
6904
6872
  Pi as isPWAMode,
@@ -6913,31 +6881,30 @@ export {
6913
6881
  Rc as le,
6914
6882
  oi as mutateCall,
6915
6883
  as as n,
6916
- vc as ne,
6884
+ Tc as ne,
6917
6885
  _i as numberFormatter,
6918
6886
  Es as o,
6919
6887
  Si as obfuscate,
6920
- Tc as oe,
6921
- k as pe,
6888
+ Ac as oe,
6889
+ Cc as pe,
6922
6890
  Ci as pluralize,
6923
6891
  Ti as renderDataAsList,
6924
6892
  ii as serverUrl,
6925
- Oc as setNewProvider,
6926
- st as te,
6927
- Ac as ue,
6893
+ kc as setNewProvider,
6894
+ rt as te,
6895
+ Ic as ue,
6928
6896
  vi as unObfuscate,
6929
- Nc as useChangelogs,
6930
- $c as useChatsHistory,
6931
- xc as useChatsUsage,
6897
+ Pc as useChangelogs,
6898
+ xc as useChatsHistory,
6899
+ Dc as useChatsUsage,
6932
6900
  Uc as useDeleteAllMemories,
6933
6901
  Lc as useDeleteMemory,
6934
6902
  Fc as useEntitlements,
6935
- kc as useServerCapabilities,
6936
- Dc as useUpdateMemory,
6937
- Pc as useUserChatStats,
6903
+ Nc as useServerCapabilities,
6904
+ $c as useUserChatStats,
6938
6905
  Mc as useUserMemories,
6939
6906
  ci as useUserPreferences,
6940
6907
  Hc as utilities,
6941
6908
  Ts as x,
6942
- Qn as y
6909
+ Jn as y
6943
6910
  };