@versini/sassysaint 8.126.0 → 8.126.2

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 (82) hide show
  1. package/dist/chunks/{AboutChangelog.y8yfq4eS.js → AboutChangelog.D56ChuaF.js} +2 -2
  2. package/dist/chunks/{AboutEntry.CLzuzflL.js → AboutEntry.6Ohukyce.js} +8 -8
  3. package/dist/chunks/{App.-eg2aIep.js → App.RjJXTlXi.js} +2909 -2859
  4. package/dist/chunks/{BubbleActions.BC6bPZml.js → BubbleActions.ArpRBWrn.js} +3 -3
  5. package/dist/chunks/{ButtonIconDelete.Zl-ctgi7.js → ButtonIconDelete.UZkEzLnL.js} +4 -4
  6. package/dist/chunks/{Chart.C7v4Yrhp.js → Chart.B-TodQ8O.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.CCq0_B58.js → ChatBubbleAssistant.YVt5x_zD.js} +5 -5
  8. package/dist/chunks/{ChatBubbleUser.C7gtc_kh.js → ChatBubbleUser.C3n8tAuW.js} +4 -4
  9. package/dist/chunks/{GenericPanel.7LMc775H.js → GenericPanel.BuwepMzb.js} +1 -1
  10. package/dist/chunks/{HistoryEntry.Bz7a6Bem.js → HistoryEntry.YP1gdbGW.js} +7 -7
  11. package/dist/chunks/{LoginEntry.DJ-wqr-L.js → LoginEntry.CTsOSsS0.js} +4 -4
  12. package/dist/chunks/{LogoEntry.ByusSkIJ.js → LogoEntry.CHHuA1ST.js} +50 -33
  13. package/dist/chunks/{MemoriesEntry.uaGNQRyj.js → MemoriesEntry.CuFgpEVO.js} +6 -6
  14. package/dist/chunks/{ProfileEntry.CFjS5ztM.js → ProfileEntry.BvbUi-JT.js} +6 -6
  15. package/dist/chunks/{SettingsEntry.DK9QZ6yj.js → SettingsEntry.y0sVHH8W.js} +6 -6
  16. package/dist/chunks/{UsageEntry.BzzbV0A4.js → UsageEntry.D3bJ_vYA.js} +6 -6
  17. package/dist/chunks/{_baseUniq.DhlKnES5.js → _baseUniq.D7unGaJy.js} +1 -1
  18. package/dist/chunks/{arc.Brcc_IEk.js → arc.6PFpO-Vd.js} +1 -1
  19. package/dist/chunks/{architecture-U656AL7Q.DVFE0hfZ.js → architecture-U656AL7Q.CGT5Fxg9.js} +1 -1
  20. package/dist/chunks/{architectureDiagram-VXUJARFQ.BkSp89fJ.js → architectureDiagram-VXUJARFQ.BZh8YMEX.js} +4 -4
  21. package/dist/chunks/{blockDiagram-VD42YOAC.DgYdp655.js → blockDiagram-VD42YOAC.Cb3HENx8.js} +5 -5
  22. package/dist/chunks/{browser.rKkdZBWz.js → browser.Dw6IU2ld.js} +1 -1
  23. package/dist/chunks/{c4Diagram-YG6GDRKO.BkIthKAj.js → c4Diagram-YG6GDRKO.BoT7xuL9.js} +2 -2
  24. package/dist/chunks/{channel.I_BBDI4B.js → channel.BpaCAQu4.js} +1 -1
  25. package/dist/chunks/{chunk-4BX2VUAB.CZ7Tfv3P.js → chunk-4BX2VUAB.PPUD-PrE.js} +1 -1
  26. package/dist/chunks/{chunk-55IACEB6.pDWAxI0Z.js → chunk-55IACEB6.Dsi6SOw6.js} +1 -1
  27. package/dist/chunks/{chunk-B4BG7PRW.Ck9Icqbf.js → chunk-B4BG7PRW.11XmJhhe.js} +4 -4
  28. package/dist/chunks/{chunk-DI55MBZ5.8YRqD3_g.js → chunk-DI55MBZ5.N1BvEW_y.js} +3 -3
  29. package/dist/chunks/{chunk-FMBD7UC4.CyMr_Cq0.js → chunk-FMBD7UC4.CUZ5PVXp.js} +1 -1
  30. package/dist/chunks/{chunk-QN33PNHL.MozVXw7l.js → chunk-QN33PNHL.D5U3nzLB.js} +1 -1
  31. package/dist/chunks/{chunk-QZHKN3VN.8ZHjN_iq.js → chunk-QZHKN3VN.QcMQmdBd.js} +1 -1
  32. package/dist/chunks/{chunk-TZMSLE5B.B_Tdnqcw.js → chunk-TZMSLE5B.CJMcMy90.js} +1 -1
  33. package/dist/chunks/{classDiagram-2ON5EDUG.BvpFy8VU.js → classDiagram-2ON5EDUG.vjfO6woU.js} +2 -2
  34. package/dist/chunks/{classDiagram-v2-WZHVMYZB.BvpFy8VU.js → classDiagram-v2-WZHVMYZB.vjfO6woU.js} +2 -2
  35. package/dist/chunks/{clone.CX-h_mcE.js → clone.B8RlkHnk.js} +1 -1
  36. package/dist/chunks/{cose-bilkent-S5V4N54A.DijTCPsU.js → cose-bilkent-S5V4N54A.CaCgENQe.js} +2 -2
  37. package/dist/chunks/{dagre-6UL2VRFP.ZkBOdsiV.js → dagre-6UL2VRFP.D92iItgK.js} +5 -5
  38. package/dist/chunks/{diagram-PSM6KHXK.qhgEGMkh.js → diagram-PSM6KHXK.CuyfnumO.js} +4 -4
  39. package/dist/chunks/{diagram-QEK2KX5R.CCxEDYzq.js → diagram-QEK2KX5R.BXUY1DJV.js} +3 -3
  40. package/dist/chunks/{diagram-S2PKOQOG.ByybMnvg.js → diagram-S2PKOQOG.Cc--yThj.js} +3 -3
  41. package/dist/chunks/{erDiagram-Q2GNP2WA.Bq0QQAzQ.js → erDiagram-Q2GNP2WA.Vp96XRvR.js} +4 -4
  42. package/dist/chunks/{flowDiagram-NV44I4VS.C5jeV11l.js → flowDiagram-NV44I4VS.C7oHByqy.js} +5 -5
  43. package/dist/chunks/{ganttDiagram-JELNMOA3.CX3m_XBd.js → ganttDiagram-JELNMOA3.Cd-A0VtQ.js} +2 -2
  44. package/dist/chunks/{gitGraph-F6HP7TQM.DyP7zKA-.js → gitGraph-F6HP7TQM.DOP-M6_r.js} +1 -1
  45. package/dist/chunks/{gitGraphDiagram-NY62KEGX.Dqs6kEPo.js → gitGraphDiagram-NY62KEGX.hKT6SE7Y.js} +4 -4
  46. package/dist/chunks/{graph.BmSU3EQ3.js → graph.B0GUo_u-.js} +2 -2
  47. package/dist/chunks/{index.9qGP0oyh.js → index.B0SyyHwi.js} +1 -1
  48. package/dist/chunks/{index.BS9UqT8G.js → index.B14qkz92.js} +1 -1
  49. package/dist/chunks/{index.kUAkaVxN.js → index.BTIbPzfS.js} +3 -3
  50. package/dist/chunks/{index.KoZIit7c.js → index.C-R_qXjm.js} +568 -568
  51. package/dist/chunks/{index.wNocmUkc.js → index.CQ90sBnI.js} +1 -1
  52. package/dist/chunks/{index.Bg-ureJQ.js → index.D2aSQ1EG.js} +1 -1
  53. package/dist/chunks/{index.DI6YPuXQ.js → index.Ddypjd5j.js} +1 -1
  54. package/dist/chunks/{index.DR8JSq3p.js → index.EVsPQv7M.js} +3 -3
  55. package/dist/chunks/{index.D_hdJ3yp.js → index.gDWl0NtX.js} +1 -1
  56. package/dist/chunks/{index.ByXLoznH.js → index.nr6HJGpu.js} +1 -1
  57. package/dist/chunks/{info-NVLQJR56.DSYjsQhb.js → info-NVLQJR56.DLnLR_8s.js} +1 -1
  58. package/dist/chunks/{infoDiagram-WHAUD3N6.B_QWKiGD.js → infoDiagram-WHAUD3N6.CE58aTHo.js} +2 -2
  59. package/dist/chunks/{journeyDiagram-XKPGCS4Q.D13NM_jI.js → journeyDiagram-XKPGCS4Q.BnnuRFo1.js} +4 -4
  60. package/dist/chunks/{kanban-definition-3W4ZIXB7.BW2fJXMb.js → kanban-definition-3W4ZIXB7.pQy2g9Bc.js} +2 -2
  61. package/dist/chunks/{layout.DXFZfI_v.js → layout.BSQ2jZ2T.js} +4 -4
  62. package/dist/chunks/{mermaid-parser.core.oWEsV7Vh.js → mermaid-parser.core.D5ETrv2H.js} +10 -10
  63. package/dist/chunks/{min.ZBTOF0du.js → min.B38MyMdf.js} +2 -2
  64. package/dist/chunks/{mindmap-definition-VGOIOE7T.ClyuQGjj.js → mindmap-definition-VGOIOE7T.BdOTDoEN.js} +3 -3
  65. package/dist/chunks/{packet-BFZMPI3H.B8xdKVKJ.js → packet-BFZMPI3H.iwqNO1NX.js} +1 -1
  66. package/dist/chunks/{pie-7BOR55EZ.DGxeR5Vn.js → pie-7BOR55EZ.C1-hIik5.js} +1 -1
  67. package/dist/chunks/{pieDiagram-ADFJNKIX.LXBSnOeX.js → pieDiagram-ADFJNKIX.CbrY9wx_.js} +4 -4
  68. package/dist/chunks/{quadrantDiagram-AYHSOK5B.sUnuK7as.js → quadrantDiagram-AYHSOK5B.rnHXfwbt.js} +1 -1
  69. package/dist/chunks/{radar-NHE76QYJ.CLksGj06.js → radar-NHE76QYJ.BiTUtO-M.js} +1 -1
  70. package/dist/chunks/{rehype-mermaid.hijL8KJp.js → rehype-mermaid.z4QHODPF.js} +33 -33
  71. package/dist/chunks/{requirementDiagram-UZGBJVZJ.j3hFwP4f.js → requirementDiagram-UZGBJVZJ.CB8qYLc-.js} +3 -3
  72. package/dist/chunks/{sankeyDiagram-TZEHDZUN.CHWynfNM.js → sankeyDiagram-TZEHDZUN.CJFCw1d3.js} +1 -1
  73. package/dist/chunks/{sequenceDiagram-WL72ISMW.BerTw6Wd.js → sequenceDiagram-WL72ISMW.B0KMNaC6.js} +3 -3
  74. package/dist/chunks/{stateDiagram-FKZM4ZOC.DM9qYL-8.js → stateDiagram-FKZM4ZOC.CkNUc5yi.js} +4 -4
  75. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.BlSmrHnJ.js → stateDiagram-v2-4FDKWEC3.Deysgp1N.js} +2 -2
  76. package/dist/chunks/{timeline-definition-IT6M3QCI.CN63yk_o.js → timeline-definition-IT6M3QCI.COyWnoMV.js} +2 -2
  77. package/dist/chunks/{treemap-KMMF4GRG.DrHkuc0q.js → treemap-KMMF4GRG.D45hvm9j.js} +1 -1
  78. package/dist/chunks/{useMarkdown.CabEGOKb.js → useMarkdown.D0jxj27T.js} +8 -8
  79. package/dist/chunks/{xychartDiagram-PRI3JC2R.C6yY1ILk.js → xychartDiagram-PRI3JC2R.Cyx9CJql.js} +1 -1
  80. package/dist/components/SassySaint/SassySaint.js +1 -1
  81. package/dist/index.js +3 -3
  82. package/package.json +3 -3
@@ -1,17 +1,17 @@
1
1
  import { jsx as S, jsxs as Ws } from "react/jsx-runtime";
2
- import * as D from "react";
3
- import Js, { createContext as ut, useReducer as Vs, useCallback as Q, useRef as Ys, useEffect as me, useSyncExternalStore as zs, useContext as lt, useState as Xs, useMemo as Tt, Suspense as At, lazy as zt } from "react";
4
- import ke from "clsx";
2
+ import * as k from "react";
3
+ import Js, { createContext as ht, useReducer as Vs, useCallback as Q, useRef as Ys, useEffect as Ee, useSyncExternalStore as zs, useContext as dt, useState as Xs, useMemo as Rt, Suspense as vt, lazy as Zt } from "react";
4
+ import Ne from "clsx";
5
5
  var g, T = ((g = {})[g.NewChat = 0] = "NewChat", g[g.Prompts = 1] = "Prompts", g[g.Attachment = 2] = "Attachment", g[g.PrivateChat = 3] = "PrivateChat", g[g.Reasoning = 4] = "Reasoning", g[g.Send = 5] = "Send", g[g.Header = 6] = "Header", g[g.Provider = 7] = "Provider", g[g.Logo = 8] = "Logo", g[g.Placeholder = 9] = "Placeholder", g[g.Footer = 10] = "Footer", g);
