@qwanyx/stack 0.2.3 → 0.2.4

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.
package/dist/index.esm.js CHANGED
@@ -1,10 +1,20 @@
1
1
  var _t = Object.defineProperty;
2
- var jt = (f, t, r) => t in f ? _t(f, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : f[t] = r;
3
- var _e = (f, t, r) => jt(f, typeof t != "symbol" ? t + "" : t, r);
4
- import Ze, { useState as L, useCallback as X, useEffect as fe, useMemo as et, useRef as Xe } from "react";
2
+ var jt = (p, t, r) => t in p ? _t(p, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : p[t] = r;
3
+ var de = (p, t, r) => jt(p, typeof t != "symbol" ? t + "" : t, r);
4
+ import Ze, { useState as L, useCallback as Q, useEffect as pe, useMemo as et, useRef as Qe } from "react";
5
5
  class $t {
6
6
  constructor(t) {
7
- _e(this, "config");
7
+ de(this, "config");
8
+ // ===== FILE OPERATIONS =====
9
+ /**
10
+ * Options for file upload
11
+ */
12
+ de(this, "defaultUploadOptions", {
13
+ maxSizeMB: 10,
14
+ maxImageDimension: 0,
15
+ // 0 = no resize
16
+ imageQuality: 0.9
17
+ });
8
18
  if (!t.system_id)
9
19
  throw new Error("GraphClient: system_id is REQUIRED. No system_id → No start.");
10
20
  this.config = t;
@@ -32,10 +42,10 @@ class $t {
32
42
  const l = await i.text();
33
43
  throw new Error(`API error (${i.status}): ${l}`);
34
44
  }
35
- const o = await i.json();
36
- if (!o.success && o.error)
37
- throw new Error(o.error);
38
- return o;
45
+ const s = await i.json();
46
+ if (!s.success && s.error)
47
+ throw new Error(s.error);
48
+ return s;
39
49
  } catch (i) {
40
50
  throw console.error("Graph API call failed:", i), i;
41
51
  }
@@ -194,10 +204,120 @@ class $t {
194
204
  type: t
195
205
  })).result || [];
196
206
  }
207
+ /**
208
+ * Convert File to base64 string
209
+ */
210
+ fileToBase64(t) {
211
+ return new Promise((r, n) => {
212
+ const i = new FileReader();
213
+ i.onload = () => {
214
+ const l = i.result.split(",")[1];
215
+ r(l);
216
+ }, i.onerror = () => n(new Error("Failed to read file")), i.readAsDataURL(t);
217
+ });
218
+ }
219
+ /**
220
+ * Resize an image file if it exceeds maxDimension
221
+ * Returns the original file if not an image or no resize needed
222
+ */
223
+ async resizeImage(t, r, n) {
224
+ return t.type.startsWith("image/") ? new Promise((i) => {
225
+ const s = new Image(), l = URL.createObjectURL(t);
226
+ s.onload = () => {
227
+ if (URL.revokeObjectURL(l), s.width <= r && s.height <= r) {
228
+ i(t);
229
+ return;
230
+ }
231
+ let y, d;
232
+ s.width > s.height ? (y = r, d = Math.round(s.height / s.width * r)) : (d = r, y = Math.round(s.width / s.height * r));
233
+ const u = document.createElement("canvas");
234
+ u.width = y, u.height = d;
235
+ const x = u.getContext("2d");
236
+ if (!x) {
237
+ i(t);
238
+ return;
239
+ }
240
+ x.drawImage(s, 0, 0, y, d);
241
+ const w = t.type === "image/png" ? "image/png" : "image/jpeg";
242
+ u.toBlob(
243
+ (T) => {
244
+ if (T) {
245
+ const C = new File([T], t.name, { type: w });
246
+ i(C);
247
+ } else
248
+ i(t);
249
+ },
250
+ w,
251
+ n
252
+ );
253
+ }, s.onerror = () => {
254
+ URL.revokeObjectURL(l), i(t);
255
+ }, s.src = l;
256
+ }) : t;
257
+ }
258
+ /**
259
+ * Upload a file to a node
260
+ * @param nodeId - The node to attach the file to
261
+ * @param filename - The filename to use
262
+ * @param file - The File object to upload
263
+ * @param options - Upload options (maxSizeMB, maxImageDimension, imageQuality)
264
+ */
265
+ async uploadFile(t, r, n, i = {}) {
266
+ const s = { ...this.defaultUploadOptions, ...i };
267
+ try {
268
+ let l = n;
269
+ s.maxImageDimension > 0 && n.type.startsWith("image/") && (l = await this.resizeImage(n, s.maxImageDimension, s.imageQuality));
270
+ const y = s.maxSizeMB * 1024 * 1024;
271
+ if (l.size > y)
272
+ return {
273
+ success: !1,
274
+ error: `File too large (${(l.size / 1024 / 1024).toFixed(1)} MB). Max: ${s.maxSizeMB} MB`
275
+ };
276
+ const d = await this.fileToBase64(l), u = await this.callGraph("upload_file", {
277
+ node_id: t,
278
+ filename: r,
279
+ content: d
280
+ });
281
+ return u.success ? { success: !0, path: u.path } : { success: !1, error: u.error || "Upload failed" };
282
+ } catch (l) {
283
+ return {
284
+ success: !1,
285
+ error: l instanceof Error ? l.message : "Upload failed"
286
+ };
287
+ }
288
+ }
289
+ /**
290
+ * List files attached to a node
291
+ * @param nodeId - The node to list files for
292
+ */
293
+ async listFiles(t) {
294
+ return (await this.callGraph("list_files", {
295
+ node_id: t
296
+ })).files || [];
297
+ }
298
+ /**
299
+ * Delete a file from a node
300
+ * @param nodeId - The node the file belongs to
301
+ * @param filename - The filename to delete
302
+ */
303
+ async deleteFile(t, r) {
304
+ return { success: (await this.callGraph("delete_file", {
305
+ node_id: t,
306
+ filename: r
307
+ })).success || !1 };
308
+ }
309
+ /**
310
+ * Get the URL for a file
311
+ * @param nodeId - The node the file belongs to
312
+ * @param filename - The filename
313
+ */
314
+ getFileUrl(t, r) {
315
+ return `${this.config.baseUrl}/files/${this.config.system_id}/${t}/${r}`;
316
+ }
197
317
  }
198
318
  class Et {
199
319
  constructor(t) {
200
- _e(this, "config");
320
+ de(this, "config");
201
321
  if (!t.system_id)
202
322
  throw new Error("MailClient: system_id is REQUIRED");
203
323
  this.config = t;
@@ -228,10 +348,10 @@ class Et {
228
348
  const l = await i.text();
229
349
  throw new Error(`API error (${i.status}): ${l}`);
230
350
  }
231
- const o = await i.json();
232
- if (!o.success && o.error)
233
- throw new Error(o.error);
234
- return o.result;
351
+ const s = await i.json();
352
+ if (!s.success && s.error)
353
+ throw new Error(s.error);
354
+ return s.result;
235
355
  } catch (i) {
236
356
  throw console.error("Mail API call failed:", i), i;
237
357
  }
@@ -297,8 +417,8 @@ class Et {
297
417
  const n = [
298
418
  "SELECT INBOX",
299
419
  ...r.map((l) => `UID MOVE ${l} [Gmail]/Trash`)
300
- ], o = (await this.imapExec(t, n)).responses.filter((l) => l.ok && l.command === "UID MOVE").length;
301
- return { success: o > 0, moved: o };
420
+ ], s = (await this.imapExec(t, n)).responses.filter((l) => l.ok && l.command === "UID MOVE").length;
421
+ return { success: s > 0, moved: s };
302
422
  }
303
423
  /**
304
424
  * Archive emails (remove from inbox, keep in All Mail)
@@ -308,8 +428,8 @@ class Et {
308
428
  "SELECT INBOX",
309
429
  ...r.map((l) => `UID STORE ${l} +FLAGS (\\Deleted)`),
310
430
  "EXPUNGE"
311
- ], o = (await this.imapExec(t, n)).responses.filter((l) => l.ok && l.command === "UID STORE").length;
312
- return { success: o > 0, archived: o };
431
+ ], s = (await this.imapExec(t, n)).responses.filter((l) => l.ok && l.command === "UID STORE").length;
432
+ return { success: s > 0, archived: s };
313
433
  }
314
434
  /**
315
435
  * List available folders
@@ -319,7 +439,7 @@ class Et {
319
439
  return n != null && n.ok && n.folders ? { success: !0, folders: n.folders } : { success: !1, folders: [] };
320
440
  }
321
441
  }
322
- const $e = "qwanyx_auth_token", De = "qwanyx_refresh_token";
442
+ const $e = "qwanyx_auth_token", Fe = "qwanyx_refresh_token";
323
443
  class Rt {
324
444
  /**
325
445
  * Store authentication token
@@ -337,19 +457,19 @@ class Rt {
337
457
  * Remove authentication token
338
458
  */
339
459
  static clearToken() {
340
- typeof window < "u" && (localStorage.removeItem($e), localStorage.removeItem(De));
460
+ typeof window < "u" && (localStorage.removeItem($e), localStorage.removeItem(Fe));
341
461
  }
342
462
  /**
343
463
  * Store refresh token
344
464
  */
345
465
  static setRefreshToken(t) {
346
- typeof window < "u" && localStorage.setItem(De, t);
466
+ typeof window < "u" && localStorage.setItem(Fe, t);
347
467
  }
348
468
  /**
349
469
  * Get refresh token
350
470
  */
351
471
  static getRefreshToken() {
352
- return typeof window < "u" ? localStorage.getItem(De) : null;
472
+ return typeof window < "u" ? localStorage.getItem(Fe) : null;
353
473
  }
354
474
  /**
355
475
  * Check if user is authenticated
@@ -367,7 +487,7 @@ class Rt {
367
487
  }
368
488
  class Tt {
369
489
  constructor(t) {
370
- _e(this, "config");
490
+ de(this, "config");
371
491
  this.config = {
372
492
  timeout: 3e4,
373
493
  headers: {
@@ -383,8 +503,8 @@ class Tt {
383
503
  if (!t || Object.keys(t).length === 0)
384
504
  return "";
385
505
  const r = new URLSearchParams();
386
- Object.entries(t).forEach(([i, o]) => {
387
- o != null && r.append(i, String(o));
506
+ Object.entries(t).forEach(([i, s]) => {
507
+ s != null && r.append(i, String(s));
388
508
  });
389
509
  const n = r.toString();
390
510
  return n ? `?${n}` : "";
@@ -396,29 +516,29 @@ class Tt {
396
516
  const {
397
517
  method: n = "GET",
398
518
  headers: i = {},
399
- body: o,
519
+ body: s,
400
520
  params: l
401
- } = r, v = `${this.config.baseUrl}/${t}${this.buildQueryString(l)}`, d = {
521
+ } = r, y = `${this.config.baseUrl}/${t}${this.buildQueryString(l)}`, d = {
402
522
  ...this.config.headers,
403
523
  ...Rt.getAuthHeader(),
404
524
  ...i
405
- }, h = {
525
+ }, u = {
406
526
  method: n,
407
527
  headers: d
408
528
  };
409
- o && n !== "GET" && (h.body = JSON.stringify(o));
529
+ s && n !== "GET" && (u.body = JSON.stringify(s));
410
530
  try {
411
- const x = new AbortController(), _ = setTimeout(() => x.abort(), this.config.timeout), S = await fetch(v, {
412
- ...h,
531
+ const x = new AbortController(), w = setTimeout(() => x.abort(), this.config.timeout), T = await fetch(y, {
532
+ ...u,
413
533
  signal: x.signal
414
534
  });
415
- if (clearTimeout(_), !S.ok) {
416
- const $ = await S.json().catch(() => ({
417
- message: S.statusText
535
+ if (clearTimeout(w), !T.ok) {
536
+ const C = await T.json().catch(() => ({
537
+ message: T.statusText
418
538
  }));
419
- throw new Error($.message || `HTTP ${S.status}`);
539
+ throw new Error(C.message || `HTTP ${T.status}`);
420
540
  }
421
- return await S.json();
541
+ return await T.json();
422
542
  } catch (x) {
423
543
  throw x instanceof Error ? x : new Error("An unexpected error occurred");
424
544
  }
@@ -467,87 +587,87 @@ class Tt {
467
587
  }
468
588
  }
469
589
  let Ee = null;
470
- function Dt(f) {
471
- return Ee = new Tt(f), Ee;
590
+ function Ft(p) {
591
+ return Ee = new Tt(p), Ee;
472
592
  }
473
593
  function tt() {
474
594
  if (!Ee)
475
595
  throw new Error("API client not initialized. Call initializeApiClient() first.");
476
596
  return Ee;
477
597
  }
478
- function kt(f, t, r = {}) {
598
+ function kt(p, t, r = {}) {
479
599
  const {
480
600
  enabled: n = !0,
481
601
  refetchOnMount: i = !0,
482
- onSuccess: o,
602
+ onSuccess: s,
483
603
  onError: l
484
- } = r, [v, d] = L(null), [h, x] = L(n), [_, S] = L(null), $ = X(async () => {
604
+ } = r, [y, d] = L(null), [u, x] = L(n), [w, T] = L(null), C = Q(async () => {
485
605
  if (n) {
486
- x(!0), S(null);
606
+ x(!0), T(null);
487
607
  try {
488
- const N = await tt().get(f, t);
489
- d(N), o == null || o(N);
608
+ const O = await tt().get(p, t);
609
+ d(O), s == null || s(O);
490
610
  } catch (P) {
491
- const N = P instanceof Error ? P : new Error("Unknown error");
492
- S(N), l == null || l(N);
611
+ const O = P instanceof Error ? P : new Error("Unknown error");
612
+ T(O), l == null || l(O);
493
613
  } finally {
494
614
  x(!1);
495
615
  }
496
616
  }
497
- }, [f, JSON.stringify(t), n, o, l]);
498
- return fe(() => {
499
- i && $();
500
- }, [$, i]), {
501
- data: v,
502
- loading: h,
503
- error: _,
504
- refetch: $
617
+ }, [p, JSON.stringify(t), n, s, l]);
618
+ return pe(() => {
619
+ i && C();
620
+ }, [C, i]), {
621
+ data: y,
622
+ loading: u,
623
+ error: w,
624
+ refetch: C
505
625
  };
506
626
  }
507
- function Ft(f, t = "POST", r = {}) {
508
- const { onSuccess: n, onError: i } = r, [o, l] = L(null), [v, d] = L(!1), [h, x] = L(null), _ = X(
509
- async ($) => {
627
+ function Ut(p, t = "POST", r = {}) {
628
+ const { onSuccess: n, onError: i } = r, [s, l] = L(null), [y, d] = L(!1), [u, x] = L(null), w = Q(
629
+ async (C) => {
510
630
  d(!0), x(null);
511
631
  try {
512
632
  const P = tt();
513
- let N;
633
+ let O;
514
634
  switch (t) {
515
635
  case "POST":
516
- N = await P.post(f, $);
636
+ O = await P.post(p, C);
517
637
  break;
518
638
  case "PUT":
519
- N = await P.put(f, $);
639
+ O = await P.put(p, C);
520
640
  break;
521
641
  case "PATCH":
522
- N = await P.patch(f, $);
642
+ O = await P.patch(p, C);
523
643
  break;
524
644
  case "DELETE":
525
- N = await P.delete(f);
645
+ O = await P.delete(p);
526
646
  break;
527
647
  default:
528
648
  throw new Error(`Unsupported method: ${t}`);
529
649
  }
530
- return l(N), n == null || n(N, $), N;
650
+ return l(O), n == null || n(O, C), O;
531
651
  } catch (P) {
532
- const N = P instanceof Error ? P : new Error("Unknown error");
533
- return x(N), i == null || i(N, $), null;
652
+ const O = P instanceof Error ? P : new Error("Unknown error");
653
+ return x(O), i == null || i(O, C), null;
534
654
  } finally {
535
655
  d(!1);
536
656
  }
537
657
  },
538
- [f, t, n, i]
539
- ), S = X(() => {
658
+ [p, t, n, i]
659
+ ), T = Q(() => {
540
660
  l(null), x(null), d(!1);
541
661
  }, []);
542
662
  return {
543
- data: o,
544
- loading: v,
545
- error: h,
546
- mutate: _,
547
- reset: S
663
+ data: s,
664
+ loading: y,
665
+ error: u,
666
+ mutate: w,
667
+ reset: T
548
668
  };
549
669
  }
550
- var Ie = { exports: {} }, de = {};
670
+ var Me = { exports: {} }, ue = {};
551
671
  /**
552
672
  * @license React
553
673
  * react-jsx-runtime.production.min.js
@@ -557,21 +677,21 @@ var Ie = { exports: {} }, de = {};
557
677
  * This source code is licensed under the MIT license found in the
558
678
  * LICENSE file in the root directory of this source tree.
559
679
  */
