@isettingkit/business-rules 2.1.3 → 2.1.5

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.
Files changed (2) hide show
  1. package/dist/index.es.js +389 -364
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { jsx as a, jsxs as m, Fragment as O } from "react/jsx-runtime";
2
- import { MdOutlineDelete as rn, MdClear as on, MdAdd as Be, MdOutlineCreate as Tt, MdExpandLess as Ct, MdExpandMore as vn, MdInfo as Dt, MdCached as St, MdOutlineInfo as Et, MdClose as Nt, MdOutlineFilterAltOff as Jn, MdOutlineFilterAlt as et, MdChevronRight as Rn, MdArrowRight as kt, MdOutlineArrowCircleLeft as $t, MdOutlineArrowCircleRight as At, MdOutlineChevronRight as It, MdOutlineError as Ft } from "react-icons/md";
3
- import { inube as S, Stack as v, Divider as _, Icon as P, Text as k, SkeletonLine as Q, useMediaQuery as Z, Blanket as an, Button as H, Grid as qe, Toggle as ln, Checkbox as Sn, Date as ke, Box as Rt, Tag as ve, SkeletonIcon as Lt, Fieldset as ze, Tabs as Ot, OptionList as Pt, Checkpicker as Mt, Label as zt, OptionItem as Vt } from "@inubekit/inubekit";
2
+ import { MdOutlineDelete as rn, MdClear as on, MdAdd as qe, MdOutlineCreate as Tt, MdExpandLess as Ct, MdExpandMore as vn, MdInfo as Dt, MdCached as St, MdOutlineInfo as Et, MdClose as Nt, MdOutlineFilterAltOff as Jn, MdOutlineFilterAlt as et, MdChevronRight as Fn, MdArrowRight as kt, MdOutlineArrowCircleLeft as $t, MdOutlineArrowCircleRight as At, MdOutlineChevronRight as It, MdOutlineError as Rt } from "react-icons/md";
3
+ import { inube as S, Stack as v, Divider as U, Icon as P, Text as k, SkeletonLine as Q, useMediaQuery as J, Blanket as an, Button as H, Grid as Be, Toggle as ln, Checkbox as Sn, Date as ke, Box as Ft, Tag as ve, SkeletonIcon as Lt, Fieldset as ze, Tabs as Ot, OptionList as Pt, Checkpicker as Mt, Label as zt, OptionItem as Vt } from "@inubekit/inubekit";
4
4
  import C, { keyframes as En, ThemeContext as Nn } from "styled-components";
5
- import { ValueDataType as V, ValueHowToSetUp as K, DecisionConditionRender as Je, DecisionConditionRenderNew as Ln } from "@isettingkit/input";
5
+ import { ValueDataType as z, ValueHowToSetUp as K, DecisionConditionRender as Je, DecisionConditionRenderNew as Ln } from "@isettingkit/input";
6
6
  import { DecisionViewConditionRenderer as Se, DecisionViewConditionRendererNew as Xe } from "@isettingkit/view";
7
7
  import { createPortal as sn } from "react-dom";
8
8
  import { useFormik as kn } from "formik";
9
- import { string as le, mixed as Ie, object as te, number as ie, lazy as Ue, date as $e } from "yup";
10
- import U, { useState as M, useRef as Ee, useEffect as xe, useContext as $n, forwardRef as Ht, useMemo as nt, useCallback as _t } from "react";
11
- import { Link as tt, useLocation as Ut } from "react-router-dom";
12
- import jt from "axios";
13
- import { franc as Bt } from "franc-min";
14
- const qt = C.div`
9
+ import { string as re, mixed as Ie, object as Z, number as oe, lazy as je, date as $e } from "yup";
10
+ import j, { useState as M, useRef as Ee, useEffect as xe, useContext as $n, forwardRef as Ht, useMemo as nt, useCallback as Ut } from "react";
11
+ import { Link as tt, useLocation as jt } from "react-router-dom";
12
+ import _t from "axios";
13
+ import { franc as qt } from "franc-min";
14
+ const Bt = C.div`
15
15
  border-radius: 8px;
16
16
  border: 1px solid
17
17
  ${({ theme: e }) => {
@@ -48,10 +48,10 @@ C.div`
48
48
  `;
49
49
  const Ge = (e) => {
50
50
  const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
51
- return /* @__PURE__ */ a(qt, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
51
+ return /* @__PURE__ */ a(Bt, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
52
52
  n,
53
53
  t && /* @__PURE__ */ m(O, { children: [
54
- /* @__PURE__ */ a(_, {}),
54
+ /* @__PURE__ */ a(U, {}),
55
55
  /* @__PURE__ */ a(v, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
56
56
  P,
57
57
  {
@@ -131,7 +131,7 @@ const Jt = {
131
131
  type: "decision"
132
132
  }
133
133
  ) }, t.ruleName),
134
- /* @__PURE__ */ a(_, { dashed: !0 }),
134
+ /* @__PURE__ */ a(U, { dashed: !0 }),
135
135
  /* @__PURE__ */ a(Pn, { children: /* @__PURE__ */ m(
136
136
  v,
137
137
  {
@@ -160,7 +160,7 @@ const Jt = {
160
160
  )
161
161
  }
162
162
  ) }) }, u.conditionName)),
163
- p.length > 0 && /* @__PURE__ */ a(_, { dashed: !0 }),
163
+ p.length > 0 && /* @__PURE__ */ a(U, { dashed: !0 }),
164
164
  d && /* @__PURE__ */ a(O, { children: r && /* @__PURE__ */ a(
165
165
  Se,
166
166
  {
@@ -179,7 +179,7 @@ const Jt = {
179
179
  /* @__PURE__ */ a(Q, { animated: !0, width: "85px" })
180
180
  ] }, "loading"),
181
181
  /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
182
- /* @__PURE__ */ a(_, { dashed: !0 }),
182
+ /* @__PURE__ */ a(U, { dashed: !0 }),
183
183
  /* @__PURE__ */ a(Q, { animated: !0, width: "150px" })
184
184
  ] }),
185
185
  /* @__PURE__ */ a(Pn, { children: /* @__PURE__ */ a(
@@ -212,7 +212,7 @@ const Jt = {
212
212
  labelName: r == null ? void 0 : r.terms,
213
213
  value: String(n.effectiveFrom),
214
214
  howToSetTheDecision: K.RANGE,
215
- decisionDataType: V.DATE
215
+ decisionDataType: z.DATE
216
216
  },
217
217
  valueData: Ve({
218
218
  labelName: r == null ? void 0 : r.terms,
@@ -221,20 +221,20 @@ const Jt = {
221
221
  to: String(n.validUntil)
222
222
  },
223
223
  howToSetTheDecision: K.RANGE,
224
- decisionDataType: V.DATE
224
+ decisionDataType: z.DATE
225
225
  })
226
226
  } : o && !i ? {
227
227
  element: {
228
228
  labelName: r == null ? void 0 : r.terms,
229
229
  value: String(n.effectiveFrom),
230
230
  howToSetTheDecision: K.EQUAL,
231
- decisionDataType: V.DATE
231
+ decisionDataType: z.DATE
232
232
  },
233
233
  valueData: Ve({
234
234
  labelName: r == null ? void 0 : r.terms,
235
235
  value: String(n.effectiveFrom),
236
236
  howToSetTheDecision: K.EQUAL,
237
- decisionDataType: V.DATE
237
+ decisionDataType: z.DATE
238
238
  })
239
239
  } : null, d = n ? {
240
240
  labelName: n.labelName || "",
@@ -300,7 +300,7 @@ const Jt = {
300
300
  throw new Error(
301
301
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
302
302
  );
303
- const s = Z("(max-width: 400px)");
303
+ const s = J("(max-width: 400px)");
304
304
  return sn(
305
305
  /* @__PURE__ */ a(nr, { smallScreen: s, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(tr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
306
306
  /* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
@@ -440,7 +440,7 @@ const ot = C.div`
440
440
  handleView: () => r ? r() : null,
441
441
  controls: !1,
442
442
  children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
443
- /* @__PURE__ */ a(P, { appearance: "gray", icon: /* @__PURE__ */ a(Be, {}), size: "35px" }),
443
+ /* @__PURE__ */ a(P, { appearance: "gray", icon: /* @__PURE__ */ a(qe, {}), size: "35px" }),
444
444
  /* @__PURE__ */ a(k, { appearance: "gray", type: "body", size: "large", children: i })
445
445
  ] })
446
446
  }
@@ -504,7 +504,7 @@ const ot = C.div`
504
504
  handleSubmitForm: g,
505
505
  handleDelete: h,
506
506
  terms: f = !0
507
- } = e, w = Z("(max-width: 681px)"), y = Z("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: T } = cr({
507
+ } = e, w = J("(max-width: 681px)"), y = J("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: T } = cr({
508
508
  controls: n,
509
509
  customTitleContentAddCard: t,
510
510
  decisions: o,
@@ -546,7 +546,7 @@ const ot = C.div`
546
546
  /* @__PURE__ */ a(
547
547
  H,
548
548
  {
549
- iconBefore: /* @__PURE__ */ a(Be, {}),
549
+ iconBefore: /* @__PURE__ */ a(qe, {}),
550
550
  onClick: () => u ? u() : null,
551
551
  children: t || "Agregar decisión"
552
552
  }
@@ -554,7 +554,7 @@ const ot = C.div`
554
554
  ]
555
555
  }
556
556
  ) : /* @__PURE__ */ m(
557
- qe,
557
+ Be,
558
558
  {
559
559
  templateColumns: y ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
560
560
  autoFlow: "row dense",
@@ -644,7 +644,7 @@ const ot = C.div`
644
644
  throw new Error(
645
645
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
646
646
  );
647
- const s = Z("(max-width: 400px)");
647
+ const s = J("(max-width: 400px)");
648
648
  return sn(
649
649
  /* @__PURE__ */ a(ur, { $smallScreen: s, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
650
650
  /* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
@@ -812,7 +812,7 @@ const fr = C.div`
812
812
  type: "decision"
813
813
  }
814
814
  ) }, t.ruleName),
815
- /* @__PURE__ */ a(_, { dashed: !0 }),
815
+ /* @__PURE__ */ a(U, { dashed: !0 }),
816
816
  /* @__PURE__ */ a(zn, { children: /* @__PURE__ */ m(
817
817
  v,
818
818
  {
@@ -841,7 +841,7 @@ const fr = C.div`
841
841
  )
842
842
  }
843
843
  ) }) }, u.conditionName)),
844
- p.length > 0 && /* @__PURE__ */ a(_, { dashed: !0 }),
844
+ p.length > 0 && /* @__PURE__ */ a(U, { dashed: !0 }),
845
845
  d && /* @__PURE__ */ a(O, { children: r && /* @__PURE__ */ a(
846
846
  Se,
847
847
  {
@@ -860,7 +860,7 @@ const fr = C.div`
860
860
  /* @__PURE__ */ a(Q, { animated: !0, width: "85px" })
861
861
  ] }, "loading"),
862
862
  /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
863
- /* @__PURE__ */ a(_, { dashed: !0 }),
863
+ /* @__PURE__ */ a(U, { dashed: !0 }),
864
864
  /* @__PURE__ */ a(Q, { animated: !0, width: "150px" })
865
865
  ] }),
866
866
  /* @__PURE__ */ a(zn, { children: /* @__PURE__ */ a(
@@ -895,7 +895,7 @@ const fr = C.div`
895
895
  labelName: r == null ? void 0 : r.terms,
896
896
  value: String(n.effectiveFrom),
897
897
  howToSetTheDecision: K.RANGE,
898
- decisionDataType: V.DATE
898
+ decisionDataType: z.DATE
899
899
  },
900
900
  valueData: He({
901
901
  labelName: r == null ? void 0 : r.terms,
@@ -904,20 +904,20 @@ const fr = C.div`
904
904
  to: String(n.validUntil)
905
905
  },
906
906
  howToSetTheDecision: K.RANGE,
907
- decisionDataType: V.DATE
907
+ decisionDataType: z.DATE
908
908
  })
909
909
  } : o && !i ? {
910
910
  element: {
911
911
  labelName: r == null ? void 0 : r.terms,
912
912
  value: String(n.effectiveFrom),
913
913
  howToSetTheDecision: K.EQUAL,
914
- decisionDataType: V.DATE
914
+ decisionDataType: z.DATE
915
915
  },
916
916
  valueData: He({
917
917
  labelName: r == null ? void 0 : r.terms,
918
918
  value: String(n.effectiveFrom),
919
919
  howToSetTheDecision: K.EQUAL,
920
- decisionDataType: V.DATE
920
+ decisionDataType: z.DATE
921
921
  })
922
922
  } : null, d = n ? {
923
923
  labelName: n.labelName || "",
@@ -979,7 +979,7 @@ const Ir = (e) => {
979
979
  return /* @__PURE__ */ a(Ar, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
980
980
  n,
981
981
  t && /* @__PURE__ */ m(O, { children: [
982
- /* @__PURE__ */ a(_, {}),
982
+ /* @__PURE__ */ a(U, {}),
983
983
  /* @__PURE__ */ a(v, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
984
984
  P,
985
985
  {
@@ -994,7 +994,7 @@ const Ir = (e) => {
994
994
  ) })
995
995
  ] })
996
996
  ] }) });
997
- }, Fr = (e) => {
997
+ }, Rr = (e) => {
998
998
  const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: i } = e;
999
999
  return n ? /* @__PURE__ */ a(Ye, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
1000
1000
  /* @__PURE__ */ a(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
@@ -1015,7 +1015,7 @@ const Ir = (e) => {
1015
1015
  }
1016
1016
  )
1017
1017
  ] }) }, n.decisionId) : null;
1018
- }, Rr = (e) => {
1018
+ }, Fr = (e) => {
1019
1019
  const {
1020
1020
  customTitleContentAddCard: n,
1021
1021
  index: t,
@@ -1037,7 +1037,7 @@ const Ir = (e) => {
1037
1037
  handleView: () => r ? r() : null,
1038
1038
  controls: !1,
1039
1039
  children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
1040
- /* @__PURE__ */ a(P, { appearance: "gray", icon: /* @__PURE__ */ a(Be, {}), size: "35px" }),
1040
+ /* @__PURE__ */ a(P, { appearance: "gray", icon: /* @__PURE__ */ a(qe, {}), size: "35px" }),
1041
1041
  /* @__PURE__ */ a(k, { appearance: "gray", type: "body", size: "large", children: i })
1042
1042
  ] })
1043
1043
  }
@@ -1047,13 +1047,13 @@ const Ir = (e) => {
1047
1047
  ] }) }, `add-decision-${t}`);
