@imj_media/ui 1.0.27 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { jsxs as u, jsx as i, Fragment as H1 } from "react/jsx-runtime";
2
- import w1, { useState as q, useRef as t1, useEffect as W, useCallback as S, useMemo as f1, useImperativeHandle as U1, forwardRef as $1, useId as n0, createContext as g0, useContext as M0 } from "react";
3
- import { clsx as m0 } from "clsx";
4
- import { twMerge as f0 } from "tailwind-merge";
2
+ import w1, { useState as Y, useRef as t1, useEffect as W, useCallback as I, useMemo as m1, useImperativeHandle as U1, forwardRef as $1, useId as n0, createContext as g0, useContext as M0 } from "react";
3
+ import { clsx as f0 } from "clsx";
4
+ import { twMerge as m0 } from "tailwind-merge";
5
5
  import { cva as d1 } from "class-variance-authority";
6
6
  import e0, { createPortal as b1 } from "react-dom";
7
7
  import { Prism as v0 } from "react-syntax-highlighter";
8
8
  import { dark as x0, prism as b0, materialLight as j0, materialDark as V0, atomDark as H0, oneLight as O0, oneDark as y0, tomorrow as Z0, dracula as k0 } from "react-syntax-highlighter/dist/esm/styles/prism";
9
9
  function U(...o) {
10
- return f0(m0(o));
10
+ return m0(f0(o));
11
11
  }
12
12
  function I0({
13
13
  width: o = 24,
@@ -609,7 +609,7 @@ function M2({
609
609
  /* @__PURE__ */ i("path", { d: "M2.99878 18.9512H9.99715", stroke: n, strokeWidth: e, strokeLinecap: "round" })
610
610
  ] });
611
611
  }
