@versini/sassysaint 8.62.3 → 8.63.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.DGB_6XWF.js → AboutChangelog.CcpXjtz2.js} +2 -2
  2. package/dist/chunks/{AboutEntry.Bi3Rtvax.js → AboutEntry.D-K-8suU.js} +9 -9
  3. package/dist/chunks/{App.cuOjKevV.js → App.BUHkBnAs.js} +1551 -1540
  4. package/dist/chunks/{Chart.D8o0MX15.js → Chart.f_78Yn-S.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.BsGW6-uz.js → ChatBubbleAssistant.BMzfA5pX.js} +16 -16
  6. package/dist/chunks/{ChatBubbleUser.5klvBcRZ.js → ChatBubbleUser.BkwIMaLA.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.Btl5R3g_.js → ChatHistoryTable.z1gXvLbS.js} +15 -15
  8. package/dist/chunks/{HistoryEntry.Dd9wepcS.js → HistoryEntry.6LhEmpQ3.js} +30 -30
  9. package/dist/chunks/ProfileEntry.BVd9oy8m.js +158 -0
  10. package/dist/chunks/{SettingsEntry.DJ6HHl3_.js → SettingsEntry.BITLpN9E.js} +104 -105
  11. package/dist/chunks/{Table.B9Dh8yT5.js → Table.BuN5VZQJ.js} +8 -8
  12. package/dist/chunks/{UsageEntry.BBHtbgZr.js → UsageEntry.B5xt2ba5.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.B2rrpuxL.js → UserMemoriesPanel.DU82nD6K.js} +3 -3
  14. package/dist/chunks/{index.BwP0kG4H.js → index.790ujKXR.js} +15 -15
  15. package/dist/chunks/{index.C1SMMUJo.js → index.BCvnlzn1.js} +1009 -947
  16. package/dist/chunks/{index.Chm9CISa.js → index.Bmi4qytW.js} +2 -2
  17. package/dist/chunks/{index.BWJ8ML3P.js → index.Cq79kge7.js} +1 -1
  18. package/dist/chunks/{index.EtY2KRYo.js → index.DEwRELHl.js} +3 -3
  19. package/dist/chunks/{index.DJTHwROE.js → index.TsLNeuu8.js} +1 -1
  20. package/dist/chunks/{index.BoS9FOuX.js → index.W_JEPkEx.js} +1 -1
  21. package/dist/chunks/{index.CXN6Kb5s.js → index.hfGQXbdH.js} +1 -1
  22. package/dist/chunks/{useMarkdown.Bw-tEpSM.js → useMarkdown.D7Tx0mAO.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +1 -1
  26. package/package.json +3 -3
  27. package/dist/chunks/ProfileEntry.y2zGAvLi.js +0 -60
@@ -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 q, Fragment as Rr } 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 Qe, useId as Rs, useLayoutEffect as Je, Suspense as Cs, lazy as Os } from "react";
3
+ import ie, { createContext as Lt, useReducer as Cr, useCallback as Y, useRef as j, useEffect as W, useSyncExternalStore as Us, useContext as nt, useState as ne, useMemo as Je, useId as Fs, useLayoutEffect as Ye, Suspense as Hs, lazy as Ks } from "react";
4
4
  import y from "clsx";
