@qwanyx/stack 0.1.1 → 0.2.2

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