1048
1048
  }, Lr = {
1049
1049
  loading: br,
1050
- decision: Fr,
1051
- add: Rr
1050
+ decision: Rr,
1051
+ add: Fr
1052
1052
  }, xn = (e) => {
1053
1053
  const { type: n } = e, t = Lr[n];
1054
1054
  return t ? t(e) : null;
1055
1055
  }, Or = (e) => ({
1056
- schema: le().required("Requerido").test(
1056
+ schema: re().required("Requerido").test(
1057
1057
  "non-empty",
1058
1058
  "El valor no puede estar vacío",
1059
1059
  (n) => n != null && n.trim() !== ""
@@ -1080,9 +1080,9 @@ const Ir = (e) => {
1080
1080
  }), zr = (e) => {
1081
1081
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
1082
1082
  return {
1083
- schema: te({
1084
- from: ie().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
1085
- to: ie().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
1083
+ schema: Z({
1084
+ from: oe().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
1085
+ to: oe().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
1086
1086
  "is-greater",
1087
1087
  "El campo 'Rango hasta' debe ser mayor que 'Rango desde'",
1088
1088
  function(r) {
@@ -1093,11 +1093,11 @@ const Ir = (e) => {
1093
1093
  }),
1094
1094
  value: { from: n, to: t }
1095
1095
  };
1096
- }, gn = (e, n) => n === V.PERCENTAGE ? {
1097
- schema: ie().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
1096
+ }, gn = (e, n) => n === z.PERCENTAGE ? {
1097
+ schema: oe().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
1098
1098
  value: e
1099
1099
  } : {
1100
- schema: le().required("Requerido"),
1100
+ schema: re().required("Requerido"),
1101
1101
  value: e
1102
1102
  }, Vr = {
1103
1103
  [N.LIST_OF_VALUES]: Pr,
@@ -1108,7 +1108,7 @@ const Ir = (e) => {
1108
1108
  [N.EQUAL]: gn
1109
1109
  }, Hr = (e) => Vr[e] || Or;
1110
1110
  var In = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(In || {});
1111
- const Ze = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), _r = (e, n) => {
1111
+ const Ze = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Ur = (e, n) => {
1112
1112
  var d;
1113
1113
  const t = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) => Ze(l)).map(([l, p]) => ({ conditionName: l, value: p }));
1114
1114
  let r = [];
@@ -1127,7 +1127,7 @@ const Ze = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Ar
1127
1127
  };
1128
1128
  });
1129
1129
  };
1130
- function Ur({
1130
+ function jr({
1131
1131
  decision: e,
1132
1132
  onSubmitEvent: n,
1133
1133
  textValues: t
@@ -1135,7 +1135,7 @@ function Ur({
1135
1135
  var c, g;
1136
1136
  const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((h, f) => (Ze(f.value) && (h[f.conditionName] = f.value), h), {}), i = Object.keys(o).length > 0, s = {
1137
1137
  ruleName: e.ruleName || "",
1138
- decisionDataType: e.decisionDataType || V.ALPHABETICAL,
1138
+ decisionDataType: e.decisionDataType || z.ALPHABETICAL,
1139
1139
  howToSetTheDecision: e.howToSetTheDecision || "",
1140
1140
  value: e.value ?? "",
1141
1141
  effectiveFrom: e.effectiveFrom || "",
@@ -1151,14 +1151,14 @@ function Ur({
1151
1151
  };
1152
1152
  let d;
1153
1153
  const l = {
1154
- ruleName: le().required("El nombre de la regla es requerido"),
1155
- value: Ue(() => Hr(
1154
+ ruleName: re().required("El nombre de la regla es requerido"),
1155
+ value: je(() => Hr(
1156
1156
  d.values.howToSetTheDecision
1157
1157
  )(
1158
1158
  d.values.value,
1159
1159
  d.values.decisionDataType
1160
1160
  ).schema),
1161
- conditionsThatEstablishesTheDecision: te().shape({})
1161
+ conditionsThatEstablishesTheDecision: Z().shape({})
1162
1162
  };
1163
1163
  t.terms && (l.effectiveFrom = $e().required("La fecha de inicio es requerida"), l.validUntil = $e().when(
1164
1164
  "checkClosed",
@@ -1171,14 +1171,14 @@ function Ur({
1171
1171
  }
1172
1172
  ) : f.notRequired()
1173
1173
  ));
1174
- const p = te(l);
1174
+ const p = Z(l);
1175
1175
  return d = kn({
1176
1176
  initialValues: s,
1177
1177
  validationSchema: p,
1178
1178
  validateOnBlur: !0,
1179
1179
  onSubmit: (h) => {
1180
1180
  var x;
1181
- const f = ((x = e.conditionGroups) == null ? void 0 : x.ConditionGroupId) ?? "group-primary", w = h.toggleNone ? [] : _r(h, r), y = {
1181
+ const f = ((x = e.conditionGroups) == null ? void 0 : x.ConditionGroupId) ?? "group-primary", w = h.toggleNone ? [] : Ur(h, r), y = {
1182
1182
  ...e,
1183
1183
  ruleName: h.ruleName,
1184
1184
  decisionDataType: h.decisionDataType,
@@ -1210,7 +1210,7 @@ function Ur({
1210
1210
  });
1211
1211
  } };
1212
1212
  }
1213
- const jr = C.div`
1213
+ const _r = C.div`
1214
1214
  & > div {
1215
1215
  border-radius: 8px;
1216
1216
  border: 1px solid
@@ -1219,7 +1219,7 @@ const jr = C.div`
1219
1219
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
1220
1220
  }};
1221
1221
  }
1222
- `, Br = C.div`
1222
+ `, qr = C.div`
1223
1223
  width: 100%;
1224
1224
  height: 100%;
1225
1225
  overflow-y: auto;
@@ -1236,7 +1236,7 @@ const jr = C.div`
1236
1236
  background-color: #ebecf0;
1237
1237
  border-radius: 8px;
1238
1238
  }
1239
- `, qr = (e) => {
1239
+ `, Br = (e) => {
1240
1240
  const {
1241
1241
  checked: n,
1242
1242
  children: t,
@@ -1282,9 +1282,9 @@ const jr = C.div`
1282
1282
  w($.checked), r && r($.checked);
1283
1283
  }, E = ($) => {
1284
1284
  x($.target.value), n($);
1285
- }, F = ($) => {
1285
+ }, R = ($) => {
1286
1286
  D($.target.value), t($);
1287
- }, R = Z("(max-width: 400px)");
1287
+ }, F = J("(max-width: 400px)");
1288
1288
  return /* @__PURE__ */ m(O, { children: [
1289
1289
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1290
1290
  /* @__PURE__ */ a(
@@ -1320,7 +1320,7 @@ const jr = C.div`
1320
1320
  /* @__PURE__ */ m(
1321
1321
  v,
1322
1322
  {
1323
- direction: R ? "column" : "row",
1323
+ direction: F ? "column" : "row",
1324
1324
  justifyContent: "space-between",
1325
1325
  gap: "24px",
1326
1326
  children: [
@@ -1342,7 +1342,7 @@ const jr = C.div`
1342
1342
  {
1343
1343
  id: "dateEnd",
1344
1344
  label: i,
1345
- onChange: F,
1345
+ onChange: R,
1346
1346
  value: T,
1347
1347
  required: d,
1348
1348
  size: "compact",
@@ -1373,8 +1373,8 @@ const jr = C.div`
1373
1373
  formik: n,
1374
1374
  isDecision: !0
1375
1375
  }),
1376
- /* @__PURE__ */ a(_, { dashed: !0 }),
1377
- /* @__PURE__ */ a(jr, { children: /* @__PURE__ */ a(Br, { children: /* @__PURE__ */ m(
1376
+ /* @__PURE__ */ a(U, { dashed: !0 }),
1377
+ /* @__PURE__ */ a(_r, { children: /* @__PURE__ */ a(qr, { children: /* @__PURE__ */ m(
1378
1378
  v,
1379
1379
  {
1380
1380
  direction: "column",
@@ -1406,7 +1406,7 @@ const jr = C.div`
1406
1406
  /* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => {
1407
1407
  var g;
1408
1408
  return /* @__PURE__ */ a(
1409
- qr,
1409
+ Br,
1410
1410
  {
1411
1411
  id: `toggle-${c.conditionName}`,
1412
1412
  name: `toggle.${c.conditionName}`,
@@ -1425,7 +1425,7 @@ const jr = C.div`
1425
1425
  }
1426
1426
  ) }) }),
1427
1427
  t.terms && /* @__PURE__ */ m(O, { children: [
1428
- /* @__PURE__ */ a(_, { dashed: !0 }),
1428
+ /* @__PURE__ */ a(U, { dashed: !0 }),
1429
1429
  /* @__PURE__ */ a(
1430
1430
  Gr,
1431
1431
  {
@@ -1446,7 +1446,7 @@ const jr = C.div`
1446
1446
  }
1447
1447
  )
1448
1448
  ] }),
1449
- /* @__PURE__ */ a(_, {}),
1449
+ /* @__PURE__ */ a(U, {}),
1450
1450
  l && /* @__PURE__ */ a(k, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
1451
1451
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
1452
1452
  /* @__PURE__ */ a(H, { appearance: "gray", onClick: r, children: t.cancel }),
@@ -1455,7 +1455,7 @@ const jr = C.div`
1455
1455
  ] }) });
1456
1456
  }, Wr = (e) => {
1457
1457
  var h, f;
1458
- const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = Ur({
1458
+ const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = jr({
1459
1459
  decision: n,
1460
1460
  onSubmitEvent: t,
1461
1461
  textValues: r
@@ -1550,7 +1550,7 @@ const jr = C.div`
1550
1550
  handleSubmitForm: g,
1551
1551
  handleDelete: h,
1552
1552
  terms: f = !0
1553
- } = e, w = Z("(max-width: 681px)"), y = Z("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: T } = Xr({
1553
+ } = e, w = J("(max-width: 681px)"), y = J("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: T } = Xr({
1554
1554
  controls: n,
1555
1555
  customTitleContentAddCard: t,
1556
1556
  decisions: o,
@@ -1592,7 +1592,7 @@ const jr = C.div`
1592
1592
  /* @__PURE__ */ a(
1593
1593
  H,
1594
1594
  {
1595
- iconBefore: /* @__PURE__ */ a(Be, {}),
1595
+ iconBefore: /* @__PURE__ */ a(qe, {}),
1596
1596
  onClick: () => u ? u() : null,
1597
1597
  children: t || "Agregar decisión"
1598
1598
  }
@@ -1600,7 +1600,7 @@ const jr = C.div`
1600
1600
  ]
1601
1601
  }
1602
1602
  ) : /* @__PURE__ */ m(
1603
- qe,
1603
+ Be,
1604
1604
  {
1605
1605
  templateColumns: y ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
1606
1606
  autoFlow: "row dense",
@@ -1650,7 +1650,7 @@ const jr = C.div`
1650
1650
  ] });
1651
1651
  }, at = (e) => {
1652
1652
  const { children: n } = e;
1653
- return /* @__PURE__ */ a(Rt, { width: "100%", children: n });
1653
+ return /* @__PURE__ */ a(Ft, { width: "100%", children: n });
1654
1654
  }, Qr = (e) => e.value, Kr = (e) => e.value, Zr = (e) => e.value, Jr = (e) => ({
1655
1655
  from: e.from ?? "",
1656
1656
  to: e.to ?? ""
@@ -1661,13 +1661,20 @@ const jr = C.div`
1661
1661
  [N.GREATER_THAN]: eo,
1662
1662
  [N.LESS_THAN]: no,
1663
1663
  [N.EQUAL]: to
1664
- }, _e = (e) => {
1664
+ }, Ue = (e) => {
1665
1665
  const n = e == null ? void 0 : e.value;
1666
- if (typeof n == "string" && n.startsWith("De ") && n.includes(" a ")) {
1667
- const t = n.match(/De\s+(\d+)\s+a\s+(\d+)/);
1668
- if (t) {
1669
- const r = t[1], o = t[2];
1670
- return { from: r, to: o };
1666
+ if (typeof n == "string" && n.includes(" a ")) {
1667
+ const t = [
1668
+ /De\s+([\d,.]+)\s+a\s+([\d,.]+)/,
1669
+ /Desde\s+([\d,.]+)\s+hasta\s+([\d,.]+)/,
1670
+ /Between\s+([\d,.]+)\s+and\s+([\d,.]+)/
1671
+ ];
1672
+ for (const r of t) {
1673
+ const o = n.match(r);
1674
+ if (o) {
1675
+ const i = o[1], s = o[2];
1676
+ return { from: i, to: s };
1677
+ }
1671
1678
  }
1672
1679
  return n;
1673
1680
  }
@@ -1695,7 +1702,7 @@ const jr = C.div`
1695
1702
  border-radius: ${({ $borderRadius: e }) => e};
1696
1703
  box-sizing: ${({ $boxSizing: e }) => e};
1697
1704
  overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
1698
- `, ee = U.forwardRef(
1705
+ `, ne = j.forwardRef(
1699
1706
  (e, n) => {
1700
1707
  const {
1701
1708
  children: t,
@@ -1739,7 +1746,7 @@ const jr = C.div`
1739
1746
  );
1740
1747
  }
1741
1748
  );
1742
- ee.displayName = "BorderStack";
1749
+ ne.displayName = "BorderStack";
1743
1750
  C.div`
1744
1751
  & > div {
1745
1752
  border-radius: 8px;
@@ -1820,7 +1827,7 @@ const ao = C.div`
1820
1827
  Xe,
1821
1828
  {
1822
1829
  element: o,
1823
- valueData: _e(
1830
+ valueData: Ue(
1824
1831
  o
1825
1832
  ),
1826
1833
  type: "decision"
@@ -1869,7 +1876,7 @@ const ao = C.div`
1869
1876
  r.ruleName
1870
1877
  ) }),
1871
1878
  p && /* @__PURE__ */ m(O, { children: [
1872
- /* @__PURE__ */ a(_, { dashed: !0 }),
1879
+ /* @__PURE__ */ a(U, { dashed: !0 }),
1873
1880
  /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
1874
1881
  /* @__PURE__ */ a(
1875
1882
  k,
@@ -1891,7 +1898,7 @@ const ao = C.div`
1891
1898
  justifyContent: t,
1892
1899
  children: [
1893
1900
  d.map((x) => /* @__PURE__ */ a(
1894
- ee,
1901
+ ne,
1895
1902
  {
1896
1903
  direction: "column",
1897
1904
  padding: "6px 12px",
@@ -1901,7 +1908,7 @@ const ao = C.div`
1901
1908
  Xe,
1902
1909
  {
1903
1910
  element: { ...x, value: x.value },
1904
- valueData: _e(
1911
+ valueData: Ue(
1905
1912
  x
1906
1913
  )
1907
1914
  }
@@ -1910,7 +1917,7 @@ const ao = C.div`
1910
1917
  x.conditionName
1911
1918
  )),
1912
1919
  c && h && /* @__PURE__ */ a(
1913
- ee,
1920
+ ne,
1914
1921
  {
1915
1922
  direction: "column",
1916
1923
  padding: "6px 12px",
@@ -1927,7 +1934,7 @@ const ao = C.div`
1927
1934
  }
1928
1935
  ),
1929
1936
  g && f && /* @__PURE__ */ a(
1930
- ee,
1937
+ ne,
1931
1938
  {
1932
1939
  direction: "column",
1933
1940
  padding: "6px 12px",
@@ -1976,33 +1983,33 @@ const ao = C.div`
1976
1983
  labelName: r == null ? void 0 : r.effectiveFrom,
1977
1984
  value: String(n.effectiveFrom),
1978
1985
  howToSetTheDecision: K.EQUAL,
1979
- decisionDataType: V.DATE
1986
+ decisionDataType: z.DATE
1980
1987
  },
1981
- valueData: _e({
1988
+ valueData: Ue({
1982
1989
  labelName: r == null ? void 0 : r.effectiveFrom,
1983
1990
  value: String(n.effectiveFrom),
1984
1991
  howToSetTheDecision: K.EQUAL,
1985
- decisionDataType: V.DATE
1992
+ decisionDataType: z.DATE
1986
1993
  })
1987
1994
  } : null, h = c ? {
1988
1995
  element: {
1989
1996
  labelName: r == null ? void 0 : r.validUntil,
1990
- value: String(n.validUntil),
1997
+ value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
1991
1998
  howToSetTheDecision: K.EQUAL,
1992
- decisionDataType: V.DATE
1999
+ decisionDataType: z.DATE
1993
2000
  },
1994
- valueData: _e({
2001
+ valueData: Ue({
1995
2002
  labelName: r == null ? void 0 : r.validUntil,
1996
- value: String(n.validUntil),
2003
+ value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
1997
2004
  howToSetTheDecision: K.EQUAL,
1998
- decisionDataType: V.DATE
2005
+ decisionDataType: z.DATE
1999
2006
  })
2000
2007
  } : null, f = n ? {
2001
2008
  labelName: n.labelName || "",
2002
- decisionDataType: n.decisionDataType || V.ALPHABETICAL,
2003
- value: _e(n),
2009
+ decisionDataType: n.decisionDataType || z.ALPHABETICAL,
2010
+ value: Ue(n),
2004
2011
  howToSetTheDecision: n.howToSetTheDecision || K.EQUAL
2005
- } : null, w = n ? en(n) : {}, y = it(w, (F) => !F.hidden), x = Object.values(y).flat(), T = Array.from({ length: 5 }), D = !!(!t && n && r && f), I = x.length < 2 ? "start" : "space-between", E = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
2012
+ } : null, w = n ? en(n) : {}, y = it(w, (R) => !R.hidden), x = Object.values(y).flat(), T = Array.from({ length: 5 }), D = !!(!t && n && r && f), I = x.length < 2 ? "start" : "space-between", E = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
2006
2013
  return /* @__PURE__ */ a(
2007
2014
  so,
2008
2015
  {
@@ -2157,7 +2164,7 @@ const uo = C.div`
2157
2164
  {
2158
2165
  onClick: () => r ? r() : null,
2159
2166
  children: /* @__PURE__ */ a(
2160
- ee,
2167
+ ne,
2161
2168
  {
2162
2169
  direction: "column",
2163
2170
  gap: "4px",
@@ -2177,7 +2184,7 @@ const uo = C.div`
2177
2184
  P,
2178
2185
  {
2179
2186
  appearance: "gray",
2180
- icon: /* @__PURE__ */ a(Be, {}),
2187
+ icon: /* @__PURE__ */ a(qe, {}),
2181
2188
  size: "24px",
2182
2189
  cursorHover: !0
2183
2190
  }
@@ -2278,7 +2285,7 @@ const uo = C.div`
2278
2285
  throw new Error(
2279
2286
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
2280
2287
  );
2281
- const d = Z("(max-width: 400px)");
2288
+ const d = J("(max-width: 400px)");
2282
2289
  return sn(
2283
2290
  /* @__PURE__ */ a(xo, { smallScreen: d, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(wo, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
2284
2291
  /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
@@ -2298,14 +2305,14 @@ const uo = C.div`
2298
2305
  ] }),
2299
2306
  /* @__PURE__ */ a(on, { size: "24px", cursor: "pointer", onClick: o })
2300
2307
  ] }),
2301
- /* @__PURE__ */ a(_, { dashed: !0 })
2308
+ /* @__PURE__ */ a(U, { dashed: !0 })
2302
2309
  ] }),
2303
2310
  n
2304
2311
  ] }) }) }) }),
2305
2312
  s
2306
2313
  );
2307
2314
  }, Co = (e) => ({
2308
- schema: le().required("Requerido").test(
2315
+ schema: re().required("Requerido").test(
2309
2316
  "non-empty",
2310
2317
  "El valor no puede estar vacío",
2311
2318
  (n) => n != null && n.trim() !== ""
@@ -2332,9 +2339,9 @@ const uo = C.div`
2332
2339
  }), Eo = (e) => {
2333
2340
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
2334
2341
  return {
2335
- schema: te({
2336
- from: ie().required("El campo de tipo rango es requerido").max(t, "El rango desde no puede ser mayor al rango hasta").min(0, "El rango desde no puede ser menor a 0"),
2337
- to: ie().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
2342
+ schema: Z({
2343
+ from: oe().required("El campo de tipo rango es requerido").max(t, "El rango desde no puede ser mayor al rango hasta").min(0, "El rango desde no puede ser menor a 0"),
2344
+ to: oe().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
2338
2345
  "is-greater",
2339
2346
  "El rengo hasta debe ser mayor a el rango desde",
2340
2347
  function(r) {
@@ -2345,12 +2352,30 @@ const uo = C.div`
2345
2352
  }),
2346
2353
  value: { from: n, to: t }
2347
2354
  };
2348
- }, hn = (e, n) => n === V.PERCENTAGE ? {
2349
- schema: ie().required("El campo porcentaje es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2350
- value: e
2351
- } : {
2352
- schema: le().required("Requerido"),
2353
- value: e
2355
+ }, hn = (e, n) => {
2356
+ if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
2357
+ const t = e;
2358
+ return n === z.PERCENTAGE ? {
2359
+ schema: Z({
2360
+ from: oe().required("El campo desde es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2361
+ to: oe().required("El campo hasta es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100")
2362
+ }),
2363
+ value: t
2364
+ } : {
2365
+ schema: Z({
2366
+ from: re().required("Requerido"),
2367
+ to: re().required("Requerido")
2368
+ }),
2369
+ value: t
2370
+ };
2371
+ }
2372
+ return n === z.PERCENTAGE ? {
2373
+ schema: oe().required("El campo porcentaje es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2374
+ value: e
2375
+ } : {
2376
+ schema: re().required("Requerido"),
2377
+ value: e
2378
+ };
2354
2379
  }, No = {
2355
2380
  [N.LIST_OF_VALUES]: Do,
2356
2381
  [N.LIST_OF_VALUES_MULTI]: So,
@@ -2367,7 +2392,7 @@ function ko({
2367
2392
  }) {
2368
2393
  const r = en(e) || {}, o = () => Object.values(r).flat(), i = {
2369
2394
  ruleName: e.ruleName || "",
2370
- decisionDataType: e.decisionDataType || V.ALPHABETICAL,
2395
+ decisionDataType: e.decisionDataType || z.ALPHABETICAL,
2371
2396
  howToSetTheDecision: e.howToSetTheDecision || "",
2372
2397
  value: e.value || "",
2373
2398
  effectiveFrom: e.effectiveFrom || "",
@@ -2380,15 +2405,15 @@ function ko({
2380
2405
  };
2381
2406
  let s;
2382
2407
  const d = {
2383
- ruleName: le().required("El nombre de la decision es requerido"),
2384
- value: Ue(() => Vn(
2408
+ ruleName: re().required("El nombre de la decision es requerido"),
2409
+ value: je(() => Vn(
2385
2410
  s.values.howToSetTheDecision
2386
2411
  )(
2387
2412
  s.values.value,
2388
2413
  s.values.decisionDataType
2389
2414
  ).schema),
2390
- conditionsThatEstablishesTheDecision: Ue((u, { parent: c }) => {
2391
- if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return te().shape({});
2415
+ conditionsThatEstablishesTheDecision: je((u, { parent: c }) => {
2416
+ if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return Z().shape({});
2392
2417
  const f = o().reduce(
2393
2418
  (w, y) => {
2394
2419
  var T;
@@ -2405,7 +2430,7 @@ function ko({
2405
2430
  },
2406
2431
  {}
2407
2432
  );
2408
- return te(f).test(
2433
+ return Z(f).test(
2409
2434
  "at-least-one-condition",
2410
2435
  "Debe existir al menos una condición para que la decisión se valide correctamente.",
2411
2436
  (w) => w ? Object.values(w).some(
@@ -2427,7 +2452,7 @@ function ko({
2427
2452
  }
2428
2453
  ) : c.notRequired()
2429
2454
  ));
2430
- const l = te(d);
2455
+ const l = Z(d);
2431
2456
  return s = kn({
2432
2457
  initialValues: i,
2433
2458
  validationSchema: l,
@@ -2533,9 +2558,9 @@ const $o = C.div`
2533
2558
  w($.checked), r && r($.checked);
2534
2559
  }, E = ($) => {
2535
2560
  x($.target.value), n($);
2536
- }, F = ($) => {
2561
+ }, R = ($) => {
2537
2562
  D($.target.value), t($);
2538
- }, R = Z("(max-width: 400px)");
2563
+ }, F = J("(max-width: 400px)");
2539
2564
  return /* @__PURE__ */ m(v, { direction: "column", width: "100%", gap: "20px", children: [
2540
2565
  /* @__PURE__ */ m(v, { justifyContent: "space-between", children: [
2541
2566
  /* @__PURE__ */ a(k, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
@@ -2552,7 +2577,7 @@ const $o = C.div`
2552
2577
  /* @__PURE__ */ m(
2553
2578
  v,
2554
2579
  {
2555
- direction: R ? "column" : "row",
2580
+ direction: F ? "column" : "row",
2556
2581
  justifyContent: "space-between",
2557
2582
  gap: "24px",
2558
2583
  children: [
@@ -2575,7 +2600,7 @@ const $o = C.div`
2575
2600
  {
2576
2601
  id: "dateEnd",
2577
2602
  label: i,
2578
- onChange: F,
2603
+ onChange: R,
2579
2604
  value: T,
2580
2605
  required: d,
2581
2606
  size: "compact",
@@ -2726,7 +2751,7 @@ const $o = C.div`
2726
2751
  }
2727
2752
  )
2728
2753
  ] });
2729
- }, Hn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Fo = (e) => {
2754
+ }, Hn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Ro = (e) => {
2730
2755
  var We;
2731
2756
  const {
2732
2757
  decision: n,
@@ -2749,42 +2774,42 @@ const $o = C.div`
2749
2774
  ], y = {};
2750
2775
  let x = 1;
2751
2776
  const T = w.map((A) => {
2752
- const B = A === "group-primary" ? "mainCondition" : `alternateCondition-${x++}`;
2753
- return y[B] = A, {
2754
- id: B,
2755
- label: A === "group-primary" ? Hn(A, 0) : Hn(A, Number(B.split("-").at(-1))),
2777
+ const q = A === "group-primary" ? "mainCondition" : `alternateCondition-${x++}`;
2778
+ return y[q] = A, {
2779
+ id: q,
2780
+ label: A === "group-primary" ? Hn(A, 0) : Hn(A, Number(q.split("-").at(-1))),
2756
2781
  isDisabled: !1
2757
2782
  };
2758
- }), [D, I] = U.useState(
2783
+ }), [D, I] = j.useState(
2759
2784
  ((We = T[0]) == null ? void 0 : We.id) ?? "mainCondition"
2760
- ), E = (A) => I(A), F = y[D] ?? "group-primary", R = h[F] ?? [], $ = h["group-primary"] ?? [], j = {
2785
+ ), E = (A) => I(A), R = y[D] ?? "group-primary", F = h[R] ?? [], $ = h["group-primary"] ?? [], _ = {
2761
2786
  decisionDataType: n.decisionDataType,
2762
2787
  howToSetTheCondition: n.howToSetTheDecision,
2763
2788
  labelName: n.labelName,
2764
2789
  listOfPossibleValues: n.listOfPossibleValues,
2765
2790
  ruleName: n.ruleName
2766
- }, se = l.submitCount > 0 || !!l.touched.effectiveFrom, Te = l.submitCount > 0 || !!l.touched.validUntil, Ce = se ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, he = Te ? l.errors.validUntil ? "invalid" : "valid" : void 0, re = U.useMemo(() => {
2791
+ }, se = l.submitCount > 0 || !!l.touched.effectiveFrom, Te = l.submitCount > 0 || !!l.touched.validUntil, Ce = se ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, he = Te ? l.errors.validUntil ? "invalid" : "valid" : void 0, ae = j.useMemo(() => {
2767
2792
  const A = l.errors.conditionsThatEstablishesTheDecision;
2768
2793
  if (!A) return;
2769
2794
  if (typeof A == "string") return A;
2770
- const B = (ne) => {
2771
- if (ne) {
2772
- if (typeof ne == "string") return ne;
2773
- if (Array.isArray(ne))
2774
- for (const Pe of ne) {
2775
- const be = B(Pe);
2795
+ const q = (te) => {
2796
+ if (te) {
2797
+ if (typeof te == "string") return te;
2798
+ if (Array.isArray(te))
2799
+ for (const Pe of te) {
2800
+ const be = q(Pe);
2776
2801
  if (be) return be;
2777
2802
  }
2778
- else if (typeof ne == "object")
2779
- for (const Pe of Object.values(ne)) {
2780
- const be = B(Pe);
2803
+ else if (typeof te == "object")
2804
+ for (const Pe of Object.values(te)) {
2805
+ const be = q(Pe);
2781
2806
  if (be) return be;
2782
2807
  }
2783
2808
  }
2784
2809
  };
2785
- return B(A);
2786
- }, [l.errors.conditionsThatEstablishesTheDecision]), Re = l.submitCount > 0 && !!re, De = (A) => A != null && A.isMulti || A != null && A.multiple || (A == null ? void 0 : A.valueUse) === "Among" ? [] : "", fe = (A) => {
2787
- const ne = Object.values(c).flat().find((be) => be.conditionName === A), Pe = De(ne);
2810
+ return q(A);
2811
+ }, [l.errors.conditionsThatEstablishesTheDecision]), Fe = l.submitCount > 0 && !!ae, De = (A) => A != null && A.isMulti || A != null && A.multiple || (A == null ? void 0 : A.valueUse) === "Among" ? [] : "", fe = (A) => {
2812
+ const te = Object.values(c).flat().find((be) => be.conditionName === A), Pe = De(te);
2788
2813
  l.setFieldValue(
2789
2814
  `conditionsThatEstablishesTheDecision.${A}`,
2790
2815
  Pe
@@ -2794,27 +2819,27 @@ const $o = C.div`
2794
2819
  !1
2795
2820
  );
2796
2821
  }, me = () => {
2797
- R.forEach((A) => {
2798
- const B = `conditionsThatEstablishesTheDecision.${A.conditionName}`;
2799
- l.setFieldValue(B, De(A)), l.setFieldTouched(B, !1, !1);
2822
+ F.forEach((A) => {
2823
+ const q = `conditionsThatEstablishesTheDecision.${A.conditionName}`;
2824
+ l.setFieldValue(q, De(A)), l.setFieldTouched(q, !1, !1);
2800
2825
  });
2801
- }, [Le, de] = U.useState(!1);
2826
+ }, [Le, de] = j.useState(!1);
2802
2827
  return /* @__PURE__ */ a(
2803
2828
  Io,
2804
2829
  {
2805
2830
  activeTab: D,
2806
- conditionsErrorText: re,
2807
- currentConditions: R,
2831
+ conditionsErrorText: ae,
2832
+ currentConditions: F,
2808
2833
  decision: n,
2809
2834
  formik: l,
2810
- normalizedDecision: j,
2835
+ normalizedDecision: _,
2811
2836
  onCancel: o,
2812
2837
  onRedefineCurrentTab: me,
2813
2838
  onTabChange: E,
2814
2839
  onClearCondition: (A) => {
2815
2840
  fe(A), i == null || i(A);
2816
2841
  },
2817
- showConditionsError: Re,
2842
+ showConditionsError: Fe,
2818
2843
  tabs: T,
2819
2844
  termEndStatus: he,
2820
2845
  termStartStatus: Ce,
@@ -2828,8 +2853,8 @@ const $o = C.div`
2828
2853
  onCloseRedefineConfirm: () => de(!1),
2829
2854
  onConfirmRedefine: () => {
2830
2855
  me();
2831
- const A = (c[F] ?? []).map(
2832
- (B) => B.conditionName
2856
+ const A = (c[R] ?? []).map(
2857
+ (q) => q.conditionName
2833
2858
  );
2834
2859
  s == null || s(A), de(!1);
2835
2860
  }
@@ -2854,7 +2879,7 @@ const $o = C.div`
2854
2879
  onRemoveCondition: w,
2855
2880
  onRestoreConditions: y,
2856
2881
  baseDecisionTemplate: x
2857
- } = e, [T, D] = M(null), I = Z("(max-width: 681px)"), { renderedCards: E, shouldRenderAddCard: F } = yo({
2882
+ } = e, [T, D] = M(null), I = J("(max-width: 681px)"), { renderedCards: E, shouldRenderAddCard: R } = yo({
2858
2883
  controls: n,
2859
2884
  customTitleContentAddCard: t,
2860
2885
  decisions: o,
@@ -2863,10 +2888,10 @@ const $o = C.div`
2863
2888
  handleDelete: h,
2864
2889
  textValues: i,
2865
2890
  isOpenFor: ($) => T === $,
2866
- toggleAt: ($) => D((j) => j === $ ? null : $)
2867
- }), R = (o == null ? void 0 : o.length) === 0 && !p;
2891
+ toggleAt: ($) => D((_) => _ === $ ? null : $)
2892
+ }), F = (o == null ? void 0 : o.length) === 0 && !p;
2868
2893
  return /* @__PURE__ */ m(O, { children: [
2869
- /* @__PURE__ */ a(go, { children: /* @__PURE__ */ a(ho, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: R ? /* @__PURE__ */ a(ze, { legend: "Decisiones", children: /* @__PURE__ */ m(
2894
+ /* @__PURE__ */ a(go, { children: /* @__PURE__ */ a(ho, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: F ? /* @__PURE__ */ a(ze, { legend: "Decisiones", children: /* @__PURE__ */ m(
2870
2895
  v,
2871
2896
  {
2872
2897
  direction: "column",
@@ -2900,7 +2925,7 @@ const $o = C.div`
2900
2925
  ]
2901
2926
  }
2902
2927
  ) }) : /* @__PURE__ */ m(
2903
- qe,
2928
+ Be,
2904
2929
  {
2905
2930
  templateColumns: "1fr",
2906
2931
  autoFlow: "row dense",
@@ -2913,7 +2938,7 @@ const $o = C.div`
2913
2938
  height: I ? "auto" : "484px",
2914
2939
  children: [
2915
2940
  E,
2916
- F && wn({
2941
+ R && wn({
2917
2942
  type: "add",
2918
2943
  index: o == null ? void 0 : o.length,
2919
2944
  controls: n,
@@ -2923,7 +2948,7 @@ const $o = C.div`
2923
2948
  handleOpenModal: u,
2924
2949
  handleDelete: h,
2925
2950
  textValues: i,
2926
- shouldRenderEmptyMessage: R,
2951
+ shouldRenderEmptyMessage: F,
2927
2952
  terms: f
2928
2953
  })
2929
2954
  ]
@@ -2937,7 +2962,7 @@ const $o = C.div`
2937
2962
  title: l ? "Editar Decisión" : "Configurar Decisión",
2938
2963
  description: "Diligencia los campos para configurar tu decisión.",
2939
2964
  children: /* @__PURE__ */ a(
2940
- Fo,
2965
+ Ro,
2941
2966
  {
2942
2967
  decision: l || s,
2943
2968
  fullTemplate: x ?? s,
@@ -2952,7 +2977,7 @@ const $o = C.div`
2952
2977
  }
2953
2978
  )
2954
2979
  ] });
2955
- }, Ro = {
2980
+ }, Fo = {
2956
2981
  border: {
2957
2982
  color: S.palette.neutral.N40
2958
2983
  }
@@ -2961,7 +2986,7 @@ const $o = C.div`
2961
2986
  border-style: solid;
2962
2987
  border-color: ${({ theme: e }) => {
2963
2988
  var n, t;
2964
- return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || Ro.border.color;
2989
+ return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || Fo.border.color;
2965
2990
  }};
2966
2991
  border-radius: ${({ $borderRadius: e }) => e};
2967
2992
  margin: ${({ $margin: e }) => e};
@@ -3086,7 +3111,7 @@ const Mo = C.div`
3086
3111
  return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : r.regular) || Tn.background.color.regular;
3087
3112
  }};
3088
3113
  }
3089
- `, _o = (e) => {
3114
+ `, Uo = (e) => {
3090
3115
  var g, h, f, w, y, x;
3091
3116
  const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = M(!1), d = () => s(!0), l = () => s(!1), p = $n(Nn), u = ((f = (h = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Tn.option.appearance.hover, c = ((x = (y = (w = p == null ? void 0 : p.input) == null ? void 0 : w.option) == null ? void 0 : y.appearance) == null ? void 0 : x.regular) ?? Tn.option.appearance.regular;
3092
3117
  return /* @__PURE__ */ a(
@@ -3099,7 +3124,7 @@ const Mo = C.div`
3099
3124
  T.stopPropagation();
3100
3125
  },
3101
3126
  children: /* @__PURE__ */ m(
3102
- qe,
3127
+ Be,
3103
3128
  {
3104
3129
  alignItems: "center",
3105
3130
  gap: "8px",
@@ -3154,13 +3179,13 @@ const Mo = C.div`
3154
3179
  showOverflowIndicator: g,
3155
3180
  measurementRef: h
3156
3181
  } = Po(d, n), [f, w] = M(!1), y = (E) => {
3157
- E.stopPropagation(), w((F) => !F);
3182
+ E.stopPropagation(), w((R) => !R);
3158
3183
  };
3159
3184
  xe(() => {
3160
- const E = (F) => {
3161
- var j, se;
3162
- const R = F.target;
3163
- !((j = l.current) != null && j.contains(R)) && !((se = p.current) != null && se.contains(R)) && w(!1);
3185
+ const E = (R) => {
3186
+ var _, se;
3187
+ const F = R.target;
3188
+ !((_ = l.current) != null && _.contains(F)) && !((se = p.current) != null && se.contains(F)) && w(!1);
3164
3189
  };
3165
3190
  return f && window.addEventListener("mousedown", E), () => window.removeEventListener("mousedown", E);
3166
3191
  }, [f]);
@@ -3170,8 +3195,8 @@ const Mo = C.div`
3170
3195
  label: E.label,
3171
3196
  icon: E.icon
3172
3197
  })), I = (E) => {
3173
- var F, R;
3174
- (R = (F = c.find(($) => $.label === E)) == null ? void 0 : F.onClose) == null || R.call(F), w(!1);
3198
+ var R, F;
3199
+ (F = (R = c.find(($) => $.label === E)) == null ? void 0 : R.onClose) == null || F.call(R), w(!1);
3175
3200
  };
3176
3201
  return /* @__PURE__ */ m(Oo, { borderRadius: "8px", width: "100%", children: [
3177
3202
  /* @__PURE__ */ a(zo, { ref: h, children: n.map((E) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
@@ -3185,9 +3210,9 @@ const Mo = C.div`
3185
3210
  onClose: E.onClose
3186
3211
  }
3187
3212
  ) }, E.label)) }),
3188
- /* @__PURE__ */ m(qe, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
3213
+ /* @__PURE__ */ m(Be, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
3189
3214
  /* @__PURE__ */ a(
3190
- ee,
3215
+ ne,
3191
3216
  {
3192
3217
  ref: d,
3193
3218
  background: !0,
@@ -3231,14 +3256,14 @@ const Mo = C.div`
3231
3256
  options: D,
3232
3257
  onOptionClick: I,
3233
3258
  children: c.map((E) => /* @__PURE__ */ a(
3234
- _o,
3259
+ Uo,
3235
3260
  {
3236
3261
  id: E.label,
3237
3262
  label: E.label,
3238
3263
  leadingIcon: E.icon,
3239
3264
  onClose: () => {
3240
- var F;
3241
- (F = E.onClose) == null || F.call(E), w(!1);
3265
+ var R;
3266
+ (R = E.onClose) == null || R.call(E), w(!1);
3242
3267
  }
3243
3268
  },
3244
3269
  E.label
@@ -3274,7 +3299,7 @@ const Mo = C.div`
3274
3299
  )
3275
3300
  ] })
3276
3301
  ] });
3277
- }, Uo = C.div`
3302
+ }, jo = C.div`
3278
3303
  display: flex;
3279
3304
  flex-direction: column;
3280
3305
  background-color: ${({ theme: e }) => {
@@ -3297,13 +3322,13 @@ const Mo = C.div`
3297
3322
  onCloseModal: s,
3298
3323
  portalId: d,
3299
3324
  title: l
3300
- } = e, p = Z("(max-width: 768px)"), u = document.getElementById(d);
3325
+ } = e, p = J("(max-width: 768px)"), u = document.getElementById(d);
3301
3326
  if (!u)
3302
3327
  throw new Error(
3303
3328
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
3304
3329
  );
3305
3330
  return sn(
3306
- /* @__PURE__ */ a(an, { children: /* @__PURE__ */ m(Uo, { $smallScreen: p, children: [
3331
+ /* @__PURE__ */ a(an, { children: /* @__PURE__ */ m(jo, { $smallScreen: p, children: [
3307
3332
  /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
3308
3333
  /* @__PURE__ */ m(v, { alignContent: "center", justifyContent: "space-between", children: [
3309
3334
  /* @__PURE__ */ a(k, { appearance: "dark", size: "small", type: "headline", children: l }),
@@ -3320,7 +3345,7 @@ const Mo = C.div`
3320
3345
  )
3321
3346
  ] })
3322
3347
  ] }),
3323
- /* @__PURE__ */ a(_, {})
3348
+ /* @__PURE__ */ a(U, {})
3324
3349
  ] }),
3325
3350
  r,
3326
3351
  /* @__PURE__ */ m(v, { gap: "20px", justifyContent: "flex-end", children: [
@@ -3351,13 +3376,13 @@ const Mo = C.div`
3351
3376
  u
3352
3377
  );
3353
3378
  }, il = (e) => {
3354
- const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, i = Z("(max-width: 768px)"), s = !n || n.length === 0;
3379
+ const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, i = J("(max-width: 768px)"), s = !n || n.length === 0;
3355
3380
  return /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
3356
3381
  i && /* @__PURE__ */ m(O, { children: [
3357
3382
  /* @__PURE__ */ m(v, { gap: "6px", width: "100%", alignItems: "center", children: [
3358
3383
  /* @__PURE__ */ a(P, { appearance: "gray", icon: /* @__PURE__ */ a(et, {}) }),
3359
3384
  /* @__PURE__ */ a(
3360
- ee,
3385
+ ne,
3361
3386
  {
3362
3387
  background: !0,
3363
3388
  borderRadius: "8px",
@@ -3383,7 +3408,7 @@ const Mo = C.div`
3383
3408
  }
3384
3409
  )
3385
3410
  ] }),
3386
- /* @__PURE__ */ a(_, { dashed: !0 })
3411
+ /* @__PURE__ */ a(U, { dashed: !0 })
3387
3412
  ] }),
3388
3413
  t.map((d) => /* @__PURE__ */ m(v, { gap: "6px", alignItems: "center", children: [
3389
3414
  /* @__PURE__ */ a(v, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(P, { appearance: "primary", icon: d.icon }) }),
@@ -3406,12 +3431,12 @@ const Mo = C.div`
3406
3431
  )
3407
3432
  ] }, d.name))
3408
3433
  ] });
3409
- }, jo = (e) => {
3434
+ }, _o = (e) => {
3410
3435
  const n = [];
3411
3436
  return e.from !== void 0 && e.from !== null && n.push(`>${e.from}`), e.to !== void 0 && e.to !== null && n.push(`<${e.to}`), n.join(";");
3412
3437
  }, ll = (e) => {
3413
3438
  var s;
3414
- const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? jo(d) : d, i = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
3439
+ const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? _o(d) : d, i = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
3415
3440
  var c;
3416
3441
  const p = d == null ? void 0 : d.value;
3417
3442
  return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
@@ -3474,14 +3499,14 @@ const Mo = C.div`
3474
3499
  )
3475
3500
  } : t;
3476
3501
  });
3477
- }, Bo = (e) => ({
3478
- schema: le().required("Requerido").test(
3502
+ }, qo = (e) => ({
3503
+ schema: re().required("Requerido").test(
3479
3504
  "non-empty",
3480
3505
  "El valor no puede estar vacío",
3481
3506
  (n) => n != null && n.trim() !== ""
3482
3507
  ),
3483
3508
  value: e
3484
- }), qo = (e) => ({
3509
+ }), Bo = (e) => ({
3485
3510
  schema: Ie().test(
3486
3511
  "isArrayOrString",
3487
3512
  "Debe ser un array de strings/numbers o un solo string",
@@ -3502,9 +3527,9 @@ const Mo = C.div`
3502
3527
  }), Yo = (e) => {
3503
3528
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
3504
3529
  return {
3505
- schema: te({
3506
- from: ie().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
3507
- to: ie().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
3530
+ schema: Z({
3531
+ from: oe().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
3532
+ to: oe().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
3508
3533
  "is-greater",
3509
3534
  "El campo 'Rango hasta' debe ser mayor que 'Rango desde'",
3510
3535
  function(r) {
@@ -3515,20 +3540,20 @@ const Mo = C.div`
3515
3540
  }),
3516
3541
  value: { from: n, to: t }
3517
3542
  };
3518
- }, fn = (e, n) => n === V.PERCENTAGE ? {
3519
- schema: ie().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
3543
+ }, fn = (e, n) => n === z.PERCENTAGE ? {
3544
+ schema: oe().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
3520
3545
  value: e
3521
3546
  } : {
3522
- schema: le().required("Requerido"),
3547
+ schema: re().required("Requerido"),
3523
3548
  value: e
3524
3549
  }, Wo = {
3525
- [N.LIST_OF_VALUES]: qo,
3550
+ [N.LIST_OF_VALUES]: Bo,
3526
3551
  [N.LIST_OF_VALUES_MULTI]: Go,
3527
3552
  [N.RANGE]: Yo,
3528
3553
  [N.GREATER_THAN]: fn,
3529
3554
  [N.LESS_THAN]: fn,
3530
3555
  [N.EQUAL]: fn
3531
- }, _n = (e) => Wo[e] || Bo;
3556
+ }, Un = (e) => Wo[e] || qo;
3532
3557
  function Xo({
3533
3558
  decision: e,
3534
3559
  onSubmitEvent: n,
@@ -3536,7 +3561,7 @@ function Xo({
3536
3561
  }) {
3537
3562
  const r = {
3538
3563
  ruleName: e.ruleName || "",
3539
- decisionDataType: e.decisionDataType || V.ALPHABETICAL,
3564
+ decisionDataType: e.decisionDataType || z.ALPHABETICAL,
3540
3565
  howToSetTheDecision: e.howToSetTheDecision || "",
3541
3566
  value: e.value || "",
3542
3567
  effectiveFrom: e.effectiveFrom || "",
@@ -3548,8 +3573,8 @@ function Xo({
3548
3573
  };
3549
3574
  let o;
3550
3575
  const i = {
3551
- ruleName: le().required("El nombre de la regla es requerido"),
3552
- value: Ue(() => _n(
3576
+ ruleName: re().required("El nombre de la regla es requerido"),
3577
+ value: je(() => Un(
3553
3578
  o.values.howToSetTheDecision
3554
3579
  )(
3555
3580
  o.values.value,
@@ -3592,13 +3617,13 @@ function Xo({
3592
3617
  // },
3593
3618
  // );
3594
3619
  // }),
3595
- conditionsThatEstablishesTheDecision: Ue((l, { parent: p }) => {
3620
+ conditionsThatEstablishesTheDecision: je((l, { parent: p }) => {
3596
3621
  var g;
3597
- if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return te().shape({});
3622
+ if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return Z().shape({});
3598
3623
  const c = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
3599
3624
  (h, f) => {
3600
3625
  if (o.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
3601
- const y = _n(
3626
+ const y = Un(
3602
3627
  f.howToSetTheCondition
3603
3628
  );
3604
3629
  h[f.conditionName] = y(
@@ -3610,7 +3635,7 @@ function Xo({
3610
3635
  },
3611
3636
  {}
3612
3637
  )) ?? {};
3613
- return te(c);
3638
+ return Z(c);
3614
3639
  })
3615
3640
  };
3616
3641
  t.terms && (i.effectiveFrom = $e().required(
@@ -3626,7 +3651,7 @@ function Xo({
3626
3651
  }
3627
3652
  ) : p.notRequired()
3628
3653
  ));
3629
- const s = te(i);
3654
+ const s = Z(i);
3630
3655
  return o = kn({
3631
3656
  initialValues: r,
3632
3657
  validationSchema: s,
@@ -3743,9 +3768,9 @@ const Qo = C.div`
3743
3768
  w($.checked), r && r($.checked);
3744
3769
  }, E = ($) => {
3745
3770
  x($.target.value), n($);
3746
- }, F = ($) => {
3771
+ }, R = ($) => {
3747
3772
  D($.target.value), t($);
3748
- }, R = Z("(max-width: 400px)");
3773
+ }, F = J("(max-width: 400px)");
3749
3774
  return /* @__PURE__ */ m(O, { children: [
3750
3775
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
3751
3776
  /* @__PURE__ */ a(
@@ -3781,7 +3806,7 @@ const Qo = C.div`
3781
3806
  /* @__PURE__ */ m(
3782
3807
  v,
3783
3808
  {
3784
- direction: R ? "column" : "row",
3809
+ direction: F ? "column" : "row",
3785
3810
  justifyContent: "space-between",
3786
3811
  gap: "24px",
3787
3812
  children: [
@@ -3803,7 +3828,7 @@ const Qo = C.div`
3803
3828
  {
3804
3829
  id: "dateEnd",
3805
3830
  label: i,
3806
- onChange: F,
3831
+ onChange: R,
3807
3832
  value: T,
3808
3833
  required: d,
3809
3834
  size: "compact",
@@ -3834,7 +3859,7 @@ const Qo = C.div`
3834
3859
  formik: n,
3835
3860
  isDecision: !0
3836
3861
  }),
3837
- /* @__PURE__ */ a(_, { dashed: !0 }),
3862
+ /* @__PURE__ */ a(U, { dashed: !0 }),
3838
3863
  /* @__PURE__ */ a(Qo, { children: /* @__PURE__ */ a(Ko, { children: /* @__PURE__ */ m(
3839
3864
  v,
3840
3865
  {
@@ -3883,7 +3908,7 @@ const Qo = C.div`
3883
3908
  }
3884
3909
  ) }) }),
3885
3910
  t.terms && /* @__PURE__ */ m(O, { children: [
3886
- /* @__PURE__ */ a(_, { dashed: !0 }),
3911
+ /* @__PURE__ */ a(U, { dashed: !0 }),
3887
3912
  /* @__PURE__ */ a(
3888
3913
  Jo,
3889
3914
  {
@@ -3904,7 +3929,7 @@ const Qo = C.div`
3904
3929
  }
3905
3930
  )
3906
3931
  ] }),
3907
- /* @__PURE__ */ a(_, {}),
3932
+ /* @__PURE__ */ a(U, {}),
3908
3933
  l && /* @__PURE__ */ a(k, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
3909
3934
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
3910
3935
  /* @__PURE__ */ a(H, { appearance: "gray", onClick: r, children: t.cancel }),
@@ -4027,7 +4052,7 @@ const Qo = C.div`
4027
4052
  return ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.hover) || ce.item.background.hover;
4028
4053
  }};
4029
4054
  }
4030
- `, Un = C.div`
4055
+ `, jn = C.div`
4031
4056
  display: flex;
4032
4057
  align-items: center;
4033
4058
  gap: 12px;
@@ -4088,8 +4113,8 @@ const Qo = C.div`
4088
4113
  f.preventDefault(), f.stopPropagation(), r();
4089
4114
  }, u = (f) => {
4090
4115
  (f.key === "Enter" || f.key === " ") && (f.preventDefault(), f.stopPropagation(), r());
4091
- }, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", h = U.useId();
4092
- return /* @__PURE__ */ a(ta, { $active: n, children: /* @__PURE__ */ m(ee, { border: !0, borderRadius: "8px", width: "100%", children: [
4116
+ }, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", h = j.useId();
4117
+ return /* @__PURE__ */ a(ta, { $active: n, children: /* @__PURE__ */ m(ne, { border: !0, borderRadius: "8px", width: "100%", children: [
4093
4118
  /* @__PURE__ */ a(
4094
4119
  ia,
4095
4120
  {
@@ -4099,7 +4124,7 @@ const Qo = C.div`
4099
4124
  onClick: p,
4100
4125
  onKeyDown: u,
4101
4126
  children: s ? /* @__PURE__ */ a(oa, { to: s, children: /* @__PURE__ */ m(
4102
- ee,
4127
+ ne,
4103
4128
  {
4104
4129
  alignItems: "center",
4105
4130
  borderRadius: "8px",
@@ -4112,10 +4137,10 @@ const Qo = C.div`
4112
4137
  {
4113
4138
  appearance: c,
4114
4139
  cursorHover: !0,
4115
- icon: n && t.length > 0 ? /* @__PURE__ */ a(vn, {}) : /* @__PURE__ */ a(Rn, {})
4140
+ icon: n && t.length > 0 ? /* @__PURE__ */ a(vn, {}) : /* @__PURE__ */ a(Fn, {})
4116
4141
  }
4117
4142
  ),
4118
- /* @__PURE__ */ a(Un, { children: /* @__PURE__ */ a(
4143
+ /* @__PURE__ */ a(jn, { children: /* @__PURE__ */ a(
4119
4144
  k,
4120
4145
  {
4121
4146
  appearance: c,
@@ -4129,7 +4154,7 @@ const Qo = C.div`
4129
4154
  ]
4130
4155
  }
4131
4156
  ) }) : /* @__PURE__ */ m(
4132
- ee,
4157
+ ne,
4133
4158
  {
4134
4159
  alignItems: "center",
4135
4160
  borderRadius: "8px",
@@ -4142,10 +4167,10 @@ const Qo = C.div`
4142
4167
  {
4143
4168
  appearance: c,
4144
4169
  cursorHover: !0,
4145
- icon: n && t.length > 0 ? /* @__PURE__ */ a(vn, {}) : /* @__PURE__ */ a(Rn, {})
4170
+ icon: n && t.length > 0 ? /* @__PURE__ */ a(vn, {}) : /* @__PURE__ */ a(Fn, {})
4146
4171
  }
4147
4172
  ),
4148
- /* @__PURE__ */ a(Un, { children: /* @__PURE__ */ a(
4173
+ /* @__PURE__ */ a(jn, { children: /* @__PURE__ */ a(
4149
4174
  ra,
4150
4175
  {
4151
4176
  "aria-controls": h,
@@ -4211,17 +4236,17 @@ const Qo = C.div`
4211
4236
  if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
4212
4237
  return null;
4213
4238
  }, gl = (e) => {
4214
- const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Ut(), [i, s] = U.useState(t), d = U.useRef(o.pathname), l = U.useCallback(
4239
+ const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = jt(), [i, s] = j.useState(t), d = j.useRef(o.pathname), l = j.useCallback(
4215
4240
  (u) => {
4216
4241
  var c;
4217
4242
  return (c = u.find((g) => g.path === o.pathname)) == null ? void 0 : c.id;
4218
4243
  },
4219
4244
  [o.pathname]
4220
- ), p = U.useCallback(
4245
+ ), p = j.useCallback(
4221
4246
  (u) => !!u && (o.pathname === u || o.pathname.startsWith(u + "/")),
4222
4247
  [o.pathname]
4223
4248
  );
4224
- return U.useEffect(() => {
4249
+ return j.useEffect(() => {
4225
4250
  if (!(d.current !== o.pathname)) return;
4226
4251
  if (d.current = o.pathname, n) {
4227
4252
  s(null);
@@ -4268,7 +4293,7 @@ var [ut, pt] = ct();
4268
4293
  function ua(e, n) {
4269
4294
  return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
4270
4295
  }
4271
- function je(e, n, t = !0, r = ["__key"]) {
4296
+ function _e(e, n, t = !0, r = ["__key"]) {
4272
4297
  if (e === n) return !0;
4273
4298
  if (typeof n == "object" && typeof e == "object" && e !== null && n !== null) {
4274
4299
  if (e instanceof Map || e instanceof Set) return !1;
@@ -4282,7 +4307,7 @@ function je(e, n, t = !0, r = ["__key"]) {
4282
4307
  for (const s of r)
4283
4308
  if ((s in o || s in i) && o[s] !== i[s]) return !1;
4284
4309
  for (const s in o)
4285
- if (!(s in i) || o[s] !== i[s] && !t || t && !je(o[s], i[s], t, r)) return !1;
4310
+ if (!(s in i) || o[s] !== i[s] && !t || t && !_e(o[s], i[s], t, r)) return !1;
4286
4311
  return !0;
4287
4312
  }
4288
4313
  return !1;
@@ -4290,13 +4315,13 @@ function je(e, n, t = !0, r = ["__key"]) {
4290
4315
  function gt(e) {
4291
4316
  return e.split(" ").filter((n) => n);
4292
4317
  }
4293
- function Fe(e) {
4318
+ function Re(e) {
4294
4319
  return { x: e.clientX, y: e.clientY };
4295
4320
  }
4296
4321
  Array();
4297
- var Fn = typeof window < "u", q = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap();
4322
+ var Rn = typeof window < "u", B = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap();
4298
4323
  function ht() {
4299
- if (!Fn) return !1;
4324
+ if (!Rn) return !1;
4300
4325
  if ("userAgentData" in navigator)
4301
4326
  return navigator.userAgentData.mobile === !0;
4302
4327
  const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
@@ -4336,7 +4361,7 @@ var pa = {
4336
4361
  scrollDebounceTimeout: void 0,
4337
4362
  frameIdX: void 0,
4338
4363
  frameIdY: void 0
4339
- }, b = pa, pe = !1, jn, mn;
4364
+ }, b = pa, pe = !1, _n, mn;
4340
4365
  function ga() {
4341
4366
  b.scrollDebounceTimeout && clearTimeout(b.scrollDebounceTimeout), b.longPressTimeout && clearTimeout(b.longPressTimeout), b.frameIdX !== void 0 && cancelAnimationFrame(b.frameIdX), b.frameIdY !== void 0 && cancelAnimationFrame(b.frameIdY), b = { ...{
4342
4367
  affectedNodes: [],
@@ -4385,9 +4410,9 @@ function ha() {
4385
4410
  b.activeState && we(b.activeState.parent, void 0, b), b.selectedState && ye(b.selectedState.nodes, b.selectedState.parent, b), b.selectedState = b.activeState = void 0;
4386
4411
  }
4387
4412
  function fa() {
4388
- if (b.pointerDown && (b.pointerDown.node.el.draggable = !0), b.pointerDown = void 0, !J(b)) return;
4413
+ if (b.pointerDown && (b.pointerDown.node.el.draggable = !0), b.pointerDown = void 0, !ee(b)) return;
4389
4414
  const e = b.currentParent.data.config;
4390
- J(b) && e.handleEnd(b);
4415
+ ee(b) && e.handleEnd(b);
4391
4416
  }
4392
4417
  function ma(e) {
4393
4418
  e.key === "Escape" && (b.selectedState && ye(b.selectedState.nodes, b.selectedState.parent, b), b.activeState && we(b.activeState.parent, void 0, b), b.selectedState = b.activeState = void 0);
@@ -4401,15 +4426,15 @@ function ba(e) {
4401
4426
  function va(e) {
4402
4427
  if (!Y(b)) return;
4403
4428
  G(e);
4404
- const { x: n, y: t } = Fe(e);
4429
+ const { x: n, y: t } = Re(e);
4405
4430
  Y(b) && un({ x: n, y: t }, e, b);
4406
4431
  }
4407
4432
  function ya(e) {
4408
4433
  if (!b.pointerDown || !b.pointerDown.validated) return;
4409
4434
  const n = b.pointerDown.parent.data.config;
4410
4435
  if (!(e.pointerType === "mouse" && !ht()))
4411
- if (J(b))
4412
- J(b) && Bn(e, b);
4436
+ if (ee(b))
4437
+ ee(b) && qn(e, b);
4413
4438
  else {
4414
4439
  if (G(e), n.longPress && !b.longPress) {
4415
4440
  clearTimeout(b.longPressTimeout), b.longPress = !1;
@@ -4425,7 +4450,7 @@ function ya(e) {
4425
4450
  t,
4426
4451
  r
4427
4452
  );
4428
- Bn(e, o, !0);
4453
+ qn(e, o, !0);
4429
4454
  }
4430
4455
  }
4431
4456
  function xa({
@@ -4435,8 +4460,8 @@ function xa({
4435
4460
  config: r = {}
4436
4461
  }) {
4437
4462
  var l, p, u;
4438
- if (!Fn) return;
4439
- jn || (jn = nn(document, {
4463
+ if (!Rn) return;
4464
+ _n || (_n = nn(document, {
4440
4465
  dragover: va,
4441
4466
  pointerdown: ha,
4442
4467
  pointerup: fa,
@@ -4448,7 +4473,7 @@ function xa({
4448
4473
  Y(b) && c.cancelable && G(c);
4449
4474
  },
4450
4475
  contextmenu: (c) => {
4451
- J(b) && G(c);
4476
+ ee(b) && G(c);
4452
4477
  }
4453
4478
  })), bt(e);
4454
4479
  const [o, i] = ct(), s = {
@@ -4457,18 +4482,18 @@ function xa({
4457
4482
  config: {
4458
4483
  dragDropEffect: r.dragDropEffect ?? "move",
4459
4484
  dragEffectAllowed: r.dragEffectAllowed ?? "move",
4460
- draggedNodes: Ra,
4485
+ draggedNodes: Fa,
4461
4486
  dragstartClasses: Ma,
4462
4487
  handleNodeKeydown: Va,
4463
4488
  handleDragstart: Oa,
4464
4489
  handleNodeDragover: Qa,
4465
4490
  handleParentDragover: Ka,
4466
- handleNodeDrop: _a,
4467
- handleNodeFocus: Ua,
4468
- handleNodeBlur: ja,
4469
- handlePointercancel: qa,
4491
+ handleNodeDrop: Ua,
4492
+ handleNodeFocus: ja,
4493
+ handleNodeBlur: _a,
4494
+ handlePointercancel: Ba,
4470
4495
  handleEnd: Ga,
4471
- handleDragend: Ba,
4496
+ handleDragend: qa,
4472
4497
  handleParentFocus: Ta,
4473
4498
  handleNodePointerup: Ya,
4474
4499
  handleNodePointerover: Ha,
@@ -4501,7 +4526,7 @@ function xa({
4501
4526
  on: i,
4502
4527
  emit: o
4503
4528
  };
4504
- new MutationObserver(Aa).observe(e, { childList: !0 }), q.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
4529
+ new MutationObserver(Aa).observe(e, { childList: !0 }), B.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
4505
4530
  var g, h;
4506
4531
  (h = (g = c(e)) == null ? void 0 : g.tearDown) == null || h.call(g);
4507
4532
  }), (p = r.plugins) == null || p.forEach((c) => {
@@ -4513,7 +4538,7 @@ function xa({
4513
4538
  }), Sa(e, s), dn(e, !0);
4514
4539
  }
4515
4540
  function mt(e, n, t, r, o, i) {
4516
- const { x: s, y: d } = Fe(t), l = e.el.getBoundingClientRect();
4541
+ const { x: s, y: d } = Re(t), l = e.el.getBoundingClientRect();
4517
4542
  return {
4518
4543
  affectedNodes: [],
4519
4544
  ascendingDirection: !1,
@@ -4554,7 +4579,7 @@ function wa({
4554
4579
  }) {
4555
4580
  dn(e.el);
4556
4581
  const r = n.map((l) => l.data.value), o = Ae(e.el, e.data), i = n[0].data.index, s = [...e.data.enabledNodes], d = [
4557
- ...o.filter((l) => !r.some((p) => je(l, p)))
4582
+ ...o.filter((l) => !r.some((p) => _e(l, p)))
4558
4583
  ];
4559
4584
  d.splice(t[0].data.index, 0, ...r), "draggedNode" in b && (b.currentTargetValue = t[0].data.value), Cn(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
4560
4585
  parent: {
@@ -4621,7 +4646,7 @@ function Ca({
4621
4646
  dn(t.el);
4622
4647
  const d = r.map((g) => g.data.value), l = [
4623
4648
  ...Ae(e.el, e.data).filter(
4624
- (g) => !d.some((h) => je(g, h))
4649
+ (g) => !d.some((h) => _e(g, h))
4625
4650
  )
4626
4651
  ], p = Ae(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
4627
4652
  let c;
@@ -4655,13 +4680,13 @@ function Da(e, n) {
4655
4680
  t(n);
4656
4681
  }
4657
4682
  function bt(e) {
4658
- const n = q.get(e);
4683
+ const n = B.get(e);
4659
4684
  n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
4660
4685
  }
4661
4686
  function Y(e) {
4662
4687
  return "draggedNode" in e && !!e.draggedNode;
4663
4688
  }
4664
- function J(e) {
4689
+ function ee(e) {
4665
4690
  return "synthDragging" in e && !!e.synthDragging;
4666
4691
  }
4667
4692
  function Sa(e, n) {
@@ -4671,7 +4696,7 @@ function Sa(e, n) {
4671
4696
  scroll: Ke(n.config.handleParentScroll),
4672
4697
  drop: Ke(n.config.handleParentDrop),
4673
4698
  hasNestedParent: (t) => {
4674
- const r = q.get(t.target);
4699
+ const r = B.get(t.target);
4675
4700
  r && (r.nestedParent = t.detail.parent);
4676
4701
  },
4677
4702
  focus: Ke(n.config.handleParentFocus)
@@ -4688,11 +4713,11 @@ function Sa(e, n) {
4688
4713
  );
4689
4714
  return;
4690
4715
  }
4691
- const o = ae.get(r);
4716
+ const o = le.get(r);
4692
4717
  if (!o) return;
4693
4718
  const i = r.parentNode;
4694
4719
  if (!(i instanceof HTMLElement)) return;
4695
- const s = q.get(i);
4720
+ const s = B.get(i);
4696
4721
  s && (b.pointerDown = {
4697
4722
  parent: {
4698
4723
  el: i,
@@ -4729,7 +4754,7 @@ function Ea(e) {
4729
4754
  Y(b) && r.cancelable && G(r);
4730
4755
  },
4731
4756
  contextmenu: (r) => {
4732
- J(b) && G(r);
4757
+ ee(b) && G(r);
4733
4758
  }
4734
4759
  }), e.node.el.draggable = !0, n.reapplyDragClasses(e.node.el, e.parent.data), (t = e.parent.data.config.plugins) == null || t.forEach((r) => {
4735
4760
  var o, i;
@@ -4738,14 +4763,14 @@ function Ea(e) {
4738
4763
  }
4739
4764
  function vt(e) {
4740
4765
  var n;
4741
- ae.set(e.node.el, e.node.data), (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
4766
+ le.set(e.node.el, e.node.data), (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
4742
4767
  var r, o;
4743
4768
  (o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
4744
4769
  });
4745
4770
  }
4746
4771
  function Na(e, n) {
4747
4772
  if (!Y(b)) return;
4748
- const t = J(b) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
4773
+ const t = ee(b) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
4749
4774
  b.draggedNode.el === e && Ne([e], t, !0);
4750
4775
  }
4751
4776
  function ka(e) {
@@ -4766,18 +4791,18 @@ function Aa(e) {
4766
4791
  if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
4767
4792
  return;
4768
4793
  const n = e[0].target;
4769
- !(n instanceof HTMLElement) || !q.get(n) || dn(n);
4794
+ !(n instanceof HTMLElement) || !B.get(n) || dn(n);
4770
4795
  }
4771
4796
  function dn(e, n) {
4772
4797
  var d;
4773
- const t = q.get(e);
4798
+ const t = B.get(e);
4774
4799
  if (!t) return;
4775
4800
  t.privateClasses = Array.from(e.classList);
4776
4801
  const r = [], o = t.config;
4777
4802
  for (let l = 0; l < e.children.length; l++) {
4778
4803
  const p = e.children[l];
4779
4804
  if (!pn(p) || p.id === "dnd-dragged-node-clone") continue;
4780
- const u = ae.get(p);
4805
+ const u = le.get(p);
4781
4806
  (n || !u) && o.tearDownNode({
4782
4807
  parent: {
4783
4808
  el: e,
@@ -4797,7 +4822,7 @@ function dn(e, n) {
4797
4822
  }
4798
4823
  const i = t.getValues(e), s = [];
4799
4824
  for (let l = 0; l < r.length; l++) {
4800
- const p = r[l], u = ae.get(p);
4825
+ const p = r[l], u = le.get(p);
4801
4826
  if (o.draggableValue && !o.draggableValue(i[l])) continue;
4802
4827
  const c = Object.assign(
4803
4828
  u ?? {
@@ -4809,7 +4834,7 @@ function dn(e, n) {
4809
4834
  index: l
4810
4835
  }
4811
4836
  );
4812
- if (!Y(b) && b.activeState && je(b.activeState.node.data.value, c.value) && we(
4837
+ if (!Y(b) && b.activeState && _e(b.activeState.node.data.value, c.value) && we(
4813
4838
  {
4814
4839
  data: t,
4815
4840
  el: e
@@ -4819,7 +4844,7 @@ function dn(e, n) {
4819
4844
  data: c
4820
4845
  },
4821
4846
  b
4822
- ), Y(b) && je(b.draggedNode.data.value, c.value)) {
4847
+ ), Y(b) && _e(b.draggedNode.data.value, c.value)) {
4823
4848
  b.draggedNode.data = c, b.draggedNode.el = p;
4824
4849
  const g = b.draggedNodes.find(
4825
4850
  (h) => h.data.value === c.value
@@ -4849,7 +4874,7 @@ function dn(e, n) {
4849
4874
  }
4850
4875
  });
4851
4876
  }
4852
- q.set(e, { ...t, enabledNodes: s }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((l) => {
4877
+ B.set(e, { ...t, enabledNodes: s }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((l) => {
4853
4878
  var p, u;
4854
4879
  (u = (p = l(e)) == null ? void 0 : p.remapFinished) == null || u.call(p);
4855
4880
  });
@@ -4857,10 +4882,10 @@ function dn(e, n) {
4857
4882
  function Ia() {
4858
4883
  b.remapJustFinished = !0, "draggedNode" in b && (b.affectedNodes = []);
4859
4884
  }
4860
- function Fa(e) {
4885
+ function Ra(e) {
4861
4886
  return !!e.targetData.parent.data.config.nativeDrag;
4862
4887
  }
4863
- function Ra(e) {
4888
+ function Fa(e) {
4864
4889
  var n;
4865
4890
  if (e.parent.data.config.multiDrag) {
4866
4891
  if (b.selectedState)
@@ -4874,13 +4899,13 @@ function Ra(e) {
4874
4899
  return [];
4875
4900
  }
4876
4901
  function La(e) {
4877
- Y(b) && (b.emit("scrollStarted", b), !J(b) && (b.preventEnter = !0, mn && clearTimeout(mn), mn = setTimeout(() => {
4902
+ Y(b) && (b.emit("scrollStarted", b), !ee(b) && (b.preventEnter = !0, mn && clearTimeout(mn), mn = setTimeout(() => {
4878
4903
  b.preventEnter = !1, b.emit("scrollEnded", b);
4879
4904
  }, 100)));
4880
4905
  }
4881
4906
  function Oa(e, n) {
4882
4907
  const t = e.targetData.parent.data.config;
4883
- if (!t.nativeDrag || !Fa(e) || !yt({
4908
+ if (!t.nativeDrag || !Ra(e) || !yt({
4884
4909
  x: e.e.clientX,
4885
4910
  y: e.e.clientY,
4886
4911
  node: e.targetData.node,
@@ -5082,17 +5107,17 @@ function Va(e) {
5082
5107
  function Ha(e) {
5083
5108
  e.detail.targetData.parent.el === e.detail.state.currentParent.el ? wt(e.detail, e.detail.state) : cn(e.detail, e.detail.state);
5084
5109
  }
5085
- function _a(e, n) {
5110
+ function Ua(e, n) {
5086
5111
  const t = e.targetData.parent.data.config;
5087
5112
  t.nativeDrag && (ge(e.e), pe = !0, t.handleEnd(n));
5088
5113
  }
5089
- function Ua(e) {
5114
+ function ja(e) {
5090
5115
  e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !1);
5091
5116
  }
5092
- function ja(e) {
5117
+ function _a(e) {
5093
5118
  e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !0);
5094
5119
  }
5095
- function Ba(e, n) {
5120
+ function qa(e, n) {
5096
5121
  const t = e.targetData.parent.data.config;
5097
5122
  if (t.nativeDrag) {
5098
5123
  if (G(e.e), ge(e.e), pe) {
@@ -5102,14 +5127,14 @@ function Ba(e, n) {
5102
5127
  t.handleEnd(n);
5103
5128
  }
5104
5129
  }
5105
- function qa(e, n) {
5130
+ function Ba(e, n) {
5106
5131
  var r;
5107
- if (!J(n)) return;
5132
+ if (!ee(n)) return;
5108
5133
  if (G(e.e), pe) {
5109
5134
  pe = !1;
5110
5135
  return;
5111
5136
  }
5112
- const t = (r = q.get(n.initialParent.el)) == null ? void 0 : r.config;
5137
+ const t = (r = B.get(n.initialParent.el)) == null ? void 0 : r.config;
5113
5138
  t != null && t.onDragend && t.onDragend({
5114
5139
  parent: n.currentParent,
5115
5140
  values: Ae(n.currentParent.el, n.currentParent.data),
@@ -5121,8 +5146,8 @@ function qa(e, n) {
5121
5146
  function Ga(e) {
5122
5147
  var u, c, g, h, f;
5123
5148
  e.draggedNode && (e.draggedNode.el.draggable = !0);
5124
- const n = e.draggedNodes.map((w) => w.el), t = e.initialParent.data, r = J(e), o = (u = q.get(e.initialParent.el)) == null ? void 0 : u.config, i = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, s = (c = t == null ? void 0 : t.config) == null ? void 0 : c.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = t == null ? void 0 : t.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
5125
- J(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Dn(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), l !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = l), requestAnimationFrame(() => {
5149
+ const n = e.draggedNodes.map((w) => w.el), t = e.initialParent.data, r = ee(e), o = (u = B.get(e.initialParent.el)) == null ? void 0 : u.config, i = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, s = (c = t == null ? void 0 : t.config) == null ? void 0 : c.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = t == null ? void 0 : t.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
5150
+ ee(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Dn(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), l !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = l), requestAnimationFrame(() => {
5126
5151
  ue(n, i), ue(n, s), ue(n, d);
5127
5152
  }), ye(e.draggedNodes, e.currentParent, e), we(e.currentParent, void 0, e);
5128
5153
  const p = { ...e };
@@ -5245,10 +5270,10 @@ function xt(e, n = !1) {
5245
5270
  (u = e.initialParent.data.config) == null ? void 0 : u.longPressClass
5246
5271
  ));
5247
5272
  }
5248
- function Bn(e, n, t = !1) {
5249
- const r = Fe(e);
5273
+ function qn(e, n, t = !1) {
5274
+ const r = Re(e);
5250
5275
  n.coordinates.x = r.x, n.coordinates.y = r.y, xt(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
5251
- J(n) && un(n.coordinates, e, n);
5276
+ ee(n) && un(n.coordinates, e, n);
5252
5277
  }, 16);
5253
5278
  const o = ai(r);
5254
5279
  if (!o) {
@@ -5280,13 +5305,13 @@ function Bn(e, n, t = !1) {
5280
5305
  function Qa(e, n) {
5281
5306
  var i;
5282
5307
  if (!e.targetData.parent.data.config.nativeDrag) return;
5283
- const { x: r, y: o } = Fe(e.e);
5308
+ const { x: r, y: o } = Re(e.e);
5284
5309
  n.coordinates.y = o, n.coordinates.x = r, G(e.e), ge(e.e), Y(n) && un({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((i = n.currentParent) == null ? void 0 : i.el) ? wt(e, n) : cn(e, n);
5285
5310
  }
5286
5311
  function Ka(e, n) {
5287
5312
  if (!e.targetData.parent.data.config.nativeDrag) return;
5288
5313
  G(e.e), ge(e.e);
5289
- const { x: r, y: o } = Fe(e.e);
5314
+ const { x: r, y: o } = Re(e.e);
5290
5315
  Y(n) && un({ x: r, y: o }, e.e, n), cn(e, n);
5291
5316
  }
5292
5317
  function Za(e) {
@@ -5351,7 +5376,7 @@ function ti(e, n, t, r) {
5351
5376
  return !1;
5352
5377
  }
5353
5378
  function wt(e, n) {
5354
- const { x: t, y: r } = Fe(e.e);
5379
+ const { x: t, y: r } = Re(e.e);
5355
5380
  if (!ti(e, n, t, r))
5356
5381
  return;
5357
5382
  const o = n.draggedNode.data.index > e.targetData.node.data.index ? [e.targetData.node.data.index, n.draggedNode.data.index] : [n.draggedNode.data.index, e.targetData.node.data.index];
@@ -5365,9 +5390,9 @@ function wt(e, n) {
5365
5390
  }
5366
5391
  function X(e) {
5367
5392
  function n(t) {
5368
- const r = ae.get(t);
5393
+ const r = le.get(t);
5369
5394
  if (!r) return;
5370
- const o = q.get(t.parentNode);
5395
+ const o = B.get(t.parentNode);
5371
5396
  if (o)
5372
5397
  return {
5373
5398
  node: {
@@ -5411,7 +5436,7 @@ function cn(e, n) {
5411
5436
  }
5412
5437
  function Ke(e) {
5413
5438
  function n(t) {
5414
- const r = q.get(t);
5439
+ const r = B.get(t);
5415
5440
  if (r)
5416
5441
  return {
5417
5442
  parent: {
@@ -5434,10 +5459,10 @@ function Ke(e) {
5434
5459
  }
5435
5460
  function Ne(e, n, t = !1) {
5436
5461
  function r(o, i) {
5437
- ae.set(o, i);
5462
+ le.set(o, i);
5438
5463
  }
5439
5464
  for (const o of e) {
5440
- const i = ae.get(o), s = ri(o, n, i, t);
5465
+ const i = le.get(o), s = ri(o, n, i, t);
5441
5466
  s && r(o, s);
5442
5467
  }
5443
5468
  }
@@ -5467,13 +5492,13 @@ function ue(e, n) {
5467
5492
  r.classList.remove(...t);
5468
5493
  continue;
5469
5494
  }
5470
- const o = ae.get(r) || q.get(r);
5495
+ const o = le.get(r) || B.get(r);
5471
5496
  if (o)
5472
5497
  for (const i of t)
5473
5498
  o.privateClasses.includes(i) || r.classList.remove(i);
5474
5499
  }
5475
5500
  }
5476
- function qn(e, n, t, r, o) {
5501
+ function Bn(e, n, t, r, o) {
5477
5502
  const s = o.axis === "x", d = e === document.scrollingElement, l = s ? "scrollLeft" : "scrollTop", p = s ? "clientWidth" : "clientHeight", u = s ? "offsetWidth" : "offsetHeight", c = s ? "scrollWidth" : "scrollHeight", g = s ? n.clientX : n.clientY, h = s ? r.left : r.top, f = s ? t.overflowX : t.overflowY;
5478
5503
  if (d) {
5479
5504
  const w = e[l], y = e[p], x = w > 0, T = w + y < (s ? o.state.rootScrollWidth || 0 : e[c]);
@@ -5513,7 +5538,7 @@ function oi(e, n, t, r) {
5513
5538
  t[l] = void 0, t[d] = void 0;
5514
5539
  return;
5515
5540
  }
5516
- e[u] += s * i, J(t) && xt(t), t[l] = requestAnimationFrame(p);
5541
+ e[u] += s * i, ee(t) && xt(t), t[l] = requestAnimationFrame(p);
5517
5542
  };
5518
5543
  t[l] = requestAnimationFrame(p);
5519
5544
  }
@@ -5530,10 +5555,10 @@ function un(e, n, t) {
5530
5555
  const s = (l, p, u) => {
5531
5556
  oi(u, n, t, { axis: l, direction: p }), i = !0;
5532
5557
  }, d = (l) => {
5533
- const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = qn(l, n, p, u, {
5558
+ const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Bn(l, n, p, u, {
5534
5559
  axis: "x",
5535
5560
  state: t
5536
- }), g = qn(l, n, p, u, { axis: "y" });
5561
+ }), g = Bn(l, n, p, u, { axis: "y" });
5537
5562
  (c.left || c.right) && (t.lastScrollContainerX = l, s("x", c.right ? "positive" : "negative", l)), (g.up || g.down) && (t.lastScrollContainerY = l, s("y", g.down ? "positive" : "negative", l));
5538
5563
  };
5539
5564
  if (t.lastScrollContainerX && Gn(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !i && t.lastScrollContainerY && Gn(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !i) {
@@ -5552,14 +5577,14 @@ function ai(e) {
5552
5577
  if (!pn(n)) return;
5553
5578
  let t, r = !0;
5554
5579
  for (; n && r; ) {
5555
- if (ae.has(n) || q.has(n)) {
5556
- r = !1, t = q.has(n);
5580
+ if (le.has(n) || B.has(n)) {
5581
+ r = !1, t = B.has(n);
5557
5582
  break;
5558
5583
  }
5559
5584
  n = n.parentNode;
5560
5585
  }
5561
5586
  if (t) {
5562
- const o = q.get(n);
5587
+ const o = B.get(n);
5563
5588
  return o ? {
5564
5589
  parent: {
5565
5590
  el: n,
@@ -5567,9 +5592,9 @@ function ai(e) {
5567
5592
  }
5568
5593
  } : void 0;
5569
5594
  } else {
5570
- const o = ae.get(n);
5595
+ const o = le.get(n);
5571
5596
  if (!o) return;
5572
- const i = q.get(n.parentNode);
5597
+ const i = B.get(n.parentNode);
5573
5598
  return i ? {
5574
5599
  node: {
5575
5600
  el: n,
@@ -5622,7 +5647,7 @@ function ci(e, n) {
5622
5647
  };
5623
5648
  }
5624
5649
  function Yn(e) {
5625
- Fn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
5650
+ Rn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
5626
5651
  const { parent: t, state: r, ...o } = n;
5627
5652
  li(t, ci(o, r));
5628
5653
  }));
@@ -5676,17 +5701,17 @@ const Wn = {
5676
5701
  } = e, [l, p] = ui(
5677
5702
  i,
5678
5703
  { group: r }
5679
- ), [u, c] = U.useState(
5704
+ ), [u, c] = j.useState(
5680
5705
  null
5681
- ), g = U.useRef(i);
5682
- U.useEffect(() => {
5706
+ ), g = j.useRef(i);
5707
+ j.useEffect(() => {
5683
5708
  const x = (T) => {
5684
5709
  const D = T.detail ?? null;
5685
5710
  c(D);
5686
5711
  };
5687
5712
  return window.addEventListener(bn, x), () => window.removeEventListener(bn, x);
5688
5713
  }, []);
5689
- const h = U.useCallback((x) => {
5714
+ const h = j.useCallback((x) => {
5690
5715
  window.dispatchEvent(
5691
5716
  new CustomEvent(bn, { detail: x })
5692
5717
  );
@@ -5694,15 +5719,15 @@ const Wn = {
5694
5719
  var E;
5695
5720
  const T = x.target, D = (E = T == null ? void 0 : T.closest) == null ? void 0 : E.call(T, "li.dnd-item"), I = (D == null ? void 0 : D.getAttribute("data-label")) || null;
5696
5721
  I && (c(I), h(I));
5697
- }, w = U.useCallback(() => {
5722
+ }, w = j.useCallback(() => {
5698
5723
  c(null), h(null);
5699
5724
  }, [h]);
5700
- U.useEffect(() => {
5725
+ j.useEffect(() => {
5701
5726
  const x = () => w();
5702
5727
  return window.addEventListener("pointerup", x), window.addEventListener("blur", x), () => {
5703
5728
  window.removeEventListener("pointerup", x), window.removeEventListener("blur", x);
5704
5729
  };
5705
- }, [w]), U.useEffect(() => {
5730
+ }, [w]), j.useEffect(() => {
5706
5731
  const x = g.current;
5707
5732
  if (p.length !== x.length && p.length === x.length + 1) {
5708
5733
  const T = new Set(x), D = p.find((I) => !T.has(I)) || null;
@@ -5730,7 +5755,7 @@ const Wn = {
5730
5755
  onPointerCancelCapture: w,
5731
5756
  $isEmpty: y,
5732
5757
  children: y ? /* @__PURE__ */ a(
5733
- ee,
5758
+ ne,
5734
5759
  {
5735
5760
  background: !0,
5736
5761
  borderRadius: "8px",
@@ -5748,7 +5773,7 @@ const Wn = {
5748
5773
  "data-label": x,
5749
5774
  "data-first": !!(s && T === 0) || void 0,
5750
5775
  $active: D,
5751
- children: /* @__PURE__ */ a(ee, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
5776
+ children: /* @__PURE__ */ a(ne, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
5752
5777
  k,
5753
5778
  {
5754
5779
  type: "title",
@@ -5879,7 +5904,7 @@ const Wn = {
5879
5904
  }
5880
5905
  )
5881
5906
  ] });
5882
- }, oe = {
5907
+ }, ie = {
5883
5908
  border: {
5884
5909
  color: {
5885
5910
  regular: S.palette.neutral.N40,
@@ -5928,7 +5953,7 @@ const Wn = {
5928
5953
  border-radius: 4px;
5929
5954
  background: ${({ theme: e }) => {
5930
5955
  var n, t, r;
5931
- return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.regular) || oe.option.background.regular;
5956
+ return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.regular) || ie.option.background.regular;
5932
5957
  }};
5933
5958
  box-shadow:
5934
5959
  0px 1px 2px rgba(0, 0, 0, 0.3),
@@ -5965,7 +5990,7 @@ const Wn = {
5965
5990
  & > li:hover {
5966
5991
  background: ${({ theme: e }) => {
5967
5992
  var n, t, r;
5968
- return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.hover) || oe.option.background.hover;
5993
+ return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.hover) || ie.option.background.hover;
5969
5994
  }};
5970
5995
  }
5971
5996
  `, bi = (e) => {
@@ -6018,13 +6043,13 @@ const Wn = {
6018
6043
  cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
6019
6044
  background-color: ${({ $disabled: e, theme: n }) => {
6020
6045
  var t, r, o, i, s, d;
6021
- return e ? ((o = (r = (t = n == null ? void 0 : n.input) == null ? void 0 : t.background) == null ? void 0 : r.color) == null ? void 0 : o.disabled) || oe.background.color.disabled : ((d = (s = (i = n == null ? void 0 : n.input) == null ? void 0 : i.background) == null ? void 0 : s.color) == null ? void 0 : d.regular) || oe.background.color.regular;
6046
+ return e ? ((o = (r = (t = n == null ? void 0 : n.input) == null ? void 0 : t.background) == null ? void 0 : r.color) == null ? void 0 : o.disabled) || ie.background.color.disabled : ((d = (s = (i = n == null ? void 0 : n.input) == null ? void 0 : i.background) == null ? void 0 : s.color) == null ? void 0 : d.regular) || ie.background.color.regular;
6022
6047
  }};
6023
6048
 
6024
6049
  border: 1px solid
6025
6050
  ${({ $disabled: e, $invalid: n, $focused: t, theme: r }) => {
6026
6051
  var i, s;
6027
- const o = ((s = (i = r == null ? void 0 : r.input) == null ? void 0 : i.border) == null ? void 0 : s.color) || oe.border.color;
6052
+ const o = ((s = (i = r == null ? void 0 : r.input) == null ? void 0 : i.border) == null ? void 0 : s.color) || ie.border.color;
6028
6053
  return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
6029
6054
  }};
6030
6055
  `, wi = C.input`
@@ -6059,13 +6084,13 @@ const Wn = {
6059
6084
  }};
6060
6085
  color: ${({ $disabled: e, theme: n }) => {
6061
6086
  var t, r, o, i, s, d;
6062
- return e ? ((o = (r = (t = n == null ? void 0 : n.input) == null ? void 0 : t.content) == null ? void 0 : r.color) == null ? void 0 : o.disabled) || oe.content.color.disabled : ((d = (s = (i = n == null ? void 0 : n.input) == null ? void 0 : i.content) == null ? void 0 : s.color) == null ? void 0 : d.regular) || oe.content.color.regular;
6087
+ return e ? ((o = (r = (t = n == null ? void 0 : n.input) == null ? void 0 : t.content) == null ? void 0 : r.color) == null ? void 0 : o.disabled) || ie.content.color.disabled : ((d = (s = (i = n == null ? void 0 : n.input) == null ? void 0 : i.content) == null ? void 0 : s.color) == null ? void 0 : d.regular) || ie.content.color.regular;
6063
6088
  }};
6064
6089
 
6065
6090
  ::placeholder {
6066
6091
  color: ${({ theme: e }) => {
6067
6092
  var n, t, r;
6068
- return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.placeholder) == null ? void 0 : t.color) == null ? void 0 : r.regular) || oe.placeholder.color.regular;
6093
+ return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.placeholder) == null ? void 0 : t.color) == null ? void 0 : r.regular) || ie.placeholder.color.regular;
6069
6094
  }};
6070
6095
  }
6071
6096
 
@@ -6098,13 +6123,13 @@ function Qn(e, n) {
6098
6123
  }
6099
6124
  const Di = (e) => {
6100
6125
  var o, i;
6101
- const { message: n } = e, t = $n(Nn), r = ((i = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : i.appearance) || oe.message.appearance;
6126
+ const { message: n } = e, t = $n(Nn), r = ((i = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : i.appearance) || ie.message.appearance;
6102
6127
  return /* @__PURE__ */ m(v, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
6103
6128
  /* @__PURE__ */ a(
6104
6129
  P,
6105
6130
  {
6106
6131
  appearance: r,
6107
- icon: /* @__PURE__ */ a(Ft, {}),
6132
+ icon: /* @__PURE__ */ a(Rt, {}),
6108
6133
  size: "14px"
6109
6134
  }
6110
6135
  ),
@@ -6142,19 +6167,19 @@ const Di = (e) => {
6142
6167
  checkedItems: D,
6143
6168
  editable: I = !1,
6144
6169
  clearable: E,
6145
- onKeyUp: F,
6146
- onBlur: R,
6170
+ onKeyUp: R,
6171
+ onBlur: F,
6147
6172
  onChange: $,
6148
- onClick: j,
6173
+ onClick: _,
6149
6174
  onFocus: se,
6150
6175
  onOptionClick: Te,
6151
6176
  onCheckboxChange: Ce,
6152
6177
  handleClear: he
6153
- } = e, re = $n(Nn), Re = ((Oe = (de = re == null ? void 0 : re.input) == null ? void 0 : de.required) == null ? void 0 : Oe.appearance) || oe.required.appearance, De = f && !r, fe = x || y === "" ? "" : Qn(g, y), me = nt(
6154
- () => g.filter((z) => D.includes(z.id)),
6178
+ } = e, ae = $n(Nn), Fe = ((Oe = (de = ae == null ? void 0 : ae.input) == null ? void 0 : de.required) == null ? void 0 : Oe.appearance) || ie.required.appearance, De = f && !r, fe = x || y === "" ? "" : Qn(g, y), me = nt(
6179
+ () => g.filter((V) => D.includes(V.id)),
6155
6180
  [g, D]
6156
- ), Le = (z, L) => {
6157
- z.stopPropagation(), Ce({
6181
+ ), Le = (V, L) => {
6182
+ V.stopPropagation(), Ce({
6158
6183
  target: { checked: !1, value: L }
6159
6184
  });
6160
6185
  };
@@ -6178,7 +6203,7 @@ const Di = (e) => {
6178
6203
  children: l
6179
6204
  }
6180
6205
  ),
6181
- De && /* @__PURE__ */ a(k, { appearance: Re, size: "small", type: "body", children: "(Requerido)" })
6206
+ De && /* @__PURE__ */ a(k, { appearance: Fe, size: "small", type: "body", children: "(Requerido)" })
6182
6207
  ]
6183
6208
  }
6184
6209
  ),
@@ -6188,7 +6213,7 @@ const Di = (e) => {
6188
6213
  $disabled: r,
6189
6214
  $focused: o,
6190
6215
  $invalid: d,
6191
- onClick: I ? void 0 : j,
6216
+ onClick: I ? void 0 : _,
6192
6217
  $value: y,
6193
6218
  $size: w,
6194
6219
  children: [
@@ -6208,10 +6233,10 @@ const Di = (e) => {
6208
6233
  $focused: o,
6209
6234
  readOnly: !I,
6210
6235
  onFocus: se,
6211
- onBlur: R,
6212
- onChange: (z) => $(c, z.target.value),
6213
- onClick: I ? j : void 0,
6214
- onKeyUp: F
6236
+ onBlur: F,
6237
+ onChange: (V) => $(c, V.target.value),
6238
+ onClick: I ? _ : void 0,
6239
+ onKeyUp: R
6215
6240
  }
6216
6241
  ),
6217
6242
  /* @__PURE__ */ m(
@@ -6222,16 +6247,16 @@ const Di = (e) => {
6222
6247
  alignItems: "center",
6223
6248
  justifyContent: "space-between",
6224
6249
  children: [
6225
- /* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: E && !r && (x ? me.map((z) => /* @__PURE__ */ a(
6250
+ /* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: E && !r && (x ? me.map((V) => /* @__PURE__ */ a(
6226
6251
  ve,
6227
6252
  {
6228
6253
  appearance: "gray",
6229
- label: z.label,
6254
+ label: V.label,
6230
6255
  removable: !0,
6231
6256
  displayIcon: !1,
6232
- onClose: (L) => Le(L, z.id)
6257
+ onClose: (L) => Le(L, V.id)
6233
6258
  },
6234
- z.id
6259
+ V.id
6235
6260
  )) : (y ?? "") !== "" && /* @__PURE__ */ a(
6236
6261
  ve,
6237
6262
  {
@@ -6239,8 +6264,8 @@ const Di = (e) => {
6239
6264
  label: Qn(g, y),
6240
6265
  removable: !0,
6241
6266
  displayIcon: !1,
6242
- onClose: (z) => {
6243
- z.stopPropagation(), he();
6267
+ onClose: (V) => {
6268
+ V.stopPropagation(), he();
6244
6269
  }
6245
6270
  }
6246
6271
  )) }),
@@ -6266,16 +6291,16 @@ const Di = (e) => {
6266
6291
  maxItems: p,
6267
6292
  onOptionClick: Te,
6268
6293
  options: g,
6269
- children: g.map((z) => /* @__PURE__ */ a(
6294
+ children: g.map((V) => /* @__PURE__ */ a(
6270
6295
  Vt,
6271
6296
  {
6272
- id: z.id,
6273
- label: z.label,
6274
- checked: D.includes(z.id),
6297
+ id: V.id,
6298
+ label: V.label,
6299
+ checked: D.includes(V.id),
6275
6300
  onCheckboxChange: Ce,
6276
6301
  picker: x
6277
6302
  },
6278
- z.id
6303
+ V.id
6279
6304
  ))
6280
6305
  }
6281
6306
  )
@@ -6303,21 +6328,21 @@ const Di = (e) => {
6303
6328
  showOptions: D = !1,
6304
6329
  picker: I = !1,
6305
6330
  showChevron: E = !0,
6306
- editable: F = !1,
6307
- clearable: R = !0
6308
- } = e, [$, j] = M(!1), [se, Te] = M(!1), [Ce, he] = M([]), re = Ee(null);
6331
+ editable: R = !1,
6332
+ clearable: F = !0
6333
+ } = e, [$, _] = M(!1), [se, Te] = M(!1), [Ce, he] = M([]), ae = Ee(null);
6309
6334
  xe(() => {
6310
6335
  if (I) {
6311
6336
  const L = T ? T.split(",").map((W) => W.trim()) : [];
6312
6337
  he(L);
6313
6338
  }
6314
6339
  }, [T, I]);
6315
- function Re() {
6316
- u(l, ""), he([]), j(!1);
6340
+ function Fe() {
6341
+ u(l, ""), he([]), _(!1);
6317
6342
  }
6318
6343
  function De(L) {
6319
6344
  if (!n) {
6320
- j(!$);
6345
+ _(!$);
6321
6346
  try {
6322
6347
  c && c(L);
6323
6348
  } catch (W) {
@@ -6325,8 +6350,8 @@ const Di = (e) => {
6325
6350
  }
6326
6351
  }
6327
6352
  }
6328
- const fe = _t((L) => {
6329
- re.current && L.target && !re.current.contains(L.target) && j(!1);
6353
+ const fe = Ut((L) => {
6354
+ ae.current && L.target && !ae.current.contains(L.target) && _(!1);
6330
6355
  }, []);
6331
6356
  function me(L) {
6332
6357
  try {
@@ -6336,7 +6361,7 @@ const Di = (e) => {
6336
6361
  }
6337
6362
  }
6338
6363
  function Le(L) {
6339
- j(!1);
6364
+ _(!1);
6340
6365
  try {
6341
6366
  u && u(l, L);
6342
6367
  } catch (W) {
@@ -6344,7 +6369,7 @@ const Di = (e) => {
6344
6369
  }
6345
6370
  }
6346
6371
  function de(L) {
6347
- L.key === "Escape" && j(!1), j(!$);
6372
+ L.key === "Escape" && _(!1), _(!$);
6348
6373
  try {
6349
6374
  h && h(L);
6350
6375
  } catch (W) {
@@ -6354,18 +6379,18 @@ const Di = (e) => {
6354
6379
  function Oe(L) {
6355
6380
  const { value: W, checked: We } = L.target;
6356
6381
  he((A) => {
6357
- const B = We ? [...A, W] : A.filter((ne) => ne !== W);
6358
- return u(l, B.join(",")), B;
6382
+ const q = We ? [...A, W] : A.filter((te) => te !== W);
6383
+ return u(l, q.join(",")), q;
6359
6384
  });
6360
6385
  }
6361
6386
  xe(() => (document.addEventListener("click", fe), () => {
6362
6387
  document.removeEventListener("click", fe);
6363
6388
  }), [fe]);
6364
- const z = nt(() => R || I ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, R, I]);
6389
+ const V = nt(() => F || I ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, F, I]);
6365
6390
  return /* @__PURE__ */ a(
6366
6391
  Si,
6367
6392
  {
6368
- ref: re,
6393
+ ref: ae,
6369
6394
  disabled: n,
6370
6395
  displayList: $ || D,
6371
6396
  focused: se,
@@ -6376,7 +6401,7 @@ const Di = (e) => {
6376
6401
  maxItems: s,
6377
6402
  message: d,
6378
6403
  name: l,
6379
- options: z,
6404
+ options: V,
6380
6405
  placeholder: w,
6381
6406
  required: y,
6382
6407
  size: x,
@@ -6384,9 +6409,9 @@ const Di = (e) => {
6384
6409
  picker: I,
6385
6410
  showChevron: E,
6386
6411
  checkedItems: Ce,
6387
- editable: F,
6388
- clearable: R,
6389
- handleClear: Re,
6412
+ editable: R,
6413
+ clearable: F,
6414
+ handleClear: Fe,
6390
6415
  onBlur: me,
6391
6416
  onChange: u,
6392
6417
  onClick: De,
@@ -6444,7 +6469,7 @@ function $i(e) {
6444
6469
  return e.replace(/\s+/g, " ").trim();
6445
6470
  }
6446
6471
  function Ai(e) {
6447
- const n = Ii(e).toLowerCase(), t = /\b(s|es)\b/.test(Fi(e).toLowerCase()) && !n.endsWith("és");
6472
+ const n = Ii(e).toLowerCase(), t = /\b(s|es)\b/.test(Ri(e).toLowerCase()) && !n.endsWith("és");
6448
6473
  return ({
6449
6474
  mano: "f",
6450
6475
  día: "m",
@@ -6456,18 +6481,18 @@ function Ai(e) {
6456
6481
  antigüedad: "f",
6457
6482
  antiguedad: "f",
6458
6483
  puntaje: "m"
6459
- }[n] ?? Ri(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
6484
+ }[n] ?? Fi(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
6460
6485
  }
6461
6486
  function Ii(e) {
6462
6487
  return (e.toLowerCase().split(
6463
6488
  /\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
6464
6489
  )[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
6465
6490
  }
6466
- function Fi(e) {
6491
+ function Ri(e) {
6467
6492
  const n = e.trim().split(/\s+/);
6468
6493
  return n[n.length - 1] || "";
6469
6494
  }
6470
- function Ri(e) {
6495
+ function Fi(e) {
6471
6496
  return /(?:dad|tad|tud|umbre|ción|sión|ie|sis|itis)$/.test(e) || e.endsWith("ez") || e.endsWith("eza") ? "f" : /(?:aje|or|án|ambre)$/.test(e) ? "m" : e.endsWith("a") ? "f" : "m";
6472
6497
  }
6473
6498
  function Li(e) {
@@ -6500,7 +6525,7 @@ const yl = (e) => Object.values(e).flat(), xl = (e, n) => Object.fromEntries(
6500
6525
  const n = Date.now(), t = Kn.get(e) || 0;
6501
6526
  return n - t < Mi ? !0 : (Kn.set(e, n), !1);
6502
6527
  }, Vi = (e) => {
6503
- const n = Bt(e);
6528
+ const n = qt(e);
6504
6529
  return {
6505
6530
  spa: "es",
6506
6531
  eng: "en",
@@ -6516,7 +6541,7 @@ const yl = (e) => Object.values(e).flat(), xl = (e, n) => Object.fromEntries(
6516
6541
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
6517
6542
  const s = Vi(e);
6518
6543
  try {
6519
- const { data: d } = await jt.post(
6544
+ const { data: d } = await _t.post(
6520
6545
  t,
6521
6546
  {
6522
6547
  q: e,
@@ -6534,10 +6559,10 @@ const yl = (e) => Object.values(e).flat(), xl = (e, n) => Object.fromEntries(
6534
6559
  } catch (d) {
6535
6560
  return console.warn(`[Translation] Failed for: "${e}"`, d), e;
6536
6561
  }
6537
- }, _i = (e) => typeof e == "string" && e.trim().length > 0, Zn = async (e, n, t) => {
6562
+ }, Ui = (e) => typeof e == "string" && e.trim().length > 0, Zn = async (e, n, t) => {
6538
6563
  const r = await Promise.all(
6539
6564
  Object.entries(e).map(async ([o, i]) => {
6540
- if (_i(i)) {
6565
+ if (Ui(i)) {
6541
6566
  const s = await Hi(i, n, t);
6542
6567
  return [o, s];
6543
6568
  } else if (Array.isArray(i)) {
@@ -6578,7 +6603,7 @@ export {
6578
6603
  na as RulesForm,
6579
6604
  fl as SendButton,
6580
6605
  vl as buildEsConditionSentence,
6581
- jo as convertRangeToString,
6606
+ _o as convertRangeToString,
6582
6607
  it as filterByGroup,
6583
6608
  yl as flatFromGroups,
6584
6609
  ll as formatDecisionForBackend,