@qwanyx/stack 0.2.7 → 0.2.10

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