5
5
  var ke = class {
6
6
  constructor() {
@@ -18,7 +18,7 @@ var ke = class {
18
18
  }
19
19
  onUnsubscribe() {
20
20
  }
21
- }, ks = {
21
+ }, Gs = {
22
22
  // We need the wrapper function syntax below instead of direct references to
23
23
  // global setTimeout etc.
24
24
  //
@@ -33,14 +33,14 @@ var ke = class {
33
33
  clearTimeout: (e) => clearTimeout(e),
34
34
  setInterval: (e, t) => setInterval(e, t),
35
35
  clearInterval: (e) => clearInterval(e)
36
- }, Ns = class {
36
+ }, Bs = class {
37
37
  // We cannot have TimeoutManager<T> as we must instantiate it with a concrete
38
38
  // type at app boot; and if we leave that type, then any new timer provider
39
39
  // would need to support ReturnType<typeof setTimeout>, which is infeasible.
40
40
  //
41
41
  // We settle for type safety for the TimeoutProvider type, and accept that
42
42
  // this class is unsafe internally to allow for extension.
43
- #e = ks;
43
+ #e = Gs;
44
44
  #t = !1;
45
45
  setTimeoutProvider(e) {
46
46
  process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error(
@@ -60,20 +60,20 @@ var ke = class {
60
60
  clearInterval(e) {
61
61
  this.#e.clearInterval(e);
62
62
  }
63
- }, fe = new Ns();
64
- function Ps(e) {
63
+ }, fe = new Bs();
64
+ function Ws(e) {
65
65
  setTimeout(e, 0);
66
66
  }
67
67
  var me = typeof window > "u" || "Deno" in globalThis;
68
68
  function B() {
69
69
  }
70
- function $s(e, t) {
70
+ function qs(e, t) {
71
71
  return typeof e == "function" ? e(t) : e;
72
72
  }
73
- function Tt(e) {
73
+ function _t(e) {
74
74
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
75
75
  }
76
- function _r(e, t) {
76
+ function Or(e, t) {
77
77
  return Math.max(e + (t || 0) - Date.now(), 0);
78
78
  }
79
79
  function de(e, t) {
@@ -82,7 +82,7 @@ function de(e, t) {
82
82
  function Q(e, t) {
83
83
  return typeof e == "function" ? e(t) : e;
84
84
  }
85
- function Jt(e, t) {
85
+ function Xt(e, t) {
86
86
  const {
87
87
  type: r = "all",
88
88
  exact: s,
@@ -93,7 +93,7 @@ function Jt(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 !== Ut(i, t.options))
97
97
  return !1;
98
98
  } else if (!xe(t.queryKey, i))
99
99
  return !1;
@@ -105,7 +105,7 @@ function Jt(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,42 +118,42 @@ 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 Ut(e, t) {
122
122
  return (t?.queryKeyHashFn || pe)(e);
123
123
  }
124
124
  function pe(e) {
125
125
  return JSON.stringify(
126
126
  e,
127
- (t, r) => It(r) ? Object.keys(r).sort().reduce((s, a) => (s[a] = r[a], s), {}) : r
127
+ (t, r) => Ct(r) ? Object.keys(r).sort().reduce((s, a) => (s[a] = r[a], s), {}) : r
128
128
  );
129
129
  }
130
130
  function xe(e, t) {
131
131
  return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((r) => xe(e[r], t[r])) : !1;
132
132
  }
133
- var xs = Object.prototype.hasOwnProperty;
134
- function At(e, t) {
133
+ var js = Object.prototype.hasOwnProperty;
134
+ function Rt(e, t) {
135
135
  if (e === t)
136
136
  return e;
137
- const r = zt(e) && zt(t);
138
- if (!r && !(It(e) && It(t))) return t;
137
+ const r = er(e) && er(t);
138
+ if (!r && !(Ct(e) && Ct(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;
141
141
  for (let f = 0; f < i; f++) {
142
142
  const d = r ? f : n[f], u = e[d], l = t[d];
143
143
  if (u === l) {
144
- o[d] = u, (r ? f < a : xs.call(e, d)) && c++;
144
+ o[d] = u, (r ? f < a : js.call(e, d)) && c++;
145
145
  continue;
146
146
  }
147
147
  if (u === null || l === null || typeof u != "object" || typeof l != "object") {
148
148
  o[d] = l;
149
149
  continue;
150
150
  }
151
- const m = At(u, l);
151
+ const m = Rt(u, l);
152
152
  o[d] = m, m === u && c++;
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,60 +161,60 @@ function Ye(e, t) {
161
161
  return !1;
162
162
  return !0;
163
163
  }
164
- function zt(e) {
164
+ function er(e) {
165
165
  return Array.isArray(e) && e.length === Object.keys(e).length;
166
166
  }
167
- function It(e) {
168
- if (!Xt(e))
167
+ function Ct(e) {
168
+ if (!tr(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 !(!tr(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
175
175
  }
176
- function Xt(e) {
176
+ function tr(e) {
177
177
  return Object.prototype.toString.call(e) === "[object Object]";
178
178
  }
179
- function Ds(e) {
179
+ function Vs(e) {
180
180
  return new Promise((t) => {
181
181
  fe.setTimeout(t, e);
182
182
  });
183
183
  }
184
- function _t(e, t, r) {
184
+ function Ot(e, t, r) {
185
185
  if (typeof r.structuralSharing == "function")
186
186
  return r.structuralSharing(e, t);
187
187
  if (r.structuralSharing !== !1) {
188
188
  if (process.env.NODE_ENV !== "production")
189
189
  try {
190
- return At(e, t);
190
+ return Rt(e, t);
191
191
  } catch (s) {
192
192
  throw console.error(
193
193
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`
194
194
  ), s;
195
195
  }
196
- return At(e, t);
196
+ return Rt(e, t);
197
197
  }
198
198
  return t;
199
199
  }
200
- function Ms(e, t, r = 0) {
200
+ function Qs(e, t, r = 0) {
201
201
  const s = [...e, t];
202
202
  return r && s.length > r ? s.slice(1) : s;
203
203
  }
204
- function Ls(e, t, r = 0) {
204
+ function Js(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 kr(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 Nr(e, t) {
215
215
  return typeof e == "function" ? e(...t) : !!e;
216
216
  }
217
- var Us = class extends ke {
217
+ var Ys = class extends ke {
218
218
  #e;
219
219
  #t;
220
220
  #r;
@@ -251,8 +251,8 @@ 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();
255
- function Rt() {
254
+ }, Ft = new Ys();
255
+ function kt() {
256
256
  let e, t;
257
257
  const r = new Promise((a, n) => {
258
258
  e = a, t = n;
@@ -274,13 +274,13 @@ function Rt() {
274
274
  }), t(a);
275
275
  }, r;
276
276
  }
277
- var Fs = Ps;
278
- function Hs() {
277
+ var zs = Ws;
278
+ function Xs() {
279
279
  let e = [], t = 0, r = (o) => {
280
280
  o();
281
281
  }, s = (o) => {
282
282
  o();
283
- }, a = Fs;
283
+ }, a = zs;
284
284
  const n = (o) => {
285
285
  t ? e.push(o) : a(() => {
286
286
  r(o);
@@ -334,7 +334,7 @@ function Hs() {
334
334
  }
335
335
  };
336
336
  }
337
- var $ = Hs(), Ks = class extends ke {
337
+ var $ = Xs(), Zs = class extends ke {
338
338
  #e = !0;
339
339
  #t;
340
340
  #r;
@@ -365,30 +365,30 @@ var $ = Hs(), Ks = class extends ke {
365
365
  isOnline() {
366
366
  return this.#e;
367
367
  }
368
- }, Xe = new Ks();
369
- function Gs(e) {
368
+ }, Ze = new Zs();
369
+ function ea(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 Pr(e) {
373
+ return (e ?? "online") === "online" ? Ze.isOnline() : !0;
374
374
  }
375
- var Ct = class extends Error {
375
+ var Nt = 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 $r(e) {
381
381
  let t = !1, r = 0, s;
382
- const a = Rt(), n = () => a.status !== "pending", i = (g) => {
382
+ const a = kt(), n = () => a.status !== "pending", i = (g) => {
383
383
  if (!n()) {
384
- const b = new Ct(g);
384
+ const b = new Nt(g);
385
385
  l(b), e.onCancel?.(b);
386
386
  }
387
387
  }, o = () => {
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 = () => Ft.isFocused() && (e.networkMode === "always" || Ze.isOnline()) && e.canRun(), d = () => Pr(e.networkMode) && e.canRun(), u = (g) => {
392
392
  n() || (s?.(), a.resolve(g));
393
393
  }, l = (g) => {
394
394
  n() || (s?.(), a.reject(g));
@@ -411,12 +411,12 @@ function kr(e) {
411
411
  Promise.resolve(g).then(u).catch((E) => {
412
412
  if (n())
413
413
  return;
414
- const O = e.retry ?? (me ? 0 : 3), A = e.retryDelay ?? Gs, K = typeof A == "function" ? A(r, E) : A, R = O === !0 || typeof O == "number" && r < O || typeof O == "function" && O(r, E);
414
+ const O = e.retry ?? (me ? 0 : 3), A = e.retryDelay ?? ea, K = typeof A == "function" ? A(r, E) : A, R = O === !0 || typeof O == "number" && r < O || typeof O == "function" && O(r, E);
415
415
  if (t || !R) {
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), Vs(K).then(() => f() ? void 0 : m()).then(() => {
420
420
  t ? l(E) : p();
421
421
  });
422
422
  });
@@ -432,13 +432,13 @@ function kr(e) {
432
432
  start: () => (d() ? p() : m().then(p), a)
433
433
  };
434
434
  }
435
- var Nr = class {
435
+ var xr = class {
436
436
  #e;
437
437
  destroy() {
438
438
  this.clearGcTimeout();
439
439
  }
440
440
  scheduleGc() {
441
- this.clearGcTimeout(), Tt(this.gcTime) && (this.#e = fe.setTimeout(() => {
441
+ this.clearGcTimeout(), _t(this.gcTime) && (this.#e = fe.setTimeout(() => {
442
442
  this.optionalRemove();
443
443
  }, this.gcTime));
444
444
  }
@@ -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
+ }, ta = class extends xr {
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 = rr(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 = rr(this.options);
474
474
  t.data !== void 0 && (this.setData(t.data, {
475
475
  updatedAt: t.dataUpdatedAt,
476
476
  manual: !0
@@ -481,7 +481,7 @@ var Nr = class {
481
481
  !this.observers.length && this.state.fetchStatus === "idle" && this.#r.remove(this);
482
482
  }
483
483
  setData(e, t) {
484
- const r = _t(this.state.data, e, this.options);
484
+ const r = Ot(this.state.data, e, this.options);
485
485
  return this.#n({
486
486
  data: r,
487
487
  type: "success",
@@ -508,7 +508,7 @@ var Nr = class {
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 : !Or(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 = kr(this.options, t), f = (() => {
568
568
  const d = {
569
569
  client: this.#a,
570
570
  queryKey: this.queryKey,
@@ -588,11 +588,11 @@ 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 = $r({
592
592
  initialPromise: t?.initialPromise,
593
593
  fn: i.fetchFn,
594
594
  onCancel: (o) => {
595
- o instanceof Ct && o.revert && this.setState({
595
+ o instanceof Nt && o.revert && this.setState({
596
596
  ...this.#t,
597
597
  fetchStatus: "idle"
598
598
  }), r.abort();
@@ -623,7 +623,7 @@ var Nr = class {
623
623
  this
624
624
  ), o;
625
625
  } catch (o) {
626
- if (o instanceof Ct) {
626
+ if (o instanceof Nt) {
627
627
  if (o.silent)
628
628
  return this.#s.promise;
629
629
  if (o.revert) {
@@ -669,7 +669,7 @@ var Nr = class {
669
669
  case "fetch":
670
670
  return {
671
671
  ...r,
672
- ...Pr(r.data, this.options),
672
+ ...Dr(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 Dr(e, t) {
723
723
  return {
724
724
  fetchFailureCount: 0,
725
725
  fetchFailureReason: null,
726
- fetchStatus: Or(t.networkMode) ? "fetching" : "paused",
726
+ fetchStatus: Pr(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 rr(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,9 +747,9 @@ function Zt(e) {
747
747
  fetchStatus: "idle"
748
748
  };
749
749
  }
750
- var Ws = class extends ke {
750
+ var ra = class extends ke {
751
751
  constructor(e, t) {
752
- super(), this.options = t, this.#e = e, this.#n = null, this.#o = Rt(), this.bindMethods(), this.setOptions(t);
752
+ super(), this.options = t, this.#e = e, this.#n = null, this.#o = kt(), this.bindMethods(), this.setOptions(t);
753
753
  }
754
754
  #e;
755
755
  #t = void 0;
@@ -772,20 +772,20 @@ 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), sr(this.#t, this.options) ? this.#d() : this.updateResult(), this.#E());
776
776
  }
777
777
  onUnsubscribe() {
778
778
  this.hasListeners() || this.destroy();
779
779
  }
780
780
  shouldFetchOnReconnect() {
781
- return Ot(
781
+ return Pt(
782
782
  this.#t,
783
783
  this.options,
784
784
  this.options.refetchOnReconnect
785
785
  );
786
786
  }
787
787
  shouldFetchOnWindowFocus() {
788
- return Ot(
788
+ return Pt(
789
789
  this.#t,
790
790
  this.options,
791
791
  this.options.refetchOnWindowFocus
@@ -800,13 +800,13 @@ var Ws = class extends ke {
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 && ar(
810
810
  this.#t,
811
811
  r,
812
812
  this.options,
@@ -817,7 +817,7 @@ var Ws = class extends ke {
817
817
  }
818
818
  getOptimisticResult(e) {
819
819
  const t = this.#e.getQueryCache().build(this.#e, e), r = this.createResult(t, e);
820
- return js(this, r) && (this.#a = r, this.#i = this.options, this.#s = this.#t.state), r;
820
+ return aa(this, r) && (this.#a = r, this.#i = this.options, this.#s = this.#t.state), r;
821
821
  }
822
822
  getCurrentResult() {
823
823
  return this.#a;
@@ -866,9 +866,9 @@ var Ws = class extends ke {
866
866
  this.options.staleTime,
867
867
  this.#t
868
868
  );
869
- if (me || this.#a.isStale || !Tt(e))
869
+ if (me || this.#a.isStale || !_t(e))
870
870
  return;
871
- const r = _r(this.#a.dataUpdatedAt, e) + 1;
871
+ const r = Or(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 || Q(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 || !_t(this.#c) || this.#c === 0) && (this.#u = fe.setInterval(() => {
881
+ (this.options.refetchIntervalInBackground || Ft.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 && sr(e, t), _ = v && ar(e, r, t, s);
898
898
  (x || _) && (d = {
899
899
  ...d,
900
- ...Pr(f.data, e.options)
900
+ ...Dr(f.data, e.options)
901
901
  }), t._optimisticResults === "isRestoring" && (d.fetchStatus = "idle");
902
902
  }
903
903
  let { error: m, errorUpdatedAt: p, status: g } = d;
@@ -908,7 +908,7 @@ var Ws = class extends ke {
908
908
  a?.isPlaceholderData && t.placeholderData === i?.placeholderData ? (v = a.data, b = !0) : v = typeof t.placeholderData == "function" ? t.placeholderData(
909
909
  this.#f?.state.data,
910
910
  this.#f
911
- ) : t.placeholderData, v !== void 0 && (g = "success", l = _t(
911
+ ) : t.placeholderData, v !== void 0 && (g = "success", l = Ot(
912
912
  a?.data,
913
913
  v,
914
914
  t
@@ -919,7 +919,7 @@ var Ws = class extends ke {
919
919
  l = this.#h;
920
920
  else
921
921
  try {
922
- this.#p = t.select, l = t.select(l), l = _t(a?.data, l, t), this.#h = l, this.#n = null;
922
+ this.#p = t.select, l = t.select(l), l = Ot(a?.data, l, t), this.#h = l, this.#n = null;
923
923
  } catch (v) {
924
924
  this.#n = v;
925
925
  }
@@ -947,7 +947,7 @@ var Ws = class extends ke {
947
947
  isPaused: d.fetchStatus === "paused",
948
948
  isPlaceholderData: u,
949
949
  isRefetchError: A && R,
950
- isStale: Lt(e, t),
950
+ isStale: Ht(e, t),
951
951
  refetch: this.refetch,
952
952
  promise: this.#o,
953
953
  isEnabled: Q(t.enabled, e) !== !1
@@ -956,7 +956,7 @@ var Ws = class extends ke {
956
956
  const v = (I) => {
957
957
  C.status === "error" ? I.reject(C.error) : C.data !== void 0 && I.resolve(C.data);
958
958
  }, x = () => {
959
- const I = this.#o = C.promise = Rt();
959
+ const I = this.#o = C.promise = kt();
960
960
  v(I);
961
961
  }, _ = this.#o;
962
962
  switch (_.status) {
@@ -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) {
1018
+ function sa(e, t) {
1019
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 sr(e, t) {
1022
+ return sa(e, t) || e.state.data !== void 0 && Pt(e, t, t.refetchOnMount);
1023
1023
  }
1024
- function Ot(e, t, r) {
1024
+ function Pt(e, t, r) {
1025
1025
  if (Q(t.enabled, e) !== !1 && de(t.staleTime, e) !== "static") {
1026
1026
  const s = typeof r == "function" ? r(e) : r;
1027
- return s === "always" || s !== !1 && Lt(e, t);
1027
+ return s === "always" || s !== !1 && Ht(e, t);
1028
1028
  }
1029
1029
  return !1;
1030
1030
  }
1031
- function tr(e, t, r, s) {
1032
- return (e !== t || Q(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Lt(e, r);
1031
+ function ar(e, t, r, s) {
1032
+ return (e !== t || Q(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Ht(e, r);
1033
1033
  }
1034
- function Lt(e, t) {
1034
+ function Ht(e, t) {
1035
1035
  return Q(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
1036
1036
  }
1037
- function js(e, t) {
1038
- return !Ye(e.getCurrentResult(), t);
1037
+ function aa(e, t) {
1038
+ return !ze(e.getCurrentResult(), t);
1039
1039
  }
1040
- function rr(e) {
1040
+ function nr(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,7 +1051,7 @@ 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 = kr(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)
@@ -1065,14 +1065,14 @@ function rr(e) {
1065
1065
  meta: t.options.meta
1066
1066
  };
1067
1067
  return u(J), J;
1068
- })(), A = await l(O), { maxPages: K } = t.options, R = b ? Ls : Ms;
1068
+ })(), A = await l(O), { maxPages: K } = t.options, R = b ? Js : Qs;
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 ? na : ir, 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 : ir(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 ir(e, { pages: t, pageParams: r }) {
1105
1105
  const s = t.length - 1;
1106
1106
  return t.length > 0 ? e.getNextPageParam(
1107
1107
  t[s],
@@ -1110,16 +1110,16 @@ function sr(e, { pages: t, pageParams: r }) {
1110
1110
  r
1111
1111
  ) : void 0;
1112
1112
  }
1113
- function Vs(e, { pages: t, pageParams: r }) {
1113
+ function na(e, { pages: t, pageParams: r }) {
1114
1114
  return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, r[0], r) : void 0;
1115
1115
  }
1116
- var Qs = class extends Nr {
1116
+ var ia = class extends xr {
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 || Mr(), this.setOptions(e.options), this.scheduleGc();
1123
1123
  }
1124
1124
  setOptions(e) {
1125
1125
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -1156,7 +1156,7 @@ var Qs = class extends Nr {
1156
1156
  meta: this.options.meta,
1157
1157
  mutationKey: this.options.mutationKey
1158
1158
  };
1159
- this.#a = kr({
1159
+ this.#a = $r({
1160
1160
  fn: () => this.options.mutationFn ? this.options.mutationFn(e, r) : Promise.reject(new Error("No mutationFn found")),
1161
1161
  onFail: (n, i) => {
1162
1162
  this.#s({ type: "failed", failureCount: n, error: i });
@@ -1316,7 +1316,7 @@ var Qs = class extends Nr {
1316
1316
  });
1317
1317
  }
1318
1318
  };
1319
- function $r() {
1319
+ function Mr() {
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 Js = class extends ke {
1332
+ var oa = class extends ke {
1333
1333
  constructor(e = {}) {
1334
1334
  super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#r = 0;
1335
1335
  }
@@ -1337,7 +1337,7 @@ var Js = class extends ke {
1337
1337
  #t;
1338
1338
  #r;
1339
1339
  build(e, t, r) {
1340
- const s = new Qs({
1340
+ const s = new ia({
1341
1341
  client: e,
1342
1342
  mutationCache: this,
1343
1343
  mutationId: ++this.#r,
@@ -1348,7 +1348,7 @@ var Js = class extends ke {
1348
1348
  }
1349
1349
  add(e) {
1350
1350
  this.#e.add(e);
1351
- const t = 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 Js = 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 Js = 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 Js = 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 Js = 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,10 +1418,10 @@ var Js = 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
- var Ys = class extends ke {
1424
+ var ca = class extends ke {
1425
1425
  #e;
1426
1426
  #t = void 0;
1427
1427
  #r;
@@ -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 ?? Mr();
1460
1460
  this.#t = {
1461
1461
  ...e,
1462
1462
  isPending: e.status === "pending",
@@ -1504,15 +1504,15 @@ var Ys = class extends ke {
1504
1504
  });
1505
1505
  });
1506
1506
  }
1507
- }, zs = class extends ke {
1507
+ }, la = class extends ke {
1508
1508
  constructor(e = {}) {
1509
1509
  super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
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 ?? Ut(s, t);
1514
1514
  let n = this.get(a);
1515
- return n || (n = new Bs({
1515
+ return n || (n = new ta({
1516
1516
  client: e,
1517
1517
  queryKey: s,
1518
1518
  queryHash: a,
@@ -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) => Jt(t, r)
1550
+ (r) => Xt(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) => Jt(e, r)) : t;
1555
+ return Object.keys(e).length > 0 ? t.filter((r) => Xt(e, r)) : t;
1556
1556
  }
1557
1557
  notify(e) {
1558
1558
  $.batch(() => {
@@ -1575,7 +1575,7 @@ var Ys = class extends ke {
1575
1575
  });
1576
1576
  });
1577
1577
  }
1578
- }, Xs = class {
1578
+ }, ua = class {
1579
1579
  #e;
1580
1580
  #t;
1581
1581
  #r;
@@ -1585,12 +1585,12 @@ var Ys = class extends ke {
1585
1585
  #o;
1586
1586
  #n;
1587
1587
  constructor(e = {}) {
1588
- this.#e = e.queryCache || new zs(), this.#t = e.mutationCache || new Js(), this.#r = e.defaultOptions || {}, this.#a = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#i = 0;
1588
+ this.#e = e.queryCache || new la(), this.#t = e.mutationCache || new oa(), 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 = Ft.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
  }
@@ -1627,7 +1627,7 @@ var Ys = class extends ke {
1627
1627
  setQueryData(e, t, r) {
1628
1628
  const s = this.defaultQueryOptions({ queryKey: e }), n = this.#e.get(
1629
1629
  s.queryHash
1630
- )?.state.data, i = $s(t, n);
1630
+ )?.state.data, i = qs(t, n);
1631
1631
  if (i !== void 0)
1632
1632
  return this.#e.build(this, s).setData(i, { ...r, manual: !0 });
1633
1633
  }
@@ -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 = nr(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 = nr(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 = Ut(
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,20 +1778,20 @@ var Ys = class extends ke {
1778
1778
  clear() {
1779
1779
  this.#e.clear(), this.#t.clear();
1780
1780
  }
1781
- }, xr = H.createContext(
1781
+ }, Lr = H.createContext(
1782
1782
  void 0
1783
- ), nt = (e) => {
1784
- const t = H.useContext(xr);
1783
+ ), it = (e) => {
1784
+ const t = H.useContext(Lr);
1785
1785
  if (!t)
1786
1786
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1787
1787
  return t;
1788
- }, Zs = ({
1788
+ }, da = ({
1789
1789
  client: e,
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);
1794
- function ra() {
1793
+ }), [e]), /* @__PURE__ */ h(Lr.Provider, { value: e, children: t })), ha = H.createContext(!1), fa = () => H.useContext(ha);
1794
+ function ma() {
1795
1795
  let e = !1;
1796
1796
  return {
1797
1797
  clearReset: () => {
@@ -1803,19 +1803,19 @@ function ra() {
1803
1803
  isReset: () => e
1804
1804
  };
1805
1805
  }
1806
- var sa = H.createContext(ra()), aa = () => H.useContext(sa), na = (e, t) => {
1806
+ var pa = H.createContext(ma()), ya = () => H.useContext(pa), ga = (e, t) => {
1807
1807
  (e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
1808
- }, ia = (e) => {
1808
+ }, ba = (e) => {
1809
1809
  H.useEffect(() => {
1810
1810
  e.clearReset();
1811
1811
  }, [e]);
1812
- }, oa = ({
1812
+ }, Ea = ({
1813
1813
  result: e,
1814
1814
  errorResetBoundary: 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 || Nr(r, [e.error, s])), wa = (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,20 +1823,20 @@ 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
+ }, Sa = (e, t) => e.isLoading && e.isFetching && !t, va = (e, t) => e?.suspense && t.isPending, or = (e, t, r) => t.fetchOptimistic(e).catch(() => {
1827
1827
  r.clearReset();
1828
1828
  });
1829
- function da(e, t, r) {
1829
+ function Ta(e, t, r) {
1830
1830
  if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
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 = fa(), a = ya(), n = it(), i = n.defaultQueryOptions(e);
1835
1835
  n.getDefaultOptions().queries?._experimental_beforeQuery?.(
1836
1836
  i
1837
1837
  ), process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
1838
1838
  `[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
1839
- )), i._optimisticResults = s ? "isRestoring" : "optimistic", ca(i), na(i, a), ia(a);
1839
+ )), i._optimisticResults = s ? "isRestoring" : "optimistic", wa(i), ga(i, a), ba(a);
1840
1840
  const o = !n.getQueryCache().get(i.queryHash), [c] = H.useState(
1841
1841
  () => new t(
1842
1842
  n,
@@ -1855,9 +1855,9 @@ function da(e, t, r) {
1855
1855
  () => c.getCurrentResult()
1856
1856
  ), H.useEffect(() => {
1857
1857
  c.setOptions(i);
1858
- }, [i, c]), ua(i, f))
1859
- throw ar(i, c, a);
1860
- if (oa({
1858
+ }, [i, c]), va(i, f))
1859
+ throw or(i, c, a);
1860
+ if (Ea({
1861
1861
  result: f,
1862
1862
  errorResetBoundary: a,
1863
1863
  throwOnError: i.throwOnError,
@@ -1868,9 +1868,9 @@ function da(e, t, r) {
1868
1868
  return n.getDefaultOptions().queries?._experimental_afterQuery?.(
1869
1869
  i,
1870
1870
  f
1871
- ), i.experimental_prefetchInRender && !me && la(f, s) && (o ? (
1871
+ ), i.experimental_prefetchInRender && !me && Sa(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
+ or(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
@@ -1879,11 +1879,11 @@ function da(e, t, r) {
1879
1879
  }), i.notifyOnChangeProps ? f : c.trackResult(f);
1880
1880
  }
1881
1881
  function ye(e, t) {
1882
- return da(e, Ws);
1882
+ return Ta(e, ra);
1883
1883
  }
1884
- function Dr(e, t) {
1885
- const r = nt(), [s] = H.useState(
1886
- () => new Ys(
1884
+ function Ur(e, t) {
1885
+ const r = it(), [s] = H.useState(
1886
+ () => new ca(
1887
1887
  r,
1888
1888
  e
1889
1889
  )
@@ -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 && Nr(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
+ }, Fr = {
1929
1929
  CLIENT_ID: "X-Auth-ClientId"
1930
1930
  }, F = {
1931
1931
  ALG: "RS256",
@@ -1935,7 +1935,7 @@ const Pe = {
1935
1935
  NONCE_KEY: "_nonce",
1936
1936
  AUTH_TYPE_KEY: "auth_type",
1937
1937
  ISSUER: "gizmette.com"
1938
- }, ha = `-----BEGIN PUBLIC KEY-----
1938
+ }, Aa = `-----BEGIN PUBLIC KEY-----
1939
1939
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
1940
1940
  w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
1941
1941
  i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
@@ -1943,20 +1943,20 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
1943
1943
  l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
1944
1944
  sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
1945
1945
  awIDAQAB
1946
- -----END PUBLIC KEY-----`, it = {
1946
+ -----END PUBLIC KEY-----`, ot = {
1947
1947
  CODE: "code",
1948
1948
  LOGOUT: "logout",
1949
1949
  LOGIN: "login",
1950
1950
  REFRESH: "refresh"
1951
- }, Fe = new TextEncoder(), Ce = new TextDecoder();
1952
- function fa(...e) {
1951
+ }, He = new TextEncoder(), Ce = new TextDecoder();
1952
+ function Ia(...e) {
1953
1953
  const t = e.reduce((a, { length: n }) => a + n, 0), r = new Uint8Array(t);
1954
1954
  let s = 0;
1955
1955
  for (const a of e)
1956
1956
  r.set(a, s), s += a.length;
1957
1957
  return r;
1958
1958
  }
1959
- function Lr(e) {
1959
+ function Hr(e) {
1960
1960
  if (Uint8Array.fromBase64)
1961
1961
  return Uint8Array.fromBase64(e);
1962
1962
  const t = atob(e), r = new Uint8Array(t.length);
@@ -1972,7 +1972,7 @@ function $e(e) {
1972
1972
  let t = e;
1973
1973
  t instanceof Uint8Array && (t = Ce.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
1974
1974
  try {
1975
- return Lr(t);
1975
+ return Hr(t);
1976
1976
  } catch {
1977
1977
  throw new TypeError("The input to be decoded is not correctly encoded.");
1978
1978
  }
@@ -1983,7 +1983,7 @@ let ge = class extends Error {
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 ge {
1987
1987
  static code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
1988
1988
  code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
1989
1989
  claim;
@@ -1992,7 +1992,7 @@ let 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
+ }, cr = class extends ge {
1996
1996
  static code = "ERR_JWT_EXPIRED";
1997
1997
  code = "ERR_JWT_EXPIRED";
1998
1998
  claim;
@@ -2001,7 +2001,7 @@ 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
+ }, _a = class extends ge {
2005
2005
  static code = "ERR_JOSE_ALG_NOT_ALLOWED";
2006
2006
  code = "ERR_JOSE_ALG_NOT_ALLOWED";
2007
2007
  }, ae = class extends ge {
@@ -2014,23 +2014,23 @@ let ge = class extends Error {
2014
2014
  static code = "ERR_JWT_INVALID";
2015
2015
  code = "ERR_JWT_INVALID";
2016
2016
  };
2017
- class pa extends ge {
2017
+ class Ra extends ge {
2018
2018
  static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2019
2019
  code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2020
2020
  constructor(t = "signature verification failed", r) {
2021
2021
  super(t, r);
2022
2022
  }
2023
2023
  }
2024
- function X(e, t = "algorithm.name") {
2024
+ function Z(e, t = "algorithm.name") {
2025
2025
  return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
2026
2026
  }
2027
2027
  function Se(e, t) {
2028
2028
  return e.name === t;
2029
2029
  }
2030
- function ut(e) {
2030
+ function ft(e) {
2031
2031
  return parseInt(e.name.slice(4), 10);
2032
2032
  }
2033
- function ya(e) {
2033
+ function Ca(e) {
2034
2034
  switch (e) {
2035
2035
  case "ES256":
2036
2036
  return "P-256";
@@ -2042,88 +2042,88 @@ function ya(e) {
2042
2042
  throw new Error("unreachable");
2043
2043
  }
2044
2044
  }
2045
- function ga(e, t) {
2045
+ function Oa(e, t) {
2046
2046
  if (!e.usages.includes(t))
2047
2047
  throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`);
2048
2048
  }
2049
- function ba(e, t, r) {
2049
+ function ka(e, t, r) {
2050
2050
  switch (t) {
2051
2051
  case "HS256":
2052
2052
  case "HS384":
2053
2053
  case "HS512": {
2054
2054
  if (!Se(e.algorithm, "HMAC"))
2055
- throw X("HMAC");
2055
+ throw Z("HMAC");
2056
2056
  const s = parseInt(t.slice(2), 10);
2057
- if (ut(e.algorithm.hash) !== s)
2058
- throw X(`SHA-${s}`, "algorithm.hash");
2057
+ if (ft(e.algorithm.hash) !== s)
2058
+ throw Z(`SHA-${s}`, "algorithm.hash");
2059
2059
  break;
2060
2060
  }
2061
2061
  case "RS256":
2062
2062
  case "RS384":
2063
2063
  case "RS512": {
2064
2064
  if (!Se(e.algorithm, "RSASSA-PKCS1-v1_5"))
2065
- throw X("RSASSA-PKCS1-v1_5");
2065
+ throw Z("RSASSA-PKCS1-v1_5");
2066
2066
  const s = parseInt(t.slice(2), 10);
2067
- if (ut(e.algorithm.hash) !== s)
2068
- throw X(`SHA-${s}`, "algorithm.hash");
2067
+ if (ft(e.algorithm.hash) !== s)
2068
+ throw Z(`SHA-${s}`, "algorithm.hash");
2069
2069
  break;
2070
2070
  }
2071
2071
  case "PS256":
2072
2072
  case "PS384":
2073
2073
  case "PS512": {
2074
2074
  if (!Se(e.algorithm, "RSA-PSS"))
2075
- throw X("RSA-PSS");
2075
+ throw Z("RSA-PSS");
2076
2076
  const s = parseInt(t.slice(2), 10);
2077
- if (ut(e.algorithm.hash) !== s)
2078
- throw X(`SHA-${s}`, "algorithm.hash");
2077
+ if (ft(e.algorithm.hash) !== s)
2078
+ throw Z(`SHA-${s}`, "algorithm.hash");
2079
2079
  break;
2080
2080
  }
2081
2081
  case "Ed25519":
2082
2082
  case "EdDSA": {
2083
2083
  if (!Se(e.algorithm, "Ed25519"))
2084
- throw X("Ed25519");
2084
+ throw Z("Ed25519");
2085
2085
  break;
2086
2086
  }
2087
2087
  case "ML-DSA-44":
2088
2088
  case "ML-DSA-65":
2089
2089
  case "ML-DSA-87": {
2090
2090
  if (!Se(e.algorithm, t))
2091
- throw X(t);
2091
+ throw Z(t);
2092
2092
  break;
2093
2093
  }
2094
2094
  case "ES256":
2095
2095
  case "ES384":
2096
2096
  case "ES512": {
2097
2097
  if (!Se(e.algorithm, "ECDSA"))
2098
- throw X("ECDSA");
2099
- const s = ya(t);
2098
+ throw Z("ECDSA");
2099
+ const s = Ca(t);
2100
2100
  if (e.algorithm.namedCurve !== s)
2101
- throw X(s, "algorithm.namedCurve");
2101
+ throw Z(s, "algorithm.namedCurve");
2102
2102
  break;
2103
2103
  }
2104
2104
  default:
2105
2105
  throw new TypeError("CryptoKey does not support this operation");
2106
2106
  }
2107
- ga(e, r);
2107
+ Oa(e, r);
2108
2108
  }
2109
- function Ur(e, t, ...r) {
2109
+ function Kr(e, t, ...r) {
2110
2110
  if (r = r.filter(Boolean), r.length > 2) {
2111
2111
  const s = r.pop();
2112
2112
  e += `one of type ${r.join(", ")}, or ${s}.`;
2113
2113
  } else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
2114
2114
  return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && t.constructor?.name && (e += ` Received an instance of ${t.constructor.name}`), e;
2115
2115
  }
2116
- const Ea = (e, ...t) => Ur("Key must be ", e, ...t);
2117
- function Fr(e, t, ...r) {
2118
- return Ur(`Key for the ${e} algorithm must be `, t, ...r);
2116
+ const Na = (e, ...t) => Kr("Key must be ", e, ...t);
2117
+ function Gr(e, t, ...r) {
2118
+ return Kr(`Key for the ${e} algorithm must be `, t, ...r);
2119
2119
  }
2120
- function Hr(e) {
2120
+ function Br(e) {
2121
2121
  return e?.[Symbol.toStringTag] === "CryptoKey";
2122
2122
  }
2123
- function Kr(e) {
2123
+ function Wr(e) {
2124
2124
  return e?.[Symbol.toStringTag] === "KeyObject";
2125
2125
  }
2126
- const Gr = (e) => Hr(e) || Kr(e), wa = (...e) => {
2126
+ const qr = (e) => Br(e) || Wr(e), Pa = (...e) => {
2127
2127
  const t = e.filter(Boolean);
2128
2128
  if (t.length === 0 || t.length === 1)
2129
2129
  return !0;
@@ -2142,11 +2142,11 @@ const Gr = (e) => Hr(e) || Kr(e), wa = (...e) => {
2142
2142
  }
2143
2143
  return !0;
2144
2144
  };
2145
- function Sa(e) {
2145
+ function $a(e) {
2146
2146
  return typeof e == "object" && e !== null;
2147
2147
  }
2148
2148
  const De = (e) => {
2149
- if (!Sa(e) || Object.prototype.toString.call(e) !== "[object Object]")
2149
+ if (!$a(e) || Object.prototype.toString.call(e) !== "[object Object]")
2150
2150
  return !1;
2151
2151
  if (Object.getPrototypeOf(e) === null)
2152
2152
  return !0;
@@ -2154,20 +2154,20 @@ const De = (e) => {
2154
2154
  for (; Object.getPrototypeOf(t) !== null; )
2155
2155
  t = Object.getPrototypeOf(t);
2156
2156
  return Object.getPrototypeOf(e) === t;
2157
- }, va = (e, t) => {
2157
+ }, xa = (e, t) => {
2158
2158
  if (e.startsWith("RS") || e.startsWith("PS")) {
2159
2159
  const { modulusLength: r } = t.algorithm;
2160
2160
  if (typeof r != "number" || r < 2048)
2161
2161
  throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
2162
2162
  }
2163
- }, dt = (e, t) => {
2163
+ }, mt = (e, t) => {
2164
2164
  if (e.byteLength !== t.length)
2165
2165
  return !1;
2166
2166
  for (let r = 0; r < e.byteLength; r++)
2167
2167
  if (e[r] !== t[r])
2168
2168
  return !1;
2169
2169
  return !0;
2170
- }, Ta = (e) => ({ data: e, pos: 0 }), Ze = (e) => {
2170
+ }, Da = (e) => ({ data: e, pos: 0 }), et = (e) => {
2171
2171
  const t = e.data[e.pos++];
2172
2172
  if (t & 128) {
2173
2173
  const r = t & 127;
@@ -2177,39 +2177,39 @@ const De = (e) => {
2177
2177
  return s;
2178
2178
  }
2179
2179
  return t;
2180
- }, et = (e, t, r) => {
2180
+ }, tt = (e, t, r) => {
2181
2181
  if (e.data[e.pos++] !== t)
2182
2182
  throw new Error(r);
2183
- }, Br = (e, t) => {
2183
+ }, jr = (e, t) => {
2184
2184
  const r = e.data.subarray(e.pos, e.pos + t);
2185
2185
  return e.pos += t, r;
2186
- }, Aa = (e) => {
2187
- et(e, 6, "Expected algorithm OID");
2188
- const t = Ze(e);
2189
- return Br(e, t);
2186
+ }, Ma = (e) => {
2187
+ tt(e, 6, "Expected algorithm OID");
2188
+ const t = et(e);
2189
+ return jr(e, t);
2190
2190
  };
2191
- function Ia(e) {
2192
- et(e, 48, "Invalid SPKI structure"), Ze(e), et(e, 48, "Expected algorithm identifier");
2193
- const t = Ze(e);
2191
+ function La(e) {
2192
+ tt(e, 48, "Invalid SPKI structure"), et(e), tt(e, 48, "Expected algorithm identifier");
2193
+ const t = et(e);
2194
2194
  return { algIdStart: e.pos, algIdLength: t };
2195
2195
  }
2196
- const _a = (e) => {
2197
- const t = Aa(e);
2198
- if (dt(t, [43, 101, 110]))
2196
+ const Ua = (e) => {
2197
+ const t = Ma(e);
2198
+ if (mt(t, [43, 101, 110]))
2199
2199
  return "X25519";
2200
- if (!dt(t, [42, 134, 72, 206, 61, 2, 1]))
2200
+ if (!mt(t, [42, 134, 72, 206, 61, 2, 1]))
2201
2201
  throw new Error("Unsupported key algorithm");
2202
- et(e, 6, "Expected curve OID");
2203
- const r = Ze(e), s = Br(e, r);
2202
+ tt(e, 6, "Expected curve OID");
2203
+ const r = et(e), s = jr(e, r);
2204
2204
  for (const { name: a, oid: n } of [
2205
2205
  { name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
2206
2206
  { name: "P-384", oid: [43, 129, 4, 0, 34] },
2207
2207
  { name: "P-521", oid: [43, 129, 4, 0, 35] }
2208
2208
  ])
2209
- if (dt(s, n))
2209
+ if (mt(s, n))
2210
2210
  return a;
2211
2211
  throw new Error("Unsupported named curve");
2212
- }, Ra = async (e, t, r, s) => {
2212
+ }, Fa = async (e, t, r, s) => {
2213
2213
  let a, n;
2214
2214
  const i = () => ["verify"], o = () => ["encrypt", "wrapKey"];
2215
2215
  switch (r) {
@@ -2264,15 +2264,15 @@ const _a = (e) => {
2264
2264
  throw new ae('Invalid or unsupported "alg" (Algorithm) value');
2265
2265
  }
2266
2266
  return crypto.subtle.importKey(e, t, a, s?.extractable ?? !0, n);
2267
- }, Ca = (e, t) => Lr(e.replace(t, "")), Oa = (e, t, r) => {
2268
- const s = Ca(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
2267
+ }, Ha = (e, t) => Hr(e.replace(t, "")), Ka = (e, t, r) => {
2268
+ const s = Ha(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
2269
2269
  let a = r;
2270
2270
  return t?.startsWith?.("ECDH-ES") && (a ||= {}, a.getNamedCurve = (n) => {
2271
- const i = Ta(n);
2272
- return Ia(i), _a(i);
2273
- }), Ra("spki", s, t, a);
2271
+ const i = Da(n);
2272
+ return La(i), Ua(i);
2273
+ }), Fa("spki", s, t, a);
2274
2274
  };
2275
- function ka(e) {
2275
+ function Ga(e) {
2276
2276
  let t, r;
2277
2277
  switch (e.kty) {
2278
2278
  case "AKP": {
@@ -2357,18 +2357,18 @@ function ka(e) {
2357
2357
  }
2358
2358
  return { algorithm: t, keyUsages: r };
2359
2359
  }
2360
- const Na = async (e) => {
2360
+ const Ba = async (e) => {
2361
2361
  if (!e.alg)
2362
2362
  throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
2363
- const { algorithm: t, keyUsages: r } = ka(e), s = { ...e };
2363
+ const { algorithm: t, keyUsages: r } = Ga(e), s = { ...e };
2364
2364
  return s.kty !== "AKP" && delete s.alg, delete s.use, crypto.subtle.importKey("jwk", s, t, e.ext ?? !(e.d || e.priv), e.key_ops ?? r);
2365
2365
  };
2366
- async function Pa(e, t, r) {
2366
+ async function Wa(e, t, r) {
2367
2367
  if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
2368
2368
  throw new TypeError('"spki" must be SPKI formatted string');
2369
- return Oa(e, t, r);
2369
+ return Ka(e, t, r);
2370
2370
  }
2371
- const $a = (e, t, r, s, a) => {
2371
+ const qa = (e, t, r, s, a) => {
2372
2372
  if (a.crit !== void 0 && s?.crit === void 0)
2373
2373
  throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
2374
2374
  if (!s || s.crit === void 0)
@@ -2386,33 +2386,33 @@ const $a = (e, t, r, s, a) => {
2386
2386
  throw new e(`Extension Header Parameter "${i}" MUST be integrity protected`);
2387
2387
  }
2388
2388
  return new Set(s.crit);
2389
- }, xa = (e, t) => {
2389
+ }, ja = (e, t) => {
2390
2390
  if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
2391
2391
  throw new TypeError(`"${e}" option must be an array of strings`);
2392
2392
  if (t)
2393
2393
  return new Set(t);
2394
2394
  };
2395
- function Ut(e) {
2395
+ function Kt(e) {
2396
2396
  return De(e) && typeof e.kty == "string";
2397
2397
  }
2398
- function Da(e) {
2398
+ function Va(e) {
2399
2399
  return e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string");
2400
2400
  }
2401
- function Ma(e) {
2401
+ function Qa(e) {
2402
2402
  return e.kty !== "oct" && typeof e.d > "u" && typeof e.priv > "u";
2403
2403
  }
2404
- function La(e) {
2404
+ function Ja(e) {
2405
2405
  return e.kty === "oct" && typeof e.k == "string";
2406
2406
  }
2407
2407
  let Re;
2408
- const ir = async (e, t, r, s = !1) => {
2408
+ const lr = async (e, t, r, s = !1) => {
2409
2409
  Re ||= /* @__PURE__ */ new WeakMap();
2410
2410
  let a = Re.get(e);
2411
2411
  if (a?.[r])
2412
2412
  return a[r];
2413
- const n = await Na({ ...t, alg: r });
2413
+ const n = await Ba({ ...t, alg: r });
2414
2414
  return s && Object.freeze(e), a ? a[r] = n : Re.set(e, { [r]: n }), n;
2415
- }, Ua = (e, t) => {
2415
+ }, Ya = (e, t) => {
2416
2416
  Re ||= /* @__PURE__ */ new WeakMap();
2417
2417
  let r = Re.get(e);
2418
2418
  if (r?.[t])
@@ -2508,26 +2508,26 @@ const ir = async (e, t, r, s = !1) => {
2508
2508
  if (!n)
2509
2509
  throw new TypeError("given KeyObject instance cannot be used for this algorithm");
2510
2510
  return r ? r[t] = n : Re.set(e, { [t]: n }), n;
2511
- }, Fa = async (e, t) => {
2512
- if (e instanceof Uint8Array || Hr(e))
2511
+ }, za = async (e, t) => {
2512
+ if (e instanceof Uint8Array || Br(e))
2513
2513
  return e;
2514
- if (Kr(e)) {
2514
+ if (Wr(e)) {
2515
2515
  if (e.type === "secret")
2516
2516
  return e.export();
2517
2517
  if ("toCryptoKey" in e && typeof e.toCryptoKey == "function")
2518
2518
  try {
2519
- return Ua(e, t);
2519
+ return Ya(e, t);
2520
2520
  } catch (s) {
2521
2521
  if (s instanceof TypeError)
2522
2522
  throw s;
2523
2523
  }
2524
2524
  let r = e.export({ format: "jwk" });
2525
- return ir(e, r, t);
2525
+ return lr(e, r, t);
2526
2526
  }
2527
- if (Ut(e))
2528
- return e.k ? $e(e.k) : ir(e, e, t, !0);
2527
+ if (Kt(e))
2528
+ return e.k ? $e(e.k) : lr(e, e, t, !0);
2529
2529
  throw new Error("unreachable");
2530
- }, _e = (e) => e?.[Symbol.toStringTag], kt = (e, t, r) => {
2530
+ }, _e = (e) => e?.[Symbol.toStringTag], $t = (e, t, r) => {
2531
2531
  if (t.use !== void 0) {
2532
2532
  let s;
2533
2533
  switch (r) {
@@ -2570,34 +2570,34 @@ const ir = async (e, t, r, s = !1) => {
2570
2570
  throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${s}" when present`);
2571
2571
  }
2572
2572
  return !0;
2573
- }, Ha = (e, t, r) => {
2573
+ }, Xa = (e, t, r) => {
2574
2574
  if (!(t instanceof Uint8Array)) {
2575
- if (Ut(t)) {
2576
- if (La(t) && kt(e, t, r))
2575
+ if (Kt(t)) {
2576
+ if (Ja(t) && $t(e, t, r))
2577
2577
  return;
2578
2578
  throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
2579
2579
  }
2580
- if (!Gr(t))
2581
- throw new TypeError(Fr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2580
+ if (!qr(t))
2581
+ throw new TypeError(Gr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2582
2582
  if (t.type !== "secret")
2583
2583
  throw new TypeError(`${_e(t)} instances for symmetric algorithms must be of type "secret"`);
2584
2584
  }
2585
- }, Ka = (e, t, r) => {
2586
- if (Ut(t))
2585
+ }, Za = (e, t, r) => {
2586
+ if (Kt(t))
2587
2587
  switch (r) {
2588
2588
  case "decrypt":
2589
2589
  case "sign":
2590
- if (Da(t) && kt(e, t, r))
2590
+ if (Va(t) && $t(e, t, r))
2591
2591
  return;
2592
2592
  throw new TypeError("JSON Web Key for this operation be a private JWK");
2593
2593
  case "encrypt":
2594
2594
  case "verify":
2595
- if (Ma(t) && kt(e, t, r))
2595
+ if (Qa(t) && $t(e, t, r))
2596
2596
  return;
2597
2597
  throw new TypeError("JSON Web Key for this operation be a public JWK");
2598
2598
  }
2599
- if (!Gr(t))
2600
- throw new TypeError(Fr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2599
+ if (!qr(t))
2600
+ throw new TypeError(Gr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2601
2601
  if (t.type === "secret")
2602
2602
  throw new TypeError(`${_e(t)} instances for asymmetric algorithms must not be of type "secret"`);
2603
2603
  if (t.type === "public")
@@ -2614,9 +2614,9 @@ const ir = async (e, t, r, s = !1) => {
2614
2614
  case "encrypt":
2615
2615
  throw new TypeError(`${_e(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2616
2616
  }
2617
- }, Ga = (e, t, r) => {
2618
- e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e) ? Ha(e, t, r) : Ka(e, t, r);
2619
- }, Ba = (e, t) => {
2617
+ }, en = (e, t, r) => {
2618
+ e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e) ? Xa(e, t, r) : Za(e, t, r);
2619
+ }, tn = (e, t) => {
2620
2620
  const r = `SHA-${e.slice(-3)}`;
2621
2621
  switch (e) {
2622
2622
  case "HS256":
@@ -2645,24 +2645,24 @@ const ir = async (e, t, r, s = !1) => {
2645
2645
  default:
2646
2646
  throw new ae(`alg ${e} is not supported either by JOSE or your javascript runtime`);
2647
2647
  }
2648
- }, Wa = async (e, t, r) => {
2648
+ }, rn = async (e, t, r) => {
2649
2649
  if (t instanceof Uint8Array) {
2650
2650
  if (!e.startsWith("HS"))
2651
- throw new TypeError(Ea(t, "CryptoKey", "KeyObject", "JSON Web Key"));
2651
+ throw new TypeError(Na(t, "CryptoKey", "KeyObject", "JSON Web Key"));
2652
2652
  return crypto.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
2653
2653
  }
2654
- return ba(t, e, r), t;
2655
- }, qa = async (e, t, r, s) => {
2656
- const a = await Wa(e, t, "verify");
2657
- va(e, a);
2658
- const n = Ba(e, a.algorithm);
2654
+ return ka(t, e, r), t;
2655
+ }, sn = async (e, t, r, s) => {
2656
+ const a = await rn(e, t, "verify");
2657
+ xa(e, a);
2658
+ const n = tn(e, a.algorithm);
2659
2659
  try {
2660
2660
  return await crypto.subtle.verify(n, a, r, s);
2661
2661
  } catch {
2662
2662
  return !1;
2663
2663
  }
2664
2664
  };
2665
- async function ja(e, t, r) {
2665
+ async function an(e, t, r) {
2666
2666
  if (!De(e))
2667
2667
  throw new L("Flattened JWS must be an object");
2668
2668
  if (e.protected === void 0 && e.header === void 0)
@@ -2683,38 +2683,38 @@ async function ja(e, t, r) {
2683
2683
  } catch {
2684
2684
  throw new L("JWS Protected Header is invalid");
2685
2685
  }
2686
- if (!wa(s, e.header))
2686
+ if (!Pa(s, e.header))
2687
2687
  throw new L("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
2688
2688
  const a = {
2689
2689
  ...s,
2690
2690
  ...e.header
2691
- }, n = $a(L, /* @__PURE__ */ new Map([["b64", !0]]), r?.crit, s, a);
2691
+ }, n = qa(L, /* @__PURE__ */ new Map([["b64", !0]]), r?.crit, s, a);
2692
2692
  let i = !0;
2693
2693
  if (n.has("b64") && (i = s.b64, typeof i != "boolean"))
2694
2694
  throw new L('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
2695
2695
  const { alg: o } = a;
2696
2696
  if (typeof o != "string" || !o)
2697
2697
  throw new L('JWS "alg" (Algorithm) Header Parameter missing or invalid');
2698
- const c = r && xa("algorithms", r.algorithms);
2698
+ const c = r && ja("algorithms", r.algorithms);
2699
2699
  if (c && !c.has(o))
2700
- throw new ma('"alg" (Algorithm) Header Parameter value not allowed');
2700
+ throw new _a('"alg" (Algorithm) Header Parameter value not allowed');
2701
2701
  if (i) {
2702
2702
  if (typeof e.payload != "string")
2703
2703
  throw new L("JWS Payload must be a string");
2704
2704
  } else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
2705
2705
  throw new L("JWS Payload must be a string or an Uint8Array instance");
2706
2706
  let f = !1;
2707
- typeof t == "function" && (t = await t(s, e), f = !0), Ga(o, t, "verify");
2708
- const d = fa(Fe.encode(e.protected ?? ""), Fe.encode("."), typeof e.payload == "string" ? Fe.encode(e.payload) : e.payload);
2707
+ typeof t == "function" && (t = await t(s, e), f = !0), en(o, t, "verify");
2708
+ const d = Ia(He.encode(e.protected ?? ""), He.encode("."), typeof e.payload == "string" ? He.encode(e.payload) : e.payload);
2709
2709
  let u;
2710
2710
  try {
2711
2711
  u = $e(e.signature);
2712
2712
  } catch {
2713
2713
  throw new L("Failed to base64url decode the signature");
2714
2714
  }
2715
- const l = await Fa(t, o);
2716
- if (!await qa(o, l, u, d))
2717
- throw new pa();
2715
+ const l = await za(t, o);
2716
+ if (!await sn(o, l, u, d))
2717
+ throw new Ra();
2718
2718
  let m;
2719
2719
  if (i)
2720
2720
  try {
@@ -2722,21 +2722,21 @@ async function ja(e, t, r) {
2722
2722
  } catch {
2723
2723
  throw new L("Failed to base64url decode the payload");
2724
2724
  }
2725
- else typeof e.payload == "string" ? m = Fe.encode(e.payload) : m = e.payload;
2725
+ else typeof e.payload == "string" ? m = He.encode(e.payload) : m = e.payload;
2726
2726
  const p = { payload: m };
2727
2727
  return e.protected !== void 0 && (p.protectedHeader = s), e.header !== void 0 && (p.unprotectedHeader = e.header), f ? { ...p, key: l } : p;
2728
2728
  }
2729
- async function Va(e, t, r) {
2729
+ async function nn(e, t, r) {
2730
2730
  if (e instanceof Uint8Array && (e = Ce.decode(e)), typeof e != "string")
2731
2731
  throw new L("Compact JWS must be a string or Uint8Array");
2732
2732
  const { 0: s, 1: a, 2: n, length: i } = e.split(".");
2733
2733
  if (i !== 3)
2734
2734
  throw new L("Invalid Compact JWS");
2735
- const o = await ja({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
2735
+ const o = await an({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
2736
2736
  return typeof t == "function" ? { ...c, key: o.key } : c;
2737
2737
  }
2738
- const Qa = (e) => Math.floor(e.getTime() / 1e3), Wr = 60, qr = Wr * 60, Ft = qr * 24, Ja = 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) => {
2739
- const t = za.exec(e);
2738
+ const on = (e) => Math.floor(e.getTime() / 1e3), Vr = 60, Qr = Vr * 60, Gt = Qr * 24, cn = Gt * 7, ln = Gt * 365.25, un = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, ur = (e) => {
2739
+ const t = un.exec(e);
2740
2740
  if (!t || t[4] && t[1])
2741
2741
  throw new TypeError("Invalid time period format");
2742
2742
  const r = parseFloat(t[2]), s = t[3].toLowerCase();
@@ -2754,32 +2754,32 @@ const Qa = (e) => Math.floor(e.getTime() / 1e3), Wr = 60, qr = Wr * 60, Ft = qr
2754
2754
  case "min":
2755
2755
  case "mins":
2756
2756
  case "m":
2757
- a = Math.round(r * Wr);
2757
+ a = Math.round(r * Vr);
2758
2758
  break;
2759
2759
  case "hour":
2760
2760
  case "hours":
2761
2761
  case "hr":
2762
2762
  case "hrs":
2763
2763
  case "h":
2764
- a = Math.round(r * qr);
2764
+ a = Math.round(r * Qr);
2765
2765
  break;
2766
2766
  case "day":
2767
2767
  case "days":
2768
2768
  case "d":
2769
- a = Math.round(r * Ft);
2769
+ a = Math.round(r * Gt);
2770
2770
  break;
2771
2771
  case "week":
2772
2772
  case "weeks":
2773
2773
  case "w":
2774
- a = Math.round(r * Ja);
2774
+ a = Math.round(r * cn);
2775
2775
  break;
2776
2776
  default:
2777
- a = Math.round(r * Ya);
2777
+ a = Math.round(r * ln);
2778
2778
  break;
2779
2779
  }
2780
2780
  return t[1] === "-" || t[4] === "ago" ? -a : a;
2781
- }, cr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, Xa = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
2782
- function Za(e, t, r = {}) {
2781
+ }, dr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, dn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
2782
+ function hn(e, t, r = {}) {
2783
2783
  let s;
2784
2784
  try {
2785
2785
  s = JSON.parse(Ce.decode(t));
@@ -2788,23 +2788,23 @@ function Za(e, t, r = {}) {
2788
2788
  if (!De(s))
2789
2789
  throw new re("JWT Claims Set must be a top-level JSON object");
2790
2790
  const { typ: a } = r;
2791
- if (a && (typeof e.typ != "string" || cr(e.typ) !== cr(a)))
2792
- throw new z('unexpected "typ" JWT header value', s, "typ", "check_failed");
2791
+ if (a && (typeof e.typ != "string" || dr(e.typ) !== dr(a)))
2792
+ throw new X('unexpected "typ" JWT header value', s, "typ", "check_failed");
2793
2793
  const { requiredClaims: n = [], issuer: i, subject: o, audience: c, maxTokenAge: f } = r, d = [...n];
2794
2794
  f !== void 0 && d.push("iat"), c !== void 0 && d.push("aud"), o !== void 0 && d.push("sub"), i !== void 0 && d.push("iss");
2795
2795
  for (const p of new Set(d.reverse()))
2796
2796
  if (!(p in s))
2797
- throw new z(`missing required "${p}" claim`, s, p, "missing");
2797
+ throw new X(`missing required "${p}" claim`, s, p, "missing");
2798
2798
  if (i && !(Array.isArray(i) ? i : [i]).includes(s.iss))
2799
- throw new z('unexpected "iss" claim value', s, "iss", "check_failed");
2799
+ throw new X('unexpected "iss" claim value', s, "iss", "check_failed");
2800
2800
  if (o && s.sub !== o)
2801
- throw new z('unexpected "sub" claim value', s, "sub", "check_failed");
2802
- if (c && !Xa(s.aud, typeof c == "string" ? [c] : c))
2803
- throw new z('unexpected "aud" claim value', s, "aud", "check_failed");
2801
+ throw new X('unexpected "sub" claim value', s, "sub", "check_failed");
2802
+ if (c && !dn(s.aud, typeof c == "string" ? [c] : c))
2803
+ throw new X('unexpected "aud" claim value', s, "aud", "check_failed");
2804
2804
  let u;
2805
2805
  switch (typeof r.clockTolerance) {
2806
2806
  case "string":
2807
- u = or(r.clockTolerance);
2807
+ u = ur(r.clockTolerance);
2808
2808
  break;
2809
2809
  case "number":
2810
2810
  u = r.clockTolerance;
@@ -2815,38 +2815,38 @@ function Za(e, t, r = {}) {
2815
2815
  default:
2816
2816
  throw new TypeError("Invalid clockTolerance option type");
2817
2817
  }
2818
- const { currentDate: l } = r, m = Qa(l || /* @__PURE__ */ new Date());
2818
+ const { currentDate: l } = r, m = on(l || /* @__PURE__ */ new Date());
2819
2819
  if ((s.iat !== void 0 || f) && typeof s.iat != "number")
2820
- throw new z('"iat" claim must be a number', s, "iat", "invalid");
2820
+ throw new X('"iat" claim must be a number', s, "iat", "invalid");
2821
2821
  if (s.nbf !== void 0) {
2822
2822
  if (typeof s.nbf != "number")
2823
- throw new z('"nbf" claim must be a number', s, "nbf", "invalid");
2823
+ throw new X('"nbf" claim must be a number', s, "nbf", "invalid");
2824
2824
  if (s.nbf > m + u)
2825
- throw new z('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
2825
+ throw new X('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
2826
2826
  }
2827
2827
  if (s.exp !== void 0) {
2828
2828
  if (typeof s.exp != "number")
2829
- throw new z('"exp" claim must be a number', s, "exp", "invalid");
2829
+ throw new X('"exp" claim must be a number', s, "exp", "invalid");
2830
2830
  if (s.exp <= m - u)
2831
- throw new nr('"exp" claim timestamp check failed', s, "exp", "check_failed");
2831
+ throw new cr('"exp" claim timestamp check failed', s, "exp", "check_failed");
2832
2832
  }
2833
2833
  if (f) {
2834
- const p = m - s.iat, g = typeof f == "number" ? f : or(f);
2834
+ const p = m - s.iat, g = typeof f == "number" ? f : ur(f);
2835
2835
  if (p - u > g)
2836
- throw new nr('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
2836
+ throw new cr('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
2837
2837
  if (p < 0 - u)
2838
- throw new z('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
2838
+ throw new X('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
2839
2839
  }
2840
2840
  return s;
2841
2841
  }
2842
- async function en(e, t, r) {
2843
- const s = await Va(e, t, r);
2842
+ async function fn(e, t, r) {
2843
+ const s = await nn(e, t, r);
2844
2844
  if (s.protectedHeader.crit?.includes("b64") && s.protectedHeader.b64 === !1)
2845
2845
  throw new re("JWTs MUST NOT use unencoded payload");
2846
- const a = { payload: Za(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
2846
+ const a = { payload: hn(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
2847
2847
  return typeof t == "function" ? { ...a, key: s.key } : a;
2848
2848
  }
2849
- function tn(e) {
2849
+ function mn(e) {
2850
2850
  if (typeof e != "string")
2851
2851
  throw new re("JWTs must use Compact JWS serialization, JWT must be a string");
2852
2852
  const { 1: t, length: r } = e.split(".");
@@ -2874,65 +2874,65 @@ function tn(e) {
2874
2874
  }
2875
2875
  const Me = async (e) => {
2876
2876
  try {
2877
- const t = F.ALG, r = await Pa(ha, t);
2878
- return await en(e, r, {
2877
+ const t = F.ALG, r = await Wa(Aa, t);
2878
+ return await fn(e, r, {
2879
2879
  issuer: F.ISSUER
2880
2880
  });
2881
2881
  } catch {
2882
2882
  return;
2883
2883
  }
2884
- }, rn = (e) => {
2884
+ }, pn = (e) => {
2885
2885
  try {
2886
- return tn(e);
2886
+ return mn(e);
2887
2887
  } catch {
2888
2888
  return;
2889
2889
  }
2890
2890
  }, D = [];
2891
2891
  for (let e = 0; e < 256; ++e)
2892
2892
  D.push((e + 256).toString(16).slice(1));
2893
- function sn(e, t = 0) {
2893
+ function yn(e, t = 0) {
2894
2894
  return (D[e[t + 0]] + D[e[t + 1]] + D[e[t + 2]] + D[e[t + 3]] + "-" + D[e[t + 4]] + D[e[t + 5]] + "-" + D[e[t + 6]] + D[e[t + 7]] + "-" + D[e[t + 8]] + D[e[t + 9]] + "-" + D[e[t + 10]] + D[e[t + 11]] + D[e[t + 12]] + D[e[t + 13]] + D[e[t + 14]] + D[e[t + 15]]).toLowerCase();
2895
2895
  }
2896
- let ht;
2897
- const an = new Uint8Array(16);
2898
- function nn() {
2899
- if (!ht) {
2896
+ let pt;
2897
+ const gn = new Uint8Array(16);
2898
+ function bn() {
2899
+ if (!pt) {
2900
2900
  if (typeof crypto > "u" || !crypto.getRandomValues)
2901
2901
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2902
- ht = crypto.getRandomValues.bind(crypto);
2902
+ pt = crypto.getRandomValues.bind(crypto);
2903
2903
  }
2904
- return ht(an);
2904
+ return pt(gn);
2905
2905
  }
2906
- const on = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), lr = { randomUUID: on };
2907
- function ur(e, t, r) {
2908
- if (lr.randomUUID && !e)
2909
- return lr.randomUUID();
2906
+ const En = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), hr = { randomUUID: En };
2907
+ function fr(e, t, r) {
2908
+ if (hr.randomUUID && !e)
2909
+ return hr.randomUUID();
2910
2910
  e = e || {};
2911
- const s = e.random ?? e.rng?.() ?? nn();
2911
+ const s = e.random ?? e.rng?.() ?? bn();
2912
2912
  if (s.length < 16)
2913
2913
  throw new Error("Random bytes length must be >= 16");
2914
- return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, sn(s);
2914
+ return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, yn(s);
2915
2915
  }
2916
- const dr = globalThis.crypto, cn = (e) => `${ur()}${ur()}`.slice(0, e), ln = (e) => btoa(
2916
+ const mr = globalThis.crypto, wn = (e) => `${fr()}${fr()}`.slice(0, e), Sn = (e) => btoa(
2917
2917
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
2918
2918
  );
2919
- async function un(e) {
2920
- if (!dr.subtle)
2919
+ async function vn(e) {
2920
+ if (!mr.subtle)
2921
2921
  throw new Error(
2922
2922
  "crypto.subtle is available only in secure contexts (HTTPS)."
2923
2923
  );
2924
- const t = new TextEncoder().encode(e), r = await dr.subtle.digest("SHA-256", t);
2925
- return ln(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2924
+ const t = new TextEncoder().encode(e), r = await mr.subtle.digest("SHA-256", t);
2925
+ return Sn(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2926
2926
  }
2927
- async function dn(e) {
2928
- const r = cn(43), s = await un(r);
2927
+ async function Tn(e) {
2928
+ const r = wn(43), s = await vn(r);
2929
2929
  return {
2930
2930
  code_verifier: r,
2931
2931
  code_challenge: s
2932
2932
  };
2933
2933
  }
2934
- const jr = xt(null);
2935
- var hn = Object.defineProperty, fn = (e, t, r) => t in e ? hn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ft = (e, t, r) => fn(e, typeof t != "symbol" ? t + "" : t, r);
2934
+ const Jr = Lt(null);
2935
+ var An = Object.defineProperty, In = (e, t, r) => t in e ? An(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, yt = (e, t, r) => In(e, typeof t != "symbol" ? t + "" : t, r);
2936
2936
  /*!
2937
2937
  @versini/auth-provider v8.0.5
2938
2938
  © 2025 gizmette.com
@@ -2946,30 +2946,30 @@ try {
2946
2946
  });
2947
2947
  } catch {
2948
2948
  }
2949
- function Z(e) {
2949
+ function ee(e) {
2950
2950
  const t = new Uint8Array(e);
2951
2951
  let r = "";
2952
2952
  for (const s of t)
2953
2953
  r += String.fromCharCode(s);
2954
2954
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2955
2955
  }
2956
- function tt(e) {
2956
+ function rt(e) {
2957
2957
  const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, s = t.padEnd(t.length + r, "="), a = atob(s), n = new ArrayBuffer(a.length), i = new Uint8Array(n);
2958
2958
  for (let o = 0; o < a.length; o++)
2959
2959
  i[o] = a.charCodeAt(o);
2960
2960
  return n;
2961
2961
  }
2962
- function Ht() {
2963
- return mn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2962
+ function Bt() {
2963
+ return _n.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2964
2964
  }
2965
- const mn = {
2965
+ const _n = {
2966
2966
  stubThis: (e) => e
2967
2967
  };
2968
- function Vr(e) {
2968
+ function Yr(e) {
2969
2969
  const { id: t } = e;
2970
2970
  return {
2971
2971
  ...e,
2972
- id: tt(t),
2972
+ id: rt(t),
2973
2973
  /**
2974
2974
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2975
2975
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2978,7 +2978,7 @@ function Vr(e) {
2978
2978
  transports: e.transports
2979
2979
  };
2980
2980
  }
2981
- function Qr(e) {
2981
+ function zr(e) {
2982
2982
  return (
2983
2983
  // Consider localhost valid as well since it's okay wrt Secure Contexts
2984
2984
  e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
@@ -2994,7 +2994,7 @@ let U = class extends Error {
2994
2994
  }), this.name = a ?? s.name, this.code = r;
2995
2995
  }
2996
2996
  };
2997
- function pn({ error: e, options: t }) {
2997
+ function Rn({ error: e, options: t }) {
2998
2998
  const { publicKey: r } = t;
2999
2999
  if (!r)
3000
3000
  throw Error("options was missing required publicKey property");
@@ -3052,7 +3052,7 @@ function pn({ error: e, options: t }) {
3052
3052
  });
3053
3053
  if (e.name === "SecurityError") {
3054
3054
  const s = globalThis.location.hostname;
3055
- if (Qr(s)) {
3055
+ if (zr(s)) {
3056
3056
  if (r.rp.id !== s)
3057
3057
  return new U({
3058
3058
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
@@ -3080,7 +3080,7 @@ function pn({ error: e, options: t }) {
3080
3080
  }
3081
3081
  return e;
3082
3082
  }
3083
- class yn {
3083
+ class Cn {
3084
3084
  constructor() {
3085
3085
  Object.defineProperty(this, "controller", {
3086
3086
  enumerable: !0,
@@ -3104,31 +3104,31 @@ class yn {
3104
3104
  }
3105
3105
  }
3106
3106
  }
3107
- const Jr = new yn(), gn = ["cross-platform", "platform"];
3108
- function Yr(e) {
3109
- if (e && !(gn.indexOf(e) < 0))
3107
+ const Xr = new Cn(), On = ["cross-platform", "platform"];
3108
+ function Zr(e) {
3109
+ if (e && !(On.indexOf(e) < 0))
3110
3110
  return e;
3111
3111
  }
3112
- async function bn(e) {
3112
+ async function kn(e) {
3113
3113
  !e.optionsJSON && e.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
3114
3114
  const { optionsJSON: t, useAutoRegister: r = !1 } = e;
3115
- if (!Ht())
3115
+ if (!Bt())
3116
3116
  throw new Error("WebAuthn is not supported in this browser");
3117
3117
  const s = {
3118
3118
  ...t,
3119
- challenge: tt(t.challenge),
3119
+ challenge: rt(t.challenge),
3120
3120
  user: {
3121
3121
  ...t.user,
3122
- id: tt(t.user.id)
3122
+ id: rt(t.user.id)
3123
3123
  },
3124
- excludeCredentials: t.excludeCredentials?.map(Vr)
3124
+ excludeCredentials: t.excludeCredentials?.map(Yr)
3125
3125
  }, a = {};
3126
- r && (a.mediation = "conditional"), a.publicKey = s, a.signal = Jr.createNewAbortSignal();
3126
+ r && (a.mediation = "conditional"), a.publicKey = s, a.signal = Xr.createNewAbortSignal();
3127
3127
  let n;
3128
3128
  try {
3129
3129
  n = await navigator.credentials.create(a);
3130
3130
  } catch (p) {
3131
- throw pn({ error: p, options: a });
3131
+ throw Rn({ error: p, options: a });
3132
3132
  }
3133
3133
  if (!n)
3134
3134
  throw new Error("Registration was not completed");
@@ -3140,29 +3140,29 @@ async function bn(e) {
3140
3140
  try {
3141
3141
  u = c.getPublicKeyAlgorithm();
3142
3142
  } catch (p) {
3143
- mt("getPublicKeyAlgorithm()", p);
3143
+ gt("getPublicKeyAlgorithm()", p);
3144
3144
  }
3145
3145
  let l;
3146
3146
  if (typeof c.getPublicKey == "function")
3147
3147
  try {
3148
3148
  const p = c.getPublicKey();
3149
- p !== null && (l = Z(p));
3149
+ p !== null && (l = ee(p));
3150
3150
  } catch (p) {
3151
- mt("getPublicKey()", p);
3151
+ gt("getPublicKey()", p);
3152
3152
  }
3153
3153
  let m;
3154
3154
  if (typeof c.getAuthenticatorData == "function")
3155
3155
  try {
3156
- m = Z(c.getAuthenticatorData());
3156
+ m = ee(c.getAuthenticatorData());
3157
3157
  } catch (p) {
3158
- mt("getAuthenticatorData()", p);
3158
+ gt("getAuthenticatorData()", p);
3159
3159
  }
3160
3160
  return {
3161
3161
  id: i,
3162
- rawId: Z(o),
3162
+ rawId: ee(o),
3163
3163
  response: {
3164
- attestationObject: Z(c.attestationObject),
3165
- clientDataJSON: Z(c.clientDataJSON),
3164
+ attestationObject: ee(c.attestationObject),
3165
+ clientDataJSON: ee(c.clientDataJSON),
3166
3166
  transports: d,
3167
3167
  publicKeyAlgorithm: u,
3168
3168
  publicKey: l,
@@ -3170,23 +3170,23 @@ async function bn(e) {
3170
3170
  },
3171
3171
  type: f,
3172
3172
  clientExtensionResults: n.getClientExtensionResults(),
3173
- authenticatorAttachment: Yr(n.authenticatorAttachment)
3173
+ authenticatorAttachment: Zr(n.authenticatorAttachment)
3174
3174
  };
3175
3175
  }
3176
- function mt(e, t) {
3176
+ function gt(e, t) {
3177
3177
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
3178
3178
  `, t);
3179
3179
  }
3180
- function En() {
3181
- if (!Ht())
3182
- return pt.stubThis(new Promise((t) => t(!1)));
3180
+ function Nn() {
3181
+ if (!Bt())
3182
+ return bt.stubThis(new Promise((t) => t(!1)));
3183
3183
  const e = globalThis.PublicKeyCredential;
3184
- return e?.isConditionalMediationAvailable === void 0 ? pt.stubThis(new Promise((t) => t(!1))) : pt.stubThis(e.isConditionalMediationAvailable());
3184
+ return e?.isConditionalMediationAvailable === void 0 ? bt.stubThis(new Promise((t) => t(!1))) : bt.stubThis(e.isConditionalMediationAvailable());
3185
3185
  }
3186
- const pt = {
3186
+ const bt = {
3187
3187
  stubThis: (e) => e
3188
3188
  };
3189
- function wn({ error: e, options: t }) {
3189
+ function Pn({ error: e, options: t }) {
3190
3190
  const { publicKey: r } = t;
3191
3191
  if (!r)
3192
3192
  throw Error("options was missing required publicKey property");
@@ -3206,7 +3206,7 @@ function wn({ error: e, options: t }) {
3206
3206
  });
3207
3207
  if (e.name === "SecurityError") {
3208
3208
  const s = globalThis.location.hostname;
3209
- if (Qr(s)) {
3209
+ if (zr(s)) {
3210
3210
  if (r.rpId !== s)
3211
3211
  return new U({
3212
3212
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
@@ -3227,70 +3227,70 @@ function wn({ error: e, options: t }) {
3227
3227
  }
3228
3228
  return e;
3229
3229
  }
3230
- async function Sn(e) {
3230
+ async function $n(e) {
3231
3231
  !e.optionsJSON && e.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
3232
3232
  const { optionsJSON: t, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: s = !0 } = e;
3233
- if (!Ht())
3233
+ if (!Bt())
3234
3234
  throw new Error("WebAuthn is not supported in this browser");
3235
3235
  let a;
3236
- t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(Vr));
3236
+ t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(Yr));
3237
3237
  const n = {
3238
3238
  ...t,
3239
- challenge: tt(t.challenge),
3239
+ challenge: rt(t.challenge),
3240
3240
  allowCredentials: a
3241
3241
  }, i = {};
3242
3242
  if (r) {
3243
- if (!await En())
3243
+ if (!await Nn())
3244
3244
  throw Error("Browser does not support WebAuthn autofill");
3245
3245
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && s)
3246
3246
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
3247
3247
  i.mediation = "conditional", n.allowCredentials = [];
3248
3248
  }
3249
- i.publicKey = n, i.signal = Jr.createNewAbortSignal();
3249
+ i.publicKey = n, i.signal = Xr.createNewAbortSignal();
3250
3250
  let o;
3251
3251
  try {
3252
3252
  o = await navigator.credentials.get(i);
3253
3253
  } catch (m) {
3254
- throw wn({ error: m, options: i });
3254
+ throw Pn({ error: m, options: i });
3255
3255
  }
3256
3256
  if (!o)
3257
3257
  throw new Error("Authentication was not completed");
3258
3258
  const { id: c, rawId: f, response: d, type: u } = o;
3259
3259
  let l;
3260
- return d.userHandle && (l = Z(d.userHandle)), {
3260
+ return d.userHandle && (l = ee(d.userHandle)), {
3261
3261
  id: c,
3262
- rawId: Z(f),
3262
+ rawId: ee(f),
3263
3263
  response: {
3264
- authenticatorData: Z(d.authenticatorData),
3265
- clientDataJSON: Z(d.clientDataJSON),
3266
- signature: Z(d.signature),
3264
+ authenticatorData: ee(d.authenticatorData),
3265
+ clientDataJSON: ee(d.clientDataJSON),
3266
+ signature: ee(d.signature),
3267
3267
  userHandle: l
3268
3268
  },
3269
3269
  type: u,
3270
3270
  clientExtensionResults: o.getClientExtensionResults(),
3271
- authenticatorAttachment: Yr(o.authenticatorAttachment)
3271
+ authenticatorAttachment: Zr(o.authenticatorAttachment)
3272
3272
  };
3273
3273
  }
3274
- function zr(e, t) {
3274
+ function es(e, t) {
3275
3275
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
3276
3276
  }
3277
- const hr = (e, t) => {
3277
+ const pr = (e, t) => {
3278
3278
  const r = JSON.stringify(
3279
3279
  typeof t == "function" ? t() : t
3280
3280
  );
3281
- window.localStorage.setItem(e, r), zr(e, r);
3282
- }, vn = (e) => {
3283
- window.localStorage.removeItem(e), zr(e, null);
3284
- }, fr = (e) => window.localStorage.getItem(e), Tn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3285
- function He({
3281
+ window.localStorage.setItem(e, r), es(e, r);
3282
+ }, xn = (e) => {
3283
+ window.localStorage.removeItem(e), es(e, null);
3284
+ }, yr = (e) => window.localStorage.getItem(e), Dn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3285
+ function Ke({
3286
3286
  key: e,
3287
3287
  initialValue: t
3288
3288
  }) {
3289
- const r = _s(Tn, () => fr(e)), s = Y(
3289
+ const r = Us(Dn, () => yr(e)), s = Y(
3290
3290
  (i) => {
3291
3291
  try {
3292
3292
  const o = typeof i == "function" ? i(JSON.parse(r)) : i;
3293
- o == null ? vn(e) : hr(e, o);
3293
+ o == null ? xn(e) : pr(e, o);
3294
3294
  } catch (o) {
3295
3295
  console.warn(o);
3296
3296
  }
@@ -3303,7 +3303,7 @@ function He({
3303
3303
  }, [s]);
3304
3304
  return W(() => {
3305
3305
  try {
3306
- fr(e) === null && typeof t < "u" && hr(e, t);
3306
+ yr(e) === null && typeof t < "u" && pr(e, t);
3307
3307
  } catch (i) {
3308
3308
  console.warn(i);
3309
3309
  }
@@ -3312,30 +3312,30 @@ function He({
3312
3312
  const M = [];
3313
3313
  for (let e = 0; e < 256; ++e)
3314
3314
  M.push((e + 256).toString(16).slice(1));
3315
- function An(e, t = 0) {
3315
+ function Mn(e, t = 0) {
3316
3316
  return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
3317
3317
  }
3318
- let yt;
3319
- const In = new Uint8Array(16);
3320
- function _n() {
3321
- if (!yt) {
3318
+ let Et;
3319
+ const Ln = new Uint8Array(16);
3320
+ function Un() {
3321
+ if (!Et) {
3322
3322
  if (typeof crypto > "u" || !crypto.getRandomValues)
3323
3323
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3324
- yt = crypto.getRandomValues.bind(crypto);
3324
+ Et = crypto.getRandomValues.bind(crypto);
3325
3325
  }
3326
- return yt(In);
3326
+ return Et(Ln);
3327
3327
  }
3328
- const Rn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mr = { randomUUID: Rn };
3329
- function gt(e, t, r) {
3330
- if (mr.randomUUID && !e)
3331
- return mr.randomUUID();
3328
+ const Fn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), gr = { randomUUID: Fn };
3329
+ function wt(e, t, r) {
3330
+ if (gr.randomUUID && !e)
3331
+ return gr.randomUUID();
3332
3332
  e = e || {};
3333
- const s = e.random ?? e.rng?.() ?? _n();
3333
+ const s = e.random ?? e.rng?.() ?? Un();
3334
3334
  if (s.length < 16)
3335
3335
  throw new Error("Random bytes length must be >= 16");
3336
- return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, An(s);
3336
+ return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Mn(s);
3337
3337
  }
3338
- const ve = "Your session has expired. For your security, please log in again to continue.", Cn = "Your session has been successfully terminated.", bt = "Login failed. Please try again.", On = "Error getting access token, please re-authenticate.", kn = "You forgot to wrap your component in <AuthProvider>.", Ke = "@@auth@@", Ne = "LOADING", qe = "LOGIN", Xr = "LOGOUT", Le = "success", ee = "failure", Zr = "include", es = "POST", ts = "application/json", Ge = {
3338
+ const ve = "Your session has expired. For your security, please log in again to continue.", Hn = "Your session has been successfully terminated.", St = "Login failed. Please try again.", Kn = "Error getting access token, please re-authenticate.", Gn = "You forgot to wrap your component in <AuthProvider>.", Ge = "@@auth@@", Ne = "LOADING", je = "LOGIN", ts = "LOGOUT", Le = "success", te = "failure", rs = "include", ss = "POST", as = "application/json", Be = {
3339
3339
  GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
3340
3340
  $clientId: String!,
3341
3341
  $username: String!,
@@ -3418,19 +3418,19 @@ const ve = "Your session has expired. For your security, please log in again to
3418
3418
  }`
3419
3419
  }, Te = {
3420
3420
  GET_REGISTRATION_OPTIONS: {
3421
- schema: Ge.GET_REGISTRATION_OPTIONS,
3421
+ schema: Be.GET_REGISTRATION_OPTIONS,
3422
3422
  method: "getPasskeyRegistrationOptions"
3423
3423
  },
3424
3424
  VERIFY_REGISTRATION: {
3425
- schema: Ge.VERIFY_REGISTRATION,
3425
+ schema: Be.VERIFY_REGISTRATION,
3426
3426
  method: "verifyPasskeyRegistration"
3427
3427
  },
3428
3428
  GET_AUTHENTICATION_OPTIONS: {
3429
- schema: Ge.GET_AUTHENTICATION_OPTIONS,
3429
+ schema: Be.GET_AUTHENTICATION_OPTIONS,
3430
3430
  method: "getPasskeyAuthenticationOptions"
3431
3431
  },
3432
3432
  VERIFY_AUTHENTICATION: {
3433
- schema: Ge.VERIFY_AUTHENTICATION,
3433
+ schema: Be.VERIFY_AUTHENTICATION,
3434
3434
  method: "verifyPasskeyAuthentication"
3435
3435
  }
3436
3436
  }, Ae = async ({
@@ -3442,12 +3442,12 @@ const ve = "Your session has expired. For your security, please log in again to
3442
3442
  }) => {
3443
3443
  try {
3444
3444
  const n = `Bearer ${e}`, i = await fetch(`${a}/graphql`, {
3445
- credentials: Zr,
3446
- method: es,
3445
+ credentials: rs,
3446
+ method: ss,
3447
3447
  headers: {
3448
3448
  authorization: n,
3449
- "Content-Type": ts,
3450
- [Mr.CLIENT_ID]: `${r}`
3449
+ "Content-Type": as,
3450
+ [Fr.CLIENT_ID]: `${r}`
3451
3451
  },
3452
3452
  body: JSON.stringify({
3453
3453
  query: t.schema,
@@ -3455,16 +3455,16 @@ const ve = "Your session has expired. For your security, please log in again to
3455
3455
  })
3456
3456
  });
3457
3457
  if (i.status !== 200)
3458
- return { status: ee, data: [] };
3458
+ return { status: te, data: [] };
3459
3459
  const { data: o } = await i.json();
3460
3460
  return {
3461
3461
  status: Le,
3462
3462
  data: o[t.method]
3463
3463
  };
3464
3464
  } catch (n) {
3465
- return console.error(n), { status: ee, data: [] };
3465
+ return console.error(n), { status: te, data: [] };
3466
3466
  }
3467
- }, ot = async ({
3467
+ }, ct = async ({
3468
3468
  type: e,
3469
3469
  clientId: t,
3470
3470
  params: r = {},
@@ -3472,39 +3472,39 @@ const ve = "Your session has expired. For your security, please log in again to
3472
3472
  }) => {
3473
3473
  try {
3474
3474
  const a = await fetch(`${s}/${e}`, {
3475
- credentials: Zr,
3476
- method: es,
3475
+ credentials: rs,
3476
+ method: ss,
3477
3477
  headers: {
3478
- "Content-Type": ts,
3479
- [Mr.CLIENT_ID]: `${t}`
3478
+ "Content-Type": as,
3479
+ [Fr.CLIENT_ID]: `${t}`
3480
3480
  },
3481
3481
  body: JSON.stringify(r)
3482
3482
  });
3483
3483
  if (a.status !== 200)
3484
- return { status: ee, data: [] };
3484
+ return { status: te, data: [] };
3485
3485
  const { data: n } = await a.json();
3486
3486
  return {
3487
3487
  status: Le,
3488
3488
  data: n || []
3489
3489
  };
3490
3490
  } catch (a) {
3491
- return console.error(a), { status: ee, data: [] };
3491
+ return console.error(a), { status: te, data: [] };
3492
3492
  }
3493
- }, Nn = process.env.NODE_ENV === "production", Pn = !Nn, rs = {
3493
+ }, Bn = process.env.NODE_ENV === "production", Wn = !Bn, ns = {
3494
3494
  isLoading: !0,
3495
3495
  isAuthenticated: !1,
3496
3496
  user: void 0,
3497
3497
  logoutReason: "",
3498
3498
  debug: !1,
3499
3499
  authenticationType: ""
3500
- }, $n = (e) => {
3500
+ }, qn = (e) => {
3501
3501
  try {
3502
- const t = rn(e);
3502
+ const t = pn(e);
3503
3503
  return t ? t[F.USER_ID_KEY] : "";
3504
3504
  } catch {
3505
3505
  return "";
3506
3506
  }
3507
- }, xn = async ({
3507
+ }, jn = async ({
3508
3508
  userId: e,
3509
3509
  clientId: t,
3510
3510
  domain: r,
@@ -3513,23 +3513,23 @@ const ve = "Your session has expired. For your security, please log in again to
3513
3513
  }) => {
3514
3514
  try {
3515
3515
  return {
3516
- status: (await ot({
3516
+ status: (await ct({
3517
3517
  endpoint: a,
3518
- type: it.LOGOUT,
3518
+ type: ot.LOGOUT,
3519
3519
  clientId: t,
3520
3520
  params: {
3521
3521
  userId: e,
3522
3522
  domain: r,
3523
3523
  idToken: s
3524
3524
  }
3525
- }))?.status || ee
3525
+ }))?.status || te
3526
3526
  };
3527
3527
  } catch {
3528
3528
  return {
3529
- status: ee
3529
+ status: te
3530
3530
  };
3531
3531
  }
3532
- }, Dn = async ({
3532
+ }, Vn = async ({
3533
3533
  username: e,
3534
3534
  password: t,
3535
3535
  clientId: r,
@@ -3543,9 +3543,9 @@ const ve = "Your session has expired. For your security, please log in again to
3543
3543
  endpoint: d
3544
3544
  }) => {
3545
3545
  try {
3546
- const u = await ot({
3546
+ const u = await ct({
3547
3547
  endpoint: d,
3548
- type: it.LOGIN,
3548
+ type: ot.LOGIN,
3549
3549
  clientId: r,
3550
3550
  params: {
3551
3551
  type: a,
@@ -3574,16 +3574,16 @@ const ve = "Your session has expired. For your security, please log in again to
3574
3574
  status: !1
3575
3575
  };
3576
3576
  }
3577
- }, Mn = async ({
3577
+ }, Qn = async ({
3578
3578
  nonce: e,
3579
3579
  clientId: t,
3580
3580
  code_challenge: r,
3581
3581
  endpoint: s
3582
3582
  }) => {
3583
3583
  try {
3584
- const a = await ot({
3584
+ const a = await ct({
3585
3585
  endpoint: s,
3586
- type: it.CODE,
3586
+ type: ot.CODE,
3587
3587
  clientId: t,
3588
3588
  params: {
3589
3589
  type: Pe.CODE,
@@ -3595,16 +3595,16 @@ const ve = "Your session has expired. For your security, please log in again to
3595
3595
  status: Le,
3596
3596
  data: a.data.code
3597
3597
  } : {
3598
- status: ee,
3598
+ status: te,
3599
3599
  data: ""
3600
3600
  };
3601
3601
  } catch {
3602
3602
  return {
3603
- status: ee,
3603
+ status: te,
3604
3604
  data: ""
3605
3605
  };
3606
3606
  }
3607
- }, Ln = async ({
3607
+ }, Jn = async ({
3608
3608
  clientId: e,
3609
3609
  userId: t,
3610
3610
  nonce: r,
@@ -3614,9 +3614,9 @@ const ve = "Your session has expired. For your security, please log in again to
3614
3614
  endpoint: i
3615
3615
  }) => {
3616
3616
  try {
3617
- const o = await ot({
3617
+ const o = await ct({
3618
3618
  endpoint: i,
3619
- type: it.REFRESH,
3619
+ type: ot.REFRESH,
3620
3620
  clientId: e,
3621
3621
  params: {
3622
3622
  type: Pe.REFRESH_TOKEN,
@@ -3641,9 +3641,9 @@ const ve = "Your session has expired. For your security, please log in again to
3641
3641
  };
3642
3642
  }
3643
3643
  };
3644
- class Un {
3644
+ class Yn {
3645
3645
  constructor(t = null, r = null) {
3646
- ft(this, "refreshTokenPromise", null), ft(this, "accessToken"), ft(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
3646
+ yt(this, "refreshTokenPromise", null), yt(this, "accessToken"), yt(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
3647
3647
  }
3648
3648
  async refreshtoken({
3649
3649
  clientId: t,
@@ -3674,7 +3674,7 @@ class Un {
3674
3674
  }) {
3675
3675
  const i = await Me(this.refreshToken);
3676
3676
  if (i && i.payload[F.USER_ID_KEY] !== "") {
3677
- const o = await Ln({
3677
+ const o = await Jn({
3678
3678
  endpoint: t,
3679
3679
  clientId: r,
3680
3680
  userId: s,
@@ -3688,17 +3688,17 @@ class Un {
3688
3688
  newAccessToken: o.accessToken,
3689
3689
  newRefreshToken: o.refreshToken
3690
3690
  }) : {
3691
- status: ee
3691
+ status: te
3692
3692
  };
3693
3693
  } else
3694
3694
  return {
3695
- status: ee
3695
+ status: te
3696
3696
  };
3697
3697
  }
3698
3698
  }
3699
3699
  const Ie = () => {
3700
- throw new Error(kn);
3701
- }, ss = xt({
3700
+ throw new Error(Gn);
3701
+ }, is = Lt({
3702
3702
  isAuthenticated: !1,
3703
3703
  isLoading: !1,
3704
3704
  login: Ie,
@@ -3709,59 +3709,59 @@ const Ie = () => {
3709
3709
  loginWithPasskey: Ie,
3710
3710
  logoutReason: "",
3711
3711
  authenticationType: ""
3712
- }), Fn = () => ({
3713
- ...at(ss)
3714
- }), Hn = (e) => Y(
3712
+ }), zn = () => ({
3713
+ ...nt(is)
3714
+ }), Xn = (e) => Y(
3715
3715
  (...t) => {
3716
3716
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
3717
3717
  },
3718
3718
  [e]
3719
- ), Kn = ie.createContext({
3720
- state: rs,
3719
+ ), Zn = ie.createContext({
3720
+ state: ns,
3721
3721
  dispatch: () => {
3722
3722
  }
3723
- }), Gn = (e, t) => t?.type === Ne ? {
3723
+ }), ei = (e, t) => t?.type === Ne ? {
3724
3724
  ...e,
3725
3725
  isLoading: t.payload.isLoading
3726
- } : t?.type === qe ? {
3726
+ } : t?.type === je ? {
3727
3727
  ...e,
3728
3728
  isLoading: !1,
3729
3729
  isAuthenticated: !0,
3730
3730
  user: t.payload.user,
3731
3731
  authenticationType: t.payload.authenticationType,
3732
3732
  logoutReason: ""
3733
- } : t?.type === Xr ? {
3733
+ } : t?.type === ts ? {
3734
3734
  ...e,
3735
3735
  isLoading: !1,
3736
3736
  isAuthenticated: !1,
3737
3737
  user: void 0,
3738
3738
  authenticationType: "",
3739
3739
  logoutReason: t.payload.logoutReason
3740
- } : e, Bn = ({ children: e }) => {
3741
- const t = Fn();
3742
- return /* @__PURE__ */ h(jr.Provider, { value: t, children: e });
3743
- }, pr = ({
3740
+ } : e, ti = ({ children: e }) => {
3741
+ const t = zn();
3742
+ return /* @__PURE__ */ h(Jr.Provider, { value: t, children: e });
3743
+ }, br = ({
3744
3744
  children: e,
3745
3745
  sessionExpiration: t,
3746
3746
  clientId: r,
3747
3747
  domain: s = "",
3748
3748
  debug: a = !1,
3749
- endpoint: n = Pn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
3749
+ endpoint: n = Wn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
3750
3750
  }) => {
3751
- const [i, o] = Ir(Gn, {
3752
- ...rs,
3751
+ const [i, o] = Cr(ei, {
3752
+ ...ns,
3753
3753
  debug: a
3754
- }), c = Hn(a), f = j(!1), [d, u, , l] = He({
3755
- key: `${Ke}::${r}::@@user@@`
3756
- }), [m, p, , g] = He({
3757
- key: `${Ke}::${r}::@@access@@`
3758
- }), [b, E, , O] = He(
3754
+ }), c = Xn(a), f = j(!1), [d, u, , l] = Ke({
3755
+ key: `${Ge}::${r}::@@user@@`
3756
+ }), [m, p, , g] = Ke({
3757
+ key: `${Ge}::${r}::@@access@@`
3758
+ }), [b, E, , O] = Ke(
3759
3759
  {
3760
- key: `${Ke}::${r}::@@refresh@@`
3760
+ key: `${Ge}::${r}::@@refresh@@`
3761
3761
  }
3762
- ), [A, K, , R] = He({
3763
- key: `${Ke}::${r}::@@nonce@@`
3764
- }), J = new Un(m, b), C = Y(() => {
3762
+ ), [A, K, , R] = Ke({
3763
+ key: `${Ge}::${r}::@@nonce@@`
3764
+ }), J = new Yn(m, b), C = Y(() => {
3765
3765
  c("removeLocalStorage: removing local storage"), l(), g(), O(), R();
3766
3766
  }, [
3767
3767
  g,
@@ -3775,7 +3775,7 @@ const Ie = () => {
3775
3775
  "removeStateAndLocalStorage: removing state and local storage with reason: ",
3776
3776
  w
3777
3777
  ), o({
3778
- type: Xr,
3778
+ type: ts,
3779
3779
  payload: {
3780
3780
  logoutReason: w || ve
3781
3781
  }
@@ -3785,10 +3785,10 @@ const Ie = () => {
3785
3785
  ), x = Y(
3786
3786
  async (w) => {
3787
3787
  c("invalidateAndLogout: invalidating and logging out");
3788
- const { user: T } = i, S = T?.userId || $n(d);
3788
+ const { user: T } = i, S = T?.userId || qn(d);
3789
3789
  S || c(
3790
3790
  "invalidateAndLogout: user cannot be identified, logging out without userId"
3791
- ), await xn({
3791
+ ), await jn({
3792
3792
  userId: S,
3793
3793
  clientId: r,
3794
3794
  domain: s,
@@ -3812,7 +3812,7 @@ const Ie = () => {
3812
3812
  try {
3813
3813
  const w = await Me(d);
3814
3814
  w && w.payload[F.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
3815
- type: qe,
3815
+ type: je,
3816
3816
  payload: {
3817
3817
  authenticationType: w.payload[F.AUTH_TYPE_KEY],
3818
3818
  user: {
@@ -3833,16 +3833,16 @@ const Ie = () => {
3833
3833
  }, [i.isLoading, d, x, c]);
3834
3834
  const _ = async (w, T) => {
3835
3835
  o({ type: Ne, payload: { isLoading: !0 } }), C();
3836
- const S = gt();
3836
+ const S = wt();
3837
3837
  K(S), c("login: Logging in with password");
3838
- const { code_verifier: le, code_challenge: ue } = await dn(), Qt = await Mn({
3838
+ const { code_verifier: le, code_challenge: ue } = await Tn(), zt = await Qn({
3839
3839
  endpoint: n,
3840
3840
  nonce: S,
3841
3841
  clientId: r,
3842
3842
  code_challenge: ue
3843
3843
  });
3844
- if (Qt.status) {
3845
- const we = await Dn({
3844
+ if (zt.status) {
3845
+ const we = await Vn({
3846
3846
  endpoint: n,
3847
3847
  username: w,
3848
3848
  password: T,
@@ -3850,13 +3850,13 @@ const Ie = () => {
3850
3850
  sessionExpiration: t,
3851
3851
  nonce: S,
3852
3852
  type: Pe.CODE,
3853
- code: Qt.data,
3853
+ code: zt.data,
3854
3854
  code_verifier: le,
3855
3855
  domain: s,
3856
3856
  ua: navigator.userAgent
3857
3857
  });
3858
3858
  return we.status ? (u(we.idToken), p(we.accessToken), E(we.refreshToken), o({
3859
- type: qe,
3859
+ type: je,
3860
3860
  payload: {
3861
3861
  authenticationType: Pe.CODE,
3862
3862
  user: {
@@ -3865,11 +3865,11 @@ const Ie = () => {
3865
3865
  email: we.email
3866
3866
  }
3867
3867
  }
3868
- }), !0) : (v(bt), !1);
3868
+ }), !0) : (v(St), !1);
3869
3869
  }
3870
3870
  return !1;
3871
3871
  }, I = async (w) => {
3872
- w?.preventDefault(), await x(Cn);
3872
+ w?.preventDefault(), await x(Hn);
3873
3873
  }, N = async () => {
3874
3874
  const { isAuthenticated: w, user: T } = i;
3875
3875
  try {
@@ -3898,7 +3898,7 @@ const Ie = () => {
3898
3898
  } catch {
3899
3899
  return c(
3900
3900
  "getAccessToken: exception occurred, invalidating and logging out"
3901
- ), await x(On), "";
3901
+ ), await x(Kn), "";
3902
3902
  }
3903
3903
  }, V = () => i.isAuthenticated && d ? d : "", ce = async () => {
3904
3904
  const { user: w } = i;
@@ -3915,7 +3915,7 @@ const Ie = () => {
3915
3915
  });
3916
3916
  if (T.status)
3917
3917
  try {
3918
- const S = await bn({
3918
+ const S = await kn({
3919
3919
  optionsJSON: T.data
3920
3920
  });
3921
3921
  return T = await Ae({
@@ -3947,9 +3947,9 @@ const Ie = () => {
3947
3947
  return !1;
3948
3948
  }, Ee = async () => {
3949
3949
  o({ type: Ne, payload: { isLoading: !0 } }), C();
3950
- const w = gt();
3950
+ const w = wt();
3951
3951
  K(w), c("loginWithPasskey");
3952
- const T = gt();
3952
+ const T = wt();
3953
3953
  let S = await Ae({
3954
3954
  endpoint: n,
3955
3955
  accessToken: m,
@@ -3962,7 +3962,7 @@ const Ie = () => {
3962
3962
  });
3963
3963
  if (S.status)
3964
3964
  try {
3965
- const le = await Sn({
3965
+ const le = await $n({
3966
3966
  optionsJSON: S.data
3967
3967
  });
3968
3968
  return S = await Ae({
@@ -3980,7 +3980,7 @@ const Ie = () => {
3980
3980
  ua: navigator.userAgent
3981
3981
  }
3982
3982
  }), S.data.status === Le ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
3983
- type: qe,
3983
+ type: je,
3984
3984
  payload: {
3985
3985
  authenticationType: Pe.PASSKEY,
3986
3986
  user: {
@@ -3989,7 +3989,7 @@ const Ie = () => {
3989
3989
  email: S.data.email
3990
3990
  }
3991
3991
  }
3992
- }), !0) : (v(bt), !1);
3992
+ }), !0) : (v(St), !1);
3993
3993
  } catch {
3994
3994
  return await Ae({
3995
3995
  endpoint: n,
@@ -4004,12 +4004,12 @@ const Ie = () => {
4004
4004
  domain: s,
4005
4005
  sessionExpiration: t
4006
4006
  }
4007
- }), v(bt), !1;
4007
+ }), v(St), !1;
4008
4008
  }
4009
4009
  return !1;
4010
4010
  };
4011
- return /* @__PURE__ */ h(Kn.Provider, { value: { state: i, dispatch: o }, children: /* @__PURE__ */ h(
4012
- ss.Provider,
4011
+ return /* @__PURE__ */ h(Zn.Provider, { value: { state: i, dispatch: o }, children: /* @__PURE__ */ h(
4012
+ is.Provider,
4013
4013
  {
4014
4014
  value: {
4015
4015
  ...i,
@@ -4020,7 +4020,7 @@ const Ie = () => {
4020
4020
  registeringForPasskey: ce,
4021
4021
  loginWithPasskey: Ee
4022
4022
  },
4023
- children: /* @__PURE__ */ h(Bn, { children: e })
4023
+ children: /* @__PURE__ */ h(ti, { children: e })
4024
4024
  }
4025
4025
  ) });
4026
4026
  };
@@ -4037,41 +4037,41 @@ try {
4037
4037
  });
4038
4038
  } catch {
4039
4039
  }
4040
- const as = () => {
4041
- const e = at(jr);
4040
+ const os = () => {
4041
+ const e = nt(Jr);
4042
4042
  if (!e)
4043
4043
  throw new Error("useAuth must be used within an AuthHookProvider");
4044
4044
  return e;
4045
- }, qo = "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", 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;
4046
- let Et = null, se = !1;
4045
+ }, tc = "I'm having trouble right now. Please try again later.", rc = "action-search", sc = "action-sort", ac = "action-toggle-prompt", nc = "action-reset-prompt", cs = "sassy-saint-", ic = "search", oc = "sort", cc = "sort-timestamp", lc = "sort-token-usage", uc = "sort-memory-direction", dc = "sort-memory-column", hc = "favorites-only", fc = "private-disclosure", mc = "reasoning-disclosure", ls = "service-worker", Er = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", pc = 10, yc = 30, gc = "av-prompt", bc = "av-prompt-editable", Ec = "size-5 sm:size-4", wc = 30, Sc = 15, vc = 130, Tc = 160, Ac = 16, Ic = 24, _c = 76, Rc = 76;
4046
+ let vt = null, se = !1;
4047
4047
  typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
4048
4048
  se && (se = !1, window.location.reload());
4049
4049
  });
4050
- function Kt() {
4050
+ function Wt() {
4051
4051
  return "serviceWorker" in navigator;
4052
4052
  }
4053
- function Nt() {
4053
+ function xt() {
4054
4054
  const e = localStorage.getItem(
4055
- ns + is
4055
+ cs + ls
4056
4056
  );
4057
4057
  return e === null ? !1 : e === "true";
4058
4058
  }
4059
- function Wn(e) {
4059
+ function ri(e) {
4060
4060
  localStorage.setItem(
4061
- ns + is,
4061
+ cs + ls,
4062
4062
  e.toString()
4063
4063
  );
4064
4064
  }
4065
- async function os() {
4066
- if (!Nt())
4065
+ async function us() {
4066
+ if (!xt())
4067
4067
  return !1;
4068
- if (!Kt())
4068
+ if (!Wt())
4069
4069
  return console.warn("[SW] Service workers not supported"), !1;
4070
4070
  try {
4071
- return Et = await navigator.serviceWorker.register("/sw.js", {
4071
+ return vt = await navigator.serviceWorker.register("/sw.js", {
4072
4072
  scope: "/"
4073
- }), Et.addEventListener("updatefound", () => {
4074
- const e = Et?.installing;
4073
+ }), vt.addEventListener("updatefound", () => {
4074
+ const e = vt?.installing;
4075
4075
  e && e.addEventListener("statechange", () => {
4076
4076
  e.state === "installed" && navigator.serviceWorker.controller && confirm(
4077
4077
  "A new version of the app is available. Reload to update cache?"
@@ -4082,8 +4082,8 @@ async function os() {
4082
4082
  return console.error("[SW] Service worker registration failed:", e), !1;
4083
4083
  }
4084
4084
  }
4085
- async function qn() {
4086
- if (!Kt())
4085
+ async function si() {
4086
+ if (!Wt())
4087
4087
  return !1;
4088
4088
  try {
4089
4089
  const e = await navigator.serviceWorker.getRegistration();
@@ -4092,19 +4092,19 @@ async function qn() {
4092
4092
  return console.error("[SW] Service worker un-registration failed:", e), !1;
4093
4093
  }
4094
4094
  }
4095
- async function bc(e) {
4096
- if (Wn(e), e) {
4095
+ async function Cc(e) {
4096
+ if (ri(e), e) {
4097
4097
  se = !0;
4098
4098
  try {
4099
4099
  sessionStorage.setItem("sw-toggle-pending", "enabled");
4100
4100
  } catch {
4101
4101
  }
4102
- await os(), navigator.serviceWorker.controller && se && (se = !1, window.location.reload());
4102
+ await us(), navigator.serviceWorker.controller && se && (se = !1, window.location.reload());
4103
4103
  try {
4104
4104
  navigator.serviceWorker.ready.then(() => {
4105
- se && Nt() && (se = !1, window.location.reload());
4105
+ se && xt() && (se = !1, window.location.reload());
4106
4106
  }), setTimeout(() => {
4107
- se && Nt() && (se = !1, window.location.reload());
4107
+ se && xt() && (se = !1, window.location.reload());
4108
4108
  }, 3e3);
4109
4109
  } catch {
4110
4110
  }
@@ -4114,14 +4114,14 @@ async function bc(e) {
4114
4114
  } catch {
4115
4115
  }
4116
4116
  try {
4117
- Kt() && await jn();
4117
+ Wt() && await ai();
4118
4118
  } catch (t) {
4119
4119
  console.warn("[SW] Failed to invalidate cache:", t);
4120
4120
  }
4121
- await qn(), window.location.reload();
4121
+ await si(), window.location.reload();
4122
4122
  }
4123
4123
  }
4124
- async function jn() {
4124
+ async function ai() {
4125
4125
  try {
4126
4126
  if ("caches" in window) {
4127
4127
  const e = await caches.keys();
@@ -4144,13 +4144,13 @@ async function jn() {
4144
4144
  console.warn("[SW] Failed to invalidate cache:", e);
4145
4145
  }
4146
4146
  }
4147
- function wt() {
4147
+ function Tt() {
4148
4148
  return "unknown";
4149
4149
  }
4150
- async function Ec(e = {}) {
4150
+ async function Oc(e = {}) {
4151
4151
  const { urlLimitPerCache: t } = e;
4152
4152
  if (!("caches" in window))
4153
- return { version: wt(), caches: [], totalItems: 0 };
4153
+ return { version: Tt(), caches: [], totalItems: 0 };
4154
4154
  try {
4155
4155
  const r = await caches.keys(), s = [];
4156
4156
  let a = 0;
@@ -4166,34 +4166,62 @@ async function Ec(e = {}) {
4166
4166
  console.warn("[SW] Failed reading cache", n, i);
4167
4167
  }
4168
4168
  return {
4169
- version: wt(),
4169
+ version: Tt(),
4170
4170
  caches: s,
4171
4171
  totalItems: a
4172
4172
  };
4173
4173
  } catch (r) {
4174
- return console.warn("[SW] getCacheInfo failed:", r), { version: wt(), caches: [], totalItems: 0 };
4174
+ return console.warn("[SW] getCacheInfo failed:", r), { version: Tt(), caches: [], totalItems: 0 };
4175
4175
  }
4176
4176
  }
4177
- 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 = {
4178
- [Vn]: [
4179
- Yn,
4180
- zn
4177
+ const kc = "user", Nc = "assistant", Pc = "data", Ue = "OpenAI", lt = "Anthropic", ut = "Google", ds = "Perplexity", $c = Ue, ni = [
4178
+ Ue,
4179
+ lt,
4180
+ ut
4181
+ ], hs = "gpt-5", fs = "gpt-4.1-nano", ms = "claude-haiku-4-5-20251001", ps = "claude-sonnet-4-5-20250929", ys = "gemini-2.5-flash", gs = "gemini-2.5-pro", bs = "sonar", Es = "sonar-pro", xc = {
4182
+ [hs]: "GPT-5",
4183
+ [fs]: "GPT-4.1 Nano",
4184
+ [ms]: "Claude Haiku 4.5",
4185
+ [ps]: "Claude Sonnet 4.5",
4186
+ [ys]: "Gemini 2.5 Flash",
4187
+ [gs]: "Gemini 2.5 Pro",
4188
+ [bs]: "Sonar",
4189
+ [Es]: "Sonar Pro"
4190
+ }, ii = "claude-sonnet-4", oi = "claude-3", ci = "gpt-", li = "o3", ui = "o4", di = "gemini", hi = "sonar", fi = {
4191
+ [lt]: [
4192
+ ii,
4193
+ oi
4181
4194
  ],
4182
- [cs]: [
4183
- Xn,
4184
- Zn,
4185
- ei
4195
+ [Ue]: [
4196
+ ci,
4197
+ li,
4198
+ ui
4186
4199
  ],
4187
- [Qn]: [ti],
4188
- [Jn]: [ri]
4189
- }, Ac = "x-diggidy-chat-id", Ic = (e) => {
4200
+ [ut]: [di],
4201
+ [ds]: [hi]
4202
+ }, mi = {
4203
+ [Ue]: [fs, hs],
4204
+ [lt]: [ms, ps],
4205
+ [ut]: [ys, gs],
4206
+ [ds]: [bs, Es]
4207
+ }, Dc = "x-diggidy-chat-id", Mc = (e) => {
4190
4208
  for (const [t, r] of Object.entries(
4191
- si
4209
+ fi
4192
4210
  ))
4193
4211
  if (r.some((s) => e.startsWith(s)))
4194
4212
  return t;
4195
4213
  return null;
4196
- }, _c = "timestamp", Rc = "tokenUsage", k = "Diggidy", Cc = {
4214
+ }, Lc = (e) => {
4215
+ if (!e || e.length === 0)
4216
+ return [];
4217
+ const t = /* @__PURE__ */ new Set();
4218
+ for (const r of e)
4219
+ for (const [s, a] of Object.entries(
4220
+ mi
4221
+ ))
4222
+ a.includes(r) && (s === Ue || s === lt || s === ut) && t.add(s);
4223
+ return ni.filter((r) => t.has(r));
4224
+ }, Uc = "timestamp", Fc = "tokenUsage", k = "Diggidy", Hc = {
4197
4225
  TOOL: {
4198
4226
  MEMORIES: "getUserMemories"
4199
4227
  },
@@ -4202,13 +4230,13 @@ const wc = "user", Sc = "assistant", vc = "data", cs = "OpenAI", Vn = "Anthropic
4202
4230
  REASONING: "addon:reasoning"
4203
4231
  }
4204
4232
  };
4205
- function ai(e) {
4233
+ function pi(e) {
4206
4234
  return e ? new Set(e) : null;
4207
4235
  }
4208
- function ni(e, t, r) {
4236
+ function yi(e, t, r) {
4209
4237
  if (!t || Array.isArray(t) && t.length === 0)
4210
4238
  return !0;
4211
- const s = e instanceof Set ? e : ai(e);
4239
+ const s = e instanceof Set ? e : pi(e);
4212
4240
  return !s || s.size === 0 ? !1 : typeof t == "string" ? s.has(t) : r?.any === !0 ? t.some((a) => s.has(a)) : t.every((a) => s.has(a));
4213
4241
  }
4214
4242
  const G = {
@@ -4305,6 +4333,15 @@ const G = {
4305
4333
  models
4306
4334
  buildTime
4307
4335
  runningMode
4336
+ plans {
4337
+ name
4338
+ label
4339
+ description
4340
+ features
4341
+ allowedModels
4342
+ allowedTools
4343
+ allowedAddOns
4344
+ }
4308
4345
  }
4309
4346
  }`,
4310
4347
  GET_CHANGELOGS: `query GetChangelogs {
@@ -4325,6 +4362,7 @@ const G = {
4325
4362
  entitlements {
4326
4363
  version
4327
4364
  capabilities
4365
+ allowedModels
4328
4366
  }
4329
4367
  tags {
4330
4368
  enabled
@@ -4392,7 +4430,7 @@ const G = {
4392
4430
  DELETE_MEMORIES: `mutation DeleteMemories($user: String!) {
4393
4431
  deleteMemories(user: $user)
4394
4432
  }`
4395
- }, te = {
4433
+ }, z = {
4396
4434
  GET_LOCATION: {
4397
4435
  schema: G.GET_LOCATION,
4398
4436
  method: "location"
@@ -4451,12 +4489,12 @@ const G = {
4451
4489
  DELETE_MEMORIES: {
4452
4490
  schema: G.DELETE_MEMORIES
4453
4491
  }
4454
- }, ii = process.env.PUBLIC_SASSY_API_SERVER_URL, Oe = async ({
4492
+ }, gi = process.env.PUBLIC_SASSY_API_SERVER_URL, Oe = async ({
4455
4493
  query: e,
4456
4494
  data: t,
4457
4495
  headers: r = {},
4458
4496
  ...s
4459
- }) => await fetch(`${ii}/graphql`, {
4497
+ }) => await fetch(`${gi}/graphql`, {
4460
4498
  method: "POST",
4461
4499
  credentials: "include",
4462
4500
  headers: {
@@ -4469,7 +4507,7 @@ const G = {
4469
4507
  variables: t
4470
4508
  }),
4471
4509
  ...s
4472
- }), oi = async (e) => {
4510
+ }), ws = async (e) => {
4473
4511
  const t = e.type?.data ? e.type.data(e.params) : e.params;
4474
4512
  try {
4475
4513
  let r;
@@ -4489,33 +4527,41 @@ const G = {
4489
4527
  });
4490
4528
  }
4491
4529
  if (r.status !== 200)
4492
- return { status: r.status, data: [] };
4530
+ throw new Error(`GraphQL request failed with status ${r.status}`);
4493
4531
  const { data: s, errors: a } = await r.json();
4532
+ if (a && a.length > 0)
4533
+ throw new Error(a[0].message || "GraphQL mutation failed");
4494
4534
  return {
4495
4535
  status: r.status,
4496
4536
  data: s[e.type.method],
4497
4537
  errors: a
4498
4538
  };
4499
4539
  } catch (r) {
4500
- return console.error(r), { status: 500, data: [] };
4540
+ throw console.error(r), r;
4501
4541
  }
4502
- }, Oc = async ({
4542
+ }, Kc = async ({
4503
4543
  provider: e,
4504
4544
  accessToken: t,
4505
4545
  username: r
4506
- }) => {
4507
- try {
4508
- await oi({
4509
- accessToken: t,
4510
- type: te.SET_USER_PREFERENCES,
4511
- params: {
4512
- user: r,
4513
- provider: e
4514
- }
4515
- });
4516
- } catch {
4546
+ }) => await ws({
4547
+ accessToken: t,
4548
+ type: z.SET_USER_PREFERENCES,
4549
+ params: {
4550
+ user: r,
4551
+ provider: e
4552
+ }
4553
+ }), Gc = async ({
4554
+ plan: e,
4555
+ accessToken: t,
4556
+ username: r
4557
+ }) => await ws({
4558
+ accessToken: t,
4559
+ type: z.SET_USER_PREFERENCES,
4560
+ params: {
4561
+ user: r,
4562
+ plan: e
4517
4563
  }
4518
- }, oe = {
4564
+ }), oe = {
4519
4565
  CHATS: "chats",
4520
4566
  CHATS_STATS: "chatsStats",
4521
4567
  CAPABILITIES: "capabilities",
@@ -4523,22 +4569,22 @@ const G = {
4523
4569
  PREFERENCES: "preferences",
4524
4570
  USAGE: "usage",
4525
4571
  USER_MEMORIES: "userMemories"
4526
- }, kc = () => ye({
4572
+ }, Bc = () => ye({
4527
4573
  queryKey: [oe.CAPABILITIES],
4528
4574
  queryFn: async () => await be({
4529
- type: te.GET_SERVER_CAPABILITIES,
4575
+ type: z.GET_SERVER_CAPABILITIES,
4530
4576
  noAuth: !0
4531
4577
  })
4532
- }), Nc = () => ye({
4578
+ }), Wc = () => ye({
4533
4579
  queryKey: [oe.CHANGELOGS],
4534
4580
  queryFn: async () => await be({
4535
- type: te.GET_CHANGELOGS,
4581
+ type: z.GET_CHANGELOGS,
4536
4582
  noAuth: !0,
4537
4583
  params: {
4538
4584
  client: !0
4539
4585
  }
4540
4586
  })
4541
- }), ci = ({
4587
+ }), bi = ({
4542
4588
  user: e,
4543
4589
  getAccessToken: t
4544
4590
  }) => ye({
@@ -4547,10 +4593,10 @@ const G = {
4547
4593
  params: {
4548
4594
  user: e
4549
4595
  },
4550
- type: te.GET_USER_PREFERENCES,
4596
+ type: z.GET_USER_PREFERENCES,
4551
4597
  getAccessToken: t
4552
4598
  })
4553
- }), Pc = ({
4599
+ }), qc = ({
4554
4600
  user: e,
4555
4601
  getAccessToken: t
4556
4602
  }) => ye({
@@ -4559,10 +4605,10 @@ const G = {
4559
4605
  params: {
4560
4606
  user: e
4561
4607
  },
4562
- type: te.GET_CHATS_STATS,
4608
+ type: z.GET_CHATS_STATS,
4563
4609
  getAccessToken: t
4564
4610
  })
4565
- }), $c = ({
4611
+ }), jc = ({
4566
4612
  user: e,
4567
4613
  searchString: t,
4568
4614
  sortDirection: r,
@@ -4583,10 +4629,10 @@ const G = {
4583
4629
  limit: 1,
4584
4630
  truncateSize: 100
4585
4631
  },
4586
- type: te.GET_CHATS,
4632
+ type: z.GET_CHATS,
4587
4633
  getAccessToken: a
4588
4634
  })
4589
- }), xc = ({
4635
+ }), Vc = ({
4590
4636
  user: e,
4591
4637
  month: t,
4592
4638
  year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
@@ -4601,10 +4647,10 @@ const G = {
4601
4647
  month: t,
4602
4648
  year: r
4603
4649
  },
4604
- type: te.GET_USAGE,
4650
+ type: z.GET_USAGE,
4605
4651
  getAccessToken: s
4606
4652
  })
4607
- }), Dc = ({
4653
+ }), Qc = ({
4608
4654
  user: e,
4609
4655
  query: t,
4610
4656
  getAccessToken: r,
@@ -4614,20 +4660,20 @@ const G = {
4614
4660
  queryKey: [oe.USER_MEMORIES, e, t],
4615
4661
  queryFn: async () => await be({
4616
4662
  params: { user: e, query: t },
4617
- type: te.GET_USER_MEMORIES,
4663
+ type: z.GET_USER_MEMORIES,
4618
4664
  getAccessToken: r
4619
4665
  })
4620
- }), Mc = ({
4666
+ }), Jc = ({
4621
4667
  getAccessToken: e
4622
4668
  }) => {
4623
- const t = nt();
4624
- return Dr({
4669
+ const t = it();
4670
+ return Ur({
4625
4671
  mutationFn: async ({
4626
4672
  user: r,
4627
4673
  memoryId: s
4628
4674
  }) => {
4629
4675
  const a = await e(), n = await Oe({
4630
- query: te.DELETE_MEMORY.schema,
4676
+ query: z.DELETE_MEMORY.schema,
4631
4677
  data: { user: r, memoryId: s },
4632
4678
  headers: { authorization: `Bearer ${a}` }
4633
4679
  }), { data: i, errors: o } = await n.json();
@@ -4641,14 +4687,14 @@ const G = {
4641
4687
  });
4642
4688
  }
4643
4689
  });
4644
- }, Lc = ({
4690
+ }, Yc = ({
4645
4691
  getAccessToken: e
4646
4692
  }) => {
4647
- const t = nt();
4648
- return Dr({
4693
+ const t = it();
4694
+ return Ur({
4649
4695
  mutationFn: async ({ user: r }) => {
4650
4696
  const s = await e(), a = await Oe({
4651
- query: te.DELETE_MEMORIES.schema,
4697
+ query: z.DELETE_MEMORIES.schema,
4652
4698
  data: { user: r },
4653
4699
  headers: { authorization: `Bearer ${s}` }
4654
4700
  }), { data: n, errors: i } = await a.json();
@@ -4698,18 +4744,19 @@ const G = {
4698
4744
  } catch (a) {
4699
4745
  return Promise.reject(a);
4700
4746
  }
4701
- }, ls = xt(
4747
+ }, Ss = Lt(
4702
4748
  void 0
4703
- ), gr = {
4749
+ ), wr = {
4704
4750
  capabilities: /* @__PURE__ */ new Set(),
4751
+ allowedModels: [],
4705
4752
  version: null,
4706
4753
  status: "idle"
4707
- }, li = ({
4754
+ }, Ei = ({
4708
4755
  user: e,
4709
4756
  getAccessToken: t,
4710
4757
  children: r
4711
4758
  }) => {
4712
- const [s, a] = ne(gr), n = Qe(
4759
+ const [s, a] = ne(wr), n = Je(
4713
4760
  () => e ? `entitlements:${e}` : null,
4714
4761
  [e]
4715
4762
  ), i = Y(() => {
@@ -4723,6 +4770,7 @@ const G = {
4723
4770
  if (Array.isArray(l.c))
4724
4771
  return a({
4725
4772
  capabilities: new Set(l.c),
4773
+ allowedModels: Array.isArray(l.m) ? l.m : [],
4726
4774
  version: typeof l.v == "number" ? l.v : null,
4727
4775
  status: "ready"
4728
4776
  }), !0;
@@ -4733,7 +4781,7 @@ const G = {
4733
4781
  W(() => {
4734
4782
  s.status === "idle" && i();
4735
4783
  }, [i, s.status]);
4736
- const o = ci({ user: e, getAccessToken: t });
4784
+ const o = bi({ user: e, getAccessToken: t });
4737
4785
  W(() => {
4738
4786
  o.isLoading && s.status === "idle" && a((u) => ({ ...u, status: "loading" }));
4739
4787
  }, [o.isLoading, s.status]), W(() => {
@@ -4746,6 +4794,7 @@ const G = {
4746
4794
  const u = o.data?.entitlements;
4747
4795
  if (u && (a({
4748
4796
  capabilities: new Set(u.capabilities || []),
4797
+ allowedModels: u.allowedModels || [],
4749
4798
  version: u.version ?? null,
4750
4799
  status: "ready"
4751
4800
  }), n))
@@ -4754,7 +4803,8 @@ const G = {
4754
4803
  n,
4755
4804
  JSON.stringify({
4756
4805
  v: u.version ?? null,
4757
- c: u.capabilities || []
4806
+ c: u.capabilities || [],
4807
+ m: u.allowedModels || []
4758
4808
  })
4759
4809
  );
4760
4810
  } catch {
@@ -4765,6 +4815,7 @@ const G = {
4765
4815
  const l = u?.entitlements;
4766
4816
  if (l && (a({
4767
4817
  capabilities: new Set(l.capabilities || []),
4818
+ allowedModels: l.allowedModels || [],
4768
4819
  version: l.version ?? null,
4769
4820
  status: "ready"
4770
4821
  }), n))
@@ -4773,7 +4824,8 @@ const G = {
4773
4824
  n,
4774
4825
  JSON.stringify({
4775
4826
  v: l.version ?? null,
4776
- c: l.capabilities || []
4827
+ c: l.capabilities || [],
4828
+ m: l.allowedModels || []
4777
4829
  })
4778
4830
  );
4779
4831
  } catch {
@@ -4781,41 +4833,41 @@ const G = {
4781
4833
  },
4782
4834
  [n]
4783
4835
  ), f = Y(() => {
4784
- if (a(gr), n)
4836
+ if (a(wr), n)
4785
4837
  try {
4786
4838
  sessionStorage.removeItem(n);
4787
4839
  } catch {
4788
4840
  }
4789
- }, [n]), d = Qe(
4841
+ }, [n]), d = Je(
4790
4842
  () => ({
4791
4843
  ...s,
4792
- check: (u, l) => s.status !== "ready" ? !1 : ni(s.capabilities, u, { any: l?.any }),
4844
+ check: (u, l) => s.status !== "ready" ? !1 : yi(s.capabilities, u, { any: l?.any }),
4793
4845
  loadFromProfile: c,
4794
4846
  reset: f
4795
4847
  }),
4796
4848
  [s, c, f]
4797
4849
  );
4798
- return /* @__PURE__ */ h(ls.Provider, { value: d, children: r });
4850
+ return /* @__PURE__ */ h(Ss.Provider, { value: d, children: r });
4799
4851
  };
4800
- function Uc() {
4801
- const e = at(ls);
4852
+ function zc() {
4853
+ const e = nt(Ss);
4802
4854
  if (!e)
4803
4855
  throw new Error("useEntitlements must be used within EntitlementsProvider");
4804
4856
  return e;
4805
4857
  }
4806
- const br = (e) => Number.isFinite(e) ? e : 0;
4807
- function ui(e) {
4858
+ const Sr = (e) => Number.isFinite(e) ? e : 0;
4859
+ function wi(e) {
4808
4860
  return {
4809
4861
  days: Math.trunc(e / 864e5),
4810
4862
  hours: Math.trunc(e / 36e5 % 24),
4811
4863
  minutes: Math.trunc(e / 6e4 % 60),
4812
4864
  seconds: Math.trunc(e / 1e3 % 60),
4813
4865
  milliseconds: Math.trunc(e % 1e3),
4814
- microseconds: Math.trunc(br(e * 1e3) % 1e3),
4815
- nanoseconds: Math.trunc(br(e * 1e6) % 1e3)
4866
+ microseconds: Math.trunc(Sr(e * 1e3) % 1e3),
4867
+ nanoseconds: Math.trunc(Sr(e * 1e6) % 1e3)
4816
4868
  };
4817
4869
  }
4818
- function di(e) {
4870
+ function Si(e) {
4819
4871
  return {
4820
4872
  days: e / 86400000n,
4821
4873
  hours: e / 3600000n % 24n,
@@ -4826,20 +4878,20 @@ function di(e) {
4826
4878
  nanoseconds: 0n
4827
4879
  };
4828
4880
  }
4829
- function hi(e) {
4881
+ function vi(e) {
4830
4882
  switch (typeof e) {
4831
4883
  case "number": {
4832
4884
  if (Number.isFinite(e))
4833
- return ui(e);
4885
+ return wi(e);
4834
4886
  break;
4835
4887
  }
4836
4888
  case "bigint":
4837
- return di(e);
4889
+ return Si(e);
4838
4890
  }
4839
4891
  throw new TypeError("Expected a finite number or bigint");
4840
4892
  }
4841
- const fi = (e) => e === 0 || e === 0n, mi = (e, t) => t === 1 || t === 1n ? e : `${e}s`, pi = 1e-7, yi = 24n * 60n * 60n * 1000n;
4842
- function gi(e, t) {
4893
+ const Ti = (e) => e === 0 || e === 0n, Ai = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ii = 1e-7, _i = 24n * 60n * 60n * 1000n;
4894
+ function Ri(e, t) {
4843
4895
  const r = typeof e == "bigint";
4844
4896
  if (!r && !Number.isFinite(e))
4845
4897
  throw new TypeError("Expected a finite number or bigint");
@@ -4848,18 +4900,18 @@ function gi(e, t) {
4848
4900
  e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
4849
4901
  let a = [];
4850
4902
  const n = (d, u) => {
4851
- const l = Math.floor(d * 10 ** u + pi);
4903
+ const l = Math.floor(d * 10 ** u + Ii);
4852
4904
  return (Math.round(l) / 10 ** u).toFixed(u);
4853
4905
  }, i = (d, u, l, m) => {
4854
- if (!((a.length === 0 || !t.colonNotation) && fi(d) && !(t.colonNotation && l === "m"))) {
4906
+ if (!((a.length === 0 || !t.colonNotation) && Ti(d) && !(t.colonNotation && l === "m"))) {
4855
4907
  if (m ??= String(d), t.colonNotation) {
4856
4908
  const p = m.includes(".") ? m.split(".")[0].length : m.length, g = a.length > 0 ? 2 : 1;
4857
4909
  m = "0".repeat(Math.max(0, g - p)) + m;
4858
4910
  } else
4859
- m += t.verbose ? " " + mi(u, d) : l;
4911
+ m += t.verbose ? " " + Ai(u, d) : l;
4860
4912
  a.push(m);
4861
4913
  }
4862
- }, o = hi(e), c = BigInt(o.days);
4914
+ }, o = vi(e), c = BigInt(o.days);
4863
4915
  if (t.hideYearAndDays ? i(BigInt(c) * 24n + BigInt(o.hours), "hour", "h") : (t.hideYear ? i(c, "day", "d") : (i(c / 365n, "year", "y"), i(c % 365n, "day", "d")), i(Number(o.hours), "hour", "h")), i(Number(o.minutes), "minute", "m"), !t.hideSeconds)
4864
4916
  if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3 && !t.subSecondsAsDecimals) {
4865
4917
  const d = Number(o.seconds), u = Number(o.milliseconds), l = Number(o.microseconds), m = Number(o.nanoseconds);
@@ -4875,7 +4927,7 @@ function gi(e, t) {
4875
4927
  );
4876
4928
  }
4877
4929
  } else {
4878
- const d = (r ? Number(e % yi) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = n(d, u), m = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
4930
+ const d = (r ? Number(e % _i) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = n(d, u), m = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
4879
4931
  i(Number.parseFloat(m), "second", "s", m);
4880
4932
  }
4881
4933
  if (a.length === 0)
@@ -4883,7 +4935,7 @@ function gi(e, t) {
4883
4935
  const f = t.colonNotation ? ":" : " ";
4884
4936
  return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), s + a.join(f);
4885
4937
  }
4886
- const us = process.env.NODE_ENV === "production", Gt = !us, ds = Gt ? "gizmette.local.com" : "gizmette.com", Bt = (e, t) => {
4938
+ const vs = process.env.NODE_ENV === "production", qt = !vs, Ts = qt ? "gizmette.local.com" : "gizmette.com", jt = (e, t) => {
4887
4939
  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;
4888
4940
  return {
4889
4941
  dir: r,
@@ -4891,17 +4943,17 @@ const us = process.env.NODE_ENV === "production", Gt = !us, ds = Gt ? "gizmette.
4891
4943
  min: a,
4892
4944
  sec: n
4893
4945
  };
4894
- }, bi = (e) => {
4946
+ }, Ci = (e) => {
4895
4947
  if (!e && e !== 0)
4896
4948
  return "N/A";
4897
- const t = Bt(e, !1);
4949
+ const t = jt(e, !1);
4898
4950
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
4899
- }, Ei = (e) => {
4951
+ }, Oi = (e) => {
4900
4952
  if (!e && e !== 0)
4901
4953
  return "N/A";
4902
- const t = Bt(e, !0);
4954
+ const t = jt(e, !0);
4903
4955
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
4904
- }, wi = async () => {
4956
+ }, ki = async () => {
4905
4957
  const e = {
4906
4958
  /**
4907
4959
  * A boolean value that indicates the application would like to receive the
@@ -4944,18 +4996,18 @@ const us = process.env.NODE_ENV === "production", Gt = !us, ds = Gt ? "gizmette.
4944
4996
  e
4945
4997
  );
4946
4998
  });
4947
- }, Si = (e) => window.btoa(
4999
+ }, Ni = (e) => window.btoa(
4948
5000
  encodeURIComponent(e).replace(
4949
5001
  /%([0-9A-F]{2})/g,
4950
5002
  function(r, s) {
4951
5003
  return String.fromCharCode(+`0x${s}`);
4952
5004
  }
4953
5005
  )
4954
- ), vi = (e) => decodeURIComponent(
5006
+ ), Pi = (e) => decodeURIComponent(
4955
5007
  window.atob(e).split("").map(function(t) {
4956
5008
  return `%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`;
4957
5009
  }).join("")
4958
- ), 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: [
5010
+ ), $i = (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: [
4959
5011
  /* @__PURE__ */ h(
4960
5012
  "dt",
4961
5013
  {
@@ -4977,7 +5029,7 @@ const us = process.env.NODE_ENV === "production", Gt = !us, ds = Gt ? "gizmette.
4977
5029
  }
4978
5030
  )
4979
5031
  ] }) }, `${e}-${s}`)) : null;
4980
- function Ai({
5032
+ function xi({
4981
5033
  data: e,
4982
5034
  formatter: t = (r) => r
4983
5035
  }) {
@@ -4989,15 +5041,15 @@ function Ai({
4989
5041
  );
4990
5042
  return t(s ? s / r.length : 0);
4991
5043
  }
4992
- const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, _i = new Intl.NumberFormat("en", {
5044
+ const Di = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Mi = new Intl.NumberFormat("en", {
4993
5045
  style: "decimal",
4994
5046
  signDisplay: "never",
4995
5047
  minimumFractionDigits: 0,
4996
5048
  maximumFractionDigits: 0
4997
- }), Ri = (e) => e > 0 ? gi(e, {
5049
+ }), Li = (e) => e > 0 ? Ri(e, {
4998
5050
  secondsDecimalDigits: 2,
4999
5051
  unitCount: 2
5000
- }) : "N/A", hs = ({
5052
+ }) : "N/A", As = ({
5001
5053
  isAuthenticated: e,
5002
5054
  extraClass: t
5003
5055
  }) => y(
@@ -5006,7 +5058,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5006
5058
  "flex-1 overflow-y-auto",
5007
5059
  e ? "pt-0" : "pt-10",
5008
5060
  t
5009
- ), fs = ({
5061
+ ), Is = ({
5010
5062
  extraClass: e
5011
5063
  } = {}) => y(
5012
5064
  "flex flex-col",
@@ -5014,21 +5066,21 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5014
5066
  "sm:px-5 px-2",
5015
5067
  "transition-all ease-in-out duration-500",
5016
5068
  e
5017
- ), Ci = (e, t) => t === 1 ? e : `${e}s`, Oi = (e, t) => {
5069
+ ), Ui = (e, t) => t === 1 ? e : `${e}s`, Fi = (e, t) => {
5018
5070
  let r;
5019
5071
  return (...s) => {
5020
5072
  window.clearTimeout(r), r = window.setTimeout(() => e(...s), t);
5021
5073
  };
5022
- }, ms = () => !!window?.__VERSINI_DIGGIDY_TAURI__, ps = () => window.innerWidth < 403, ys = () => window.innerWidth >= 403 && window.innerWidth <= 1220, ki = () => {
5023
- const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = ps(), s = navigator.maxTouchPoints > 1;
5074
+ }, _s = () => !!window?.__VERSINI_DIGGIDY_TAURI__, Rs = () => window.innerWidth < 403, Cs = () => window.innerWidth >= 403 && window.innerWidth <= 1220, Hi = () => {
5075
+ const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = Rs(), s = navigator.maxTouchPoints > 1;
5024
5076
  return e && t && r && s;
5025
- }, Ni = () => {
5026
- const e = ["iPad Simulator", "iPad"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = ys(), r = navigator.maxTouchPoints > 1;
5077
+ }, Ki = () => {
5078
+ const e = ["iPad Simulator", "iPad"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = Cs(), r = navigator.maxTouchPoints > 1;
5027
5079
  return e && t && r;
5028
- }, Pi = () => window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === !0, $i = (e) => {
5080
+ }, Gi = () => window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === !0, Bi = (e) => {
5029
5081
  const t = e.replace(/([A-Z])/g, " $1");
5030
5082
  return t.charAt(0).toUpperCase() + t.slice(1);
5031
- }, xi = ({
5083
+ }, Wi = ({
5032
5084
  autoClose: e = 3e3,
5033
5085
  containerId: t,
5034
5086
  position: r = "top-center",
@@ -5052,7 +5104,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5052
5104
  theme: c,
5053
5105
  transition: f,
5054
5106
  icon: d
5055
- }), 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 = ({
5107
+ }), Xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: Ts, convertCamelCaseToReadable: Bi, convertDDToDMS: jt, convertLatitudeToDMS: Ci, convertLongitudeToDMS: Oi, debounce: Fi, durationFormatter: Li, extractAverage: xi, getCurrentGeoLocation: ki, getLayoutPaddingClass: Is, getMessageContaintWrapperClass: As, isDev: qt, isLastMessageFromRole: Di, isPWAMode: Gi, isProbablyMobile: Rs, isProbablyTablet: Cs, isProbablyiPad: Ki, isProbablyiPhone: Hi, isProd: vs, isTauri: _s, numberFormatter: Mi, obfuscate: Ni, pluralize: Ui, renderDataAsList: $i, toastOptions: Wi, unObfuscate: Pi }, Symbol.toStringTag, { value: "Module" })), vr = "av-button", dt = "icon", Vt = "button", Dt = "link", qi = ({
5056
5108
  type: e,
5057
5109
  size: t,
5058
5110
  labelRight: r,
@@ -5062,14 +5114,14 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5062
5114
  }) => {
5063
5115
  const i = "max-h-8 py-0 px-2", o = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
5064
5116
  switch (e) {
5065
- case Wt:
5066
- case Pt:
5117
+ case Vt:
5118
+ case Dt:
5067
5119
  return y({
5068
5120
  [i]: t === "small",
5069
5121
  [o]: t === "medium",
5070
5122
  [c]: t === "large"
5071
5123
  });
5072
- case ct:
5124
+ case dt:
5073
5125
  return y("flex items-center", {
5074
5126
  "justify-center": a === "center",
5075
5127
  "justify-start": a === "left",
@@ -5088,7 +5140,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5088
5140
  "h-12": t === "large" && n && (r || s)
5089
5141
  });
5090
5142
  }
5091
- }, Mi = ({
5143
+ }, ji = ({
5092
5144
  type: e,
5093
5145
  size: t,
5094
5146
  labelRight: r,
@@ -5096,22 +5148,22 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5096
5148
  }) => {
5097
5149
  const a = "text-sm font-medium", n = "text-base font-medium", i = "text-lg font-medium";
5098
5150
  switch (e) {
5099
- case Wt:
5100
- case Pt:
5151
+ case Vt:
5152
+ case Dt:
5101
5153
  return y({
5102
- "text-center": e === Pt,
5154
+ "text-center": e === Dt,
5103
5155
  [a]: t === "small",
5104
5156
  [n]: t === "medium",
5105
5157
  [i]: t === "large"
5106
5158
  });
5107
- case ct:
5159
+ case dt:
5108
5160
  return y({
5109
5161
  [a]: t === "small" && (r || s),
5110
5162
  [n]: t === "medium" && (r || s),
5111
5163
  [i]: t === "large" && (r || s)
5112
5164
  });
5113
5165
  }
5114
- }, Li = ({
5166
+ }, Vi = ({
5115
5167
  mode: e,
5116
5168
  noBackground: t,
5117
5169
  truncate: r,
@@ -5147,7 +5199,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5147
5199
  return y("not-prose text-copy-lighter", {
5148
5200
  truncate: r
5149
5201
  });
5150
- }, Ui = ({
5202
+ }, Qi = ({
5151
5203
  mode: e,
5152
5204
  noBackground: t,
5153
5205
  variant: r
@@ -5177,13 +5229,13 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5177
5229
  if (r === "selected")
5178
5230
  return "bg-action-selected-dark";
5179
5231
  }
5180
- }, Fi = ({
5232
+ }, Ji = ({
5181
5233
  radius: e
5182
5234
  }) => y({
5183
5235
  "rounded-full": e === "large",
5184
5236
  "rounded-md": e === "medium",
5185
5237
  "rounded-xs": e === "small"
5186
- }), Hi = ({
5238
+ }), Yi = ({
5187
5239
  mode: e,
5188
5240
  disabled: t,
5189
5241
  variant: r
@@ -5221,7 +5273,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5221
5273
  });
5222
5274
  if (r === "selected")
5223
5275
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
5224
- }, Ki = ({
5276
+ }, zi = ({
5225
5277
  mode: e,
5226
5278
  disabled: t,
5227
5279
  variant: r
@@ -5259,7 +5311,7 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5259
5311
  });
5260
5312
  if (r === "selected")
5261
5313
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
5262
- }, Gi = ({
5314
+ }, Xi = ({
5263
5315
  mode: e,
5264
5316
  noBorder: t,
5265
5317
  variant: r
@@ -5289,14 +5341,14 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5289
5341
  });
5290
5342
  if (r === "selected")
5291
5343
  return "border border-border-selected-dark";
5292
- }, Bi = ({
5344
+ }, Zi = ({
5293
5345
  focusMode: e
5294
5346
  }) => y("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
5295
5347
  "focus:outline-focus-dark": e === "dark",
5296
5348
  "focus:outline-focus-light": e === "light",
5297
5349
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
5298
5350
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
5299
- }), Wi = ({
5351
+ }), eo = ({
5300
5352
  mode: e,
5301
5353
  raw: t,
5302
5354
  iconClassName: r,
@@ -5323,11 +5375,11 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5323
5375
  } : s === "selected" && (a = {
5324
5376
  "text-copy-lighter": !0
5325
5377
  }), y(a, r);
5326
- }, qi = ({
5378
+ }, to = ({
5327
5379
  animated: e
5328
5380
  }) => y({
5329
5381
  "transition-opacity duration-300 ease-in-out": e
5330
- }), gs = ({
5382
+ }), Os = ({
5331
5383
  type: e,
5332
5384
  className: t,
5333
5385
  raw: r,
@@ -5345,17 +5397,17 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5345
5397
  align: p,
5346
5398
  radius: g,
5347
5399
  animated: b
5348
- }) => (l || (l = "primary"), r ? y(Er, t) : y(
5349
- Er,
5350
- Li({
5400
+ }) => (l || (l = "primary"), r ? y(vr, t) : y(
5401
+ vr,
5402
+ Vi({
5351
5403
  mode: s,
5352
5404
  variant: l,
5353
5405
  noBackground: u,
5354
5406
  truncate: m
5355
5407
  }),
5356
- Ui({ mode: s, noBackground: u, variant: l }),
5357
- Fi({ radius: g }),
5358
- Di({
5408
+ Qi({ mode: s, noBackground: u, variant: l }),
5409
+ Ji({ radius: g }),
5410
+ qi({
5359
5411
  type: e,
5360
5412
  size: o,
5361
5413
  labelRight: f,
@@ -5363,36 +5415,36 @@ const Ii = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5363
5415
  align: p,
5364
5416
  animated: b
5365
5417
  }),
5366
- Mi({ type: e, size: o, labelRight: f, labelLeft: d }),
5367
- Gi({ mode: s, variant: l, noBorder: c }),
5368
- Bi({ focusMode: a }),
5369
- Hi({ mode: s, variant: l, disabled: n }),
5370
- Ki({ mode: s, variant: l, disabled: n }),
5418
+ ji({ type: e, size: o, labelRight: f, labelLeft: d }),
5419
+ Xi({ mode: s, variant: l, noBorder: c }),
5420
+ Zi({ focusMode: a }),
5421
+ Yi({ mode: s, variant: l, disabled: n }),
5422
+ zi({ mode: s, variant: l, disabled: n }),
5371
5423
  {
5372
5424
  "w-full": i,
5373
5425
  "disabled:cursor-not-allowed disabled:opacity-50": n
5374
5426
  },
5375
5427
  y({
5376
- "transition-[width] duration-300 ease-in": e === ct && b
5428
+ "transition-[width] duration-300 ease-in": e === dt && b
5377
5429
  }),
5378
5430
  t
5379
- )), ji = (e, t, r) => {
5431
+ )), ro = (e, t, r) => {
5380
5432
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
5381
- }, qt = ie.forwardRef((e, t) => {
5433
+ }, Qt = ie.forwardRef((e, t) => {
5382
5434
  const { onClick: r, noInternalClick: s = !1, ...a } = e;
5383
5435
  return /* @__PURE__ */ h(
5384
5436
  "button",
5385
5437
  {
5386
5438
  ref: t,
5387
5439
  onClick: (n) => {
5388
- ji(n, s, r);
5440
+ ro(n, s, r);
5389
5441
  },
5390
5442
  ...a
5391
5443
  }
5392
5444
  );
5393
5445
  });
5394
- qt.displayName = "BaseButton";
5395
- const bs = ie.forwardRef(
5446
+ Qt.displayName = "BaseButton";
5447
+ const ks = ie.forwardRef(
5396
5448
  ({
5397
5449
  children: e,
5398
5450
  disabled: t = !1,
@@ -5408,8 +5460,8 @@ const bs = ie.forwardRef(
5408
5460
  radius: u = "large",
5409
5461
  ...l
5410
5462
  }, m) => {
5411
- const p = gs({
5412
- type: Wt,
5463
+ const p = Os({
5464
+ type: Vt,
5413
5465
  mode: r,
5414
5466
  focusMode: s,
5415
5467
  fullWidth: a,
@@ -5423,7 +5475,7 @@ const bs = ie.forwardRef(
5423
5475
  radius: u
5424
5476
  });
5425
5477
  return /* @__PURE__ */ h(
5426
- qt,
5478
+ Qt,
5427
5479
  {
5428
5480
  ref: m,
5429
5481
  className: p,
@@ -5434,22 +5486,22 @@ const bs = ie.forwardRef(
5434
5486
  );
5435
5487
  }
5436
5488
  );
5437
- bs.displayName = "Button";
5438
- function Vi() {
5489
+ ks.displayName = "Button";
5490
+ function so() {
5439
5491
  const e = j(!1);
5440
5492
  return W(() => (e.current = !0, () => {
5441
5493
  e.current = !1;
5442
5494
  }), []), Y(() => e.current, []);
5443
5495
  }
5444
- function Es(e) {
5445
- return Qe(() => e.every((t) => t == null) ? () => {
5496
+ function Ns(e) {
5497
+ return Je(() => e.every((t) => t == null) ? () => {
5446
5498
  } : (t) => {
5447
5499
  e.forEach((r) => {
5448
5500
  typeof r == "function" ? r(t) : r != null && (r.current = t);
5449
5501
  });
5450
5502
  }, [...e]);
5451
5503
  }
5452
- const Qi = {
5504
+ const ao = {
5453
5505
  x: 0,
5454
5506
  y: 0,
5455
5507
  width: 0,
@@ -5459,8 +5511,8 @@ const Qi = {
5459
5511
  bottom: 0,
5460
5512
  right: 0
5461
5513
  };
5462
- function je(e) {
5463
- const t = Vi(), r = j(0), s = j(null), [a, n] = ne(Qi), i = Qe(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
5514
+ function Ve(e) {
5515
+ const t = so(), r = j(0), s = j(null), [a, n] = ne(ao), i = Je(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
5464
5516
  const c = o[0];
5465
5517
  c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
5466
5518
  s.current && t() && n(c.contentRect);
@@ -5470,8 +5522,8 @@ function je(e) {
5470
5522
  i?.disconnect(), r.current && cancelAnimationFrame(r.current);
5471
5523
  }), [i, e]), [s, a];
5472
5524
  }
5473
- function ws(e) {
5474
- const t = Rs();
5525
+ function Ps(e) {
5526
+ const t = Fs();
5475
5527
  if (!e)
5476
5528
  return t;
5477
5529
  if (typeof e == "number" || typeof e == "string")
@@ -5481,21 +5533,21 @@ function ws(e) {
5481
5533
  return typeof r == "number" || typeof r == "string" ? `${s}${r}` : `${s}${t}`;
5482
5534
  }
5483
5535
  }
5484
- const Be = {
5536
+ const We = {
5485
5537
  small: 24,
5486
5538
  // w-6
5487
5539
  medium: 32,
5488
5540
  // w-8
5489
5541
  large: 48
5490
5542
  // w-12
5491
- }, Ji = {
5543
+ }, no = {
5492
5544
  small: 16,
5493
5545
  // px-2 x 2
5494
5546
  medium: 24,
5495
5547
  // px-3 x 2
5496
5548
  large: 32
5497
5549
  // px-4 x 2
5498
- }, Yi = 2, zi = 300, rt = ie.forwardRef(
5550
+ }, io = 2, oo = 300, st = ie.forwardRef(
5499
5551
  ({
5500
5552
  children: e,
5501
5553
  disabled: t = !1,
@@ -5519,8 +5571,8 @@ const Be = {
5519
5571
  animated: A = !1,
5520
5572
  ...K
5521
5573
  }, R) => {
5522
- const J = gs({
5523
- type: ct,
5574
+ const J = Os({
5575
+ type: dt,
5524
5576
  mode: r,
5525
5577
  focusMode: s,
5526
5578
  fullWidth: a,
@@ -5536,15 +5588,15 @@ const Be = {
5536
5588
  radius: b,
5537
5589
  variant: E,
5538
5590
  animated: A
5539
- }), 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]);
5540
- return Je(() => {
5541
- ce && ce.current && A && (w.current = Ee.width + Ji[u] + (c ? 0 : Yi), T.current && !T.current.style.width && (T.current.style.width = `${Be[u]}px`));
5542
- }, [Ee, ce, u, c, A]), Je(() => {
5591
+ }), C = eo({ mode: r, raw: o, iconClassName: O, variant: E }), v = to({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] = Ve(), [N, V] = Ve(), [ce, Ee] = Ve(), w = j(0), T = j(null), S = j(null), le = Ns([R, T]);
5592
+ return Ye(() => {
5593
+ ce && ce.current && A && (w.current = Ee.width + no[u] + (c ? 0 : io), T.current && !T.current.style.width && (T.current.style.width = `${We[u]}px`));
5594
+ }, [Ee, ce, u, c, A]), Ye(() => {
5543
5595
  if (T && T.current && A) {
5544
- let ue = Be[u];
5545
- 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(() => {
5596
+ let ue = We[u];
5597
+ 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 > We[u] && (S.current = setTimeout(() => {
5546
5598
  _.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), S.current = null;
5547
- }, zi * 0.8))), ue === Be[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5599
+ }, oo * 0.8))), ue === We[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5548
5600
  }
5549
5601
  }, [
5550
5602
  I,
@@ -5558,7 +5610,7 @@ const Be = {
5558
5610
  ]), W(() => () => {
5559
5611
  S.current && clearTimeout(S.current);
5560
5612
  }, []), /* @__PURE__ */ h(
5561
- qt,
5613
+ Qt,
5562
5614
  {
5563
5615
  ref: le,
5564
5616
  className: J,
@@ -5568,7 +5620,7 @@ const Be = {
5568
5620
  ...K,
5569
5621
  children: /* @__PURE__ */ q("div", { className: x, children: [
5570
5622
  /* @__PURE__ */ h(
5571
- wr,
5623
+ Tr,
5572
5624
  {
5573
5625
  label: m,
5574
5626
  labelRef: N,
@@ -5579,7 +5631,7 @@ const Be = {
5579
5631
  ),
5580
5632
  /* @__PURE__ */ h("span", { ref: ce, className: C, children: e }),
5581
5633
  /* @__PURE__ */ h(
5582
- wr,
5634
+ Tr,
5583
5635
  {
5584
5636
  label: l,
5585
5637
  labelRef: _,
@@ -5592,7 +5644,7 @@ const Be = {
5592
5644
  }
5593
5645
  );
5594
5646
  }
5595
- ), wr = ({
5647
+ ), Tr = ({
5596
5648
  labelRef: e,
5597
5649
  labelClass: t,
5598
5650
  label: r,
@@ -5607,7 +5659,7 @@ const Be = {
5607
5659
  children: r && /* @__PURE__ */ h("span", { className: s, children: r })
5608
5660
  }
5609
5661
  );
5610
- rt.displayName = "ButtonIcon";
5662
+ st.displayName = "ButtonIcon";
5611
5663
  /*!
5612
5664
  @versini/ui-button v8.0.1
5613
5665
  © 2025 gizmette.com
@@ -5621,7 +5673,7 @@ try {
5621
5673
  });
5622
5674
  } catch {
5623
5675
  }
5624
- const Xi = ie.forwardRef(
5676
+ const co = ie.forwardRef(
5625
5677
  ({
5626
5678
  children: e,
5627
5679
  mode: t = "system",
@@ -5647,7 +5699,7 @@ const Xi = ie.forwardRef(
5647
5699
  }
5648
5700
  ) : "";
5649
5701
  return /* @__PURE__ */ h("div", { className: i, children: /* @__PURE__ */ h(
5650
- rt,
5702
+ st,
5651
5703
  {
5652
5704
  className: r,
5653
5705
  ref: n,
@@ -5661,8 +5713,8 @@ const Xi = ie.forwardRef(
5661
5713
  ) });
5662
5714
  }
5663
5715
  );
5664
- Xi.displayName = "ButtonSort";
5665
- const Ve = "av-card", Zi = ({
5716
+ co.displayName = "ButtonSort";
5717
+ const Qe = "av-card", lo = ({
5666
5718
  className: e,
5667
5719
  headerClassName: t,
5668
5720
  bodyClassName: r,
@@ -5672,7 +5724,7 @@ const Ve = "av-card", Zi = ({
5672
5724
  noBorder: i
5673
5725
  }) => {
5674
5726
  const o = y(
5675
- Ve,
5727
+ Qe,
5676
5728
  "rounded-md",
5677
5729
  {
5678
5730
  "border-none": i,
@@ -5686,7 +5738,7 @@ const Ve = "av-card", Zi = ({
5686
5738
  "border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": a === "alt-system"
5687
5739
  },
5688
5740
  e
5689
- ), c = t || y(`${Ve}__header mt-0 border-b-2`, {
5741
+ ), c = t || y(`${Qe}__header mt-0 border-b-2`, {
5690
5742
  "text-copy-light border-border-accent": a === "darker",
5691
5743
  "border-border-accent": a === "dark",
5692
5744
  "border-border-medium": a === "light",
@@ -5694,7 +5746,7 @@ const Ve = "av-card", Zi = ({
5694
5746
  "border-border-accent dark:border-border-medium": a === "alt-system",
5695
5747
  "mb-4": !n,
5696
5748
  "mb-2": n
5697
- }), f = y(r), d = s || y(`${Ve}__footer pt-2`);
5749
+ }), f = y(r), d = s || y(`${Qe}__footer pt-2`);
5698
5750
  return {
5699
5751
  wrapper: o,
5700
5752
  header: c,
@@ -5702,7 +5754,7 @@ const Ve = "av-card", Zi = ({
5702
5754
  footer: d
5703
5755
  };
5704
5756
  };
5705
- function eo({
5757
+ function uo({
5706
5758
  id: e,
5707
5759
  content: t,
5708
5760
  userAriaLabelledby: r,
@@ -5710,7 +5762,7 @@ function eo({
5710
5762
  }) {
5711
5763
  return typeof t == "string" ? /* @__PURE__ */ h("h2", { id: e, className: s, children: t }) : r ? /* @__PURE__ */ h("div", { className: s, children: t }) : t ? /* @__PURE__ */ h("div", { className: s, id: e, children: t }) : null;
5712
5764
  }
5713
- const to = ({
5765
+ const ho = ({
5714
5766
  header: e,
5715
5767
  headerClassName: t,
5716
5768
  footer: r,
@@ -5725,7 +5777,7 @@ const to = ({
5725
5777
  ...u
5726
5778
  }) => {
5727
5779
  let l = null, m = null;
5728
- const p = typeof e == "string", g = ws(Ve), b = Zi({
5780
+ const p = typeof e == "string", g = Ps(Qe), b = lo({
5729
5781
  className: n,
5730
5782
  headerClassName: t,
5731
5783
  bodyClassName: i,
@@ -5744,7 +5796,7 @@ const to = ({
5744
5796
  ...u,
5745
5797
  children: [
5746
5798
  /* @__PURE__ */ h(
5747
- eo,
5799
+ uo,
5748
5800
  {
5749
5801
  ...l && { id: l },
5750
5802
  content: e,
@@ -5771,7 +5823,7 @@ try {
5771
5823
  });
5772
5824
  } catch {
5773
5825
  }
5774
- const lt = ({
5826
+ const ht = ({
5775
5827
  children: e,
5776
5828
  fill: t,
5777
5829
  viewBox: r,
@@ -5814,14 +5866,14 @@ try {
5814
5866
  });
5815
5867
  } catch {
5816
5868
  }
5817
- const ro = ({
5869
+ const fo = ({
5818
5870
  className: e,
5819
5871
  viewBox: t,
5820
5872
  title: r,
5821
5873
  monotone: s,
5822
5874
  ...a
5823
5875
  }) => /* @__PURE__ */ h(
5824
- lt,
5876
+ ht,
5825
5877
  {
5826
5878
  defaultViewBox: "0 0 1200 500",
5827
5879
  size: "w-full",
@@ -5831,14 +5883,14 @@ const ro = ({
5831
5883
  ...a,
5832
5884
  children: /* @__PURE__ */ h("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
5833
5885
  }
5834
- ), so = ({
5886
+ ), mo = ({
5835
5887
  className: e,
5836
5888
  viewBox: t,
5837
5889
  title: r,
5838
5890
  monotone: s,
5839
5891
  ...a
5840
5892
  }) => /* @__PURE__ */ q(
5841
- lt,
5893
+ ht,
5842
5894
  {
5843
5895
  defaultViewBox: "0 0 640 512",
5844
5896
  size: "size-5",
@@ -5857,7 +5909,7 @@ const ro = ({
5857
5909
  /* @__PURE__ */ h("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1l-592-464C-1.2 34.7-3.1 19.6 5.1 9.2" })
5858
5910
  ]
5859
5911
  }
5860
- ), ao = ({
5912
+ ), po = ({
5861
5913
  className: e,
5862
5914
  viewBox: t,
5863
5915
  title: r,
@@ -5866,7 +5918,7 @@ const ro = ({
5866
5918
  }) => {
5867
5919
  const n = s ? "1" : "0.4";
5868
5920
  return /* @__PURE__ */ q(
5869
- lt,
5921
+ ht,
5870
5922
  {
5871
5923
  defaultViewBox: "0 0 190 190",
5872
5924
  size: "size-5",
@@ -5893,14 +5945,14 @@ const ro = ({
5893
5945
  ]
5894
5946
  }
5895
5947
  );
5896
- }, no = ({
5948
+ }, yo = ({
5897
5949
  className: e,
5898
5950
  viewBox: t,
5899
5951
  title: r,
5900
5952
  monotone: s,
5901
5953
  ...a
5902
5954
  }) => /* @__PURE__ */ q(
5903
- lt,
5955
+ ht,
5904
5956
  {
5905
5957
  defaultViewBox: "0 0 576 512",
5906
5958
  size: "size-5",
@@ -5933,10 +5985,10 @@ try {
5933
5985
  });
5934
5986
  } catch {
5935
5987
  }
5936
- const io = "av-flexgrid", We = "av-flexgrid-item", st = 0.25, $t = ie.createContext({
5988
+ const go = "av-flexgrid", qe = "av-flexgrid-item", at = 0.25, Mt = ie.createContext({
5937
5989
  columnGap: 0,
5938
5990
  rowGap: 0
5939
- }), oo = ({
5991
+ }), bo = ({
5940
5992
  children: e,
5941
5993
  className: t,
5942
5994
  columnGap: r = 1,
@@ -5959,14 +6011,14 @@ const io = "av-flexgrid", We = "av-flexgrid-item", st = 0.25, $t = ie.createCont
5959
6011
  * by the columnGap and rowGap that will be applied
5960
6012
  * to all FlexgridItems (see context and paddings).
5961
6013
  */
5962
- marginLeft: r * -1 * st + "rem",
5963
- marginTop: s * -1 * st + "rem"
6014
+ marginLeft: r * -1 * at + "rem",
6015
+ marginTop: s * -1 * at + "rem"
5964
6016
  }, u = y(
5965
- io,
6017
+ go,
5966
6018
  "box-border flex flex-wrap"
5967
6019
  ), l = { columnGap: r, rowGap: s };
5968
- return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h($t.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h($t.Provider, { value: l, children: e }) });
5969
- }, St = (e, t) => y({
6020
+ return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Mt.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Mt.Provider, { value: l, children: e }) });
6021
+ }, At = (e, t) => y({
5970
6022
  "basis-1/12": e === 1 && !t,
5971
6023
  "sm:basis-1/12": e === 1 && t === "sm",
5972
6024
  "md:basis-1/12": e === 1 && t === "md",
@@ -6039,25 +6091,25 @@ const io = "av-flexgrid", We = "av-flexgrid-item", st = 0.25, $t = ie.createCont
6039
6091
  "lg:basis-full": e === 12 && t === "lg",
6040
6092
  "xl:basis-full": e === 12 && t === "xl",
6041
6093
  "2xl:basis-full": e === 12 && t === "2xl"
6042
- }), co = ({
6094
+ }), Eo = ({
6043
6095
  className: e,
6044
6096
  span: t
6045
6097
  }) => {
6046
6098
  if (!t)
6047
- return y(e, We, "box-border basis-auto");
6099
+ return y(e, qe, "box-border basis-auto");
6048
6100
  if (typeof t == "number")
6049
- return y(e, We, "box-border max-w-full", {
6050
- [`${St(t)}`]: !0
6101
+ return y(e, qe, "box-border max-w-full", {
6102
+ [`${At(t)}`]: !0
6051
6103
  });
6052
6104
  if (typeof t == "string")
6053
- return y(e, We, "box-border basis-auto", {
6105
+ return y(e, qe, "box-border basis-auto", {
6054
6106
  "max-w-full grow": t === "auto"
6055
6107
  });
6056
6108
  if (typeof t == "object") {
6057
- const r = Object.entries(t).map(([s, a]) => s === "fallback" ? St(a) : St(a, s));
6109
+ const r = Object.entries(t).map(([s, a]) => s === "fallback" ? At(a) : At(a, s));
6058
6110
  return y(
6059
6111
  e,
6060
- We,
6112
+ qe,
6061
6113
  "box-border",
6062
6114
  r
6063
6115
  );
@@ -6068,10 +6120,10 @@ const io = "av-flexgrid", We = "av-flexgrid-item", st = 0.25, $t = ie.createCont
6068
6120
  span: r,
6069
6121
  ...s
6070
6122
  }) => {
6071
- const { columnGap: a, rowGap: n } = at($t), i = {
6072
- paddingLeft: a * st + "rem",
6073
- paddingTop: n * st + "rem"
6074
- }, o = co({
6123
+ const { columnGap: a, rowGap: n } = nt(Mt), i = {
6124
+ paddingLeft: a * at + "rem",
6125
+ paddingTop: n * at + "rem"
6126
+ }, o = Eo({
6075
6127
  className: t,
6076
6128
  span: r
6077
6129
  });
@@ -6090,7 +6142,7 @@ try {
6090
6142
  });
6091
6143
  } catch {
6092
6144
  }
6093
- const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6145
+ const $s = "SET_ANNOUNCEMENT", xs = "CLEAR_ANNOUNCEMENT", wo = {
6094
6146
  alert: null,
6095
6147
  alertdialog: null,
6096
6148
  log: "polite",
@@ -6098,14 +6150,14 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6098
6150
  progressbar: null,
6099
6151
  status: "polite",
6100
6152
  timer: "assertive"
6101
- }, uo = (e, t) => {
6153
+ }, So = (e, t) => {
6102
6154
  switch (t?.type) {
6103
- case Ss:
6155
+ case $s:
6104
6156
  return {
6105
6157
  ...e,
6106
6158
  announcement: t.payload
6107
6159
  };
6108
- case vs:
6160
+ case xs:
6109
6161
  return {
6110
6162
  ...e,
6111
6163
  announcement: null
@@ -6113,14 +6165,14 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6113
6165
  default:
6114
6166
  return e;
6115
6167
  }
6116
- }, ho = ({
6168
+ }, vo = ({
6117
6169
  onAnnouncementClear: e,
6118
6170
  dispatch: t
6119
6171
  }) => {
6120
6172
  t({
6121
- type: vs
6173
+ type: xs
6122
6174
  }), typeof e == "function" && e();
6123
- }, Sr = ({
6175
+ }, Ar = ({
6124
6176
  children: e,
6125
6177
  clearAnnouncementDelay: t,
6126
6178
  clearAnnouncementTimeoutRef: r,
@@ -6128,16 +6180,16 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6128
6180
  dispatch: a
6129
6181
  }) => {
6130
6182
  clearTimeout(r.current), e !== null && a({
6131
- type: Ss,
6183
+ type: $s,
6132
6184
  payload: e
6133
6185
  }), t && (r.current = setTimeout(
6134
- () => ho({
6186
+ () => vo({
6135
6187
  onAnnouncementClear: s,
6136
6188
  dispatch: a
6137
6189
  }),
6138
6190
  t
6139
6191
  ));
6140
- }, fo = ({
6192
+ }, To = ({
6141
6193
  children: e,
6142
6194
  announcementTimeoutRef: t,
6143
6195
  announcementDelay: r,
@@ -6146,13 +6198,13 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6146
6198
  onAnnouncementClear: n,
6147
6199
  dispatch: i
6148
6200
  }) => {
6149
- clearTimeout(t.current), r ? t.current = setTimeout(Sr, r, {
6201
+ clearTimeout(t.current), r ? t.current = setTimeout(Ar, r, {
6150
6202
  children: e,
6151
6203
  clearAnnouncementDelay: s,
6152
6204
  clearAnnouncementTimeoutRef: a,
6153
6205
  onAnnouncementClear: n,
6154
6206
  dispatch: i
6155
- }) : Sr({
6207
+ }) : Ar({
6156
6208
  children: e,
6157
6209
  clearAnnouncementDelay: s,
6158
6210
  clearAnnouncementTimeoutRef: a,
@@ -6160,7 +6212,7 @@ const Ss = "SET_ANNOUNCEMENT", vs = "CLEAR_ANNOUNCEMENT", lo = {
6160
6212
  dispatch: i
6161
6213
  });
6162
6214
  };
6163
- function Ts({
6215
+ function Ds({
6164
6216
  children: e,
6165
6217
  className: t,
6166
6218
  politeness: r,
@@ -6171,12 +6223,12 @@ function Ts({
6171
6223
  visible: o,
6172
6224
  ...c
6173
6225
  }) {
6174
- const f = j(null), d = j(null), [u, l] = Ir(uo, {
6226
+ const f = j(null), d = j(null), [u, l] = Cr(So, {
6175
6227
  announcement: null
6176
6228
  });
6177
6229
  let m = r;
6178
- typeof m > "u" && (m = s ? lo[s] : "assertive"), W(() => {
6179
- fo({
6230
+ typeof m > "u" && (m = s ? wo[s] : "assertive"), W(() => {
6231
+ To({
6180
6232
  announcementTimeoutRef: f,
6181
6233
  announcementDelay: a,
6182
6234
  children: e,
@@ -6218,21 +6270,21 @@ try {
6218
6270
  });
6219
6271
  } catch {
6220
6272
  }
6221
- const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-helper-text", po = ({
6273
+ const Ms = "av-text-input", Ao = "av-text-input-wrapper", It = "av-text-input-helper-text", Io = ({
6222
6274
  mode: e
6223
6275
  }) => y({
6224
6276
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
6225
6277
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
6226
6278
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
6227
6279
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
6228
- }), yo = ({
6280
+ }), _o = ({
6229
6281
  focusMode: e
6230
6282
  }) => y("focus:outline focus:outline-2 focus:outline-offset-2", {
6231
6283
  "focus:outline-focus-dark": e === "dark",
6232
6284
  "focus:outline-focus-light": e === "light",
6233
6285
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
6234
6286
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
6235
- }), go = ({
6287
+ }), Ro = ({
6236
6288
  noBorder: e,
6237
6289
  error: t
6238
6290
  }) => y("border-2", {
@@ -6240,7 +6292,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6240
6292
  "focus:border-border-dark": !e && t,
6241
6293
  "border-border-error-dark": !e && t,
6242
6294
  "border-transparent": e
6243
- }), bo = ({
6295
+ }), Co = ({
6244
6296
  disabled: e,
6245
6297
  raw: t,
6246
6298
  error: r,
@@ -6264,7 +6316,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6264
6316
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": s === "system",
6265
6317
  "text-copy-lighter dark:text-copy-error-dark": s === "alt-system"
6266
6318
  });
6267
- }, Eo = ({
6319
+ }, Oo = ({
6268
6320
  error: e,
6269
6321
  raw: t,
6270
6322
  mode: r,
@@ -6274,24 +6326,24 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6274
6326
  return "";
6275
6327
  if (s)
6276
6328
  return y(
6277
- vt,
6329
+ It,
6278
6330
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
6279
6331
  );
6280
6332
  if (!e)
6281
- return y(vt, "absolute px-2 font-medium", {
6333
+ return y(It, "absolute px-2 font-medium", {
6282
6334
  "text-copy-lighter": r === "dark",
6283
6335
  "text-copy-dark": r === "light",
6284
6336
  "text-copy-dark dark:text-copy-lighter": r === "system",
6285
6337
  "text-copy-lighter dark:text-copy-dark": r === "alt-system"
6286
6338
  });
6287
6339
  if (e)
6288
- return y(vt, "absolute px-2 font-medium", {
6340
+ return y(It, "absolute px-2 font-medium", {
6289
6341
  "text-copy-error-light bg-surface-darker": r === "dark",
6290
6342
  "text-copy-error-dark": r === "light",
6291
6343
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
6292
6344
  "dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
6293
6345
  });
6294
- }, wo = ({
6346
+ }, ko = ({
6295
6347
  className: e,
6296
6348
  inputClassName: t,
6297
6349
  raw: r,
@@ -6305,7 +6357,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6305
6357
  }) => {
6306
6358
  const d = r ? e : y(
6307
6359
  "relative flex w-full flex-col justify-center",
6308
- mo,
6360
+ Ao,
6309
6361
  e
6310
6362
  );
6311
6363
  let u = "";
@@ -6327,22 +6379,22 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6327
6379
  break;
6328
6380
  }
6329
6381
  const l = r ? y(t) : y(
6330
- As,
6382
+ Ms,
6331
6383
  u,
6332
6384
  "rounded-md text-base px-4",
6333
- po({ mode: i }),
6334
- yo({ focusMode: o }),
6335
- go({ noBorder: a, error: n }),
6385
+ Io({ mode: i }),
6386
+ _o({ focusMode: o }),
6387
+ Ro({ noBorder: a, error: n }),
6336
6388
  {
6337
6389
  "disabled:cursor-not-allowed disabled:opacity-50": s
6338
6390
  },
6339
6391
  t
6340
- ), m = r ? void 0 : "sr-only", p = bo({
6392
+ ), m = r ? void 0 : "sr-only", p = Co({
6341
6393
  disabled: s,
6342
6394
  raw: r,
6343
6395
  error: n,
6344
6396
  mode: i
6345
- }), g = Eo({
6397
+ }), g = Oo({
6346
6398
  error: n,
6347
6399
  raw: r,
6348
6400
  mode: i,
@@ -6356,7 +6408,7 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6356
6408
  helperText: g,
6357
6409
  rightElement: b
6358
6410
  };
6359
- }, jt = ie.forwardRef(
6411
+ }, Jt = ie.forwardRef(
6360
6412
  ({
6361
6413
  id: e,
6362
6414
  name: t,
@@ -6378,13 +6430,13 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6378
6430
  size: E = "md",
6379
6431
  ...O
6380
6432
  }, A) => {
6381
- const [K, R] = je(), [J, C] = ne(0), v = ws({ id: e, prefix: `${As}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
6433
+ const [K, R] = Ve(), [J, C] = ne(0), v = Ps({ id: e, prefix: `${Ms}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
6382
6434
  xs: { label: "-25px", helperText: "30px" },
6383
6435
  sm: { label: "-29px", helperText: "34px" },
6384
6436
  md: { label: "-33px", helperText: "38px" },
6385
6437
  lg: { label: "-15px", helperText: "22px" },
6386
6438
  xl: { label: "-19px", helperText: "25px" }
6387
- }, V = wo({
6439
+ }, V = ko({
6388
6440
  className: n,
6389
6441
  inputClassName: i,
6390
6442
  error: s,
@@ -6396,9 +6448,9 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6396
6448
  size: E,
6397
6449
  rightElementClassName: b
6398
6450
  });
6399
- return Je(() => {
6451
+ return Ye(() => {
6400
6452
  R && R.width && C(R.width + 18 + 10);
6401
- }, [R]), Je(() => {
6453
+ }, [R]), Ye(() => {
6402
6454
  const { label: ce, helperText: Ee } = N[E];
6403
6455
  _?.current?.style.setProperty("--av-text-input-label", ce), I?.current?.style.setProperty(
6404
6456
  "--av-text-input-helper-text",
@@ -6457,12 +6509,12 @@ const As = "av-text-input", mo = "av-text-input-wrapper", vt = "av-text-input-he
6457
6509
  children: g
6458
6510
  }
6459
6511
  ),
6460
- s && p && /* @__PURE__ */ h(Ts, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
6512
+ s && p && /* @__PURE__ */ h(Ds, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
6461
6513
  ] });
6462
6514
  }
6463
6515
  );
6464
- jt.displayName = "TextInput";
6465
- const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6516
+ Jt.displayName = "TextInput";
6517
+ const No = 500, Po = 5e3, $o = 2e4, Ls = ie.forwardRef(
6466
6518
  ({
6467
6519
  name: e,
6468
6520
  disabled: t,
@@ -6479,19 +6531,19 @@ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6479
6531
  const [l, m] = ne(!0), [p, g] = ne({
6480
6532
  message: null,
6481
6533
  politeness: null
6482
- }), b = j(!0), E = j(null), O = j(null), A = Es([u, O]), K = l ? "Show" : "Hide", R = () => {
6534
+ }), b = j(!0), E = j(null), O = j(null), A = Ns([u, O]), K = l ? "Show" : "Hide", R = () => {
6483
6535
  E.current && clearTimeout(E.current), b.current || (E.current = setTimeout(() => {
6484
6536
  b.current = !0, m(!0), g({
6485
- announcementTimeout: vo,
6537
+ announcementTimeout: Po,
6486
6538
  politeness: "polite",
6487
6539
  message: `${r} hiding characters`
6488
6540
  }), a && a(!0);
6489
- }, To));
6541
+ }, $o));
6490
6542
  }, J = (I) => {
6491
6543
  I.preventDefault();
6492
6544
  const N = !b.current;
6493
6545
  b.current = N, R(), m(N), g({
6494
- announcementTimeout: So,
6546
+ announcementTimeout: No,
6495
6547
  politeness: "assertive",
6496
6548
  message: N ? "Characters hidden" : "Characters showing"
6497
6549
  }), a && a(N);
@@ -6507,9 +6559,9 @@ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6507
6559
  };
6508
6560
  return W(() => () => {
6509
6561
  E.current && clearTimeout(E.current);
6510
- }, []), /* @__PURE__ */ q(Ar, { children: [
6562
+ }, []), /* @__PURE__ */ q(Rr, { children: [
6511
6563
  /* @__PURE__ */ h(
6512
- jt,
6564
+ Jt,
6513
6565
  {
6514
6566
  ref: A,
6515
6567
  name: e,
@@ -6531,7 +6583,7 @@ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6531
6583
  }
6532
6584
  ),
6533
6585
  /* @__PURE__ */ h(
6534
- Ts,
6586
+ Ds,
6535
6587
  {
6536
6588
  role: "status",
6537
6589
  politeness: p.politeness,
@@ -6542,7 +6594,7 @@ const So = 500, vo = 5e3, To = 2e4, Is = ie.forwardRef(
6542
6594
  ] });
6543
6595
  }
6544
6596
  );
6545
- Is.displayName = "TextInputMask";
6597
+ Ls.displayName = "TextInputMask";
6546
6598
  /*!
6547
6599
  @versini/ui-textinput v5.0.1
6548
6600
  © 2025 gizmette.com
@@ -6556,9 +6608,9 @@ try {
6556
6608
  });
6557
6609
  } catch {
6558
6610
  }
6559
- const Ao = "ASK! ME! ANYTHING!", Io = "Log in with a password", _o = "Log in with a Passkey", Hc = "Log out", Ro = "Password", Kc = "Usage", Gc = "Profile", Bc = "Settings", Wc = "Chat history", qc = "About", Vt = "Type your message here.", jc = Vt, Vc = `${Vt}
6560
- Press Enter to send it or Shift+Enter for new line.`, Qc = `${Vt}
6561
- Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "Review important details.", Yc = [
6611
+ const xo = "ASK! ME! ANYTHING!", Do = "Log in with a password", Mo = "Log in with a Passkey", Zc = "Log out", Lo = "Password", el = "Usage", tl = "Profile", rl = "Settings", sl = "Chat history", al = "About", Yt = "Type your message here.", nl = Yt, il = `${Yt}
6612
+ Press Enter to send it or Shift+Enter for new line.`, ol = `${Yt}
6613
+ Press Ctrl+Enter to send it or Enter for new line.`, cl = "{{clipboard}}", P = "Review important details.", ll = [
6562
6614
  `Sometimes, ${k} just makes stuff up. ${P}`,
6563
6615
  `${k} may invent facts on the fly. ${P}`,
6564
6616
  `${k} may be confidently wrong. ${P}`,
@@ -6579,25 +6631,32 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6579
6631
  `Sometimes, ${k} howls at the moon. ${P}`,
6580
6632
  `${k} may dig up imaginary bones. ${P}`,
6581
6633
  `${k} may sniff out nonsense. ${P}`
6582
- ], 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 = {
6634
+ ], ul = "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.", dl = "Default provider set to", hl = "Chat successfully deleted!", fl = "Chat successfully saved!", ml = "Caching enabled. Assets are now stored locally.", pl = "Caching disabled. Local asset cache cleared.", yl = "av-sassy", gl = {
6583
6635
  0: ["January", "February", "March"],
6584
6636
  3: ["April", "May", "June"],
6585
6637
  6: ["July", "August", "September"],
6586
6638
  9: ["October", "November", "December"]
6587
- }, nl = {
6639
+ }, bl = {
6588
6640
  0: ["Jan", "Feb", "Mar"],
6589
6641
  3: ["Apr", "May", "Jun"],
6590
6642
  6: ["Jul", "Aug", "Sep"],
6591
6643
  9: ["Oct", "Nov", "Dec"]
6592
- }, il = {
6644
+ }, El = {
6593
6645
  PREFERENCES: {
6594
6646
  TITLE: "User profile",
6595
- NAME: "Name",
6647
+ USERNAME: "Username",
6596
6648
  EMAIL: "Email",
6597
6649
  PASSKEY_TITLE: "Passkey",
6598
6650
  PASSKEY_INSTRUCTIONS: "Log in password-free with a passkey (facial recognition or fingerprint authentication).",
6599
6651
  PASSKEY_BUTTON: "Create a Passkey"
6600
6652
  },
6653
+ PLANS: {
6654
+ TITLE: "Plans",
6655
+ DESCRIPTION: "Pick the plan that best fits how you work with the assistant.",
6656
+ ACTIVE_BADGE: "Current plan",
6657
+ SWITCH_SUCCESS: "Plan updated to",
6658
+ SWITCH_ERROR: "We couldn't update your plan right now. Please try again in a moment."
6659
+ },
6601
6660
  MAIN_STATISTICS: {
6602
6661
  TITLE: "Lifetime statistics",
6603
6662
  TOTAL: "Total chat session",
@@ -6630,7 +6689,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6630
6689
  SEND_ON_ENTER: "The following option allows you to choose whether you want to send a message when you press Enter or if you want to use Ctrl+Enter (Cmd+Enter on Mac). If you choose to send a message on Enter, you will need use Shift+Enter to insert a new line.",
6631
6690
  USE_MEMORY: "The following option allows you to choose whether you want to enable memory for your chats. When enabled, Diggidy will remember your previous interactions and use them to provide more relevant responses."
6632
6691
  }
6633
- }, Co = ({
6692
+ }, Uo = ({
6634
6693
  className: e,
6635
6694
  isCapabilitiesSuccess: t,
6636
6695
  capabilities: r
@@ -6642,7 +6701,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6642
6701
  "flex items-center justify-center text-slate-300"
6643
6702
  ),
6644
6703
  children: [
6645
- /* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(ro, {}) }),
6704
+ /* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(fo, {}) }),
6646
6705
  /* @__PURE__ */ q("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
6647
6706
  /* @__PURE__ */ h("h1", { children: k }),
6648
6707
  /* @__PURE__ */ h(
@@ -6651,14 +6710,14 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6651
6710
  className: y({
6652
6711
  "text-red-500": t && r?.runningMode === "development"
6653
6712
  }),
6654
- children: Ao
6713
+ children: xo
6655
6714
  }
6656
6715
  )
6657
6716
  ] })
6658
6717
  ]
6659
6718
  }
6660
- ), Oo = () => {
6661
- const { login: e, logoutReason: t, loginWithPasskey: r } = as(), [s, a] = ne(""), [n, i] = ne(""), [o, c] = ne(!0), [f, d] = ne({
6719
+ ), Fo = () => {
6720
+ const { login: e, logoutReason: t, loginWithPasskey: r } = os(), [s, a] = ne(""), [n, i] = ne(""), [o, c] = ne(!0), [f, d] = ne({
6662
6721
  username: "",
6663
6722
  password: ""
6664
6723
  }), u = async (l) => {
@@ -6670,20 +6729,20 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6670
6729
  }, 500);
6671
6730
  }), W(() => {
6672
6731
  t && i(t);
6673
- }, [t]), /* @__PURE__ */ q("main", { className: fs({ extraClass: "mt-5" }), children: [
6732
+ }, [t]), /* @__PURE__ */ q("main", { className: Is({ extraClass: "mt-5" }), children: [
6674
6733
  /* @__PURE__ */ h(
6675
6734
  "div",
6676
6735
  {
6677
- className: hs({
6736
+ className: As({
6678
6737
  extraClass: "rounded-md pb-10"
6679
6738
  }),
6680
- children: /* @__PURE__ */ h(Co, {})
6739
+ children: /* @__PURE__ */ h(Uo, {})
6681
6740
  }
6682
6741
  ),
6683
- /* @__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: [
6742
+ /* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(bo, { alignHorizontal: "center", children: /* @__PURE__ */ h(he, { span: 6, children: /* @__PURE__ */ q(ho, { mode: "dark", children: [
6684
6743
  /* @__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 }) }),
6685
6744
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6686
- jt,
6745
+ Jt,
6687
6746
  {
6688
6747
  className: "mt-7",
6689
6748
  required: !0,
@@ -6704,7 +6763,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6704
6763
  }
6705
6764
  ) }),
6706
6765
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6707
- Is,
6766
+ Ls,
6708
6767
  {
6709
6768
  className: "mt-7",
6710
6769
  required: !0,
@@ -6714,14 +6773,14 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6714
6773
  mode: "dark",
6715
6774
  focusMode: "light",
6716
6775
  name: "password",
6717
- label: Ro,
6776
+ label: Lo,
6718
6777
  rightElement: /* @__PURE__ */ h(
6719
- rt,
6778
+ st,
6720
6779
  {
6721
6780
  focusMode: "light",
6722
6781
  mode: "dark",
6723
6782
  label: o ? "Show" : "Hide",
6724
- children: o ? /* @__PURE__ */ h(no, {}) : /* @__PURE__ */ h(so, {})
6783
+ children: o ? /* @__PURE__ */ h(yo, {}) : /* @__PURE__ */ h(mo, {})
6725
6784
  }
6726
6785
  ),
6727
6786
  onMaskChange: c,
@@ -6736,7 +6795,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6736
6795
  }
6737
6796
  ) }),
6738
6797
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6739
- bs,
6798
+ ks,
6740
6799
  {
6741
6800
  mode: "dark",
6742
6801
  focusMode: "light",
@@ -6744,62 +6803,62 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6744
6803
  noBorder: !0,
6745
6804
  type: "submit",
6746
6805
  className: "mt-7",
6747
- children: Io
6806
+ children: Do
6748
6807
  }
6749
6808
  ) }),
6750
- !ms() && /* @__PURE__ */ q(Ar, { children: [
6809
+ !_s() && /* @__PURE__ */ q(Rr, { children: [
6751
6810
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
6752
6811
  /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6753
- rt,
6812
+ st,
6754
6813
  {
6755
6814
  variant: "selected",
6756
6815
  mode: "dark",
6757
6816
  focusMode: "light",
6758
6817
  fullWidth: !0,
6759
6818
  className: "mb-4",
6760
- labelRight: _o,
6819
+ labelRight: Mo,
6761
6820
  onClick: r,
6762
- children: /* @__PURE__ */ h(ao, { size: "size-7" })
6821
+ children: /* @__PURE__ */ h(po, { size: "size-7" })
6763
6822
  }
6764
6823
  ) })
6765
6824
  ] })
6766
6825
  ] }) }) }) })
6767
6826
  ] });
6768
- }, ko = new URL(document.location.href).searchParams, vr = !!ko.get("debug") || !1, No = Os(() => import(
6827
+ }, Ho = new URL(document.location.href).searchParams, Ir = !!Ho.get("debug") || !1, Ko = Ks(() => import(
6769
6828
  /* webpackChunkName: "LazyApp" */
6770
- "./App.cuOjKevV.js"
6771
- ).then((e) => e.App)), Po = new Xs(), Tr = ({
6829
+ "./App.BUHkBnAs.js"
6830
+ ).then((e) => e.App)), Go = new ua(), _r = ({
6772
6831
  isComponent: e,
6773
6832
  headerHeight: t
6774
6833
  }) => {
6775
- const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } = as();
6776
- return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(Cs, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(Zs, { client: Po, children: /* @__PURE__ */ h(
6777
- li,
6834
+ const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } = os();
6835
+ return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(Hs, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(da, { client: Go, children: /* @__PURE__ */ h(
6836
+ Ei,
6778
6837
  {
6779
6838
  user: a?.username,
6780
6839
  getAccessToken: n,
6781
- children: /* @__PURE__ */ h(No, { isComponent: e, headerHeight: t })
6840
+ children: /* @__PURE__ */ h(Ko, { isComponent: e, headerHeight: t })
6782
6841
  }
6783
- ) }) }) : /* @__PURE__ */ h(Oo, {});
6784
- }, $o = ({
6842
+ ) }) }) : /* @__PURE__ */ h(Fo, {});
6843
+ }, Bo = ({
6785
6844
  isComponent: e = !1,
6786
6845
  headerHeight: t = 0,
6787
- domain: r = ds
6846
+ domain: r = Ts
6788
6847
  }) => (W(() => {
6789
- e || os().catch((s) => {
6848
+ e || us().catch((s) => {
6790
6849
  console.error("[SW] Failed to register service worker:", s);
6791
6850
  });
6792
- }, [e]), Gt ? /* @__PURE__ */ h(
6793
- pr,
6851
+ }, [e]), qt ? /* @__PURE__ */ h(
6852
+ br,
6794
6853
  {
6795
- clientId: yr,
6854
+ clientId: Er,
6796
6855
  domain: r,
6797
- debug: vr,
6856
+ debug: Ir,
6798
6857
  endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
6799
- children: /* @__PURE__ */ h(Tr, { isComponent: e, headerHeight: t })
6858
+ children: /* @__PURE__ */ h(_r, { isComponent: e, headerHeight: t })
6800
6859
  }
6801
- ) : /* @__PURE__ */ h(pr, { clientId: yr, domain: r, debug: vr, children: /* @__PURE__ */ h(Tr, { isComponent: e, headerHeight: t }) })), ol = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
6802
- $o,
6860
+ ) : /* @__PURE__ */ h(br, { clientId: Er, domain: r, debug: Ir, children: /* @__PURE__ */ h(_r, { isComponent: e, headerHeight: t }) })), wl = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
6861
+ Bo,
6803
6862
  {
6804
6863
  isComponent: !0,
6805
6864
  domain: e,
@@ -6807,116 +6866,119 @@ Press Ctrl+Enter to send it or Enter for new line.`, Jc = "{{clipboard}}", P = "
6807
6866
  }
6808
6867
  );
6809
6868
  export {
6810
- qc as ABOUT_TITLE,
6811
- Jo as ACTION_RESET_PROMPT,
6812
- jo as ACTION_SEARCH,
6813
- Vo as ACTION_SORT,
6814
- Qo as ACTION_TOGGLE_PROMPT,
6815
- sl as APP_CLASSNAME,
6816
- bs as C,
6817
- il as CARDS,
6818
- Jc as CLIPBOARD_PROMPT,
6819
- lc as DEFAULT_ICON_ACTION_SIZE,
6820
- Vn as E,
6821
- qo as ERROR_MESSAGE,
6822
- Yc as FOOTER_DISCLAIMERS,
6823
- Wc as HISTORY_TITLE,
6824
- lt as I,
6825
- ic as INFINITE_SCROLL_LIMIT,
6826
- nc as INFINITE_SCROLL_THRESHOLD,
6827
- mc as INPUT_BOTTOM_OFFSET,
6828
- gc as INPUT_BOTTOM_OFFSET_EXTRA,
6829
- yc as INPUT_BOTTOM_OFFSET_IPAD,
6830
- pc as INPUT_BOTTOM_OFFSET_IPHONE,
6831
- Qc as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
6832
- Vc as INPUT_PLACEHOLDER_TEXT_ENTER,
6833
- jc as INPUT_PLACEHOLDER_TEXT_MOBILE,
6834
- oo as L,
6835
- rc as LOCAL_STORAGE_FAVORITES_ONLY,
6836
- ns as LOCAL_STORAGE_PREFIX,
6837
- sc as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
6838
- ac as LOCAL_STORAGE_REASONING_DISCLOSURE,
6839
- Yo as LOCAL_STORAGE_SEARCH,
6840
- zo as LOCAL_STORAGE_SORT,
6841
- tc as LOCAL_STORAGE_SORT_MEMORY_COLUMN,
6842
- ec as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
6843
- Xo as LOCAL_STORAGE_SORT_TIMESTAMP,
6844
- Zo as LOCAL_STORAGE_SORT_TOKEN_USAGE,
6845
- Hc as LOG_OUT,
6846
- Co as Logo,
6847
- _c as Oe,
6848
- Gc as PROFILE_TITLE,
6849
- zc as PROMPTS_DESCRIPTION,
6850
- oc as PROMPT_CLASSNAME,
6851
- cc as PROMPT_EDITABLE_AREA_CLASSNAME,
6852
- to as S,
6853
- te as SERVICE_TYPES,
6854
- Bc as SETTINGS_TITLE,
6855
- ol as SassySaint,
6856
- rl as TOAST_CACHE_DISABLED,
6857
- tl as TOAST_CACHE_ENABLED,
6858
- Zc as TOAST_CHAT_DELETED,
6859
- el as TOAST_CHAT_SAVED,
6860
- Xc as TOAST_PROVIDER_CHANGED,
6861
- al as TRIMESTERS,
6862
- nl as TRIMESTERS_SHORT,
6863
- dc as UI_BUTTON_SCROLL_BUFFER,
6864
- hc as UI_DEFAULT_MAIN_HEIGHT,
6865
- fc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
6866
- uc as UI_FOOTER_BUFFER,
6867
- Kc as USAGE_TITLE,
6868
- jt as Y,
6869
- wc as a,
6870
- Xi as b,
6871
- Sc as c,
6872
- $i as convertCamelCaseToReadable,
6873
- Ac as de,
6874
- Oi as debounce,
6875
- Cc as fe,
6876
- Ec as getCacheInfo,
6877
- wi as getCurrentGeoLocation,
6878
- fs as getLayoutPaddingClass,
6879
- hs as getMessageContaintWrapperClass,
6880
- je as h,
6881
- bc as handleServiceWorkerToggle,
6882
- ws as i,
6883
- cs as i$1,
6884
- Pi as isPWAMode,
6885
- ps as isProbablyMobile,
6886
- Ni as isProbablyiPad,
6887
- ki as isProbablyiPhone,
6888
- Nt as isServiceWorkerEnabled,
6889
- ms as isTauri,
6869
+ al as ABOUT_TITLE,
6870
+ nc as ACTION_RESET_PROMPT,
6871
+ rc as ACTION_SEARCH,
6872
+ sc as ACTION_SORT,
6873
+ ac as ACTION_TOGGLE_PROMPT,
6874
+ yl as APP_CLASSNAME,
6875
+ Dc as Ae,
6876
+ ks as C,
6877
+ El as CARDS,
6878
+ cl as CLIPBOARD_PROMPT,
6879
+ Ec as DEFAULT_ICON_ACTION_SIZE,
6880
+ tc as ERROR_MESSAGE,
6881
+ xc as Ee,
6882
+ ll as FOOTER_DISCLAIMERS,
6883
+ sl as HISTORY_TITLE,
6884
+ ht as I,
6885
+ yc as INFINITE_SCROLL_LIMIT,
6886
+ pc as INFINITE_SCROLL_THRESHOLD,
6887
+ Ac as INPUT_BOTTOM_OFFSET,
6888
+ Rc as INPUT_BOTTOM_OFFSET_EXTRA,
6889
+ _c as INPUT_BOTTOM_OFFSET_IPAD,
6890
+ Ic as INPUT_BOTTOM_OFFSET_IPHONE,
6891
+ ol as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
6892
+ il as INPUT_PLACEHOLDER_TEXT_ENTER,
6893
+ nl as INPUT_PLACEHOLDER_TEXT_MOBILE,
6894
+ bo as L,
6895
+ hc as LOCAL_STORAGE_FAVORITES_ONLY,
6896
+ cs as LOCAL_STORAGE_PREFIX,
6897
+ fc as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
6898
+ mc as LOCAL_STORAGE_REASONING_DISCLOSURE,
6899
+ ic as LOCAL_STORAGE_SEARCH,
6900
+ oc as LOCAL_STORAGE_SORT,
6901
+ dc as LOCAL_STORAGE_SORT_MEMORY_COLUMN,
6902
+ uc as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
6903
+ cc as LOCAL_STORAGE_SORT_TIMESTAMP,
6904
+ lc as LOCAL_STORAGE_SORT_TOKEN_USAGE,
6905
+ Zc as LOG_OUT,
6906
+ Uo as Logo,
6907
+ Lc as Oe,
6908
+ tl as PROFILE_TITLE,
6909
+ ul as PROMPTS_DESCRIPTION,
6910
+ gc as PROMPT_CLASSNAME,
6911
+ bc as PROMPT_EDITABLE_AREA_CLASSNAME,
6912
+ ho as S,
6913
+ z as SERVICE_TYPES,
6914
+ rl as SETTINGS_TITLE,
6915
+ wl as SassySaint,
6916
+ Hc as Se,
6917
+ pl as TOAST_CACHE_DISABLED,
6918
+ ml as TOAST_CACHE_ENABLED,
6919
+ hl as TOAST_CHAT_DELETED,
6920
+ fl as TOAST_CHAT_SAVED,
6921
+ dl as TOAST_PROVIDER_CHANGED,
6922
+ gl as TRIMESTERS,
6923
+ bl as TRIMESTERS_SHORT,
6924
+ Sc as UI_BUTTON_SCROLL_BUFFER,
6925
+ vc as UI_DEFAULT_MAIN_HEIGHT,
6926
+ Tc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
6927
+ wc as UI_FOOTER_BUFFER,
6928
+ el as USAGE_TITLE,
6929
+ Jt as Y,
6930
+ k as _e,
6931
+ kc as a,
6932
+ co as b,
6933
+ Ue as c,
6934
+ Bi as convertCamelCaseToReadable,
6935
+ ut as d,
6936
+ Fi as debounce,
6937
+ Fc as fe,
6938
+ Oc as getCacheInfo,
6939
+ ki as getCurrentGeoLocation,
6940
+ Is as getLayoutPaddingClass,
6941
+ As as getMessageContaintWrapperClass,
6942
+ Ve as h,
6943
+ Cc as handleServiceWorkerToggle,
6944
+ Ps as i,
6945
+ Nc as i$1,
6946
+ Gi as isPWAMode,
6947
+ Rs as isProbablyMobile,
6948
+ Ki as isProbablyiPad,
6949
+ Hi as isProbablyiPhone,
6950
+ xt as isServiceWorkerEnabled,
6951
+ _s as isTauri,
6890
6952
  Pe as it,
6891
6953
  he as j,
6892
- ao as l,
6893
- Rc as le,
6894
- oi as mutateCall,
6895
- as as n,
6896
- _i as numberFormatter,
6897
- Es as o,
6898
- Si as obfuscate,
6899
- k as pe,
6900
- Ci as pluralize,
6901
- Tc as re,
6902
- Ti as renderDataAsList,
6903
- ii as serverUrl,
6904
- Oc as setNewProvider,
6905
- rt as te,
6906
- vc as te$1,
6907
- Ic as ue,
6908
- vi as unObfuscate,
6909
- Nc as useChangelogs,
6910
- $c as useChatsHistory,
6911
- xc as useChatsUsage,
6912
- Lc as useDeleteAllMemories,
6913
- Mc as useDeleteMemory,
6914
- Uc as useEntitlements,
6915
- kc as useServerCapabilities,
6916
- Pc as useUserChatStats,
6917
- Dc as useUserMemories,
6918
- ci as useUserPreferences,
6919
- Fc as utilities,
6920
- Ts as x,
6921
- Qn as y
6954
+ po as l,
6955
+ Mc as le,
6956
+ ws as mutateCall,
6957
+ os as n,
6958
+ Mi as numberFormatter,
6959
+ Ns as o,
6960
+ Ni as obfuscate,
6961
+ Uc as pe,
6962
+ Ui as pluralize,
6963
+ Pc as re,
6964
+ $i as renderDataAsList,
6965
+ $c as se,
6966
+ gi as serverUrl,
6967
+ Kc as setNewProvider,
6968
+ Gc as setUserPlan,
6969
+ st as te,
6970
+ Pi as unObfuscate,
6971
+ Wc as useChangelogs,
6972
+ jc as useChatsHistory,
6973
+ Vc as useChatsUsage,
6974
+ Yc as useDeleteAllMemories,
6975
+ Jc as useDeleteMemory,
6976
+ zc as useEntitlements,
6977
+ Bc as useServerCapabilities,
6978
+ qc as useUserChatStats,
6979
+ Qc as useUserMemories,
6980
+ bi as useUserPreferences,
6981
+ Xc as utilities,
6982
+ Ds as x,
6983
+ lt as y
6922
6984
  };