@versini/sassysaint 8.58.1 → 8.59.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 (27) hide show
  1. package/dist/chunks/{AboutChangelog.BM1-zFZM.js → AboutChangelog.VIMWfrJ2.js} +2 -2
  2. package/dist/chunks/{AboutEntry.DfLsDzG1.js → AboutEntry.HhBVaghX.js} +10 -10
  3. package/dist/chunks/{App.Balhn4jc.js → App.DFkumxrG.js} +1798 -1780
  4. package/dist/chunks/{Chart.B4r5Joie.js → Chart.DyiU5Qev.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.B3aLcyR7.js → ChatBubbleAssistant.a1OalMkY.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.L2nrTTCp.js → ChatBubbleUser.DP50erQL.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BY5_43Ex.js → ChatHistoryTable.9NfCFVTm.js} +5 -8
  8. package/dist/chunks/{HistoryEntry.vZ-0q0SU.js → HistoryEntry.Dz-6Alzn.js} +14 -14
  9. package/dist/chunks/{ProfileEntry.CWyib1bA.js → ProfileEntry.DJ4q6KoG.js} +2 -2
  10. package/dist/chunks/SettingsEntry.Cc0vofff.js +430 -0
  11. package/dist/chunks/{Table.BP4ZK6Pk.js → Table.CGJz3l0P.js} +2 -2
  12. package/dist/chunks/{UsageEntry.D7MV-eCu.js → UsageEntry.B6zt1DS_.js} +3 -3
  13. package/dist/chunks/UserMemoriesPanel.C2262GRv.js +693 -0
  14. package/dist/chunks/{index.BeBixuPU.js → index.6QVNoWZY.js} +616 -584
  15. package/dist/chunks/{index.Bc-X18su.js → index.BlzmTlvN.js} +2 -2
  16. package/dist/chunks/{index.CBnN5_87.js → index.CGcokH1z.js} +3 -3
  17. package/dist/chunks/{index.DbpavyRg.js → index.CV96FPnP.js} +1 -1
  18. package/dist/chunks/{index.CLbzehfM.js → index.D69nnw0C.js} +1 -1
  19. package/dist/chunks/{index.B5p62t9I.js → index.DXesyWpt.js} +1 -1
  20. package/dist/chunks/{index.C6J55Ybr.js → index.en8Vui5r.js} +1 -1
  21. package/dist/chunks/{useMarkdown.BaYRZB8J.js → useMarkdown.DRQL-Q_k.js} +6 -6
  22. package/dist/components/SassySaint/SassySaint.js +1 -1
  23. package/dist/index.js +4 -4
  24. package/dist/style.css +1 -1
  25. package/package.json +3 -3
  26. package/dist/chunks/SettingsEntry.cDiKWcA-.js +0 -777
  27. package/dist/chunks/UserMemoriesPanel.CGv5qTeN.js +0 -197