612
- function m2({
612
+ function f2({
613
613
  width: o = 24,
614
614
  height: r = 24,
615
615
  fill: t = "none",
@@ -624,7 +624,7 @@ function m2({
624
624
  /* @__PURE__ */ i("path", { d: "M8.50071 14.002C9.60471 14.002 10.4975 14.8948 10.4975 15.9988H6.50391C6.50391 14.8948 7.39671 14.002 8.50071 14.002Z", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
625
625
  ] });
626
626
  }
627
- function f2({
627
+ function m2({
628
628
  width: o = 24,
629
629
  height: r = 24,
630
630
  fill: t = "none",
@@ -1436,7 +1436,7 @@ function M9({
1436
1436
  /* @__PURE__ */ i("path", { d: "M12 3V15.66", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
1437
1437
  ] });
1438
1438
  }
1439
- function m9({
1439
+ function f9({
1440
1440
  width: o = 24,
1441
1441
  height: r = 24,
1442
1442
  fill: t = "none",
@@ -1448,7 +1448,7 @@ function m9({
1448
1448
  /* @__PURE__ */ i("path", { d: "M6 11.998H20", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
1449
1449
  ] });
1450
1450
  }
1451
- function f9({
1451
+ function m9({
1452
1452
  width: o = 24,
1453
1453
  height: r = 24,
1454
1454
  fill: t = "none",
@@ -2179,7 +2179,7 @@ function Mn({
2179
2179
  /* @__PURE__ */ i("path", { d: "M18.4993 20.3379V22.0035", stroke: n, strokeWidth: e })
2180
2180
  ] });
2181
2181
  }
2182
- function mn({
2182
+ function fn({
2183
2183
  width: o = 24,
2184
2184
  height: r = 24,
2185
2185
  fill: t = "none",
@@ -2193,7 +2193,7 @@ function mn({
2193
2193
  /* @__PURE__ */ i("path", { d: "M12.7732 15.4616L3.16089 13.5859L10.5729 3C11.3939 4.10727 12.21 5.20978 13.0309 6.31705C14.0857 7.73933 15.1405 9.15683 16.1905 10.5791C15.0498 12.2066 13.9091 13.8389 12.7684 15.4664L12.7732 15.4616Z", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
2194
2194
  ] });
2195
2195
  }
2196
- function fn({
2196
+ function mn({
2197
2197
  width: o = 24,
2198
2198
  height: r = 24,
2199
2199
  fill: t = "none",
@@ -2910,7 +2910,7 @@ function M4({
2910
2910
  }) {
2911
2911
  return /* @__PURE__ */ i("svg", { width: o, height: r, viewBox: "0 0 24 24", fill: t, xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ i("path", { d: "M9.9984 7.0016V6.92C9.9984 5.8592 9.1392 5 8.0784 5H4.92C3.8592 5 3 5.8592 3 6.92V17.0816C3 18.1424 3.8592 19.0016 4.92 19.0016H19.08C20.1408 19.0016 21 18.1424 21 17.0816V8.9216C21 7.8608 20.1408 7.0016 19.08 7.0016H9.9984Z", stroke: n, strokeWidth: e, strokeLinejoin: "round" }) });
2912
2912
  }
2913
- function m4({
2913
+ function f4({
2914
2914
  width: o = 24,
2915
2915
  height: r = 24,
2916
2916
  fill: t = "none",
@@ -2927,7 +2927,7 @@ function m4({
2927
2927
  /* @__PURE__ */ i("path", { d: "M11.2336 14.6445H13.3552", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
2928
2928
  ] });
2929
2929
  }
2930
- function f4({
2930
+ function m4({
2931
2931
  width: o = 24,
2932
2932
  height: r = 24,
2933
2933
  fill: t = "none",
@@ -3659,7 +3659,7 @@ function Me({
3659
3659
  /* @__PURE__ */ i("path", { d: "M18.0101 18L6.01465 6", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
3660
3660
  ] });
3661
3661
  }
3662
- function me({
3662
+ function fe({
3663
3663
  width: o = 24,
3664
3664
  height: r = 24,
3665
3665
  fill: t = "none",
@@ -3676,7 +3676,7 @@ function me({
3676
3676
  /* @__PURE__ */ i("path", { d: "M15 10V8", stroke: n, strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round" })
3677
3677
  ] });
3678
3678
  }
3679
- function fe({
3679
+ function me({
3680
3680
  width: o = 24,
3681
3681
  height: r = 24,
3682
3682
  fill: t = "none",
@@ -4363,12 +4363,12 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4363
4363
  AngleLeftOutlined: I2,
4364
4364
  AngleRightOutlined: Re,
4365
4365
  AngleUpOutlined: d8,
4366
- ArchivarOutlined: fe,
4366
+ ArchivarOutlined: me,
4367
4367
  AreaOutlined: I4,
4368
4368
  ArrowCircleDownOutlined: Q2,
4369
4369
  ArrowCircleLeftOutlined: Ve,
4370
4370
  ArrowCircleRightOutlined: ee,
4371
- ArrowCircleUpOutlined: f2,
4371
+ ArrowCircleUpOutlined: m2,
4372
4372
  ArrowDownLeftOutlined: gn,
4373
4373
  ArrowDownOutlined: Q4,
4374
4374
  ArrowDownRightOutlined: Me,
@@ -4443,7 +4443,7 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4443
4443
  CotizadorVallasOutlined: _e,
4444
4444
  DashboardOutlined: u2,
4445
4445
  DiamanteOutlined: R9,
4446
- DisponibilidadOutlined: fn,
4446
+ DisponibilidadOutlined: mn,
4447
4447
  DocumentOutlined: T9,
4448
4448
  DownloadOutlined: M9,
4449
4449
  DummiesOutlined: p9,
@@ -4479,7 +4479,7 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4479
4479
  GaugeOutlined: I9,
4480
4480
  GearOutlined: Z4,
4481
4481
  GestionOutlined: G0,
4482
- GlassOutlined: f9,
4482
+ GlassOutlined: m9,
4483
4483
  GridOutlined: ne,
4484
4484
  GroupFilesOutlined: Nn,
4485
4485
  GroupOutlined: $4,
@@ -4488,7 +4488,7 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4488
4488
  HistoryOutlined: w9,
4489
4489
  HomeOutlined: re,
4490
4490
  IconsboxOutlined: w4,
4491
- IdOutlined: m2,
4491
+ IdOutlined: f2,
4492
4492
  ImageOutlined: D9,
4493
4493
  ImagesOutlined: te,
4494
4494
  ImjLogoOutlined: p8,
@@ -4531,7 +4531,7 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4531
4531
  Minus2Outlined: T0,
4532
4532
  MinusOutlined: C2,
4533
4533
  MoonOutlined: J2,
4534
- MupisOutlined: m4,
4534
+ MupisOutlined: f4,
4535
4535
  MuroOutlined: Te,
4536
4536
  NumberListOutlined: Xe,
4537
4537
  ObpByImjOutlined: p4,
@@ -4547,14 +4547,14 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4547
4547
  PautaTradicionalOutlined: t2,
4548
4548
  PencilOutlined: Be,
4549
4549
  PercentageOutlined: k9,
4550
- PerifoneoOutlined: mn,
4550
+ PerifoneoOutlined: fn,
4551
4551
  PerifoneoSlashOutlined: n9,
4552
4552
  PermisionarioOutlined: F9,
4553
4553
  PlaningOutlined: Vn,
4554
4554
  PlanningOutlined: Kn,
4555
4555
  PlantillaOutlined: i9,
4556
4556
  PlayOutlined: S9,
4557
- Plus1Outlined: m9,
4557
+ Plus1Outlined: f9,
4558
4558
  PlusOutlined: B4,
4559
4559
  PostventaOutlined: F0,
4560
4560
  PowerOutlined: pe,
@@ -4564,7 +4564,7 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4564
4564
  Proveedor1Outlined: t9,
4565
4565
  ProveedorOutlined: Cn,
4566
4566
  ProyectoOutlined: R2,
4567
- PuentePeatonalOutlined: me,
4567
+ PuentePeatonalOutlined: fe,
4568
4568
  PuntoOutlined: P4,
4569
4569
  PuzzleOutlined: nn,
4570
4570
  QuestionCircleOutlined: V4,
@@ -4639,7 +4639,7 @@ const A1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4639
4639
  VallasMovilesOutlined: b4,
4640
4640
  VistaDerechaOutlined: tn,
4641
4641
  VistaIndefinidaOutlined: hn,
4642
- VistaIzquierdaOutlined: f4,
4642
+ VistaIzquierdaOutlined: m4,
4643
4643
  VistaListaOutlined: ve,
4644
4644
  WorldOutlined: Jn,
4645
4645
  X2Outlined: He,
@@ -4681,7 +4681,7 @@ function h1({
4681
4681
  let C = A1[o];
4682
4682
  if (C || (C = i0[o]), !C)
4683
4683
  return console.warn(`Icono "${o}" no encontrado en ninguna variante`), null;
4684
- const p = C === A1[o] ? "outline" : "fill", d = C8[r], g = y1[t === "current" && p === "fill" ? "white" : t] || y1.blue, h = y1[n] || y1.black, j = /* @__PURE__ */ i(
4684
+ const p = C === A1[o] ? "outline" : "fill", d = C8[r], g = y1[t === "current" && p === "fill" ? "white" : t] || y1.blue, h = y1[n] || y1.black, H = /* @__PURE__ */ i(
4685
4685
  C,
4686
4686
  {
4687
4687
  width: d,
@@ -4708,9 +4708,9 @@ function h1({
4708
4708
  style: {
4709
4709
  "--tw-shadow-color": g
4710
4710
  },
4711
- children: j
4711
+ children: H
4712
4712
  }
4713
- ) : /* @__PURE__ */ i("i", { className: U(e, "ui-inline-block", a ? "ui-p-2 ui-bg-blue-50 ui-rounded-full" : ""), children: j });
4713
+ ) : /* @__PURE__ */ i("i", { className: U(e, "ui-inline-block", a ? "ui-p-2 ui-bg-blue-50 ui-rounded-full" : ""), children: H });
4714
4714
  }
4715
4715
  const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e }) => {
4716
4716
  const a = o && o.length > 0 && o.length < 3, s = !o || o.length === 0, l = a ? "custom" : s ? "badge" : "auto", c = d1(
@@ -5085,7 +5085,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5085
5085
  }, g8 = (o = "neutral", r = !1) => {
5086
5086
  const t = _1[o];
5087
5087
  return `${r ? "ui-absolute" : "ui-fixed"} ui-z-[9999] ui-px-2 ui-py-1 ui-rounded ui-text-[10px] ui-leading-relaxed ui-max-w-[300px] ui-break-words ui-shadow-lg ui-pointer-events-none ${t.bg} ${t.text}`;
5088
- }, M8 = (o = "neutral") => _1[o].arrow, m8 = ({
5088
+ }, M8 = (o = "neutral") => _1[o].arrow, f8 = ({
5089
5089
  children: o,
5090
5090
  label: r,
5091
5091
  position: t = "top",
@@ -5101,178 +5101,178 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5101
5101
  absolute: L = !1,
5102
5102
  ...g
5103
5103
  }) => {
5104
- const [h, f] = q(!1), [j, m] = q({ top: 0, left: 0 }), [w, V] = q({ width: 0, height: 0 }), [k, O] = q(!1), z = t1(null), F = t1(null), R = t1(null), Z = t1(null), Y = t1(`tooltip-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`);
5104
+ const [h, v] = Y(!1), [H, m] = Y({ top: 0, left: 0 }), [w, O] = Y({ width: 0, height: 0 }), [k, Z] = Y(!1), P = t1(null), E = t1(null), F = t1(null), y = t1(null), G = t1(`tooltip-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`);
5105
5105
  W(() => {
5106
- F.current && h && requestAnimationFrame(() => {
5107
- if (F.current) {
5108
- const M = F.current.getBoundingClientRect(), x = {
5106
+ E.current && h && requestAnimationFrame(() => {
5107
+ if (E.current) {
5108
+ const M = E.current.getBoundingClientRect(), f = {
5109
5109
  width: M.width,
5110
5110
  height: M.height
5111
5111
  };
5112
- V(x);
5112
+ O(f);
5113
5113
  }
5114
5114
  });
5115
5115
  }, [h, r]);
5116
- const H = S(() => {
5117
- var X, I, N, T, n1, K;
5118
- if (!z.current) return;
5119
- const M = z.current.getBoundingClientRect();
5120
- let x = 0, y = 0;
5121
- const $ = 8;
5116
+ const B = I(() => {
5117
+ var n1, $, S, D, Q, q;
5118
+ if (!P.current) return;
5119
+ const M = P.current.getBoundingClientRect();
5120
+ let f = 0, j = 0;
5121
+ const V = 8;
5122
5122
  if (L) {
5123
- const _ = (X = R.current) == null ? void 0 : X.getBoundingClientRect();
5123
+ const _ = (n1 = F.current) == null ? void 0 : n1.getBoundingClientRect();
5124
5124
  if (!_) return;
5125
- const Q = M.top - _.top, A = M.left - _.left;
5125
+ const J = M.top - _.top, z = M.left - _.left;
5126
5126
  switch (t) {
5127
5127
  case "top":
5128
- x = Q - w.height - $, y = A + M.width / 2 - w.width / 2;
5128
+ f = J - w.height - V, j = z + M.width / 2 - w.width / 2;
5129
5129
  break;
5130
5130
  case "bottom":
5131
- x = Q + M.height + $, y = A + M.width / 2 - w.width / 2;
5131
+ f = J + M.height + V, j = z + M.width / 2 - w.width / 2;
5132
5132
  break;
5133
5133
  case "left":
5134
- x = Q + M.height / 2 - w.height / 2, y = A - w.width - $;
5134
+ f = J + M.height / 2 - w.height / 2, j = z - w.width - V;
5135
5135
  break;
5136
5136
  case "right":
5137
- x = Q + M.height / 2 - w.height / 2, y = A + M.width + $;
5137
+ f = J + M.height / 2 - w.height / 2, j = z + M.width + V;
5138
5138
  break;
5139
5139
  case "top-left":
5140
- x = Q - w.height - $, y = A;
5140
+ f = J - w.height - V, j = z;
5141
5141
  break;
5142
5142
  case "top-right":
5143
- x = Q - w.height - $, y = A + M.width - w.width;
5143
+ f = J - w.height - V, j = z + M.width - w.width;
5144
5144
  break;
5145
5145
  case "bottom-left":
5146
- x = Q + M.height + $, y = A;
5146
+ f = J + M.height + V, j = z;
5147
5147
  break;
5148
5148
  case "bottom-right":
5149
- x = Q + M.height + $, y = A + M.width - w.width;
5149
+ f = J + M.height + V, j = z + M.width - w.width;
5150
5150
  break;
5151
5151
  case "right-top":
5152
- x = Q, y = A + M.width + $;
5152
+ f = J, j = z + M.width + V;
5153
5153
  break;
5154
5154
  case "right-bottom":
5155
- x = Q + M.height - w.height, y = A + M.width + $;
5155
+ f = J + M.height - w.height, j = z + M.width + V;
5156
5156
  break;
5157
5157
  case "left-top":
5158
- x = Q, y = A - w.width - $;
5158
+ f = J, j = z - w.width - V;
5159
5159
  break;
5160
5160
  case "left-bottom":
5161
- x = Q + M.height - w.height, y = A - w.width - $;
5161
+ f = J + M.height - w.height, j = z - w.width - V;
5162
5162
  break;
5163
5163
  }
5164
5164
  } else
5165
5165
  switch (t) {
5166
5166
  case "top":
5167
- x = M.top - w.height - $, y = M.left + M.width / 2 - w.width / 2;
5167
+ f = M.top - w.height - V, j = M.left + M.width / 2 - w.width / 2;
5168
5168
  break;
5169
5169
  case "bottom":
5170
- x = M.bottom + $, y = M.left + M.width / 2 - w.width / 2;
5170
+ f = M.bottom + V, j = M.left + M.width / 2 - w.width / 2;
5171
5171
  break;
5172
5172
  case "left":
5173
- x = M.top + M.height / 2 - w.height / 2, y = M.left - w.width - $;
5173
+ f = M.top + M.height / 2 - w.height / 2, j = M.left - w.width - V;
5174
5174
  break;
5175
5175
  case "right":
5176
- x = M.top + M.height / 2 - w.height / 2, y = M.right + $;
5176
+ f = M.top + M.height / 2 - w.height / 2, j = M.right + V;
5177
5177
  break;
5178
5178
  case "top-left":
5179
- x = M.top - w.height - $, y = M.left;
5179
+ f = M.top - w.height - V, j = M.left;
5180
5180
  break;
5181
5181
  case "top-right":
5182
- x = M.top - w.height - $, y = M.right - w.width;
5182
+ f = M.top - w.height - V, j = M.right - w.width;
5183
5183
  break;
5184
5184
  case "bottom-left":
5185
- x = M.bottom + $, y = M.left;
5185
+ f = M.bottom + V, j = M.left;
5186
5186
  break;
5187
5187
  case "bottom-right":
5188
- x = M.bottom + $, y = M.right - w.width;
5188
+ f = M.bottom + V, j = M.right - w.width;
5189
5189
  break;
5190
5190
  case "right-top":
5191
- x = M.top, y = M.right + $;
5191
+ f = M.top, j = M.right + V;
5192
5192
  break;
5193
5193
  case "right-bottom":
5194
- x = M.bottom - w.height, y = M.right + $;
5194
+ f = M.bottom - w.height, j = M.right + V;
5195
5195
  break;
5196
5196
  case "left-top":
5197
- x = M.top, y = M.left - w.width - $;
5197
+ f = M.top, j = M.left - w.width - V;
5198
5198
  break;
5199
5199
  case "left-bottom":
5200
- x = M.bottom - w.height, y = M.left - w.width - $;
5200
+ f = M.bottom - w.height, j = M.left - w.width - V;
5201
5201
  break;
5202
5202
  }
5203
5203
  if (t.includes("top") || t.includes("bottom"))
5204
5204
  switch (n) {
5205
5205
  case "start":
5206
5206
  if (L) {
5207
- const _ = (I = R.current) == null ? void 0 : I.getBoundingClientRect();
5208
- _ && (y = M.left - _.left);
5207
+ const _ = ($ = F.current) == null ? void 0 : $.getBoundingClientRect();
5208
+ _ && (j = M.left - _.left);
5209
5209
  } else
5210
- y = M.left;
5210
+ j = M.left;
5211
5211
  break;
5212
5212
  case "end":
5213
5213
  if (L) {
5214
- const _ = (N = R.current) == null ? void 0 : N.getBoundingClientRect();
5215
- _ && (y = M.right - _.left - w.width);
5214
+ const _ = (S = F.current) == null ? void 0 : S.getBoundingClientRect();
5215
+ _ && (j = M.right - _.left - w.width);
5216
5216
  } else
5217
- y = M.right - w.width;
5217
+ j = M.right - w.width;
5218
5218
  break;
5219
5219
  }
5220
5220
  else if (t.includes("left") || t.includes("right"))
5221
5221
  switch (n) {
5222
5222
  case "start":
5223
5223
  if (L) {
5224
- const _ = (T = R.current) == null ? void 0 : T.getBoundingClientRect();
5225
- _ && (x = M.top - _.top);
5224
+ const _ = (D = F.current) == null ? void 0 : D.getBoundingClientRect();
5225
+ _ && (f = M.top - _.top);
5226
5226
  } else
5227
- x = M.top;
5227
+ f = M.top;
5228
5228
  break;
5229
5229
  case "end":
5230
5230
  if (L) {
5231
- const _ = (n1 = R.current) == null ? void 0 : n1.getBoundingClientRect();
5232
- _ && (x = M.bottom - _.top - w.height);
5231
+ const _ = (Q = F.current) == null ? void 0 : Q.getBoundingClientRect();
5232
+ _ && (f = M.bottom - _.top - w.height);
5233
5233
  } else
5234
- x = M.bottom - w.height;
5234
+ f = M.bottom - w.height;
5235
5235
  break;
5236
5236
  }
5237
5237
  if (L) {
5238
- const _ = (K = R.current) == null ? void 0 : K.getBoundingClientRect();
5239
- _ && (y < 8 ? y = 8 : y + w.width > _.width - 8 && (y = _.width - w.width - 8), x < 8 ? x = 8 : x + w.height > _.height - 8 && (x = _.height - w.height - 8));
5238
+ const _ = (q = F.current) == null ? void 0 : q.getBoundingClientRect();
5239
+ _ && (j < 8 ? j = 8 : j + w.width > _.width - 8 && (j = _.width - w.width - 8), f < 8 ? f = 8 : f + w.height > _.height - 8 && (f = _.height - w.height - 8));
5240
5240
  } else {
5241
- const _ = window.innerWidth, Q = window.innerHeight, A = 8;
5242
- y < A ? y = A : y + w.width > _ - A && (y = _ - w.width - A), x < A ? x = A : x + w.height > Q - A && (x = Q - w.height - A);
5241
+ const _ = window.innerWidth, J = window.innerHeight, z = 8;
5242
+ j < z ? j = z : j + w.width > _ - z && (j = _ - w.width - z), f < z ? f = z : f + w.height > J - z && (f = J - w.height - z);
5243
5243
  }
5244
- m({ top: x, left: y }), O(!0);
5244
+ m({ top: f, left: j }), Z(!0);
5245
5245
  }, [t, n, w, L]);
5246
5246
  W(() => {
5247
5247
  h && w.width > 0 && w.height > 0 && requestAnimationFrame(() => {
5248
- H();
5248
+ B();
5249
5249
  });
5250
- }, [h, w, H]), W(() => {
5250
+ }, [h, w, B]), W(() => {
5251
5251
  const M = () => {
5252
- h && H();
5253
- }, x = () => {
5254
- h && H();
5252
+ h && B();
5253
+ }, f = () => {
5254
+ h && B();
5255
5255
  };
5256
- return window.addEventListener("scroll", M, !0), window.addEventListener("resize", x), () => {
5257
- window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", x);
5256
+ return window.addEventListener("scroll", M, !0), window.addEventListener("resize", f), () => {
5257
+ window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", f);
5258
5258
  };
5259
- }, [h, H]);
5260
- const v = S(() => {
5261
- l || (Z.current && (clearTimeout(Z.current), Z.current = null), s > 0 ? Z.current = setTimeout(() => {
5262
- f(!0);
5263
- }, s) : f(!0));
5264
- }, [l, s]), b = S(() => {
5265
- Z.current && (clearTimeout(Z.current), Z.current = null), f(!1), O(!1), V({ width: 0, height: 0 });
5259
+ }, [h, B]);
5260
+ const x = I(() => {
5261
+ l || (y.current && (clearTimeout(y.current), y.current = null), s > 0 ? y.current = setTimeout(() => {
5262
+ v(!0);
5263
+ }, s) : v(!0));
5264
+ }, [l, s]), b = I(() => {
5265
+ y.current && (clearTimeout(y.current), y.current = null), v(!1), Z(!1), O({ width: 0, height: 0 });
5266
5266
  }, []);
5267
5267
  W(() => () => {
5268
- Z.current && clearTimeout(Z.current), f(!1), O(!1), m({ top: 0, left: 0 }), V({ width: 0, height: 0 });
5268
+ y.current && clearTimeout(y.current), v(!1), Z(!1), m({ top: 0, left: 0 }), O({ width: 0, height: 0 });
5269
5269
  }, []);
5270
- const E = () => {
5270
+ const A = () => {
5271
5271
  if (!h || l || k) return null;
5272
- const M = _1[e], x = /* @__PURE__ */ i(
5272
+ const M = _1[e], f = /* @__PURE__ */ i(
5273
5273
  "div",
5274
5274
  {
5275
- ref: F,
5275
+ ref: E,
5276
5276
  className: U(
5277
5277
  L ? "ui-absolute" : "ui-fixed",
5278
5278
  "ui--top-[9999px] ui--left-[9999px] ui--z-10",
@@ -5286,9 +5286,9 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5286
5286
  children: r
5287
5287
  }
5288
5288
  );
5289
- return L ? x : b1(x, document.body);
5290
- }, P = () => {
5291
- const x = M8(e);
5289
+ return L ? f : b1(f, document.body);
5290
+ }, R = () => {
5291
+ const f = M8(e);
5292
5292
  switch (t) {
5293
5293
  case "top":
5294
5294
  return {
@@ -5300,7 +5300,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5300
5300
  height: 0,
5301
5301
  borderLeft: "6px solid transparent",
5302
5302
  borderRight: "6px solid transparent",
5303
- borderTop: `6px solid ${x}`
5303
+ borderTop: `6px solid ${f}`
5304
5304
  };
5305
5305
  case "bottom":
5306
5306
  return {
@@ -5312,7 +5312,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5312
5312
  height: 0,
5313
5313
  borderLeft: "6px solid transparent",
5314
5314
  borderRight: "6px solid transparent",
5315
- borderBottom: `6px solid ${x}`
5315
+ borderBottom: `6px solid ${f}`
5316
5316
  };
5317
5317
  case "left":
5318
5318
  return {
@@ -5324,7 +5324,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5324
5324
  height: 0,
5325
5325
  borderTop: "6px solid transparent",
5326
5326
  borderBottom: "6px solid transparent",
5327
- borderLeft: `6px solid ${x}`
5327
+ borderLeft: `6px solid ${f}`
5328
5328
  };
5329
5329
  case "right":
5330
5330
  return {
@@ -5336,7 +5336,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5336
5336
  height: 0,
5337
5337
  borderTop: "6px solid transparent",
5338
5338
  borderBottom: "6px solid transparent",
5339
- borderRight: `6px solid ${x}`
5339
+ borderRight: `6px solid ${f}`
5340
5340
  };
5341
5341
  case "top-left":
5342
5342
  return {
@@ -5347,7 +5347,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5347
5347
  height: 0,
5348
5348
  borderLeft: "6px solid transparent",
5349
5349
  borderRight: "6px solid transparent",
5350
- borderTop: `6px solid ${x}`
5350
+ borderTop: `6px solid ${f}`
5351
5351
  };
5352
5352
  case "top-right":
5353
5353
  return {
@@ -5358,7 +5358,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5358
5358
  height: 0,
5359
5359
  borderLeft: "6px solid transparent",
5360
5360
  borderRight: "6px solid transparent",
5361
- borderTop: `6px solid ${x}`
5361
+ borderTop: `6px solid ${f}`
5362
5362
  };
5363
5363
  case "bottom-left":
5364
5364
  return {
@@ -5369,7 +5369,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5369
5369
  height: 0,
5370
5370
  borderLeft: "6px solid transparent",
5371
5371
  borderRight: "6px solid transparent",
5372
- borderBottom: `6px solid ${x}`
5372
+ borderBottom: `6px solid ${f}`
5373
5373
  };
5374
5374
  case "bottom-right":
5375
5375
  return {
@@ -5380,7 +5380,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5380
5380
  height: 0,
5381
5381
  borderLeft: "6px solid transparent",
5382
5382
  borderRight: "6px solid transparent",
5383
- borderBottom: `6px solid ${x}`
5383
+ borderBottom: `6px solid ${f}`
5384
5384
  };
5385
5385
  case "right-top":
5386
5386
  return {
@@ -5391,7 +5391,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5391
5391
  height: 0,
5392
5392
  borderTop: "6px solid transparent",
5393
5393
  borderBottom: "6px solid transparent",
5394
- borderRight: `6px solid ${x}`
5394
+ borderRight: `6px solid ${f}`
5395
5395
  };
5396
5396
  case "right-bottom":
5397
5397
  return {
@@ -5402,7 +5402,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5402
5402
  height: 0,
5403
5403
  borderTop: "6px solid transparent",
5404
5404
  borderBottom: "6px solid transparent",
5405
- borderRight: `6px solid ${x}`
5405
+ borderRight: `6px solid ${f}`
5406
5406
  };
5407
5407
  case "left-top":
5408
5408
  return {
@@ -5413,7 +5413,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5413
5413
  height: 0,
5414
5414
  borderTop: "6px solid transparent",
5415
5415
  borderBottom: "6px solid transparent",
5416
- borderLeft: `6px solid ${x}`
5416
+ borderLeft: `6px solid ${f}`
5417
5417
  };
5418
5418
  case "left-bottom":
5419
5419
  return {
@@ -5424,26 +5424,26 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5424
5424
  height: 0,
5425
5425
  borderTop: "6px solid transparent",
5426
5426
  borderBottom: "6px solid transparent",
5427
- borderLeft: `6px solid ${x}`
5427
+ borderLeft: `6px solid ${f}`
5428
5428
  };
5429
5429
  default:
5430
5430
  return {};
5431
5431
  }
5432
- }, B = () => {
5432
+ }, T = () => {
5433
5433
  if (!h || l || !k) return null;
5434
5434
  const M = /* @__PURE__ */ u(
5435
5435
  "div",
5436
5436
  {
5437
- ref: F,
5438
- id: a || Y.current,
5437
+ ref: E,
5438
+ id: a || G.current,
5439
5439
  className: U(
5440
5440
  g8(e, L),
5441
5441
  "tooltip",
5442
5442
  c
5443
5443
  ),
5444
5444
  style: {
5445
- top: `${j.top}px`,
5446
- left: `${j.left}px`,
5445
+ top: `${H.top}px`,
5446
+ left: `${H.left}px`,
5447
5447
  ...p
5448
5448
  },
5449
5449
  role: "tooltip",
@@ -5451,27 +5451,27 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5451
5451
  ...g,
5452
5452
  children: [
5453
5453
  r,
5454
- /* @__PURE__ */ i("div", { className: U("tooltip-imj-ui-arrow", d), style: P() })
5454
+ /* @__PURE__ */ i("div", { className: U("tooltip-imj-ui-arrow", d), style: R() })
5455
5455
  ]
5456
5456
  }
5457
5457
  );
5458
5458
  return L ? M : b1(M, document.body);
5459
5459
  };
5460
- return /* @__PURE__ */ u("div", { ref: R, className: L ? "ui-relative" : "", children: [
5460
+ return /* @__PURE__ */ u("div", { ref: F, className: L ? "ui-relative" : "", children: [
5461
5461
  /* @__PURE__ */ i(
5462
5462
  "div",
5463
5463
  {
5464
- ref: z,
5465
- onMouseEnter: v,
5464
+ ref: P,
5465
+ onMouseEnter: x,
5466
5466
  onMouseLeave: b,
5467
- onFocus: v,
5467
+ onFocus: x,
5468
5468
  onBlur: b,
5469
5469
  className: U("ui-inline-block ui-h-fit ui-w-fit", C ? "ui-w-full" : "ui-w-fit"),
5470
5470
  children: o
5471
5471
  }
5472
5472
  ),
5473
- E(),
5474
- B()
5473
+ A(),
5474
+ T()
5475
5475
  ] });
5476
5476
  }, X1 = ({
5477
5477
  children: o,
@@ -5487,7 +5487,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5487
5487
  arrowClassName: p,
5488
5488
  absolute: d = !1,
5489
5489
  ...L
5490
- }) => l || !r ? o : /* @__PURE__ */ i(m8, { ...L, label: r, children: o, position: t, alignment: n, color: e, id: a, delay: s, disabled: l, className: c, style: C, arrowClassName: p, absolute: d }), c1 = (o, r, t, n) => {
5490
+ }) => l || !r ? o : /* @__PURE__ */ i(f8, { ...L, label: r, children: o, position: t, alignment: n, color: e, id: a, delay: s, disabled: l, className: c, style: C, arrowClassName: p, absolute: d }), c1 = (o, r, t, n) => {
5491
5491
  const e = o !== "button", a = {
5492
5492
  button: {
5493
5493
  blue: `ui-bg-blue-500 ui-text-white ${t ?? e ? "ui-border-white" : "ui-border-transparent"} ${r ? "enabled:hover:ui-bg-blue-700 active:enabled:ui-border-blue-300" : ""} disabled:ui-bg-blue-100 disabled:ui-cursor-not-allowed`,
@@ -5572,41 +5572,41 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5572
5572
  textColor: L,
5573
5573
  clickable: g = !0,
5574
5574
  icon: h,
5575
- link: f,
5576
- size: j,
5575
+ link: v,
5576
+ size: H,
5577
5577
  square: m = !1,
5578
5578
  target: w = "_self",
5579
- onClickIcon: V,
5579
+ onClickIcon: O,
5580
5580
  onClickLeftSlot: k,
5581
- onClickRightSlot: O,
5582
- disabled: z,
5583
- colorIcon: F,
5584
- showShadow: R = !1,
5585
- borderable: Z,
5586
- iconSizeExtended: Y = "none",
5587
- defaultSizeIcon: H = !0,
5588
- defaultTooltipColor: v = !0,
5581
+ onClickRightSlot: Z,
5582
+ disabled: P,
5583
+ colorIcon: E,
5584
+ showShadow: F = !1,
5585
+ borderable: y,
5586
+ iconSizeExtended: G = "none",
5587
+ defaultSizeIcon: B = !0,
5588
+ defaultTooltipColor: x = !0,
5589
5589
  as: b = "button",
5590
- classNameId: E = "imj-ui-inner-button",
5591
- tooltip: P = "",
5592
- tooltipPosition: B,
5590
+ classNameId: A = "imj-ui-inner-button",
5591
+ tooltip: R = "",
5592
+ tooltipPosition: T,
5593
5593
  tooltipAlignment: M,
5594
- tooltipColor: x = "neutral",
5595
- tooltipDelay: y,
5596
- classNameTooltip: $,
5597
- stopPropagation: X = !0,
5598
- pointer: I = !1,
5599
- ref: N,
5600
- onClick: T,
5601
- textAlign: n1 = "center",
5602
- whiteBackground: K = !1,
5594
+ tooltipColor: f = "neutral",
5595
+ tooltipDelay: j,
5596
+ classNameTooltip: V,
5597
+ stopPropagation: n1 = !0,
5598
+ pointer: $ = !1,
5599
+ ref: S,
5600
+ onClick: D,
5601
+ textAlign: Q = "center",
5602
+ whiteBackground: q = !1,
5603
5603
  strokeWidth: _ = 2,
5604
- ...Q
5604
+ ...J
5605
5605
  }) => {
5606
- const A = {
5607
- disabled: z
5608
- }, D = a === "icon", J = D ? !0 : H, i1 = D ? "xs" : j, o1 = (x1) => {
5609
- X && x1.stopPropagation(), T && T(x1);
5606
+ const z = {
5607
+ disabled: P
5608
+ }, N = a === "icon", K = N ? !0 : B, i1 = N ? "xs" : H, o1 = (x1) => {
5609
+ n1 && x1.stopPropagation(), D && D(x1);
5610
5610
  }, s1 = d1("", {
5611
5611
  variants: {
5612
5612
  color: {
@@ -5633,20 +5633,20 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5633
5633
  textAlign: "left"
5634
5634
  }
5635
5635
  }), l1 = () => /* @__PURE__ */ u(H1, { children: [
5636
- d && n && /* @__PURE__ */ i(v1, { slot: n, size: j, colorIcon: F, className: o, onClick: k, defaultSizeIcon: J, strokeWidth: _ }),
5636
+ d && n && /* @__PURE__ */ i(v1, { slot: n, size: H, colorIcon: E, className: o, onClick: k, defaultSizeIcon: K, strokeWidth: _ }),
5637
5637
  d && /* @__PURE__ */ u("p", { className: U(
5638
5638
  "ui-leading-none ui-relative ",
5639
5639
  n || e ? "" : "ui-w-full",
5640
- s1({ color: L, textAlign: n1 })
5640
+ s1({ color: L, textAlign: Q })
5641
5641
  ), children: [
5642
5642
  d,
5643
5643
  " "
5644
5644
  ] }),
5645
5645
  s && d && /* @__PURE__ */ i(L8, { color: s, label: l, border: c }),
5646
- !d && h && (typeof h == "string" ? /* @__PURE__ */ i(h1, { strokeWidth: _, name: h, size: a === "icon" ? j : Y !== "none" ? Y : j, color: F, onClick: V }) : h),
5647
- d && e && /* @__PURE__ */ i(v1, { slot: e, size: Y !== "none" ? Y : j, colorIcon: F, className: o, onClick: O, defaultSizeIcon: J, strokeWidth: _ })
5648
- ] }), a1 = m ? "!ui-p-0 ui-flex ui-justify-center ui-items-center" : "", p1 = v ? x || "neutral" : C, m1 = d1(
5649
- `${E} ui-h-fit ui-justify-center ui-flex ui-items-center ui-gap-x-1.5 ui-transition-all ui-duration-300 ui-border-[1.5px] ui-font-bold ui-cursor-default ${R && a !== "icon" ? "ui-shadow-button" : ""} ui-overflow-hidden ${I && D ? "!ui-cursor-pointer" : ""}`,
5646
+ !d && h && (typeof h == "string" ? /* @__PURE__ */ i(h1, { strokeWidth: _, name: h, size: a === "icon" ? H : G !== "none" ? G : H, color: E, onClick: O }) : h),
5647
+ d && e && /* @__PURE__ */ i(v1, { slot: e, size: G !== "none" ? G : H, colorIcon: E, className: o, onClick: Z, defaultSizeIcon: K, strokeWidth: _ })
5648
+ ] }), a1 = m ? "!ui-p-0 ui-flex ui-justify-center ui-items-center" : "", p1 = x ? f || "neutral" : C, f1 = d1(
5649
+ `${A} ui-h-fit ui-justify-center ui-flex ui-items-center ui-gap-x-1.5 ui-transition-all ui-duration-300 ui-border-[1.5px] ui-font-bold ui-cursor-default ${F && a !== "icon" ? "ui-shadow-button" : ""} ui-overflow-hidden ${$ && N ? "!ui-cursor-pointer" : ""}`,
5650
5650
  {
5651
5651
  variants: {
5652
5652
  variant: {
@@ -5666,17 +5666,17 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5666
5666
  "3xl": `ui-max-h-[62px] ui-min-h-[62px] ui-min-w-[62px] ${d ? "ui-px-7 ui-py-3.5" : "ui-p-3.5 ui-w-[62px] ui-flex ui-justify-center ui-items-center"} ui-h-[62px] ui-text-[20px] ${m ? `ui-max-w-[62px] ui-min-h-[62px] ${a1}` : ""}`
5667
5667
  },
5668
5668
  color: {
5669
- blue: c1(a, g, Z, K).blue,
5670
- "blue-dark": c1(a, g, Z, K)["blue-dark"],
5671
- orange: c1(a, g, Z, K).orange,
5672
- red: c1(a, g, Z, K).red,
5673
- green: c1(a, g, Z, K).green,
5674
- white: c1(a, g, Z, K).white,
5675
- yellow: c1(a, g, Z, K).yellow,
5676
- "blue-light": c1(a, g, Z, K)["blue-light"],
5677
- neutral: c1(a, g, Z, K).neutral,
5678
- black: c1(a, g, Z, K).black,
5679
- transparent: c1(a, g, Z, K).transparent
5669
+ blue: c1(a, g, y, q).blue,
5670
+ "blue-dark": c1(a, g, y, q)["blue-dark"],
5671
+ orange: c1(a, g, y, q).orange,
5672
+ red: c1(a, g, y, q).red,
5673
+ green: c1(a, g, y, q).green,
5674
+ white: c1(a, g, y, q).white,
5675
+ yellow: c1(a, g, y, q).yellow,
5676
+ "blue-light": c1(a, g, y, q)["blue-light"],
5677
+ neutral: c1(a, g, y, q).neutral,
5678
+ black: c1(a, g, y, q).black,
5679
+ transparent: c1(a, g, y, q).transparent
5680
5680
  },
5681
5681
  rounded: {
5682
5682
  false: "ui-rounded-sm",
@@ -5702,22 +5702,22 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5702
5702
  variant: a,
5703
5703
  className: U(o)
5704
5704
  });
5705
- return f ? /* @__PURE__ */ i("a", { ref: N, href: f, target: w, className: U(m1, o), children: l1() }) : b === "div" ? /* @__PURE__ */ i(
5705
+ return v ? /* @__PURE__ */ i("a", { ref: S, href: v, target: w, className: U(f1, o), children: l1() }) : b === "div" ? /* @__PURE__ */ i(
5706
5706
  X1,
5707
5707
  {
5708
- label: P,
5709
- position: B,
5708
+ label: R,
5709
+ position: T,
5710
5710
  alignment: M,
5711
5711
  color: p1,
5712
- delay: y,
5713
- className: $,
5712
+ delay: j,
5713
+ className: V,
5714
5714
  fullWidth: t,
5715
5715
  children: /* @__PURE__ */ i(
5716
5716
  "div",
5717
5717
  {
5718
- ref: N,
5719
- className: U(m1, o),
5720
- ...Q,
5718
+ ref: S,
5719
+ className: U(f1, o),
5720
+ ...J,
5721
5721
  children: l1()
5722
5722
  }
5723
5723
  )
@@ -5725,27 +5725,27 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5725
5725
  ) : /* @__PURE__ */ i(
5726
5726
  X1,
5727
5727
  {
5728
- label: P,
5729
- position: B,
5728
+ label: R,
5729
+ position: T,
5730
5730
  alignment: M,
5731
5731
  color: p1,
5732
- delay: y,
5733
- className: $,
5732
+ delay: j,
5733
+ className: V,
5734
5734
  fullWidth: t,
5735
5735
  children: /* @__PURE__ */ i(
5736
5736
  "button",
5737
5737
  {
5738
- ref: N,
5739
- className: U(m1, o),
5740
- ...A,
5741
- ...Q,
5738
+ ref: S,
5739
+ className: U(f1, o),
5740
+ ...z,
5741
+ ...J,
5742
5742
  onClick: o1,
5743
5743
  children: l1()
5744
5744
  }
5745
5745
  )
5746
5746
  }
5747
5747
  );
5748
- }, f8 = ({ title: o, open: r, setOpen: t, className: n, children: e }) => /* @__PURE__ */ u("div", { className: `ui-flex ui-justify-between ui-items-center ${n}`, children: [
5748
+ }, m8 = ({ title: o, open: r, setOpen: t, className: n, children: e }) => /* @__PURE__ */ u("div", { className: `ui-flex ui-justify-between ui-items-center ${n}`, children: [
5749
5749
  /* @__PURE__ */ i("h3", { className: "ui-font-bold ui-text-sm ui-text-neutral-900 ui-leading-none", children: o }),
5750
5750
  /* @__PURE__ */ i(
5751
5751
  e1,
@@ -5766,9 +5766,9 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5766
5766
  children: /* @__PURE__ */ i("div", { className: "ui-bg-gray-50 ui-text-gray-700", children: o })
5767
5767
  }
5768
5768
  ), x8 = ({ title: o, subtitle: r, children: t, id: n, className: e, headerClassName: a, defaultOpen: s = !1 }) => {
5769
- const [l, c] = q(s);
5769
+ const [l, c] = Y(s);
5770
5770
  return /* @__PURE__ */ u("div", { className: `ui-border ui-border-neutral-100 ui-rounded-lg ui-p-2 ui-bg-white ui-overflow-hidden ui-w-full ${e}`, children: [
5771
- /* @__PURE__ */ i(f8, { open: l, title: o, setOpen: c, className: a, children: t }),
5771
+ /* @__PURE__ */ i(m8, { open: l, title: o, setOpen: c, className: a, children: t }),
5772
5772
  /* @__PURE__ */ u(v8, { open: l, children: [
5773
5773
  r && /* @__PURE__ */ i("p", { className: "ui-text-xxs ui-text-neutral-500 ui-leading-none ui-mb-3 ui-mt-1", children: r }),
5774
5774
  /* @__PURE__ */ i("div", { className: "ui-h-[1px] ui-w-full ui-bg-neutral-100 ui-mx-1 ui-my-1.5" }),
@@ -5988,7 +5988,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
5988
5988
  }
5989
5989
  }[o][r]}`;
5990
5990
  }, O8 = ({ open: o, externalIsLeaving: r }) => {
5991
- const [t, n] = q(!1), [e, a] = q(!1), s = r !== void 0 ? r : e;
5991
+ const [t, n] = Y(!1), [e, a] = Y(!1), s = r !== void 0 ? r : e;
5992
5992
  return W(() => {
5993
5993
  o ? (n(!0), a(!1)) : (a(!0), r === void 0 && setTimeout(() => {
5994
5994
  n(!1);
@@ -6099,7 +6099,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
6099
6099
  transparent: "ui-bg-transparent ui-outline-transparent"
6100
6100
  }
6101
6101
  }
6102
- }), f = d1("ui-absolute ui-border-[3px] ui-p-3.5 ui-rounded-full ui-border-white", {
6102
+ }), v = d1("ui-absolute ui-border-[3px] ui-p-3.5 ui-rounded-full ui-border-white", {
6103
6103
  variants: {
6104
6104
  borderStyle: {
6105
6105
  solid: "ui-border-solid",
@@ -6111,7 +6111,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
6111
6111
  return /* @__PURE__ */ u("div", { className: U("ui-flex ui-gap-2 ui-relative ui-w-full ui-p-1", o), children: [
6112
6112
  (d || L) && /* @__PURE__ */ u("div", { className: U(h({ status: r })), children: [
6113
6113
  d && /* @__PURE__ */ i(h1, { name: d, size: "2xl", color: "white", strokeWidth: 4 }),
6114
- /* @__PURE__ */ i("div", { className: U(f({ borderStyle: p })) })
6114
+ /* @__PURE__ */ i("div", { className: U(v({ borderStyle: p })) })
6115
6115
  ] }),
6116
6116
  /* @__PURE__ */ u("div", { className: "ui-flex ui-flex-col ui-gap-1.5 ui-relative ui-w-full", children: [
6117
6117
  /* @__PURE__ */ u("div", { className: "ui-flex ui-items-center ui-gap-2 ui-justify-between", children: [
@@ -6138,15 +6138,15 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
6138
6138
  animation: L = "none",
6139
6139
  isLeaving: g,
6140
6140
  progressBarColor: h = !1,
6141
- duration: f = 3e3
6141
+ duration: v = 3e3
6142
6142
  }) => {
6143
- const { isVisible: j, isLeaving: m } = O8({ open: o, externalIsLeaving: g });
6144
- if (!j)
6143
+ const { isVisible: H, isLeaving: m } = O8({ open: o, externalIsLeaving: g });
6144
+ if (!H)
6145
6145
  return null;
6146
- const w = !!l, V = (k) => {
6146
+ const w = !!l, O = (k) => {
6147
6147
  l && (k.stopPropagation(), l());
6148
6148
  };
6149
- return /* @__PURE__ */ u("div", { className: U("ui-relative ui-overflow-hidden", H8({ type: r, variant: t, isLeaving: m, animation: L }), w ? "ui-hover:ui-brightness-110 ui-transition-all ui-duration-300 ui-ease-in-out ui-cursor-pointer" : ""), onClick: V, children: [
6149
+ return /* @__PURE__ */ u("div", { className: U("ui-relative ui-overflow-hidden", H8({ type: r, variant: t, isLeaving: m, animation: L }), w ? "ui-hover:ui-brightness-110 ui-transition-all ui-duration-300 ui-ease-in-out ui-cursor-pointer" : ""), onClick: O, children: [
6150
6150
  /* @__PURE__ */ u("div", { className: "ui-p-2", children: [
6151
6151
  /* @__PURE__ */ i(
6152
6152
  j8,
@@ -6179,7 +6179,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
6179
6179
  Z8,
6180
6180
  {
6181
6181
  progress: 100,
6182
- duration: f,
6182
+ duration: v,
6183
6183
  color: t === "contained" ? "white" : r,
6184
6184
  showLabel: !1,
6185
6185
  withBackground: !1
@@ -6204,17 +6204,17 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
6204
6204
  children: L,
6205
6205
  icon: g,
6206
6206
  link: h,
6207
- size: f,
6208
- target: j = "_self",
6207
+ size: v,
6208
+ target: H = "_self",
6209
6209
  onClickIcon: m,
6210
6210
  disabled: w,
6211
- colorIcon: V,
6211
+ colorIcon: O,
6212
6212
  tooltip: k,
6213
- tooltipPosition: O,
6214
- tooltipAlignment: z,
6215
- tooltipColor: F,
6216
- tooltipDelay: R,
6217
- ...Z
6213
+ tooltipPosition: Z,
6214
+ tooltipAlignment: P,
6215
+ tooltipColor: E,
6216
+ tooltipDelay: F,
6217
+ ...y
6218
6218
  }) => /* @__PURE__ */ i(
6219
6219
  e1,
6220
6220
  {
@@ -6223,7 +6223,7 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
6223
6223
  color: p,
6224
6224
  rounded: d,
6225
6225
  fullWidth: t,
6226
- size: f,
6226
+ size: v,
6227
6227
  clickable: C,
6228
6228
  children: L,
6229
6229
  icon: g,
@@ -6233,17 +6233,17 @@ const L8 = ({ label: o, color: r = "blue", border: t = !1, className: n, ...e })
6233
6233
  slotLeft: n,
6234
6234
  slotRight: e,
6235
6235
  link: h,
6236
- target: j,
6236
+ target: H,
6237
6237
  onClickIcon: m,
6238
6238
  disabled: w,
6239
- colorIcon: V,
6239
+ colorIcon: O,
6240
6240
  className: r,
6241
6241
  tooltip: k,
6242
- tooltipPosition: O,
6243
- tooltipAlignment: z,
6244
- tooltipColor: F,
6245
- tooltipDelay: R,
6246
- ...Z
6242
+ tooltipPosition: Z,
6243
+ tooltipAlignment: P,
6244
+ tooltipColor: E,
6245
+ tooltipDelay: F,
6246
+ ...y
6247
6247
  }
6248
6248
  ), q3 = ({ children: o, className: r, variant: t = "outlined", color: n = "white", size: e = "md" }) => {
6249
6249
  const a = w1.Children.toArray(o), s = w1.Children.map(o, (l, c) => {
@@ -6288,7 +6288,7 @@ const I8 = (o) => {
6288
6288
  initialViewMode: e = "days",
6289
6289
  closeOnSelect: a = !1,
6290
6290
  autoCloseRange: s = !0
6291
- } = o, [l, c] = q({
6291
+ } = o, [l, c] = Y({
6292
6292
  isOpen: !1,
6293
6293
  currentDate: /* @__PURE__ */ new Date(),
6294
6294
  viewMode: e,
@@ -6296,162 +6296,162 @@ const I8 = (o) => {
6296
6296
  internalRange: { start: null, end: null },
6297
6297
  hoverDate: null,
6298
6298
  portalPosition: { top: 0, left: 0 }
6299
- }), [C, p] = q(!1), d = t1(null), L = r === "single" ? t !== void 0 : n !== void 0, g = r === "single" ? t == null : n === void 0, h = r === "single" ? g ? l.internalDate : t : null, f = r === "range" ? g ? l.internalRange : n : { start: null, end: null }, j = S(() => {
6299
+ }), [C, p] = Y(!1), d = t1(null), L = r === "single" ? t !== void 0 : n !== void 0, g = r === "single" ? t == null : n === void 0, h = r === "single" ? g ? l.internalDate : t : null, v = r === "range" ? g ? l.internalRange : n : { start: null, end: null }, H = I(() => {
6300
6300
  if (d.current) {
6301
- const v = d.current.getInputElement();
6302
- if (v) {
6303
- const b = v.getBoundingClientRect(), E = window.innerHeight, P = window.innerWidth, B = 320, M = 256, x = 8;
6304
- let y, $ = b.left;
6305
- const X = E - b.bottom, I = b.top;
6306
- X >= B + x ? y = b.bottom + x : I >= B + x ? y = b.top - B + x : X > I ? y = b.bottom + x : y = b.top - B + x, b.left + M > P && ($ = b.right - M), $ = Math.max(0, Math.min($, P - M)), c((N) => ({
6307
- ...N,
6301
+ const x = d.current.getInputElement();
6302
+ if (x) {
6303
+ const b = x.getBoundingClientRect(), A = window.innerHeight, R = window.innerWidth, T = 320, M = 256, f = 8;
6304
+ let j, V = b.left;
6305
+ const n1 = A - b.bottom, $ = b.top;
6306
+ n1 >= T + f ? j = b.bottom + f : $ >= T + f ? j = b.top - T + f : n1 > $ ? j = b.bottom + f : j = b.top - T + f, b.left + M > R && (V = b.right - M), V = Math.max(0, Math.min(V, R - M)), c((S) => ({
6307
+ ...S,
6308
6308
  isOpen: !0,
6309
- portalPosition: { top: y, left: $ }
6309
+ portalPosition: { top: j, left: V }
6310
6310
  })), p(!0);
6311
6311
  return;
6312
6312
  }
6313
6313
  }
6314
- c((v) => ({ ...v, isOpen: !0 })), p(!1);
6315
- }, []), m = S(() => {
6316
- c((v) => ({ ...v, isOpen: !1 })), p(!1);
6317
- }, []), w = S((v) => {
6318
- c((b) => ({ ...b, currentDate: v }));
6319
- }, []), V = S((v) => {
6320
- c((b) => ({ ...b, viewMode: v }));
6321
- }, []), k = S((v) => {
6314
+ c((x) => ({ ...x, isOpen: !0 })), p(!1);
6315
+ }, []), m = I(() => {
6316
+ c((x) => ({ ...x, isOpen: !1 })), p(!1);
6317
+ }, []), w = I((x) => {
6318
+ c((b) => ({ ...b, currentDate: x }));
6319
+ }, []), O = I((x) => {
6320
+ c((b) => ({ ...b, viewMode: x }));
6321
+ }, []), k = I((x) => {
6322
6322
  c((b) => {
6323
- const E = new Date(b.currentDate);
6323
+ const A = new Date(b.currentDate);
6324
6324
  switch (b.viewMode) {
6325
6325
  case "days":
6326
- E.setMonth(E.getMonth() + (v === "next" ? 1 : -1));
6326
+ A.setMonth(A.getMonth() + (x === "next" ? 1 : -1));
6327
6327
  break;
6328
6328
  case "months":
6329
- E.setFullYear(E.getFullYear() + (v === "next" ? 1 : -1));
6329
+ A.setFullYear(A.getFullYear() + (x === "next" ? 1 : -1));
6330
6330
  break;
6331
6331
  case "years":
6332
- E.setFullYear(E.getFullYear() + (v === "next" ? 12 : -12));
6332
+ A.setFullYear(A.getFullYear() + (x === "next" ? 12 : -12));
6333
6333
  break;
6334
6334
  }
6335
- return { ...b, currentDate: E };
6335
+ return { ...b, currentDate: A };
6336
6336
  });
6337
- }, []), O = S((v) => {
6337
+ }, []), Z = I((x) => {
6338
6338
  var b;
6339
- r === "single" && (g && c((E) => ({ ...E, internalDate: v })), (b = o.onDateChange) == null || b.call(o, v), a && m());
6340
- }, [r, g, o.onDateChange, a, m]), z = S((v) => {
6339
+ r === "single" && (g && c((A) => ({ ...A, internalDate: x })), (b = o.onDateChange) == null || b.call(o, x), a && m());
6340
+ }, [r, g, o.onDateChange, a, m]), P = I((x) => {
6341
6341
  var b;
6342
- r === "range" && (L || c((E) => ({ ...E, internalRange: v })), (b = o.onRangeChange) == null || b.call(o, v), s && v.start && v.end && m());
6343
- }, [r, L, o.onRangeChange, s, m]), F = S((v) => {
6344
- c((b) => ({ ...b, hoverDate: v }));
6345
- }, []), R = S((v) => {
6342
+ r === "range" && (L || c((A) => ({ ...A, internalRange: x })), (b = o.onRangeChange) == null || b.call(o, x), s && x.start && x.end && m());
6343
+ }, [r, L, o.onRangeChange, s, m]), E = I((x) => {
6344
+ c((b) => ({ ...b, hoverDate: x }));
6345
+ }, []), F = I((x) => {
6346
6346
  c((b) => {
6347
- const E = new Date(b.currentDate);
6348
- return E.setMonth(v), {
6347
+ const A = new Date(b.currentDate);
6348
+ return A.setMonth(x), {
6349
6349
  ...b,
6350
- currentDate: E,
6350
+ currentDate: A,
6351
6351
  viewMode: "days"
6352
6352
  };
6353
6353
  });
6354
- }, []), Z = S((v) => {
6354
+ }, []), y = I((x) => {
6355
6355
  c((b) => {
6356
- const E = new Date(b.currentDate);
6357
- return E.setFullYear(v), {
6356
+ const A = new Date(b.currentDate);
6357
+ return A.setFullYear(x), {
6358
6358
  ...b,
6359
- currentDate: E,
6359
+ currentDate: A,
6360
6360
  viewMode: "months"
6361
6361
  };
6362
6362
  });
6363
- }, []), Y = S(() => {
6364
- const v = /* @__PURE__ */ new Date();
6363
+ }, []), G = I(() => {
6364
+ const x = /* @__PURE__ */ new Date();
6365
6365
  c((b) => ({
6366
6366
  ...b,
6367
- currentDate: v,
6367
+ currentDate: x,
6368
6368
  viewMode: "days"
6369
6369
  }));
6370
- }, []), H = S(() => {
6370
+ }, []), B = I(() => {
6371
6371
  if (!d.current)
6372
6372
  return;
6373
- const v = d.current.getInputElement();
6374
- if (!v)
6373
+ const x = d.current.getInputElement();
6374
+ if (!x)
6375
6375
  return;
6376
- const b = v.getBoundingClientRect(), E = window.innerHeight, P = window.innerWidth, B = 320, M = 256, x = 8;
6377
- let y, $ = b.left;
6378
- const X = E - b.bottom, I = b.top;
6379
- X >= B + x ? y = b.bottom + x : I >= B + x ? y = b.top - B + x : X > I ? y = b.bottom + x : y = b.top - B + x, b.left + M > P && ($ = b.right - M), $ = Math.max(0, Math.min($, P - M)), c((N) => ({ ...N, portalPosition: { top: y, left: $ } })), p(!0);
6376
+ const b = x.getBoundingClientRect(), A = window.innerHeight, R = window.innerWidth, T = 320, M = 256, f = 8;
6377
+ let j, V = b.left;
6378
+ const n1 = A - b.bottom, $ = b.top;
6379
+ n1 >= T + f ? j = b.bottom + f : $ >= T + f ? j = b.top - T + f : n1 > $ ? j = b.bottom + f : j = b.top - T + f, b.left + M > R && (V = b.right - M), V = Math.max(0, Math.min(V, R - M)), c((S) => ({ ...S, portalPosition: { top: j, left: V } })), p(!0);
6380
6380
  }, []);
6381
6381
  return W(() => {
6382
6382
  if (!l.isOpen) return;
6383
- const v = () => H(), b = () => H();
6384
- return window.addEventListener("scroll", v, !0), window.addEventListener("resize", b), () => {
6385
- window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", b);
6383
+ const x = () => B(), b = () => B();
6384
+ return window.addEventListener("scroll", x, !0), window.addEventListener("resize", b), () => {
6385
+ window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", b);
6386
6386
  };
6387
- }, [l.isOpen, H]), W(() => {
6387
+ }, [l.isOpen, B]), W(() => {
6388
6388
  if (l.isOpen) {
6389
- const v = setTimeout(() => {
6390
- H();
6389
+ const x = setTimeout(() => {
6390
+ B();
6391
6391
  }, 0);
6392
- return () => clearTimeout(v);
6392
+ return () => clearTimeout(x);
6393
6393
  }
6394
- }, [l.isOpen, H]), {
6394
+ }, [l.isOpen, B]), {
6395
6395
  state: l,
6396
6396
  selectedDate: h,
6397
- selectedRange: f,
6397
+ selectedRange: v,
6398
6398
  inputRef: d,
6399
6399
  isPortalReady: C,
6400
6400
  actions: {
6401
- openPicker: j,
6401
+ openPicker: H,
6402
6402
  closePicker: m,
6403
6403
  setCurrentDate: w,
6404
- setViewMode: V,
6405
- setSelectedDate: O,
6406
- setSelectedRange: z,
6407
- setHoverDate: F,
6408
- updatePortalPosition: H,
6404
+ setViewMode: O,
6405
+ setSelectedDate: Z,
6406
+ setSelectedRange: P,
6407
+ setHoverDate: E,
6408
+ updatePortalPosition: B,
6409
6409
  navigate: k,
6410
- handleMonthSelect: R,
6411
- handleYearSelect: Z,
6412
- goToToday: Y
6410
+ handleMonthSelect: F,
6411
+ handleYearSelect: y,
6412
+ goToToday: G
6413
6413
  }
6414
6414
  };
6415
6415
  }, r0 = (o, r, t, n, e) => {
6416
- const a = S((d, L) => !L.start || !L.end ? !1 : d >= L.start && d <= L.end, []), s = S((d, L) => L.start ? d.getTime() === L.start.getTime() : !1, []), l = S((d, L) => L.end ? d.getTime() === L.end.getTime() : !1, []), c = S((d) => !!(t && d < t || n && d > n), [t, n]), C = S((d, L, g) => {
6416
+ const a = I((d, L) => !L.start || !L.end ? !1 : d >= L.start && d <= L.end, []), s = I((d, L) => L.start ? d.getTime() === L.start.getTime() : !1, []), l = I((d, L) => L.end ? d.getTime() === L.end.getTime() : !1, []), c = I((d) => !!(t && d < t || n && d > n), [t, n]), C = I((d, L, g) => {
6417
6417
  if (c(d)) return;
6418
6418
  const h = { ...o };
6419
6419
  !o.start || o.start && o.end ? (h.start = d, h.end = null) : d < o.start ? (h.start = d, h.end = o.start) : (h.start = o.start, h.end = d), r(h), e && h.start && h.end && g && g();
6420
- }, [o, r, c, e]), p = S((d, L) => {
6421
- const g = s(d, o), h = l(d, o), f = a(d, o), j = c(d);
6420
+ }, [o, r, c, e]), p = I((d, L) => {
6421
+ const g = s(d, o), h = l(d, o), v = a(d, o), H = c(d);
6422
6422
  let m = !1;
6423
6423
  if (L && o.start && !o.end) {
6424
- const O = {
6424
+ const Z = {
6425
6425
  start: o.start < L ? o.start : L,
6426
6426
  end: o.start < L ? L : o.start
6427
6427
  };
6428
- m = a(d, O);
6428
+ m = a(d, Z);
6429
6429
  }
6430
6430
  let w = !1;
6431
- if (o.start && o.end && f && !g) {
6432
- const O = new Date(d);
6433
- O.setDate(d.getDate() - 1), w = !a(O, o);
6431
+ if (o.start && o.end && v && !g) {
6432
+ const Z = new Date(d);
6433
+ Z.setDate(d.getDate() - 1), w = !a(Z, o);
6434
6434
  } else if (o.start && !o.end && L && m) {
6435
- const O = new Date(d);
6436
- O.setDate(d.getDate() - 1);
6437
- const z = {
6435
+ const Z = new Date(d);
6436
+ Z.setDate(d.getDate() - 1);
6437
+ const P = {
6438
6438
  start: o.start < L ? o.start : L,
6439
6439
  end: o.start < L ? L : o.start
6440
6440
  };
6441
- w = !a(O, z);
6441
+ w = !a(Z, P);
6442
6442
  }
6443
- let V = !1;
6444
- if (o.start && o.end && f && !h) {
6445
- const O = new Date(d);
6446
- O.setDate(d.getDate() + 1), V = !a(O, o);
6443
+ let O = !1;
6444
+ if (o.start && o.end && v && !h) {
6445
+ const Z = new Date(d);
6446
+ Z.setDate(d.getDate() + 1), O = !a(Z, o);
6447
6447
  } else if (o.start && !o.end && L && m) {
6448
- const O = new Date(d);
6449
- O.setDate(d.getDate() + 1);
6450
- const z = {
6448
+ const Z = new Date(d);
6449
+ Z.setDate(d.getDate() + 1);
6450
+ const P = {
6451
6451
  start: o.start < L ? o.start : L,
6452
6452
  end: o.start < L ? L : o.start
6453
6453
  };
6454
- V = !a(O, z);
6454
+ O = !a(Z, P);
6455
6455
  }
6456
6456
  let k = !0;
6457
6457
  return o.start && !o.end && L ? k = L >= o.start : o.start && o.end && (k = d >= o.start), {
@@ -6459,11 +6459,11 @@ const I8 = (o) => {
6459
6459
  isSelectingEnd: !!o.start && !o.end,
6460
6460
  isStart: g,
6461
6461
  isEnd: h,
6462
- isInRange: f,
6462
+ isInRange: v,
6463
6463
  isFirstInRange: w,
6464
- isLastInRange: V,
6464
+ isLastInRange: O,
6465
6465
  afterSelected: k,
6466
- isDisabled: j,
6466
+ isDisabled: H,
6467
6467
  isHovered: m
6468
6468
  };
6469
6469
  }, [o, s, l, a, c]);
@@ -6476,7 +6476,7 @@ const I8 = (o) => {
6476
6476
  getRangeState: p
6477
6477
  };
6478
6478
  }, S1 = (o, r, t) => {
6479
- const n = S((p) => {
6479
+ const n = I((p) => {
6480
6480
  const d = new Date(o);
6481
6481
  switch (p) {
6482
6482
  case "prev":
@@ -6487,35 +6487,35 @@ const I8 = (o) => {
6487
6487
  break;
6488
6488
  }
6489
6489
  r(p);
6490
- }, [o, r]), e = S((p) => {
6491
- const d = p.getFullYear(), L = p.getMonth(), g = new Date(d, L, 1), h = new Date(d, L + 1, 0), f = h.getDate(), j = g.getDay();
6492
- return { firstDay: g, lastDay: h, daysInMonth: f, startOfWeek: j };
6493
- }, []), a = S((p, d = 1) => {
6494
- const { firstDay: L, lastDay: g, daysInMonth: h, startOfWeek: f } = e(p), j = [], m = (f - d + 7) % 7;
6495
- for (let V = 0; V < m; V++)
6496
- j.push(null);
6497
- for (let V = 1; V <= h; V++)
6498
- j.push(V);
6499
- const w = (7 - j.length % 7) % 7;
6500
- for (let V = 0; V < w; V++)
6501
- j.push(null);
6502
- return j;
6503
- }, [e]), s = S((p = "es-ES") => {
6490
+ }, [o, r]), e = I((p) => {
6491
+ const d = p.getFullYear(), L = p.getMonth(), g = new Date(d, L, 1), h = new Date(d, L + 1, 0), v = h.getDate(), H = g.getDay();
6492
+ return { firstDay: g, lastDay: h, daysInMonth: v, startOfWeek: H };
6493
+ }, []), a = I((p, d = 1) => {
6494
+ const { firstDay: L, lastDay: g, daysInMonth: h, startOfWeek: v } = e(p), H = [], m = (v - d + 7) % 7;
6495
+ for (let O = 0; O < m; O++)
6496
+ H.push(null);
6497
+ for (let O = 1; O <= h; O++)
6498
+ H.push(O);
6499
+ const w = (7 - H.length % 7) % 7;
6500
+ for (let O = 0; O < w; O++)
6501
+ H.push(null);
6502
+ return H;
6503
+ }, [e]), s = I((p = "es-ES") => {
6504
6504
  const d = [];
6505
6505
  for (let L = 0; L < 12; L++) {
6506
6506
  const g = new Date(2024, L, 1);
6507
6507
  d.push(g.toLocaleDateString(p, { month: "long" }));
6508
6508
  }
6509
6509
  return d;
6510
- }, []), l = S((p, d = 12) => {
6510
+ }, []), l = I((p, d = 12) => {
6511
6511
  const L = [], g = p - Math.floor(d / 2);
6512
6512
  for (let h = 0; h < d; h++)
6513
6513
  L.push(g + h);
6514
6514
  return L;
6515
- }, []), c = S((p) => {
6515
+ }, []), c = I((p) => {
6516
6516
  const d = /* @__PURE__ */ new Date();
6517
6517
  return p.getDate() === d.getDate() && p.getMonth() === d.getMonth() && p.getFullYear() === d.getFullYear();
6518
- }, []), C = S((p, d) => p.toLocaleDateString("es-ES", d), []);
6518
+ }, []), C = I((p, d) => p.toLocaleDateString("es-ES", d), []);
6519
6519
  return {
6520
6520
  navigate: n,
6521
6521
  getDaysInMonth: e,
@@ -6526,28 +6526,28 @@ const I8 = (o) => {
6526
6526
  formatDate: C
6527
6527
  };
6528
6528
  }, Y3 = (o = "", r = "dd/MM/yyyy", t = "es-ES") => {
6529
- const [n, e] = q({
6529
+ const [n, e] = Y({
6530
6530
  isFocused: !1,
6531
6531
  inputValue: o
6532
- }), a = S((g) => {
6532
+ }), a = I((g) => {
6533
6533
  e((h) => ({ ...h, isFocused: g }));
6534
- }, []), s = S((g) => {
6534
+ }, []), s = I((g) => {
6535
6535
  e((h) => ({ ...h, inputValue: g }));
6536
- }, []), l = S((g, h) => {
6536
+ }, []), l = I((g, h) => {
6537
6537
  if (!g) return "";
6538
- const f = g.getDate().toString().padStart(2, "0"), j = (g.getMonth() + 1).toString().padStart(2, "0"), m = g.getFullYear();
6539
- return h.format.replace("dd", f).replace("MM", j).replace("yyyy", m.toString());
6540
- }, []), c = S((g, h) => {
6538
+ const v = g.getDate().toString().padStart(2, "0"), H = (g.getMonth() + 1).toString().padStart(2, "0"), m = g.getFullYear();
6539
+ return h.format.replace("dd", v).replace("MM", H).replace("yyyy", m.toString());
6540
+ }, []), c = I((g, h) => {
6541
6541
  if (!g) return null;
6542
- const f = h.replace("dd", "(\\d{2})").replace("MM", "(\\d{2})").replace("yyyy", "(\\d{4})"), j = new RegExp(`^${f}$`), m = g.match(j);
6542
+ const v = h.replace("dd", "(\\d{2})").replace("MM", "(\\d{2})").replace("yyyy", "(\\d{4})"), H = new RegExp(`^${v}$`), m = g.match(H);
6543
6543
  if (!m) return null;
6544
- const [, w, V, k] = m, O = new Date(parseInt(k), parseInt(V) - 1, parseInt(w));
6545
- return isNaN(O.getTime()) ? null : O;
6546
- }, []), C = S((g, h) => c(g, h) !== null, [c]), p = S((g) => {
6544
+ const [, w, O, k] = m, Z = new Date(parseInt(k), parseInt(O) - 1, parseInt(w));
6545
+ return isNaN(Z.getTime()) ? null : Z;
6546
+ }, []), C = I((g, h) => c(g, h) !== null, [c]), p = I((g) => {
6547
6547
  s(g);
6548
- }, [s]), d = S(() => {
6548
+ }, [s]), d = I(() => {
6549
6549
  a(!0);
6550
- }, [a]), L = S(() => {
6550
+ }, [a]), L = I(() => {
6551
6551
  a(!1);
6552
6552
  }, [a]);
6553
6553
  return {
@@ -6562,9 +6562,9 @@ const I8 = (o) => {
6562
6562
  handleInputBlur: L
6563
6563
  };
6564
6564
  }, B8 = (o, r, t) => {
6565
- const n = t1(null), e = S((l) => {
6565
+ const n = t1(null), e = I((l) => {
6566
6566
  n.current && !n.current.contains(l.target) && r();
6567
- }, [r]), a = S((l) => {
6567
+ }, [r]), a = I((l) => {
6568
6568
  l.key === "Escape" && r();
6569
6569
  }, [r]);
6570
6570
  W(() => {
@@ -6573,7 +6573,7 @@ const I8 = (o) => {
6573
6573
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", a);
6574
6574
  };
6575
6575
  }, [o, e, a]);
6576
- const s = S((l) => o ? b1(
6576
+ const s = I((l) => o ? b1(
6577
6577
  w1.createElement("div", {
6578
6578
  ref: n,
6579
6579
  style: {
@@ -6606,25 +6606,25 @@ const I8 = (o) => {
6606
6606
  onClick: L,
6607
6607
  onMouseEnter: g,
6608
6608
  onMouseLeave: h,
6609
- className: f = "",
6610
- renderDay: j
6609
+ className: v = "",
6610
+ renderDay: H
6611
6611
  }) => {
6612
6612
  const m = t1(null);
6613
6613
  if (o === null)
6614
6614
  return /* @__PURE__ */ i("div", { className: "ui-w-8 ui-h-8" });
6615
6615
  const w = () => {
6616
6616
  C || L(r);
6617
- }, V = () => {
6617
+ }, O = () => {
6618
6618
  !C && g && (m.current && (clearTimeout(m.current), m.current = null), g(r));
6619
6619
  }, k = () => {
6620
6620
  !C && h && (t || n || e || a ? m.current = setTimeout(() => {
6621
6621
  h(), m.current = null;
6622
6622
  }, 100) : h());
6623
- }, O = () => {
6624
- let z = `ui-w-8 ui-h-8 ui-flex ui-items-center ui-select-none ui-justify-center ui-font-medium ${!l && !n && !s ? "hover:ui-bg-blue-50 hover:ui-text-blue-500 hover:ui-rounded-lg hover:ui-cursor-pointer" : ""} ui-text-xs ui-transition-colors ui-transition-500`;
6625
- return C ? z += " ui-text-gray-400 ui-cursor-not-allowed" : t ? z += " ui-bg-blue-500 ui-text-white" : e ? z += ` ui-bg-blue-500 ui-text-white ${c ? "ui-rounded-l-lg" : "ui-rounded-r-lg"}` : a ? z += ` ui-bg-blue-500 ui-text-white ${c ? "ui-rounded-r-lg" : "ui-rounded-l-lg"}` : n ? z += " ui-bg-blue-50 ui-text-blue-500" : d ? z += " ui-bg-blue-50" : p ? z += " ui-text-blue-500" : z += "hover:ui-bg-neutral-50", `${z} ${f}`;
6623
+ }, Z = () => {
6624
+ let P = `ui-w-8 ui-h-8 ui-flex ui-items-center ui-select-none ui-justify-center ui-font-medium ${!l && !n && !s ? "hover:ui-bg-blue-50 hover:ui-text-blue-500 hover:ui-rounded-lg hover:ui-cursor-pointer" : ""} ui-text-xs ui-transition-colors ui-transition-500`;
6625
+ return C ? P += " ui-text-gray-400 ui-cursor-not-allowed" : t ? P += " ui-bg-blue-500 ui-text-white" : e ? P += ` ui-bg-blue-500 ui-text-white ${c ? "ui-rounded-l-lg" : "ui-rounded-r-lg"}` : a ? P += ` ui-bg-blue-500 ui-text-white ${c ? "ui-rounded-r-lg" : "ui-rounded-l-lg"}` : n ? P += " ui-bg-blue-50 ui-text-blue-500" : d ? P += " ui-bg-blue-50" : p ? P += " ui-text-blue-500" : P += "hover:ui-bg-neutral-50", `${P} ${v}`;
6626
6626
  };
6627
- return j ? j({
6627
+ return H ? H({
6628
6628
  day: o,
6629
6629
  date: r,
6630
6630
  isSelected: t,
@@ -6639,9 +6639,9 @@ const I8 = (o) => {
6639
6639
  }) : /* @__PURE__ */ i(
6640
6640
  "div",
6641
6641
  {
6642
- className: O(),
6642
+ className: Z(),
6643
6643
  onClick: w,
6644
- onMouseEnter: V,
6644
+ onMouseEnter: O,
6645
6645
  onMouseLeave: k,
6646
6646
  role: "button",
6647
6647
  tabIndex: C ? -1 : 0,
@@ -6839,20 +6839,20 @@ const I8 = (o) => {
6839
6839
  }) => {
6840
6840
  const { getCalendarDays: L, isToday: g } = S1(o, () => {
6841
6841
  }), { getRangeState: h } = r0(t || { start: null, end: null }, () => {
6842
- }, a, s), f = (w) => r ? w.getTime() === r.getTime() : !1, j = (w) => !!(a && w < a || s && w > s), m = L(o, c);
6842
+ }, a, s), v = (w) => r ? w.getTime() === r.getTime() : !1, H = (w) => !!(a && w < a || s && w > s), m = L(o, c);
6843
6843
  return /* @__PURE__ */ u("div", { className: "ui-grid ui-grid-cols-7 ui-w-fit ui-gap-y-0.5", children: [
6844
- l.map((w, V) => /* @__PURE__ */ i(N8, { day: w }, V)),
6845
- m.map((w, V) => {
6844
+ l.map((w, O) => /* @__PURE__ */ i(N8, { day: w }, O)),
6845
+ m.map((w, O) => {
6846
6846
  if (w === null)
6847
- return /* @__PURE__ */ i("div", { className: "ui-w-8 ui-h-8" }, V);
6848
- const k = new Date(o.getFullYear(), o.getMonth(), w), O = t ? h(k, p || null) : {
6847
+ return /* @__PURE__ */ i("div", { className: "ui-w-8 ui-h-8" }, O);
6848
+ const k = new Date(o.getFullYear(), o.getMonth(), w), Z = t ? h(k, p || null) : {
6849
6849
  isStart: !1,
6850
6850
  isEnd: !1,
6851
6851
  isInRange: !1,
6852
6852
  isFirstInRange: !1,
6853
6853
  isLastInRange: !1,
6854
6854
  afterSelected: !0,
6855
- isDisabled: j(k),
6855
+ isDisabled: H(k),
6856
6856
  isHovered: !1
6857
6857
  };
6858
6858
  return /* @__PURE__ */ i(
@@ -6860,22 +6860,22 @@ const I8 = (o) => {
6860
6860
  {
6861
6861
  day: w,
6862
6862
  date: k,
6863
- isSelected: f(k),
6864
- isInRange: O.isInRange,
6865
- isStart: O.isStart,
6866
- isEnd: O.isEnd,
6867
- isFirstInRange: O.isFirstInRange,
6868
- isLastInRange: O.isLastInRange,
6869
- afterSelected: O.afterSelected,
6870
- isDisabled: O.isDisabled,
6863
+ isSelected: v(k),
6864
+ isInRange: Z.isInRange,
6865
+ isStart: Z.isStart,
6866
+ isEnd: Z.isEnd,
6867
+ isFirstInRange: Z.isFirstInRange,
6868
+ isLastInRange: Z.isLastInRange,
6869
+ afterSelected: Z.afterSelected,
6870
+ isDisabled: Z.isDisabled,
6871
6871
  isToday: g(k),
6872
- isHovered: O.isHovered,
6872
+ isHovered: Z.isHovered,
6873
6873
  onClick: n,
6874
6874
  onMouseEnter: e,
6875
6875
  onMouseLeave: () => e == null ? void 0 : e(null),
6876
6876
  renderDay: d
6877
6877
  },
6878
- V
6878
+ O
6879
6879
  );
6880
6880
  })
6881
6881
  ] });
@@ -6932,9 +6932,9 @@ const I8 = (o) => {
6932
6932
  l
6933
6933
  )) });
6934
6934
  }, D8 = (o) => {
6935
- const { value: r, defaultValue: t, onChange: n, initialValue: e } = o, a = r !== void 0, s = t !== void 0 ? t : e, [l, c] = q(s), C = a ? r : l, p = S((L) => {
6935
+ const { value: r, defaultValue: t, onChange: n, initialValue: e } = o, a = r !== void 0, s = t !== void 0 ? t : e, [l, c] = Y(s), C = a ? r : l, p = I((L) => {
6936
6936
  a || c(L), n == null || n(L);
6937
- }, [a, n]), d = S(() => {
6937
+ }, [a, n]), d = I(() => {
6938
6938
  const L = t !== void 0 ? t : e;
6939
6939
  a || c(L), n == null || n(L);
6940
6940
  }, [a, t, e, n]);
@@ -6952,7 +6952,7 @@ const I8 = (o) => {
6952
6952
  rightSlot: t,
6953
6953
  extraSlot: n
6954
6954
  }) => {
6955
- const e = !!r, a = !!t, s = !!n, l = f1(() => {
6955
+ const e = !!r, a = !!t, s = !!n, l = m1(() => {
6956
6956
  const p = {
6957
6957
  sm: {
6958
6958
  left: e ? "ui-pl-7.5" : "ui-pl-2",
@@ -6968,7 +6968,7 @@ const I8 = (o) => {
6968
6968
  }
6969
6969
  }[o];
6970
6970
  return `${p.left} ${p.right}`.trim();
6971
- }, [o, e, a, s]), c = f1(() => (C) => C === "left" ? {
6971
+ }, [o, e, a, s]), c = m1(() => (C) => C === "left" ? {
6972
6972
  sm: "ui-left-2",
6973
6973
  md: "ui-left-2.5",
6974
6974
  lg: "ui-left-4"
@@ -6999,18 +6999,18 @@ const I8 = (o) => {
6999
6999
  isControlled: n,
7000
7000
  inputId: e
7001
7001
  }) => {
7002
- const a = S(() => {
7002
+ const a = I(() => {
7003
7003
  const d = e || "default-input";
7004
7004
  return document.querySelector(`input[data-input-id="${d}"]`);
7005
- }, [e]), s = S(() => {
7005
+ }, [e]), s = I(() => {
7006
7006
  const d = a();
7007
7007
  d == null || d.focus();
7008
- }, [a]), l = S(() => {
7008
+ }, [a]), l = I(() => {
7009
7009
  const d = a();
7010
7010
  d == null || d.blur();
7011
- }, [a]), c = S(() => {
7011
+ }, [a]), c = I(() => {
7012
7012
  t("");
7013
- }, [t]), C = S(() => r, [r]), p = S((d) => {
7013
+ }, [t]), C = I(() => r, [r]), p = I((d) => {
7014
7014
  t(d);
7015
7015
  }, [t]);
7016
7016
  return U1(o, () => ({
@@ -7036,11 +7036,11 @@ const I8 = (o) => {
7036
7036
  paddingClasses: a,
7037
7037
  autosize: s = !1
7038
7038
  }) => {
7039
- const l = f1(() => ({
7039
+ const l = m1(() => ({
7040
7040
  sm: "ui-h-8 ui-text-sm ui-py-1.5",
7041
7041
  md: "ui-h-10 ui-text-sm ui-py-2",
7042
7042
  lg: "ui-h-12 ui-text-base ui-py-2.5"
7043
- }), []), c = f1(() => {
7043
+ }), []), c = m1(() => {
7044
7044
  const d = [
7045
7045
  n ? "ui-w-full" : "ui-min-w-72",
7046
7046
  "ui-border-1 ui-!font-normal ui-border-neutral-100 ui-rounded-sm",
@@ -7053,10 +7053,10 @@ const I8 = (o) => {
7053
7053
  r ? "ui-bg-red-50" : "ui-bg-white"
7054
7054
  ];
7055
7055
  return r ? d.push("ui-border-red-500 focus-visible:ui-outline-red-500 placeholder:ui-text-red-500") : d.push("placeholder:ui-text-neutral-500"), d.filter(Boolean).join(" ");
7056
- }, [n, a, e, l, o, r]), C = f1(() => {
7056
+ }, [n, a, e, l, o, r]), C = m1(() => {
7057
7057
  const d = ["ui-relative ui-w-full"];
7058
7058
  return t ? d.push("ui-text-neutral-500") : r && d.push("ui-text-red-500"), d.join(" ");
7059
- }, [t, r]), p = f1(() => {
7059
+ }, [t, r]), p = m1(() => {
7060
7060
  const d = "ui-text-sm ui-font-bold";
7061
7061
  return r ? `${d} ui-text-red-500` : `${d} ui-text-neutral-900`;
7062
7062
  }, [r]);
@@ -7082,81 +7082,81 @@ const I8 = (o) => {
7082
7082
  disabled: L = !1,
7083
7083
  onValueChange: g,
7084
7084
  onChange: h,
7085
- onClickExtraSlot: f,
7086
- className: j,
7085
+ onClickExtraSlot: v,
7086
+ className: H,
7087
7087
  style: m,
7088
7088
  name: w,
7089
- autosize: V = !1,
7089
+ autosize: O = !1,
7090
7090
  colorLeftIcon: k,
7091
- infoTooltip: O = "",
7092
- ...z
7093
- }, F) => {
7094
- const { value: R, setValue: Z, isControlled: Y } = A8({
7091
+ infoTooltip: Z = "",
7092
+ ...P
7093
+ }, E) => {
7094
+ const { value: F, setValue: y, isControlled: G } = A8({
7095
7095
  value: C,
7096
7096
  defaultValue: d,
7097
7097
  onChange: g
7098
- }), H = (M) => {
7099
- const x = M.target.value;
7100
- Z(x), h == null || h(M);
7101
- }, { paddingClasses: v, getIconPosition: b } = T8({
7098
+ }), B = (M) => {
7099
+ const f = M.target.value;
7100
+ y(f), h == null || h(M);
7101
+ }, { paddingClasses: x, getIconPosition: b } = T8({
7102
7102
  size: n,
7103
7103
  leftSlot: a,
7104
7104
  rightSlot: s,
7105
7105
  extraSlot: l
7106
- }), { baseClasses: E, containerClasses: P, labelClasses: B } = F8({
7106
+ }), { baseClasses: A, containerClasses: R, labelClasses: T } = F8({
7107
7107
  size: n,
7108
7108
  error: r,
7109
7109
  disabled: L,
7110
7110
  fullWidth: p,
7111
7111
  caret: c,
7112
- paddingClasses: v,
7113
- autosize: V
7112
+ paddingClasses: x,
7113
+ autosize: O
7114
7114
  });
7115
7115
  return E8({
7116
- ref: F,
7117
- currentValue: R,
7118
- setValue: Z,
7119
- isControlled: Y,
7120
- inputId: z.id
7116
+ ref: E,
7117
+ currentValue: F,
7118
+ setValue: y,
7119
+ isControlled: G,
7120
+ inputId: P.id
7121
7121
  }), /* @__PURE__ */ u("div", { className: U(
7122
7122
  "ui-flex ui-flex-col ui-gap-1 ui-relative",
7123
7123
  p ? "ui-w-full" : "ui-w-fit",
7124
- j
7124
+ H
7125
7125
  ), style: m, children: [
7126
7126
  /* @__PURE__ */ u("div", { className: "ui-flex ui-flex-row ui-gap-1 ui-items-center ui-leading-tight", children: [
7127
- o && /* @__PURE__ */ i("label", { className: B, children: o }),
7128
- O && /* @__PURE__ */ i(
7127
+ o && /* @__PURE__ */ i("label", { className: T, children: o }),
7128
+ Z && /* @__PURE__ */ i(
7129
7129
  j1,
7130
7130
  {
7131
7131
  variant: "icon",
7132
7132
  size: "sm",
7133
7133
  color: "white",
7134
7134
  as: "div",
7135
- tooltip: O,
7135
+ tooltip: Z,
7136
7136
  clickable: !1,
7137
7137
  pointer: !1,
7138
7138
  icon: "InfoCircleOutlined"
7139
7139
  }
7140
7140
  )
7141
7141
  ] }),
7142
- /* @__PURE__ */ u("div", { className: P, children: [
7142
+ /* @__PURE__ */ u("div", { className: R, children: [
7143
7143
  a && /* @__PURE__ */ i(v1, { slot: a, colorIcon: k, className: `ui-absolute ${b("left")} ui-top-1/2 ui--translate-y-1/2` }),
7144
7144
  /* @__PURE__ */ i(
7145
7145
  "input",
7146
7146
  {
7147
7147
  placeholder: "Placeholder",
7148
7148
  disabled: L,
7149
- value: R,
7150
- onChange: H,
7149
+ value: F,
7150
+ onChange: B,
7151
7151
  name: w,
7152
- "data-input-id": z.id || "default-input",
7153
- className: E + " ui-min-w-12",
7154
- ...z
7152
+ "data-input-id": P.id || "default-input",
7153
+ className: A + " ui-min-w-12",
7154
+ ...P
7155
7155
  }
7156
7156
  ),
7157
7157
  s && /* @__PURE__ */ i(v1, { slot: s, className: `ui-absolute ${b("right")} ui-top-1/2 ui--translate-y-1/2` }),
7158
7158
  s && l && /* @__PURE__ */ i("div", { className: `ui-absolute ${b("separator")} ui-top-1/2 ui--translate-y-1/2 ui-h-5 ui-w-[1px] ${r ? "ui-bg-red-500" : "ui-bg-neutral-100"}` }),
7159
- l && /* @__PURE__ */ i("button", { onClick: f, className: `ui-absolute ${b("extra")} ui-top-1/2 ui--translate-y-1/2 ui-flex ui-place-items-center`, type: "button", children: /* @__PURE__ */ i(v1, { slot: l }) })
7159
+ l && /* @__PURE__ */ i("button", { onClick: v, className: `ui-absolute ${b("extra")} ui-top-1/2 ui--translate-y-1/2 ui-flex ui-place-items-center`, type: "button", children: /* @__PURE__ */ i(v1, { slot: l }) })
7160
7160
  ] }),
7161
7161
  r && /* @__PURE__ */ i("p", { className: "ui-text-xs ui-text-red-500", children: r }),
7162
7162
  t && /* @__PURE__ */ i("p", { className: "ui-text-xs ui-text-gray-500", children: t })
@@ -7186,8 +7186,8 @@ const R8 = $1(({
7186
7186
  c || n();
7187
7187
  },
7188
7188
  extraSlot: "CalendarOutlined",
7189
- onChange: (j) => {
7190
- !c && e && e(j.target.value);
7189
+ onChange: (H) => {
7190
+ !c && e && e(H.target.value);
7191
7191
  },
7192
7192
  onFocus: () => {
7193
7193
  !c && a && a();
@@ -7229,8 +7229,8 @@ const R8 = $1(({
7229
7229
  const g = a[d.getMonth()], h = d.getFullYear();
7230
7230
  switch (L) {
7231
7231
  case "years":
7232
- const f = c(h, s), j = f[0], m = f[f.length - 1];
7233
- return `${j} - ${m}`;
7232
+ const v = c(h, s), H = v[0], m = v[v.length - 1];
7233
+ return `${H} - ${m}`;
7234
7234
  case "months":
7235
7235
  return `${h}`;
7236
7236
  case "days":
@@ -7311,13 +7311,13 @@ const R8 = $1(({
7311
7311
  yearRange: L = 12,
7312
7312
  hoverDate: g,
7313
7313
  onMonthSelect: h,
7314
- onYearSelect: f,
7315
- renderDay: j
7314
+ onYearSelect: v,
7315
+ renderDay: H
7316
7316
  }) => {
7317
7317
  const m = (k) => {
7318
7318
  h == null || h(k);
7319
7319
  }, w = (k) => {
7320
- f == null || f(k);
7320
+ v == null || v(k);
7321
7321
  };
7322
7322
  return /* @__PURE__ */ i("div", { className: "ui-p-3 ui-h-full ui-flex ui-justify-center", children: (() => {
7323
7323
  switch (l) {
@@ -7336,7 +7336,7 @@ const R8 = $1(({
7336
7336
  startOfWeek: p,
7337
7337
  showWeekNumbers: d,
7338
7338
  hoverDate: g,
7339
- renderDay: j
7339
+ renderDay: H
7340
7340
  }
7341
7341
  );
7342
7342
  case "months":
@@ -7379,7 +7379,7 @@ const R8 = $1(({
7379
7379
  onGoToToday: L,
7380
7380
  locale: g = "es-ES",
7381
7381
  weekDays: h = ["D", "L", "M", "M", "J", "V", "S"],
7382
- monthNames: f = [
7382
+ monthNames: v = [
7383
7383
  "Enero",
7384
7384
  "Febrero",
7385
7385
  "Marzo",
@@ -7393,18 +7393,18 @@ const R8 = $1(({
7393
7393
  "Noviembre",
7394
7394
  "Diciembre"
7395
7395
  ],
7396
- startOfWeek: j = 1,
7396
+ startOfWeek: H = 1,
7397
7397
  showWeekNumbers: m = !1,
7398
7398
  yearRange: w = 12,
7399
- hoverDate: V,
7399
+ hoverDate: O,
7400
7400
  closeOnSelect: k,
7401
- autoCloseRange: O,
7402
- renderHeader: z,
7403
- renderDay: F
7401
+ autoCloseRange: Z,
7402
+ renderHeader: P,
7403
+ renderDay: E
7404
7404
  }) => {
7405
- const R = (b) => {
7405
+ const F = (b) => {
7406
7406
  C == null || C(b);
7407
- }, Z = () => {
7407
+ }, y = () => {
7408
7408
  switch (l) {
7409
7409
  case "days":
7410
7410
  c("months");
@@ -7416,9 +7416,9 @@ const R8 = $1(({
7416
7416
  c("days");
7417
7417
  break;
7418
7418
  }
7419
- }, Y = (b) => {
7419
+ }, G = (b) => {
7420
7420
  p == null || p(b);
7421
- }, H = (b) => {
7421
+ }, B = (b) => {
7422
7422
  d == null || d(b);
7423
7423
  };
7424
7424
  return /* @__PURE__ */ u("div", { className: "ui-bg-white ui-rounded-lg ui-shadow-lg ui-border ui-border-neutral-100 ui-overflow-hidden ui-min-w-[274px] ui-min-h-[325px]", children: [
@@ -7427,11 +7427,11 @@ const R8 = $1(({
7427
7427
  {
7428
7428
  currentDate: o,
7429
7429
  viewMode: l,
7430
- onNavigate: R,
7431
- onToggleViewMode: Z,
7430
+ onNavigate: F,
7431
+ onToggleViewMode: y,
7432
7432
  onGoToToday: L,
7433
- monthNames: f,
7434
- renderHeader: z
7433
+ monthNames: v,
7434
+ renderHeader: P
7435
7435
  }
7436
7436
  ),
7437
7437
  /* @__PURE__ */ i("div", { className: "ui-p-3 ui-h-full", children: (() => {
@@ -7448,10 +7448,10 @@ const R8 = $1(({
7448
7448
  minDate: a,
7449
7449
  maxDate: s,
7450
7450
  weekDays: h,
7451
- startOfWeek: j,
7451
+ startOfWeek: H,
7452
7452
  showWeekNumbers: m,
7453
- hoverDate: V,
7454
- renderDay: F
7453
+ hoverDate: O,
7454
+ renderDay: E
7455
7455
  }
7456
7456
  );
7457
7457
  case "months":
@@ -7460,8 +7460,8 @@ const R8 = $1(({
7460
7460
  {
7461
7461
  currentDate: o,
7462
7462
  selectedMonth: o.getMonth(),
7463
- onMonthSelect: Y,
7464
- monthNames: f
7463
+ onMonthSelect: G,
7464
+ monthNames: v
7465
7465
  }
7466
7466
  );
7467
7467
  case "years":
@@ -7470,7 +7470,7 @@ const R8 = $1(({
7470
7470
  {
7471
7471
  currentDate: o,
7472
7472
  selectedYear: o.getFullYear(),
7473
- onYearSelect: H,
7473
+ onYearSelect: B,
7474
7474
  yearRange: w
7475
7475
  }
7476
7476
  );
@@ -7513,124 +7513,124 @@ const R8 = $1(({
7513
7513
  onGoToToday: L,
7514
7514
  viewMode: g,
7515
7515
  minDate: h,
7516
- maxDate: f,
7517
- locale: j,
7516
+ maxDate: v,
7517
+ locale: H,
7518
7518
  weekDays: m,
7519
7519
  monthNames: w,
7520
- startOfWeek: V,
7520
+ startOfWeek: O,
7521
7521
  showWeekNumbers: k,
7522
- yearRange: O,
7523
- hoverDate: z,
7524
- closeOnSelect: F,
7525
- autoCloseRange: R,
7526
- calendarsCount: Z = 1,
7527
- mode: Y = "single",
7528
- renderHeader: H,
7529
- renderDay: v
7522
+ yearRange: Z,
7523
+ hoverDate: P,
7524
+ closeOnSelect: E,
7525
+ autoCloseRange: F,
7526
+ calendarsCount: y = 1,
7527
+ mode: G = "single",
7528
+ renderHeader: B,
7529
+ renderDay: x
7530
7530
  }) => {
7531
- const [b, E] = q(
7532
- Array(Z).fill(g)
7533
- ), [P, B] = q(() => {
7534
- const I = [];
7535
- for (let N = 0; N < Z; N++) {
7536
- const T = new Date(n);
7537
- T.setMonth(T.getMonth() + N), I.push(T);
7531
+ const [b, A] = Y(
7532
+ Array(y).fill(g)
7533
+ ), [R, T] = Y(() => {
7534
+ const $ = [];
7535
+ for (let S = 0; S < y; S++) {
7536
+ const D = new Date(n);
7537
+ D.setMonth(D.getMonth() + S), $.push(D);
7538
7538
  }
7539
- return I;
7539
+ return $;
7540
7540
  }), { renderPortal: M } = B8(o, r, t);
7541
7541
  W(() => {
7542
- E(Array(Z).fill(g));
7543
- }, [g, Z]), W(() => {
7544
- const I = [];
7545
- for (let N = 0; N < Z; N++) {
7546
- const T = new Date(n);
7547
- T.setMonth(T.getMonth() + N), I.push(T);
7542
+ A(Array(y).fill(g));
7543
+ }, [g, y]), W(() => {
7544
+ const $ = [];
7545
+ for (let S = 0; S < y; S++) {
7546
+ const D = new Date(n);
7547
+ D.setMonth(D.getMonth() + S), $.push(D);
7548
7548
  }
7549
- B(I);
7550
- }, [n, Z]);
7551
- const x = (I) => {
7552
- const N = b[I];
7553
- let T;
7554
- switch (N) {
7549
+ T($);
7550
+ }, [n, y]);
7551
+ const f = ($) => {
7552
+ const S = b[$];
7553
+ let D;
7554
+ switch (S) {
7555
7555
  case "days":
7556
- T = "months";
7556
+ D = "months";
7557
7557
  break;
7558
7558
  case "months":
7559
- T = "years";
7559
+ D = "years";
7560
7560
  break;
7561
7561
  case "years":
7562
- T = "days";
7562
+ D = "days";
7563
7563
  break;
7564
7564
  default:
7565
- T = "days";
7565
+ D = "days";
7566
7566
  }
7567
- const n1 = [...b];
7568
- n1[I] = T, E(n1);
7569
- }, y = (I, N) => {
7570
- const T = [...P];
7571
- T[I] = new Date(P[I].getFullYear(), N, 1), B(T);
7572
- const n1 = [...b];
7573
- n1[I] = "days", E(n1), p == null || p(N);
7574
- }, $ = (I, N) => {
7575
- const T = [...P];
7576
- T[I] = new Date(N, P[I].getMonth(), 1), B(T);
7577
- const n1 = [...b];
7578
- n1[I] = "months", E(n1), d == null || d(N);
7579
- }, X = (I) => {
7580
- const N = [...P];
7581
- N.forEach((T, n1) => {
7582
- const K = new Date(T);
7583
- switch (b[n1]) {
7567
+ const Q = [...b];
7568
+ Q[$] = D, A(Q);
7569
+ }, j = ($, S) => {
7570
+ const D = [...R];
7571
+ D[$] = new Date(R[$].getFullYear(), S, 1), T(D);
7572
+ const Q = [...b];
7573
+ Q[$] = "days", A(Q), p == null || p(S);
7574
+ }, V = ($, S) => {
7575
+ const D = [...R];
7576
+ D[$] = new Date(S, R[$].getMonth(), 1), T(D);
7577
+ const Q = [...b];
7578
+ Q[$] = "months", A(Q), d == null || d(S);
7579
+ }, n1 = ($) => {
7580
+ const S = [...R];
7581
+ S.forEach((D, Q) => {
7582
+ const q = new Date(D);
7583
+ switch (b[Q]) {
7584
7584
  case "days":
7585
- K.setMonth(K.getMonth() + (I === "next" ? 1 : -1));
7585
+ q.setMonth(q.getMonth() + ($ === "next" ? 1 : -1));
7586
7586
  break;
7587
7587
  case "months":
7588
- K.setFullYear(K.getFullYear() + (I === "next" ? 1 : -1));
7588
+ q.setFullYear(q.getFullYear() + ($ === "next" ? 1 : -1));
7589
7589
  break;
7590
7590
  case "years":
7591
- K.setFullYear(K.getFullYear() + (I === "next" ? 12 : -12));
7591
+ q.setFullYear(q.getFullYear() + ($ === "next" ? 12 : -12));
7592
7592
  break;
7593
7593
  }
7594
- N[n1] = K;
7595
- }), B(N), C(I);
7594
+ S[Q] = q;
7595
+ }), T(S), C($);
7596
7596
  };
7597
7597
  return M(
7598
- /* @__PURE__ */ i("div", { className: "ui-relative", children: Y === "range" && Z > 1 ? /* @__PURE__ */ u("div", { className: "ui-bg-white ui-rounded-lg ui-shadow-lg ui-border ui-overflow-hidden", children: [
7598
+ /* @__PURE__ */ i("div", { className: "ui-relative", children: G === "range" && y > 1 ? /* @__PURE__ */ u("div", { className: "ui-bg-white ui-rounded-lg ui-shadow-lg ui-border ui-overflow-hidden", children: [
7599
7599
  /* @__PURE__ */ i(
7600
7600
  U8,
7601
7601
  {
7602
- calendarDates: P,
7602
+ calendarDates: R,
7603
7603
  viewModes: b,
7604
- onNavigate: X,
7605
- onToggleViewMode: x,
7604
+ onNavigate: n1,
7605
+ onToggleViewMode: f,
7606
7606
  onGoToToday: L,
7607
7607
  monthNames: w,
7608
- yearRange: O,
7609
- renderHeader: H
7608
+ yearRange: Z,
7609
+ renderHeader: B
7610
7610
  }
7611
7611
  ),
7612
- /* @__PURE__ */ i("div", { className: "ui-flex ui-gap-4 ui-p-4 ui-flex-col md:ui-flex-row ui-flex-wrap", children: P.map((I, N) => /* @__PURE__ */ i("div", { className: "ui-flex-shrink-0 ui-min-w-[274px]", children: /* @__PURE__ */ i("div", { className: "ui-bg-white ui-rounded-lg ui-overflow-hidden ui-w-full", children: /* @__PURE__ */ i(
7612
+ /* @__PURE__ */ i("div", { className: "ui-flex ui-gap-4 ui-p-4 ui-flex-col md:ui-flex-row ui-flex-wrap", children: R.map(($, S) => /* @__PURE__ */ i("div", { className: "ui-flex-shrink-0 ui-min-w-[274px]", children: /* @__PURE__ */ i("div", { className: "ui-bg-white ui-rounded-lg ui-overflow-hidden ui-w-full", children: /* @__PURE__ */ i(
7613
7613
  _8,
7614
7614
  {
7615
- currentDate: I,
7615
+ currentDate: $,
7616
7616
  selectedDate: e,
7617
7617
  selectedRange: a,
7618
7618
  onDateSelect: s,
7619
7619
  onDateHover: l,
7620
7620
  minDate: h,
7621
- maxDate: f,
7622
- viewMode: b[N],
7621
+ maxDate: v,
7622
+ viewMode: b[S],
7623
7623
  weekDays: m,
7624
7624
  monthNames: w,
7625
- startOfWeek: V,
7625
+ startOfWeek: O,
7626
7626
  showWeekNumbers: k,
7627
- yearRange: O,
7628
- hoverDate: z,
7629
- onMonthSelect: (T) => y(N, T),
7630
- onYearSelect: (T) => $(N, T),
7631
- renderDay: v
7627
+ yearRange: Z,
7628
+ hoverDate: P,
7629
+ onMonthSelect: (D) => j(S, D),
7630
+ onYearSelect: (D) => V(S, D),
7631
+ renderDay: x
7632
7632
  }
7633
- ) }) }, N)) }),
7633
+ ) }) }, S)) }),
7634
7634
  /* @__PURE__ */ u("div", { className: "ui-p-3 ui-border-t ui-border-neutral-100 ui-flex ui-justify-end ui-gap-2", children: [
7635
7635
  /* @__PURE__ */ i(
7636
7636
  e1,
@@ -7658,24 +7658,24 @@ const R8 = $1(({
7658
7658
  onDateSelect: s,
7659
7659
  onDateHover: l,
7660
7660
  minDate: h,
7661
- maxDate: f,
7661
+ maxDate: v,
7662
7662
  viewMode: g,
7663
7663
  onViewModeChange: c,
7664
7664
  onNavigate: C,
7665
7665
  onMonthSelect: p,
7666
7666
  onYearSelect: d,
7667
7667
  onGoToToday: L,
7668
- locale: j,
7668
+ locale: H,
7669
7669
  weekDays: m,
7670
7670
  monthNames: w,
7671
- startOfWeek: V,
7671
+ startOfWeek: O,
7672
7672
  showWeekNumbers: k,
7673
- yearRange: O,
7674
- hoverDate: z,
7675
- closeOnSelect: F,
7676
- autoCloseRange: R,
7677
- renderHeader: H,
7678
- renderDay: v
7673
+ yearRange: Z,
7674
+ hoverDate: P,
7675
+ closeOnSelect: E,
7676
+ autoCloseRange: F,
7677
+ renderHeader: B,
7678
+ renderDay: x
7679
7679
  }
7680
7680
  ) })
7681
7681
  );
@@ -7708,48 +7708,48 @@ const R8 = $1(({
7708
7708
  className: L = "",
7709
7709
  inputClassName: g = "",
7710
7710
  headerClassName: h = "",
7711
- dayClassName: f = "",
7712
- monthClassName: j = "",
7711
+ dayClassName: v = "",
7712
+ monthClassName: H = "",
7713
7713
  yearClassName: m = "",
7714
7714
  disabledDayClassName: w = "text-gray-400 cursor-not-allowed",
7715
- rangeClassName: V = "bg-blue-100",
7715
+ rangeClassName: O = "bg-blue-100",
7716
7716
  rangeStartClassName: k = "bg-blue-500 text-white rounded-l-full",
7717
- rangeEndClassName: O = "bg-blue-500 text-white rounded-r-full",
7718
- todayClassName: z = "border border-blue-500",
7719
- showWeekNumbers: F = !1,
7720
- yearRange: R = 12,
7721
- initialViewMode: Z = "days",
7722
- closeOnSelect: Y = !1,
7723
- autoCloseRange: H = !0,
7724
- placeholder: v = "Seleccionar fecha",
7717
+ rangeEndClassName: Z = "bg-blue-500 text-white rounded-r-full",
7718
+ todayClassName: P = "border border-blue-500",
7719
+ showWeekNumbers: E = !1,
7720
+ yearRange: F = 12,
7721
+ initialViewMode: y = "days",
7722
+ closeOnSelect: G = !1,
7723
+ autoCloseRange: B = !0,
7724
+ placeholder: x = "Seleccionar fecha",
7725
7725
  format: b = "dd/MM/yyyy",
7726
- calendarsCount: E = 1,
7727
- renderHeader: P,
7728
- renderDay: B
7729
- } = o, { state: M, selectedDate: x, selectedRange: y, inputRef: $, isPortalReady: X, actions: I } = I8(o), { handleRangeSelection: N } = r0(
7730
- y,
7731
- I.setSelectedRange,
7726
+ calendarsCount: A = 1,
7727
+ renderHeader: R,
7728
+ renderDay: T
7729
+ } = o, { state: M, selectedDate: f, selectedRange: j, inputRef: V, isPortalReady: n1, actions: $ } = I8(o), { handleRangeSelection: S } = r0(
7730
+ j,
7731
+ $.setSelectedRange,
7732
7732
  s,
7733
7733
  l,
7734
- H
7735
- ), T = (A) => {
7736
- if (!A) return "";
7737
- const D = A.getDate().toString().padStart(2, "0"), J = (A.getMonth() + 1).toString().padStart(2, "0"), i1 = A.getFullYear();
7738
- return b.replace("dd", D).replace("MM", J).replace("yyyy", i1.toString());
7739
- }, n1 = (A) => !A.start && !A.end ? "" : A.start && A.end ? `${T(A.start)} - ${T(A.end)}` : T(A.start) || T(A.end), K = (A) => {
7740
- r === "single" ? I.setSelectedDate(A) : N(A, M.hoverDate, I.closePicker);
7741
- }, _ = (A) => {
7742
- I.setHoverDate(A);
7743
- }, Q = () => r === "single" ? T(x) : n1(y);
7734
+ B
7735
+ ), D = (z) => {
7736
+ if (!z) return "";
7737
+ const N = z.getDate().toString().padStart(2, "0"), K = (z.getMonth() + 1).toString().padStart(2, "0"), i1 = z.getFullYear();
7738
+ return b.replace("dd", N).replace("MM", K).replace("yyyy", i1.toString());
7739
+ }, Q = (z) => !z.start && !z.end ? "" : z.start && z.end ? `${D(z.start)} - ${D(z.end)}` : D(z.start) || D(z.end), q = (z) => {
7740
+ r === "single" ? $.setSelectedDate(z) : S(z, M.hoverDate, $.closePicker);
7741
+ }, _ = (z) => {
7742
+ $.setHoverDate(z);
7743
+ }, J = () => r === "single" ? D(f) : Q(j);
7744
7744
  return /* @__PURE__ */ u("div", { className: `relative ${L}`, children: [
7745
7745
  /* @__PURE__ */ i(
7746
7746
  R8,
7747
7747
  {
7748
- ref: $,
7749
- value: Q(),
7750
- placeholder: v,
7748
+ ref: V,
7749
+ value: J(),
7750
+ placeholder: x,
7751
7751
  isOpen: M.isOpen,
7752
- onInputClick: I.openPicker,
7752
+ onInputClick: $.openPicker,
7753
7753
  className: g,
7754
7754
  format: b
7755
7755
  }
@@ -7757,19 +7757,19 @@ const R8 = $1(({
7757
7757
  /* @__PURE__ */ i(
7758
7758
  Y8,
7759
7759
  {
7760
- isOpen: M.isOpen && X,
7761
- onClose: I.closePicker,
7760
+ isOpen: M.isOpen && n1,
7761
+ onClose: $.closePicker,
7762
7762
  portalPosition: M.portalPosition,
7763
7763
  currentDate: M.currentDate,
7764
- selectedDate: x,
7765
- selectedRange: y,
7766
- onDateSelect: K,
7764
+ selectedDate: f,
7765
+ selectedRange: j,
7766
+ onDateSelect: q,
7767
7767
  onDateHover: _,
7768
- onViewModeChange: I.setViewMode,
7769
- onNavigate: I.navigate,
7770
- onMonthSelect: I.handleMonthSelect,
7771
- onYearSelect: I.handleYearSelect,
7772
- onGoToToday: I.goToToday,
7768
+ onViewModeChange: $.setViewMode,
7769
+ onNavigate: $.navigate,
7770
+ onMonthSelect: $.handleMonthSelect,
7771
+ onYearSelect: $.handleYearSelect,
7772
+ onGoToToday: $.goToToday,
7773
7773
  viewMode: M.viewMode,
7774
7774
  minDate: s,
7775
7775
  maxDate: l,
@@ -7777,15 +7777,15 @@ const R8 = $1(({
7777
7777
  weekDays: C,
7778
7778
  monthNames: p,
7779
7779
  startOfWeek: d,
7780
- showWeekNumbers: F,
7781
- yearRange: R,
7780
+ showWeekNumbers: E,
7781
+ yearRange: F,
7782
7782
  hoverDate: M.hoverDate,
7783
- closeOnSelect: Y,
7784
- autoCloseRange: H,
7785
- calendarsCount: E,
7783
+ closeOnSelect: G,
7784
+ autoCloseRange: B,
7785
+ calendarsCount: A,
7786
7786
  mode: r,
7787
- renderHeader: P,
7788
- renderDay: B
7787
+ renderHeader: R,
7788
+ renderDay: T
7789
7789
  }
7790
7790
  )
7791
7791
  ] });
@@ -7793,7 +7793,7 @@ const R8 = $1(({
7793
7793
  t && /* @__PURE__ */ i(h1, { name: t, background: !0, color: "blue" }),
7794
7794
  /* @__PURE__ */ i("h2", { className: U("ui-text-2xl ui-font-semibold", r), children: o })
7795
7795
  ] }), l0 = (o, r = {}) => {
7796
- const { enterDelay: t = 10, exitDelay: n = 300 } = r, [e, a] = q(!1), [s, l] = q(!1);
7796
+ const { enterDelay: t = 10, exitDelay: n = 300 } = r, [e, a] = Y(!1), [s, l] = Y(!1);
7797
7797
  return W(() => {
7798
7798
  if (o) {
7799
7799
  a(!0);
@@ -7846,7 +7846,7 @@ const R8 = $1(({
7846
7846
  });
7847
7847
  }, [o, r]);
7848
7848
  }, c0 = () => {
7849
- const o = typeof window < "u", [r] = q(() => o ? document.createElement("div") : null);
7849
+ const o = typeof window < "u", [r] = Y(() => o ? document.createElement("div") : null);
7850
7850
  return W(() => {
7851
7851
  if (!(!r || !o))
7852
7852
  return document.body.appendChild(r), () => {
@@ -7891,11 +7891,11 @@ const R8 = $1(({
7891
7891
  W(() => {
7892
7892
  if (!o || r || !s) return;
7893
7893
  const C = (d) => {
7894
- var w, V;
7895
- const L = d.target, g = (w = t.current) == null ? void 0 : w.contains(L), h = (V = n == null ? void 0 : n.current) == null ? void 0 : V.contains(L), f = e ? L.closest(`[data-${a}-id="${e}"]`) : !1, j = a ? L.closest(`[data-${a}-container-id]`) : !1, m = l.some(
7894
+ var w, O;
7895
+ const L = d.target, g = (w = t.current) == null ? void 0 : w.contains(L), h = (O = n == null ? void 0 : n.current) == null ? void 0 : O.contains(L), v = e ? L.closest(`[data-${a}-id="${e}"]`) : !1, H = a ? L.closest(`[data-${a}-container-id]`) : !1, m = l.some(
7896
7896
  (k) => L.closest(k)
7897
7897
  );
7898
- g || h || f || j || m || c();
7898
+ g || h || v || H || m || c();
7899
7899
  }, p = (d) => {
7900
7900
  d.detail.id === e && c();
7901
7901
  };
@@ -7924,22 +7924,22 @@ const R8 = $1(({
7924
7924
  successButtonText: g = "Guardar",
7925
7925
  onCancel: h = () => {
7926
7926
  },
7927
- onSuccess: f = () => {
7927
+ onSuccess: v = () => {
7928
7928
  },
7929
- showCancelButton: j = !0,
7929
+ showCancelButton: H = !0,
7930
7930
  showSuccessButton: m = !0,
7931
7931
  closeAtSuccess: w = !1,
7932
- closeAtCancel: V = !0
7932
+ closeAtCancel: O = !0
7933
7933
  }) => {
7934
- const k = c0(), { isVisible: O, isAnimating: z } = l0(o), F = t1(null);
7935
- d0(o), q1(o, r, l), s0(o, F, !c);
7936
- const R = () => {
7937
- h && h(), V && r();
7938
- }, Z = () => {
7939
- f && f(), w && r();
7934
+ const k = c0(), { isVisible: Z, isAnimating: P } = l0(o), E = t1(null);
7935
+ d0(o), q1(o, r, l), s0(o, E, !c);
7936
+ const F = () => {
7937
+ h && h(), O && r();
7938
+ }, y = () => {
7939
+ v && v(), w && r();
7940
7940
  };
7941
- if (!k || !O) return null;
7942
- const Y = /* @__PURE__ */ u(
7941
+ if (!k || !Z) return null;
7942
+ const G = /* @__PURE__ */ u(
7943
7943
  "div",
7944
7944
  {
7945
7945
  "aria-modal": "true",
@@ -7959,26 +7959,26 @@ const R8 = $1(({
7959
7959
  /* @__PURE__ */ i(
7960
7960
  "div",
7961
7961
  {
7962
- ref: F,
7962
+ ref: E,
7963
7963
  tabIndex: -1,
7964
- onClick: (H) => H.stopPropagation(),
7964
+ onClick: (B) => B.stopPropagation(),
7965
7965
  className: U(
7966
7966
  "ui-relative ui-z-10 ui-flex ui-flex-col ui-bg-white ui-shadow-xl ui-transition-transform ui-duration-300 ui-ease-in-out ui-outline-none",
7967
7967
  Q8[n],
7968
7968
  C === "right" ? "ui-ml-auto" : "ui-mr-auto"
7969
7969
  ),
7970
7970
  style: {
7971
- transform: C === "right" ? z ? "translateX(0)" : "translateX(100%)" : z ? "translateX(0)" : "translateX(-100%)"
7971
+ transform: C === "right" ? P ? "translateX(0)" : "translateX(100%)" : P ? "translateX(0)" : "translateX(-100%)"
7972
7972
  },
7973
7973
  children: /* @__PURE__ */ u(L1, { rounded: !1, padding: !1, gap: !1, className: U(p), children: [
7974
7974
  /* @__PURE__ */ i(L1.Header, { children: /* @__PURE__ */ i("div", { className: "ui-flex ui-items-center ui-justify-between ui-p-4", children: t && /* @__PURE__ */ i(G8, { title: t, icon: a }) }) }),
7975
7975
  /* @__PURE__ */ i(L1.Separator, { padding: !1 }),
7976
7976
  /* @__PURE__ */ i(L1.Body, { fullHeight: !0, className: U("ui-p-4", d ? "ui-overflow-y-auto" : ""), scrollable: d, children: e }),
7977
- (j || m) && /* @__PURE__ */ u(H1, { children: [
7977
+ (H || m) && /* @__PURE__ */ u(H1, { children: [
7978
7978
  /* @__PURE__ */ i(L1.Separator, { padding: !1 }),
7979
7979
  /* @__PURE__ */ u(L1.Footer, { className: "ui-flex ui-items-center ui-justify-end ui-p-4 ui-gap-x-4", children: [
7980
- j && /* @__PURE__ */ i(j1, { fullWidth: !0, variant: "outlined", color: "white", onClick: R, children: L }),
7981
- m && /* @__PURE__ */ i(j1, { fullWidth: !0, variant: "button", onClick: Z, children: g })
7980
+ H && /* @__PURE__ */ i(j1, { fullWidth: !0, variant: "outlined", color: "white", onClick: F, children: L }),
7981
+ m && /* @__PURE__ */ i(j1, { fullWidth: !0, variant: "button", onClick: y, children: g })
7982
7982
  ] })
7983
7983
  ] })
7984
7984
  ] })
@@ -7987,11 +7987,11 @@ const R8 = $1(({
7987
7987
  ]
7988
7988
  }
7989
7989
  );
7990
- return e0.createPortal(Y, k);
7990
+ return e0.createPortal(G, k);
7991
7991
  }, C0 = ({ children: o, icon: r, onClick: t, disabled: n = !1, current: e = !1, uppercase: a = !1, "data-option-value": s, iconColor: l }) => {
7992
7992
  const c = (d) => {
7993
7993
  n || t == null || t(d);
7994
- }, [C, p] = q(!1);
7994
+ }, [C, p] = Y(!1);
7995
7995
  return /* @__PURE__ */ u(
7996
7996
  "li",
7997
7997
  {
@@ -8034,140 +8034,140 @@ const R8 = $1(({
8034
8034
  maxSelectedItems: L,
8035
8035
  absolute: g = !1
8036
8036
  }) => {
8037
- const h = n0(), f = C || `dropdown-${h}`, [j, m] = q(!1), [w, V] = q(!1), [k, O] = q(""), [z, F] = q("bottom"), [R, Z] = q({}), Y = t1(null), H = t1(null), v = t1(null), b = S((D) => D == null ? [] : Array.isArray(D) ? D : [D], []), E = S((D) => D == null ? "" : Array.isArray(D) ? D[0] || "" : D, []), [P, B] = q(() => d ? b(r) : E(r)), M = o !== void 0, x = M ? o : P, y = S((D) => {
8038
- M || B(D), a == null || a(D);
8039
- }, [M, a]), $ = d ? t.filter((D) => b(x).includes(D[n])) : [t.find((D) => D[n] === x)].filter(Boolean), X = t.filter((D) => {
8040
- const J = l ? D[n].toLowerCase().includes(k.toLowerCase()) : !0;
8037
+ const h = n0(), v = C || `dropdown-${h}`, [H, m] = Y(!1), [w, O] = Y(!1), [k, Z] = Y(""), [P, E] = Y("bottom"), [F, y] = Y({}), G = t1(null), B = t1(null), x = t1(null), b = I((N) => N == null ? [] : Array.isArray(N) ? N : [N], []), A = I((N) => N == null ? "" : Array.isArray(N) ? N[0] || "" : N, []), [R, T] = Y(() => d ? b(r) : A(r)), M = o !== void 0, f = M ? o : R, j = I((N) => {
8038
+ M || T(N), a == null || a(N);
8039
+ }, [M, a]), V = d ? t.filter((N) => b(f).includes(N[n])) : [t.find((N) => N[n] === f)].filter(Boolean), n1 = t.filter((N) => {
8040
+ const K = l ? N[n].toLowerCase().includes(k.toLowerCase()) : !0;
8041
8041
  if (d) {
8042
- const i1 = b(x).includes(D[n]);
8043
- return J && !i1;
8042
+ const i1 = b(f).includes(N[n]);
8043
+ return K && !i1;
8044
8044
  }
8045
- return J;
8046
- }), I = S(() => {
8045
+ return K;
8046
+ }), $ = I(() => {
8047
8047
  var i1, o1;
8048
- const D = (i1 = v.current) == null ? void 0 : i1.querySelector("input");
8049
- return D || ((o1 = v.current) == null ? void 0 : o1.querySelector('[data-dropdown-input="true"]'));
8050
- }, []), N = S(() => {
8051
- const D = I();
8052
- D && requestAnimationFrame(() => {
8048
+ const N = (i1 = x.current) == null ? void 0 : i1.querySelector("input");
8049
+ return N || ((o1 = x.current) == null ? void 0 : o1.querySelector('[data-dropdown-input="true"]'));
8050
+ }, []), S = I(() => {
8051
+ const N = $();
8052
+ N && requestAnimationFrame(() => {
8053
8053
  var u1;
8054
- const J = D.getBoundingClientRect(), i1 = window.innerHeight;
8054
+ const K = N.getBoundingClientRect(), i1 = window.innerHeight;
8055
8055
  let o1 = 0;
8056
- H.current && (o1 = H.current.offsetHeight), o1 === 0 && (o1 = Math.min(200, X.length * 40));
8057
- const s1 = i1 - J.bottom, l1 = J.top, a1 = s1 < o1 && l1 > s1 ? "top" : "bottom";
8058
- F(a1);
8059
- let p1 = 0, M1 = 0, m1 = J.width;
8056
+ B.current && (o1 = B.current.offsetHeight), o1 === 0 && (o1 = Math.min(200, n1.length * 40));
8057
+ const s1 = i1 - K.bottom, l1 = K.top, a1 = s1 < o1 && l1 > s1 ? "top" : "bottom";
8058
+ E(a1);
8059
+ let p1 = 0, M1 = 0, f1 = K.width;
8060
8060
  if (!g)
8061
- p1 = a1 === "bottom" ? J.bottom + 4 : J.top - o1 - 4, M1 = J.left;
8061
+ p1 = a1 === "bottom" ? K.bottom + 4 : K.top - o1 - 4, M1 = K.left;
8062
8062
  else {
8063
- const g1 = (u1 = v.current) == null ? void 0 : u1.getBoundingClientRect();
8063
+ const g1 = (u1 = x.current) == null ? void 0 : u1.getBoundingClientRect();
8064
8064
  if (!g1) return;
8065
- const r1 = J.top - g1.top, V1 = J.left - g1.left;
8066
- p1 = a1 === "bottom" ? r1 + J.height + 4 : r1 - o1 - 4, M1 = V1;
8065
+ const r1 = K.top - g1.top, V1 = K.left - g1.left;
8066
+ p1 = a1 === "bottom" ? r1 + K.height + 4 : r1 - o1 - 4, M1 = V1;
8067
8067
  }
8068
- const x1 = 1e3, O1 = parseInt(f.replace(/\D/g, "")) || 0, z1 = x1 + O1 % 100, G = {
8068
+ const x1 = 1e3, O1 = parseInt(v.replace(/\D/g, "")) || 0, z1 = x1 + O1 % 100, X = {
8069
8069
  position: g ? "absolute" : "fixed",
8070
8070
  top: `${p1}px`,
8071
8071
  left: `${M1}px`,
8072
- width: `${m1}px`,
8072
+ width: `${f1}px`,
8073
8073
  zIndex: z1
8074
8074
  };
8075
- Z(G);
8075
+ y(X);
8076
8076
  });
8077
- }, [I, X.length, f, g]), T = S(() => {
8078
- if (!H.current || !$.length)
8077
+ }, [$, n1.length, v, g]), D = I(() => {
8078
+ if (!B.current || !V.length)
8079
8079
  return;
8080
- const J = H.current.querySelector(".ui-overflow-y-auto");
8081
- if (!J)
8080
+ const K = B.current.querySelector(".ui-overflow-y-auto");
8081
+ if (!K)
8082
8082
  return;
8083
- const i1 = $[0];
8083
+ const i1 = V[0];
8084
8084
  if (!i1) return;
8085
- const o1 = J.querySelector(`[data-option-value="${i1[n]}"]`);
8085
+ const o1 = K.querySelector(`[data-option-value="${i1[n]}"]`);
8086
8086
  if (!o1)
8087
8087
  return;
8088
- const s1 = J.clientHeight, l1 = o1.offsetTop, a1 = o1.clientHeight, p1 = l1 - s1 / 2 + a1 / 2;
8089
- J.scrollTo({
8088
+ const s1 = K.clientHeight, l1 = o1.offsetTop, a1 = o1.clientHeight, p1 = l1 - s1 / 2 + a1 / 2;
8089
+ K.scrollTo({
8090
8090
  top: Math.max(0, p1),
8091
8091
  behavior: "smooth"
8092
8092
  });
8093
- }, [$, n]), n1 = (D) => {
8094
- D && D.stopPropagation(), !p && (j ? K() : (W8(f), O(""), V(!1), N(), setTimeout(() => {
8095
- m(!0), E1.add(f), setTimeout(() => {
8096
- N(), setTimeout(() => {
8097
- T();
8093
+ }, [V, n]), Q = (N) => {
8094
+ N && N.stopPropagation(), !p && (H ? q() : (W8(v), Z(""), O(!1), S(), setTimeout(() => {
8095
+ m(!0), E1.add(v), setTimeout(() => {
8096
+ S(), setTimeout(() => {
8097
+ D();
8098
8098
  }, 50);
8099
8099
  }, 50);
8100
8100
  }, 50)));
8101
- }, K = () => {
8102
- V(!0), setTimeout(() => {
8103
- m(!1), V(!1), E1.delete(f);
8101
+ }, q = () => {
8102
+ O(!0), setTimeout(() => {
8103
+ m(!1), O(!1), E1.delete(v);
8104
8104
  }, 150);
8105
- }, _ = (D, J) => {
8106
- if (J.stopPropagation(), !D.disabled) {
8105
+ }, _ = (N, K) => {
8106
+ if (K.stopPropagation(), !N.disabled) {
8107
8107
  if (d) {
8108
- const i1 = b(x), o1 = D[n];
8108
+ const i1 = b(f), o1 = N[n];
8109
8109
  if (L && i1.length >= L && !i1.includes(o1))
8110
8110
  return;
8111
8111
  const s1 = i1.includes(o1) ? i1.filter((l1) => l1 !== o1) : [...i1, o1];
8112
- y(s1);
8112
+ j(s1);
8113
8113
  } else {
8114
- const i1 = D[n];
8115
- y(i1), O(""), K();
8114
+ const i1 = N[n];
8115
+ j(i1), Z(""), q();
8116
8116
  }
8117
- s == null || s(D);
8117
+ s == null || s(N);
8118
8118
  }
8119
- }, Q = (D) => {
8120
- O(D.target.value);
8121
- }, A = (D) => {
8122
- D.stopPropagation(), y(d ? [] : ""), O("");
8119
+ }, J = (N) => {
8120
+ Z(N.target.value);
8121
+ }, z = (N) => {
8122
+ N.stopPropagation(), j(d ? [] : ""), Z("");
8123
8123
  };
8124
8124
  return p0({
8125
- isActive: j && !w,
8125
+ isActive: H && !w,
8126
8126
  // Solo activar cuando esté abierto y no cerrando
8127
8127
  disabled: p,
8128
- elementRef: H,
8129
- containerRef: v,
8130
- elementId: f,
8128
+ elementRef: B,
8129
+ containerRef: x,
8130
+ elementId: v,
8131
8131
  elementType: "dropdown",
8132
8132
  closeOnClickOutside: c,
8133
- onOutsideClick: K
8133
+ onOutsideClick: q
8134
8134
  }), W(() => {
8135
- if (j) {
8136
- const D = () => {
8137
- N();
8138
- }, J = () => {
8139
- N();
8135
+ if (H) {
8136
+ const N = () => {
8137
+ S();
8138
+ }, K = () => {
8139
+ S();
8140
8140
  };
8141
- return window.addEventListener("resize", D), window.addEventListener("scroll", J, !0), document.addEventListener("scroll", J, !0), () => {
8142
- window.removeEventListener("resize", D), window.removeEventListener("scroll", J, !0), document.removeEventListener("scroll", J, !0);
8141
+ return window.addEventListener("resize", N), window.addEventListener("scroll", K, !0), document.addEventListener("scroll", K, !0), () => {
8142
+ window.removeEventListener("resize", N), window.removeEventListener("scroll", K, !0), document.removeEventListener("scroll", K, !0);
8143
8143
  };
8144
8144
  }
8145
- }, [j, N]), {
8145
+ }, [H, S]), {
8146
8146
  // Estado
8147
- isOpen: j,
8147
+ isOpen: H,
8148
8148
  isClosing: w,
8149
8149
  searchValue: k,
8150
- selectedValue: x,
8151
- selectedOptions: $,
8152
- filteredOptions: X,
8153
- position: z,
8154
- dropdownStyle: R,
8150
+ selectedValue: f,
8151
+ selectedOptions: V,
8152
+ filteredOptions: n1,
8153
+ position: P,
8154
+ dropdownStyle: F,
8155
8155
  isControlled: M,
8156
8156
  multiple: d,
8157
8157
  // Referencias
8158
- inputRef: Y,
8159
- dropdownRef: H,
8160
- containerRef: v,
8161
- dropdownUniqueId: f,
8158
+ inputRef: G,
8159
+ dropdownRef: B,
8160
+ containerRef: x,
8161
+ dropdownUniqueId: v,
8162
8162
  // Funciones
8163
- toggleDropdown: n1,
8164
- closeDropdown: K,
8163
+ toggleDropdown: Q,
8164
+ closeDropdown: q,
8165
8165
  handleOptionSelect: _,
8166
- handleSearchChange: Q,
8167
- handleClear: A,
8168
- calculatePosition: N,
8169
- setValue: y,
8170
- scrollToSelectedOption: T,
8166
+ handleSearchChange: J,
8167
+ handleClear: z,
8168
+ calculatePosition: S,
8169
+ setValue: j,
8170
+ scrollToSelectedOption: D,
8171
8171
  normalizeToArray: b
8172
8172
  };
8173
8173
  }, Q1 = ({ onClick: o, className: r, size: t = "md", label: n = "", variant: e = "button", borderable: a, rounded: s = !1, badge: l = !1, color: c, ...C }) => /* @__PURE__ */ i(
@@ -8203,42 +8203,42 @@ const R8 = $1(({
8203
8203
  value: L,
8204
8204
  defaultValue: g = "",
8205
8205
  disabled: h = !1,
8206
- placeholder: f = "",
8207
- options: j = [],
8206
+ placeholder: v = "",
8207
+ options: H = [],
8208
8208
  valueName: m = "label",
8209
8209
  idName: w = "id",
8210
- onValueChange: V,
8210
+ onValueChange: O,
8211
8211
  onOptionSelect: k,
8212
- searchable: O = !1,
8213
- maxHeight: z = "200px",
8214
- closeOnClickOutside: F = !0,
8215
- dropdownId: R,
8216
- multiple: Z = !1,
8217
- maxSelectedItems: Y,
8218
- selectedItemsDisplay: H = "tags",
8219
- absolute: v = !1,
8212
+ searchable: Z = !1,
8213
+ maxHeight: P = "200px",
8214
+ closeOnClickOutside: E = !0,
8215
+ dropdownId: F,
8216
+ multiple: y = !1,
8217
+ maxSelectedItems: G,
8218
+ selectedItemsDisplay: B = "tags",
8219
+ absolute: x = !1,
8220
8220
  ...b
8221
- }, E) => {
8222
- const P = t1(null), {
8221
+ }, A) => {
8222
+ const R = t1(null), {
8223
8223
  // Estado
8224
- isOpen: B,
8224
+ isOpen: T,
8225
8225
  isClosing: M,
8226
- searchValue: x,
8227
- selectedValue: y,
8228
- selectedOptions: $,
8229
- filteredOptions: X,
8230
- dropdownStyle: I,
8231
- isControlled: N,
8226
+ searchValue: f,
8227
+ selectedValue: j,
8228
+ selectedOptions: V,
8229
+ filteredOptions: n1,
8230
+ dropdownStyle: $,
8231
+ isControlled: S,
8232
8232
  // Referencias
8233
- inputRef: T,
8234
- dropdownRef: n1,
8235
- containerRef: K,
8233
+ inputRef: D,
8234
+ dropdownRef: Q,
8235
+ containerRef: q,
8236
8236
  dropdownUniqueId: _,
8237
8237
  // Funciones
8238
- toggleDropdown: Q,
8239
- closeDropdown: A,
8240
- handleOptionSelect: D,
8241
- handleSearchChange: J,
8238
+ toggleDropdown: J,
8239
+ closeDropdown: z,
8240
+ handleOptionSelect: N,
8241
+ handleSearchChange: K,
8242
8242
  handleClear: i1,
8243
8243
  calculatePosition: o1,
8244
8244
  scrollToSelectedOption: s1,
@@ -8247,96 +8247,96 @@ const R8 = $1(({
8247
8247
  } = n3({
8248
8248
  value: L,
8249
8249
  defaultValue: g,
8250
- options: j,
8250
+ options: H,
8251
8251
  valueName: m,
8252
8252
  idName: w,
8253
- onValueChange: V,
8253
+ onValueChange: O,
8254
8254
  onOptionSelect: k,
8255
- searchable: O,
8256
- closeOnClickOutside: F,
8257
- dropdownId: R,
8255
+ searchable: Z,
8256
+ closeOnClickOutside: E,
8257
+ dropdownId: F,
8258
8258
  disabled: h,
8259
- multiple: Z,
8260
- maxSelectedItems: Y,
8261
- absolute: v
8262
- }), [p1, M1] = q(s), [m1, x1] = q(null);
8263
- U1(E, () => ({
8264
- getValue: () => y,
8265
- setValue: (G) => {
8266
- N || l1(G), V == null || V(G);
8259
+ multiple: y,
8260
+ maxSelectedItems: G,
8261
+ absolute: x
8262
+ }), [p1, M1] = Y(s), [f1, x1] = Y(null);
8263
+ U1(A, () => ({
8264
+ getValue: () => j,
8265
+ setValue: (X) => {
8266
+ S || l1(X), O == null || O(X);
8267
8267
  },
8268
8268
  focus: () => {
8269
- var G, u1;
8270
- Z && H === "tags" ? (G = P.current) == null || G.focus() : (u1 = T.current) == null || u1.focus();
8269
+ var X, u1;
8270
+ y && B === "tags" ? (X = R.current) == null || X.focus() : (u1 = D.current) == null || u1.focus();
8271
8271
  },
8272
8272
  blur: () => {
8273
- var G, u1;
8274
- Z && H === "tags" ? (G = P.current) == null || G.blur() : (u1 = T.current) == null || u1.blur();
8273
+ var X, u1;
8274
+ y && B === "tags" ? (X = R.current) == null || X.blur() : (u1 = D.current) == null || u1.blur();
8275
8275
  },
8276
8276
  clear: () => {
8277
- N || l1(Z ? [] : ""), V == null || V(Z ? [] : "");
8277
+ S || l1(y ? [] : ""), O == null || O(y ? [] : "");
8278
8278
  },
8279
8279
  open: () => {
8280
8280
  h || (o1(), setTimeout(() => {
8281
- Q();
8281
+ J();
8282
8282
  }, 50));
8283
8283
  },
8284
8284
  close: () => {
8285
- A();
8285
+ z();
8286
8286
  }
8287
- }), [y, N, h, o1, V, A, Z, l1, Q, H]), W(() => {
8288
- if (B && $.length > 0) {
8289
- const G = setTimeout(() => {
8287
+ }), [j, S, h, o1, O, z, y, l1, J, B]), W(() => {
8288
+ if (T && V.length > 0) {
8289
+ const X = setTimeout(() => {
8290
8290
  s1();
8291
8291
  }, 150);
8292
- return () => clearTimeout(G);
8292
+ return () => clearTimeout(X);
8293
8293
  }
8294
- }, [B, $, s1]);
8295
- const O1 = (G) => {
8296
- if (Z) {
8297
- const g1 = a1(y).filter((r1) => r1 !== G);
8294
+ }, [T, V, s1]);
8295
+ const O1 = (X) => {
8296
+ if (y) {
8297
+ const g1 = a1(j).filter((r1) => r1 !== X);
8298
8298
  l1(g1);
8299
8299
  }
8300
8300
  }, z1 = () => {
8301
- var G;
8302
- if (Z) {
8303
- if ($.length === 0) return "";
8304
- switch (H) {
8301
+ var X;
8302
+ if (y) {
8303
+ if (V.length === 0) return "";
8304
+ switch (B) {
8305
8305
  case "count":
8306
- return `${$.length} elemento${$.length > 1 ? "s" : ""} seleccionado${$.length > 1 ? "s" : ""}`;
8306
+ return `${V.length} elemento${V.length > 1 ? "s" : ""} seleccionado${V.length > 1 ? "s" : ""}`;
8307
8307
  case "text":
8308
- return $.map((u1) => u1 == null ? void 0 : u1[m]).filter(Boolean).join(", ");
8308
+ return V.map((u1) => u1 == null ? void 0 : u1[m]).filter(Boolean).join(", ");
8309
8309
  case "tags":
8310
8310
  default:
8311
8311
  return "";
8312
8312
  }
8313
8313
  } else
8314
- return ((G = $[0]) == null ? void 0 : G[m]) || "";
8314
+ return ((X = V[0]) == null ? void 0 : X[m]) || "";
8315
8315
  }, J1 = () => {
8316
- if (!B || !I.top) return null;
8317
- const G = M ? "animate-dropdown-exit" : "animate-dropdown-enter", u1 = (r1, V1) => {
8318
- D(r1, V1), r1.icon && M1(r1.icon), r1.iconColor && x1(r1.iconColor);
8316
+ if (!T || !$.top) return null;
8317
+ const X = M ? "animate-dropdown-exit" : "animate-dropdown-enter", u1 = (r1, V1) => {
8318
+ N(r1, V1), r1.icon && M1(r1.icon), r1.iconColor && x1(r1.iconColor);
8319
8319
  }, g1 = /* @__PURE__ */ u(
8320
8320
  "div",
8321
8321
  {
8322
- ref: n1,
8322
+ ref: Q,
8323
8323
  id: _,
8324
8324
  "data-dropdown-id": _,
8325
8325
  style: {
8326
- position: I.position,
8327
- top: I.top,
8328
- left: I.left,
8329
- width: I.width,
8330
- zIndex: I.zIndex
8326
+ position: $.position,
8327
+ top: $.top,
8328
+ left: $.left,
8329
+ width: $.width,
8330
+ zIndex: $.zIndex
8331
8331
  },
8332
- className: `ui-bg-white ui-border ui-border-neutral-200 ui-rounded-sm ui-shadow-lg ui-overflow-hidden py-2 ui-min-w-fit ${G}`,
8332
+ className: `ui-bg-white ui-border ui-border-neutral-200 ui-rounded-sm ui-shadow-lg ui-overflow-hidden py-2 ui-min-w-fit ${X}`,
8333
8333
  onClick: (r1) => r1.stopPropagation(),
8334
8334
  children: [
8335
- /* @__PURE__ */ i("div", { children: O && /* @__PURE__ */ i("div", { className: "ui-p-2", onClick: (r1) => r1.stopPropagation(), children: /* @__PURE__ */ i(
8335
+ /* @__PURE__ */ i("div", { children: Z && /* @__PURE__ */ i("div", { className: "ui-p-2", onClick: (r1) => r1.stopPropagation(), children: /* @__PURE__ */ i(
8336
8336
  B1,
8337
8337
  {
8338
- value: x,
8339
- onChange: J,
8338
+ value: f,
8339
+ onChange: K,
8340
8340
  placeholder: c,
8341
8341
  leftSlot: "SearchOutlined",
8342
8342
  autoFocus: !0,
@@ -8344,8 +8344,8 @@ const R8 = $1(({
8344
8344
  size: "sm"
8345
8345
  }
8346
8346
  ) }) }),
8347
- O && /* @__PURE__ */ i(T1, {}),
8348
- /* @__PURE__ */ i("div", { className: "ui-max-h-[200px] ui-overflow-y-auto ui-py-2 no-scrollbar", children: X.length > 0 ? X.map((r1) => /* @__PURE__ */ i(
8347
+ Z && /* @__PURE__ */ i(T1, {}),
8348
+ /* @__PURE__ */ i("div", { className: "ui-max-h-[200px] ui-overflow-y-auto ui-py-2 no-scrollbar", children: n1.length > 0 ? n1.map((r1) => /* @__PURE__ */ i(
8349
8349
  C0,
8350
8350
  {
8351
8351
  onClick: (V1) => u1(r1, V1),
@@ -8362,7 +8362,7 @@ const R8 = $1(({
8362
8362
  /* @__PURE__ */ u("p", { className: "ui-font-semibold ui-text-neutral-800", children: [
8363
8363
  C,
8364
8364
  ' "',
8365
- x,
8365
+ f,
8366
8366
  '"'
8367
8367
  ] }),
8368
8368
  /* @__PURE__ */ i("p", { className: "ui-text-xs ui-mt-2 ui-text-neutral-500", children: p })
@@ -8370,48 +8370,48 @@ const R8 = $1(({
8370
8370
  /* @__PURE__ */ i(T1, {}),
8371
8371
  /* @__PURE__ */ u("div", { className: "ui-px-4 ui-py-2 ui-flex ui-gap-x-2 ui-min-w-[200px]", children: [
8372
8372
  /* @__PURE__ */ i(j1, { color: "white", slotLeft: "TrashOutlined", variant: "outlined", size: "sm", fullWidth: !0, onClick: i1, children: "Limpiar" }),
8373
- /* @__PURE__ */ i(j1, { color: "blue", size: "sm", fullWidth: !0, onClick: () => A(), children: "OK" })
8373
+ /* @__PURE__ */ i(j1, { color: "blue", size: "sm", fullWidth: !0, onClick: () => z(), children: "OK" })
8374
8374
  ] })
8375
8375
  ]
8376
8376
  }
8377
8377
  );
8378
- return v ? g1 : b1(g1, document.body);
8378
+ return x ? g1 : b1(g1, document.body);
8379
8379
  };
8380
8380
  return W(() => {
8381
8381
  s && M1(s);
8382
- }, [s]), /* @__PURE__ */ u("div", { ref: K, className: "ui-w-full ui-relative", "data-dropdown-container-id": _, children: [
8383
- Z && H === "tags" ? (
8382
+ }, [s]), /* @__PURE__ */ u("div", { ref: q, className: "ui-w-full ui-relative", "data-dropdown-container-id": _, children: [
8383
+ y && B === "tags" ? (
8384
8384
  // Input personalizado con tags para modo tags
8385
8385
  /* @__PURE__ */ u("div", { className: "ui-w-full", children: [
8386
8386
  r && /* @__PURE__ */ i("label", { className: "ui-block ui-text-sm ui-font-medium ui-text-gray-700 ui-mb-1", children: r }),
8387
8387
  /* @__PURE__ */ u(
8388
8388
  "div",
8389
8389
  {
8390
- ref: P,
8390
+ ref: R,
8391
8391
  "data-dropdown-input": "true",
8392
8392
  className: "ui-min-h-[40px] ui-border ui-border-gray-300 ui-rounded-md ui-px-3 ui-py-2 ui-bg-white ui-cursor-pointer ui-flex ui-flex-wrap ui-gap-1 ui-items-center hover:ui-border-gray-400 focus-within:ui-border-blue-500 focus-within:ui-ring-2 focus-within:ui-ring-blue-200",
8393
- onClick: (G) => Q(G),
8394
- onFocus: () => Q(),
8393
+ onClick: (X) => J(X),
8394
+ onFocus: () => J(),
8395
8395
  tabIndex: h ? -1 : 0,
8396
8396
  children: [
8397
- $.length > 0 ? /* @__PURE__ */ i(H1, { children: $.map((G) => G ? /* @__PURE__ */ i(
8397
+ V.length > 0 ? /* @__PURE__ */ i(H1, { children: V.map((X) => X ? /* @__PURE__ */ i(
8398
8398
  Q1,
8399
8399
  {
8400
- label: G[m],
8400
+ label: X[m],
8401
8401
  color: "blue",
8402
8402
  size: "sm",
8403
8403
  onClick: (u1) => {
8404
- u1.stopPropagation(), O1(G[m]);
8404
+ u1.stopPropagation(), O1(X[m]);
8405
8405
  }
8406
8406
  },
8407
- G[m]
8408
- ) : null) }) : /* @__PURE__ */ i("span", { className: "ui-text-gray-500", children: f }),
8407
+ X[m]
8408
+ ) : null) }) : /* @__PURE__ */ i("span", { className: "ui-text-gray-500", children: v }),
8409
8409
  /* @__PURE__ */ u("div", { className: "ui-ml-auto ui-flex ui-items-center", children: [
8410
8410
  l && /* @__PURE__ */ i("span", { className: "ui-mr-2", children: l }),
8411
8411
  /* @__PURE__ */ i(
8412
8412
  h1,
8413
8413
  {
8414
- name: B ? "ChevronUp1Outlined" : "ChevronDown1Outlined",
8414
+ name: T ? "ChevronUp1Outlined" : "ChevronDown1Outlined",
8415
8415
  size: "sm",
8416
8416
  color: "neutral"
8417
8417
  }
@@ -8428,39 +8428,39 @@ const R8 = $1(({
8428
8428
  /* @__PURE__ */ i(
8429
8429
  B1,
8430
8430
  {
8431
- ref: T,
8431
+ ref: D,
8432
8432
  label: r,
8433
8433
  error: t,
8434
8434
  helperText: n,
8435
8435
  size: e,
8436
8436
  color: a,
8437
8437
  leftSlot: p1 || void 0,
8438
- colorLeftIcon: m1 || void 0,
8438
+ colorLeftIcon: f1 || void 0,
8439
8439
  rightSlot: l,
8440
8440
  fullWidth: !0,
8441
8441
  caret: d,
8442
8442
  disabled: h,
8443
- placeholder: f,
8443
+ placeholder: v,
8444
8444
  value: z1(),
8445
8445
  readOnly: !0,
8446
- onClick: (G) => Q(G),
8447
- onClickExtraSlot: () => Q(),
8448
- extraSlot: B ? "ChevronUp1Outlined" : "ChevronDown1Outlined",
8446
+ onClick: (X) => J(X),
8447
+ onClickExtraSlot: () => J(),
8448
+ extraSlot: T ? "ChevronUp1Outlined" : "ChevronDown1Outlined",
8449
8449
  name: o,
8450
8450
  autosize: !0,
8451
8451
  ...b
8452
8452
  }
8453
8453
  )
8454
8454
  ),
8455
- Z && H !== "tags" && $.length > 0 && /* @__PURE__ */ i("div", { className: "ui-mt-2 ui-flex ui-flex-wrap ui-gap-2", children: $.map((G) => G ? /* @__PURE__ */ i(
8455
+ y && B !== "tags" && V.length > 0 && /* @__PURE__ */ i("div", { className: "ui-mt-2 ui-flex ui-flex-wrap ui-gap-2", children: V.map((X) => X ? /* @__PURE__ */ i(
8456
8456
  Q1,
8457
8457
  {
8458
- label: G[m],
8458
+ label: X[m],
8459
8459
  color: "blue",
8460
8460
  size: "sm",
8461
- onClick: () => O1(G[m])
8461
+ onClick: () => O1(X[m])
8462
8462
  },
8463
- G[m]
8463
+ X[m]
8464
8464
  ) : null) }),
8465
8465
  J1()
8466
8466
  ] });
@@ -8500,14 +8500,14 @@ const e3 = {
8500
8500
  closeAtCorner: L = !0,
8501
8501
  title: g,
8502
8502
  tabs: h,
8503
- defaultValueTab: f,
8504
- onChangeTab: j,
8503
+ defaultValueTab: v,
8504
+ onChangeTab: H,
8505
8505
  headerButtonIcon: m,
8506
8506
  headerButtonOnClick: w,
8507
- footerButtonIcon: V,
8507
+ footerButtonIcon: O,
8508
8508
  footerButtonOnClick: k
8509
8509
  }) => {
8510
- const O = {
8510
+ const Z = {
8511
8511
  onClose: r,
8512
8512
  showCloseButton: d,
8513
8513
  closeAtCorner: L,
@@ -8522,14 +8522,14 @@ const e3 = {
8522
8522
  title: g,
8523
8523
  icon: n,
8524
8524
  tabs: h,
8525
- defaultValueTab: f,
8526
- onChangeTab: j,
8525
+ defaultValueTab: v,
8526
+ onChangeTab: H,
8527
8527
  headerButtonIcon: m,
8528
8528
  headerButtonOnClick: w,
8529
- footerButtonIcon: V,
8529
+ footerButtonIcon: O,
8530
8530
  footerButtonOnClick: k
8531
8531
  };
8532
- return /* @__PURE__ */ i(w0.Provider, { value: O, children: o });
8532
+ return /* @__PURE__ */ i(w0.Provider, { value: Z, children: o });
8533
8533
  }, h0 = () => {
8534
8534
  const o = M0(w0);
8535
8535
  if (!o)
@@ -8553,7 +8553,7 @@ const e3 = {
8553
8553
  size: "sm",
8554
8554
  fullWidth: !1
8555
8555
  }
8556
- }), [l, c] = q(r || ((d = o[0]) == null ? void 0 : d.value) || ""), C = (L) => {
8556
+ }), [l, c] = Y(r || ((d = o[0]) == null ? void 0 : d.value) || ""), C = (L) => {
8557
8557
  l !== L && (c(L), t && t(L));
8558
8558
  }, p = s({ size: n, fullWidth: a });
8559
8559
  return /* @__PURE__ */ i("div", { className: U("ui-flex ui-rounded-md ui-relative ui-bg-neutral-50", p), children: o.map((L) => /* @__PURE__ */ i(
@@ -8584,8 +8584,8 @@ const e3 = {
8584
8584
  headerButtonIcon: s,
8585
8585
  headerButtonOnClick: l
8586
8586
  }) => {
8587
- const { onClose: c, showCloseButton: C, icon: p, tabs: d, defaultValueTab: L, onChangeTab: g, headerButtonIcon: h, headerButtonOnClick: f } = h0(), j = r ?? C, m = s ?? h, w = l ?? f, V = (n == null ? void 0 : n.length) > 0 ? n : d, k = (V == null ? void 0 : V.length) ?? !1, O = a ?? g, z = e ?? L, F = (R) => {
8588
- O && O(R);
8587
+ const { onClose: c, showCloseButton: C, icon: p, tabs: d, defaultValueTab: L, onChangeTab: g, headerButtonIcon: h, headerButtonOnClick: v } = h0(), H = r ?? C, m = s ?? h, w = l ?? v, O = (n == null ? void 0 : n.length) > 0 ? n : d, k = (O == null ? void 0 : O.length) ?? !1, Z = a ?? g, P = e ?? L, E = (F) => {
8588
+ Z && Z(F);
8589
8589
  };
8590
8590
  return /* @__PURE__ */ u("div", { className: "ui-flex ui-items-center ui-p-4 ui-gap-x-md ui-justify-between ui-border-b ui-border-neutral-100 ui-relative ui-flex-wrap", children: [
8591
8591
  p && /* @__PURE__ */ i("div", { className: "ui-flex ui-items-center ui-justify-center ui-bg-blue-50 ui-rounded-full ui-gap-2 ui-w-8 ui-h-8 ui-text-blue-500", children: /* @__PURE__ */ i(v1, { slot: p, size: "lg" }) }),
@@ -8603,7 +8603,7 @@ const e3 = {
8603
8603
  size: "lg"
8604
8604
  }
8605
8605
  ),
8606
- j && /* @__PURE__ */ i(
8606
+ H && /* @__PURE__ */ i(
8607
8607
  e1,
8608
8608
  {
8609
8609
  onClick: c,
@@ -8616,8 +8616,8 @@ const e3 = {
8616
8616
  }
8617
8617
  )
8618
8618
  ] }),
8619
- k ? /* @__PURE__ */ i("div", { className: "sm:ui-absolute ui-flex ui-justify-center ui-w-full ui-mt-2 ui-overflow-x-auto ui-z-0", children: /* @__PURE__ */ i(r3, { options: V ?? [], defaultValue: z, size: "sm", onChange: (R) => {
8620
- F(R);
8619
+ k ? /* @__PURE__ */ i("div", { className: "sm:ui-absolute ui-flex ui-justify-center ui-w-full ui-mt-2 ui-overflow-x-auto ui-z-0", children: /* @__PURE__ */ i(r3, { options: O ?? [], defaultValue: P, size: "sm", onChange: (F) => {
8620
+ E(F);
8621
8621
  } }) }) : null
8622
8622
  ] });
8623
8623
  };
@@ -8625,9 +8625,9 @@ P1.displayName = "Modal.Header";
8625
8625
  const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", { className: U(r && "ui-p-4"), children: o }), Y1 = ({ children: o, footerButtonIcon: r, footerButtonOnClick: t }) => {
8626
8626
  const { onClose: n, cancelButtonText: e, successButtonText: a, onCancel: s, onSuccess: l, showCancelButton: c, showSuccessButton: C, closeAtSuccess: p, closeAtCancel: d, footerButtonIcon: L, footerButtonOnClick: g } = h0(), h = () => {
8627
8627
  s && s(), d && n();
8628
- }, f = () => {
8628
+ }, v = () => {
8629
8629
  l && l(), p && n();
8630
- }, j = r ?? L, m = t ?? g;
8630
+ }, H = r ?? L, m = t ?? g;
8631
8631
  return /* @__PURE__ */ u("div", { className: `ui-p-4 ui-border-t ui-border-neutral-100 ui-flex ${m ? "ui-justify-between" : "ui-justify-end"} ui-items-center ui-gap-2`, children: [
8632
8632
  m && /* @__PURE__ */ i(
8633
8633
  e1,
@@ -8636,14 +8636,14 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8636
8636
  variant: "outlined",
8637
8637
  rounded: !0,
8638
8638
  color: "white",
8639
- icon: j ?? "AlignJustifyOutlined",
8639
+ icon: H ?? "AlignJustifyOutlined",
8640
8640
  size: "lg",
8641
8641
  onClick: m
8642
8642
  }
8643
8643
  ),
8644
8644
  o || /* @__PURE__ */ u("div", { className: "ui-flex ui-gap-2", children: [
8645
8645
  c && /* @__PURE__ */ i(e1, { color: "white", variant: "outlined", onClick: h, children: e }),
8646
- C && /* @__PURE__ */ i(e1, { onClick: f, children: a })
8646
+ C && /* @__PURE__ */ i(e1, { onClick: v, children: a })
8647
8647
  ] })
8648
8648
  ] });
8649
8649
  }, u3 = {
@@ -8670,27 +8670,27 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8670
8670
  onCancel: L,
8671
8671
  onSuccess: g,
8672
8672
  title: h,
8673
- showCancelButton: f,
8674
- showSuccessButton: j,
8673
+ showCancelButton: v,
8674
+ showSuccessButton: H,
8675
8675
  closeAtSuccess: m,
8676
8676
  closeAtCancel: w,
8677
- tabs: V,
8677
+ tabs: O,
8678
8678
  defaultValueTab: k,
8679
- onChangeTab: O,
8680
- headerButtonIcon: z,
8681
- headerButtonOnClick: F,
8682
- footerButtonIcon: R,
8683
- footerButtonOnClick: Z
8679
+ onChangeTab: Z,
8680
+ headerButtonIcon: P,
8681
+ headerButtonOnClick: E,
8682
+ footerButtonIcon: F,
8683
+ footerButtonOnClick: y
8684
8684
  }) => {
8685
- const { isVisible: Y, animateIn: H, container: v, modalRef: b } = i3({
8685
+ const { isVisible: G, animateIn: B, container: x, modalRef: b } = i3({
8686
8686
  isOpen: o,
8687
8687
  onClose: r,
8688
8688
  disableEscapeClose: s,
8689
8689
  disableOutsideTab: l,
8690
8690
  disableOutsideClick: c
8691
8691
  });
8692
- if (!v || !o && !Y) return null;
8693
- const E = a3(e), P = l3(e), B = /* @__PURE__ */ u(
8692
+ if (!x || !o && !G) return null;
8693
+ const A = a3(e), R = l3(e), T = /* @__PURE__ */ u(
8694
8694
  "div",
8695
8695
  {
8696
8696
  "aria-modal": "true",
@@ -8703,7 +8703,7 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8703
8703
  {
8704
8704
  className: U(
8705
8705
  "ui-fixed ui-inset-0 ui-bg-black ui-backdrop-blur-sm ui-transition-opacity ui-duration-200",
8706
- H ? "ui-opacity-40" : "ui-opacity-0"
8706
+ B ? "ui-opacity-40" : "ui-opacity-0"
8707
8707
  ),
8708
8708
  onClick: c ? (M) => M.stopPropagation() : r
8709
8709
  }
@@ -8716,7 +8716,7 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8716
8716
  className: U(
8717
8717
  "ui-relative ui-z-10 ui-w-full ui-flex ui-flex-col ui-rounded-lg ui-bg-white ui-shadow-md ui-transition-all ui-duration-200 ui-transform ui-outline-none ui-my-auto",
8718
8718
  u3[n],
8719
- H ? "ui-opacity-100 ui-scale-100 ui-translate-y-0" : "ui-opacity-0 ui-scale-95 ui-translate-y-4"
8719
+ B ? "ui-opacity-100 ui-scale-100 ui-translate-y-0" : "ui-opacity-0 ui-scale-95 ui-translate-y-4"
8720
8720
  ),
8721
8721
  onClick: (M) => M.stopPropagation(),
8722
8722
  children: /* @__PURE__ */ u(
@@ -8730,23 +8730,23 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8730
8730
  successButtonText: d,
8731
8731
  onCancel: L,
8732
8732
  onSuccess: g,
8733
- showCancelButton: f,
8734
- showSuccessButton: j,
8733
+ showCancelButton: v,
8734
+ showSuccessButton: H,
8735
8735
  closeAtSuccess: m,
8736
8736
  closeAtCancel: w,
8737
8737
  title: h,
8738
8738
  icon: t,
8739
- headerButtonIcon: z,
8740
- headerButtonOnClick: F,
8741
- footerButtonIcon: R,
8742
- footerButtonOnClick: Z,
8743
- tabs: V,
8739
+ headerButtonIcon: P,
8740
+ headerButtonOnClick: E,
8741
+ footerButtonIcon: F,
8742
+ footerButtonOnClick: y,
8743
+ tabs: O,
8744
8744
  defaultValueTab: k,
8745
- onChangeTab: O,
8745
+ onChangeTab: Z,
8746
8746
  children: [
8747
- !E && (a || h ? /* @__PURE__ */ i(P1, { title: h }) : null),
8747
+ !A && (a || h ? /* @__PURE__ */ i(P1, { title: h }) : null),
8748
8748
  e && e,
8749
- !P && /* @__PURE__ */ i(Y1, {})
8749
+ !R && /* @__PURE__ */ i(Y1, {})
8750
8750
  ]
8751
8751
  }
8752
8752
  )
@@ -8755,7 +8755,7 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8755
8755
  ]
8756
8756
  }
8757
8757
  );
8758
- return e0.createPortal(B, v);
8758
+ return e0.createPortal(T, x);
8759
8759
  }, Q3 = Object.assign(d3, {
8760
8760
  Header: P1,
8761
8761
  Body: t3,
@@ -8778,122 +8778,127 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8778
8778
  disabled: l = !1,
8779
8779
  absolute: c = !1
8780
8780
  }) => {
8781
- const C = n0(), p = e || `popup-${C}`, [d, L] = q(!1), [g, h] = q({}), [f, j] = q(!1), m = t1(null), w = t1(null), V = t1(null), k = S(() => {
8782
- const Z = m.current, Y = w.current;
8783
- if (!Z || !Y) return;
8784
- const H = Z.getBoundingClientRect(), v = Y.getBoundingClientRect();
8785
- if (v.width === 0 || v.height === 0)
8781
+ const C = n0(), p = e || `popup-${C}`, [d, L] = Y(!1), [g, h] = Y({}), [v, H] = Y(!1), m = t1(null), w = t1(null), O = t1(null), k = I(() => {
8782
+ const y = m.current, G = w.current;
8783
+ if (!y || !G) return;
8784
+ const B = y.getBoundingClientRect(), x = G.getBoundingClientRect();
8785
+ if (x.width === 0 || x.height === 0)
8786
8786
  return;
8787
- const b = window.innerWidth, E = window.innerHeight;
8788
- let P = 0, B = 0;
8787
+ const b = window.innerWidth, A = window.innerHeight, R = y.offsetTop, T = y.offsetLeft, M = y.offsetWidth, f = y.offsetHeight;
8788
+ let j = 0, V = 0;
8789
8789
  if (c) {
8790
- const X = Z.offsetTop, I = Z.offsetLeft, N = V.current, T = N.clientWidth, n1 = N.clientHeight;
8791
- switch (o) {
8790
+ const Q = y.offsetTop, q = y.offsetLeft, _ = y.offsetWidth;
8791
+ console.log({
8792
+ relativeLeft: q,
8793
+ relativeWidth: _,
8794
+ position: o
8795
+ });
8796
+ const J = O.current;
8797
+ switch (J.clientWidth, J.clientHeight, o) {
8792
8798
  case "top":
8793
- P = X - v.height - r, B = I + (H.width - v.width) / 2;
8799
+ j = Q - x.height - r, V = q + (B.width - x.width) / 2;
8794
8800
  break;
8795
8801
  case "bottom":
8796
8802
  case "bottom-center":
8797
- P = X + H.height + r, B = I + (H.width - v.width) / 2;
8803
+ j = Q + B.height + r, V = q + (B.width - x.width) / 2;
8798
8804
  break;
8799
8805
  case "bottom-left":
8800
- P = X + H.height + r, B = I;
8806
+ j = Q + B.height + r, V = q;
8801
8807
  break;
8802
8808
  case "bottom-right":
8803
- P = X + H.height + r, B = I + H.width - v.width;
8809
+ j = Q + B.height + r, V = q + B.width - x.width;
8804
8810
  break;
8805
8811
  case "left":
8806
- P = X + (H.height - v.height) / 2, B = I - v.width - r;
8812
+ j = Q + (B.height - x.height) / 2, V = q - x.width - r;
8807
8813
  break;
8808
8814
  case "right":
8809
- P = X + (H.height - v.height) / 2, B = I + H.width + r;
8815
+ j = Q + (B.height - x.height) / 2, V = _ + r;
8810
8816
  break;
8811
8817
  }
8812
- P < 0 && (P = 0), B < 0 && o !== "bottom-right" && (B = 0), P + v.height > n1 && (P = Math.max(n1 - v.height, 0)), B + v.width > T && (B = Math.max(T - v.width, 0));
8813
8818
  } else {
8814
8819
  switch (o) {
8815
8820
  case "top":
8816
- P = H.top - v.height - r, B = H.left + (H.width - v.width) / 2;
8821
+ j = R - x.height - r, V = T + (M - x.width) / 2;
8817
8822
  break;
8818
8823
  case "bottom":
8819
- P = H.bottom + r, B = H.left + (H.width - v.width) / 2;
8824
+ j = R + f + r, V = T + (M - x.width) / 2;
8820
8825
  break;
8821
8826
  case "bottom-center":
8822
- P = H.bottom + r, B = H.left + (H.width - v.width) / 2;
8827
+ j = R + f + r, V = T + (M - x.width) / 2;
8823
8828
  break;
8824
8829
  case "bottom-left":
8825
- P = H.bottom + r, B = H.left;
8830
+ j = R + f + r, V = T;
8826
8831
  break;
8827
8832
  case "bottom-right":
8828
- P = H.bottom + r, B = H.right - v.width;
8833
+ j = R + f + r, V = T + M - x.width;
8829
8834
  break;
8830
8835
  case "left":
8831
- P = H.top + (H.height - v.height) / 2, B = H.left - v.width - r;
8836
+ j = R + (f - x.height) / 2, V = T - x.width - r;
8832
8837
  break;
8833
8838
  case "right":
8834
- P = H.top + (H.height - v.height) / 2, B = H.right + r;
8839
+ j = R + (f - x.height) / 2, V = M + r;
8835
8840
  break;
8836
8841
  }
8837
- B < 0 && (B = 0), B + v.width > b && (B = b - v.width), P < 0 && (P = 0), P + v.height > E && (P = E - v.height), o === "bottom-right" && v.width > H.width && (B = H.right - v.width, B < 0 && (B = 0));
8842
+ V < 0 && (V = 0), V + x.width > b && (V = b - x.width), j < 0 && (j = 0), j + x.height > A && (j = A - x.height), o === "bottom-right" && x.width > B.width && (V = B.right - x.width, V < 0 && (V = 0));
8838
8843
  }
8839
- const M = 1e3, x = parseInt(p.replace(/\D/g, "")) || 0, y = M + x % 100, $ = {
8844
+ const n1 = 1e3, $ = parseInt(p.replace(/\D/g, "")) || 0, S = n1 + $ % 100, D = {
8840
8845
  position: c ? "absolute" : "fixed",
8841
- top: `${P}px`,
8842
- left: `${B}px`,
8843
- zIndex: y
8846
+ top: `${j}px`,
8847
+ left: `${V}px`,
8848
+ zIndex: S
8844
8849
  };
8845
- h($), j(!0);
8846
- }, [o, r, p, c]), O = S(() => {
8847
- d && f && requestAnimationFrame(() => {
8850
+ h(D), H(!0);
8851
+ }, [o, r, p, c]), Z = I(() => {
8852
+ d && v && requestAnimationFrame(() => {
8848
8853
  k();
8849
8854
  });
8850
- }, [d, f, k]), z = S(() => {
8851
- d && f && requestAnimationFrame(() => {
8855
+ }, [d, v, k]), P = I(() => {
8856
+ d && v && requestAnimationFrame(() => {
8852
8857
  k();
8853
8858
  });
8854
- }, [d, f, k]), F = (Z) => {
8855
- Z && Z.stopPropagation(), !l && (d ? R() : (s3(p), h({}), j(!1), L(!0), F1.add(p), a == null || a()));
8856
- }, R = () => {
8857
- L(!1), j(!1), F1.delete(p), s == null || s();
8859
+ }, [d, v, k]), E = (y) => {
8860
+ y && y.stopPropagation(), !l && (d ? F() : (s3(p), h({}), H(!1), L(!0), F1.add(p), a == null || a()));
8861
+ }, F = () => {
8862
+ L(!1), H(!1), F1.delete(p), s == null || s();
8858
8863
  };
8859
8864
  return W(() => {
8860
8865
  if (d) {
8861
- const Z = () => {
8862
- const Y = w.current;
8863
- if (Y) {
8864
- const H = Y.getBoundingClientRect();
8865
- H.width > 0 && H.height > 0 && H.width !== 0 && H.height !== 0 ? k() : setTimeout(() => {
8866
- requestAnimationFrame(Z);
8866
+ const y = () => {
8867
+ const G = w.current;
8868
+ if (G) {
8869
+ const B = G.getBoundingClientRect();
8870
+ B.width > 0 && B.height > 0 && B.width !== 0 && B.height !== 0 ? k() : setTimeout(() => {
8871
+ requestAnimationFrame(y);
8867
8872
  }, 10);
8868
8873
  }
8869
8874
  };
8870
8875
  setTimeout(() => {
8871
- requestAnimationFrame(Z);
8876
+ requestAnimationFrame(y);
8872
8877
  }, 0);
8873
8878
  }
8874
8879
  }, [d, k]), p0({
8875
8880
  isActive: d,
8876
8881
  disabled: l,
8877
8882
  elementRef: w,
8878
- containerRef: V,
8883
+ containerRef: O,
8879
8884
  elementId: p,
8880
8885
  elementType: "popup",
8881
8886
  closeOnClickOutside: t,
8882
- onOutsideClick: R
8883
- }), q1(d, R, !n), X8(
8884
- d && f,
8885
- O,
8886
- z
8887
+ onOutsideClick: F
8888
+ }), q1(d, F, !n), X8(
8889
+ d && v,
8890
+ Z,
8891
+ P
8887
8892
  ), {
8888
8893
  isOpen: d,
8889
8894
  popupStyle: g,
8890
- isPositioned: f,
8895
+ isPositioned: v,
8891
8896
  triggerRef: m,
8892
8897
  popupRef: w,
8893
- containerRef: V,
8898
+ containerRef: O,
8894
8899
  popupUniqueId: p,
8895
- togglePopup: F,
8896
- closePopup: R
8900
+ togglePopup: E,
8901
+ closePopup: F
8897
8902
  };
8898
8903
  }, p3 = $1(({
8899
8904
  children: o,
@@ -8911,27 +8916,27 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8911
8916
  color: L = "white",
8912
8917
  size: g = "md",
8913
8918
  textColor: h = "inherit",
8914
- rounded: f = !1,
8915
- slotRight: j,
8919
+ rounded: v = !1,
8920
+ slotRight: H,
8916
8921
  colorIcon: m,
8917
8922
  tooltip: w,
8918
- tooltipPosition: V,
8923
+ tooltipPosition: O,
8919
8924
  tooltipAlignment: k,
8920
- tooltipColor: O,
8921
- tooltipDelay: z,
8922
- absolute: F = !1,
8923
- ...R
8924
- }, Z) => {
8925
+ tooltipColor: Z,
8926
+ tooltipDelay: P,
8927
+ absolute: E = !1,
8928
+ ...F
8929
+ }, y) => {
8925
8930
  const {
8926
- isOpen: Y,
8927
- popupStyle: H,
8928
- isPositioned: v,
8931
+ isOpen: G,
8932
+ popupStyle: B,
8933
+ isPositioned: x,
8929
8934
  triggerRef: b,
8930
- popupRef: E,
8931
- containerRef: P,
8932
- popupUniqueId: B,
8935
+ popupRef: A,
8936
+ containerRef: R,
8937
+ popupUniqueId: T,
8933
8938
  togglePopup: M,
8934
- closePopup: x
8939
+ closePopup: f
8935
8940
  } = c3({
8936
8941
  position: t,
8937
8942
  offset: n,
@@ -8941,17 +8946,46 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8941
8946
  onOpen: c,
8942
8947
  onClose: C,
8943
8948
  disabled: p,
8944
- absolute: F
8949
+ absolute: E
8945
8950
  });
8946
- return U1(Z, () => ({
8951
+ U1(y, () => ({
8947
8952
  open: () => {
8948
8953
  p || M();
8949
8954
  },
8950
8955
  close: () => {
8951
- x();
8956
+ f();
8952
8957
  },
8953
- isOpen: () => Y
8954
- }), [p, M, x, Y]), /* @__PURE__ */ u("div", { ref: P, className: "ui-relative", "data-popup-container-id": B, children: [
8958
+ isOpen: () => G
8959
+ }), [p, M, f, G]);
8960
+ const j = () => {
8961
+ if (!G)
8962
+ return console.log("🔍 [Popup Debug] Popup no está abierto, no renderizando"), null;
8963
+ const V = {
8964
+ position: E ? "absolute" : "fixed",
8965
+ top: E ? "auto" : "-9999px",
8966
+ left: E ? "auto" : "-9999px",
8967
+ visibility: x ? "visible" : "hidden",
8968
+ opacity: x ? 1 : 0,
8969
+ transition: "opacity 0.1s ease-in-out",
8970
+ ...B
8971
+ }, n1 = /* @__PURE__ */ i(
8972
+ "div",
8973
+ {
8974
+ ref: A,
8975
+ id: T,
8976
+ "data-popup-id": T,
8977
+ style: V,
8978
+ className: `ui-bg-white ui-border ui-border-neutral-100 ui-rounded-sm ui-shadow-lg ui-overflow-hidden ${l}`,
8979
+ onClick: (S) => S.stopPropagation(),
8980
+ ...F,
8981
+ children: o
8982
+ }
8983
+ );
8984
+ return E ? n1 : b1(n1, document.body);
8985
+ };
8986
+ return /* @__PURE__ */ u("div", { ref: R, className: U(
8987
+ "ui-relative"
8988
+ ), "data-popup-container-id": T, children: [
8955
8989
  /* @__PURE__ */ i("div", { ref: b, className: "ui-w-fit", children: /* @__PURE__ */ i(
8956
8990
  j1,
8957
8991
  {
@@ -8960,56 +8994,19 @@ const t3 = ({ children: o, withPadding: r = !0 }) => /* @__PURE__ */ i("div", {
8960
8994
  variant: d,
8961
8995
  color: L,
8962
8996
  size: g,
8963
- rounded: f,
8964
- slotRight: j,
8997
+ rounded: v,
8998
+ slotRight: H,
8965
8999
  colorIcon: m,
8966
9000
  textColor: h,
8967
9001
  tooltip: w,
8968
- tooltipPosition: V,
9002
+ tooltipPosition: O,
8969
9003
  tooltipAlignment: k,
8970
- tooltipColor: O,
8971
- tooltipDelay: z,
9004
+ tooltipColor: Z,
9005
+ tooltipDelay: P,
8972
9006
  children: r || ""
8973
9007
  }
8974
9008
  ) }),
8975
- (() => {
8976
- if (!Y)
8977
- return console.log("🔍 [Popup Debug] Popup no está abierto, no renderizando"), null;
8978
- console.log("🔍 [Popup Debug] Renderizando popup:", {
8979
- isOpen: Y,
8980
- isPositioned: v,
8981
- popupStyle: H,
8982
- absolute: F,
8983
- popupId: B
8984
- });
8985
- const $ = {
8986
- position: F ? "absolute" : "fixed",
8987
- top: F ? "auto" : "-9999px",
8988
- left: F ? "auto" : "-9999px",
8989
- visibility: v ? "visible" : "hidden",
8990
- opacity: v ? 1 : 0,
8991
- transition: "opacity 0.1s ease-in-out",
8992
- ...H
8993
- };
8994
- console.log("🔍 [Popup Debug] Estilo inicial del popup:", $);
8995
- const X = /* @__PURE__ */ i(
8996
- "div",
8997
- {
8998
- ref: E,
8999
- id: B,
9000
- "data-popup-id": B,
9001
- style: $,
9002
- className: `ui-bg-white ui-border ui-border-neutral-100 ui-rounded-sm ui-shadow-lg ui-overflow-hidden ${l}`,
9003
- onClick: (N) => N.stopPropagation(),
9004
- ...R,
9005
- children: o
9006
- }
9007
- ), I = F ? X : b1(X, document.body);
9008
- return console.log("🔍 [Popup Debug] Popup renderizado:", {
9009
- usingPortal: !F,
9010
- result: !!I
9011
- }), I;
9012
- })()
9009
+ j()
9013
9010
  ] });
9014
9011
  });
9015
9012
  p3.displayName = "Popup";
@@ -9038,16 +9035,16 @@ const C3 = [
9038
9035
  }, [o, r, l]);
9039
9036
  const d = (w) => {
9040
9037
  w >= 1 && w <= r && l(w);
9041
- }, [L, g] = q(t);
9038
+ }, [L, g] = Y(t);
9042
9039
  W(() => {
9043
9040
  g(t);
9044
9041
  }, [t]);
9045
- const h = Math.min(o * (t || 0), n || 0) || 0, j = (() => {
9042
+ const h = Math.min(o * (t || 0), n || 0) || 0, H = (() => {
9046
9043
  const w = Math.min(
9047
9044
  Math.max(o, 1),
9048
9045
  Math.max(r - p + 1, 1)
9049
- ), V = Math.min(w + p - 1, r);
9050
- return Array.from({ length: V - w + 1 }, (k, O) => w + O);
9046
+ ), O = Math.min(w + p - 1, r);
9047
+ return Array.from({ length: O - w + 1 }, (k, Z) => w + Z);
9051
9048
  })(), m = (w) => {
9052
9049
  g(w), c(w), d(1);
9053
9050
  };
@@ -9103,7 +9100,7 @@ const C3 = [
9103
9100
  "aria-label": "Ir a la página anterior"
9104
9101
  }
9105
9102
  ),
9106
- j.map((w) => /* @__PURE__ */ i(
9103
+ H.map((w) => /* @__PURE__ */ i(
9107
9104
  e1,
9108
9105
  {
9109
9106
  square: !0,
@@ -9379,15 +9376,15 @@ const C3 = [
9379
9376
  name: a,
9380
9377
  id: s
9381
9378
  }) => {
9382
- const [l, c] = q(!1), [C, p] = q(!1), d = s || `radio-${Math.random().toString(36).substr(2, 9)}`, g = o !== void 0 ? o : r !== void 0 ? r : !1, h = S(() => t ? g ? "disabledChecked" : "disabledUnchecked" : l ? g ? "checkedActive" : "uncheckedActive" : C ? g ? "checkedHover" : "uncheckedHover" : g ? "checked" : "unchecked", [t, g, l, C]), f = S(() => {
9379
+ const [l, c] = Y(!1), [C, p] = Y(!1), d = s || `radio-${Math.random().toString(36).substr(2, 9)}`, g = o !== void 0 ? o : r !== void 0 ? r : !1, h = I(() => t ? g ? "disabledChecked" : "disabledUnchecked" : l ? g ? "checkedActive" : "uncheckedActive" : C ? g ? "checkedHover" : "uncheckedHover" : g ? "checked" : "unchecked", [t, g, l, C]), v = I(() => {
9383
9380
  t || c(!0);
9384
- }, [t]), j = S(() => {
9381
+ }, [t]), H = I(() => {
9385
9382
  c(!1);
9386
- }, []), m = S(() => {
9383
+ }, []), m = I(() => {
9387
9384
  t || p(!0);
9388
- }, [t]), w = S(() => {
9385
+ }, [t]), w = I(() => {
9389
9386
  p(!1), c(!1);
9390
- }, []), V = S((k) => {
9387
+ }, []), O = I((k) => {
9391
9388
  t || (k.preventDefault(), n && n({
9392
9389
  target: {
9393
9390
  value: e,
@@ -9403,11 +9400,11 @@ const C3 = [
9403
9400
  isActive: l,
9404
9401
  isHovered: C,
9405
9402
  handlers: {
9406
- handleMouseDown: f,
9407
- handleMouseUp: j,
9403
+ handleMouseDown: v,
9404
+ handleMouseUp: H,
9408
9405
  handleMouseEnter: m,
9409
9406
  handleMouseLeave: w,
9410
- handleClick: V
9407
+ handleClick: O
9411
9408
  }
9412
9409
  };
9413
9410
  }, M3 = ({
@@ -9423,7 +9420,7 @@ const C3 = [
9423
9420
  defaultChecked: C,
9424
9421
  ...p
9425
9422
  }) => {
9426
- const d = l !== void 0, L = d ? l : C !== void 0 ? C : !1, { state: g, radioId: h, handlers: f } = g3({
9423
+ const d = l !== void 0, L = d ? l : C !== void 0 ? C : !1, { state: g, radioId: h, handlers: v } = g3({
9427
9424
  checked: l,
9428
9425
  defaultChecked: C,
9429
9426
  disabled: n,
@@ -9450,11 +9447,11 @@ const C3 = [
9450
9447
  "label",
9451
9448
  {
9452
9449
  htmlFor: h,
9453
- onClick: f.handleClick,
9454
- onMouseDown: f.handleMouseDown,
9455
- onMouseUp: f.handleMouseUp,
9456
- onMouseEnter: f.handleMouseEnter,
9457
- onMouseLeave: f.handleMouseLeave,
9450
+ onClick: v.handleClick,
9451
+ onMouseDown: v.handleMouseDown,
9452
+ onMouseUp: v.handleMouseUp,
9453
+ onMouseEnter: v.handleMouseEnter,
9454
+ onMouseLeave: v.handleMouseLeave,
9458
9455
  className: U(
9459
9456
  "ui-relative ui-inline-flex ui-items-center ui-cursor-pointer",
9460
9457
  n && "ui-cursor-not-allowed"
@@ -9498,14 +9495,14 @@ const C3 = [
9498
9495
  }
9499
9496
  )
9500
9497
  ] });
9501
- }, m3 = ({
9498
+ }, f3 = ({
9502
9499
  value: o,
9503
9500
  onChange: r,
9504
9501
  options: t
9505
9502
  }) => {
9506
- const [n, e] = q(
9503
+ const [n, e] = Y(
9507
9504
  o
9508
- ), a = o !== void 0 ? o : n, s = S((l) => {
9505
+ ), a = o !== void 0 ? o : n, s = I((l) => {
9509
9506
  r ? r(l) : e(l);
9510
9507
  }, [r]);
9511
9508
  return {
@@ -9523,7 +9520,7 @@ const C3 = [
9523
9520
  className: l,
9524
9521
  name: c
9525
9522
  }) => {
9526
- const { selectedValue: C, handleChange: p } = m3({
9523
+ const { selectedValue: C, handleChange: p } = f3({
9527
9524
  value: r,
9528
9525
  onChange: t,
9529
9526
  options: o
@@ -9556,13 +9553,13 @@ const C3 = [
9556
9553
  ))
9557
9554
  }
9558
9555
  );
9559
- }, f3 = ({
9556
+ }, m3 = ({
9560
9557
  steps: o,
9561
9558
  currentStep: r,
9562
9559
  onClickStep: t,
9563
9560
  onStepChange: n
9564
9561
  }) => {
9565
- const [e, a] = q(0), s = r !== void 0 ? r : e;
9562
+ const [e, a] = Y(0), s = r !== void 0 ? r : e;
9566
9563
  return {
9567
9564
  currentStep: s,
9568
9565
  getColorClasses: (p) => {
@@ -9749,23 +9746,23 @@ const C3 = [
9749
9746
  withScroll: d = !0,
9750
9747
  vertical: L = !1
9751
9748
  }) => {
9752
- const { currentStep: g, getColorClasses: h, handleStepClick: f, getStepStatus: j } = f3({
9749
+ const { currentStep: g, getColorClasses: h, handleStepClick: v, getStepStatus: H } = m3({
9753
9750
  steps: o,
9754
9751
  currentStep: c,
9755
9752
  onClickStep: C,
9756
9753
  onStepChange: p
9757
9754
  }), m = h(r || "blue");
9758
- return /* @__PURE__ */ i("div", { className: `${L ? `ui-flex ui-flex-col ui-items-center ui-min-h-0 ${d ? "ui-overflow-y-auto ui-overflow-x-hidden" : ""} mb-8` : `ui-flex ui-items-center ui-min-w-0 flex-col ${d ? "ui-overflow-x-auto ui-overflow-y-hidden" : ""} mb-8`} ${V3({ color: r, size: t, className: n })}`, children: o.map((V, k) => {
9759
- const O = j(k), z = k === o.length - 1;
9755
+ return /* @__PURE__ */ i("div", { className: `${L ? `ui-flex ui-flex-col ui-items-center ui-min-h-0 ${d ? "ui-overflow-y-auto ui-overflow-x-hidden" : ""}` : `ui-flex ui-items-center ui-min-w-0 ${d ? "ui-overflow-x-auto ui-overflow-y-hidden" : ""}`} ${V3({ color: r, size: t, className: n })}`, children: o.map((O, k) => {
9756
+ const Z = H(k), P = k === o.length - 1;
9760
9757
  return /* @__PURE__ */ i(
9761
9758
  j3,
9762
9759
  {
9763
- step: V,
9760
+ step: O,
9764
9761
  stepIndex: k,
9765
- status: O,
9762
+ status: Z,
9766
9763
  colorClasses: m,
9767
- isLast: z,
9768
- onStepClick: f,
9764
+ isLast: P,
9765
+ onStepClick: v,
9769
9766
  classNameStep: e,
9770
9767
  classNameStepLabel: a,
9771
9768
  classNameStepIcon: s,
@@ -9950,7 +9947,7 @@ const Z1 = /* @__PURE__ */ new Map(), R1 = {
9950
9947
  return D1;
9951
9948
  }
9952
9949
  }, B3 = () => {
9953
- const [o, r] = q([]), t = t1(/* @__PURE__ */ new Map()), n = t1(null);
9950
+ const [o, r] = Y([]), t = t1(/* @__PURE__ */ new Map()), n = t1(null);
9954
9951
  return W(() => {
9955
9952
  const a = R1.getListeners();
9956
9953
  if (n.current) {
@@ -9981,7 +9978,7 @@ const Z1 = /* @__PURE__ */ new Map(), R1 = {
9981
9978
  const l = a.indexOf(s);
9982
9979
  l > -1 && a.splice(l, 1), t.current.forEach((c) => clearTimeout(c)), t.current.clear(), n.current = null;
9983
9980
  };
9984
- }, []), { toastsByPosition: f1(() => o.reduce((a, s) => {
9981
+ }, []), { toastsByPosition: m1(() => o.reduce((a, s) => {
9985
9982
  const l = s.position || "top-right";
9986
9983
  return a[l] || (a[l] = []), a[l].push(s), a;
9987
9984
  }, {}), [o]), toasts: o };
@@ -9998,7 +9995,7 @@ const Z1 = /* @__PURE__ */ new Map(), R1 = {
9998
9995
  "bottom-right": "ui-fixed ui-bottom-5 ui-right-5"
9999
9996
  })[r]
10000
9997
  }), S3 = ({ toastItem: o }) => {
10001
- const [r, t] = q(!0);
9998
+ const [r, t] = Y(!0);
10002
9999
  W(() => {
10003
10000
  o.isLeaving && setTimeout(() => {
10004
10001
  t(!1);
@@ -10103,7 +10100,7 @@ export {
10103
10100
  h0 as useModalContext,
10104
10101
  B8 as usePortal,
10105
10102
  g3 as useRadioButton,
10106
- m3 as useRadioButtonGroup,
10107
- f3 as useStepper
10103
+ f3 as useRadioButtonGroup,
10104
+ m3 as useStepper
10108
10105
  };
10109
10106
  //# sourceMappingURL=index.esm.js.map