@shiftengineering/folio 0.0.80 → 0.0.82

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.
@@ -1,5 +1,5 @@
1
- import * as Er from "react";
2
- import bt, { createContext as Rr, useState as Ee, useEffect as Pr, useContext as Or } from "react";
1
+ import * as Et from "react";
2
+ import br, { createContext as Rt, useState as Ee, useEffect as Pt, useContext as Ot } from "react";
3
3
  var Re = { exports: {} }, Y = {};
4
4
  /**
5
5
  * @license React
@@ -10,19 +10,19 @@ var Re = { exports: {} }, Y = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var et;
14
- function Tr() {
15
- if (et) return Y;
16
- et = 1;
17
- var e = bt, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
13
+ var er;
14
+ function Tt() {
15
+ if (er) return Y;
16
+ er = 1;
17
+ var e = br, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
18
18
  function u(l, a, f) {
19
- var m, p = {}, h = null, b = null;
20
- f !== void 0 && (h = "" + f), a.key !== void 0 && (h = "" + a.key), a.ref !== void 0 && (b = a.ref);
21
- for (m in a) n.call(a, m) && !s.hasOwnProperty(m) && (p[m] = a[m]);
22
- if (l && l.defaultProps) for (m in a = l.defaultProps, a) p[m] === void 0 && (p[m] = a[m]);
23
- return { $$typeof: t, type: l, key: h, ref: b, props: p, _owner: i.current };
19
+ var d, p = {}, y = null, g = null;
20
+ f !== void 0 && (y = "" + f), a.key !== void 0 && (y = "" + a.key), a.ref !== void 0 && (g = a.ref);
21
+ for (d in a) n.call(a, d) && !s.hasOwnProperty(d) && (p[d] = a[d]);
22
+ if (l && l.defaultProps) for (d in a = l.defaultProps, a) p[d] === void 0 && (p[d] = a[d]);
23
+ return { $$typeof: r, type: l, key: y, ref: g, props: p, _owner: i.current };
24
24
  }
25
- return Y.Fragment = r, Y.jsx = u, Y.jsxs = u, Y;
25
+ return Y.Fragment = t, Y.jsx = u, Y.jsxs = u, Y;
26
26
  }
27
27
  var H = {};
28
28
  /**
@@ -34,64 +34,64 @@ var H = {};
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
36
  */