6
- let qa = "user", Ba = "assistant", Ge = "OpenAI", ht = "Anthropic", dt = "Google", Zs = "Perplexity", ja = Ge, er = [Ge, ht, dt], Xt = "gpt-5.2", Zt = "gpt-5-mini", es = "gpt-5-nano", ts = "gpt-4.1-nano", ss = "claude-haiku-4-5", rs = "claude-sonnet-4-5", ns = "gemini-3-flash-preview", as = "gemini-3-pro-preview", is = "sonar", os = "sonar-pro", tr = "gemini-3-pro-image-preview", Qa = { [Xt]: "GPT-5.2", [Zt]: "GPT-5 Mini", [es]: "GPT-5 Nano", [ts]: "GPT-4.1 Nano", [ss]: "Claude Haiku 4.5", [rs]: "Claude Sonnet 4.5", [ns]: "Gemini 3 Flash", [as]: "Gemini 3 Pro", [is]: "Sonar", [os]: "Sonar Pro", [tr]: "Nano Banana Pro" }, cs = { [Ge]: [ts, Xt, Zt, es], [ht]: [ss, rs], [dt]: [ns, as], [Zs]: [is, os] }, Wa = "x-diggidy-chat-id", Ja = "timestamp", Va = "tokenUsage", Ya = "Diggidy", za = { TOOL: { MEMORIES: "getUserMemories" }, ADDON: { ATTACHMENTS: "addon:attachments", REASONING: "addon:reasoning", SHARE_CHAT: "addon:share-chat" } }, Xa = (e) => {
6
+ let qa = "user", Ba = "assistant", Be = "OpenAI", ft = "Anthropic", pt = "Google", Zs = "Perplexity", ja = Be, er = [Be, ft, pt], es = "gpt-5.2", ts = "gpt-5-mini", ss = "gpt-5-nano", rs = "gpt-4.1-nano", ns = "claude-haiku-4-5", as = "claude-sonnet-4-5", is = "gemini-3-flash-preview", os = "gemini-3-pro-preview", cs = "sonar", us = "sonar-pro", tr = "gemini-3-pro-image-preview", Qa = { [es]: "GPT-5.2", [ts]: "GPT-5 Mini", [ss]: "GPT-5 Nano", [rs]: "GPT-4.1 Nano", [ns]: "Claude Haiku 4.5", [as]: "Claude Sonnet 4.5", [is]: "Gemini 3 Flash", [os]: "Gemini 3 Pro", [cs]: "Sonar", [us]: "Sonar Pro", [tr]: "Nano Banana Pro" }, ls = { [Be]: [rs, es, ts, ss], [ft]: [ns, as], [pt]: [is, os], [Zs]: [cs, us] }, Wa = "x-diggidy-chat-id", Ja = "timestamp", Va = "tokenUsage", Ya = "Diggidy", za = { TOOL: { MEMORIES: "getUserMemories" }, ADDON: { ATTACHMENTS: "addon:attachments", REASONING: "addon:reasoning", SHARE_CHAT: "addon:share-chat" } }, Xa = (e) => {
7
7
  if (!e || e.length === 0) return [];
8
8
  let t = /* @__PURE__ */ new Set();
9
- for (let s of e) for (let [r, n] of Object.entries(cs)) n.includes(s) && (r === Ge || r === ht || r === dt) && t.add(r);
9
+ for (let s of e) for (let [r, n] of Object.entries(ls)) n.includes(s) && (r === Be || r === ft || r === pt) && t.add(r);
10
10
  return er.filter((s) => t.has(s));
11
11
  }, sr = (e) => {
12
12
  let t = /* @__PURE__ */ new Map();
13
13
  if (!e || e.length === 0) return t;
14
- for (let s of e) for (let [r, n] of Object.entries(cs)) if (n.includes(s)) {
14
+ for (let s of e) for (let [r, n] of Object.entries(ls)) if (n.includes(s)) {
15
15
  t.has(r) || t.set(r, []), t.get(r)?.push(s);
16
16
  break;
17
17
  }
@@ -48,7 +48,7 @@ const nr = {
48
48
  [T.Placeholder]: "placeholder:text-copy-medium dark:placeholder:text-copy-medium/70",
49
49
  [T.Footer]: "text-copy-dark dark:text-copy-medium"
50
50
  };
51
- var Se = class {
51
+ var we = class {
52
52
  constructor() {
53
53
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
54
54
  }
@@ -106,29 +106,29 @@ var Se = class {
106
106
  clearInterval(e) {
107
107
  this.#e.clearInterval(e);
108
108
  }
109
- }, se = new or();
109
+ }, te = new or();
110
110
  function cr(e) {
111
111
  setTimeout(e, 0);
112
112
  }
113
- var re = typeof window > "u" || "Deno" in globalThis;
114
- function U() {
113
+ var se = typeof window > "u" || "Deno" in globalThis;
114
+ function N() {
115
115
  }
116
116
  function ur(e, t) {
117
117
  return typeof e == "function" ? e(t) : e;
118
118
  }
119
- function tt(e) {
119
+ function rt(e) {
120
120
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
121
121
  }
122
- function us(e, t) {
122
+ function hs(e, t) {
123
123
  return Math.max(e + (t || 0) - Date.now(), 0);
124
124
  }
125
- function te(e, t) {
125
+ function ee(e, t) {
126
126
  return typeof e == "function" ? e(t) : e;
127
127
  }
128
128
  function F(e, t) {
129
129
  return typeof e == "function" ? e(t) : e;
130
130
  }
131
- function Rt(e, t) {
131
+ function bt(e, t) {
132
132
  const {
133
133
  type: s = "all",
134
134
  exact: r,
@@ -139,9 +139,9 @@ function Rt(e, t) {
139
139
  } = e;
140
140
  if (i) {
141
141
  if (r) {
142
- if (t.queryHash !== ft(i, t.options))
142
+ if (t.queryHash !== yt(i, t.options))
143
143
  return !1;
144
- } else if (!ve(t.queryKey, i))
144
+ } else if (!be(t.queryKey, i))
145
145
  return !1;
146
146
  }
147
147
  if (s !== "all") {
@@ -151,38 +151,38 @@ function Rt(e, t) {
151
151
  }
152
152
  return !(typeof o == "boolean" && t.isStale() !== o || n && n !== t.state.fetchStatus || a && !a(t));
153
153
  }
154
- function vt(e, t) {
154
+ function It(e, t) {
155
155
  const { exact: s, status: r, predicate: n, mutationKey: a } = e;
156
156
  if (a) {
157
157
  if (!t.options.mutationKey)
158
158
  return !1;
159
159
  if (s) {
160
- if (ne(t.options.mutationKey) !== ne(a))
160
+ if (re(t.options.mutationKey) !== re(a))
161
161
  return !1;
162
- } else if (!ve(t.options.mutationKey, a))
162
+ } else if (!be(t.options.mutationKey, a))
163
163
  return !1;
164
164
  }
165
165
  return !(r && t.state.status !== r || n && !n(t));
166
166
  }
167
- function ft(e, t) {
168
- return (t?.queryKeyHashFn || ne)(e);
167
+ function yt(e, t) {
168
+ return (t?.queryKeyHashFn || re)(e);
169
169
  }
170
- function ne(e) {
170
+ function re(e) {
171
171
  return JSON.stringify(
172
172
  e,
173
- (t, s) => rt(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
173
+ (t, s) => at(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
174
174
  );
175
175
  }
176
- function ve(e, t) {
177
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => ve(e[s], t[s])) : !1;
176
+ function be(e, t) {
177
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => be(e[s], t[s])) : !1;
178
178
  }
179
179
  var lr = Object.prototype.hasOwnProperty;
180
- function st(e, t, s = 0) {
180
+ function nt(e, t, s = 0) {
181
181
  if (e === t)
182
182
  return e;
183
183
  if (s > 500) return t;
184
- const r = bt(e) && bt(t);
185
- if (!r && !(rt(e) && rt(t))) return t;
184
+ const r = _t(e) && _t(t);
185
+ if (!r && !(at(e) && at(t))) return t;
186
186
  const a = (r ? e : Object.keys(e)).length, i = r ? t : Object.keys(t), o = i.length, c = r ? new Array(o) : {};
187
187
  let d = 0;
188
188
  for (let u = 0; u < o; u++) {
@@ -195,12 +195,12 @@ function st(e, t, s = 0) {
195
195
  c[h] = p;
196
196
  continue;
197
197
  }
198
- const f = st(l, p, s + 1);
198
+ const f = nt(l, p, s + 1);
199
199
  c[h] = f, f === l && d++;
200
200
  }
201
201
  return a === o && d === a ? e : c;
202
202
  }
203
- function De(e, t) {
203
+ function Ue(e, t) {
204
204
  if (!t || Object.keys(e).length !== Object.keys(t).length)
205
205
  return !1;
206
206
  for (const s in e)
@@ -208,39 +208,39 @@ function De(e, t) {
208
208
  return !1;
209
209
  return !0;
210
210
  }
211
- function bt(e) {
211
+ function _t(e) {
212
212
  return Array.isArray(e) && e.length === Object.keys(e).length;
213
213
  }
214
- function rt(e) {
215
- if (!It(e))
214
+ function at(e) {
215
+ if (!Ot(e))
216
216
  return !1;
217
217
  const t = e.constructor;
218
218
  if (t === void 0)
219
219
  return !0;
220
220
  const s = t.prototype;
221
- return !(!It(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
221
+ return !(!Ot(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
222
222
  }
223
- function It(e) {
223
+ function Ot(e) {
224
224
  return Object.prototype.toString.call(e) === "[object Object]";
225
225
  }
226
226
  function hr(e) {
227
227
  return new Promise((t) => {
228
- se.setTimeout(t, e);
228
+ te.setTimeout(t, e);
229
229
  });
230
230
  }
231
- function nt(e, t, s) {
231
+ function it(e, t, s) {
232
232
  if (typeof s.structuralSharing == "function")
233
233
  return s.structuralSharing(e, t);
234
234
  if (s.structuralSharing !== !1) {
235
235
  if (process.env.NODE_ENV !== "production")
236
236
  try {
237
- return st(e, t);
237
+ return nt(e, t);
238
238
  } catch (r) {
239
239
  throw console.error(
240
240
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
241
241
  ), r;
242
242
  }
243
- return st(e, t);
243
+ return nt(e, t);
244
244
  }
245
245
  return t;
246
246
  }
@@ -252,13 +252,13 @@ function fr(e, t, s = 0) {
252
252
  const r = [t, ...e];
253
253
  return s && r.length > s ? r.slice(0, -1) : r;
254
254
  }
255
- var Ne = /* @__PURE__ */ Symbol();
256
- function ls(e, t) {
257
- return process.env.NODE_ENV !== "production" && e.queryFn === Ne && console.error(
255
+ var Le = /* @__PURE__ */ Symbol();
256
+ function ds(e, t) {
257
+ return process.env.NODE_ENV !== "production" && e.queryFn === Le && console.error(
258
258
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
259
- ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === Ne ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
259
+ ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === Le ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
260
260
  }
261
- function pt(e, t) {
261
+ function mt(e, t) {
262
262
  return typeof e == "function" ? e(...t) : !!e;
263
263
  }
264
264
  function pr(e, t, s) {
@@ -268,13 +268,13 @@ function pr(e, t, s) {
268
268
  get: () => (n ??= t(), r || (r = !0, n.aborted ? s() : n.addEventListener("abort", s, { once: !0 })), n)
269
269
  }), e;
270
270
  }
271
- var yr = class extends Se {
271
+ var yr = class extends we {
272
272
  #e;
273
273
  #t;
274
274
  #s;
275
275
  constructor() {
276
276
  super(), this.#s = (e) => {
277
- if (!re && window.addEventListener) {
277
+ if (!se && window.addEventListener) {
278
278
  const t = () => e();
279
279
  return window.addEventListener("visibilitychange", t, !1), () => {
280
280
  window.removeEventListener("visibilitychange", t);
@@ -305,8 +305,8 @@ var yr = class extends Se {
305
305
  isFocused() {
306
306
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
307
307
  }
308
- }, yt = new yr();
309
- function at() {
308
+ }, Et = new yr();
309
+ function ot() {
310
310
  let e, t;
311
311
  const s = new Promise((n, a) => {
312
312
  e = n, t = a;
@@ -388,13 +388,13 @@ function Er() {
388
388
  }
389
389
  };
390
390
  }
391
- var A = Er(), gr = class extends Se {
391
+ var A = Er(), gr = class extends we {
392
392
  #e = !0;
393
393
  #t;
394
394
  #s;
395
395
  constructor() {
396
396
  super(), this.#s = (e) => {
397
- if (!re && window.addEventListener) {
397
+ if (!se && window.addEventListener) {
398
398
  const t = () => e(!0), s = () => e(!1);
399
399
  return window.addEventListener("online", t, !1), window.addEventListener("offline", s, !1), () => {
400
400
  window.removeEventListener("online", t), window.removeEventListener("offline", s);
@@ -419,30 +419,30 @@ var A = Er(), gr = class extends Se {
419
419
  isOnline() {
420
420
  return this.#e;
421
421
  }
422
- }, Ue = new gr();
422
+ }, He = new gr();
423
423
  function Sr(e) {
424
424
  return Math.min(1e3 * 2 ** e, 3e4);
425
425
  }
426
- function hs(e) {
427
- return (e ?? "online") === "online" ? Ue.isOnline() : !0;
426
+ function fs(e) {
427
+ return (e ?? "online") === "online" ? He.isOnline() : !0;
428
428
  }
429
- var it = class extends Error {
429
+ var ct = class extends Error {
430
430
  constructor(e) {
431
431
  super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
432
432
  }
433
433
  };
434
- function ds(e) {
434
+ function ps(e) {
435
435
  let t = !1, s = 0, r;
436
- const n = at(), a = () => n.status !== "pending", i = (y) => {
436
+ const n = ot(), a = () => n.status !== "pending", i = (y) => {
437
437
  if (!a()) {
438
- const _ = new it(y);
438
+ const _ = new ct(y);
439
439
  l(_), e.onCancel?.(_);
440
440
  }
441
441
  }, o = () => {
442
442
  t = !0;
443
443
  }, c = () => {
444
444
  t = !1;
445
- }, d = () => yt.isFocused() && (e.networkMode === "always" || Ue.isOnline()) && e.canRun(), u = () => hs(e.networkMode) && e.canRun(), h = (y) => {
445
+ }, d = () => Et.isFocused() && (e.networkMode === "always" || He.isOnline()) && e.canRun(), u = () => fs(e.networkMode) && e.canRun(), h = (y) => {
446
446
  a() || (r?.(), n.resolve(y));
447
447
  }, l = (y) => {
448
448
  a() || (r?.(), n.reject(y));
@@ -465,7 +465,7 @@ function ds(e) {
465
465
  Promise.resolve(y).then(h).catch((v) => {
466
466
  if (a())
467
467
  return;
468
- const L = e.retry ?? (re ? 0 : 3), K = e.retryDelay ?? Sr, x = typeof K == "function" ? K(s, v) : K, G = L === !0 || typeof L == "number" && s < L || typeof L == "function" && L(s, v);
468
+ const U = e.retry ?? (se ? 0 : 3), K = e.retryDelay ?? Sr, x = typeof K == "function" ? K(s, v) : K, G = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, v);
469
469
  if (t || !G) {
470
470
  l(v);
471
471
  return;
@@ -486,26 +486,26 @@ function ds(e) {
486
486
  start: () => (u() ? f() : p().then(f), n)
487
487
  };
488
488
  }
489
- var fs = class {
489
+ var ys = class {
490
490
  #e;
491
491
  destroy() {
492
492
  this.clearGcTimeout();
493
493
  }
494
494
  scheduleGc() {
495
- this.clearGcTimeout(), tt(this.gcTime) && (this.#e = se.setTimeout(() => {
495
+ this.clearGcTimeout(), rt(this.gcTime) && (this.#e = te.setTimeout(() => {
496
496
  this.optionalRemove();
497
497
  }, this.gcTime));
498
498
  }
499
499
  updateGcTime(e) {
500
500
  this.gcTime = Math.max(
501
501
  this.gcTime || 0,
502
- e ?? (re ? 1 / 0 : 300 * 1e3)
502
+ e ?? (se ? 1 / 0 : 300 * 1e3)
503
503
  );
504
504
  }
505
505
  clearGcTimeout() {
506
- this.#e && (se.clearTimeout(this.#e), this.#e = void 0);
506
+ this.#e && (te.clearTimeout(this.#e), this.#e = void 0);
507
507
  }
508
- }, wr = class extends fs {
508
+ }, wr = class extends ys {
509
509
  #e;
510
510
  #t;
511
511
  #s;
@@ -514,7 +514,7 @@ var fs = class {
514
514
  #i;
515
515
  #o;
516
516
  constructor(e) {
517
- super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#s = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = Ot(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
517
+ super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#s = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = Pt(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
518
518
  }
519
519
  get meta() {
520
520
  return this.options.meta;
@@ -524,9 +524,9 @@ var fs = class {
524
524
  }
525
525
  setOptions(e) {
526
526
  if (this.options = { ...this.#i, ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
527
- const t = Ot(this.options);
527
+ const t = Pt(this.options);
528
528
  t.data !== void 0 && (this.setState(
529
- _t(t.data, t.dataUpdatedAt)
529
+ Ct(t.data, t.dataUpdatedAt)
530
530
  ), this.#e = t);
531
531
  }
532
532
  }
@@ -534,7 +534,7 @@ var fs = class {
534
534
  !this.observers.length && this.state.fetchStatus === "idle" && this.#s.remove(this);
535
535
  }
536
536
  setData(e, t) {
537
- const s = nt(this.state.data, e, this.options);
537
+ const s = it(this.state.data, e, this.options);
538
538
  return this.#a({
539
539
  data: s,
540
540
  type: "success",
@@ -547,7 +547,7 @@ var fs = class {
547
547
  }
548
548
  cancel(e) {
549
549
  const t = this.#r?.promise;
550
- return this.#r?.cancel(e), t ? t.then(U).catch(U) : Promise.resolve();
550
+ return this.#r?.cancel(e), t ? t.then(N).catch(N) : Promise.resolve();
551
551
  }
552
552
  destroy() {
553
553
  super.destroy(), this.cancel({ silent: !0 });
@@ -561,11 +561,11 @@ var fs = class {
561
561
  );
562
562
  }
563
563
  isDisabled() {
564
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === Ne || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
564
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === Le || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
565
565
  }
566
566
  isStatic() {
567
567
  return this.getObserversCount() > 0 ? this.observers.some(
568
- (e) => te(e.options.staleTime, this) === "static"
568
+ (e) => ee(e.options.staleTime, this) === "static"
569
569
  ) : !1;
570
570
  }
571
571
  isStale() {
@@ -574,7 +574,7 @@ var fs = class {
574
574
  ) : this.state.data === void 0 || this.state.isInvalidated;
575
575
  }
576
576
  isStaleByTime(e = 0) {
577
- return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !us(this.state.dataUpdatedAt, e);
577
+ return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !hs(this.state.dataUpdatedAt, e);
578
578
  }
579
579
  onFocus() {
580
580
  this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
@@ -595,7 +595,7 @@ var fs = class {
595
595
  this.state.isInvalidated || this.#a({ type: "invalidate" });
596
596
  }
597
597
  async fetch(e, t) {
598
- if (this.state.fetchStatus !== "idle" && // If the promise in the retyer is already rejected, we have to definitely
598
+ if (this.state.fetchStatus !== "idle" && // If the promise in the retryer is already rejected, we have to definitely
599
599
  // re-start the fetch; there is a chance that the query is still in a
600
600
  // pending state when that happens
601
601
  this.#r?.status() !== "rejected") {
@@ -617,7 +617,7 @@ var fs = class {
617
617
  get: () => (this.#o = !0, s.signal)
618
618
  });
619
619
  }, n = () => {
620
- const o = ls(this.options, t), d = (() => {
620
+ const o = ds(this.options, t), d = (() => {
621
621
  const u = {
622
622
  client: this.#n,
623
623
  queryKey: this.queryKey,
@@ -641,11 +641,11 @@ var fs = class {
641
641
  };
642
642
  return r(o), o;
643
643
  })();
644
- this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#a({ type: "fetch", meta: i.fetchOptions?.meta }), this.#r = ds({
644
+ this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#a({ type: "fetch", meta: i.fetchOptions?.meta }), this.#r = ps({
645
645
  initialPromise: t?.initialPromise,
646
646
  fn: i.fetchFn,
647
647
  onCancel: (o) => {
648
- o instanceof it && o.revert && this.setState({
648
+ o instanceof ct && o.revert && this.setState({
649
649
  ...this.#t,
650
650
  fetchStatus: "idle"
651
651
  }), s.abort();
@@ -676,7 +676,7 @@ var fs = class {
676
676
  this
677
677
  ), o;
678
678
  } catch (o) {
679
- if (o instanceof it) {
679
+ if (o instanceof ct) {
680
680
  if (o.silent)
681
681
  return this.#r.promise;
682
682
  if (o.revert) {
@@ -722,13 +722,13 @@ var fs = class {
722
722
  case "fetch":
723
723
  return {
724
724
  ...s,
725
- ...ps(s.data, this.options),
725
+ ...ms(s.data, this.options),
726
726
  fetchMeta: e.meta ?? null
727
727
  };
728
728
  case "success":
729
729
  const r = {
730
730
  ...s,
731
- ..._t(e.data, e.dataUpdatedAt),
731
+ ...Ct(e.data, e.dataUpdatedAt),
732
732
  dataUpdateCount: s.dataUpdateCount + 1,
733
733
  ...!e.manual && {
734
734
  fetchStatus: "idle",
@@ -771,18 +771,18 @@ var fs = class {
771
771
  });
772
772
  }
773
773
  };
774
- function ps(e, t) {
774
+ function ms(e, t) {
775
775
  return {
776
776
  fetchFailureCount: 0,
777
777
  fetchFailureReason: null,
778
- fetchStatus: hs(t.networkMode) ? "fetching" : "paused",
778
+ fetchStatus: fs(t.networkMode) ? "fetching" : "paused",
779
779
  ...e === void 0 && {
780
780
  error: null,
781
781
  status: "pending"
782
782
  }
783
783
  };
784
784
  }
785
- function _t(e, t) {
785
+ function Ct(e, t) {
786
786
  return {
787
787
  data: e,
788
788
  dataUpdatedAt: t ?? Date.now(),
@@ -791,7 +791,7 @@ function _t(e, t) {
791
791
  status: "success"
792
792
  };
793
793
  }
794
- function Ot(e) {
794
+ function Pt(e) {
795
795
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
796
796
  return {
797
797
  data: t,
@@ -808,9 +808,9 @@ function Ot(e) {
808
808
  fetchStatus: "idle"
809
809
  };
810
810
  }
811
- var Tr = class extends Se {
811
+ var Tr = class extends we {
812
812
  constructor(e, t) {
813
- super(), this.options = t, this.#e = e, this.#a = null, this.#o = at(), this.bindMethods(), this.setOptions(t);
813
+ super(), this.options = t, this.#e = e, this.#a = null, this.#o = ot(), this.bindMethods(), this.setOptions(t);
814
814
  }
815
815
  #e;
816
816
  #t = void 0;
@@ -833,20 +833,20 @@ var Tr = class extends Se {
833
833
  this.refetch = this.refetch.bind(this);
834
834
  }
835
835
  onSubscribe() {
836
- this.listeners.size === 1 && (this.#t.addObserver(this), Ct(this.#t, this.options) ? this.#h() : this.updateResult(), this.#S());
836
+ this.listeners.size === 1 && (this.#t.addObserver(this), Mt(this.#t, this.options) ? this.#h() : this.updateResult(), this.#S());
837
837
  }
838
838
  onUnsubscribe() {
839
839
  this.hasListeners() || this.destroy();
840
840
  }
841
841
  shouldFetchOnReconnect() {
842
- return ot(
842
+ return ut(
843
843
  this.#t,
844
844
  this.options,
845
845
  this.options.refetchOnReconnect
846
846
  );
847
847
  }
848
848
  shouldFetchOnWindowFocus() {
849
- return ot(
849
+ return ut(
850
850
  this.#t,
851
851
  this.options,
852
852
  this.options.refetchOnWindowFocus
@@ -861,18 +861,18 @@ var Tr = class extends Se {
861
861
  throw new Error(
862
862
  "Expected enabled to be a boolean or a callback that returns a boolean"
863
863
  );
864
- this.#A(), this.#t.setOptions(this.options), t._defaulted && !De(this.options, t) && this.#e.getQueryCache().notify({
864
+ this.#A(), this.#t.setOptions(this.options), t._defaulted && !Ue(this.options, t) && this.#e.getQueryCache().notify({
865
865
  type: "observerOptionsUpdated",
866
866
  query: this.#t,
867
867
  observer: this
868
868
  });
869
869
  const r = this.hasListeners();
870
- r && Pt(
870
+ r && $t(
871
871
  this.#t,
872
872
  s,
873
873
  this.options,
874
874
  t
875
- ) && this.#h(), this.updateResult(), r && (this.#t !== s || F(this.options.enabled, this.#t) !== F(t.enabled, this.#t) || te(this.options.staleTime, this.#t) !== te(t.staleTime, this.#t)) && this.#m();
875
+ ) && this.#h(), this.updateResult(), r && (this.#t !== s || F(this.options.enabled, this.#t) !== F(t.enabled, this.#t) || ee(this.options.staleTime, this.#t) !== ee(t.staleTime, this.#t)) && this.#m();
876
876
  const n = this.#E();
877
877
  r && (this.#t !== s || F(this.options.enabled, this.#t) !== F(t.enabled, this.#t) || n !== this.#c) && this.#g(n);
878
878
  }
@@ -919,18 +919,18 @@ var Tr = class extends Se {
919
919
  this.options,
920
920
  e
921
921
  );
922
- return e?.throwOnError || (t = t.catch(U)), t;
922
+ return e?.throwOnError || (t = t.catch(N)), t;
923
923
  }
924
924
  #m() {
925
925
  this.#w();
926
- const e = te(
926
+ const e = ee(
927
927
  this.options.staleTime,
928
928
  this.#t
929
929
  );
930
- if (re || this.#n.isStale || !tt(e))
930
+ if (se || this.#n.isStale || !rt(e))
931
931
  return;
932
- const s = us(this.#n.dataUpdatedAt, e) + 1;
933
- this.#u = se.setTimeout(() => {
932
+ const s = hs(this.#n.dataUpdatedAt, e) + 1;
933
+ this.#u = te.setTimeout(() => {
934
934
  this.#n.isStale || this.updateResult();
935
935
  }, s);
936
936
  }
@@ -938,27 +938,27 @@ var Tr = class extends Se {
938
938
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
939
939
  }
940
940
  #g(e) {
941
- this.#T(), this.#c = e, !(re || F(this.options.enabled, this.#t) === !1 || !tt(this.#c) || this.#c === 0) && (this.#l = se.setInterval(() => {
942
- (this.options.refetchIntervalInBackground || yt.isFocused()) && this.#h();
941
+ this.#T(), this.#c = e, !(se || F(this.options.enabled, this.#t) === !1 || !rt(this.#c) || this.#c === 0) && (this.#l = te.setInterval(() => {
942
+ (this.options.refetchIntervalInBackground || Et.isFocused()) && this.#h();
943
943
  }, this.#c));
944
944
  }
945
945
  #S() {
946
946
  this.#m(), this.#g(this.#E());
947
947
  }
948
948
  #w() {
949
- this.#u && (se.clearTimeout(this.#u), this.#u = void 0);
949
+ this.#u && (te.clearTimeout(this.#u), this.#u = void 0);
950
950
  }
951
951
  #T() {
952
- this.#l && (se.clearInterval(this.#l), this.#l = void 0);
952
+ this.#l && (te.clearInterval(this.#l), this.#l = void 0);
953
953
  }
954
954
  createResult(e, t) {
955
955
  const s = this.#t, r = this.options, n = this.#n, a = this.#r, i = this.#i, c = e !== s ? e.state : this.#s, { state: d } = e;
956
956
  let u = { ...d }, h = !1, l;
957
957
  if (t._optimisticResults) {
958
- const b = this.hasListeners(), H = !b && Ct(e, t), ee = b && Pt(e, s, t, r);
959
- (H || ee) && (u = {
958
+ const b = this.hasListeners(), H = !b && Mt(e, t), ie = b && $t(e, s, t, r);
959
+ (H || ie) && (u = {
960
960
  ...u,
961
- ...ps(d.data, e.options)
961
+ ...ms(d.data, e.options)
962
962
  }), t._optimisticResults === "isRestoring" && (u.fetchStatus = "idle");
963
963
  }
964
964
  let { error: p, errorUpdatedAt: f, status: y } = u;
@@ -969,7 +969,7 @@ var Tr = class extends Se {
969
969
  n?.isPlaceholderData && t.placeholderData === i?.placeholderData ? (b = n.data, _ = !0) : b = typeof t.placeholderData == "function" ? t.placeholderData(
970
970
  this.#f?.state.data,
971
971
  this.#f
972
- ) : t.placeholderData, b !== void 0 && (y = "success", l = nt(
972
+ ) : t.placeholderData, b !== void 0 && (y = "success", l = it(
973
973
  n?.data,
974
974
  b,
975
975
  t
@@ -980,15 +980,15 @@ var Tr = class extends Se {
980
980
  l = this.#d;
981
981
  else
982
982
  try {
983
- this.#y = t.select, l = t.select(l), l = nt(n?.data, l, t), this.#d = l, this.#a = null;
983
+ this.#y = t.select, l = t.select(l), l = it(n?.data, l, t), this.#d = l, this.#a = null;
984
984
  } catch (b) {
985
985
  this.#a = b;
986
986
  }
987
987
  this.#a && (p = this.#a, l = this.#d, f = Date.now(), y = "error");
988
- const v = u.fetchStatus === "fetching", L = y === "pending", K = y === "error", x = L && v, G = l !== void 0, N = {
988
+ const v = u.fetchStatus === "fetching", U = y === "pending", K = y === "error", x = U && v, G = l !== void 0, L = {
989
989
  status: y,
990
990
  fetchStatus: u.fetchStatus,
991
- isPending: L,
991
+ isPending: U,
992
992
  isSuccess: y === "success",
993
993
  isError: K,
994
994
  isInitialLoading: x,
@@ -1003,40 +1003,40 @@ var Tr = class extends Se {
1003
1003
  isFetched: u.dataUpdateCount > 0 || u.errorUpdateCount > 0,
1004
1004
  isFetchedAfterMount: u.dataUpdateCount > c.dataUpdateCount || u.errorUpdateCount > c.errorUpdateCount,
1005
1005
  isFetching: v,
1006
- isRefetching: v && !L,
1006
+ isRefetching: v && !U,
1007
1007
  isLoadingError: K && !G,
1008
1008
  isPaused: u.fetchStatus === "paused",
1009
1009
  isPlaceholderData: h,
1010
1010
  isRefetchError: K && G,
1011
- isStale: mt(e, t),
1011
+ isStale: gt(e, t),
1012
1012
  refetch: this.refetch,
1013
1013
  promise: this.#o,
1014
1014
  isEnabled: F(t.enabled, e) !== !1
1015
1015
  };
1016
1016
  if (this.options.experimental_prefetchInRender) {
1017
- const b = (oe) => {
1018
- N.status === "error" ? oe.reject(N.error) : N.data !== void 0 && oe.resolve(N.data);
1019
- }, H = () => {
1020
- const oe = this.#o = N.promise = at();
1021
- b(oe);
1022
- }, ee = this.#o;
1023
- switch (ee.status) {
1017
+ const b = L.data !== void 0, H = L.status === "error" && !b, ie = (ce) => {
1018
+ H ? ce.reject(L.error) : b && ce.resolve(L.data);
1019
+ }, Ce = () => {
1020
+ const ce = this.#o = L.promise = ot();
1021
+ ie(ce);
1022
+ }, oe = this.#o;
1023
+ switch (oe.status) {
1024
1024
  case "pending":
1025
- e.queryHash === s.queryHash && b(ee);
1025
+ e.queryHash === s.queryHash && ie(oe);
1026
1026
  break;
1027
1027
  case "fulfilled":
1028
- (N.status === "error" || N.data !== ee.value) && H();
1028
+ (H || L.data !== oe.value) && Ce();
1029
1029
  break;
1030
1030
  case "rejected":
1031
- (N.status !== "error" || N.error !== ee.reason) && H();
1031
+ (!H || L.error !== oe.reason) && Ce();
1032
1032
  break;
1033
1033
  }
1034
1034
  }
1035
- return N;
1035
+ return L;
1036
1036
  }
1037
1037
  updateResult() {
1038
1038
  const e = this.#n, t = this.createResult(this.#t, this.options);
1039
- if (this.#r = this.#t.state, this.#i = this.options, this.#r.data !== void 0 && (this.#f = this.#t), De(t, e))
1039
+ if (this.#r = this.#t.state, this.#i = this.options, this.#r.data !== void 0 && (this.#f = this.#t), Ue(t, e))
1040
1040
  return;
1041
1041
  this.#n = t;
1042
1042
  const s = () => {
@@ -1079,26 +1079,26 @@ var Tr = class extends Se {
1079
1079
  function Ar(e, t) {
1080
1080
  return F(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1081
1081
  }
1082
- function Ct(e, t) {
1083
- return Ar(e, t) || e.state.data !== void 0 && ot(e, t, t.refetchOnMount);
1082
+ function Mt(e, t) {
1083
+ return Ar(e, t) || e.state.data !== void 0 && ut(e, t, t.refetchOnMount);
1084
1084
  }
1085
- function ot(e, t, s) {
1086
- if (F(t.enabled, e) !== !1 && te(t.staleTime, e) !== "static") {
1085
+ function ut(e, t, s) {
1086
+ if (F(t.enabled, e) !== !1 && ee(t.staleTime, e) !== "static") {
1087
1087
  const r = typeof s == "function" ? s(e) : s;
1088
- return r === "always" || r !== !1 && mt(e, t);
1088
+ return r === "always" || r !== !1 && gt(e, t);
1089
1089
  }
1090
1090
  return !1;
1091
1091
  }
1092
- function Pt(e, t, s, r) {
1093
- return (e !== t || F(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && mt(e, s);
1092
+ function $t(e, t, s, r) {
1093
+ return (e !== t || F(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && gt(e, s);
1094
1094
  }
1095
- function mt(e, t) {
1096
- return F(t.enabled, e) !== !1 && e.isStaleByTime(te(t.staleTime, e));
1095
+ function gt(e, t) {
1096
+ return F(t.enabled, e) !== !1 && e.isStaleByTime(ee(t.staleTime, e));
1097
1097
  }
1098
1098
  function Rr(e, t) {
1099
- return !De(e.getCurrentResult(), t);
1099
+ return !Ue(e.getCurrentResult(), t);
1100
1100
  }
1101
- function Mt(e) {
1101
+ function Dt(e) {
1102
1102
  return {
1103
1103
  onFetch: (t, s) => {
1104
1104
  const r = t.options, n = t.fetchOptions?.meta?.fetchMore?.direction, a = t.state.data?.pages || [], i = t.state.data?.pageParams || [];
@@ -1111,28 +1111,28 @@ function Mt(e) {
1111
1111
  () => t.signal,
1112
1112
  () => u = !0
1113
1113
  );
1114
- }, l = ls(t.options, t.fetchOptions), p = async (f, y, _) => {
1114
+ }, l = ds(t.options, t.fetchOptions), p = async (f, y, _) => {
1115
1115
  if (u)
1116
1116
  return Promise.reject();
1117
1117
  if (y == null && f.pages.length)
1118
1118
  return Promise.resolve(f);
1119
- const L = (() => {
1120
- const we = {
1119
+ const U = (() => {
1120
+ const Te = {
1121
1121
  client: t.client,
1122
1122
  queryKey: t.queryKey,
1123
1123
  pageParam: y,
1124
1124
  direction: _ ? "backward" : "forward",
1125
1125
  meta: t.options.meta
1126
1126
  };
1127
- return h(we), we;
1128
- })(), K = await l(L), { maxPages: x } = t.options, G = _ ? fr : dr;
1127
+ return h(Te), Te;
1128
+ })(), K = await l(U), { maxPages: x } = t.options, G = _ ? fr : dr;
1129
1129
  return {
1130
1130
  pages: G(f.pages, K, x),
1131
1131
  pageParams: G(f.pageParams, y, x)
1132
1132
  };
1133
1133
  };
1134
1134
  if (n && a.length) {
1135
- const f = n === "backward", y = f ? vr : $t, _ = {
1135
+ const f = n === "backward", y = f ? vr : kt, _ = {
1136
1136
  pages: a,
1137
1137
  pageParams: i
1138
1138
  }, v = y(r, _);
@@ -1140,7 +1140,7 @@ function Mt(e) {
1140
1140
  } else {
1141
1141
  const f = e ?? a.length;
1142
1142
  do {
1143
- const y = c === 0 ? i[0] ?? r.initialPageParam : $t(r, o);
1143
+ const y = c === 0 ? i[0] ?? r.initialPageParam : kt(r, o);
1144
1144
  if (c > 0 && y == null)
1145
1145
  break;
1146
1146
  o = await p(o, y), c++;
@@ -1161,7 +1161,7 @@ function Mt(e) {
1161
1161
  }
1162
1162
  };
1163
1163
  }
1164
- function $t(e, { pages: t, pageParams: s }) {
1164
+ function kt(e, { pages: t, pageParams: s }) {
1165
1165
  const r = t.length - 1;
1166
1166
  return t.length > 0 ? e.getNextPageParam(
1167
1167
  t[r],
@@ -1173,13 +1173,13 @@ function $t(e, { pages: t, pageParams: s }) {
1173
1173
  function vr(e, { pages: t, pageParams: s }) {
1174
1174
  return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, s[0], s) : void 0;
1175
1175
  }
1176
- var br = class extends fs {
1176
+ var br = class extends ys {
1177
1177
  #e;
1178
1178
  #t;
1179
1179
  #s;
1180
1180
  #n;
1181
1181
  constructor(e) {
1182
- super(), this.#e = e.client, this.mutationId = e.mutationId, this.#s = e.mutationCache, this.#t = [], this.state = e.state || ys(), this.setOptions(e.options), this.scheduleGc();
1182
+ super(), this.#e = e.client, this.mutationId = e.mutationId, this.#s = e.mutationCache, this.#t = [], this.state = e.state || Es(), this.setOptions(e.options), this.scheduleGc();
1183
1183
  }
1184
1184
  setOptions(e) {
1185
1185
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -1216,7 +1216,7 @@ var br = class extends fs {
1216
1216
  meta: this.options.meta,
1217
1217
  mutationKey: this.options.mutationKey
1218
1218
  };
1219
- this.#n = ds({
1219
+ this.#n = ps({
1220
1220
  fn: () => this.options.mutationFn ? this.options.mutationFn(e, s) : Promise.reject(new Error("No mutationFn found")),
1221
1221
  onFail: (a, i) => {
1222
1222
  this.#r({ type: "failed", failureCount: a, error: i });
@@ -1392,7 +1392,7 @@ var br = class extends fs {
1392
1392
  });
1393
1393
  }
1394
1394
  };
1395
- function ys() {
1395
+ function Es() {
1396
1396
  return {
1397
1397
  context: void 0,
1398
1398
  data: void 0,
@@ -1405,7 +1405,7 @@ function ys() {
1405
1405
  submittedAt: 0
1406
1406
  };
1407
1407
  }
1408
- var Ir = class extends Se {
1408
+ var Ir = class extends we {
1409
1409
  constructor(e = {}) {
1410
1410
  super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#s = 0;
1411
1411
  }
@@ -1424,7 +1424,7 @@ var Ir = class extends Se {
1424
1424
  }
1425
1425
  add(e) {
1426
1426
  this.#e.add(e);
1427
- const t = Oe(e);
1427
+ const t = Pe(e);
1428
1428
  if (typeof t == "string") {
1429
1429
  const s = this.#t.get(t);
1430
1430
  s ? s.push(e) : this.#t.set(t, [e]);
@@ -1433,7 +1433,7 @@ var Ir = class extends Se {
1433
1433
  }
1434
1434
  remove(e) {
1435
1435
  if (this.#e.delete(e)) {
1436
- const t = Oe(e);
1436
+ const t = Pe(e);
1437
1437
  if (typeof t == "string") {
1438
1438
  const s = this.#t.get(t);
1439
1439
  if (s)
@@ -1446,7 +1446,7 @@ var Ir = class extends Se {
1446
1446
  this.notify({ type: "removed", mutation: e });
1447
1447
  }
1448
1448
  canRun(e) {
1449
- const t = Oe(e);
1449
+ const t = Pe(e);
1450
1450
  if (typeof t == "string") {
1451
1451
  const r = this.#t.get(t)?.find(
1452
1452
  (n) => n.state.status === "pending"
@@ -1456,7 +1456,7 @@ var Ir = class extends Se {
1456
1456
  return !0;
1457
1457
  }
1458
1458
  runNext(e) {
1459
- const t = Oe(e);
1459
+ const t = Pe(e);
1460
1460
  return typeof t == "string" ? this.#t.get(t)?.find((r) => r !== e && r.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
1461
1461
  }
1462
1462
  clear() {
@@ -1472,11 +1472,11 @@ var Ir = class extends Se {
1472
1472
  find(e) {
1473
1473
  const t = { exact: !0, ...e };
1474
1474
  return this.getAll().find(
1475
- (s) => vt(t, s)
1475
+ (s) => It(t, s)
1476
1476
  );
1477
1477
  }
1478
1478
  findAll(e = {}) {
1479
- return this.getAll().filter((t) => vt(e, t));
1479
+ return this.getAll().filter((t) => It(e, t));
1480
1480
  }
1481
1481
  notify(e) {
1482
1482
  A.batch(() => {
@@ -1489,15 +1489,15 @@ var Ir = class extends Se {
1489
1489
  const e = this.getAll().filter((t) => t.state.isPaused);
1490
1490
  return A.batch(
1491
1491
  () => Promise.all(
1492
- e.map((t) => t.continue().catch(U))
1492
+ e.map((t) => t.continue().catch(N))
1493
1493
  )
1494
1494
  );
1495
1495
  }
1496
1496
  };
1497
- function Oe(e) {
1497
+ function Pe(e) {
1498
1498
  return e.options.scope?.id;
1499
1499
  }
1500
- var _r = class extends Se {
1500
+ var _r = class extends we {
1501
1501
  #e;
1502
1502
  #t = void 0;
1503
1503
  #s;
@@ -1510,11 +1510,11 @@ var _r = class extends Se {
1510
1510
  }
1511
1511
  setOptions(e) {
1512
1512
  const t = this.options;
1513
- this.options = this.#e.defaultMutationOptions(e), De(this.options, t) || this.#e.getMutationCache().notify({
1513
+ this.options = this.#e.defaultMutationOptions(e), Ue(this.options, t) || this.#e.getMutationCache().notify({
1514
1514
  type: "observerOptionsUpdated",
1515
1515
  mutation: this.#s,
1516
1516
  observer: this
1517
- }), t?.mutationKey && this.options.mutationKey && ne(t.mutationKey) !== ne(this.options.mutationKey) ? this.reset() : this.#s?.state.status === "pending" && this.#s.setOptions(this.options);
1517
+ }), t?.mutationKey && this.options.mutationKey && re(t.mutationKey) !== re(this.options.mutationKey) ? this.reset() : this.#s?.state.status === "pending" && this.#s.setOptions(this.options);
1518
1518
  }
1519
1519
  onUnsubscribe() {
1520
1520
  this.hasListeners() || this.#s?.removeObserver(this);
@@ -1532,7 +1532,7 @@ var _r = class extends Se {
1532
1532
  return this.#n = t, this.#s?.removeObserver(this), this.#s = this.#e.getMutationCache().build(this.#e, this.options), this.#s.addObserver(this), this.#s.execute(e);
1533
1533
  }
1534
1534
  #r() {
1535
- const e = this.#s?.state ?? ys();
1535
+ const e = this.#s?.state ?? Es();
1536
1536
  this.#t = {
1537
1537
  ...e,
1538
1538
  isPending: e.status === "pending",
@@ -1602,13 +1602,13 @@ var _r = class extends Se {
1602
1602
  });
1603
1603
  });
1604
1604
  }
1605
- }, Or = class extends Se {
1605
+ }, Or = class extends we {
1606
1606
  constructor(e = {}) {
1607
1607
  super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
1608
1608
  }
1609
1609
  #e;
1610
1610
  build(e, t, s) {
1611
- const r = t.queryKey, n = t.queryHash ?? ft(r, t);
1611
+ const r = t.queryKey, n = t.queryHash ?? yt(r, t);
1612
1612
  let a = this.get(n);
1613
1613
  return a || (a = new wr({
1614
1614
  client: e,
@@ -1645,12 +1645,12 @@ var _r = class extends Se {
1645
1645
  find(e) {
1646
1646
  const t = { exact: !0, ...e };
1647
1647
  return this.getAll().find(
1648
- (s) => Rt(t, s)
1648
+ (s) => bt(t, s)
1649
1649
  );
1650
1650
  }
1651
1651
  findAll(e = {}) {
1652
1652
  const t = this.getAll();
1653
- return Object.keys(e).length > 0 ? t.filter((s) => Rt(e, s)) : t;
1653
+ return Object.keys(e).length > 0 ? t.filter((s) => bt(e, s)) : t;
1654
1654
  }
1655
1655
  notify(e) {
1656
1656
  A.batch(() => {
@@ -1686,9 +1686,9 @@ var _r = class extends Se {
1686
1686
  this.#e = e.queryCache || new Or(), this.#t = e.mutationCache || new Ir(), this.#s = e.defaultOptions || {}, this.#n = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map(), this.#i = 0;
1687
1687
  }
1688
1688
  mount() {
1689
- this.#i++, this.#i === 1 && (this.#o = yt.subscribe(async (e) => {
1689
+ this.#i++, this.#i === 1 && (this.#o = Et.subscribe(async (e) => {
1690
1690
  e && (await this.resumePausedMutations(), this.#e.onFocus());
1691
- }), this.#a = Ue.subscribe(async (e) => {
1691
+ }), this.#a = He.subscribe(async (e) => {
1692
1692
  e && (await this.resumePausedMutations(), this.#e.onOnline());
1693
1693
  }));
1694
1694
  }
@@ -1714,7 +1714,7 @@ var _r = class extends Se {
1714
1714
  }
1715
1715
  ensureQueryData(e) {
1716
1716
  const t = this.defaultQueryOptions(e), s = this.#e.build(this, t), r = s.state.data;
1717
- return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && s.isStaleByTime(te(t.staleTime, s)) && this.prefetchQuery(t), Promise.resolve(r));
1717
+ return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && s.isStaleByTime(ee(t.staleTime, s)) && this.prefetchQuery(t), Promise.resolve(r));
1718
1718
  }
1719
1719
  getQueriesData(e) {
1720
1720
  return this.#e.findAll(e).map(({ queryKey: t, state: s }) => {
@@ -1767,7 +1767,7 @@ var _r = class extends Se {
1767
1767
  const s = { revert: !0, ...t }, r = A.batch(
1768
1768
  () => this.#e.findAll(e).map((n) => n.cancel(s))
1769
1769
  );
1770
- return Promise.all(r).then(U).catch(U);
1770
+ return Promise.all(r).then(N).catch(N);
1771
1771
  }
1772
1772
  invalidateQueries(e, t = {}) {
1773
1773
  return A.batch(() => (this.#e.findAll(e).forEach((s) => {
@@ -1787,33 +1787,33 @@ var _r = class extends Se {
1787
1787
  }, r = A.batch(
1788
1788
  () => this.#e.findAll(e).filter((n) => !n.isDisabled() && !n.isStatic()).map((n) => {
1789
1789
  let a = n.fetch(void 0, s);
1790
- return s.throwOnError || (a = a.catch(U)), n.state.fetchStatus === "paused" ? Promise.resolve() : a;
1790
+ return s.throwOnError || (a = a.catch(N)), n.state.fetchStatus === "paused" ? Promise.resolve() : a;
1791
1791
  })
1792
1792
  );
1793
- return Promise.all(r).then(U);
1793
+ return Promise.all(r).then(N);
1794
1794
  }
1795
1795
  fetchQuery(e) {
1796
1796
  const t = this.defaultQueryOptions(e);
1797
1797
  t.retry === void 0 && (t.retry = !1);
1798
1798
  const s = this.#e.build(this, t);
1799
1799
  return s.isStaleByTime(
1800
- te(t.staleTime, s)
1800
+ ee(t.staleTime, s)
1801
1801
  ) ? s.fetch(t) : Promise.resolve(s.state.data);
1802
1802
  }
1803
1803
  prefetchQuery(e) {
1804
- return this.fetchQuery(e).then(U).catch(U);
1804
+ return this.fetchQuery(e).then(N).catch(N);
1805
1805
  }
1806
1806
  fetchInfiniteQuery(e) {
1807
- return e.behavior = Mt(e.pages), this.fetchQuery(e);
1807
+ return e.behavior = Dt(e.pages), this.fetchQuery(e);
1808
1808
  }
1809
1809
  prefetchInfiniteQuery(e) {
1810
- return this.fetchInfiniteQuery(e).then(U).catch(U);
1810
+ return this.fetchInfiniteQuery(e).then(N).catch(N);
1811
1811
  }
1812
1812
  ensureInfiniteQueryData(e) {
1813
- return e.behavior = Mt(e.pages), this.ensureQueryData(e);
1813
+ return e.behavior = Dt(e.pages), this.ensureQueryData(e);
1814
1814
  }
1815
1815
  resumePausedMutations() {
1816
- return Ue.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
1816
+ return He.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
1817
1817
  }
1818
1818
  getQueryCache() {
1819
1819
  return this.#e;
@@ -1828,7 +1828,7 @@ var _r = class extends Se {
1828
1828
  this.#s = e;
1829
1829
  }
1830
1830
  setQueryDefaults(e, t) {
1831
- this.#n.set(ne(e), {
1831
+ this.#n.set(re(e), {
1832
1832
  queryKey: e,
1833
1833
  defaultOptions: t
1834
1834
  });
@@ -1836,11 +1836,11 @@ var _r = class extends Se {
1836
1836
  getQueryDefaults(e) {
1837
1837
  const t = [...this.#n.values()], s = {};
1838
1838
  return t.forEach((r) => {
1839
- ve(e, r.queryKey) && Object.assign(s, r.defaultOptions);
1839
+ be(e, r.queryKey) && Object.assign(s, r.defaultOptions);
1840
1840
  }), s;
1841
1841
  }
1842
1842
  setMutationDefaults(e, t) {
1843
- this.#r.set(ne(e), {
1843
+ this.#r.set(re(e), {
1844
1844
  mutationKey: e,
1845
1845
  defaultOptions: t
1846
1846
  });
@@ -1848,7 +1848,7 @@ var _r = class extends Se {
1848
1848
  getMutationDefaults(e) {
1849
1849
  const t = [...this.#r.values()], s = {};
1850
1850
  return t.forEach((r) => {
1851
- ve(e, r.mutationKey) && Object.assign(s, r.defaultOptions);
1851
+ be(e, r.mutationKey) && Object.assign(s, r.defaultOptions);
1852
1852
  }), s;
1853
1853
  }
1854
1854
  defaultQueryOptions(e) {
@@ -1860,10 +1860,10 @@ var _r = class extends Se {
1860
1860
  ...e,
1861
1861
  _defaulted: !0
1862
1862
  };
1863
- return t.queryHash || (t.queryHash = ft(
1863
+ return t.queryHash || (t.queryHash = yt(
1864
1864
  t.queryKey,
1865
1865
  t
1866
- )), 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 === Ne && (t.enabled = !1), t;
1866
+ )), 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 === Le && (t.enabled = !1), t;
1867
1867
  }
1868
1868
  defaultMutationOptions(e) {
1869
1869
  return e?._defaulted ? e : {
@@ -1876,20 +1876,20 @@ var _r = class extends Se {
1876
1876
  clear() {
1877
1877
  this.#e.clear(), this.#t.clear();
1878
1878
  }
1879
- }, ms = D.createContext(
1879
+ }, gs = k.createContext(
1880
1880
  void 0
1881
1881
  ), Y = (e) => {
1882
- const t = D.useContext(ms);
1882
+ const t = k.useContext(gs);
1883
1883
  if (!t)
1884
1884
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1885
1885
  return t;
1886
1886
  }, Pr = ({
1887
1887
  client: e,
1888
1888
  children: t
1889
- }) => (D.useEffect(() => (e.mount(), () => {
1889
+ }) => (k.useEffect(() => (e.mount(), () => {
1890
1890
  e.unmount();
1891
- }), [e]), /* @__PURE__ */ S(ms.Provider, { value: e, children: t })), Mr = D.createContext(!1), $r = () => D.useContext(Mr);
1892
- function kr() {
1891
+ }), [e]), /* @__PURE__ */ S(gs.Provider, { value: e, children: t })), Mr = k.createContext(!1), $r = () => k.useContext(Mr);
1892
+ function Dr() {
1893
1893
  let e = !1;
1894
1894
  return {
1895
1895
  clearReset: () => {
@@ -1901,11 +1901,11 @@ function kr() {
1901
1901
  isReset: () => e
1902
1902
  };
1903
1903
  }
1904
- var Dr = D.createContext(kr()), Nr = () => D.useContext(Dr), Ur = (e, t, s) => {
1905
- const r = s?.state.error && typeof e.throwOnError == "function" ? pt(e.throwOnError, [s.state.error, s]) : e.throwOnError;
1904
+ var kr = k.createContext(Dr()), Nr = () => k.useContext(kr), Ur = (e, t, s) => {
1905
+ const r = s?.state.error && typeof e.throwOnError == "function" ? mt(e.throwOnError, [s.state.error, s]) : e.throwOnError;
1906
1906
  (e.suspense || e.experimental_prefetchInRender || r) && (t.isReset() || (e.retryOnMount = !1));
1907
1907
  }, Lr = (e) => {
1908
- D.useEffect(() => {
1908
+ k.useEffect(() => {
1909
1909
  e.clearReset();
1910
1910
  }, [e]);
1911
1911
  }, Hr = ({
@@ -1914,7 +1914,7 @@ var Dr = D.createContext(kr()), Nr = () => D.useContext(Dr), Ur = (e, t, s) => {
1914
1914
  throwOnError: s,
1915
1915
  query: r,
1916
1916
  suspense: n
1917
- }) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || pt(s, [e.error, r])), Fr = (e) => {
1917
+ }) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || mt(s, [e.error, r])), Fr = (e) => {
1918
1918
  if (e.suspense) {
1919
1919
  const s = (n) => n === "static" ? n : Math.max(n ?? 1e3, 1e3), r = e.staleTime;
1920
1920
  e.staleTime = typeof r == "function" ? (...n) => s(r(...n)) : s(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(
@@ -1922,7 +1922,7 @@ var Dr = D.createContext(kr()), Nr = () => D.useContext(Dr), Ur = (e, t, s) => {
1922
1922
  1e3
1923
1923
  ));
1924
1924
  }
1925
- }, Kr = (e, t) => e.isLoading && e.isFetching && !t, xr = (e, t) => e?.suspense && t.isPending, kt = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1925
+ }, Kr = (e, t) => e.isLoading && e.isFetching && !t, xr = (e, t) => e?.suspense && t.isPending, Nt = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1926
1926
  s.clearReset();
1927
1927
  });
1928
1928
  function Gr(e, t, s) {
@@ -1938,26 +1938,26 @@ function Gr(e, t, s) {
1938
1938
  process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
1939
1939
  `[${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`
1940
1940
  )), i._optimisticResults = r ? "isRestoring" : "optimistic", Fr(i), Ur(i, n, o), Lr(n);
1941
- const c = !a.getQueryCache().get(i.queryHash), [d] = D.useState(
1941
+ const c = !a.getQueryCache().get(i.queryHash), [d] = k.useState(
1942
1942
  () => new t(
1943
1943
  a,
1944
1944
  i
1945
1945
  )
1946
1946
  ), u = d.getOptimisticResult(i), h = !r && e.subscribed !== !1;
1947
- if (D.useSyncExternalStore(
1948
- D.useCallback(
1947
+ if (k.useSyncExternalStore(
1948
+ k.useCallback(
1949
1949
  (l) => {
1950
- const p = h ? d.subscribe(A.batchCalls(l)) : U;
1950
+ const p = h ? d.subscribe(A.batchCalls(l)) : N;
1951
1951
  return d.updateResult(), p;
1952
1952
  },
1953
1953
  [d, h]
1954
1954
  ),
1955
1955
  () => d.getCurrentResult(),
1956
1956
  () => d.getCurrentResult()
1957
- ), D.useEffect(() => {
1957
+ ), k.useEffect(() => {
1958
1958
  d.setOptions(i);
1959
1959
  }, [i, d]), xr(i, u))
1960
- throw kt(i, d, n);
1960
+ throw Nt(i, d, n);
1961
1961
  if (Hr({
1962
1962
  result: u,
1963
1963
  errorResetBoundary: n,
@@ -1969,43 +1969,43 @@ function Gr(e, t, s) {
1969
1969
  return a.getDefaultOptions().queries?._experimental_afterQuery?.(
1970
1970
  i,
1971
1971
  u
1972
- ), i.experimental_prefetchInRender && !re && Kr(u, r) && (c ? (
1972
+ ), i.experimental_prefetchInRender && !se && Kr(u, r) && (c ? (
1973
1973
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1974
- kt(i, d, n)
1974
+ Nt(i, d, n)
1975
1975
  ) : (
1976
1976
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1977
1977
  o?.promise
1978
- ))?.catch(U).finally(() => {
1978
+ ))?.catch(N).finally(() => {
1979
1979
  d.updateResult();
1980
1980
  }), i.notifyOnChangeProps ? u : d.trackResult(u);
1981
1981
  }
1982
1982
  function z(e, t) {
1983
1983
  return Gr(e, Tr);
1984
1984
  }
1985
- function ae(e, t) {
1986
- const s = Y(), [r] = D.useState(
1985
+ function ne(e, t) {
1986
+ const s = Y(), [r] = k.useState(
1987
1987
  () => new _r(
1988
1988
  s,
1989
1989
  e
1990
1990
  )
1991
1991
  );
1992
- D.useEffect(() => {
1992
+ k.useEffect(() => {
1993
1993
  r.setOptions(e);
1994
1994
  }, [r, e]);
1995
- const n = D.useSyncExternalStore(
1996
- D.useCallback(
1995
+ const n = k.useSyncExternalStore(
1996
+ k.useCallback(
1997
1997
  (i) => r.subscribe(A.batchCalls(i)),
1998
1998
  [r]
1999
1999
  ),
2000
2000
  () => r.getCurrentResult(),
2001
2001
  () => r.getCurrentResult()
2002
- ), a = D.useCallback(
2002
+ ), a = k.useCallback(
2003
2003
  (i, o) => {
2004
- r.mutate(i, o).catch(U);
2004
+ r.mutate(i, o).catch(N);
2005
2005
  },
2006
2006
  [r]
2007
2007
  );
2008
- if (n.error && pt(r.options.throwOnError, [n.error]))
2008
+ if (n.error && mt(r.options.throwOnError, [n.error]))
2009
2009
  throw n.error;
2010
2010
  return { ...n, mutate: a, mutateAsync: n.mutate };
2011
2011
  }
@@ -2018,13 +2018,13 @@ try {
2018
2018
  });
2019
2019
  } catch {
2020
2020
  }
2021
- const Ae = {
2021
+ const Re = {
2022
2022
  CODE: "code",
2023
2023
  REFRESH_TOKEN: "refresh_token",
2024
2024
  PASSKEY: "passkey"
2025
- }, Es = {
2025
+ }, Ss = {
2026
2026
  CLIENT_ID: "X-Auth-ClientId"
2027
- }, k = {
2027
+ }, D = {
2028
2028
  ALG: "RS256",
2029
2029
  USER_ID_KEY: "sub",
2030
2030
  USERNAME_KEY: "username",
@@ -2040,12 +2040,12 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
2040
2040
  l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
2041
2041
  sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
2042
2042
  awIDAQAB
2043
- -----END PUBLIC KEY-----`, qe = {
2043
+ -----END PUBLIC KEY-----`, je = {
2044
2044
  CODE: "code",
2045
2045
  LOGOUT: "logout",
2046
2046
  LOGIN: "login",
2047
2047
  REFRESH: "refresh"
2048
- }, Dt = new TextEncoder(), ge = new TextDecoder();
2048
+ }, Ut = new TextEncoder(), Se = new TextDecoder();
2049
2049
  function Br(...e) {
2050
2050
  const t = e.reduce((n, { length: a }) => n + a, 0), s = new Uint8Array(t);
2051
2051
  let r = 0;
@@ -2053,7 +2053,7 @@ function Br(...e) {
2053
2053
  s.set(n, r), r += n.length;
2054
2054
  return s;
2055
2055
  }
2056
- function je(e) {
2056
+ function We(e) {
2057
2057
  const t = new Uint8Array(e.length);
2058
2058
  for (let s = 0; s < e.length; s++) {
2059
2059
  const r = e.charCodeAt(s);
@@ -2063,7 +2063,7 @@ function je(e) {
2063
2063
  }
2064
2064
  return t;
2065
2065
  }
2066
- function gs(e) {
2066
+ function ws(e) {
2067
2067
  if (Uint8Array.fromBase64)
2068
2068
  return Uint8Array.fromBase64(e);
2069
2069
  const t = atob(e), s = new Uint8Array(t.length);
@@ -2071,26 +2071,26 @@ function gs(e) {
2071
2071
  s[r] = t.charCodeAt(r);
2072
2072
  return s;
2073
2073
  }
2074
- function Re(e) {
2074
+ function ve(e) {
2075
2075
  if (Uint8Array.fromBase64)
2076
- return Uint8Array.fromBase64(typeof e == "string" ? e : ge.decode(e), {
2076
+ return Uint8Array.fromBase64(typeof e == "string" ? e : Se.decode(e), {
2077
2077
  alphabet: "base64url"
2078
2078
  });
2079
2079
  let t = e;
2080
- t instanceof Uint8Array && (t = ge.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/");
2080
+ t instanceof Uint8Array && (t = Se.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/");
2081
2081
  try {
2082
- return gs(t);
2082
+ return ws(t);
2083
2083
  } catch {
2084
2084
  throw new TypeError("The input to be decoded is not correctly encoded.");
2085
2085
  }
2086
2086
  }
2087
- let ie = class extends Error {
2087
+ let ae = class extends Error {
2088
2088
  static code = "ERR_JOSE_GENERIC";
2089
2089
  code = "ERR_JOSE_GENERIC";
2090
2090
  constructor(t, s) {
2091
2091
  super(t, s), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
2092
2092
  }
2093
- }, q = class extends ie {
2093
+ }, q = class extends ae {
2094
2094
  static code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
2095
2095
  code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
2096
2096
  claim;
@@ -2099,7 +2099,7 @@ let ie = class extends Error {
2099
2099
  constructor(t, s, r = "unspecified", n = "unspecified") {
2100
2100
  super(t, { cause: { claim: r, reason: n, payload: s } }), this.claim = r, this.reason = n, this.payload = s;
2101
2101
  }
2102
- }, Nt = class extends ie {
2102
+ }, Lt = class extends ae {
2103
2103
  static code = "ERR_JWT_EXPIRED";
2104
2104
  code = "ERR_JWT_EXPIRED";
2105
2105
  claim;
@@ -2109,31 +2109,31 @@ let ie = class extends Error {
2109
2109
  super(t, { cause: { claim: r, reason: n, payload: s } }), this.claim = r, this.reason = n, this.payload = s;
2110
2110
  }
2111
2111
  };
2112
- class jr extends ie {
2112
+ class jr extends ae {
2113
2113
  static code = "ERR_JOSE_ALG_NOT_ALLOWED";
2114
2114
  code = "ERR_JOSE_ALG_NOT_ALLOWED";
2115
2115
  }
2116
- class V extends ie {
2116
+ class V extends ae {
2117
2117
  static code = "ERR_JOSE_NOT_SUPPORTED";
2118
2118
  code = "ERR_JOSE_NOT_SUPPORTED";
2119
2119
  }
2120
- class M extends ie {
2120
+ class M extends ae {
2121
2121
  static code = "ERR_JWS_INVALID";
2122
2122
  code = "ERR_JWS_INVALID";
2123
2123
  }
2124
- class J extends ie {
2124
+ class J extends ae {
2125
2125
  static code = "ERR_JWT_INVALID";
2126
2126
  code = "ERR_JWT_INVALID";
2127
2127
  }
2128
- let Qr = class extends ie {
2128
+ let Qr = class extends ae {
2129
2129
  static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2130
2130
  code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2131
2131
  constructor(t = "signature verification failed", s) {
2132
2132
  super(t, s);
2133
2133
  }
2134
2134
  };
2135
- const B = (e, t = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`), le = (e, t) => e.name === t;
2136
- function Qe(e) {
2135
+ const B = (e, t = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`), he = (e, t) => e.name === t;
2136
+ function Je(e) {
2137
2137
  return parseInt(e.name.slice(4), 10);
2138
2138
  }
2139
2139
  function Wr(e) {
@@ -2157,50 +2157,50 @@ function Vr(e, t, s) {
2157
2157
  case "HS256":
2158
2158
  case "HS384":
2159
2159
  case "HS512": {
2160
- if (!le(e.algorithm, "HMAC"))
2160
+ if (!he(e.algorithm, "HMAC"))
2161
2161
  throw B("HMAC");
2162
2162
  const r = parseInt(t.slice(2), 10);
2163
- if (Qe(e.algorithm.hash) !== r)
2163
+ if (Je(e.algorithm.hash) !== r)
2164
2164
  throw B(`SHA-${r}`, "algorithm.hash");
2165
2165
  break;
2166
2166
  }
2167
2167
  case "RS256":
2168
2168
  case "RS384":
2169
2169
  case "RS512": {
2170
- if (!le(e.algorithm, "RSASSA-PKCS1-v1_5"))
2170
+ if (!he(e.algorithm, "RSASSA-PKCS1-v1_5"))
2171
2171
  throw B("RSASSA-PKCS1-v1_5");
2172
2172
  const r = parseInt(t.slice(2), 10);
2173
- if (Qe(e.algorithm.hash) !== r)
2173
+ if (Je(e.algorithm.hash) !== r)
2174
2174
  throw B(`SHA-${r}`, "algorithm.hash");
2175
2175
  break;
2176
2176
  }
2177
2177
  case "PS256":
2178
2178
  case "PS384":
2179
2179
  case "PS512": {
2180
- if (!le(e.algorithm, "RSA-PSS"))
2180
+ if (!he(e.algorithm, "RSA-PSS"))
2181
2181
  throw B("RSA-PSS");
2182
2182
  const r = parseInt(t.slice(2), 10);
2183
- if (Qe(e.algorithm.hash) !== r)
2183
+ if (Je(e.algorithm.hash) !== r)
2184
2184
  throw B(`SHA-${r}`, "algorithm.hash");
2185
2185
  break;
2186
2186
  }
2187
2187
  case "Ed25519":
2188
2188
  case "EdDSA": {
2189
- if (!le(e.algorithm, "Ed25519"))
2189
+ if (!he(e.algorithm, "Ed25519"))
2190
2190
  throw B("Ed25519");
2191
2191
  break;
2192
2192
  }
2193
2193
  case "ML-DSA-44":
2194
2194
  case "ML-DSA-65":
2195
2195
  case "ML-DSA-87": {
2196
- if (!le(e.algorithm, t))
2196
+ if (!he(e.algorithm, t))
2197
2197
  throw B(t);
2198
2198
  break;
2199
2199
  }
2200
2200
  case "ES256":
2201
2201
  case "ES384":
2202
2202
  case "ES512": {
2203
- if (!le(e.algorithm, "ECDSA"))
2203
+ if (!he(e.algorithm, "ECDSA"))
2204
2204
  throw B("ECDSA");
2205
2205
  const r = Wr(t);
2206
2206
  if (e.algorithm.namedCurve !== r)
@@ -2212,14 +2212,14 @@ function Vr(e, t, s) {
2212
2212
  }
2213
2213
  Jr(e, s);
2214
2214
  }
2215
- function Ss(e, t, ...s) {
2215
+ function Ts(e, t, ...s) {
2216
2216
  if (s = s.filter(Boolean), s.length > 2) {
2217
2217
  const r = s.pop();
2218
2218
  e += `one of type ${s.join(", ")}, or ${r}.`;
2219
2219
  } else s.length === 2 ? e += `one of type ${s[0]} or ${s[1]}.` : e += `of type ${s[0]}.`;
2220
2220
  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;
2221
2221
  }
2222
- const Yr = (e, ...t) => Ss("Key must be ", e, ...t), ws = (e, t, ...s) => Ss(`Key for the ${e} algorithm must be `, t, ...s), Ts = (e) => {
2222
+ const Yr = (e, ...t) => Ts("Key must be ", e, ...t), As = (e, t, ...s) => Ts(`Key for the ${e} algorithm must be `, t, ...s), Rs = (e) => {
2223
2223
  if (e?.[Symbol.toStringTag] === "CryptoKey")
2224
2224
  return !0;
2225
2225
  try {
@@ -2227,7 +2227,7 @@ const Yr = (e, ...t) => Ss("Key must be ", e, ...t), ws = (e, t, ...s) => Ss(`Ke
2227
2227
  } catch {
2228
2228
  return !1;
2229
2229
  }
2230
- }, As = (e) => e?.[Symbol.toStringTag] === "KeyObject", Rs = (e) => Ts(e) || As(e);
2230
+ }, vs = (e) => e?.[Symbol.toStringTag] === "KeyObject", bs = (e) => Rs(e) || vs(e);
2231
2231
  function zr(...e) {
2232
2232
  const t = e.filter(Boolean);
2233
2233
  if (t.length === 0 || t.length === 1)
@@ -2248,7 +2248,7 @@ function zr(...e) {
2248
2248
  return !0;
2249
2249
  }
2250
2250
  const Xr = (e) => typeof e == "object" && e !== null;
2251
- function be(e) {
2251
+ function Ie(e) {
2252
2252
  if (!Xr(e) || Object.prototype.toString.call(e) !== "[object Object]")
2253
2253
  return !1;
2254
2254
  if (Object.getPrototypeOf(e) === null)
@@ -2265,14 +2265,14 @@ function Zr(e, t) {
2265
2265
  throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
2266
2266
  }
2267
2267
  }
2268
- const We = (e, t) => {
2268
+ const Ve = (e, t) => {
2269
2269
  if (e.byteLength !== t.length)
2270
2270
  return !1;
2271
2271
  for (let s = 0; s < e.byteLength; s++)
2272
2272
  if (e[s] !== t[s])
2273
2273
  return !1;
2274
2274
  return !0;
2275
- }, en = (e) => ({ data: e, pos: 0 }), Le = (e) => {
2275
+ }, en = (e) => ({ data: e, pos: 0 }), Fe = (e) => {
2276
2276
  const t = e.data[e.pos++];
2277
2277
  if (t & 128) {
2278
2278
  const s = t & 127;
@@ -2282,36 +2282,36 @@ const We = (e, t) => {
2282
2282
  return r;
2283
2283
  }
2284
2284
  return t;
2285
- }, He = (e, t, s) => {
2285
+ }, Ke = (e, t, s) => {
2286
2286
  if (e.data[e.pos++] !== t)
2287
2287
  throw new Error(s);
2288
- }, vs = (e, t) => {
2288
+ }, Is = (e, t) => {
2289
2289
  const s = e.data.subarray(e.pos, e.pos + t);
2290
2290
  return e.pos += t, s;
2291
2291
  }, tn = (e) => {
2292
- He(e, 6, "Expected algorithm OID");
2293
- const t = Le(e);
2294
- return vs(e, t);
2292
+ Ke(e, 6, "Expected algorithm OID");
2293
+ const t = Fe(e);
2294
+ return Is(e, t);
2295
2295
  };
2296
2296
  function sn(e) {
2297
- He(e, 48, "Invalid SPKI structure"), Le(e), He(e, 48, "Expected algorithm identifier");
2298
- const t = Le(e);
2297
+ Ke(e, 48, "Invalid SPKI structure"), Fe(e), Ke(e, 48, "Expected algorithm identifier");
2298
+ const t = Fe(e);
2299
2299
  return { algIdStart: e.pos, algIdLength: t };
2300
2300
  }
2301
2301
  const rn = (e) => {
2302
2302
  const t = tn(e);
2303
- if (We(t, [43, 101, 110]))
2303
+ if (Ve(t, [43, 101, 110]))
2304
2304
  return "X25519";
2305
- if (!We(t, [42, 134, 72, 206, 61, 2, 1]))
2305
+ if (!Ve(t, [42, 134, 72, 206, 61, 2, 1]))
2306
2306
  throw new Error("Unsupported key algorithm");
2307
- He(e, 6, "Expected curve OID");
2308
- const s = Le(e), r = vs(e, s);
2307
+ Ke(e, 6, "Expected curve OID");
2308
+ const s = Fe(e), r = Is(e, s);
2309
2309
  for (const { name: n, oid: a } of [
2310
2310
  { name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
2311
2311
  { name: "P-384", oid: [43, 129, 4, 0, 34] },
2312
2312
  { name: "P-521", oid: [43, 129, 4, 0, 35] }
2313
2313
  ])
2314
- if (We(r, a))
2314
+ if (Ve(r, a))
2315
2315
  return n;
2316
2316
  throw new Error("Unsupported named curve");
2317
2317
  }, nn = async (e, t, s, r) => {
@@ -2369,7 +2369,7 @@ const rn = (e) => {
2369
2369
  throw new V('Invalid or unsupported "alg" (Algorithm) value');
2370
2370
  }
2371
2371
  return crypto.subtle.importKey(e, t, n, r?.extractable ?? !0, a);
2372
- }, an = (e, t) => gs(e.replace(t, "")), on = (e, t, s) => {
2372
+ }, an = (e, t) => ws(e.replace(t, "")), on = (e, t, s) => {
2373
2373
  const r = an(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
2374
2374
  let n = s;
2375
2375
  return t?.startsWith?.("ECDH-ES") && (n ||= {}, n.getNamedCurve = (a) => {
@@ -2498,18 +2498,18 @@ function dn(e, t) {
2498
2498
  if (t)
2499
2499
  return new Set(t);
2500
2500
  }
2501
- const Et = (e) => be(e) && typeof e.kty == "string", fn = (e) => e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string"), pn = (e) => e.kty !== "oct" && e.d === void 0 && e.priv === void 0, yn = (e) => e.kty === "oct" && typeof e.k == "string";
2502
- let Ee;
2503
- const Ut = async (e, t, s, r = !1) => {
2504
- Ee ||= /* @__PURE__ */ new WeakMap();
2505
- let n = Ee.get(e);
2501
+ const St = (e) => Ie(e) && typeof e.kty == "string", fn = (e) => e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string"), pn = (e) => e.kty !== "oct" && e.d === void 0 && e.priv === void 0, yn = (e) => e.kty === "oct" && typeof e.k == "string";
2502
+ let ge;
2503
+ const Ht = async (e, t, s, r = !1) => {
2504
+ ge ||= /* @__PURE__ */ new WeakMap();
2505
+ let n = ge.get(e);
2506
2506
  if (n?.[s])
2507
2507
  return n[s];
2508
2508
  const a = await un({ ...t, alg: s });
2509
- return r && Object.freeze(e), n ? n[s] = a : Ee.set(e, { [s]: a }), a;
2509
+ return r && Object.freeze(e), n ? n[s] = a : ge.set(e, { [s]: a }), a;
2510
2510
  }, mn = (e, t) => {
2511
- Ee ||= /* @__PURE__ */ new WeakMap();
2512
- let s = Ee.get(e);
2511
+ ge ||= /* @__PURE__ */ new WeakMap();
2512
+ let s = ge.get(e);
2513
2513
  if (s?.[t])
2514
2514
  return s[t];
2515
2515
  const r = e.type === "public", n = !!r;
@@ -2602,12 +2602,12 @@ const Ut = async (e, t, s, r = !1) => {
2602
2602
  }
2603
2603
  if (!a)
2604
2604
  throw new TypeError("given KeyObject instance cannot be used for this algorithm");
2605
- return s ? s[t] = a : Ee.set(e, { [t]: a }), a;
2605
+ return s ? s[t] = a : ge.set(e, { [t]: a }), a;
2606
2606
  };
2607
2607
  async function En(e, t) {
2608
- if (e instanceof Uint8Array || Ts(e))
2608
+ if (e instanceof Uint8Array || Rs(e))
2609
2609
  return e;
2610
- if (As(e)) {
2610
+ if (vs(e)) {
2611
2611
  if (e.type === "secret")
2612
2612
  return e.export();
2613
2613
  if ("toCryptoKey" in e && typeof e.toCryptoKey == "function")
@@ -2618,13 +2618,13 @@ async function En(e, t) {
2618
2618
  throw r;
2619
2619
  }
2620
2620
  let s = e.export({ format: "jwk" });
2621
- return Ut(e, s, t);
2621
+ return Ht(e, s, t);
2622
2622
  }
2623
- if (Et(e))
2624
- return e.k ? Re(e.k) : Ut(e, e, t, !0);
2623
+ if (St(e))
2624
+ return e.k ? ve(e.k) : Ht(e, e, t, !0);
2625
2625
  throw new Error("unreachable");
2626
2626
  }
2627
- const ye = (e) => e?.[Symbol.toStringTag], ct = (e, t, s) => {
2627
+ const me = (e) => e?.[Symbol.toStringTag], lt = (e, t, s) => {
2628
2628
  if (t.use !== void 0) {
2629
2629
  let r;
2630
2630
  switch (s) {
@@ -2669,47 +2669,47 @@ const ye = (e) => e?.[Symbol.toStringTag], ct = (e, t, s) => {
2669
2669
  return !0;
2670
2670
  }, gn = (e, t, s) => {
2671
2671
  if (!(t instanceof Uint8Array)) {
2672
- if (Et(t)) {
2673
- if (yn(t) && ct(e, t, s))
2672
+ if (St(t)) {
2673
+ if (yn(t) && lt(e, t, s))
2674
2674
  return;
2675
2675
  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');
2676
2676
  }
2677
- if (!Rs(t))
2678
- throw new TypeError(ws(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2677
+ if (!bs(t))
2678
+ throw new TypeError(As(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2679
2679
  if (t.type !== "secret")
2680
- throw new TypeError(`${ye(t)} instances for symmetric algorithms must be of type "secret"`);
2680
+ throw new TypeError(`${me(t)} instances for symmetric algorithms must be of type "secret"`);
2681
2681
  }
2682
2682
  }, Sn = (e, t, s) => {
2683
- if (Et(t))
2683
+ if (St(t))
2684
2684
  switch (s) {
2685
2685
  case "decrypt":
2686
2686
  case "sign":
2687
- if (fn(t) && ct(e, t, s))
2687
+ if (fn(t) && lt(e, t, s))
2688
2688
  return;
2689
2689
  throw new TypeError("JSON Web Key for this operation be a private JWK");
2690
2690
  case "encrypt":
2691
2691
  case "verify":
2692
- if (pn(t) && ct(e, t, s))
2692
+ if (pn(t) && lt(e, t, s))
2693
2693
  return;
2694
2694
  throw new TypeError("JSON Web Key for this operation be a public JWK");
2695
2695
  }
2696
- if (!Rs(t))
2697
- throw new TypeError(ws(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2696
+ if (!bs(t))
2697
+ throw new TypeError(As(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2698
2698
  if (t.type === "secret")
2699
- throw new TypeError(`${ye(t)} instances for asymmetric algorithms must not be of type "secret"`);
2699
+ throw new TypeError(`${me(t)} instances for asymmetric algorithms must not be of type "secret"`);
2700
2700
  if (t.type === "public")
2701
2701
  switch (s) {
2702
2702
  case "sign":
2703
- throw new TypeError(`${ye(t)} instances for asymmetric algorithm signing must be of type "private"`);
2703
+ throw new TypeError(`${me(t)} instances for asymmetric algorithm signing must be of type "private"`);
2704
2704
  case "decrypt":
2705
- throw new TypeError(`${ye(t)} instances for asymmetric algorithm decryption must be of type "private"`);
2705
+ throw new TypeError(`${me(t)} instances for asymmetric algorithm decryption must be of type "private"`);
2706
2706
  }
2707
2707
  if (t.type === "private")
2708
2708
  switch (s) {
2709
2709
  case "verify":
2710
- throw new TypeError(`${ye(t)} instances for asymmetric algorithm verifying must be of type "public"`);
2710
+ throw new TypeError(`${me(t)} instances for asymmetric algorithm verifying must be of type "public"`);
2711
2711
  case "encrypt":
2712
- throw new TypeError(`${ye(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2712
+ throw new TypeError(`${me(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2713
2713
  }
2714
2714
  };
2715
2715
  function wn(e, t, s) {
@@ -2774,7 +2774,7 @@ async function Rn(e, t, s, r) {
2774
2774
  }
2775
2775
  }
2776
2776
  async function vn(e, t, s) {
2777
- if (!be(e))
2777
+ if (!Ie(e))
2778
2778
  throw new M("Flattened JWS must be an object");
2779
2779
  if (e.protected === void 0 && e.header === void 0)
2780
2780
  throw new M('Flattened JWS must have either of the "protected" or "header" members');
@@ -2784,13 +2784,13 @@ async function vn(e, t, s) {
2784
2784
  throw new M("JWS Payload missing");
2785
2785
  if (typeof e.signature != "string")
2786
2786
  throw new M("JWS Signature missing or incorrect type");
2787
- if (e.header !== void 0 && !be(e.header))
2787
+ if (e.header !== void 0 && !Ie(e.header))
2788
2788
  throw new M("JWS Unprotected Header incorrect type");
2789
2789
  let r = {};
2790
2790
  if (e.protected)
2791
2791
  try {
2792
- const y = Re(e.protected);
2793
- r = JSON.parse(ge.decode(y));
2792
+ const y = ve(e.protected);
2793
+ r = JSON.parse(Se.decode(y));
2794
2794
  } catch {
2795
2795
  throw new M("JWS Protected Header is invalid");
2796
2796
  }
@@ -2816,10 +2816,10 @@ async function vn(e, t, s) {
2816
2816
  throw new M("JWS Payload must be a string or an Uint8Array instance");
2817
2817
  let d = !1;
2818
2818
  typeof t == "function" && (t = await t(r, e), d = !0), wn(o, t, "verify");
2819
- const u = Br(e.protected !== void 0 ? je(e.protected) : new Uint8Array(), je("."), typeof e.payload == "string" ? i ? je(e.payload) : Dt.encode(e.payload) : e.payload);
2819
+ const u = Br(e.protected !== void 0 ? We(e.protected) : new Uint8Array(), We("."), typeof e.payload == "string" ? i ? We(e.payload) : Ut.encode(e.payload) : e.payload);
2820
2820
  let h;
2821
2821
  try {
2822
- h = Re(e.signature);
2822
+ h = ve(e.signature);
2823
2823
  } catch {
2824
2824
  throw new M("Failed to base64url decode the signature");
2825
2825
  }
@@ -2829,16 +2829,16 @@ async function vn(e, t, s) {
2829
2829
  let p;
2830
2830
  if (i)
2831
2831
  try {
2832
- p = Re(e.payload);
2832
+ p = ve(e.payload);
2833
2833
  } catch {
2834
2834
  throw new M("Failed to base64url decode the payload");
2835
2835
  }
2836
- else typeof e.payload == "string" ? p = Dt.encode(e.payload) : p = e.payload;
2836
+ else typeof e.payload == "string" ? p = Ut.encode(e.payload) : p = e.payload;
2837
2837
  const f = { payload: p };
2838
2838
  return e.protected !== void 0 && (f.protectedHeader = r), e.header !== void 0 && (f.unprotectedHeader = e.header), d ? { ...f, key: l } : f;
2839
2839
  }
2840
2840
  async function bn(e, t, s) {
2841
- if (e instanceof Uint8Array && (e = ge.decode(e)), typeof e != "string")
2841
+ if (e instanceof Uint8Array && (e = Se.decode(e)), typeof e != "string")
2842
2842
  throw new M("Compact JWS must be a string or Uint8Array");
2843
2843
  const { 0: r, 1: n, 2: a, length: i } = e.split(".");
2844
2844
  if (i !== 3)
@@ -2846,8 +2846,8 @@ async function bn(e, t, s) {
2846
2846
  const o = await vn({ payload: n, protected: r, signature: a }, t, s), c = { payload: o.payload, protectedHeader: o.protectedHeader };
2847
2847
  return typeof t == "function" ? { ...c, key: o.key } : c;
2848
2848
  }
2849
- const In = (e) => Math.floor(e.getTime() / 1e3), bs = 60, Is = bs * 60, gt = Is * 24, _n = gt * 7, On = gt * 365.25, Cn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;
2850
- function Lt(e) {
2849
+ const In = (e) => Math.floor(e.getTime() / 1e3), _s = 60, Os = _s * 60, wt = Os * 24, _n = wt * 7, On = wt * 365.25, Cn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;
2850
+ function Ft(e) {
2851
2851
  const t = Cn.exec(e);
2852
2852
  if (!t || t[4] && t[1])
2853
2853
  throw new TypeError("Invalid time period format");
@@ -2866,19 +2866,19 @@ function Lt(e) {
2866
2866
  case "min":
2867
2867
  case "mins":
2868
2868
  case "m":
2869
- n = Math.round(s * bs);
2869
+ n = Math.round(s * _s);
2870
2870
  break;
2871
2871
  case "hour":
2872
2872
  case "hours":
2873
2873
  case "hr":
2874
2874
  case "hrs":
2875
2875
  case "h":
2876
- n = Math.round(s * Is);
2876
+ n = Math.round(s * Os);
2877
2877
  break;
2878
2878
  case "day":
2879
2879
  case "days":
2880
2880
  case "d":
2881
- n = Math.round(s * gt);
2881
+ n = Math.round(s * wt);
2882
2882
  break;
2883
2883
  case "week":
2884
2884
  case "weeks":
@@ -2891,17 +2891,17 @@ function Lt(e) {
2891
2891
  }
2892
2892
  return t[1] === "-" || t[4] === "ago" ? -n : n;
2893
2893
  }
2894
- const Ht = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, Pn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
2894
+ const Kt = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, Pn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
2895
2895
  function Mn(e, t, s = {}) {
2896
2896
  let r;
2897
2897
  try {
2898
- r = JSON.parse(ge.decode(t));
2898
+ r = JSON.parse(Se.decode(t));
2899
2899
  } catch {
2900
2900
  }
2901
- if (!be(r))
2901
+ if (!Ie(r))
2902
2902
  throw new J("JWT Claims Set must be a top-level JSON object");
2903
2903
  const { typ: n } = s;
2904
- if (n && (typeof e.typ != "string" || Ht(e.typ) !== Ht(n)))
2904
+ if (n && (typeof e.typ != "string" || Kt(e.typ) !== Kt(n)))
2905
2905
  throw new q('unexpected "typ" JWT header value', r, "typ", "check_failed");
2906
2906
  const { requiredClaims: a = [], issuer: i, subject: o, audience: c, maxTokenAge: d } = s, u = [...a];
2907
2907
  d !== void 0 && u.push("iat"), c !== void 0 && u.push("aud"), o !== void 0 && u.push("sub"), i !== void 0 && u.push("iss");
@@ -2917,7 +2917,7 @@ function Mn(e, t, s = {}) {
2917
2917
  let h;
2918
2918
  switch (typeof s.clockTolerance) {
2919
2919
  case "string":
2920
- h = Lt(s.clockTolerance);
2920
+ h = Ft(s.clockTolerance);
2921
2921
  break;
2922
2922
  case "number":
2923
2923
  h = s.clockTolerance;
@@ -2941,12 +2941,12 @@ function Mn(e, t, s = {}) {
2941
2941
  if (typeof r.exp != "number")
2942
2942
  throw new q('"exp" claim must be a number', r, "exp", "invalid");
2943
2943
  if (r.exp <= p - h)
2944
- throw new Nt('"exp" claim timestamp check failed', r, "exp", "check_failed");
2944
+ throw new Lt('"exp" claim timestamp check failed', r, "exp", "check_failed");
2945
2945
  }
2946
2946
  if (d) {
2947
- const f = p - r.iat, y = typeof d == "number" ? d : Lt(d);
2947
+ const f = p - r.iat, y = typeof d == "number" ? d : Ft(d);
2948
2948
  if (f - h > y)
2949
- throw new Nt('"iat" claim timestamp check failed (too far in the past)', r, "iat", "check_failed");
2949
+ throw new Lt('"iat" claim timestamp check failed (too far in the past)', r, "iat", "check_failed");
2950
2950
  if (f < 0 - h)
2951
2951
  throw new q('"iat" claim timestamp check failed (it should be in the past)', r, "iat", "check_failed");
2952
2952
  }
@@ -2959,7 +2959,7 @@ async function $n(e, t, s) {
2959
2959
  const n = { payload: Mn(r.protectedHeader, r.payload, s), protectedHeader: r.protectedHeader };
2960
2960
  return typeof t == "function" ? { ...n, key: r.key } : n;
2961
2961
  }
2962
- function kn(e) {
2962
+ function Dn(e) {
2963
2963
  if (typeof e != "string")
2964
2964
  throw new J("JWTs must use Compact JWS serialization, JWT must be a string");
2965
2965
  const { 1: t, length: s } = e.split(".");
@@ -2971,32 +2971,32 @@ function kn(e) {
2971
2971
  throw new J("JWTs must contain a payload");
2972
2972
  let r;
2973
2973
  try {
2974
- r = Re(t);
2974
+ r = ve(t);
2975
2975
  } catch {
2976
2976
  throw new J("Failed to base64url decode the payload");
2977
2977
  }
2978
2978
  let n;
2979
2979
  try {
2980
- n = JSON.parse(ge.decode(r));
2980
+ n = JSON.parse(Se.decode(r));
2981
2981
  } catch {
2982
2982
  throw new J("Failed to parse the decoded payload as JSON");
2983
2983
  }
2984
- if (!be(n))
2984
+ if (!Ie(n))
2985
2985
  throw new J("Invalid JWT Claims Set");
2986
2986
  return n;
2987
2987
  }
2988
- const Ie = async (e) => {
2988
+ const _e = async (e) => {
2989
2989
  try {
2990
- const t = k.ALG, s = await ln(qr, t);
2990
+ const t = D.ALG, s = await ln(qr, t);
2991
2991
  return await $n(e, s, {
2992
- issuer: k.ISSUER
2992
+ issuer: D.ISSUER
2993
2993
  });
2994
2994
  } catch {
2995
2995
  return;
2996
2996
  }
2997
- }, Dn = (e) => {
2997
+ }, kn = (e) => {
2998
2998
  try {
2999
- return kn(e);
2999
+ return Dn(e);
3000
3000
  } catch {
3001
3001
  return;
3002
3002
  }
@@ -3006,35 +3006,35 @@ for (let e = 0; e < 256; ++e)
3006
3006
  function Nn(e, t = 0) {
3007
3007
  return (C[e[t + 0]] + C[e[t + 1]] + C[e[t + 2]] + C[e[t + 3]] + "-" + C[e[t + 4]] + C[e[t + 5]] + "-" + C[e[t + 6]] + C[e[t + 7]] + "-" + C[e[t + 8]] + C[e[t + 9]] + "-" + C[e[t + 10]] + C[e[t + 11]] + C[e[t + 12]] + C[e[t + 13]] + C[e[t + 14]] + C[e[t + 15]]).toLowerCase();
3008
3008
  }
3009
- let Je;
3009
+ let Ye;
3010
3010
  const Un = new Uint8Array(16);
3011
3011
  function Ln() {
3012
- if (!Je) {
3012
+ if (!Ye) {
3013
3013
  if (typeof crypto > "u" || !crypto.getRandomValues)
3014
3014
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3015
- Je = crypto.getRandomValues.bind(crypto);
3015
+ Ye = crypto.getRandomValues.bind(crypto);
3016
3016
  }
3017
- return Je(Un);
3017
+ return Ye(Un);
3018
3018
  }
3019
- const Hn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ft = { randomUUID: Hn };
3020
- function Kt(e, t, s) {
3021
- if (Ft.randomUUID && !e)
3022
- return Ft.randomUUID();
3019
+ const Hn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), xt = { randomUUID: Hn };
3020
+ function Gt(e, t, s) {
3021
+ if (xt.randomUUID && !e)
3022
+ return xt.randomUUID();
3023
3023
  e = e || {};
3024
3024
  const r = e.random ?? e.rng?.() ?? Ln();
3025
3025
  if (r.length < 16)
3026
3026
  throw new Error("Random bytes length must be >= 16");
3027
3027
  return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Nn(r);
3028
3028
  }
3029
- const xt = globalThis.crypto, Fn = (e) => `${Kt()}${Kt()}`.slice(0, e), Kn = (e) => btoa(
3029
+ const qt = globalThis.crypto, Fn = (e) => `${Gt()}${Gt()}`.slice(0, e), Kn = (e) => btoa(
3030
3030
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
3031
3031
  );
3032
3032
  async function xn(e) {
3033
- if (!xt.subtle)
3033
+ if (!qt.subtle)
3034
3034
  throw new Error(
3035
3035
  "crypto.subtle is available only in secure contexts (HTTPS)."
3036
3036
  );
3037
- const t = new TextEncoder().encode(e), s = await xt.subtle.digest("SHA-256", t);
3037
+ const t = new TextEncoder().encode(e), s = await qt.subtle.digest("SHA-256", t);
3038
3038
  return Kn(s).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
3039
3039
  }
3040
3040
  async function Gn(e) {
@@ -3044,8 +3044,8 @@ async function Gn(e) {
3044
3044
  code_challenge: r
3045
3045
  };
3046
3046
  }
3047
- const _s = ut(null);
3048
- var qn = Object.defineProperty, Bn = (e, t, s) => t in e ? qn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, Ve = (e, t, s) => Bn(e, typeof t != "symbol" ? t + "" : t, s);
3047
+ const Cs = ht(null);
3048
+ var qn = Object.defineProperty, Bn = (e, t, s) => t in e ? qn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, ze = (e, t, s) => Bn(e, typeof t != "symbol" ? t + "" : t, s);
3049
3049
  try {
3050
3050
  window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
3051
3051
  version: "8.1.1",
@@ -3062,23 +3062,23 @@ function j(e) {
3062
3062
  s += String.fromCharCode(r);
3063
3063
  return btoa(s).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
3064
3064
  }
3065
- function Fe(e) {
3065
+ function xe(e) {
3066
3066
  const t = e.replace(/-/g, "+").replace(/_/g, "/"), s = (4 - t.length % 4) % 4, r = t.padEnd(t.length + s, "="), n = atob(r), a = new ArrayBuffer(n.length), i = new Uint8Array(a);
3067
3067
  for (let o = 0; o < n.length; o++)
3068
3068
  i[o] = n.charCodeAt(o);
3069
3069
  return a;
3070
3070
  }
3071
- function St() {
3071
+ function Tt() {
3072
3072
  return jn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
3073
3073
  }
3074
3074
  const jn = {
3075
3075
  stubThis: (e) => e
3076
3076
  };
3077
- function Os(e) {
3077
+ function Ps(e) {
3078
3078
  const { id: t } = e;
3079
3079
  return {
3080
3080
  ...e,
3081
- id: Fe(t),
3081
+ id: xe(t),
3082
3082
  /**
3083
3083
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
3084
3084
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -3087,7 +3087,7 @@ function Os(e) {
3087
3087
  transports: e.transports
3088
3088
  };
3089
3089
  }
3090
- function Cs(e) {
3090
+ function Ms(e) {
3091
3091
  return (
3092
3092
  // Consider localhost valid as well since it's okay wrt Secure Contexts
3093
3093
  e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
@@ -3161,7 +3161,7 @@ function Qn({ error: e, options: t }) {
3161
3161
  });
3162
3162
  if (e.name === "SecurityError") {
3163
3163
  const r = globalThis.location.hostname;
3164
- if (Cs(r)) {
3164
+ if (Ms(r)) {
3165
3165
  if (s.rp.id !== r)
3166
3166
  return new $({
3167
3167
  message: `The RP ID "${s.rp.id}" is invalid for this domain`,
@@ -3213,26 +3213,26 @@ class Wn {
3213
3213
  }
3214
3214
  }
3215
3215
  }
3216
- const Ps = new Wn(), Jn = ["cross-platform", "platform"];
3217
- function Ms(e) {
3216
+ const $s = new Wn(), Jn = ["cross-platform", "platform"];
3217
+ function Ds(e) {
3218
3218
  if (e && !(Jn.indexOf(e) < 0))
3219
3219
  return e;
3220
3220
  }
3221
3221
  async function Vn(e) {
3222
3222
  !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 });
3223
3223
  const { optionsJSON: t, useAutoRegister: s = !1 } = e;
3224
- if (!St())
3224
+ if (!Tt())
3225
3225
  throw new Error("WebAuthn is not supported in this browser");
3226
3226
  const r = {
3227
3227
  ...t,
3228
- challenge: Fe(t.challenge),
3228
+ challenge: xe(t.challenge),
3229
3229
  user: {
3230
3230
  ...t.user,
3231
- id: Fe(t.user.id)
3231
+ id: xe(t.user.id)
3232
3232
  },
3233
- excludeCredentials: t.excludeCredentials?.map(Os)
3233
+ excludeCredentials: t.excludeCredentials?.map(Ps)
3234
3234
  }, n = {};
3235
- s && (n.mediation = "conditional"), n.publicKey = r, n.signal = Ps.createNewAbortSignal();
3235
+ s && (n.mediation = "conditional"), n.publicKey = r, n.signal = $s.createNewAbortSignal();
3236
3236
  let a;
3237
3237
  try {
3238
3238
  a = await navigator.credentials.create(n);
@@ -3249,7 +3249,7 @@ async function Vn(e) {
3249
3249
  try {
3250
3250
  h = c.getPublicKeyAlgorithm();
3251
3251
  } catch (f) {
3252
- Ye("getPublicKeyAlgorithm()", f);
3252
+ Xe("getPublicKeyAlgorithm()", f);
3253
3253
  }
3254
3254
  let l;
3255
3255
  if (typeof c.getPublicKey == "function")
@@ -3257,14 +3257,14 @@ async function Vn(e) {
3257
3257
  const f = c.getPublicKey();
3258
3258
  f !== null && (l = j(f));
3259
3259
  } catch (f) {
3260
- Ye("getPublicKey()", f);
3260
+ Xe("getPublicKey()", f);
3261
3261
  }
3262
3262
  let p;
3263
3263
  if (typeof c.getAuthenticatorData == "function")
3264
3264
  try {
3265
3265
  p = j(c.getAuthenticatorData());
3266
3266
  } catch (f) {
3267
- Ye("getAuthenticatorData()", f);
3267
+ Xe("getAuthenticatorData()", f);
3268
3268
  }
3269
3269
  return {
3270
3270
  id: i,
@@ -3279,20 +3279,20 @@ async function Vn(e) {
3279
3279
  },
3280
3280
  type: d,
3281
3281
  clientExtensionResults: a.getClientExtensionResults(),
3282
- authenticatorAttachment: Ms(a.authenticatorAttachment)
3282
+ authenticatorAttachment: Ds(a.authenticatorAttachment)
3283
3283
  };
3284
3284
  }
3285
- function Ye(e, t) {
3285
+ function Xe(e, t) {
3286
3286
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
3287
3287
  `, t);
3288
3288
  }
3289
3289
  function Yn() {
3290
- if (!St())
3291
- return ze.stubThis(new Promise((t) => t(!1)));
3290
+ if (!Tt())
3291
+ return Ze.stubThis(new Promise((t) => t(!1)));
3292
3292
  const e = globalThis.PublicKeyCredential;
3293
- return e?.isConditionalMediationAvailable === void 0 ? ze.stubThis(new Promise((t) => t(!1))) : ze.stubThis(e.isConditionalMediationAvailable());
3293
+ return e?.isConditionalMediationAvailable === void 0 ? Ze.stubThis(new Promise((t) => t(!1))) : Ze.stubThis(e.isConditionalMediationAvailable());
3294
3294
  }
3295
- const ze = {
3295
+ const Ze = {
3296
3296
  stubThis: (e) => e
3297
3297
  };
3298
3298
  function zn({ error: e, options: t }) {
@@ -3315,7 +3315,7 @@ function zn({ error: e, options: t }) {
3315
3315
  });
3316
3316
  if (e.name === "SecurityError") {
3317
3317
  const r = globalThis.location.hostname;
3318
- if (Cs(r)) {
3318
+ if (Ms(r)) {
3319
3319
  if (s.rpId !== r)
3320
3320
  return new $({
3321
3321
  message: `The RP ID "${s.rpId}" is invalid for this domain`,
@@ -3339,13 +3339,13 @@ function zn({ error: e, options: t }) {
3339
3339
  async function Xn(e) {
3340
3340
  !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 });
3341
3341
  const { optionsJSON: t, useBrowserAutofill: s = !1, verifyBrowserAutofillInput: r = !0 } = e;
3342
- if (!St())
3342
+ if (!Tt())
3343
3343
  throw new Error("WebAuthn is not supported in this browser");
3344
3344
  let n;
3345
- t.allowCredentials?.length !== 0 && (n = t.allowCredentials?.map(Os));
3345
+ t.allowCredentials?.length !== 0 && (n = t.allowCredentials?.map(Ps));
3346
3346
  const a = {
3347
3347
  ...t,
3348
- challenge: Fe(t.challenge),
3348
+ challenge: xe(t.challenge),
3349
3349
  allowCredentials: n
3350
3350
  }, i = {};
3351
3351
  if (s) {
@@ -3355,7 +3355,7 @@ async function Xn(e) {
3355
3355
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
3356
3356
  i.mediation = "conditional", a.allowCredentials = [];
3357
3357
  }
3358
- i.publicKey = a, i.signal = Ps.createNewAbortSignal();
3358
+ i.publicKey = a, i.signal = $s.createNewAbortSignal();
3359
3359
  let o;
3360
3360
  try {
3361
3361
  o = await navigator.credentials.get(i);
@@ -3377,7 +3377,7 @@ async function Xn(e) {
3377
3377
  },
3378
3378
  type: h,
3379
3379
  clientExtensionResults: o.getClientExtensionResults(),
3380
- authenticatorAttachment: Ms(o.authenticatorAttachment)
3380
+ authenticatorAttachment: Ds(o.authenticatorAttachment)
3381
3381
  };
3382
3382
  }
3383
3383
  try {
@@ -3389,23 +3389,23 @@ try {
3389
3389
  });
3390
3390
  } catch {
3391
3391
  }
3392
- function $s(e, t) {
3392
+ function ks(e, t) {
3393
3393
  window.dispatchEvent(new StorageEvent("storage", {
3394
3394
  key: e,
3395
3395
  newValue: t
3396
3396
  }));
3397
3397
  }
3398
- const Gt = (e, t) => {
3398
+ const Bt = (e, t) => {
3399
3399
  const s = JSON.stringify(typeof t == "function" ? t() : t);
3400
- window.localStorage.setItem(e, s), $s(e, s);
3400
+ window.localStorage.setItem(e, s), ks(e, s);
3401
3401
  }, Zn = (e) => {
3402
- window.localStorage.removeItem(e), $s(e, null);
3403
- }, qt = (e) => window.localStorage.getItem(e), ea = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3404
- function Ce({ key: e, initialValue: t }) {
3405
- const s = zs(ea, () => qt(e)), r = Q((i) => {
3402
+ window.localStorage.removeItem(e), ks(e, null);
3403
+ }, jt = (e) => window.localStorage.getItem(e), ea = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3404
+ function Me({ key: e, initialValue: t }) {
3405
+ const s = zs(ea, () => jt(e)), r = Q((i) => {
3406
3406
  try {
3407
3407
  const o = typeof i == "function" ? i(JSON.parse(s)) : i;
3408
- o == null ? Zn(e) : Gt(e, o);
3408
+ o == null ? Zn(e) : Bt(e, o);
3409
3409
  } catch (o) {
3410
3410
  console.warn(o);
3411
3411
  }
@@ -3422,9 +3422,9 @@ function Ce({ key: e, initialValue: t }) {
3422
3422
  }, [
3423
3423
  r
3424
3424
  ]);
3425
- return me(() => {
3425
+ return Ee(() => {
3426
3426
  try {
3427
- qt(e) === null && typeof t < "u" && Gt(e, t);
3427
+ jt(e) === null && typeof t < "u" && Bt(e, t);
3428
3428
  } catch (i) {
3429
3429
  console.warn(i);
3430
3430
  }
@@ -3444,27 +3444,27 @@ for (let e = 0; e < 256; ++e)
3444
3444
  function ta(e, t = 0) {
3445
3445
  return (P[e[t + 0]] + P[e[t + 1]] + P[e[t + 2]] + P[e[t + 3]] + "-" + P[e[t + 4]] + P[e[t + 5]] + "-" + P[e[t + 6]] + P[e[t + 7]] + "-" + P[e[t + 8]] + P[e[t + 9]] + "-" + P[e[t + 10]] + P[e[t + 11]] + P[e[t + 12]] + P[e[t + 13]] + P[e[t + 14]] + P[e[t + 15]]).toLowerCase();
3446
3446
  }
3447
- let Xe;
3447
+ let et;
3448
3448
  const sa = new Uint8Array(16);
3449
3449
  function ra() {
3450
- if (!Xe) {
3450
+ if (!et) {
3451
3451
  if (typeof crypto > "u" || !crypto.getRandomValues)
3452
3452
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3453
- Xe = crypto.getRandomValues.bind(crypto);
3453
+ et = crypto.getRandomValues.bind(crypto);
3454
3454
  }
3455
- return Xe(sa);
3455
+ return et(sa);
3456
3456
  }
3457
- const na = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Bt = { randomUUID: na };
3458
- function Ze(e, t, s) {
3459
- if (Bt.randomUUID && !e)
3460
- return Bt.randomUUID();
3457
+ const na = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Qt = { randomUUID: na };
3458
+ function tt(e, t, s) {
3459
+ if (Qt.randomUUID && !e)
3460
+ return Qt.randomUUID();
3461
3461
  e = e || {};
3462
3462
  const r = e.random ?? e.rng?.() ?? ra();
3463
3463
  if (r.length < 16)
3464
3464
  throw new Error("Random bytes length must be >= 16");
3465
3465
  return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, ta(r);
3466
3466
  }
3467
- const he = "Your session has expired. For your security, please log in again to continue.", aa = "Your session has been successfully terminated.", et = "Login failed. Please try again.", ia = "Error getting access token, please re-authenticate.", oa = "You forgot to wrap your component in <AuthProvider>.", Pe = "@@auth@@", Te = "LOADING", $e = "LOGIN", ks = "LOGOUT", _e = "success", W = "failure", Ds = "include", Ns = "POST", Us = "application/json", Me = {
3467
+ const de = "Your session has expired. For your security, please log in again to continue.", aa = "Your session has been successfully terminated.", st = "Login failed. Please try again.", ia = "Error getting access token, please re-authenticate.", oa = "You forgot to wrap your component in <AuthProvider>.", $e = "@@auth@@", Ae = "LOADING", ke = "LOGIN", Ns = "LOGOUT", Oe = "success", W = "failure", Us = "include", Ls = "POST", Hs = "application/json", De = {
3468
3468
  GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
3469
3469
  $clientId: String!,
3470
3470
  $username: String!,
@@ -3545,24 +3545,24 @@ const he = "Your session has expired. For your security, please log in again to
3545
3545
  email
3546
3546
  }
3547
3547
  }`
3548
- }, de = {
3548
+ }, fe = {
3549
3549
  GET_REGISTRATION_OPTIONS: {
3550
- schema: Me.GET_REGISTRATION_OPTIONS,
3550
+ schema: De.GET_REGISTRATION_OPTIONS,
3551
3551
  method: "getPasskeyRegistrationOptions"
3552
3552
  },
3553
3553
  VERIFY_REGISTRATION: {
3554
- schema: Me.VERIFY_REGISTRATION,
3554
+ schema: De.VERIFY_REGISTRATION,
3555
3555
  method: "verifyPasskeyRegistration"
3556
3556
  },
3557
3557
  GET_AUTHENTICATION_OPTIONS: {
3558
- schema: Me.GET_AUTHENTICATION_OPTIONS,
3558
+ schema: De.GET_AUTHENTICATION_OPTIONS,
3559
3559
  method: "getPasskeyAuthenticationOptions"
3560
3560
  },
3561
3561
  VERIFY_AUTHENTICATION: {
3562
- schema: Me.VERIFY_AUTHENTICATION,
3562
+ schema: De.VERIFY_AUTHENTICATION,
3563
3563
  method: "verifyPasskeyAuthentication"
3564
3564
  }
3565
- }, fe = async ({
3565
+ }, pe = async ({
3566
3566
  accessToken: e,
3567
3567
  type: t,
3568
3568
  clientId: s,
@@ -3571,12 +3571,12 @@ const he = "Your session has expired. For your security, please log in again to
3571
3571
  }) => {
3572
3572
  try {
3573
3573
  const a = `Bearer ${e}`, i = await fetch(`${n}/graphql`, {
3574
- credentials: Ds,
3575
- method: Ns,
3574
+ credentials: Us,
3575
+ method: Ls,
3576
3576
  headers: {
3577
3577
  authorization: a,
3578
- "Content-Type": Us,
3579
- [Es.CLIENT_ID]: `${s}`
3578
+ "Content-Type": Hs,
3579
+ [Ss.CLIENT_ID]: `${s}`
3580
3580
  },
3581
3581
  body: JSON.stringify({
3582
3582
  query: t.schema,
@@ -3587,13 +3587,13 @@ const he = "Your session has expired. For your security, please log in again to
3587
3587
  return { status: W, data: [] };
3588
3588
  const { data: o } = await i.json();
3589
3589
  return {
3590
- status: _e,
3590
+ status: Oe,
3591
3591
  data: o[t.method]
3592
3592
  };
3593
3593
  } catch (a) {
3594
3594
  return console.error(a), { status: W, data: [] };
3595
3595
  }
3596
- }, Be = async ({
3596
+ }, Qe = async ({
3597
3597
  type: e,
3598
3598
  clientId: t,
3599
3599
  params: s = {},
@@ -3601,11 +3601,11 @@ const he = "Your session has expired. For your security, please log in again to
3601
3601
  }) => {
3602
3602
  try {
3603
3603
  const n = await fetch(`${r}/${e}`, {
3604
- credentials: Ds,
3605
- method: Ns,
3604
+ credentials: Us,
3605
+ method: Ls,
3606
3606
  headers: {
3607
- "Content-Type": Us,
3608
- [Es.CLIENT_ID]: `${t}`
3607
+ "Content-Type": Hs,
3608
+ [Ss.CLIENT_ID]: `${t}`
3609
3609
  },
3610
3610
  body: JSON.stringify(s)
3611
3611
  });
@@ -3613,13 +3613,13 @@ const he = "Your session has expired. For your security, please log in again to
3613
3613
  return { status: W, data: [] };
3614
3614
  const { data: a } = await n.json();
3615
3615
  return {
3616
- status: _e,
3616
+ status: Oe,
3617
3617
  data: a || []
3618
3618
  };
3619
3619
  } catch (n) {
3620
3620
  return console.error(n), { status: W, data: [] };
3621
3621
  }
3622
- }, ca = process.env.NODE_ENV === "production", ua = !ca, Ls = {
3622
+ }, ca = process.env.NODE_ENV === "production", ua = !ca, Fs = {
3623
3623
  isLoading: !0,
3624
3624
  isAuthenticated: !1,
3625
3625
  user: void 0,
@@ -3628,8 +3628,8 @@ const he = "Your session has expired. For your security, please log in again to
3628
3628
  authenticationType: ""
3629
3629
  }, la = (e) => {
3630
3630
  try {
3631
- const t = Dn(e);
3632
- return t ? t[k.USER_ID_KEY] : "";
3631
+ const t = kn(e);
3632
+ return t ? t[D.USER_ID_KEY] : "";
3633
3633
  } catch {
3634
3634
  return "";
3635
3635
  }
@@ -3642,9 +3642,9 @@ const he = "Your session has expired. For your security, please log in again to
3642
3642
  }) => {
3643
3643
  try {
3644
3644
  return {
3645
- status: (await Be({
3645
+ status: (await Qe({
3646
3646
  endpoint: n,
3647
- type: qe.LOGOUT,
3647
+ type: je.LOGOUT,
3648
3648
  clientId: t,
3649
3649
  params: {
3650
3650
  userId: e,
@@ -3672,9 +3672,9 @@ const he = "Your session has expired. For your security, please log in again to
3672
3672
  endpoint: u
3673
3673
  }) => {
3674
3674
  try {
3675
- const h = await Be({
3675
+ const h = await Qe({
3676
3676
  endpoint: u,
3677
- type: qe.LOGIN,
3677
+ type: je.LOGIN,
3678
3678
  clientId: s,
3679
3679
  params: {
3680
3680
  type: n,
@@ -3687,13 +3687,13 @@ const he = "Your session has expired. For your security, please log in again to
3687
3687
  domain: c,
3688
3688
  ua: d
3689
3689
  }
3690
- }), l = await Ie(h?.data?.idToken);
3691
- return l && l.payload[k.USER_ID_KEY] !== "" && l.payload[k.NONCE_KEY] === r ? {
3690
+ }), l = await _e(h?.data?.idToken);
3691
+ return l && l.payload[D.USER_ID_KEY] !== "" && l.payload[D.NONCE_KEY] === r ? {
3692
3692
  idToken: h.data.idToken,
3693
3693
  accessToken: h.data.accessToken,
3694
3694
  refreshToken: h.data.refreshToken,
3695
- userId: l.payload[k.USER_ID_KEY],
3696
- email: l.payload[k.EMAIL_KEY],
3695
+ userId: l.payload[D.USER_ID_KEY],
3696
+ email: l.payload[D.EMAIL_KEY],
3697
3697
  status: !0
3698
3698
  } : {
3699
3699
  status: !1
@@ -3710,18 +3710,18 @@ const he = "Your session has expired. For your security, please log in again to
3710
3710
  endpoint: r
3711
3711
  }) => {
3712
3712
  try {
3713
- const n = await Be({
3713
+ const n = await Qe({
3714
3714
  endpoint: r,
3715
- type: qe.CODE,
3715
+ type: je.CODE,
3716
3716
  clientId: t,
3717
3717
  params: {
3718
- type: Ae.CODE,
3718
+ type: Re.CODE,
3719
3719
  nonce: e,
3720
3720
  code_challenge: s
3721
3721
  }
3722
3722
  });
3723
3723
  return n?.data?.code ? {
3724
- status: _e,
3724
+ status: Oe,
3725
3725
  data: n.data.code
3726
3726
  } : {
3727
3727
  status: W,
@@ -3743,23 +3743,23 @@ const he = "Your session has expired. For your security, please log in again to
3743
3743
  endpoint: i
3744
3744
  }) => {
3745
3745
  try {
3746
- const o = await Be({
3746
+ const o = await Qe({
3747
3747
  endpoint: i,
3748
- type: qe.REFRESH,
3748
+ type: je.REFRESH,
3749
3749
  clientId: e,
3750
3750
  params: {
3751
- type: Ae.REFRESH_TOKEN,
3751
+ type: Re.REFRESH_TOKEN,
3752
3752
  userId: t,
3753
3753
  nonce: s,
3754
3754
  refreshToken: r,
3755
3755
  accessToken: n,
3756
3756
  domain: a
3757
3757
  }
3758
- }), c = await Ie(o?.data?.accessToken);
3759
- return c && c.payload[k.USER_ID_KEY] !== "" && c.payload[k.NONCE_KEY] === s ? {
3758
+ }), c = await _e(o?.data?.accessToken);
3759
+ return c && c.payload[D.USER_ID_KEY] !== "" && c.payload[D.NONCE_KEY] === s ? {
3760
3760
  accessToken: o.data.accessToken,
3761
3761
  refreshToken: o.data.refreshToken,
3762
- userId: c.payload[k.USER_ID_KEY],
3762
+ userId: c.payload[D.USER_ID_KEY],
3763
3763
  status: !0
3764
3764
  } : {
3765
3765
  status: !1
@@ -3772,7 +3772,7 @@ const he = "Your session has expired. For your security, please log in again to
3772
3772
  };
3773
3773
  class ya {
3774
3774
  constructor(t = null, s = null) {
3775
- Ve(this, "refreshTokenPromise", null), Ve(this, "accessToken"), Ve(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = s || "";
3775
+ ze(this, "refreshTokenPromise", null), ze(this, "accessToken"), ze(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = s || "";
3776
3776
  }
3777
3777
  async refreshtoken({
3778
3778
  clientId: t,
@@ -3801,8 +3801,8 @@ class ya {
3801
3801
  nonce: n,
3802
3802
  domain: a
3803
3803
  }) {
3804
- const i = await Ie(this.refreshToken);
3805
- if (i && i.payload[k.USER_ID_KEY] !== "") {
3804
+ const i = await _e(this.refreshToken);
3805
+ if (i && i.payload[D.USER_ID_KEY] !== "") {
3806
3806
  const o = await pa({
3807
3807
  endpoint: t,
3808
3808
  clientId: s,
@@ -3813,7 +3813,7 @@ class ya {
3813
3813
  domain: a
3814
3814
  });
3815
3815
  return o.status ? (this.accessToken = o.accessToken, this.refreshToken = o.refreshToken, {
3816
- status: _e,
3816
+ status: Oe,
3817
3817
  newAccessToken: o.accessToken,
3818
3818
  newRefreshToken: o.refreshToken
3819
3819
  }) : {
@@ -3825,41 +3825,41 @@ class ya {
3825
3825
  };
3826
3826
  }
3827
3827
  }
3828
- const pe = () => {
3828
+ const ye = () => {
3829
3829
  throw new Error(oa);
3830
- }, Hs = ut({
3830
+ }, Ks = ht({
3831
3831
  isAuthenticated: !1,
3832
3832
  isLoading: !1,
3833
- login: pe,
3834
- logout: pe,
3835
- getAccessToken: pe,
3836
- getIdToken: pe,
3837
- registeringForPasskey: pe,
3838
- loginWithPasskey: pe,
3833
+ login: ye,
3834
+ logout: ye,
3835
+ getAccessToken: ye,
3836
+ getIdToken: ye,
3837
+ registeringForPasskey: ye,
3838
+ loginWithPasskey: ye,
3839
3839
  logoutReason: "",
3840
3840
  authenticationType: ""
3841
3841
  }), ma = () => ({
3842
- ...lt(Hs)
3842
+ ...dt(Ks)
3843
3843
  }), Ea = (e) => Q(
3844
3844
  (...t) => {
3845
3845
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
3846
3846
  },
3847
3847
  [e]
3848
3848
  ), ga = Js.createContext({
3849
- state: Ls,
3849
+ state: Fs,
3850
3850
  dispatch: () => {
3851
3851
  }
3852
- }), Sa = (e, t) => t?.type === Te ? {
3852
+ }), Sa = (e, t) => t?.type === Ae ? {
3853
3853
  ...e,
3854
3854
  isLoading: t.payload.isLoading
3855
- } : t?.type === $e ? {
3855
+ } : t?.type === ke ? {
3856
3856
  ...e,
3857
3857
  isLoading: !1,
3858
3858
  isAuthenticated: !0,
3859
3859
  user: t.payload.user,
3860
3860
  authenticationType: t.payload.authenticationType,
3861
3861
  logoutReason: ""
3862
- } : t?.type === ks ? {
3862
+ } : t?.type === Ns ? {
3863
3863
  ...e,
3864
3864
  isLoading: !1,
3865
3865
  isAuthenticated: !1,
@@ -3868,8 +3868,8 @@ const pe = () => {
3868
3868
  logoutReason: t.payload.logoutReason
3869
3869
  } : e, wa = ({ children: e }) => {
3870
3870
  const t = ma();
3871
- return /* @__PURE__ */ S(_s.Provider, { value: t, children: e });
3872
- }, jt = ({
3871
+ return /* @__PURE__ */ S(Cs.Provider, { value: t, children: e });
3872
+ }, Wt = ({
3873
3873
  children: e,
3874
3874
  sessionExpiration: t,
3875
3875
  clientId: s,
@@ -3878,25 +3878,25 @@ const pe = () => {
3878
3878
  endpoint: a = ua ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
3879
3879
  }) => {
3880
3880
  const [i, o] = Vs(Sa, {
3881
- ...Ls,
3881
+ ...Fs,
3882
3882
  debug: n
3883
- }), c = Ea(n), d = Ys(!1), [u, h, , l] = Ce({
3884
- key: `${Pe}::${s}::@@user@@`
3885
- }), [p, f, , y] = Ce({
3886
- key: `${Pe}::${s}::@@access@@`
3887
- }), [_, v, , L] = Ce(
3883
+ }), c = Ea(n), d = Ys(!1), [u, h, , l] = Me({
3884
+ key: `${$e}::${s}::@@user@@`
3885
+ }), [p, f, , y] = Me({
3886
+ key: `${$e}::${s}::@@access@@`
3887
+ }), [_, v, , U] = Me(
3888
3888
  {
3889
- key: `${Pe}::${s}::@@refresh@@`
3889
+ key: `${$e}::${s}::@@refresh@@`
3890
3890
  }
3891
- ), [K, x, , G] = Ce({
3892
- key: `${Pe}::${s}::@@nonce@@`
3893
- }), we = new ya(p, _), N = Q(() => {
3894
- c("removeLocalStorage: removing local storage"), l(), y(), L(), G();
3891
+ ), [K, x, , G] = Me({
3892
+ key: `${$e}::${s}::@@nonce@@`
3893
+ }), Te = new ya(p, _), L = Q(() => {
3894
+ c("removeLocalStorage: removing local storage"), l(), y(), U(), G();
3895
3895
  }, [
3896
3896
  y,
3897
3897
  l,
3898
3898
  G,
3899
- L,
3899
+ U,
3900
3900
  c
3901
3901
  ]), b = Q(
3902
3902
  (m) => {
@@ -3904,13 +3904,13 @@ const pe = () => {
3904
3904
  "removeStateAndLocalStorage: removing state and local storage with reason: ",
3905
3905
  m
3906
3906
  ), o({
3907
- type: ks,
3907
+ type: Ns,
3908
3908
  payload: {
3909
- logoutReason: m || he
3909
+ logoutReason: m || de
3910
3910
  }
3911
- }), N(), o({ type: Te, payload: { isLoading: !1 } });
3911
+ }), L(), o({ type: Ae, payload: { isLoading: !1 } });
3912
3912
  },
3913
- [N, c]
3913
+ [L, c]
3914
3914
  ), H = Q(
3915
3915
  async (m) => {
3916
3916
  c("invalidateAndLogout: invalidating and logging out");
@@ -3923,7 +3923,7 @@ const pe = () => {
3923
3923
  domain: r,
3924
3924
  idToken: u,
3925
3925
  endpoint: a
3926
- }), b(m || he);
3926
+ }), b(m || de);
3927
3927
  },
3928
3928
  [
3929
3929
  u,
@@ -3935,82 +3935,82 @@ const pe = () => {
3935
3935
  a
3936
3936
  ]
3937
3937
  );
3938
- me(() => {
3938
+ Ee(() => {
3939
3939
  if (!d.current)
3940
3940
  return i.isLoading && u !== null ? (async () => {
3941
3941
  try {
3942
- const m = await Ie(u);
3943
- m && m.payload[k.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
3944
- type: $e,
3942
+ const m = await _e(u);
3943
+ m && m.payload[D.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
3944
+ type: ke,
3945
3945
  payload: {
3946
- authenticationType: m.payload[k.AUTH_TYPE_KEY],
3946
+ authenticationType: m.payload[D.AUTH_TYPE_KEY],
3947
3947
  user: {
3948
- userId: m.payload[k.USER_ID_KEY],
3949
- username: m.payload[k.USERNAME_KEY],
3950
- email: m.payload[k.EMAIL_KEY]
3948
+ userId: m.payload[D.USER_ID_KEY],
3949
+ username: m.payload[D.USERNAME_KEY],
3950
+ email: m.payload[D.EMAIL_KEY]
3951
3951
  }
3952
3952
  }
3953
- })) : (c("useEffect: invalid JWT, invalidating and logging out"), await H(he));
3953
+ })) : (c("useEffect: invalid JWT, invalidating and logging out"), await H(de));
3954
3954
  } catch {
3955
3955
  c(
3956
3956
  "useEffect: exception validating JWT, invalidating and logging out"
3957
- ), await H(he);
3957
+ ), await H(de);
3958
3958
  }
3959
- })() : (c("useEffect: setting the loading state to false"), o({ type: Te, payload: { isLoading: !1 } })), () => {
3959
+ })() : (c("useEffect: setting the loading state to false"), o({ type: Ae, payload: { isLoading: !1 } })), () => {
3960
3960
  d.current = !0;
3961
3961
  };
3962
3962
  }, [i.isLoading, u, H, c]);
3963
- const ee = async (m, O) => {
3964
- o({ type: Te, payload: { isLoading: !0 } }), N();
3965
- const E = Ze();
3963
+ const ie = async (m, O) => {
3964
+ o({ type: Ae, payload: { isLoading: !0 } }), L();
3965
+ const E = tt();
3966
3966
  x(E), c("login: Logging in with password");
3967
- const { code_verifier: ce, code_challenge: Qs } = await Gn(), wt = await fa({
3967
+ const { code_verifier: ue, code_challenge: Qs } = await Gn(), At = await fa({
3968
3968
  endpoint: a,
3969
3969
  nonce: E,
3970
3970
  clientId: s,
3971
3971
  code_challenge: Qs
3972
3972
  });
3973
- if (wt.status) {
3974
- const ue = await da({
3973
+ if (At.status) {
3974
+ const le = await da({
3975
3975
  endpoint: a,
3976
3976
  username: m,
3977
3977
  password: O,
3978
3978
  clientId: s,
3979
3979
  sessionExpiration: t,
3980
3980
  nonce: E,
3981
- type: Ae.CODE,
3982
- code: wt.data,
3983
- code_verifier: ce,
3981
+ type: Re.CODE,
3982
+ code: At.data,
3983
+ code_verifier: ue,
3984
3984
  domain: r,
3985
3985
  ua: navigator.userAgent
3986
3986
  });
3987
- return ue.status ? (h(ue.idToken), f(ue.accessToken), v(ue.refreshToken), o({
3988
- type: $e,
3987
+ return le.status ? (h(le.idToken), f(le.accessToken), v(le.refreshToken), o({
3988
+ type: ke,
3989
3989
  payload: {
3990
- authenticationType: Ae.CODE,
3990
+ authenticationType: Re.CODE,
3991
3991
  user: {
3992
- userId: ue.userId,
3992
+ userId: le.userId,
3993
3993
  username: m,
3994
- email: ue.email
3994
+ email: le.email
3995
3995
  }
3996
3996
  }
3997
- }), !0) : (b(et), !1);
3997
+ }), !0) : (b(st), !1);
3998
3998
  }
3999
3999
  return !1;
4000
- }, oe = async (m) => {
4000
+ }, Ce = async (m) => {
4001
4001
  m?.preventDefault(), await H(aa);
4002
- }, Gs = async () => {
4002
+ }, oe = async () => {
4003
4003
  const { isAuthenticated: m, user: O } = i;
4004
4004
  try {
4005
4005
  if (m && O && O.userId) {
4006
4006
  if (p) {
4007
4007
  c("getAccessToken");
4008
- const ce = await Ie(p);
4009
- if (ce && ce.payload[k.USER_ID_KEY] !== "")
4008
+ const ue = await _e(p);
4009
+ if (ue && ue.payload[D.USER_ID_KEY] !== "")
4010
4010
  return p;
4011
4011
  }
4012
4012
  c("getAccessToken: invalid access token, trying to refresh it");
4013
- const E = await we.refreshtoken({
4013
+ const E = await Te.refreshtoken({
4014
4014
  endpoint: a,
4015
4015
  clientId: s,
4016
4016
  userId: O.userId,
@@ -4019,23 +4019,23 @@ const pe = () => {
4019
4019
  });
4020
4020
  return E.status && E.status === "success" && E.newAccessToken ? (f(E.newAccessToken), v(E.newRefreshToken), E.newAccessToken) : (c(
4021
4021
  "getAccessToken: invalid refresh token, need to re-authenticate"
4022
- ), await H(he), "");
4022
+ ), await H(de), "");
4023
4023
  }
4024
4024
  return c(
4025
4025
  "getAccessToken: user is not authenticated, cannot get access token"
4026
- ), await H(he), "";
4026
+ ), await H(de), "";
4027
4027
  } catch {
4028
4028
  return c(
4029
4029
  "getAccessToken: exception occurred, invalidating and logging out"
4030
4030
  ), await H(ia), "";
4031
4031
  }
4032
- }, qs = () => i.isAuthenticated && u ? u : "", Bs = async () => {
4032
+ }, ce = () => i.isAuthenticated && u ? u : "", Bs = async () => {
4033
4033
  const { user: m } = i;
4034
- let O = await fe({
4034
+ let O = await pe({
4035
4035
  endpoint: a,
4036
4036
  accessToken: p,
4037
4037
  clientId: s,
4038
- type: de.GET_REGISTRATION_OPTIONS,
4038
+ type: fe.GET_REGISTRATION_OPTIONS,
4039
4039
  params: {
4040
4040
  clientId: s,
4041
4041
  id: m?.userId,
@@ -4047,11 +4047,11 @@ const pe = () => {
4047
4047
  const E = await Vn({
4048
4048
  optionsJSON: O.data
4049
4049
  });
4050
- return O = await fe({
4050
+ return O = await pe({
4051
4051
  endpoint: a,
4052
4052
  accessToken: p,
4053
4053
  clientId: s,
4054
- type: de.VERIFY_REGISTRATION,
4054
+ type: fe.VERIFY_REGISTRATION,
4055
4055
  params: {
4056
4056
  clientId: s,
4057
4057
  id: m?.userId,
@@ -4060,11 +4060,11 @@ const pe = () => {
4060
4060
  }
4061
4061
  }), !!(O.status && O.data.length > 0);
4062
4062
  } catch {
4063
- return await fe({
4063
+ return await pe({
4064
4064
  endpoint: a,
4065
4065
  accessToken: p,
4066
4066
  clientId: s,
4067
- type: de.VERIFY_REGISTRATION,
4067
+ type: fe.VERIFY_REGISTRATION,
4068
4068
  params: {
4069
4069
  clientId: s,
4070
4070
  id: m?.userId,
@@ -4075,15 +4075,15 @@ const pe = () => {
4075
4075
  }
4076
4076
  return !1;
4077
4077
  }, js = async () => {
4078
- o({ type: Te, payload: { isLoading: !0 } }), N();
4079
- const m = Ze();
4078
+ o({ type: Ae, payload: { isLoading: !0 } }), L();
4079
+ const m = tt();
4080
4080
  x(m), c("loginWithPasskey");
4081
- const O = Ze();
4082
- let E = await fe({
4081
+ const O = tt();
4082
+ let E = await pe({
4083
4083
  endpoint: a,
4084
4084
  accessToken: p,
4085
4085
  clientId: s,
4086
- type: de.GET_AUTHENTICATION_OPTIONS,
4086
+ type: fe.GET_AUTHENTICATION_OPTIONS,
4087
4087
  params: {
4088
4088
  id: O,
4089
4089
  clientId: s
@@ -4091,40 +4091,40 @@ const pe = () => {
4091
4091
  });
4092
4092
  if (E.status)
4093
4093
  try {
4094
- const ce = await Xn({
4094
+ const ue = await Xn({
4095
4095
  optionsJSON: E.data
4096
4096
  });
4097
- return E = await fe({
4097
+ return E = await pe({
4098
4098
  endpoint: a,
4099
4099
  accessToken: p,
4100
4100
  clientId: s,
4101
- type: de.VERIFY_AUTHENTICATION,
4101
+ type: fe.VERIFY_AUTHENTICATION,
4102
4102
  params: {
4103
4103
  clientId: s,
4104
4104
  id: O,
4105
- authentication: ce,
4105
+ authentication: ue,
4106
4106
  nonce: m,
4107
4107
  domain: r,
4108
4108
  sessionExpiration: t,
4109
4109
  ua: navigator.userAgent
4110
4110
  }
4111
- }), E.data.status === _e ? (h(E.data.idToken), f(E.data.accessToken), v(E.data.refreshToken), o({
4112
- type: $e,
4111
+ }), E.data.status === Oe ? (h(E.data.idToken), f(E.data.accessToken), v(E.data.refreshToken), o({
4112
+ type: ke,
4113
4113
  payload: {
4114
- authenticationType: Ae.PASSKEY,
4114
+ authenticationType: Re.PASSKEY,
4115
4115
  user: {
4116
4116
  userId: E.data.userId,
4117
4117
  username: E.data.username,
4118
4118
  email: E.data.email
4119
4119
  }
4120
4120
  }
4121
- }), !0) : (b(et), !1);
4121
+ }), !0) : (b(st), !1);
4122
4122
  } catch {
4123
- return await fe({
4123
+ return await pe({
4124
4124
  endpoint: a,
4125
4125
  accessToken: p,
4126
4126
  clientId: s,
4127
- type: de.VERIFY_AUTHENTICATION,
4127
+ type: fe.VERIFY_AUTHENTICATION,
4128
4128
  params: {
4129
4129
  clientId: s,
4130
4130
  id: O,
@@ -4133,19 +4133,19 @@ const pe = () => {
4133
4133
  domain: r,
4134
4134
  sessionExpiration: t
4135
4135
  }
4136
- }), b(et), !1;
4136
+ }), b(st), !1;
4137
4137
  }
4138
4138
  return !1;
4139
4139
  };
4140
4140
  return /* @__PURE__ */ S(ga.Provider, { value: { state: i, dispatch: o }, children: /* @__PURE__ */ S(
4141
- Hs.Provider,
4141
+ Ks.Provider,
4142
4142
  {
4143
4143
  value: {
4144
4144
  ...i,
4145
- login: ee,
4146
- logout: oe,
4147
- getAccessToken: Gs,
4148
- getIdToken: qs,
4145
+ login: ie,
4146
+ logout: Ce,
4147
+ getAccessToken: oe,
4148
+ getIdToken: ce,
4149
4149
  registeringForPasskey: Bs,
4150
4150
  loginWithPasskey: js
4151
4151
  },
@@ -4163,11 +4163,11 @@ try {
4163
4163
  } catch {
4164
4164
  }
4165
4165
  const Ta = () => {
4166
- const e = lt(_s);
4166
+ const e = dt(Cs);
4167
4167
  if (!e)
4168
4168
  throw new Error("useAuth must be used within an AuthHookProvider");
4169
4169
  return e;
4170
- }, ii = "I'm having trouble right now. Please try again later.", oi = "action-search", ci = "action-sort", ui = "action-toggle-prompt", li = "action-reset-prompt", hi = "sassy-saint-", di = "search", fi = "sort", pi = "sort-timestamp", yi = "sort-token-usage", mi = "sort-memory-direction", Ei = "sort-memory-column", gi = "keyword-match-all", Si = "history-with-media-only", wi = "history-with-shared-only", Ti = "usage-view-mode", Ai = "usage-time-range", Ri = "usage-selected-month", vi = "private-disclosure", bi = "reasoning-disclosure", Ii = "chat-id", _i = "sassysaint-oled-mode", Oi = "sassysaint-full-screen", Qt = "data-oled-mode", Wt = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ci = 20, Pi = 30, Mi = "av-prompt", $i = "av-prompt-editable", ki = "size-5 sm:size-4", Di = 30, Ni = 15, Ui = 130, Li = 160, Hi = 16, Fi = 24, Ki = 16, xi = 76, Fs = process.env.NODE_ENV === "production", Ke = !Fs, Ks = Ke ? "gizmette.local.com" : "gizmette.com", Aa = async () => {
4170
+ }, ii = "I'm having trouble right now. Please try again later.", oi = "action-search", ci = "action-sort", ui = "action-toggle-prompt", li = "action-reset-prompt", hi = "sassy-saint-", di = "search", fi = "sort", pi = "sort-timestamp", yi = "sort-token-usage", mi = "sort-memory-direction", Ei = "sort-memory-column", gi = "keyword-match-all", Si = "history-with-media-only", wi = "history-with-shared-only", Ti = "usage-view-mode", Ai = "usage-time-range", Ri = "usage-selected-month", vi = "private-disclosure", bi = "reasoning-disclosure", Ii = "chat-id", _i = "sassysaint-oled-mode", Oi = "sassysaint-full-screen", Jt = "data-oled-mode", Vt = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ci = 20, Pi = 30, Mi = "av-prompt", $i = "av-prompt-editable", Di = "size-5 sm:size-4", ki = 30, Ni = 15, Ui = 130, Li = 160, Hi = 16, Fi = 24, Ki = 16, xi = 76, xs = process.env.NODE_ENV === "production", Ge = !xs, Gs = Ge ? "gizmette.local.com" : "gizmette.com", Aa = async () => {
4171
4171
  const e = {
4172
4172
  /**
4173
4173
  * A boolean value that indicates the application would like to receive the
@@ -4214,7 +4214,7 @@ const Ta = () => {
4214
4214
  /* @__PURE__ */ S(
4215
4215
  "dt",
4216
4216
  {
4217
- className: ke(
4217
+ className: Ne(
4218
4218
  { "my-0": s, "my-1": !s },
4219
4219
  "inline-block font-bold text-copy-dark dark:text-copy-lighter"
4220
4220
  ),
@@ -4224,7 +4224,7 @@ const Ta = () => {
4224
4224
  /* @__PURE__ */ S(
4225
4225
  "dd",
4226
4226
  {
4227
- className: ke(
4227
+ className: Ne(
4228
4228
  { "my-0": s, "my-1": !s },
4229
4229
  "inline-block"
4230
4230
  ),
@@ -4235,13 +4235,13 @@ const Ta = () => {
4235
4235
  isAuthenticated: e,
4236
4236
  extraClass: t,
4237
4237
  oledMode: s
4238
- }) => ke("px-4", "flex-1 overflow-y-auto", e ? "pt-0" : "pt-10", t, {
4238
+ }) => Ne("px-4", "flex-1 overflow-y-auto", e ? "pt-0" : "pt-10", t, {
4239
4239
  "bg-surface-darker/95 dark:bg-surface-darker": s,
4240
4240
  "bg-surface-darker": !s
4241
4241
  }), ba = ({
4242
4242
  extraClass: e,
4243
4243
  fullScreen: t
4244
- } = {}) => ke(
4244
+ } = {}) => Ne(
4245
4245
  "flex flex-col",
4246
4246
  "w-full md:mx-auto",
4247
4247
  "sm:px-5 px-2",
@@ -4276,7 +4276,7 @@ const Ta = () => {
4276
4276
  transition: d,
4277
4277
  icon: u
4278
4278
  }), Oa = (e, t) => t === "ready" && !!e && e.length > 0, Ca = (e) => {
4279
- e ? document.documentElement.setAttribute(Qt, "true") : document.documentElement.removeAttribute(Qt);
4279
+ e ? document.documentElement.setAttribute(Jt, "true") : document.documentElement.removeAttribute(Jt);
4280
4280
  }, Pa = new Intl.DateTimeFormat("en-US", {
4281
4281
  year: "numeric",
4282
4282
  month: "short",
@@ -4289,7 +4289,7 @@ function Ma(e) {
4289
4289
  const t = typeof e == "string" ? new Date(parseInt(e, 10)) : new Date(e), s = Pa.formatToParts(t), r = (n) => s.find((a) => a.type === n)?.value ?? "";
4290
4290
  return `${r("month")} ${r("day")}, ${r("year")} - ${r("hour")}:${r("minute")} ${r("dayPeriod")}`;
4291
4291
  }
4292
- const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: Ks, applyOledMode: Ca, canEvaluateModels: Oa, formatTimestamp: Ma, getCurrentGeoLocation: Aa, getLayoutPaddingClass: ba, getMessageContaintWrapperClass: va, isDev: Ke, isProd: Fs, isTauri: Ia, renderDataAsList: Ra, toastOptions: _a }, Symbol.toStringTag, { value: "Module" })), w = {
4292
+ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: Gs, applyOledMode: Ca, canEvaluateModels: Oa, formatTimestamp: Ma, getCurrentGeoLocation: Aa, getLayoutPaddingClass: ba, getMessageContaintWrapperClass: va, isDev: Ge, isProd: xs, isTauri: Ia, renderDataAsList: Ra, toastOptions: _a }, Symbol.toStringTag, { value: "Module" })), w = {
4293
4293
  GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
4294
4294
  location(latitude: $latitude, longitude: $longitude) {
4295
4295
  country
@@ -4649,7 +4649,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4649
4649
  schema: w.RESTORE_MEMORY,
4650
4650
  method: "restoreMemory"
4651
4651
  }
4652
- }, $a = process.env.PUBLIC_SASSY_API_SERVER_URL, xe = async ({
4652
+ }, $a = process.env.PUBLIC_SASSY_API_SERVER_URL, qe = async ({
4653
4653
  query: e,
4654
4654
  data: t,
4655
4655
  headers: s = {},
@@ -4672,13 +4672,13 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4672
4672
  try {
4673
4673
  let s;
4674
4674
  if (e.noAuth === !0)
4675
- s = await xe({
4675
+ s = await qe({
4676
4676
  query: e.type.schema,
4677
4677
  data: t
4678
4678
  });
4679
4679
  else {
4680
4680
  const a = `Bearer ${e.accessToken}`;
4681
- s = await xe({
4681
+ s = await qe({
4682
4682
  headers: {
4683
4683
  authorization: a
4684
4684
  },
@@ -4750,7 +4750,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4750
4750
  client: !0
4751
4751
  }
4752
4752
  })
4753
- }), ka = ({
4753
+ }), Da = ({
4754
4754
  user: e,
4755
4755
  getAccessToken: t
4756
4756
  }) => z({
@@ -4837,7 +4837,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4837
4837
  getAccessToken: e
4838
4838
  }) => {
4839
4839
  const t = Y();
4840
- return ae({
4840
+ return ne({
4841
4841
  mutationFn: async ({
4842
4842
  userId: s,
4843
4843
  id: r,
@@ -4861,7 +4861,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4861
4861
  getAccessToken: e
4862
4862
  }) => {
4863
4863
  const t = Y();
4864
- return ae({
4864
+ return ne({
4865
4865
  mutationFn: async ({ userId: s, id: r }) => {
4866
4866
  const n = await e();
4867
4867
  return (await X({
@@ -4913,7 +4913,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4913
4913
  getAccessToken: e
4914
4914
  }) => {
4915
4915
  const t = Y();
4916
- return ae({
4916
+ return ne({
4917
4917
  mutationFn: async ({
4918
4918
  user: s,
4919
4919
  memoryId: r,
@@ -4937,7 +4937,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4937
4937
  getAccessToken: e
4938
4938
  }) => {
4939
4939
  const t = Y();
4940
- return ae({
4940
+ return ne({
4941
4941
  mutationFn: async ({
4942
4942
  user: s,
4943
4943
  memoryId: r
@@ -4961,7 +4961,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4961
4961
  getAccessToken: e
4962
4962
  }) => {
4963
4963
  const t = Y();
4964
- return ae({
4964
+ return ne({
4965
4965
  mutationFn: async ({ user: s }) => {
4966
4966
  const r = await e();
4967
4967
  return (await X({
@@ -4980,7 +4980,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4980
4980
  getAccessToken: e
4981
4981
  }) => {
4982
4982
  const t = Y();
4983
- return ae({
4983
+ return ne({
4984
4984
  mutationFn: async ({ user: s }) => {
4985
4985
  const r = await e();
4986
4986
  return (await X({
@@ -5012,7 +5012,7 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5012
5012
  getAccessToken: e
5013
5013
  }) => {
5014
5014
  const t = Y();
5015
- return ae({
5015
+ return ne({
5016
5016
  mutationFn: async ({
5017
5017
  user: s,
5018
5018
  memoryId: r
@@ -5042,13 +5042,13 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5042
5042
  const n = t?.data ? t.data(e) : e;
5043
5043
  let a;
5044
5044
  if (s === !0)
5045
- a = await xe({
5045
+ a = await qe({
5046
5046
  query: t.schema,
5047
5047
  data: n
5048
5048
  });
5049
5049
  else if (r) {
5050
5050
  const d = await r();
5051
- a = await xe({
5051
+ a = await qe({
5052
5052
  headers: {
5053
5053
  authorization: `Bearer ${d}`
5054
5054
  },
@@ -5068,19 +5068,19 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5068
5068
  } catch (n) {
5069
5069
  return Promise.reject(n);
5070
5070
  }
5071
- }, xs = ut(
5071
+ }, qs = ht(
5072
5072
  void 0
5073
- ), Jt = {
5073
+ ), Yt = {
5074
5074
  capabilities: /* @__PURE__ */ new Set(),
5075
5075
  allowedModels: [],
5076
5076
  version: null,
5077
5077
  status: "idle"
5078
- }, Da = ({
5078
+ }, ka = ({
5079
5079
  user: e,
5080
5080
  getAccessToken: t,
5081
5081
  children: s
5082
5082
  }) => {
5083
- const [r, n] = Xs(Jt), a = Tt(
5083
+ const [r, n] = Xs(Yt), a = Rt(
5084
5084
  () => e ? `entitlements:${e}` : null,
5085
5085
  [e]
5086
5086
  ), i = Q(() => {
@@ -5102,19 +5102,19 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5102
5102
  }
5103
5103
  return !1;
5104
5104
  }, [a]);
5105
- me(() => {
5105
+ Ee(() => {
5106
5106
  r.status === "idle" && i();
5107
5107
  }, [i, r.status]);
5108
- const o = ka({ user: e, getAccessToken: t });
5109
- me(() => {
5108
+ const o = Da({ user: e, getAccessToken: t });
5109
+ Ee(() => {
5110
5110
  o.isLoading && r.status === "idle" && n((h) => ({ ...h, status: "loading" }));
5111
- }, [o.isLoading, r.status]), me(() => {
5111
+ }, [o.isLoading, r.status]), Ee(() => {
5112
5112
  o.isError && n((h) => ({
5113
5113
  ...h,
5114
5114
  status: "error",
5115
5115
  error: String(o.error)
5116
5116
  }));
5117
- }, [o.isError, o.error]), me(() => {
5117
+ }, [o.isError, o.error]), Ee(() => {
5118
5118
  const h = o.data?.entitlements;
5119
5119
  if (h && (n({
5120
5120
  capabilities: new Set(h.capabilities || []),
@@ -5157,12 +5157,12 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5157
5157
  },
5158
5158
  [a]
5159
5159
  ), d = Q(() => {
5160
- if (n(Jt), a)
5160
+ if (n(Yt), a)
5161
5161
  try {
5162
5162
  sessionStorage.removeItem(a);
5163
5163
  } catch {
5164
5164
  }
5165
- }, [a]), u = Tt(
5165
+ }, [a]), u = Rt(
5166
5166
  () => ({
5167
5167
  ...r,
5168
5168
  check: (h, l) => r.status !== "ready" ? !1 : rr(r.capabilities, h, { any: l?.any }),
@@ -5171,53 +5171,53 @@ const Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5171
5171
  }),
5172
5172
  [r, c, d]
5173
5173
  );
5174
- return /* @__PURE__ */ S(xs.Provider, { value: u, children: s });
5174
+ return /* @__PURE__ */ S(qs.Provider, { value: u, children: s });
5175
5175
  };
5176
5176
  function oo() {
5177
- const e = lt(xs);
5177
+ const e = dt(qs);
5178
5178
  if (!e)
5179
5179
  throw new Error("useEntitlements must be used within EntitlementsProvider");
5180
5180
  return e;
5181
5181
  }
5182
- const Na = new URL(document.location.href).searchParams, Vt = !!Na.get("debug") || !1, Ua = zt(() => import(
5182
+ const Na = new URL(document.location.href).searchParams, zt = !!Na.get("debug") || !1, Ua = Zt(() => import(
5183
5183
  /* webpackChunkName: "LazyApp" */
5184
- "./App.-eg2aIep.js"
5185
- ).then((e) => e.App)), La = zt(
5184
+ "./App.RjJXTlXi.js"
5185
+ ).then((e) => e.App)), La = Zt(
5186
5186
  () => import(
5187
5187
  /* webpackChunkName: "LazyLogin" */
5188
- "./LoginEntry.DJ-wqr-L.js"
5188
+ "./LoginEntry.CTsOSsS0.js"
5189
5189
  )
5190
- ), Ha = new Cr(), Yt = ({
5190
+ ), Ha = new Cr(), Xt = ({
5191
5191
  isComponent: e,
5192
5192
  headerHeight: t
5193
5193
  }) => {
5194
5194
  const { isAuthenticated: s, isLoading: r, user: n, getAccessToken: a } = Ta();
5195
- return r ? /* @__PURE__ */ S("div", {}) : s ? /* @__PURE__ */ S(At, { fallback: /* @__PURE__ */ S("div", {}), children: /* @__PURE__ */ S(Pr, { client: Ha, children: /* @__PURE__ */ S(
5196
- Da,
5195
+ return r ? /* @__PURE__ */ S("div", {}) : s ? /* @__PURE__ */ S(vt, { fallback: /* @__PURE__ */ S("div", {}), children: /* @__PURE__ */ S(Pr, { client: Ha, children: /* @__PURE__ */ S(
5196
+ ka,
5197
5197
  {
5198
5198
  user: n?.username,
5199
5199
  getAccessToken: a,
5200
5200
  children: /* @__PURE__ */ S(Ua, { isComponent: e, headerHeight: t })
5201
5201
  }
5202
- ) }) }) : /* @__PURE__ */ S(At, { fallback: /* @__PURE__ */ S("div", {}), children: /* @__PURE__ */ S(La, {}) });
5202
+ ) }) }) : /* @__PURE__ */ S(vt, { fallback: /* @__PURE__ */ S("div", {}), children: /* @__PURE__ */ S(La, {}) });
5203
5203
  }, Fa = ({
5204
5204
  isComponent: e = !1,
5205
5205
  headerHeight: t = 0,
5206
- domain: s = Ks,
5206
+ domain: s = Gs,
5207
5207
  extraProps: r
5208
- }) => (Ke && console.info(
5208
+ }) => (Ge && console.info(
5209
5209
  `==> [${Date.now()}] Bootstrapping SassySaint Client with props: `,
5210
5210
  { isComponent: e, domain: s, headerHeight: t, extraProps: r }
5211
- ), Ke ? /* @__PURE__ */ S(
5212
- jt,
5211
+ ), Ge ? /* @__PURE__ */ S(
5212
+ Wt,
5213
5213
  {
5214
- clientId: Wt,
5214
+ clientId: Vt,
5215
5215
  domain: s,
5216
- debug: Vt,
5216
+ debug: zt,
5217
5217
  endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
5218
- children: /* @__PURE__ */ S(Yt, { isComponent: e, headerHeight: t })
5218
+ children: /* @__PURE__ */ S(Xt, { isComponent: e, headerHeight: t })
5219
5219
  }
5220
- ) : /* @__PURE__ */ S(jt, { clientId: Wt, domain: s, debug: Vt, children: /* @__PURE__ */ S(Yt, { isComponent: e, headerHeight: t }) })), co = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ S(
5220
+ ) : /* @__PURE__ */ S(Wt, { clientId: Vt, domain: s, debug: zt, children: /* @__PURE__ */ S(Xt, { isComponent: e, headerHeight: t }) })), co = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ S(
5221
5221
  Fa,
5222
5222
  {
5223
5223
  isComponent: !0,
@@ -5233,7 +5233,7 @@ export {
5233
5233
  ui as ACTION_TOGGLE_PROMPT,
5234
5234
  Ya as B,
5235
5235
  ji as CHATS_QUERY_KEY,
5236
- ki as DEFAULT_ICON_ACTION_SIZE,
5236
+ Di as DEFAULT_ICON_ACTION_SIZE,
5237
5237
  T as E,
5238
5238
  ii as ERROR_MESSAGE,
5239
5239
  za as F,
@@ -5268,12 +5268,12 @@ export {
5268
5268
  Ni as UI_BUTTON_SCROLL_BUFFER,
5269
5269
  Ui as UI_DEFAULT_MAIN_HEIGHT,
5270
5270
  Li as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
5271
- Di as UI_FOOTER_BUFFER,
5271
+ ki as UI_FOOTER_BUFFER,
5272
5272
  Va as V,
5273
5273
  Xa as W,
5274
5274
  ei as X,
5275
5275
  ti as Z,
5276
- Ge as a,
5276
+ Be as a,
5277
5277
  Ca as applyOledMode,
5278
5278
  Oa as canEvaluateModels,
5279
5279
  Ma as formatTimestamp,
@@ -5281,7 +5281,7 @@ export {
5281
5281
  ba as getLayoutPaddingClass,
5282
5282
  va as getMessageContaintWrapperClass,
5283
5283
  X as graphQLRequest,
5284
- ht as i,
5284
+ ft as i,
5285
5285
  Ia as isTauri,
5286
5286
  Za as j,
5287
5287
  ja as l,
@@ -5290,11 +5290,11 @@ export {
5290
5290
  Ba as o,
5291
5291
  Qa as p,
5292
5292
  Ra as renderDataAsList,
5293
- dt as s,
5293
+ pt as s,
5294
5294
  $a as serverUrl,
5295
5295
  qi as setNewProvider,
5296
5296
  Bi as setUserPlan,
5297
- Ae as st,
5297
+ Re as st,
5298
5298
  Wi as useChangelogs,
5299
5299
  Yi as useChat,
5300
5300
  Vi as useChatsHistory,
@@ -5312,7 +5312,7 @@ export {
5312
5312
  to as useUpdateMemory,
5313
5313
  Ji as useUserChatStats,
5314
5314
  eo as useUserMemories,
5315
- ka as useUserPreferences,
5315
+ Da as useUserPreferences,
5316
5316
  Gi as utilities,
5317
5317
  Wa as v,
5318
5318
  sr as x,