@shiftengineering/folio 0.1.36 → 0.1.38

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.
@@ -3,19 +3,19 @@ var sn = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
5
  var Xs = (t, e, r) => e in t ? Js(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
- var tr = (t, e, r) => Xs(t, typeof e != "symbol" ? e + "" : e, r), rr = (t, e, r) => e.has(t) || sn("Cannot " + r);
7
- var a = (t, e, r) => (rr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), O = (t, e, r) => e.has(t) ? sn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), b = (t, e, r, n) => (rr(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), C = (t, e, r) => (rr(t, e, "access private method"), r);
8
- var kt = (t, e, r, n) => ({
6
+ var nr = (t, e, r) => Xs(t, typeof e != "symbol" ? e + "" : e, r), sr = (t, e, r) => e.has(t) || sn("Cannot " + r);
7
+ var a = (t, e, r) => (sr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), O = (t, e, r) => e.has(t) ? sn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), E = (t, e, r, n) => (sr(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), F = (t, e, r) => (sr(t, e, "access private method"), r);
8
+ var _t = (t, e, r, n) => ({
9
9
  set _(s) {
10
- b(t, e, s, r);
10
+ E(t, e, s, r);
11
11
  },
12
12
  get _() {
13
13
  return a(t, e, n);
14
14
  }
15
15
  });
16
16
  import * as K from "react";
17
- import Vn, { createContext as Zs, useState as ei, useMemo as ti, useEffect as nr, useContext as ri } from "react";
18
- var ur = { exports: {} }, pt = {};
17
+ import Vn, { createContext as Zs, useState as ei, useMemo as ti, useEffect as ir, useContext as ri } from "react";
18
+ var lr = { exports: {} }, pt = {};
19
19
  /**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
@@ -30,12 +30,12 @@ function ni() {
30
30
  if (on) return pt;
31
31
  on = 1;
32
32
  var t = Vn, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
33
- function u(l, c, h) {
34
- var p, f = {}, d = null, m = null;
35
- h !== void 0 && (d = "" + h), c.key !== void 0 && (d = "" + c.key), c.ref !== void 0 && (m = c.ref);
33
+ function u(l, c, d) {
34
+ var p, f = {}, y = null, m = null;
35
+ d !== void 0 && (y = "" + d), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (m = c.ref);
36
36
  for (p in c) n.call(c, p) && !i.hasOwnProperty(p) && (f[p] = c[p]);
37
37
  if (l && l.defaultProps) for (p in c = l.defaultProps, c) f[p] === void 0 && (f[p] = c[p]);
38
- return { $$typeof: e, type: l, key: d, ref: m, props: f, _owner: s.current };
38
+ return { $$typeof: e, type: l, key: y, ref: m, props: f, _owner: s.current };
39
39
  }
40
40
  return pt.Fragment = r, pt.jsx = u, pt.jsxs = u, pt;
41
41
  }
@@ -52,46 +52,46 @@ var mt = {};
52
52
  var an;
53
53
  function si() {
54
54
  return an || (an = 1, process.env.NODE_ENV !== "production" && function() {
55
- var t = Vn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), v = Symbol.iterator, g = "@@iterator";
56
- function R(o) {
55
+ var t = Vn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
56
+ function w(o) {
57
57
  if (o === null || typeof o != "object")
58
58
  return null;
59
- var y = v && o[v] || o[g];
60
- return typeof y == "function" ? y : null;
59
+ var h = g && o[g] || o[v];
60
+ return typeof h == "function" ? h : null;
61
61
  }
62
- var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
63
- function E(o) {
62
+ var b = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
63
+ function P(o) {
64
64
  {
65
- for (var y = arguments.length, w = new Array(y > 1 ? y - 1 : 0), S = 1; S < y; S++)
66
- w[S - 1] = arguments[S];
67
- x("error", o, w);
65
+ for (var h = arguments.length, R = new Array(h > 1 ? h - 1 : 0), C = 1; C < h; C++)
66
+ R[C - 1] = arguments[C];
67
+ S("error", o, R);
68
68
  }
69
69
  }
70
- function x(o, y, w) {
70
+ function S(o, h, R) {
71
71
  {
72
- var S = P.ReactDebugCurrentFrame, D = S.getStackAddendum();
73
- D !== "" && (y += "%s", w = w.concat([D]));
74
- var k = w.map(function(I) {
75
- return String(I);
72
+ var C = b.ReactDebugCurrentFrame, k = C.getStackAddendum();
73
+ k !== "" && (h += "%s", R = R.concat([k]));
74
+ var q = R.map(function(D) {
75
+ return String(D);
76
76
  });
77
- k.unshift("Warning: " + y), Function.prototype.apply.call(console[o], console, k);
77
+ q.unshift("Warning: " + h), Function.prototype.apply.call(console[o], console, q);
78
78
  }
79
79
  }
80
- var j = !1, N = !1, Z = !1, z = !1, U = !1, q;
81
- q = Symbol.for("react.module.reference");
80
+ var T = !1, j = !1, Z = !1, z = !1, U = !1, M;
81
+ M = Symbol.for("react.module.reference");
82
82
  function ge(o) {
83
- return !!(typeof o == "string" || typeof o == "function" || o === n || o === i || U || o === s || o === h || o === p || z || o === m || j || N || Z || typeof o == "object" && o !== null && (o.$$typeof === d || o.$$typeof === f || o.$$typeof === u || o.$$typeof === l || o.$$typeof === c || // This needs to include all possible module reference object
83
+ return !!(typeof o == "string" || typeof o == "function" || o === n || o === i || U || o === s || o === d || o === p || z || o === m || T || j || Z || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === f || o.$$typeof === u || o.$$typeof === l || o.$$typeof === c || // This needs to include all possible module reference object
84
84
  // types supported by any Flight configuration anywhere since
85
85
  // we don't know which Flight build this will end up being used
86
86
  // with.
87
- o.$$typeof === q || o.getModuleId !== void 0));
87
+ o.$$typeof === M || o.getModuleId !== void 0));
88
88
  }
89
- function ve(o, y, w) {
90
- var S = o.displayName;
91
- if (S)
92
- return S;
93
- var D = y.displayName || y.name || "";
94
- return D !== "" ? w + "(" + D + ")" : w;
89
+ function ve(o, h, R) {
90
+ var C = o.displayName;
91
+ if (C)
92
+ return C;
93
+ var k = h.displayName || h.name || "";
94
+ return k !== "" ? R + "(" + k + ")" : R;
95
95
  }
96
96
  function De(o) {
97
97
  return o.displayName || "Context";
@@ -99,7 +99,7 @@ function si() {
99
99
  function be(o) {
100
100
  if (o == null)
101
101
  return null;
102
- if (typeof o.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
102
+ if (typeof o.tag == "number" && P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
103
103
  return o.displayName || o.name || null;
104
104
  if (typeof o == "string")
105
105
  return o;
@@ -112,7 +112,7 @@ function si() {
112
112
  return "Profiler";
113
113
  case s:
114
114
  return "StrictMode";
115
- case h:
115
+ case d:
116
116
  return "Suspense";
117
117
  case p:
118
118
  return "SuspenseList";
@@ -120,20 +120,20 @@ function si() {
120
120
  if (typeof o == "object")
121
121
  switch (o.$$typeof) {
122
122
  case l:
123
- var y = o;
124
- return De(y) + ".Consumer";
123
+ var h = o;
124
+ return De(h) + ".Consumer";
125
125
  case u:
126
- var w = o;
127
- return De(w._context) + ".Provider";
126
+ var R = o;
127
+ return De(R._context) + ".Provider";
128
128
  case c:
129
129
  return ve(o, o.render, "ForwardRef");
130
130
  case f:
131
- var S = o.displayName || null;
132
- return S !== null ? S : be(o.type) || "Memo";
133
- case d: {
134
- var D = o, k = D._payload, I = D._init;
131
+ var C = o.displayName || null;
132
+ return C !== null ? C : be(o.type) || "Memo";
133
+ case y: {
134
+ var k = o, q = k._payload, D = k._init;
135
135
  try {
136
- return be(I(k));
136
+ return be(D(q));
137
137
  } catch {
138
138
  return null;
139
139
  }
@@ -141,14 +141,14 @@ function si() {
141
141
  }
142
142
  return null;
143
143
  }
144
- var _e = Object.assign, ht = 0, jr, qr, Ur, Mr, Nr, Lr, Qr;
144
+ var ke = Object.assign, ht = 0, jr, qr, Mr, Ur, Nr, Lr, Qr;
145
145
  function $r() {
146
146
  }
147
147
  $r.__reactDisabledLog = !0;
148
- function Rs() {
148
+ function Os() {
149
149
  {
150
150
  if (ht === 0) {
151
- jr = console.log, qr = console.info, Ur = console.warn, Mr = console.error, Nr = console.group, Lr = console.groupCollapsed, Qr = console.groupEnd;
151
+ jr = console.log, qr = console.info, Mr = console.warn, Ur = console.error, Nr = console.group, Lr = console.groupCollapsed, Qr = console.groupEnd;
152
152
  var o = {
153
153
  configurable: !0,
154
154
  enumerable: !0,
@@ -177,130 +177,130 @@ function si() {
177
177
  writable: !0
178
178
  };
179
179
  Object.defineProperties(console, {
180
- log: _e({}, o, {
180
+ log: ke({}, o, {
181
181
  value: jr
182
182
  }),
183
- info: _e({}, o, {
183
+ info: ke({}, o, {
184
184
  value: qr
185
185
  }),
186
- warn: _e({}, o, {
187
- value: Ur
188
- }),
189
- error: _e({}, o, {
186
+ warn: ke({}, o, {
190
187
  value: Mr
191
188
  }),
192
- group: _e({}, o, {
189
+ error: ke({}, o, {
190
+ value: Ur
191
+ }),
192
+ group: ke({}, o, {
193
193
  value: Nr
194
194
  }),
195
- groupCollapsed: _e({}, o, {
195
+ groupCollapsed: ke({}, o, {
196
196
  value: Lr
197
197
  }),
198
- groupEnd: _e({}, o, {
198
+ groupEnd: ke({}, o, {
199
199
  value: Qr
200
200
  })
201
201
  });
202
202
  }
203
- ht < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
203
+ ht < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
204
204
  }
205
205
  }
206
- var Wt = P.ReactCurrentDispatcher, Bt;
207
- function xt(o, y, w) {
206
+ var Gt = b.ReactCurrentDispatcher, Yt;
207
+ function xt(o, h, R) {
208
208
  {
209
- if (Bt === void 0)
209
+ if (Yt === void 0)
210
210
  try {
211
211
  throw Error();
212
- } catch (D) {
213
- var S = D.stack.trim().match(/\n( *(at )?)/);
214
- Bt = S && S[1] || "";
212
+ } catch (k) {
213
+ var C = k.stack.trim().match(/\n( *(at )?)/);
214
+ Yt = C && C[1] || "";
215
215
  }
216
216
  return `
217
- ` + Bt + o;
217
+ ` + Yt + o;
218
218
  }
219
219
  }
220
- var Gt = !1, It;
220
+ var Jt = !1, It;
221
221
  {
222
222
  var Cs = typeof WeakMap == "function" ? WeakMap : Map;
223
223
  It = new Cs();
224
224
  }
225
- function Kr(o, y) {
226
- if (!o || Gt)
225
+ function Kr(o, h) {
226
+ if (!o || Jt)
227
227
  return "";
228
228
  {
229
- var w = It.get(o);
230
- if (w !== void 0)
231
- return w;
229
+ var R = It.get(o);
230
+ if (R !== void 0)
231
+ return R;
232
232
  }
233
- var S;
234
- Gt = !0;
235
- var D = Error.prepareStackTrace;
233
+ var C;
234
+ Jt = !0;
235
+ var k = Error.prepareStackTrace;
236
236
  Error.prepareStackTrace = void 0;
237
- var k;
238
- k = Wt.current, Wt.current = null, Rs();
237
+ var q;
238
+ q = Gt.current, Gt.current = null, Os();
239
239
  try {
240
- if (y) {
241
- var I = function() {
240
+ if (h) {
241
+ var D = function() {
242
242
  throw Error();
243
243
  };
244
- if (Object.defineProperty(I.prototype, "props", {
244
+ if (Object.defineProperty(D.prototype, "props", {
245
245
  set: function() {
246
246
  throw Error();
247
247
  }
248
248
  }), typeof Reflect == "object" && Reflect.construct) {
249
249
  try {
250
- Reflect.construct(I, []);
250
+ Reflect.construct(D, []);
251
251
  } catch (Y) {
252
- S = Y;
252
+ C = Y;
253
253
  }
254
- Reflect.construct(o, [], I);
254
+ Reflect.construct(o, [], D);
255
255
  } else {
256
256
  try {
257
- I.call();
257
+ D.call();
258
258
  } catch (Y) {
259
- S = Y;
259
+ C = Y;
260
260
  }
261
- o.call(I.prototype);
261
+ o.call(D.prototype);
262
262
  }
263
263
  } else {
264
264
  try {
265
265
  throw Error();
266
266
  } catch (Y) {
267
- S = Y;
267
+ C = Y;
268
268
  }
269
269
  o();
270
270
  }
271
271
  } catch (Y) {
272
- if (Y && S && typeof Y.stack == "string") {
273
- for (var T = Y.stack.split(`
274
- `), H = S.stack.split(`
275
- `), L = T.length - 1, Q = H.length - 1; L >= 1 && Q >= 0 && T[L] !== H[Q]; )
272
+ if (Y && C && typeof Y.stack == "string") {
273
+ for (var A = Y.stack.split(`
274
+ `), W = C.stack.split(`
275
+ `), L = A.length - 1, Q = W.length - 1; L >= 1 && Q >= 0 && A[L] !== W[Q]; )
276
276
  Q--;
277
277
  for (; L >= 1 && Q >= 0; L--, Q--)
278
- if (T[L] !== H[Q]) {
278
+ if (A[L] !== W[Q]) {
279
279
  if (L !== 1 || Q !== 1)
280
280
  do
281
- if (L--, Q--, Q < 0 || T[L] !== H[Q]) {
282
- var ee = `
283
- ` + T[L].replace(" at new ", " at ");
284
- return o.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", o.displayName)), typeof o == "function" && It.set(o, ee), ee;
281
+ if (L--, Q--, Q < 0 || A[L] !== W[Q]) {
282
+ var te = `
283
+ ` + A[L].replace(" at new ", " at ");
284
+ return o.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", o.displayName)), typeof o == "function" && It.set(o, te), te;
285
285
  }
286
286
  while (L >= 1 && Q >= 0);
287
287
  break;
288
288
  }
289
289
  }
290
290
  } finally {
291
- Gt = !1, Wt.current = k, Ss(), Error.prepareStackTrace = D;
291
+ Jt = !1, Gt.current = q, Ss(), Error.prepareStackTrace = k;
292
292
  }
293
- var Be = o ? o.displayName || o.name : "", ke = Be ? xt(Be) : "";
294
- return typeof o == "function" && It.set(o, ke), ke;
293
+ var Be = o ? o.displayName || o.name : "", _e = Be ? xt(Be) : "";
294
+ return typeof o == "function" && It.set(o, _e), _e;
295
295
  }
296
- function Ts(o, y, w) {
296
+ function Ts(o, h, R) {
297
297
  return Kr(o, !1);
298
298
  }
299
299
  function Fs(o) {
300
- var y = o.prototype;
301
- return !!(y && y.isReactComponent);
300
+ var h = o.prototype;
301
+ return !!(h && h.isReactComponent);
302
302
  }
303
- function Dt(o, y, w) {
303
+ function Dt(o, h, R) {
304
304
  if (o == null)
305
305
  return "";
306
306
  if (typeof o == "function")
@@ -308,7 +308,7 @@ function si() {
308
308
  if (typeof o == "string")
309
309
  return xt(o);
310
310
  switch (o) {
311
- case h:
311
+ case d:
312
312
  return xt("Suspense");
313
313
  case p:
314
314
  return xt("SuspenseList");
@@ -318,52 +318,52 @@ function si() {
318
318
  case c:
319
319
  return Ts(o.render);
320
320
  case f:
321
- return Dt(o.type, y, w);
322
- case d: {
323
- var S = o, D = S._payload, k = S._init;
321
+ return Dt(o.type, h, R);
322
+ case y: {
323
+ var C = o, k = C._payload, q = C._init;
324
324
  try {
325
- return Dt(k(D), y, w);
325
+ return Dt(q(k), h, R);
326
326
  } catch {
327
327
  }
328
328
  }
329
329
  }
330
330
  return "";
331
331
  }
332
- var yt = Object.prototype.hasOwnProperty, zr = {}, Vr = P.ReactDebugCurrentFrame;
333
- function _t(o) {
332
+ var yt = Object.prototype.hasOwnProperty, zr = {}, Vr = b.ReactDebugCurrentFrame;
333
+ function kt(o) {
334
334
  if (o) {
335
- var y = o._owner, w = Dt(o.type, o._source, y ? y.type : null);
336
- Vr.setExtraStackFrame(w);
335
+ var h = o._owner, R = Dt(o.type, o._source, h ? h.type : null);
336
+ Vr.setExtraStackFrame(R);
337
337
  } else
338
338
  Vr.setExtraStackFrame(null);
339
339
  }
340
- function As(o, y, w, S, D) {
340
+ function As(o, h, R, C, k) {
341
341
  {
342
- var k = Function.call.bind(yt);
343
- for (var I in o)
344
- if (k(o, I)) {
345
- var T = void 0;
342
+ var q = Function.call.bind(yt);
343
+ for (var D in o)
344
+ if (q(o, D)) {
345
+ var A = void 0;
346
346
  try {
347
- if (typeof o[I] != "function") {
348
- var H = Error((S || "React class") + ": " + w + " type `" + I + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[I] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
349
- throw H.name = "Invariant Violation", H;
347
+ if (typeof o[D] != "function") {
348
+ var W = Error((C || "React class") + ": " + R + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
349
+ throw W.name = "Invariant Violation", W;
350
350
  }
351
- T = o[I](y, I, S, w, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
351
+ A = o[D](h, D, C, R, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
352
352
  } catch (L) {
353
- T = L;
353
+ A = L;
354
354
  }
355
- T && !(T instanceof Error) && (_t(D), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", S || "React class", w, I, typeof T), _t(null)), T instanceof Error && !(T.message in zr) && (zr[T.message] = !0, _t(D), E("Failed %s type: %s", w, T.message), _t(null));
355
+ A && !(A instanceof Error) && (kt(k), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", R, D, typeof A), kt(null)), A instanceof Error && !(A.message in zr) && (zr[A.message] = !0, kt(k), P("Failed %s type: %s", R, A.message), kt(null));
356
356
  }
357
357
  }
358
358
  }
359
359
  var xs = Array.isArray;
360
- function Yt(o) {
360
+ function Xt(o) {
361
361
  return xs(o);
362
362
  }
363
363
  function Is(o) {
364
364
  {
365
- var y = typeof Symbol == "function" && Symbol.toStringTag, w = y && o[Symbol.toStringTag] || o.constructor.name || "Object";
366
- return w;
365
+ var h = typeof Symbol == "function" && Symbol.toStringTag, R = h && o[Symbol.toStringTag] || o.constructor.name || "Object";
366
+ return R;
367
367
  }
368
368
  }
369
369
  function Ds(o) {
@@ -378,119 +378,119 @@ function si() {
378
378
  }
379
379
  function Wr(o) {
380
380
  if (Ds(o))
381
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Is(o)), Hr(o);
381
+ return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Is(o)), Hr(o);
382
382
  }
383
- var Br = P.ReactCurrentOwner, _s = {
383
+ var Br = b.ReactCurrentOwner, ks = {
384
384
  key: !0,
385
385
  ref: !0,
386
386
  __self: !0,
387
387
  __source: !0
388
388
  }, Gr, Yr;
389
- function ks(o) {
389
+ function _s(o) {
390
390
  if (yt.call(o, "ref")) {
391
- var y = Object.getOwnPropertyDescriptor(o, "ref").get;
392
- if (y && y.isReactWarning)
391
+ var h = Object.getOwnPropertyDescriptor(o, "ref").get;
392
+ if (h && h.isReactWarning)
393
393
  return !1;
394
394
  }
395
395
  return o.ref !== void 0;
396
396
  }
397
397
  function js(o) {
398
398
  if (yt.call(o, "key")) {
399
- var y = Object.getOwnPropertyDescriptor(o, "key").get;
400
- if (y && y.isReactWarning)
399
+ var h = Object.getOwnPropertyDescriptor(o, "key").get;
400
+ if (h && h.isReactWarning)
401
401
  return !1;
402
402
  }
403
403
  return o.key !== void 0;
404
404
  }
405
- function qs(o, y) {
405
+ function qs(o, h) {
406
406
  typeof o.ref == "string" && Br.current;
407
407
  }
408
- function Us(o, y) {
408
+ function Ms(o, h) {
409
409
  {
410
- var w = function() {
411
- Gr || (Gr = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
410
+ var R = function() {
411
+ Gr || (Gr = !0, P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
412
412
  };
413
- w.isReactWarning = !0, Object.defineProperty(o, "key", {
414
- get: w,
413
+ R.isReactWarning = !0, Object.defineProperty(o, "key", {
414
+ get: R,
415
415
  configurable: !0
416
416
  });
417
417
  }
418
418
  }
419
- function Ms(o, y) {
419
+ function Us(o, h) {
420
420
  {
421
- var w = function() {
422
- Yr || (Yr = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
421
+ var R = function() {
422
+ Yr || (Yr = !0, P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
423
423
  };
424
- w.isReactWarning = !0, Object.defineProperty(o, "ref", {
425
- get: w,
424
+ R.isReactWarning = !0, Object.defineProperty(o, "ref", {
425
+ get: R,
426
426
  configurable: !0
427
427
  });
428
428
  }
429
429
  }
430
- var Ns = function(o, y, w, S, D, k, I) {
431
- var T = {
430
+ var Ns = function(o, h, R, C, k, q, D) {
431
+ var A = {
432
432
  // This tag allows us to uniquely identify this as a React Element
433
433
  $$typeof: e,
434
434
  // Built-in properties that belong on the element
435
435
  type: o,
436
- key: y,
437
- ref: w,
438
- props: I,
436
+ key: h,
437
+ ref: R,
438
+ props: D,
439
439
  // Record the component responsible for creating this element.
440
- _owner: k
440
+ _owner: q
441
441
  };
442
- return T._store = {}, Object.defineProperty(T._store, "validated", {
442
+ return A._store = {}, Object.defineProperty(A._store, "validated", {
443
443
  configurable: !1,
444
444
  enumerable: !1,
445
445
  writable: !0,
446
446
  value: !1
447
- }), Object.defineProperty(T, "_self", {
447
+ }), Object.defineProperty(A, "_self", {
448
448
  configurable: !1,
449
449
  enumerable: !1,
450
450
  writable: !1,
451
- value: S
452
- }), Object.defineProperty(T, "_source", {
451
+ value: C
452
+ }), Object.defineProperty(A, "_source", {
453
453
  configurable: !1,
454
454
  enumerable: !1,
455
455
  writable: !1,
456
- value: D
457
- }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
456
+ value: k
457
+ }), Object.freeze && (Object.freeze(A.props), Object.freeze(A)), A;
458
458
  };
459
- function Ls(o, y, w, S, D) {
459
+ function Ls(o, h, R, C, k) {
460
460
  {
461
- var k, I = {}, T = null, H = null;
462
- w !== void 0 && (Wr(w), T = "" + w), js(y) && (Wr(y.key), T = "" + y.key), ks(y) && (H = y.ref, qs(y, D));
463
- for (k in y)
464
- yt.call(y, k) && !_s.hasOwnProperty(k) && (I[k] = y[k]);
461
+ var q, D = {}, A = null, W = null;
462
+ R !== void 0 && (Wr(R), A = "" + R), js(h) && (Wr(h.key), A = "" + h.key), _s(h) && (W = h.ref, qs(h, k));
463
+ for (q in h)
464
+ yt.call(h, q) && !ks.hasOwnProperty(q) && (D[q] = h[q]);
465
465
  if (o && o.defaultProps) {
466
466
  var L = o.defaultProps;
467
- for (k in L)
468
- I[k] === void 0 && (I[k] = L[k]);
467
+ for (q in L)
468
+ D[q] === void 0 && (D[q] = L[q]);
469
469
  }
470
- if (T || H) {
470
+ if (A || W) {
471
471
  var Q = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
472
- T && Us(I, Q), H && Ms(I, Q);
472
+ A && Ms(D, Q), W && Us(D, Q);
473
473
  }
474
- return Ns(o, T, H, D, S, Br.current, I);
474
+ return Ns(o, A, W, k, C, Br.current, D);
475
475
  }
476
476
  }
477
- var Jt = P.ReactCurrentOwner, Jr = P.ReactDebugCurrentFrame;
477
+ var Zt = b.ReactCurrentOwner, Jr = b.ReactDebugCurrentFrame;
478
478
  function We(o) {
479
479
  if (o) {
480
- var y = o._owner, w = Dt(o.type, o._source, y ? y.type : null);
481
- Jr.setExtraStackFrame(w);
480
+ var h = o._owner, R = Dt(o.type, o._source, h ? h.type : null);
481
+ Jr.setExtraStackFrame(R);
482
482
  } else
483
483
  Jr.setExtraStackFrame(null);
484
484
  }
485
- var Xt;
486
- Xt = !1;
487
- function Zt(o) {
485
+ var er;
486
+ er = !1;
487
+ function tr(o) {
488
488
  return typeof o == "object" && o !== null && o.$$typeof === e;
489
489
  }
490
490
  function Xr() {
491
491
  {
492
- if (Jt.current) {
493
- var o = be(Jt.current.type);
492
+ if (Zt.current) {
493
+ var o = be(Zt.current.type);
494
494
  if (o)
495
495
  return `
496
496
 
@@ -505,142 +505,142 @@ Check the render method of \`` + o + "`.";
505
505
  var Zr = {};
506
506
  function $s(o) {
507
507
  {
508
- var y = Xr();
509
- if (!y) {
510
- var w = typeof o == "string" ? o : o.displayName || o.name;
511
- w && (y = `
508
+ var h = Xr();
509
+ if (!h) {
510
+ var R = typeof o == "string" ? o : o.displayName || o.name;
511
+ R && (h = `
512
512
 
513
- Check the top-level render call using <` + w + ">.");
513
+ Check the top-level render call using <` + R + ">.");
514
514
  }
515
- return y;
515
+ return h;
516
516
  }
517
517
  }
518
- function en(o, y) {
518
+ function en(o, h) {
519
519
  {
520
520
  if (!o._store || o._store.validated || o.key != null)
521
521
  return;
522
522
  o._store.validated = !0;
523
- var w = $s(y);
524
- if (Zr[w])
523
+ var R = $s(h);
524
+ if (Zr[R])
525
525
  return;
526
- Zr[w] = !0;
527
- var S = "";
528
- o && o._owner && o._owner !== Jt.current && (S = " It was passed a child from " + be(o._owner.type) + "."), We(o), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, S), We(null);
526
+ Zr[R] = !0;
527
+ var C = "";
528
+ o && o._owner && o._owner !== Zt.current && (C = " It was passed a child from " + be(o._owner.type) + "."), We(o), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', R, C), We(null);
529
529
  }
530
530
  }
531
- function tn(o, y) {
531
+ function tn(o, h) {
532
532
  {
533
533
  if (typeof o != "object")
534
534
  return;
535
- if (Yt(o))
536
- for (var w = 0; w < o.length; w++) {
537
- var S = o[w];
538
- Zt(S) && en(S, y);
535
+ if (Xt(o))
536
+ for (var R = 0; R < o.length; R++) {
537
+ var C = o[R];
538
+ tr(C) && en(C, h);
539
539
  }
540
- else if (Zt(o))
540
+ else if (tr(o))
541
541
  o._store && (o._store.validated = !0);
542
542
  else if (o) {
543
- var D = R(o);
544
- if (typeof D == "function" && D !== o.entries)
545
- for (var k = D.call(o), I; !(I = k.next()).done; )
546
- Zt(I.value) && en(I.value, y);
543
+ var k = w(o);
544
+ if (typeof k == "function" && k !== o.entries)
545
+ for (var q = k.call(o), D; !(D = q.next()).done; )
546
+ tr(D.value) && en(D.value, h);
547
547
  }
548
548
  }
549
549
  }
550
550
  function Ks(o) {
551
551
  {
552
- var y = o.type;
553
- if (y == null || typeof y == "string")
552
+ var h = o.type;
553
+ if (h == null || typeof h == "string")
554
554
  return;
555
- var w;
556
- if (typeof y == "function")
557
- w = y.propTypes;
558
- else if (typeof y == "object" && (y.$$typeof === c || // Note: Memo only checks outer props here.
555
+ var R;
556
+ if (typeof h == "function")
557
+ R = h.propTypes;
558
+ else if (typeof h == "object" && (h.$$typeof === c || // Note: Memo only checks outer props here.
559
559
  // Inner props are checked in the reconciler.
560
- y.$$typeof === f))
561
- w = y.propTypes;
560
+ h.$$typeof === f))
561
+ R = h.propTypes;
562
562
  else
563
563
  return;
564
- if (w) {
565
- var S = be(y);
566
- As(w, o.props, "prop", S, o);
567
- } else if (y.PropTypes !== void 0 && !Xt) {
568
- Xt = !0;
569
- var D = be(y);
570
- E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
564
+ if (R) {
565
+ var C = be(h);
566
+ As(R, o.props, "prop", C, o);
567
+ } else if (h.PropTypes !== void 0 && !er) {
568
+ er = !0;
569
+ var k = be(h);
570
+ P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
571
571
  }
572
- typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
572
+ typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
573
573
  }
574
574
  }
575
575
  function zs(o) {
576
576
  {
577
- for (var y = Object.keys(o.props), w = 0; w < y.length; w++) {
578
- var S = y[w];
579
- if (S !== "children" && S !== "key") {
580
- We(o), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), We(null);
577
+ for (var h = Object.keys(o.props), R = 0; R < h.length; R++) {
578
+ var C = h[R];
579
+ if (C !== "children" && C !== "key") {
580
+ We(o), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), We(null);
581
581
  break;
582
582
  }
583
583
  }
584
- o.ref !== null && (We(o), E("Invalid attribute `ref` supplied to `React.Fragment`."), We(null));
584
+ o.ref !== null && (We(o), P("Invalid attribute `ref` supplied to `React.Fragment`."), We(null));
585
585
  }
586
586
  }
587
587
  var rn = {};
588
- function nn(o, y, w, S, D, k) {
588
+ function nn(o, h, R, C, k, q) {
589
589
  {
590
- var I = ge(o);
591
- if (!I) {
592
- var T = "";
593
- (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
594
- var H = Qs();
595
- H ? T += H : T += Xr();
590
+ var D = ge(o);
591
+ if (!D) {
592
+ var A = "";
593
+ (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (A += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
594
+ var W = Qs();
595
+ W ? A += W : A += Xr();
596
596
  var L;
597
- o === null ? L = "null" : Yt(o) ? L = "array" : o !== void 0 && o.$$typeof === e ? (L = "<" + (be(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : L = typeof o, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, T);
597
+ o === null ? L = "null" : Xt(o) ? L = "array" : o !== void 0 && o.$$typeof === e ? (L = "<" + (be(o.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : L = typeof o, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, A);
598
598
  }
599
- var Q = Ls(o, y, w, D, k);
599
+ var Q = Ls(o, h, R, k, q);
600
600
  if (Q == null)
601
601
  return Q;
602
- if (I) {
603
- var ee = y.children;
604
- if (ee !== void 0)
605
- if (S)
606
- if (Yt(ee)) {
607
- for (var Be = 0; Be < ee.length; Be++)
608
- tn(ee[Be], o);
609
- Object.freeze && Object.freeze(ee);
602
+ if (D) {
603
+ var te = h.children;
604
+ if (te !== void 0)
605
+ if (C)
606
+ if (Xt(te)) {
607
+ for (var Be = 0; Be < te.length; Be++)
608
+ tn(te[Be], o);
609
+ Object.freeze && Object.freeze(te);
610
610
  } else
611
- E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
611
+ P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
612
612
  else
613
- tn(ee, o);
613
+ tn(te, o);
614
614
  }
615
- if (yt.call(y, "key")) {
616
- var ke = be(o), Y = Object.keys(y).filter(function(Ys) {
615
+ if (yt.call(h, "key")) {
616
+ var _e = be(o), Y = Object.keys(h).filter(function(Ys) {
617
617
  return Ys !== "key";
618
- }), er = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
619
- if (!rn[ke + er]) {
618
+ }), rr = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
619
+ if (!rn[_e + rr]) {
620
620
  var Gs = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
621
- E(`A props object containing a "key" prop is being spread into JSX:
621
+ P(`A props object containing a "key" prop is being spread into JSX:
622
622
  let props = %s;
623
623
  <%s {...props} />
624
624
  React keys must be passed directly to JSX without using spread:
625
625
  let props = %s;
626
- <%s key={someKey} {...props} />`, er, ke, Gs, ke), rn[ke + er] = !0;
626
+ <%s key={someKey} {...props} />`, rr, _e, Gs, _e), rn[_e + rr] = !0;
627
627
  }
628
628
  }
629
629
  return o === n ? zs(Q) : Ks(Q), Q;
630
630
  }
631
631
  }
632
- function Vs(o, y, w) {
633
- return nn(o, y, w, !0);
632
+ function Vs(o, h, R) {
633
+ return nn(o, h, R, !0);
634
634
  }
635
- function Hs(o, y, w) {
636
- return nn(o, y, w, !1);
635
+ function Hs(o, h, R) {
636
+ return nn(o, h, R, !1);
637
637
  }
638
638
  var Ws = Hs, Bs = Vs;
639
639
  mt.Fragment = n, mt.jsx = Ws, mt.jsxs = Bs;
640
640
  }()), mt;
641
641
  }
642
- process.env.NODE_ENV === "production" ? ur.exports = ni() : ur.exports = si();
643
- var wt = ur.exports, cr = /* @__PURE__ */ ((t) => (t.NOT_CHUNKED = "NOT_CHUNKED", t.PROCESSING = "PROCESSING", t.CHUNKED = "CHUNKED", t.ERROR_CHUNKING = "ERROR_CHUNKING", t))(cr || {}), xr = /* @__PURE__ */ ((t) => (t.PDF = "application/pdf", t.TXT = "text/plain", t.CSV = "text/csv", t.DIRECTORY = "inode/directory", t.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", t))(xr || {});
642
+ process.env.NODE_ENV === "production" ? lr.exports = ni() : lr.exports = si();
643
+ var wt = lr.exports, Mt = /* @__PURE__ */ ((t) => (t.NOT_CHUNKED = "NOT_CHUNKED", t.PROCESSING = "PROCESSING", t.CHUNKED = "CHUNKED", t.ERROR_CHUNKING = "ERROR_CHUNKING", t))(Mt || {}), Lt = /* @__PURE__ */ ((t) => (t.PDF = "application/pdf", t.TXT = "text/plain", t.CSV = "text/csv", t.DIRECTORY = "inode/directory", t.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", t))(Lt || {});
644
644
  const gt = 4e3 * 1024 * 1024, ii = [
645
645
  ".txt",
646
646
  ".json",
@@ -676,7 +676,7 @@ Object.entries(Hn).reduce(
676
676
  }),
677
677
  {}
678
678
  );
679
- const oi = new Set(Object.values(xr));
679
+ const oi = new Set(Object.values(Lt));
680
680
  var ft = class {
681
681
  constructor() {
682
682
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -694,12 +694,12 @@ var ft = class {
694
694
  onUnsubscribe() {
695
695
  }
696
696
  }, ze = typeof window > "u" || "Deno" in globalThis;
697
- function re() {
697
+ function ne() {
698
698
  }
699
699
  function ai(t, e) {
700
700
  return typeof t == "function" ? t(e) : t;
701
701
  }
702
- function lr(t) {
702
+ function fr(t) {
703
703
  return typeof t == "number" && t >= 0 && t !== 1 / 0;
704
704
  }
705
705
  function Wn(t, e) {
@@ -753,28 +753,28 @@ function Ir(t, e) {
753
753
  function Ve(t) {
754
754
  return JSON.stringify(
755
755
  t,
756
- (e, r) => dr(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r
756
+ (e, r) => hr(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r
757
757
  );
758
758
  }
759
759
  function Et(t, e) {
760
760
  return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((r) => !Et(t[r], e[r])) : !1;
761
761
  }
762
- function fr(t, e) {
762
+ function dr(t, e) {
763
763
  if (t === e)
764
764
  return t;
765
765
  const r = ln(t) && ln(e);
766
- if (r || dr(t) && dr(e)) {
766
+ if (r || hr(t) && hr(e)) {
767
767
  const n = r ? t : Object.keys(t), s = n.length, i = r ? e : Object.keys(e), u = i.length, l = r ? [] : {};
768
768
  let c = 0;
769
- for (let h = 0; h < u; h++) {
770
- const p = r ? h : i[h];
771
- (!r && n.includes(p) || r) && t[p] === void 0 && e[p] === void 0 ? (l[p] = void 0, c++) : (l[p] = fr(t[p], e[p]), l[p] === t[p] && t[p] !== void 0 && c++);
769
+ for (let d = 0; d < u; d++) {
770
+ const p = r ? d : i[d];
771
+ (!r && n.includes(p) || r) && t[p] === void 0 && e[p] === void 0 ? (l[p] = void 0, c++) : (l[p] = dr(t[p], e[p]), l[p] === t[p] && t[p] !== void 0 && c++);
772
772
  }
773
773
  return s === u && c === s ? t : l;
774
774
  }
775
775
  return e;
776
776
  }
777
- function Nt(t, e) {
777
+ function Qt(t, e) {
778
778
  if (!e || Object.keys(t).length !== Object.keys(e).length)
779
779
  return !1;
780
780
  for (const r in t)
@@ -785,7 +785,7 @@ function Nt(t, e) {
785
785
  function ln(t) {
786
786
  return Array.isArray(t) && t.length === Object.keys(t).length;
787
787
  }
788
- function dr(t) {
788
+ function hr(t) {
789
789
  if (!fn(t))
790
790
  return !1;
791
791
  const e = t.constructor;
@@ -802,19 +802,19 @@ function ui(t) {
802
802
  setTimeout(e, t);
803
803
  });
804
804
  }
805
- function hr(t, e, r) {
805
+ function yr(t, e, r) {
806
806
  if (typeof r.structuralSharing == "function")
807
807
  return r.structuralSharing(t, e);
808
808
  if (r.structuralSharing !== !1) {
809
809
  if (process.env.NODE_ENV !== "production")
810
810
  try {
811
- return fr(t, e);
811
+ return dr(t, e);
812
812
  } catch (n) {
813
813
  console.error(
814
814
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`
815
815
  );
816
816
  }
817
- return fr(t, e);
817
+ return dr(t, e);
818
818
  }
819
819
  return e;
820
820
  }
@@ -826,11 +826,11 @@ function li(t, e, r = 0) {
826
826
  const n = [e, ...t];
827
827
  return r && n.length > r ? n.slice(0, -1) : n;
828
828
  }
829
- var Lt = Symbol();
829
+ var $t = Symbol();
830
830
  function Bn(t, e) {
831
- return process.env.NODE_ENV !== "production" && t.queryFn === Lt && console.error(
831
+ return process.env.NODE_ENV !== "production" && t.queryFn === $t && console.error(
832
832
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
833
- ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === Lt ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
833
+ ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === $t ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
834
834
  }
835
835
  var qe, Ee, Je, An, fi = (An = class extends ft {
836
836
  constructor() {
@@ -838,7 +838,7 @@ var qe, Ee, Je, An, fi = (An = class extends ft {
838
838
  O(this, qe);
839
839
  O(this, Ee);
840
840
  O(this, Je);
841
- b(this, Je, (e) => {
841
+ E(this, Je, (e) => {
842
842
  if (!ze && window.addEventListener) {
843
843
  const r = () => e();
844
844
  return window.addEventListener("visibilitychange", r, !1), () => {
@@ -852,16 +852,16 @@ var qe, Ee, Je, An, fi = (An = class extends ft {
852
852
  }
853
853
  onUnsubscribe() {
854
854
  var e;
855
- this.hasListeners() || ((e = a(this, Ee)) == null || e.call(this), b(this, Ee, void 0));
855
+ this.hasListeners() || ((e = a(this, Ee)) == null || e.call(this), E(this, Ee, void 0));
856
856
  }
857
857
  setEventListener(e) {
858
858
  var r;
859
- b(this, Je, e), (r = a(this, Ee)) == null || r.call(this), b(this, Ee, e((n) => {
859
+ E(this, Je, e), (r = a(this, Ee)) == null || r.call(this), E(this, Ee, e((n) => {
860
860
  typeof n == "boolean" ? this.setFocused(n) : this.onFocus();
861
861
  }));
862
862
  }
863
863
  setFocused(e) {
864
- a(this, qe) !== e && (b(this, qe, e), this.onFocus());
864
+ a(this, qe) !== e && (E(this, qe, e), this.onFocus());
865
865
  }
866
866
  onFocus() {
867
867
  const e = this.isFocused();
@@ -879,7 +879,7 @@ var qe, Ee, Je, An, fi = (An = class extends ft {
879
879
  O(this, Xe, !0);
880
880
  O(this, Pe);
881
881
  O(this, Ze);
882
- b(this, Ze, (e) => {
882
+ E(this, Ze, (e) => {
883
883
  if (!ze && window.addEventListener) {
884
884
  const r = () => e(!0), n = () => e(!1);
885
885
  return window.addEventListener("online", r, !1), window.addEventListener("offline", n, !1), () => {
@@ -893,22 +893,22 @@ var qe, Ee, Je, An, fi = (An = class extends ft {
893
893
  }
894
894
  onUnsubscribe() {
895
895
  var e;
896
- this.hasListeners() || ((e = a(this, Pe)) == null || e.call(this), b(this, Pe, void 0));
896
+ this.hasListeners() || ((e = a(this, Pe)) == null || e.call(this), E(this, Pe, void 0));
897
897
  }
898
898
  setEventListener(e) {
899
899
  var r;
900
- b(this, Ze, e), (r = a(this, Pe)) == null || r.call(this), b(this, Pe, e(this.setOnline.bind(this)));
900
+ E(this, Ze, e), (r = a(this, Pe)) == null || r.call(this), E(this, Pe, e(this.setOnline.bind(this)));
901
901
  }
902
902
  setOnline(e) {
903
- a(this, Xe) !== e && (b(this, Xe, e), this.listeners.forEach((n) => {
903
+ a(this, Xe) !== e && (E(this, Xe, e), this.listeners.forEach((n) => {
904
904
  n(e);
905
905
  }));
906
906
  }
907
907
  isOnline() {
908
908
  return a(this, Xe);
909
909
  }
910
- }, Xe = new WeakMap(), Pe = new WeakMap(), Ze = new WeakMap(), xn), Qt = new di();
911
- function yr() {
910
+ }, Xe = new WeakMap(), Pe = new WeakMap(), Ze = new WeakMap(), xn), Kt = new di();
911
+ function pr() {
912
912
  let t, e;
913
913
  const r = new Promise((s, i) => {
914
914
  t = s, e = i;
@@ -934,60 +934,60 @@ function hi(t) {
934
934
  return Math.min(1e3 * 2 ** t, 3e4);
935
935
  }
936
936
  function Gn(t) {
937
- return (t ?? "online") === "online" ? Qt.isOnline() : !0;
937
+ return (t ?? "online") === "online" ? Kt.isOnline() : !0;
938
938
  }
939
939
  var Yn = class extends Error {
940
940
  constructor(t) {
941
941
  super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
942
942
  }
943
943
  };
944
- function sr(t) {
944
+ function or(t) {
945
945
  return t instanceof Yn;
946
946
  }
947
947
  function Jn(t) {
948
948
  let e = !1, r = 0, n = !1, s;
949
- const i = yr(), u = (g) => {
950
- var R;
951
- n || (d(new Yn(g)), (R = t.abort) == null || R.call(t));
949
+ const i = pr(), u = (v) => {
950
+ var w;
951
+ n || (y(new Yn(v)), (w = t.abort) == null || w.call(t));
952
952
  }, l = () => {
953
953
  e = !0;
954
954
  }, c = () => {
955
955
  e = !1;
956
- }, h = () => Dr.isFocused() && (t.networkMode === "always" || Qt.isOnline()) && t.canRun(), p = () => Gn(t.networkMode) && t.canRun(), f = (g) => {
957
- var R;
958
- n || (n = !0, (R = t.onSuccess) == null || R.call(t, g), s == null || s(), i.resolve(g));
959
- }, d = (g) => {
960
- var R;
961
- n || (n = !0, (R = t.onError) == null || R.call(t, g), s == null || s(), i.reject(g));
962
- }, m = () => new Promise((g) => {
963
- var R;
964
- s = (P) => {
965
- (n || h()) && g(P);
966
- }, (R = t.onPause) == null || R.call(t);
956
+ }, d = () => Dr.isFocused() && (t.networkMode === "always" || Kt.isOnline()) && t.canRun(), p = () => Gn(t.networkMode) && t.canRun(), f = (v) => {
957
+ var w;
958
+ n || (n = !0, (w = t.onSuccess) == null || w.call(t, v), s == null || s(), i.resolve(v));
959
+ }, y = (v) => {
960
+ var w;
961
+ n || (n = !0, (w = t.onError) == null || w.call(t, v), s == null || s(), i.reject(v));
962
+ }, m = () => new Promise((v) => {
963
+ var w;
964
+ s = (b) => {
965
+ (n || d()) && v(b);
966
+ }, (w = t.onPause) == null || w.call(t);
967
967
  }).then(() => {
968
- var g;
969
- s = void 0, n || (g = t.onContinue) == null || g.call(t);
970
- }), v = () => {
968
+ var v;
969
+ s = void 0, n || (v = t.onContinue) == null || v.call(t);
970
+ }), g = () => {
971
971
  if (n)
972
972
  return;
973
- let g;
974
- const R = r === 0 ? t.initialPromise : void 0;
973
+ let v;
974
+ const w = r === 0 ? t.initialPromise : void 0;
975
975
  try {
976
- g = R ?? t.fn();
977
- } catch (P) {
978
- g = Promise.reject(P);
976
+ v = w ?? t.fn();
977
+ } catch (b) {
978
+ v = Promise.reject(b);
979
979
  }
980
- Promise.resolve(g).then(f).catch((P) => {
980
+ Promise.resolve(v).then(f).catch((b) => {
981
981
  var Z;
982
982
  if (n)
983
983
  return;
984
- const E = t.retry ?? (ze ? 0 : 3), x = t.retryDelay ?? hi, j = typeof x == "function" ? x(r, P) : x, N = E === !0 || typeof E == "number" && r < E || typeof E == "function" && E(r, P);
985
- if (e || !N) {
986
- d(P);
984
+ const P = t.retry ?? (ze ? 0 : 3), S = t.retryDelay ?? hi, T = typeof S == "function" ? S(r, b) : S, j = P === !0 || typeof P == "number" && r < P || typeof P == "function" && P(r, b);
985
+ if (e || !j) {
986
+ y(b);
987
987
  return;
988
988
  }
989
- r++, (Z = t.onFail) == null || Z.call(t, r, P), ui(j).then(() => h() ? void 0 : m()).then(() => {
990
- e ? d(P) : v();
989
+ r++, (Z = t.onFail) == null || Z.call(t, r, b), ui(T).then(() => d() ? void 0 : m()).then(() => {
990
+ e ? y(b) : g();
991
991
  });
992
992
  });
993
993
  };
@@ -998,7 +998,7 @@ function Jn(t) {
998
998
  cancelRetry: l,
999
999
  continueRetry: c,
1000
1000
  canStart: p,
1001
- start: () => (p() ? v() : m().then(v), i)
1001
+ start: () => (p() ? g() : m().then(g), i)
1002
1002
  };
1003
1003
  }
1004
1004
  function yi() {
@@ -1060,15 +1060,15 @@ function yi() {
1060
1060
  }
1061
1061
  };
1062
1062
  }
1063
- var $ = yi(), Ue, In, Xn = (In = class {
1063
+ var $ = yi(), Me, In, Xn = (In = class {
1064
1064
  constructor() {
1065
- O(this, Ue);
1065
+ O(this, Me);
1066
1066
  }
1067
1067
  destroy() {
1068
1068
  this.clearGcTimeout();
1069
1069
  }
1070
1070
  scheduleGc() {
1071
- this.clearGcTimeout(), lr(this.gcTime) && b(this, Ue, setTimeout(() => {
1071
+ this.clearGcTimeout(), fr(this.gcTime) && E(this, Me, setTimeout(() => {
1072
1072
  this.optionalRemove();
1073
1073
  }, this.gcTime));
1074
1074
  }
@@ -1079,37 +1079,37 @@ var $ = yi(), Ue, In, Xn = (In = class {
1079
1079
  );
1080
1080
  }
1081
1081
  clearGcTimeout() {
1082
- a(this, Ue) && (clearTimeout(a(this, Ue)), b(this, Ue, void 0));
1082
+ a(this, Me) && (clearTimeout(a(this, Me)), E(this, Me, void 0));
1083
1083
  }
1084
- }, Ue = new WeakMap(), In), et, tt, te, Me, V, Ct, Ne, se, he, Dn, pi = (Dn = class extends Xn {
1084
+ }, Me = new WeakMap(), In), et, tt, re, Ue, H, Ct, Ne, se, he, Dn, pi = (Dn = class extends Xn {
1085
1085
  constructor(e) {
1086
1086
  super();
1087
1087
  O(this, se);
1088
1088
  O(this, et);
1089
1089
  O(this, tt);
1090
- O(this, te);
1091
- O(this, Me);
1092
- O(this, V);
1090
+ O(this, re);
1091
+ O(this, Ue);
1092
+ O(this, H);
1093
1093
  O(this, Ct);
1094
1094
  O(this, Ne);
1095
- b(this, Ne, !1), b(this, Ct, e.defaultOptions), this.setOptions(e.options), this.observers = [], b(this, Me, e.client), b(this, te, a(this, Me).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, b(this, et, mi(this.options)), this.state = e.state ?? a(this, et), this.scheduleGc();
1095
+ E(this, Ne, !1), E(this, Ct, e.defaultOptions), this.setOptions(e.options), this.observers = [], E(this, Ue, e.client), E(this, re, a(this, Ue).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, E(this, et, mi(this.options)), this.state = e.state ?? a(this, et), this.scheduleGc();
1096
1096
  }
1097
1097
  get meta() {
1098
1098
  return this.options.meta;
1099
1099
  }
1100
1100
  get promise() {
1101
1101
  var e;
1102
- return (e = a(this, V)) == null ? void 0 : e.promise;
1102
+ return (e = a(this, H)) == null ? void 0 : e.promise;
1103
1103
  }
1104
1104
  setOptions(e) {
1105
1105
  this.options = { ...a(this, Ct), ...e }, this.updateGcTime(this.options.gcTime);
1106
1106
  }
1107
1107
  optionalRemove() {
1108
- !this.observers.length && this.state.fetchStatus === "idle" && a(this, te).remove(this);
1108
+ !this.observers.length && this.state.fetchStatus === "idle" && a(this, re).remove(this);
1109
1109
  }
1110
1110
  setData(e, r) {
1111
- const n = hr(this.state.data, e, this.options);
1112
- return C(this, se, he).call(this, {
1111
+ const n = yr(this.state.data, e, this.options);
1112
+ return F(this, se, he).call(this, {
1113
1113
  data: n,
1114
1114
  type: "success",
1115
1115
  dataUpdatedAt: r == null ? void 0 : r.updatedAt,
@@ -1117,12 +1117,12 @@ var $ = yi(), Ue, In, Xn = (In = class {
1117
1117
  }), n;
1118
1118
  }
1119
1119
  setState(e, r) {
1120
- C(this, se, he).call(this, { type: "setState", state: e, setStateOptions: r });
1120
+ F(this, se, he).call(this, { type: "setState", state: e, setStateOptions: r });
1121
1121
  }
1122
1122
  cancel(e) {
1123
1123
  var n, s;
1124
- const r = (n = a(this, V)) == null ? void 0 : n.promise;
1125
- return (s = a(this, V)) == null || s.cancel(e), r ? r.then(re).catch(re) : Promise.resolve();
1124
+ const r = (n = a(this, H)) == null ? void 0 : n.promise;
1125
+ return (s = a(this, H)) == null || s.cancel(e), r ? r.then(ne).catch(ne) : Promise.resolve();
1126
1126
  }
1127
1127
  destroy() {
1128
1128
  super.destroy(), this.cancel({ silent: !0 });
@@ -1136,7 +1136,7 @@ var $ = yi(), Ue, In, Xn = (In = class {
1136
1136
  );
1137
1137
  }
1138
1138
  isDisabled() {
1139
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === Lt || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
1139
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === $t || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
1140
1140
  }
1141
1141
  isStale() {
1142
1142
  return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
@@ -1149,35 +1149,35 @@ var $ = yi(), Ue, In, Xn = (In = class {
1149
1149
  onFocus() {
1150
1150
  var r;
1151
1151
  const e = this.observers.find((n) => n.shouldFetchOnWindowFocus());
1152
- e == null || e.refetch({ cancelRefetch: !1 }), (r = a(this, V)) == null || r.continue();
1152
+ e == null || e.refetch({ cancelRefetch: !1 }), (r = a(this, H)) == null || r.continue();
1153
1153
  }
1154
1154
  onOnline() {
1155
1155
  var r;
1156
1156
  const e = this.observers.find((n) => n.shouldFetchOnReconnect());
1157
- e == null || e.refetch({ cancelRefetch: !1 }), (r = a(this, V)) == null || r.continue();
1157
+ e == null || e.refetch({ cancelRefetch: !1 }), (r = a(this, H)) == null || r.continue();
1158
1158
  }
1159
1159
  addObserver(e) {
1160
- this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), a(this, te).notify({ type: "observerAdded", query: this, observer: e }));
1160
+ this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), a(this, re).notify({ type: "observerAdded", query: this, observer: e }));
1161
1161
  }
1162
1162
  removeObserver(e) {
1163
- this.observers.includes(e) && (this.observers = this.observers.filter((r) => r !== e), this.observers.length || (a(this, V) && (a(this, Ne) ? a(this, V).cancel({ revert: !0 }) : a(this, V).cancelRetry()), this.scheduleGc()), a(this, te).notify({ type: "observerRemoved", query: this, observer: e }));
1163
+ this.observers.includes(e) && (this.observers = this.observers.filter((r) => r !== e), this.observers.length || (a(this, H) && (a(this, Ne) ? a(this, H).cancel({ revert: !0 }) : a(this, H).cancelRetry()), this.scheduleGc()), a(this, re).notify({ type: "observerRemoved", query: this, observer: e }));
1164
1164
  }
1165
1165
  getObserversCount() {
1166
1166
  return this.observers.length;
1167
1167
  }
1168
1168
  invalidate() {
1169
- this.state.isInvalidated || C(this, se, he).call(this, { type: "invalidate" });
1169
+ this.state.isInvalidated || F(this, se, he).call(this, { type: "invalidate" });
1170
1170
  }
1171
1171
  fetch(e, r) {
1172
- var c, h, p;
1172
+ var c, d, p;
1173
1173
  if (this.state.fetchStatus !== "idle") {
1174
1174
  if (this.state.data !== void 0 && (r != null && r.cancelRefetch))
1175
1175
  this.cancel({ silent: !0 });
1176
- else if (a(this, V))
1177
- return a(this, V).continueRetry(), a(this, V).promise;
1176
+ else if (a(this, H))
1177
+ return a(this, H).continueRetry(), a(this, H).promise;
1178
1178
  }
1179
1179
  if (e && this.setOptions(e), !this.options.queryFn) {
1180
- const f = this.observers.find((d) => d.options.queryFn);
1180
+ const f = this.observers.find((y) => y.options.queryFn);
1181
1181
  f && this.setOptions(f.options);
1182
1182
  }
1183
1183
  process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
@@ -1186,53 +1186,53 @@ var $ = yi(), Ue, In, Xn = (In = class {
1186
1186
  const n = new AbortController(), s = (f) => {
1187
1187
  Object.defineProperty(f, "signal", {
1188
1188
  enumerable: !0,
1189
- get: () => (b(this, Ne, !0), n.signal)
1189
+ get: () => (E(this, Ne, !0), n.signal)
1190
1190
  });
1191
1191
  }, i = () => {
1192
- const f = Bn(this.options, r), d = {
1193
- client: a(this, Me),
1192
+ const f = Bn(this.options, r), y = {
1193
+ client: a(this, Ue),
1194
1194
  queryKey: this.queryKey,
1195
1195
  meta: this.meta
1196
1196
  };
1197
- return s(d), b(this, Ne, !1), this.options.persister ? this.options.persister(
1197
+ return s(y), E(this, Ne, !1), this.options.persister ? this.options.persister(
1198
1198
  f,
1199
- d,
1199
+ y,
1200
1200
  this
1201
- ) : f(d);
1201
+ ) : f(y);
1202
1202
  }, u = {
1203
1203
  fetchOptions: r,
1204
1204
  options: this.options,
1205
1205
  queryKey: this.queryKey,
1206
- client: a(this, Me),
1206
+ client: a(this, Ue),
1207
1207
  state: this.state,
1208
1208
  fetchFn: i
1209
1209
  };
1210
1210
  s(u), (c = this.options.behavior) == null || c.onFetch(
1211
1211
  u,
1212
1212
  this
1213
- ), b(this, tt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((h = u.fetchOptions) == null ? void 0 : h.meta)) && C(this, se, he).call(this, { type: "fetch", meta: (p = u.fetchOptions) == null ? void 0 : p.meta });
1213
+ ), E(this, tt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && F(this, se, he).call(this, { type: "fetch", meta: (p = u.fetchOptions) == null ? void 0 : p.meta });
1214
1214
  const l = (f) => {
1215
- var d, m, v, g;
1216
- sr(f) && f.silent || C(this, se, he).call(this, {
1215
+ var y, m, g, v;
1216
+ or(f) && f.silent || F(this, se, he).call(this, {
1217
1217
  type: "error",
1218
1218
  error: f
1219
- }), sr(f) || ((m = (d = a(this, te).config).onError) == null || m.call(
1220
- d,
1219
+ }), or(f) || ((m = (y = a(this, re).config).onError) == null || m.call(
1220
+ y,
1221
1221
  f,
1222
1222
  this
1223
- ), (g = (v = a(this, te).config).onSettled) == null || g.call(
1224
- v,
1223
+ ), (v = (g = a(this, re).config).onSettled) == null || v.call(
1224
+ g,
1225
1225
  this.state.data,
1226
1226
  f,
1227
1227
  this
1228
1228
  )), this.scheduleGc();
1229
1229
  };
1230
- return b(this, V, Jn({
1230
+ return E(this, H, Jn({
1231
1231
  initialPromise: r == null ? void 0 : r.initialPromise,
1232
1232
  fn: u.fetchFn,
1233
1233
  abort: n.abort.bind(n),
1234
1234
  onSuccess: (f) => {
1235
- var d, m, v, g;
1235
+ var y, m, g, v;
1236
1236
  if (f === void 0) {
1237
1237
  process.env.NODE_ENV !== "production" && console.error(
1238
1238
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
@@ -1241,34 +1241,34 @@ var $ = yi(), Ue, In, Xn = (In = class {
1241
1241
  }
1242
1242
  try {
1243
1243
  this.setData(f);
1244
- } catch (R) {
1245
- l(R);
1244
+ } catch (w) {
1245
+ l(w);
1246
1246
  return;
1247
1247
  }
1248
- (m = (d = a(this, te).config).onSuccess) == null || m.call(d, f, this), (g = (v = a(this, te).config).onSettled) == null || g.call(
1249
- v,
1248
+ (m = (y = a(this, re).config).onSuccess) == null || m.call(y, f, this), (v = (g = a(this, re).config).onSettled) == null || v.call(
1249
+ g,
1250
1250
  f,
1251
1251
  this.state.error,
1252
1252
  this
1253
1253
  ), this.scheduleGc();
1254
1254
  },
1255
1255
  onError: l,
1256
- onFail: (f, d) => {
1257
- C(this, se, he).call(this, { type: "failed", failureCount: f, error: d });
1256
+ onFail: (f, y) => {
1257
+ F(this, se, he).call(this, { type: "failed", failureCount: f, error: y });
1258
1258
  },
1259
1259
  onPause: () => {
1260
- C(this, se, he).call(this, { type: "pause" });
1260
+ F(this, se, he).call(this, { type: "pause" });
1261
1261
  },
1262
1262
  onContinue: () => {
1263
- C(this, se, he).call(this, { type: "continue" });
1263
+ F(this, se, he).call(this, { type: "continue" });
1264
1264
  },
1265
1265
  retry: u.options.retry,
1266
1266
  retryDelay: u.options.retryDelay,
1267
1267
  networkMode: u.options.networkMode,
1268
1268
  canRun: () => !0
1269
- })), a(this, V).start();
1269
+ })), a(this, H).start();
1270
1270
  }
1271
- }, et = new WeakMap(), tt = new WeakMap(), te = new WeakMap(), Me = new WeakMap(), V = new WeakMap(), Ct = new WeakMap(), Ne = new WeakMap(), se = new WeakSet(), he = function(e) {
1271
+ }, et = new WeakMap(), tt = new WeakMap(), re = new WeakMap(), Ue = new WeakMap(), H = new WeakMap(), Ct = new WeakMap(), Ne = new WeakMap(), se = new WeakSet(), he = function(e) {
1272
1272
  const r = (n) => {
1273
1273
  switch (e.type) {
1274
1274
  case "failed":
@@ -1310,7 +1310,7 @@ var $ = yi(), Ue, In, Xn = (In = class {
1310
1310
  };
1311
1311
  case "error":
1312
1312
  const s = e.error;
1313
- return sr(s) && s.revert && a(this, tt) ? { ...a(this, tt), fetchStatus: "idle" } : {
1313
+ return or(s) && s.revert && a(this, tt) ? { ...a(this, tt), fetchStatus: "idle" } : {
1314
1314
  ...n,
1315
1315
  error: s,
1316
1316
  errorUpdateCount: n.errorUpdateCount + 1,
@@ -1335,7 +1335,7 @@ var $ = yi(), Ue, In, Xn = (In = class {
1335
1335
  this.state = r(this.state), $.batch(() => {
1336
1336
  this.observers.forEach((n) => {
1337
1337
  n.onQueryUpdate();
1338
- }), a(this, te).notify({ query: this, type: "updated", action: e });
1338
+ }), a(this, re).notify({ query: this, type: "updated", action: e });
1339
1339
  });
1340
1340
  }, Dn);
1341
1341
  function Zn(t, e) {
@@ -1366,11 +1366,11 @@ function mi(t) {
1366
1366
  fetchStatus: "idle"
1367
1367
  };
1368
1368
  }
1369
- var ue, _n, gi = (_n = class extends ft {
1369
+ var ue, kn, gi = (kn = class extends ft {
1370
1370
  constructor(e = {}) {
1371
1371
  super();
1372
1372
  O(this, ue);
1373
- this.config = e, b(this, ue, /* @__PURE__ */ new Map());
1373
+ this.config = e, E(this, ue, /* @__PURE__ */ new Map());
1374
1374
  }
1375
1375
  build(e, r, n) {
1376
1376
  const s = r.queryKey, i = r.queryHash ?? Ir(s, r);
@@ -1438,14 +1438,14 @@ var ue, _n, gi = (_n = class extends ft {
1438
1438
  });
1439
1439
  });
1440
1440
  }
1441
- }, ue = new WeakMap(), _n), ce, W, Le, le, we, kn, vi = (kn = class extends Xn {
1441
+ }, ue = new WeakMap(), kn), ce, B, Le, le, we, _n, vi = (_n = class extends Xn {
1442
1442
  constructor(e) {
1443
1443
  super();
1444
1444
  O(this, le);
1445
1445
  O(this, ce);
1446
- O(this, W);
1446
+ O(this, B);
1447
1447
  O(this, Le);
1448
- this.mutationId = e.mutationId, b(this, W, e.mutationCache), b(this, ce, []), this.state = e.state || es(), this.setOptions(e.options), this.scheduleGc();
1448
+ this.mutationId = e.mutationId, E(this, B, e.mutationCache), E(this, ce, []), this.state = e.state || es(), this.setOptions(e.options), this.scheduleGc();
1449
1449
  }
1450
1450
  setOptions(e) {
1451
1451
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -1454,21 +1454,21 @@ var ue, _n, gi = (_n = class extends ft {
1454
1454
  return this.options.meta;
1455
1455
  }
1456
1456
  addObserver(e) {
1457
- a(this, ce).includes(e) || (a(this, ce).push(e), this.clearGcTimeout(), a(this, W).notify({
1457
+ a(this, ce).includes(e) || (a(this, ce).push(e), this.clearGcTimeout(), a(this, B).notify({
1458
1458
  type: "observerAdded",
1459
1459
  mutation: this,
1460
1460
  observer: e
1461
1461
  }));
1462
1462
  }
1463
1463
  removeObserver(e) {
1464
- b(this, ce, a(this, ce).filter((r) => r !== e)), this.scheduleGc(), a(this, W).notify({
1464
+ E(this, ce, a(this, ce).filter((r) => r !== e)), this.scheduleGc(), a(this, B).notify({
1465
1465
  type: "observerRemoved",
1466
1466
  mutation: this,
1467
1467
  observer: e
1468
1468
  });
1469
1469
  }
1470
1470
  optionalRemove() {
1471
- a(this, ce).length || (this.state.status === "pending" ? this.scheduleGc() : a(this, W).remove(this));
1471
+ a(this, ce).length || (this.state.status === "pending" ? this.scheduleGc() : a(this, B).remove(this));
1472
1472
  }
1473
1473
  continue() {
1474
1474
  var e;
@@ -1476,69 +1476,69 @@ var ue, _n, gi = (_n = class extends ft {
1476
1476
  this.execute(this.state.variables);
1477
1477
  }
1478
1478
  async execute(e) {
1479
- var s, i, u, l, c, h, p, f, d, m, v, g, R, P, E, x, j, N, Z, z;
1480
- b(this, Le, Jn({
1479
+ var s, i, u, l, c, d, p, f, y, m, g, v, w, b, P, S, T, j, Z, z;
1480
+ E(this, Le, Jn({
1481
1481
  fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
1482
- onFail: (U, q) => {
1483
- C(this, le, we).call(this, { type: "failed", failureCount: U, error: q });
1482
+ onFail: (U, M) => {
1483
+ F(this, le, we).call(this, { type: "failed", failureCount: U, error: M });
1484
1484
  },
1485
1485
  onPause: () => {
1486
- C(this, le, we).call(this, { type: "pause" });
1486
+ F(this, le, we).call(this, { type: "pause" });
1487
1487
  },
1488
1488
  onContinue: () => {
1489
- C(this, le, we).call(this, { type: "continue" });
1489
+ F(this, le, we).call(this, { type: "continue" });
1490
1490
  },
1491
1491
  retry: this.options.retry ?? 0,
1492
1492
  retryDelay: this.options.retryDelay,
1493
1493
  networkMode: this.options.networkMode,
1494
- canRun: () => a(this, W).canRun(this)
1494
+ canRun: () => a(this, B).canRun(this)
1495
1495
  }));
1496
1496
  const r = this.state.status === "pending", n = !a(this, Le).canStart();
1497
1497
  try {
1498
1498
  if (!r) {
1499
- C(this, le, we).call(this, { type: "pending", variables: e, isPaused: n }), await ((i = (s = a(this, W).config).onMutate) == null ? void 0 : i.call(
1499
+ F(this, le, we).call(this, { type: "pending", variables: e, isPaused: n }), await ((i = (s = a(this, B).config).onMutate) == null ? void 0 : i.call(
1500
1500
  s,
1501
1501
  e,
1502
1502
  this
1503
1503
  ));
1504
- const q = await ((l = (u = this.options).onMutate) == null ? void 0 : l.call(u, e));
1505
- q !== this.state.context && C(this, le, we).call(this, {
1504
+ const M = await ((l = (u = this.options).onMutate) == null ? void 0 : l.call(u, e));
1505
+ M !== this.state.context && F(this, le, we).call(this, {
1506
1506
  type: "pending",
1507
- context: q,
1507
+ context: M,
1508
1508
  variables: e,
1509
1509
  isPaused: n
1510
1510
  });
1511
1511
  }
1512
1512
  const U = await a(this, Le).start();
1513
- return await ((h = (c = a(this, W).config).onSuccess) == null ? void 0 : h.call(
1513
+ return await ((d = (c = a(this, B).config).onSuccess) == null ? void 0 : d.call(
1514
1514
  c,
1515
1515
  U,
1516
1516
  e,
1517
1517
  this.state.context,
1518
1518
  this
1519
- )), await ((f = (p = this.options).onSuccess) == null ? void 0 : f.call(p, U, e, this.state.context)), await ((m = (d = a(this, W).config).onSettled) == null ? void 0 : m.call(
1520
- d,
1519
+ )), await ((f = (p = this.options).onSuccess) == null ? void 0 : f.call(p, U, e, this.state.context)), await ((m = (y = a(this, B).config).onSettled) == null ? void 0 : m.call(
1520
+ y,
1521
1521
  U,
1522
1522
  null,
1523
1523
  this.state.variables,
1524
1524
  this.state.context,
1525
1525
  this
1526
- )), await ((g = (v = this.options).onSettled) == null ? void 0 : g.call(v, U, null, e, this.state.context)), C(this, le, we).call(this, { type: "success", data: U }), U;
1526
+ )), await ((v = (g = this.options).onSettled) == null ? void 0 : v.call(g, U, null, e, this.state.context)), F(this, le, we).call(this, { type: "success", data: U }), U;
1527
1527
  } catch (U) {
1528
1528
  try {
1529
- throw await ((P = (R = a(this, W).config).onError) == null ? void 0 : P.call(
1530
- R,
1529
+ throw await ((b = (w = a(this, B).config).onError) == null ? void 0 : b.call(
1530
+ w,
1531
1531
  U,
1532
1532
  e,
1533
1533
  this.state.context,
1534
1534
  this
1535
- )), await ((x = (E = this.options).onError) == null ? void 0 : x.call(
1536
- E,
1535
+ )), await ((S = (P = this.options).onError) == null ? void 0 : S.call(
1536
+ P,
1537
1537
  U,
1538
1538
  e,
1539
1539
  this.state.context
1540
- )), await ((N = (j = a(this, W).config).onSettled) == null ? void 0 : N.call(
1541
- j,
1540
+ )), await ((j = (T = a(this, B).config).onSettled) == null ? void 0 : j.call(
1541
+ T,
1542
1542
  void 0,
1543
1543
  U,
1544
1544
  this.state.variables,
@@ -1552,13 +1552,13 @@ var ue, _n, gi = (_n = class extends ft {
1552
1552
  this.state.context
1553
1553
  )), U;
1554
1554
  } finally {
1555
- C(this, le, we).call(this, { type: "error", error: U });
1555
+ F(this, le, we).call(this, { type: "error", error: U });
1556
1556
  }
1557
1557
  } finally {
1558
- a(this, W).runNext(this);
1558
+ a(this, B).runNext(this);
1559
1559
  }
1560
1560
  }
1561
- }, ce = new WeakMap(), W = new WeakMap(), Le = new WeakMap(), le = new WeakSet(), we = function(e) {
1561
+ }, ce = new WeakMap(), B = new WeakMap(), Le = new WeakMap(), le = new WeakSet(), we = function(e) {
1562
1562
  const r = (n) => {
1563
1563
  switch (e.type) {
1564
1564
  case "failed":
@@ -1615,13 +1615,13 @@ var ue, _n, gi = (_n = class extends ft {
1615
1615
  this.state = r(this.state), $.batch(() => {
1616
1616
  a(this, ce).forEach((n) => {
1617
1617
  n.onMutationUpdate(e);
1618
- }), a(this, W).notify({
1618
+ }), a(this, B).notify({
1619
1619
  mutation: this,
1620
1620
  type: "updated",
1621
1621
  action: e
1622
1622
  });
1623
1623
  });
1624
- }, kn);
1624
+ }, _n);
1625
1625
  function es() {
1626
1626
  return {
1627
1627
  context: void 0,
@@ -1641,12 +1641,12 @@ var ye, ie, Tt, jn, bi = (jn = class extends ft {
1641
1641
  O(this, ye);
1642
1642
  O(this, ie);
1643
1643
  O(this, Tt);
1644
- this.config = e, b(this, ye, /* @__PURE__ */ new Set()), b(this, ie, /* @__PURE__ */ new Map()), b(this, Tt, 0);
1644
+ this.config = e, E(this, ye, /* @__PURE__ */ new Set()), E(this, ie, /* @__PURE__ */ new Map()), E(this, Tt, 0);
1645
1645
  }
1646
1646
  build(e, r, n) {
1647
1647
  const s = new vi({
1648
1648
  mutationCache: this,
1649
- mutationId: ++kt(this, Tt)._,
1649
+ mutationId: ++_t(this, Tt)._,
1650
1650
  options: e.defaultMutationOptions(r),
1651
1651
  state: n
1652
1652
  });
@@ -1724,7 +1724,7 @@ var ye, ie, Tt, jn, bi = (jn = class extends ft {
1724
1724
  const e = this.getAll().filter((r) => r.state.isPaused);
1725
1725
  return $.batch(
1726
1726
  () => Promise.all(
1727
- e.map((r) => r.continue().catch(re))
1727
+ e.map((r) => r.continue().catch(ne))
1728
1728
  )
1729
1729
  );
1730
1730
  }
@@ -1736,61 +1736,61 @@ function jt(t) {
1736
1736
  function dn(t) {
1737
1737
  return {
1738
1738
  onFetch: (e, r) => {
1739
- var p, f, d, m, v;
1740
- const n = e.options, s = (d = (f = (p = e.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : d.direction, i = ((m = e.state.data) == null ? void 0 : m.pages) || [], u = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
1739
+ var p, f, y, m, g;
1740
+ const n = e.options, s = (y = (f = (p = e.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : y.direction, i = ((m = e.state.data) == null ? void 0 : m.pages) || [], u = ((g = e.state.data) == null ? void 0 : g.pageParams) || [];
1741
1741
  let l = { pages: [], pageParams: [] }, c = 0;
1742
- const h = async () => {
1743
- let g = !1;
1744
- const R = (x) => {
1745
- Object.defineProperty(x, "signal", {
1742
+ const d = async () => {
1743
+ let v = !1;
1744
+ const w = (S) => {
1745
+ Object.defineProperty(S, "signal", {
1746
1746
  enumerable: !0,
1747
- get: () => (e.signal.aborted ? g = !0 : e.signal.addEventListener("abort", () => {
1748
- g = !0;
1747
+ get: () => (e.signal.aborted ? v = !0 : e.signal.addEventListener("abort", () => {
1748
+ v = !0;
1749
1749
  }), e.signal)
1750
1750
  });
1751
- }, P = Bn(e.options, e.fetchOptions), E = async (x, j, N) => {
1752
- if (g)
1751
+ }, b = Bn(e.options, e.fetchOptions), P = async (S, T, j) => {
1752
+ if (v)
1753
1753
  return Promise.reject();
1754
- if (j == null && x.pages.length)
1755
- return Promise.resolve(x);
1754
+ if (T == null && S.pages.length)
1755
+ return Promise.resolve(S);
1756
1756
  const Z = {
1757
1757
  client: e.client,
1758
1758
  queryKey: e.queryKey,
1759
- pageParam: j,
1760
- direction: N ? "backward" : "forward",
1759
+ pageParam: T,
1760
+ direction: j ? "backward" : "forward",
1761
1761
  meta: e.options.meta
1762
1762
  };
1763
- R(Z);
1764
- const z = await P(
1763
+ w(Z);
1764
+ const z = await b(
1765
1765
  Z
1766
- ), { maxPages: U } = e.options, q = N ? li : ci;
1766
+ ), { maxPages: U } = e.options, M = j ? li : ci;
1767
1767
  return {
1768
- pages: q(x.pages, z, U),
1769
- pageParams: q(x.pageParams, j, U)
1768
+ pages: M(S.pages, z, U),
1769
+ pageParams: M(S.pageParams, T, U)
1770
1770
  };
1771
1771
  };
1772
1772
  if (s && i.length) {
1773
- const x = s === "backward", j = x ? wi : hn, N = {
1773
+ const S = s === "backward", T = S ? wi : hn, j = {
1774
1774
  pages: i,
1775
1775
  pageParams: u
1776
- }, Z = j(n, N);
1777
- l = await E(N, Z, x);
1776
+ }, Z = T(n, j);
1777
+ l = await P(j, Z, S);
1778
1778
  } else {
1779
- const x = t ?? i.length;
1779
+ const S = t ?? i.length;
1780
1780
  do {
1781
- const j = c === 0 ? u[0] ?? n.initialPageParam : hn(n, l);
1782
- if (c > 0 && j == null)
1781
+ const T = c === 0 ? u[0] ?? n.initialPageParam : hn(n, l);
1782
+ if (c > 0 && T == null)
1783
1783
  break;
1784
- l = await E(l, j), c++;
1785
- } while (c < x);
1784
+ l = await P(l, T), c++;
1785
+ } while (c < S);
1786
1786
  }
1787
1787
  return l;
1788
1788
  };
1789
1789
  e.options.persister ? e.fetchFn = () => {
1790
- var g, R;
1791
- return (R = (g = e.options).persister) == null ? void 0 : R.call(
1792
- g,
1793
- h,
1790
+ var v, w;
1791
+ return (w = (v = e.options).persister) == null ? void 0 : w.call(
1792
+ v,
1793
+ d,
1794
1794
  {
1795
1795
  client: e.client,
1796
1796
  queryKey: e.queryKey,
@@ -1799,7 +1799,7 @@ function dn(t) {
1799
1799
  },
1800
1800
  r
1801
1801
  );
1802
- } : e.fetchFn = h;
1802
+ } : e.fetchFn = d;
1803
1803
  }
1804
1804
  };
1805
1805
  }
@@ -1816,60 +1816,60 @@ function wi(t, { pages: e, pageParams: r }) {
1816
1816
  var n;
1817
1817
  return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
1818
1818
  }
1819
- var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
1819
+ var N, Re, Oe, rt, nt, Se, st, it, qn, Ei = (qn = class {
1820
1820
  constructor(t = {}) {
1821
- O(this, M);
1822
- O(this, Oe);
1821
+ O(this, N);
1823
1822
  O(this, Re);
1823
+ O(this, Oe);
1824
1824
  O(this, rt);
1825
1825
  O(this, nt);
1826
1826
  O(this, Se);
1827
1827
  O(this, st);
1828
1828
  O(this, it);
1829
- b(this, M, t.queryCache || new gi()), b(this, Oe, t.mutationCache || new bi()), b(this, Re, t.defaultOptions || {}), b(this, rt, /* @__PURE__ */ new Map()), b(this, nt, /* @__PURE__ */ new Map()), b(this, Se, 0);
1829
+ E(this, N, t.queryCache || new gi()), E(this, Re, t.mutationCache || new bi()), E(this, Oe, t.defaultOptions || {}), E(this, rt, /* @__PURE__ */ new Map()), E(this, nt, /* @__PURE__ */ new Map()), E(this, Se, 0);
1830
1830
  }
1831
1831
  mount() {
1832
- kt(this, Se)._++, a(this, Se) === 1 && (b(this, st, Dr.subscribe(async (t) => {
1833
- t && (await this.resumePausedMutations(), a(this, M).onFocus());
1834
- })), b(this, it, Qt.subscribe(async (t) => {
1835
- t && (await this.resumePausedMutations(), a(this, M).onOnline());
1832
+ _t(this, Se)._++, a(this, Se) === 1 && (E(this, st, Dr.subscribe(async (t) => {
1833
+ t && (await this.resumePausedMutations(), a(this, N).onFocus());
1834
+ })), E(this, it, Kt.subscribe(async (t) => {
1835
+ t && (await this.resumePausedMutations(), a(this, N).onOnline());
1836
1836
  })));
1837
1837
  }
1838
1838
  unmount() {
1839
1839
  var t, e;
1840
- kt(this, Se)._--, a(this, Se) === 0 && ((t = a(this, st)) == null || t.call(this), b(this, st, void 0), (e = a(this, it)) == null || e.call(this), b(this, it, void 0));
1840
+ _t(this, Se)._--, a(this, Se) === 0 && ((t = a(this, st)) == null || t.call(this), E(this, st, void 0), (e = a(this, it)) == null || e.call(this), E(this, it, void 0));
1841
1841
  }
1842
1842
  isFetching(t) {
1843
- return a(this, M).findAll({ ...t, fetchStatus: "fetching" }).length;
1843
+ return a(this, N).findAll({ ...t, fetchStatus: "fetching" }).length;
1844
1844
  }
1845
1845
  isMutating(t) {
1846
- return a(this, Oe).findAll({ ...t, status: "pending" }).length;
1846
+ return a(this, Re).findAll({ ...t, status: "pending" }).length;
1847
1847
  }
1848
1848
  getQueryData(t) {
1849
1849
  var r;
1850
1850
  const e = this.defaultQueryOptions({ queryKey: t });
1851
- return (r = a(this, M).get(e.queryHash)) == null ? void 0 : r.state.data;
1851
+ return (r = a(this, N).get(e.queryHash)) == null ? void 0 : r.state.data;
1852
1852
  }
1853
1853
  ensureQueryData(t) {
1854
- const e = this.defaultQueryOptions(t), r = a(this, M).build(this, e), n = r.state.data;
1854
+ const e = this.defaultQueryOptions(t), r = a(this, N).build(this, e), n = r.state.data;
1855
1855
  return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(Ye(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
1856
1856
  }
1857
1857
  getQueriesData(t) {
1858
- return a(this, M).findAll(t).map(({ queryKey: e, state: r }) => {
1858
+ return a(this, N).findAll(t).map(({ queryKey: e, state: r }) => {
1859
1859
  const n = r.data;
1860
1860
  return [e, n];
1861
1861
  });
1862
1862
  }
1863
1863
  setQueryData(t, e, r) {
1864
- const n = this.defaultQueryOptions({ queryKey: t }), s = a(this, M).get(
1864
+ const n = this.defaultQueryOptions({ queryKey: t }), s = a(this, N).get(
1865
1865
  n.queryHash
1866
1866
  ), i = s == null ? void 0 : s.state.data, u = ai(e, i);
1867
1867
  if (u !== void 0)
1868
- return a(this, M).build(this, n).setData(u, { ...r, manual: !0 });
1868
+ return a(this, N).build(this, n).setData(u, { ...r, manual: !0 });
1869
1869
  }
1870
1870
  setQueriesData(t, e, r) {
1871
1871
  return $.batch(
1872
- () => a(this, M).findAll(t).map(({ queryKey: n }) => [
1872
+ () => a(this, N).findAll(t).map(({ queryKey: n }) => [
1873
1873
  n,
1874
1874
  this.setQueryData(n, e, r)
1875
1875
  ])
@@ -1878,12 +1878,12 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
1878
1878
  getQueryState(t) {
1879
1879
  var r;
1880
1880
  const e = this.defaultQueryOptions({ queryKey: t });
1881
- return (r = a(this, M).get(
1881
+ return (r = a(this, N).get(
1882
1882
  e.queryHash
1883
1883
  )) == null ? void 0 : r.state;
1884
1884
  }
1885
1885
  removeQueries(t) {
1886
- const e = a(this, M);
1886
+ const e = a(this, N);
1887
1887
  $.batch(() => {
1888
1888
  e.findAll(t).forEach((r) => {
1889
1889
  e.remove(r);
@@ -1891,7 +1891,7 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
1891
1891
  });
1892
1892
  }
1893
1893
  resetQueries(t, e) {
1894
- const r = a(this, M);
1894
+ const r = a(this, N);
1895
1895
  return $.batch(() => (r.findAll(t).forEach((n) => {
1896
1896
  n.reset();
1897
1897
  }), this.refetchQueries(
@@ -1904,12 +1904,12 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
1904
1904
  }
1905
1905
  cancelQueries(t, e = {}) {
1906
1906
  const r = { revert: !0, ...e }, n = $.batch(
1907
- () => a(this, M).findAll(t).map((s) => s.cancel(r))
1907
+ () => a(this, N).findAll(t).map((s) => s.cancel(r))
1908
1908
  );
1909
- return Promise.all(n).then(re).catch(re);
1909
+ return Promise.all(n).then(ne).catch(ne);
1910
1910
  }
1911
1911
  invalidateQueries(t, e = {}) {
1912
- return $.batch(() => (a(this, M).findAll(t).forEach((r) => {
1912
+ return $.batch(() => (a(this, N).findAll(t).forEach((r) => {
1913
1913
  r.invalidate();
1914
1914
  }), (t == null ? void 0 : t.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
1915
1915
  {
@@ -1924,47 +1924,47 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
1924
1924
  ...e,
1925
1925
  cancelRefetch: e.cancelRefetch ?? !0
1926
1926
  }, n = $.batch(
1927
- () => a(this, M).findAll(t).filter((s) => !s.isDisabled()).map((s) => {
1927
+ () => a(this, N).findAll(t).filter((s) => !s.isDisabled()).map((s) => {
1928
1928
  let i = s.fetch(void 0, r);
1929
- return r.throwOnError || (i = i.catch(re)), s.state.fetchStatus === "paused" ? Promise.resolve() : i;
1929
+ return r.throwOnError || (i = i.catch(ne)), s.state.fetchStatus === "paused" ? Promise.resolve() : i;
1930
1930
  })
1931
1931
  );
1932
- return Promise.all(n).then(re);
1932
+ return Promise.all(n).then(ne);
1933
1933
  }
1934
1934
  fetchQuery(t) {
1935
1935
  const e = this.defaultQueryOptions(t);
1936
1936
  e.retry === void 0 && (e.retry = !1);
1937
- const r = a(this, M).build(this, e);
1937
+ const r = a(this, N).build(this, e);
1938
1938
  return r.isStaleByTime(
1939
1939
  Ye(e.staleTime, r)
1940
1940
  ) ? r.fetch(e) : Promise.resolve(r.state.data);
1941
1941
  }
1942
1942
  prefetchQuery(t) {
1943
- return this.fetchQuery(t).then(re).catch(re);
1943
+ return this.fetchQuery(t).then(ne).catch(ne);
1944
1944
  }
1945
1945
  fetchInfiniteQuery(t) {
1946
1946
  return t.behavior = dn(t.pages), this.fetchQuery(t);
1947
1947
  }
1948
1948
  prefetchInfiniteQuery(t) {
1949
- return this.fetchInfiniteQuery(t).then(re).catch(re);
1949
+ return this.fetchInfiniteQuery(t).then(ne).catch(ne);
1950
1950
  }
1951
1951
  ensureInfiniteQueryData(t) {
1952
1952
  return t.behavior = dn(t.pages), this.ensureQueryData(t);
1953
1953
  }
1954
1954
  resumePausedMutations() {
1955
- return Qt.isOnline() ? a(this, Oe).resumePausedMutations() : Promise.resolve();
1955
+ return Kt.isOnline() ? a(this, Re).resumePausedMutations() : Promise.resolve();
1956
1956
  }
1957
1957
  getQueryCache() {
1958
- return a(this, M);
1958
+ return a(this, N);
1959
1959
  }
1960
1960
  getMutationCache() {
1961
- return a(this, Oe);
1961
+ return a(this, Re);
1962
1962
  }
1963
1963
  getDefaultOptions() {
1964
- return a(this, Re);
1964
+ return a(this, Oe);
1965
1965
  }
1966
1966
  setDefaultOptions(t) {
1967
- b(this, Re, t);
1967
+ E(this, Oe, t);
1968
1968
  }
1969
1969
  setQueryDefaults(t, e) {
1970
1970
  a(this, rt).set(Ve(t), {
@@ -1994,7 +1994,7 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
1994
1994
  if (t._defaulted)
1995
1995
  return t;
1996
1996
  const e = {
1997
- ...a(this, Re).queries,
1997
+ ...a(this, Oe).queries,
1998
1998
  ...this.getQueryDefaults(t.queryKey),
1999
1999
  ...t,
2000
2000
  _defaulted: !0
@@ -2002,27 +2002,27 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
2002
2002
  return e.queryHash || (e.queryHash = Ir(
2003
2003
  e.queryKey,
2004
2004
  e
2005
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === Lt && (e.enabled = !1), e;
2005
+ )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === $t && (e.enabled = !1), e;
2006
2006
  }
2007
2007
  defaultMutationOptions(t) {
2008
2008
  return t != null && t._defaulted ? t : {
2009
- ...a(this, Re).mutations,
2009
+ ...a(this, Oe).mutations,
2010
2010
  ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
2011
2011
  ...t,
2012
2012
  _defaulted: !0
2013
2013
  };
2014
2014
  }
2015
2015
  clear() {
2016
- a(this, M).clear(), a(this, Oe).clear();
2016
+ a(this, N).clear(), a(this, Re).clear();
2017
2017
  }
2018
- }, M = new WeakMap(), Oe = new WeakMap(), Re = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), Se = new WeakMap(), st = new WeakMap(), it = new WeakMap(), qn), J, F, Ft, B, Qe, ot, Ce, fe, At, at, ut, $e, Ke, Te, ct, _, vt, pr, mr, gr, vr, br, wr, Er, ts, Un, Pi = (Un = class extends ft {
2018
+ }, N = new WeakMap(), Re = new WeakMap(), Oe = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), Se = new WeakMap(), st = new WeakMap(), it = new WeakMap(), qn), J, x, Ft, G, Qe, ot, Ce, fe, At, at, ut, $e, Ke, Te, ct, _, vt, mr, gr, vr, br, wr, Er, Pr, ts, Mn, Pi = (Mn = class extends ft {
2019
2019
  constructor(e, r) {
2020
2020
  super();
2021
2021
  O(this, _);
2022
2022
  O(this, J);
2023
- O(this, F);
2023
+ O(this, x);
2024
2024
  O(this, Ft);
2025
- O(this, B);
2025
+ O(this, G);
2026
2026
  O(this, Qe);
2027
2027
  O(this, ot);
2028
2028
  O(this, Ce);
@@ -2036,7 +2036,7 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
2036
2036
  O(this, Ke);
2037
2037
  O(this, Te);
2038
2038
  O(this, ct, /* @__PURE__ */ new Set());
2039
- this.options = r, b(this, J, e), b(this, fe, null), b(this, Ce, yr()), this.options.experimental_prefetchInRender || a(this, Ce).reject(
2039
+ this.options = r, E(this, J, e), E(this, fe, null), E(this, Ce, pr()), this.options.experimental_prefetchInRender || a(this, Ce).reject(
2040
2040
  new Error("experimental_prefetchInRender feature flag is not enabled")
2041
2041
  ), this.bindMethods(), this.setOptions(r);
2042
2042
  }
@@ -2044,55 +2044,55 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
2044
2044
  this.refetch = this.refetch.bind(this);
2045
2045
  }
2046
2046
  onSubscribe() {
2047
- this.listeners.size === 1 && (a(this, F).addObserver(this), yn(a(this, F), this.options) ? C(this, _, vt).call(this) : this.updateResult(), C(this, _, vr).call(this));
2047
+ this.listeners.size === 1 && (a(this, x).addObserver(this), yn(a(this, x), this.options) ? F(this, _, vt).call(this) : this.updateResult(), F(this, _, br).call(this));
2048
2048
  }
2049
2049
  onUnsubscribe() {
2050
2050
  this.hasListeners() || this.destroy();
2051
2051
  }
2052
2052
  shouldFetchOnReconnect() {
2053
- return Pr(
2054
- a(this, F),
2053
+ return Rr(
2054
+ a(this, x),
2055
2055
  this.options,
2056
2056
  this.options.refetchOnReconnect
2057
2057
  );
2058
2058
  }
2059
2059
  shouldFetchOnWindowFocus() {
2060
- return Pr(
2061
- a(this, F),
2060
+ return Rr(
2061
+ a(this, x),
2062
2062
  this.options,
2063
2063
  this.options.refetchOnWindowFocus
2064
2064
  );
2065
2065
  }
2066
2066
  destroy() {
2067
- this.listeners = /* @__PURE__ */ new Set(), C(this, _, br).call(this), C(this, _, wr).call(this), a(this, F).removeObserver(this);
2067
+ this.listeners = /* @__PURE__ */ new Set(), F(this, _, wr).call(this), F(this, _, Er).call(this), a(this, x).removeObserver(this);
2068
2068
  }
2069
2069
  setOptions(e, r) {
2070
- const n = this.options, s = a(this, F);
2071
- if (this.options = a(this, J).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof oe(this.options.enabled, a(this, F)) != "boolean")
2070
+ const n = this.options, s = a(this, x);
2071
+ if (this.options = a(this, J).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof oe(this.options.enabled, a(this, x)) != "boolean")
2072
2072
  throw new Error(
2073
2073
  "Expected enabled to be a boolean or a callback that returns a boolean"
2074
2074
  );
2075
- C(this, _, Er).call(this), a(this, F).setOptions(this.options), n._defaulted && !Nt(this.options, n) && a(this, J).getQueryCache().notify({
2075
+ F(this, _, Pr).call(this), a(this, x).setOptions(this.options), n._defaulted && !Qt(this.options, n) && a(this, J).getQueryCache().notify({
2076
2076
  type: "observerOptionsUpdated",
2077
- query: a(this, F),
2077
+ query: a(this, x),
2078
2078
  observer: this
2079
2079
  });
2080
2080
  const i = this.hasListeners();
2081
2081
  i && pn(
2082
- a(this, F),
2082
+ a(this, x),
2083
2083
  s,
2084
2084
  this.options,
2085
2085
  n
2086
- ) && C(this, _, vt).call(this), this.updateResult(r), i && (a(this, F) !== s || oe(this.options.enabled, a(this, F)) !== oe(n.enabled, a(this, F)) || Ye(this.options.staleTime, a(this, F)) !== Ye(n.staleTime, a(this, F))) && C(this, _, pr).call(this);
2087
- const u = C(this, _, mr).call(this);
2088
- i && (a(this, F) !== s || oe(this.options.enabled, a(this, F)) !== oe(n.enabled, a(this, F)) || u !== a(this, Te)) && C(this, _, gr).call(this, u);
2086
+ ) && F(this, _, vt).call(this), this.updateResult(r), i && (a(this, x) !== s || oe(this.options.enabled, a(this, x)) !== oe(n.enabled, a(this, x)) || Ye(this.options.staleTime, a(this, x)) !== Ye(n.staleTime, a(this, x))) && F(this, _, mr).call(this);
2087
+ const u = F(this, _, gr).call(this);
2088
+ i && (a(this, x) !== s || oe(this.options.enabled, a(this, x)) !== oe(n.enabled, a(this, x)) || u !== a(this, Te)) && F(this, _, vr).call(this, u);
2089
2089
  }
2090
2090
  getOptimisticResult(e) {
2091
2091
  const r = a(this, J).getQueryCache().build(a(this, J), e), n = this.createResult(r, e);
2092
- return Ri(this, n) && (b(this, B, n), b(this, ot, this.options), b(this, Qe, a(this, F).state)), n;
2092
+ return Oi(this, n) && (E(this, G, n), E(this, ot, this.options), E(this, Qe, a(this, x).state)), n;
2093
2093
  }
2094
2094
  getCurrentResult() {
2095
- return a(this, B);
2095
+ return a(this, G);
2096
2096
  }
2097
2097
  trackResult(e, r) {
2098
2098
  const n = {};
@@ -2108,7 +2108,7 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
2108
2108
  a(this, ct).add(e);
2109
2109
  }
2110
2110
  getCurrentQuery() {
2111
- return a(this, F);
2111
+ return a(this, x);
2112
2112
  }
2113
2113
  refetch({ ...e } = {}) {
2114
2114
  return this.fetch({
@@ -2120,91 +2120,91 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
2120
2120
  return n.fetch().then(() => this.createResult(n, r));
2121
2121
  }
2122
2122
  fetch(e) {
2123
- return C(this, _, vt).call(this, {
2123
+ return F(this, _, vt).call(this, {
2124
2124
  ...e,
2125
2125
  cancelRefetch: e.cancelRefetch ?? !0
2126
- }).then(() => (this.updateResult(), a(this, B)));
2126
+ }).then(() => (this.updateResult(), a(this, G)));
2127
2127
  }
2128
2128
  createResult(e, r) {
2129
2129
  var U;
2130
- const n = a(this, F), s = this.options, i = a(this, B), u = a(this, Qe), l = a(this, ot), h = e !== n ? e.state : a(this, Ft), { state: p } = e;
2131
- let f = { ...p }, d = !1, m;
2130
+ const n = a(this, x), s = this.options, i = a(this, G), u = a(this, Qe), l = a(this, ot), d = e !== n ? e.state : a(this, Ft), { state: p } = e;
2131
+ let f = { ...p }, y = !1, m;
2132
2132
  if (r._optimisticResults) {
2133
- const q = this.hasListeners(), ge = !q && yn(e, r), ve = q && pn(e, n, r, s);
2133
+ const M = this.hasListeners(), ge = !M && yn(e, r), ve = M && pn(e, n, r, s);
2134
2134
  (ge || ve) && (f = {
2135
2135
  ...f,
2136
2136
  ...Zn(p.data, e.options)
2137
2137
  }), r._optimisticResults === "isRestoring" && (f.fetchStatus = "idle");
2138
2138
  }
2139
- let { error: v, errorUpdatedAt: g, status: R } = f;
2139
+ let { error: g, errorUpdatedAt: v, status: w } = f;
2140
2140
  if (r.select && f.data !== void 0)
2141
2141
  if (i && f.data === (u == null ? void 0 : u.data) && r.select === a(this, At))
2142
2142
  m = a(this, at);
2143
2143
  else
2144
2144
  try {
2145
- b(this, At, r.select), m = r.select(f.data), m = hr(i == null ? void 0 : i.data, m, r), b(this, at, m), b(this, fe, null);
2146
- } catch (q) {
2147
- b(this, fe, q);
2145
+ E(this, At, r.select), m = r.select(f.data), m = yr(i == null ? void 0 : i.data, m, r), E(this, at, m), E(this, fe, null);
2146
+ } catch (M) {
2147
+ E(this, fe, M);
2148
2148
  }
2149
2149
  else
2150
2150
  m = f.data;
2151
- if (r.placeholderData !== void 0 && m === void 0 && R === "pending") {
2152
- let q;
2151
+ if (r.placeholderData !== void 0 && m === void 0 && w === "pending") {
2152
+ let M;
2153
2153
  if (i != null && i.isPlaceholderData && r.placeholderData === (l == null ? void 0 : l.placeholderData))
2154
- q = i.data;
2155
- else if (q = typeof r.placeholderData == "function" ? r.placeholderData(
2154
+ M = i.data;
2155
+ else if (M = typeof r.placeholderData == "function" ? r.placeholderData(
2156
2156
  (U = a(this, ut)) == null ? void 0 : U.state.data,
2157
2157
  a(this, ut)
2158
- ) : r.placeholderData, r.select && q !== void 0)
2158
+ ) : r.placeholderData, r.select && M !== void 0)
2159
2159
  try {
2160
- q = r.select(q), b(this, fe, null);
2160
+ M = r.select(M), E(this, fe, null);
2161
2161
  } catch (ge) {
2162
- b(this, fe, ge);
2162
+ E(this, fe, ge);
2163
2163
  }
2164
- q !== void 0 && (R = "success", m = hr(
2164
+ M !== void 0 && (w = "success", m = yr(
2165
2165
  i == null ? void 0 : i.data,
2166
- q,
2166
+ M,
2167
2167
  r
2168
- ), d = !0);
2168
+ ), y = !0);
2169
2169
  }
2170
- a(this, fe) && (v = a(this, fe), m = a(this, at), g = Date.now(), R = "error");
2171
- const P = f.fetchStatus === "fetching", E = R === "pending", x = R === "error", j = E && P, N = m !== void 0, z = {
2172
- status: R,
2170
+ a(this, fe) && (g = a(this, fe), m = a(this, at), v = Date.now(), w = "error");
2171
+ const b = f.fetchStatus === "fetching", P = w === "pending", S = w === "error", T = P && b, j = m !== void 0, z = {
2172
+ status: w,
2173
2173
  fetchStatus: f.fetchStatus,
2174
- isPending: E,
2175
- isSuccess: R === "success",
2176
- isError: x,
2177
- isInitialLoading: j,
2178
- isLoading: j,
2174
+ isPending: P,
2175
+ isSuccess: w === "success",
2176
+ isError: S,
2177
+ isInitialLoading: T,
2178
+ isLoading: T,
2179
2179
  data: m,
2180
2180
  dataUpdatedAt: f.dataUpdatedAt,
2181
- error: v,
2182
- errorUpdatedAt: g,
2181
+ error: g,
2182
+ errorUpdatedAt: v,
2183
2183
  failureCount: f.fetchFailureCount,
2184
2184
  failureReason: f.fetchFailureReason,
2185
2185
  errorUpdateCount: f.errorUpdateCount,
2186
2186
  isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
2187
- isFetchedAfterMount: f.dataUpdateCount > h.dataUpdateCount || f.errorUpdateCount > h.errorUpdateCount,
2188
- isFetching: P,
2189
- isRefetching: P && !E,
2190
- isLoadingError: x && !N,
2187
+ isFetchedAfterMount: f.dataUpdateCount > d.dataUpdateCount || f.errorUpdateCount > d.errorUpdateCount,
2188
+ isFetching: b,
2189
+ isRefetching: b && !P,
2190
+ isLoadingError: S && !j,
2191
2191
  isPaused: f.fetchStatus === "paused",
2192
- isPlaceholderData: d,
2193
- isRefetchError: x && N,
2194
- isStale: _r(e, r),
2192
+ isPlaceholderData: y,
2193
+ isRefetchError: S && j,
2194
+ isStale: kr(e, r),
2195
2195
  refetch: this.refetch,
2196
2196
  promise: a(this, Ce)
2197
2197
  };
2198
2198
  if (this.options.experimental_prefetchInRender) {
2199
- const q = (De) => {
2199
+ const M = (De) => {
2200
2200
  z.status === "error" ? De.reject(z.error) : z.data !== void 0 && De.resolve(z.data);
2201
2201
  }, ge = () => {
2202
- const De = b(this, Ce, z.promise = yr());
2203
- q(De);
2202
+ const De = E(this, Ce, z.promise = pr());
2203
+ M(De);
2204
2204
  }, ve = a(this, Ce);
2205
2205
  switch (ve.status) {
2206
2206
  case "pending":
2207
- e.queryHash === n.queryHash && q(ve);
2207
+ e.queryHash === n.queryHash && M(ve);
2208
2208
  break;
2209
2209
  case "fulfilled":
2210
2210
  (z.status === "error" || z.data !== ve.value) && ge();
@@ -2217,10 +2217,10 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
2217
2217
  return z;
2218
2218
  }
2219
2219
  updateResult(e) {
2220
- const r = a(this, B), n = this.createResult(a(this, F), this.options);
2221
- if (b(this, Qe, a(this, F).state), b(this, ot, this.options), a(this, Qe).data !== void 0 && b(this, ut, a(this, F)), Nt(n, r))
2220
+ const r = a(this, G), n = this.createResult(a(this, x), this.options);
2221
+ if (E(this, Qe, a(this, x).state), E(this, ot, this.options), a(this, Qe).data !== void 0 && E(this, ut, a(this, x)), Qt(n, r))
2222
2222
  return;
2223
- b(this, B, n);
2223
+ E(this, G, n);
2224
2224
  const s = {}, i = () => {
2225
2225
  if (!r)
2226
2226
  return !0;
@@ -2230,86 +2230,86 @@ var M, Oe, Re, rt, nt, Se, st, it, qn, Ei = (qn = class {
2230
2230
  const c = new Set(
2231
2231
  l ?? a(this, ct)
2232
2232
  );
2233
- return this.options.throwOnError && c.add("error"), Object.keys(a(this, B)).some((h) => {
2234
- const p = h;
2235
- return a(this, B)[p] !== r[p] && c.has(p);
2233
+ return this.options.throwOnError && c.add("error"), Object.keys(a(this, G)).some((d) => {
2234
+ const p = d;
2235
+ return a(this, G)[p] !== r[p] && c.has(p);
2236
2236
  });
2237
2237
  };
2238
- (e == null ? void 0 : e.listeners) !== !1 && i() && (s.listeners = !0), C(this, _, ts).call(this, { ...s, ...e });
2238
+ (e == null ? void 0 : e.listeners) !== !1 && i() && (s.listeners = !0), F(this, _, ts).call(this, { ...s, ...e });
2239
2239
  }
2240
2240
  onQueryUpdate() {
2241
- this.updateResult(), this.hasListeners() && C(this, _, vr).call(this);
2241
+ this.updateResult(), this.hasListeners() && F(this, _, br).call(this);
2242
2242
  }
2243
- }, J = new WeakMap(), F = new WeakMap(), Ft = new WeakMap(), B = new WeakMap(), Qe = new WeakMap(), ot = new WeakMap(), Ce = new WeakMap(), fe = new WeakMap(), At = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), $e = new WeakMap(), Ke = new WeakMap(), Te = new WeakMap(), ct = new WeakMap(), _ = new WeakSet(), vt = function(e) {
2244
- C(this, _, Er).call(this);
2245
- let r = a(this, F).fetch(
2243
+ }, J = new WeakMap(), x = new WeakMap(), Ft = new WeakMap(), G = new WeakMap(), Qe = new WeakMap(), ot = new WeakMap(), Ce = new WeakMap(), fe = new WeakMap(), At = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), $e = new WeakMap(), Ke = new WeakMap(), Te = new WeakMap(), ct = new WeakMap(), _ = new WeakSet(), vt = function(e) {
2244
+ F(this, _, Pr).call(this);
2245
+ let r = a(this, x).fetch(
2246
2246
  this.options,
2247
2247
  e
2248
2248
  );
2249
- return e != null && e.throwOnError || (r = r.catch(re)), r;
2250
- }, pr = function() {
2251
- C(this, _, br).call(this);
2249
+ return e != null && e.throwOnError || (r = r.catch(ne)), r;
2250
+ }, mr = function() {
2251
+ F(this, _, wr).call(this);
2252
2252
  const e = Ye(
2253
2253
  this.options.staleTime,
2254
- a(this, F)
2254
+ a(this, x)
2255
2255
  );
2256
- if (ze || a(this, B).isStale || !lr(e))
2256
+ if (ze || a(this, G).isStale || !fr(e))
2257
2257
  return;
2258
- const n = Wn(a(this, B).dataUpdatedAt, e) + 1;
2259
- b(this, $e, setTimeout(() => {
2260
- a(this, B).isStale || this.updateResult();
2258
+ const n = Wn(a(this, G).dataUpdatedAt, e) + 1;
2259
+ E(this, $e, setTimeout(() => {
2260
+ a(this, G).isStale || this.updateResult();
2261
2261
  }, n));
2262
- }, mr = function() {
2263
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, F)) : this.options.refetchInterval) ?? !1;
2264
- }, gr = function(e) {
2265
- C(this, _, wr).call(this), b(this, Te, e), !(ze || oe(this.options.enabled, a(this, F)) === !1 || !lr(a(this, Te)) || a(this, Te) === 0) && b(this, Ke, setInterval(() => {
2266
- (this.options.refetchIntervalInBackground || Dr.isFocused()) && C(this, _, vt).call(this);
2262
+ }, gr = function() {
2263
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, x)) : this.options.refetchInterval) ?? !1;
2264
+ }, vr = function(e) {
2265
+ F(this, _, Er).call(this), E(this, Te, e), !(ze || oe(this.options.enabled, a(this, x)) === !1 || !fr(a(this, Te)) || a(this, Te) === 0) && E(this, Ke, setInterval(() => {
2266
+ (this.options.refetchIntervalInBackground || Dr.isFocused()) && F(this, _, vt).call(this);
2267
2267
  }, a(this, Te)));
2268
- }, vr = function() {
2269
- C(this, _, pr).call(this), C(this, _, gr).call(this, C(this, _, mr).call(this));
2270
2268
  }, br = function() {
2271
- a(this, $e) && (clearTimeout(a(this, $e)), b(this, $e, void 0));
2269
+ F(this, _, mr).call(this), F(this, _, vr).call(this, F(this, _, gr).call(this));
2272
2270
  }, wr = function() {
2273
- a(this, Ke) && (clearInterval(a(this, Ke)), b(this, Ke, void 0));
2271
+ a(this, $e) && (clearTimeout(a(this, $e)), E(this, $e, void 0));
2274
2272
  }, Er = function() {
2273
+ a(this, Ke) && (clearInterval(a(this, Ke)), E(this, Ke, void 0));
2274
+ }, Pr = function() {
2275
2275
  const e = a(this, J).getQueryCache().build(a(this, J), this.options);
2276
- if (e === a(this, F))
2276
+ if (e === a(this, x))
2277
2277
  return;
2278
- const r = a(this, F);
2279
- b(this, F, e), b(this, Ft, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
2278
+ const r = a(this, x);
2279
+ E(this, x, e), E(this, Ft, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
2280
2280
  }, ts = function(e) {
2281
2281
  $.batch(() => {
2282
2282
  e.listeners && this.listeners.forEach((r) => {
2283
- r(a(this, B));
2283
+ r(a(this, G));
2284
2284
  }), a(this, J).getQueryCache().notify({
2285
- query: a(this, F),
2285
+ query: a(this, x),
2286
2286
  type: "observerResultsUpdated"
2287
2287
  });
2288
2288
  });
2289
- }, Un);
2290
- function Oi(t, e) {
2289
+ }, Mn);
2290
+ function Ri(t, e) {
2291
2291
  return oe(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
2292
2292
  }
2293
2293
  function yn(t, e) {
2294
- return Oi(t, e) || t.state.data !== void 0 && Pr(t, e, e.refetchOnMount);
2294
+ return Ri(t, e) || t.state.data !== void 0 && Rr(t, e, e.refetchOnMount);
2295
2295
  }
2296
- function Pr(t, e, r) {
2296
+ function Rr(t, e, r) {
2297
2297
  if (oe(e.enabled, t) !== !1) {
2298
2298
  const n = typeof r == "function" ? r(t) : r;
2299
- return n === "always" || n !== !1 && _r(t, e);
2299
+ return n === "always" || n !== !1 && kr(t, e);
2300
2300
  }
2301
2301
  return !1;
2302
2302
  }
2303
2303
  function pn(t, e, r, n) {
2304
- return (t !== e || oe(n.enabled, t) === !1) && (!r.suspense || t.state.status !== "error") && _r(t, r);
2304
+ return (t !== e || oe(n.enabled, t) === !1) && (!r.suspense || t.state.status !== "error") && kr(t, r);
2305
2305
  }
2306
- function _r(t, e) {
2306
+ function kr(t, e) {
2307
2307
  return oe(e.enabled, t) !== !1 && t.isStaleByTime(Ye(e.staleTime, t));
2308
2308
  }
2309
- function Ri(t, e) {
2310
- return !Nt(t.getCurrentResult(), e);
2309
+ function Oi(t, e) {
2310
+ return !Qt(t.getCurrentResult(), e);
2311
2311
  }
2312
- var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
2312
+ var Fe, Ae, X, pe, me, Ut, Or, Un, Si = (Un = class extends ft {
2313
2313
  constructor(e, r) {
2314
2314
  super();
2315
2315
  O(this, me);
@@ -2317,7 +2317,7 @@ var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
2317
2317
  O(this, Ae);
2318
2318
  O(this, X);
2319
2319
  O(this, pe);
2320
- b(this, Fe, e), this.setOptions(r), this.bindMethods(), C(this, me, Ut).call(this);
2320
+ E(this, Fe, e), this.setOptions(r), this.bindMethods(), F(this, me, Ut).call(this);
2321
2321
  }
2322
2322
  bindMethods() {
2323
2323
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
@@ -2325,7 +2325,7 @@ var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
2325
2325
  setOptions(e) {
2326
2326
  var n;
2327
2327
  const r = this.options;
2328
- this.options = a(this, Fe).defaultMutationOptions(e), Nt(this.options, r) || a(this, Fe).getMutationCache().notify({
2328
+ this.options = a(this, Fe).defaultMutationOptions(e), Qt(this.options, r) || a(this, Fe).getMutationCache().notify({
2329
2329
  type: "observerOptionsUpdated",
2330
2330
  mutation: a(this, X),
2331
2331
  observer: this
@@ -2336,23 +2336,23 @@ var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
2336
2336
  this.hasListeners() || (e = a(this, X)) == null || e.removeObserver(this);
2337
2337
  }
2338
2338
  onMutationUpdate(e) {
2339
- C(this, me, Ut).call(this), C(this, me, Or).call(this, e);
2339
+ F(this, me, Ut).call(this), F(this, me, Or).call(this, e);
2340
2340
  }
2341
2341
  getCurrentResult() {
2342
2342
  return a(this, Ae);
2343
2343
  }
2344
2344
  reset() {
2345
2345
  var e;
2346
- (e = a(this, X)) == null || e.removeObserver(this), b(this, X, void 0), C(this, me, Ut).call(this), C(this, me, Or).call(this);
2346
+ (e = a(this, X)) == null || e.removeObserver(this), E(this, X, void 0), F(this, me, Ut).call(this), F(this, me, Or).call(this);
2347
2347
  }
2348
2348
  mutate(e, r) {
2349
2349
  var n;
2350
- return b(this, pe, r), (n = a(this, X)) == null || n.removeObserver(this), b(this, X, a(this, Fe).getMutationCache().build(a(this, Fe), this.options)), a(this, X).addObserver(this), a(this, X).execute(e);
2350
+ return E(this, pe, r), (n = a(this, X)) == null || n.removeObserver(this), E(this, X, a(this, Fe).getMutationCache().build(a(this, Fe), this.options)), a(this, X).addObserver(this), a(this, X).execute(e);
2351
2351
  }
2352
2352
  }, Fe = new WeakMap(), Ae = new WeakMap(), X = new WeakMap(), pe = new WeakMap(), me = new WeakSet(), Ut = function() {
2353
2353
  var r;
2354
2354
  const e = ((r = a(this, X)) == null ? void 0 : r.state) ?? es();
2355
- b(this, Ae, {
2355
+ E(this, Ae, {
2356
2356
  ...e,
2357
2357
  isPending: e.status === "pending",
2358
2358
  isSuccess: e.status === "success",
@@ -2363,10 +2363,10 @@ var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
2363
2363
  });
2364
2364
  }, Or = function(e) {
2365
2365
  $.batch(() => {
2366
- var r, n, s, i, u, l, c, h;
2366
+ var r, n, s, i, u, l, c, d;
2367
2367
  if (a(this, pe) && this.hasListeners()) {
2368
2368
  const p = a(this, Ae).variables, f = a(this, Ae).context;
2369
- (e == null ? void 0 : e.type) === "success" ? ((n = (r = a(this, pe)).onSuccess) == null || n.call(r, e.data, p, f), (i = (s = a(this, pe)).onSettled) == null || i.call(s, e.data, null, p, f)) : (e == null ? void 0 : e.type) === "error" && ((l = (u = a(this, pe)).onError) == null || l.call(u, e.error, p, f), (h = (c = a(this, pe)).onSettled) == null || h.call(
2369
+ (e == null ? void 0 : e.type) === "success" ? ((n = (r = a(this, pe)).onSuccess) == null || n.call(r, e.data, p, f), (i = (s = a(this, pe)).onSettled) == null || i.call(s, e.data, null, p, f)) : (e == null ? void 0 : e.type) === "error" && ((l = (u = a(this, pe)).onError) == null || l.call(u, e.error, p, f), (d = (c = a(this, pe)).onSettled) == null || d.call(
2370
2370
  c,
2371
2371
  void 0,
2372
2372
  e.error,
@@ -2378,7 +2378,7 @@ var Fe, Ae, X, pe, me, Ut, Or, Mn, Si = (Mn = class extends ft {
2378
2378
  p(a(this, Ae));
2379
2379
  });
2380
2380
  });
2381
- }, Mn), rs = K.createContext(
2381
+ }, Un), rs = K.createContext(
2382
2382
  void 0
2383
2383
  ), dt = (t) => {
2384
2384
  const e = K.useContext(rs);
@@ -2408,7 +2408,7 @@ var Ai = K.createContext(Fi()), xi = () => K.useContext(Ai);
2408
2408
  function ss(t, e) {
2409
2409
  return typeof t == "function" ? t(...e) : !!t;
2410
2410
  }
2411
- function Rr() {
2411
+ function Sr() {
2412
2412
  }
2413
2413
  var Ii = (t, e) => {
2414
2414
  (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
@@ -2416,42 +2416,42 @@ var Ii = (t, e) => {
2416
2416
  K.useEffect(() => {
2417
2417
  t.clearReset();
2418
2418
  }, [t]);
2419
- }, _i = ({
2419
+ }, ki = ({
2420
2420
  result: t,
2421
2421
  errorResetBoundary: e,
2422
2422
  throwOnError: r,
2423
2423
  query: n,
2424
2424
  suspense: s
2425
- }) => t.isError && !e.isReset() && !t.isFetching && n && (s && t.data === void 0 || ss(r, [t.error, n])), ki = (t) => {
2425
+ }) => t.isError && !e.isReset() && !t.isFetching && n && (s && t.data === void 0 || ss(r, [t.error, n])), _i = (t) => {
2426
2426
  const e = t.staleTime;
2427
2427
  t.suspense && (t.staleTime = typeof e == "function" ? (...r) => Math.max(e(...r), 1e3) : Math.max(e ?? 1e3, 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
2428
2428
  }, ji = (t, e) => t.isLoading && t.isFetching && !e, qi = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, mn = (t, e, r) => e.fetchOptimistic(t).catch(() => {
2429
2429
  r.clearReset();
2430
2430
  });
2431
- function Ui(t, e, r) {
2432
- var f, d, m, v, g;
2431
+ function Mi(t, e, r) {
2432
+ var f, y, m, g, v;
2433
2433
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
2434
2434
  throw new Error(
2435
2435
  'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
2436
2436
  );
2437
2437
  const n = dt(), s = Ti(), i = xi(), u = n.defaultQueryOptions(t);
2438
- (d = (f = n.getDefaultOptions().queries) == null ? void 0 : f._experimental_beforeQuery) == null || d.call(
2438
+ (y = (f = n.getDefaultOptions().queries) == null ? void 0 : f._experimental_beforeQuery) == null || y.call(
2439
2439
  f,
2440
2440
  u
2441
2441
  ), process.env.NODE_ENV !== "production" && (u.queryFn || console.error(
2442
2442
  `[${u.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`
2443
- )), u._optimisticResults = s ? "isRestoring" : "optimistic", ki(u), Ii(u, i), Di(i);
2443
+ )), u._optimisticResults = s ? "isRestoring" : "optimistic", _i(u), Ii(u, i), Di(i);
2444
2444
  const l = !n.getQueryCache().get(u.queryHash), [c] = K.useState(
2445
2445
  () => new e(
2446
2446
  n,
2447
2447
  u
2448
2448
  )
2449
- ), h = c.getOptimisticResult(u), p = !s && t.subscribed !== !1;
2449
+ ), d = c.getOptimisticResult(u), p = !s && t.subscribed !== !1;
2450
2450
  if (K.useSyncExternalStore(
2451
2451
  K.useCallback(
2452
- (R) => {
2453
- const P = p ? c.subscribe($.batchCalls(R)) : Rr;
2454
- return c.updateResult(), P;
2452
+ (w) => {
2453
+ const b = p ? c.subscribe($.batchCalls(w)) : Sr;
2454
+ return c.updateResult(), b;
2455
2455
  },
2456
2456
  [c, p]
2457
2457
  ),
@@ -2459,38 +2459,38 @@ function Ui(t, e, r) {
2459
2459
  () => c.getCurrentResult()
2460
2460
  ), K.useEffect(() => {
2461
2461
  c.setOptions(u, { listeners: !1 });
2462
- }, [u, c]), qi(u, h))
2462
+ }, [u, c]), qi(u, d))
2463
2463
  throw mn(u, c, i);
2464
- if (_i({
2465
- result: h,
2464
+ if (ki({
2465
+ result: d,
2466
2466
  errorResetBoundary: i,
2467
2467
  throwOnError: u.throwOnError,
2468
2468
  query: n.getQueryCache().get(u.queryHash),
2469
2469
  suspense: u.suspense
2470
2470
  }))
2471
- throw h.error;
2472
- if ((v = (m = n.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || v.call(
2471
+ throw d.error;
2472
+ if ((g = (m = n.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || g.call(
2473
2473
  m,
2474
2474
  u,
2475
- h
2476
- ), u.experimental_prefetchInRender && !ze && ji(h, s)) {
2477
- const R = l ? (
2475
+ d
2476
+ ), u.experimental_prefetchInRender && !ze && ji(d, s)) {
2477
+ const w = l ? (
2478
2478
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
2479
2479
  mn(u, c, i)
2480
2480
  ) : (
2481
2481
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
2482
- (g = n.getQueryCache().get(u.queryHash)) == null ? void 0 : g.promise
2482
+ (v = n.getQueryCache().get(u.queryHash)) == null ? void 0 : v.promise
2483
2483
  );
2484
- R == null || R.catch(Rr).finally(() => {
2484
+ w == null || w.catch(Sr).finally(() => {
2485
2485
  c.updateResult();
2486
2486
  });
2487
2487
  }
2488
- return u.notifyOnChangeProps ? h : c.trackResult(h);
2488
+ return u.notifyOnChangeProps ? d : c.trackResult(d);
2489
2489
  }
2490
- function kr(t, e) {
2491
- return Ui(t, Pi);
2490
+ function _r(t, e) {
2491
+ return Mi(t, Pi);
2492
2492
  }
2493
- function Kt(t, e) {
2493
+ function Vt(t, e) {
2494
2494
  const r = dt(), [n] = K.useState(
2495
2495
  () => new Si(
2496
2496
  r,
@@ -2509,7 +2509,7 @@ function Kt(t, e) {
2509
2509
  () => n.getCurrentResult()
2510
2510
  ), i = K.useCallback(
2511
2511
  (u, l) => {
2512
- n.mutate(u, l).catch(Rr);
2512
+ n.mutate(u, l).catch(Sr);
2513
2513
  },
2514
2514
  [n]
2515
2515
  );
@@ -2517,7 +2517,7 @@ function Kt(t, e) {
2517
2517
  throw s.error;
2518
2518
  return { ...s, mutate: i, mutateAsync: s.mutate };
2519
2519
  }
2520
- function zt(t) {
2520
+ function Ht(t) {
2521
2521
  const e = {
2522
2522
  subscribe(r) {
2523
2523
  let n = null, s = !1, i = !1, u = !1;
@@ -2530,12 +2530,12 @@ function zt(t) {
2530
2530
  }
2531
2531
  return n = t({
2532
2532
  next(c) {
2533
- var h;
2534
- s || (h = r.next) == null || h.call(r, c);
2533
+ var d;
2534
+ s || (d = r.next) == null || d.call(r, c);
2535
2535
  },
2536
2536
  error(c) {
2537
- var h;
2538
- s || (s = !0, (h = r.error) == null || h.call(r, c), l());
2537
+ var d;
2538
+ s || (s = !0, (d = r.error) == null || d.call(r, c), l());
2539
2539
  },
2540
2540
  complete() {
2541
2541
  var c;
@@ -2546,12 +2546,12 @@ function zt(t) {
2546
2546
  };
2547
2547
  },
2548
2548
  pipe(...r) {
2549
- return r.reduce(Mi, e);
2549
+ return r.reduce(Ui, e);
2550
2550
  }
2551
2551
  };
2552
2552
  return e;
2553
2553
  }
2554
- function Mi(t, e) {
2554
+ function Ui(t, e) {
2555
2555
  return e(t);
2556
2556
  }
2557
2557
  function Ni(t) {
@@ -2585,13 +2585,13 @@ function Li(t) {
2585
2585
  n || (n = e.subscribe({
2586
2586
  next(l) {
2587
2587
  var c;
2588
- for (const h of s)
2589
- (c = h.next) == null || c.call(h, l);
2588
+ for (const d of s)
2589
+ (c = d.next) == null || c.call(d, l);
2590
2590
  },
2591
2591
  error(l) {
2592
2592
  var c;
2593
- for (const h of s)
2594
- (c = h.error) == null || c.call(h, l);
2593
+ for (const d of s)
2594
+ (c = d.error) == null || c.call(d, l);
2595
2595
  },
2596
2596
  complete() {
2597
2597
  var l;
@@ -2606,10 +2606,10 @@ function Li(t) {
2606
2606
  n = null, l.unsubscribe();
2607
2607
  }
2608
2608
  }
2609
- return zt((l) => (r++, s.push(l), i(), {
2609
+ return Ht((l) => (r++, s.push(l), i(), {
2610
2610
  unsubscribe() {
2611
2611
  r--, u();
2612
- const c = s.findIndex((h) => h === l);
2612
+ const c = s.findIndex((d) => d === l);
2613
2613
  c > -1 && s.splice(c, 1);
2614
2614
  }
2615
2615
  }));
@@ -2621,7 +2621,7 @@ function Qi(t) {
2621
2621
  e !== void 0 && u.next(e), r.push(u);
2622
2622
  }, s = (u) => {
2623
2623
  r.splice(r.indexOf(u), 1);
2624
- }, i = zt((u) => (n(u), () => {
2624
+ }, i = Ht((u) => (n(u), () => {
2625
2625
  s(u);
2626
2626
  }));
2627
2627
  return i.next = (u) => {
@@ -2633,7 +2633,7 @@ function Qi(t) {
2633
2633
  }, i.get = () => e, i;
2634
2634
  }
2635
2635
  function $i(t) {
2636
- return zt((e) => {
2636
+ return Ht((e) => {
2637
2637
  function r(s = 0, i = t.op) {
2638
2638
  const u = t.links[s];
2639
2639
  if (!u)
@@ -2664,17 +2664,17 @@ function os(t, e, r) {
2664
2664
  ], r);
2665
2665
  },
2666
2666
  apply(u, l, c) {
2667
- const h = e[e.length - 1];
2667
+ const d = e[e.length - 1];
2668
2668
  let p = {
2669
2669
  args: c,
2670
2670
  path: e
2671
2671
  };
2672
- return h === "call" ? p = {
2672
+ return d === "call" ? p = {
2673
2673
  args: c.length >= 2 ? [
2674
2674
  c[1]
2675
2675
  ] : [],
2676
2676
  path: e.slice(0, -1)
2677
- } : h === "apply" && (p = {
2677
+ } : d === "apply" && (p = {
2678
2678
  args: c.length >= 2 ? c[1] : [],
2679
2679
  path: e.slice(0, -1)
2680
2680
  }), gn(p.args), gn(p.path), t(p);
@@ -2712,7 +2712,7 @@ function Vi(t, e) {
2712
2712
  }
2713
2713
  };
2714
2714
  }
2715
- class ir extends Error {
2715
+ class ar extends Error {
2716
2716
  constructor() {
2717
2717
  super("Unable to transform response from server");
2718
2718
  }
@@ -2722,12 +2722,12 @@ function Hi(t, e) {
2722
2722
  try {
2723
2723
  r = Vi(t, e);
2724
2724
  } catch {
2725
- throw new ir();
2725
+ throw new ar();
2726
2726
  }
2727
2727
  if (!r.ok && (!Pt(r.error.error) || typeof r.error.error.code != "number"))
2728
- throw new ir();
2728
+ throw new ar();
2729
2729
  if (r.ok && !Pt(r.result))
2730
- throw new ir();
2730
+ throw new ar();
2731
2731
  return r;
2732
2732
  }
2733
2733
  var vn, bn;
@@ -2785,7 +2785,7 @@ class xe extends Error {
2785
2785
  qt(this, "meta", void 0), this.meta = r == null ? void 0 : r.meta, this.cause = n, this.shape = (s = r == null ? void 0 : r.result) == null ? void 0 : s.error, this.data = (i = r == null ? void 0 : r.result) == null ? void 0 : i.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, xe.prototype);
2786
2786
  }
2787
2787
  }
2788
- function or(t, e, r) {
2788
+ function ur(t, e, r) {
2789
2789
  return e in t ? Object.defineProperty(t, e, {
2790
2790
  value: r,
2791
2791
  enumerable: !0,
@@ -2839,7 +2839,7 @@ class Yi {
2839
2839
  signal: n.signal
2840
2840
  }).subscribe({
2841
2841
  next(i) {
2842
- var u, l, c, h;
2842
+ var u, l, c, d;
2843
2843
  switch (i.result.type) {
2844
2844
  case "state": {
2845
2845
  (u = n.onConnectionStateChange) == null || u.call(n, i.result);
@@ -2857,7 +2857,7 @@ class Yi {
2857
2857
  }
2858
2858
  case "data":
2859
2859
  case void 0: {
2860
- (h = n.onData) == null || h.call(n, i.result.data);
2860
+ (d = n.onData) == null || d.call(n, i.result.data);
2861
2861
  break;
2862
2862
  }
2863
2863
  }
@@ -2873,7 +2873,7 @@ class Yi {
2873
2873
  });
2874
2874
  }
2875
2875
  constructor(e) {
2876
- or(this, "links", void 0), or(this, "runtime", void 0), or(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = e.links.map((r) => r(this.runtime));
2876
+ ur(this, "links", void 0), ur(this, "runtime", void 0), ur(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = e.links.map((r) => r(this.runtime));
2877
2877
  }
2878
2878
  }
2879
2879
  const Ji = Symbol.for("trpc_untypedClient"), Xi = {
@@ -2917,22 +2917,22 @@ function Pn(t) {
2917
2917
  const c = [
2918
2918
  []
2919
2919
  ];
2920
- let h = 0;
2920
+ let d = 0;
2921
2921
  for (; ; ) {
2922
- const d = l[h];
2923
- if (!d)
2922
+ const y = l[d];
2923
+ if (!y)
2924
2924
  break;
2925
2925
  const m = c[c.length - 1];
2926
- if (d.aborted) {
2927
- (p = d.reject) == null || p.call(d, new Error("Aborted")), h++;
2926
+ if (y.aborted) {
2927
+ (p = y.reject) == null || p.call(y, new Error("Aborted")), d++;
2928
2928
  continue;
2929
2929
  }
2930
- if (t.validate(m.concat(d).map((g) => g.key))) {
2931
- m.push(d), h++;
2930
+ if (t.validate(m.concat(y).map((v) => v.key))) {
2931
+ m.push(y), d++;
2932
2932
  continue;
2933
2933
  }
2934
2934
  if (m.length === 0) {
2935
- (f = d.reject) == null || f.call(d, new Error("Input is too big for a single dispatch")), h++;
2935
+ (f = y.reject) == null || f.call(y, new Error("Input is too big for a single dispatch")), d++;
2936
2936
  continue;
2937
2937
  }
2938
2938
  c.push([]);
@@ -2945,30 +2945,30 @@ function Pn(t) {
2945
2945
  for (const c of l) {
2946
2946
  if (!c.length)
2947
2947
  continue;
2948
- const h = {
2948
+ const d = {
2949
2949
  items: c
2950
2950
  };
2951
2951
  for (const f of c)
2952
- f.batch = h;
2953
- t.fetch(h.items.map((f) => f.key)).then(async (f) => {
2954
- var d;
2955
- await Promise.all(f.map(async (m, v) => {
2956
- var R, P;
2957
- const g = h.items[v];
2952
+ f.batch = d;
2953
+ t.fetch(d.items.map((f) => f.key)).then(async (f) => {
2954
+ var y;
2955
+ await Promise.all(f.map(async (m, g) => {
2956
+ var w, b;
2957
+ const v = d.items[g];
2958
2958
  try {
2959
- const E = await Promise.resolve(m);
2960
- (R = g.resolve) == null || R.call(g, E);
2961
- } catch (E) {
2962
- (P = g.reject) == null || P.call(g, E);
2959
+ const P = await Promise.resolve(m);
2960
+ (w = v.resolve) == null || w.call(v, P);
2961
+ } catch (P) {
2962
+ (b = v.reject) == null || b.call(v, P);
2963
2963
  }
2964
- g.batch = null, g.reject = null, g.resolve = null;
2964
+ v.batch = null, v.reject = null, v.resolve = null;
2965
2965
  }));
2966
- for (const m of h.items)
2967
- (d = m.reject) == null || d.call(m, new Error("Missing result")), m.batch = null;
2966
+ for (const m of d.items)
2967
+ (y = m.reject) == null || y.call(m, new Error("Missing result")), m.batch = null;
2968
2968
  }).catch((f) => {
2969
- var d;
2970
- for (const m of h.items)
2971
- (d = m.reject) == null || d.call(m, f), m.batch = null;
2969
+ var y;
2970
+ for (const m of d.items)
2971
+ (y = m.reject) == null || y.call(m, f), m.batch = null;
2972
2972
  });
2973
2973
  }
2974
2974
  }
@@ -2979,10 +2979,10 @@ function Pn(t) {
2979
2979
  batch: null,
2980
2980
  resolve: En,
2981
2981
  reject: En
2982
- }, h = new Promise((p, f) => {
2982
+ }, d = new Promise((p, f) => {
2983
2983
  c.reject = f, c.resolve = p, e || (e = []), e.push(c);
2984
2984
  });
2985
- return r || (r = setTimeout(i)), h;
2985
+ return r || (r = setTimeout(i)), d;
2986
2986
  }
2987
2987
  return {
2988
2988
  load: u
@@ -3108,19 +3108,19 @@ function po(t) {
3108
3108
  validate(c) {
3109
3109
  if (r === 1 / 0)
3110
3110
  return !0;
3111
- const h = c.map((d) => d.path).join(","), p = c.map((d) => d.input);
3111
+ const d = c.map((y) => y.path).join(","), p = c.map((y) => y.input);
3112
3112
  return us({
3113
3113
  ...e,
3114
3114
  type: l,
3115
- path: h,
3115
+ path: d,
3116
3116
  inputs: p,
3117
3117
  signal: null
3118
3118
  }).length <= r;
3119
3119
  },
3120
3120
  async fetch(c) {
3121
- const h = c.map((g) => g.path).join(","), p = c.map((g) => g.input), f = no(...c.map((g) => g.signal)), d = await co({
3121
+ const d = c.map((v) => v.path).join(","), p = c.map((v) => v.input), f = no(...c.map((v) => v.signal)), y = await co({
3122
3122
  ...e,
3123
- path: h,
3123
+ path: d,
3124
3124
  inputs: p,
3125
3125
  type: l,
3126
3126
  headers() {
@@ -3130,36 +3130,36 @@ function po(t) {
3130
3130
  },
3131
3131
  signal: f
3132
3132
  });
3133
- return (Array.isArray(d.json) ? d.json : c.map(() => d.json)).map((g) => ({
3134
- meta: d.meta,
3135
- json: g
3133
+ return (Array.isArray(y.json) ? y.json : c.map(() => y.json)).map((v) => ({
3134
+ meta: y.meta,
3135
+ json: v
3136
3136
  }));
3137
3137
  }
3138
3138
  }), s = Pn(n("query")), i = Pn(n("mutation")), u = {
3139
3139
  query: s,
3140
3140
  mutation: i
3141
3141
  };
3142
- return ({ op: l }) => zt((c) => {
3142
+ return ({ op: l }) => Ht((c) => {
3143
3143
  /* istanbul ignore if -- @preserve */
3144
3144
  if (l.type === "subscription")
3145
3145
  throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
3146
3146
  const p = u[l.type].load(l);
3147
3147
  let f;
3148
- return p.then((d) => {
3149
- f = d;
3150
- const m = Hi(d.json, e.transformer.output);
3148
+ return p.then((y) => {
3149
+ f = y;
3150
+ const m = Hi(y.json, e.transformer.output);
3151
3151
  if (!m.ok) {
3152
3152
  c.error(xe.from(m.error, {
3153
- meta: d.meta
3153
+ meta: y.meta
3154
3154
  }));
3155
3155
  return;
3156
3156
  }
3157
3157
  c.next({
3158
- context: d.meta,
3158
+ context: y.meta,
3159
3159
  result: m.result
3160
3160
  }), c.complete();
3161
- }).catch((d) => {
3162
- c.error(xe.from(d, {
3161
+ }).catch((y) => {
3162
+ c.error(xe.from(y, {
3163
3163
  meta: f == null ? void 0 : f.meta
3164
3164
  }));
3165
3165
  }), () => {
@@ -3219,7 +3219,7 @@ function wo(t, { intervalMs: e, pongTimeoutMs: r }) {
3219
3219
  clearTimeout(n), clearTimeout(s);
3220
3220
  });
3221
3221
  }
3222
- class $t {
3222
+ class zt {
3223
3223
  get ws() {
3224
3224
  return this.wsObservable.get();
3225
3225
  }
@@ -3240,7 +3240,7 @@ class $t {
3240
3240
  }
3241
3241
  async open() {
3242
3242
  if (this.openPromise) return this.openPromise;
3243
- this.id = ++$t.connectCount;
3243
+ this.id = ++zt.connectCount;
3244
3244
  const e = vo(this.urlOptions).then((r) => new this.WebSocketPonyfill(r));
3245
3245
  this.openPromise = e.then(bo), this.ws = await e, this.ws.addEventListener("message", function({ data: r }) {
3246
3246
  r === "PING" && this.send("PONG");
@@ -3266,12 +3266,12 @@ class $t {
3266
3266
  }
3267
3267
  }
3268
3268
  constructor(e) {
3269
- if (je(this, "id", ++$t.connectCount), je(this, "WebSocketPonyfill", void 0), je(this, "urlOptions", void 0), je(this, "keepAliveOpts", void 0), je(this, "wsObservable", Qi(null)), je(this, "openPromise", null), this.WebSocketPonyfill = e.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
3269
+ if (je(this, "id", ++zt.connectCount), je(this, "WebSocketPonyfill", void 0), je(this, "urlOptions", void 0), je(this, "keepAliveOpts", void 0), je(this, "wsObservable", Qi(null)), je(this, "openPromise", null), this.WebSocketPonyfill = e.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
3270
3270
  throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");
3271
3271
  this.urlOptions = e.urlOptions, this.keepAliveOpts = e.keepAlive;
3272
3272
  }
3273
3273
  }
3274
- je($t, "connectCount", 0);
3274
+ je(zt, "connectCount", 0);
3275
3275
  class Eo {
3276
3276
  constructor() {
3277
3277
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
@@ -3317,7 +3317,7 @@ class Po extends cs {
3317
3317
  return this.classToAllowedProps.get(e);
3318
3318
  }
3319
3319
  }
3320
- function Oo(t) {
3320
+ function Ro(t) {
3321
3321
  if ("values" in Object)
3322
3322
  return Object.values(t);
3323
3323
  const e = [];
@@ -3325,8 +3325,8 @@ function Oo(t) {
3325
3325
  t.hasOwnProperty(r) && e.push(t[r]);
3326
3326
  return e;
3327
3327
  }
3328
- function Ro(t, e) {
3329
- const r = Oo(t);
3328
+ function Oo(t, e) {
3329
+ const r = Ro(t);
3330
3330
  if ("find" in r)
3331
3331
  return r.find(e);
3332
3332
  const n = r;
@@ -3339,10 +3339,10 @@ function Ro(t, e) {
3339
3339
  function lt(t, e) {
3340
3340
  Object.entries(t).forEach(([r, n]) => e(n, r));
3341
3341
  }
3342
- function Mt(t, e) {
3342
+ function Nt(t, e) {
3343
3343
  return t.indexOf(e) !== -1;
3344
3344
  }
3345
- function On(t, e) {
3345
+ function Rn(t, e) {
3346
3346
  for (let r = 0; r < t.length; r++) {
3347
3347
  const n = t[r];
3348
3348
  if (e(n))
@@ -3357,13 +3357,13 @@ class So {
3357
3357
  this.transfomers[e.name] = e;
3358
3358
  }
3359
3359
  findApplicable(e) {
3360
- return Ro(this.transfomers, (r) => r.isApplicable(e));
3360
+ return Oo(this.transfomers, (r) => r.isApplicable(e));
3361
3361
  }
3362
3362
  findByName(e) {
3363
3363
  return this.transfomers[e];
3364
3364
  }
3365
3365
  }
3366
- const Co = (t) => Object.prototype.toString.call(t).slice(8, -1), ls = (t) => typeof t > "u", To = (t) => t === null, Ot = (t) => typeof t != "object" || t === null || t === Object.prototype ? !1 : Object.getPrototypeOf(t) === null ? !0 : Object.getPrototypeOf(t) === Object.prototype, Sr = (t) => Ot(t) && Object.keys(t).length === 0, Ie = (t) => Array.isArray(t), Fo = (t) => typeof t == "string", Ao = (t) => typeof t == "number" && !isNaN(t), xo = (t) => typeof t == "boolean", Io = (t) => t instanceof RegExp, Rt = (t) => t instanceof Map, St = (t) => t instanceof Set, fs = (t) => Co(t) === "Symbol", Do = (t) => t instanceof Date && !isNaN(t.valueOf()), _o = (t) => t instanceof Error, Rn = (t) => typeof t == "number" && isNaN(t), ko = (t) => xo(t) || To(t) || ls(t) || Ao(t) || Fo(t) || fs(t), jo = (t) => typeof t == "bigint", qo = (t) => t === 1 / 0 || t === -1 / 0, Uo = (t) => ArrayBuffer.isView(t) && !(t instanceof DataView), Mo = (t) => t instanceof URL, ds = (t) => t.replace(/\./g, "\\."), ar = (t) => t.map(String).map(ds).join("."), bt = (t) => {
3366
+ const Co = (t) => Object.prototype.toString.call(t).slice(8, -1), ls = (t) => typeof t > "u", To = (t) => t === null, Rt = (t) => typeof t != "object" || t === null || t === Object.prototype ? !1 : Object.getPrototypeOf(t) === null ? !0 : Object.getPrototypeOf(t) === Object.prototype, Cr = (t) => Rt(t) && Object.keys(t).length === 0, Ie = (t) => Array.isArray(t), Fo = (t) => typeof t == "string", Ao = (t) => typeof t == "number" && !isNaN(t), xo = (t) => typeof t == "boolean", Io = (t) => t instanceof RegExp, Ot = (t) => t instanceof Map, St = (t) => t instanceof Set, fs = (t) => Co(t) === "Symbol", Do = (t) => t instanceof Date && !isNaN(t.valueOf()), ko = (t) => t instanceof Error, On = (t) => typeof t == "number" && isNaN(t), _o = (t) => xo(t) || To(t) || ls(t) || Ao(t) || Fo(t) || fs(t), jo = (t) => typeof t == "bigint", qo = (t) => t === 1 / 0 || t === -1 / 0, Mo = (t) => ArrayBuffer.isView(t) && !(t instanceof DataView), Uo = (t) => t instanceof URL, ds = (t) => t.replace(/\./g, "\\."), cr = (t) => t.map(String).map(ds).join("."), bt = (t) => {
3367
3367
  const e = [];
3368
3368
  let r = "";
3369
3369
  for (let s = 0; s < t.length; s++) {
@@ -3394,7 +3394,7 @@ const hs = [
3394
3394
  }),
3395
3395
  ae(jo, "bigint", (t) => t.toString(), (t) => typeof BigInt < "u" ? BigInt(t) : (console.error("Please add a BigInt polyfill."), t)),
3396
3396
  ae(Do, "Date", (t) => t.toISOString(), (t) => new Date(t)),
3397
- ae(_o, "Error", (t, e) => {
3397
+ ae(ko, "Error", (t, e) => {
3398
3398
  const r = {
3399
3399
  name: t.name,
3400
3400
  message: t.message
@@ -3420,12 +3420,12 @@ const hs = [
3420
3420
  (t) => [...t.values()],
3421
3421
  (t) => new Set(t)
3422
3422
  ),
3423
- ae(Rt, "map", (t) => [...t.entries()], (t) => new Map(t)),
3424
- ae((t) => Rn(t) || qo(t), "number", (t) => Rn(t) ? "NaN" : t > 0 ? "Infinity" : "-Infinity", Number),
3423
+ ae(Ot, "map", (t) => [...t.entries()], (t) => new Map(t)),
3424
+ ae((t) => On(t) || qo(t), "number", (t) => On(t) ? "NaN" : t > 0 ? "Infinity" : "-Infinity", Number),
3425
3425
  ae((t) => t === 0 && 1 / t === -1 / 0, "number", () => "-0", Number),
3426
- ae(Mo, "URL", (t) => t.toString(), (t) => new URL(t))
3426
+ ae(Uo, "URL", (t) => t.toString(), (t) => new URL(t))
3427
3427
  ];
3428
- function Vt(t, e, r, n) {
3428
+ function Wt(t, e, r, n) {
3429
3429
  return {
3430
3430
  isApplicable: t,
3431
3431
  annotation: e,
@@ -3433,7 +3433,7 @@ function Vt(t, e, r, n) {
3433
3433
  untransform: n
3434
3434
  };
3435
3435
  }
3436
- const ys = Vt((t, e) => fs(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e) => ["symbol", e.symbolRegistry.getIdentifier(t)], (t) => t.description, (t, e, r) => {
3436
+ const ys = Wt((t, e) => fs(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e) => ["symbol", e.symbolRegistry.getIdentifier(t)], (t) => t.description, (t, e, r) => {
3437
3437
  const n = r.symbolRegistry.getValue(e[1]);
3438
3438
  if (!n)
3439
3439
  throw new Error("Trying to deserialize unknown symbol");
@@ -3448,7 +3448,7 @@ const ys = Vt((t, e) => fs(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e)
3448
3448
  Float32Array,
3449
3449
  Float64Array,
3450
3450
  Uint8ClampedArray
3451
- ].reduce((t, e) => (t[e.name] = e, t), {}), ps = Vt(Uo, (t) => ["typed-array", t.constructor.name], (t) => [...t], (t, e) => {
3451
+ ].reduce((t, e) => (t[e.name] = e, t), {}), ps = Wt(Mo, (t) => ["typed-array", t.constructor.name], (t) => [...t], (t, e) => {
3452
3452
  const r = No[e[1]];
3453
3453
  if (!r)
3454
3454
  throw new Error("Trying to deserialize unknown typed array");
@@ -3457,7 +3457,7 @@ const ys = Vt((t, e) => fs(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e)
3457
3457
  function ms(t, e) {
3458
3458
  return t != null && t.constructor ? !!e.classRegistry.getIdentifier(t.constructor) : !1;
3459
3459
  }
3460
- const gs = Vt(ms, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructor)], (t, e) => {
3460
+ const gs = Wt(ms, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructor)], (t, e) => {
3461
3461
  const r = e.classRegistry.getAllowedProps(t.constructor);
3462
3462
  if (!r)
3463
3463
  return { ...t };
@@ -3470,19 +3470,19 @@ const gs = Vt(ms, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructo
3470
3470
  if (!n)
3471
3471
  throw new Error(`Trying to deserialize unknown class '${e[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
3472
3472
  return Object.assign(Object.create(n.prototype), t);
3473
- }), vs = Vt((t, e) => !!e.customTransformerRegistry.findApplicable(t), (t, e) => ["custom", e.customTransformerRegistry.findApplicable(t).name], (t, e) => e.customTransformerRegistry.findApplicable(t).serialize(t), (t, e, r) => {
3473
+ }), vs = Wt((t, e) => !!e.customTransformerRegistry.findApplicable(t), (t, e) => ["custom", e.customTransformerRegistry.findApplicable(t).name], (t, e) => e.customTransformerRegistry.findApplicable(t).serialize(t), (t, e, r) => {
3474
3474
  const n = r.customTransformerRegistry.findByName(e[1]);
3475
3475
  if (!n)
3476
3476
  throw new Error("Trying to deserialize unknown custom value");
3477
3477
  return n.deserialize(t);
3478
3478
  }), Lo = [gs, ys, vs, ps], Sn = (t, e) => {
3479
- const r = On(Lo, (s) => s.isApplicable(t, e));
3479
+ const r = Rn(Lo, (s) => s.isApplicable(t, e));
3480
3480
  if (r)
3481
3481
  return {
3482
3482
  value: r.transform(t, e),
3483
3483
  type: r.annotation(t, e)
3484
3484
  };
3485
- const n = On(hs, (s) => s.isApplicable(t, e));
3485
+ const n = Rn(hs, (s) => s.isApplicable(t, e));
3486
3486
  if (n)
3487
3487
  return {
3488
3488
  value: n.transform(t, e),
@@ -3521,11 +3521,11 @@ const Qo = (t, e, r) => {
3521
3521
  return r.next().value;
3522
3522
  };
3523
3523
  function ws(t) {
3524
- if (Mt(t, "__proto__"))
3524
+ if (Nt(t, "__proto__"))
3525
3525
  throw new Error("__proto__ is not allowed as a property");
3526
- if (Mt(t, "prototype"))
3526
+ if (Nt(t, "prototype"))
3527
3527
  throw new Error("prototype is not allowed as a property");
3528
- if (Mt(t, "constructor"))
3528
+ if (Nt(t, "constructor"))
3529
3529
  throw new Error("constructor is not allowed as a property");
3530
3530
  }
3531
3531
  const $o = (t, e) => {
@@ -3534,7 +3534,7 @@ const $o = (t, e) => {
3534
3534
  const n = e[r];
3535
3535
  if (St(t))
3536
3536
  t = Ge(t, +n);
3537
- else if (Rt(t)) {
3537
+ else if (Ot(t)) {
3538
3538
  const s = +n, i = +e[++r] == 0 ? "key" : "value", u = Ge(t, s);
3539
3539
  switch (i) {
3540
3540
  case "key":
@@ -3548,7 +3548,7 @@ const $o = (t, e) => {
3548
3548
  t = t[n];
3549
3549
  }
3550
3550
  return t;
3551
- }, Cr = (t, e, r) => {
3551
+ }, Tr = (t, e, r) => {
3552
3552
  if (ws(e), e.length === 0)
3553
3553
  return r(t);
3554
3554
  let n = t;
@@ -3557,16 +3557,16 @@ const $o = (t, e) => {
3557
3557
  if (Ie(n)) {
3558
3558
  const l = +u;
3559
3559
  n = n[l];
3560
- } else if (Ot(n))
3560
+ } else if (Rt(n))
3561
3561
  n = n[u];
3562
3562
  else if (St(n)) {
3563
3563
  const l = +u;
3564
3564
  n = Ge(n, l);
3565
- } else if (Rt(n)) {
3565
+ } else if (Ot(n)) {
3566
3566
  if (i === e.length - 2)
3567
3567
  break;
3568
- const c = +u, h = +e[++i] == 0 ? "key" : "value", p = Ge(n, c);
3569
- switch (h) {
3568
+ const c = +u, d = +e[++i] == 0 ? "key" : "value", p = Ge(n, c);
3569
+ switch (d) {
3570
3570
  case "key":
3571
3571
  n = p;
3572
3572
  break;
@@ -3577,11 +3577,11 @@ const $o = (t, e) => {
3577
3577
  }
3578
3578
  }
3579
3579
  const s = e[e.length - 1];
3580
- if (Ie(n) ? n[+s] = r(n[+s]) : Ot(n) && (n[s] = r(n[s])), St(n)) {
3580
+ if (Ie(n) ? n[+s] = r(n[+s]) : Rt(n) && (n[s] = r(n[s])), St(n)) {
3581
3581
  const i = Ge(n, +s), u = r(i);
3582
3582
  i !== u && (n.delete(i), n.add(u));
3583
3583
  }
3584
- if (Rt(n)) {
3584
+ if (Ot(n)) {
3585
3585
  const i = +e[e.length - 2], u = Ge(n, i);
3586
3586
  switch (+s == 0 ? "key" : "value") {
3587
3587
  case "key": {
@@ -3597,40 +3597,40 @@ const $o = (t, e) => {
3597
3597
  }
3598
3598
  return t;
3599
3599
  };
3600
- function Tr(t, e, r = []) {
3600
+ function Fr(t, e, r = []) {
3601
3601
  if (!t)
3602
3602
  return;
3603
3603
  if (!Ie(t)) {
3604
- lt(t, (i, u) => Tr(i, e, [...r, ...bt(u)]));
3604
+ lt(t, (i, u) => Fr(i, e, [...r, ...bt(u)]));
3605
3605
  return;
3606
3606
  }
3607
3607
  const [n, s] = t;
3608
3608
  s && lt(s, (i, u) => {
3609
- Tr(i, e, [...r, ...bt(u)]);
3609
+ Fr(i, e, [...r, ...bt(u)]);
3610
3610
  }), e(n, r);
3611
3611
  }
3612
3612
  function Ko(t, e, r) {
3613
- return Tr(e, (n, s) => {
3614
- t = Cr(t, s, (i) => Qo(i, n, r));
3613
+ return Fr(e, (n, s) => {
3614
+ t = Tr(t, s, (i) => Qo(i, n, r));
3615
3615
  }), t;
3616
3616
  }
3617
3617
  function zo(t, e) {
3618
3618
  function r(n, s) {
3619
3619
  const i = $o(t, bt(s));
3620
3620
  n.map(bt).forEach((u) => {
3621
- t = Cr(t, u, () => i);
3621
+ t = Tr(t, u, () => i);
3622
3622
  });
3623
3623
  }
3624
3624
  if (Ie(e)) {
3625
3625
  const [n, s] = e;
3626
3626
  n.forEach((i) => {
3627
- t = Cr(t, bt(i), () => t);
3627
+ t = Tr(t, bt(i), () => t);
3628
3628
  }), s && lt(s, r);
3629
3629
  } else
3630
3630
  lt(e, r);
3631
3631
  return t;
3632
3632
  }
3633
- const Vo = (t, e) => Ot(t) || Ie(t) || Rt(t) || St(t) || ms(t, e);
3633
+ const Vo = (t, e) => Rt(t) || Ie(t) || Ot(t) || St(t) || ms(t, e);
3634
3634
  function Ho(t, e, r) {
3635
3635
  const n = r.get(t);
3636
3636
  n ? n.push(e) : r.set(t, [e]);
@@ -3643,11 +3643,11 @@ function Wo(t, e) {
3643
3643
  return;
3644
3644
  e || (s = s.map((l) => l.map(String)).sort((l, c) => l.length - c.length));
3645
3645
  const [i, ...u] = s;
3646
- i.length === 0 ? n = u.map(ar) : r[ar(i)] = u.map(ar);
3647
- }), n ? Sr(r) ? [n] : [n, r] : Sr(r) ? void 0 : r;
3646
+ i.length === 0 ? n = u.map(cr) : r[cr(i)] = u.map(cr);
3647
+ }), n ? Cr(r) ? [n] : [n, r] : Cr(r) ? void 0 : r;
3648
3648
  }
3649
3649
  const Es = (t, e, r, n, s = [], i = [], u = /* @__PURE__ */ new Map()) => {
3650
- const l = ko(t);
3650
+ const l = _o(t);
3651
3651
  if (!l) {
3652
3652
  Ho(t, s, e);
3653
3653
  const m = u.get(t);
@@ -3657,35 +3657,35 @@ const Es = (t, e, r, n, s = [], i = [], u = /* @__PURE__ */ new Map()) => {
3657
3657
  } : m;
3658
3658
  }
3659
3659
  if (!Vo(t, r)) {
3660
- const m = Sn(t, r), v = m ? {
3660
+ const m = Sn(t, r), g = m ? {
3661
3661
  transformedValue: m.value,
3662
3662
  annotations: [m.type]
3663
3663
  } : {
3664
3664
  transformedValue: t
3665
3665
  };
3666
- return l || u.set(t, v), v;
3666
+ return l || u.set(t, g), g;
3667
3667
  }
3668
- if (Mt(i, t))
3668
+ if (Nt(i, t))
3669
3669
  return {
3670
3670
  transformedValue: null
3671
3671
  };
3672
- const c = Sn(t, r), h = (c == null ? void 0 : c.value) ?? t, p = Ie(h) ? [] : {}, f = {};
3673
- lt(h, (m, v) => {
3674
- if (v === "__proto__" || v === "constructor" || v === "prototype")
3675
- throw new Error(`Detected property ${v}. This is a prototype pollution risk, please remove it from your object.`);
3676
- const g = Es(m, e, r, n, [...s, v], [...i, t], u);
3677
- p[v] = g.transformedValue, Ie(g.annotations) ? f[v] = g.annotations : Ot(g.annotations) && lt(g.annotations, (R, P) => {
3678
- f[ds(v) + "." + P] = R;
3672
+ const c = Sn(t, r), d = (c == null ? void 0 : c.value) ?? t, p = Ie(d) ? [] : {}, f = {};
3673
+ lt(d, (m, g) => {
3674
+ if (g === "__proto__" || g === "constructor" || g === "prototype")
3675
+ throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);
3676
+ const v = Es(m, e, r, n, [...s, g], [...i, t], u);
3677
+ p[g] = v.transformedValue, Ie(v.annotations) ? f[g] = v.annotations : Rt(v.annotations) && lt(v.annotations, (w, b) => {
3678
+ f[ds(g) + "." + b] = w;
3679
3679
  });
3680
3680
  });
3681
- const d = Sr(f) ? {
3681
+ const y = Cr(f) ? {
3682
3682
  transformedValue: p,
3683
3683
  annotations: c ? [c.type] : void 0
3684
3684
  } : {
3685
3685
  transformedValue: p,
3686
3686
  annotations: c ? [c.type, f] : f
3687
3687
  };
3688
- return l || u.set(t, d), d;
3688
+ return l || u.set(t, y), y;
3689
3689
  };
3690
3690
  function Ps(t) {
3691
3691
  return Object.prototype.toString.call(t).slice(8, -1);
@@ -3708,20 +3708,20 @@ function Go(t, e, r, n, s) {
3708
3708
  configurable: !0
3709
3709
  });
3710
3710
  }
3711
- function Fr(t, e = {}) {
3711
+ function Ar(t, e = {}) {
3712
3712
  if (Cn(t))
3713
- return t.map((s) => Fr(s, e));
3713
+ return t.map((s) => Ar(s, e));
3714
3714
  if (!Bo(t))
3715
3715
  return t;
3716
3716
  const r = Object.getOwnPropertyNames(t), n = Object.getOwnPropertySymbols(t);
3717
3717
  return [...r, ...n].reduce((s, i) => {
3718
3718
  if (Cn(e.props) && !e.props.includes(i))
3719
3719
  return s;
3720
- const u = t[i], l = Fr(u, e);
3720
+ const u = t[i], l = Ar(u, e);
3721
3721
  return Go(s, i, l, t, e.nonenumerable), s;
3722
3722
  }, {});
3723
3723
  }
3724
- class A {
3724
+ class I {
3725
3725
  /**
3726
3726
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3727
3727
  */
@@ -3744,7 +3744,7 @@ class A {
3744
3744
  }
3745
3745
  deserialize(e) {
3746
3746
  const { json: r, meta: n } = e;
3747
- let s = Fr(r);
3747
+ let s = Ar(r);
3748
3748
  return n != null && n.values && (s = Ko(s, n.values, this)), n != null && n.referentialEqualities && (s = zo(s, n.referentialEqualities)), s;
3749
3749
  }
3750
3750
  stringify(e) {
@@ -3769,44 +3769,44 @@ class A {
3769
3769
  this.allowedErrorProps.push(...e);
3770
3770
  }
3771
3771
  }
3772
- A.defaultInstance = new A();
3773
- A.serialize = A.defaultInstance.serialize.bind(A.defaultInstance);
3774
- A.deserialize = A.defaultInstance.deserialize.bind(A.defaultInstance);
3775
- A.stringify = A.defaultInstance.stringify.bind(A.defaultInstance);
3776
- A.parse = A.defaultInstance.parse.bind(A.defaultInstance);
3777
- A.registerClass = A.defaultInstance.registerClass.bind(A.defaultInstance);
3778
- A.registerSymbol = A.defaultInstance.registerSymbol.bind(A.defaultInstance);
3779
- A.registerCustom = A.defaultInstance.registerCustom.bind(A.defaultInstance);
3780
- A.allowErrorProps = A.defaultInstance.allowErrorProps.bind(A.defaultInstance);
3781
- A.serialize;
3782
- A.deserialize;
3783
- A.stringify;
3784
- A.parse;
3785
- A.registerClass;
3786
- A.registerCustom;
3787
- A.registerSymbol;
3788
- A.allowErrorProps;
3789
- class Ht extends Error {
3772
+ I.defaultInstance = new I();
3773
+ I.serialize = I.defaultInstance.serialize.bind(I.defaultInstance);
3774
+ I.deserialize = I.defaultInstance.deserialize.bind(I.defaultInstance);
3775
+ I.stringify = I.defaultInstance.stringify.bind(I.defaultInstance);
3776
+ I.parse = I.defaultInstance.parse.bind(I.defaultInstance);
3777
+ I.registerClass = I.defaultInstance.registerClass.bind(I.defaultInstance);
3778
+ I.registerSymbol = I.defaultInstance.registerSymbol.bind(I.defaultInstance);
3779
+ I.registerCustom = I.defaultInstance.registerCustom.bind(I.defaultInstance);
3780
+ I.allowErrorProps = I.defaultInstance.allowErrorProps.bind(I.defaultInstance);
3781
+ I.serialize;
3782
+ I.deserialize;
3783
+ I.stringify;
3784
+ I.parse;
3785
+ I.registerClass;
3786
+ I.registerCustom;
3787
+ I.registerSymbol;
3788
+ I.allowErrorProps;
3789
+ class Bt extends Error {
3790
3790
  constructor(r, n) {
3791
3791
  super(r);
3792
- tr(this, "context");
3793
- tr(this, "originalError");
3794
- this.name = "FolioError", this.context = n == null ? void 0 : n.context, this.originalError = n == null ? void 0 : n.originalError, Object.setPrototypeOf(this, Ht.prototype);
3792
+ nr(this, "context");
3793
+ nr(this, "originalError");
3794
+ this.name = "FolioError", this.context = n == null ? void 0 : n.context, this.originalError = n == null ? void 0 : n.originalError, Object.setPrototypeOf(this, Bt.prototype);
3795
3795
  }
3796
3796
  }
3797
- function G(t, e) {
3798
- return new Ht(t, e);
3797
+ function V(t, e) {
3798
+ return new Bt(t, e);
3799
3799
  }
3800
- function ne(t) {
3801
- t instanceof Ht ? (console.error(`🔴 Folio Error: ${t.message}`), t.context && Object.keys(t.context).length > 0 && console.error("Context:", t.context), t.originalError && console.error("Original error:", t.originalError)) : console.error("🔴 Unexpected error:", t);
3800
+ function ee(t) {
3801
+ t instanceof Bt ? (console.error(`🔴 Folio Error: ${t.message}`), t.context && Object.keys(t.context).length > 0 && console.error("Context:", t.context), t.originalError && console.error("Original error:", t.originalError)) : console.error("🔴 Unexpected error:", t);
3802
3802
  }
3803
3803
  function de(t, e, r) {
3804
- return G(`${t}: ${e}`, {
3804
+ return V(`${t}: ${e}`, {
3805
3805
  context: { hookName: t },
3806
3806
  originalError: r
3807
3807
  });
3808
3808
  }
3809
- const Os = Zs(null);
3809
+ const Rs = Zs(null);
3810
3810
  function Yo(t, e) {
3811
3811
  const r = to({
3812
3812
  links: [
@@ -3815,51 +3815,49 @@ function Yo(t, e) {
3815
3815
  headers: () => ({
3816
3816
  Authorization: `Bearer ${e}`
3817
3817
  }),
3818
- transformer: A
3818
+ transformer: I
3819
3819
  })
3820
3820
  ]
3821
- }), n = async (s, i, u = null) => {
3821
+ }), n = async (s, i, u = null, l) => {
3822
3822
  try {
3823
- const l = Object.entries(Hn).reduce(
3824
- (d, [m, v]) => (v.extensions.forEach((g) => {
3825
- d.set(g, m);
3826
- }), d),
3823
+ const c = Object.entries(Hn).reduce(
3824
+ (m, [g, v]) => (v.extensions.forEach((w) => {
3825
+ m.set(w, g);
3826
+ }), m),
3827
3827
  /* @__PURE__ */ new Map()
3828
- ), c = i.map((d) => {
3829
- const m = d.name.toLowerCase(), v = m.includes(".") ? m.substring(m.lastIndexOf(".")) : "", g = v.startsWith(".") ? v : `.${v}`, R = l.get(g) || null;
3830
- return { ...d, mimeType: R };
3828
+ ), d = i.map((m) => {
3829
+ const g = m.name.toLowerCase(), v = g.includes(".") ? g.substring(g.lastIndexOf(".")) : "", w = v.startsWith(".") ? v : `.${v}`, b = c.get(w) || null;
3830
+ return { ...m, mimeType: b };
3831
3831
  }).filter(
3832
- (d) => d.mimeType !== null && oi.has(d.mimeType)
3832
+ (m) => m.mimeType !== null && oi.has(m.mimeType)
3833
3833
  );
3834
- if (c.length === 0)
3834
+ if (d.length === 0)
3835
3835
  return { filesToCreate: [] };
3836
- const h = await r.fileRouter.getFilesByProject.query(
3837
- {
3838
- projectId: s
3839
- }
3840
- ), p = c.filter((d) => !h.some(
3841
- (m) => m.userProvidedId === d.userProvidedId && m.parentId === u
3836
+ const p = l || await r.fileRouter.getFilesByProject.query({
3837
+ projectId: s
3838
+ }), f = d.filter((m) => !p.some(
3839
+ (g) => g.userProvidedId === m.userProvidedId && g.parentId === u
3842
3840
  ));
3843
- return p.length === 0 ? { filesToCreate: [] } : { filesToCreate: p.map((d) => ({
3841
+ return f.length === 0 ? { filesToCreate: [] } : { filesToCreate: f.map((m) => ({
3844
3842
  projectId: s,
3845
- mimeType: d.mimeType,
3846
- path: d.blobUrl,
3843
+ mimeType: m.mimeType,
3844
+ path: m.blobUrl,
3847
3845
  // Map blobUrl back to path for API
3848
- name: d.name,
3846
+ name: m.name,
3849
3847
  size: 0,
3850
3848
  // You might need to calculate or pass size
3851
3849
  metadata: null,
3852
3850
  isArtifact: !1,
3853
3851
  summary: null,
3854
- chunkingStatus: cr.NOT_CHUNKED,
3852
+ chunkingStatus: Mt.NOT_CHUNKED,
3855
3853
  isDirectory: !1,
3856
3854
  parentId: u,
3857
- userProvidedId: d.userProvidedId
3855
+ userProvidedId: m.userProvidedId
3858
3856
  })) };
3859
- } catch (l) {
3860
- throw G("Failed to validate and filter files", {
3857
+ } catch (c) {
3858
+ throw V("Failed to validate and filter files", {
3861
3859
  context: { projectId: s, parentId: u, fileCount: i.length },
3862
- originalError: l
3860
+ originalError: c
3863
3861
  });
3864
3862
  }
3865
3863
  };
@@ -3889,7 +3887,7 @@ function Yo(t, e) {
3889
3887
  })
3890
3888
  );
3891
3889
  } catch (s) {
3892
- throw G("Failed to get projects for user", {
3890
+ throw V("Failed to get projects for user", {
3893
3891
  originalError: s
3894
3892
  });
3895
3893
  }
@@ -3906,7 +3904,7 @@ function Yo(t, e) {
3906
3904
  createdAt: i.createdAt
3907
3905
  };
3908
3906
  } catch (i) {
3909
- throw G("Failed to add project for user", {
3907
+ throw V("Failed to add project for user", {
3910
3908
  context: { projectName: s },
3911
3909
  originalError: i
3912
3910
  });
@@ -3933,7 +3931,7 @@ function Yo(t, e) {
3933
3931
  updatedAt: c.updatedAt
3934
3932
  }));
3935
3933
  } catch (u) {
3936
- throw G("Failed to add files to project", {
3934
+ throw V("Failed to add files to project", {
3937
3935
  context: { projectId: s, fileCount: i.length },
3938
3936
  originalError: u
3939
3937
  });
@@ -3956,7 +3954,7 @@ function Yo(t, e) {
3956
3954
  updatedAt: u.updatedAt
3957
3955
  }));
3958
3956
  } catch (i) {
3959
- throw G("Failed to get files for project", {
3957
+ throw V("Failed to get files for project", {
3960
3958
  context: { projectId: s },
3961
3959
  originalError: i
3962
3960
  });
@@ -3964,35 +3962,35 @@ function Yo(t, e) {
3964
3962
  },
3965
3963
  addDirectoryWithFilesToProject: async (s, i, u, l, c) => {
3966
3964
  try {
3967
- const h = await r.fileRouter.getFilesByProject.query({
3965
+ const d = await r.fileRouter.getFilesByProject.query({
3968
3966
  projectId: s
3969
- }), f = ((P) => {
3970
- let E = 0;
3971
- for (let x = 0; x < P.length; x++) {
3972
- const j = P.charCodeAt(x);
3973
- E = (E << 5) - E + j, E = E & E;
3967
+ }), f = ((b) => {
3968
+ let P = 0;
3969
+ for (let S = 0; S < b.length; S++) {
3970
+ const T = b.charCodeAt(S);
3971
+ P = (P << 5) - P + T, P = P & P;
3974
3972
  }
3975
- return Math.abs(E).toString(36).substring(0, 6);
3976
- })(u), d = c || `directory-${i}-${f}`;
3977
- if (h.some(
3978
- (P) => P.userProvidedId === d && P.isDirectory === !0 && P.parentId === null
3973
+ return Math.abs(P).toString(36).substring(0, 6);
3974
+ })(u), y = c || `directory-${i}-${f}`;
3975
+ if (d.some(
3976
+ (b) => b.userProvidedId === y && b.isDirectory === !0 && b.parentId === null
3979
3977
  ))
3980
- return ne(
3981
- G("Directory already exists", {
3978
+ return ee(
3979
+ V("Directory already exists", {
3982
3980
  context: {
3983
3981
  projectId: s,
3984
3982
  directoryName: i,
3985
- userProvidedId: d
3983
+ userProvidedId: y
3986
3984
  }
3987
3985
  })
3988
3986
  ), {
3989
3987
  directory: null,
3990
3988
  files: []
3991
3989
  };
3992
- const v = await r.fileRouter.createFile.mutate({
3990
+ const g = await r.fileRouter.createFile.mutate({
3993
3991
  file: {
3994
3992
  projectId: s,
3995
- mimeType: xr.DIRECTORY,
3993
+ mimeType: Lt.DIRECTORY,
3996
3994
  path: "",
3997
3995
  name: i,
3998
3996
  size: 0,
@@ -4002,76 +4000,201 @@ function Yo(t, e) {
4002
4000
  parentId: null,
4003
4001
  // Always at the root level
4004
4002
  summary: null,
4005
- chunkingStatus: cr.NOT_CHUNKED,
4006
- userProvidedId: d
4003
+ chunkingStatus: Mt.NOT_CHUNKED,
4004
+ userProvidedId: y
4007
4005
  // Use the deduplication-consistent userProvidedId
4008
4006
  }
4009
4007
  });
4010
4008
  if (l.length === 0)
4011
4009
  return {
4012
4010
  directory: {
4013
- blobUrl: v.path,
4014
- name: v.name,
4015
- id: v.id,
4016
- parentId: v.parentId,
4017
- isDirectory: v.isDirectory,
4018
- userProvidedId: v.userProvidedId || d,
4019
- createdAt: v.createdAt,
4020
- updatedAt: v.updatedAt
4011
+ blobUrl: g.path,
4012
+ name: g.name,
4013
+ id: g.id,
4014
+ parentId: g.parentId,
4015
+ isDirectory: g.isDirectory,
4016
+ userProvidedId: g.userProvidedId || y,
4017
+ createdAt: g.createdAt,
4018
+ updatedAt: g.updatedAt
4021
4019
  },
4022
4020
  files: []
4023
4021
  };
4024
- const { filesToCreate: g } = await n(
4022
+ const { filesToCreate: v } = await n(
4025
4023
  s,
4026
4024
  l,
4027
- v.id
4025
+ g.id
4028
4026
  // Pass directory ID as parent
4029
4027
  );
4030
- if (g.length === 0)
4028
+ if (v.length === 0)
4031
4029
  return {
4032
4030
  directory: {
4033
- blobUrl: v.path,
4034
- name: v.name,
4035
- id: v.id,
4036
- parentId: v.parentId,
4037
- isDirectory: v.isDirectory,
4038
- userProvidedId: v.userProvidedId || d,
4039
- createdAt: v.createdAt,
4040
- updatedAt: v.updatedAt
4031
+ blobUrl: g.path,
4032
+ name: g.name,
4033
+ id: g.id,
4034
+ parentId: g.parentId,
4035
+ isDirectory: g.isDirectory,
4036
+ userProvidedId: g.userProvidedId || y,
4037
+ createdAt: g.createdAt,
4038
+ updatedAt: g.updatedAt
4041
4039
  },
4042
4040
  files: []
4043
4041
  };
4044
- const R = await r.fileRouter.createFiles.mutate({
4045
- files: g
4042
+ const w = await r.fileRouter.createFiles.mutate({
4043
+ files: v
4046
4044
  });
4047
4045
  return {
4048
- directory: v ? {
4049
- blobUrl: v.path,
4050
- name: v.name,
4051
- id: v.id,
4052
- parentId: v.parentId,
4053
- isDirectory: v.isDirectory,
4054
- userProvidedId: v.userProvidedId || `directory-${i}`,
4055
- createdAt: v.createdAt,
4056
- updatedAt: v.updatedAt
4046
+ directory: g ? {
4047
+ blobUrl: g.path,
4048
+ name: g.name,
4049
+ id: g.id,
4050
+ parentId: g.parentId,
4051
+ isDirectory: g.isDirectory,
4052
+ userProvidedId: g.userProvidedId || `directory-${i}`,
4053
+ createdAt: g.createdAt,
4054
+ updatedAt: g.updatedAt
4057
4055
  } : null,
4058
- files: R.map((P) => ({
4059
- blobUrl: P.path,
4060
- name: P.name,
4061
- id: P.id,
4062
- parentId: P.parentId,
4063
- isDirectory: P.isDirectory,
4064
- userProvidedId: P.userProvidedId || "",
4065
- createdAt: P.createdAt,
4066
- updatedAt: P.updatedAt
4056
+ files: w.map((b) => ({
4057
+ blobUrl: b.path,
4058
+ name: b.name,
4059
+ id: b.id,
4060
+ parentId: b.parentId,
4061
+ isDirectory: b.isDirectory,
4062
+ userProvidedId: b.userProvidedId || "",
4063
+ createdAt: b.createdAt,
4064
+ updatedAt: b.updatedAt
4067
4065
  }))
4068
4066
  };
4069
- } catch (h) {
4070
- throw G(
4067
+ } catch (d) {
4068
+ throw V(
4071
4069
  "Failed to add directory with files to project",
4072
4070
  {
4073
4071
  context: { projectId: s, directoryName: i, fileCount: l.length },
4074
- originalError: h
4072
+ originalError: d
4073
+ }
4074
+ );
4075
+ }
4076
+ },
4077
+ addDirectoriesWithFilesToProjectBatch: async (s, i) => {
4078
+ try {
4079
+ const u = [];
4080
+ if (i.length === 0)
4081
+ return [];
4082
+ const l = await r.fileRouter.getFilesByProject.query({
4083
+ projectId: s
4084
+ }), c = (w) => {
4085
+ let b = 0;
4086
+ for (let P = 0; P < w.length; P++) {
4087
+ const S = w.charCodeAt(P);
4088
+ b = (b << 5) - b + S, b = b & b;
4089
+ }
4090
+ return Math.abs(b).toString(36).substring(0, 6);
4091
+ }, d = [], p = [];
4092
+ i.forEach((w, b) => {
4093
+ const P = c(w.directoryMetadata), S = w.userProvidedId || `directory-${w.directoryName}-${P}`;
4094
+ l.some(
4095
+ (j) => j.userProvidedId === S && j.isDirectory === !0 && j.parentId === null
4096
+ ) ? (ee(
4097
+ V("Directory already exists", {
4098
+ context: {
4099
+ projectId: s,
4100
+ directoryName: w.directoryName,
4101
+ userProvidedId: S
4102
+ }
4103
+ })
4104
+ ), p.push({
4105
+ originalIndex: b,
4106
+ reason: "Directory already exists"
4107
+ })) : d.push({
4108
+ directoryData: {
4109
+ projectId: s,
4110
+ mimeType: Lt.DIRECTORY,
4111
+ path: "",
4112
+ name: w.directoryName,
4113
+ size: 0,
4114
+ metadata: w.directoryMetadata,
4115
+ isArtifact: !1,
4116
+ isDirectory: !0,
4117
+ parentId: null,
4118
+ summary: null,
4119
+ chunkingStatus: Mt.NOT_CHUNKED,
4120
+ userProvidedId: S
4121
+ },
4122
+ originalIndex: b,
4123
+ files: w.files
4124
+ });
4125
+ });
4126
+ const f = d.length > 0 ? await r.fileRouter.createFiles.mutate({
4127
+ files: d.map((w) => w.directoryData)
4128
+ }) : [], y = [];
4129
+ for (let w = 0; w < f.length; w++) {
4130
+ const b = f[w], { files: P, originalIndex: S } = d[w];
4131
+ if (P.length > 0) {
4132
+ const { filesToCreate: T } = await n(
4133
+ s,
4134
+ P,
4135
+ b.id,
4136
+ l
4137
+ );
4138
+ T.forEach((j) => {
4139
+ y.push({
4140
+ fileData: j,
4141
+ originalDirectoryIndex: S
4142
+ });
4143
+ });
4144
+ }
4145
+ }
4146
+ const m = y.length > 0 ? await r.fileRouter.createFiles.mutate({
4147
+ files: y.map((w) => w.fileData)
4148
+ }) : [], g = {};
4149
+ let v = 0;
4150
+ for (const { originalDirectoryIndex: w } of y)
4151
+ if (g[w] || (g[w] = []), v < m.length) {
4152
+ const b = m[v];
4153
+ g[w].push({
4154
+ blobUrl: b.path,
4155
+ name: b.name,
4156
+ id: b.id,
4157
+ parentId: b.parentId,
4158
+ isDirectory: b.isDirectory,
4159
+ userProvidedId: b.userProvidedId || "",
4160
+ createdAt: b.createdAt,
4161
+ updatedAt: b.updatedAt
4162
+ }), v++;
4163
+ }
4164
+ return i.forEach((w, b) => {
4165
+ if (p.some(
4166
+ (T) => T.originalIndex === b
4167
+ )) {
4168
+ u.push({ directory: null, files: [] });
4169
+ return;
4170
+ }
4171
+ const S = d.findIndex(
4172
+ (T) => T.originalIndex === b
4173
+ );
4174
+ if (S >= 0 && S < f.length) {
4175
+ const T = f[S], j = g[b] || [];
4176
+ u.push({
4177
+ directory: {
4178
+ blobUrl: T.path,
4179
+ name: T.name,
4180
+ id: T.id,
4181
+ parentId: T.parentId,
4182
+ isDirectory: T.isDirectory,
4183
+ userProvidedId: T.userProvidedId || "",
4184
+ createdAt: T.createdAt,
4185
+ updatedAt: T.updatedAt
4186
+ },
4187
+ files: j
4188
+ });
4189
+ } else
4190
+ u.push({ directory: null, files: [] });
4191
+ }), u;
4192
+ } catch (u) {
4193
+ throw V(
4194
+ "Failed to add directories with files to project in batch",
4195
+ {
4196
+ context: { projectId: s, directoryCount: i.length },
4197
+ originalError: u
4075
4198
  }
4076
4199
  );
4077
4200
  }
@@ -4082,7 +4205,7 @@ function Yo(t, e) {
4082
4205
  metadata: s
4083
4206
  });
4084
4207
  } catch (i) {
4085
- throw G("Failed to update user metadata", {
4208
+ throw V("Failed to update user metadata", {
4086
4209
  originalError: i
4087
4210
  });
4088
4211
  }
@@ -4091,7 +4214,7 @@ function Yo(t, e) {
4091
4214
  try {
4092
4215
  return await r.userRouter.getUserMetadata.query();
4093
4216
  } catch (s) {
4094
- throw G("Failed to get user metadata", {
4217
+ throw V("Failed to get user metadata", {
4095
4218
  originalError: s
4096
4219
  });
4097
4220
  }
@@ -4107,7 +4230,7 @@ function ra({
4107
4230
  onAnalyticsEvent: i,
4108
4231
  passTokenInQueryParam: u = !1
4109
4232
  }) {
4110
- const [l, c] = ei(null), h = ti(
4233
+ const [l, c] = ei(null), d = ti(
4111
4234
  () => new Ei({
4112
4235
  defaultOptions: {
4113
4236
  queries: {
@@ -4119,10 +4242,10 @@ function ra({
4119
4242
  }),
4120
4243
  []
4121
4244
  );
4122
- return nr(() => {
4245
+ return ir(() => {
4123
4246
  const p = `${e}:${r}`, f = Yo(p, n);
4124
4247
  c(f);
4125
- }, [e, r, n]), nr(() => {
4248
+ }, [e, r, n]), ir(() => {
4126
4249
  if (!l || !s)
4127
4250
  return;
4128
4251
  const p = JSON.stringify(s);
@@ -4130,20 +4253,20 @@ function ra({
4130
4253
  console.error(
4131
4254
  "[FolioProvider] Failed to set initial user metadata:",
4132
4255
  f
4133
- ), ne(
4134
- G("Failed to set initial user metadata", {
4256
+ ), ee(
4257
+ V("Failed to set initial user metadata", {
4135
4258
  originalError: f
4136
4259
  })
4137
4260
  );
4138
4261
  });
4139
- }, [l, s]), nr(() => {
4262
+ }, [l, s]), ir(() => {
4140
4263
  if (!i)
4141
4264
  return;
4142
- const p = (d) => {
4143
- i(d.detail);
4144
- }, f = (d) => {
4265
+ const p = (y) => {
4266
+ i(y.detail);
4267
+ }, f = (y) => {
4145
4268
  var m;
4146
- ((m = d.data) == null ? void 0 : m.type) === "folio-analytics" && d.data.event && i(d.data.event);
4269
+ ((m = y.data) == null ? void 0 : m.type) === "folio-analytics" && y.data.event && i(y.data.event);
4147
4270
  };
4148
4271
  return window.addEventListener(
4149
4272
  "folio-analytics",
@@ -4154,8 +4277,8 @@ function ra({
4154
4277
  p
4155
4278
  ), window.removeEventListener("message", f);
4156
4279
  };
4157
- }, [i]), /* @__PURE__ */ wt.jsx(Ci, { client: h, children: /* @__PURE__ */ wt.jsx(
4158
- Os.Provider,
4280
+ }, [i]), /* @__PURE__ */ wt.jsx(Ci, { client: d, children: /* @__PURE__ */ wt.jsx(
4281
+ Rs.Provider,
4159
4282
  {
4160
4283
  value: { host: e, port: r, client: l, token: n, passTokenInQueryParam: u },
4161
4284
  children: t
@@ -4163,21 +4286,21 @@ function ra({
4163
4286
  ) });
4164
4287
  }
4165
4288
  function He() {
4166
- const t = ri(Os);
4289
+ const t = ri(Rs);
4167
4290
  if (!t)
4168
4291
  throw console.error(
4169
4292
  "[useFolioContext] Context not found - component not wrapped in FolioProvider"
4170
- ), G(
4293
+ ), V(
4171
4294
  "useFolioContext must be used within a FolioProvider"
4172
4295
  );
4173
4296
  return t;
4174
4297
  }
4175
- const Ar = "folio-token";
4298
+ const xr = "folio-token";
4176
4299
  let Tn = null;
4177
4300
  const Jo = () => {
4178
4301
  const t = (e) => {
4179
4302
  var r;
4180
- ((r = e.data) == null ? void 0 : r.type) === Ar && typeof e.data.token == "string" && !Tn && (Tn = e.data.token);
4303
+ ((r = e.data) == null ? void 0 : r.type) === xr && typeof e.data.token == "string" && !Tn && (Tn = e.data.token);
4181
4304
  };
4182
4305
  return window.addEventListener("message", t), () => window.removeEventListener("message", t);
4183
4306
  };
@@ -4195,79 +4318,79 @@ function na({
4195
4318
  const {
4196
4319
  host: l,
4197
4320
  port: c,
4198
- token: h,
4321
+ token: d,
4199
4322
  passTokenInQueryParam: p
4200
- } = He(), f = Xo(null), [d, m] = Zo(), v = `${l}:${c}`, g = u !== void 0 ? u : p;
4323
+ } = He(), f = Xo(null), [y, m] = Zo(), g = `${l}:${c}`, v = u !== void 0 ? u : p;
4201
4324
  Fn(() => {
4202
4325
  (() => {
4203
4326
  try {
4204
- let E = v;
4205
- g && (E = `${v}?jwt=${encodeURIComponent(h)}`), m(E);
4206
- } catch (E) {
4207
- console.error("[FolioEmbed] Failed to set up iframe URL:", E), ne(
4208
- G("Failed to set up iframe URL", {
4327
+ let P = g;
4328
+ v && (P = `${g}?jwt=${encodeURIComponent(d)}`), m(P);
4329
+ } catch (P) {
4330
+ console.error("[FolioEmbed] Failed to set up iframe URL:", P), ee(
4331
+ V("Failed to set up iframe URL", {
4209
4332
  context: { host: l, port: c },
4210
- originalError: E
4333
+ originalError: P
4211
4334
  })
4212
4335
  );
4213
4336
  }
4214
4337
  })();
4215
- }, [l, c, h, v, g]), Fn(() => {
4216
- if (g)
4338
+ }, [l, c, d, g, v]), Fn(() => {
4339
+ if (v)
4217
4340
  return;
4218
- const P = (E) => {
4219
- var x, j;
4341
+ const b = (P) => {
4342
+ var S, T;
4220
4343
  try {
4221
- if (((x = E.data) == null ? void 0 : x.type) !== "folio-request-token")
4344
+ if (((S = P.data) == null ? void 0 : S.type) !== "folio-request-token")
4222
4345
  return;
4223
- if (!E.source || typeof E.source.postMessage != "function") {
4346
+ if (!P.source || typeof P.source.postMessage != "function") {
4224
4347
  console.warn("[FolioEmbed] Invalid event source for token request");
4225
4348
  return;
4226
4349
  }
4227
- E.source.postMessage(
4228
- { type: Ar, token: h },
4350
+ P.source.postMessage(
4351
+ { type: xr, token: d },
4229
4352
  "*"
4230
4353
  );
4231
- } catch (N) {
4232
- console.error("[FolioEmbed] Failed to handle iframe message:", N), ne(
4233
- G("Failed to handle iframe message", {
4234
- context: { messageType: (j = E == null ? void 0 : E.data) == null ? void 0 : j.type },
4235
- originalError: N
4354
+ } catch (j) {
4355
+ console.error("[FolioEmbed] Failed to handle iframe message:", j), ee(
4356
+ V("Failed to handle iframe message", {
4357
+ context: { messageType: (T = P == null ? void 0 : P.data) == null ? void 0 : T.type },
4358
+ originalError: j
4236
4359
  })
4237
4360
  );
4238
4361
  }
4239
4362
  };
4240
- return window.addEventListener("message", P), () => {
4241
- window.removeEventListener("message", P);
4363
+ return window.addEventListener("message", b), () => {
4364
+ window.removeEventListener("message", b);
4242
4365
  };
4243
- }, [h, g]);
4244
- const R = () => {
4245
- var E;
4246
- if (g || !((E = f.current) != null && E.contentWindow))
4366
+ }, [d, v]);
4367
+ const w = () => {
4368
+ var P;
4369
+ if (v || !((P = f.current) != null && P.contentWindow))
4247
4370
  return;
4248
- const P = (x = 1) => {
4249
- var j;
4250
- if ((j = f.current) != null && j.contentWindow)
4371
+ const b = (S = 1) => {
4372
+ var T;
4373
+ if ((T = f.current) != null && T.contentWindow)
4251
4374
  try {
4252
4375
  f.current.contentWindow.postMessage(
4253
- { type: Ar, token: h },
4376
+ { type: xr, token: d },
4254
4377
  "*"
4255
4378
  );
4256
- } catch (N) {
4379
+ } catch (j) {
4257
4380
  console.error(
4258
- `[FolioEmbed] Failed to post token message to iframe on load (attempt ${x}):`,
4259
- N
4260
- ), ne(
4261
- G("Failed to post token message to iframe", {
4262
- originalError: N,
4263
- context: { attemptNumber: x }
4381
+ `[FolioEmbed] Failed to post token message to iframe on load (attempt ${S}):`,
4382
+ j
4383
+ ), ee(
4384
+ V("Failed to post token message to iframe", {
4385
+ originalError: j,
4386
+ context: { attemptNumber: S }
4264
4387
  })
4265
4388
  );
4266
4389
  }
4267
4390
  };
4268
- P(1), setTimeout(() => P(2), 100), setTimeout(() => P(3), 500), setTimeout(() => P(4), 1e3);
4391
+ b(1), setTimeout(() => b(2), 100), setTimeout(() => b(3), 500), setTimeout(() => b(4), 1e3);
4269
4392
  };
4270
- return d ? /* @__PURE__ */ wt.jsx(
4393
+ return y ? /* @__PURE__ */ wt.jsx(
4271
4394
  "div",
4272
4395
  {
4273
4396
  className: `folio-embed-container ${s}`,
@@ -4281,7 +4404,7 @@ function na({
4281
4404
  "iframe",
4282
4405
  {
4283
4406
  ref: f,
4284
- src: d,
4407
+ src: y,
4285
4408
  width: "100%",
4286
4409
  height: "100%",
4287
4410
  style: {
@@ -4292,7 +4415,7 @@ function na({
4292
4415
  },
4293
4416
  allow: r,
4294
4417
  allowFullScreen: !0,
4295
- onLoad: R,
4418
+ onLoad: w,
4296
4419
  ...i
4297
4420
  }
4298
4421
  )
@@ -4300,7 +4423,7 @@ function na({
4300
4423
  ) : null;
4301
4424
  }
4302
4425
  function sa() {
4303
- const { client: t } = He(), e = kr({
4426
+ const { client: t } = He(), e = _r({
4304
4427
  queryKey: ["folioProjects"],
4305
4428
  queryFn: async () => {
4306
4429
  if (!t)
@@ -4311,7 +4434,7 @@ function sa() {
4311
4434
  try {
4312
4435
  return t.getProjectsForUser();
4313
4436
  } catch (r) {
4314
- throw ne(r), r;
4437
+ throw ee(r), r;
4315
4438
  }
4316
4439
  },
4317
4440
  enabled: !!t
@@ -4325,7 +4448,7 @@ function sa() {
4325
4448
  };
4326
4449
  }
4327
4450
  function ia() {
4328
- const { client: t } = He(), e = dt(), r = kr({
4451
+ const { client: t } = He(), e = dt(), r = _r({
4329
4452
  queryKey: ["folioUserMetadata"],
4330
4453
  queryFn: async () => {
4331
4454
  if (!t)
@@ -4336,11 +4459,11 @@ function ia() {
4336
4459
  try {
4337
4460
  return t.getUserMetadata();
4338
4461
  } catch (s) {
4339
- throw ne(s), s;
4462
+ throw ee(s), s;
4340
4463
  }
4341
4464
  },
4342
4465
  enabled: !!t
4343
- }), n = Kt({
4466
+ }), n = Vt({
4344
4467
  mutationFn: async (s) => {
4345
4468
  if (!t)
4346
4469
  throw de(
@@ -4351,7 +4474,7 @@ function ia() {
4351
4474
  const i = JSON.stringify(s);
4352
4475
  return t.updateUserMetadata(i);
4353
4476
  } catch (i) {
4354
- throw ne(i), i;
4477
+ throw ee(i), i;
4355
4478
  }
4356
4479
  },
4357
4480
  onSuccess: () => {
@@ -4370,7 +4493,7 @@ function ia() {
4370
4493
  };
4371
4494
  }
4372
4495
  function oa(t) {
4373
- const { client: e } = He(), r = kr({
4496
+ const { client: e } = He(), r = _r({
4374
4497
  queryKey: ["folioFiles", t],
4375
4498
  queryFn: async () => {
4376
4499
  if (!e)
@@ -4380,7 +4503,7 @@ function oa(t) {
4380
4503
  try {
4381
4504
  return e.getFilesForProject(t);
4382
4505
  } catch (n) {
4383
- throw ne(n), n;
4506
+ throw ee(n), n;
4384
4507
  }
4385
4508
  },
4386
4509
  enabled: !!e && !!t
@@ -4394,7 +4517,7 @@ function oa(t) {
4394
4517
  };
4395
4518
  }
4396
4519
  function aa() {
4397
- const { client: t } = He(), e = dt(), r = Kt({
4520
+ const { client: t } = He(), e = dt(), r = Vt({
4398
4521
  mutationFn: async (n) => {
4399
4522
  if (!t)
4400
4523
  throw de(
@@ -4404,7 +4527,7 @@ function aa() {
4404
4527
  try {
4405
4528
  return t.addProjectForUser(n);
4406
4529
  } catch (s) {
4407
- throw ne(s), s;
4530
+ throw ee(s), s;
4408
4531
  }
4409
4532
  },
4410
4533
  onSuccess: () => {
@@ -4421,7 +4544,7 @@ function aa() {
4421
4544
  };
4422
4545
  }
4423
4546
  function ua(t) {
4424
- const { client: e } = He(), r = dt(), n = Kt({
4547
+ const { client: e } = He(), r = dt(), n = Vt({
4425
4548
  mutationFn: async (s) => {
4426
4549
  if (!e)
4427
4550
  throw de(
@@ -4433,7 +4556,7 @@ function ua(t) {
4433
4556
  try {
4434
4557
  return e.addFilesToProject(t, s);
4435
4558
  } catch (i) {
4436
- throw ne(i), i;
4559
+ throw ee(i), i;
4437
4560
  }
4438
4561
  },
4439
4562
  onSuccess: () => {
@@ -4450,7 +4573,7 @@ function ua(t) {
4450
4573
  };
4451
4574
  }
4452
4575
  function ca(t) {
4453
- const { client: e } = He(), r = dt(), n = Kt({
4576
+ const { client: e } = He(), r = dt(), n = Vt({
4454
4577
  mutationFn: async (s) => {
4455
4578
  if (!e)
4456
4579
  throw de(
@@ -4463,20 +4586,30 @@ function ca(t) {
4463
4586
  "Project ID is required"
4464
4587
  );
4465
4588
  try {
4466
- const i = Array.isArray(s) ? s : [s], u = [];
4467
- for (const l of i) {
4468
- const c = JSON.stringify(l.directoryMetadata), h = await e.addDirectoryWithFilesToProject(
4589
+ const i = Array.isArray(s) ? s : [s];
4590
+ if (Array.isArray(s)) {
4591
+ const u = i.map((l) => ({
4592
+ directoryName: l.directoryName,
4593
+ directoryMetadata: JSON.stringify(l.directoryMetadata),
4594
+ files: l.files,
4595
+ userProvidedId: l.userProvidedId
4596
+ }));
4597
+ return await e.addDirectoriesWithFilesToProjectBatch(
4598
+ t,
4599
+ u
4600
+ );
4601
+ } else {
4602
+ const u = i[0], l = JSON.stringify(u.directoryMetadata), c = await e.addDirectoryWithFilesToProject(
4469
4603
  t,
4470
- l.directoryName,
4471
- c,
4472
- l.files,
4473
- l.userProvidedId
4604
+ u.directoryName,
4605
+ l,
4606
+ u.files,
4607
+ u.userProvidedId
4474
4608
  );
4475
- u.push(h);
4609
+ return Array.isArray(s) ? [c] : c;
4476
4610
  }
4477
- return Array.isArray(s) ? u : u[0];
4478
4611
  } catch (i) {
4479
- throw ne(i), i;
4612
+ throw ee(i), i;
4480
4613
  }
4481
4614
  },
4482
4615
  onSuccess: () => {