37
- var tt;
38
- function Sr() {
39
- return tt || (tt = 1, process.env.NODE_ENV !== "production" && function() {
40
- var e = bt, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), x = Symbol.iterator, R = "@@iterator";
37
+ var rr;
38
+ function St() {
39
+ return rr || (rr = 1, process.env.NODE_ENV !== "production" && function() {
40
+ var e = br, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), S = Symbol.iterator, R = "@@iterator";
41
41
  function L(o) {
42
42
  if (o === null || typeof o != "object")
43
43
  return null;
44
- var c = x && o[x] || o[R];
44
+ var c = S && o[S] || o[R];
45
45
  return typeof c == "function" ? c : null;
46
46
  }
47
47
  var j = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
- function S(o) {
48
+ function x(o) {
49
49
  {
50
- for (var c = arguments.length, d = new Array(c > 1 ? c - 1 : 0), y = 1; y < c; y++)
51
- d[y - 1] = arguments[y];
52
- Vt("error", o, d);
50
+ for (var c = arguments.length, m = new Array(c > 1 ? c - 1 : 0), h = 1; h < c; h++)
51
+ m[h - 1] = arguments[h];
52
+ Vr("error", o, m);
53
53
  }
54
54
  }
55
- function Vt(o, c, d) {
55
+ function Vr(o, c, m) {
56
56
  {
57
- var y = j.ReactDebugCurrentFrame, E = y.getStackAddendum();
58
- E !== "" && (c += "%s", d = d.concat([E]));
59
- var P = d.map(function(v) {
57
+ var h = j.ReactDebugCurrentFrame, E = h.getStackAddendum();
58
+ E !== "" && (c += "%s", m = m.concat([E]));
59
+ var P = m.map(function(v) {
60
60
  return String(v);
61
61
  });
62
62
  P.unshift("Warning: " + c), Function.prototype.apply.call(console[o], console, P);
63
63
  }
64
64
  }
65
- var qt = !1, zt = !1, Mt = !1, Wt = !1, Kt = !1, ke;
65
+ var qr = !1, zr = !1, Wr = !1, Mr = !1, Br = !1, ke;
66
66
  ke = Symbol.for("react.module.reference");
67
- function Bt(o) {
68
- return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || Kt || o === i || o === f || o === m || Wt || o === b || qt || zt || Mt || typeof o == "object" && o !== null && (o.$$typeof === h || o.$$typeof === p || o.$$typeof === u || o.$$typeof === l || o.$$typeof === a || // This needs to include all possible module reference object
67
+ function Kr(o) {
68
+ return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || Br || o === i || o === f || o === d || Mr || o === g || qr || zr || Wr || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === p || o.$$typeof === u || o.$$typeof === l || o.$$typeof === a || // This needs to include all possible module reference object
69
69
  // types supported by any Flight configuration anywhere since
70
70
  // we don't know which Flight build this will end up being used
71
71
  // with.
72
72
  o.$$typeof === ke || o.getModuleId !== void 0));
73
73
  }
74
- function Yt(o, c, d) {
75
- var y = o.displayName;
76
- if (y)
77
- return y;
74
+ function Yr(o, c, m) {
75
+ var h = o.displayName;
76
+ if (h)
77
+ return h;
78
78
  var E = c.displayName || c.name || "";
79
- return E !== "" ? d + "(" + E + ")" : d;
79
+ return E !== "" ? m + "(" + E + ")" : m;
80
80
  }
81
81
  function Ce(o) {
82
82
  return o.displayName || "Context";
83
83
  }
84
- function I(o) {
84
+ function A(o) {
85
85
  if (o == null)
86
86
  return null;
87
- if (typeof o.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
87
+ if (typeof o.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
88
88
  return o.displayName || o.name || null;
89
89
  if (typeof o == "string")
90
90
  return o;
91
91
  switch (o) {
92
92
  case n:
93
93
  return "Fragment";
94
- case r:
94
+ case t:
95
95
  return "Portal";
96
96
  case s:
97
97
  return "Profiler";
@@ -99,7 +99,7 @@ function Sr() {
99
99
  return "StrictMode";
100
100
  case f:
101
101
  return "Suspense";
102
- case m:
102
+ case d:
103
103
  return "SuspenseList";
104
104
  }
105
105
  if (typeof o == "object")
@@ -108,17 +108,17 @@ function Sr() {
108
108
  var c = o;
109
109
  return Ce(c) + ".Consumer";
110
110
  case u:
111
- var d = o;
112
- return Ce(d._context) + ".Provider";
111
+ var m = o;
112
+ return Ce(m._context) + ".Provider";
113
113
  case a:
114
- return Yt(o, o.render, "ForwardRef");
114
+ return Yr(o, o.render, "ForwardRef");
115
115
  case p:
116
- var y = o.displayName || null;
117
- return y !== null ? y : I(o.type) || "Memo";
118
- case h: {
116
+ var h = o.displayName || null;
117
+ return h !== null ? h : A(o.type) || "Memo";
118
+ case y: {
119
119
  var E = o, P = E._payload, v = E._init;
120
120
  try {
121
- return I(v(P));
121
+ return A(v(P));
122
122
  } catch {
123
123
  return null;
124
124
  }
@@ -126,14 +126,14 @@ function Sr() {
126
126
  }
127
127
  return null;
128
128
  }
129
- var N = Object.assign, K = 0, je, Ae, Ie, De, Fe, Ne, $e;
129
+ var N = Object.assign, B = 0, je, Ie, Ae, Fe, De, Ne, $e;
130
130
  function Ue() {
131
131
  }
132
132
  Ue.__reactDisabledLog = !0;
133
- function Ht() {
133
+ function Hr() {
134
134
  {
135
- if (K === 0) {
136
- je = console.log, Ae = console.info, Ie = console.warn, De = console.error, Fe = console.group, Ne = console.groupCollapsed, $e = console.groupEnd;
135
+ if (B === 0) {
136
+ je = console.log, Ie = console.info, Ae = console.warn, Fe = console.error, De = console.group, Ne = console.groupCollapsed, $e = console.groupEnd;
137
137
  var o = {
138
138
  configurable: !0,
139
139
  enumerable: !0,
@@ -150,12 +150,12 @@ function Sr() {
150
150
  groupEnd: o
151
151
  });
152
152
  }
153
- K++;
153
+ B++;
154
154
  }
155
155
  }
156
- function Gt() {
156
+ function Gr() {
157
157
  {
158
- if (K--, K === 0) {
158
+ if (B--, B === 0) {
159
159
  var o = {
160
160
  configurable: !0,
161
161
  enumerable: !0,
@@ -166,16 +166,16 @@ function Sr() {
166
166
  value: je
167
167
  }),
168
168
  info: N({}, o, {
169
- value: Ae
169
+ value: Ie
170
170
  }),
171
171
  warn: N({}, o, {
172
- value: Ie
172
+ value: Ae
173
173
  }),
174
174
  error: N({}, o, {
175
- value: De
175
+ value: Fe
176
176
  }),
177
177
  group: N({}, o, {
178
- value: Fe
178
+ value: De
179
179
  }),
180
180
  groupCollapsed: N({}, o, {
181
181
  value: Ne
@@ -185,42 +185,42 @@ function Sr() {
185
185
  })
186
186
  });
187
187
  }
188
- K < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ B < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
189
  }
190
190
  }
191
191
  var ue = j.ReactCurrentDispatcher, ce;
192
- function ee(o, c, d) {
192
+ function ee(o, c, m) {
193
193
  {
194
194
  if (ce === void 0)
195
195
  try {
196
196
  throw Error();
197
197
  } catch (E) {
198
- var y = E.stack.trim().match(/\n( *(at )?)/);
199
- ce = y && y[1] || "";
198
+ var h = E.stack.trim().match(/\n( *(at )?)/);
199
+ ce = h && h[1] || "";
200
200
  }
201
201
  return `
202
202
  ` + ce + o;
203
203
  }
204
204
  }
205
- var le = !1, te;
205
+ var le = !1, re;
206
206
  {
207
- var Xt = typeof WeakMap == "function" ? WeakMap : Map;
208
- te = new Xt();
207
+ var Xr = typeof WeakMap == "function" ? WeakMap : Map;
208
+ re = new Xr();
209
209
  }
210
210
  function Le(o, c) {
211
211
  if (!o || le)
212
212
  return "";
213
213
  {
214
- var d = te.get(o);
215
- if (d !== void 0)
216
- return d;
214
+ var m = re.get(o);
215
+ if (m !== void 0)
216
+ return m;
217
217
  }
218
- var y;
218
+ var h;
219
219
  le = !0;
220
220
  var E = Error.prepareStackTrace;
221
221
  Error.prepareStackTrace = void 0;
222
222
  var P;
223
- P = ue.current, ue.current = null, Ht();
223
+ P = ue.current, ue.current = null, Hr();
224
224
  try {
225
225
  if (c) {
226
226
  var v = function() {
@@ -234,14 +234,14 @@ function Sr() {
234
234
  try {
235
235
  Reflect.construct(v, []);
236
236
  } catch (k) {
237
- y = k;
237
+ h = k;
238
238
  }
239
239
  Reflect.construct(o, [], v);
240
240
  } else {
241
241
  try {
242
242
  v.call();
243
243
  } catch (k) {
244
- y = k;
244
+ h = k;
245
245
  }
246
246
  o.call(v.prototype);
247
247
  }
@@ -249,109 +249,109 @@ function Sr() {
249
249
  try {
250
250
  throw Error();
251
251
  } catch (k) {
252
- y = k;
252
+ h = k;
253
253
  }
254
254
  o();
255
255
  }
256
256
  } catch (k) {
257
- if (k && y && typeof k.stack == "string") {
258
- for (var g = k.stack.split(`
259
- `), _ = y.stack.split(`
260
- `), O = g.length - 1, T = _.length - 1; O >= 1 && T >= 0 && g[O] !== _[T]; )
257
+ if (k && h && typeof k.stack == "string") {
258
+ for (var b = k.stack.split(`
259
+ `), _ = h.stack.split(`
260
+ `), O = b.length - 1, T = _.length - 1; O >= 1 && T >= 0 && b[O] !== _[T]; )
261
261
  T--;
262
262
  for (; O >= 1 && T >= 0; O--, T--)
263
- if (g[O] !== _[T]) {
263
+ if (b[O] !== _[T]) {
264
264
  if (O !== 1 || T !== 1)
265
265
  do
266
- if (O--, T--, T < 0 || g[O] !== _[T]) {
266
+ if (O--, T--, T < 0 || b[O] !== _[T]) {
267
267
  var C = `
268
- ` + g[O].replace(" at new ", " at ");
269
- return o.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", o.displayName)), typeof o == "function" && te.set(o, C), C;
268
+ ` + b[O].replace(" at new ", " at ");
269
+ return o.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", o.displayName)), typeof o == "function" && re.set(o, C), C;
270
270
  }
271
271
  while (O >= 1 && T >= 0);
272
272
  break;
273
273
  }
274
274
  }
275
275
  } finally {
276
- le = !1, ue.current = P, Gt(), Error.prepareStackTrace = E;
276
+ le = !1, ue.current = P, Gr(), Error.prepareStackTrace = E;
277
277
  }
278
278
  var q = o ? o.displayName || o.name : "", $ = q ? ee(q) : "";
279
- return typeof o == "function" && te.set(o, $), $;
279
+ return typeof o == "function" && re.set(o, $), $;
280
280
  }
281
- function Jt(o, c, d) {
281
+ function Jr(o, c, m) {
282
282
  return Le(o, !1);
283
283
  }
284
- function Zt(o) {
284
+ function Zr(o) {
285
285
  var c = o.prototype;
286
286
  return !!(c && c.isReactComponent);
287
287
  }
288
- function re(o, c, d) {
288
+ function te(o, c, m) {
289
289
  if (o == null)
290
290
  return "";
291
291
  if (typeof o == "function")
292
- return Le(o, Zt(o));
292
+ return Le(o, Zr(o));
293
293
  if (typeof o == "string")
294
294
  return ee(o);
295
295
  switch (o) {
296
296
  case f:
297
297
  return ee("Suspense");
298
- case m:
298
+ case d:
299
299
  return ee("SuspenseList");
300
300
  }
301
301
  if (typeof o == "object")
302
302
  switch (o.$$typeof) {
303
303
  case a:
304
- return Jt(o.render);
304
+ return Jr(o.render);
305
305
  case p:
306
- return re(o.type, c, d);
307
- case h: {
308
- var y = o, E = y._payload, P = y._init;
306
+ return te(o.type, c, m);
307
+ case y: {
308
+ var h = o, E = h._payload, P = h._init;
309
309
  try {
310
- return re(P(E), c, d);
310
+ return te(P(E), c, m);
311
311
  } catch {
312
312
  }
313
313
  }
314
314
  }
315
315
  return "";
316
316
  }
317
- var B = Object.prototype.hasOwnProperty, Ve = {}, qe = j.ReactDebugCurrentFrame;
317
+ var K = Object.prototype.hasOwnProperty, Ve = {}, qe = j.ReactDebugCurrentFrame;
318
318
  function ne(o) {
319
319
  if (o) {
320
- var c = o._owner, d = re(o.type, o._source, c ? c.type : null);
321
- qe.setExtraStackFrame(d);
320
+ var c = o._owner, m = te(o.type, o._source, c ? c.type : null);
321
+ qe.setExtraStackFrame(m);
322
322
  } else
323
323
  qe.setExtraStackFrame(null);
324
324
  }
325
- function Qt(o, c, d, y, E) {
325
+ function Qr(o, c, m, h, E) {
326
326
  {
327
- var P = Function.call.bind(B);
327
+ var P = Function.call.bind(K);
328
328
  for (var v in o)
329
329
  if (P(o, v)) {
330
- var g = void 0;
330
+ var b = void 0;
331
331
  try {
332
332
  if (typeof o[v] != "function") {
333
- var _ = Error((y || "React class") + ": " + d + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ var _ = Error((h || "React class") + ": " + m + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
334
  throw _.name = "Invariant Violation", _;
335
335
  }
336
- g = o[v](c, v, y, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
+ b = o[v](c, v, h, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
337
  } catch (O) {
338
- g = O;
338
+ b = O;
339
339
  }
340
- g && !(g instanceof Error) && (ne(E), S("%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).", y || "React class", d, v, typeof g), ne(null)), g instanceof Error && !(g.message in Ve) && (Ve[g.message] = !0, ne(E), S("Failed %s type: %s", d, g.message), ne(null));
340
+ b && !(b instanceof Error) && (ne(E), x("%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).", h || "React class", m, v, typeof b), ne(null)), b instanceof Error && !(b.message in Ve) && (Ve[b.message] = !0, ne(E), x("Failed %s type: %s", m, b.message), ne(null));
341
341
  }
342
342
  }
343
343
  }
344
- var er = Array.isArray;
344
+ var et = Array.isArray;
345
345
  function fe(o) {
346
- return er(o);
346
+ return et(o);
347
347
  }
348
- function tr(o) {
348
+ function rt(o) {
349
349
  {
350
- var c = typeof Symbol == "function" && Symbol.toStringTag, d = c && o[Symbol.toStringTag] || o.constructor.name || "Object";
351
- return d;
350
+ var c = typeof Symbol == "function" && Symbol.toStringTag, m = c && o[Symbol.toStringTag] || o.constructor.name || "Object";
351
+ return m;
352
352
  }
353
353
  }
354
- function rr(o) {
354
+ function tt(o) {
355
355
  try {
356
356
  return ze(o), !1;
357
357
  } catch {
@@ -361,121 +361,121 @@ function Sr() {
361
361
  function ze(o) {
362
362
  return "" + o;
363
363
  }
364
- function Me(o) {
365
- if (rr(o))
366
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tr(o)), ze(o);
364
+ function We(o) {
365
+ if (tt(o))
366
+ return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rt(o)), ze(o);
367
367
  }
368
- var We = j.ReactCurrentOwner, nr = {
368
+ var Me = j.ReactCurrentOwner, nt = {
369
369
  key: !0,
370
370
  ref: !0,
371
371
  __self: !0,
372
372
  __source: !0
373
- }, Ke, Be;
374
- function or(o) {
375
- if (B.call(o, "ref")) {
373
+ }, Be, Ke;
374
+ function ot(o) {
375
+ if (K.call(o, "ref")) {
376
376
  var c = Object.getOwnPropertyDescriptor(o, "ref").get;
377
377
  if (c && c.isReactWarning)
378
378
  return !1;
379
379
  }
380
380
  return o.ref !== void 0;
381
381
  }
382
- function ir(o) {
383
- if (B.call(o, "key")) {
382
+ function it(o) {
383
+ if (K.call(o, "key")) {
384
384
  var c = Object.getOwnPropertyDescriptor(o, "key").get;
385
385
  if (c && c.isReactWarning)
386
386
  return !1;
387
387
  }
388
388
  return o.key !== void 0;
389
389
  }
390
- function sr(o, c) {
391
- typeof o.ref == "string" && We.current;
390
+ function st(o, c) {
391
+ typeof o.ref == "string" && Me.current;
392
392
  }
393
- function ar(o, c) {
393
+ function at(o, c) {
394
394
  {
395
- var d = function() {
396
- Ke || (Ke = !0, S("%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)", c));
395
+ var m = function() {
396
+ Be || (Be = !0, x("%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)", c));
397
397
  };
398
- d.isReactWarning = !0, Object.defineProperty(o, "key", {
399
- get: d,
398
+ m.isReactWarning = !0, Object.defineProperty(o, "key", {
399
+ get: m,
400
400
  configurable: !0
401
401
  });
402
402
  }
403
403
  }
404
- function ur(o, c) {
404
+ function ut(o, c) {
405
405
  {
406
- var d = function() {
407
- Be || (Be = !0, S("%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)", c));
406
+ var m = function() {
407
+ Ke || (Ke = !0, x("%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)", c));
408
408
  };
409
- d.isReactWarning = !0, Object.defineProperty(o, "ref", {
410
- get: d,
409
+ m.isReactWarning = !0, Object.defineProperty(o, "ref", {
410
+ get: m,
411
411
  configurable: !0
412
412
  });
413
413
  }
414
414
  }
415
- var cr = function(o, c, d, y, E, P, v) {
416
- var g = {
415
+ var ct = function(o, c, m, h, E, P, v) {
416
+ var b = {
417
417
  // This tag allows us to uniquely identify this as a React Element
418
- $$typeof: t,
418
+ $$typeof: r,
419
419
  // Built-in properties that belong on the element
420
420
  type: o,
421
421
  key: c,
422
- ref: d,
422
+ ref: m,
423
423
  props: v,
424
424
  // Record the component responsible for creating this element.
425
425
  _owner: P
426
426
  };
427
- return g._store = {}, Object.defineProperty(g._store, "validated", {
427
+ return b._store = {}, Object.defineProperty(b._store, "validated", {
428
428
  configurable: !1,
429
429
  enumerable: !1,
430
430
  writable: !0,
431
431
  value: !1
432
- }), Object.defineProperty(g, "_self", {
432
+ }), Object.defineProperty(b, "_self", {
433
433
  configurable: !1,
434
434
  enumerable: !1,
435
435
  writable: !1,
436
- value: y
437
- }), Object.defineProperty(g, "_source", {
436
+ value: h
437
+ }), Object.defineProperty(b, "_source", {
438
438
  configurable: !1,
439
439
  enumerable: !1,
440
440
  writable: !1,
441
441
  value: E
442
- }), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
442
+ }), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
443
443
  };
444
- function lr(o, c, d, y, E) {
444
+ function lt(o, c, m, h, E) {
445
445
  {
446
- var P, v = {}, g = null, _ = null;
447
- d !== void 0 && (Me(d), g = "" + d), ir(c) && (Me(c.key), g = "" + c.key), or(c) && (_ = c.ref, sr(c, E));
446
+ var P, v = {}, b = null, _ = null;
447
+ m !== void 0 && (We(m), b = "" + m), it(c) && (We(c.key), b = "" + c.key), ot(c) && (_ = c.ref, st(c, E));
448
448
  for (P in c)
449
- B.call(c, P) && !nr.hasOwnProperty(P) && (v[P] = c[P]);
449
+ K.call(c, P) && !nt.hasOwnProperty(P) && (v[P] = c[P]);
450
450
  if (o && o.defaultProps) {
451
451
  var O = o.defaultProps;
452
452
  for (P in O)
453
453
  v[P] === void 0 && (v[P] = O[P]);
454
454
  }
455
- if (g || _) {
455
+ if (b || _) {
456
456
  var T = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
457
- g && ar(v, T), _ && ur(v, T);
457
+ b && at(v, T), _ && ut(v, T);
458
458
  }
459
- return cr(o, g, _, E, y, We.current, v);
459
+ return ct(o, b, _, E, h, Me.current, v);
460
460
  }
461
461
  }
462
462
  var de = j.ReactCurrentOwner, Ye = j.ReactDebugCurrentFrame;
463
463
  function V(o) {
464
464
  if (o) {
465
- var c = o._owner, d = re(o.type, o._source, c ? c.type : null);
466
- Ye.setExtraStackFrame(d);
465
+ var c = o._owner, m = te(o.type, o._source, c ? c.type : null);
466
+ Ye.setExtraStackFrame(m);
467
467
  } else
468
468
  Ye.setExtraStackFrame(null);
469
469
  }
470
470
  var me;
471
471
  me = !1;
472
472
  function pe(o) {
473
- return typeof o == "object" && o !== null && o.$$typeof === t;
473
+ return typeof o == "object" && o !== null && o.$$typeof === r;
474
474
  }
475
475
  function He() {
476
476
  {
477
477
  if (de.current) {
478
- var o = I(de.current.type);
478
+ var o = A(de.current.type);
479
479
  if (o)
480
480
  return `
481
481
 
@@ -484,18 +484,18 @@ Check the render method of \`` + o + "`.";
484
484
  return "";
485
485
  }
486
486
  }
487
- function fr(o) {
487
+ function ft(o) {
488
488
  return "";
489
489
  }
490
490
  var Ge = {};
491
- function dr(o) {
491
+ function dt(o) {
492
492
  {
493
493
  var c = He();
494
494
  if (!c) {
495
- var d = typeof o == "string" ? o : o.displayName || o.name;
496
- d && (c = `
495
+ var m = typeof o == "string" ? o : o.displayName || o.name;
496
+ m && (c = `
497
497
 
498
- Check the top-level render call using <` + d + ">.");
498
+ Check the top-level render call using <` + m + ">.");
499
499
  }
500
500
  return c;
501
501
  }
@@ -505,12 +505,12 @@ Check the top-level render call using <` + d + ">.");
505
505
  if (!o._store || o._store.validated || o.key != null)
506
506
  return;
507
507
  o._store.validated = !0;
508
- var d = dr(c);
509
- if (Ge[d])
508
+ var m = dt(c);
509
+ if (Ge[m])
510
510
  return;
511
- Ge[d] = !0;
512
- var y = "";
513
- o && o._owner && o._owner !== de.current && (y = " It was passed a child from " + I(o._owner.type) + "."), V(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, y), V(null);
511
+ Ge[m] = !0;
512
+ var h = "";
513
+ o && o._owner && o._owner !== de.current && (h = " It was passed a child from " + A(o._owner.type) + "."), V(o), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, h), V(null);
514
514
  }
515
515
  }
516
516
  function Je(o, c) {
@@ -518,9 +518,9 @@ Check the top-level render call using <` + d + ">.");
518
518
  if (typeof o != "object")
519
519
  return;
520
520
  if (fe(o))
521
- for (var d = 0; d < o.length; d++) {
522
- var y = o[d];
523
- pe(y) && Xe(y, c);
521
+ for (var m = 0; m < o.length; m++) {
522
+ var h = o[m];
523
+ pe(h) && Xe(h, c);
524
524
  }
525
525
  else if (pe(o))
526
526
  o._store && (o._store.validated = !0);
@@ -532,113 +532,113 @@ Check the top-level render call using <` + d + ">.");
532
532
  }
533
533
  }
534
534
  }
535
- function mr(o) {
535
+ function mt(o) {
536
536
  {
537
537
  var c = o.type;
538
538
  if (c == null || typeof c == "string")
539
539
  return;
540
- var d;
540
+ var m;
541
541
  if (typeof c == "function")
542
- d = c.propTypes;
542
+ m = c.propTypes;
543
543
  else if (typeof c == "object" && (c.$$typeof === a || // Note: Memo only checks outer props here.
544
544
  // Inner props are checked in the reconciler.
545
545
  c.$$typeof === p))
546
- d = c.propTypes;
546
+ m = c.propTypes;
547
547
  else
548
548
  return;
549
- if (d) {
550
- var y = I(c);
551
- Qt(d, o.props, "prop", y, o);
549
+ if (m) {
550
+ var h = A(c);
551
+ Qr(m, o.props, "prop", h, o);
552
552
  } else if (c.PropTypes !== void 0 && !me) {
553
553
  me = !0;
554
- var E = I(c);
555
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
554
+ var E = A(c);
555
+ x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
556
556
  }
557
- typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
+ typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
558
558
  }
559
559
  }
560
- function pr(o) {
560
+ function pt(o) {
561
561
  {
562
- for (var c = Object.keys(o.props), d = 0; d < c.length; d++) {
563
- var y = c[d];
564
- if (y !== "children" && y !== "key") {
565
- V(o), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), V(null);
562
+ for (var c = Object.keys(o.props), m = 0; m < c.length; m++) {
563
+ var h = c[m];
564
+ if (h !== "children" && h !== "key") {
565
+ V(o), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), V(null);
566
566
  break;
567
567
  }
568
568
  }
569
- o.ref !== null && (V(o), S("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
569
+ o.ref !== null && (V(o), x("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
570
570
  }
571
571
  }
572
572
  var Ze = {};
573
- function Qe(o, c, d, y, E, P) {
573
+ function Qe(o, c, m, h, E, P) {
574
574
  {
575
- var v = Bt(o);
575
+ var v = Kr(o);
576
576
  if (!v) {
577
- var g = "";
578
- (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
- var _ = fr();
580
- _ ? g += _ : g += He();
577
+ var b = "";
578
+ (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
+ var _ = ft();
580
+ _ ? b += _ : b += He();
581
581
  var O;
582
- o === null ? O = "null" : fe(o) ? O = "array" : o !== void 0 && o.$$typeof === t ? (O = "<" + (I(o.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : O = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, g);
582
+ o === null ? O = "null" : fe(o) ? O = "array" : o !== void 0 && o.$$typeof === r ? (O = "<" + (A(o.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : O = typeof o, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, b);
583
583
  }
584
- var T = lr(o, c, d, E, P);
584
+ var T = lt(o, c, m, E, P);
585
585
  if (T == null)
586
586
  return T;
587
587
  if (v) {
588
588
  var C = c.children;
589
589
  if (C !== void 0)
590
- if (y)
590
+ if (h)
591
591
  if (fe(C)) {
592
592
  for (var q = 0; q < C.length; q++)
593
593
  Je(C[q], o);
594
594
  Object.freeze && Object.freeze(C);
595
595
  } else
596
- S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
+ x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
597
597
  else
598
598
  Je(C, o);
599
599
  }
600
- if (B.call(c, "key")) {
601
- var $ = I(o), k = Object.keys(c).filter(function(vr) {
602
- return vr !== "key";
600
+ if (K.call(c, "key")) {
601
+ var $ = A(o), k = Object.keys(c).filter(function(vt) {
602
+ return vt !== "key";
603
603
  }), ye = k.length > 0 ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}";
604
604
  if (!Ze[$ + ye]) {
605
- var wr = k.length > 0 ? "{" + k.join(": ..., ") + ": ...}" : "{}";
606
- S(`A props object containing a "key" prop is being spread into JSX:
605
+ var wt = k.length > 0 ? "{" + k.join(": ..., ") + ": ...}" : "{}";
606
+ x(`A props object containing a "key" prop is being spread into JSX:
607
607
  let props = %s;
608
608
  <%s {...props} />
609
609
  React keys must be passed directly to JSX without using spread:
610
610
  let props = %s;
611
- <%s key={someKey} {...props} />`, ye, $, wr, $), Ze[$ + ye] = !0;
611
+ <%s key={someKey} {...props} />`, ye, $, wt, $), Ze[$ + ye] = !0;
612
612
  }
613
613
  }
614
- return o === n ? pr(T) : mr(T), T;
614
+ return o === n ? pt(T) : mt(T), T;
615
615
  }
616
616
  }
617
- function yr(o, c, d) {
618
- return Qe(o, c, d, !0);
617
+ function yt(o, c, m) {
618
+ return Qe(o, c, m, !0);
619
619
  }
620
- function hr(o, c, d) {
621
- return Qe(o, c, d, !1);
620
+ function ht(o, c, m) {
621
+ return Qe(o, c, m, !1);
622
622
  }
623
- var gr = hr, br = yr;
624
- H.Fragment = n, H.jsx = gr, H.jsxs = br;
623
+ var gt = ht, bt = yt;
624
+ H.Fragment = n, H.jsx = gt, H.jsxs = bt;
625
625
  }()), H;
626
626
  }
627
- process.env.NODE_ENV === "production" ? Re.exports = Tr() : Re.exports = Sr();
628
- var Pe = Re.exports, wt = /* @__PURE__ */ ((e) => (e.NOT_CHUNKED = "NOT_CHUNKED", e.CHUNKED = "CHUNKED", e.ERROR_CHUNKING = "ERROR_CHUNKING", e))(wt || {}), _e = /* @__PURE__ */ ((e) => (e.PDF = "application/pdf", e.TXT = "text/plain", e.CSV = "text/csv", e))(_e || {});
629
- const he = 4e3 * 1024 * 1024, xr = [
627
+ process.env.NODE_ENV === "production" ? Re.exports = Tt() : Re.exports = St();
628
+ var Pe = Re.exports, wr = /* @__PURE__ */ ((e) => (e.NOT_CHUNKED = "NOT_CHUNKED", e.PROCESSING = "PROCESSING", e.CHUNKED = "CHUNKED", e.ERROR_CHUNKING = "ERROR_CHUNKING", e))(wr || {}), _e = /* @__PURE__ */ ((e) => (e.PDF = "application/pdf", e.TXT = "text/plain", e.CSV = "text/csv", e))(_e || {});
629
+ const he = 4e3 * 1024 * 1024, xt = [
630
630
  ".txt",
631
631
  ".json",
632
632
  ".py",
633
633
  ".ts",
634
634
  ".tsx"
635
- ], _r = {
635
+ ], _t = {
636
636
  "application/pdf": {
637
637
  extensions: [".pdf"],
638
638
  maxSize: he
639
639
  },
640
640
  "text/plain": {
641
- extensions: xr,
641
+ extensions: xt,
642
642
  maxSize: he
643
643
  },
644
644
  "text/csv": {
@@ -646,17 +646,17 @@ const he = 4e3 * 1024 * 1024, xr = [
646
646
  maxSize: he
647
647
  }
648
648
  };
649
- Object.entries(_r).reduce(
650
- (e, [t, r]) => ({
649
+ Object.entries(_t).reduce(
650
+ (e, [r, t]) => ({
651
651
  ...e,
652
- [t]: r.extensions
652
+ [r]: t.extensions
653
653
  }),
654
654
  {}
655
655
  );
656
656
  new Set(Object.values(_e));
657
- function W(e) {
658
- const t = {
659
- subscribe(r) {
657
+ function M(e) {
658
+ const r = {
659
+ subscribe(t) {
660
660
  let n = null, i = !1, s = !1, u = !1;
661
661
  function l() {
662
662
  if (n === null) {
@@ -668,38 +668,38 @@ function W(e) {
668
668
  return n = e({
669
669
  next(a) {
670
670
  var f;
671
- i || (f = r.next) == null || f.call(r, a);
671
+ i || (f = t.next) == null || f.call(t, a);
672
672
  },
673
673
  error(a) {
674
674
  var f;
675
- i || (i = !0, (f = r.error) == null || f.call(r, a), l());
675
+ i || (i = !0, (f = t.error) == null || f.call(t, a), l());
676
676
  },
677
677
  complete() {
678
678
  var a;
679
- i || (i = !0, (a = r.complete) == null || a.call(r), l());
679
+ i || (i = !0, (a = t.complete) == null || a.call(t), l());
680
680
  }
681
681
  }), u && l(), {
682
682
  unsubscribe: l
683
683
  };
684
684
  },
685
- pipe(...r) {
686
- return r.reduce(kr, t);
685
+ pipe(...t) {
686
+ return t.reduce(kt, r);
687
687
  }
688
688
  };
689
- return t;
689
+ return r;
690
690
  }
691
- function kr(e, t) {
692
- return t(e);
691
+ function kt(e, r) {
692
+ return r(e);
693
693
  }
694
- function Cr(e) {
695
- const t = new AbortController();
694
+ function Ct(e) {
695
+ const r = new AbortController();
696
696
  return new Promise((n, i) => {
697
697
  let s = !1;
698
698
  function u() {
699
699
  s || (s = !0, l.unsubscribe());
700
700
  }
701
- t.signal.addEventListener("abort", () => {
702
- i(t.signal.reason);
701
+ r.signal.addEventListener("abort", () => {
702
+ i(r.signal.reason);
703
703
  });
704
704
  const l = e.subscribe({
705
705
  next(a) {
@@ -709,17 +709,17 @@ function Cr(e) {
709
709
  i(a);
710
710
  },
711
711
  complete() {
712
- t.abort(), u();
712
+ r.abort(), u();
713
713
  }
714
714
  });
715
715
  });
716
716
  }
717
- function jr(e) {
718
- return (t) => {
719
- let r = 0, n = null;
717
+ function jt(e) {
718
+ return (r) => {
719
+ let t = 0, n = null;
720
720
  const i = [];
721
721
  function s() {
722
- n || (n = t.subscribe({
722
+ n || (n = r.subscribe({
723
723
  next(l) {
724
724
  var a;
725
725
  for (const f of i)
@@ -738,114 +738,114 @@ function jr(e) {
738
738
  }));
739
739
  }
740
740
  function u() {
741
- if (r === 0 && n) {
741
+ if (t === 0 && n) {
742
742
  const l = n;
743
743
  n = null, l.unsubscribe();
744
744
  }
745
745
  }
746
- return W((l) => (r++, i.push(l), s(), {
746
+ return M((l) => (t++, i.push(l), s(), {
747
747
  unsubscribe() {
748
- r--, u();
748
+ t--, u();
749
749
  const a = i.findIndex((f) => f === l);
750
750
  a > -1 && i.splice(a, 1);
751
751
  }
752
752
  }));
753
753
  };
754
754
  }
755
- function Ar(e) {
756
- return (t) => W((r) => t.subscribe({
755
+ function It(e) {
756
+ return (r) => M((t) => r.subscribe({
757
757
  next(n) {
758
758
  var i;
759
- (i = e.next) == null || i.call(e, n), r.next(n);
759
+ (i = e.next) == null || i.call(e, n), t.next(n);
760
760
  },
761
761
  error(n) {
762
762
  var i;
763
- (i = e.error) == null || i.call(e, n), r.error(n);
763
+ (i = e.error) == null || i.call(e, n), t.error(n);
764
764
  },
765
765
  complete() {
766
766
  var n;
767
- (n = e.complete) == null || n.call(e), r.complete();
767
+ (n = e.complete) == null || n.call(e), t.complete();
768
768
  }
769
769
  }));
770
770
  }
771
- function Ir(e) {
772
- let t = e;
773
- const r = [], n = (u) => {
774
- t !== void 0 && u.next(t), r.push(u);
771
+ function At(e) {
772
+ let r = e;
773
+ const t = [], n = (u) => {
774
+ r !== void 0 && u.next(r), t.push(u);
775
775
  }, i = (u) => {
776
- r.splice(r.indexOf(u), 1);
777
- }, s = W((u) => (n(u), () => {
776
+ t.splice(t.indexOf(u), 1);
777
+ }, s = M((u) => (n(u), () => {
778
778
  i(u);
779
779
  }));
780
780
  return s.next = (u) => {
781
- if (t !== u) {
782
- t = u;
783
- for (const l of r)
781
+ if (r !== u) {
782
+ r = u;
783
+ for (const l of t)
784
784
  l.next(u);
785
785
  }
786
- }, s.get = () => t, s;
786
+ }, s.get = () => r, s;
787
787
  }
788
- function Dr(e) {
789
- return W((t) => {
790
- function r(i = 0, s = e.op) {
788
+ function Ft(e) {
789
+ return M((r) => {
790
+ function t(i = 0, s = e.op) {
791
791
  const u = e.links[i];
792
792
  if (!u)
793
793
  throw new Error("No more links to execute - did you forget to add an ending link?");
794
794
  return u({
795
795
  op: s,
796
796
  next(a) {
797
- return r(i + 1, a);
797
+ return t(i + 1, a);
798
798
  }
799
799
  });
800
800
  }
801
- return r().subscribe(t);
801
+ return t().subscribe(r);
802
802
  });
803
803
  }
804
- const vt = () => {
805
- }, rt = (e) => {
804
+ const vr = () => {
805
+ }, tr = (e) => {
806
806
  Object.freeze && Object.freeze(e);
807
807
  };
808
- function Et(e, t, r) {
808
+ function Er(e, r, t) {
809
809
  var n, i;
810
- const s = t.join(".");
811
- return (n = r)[i = s] ?? (n[i] = new Proxy(vt, {
810
+ const s = r.join(".");
811
+ return (n = t)[i = s] ?? (n[i] = new Proxy(vr, {
812
812
  get(u, l) {
813
813
  if (!(typeof l != "string" || l === "then"))
814
- return Et(e, [
815
- ...t,
814
+ return Er(e, [
815
+ ...r,
816
816
  l
817
- ], r);
817
+ ], t);
818
818
  },
819
819
  apply(u, l, a) {
820
- const f = t[t.length - 1];
821
- let m = {
820
+ const f = r[r.length - 1];
821
+ let d = {
822
822
  args: a,
823
- path: t
823
+ path: r
824
824
  };
825
- return f === "call" ? m = {
825
+ return f === "call" ? d = {
826
826
  args: a.length >= 2 ? [
827
827
  a[1]
828
828
  ] : [],
829
- path: t.slice(0, -1)
830
- } : f === "apply" && (m = {
829
+ path: r.slice(0, -1)
830
+ } : f === "apply" && (d = {
831
831
  args: a.length >= 2 ? a[1] : [],
832
- path: t.slice(0, -1)
833
- }), rt(m.args), rt(m.path), e(m);
832
+ path: r.slice(0, -1)
833
+ }), tr(d.args), tr(d.path), e(d);
834
834
  }
835
- })), r[s];
835
+ })), t[s];
836
836
  }
837
- const Fr = (e) => Et(e, [], /* @__PURE__ */ Object.create(null)), Nr = (e) => new Proxy(vt, {
838
- get(t, r) {
839
- if (r !== "then")
840
- return e(r);
837
+ const Dt = (e) => Er(e, [], /* @__PURE__ */ Object.create(null)), Nt = (e) => new Proxy(vr, {
838
+ get(r, t) {
839
+ if (t !== "then")
840
+ return e(t);
841
841
  }
842
842
  });
843
843
  function X(e) {
844
844
  return !!e && !Array.isArray(e) && typeof e == "object";
845
845
  }
846
- function $r(e, t) {
846
+ function $t(e, r) {
847
847
  if ("error" in e) {
848
- const n = t.deserialize(e.error);
848
+ const n = r.deserialize(e.error);
849
849
  return {
850
850
  ok: !1,
851
851
  error: {
@@ -860,7 +860,7 @@ function $r(e, t) {
860
860
  ...e.result,
861
861
  ...(!e.result.type || e.result.type === "data") && {
862
862
  type: "data",
863
- data: t.deserialize(e.result.data)
863
+ data: r.deserialize(e.result.data)
864
864
  }
865
865
  }
866
866
  };
@@ -870,64 +870,64 @@ class ge extends Error {
870
870
  super("Unable to transform response from server");
871
871
  }
872
872
  }
873
- function Ur(e, t) {
874
- let r;
873
+ function Ut(e, r) {
874
+ let t;
875
875
  try {
876
- r = $r(e, t);
876
+ t = $t(e, r);
877
877
  } catch {
878
878
  throw new ge();
879
879
  }
880
- if (!r.ok && (!X(r.error.error) || typeof r.error.error.code != "number"))
880
+ if (!t.ok && (!X(t.error.error) || typeof t.error.error.code != "number"))
881
881
  throw new ge();
882
- if (r.ok && !X(r.result))
882
+ if (t.ok && !X(t.result))
883
883
  throw new ge();
884
- return r;
884
+ return t;
885
885
  }
886
- var nt, ot;
887
- (nt = Symbol).dispose ?? (nt.dispose = Symbol());
888
- (ot = Symbol).asyncDispose ?? (ot.asyncDispose = Symbol());
889
- var dt, mt, pt, yt, ht, gt;
886
+ var nr, or;
887
+ (nr = Symbol).dispose ?? (nr.dispose = Symbol());
888
+ (or = Symbol).asyncDispose ?? (or.asyncDispose = Symbol());
889
+ var dr, mr, pr, yr, hr, gr;
890
890
  typeof window > "u" || "Deno" in window || // eslint-disable-next-line @typescript-eslint/dot-notation
891
- ((mt = (dt = globalThis.process) == null ? void 0 : dt.env) == null ? void 0 : mt.NODE_ENV) === "test" || (yt = (pt = globalThis.process) == null ? void 0 : pt.env) != null && yt.JEST_WORKER_ID || (gt = (ht = globalThis.process) == null ? void 0 : ht.env) != null && gt.VITEST_WORKER_ID;
892
- function oe(e, t, r) {
893
- return t in e ? Object.defineProperty(e, t, {
894
- value: r,
891
+ ((mr = (dr = globalThis.process) == null ? void 0 : dr.env) == null ? void 0 : mr.NODE_ENV) === "test" || (yr = (pr = globalThis.process) == null ? void 0 : pr.env) != null && yr.JEST_WORKER_ID || (gr = (hr = globalThis.process) == null ? void 0 : hr.env) != null && gr.VITEST_WORKER_ID;
892
+ function oe(e, r, t) {
893
+ return r in e ? Object.defineProperty(e, r, {
894
+ value: t,
895
895
  enumerable: !0,
896
896
  configurable: !0,
897
897
  writable: !0
898
- }) : e[t] = r, e;
898
+ }) : e[r] = t, e;
899
899
  }
900
- function Lr(e) {
901
- return e instanceof D || /**
900
+ function Lt(e) {
901
+ return e instanceof F || /**
902
902
  * @deprecated
903
903
  * Delete in next major
904
904
  */
905
905
  e instanceof Error && e.name === "TRPCClientError";
906
906
  }
907
- function Vr(e) {
907
+ function Vt(e) {
908
908
  return X(e) && X(e.error) && typeof e.error.code == "number" && typeof e.error.message == "string";
909
909
  }
910
- function qr(e, t) {
911
- return typeof e == "string" ? e : X(e) && typeof e.message == "string" ? e.message : t;
910
+ function qt(e, r) {
911
+ return typeof e == "string" ? e : X(e) && typeof e.message == "string" ? e.message : r;
912
912
  }
913
- class D extends Error {
914
- static from(t, r = {}) {
915
- const n = t;
916
- return Lr(n) ? (r.meta && (n.meta = {
913
+ class F extends Error {
914
+ static from(r, t = {}) {
915
+ const n = r;
916
+ return Lt(n) ? (t.meta && (n.meta = {
917
917
  ...n.meta,
918
- ...r.meta
919
- }), n) : Vr(n) ? new D(n.error.message, {
920
- ...r,
918
+ ...t.meta
919
+ }), n) : Vt(n) ? new F(n.error.message, {
920
+ ...t,
921
921
  result: n
922
- }) : new D(qr(n, "Unknown error"), {
923
- ...r,
922
+ }) : new F(qt(n, "Unknown error"), {
923
+ ...t,
924
924
  cause: n
925
925
  });
926
926
  }
927
- constructor(t, r) {
927
+ constructor(r, t) {
928
928
  var i, s;
929
- const n = r == null ? void 0 : r.cause;
930
- super(t, {
929
+ const n = t == null ? void 0 : t.cause;
930
+ super(r, {
931
931
  cause: n
932
932
  }), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
933
933
  // @ts-ignore override doesn't work in all environments due to "This member cannot have an 'override' modifier because it is not declared in the base class 'Error'"
@@ -935,59 +935,59 @@ class D extends Error {
935
935
  * Additional meta data about the error
936
936
  * In the case of HTTP-errors, we'll have `response` and potentially `responseJSON` here
937
937
  */
938
- oe(this, "meta", void 0), this.meta = r == null ? void 0 : r.meta, this.cause = n, this.shape = (i = r == null ? void 0 : r.result) == null ? void 0 : i.error, this.data = (s = r == null ? void 0 : r.result) == null ? void 0 : s.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, D.prototype);
938
+ oe(this, "meta", void 0), this.meta = t == null ? void 0 : t.meta, this.cause = n, this.shape = (i = t == null ? void 0 : t.result) == null ? void 0 : i.error, this.data = (s = t == null ? void 0 : t.result) == null ? void 0 : s.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, F.prototype);
939
939
  }
940
940
  }
941
- function be(e, t, r) {
942
- return t in e ? Object.defineProperty(e, t, {
943
- value: r,
941
+ function be(e, r, t) {
942
+ return r in e ? Object.defineProperty(e, r, {
943
+ value: t,
944
944
  enumerable: !0,
945
945
  configurable: !0,
946
946
  writable: !0
947
- }) : e[t] = r, e;
947
+ }) : e[r] = t, e;
948
948
  }
949
- class zr {
950
- $request(t) {
951
- return Dr({
949
+ class zt {
950
+ $request(r) {
951
+ return Ft({
952
952
  links: this.links,
953
953
  op: {
954
- ...t,
955
- context: t.context ?? {},
954
+ ...r,
955
+ context: r.context ?? {},
956
956
  id: ++this.requestId
957
957
  }
958
- }).pipe(jr());
958
+ }).pipe(jt());
959
959
  }
960
- async requestAsPromise(t) {
960
+ async requestAsPromise(r) {
961
961
  try {
962
- const r = this.$request(t);
963
- return (await Cr(r)).result.data;
964
- } catch (r) {
965
- throw D.from(r);
962
+ const t = this.$request(r);
963
+ return (await Ct(t)).result.data;
964
+ } catch (t) {
965
+ throw F.from(t);
966
966
  }
967
967
  }
968
- query(t, r, n) {
968
+ query(r, t, n) {
969
969
  return this.requestAsPromise({
970
970
  type: "query",
971
- path: t,
972
- input: r,
971
+ path: r,
972
+ input: t,
973
973
  context: n == null ? void 0 : n.context,
974
974
  signal: n == null ? void 0 : n.signal
975
975
  });
976
976
  }
977
- mutation(t, r, n) {
977
+ mutation(r, t, n) {
978
978
  return this.requestAsPromise({
979
979
  type: "mutation",
980
- path: t,
981
- input: r,
980
+ path: r,
981
+ input: t,
982
982
  context: n == null ? void 0 : n.context,
983
983
  signal: n == null ? void 0 : n.signal
984
984
  });
985
985
  }
986
- subscription(t, r, n) {
986
+ subscription(r, t, n) {
987
987
  return this.$request({
988
988
  type: "subscription",
989
- path: t,
990
- input: r,
989
+ path: r,
990
+ input: t,
991
991
  context: n.context,
992
992
  signal: n.signal
993
993
  }).subscribe({
@@ -1025,67 +1025,67 @@ class zr {
1025
1025
  }
1026
1026
  });
1027
1027
  }
1028
- constructor(t) {
1029
- be(this, "links", void 0), be(this, "runtime", void 0), be(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = t.links.map((r) => r(this.runtime));
1028
+ constructor(r) {
1029
+ be(this, "links", void 0), be(this, "runtime", void 0), be(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = r.links.map((t) => t(this.runtime));
1030
1030
  }
1031
1031
  }
1032
- const Mr = Symbol.for("trpc_untypedClient"), Wr = {
1032
+ const Wt = Symbol.for("trpc_untypedClient"), Mt = {
1033
1033
  query: "query",
1034
1034
  mutate: "mutation",
1035
1035
  subscribe: "subscription"
1036
- }, Kr = (e) => Wr[e];
1037
- function Br(e) {
1038
- const t = Fr(({ path: r, args: n }) => {
1036
+ }, Bt = (e) => Mt[e];
1037
+ function Kt(e) {
1038
+ const r = Dt(({ path: t, args: n }) => {
1039
1039
  const i = [
1040
- ...r
1041
- ], s = Kr(i.pop()), u = i.join(".");
1040
+ ...t
1041
+ ], s = Bt(i.pop()), u = i.join(".");
1042
1042
  return e[s](u, ...n);
1043
1043
  });
1044
- return Nr((r) => r === Mr ? e : t[r]);
1044
+ return Nt((t) => t === Wt ? e : r[t]);
1045
1045
  }
1046
- function Yr(e) {
1047
- const t = new zr(e);
1048
- return Br(t);
1046
+ function Yt(e) {
1047
+ const r = new zt(e);
1048
+ return Kt(r);
1049
1049
  }
1050
- const it = (e) => typeof e == "function";
1051
- function Hr(e) {
1050
+ const ir = (e) => typeof e == "function";
1051
+ function Ht(e) {
1052
1052
  if (e)
1053
1053
  return e;
1054
- if (typeof window < "u" && it(window.fetch))
1054
+ if (typeof window < "u" && ir(window.fetch))
1055
1055
  return window.fetch;
1056
- if (typeof globalThis < "u" && it(globalThis.fetch))
1056
+ if (typeof globalThis < "u" && ir(globalThis.fetch))
1057
1057
  return globalThis.fetch;
1058
1058
  throw new Error("No fetch implementation found");
1059
1059
  }
1060
- const st = () => {
1060
+ const sr = () => {
1061
1061
  throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
1062
1062
  };
1063
- function at(e) {
1064
- let t = null, r = null;
1063
+ function ar(e) {
1064
+ let r = null, t = null;
1065
1065
  const n = () => {
1066
- clearTimeout(r), r = null, t = null;
1066
+ clearTimeout(t), t = null, r = null;
1067
1067
  };
1068
1068
  function i(l) {
1069
- var m, p;
1069
+ var d, p;
1070
1070
  const a = [
1071
1071
  []
1072
1072
  ];
1073
1073
  let f = 0;
1074
1074
  for (; ; ) {
1075
- const h = l[f];
1076
- if (!h)
1075
+ const y = l[f];
1076
+ if (!y)
1077
1077
  break;
1078
- const b = a[a.length - 1];
1079
- if (h.aborted) {
1080
- (m = h.reject) == null || m.call(h, new Error("Aborted")), f++;
1078
+ const g = a[a.length - 1];
1079
+ if (y.aborted) {
1080
+ (d = y.reject) == null || d.call(y, new Error("Aborted")), f++;
1081
1081
  continue;
1082
1082
  }
1083
- if (e.validate(b.concat(h).map((R) => R.key))) {
1084
- b.push(h), f++;
1083
+ if (e.validate(g.concat(y).map((R) => R.key))) {
1084
+ g.push(y), f++;
1085
1085
  continue;
1086
1086
  }
1087
- if (b.length === 0) {
1088
- (p = h.reject) == null || p.call(h, new Error("Input is too big for a single dispatch")), f++;
1087
+ if (g.length === 0) {
1088
+ (p = y.reject) == null || p.call(y, new Error("Input is too big for a single dispatch")), f++;
1089
1089
  continue;
1090
1090
  }
1091
1091
  a.push([]);
@@ -1093,7 +1093,7 @@ function at(e) {
1093
1093
  return a;
1094
1094
  }
1095
1095
  function s() {
1096
- const l = i(t);
1096
+ const l = i(r);
1097
1097
  n();
1098
1098
  for (const a of l) {
1099
1099
  if (!a.length)
@@ -1104,24 +1104,24 @@ function at(e) {
1104
1104
  for (const p of a)
1105
1105
  p.batch = f;
1106
1106
  e.fetch(f.items.map((p) => p.key)).then(async (p) => {
1107
- var h;
1108
- await Promise.all(p.map(async (b, x) => {
1107
+ var y;
1108
+ await Promise.all(p.map(async (g, S) => {
1109
1109
  var L, j;
1110
- const R = f.items[x];
1110
+ const R = f.items[S];
1111
1111
  try {
1112
- const S = await Promise.resolve(b);
1113
- (L = R.resolve) == null || L.call(R, S);
1114
- } catch (S) {
1115
- (j = R.reject) == null || j.call(R, S);
1112
+ const x = await Promise.resolve(g);
1113
+ (L = R.resolve) == null || L.call(R, x);
1114
+ } catch (x) {
1115
+ (j = R.reject) == null || j.call(R, x);
1116
1116
  }
1117
1117
  R.batch = null, R.reject = null, R.resolve = null;
1118
1118
  }));
1119
- for (const b of f.items)
1120
- (h = b.reject) == null || h.call(b, new Error("Missing result")), b.batch = null;
1119
+ for (const g of f.items)
1120
+ (y = g.reject) == null || y.call(g, new Error("Missing result")), g.batch = null;
1121
1121
  }).catch((p) => {
1122
- var h;
1123
- for (const b of f.items)
1124
- (h = b.reject) == null || h.call(b, p), b.batch = null;
1122
+ var y;
1123
+ for (const g of f.items)
1124
+ (y = g.reject) == null || y.call(g, p), g.batch = null;
1125
1125
  });
1126
1126
  }
1127
1127
  }
@@ -1130,103 +1130,103 @@ function at(e) {
1130
1130
  aborted: !1,
1131
1131
  key: l,
1132
1132
  batch: null,
1133
- resolve: st,
1134
- reject: st
1135
- }, f = new Promise((m, p) => {
1136
- a.reject = p, a.resolve = m, t || (t = []), t.push(a);
1133
+ resolve: sr,
1134
+ reject: sr
1135
+ }, f = new Promise((d, p) => {
1136
+ a.reject = p, a.resolve = d, r || (r = []), r.push(a);
1137
1137
  });
1138
- return r || (r = setTimeout(s)), f;
1138
+ return t || (t = setTimeout(s)), f;
1139
1139
  }
1140
1140
  return {
1141
1141
  load: u
1142
1142
  };
1143
1143
  }
1144
- function Gr(...e) {
1145
- const t = new AbortController(), r = e.length;
1144
+ function Gt(...e) {
1145
+ const r = new AbortController(), t = e.length;
1146
1146
  let n = 0;
1147
1147
  const i = () => {
1148
- ++n === r && t.abort();
1148
+ ++n === t && r.abort();
1149
1149
  };
1150
1150
  for (const s of e)
1151
1151
  s != null && s.aborted ? i() : s == null || s.addEventListener("abort", i, {
1152
1152
  once: !0
1153
1153
  });
1154
- return t.signal;
1154
+ return r.signal;
1155
1155
  }
1156
- function Xr(e) {
1157
- const t = e;
1158
- return t ? "input" in t ? t : {
1159
- input: t,
1160
- output: t
1156
+ function Xt(e) {
1157
+ const r = e;
1158
+ return r ? "input" in r ? r : {
1159
+ input: r,
1160
+ output: r
1161
1161
  } : {
1162
1162
  input: {
1163
- serialize: (r) => r,
1164
- deserialize: (r) => r
1163
+ serialize: (t) => t,
1164
+ deserialize: (t) => t
1165
1165
  },
1166
1166
  output: {
1167
- serialize: (r) => r,
1168
- deserialize: (r) => r
1167
+ serialize: (t) => t,
1168
+ deserialize: (t) => t
1169
1169
  }
1170
1170
  };
1171
1171
  }
1172
- function Jr(e) {
1172
+ function Jt(e) {
1173
1173
  return {
1174
1174
  url: e.url.toString(),
1175
1175
  fetch: e.fetch,
1176
- transformer: Xr(e.transformer),
1176
+ transformer: Xt(e.transformer),
1177
1177
  methodOverride: e.methodOverride
1178
1178
  };
1179
1179
  }
1180
- function Zr(e) {
1181
- const t = {};
1182
- for (let r = 0; r < e.length; r++) {
1183
- const n = e[r];
1184
- t[r] = n;
1180
+ function Zt(e) {
1181
+ const r = {};
1182
+ for (let t = 0; t < e.length; t++) {
1183
+ const n = e[t];
1184
+ r[t] = n;
1185
1185
  }
1186
- return t;
1186
+ return r;
1187
1187
  }
1188
- const Qr = {
1188
+ const Qt = {
1189
1189
  query: "GET",
1190
1190
  mutation: "POST",
1191
1191
  subscription: "PATCH"
1192
1192
  };
1193
- function Rt(e) {
1194
- return "input" in e ? e.transformer.input.serialize(e.input) : Zr(e.inputs.map((t) => e.transformer.input.serialize(t)));
1193
+ function Rr(e) {
1194
+ return "input" in e ? e.transformer.input.serialize(e.input) : Zt(e.inputs.map((r) => e.transformer.input.serialize(r)));
1195
1195
  }
1196
- const Pt = (e) => {
1197
- const t = e.url.split("?");
1198
- let n = t[0].replace(/\/$/, "") + "/" + e.path;
1196
+ const Pr = (e) => {
1197
+ const r = e.url.split("?");
1198
+ let n = r[0].replace(/\/$/, "") + "/" + e.path;
1199
1199
  const i = [];
1200
- if (t[1] && i.push(t[1]), "inputs" in e && i.push("batch=1"), e.type === "query" || e.type === "subscription") {
1201
- const s = Rt(e);
1200
+ if (r[1] && i.push(r[1]), "inputs" in e && i.push("batch=1"), e.type === "query" || e.type === "subscription") {
1201
+ const s = Rr(e);
1202
1202
  s !== void 0 && e.methodOverride !== "POST" && i.push(`input=${encodeURIComponent(JSON.stringify(s))}`);
1203
1203
  }
1204
1204
  return i.length && (n += "?" + i.join("&")), n;
1205
1205
  }, en = (e) => {
1206
1206
  if (e.type === "query" && e.methodOverride !== "POST")
1207
1207
  return;
1208
- const t = Rt(e);
1209
- return t !== void 0 ? JSON.stringify(t) : void 0;
1210
- }, tn = (e) => sn({
1208
+ const r = Rr(e);
1209
+ return r !== void 0 ? JSON.stringify(r) : void 0;
1210
+ }, rn = (e) => sn({
1211
1211
  ...e,
1212
1212
  contentTypeHeader: "application/json",
1213
- getUrl: Pt,
1213
+ getUrl: Pr,
1214
1214
  getBody: en
1215
1215
  });
1216
- class rn extends Error {
1216
+ class tn extends Error {
1217
1217
  constructor() {
1218
- const t = "AbortError";
1219
- super(t), this.name = t, this.message = t;
1218
+ const r = "AbortError";
1219
+ super(r), this.name = r, this.message = r;
1220
1220
  }
1221
1221
  }
1222
1222
  const nn = (e) => {
1223
- var t;
1223
+ var r;
1224
1224
  if (e != null && e.aborted)
1225
- throw (t = e.throwIfAborted) == null || t.call(e), typeof DOMException < "u" ? new DOMException("AbortError", "AbortError") : new rn();
1225
+ throw (r = e.throwIfAborted) == null || r.call(e), typeof DOMException < "u" ? new DOMException("AbortError", "AbortError") : new tn();
1226
1226
  };
1227
1227
  async function on(e) {
1228
1228
  nn(e.signal);
1229
- const t = e.getUrl(e), r = e.getBody(e), { type: n } = e, i = await (async () => {
1229
+ const r = e.getUrl(e), t = e.getBody(e), { type: n } = e, i = await (async () => {
1230
1230
  const u = await e.headers();
1231
1231
  return Symbol.iterator in u ? Object.fromEntries(u) : u;
1232
1232
  })(), s = {
@@ -1238,43 +1238,43 @@ async function on(e) {
1238
1238
  } : void 0,
1239
1239
  ...i
1240
1240
  };
1241
- return Hr(e.fetch)(t, {
1242
- method: e.methodOverride ?? Qr[n],
1241
+ return Ht(e.fetch)(r, {
1242
+ method: e.methodOverride ?? Qt[n],
1243
1243
  signal: e.signal,
1244
- body: r,
1244
+ body: t,
1245
1245
  headers: s
1246
1246
  });
1247
1247
  }
1248
1248
  async function sn(e) {
1249
- const t = {}, r = await on(e);
1250
- t.response = r;
1251
- const n = await r.json();
1252
- return t.responseJSON = n, {
1249
+ const r = {}, t = await on(e);
1250
+ r.response = t;
1251
+ const n = await t.json();
1252
+ return r.responseJSON = n, {
1253
1253
  json: n,
1254
- meta: t
1254
+ meta: r
1255
1255
  };
1256
1256
  }
1257
1257
  function an(e) {
1258
- const t = Jr(e), r = e.maxURLLength ?? 1 / 0;
1258
+ const r = Jt(e), t = e.maxURLLength ?? 1 / 0;
1259
1259
  return () => {
1260
1260
  const n = (l) => ({
1261
1261
  validate(a) {
1262
- if (r === 1 / 0)
1262
+ if (t === 1 / 0)
1263
1263
  return !0;
1264
- const f = a.map((h) => h.path).join(","), m = a.map((h) => h.input);
1265
- return Pt({
1266
- ...t,
1264
+ const f = a.map((y) => y.path).join(","), d = a.map((y) => y.input);
1265
+ return Pr({
1266
+ ...r,
1267
1267
  type: l,
1268
1268
  path: f,
1269
- inputs: m,
1269
+ inputs: d,
1270
1270
  signal: null
1271
- }).length <= r;
1271
+ }).length <= t;
1272
1272
  },
1273
1273
  async fetch(a) {
1274
- const f = a.map((R) => R.path).join(","), m = a.map((R) => R.input), p = Gr(...a.map((R) => R.signal)), h = await tn({
1275
- ...t,
1274
+ const f = a.map((R) => R.path).join(","), d = a.map((R) => R.input), p = Gt(...a.map((R) => R.signal)), y = await rn({
1275
+ ...r,
1276
1276
  path: f,
1277
- inputs: m,
1277
+ inputs: d,
1278
1278
  type: l,
1279
1279
  headers() {
1280
1280
  return e.headers ? typeof e.headers == "function" ? e.headers({
@@ -1283,36 +1283,36 @@ function an(e) {
1283
1283
  },
1284
1284
  signal: p
1285
1285
  });
1286
- return (Array.isArray(h.json) ? h.json : a.map(() => h.json)).map((R) => ({
1287
- meta: h.meta,
1286
+ return (Array.isArray(y.json) ? y.json : a.map(() => y.json)).map((R) => ({
1287
+ meta: y.meta,
1288
1288
  json: R
1289
1289
  }));
1290
1290
  }
1291
- }), i = at(n("query")), s = at(n("mutation")), u = {
1291
+ }), i = ar(n("query")), s = ar(n("mutation")), u = {
1292
1292
  query: i,
1293
1293
  mutation: s
1294
1294
  };
1295
- return ({ op: l }) => W((a) => {
1295
+ return ({ op: l }) => M((a) => {
1296
1296
  /* istanbul ignore if -- @preserve */
1297
1297
  if (l.type === "subscription")
1298
1298
  throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
1299
- const m = u[l.type].load(l);
1299
+ const d = u[l.type].load(l);
1300
1300
  let p;
1301
- return m.then((h) => {
1302
- p = h;
1303
- const b = Ur(h.json, t.transformer.output);
1304
- if (!b.ok) {
1305
- a.error(D.from(b.error, {
1306
- meta: h.meta
1301
+ return d.then((y) => {
1302
+ p = y;
1303
+ const g = Ut(y.json, r.transformer.output);
1304
+ if (!g.ok) {
1305
+ a.error(F.from(g.error, {
1306
+ meta: y.meta
1307
1307
  }));
1308
1308
  return;
1309
1309
  }
1310
1310
  a.next({
1311
- context: h.meta,
1312
- result: b.result
1311
+ context: y.meta,
1312
+ result: g.result
1313
1313
  }), a.complete();
1314
- }).catch((h) => {
1315
- a.error(D.from(h, {
1314
+ }).catch((y) => {
1315
+ a.error(F.from(y, {
1316
1316
  meta: p == null ? void 0 : p.meta
1317
1317
  }));
1318
1318
  }), () => {
@@ -1373,21 +1373,21 @@ const we = {
1373
1373
  }
1374
1374
  };
1375
1375
  function cn(e) {
1376
- const { direction: t, type: r, withContext: n, path: i, id: s, input: u } = e, l = [], a = [];
1376
+ const { direction: r, type: t, withContext: n, path: i, id: s, input: u } = e, l = [], a = [];
1377
1377
  if (e.colorMode === "none")
1378
- l.push(t === "up" ? ">>" : "<<", r, `#${s}`, i);
1378
+ l.push(r === "up" ? ">>" : "<<", t, `#${s}`, i);
1379
1379
  else if (e.colorMode === "ansi") {
1380
- const [f, m] = we.ansi.regular[r], [p, h] = we.ansi.bold[r];
1381
- l.push(t === "up" ? f : m, t === "up" ? ">>" : "<<", r, t === "up" ? p : h, `#${s}`, i, "\x1B[0m");
1380
+ const [f, d] = we.ansi.regular[t], [p, y] = we.ansi.bold[t];
1381
+ l.push(r === "up" ? f : d, r === "up" ? ">>" : "<<", t, r === "up" ? p : y, `#${s}`, i, "\x1B[0m");
1382
1382
  } else {
1383
- const [f, m] = we.css[r], p = `
1384
- background-color: #${t === "up" ? f : m};
1385
- color: ${t === "up" ? "black" : "white"};
1383
+ const [f, d] = we.css[t], p = `
1384
+ background-color: #${r === "up" ? f : d};
1385
+ color: ${r === "up" ? "black" : "white"};
1386
1386
  padding: 2px;
1387
1387
  `;
1388
- l.push("%c", t === "up" ? ">>" : "<<", r, `#${s}`, `%c${i}%c`, "%O"), a.push(p, `${p}; font-weight: bold;`, `${p}; font-weight: normal;`);
1388
+ l.push("%c", r === "up" ? ">>" : "<<", t, `#${s}`, `%c${i}%c`, "%O"), a.push(p, `${p}; font-weight: bold;`, `${p}; font-weight: normal;`);
1389
1389
  }
1390
- return t === "up" ? a.push(n ? {
1390
+ return r === "up" ? a.push(n ? {
1391
1391
  input: u,
1392
1392
  context: e.context
1393
1393
  } : {
@@ -1404,25 +1404,25 @@ function cn(e) {
1404
1404
  args: a
1405
1405
  };
1406
1406
  }
1407
- const ln = ({ c: e = console, colorMode: t = "css", withContext: r }) => (n) => {
1407
+ const ln = ({ c: e = console, colorMode: r = "css", withContext: t }) => (n) => {
1408
1408
  const i = n.input, s = un(i) ? Object.fromEntries(i) : i, { parts: u, args: l } = cn({
1409
1409
  ...n,
1410
- colorMode: t,
1410
+ colorMode: r,
1411
1411
  input: s,
1412
- withContext: r
1412
+ withContext: t
1413
1413
  }), a = n.direction === "down" && n.result && (n.result instanceof Error || "error" in n.result.result && n.result.result.error) ? "error" : "log";
1414
1414
  e[a].apply(null, [
1415
1415
  u.join(" ")
1416
1416
  ].concat(l));
1417
1417
  };
1418
1418
  function fn(e = {}) {
1419
- const { enabled: t = () => !0 } = e, r = e.colorMode ?? (typeof window > "u" ? "ansi" : "css"), n = e.withContext ?? r === "css", { logger: i = ln({
1419
+ const { enabled: r = () => !0 } = e, t = e.colorMode ?? (typeof window > "u" ? "ansi" : "css"), n = e.withContext ?? t === "css", { logger: i = ln({
1420
1420
  c: e.console,
1421
- colorMode: r,
1421
+ colorMode: t,
1422
1422
  withContext: n
1423
1423
  }) } = e;
1424
- return () => ({ op: s, next: u }) => W((l) => {
1425
- t({
1424
+ return () => ({ op: s, next: u }) => M((l) => {
1425
+ r({
1426
1426
  ...s,
1427
1427
  direction: "up"
1428
1428
  }) && i({
@@ -1430,68 +1430,68 @@ function fn(e = {}) {
1430
1430
  direction: "up"
1431
1431
  });
1432
1432
  const a = Date.now();
1433
- function f(m) {
1433
+ function f(d) {
1434
1434
  const p = Date.now() - a;
1435
- t({
1435
+ r({
1436
1436
  ...s,
1437
1437
  direction: "down",
1438
- result: m
1438
+ result: d
1439
1439
  }) && i({
1440
1440
  ...s,
1441
1441
  direction: "down",
1442
1442
  elapsedMs: p,
1443
- result: m
1443
+ result: d
1444
1444
  });
1445
1445
  }
1446
- return u(s).pipe(Ar({
1447
- next(m) {
1448
- f(m);
1446
+ return u(s).pipe(It({
1447
+ next(d) {
1448
+ f(d);
1449
1449
  },
1450
- error(m) {
1451
- f(m);
1450
+ error(d) {
1451
+ f(d);
1452
1452
  }
1453
1453
  })).subscribe(l);
1454
1454
  });
1455
1455
  }
1456
- const dn = (e, ...t) => typeof e == "function" ? e(...t) : e;
1456
+ const dn = (e, ...r) => typeof e == "function" ? e(...r) : e;
1457
1457
  function mn() {
1458
- let e, t;
1458
+ let e, r;
1459
1459
  return {
1460
1460
  promise: new Promise((n, i) => {
1461
- e = n, t = i;
1461
+ e = n, r = i;
1462
1462
  }),
1463
1463
  resolve: e,
1464
- reject: t
1464
+ reject: r
1465
1465
  };
1466
1466
  }
1467
1467
  async function pn(e) {
1468
- const t = await dn(e.url);
1469
- if (!e.connectionParams) return t;
1470
- const n = `${t.includes("?") ? "&" : "?"}connectionParams=1`;
1471
- return t + n;
1472
- }
1473
- function U(e, t, r) {
1474
- return t in e ? Object.defineProperty(e, t, {
1475
- value: r,
1468
+ const r = await dn(e.url);
1469
+ if (!e.connectionParams) return r;
1470
+ const n = `${r.includes("?") ? "&" : "?"}connectionParams=1`;
1471
+ return r + n;
1472
+ }
1473
+ function U(e, r, t) {
1474
+ return r in e ? Object.defineProperty(e, r, {
1475
+ value: t,
1476
1476
  enumerable: !0,
1477
1477
  configurable: !0,
1478
1478
  writable: !0
1479
- }) : e[t] = r, e;
1479
+ }) : e[r] = t, e;
1480
1480
  }
1481
1481
  function yn(e) {
1482
- const { promise: t, resolve: r, reject: n } = mn();
1482
+ const { promise: r, resolve: t, reject: n } = mn();
1483
1483
  return e.addEventListener("open", () => {
1484
- e.removeEventListener("error", n), r();
1485
- }), e.addEventListener("error", n), t;
1484
+ e.removeEventListener("error", n), t();
1485
+ }), e.addEventListener("error", n), r;
1486
1486
  }
1487
- function hn(e, { intervalMs: t, pongTimeoutMs: r }) {
1487
+ function hn(e, { intervalMs: r, pongTimeoutMs: t }) {
1488
1488
  let n, i;
1489
1489
  function s() {
1490
1490
  n = setTimeout(() => {
1491
1491
  e.send("PING"), i = setTimeout(() => {
1492
1492
  e.close();
1493
- }, r);
1494
- }, t);
1493
+ }, t);
1494
+ }, r);
1495
1495
  }
1496
1496
  function u() {
1497
1497
  clearTimeout(n), s();
@@ -1509,8 +1509,8 @@ class se {
1509
1509
  get ws() {
1510
1510
  return this.wsObservable.get();
1511
1511
  }
1512
- set ws(t) {
1513
- this.wsObservable.next(t);
1512
+ set ws(r) {
1513
+ this.wsObservable.next(r);
1514
1514
  }
1515
1515
  /**
1516
1516
  * Checks if the WebSocket connection is open and ready to communicate.
@@ -1527,9 +1527,9 @@ class se {
1527
1527
  async open() {
1528
1528
  if (this.openPromise) return this.openPromise;
1529
1529
  this.id = ++se.connectCount;
1530
- const t = pn(this.urlOptions).then((r) => new this.WebSocketPonyfill(r));
1531
- this.openPromise = t.then(yn), this.ws = await t, this.ws.addEventListener("message", function({ data: r }) {
1532
- r === "PING" && this.send("PONG");
1530
+ const r = pn(this.urlOptions).then((t) => new this.WebSocketPonyfill(t));
1531
+ this.openPromise = r.then(yn), this.ws = await r, this.ws.addEventListener("message", function({ data: t }) {
1532
+ t === "PING" && this.send("PONG");
1533
1533
  }), this.keepAliveOpts.enabled && hn(this.ws, this.keepAliveOpts), this.ws.addEventListener("close", () => {
1534
1534
  this.ws = null;
1535
1535
  });
@@ -1544,17 +1544,17 @@ class se {
1544
1544
  * Waits for any ongoing open operation to complete before closing.
1545
1545
  */
1546
1546
  async close() {
1547
- var t;
1547
+ var r;
1548
1548
  try {
1549
1549
  await this.openPromise;
1550
1550
  } finally {
1551
- (t = this.ws) == null || t.close();
1551
+ (r = this.ws) == null || r.close();
1552
1552
  }
1553
1553
  }
1554
- constructor(t) {
1555
- if (U(this, "id", ++se.connectCount), U(this, "WebSocketPonyfill", void 0), U(this, "urlOptions", void 0), U(this, "keepAliveOpts", void 0), U(this, "wsObservable", Ir(null)), U(this, "openPromise", null), this.WebSocketPonyfill = t.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
1554
+ constructor(r) {
1555
+ if (U(this, "id", ++se.connectCount), U(this, "WebSocketPonyfill", void 0), U(this, "urlOptions", void 0), U(this, "keepAliveOpts", void 0), U(this, "wsObservable", At(null)), U(this, "openPromise", null), this.WebSocketPonyfill = r.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
1556
1556
  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");
1557
- this.urlOptions = t.urlOptions, this.keepAliveOpts = t.keepAlive;
1557
+ this.urlOptions = r.urlOptions, this.keepAliveOpts = r.keepAlive;
1558
1558
  }
1559
1559
  }
1560
1560
  U(se, "connectCount", 0);
@@ -1562,76 +1562,76 @@ class gn {
1562
1562
  constructor() {
1563
1563
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
1564
1564
  }
1565
- set(t, r) {
1566
- this.keyToValue.set(t, r), this.valueToKey.set(r, t);
1565
+ set(r, t) {
1566
+ this.keyToValue.set(r, t), this.valueToKey.set(t, r);
1567
1567
  }
1568
- getByKey(t) {
1569
- return this.keyToValue.get(t);
1568
+ getByKey(r) {
1569
+ return this.keyToValue.get(r);
1570
1570
  }
1571
- getByValue(t) {
1572
- return this.valueToKey.get(t);
1571
+ getByValue(r) {
1572
+ return this.valueToKey.get(r);
1573
1573
  }
1574
1574
  clear() {
1575
1575
  this.keyToValue.clear(), this.valueToKey.clear();
1576
1576
  }
1577
1577
  }
1578
- class Ot {
1579
- constructor(t) {
1580
- this.generateIdentifier = t, this.kv = new gn();
1578
+ class Or {
1579
+ constructor(r) {
1580
+ this.generateIdentifier = r, this.kv = new gn();
1581
1581
  }
1582
- register(t, r) {
1583
- this.kv.getByValue(t) || (r || (r = this.generateIdentifier(t)), this.kv.set(r, t));
1582
+ register(r, t) {
1583
+ this.kv.getByValue(r) || (t || (t = this.generateIdentifier(r)), this.kv.set(t, r));
1584
1584
  }
1585
1585
  clear() {
1586
1586
  this.kv.clear();
1587
1587
  }
1588
- getIdentifier(t) {
1589
- return this.kv.getByValue(t);
1588
+ getIdentifier(r) {
1589
+ return this.kv.getByValue(r);
1590
1590
  }
1591
- getValue(t) {
1592
- return this.kv.getByKey(t);
1591
+ getValue(r) {
1592
+ return this.kv.getByKey(r);
1593
1593
  }
1594
1594
  }
1595
- class bn extends Ot {
1595
+ class bn extends Or {
1596
1596
  constructor() {
1597
- super((t) => t.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
1597
+ super((r) => r.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
1598
1598
  }
1599
- register(t, r) {
1600
- typeof r == "object" ? (r.allowProps && this.classToAllowedProps.set(t, r.allowProps), super.register(t, r.identifier)) : super.register(t, r);
1599
+ register(r, t) {
1600
+ typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(r, t.allowProps), super.register(r, t.identifier)) : super.register(r, t);
1601
1601
  }
1602
- getAllowedProps(t) {
1603
- return this.classToAllowedProps.get(t);
1602
+ getAllowedProps(r) {
1603
+ return this.classToAllowedProps.get(r);
1604
1604
  }
1605
1605
  }
1606
1606
  function wn(e) {
1607
1607
  if ("values" in Object)
1608
1608
  return Object.values(e);
1609
- const t = [];
1610
- for (const r in e)
1611
- e.hasOwnProperty(r) && t.push(e[r]);
1612
- return t;
1609
+ const r = [];
1610
+ for (const t in e)
1611
+ e.hasOwnProperty(t) && r.push(e[t]);
1612
+ return r;
1613
1613
  }
1614
- function vn(e, t) {
1615
- const r = wn(e);
1616
- if ("find" in r)
1617
- return r.find(t);
1618
- const n = r;
1614
+ function vn(e, r) {
1615
+ const t = wn(e);
1616
+ if ("find" in t)
1617
+ return t.find(r);
1618
+ const n = t;
1619
1619
  for (let i = 0; i < n.length; i++) {
1620
1620
  const s = n[i];
1621
- if (t(s))
1621
+ if (r(s))
1622
1622
  return s;
1623
1623
  }
1624
1624
  }
1625
- function M(e, t) {
1626
- Object.entries(e).forEach(([r, n]) => t(n, r));
1625
+ function W(e, r) {
1626
+ Object.entries(e).forEach(([t, n]) => r(n, t));
1627
1627
  }
1628
- function ie(e, t) {
1629
- return e.indexOf(t) !== -1;
1628
+ function ie(e, r) {
1629
+ return e.indexOf(r) !== -1;
1630
1630
  }
1631
- function ut(e, t) {
1632
- for (let r = 0; r < e.length; r++) {
1633
- const n = e[r];
1634
- if (t(n))
1631
+ function ur(e, r) {
1632
+ for (let t = 0; t < e.length; t++) {
1633
+ const n = e[t];
1634
+ if (r(n))
1635
1635
  return n;
1636
1636
  }
1637
1637
  }
@@ -1639,66 +1639,66 @@ class En {
1639
1639
  constructor() {
1640
1640
  this.transfomers = {};
1641
1641
  }
1642
- register(t) {
1643
- this.transfomers[t.name] = t;
1642
+ register(r) {
1643
+ this.transfomers[r.name] = r;
1644
1644
  }
1645
- findApplicable(t) {
1646
- return vn(this.transfomers, (r) => r.isApplicable(t));
1645
+ findApplicable(r) {
1646
+ return vn(this.transfomers, (t) => t.isApplicable(r));
1647
1647
  }
1648
- findByName(t) {
1649
- return this.transfomers[t];
1648
+ findByName(r) {
1649
+ return this.transfomers[r];
1650
1650
  }
1651
1651
  }
1652
- const Rn = (e) => Object.prototype.toString.call(e).slice(8, -1), Tt = (e) => typeof e > "u", Pn = (e) => e === null, J = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Oe = (e) => J(e) && Object.keys(e).length === 0, F = (e) => Array.isArray(e), On = (e) => typeof e == "string", Tn = (e) => typeof e == "number" && !isNaN(e), Sn = (e) => typeof e == "boolean", xn = (e) => e instanceof RegExp, Z = (e) => e instanceof Map, Q = (e) => e instanceof Set, St = (e) => Rn(e) === "Symbol", _n = (e) => e instanceof Date && !isNaN(e.valueOf()), kn = (e) => e instanceof Error, ct = (e) => typeof e == "number" && isNaN(e), Cn = (e) => Sn(e) || Pn(e) || Tt(e) || Tn(e) || On(e) || St(e), jn = (e) => typeof e == "bigint", An = (e) => e === 1 / 0 || e === -1 / 0, In = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Dn = (e) => e instanceof URL, xt = (e) => e.replace(/\./g, "\\."), ve = (e) => e.map(String).map(xt).join("."), G = (e) => {
1653
- const t = [];
1654
- let r = "";
1652
+ const Rn = (e) => Object.prototype.toString.call(e).slice(8, -1), Tr = (e) => typeof e > "u", Pn = (e) => e === null, J = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Oe = (e) => J(e) && Object.keys(e).length === 0, D = (e) => Array.isArray(e), On = (e) => typeof e == "string", Tn = (e) => typeof e == "number" && !isNaN(e), Sn = (e) => typeof e == "boolean", xn = (e) => e instanceof RegExp, Z = (e) => e instanceof Map, Q = (e) => e instanceof Set, Sr = (e) => Rn(e) === "Symbol", _n = (e) => e instanceof Date && !isNaN(e.valueOf()), kn = (e) => e instanceof Error, cr = (e) => typeof e == "number" && isNaN(e), Cn = (e) => Sn(e) || Pn(e) || Tr(e) || Tn(e) || On(e) || Sr(e), jn = (e) => typeof e == "bigint", In = (e) => e === 1 / 0 || e === -1 / 0, An = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Fn = (e) => e instanceof URL, xr = (e) => e.replace(/\./g, "\\."), ve = (e) => e.map(String).map(xr).join("."), G = (e) => {
1653
+ const r = [];
1654
+ let t = "";
1655
1655
  for (let i = 0; i < e.length; i++) {
1656
1656
  let s = e.charAt(i);
1657
1657
  if (s === "\\" && e.charAt(i + 1) === ".") {
1658
- r += ".", i++;
1658
+ t += ".", i++;
1659
1659
  continue;
1660
1660
  }
1661
1661
  if (s === ".") {
1662
- t.push(r), r = "";
1662
+ r.push(t), t = "";
1663
1663
  continue;
1664
1664
  }
1665
- r += s;
1665
+ t += s;
1666
1666
  }
1667
- const n = r;
1668
- return t.push(n), t;
1667
+ const n = t;
1668
+ return r.push(n), r;
1669
1669
  };
1670
- function A(e, t, r, n) {
1670
+ function I(e, r, t, n) {
1671
1671
  return {
1672
1672
  isApplicable: e,
1673
- annotation: t,
1674
- transform: r,
1673
+ annotation: r,
1674
+ transform: t,
1675
1675
  untransform: n
1676
1676
  };
1677
1677
  }
1678
- const _t = [
1679
- A(Tt, "undefined", () => null, () => {
1678
+ const _r = [
1679
+ I(Tr, "undefined", () => null, () => {
1680
1680
  }),
1681
- A(jn, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
1682
- A(_n, "Date", (e) => e.toISOString(), (e) => new Date(e)),
1683
- A(kn, "Error", (e, t) => {
1684
- const r = {
1681
+ I(jn, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
1682
+ I(_n, "Date", (e) => e.toISOString(), (e) => new Date(e)),
1683
+ I(kn, "Error", (e, r) => {
1684
+ const t = {
1685
1685
  name: e.name,
1686
1686
  message: e.message
1687
1687
  };
1688
- return t.allowedErrorProps.forEach((n) => {
1689
- r[n] = e[n];
1690
- }), r;
1691
- }, (e, t) => {
1692
- const r = new Error(e.message);
1693
- return r.name = e.name, r.stack = e.stack, t.allowedErrorProps.forEach((n) => {
1694
- r[n] = e[n];
1695
- }), r;
1688
+ return r.allowedErrorProps.forEach((n) => {
1689
+ t[n] = e[n];
1690
+ }), t;
1691
+ }, (e, r) => {
1692
+ const t = new Error(e.message);
1693
+ return t.name = e.name, t.stack = e.stack, r.allowedErrorProps.forEach((n) => {
1694
+ t[n] = e[n];
1695
+ }), t;
1696
1696
  }),
1697
- A(xn, "regexp", (e) => "" + e, (e) => {
1698
- const t = e.slice(1, e.lastIndexOf("/")), r = e.slice(e.lastIndexOf("/") + 1);
1699
- return new RegExp(t, r);
1697
+ I(xn, "regexp", (e) => "" + e, (e) => {
1698
+ const r = e.slice(1, e.lastIndexOf("/")), t = e.slice(e.lastIndexOf("/") + 1);
1699
+ return new RegExp(r, t);
1700
1700
  }),
1701
- A(
1701
+ I(
1702
1702
  Q,
1703
1703
  "set",
1704
1704
  // (sets only exist in es6+)
@@ -1706,25 +1706,25 @@ const _t = [
1706
1706
  (e) => [...e.values()],
1707
1707
  (e) => new Set(e)
1708
1708
  ),
1709
- A(Z, "map", (e) => [...e.entries()], (e) => new Map(e)),
1710
- A((e) => ct(e) || An(e), "number", (e) => ct(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
1711
- A((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
1712
- A(Dn, "URL", (e) => e.toString(), (e) => new URL(e))
1709
+ I(Z, "map", (e) => [...e.entries()], (e) => new Map(e)),
1710
+ I((e) => cr(e) || In(e), "number", (e) => cr(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
1711
+ I((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
1712
+ I(Fn, "URL", (e) => e.toString(), (e) => new URL(e))
1713
1713
  ];
1714
- function ae(e, t, r, n) {
1714
+ function ae(e, r, t, n) {
1715
1715
  return {
1716
1716
  isApplicable: e,
1717
- annotation: t,
1718
- transform: r,
1717
+ annotation: r,
1718
+ transform: t,
1719
1719
  untransform: n
1720
1720
  };
1721
1721
  }
1722
- const kt = ae((e, t) => St(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
1723
- const n = r.symbolRegistry.getValue(t[1]);
1722
+ const kr = ae((e, r) => Sr(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r) => ["symbol", r.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, r, t) => {
1723
+ const n = t.symbolRegistry.getValue(r[1]);
1724
1724
  if (!n)
1725
1725
  throw new Error("Trying to deserialize unknown symbol");
1726
1726
  return n;
1727
- }), Fn = [
1727
+ }), Dn = [
1728
1728
  Int8Array,
1729
1729
  Uint8Array,
1730
1730
  Int16Array,
@@ -1734,79 +1734,79 @@ const kt = ae((e, t) => St(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t)
1734
1734
  Float32Array,
1735
1735
  Float64Array,
1736
1736
  Uint8ClampedArray
1737
- ].reduce((e, t) => (e[t.name] = t, e), {}), Ct = ae(In, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
1738
- const r = Fn[t[1]];
1739
- if (!r)
1737
+ ].reduce((e, r) => (e[r.name] = r, e), {}), Cr = ae(An, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, r) => {
1738
+ const t = Dn[r[1]];
1739
+ if (!t)
1740
1740
  throw new Error("Trying to deserialize unknown typed array");
1741
- return new r(e);
1741
+ return new t(e);
1742
1742
  });
1743
- function jt(e, t) {
1744
- return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
1743
+ function jr(e, r) {
1744
+ return e != null && e.constructor ? !!r.classRegistry.getIdentifier(e.constructor) : !1;
1745
1745
  }
1746
- const At = ae(jt, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
1747
- const r = t.classRegistry.getAllowedProps(e.constructor);
1748
- if (!r)
1746
+ const Ir = ae(jr, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor)], (e, r) => {
1747
+ const t = r.classRegistry.getAllowedProps(e.constructor);
1748
+ if (!t)
1749
1749
  return { ...e };
1750
1750
  const n = {};
1751
- return r.forEach((i) => {
1751
+ return t.forEach((i) => {
1752
1752
  n[i] = e[i];
1753
1753
  }), n;
1754
- }, (e, t, r) => {
1755
- const n = r.classRegistry.getValue(t[1]);
1754
+ }, (e, r, t) => {
1755
+ const n = t.classRegistry.getValue(r[1]);
1756
1756
  if (!n)
1757
- throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
1757
+ throw new Error(`Trying to deserialize unknown class '${r[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
1758
1758
  return Object.assign(Object.create(n.prototype), e);
1759
- }), It = ae((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
1760
- const n = r.customTransformerRegistry.findByName(t[1]);
1759
+ }), Ar = ae((e, r) => !!r.customTransformerRegistry.findApplicable(e), (e, r) => ["custom", r.customTransformerRegistry.findApplicable(e).name], (e, r) => r.customTransformerRegistry.findApplicable(e).serialize(e), (e, r, t) => {
1760
+ const n = t.customTransformerRegistry.findByName(r[1]);
1761
1761
  if (!n)
1762
1762
  throw new Error("Trying to deserialize unknown custom value");
1763
1763
  return n.deserialize(e);
1764
- }), Nn = [At, kt, It, Ct], lt = (e, t) => {
1765
- const r = ut(Nn, (i) => i.isApplicable(e, t));
1766
- if (r)
1764
+ }), Nn = [Ir, kr, Ar, Cr], lr = (e, r) => {
1765
+ const t = ur(Nn, (i) => i.isApplicable(e, r));
1766
+ if (t)
1767
1767
  return {
1768
- value: r.transform(e, t),
1769
- type: r.annotation(e, t)
1768
+ value: t.transform(e, r),
1769
+ type: t.annotation(e, r)
1770
1770
  };
1771
- const n = ut(_t, (i) => i.isApplicable(e, t));
1771
+ const n = ur(_r, (i) => i.isApplicable(e, r));
1772
1772
  if (n)
1773
1773
  return {
1774
- value: n.transform(e, t),
1774
+ value: n.transform(e, r),
1775
1775
  type: n.annotation
1776
1776
  };
1777
- }, Dt = {};
1778
- _t.forEach((e) => {
1779
- Dt[e.annotation] = e;
1777
+ }, Fr = {};
1778
+ _r.forEach((e) => {
1779
+ Fr[e.annotation] = e;
1780
1780
  });
1781
- const $n = (e, t, r) => {
1782
- if (F(t))
1783
- switch (t[0]) {
1781
+ const $n = (e, r, t) => {
1782
+ if (D(r))
1783
+ switch (r[0]) {
1784
1784
  case "symbol":
1785
- return kt.untransform(e, t, r);
1785
+ return kr.untransform(e, r, t);
1786
1786
  case "class":
1787
- return At.untransform(e, t, r);
1787
+ return Ir.untransform(e, r, t);
1788
1788
  case "custom":
1789
- return It.untransform(e, t, r);
1789
+ return Ar.untransform(e, r, t);
1790
1790
  case "typed-array":
1791
- return Ct.untransform(e, t, r);
1791
+ return Cr.untransform(e, r, t);
1792
1792
  default:
1793
- throw new Error("Unknown transformation: " + t);
1793
+ throw new Error("Unknown transformation: " + r);
1794
1794
  }
1795
1795
  else {
1796
- const n = Dt[t];
1796
+ const n = Fr[r];
1797
1797
  if (!n)
1798
- throw new Error("Unknown transformation: " + t);
1799
- return n.untransform(e, r);
1798
+ throw new Error("Unknown transformation: " + r);
1799
+ return n.untransform(e, t);
1800
1800
  }
1801
- }, z = (e, t) => {
1802
- if (t > e.size)
1801
+ }, z = (e, r) => {
1802
+ if (r > e.size)
1803
1803
  throw new Error("index out of bounds");
1804
- const r = e.keys();
1805
- for (; t > 0; )
1806
- r.next(), t--;
1807
- return r.next().value;
1804
+ const t = e.keys();
1805
+ for (; r > 0; )
1806
+ t.next(), r--;
1807
+ return t.next().value;
1808
1808
  };
1809
- function Ft(e) {
1809
+ function Dr(e) {
1810
1810
  if (ie(e, "__proto__"))
1811
1811
  throw new Error("__proto__ is not allowed as a property");
1812
1812
  if (ie(e, "prototype"))
@@ -1814,14 +1814,14 @@ function Ft(e) {
1814
1814
  if (ie(e, "constructor"))
1815
1815
  throw new Error("constructor is not allowed as a property");
1816
1816
  }
1817
- const Un = (e, t) => {
1818
- Ft(t);
1819
- for (let r = 0; r < t.length; r++) {
1820
- const n = t[r];
1817
+ const Un = (e, r) => {
1818
+ Dr(r);
1819
+ for (let t = 0; t < r.length; t++) {
1820
+ const n = r[t];
1821
1821
  if (Q(e))
1822
1822
  e = z(e, +n);
1823
1823
  else if (Z(e)) {
1824
- const i = +n, s = +t[++r] == 0 ? "key" : "value", u = z(e, i);
1824
+ const i = +n, s = +r[++t] == 0 ? "key" : "value", u = z(e, i);
1825
1825
  switch (s) {
1826
1826
  case "key":
1827
1827
  e = u;
@@ -1834,13 +1834,13 @@ const Un = (e, t) => {
1834
1834
  e = e[n];
1835
1835
  }
1836
1836
  return e;
1837
- }, Te = (e, t, r) => {
1838
- if (Ft(t), t.length === 0)
1839
- return r(e);
1837
+ }, Te = (e, r, t) => {
1838
+ if (Dr(r), r.length === 0)
1839
+ return t(e);
1840
1840
  let n = e;
1841
- for (let s = 0; s < t.length - 1; s++) {
1842
- const u = t[s];
1843
- if (F(n)) {
1841
+ for (let s = 0; s < r.length - 1; s++) {
1842
+ const u = r[s];
1843
+ if (D(n)) {
1844
1844
  const l = +u;
1845
1845
  n = n[l];
1846
1846
  } else if (J(n))
@@ -1849,210 +1849,210 @@ const Un = (e, t) => {
1849
1849
  const l = +u;
1850
1850
  n = z(n, l);
1851
1851
  } else if (Z(n)) {
1852
- if (s === t.length - 2)
1852
+ if (s === r.length - 2)
1853
1853
  break;
1854
- const a = +u, f = +t[++s] == 0 ? "key" : "value", m = z(n, a);
1854
+ const a = +u, f = +r[++s] == 0 ? "key" : "value", d = z(n, a);
1855
1855
  switch (f) {
1856
1856
  case "key":
1857
- n = m;
1857
+ n = d;
1858
1858
  break;
1859
1859
  case "value":
1860
- n = n.get(m);
1860
+ n = n.get(d);
1861
1861
  break;
1862
1862
  }
1863
1863
  }
1864
1864
  }
1865
- const i = t[t.length - 1];
1866
- if (F(n) ? n[+i] = r(n[+i]) : J(n) && (n[i] = r(n[i])), Q(n)) {
1867
- const s = z(n, +i), u = r(s);
1865
+ const i = r[r.length - 1];
1866
+ if (D(n) ? n[+i] = t(n[+i]) : J(n) && (n[i] = t(n[i])), Q(n)) {
1867
+ const s = z(n, +i), u = t(s);
1868
1868
  s !== u && (n.delete(s), n.add(u));
1869
1869
  }
1870
1870
  if (Z(n)) {
1871
- const s = +t[t.length - 2], u = z(n, s);
1871
+ const s = +r[r.length - 2], u = z(n, s);
1872
1872
  switch (+i == 0 ? "key" : "value") {
1873
1873
  case "key": {
1874
- const a = r(u);
1874
+ const a = t(u);
1875
1875
  n.set(a, n.get(u)), a !== u && n.delete(u);
1876
1876
  break;
1877
1877
  }
1878
1878
  case "value": {
1879
- n.set(u, r(n.get(u)));
1879
+ n.set(u, t(n.get(u)));
1880
1880
  break;
1881
1881
  }
1882
1882
  }
1883
1883
  }
1884
1884
  return e;
1885
1885
  };
1886
- function Se(e, t, r = []) {
1886
+ function Se(e, r, t = []) {
1887
1887
  if (!e)
1888
1888
  return;
1889
- if (!F(e)) {
1890
- M(e, (s, u) => Se(s, t, [...r, ...G(u)]));
1889
+ if (!D(e)) {
1890
+ W(e, (s, u) => Se(s, r, [...t, ...G(u)]));
1891
1891
  return;
1892
1892
  }
1893
1893
  const [n, i] = e;
1894
- i && M(i, (s, u) => {
1895
- Se(s, t, [...r, ...G(u)]);
1896
- }), t(n, r);
1894
+ i && W(i, (s, u) => {
1895
+ Se(s, r, [...t, ...G(u)]);
1896
+ }), r(n, t);
1897
1897
  }
1898
- function Ln(e, t, r) {
1899
- return Se(t, (n, i) => {
1900
- e = Te(e, i, (s) => $n(s, n, r));
1898
+ function Ln(e, r, t) {
1899
+ return Se(r, (n, i) => {
1900
+ e = Te(e, i, (s) => $n(s, n, t));
1901
1901
  }), e;
1902
1902
  }
1903
- function Vn(e, t) {
1904
- function r(n, i) {
1903
+ function Vn(e, r) {
1904
+ function t(n, i) {
1905
1905
  const s = Un(e, G(i));
1906
1906
  n.map(G).forEach((u) => {
1907
1907
  e = Te(e, u, () => s);
1908
1908
  });
1909
1909
  }
1910
- if (F(t)) {
1911
- const [n, i] = t;
1910
+ if (D(r)) {
1911
+ const [n, i] = r;
1912
1912
  n.forEach((s) => {
1913
1913
  e = Te(e, G(s), () => e);
1914
- }), i && M(i, r);
1914
+ }), i && W(i, t);
1915
1915
  } else
1916
- M(t, r);
1916
+ W(r, t);
1917
1917
  return e;
1918
1918
  }
1919
- const qn = (e, t) => J(e) || F(e) || Z(e) || Q(e) || jt(e, t);
1920
- function zn(e, t, r) {
1921
- const n = r.get(e);
1922
- n ? n.push(t) : r.set(e, [t]);
1919
+ const qn = (e, r) => J(e) || D(e) || Z(e) || Q(e) || jr(e, r);
1920
+ function zn(e, r, t) {
1921
+ const n = t.get(e);
1922
+ n ? n.push(r) : t.set(e, [r]);
1923
1923
  }
1924
- function Mn(e, t) {
1925
- const r = {};
1924
+ function Wn(e, r) {
1925
+ const t = {};
1926
1926
  let n;
1927
1927
  return e.forEach((i) => {
1928
1928
  if (i.length <= 1)
1929
1929
  return;
1930
- t || (i = i.map((l) => l.map(String)).sort((l, a) => l.length - a.length));
1930
+ r || (i = i.map((l) => l.map(String)).sort((l, a) => l.length - a.length));
1931
1931
  const [s, ...u] = i;
1932
- s.length === 0 ? n = u.map(ve) : r[ve(s)] = u.map(ve);
1933
- }), n ? Oe(r) ? [n] : [n, r] : Oe(r) ? void 0 : r;
1932
+ s.length === 0 ? n = u.map(ve) : t[ve(s)] = u.map(ve);
1933
+ }), n ? Oe(t) ? [n] : [n, t] : Oe(t) ? void 0 : t;
1934
1934
  }
1935
- const Nt = (e, t, r, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
1935
+ const Nr = (e, r, t, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
1936
1936
  const l = Cn(e);
1937
1937
  if (!l) {
1938
- zn(e, i, t);
1939
- const b = u.get(e);
1940
- if (b)
1938
+ zn(e, i, r);
1939
+ const g = u.get(e);
1940
+ if (g)
1941
1941
  return n ? {
1942
1942
  transformedValue: null
1943
- } : b;
1943
+ } : g;
1944
1944
  }
1945
- if (!qn(e, r)) {
1946
- const b = lt(e, r), x = b ? {
1947
- transformedValue: b.value,
1948
- annotations: [b.type]
1945
+ if (!qn(e, t)) {
1946
+ const g = lr(e, t), S = g ? {
1947
+ transformedValue: g.value,
1948
+ annotations: [g.type]
1949
1949
  } : {
1950
1950
  transformedValue: e
1951
1951
  };
1952
- return l || u.set(e, x), x;
1952
+ return l || u.set(e, S), S;
1953
1953
  }
1954
1954
  if (ie(s, e))
1955
1955
  return {
1956
1956
  transformedValue: null
1957
1957
  };
1958
- const a = lt(e, r), f = (a == null ? void 0 : a.value) ?? e, m = F(f) ? [] : {}, p = {};
1959
- M(f, (b, x) => {
1960
- if (x === "__proto__" || x === "constructor" || x === "prototype")
1961
- throw new Error(`Detected property ${x}. This is a prototype pollution risk, please remove it from your object.`);
1962
- const R = Nt(b, t, r, n, [...i, x], [...s, e], u);
1963
- m[x] = R.transformedValue, F(R.annotations) ? p[x] = R.annotations : J(R.annotations) && M(R.annotations, (L, j) => {
1964
- p[xt(x) + "." + j] = L;
1958
+ const a = lr(e, t), f = (a == null ? void 0 : a.value) ?? e, d = D(f) ? [] : {}, p = {};
1959
+ W(f, (g, S) => {
1960
+ if (S === "__proto__" || S === "constructor" || S === "prototype")
1961
+ throw new Error(`Detected property ${S}. This is a prototype pollution risk, please remove it from your object.`);
1962
+ const R = Nr(g, r, t, n, [...i, S], [...s, e], u);
1963
+ d[S] = R.transformedValue, D(R.annotations) ? p[S] = R.annotations : J(R.annotations) && W(R.annotations, (L, j) => {
1964
+ p[xr(S) + "." + j] = L;
1965
1965
  });
1966
1966
  });
1967
- const h = Oe(p) ? {
1968
- transformedValue: m,
1967
+ const y = Oe(p) ? {
1968
+ transformedValue: d,
1969
1969
  annotations: a ? [a.type] : void 0
1970
1970
  } : {
1971
- transformedValue: m,
1971
+ transformedValue: d,
1972
1972
  annotations: a ? [a.type, p] : p
1973
1973
  };
1974
- return l || u.set(e, h), h;
1974
+ return l || u.set(e, y), y;
1975
1975
  };
1976
- function $t(e) {
1976
+ function $r(e) {
1977
1977
  return Object.prototype.toString.call(e).slice(8, -1);
1978
1978
  }
1979
- function ft(e) {
1980
- return $t(e) === "Array";
1979
+ function fr(e) {
1980
+ return $r(e) === "Array";
1981
1981
  }
1982
- function Wn(e) {
1983
- if ($t(e) !== "Object")
1982
+ function Mn(e) {
1983
+ if ($r(e) !== "Object")
1984
1984
  return !1;
1985
- const t = Object.getPrototypeOf(e);
1986
- return !!t && t.constructor === Object && t === Object.prototype;
1985
+ const r = Object.getPrototypeOf(e);
1986
+ return !!r && r.constructor === Object && r === Object.prototype;
1987
1987
  }
1988
- function Kn(e, t, r, n, i) {
1989
- const s = {}.propertyIsEnumerable.call(n, t) ? "enumerable" : "nonenumerable";
1990
- s === "enumerable" && (e[t] = r), i && s === "nonenumerable" && Object.defineProperty(e, t, {
1991
- value: r,
1988
+ function Bn(e, r, t, n, i) {
1989
+ const s = {}.propertyIsEnumerable.call(n, r) ? "enumerable" : "nonenumerable";
1990
+ s === "enumerable" && (e[r] = t), i && s === "nonenumerable" && Object.defineProperty(e, r, {
1991
+ value: t,
1992
1992
  enumerable: !1,
1993
1993
  writable: !0,
1994
1994
  configurable: !0
1995
1995
  });
1996
1996
  }
1997
- function xe(e, t = {}) {
1998
- if (ft(e))
1999
- return e.map((i) => xe(i, t));
2000
- if (!Wn(e))
1997
+ function xe(e, r = {}) {
1998
+ if (fr(e))
1999
+ return e.map((i) => xe(i, r));
2000
+ if (!Mn(e))
2001
2001
  return e;
2002
- const r = Object.getOwnPropertyNames(e), n = Object.getOwnPropertySymbols(e);
2003
- return [...r, ...n].reduce((i, s) => {
2004
- if (ft(t.props) && !t.props.includes(s))
2002
+ const t = Object.getOwnPropertyNames(e), n = Object.getOwnPropertySymbols(e);
2003
+ return [...t, ...n].reduce((i, s) => {
2004
+ if (fr(r.props) && !r.props.includes(s))
2005
2005
  return i;
2006
- const u = e[s], l = xe(u, t);
2007
- return Kn(i, s, l, e, t.nonenumerable), i;
2006
+ const u = e[s], l = xe(u, r);
2007
+ return Bn(i, s, l, e, r.nonenumerable), i;
2008
2008
  }, {});
2009
2009
  }
2010
2010
  class w {
2011
2011
  /**
2012
2012
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
2013
2013
  */
2014
- constructor({ dedupe: t = !1 } = {}) {
2015
- this.classRegistry = new bn(), this.symbolRegistry = new Ot((r) => r.description ?? ""), this.customTransformerRegistry = new En(), this.allowedErrorProps = [], this.dedupe = t;
2014
+ constructor({ dedupe: r = !1 } = {}) {
2015
+ this.classRegistry = new bn(), this.symbolRegistry = new Or((t) => t.description ?? ""), this.customTransformerRegistry = new En(), this.allowedErrorProps = [], this.dedupe = r;
2016
2016
  }
2017
- serialize(t) {
2018
- const r = /* @__PURE__ */ new Map(), n = Nt(t, r, this, this.dedupe), i = {
2017
+ serialize(r) {
2018
+ const t = /* @__PURE__ */ new Map(), n = Nr(r, t, this, this.dedupe), i = {
2019
2019
  json: n.transformedValue
2020
2020
  };
2021
2021
  n.annotations && (i.meta = {
2022
2022
  ...i.meta,
2023
2023
  values: n.annotations
2024
2024
  });
2025
- const s = Mn(r, this.dedupe);
2025
+ const s = Wn(t, this.dedupe);
2026
2026
  return s && (i.meta = {
2027
2027
  ...i.meta,
2028
2028
  referentialEqualities: s
2029
2029
  }), i;
2030
2030
  }
2031
- deserialize(t) {
2032
- const { json: r, meta: n } = t;
2033
- let i = xe(r);
2031
+ deserialize(r) {
2032
+ const { json: t, meta: n } = r;
2033
+ let i = xe(t);
2034
2034
  return n != null && n.values && (i = Ln(i, n.values, this)), n != null && n.referentialEqualities && (i = Vn(i, n.referentialEqualities)), i;
2035
2035
  }
2036
- stringify(t) {
2037
- return JSON.stringify(this.serialize(t));
2036
+ stringify(r) {
2037
+ return JSON.stringify(this.serialize(r));
2038
2038
  }
2039
- parse(t) {
2040
- return this.deserialize(JSON.parse(t));
2039
+ parse(r) {
2040
+ return this.deserialize(JSON.parse(r));
2041
2041
  }
2042
- registerClass(t, r) {
2043
- this.classRegistry.register(t, r);
2042
+ registerClass(r, t) {
2043
+ this.classRegistry.register(r, t);
2044
2044
  }
2045
- registerSymbol(t, r) {
2046
- this.symbolRegistry.register(t, r);
2045
+ registerSymbol(r, t) {
2046
+ this.symbolRegistry.register(r, t);
2047
2047
  }
2048
- registerCustom(t, r) {
2048
+ registerCustom(r, t) {
2049
2049
  this.customTransformerRegistry.register({
2050
- name: r,
2051
- ...t
2050
+ name: t,
2051
+ ...r
2052
2052
  });
2053
2053
  }
2054
- allowErrorProps(...t) {
2055
- this.allowedErrorProps.push(...t);
2054
+ allowErrorProps(...r) {
2055
+ this.allowedErrorProps.push(...r);
2056
2056
  }
2057
2057
  }
2058
2058
  w.defaultInstance = new w();
@@ -2072,9 +2072,9 @@ w.registerClass;
2072
2072
  w.registerCustom;
2073
2073
  w.registerSymbol;
2074
2074
  w.allowErrorProps;
2075
- const Bn = "dev-jwt-token-for-testing", Yn = async () => Bn, Ut = Rr(null);
2076
- function Hn(e, t) {
2077
- const r = Yr({
2075
+ const Ur = Rt(null);
2076
+ function Kn(e, r) {
2077
+ const t = Yt({
2078
2078
  links: [
2079
2079
  fn({
2080
2080
  enabled: (n) => process.env.NODE_ENV === "development" && typeof window < "u" || n.direction === "down" && n.result instanceof Error
@@ -2082,19 +2082,19 @@ function Hn(e, t) {
2082
2082
  an({
2083
2083
  url: `${e}/trpc`,
2084
2084
  headers: async () => ({
2085
- Authorization: `Bearer ${await t()}`
2085
+ Authorization: `Bearer ${await r()}`
2086
2086
  }),
2087
2087
  transformer: w
2088
2088
  })
2089
2089
  ]
2090
2090
  });
2091
2091
  return {
2092
- getProjectsForUser: async () => (await r.projectRouter.getAllProjects.query()).map((i) => ({
2092
+ getProjectsForUser: async () => (await t.projectRouter.getAllProjects.query()).map((i) => ({
2093
2093
  name: i.name,
2094
2094
  id: i.id
2095
2095
  })),
2096
2096
  addProjectForUser: async (n) => {
2097
- const i = await r.projectRouter.createProject.mutate({
2097
+ const i = await t.projectRouter.createProject.mutate({
2098
2098
  name: n
2099
2099
  });
2100
2100
  return {
@@ -2105,7 +2105,7 @@ function Hn(e, t) {
2105
2105
  addFilesToProject: async (n, i) => {
2106
2106
  const s = [];
2107
2107
  for (const u of i) {
2108
- const l = await r.fileRouter.createFile.mutate({
2108
+ const l = await t.fileRouter.createFile.mutate({
2109
2109
  file: {
2110
2110
  projectId: n,
2111
2111
  mimeType: _e.PDF,
@@ -2118,7 +2118,7 @@ function Hn(e, t) {
2118
2118
  metadata: null,
2119
2119
  isArtifact: !1,
2120
2120
  summary: null,
2121
- chunkingStatus: wt.NOT_CHUNKED
2121
+ chunkingStatus: wr.NOT_CHUNKED
2122
2122
  }
2123
2123
  });
2124
2124
  s.push({
@@ -2130,7 +2130,7 @@ function Hn(e, t) {
2130
2130
  }
2131
2131
  return s;
2132
2132
  },
2133
- getFilesForProject: async (n) => (await r.fileRouter.getFilesByProject.query({
2133
+ getFilesForProject: async (n) => (await t.fileRouter.getFilesByProject.query({
2134
2134
  projectId: n
2135
2135
  })).map((s) => ({
2136
2136
  blobUrl: s.path,
@@ -2140,51 +2140,54 @@ function Hn(e, t) {
2140
2140
  }))
2141
2141
  };
2142
2142
  }
2143
- function Qn({
2143
+ function Jn({
2144
2144
  children: e,
2145
- host: t = "http://localhost",
2146
- port: r = 5174,
2147
- getToken: n = Yn
2145
+ host: r = "http://localhost",
2146
+ port: t = 5174,
2147
+ getToken: n
2148
2148
  }) {
2149
2149
  const [i, s] = Ee(null);
2150
- return Pr(() => {
2151
- const u = `${t}:${r}`, l = Hn(u, n);
2150
+ return Pt(() => {
2151
+ const u = `${r}:${t}`, l = Kn(u, n);
2152
2152
  s(l);
2153
- }, [t, r, n]), /* @__PURE__ */ Pe.jsx(Ut.Provider, { value: { host: t, port: r, client: i }, children: e });
2153
+ }, [r, t, n]), /* @__PURE__ */ Pe.jsx(Ur.Provider, { value: { host: r, port: t, client: i, getToken: n }, children: e });
2154
2154
  }
2155
- function Lt() {
2156
- const e = Or(Ut);
2155
+ function Lr() {
2156
+ const e = Ot(Ur);
2157
2157
  if (!e)
2158
2158
  throw new Error("useFolioContext must be used within a FolioProvider");
2159
2159
  return e;
2160
2160
  }
2161
- const { useEffect: Gn, useRef: Xn, useState: Jn } = Er;
2162
- function eo({
2161
+ const { useEffect: Yn, useRef: Hn, useState: Gn } = Et;
2162
+ function Zn({
2163
2163
  width: e = "100%",
2164
- height: t = "100vh",
2165
- allow: r = "camera; microphone; clipboard-read; clipboard-write; fullscreen",
2164
+ height: r = "100vh",
2165
+ allow: t = "camera; microphone; clipboard-read; clipboard-write; fullscreen",
2166
2166
  style: n,
2167
2167
  className: i = "",
2168
2168
  iframeProps: s = {}
2169
2169
  }) {
2170
- const { host: u, port: l } = Lt(), a = Xn(null), [f, m] = Jn();
2171
- return Gn(() => {
2172
- m(`${u}:${l}`);
2173
- }, [u, l]), f ? /* @__PURE__ */ Pe.jsx(
2170
+ const { host: u, port: l, getToken: a } = Lr(), f = Hn(null), [d, p] = Gn();
2171
+ return Yn(() => {
2172
+ (async () => {
2173
+ const g = await a(), R = `${`${u}:${l}`}?jwt=${encodeURIComponent(g)}`;
2174
+ p(R);
2175
+ })();
2176
+ }, [u, l, a]), d ? /* @__PURE__ */ Pe.jsx(
2174
2177
  "div",
2175
2178
  {
2176
2179
  className: `folio-embed-container ${i}`,
2177
2180
  style: {
2178
2181
  width: e,
2179
- height: t,
2182
+ height: r,
2180
2183
  overflow: "hidden",
2181
2184
  ...n
2182
2185
  },
2183
2186
  children: /* @__PURE__ */ Pe.jsx(
2184
2187
  "iframe",
2185
2188
  {
2186
- ref: a,
2187
- src: f,
2189
+ ref: f,
2190
+ src: d,
2188
2191
  width: "100%",
2189
2192
  height: "100%",
2190
2193
  style: {
@@ -2193,7 +2196,7 @@ function eo({
2193
2196
  height: "100%",
2194
2197
  overflow: "auto"
2195
2198
  },
2196
- allow: r,
2199
+ allow: t,
2197
2200
  allowFullScreen: !0,
2198
2201
  ...s
2199
2202
  }
@@ -2201,63 +2204,63 @@ function eo({
2201
2204
  }
2202
2205
  ) : null;
2203
2206
  }
2204
- function to() {
2205
- const { client: e } = Lt(), [t, r] = Ee(!1), [n, i] = Ee(null);
2207
+ function Qn() {
2208
+ const { client: e } = Lr(), [r, t] = Ee(!1), [n, i] = Ee(null);
2206
2209
  return {
2207
- isLoading: t,
2210
+ isLoading: r,
2208
2211
  error: n,
2209
2212
  getProjectsForUser: async () => {
2210
2213
  for (; !e; )
2211
2214
  await new Promise((f) => setTimeout(f, 100));
2212
- r(!0), i(null);
2215
+ t(!0), i(null);
2213
2216
  try {
2214
2217
  return await e.getProjectsForUser();
2215
2218
  } catch (f) {
2216
2219
  return i(f instanceof Error ? f : new Error(String(f))), [];
2217
2220
  } finally {
2218
- r(!1);
2221
+ t(!1);
2219
2222
  }
2220
2223
  },
2221
2224
  addProjectForUser: async (f) => {
2222
2225
  for (; !e; )
2223
- await new Promise((m) => setTimeout(m, 100));
2224
- r(!0), i(null);
2226
+ await new Promise((d) => setTimeout(d, 100));
2227
+ t(!0), i(null);
2225
2228
  try {
2226
2229
  return await e.addProjectForUser(f);
2227
- } catch (m) {
2228
- return i(m instanceof Error ? m : new Error(String(m))), null;
2230
+ } catch (d) {
2231
+ return i(d instanceof Error ? d : new Error(String(d))), null;
2229
2232
  } finally {
2230
- r(!1);
2233
+ t(!1);
2231
2234
  }
2232
2235
  },
2233
- addFilesToProject: async (f, m) => {
2236
+ addFilesToProject: async (f, d) => {
2234
2237
  for (; !e; )
2235
2238
  await new Promise((p) => setTimeout(p, 100));
2236
- r(!0), i(null);
2239
+ t(!0), i(null);
2237
2240
  try {
2238
- return await e.addFilesToProject(f, m);
2241
+ return await e.addFilesToProject(f, d);
2239
2242
  } catch (p) {
2240
2243
  return i(p instanceof Error ? p : new Error(String(p))), null;
2241
2244
  } finally {
2242
- r(!1);
2245
+ t(!1);
2243
2246
  }
2244
2247
  },
2245
2248
  getFilesForProject: async (f) => {
2246
2249
  for (; !e; )
2247
- await new Promise((m) => setTimeout(m, 100));
2248
- r(!0), i(null);
2250
+ await new Promise((d) => setTimeout(d, 100));
2251
+ t(!0), i(null);
2249
2252
  try {
2250
2253
  return await e.getFilesForProject(f);
2251
- } catch (m) {
2252
- return i(m instanceof Error ? m : new Error(String(m))), [];
2254
+ } catch (d) {
2255
+ return i(d instanceof Error ? d : new Error(String(d))), [];
2253
2256
  } finally {
2254
- r(!1);
2257
+ t(!1);
2255
2258
  }
2256
2259
  }
2257
2260
  };
2258
2261
  }
2259
2262
  export {
2260
- eo as FolioEmbed,
2261
- Qn as FolioProvider,
2262
- to as useFolio
2263
+ Zn as FolioEmbed,
2264
+ Jn as FolioProvider,
2265
+ Qn as useFolio
2263
2266
  };