560
- var He;
680
+ var Xe;
561
681
  function St() {
562
- if (He) return de;
563
- He = 1;
564
- var f = Ze, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
565
- function l(v, d, h) {
566
- var x, _ = {}, S = null, $ = null;
567
- h !== void 0 && (S = "" + h), d.key !== void 0 && (S = "" + d.key), d.ref !== void 0 && ($ = d.ref);
568
- for (x in d) n.call(d, x) && !o.hasOwnProperty(x) && (_[x] = d[x]);
569
- if (v && v.defaultProps) for (x in d = v.defaultProps, d) _[x] === void 0 && (_[x] = d[x]);
570
- return { $$typeof: t, type: v, key: S, ref: $, props: _, _owner: i.current };
682
+ if (Xe) return ue;
683
+ Xe = 1;
684
+ var p = Ze, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
685
+ function l(y, d, u) {
686
+ var x, w = {}, T = null, C = null;
687
+ u !== void 0 && (T = "" + u), d.key !== void 0 && (T = "" + d.key), d.ref !== void 0 && (C = d.ref);
688
+ for (x in d) n.call(d, x) && !s.hasOwnProperty(x) && (w[x] = d[x]);
689
+ if (y && y.defaultProps) for (x in d = y.defaultProps, d) w[x] === void 0 && (w[x] = d[x]);
690
+ return { $$typeof: t, type: y, key: T, ref: C, props: w, _owner: i.current };
571
691
  }
572
- return de.Fragment = r, de.jsx = l, de.jsxs = l, de;
692
+ return ue.Fragment = r, ue.jsx = l, ue.jsxs = l, ue;
573
693
  }
574
- var ue = {};
694
+ var fe = {};
575
695
  /**
576
696
  * @license React
577
697
  * react-jsx-runtime.development.js
@@ -581,54 +701,54 @@ var ue = {};
581
701
  * This source code is licensed under the MIT license found in the
582
702
  * LICENSE file in the root directory of this source tree.
583
703
  */
584
- var Qe;
585
- function Nt() {
586
- return Qe || (Qe = 1, process.env.NODE_ENV !== "production" && function() {
587
- var f = Ze, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), v = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), P = Symbol.iterator, N = "@@iterator";
588
- function H(e) {
704
+ var He;
705
+ function Ot() {
706
+ return He || (He = 1, process.env.NODE_ENV !== "production" && function() {
707
+ var p = Ze, 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"), l = Symbol.for("react.provider"), y = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), P = Symbol.iterator, O = "@@iterator";
708
+ function X(e) {
589
709
  if (e === null || typeof e != "object")
590
710
  return null;
591
- var a = P && e[P] || e[N];
592
- return typeof a == "function" ? a : null;
711
+ var o = P && e[P] || e[O];
712
+ return typeof o == "function" ? o : null;
593
713
  }
594
- var z = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
714
+ var z = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
595
715
  function g(e) {
596
716
  {
597
- for (var a = arguments.length, c = new Array(a > 1 ? a - 1 : 0), y = 1; y < a; y++)
598
- c[y - 1] = arguments[y];
599
- I("error", e, c);
717
+ for (var o = arguments.length, c = new Array(o > 1 ? o - 1 : 0), m = 1; m < o; m++)
718
+ c[m - 1] = arguments[m];
719
+ M("error", e, c);
600
720
  }
601
721
  }
602
- function I(e, a, c) {
722
+ function M(e, o, c) {
603
723
  {
604
- var y = z.ReactDebugCurrentFrame, O = y.getStackAddendum();
605
- O !== "" && (a += "%s", c = c.concat([O]));
724
+ var m = z.ReactDebugCurrentFrame, N = m.getStackAddendum();
725
+ N !== "" && (o += "%s", c = c.concat([N]));
606
726
  var A = c.map(function(R) {
607
727
  return String(R);
608
728
  });
609
- A.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, A);
729
+ A.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, A);
610
730
  }
611
731
  }
612
- var V = !1, Q = !1, m = !1, k = !1, C = !1, p;
613
- p = Symbol.for("react.module.reference");
614
- function T(e) {
615
- return !!(typeof e == "string" || typeof e == "function" || e === n || e === o || C || e === i || e === h || e === x || k || e === $ || V || Q || m || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === v || e.$$typeof === d || // This needs to include all possible module reference object
732
+ var V = !1, H = !1, v = !1, S = !1, $ = !1, h;
733
+ h = Symbol.for("react.module.reference");
734
+ function k(e) {
735
+ return !!(typeof e == "string" || typeof e == "function" || e === n || e === s || $ || e === i || e === u || e === x || S || e === C || V || H || v || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === w || e.$$typeof === l || e.$$typeof === y || e.$$typeof === d || // This needs to include all possible module reference object
616
736
  // types supported by any Flight configuration anywhere since
617
737
  // we don't know which Flight build this will end up being used
618
738
  // with.
619
- e.$$typeof === p || e.getModuleId !== void 0));
739
+ e.$$typeof === h || e.getModuleId !== void 0));
620
740
  }
621
- function j(e, a, c) {
622
- var y = e.displayName;
623
- if (y)
624
- return y;
625
- var O = a.displayName || a.name || "";
626
- return O !== "" ? c + "(" + O + ")" : c;
741
+ function j(e, o, c) {
742
+ var m = e.displayName;
743
+ if (m)
744
+ return m;
745
+ var N = o.displayName || o.name || "";
746
+ return N !== "" ? c + "(" + N + ")" : c;
627
747
  }
628
748
  function Z(e) {
629
749
  return e.displayName || "Context";
630
750
  }
631
- function U(e) {
751
+ function I(e) {
632
752
  if (e == null)
633
753
  return null;
634
754
  if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -640,32 +760,32 @@ function Nt() {
640
760
  return "Fragment";
641
761
  case r:
642
762
  return "Portal";
643
- case o:
763
+ case s:
644
764
  return "Profiler";
645
765
  case i:
646
766
  return "StrictMode";
647
- case h:
767
+ case u:
648
768
  return "Suspense";
649
769
  case x:
650
770
  return "SuspenseList";
651
771
  }
652
772
  if (typeof e == "object")
653
773
  switch (e.$$typeof) {
654
- case v:
655
- var a = e;
656
- return Z(a) + ".Consumer";
774
+ case y:
775
+ var o = e;
776
+ return Z(o) + ".Consumer";
657
777
  case l:
658
778
  var c = e;
659
779
  return Z(c._context) + ".Provider";
660
780
  case d:
661
781
  return j(e, e.render, "ForwardRef");
662
- case _:
663
- var y = e.displayName || null;
664
- return y !== null ? y : U(e.type) || "Memo";
665
- case S: {
666
- var O = e, A = O._payload, R = O._init;
782
+ case w:
783
+ var m = e.displayName || null;
784
+ return m !== null ? m : I(e.type) || "Memo";
785
+ case T: {
786
+ var N = e, A = N._payload, R = N._init;
667
787
  try {
668
- return U(R(A));
788
+ return I(R(A));
669
789
  } catch {
670
790
  return null;
671
791
  }
@@ -673,18 +793,18 @@ function Nt() {
673
793
  }
674
794
  return null;
675
795
  }
676
- var E = Object.assign, D = 0, Y, pe, he, ge, ye, xe, me;
677
- function ve() {
796
+ var E = Object.assign, F = 0, Y, he, ge, ye, xe, me, ve;
797
+ function be() {
678
798
  }
679
- ve.__reactDisabledLog = !0;
799
+ be.__reactDisabledLog = !0;
680
800
  function Re() {
681
801
  {
682
- if (D === 0) {
683
- Y = console.log, pe = console.info, he = console.warn, ge = console.error, ye = console.group, xe = console.groupCollapsed, me = console.groupEnd;
802
+ if (F === 0) {
803
+ Y = console.log, he = console.info, ge = console.warn, ye = console.error, xe = console.group, me = console.groupCollapsed, ve = console.groupEnd;
684
804
  var e = {
685
805
  configurable: !0,
686
806
  enumerable: !0,
687
- value: ve,
807
+ value: be,
688
808
  writable: !0
689
809
  };
690
810
  Object.defineProperties(console, {
@@ -697,12 +817,12 @@ function Nt() {
697
817
  groupEnd: e
698
818
  });
699
819
  }
700
- D++;
820
+ F++;
701
821
  }
702
822
  }
703
823
  function Te() {
704
824
  {
705
- if (D--, D === 0) {
825
+ if (F--, F === 0) {
706
826
  var e = {
707
827
  configurable: !0,
708
828
  enumerable: !0,
@@ -713,37 +833,37 @@ function Nt() {
713
833
  value: Y
714
834
  }),
715
835
  info: E({}, e, {
716
- value: pe
836
+ value: he
717
837
  }),
718
838
  warn: E({}, e, {
719
- value: he
839
+ value: ge
720
840
  }),
721
841
  error: E({}, e, {
722
- value: ge
842
+ value: ye
723
843
  }),
724
844
  group: E({}, e, {
725
- value: ye
845
+ value: xe
726
846
  }),
727
847
  groupCollapsed: E({}, e, {
728
- value: xe
848
+ value: me
729
849
  }),
730
850
  groupEnd: E({}, e, {
731
- value: me
851
+ value: ve
732
852
  })
733
853
  });
734
854
  }
735
- D < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
855
+ F < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
736
856
  }
737
857
  }
738
858
  var ie = z.ReactCurrentDispatcher, oe;
739
- function re(e, a, c) {
859
+ function re(e, o, c) {
740
860
  {
741
861
  if (oe === void 0)
742
862
  try {
743
863
  throw Error();
744
- } catch (O) {
745
- var y = O.stack.trim().match(/\n( *(at )?)/);
746
- oe = y && y[1] || "";
864
+ } catch (N) {
865
+ var m = N.stack.trim().match(/\n( *(at )?)/);
866
+ oe = m && m[1] || "";
747
867
  }
748
868
  return `
749
869
  ` + oe + e;
@@ -754,7 +874,7 @@ function Nt() {
754
874
  var ke = typeof WeakMap == "function" ? WeakMap : Map;
755
875
  ne = new ke();
756
876
  }
757
- function be(e, a) {
877
+ function we(e, o) {
758
878
  if (!e || le)
759
879
  return "";
760
880
  {
@@ -762,14 +882,14 @@ function Nt() {
762
882
  if (c !== void 0)
763
883
  return c;
764
884
  }
765
- var y;
885
+ var m;
766
886
  le = !0;
767
- var O = Error.prepareStackTrace;
887
+ var N = Error.prepareStackTrace;
768
888
  Error.prepareStackTrace = void 0;
769
889
  var A;
770
890
  A = ie.current, ie.current = null, Re();
771
891
  try {
772
- if (a) {
892
+ if (o) {
773
893
  var R = function() {
774
894
  throw Error();
775
895
  };
@@ -781,14 +901,14 @@ function Nt() {
781
901
  try {
782
902
  Reflect.construct(R, []);
783
903
  } catch (q) {
784
- y = q;
904
+ m = q;
785
905
  }
786
906
  Reflect.construct(e, [], R);
787
907
  } else {
788
908
  try {
789
909
  R.call();
790
910
  } catch (q) {
791
- y = q;
911
+ m = q;
792
912
  }
793
913
  e.call(R.prototype);
794
914
  }
@@ -796,51 +916,51 @@ function Nt() {
796
916
  try {
797
917
  throw Error();
798
918
  } catch (q) {
799
- y = q;
919
+ m = q;
800
920
  }
801
921
  e();
802
922
  }
803
923
  } catch (q) {
804
- if (q && y && typeof q.stack == "string") {
805
- for (var w = q.stack.split(`
806
- `), G = y.stack.split(`
807
- `), F = w.length - 1, M = G.length - 1; F >= 1 && M >= 0 && w[F] !== G[M]; )
808
- M--;
809
- for (; F >= 1 && M >= 0; F--, M--)
810
- if (w[F] !== G[M]) {
811
- if (F !== 1 || M !== 1)
924
+ if (q && m && typeof q.stack == "string") {
925
+ for (var _ = q.stack.split(`
926
+ `), G = m.stack.split(`
927
+ `), U = _.length - 1, D = G.length - 1; U >= 1 && D >= 0 && _[U] !== G[D]; )
928
+ D--;
929
+ for (; U >= 1 && D >= 0; U--, D--)
930
+ if (_[U] !== G[D]) {
931
+ if (U !== 1 || D !== 1)
812
932
  do
813
- if (F--, M--, M < 0 || w[F] !== G[M]) {
933
+ if (U--, D--, D < 0 || _[U] !== G[D]) {
814
934
  var K = `
815
- ` + w[F].replace(" at new ", " at ");
935
+ ` + _[U].replace(" at new ", " at ");
816
936
  return e.displayName && K.includes("<anonymous>") && (K = K.replace("<anonymous>", e.displayName)), typeof e == "function" && ne.set(e, K), K;
817
937
  }
818
- while (F >= 1 && M >= 0);
938
+ while (U >= 1 && D >= 0);
819
939
  break;
820
940
  }
821
941
  }
822
942
  } finally {
823
- le = !1, ie.current = A, Te(), Error.prepareStackTrace = O;
943
+ le = !1, ie.current = A, Te(), Error.prepareStackTrace = N;
824
944
  }
825
945
  var ae = e ? e.displayName || e.name : "", te = ae ? re(ae) : "";
826
946
  return typeof e == "function" && ne.set(e, te), te;
827
947
  }
828
- function Se(e, a, c) {
829
- return be(e, !1);
948
+ function Se(e, o, c) {
949
+ return we(e, !1);
830
950
  }
831
- function u(e) {
832
- var a = e.prototype;
833
- return !!(a && a.isReactComponent);
951
+ function f(e) {
952
+ var o = e.prototype;
953
+ return !!(o && o.isReactComponent);
834
954
  }
835
- function b(e, a, c) {
955
+ function b(e, o, c) {
836
956
  if (e == null)
837
957
  return "";
838
958
  if (typeof e == "function")
839
- return be(e, u(e));
959
+ return we(e, f(e));
840
960
  if (typeof e == "string")
841
961
  return re(e);
842
962
  switch (e) {
843
- case h:
963
+ case u:
844
964
  return re("Suspense");
845
965
  case x:
846
966
  return re("SuspenseList");
@@ -849,12 +969,12 @@ function Nt() {
849
969
  switch (e.$$typeof) {
850
970
  case d:
851
971
  return Se(e.render);
852
- case _:
853
- return b(e.type, a, c);
854
- case S: {
855
- var y = e, O = y._payload, A = y._init;
972
+ case w:
973
+ return b(e.type, o, c);
974
+ case T: {
975
+ var m = e, N = m._payload, A = m._init;
856
976
  try {
857
- return b(A(O), a, c);
977
+ return b(A(N), o, c);
858
978
  } catch {
859
979
  }
860
980
  }
@@ -864,53 +984,53 @@ function Nt() {
864
984
  var B = Object.prototype.hasOwnProperty, W = {}, ee = z.ReactDebugCurrentFrame;
865
985
  function J(e) {
866
986
  if (e) {
867
- var a = e._owner, c = b(e.type, e._source, a ? a.type : null);
987
+ var o = e._owner, c = b(e.type, e._source, o ? o.type : null);
868
988
  ee.setExtraStackFrame(c);
869
989
  } else
870
990
  ee.setExtraStackFrame(null);
871
991
  }
872
- function Ne(e, a, c, y, O) {
992
+ function Oe(e, o, c, m, N) {
873
993
  {
874
994
  var A = Function.call.bind(B);
875
995
  for (var R in e)
876
996
  if (A(e, R)) {
877
- var w = void 0;
997
+ var _ = void 0;
878
998
  try {
879
999
  if (typeof e[R] != "function") {
880
- var G = Error((y || "React class") + ": " + c + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1000
+ var G = Error((m || "React class") + ": " + c + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
881
1001
  throw G.name = "Invariant Violation", G;
882
1002
  }
883
- w = e[R](a, R, y, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
884
- } catch (F) {
885
- w = F;
1003
+ _ = e[R](o, R, m, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1004
+ } catch (U) {
1005
+ _ = U;
886
1006
  }
887
- w && !(w instanceof Error) && (J(O), g("%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", c, R, typeof w), J(null)), w instanceof Error && !(w.message in W) && (W[w.message] = !0, J(O), g("Failed %s type: %s", c, w.message), J(null));
1007
+ _ && !(_ instanceof Error) && (J(N), g("%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).", m || "React class", c, R, typeof _), J(null)), _ instanceof Error && !(_.message in W) && (W[_.message] = !0, J(N), g("Failed %s type: %s", c, _.message), J(null));
888
1008
  }
889
1009
  }
890
1010
  }
891
- var we = Array.isArray;
1011
+ var _e = Array.isArray;
892
1012
  function ce(e) {
893
- return we(e);
1013
+ return _e(e);
894
1014
  }
895
1015
  function rt(e) {
896
1016
  {
897
- var a = typeof Symbol == "function" && Symbol.toStringTag, c = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
1017
+ var o = typeof Symbol == "function" && Symbol.toStringTag, c = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
898
1018
  return c;
899
1019
  }
900
1020
  }
901
1021
  function nt(e) {
902
1022
  try {
903
- return Me(e), !1;
1023
+ return De(e), !1;
904
1024
  } catch {
905
1025
  return !0;
906
1026
  }
907
1027
  }
908
- function Me(e) {
1028
+ function De(e) {
909
1029
  return "" + e;
910
1030
  }
911
- function Ue(e) {
1031
+ function Ie(e) {
912
1032
  if (nt(e))
913
- return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rt(e)), Me(e);
1033
+ return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rt(e)), De(e);
914
1034
  }
915
1035
  var Be = z.ReactCurrentOwner, st = {
916
1036
  key: !0,
@@ -920,27 +1040,27 @@ function Nt() {
920
1040
  }, Le, ze;
921
1041
  function at(e) {
922
1042
  if (B.call(e, "ref")) {
923
- var a = Object.getOwnPropertyDescriptor(e, "ref").get;
924
- if (a && a.isReactWarning)
1043
+ var o = Object.getOwnPropertyDescriptor(e, "ref").get;
1044
+ if (o && o.isReactWarning)
925
1045
  return !1;
926
1046
  }
927
1047
  return e.ref !== void 0;
928
1048
  }
929
1049
  function it(e) {
930
1050
  if (B.call(e, "key")) {
931
- var a = Object.getOwnPropertyDescriptor(e, "key").get;
932
- if (a && a.isReactWarning)
1051
+ var o = Object.getOwnPropertyDescriptor(e, "key").get;
1052
+ if (o && o.isReactWarning)
933
1053
  return !1;
934
1054
  }
935
1055
  return e.key !== void 0;
936
1056
  }
937
- function ot(e, a) {
1057
+ function ot(e, o) {
938
1058
  typeof e.ref == "string" && Be.current;
939
1059
  }
940
- function lt(e, a) {
1060
+ function lt(e, o) {
941
1061
  {
942
1062
  var c = function() {
943
- Le || (Le = !0, g("%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)", a));
1063
+ Le || (Le = !0, g("%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)", o));
944
1064
  };
945
1065
  c.isReactWarning = !0, Object.defineProperty(e, "key", {
946
1066
  get: c,
@@ -948,10 +1068,10 @@ function Nt() {
948
1068
  });
949
1069
  }
950
1070
  }
951
- function ct(e, a) {
1071
+ function ct(e, o) {
952
1072
  {
953
1073
  var c = function() {
954
- ze || (ze = !0, g("%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)", a));
1074
+ ze || (ze = !0, g("%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)", o));
955
1075
  };
956
1076
  c.isReactWarning = !0, Object.defineProperty(e, "ref", {
957
1077
  get: c,
@@ -959,57 +1079,57 @@ function Nt() {
959
1079
  });
960
1080
  }
961
1081
  }
962
- var dt = function(e, a, c, y, O, A, R) {
963
- var w = {
1082
+ var dt = function(e, o, c, m, N, A, R) {
1083
+ var _ = {
964
1084
  // This tag allows us to uniquely identify this as a React Element
965
1085
  $$typeof: t,
966
1086
  // Built-in properties that belong on the element
967
1087
  type: e,
968
- key: a,
1088
+ key: o,
969
1089
  ref: c,
970
1090
  props: R,
971
1091
  // Record the component responsible for creating this element.
972
1092
  _owner: A
973
1093
  };
974
- return w._store = {}, Object.defineProperty(w._store, "validated", {
1094
+ return _._store = {}, Object.defineProperty(_._store, "validated", {
975
1095
  configurable: !1,
976
1096
  enumerable: !1,
977
1097
  writable: !0,
978
1098
  value: !1
979
- }), Object.defineProperty(w, "_self", {
1099
+ }), Object.defineProperty(_, "_self", {
980
1100
  configurable: !1,
981
1101
  enumerable: !1,
982
1102
  writable: !1,
983
- value: y
984
- }), Object.defineProperty(w, "_source", {
1103
+ value: m
1104
+ }), Object.defineProperty(_, "_source", {
985
1105
  configurable: !1,
986
1106
  enumerable: !1,
987
1107
  writable: !1,
988
- value: O
989
- }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
1108
+ value: N
1109
+ }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
990
1110
  };
991
- function ut(e, a, c, y, O) {
1111
+ function ut(e, o, c, m, N) {
992
1112
  {
993
- var A, R = {}, w = null, G = null;
994
- c !== void 0 && (Ue(c), w = "" + c), it(a) && (Ue(a.key), w = "" + a.key), at(a) && (G = a.ref, ot(a, O));
995
- for (A in a)
996
- B.call(a, A) && !st.hasOwnProperty(A) && (R[A] = a[A]);
1113
+ var A, R = {}, _ = null, G = null;
1114
+ c !== void 0 && (Ie(c), _ = "" + c), it(o) && (Ie(o.key), _ = "" + o.key), at(o) && (G = o.ref, ot(o, N));
1115
+ for (A in o)
1116
+ B.call(o, A) && !st.hasOwnProperty(A) && (R[A] = o[A]);
997
1117
  if (e && e.defaultProps) {
998
- var F = e.defaultProps;
999
- for (A in F)
1000
- R[A] === void 0 && (R[A] = F[A]);
1118
+ var U = e.defaultProps;
1119
+ for (A in U)
1120
+ R[A] === void 0 && (R[A] = U[A]);
1001
1121
  }
1002
- if (w || G) {
1003
- var M = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
1004
- w && lt(R, M), G && ct(R, M);
1122
+ if (_ || G) {
1123
+ var D = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
1124
+ _ && lt(R, D), G && ct(R, D);
1005
1125
  }
1006
- return dt(e, w, G, O, y, Be.current, R);
1126
+ return dt(e, _, G, N, m, Be.current, R);
1007
1127
  }
1008
1128
  }
1009
- var Oe = z.ReactCurrentOwner, We = z.ReactDebugCurrentFrame;
1129
+ var Ne = z.ReactCurrentOwner, We = z.ReactDebugCurrentFrame;
1010
1130
  function se(e) {
1011
1131
  if (e) {
1012
- var a = e._owner, c = b(e.type, e._source, a ? a.type : null);
1132
+ var o = e._owner, c = b(e.type, e._source, o ? o.type : null);
1013
1133
  We.setExtraStackFrame(c);
1014
1134
  } else
1015
1135
  We.setExtraStackFrame(null);
@@ -1021,8 +1141,8 @@ function Nt() {
1021
1141
  }
1022
1142
  function Ge() {
1023
1143
  {
1024
- if (Oe.current) {
1025
- var e = U(Oe.current.type);
1144
+ if (Ne.current) {
1145
+ var e = I(Ne.current.type);
1026
1146
  if (e)
1027
1147
  return `
1028
1148
 
@@ -1037,79 +1157,79 @@ Check the render method of \`` + e + "`.";
1037
1157
  var Ye = {};
1038
1158
  function pt(e) {
1039
1159
  {
1040
- var a = Ge();
1041
- if (!a) {
1160
+ var o = Ge();
1161
+ if (!o) {
1042
1162
  var c = typeof e == "string" ? e : e.displayName || e.name;
1043
- c && (a = `
1163
+ c && (o = `
1044
1164
 
1045
1165
  Check the top-level render call using <` + c + ">.");
1046
1166
  }
1047
- return a;
1167
+ return o;
1048
1168
  }
1049
1169
  }
1050
- function qe(e, a) {
1170
+ function qe(e, o) {
1051
1171
  {
1052
1172
  if (!e._store || e._store.validated || e.key != null)
1053
1173
  return;
1054
1174
  e._store.validated = !0;
1055
- var c = pt(a);
1175
+ var c = pt(o);
1056
1176
  if (Ye[c])
1057
1177
  return;
1058
1178
  Ye[c] = !0;
1059
- var y = "";
1060
- e && e._owner && e._owner !== Oe.current && (y = " It was passed a child from " + U(e._owner.type) + "."), se(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, y), se(null);
1179
+ var m = "";
1180
+ e && e._owner && e._owner !== Ne.current && (m = " It was passed a child from " + I(e._owner.type) + "."), se(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, m), se(null);
1061
1181
  }
1062
1182
  }
1063
- function Ve(e, a) {
1183
+ function Ve(e, o) {
1064
1184
  {
1065
1185
  if (typeof e != "object")
1066
1186
  return;
1067
1187
  if (ce(e))
1068
1188
  for (var c = 0; c < e.length; c++) {
1069
- var y = e[c];
1070
- Ae(y) && qe(y, a);
1189
+ var m = e[c];
1190
+ Ae(m) && qe(m, o);
1071
1191
  }
1072
1192
  else if (Ae(e))
1073
1193
  e._store && (e._store.validated = !0);
1074
1194
  else if (e) {
1075
- var O = H(e);
1076
- if (typeof O == "function" && O !== e.entries)
1077
- for (var A = O.call(e), R; !(R = A.next()).done; )
1078
- Ae(R.value) && qe(R.value, a);
1195
+ var N = X(e);
1196
+ if (typeof N == "function" && N !== e.entries)
1197
+ for (var A = N.call(e), R; !(R = A.next()).done; )
1198
+ Ae(R.value) && qe(R.value, o);
1079
1199
  }
1080
1200
  }
1081
1201
  }
1082
1202
  function ht(e) {
1083
1203
  {
1084
- var a = e.type;
1085
- if (a == null || typeof a == "string")
1204
+ var o = e.type;
1205
+ if (o == null || typeof o == "string")
1086
1206
  return;
1087
1207
  var c;
1088
- if (typeof a == "function")
1089
- c = a.propTypes;
1090
- else if (typeof a == "object" && (a.$$typeof === d || // Note: Memo only checks outer props here.
1208
+ if (typeof o == "function")
1209
+ c = o.propTypes;
1210
+ else if (typeof o == "object" && (o.$$typeof === d || // Note: Memo only checks outer props here.
1091
1211
  // Inner props are checked in the reconciler.
1092
- a.$$typeof === _))
1093
- c = a.propTypes;
1212
+ o.$$typeof === w))
1213
+ c = o.propTypes;
1094
1214
  else
1095
1215
  return;
1096
1216
  if (c) {
1097
- var y = U(a);
1098
- Ne(c, e.props, "prop", y, e);
1099
- } else if (a.PropTypes !== void 0 && !Pe) {
1217
+ var m = I(o);
1218
+ Oe(c, e.props, "prop", m, e);
1219
+ } else if (o.PropTypes !== void 0 && !Pe) {
1100
1220
  Pe = !0;
1101
- var O = U(a);
1102
- g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
1221
+ var N = I(o);
1222
+ g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
1103
1223
  }
1104
- typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1224
+ typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1105
1225
  }
1106
1226
  }
1107
1227
  function gt(e) {
1108
1228
  {
1109
- for (var a = Object.keys(e.props), c = 0; c < a.length; c++) {
1110
- var y = a[c];
1111
- if (y !== "children" && y !== "key") {
1112
- se(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), se(null);
1229
+ for (var o = Object.keys(e.props), c = 0; c < o.length; c++) {
1230
+ var m = o[c];
1231
+ if (m !== "children" && m !== "key") {
1232
+ se(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), se(null);
1113
1233
  break;
1114
1234
  }
1115
1235
  }
@@ -1117,24 +1237,24 @@ Check the top-level render call using <` + c + ">.");
1117
1237
  }
1118
1238
  }
1119
1239
  var Je = {};
1120
- function Ke(e, a, c, y, O, A) {
1240
+ function Ke(e, o, c, m, N, A) {
1121
1241
  {
1122
- var R = T(e);
1242
+ var R = k(e);
1123
1243
  if (!R) {
1124
- var w = "";
1125
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1244
+ var _ = "";
1245
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1126
1246
  var G = ft();
1127
- G ? w += G : w += Ge();
1128
- var F;
1129
- e === null ? F = "null" : ce(e) ? F = "array" : e !== void 0 && e.$$typeof === t ? (F = "<" + (U(e.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : F = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", F, w);
1247
+ G ? _ += G : _ += Ge();
1248
+ var U;
1249
+ e === null ? U = "null" : ce(e) ? U = "array" : e !== void 0 && e.$$typeof === t ? (U = "<" + (I(e.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : U = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, _);
1130
1250
  }
1131
- var M = ut(e, a, c, O, A);
1132
- if (M == null)
1133
- return M;
1251
+ var D = ut(e, o, c, N, A);
1252
+ if (D == null)
1253
+ return D;
1134
1254
  if (R) {
1135
- var K = a.children;
1255
+ var K = o.children;
1136
1256
  if (K !== void 0)
1137
- if (y)
1257
+ if (m)
1138
1258
  if (ce(K)) {
1139
1259
  for (var ae = 0; ae < K.length; ae++)
1140
1260
  Ve(K[ae], e);
@@ -1144,8 +1264,8 @@ Check the top-level render call using <` + c + ">.");
1144
1264
  else
1145
1265
  Ve(K, e);
1146
1266
  }
1147
- if (B.call(a, "key")) {
1148
- var te = U(e), q = Object.keys(a).filter(function(wt) {
1267
+ if (B.call(o, "key")) {
1268
+ var te = I(e), q = Object.keys(o).filter(function(wt) {
1149
1269
  return wt !== "key";
1150
1270
  }), Ce = q.length > 0 ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}";
1151
1271
  if (!Je[te + Ce]) {
@@ -1158,22 +1278,22 @@ React keys must be passed directly to JSX without using spread:
1158
1278
  <%s key={someKey} {...props} />`, Ce, te, bt, te), Je[te + Ce] = !0;
1159
1279
  }
1160
1280
  }
1161
- return e === n ? gt(M) : ht(M), M;
1281
+ return e === n ? gt(D) : ht(D), D;
1162
1282
  }
1163
1283
  }
1164
- function yt(e, a, c) {
1165
- return Ke(e, a, c, !0);
1284
+ function yt(e, o, c) {
1285
+ return Ke(e, o, c, !0);
1166
1286
  }
1167
- function xt(e, a, c) {
1168
- return Ke(e, a, c, !1);
1287
+ function xt(e, o, c) {
1288
+ return Ke(e, o, c, !1);
1169
1289
  }
1170
1290
  var mt = xt, vt = yt;
1171
- ue.Fragment = n, ue.jsx = mt, ue.jsxs = vt;
1172
- }()), ue;
1291
+ fe.Fragment = n, fe.jsx = mt, fe.jsxs = vt;
1292
+ }()), fe;
1173
1293
  }
1174
- process.env.NODE_ENV === "production" ? Ie.exports = St() : Ie.exports = Nt();
1175
- var s = Ie.exports;
1176
- class Fe {
1294
+ process.env.NODE_ENV === "production" ? Me.exports = St() : Me.exports = Ot();
1295
+ var a = Me.exports;
1296
+ class Ue {
1177
1297
  /**
1178
1298
  * Filter array by predicate function
1179
1299
  */
@@ -1190,17 +1310,17 @@ class Fe {
1190
1310
  * Filter by multiple fields
1191
1311
  */
1192
1312
  static filterByFields(t, r) {
1193
- return t.filter((n) => Object.entries(r).every(([i, o]) => n[i] === o));
1313
+ return t.filter((n) => Object.entries(r).every(([i, s]) => n[i] === s));
1194
1314
  }
1195
1315
  /**
1196
1316
  * Sort array by field
1197
1317
  */
1198
1318
  static sort(t, r, n = "asc") {
1199
- return [...t].sort((i, o) => {
1200
- const l = i[r], v = o[r];
1201
- if (l === v) return 0;
1319
+ return [...t].sort((i, s) => {
1320
+ const l = i[r], y = s[r];
1321
+ if (l === y) return 0;
1202
1322
  let d = 0;
1203
- return l > v && (d = 1), l < v && (d = -1), n === "asc" ? d : -d;
1323
+ return l > y && (d = 1), l < y && (d = -1), n === "asc" ? d : -d;
1204
1324
  });
1205
1325
  }
1206
1326
  /**
@@ -1209,18 +1329,18 @@ class Fe {
1209
1329
  static search(t, r, n) {
1210
1330
  if (!r.trim()) return t;
1211
1331
  const i = r.toLowerCase();
1212
- return t.filter((o) => n.some((l) => {
1213
- const v = o[l];
1214
- return v == null ? !1 : String(v).toLowerCase().includes(i);
1332
+ return t.filter((s) => n.some((l) => {
1333
+ const y = s[l];
1334
+ return y == null ? !1 : String(y).toLowerCase().includes(i);
1215
1335
  }));
1216
1336
  }
1217
1337
  /**
1218
1338
  * Paginate array
1219
1339
  */
1220
1340
  static paginate(t, r, n) {
1221
- const i = (r - 1) * n, o = i + n;
1341
+ const i = (r - 1) * n, s = i + n;
1222
1342
  return {
1223
- data: t.slice(i, o),
1343
+ data: t.slice(i, s),
1224
1344
  total: t.length,
1225
1345
  page: r,
1226
1346
  totalPages: Math.ceil(t.length / n)
@@ -1231,8 +1351,8 @@ class Fe {
1231
1351
  */
1232
1352
  static groupBy(t, r) {
1233
1353
  return t.reduce((n, i) => {
1234
- const o = String(i[r]);
1235
- return n[o] || (n[o] = []), n[o].push(i), n;
1354
+ const s = String(i[r]);
1355
+ return n[s] || (n[s] = []), n[s].push(i), n;
1236
1356
  }, {});
1237
1357
  }
1238
1358
  /**
@@ -1247,8 +1367,8 @@ class Fe {
1247
1367
  */
1248
1368
  static countBy(t, r) {
1249
1369
  return t.reduce((n, i) => {
1250
- const o = String(i[r]);
1251
- return n[o] = (n[o] || 0) + 1, n;
1370
+ const s = String(i[r]);
1371
+ return n[s] = (n[s] || 0) + 1, n;
1252
1372
  }, {});
1253
1373
  }
1254
1374
  /**
@@ -1258,33 +1378,33 @@ class Fe {
1258
1378
  return r.reduce((n, i) => i(n), t);
1259
1379
  }
1260
1380
  }
1261
- function It({
1262
- endpoint: f,
1381
+ function Mt({
1382
+ endpoint: p,
1263
1383
  params: t,
1264
1384
  layout: r = "list",
1265
1385
  title: n,
1266
1386
  emptyMessage: i = "No items found",
1267
- renderItem: o,
1268
- keyExtractor: l = (N, H) => N.id || N._id || String(H),
1269
- searchable: v = !1,
1387
+ renderItem: s,
1388
+ keyExtractor: l = (O, X) => O.id || O._id || String(X),
1389
+ searchable: y = !1,
1270
1390
  searchFields: d = [],
1271
- searchPlaceholder: h = "Search...",
1391
+ searchPlaceholder: u = "Search...",
1272
1392
  filters: x = [],
1273
- pageSize: _ = 20,
1274
- onItemClick: S,
1275
- onRefresh: $,
1393
+ pageSize: w = 20,
1394
+ onItemClick: T,
1395
+ onRefresh: C,
1276
1396
  theme: P = {}
1277
1397
  }) {
1278
- const { data: N, loading: H, error: z, refetch: g } = kt(f, t), [I, V] = L(""), [Q, m] = L({}), [k, C] = L(1), p = et(() => {
1279
- if (!N) return { data: [], total: 0, totalPages: 0 };
1280
- let E = N;
1281
- return v && I && d.length > 0 && (E = Fe.search(E, I, d)), Object.keys(Q).length > 0 && (E = Fe.filterByFields(E, Q)), Fe.paginate(E, k, _);
1282
- }, [N, I, Q, k, _, v, d]);
1283
- fe(() => {
1284
- C(1);
1285
- }, [I, Q]);
1286
- const T = () => {
1287
- V(""), m({}), C(1), g(), $ == null || $();
1398
+ const { data: O, loading: X, error: z, refetch: g } = kt(p, t), [M, V] = L(""), [H, v] = L({}), [S, $] = L(1), h = et(() => {
1399
+ if (!O) return { data: [], total: 0, totalPages: 0 };
1400
+ let E = O;
1401
+ return y && M && d.length > 0 && (E = Ue.search(E, M, d)), Object.keys(H).length > 0 && (E = Ue.filterByFields(E, H)), Ue.paginate(E, S, w);
1402
+ }, [O, M, H, S, w, y, d]);
1403
+ pe(() => {
1404
+ $(1);
1405
+ }, [M, H]);
1406
+ const k = () => {
1407
+ V(""), v({}), $(1), g(), C == null || C();
1288
1408
  }, j = {
1289
1409
  background: P.background || "#ffffff",
1290
1410
  cardBackground: P.cardBackground || "#f9fafb",
@@ -1292,30 +1412,30 @@ function It({
1292
1412
  textSecondary: P.textSecondary || "#6b7280",
1293
1413
  border: P.border || "#e5e7eb",
1294
1414
  primary: P.primary || "#3b82f6"
1295
- }, U = o || ((E) => /* @__PURE__ */ s.jsxs("div", { style: {
1415
+ }, I = s || ((E) => /* @__PURE__ */ a.jsxs("div", { style: {
1296
1416
  padding: "16px",
1297
- cursor: S ? "pointer" : "default"
1417
+ cursor: T ? "pointer" : "default"
1298
1418
  }, children: [
1299
- /* @__PURE__ */ s.jsx("div", { style: { fontSize: "14px", fontWeight: 500, color: j.text }, children: E.title || E.name || E.label || "Untitled" }),
1300
- E.description && /* @__PURE__ */ s.jsx("div", { style: { fontSize: "13px", color: j.textSecondary, marginTop: "4px" }, children: E.description })
1419
+ /* @__PURE__ */ a.jsx("div", { style: { fontSize: "14px", fontWeight: 500, color: j.text }, children: E.title || E.name || E.label || "Untitled" }),
1420
+ E.description && /* @__PURE__ */ a.jsx("div", { style: { fontSize: "13px", color: j.textSecondary, marginTop: "4px" }, children: E.description })
1301
1421
  ] }));
1302
- return H && !N ? /* @__PURE__ */ s.jsx("div", { style: {
1422
+ return X && !O ? /* @__PURE__ */ a.jsx("div", { style: {
1303
1423
  display: "flex",
1304
1424
  alignItems: "center",
1305
1425
  justifyContent: "center",
1306
1426
  padding: "48px",
1307
1427
  color: j.textSecondary
1308
- }, children: "Loading..." }) : z ? /* @__PURE__ */ s.jsxs("div", { style: {
1428
+ }, children: "Loading..." }) : z ? /* @__PURE__ */ a.jsxs("div", { style: {
1309
1429
  padding: "24px",
1310
1430
  textAlign: "center",
1311
1431
  color: "#ef4444"
1312
1432
  }, children: [
1313
- /* @__PURE__ */ s.jsx("div", { style: { fontWeight: 500, marginBottom: "8px" }, children: "Error" }),
1314
- /* @__PURE__ */ s.jsx("div", { style: { fontSize: "14px" }, children: z.message }),
1315
- /* @__PURE__ */ s.jsx(
1433
+ /* @__PURE__ */ a.jsx("div", { style: { fontWeight: 500, marginBottom: "8px" }, children: "Error" }),
1434
+ /* @__PURE__ */ a.jsx("div", { style: { fontSize: "14px" }, children: z.message }),
1435
+ /* @__PURE__ */ a.jsx(
1316
1436
  "button",
1317
1437
  {
1318
- onClick: T,
1438
+ onClick: k,
1319
1439
  style: {
1320
1440
  marginTop: "16px",
1321
1441
  padding: "8px 16px",
@@ -1328,31 +1448,31 @@ function It({
1328
1448
  children: "Retry"
1329
1449
  }
1330
1450
  )
1331
- ] }) : /* @__PURE__ */ s.jsxs("div", { style: {
1451
+ ] }) : /* @__PURE__ */ a.jsxs("div", { style: {
1332
1452
  background: j.background,
1333
1453
  borderRadius: "12px",
1334
1454
  overflow: "hidden"
1335
1455
  }, children: [
1336
- (n || v || x.length > 0) && /* @__PURE__ */ s.jsxs("div", { style: {
1456
+ (n || y || x.length > 0) && /* @__PURE__ */ a.jsxs("div", { style: {
1337
1457
  padding: "16px",
1338
1458
  borderBottom: `1px solid ${j.border}`
1339
1459
  }, children: [
1340
- /* @__PURE__ */ s.jsxs("div", { style: {
1460
+ /* @__PURE__ */ a.jsxs("div", { style: {
1341
1461
  display: "flex",
1342
1462
  alignItems: "center",
1343
1463
  justifyContent: "space-between",
1344
- marginBottom: v || x.length > 0 ? "12px" : "0"
1464
+ marginBottom: y || x.length > 0 ? "12px" : "0"
1345
1465
  }, children: [
1346
- n && /* @__PURE__ */ s.jsx("h2", { style: {
1466
+ n && /* @__PURE__ */ a.jsx("h2", { style: {
1347
1467
  margin: 0,
1348
1468
  fontSize: "18px",
1349
1469
  fontWeight: 600,
1350
1470
  color: j.text
1351
1471
  }, children: n }),
1352
- /* @__PURE__ */ s.jsx(
1472
+ /* @__PURE__ */ a.jsx(
1353
1473
  "button",
1354
1474
  {
1355
- onClick: T,
1475
+ onClick: k,
1356
1476
  style: {
1357
1477
  padding: "6px 12px",
1358
1478
  background: "transparent",
@@ -1366,12 +1486,12 @@ function It({
1366
1486
  }
1367
1487
  )
1368
1488
  ] }),
1369
- v && /* @__PURE__ */ s.jsx(
1489
+ y && /* @__PURE__ */ a.jsx(
1370
1490
  "input",
1371
1491
  {
1372
1492
  type: "text",
1373
- placeholder: h,
1374
- value: I,
1493
+ placeholder: u,
1494
+ value: M,
1375
1495
  onChange: (E) => V(E.target.value),
1376
1496
  style: {
1377
1497
  width: "100%",
@@ -1384,20 +1504,20 @@ function It({
1384
1504
  }
1385
1505
  )
1386
1506
  ] }),
1387
- /* @__PURE__ */ s.jsx("div", { style: {
1507
+ /* @__PURE__ */ a.jsx("div", { style: {
1388
1508
  display: r === "grid" ? "grid" : "flex",
1389
1509
  flexDirection: r === "list" ? "column" : void 0,
1390
1510
  gridTemplateColumns: r === "grid" ? "repeat(auto-fill, minmax(250px, 1fr))" : void 0,
1391
1511
  gap: r === "list" ? "0" : "16px",
1392
1512
  padding: r === "list" ? "0" : "16px"
1393
- }, children: p.data.length === 0 ? /* @__PURE__ */ s.jsx("div", { style: {
1513
+ }, children: h.data.length === 0 ? /* @__PURE__ */ a.jsx("div", { style: {
1394
1514
  padding: "48px",
1395
1515
  textAlign: "center",
1396
1516
  color: j.textSecondary
1397
- }, children: i }) : p.data.map((E, D) => /* @__PURE__ */ s.jsx(
1517
+ }, children: i }) : h.data.map((E, F) => /* @__PURE__ */ a.jsx(
1398
1518
  "div",
1399
1519
  {
1400
- onClick: () => S == null ? void 0 : S(E),
1520
+ onClick: () => T == null ? void 0 : T(E),
1401
1521
  style: {
1402
1522
  background: j.cardBackground,
1403
1523
  borderRadius: r === "list" ? "0" : "8px",
@@ -1405,57 +1525,57 @@ function It({
1405
1525
  transition: "all 0.15s ease"
1406
1526
  },
1407
1527
  onMouseEnter: (Y) => {
1408
- S && (Y.currentTarget.style.background = j.border);
1528
+ T && (Y.currentTarget.style.background = j.border);
1409
1529
  },
1410
1530
  onMouseLeave: (Y) => {
1411
1531
  Y.currentTarget.style.background = j.cardBackground;
1412
1532
  },
1413
- children: U(E, D)
1533
+ children: I(E, F)
1414
1534
  },
1415
- l(E, D)
1535
+ l(E, F)
1416
1536
  )) }),
1417
- p.totalPages > 1 && /* @__PURE__ */ s.jsxs("div", { style: {
1537
+ h.totalPages > 1 && /* @__PURE__ */ a.jsxs("div", { style: {
1418
1538
  padding: "16px",
1419
1539
  borderTop: `1px solid ${j.border}`,
1420
1540
  display: "flex",
1421
1541
  alignItems: "center",
1422
1542
  justifyContent: "space-between"
1423
1543
  }, children: [
1424
- /* @__PURE__ */ s.jsxs("div", { style: { fontSize: "13px", color: j.textSecondary }, children: [
1544
+ /* @__PURE__ */ a.jsxs("div", { style: { fontSize: "13px", color: j.textSecondary }, children: [
1425
1545
  "Page ",
1426
- k,
1546
+ S,
1427
1547
  " of ",
1428
- p.totalPages
1548
+ h.totalPages
1429
1549
  ] }),
1430
- /* @__PURE__ */ s.jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
1431
- /* @__PURE__ */ s.jsx(
1550
+ /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
1551
+ /* @__PURE__ */ a.jsx(
1432
1552
  "button",
1433
1553
  {
1434
- onClick: () => C((E) => Math.max(1, E - 1)),
1435
- disabled: k === 1,
1554
+ onClick: () => $((E) => Math.max(1, E - 1)),
1555
+ disabled: S === 1,
1436
1556
  style: {
1437
1557
  padding: "6px 12px",
1438
1558
  border: `1px solid ${j.border}`,
1439
1559
  borderRadius: "6px",
1440
1560
  background: "white",
1441
- cursor: k === 1 ? "not-allowed" : "pointer",
1442
- opacity: k === 1 ? 0.5 : 1
1561
+ cursor: S === 1 ? "not-allowed" : "pointer",
1562
+ opacity: S === 1 ? 0.5 : 1
1443
1563
  },
1444
1564
  children: "Previous"
1445
1565
  }
1446
1566
  ),
1447
- /* @__PURE__ */ s.jsx(
1567
+ /* @__PURE__ */ a.jsx(
1448
1568
  "button",
1449
1569
  {
1450
- onClick: () => C((E) => Math.min(p.totalPages, E + 1)),
1451
- disabled: k === p.totalPages,
1570
+ onClick: () => $((E) => Math.min(h.totalPages, E + 1)),
1571
+ disabled: S === h.totalPages,
1452
1572
  style: {
1453
1573
  padding: "6px 12px",
1454
1574
  border: `1px solid ${j.border}`,
1455
1575
  borderRadius: "6px",
1456
1576
  background: "white",
1457
- cursor: k === p.totalPages ? "not-allowed" : "pointer",
1458
- opacity: k === p.totalPages ? 0.5 : 1
1577
+ cursor: S === h.totalPages ? "not-allowed" : "pointer",
1578
+ opacity: S === h.totalPages ? 0.5 : 1
1459
1579
  },
1460
1580
  children: "Next"
1461
1581
  }
@@ -1464,16 +1584,16 @@ function It({
1464
1584
  ] })
1465
1585
  ] });
1466
1586
  }
1467
- function Mt({
1468
- item: f,
1587
+ function Dt({
1588
+ item: p,
1469
1589
  onClick: t,
1470
1590
  title: r = (l) => l.title || l.name || l.label || "Untitled",
1471
1591
  subtitle: n = (l) => l.description || l.subtitle || "",
1472
1592
  image: i = (l) => l.image || l.thumbnail || l.photo,
1473
- badge: o = (l) => l.badge || l.tag || l.type
1593
+ badge: s = (l) => l.badge || l.tag || l.type
1474
1594
  }) {
1475
- const l = r(f), v = n(f), d = i(f), h = o(f);
1476
- return /* @__PURE__ */ s.jsxs(
1595
+ const l = r(p), y = n(p), d = i(p), u = s(p);
1596
+ return /* @__PURE__ */ a.jsxs(
1477
1597
  "div",
1478
1598
  {
1479
1599
  onClick: t,
@@ -1483,7 +1603,7 @@ function Mt({
1483
1603
  ${t ? "cursor-pointer" : ""}
1484
1604
  `,
1485
1605
  children: [
1486
- d && /* @__PURE__ */ s.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ s.jsx(
1606
+ d && /* @__PURE__ */ a.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ a.jsx(
1487
1607
  "img",
1488
1608
  {
1489
1609
  src: d,
@@ -1491,58 +1611,58 @@ function Mt({
1491
1611
  className: "w-16 h-16 object-cover rounded-lg"
1492
1612
  }
1493
1613
  ) }),
1494
- /* @__PURE__ */ s.jsxs("div", { className: "flex-1 min-w-0", children: [
1495
- /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
1496
- /* @__PURE__ */ s.jsx("h3", { className: "font-medium text-gray-900 truncate", children: l }),
1497
- h && /* @__PURE__ */ s.jsx("span", { className: "px-2 py-0.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full", children: h })
1614
+ /* @__PURE__ */ a.jsxs("div", { className: "flex-1 min-w-0", children: [
1615
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
1616
+ /* @__PURE__ */ a.jsx("h3", { className: "font-medium text-gray-900 truncate", children: l }),
1617
+ u && /* @__PURE__ */ a.jsx("span", { className: "px-2 py-0.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full", children: u })
1498
1618
  ] }),
1499
- v && /* @__PURE__ */ s.jsx("p", { className: "text-sm text-gray-600 truncate mt-0.5", children: v })
1619
+ y && /* @__PURE__ */ a.jsx("p", { className: "text-sm text-gray-600 truncate mt-0.5", children: y })
1500
1620
  ] }),
1501
- t && /* @__PURE__ */ s.jsx("div", { className: "flex-shrink-0 text-gray-400", children: /* @__PURE__ */ s.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ s.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) })
1621
+ t && /* @__PURE__ */ a.jsx("div", { className: "flex-shrink-0 text-gray-400", children: /* @__PURE__ */ a.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ a.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) })
1502
1622
  ]
1503
1623
  }
1504
1624
  );
1505
1625
  }
1506
- function Ut({
1507
- item: f,
1626
+ function It({
1627
+ item: p,
1508
1628
  onClose: t,
1509
- title: r = (o) => o.title || o.name || o.label || "Detail",
1510
- image: n = (o) => o.image || o.thumbnail || o.photo,
1629
+ title: r = (s) => s.title || s.name || s.label || "Detail",
1630
+ image: n = (s) => s.image || s.thumbnail || s.photo,
1511
1631
  fields: i = []
1512
1632
  }) {
1513
- if (!f) return null;
1514
- const o = r(f), l = n(f);
1515
- return /* @__PURE__ */ s.jsx("div", { className: "fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ s.jsxs("div", { className: "bg-white rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto shadow-2xl", children: [
1516
- /* @__PURE__ */ s.jsxs("div", { className: "sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between", children: [
1517
- /* @__PURE__ */ s.jsx("h2", { className: "text-xl font-semibold text-gray-900", children: o }),
1518
- t && /* @__PURE__ */ s.jsx(
1633
+ if (!p) return null;
1634
+ const s = r(p), l = n(p);
1635
+ return /* @__PURE__ */ a.jsx("div", { className: "fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ a.jsxs("div", { className: "bg-white rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto shadow-2xl", children: [
1636
+ /* @__PURE__ */ a.jsxs("div", { className: "sticky top-0 bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between", children: [
1637
+ /* @__PURE__ */ a.jsx("h2", { className: "text-xl font-semibold text-gray-900", children: s }),
1638
+ t && /* @__PURE__ */ a.jsx(
1519
1639
  "button",
1520
1640
  {
1521
1641
  onClick: t,
1522
1642
  className: "p-2 hover:bg-gray-100 rounded-lg transition-colors",
1523
- children: /* @__PURE__ */ s.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ s.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
1643
+ children: /* @__PURE__ */ a.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ a.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
1524
1644
  }
1525
1645
  )
1526
1646
  ] }),
1527
- /* @__PURE__ */ s.jsxs("div", { className: "p-6", children: [
1528
- l && /* @__PURE__ */ s.jsx("div", { className: "mb-6", children: /* @__PURE__ */ s.jsx(
1647
+ /* @__PURE__ */ a.jsxs("div", { className: "p-6", children: [
1648
+ l && /* @__PURE__ */ a.jsx("div", { className: "mb-6", children: /* @__PURE__ */ a.jsx(
1529
1649
  "img",
1530
1650
  {
1531
1651
  src: l,
1532
- alt: o,
1652
+ alt: s,
1533
1653
  className: "w-full h-64 object-cover rounded-lg"
1534
1654
  }
1535
1655
  ) }),
1536
- i.length > 0 && /* @__PURE__ */ s.jsx("div", { className: "space-y-4", children: i.map((v, d) => {
1537
- const h = v.value(f);
1538
- return h == null || h === "" ? null : /* @__PURE__ */ s.jsxs("div", { children: [
1539
- /* @__PURE__ */ s.jsx("div", { className: "text-sm font-medium text-gray-500 mb-1", children: v.label }),
1540
- /* @__PURE__ */ s.jsx("div", { className: "text-base text-gray-900", children: typeof h == "object" ? JSON.stringify(h, null, 2) : String(h) })
1656
+ i.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "space-y-4", children: i.map((y, d) => {
1657
+ const u = y.value(p);
1658
+ return u == null || u === "" ? null : /* @__PURE__ */ a.jsxs("div", { children: [
1659
+ /* @__PURE__ */ a.jsx("div", { className: "text-sm font-medium text-gray-500 mb-1", children: y.label }),
1660
+ /* @__PURE__ */ a.jsx("div", { className: "text-base text-gray-900", children: typeof u == "object" ? JSON.stringify(u, null, 2) : String(u) })
1541
1661
  ] }, d);
1542
1662
  }) }),
1543
- i.length === 0 && /* @__PURE__ */ s.jsx("pre", { className: "bg-gray-50 p-4 rounded-lg text-sm overflow-x-auto", children: JSON.stringify(f, null, 2) })
1663
+ i.length === 0 && /* @__PURE__ */ a.jsx("pre", { className: "bg-gray-50 p-4 rounded-lg text-sm overflow-x-auto", children: JSON.stringify(p, null, 2) })
1544
1664
  ] }),
1545
- t && /* @__PURE__ */ s.jsx("div", { className: "sticky bottom-0 bg-gray-50 border-t border-gray-200 px-6 py-4", children: /* @__PURE__ */ s.jsx(
1665
+ t && /* @__PURE__ */ a.jsx("div", { className: "sticky bottom-0 bg-gray-50 border-t border-gray-200 px-6 py-4", children: /* @__PURE__ */ a.jsx(
1546
1666
  "button",
1547
1667
  {
1548
1668
  onClick: t,
@@ -1552,160 +1672,160 @@ function Ut({
1552
1672
  ) })
1553
1673
  ] }) });
1554
1674
  }
1555
- const Ot = {
1675
+ const Nt = {
1556
1676
  small: "w-32 h-32",
1557
1677
  medium: "w-48 h-48",
1558
1678
  large: "w-64 h-64"
1559
1679
  };
1560
1680
  function Bt({
1561
- nodes: f,
1681
+ nodes: p,
1562
1682
  cardCount: t = 2,
1563
1683
  minInterval: r = 1e3,
1564
1684
  maxInterval: n = 3e3,
1565
1685
  onCardClick: i,
1566
- cardSize: o = "medium",
1686
+ cardSize: s = "medium",
1567
1687
  className: l = ""
1568
1688
  }) {
1569
- const v = Math.min(Math.max(t, 1), 5), [d, h] = L([]), [x, _] = L([]), [S, $] = L(Array(v).fill(!1)), [P, N] = L(Array(v).fill(!1)), H = Xe([]), z = X((m) => {
1570
- const k = f.filter((p) => !m.includes(p._id));
1571
- if (k.length === 0) return null;
1572
- const C = Math.floor(Math.random() * k.length);
1573
- return k[C];
1574
- }, [f]), g = X(() => Math.random() * (n - r) + r, [r, n]);
1575
- fe(() => {
1576
- if (f.length === 0) {
1577
- h([]), _([]);
1689
+ const y = Math.min(Math.max(t, 1), 5), [d, u] = L([]), [x, w] = L([]), [T, C] = L(Array(y).fill(!1)), [P, O] = L(Array(y).fill(!1)), X = Qe([]), z = Q((v) => {
1690
+ const S = p.filter((h) => !v.includes(h._id));
1691
+ if (S.length === 0) return null;
1692
+ const $ = Math.floor(Math.random() * S.length);
1693
+ return S[$];
1694
+ }, [p]), g = Q(() => Math.random() * (n - r) + r, [r, n]);
1695
+ pe(() => {
1696
+ if (p.length === 0) {
1697
+ u([]), w([]);
1578
1698
  return;
1579
1699
  }
1580
- const m = [], k = [], C = [];
1581
- for (let p = 0; p < v && p < f.length; p++) {
1582
- const T = z(C);
1583
- T && (m.push(T), C.push(T._id));
1700
+ const v = [], S = [], $ = [];
1701
+ for (let h = 0; h < y && h < p.length; h++) {
1702
+ const k = z($);
1703
+ k && (v.push(k), $.push(k._id));
1584
1704
  }
1585
- for (let p = 0; p < m.length; p++) {
1586
- const T = [
1587
- m[p]._id,
1588
- ...m.filter((Z, U) => U !== p).map((Z) => Z._id)
1589
- ], j = z(T);
1590
- j ? k.push(j) : k.push(m[p]);
1705
+ for (let h = 0; h < v.length; h++) {
1706
+ const k = [
1707
+ v[h]._id,
1708
+ ...v.filter((Z, I) => I !== h).map((Z) => Z._id)
1709
+ ], j = z(k);
1710
+ j ? S.push(j) : S.push(v[h]);
1591
1711
  }
1592
- h(m), _(k);
1593
- }, [f, v, z]);
1594
- const I = X((m) => {
1595
- const k = g(), C = setTimeout(() => {
1596
- $((p) => {
1597
- const T = [...p];
1598
- return T[m] = !T[m], T;
1712
+ u(v), w(S);
1713
+ }, [p, y, z]);
1714
+ const M = Q((v) => {
1715
+ const S = g(), $ = setTimeout(() => {
1716
+ C((h) => {
1717
+ const k = [...h];
1718
+ return k[v] = !k[v], k;
1599
1719
  }), setTimeout(() => {
1600
- N((p) => {
1601
- const T = [...p];
1602
- return T[m] = !T[m], T;
1720
+ O((h) => {
1721
+ const k = [...h];
1722
+ return k[v] = !k[v], k;
1603
1723
  }), setTimeout(() => {
1604
- const p = !P[m];
1605
- p && h((T) => {
1606
- const j = [...T];
1607
- return j[m] = x[m], j;
1608
- }), _((T) => {
1609
- const j = [...T], U = [
1610
- (p ? x[m] : d[m])._id,
1611
- ...d.filter((D, Y) => Y !== m).map((D) => D._id),
1612
- ...T.filter((D, Y) => Y !== m).map((D) => D._id)
1613
- ], E = z(U);
1614
- return E && (j[m] = E), j;
1724
+ const h = !P[v];
1725
+ h && u((k) => {
1726
+ const j = [...k];
1727
+ return j[v] = x[v], j;
1728
+ }), w((k) => {
1729
+ const j = [...k], I = [
1730
+ (h ? x[v] : d[v])._id,
1731
+ ...d.filter((F, Y) => Y !== v).map((F) => F._id),
1732
+ ...k.filter((F, Y) => Y !== v).map((F) => F._id)
1733
+ ], E = z(I);
1734
+ return E && (j[v] = E), j;
1615
1735
  }), setTimeout(() => {
1616
- I(m);
1736
+ M(v);
1617
1737
  }, 150);
1618
1738
  }, 200);
1619
1739
  }, 150);
1620
- }, k);
1621
- H.current[m] = C;
1622
- }, [g, z, d, x, P]), V = Xe(!1);
1623
- fe(() => {
1624
- if (!(d.length === 0 || f.length <= 1) && !V.current) {
1740
+ }, S);
1741
+ X.current[v] = $;
1742
+ }, [g, z, d, x, P]), V = Qe(!1);
1743
+ pe(() => {
1744
+ if (!(d.length === 0 || p.length <= 1) && !V.current) {
1625
1745
  V.current = !0;
1626
- for (let m = 0; m < d.length; m++)
1627
- I(m);
1746
+ for (let v = 0; v < d.length; v++)
1747
+ M(v);
1628
1748
  return () => {
1629
- H.current.forEach((m) => clearTimeout(m)), H.current = [], V.current = !1;
1749
+ X.current.forEach((v) => clearTimeout(v)), X.current = [], V.current = !1;
1630
1750
  };
1631
1751
  }
1632
- }, [d.length, f.length]);
1633
- const Q = (m) => {
1634
- i && i(m);
1752
+ }, [d.length, p.length]);
1753
+ const H = (v) => {
1754
+ i && i(v);
1635
1755
  };
1636
- return f.length === 0 ? /* @__PURE__ */ s.jsx("div", { className: `flex items-center justify-center p-8 ${l}`, children: /* @__PURE__ */ s.jsx("p", { className: "text-gray-500", children: "No nodes available" }) }) : d.length === 0 ? /* @__PURE__ */ s.jsx("div", { className: `flex items-center justify-center p-8 ${l}`, children: /* @__PURE__ */ s.jsx("p", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ s.jsx("div", { className: `flex gap-4 justify-center items-center flex-wrap ${l}`, children: d.map((m, k) => {
1637
- const C = x[k], p = P[k];
1638
- return /* @__PURE__ */ s.jsx(
1756
+ return p.length === 0 ? /* @__PURE__ */ a.jsx("div", { className: `flex items-center justify-center p-8 ${l}`, children: /* @__PURE__ */ a.jsx("p", { className: "text-gray-500", children: "No nodes available" }) }) : d.length === 0 ? /* @__PURE__ */ a.jsx("div", { className: `flex items-center justify-center p-8 ${l}`, children: /* @__PURE__ */ a.jsx("p", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ a.jsx("div", { className: `flex gap-4 justify-center items-center flex-wrap ${l}`, children: d.map((v, S) => {
1757
+ const $ = x[S], h = P[S];
1758
+ return /* @__PURE__ */ a.jsx(
1639
1759
  "div",
1640
1760
  {
1641
- className: `relative ${Ot[o]}`,
1761
+ className: `relative ${Nt[s]}`,
1642
1762
  style: { perspective: "1000px" },
1643
- onClick: () => Q(p ? C : m),
1644
- children: /* @__PURE__ */ s.jsxs(
1763
+ onClick: () => H(h ? $ : v),
1764
+ children: /* @__PURE__ */ a.jsxs(
1645
1765
  "div",
1646
1766
  {
1647
1767
  className: "w-full h-full rounded-lg shadow-lg overflow-hidden cursor-pointer hover:shadow-xl",
1648
1768
  style: {
1649
- transform: `rotateY(${S[k] ? 180 : 0}deg)`,
1769
+ transform: `rotateY(${T[S] ? 180 : 0}deg)`,
1650
1770
  transition: "transform 0.5s",
1651
1771
  transformStyle: "preserve-3d"
1652
1772
  },
1653
1773
  children: [
1654
- /* @__PURE__ */ s.jsx(
1774
+ /* @__PURE__ */ a.jsx(
1655
1775
  "div",
1656
1776
  {
1657
1777
  className: "absolute inset-0 transition-opacity duration-200",
1658
1778
  style: {
1659
- opacity: p ? 0 : 1
1779
+ opacity: h ? 0 : 1
1660
1780
  },
1661
- children: /* @__PURE__ */ s.jsxs(
1781
+ children: /* @__PURE__ */ a.jsxs(
1662
1782
  "div",
1663
1783
  {
1664
1784
  style: {
1665
- transform: S[k] ? "scaleX(-1)" : "scaleX(1)",
1785
+ transform: T[S] ? "scaleX(-1)" : "scaleX(1)",
1666
1786
  width: "100%",
1667
1787
  height: "100%"
1668
1788
  },
1669
1789
  children: [
1670
- /* @__PURE__ */ s.jsx(
1790
+ /* @__PURE__ */ a.jsx(
1671
1791
  "img",
1672
1792
  {
1673
- src: m.data.image,
1674
- alt: m.title,
1793
+ src: v.data.image,
1794
+ alt: v.title,
1675
1795
  className: "w-full h-full object-cover"
1676
1796
  }
1677
1797
  ),
1678
- /* @__PURE__ */ s.jsx("div", { className: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2", children: /* @__PURE__ */ s.jsx("p", { className: "text-white text-sm font-medium truncate", children: m.title }) })
1798
+ /* @__PURE__ */ a.jsx("div", { className: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2", children: /* @__PURE__ */ a.jsx("p", { className: "text-white text-sm font-medium truncate", children: v.title }) })
1679
1799
  ]
1680
1800
  }
1681
1801
  )
1682
1802
  }
1683
1803
  ),
1684
- C && /* @__PURE__ */ s.jsx(
1804
+ $ && /* @__PURE__ */ a.jsx(
1685
1805
  "div",
1686
1806
  {
1687
1807
  className: "absolute inset-0 transition-opacity duration-200",
1688
1808
  style: {
1689
- opacity: p ? 1 : 0
1809
+ opacity: h ? 1 : 0
1690
1810
  },
1691
- children: /* @__PURE__ */ s.jsxs(
1811
+ children: /* @__PURE__ */ a.jsxs(
1692
1812
  "div",
1693
1813
  {
1694
1814
  style: {
1695
- transform: S[k] ? "scaleX(-1)" : "scaleX(1)",
1815
+ transform: T[S] ? "scaleX(-1)" : "scaleX(1)",
1696
1816
  width: "100%",
1697
1817
  height: "100%"
1698
1818
  },
1699
1819
  children: [
1700
- /* @__PURE__ */ s.jsx(
1820
+ /* @__PURE__ */ a.jsx(
1701
1821
  "img",
1702
1822
  {
1703
- src: C.data.image,
1704
- alt: C.title,
1823
+ src: $.data.image,
1824
+ alt: $.title,
1705
1825
  className: "w-full h-full object-cover"
1706
1826
  }
1707
1827
  ),
1708
- /* @__PURE__ */ s.jsx("div", { className: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2", children: /* @__PURE__ */ s.jsx("p", { className: "text-white text-sm font-medium truncate", children: C.title }) })
1828
+ /* @__PURE__ */ a.jsx("div", { className: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2", children: /* @__PURE__ */ a.jsx("p", { className: "text-white text-sm font-medium truncate", children: $.title }) })
1709
1829
  ]
1710
1830
  }
1711
1831
  )
@@ -1715,22 +1835,22 @@ function Bt({
1715
1835
  }
1716
1836
  )
1717
1837
  },
1718
- `slot-${k}`
1838
+ `slot-${S}`
1719
1839
  );
1720
1840
  }) });
1721
1841
  }
1722
- function je(f) {
1723
- if (!f) return "";
1842
+ function je(p) {
1843
+ if (!p) return "";
1724
1844
  const t = /=\?([^?]+)\?([BQbq])\?([^?]*)\?=/g;
1725
- return f.replace(t, (r, n, i, o) => {
1845
+ return p.replace(t, (r, n, i, s) => {
1726
1846
  try {
1727
1847
  if (i.toUpperCase() === "B") {
1728
- const l = atob(o);
1848
+ const l = atob(s);
1729
1849
  return decodeURIComponent(escape(l));
1730
1850
  } else if (i.toUpperCase() === "Q") {
1731
- const l = o.replace(/_/g, " ").replace(
1851
+ const l = s.replace(/_/g, " ").replace(
1732
1852
  /=([0-9A-Fa-f]{2})/g,
1733
- (v, d) => String.fromCharCode(parseInt(d, 16))
1853
+ (y, d) => String.fromCharCode(parseInt(d, 16))
1734
1854
  );
1735
1855
  return decodeURIComponent(escape(l));
1736
1856
  }
@@ -1752,154 +1872,154 @@ const Pt = {
1752
1872
  danger: "#ef4444"
1753
1873
  };
1754
1874
  function Lt({
1755
- baseUrl: f,
1875
+ baseUrl: p,
1756
1876
  systemId: t,
1757
1877
  accountId: r,
1758
1878
  limit: n = 30,
1759
1879
  selectable: i = !0,
1760
- showDetail: o = !1,
1880
+ showDetail: s = !1,
1761
1881
  emptyMessage: l = "No emails",
1762
- autoLoad: v = !0,
1882
+ autoLoad: y = !0,
1763
1883
  onSelect: d,
1764
- onSelectionChange: h,
1884
+ onSelectionChange: u,
1765
1885
  onDelete: x,
1766
- onError: _,
1767
- renderItem: S,
1768
- renderDetail: $,
1886
+ onError: w,
1887
+ renderItem: T,
1888
+ renderDetail: C,
1769
1889
  renderActions: P,
1770
- renderEmpty: N,
1771
- renderLoading: H,
1890
+ renderEmpty: O,
1891
+ renderLoading: X,
1772
1892
  theme: z = {}
1773
1893
  }) {
1774
- const g = { ...Pt, ...z }, [I, V] = L([]), [Q, m] = L(!1), [k, C] = L(null), [p, T] = L(/* @__PURE__ */ new Set()), [j, Z] = L(null), [U, E] = L(null), D = et(() => t ? new Et({ baseUrl: f, system_id: t }) : null, [f, t]), Y = X(async () => {
1775
- if (D) {
1776
- m(!0), C(null);
1894
+ const g = { ...Pt, ...z }, [M, V] = L([]), [H, v] = L(!1), [S, $] = L(null), [h, k] = L(/* @__PURE__ */ new Set()), [j, Z] = L(null), [I, E] = L(null), F = et(() => t ? new Et({ baseUrl: p, system_id: t }) : null, [p, t]), Y = Q(async () => {
1895
+ if (F) {
1896
+ v(!0), $(null);
1777
1897
  try {
1778
- const u = await D.listEmails(r, n);
1779
- if (u != null && u.messages) {
1780
- const b = [...u.messages].sort(
1898
+ const f = await F.listEmails(r, n);
1899
+ if (f != null && f.messages) {
1900
+ const b = [...f.messages].sort(
1781
1901
  (B, W) => new Date(W.date).getTime() - new Date(B.date).getTime()
1782
1902
  );
1783
1903
  V(b);
1784
1904
  }
1785
- } catch (u) {
1786
- const b = u instanceof Error ? u : new Error("Failed to fetch emails");
1787
- C(b.message), _ == null || _(b);
1905
+ } catch (f) {
1906
+ const b = f instanceof Error ? f : new Error("Failed to fetch emails");
1907
+ $(b.message), w == null || w(b);
1788
1908
  }
1789
- m(!1);
1909
+ v(!1);
1790
1910
  }
1791
- }, [D, r, n, _]);
1792
- fe(() => {
1793
- v && Y();
1794
- }, [v, Y]);
1795
- const pe = X((u, b, B) => {
1911
+ }, [F, r, n, w]);
1912
+ pe(() => {
1913
+ y && Y();
1914
+ }, [y, Y]);
1915
+ const he = Q((f, b, B) => {
1796
1916
  if (!i) {
1797
- d == null || d(u), o && E(u);
1917
+ d == null || d(f), s && E(f);
1798
1918
  return;
1799
1919
  }
1800
- const W = u.uid;
1920
+ const W = f.uid;
1801
1921
  if (B.shiftKey && j !== null) {
1802
- const ee = Math.min(j, b), J = Math.max(j, b), Ne = I.slice(ee, J + 1).map((ce) => ce.uid), we = new Set(Ne);
1803
- T(we), h == null || h(Array.from(we));
1922
+ const ee = Math.min(j, b), J = Math.max(j, b), Oe = M.slice(ee, J + 1).map((ce) => ce.uid), _e = new Set(Oe);
1923
+ k(_e), u == null || u(Array.from(_e));
1804
1924
  } else if (B.ctrlKey || B.metaKey)
1805
- T((ee) => {
1925
+ k((ee) => {
1806
1926
  const J = new Set(ee);
1807
- return J.has(W) ? J.delete(W) : J.add(W), h == null || h(Array.from(J)), J;
1927
+ return J.has(W) ? J.delete(W) : J.add(W), u == null || u(Array.from(J)), J;
1808
1928
  }), Z(b);
1809
- else if (p.size === 1 && p.has(W))
1810
- d == null || d(u), o && E(u);
1929
+ else if (h.size === 1 && h.has(W))
1930
+ d == null || d(f), s && E(f);
1811
1931
  else {
1812
1932
  const ee = /* @__PURE__ */ new Set([W]);
1813
- T(ee), Z(b), h == null || h(Array.from(ee));
1933
+ k(ee), Z(b), u == null || u(Array.from(ee));
1814
1934
  }
1815
- }, [i, j, I, p, d, h, o]), he = X(async () => {
1816
- if (!(!D || p.size === 0))
1935
+ }, [i, j, M, h, d, u, s]), ge = Q(async () => {
1936
+ if (!(!F || h.size === 0))
1817
1937
  try {
1818
- const u = await D.trashEmails(r, Array.from(p));
1819
- if (console.log("Trash result:", u), u.success && u.moved > 0) {
1820
- V((B) => B.filter((W) => !p.has(W.uid)));
1821
- const b = Array.from(p);
1822
- T(/* @__PURE__ */ new Set()), x == null || x(b);
1938
+ const f = await F.trashEmails(r, Array.from(h));
1939
+ if (console.log("Trash result:", f), f.success && f.moved > 0) {
1940
+ V((B) => B.filter((W) => !h.has(W.uid)));
1941
+ const b = Array.from(h);
1942
+ k(/* @__PURE__ */ new Set()), x == null || x(b);
1823
1943
  } else
1824
- C("Failed to move emails to trash");
1825
- } catch (u) {
1826
- const b = u instanceof Error ? u : new Error("Trash failed");
1827
- console.error("Trash error:", b), C(b.message), _ == null || _(b);
1944
+ $("Failed to move emails to trash");
1945
+ } catch (f) {
1946
+ const b = f instanceof Error ? f : new Error("Trash failed");
1947
+ console.error("Trash error:", b), $(b.message), w == null || w(b);
1828
1948
  }
1829
- }, [D, r, p, x, _]), ge = X(async () => {
1830
- if (!(!D || p.size === 0))
1949
+ }, [F, r, h, x, w]), ye = Q(async () => {
1950
+ if (!(!F || h.size === 0))
1831
1951
  try {
1832
- const u = await D.archiveEmails(r, Array.from(p));
1833
- if (console.log("Archive result:", u), u.success && u.archived > 0) {
1834
- V((B) => B.filter((W) => !p.has(W.uid)));
1835
- const b = Array.from(p);
1836
- T(/* @__PURE__ */ new Set()), x == null || x(b);
1952
+ const f = await F.archiveEmails(r, Array.from(h));
1953
+ if (console.log("Archive result:", f), f.success && f.archived > 0) {
1954
+ V((B) => B.filter((W) => !h.has(W.uid)));
1955
+ const b = Array.from(h);
1956
+ k(/* @__PURE__ */ new Set()), x == null || x(b);
1837
1957
  } else
1838
- C("Failed to archive emails");
1839
- } catch (u) {
1840
- const b = u instanceof Error ? u : new Error("Archive failed");
1841
- console.error("Archive error:", b), C(b.message), _ == null || _(b);
1958
+ $("Failed to archive emails");
1959
+ } catch (f) {
1960
+ const b = f instanceof Error ? f : new Error("Archive failed");
1961
+ console.error("Archive error:", b), $(b.message), w == null || w(b);
1842
1962
  }
1843
- }, [D, r, p, x, _]), ye = X(() => {
1844
- if (p.size === I.length)
1845
- T(/* @__PURE__ */ new Set()), h == null || h([]);
1963
+ }, [F, r, h, x, w]), xe = Q(() => {
1964
+ if (h.size === M.length)
1965
+ k(/* @__PURE__ */ new Set()), u == null || u([]);
1846
1966
  else {
1847
- const u = new Set(I.map((b) => b.uid));
1848
- T(u), h == null || h(Array.from(u));
1967
+ const f = new Set(M.map((b) => b.uid));
1968
+ k(f), u == null || u(Array.from(f));
1849
1969
  }
1850
- }, [I, p.size, h]), xe = X(() => {
1851
- T(/* @__PURE__ */ new Set()), h == null || h([]);
1852
- }, [h]), me = {
1853
- delete: he,
1854
- archive: ge,
1970
+ }, [M, h.size, u]), me = Q(() => {
1971
+ k(/* @__PURE__ */ new Set()), u == null || u([]);
1972
+ }, [u]), ve = {
1973
+ delete: ge,
1974
+ archive: ye,
1855
1975
  refresh: Y,
1856
- selectAll: ye,
1857
- clearSelection: xe
1858
- }, ve = (u) => {
1859
- if (!u) return "";
1860
- const b = new Date(u), B = /* @__PURE__ */ new Date();
1976
+ selectAll: xe,
1977
+ clearSelection: me
1978
+ }, be = (f) => {
1979
+ if (!f) return "";
1980
+ const b = new Date(f), B = /* @__PURE__ */ new Date();
1861
1981
  return b.toDateString() === B.toDateString() ? b.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : b.toLocaleDateString([], { month: "short", day: "numeric" });
1862
- }, Re = (u, b) => /* @__PURE__ */ s.jsx("div", { style: {
1982
+ }, Re = (f, b) => /* @__PURE__ */ a.jsx("div", { style: {
1863
1983
  padding: "12px 16px",
1864
- background: b ? g.selectedBackground : u.seen ? g.cardBackground : g.unreadBackground,
1984
+ background: b ? g.selectedBackground : f.seen ? g.cardBackground : g.unreadBackground,
1865
1985
  borderBottom: `1px solid ${g.border}`,
1866
1986
  cursor: "pointer",
1867
1987
  transition: "background 0.15s ease"
1868
- }, children: /* @__PURE__ */ s.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "12px" }, children: [
1869
- /* @__PURE__ */ s.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1870
- /* @__PURE__ */ s.jsx("div", { style: {
1988
+ }, children: /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "12px" }, children: [
1989
+ /* @__PURE__ */ a.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1990
+ /* @__PURE__ */ a.jsx("div", { style: {
1871
1991
  fontSize: "14px",
1872
- fontWeight: u.seen ? 400 : 600,
1992
+ fontWeight: f.seen ? 400 : 600,
1873
1993
  color: g.text,
1874
1994
  whiteSpace: "nowrap",
1875
1995
  overflow: "hidden",
1876
1996
  textOverflow: "ellipsis"
1877
- }, children: je(u.from).split("@")[0] }),
1878
- /* @__PURE__ */ s.jsx("div", { style: {
1997
+ }, children: je(f.from).split("@")[0] }),
1998
+ /* @__PURE__ */ a.jsx("div", { style: {
1879
1999
  fontSize: "14px",
1880
- fontWeight: u.seen ? 400 : 500,
1881
- color: u.seen ? g.textSecondary : g.text,
2000
+ fontWeight: f.seen ? 400 : 500,
2001
+ color: f.seen ? g.textSecondary : g.text,
1882
2002
  marginTop: "2px",
1883
2003
  whiteSpace: "nowrap",
1884
2004
  overflow: "hidden",
1885
2005
  textOverflow: "ellipsis"
1886
- }, children: je(u.subject) || "(No subject)" })
2006
+ }, children: je(f.subject) || "(No subject)" })
1887
2007
  ] }),
1888
- /* @__PURE__ */ s.jsx("div", { style: {
2008
+ /* @__PURE__ */ a.jsx("div", { style: {
1889
2009
  fontSize: "12px",
1890
2010
  color: g.textSecondary,
1891
2011
  flexShrink: 0
1892
- }, children: ve(u.date) })
1893
- ] }) }), Te = (u) => /* @__PURE__ */ s.jsxs("div", { style: { padding: "24px" }, children: [
1894
- /* @__PURE__ */ s.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: g.text }, children: je(u.subject) || "(No subject)" }),
1895
- /* @__PURE__ */ s.jsxs("div", { style: { fontSize: "14px", color: g.textSecondary, marginBottom: "16px" }, children: [
2012
+ }, children: be(f.date) })
2013
+ ] }) }), Te = (f) => /* @__PURE__ */ a.jsxs("div", { style: { padding: "24px" }, children: [
2014
+ /* @__PURE__ */ a.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: g.text }, children: je(f.subject) || "(No subject)" }),
2015
+ /* @__PURE__ */ a.jsxs("div", { style: { fontSize: "14px", color: g.textSecondary, marginBottom: "16px" }, children: [
1896
2016
  "From: ",
1897
- je(u.from),
2017
+ je(f.from),
1898
2018
  " • ",
1899
- new Date(u.date).toLocaleString()
2019
+ new Date(f.date).toLocaleString()
1900
2020
  ] }),
1901
- /* @__PURE__ */ s.jsx("div", { style: { fontSize: "14px", color: g.text }, children: "Email body not loaded. Implement getEmail(uid) to fetch full content." })
1902
- ] }), ie = (u, b) => /* @__PURE__ */ s.jsxs("div", { style: {
2021
+ /* @__PURE__ */ a.jsx("div", { style: { fontSize: "14px", color: g.text }, children: "Email body not loaded. Implement getEmail(uid) to fetch full content." })
2022
+ ] }), ie = (f, b) => /* @__PURE__ */ a.jsxs("div", { style: {
1903
2023
  display: "flex",
1904
2024
  alignItems: "center",
1905
2025
  gap: "8px",
@@ -1907,7 +2027,7 @@ function Lt({
1907
2027
  background: g.cardBackground,
1908
2028
  borderBottom: `1px solid ${g.border}`
1909
2029
  }, children: [
1910
- /* @__PURE__ */ s.jsx(
2030
+ /* @__PURE__ */ a.jsx(
1911
2031
  "button",
1912
2032
  {
1913
2033
  onClick: b.selectAll,
@@ -1920,15 +2040,15 @@ function Lt({
1920
2040
  cursor: "pointer",
1921
2041
  color: g.text
1922
2042
  },
1923
- children: u.length === I.length ? "Deselect All" : "Select All"
2043
+ children: f.length === M.length ? "Deselect All" : "Select All"
1924
2044
  }
1925
2045
  ),
1926
- u.length > 0 && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1927
- /* @__PURE__ */ s.jsxs("span", { style: { fontSize: "13px", color: g.textSecondary }, children: [
1928
- u.length,
2046
+ f.length > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2047
+ /* @__PURE__ */ a.jsxs("span", { style: { fontSize: "13px", color: g.textSecondary }, children: [
2048
+ f.length,
1929
2049
  " selected"
1930
2050
  ] }),
1931
- /* @__PURE__ */ s.jsx(
2051
+ /* @__PURE__ */ a.jsx(
1932
2052
  "button",
1933
2053
  {
1934
2054
  onClick: b.archive,
@@ -1945,10 +2065,10 @@ function Lt({
1945
2065
  cursor: "pointer",
1946
2066
  color: g.textSecondary
1947
2067
  },
1948
- children: /* @__PURE__ */ s.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "archive" })
2068
+ children: /* @__PURE__ */ a.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "archive" })
1949
2069
  }
1950
2070
  ),
1951
- /* @__PURE__ */ s.jsx(
2071
+ /* @__PURE__ */ a.jsx(
1952
2072
  "button",
1953
2073
  {
1954
2074
  onClick: b.delete,
@@ -1965,12 +2085,12 @@ function Lt({
1965
2085
  cursor: "pointer",
1966
2086
  color: g.textSecondary
1967
2087
  },
1968
- children: /* @__PURE__ */ s.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "delete" })
2088
+ children: /* @__PURE__ */ a.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "delete" })
1969
2089
  }
1970
2090
  )
1971
2091
  ] }),
1972
- /* @__PURE__ */ s.jsx("div", { style: { flex: 1 } }),
1973
- /* @__PURE__ */ s.jsx(
2092
+ /* @__PURE__ */ a.jsx("div", { style: { flex: 1 } }),
2093
+ /* @__PURE__ */ a.jsx(
1974
2094
  "button",
1975
2095
  {
1976
2096
  onClick: b.refresh,
@@ -1987,59 +2107,59 @@ function Lt({
1987
2107
  cursor: "pointer",
1988
2108
  color: g.textSecondary
1989
2109
  },
1990
- children: /* @__PURE__ */ s.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "refresh" })
2110
+ children: /* @__PURE__ */ a.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "refresh" })
1991
2111
  }
1992
2112
  )
1993
- ] }), oe = () => /* @__PURE__ */ s.jsx("div", { style: {
2113
+ ] }), oe = () => /* @__PURE__ */ a.jsx("div", { style: {
1994
2114
  padding: "48px",
1995
2115
  textAlign: "center",
1996
2116
  color: g.textSecondary
1997
- }, children: l }), re = () => /* @__PURE__ */ s.jsx("div", { style: {
2117
+ }, children: l }), re = () => /* @__PURE__ */ a.jsx("div", { style: {
1998
2118
  padding: "48px",
1999
2119
  textAlign: "center",
2000
2120
  color: g.textSecondary
2001
- }, children: "Loading..." }), le = S || Re, ne = $ || Te, ke = P || ie, be = N || oe, Se = H || re;
2002
- return Q && I.length === 0 ? /* @__PURE__ */ s.jsx("div", { style: { background: g.background, width: "100%", height: "100%" }, children: Se() }) : /* @__PURE__ */ s.jsxs("div", { style: { display: "flex", background: g.background, width: "100%", height: "100%" }, children: [
2003
- /* @__PURE__ */ s.jsxs("div", { style: {
2004
- flex: o && U ? "0 0 50%" : "1",
2121
+ }, children: "Loading..." }), le = T || Re, ne = C || Te, ke = P || ie, we = O || oe, Se = X || re;
2122
+ return H && M.length === 0 ? /* @__PURE__ */ a.jsx("div", { style: { background: g.background, width: "100%", height: "100%" }, children: Se() }) : /* @__PURE__ */ a.jsxs("div", { style: { display: "flex", background: g.background, width: "100%", height: "100%" }, children: [
2123
+ /* @__PURE__ */ a.jsxs("div", { style: {
2124
+ flex: s && I ? "0 0 50%" : "1",
2005
2125
  display: "flex",
2006
2126
  flexDirection: "column",
2007
- borderRight: o && U ? `1px solid ${g.border}` : "none",
2127
+ borderRight: s && I ? `1px solid ${g.border}` : "none",
2008
2128
  overflow: "hidden"
2009
2129
  }, children: [
2010
- i && ke(Array.from(p), me),
2011
- k && /* @__PURE__ */ s.jsx("div", { style: {
2130
+ i && ke(Array.from(h), ve),
2131
+ S && /* @__PURE__ */ a.jsx("div", { style: {
2012
2132
  padding: "12px 16px",
2013
2133
  background: "#fef2f2",
2014
2134
  color: g.danger,
2015
2135
  fontSize: "14px",
2016
2136
  borderBottom: `1px solid ${g.border}`
2017
- }, children: k }),
2018
- /* @__PURE__ */ s.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: I.length === 0 ? be() : I.map((u, b) => /* @__PURE__ */ s.jsx(
2137
+ }, children: S }),
2138
+ /* @__PURE__ */ a.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: M.length === 0 ? we() : M.map((f, b) => /* @__PURE__ */ a.jsx(
2019
2139
  "div",
2020
2140
  {
2021
- onClick: (B) => pe(u, b, B),
2022
- children: le(u, p.has(u.uid))
2141
+ onClick: (B) => he(f, b, B),
2142
+ children: le(f, h.has(f.uid))
2023
2143
  },
2024
- u.uid
2144
+ f.uid
2025
2145
  )) })
2026
2146
  ] }),
2027
- o && U && /* @__PURE__ */ s.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: ne(U) })
2147
+ s && I && /* @__PURE__ */ a.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: ne(I) })
2028
2148
  ] });
2029
2149
  }
2030
2150
  export {
2031
2151
  Bt as AnimatedCardFlip,
2032
2152
  Tt as ApiClient,
2033
2153
  Rt as AuthManager,
2034
- Mt as Card,
2035
- Fe as DataOperations,
2036
- Ut as Detail,
2154
+ Dt as Card,
2155
+ Ue as DataOperations,
2156
+ It as Detail,
2037
2157
  $t as GraphClient,
2038
2158
  Lt as Mail,
2039
2159
  Et as MailClient,
2040
- It as Stack,
2160
+ Mt as Stack,
2041
2161
  tt as getApiClient,
2042
- Dt as initializeApiClient,
2043
- Ft as useMutation,
2162
+ Ft as initializeApiClient,
2163
+ Ut as useMutation,
2044
2164
  kt as useQuery
2045
2165
  };