@versini/sassysaint 5.4.15 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,73 +1,90 @@
1
- import { jsxs as _, jsx as l, Fragment as Ne } from "react/jsx-runtime";
2
- import { g as Se, DEFAULT_AI_ENGINE as J } from "./index.D8QVMbN9.js";
3
- import E, { useSyncExternalStore as Ce, useCallback as U, useEffect as R, useContext as H, useRef as k, useState as $, useLayoutEffect as O, useMemo as ne, useId as Ae, useReducer as Ie } from "react";
4
- import i from "clsx";
5
- const Nt = ({
1
+ import C, { useSyncExternalStore as He, useCallback as P, useEffect as R, useContext as B, useRef as f, useState as $, useLayoutEffect as L, useMemo as me, useId as ze, useReducer as Le } from "react";
2
+ import { jsxs as N, jsx as c, Fragment as Ve } from "react/jsx-runtime";
3
+ import { g as ge, DEFAULT_AI_ENGINE as X, O as Oe, ACTION_RESET as Me } from "./index.DiAX0KiN.js";
4
+ import l from "clsx";
5
+ const Ue = ({
6
6
  className: e,
7
7
  viewBox: r,
8
8
  title: t,
9
9
  monotone: a,
10
10
  ...o
11
- }) => /* @__PURE__ */ _(
12
- Se,
11
+ }) => /* @__PURE__ */ N(
12
+ ge,
13
13
  {
14
- defaultViewBox: "0 0 512 512",
14
+ defaultViewBox: "0 0 448 512",
15
15
  size: "size-5",
16
16
  viewBox: r,
17
17
  className: e,
18
- title: t || "Edit",
18
+ title: t || "Add",
19
19
  ...o,
20
20
  children: [
21
- /* @__PURE__ */ l(
21
+ /* @__PURE__ */ c(
22
22
  "path",
23
23
  {
24
24
  opacity: a ? "1" : "0.4",
25
- d: "M0 160c0-53 43-96 96-96h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32 14.3-32 32V416c0 17.7 14.3 32 32 32H352c17.7 0 32-14.3 32-32V320c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 53-43 96-96 96H96c-53 0-96-43-96-96V160z"
25
+ d: "M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"
26
26
  }
27
27
  ),
28
- /* @__PURE__ */ l("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
28
+ /* @__PURE__ */ c("path", { d: "" })
29
29
  ]
30
30
  }
31
+ ), Fe = ({
32
+ className: e,
33
+ viewBox: r,
34
+ title: t,
35
+ monotone: a,
36
+ ...o
37
+ }) => /* @__PURE__ */ c(
38
+ ge,
39
+ {
40
+ defaultViewBox: "0 0 384 512",
41
+ size: "size-5",
42
+ viewBox: r,
43
+ className: e,
44
+ title: t || "Close",
45
+ ...o,
46
+ children: /* @__PURE__ */ c("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
47
+ }
31
48
  );
32
- function ce(e, r) {
49
+ function he(e, r) {
33
50
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: r }));
34
51
  }
35
- const re = (e, r) => {
52
+ const le = (e, r) => {
36
53
  const t = JSON.stringify(
37
54
  typeof r == "function" ? r() : r
38
55
  );
39
- window.localStorage.setItem(e, t), ce(e, t);
40
- }, $e = (e) => {
41
- window.localStorage.removeItem(e), ce(e, null);
42
- }, ae = (e) => window.localStorage.getItem(e), Re = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
43
- function St({
56
+ window.localStorage.setItem(e, t), he(e, t);
57
+ }, Pe = (e) => {
58
+ window.localStorage.removeItem(e), he(e, null);
59
+ }, se = (e) => window.localStorage.getItem(e), Ge = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
60
+ function Ot({
44
61
  key: e,
45
62
  initialValue: r
46
63
  }) {
47
- const t = Ce(Re, () => ae(e)), a = U(
48
- (n) => {
64
+ const t = He(Ge, () => se(e)), a = P(
65
+ (i) => {
49
66
  try {
50
- const s = typeof n == "function" ? n(JSON.parse(t)) : n;
51
- s == null ? $e(e) : re(e, s);
67
+ const s = typeof i == "function" ? i(JSON.parse(t)) : i;
68
+ s == null ? Pe(e) : le(e, s);
52
69
  } catch (s) {
53
70
  console.warn(s);
54
71
  }
55
72
  },
56
73
  [e, t]
57
- ), o = U(() => {
74
+ ), o = P(() => {
58
75
  a(r);
59
- }, [r, a]), c = U(() => {
76
+ }, [r, a]), n = P(() => {
60
77
  a(null);
61
78
  }, [a]);
62
79
  return R(() => {
63
80
  try {
64
- ae(e) === null && typeof r < "u" && re(e, r);
65
- } catch (n) {
66
- console.warn(n);
81
+ se(e) === null && typeof r < "u" && le(e, r);
82
+ } catch (i) {
83
+ console.warn(i);
67
84
  }
68
- }, [e, r]), [t ? JSON.parse(t) : null, a, o, c];
85
+ }, [e, r]), [t ? JSON.parse(t) : null, a, o, n];
69
86
  }
70
- const x = {
87
+ const E = {
71
88
  GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
72
89
  location(latitude: $latitude, longitude: $longitude) {
73
90
  country
@@ -171,44 +188,44 @@ const x = {
171
188
  engine: $engine,
172
189
  tags: $tags)
173
190
  }`
174
- }, Ct = {
191
+ }, Mt = {
175
192
  GET_LOCATION: {
176
- schema: x.GET_LOCATION,
193
+ schema: E.GET_LOCATION,
177
194
  method: "location"
178
195
  },
179
196
  GET_CHATS: {
180
- schema: x.GET_CHATS,
197
+ schema: E.GET_CHATS,
181
198
  method: "chats"
182
199
  },
183
200
  GET_CHATS_STATS: {
184
- schema: x.GET_CHATS_STATS,
201
+ schema: E.GET_CHATS_STATS,
185
202
  method: "chatsStats"
186
203
  },
187
204
  GET_CHAT: {
188
- schema: x.GET_CHAT,
205
+ schema: E.GET_CHAT,
189
206
  method: "chatById"
190
207
  },
191
208
  DELETE_CHAT: {
192
- schema: x.DELETE_CHAT,
209
+ schema: E.DELETE_CHAT,
193
210
  method: "deleteChat"
194
211
  },
195
212
  ABOUT: {
196
- schema: x.ABOUT,
213
+ schema: E.ABOUT,
197
214
  method: "about"
198
215
  },
199
216
  GET_USER_PREFERENCES: {
200
- schema: x.GET_USER_PREFERENCES,
217
+ schema: E.GET_USER_PREFERENCES,
201
218
  method: "getUserPreferences"
202
219
  },
203
220
  SET_USER_PREFERENCES: {
204
- schema: x.SET_USER_PREFERENCES,
221
+ schema: E.SET_USER_PREFERENCES,
205
222
  method: "setUserPreferences"
206
223
  }
207
- }, se = process.env.PUBLIC_SASSY_API_SERVER_URL, He = async ({
224
+ }, pe = process.env.PUBLIC_SASSY_API_SERVER_URL, De = async ({
208
225
  query: e,
209
226
  data: r,
210
227
  headers: t = {}
211
- }) => await fetch(`${se}/graphql`, {
228
+ }) => await fetch(`${pe}/graphql`, {
212
229
  method: "POST",
213
230
  credentials: "include",
214
231
  headers: {
@@ -220,39 +237,39 @@ const x = {
220
237
  query: e,
221
238
  variables: r
222
239
  })
223
- }), At = async ({
240
+ }), Ut = async ({
224
241
  accessToken: e,
225
242
  type: r,
226
243
  params: t = {}
227
244
  }) => {
228
245
  const a = r != null && r.data ? r.data(t) : t;
229
246
  try {
230
- const o = `Bearer ${e}`, c = await He({
247
+ const o = `Bearer ${e}`, n = await De({
231
248
  headers: {
232
249
  authorization: o
233
250
  },
234
251
  query: r.schema,
235
252
  data: a
236
253
  });
237
- if (c.status !== 200)
238
- return { status: c.status, data: [] };
239
- const { data: n, errors: s } = await c.json();
254
+ if (n.status !== 200)
255
+ return { status: n.status, data: [] };
256
+ const { data: i, errors: s } = await n.json();
240
257
  return {
241
- status: c.status,
242
- data: n[r.method],
258
+ status: n.status,
259
+ data: i[r.method],
243
260
  errors: s
244
261
  };
245
262
  } catch (o) {
246
263
  return console.error(o), { status: 500, data: [] };
247
264
  }
248
- }, It = async ({
265
+ }, Ft = async ({
249
266
  accessToken: e,
250
267
  name: r,
251
268
  data: t,
252
269
  method: a = "POST"
253
270
  }) => {
254
271
  const o = `Bearer ${e}`;
255
- return await fetch(`${se}/api/${r}`, {
272
+ return await fetch(`${pe}/api/${r}`, {
256
273
  method: a,
257
274
  credentials: "include",
258
275
  headers: {
@@ -261,11 +278,11 @@ const x = {
261
278
  },
262
279
  body: JSON.stringify(t)
263
280
  });
264
- }, $t = E.createContext({
281
+ }, We = C.createContext({
265
282
  state: {
266
283
  id: "",
267
- model: J,
268
- engine: J,
284
+ model: X,
285
+ engine: X,
269
286
  usage: 0,
270
287
  messages: [],
271
288
  isComponent: !1,
@@ -277,18 +294,43 @@ const x = {
277
294
  version: "",
278
295
  models: [],
279
296
  plugins: [],
280
- engine: J,
297
+ engine: X,
281
298
  engines: []
282
299
  }
283
- }), Rt = E.createContext({
300
+ }), Pt = C.createContext({
284
301
  state: { searchString: "", sortedCell: "", sortDirection: "" },
285
302
  dispatch: () => {
286
303
  }
287
- }), Ht = E.createContext({
304
+ }), Gt = C.createContext({
288
305
  state: { tag: "" },
289
306
  dispatch: () => {
290
307
  }
291
- });
308
+ }), Dt = ({
309
+ mode: e = "light",
310
+ focusMode: r = "light",
311
+ radius: t = "small"
312
+ }) => {
313
+ const { state: a, dispatch: o } = B(We), n = f(null), i = f(!1), s = (d) => {
314
+ d.preventDefault(), o({
315
+ type: Me
316
+ });
317
+ };
318
+ return R(() => {
319
+ var d;
320
+ (a == null ? void 0 : a.streaming) === !0 && !i.current && n.current && (i.current = !0, n.current.focus()), (a == null ? void 0 : a.streaming) === !1 && (i.current = !1, (d = n.current) == null || d.blur());
321
+ }, [a]), /* @__PURE__ */ c(
322
+ Oe,
323
+ {
324
+ noBorder: !0,
325
+ radius: t,
326
+ mode: e,
327
+ focusMode: r,
328
+ ref: n,
329
+ onClick: s,
330
+ children: a != null && a.streaming ? /* @__PURE__ */ c(Fe, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ c(Ue, { size: "size-4", monotone: !0 })
331
+ }
332
+ );
333
+ };
292
334
  /*!
293
335
  @versini/ui-table v2.0.8
294
336
  © 2024 gizmette.com
@@ -302,17 +344,17 @@ try {
302
344
  });
303
345
  } catch {
304
346
  }
305
- const F = "thead", X = "tfoot", N = "tbody", M = {
347
+ const G = "thead", K = "tfoot", I = "tbody", F = {
306
348
  ASC: "asc",
307
349
  DESC: "desc"
308
- }, Be = ({
350
+ }, je = ({
309
351
  mode: e,
310
352
  className: r,
311
353
  wrapperClassName: t,
312
354
  stickyHeader: a,
313
355
  stickyFooter: o
314
356
  }) => ({
315
- wrapper: i(
357
+ wrapper: l(
316
358
  "not-prose relative w-full rounded-lg shadow-md",
317
359
  {
318
360
  "overflow-x-auto": !a && !o,
@@ -324,23 +366,23 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
324
366
  },
325
367
  t
326
368
  ),
327
- table: i("my-0 w-full text-left text-sm", r, {
369
+ table: l("my-0 w-full text-left text-sm", r, {
328
370
  "text-copy-light": e === "dark",
329
371
  "text-copy-dark": e === "light",
330
372
  "text-copy-light dark:text-copy-dark": e === "system",
331
373
  "text-copy-dark dark:text-copy-light": e === "alt-system"
332
374
  }),
333
- caption: i("py-2 text-sm font-bold", {
375
+ caption: l("py-2 text-sm font-bold", {
334
376
  "text-copy-light": e === "dark",
335
377
  "text-copy-dark": e === "light",
336
378
  "text-copy-light dark:text-copy-dark": e === "system",
337
379
  "text-copy-dark dark:text-copy-light": e === "alt-system"
338
380
  })
339
- }), ze = ({
381
+ }), qe = ({
340
382
  className: e,
341
383
  stickyHeader: r,
342
384
  mode: t
343
- }) => i(
385
+ }) => l(
344
386
  {
345
387
  "sticky top-0 z-10": r,
346
388
  "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "dark",
@@ -349,11 +391,11 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
349
391
  "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "alt-system"
350
392
  },
351
393
  e
352
- ), Le = ({
394
+ ), Je = ({
353
395
  className: e,
354
396
  stickyFooter: r,
355
397
  mode: t
356
- }) => i(
398
+ }) => l(
357
399
  {
358
400
  "sticky bottom-0 z-10": r,
359
401
  "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "dark",
@@ -362,11 +404,11 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
362
404
  "shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "alt-system"
363
405
  },
364
406
  e
365
- ), Ve = ({
407
+ ), Qe = ({
366
408
  mode: e,
367
409
  className: r,
368
410
  cellWrapper: t
369
- }) => t === F || t === X ? i(
411
+ }) => t === G || t === K ? l(
370
412
  {
371
413
  "bg-table-head-dark": e === "dark",
372
414
  "bg-table-head-light": e === "light",
@@ -374,60 +416,60 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
374
416
  "bg-table-head-light dark:bg-table-head-dark": e === "alt-system"
375
417
  },
376
418
  r
377
- ) : i(
419
+ ) : l(
378
420
  "border-b last:border-0",
379
421
  {
380
422
  "border-table-dark": e === "dark",
381
- "odd:bg-table-dark-odd even:bg-table-dark-even": t === N && e === "dark",
423
+ "odd:bg-table-dark-odd even:bg-table-dark-even": t === I && e === "dark",
382
424
  "border-table-light": e === "light",
383
- "odd:bg-table-light-odd even:bg-table-light-even": t === N && e === "light",
425
+ "odd:bg-table-light-odd even:bg-table-light-even": t === I && e === "light",
384
426
  "border-table-dark dark:border-table-light": e === "system",
385
- "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === N && e === "system",
427
+ "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === I && e === "system",
386
428
  "border-table-light dark:border-table-dark": e === "alt-system",
387
- "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === N && e === "alt-system"
429
+ "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === I && e === "alt-system"
388
430
  },
389
431
  r
390
- ), Oe = ({
432
+ ), Xe = ({
391
433
  cellWrapper: e,
392
434
  className: r,
393
435
  compact: t,
394
436
  mode: a
395
- }) => i(
437
+ }) => l(
396
438
  {
397
439
  "text-copy-light": a === "dark",
398
440
  "text-copy-dark": a === "light",
399
441
  "text-copy-light dark:text-copy-dark": a === "system",
400
442
  "text-copy-dark dark:text-copy-light": a === "alt-system",
401
- "px-4 py-3": !t && (e === F || e === X),
402
- "p-4": !t && e === N,
443
+ "px-4 py-3": !t && (e === G || e === K),
444
+ "p-4": !t && e === I,
403
445
  "px-2 py-1.5": t
404
446
  },
405
447
  r
406
- ), Me = ({
448
+ ), Ye = ({
407
449
  buttonClassName: e
408
- }) => i("rounded-none text-sm", e), oe = "av-button", le = "icon", Ue = "button", Fe = "link", Ge = ({
450
+ }) => l("rounded-none text-sm", e), ce = "av-button", be = "icon", Ke = "button", Ze = "link", et = ({
409
451
  type: e,
410
452
  size: r,
411
453
  labelRight: t,
412
454
  labelLeft: a,
413
455
  align: o
414
456
  }) => {
415
- const c = "text-sm font-medium max-h-8 py-0 px-2", n = "text-base font-medium max-h-9 py-1 px-3", s = "text-lg font-medium max-h-12 py-2 px-4";
457
+ const n = "text-sm font-medium max-h-8 py-0 px-2", i = "text-base font-medium max-h-9 py-1 px-3", s = "text-lg font-medium max-h-12 py-2 px-4";
416
458
  switch (e) {
417
- case Ue:
418
- return i({
419
- [c]: r === "small",
420
- [n]: r === "medium",
459
+ case Ke:
460
+ return l({
461
+ [n]: r === "small",
462
+ [i]: r === "medium",
421
463
  [s]: r === "large"
422
464
  });
423
- case Fe:
424
- return i("text-center", {
425
- [c]: r === "small",
426
- [n]: r === "medium",
465
+ case Ze:
466
+ return l("text-center", {
467
+ [n]: r === "small",
468
+ [i]: r === "medium",
427
469
  [s]: r === "large"
428
470
  });
429
- case le:
430
- return i("inline-flex items-center", {
471
+ case be:
472
+ return l("inline-flex items-center", {
431
473
  "justify-center": o === "center",
432
474
  "justify-start": o === "left",
433
475
  "justify-end": o === "right",
@@ -439,7 +481,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
439
481
  "h-12 px-4 text-lg font-medium": r === "large" && (t || a)
440
482
  });
441
483
  }
442
- }, Pe = ({
484
+ }, tt = ({
443
485
  mode: e,
444
486
  noBackground: r,
445
487
  noTruncate: t,
@@ -447,13 +489,13 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
447
489
  radius: o
448
490
  }) => {
449
491
  if (r)
450
- return i("not-prose", {
492
+ return l("not-prose", {
451
493
  "rounded-full": o === "large",
452
494
  "rounded-md": o === "medium",
453
495
  "rounded-sm": o === "small"
454
496
  });
455
497
  if (a === "primary")
456
- return i("not-prose", {
498
+ return l("not-prose", {
457
499
  "rounded-full": o === "large",
458
500
  "rounded-md": o === "medium",
459
501
  "rounded-sm": o === "small",
@@ -464,7 +506,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
464
506
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
465
507
  });
466
508
  if (a === "secondary")
467
- return i("not-prose", {
509
+ return l("not-prose", {
468
510
  "rounded-full": o === "large",
469
511
  "rounded-md": o === "medium",
470
512
  "rounded-sm": o === "small",
@@ -475,7 +517,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
475
517
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
476
518
  });
477
519
  if (a === "danger")
478
- return i("not-prose", {
520
+ return l("not-prose", {
479
521
  "rounded-full": o === "large",
480
522
  "rounded-md": o === "medium",
481
523
  "rounded-sm": o === "small",
@@ -486,7 +528,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
486
528
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
487
529
  });
488
530
  if (a === "selected")
489
- return i("not-prose", {
531
+ return l("not-prose", {
490
532
  "rounded-full": o === "large",
491
533
  "rounded-md": o === "medium",
492
534
  "rounded-sm": o === "small",
@@ -496,7 +538,7 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
496
538
  "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
497
539
  "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
498
540
  });
499
- }, De = ({
541
+ }, rt = ({
500
542
  mode: e,
501
543
  disabled: r,
502
544
  variant: t
@@ -504,34 +546,34 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
504
546
  if (r)
505
547
  return "";
506
548
  if (t === "primary")
507
- return i("hover:text-copy-light-hover", {
549
+ return l("hover:text-copy-light-hover", {
508
550
  "hover:bg-action-dark-hover": e === "dark",
509
551
  "hover:bg-action-light-hover": e === "light",
510
552
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
511
553
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
512
554
  });
513
555
  if (t === "secondary")
514
- return i("hover:text-copy-light-hover", {
556
+ return l("hover:text-copy-light-hover", {
515
557
  "hover:bg-action-dark-hover": e === "light",
516
558
  "hover:bg-action-light-hover": e === "dark",
517
559
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
518
560
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
519
561
  });
520
562
  if (t === "danger")
521
- return i("hover:text-copy-light-hover", {
563
+ return l("hover:text-copy-light-hover", {
522
564
  "hover:bg-action-danger-dark-hover": e === "dark",
523
565
  "hover:bg-action-danger-light-hover": e === "light",
524
566
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
525
567
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
526
568
  });
527
569
  if (t === "selected")
528
- return i("hover:text-copy-light-hover", {
570
+ return l("hover:text-copy-light-hover", {
529
571
  "hover:bg-action-selected-dark-hover": e === "dark",
530
572
  "hover:bg-action-selected-light-hover": e === "light",
531
573
  "hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
532
574
  "hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
533
575
  });
534
- }, We = ({
576
+ }, at = ({
535
577
  mode: e,
536
578
  disabled: r,
537
579
  variant: t
@@ -539,34 +581,34 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
539
581
  if (r)
540
582
  return "";
541
583
  if (t === "primary")
542
- return i("active:text-copy-light-active", {
584
+ return l("active:text-copy-light-active", {
543
585
  "active:bg-action-dark-active": e === "dark",
544
586
  "active:bg-action-light-active": e === "light",
545
587
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
546
588
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
547
589
  });
548
590
  if (t === "secondary")
549
- return i("active:text-copy-light-active", {
591
+ return l("active:text-copy-light-active", {
550
592
  "active:bg-action-dark-active": e === "light",
551
593
  "active:bg-action-light-active": e === "dark",
552
594
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
553
595
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
554
596
  });
555
597
  if (t === "danger")
556
- return i("active:text-copy-lighter-active", {
598
+ return l("active:text-copy-lighter-active", {
557
599
  "active:bg-action-danger-dark-active": e === "dark",
558
600
  "active:bg-action-danger-light-active": e === "light",
559
601
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
560
602
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
561
603
  });
562
604
  if (t === "selected")
563
- return i("active:text-copy-lighter-active", {
605
+ return l("active:text-copy-lighter-active", {
564
606
  "active:bg-action-selected-dark-active": e === "dark",
565
607
  "active:bg-action-selected-light-active": e === "light",
566
608
  "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
567
609
  "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
568
610
  });
569
- }, je = ({
611
+ }, ot = ({
570
612
  mode: e,
571
613
  noBorder: r,
572
614
  variant: t
@@ -574,99 +616,99 @@ const F = "thead", X = "tfoot", N = "tbody", M = {
574
616
  if (r)
575
617
  return "border border-transparent";
576
618
  if (t === "primary")
577
- return i("border", {
619
+ return l("border", {
578
620
  "border-border-dark": e === "dark",
579
621
  "border-border-accent": e === "light",
580
622
  "border-border-dark dark:border-border-accent": e === "system",
581
623
  "border-border-accent dark:border-border-dark": e === "alt-system"
582
624
  });
583
625
  if (t === "secondary")
584
- return i("border", {
626
+ return l("border", {
585
627
  "border-border-dark": e === "light",
586
628
  "border-border-accent": e === "dark",
587
629
  "border-border-dark dark:border-border-accent": e === "alt-system",
588
630
  "border-border-accent dark:border-border-dark": e === "system"
589
631
  });
590
632
  if (t === "danger")
591
- return i("border", {
633
+ return l("border", {
592
634
  "border-border-danger-dark": e === "dark",
593
635
  "border-border-danger-medium": e === "light",
594
636
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
595
637
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
596
638
  });
597
639
  if (t === "selected")
598
- return i("border", {
640
+ return l("border", {
599
641
  "border-border-selected-dark": e === "dark",
600
642
  "border-border-selected-medium": e === "light",
601
643
  "border-border-selected-dark dark:border-border-selected-medium": e === "system",
602
644
  "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
603
645
  });
604
- }, qe = ({
646
+ }, nt = ({
605
647
  focusMode: e
606
- }) => i("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
648
+ }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
607
649
  "focus:outline-focus-dark": e === "dark",
608
650
  "focus:outline-focus-light": e === "light",
609
651
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
610
652
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
611
- }), Je = ({
653
+ }), it = ({
612
654
  type: e,
613
655
  className: r,
614
656
  raw: t,
615
657
  mode: a,
616
658
  focusMode: o,
617
- disabled: c,
618
- fullWidth: n,
659
+ disabled: n,
660
+ fullWidth: i,
619
661
  size: s,
620
662
  noBorder: d,
621
663
  labelRight: u,
622
664
  labelLeft: m,
623
- noBackground: g,
624
- variant: h,
665
+ noBackground: h,
666
+ variant: g,
625
667
  noTruncate: b,
626
668
  align: p,
627
- radius: w
628
- }) => (h || (h = "primary"), t ? i(oe, r) : i(
629
- oe,
630
- Pe({
669
+ radius: v
670
+ }) => (g || (g = "primary"), t ? l(ce, r) : l(
671
+ ce,
672
+ tt({
631
673
  mode: a,
632
- variant: h,
633
- noBackground: g,
674
+ variant: g,
675
+ noBackground: h,
634
676
  noTruncate: b,
635
- radius: w
677
+ radius: v
636
678
  }),
637
- Ge({
679
+ et({
638
680
  type: e,
639
681
  size: s,
640
682
  labelRight: u,
641
683
  labelLeft: m,
642
684
  align: p
643
685
  }),
644
- je({ mode: a, variant: h, noBorder: d }),
645
- qe({ focusMode: o }),
646
- De({ mode: a, variant: h, disabled: c }),
647
- We({ mode: a, variant: h, disabled: c }),
686
+ ot({ mode: a, variant: g, noBorder: d }),
687
+ nt({ focusMode: o }),
688
+ rt({ mode: a, variant: g, disabled: n }),
689
+ at({ mode: a, variant: g, disabled: n }),
648
690
  {
649
- "w-full": n,
650
- "disabled:cursor-not-allowed disabled:opacity-50": c
691
+ "w-full": i,
692
+ "disabled:cursor-not-allowed disabled:opacity-50": n
651
693
  },
652
694
  r
653
- )), Qe = (e, r, t) => {
695
+ )), lt = (e, r, t) => {
654
696
  var a;
655
697
  !r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
656
- }, de = E.forwardRef((e, r) => {
698
+ }, ye = C.forwardRef((e, r) => {
657
699
  const { onClick: t, noInternalClick: a = !1, ...o } = e;
658
- return /* @__PURE__ */ l(
700
+ return /* @__PURE__ */ c(
659
701
  "button",
660
702
  {
661
703
  ref: r,
662
- onClick: (c) => {
663
- Qe(c, a, t);
704
+ onClick: (n) => {
705
+ lt(n, a, t);
664
706
  },
665
707
  ...o
666
708
  }
667
709
  );
668
710
  });
669
- de.displayName = "BaseButton";
711
+ ye.displayName = "BaseButton";
670
712
  /*!
671
713
  @versini/ui-button v3.2.0
672
714
  © 2024 gizmette.com
@@ -680,49 +722,49 @@ try {
680
722
  });
681
723
  } catch {
682
724
  }
683
- const ue = E.forwardRef(
725
+ const fe = C.forwardRef(
684
726
  ({
685
727
  children: e,
686
728
  disabled: r = !1,
687
729
  mode: t = "system",
688
730
  focusMode: a = "system",
689
731
  fullWidth: o = !1,
690
- className: c,
691
- type: n = "button",
732
+ className: n,
733
+ type: i = "button",
692
734
  raw: s = !1,
693
735
  noBorder: d = !1,
694
736
  "aria-label": u,
695
737
  label: m,
696
- size: g = "medium",
697
- labelRight: h,
738
+ size: h = "medium",
739
+ labelRight: g,
698
740
  labelLeft: b,
699
741
  noBackground: p = !1,
700
- align: w = "center",
701
- active: C = !1,
702
- radius: B = "large",
703
- ...z
704
- }, L) => {
705
- const G = Je({
706
- type: le,
742
+ align: v = "center",
743
+ active: k = !1,
744
+ radius: _ = "large",
745
+ ...V
746
+ }, O) => {
747
+ const M = it({
748
+ type: be,
707
749
  mode: t,
708
750
  focusMode: a,
709
751
  fullWidth: o,
710
752
  disabled: r,
711
753
  raw: s,
712
- className: c,
754
+ className: n,
713
755
  noBorder: d,
714
- size: g,
715
- labelRight: h,
756
+ size: h,
757
+ labelRight: g,
716
758
  labelLeft: b,
717
759
  noBackground: p,
718
- align: w,
719
- radius: B
720
- }), P = i({
760
+ align: v,
761
+ radius: _
762
+ }), D = l({
721
763
  "text-copy-accent-dark": t === "light" && !s,
722
764
  "text-copy-light": t === "dark" && !s,
723
765
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !s,
724
766
  "text-copy-light dark:text-copy-accent-dark": t === "system" && !s
725
- }), f = C ? i(
767
+ }), W = k ? l(
726
768
  "relative",
727
769
  "focus-within:static",
728
770
  "focus-within:after:border-transparent",
@@ -739,39 +781,39 @@ const ue = E.forwardRef(
739
781
  "after:border-table-light dark:after:border-table-dark": t === "alt-system"
740
782
  }
741
783
  ) : "";
742
- return /* @__PURE__ */ l("div", { className: f, children: /* @__PURE__ */ _(
743
- de,
784
+ return /* @__PURE__ */ c("div", { className: W, children: /* @__PURE__ */ N(
785
+ ye,
744
786
  {
745
- ref: L,
746
- className: G,
787
+ ref: O,
788
+ className: M,
747
789
  disabled: r,
748
- type: n,
790
+ type: i,
749
791
  "aria-label": u || m,
750
- ...z,
792
+ ...V,
751
793
  children: [
752
- b && /* @__PURE__ */ l("span", { className: "pr-2", children: b }),
753
- /* @__PURE__ */ l("div", { className: P, children: e }),
754
- h && /* @__PURE__ */ l("span", { className: "pl-2", children: h })
794
+ b && /* @__PURE__ */ c("span", { className: "pr-2", children: b }),
795
+ /* @__PURE__ */ c("div", { className: D, children: e }),
796
+ g && /* @__PURE__ */ c("span", { className: "pl-2", children: g })
755
797
  ]
756
798
  }
757
799
  ) });
758
800
  }
759
801
  );
760
- ue.displayName = "ButtonSort";
761
- const Y = ({
802
+ fe.displayName = "ButtonSort";
803
+ const Z = ({
762
804
  children: e,
763
805
  fill: r,
764
806
  viewBox: t,
765
807
  className: a,
766
808
  defaultViewBox: o,
767
- size: c,
768
- title: n,
809
+ size: n,
810
+ title: i,
769
811
  semantic: s = !1,
770
812
  ...d
771
813
  }) => {
772
- const u = i(c, a);
773
- return /* @__PURE__ */ _(Ne, { children: [
774
- /* @__PURE__ */ l(
814
+ const u = l(n, a);
815
+ return /* @__PURE__ */ N(Ve, { children: [
816
+ /* @__PURE__ */ c(
775
817
  "svg",
776
818
  {
777
819
  xmlns: "http://www.w3.org/2000/svg",
@@ -785,7 +827,7 @@ const Y = ({
785
827
  children: e
786
828
  }
787
829
  ),
788
- n && s && /* @__PURE__ */ l("span", { className: "sr-only", children: n })
830
+ i && s && /* @__PURE__ */ c("span", { className: "sr-only", children: i })
789
831
  ] });
790
832
  };
791
833
  /*!
@@ -801,14 +843,14 @@ try {
801
843
  });
802
844
  } catch {
803
845
  }
804
- const Xe = ({
846
+ const st = ({
805
847
  className: e,
806
848
  viewBox: r,
807
849
  title: t,
808
850
  monotone: a,
809
851
  ...o
810
- }) => /* @__PURE__ */ _(
811
- Y,
852
+ }) => /* @__PURE__ */ N(
853
+ Z,
812
854
  {
813
855
  defaultViewBox: "0 0 576 512",
814
856
  size: "size-5",
@@ -817,24 +859,24 @@ const Xe = ({
817
859
  title: t || "Sort",
818
860
  ...o,
819
861
  children: [
820
- /* @__PURE__ */ l(
862
+ /* @__PURE__ */ c(
821
863
  "path",
822
864
  {
823
865
  opacity: a ? "1" : "0.4",
824
866
  d: "M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L448 141.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V141.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96z"
825
867
  }
826
868
  ),
827
- /* @__PURE__ */ l("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
869
+ /* @__PURE__ */ c("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
828
870
  ]
829
871
  }
830
- ), Ye = ({
872
+ ), ct = ({
831
873
  className: e,
832
874
  viewBox: r,
833
875
  title: t,
834
876
  monotone: a,
835
877
  ...o
836
- }) => /* @__PURE__ */ _(
837
- Y,
878
+ }) => /* @__PURE__ */ N(
879
+ Z,
838
880
  {
839
881
  defaultViewBox: "0 0 576 512",
840
882
  size: "size-5",
@@ -843,24 +885,24 @@ const Xe = ({
843
885
  title: t || "Sort Down",
844
886
  ...o,
845
887
  children: [
846
- /* @__PURE__ */ l(
888
+ /* @__PURE__ */ c(
847
889
  "path",
848
890
  {
849
891
  opacity: a ? "1" : "0.4",
850
892
  d: "M288 448c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32z"
851
893
  }
852
894
  ),
853
- /* @__PURE__ */ l("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
895
+ /* @__PURE__ */ c("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
854
896
  ]
855
897
  }
856
- ), Ke = ({
898
+ ), dt = ({
857
899
  className: e,
858
900
  viewBox: r,
859
901
  title: t,
860
902
  monotone: a,
861
903
  ...o
862
- }) => /* @__PURE__ */ _(
863
- Y,
904
+ }) => /* @__PURE__ */ N(
905
+ Z,
864
906
  {
865
907
  defaultViewBox: "0 0 576 512",
866
908
  size: "size-5",
@@ -869,14 +911,14 @@ const Xe = ({
869
911
  title: t || "Sort Up",
870
912
  ...o,
871
913
  children: [
872
- /* @__PURE__ */ l(
914
+ /* @__PURE__ */ c(
873
915
  "path",
874
916
  {
875
917
  opacity: a ? "1" : "0.4",
876
918
  d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32z"
877
919
  }
878
920
  ),
879
- /* @__PURE__ */ l("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z" })
921
+ /* @__PURE__ */ c("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z" })
880
922
  ]
881
923
  }
882
924
  );
@@ -893,174 +935,174 @@ try {
893
935
  });
894
936
  } catch {
895
937
  }
896
- const S = E.createContext({
938
+ const H = C.createContext({
897
939
  mode: "light",
898
940
  cellWrapper: "thead",
899
941
  stickyHeader: !1,
900
942
  stickyFooter: !1,
901
943
  compact: !1
902
- }), Bt = ({
944
+ }), Wt = ({
903
945
  children: e,
904
946
  mode: r = "system",
905
947
  caption: t,
906
948
  compact: a,
907
949
  summary: o,
908
- className: c,
909
- wrapperClassName: n,
950
+ className: n,
951
+ wrapperClassName: i,
910
952
  maxHeight: s,
911
953
  stickyHeader: d,
912
954
  stickyFooter: u,
913
955
  ...m
914
956
  }) => {
915
- const g = Be({
957
+ const h = je({
916
958
  mode: r,
917
- className: c,
918
- wrapperClassName: n,
959
+ className: n,
960
+ wrapperClassName: i,
919
961
  stickyHeader: d,
920
962
  stickyFooter: u
921
963
  });
922
- return /* @__PURE__ */ l(
923
- S.Provider,
964
+ return /* @__PURE__ */ c(
965
+ H.Provider,
924
966
  {
925
967
  value: { mode: r, stickyHeader: d, stickyFooter: u, compact: a },
926
- children: /* @__PURE__ */ l(
968
+ children: /* @__PURE__ */ c(
927
969
  "div",
928
970
  {
929
- className: g.wrapper,
971
+ className: h.wrapper,
930
972
  ...s && {
931
973
  style: { maxHeight: s }
932
974
  },
933
- children: /* @__PURE__ */ _("table", { className: g.table, summary: o, ...m, children: [
934
- t && /* @__PURE__ */ l("caption", { className: g.caption, children: t }),
975
+ children: /* @__PURE__ */ N("table", { className: h.table, summary: o, ...m, children: [
976
+ t && /* @__PURE__ */ c("caption", { className: h.caption, children: t }),
935
977
  e
936
978
  ] })
937
979
  }
938
980
  )
939
981
  }
940
982
  );
941
- }, zt = ({
983
+ }, jt = ({
942
984
  children: e,
943
985
  className: r,
944
986
  ...t
945
987
  }) => {
946
- const a = H(S);
947
- a.cellWrapper = F;
948
- const o = ze({
988
+ const a = B(H);
989
+ a.cellWrapper = G;
990
+ const o = qe({
949
991
  className: r,
950
992
  mode: a.mode,
951
993
  stickyHeader: a.stickyHeader
952
994
  });
953
- return /* @__PURE__ */ l("thead", { className: o, ...t, children: e });
954
- }, Lt = ({
995
+ return /* @__PURE__ */ c("thead", { className: o, ...t, children: e });
996
+ }, qt = ({
955
997
  children: e,
956
998
  className: r,
957
999
  ...t
958
1000
  }) => {
959
- const a = H(S);
960
- a.cellWrapper = X;
961
- const o = Le({
1001
+ const a = B(H);
1002
+ a.cellWrapper = K;
1003
+ const o = Je({
962
1004
  className: r,
963
1005
  mode: a.mode,
964
1006
  stickyFooter: a.stickyFooter
965
1007
  });
966
- return /* @__PURE__ */ l("tfoot", { className: o, ...t, children: e });
967
- }, Vt = ({ children: e, ...r }) => {
968
- const t = H(S);
969
- return t.cellWrapper = N, /* @__PURE__ */ l("tbody", { ...r, children: e });
970
- }, Ot = ({
1008
+ return /* @__PURE__ */ c("tfoot", { className: o, ...t, children: e });
1009
+ }, Jt = ({ children: e, ...r }) => {
1010
+ const t = B(H);
1011
+ return t.cellWrapper = I, /* @__PURE__ */ c("tbody", { ...r, children: e });
1012
+ }, Qt = ({
971
1013
  children: e,
972
1014
  className: r,
973
1015
  ...t
974
1016
  }) => {
975
- const a = H(S), o = Ve({
1017
+ const a = B(H), o = Qe({
976
1018
  mode: a.mode,
977
1019
  cellWrapper: a.cellWrapper,
978
1020
  className: r
979
1021
  });
980
- return /* @__PURE__ */ l("tr", { className: o, ...t, children: e });
981
- }, Ze = ({
1022
+ return /* @__PURE__ */ c("tr", { className: o, ...t, children: e });
1023
+ }, ut = ({
982
1024
  children: e,
983
1025
  component: r,
984
1026
  className: t,
985
1027
  ...a
986
1028
  }) => {
987
- const o = H(S), c = r || (o.cellWrapper === F ? "th" : "td"), n = Oe({
1029
+ const o = B(H), n = r || (o.cellWrapper === G ? "th" : "td"), i = Xe({
988
1030
  cellWrapper: o.cellWrapper,
989
1031
  className: t,
990
1032
  mode: o.mode,
991
1033
  compact: o.compact
992
1034
  });
993
- return /* @__PURE__ */ l(c, { className: n, ...a, children: e });
994
- }, Mt = ({
1035
+ return /* @__PURE__ */ c(n, { className: i, ...a, children: e });
1036
+ }, Xt = ({
995
1037
  align: e,
996
1038
  children: r,
997
1039
  buttonClassName: t,
998
1040
  className: a,
999
1041
  component: o,
1000
- focusMode: c = "alt-system",
1001
- mode: n = "alt-system",
1042
+ focusMode: n = "alt-system",
1043
+ mode: i = "alt-system",
1002
1044
  onClick: s,
1003
1045
  sortDirection: d,
1004
1046
  sortedCell: u,
1005
1047
  cellId: m,
1006
- ...g
1048
+ ...h
1007
1049
  }) => {
1008
- const h = Me({ buttonClassName: t });
1009
- return /* @__PURE__ */ l(
1010
- Ze,
1050
+ const g = Ye({ buttonClassName: t });
1051
+ return /* @__PURE__ */ c(
1052
+ ut,
1011
1053
  {
1012
1054
  component: o,
1013
1055
  className: a,
1014
1056
  role: "columnheader",
1015
- "aria-sort": d === M.ASC && u === m ? "ascending" : d === M.DESC && u === m ? "descending" : "other",
1016
- ...g,
1017
- children: /* @__PURE__ */ l(
1018
- ue,
1057
+ "aria-sort": d === F.ASC && u === m ? "ascending" : d === F.DESC && u === m ? "descending" : "other",
1058
+ ...h,
1059
+ children: /* @__PURE__ */ c(
1060
+ fe,
1019
1061
  {
1020
1062
  active: u === m,
1021
- className: h,
1063
+ className: g,
1022
1064
  onClick: s,
1023
1065
  align: e,
1024
1066
  noBorder: !0,
1025
- focusMode: c,
1026
- mode: n,
1067
+ focusMode: n,
1068
+ mode: i,
1027
1069
  fullWidth: !0,
1028
1070
  labelRight: r,
1029
- children: d === M.ASC && u === m ? /* @__PURE__ */ l(Ke, { className: "size-4", monotone: !0 }) : d === M.DESC && u === m ? /* @__PURE__ */ l(Ye, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ l(Xe, { className: "size-4", monotone: !0 })
1071
+ children: d === F.ASC && u === m ? /* @__PURE__ */ c(dt, { className: "size-4", monotone: !0 }) : d === F.DESC && u === m ? /* @__PURE__ */ c(ct, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ c(st, { className: "size-4", monotone: !0 })
1030
1072
  }
1031
1073
  )
1032
1074
  }
1033
1075
  );
1034
1076
  };
1035
1077
  /*!
1036
- @versini/ui-textarea v2.0.5
1078
+ @versini/ui-textarea v2.1.1
1037
1079
  © 2024 gizmette.com
1038
1080
  */
1039
1081
  try {
1040
1082
  window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
1041
- version: "2.0.5",
1042
- buildTime: "12/30/2024 07:48 PM EST",
1083
+ version: "2.1.1",
1084
+ buildTime: "12/31/2024 06:19 PM EST",
1043
1085
  homepage: "https://github.com/aversini/ui-components",
1044
1086
  license: "MIT"
1045
1087
  });
1046
1088
  } catch {
1047
1089
  }
1048
- const me = "av-text-area", et = "av-text-area-wrapper", Q = "av-text-area-helper-text", tt = "av-text-area__control--right";
1049
- function rt() {
1050
- const e = k(!1);
1090
+ const ke = "av-text-area", mt = "av-text-area-wrapper", Y = "av-text-area-helper-text", gt = "av-text-area__control--right", ht = "av-text-area__control--left";
1091
+ function pt() {
1092
+ const e = f(!1);
1051
1093
  return R(() => (e.current = !0, () => {
1052
1094
  e.current = !1;
1053
- }), []), U(() => e.current, []);
1095
+ }), []), P(() => e.current, []);
1054
1096
  }
1055
- function at(e) {
1056
- return ne(() => e.every((r) => r == null) ? () => {
1097
+ function bt(e) {
1098
+ return me(() => e.every((r) => r == null) ? () => {
1057
1099
  } : (r) => {
1058
1100
  e.forEach((t) => {
1059
1101
  typeof t == "function" ? t(r) : t != null && (t.current = r);
1060
1102
  });
1061
1103
  }, e);
1062
1104
  }
1063
- const ot = {
1105
+ const yt = {
1064
1106
  x: 0,
1065
1107
  y: 0,
1066
1108
  width: 0,
@@ -1070,18 +1112,18 @@ const ot = {
1070
1112
  bottom: 0,
1071
1113
  right: 0
1072
1114
  };
1073
- function it(e) {
1074
- const r = rt(), t = k(0), a = k(null), [o, c] = $(ot), n = ne(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
1115
+ function de(e) {
1116
+ const r = pt(), t = f(0), a = f(null), [o, n] = $(yt), i = me(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((s) => {
1075
1117
  const d = s[0];
1076
1118
  d && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
1077
- a.current && r() && c(d.contentRect);
1119
+ a.current && r() && n(d.contentRect);
1078
1120
  }));
1079
1121
  }), [r]);
1080
- return R(() => (a.current && (n == null || n.observe(a.current, e)), () => {
1081
- n == null || n.disconnect(), t.current && cancelAnimationFrame(t.current);
1082
- }), [n, e]), [a, o];
1122
+ return R(() => (a.current && (i == null || i.observe(a.current, e)), () => {
1123
+ i == null || i.disconnect(), t.current && cancelAnimationFrame(t.current);
1124
+ }), [i, e]), [a, o];
1083
1125
  }
1084
- function nt({
1126
+ function ft({
1085
1127
  value: e,
1086
1128
  defaultValue: r,
1087
1129
  finalValue: t,
@@ -1089,19 +1131,19 @@ function nt({
1089
1131
  },
1090
1132
  initialControlledDelay: o = 0
1091
1133
  }) {
1092
- const [c, n] = $(!1), [s, d] = $(
1134
+ const [n, i] = $(!1), [s, d] = $(
1093
1135
  r !== void 0 ? r : t
1094
1136
  ), u = (m) => {
1095
1137
  d(m), a == null || a(m);
1096
1138
  };
1097
1139
  return R(() => {
1098
- (async () => e !== void 0 && !c && o > 0 && (await new Promise(
1140
+ (async () => e !== void 0 && !n && o > 0 && (await new Promise(
1099
1141
  (m) => setTimeout(m, o)
1100
- ), n(!0)))();
1101
- }, [e, o, c]), e !== void 0 ? !c && o > 0 ? ["", a, !0] : [e, a, !0] : [s, u, !1];
1142
+ ), i(!0)))();
1143
+ }, [e, o, n]), e !== void 0 ? !n && o > 0 ? ["", a, !0] : [e, a, !0] : [s, u, !1];
1102
1144
  }
1103
- function ct(e) {
1104
- const r = Ae();
1145
+ function kt(e) {
1146
+ const r = ze();
1105
1147
  if (!e)
1106
1148
  return r;
1107
1149
  if (typeof e == "number" || typeof e == "string")
@@ -1111,7 +1153,7 @@ function ct(e) {
1111
1153
  return typeof t == "number" || typeof t == "string" ? `${a}${t}` : `${a}${r}`;
1112
1154
  }
1113
1155
  }
1114
- const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", st = {
1156
+ const ve = "SET_ANNOUNCEMENT", xe = "CLEAR_ANNOUNCEMENT", vt = {
1115
1157
  alert: null,
1116
1158
  alertdialog: null,
1117
1159
  log: "polite",
@@ -1119,14 +1161,14 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", st = {
1119
1161
  progressbar: null,
1120
1162
  status: "polite",
1121
1163
  timer: "assertive"
1122
- }, lt = (e, r) => {
1164
+ }, xt = (e, r) => {
1123
1165
  switch (r == null ? void 0 : r.type) {
1124
- case he:
1166
+ case ve:
1125
1167
  return {
1126
1168
  ...e,
1127
1169
  announcement: r.payload
1128
1170
  };
1129
- case ge:
1171
+ case xe:
1130
1172
  return {
1131
1173
  ...e,
1132
1174
  announcement: null
@@ -1134,14 +1176,14 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", st = {
1134
1176
  default:
1135
1177
  return e;
1136
1178
  }
1137
- }, dt = ({
1179
+ }, _t = ({
1138
1180
  onAnnouncementClear: e,
1139
1181
  dispatch: r
1140
1182
  }) => {
1141
1183
  r({
1142
- type: ge
1184
+ type: xe
1143
1185
  }), typeof e == "function" && e();
1144
- }, ie = ({
1186
+ }, ue = ({
1145
1187
  children: e,
1146
1188
  clearAnnouncementDelay: r,
1147
1189
  clearAnnouncementTimeoutRef: t,
@@ -1149,80 +1191,80 @@ const he = "SET_ANNOUNCEMENT", ge = "CLEAR_ANNOUNCEMENT", st = {
1149
1191
  dispatch: o
1150
1192
  }) => {
1151
1193
  clearTimeout(t.current), e !== null && o({
1152
- type: he,
1194
+ type: ve,
1153
1195
  payload: e
1154
1196
  }), r && (t.current = setTimeout(
1155
- () => dt({
1197
+ () => _t({
1156
1198
  onAnnouncementClear: a,
1157
1199
  dispatch: o
1158
1200
  }),
1159
1201
  r
1160
1202
  ));
1161
- }, ut = ({
1203
+ }, wt = ({
1162
1204
  children: e,
1163
1205
  announcementTimeoutRef: r,
1164
1206
  announcementDelay: t,
1165
1207
  clearAnnouncementDelay: a,
1166
1208
  clearAnnouncementTimeoutRef: o,
1167
- onAnnouncementClear: c,
1168
- dispatch: n
1209
+ onAnnouncementClear: n,
1210
+ dispatch: i
1169
1211
  }) => {
1170
- clearTimeout(r.current), t ? r.current = setTimeout(ie, t, {
1212
+ clearTimeout(r.current), t ? r.current = setTimeout(ue, t, {
1171
1213
  children: e,
1172
1214
  clearAnnouncementDelay: a,
1173
1215
  clearAnnouncementTimeoutRef: o,
1174
- onAnnouncementClear: c,
1175
- dispatch: n
1176
- }) : ie({
1216
+ onAnnouncementClear: n,
1217
+ dispatch: i
1218
+ }) : ue({
1177
1219
  children: e,
1178
1220
  clearAnnouncementDelay: a,
1179
1221
  clearAnnouncementTimeoutRef: o,
1180
- onAnnouncementClear: c,
1181
- dispatch: n
1222
+ onAnnouncementClear: n,
1223
+ dispatch: i
1182
1224
  });
1183
1225
  };
1184
- function mt({
1226
+ function Et({
1185
1227
  children: e,
1186
1228
  className: r,
1187
1229
  politeness: t,
1188
1230
  role: a = null,
1189
1231
  announcementDelay: o,
1190
- clearAnnouncementDelay: c,
1191
- onAnnouncementClear: n,
1232
+ clearAnnouncementDelay: n,
1233
+ onAnnouncementClear: i,
1192
1234
  visible: s,
1193
1235
  ...d
1194
1236
  }) {
1195
- const u = k(null), m = k(null), [g, h] = Ie(lt, {
1237
+ const u = f(null), m = f(null), [h, g] = Le(xt, {
1196
1238
  announcement: null
1197
1239
  });
1198
1240
  let b = t;
1199
- typeof b > "u" && (b = a ? st[a] : "assertive"), R(() => {
1200
- ut({
1241
+ typeof b > "u" && (b = a ? vt[a] : "assertive"), R(() => {
1242
+ wt({
1201
1243
  announcementTimeoutRef: u,
1202
1244
  announcementDelay: o,
1203
1245
  children: e,
1204
- clearAnnouncementDelay: c,
1246
+ clearAnnouncementDelay: n,
1205
1247
  clearAnnouncementTimeoutRef: m,
1206
- onAnnouncementClear: n,
1207
- dispatch: h
1248
+ onAnnouncementClear: i,
1249
+ dispatch: g
1208
1250
  });
1209
1251
  }, [
1210
1252
  e,
1211
1253
  o,
1212
- c,
1213
- n
1254
+ n,
1255
+ i
1214
1256
  ]);
1215
- const p = i(r, {
1257
+ const p = l(r, {
1216
1258
  "sr-only": !s
1217
1259
  });
1218
- return /* @__PURE__ */ l(
1260
+ return /* @__PURE__ */ c(
1219
1261
  "div",
1220
1262
  {
1221
1263
  "aria-live": b,
1222
1264
  ...a && { role: a },
1223
1265
  className: p,
1224
1266
  ...d,
1225
- children: g.announcement
1267
+ children: h.announcement
1226
1268
  }
1227
1269
  );
1228
1270
  }
@@ -1233,59 +1275,72 @@ function mt({
1233
1275
  try {
1234
1276
  window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
1235
1277
  version: "1.2.7",
1236
- buildTime: "12/30/2024 07:48 PM EST",
1278
+ buildTime: "12/31/2024 06:19 PM EST",
1237
1279
  homepage: "https://github.com/aversini/ui-components",
1238
1280
  license: "MIT"
1239
1281
  });
1240
1282
  } catch {
1241
1283
  }
1242
- const ht = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", gt = ({
1243
- mode: e
1244
- }) => i({
1284
+ const Nt = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", St = ({ mode: e }) => l({
1245
1285
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
1246
1286
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
1247
1287
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
1248
1288
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
1249
- }), bt = ({
1289
+ }), Tt = ({
1250
1290
  focusMode: e
1251
- }) => i("focus:outline focus:outline-2 focus:outline-offset-2", {
1291
+ }) => l("focus:outline focus:outline-2 focus:outline-offset-2", {
1252
1292
  "focus:outline-focus-dark": e === "dark",
1253
1293
  "focus:outline-focus-light": e === "light",
1254
1294
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1255
1295
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1256
- }), pt = ({
1296
+ }), Ct = ({
1257
1297
  noBorder: e,
1258
1298
  error: r
1259
- }) => i("border-2", {
1299
+ }) => l("border-2", {
1260
1300
  "border-border-dark": !e && !r,
1261
1301
  "focus:border-border-dark": !e && r,
1262
1302
  "border-border-error-dark": !e && r,
1263
1303
  "border-transparent": e
1264
- }), yt = ({
1304
+ }), At = ({
1265
1305
  disabled: e,
1266
1306
  raw: r,
1267
1307
  error: t,
1268
- mode: a
1308
+ mode: a,
1309
+ leftElement: o,
1310
+ rightElement: n
1269
1311
  }) => {
1270
1312
  if (r)
1271
1313
  return "";
1272
1314
  if (e)
1273
- return i("absolute px-2 cursor-not-allowed opacity-50 font-medium");
1315
+ return l(
1316
+ "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
1317
+ {
1318
+ "translate-x-[12px]": n === !0 && !o || !n && !o
1319
+ }
1320
+ );
1274
1321
  if (!t)
1275
- return i("absolute px-2 cursor-text font-medium", {
1276
- "text-copy-medium": a === "dark",
1277
- "text-copy-dark": a === "light",
1278
- "text-copy-dark dark:text-copy-medium": a === "system",
1279
- "text-copy-medium dark:text-copy-dark": a === "alt-system"
1280
- });
1322
+ return l(
1323
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1324
+ {
1325
+ "translate-x-[12px]": n === !0 && !o || !n && !o,
1326
+ "text-copy-medium": a === "dark",
1327
+ "text-copy-dark": a === "light",
1328
+ "text-copy-dark dark:text-copy-medium": a === "system",
1329
+ "text-copy-medium dark:text-copy-dark": a === "alt-system"
1330
+ }
1331
+ );
1281
1332
  if (t)
1282
- return i("absolute px-2 cursor-text font-medium", {
1283
- "text-copy-medium": a === "dark",
1284
- "text-copy-error-dark": a === "light",
1285
- "text-copy-error-dark dark:text-copy-error-light": a === "system",
1286
- "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
1287
- });
1288
- }, ft = ({
1333
+ return l(
1334
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1335
+ {
1336
+ "translate-x-[12px]": n === !0 && !o || !n && !o,
1337
+ "text-copy-medium": a === "dark",
1338
+ "text-copy-error-dark": a === "light",
1339
+ "text-copy-error-dark dark:text-copy-error-light": a === "system",
1340
+ "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
1341
+ }
1342
+ );
1343
+ }, It = ({
1289
1344
  error: e,
1290
1345
  raw: r,
1291
1346
  mode: t,
@@ -1294,246 +1349,276 @@ const ht = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
1294
1349
  if (r)
1295
1350
  return "";
1296
1351
  if (a)
1297
- return i(
1298
- Q,
1352
+ return l(
1353
+ Y,
1299
1354
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
1300
1355
  );
1301
1356
  if (!e)
1302
- return i(Q, "absolute px-2 font-medium", {
1357
+ return l(Y, "absolute px-2 font-medium", {
1303
1358
  "text-copy-medium": t === "dark",
1304
1359
  "text-copy-dark": t === "light",
1305
1360
  "text-copy-dark dark:text-copy-medium": t === "system",
1306
1361
  "text-copy-medium dark:text-copy-dark": t === "alt-system"
1307
1362
  });
1308
1363
  if (e)
1309
- return i(Q, "absolute px-2 font-medium", {
1364
+ return l(Y, "absolute px-2 font-medium", {
1310
1365
  "text-copy-error-light": t === "dark",
1311
1366
  "text-copy-error-dark": t === "light",
1312
1367
  "text-copy-error-dark dark:text-copy-error-light": t === "system",
1313
1368
  "dark:text-copy-error-dark text-copy-error-light": t === "alt-system"
1314
1369
  });
1315
- }, kt = ({
1370
+ }, $t = ({
1316
1371
  className: e,
1317
1372
  textAreaClassName: r,
1318
1373
  raw: t,
1319
1374
  focusMode: a,
1320
1375
  disabled: o,
1321
- noBorder: c,
1322
- error: n,
1323
- mode: s
1376
+ noBorder: n,
1377
+ error: i,
1378
+ mode: s,
1379
+ leftElement: d,
1380
+ rightElement: u
1324
1381
  }) => {
1325
- const d = t ? e : i(
1382
+ const m = t ? e : l(
1326
1383
  "relative flex w-full flex-col justify-center",
1327
- et,
1384
+ mt,
1328
1385
  e
1329
- ), u = t ? i(r) : i(
1330
- me,
1386
+ ), h = t ? l(r) : l(
1387
+ ke,
1331
1388
  r,
1332
- ht(),
1333
- gt({ mode: s }),
1334
- bt({ focusMode: a }),
1335
- pt({
1336
- noBorder: c,
1337
- error: n
1389
+ Nt(),
1390
+ St({ mode: s }),
1391
+ Tt({ focusMode: a }),
1392
+ Ct({
1393
+ noBorder: n,
1394
+ error: i
1338
1395
  }),
1339
1396
  {
1340
1397
  "disabled:cursor-not-allowed disabled:opacity-50": o
1341
1398
  }
1342
- ), m = t ? void 0 : "sr-only", g = yt({
1399
+ ), g = t ? void 0 : "sr-only", b = At({
1343
1400
  disabled: o,
1344
1401
  raw: t,
1345
- error: n,
1346
- mode: s
1347
- }), h = ft({
1348
- error: n,
1402
+ error: i,
1403
+ mode: s,
1404
+ rightElement: u,
1405
+ leftElement: d
1406
+ }), p = It({
1407
+ error: i,
1349
1408
  raw: t,
1350
1409
  mode: s,
1351
1410
  disabled: o
1352
- }), b = t ? void 0 : i(tt, "absolute");
1411
+ }), v = t ? void 0 : l(gt, "absolute"), k = t ? void 0 : l(ht, "absolute");
1353
1412
  return {
1354
- wrapper: d,
1355
- textArea: u,
1356
- accessibleLabel: m,
1357
- visibleLabel: g,
1358
- helperText: h,
1359
- rightElement: b
1413
+ wrapper: m,
1414
+ textArea: h,
1415
+ accessibleLabel: g,
1416
+ visibleLabel: b,
1417
+ helperText: p,
1418
+ rightElement: v,
1419
+ leftElement: k
1360
1420
  };
1361
- }, vt = ({
1421
+ }, Rt = ({
1362
1422
  scrollHeight: e,
1363
1423
  currentHeight: r,
1364
1424
  currentLabelOffset: t = 0,
1365
1425
  currentHelperTextOffset: a = 0
1366
1426
  }) => {
1367
- let o, c;
1427
+ let o, n;
1368
1428
  if (e > 0 && e !== r) {
1369
- const n = e - r, s = Math.abs(n / 24);
1370
- o = t + -1 * Math.sign(n) * (12 * s), c = a + Math.sign(n) * (12 * s);
1429
+ const i = e - r, s = Math.abs(i / 24);
1430
+ o = t + -1 * Math.sign(i) * (12 * s), n = a + Math.sign(i) * (12 * s);
1371
1431
  }
1372
1432
  return {
1373
1433
  labelOffset: o,
1374
- helperTextOffset: c,
1434
+ helperTextOffset: n,
1375
1435
  scrollHeight: e
1376
1436
  };
1377
- }, xt = E.forwardRef(
1437
+ }, Bt = C.forwardRef(
1378
1438
  ({
1379
1439
  id: e,
1380
1440
  name: r,
1381
1441
  label: t,
1382
1442
  error: a = !1,
1383
1443
  raw: o = !1,
1384
- className: c,
1385
- textAreaClassName: n,
1444
+ className: n,
1445
+ textAreaClassName: i,
1386
1446
  mode: s = "system",
1387
1447
  focusMode: d = "system",
1388
1448
  value: u,
1389
1449
  defaultValue: m,
1390
- disabled: g = !1,
1391
- noBorder: h = !1,
1450
+ disabled: h = !1,
1451
+ noBorder: g = !1,
1392
1452
  labelId: b,
1393
1453
  helperText: p = "",
1394
- helperTextOnFocus: w = !1,
1395
- rightElement: C,
1396
- onChange: B,
1397
- onFocus: z,
1398
- onBlur: L,
1399
- ...G
1400
- }, P) => {
1401
- const f = k(null), be = at([P, f]), [pe, V] = it(), D = k(80), K = k(-25), A = k(null), Z = k(30), W = k(null), I = ct({ id: e, prefix: `${me}-` }), [ye, fe] = $(0), [ke, ee] = $(
1402
- !!(!w && p)
1403
- ), ve = `${r} error, ${p}`, T = kt({
1404
- className: c,
1405
- textAreaClassName: n,
1454
+ helperTextOnFocus: v = !1,
1455
+ rightElement: k,
1456
+ leftElement: _,
1457
+ onChange: V,
1458
+ onFocus: O,
1459
+ onBlur: M,
1460
+ ...D
1461
+ }, W) => {
1462
+ var ee;
1463
+ const x = f(null), _e = bt([W, x]), [we, U] = de(), [Ee, A] = de(), j = f(80), te = f(-25), S = f(null), re = f(30), q = f(null), z = kt({ id: e, prefix: `${ke}-` }), [ae, Ne] = $(0), [oe, Se] = $(0), [Te, ne] = $(
1464
+ !!(!v && p)
1465
+ ), Ce = `${r} error, ${p}`, T = $t({
1466
+ className: n,
1467
+ textAreaClassName: i,
1406
1468
  error: a,
1407
1469
  raw: o,
1408
1470
  focusMode: d,
1409
- disabled: g,
1410
- noBorder: h,
1411
- mode: s
1412
- }), [v, xe] = nt({
1471
+ disabled: h,
1472
+ noBorder: g,
1473
+ mode: s,
1474
+ rightElement: !!k,
1475
+ leftElement: !!_
1476
+ }), [w, Ae] = ft({
1413
1477
  value: u,
1414
1478
  initialControlledDelay: 20,
1415
1479
  defaultValue: m,
1416
1480
  onChange: (y) => {
1417
- B && B({
1481
+ V && V({
1418
1482
  target: {
1419
1483
  value: y
1420
1484
  }
1421
1485
  });
1422
1486
  }
1423
- }), _e = (y) => {
1424
- xe(y.target.value);
1425
- }, we = (y) => {
1426
- w && p && ee(!0), z && z(y);
1427
- }, Ee = (y) => {
1428
- w && p && !v && ee(!1), L && L(y);
1487
+ }), Ie = (y) => {
1488
+ Ae(y.target.value);
1489
+ }, $e = (y) => {
1490
+ v && p && ne(!0), O && O(y);
1491
+ }, Re = (y) => {
1492
+ v && p && !w && ne(!1), M && M(y);
1429
1493
  };
1430
- return O(() => {
1431
- V && V.width && fe(V.width + 18 + 10);
1432
- }, [V]), O(() => {
1433
- o || f && f.current && v !== void 0 && (f.current.style.height = "inherit", f.current.style.height = f.current.scrollHeight + "px");
1434
- }, [v, o]), O(() => {
1494
+ return L(() => {
1495
+ U && U.width && Ne(U.width + 18 + 10);
1496
+ }, [U]), L(() => {
1497
+ A && A.width && Se(A.width + 18 + 10);
1498
+ }, [A]), L(() => {
1499
+ o || x && x.current && w !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
1500
+ }, [w, o]), L(() => {
1435
1501
  o || setTimeout(() => {
1436
1502
  var y;
1437
- (y = A == null ? void 0 : A.current) == null || y.style.setProperty(
1503
+ (y = S == null ? void 0 : S.current) == null || y.style.setProperty(
1438
1504
  "--av-text-area-wrapper-transition",
1439
- v ? "none" : "all 0.2s ease-out"
1505
+ w ? "none" : "all 0.2s ease-out"
1440
1506
  );
1441
1507
  }, 0);
1442
- }, [v, o]), O(() => {
1443
- var y, te;
1444
- if (!o && f && f.current && v !== void 0) {
1445
- const { labelOffset: j, helperTextOffset: q, scrollHeight: Te } = vt({
1446
- scrollHeight: f.current.scrollHeight,
1447
- currentHeight: D.current,
1448
- currentLabelOffset: K.current,
1449
- currentHelperTextOffset: Z.current
1508
+ }, [w, o]), L(() => {
1509
+ var y, ie;
1510
+ if (!o && x && x.current && w !== void 0) {
1511
+ const { labelOffset: J, helperTextOffset: Q, scrollHeight: Be } = Rt({
1512
+ scrollHeight: x.current.scrollHeight,
1513
+ currentHeight: j.current,
1514
+ currentLabelOffset: te.current,
1515
+ currentHelperTextOffset: re.current
1450
1516
  });
1451
- j && (K.current = j, (y = A == null ? void 0 : A.current) == null || y.style.setProperty(
1517
+ J && (te.current = J, (y = S == null ? void 0 : S.current) == null || y.style.setProperty(
1452
1518
  "--av-text-area-label",
1453
- `${j}px`
1454
- )), q && (Z.current = q, (te = W == null ? void 0 : W.current) == null || te.style.setProperty(
1519
+ `${J}px`
1520
+ )), Q && (re.current = Q, (ie = q == null ? void 0 : q.current) == null || ie.style.setProperty(
1455
1521
  "--av-text-area-helper-text",
1456
- `${q}px`
1457
- )), D.current = Te || D.current;
1522
+ `${Q}px`
1523
+ )), j.current = Be || j.current;
1458
1524
  }
1459
- }, [v, o]), /* @__PURE__ */ _("div", { className: T.wrapper, children: [
1460
- /* @__PURE__ */ l(
1525
+ }, [w, o]), A.width > 0 && ((ee = S == null ? void 0 : S.current) == null || ee.style.setProperty(
1526
+ "--tw-translate-x",
1527
+ `${12 + A.width + 5}px`
1528
+ )), /* @__PURE__ */ N("div", { className: T.wrapper, children: [
1529
+ /* @__PURE__ */ c(
1461
1530
  "label",
1462
1531
  {
1463
- htmlFor: I,
1532
+ htmlFor: z,
1464
1533
  id: b,
1465
1534
  className: T.accessibleLabel,
1466
1535
  children: t
1467
1536
  }
1468
1537
  ),
1469
- /* @__PURE__ */ l(
1538
+ _ && /* @__PURE__ */ c(
1539
+ "div",
1540
+ {
1541
+ ref: Ee,
1542
+ className: T.leftElement,
1543
+ children: _
1544
+ }
1545
+ ),
1546
+ /* @__PURE__ */ c(
1470
1547
  "textarea",
1471
1548
  {
1472
- ref: be,
1473
- id: I,
1549
+ ref: _e,
1550
+ id: z,
1474
1551
  name: r,
1475
- disabled: g,
1552
+ disabled: h,
1476
1553
  placeholder: o ? void 0 : " ",
1477
1554
  className: T.textArea,
1478
1555
  rows: 1,
1479
- ...p && { "aria-describedby": `${I}-helper` },
1556
+ ...p && { "aria-describedby": `${z}-helper` },
1480
1557
  ...a && { "aria-invalid": "true" },
1481
- ...C && !o && { style: { paddingRight: ye } },
1482
- value: v,
1483
- onChange: _e,
1484
- onFocus: we,
1485
- onBlur: Ee,
1486
- ...G
1558
+ ...k && !_ && !o && { style: { paddingRight: ae } },
1559
+ ..._ && !k && !o && { style: { paddingLeft: oe } },
1560
+ ...k && _ && !o && {
1561
+ style: {
1562
+ paddingRight: ae,
1563
+ paddingLeft: oe
1564
+ }
1565
+ },
1566
+ value: w,
1567
+ onChange: Ie,
1568
+ onFocus: $e,
1569
+ onBlur: Re,
1570
+ ...D
1487
1571
  }
1488
1572
  ),
1489
- !o && /* @__PURE__ */ l(
1573
+ !o && /* @__PURE__ */ c(
1490
1574
  "label",
1491
1575
  {
1492
- ref: A,
1576
+ ref: S,
1493
1577
  "aria-hidden": !0,
1494
- htmlFor: I,
1495
- className: T.visibleLabel,
1578
+ htmlFor: z,
1579
+ className: `${T.visibleLabel}`,
1496
1580
  children: t
1497
1581
  }
1498
1582
  ),
1499
- ke && /* @__PURE__ */ l(
1583
+ Te && /* @__PURE__ */ c(
1500
1584
  "div",
1501
1585
  {
1502
- ref: W,
1503
- id: `${I}-helper`,
1586
+ ref: q,
1587
+ id: `${z}-helper`,
1504
1588
  className: T.helperText,
1505
1589
  children: p
1506
1590
  }
1507
1591
  ),
1508
- C && /* @__PURE__ */ l(
1592
+ k && /* @__PURE__ */ c(
1509
1593
  "div",
1510
1594
  {
1511
- ref: pe,
1595
+ ref: we,
1512
1596
  className: T.rightElement,
1513
- children: C
1597
+ children: k
1514
1598
  }
1515
1599
  ),
1516
- a && p && /* @__PURE__ */ l(mt, { politeness: "polite", clearAnnouncementDelay: 500, children: ve })
1600
+ a && p && /* @__PURE__ */ c(Et, { politeness: "polite", clearAnnouncementDelay: 500, children: Ce })
1517
1601
  ] });
1518
1602
  }
1519
1603
  );
1520
- xt.displayName = "TextArea";
1604
+ Bt.displayName = "TextArea";
1521
1605
  export {
1522
- $t as AppContext,
1523
- St as E,
1524
- Rt as HistoryContext,
1525
- xt as Le,
1526
- Ct as SERVICE_TYPES,
1527
- Ht as TagsContext,
1528
- Mt as be,
1529
- Bt as ce,
1530
- M as f,
1531
- Vt as ge,
1532
- Nt as h,
1533
- Ot as he,
1534
- Lt as ne,
1535
- Ze as oe,
1536
- It as restCall,
1537
- zt as se,
1538
- At as serviceCall
1606
+ We as AppContext,
1607
+ Ot as E,
1608
+ Bt as Fe,
1609
+ Pt as HistoryContext,
1610
+ Dt as NewChatButton,
1611
+ Mt as SERVICE_TYPES,
1612
+ Gt as TagsContext,
1613
+ Xt as be,
1614
+ Wt as ce,
1615
+ F as f,
1616
+ Jt as ge,
1617
+ Qt as he,
1618
+ Fe as m,
1619
+ qt as ne,
1620
+ ut as oe,
1621
+ Ft as restCall,
1622
+ jt as se,
1623
+ Ut as serviceCall
1539
1624
  };