@mateosuarezdev/react-ui 1.0.31 → 1.0.33

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.js CHANGED
@@ -20,7 +20,7 @@ import { appendErrors as Wr, FormProvider as Yn, useForm as Rn, useFormContext a
20
20
  import { validateFieldsNatively as nr, toNestErrors as or } from "@hookform/resolvers";
21
21
  import { createGesture as Ar } from "@mateosuarezdev/gestures";
22
22
  import { useInitialChangeEvent as In, navigate as tt } from "@mateosuarezdev/react-router";
23
- const N = (...e) => Cn(Mn(e));
23
+ const k = (...e) => Cn(Mn(e));
24
24
  function Ge(e, t = 100) {
25
25
  let r = null, n = null;
26
26
  return function(...o) {
@@ -184,12 +184,12 @@ const ct = (e) => {
184
184
  {
185
185
  alt: "avatar",
186
186
  src: e,
187
- className: N("rounded-full bg-base-3", St[r])
187
+ className: k("rounded-full bg-base-3", St[r])
188
188
  }
189
189
  ) : t ? /* @__PURE__ */ d(
190
190
  "p",
191
191
  {
192
- className: N(
192
+ className: k(
193
193
  "rounded-full font-medium dark-theme:bg-base-3 border border-base-6 dark-theme:border-base-4 flex items-center justify-center",
194
194
  St[r],
195
195
  n
@@ -199,7 +199,7 @@ const ct = (e) => {
199
199
  ) : /* @__PURE__ */ d(
200
200
  "div",
201
201
  {
202
- className: N(
202
+ className: k(
203
203
  "rounded-full text-2xl font-medium flex items-center justify-center",
204
204
  "bg-base-2 dark-theme:bg-base-3 border border-base-4",
205
205
  "lg:hover:bg-base-3 max-lg:active:bg-base-4 transition-colors",
@@ -232,7 +232,7 @@ function Ti({
232
232
  return /* @__PURE__ */ d(
233
233
  "div",
234
234
  {
235
- className: N("flex -space-x-3 rtl:space-x-reverse", e),
235
+ className: k("flex -space-x-3 rtl:space-x-reverse", e),
236
236
  ...n,
237
237
  children: t
238
238
  }
@@ -307,7 +307,7 @@ const qn = (e = !0, t) => {
307
307
  const [l, u] = H(!1), [f, m] = H({
308
308
  width: 192,
309
309
  height: 300
310
- }), b = $(null), h = $(null), v = $({
310
+ }), b = $(null), h = $(null), g = $({
311
311
  left: 0,
312
312
  right: 0,
313
313
  top: 0,
@@ -316,13 +316,13 @@ const qn = (e = !0, t) => {
316
316
  y: 0,
317
317
  width: 0,
318
318
  height: 0
319
- }), k = $(null), T = Sr(), S = F(
319
+ }), x = $(null), T = Sr(), S = F(
320
320
  (w) => {
321
- const x = w ?? v.current;
322
- if (!x) return { x: 0, top: 0, bottom: void 0 };
321
+ const N = w ?? g.current;
322
+ if (!N) return { x: 0, top: 0, bottom: void 0 };
323
323
  const W = f.width, R = f.height;
324
324
  return Kn({
325
- triggerRect: x,
325
+ triggerRect: N,
326
326
  popoverWidth: W,
327
327
  popoverHeight: R,
328
328
  align: t,
@@ -332,18 +332,18 @@ const qn = (e = !0, t) => {
332
332
  avoidCollisions: a
333
333
  });
334
334
  },
335
- [v.current, f, t, r]
335
+ [g.current, f, t, r]
336
336
  );
337
337
  B(() => {
338
- if (!l || !e || (k.current = document.getElementById(e), !k.current)) return;
338
+ if (!l || !e || (x.current = document.getElementById(e), !x.current)) return;
339
339
  l && _();
340
340
  const w = () => {
341
- k.current && (u(!1), i?.(), k.current.removeEventListener("scroll", w));
341
+ x.current && (u(!1), i?.(), x.current.removeEventListener("scroll", w));
342
342
  };
343
- return s && k.current.addEventListener("scroll", w, {
343
+ return s && x.current.addEventListener("scroll", w, {
344
344
  passive: !0
345
345
  }), () => {
346
- k.current && k.current.removeEventListener("scroll", w);
346
+ x.current && x.current.removeEventListener("scroll", w);
347
347
  };
348
348
  }, [l, e]);
349
349
  const _ = () => {
@@ -354,7 +354,7 @@ const qn = (e = !0, t) => {
354
354
  }, P = F(() => {
355
355
  if (!b.current) return;
356
356
  const w = b.current.getBoundingClientRect();
357
- v.current = {
357
+ g.current = {
358
358
  left: w.left,
359
359
  right: w.right,
360
360
  top: w.top,
@@ -363,7 +363,7 @@ const qn = (e = !0, t) => {
363
363
  y: w.y,
364
364
  width: w.width,
365
365
  height: w.height
366
- }, u((x) => (x ? c?.() : i?.(), !x));
366
+ }, u((N) => (N ? c?.() : i?.(), !N));
367
367
  }, []), O = F(() => {
368
368
  u(!1), c?.();
369
369
  }, []);
@@ -401,25 +401,25 @@ const qn = (e = !0, t) => {
401
401
  let l = 0, u = 0;
402
402
  if (i) {
403
403
  if (o === "right") {
404
- const b = e.right + a, h = e.left - t - a, v = Math.max(
404
+ const b = e.right + a, h = e.left - t - a, g = Math.max(
405
405
  0,
406
406
  b + t - (c.width - s)
407
- ), k = Math.max(0, s - h);
408
- v <= k ? (l = b, v > 0 && (l = c.width - t - s)) : (l = h, k > 0 && (l = s)), u = e.top, u + r > c.height - s && (u = c.height - r - s), u < s && (u = s);
407
+ ), x = Math.max(0, s - h);
408
+ g <= x ? (l = b, g > 0 && (l = c.width - t - s)) : (l = h, x > 0 && (l = s)), u = e.top, u + r > c.height - s && (u = c.height - r - s), u < s && (u = s);
409
409
  } else if (o === "left") {
410
- const b = e.left - t - a, h = e.right + a, v = Math.max(0, s - b), k = Math.max(
410
+ const b = e.left - t - a, h = e.right + a, g = Math.max(0, s - b), x = Math.max(
411
411
  0,
412
412
  h + t - (c.width - s)
413
413
  );
414
- v <= k ? (l = b, v > 0 && (l = s)) : (l = h, k > 0 && (l = c.width - t - s)), u = e.top, u + r > c.height - s && (u = c.height - r - s), u < s && (u = s);
414
+ g <= x ? (l = b, g > 0 && (l = s)) : (l = h, x > 0 && (l = c.width - t - s)), u = e.top, u + r > c.height - s && (u = c.height - r - s), u < s && (u = s);
415
415
  } else if (o === "bottom") {
416
416
  const b = c.height - e.bottom, h = e.top;
417
417
  b >= r + a ? u = e.bottom + a : h >= r + a ? u = e.top - r - a : (u = e.bottom + a, u = Math.min(u, c.height - r - s));
418
- const v = c.width - e.left, k = e.right;
418
+ const g = c.width - e.left, x = e.right;
419
419
  if (n === "start")
420
- l = e.left, l + t > c.width - s && (k >= t ? l = e.right - t : l = c.width - t - s);
420
+ l = e.left, l + t > c.width - s && (x >= t ? l = e.right - t : l = c.width - t - s);
421
421
  else if (n === "end")
422
- l = e.right - t, l < s && (v >= t ? l = e.left : l = s);
422
+ l = e.right - t, l < s && (g >= t ? l = e.left : l = s);
423
423
  else {
424
424
  const T = e.left + e.width / 2 - t / 2;
425
425
  T >= s && T + t <= c.width - s ? l = T : T < s ? l = s : l = c.width - t - s;
@@ -427,11 +427,11 @@ const qn = (e = !0, t) => {
427
427
  } else {
428
428
  const b = e.top, h = c.height - e.bottom;
429
429
  b >= r + a ? u = e.top - r - a : h >= r + a ? u = e.bottom + a : (u = e.top - r - a, u = Math.max(s, u));
430
- const v = c.width - e.left, k = e.right;
430
+ const g = c.width - e.left, x = e.right;
431
431
  if (n === "start")
432
- l = e.left, l + t > c.width - s && (k >= t ? l = e.right - t : l = c.width - t - s);
432
+ l = e.left, l + t > c.width - s && (x >= t ? l = e.right - t : l = c.width - t - s);
433
433
  else if (n === "end")
434
- l = e.right - t, l < s && (v >= t ? l = e.left : l = s);
434
+ l = e.right - t, l < s && (g >= t ? l = e.left : l = s);
435
435
  else {
436
436
  const T = e.left + e.width / 2 - t / 2;
437
437
  T >= s && T + t <= c.width - s ? l = T : T < s ? l = s : l = c.width - t - s;
@@ -582,8 +582,8 @@ const Un = "relative shrink-0 select-none transition outline-none duration-200 e
582
582
  type: m = "button",
583
583
  ...b
584
584
  }, h) => {
585
- const [v, k] = H(!1), T = (O) => {
586
- o === "enabled" && (f ? (k(!0), a && a(O), setTimeout(() => k(!1), 1e3)) : a && a(O));
585
+ const [g, x] = H(!1), T = (O) => {
586
+ o === "enabled" && (f ? (x(!0), a && a(O), setTimeout(() => x(!1), 1e3)) : a && a(O));
587
587
  }, { ref: S, ripple: _ } = qn(
588
588
  c,
589
589
  e === "contrast" || l
@@ -595,8 +595,8 @@ const Un = "relative shrink-0 select-none transition outline-none duration-200 e
595
595
  type: m,
596
596
  disabled: b.disabled ? b.disabled : o === "disabled" || o === "loading",
597
597
  onMouseDown: _,
598
- onClick: (O) => v ? null : T(O),
599
- className: N(
598
+ onClick: (O) => g ? null : T(O),
599
+ className: k(
600
600
  Un,
601
601
  Gn[t],
602
602
  Jn[r],
@@ -2716,11 +2716,11 @@ function fs(e) {
2716
2716
  r
2717
2717
  ]), me(() => {
2718
2718
  var m;
2719
- let b = (m = a.current) === null || m === void 0 ? void 0 : m.nextSibling, h = [], v = (k) => k.stopPropagation();
2719
+ let b = (m = a.current) === null || m === void 0 ? void 0 : m.nextSibling, h = [], g = (x) => x.stopPropagation();
2720
2720
  for (; b && b !== s.current; )
2721
- h.push(b), b.addEventListener(Yt, v), b = b.nextSibling;
2721
+ h.push(b), b.addEventListener(Yt, g), b = b.nextSibling;
2722
2722
  return i.current = h, () => {
2723
- for (let k of h) k.removeEventListener(Yt, v);
2723
+ for (let x of h) x.removeEventListener(Yt, g);
2724
2724
  };
2725
2725
  }, [
2726
2726
  t
@@ -2735,8 +2735,8 @@ function fs(e) {
2735
2735
  i
2736
2736
  ]), me(() => () => {
2737
2737
  var m, b, h;
2738
- let v = (h = (b = q.getTreeNode(i)) === null || b === void 0 || (m = b.parent) === null || m === void 0 ? void 0 : m.scopeRef) !== null && h !== void 0 ? h : null;
2739
- (i === z || ht(i, z)) && (!v || q.getTreeNode(v)) && (z = v), q.removeTreeNode(i);
2738
+ let g = (h = (b = q.getTreeNode(i)) === null || b === void 0 || (m = b.parent) === null || m === void 0 ? void 0 : m.scopeRef) !== null && h !== void 0 ? h : null;
2739
+ (i === z || ht(i, z)) && (!g || q.getTreeNode(g)) && (z = g), q.removeTreeNode(i);
2740
2740
  }, [
2741
2741
  i
2742
2742
  ]);
@@ -3130,10 +3130,10 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3130
3130
  onClose: m,
3131
3131
  maxHeight: b = "400px",
3132
3132
  minWidth: h = "200px",
3133
- maxWidth: v = "500px"
3133
+ maxWidth: g = "500px"
3134
3134
  }) => {
3135
3135
  const {
3136
- triggerRef: k,
3136
+ triggerRef: x,
3137
3137
  triggerProps: T,
3138
3138
  popoverRef: S,
3139
3139
  getPopoverPosition: _,
@@ -3155,17 +3155,17 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3155
3155
  Xn(
3156
3156
  {
3157
3157
  Escape: (W) => {
3158
- c && (W.preventDefault(), w(), k.current?.focus());
3158
+ c && (W.preventDefault(), w(), x.current?.focus());
3159
3159
  }
3160
3160
  },
3161
3161
  { enabled: P }
3162
3162
  ), Ir(S, (W) => {
3163
- !l || !k.current || !P || !W.target || k.current.contains(W.target) || w();
3163
+ !l || !x.current || !P || !W.target || x.current.contains(W.target) || w();
3164
3164
  });
3165
- const x = _();
3165
+ const N = _();
3166
3166
  return /* @__PURE__ */ y($r, { children: [
3167
3167
  t ? t({
3168
- triggerRef: k,
3168
+ triggerRef: x,
3169
3169
  triggerProps: T,
3170
3170
  toggle: O,
3171
3171
  open: P,
@@ -3173,10 +3173,10 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3173
3173
  }) : /* @__PURE__ */ d(
3174
3174
  "button",
3175
3175
  {
3176
- ref: k,
3176
+ ref: x,
3177
3177
  ...T,
3178
3178
  onClick: O,
3179
- className: N(
3179
+ className: k(
3180
3180
  "outline-none p-2 rounded-md transition-colors",
3181
3181
  "hover:bg-base-3 focus-visible:bg-base-3 focus-visible:ring-2 focus-visible:ring-brand",
3182
3182
  i
@@ -3206,15 +3206,15 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3206
3206
  ref: S,
3207
3207
  style: {
3208
3208
  position: "fixed",
3209
- left: x.x,
3210
- top: x.top,
3211
- bottom: x.bottom,
3209
+ left: N.x,
3210
+ top: N.top,
3211
+ bottom: N.bottom,
3212
3212
  maxHeight: typeof b == "number" ? `${b}px` : b,
3213
3213
  minWidth: typeof h == "number" ? `${h}px` : h,
3214
- maxWidth: typeof v == "number" ? `${v}px` : v,
3214
+ maxWidth: typeof g == "number" ? `${g}px` : g,
3215
3215
  zIndex: 1e3
3216
3216
  },
3217
- className: N(
3217
+ className: k(
3218
3218
  "bg-base-1 dark-theme:bg-base-2",
3219
3219
  "border border-base-4 rounded-6",
3220
3220
  "customscrollbar overflow-auto",
@@ -3229,7 +3229,7 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3229
3229
  subtitle: t,
3230
3230
  onClose: r,
3231
3231
  className: n
3232
- }) => /* @__PURE__ */ d("div", { className: N("p-4 border-b border-base-4", n), children: /* @__PURE__ */ y("div", { className: "flex items-start justify-between", children: [
3232
+ }) => /* @__PURE__ */ d("div", { className: k("p-4 border-b border-base-4", n), children: /* @__PURE__ */ y("div", { className: "flex items-start justify-between", children: [
3233
3233
  /* @__PURE__ */ y("div", { children: [
3234
3234
  /* @__PURE__ */ d("h3", { className: "font-semibold text-base-12", children: e }),
3235
3235
  t && /* @__PURE__ */ d("p", { className: "text-sm text-base-11 mt-1", children: t })
@@ -3245,10 +3245,10 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3245
3245
  ] }) }), Di = ({
3246
3246
  children: e,
3247
3247
  className: t
3248
- }) => /* @__PURE__ */ d("div", { className: N("p-4", t), children: e }), Pi = ({
3248
+ }) => /* @__PURE__ */ d("div", { className: k("p-4", t), children: e }), Pi = ({
3249
3249
  children: e,
3250
3250
  className: t
3251
- }) => /* @__PURE__ */ d("div", { className: N("p-4 border-t border-base-4", t), children: e }), ys = (e, t) => {
3251
+ }) => /* @__PURE__ */ d("div", { className: k("p-4 border-t border-base-4", t), children: e }), ys = (e, t) => {
3252
3252
  const r = new Date(2023, 0, 1), n = [];
3253
3253
  for (let o = 0; o < 7; o++) {
3254
3254
  const a = new Date(r);
@@ -3274,51 +3274,51 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3274
3274
  e || /* @__PURE__ */ new Date()
3275
3275
  ), b = $(null), h = fe(() => r ? new Set(
3276
3276
  r.map((w) => new Date(w).toDateString())
3277
- ) : /* @__PURE__ */ new Set(), [r]), v = fe(() => new Set(n || []), [n]), k = fe(() => {
3278
- const w = fo(l), x = lo(l), W = new Date(w), R = new Date(x);
3277
+ ) : /* @__PURE__ */ new Set(), [r]), g = fe(() => new Set(n || []), [n]), x = fe(() => {
3278
+ const w = fo(l), N = lo(l), W = new Date(w), R = new Date(N);
3279
3279
  if (i) {
3280
3280
  const E = w.getDay(), p = E === 0 ? 6 : E - 1;
3281
3281
  W.setDate(w.getDate() - p);
3282
- const D = x.getDay(), M = D === 0 ? 0 : 7 - D;
3283
- R.setDate(x.getDate() + M);
3282
+ const D = N.getDay(), M = D === 0 ? 0 : 7 - D;
3283
+ R.setDate(N.getDate() + M);
3284
3284
  } else
3285
- W.setDate(w.getDate() - w.getDay()), R.setDate(x.getDate() + (6 - x.getDay()));
3285
+ W.setDate(w.getDate() - w.getDay()), R.setDate(N.getDate() + (6 - N.getDay()));
3286
3286
  return uo({ start: W, end: R });
3287
3287
  }, [l, i]), T = fe(
3288
3288
  () => ys(s ?? Ve, i),
3289
3289
  [s, i]
3290
3290
  ), S = (w) => {
3291
- const x = w.toDateString(), W = w.getDay();
3292
- return !(h.has(x) || v.has(W) || o && w < o || a && w > a);
3291
+ const N = w.toDateString(), W = w.getDay();
3292
+ return !(h.has(N) || g.has(W) || o && w < o || a && w > a);
3293
3293
  }, _ = (w) => {
3294
3294
  S(w) && t && t(w), m(w);
3295
3295
  }, P = (w) => {
3296
3296
  if (!f) return;
3297
- let x = new Date(f), W = !0, R, E;
3297
+ let N = new Date(f), W = !0, R, E;
3298
3298
  switch (w.key) {
3299
3299
  case "ArrowUp":
3300
- x.setDate(x.getDate() - 7);
3300
+ N.setDate(N.getDate() - 7);
3301
3301
  break;
3302
3302
  case "ArrowDown":
3303
- x.setDate(x.getDate() + 7);
3303
+ N.setDate(N.getDate() + 7);
3304
3304
  break;
3305
3305
  case "ArrowLeft":
3306
- x.setDate(x.getDate() - 1);
3306
+ N.setDate(N.getDate() - 1);
3307
3307
  break;
3308
3308
  case "ArrowRight":
3309
- x.setDate(x.getDate() + 1);
3309
+ N.setDate(N.getDate() + 1);
3310
3310
  break;
3311
3311
  case "Home":
3312
- R = x.getDay(), x.setDate(x.getDate() - R);
3312
+ R = N.getDay(), N.setDate(N.getDate() - R);
3313
3313
  break;
3314
3314
  case "End":
3315
- E = x.getDay(), x.setDate(x.getDate() + (6 - E));
3315
+ E = N.getDay(), N.setDate(N.getDate() + (6 - E));
3316
3316
  break;
3317
3317
  case "PageUp":
3318
- x = w.shiftKey ? Dt(x, 12) : Dt(x, 1);
3318
+ N = w.shiftKey ? Dt(N, 12) : Dt(N, 1);
3319
3319
  break;
3320
3320
  case "PageDown":
3321
- x = w.shiftKey ? at(x, 12) : at(x, 1);
3321
+ N = w.shiftKey ? at(N, 12) : at(N, 1);
3322
3322
  break;
3323
3323
  case "Enter":
3324
3324
  case " ":
@@ -3327,17 +3327,17 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3327
3327
  default:
3328
3328
  W = !1;
3329
3329
  }
3330
- W && (w.preventDefault(), x.getTime() !== f.getTime() && (m(x), fr(x, l) || u(x)));
3330
+ W && (w.preventDefault(), N.getTime() !== f.getTime() && (m(N), fr(N, l) || u(N)));
3331
3331
  }, O = (w) => {
3332
3332
  u(
3333
- (x) => w === "prev" ? Dt(x, 1) : at(x, 1)
3333
+ (N) => w === "prev" ? Dt(N, 1) : at(N, 1)
3334
3334
  );
3335
3335
  };
3336
3336
  return /* @__PURE__ */ y(
3337
3337
  "div",
3338
3338
  {
3339
3339
  ref: b,
3340
- className: N(
3340
+ className: k(
3341
3341
  "dark-theme:bg-base-3 border border-base-5 dark-theme:border-base-4 rounded-6 px-4 pt-3 pb-4 w-full lg:w-80",
3342
3342
  c
3343
3343
  ),
@@ -3376,7 +3376,7 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3376
3376
  },
3377
3377
  w
3378
3378
  )) }),
3379
- /* @__PURE__ */ d("div", { className: "grid grid-cols-7 gap-1 mt-4", role: "grid", children: k.map((w, x) => {
3379
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-7 gap-1 mt-4", role: "grid", children: x.map((w, N) => {
3380
3380
  const W = fr(w, l), R = e ? Ct(w, e) : !1, E = f && Ct(w, f), p = S(w), D = Ct(w, /* @__PURE__ */ new Date());
3381
3381
  return /* @__PURE__ */ d(
3382
3382
  "button",
@@ -3393,7 +3393,7 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3393
3393
  })}${R ? ", selected" : ""}${p ? "" : ", disabled"}`,
3394
3394
  "aria-selected": R,
3395
3395
  "aria-disabled": !p,
3396
- className: N(
3396
+ className: k(
3397
3397
  "h-8 w-8 flex items-center outline-none justify-center rounded-6 hover:bg-base-4 text-sm relative",
3398
3398
  W ? R ? "bg-brand text-brand-text hover:bg-brand" : D ? "text-base-12 ring-1 ring-base-8" : "text-base-12" : "text-base-9",
3399
3399
  E && "ring-1 ring-base-6",
@@ -3401,7 +3401,7 @@ const Gt = ({ children: e, node: t }) => Mr(e, t ?? document.body), ws = ({
3401
3401
  ),
3402
3402
  children: Me(w, "d")
3403
3403
  },
3404
- x
3404
+ N
3405
3405
  );
3406
3406
  }) })
3407
3407
  ]
@@ -3562,8 +3562,8 @@ const Fi = () => /* @__PURE__ */ y("div", { children: [
3562
3562
  }, u) => {
3563
3563
  const f = () => {
3564
3564
  r || t?.(e === "indeterminate" ? !0 : !e);
3565
- }, m = (v) => {
3566
- (v.key === " " || v.key === "Enter") && (v.preventDefault(), f());
3565
+ }, m = (g) => {
3566
+ (g.key === " " || g.key === "Enter") && (g.preventDefault(), f());
3567
3567
  }, b = {
3568
3568
  xs: "h-3.5 w-3.5",
3569
3569
  sm: "h-4 w-4",
@@ -3587,7 +3587,7 @@ const Fi = () => /* @__PURE__ */ y("div", { children: [
3587
3587
  disabled: r,
3588
3588
  onClick: f,
3589
3589
  onKeyDown: m,
3590
- className: N(
3590
+ className: k(
3591
3591
  // Base styles
3592
3592
  "inline-flex items-center justify-center rounded-2 border border-base-4 transition-all duration-200 ease-in-out",
3593
3593
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-base-5",
@@ -3832,7 +3832,7 @@ function _i({
3832
3832
  return /* @__PURE__ */ d(Yn, { ...e, children: /* @__PURE__ */ d(
3833
3833
  "form",
3834
3834
  {
3835
- className: N(
3835
+ className: k(
3836
3836
  "mt-4 lg:mt-8 grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-8 relative",
3837
3837
  a
3838
3838
  ),
@@ -3893,28 +3893,28 @@ const Ls = ({
3893
3893
  containerClassName: m,
3894
3894
  className: b,
3895
3895
  type: h = "text",
3896
- value: v,
3897
- ...k
3896
+ value: g,
3897
+ ...x
3898
3898
  }, T) => {
3899
- const S = $(null), _ = $(!1), [P, O] = H(!1), [w, x] = H(!1), W = h === "password", R = W && P ? "text" : l ? "number" : h, E = v !== "" && v !== null && v !== void 0;
3899
+ const S = $(null), _ = $(!1), [P, O] = H(!1), [w, N] = H(!1), W = h === "password", R = W && P ? "text" : l ? "number" : h, E = g !== "" && g !== null && g !== void 0;
3900
3900
  return B(() => {
3901
3901
  if (!_.current) {
3902
3902
  _.current = !0;
3903
3903
  return;
3904
3904
  }
3905
3905
  S.current && zn(S.current);
3906
- }, [P, S]), /* @__PURE__ */ y("div", { className: N("relative", f), children: [
3906
+ }, [P, S]), /* @__PURE__ */ y("div", { className: k("relative", f), children: [
3907
3907
  e && r === "default" && /* @__PURE__ */ d(
3908
3908
  "label",
3909
3909
  {
3910
- className: N("font-medium ml-0.5 text-xs", i && "text-red-9"),
3910
+ className: k("font-medium ml-0.5 text-xs", i && "text-red-9"),
3911
3911
  children: e
3912
3912
  }
3913
3913
  ),
3914
3914
  /* @__PURE__ */ y(
3915
3915
  "div",
3916
3916
  {
3917
- className: N(
3917
+ className: k(
3918
3918
  "rounded-6 transition cursor-text relative",
3919
3919
  Fs[n],
3920
3920
  {
@@ -3929,7 +3929,7 @@ const Ls = ({
3929
3929
  e && r === "floating" && /* @__PURE__ */ d(
3930
3930
  "label",
3931
3931
  {
3932
- className: N(
3932
+ className: k(
3933
3933
  "absolute transition-all duration-200 pointer-events-none",
3934
3934
  "text-sm top-[18px] font-semibold left-3",
3935
3935
  {
@@ -3944,7 +3944,7 @@ const Ls = ({
3944
3944
  On,
3945
3945
  {
3946
3946
  size: 16,
3947
- className: N(
3947
+ className: k(
3948
3948
  "absolute top-1/2 -translate-y-1/2 left-3",
3949
3949
  i ? "text-red-9" : "text-base-11"
3950
3950
  )
@@ -3958,7 +3958,7 @@ const Ls = ({
3958
3958
  T && (typeof T == "function" ? T(p) : T.current = p), S.current = p;
3959
3959
  },
3960
3960
  type: R,
3961
- className: N(
3961
+ className: k(
3962
3962
  "w-full bg-transparent focus-visible:outline-none",
3963
3963
  "placeholder:text-sm text-sm placeholder:text-base-11",
3964
3964
  l || u ? "pl-9" : "pl-3",
@@ -3970,11 +3970,11 @@ const Ls = ({
3970
3970
  },
3971
3971
  b
3972
3972
  ),
3973
- value: v,
3973
+ value: g,
3974
3974
  placeholder: a,
3975
- onFocus: () => x(!0),
3976
- onBlur: () => x(!1),
3977
- ...k
3975
+ onFocus: () => N(!0),
3976
+ onBlur: () => N(!1),
3977
+ ...x
3978
3978
  }
3979
3979
  )
3980
3980
  ]
@@ -3991,7 +3991,7 @@ const Ls = ({
3991
3991
  "button",
3992
3992
  {
3993
3993
  type: "button",
3994
- className: N(
3994
+ className: k(
3995
3995
  r === "floating" ? "absolute right-3 top-1/2 -translate-y-1/2" : "absolute right-3 top-10"
3996
3996
  ),
3997
3997
  onClick: () => {
@@ -4001,13 +4001,13 @@ const Ls = ({
4001
4001
  Ln,
4002
4002
  {
4003
4003
  size: 20,
4004
- className: N(i ? "text-red-9" : "text-base-11")
4004
+ className: k(i ? "text-red-9" : "text-base-11")
4005
4005
  }
4006
4006
  ) : /* @__PURE__ */ d(
4007
4007
  Fn,
4008
4008
  {
4009
4009
  size: 20,
4010
- className: N(i ? "text-red-9" : "text-base-11")
4010
+ className: k(i ? "text-red-9" : "text-base-11")
4011
4011
  }
4012
4012
  )
4013
4013
  }
@@ -4166,7 +4166,7 @@ const Ri = ({
4166
4166
  }) => /* @__PURE__ */ d(
4167
4167
  "div",
4168
4168
  {
4169
- className: N(
4169
+ className: k(
4170
4170
  "rounded-7 dark-theme:bg-base-3",
4171
4171
  e ? "border-none bg-base-3" : "border border-base-6 dark-theme:border-base-4",
4172
4172
  t
@@ -4183,7 +4183,7 @@ const Ri = ({
4183
4183
  "button",
4184
4184
  {
4185
4185
  onClick: e,
4186
- className: N(
4186
+ className: k(
4187
4187
  "w-full text-start first:rounded-t-7 last:rounded-b-7 border-b dark-theme:border-base-4",
4188
4188
  "last:border-none px-3 pr-2.5 py-3 dark-theme:bg-base-3 lg:hover:bg-base-4 max-lg:active:bg-base-4",
4189
4189
  "transition-colors hover:cursor-pointer flex items-center justify-between outline-none lg:focus-visible:ring-2 focus-visible:ring-base-6",
@@ -4209,7 +4209,7 @@ const Ri = ({
4209
4209
  disabled: b = !1,
4210
4210
  className: h
4211
4211
  }) => {
4212
- const [v, k] = H(""), [T, S] = H(!1), [_, P] = H(-1), O = $(null), w = $(null), x = $([]), {
4212
+ const [g, x] = H(""), [T, S] = H(!1), [_, P] = H(-1), O = $(null), w = $(null), N = $([]), {
4213
4213
  triggerRef: W,
4214
4214
  triggerProps: R,
4215
4215
  popoverRef: E,
@@ -4225,7 +4225,7 @@ const Ri = ({
4225
4225
  S(!0), m && O.current && setTimeout(() => O.current?.focus(), 10);
4226
4226
  },
4227
4227
  onClose: () => {
4228
- S(!1), k(""), P(-1);
4228
+ S(!1), x(""), P(-1);
4229
4229
  }
4230
4230
  }), j = $(
4231
4231
  `multiselect-${Math.random().toString(36).substr(2, 9)}`
@@ -4233,15 +4233,15 @@ const Ri = ({
4233
4233
  `label-${Math.random().toString(36).substr(2, 9)}`
4234
4234
  ).current, L = $(
4235
4235
  `error-${Math.random().toString(36).substr(2, 9)}`
4236
- ).current, g = $(
4236
+ ).current, v = $(
4237
4237
  `listbox-${Math.random().toString(36).substr(2, 9)}`
4238
4238
  ).current, X = i ? n.map((C) => r.find(
4239
4239
  (Q) => a(Q) === C || a(Q) === a(C)
4240
4240
  )).filter(Boolean) : n, le = X.length > 0, G = m ? r.filter(
4241
- (C) => s(C).toLowerCase().includes(v.toLowerCase())
4241
+ (C) => s(C).toLowerCase().includes(g.toLowerCase())
4242
4242
  ) : r;
4243
4243
  B(() => {
4244
- x.current = x.current.slice(0, G.length);
4244
+ N.current = N.current.slice(0, G.length);
4245
4245
  }, [G.length]);
4246
4246
  const ae = (C) => i ? n.some(
4247
4247
  (Y) => Y === a(C) || a(Y) === a(C)
@@ -4296,24 +4296,24 @@ const Ri = ({
4296
4296
  M();
4297
4297
  else {
4298
4298
  const Y = _ >= G.length - 1 ? 0 : _ + 1;
4299
- P(Y), x.current[Y]?.scrollIntoView({ block: "nearest" });
4299
+ P(Y), N.current[Y]?.scrollIntoView({ block: "nearest" });
4300
4300
  }
4301
4301
  break;
4302
4302
  case "ArrowUp":
4303
4303
  if (C.preventDefault(), D) {
4304
4304
  const Y = _ <= 0 ? G.length - 1 : _ - 1;
4305
- P(Y), x.current[Y]?.scrollIntoView({ block: "nearest" });
4305
+ P(Y), N.current[Y]?.scrollIntoView({ block: "nearest" });
4306
4306
  }
4307
4307
  break;
4308
4308
  case "Backspace":
4309
- if (m && v === "" && X.length > 0) {
4309
+ if (m && g === "" && X.length > 0) {
4310
4310
  const Y = X[X.length - 1];
4311
4311
  Je(Y);
4312
4312
  }
4313
4313
  break;
4314
4314
  }
4315
4315
  }, kn = (C) => {
4316
- k(C.target.value), P(-1);
4316
+ x(C.target.value), P(-1);
4317
4317
  }, En = () => {
4318
4318
  b || (m && O.current && O.current.focus(), M());
4319
4319
  }, et = (C) => {
@@ -4323,12 +4323,12 @@ const Ri = ({
4323
4323
  !W.current || !D || !C.target || W.current.contains(C.target) || A();
4324
4324
  });
4325
4325
  const Tt = p();
4326
- return /* @__PURE__ */ y("div", { className: N("relative", h), children: [
4326
+ return /* @__PURE__ */ y("div", { className: k("relative", h), children: [
4327
4327
  /* @__PURE__ */ y("div", { className: "relative", ref: w, children: [
4328
4328
  t === "default" && /* @__PURE__ */ d(
4329
4329
  "label",
4330
4330
  {
4331
- className: N(
4331
+ className: k(
4332
4332
  "top-[18px] font-medium ml-0.5 text-xs",
4333
4333
  l && "text-red-9"
4334
4334
  ),
@@ -4340,7 +4340,7 @@ const Ri = ({
4340
4340
  {
4341
4341
  ref: W,
4342
4342
  ...R,
4343
- className: N(
4343
+ className: k(
4344
4344
  "relative rounded-6 px-2 transition cursor-pointer pr-10 min-h-[48px]",
4345
4345
  "border border-base-4 light-theme:drop-shadow-sm dark-theme:bg-base-3",
4346
4346
  {
@@ -4356,7 +4356,7 @@ const Ri = ({
4356
4356
  role: "combobox",
4357
4357
  "aria-expanded": D,
4358
4358
  "aria-haspopup": "listbox",
4359
- "aria-owns": g,
4359
+ "aria-owns": v,
4360
4360
  "aria-labelledby": K,
4361
4361
  "aria-describedby": l ? L : void 0,
4362
4362
  onKeyDown: Ze,
@@ -4367,7 +4367,7 @@ const Ri = ({
4367
4367
  {
4368
4368
  id: K,
4369
4369
  htmlFor: j,
4370
- className: N(
4370
+ className: k(
4371
4371
  "absolute transition-all duration-200 pointer-events-none",
4372
4372
  "text-base top-4 font-semibold left-3",
4373
4373
  {
@@ -4385,14 +4385,14 @@ const Ri = ({
4385
4385
  /* @__PURE__ */ y(
4386
4386
  "div",
4387
4387
  {
4388
- className: N("flex flex-wrap gap-2 items-center", {
4388
+ className: k("flex flex-wrap gap-2 items-center", {
4389
4389
  "mt-2.5": t === "floating"
4390
4390
  }),
4391
4391
  children: [
4392
4392
  X.map((C) => /* @__PURE__ */ y(
4393
4393
  "div",
4394
4394
  {
4395
- className: N(
4395
+ className: k(
4396
4396
  "border border-base-4 dark-theme:border-base-5 dark-theme:bg-base-4 rounded-full px-2 py-1 text-sm flex items-center gap-1",
4397
4397
  {
4398
4398
  "bg-red-4 text-red-9": l
@@ -4423,13 +4423,13 @@ const Ri = ({
4423
4423
  id: j,
4424
4424
  type: "text",
4425
4425
  className: "flex-grow min-w-[60px] bg-transparent outline-none placeholder:text-sm",
4426
- value: v,
4426
+ value: g,
4427
4427
  onChange: kn,
4428
4428
  onKeyDown: Ze,
4429
4429
  placeholder: le ? "" : u,
4430
4430
  disabled: b,
4431
4431
  "aria-autocomplete": "list",
4432
- "aria-controls": g,
4432
+ "aria-controls": v,
4433
4433
  autoComplete: "off"
4434
4434
  }
4435
4435
  ),
@@ -4443,7 +4443,7 @@ const Ri = ({
4443
4443
  An,
4444
4444
  {
4445
4445
  size: 16,
4446
- className: N("transition-transform text-base-11", {
4446
+ className: k("transition-transform text-base-11", {
4447
4447
  "rotate-180": D
4448
4448
  })
4449
4449
  }
@@ -4468,23 +4468,23 @@ const Ri = ({
4468
4468
  bottom: Tt.bottom,
4469
4469
  width: w.current?.offsetWidth ?? 200
4470
4470
  },
4471
- className: N(
4471
+ className: k(
4472
4472
  "bg-base-1 dark-theme:bg-base-3 border border-base-4",
4473
4473
  "rounded-6 shadow-lg max-h-[300px] overflow-y-auto z-50",
4474
4474
  "customscrollbarnohide"
4475
4475
  ),
4476
4476
  role: "listbox",
4477
- id: g,
4477
+ id: v,
4478
4478
  "aria-labelledby": K,
4479
- children: G.length === 0 ? /* @__PURE__ */ d("div", { className: "px-3 py-2 text-sm text-secondarytext", children: v ? "No results found" : "No options available" }) : G.map((C, Y) => {
4479
+ children: G.length === 0 ? /* @__PURE__ */ d("div", { className: "px-3 py-2 text-sm text-secondarytext", children: g ? "No results found" : "No options available" }) : G.map((C, Y) => {
4480
4480
  const Q = ae(C);
4481
4481
  return /* @__PURE__ */ y(
4482
4482
  "div",
4483
4483
  {
4484
4484
  ref: ($n) => {
4485
- x.current[Y] = $n;
4485
+ N.current[Y] = $n;
4486
4486
  },
4487
- className: N(
4487
+ className: k(
4488
4488
  "px-3 py-2 text-sm cursor-pointer flex items-center justify-between",
4489
4489
  // gap-x-2
4490
4490
  "first:rounded-t-6 last:rounded-b-6",
@@ -4554,9 +4554,9 @@ const Ri = ({
4554
4554
  size: r = "6",
4555
4555
  descriptionClassName: n,
4556
4556
  className: o
4557
- }) => /* @__PURE__ */ y("div", { className: N("text-center", o), children: [
4557
+ }) => /* @__PURE__ */ y("div", { className: k("text-center", o), children: [
4558
4558
  /* @__PURE__ */ d("p", { className: `${js[r]} font-medium`, children: e }),
4559
- t ? /* @__PURE__ */ d("p", { className: N("mt-6 text-base-11", n), children: t }) : null
4559
+ t ? /* @__PURE__ */ d("p", { className: k("mt-6 text-base-11", n), children: t }) : null
4560
4560
  ] }), Ki = ({
4561
4561
  id: e,
4562
4562
  tabPage: t,
@@ -4571,7 +4571,7 @@ const Ri = ({
4571
4571
  showScrollbar: u = !0,
4572
4572
  onScroll: f
4573
4573
  }) => {
4574
- const m = $(null), b = $(null), h = $(null), v = $(null), k = $(null), [T, S] = H(!1), _ = $(null), P = $({
4574
+ const m = $(null), b = $(null), h = $(null), g = $(null), x = $(null), [T, S] = H(!1), _ = $(null), P = $({
4575
4575
  startY: 0,
4576
4576
  // Track where the scroll position was when gesture started
4577
4577
  currentY: 0,
@@ -4590,66 +4590,66 @@ const Ri = ({
4590
4590
  ));
4591
4591
  }),
4592
4592
  []
4593
- ), x = F((L) => {
4594
- const { maxScroll: g } = P.current;
4595
- return L > 0 ? Math.pow(L, 0.8) : L < -g ? -g - Math.pow(-(L + g), 0.8) : L;
4593
+ ), N = F((L) => {
4594
+ const { maxScroll: v } = P.current;
4595
+ return L > 0 ? Math.pow(L, 0.8) : L < -v ? -v - Math.pow(-(L + v), 0.8) : L;
4596
4596
  }, []), W = F(() => {
4597
- if (!u || !m.current || !v.current)
4597
+ if (!u || !m.current || !g.current)
4598
4598
  return;
4599
- const { currentY: L, maxScroll: g } = P.current, V = m.current.offsetHeight, X = Math.max(
4599
+ const { currentY: L, maxScroll: v } = P.current, V = m.current.offsetHeight, X = Math.max(
4600
4600
  30,
4601
- V / (V + g) * V
4601
+ V / (V + v) * V
4602
4602
  ), le = V - X;
4603
- let G = -L / g * le, ae = 1;
4604
- L > 0 ? (G = 0, ae = 1 - L / V, v.current.style.transformOrigin = "top") : L < -g ? (G = le, ae = 1 - Math.abs(L + g) / V, v.current.style.transformOrigin = "bottom") : v.current.style.transformOrigin = "top", v.current.style.transform = `translate3d(0, ${G}px, 0) scaleY(${ae})`, v.current.style.height = `${X}px`;
4603
+ let G = -L / v * le, ae = 1;
4604
+ L > 0 ? (G = 0, ae = 1 - L / V, g.current.style.transformOrigin = "top") : L < -v ? (G = le, ae = 1 - Math.abs(L + v) / V, g.current.style.transformOrigin = "bottom") : g.current.style.transformOrigin = "top", g.current.style.transform = `translate3d(0, ${G}px, 0) scaleY(${ae})`, g.current.style.height = `${X}px`;
4605
4605
  }, [u]), R = F(
4606
4606
  (L) => {
4607
4607
  if (P.current.currentY = L, b.current && (b.current.style.transform = `translate3d(0, ${L}px, 0)`), h.current) {
4608
- const g = Math.max(
4608
+ const v = Math.max(
4609
4609
  L - P.current.refreshThreshold,
4610
4610
  -P.current.refreshThreshold
4611
4611
  );
4612
- h.current.style.transform = `translate3d(0, ${g}px, 0)`;
4612
+ h.current.style.transform = `translate3d(0, ${v}px, 0)`;
4613
4613
  }
4614
4614
  f && f(L), W();
4615
4615
  },
4616
4616
  [W]
4617
4617
  ), E = F(
4618
4618
  (L) => {
4619
- const g = P.current;
4620
- g.frameCallback && (re(g.frameCallback), g.frameCallback = null);
4621
- const V = performance.now(), X = g.currentY, le = L - X, G = () => {
4619
+ const v = P.current;
4620
+ v.frameCallback && (re(v.frameCallback), v.frameCallback = null);
4621
+ const V = performance.now(), X = v.currentY, le = L - X, G = () => {
4622
4622
  const ae = performance.now() - V, Re = Math.min(ae / l, 1), Je = 1 - Math.pow(1 - Re, 3), Ze = X + le * Je;
4623
- R(Ze), Re >= 1 && (g.frameCallback && (re(g.frameCallback), g.frameCallback = null), R(L), L === 0 && h.current && (h.current.textContent = "Pull to refresh"));
4623
+ R(Ze), Re >= 1 && (v.frameCallback && (re(v.frameCallback), v.frameCallback = null), R(L), L === 0 && h.current && (h.current.textContent = "Pull to refresh"));
4624
4624
  };
4625
- g.frameCallback = lt.render(G, !0);
4625
+ v.frameCallback = lt.render(G, !0);
4626
4626
  },
4627
4627
  [R, l]
4628
4628
  ), p = F(
4629
4629
  (L) => {
4630
- const g = P.current;
4631
- g.frameCallback && (re(g.frameCallback), g.frameCallback = null);
4630
+ const v = P.current;
4631
+ v.frameCallback && (re(v.frameCallback), v.frameCallback = null);
4632
4632
  let V = L, X = Date.now();
4633
4633
  const le = () => {
4634
4634
  const G = Date.now(), ae = G - X;
4635
- if (X = G, V *= Math.pow(0.95, ae / 16), g.currentY += V * ae, g.currentY > 0 || g.currentY < -g.maxScroll) {
4636
- g.frameCallback && (re(g.frameCallback), g.frameCallback = null), E(g.currentY > 0 ? 0 : -g.maxScroll);
4635
+ if (X = G, V *= Math.pow(0.95, ae / 16), v.currentY += V * ae, v.currentY > 0 || v.currentY < -v.maxScroll) {
4636
+ v.frameCallback && (re(v.frameCallback), v.frameCallback = null), E(v.currentY > 0 ? 0 : -v.maxScroll);
4637
4637
  return;
4638
4638
  }
4639
- R(g.currentY), Math.abs(V) < 0.01 && g.frameCallback && (re(g.frameCallback), g.frameCallback = null);
4639
+ R(v.currentY), Math.abs(V) < 0.01 && v.frameCallback && (re(v.frameCallback), v.frameCallback = null);
4640
4640
  };
4641
- g.frameCallback = lt.render(le, !0);
4641
+ v.frameCallback = lt.render(le, !0);
4642
4642
  },
4643
4643
  [R, E]
4644
4644
  ), D = F(() => {
4645
- if (!u || !v.current) return;
4646
- k.current !== null && clearTimeout(k.current), requestAnimationFrame(() => {
4647
- v.current && (v.current.style.opacity = "1");
4645
+ if (!u || !g.current) return;
4646
+ x.current !== null && clearTimeout(x.current), requestAnimationFrame(() => {
4647
+ g.current && (g.current.style.opacity = "1");
4648
4648
  });
4649
- const L = window.requestIdleCallback || ((g) => setTimeout(g, 1e3));
4650
- k.current = window.setTimeout(() => {
4649
+ const L = window.requestIdleCallback || ((v) => setTimeout(v, 1e3));
4650
+ x.current = window.setTimeout(() => {
4651
4651
  L(() => {
4652
- v.current && (v.current.style.opacity = "0"), k.current = null;
4652
+ g.current && (g.current.style.opacity = "0"), x.current = null;
4653
4653
  });
4654
4654
  }, 1e3);
4655
4655
  }, [u]), M = F(
@@ -4657,28 +4657,28 @@ const Ri = ({
4657
4657
  if (_.current !== null && Date.now() - _.current < 50)
4658
4658
  return;
4659
4659
  _.current = Date.now();
4660
- const g = P.current;
4661
- g.isScrolling = !0, g.startY = g.currentY, g.lastTimestamp = Date.now(), g.isPullingToRefresh = g.currentY === 0, g.pullDistance = 0, g.frameCallback && (re(g.frameCallback), g.frameCallback = null), D();
4660
+ const v = P.current;
4661
+ v.isScrolling = !0, v.startY = v.currentY, v.lastTimestamp = Date.now(), v.isPullingToRefresh = v.currentY === 0, v.pullDistance = 0, v.frameCallback && (re(v.frameCallback), v.frameCallback = null), D();
4662
4662
  },
4663
4663
  [D]
4664
4664
  ), A = F(
4665
4665
  (L) => {
4666
- const g = P.current;
4667
- if (!g.isScrolling) return;
4668
- const V = x(g.startY + L.deltaY);
4669
- g.isPullingToRefresh && V < g.startY && (g.isPullingToRefresh = !1), R(V), a && g.isPullingToRefresh && !T && V > 0 && (g.pullDistance = V, h.current && (h.current.textContent = g.pullDistance > g.refreshThreshold ? "Release to refresh" : "Pull to refresh")), D();
4666
+ const v = P.current;
4667
+ if (!v.isScrolling) return;
4668
+ const V = N(v.startY + L.deltaY);
4669
+ v.isPullingToRefresh && V < v.startY && (v.isPullingToRefresh = !1), R(V), a && v.isPullingToRefresh && !T && V > 0 && (v.pullDistance = V, h.current && (h.current.textContent = v.pullDistance > v.refreshThreshold ? "Release to refresh" : "Pull to refresh")), D();
4670
4670
  },
4671
4671
  [
4672
4672
  a,
4673
4673
  R,
4674
4674
  T,
4675
4675
  D,
4676
- x
4676
+ N
4677
4677
  ]
4678
4678
  ), j = F(
4679
4679
  (L) => {
4680
- const g = P.current;
4681
- g.isScrolling && (g.isScrolling = !1, a && g.isPullingToRefresh && !T && g.pullDistance > g.refreshThreshold ? K() : g.currentY > 0 || g.currentY < -g.maxScroll ? E(g.currentY > 0 ? 0 : -g.maxScroll) : p(L.velocityY), g.isPullingToRefresh = !1);
4680
+ const v = P.current;
4681
+ v.isScrolling && (v.isScrolling = !1, a && v.isPullingToRefresh && !T && v.pullDistance > v.refreshThreshold ? K() : v.currentY > 0 || v.currentY < -v.maxScroll ? E(v.currentY > 0 ? 0 : -v.maxScroll) : p(L.velocityY), v.isPullingToRefresh = !1);
4682
4682
  },
4683
4683
  [a, p, E, T]
4684
4684
  ), K = F(() => {
@@ -4705,7 +4705,7 @@ const Ri = ({
4705
4705
  }, [M, A, j]), B(() => {
4706
4706
  if (m.current)
4707
4707
  return w(), W(), window.addEventListener("resize", w), () => {
4708
- window.removeEventListener("resize", w), k.current !== null && clearTimeout(k.current);
4708
+ window.removeEventListener("resize", w), x.current !== null && clearTimeout(x.current);
4709
4709
  };
4710
4710
  }, [w, W]), /* @__PURE__ */ y(
4711
4711
  ke.div,
@@ -4741,7 +4741,7 @@ const Ri = ({
4741
4741
  position: r ? "absolute" : "relative",
4742
4742
  ...s
4743
4743
  },
4744
- className: N(
4744
+ className: k(
4745
4745
  "top-0 right-0 h-full w-full bg-base-1 isolate will-change-transform",
4746
4746
  i
4747
4747
  ),
@@ -4782,7 +4782,7 @@ const Ri = ({
4782
4782
  u && /* @__PURE__ */ d(
4783
4783
  "div",
4784
4784
  {
4785
- ref: v,
4785
+ ref: g,
4786
4786
  style: {
4787
4787
  position: "absolute",
4788
4788
  top: 2,
@@ -4820,7 +4820,7 @@ function Xi({
4820
4820
  pullDistance: 0,
4821
4821
  refreshThreshold: 50,
4822
4822
  isPullingToRefresh: !1
4823
- }), v = F(
4823
+ }), g = F(
4824
4824
  Ge(() => {
4825
4825
  s.current && i.current && (h.current.maxScroll = Math.max(
4826
4826
  0,
@@ -4828,7 +4828,7 @@ function Xi({
4828
4828
  ));
4829
4829
  }),
4830
4830
  []
4831
- ), k = F((E) => {
4831
+ ), x = F((E) => {
4832
4832
  const { maxScroll: p } = h.current;
4833
4833
  return E > 0 ? Math.pow(E, 0.8) : E < -p ? -p - Math.pow(-(E + p), 0.8) : E;
4834
4834
  }, []), T = F(() => {
@@ -4857,7 +4857,7 @@ function Xi({
4857
4857
  const p = h.current;
4858
4858
  p.frameCallback && (re(p.frameCallback), p.frameCallback = null);
4859
4859
  const D = performance.now(), M = p.currentY, A = E - M, j = () => {
4860
- const K = performance.now() - D, L = Math.min(K / n, 1), g = 1 - Math.pow(1 - L, 3), V = M + A * g;
4860
+ const K = performance.now() - D, L = Math.min(K / n, 1), v = 1 - Math.pow(1 - L, 3), V = M + A * v;
4861
4861
  S(V), L >= 1 && (p.frameCallback && (re(p.frameCallback), p.frameCallback = null), S(E));
4862
4862
  };
4863
4863
  p.frameCallback = lt.render(j, !0);
@@ -4899,11 +4899,11 @@ function Xi({
4899
4899
  p.isScrolling = !0, p.startY = p.currentY, p.lastTimestamp = Date.now(), p.isPullingToRefresh = p.currentY === 0, p.pullDistance = 0, p.frameCallback && (re(p.frameCallback), p.frameCallback = null), O();
4900
4900
  },
4901
4901
  [O]
4902
- ), x = F(
4902
+ ), N = F(
4903
4903
  (E) => {
4904
4904
  const p = h.current;
4905
4905
  if (!p.isScrolling) return;
4906
- const D = k(p.startY + E.deltaY);
4906
+ const D = x(p.startY + E.deltaY);
4907
4907
  p.isPullingToRefresh && D < p.startY && (p.isPullingToRefresh = !1), S(D), r && p.isPullingToRefresh && !f && D > 0 && (p.pullDistance = D), O();
4908
4908
  },
4909
4909
  [
@@ -4911,7 +4911,7 @@ function Xi({
4911
4911
  S,
4912
4912
  f,
4913
4913
  O,
4914
- k
4914
+ x
4915
4915
  ]
4916
4916
  ), W = F(() => {
4917
4917
  m(!0), _(h.current.refreshThreshold), r && r().then(() => {
@@ -4932,16 +4932,16 @@ function Xi({
4932
4932
  passive: !0,
4933
4933
  direction: "y",
4934
4934
  onStart: w,
4935
- onMove: x,
4935
+ onMove: N,
4936
4936
  onEnd: R
4937
4937
  });
4938
4938
  return E.init(), () => E.destroy();
4939
- }, [w, x, R]), B(() => {
4939
+ }, [w, N, R]), B(() => {
4940
4940
  if (s.current)
4941
- return v(), T(), window.addEventListener("resize", v), () => {
4942
- window.removeEventListener("resize", v), u.current !== null && clearTimeout(u.current);
4941
+ return g(), T(), window.addEventListener("resize", g), () => {
4942
+ window.removeEventListener("resize", g), u.current !== null && clearTimeout(u.current);
4943
4943
  };
4944
- }, [v, T]), {
4944
+ }, [g, T]), {
4945
4945
  container: {
4946
4946
  props: {
4947
4947
  id: e,
@@ -4983,8 +4983,8 @@ function Xi({
4983
4983
  }
4984
4984
  },
4985
4985
  refreshing: f,
4986
- updateMaxScroll: v,
4987
- rubberBandEffect: k,
4986
+ updateMaxScroll: g,
4987
+ rubberBandEffect: x,
4988
4988
  updateScrollbarPosition: T,
4989
4989
  setPosition: S
4990
4990
  };
@@ -5010,7 +5010,7 @@ const Ui = Ue(
5010
5010
  }, []), /* @__PURE__ */ y(
5011
5011
  "div",
5012
5012
  {
5013
- className: N(
5013
+ className: k(
5014
5014
  "rounded-6 relative flex items-center bg-base-3 border-base-5",
5015
5015
  {
5016
5016
  "dark-theme:bg-red-4 light-theme:border-red-9": c,
@@ -5030,7 +5030,7 @@ const Ui = Ue(
5030
5030
  autoCorrect: "off",
5031
5031
  type: "search",
5032
5032
  autoFocus: n ? n(f) : void 0,
5033
- className: N(
5033
+ className: k(
5034
5034
  "w-full py-1.5 pl-10 pr-3 bg-transparent outline-none text-base-12 placeholder:text-base-11 [&::-webkit-search-cancel-button]:appearance-none",
5035
5035
  c && "text-red-9 placeholder:text-red-9"
5036
5036
  )
@@ -5040,7 +5040,7 @@ const Ui = Ue(
5040
5040
  _n,
5041
5041
  {
5042
5042
  size: 20,
5043
- className: N("absolute left-3 text-base-11 pointer-events-none", {
5043
+ className: k("absolute left-3 text-base-11 pointer-events-none", {
5044
5044
  "text-red-9": c
5045
5045
  })
5046
5046
  }
@@ -5051,7 +5051,7 @@ const Ui = Ue(
5051
5051
  onClick: () => {
5052
5052
  o(), u.current?.focus();
5053
5053
  },
5054
- className: N(
5054
+ className: k(
5055
5055
  "absolute right-2.5 rounded-full",
5056
5056
  c ? "text-red-9" : "text-base-11"
5057
5057
  ),
@@ -5071,12 +5071,12 @@ const Ui = Ue(
5071
5071
  }) => {
5072
5072
  const [a, s] = H(!1), i = fe(() => e.length > t, [e]), c = fe(() => i ? a ? e : e.slice(0, t).trim() + "..." : e, [e, a, i]);
5073
5073
  return /* @__PURE__ */ y("div", { children: [
5074
- /* @__PURE__ */ d("p", { className: N("text-base-12", r === "sm" && "text-sm", n), children: c }),
5074
+ /* @__PURE__ */ d("p", { className: k("text-base-12", r === "sm" && "text-sm", n), children: c }),
5075
5075
  i ? /* @__PURE__ */ d(
5076
5076
  "button",
5077
5077
  {
5078
5078
  onClick: () => s((l) => !l),
5079
- className: N("text-xs text-base-11", o),
5079
+ className: k("text-xs text-base-11", o),
5080
5080
  children: a ? "Ver menos" : "Ver más"
5081
5081
  }
5082
5082
  ) : null
@@ -5172,9 +5172,9 @@ const Ui = Ue(
5172
5172
  // from,
5173
5173
  className: b
5174
5174
  }) => {
5175
- const [h, v] = H({ left: !1, right: !1 }), { ref: k } = Bn({
5175
+ const [h, g] = H({ left: !1, right: !1 }), { ref: x } = Bn({
5176
5176
  onOverflow: (T) => {
5177
- v({ left: T.canScrollLeft, right: T.canScrollRight });
5177
+ g({ left: T.canScrollLeft, right: T.canScrollRight });
5178
5178
  },
5179
5179
  // enabled: inView,
5180
5180
  trackScroll: m
@@ -5182,7 +5182,7 @@ const Ui = Ue(
5182
5182
  return /* @__PURE__ */ y(
5183
5183
  "div",
5184
5184
  {
5185
- className: N(
5185
+ className: k(
5186
5186
  "relative overflow-hidden",
5187
5187
  we.widths[l].container,
5188
5188
  we.rounded[f],
@@ -5192,8 +5192,8 @@ const Ui = Ue(
5192
5192
  /* @__PURE__ */ d(
5193
5193
  "div",
5194
5194
  {
5195
- ref: k,
5196
- className: N(
5195
+ ref: x,
5196
+ className: k(
5197
5197
  "flex items-center border overflow-x-scroll scrollbar-hide",
5198
5198
  we.rounded[f],
5199
5199
  we.border[u]
@@ -5204,7 +5204,7 @@ const Ui = Ue(
5204
5204
  "button",
5205
5205
  {
5206
5206
  onClick: () => r?.(T),
5207
- className: N(
5207
+ className: k(
5208
5208
  "border-r px-3 py-1 last:border-none text-nowrap shrink-0",
5209
5209
  we.widths[l].item,
5210
5210
  !S && "lg:hover:bg-overlay-3",
@@ -5228,7 +5228,7 @@ const Ui = Ue(
5228
5228
  animate: "animate",
5229
5229
  exit: "exit",
5230
5230
  onClick: () => {
5231
- k.current && xr({ el: k.current, direction: "left" });
5231
+ x.current && xr({ el: x.current, direction: "left" });
5232
5232
  },
5233
5233
  className: "absolute shrink-0 left-0 px-1 h-full bg-gradient-to-r from-base-2 top-0",
5234
5234
  children: /* @__PURE__ */ d(Cr, { className: "text-base-13" })
@@ -5243,7 +5243,7 @@ const Ui = Ue(
5243
5243
  animate: "animate",
5244
5244
  exit: "exit",
5245
5245
  onClick: () => {
5246
- k.current && xr({ el: k.current, direction: "right" });
5246
+ x.current && xr({ el: x.current, direction: "right" });
5247
5247
  },
5248
5248
  className: "absolute shrink-0 right-0 px-1 h-full bg-gradient-to-l from-base-2 top-0",
5249
5249
  children: /* @__PURE__ */ d(Dr, { className: "text-base-13" })
@@ -5254,18 +5254,18 @@ const Ui = Ue(
5254
5254
  ]
5255
5255
  }
5256
5256
  );
5257
- }, Ji = ({ className: e }) => /* @__PURE__ */ d("div", { className: N("w-full h-px bg-base-4", e) }), Hs = ({
5257
+ }, Ji = ({ className: e }) => /* @__PURE__ */ d("div", { className: k("w-full h-px bg-base-4", e) }), Hs = ({
5258
5258
  loading: e = !0,
5259
5259
  wrapperClassName: t,
5260
5260
  spinnerClassName: r
5261
- }) => /* @__PURE__ */ d("div", { className: N("flex justify-center", t), children: /* @__PURE__ */ d(
5261
+ }) => /* @__PURE__ */ d("div", { className: k("flex justify-center", t), children: /* @__PURE__ */ d(
5262
5262
  "svg",
5263
5263
  {
5264
5264
  xmlns: "http://www.w3.org/2000/svg",
5265
5265
  width: "20",
5266
5266
  height: "20",
5267
5267
  viewBox: "0 0 20 20",
5268
- className: N({ "animate-spin": e }, r),
5268
+ className: k({ "animate-spin": e }, r),
5269
5269
  children: /* @__PURE__ */ d(
5270
5270
  "path",
5271
5271
  {
@@ -5306,7 +5306,7 @@ const Ui = Ue(
5306
5306
  Z,
5307
5307
  {
5308
5308
  color: "brand",
5309
- className: N(e && t ? "" : "col-span-2"),
5309
+ className: k(e && t ? "" : "col-span-2"),
5310
5310
  state: r ? "loading" : n ? "disabled" : "enabled",
5311
5311
  type: "submit",
5312
5312
  children: [
@@ -5334,7 +5334,7 @@ const Ui = Ue(
5334
5334
  const u = r.current[r.current.length - 2];
5335
5335
  return t && console.log("prev modal id", u), u;
5336
5336
  }, [t]), s = F(
5337
- (u, f = "modal") => {
5337
+ (u, f = "modal", m) => {
5338
5338
  Lt(
5339
5339
  u,
5340
5340
  {
@@ -5343,7 +5343,8 @@ const Ui = Ue(
5343
5343
  },
5344
5344
  {
5345
5345
  ease: [0.32, 0.72, 0, 1],
5346
- duration: 0.3
5346
+ duration: 0.3,
5347
+ delay: m ? 0.2 : void 0
5347
5348
  }
5348
5349
  );
5349
5350
  },
@@ -5377,24 +5378,25 @@ const Ui = Ue(
5377
5378
  }, tl = ({
5378
5379
  id: e,
5379
5380
  prevPath: t,
5380
- title: r,
5381
- description: n,
5382
- showHeader: o = !0,
5383
- mode: a,
5384
- onReplace: s,
5385
- className: i,
5386
- contentClassName: c,
5387
- children: l
5381
+ withDelay: r,
5382
+ title: n,
5383
+ description: o,
5384
+ showHeader: a = !0,
5385
+ mode: s,
5386
+ onReplace: i,
5387
+ className: c,
5388
+ contentClassName: l,
5389
+ children: u
5388
5390
  // ...others
5389
5391
  }) => {
5390
- const u = In(), f = yt(), m = $(null), b = Bs(), h = fe(() => a === "modal" || f, [a, f]);
5392
+ const f = In(), m = yt(), b = $(null), h = Bs(), g = fe(() => s === "modal" || m, [s, m]);
5391
5393
  return B(() => {
5392
- b.add(e);
5393
- const v = b.getPrevId();
5394
- if (!v || (m.current = document.getElementById(v), !m.current)) return;
5395
- v && b.animateParentModal(
5396
- m.current,
5397
- h ? "modal" : "sheet"
5394
+ h.add(e);
5395
+ const x = h.getPrevId();
5396
+ if (!x || (b.current = document.getElementById(x), !b.current)) return;
5397
+ x && h.animateParentModal(
5398
+ b.current,
5399
+ g ? "modal" : "sheet"
5398
5400
  );
5399
5401
  //! cleanups not running on new router system
5400
5402
  //! IDK WHY
@@ -5402,21 +5404,29 @@ const Ui = Ue(
5402
5404
  console.log("IS THIS CLEANUP RUNNING?");
5403
5405
  };
5404
5406
  //! NOT RUNNING...
5405
- }, [f]), Tr(() => () => b.remove(e), []), /* @__PURE__ */ y(Gt, { children: [
5407
+ }, [m]), Tr(() => () => h.remove(e), []), /* @__PURE__ */ y(Gt, { children: [
5406
5408
  /* @__PURE__ */ d(
5407
5409
  ke.div,
5408
5410
  {
5409
5411
  initial: { opacity: 0 },
5410
5412
  animate: {
5411
- opacity: 1
5413
+ opacity: 1,
5414
+ transition: {
5415
+ ease: [0.32, 0.72, 0, 1],
5416
+ duration: 0.3,
5417
+ delay: r ? 0.2 : void 0
5418
+ }
5412
5419
  },
5413
- exit: { opacity: 0 },
5414
- transition: {
5415
- ease: [0.32, 0.72, 0, 1],
5416
- duration: 0.3
5420
+ exit: {
5421
+ opacity: 0,
5422
+ transition: {
5423
+ ease: [0.32, 0.72, 0, 1],
5424
+ duration: 0.3,
5425
+ delay: r ? 0.2 : void 0
5426
+ }
5417
5427
  },
5418
5428
  onClick: () => {
5419
- u ? tt.back() : tt.replace(s ?? t);
5429
+ f ? tt.back() : tt.replace(i ?? t);
5420
5430
  },
5421
5431
  className: "bg-black/40 absolute w-full h-full left-0 top-0 z-[500]"
5422
5432
  }
@@ -5426,49 +5436,55 @@ const Ui = Ue(
5426
5436
  {
5427
5437
  id: e,
5428
5438
  initial: {
5429
- scale: h ? 0.8 : void 0,
5430
- y: h ? void 0 : window.innerHeight
5439
+ scale: g ? 0.8 : void 0,
5440
+ y: g ? void 0 : window.innerHeight
5431
5441
  },
5432
5442
  animate: {
5433
5443
  scale: 1,
5434
- y: h ? void 0 : 0
5444
+ y: g ? void 0 : 0,
5445
+ transition: {
5446
+ ease: [0.32, 0.72, 0, 1],
5447
+ duration: 0.3,
5448
+ delay: r ? 0.2 : void 0
5449
+ }
5435
5450
  },
5436
5451
  exit: {
5437
- scale: h ? 0.8 : void 0,
5438
- opacity: h ? 0 : void 0,
5439
- y: h ? void 0 : window.innerHeight
5440
- },
5441
- transition: {
5442
- ease: [0.32, 0.72, 0, 1],
5443
- duration: 0.3
5452
+ scale: g ? 0.8 : void 0,
5453
+ opacity: g ? 0 : void 0,
5454
+ y: g ? void 0 : window.innerHeight,
5455
+ transition: {
5456
+ ease: [0.32, 0.72, 0, 1],
5457
+ duration: 0.3,
5458
+ delay: r ? 0.2 : void 0
5459
+ }
5444
5460
  },
5445
5461
  style: {
5446
5462
  left: "50%",
5447
5463
  translateX: "-50%",
5448
- bottom: h ? "50%" : 0,
5449
- translateY: h ? "50%" : 0,
5450
- height: h ? "65%" : "95%"
5464
+ bottom: g ? "50%" : 0,
5465
+ translateY: g ? "50%" : 0,
5466
+ height: g ? "65%" : "95%"
5451
5467
  },
5452
- onAnimationStart: (v) => {
5453
- (v?.scale === 0.8 || v?.y > 50) && m.current && b.restoreParentModal(m.current);
5468
+ onAnimationStart: (x) => {
5469
+ (x?.scale === 0.8 || x?.y > 50) && b.current && h.restoreParentModal(b.current);
5454
5470
  },
5455
- className: N(
5471
+ className: k(
5456
5472
  "bg-base-1 absolute w-full lg:max-w-[600px] h-full rounded-6 overflow-hidden z-[500] flex flex-col",
5457
- !h && "rounded-b-none",
5458
- i
5473
+ !g && "rounded-b-none",
5474
+ c
5459
5475
  ),
5460
5476
  children: [
5461
- o && /* @__PURE__ */ y("div", { className: "flex items-start justify-between p-4 border-b border-base-3", children: [
5477
+ a && /* @__PURE__ */ y("div", { className: "flex items-start justify-between p-4 border-b border-base-3", children: [
5462
5478
  /* @__PURE__ */ y("div", { children: [
5463
- r && /* @__PURE__ */ d("p", { className: "font-medium text-lg", children: r }),
5464
- n && /* @__PURE__ */ d("p", { className: "text-base-11 text-xs", children: n })
5479
+ n && /* @__PURE__ */ d("p", { className: "font-medium text-lg", children: n }),
5480
+ o && /* @__PURE__ */ d("p", { className: "text-base-11 text-xs", children: o })
5465
5481
  ] }),
5466
5482
  /* @__PURE__ */ d(
5467
5483
  Z,
5468
5484
  {
5469
5485
  size: "xs",
5470
5486
  onClick: () => {
5471
- u ? tt.back() : tt.replace(s ?? t);
5487
+ f ? tt.back() : tt.replace(i ?? t);
5472
5488
  },
5473
5489
  children: /* @__PURE__ */ d(gt, { size: 20 })
5474
5490
  }
@@ -5478,8 +5494,8 @@ const Ui = Ue(
5478
5494
  "div",
5479
5495
  {
5480
5496
  id: `${e}-content`,
5481
- className: N("grow customscrollbar p-4 pb-6", c),
5482
- children: l
5497
+ className: k("grow customscrollbar p-4 pb-6", l),
5498
+ children: u
5483
5499
  }
5484
5500
  )
5485
5501
  ]
@@ -5509,7 +5525,7 @@ function Vs({
5509
5525
  onClick: () => {
5510
5526
  r || t(!e);
5511
5527
  },
5512
- className: N(
5528
+ className: k(
5513
5529
  `relative inline-flex h-[28px] w-[48px] items-center rounded-full
5514
5530
  transition-colors duration-200 ease-in-out
5515
5531
  focus-visible:outline-none focus-visible:ring-1
@@ -5522,7 +5538,7 @@ function Vs({
5522
5538
  /* @__PURE__ */ d(
5523
5539
  "span",
5524
5540
  {
5525
- className: N(
5541
+ className: k(
5526
5542
  `inline-block h-6 w-6 transform rounded-full
5527
5543
  transition-transform duration-200 ease-in-out
5528
5544
  shadow`,
@@ -5561,7 +5577,7 @@ const qs = ({
5561
5577
  maxTags: c,
5562
5578
  validateTag: l
5563
5579
  }) => {
5564
- const [u, f] = H(""), [m, b] = H(!1), [h, v] = H(null), k = $(null), T = $(null), S = $([]), _ = n.length > 0, P = $(
5580
+ const [u, f] = H(""), [m, b] = H(!1), [h, g] = H(null), x = $(null), T = $(null), S = $([]), _ = n.length > 0, P = $(
5565
5581
  `taginput-${Math.random().toString(36).substr(2, 9)}`
5566
5582
  ).current, O = $(
5567
5583
  `label-${Math.random().toString(36).substr(2, 9)}`
@@ -5571,29 +5587,29 @@ const qs = ({
5571
5587
  B(() => {
5572
5588
  S.current = S.current.slice(0, n.length);
5573
5589
  }, [n.length]);
5574
- const x = (M) => {
5590
+ const N = (M) => {
5575
5591
  if (M.key === "Enter" && u.trim()) {
5576
5592
  M.preventDefault();
5577
5593
  const A = u.trim();
5578
5594
  if (c && n.length >= c) {
5579
- v(`Maximum of ${c} tags allowed`);
5595
+ g(`Maximum of ${c} tags allowed`);
5580
5596
  return;
5581
5597
  }
5582
5598
  if (n.includes(A)) {
5583
- v("Tag already exists");
5599
+ g("Tag already exists");
5584
5600
  return;
5585
5601
  }
5586
5602
  if (l) {
5587
5603
  const j = l(A);
5588
5604
  if (typeof j == "string") {
5589
- v(j);
5605
+ g(j);
5590
5606
  return;
5591
5607
  } else if (j === !1) {
5592
- v("Invalid tag");
5608
+ g("Invalid tag");
5593
5609
  return;
5594
5610
  }
5595
5611
  }
5596
- o([...n, A]), f(""), v(null), D(`Added tag ${A}`);
5612
+ o([...n, A]), f(""), g(null), D(`Added tag ${A}`);
5597
5613
  } else if (M.key === "Backspace" && !u && n.length > 0) {
5598
5614
  const A = n[n.length - 1];
5599
5615
  o(n.slice(0, -1)), D(`Removed tag ${A}`);
@@ -5603,17 +5619,17 @@ const qs = ({
5603
5619
  M.preventDefault();
5604
5620
  const j = n[A], K = [...n];
5605
5621
  K.splice(A, 1), o(K), setTimeout(() => {
5606
- k.current && k.current.focus();
5622
+ x.current && x.current.focus();
5607
5623
  }, 0), D(`Removed tag ${j}`);
5608
- } else M.key === "ArrowRight" ? (M.preventDefault(), A < n.length - 1 ? S.current[A + 1]?.focus() : k.current?.focus()) : M.key === "ArrowLeft" && (M.preventDefault(), A > 0 && S.current[A - 1]?.focus());
5624
+ } else M.key === "ArrowRight" ? (M.preventDefault(), A < n.length - 1 ? S.current[A + 1]?.focus() : x.current?.focus()) : M.key === "ArrowLeft" && (M.preventDefault(), A > 0 && S.current[A - 1]?.focus());
5609
5625
  }, R = (M, A) => {
5610
5626
  o(n.filter((j) => j !== M)), setTimeout(() => {
5611
- A < n.length - 1 ? S.current[A]?.focus() : A > 0 ? S.current[A - 1]?.focus() : k.current?.focus();
5627
+ A < n.length - 1 ? S.current[A]?.focus() : A > 0 ? S.current[A - 1]?.focus() : x.current?.focus();
5612
5628
  }, 0), D(`Removed tag ${M}`);
5613
5629
  }, E = (M) => {
5614
- f(M.target.value), v(null);
5630
+ f(M.target.value), g(null);
5615
5631
  }, p = () => {
5616
- k.current && k.current.focus();
5632
+ x.current && x.current.focus();
5617
5633
  }, D = (M) => {
5618
5634
  console.log(`Accessibility announcement: ${M}`);
5619
5635
  };
@@ -5624,7 +5640,7 @@ const qs = ({
5624
5640
  {
5625
5641
  id: O,
5626
5642
  htmlFor: P,
5627
- className: N("text-base top-4 font-semibold left-3", {
5643
+ className: k("text-base top-4 font-semibold left-3", {
5628
5644
  "text-sm top-2 left-2": m || _ || i,
5629
5645
  "text-red-9": !!s
5630
5646
  }),
@@ -5638,7 +5654,7 @@ const qs = ({
5638
5654
  /* @__PURE__ */ y(
5639
5655
  "div",
5640
5656
  {
5641
- className: N("rounded-6 px-2 transition cursor-text pr-10", {
5657
+ className: k("rounded-6 px-2 transition cursor-text pr-10", {
5642
5658
  "bg-base-3": r === "solid",
5643
5659
  "border border-uielborder focus-visible:border-transparent": r === "outline",
5644
5660
  "py-3": t === "default",
@@ -5657,7 +5673,7 @@ const qs = ({
5657
5673
  {
5658
5674
  id: O,
5659
5675
  htmlFor: P,
5660
- className: N(
5676
+ className: k(
5661
5677
  "absolute transition-all duration-200 pointer-events-none",
5662
5678
  "text-base top-4 font-semibold left-3",
5663
5679
  {
@@ -5675,7 +5691,7 @@ const qs = ({
5675
5691
  /* @__PURE__ */ y(
5676
5692
  "div",
5677
5693
  {
5678
- className: N("flex flex-wrap gap-1 items-center", {
5694
+ className: k("flex flex-wrap gap-1 items-center", {
5679
5695
  "mt-2.5": t === "floating"
5680
5696
  }),
5681
5697
  children: [
@@ -5685,7 +5701,7 @@ const qs = ({
5685
5701
  ref: (j) => {
5686
5702
  S.current[A] = j;
5687
5703
  },
5688
- className: N(
5704
+ className: k(
5689
5705
  "line-clamp-1 text-brand rounded-full px-2 text-sm flex items-center",
5690
5706
  {
5691
5707
  "bg-brandfadedbg text-brand": !s && !h,
@@ -5716,12 +5732,12 @@ const qs = ({
5716
5732
  "input",
5717
5733
  {
5718
5734
  id: P,
5719
- ref: k,
5735
+ ref: x,
5720
5736
  type: "text",
5721
5737
  className: "flex-grow min-w-[60px] bg-transparent outline-none placeholder:text-sm placeholder:text-secondarytext",
5722
5738
  value: u,
5723
5739
  onChange: E,
5724
- onKeyDown: x,
5740
+ onKeyDown: N,
5725
5741
  onFocus: () => b(!0),
5726
5742
  onBlur: () => b(!1),
5727
5743
  enterKeyHint: "enter",
@@ -5792,7 +5808,7 @@ const qs = ({
5792
5808
  t === "default" ? /* @__PURE__ */ d(
5793
5809
  "label",
5794
5810
  {
5795
- className: N(
5811
+ className: k(
5796
5812
  "top-[18px] font-medium ml-0.5 text-xs",
5797
5813
  n && "text-red-9"
5798
5814
  ),
@@ -5802,14 +5818,14 @@ const qs = ({
5802
5818
  /* @__PURE__ */ y(
5803
5819
  "div",
5804
5820
  {
5805
- className: N(t === "default" ? "p-0" : "pt-5 pb-2", {
5821
+ className: k(t === "default" ? "p-0" : "pt-5 pb-2", {
5806
5822
  "bg-red-4 text-red-9": !!n
5807
5823
  }),
5808
5824
  children: [
5809
5825
  t === "floating" && /* @__PURE__ */ d(
5810
5826
  "label",
5811
5827
  {
5812
- className: N(
5828
+ className: k(
5813
5829
  "absolute transition-all duration-200 pointer-events-none",
5814
5830
  "text-sm top-2.5 font-semibold left-2.5",
5815
5831
  {
@@ -5824,7 +5840,7 @@ const qs = ({
5824
5840
  "textarea",
5825
5841
  {
5826
5842
  ref: l,
5827
- className: N(
5843
+ className: k(
5828
5844
  !n && u && Ks[o],
5829
5845
  "bg-base-3 border border-base-4 light-theme:drop-shadow-sm rounded-6 w-full focus-visible:outline-none customscrollbarnohide",
5830
5846
  "placeholder:text-base-11 text-sm",
@@ -6271,7 +6287,7 @@ const oi = [
6271
6287
  "div",
6272
6288
  {
6273
6289
  ref: n,
6274
- className: N("p-2 rounded-xl mt-2", {
6290
+ className: k("p-2 rounded-xl mt-2", {
6275
6291
  "border border-uielborder": t,
6276
6292
  "bg-uielbg border border-transparent": !t
6277
6293
  }),
@@ -6373,7 +6389,7 @@ export {
6373
6389
  Fi as TimePicker,
6374
6390
  Kn as calculatePopoverPosition,
6375
6391
  ct as checkOverflow,
6376
- N as cn,
6392
+ k as cn,
6377
6393
  yi as debounce,
6378
6394
  Ni as extractDirtyData,
6379
6395
  jn as generateInitials,