@shiftengineering/folio 0.0.88 → 0.0.90

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.
@@ -29,10 +29,10 @@ function Bs() {
29
29
  Yr = 1;
30
30
  var t = Dn, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
31
31
  function u(l, c, d) {
32
- var y, f = {}, p = null, g = null;
32
+ var h, f = {}, p = null, g = null;
33
33
  d !== void 0 && (p = "" + d), c.key !== void 0 && (p = "" + c.key), c.ref !== void 0 && (g = c.ref);
34
- for (y in c) n.call(c, y) && !a.hasOwnProperty(y) && (f[y] = c[y]);
35
- if (l && l.defaultProps) for (y in c = l.defaultProps, c) f[y] === void 0 && (f[y] = c[y]);
34
+ for (h in c) n.call(c, h) && !a.hasOwnProperty(h) && (f[h] = c[h]);
35
+ if (l && l.defaultProps) for (h in c = l.defaultProps, c) f[h] === void 0 && (f[h] = c[h]);
36
36
  return { $$typeof: e, type: l, key: p, ref: g, props: f, _owner: s.current };
37
37
  }
38
38
  return ft.Fragment = r, ft.jsx = u, ft.jsxs = u, ft;
@@ -50,45 +50,45 @@ var ht = {};
50
50
  var Jr;
51
51
  function Ws() {
52
52
  return Jr || (Jr = 1, process.env.NODE_ENV !== "production" && function() {
53
- var t = Dn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), O = Symbol.iterator, v = "@@iterator";
53
+ var t = Dn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), O = Symbol.iterator, v = "@@iterator";
54
54
  function R(i) {
55
55
  if (i === null || typeof i != "object")
56
56
  return null;
57
- var h = O && i[O] || i[v];
58
- return typeof h == "function" ? h : null;
57
+ var y = O && i[O] || i[v];
58
+ return typeof y == "function" ? y : null;
59
59
  }
60
60
  var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
61
61
  function C(i) {
62
62
  {
63
- for (var h = arguments.length, b = new Array(h > 1 ? h - 1 : 0), E = 1; E < h; E++)
63
+ for (var y = arguments.length, b = new Array(y > 1 ? y - 1 : 0), E = 1; E < y; E++)
64
64
  b[E - 1] = arguments[E];
65
65
  j("error", i, b);
66
66
  }
67
67
  }
68
- function j(i, h, b) {
68
+ function j(i, y, b) {
69
69
  {
70
70
  var E = A.ReactDebugCurrentFrame, _ = E.getStackAddendum();
71
- _ !== "" && (h += "%s", b = b.concat([_]));
71
+ _ !== "" && (y += "%s", b = b.concat([_]));
72
72
  var I = b.map(function(F) {
73
73
  return String(F);
74
74
  });
75
- I.unshift("Warning: " + h), Function.prototype.apply.call(console[i], console, I);
75
+ I.unshift("Warning: " + y), Function.prototype.apply.call(console[i], console, I);
76
76
  }
77
77
  }
78
78
  var Q = !1, z = !1, X = !1, K = !1, q = !1, D;
79
79
  D = Symbol.for("react.module.reference");
80
80
  function ye(i) {
81
- return !!(typeof i == "string" || typeof i == "function" || i === n || i === a || q || i === s || i === d || i === y || K || i === g || Q || z || X || typeof i == "object" && i !== null && (i.$$typeof === p || i.$$typeof === f || i.$$typeof === u || i.$$typeof === l || i.$$typeof === c || // This needs to include all possible module reference object
81
+ return !!(typeof i == "string" || typeof i == "function" || i === n || i === a || q || i === s || i === d || i === h || K || i === g || Q || z || X || typeof i == "object" && i !== null && (i.$$typeof === p || i.$$typeof === f || i.$$typeof === u || i.$$typeof === l || i.$$typeof === c || // This needs to include all possible module reference object
82
82
  // types supported by any Flight configuration anywhere since
83
83
  // we don't know which Flight build this will end up being used
84
84
  // with.
85
85
  i.$$typeof === D || i.getModuleId !== void 0));
86
86
  }
87
- function pe(i, h, b) {
87
+ function pe(i, y, b) {
88
88
  var E = i.displayName;
89
89
  if (E)
90
90
  return E;
91
- var _ = h.displayName || h.name || "";
91
+ var _ = y.displayName || y.name || "";
92
92
  return _ !== "" ? b + "(" + _ + ")" : b;
93
93
  }
94
94
  function Fe(i) {
@@ -112,14 +112,14 @@ function Ws() {
112
112
  return "StrictMode";
113
113
  case d:
114
114
  return "Suspense";
115
- case y:
115
+ case h:
116
116
  return "SuspenseList";
117
117
  }
118
118
  if (typeof i == "object")
119
119
  switch (i.$$typeof) {
120
120
  case l:
121
- var h = i;
122
- return Fe(h) + ".Consumer";
121
+ var y = i;
122
+ return Fe(y) + ".Consumer";
123
123
  case u:
124
124
  var b = i;
125
125
  return Fe(b._context) + ".Provider";
@@ -202,7 +202,7 @@ function Ws() {
202
202
  }
203
203
  }
204
204
  var Qt = A.ReactCurrentDispatcher, $t;
205
- function Ct(i, h, b) {
205
+ function Ct(i, y, b) {
206
206
  {
207
207
  if ($t === void 0)
208
208
  try {
@@ -220,7 +220,7 @@ function Ws() {
220
220
  var gs = typeof WeakMap == "function" ? WeakMap : Map;
221
221
  Tt = new gs();
222
222
  }
223
- function Dr(i, h) {
223
+ function Dr(i, y) {
224
224
  if (!i || Kt)
225
225
  return "";
226
226
  {
@@ -235,7 +235,7 @@ function Ws() {
235
235
  var I;
236
236
  I = Qt.current, Qt.current = null, ps();
237
237
  try {
238
- if (h) {
238
+ if (y) {
239
239
  var F = function() {
240
240
  throw Error();
241
241
  };
@@ -291,14 +291,14 @@ function Ws() {
291
291
  var Ve = i ? i.displayName || i.name : "", _e = Ve ? Ct(Ve) : "";
292
292
  return typeof i == "function" && Tt.set(i, _e), _e;
293
293
  }
294
- function bs(i, h, b) {
294
+ function bs(i, y, b) {
295
295
  return Dr(i, !1);
296
296
  }
297
297
  function vs(i) {
298
- var h = i.prototype;
299
- return !!(h && h.isReactComponent);
298
+ var y = i.prototype;
299
+ return !!(y && y.isReactComponent);
300
300
  }
301
- function xt(i, h, b) {
301
+ function xt(i, y, b) {
302
302
  if (i == null)
303
303
  return "";
304
304
  if (typeof i == "function")
@@ -308,7 +308,7 @@ function Ws() {
308
308
  switch (i) {
309
309
  case d:
310
310
  return Ct("Suspense");
311
- case y:
311
+ case h:
312
312
  return Ct("SuspenseList");
313
313
  }
314
314
  if (typeof i == "object")
@@ -316,11 +316,11 @@ function Ws() {
316
316
  case c:
317
317
  return bs(i.render);
318
318
  case f:
319
- return xt(i.type, h, b);
319
+ return xt(i.type, y, b);
320
320
  case p: {
321
321
  var E = i, _ = E._payload, I = E._init;
322
322
  try {
323
- return xt(I(_), h, b);
323
+ return xt(I(_), y, b);
324
324
  } catch {
325
325
  }
326
326
  }
@@ -330,12 +330,12 @@ function Ws() {
330
330
  var lt = Object.prototype.hasOwnProperty, jr = {}, qr = A.ReactDebugCurrentFrame;
331
331
  function Ft(i) {
332
332
  if (i) {
333
- var h = i._owner, b = xt(i.type, i._source, h ? h.type : null);
333
+ var y = i._owner, b = xt(i.type, i._source, y ? y.type : null);
334
334
  qr.setExtraStackFrame(b);
335
335
  } else
336
336
  qr.setExtraStackFrame(null);
337
337
  }
338
- function ws(i, h, b, E, _) {
338
+ function ws(i, y, b, E, _) {
339
339
  {
340
340
  var I = Function.call.bind(lt);
341
341
  for (var F in i)
@@ -346,7 +346,7 @@ function Ws() {
346
346
  var H = Error((E || "React class") + ": " + b + " type `" + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[F] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
347
347
  throw H.name = "Invariant Violation", H;
348
348
  }
349
- S = i[F](h, F, E, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
349
+ S = i[F](y, F, E, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
350
350
  } catch (U) {
351
351
  S = U;
352
352
  }
@@ -360,7 +360,7 @@ function Ws() {
360
360
  }
361
361
  function Rs(i) {
362
362
  {
363
- var h = typeof Symbol == "function" && Symbol.toStringTag, b = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
363
+ var y = typeof Symbol == "function" && Symbol.toStringTag, b = y && i[Symbol.toStringTag] || i.constructor.name || "Object";
364
364
  return b;
365
365
  }
366
366
  }
@@ -386,27 +386,27 @@ function Ws() {
386
386
  }, Lr, Qr;
387
387
  function Ss(i) {
388
388
  if (lt.call(i, "ref")) {
389
- var h = Object.getOwnPropertyDescriptor(i, "ref").get;
390
- if (h && h.isReactWarning)
389
+ var y = Object.getOwnPropertyDescriptor(i, "ref").get;
390
+ if (y && y.isReactWarning)
391
391
  return !1;
392
392
  }
393
393
  return i.ref !== void 0;
394
394
  }
395
395
  function Cs(i) {
396
396
  if (lt.call(i, "key")) {
397
- var h = Object.getOwnPropertyDescriptor(i, "key").get;
398
- if (h && h.isReactWarning)
397
+ var y = Object.getOwnPropertyDescriptor(i, "key").get;
398
+ if (y && y.isReactWarning)
399
399
  return !1;
400
400
  }
401
401
  return i.key !== void 0;
402
402
  }
403
- function Ts(i, h) {
403
+ function Ts(i, y) {
404
404
  typeof i.ref == "string" && Nr.current;
405
405
  }
406
- function xs(i, h) {
406
+ function xs(i, y) {
407
407
  {
408
408
  var b = function() {
409
- Lr || (Lr = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
409
+ Lr || (Lr = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
410
410
  };
411
411
  b.isReactWarning = !0, Object.defineProperty(i, "key", {
412
412
  get: b,
@@ -414,10 +414,10 @@ function Ws() {
414
414
  });
415
415
  }
416
416
  }
417
- function Fs(i, h) {
417
+ function Fs(i, y) {
418
418
  {
419
419
  var b = function() {
420
- Qr || (Qr = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
420
+ Qr || (Qr = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
421
421
  };
422
422
  b.isReactWarning = !0, Object.defineProperty(i, "ref", {
423
423
  get: b,
@@ -425,13 +425,13 @@ function Ws() {
425
425
  });
426
426
  }
427
427
  }
428
- var As = function(i, h, b, E, _, I, F) {
428
+ var As = function(i, y, b, E, _, I, F) {
429
429
  var S = {
430
430
  // This tag allows us to uniquely identify this as a React Element
431
431
  $$typeof: e,
432
432
  // Built-in properties that belong on the element
433
433
  type: i,
434
- key: h,
434
+ key: y,
435
435
  ref: b,
436
436
  props: F,
437
437
  // Record the component responsible for creating this element.
@@ -454,12 +454,12 @@ function Ws() {
454
454
  value: _
455
455
  }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
456
456
  };
457
- function _s(i, h, b, E, _) {
457
+ function _s(i, y, b, E, _) {
458
458
  {
459
459
  var I, F = {}, S = null, H = null;
460
- b !== void 0 && (Ur(b), S = "" + b), Cs(h) && (Ur(h.key), S = "" + h.key), Ss(h) && (H = h.ref, Ts(h, _));
461
- for (I in h)
462
- lt.call(h, I) && !Ps.hasOwnProperty(I) && (F[I] = h[I]);
460
+ b !== void 0 && (Ur(b), S = "" + b), Cs(y) && (Ur(y.key), S = "" + y.key), Ss(y) && (H = y.ref, Ts(y, _));
461
+ for (I in y)
462
+ lt.call(y, I) && !Ps.hasOwnProperty(I) && (F[I] = y[I]);
463
463
  if (i && i.defaultProps) {
464
464
  var U = i.defaultProps;
465
465
  for (I in U)
@@ -475,7 +475,7 @@ function Ws() {
475
475
  var zt = A.ReactCurrentOwner, $r = A.ReactDebugCurrentFrame;
476
476
  function Ke(i) {
477
477
  if (i) {
478
- var h = i._owner, b = xt(i.type, i._source, h ? h.type : null);
478
+ var y = i._owner, b = xt(i.type, i._source, y ? y.type : null);
479
479
  $r.setExtraStackFrame(b);
480
480
  } else
481
481
  $r.setExtraStackFrame(null);
@@ -503,22 +503,22 @@ Check the render method of \`` + i + "`.";
503
503
  var Vr = {};
504
504
  function Is(i) {
505
505
  {
506
- var h = Kr();
507
- if (!h) {
506
+ var y = Kr();
507
+ if (!y) {
508
508
  var b = typeof i == "string" ? i : i.displayName || i.name;
509
- b && (h = `
509
+ b && (y = `
510
510
 
511
511
  Check the top-level render call using <` + b + ">.");
512
512
  }
513
- return h;
513
+ return y;
514
514
  }
515
515
  }
516
- function zr(i, h) {
516
+ function zr(i, y) {
517
517
  {
518
518
  if (!i._store || i._store.validated || i.key != null)
519
519
  return;
520
520
  i._store.validated = !0;
521
- var b = Is(h);
521
+ var b = Is(y);
522
522
  if (Vr[b])
523
523
  return;
524
524
  Vr[b] = !0;
@@ -526,14 +526,14 @@ Check the top-level render call using <` + b + ">.");
526
526
  i && i._owner && i._owner !== zt.current && (E = " It was passed a child from " + me(i._owner.type) + "."), Ke(i), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, E), Ke(null);
527
527
  }
528
528
  }
529
- function Hr(i, h) {
529
+ function Hr(i, y) {
530
530
  {
531
531
  if (typeof i != "object")
532
532
  return;
533
533
  if (Vt(i))
534
534
  for (var b = 0; b < i.length; b++) {
535
535
  var E = i[b];
536
- Bt(E) && zr(E, h);
536
+ Bt(E) && zr(E, y);
537
537
  }
538
538
  else if (Bt(i))
539
539
  i._store && (i._store.validated = !0);
@@ -541,39 +541,39 @@ Check the top-level render call using <` + b + ">.");
541
541
  var _ = R(i);
542
542
  if (typeof _ == "function" && _ !== i.entries)
543
543
  for (var I = _.call(i), F; !(F = I.next()).done; )
544
- Bt(F.value) && zr(F.value, h);
544
+ Bt(F.value) && zr(F.value, y);
545
545
  }
546
546
  }
547
547
  }
548
548
  function Ds(i) {
549
549
  {
550
- var h = i.type;
551
- if (h == null || typeof h == "string")
550
+ var y = i.type;
551
+ if (y == null || typeof y == "string")
552
552
  return;
553
553
  var b;
554
- if (typeof h == "function")
555
- b = h.propTypes;
556
- else if (typeof h == "object" && (h.$$typeof === c || // Note: Memo only checks outer props here.
554
+ if (typeof y == "function")
555
+ b = y.propTypes;
556
+ else if (typeof y == "object" && (y.$$typeof === c || // Note: Memo only checks outer props here.
557
557
  // Inner props are checked in the reconciler.
558
- h.$$typeof === f))
559
- b = h.propTypes;
558
+ y.$$typeof === f))
559
+ b = y.propTypes;
560
560
  else
561
561
  return;
562
562
  if (b) {
563
- var E = me(h);
563
+ var E = me(y);
564
564
  ws(b, i.props, "prop", E, i);
565
- } else if (h.PropTypes !== void 0 && !Ht) {
565
+ } else if (y.PropTypes !== void 0 && !Ht) {
566
566
  Ht = !0;
567
- var _ = me(h);
567
+ var _ = me(y);
568
568
  C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
569
569
  }
570
- typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
570
+ typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
571
571
  }
572
572
  }
573
573
  function js(i) {
574
574
  {
575
- for (var h = Object.keys(i.props), b = 0; b < h.length; b++) {
576
- var E = h[b];
575
+ for (var y = Object.keys(i.props), b = 0; b < y.length; b++) {
576
+ var E = y[b];
577
577
  if (E !== "children" && E !== "key") {
578
578
  Ke(i), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), Ke(null);
579
579
  break;
@@ -583,7 +583,7 @@ Check the top-level render call using <` + b + ">.");
583
583
  }
584
584
  }
585
585
  var Br = {};
586
- function Wr(i, h, b, E, _, I) {
586
+ function Wr(i, y, b, E, _, I) {
587
587
  {
588
588
  var F = ye(i);
589
589
  if (!F) {
@@ -594,11 +594,11 @@ Check the top-level render call using <` + b + ">.");
594
594
  var U;
595
595
  i === null ? U = "null" : Vt(i) ? U = "array" : i !== void 0 && i.$$typeof === e ? (U = "<" + (me(i.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : U = typeof i, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, S);
596
596
  }
597
- var N = _s(i, h, b, _, I);
597
+ var N = _s(i, y, b, _, I);
598
598
  if (N == null)
599
599
  return N;
600
600
  if (F) {
601
- var Z = h.children;
601
+ var Z = y.children;
602
602
  if (Z !== void 0)
603
603
  if (E)
604
604
  if (Vt(Z)) {
@@ -610,8 +610,8 @@ Check the top-level render call using <` + b + ">.");
610
610
  else
611
611
  Hr(Z, i);
612
612
  }
613
- if (lt.call(h, "key")) {
614
- var _e = me(i), G = Object.keys(h).filter(function(Qs) {
613
+ if (lt.call(y, "key")) {
614
+ var _e = me(i), G = Object.keys(y).filter(function(Qs) {
615
615
  return Qs !== "key";
616
616
  }), Wt = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
617
617
  if (!Br[_e + Wt]) {
@@ -627,11 +627,11 @@ React keys must be passed directly to JSX without using spread:
627
627
  return i === n ? js(N) : Ds(N), N;
628
628
  }
629
629
  }
630
- function qs(i, h, b) {
631
- return Wr(i, h, b, !0);
630
+ function qs(i, y, b) {
631
+ return Wr(i, y, b, !0);
632
632
  }
633
- function Ms(i, h, b) {
634
- return Wr(i, h, b, !1);
633
+ function Ms(i, y, b) {
634
+ return Wr(i, y, b, !1);
635
635
  }
636
636
  var Us = Ms, Ns = qs;
637
637
  ht.Fragment = n, ht.jsx = Us, ht.jsxs = Ns;
@@ -757,8 +757,8 @@ function sr(t, e) {
757
757
  const n = r ? t : Object.keys(t), s = n.length, a = r ? e : Object.keys(e), u = a.length, l = r ? [] : {};
758
758
  let c = 0;
759
759
  for (let d = 0; d < u; d++) {
760
- const y = r ? d : a[d];
761
- (!r && n.includes(y) || r) && t[y] === void 0 && e[y] === void 0 ? (l[y] = void 0, c++) : (l[y] = sr(t[y], e[y]), l[y] === t[y] && t[y] !== void 0 && c++);
760
+ const h = r ? d : a[d];
761
+ (!r && n.includes(h) || r) && t[h] === void 0 && e[h] === void 0 ? (l[h] = void 0, c++) : (l[h] = sr(t[h], e[h]), l[h] === t[h] && t[h] !== void 0 && c++);
762
762
  }
763
763
  return s === u && c === s ? t : l;
764
764
  }
@@ -943,7 +943,7 @@ function Ln(t) {
943
943
  e = !0;
944
944
  }, c = () => {
945
945
  e = !1;
946
- }, d = () => Pr.isFocused() && (t.networkMode === "always" || Mt.isOnline()) && t.canRun(), y = () => Un(t.networkMode) && t.canRun(), f = (v) => {
946
+ }, d = () => Pr.isFocused() && (t.networkMode === "always" || Mt.isOnline()) && t.canRun(), h = () => Un(t.networkMode) && t.canRun(), f = (v) => {
947
947
  var R;
948
948
  n || (n = !0, (R = t.onSuccess) == null || R.call(t, v), s == null || s(), a.resolve(v));
949
949
  }, p = (v) => {
@@ -987,8 +987,8 @@ function Ln(t) {
987
987
  continue: () => (s == null || s(), a),
988
988
  cancelRetry: l,
989
989
  continueRetry: c,
990
- canStart: y,
991
- start: () => (y() ? O() : g().then(O), a)
990
+ canStart: h,
991
+ start: () => (h() ? O() : g().then(O), a)
992
992
  };
993
993
  }
994
994
  function si() {
@@ -1159,7 +1159,7 @@ var L = si(), De, wn, Qn = (wn = class {
1159
1159
  this.state.isInvalidated || P(this, re, le).call(this, { type: "invalidate" });
1160
1160
  }
1161
1161
  fetch(e, r) {
1162
- var c, d, y;
1162
+ var c, d, h;
1163
1163
  if (this.state.fetchStatus !== "idle") {
1164
1164
  if (this.state.data !== void 0 && (r != null && r.cancelRefetch))
1165
1165
  this.cancel({ silent: !0 });
@@ -1200,7 +1200,7 @@ var L = si(), De, wn, Qn = (wn = class {
1200
1200
  s(u), (c = this.options.behavior) == null || c.onFetch(
1201
1201
  u,
1202
1202
  this
1203
- ), m(this, Je, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && P(this, re, le).call(this, { type: "fetch", meta: (y = u.fetchOptions) == null ? void 0 : y.meta });
1203
+ ), m(this, Je, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && P(this, re, le).call(this, { type: "fetch", meta: (h = u.fetchOptions) == null ? void 0 : h.meta });
1204
1204
  const l = (f) => {
1205
1205
  var p, g, O, v;
1206
1206
  Jt(f) && f.silent || P(this, re, le).call(this, {
@@ -1466,7 +1466,7 @@ var oe, Rn, ai = (Rn = class extends at {
1466
1466
  this.execute(this.state.variables);
1467
1467
  }
1468
1468
  async execute(e) {
1469
- var s, a, u, l, c, d, y, f, p, g, O, v, R, A, C, j, Q, z, X, K;
1469
+ var s, a, u, l, c, d, h, f, p, g, O, v, R, A, C, j, Q, z, X, K;
1470
1470
  m(this, Me, Ln({
1471
1471
  fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
1472
1472
  onFail: (q, D) => {
@@ -1506,7 +1506,7 @@ var oe, Rn, ai = (Rn = class extends at {
1506
1506
  e,
1507
1507
  this.state.context,
1508
1508
  this
1509
- )), await ((f = (y = this.options).onSuccess) == null ? void 0 : f.call(y, q, e, this.state.context)), await ((g = (p = o(this, B).config).onSettled) == null ? void 0 : g.call(
1509
+ )), await ((f = (h = this.options).onSuccess) == null ? void 0 : f.call(h, q, e, this.state.context)), await ((g = (p = o(this, B).config).onSettled) == null ? void 0 : g.call(
1510
1510
  p,
1511
1511
  q,
1512
1512
  null,
@@ -1726,8 +1726,8 @@ function _t(t) {
1726
1726
  function rn(t) {
1727
1727
  return {
1728
1728
  onFetch: (e, r) => {
1729
- var y, f, p, g, O;
1730
- const n = e.options, s = (p = (f = (y = e.fetchOptions) == null ? void 0 : y.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : p.direction, a = ((g = e.state.data) == null ? void 0 : g.pages) || [], u = ((O = e.state.data) == null ? void 0 : O.pageParams) || [];
1729
+ var h, f, p, g, O;
1730
+ const n = e.options, s = (p = (f = (h = e.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : p.direction, a = ((g = e.state.data) == null ? void 0 : g.pages) || [], u = ((O = e.state.data) == null ? void 0 : O.pageParams) || [];
1731
1731
  let l = { pages: [], pageParams: [] }, c = 0;
1732
1732
  const d = async () => {
1733
1733
  let v = !1;
@@ -2117,13 +2117,13 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Sn, fi = (Sn = class {
2117
2117
  }
2118
2118
  createResult(e, r) {
2119
2119
  var q;
2120
- const n = o(this, T), s = this.options, a = o(this, W), u = o(this, Ue), l = o(this, rt), d = e !== n ? e.state : o(this, Ot), { state: y } = e;
2121
- let f = { ...y }, p = !1, g;
2120
+ const n = o(this, T), s = this.options, a = o(this, W), u = o(this, Ue), l = o(this, rt), d = e !== n ? e.state : o(this, Ot), { state: h } = e;
2121
+ let f = { ...h }, p = !1, g;
2122
2122
  if (r._optimisticResults) {
2123
2123
  const D = this.hasListeners(), ye = !D && sn(e, r), pe = D && on(e, n, r, s);
2124
2124
  (ye || pe) && (f = {
2125
2125
  ...f,
2126
- ...$n(y.data, e.options)
2126
+ ...$n(h.data, e.options)
2127
2127
  }), r._optimisticResults === "isRestoring" && (f.fetchStatus = "idle");
2128
2128
  }
2129
2129
  let { error: O, errorUpdatedAt: v, status: R } = f;
@@ -2221,8 +2221,8 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Sn, fi = (Sn = class {
2221
2221
  l ?? o(this, it)
2222
2222
  );
2223
2223
  return this.options.throwOnError && c.add("error"), Object.keys(o(this, W)).some((d) => {
2224
- const y = d;
2225
- return o(this, W)[y] !== r[y] && c.has(y);
2224
+ const h = d;
2225
+ return o(this, W)[h] !== r[h] && c.has(h);
2226
2226
  });
2227
2227
  };
2228
2228
  (e == null ? void 0 : e.listeners) !== !1 && a() && (s.listeners = !0), P(this, k, Vn).call(this, { ...s, ...e });
@@ -2355,17 +2355,17 @@ var Se, Ce, J, he, de, It, mr, Tn, pi = (Tn = class extends at {
2355
2355
  L.batch(() => {
2356
2356
  var r, n, s, a, u, l, c, d;
2357
2357
  if (o(this, he) && this.hasListeners()) {
2358
- const y = o(this, Ce).variables, f = o(this, Ce).context;
2359
- (e == null ? void 0 : e.type) === "success" ? ((n = (r = o(this, he)).onSuccess) == null || n.call(r, e.data, y, f), (a = (s = o(this, he)).onSettled) == null || a.call(s, e.data, null, y, f)) : (e == null ? void 0 : e.type) === "error" && ((l = (u = o(this, he)).onError) == null || l.call(u, e.error, y, f), (d = (c = o(this, he)).onSettled) == null || d.call(
2358
+ const h = o(this, Ce).variables, f = o(this, Ce).context;
2359
+ (e == null ? void 0 : e.type) === "success" ? ((n = (r = o(this, he)).onSuccess) == null || n.call(r, e.data, h, f), (a = (s = o(this, he)).onSettled) == null || a.call(s, e.data, null, h, f)) : (e == null ? void 0 : e.type) === "error" && ((l = (u = o(this, he)).onError) == null || l.call(u, e.error, h, f), (d = (c = o(this, he)).onSettled) == null || d.call(
2360
2360
  c,
2361
2361
  void 0,
2362
2362
  e.error,
2363
- y,
2363
+ h,
2364
2364
  f
2365
2365
  ));
2366
2366
  }
2367
- this.listeners.forEach((y) => {
2368
- y(o(this, Ce));
2367
+ this.listeners.forEach((h) => {
2368
+ h(o(this, Ce));
2369
2369
  });
2370
2370
  });
2371
2371
  }, Tn), zn = $.createContext(
@@ -2436,14 +2436,14 @@ function Ti(t, e, r) {
2436
2436
  n,
2437
2437
  u
2438
2438
  )
2439
- ), d = c.getOptimisticResult(u), y = !s && t.subscribed !== !1;
2439
+ ), d = c.getOptimisticResult(u), h = !s && t.subscribed !== !1;
2440
2440
  if ($.useSyncExternalStore(
2441
2441
  $.useCallback(
2442
2442
  (R) => {
2443
- const A = y ? c.subscribe(L.batchCalls(R)) : gr;
2443
+ const A = h ? c.subscribe(L.batchCalls(R)) : gr;
2444
2444
  return c.updateResult(), A;
2445
2445
  },
2446
- [c, y]
2446
+ [c, h]
2447
2447
  ),
2448
2448
  () => c.getCurrentResult(),
2449
2449
  () => c.getCurrentResult()
@@ -2671,19 +2671,19 @@ function Jn(t, e, r) {
2671
2671
  },
2672
2672
  apply(u, l, c) {
2673
2673
  const d = e[e.length - 1];
2674
- let y = {
2674
+ let h = {
2675
2675
  args: c,
2676
2676
  path: e
2677
2677
  };
2678
- return d === "call" ? y = {
2678
+ return d === "call" ? h = {
2679
2679
  args: c.length >= 2 ? [
2680
2680
  c[1]
2681
2681
  ] : [],
2682
2682
  path: e.slice(0, -1)
2683
- } : d === "apply" && (y = {
2683
+ } : d === "apply" && (h = {
2684
2684
  args: c.length >= 2 ? c[1] : [],
2685
2685
  path: e.slice(0, -1)
2686
- }), un(y.args), un(y.path), t(y);
2686
+ }), un(h.args), un(h.path), t(h);
2687
2687
  }
2688
2688
  })), r[a];
2689
2689
  }
@@ -2919,7 +2919,7 @@ function dn(t) {
2919
2919
  clearTimeout(r), r = null, e = null;
2920
2920
  };
2921
2921
  function s(l) {
2922
- var y, f;
2922
+ var h, f;
2923
2923
  const c = [
2924
2924
  []
2925
2925
  ];
@@ -2930,7 +2930,7 @@ function dn(t) {
2930
2930
  break;
2931
2931
  const g = c[c.length - 1];
2932
2932
  if (p.aborted) {
2933
- (y = p.reject) == null || y.call(p, new Error("Aborted")), d++;
2933
+ (h = p.reject) == null || h.call(p, new Error("Aborted")), d++;
2934
2934
  continue;
2935
2935
  }
2936
2936
  if (t.validate(g.concat(p).map((v) => v.key))) {
@@ -2985,8 +2985,8 @@ function dn(t) {
2985
2985
  batch: null,
2986
2986
  resolve: hn,
2987
2987
  reject: hn
2988
- }, d = new Promise((y, f) => {
2989
- c.reject = f, c.resolve = y, e || (e = []), e.push(c);
2988
+ }, d = new Promise((h, f) => {
2989
+ c.reject = f, c.resolve = h, e || (e = []), e.push(c);
2990
2990
  });
2991
2991
  return r || (r = setTimeout(a)), d;
2992
2992
  }
@@ -3114,20 +3114,20 @@ function io(t) {
3114
3114
  validate(c) {
3115
3115
  if (r === 1 / 0)
3116
3116
  return !0;
3117
- const d = c.map((p) => p.path).join(","), y = c.map((p) => p.input);
3117
+ const d = c.map((p) => p.path).join(","), h = c.map((p) => p.input);
3118
3118
  return Zn({
3119
3119
  ...e,
3120
3120
  type: l,
3121
3121
  path: d,
3122
- inputs: y,
3122
+ inputs: h,
3123
3123
  signal: null
3124
3124
  }).length <= r;
3125
3125
  },
3126
3126
  async fetch(c) {
3127
- const d = c.map((v) => v.path).join(","), y = c.map((v) => v.input), f = Wi(...c.map((v) => v.signal)), p = await eo({
3127
+ const d = c.map((v) => v.path).join(","), h = c.map((v) => v.input), f = Wi(...c.map((v) => v.signal)), p = await eo({
3128
3128
  ...e,
3129
3129
  path: d,
3130
- inputs: y,
3130
+ inputs: h,
3131
3131
  type: l,
3132
3132
  headers() {
3133
3133
  return t.headers ? typeof t.headers == "function" ? t.headers({
@@ -3149,9 +3149,9 @@ function io(t) {
3149
3149
  /* istanbul ignore if -- @preserve */
3150
3150
  if (l.type === "subscription")
3151
3151
  throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
3152
- const y = u[l.type].load(l);
3152
+ const h = u[l.type].load(l);
3153
3153
  let f;
3154
- return y.then((p) => {
3154
+ return h.then((p) => {
3155
3155
  f = p;
3156
3156
  const g = Mi(p.json, e.transformer.output);
3157
3157
  if (!g.ok) {
@@ -3230,11 +3230,11 @@ function ao(t) {
3230
3230
  if (t.colorMode === "none")
3231
3231
  l.push(e === "up" ? ">>" : "<<", r, `#${a}`, s);
3232
3232
  else if (t.colorMode === "ansi") {
3233
- const [d, y] = er.ansi.regular[r], [f, p] = er.ansi.bold[r];
3234
- l.push(e === "up" ? d : y, e === "up" ? ">>" : "<<", r, e === "up" ? f : p, `#${a}`, s, "\x1B[0m");
3233
+ const [d, h] = er.ansi.regular[r], [f, p] = er.ansi.bold[r];
3234
+ l.push(e === "up" ? d : h, e === "up" ? ">>" : "<<", r, e === "up" ? f : p, `#${a}`, s, "\x1B[0m");
3235
3235
  } else {
3236
- const [d, y] = er.css[r], f = `
3237
- background-color: #${e === "up" ? d : y};
3236
+ const [d, h] = er.css[r], f = `
3237
+ background-color: #${e === "up" ? d : h};
3238
3238
  color: ${e === "up" ? "black" : "white"};
3239
3239
  padding: 2px;
3240
3240
  `;
@@ -3283,25 +3283,25 @@ function co(t = {}) {
3283
3283
  direction: "up"
3284
3284
  });
3285
3285
  const c = Date.now();
3286
- function d(y) {
3286
+ function d(h) {
3287
3287
  const f = Date.now() - c;
3288
3288
  e({
3289
3289
  ...a,
3290
3290
  direction: "down",
3291
- result: y
3291
+ result: h
3292
3292
  }) && s({
3293
3293
  ...a,
3294
3294
  direction: "down",
3295
3295
  elapsedMs: f,
3296
- result: y
3296
+ result: h
3297
3297
  });
3298
3298
  }
3299
3299
  return u(a).pipe(_i({
3300
- next(y) {
3301
- d(y);
3300
+ next(h) {
3301
+ d(h);
3302
3302
  },
3303
- error(y) {
3304
- d(y);
3303
+ error(h) {
3304
+ d(h);
3305
3305
  }
3306
3306
  })).subscribe(l);
3307
3307
  });
@@ -3704,13 +3704,13 @@ const Mo = (t, e) => {
3704
3704
  } else if (vt(n)) {
3705
3705
  if (a === e.length - 2)
3706
3706
  break;
3707
- const c = +u, d = +e[++a] == 0 ? "key" : "value", y = ze(n, c);
3707
+ const c = +u, d = +e[++a] == 0 ? "key" : "value", h = ze(n, c);
3708
3708
  switch (d) {
3709
3709
  case "key":
3710
- n = y;
3710
+ n = h;
3711
3711
  break;
3712
3712
  case "value":
3713
- n = n.get(y);
3713
+ n = n.get(h);
3714
3714
  break;
3715
3715
  }
3716
3716
  }
@@ -3808,20 +3808,20 @@ const hs = (t, e, r, n, s = [], a = [], u = /* @__PURE__ */ new Map()) => {
3808
3808
  return {
3809
3809
  transformedValue: null
3810
3810
  };
3811
- const c = mn(t, r), d = (c == null ? void 0 : c.value) ?? t, y = xe(d) ? [] : {}, f = {};
3811
+ const c = mn(t, r), d = (c == null ? void 0 : c.value) ?? t, h = xe(d) ? [] : {}, f = {};
3812
3812
  ot(d, (g, O) => {
3813
3813
  if (O === "__proto__" || O === "constructor" || O === "prototype")
3814
3814
  throw new Error(`Detected property ${O}. This is a prototype pollution risk, please remove it from your object.`);
3815
3815
  const v = hs(g, e, r, n, [...s, O], [...a, t], u);
3816
- y[O] = v.transformedValue, xe(v.annotations) ? f[O] = v.annotations : bt(v.annotations) && ot(v.annotations, (R, A) => {
3816
+ h[O] = v.transformedValue, xe(v.annotations) ? f[O] = v.annotations : bt(v.annotations) && ot(v.annotations, (R, A) => {
3817
3817
  f[ns(O) + "." + A] = R;
3818
3818
  });
3819
3819
  });
3820
3820
  const p = br(f) ? {
3821
- transformedValue: y,
3821
+ transformedValue: h,
3822
3822
  annotations: c ? [c.type] : void 0
3823
3823
  } : {
3824
- transformedValue: y,
3824
+ transformedValue: h,
3825
3825
  annotations: c ? [c.type, f] : f
3826
3826
  };
3827
3827
  return l || u.set(t, p), p;
@@ -3930,7 +3930,7 @@ function zo(t, e) {
3930
3930
  const r = Hi({
3931
3931
  links: [
3932
3932
  co({
3933
- enabled: (n) => process.env.NODE_ENV === "development" && typeof window < "u" || n.direction === "down" && n.result instanceof Error
3933
+ enabled: (s) => process.env.NODE_ENV === "development" && typeof window < "u" || s.direction === "down" && s.result instanceof Error
3934
3934
  }),
3935
3935
  io({
3936
3936
  url: `${t}/trpc`,
@@ -3940,56 +3940,77 @@ function zo(t, e) {
3940
3940
  transformer: x
3941
3941
  })
3942
3942
  ]
3943
- });
3943
+ }), n = async (s, a) => {
3944
+ const u = a.filter((h) => h.name.toLowerCase().endsWith(".pdf"));
3945
+ if (u.length === 0)
3946
+ return { filesToCreate: [] };
3947
+ const l = await r.fileRouter.getFilesByProject.query({
3948
+ projectId: s
3949
+ }), c = u.filter(
3950
+ (h) => !l.some(
3951
+ (f) => f.path === h.blobUrl
3952
+ )
3953
+ );
3954
+ return c.length === 0 ? { filesToCreate: [] } : { filesToCreate: c.map((h) => ({
3955
+ projectId: s,
3956
+ mimeType: Rr.PDF,
3957
+ path: h.blobUrl,
3958
+ // Map blobUrl back to path for API
3959
+ name: h.name,
3960
+ size: 0,
3961
+ // You might need to calculate or pass size
3962
+ metadata: null,
3963
+ isArtifact: !1,
3964
+ summary: null,
3965
+ chunkingStatus: jn.NOT_CHUNKED
3966
+ })) };
3967
+ };
3944
3968
  return {
3945
- getProjectsForUser: async () => (await r.projectRouter.getAllProjects.query()).map((s) => ({
3946
- name: s.name,
3947
- id: s.id
3948
- })),
3949
- addProjectForUser: async (n) => {
3950
- const s = await r.projectRouter.createProject.mutate({
3951
- name: n
3969
+ getProjectsForUser: async () => {
3970
+ const s = await r.projectRouter.getAllProjects.query();
3971
+ if (s.length === 0) {
3972
+ const a = await r.projectRouter.createProject.mutate({
3973
+ name: "Default Project"
3974
+ });
3975
+ return [
3976
+ {
3977
+ name: a.name,
3978
+ id: a.id
3979
+ }
3980
+ ];
3981
+ }
3982
+ return s.map((a) => ({
3983
+ name: a.name,
3984
+ id: a.id
3985
+ }));
3986
+ },
3987
+ addProjectForUser: async (s) => {
3988
+ const a = await r.projectRouter.createProject.mutate({
3989
+ name: s
3952
3990
  });
3953
3991
  return {
3954
- name: s.name,
3955
- id: s.id
3992
+ name: a.name,
3993
+ id: a.id
3956
3994
  };
3957
3995
  },
3958
- addFilesToProject: async (n, s) => {
3959
- const a = [];
3960
- for (const u of s) {
3961
- const l = await r.fileRouter.createFile.mutate({
3962
- file: {
3963
- projectId: n,
3964
- mimeType: Rr.PDF,
3965
- // Adjust as needed
3966
- path: u.blobUrl,
3967
- // Map blobUrl back to path for API
3968
- name: u.name,
3969
- size: 0,
3970
- // You might need to calculate or pass size
3971
- metadata: null,
3972
- isArtifact: !1,
3973
- summary: null,
3974
- chunkingStatus: jn.NOT_CHUNKED
3975
- }
3976
- });
3977
- a.push({
3978
- blobUrl: l.path,
3979
- // Map path from API to blobUrl for client
3980
- name: l.name,
3981
- id: l.id
3982
- });
3983
- }
3984
- return a;
3996
+ addFilesToProject: async (s, a) => {
3997
+ const { filesToCreate: u } = await n(s, a);
3998
+ return u.length === 0 ? [] : (await r.fileRouter.createFiles.mutate({
3999
+ files: u
4000
+ })).map((c) => ({
4001
+ blobUrl: c.path,
4002
+ // Map path from API to blobUrl for client
4003
+ name: c.name,
4004
+ id: c.id
4005
+ }));
3985
4006
  },
3986
- getFilesForProject: async (n) => (await r.fileRouter.getFilesByProject.query({
3987
- projectId: n
3988
- })).map((a) => ({
3989
- blobUrl: a.path,
4007
+ getFilesForProject: async (s) => (await r.fileRouter.getFilesByProject.query({
4008
+ projectId: s
4009
+ })).map((u) => ({
4010
+ blobUrl: u.path,
3990
4011
  // Map path from API to blobUrl for client
3991
- name: a.name,
3992
- id: a.id
4012
+ name: u.name,
4013
+ id: u.id
3993
4014
  }))
3994
4015
  };
3995
4016
  }
@@ -4031,13 +4052,13 @@ function Xo({
4031
4052
  className: s = "",
4032
4053
  iframeProps: a = {}
4033
4054
  }) {
4034
- const { host: u, port: l, token: c } = St(), d = Bo(null), [y, f] = Wo();
4055
+ const { host: u, port: l, token: c } = St(), d = Bo(null), [h, f] = Wo();
4035
4056
  return Ho(() => {
4036
4057
  (() => {
4037
4058
  const O = `${`${u}:${l}`}?jwt=${encodeURIComponent(c)}`;
4038
4059
  f(O);
4039
4060
  })();
4040
- }, [u, l, c]), y ? /* @__PURE__ */ pt.jsx(
4061
+ }, [u, l, c]), h ? /* @__PURE__ */ pt.jsx(
4041
4062
  "div",
4042
4063
  {
4043
4064
  className: `folio-embed-container ${s}`,
@@ -4051,7 +4072,7 @@ function Xo({
4051
4072
  "iframe",
4052
4073
  {
4053
4074
  ref: d,
4054
- src: y,
4075
+ src: h,
4055
4076
  width: "100%",
4056
4077
  height: "100%",
4057
4078
  style: {