@@ -1,6 +1,6 @@
1
- import { jsx as h, jsxs as q, Fragment as Ar } from "react/jsx-runtime";
1
+ import { jsx as h, jsxs as W, Fragment as Ir } from "react/jsx-runtime";
2
2
  import * as H 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";
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";
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 _r(e, t) {
76
+ function Rr(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 J(e, t) {
82
+ function Q(e, t) {
83
83
  return typeof e == "function" ? e(t) : e;
84
84
  }
85
- function Qt(e, t) {
85
+ function Yt(e, t) {
86
86
  const {
87
87
  type: r = "all",
88
88
  exact: s,
@@ -93,7 +93,7 @@ function Qt(e, t) {
93
93
  } = e;
94
94
  if (i) {
95
95
  if (s) {
96
- if (t.queryHash !== Dt(i, t.options))
96
+ if (t.queryHash !== Mt(i, t.options))
97
97
  return !1;
98
98
  } else if (!xe(t.queryKey, i))
99
99
  return !1;
@@ -105,7 +105,7 @@ function Qt(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 Yt(e, t) {
108
+ function zt(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 Yt(e, t) {
118
118
  }
119
119
  return !(s && t.state.status !== s || a && !a(t));
120
120
  }
121
- function Dt(e, t) {
121
+ function Mt(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 = zt(e) && zt(t);
137
+ const r = Xt(e) && Xt(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 Ye(e, t) {
156
+ function ze(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 Ye(e, t) {
161
161
  return !1;
162
162
  return !0;
163
163
  }
164
- function zt(e) {
164
+ function Xt(e) {
165
165
  return Array.isArray(e) && e.length === Object.keys(e).length;
166
166
  }
167
167
  function It(e) {
168
- if (!Xt(e))
168
+ if (!Zt(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 !(!Xt(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
174
+ return !(!Zt(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
175
175
  }
176
- function Xt(e) {
176
+ function Zt(e) {
177
177
  return Object.prototype.toString.call(e) === "[object Object]";
178
178
  }
179
- function Ds(e) {
179
+ function Ms(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 Ms(e, t, r = 0) {
200
+ function Ds(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 ze = Symbol();
209
- function Rr(e, t) {
210
- return process.env.NODE_ENV !== "production" && e.queryFn === ze && console.error(
208
+ var Xe = Symbol();
209
+ function Cr(e, t) {
210
+ return process.env.NODE_ENV !== "production" && e.queryFn === Xe && 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 === ze ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
212
+ ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === Xe ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
213
213
  }
214
- function Cr(e, t) {
214
+ function Or(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
- }, Mt = new Us();
254
+ }, Dt = 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
- }, Xe = new Ks();
368
+ }, Ze = new Ks();
369
369
  function Gs(e) {
370
370
  return Math.min(1e3 * 2 ** e, 3e4);
371
371
  }
372
- function Or(e) {
373
- return (e ?? "online") === "online" ? Xe.isOnline() : !0;
372
+ function kr(e) {
373
+ return (e ?? "online") === "online" ? Ze.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 kr(e) {
380
+ function Nr(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 kr(e) {
388
388
  t = !0;
389
389
  }, c = () => {
390
390
  t = !1;
391
- }, f = () => Mt.isFocused() && (e.networkMode === "always" || Xe.isOnline()) && e.canRun(), d = () => Or(e.networkMode) && e.canRun(), u = (g) => {
391
+ }, f = () => Dt.isFocused() && (e.networkMode === "always" || Ze.isOnline()) && e.canRun(), d = () => kr(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 kr(e) {
416
416
  l(E);
417
417
  return;
418
418
  }
419
- r++, e.onFail?.(r, E), Ds(K).then(() => f() ? void 0 : m()).then(() => {
419
+ r++, e.onFail?.(r, E), Ms(K).then(() => f() ? void 0 : m()).then(() => {
420
420
  t ? l(E) : p();
421
421
  });
422
422
  });
@@ -432,7 +432,7 @@ function kr(e) {
432
432
  start: () => (d() ? p() : m().then(p), a)
433
433
  };
434
434
  }
435
- var Nr = class {
435
+ var Pr = class {
436
436
  #e;
437
437
  destroy() {
438
438
  this.clearGcTimeout();
@@ -451,7 +451,7 @@ var Nr = class {
451
451
  clearGcTimeout() {
452
452
  this.#e && (fe.clearTimeout(this.#e), this.#e = void 0);
453
453
  }
454
- }, Bs = class extends Nr {
454
+ }, Bs = class extends Pr {
455
455
  #e;
456
456
  #t;
457
457
  #r;
@@ -460,7 +460,7 @@ var Nr = 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 = Zt(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 = er(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 Nr = 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 = Zt(this.options);
473
+ const t = er(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 Nr = class {
504
504
  }
505
505
  isActive() {
506
506
  return this.observers.some(
507
- (e) => J(e.options.enabled, this) !== !1
507
+ (e) => Q(e.options.enabled, this) !== !1
508
508
  );
509
509
  }
510
510
  isDisabled() {
511
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === ze || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
511
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === Xe || 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 Nr = 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 : !_r(this.state.dataUpdatedAt, e);
524
+ return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !Rr(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 Nr = class {
564
564
  get: () => (this.#o = !0, r.signal)
565
565
  });
566
566
  }, a = () => {
567
- const o = Rr(this.options, t), f = (() => {
567
+ const o = Cr(this.options, t), f = (() => {
568
568
  const d = {
569
569
  client: this.#a,
570
570
  queryKey: this.queryKey,
@@ -588,7 +588,7 @@ var Nr = 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 = kr({
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({
592
592
  initialPromise: t?.initialPromise,
593
593
  fn: i.fetchFn,
594
594
  onCancel: (o) => {
@@ -669,7 +669,7 @@ var Nr = class {
669
669
  case "fetch":
670
670
  return {
671
671
  ...r,
672
- ...Pr(r.data, this.options),
672
+ ...$r(r.data, this.options),
673
673
  fetchMeta: e.meta ?? null
674
674
  };
675
675
  case "success":
@@ -719,18 +719,18 @@ var Nr = class {
719
719
  });
720
720
  }
721
721
  };
722
- function Pr(e, t) {
722
+ function $r(e, t) {
723
723
  return {
724
724
  fetchFailureCount: 0,
725
725
  fetchFailureReason: null,
726
- fetchStatus: Or(t.networkMode) ? "fetching" : "paused",
726
+ fetchStatus: kr(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 Zt(e) {
733
+ function er(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 Zt(e) {
747
747
  fetchStatus: "idle"
748
748
  };
749
749
  }
750
- var Ws = class extends ke {
750
+ var qs = 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 Ws = 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), er(this.#t, this.options) ? this.#d() : this.updateResult(), this.#E());
775
+ this.listeners.size === 1 && (this.#t.addObserver(this), tr(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 Ws = 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 J(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 Q(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 && !Ye(this.options, t) && this.#e.getQueryCache().notify({
803
+ this.#v(), this.#t.setOptions(this.options), t._defaulted && !ze(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 && tr(
809
+ s && rr(
810
810
  this.#t,
811
811
  r,
812
812
  this.options,
813
813
  t
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();
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();
815
815
  const a = this.#g();
816
- s && (this.#t !== r || J(this.options.enabled, this.#t) !== J(t.enabled, this.#t) || a !== this.#c) && this.#b(a);
816
+ s && (this.#t !== r || Q(this.options.enabled, this.#t) !== Q(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 Ws = class extends ke {
868
868
  );
869
869
  if (me || this.#a.isStale || !Tt(e))
870
870
  return;
871
- const r = _r(this.#a.dataUpdatedAt, e) + 1;
871
+ const r = Rr(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 Ws = 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 || 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();
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();
882
882
  }, this.#c));
883
883
  }
884
884
  #E() {
@@ -894,10 +894,10 @@ var Ws = 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 && er(e, t), _ = v && tr(e, r, t, s);
897
+ const v = this.hasListeners(), x = !v && tr(e, t), _ = v && rr(e, r, t, s);
898
898
  (x || _) && (d = {
899
899
  ...d,
900
- ...Pr(f.data, e.options)
900
+ ...$r(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 Ws = class extends ke {
950
950
  isStale: Lt(e, t),
951
951
  refetch: this.refetch,
952
952
  promise: this.#o,
953
- isEnabled: J(t.enabled, e) !== !1
953
+ isEnabled: Q(t.enabled, e) !== !1
954
954
  };
955
955
  if (this.options.experimental_prefetchInRender) {
956
956
  const v = (I) => {
@@ -975,7 +975,7 @@ var Ws = 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), Ye(t, e))
978
+ if (this.#s = this.#t.state, this.#i = this.options, this.#s.data !== void 0 && (this.#f = this.#t), ze(t, e))
979
979
  return;
980
980
  this.#a = t;
981
981
  const r = () => {
@@ -1015,29 +1015,29 @@ var Ws = class extends ke {
1015
1015
  });
1016
1016
  }
1017
1017
  };
1018
- function qs(e, t) {
1019
- return J(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1018
+ function Ws(e, t) {
1019
+ return Q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1020
1020
  }
1021
- function er(e, t) {
1022
- return qs(e, t) || e.state.data !== void 0 && Ot(e, t, t.refetchOnMount);
1021
+ function tr(e, t) {
1022
+ return Ws(e, t) || e.state.data !== void 0 && Ot(e, t, t.refetchOnMount);
1023
1023
  }
1024
1024
  function Ot(e, t, r) {
1025
- if (J(t.enabled, e) !== !1 && de(t.staleTime, e) !== "static") {
1025
+ if (Q(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 tr(e, t, r, s) {
1032
- return (e !== t || J(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Lt(e, r);
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);
1033
1033
  }
1034
1034
  function Lt(e, t) {
1035
- return J(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
1035
+ return Q(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
1036
1036
  }
1037
1037
  function js(e, t) {
1038
- return !Ye(e.getCurrentResult(), t);
1038
+ return !ze(e.getCurrentResult(), t);
1039
1039
  }
1040
- function rr(e) {
1040
+ function sr(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 rr(e) {
1051
1051
  d = !0;
1052
1052
  }), t.signal)
1053
1053
  });
1054
- }, l = Rr(t.options, t.fetchOptions), m = async (p, g, b) => {
1054
+ }, l = Cr(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 Q = {
1060
+ const J = {
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(Q), Q;
1068
- })(), A = await l(O), { maxPages: K } = t.options, R = b ? Ls : Ms;
1067
+ return u(J), J;
1068
+ })(), A = await l(O), { maxPages: K } = t.options, R = b ? Ls : Ds;
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 : sr, b = {
1075
+ const p = a === "backward", g = p ? Vs : ar, b = {
1076
1076
  pages: n,
1077
1077
  pageParams: i
1078
1078
  }, E = g(s, b);
@@ -1080,7 +1080,7 @@ function rr(e) {
1080
1080
  } else {
1081
1081
  const p = e ?? n.length;
1082
1082
  do {
1083
- const g = c === 0 ? i[0] ?? s.initialPageParam : sr(s, o);
1083
+ const g = c === 0 ? i[0] ?? s.initialPageParam : ar(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 rr(e) {
1101
1101
  }
1102
1102
  };
1103
1103
  }
1104
- function sr(e, { pages: t, pageParams: r }) {
1104
+ function ar(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 sr(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 Js = class extends Nr {
1116
+ var Qs = class extends Pr {
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 || $r(), 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 || xr(), 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 Js = class extends Nr {
1156
1156
  meta: this.options.meta,
1157
1157
  mutationKey: this.options.mutationKey
1158
1158
  };
1159
- this.#a = kr({
1159
+ this.#a = Nr({
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 Js = class extends Nr {
1316
1316
  });
1317
1317
  }
1318
1318
  };
1319
- function $r() {
1319
+ function xr() {
1320
1320
  return {
1321
1321
  context: void 0,
1322
1322
  data: void 0,
@@ -1329,7 +1329,7 @@ function $r() {
1329
1329
  submittedAt: 0
1330
1330
  };
1331
1331
  }
1332
- var Qs = class extends ke {
1332
+ var Js = 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 Qs = class extends ke {
1337
1337
  #t;
1338
1338
  #r;
1339
1339
  build(e, t, r) {
1340
- const s = new Js({
1340
+ const s = new Qs({
1341
1341
  client: e,
1342
1342
  mutationCache: this,
1343
1343
  mutationId: ++this.#r,
@@ -1348,7 +1348,7 @@ var Qs = class extends ke {
1348
1348
  }
1349
1349
  add(e) {
1350
1350
  this.#e.add(e);
1351
- const t = Ue(e);
1351
+ const t = Fe(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 Qs = class extends ke {
1357
1357
  }
1358
1358
  remove(e) {
1359
1359
  if (this.#e.delete(e)) {
1360
- const t = Ue(e);
1360
+ const t = Fe(e);
1361
1361
  if (typeof t == "string") {
1362
1362
  const r = this.#t.get(t);
1363
1363
  if (r)
@@ -1370,7 +1370,7 @@ var Qs = class extends ke {
1370
1370
  this.notify({ type: "removed", mutation: e });
1371
1371
  }
1372
1372
  canRun(e) {
1373
- const t = Ue(e);
1373
+ const t = Fe(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 Qs = class extends ke {
1380
1380
  return !0;
1381
1381
  }
1382
1382
  runNext(e) {
1383
- const t = Ue(e);
1383
+ const t = Fe(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 Qs = class extends ke {
1396
1396
  find(e) {
1397
1397
  const t = { exact: !0, ...e };
1398
1398
  return this.getAll().find(
1399
- (r) => Yt(t, r)
1399
+ (r) => zt(t, r)
1400
1400
  );
1401
1401
  }
1402
1402
  findAll(e = {}) {
1403
- return this.getAll().filter((t) => Yt(e, t));
1403
+ return this.getAll().filter((t) => zt(e, t));
1404
1404
  }
1405
1405
  notify(e) {
1406
1406
  $.batch(() => {
@@ -1418,7 +1418,7 @@ var Qs = class extends ke {
1418
1418
  );
1419
1419
  }
1420
1420
  };
1421
- function Ue(e) {
1421
+ function Fe(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), Ye(this.options, t) || this.#e.getMutationCache().notify({
1437
+ this.options = this.#e.defaultMutationOptions(e), ze(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 ?? $r();
1459
+ const e = this.#r?.state ?? xr();
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 ?? Dt(s, t);
1513
+ const s = t.queryKey, a = t.queryHash ?? Mt(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) => Qt(t, r)
1550
+ (r) => Yt(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) => Qt(e, r)) : t;
1555
+ return Object.keys(e).length > 0 ? t.filter((r) => Yt(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 Qs(), 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 Js(), 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 = Mt.subscribe(async (e) => {
1591
+ this.#i++, this.#i === 1 && (this.#o = Dt.subscribe(async (e) => {
1592
1592
  e && (await this.resumePausedMutations(), this.#e.onFocus());
1593
- }), this.#n = Xe.subscribe(async (e) => {
1593
+ }), this.#n = Ze.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 = rr(e.pages), this.fetchQuery(e);
1709
+ return e.behavior = sr(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 = rr(e.pages), this.ensureQueryData(e);
1715
+ return e.behavior = sr(e.pages), this.ensureQueryData(e);
1716
1716
  }
1717
1717
  resumePausedMutations() {
1718
- return Xe.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
1718
+ return Ze.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 = Dt(
1765
+ return t.queryHash || (t.queryHash = Mt(
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 === ze && (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 === Xe && (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
- }, xr = H.createContext(
1781
+ }, Mr = H.createContext(
1782
1782
  void 0
1783
- ), nt = (e) => {
1784
- const t = H.useContext(xr);
1783
+ ), Le = (e) => {
1784
+ const t = H.useContext(Mr);
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(xr.Provider, { value: e, children: t })), ea = H.createContext(!1), ta = () => H.useContext(ea);
1793
+ }), [e]), /* @__PURE__ */ h(Mr.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 || Cr(r, [e.error, s])), ca = (e) => {
1818
+ }) => e.isError && !t.isReset() && !e.isFetching && s && (a && e.data === void 0 || Or(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, ar = (e, t, r) => t.fetchOptimistic(e).catch(() => {
1826
+ }, la = (e, t) => e.isLoading && e.isFetching && !t, ua = (e, t) => e?.suspense && t.isPending, nr = (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 = nt(), i = n.defaultQueryOptions(e);
1834
+ const s = ta(), a = aa(), n = Le(), 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 ar(i, c, a);
1859
+ throw nr(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
- ar(i, c, a)
1873
+ nr(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 ye(e, t) {
1882
- return da(e, Ws);
1881
+ function ge(e, t) {
1882
+ return da(e, qs);
1883
1883
  }
1884
- function Dr(e, t) {
1885
- const r = nt(), [s] = H.useState(
1884
+ function Ut(e, t) {
1885
+ const r = Le(), [s] = H.useState(
1886
1886
  () => new Ys(
1887
1887
  r,
1888
1888
  e
@@ -1904,7 +1904,7 @@ function Dr(e, t) {
1904
1904
  },
1905
1905
  [s]
1906
1906
  );
1907
- if (a.error && Cr(s.options.throwOnError, [a.error]))
1907
+ if (a.error && Or(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
- }, Mr = {
1928
+ }, Dr = {
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
- }, Fe = new TextEncoder(), Ce = new TextDecoder();
1951
+ }, He = new TextEncoder(), Oe = 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 : Ce.decode(e), {
1969
+ return Uint8Array.fromBase64(typeof e == "string" ? e : Oe.decode(e), {
1970
1970
  alphabet: "base64url"
1971
1971
  });
1972
1972
  let t = e;
1973
- t instanceof Uint8Array && (t = Ce.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
1973
+ t instanceof Uint8Array && (t = Oe.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 ge = class extends Error {
1980
+ let be = 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
- }, z = class extends ge {
1986
+ }, X = class extends be {
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 ge = 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
- }, nr = class extends ge {
1995
+ }, ir = class extends be {
1996
1996
  static code = "ERR_JWT_EXPIRED";
1997
1997
  code = "ERR_JWT_EXPIRED";
1998
1998
  claim;
@@ -2001,32 +2001,32 @@ let ge = 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 ge {
2004
+ }, ma = class extends be {
2005
2005
  static code = "ERR_JOSE_ALG_NOT_ALLOWED";
2006
2006
  code = "ERR_JOSE_ALG_NOT_ALLOWED";
2007
- }, ae = class extends ge {
2007
+ }, ne = class extends be {
2008
2008
  static code = "ERR_JOSE_NOT_SUPPORTED";
2009
2009
  code = "ERR_JOSE_NOT_SUPPORTED";
2010
2010
  };
2011
- class L extends ge {
2011
+ class L extends be {
2012
2012
  static code = "ERR_JWS_INVALID";
2013
2013
  code = "ERR_JWS_INVALID";
2014
2014
  }
2015
- let re = class extends ge {
2015
+ let se = class extends be {
2016
2016
  static code = "ERR_JWT_INVALID";
2017
2017
  code = "ERR_JWT_INVALID";
2018
2018
  };
2019
- class pa extends ge {
2019
+ class pa extends be {
2020
2020
  static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2021
2021
  code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2022
2022
  constructor(t = "signature verification failed", r) {
2023
2023
  super(t, r);
2024
2024
  }
2025
2025
  }
2026
- function X(e, t = "algorithm.name") {
2026
+ function Z(e, t = "algorithm.name") {
2027
2027
  return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
2028
2028
  }
2029
- function Se(e, t) {
2029
+ function ve(e, t) {
2030
2030
  return e.name === t;
2031
2031
  }
2032
2032
  function ut(e) {
@@ -2053,54 +2053,54 @@ function ba(e, t, r) {
2053
2053
  case "HS256":
2054
2054
  case "HS384":
2055
2055
  case "HS512": {
2056
- if (!Se(e.algorithm, "HMAC"))
2057
- throw X("HMAC");
2056
+ if (!ve(e.algorithm, "HMAC"))
2057
+ throw Z("HMAC");
2058
2058
  const s = parseInt(t.slice(2), 10);
2059
2059
  if (ut(e.algorithm.hash) !== s)
2060
- throw X(`SHA-${s}`, "algorithm.hash");
2060
+ throw Z(`SHA-${s}`, "algorithm.hash");
2061
2061
  break;
2062
2062
  }
2063
2063
  case "RS256":
2064
2064
  case "RS384":
2065
2065
  case "RS512": {
2066
- if (!Se(e.algorithm, "RSASSA-PKCS1-v1_5"))
2067
- throw X("RSASSA-PKCS1-v1_5");
2066
+ if (!ve(e.algorithm, "RSASSA-PKCS1-v1_5"))
2067
+ throw Z("RSASSA-PKCS1-v1_5");
2068
2068
  const s = parseInt(t.slice(2), 10);
2069
2069
  if (ut(e.algorithm.hash) !== s)
2070
- throw X(`SHA-${s}`, "algorithm.hash");
2070
+ throw Z(`SHA-${s}`, "algorithm.hash");
2071
2071
  break;
2072
2072
  }
2073
2073
  case "PS256":
2074
2074
  case "PS384":
2075
2075
  case "PS512": {
2076
- if (!Se(e.algorithm, "RSA-PSS"))
2077
- throw X("RSA-PSS");
2076
+ if (!ve(e.algorithm, "RSA-PSS"))
2077
+ throw Z("RSA-PSS");
2078
2078
  const s = parseInt(t.slice(2), 10);
2079
2079
  if (ut(e.algorithm.hash) !== s)
2080
- throw X(`SHA-${s}`, "algorithm.hash");
2080
+ throw Z(`SHA-${s}`, "algorithm.hash");
2081
2081
  break;
2082
2082
  }
2083
2083
  case "Ed25519":
2084
2084
  case "EdDSA": {
2085
- if (!Se(e.algorithm, "Ed25519"))
2086
- throw X("Ed25519");
2085
+ if (!ve(e.algorithm, "Ed25519"))
2086
+ throw Z("Ed25519");
2087
2087
  break;
2088
2088
  }
2089
2089
  case "ML-DSA-44":
2090
2090
  case "ML-DSA-65":
2091
2091
  case "ML-DSA-87": {
2092
- if (!Se(e.algorithm, t))
2093
- throw X(t);
2092
+ if (!ve(e.algorithm, t))
2093
+ throw Z(t);
2094
2094
  break;
2095
2095
  }
2096
2096
  case "ES256":
2097
2097
  case "ES384":
2098
2098
  case "ES512": {
2099
- if (!Se(e.algorithm, "ECDSA"))
2100
- throw X("ECDSA");
2099
+ if (!ve(e.algorithm, "ECDSA"))
2100
+ throw Z("ECDSA");
2101
2101
  const s = ya(t);
2102
2102
  if (e.algorithm.namedCurve !== s)
2103
- throw X(s, "algorithm.namedCurve");
2103
+ throw Z(s, "algorithm.namedCurve");
2104
2104
  break;
2105
2105
  }
2106
2106
  default:
@@ -2147,7 +2147,7 @@ const Gr = (e) => Hr(e) || Kr(e), wa = (...e) => {
2147
2147
  function Sa(e) {
2148
2148
  return typeof e == "object" && e !== null;
2149
2149
  }
2150
- const De = (e) => {
2150
+ const Me = (e) => {
2151
2151
  if (!Sa(e) || Object.prototype.toString.call(e) !== "[object Object]")
2152
2152
  return !1;
2153
2153
  if (Object.getPrototypeOf(e) === null)
@@ -2169,7 +2169,7 @@ const De = (e) => {
2169
2169
  if (e[r] !== t[r])
2170
2170
  return !1;
2171
2171
  return !0;
2172
- }, Ta = (e) => ({ data: e, pos: 0 }), Ze = (e) => {
2172
+ }, Ta = (e) => ({ data: e, pos: 0 }), et = (e) => {
2173
2173
  const t = e.data[e.pos++];
2174
2174
  if (t & 128) {
2175
2175
  const r = t & 127;
@@ -2179,20 +2179,20 @@ const De = (e) => {
2179
2179
  return s;
2180
2180
  }
2181
2181
  return t;
2182
- }, et = (e, t, r) => {
2182
+ }, tt = (e, t, r) => {
2183
2183
  if (e.data[e.pos++] !== t)
2184
2184
  throw new Error(r);
2185
2185
  }, Br = (e, t) => {
2186
2186
  const r = e.data.subarray(e.pos, e.pos + t);
2187
2187
  return e.pos += t, r;
2188
2188
  }, Aa = (e) => {
2189
- et(e, 6, "Expected algorithm OID");
2190
- const t = Ze(e);
2189
+ tt(e, 6, "Expected algorithm OID");
2190
+ const t = et(e);
2191
2191
  return Br(e, t);
2192
2192
  };
2193
2193
  function Ia(e) {
2194
- et(e, 48, "Invalid SPKI structure"), Ze(e), et(e, 48, "Expected algorithm identifier");
2195
- const t = Ze(e);
2194
+ tt(e, 48, "Invalid SPKI structure"), et(e), tt(e, 48, "Expected algorithm identifier");
2195
+ const t = et(e);
2196
2196
  return { algIdStart: e.pos, algIdLength: t };
2197
2197
  }
2198
2198
  const _a = (e) => {
@@ -2201,8 +2201,8 @@ const _a = (e) => {
2201
2201
  return "X25519";
2202
2202
  if (!dt(t, [42, 134, 72, 206, 61, 2, 1]))
2203
2203
  throw new Error("Unsupported key algorithm");
2204
- et(e, 6, "Expected curve OID");
2205
- const r = Ze(e), s = Br(e, r);
2204
+ tt(e, 6, "Expected curve OID");
2205
+ const r = et(e), s = Br(e, r);
2206
2206
  for (const { name: a, oid: n } of [
2207
2207
  { name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
2208
2208
  { name: "P-384", oid: [43, 129, 4, 0, 34] },
@@ -2248,7 +2248,7 @@ const _a = (e) => {
2248
2248
  const c = s.getNamedCurve(t);
2249
2249
  a = c === "X25519" ? { name: "X25519" } : { name: "ECDH", namedCurve: c };
2250
2250
  } catch {
2251
- throw new ae("Invalid or unsupported key format");
2251
+ throw new ne("Invalid or unsupported key format");
2252
2252
  }
2253
2253
  n = [];
2254
2254
  break;
@@ -2263,7 +2263,7 @@ const _a = (e) => {
2263
2263
  a = { name: r }, n = i();
2264
2264
  break;
2265
2265
  default:
2266
- throw new ae('Invalid or unsupported "alg" (Algorithm) value');
2266
+ throw new ne('Invalid or unsupported "alg" (Algorithm) value');
2267
2267
  }
2268
2268
  return crypto.subtle.importKey(e, t, a, s?.extractable ?? !0, n);
2269
2269
  }, Ca = (e, t) => Lr(e.replace(t, "")), Oa = (e, t, r) => {
@@ -2285,7 +2285,7 @@ function ka(e) {
2285
2285
  t = { name: e.alg }, r = e.priv ? ["sign"] : ["verify"];
2286
2286
  break;
2287
2287
  default:
2288
- throw new ae('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2288
+ throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2289
2289
  }
2290
2290
  break;
2291
2291
  }
@@ -2311,7 +2311,7 @@ function ka(e) {
2311
2311
  }, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
2312
2312
  break;
2313
2313
  default:
2314
- throw new ae('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2314
+ throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2315
2315
  }
2316
2316
  break;
2317
2317
  }
@@ -2333,7 +2333,7 @@ function ka(e) {
2333
2333
  t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
2334
2334
  break;
2335
2335
  default:
2336
- throw new ae('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2336
+ throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2337
2337
  }
2338
2338
  break;
2339
2339
  }
@@ -2350,12 +2350,12 @@ function ka(e) {
2350
2350
  t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
2351
2351
  break;
2352
2352
  default:
2353
- throw new ae('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2353
+ throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
2354
2354
  }
2355
2355
  break;
2356
2356
  }
2357
2357
  default:
2358
- throw new ae('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
2358
+ throw new ne('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
2359
2359
  }
2360
2360
  return { algorithm: t, keyUsages: r };
2361
2361
  }
@@ -2381,7 +2381,7 @@ const $a = (e, t, r, s, a) => {
2381
2381
  r !== void 0 ? n = new Map([...Object.entries(r), ...t.entries()]) : n = t;
2382
2382
  for (const i of s.crit) {
2383
2383
  if (!n.has(i))
2384
- throw new ae(`Extension Header Parameter "${i}" is not recognized`);
2384
+ throw new ne(`Extension Header Parameter "${i}" is not recognized`);
2385
2385
  if (a[i] === void 0)
2386
2386
  throw new e(`Extension Header Parameter "${i}" is missing`);
2387
2387
  if (n.get(i) && s[i] === void 0)
@@ -2394,29 +2394,29 @@ const $a = (e, t, r, s, a) => {
2394
2394
  if (t)
2395
2395
  return new Set(t);
2396
2396
  };
2397
- function Ut(e) {
2398
- return De(e) && typeof e.kty == "string";
2397
+ function Ft(e) {
2398
+ return Me(e) && typeof e.kty == "string";
2399
2399
  }
2400
- function Da(e) {
2400
+ function Ma(e) {
2401
2401
  return e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string");
2402
2402
  }
2403
- function Ma(e) {
2403
+ function Da(e) {
2404
2404
  return e.kty !== "oct" && typeof e.d > "u" && typeof e.priv > "u";
2405
2405
  }
2406
2406
  function La(e) {
2407
2407
  return e.kty === "oct" && typeof e.k == "string";
2408
2408
  }
2409
- let Re;
2410
- const ir = async (e, t, r, s = !1) => {
2411
- Re ||= /* @__PURE__ */ new WeakMap();
2412
- let a = Re.get(e);
2409
+ let Ce;
2410
+ const or = async (e, t, r, s = !1) => {
2411
+ Ce ||= /* @__PURE__ */ new WeakMap();
2412
+ let a = Ce.get(e);
2413
2413
  if (a?.[r])
2414
2414
  return a[r];
2415
2415
  const n = await Na({ ...t, alg: r });
2416
- return s && Object.freeze(e), a ? a[r] = n : Re.set(e, { [r]: n }), n;
2416
+ return s && Object.freeze(e), a ? a[r] = n : Ce.set(e, { [r]: n }), n;
2417
2417
  }, Ua = (e, t) => {
2418
- Re ||= /* @__PURE__ */ new WeakMap();
2419
- let r = Re.get(e);
2418
+ Ce ||= /* @__PURE__ */ new WeakMap();
2419
+ let r = Ce.get(e);
2420
2420
  if (r?.[t])
2421
2421
  return r[t];
2422
2422
  const s = e.type === "public", a = !!s;
@@ -2509,7 +2509,7 @@ const ir = async (e, t, r, s = !1) => {
2509
2509
  }
2510
2510
  if (!n)
2511
2511
  throw new TypeError("given KeyObject instance cannot be used for this algorithm");
2512
- return r ? r[t] = n : Re.set(e, { [t]: n }), n;
2512
+ return r ? r[t] = n : Ce.set(e, { [t]: n }), n;
2513
2513
  }, Fa = async (e, t) => {
2514
2514
  if (e instanceof Uint8Array || Hr(e))
2515
2515
  return e;
@@ -2524,12 +2524,12 @@ const ir = async (e, t, r, s = !1) => {
2524
2524
  throw s;
2525
2525
  }
2526
2526
  let r = e.export({ format: "jwk" });
2527
- return ir(e, r, t);
2527
+ return or(e, r, t);
2528
2528
  }
2529
- if (Ut(e))
2530
- return e.k ? $e(e.k) : ir(e, e, t, !0);
2529
+ if (Ft(e))
2530
+ return e.k ? $e(e.k) : or(e, e, t, !0);
2531
2531
  throw new Error("unreachable");
2532
- }, _e = (e) => e?.[Symbol.toStringTag], kt = (e, t, r) => {
2532
+ }, Re = (e) => e?.[Symbol.toStringTag], kt = (e, t, r) => {
2533
2533
  if (t.use !== void 0) {
2534
2534
  let s;
2535
2535
  switch (r) {
@@ -2574,7 +2574,7 @@ const ir = async (e, t, r, s = !1) => {
2574
2574
  return !0;
2575
2575
  }, Ha = (e, t, r) => {
2576
2576
  if (!(t instanceof Uint8Array)) {
2577
- if (Ut(t)) {
2577
+ if (Ft(t)) {
2578
2578
  if (La(t) && kt(e, t, r))
2579
2579
  return;
2580
2580
  throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
@@ -2582,39 +2582,39 @@ const ir = async (e, t, r, s = !1) => {
2582
2582
  if (!Gr(t))
2583
2583
  throw new TypeError(Fr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2584
2584
  if (t.type !== "secret")
2585
- throw new TypeError(`${_e(t)} instances for symmetric algorithms must be of type "secret"`);
2585
+ throw new TypeError(`${Re(t)} instances for symmetric algorithms must be of type "secret"`);
2586
2586
  }
2587
2587
  }, Ka = (e, t, r) => {
2588
- if (Ut(t))
2588
+ if (Ft(t))
2589
2589
  switch (r) {
2590
2590
  case "decrypt":
2591
2591
  case "sign":
2592
- if (Da(t) && kt(e, t, r))
2592
+ if (Ma(t) && kt(e, t, r))
2593
2593
  return;
2594
2594
  throw new TypeError("JSON Web Key for this operation be a private JWK");
2595
2595
  case "encrypt":
2596
2596
  case "verify":
2597
- if (Ma(t) && kt(e, t, r))
2597
+ if (Da(t) && kt(e, t, r))
2598
2598
  return;
2599
2599
  throw new TypeError("JSON Web Key for this operation be a public JWK");
2600
2600
  }
2601
2601
  if (!Gr(t))
2602
2602
  throw new TypeError(Fr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2603
2603
  if (t.type === "secret")
2604
- throw new TypeError(`${_e(t)} instances for asymmetric algorithms must not be of type "secret"`);
2604
+ throw new TypeError(`${Re(t)} instances for asymmetric algorithms must not be of type "secret"`);
2605
2605
  if (t.type === "public")
2606
2606
  switch (r) {
2607
2607
  case "sign":
2608
- throw new TypeError(`${_e(t)} instances for asymmetric algorithm signing must be of type "private"`);
2608
+ throw new TypeError(`${Re(t)} instances for asymmetric algorithm signing must be of type "private"`);
2609
2609
  case "decrypt":
2610
- throw new TypeError(`${_e(t)} instances for asymmetric algorithm decryption must be of type "private"`);
2610
+ throw new TypeError(`${Re(t)} instances for asymmetric algorithm decryption must be of type "private"`);
2611
2611
  }
2612
2612
  if (t.type === "private")
2613
2613
  switch (r) {
2614
2614
  case "verify":
2615
- throw new TypeError(`${_e(t)} instances for asymmetric algorithm verifying must be of type "public"`);
2615
+ throw new TypeError(`${Re(t)} instances for asymmetric algorithm verifying must be of type "public"`);
2616
2616
  case "encrypt":
2617
- throw new TypeError(`${_e(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2617
+ throw new TypeError(`${Re(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2618
2618
  }
2619
2619
  }, Ga = (e, t, r) => {
2620
2620
  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 +2645,17 @@ const ir = async (e, t, r, s = !1) => {
2645
2645
  case "ML-DSA-87":
2646
2646
  return { name: e };
2647
2647
  default:
2648
- throw new ae(`alg ${e} is not supported either by JOSE or your javascript runtime`);
2648
+ throw new ne(`alg ${e} is not supported either by JOSE or your javascript runtime`);
2649
2649
  }
2650
- }, Wa = async (e, t, r) => {
2650
+ }, qa = async (e, t, r) => {
2651
2651
  if (t instanceof Uint8Array) {
2652
2652
  if (!e.startsWith("HS"))
2653
2653
  throw new TypeError(Ea(t, "CryptoKey", "KeyObject", "JSON Web Key"));
2654
2654
  return crypto.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
2655
2655
  }
2656
2656
  return ba(t, e, r), t;
2657
- }, qa = async (e, t, r, s) => {
2658
- const a = await Wa(e, t, "verify");
2657
+ }, Wa = async (e, t, r, s) => {
2658
+ const a = await qa(e, t, "verify");
2659
2659
  va(e, a);
2660
2660
  const n = Ba(e, a.algorithm);
2661
2661
  try {
@@ -2665,7 +2665,7 @@ const ir = async (e, t, r, s = !1) => {
2665
2665
  }
2666
2666
  };
2667
2667
  async function ja(e, t, r) {
2668
- if (!De(e))
2668
+ if (!Me(e))
2669
2669
  throw new L("Flattened JWS must be an object");
2670
2670
  if (e.protected === void 0 && e.header === void 0)
2671
2671
  throw new L('Flattened JWS must have either of the "protected" or "header" members');
@@ -2675,13 +2675,13 @@ async function ja(e, t, r) {
2675
2675
  throw new L("JWS Payload missing");
2676
2676
  if (typeof e.signature != "string")
2677
2677
  throw new L("JWS Signature missing or incorrect type");
2678
- if (e.header !== void 0 && !De(e.header))
2678
+ if (e.header !== void 0 && !Me(e.header))
2679
2679
  throw new L("JWS Unprotected Header incorrect type");
2680
2680
  let s = {};
2681
2681
  if (e.protected)
2682
2682
  try {
2683
2683
  const g = $e(e.protected);
2684
- s = JSON.parse(Ce.decode(g));
2684
+ s = JSON.parse(Oe.decode(g));
2685
2685
  } catch {
2686
2686
  throw new L("JWS Protected Header is invalid");
2687
2687
  }
@@ -2707,7 +2707,7 @@ async function ja(e, t, r) {
2707
2707
  throw new L("JWS Payload must be a string or an Uint8Array instance");
2708
2708
  let f = !1;
2709
2709
  typeof t == "function" && (t = await t(s, e), f = !0), Ga(o, t, "verify");
2710
- const d = fa(Fe.encode(e.protected ?? ""), Fe.encode("."), typeof e.payload == "string" ? Fe.encode(e.payload) : e.payload);
2710
+ const d = fa(He.encode(e.protected ?? ""), He.encode("."), typeof e.payload == "string" ? He.encode(e.payload) : e.payload);
2711
2711
  let u;
2712
2712
  try {
2713
2713
  u = $e(e.signature);
@@ -2715,7 +2715,7 @@ async function ja(e, t, r) {
2715
2715
  throw new L("Failed to base64url decode the signature");
2716
2716
  }
2717
2717
  const l = await Fa(t, o);
2718
- if (!await qa(o, l, u, d))
2718
+ if (!await Wa(o, l, u, d))
2719
2719
  throw new pa();
2720
2720
  let m;
2721
2721
  if (i)
@@ -2724,12 +2724,12 @@ async function ja(e, t, r) {
2724
2724
  } catch {
2725
2725
  throw new L("Failed to base64url decode the payload");
2726
2726
  }
2727
- else typeof e.payload == "string" ? m = Fe.encode(e.payload) : m = e.payload;
2727
+ else typeof e.payload == "string" ? m = He.encode(e.payload) : m = e.payload;
2728
2728
  const p = { payload: m };
2729
2729
  return e.protected !== void 0 && (p.protectedHeader = s), e.header !== void 0 && (p.unprotectedHeader = e.header), f ? { ...p, key: l } : p;
2730
2730
  }
2731
2731
  async function Va(e, t, r) {
2732
- if (e instanceof Uint8Array && (e = Ce.decode(e)), typeof e != "string")
2732
+ if (e instanceof Uint8Array && (e = Oe.decode(e)), typeof e != "string")
2733
2733
  throw new L("Compact JWS must be a string or Uint8Array");
2734
2734
  const { 0: s, 1: a, 2: n, length: i } = e.split(".");
2735
2735
  if (i !== 3)
@@ -2737,7 +2737,7 @@ async function Va(e, t, r) {
2737
2737
  const o = await ja({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
2738
2738
  return typeof t == "function" ? { ...c, key: o.key } : c;
2739
2739
  }
2740
- const 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) => {
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) => {
2741
2741
  const t = za.exec(e);
2742
2742
  if (!t || t[4] && t[1])
2743
2743
  throw new TypeError("Invalid time period format");
@@ -2756,57 +2756,57 @@ const Ja = (e) => Math.floor(e.getTime() / 1e3), Wr = 60, qr = Wr * 60, Ft = qr
2756
2756
  case "min":
2757
2757
  case "mins":
2758
2758
  case "m":
2759
- a = Math.round(r * Wr);
2759
+ a = Math.round(r * qr);
2760
2760
  break;
2761
2761
  case "hour":
2762
2762
  case "hours":
2763
2763
  case "hr":
2764
2764
  case "hrs":
2765
2765
  case "h":
2766
- a = Math.round(r * qr);
2766
+ a = Math.round(r * Wr);
2767
2767
  break;
2768
2768
  case "day":
2769
2769
  case "days":
2770
2770
  case "d":
2771
- a = Math.round(r * Ft);
2771
+ a = Math.round(r * Ht);
2772
2772
  break;
2773
2773
  case "week":
2774
2774
  case "weeks":
2775
2775
  case "w":
2776
- a = Math.round(r * Qa);
2776
+ a = Math.round(r * Ja);
2777
2777
  break;
2778
2778
  default:
2779
2779
  a = Math.round(r * Ya);
2780
2780
  break;
2781
2781
  }
2782
2782
  return t[1] === "-" || t[4] === "ago" ? -a : a;
2783
- }, 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;
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;
2784
2784
  function Za(e, t, r = {}) {
2785
2785
  let s;
2786
2786
  try {
2787
- s = JSON.parse(Ce.decode(t));
2787
+ s = JSON.parse(Oe.decode(t));
2788
2788
  } catch {
2789
2789
  }
2790
- if (!De(s))
2791
- throw new re("JWT Claims Set must be a top-level JSON object");
2790
+ if (!Me(s))
2791
+ throw new se("JWT Claims Set must be a top-level JSON object");
2792
2792
  const { typ: a } = r;
2793
- if (a && (typeof e.typ != "string" || cr(e.typ) !== cr(a)))
2794
- throw new z('unexpected "typ" JWT header value', s, "typ", "check_failed");
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");
2795
2795
  const { requiredClaims: n = [], issuer: i, subject: o, audience: c, maxTokenAge: f } = r, d = [...n];
2796
2796
  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
2797
  for (const p of new Set(d.reverse()))
2798
2798
  if (!(p in s))
2799
- throw new z(`missing required "${p}" claim`, s, p, "missing");
2799
+ throw new X(`missing required "${p}" claim`, s, p, "missing");
2800
2800
  if (i && !(Array.isArray(i) ? i : [i]).includes(s.iss))
2801
- throw new z('unexpected "iss" claim value', s, "iss", "check_failed");
2801
+ throw new X('unexpected "iss" claim value', s, "iss", "check_failed");
2802
2802
  if (o && s.sub !== o)
2803
- throw new z('unexpected "sub" claim value', s, "sub", "check_failed");
2803
+ throw new X('unexpected "sub" claim value', s, "sub", "check_failed");
2804
2804
  if (c && !Xa(s.aud, typeof c == "string" ? [c] : c))
2805
- throw new z('unexpected "aud" claim value', s, "aud", "check_failed");
2805
+ throw new X('unexpected "aud" claim value', s, "aud", "check_failed");
2806
2806
  let u;
2807
2807
  switch (typeof r.clockTolerance) {
2808
2808
  case "string":
2809
- u = or(r.clockTolerance);
2809
+ u = cr(r.clockTolerance);
2810
2810
  break;
2811
2811
  case "number":
2812
2812
  u = r.clockTolerance;
@@ -2817,64 +2817,64 @@ function Za(e, t, r = {}) {
2817
2817
  default:
2818
2818
  throw new TypeError("Invalid clockTolerance option type");
2819
2819
  }
2820
- const { currentDate: l } = r, m = Ja(l || /* @__PURE__ */ new Date());
2820
+ const { currentDate: l } = r, m = Qa(l || /* @__PURE__ */ new Date());
2821
2821
  if ((s.iat !== void 0 || f) && typeof s.iat != "number")
2822
- throw new z('"iat" claim must be a number', s, "iat", "invalid");
2822
+ throw new X('"iat" claim must be a number', s, "iat", "invalid");
2823
2823
  if (s.nbf !== void 0) {
2824
2824
  if (typeof s.nbf != "number")
2825
- throw new z('"nbf" claim must be a number', s, "nbf", "invalid");
2825
+ throw new X('"nbf" claim must be a number', s, "nbf", "invalid");
2826
2826
  if (s.nbf > m + u)
2827
- throw new z('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
2827
+ throw new X('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
2828
2828
  }
2829
2829
  if (s.exp !== void 0) {
2830
2830
  if (typeof s.exp != "number")
2831
- throw new z('"exp" claim must be a number', s, "exp", "invalid");
2831
+ throw new X('"exp" claim must be a number', s, "exp", "invalid");
2832
2832
  if (s.exp <= m - u)
2833
- throw new nr('"exp" claim timestamp check failed', s, "exp", "check_failed");
2833
+ throw new ir('"exp" claim timestamp check failed', s, "exp", "check_failed");
2834
2834
  }
2835
2835
  if (f) {
2836
- const p = m - s.iat, g = typeof f == "number" ? f : or(f);
2836
+ const p = m - s.iat, g = typeof f == "number" ? f : cr(f);
2837
2837
  if (p - u > g)
2838
- throw new nr('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
2838
+ throw new ir('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
2839
2839
  if (p < 0 - u)
2840
- throw new z('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
2840
+ throw new X('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
2841
2841
  }
2842
2842
  return s;
2843
2843
  }
2844
2844
  async function en(e, t, r) {
2845
2845
  const s = await Va(e, t, r);
2846
2846
  if (s.protectedHeader.crit?.includes("b64") && s.protectedHeader.b64 === !1)
2847
- throw new re("JWTs MUST NOT use unencoded payload");
2847
+ throw new se("JWTs MUST NOT use unencoded payload");
2848
2848
  const a = { payload: Za(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
2849
2849
  return typeof t == "function" ? { ...a, key: s.key } : a;
2850
2850
  }
2851
2851
  function tn(e) {
2852
2852
  if (typeof e != "string")
2853
- throw new re("JWTs must use Compact JWS serialization, JWT must be a string");
2853
+ throw new se("JWTs must use Compact JWS serialization, JWT must be a string");
2854
2854
  const { 1: t, length: r } = e.split(".");
2855
2855
  if (r === 5)
2856
- throw new re("Only JWTs using Compact JWS serialization can be decoded");
2856
+ throw new se("Only JWTs using Compact JWS serialization can be decoded");
2857
2857
  if (r !== 3)
2858
- throw new re("Invalid JWT");
2858
+ throw new se("Invalid JWT");
2859
2859
  if (!t)
2860
- throw new re("JWTs must contain a payload");
2860
+ throw new se("JWTs must contain a payload");
2861
2861
  let s;
2862
2862
  try {
2863
2863
  s = $e(t);
2864
2864
  } catch {
2865
- throw new re("Failed to base64url decode the payload");
2865
+ throw new se("Failed to base64url decode the payload");
2866
2866
  }
2867
2867
  let a;
2868
2868
  try {
2869
- a = JSON.parse(Ce.decode(s));
2869
+ a = JSON.parse(Oe.decode(s));
2870
2870
  } catch {
2871
- throw new re("Failed to parse the decoded payload as JSON");
2871
+ throw new se("Failed to parse the decoded payload as JSON");
2872
2872
  }
2873
- if (!De(a))
2874
- throw new re("Invalid JWT Claims Set");
2873
+ if (!Me(a))
2874
+ throw new se("Invalid JWT Claims Set");
2875
2875
  return a;
2876
2876
  }
2877
- const Me = async (e) => {
2877
+ const De = async (e) => {
2878
2878
  try {
2879
2879
  const t = F.ALG, r = await Pa(ha, t);
2880
2880
  return await en(e, r, {
@@ -2889,11 +2889,11 @@ const Me = async (e) => {
2889
2889
  } catch {
2890
2890
  return;
2891
2891
  }
2892
- }, D = [];
2892
+ }, M = [];
2893
2893
  for (let e = 0; e < 256; ++e)
2894
- D.push((e + 256).toString(16).slice(1));
2894
+ M.push((e + 256).toString(16).slice(1));
2895
2895
  function sn(e, t = 0) {
2896
- 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();
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();
2897
2897
  }
2898
2898
  let ht;
2899
2899
  const an = new Uint8Array(16);
@@ -2905,25 +2905,25 @@ function nn() {
2905
2905
  }
2906
2906
  return ht(an);
2907
2907
  }
2908
- const on = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), lr = { randomUUID: on };
2909
- function ur(e, t, r) {
2910
- if (lr.randomUUID && !e)
2911
- return lr.randomUUID();
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();
2912
2912
  e = e || {};
2913
2913
  const s = e.random ?? e.rng?.() ?? nn();
2914
2914
  if (s.length < 16)
2915
2915
  throw new Error("Random bytes length must be >= 16");
2916
2916
  return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, sn(s);
2917
2917
  }
2918
- const dr = globalThis.crypto, cn = (e) => `${ur()}${ur()}`.slice(0, e), ln = (e) => btoa(
2918
+ const hr = globalThis.crypto, cn = (e) => `${dr()}${dr()}`.slice(0, e), ln = (e) => btoa(
2919
2919
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
2920
2920
  );
2921
2921
  async function un(e) {
2922
- if (!dr.subtle)
2922
+ if (!hr.subtle)
2923
2923
  throw new Error(
2924
2924
  "crypto.subtle is available only in secure contexts (HTTPS)."
2925
2925
  );
2926
- const t = new TextEncoder().encode(e), r = await dr.subtle.digest("SHA-256", t);
2926
+ const t = new TextEncoder().encode(e), r = await hr.subtle.digest("SHA-256", t);
2927
2927
  return ln(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2928
2928
  }
2929
2929
  async function dn(e) {
@@ -2948,20 +2948,20 @@ try {
2948
2948
  });
2949
2949
  } catch {
2950
2950
  }
2951
- function Z(e) {
2951
+ function ee(e) {
2952
2952
  const t = new Uint8Array(e);
2953
2953
  let r = "";
2954
2954
  for (const s of t)
2955
2955
  r += String.fromCharCode(s);
2956
2956
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2957
2957
  }
2958
- function tt(e) {
2958
+ function rt(e) {
2959
2959
  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
2960
  for (let o = 0; o < a.length; o++)
2961
2961
  i[o] = a.charCodeAt(o);
2962
2962
  return n;
2963
2963
  }
2964
- function Ht() {
2964
+ function Kt() {
2965
2965
  return mn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2966
2966
  }
2967
2967
  const mn = {
@@ -2971,7 +2971,7 @@ function Vr(e) {
2971
2971
  const { id: t } = e;
2972
2972
  return {
2973
2973
  ...e,
2974
- id: tt(t),
2974
+ id: rt(t),
2975
2975
  /**
2976
2976
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2977
2977
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2980,7 +2980,7 @@ function Vr(e) {
2980
2980
  transports: e.transports
2981
2981
  };
2982
2982
  }
2983
- function Jr(e) {
2983
+ function Qr(e) {
2984
2984
  return (
2985
2985
  // Consider localhost valid as well since it's okay wrt Secure Contexts
2986
2986
  e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
@@ -3054,7 +3054,7 @@ function pn({ error: e, options: t }) {
3054
3054
  });
3055
3055
  if (e.name === "SecurityError") {
3056
3056
  const s = globalThis.location.hostname;
3057
- if (Jr(s)) {
3057
+ if (Qr(s)) {
3058
3058
  if (r.rp.id !== s)
3059
3059
  return new U({
3060
3060
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
@@ -3106,7 +3106,7 @@ class yn {
3106
3106
  }
3107
3107
  }
3108
3108
  }
3109
- const Qr = new yn(), gn = ["cross-platform", "platform"];
3109
+ const Jr = new yn(), gn = ["cross-platform", "platform"];
3110
3110
  function Yr(e) {
3111
3111
  if (e && !(gn.indexOf(e) < 0))
3112
3112
  return e;
@@ -3114,18 +3114,18 @@ function Yr(e) {
3114
3114
  async function bn(e) {
3115
3115
  !e.optionsJSON && e.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
3116
3116
  const { optionsJSON: t, useAutoRegister: r = !1 } = e;
3117
- if (!Ht())
3117
+ if (!Kt())
3118
3118
  throw new Error("WebAuthn is not supported in this browser");
3119
3119
  const s = {
3120
3120
  ...t,
3121
- challenge: tt(t.challenge),
3121
+ challenge: rt(t.challenge),
3122
3122
  user: {
3123
3123
  ...t.user,
3124
- id: tt(t.user.id)
3124
+ id: rt(t.user.id)
3125
3125
  },
3126
3126
  excludeCredentials: t.excludeCredentials?.map(Vr)
3127
3127
  }, a = {};
3128
- r && (a.mediation = "conditional"), a.publicKey = s, a.signal = Qr.createNewAbortSignal();
3128
+ r && (a.mediation = "conditional"), a.publicKey = s, a.signal = Jr.createNewAbortSignal();
3129
3129
  let n;
3130
3130
  try {
3131
3131
  n = await navigator.credentials.create(a);
@@ -3148,23 +3148,23 @@ async function bn(e) {
3148
3148
  if (typeof c.getPublicKey == "function")
3149
3149
  try {
3150
3150
  const p = c.getPublicKey();
3151
- p !== null && (l = Z(p));
3151
+ p !== null && (l = ee(p));
3152
3152
  } catch (p) {
3153
3153
  mt("getPublicKey()", p);
3154
3154
  }
3155
3155
  let m;
3156
3156
  if (typeof c.getAuthenticatorData == "function")
3157
3157
  try {
3158
- m = Z(c.getAuthenticatorData());
3158
+ m = ee(c.getAuthenticatorData());
3159
3159
  } catch (p) {
3160
3160
  mt("getAuthenticatorData()", p);
3161
3161
  }
3162
3162
  return {
3163
3163
  id: i,
3164
- rawId: Z(o),
3164
+ rawId: ee(o),
3165
3165
  response: {
3166
- attestationObject: Z(c.attestationObject),
3167
- clientDataJSON: Z(c.clientDataJSON),
3166
+ attestationObject: ee(c.attestationObject),
3167
+ clientDataJSON: ee(c.clientDataJSON),
3168
3168
  transports: d,
3169
3169
  publicKeyAlgorithm: u,
3170
3170
  publicKey: l,
@@ -3180,7 +3180,7 @@ function mt(e, t) {
3180
3180
  `, t);
3181
3181
  }
3182
3182
  function En() {
3183
- if (!Ht())
3183
+ if (!Kt())
3184
3184
  return pt.stubThis(new Promise((t) => t(!1)));
3185
3185
  const e = globalThis.PublicKeyCredential;
3186
3186
  return e?.isConditionalMediationAvailable === void 0 ? pt.stubThis(new Promise((t) => t(!1))) : pt.stubThis(e.isConditionalMediationAvailable());
@@ -3208,7 +3208,7 @@ function wn({ error: e, options: t }) {
3208
3208
  });
3209
3209
  if (e.name === "SecurityError") {
3210
3210
  const s = globalThis.location.hostname;
3211
- if (Jr(s)) {
3211
+ if (Qr(s)) {
3212
3212
  if (r.rpId !== s)
3213
3213
  return new U({
3214
3214
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
@@ -3232,13 +3232,13 @@ function wn({ error: e, options: t }) {
3232
3232
  async function Sn(e) {
3233
3233
  !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
3234
  const { optionsJSON: t, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: s = !0 } = e;
3235
- if (!Ht())
3235
+ if (!Kt())
3236
3236
  throw new Error("WebAuthn is not supported in this browser");
3237
3237
  let a;
3238
3238
  t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(Vr));
3239
3239
  const n = {
3240
3240
  ...t,
3241
- challenge: tt(t.challenge),
3241
+ challenge: rt(t.challenge),
3242
3242
  allowCredentials: a
3243
3243
  }, i = {};
3244
3244
  if (r) {
@@ -3248,7 +3248,7 @@ async function Sn(e) {
3248
3248
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
3249
3249
  i.mediation = "conditional", n.allowCredentials = [];
3250
3250
  }
3251
- i.publicKey = n, i.signal = Qr.createNewAbortSignal();
3251
+ i.publicKey = n, i.signal = Jr.createNewAbortSignal();
3252
3252
  let o;
3253
3253
  try {
3254
3254
  o = await navigator.credentials.get(i);
@@ -3259,13 +3259,13 @@ async function Sn(e) {
3259
3259
  throw new Error("Authentication was not completed");
3260
3260
  const { id: c, rawId: f, response: d, type: u } = o;
3261
3261
  let l;
3262
- return d.userHandle && (l = Z(d.userHandle)), {
3262
+ return d.userHandle && (l = ee(d.userHandle)), {
3263
3263
  id: c,
3264
- rawId: Z(f),
3264
+ rawId: ee(f),
3265
3265
  response: {
3266
- authenticatorData: Z(d.authenticatorData),
3267
- clientDataJSON: Z(d.clientDataJSON),
3268
- signature: Z(d.signature),
3266
+ authenticatorData: ee(d.authenticatorData),
3267
+ clientDataJSON: ee(d.clientDataJSON),
3268
+ signature: ee(d.signature),
3269
3269
  userHandle: l
3270
3270
  },
3271
3271
  type: u,
@@ -3276,23 +3276,23 @@ async function Sn(e) {
3276
3276
  function zr(e, t) {
3277
3277
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
3278
3278
  }
3279
- const hr = (e, t) => {
3279
+ const fr = (e, t) => {
3280
3280
  const r = JSON.stringify(
3281
3281
  typeof t == "function" ? t() : t
3282
3282
  );
3283
3283
  window.localStorage.setItem(e, r), zr(e, r);
3284
3284
  }, vn = (e) => {
3285
3285
  window.localStorage.removeItem(e), zr(e, null);
3286
- }, fr = (e) => window.localStorage.getItem(e), Tn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3287
- function He({
3286
+ }, mr = (e) => window.localStorage.getItem(e), Tn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3287
+ function Ke({
3288
3288
  key: e,
3289
3289
  initialValue: t
3290
3290
  }) {
3291
- const r = _s(Tn, () => fr(e)), s = Y(
3291
+ const r = _s(Tn, () => mr(e)), s = Y(
3292
3292
  (i) => {
3293
3293
  try {
3294
3294
  const o = typeof i == "function" ? i(JSON.parse(r)) : i;
3295
- o == null ? vn(e) : hr(e, o);
3295
+ o == null ? vn(e) : fr(e, o);
3296
3296
  } catch (o) {
3297
3297
  console.warn(o);
3298
3298
  }
@@ -3303,19 +3303,19 @@ function He({
3303
3303
  }, [t, s]), n = Y(() => {
3304
3304
  s(null);
3305
3305
  }, [s]);
3306
- return W(() => {
3306
+ return q(() => {
3307
3307
  try {
3308
- fr(e) === null && typeof t < "u" && hr(e, t);
3308
+ mr(e) === null && typeof t < "u" && fr(e, t);
3309
3309
  } catch (i) {
3310
3310
  console.warn(i);
3311
3311
  }
3312
3312
  }, [e, t]), [r ? JSON.parse(r) : null, s, a, n];
3313
3313
  }
3314
- const M = [];
3314
+ const D = [];
3315
3315
  for (let e = 0; e < 256; ++e)
3316
- M.push((e + 256).toString(16).slice(1));
3316
+ D.push((e + 256).toString(16).slice(1));
3317
3317
  function An(e, t = 0) {
3318
- 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();
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();
3319
3319
  }
3320
3320
  let yt;
3321
3321
  const In = new Uint8Array(16);
@@ -3327,17 +3327,17 @@ function _n() {
3327
3327
  }
3328
3328
  return yt(In);
3329
3329
  }
3330
- const Rn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mr = { randomUUID: Rn };
3330
+ const Rn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), pr = { randomUUID: Rn };
3331
3331
  function gt(e, t, r) {
3332
- if (mr.randomUUID && !e)
3333
- return mr.randomUUID();
3332
+ if (pr.randomUUID && !e)
3333
+ return pr.randomUUID();
3334
3334
  e = e || {};
3335
3335
  const s = e.random ?? e.rng?.() ?? _n();
3336
3336
  if (s.length < 16)
3337
3337
  throw new Error("Random bytes length must be >= 16");
3338
3338
  return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, An(s);
3339
3339
  }
3340
- 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 = {
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 = {
3341
3341
  GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
3342
3342
  $clientId: String!,
3343
3343
  $username: String!,
@@ -3418,24 +3418,24 @@ const ve = "Your session has expired. For your security, please log in again to
3418
3418
  email
3419
3419
  }
3420
3420
  }`
3421
- }, Te = {
3421
+ }, Ae = {
3422
3422
  GET_REGISTRATION_OPTIONS: {
3423
- schema: Ge.GET_REGISTRATION_OPTIONS,
3423
+ schema: Be.GET_REGISTRATION_OPTIONS,
3424
3424
  method: "getPasskeyRegistrationOptions"
3425
3425
  },
3426
3426
  VERIFY_REGISTRATION: {
3427
- schema: Ge.VERIFY_REGISTRATION,
3427
+ schema: Be.VERIFY_REGISTRATION,
3428
3428
  method: "verifyPasskeyRegistration"
3429
3429
  },
3430
3430
  GET_AUTHENTICATION_OPTIONS: {
3431
- schema: Ge.GET_AUTHENTICATION_OPTIONS,
3431
+ schema: Be.GET_AUTHENTICATION_OPTIONS,
3432
3432
  method: "getPasskeyAuthenticationOptions"
3433
3433
  },
3434
3434
  VERIFY_AUTHENTICATION: {
3435
- schema: Ge.VERIFY_AUTHENTICATION,
3435
+ schema: Be.VERIFY_AUTHENTICATION,
3436
3436
  method: "verifyPasskeyAuthentication"
3437
3437
  }
3438
- }, Ae = async ({
3438
+ }, Ie = async ({
3439
3439
  accessToken: e,
3440
3440
  type: t,
3441
3441
  clientId: r,
@@ -3449,7 +3449,7 @@ const ve = "Your session has expired. For your security, please log in again to
3449
3449
  headers: {
3450
3450
  authorization: n,
3451
3451
  "Content-Type": ts,
3452
- [Mr.CLIENT_ID]: `${r}`
3452
+ [Dr.CLIENT_ID]: `${r}`
3453
3453
  },
3454
3454
  body: JSON.stringify({
3455
3455
  query: t.schema,
@@ -3457,14 +3457,14 @@ const ve = "Your session has expired. For your security, please log in again to
3457
3457
  })
3458
3458
  });
3459
3459
  if (i.status !== 200)
3460
- return { status: ee, data: [] };
3460
+ return { status: te, data: [] };
3461
3461
  const { data: o } = await i.json();
3462
3462
  return {
3463
- status: Le,
3463
+ status: Ue,
3464
3464
  data: o[t.method]
3465
3465
  };
3466
3466
  } catch (n) {
3467
- return console.error(n), { status: ee, data: [] };
3467
+ return console.error(n), { status: te, data: [] };
3468
3468
  }
3469
3469
  }, ot = async ({
3470
3470
  type: e,
@@ -3478,19 +3478,19 @@ const ve = "Your session has expired. For your security, please log in again to
3478
3478
  method: es,
3479
3479
  headers: {
3480
3480
  "Content-Type": ts,
3481
- [Mr.CLIENT_ID]: `${t}`
3481
+ [Dr.CLIENT_ID]: `${t}`
3482
3482
  },
3483
3483
  body: JSON.stringify(r)
3484
3484
  });
3485
3485
  if (a.status !== 200)
3486
- return { status: ee, data: [] };
3486
+ return { status: te, data: [] };
3487
3487
  const { data: n } = await a.json();
3488
3488
  return {
3489
- status: Le,
3489
+ status: Ue,
3490
3490
  data: n || []
3491
3491
  };
3492
3492
  } catch (a) {
3493
- return console.error(a), { status: ee, data: [] };
3493
+ return console.error(a), { status: te, data: [] };
3494
3494
  }
3495
3495
  }, Nn = process.env.NODE_ENV === "production", Pn = !Nn, rs = {
3496
3496
  isLoading: !0,
@@ -3524,14 +3524,14 @@ const ve = "Your session has expired. For your security, please log in again to
3524
3524
  domain: r,
3525
3525
  idToken: s
3526
3526
  }
3527
- }))?.status || ee
3527
+ }))?.status || te
3528
3528
  };
3529
3529
  } catch {
3530
3530
  return {
3531
- status: ee
3531
+ status: te
3532
3532
  };
3533
3533
  }
3534
- }, Dn = async ({
3534
+ }, Mn = async ({
3535
3535
  username: e,
3536
3536
  password: t,
3537
3537
  clientId: r,
@@ -3560,7 +3560,7 @@ const ve = "Your session has expired. For your security, please log in again to
3560
3560
  domain: c,
3561
3561
  ua: f
3562
3562
  }
3563
- }), l = await Me(u?.data?.idToken);
3563
+ }), l = await De(u?.data?.idToken);
3564
3564
  return l && l.payload[F.USER_ID_KEY] !== "" && l.payload[F.NONCE_KEY] === s ? {
3565
3565
  idToken: u.data.idToken,
3566
3566
  accessToken: u.data.accessToken,
@@ -3576,7 +3576,7 @@ const ve = "Your session has expired. For your security, please log in again to
3576
3576
  status: !1
3577
3577
  };
3578
3578
  }
3579
- }, Mn = async ({
3579
+ }, Dn = async ({
3580
3580
  nonce: e,
3581
3581
  clientId: t,
3582
3582
  code_challenge: r,
@@ -3594,15 +3594,15 @@ const ve = "Your session has expired. For your security, please log in again to
3594
3594
  }
3595
3595
  });
3596
3596
  return a?.data?.code ? {
3597
- status: Le,
3597
+ status: Ue,
3598
3598
  data: a.data.code
3599
3599
  } : {
3600
- status: ee,
3600
+ status: te,
3601
3601
  data: ""
3602
3602
  };
3603
3603
  } catch {
3604
3604
  return {
3605
- status: ee,
3605
+ status: te,
3606
3606
  data: ""
3607
3607
  };
3608
3608
  }
@@ -3628,7 +3628,7 @@ const ve = "Your session has expired. For your security, please log in again to
3628
3628
  accessToken: a,
3629
3629
  domain: n
3630
3630
  }
3631
- }), c = await Me(o?.data?.accessToken);
3631
+ }), c = await De(o?.data?.accessToken);
3632
3632
  return c && c.payload[F.USER_ID_KEY] !== "" && c.payload[F.NONCE_KEY] === r ? {
3633
3633
  accessToken: o.data.accessToken,
3634
3634
  refreshToken: o.data.refreshToken,
@@ -3674,7 +3674,7 @@ class Un {
3674
3674
  nonce: a,
3675
3675
  domain: n
3676
3676
  }) {
3677
- const i = await Me(this.refreshToken);
3677
+ const i = await De(this.refreshToken);
3678
3678
  if (i && i.payload[F.USER_ID_KEY] !== "") {
3679
3679
  const o = await Ln({
3680
3680
  endpoint: t,
@@ -3686,46 +3686,46 @@ class Un {
3686
3686
  domain: n
3687
3687
  });
3688
3688
  return o.status ? (this.accessToken = o.accessToken, this.refreshToken = o.refreshToken, {
3689
- status: Le,
3689
+ status: Ue,
3690
3690
  newAccessToken: o.accessToken,
3691
3691
  newRefreshToken: o.refreshToken
3692
3692
  }) : {
3693
- status: ee
3693
+ status: te
3694
3694
  };
3695
3695
  } else
3696
3696
  return {
3697
- status: ee
3697
+ status: te
3698
3698
  };
3699
3699
  }
3700
3700
  }
3701
- const Ie = () => {
3701
+ const _e = () => {
3702
3702
  throw new Error(kn);
3703
3703
  }, ss = xt({
3704
3704
  isAuthenticated: !1,
3705
3705
  isLoading: !1,
3706
- login: Ie,
3707
- logout: Ie,
3708
- getAccessToken: Ie,
3709
- getIdToken: Ie,
3710
- registeringForPasskey: Ie,
3711
- loginWithPasskey: Ie,
3706
+ login: _e,
3707
+ logout: _e,
3708
+ getAccessToken: _e,
3709
+ getIdToken: _e,
3710
+ registeringForPasskey: _e,
3711
+ loginWithPasskey: _e,
3712
3712
  logoutReason: "",
3713
3713
  authenticationType: ""
3714
3714
  }), Fn = () => ({
3715
- ...at(ss)
3715
+ ...nt(ss)
3716
3716
  }), Hn = (e) => Y(
3717
3717
  (...t) => {
3718
3718
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
3719
3719
  },
3720
3720
  [e]
3721
- ), Kn = ie.createContext({
3721
+ ), Kn = oe.createContext({
3722
3722
  state: rs,
3723
3723
  dispatch: () => {
3724
3724
  }
3725
3725
  }), Gn = (e, t) => t?.type === Ne ? {
3726
3726
  ...e,
3727
3727
  isLoading: t.payload.isLoading
3728
- } : t?.type === qe ? {
3728
+ } : t?.type === je ? {
3729
3729
  ...e,
3730
3730
  isLoading: !1,
3731
3731
  isAuthenticated: !0,
@@ -3742,7 +3742,7 @@ const Ie = () => {
3742
3742
  } : e, Bn = ({ children: e }) => {
3743
3743
  const t = Fn();
3744
3744
  return /* @__PURE__ */ h(jr.Provider, { value: t, children: e });
3745
- }, pr = ({
3745
+ }, yr = ({
3746
3746
  children: e,
3747
3747
  sessionExpiration: t,
3748
3748
  clientId: r,
@@ -3750,20 +3750,20 @@ const Ie = () => {
3750
3750
  debug: a = !1,
3751
3751
  endpoint: n = Pn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
3752
3752
  }) => {
3753
- const [i, o] = Ir(Gn, {
3753
+ const [i, o] = _r(Gn, {
3754
3754
  ...rs,
3755
3755
  debug: a
3756
- }), c = Hn(a), f = j(!1), [d, u, , l] = He({
3757
- key: `${Ke}::${r}::@@user@@`
3758
- }), [m, p, , g] = He({
3759
- key: `${Ke}::${r}::@@access@@`
3760
- }), [b, E, , O] = He(
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(
3761
3761
  {
3762
- key: `${Ke}::${r}::@@refresh@@`
3762
+ key: `${Ge}::${r}::@@refresh@@`
3763
3763
  }
3764
- ), [A, K, , R] = He({
3765
- key: `${Ke}::${r}::@@nonce@@`
3766
- }), Q = new Un(m, b), C = Y(() => {
3764
+ ), [A, K, , R] = Ke({
3765
+ key: `${Ge}::${r}::@@nonce@@`
3766
+ }), J = new Un(m, b), C = Y(() => {
3767
3767
  c("removeLocalStorage: removing local storage"), l(), g(), O(), R();
3768
3768
  }, [
3769
3769
  g,
@@ -3779,7 +3779,7 @@ const Ie = () => {
3779
3779
  ), o({
3780
3780
  type: Xr,
3781
3781
  payload: {
3782
- logoutReason: w || ve
3782
+ logoutReason: w || Te
3783
3783
  }
3784
3784
  }), C(), o({ type: Ne, payload: { isLoading: !1 } });
3785
3785
  },
@@ -3796,7 +3796,7 @@ const Ie = () => {
3796
3796
  domain: s,
3797
3797
  idToken: d,
3798
3798
  endpoint: n
3799
- }), v(w || ve);
3799
+ }), v(w || Te);
3800
3800
  },
3801
3801
  [
3802
3802
  d,
@@ -3808,13 +3808,13 @@ const Ie = () => {
3808
3808
  n
3809
3809
  ]
3810
3810
  );
3811
- W(() => {
3811
+ q(() => {
3812
3812
  if (!f.current)
3813
3813
  return i.isLoading && d !== null ? (async () => {
3814
3814
  try {
3815
- const w = await Me(d);
3815
+ const w = await De(d);
3816
3816
  w && w.payload[F.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
3817
- type: qe,
3817
+ type: je,
3818
3818
  payload: {
3819
3819
  authenticationType: w.payload[F.AUTH_TYPE_KEY],
3820
3820
  user: {
@@ -3823,11 +3823,11 @@ const Ie = () => {
3823
3823
  email: w.payload[F.EMAIL_KEY]
3824
3824
  }
3825
3825
  }
3826
- })) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(ve));
3826
+ })) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(Te));
3827
3827
  } catch {
3828
3828
  c(
3829
3829
  "useEffect: exception validating JWT, invalidating and logging out"
3830
- ), await x(ve);
3830
+ ), await x(Te);
3831
3831
  }
3832
3832
  })() : (c("useEffect: setting the loading state to false"), o({ type: Ne, payload: { isLoading: !1 } })), () => {
3833
3833
  f.current = !0;
@@ -3837,14 +3837,14 @@ const Ie = () => {
3837
3837
  o({ type: Ne, payload: { isLoading: !0 } }), C();
3838
3838
  const S = gt();
3839
3839
  K(S), c("login: Logging in with password");
3840
- const { code_verifier: le, code_challenge: ue } = await dn(), Jt = await Mn({
3840
+ const { code_verifier: le, code_challenge: ue } = await dn(), Jt = await Dn({
3841
3841
  endpoint: n,
3842
3842
  nonce: S,
3843
3843
  clientId: r,
3844
3844
  code_challenge: ue
3845
3845
  });
3846
3846
  if (Jt.status) {
3847
- const we = await Dn({
3847
+ const Se = await Mn({
3848
3848
  endpoint: n,
3849
3849
  username: w,
3850
3850
  password: T,
@@ -3857,14 +3857,14 @@ const Ie = () => {
3857
3857
  domain: s,
3858
3858
  ua: navigator.userAgent
3859
3859
  });
3860
- return we.status ? (u(we.idToken), p(we.accessToken), E(we.refreshToken), o({
3861
- type: qe,
3860
+ return Se.status ? (u(Se.idToken), p(Se.accessToken), E(Se.refreshToken), o({
3861
+ type: je,
3862
3862
  payload: {
3863
3863
  authenticationType: Pe.CODE,
3864
3864
  user: {
3865
- userId: we.userId,
3865
+ userId: Se.userId,
3866
3866
  username: w,
3867
- email: we.email
3867
+ email: Se.email
3868
3868
  }
3869
3869
  }
3870
3870
  }), !0) : (v(bt), !1);
@@ -3878,12 +3878,12 @@ const Ie = () => {
3878
3878
  if (w && T && T.userId) {
3879
3879
  if (m) {
3880
3880
  c("getAccessToken");
3881
- const le = await Me(m);
3881
+ const le = await De(m);
3882
3882
  if (le && le.payload[F.USER_ID_KEY] !== "")
3883
3883
  return m;
3884
3884
  }
3885
3885
  c("getAccessToken: invalid access token, trying to refresh it");
3886
- const S = await Q.refreshtoken({
3886
+ const S = await J.refreshtoken({
3887
3887
  endpoint: n,
3888
3888
  clientId: r,
3889
3889
  userId: T.userId,
@@ -3892,11 +3892,11 @@ const Ie = () => {
3892
3892
  });
3893
3893
  return S.status && S.status === "success" && S.newAccessToken ? (p(S.newAccessToken), E(S.newRefreshToken), S.newAccessToken) : (c(
3894
3894
  "getAccessToken: invalid refresh token, need to re-authenticate"
3895
- ), await x(ve), "");
3895
+ ), await x(Te), "");
3896
3896
  }
3897
3897
  return c(
3898
3898
  "getAccessToken: user is not authenticated, cannot get access token"
3899
- ), await x(ve), "";
3899
+ ), await x(Te), "";
3900
3900
  } catch {
3901
3901
  return c(
3902
3902
  "getAccessToken: exception occurred, invalidating and logging out"
@@ -3904,11 +3904,11 @@ const Ie = () => {
3904
3904
  }
3905
3905
  }, V = () => i.isAuthenticated && d ? d : "", ce = async () => {
3906
3906
  const { user: w } = i;
3907
- let T = await Ae({
3907
+ let T = await Ie({
3908
3908
  endpoint: n,
3909
3909
  accessToken: m,
3910
3910
  clientId: r,
3911
- type: Te.GET_REGISTRATION_OPTIONS,
3911
+ type: Ae.GET_REGISTRATION_OPTIONS,
3912
3912
  params: {
3913
3913
  clientId: r,
3914
3914
  id: w?.userId,
@@ -3920,11 +3920,11 @@ const Ie = () => {
3920
3920
  const S = await bn({
3921
3921
  optionsJSON: T.data
3922
3922
  });
3923
- return T = await Ae({
3923
+ return T = await Ie({
3924
3924
  endpoint: n,
3925
3925
  accessToken: m,
3926
3926
  clientId: r,
3927
- type: Te.VERIFY_REGISTRATION,
3927
+ type: Ae.VERIFY_REGISTRATION,
3928
3928
  params: {
3929
3929
  clientId: r,
3930
3930
  id: w?.userId,
@@ -3933,11 +3933,11 @@ const Ie = () => {
3933
3933
  }
3934
3934
  }), !!(T.status && T.data.length > 0);
3935
3935
  } catch {
3936
- return await Ae({
3936
+ return await Ie({
3937
3937
  endpoint: n,
3938
3938
  accessToken: m,
3939
3939
  clientId: r,
3940
- type: Te.VERIFY_REGISTRATION,
3940
+ type: Ae.VERIFY_REGISTRATION,
3941
3941
  params: {
3942
3942
  clientId: r,
3943
3943
  id: w?.userId,
@@ -3947,16 +3947,16 @@ const Ie = () => {
3947
3947
  }), !1;
3948
3948
  }
3949
3949
  return !1;
3950
- }, Ee = async () => {
3950
+ }, we = async () => {
3951
3951
  o({ type: Ne, payload: { isLoading: !0 } }), C();
3952
3952
  const w = gt();
3953
3953
  K(w), c("loginWithPasskey");
3954
3954
  const T = gt();
3955
- let S = await Ae({
3955
+ let S = await Ie({
3956
3956
  endpoint: n,
3957
3957
  accessToken: m,
3958
3958
  clientId: r,
3959
- type: Te.GET_AUTHENTICATION_OPTIONS,
3959
+ type: Ae.GET_AUTHENTICATION_OPTIONS,
3960
3960
  params: {
3961
3961
  id: T,
3962
3962
  clientId: r
@@ -3967,11 +3967,11 @@ const Ie = () => {
3967
3967
  const le = await Sn({
3968
3968
  optionsJSON: S.data
3969
3969
  });
3970
- return S = await Ae({
3970
+ return S = await Ie({
3971
3971
  endpoint: n,
3972
3972
  accessToken: m,
3973
3973
  clientId: r,
3974
- type: Te.VERIFY_AUTHENTICATION,
3974
+ type: Ae.VERIFY_AUTHENTICATION,
3975
3975
  params: {
3976
3976
  clientId: r,
3977
3977
  id: T,
@@ -3981,8 +3981,8 @@ const Ie = () => {
3981
3981
  sessionExpiration: t,
3982
3982
  ua: navigator.userAgent
3983
3983
  }
3984
- }), S.data.status === Le ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
3985
- type: qe,
3984
+ }), S.data.status === Ue ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
3985
+ type: je,
3986
3986
  payload: {
3987
3987
  authenticationType: Pe.PASSKEY,
3988
3988
  user: {
@@ -3993,11 +3993,11 @@ const Ie = () => {
3993
3993
  }
3994
3994
  }), !0) : (v(bt), !1);
3995
3995
  } catch {
3996
- return await Ae({
3996
+ return await Ie({
3997
3997
  endpoint: n,
3998
3998
  accessToken: m,
3999
3999
  clientId: r,
4000
- type: Te.VERIFY_AUTHENTICATION,
4000
+ type: Ae.VERIFY_AUTHENTICATION,
4001
4001
  params: {
4002
4002
  clientId: r,
4003
4003
  id: T,
@@ -4020,7 +4020,7 @@ const Ie = () => {
4020
4020
  getAccessToken: N,
4021
4021
  getIdToken: V,
4022
4022
  registeringForPasskey: ce,
4023
- loginWithPasskey: Ee
4023
+ loginWithPasskey: we
4024
4024
  },
4025
4025
  children: /* @__PURE__ */ h(Bn, { children: e })
4026
4026
  }
@@ -4040,16 +4040,16 @@ try {
4040
4040
  } catch {
4041
4041
  }
4042
4042
  const as = () => {
4043
- const e = at(jr);
4043
+ const e = nt(jr);
4044
4044
  if (!e)
4045
4045
  throw new Error("useAuth must be used within an AuthHookProvider");
4046
4046
  return e;
4047
- }, qo = "I'm having trouble right now. Please try again later.", jo = "action-search", Vo = "action-sort", Jo = "action-toggle-prompt", Qo = "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", yr = "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, se = !1;
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;
4049
4049
  typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
4050
- se && (se = !1, window.location.reload());
4050
+ ae && (ae = !1, window.location.reload());
4051
4051
  });
4052
- function Kt() {
4052
+ function Gt() {
4053
4053
  return "serviceWorker" in navigator;
4054
4054
  }
4055
4055
  function Nt() {
@@ -4058,7 +4058,7 @@ function Nt() {
4058
4058
  );
4059
4059
  return e === null ? !1 : e === "true";
4060
4060
  }
4061
- function Wn(e) {
4061
+ function qn(e) {
4062
4062
  localStorage.setItem(
4063
4063
  ns + is,
4064
4064
  e.toString()
@@ -4067,7 +4067,7 @@ function Wn(e) {
4067
4067
  async function os() {
4068
4068
  if (!Nt())
4069
4069
  return !1;
4070
- if (!Kt())
4070
+ if (!Gt())
4071
4071
  return console.warn("[SW] Service workers not supported"), !1;
4072
4072
  try {
4073
4073
  return Et = await navigator.serviceWorker.register("/sw.js", {
@@ -4084,8 +4084,8 @@ async function os() {
4084
4084
  return console.error("[SW] Service worker registration failed:", e), !1;
4085
4085
  }
4086
4086
  }
4087
- async function qn() {
4088
- if (!Kt())
4087
+ async function Wn() {
4088
+ if (!Gt())
4089
4089
  return !1;
4090
4090
  try {
4091
4091
  const e = await navigator.serviceWorker.getRegistration();
@@ -4095,18 +4095,18 @@ async function qn() {
4095
4095
  }
4096
4096
  }
4097
4097
  async function bc(e) {
4098
- if (Wn(e), e) {
4099
- se = !0;
4098
+ if (qn(e), e) {
4099
+ ae = !0;
4100
4100
  try {
4101
4101
  sessionStorage.setItem("sw-toggle-pending", "enabled");
4102
4102
  } catch {
4103
4103
  }
4104
- await os(), navigator.serviceWorker.controller && se && (se = !1, window.location.reload());
4104
+ await os(), navigator.serviceWorker.controller && ae && (ae = !1, window.location.reload());
4105
4105
  try {
4106
4106
  navigator.serviceWorker.ready.then(() => {
4107
- se && Nt() && (se = !1, window.location.reload());
4107
+ ae && Nt() && (ae = !1, window.location.reload());
4108
4108
  }), setTimeout(() => {
4109
- se && Nt() && (se = !1, window.location.reload());
4109
+ ae && Nt() && (ae = !1, window.location.reload());
4110
4110
  }, 3e3);
4111
4111
  } catch {
4112
4112
  }
@@ -4116,11 +4116,11 @@ async function bc(e) {
4116
4116
  } catch {
4117
4117
  }
4118
4118
  try {
4119
- Kt() && await jn();
4119
+ Gt() && await jn();
4120
4120
  } catch (t) {
4121
4121
  console.warn("[SW] Failed to invalidate cache:", t);
4122
4122
  }
4123
- await qn(), window.location.reload();
4123
+ await Wn(), window.location.reload();
4124
4124
  }
4125
4125
  }
4126
4126
  async function jn() {
@@ -4176,7 +4176,7 @@ async function Ec(e = {}) {
4176
4176
  return console.warn("[SW] getCacheInfo failed:", r), { version: wt(), caches: [], totalItems: 0 };
4177
4177
  }
4178
4178
  }
4179
- const wc = "user", Sc = "assistant", vc = "data", cs = "OpenAI", Vn = "Anthropic", Jn = "Google", Qn = "Perplexity", Tc = cs, Yn = "claude-sonnet-4", zn = "claude-3", Xn = "gpt-", Zn = "o3", ei = "o4", ti = "gemini", ri = "sonar", si = {
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 = {
4180
4180
  [Vn]: [
4181
4181
  Yn,
4182
4182
  zn
@@ -4186,8 +4186,8 @@ const wc = "user", Sc = "assistant", vc = "data", cs = "OpenAI", Vn = "Anthropic
4186
4186
  Zn,
4187
4187
  ei
4188
4188
  ],
4189
- [Jn]: [ti],
4190
- [Qn]: [ri]
4189
+ [Qn]: [ti],
4190
+ [Jn]: [ri]
4191
4191
  }, Ac = "x-diggidy-chat-id", Ic = (e) => {
4192
4192
  for (const [t, r] of Object.entries(
4193
4193
  si
@@ -4384,13 +4384,16 @@ const G = {
4384
4384
  total
4385
4385
  }
4386
4386
  }`,
4387
+ UPDATE_MEMORY: `mutation UpdateMemory($user: String!, $memoryId: String!, $text: String!) {
4388
+ updateMemory(user: $user, memoryId: $memoryId, text: $text)
4389
+ }`,
4387
4390
  DELETE_MEMORY: `mutation DeleteMemory($user: String!, $memoryId: String!) {
4388
4391
  deleteMemory(user: $user, memoryId: $memoryId)
4389
4392
  }`,
4390
4393
  DELETE_MEMORIES: `mutation DeleteMemories($user: String!) {
4391
4394
  deleteMemories(user: $user)
4392
4395
  }`
4393
- }, te = {
4396
+ }, z = {
4394
4397
  GET_LOCATION: {
4395
4398
  schema: G.GET_LOCATION,
4396
4399
  method: "location"
@@ -4443,13 +4446,16 @@ const G = {
4443
4446
  schema: G.GET_USER_MEMORIES,
4444
4447
  method: "getUserMemories"
4445
4448
  },
4449
+ UPDATE_MEMORY: {
4450
+ schema: G.UPDATE_MEMORY
4451
+ },
4446
4452
  DELETE_MEMORY: {
4447
4453
  schema: G.DELETE_MEMORY
4448
4454
  },
4449
4455
  DELETE_MEMORIES: {
4450
4456
  schema: G.DELETE_MEMORIES
4451
4457
  }
4452
- }, ii = process.env.PUBLIC_SASSY_API_SERVER_URL, Oe = async ({
4458
+ }, ii = process.env.PUBLIC_SASSY_API_SERVER_URL, ye = async ({
4453
4459
  query: e,
4454
4460
  data: t,
4455
4461
  headers: r = {},
@@ -4472,13 +4478,13 @@ const G = {
4472
4478
  try {
4473
4479
  let r;
4474
4480
  if (e.noAuth === !0)
4475
- r = await Oe({
4481
+ r = await ye({
4476
4482
  query: e.type.schema,
4477
4483
  data: t
4478
4484
  });
4479
4485
  else {
4480
4486
  const n = `Bearer ${e.accessToken}`;
4481
- r = await Oe({
4487
+ r = await ye({
4482
4488
  headers: {
4483
4489
  authorization: n
4484
4490
  },
@@ -4505,7 +4511,7 @@ const G = {
4505
4511
  try {
4506
4512
  await oi({
4507
4513
  accessToken: t,
4508
- type: te.SET_USER_PREFERENCES,
4514
+ type: z.SET_USER_PREFERENCES,
4509
4515
  params: {
4510
4516
  user: r,
4511
4517
  provider: e
@@ -4513,7 +4519,7 @@ const G = {
4513
4519
  });
4514
4520
  } catch {
4515
4521
  }
4516
- }, oe = {
4522
+ }, re = {
4517
4523
  CHATS: "chats",
4518
4524
  CHATS_STATS: "chatsStats",
4519
4525
  CAPABILITIES: "capabilities",
@@ -4521,16 +4527,16 @@ const G = {
4521
4527
  PREFERENCES: "preferences",
4522
4528
  USAGE: "usage",
4523
4529
  USER_MEMORIES: "userMemories"
4524
- }, kc = () => ye({
4525
- queryKey: [oe.CAPABILITIES],
4526
- queryFn: async () => await be({
4527
- type: te.GET_SERVER_CAPABILITIES,
4530
+ }, kc = () => ge({
4531
+ queryKey: [re.CAPABILITIES],
4532
+ queryFn: async () => await Ee({
4533
+ type: z.GET_SERVER_CAPABILITIES,
4528
4534
  noAuth: !0
4529
4535
  })
4530
- }), Nc = () => ye({
4531
- queryKey: [oe.CHANGELOGS],
4532
- queryFn: async () => await be({
4533
- type: te.GET_CHANGELOGS,
4536
+ }), Nc = () => ge({
4537
+ queryKey: [re.CHANGELOGS],
4538
+ queryFn: async () => await Ee({
4539
+ type: z.GET_CHANGELOGS,
4534
4540
  noAuth: !0,
4535
4541
  params: {
4536
4542
  client: !0
@@ -4539,25 +4545,25 @@ const G = {
4539
4545
  }), ci = ({
4540
4546
  user: e,
4541
4547
  getAccessToken: t
4542
- }) => ye({
4543
- queryKey: [oe.PREFERENCES, e],
4544
- queryFn: async () => await be({
4548
+ }) => ge({
4549
+ queryKey: [re.PREFERENCES, e],
4550
+ queryFn: async () => await Ee({
4545
4551
  params: {
4546
4552
  user: e
4547
4553
  },
4548
- type: te.GET_USER_PREFERENCES,
4554
+ type: z.GET_USER_PREFERENCES,
4549
4555
  getAccessToken: t
4550
4556
  })
4551
4557
  }), Pc = ({
4552
4558
  user: e,
4553
4559
  getAccessToken: t
4554
- }) => ye({
4555
- queryKey: [oe.CHATS_STATS, e],
4556
- queryFn: async () => await be({
4560
+ }) => ge({
4561
+ queryKey: [re.CHATS_STATS, e],
4562
+ queryFn: async () => await Ee({
4557
4563
  params: {
4558
4564
  user: e
4559
4565
  },
4560
- type: te.GET_CHATS_STATS,
4566
+ type: z.GET_CHATS_STATS,
4561
4567
  getAccessToken: t
4562
4568
  })
4563
4569
  }), $c = ({
@@ -4567,12 +4573,12 @@ const G = {
4567
4573
  sortedCell: s,
4568
4574
  getAccessToken: a,
4569
4575
  enabled: n = !0
4570
- }) => ye({
4576
+ }) => ge({
4571
4577
  enabled: n,
4572
4578
  staleTime: 60 * 1e3,
4573
4579
  // 1 minute
4574
- queryKey: [oe.CHATS, e, t, r, s],
4575
- queryFn: async () => await be({
4580
+ queryKey: [re.CHATS, e, t, r, s],
4581
+ queryFn: async () => await Ee({
4576
4582
  params: {
4577
4583
  user: e,
4578
4584
  searchString: t,
@@ -4581,7 +4587,7 @@ const G = {
4581
4587
  limit: 1,
4582
4588
  truncateSize: 100
4583
4589
  },
4584
- type: te.GET_CHATS,
4590
+ type: z.GET_CHATS,
4585
4591
  getAccessToken: a
4586
4592
  })
4587
4593
  }), xc = ({
@@ -4590,42 +4596,67 @@ const G = {
4590
4596
  year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
4591
4597
  getAccessToken: s,
4592
4598
  enabled: a = !0
4593
- }) => ye({
4599
+ }) => ge({
4594
4600
  enabled: a,
4595
- queryKey: [oe.USAGE, e, t, r],
4596
- queryFn: async () => await be({
4601
+ queryKey: [re.USAGE, e, t, r],
4602
+ queryFn: async () => await Ee({
4597
4603
  params: {
4598
4604
  user: e,
4599
4605
  month: t,
4600
4606
  year: r
4601
4607
  },
4602
- type: te.GET_USAGE,
4608
+ type: z.GET_USAGE,
4603
4609
  getAccessToken: s
4604
4610
  })
4605
- }), Dc = ({
4611
+ }), Mc = ({
4606
4612
  user: e,
4607
4613
  query: t,
4608
4614
  getAccessToken: r,
4609
4615
  enabled: s = !0
4610
- }) => ye({
4616
+ }) => ge({
4611
4617
  enabled: s && !!e,
4612
- queryKey: [oe.USER_MEMORIES, e, t],
4613
- queryFn: async () => await be({
4618
+ queryKey: [re.USER_MEMORIES, e, t],
4619
+ queryFn: async () => await Ee({
4614
4620
  params: { user: e, query: t },
4615
- type: te.GET_USER_MEMORIES,
4621
+ type: z.GET_USER_MEMORIES,
4616
4622
  getAccessToken: r
4617
4623
  })
4618
- }), Mc = ({
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 = ({
4619
4650
  getAccessToken: e
4620
4651
  }) => {
4621
- const t = nt();
4622
- return Dr({
4652
+ const t = Le();
4653
+ return Ut({
4623
4654
  mutationFn: async ({
4624
4655
  user: r,
4625
4656
  memoryId: s
4626
4657
  }) => {
4627
- const a = await e(), n = await Oe({
4628
- query: te.DELETE_MEMORY.schema,
4658
+ const a = await e(), n = await ye({
4659
+ query: z.DELETE_MEMORY.schema,
4629
4660
  data: { user: r, memoryId: s },
4630
4661
  headers: { authorization: `Bearer ${a}` }
4631
4662
  }), { data: i, errors: o } = await n.json();
@@ -4635,18 +4666,18 @@ const G = {
4635
4666
  },
4636
4667
  onSuccess: (r, s) => {
4637
4668
  t.invalidateQueries({
4638
- queryKey: [oe.USER_MEMORIES, s.user]
4669
+ queryKey: [re.USER_MEMORIES, s.user]
4639
4670
  });
4640
4671
  }
4641
4672
  });
4642
- }, Lc = ({
4673
+ }, Uc = ({
4643
4674
  getAccessToken: e
4644
4675
  }) => {
4645
- const t = nt();
4646
- return Dr({
4676
+ const t = Le();
4677
+ return Ut({
4647
4678
  mutationFn: async ({ user: r }) => {
4648
- const s = await e(), a = await Oe({
4649
- query: te.DELETE_MEMORIES.schema,
4679
+ const s = await e(), a = await ye({
4680
+ query: z.DELETE_MEMORIES.schema,
4650
4681
  data: { user: r },
4651
4682
  headers: { authorization: `Bearer ${s}` }
4652
4683
  }), { data: n, errors: i } = await a.json();
@@ -4656,11 +4687,11 @@ const G = {
4656
4687
  },
4657
4688
  onSuccess: (r, s) => {
4658
4689
  t.invalidateQueries({
4659
- queryKey: [oe.USER_MEMORIES, s.user]
4690
+ queryKey: [re.USER_MEMORIES, s.user]
4660
4691
  });
4661
4692
  }
4662
4693
  });
4663
- }, be = async ({
4694
+ }, Ee = async ({
4664
4695
  params: e,
4665
4696
  type: t,
4666
4697
  noAuth: r,
@@ -4670,13 +4701,13 @@ const G = {
4670
4701
  const a = t?.data ? t.data(e) : e;
4671
4702
  let n;
4672
4703
  if (r === !0)
4673
- n = await Oe({
4704
+ n = await ye({
4674
4705
  query: t.schema,
4675
4706
  data: a
4676
4707
  });
4677
4708
  else if (s) {
4678
4709
  const f = await s();
4679
- n = await Oe({
4710
+ n = await ye({
4680
4711
  headers: {
4681
4712
  authorization: `Bearer ${f}`
4682
4713
  },
@@ -4698,7 +4729,7 @@ const G = {
4698
4729
  }
4699
4730
  }, ls = xt(
4700
4731
  void 0
4701
- ), gr = {
4732
+ ), br = {
4702
4733
  capabilities: /* @__PURE__ */ new Set(),
4703
4734
  version: null,
4704
4735
  status: "idle"
@@ -4707,7 +4738,7 @@ const G = {
4707
4738
  getAccessToken: t,
4708
4739
  children: r
4709
4740
  }) => {
4710
- const [s, a] = ne(gr), n = Je(
4741
+ const [s, a] = ie(br), n = Je(
4711
4742
  () => e ? `entitlements:${e}` : null,
4712
4743
  [e]
4713
4744
  ), i = Y(() => {
@@ -4728,19 +4759,19 @@ const G = {
4728
4759
  }
4729
4760
  return !1;
4730
4761
  }, [n]);
4731
- W(() => {
4762
+ q(() => {
4732
4763
  s.status === "idle" && i();
4733
4764
  }, [i, s.status]);
4734
4765
  const o = ci({ user: e, getAccessToken: t });
4735
- W(() => {
4766
+ q(() => {
4736
4767
  o.isLoading && s.status === "idle" && a((u) => ({ ...u, status: "loading" }));
4737
- }, [o.isLoading, s.status]), W(() => {
4768
+ }, [o.isLoading, s.status]), q(() => {
4738
4769
  o.isError && a((u) => ({
4739
4770
  ...u,
4740
4771
  status: "error",
4741
4772
  error: String(o.error)
4742
4773
  }));
4743
- }, [o.isError, o.error]), W(() => {
4774
+ }, [o.isError, o.error]), q(() => {
4744
4775
  const u = o.data?.entitlements;
4745
4776
  if (u && (a({
4746
4777
  capabilities: new Set(u.capabilities || []),
@@ -4779,7 +4810,7 @@ const G = {
4779
4810
  },
4780
4811
  [n]
4781
4812
  ), f = Y(() => {
4782
- if (a(gr), n)
4813
+ if (a(br), n)
4783
4814
  try {
4784
4815
  sessionStorage.removeItem(n);
4785
4816
  } catch {
@@ -4795,13 +4826,13 @@ const G = {
4795
4826
  );
4796
4827
  return /* @__PURE__ */ h(ls.Provider, { value: d, children: r });
4797
4828
  };
4798
- function Uc() {
4799
- const e = at(ls);
4829
+ function Fc() {
4830
+ const e = nt(ls);
4800
4831
  if (!e)
4801
4832
  throw new Error("useEntitlements must be used within EntitlementsProvider");
4802
4833
  return e;
4803
4834
  }
4804
- const br = (e) => Number.isFinite(e) ? e : 0;
4835
+ const Er = (e) => Number.isFinite(e) ? e : 0;
4805
4836
  function ui(e) {
4806
4837
  return {
4807
4838
  days: Math.trunc(e / 864e5),
@@ -4809,8 +4840,8 @@ function ui(e) {
4809
4840
  minutes: Math.trunc(e / 6e4 % 60),
4810
4841
  seconds: Math.trunc(e / 1e3 % 60),
4811
4842
  milliseconds: Math.trunc(e % 1e3),
4812
- microseconds: Math.trunc(br(e * 1e3) % 1e3),
4813
- nanoseconds: Math.trunc(br(e * 1e6) % 1e3)
4843
+ microseconds: Math.trunc(Er(e * 1e3) % 1e3),
4844
+ nanoseconds: Math.trunc(Er(e * 1e6) % 1e3)
4814
4845
  };
4815
4846
  }
4816
4847
  function di(e) {
@@ -4881,7 +4912,7 @@ function gi(e, t) {
4881
4912
  const f = t.colonNotation ? ":" : " ";
4882
4913
  return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), s + a.join(f);
4883
4914
  }
4884
- const us = process.env.NODE_ENV === "production", Gt = !us, ds = Gt ? "gizmette.local.com" : "gizmette.com", Bt = (e, t) => {
4915
+ const us = process.env.NODE_ENV === "production", Bt = !us, ds = Bt ? "gizmette.local.com" : "gizmette.com", qt = (e, t) => {
4885
4916
  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;
4886
4917
  return {
4887
4918
  dir: r,
@@ -4892,12 +4923,12 @@ const us = process.env.NODE_ENV === "production", Gt = !us, ds = Gt ? "gizmette.
4892
4923
  }, bi = (e) => {
4893
4924
  if (!e && e !== 0)
4894
4925
  return "N/A";
4895
- const t = Bt(e, !1);
4926
+ const t = qt(e, !1);
4896
4927
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
4897
4928
  }, Ei = (e) => {
4898
4929
  if (!e && e !== 0)
4899
4930
  return "N/A";
4900
- const t = Bt(e, !0);
4931
+ const t = qt(e, !0);
4901
4932
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
4902
4933
  }, wi = async () => {
4903
4934
  const e = {
@@ -4953,7 +4984,7 @@ const us = process.env.NODE_ENV === "production", Gt = !us, ds = Gt ? "gizmette.
4953
4984
  window.atob(e).split("").map(function(t) {
4954
4985
  return `%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`;
4955
4986
  }).join("")
4956
- ), 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: [
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: [
4957
4988
  /* @__PURE__ */ h(
4958
4989
  "dt",
4959
4990
  {
@@ -5050,7 +5081,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5050
5081
  theme: c,
5051
5082
  transition: f,
5052
5083
  icon: d
5053
- }), Fc = /* @__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 = ({
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 = ({
5054
5085
  type: e,
5055
5086
  size: t,
5056
5087
  labelRight: r,
@@ -5086,7 +5117,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5086
5117
  "h-12": t === "large" && n && (r || s)
5087
5118
  });
5088
5119
  }
5089
- }, Mi = ({
5120
+ }, Di = ({
5090
5121
  type: e,
5091
5122
  size: t,
5092
5123
  labelRight: r,
@@ -5294,7 +5325,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5294
5325
  "focus:outline-focus-light": e === "light",
5295
5326
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
5296
5327
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
5297
- }), Wi = ({
5328
+ }), qi = ({
5298
5329
  mode: e,
5299
5330
  raw: t,
5300
5331
  iconClassName: r,
@@ -5321,7 +5352,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5321
5352
  } : s === "selected" && (a = {
5322
5353
  "text-copy-lighter": !0
5323
5354
  }), y(a, r);
5324
- }, qi = ({
5355
+ }, Wi = ({
5325
5356
  animated: e
5326
5357
  }) => y({
5327
5358
  "transition-opacity duration-300 ease-in-out": e
@@ -5343,8 +5374,8 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5343
5374
  align: p,
5344
5375
  radius: g,
5345
5376
  animated: b
5346
- }) => (l || (l = "primary"), r ? y(Er, t) : y(
5347
- Er,
5377
+ }) => (l || (l = "primary"), r ? y(wr, t) : y(
5378
+ wr,
5348
5379
  Li({
5349
5380
  mode: s,
5350
5381
  variant: l,
@@ -5353,7 +5384,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5353
5384
  }),
5354
5385
  Ui({ mode: s, noBackground: u, variant: l }),
5355
5386
  Fi({ radius: g }),
5356
- Di({
5387
+ Mi({
5357
5388
  type: e,
5358
5389
  size: o,
5359
5390
  labelRight: f,
@@ -5361,7 +5392,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5361
5392
  align: p,
5362
5393
  animated: b
5363
5394
  }),
5364
- Mi({ type: e, size: o, labelRight: f, labelLeft: d }),
5395
+ Di({ type: e, size: o, labelRight: f, labelLeft: d }),
5365
5396
  Gi({ mode: s, variant: l, noBorder: c }),
5366
5397
  Bi({ focusMode: a }),
5367
5398
  Hi({ mode: s, variant: l, disabled: n }),
@@ -5376,7 +5407,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5376
5407
  t
5377
5408
  )), ji = (e, t, r) => {
5378
5409
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
5379
- }, qt = ie.forwardRef((e, t) => {
5410
+ }, jt = oe.forwardRef((e, t) => {
5380
5411
  const { onClick: r, noInternalClick: s = !1, ...a } = e;
5381
5412
  return /* @__PURE__ */ h(
5382
5413
  "button",
@@ -5389,8 +5420,8 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5389
5420
  }
5390
5421
  );
5391
5422
  });
5392
- qt.displayName = "BaseButton";
5393
- const bs = ie.forwardRef(
5423
+ jt.displayName = "BaseButton";
5424
+ const bs = oe.forwardRef(
5394
5425
  ({
5395
5426
  children: e,
5396
5427
  disabled: t = !1,
@@ -5421,7 +5452,7 @@ const bs = ie.forwardRef(
5421
5452
  radius: u
5422
5453
  });
5423
5454
  return /* @__PURE__ */ h(
5424
- qt,
5455
+ jt,
5425
5456
  {
5426
5457
  ref: m,
5427
5458
  className: p,
@@ -5435,7 +5466,7 @@ const bs = ie.forwardRef(
5435
5466
  bs.displayName = "Button";
5436
5467
  function Vi() {
5437
5468
  const e = j(!1);
5438
- return W(() => (e.current = !0, () => {
5469
+ return q(() => (e.current = !0, () => {
5439
5470
  e.current = !1;
5440
5471
  }), []), Y(() => e.current, []);
5441
5472
  }
@@ -5447,7 +5478,7 @@ function Es(e) {
5447
5478
  });
5448
5479
  }, [...e]);
5449
5480
  }
5450
- const Ji = {
5481
+ const Qi = {
5451
5482
  x: 0,
5452
5483
  y: 0,
5453
5484
  width: 0,
@@ -5457,14 +5488,14 @@ const Ji = {
5457
5488
  bottom: 0,
5458
5489
  right: 0
5459
5490
  };
5460
- function je(e) {
5461
- const t = Vi(), r = j(0), s = j(null), [a, n] = ne(Ji), i = Je(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
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) => {
5462
5493
  const c = o[0];
5463
5494
  c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
5464
5495
  s.current && t() && n(c.contentRect);
5465
5496
  }));
5466
5497
  }), [t]);
5467
- return W(() => (s.current && i?.observe(s.current, e), () => {
5498
+ return q(() => (s.current && i?.observe(s.current, e), () => {
5468
5499
  i?.disconnect(), r.current && cancelAnimationFrame(r.current);
5469
5500
  }), [i, e]), [s, a];
5470
5501
  }
@@ -5479,21 +5510,21 @@ function ws(e) {
5479
5510
  return typeof r == "number" || typeof r == "string" ? `${s}${r}` : `${s}${t}`;
5480
5511
  }
5481
5512
  }
5482
- const Be = {
5513
+ const qe = {
5483
5514
  small: 24,
5484
5515
  // w-6
5485
5516
  medium: 32,
5486
5517
  // w-8
5487
5518
  large: 48
5488
5519
  // w-12
5489
- }, Qi = {
5520
+ }, Ji = {
5490
5521
  small: 16,
5491
5522
  // px-2 x 2
5492
5523
  medium: 24,
5493
5524
  // px-3 x 2
5494
5525
  large: 32
5495
5526
  // px-4 x 2
5496
- }, Yi = 2, zi = 300, rt = ie.forwardRef(
5527
+ }, Yi = 2, zi = 300, st = oe.forwardRef(
5497
5528
  ({
5498
5529
  children: e,
5499
5530
  disabled: t = !1,
@@ -5517,7 +5548,7 @@ const Be = {
5517
5548
  animated: A = !1,
5518
5549
  ...K
5519
5550
  }, R) => {
5520
- const Q = gs({
5551
+ const J = gs({
5521
5552
  type: ct,
5522
5553
  mode: r,
5523
5554
  focusMode: s,
@@ -5534,15 +5565,15 @@ const Be = {
5534
5565
  radius: b,
5535
5566
  variant: E,
5536
5567
  animated: A
5537
- }), 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]);
5538
- return Qe(() => {
5539
- 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`));
5540
- }, [Ee, ce, u, c, A]), Qe(() => {
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(() => {
5541
5572
  if (T && T.current && A) {
5542
- let ue = Be[u];
5543
- 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(() => {
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(() => {
5544
5575
  _.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), S.current = null;
5545
- }, zi * 0.8))), ue === Be[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5576
+ }, zi * 0.8))), ue === qe[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5546
5577
  }
5547
5578
  }, [
5548
5579
  I,
@@ -5553,20 +5584,20 @@ const Be = {
5553
5584
  N,
5554
5585
  u,
5555
5586
  A
5556
- ]), W(() => () => {
5587
+ ]), q(() => () => {
5557
5588
  S.current && clearTimeout(S.current);
5558
5589
  }, []), /* @__PURE__ */ h(
5559
- qt,
5590
+ jt,
5560
5591
  {
5561
5592
  ref: le,
5562
- className: Q,
5593
+ className: J,
5563
5594
  disabled: t,
5564
5595
  type: i,
5565
5596
  "aria-label": f || d,
5566
5597
  ...K,
5567
- children: /* @__PURE__ */ q("div", { className: x, children: [
5598
+ children: /* @__PURE__ */ W("div", { className: x, children: [
5568
5599
  /* @__PURE__ */ h(
5569
- wr,
5600
+ Sr,
5570
5601
  {
5571
5602
  label: m,
5572
5603
  labelRef: N,
@@ -5577,7 +5608,7 @@ const Be = {
5577
5608
  ),
5578
5609
  /* @__PURE__ */ h("span", { ref: ce, className: C, children: e }),
5579
5610
  /* @__PURE__ */ h(
5580
- wr,
5611
+ Sr,
5581
5612
  {
5582
5613
  label: l,
5583
5614
  labelRef: _,
@@ -5590,7 +5621,7 @@ const Be = {
5590
5621
  }
5591
5622
  );
5592
5623
  }
5593
- ), wr = ({
5624
+ ), Sr = ({
5594
5625
  labelRef: e,
5595
5626
  labelClass: t,
5596
5627
  label: r,
@@ -5605,7 +5636,7 @@ const Be = {
5605
5636
  children: r && /* @__PURE__ */ h("span", { className: s, children: r })
5606
5637
  }
5607
5638
  );
5608
- rt.displayName = "ButtonIcon";
5639
+ st.displayName = "ButtonIcon";
5609
5640
  /*!
5610
5641
  @versini/ui-button v8.0.1
5611
5642
  © 2025 gizmette.com
@@ -5619,7 +5650,7 @@ try {
5619
5650
  });
5620
5651
  } catch {
5621
5652
  }
5622
- const Xi = ie.forwardRef(
5653
+ const Xi = oe.forwardRef(
5623
5654
  ({
5624
5655
  children: e,
5625
5656
  mode: t = "system",
@@ -5645,7 +5676,7 @@ const Xi = ie.forwardRef(
5645
5676
  }
5646
5677
  ) : "";
5647
5678
  return /* @__PURE__ */ h("div", { className: i, children: /* @__PURE__ */ h(
5648
- rt,
5679
+ st,
5649
5680
  {
5650
5681
  className: r,
5651
5682
  ref: n,
@@ -5660,7 +5691,7 @@ const Xi = ie.forwardRef(
5660
5691
  }
5661
5692
  );
5662
5693
  Xi.displayName = "ButtonSort";
5663
- const Ve = "av-card", Zi = ({
5694
+ const Qe = "av-card", Zi = ({
5664
5695
  className: e,
5665
5696
  headerClassName: t,
5666
5697
  bodyClassName: r,
@@ -5670,7 +5701,7 @@ const Ve = "av-card", Zi = ({
5670
5701
  noBorder: i
5671
5702
  }) => {
5672
5703
  const o = y(
5673
- Ve,
5704
+ Qe,
5674
5705
  "rounded-md",
5675
5706
  {
5676
5707
  "border-none": i,
@@ -5684,7 +5715,7 @@ const Ve = "av-card", Zi = ({
5684
5715
  "border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": a === "alt-system"
5685
5716
  },
5686
5717
  e
5687
- ), c = t || y(`${Ve}__header mt-0 border-b-2`, {
5718
+ ), c = t || y(`${Qe}__header mt-0 border-b-2`, {
5688
5719
  "text-copy-light border-border-accent": a === "darker",
5689
5720
  "border-border-accent": a === "dark",
5690
5721
  "border-border-medium": a === "light",
@@ -5692,7 +5723,7 @@ const Ve = "av-card", Zi = ({
5692
5723
  "border-border-accent dark:border-border-medium": a === "alt-system",
5693
5724
  "mb-4": !n,
5694
5725
  "mb-2": n
5695
- }), f = y(r), d = s || y(`${Ve}__footer pt-2`);
5726
+ }), f = y(r), d = s || y(`${Qe}__footer pt-2`);
5696
5727
  return {
5697
5728
  wrapper: o,
5698
5729
  header: c,
@@ -5723,7 +5754,7 @@ const to = ({
5723
5754
  ...u
5724
5755
  }) => {
5725
5756
  let l = null, m = null;
5726
- const p = typeof e == "string", g = ws(Ve), b = Zi({
5757
+ const p = typeof e == "string", g = ws(Qe), b = Zi({
5727
5758
  className: n,
5728
5759
  headerClassName: t,
5729
5760
  bodyClassName: i,
@@ -5732,7 +5763,7 @@ const to = ({
5732
5763
  compact: f,
5733
5764
  noBorder: d
5734
5765
  });
5735
- 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(
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(
5736
5767
  "section",
5737
5768
  {
5738
5769
  ...m && {
@@ -5781,7 +5812,7 @@ const lt = ({
5781
5812
  ...c
5782
5813
  }) => {
5783
5814
  const f = y(n, s);
5784
- return /* @__PURE__ */ q(
5815
+ return /* @__PURE__ */ W(
5785
5816
  "svg",
5786
5817
  {
5787
5818
  xmlns: "http://www.w3.org/2000/svg",
@@ -5835,7 +5866,7 @@ const ro = ({
5835
5866
  title: r,
5836
5867
  monotone: s,
5837
5868
  ...a
5838
- }) => /* @__PURE__ */ q(
5869
+ }) => /* @__PURE__ */ W(
5839
5870
  lt,
5840
5871
  {
5841
5872
  defaultViewBox: "0 0 640 512",
@@ -5863,7 +5894,7 @@ const ro = ({
5863
5894
  ...a
5864
5895
  }) => {
5865
5896
  const n = s ? "1" : "0.4";
5866
- return /* @__PURE__ */ q(
5897
+ return /* @__PURE__ */ W(
5867
5898
  lt,
5868
5899
  {
5869
5900
  defaultViewBox: "0 0 190 190",
@@ -5897,7 +5928,7 @@ const ro = ({
5897
5928
  title: r,
5898
5929
  monotone: s,
5899
5930
  ...a
5900
- }) => /* @__PURE__ */ q(
5931
+ }) => /* @__PURE__ */ W(
5901
5932
  lt,
5902
5933
  {
5903
5934
  defaultViewBox: "0 0 576 512",
@@ -5931,7 +5962,7 @@ try {
5931
5962
  });
5932
5963
  } catch {
5933
5964
  }
5934
- const io = "av-flexgrid", We = "av-flexgrid-item", st = 0.25, $t = ie.createContext({
5965
+ const io = "av-flexgrid", We = "av-flexgrid-item", at = 0.25, $t = oe.createContext({
5935
5966
  columnGap: 0,
5936
5967
  rowGap: 0
5937
5968
  }), oo = ({
@@ -5957,8 +5988,8 @@ const io = "av-flexgrid", We = "av-flexgrid-item", st = 0.25, $t = ie.createCont
5957
5988
  * by the columnGap and rowGap that will be applied
5958
5989
  * to all FlexgridItems (see context and paddings).
5959
5990
  */
5960
- marginLeft: r * -1 * st + "rem",
5961
- marginTop: s * -1 * st + "rem"
5991
+ marginLeft: r * -1 * at + "rem",
5992
+ marginTop: s * -1 * at + "rem"
5962
5993
  }, u = y(
5963
5994
  io,
5964
5995
  "box-border flex flex-wrap"
@@ -6066,9 +6097,9 @@ const io = "av-flexgrid", We = "av-flexgrid-item", st = 0.25, $t = ie.createCont
6066
6097
  span: r,
6067
6098
  ...s
6068
6099
  }) => {
6069
- const { columnGap: a, rowGap: n } = at($t), i = {
6070
- paddingLeft: a * st + "rem",
6071
- paddingTop: n * st + "rem"
6100
+ const { columnGap: a, rowGap: n } = nt($t), i = {
6101
+ paddingLeft: a * at + "rem",
6102
+ paddingTop: n * at + "rem"
6072
6103
  }, o = co({
6073
6104
  className: t,
6074
6105
  span: r
@@ -6118,7 +6149,7 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6118
6149
  t({
6119
6150
  type: vs
6120
6151
  }), typeof e == "function" && e();
6121
- }, Sr = ({
6152
+ }, vr = ({
6122
6153
  children: e,
6123
6154
  clearAnnouncementDelay: t,
6124
6155
  clearAnnouncementTimeoutRef: r,
@@ -6144,13 +6175,13 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6144
6175
  onAnnouncementClear: n,
6145
6176
  dispatch: i
6146
6177
  }) => {
6147
- clearTimeout(t.current), r ? t.current = setTimeout(Sr, r, {
6178
+ clearTimeout(t.current), r ? t.current = setTimeout(vr, r, {
6148
6179
  children: e,
6149
6180
  clearAnnouncementDelay: s,
6150
6181
  clearAnnouncementTimeoutRef: a,
6151
6182
  onAnnouncementClear: n,
6152
6183
  dispatch: i
6153
- }) : Sr({
6184
+ }) : vr({
6154
6185
  children: e,
6155
6186
  clearAnnouncementDelay: s,
6156
6187
  clearAnnouncementTimeoutRef: a,
@@ -6169,11 +6200,11 @@ function Ts({
6169
6200
  visible: o,
6170
6201
  ...c
6171
6202
  }) {
6172
- const f = j(null), d = j(null), [u, l] = Ir(uo, {
6203
+ const f = j(null), d = j(null), [u, l] = _r(uo, {
6173
6204
  announcement: null
6174
6205
  });
6175
6206
  let m = r;
6176
- typeof m > "u" && (m = s ? lo[s] : "assertive"), W(() => {
6207
+ typeof m > "u" && (m = s ? lo[s] : "assertive"), q(() => {
6177
6208
  fo({
6178
6209
  announcementTimeoutRef: f,
6179
6210
  announcementDelay: a,
@@ -6354,7 +6385,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6354
6385
  helperText: g,
6355
6386
  rightElement: b
6356
6387
  };
6357
- }, jt = ie.forwardRef(
6388
+ }, Vt = oe.forwardRef(
6358
6389
  ({
6359
6390
  id: e,
6360
6391
  name: t,
@@ -6376,7 +6407,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6376
6407
  size: E = "md",
6377
6408
  ...O
6378
6409
  }, A) => {
6379
- const [K, R] = je(), [Q, C] = ne(0), v = ws({ id: e, prefix: `${As}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
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 = {
6380
6411
  xs: { label: "-25px", helperText: "30px" },
6381
6412
  sm: { label: "-29px", helperText: "34px" },
6382
6413
  md: { label: "-33px", helperText: "38px" },
@@ -6394,15 +6425,15 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6394
6425
  size: E,
6395
6426
  rightElementClassName: b
6396
6427
  });
6397
- return Qe(() => {
6428
+ return Ye(() => {
6398
6429
  R && R.width && C(R.width + 18 + 10);
6399
- }, [R]), Qe(() => {
6400
- const { label: ce, helperText: Ee } = N[E];
6430
+ }, [R]), Ye(() => {
6431
+ const { label: ce, helperText: we } = N[E];
6401
6432
  _?.current?.style.setProperty("--av-text-input-label", ce), I?.current?.style.setProperty(
6402
6433
  "--av-text-input-helper-text",
6403
- Ee
6434
+ we
6404
6435
  );
6405
- }, [E]), /* @__PURE__ */ q("div", { className: V.wrapper, children: [
6436
+ }, [E]), /* @__PURE__ */ W("div", { className: V.wrapper, children: [
6406
6437
  /* @__PURE__ */ h(
6407
6438
  "label",
6408
6439
  {
@@ -6424,7 +6455,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6424
6455
  className: V.input,
6425
6456
  ...p && { "aria-describedby": `${v}-helper` },
6426
6457
  ...s && { "aria-invalid": "true" },
6427
- ...g && !a && { style: { paddingRight: Q } },
6458
+ ...g && !a && { style: { paddingRight: J } },
6428
6459
  ...O
6429
6460
  }
6430
6461
  ),
@@ -6459,8 +6490,8 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6459
6490
  ] });
6460
6491
  }
6461
6492
  );
6462
- jt.displayName = "TextInput";
6463
- const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6493
+ Vt.displayName = "TextInput";
6494
+ const So = 500, vo = 5e3, To = 2e4, Is = oe.forwardRef(
6464
6495
  ({
6465
6496
  name: e,
6466
6497
  disabled: t,
@@ -6474,7 +6505,7 @@ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6474
6505
  rightElement: f,
6475
6506
  ...d
6476
6507
  }, u) => {
6477
- const [l, m] = ne(!0), [p, g] = ne({
6508
+ const [l, m] = ie(!0), [p, g] = ie({
6478
6509
  message: null,
6479
6510
  politeness: null
6480
6511
  }), b = j(!0), E = j(null), O = j(null), A = Es([u, O]), K = l ? "Show" : "Hide", R = () => {
@@ -6485,7 +6516,7 @@ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6485
6516
  message: `${r} hiding characters`
6486
6517
  }), a && a(!0);
6487
6518
  }, To));
6488
- }, Q = (I) => {
6519
+ }, J = (I) => {
6489
6520
  I.preventDefault();
6490
6521
  const N = !b.current;
6491
6522
  b.current = N, R(), m(N), g({
@@ -6503,11 +6534,11 @@ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6503
6534
  }, _ = (I) => {
6504
6535
  R(), n && n(I);
6505
6536
  };
6506
- return W(() => () => {
6537
+ return q(() => () => {
6507
6538
  E.current && clearTimeout(E.current);
6508
- }, []), /* @__PURE__ */ q(Ar, { children: [
6539
+ }, []), /* @__PURE__ */ W(Ir, { children: [
6509
6540
  /* @__PURE__ */ h(
6510
- jt,
6541
+ Vt,
6511
6542
  {
6512
6543
  ref: A,
6513
6544
  name: e,
@@ -6518,10 +6549,10 @@ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6518
6549
  onBlur: v,
6519
6550
  onFocus: x,
6520
6551
  onChange: _,
6521
- rightElement: ie.cloneElement(f, {
6552
+ rightElement: oe.cloneElement(f, {
6522
6553
  ref: u,
6523
6554
  label: K,
6524
- onClick: Q,
6555
+ onClick: J,
6525
6556
  onBlur: C,
6526
6557
  disabled: t
6527
6558
  }),
@@ -6554,9 +6585,9 @@ try {
6554
6585
  });
6555
6586
  } catch {
6556
6587
  }
6557
- const Ao = "ASK! ME! ANYTHING!", Io = "⭐︎ AI DEV MODE ⭐︎", _o = "Log in with a password", Ro = "Log in with a Passkey", Hc = "Log out", Co = "Password", Kc = "Usage", Gc = "Profile", Bc = "Settings", Wc = "Chat history", qc = "About", Vt = "Type your message here.", jc = Vt, Vc = `${Vt}
6558
- Press Enter to send it or Shift+Enter for new line.`, Jc = `${Vt}
6559
- Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "Review important details.", Yc = [
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}
6590
+ Press Ctrl+Enter to send it or Enter for new line.`, Yc = "{{clipboard}}", P = "Review important details.", zc = [
6560
6591
  `Sometimes, ${k} just makes stuff up. ${P}`,
6561
6592
  `${k} may invent facts on the fly. ${P}`,
6562
6593
  `${k} may be confidently wrong. ${P}`,
@@ -6577,17 +6608,17 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6577
6608
  `Sometimes, ${k} howls at the moon. ${P}`,
6578
6609
  `${k} may dig up imaginary bones. ${P}`,
6579
6610
  `${k} may sniff out nonsense. ${P}`
6580
- ], zc = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Private Chat' checkbox, the corresponding chat will not be saved. If you select the 'Clipboard Access' checkbox, your clipboard content (if any) will be provided to the request.", Xc = "Default provider set to", Zc = "Chat successfully deleted!", el = "Chat successfully saved!", tl = "Caching enabled. Assets are now stored locally.", rl = "Caching disabled. Local asset cache cleared.", sl = "av-sassy", al = {
6611
+ ], Xc = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Private Chat' checkbox, the corresponding chat will not be saved. If you select the 'Clipboard Access' checkbox, your clipboard content (if any) will be provided to the request.", Zc = "Default provider set to", el = "Chat successfully deleted!", tl = "Chat successfully saved!", rl = "Caching enabled. Assets are now stored locally.", sl = "Caching disabled. Local asset cache cleared.", al = "av-sassy", nl = {
6581
6612
  0: ["January", "February", "March"],
6582
6613
  3: ["April", "May", "June"],
6583
6614
  6: ["July", "August", "September"],
6584
6615
  9: ["October", "November", "December"]
6585
- }, nl = {
6616
+ }, il = {
6586
6617
  0: ["Jan", "Feb", "Mar"],
6587
6618
  3: ["Apr", "May", "Jun"],
6588
6619
  6: ["Jul", "Aug", "Sep"],
6589
6620
  9: ["Oct", "Nov", "Dec"]
6590
- }, il = {
6621
+ }, ol = {
6591
6622
  PREFERENCES: {
6592
6623
  TITLE: "User profile",
6593
6624
  NAME: "Name",
@@ -6631,7 +6662,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6631
6662
  className: e,
6632
6663
  isCapabilitiesSuccess: t,
6633
6664
  capabilities: r
6634
- }) => /* @__PURE__ */ q(
6665
+ }) => /* @__PURE__ */ W(
6635
6666
  "div",
6636
6667
  {
6637
6668
  className: y(
@@ -6640,26 +6671,26 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6640
6671
  ),
6641
6672
  children: [
6642
6673
  /* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(ro, {}) }),
6643
- /* @__PURE__ */ q("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
6674
+ /* @__PURE__ */ W("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
6644
6675
  /* @__PURE__ */ h("h1", { children: k }),
6645
6676
  /* @__PURE__ */ h("h2", { children: t && r?.runningMode === "development" ? Io : Ao })
6646
6677
  ] })
6647
6678
  ]
6648
6679
  }
6649
6680
  ), ko = () => {
6650
- const { login: e, logoutReason: t, loginWithPasskey: r } = as(), [s, a] = ne(""), [n, i] = ne(""), [o, c] = ne(!0), [f, d] = ne({
6681
+ const { login: e, logoutReason: t, loginWithPasskey: r } = as(), [s, a] = ie(""), [n, i] = ie(""), [o, c] = ie(!0), [f, d] = ie({
6651
6682
  username: "",
6652
6683
  password: ""
6653
6684
  }), u = async (l) => {
6654
6685
  l.preventDefault(), await e(f.username, f.password) || (i(""), a("Invalid username or password"));
6655
6686
  };
6656
- return W(() => {
6687
+ return q(() => {
6657
6688
  document.getElementById("logo")?.classList.add("fadeOut"), setTimeout(() => {
6658
6689
  document.getElementById("root")?.classList.replace("app-hidden", "fadeIn");
6659
6690
  }, 500);
6660
- }), W(() => {
6691
+ }), q(() => {
6661
6692
  t && i(t);
6662
- }, [t]), /* @__PURE__ */ q("main", { className: fs({ extraClass: "mt-5" }), children: [
6693
+ }, [t]), /* @__PURE__ */ W("main", { className: fs({ extraClass: "mt-5" }), children: [
6663
6694
  /* @__PURE__ */ h(
6664
6695
  "div",
6665
6696
  {
@@ -6669,10 +6700,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6669
6700
  children: /* @__PURE__ */ h(Oo, {})
6670
6701
  }
6671
6702
  ),
6672
- /* @__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: [
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: [
6673
6704
  /* @__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 }) }),
6674
6705
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6675
- jt,
6706
+ Vt,
6676
6707
  {
6677
6708
  className: "mt-7",
6678
6709
  required: !0,
@@ -6705,7 +6736,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6705
6736
  name: "password",
6706
6737
  label: Co,
6707
6738
  rightElement: /* @__PURE__ */ h(
6708
- rt,
6739
+ st,
6709
6740
  {
6710
6741
  focusMode: "light",
6711
6742
  mode: "dark",
@@ -6736,10 +6767,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6736
6767
  children: _o
6737
6768
  }
6738
6769
  ) }),
6739
- !ms() && /* @__PURE__ */ q(Ar, { children: [
6770
+ !ms() && /* @__PURE__ */ W(Ir, { children: [
6740
6771
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
6741
6772
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6742
- rt,
6773
+ st,
6743
6774
  {
6744
6775
  variant: "selected",
6745
6776
  mode: "dark",
@@ -6754,10 +6785,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6754
6785
  ] })
6755
6786
  ] }) }) }) })
6756
6787
  ] });
6757
- }, No = new URL(document.location.href).searchParams, vr = !!No.get("debug") || !1, Po = Os(() => import(
6788
+ }, No = new URL(document.location.href).searchParams, Tr = !!No.get("debug") || !1, Po = Os(() => import(
6758
6789
  /* webpackChunkName: "LazyApp" */
6759
- "./App.Balhn4jc.js"
6760
- ).then((e) => e.App)), $o = new Xs(), Tr = ({
6790
+ "./App.DFkumxrG.js"
6791
+ ).then((e) => e.App)), $o = new Xs(), Ar = ({
6761
6792
  isComponent: e,
6762
6793
  headerHeight: t
6763
6794
  }) => {
@@ -6774,20 +6805,20 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6774
6805
  isComponent: e = !1,
6775
6806
  headerHeight: t = 0,
6776
6807
  domain: r = ds
6777
- }) => (W(() => {
6808
+ }) => (q(() => {
6778
6809
  e || os().catch((s) => {
6779
6810
  console.error("[SW] Failed to register service worker:", s);
6780
6811
  });
6781
- }, [e]), Gt ? /* @__PURE__ */ h(
6782
- pr,
6812
+ }, [e]), Bt ? /* @__PURE__ */ h(
6813
+ yr,
6783
6814
  {
6784
- clientId: yr,
6815
+ clientId: gr,
6785
6816
  domain: r,
6786
- debug: vr,
6817
+ debug: Tr,
6787
6818
  endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
6788
- children: /* @__PURE__ */ h(Tr, { isComponent: e, headerHeight: t })
6819
+ children: /* @__PURE__ */ h(Ar, { isComponent: e, headerHeight: t })
6789
6820
  }
6790
- ) : /* @__PURE__ */ h(pr, { clientId: yr, domain: r, debug: vr, children: /* @__PURE__ */ h(Tr, { isComponent: e, headerHeight: t }) })), ol = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
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(
6791
6822
  xo,
6792
6823
  {
6793
6824
  isComponent: !0,
@@ -6796,20 +6827,20 @@ Press Ctrl+Enter to send it or Enter for new line.`, Qc = "{{clipboard}}", P = "
6796
6827
  }
6797
6828
  );
6798
6829
  export {
6799
- qc as ABOUT_TITLE,
6800
- Qo as ACTION_RESET_PROMPT,
6830
+ jc as ABOUT_TITLE,
6831
+ Jo as ACTION_RESET_PROMPT,
6801
6832
  jo as ACTION_SEARCH,
6802
6833
  Vo as ACTION_SORT,
6803
- Jo as ACTION_TOGGLE_PROMPT,
6804
- sl as APP_CLASSNAME,
6834
+ Qo as ACTION_TOGGLE_PROMPT,
6835
+ al as APP_CLASSNAME,
6805
6836
  Ac as Ae,
6806
6837
  bs as C,
6807
- il as CARDS,
6808
- Qc as CLIPBOARD_PROMPT,
6838
+ ol as CARDS,
6839
+ Yc as CLIPBOARD_PROMPT,
6809
6840
  lc as DEFAULT_ICON_ACTION_SIZE,
6810
6841
  Vn as E,
6811
- qo as ERROR_MESSAGE,
6812
- Yc as FOOTER_DISCLAIMERS,
6842
+ Wo as ERROR_MESSAGE,
6843
+ zc as FOOTER_DISCLAIMERS,
6813
6844
  Wc as HISTORY_TITLE,
6814
6845
  lt as I,
6815
6846
  ic as INFINITE_SCROLL_LIMIT,
@@ -6819,8 +6850,8 @@ export {
6819
6850
  yc as INPUT_BOTTOM_OFFSET_IPAD,
6820
6851
  pc as INPUT_BOTTOM_OFFSET_IPHONE,
6821
6852
  Jc as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
6822
- Vc as INPUT_PLACEHOLDER_TEXT_ENTER,
6823
- jc as INPUT_PLACEHOLDER_TEXT_MOBILE,
6853
+ Qc as INPUT_PLACEHOLDER_TEXT_ENTER,
6854
+ Vc as INPUT_PLACEHOLDER_TEXT_MOBILE,
6824
6855
  oo as L,
6825
6856
  rc as LOCAL_STORAGE_FAVORITES_ONLY,
6826
6857
  ns as LOCAL_STORAGE_PREFIX,
@@ -6832,31 +6863,31 @@ export {
6832
6863
  ec as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
6833
6864
  Xo as LOCAL_STORAGE_SORT_TIMESTAMP,
6834
6865
  Zo as LOCAL_STORAGE_SORT_TOKEN_USAGE,
6835
- Hc as LOG_OUT,
6866
+ Kc as LOG_OUT,
6836
6867
  Oo as Logo,
6837
6868
  Rc as Oe,
6838
- Gc as PROFILE_TITLE,
6839
- zc as PROMPTS_DESCRIPTION,
6869
+ Bc as PROFILE_TITLE,
6870
+ Xc as PROMPTS_DESCRIPTION,
6840
6871
  oc as PROMPT_CLASSNAME,
6841
6872
  cc as PROMPT_EDITABLE_AREA_CLASSNAME,
6842
6873
  Cc as Re,
6843
6874
  to as S,
6844
- te as SERVICE_TYPES,
6845
- Bc as SETTINGS_TITLE,
6846
- ol as SassySaint,
6847
- rl as TOAST_CACHE_DISABLED,
6848
- tl as TOAST_CACHE_ENABLED,
6849
- Zc as TOAST_CHAT_DELETED,
6850
- el as TOAST_CHAT_SAVED,
6851
- Xc as TOAST_PROVIDER_CHANGED,
6852
- al as TRIMESTERS,
6853
- nl as TRIMESTERS_SHORT,
6875
+ z as SERVICE_TYPES,
6876
+ qc as SETTINGS_TITLE,
6877
+ cl as SassySaint,
6878
+ sl as TOAST_CACHE_DISABLED,
6879
+ rl as TOAST_CACHE_ENABLED,
6880
+ el as TOAST_CHAT_DELETED,
6881
+ tl as TOAST_CHAT_SAVED,
6882
+ Zc as TOAST_PROVIDER_CHANGED,
6883
+ nl as TRIMESTERS,
6884
+ il as TRIMESTERS_SHORT,
6854
6885
  dc as UI_BUTTON_SCROLL_BUFFER,
6855
6886
  hc as UI_DEFAULT_MAIN_HEIGHT,
6856
6887
  fc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
6857
6888
  uc as UI_FOOTER_BUFFER,
6858
- Kc as USAGE_TITLE,
6859
- jt as Y,
6889
+ Gc as USAGE_TITLE,
6890
+ Vt as Y,
6860
6891
  wc as a,
6861
6892
  Xi as b,
6862
6893
  Sc as c,
@@ -6867,7 +6898,7 @@ export {
6867
6898
  wi as getCurrentGeoLocation,
6868
6899
  fs as getLayoutPaddingClass,
6869
6900
  hs as getMessageContaintWrapperClass,
6870
- je as h,
6901
+ Ve as h,
6871
6902
  bc as handleServiceWorkerToggle,
6872
6903
  ws as i,
6873
6904
  cs as i$1,
@@ -6892,20 +6923,21 @@ export {
6892
6923
  Ti as renderDataAsList,
6893
6924
  ii as serverUrl,
6894
6925
  Oc as setNewProvider,
6895
- rt as te,
6926
+ st as te,
6896
6927
  Ic as ue,
6897
6928
  vi as unObfuscate,
6898
6929
  Nc as useChangelogs,
6899
6930
  $c as useChatsHistory,
6900
6931
  xc as useChatsUsage,
6901
- Lc as useDeleteAllMemories,
6902
- Mc as useDeleteMemory,
6903
- Uc as useEntitlements,
6932
+ Uc as useDeleteAllMemories,
6933
+ Lc as useDeleteMemory,
6934
+ Fc as useEntitlements,
6904
6935
  kc as useServerCapabilities,
6936
+ Dc as useUpdateMemory,
6905
6937
  Pc as useUserChatStats,
6906
- Dc as useUserMemories,
6938
+ Mc as useUserMemories,
6907
6939
  ci as useUserPreferences,
6908
- Fc as utilities,
6940
+ Hc as utilities,
6909
6941
  Ts as x,
6910
- Jn as y
6942
+ Qn as y
6911
6943
  };