@isettingkit/business-rules 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,15 +1,15 @@
1
- import { jsx as i, jsxs as v, Fragment as Y } from "react/jsx-runtime";
2
- import { MdOutlineDelete as pn, MdClear as gn, MdAdd as fn, MdOutlineCreate as ft, MdExpandLess as ht, MdExpandMore as an, MdInfo as mt, MdCached as bt, MdOutlineInfo as vt, MdClose as yt, MdOutlineFilterAltOff as Bn, MdOutlineFilterAlt as jn, MdChevronRight as Dn, MdArrowRight as xt, MdOutlineArrowCircleLeft as wt, MdOutlineArrowCircleRight as Dt, MdOutlineChevronRight as Ct, MdOutlineError as Tt } from "react-icons/md";
3
- import { inube as S, Stack as w, Divider as Z, Icon as O, Text as I, SkeletonLine as ie, useMediaQuery as re, Blanket as hn, Button as j, Grid as Ge, Box as St, Tag as me, SkeletonIcon as Nt, Checkbox as Un, Date as je, Fieldset as Pe, Tabs as Et, OptionList as kt, Checkpicker as $t, Toggle as _n, Label as It, OptionItem as At } from "@inubekit/inubekit";
1
+ import { jsx as i, jsxs as v, Fragment as G } from "react/jsx-runtime";
2
+ import { MdOutlineDelete as pn, MdClear as gn, MdAdd as fn, MdOutlineCreate as ft, MdExpandLess as ht, MdExpandMore as an, MdInfo as mt, MdCached as bt, MdOutlineInfo as vt, MdClose as yt, MdOutlineFilterAltOff as jn, MdOutlineFilterAlt as Bn, MdChevronRight as Dn, MdArrowRight as xt, MdOutlineArrowCircleLeft as wt, MdOutlineArrowCircleRight as Dt, MdOutlineChevronRight as Ct, MdOutlineError as Tt } from "react-icons/md";
3
+ import { inube as S, Stack as w, Divider as Z, Icon as O, Text as I, SkeletonLine as ie, useMediaQuery as re, Blanket as hn, Button as B, Grid as Xe, Box as St, Tag as me, SkeletonIcon as Et, Checkbox as Un, Date as Be, Fieldset as Le, Tabs as Nt, OptionList as kt, Checkpicker as $t, Toggle as _n, Label as At, OptionItem as It } from "@inubekit/inubekit";
4
4
  import T, { keyframes as qn, ThemeContext as mn } from "styled-components";
5
- import { ValueDataType as G, ValueHowToSetUp as te, DecisionConditionRenderNew as Cn, DecisionConditionRender as Tn } from "@isettingkit/input";
5
+ import { ValueDataType as X, ValueHowToSetUp as te, DecisionConditionRenderNew as Cn, DecisionConditionRender as Tn } from "@isettingkit/input";
6
6
  import { DecisionViewConditionRenderer as en, DecisionViewConditionRendererNew as Ve } from "@isettingkit/view";
7
7
  import { createPortal as bn } from "react-dom";
8
- import H, { useState as M, useRef as Ce, useEffect as ve, useContext as vn, forwardRef as Rt, useMemo as Yn, useCallback as Ft } from "react";
9
- import { useFormik as Xn } from "formik";
10
- import { string as Ee, mixed as We, object as le, number as Se, lazy as Ue, date as _e } from "yup";
11
- import { Link as Gn, useLocation as Pt } from "react-router-dom";
12
- import Lt from "axios";
8
+ import H, { useState as M, useRef as Ce, useEffect as ve, useContext as vn, forwardRef as Rt, useMemo as Gn, useCallback as Ft } from "react";
9
+ import { useFormik as Yn } from "formik";
10
+ import { string as Ne, mixed as We, object as le, number as Se, lazy as Ue, date as _e } from "yup";
11
+ import { Link as Xn, useLocation as Lt } from "react-router-dom";
12
+ import Pt from "axios";
13
13
  import { franc as Ot } from "franc-min";
14
14
  const Mt = T.div`
15
15
  border-radius: 8px;
@@ -50,7 +50,7 @@ const yn = (e) => {
50
50
  const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
51
51
  return /* @__PURE__ */ i(Mt, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "16px", padding: "12px 16px", children: [
52
52
  n,
53
- t && /* @__PURE__ */ v(Y, { children: [
53
+ t && /* @__PURE__ */ v(G, { children: [
54
54
  /* @__PURE__ */ i(Z, {}),
55
55
  /* @__PURE__ */ i(w, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
56
56
  O,
@@ -66,19 +66,19 @@ const yn = (e) => {
66
66
  ) })
67
67
  ] })
68
68
  ] }) });
69
- }, zt = (e) => e.value, Vt = (e) => e.value, Ht = (e) => e.value, Bt = (e) => ({
69
+ }, zt = (e) => e.value, Vt = (e) => e.value, Ht = (e) => e.value, jt = (e) => ({
70
70
  from: e.from ?? "",
71
71
  to: e.to ?? ""
72
- }), jt = (e) => e.value, Ut = (e) => e.value, _t = (e) => e.value;
72
+ }), Bt = (e) => e.value, Ut = (e) => e.value, _t = (e) => e.value;
73
73
  var A = /* @__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))(A || {});
74
74
  const qt = {
75
75
  [A.LIST_OF_VALUES]: Vt,
76
76
  [A.LIST_OF_VALUES_MULTI]: Ht,
77
- [A.RANGE]: Bt,
78
- [A.GREATER_THAN]: jt,
77
+ [A.RANGE]: jt,
78
+ [A.GREATER_THAN]: Bt,
79
79
  [A.LESS_THAN]: Ut,
80
80
  [A.EQUAL]: _t
81
- }, Le = (e) => {
81
+ }, Pe = (e) => {
82
82
  const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = qt[e == null ? void 0 : e.howToSetTheDecision] || zt;
83
83
  return t && r(n) || n || void 0;
84
84
  }, Sn = T.div`
@@ -90,7 +90,7 @@ const qt = {
90
90
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
91
91
  }};
92
92
  }
93
- `, Nn = T.div`
93
+ `, En = T.div`
94
94
  width: 100%;
95
95
  height: 100%;
96
96
  overflow-y: auto;
@@ -108,7 +108,7 @@ const qt = {
108
108
  background-color: #ebecf0;
109
109
  border-radius: 8px;
110
110
  }
111
- `, Yt = (e) => {
111
+ `, Gt = (e) => {
112
112
  const {
113
113
  conditionsAlignment: n,
114
114
  decision: t,
@@ -116,8 +116,8 @@ const qt = {
116
116
  decisionMapper: o,
117
117
  loading: a,
118
118
  skeleton: l,
119
- terms: s,
120
- textValues: d,
119
+ terms: d,
120
+ textValues: s,
121
121
  visibleConditions: c
122
122
  } = e;
123
123
  return a ? /* @__PURE__ */ v(w, { direction: "column", gap: "12px", children: [
@@ -125,14 +125,14 @@ const qt = {
125
125
  en,
126
126
  {
127
127
  element: o,
128
- valueData: Le(
128
+ valueData: Pe(
129
129
  o
130
130
  ),
131
131
  type: "decision"
132
132
  }
133
133
  ) }, t.ruleName),
134
134
  /* @__PURE__ */ i(Z, { dashed: !0 }),
135
- /* @__PURE__ */ i(Nn, { children: /* @__PURE__ */ v(
135
+ /* @__PURE__ */ i(En, { children: /* @__PURE__ */ v(
136
136
  w,
137
137
  {
138
138
  direction: "column",
@@ -148,27 +148,27 @@ const qt = {
148
148
  appearance: "dark",
149
149
  weight: "bold",
150
150
  textAlign: "center",
151
- children: d.factsThatConditionIt
151
+ children: s.factsThatConditionIt
152
152
  }
153
153
  ),
154
154
  c.length > 0 && c.map((p) => /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ i(w, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
155
155
  en,
156
156
  {
157
157
  element: { ...p, value: p.value },
158
- valueData: Le(
158
+ valueData: Pe(
159
159
  p
160
160
  )
161
161
  }
162
162
  ) }) }, p.conditionName)),
163
163
  c.length > 0 && /* @__PURE__ */ i(Z, { dashed: !0 }),
164
- s && /* @__PURE__ */ i(Y, { children: r && /* @__PURE__ */ i(
164
+ d && /* @__PURE__ */ i(G, { children: r && /* @__PURE__ */ i(
165
165
  en,
166
166
  {
167
167
  element: r.element,
168
168
  valueData: r.valueData,
169
169
  type: "decision"
170
170
  },
171
- d.terms
171
+ s.terms
172
172
  ) })
173
173
  ]
174
174
  }
@@ -182,7 +182,7 @@ const qt = {
182
182
  /* @__PURE__ */ i(Z, { dashed: !0 }),
183
183
  /* @__PURE__ */ i(ie, { animated: !0, width: "150px" })
184
184
  ] }),
185
- /* @__PURE__ */ i(Nn, { children: /* @__PURE__ */ i(
185
+ /* @__PURE__ */ i(En, { children: /* @__PURE__ */ i(
186
186
  w,
187
187
  {
188
188
  direction: "column",
@@ -212,58 +212,58 @@ const qt = {
212
212
  labelName: r == null ? void 0 : r.terms,
213
213
  value: String(n.effectiveFrom),
214
214
  howToSetTheDecision: te.RANGE,
215
- decisionDataType: G.DATE
215
+ decisionDataType: X.DATE
216
216
  },
217
- valueData: Le({
217
+ valueData: Pe({
218
218
  labelName: r == null ? void 0 : r.terms,
219
219
  value: {
220
220
  from: String(n.effectiveFrom),
221
221
  to: String(n.validUntil)
222
222
  },
223
223
  howToSetTheDecision: te.RANGE,
224
- decisionDataType: G.DATE
224
+ decisionDataType: X.DATE
225
225
  })
226
226
  } : o && !a ? {
227
227
  element: {
228
228
  labelName: r == null ? void 0 : r.terms,
229
229
  value: String(n.effectiveFrom),
230
230
  howToSetTheDecision: te.EQUAL,
231
- decisionDataType: G.DATE
231
+ decisionDataType: X.DATE
232
232
  },
233
- valueData: Le({
233
+ valueData: Pe({
234
234
  labelName: r == null ? void 0 : r.terms,
235
235
  value: String(n.effectiveFrom),
236
236
  howToSetTheDecision: te.EQUAL,
237
- decisionDataType: G.DATE
237
+ decisionDataType: X.DATE
238
238
  })
239
- } : null, s = n ? {
239
+ } : null, d = n ? {
240
240
  labelName: n.labelName || "",
241
241
  decisionDataType: n.decisionDataType || "alphabetical",
242
- value: Le(n),
242
+ value: Pe(n),
243
243
  howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
244
- } : null, d = ((g = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter(
244
+ } : null, s = ((g = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter(
245
245
  (f) => !f.hidden
246
- )) || [], c = Array.from({ length: 5 }), p = !!(!t && n && r && s), u = d.length < 2 ? "start" : "space-between";
246
+ )) || [], c = Array.from({ length: 5 }), p = !!(!t && n && r && d), u = s.length < 2 ? "start" : "space-between";
247
247
  return /* @__PURE__ */ i(
248
- Yt,
248
+ Gt,
249
249
  {
250
250
  conditionsAlignment: u,
251
251
  decision: n,
252
252
  decisionDateElement: l,
253
- decisionMapper: s,
253
+ decisionMapper: d,
254
254
  loading: p,
255
255
  skeleton: c,
256
256
  terms: !!(r != null && r.terms),
257
257
  textValues: r,
258
- visibleConditions: d
258
+ visibleConditions: s
259
259
  }
260
260
  );
261
- }, Xt = T.div`
261
+ }, Yt = T.div`
262
262
  position: relative;
263
263
  & > div {
264
264
  padding: 24px 16px;
265
265
  }
266
- `, Gt = T.div`
266
+ `, Xt = T.div`
267
267
  background-color: ${({ theme: e }) => {
268
268
  var n, t;
269
269
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || S.palette.neutral.N0;
@@ -294,7 +294,7 @@ const qt = {
294
294
  background-color: #ebecf0;
295
295
  border-radius: 8px;
296
296
  }
297
- `, Kn = (e) => {
297
+ `, Qn = (e) => {
298
298
  const { children: n, portalId: t, onCloseModal: r, title: o } = e, a = document.getElementById(t);
299
299
  if (!a)
300
300
  throw new Error(
@@ -302,7 +302,7 @@ const qt = {
302
302
  );
303
303
  const l = re("(max-width: 400px)");
304
304
  return bn(
305
- /* @__PURE__ */ i(Xt, { smallScreen: l, children: /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ i(Gt, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
305
+ /* @__PURE__ */ i(Yt, { smallScreen: l, children: /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ i(Xt, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
306
306
  /* @__PURE__ */ i(w, { direction: "column", gap: "24px", children: /* @__PURE__ */ v(w, { alignItems: "center", justifyContent: "space-between", children: [
307
307
  /* @__PURE__ */ i(I, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
308
308
  /* @__PURE__ */ i(gn, { size: "24px", cursor: "pointer", onClick: r })
@@ -345,7 +345,7 @@ T.div`
345
345
  }};
346
346
  }
347
347
  `;
348
- const Kt = T.div`
348
+ const Qt = T.div`
349
349
  & > div {
350
350
  background-color: ${({ theme: e }) => {
351
351
  var n, t;
@@ -364,7 +364,7 @@ const Kt = T.div`
364
364
  & > div {
365
365
  animation: ${Wt} 600ms ease-out;
366
366
  }
367
- `, Qt = T.div`
367
+ `, Kt = T.div`
368
368
  & > div > div {
369
369
  border-radius: 8px;
370
370
  box-sizing: border-box;
@@ -428,7 +428,7 @@ const Kt = T.div`
428
428
  return /* @__PURE__ */ i(xn, { children: o ? null : /* @__PURE__ */ v(w, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
429
429
  /* @__PURE__ */ i(I, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
430
430
  /* @__PURE__ */ i(
431
- Kt,
431
+ Qt,
432
432
  {
433
433
  onClick: () => r ? r() : null,
434
434
  children: /* @__PURE__ */ i(
@@ -463,8 +463,8 @@ const Kt = T.div`
463
463
  loading: o,
464
464
  handleOpenModal: a,
465
465
  handleDelete: l,
466
- textValues: s
467
- } = e, d = o ? Array.from({ length: 3 }).map(
466
+ textValues: d
467
+ } = e, s = o ? Array.from({ length: 3 }).map(
468
468
  (p, u) => ln({
469
469
  type: "loading",
470
470
  index: u,
@@ -473,7 +473,7 @@ const Kt = T.div`
473
473
  loading: o,
474
474
  handleOpenModal: a,
475
475
  handleDelete: l,
476
- textValues: s
476
+ textValues: d
477
477
  })
478
478
  ) : r == null ? void 0 : r.map(
479
479
  (p) => ln({
@@ -484,11 +484,11 @@ const Kt = T.div`
484
484
  loading: o,
485
485
  handleOpenModal: a,
486
486
  handleDelete: l,
487
- textValues: s
487
+ textValues: d
488
488
  })
489
489
  ), c = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
490
- return { renderedCards: d, shouldRenderAddCard: c };
491
- }, ei = (e) => {
490
+ return { renderedCards: s, shouldRenderAddCard: c };
491
+ }, si = (e) => {
492
492
  const {
493
493
  controls: n = !0,
494
494
  customTitleContentAddCard: t,
@@ -496,8 +496,8 @@ const Kt = T.div`
496
496
  decisions: o,
497
497
  textValues: a,
498
498
  decisionTemplate: l,
499
- isModalOpen: s,
500
- selectedDecision: d,
499
+ isModalOpen: d,
500
+ selectedDecision: s,
501
501
  loading: c,
502
502
  handleOpenModal: p,
503
503
  handleCloseModal: u,
@@ -513,8 +513,8 @@ const Kt = T.div`
513
513
  handleDelete: f,
514
514
  textValues: a
515
515
  }), C = (o == null ? void 0 : o.length) === 0 && !c;
516
- return /* @__PURE__ */ v(Y, { children: [
517
- /* @__PURE__ */ i(Qt, { children: /* @__PURE__ */ i(Zt, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ v(
516
+ return /* @__PURE__ */ v(G, { children: [
517
+ /* @__PURE__ */ i(Kt, { children: /* @__PURE__ */ i(Zt, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ v(
518
518
  w,
519
519
  {
520
520
  direction: "column",
@@ -524,7 +524,7 @@ const Kt = T.div`
524
524
  justifyContent: "center",
525
525
  alignItems: "center",
526
526
  children: [
527
- /* @__PURE__ */ i(I, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(Y, { children: [
527
+ /* @__PURE__ */ i(I, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(G, { children: [
528
528
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
529
529
  /* @__PURE__ */ v(
530
530
  I,
@@ -544,7 +544,7 @@ const Kt = T.div`
544
544
  "para empezar."
545
545
  ] }) }),
546
546
  /* @__PURE__ */ i(
547
- j,
547
+ B,
548
548
  {
549
549
  iconBefore: /* @__PURE__ */ i(fn, {}),
550
550
  onClick: () => p ? p() : null,
@@ -554,7 +554,7 @@ const Kt = T.div`
554
554
  ]
555
555
  }
556
556
  ) : /* @__PURE__ */ v(
557
- Ge,
557
+ Xe,
558
558
  {
559
559
  templateColumns: m ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
560
560
  autoFlow: "row dense",
@@ -583,16 +583,16 @@ const Kt = T.div`
583
583
  ]
584
584
  }
585
585
  ) }) }) }),
586
- s && /* @__PURE__ */ i(
587
- Kn,
586
+ d && /* @__PURE__ */ i(
587
+ Qn,
588
588
  {
589
589
  portalId: "modal-portal",
590
590
  onCloseModal: u,
591
- title: d ? "Editar Decisión" : "Nueva decisión",
591
+ title: s ? "Editar Decisión" : "Nueva decisión",
592
592
  children: /* @__PURE__ */ i(
593
593
  so,
594
594
  {
595
- decision: d || l,
595
+ decision: s || l,
596
596
  onSubmitEvent: g,
597
597
  textValues: a,
598
598
  onCancel: () => u ? u() : () => {
@@ -602,18 +602,18 @@ const Kt = T.div`
602
602
  }
603
603
  )
604
604
  ] });
605
- }, Qn = (e) => {
605
+ }, Kn = (e) => {
606
606
  const { children: n } = e;
607
607
  return /* @__PURE__ */ i(St, { width: "100%", children: n });
608
608
  }, or = (e) => e.value, ar = (e) => e.value, ir = (e) => e.value, lr = (e) => ({
609
609
  from: e.from ?? "",
610
610
  to: e.to ?? ""
611
- }), dr = (e) => e.value, sr = (e) => e.value, cr = (e) => e.value, ur = {
611
+ }), sr = (e) => e.value, dr = (e) => e.value, cr = (e) => e.value, ur = {
612
612
  [A.LIST_OF_VALUES]: ar,
613
613
  [A.LIST_OF_VALUES_MULTI]: ir,
614
614
  [A.RANGE]: lr,
615
- [A.GREATER_THAN]: dr,
616
- [A.LESS_THAN]: sr,
615
+ [A.GREATER_THAN]: sr,
616
+ [A.LESS_THAN]: dr,
617
617
  [A.EQUAL]: cr
618
618
  }, Oe = (e) => {
619
619
  const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = ur[e == null ? void 0 : e.howToSetTheDecision] || or;
@@ -641,7 +641,7 @@ const Kt = T.div`
641
641
  border-radius: ${({ $borderRadius: e }) => e};
642
642
  box-sizing: ${({ $boxSizing: e }) => e};
643
643
  overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
644
- `, K = H.forwardRef(
644
+ `, Q = H.forwardRef(
645
645
  (e, n) => {
646
646
  const {
647
647
  children: t,
@@ -649,8 +649,8 @@ const Kt = T.div`
649
649
  direction: o = "column",
650
650
  justifyContent: a,
651
651
  alignItems: l,
652
- alignContent: s,
653
- height: d,
652
+ alignContent: d,
653
+ height: s,
654
654
  width: c,
655
655
  gap: p,
656
656
  background: u,
@@ -668,8 +668,8 @@ const Kt = T.div`
668
668
  direction: o,
669
669
  $justifyContent: a,
670
670
  $alignItems: l,
671
- $alignContent: s,
672
- height: d,
671
+ $alignContent: d,
672
+ height: s,
673
673
  width: c,
674
674
  wrap: r,
675
675
  $gap: p,
@@ -685,7 +685,7 @@ const Kt = T.div`
685
685
  );
686
686
  }
687
687
  );
688
- K.displayName = "BorderStack";
688
+ Q.displayName = "BorderStack";
689
689
  T.div`
690
690
  & > div {
691
691
  border-radius: 8px;
@@ -734,8 +734,8 @@ const gr = T.div`
734
734
  loading: o,
735
735
  textValues: a,
736
736
  visibleConditions: l,
737
- tagLabel: s,
738
- isOpen: d,
737
+ tagLabel: d,
738
+ isOpen: s,
739
739
  onToggle: c,
740
740
  hasEffectiveFrom: p,
741
741
  hasValidUntil: u,
@@ -757,7 +757,7 @@ const gr = T.div`
757
757
  {
758
758
  id: "tag",
759
759
  appearance: "gray",
760
- label: s,
760
+ label: d,
761
761
  displayIcon: !1
762
762
  }
763
763
  ) }),
@@ -801,7 +801,7 @@ const gr = T.div`
801
801
  O,
802
802
  {
803
803
  appearance: "dark",
804
- icon: d ? /* @__PURE__ */ i(ht, {}) : /* @__PURE__ */ i(an, {}),
804
+ icon: s ? /* @__PURE__ */ i(ht, {}) : /* @__PURE__ */ i(an, {}),
805
805
  size: "24px",
806
806
  cursorHover: !0
807
807
  }
@@ -811,7 +811,7 @@ const gr = T.div`
811
811
  },
812
812
  t.ruleName
813
813
  ) }),
814
- d && /* @__PURE__ */ v(Y, { children: [
814
+ s && /* @__PURE__ */ v(G, { children: [
815
815
  /* @__PURE__ */ i(Z, { dashed: !0 }),
816
816
  /* @__PURE__ */ v(w, { direction: "column", gap: "12px", children: [
817
817
  /* @__PURE__ */ i(
@@ -834,7 +834,7 @@ const gr = T.div`
834
834
  justifyContent: n,
835
835
  children: [
836
836
  l.map((m) => /* @__PURE__ */ i(
837
- K,
837
+ Q,
838
838
  {
839
839
  direction: "column",
840
840
  padding: "6px 12px",
@@ -853,7 +853,7 @@ const gr = T.div`
853
853
  m.conditionName
854
854
  )),
855
855
  p && g && /* @__PURE__ */ i(
856
- K,
856
+ Q,
857
857
  {
858
858
  direction: "column",
859
859
  padding: "6px 12px",
@@ -870,7 +870,7 @@ const gr = T.div`
870
870
  }
871
871
  ),
872
872
  u && f && /* @__PURE__ */ i(
873
- K,
873
+ Q,
874
874
  {
875
875
  direction: "column",
876
876
  padding: "6px 12px",
@@ -898,7 +898,7 @@ const gr = T.div`
898
898
  ] }),
899
899
  /* @__PURE__ */ v(w, { alignItems: "center", gap: "8px", children: [
900
900
  /* @__PURE__ */ i(ie, { animated: !0, width: "50px" }),
901
- /* @__PURE__ */ i(Nt, { animated: !0 })
901
+ /* @__PURE__ */ i(Et, { animated: !0 })
902
902
  ] })
903
903
  ] });
904
904
  }, qe = (e) => e.conditionsThatEstablishesTheDecision ?? {}, Zn = (e, n) => Object.fromEntries(
@@ -911,40 +911,40 @@ const gr = T.div`
911
911
  position: o,
912
912
  isOpen: a = !1,
913
913
  onToggle: l,
914
- onEdit: s,
915
- onDelete: d
914
+ onEdit: d,
915
+ onDelete: s
916
916
  } = e, c = !!(n != null && n.effectiveFrom), p = !!(n != null && n.validUntil), u = c ? {
917
917
  element: {
918
918
  labelName: r == null ? void 0 : r.effectiveFrom,
919
919
  value: String(n.effectiveFrom),
920
920
  howToSetTheDecision: te.EQUAL,
921
- decisionDataType: G.DATE
921
+ decisionDataType: X.DATE
922
922
  },
923
923
  valueData: Oe({
924
924
  labelName: r == null ? void 0 : r.effectiveFrom,
925
925
  value: String(n.effectiveFrom),
926
926
  howToSetTheDecision: te.EQUAL,
927
- decisionDataType: G.DATE
927
+ decisionDataType: X.DATE
928
928
  })
929
929
  } : null, g = p ? {
930
930
  element: {
931
931
  labelName: r == null ? void 0 : r.validUntil,
932
932
  value: String(n.validUntil),
933
933
  howToSetTheDecision: te.EQUAL,
934
- decisionDataType: G.DATE
934
+ decisionDataType: X.DATE
935
935
  },
936
936
  valueData: Oe({
937
937
  labelName: r == null ? void 0 : r.validUntil,
938
938
  value: String(n.validUntil),
939
939
  howToSetTheDecision: te.EQUAL,
940
- decisionDataType: G.DATE
940
+ decisionDataType: X.DATE
941
941
  })
942
942
  } : null, f = n ? {
943
943
  labelName: n.labelName || "",
944
- decisionDataType: n.decisionDataType || G.ALPHABETICAL,
944
+ decisionDataType: n.decisionDataType || X.ALPHABETICAL,
945
945
  value: Oe(n),
946
946
  howToSetTheDecision: n.howToSetTheDecision || te.EQUAL
947
- } : null, b = n ? qe(n) : {}, x = Zn(b, (N) => !N.hidden), m = Object.values(x).flat(), y = Array.from({ length: 5 }), D = !!(!t && n && r && f), C = m.length < 2 ? "start" : "space-between", k = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
947
+ } : null, b = n ? qe(n) : {}, x = Zn(b, (E) => !E.hidden), m = Object.values(x).flat(), y = Array.from({ length: 5 }), D = !!(!t && n && r && f), C = m.length < 2 ? "start" : "space-between", k = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
948
948
  return /* @__PURE__ */ i(
949
949
  mr,
950
950
  {
@@ -962,8 +962,8 @@ const gr = T.div`
962
962
  hasValidUntil: p,
963
963
  effectiveFromRenderer: u,
964
964
  validUntilRenderer: g,
965
- onEdit: s,
966
- onDelete: d
965
+ onEdit: d,
966
+ onDelete: s
967
967
  }
968
968
  );
969
969
  }, br = qn`
@@ -1043,7 +1043,7 @@ const vr = T.div`
1043
1043
  `, Dr = (e) => {
1044
1044
  const { index: n, handleOpenModal: t } = e;
1045
1045
  return /* @__PURE__ */ i(
1046
- Qn,
1046
+ Kn,
1047
1047
  {
1048
1048
  id: `loading-card-${n}`,
1049
1049
  handleDelete: () => {
@@ -1062,11 +1062,11 @@ const vr = T.div`
1062
1062
  handleDelete: o,
1063
1063
  textValues: a,
1064
1064
  index: l,
1065
- isOpen: s,
1066
- onToggle: d
1065
+ isOpen: d,
1066
+ onToggle: s
1067
1067
  } = e;
1068
1068
  return n ? /* @__PURE__ */ i(xn, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
1069
- Qn,
1069
+ Kn,
1070
1070
  {
1071
1071
  id: n.decisionId,
1072
1072
  handleDelete: () => o ? o(n.decisionId) : null,
@@ -1078,8 +1078,8 @@ const vr = T.div`
1078
1078
  decision: n,
1079
1079
  textValues: a,
1080
1080
  position: l,
1081
- isOpen: !!s,
1082
- onToggle: () => d == null ? void 0 : d(!s),
1081
+ isOpen: !!d,
1082
+ onToggle: () => s == null ? void 0 : s(!d),
1083
1083
  onEdit: () => r == null ? void 0 : r(n),
1084
1084
  onDelete: () => o == null ? void 0 : o(n.decisionId)
1085
1085
  }
@@ -1098,7 +1098,7 @@ const vr = T.div`
1098
1098
  {
1099
1099
  onClick: () => r ? r() : null,
1100
1100
  children: /* @__PURE__ */ i(
1101
- K,
1101
+ Q,
1102
1102
  {
1103
1103
  direction: "column",
1104
1104
  gap: "4px",
@@ -1134,10 +1134,10 @@ const vr = T.div`
1134
1134
  loading: Dr,
1135
1135
  decision: Cr,
1136
1136
  add: Tr
1137
- }, dn = (e) => {
1137
+ }, sn = (e) => {
1138
1138
  const { type: n } = e, t = Sr[n];
1139
1139
  return t ? t(e) : null;
1140
- }, Nr = (e) => {
1140
+ }, Er = (e) => {
1141
1141
  const {
1142
1142
  controls: n,
1143
1143
  customTitleContentAddCard: t,
@@ -1145,11 +1145,11 @@ const vr = T.div`
1145
1145
  loading: o,
1146
1146
  handleOpenModal: a,
1147
1147
  handleDelete: l,
1148
- textValues: s,
1149
- isOpenFor: d,
1148
+ textValues: d,
1149
+ isOpenFor: s,
1150
1150
  toggleAt: c
1151
1151
  } = e, p = o ? Array.from({ length: 3 }).map(
1152
- (g, f) => dn({
1152
+ (g, f) => sn({
1153
1153
  type: "loading",
1154
1154
  index: f,
1155
1155
  controls: n,
@@ -1157,25 +1157,25 @@ const vr = T.div`
1157
1157
  loading: o,
1158
1158
  handleOpenModal: a,
1159
1159
  handleDelete: l,
1160
- textValues: s
1160
+ textValues: d
1161
1161
  })
1162
1162
  ) : r == null ? void 0 : r.map(
1163
- (g, f) => dn({
1163
+ (g, f) => sn({
1164
1164
  type: "decision",
1165
1165
  decision: g,
1166
- controls: d ? d(f) : !1,
1166
+ controls: s ? s(f) : !1,
1167
1167
  customTitleContentAddCard: t,
1168
1168
  loading: o,
1169
1169
  handleOpenModal: a,
1170
1170
  handleDelete: l,
1171
- textValues: s,
1171
+ textValues: d,
1172
1172
  index: f,
1173
- isOpen: d ? d(f) : !1,
1173
+ isOpen: s ? s(f) : !1,
1174
1174
  onToggle: c ? () => c(f) : void 0
1175
1175
  })
1176
1176
  ), u = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
1177
1177
  return { renderedCards: p, shouldRenderAddCard: u };
1178
- }, Er = T.div`
1178
+ }, Nr = T.div`
1179
1179
  position: relative;
1180
1180
  & > div {
1181
1181
  padding: 24px 16px;
@@ -1219,9 +1219,9 @@ const vr = T.div`
1219
1219
  throw new Error(
1220
1220
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
1221
1221
  );
1222
- const s = re("(max-width: 400px)");
1222
+ const d = re("(max-width: 400px)");
1223
1223
  return bn(
1224
- /* @__PURE__ */ i(Er, { smallScreen: s, children: /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ i(kr, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
1224
+ /* @__PURE__ */ i(Nr, { smallScreen: d, children: /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ i(kr, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
1225
1225
  /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
1226
1226
  /* @__PURE__ */ v(w, { alignItems: "center", justifyContent: "space-between", children: [
1227
1227
  /* @__PURE__ */ v(w, { direction: "column", gap: "8px", children: [
@@ -1245,14 +1245,14 @@ const vr = T.div`
1245
1245
  ] }) }) }) }),
1246
1246
  l
1247
1247
  );
1248
- }, Ir = (e) => ({
1249
- schema: Ee().required("Requerido").test(
1248
+ }, Ar = (e) => ({
1249
+ schema: Ne().required("Requerido").test(
1250
1250
  "non-empty",
1251
1251
  "El valor no puede estar vacío",
1252
1252
  (n) => n != null && n.trim() !== ""
1253
1253
  ),
1254
1254
  value: e
1255
- }), Ar = (e) => ({
1255
+ }), Ir = (e) => ({
1256
1256
  schema: We().test(
1257
1257
  "isArrayOrString",
1258
1258
  "Por favor selecciona una opcion",
@@ -1286,29 +1286,29 @@ const vr = T.div`
1286
1286
  }),
1287
1287
  value: { from: n, to: t }
1288
1288
  };
1289
- }, nn = (e, n) => n === G.PERCENTAGE ? {
1289
+ }, nn = (e, n) => n === X.PERCENTAGE ? {
1290
1290
  schema: Se().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"),
1291
1291
  value: e
1292
1292
  } : {
1293
- schema: Ee().required("Requerido"),
1293
+ schema: Ne().required("Requerido"),
1294
1294
  value: e
1295
- }, Pr = {
1296
- [A.LIST_OF_VALUES]: Ar,
1295
+ }, Lr = {
1296
+ [A.LIST_OF_VALUES]: Ir,
1297
1297
  [A.LIST_OF_VALUES_MULTI]: Rr,
1298
1298
  [A.RANGE]: Fr,
1299
1299
  [A.GREATER_THAN]: nn,
1300
1300
  [A.LESS_THAN]: nn,
1301
1301
  [A.EQUAL]: nn
1302
- }, En = (e) => Pr[e] || Ir;
1302
+ }, Nn = (e) => Lr[e] || Ar;
1303
1303
  var et = /* @__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))(et || {});
1304
- function Lr({
1304
+ function Pr({
1305
1305
  decision: e,
1306
1306
  onSubmitEvent: n,
1307
1307
  textValues: t
1308
1308
  }) {
1309
1309
  const r = qe(e) || {}, o = () => Object.values(r).flat(), a = {
1310
1310
  ruleName: e.ruleName || "",
1311
- decisionDataType: e.decisionDataType || G.ALPHABETICAL,
1311
+ decisionDataType: e.decisionDataType || X.ALPHABETICAL,
1312
1312
  howToSetTheDecision: e.howToSetTheDecision || "",
1313
1313
  value: e.value || "",
1314
1314
  effectiveFrom: e.effectiveFrom || "",
@@ -1320,9 +1320,9 @@ function Lr({
1320
1320
  terms: !0
1321
1321
  };
1322
1322
  let l;
1323
- const s = {
1324
- ruleName: Ee().required("El nombre de la decision es requerido"),
1325
- value: Ue(() => En(
1323
+ const d = {
1324
+ ruleName: Ne().required("El nombre de la decision es requerido"),
1325
+ value: Ue(() => Nn(
1326
1326
  l.values.howToSetTheDecision
1327
1327
  )(
1328
1328
  l.values.value,
@@ -1334,7 +1334,7 @@ function Lr({
1334
1334
  (x, m) => {
1335
1335
  var D;
1336
1336
  if (((D = l.values.conditionsThatEstablishesTheDecision) == null ? void 0 : D[m.conditionName]) !== void 0) {
1337
- const C = En(
1337
+ const C = Nn(
1338
1338
  m.howToSetTheCondition
1339
1339
  );
1340
1340
  x[m.conditionName] = C(
@@ -1355,9 +1355,9 @@ function Lr({
1355
1355
  );
1356
1356
  })
1357
1357
  };
1358
- t.terms && (s.effectiveFrom = _e().required(
1358
+ t.terms && (d.effectiveFrom = _e().required(
1359
1359
  "Se requiere la fecha de vigencia desde"
1360
- ), s.validUntil = _e().when(
1360
+ ), d.validUntil = _e().when(
1361
1361
  "checkClosed",
1362
1362
  (p, u, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? u.required("Se requiere la fecha de vigencia hasta").test(
1363
1363
  "is-after-startDate",
@@ -1368,10 +1368,10 @@ function Lr({
1368
1368
  }
1369
1369
  ) : u.notRequired()
1370
1370
  ));
1371
- const d = le(s);
1372
- return l = Xn({
1371
+ const s = le(d);
1372
+ return l = Yn({
1373
1373
  initialValues: a,
1374
- validationSchema: d,
1374
+ validationSchema: s,
1375
1375
  validateOnBlur: !0,
1376
1376
  onSubmit: (p) => {
1377
1377
  const u = Object.fromEntries(
@@ -1463,20 +1463,20 @@ const Or = T.div`
1463
1463
  labelStart: o,
1464
1464
  labelEnd: a,
1465
1465
  checkedClosed: l = !1,
1466
- required: s = !1,
1467
- valueStart: d = "",
1466
+ required: d = !1,
1467
+ valueStart: s = "",
1468
1468
  valueEnd: c = "",
1469
1469
  messageStart: p = "",
1470
1470
  messageEnd: u = "",
1471
1471
  statusStart: g = "pending",
1472
1472
  statusEnd: f = "pending"
1473
- } = e, [b, x] = M(l), [m, y] = M(d), [D, C] = M(c), k = ({ target: $ }) => {
1473
+ } = e, [b, x] = M(l), [m, y] = M(s), [D, C] = M(c), k = ({ target: $ }) => {
1474
1474
  x($.checked), r && r($.checked);
1475
- }, N = ($) => {
1475
+ }, E = ($) => {
1476
1476
  y($.target.value), n($);
1477
1477
  }, R = ($) => {
1478
1478
  C($.target.value), t($);
1479
- }, P = re("(max-width: 400px)");
1479
+ }, L = re("(max-width: 400px)");
1480
1480
  return /* @__PURE__ */ v(w, { direction: "column", width: "100%", gap: "20px", children: [
1481
1481
  /* @__PURE__ */ v(w, { justifyContent: "space-between", children: [
1482
1482
  /* @__PURE__ */ i(I, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
@@ -1493,18 +1493,18 @@ const Or = T.div`
1493
1493
  /* @__PURE__ */ v(
1494
1494
  w,
1495
1495
  {
1496
- direction: P ? "column" : "row",
1496
+ direction: L ? "column" : "row",
1497
1497
  justifyContent: "space-between",
1498
1498
  gap: "24px",
1499
1499
  children: [
1500
1500
  /* @__PURE__ */ i(
1501
- je,
1501
+ Be,
1502
1502
  {
1503
1503
  id: "dateStart",
1504
1504
  label: o,
1505
- onChange: N,
1505
+ onChange: E,
1506
1506
  value: m,
1507
- required: s,
1507
+ required: d,
1508
1508
  size: "compact",
1509
1509
  status: g,
1510
1510
  message: p,
@@ -1512,13 +1512,13 @@ const Or = T.div`
1512
1512
  }
1513
1513
  ),
1514
1514
  b && /* @__PURE__ */ i(
1515
- je,
1515
+ Be,
1516
1516
  {
1517
1517
  id: "dateEnd",
1518
1518
  label: a,
1519
1519
  onChange: R,
1520
1520
  value: D,
1521
- required: s,
1521
+ required: d,
1522
1522
  size: "compact",
1523
1523
  status: f,
1524
1524
  message: u,
@@ -1537,8 +1537,8 @@ const Or = T.div`
1537
1537
  formik: o,
1538
1538
  normalizedDecision: a,
1539
1539
  onCancel: l,
1540
- onClearCondition: s,
1541
- onTabChange: d,
1540
+ onClearCondition: d,
1541
+ onTabChange: s,
1542
1542
  showConditionsError: c,
1543
1543
  tabs: p,
1544
1544
  termEndStatus: u,
@@ -1550,18 +1550,18 @@ const Or = T.div`
1550
1550
  onCloseRedefineConfirm: y,
1551
1551
  onConfirmRedefine: D
1552
1552
  } = e;
1553
- return /* @__PURE__ */ v(Y, { children: [
1553
+ return /* @__PURE__ */ v(G, { children: [
1554
1554
  /* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", width: "100%", children: [
1555
- /* @__PURE__ */ i(Pe, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(w, { justifyContent: "center", width: "-webkit-fill-available", children: Cn({
1555
+ /* @__PURE__ */ i(Le, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(w, { justifyContent: "center", width: "-webkit-fill-available", children: Cn({
1556
1556
  condition: a,
1557
1557
  formik: o,
1558
1558
  isDecision: !0
1559
1559
  }) }) }),
1560
- /* @__PURE__ */ i(Pe, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ v(w, { direction: "column", gap: "20px", width: "100%", children: [
1560
+ /* @__PURE__ */ i(Le, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ v(w, { direction: "column", gap: "20px", width: "100%", children: [
1561
1561
  /* @__PURE__ */ i(
1562
- Et,
1562
+ Nt,
1563
1563
  {
1564
- onChange: d,
1564
+ onChange: s,
1565
1565
  tabs: p,
1566
1566
  selectedTab: n
1567
1567
  }
@@ -1577,13 +1577,14 @@ const Or = T.div`
1577
1577
  }
1578
1578
  ),
1579
1579
  /* @__PURE__ */ i(
1580
- j,
1580
+ B,
1581
1581
  {
1582
1582
  type: "button",
1583
1583
  iconBefore: /* @__PURE__ */ i(bt, {}),
1584
1584
  variant: "none",
1585
1585
  appearance: "gray",
1586
1586
  onClick: m,
1587
+ cursorHover: !0,
1587
1588
  children: "Redefinir la condición"
1588
1589
  }
1589
1590
  )
@@ -1607,7 +1608,7 @@ const Or = T.div`
1607
1608
  icon: /* @__PURE__ */ i(pn, {}),
1608
1609
  appearance: "danger",
1609
1610
  cursorHover: !0,
1610
- onClick: () => s(C.conditionName)
1611
+ onClick: () => d(C.conditionName)
1611
1612
  }
1612
1613
  )
1613
1614
  ]
@@ -1616,7 +1617,7 @@ const Or = T.div`
1616
1617
  )) }),
1617
1618
  c && /* @__PURE__ */ i(I, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
1618
1619
  ] }) }),
1619
- /* @__PURE__ */ i(Pe, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
1620
+ /* @__PURE__ */ i(Le, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
1620
1621
  Mr,
1621
1622
  {
1622
1623
  labelStart: f.termStart,
@@ -1636,12 +1637,12 @@ const Or = T.div`
1636
1637
  }
1637
1638
  ) }),
1638
1639
  /* @__PURE__ */ v(w, { direction: "row", justifyContent: "end", gap: "16px", children: [
1639
- /* @__PURE__ */ i(j, { appearance: "gray", onClick: l, variant: "outlined", children: f.cancel }),
1640
- /* @__PURE__ */ i(j, { type: "submit", children: f.confirm })
1640
+ /* @__PURE__ */ i(B, { appearance: "gray", onClick: l, variant: "outlined", children: f.cancel }),
1641
+ /* @__PURE__ */ i(B, { type: "submit", children: f.confirm })
1641
1642
  ] })
1642
1643
  ] }) }),
1643
1644
  x && b && /* @__PURE__ */ i(
1644
- Kn,
1645
+ Qn,
1645
1646
  {
1646
1647
  portalId: b,
1647
1648
  title: "Redefinir la condición",
@@ -1650,7 +1651,7 @@ const Or = T.div`
1650
1651
  /* @__PURE__ */ i(I, { type: "body", size: "large", appearance: "gray", children: "¿Estás seguro? Se perderá todo lo que tienes actualmente definido y deberás reescribir completamente la condición, de esta manera podrás usar las últimas variables condicionales que están definidas en la actualidad para esta decisión ." }),
1651
1652
  /* @__PURE__ */ v(w, { justifyContent: "end", gap: "12px", children: [
1652
1653
  /* @__PURE__ */ i(
1653
- j,
1654
+ B,
1654
1655
  {
1655
1656
  type: "button",
1656
1657
  appearance: "gray",
@@ -1660,7 +1661,7 @@ const Or = T.div`
1660
1661
  children: "Cancelar"
1661
1662
  }
1662
1663
  ),
1663
- /* @__PURE__ */ i(j, { type: "button", onClick: D, cursorHover: !0, children: "Confirmar" })
1664
+ /* @__PURE__ */ i(B, { type: "button", onClick: D, cursorHover: !0, children: "Confirmar" })
1664
1665
  ] })
1665
1666
  ] })
1666
1667
  }
@@ -1675,84 +1676,84 @@ const Or = T.div`
1675
1676
  onCancel: o,
1676
1677
  onRemoveCondition: a,
1677
1678
  onRestoreConditions: l,
1678
- fullTemplate: s
1679
- } = e, { formik: d, handleToggleNoneChange: c } = Lr({
1679
+ fullTemplate: d
1680
+ } = e, { formik: s, handleToggleNoneChange: c } = Pr({
1680
1681
  decision: n,
1681
1682
  onSubmitEvent: t,
1682
1683
  textValues: r
1683
- }), u = qe(s ?? n), g = qe(n), f = Zn(
1684
+ }), u = qe(d ?? n), g = qe(n), f = Zn(
1684
1685
  g,
1685
- (E) => !E.hidden
1686
+ (N) => !N.hidden
1686
1687
  ), b = Object.keys(f), x = [
1687
- ...b.filter((E) => E === "group-primary"),
1688
- ...b.filter((E) => E !== "group-primary")
1688
+ ...b.filter((N) => N === "group-primary"),
1689
+ ...b.filter((N) => N !== "group-primary")
1689
1690
  ], m = {};
1690
1691
  let y = 1;
1691
- const D = x.map((E) => {
1692
- const V = E === "group-primary" ? "mainCondition" : `alternateCondition-${y++}`;
1693
- return m[V] = E, {
1692
+ const D = x.map((N) => {
1693
+ const V = N === "group-primary" ? "mainCondition" : `alternateCondition-${y++}`;
1694
+ return m[V] = N, {
1694
1695
  id: V,
1695
- label: E === "group-primary" ? kn(E, 0) : kn(E, Number(V.split("-").at(-1))),
1696
+ label: N === "group-primary" ? kn(N, 0) : kn(N, Number(V.split("-").at(-1))),
1696
1697
  isDisabled: !1
1697
1698
  };
1698
1699
  }), [C, k] = H.useState(
1699
1700
  ((ze = D[0]) == null ? void 0 : ze.id) ?? "mainCondition"
1700
- ), N = (E) => k(E), R = m[C] ?? "group-primary", P = f[R] ?? [], $ = f["group-primary"] ?? [], z = {
1701
+ ), E = (N) => k(N), R = m[C] ?? "group-primary", L = f[R] ?? [], $ = f["group-primary"] ?? [], z = {
1701
1702
  decisionDataType: n.decisionDataType,
1702
1703
  howToSetTheCondition: n.howToSetTheDecision,
1703
1704
  labelName: n.labelName,
1704
1705
  listOfPossibleValues: n.listOfPossibleValues,
1705
1706
  ruleName: n.ruleName
1706
- }, oe = d.submitCount > 0 || !!d.touched.effectiveFrom, xe = d.submitCount > 0 || !!d.touched.validUntil, we = oe ? d.errors.effectiveFrom ? "invalid" : "valid" : void 0, pe = xe ? d.errors.validUntil ? "invalid" : "valid" : void 0, J = H.useMemo(() => {
1707
- const E = d.errors.conditionsThatEstablishesTheDecision;
1708
- if (!E) return;
1709
- if (typeof E == "string") return E;
1710
- const V = (Q) => {
1711
- if (Q) {
1712
- if (typeof Q == "string") return Q;
1713
- if (Array.isArray(Q))
1714
- for (const Re of Q) {
1707
+ }, oe = s.submitCount > 0 || !!s.touched.effectiveFrom, xe = s.submitCount > 0 || !!s.touched.validUntil, we = oe ? s.errors.effectiveFrom ? "invalid" : "valid" : void 0, pe = xe ? s.errors.validUntil ? "invalid" : "valid" : void 0, J = H.useMemo(() => {
1708
+ const N = s.errors.conditionsThatEstablishesTheDecision;
1709
+ if (!N) return;
1710
+ if (typeof N == "string") return N;
1711
+ const V = (K) => {
1712
+ if (K) {
1713
+ if (typeof K == "string") return K;
1714
+ if (Array.isArray(K))
1715
+ for (const Re of K) {
1715
1716
  const he = V(Re);
1716
1717
  if (he) return he;
1717
1718
  }
1718
- else if (typeof Q == "object")
1719
- for (const Re of Object.values(Q)) {
1719
+ else if (typeof K == "object")
1720
+ for (const Re of Object.values(K)) {
1720
1721
  const he = V(Re);
1721
1722
  if (he) return he;
1722
1723
  }
1723
1724
  }
1724
1725
  };
1725
- return V(E);
1726
- }, [d.errors.conditionsThatEstablishesTheDecision]), $e = d.submitCount > 0 && !!J, De = (E) => E != null && E.isMulti || E != null && E.multiple || (E == null ? void 0 : E.valueUse) === "Among" ? [] : "", ge = (E) => {
1727
- const Q = Object.values(u).flat().find((he) => he.conditionName === E), Re = De(Q);
1728
- d.setFieldValue(
1729
- `conditionsThatEstablishesTheDecision.${E}`,
1726
+ return V(N);
1727
+ }, [s.errors.conditionsThatEstablishesTheDecision]), $e = s.submitCount > 0 && !!J, De = (N) => N != null && N.isMulti || N != null && N.multiple || (N == null ? void 0 : N.valueUse) === "Among" ? [] : "", ge = (N) => {
1728
+ const K = Object.values(u).flat().find((he) => he.conditionName === N), Re = De(K);
1729
+ s.setFieldValue(
1730
+ `conditionsThatEstablishesTheDecision.${N}`,
1730
1731
  Re
1731
- ), d.setFieldTouched(
1732
- `conditionsThatEstablishesTheDecision.${E}`,
1732
+ ), s.setFieldTouched(
1733
+ `conditionsThatEstablishesTheDecision.${N}`,
1733
1734
  !1,
1734
1735
  !1
1735
1736
  );
1736
1737
  }, fe = () => {
1737
- P.forEach((E) => {
1738
- const V = `conditionsThatEstablishesTheDecision.${E.conditionName}`;
1739
- d.setFieldValue(V, De(E)), d.setFieldTouched(V, !1, !1);
1738
+ L.forEach((N) => {
1739
+ const V = `conditionsThatEstablishesTheDecision.${N.conditionName}`;
1740
+ s.setFieldValue(V, De(N)), s.setFieldTouched(V, !1, !1);
1740
1741
  });
1741
- }, [Ie, ae] = H.useState(!1);
1742
+ }, [Ae, ae] = H.useState(!1);
1742
1743
  return /* @__PURE__ */ i(
1743
1744
  zr,
1744
1745
  {
1745
1746
  activeTab: C,
1746
1747
  conditionsErrorText: J,
1747
- currentConditions: P,
1748
+ currentConditions: L,
1748
1749
  decision: n,
1749
- formik: d,
1750
+ formik: s,
1750
1751
  normalizedDecision: z,
1751
1752
  onCancel: o,
1752
1753
  onRedefineCurrentTab: fe,
1753
- onTabChange: N,
1754
- onClearCondition: (E) => {
1755
- ge(E), a == null || a(E);
1754
+ onTabChange: E,
1755
+ onClearCondition: (N) => {
1756
+ ge(N), a == null || a(N);
1756
1757
  },
1757
1758
  showConditionsError: $e,
1758
1759
  tabs: D,
@@ -1763,19 +1764,19 @@ const Or = T.div`
1763
1764
  visibleConditionsByGroup: f,
1764
1765
  handleToggleNoneChange: c,
1765
1766
  portalId: "redefine-confirm-portal",
1766
- showRedefineConfirm: Ie,
1767
+ showRedefineConfirm: Ae,
1767
1768
  onOpenRedefineConfirm: () => ae(!0),
1768
1769
  onCloseRedefineConfirm: () => ae(!1),
1769
1770
  onConfirmRedefine: () => {
1770
1771
  fe();
1771
- const E = (u[R] ?? []).map(
1772
+ const N = (u[R] ?? []).map(
1772
1773
  (V) => V.conditionName
1773
1774
  );
1774
- l == null || l(E), ae(!1);
1775
+ l == null || l(N), ae(!1);
1775
1776
  }
1776
1777
  }
1777
1778
  );
1778
- }, ni = (e) => {
1779
+ }, di = (e) => {
1779
1780
  const {
1780
1781
  controls: n = !0,
1781
1782
  customTitleContentAddCard: t,
@@ -1783,8 +1784,8 @@ const Or = T.div`
1783
1784
  decisions: o,
1784
1785
  textValues: a,
1785
1786
  decisionTemplate: l,
1786
- isModalOpen: s,
1787
- selectedDecision: d,
1787
+ isModalOpen: d,
1788
+ selectedDecision: s,
1788
1789
  loading: c,
1789
1790
  handleOpenModal: p,
1790
1791
  handleCloseModal: u,
@@ -1794,7 +1795,7 @@ const Or = T.div`
1794
1795
  onRemoveCondition: x,
1795
1796
  onRestoreConditions: m,
1796
1797
  baseDecisionTemplate: y
1797
- } = e, [D, C] = M(null), k = re("(max-width: 681px)"), { renderedCards: N, shouldRenderAddCard: R } = Nr({
1798
+ } = e, [D, C] = M(null), k = re("(max-width: 681px)"), { renderedCards: E, shouldRenderAddCard: R } = Er({
1798
1799
  controls: n,
1799
1800
  customTitleContentAddCard: t,
1800
1801
  decisions: o,
@@ -1804,9 +1805,9 @@ const Or = T.div`
1804
1805
  textValues: a,
1805
1806
  isOpenFor: ($) => D === $,
1806
1807
  toggleAt: ($) => C((z) => z === $ ? null : $)
1807
- }), P = (o == null ? void 0 : o.length) === 0 && !c;
1808
- return /* @__PURE__ */ v(Y, { children: [
1809
- /* @__PURE__ */ i(xr, { children: /* @__PURE__ */ i(wr, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: P ? /* @__PURE__ */ i(Pe, { legend: "Decisiones", children: /* @__PURE__ */ v(
1808
+ }), L = (o == null ? void 0 : o.length) === 0 && !c;
1809
+ return /* @__PURE__ */ v(G, { children: [
1810
+ /* @__PURE__ */ i(xr, { children: /* @__PURE__ */ i(wr, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: L ? /* @__PURE__ */ i(Le, { legend: "Decisiones", children: /* @__PURE__ */ v(
1810
1811
  w,
1811
1812
  {
1812
1813
  direction: "column",
@@ -1833,15 +1834,14 @@ const Or = T.div`
1833
1834
  children: "Sin decisiones"
1834
1835
  }
1835
1836
  ),
1836
- /* @__PURE__ */ i(I, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ v(Y, { children: [
1837
+ /* @__PURE__ */ i(I, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ v(G, { children: [
1837
1838
  "Aun no tienes decisiones definidas, para empezar haz clic en",
1838
- " ",
1839
1839
  t || ' "Agregar decisión"'
1840
1840
  ] }) })
1841
1841
  ]
1842
1842
  }
1843
1843
  ) }) : /* @__PURE__ */ v(
1844
- Ge,
1844
+ Xe,
1845
1845
  {
1846
1846
  templateColumns: "1fr",
1847
1847
  autoFlow: "row dense",
@@ -1853,8 +1853,8 @@ const Or = T.div`
1853
1853
  padding: "6px",
1854
1854
  height: k ? "auto" : "484px",
1855
1855
  children: [
1856
- N,
1857
- R && dn({
1856
+ E,
1857
+ R && sn({
1858
1858
  type: "add",
1859
1859
  index: o == null ? void 0 : o.length,
1860
1860
  controls: n,
@@ -1864,23 +1864,23 @@ const Or = T.div`
1864
1864
  handleOpenModal: p,
1865
1865
  handleDelete: f,
1866
1866
  textValues: a,
1867
- shouldRenderEmptyMessage: P,
1867
+ shouldRenderEmptyMessage: L,
1868
1868
  terms: b
1869
1869
  })
1870
1870
  ]
1871
1871
  }
1872
1872
  ) }) }) }),
1873
- s && /* @__PURE__ */ i(
1873
+ d && /* @__PURE__ */ i(
1874
1874
  $r,
1875
1875
  {
1876
1876
  portalId: "modal-portal",
1877
1877
  onCloseModal: u,
1878
- title: d ? "Editar Decisión" : "Configurar Decisión",
1878
+ title: s ? "Editar Decisión" : "Configurar Decisión",
1879
1879
  description: "Diligencia los campos para configurar tu decisión.",
1880
1880
  children: /* @__PURE__ */ i(
1881
1881
  Vr,
1882
1882
  {
1883
- decision: d || l,
1883
+ decision: s || l,
1884
1884
  fullTemplate: y ?? l,
1885
1885
  onSubmitEvent: g,
1886
1886
  textValues: a,
@@ -1897,7 +1897,7 @@ const Or = T.div`
1897
1897
  border: {
1898
1898
  color: S.palette.neutral.N40
1899
1899
  }
1900
- }, Br = T.div`
1900
+ }, jr = T.div`
1901
1901
  border-width: 1px;
1902
1902
  border-style: solid;
1903
1903
  border-color: ${({ theme: e }) => {
@@ -1911,7 +1911,7 @@ const Or = T.div`
1911
1911
  height: ${({ $height: e }) => e};
1912
1912
  box-sizing: border-box;
1913
1913
  `;
1914
- function jr(e) {
1914
+ function Br(e) {
1915
1915
  const {
1916
1916
  children: n,
1917
1917
  padding: t = "16px",
@@ -1921,7 +1921,7 @@ function jr(e) {
1921
1921
  height: l
1922
1922
  } = e;
1923
1923
  return /* @__PURE__ */ i(
1924
- Br,
1924
+ jr,
1925
1925
  {
1926
1926
  $padding: t,
1927
1927
  $margin: r,
@@ -1933,10 +1933,10 @@ function jr(e) {
1933
1933
  );
1934
1934
  }
1935
1935
  const Ur = (e, n) => {
1936
- const [t, r] = M([]), [o, a] = M([]), [l, s] = M(!1), d = Ce(null);
1936
+ const [t, r] = M([]), [o, a] = M([]), [l, d] = M(!1), s = Ce(null);
1937
1937
  return ve(() => {
1938
- if (!e.current || !d.current) return;
1939
- const c = e.current, p = d.current, u = () => {
1938
+ if (!e.current || !s.current) return;
1939
+ const c = e.current, p = s.current, u = () => {
1940
1940
  var C;
1941
1941
  const f = c.clientWidth, b = Array.from(
1942
1942
  p.querySelectorAll('[data-filter-tag="true"]')
@@ -1944,15 +1944,15 @@ const Ur = (e, n) => {
1944
1944
  let m = 0;
1945
1945
  const y = [], D = [];
1946
1946
  for (let k = 0; k < n.length; k++) {
1947
- const N = ((C = b[k]) == null ? void 0 : C.offsetWidth) ?? 0;
1948
- m + N + x <= f ? (y.push(n[k]), m += N) : D.push(n[k]);
1947
+ const E = ((C = b[k]) == null ? void 0 : C.offsetWidth) ?? 0;
1948
+ m + E + x <= f ? (y.push(n[k]), m += E) : D.push(n[k]);
1949
1949
  }
1950
- r(y), a(D), s(D.length > 0);
1950
+ r(y), a(D), d(D.length > 0);
1951
1951
  }, g = new ResizeObserver(() => {
1952
1952
  requestAnimationFrame(u);
1953
1953
  });
1954
1954
  return g.observe(c), () => g.disconnect();
1955
- }, [n, e]), { visible: t, hidden: o, showOverflowIndicator: l, measurementRef: d };
1955
+ }, [n, e]), { visible: t, hidden: o, showOverflowIndicator: l, measurementRef: s };
1956
1956
  };
1957
1957
  T.div`
1958
1958
  & > div {
@@ -1971,9 +1971,9 @@ const _r = T.div`
1971
1971
  pointer-events: none;
1972
1972
  height: 0;
1973
1973
  overflow: hidden;
1974
- `, Yr = T.div`
1974
+ `, Gr = T.div`
1975
1975
  cursor: pointer;
1976
- `, sn = {
1976
+ `, dn = {
1977
1977
  border: {
1978
1978
  color: {
1979
1979
  regular: S.palette.neutral.N40,
@@ -2009,7 +2009,7 @@ const _r = T.div`
2009
2009
  hover: S.palette.neutral.N30
2010
2010
  }
2011
2011
  }
2012
- }, Xr = T.li`
2012
+ }, Yr = T.li`
2013
2013
  display: flex;
2014
2014
  align-items: center;
2015
2015
  align-self: stretch;
@@ -2024,23 +2024,23 @@ const _r = T.div`
2024
2024
  &:hover {
2025
2025
  background-color: ${({ theme: e }) => {
2026
2026
  var n, t, r;
2027
- 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) || sn.background.color.regular;
2027
+ 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) || dn.background.color.regular;
2028
2028
  }};
2029
2029
  }
2030
- `, Gr = (e) => {
2030
+ `, Xr = (e) => {
2031
2031
  var g, f, b, x, m, y;
2032
- const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, l] = M(!1), s = () => l(!0), d = () => l(!1), c = vn(mn), p = ((b = (f = (g = c == null ? void 0 : c.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : b.hover) ?? sn.option.appearance.hover, u = ((y = (m = (x = c == null ? void 0 : c.input) == null ? void 0 : x.option) == null ? void 0 : m.appearance) == null ? void 0 : y.regular) ?? sn.option.appearance.regular;
2032
+ const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, l] = M(!1), d = () => l(!0), s = () => l(!1), c = vn(mn), p = ((b = (f = (g = c == null ? void 0 : c.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : b.hover) ?? dn.option.appearance.hover, u = ((y = (m = (x = c == null ? void 0 : c.input) == null ? void 0 : x.option) == null ? void 0 : m.appearance) == null ? void 0 : y.regular) ?? dn.option.appearance.regular;
2033
2033
  return /* @__PURE__ */ i(
2034
- Xr,
2034
+ Yr,
2035
2035
  {
2036
2036
  id: n,
2037
- onMouseEnter: s,
2038
- onMouseLeave: d,
2037
+ onMouseEnter: d,
2038
+ onMouseLeave: s,
2039
2039
  onClick: (D) => {
2040
2040
  D.stopPropagation();
2041
2041
  },
2042
2042
  children: /* @__PURE__ */ v(
2043
- Ge,
2043
+ Xe,
2044
2044
  {
2045
2045
  alignItems: "center",
2046
2046
  gap: "8px",
@@ -2081,7 +2081,7 @@ const _r = T.div`
2081
2081
  )
2082
2082
  }
2083
2083
  );
2084
- }, ti = (e) => {
2084
+ }, ci = (e) => {
2085
2085
  const {
2086
2086
  appliedFilters: n = [],
2087
2087
  onClear: t,
@@ -2089,48 +2089,48 @@ const _r = T.div`
2089
2089
  noFiltersLabel: o,
2090
2090
  titleClearFilter: a,
2091
2091
  titleFilter: l
2092
- } = e, s = Ce(null), d = Ce(null), c = Ce(null), {
2092
+ } = e, d = Ce(null), s = Ce(null), c = Ce(null), {
2093
2093
  visible: p,
2094
2094
  hidden: u,
2095
2095
  showOverflowIndicator: g,
2096
2096
  measurementRef: f
2097
- } = Ur(s, n), [b, x] = M(!1), m = (N) => {
2098
- N.stopPropagation(), x((R) => !R);
2097
+ } = Ur(d, n), [b, x] = M(!1), m = (E) => {
2098
+ E.stopPropagation(), x((R) => !R);
2099
2099
  };
2100
2100
  ve(() => {
2101
- const N = (R) => {
2101
+ const E = (R) => {
2102
2102
  var z, oe;
2103
- const P = R.target;
2104
- !((z = d.current) != null && z.contains(P)) && !((oe = c.current) != null && oe.contains(P)) && x(!1);
2103
+ const L = R.target;
2104
+ !((z = s.current) != null && z.contains(L)) && !((oe = c.current) != null && oe.contains(L)) && x(!1);
2105
2105
  };
2106
- return b && window.addEventListener("mousedown", N), () => window.removeEventListener("mousedown", N);
2106
+ return b && window.addEventListener("mousedown", E), () => window.removeEventListener("mousedown", E);
2107
2107
  }, [b]);
2108
- const y = n.length === 0, D = b && u.length > 0, C = u.map((N) => ({
2109
- id: N.label,
2110
- value: N.label,
2111
- label: N.label,
2112
- icon: N.icon
2113
- })), k = (N) => {
2114
- var R, P;
2115
- (P = (R = u.find(($) => $.label === N)) == null ? void 0 : R.onClose) == null || P.call(R), x(!1);
2108
+ const y = n.length === 0, D = b && u.length > 0, C = u.map((E) => ({
2109
+ id: E.label,
2110
+ value: E.label,
2111
+ label: E.label,
2112
+ icon: E.icon
2113
+ })), k = (E) => {
2114
+ var R, L;
2115
+ (L = (R = u.find(($) => $.label === E)) == null ? void 0 : R.onClose) == null || L.call(R), x(!1);
2116
2116
  };
2117
- return /* @__PURE__ */ v(jr, { borderRadius: "8px", width: "100%", children: [
2118
- /* @__PURE__ */ i(qr, { ref: f, children: n.map((N) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
2117
+ return /* @__PURE__ */ v(Br, { borderRadius: "8px", width: "100%", children: [
2118
+ /* @__PURE__ */ i(qr, { ref: f, children: n.map((E) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
2119
2119
  me,
2120
2120
  {
2121
2121
  appearance: "primary",
2122
2122
  displayIcon: !0,
2123
2123
  removable: !0,
2124
- icon: N.icon,
2125
- label: N.label,
2126
- onClose: N.onClose
2124
+ icon: E.icon,
2125
+ label: E.label,
2126
+ onClose: E.onClose
2127
2127
  }
2128
- ) }, N.label)) }),
2129
- /* @__PURE__ */ v(Ge, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
2128
+ ) }, E.label)) }),
2129
+ /* @__PURE__ */ v(Xe, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
2130
2130
  /* @__PURE__ */ i(
2131
- K,
2131
+ Q,
2132
2132
  {
2133
- ref: s,
2133
+ ref: d,
2134
2134
  background: !0,
2135
2135
  borderRadius: "8px",
2136
2136
  height: "100%",
@@ -2139,19 +2139,19 @@ const _r = T.div`
2139
2139
  alignItems: "center",
2140
2140
  padding: "0px 8px",
2141
2141
  border: !0,
2142
- children: y ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ v(Y, { children: [
2143
- p.map((N) => /* @__PURE__ */ i(
2142
+ children: y ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ v(G, { children: [
2143
+ p.map((E) => /* @__PURE__ */ i(
2144
2144
  me,
2145
2145
  {
2146
2146
  "data-filter-tag": "true",
2147
2147
  appearance: "primary",
2148
2148
  displayIcon: !0,
2149
2149
  removable: !0,
2150
- icon: N.icon,
2151
- label: N.label,
2152
- onClose: N.onClose
2150
+ icon: E.icon,
2151
+ label: E.label,
2152
+ onClose: E.onClose
2153
2153
  },
2154
- N.label
2154
+ E.label
2155
2155
  )),
2156
2156
  g && /* @__PURE__ */ v(
2157
2157
  "div",
@@ -2159,30 +2159,30 @@ const _r = T.div`
2159
2159
  ref: c,
2160
2160
  style: { position: "relative", display: "inline-block" },
2161
2161
  children: [
2162
- /* @__PURE__ */ i(Yr, { onClick: m, children: /* @__PURE__ */ i(
2162
+ /* @__PURE__ */ i(Gr, { onClick: m, children: /* @__PURE__ */ i(
2163
2163
  me,
2164
2164
  {
2165
2165
  appearance: "primary",
2166
2166
  label: `+${u.length}`
2167
2167
  }
2168
2168
  ) }),
2169
- D && /* @__PURE__ */ i(_r, { ref: d, children: /* @__PURE__ */ i(
2169
+ D && /* @__PURE__ */ i(_r, { ref: s, children: /* @__PURE__ */ i(
2170
2170
  kt,
2171
2171
  {
2172
2172
  options: C,
2173
2173
  onOptionClick: k,
2174
- children: u.map((N) => /* @__PURE__ */ i(
2175
- Gr,
2174
+ children: u.map((E) => /* @__PURE__ */ i(
2175
+ Xr,
2176
2176
  {
2177
- id: N.label,
2178
- label: N.label,
2179
- leadingIcon: N.icon,
2177
+ id: E.label,
2178
+ label: E.label,
2179
+ leadingIcon: E.icon,
2180
2180
  onClose: () => {
2181
2181
  var R;
2182
- (R = N.onClose) == null || R.call(N), x(!1);
2182
+ (R = E.onClose) == null || R.call(E), x(!1);
2183
2183
  }
2184
2184
  },
2185
- N.label
2185
+ E.label
2186
2186
  ))
2187
2187
  }
2188
2188
  ) })
@@ -2193,21 +2193,21 @@ const _r = T.div`
2193
2193
  }
2194
2194
  ),
2195
2195
  /* @__PURE__ */ i(
2196
- j,
2196
+ B,
2197
2197
  {
2198
2198
  cursorHover: !0,
2199
2199
  disabled: y,
2200
- iconBefore: /* @__PURE__ */ i(Bn, {}),
2200
+ iconBefore: /* @__PURE__ */ i(jn, {}),
2201
2201
  onClick: t,
2202
2202
  variant: "outlined",
2203
2203
  children: a
2204
2204
  }
2205
2205
  ),
2206
2206
  /* @__PURE__ */ i(
2207
- j,
2207
+ B,
2208
2208
  {
2209
2209
  cursorHover: !0,
2210
- iconBefore: /* @__PURE__ */ i(jn, {}),
2210
+ iconBefore: /* @__PURE__ */ i(Bn, {}),
2211
2211
  onClick: r,
2212
2212
  variant: "outlined",
2213
2213
  children: l
@@ -2228,7 +2228,7 @@ const _r = T.div`
2228
2228
  padding: 24px;
2229
2229
  gap: 24px;
2230
2230
  box-sizing: border-box;
2231
- `, ri = (e) => {
2231
+ `, ui = (e) => {
2232
2232
  const {
2233
2233
  actionButtonLabel: n,
2234
2234
  cancelButtonLabel: t,
@@ -2236,9 +2236,9 @@ const _r = T.div`
2236
2236
  loading: o,
2237
2237
  onClick: a,
2238
2238
  onCloseModal: l,
2239
- portalId: s,
2240
- title: d
2241
- } = e, c = re("(max-width: 768px)"), p = document.getElementById(s);
2239
+ portalId: d,
2240
+ title: s
2241
+ } = e, c = re("(max-width: 768px)"), p = document.getElementById(d);
2242
2242
  if (!p)
2243
2243
  throw new Error(
2244
2244
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
@@ -2247,7 +2247,7 @@ const _r = T.div`
2247
2247
  /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ v(Wr, { $smallScreen: c, children: [
2248
2248
  /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
2249
2249
  /* @__PURE__ */ v(w, { alignContent: "center", justifyContent: "space-between", children: [
2250
- /* @__PURE__ */ i(I, { appearance: "dark", size: "small", type: "headline", children: d }),
2250
+ /* @__PURE__ */ i(I, { appearance: "dark", size: "small", type: "headline", children: s }),
2251
2251
  /* @__PURE__ */ v(w, { alignItems: "center", children: [
2252
2252
  /* @__PURE__ */ i(I, { children: "Cerrar" }),
2253
2253
  /* @__PURE__ */ i(
@@ -2266,18 +2266,18 @@ const _r = T.div`
2266
2266
  r,
2267
2267
  /* @__PURE__ */ v(w, { gap: "20px", justifyContent: "flex-end", children: [
2268
2268
  /* @__PURE__ */ i(
2269
- j,
2269
+ B,
2270
2270
  {
2271
2271
  appearance: "gray",
2272
2272
  onClick: l,
2273
- iconBefore: /* @__PURE__ */ i(Bn, {}),
2273
+ iconBefore: /* @__PURE__ */ i(jn, {}),
2274
2274
  spacing: "wide",
2275
2275
  variant: "outlined",
2276
2276
  children: t
2277
2277
  }
2278
2278
  ),
2279
2279
  /* @__PURE__ */ i(
2280
- j,
2280
+ B,
2281
2281
  {
2282
2282
  appearance: "primary",
2283
2283
  loading: o,
@@ -2291,14 +2291,14 @@ const _r = T.div`
2291
2291
  ] }) }),
2292
2292
  p
2293
2293
  );
2294
- }, oi = (e) => {
2294
+ }, pi = (e) => {
2295
2295
  const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = re("(max-width: 768px)"), l = !n || n.length === 0;
2296
2296
  return /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
2297
- a && /* @__PURE__ */ v(Y, { children: [
2297
+ a && /* @__PURE__ */ v(G, { children: [
2298
2298
  /* @__PURE__ */ v(w, { gap: "6px", width: "100%", alignItems: "center", children: [
2299
- /* @__PURE__ */ i(O, { appearance: "gray", icon: /* @__PURE__ */ i(jn, {}) }),
2299
+ /* @__PURE__ */ i(O, { appearance: "gray", icon: /* @__PURE__ */ i(Bn, {}) }),
2300
2300
  /* @__PURE__ */ i(
2301
- K,
2301
+ Q,
2302
2302
  {
2303
2303
  background: !0,
2304
2304
  borderRadius: "8px",
@@ -2309,55 +2309,55 @@ const _r = T.div`
2309
2309
  border: !0,
2310
2310
  width: "100%",
2311
2311
  height: "36px",
2312
- children: l ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((s) => /* @__PURE__ */ i(
2312
+ children: l ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ i(
2313
2313
  me,
2314
2314
  {
2315
2315
  appearance: "primary",
2316
2316
  displayIcon: !0,
2317
- icon: s.icon,
2318
- label: s.label,
2319
- onClose: s.onClose,
2317
+ icon: d.icon,
2318
+ label: d.label,
2319
+ onClose: d.onClose,
2320
2320
  removable: !0
2321
2321
  },
2322
- s.label
2322
+ d.label
2323
2323
  ))
2324
2324
  }
2325
2325
  )
2326
2326
  ] }),
2327
2327
  /* @__PURE__ */ i(Z, { dashed: !0 })
2328
2328
  ] }),
2329
- t.map((s) => /* @__PURE__ */ v(w, { gap: "6px", alignItems: "center", children: [
2330
- /* @__PURE__ */ i(w, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(O, { appearance: "primary", icon: s.icon }) }),
2329
+ t.map((d) => /* @__PURE__ */ v(w, { gap: "6px", alignItems: "center", children: [
2330
+ /* @__PURE__ */ i(w, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(O, { appearance: "primary", icon: d.icon }) }),
2331
2331
  /* @__PURE__ */ i(
2332
2332
  $t,
2333
2333
  {
2334
- disabled: s.disabled,
2335
- invalid: s.invalid,
2336
- label: s.label,
2337
- message: s.message,
2338
- name: s.name,
2334
+ disabled: d.disabled,
2335
+ invalid: d.invalid,
2336
+ label: d.label,
2337
+ message: d.message,
2338
+ name: d.name,
2339
2339
  onChange: r,
2340
- options: s.options,
2341
- placeholder: s.placeholder,
2342
- required: s.required,
2343
- values: s.values,
2340
+ options: d.options,
2341
+ placeholder: d.placeholder,
2342
+ required: d.required,
2343
+ values: d.values,
2344
2344
  fullwidth: !0
2345
2345
  },
2346
- s.name
2346
+ d.name
2347
2347
  )
2348
- ] }, s.name))
2348
+ ] }, d.name))
2349
2349
  ] });
2350
- }, Kr = (e) => {
2350
+ }, Qr = (e) => {
2351
2351
  const n = [];
2352
2352
  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(";");
2353
- }, ai = (e) => {
2353
+ }, gi = (e) => {
2354
2354
  var l;
2355
- const { decision: n, fallbackId: t, template: r } = e, o = (s) => typeof s == "object" && s !== null && "from" in s && "to" in s ? Kr(s) : s, a = ((l = n.conditionsThatEstablishesTheDecision) == null ? void 0 : l.map((s, d) => {
2355
+ const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? Qr(d) : d, a = ((l = n.conditionsThatEstablishesTheDecision) == null ? void 0 : l.map((d, s) => {
2356
2356
  var u;
2357
- const c = s == null ? void 0 : s.value;
2357
+ const c = d == null ? void 0 : d.value;
2358
2358
  return c == null || typeof c == "string" && c.trim() === "" || Array.isArray(c) && c.length === 0 ? null : {
2359
- ...(u = r.conditionsThatEstablishesTheDecision) == null ? void 0 : u[d],
2360
- ...s,
2359
+ ...(u = r.conditionsThatEstablishesTheDecision) == null ? void 0 : u[s],
2360
+ ...d,
2361
2361
  value: o(c)
2362
2362
  };
2363
2363
  }).filter(Boolean)) ?? [];
@@ -2368,7 +2368,7 @@ const _r = T.div`
2368
2368
  value: o(n.value),
2369
2369
  conditionsThatEstablishesTheDecision: a
2370
2370
  };
2371
- }, ii = (e) => {
2371
+ }, fi = (e) => {
2372
2372
  if (typeof e != "string") return e;
2373
2373
  const n = e.split(";").map((r) => r.trim()), t = {};
2374
2374
  for (const r of n)
@@ -2380,7 +2380,7 @@ const _r = T.div`
2380
2380
  isNaN(o) || (t.to = o);
2381
2381
  }
2382
2382
  return t.from !== void 0 || t.to !== void 0 ? t : e;
2383
- }, li = (e) => {
2383
+ }, hi = (e) => {
2384
2384
  const { dataDecision: n, originalDecision: t } = e, r = {
2385
2385
  conditionName: n.ruleName || "",
2386
2386
  labelName: n.labelName || "",
@@ -2396,7 +2396,7 @@ const _r = T.div`
2396
2396
  (o) => o.hidden ? { ...r } : o
2397
2397
  )
2398
2398
  };
2399
- }, di = (e) => {
2399
+ }, mi = (e) => {
2400
2400
  const { decisions: n } = e;
2401
2401
  return n == null ? void 0 : n.map((t) => {
2402
2402
  var o;
@@ -2415,8 +2415,8 @@ const _r = T.div`
2415
2415
  )
2416
2416
  } : t;
2417
2417
  });
2418
- }, Qr = (e) => ({
2419
- schema: Ee().required("Requerido").test(
2418
+ }, Kr = (e) => ({
2419
+ schema: Ne().required("Requerido").test(
2420
2420
  "non-empty",
2421
2421
  "El valor no puede estar vacío",
2422
2422
  (n) => n != null && n.trim() !== ""
@@ -2456,11 +2456,11 @@ const _r = T.div`
2456
2456
  }),
2457
2457
  value: { from: n, to: t }
2458
2458
  };
2459
- }, tn = (e, n) => n === G.PERCENTAGE ? {
2459
+ }, tn = (e, n) => n === X.PERCENTAGE ? {
2460
2460
  schema: Se().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"),
2461
2461
  value: e
2462
2462
  } : {
2463
- schema: Ee().required("Requerido"),
2463
+ schema: Ne().required("Requerido"),
2464
2464
  value: e
2465
2465
  }, no = {
2466
2466
  [A.LIST_OF_VALUES]: Zr,
@@ -2469,7 +2469,7 @@ const _r = T.div`
2469
2469
  [A.GREATER_THAN]: tn,
2470
2470
  [A.LESS_THAN]: tn,
2471
2471
  [A.EQUAL]: tn
2472
- }, $n = (e) => no[e] || Qr;
2472
+ }, $n = (e) => no[e] || Kr;
2473
2473
  function to({
2474
2474
  decision: e,
2475
2475
  onSubmitEvent: n,
@@ -2477,7 +2477,7 @@ function to({
2477
2477
  }) {
2478
2478
  const r = {
2479
2479
  ruleName: e.ruleName || "",
2480
- decisionDataType: e.decisionDataType || G.ALPHABETICAL,
2480
+ decisionDataType: e.decisionDataType || X.ALPHABETICAL,
2481
2481
  howToSetTheDecision: e.howToSetTheDecision || "",
2482
2482
  value: e.value || "",
2483
2483
  effectiveFrom: e.effectiveFrom || "",
@@ -2489,7 +2489,7 @@ function to({
2489
2489
  };
2490
2490
  let o;
2491
2491
  const a = {
2492
- ruleName: Ee().required("El nombre de la regla es requerido"),
2492
+ ruleName: Ne().required("El nombre de la regla es requerido"),
2493
2493
  value: Ue(() => $n(
2494
2494
  o.values.howToSetTheDecision
2495
2495
  )(
@@ -2533,7 +2533,7 @@ function to({
2533
2533
  // },
2534
2534
  // );
2535
2535
  // }),
2536
- conditionsThatEstablishesTheDecision: Ue((d, { parent: c }) => {
2536
+ conditionsThatEstablishesTheDecision: Ue((s, { parent: c }) => {
2537
2537
  var g;
2538
2538
  if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return le().shape({});
2539
2539
  const u = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
@@ -2558,7 +2558,7 @@ function to({
2558
2558
  "La fecha de inicio es requerida"
2559
2559
  ), a.validUntil = _e().when(
2560
2560
  "checkClosed",
2561
- (d, c, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? c.required("La fecha de finalización es requerida").test(
2561
+ (s, c, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? c.required("La fecha de finalización es requerida").test(
2562
2562
  "is-after-startDate",
2563
2563
  "La fecha de finalización debe ser mayor o igual a la fecha de inicio",
2564
2564
  function(g) {
@@ -2568,34 +2568,34 @@ function to({
2568
2568
  ) : c.notRequired()
2569
2569
  ));
2570
2570
  const l = le(a);
2571
- return o = Xn({
2571
+ return o = Yn({
2572
2572
  initialValues: r,
2573
2573
  validationSchema: l,
2574
2574
  validateOnBlur: !0,
2575
- onSubmit: (d) => {
2575
+ onSubmit: (s) => {
2576
2576
  var p;
2577
2577
  const c = {
2578
2578
  ...e,
2579
- ruleName: d.ruleName,
2580
- decisionDataType: d.decisionDataType,
2581
- howToSetTheDecision: d.howToSetTheDecision,
2582
- value: d.value,
2583
- effectiveFrom: d.effectiveFrom,
2584
- validUntil: d.validUntil,
2579
+ ruleName: s.ruleName,
2580
+ decisionDataType: s.decisionDataType,
2581
+ howToSetTheDecision: s.howToSetTheDecision,
2582
+ value: s.value,
2583
+ effectiveFrom: s.effectiveFrom,
2584
+ validUntil: s.validUntil,
2585
2585
  conditionsThatEstablishesTheDecision: (p = e.conditionsThatEstablishesTheDecision) == null ? void 0 : p.filter((u) => {
2586
- const g = d.conditionsThatEstablishesTheDecision[u.conditionName];
2586
+ const g = s.conditionsThatEstablishesTheDecision[u.conditionName];
2587
2587
  return g != null && g !== "";
2588
2588
  }).map((u) => ({
2589
2589
  ...u,
2590
- value: d.conditionsThatEstablishesTheDecision[u.conditionName]
2590
+ value: s.conditionsThatEstablishesTheDecision[u.conditionName]
2591
2591
  }))
2592
2592
  };
2593
2593
  n(c);
2594
2594
  }
2595
- }), { formik: o, handleToggleNoneChange: (d) => {
2595
+ }), { formik: o, handleToggleNoneChange: (s) => {
2596
2596
  var c;
2597
- o.setFieldValue("toggleNone", d), (c = e.conditionsThatEstablishesTheDecision) == null || c.forEach((p) => {
2598
- if (d)
2597
+ o.setFieldValue("toggleNone", s), (c = e.conditionsThatEstablishesTheDecision) == null || c.forEach((p) => {
2598
+ if (s)
2599
2599
  o.setFieldValue(
2600
2600
  `conditionsThatEstablishesTheDecision.${p.conditionName}`,
2601
2601
  void 0
@@ -2644,26 +2644,26 @@ const ro = T.div`
2644
2644
  id: o,
2645
2645
  labelToggle: a,
2646
2646
  name: l,
2647
- valueToggle: s = ""
2648
- } = e, [d, c] = M(n), p = (u) => {
2647
+ valueToggle: d = ""
2648
+ } = e, [s, c] = M(n), p = (u) => {
2649
2649
  c(u.target.checked), r(u);
2650
2650
  };
2651
2651
  return ve(() => {
2652
2652
  c(n);
2653
- }, [n]), /* @__PURE__ */ v(Y, { children: [
2653
+ }, [n]), /* @__PURE__ */ v(G, { children: [
2654
2654
  /* @__PURE__ */ i(w, { children: /* @__PURE__ */ i(
2655
2655
  _n,
2656
2656
  {
2657
- checked: d,
2657
+ checked: s,
2658
2658
  id: o,
2659
2659
  name: l,
2660
2660
  onChange: p,
2661
2661
  size: "small",
2662
- value: s,
2662
+ value: d,
2663
2663
  children: /* @__PURE__ */ i(I, { size: "medium", type: "label", weight: "bold", children: a })
2664
2664
  }
2665
2665
  ) }),
2666
- d && /* @__PURE__ */ i(Y, { children: t })
2666
+ s && /* @__PURE__ */ i(G, { children: t })
2667
2667
  ] });
2668
2668
  }, io = (e) => {
2669
2669
  const {
@@ -2673,21 +2673,21 @@ const ro = T.div`
2673
2673
  labelStart: o,
2674
2674
  labelEnd: a,
2675
2675
  checkedClosed: l = !1,
2676
- required: s = !1,
2677
- valueStart: d = "",
2676
+ required: d = !1,
2677
+ valueStart: s = "",
2678
2678
  valueEnd: c = "",
2679
2679
  messageStart: p = "",
2680
2680
  messageEnd: u = "",
2681
2681
  statusStart: g = "pending",
2682
2682
  statusEnd: f = "pending"
2683
- } = e, [b, x] = M(l), [m, y] = M(d), [D, C] = M(c), k = ({ target: $ }) => {
2683
+ } = e, [b, x] = M(l), [m, y] = M(s), [D, C] = M(c), k = ({ target: $ }) => {
2684
2684
  x($.checked), r && r($.checked);
2685
- }, N = ($) => {
2685
+ }, E = ($) => {
2686
2686
  y($.target.value), n($);
2687
2687
  }, R = ($) => {
2688
2688
  C($.target.value), t($);
2689
- }, P = re("(max-width: 400px)");
2690
- return /* @__PURE__ */ v(Y, { children: [
2689
+ }, L = re("(max-width: 400px)");
2690
+ return /* @__PURE__ */ v(G, { children: [
2691
2691
  /* @__PURE__ */ v(w, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
2692
2692
  /* @__PURE__ */ i(
2693
2693
  I,
@@ -2722,31 +2722,31 @@ const ro = T.div`
2722
2722
  /* @__PURE__ */ v(
2723
2723
  w,
2724
2724
  {
2725
- direction: P ? "column" : "row",
2725
+ direction: L ? "column" : "row",
2726
2726
  justifyContent: "space-between",
2727
2727
  gap: "24px",
2728
2728
  children: [
2729
2729
  /* @__PURE__ */ i(
2730
- je,
2730
+ Be,
2731
2731
  {
2732
2732
  id: "dateStart",
2733
2733
  label: o,
2734
- onChange: N,
2734
+ onChange: E,
2735
2735
  value: m,
2736
- required: s,
2736
+ required: d,
2737
2737
  size: "compact",
2738
2738
  status: g,
2739
2739
  message: p
2740
2740
  }
2741
2741
  ),
2742
2742
  b && /* @__PURE__ */ i(
2743
- je,
2743
+ Be,
2744
2744
  {
2745
2745
  id: "dateEnd",
2746
2746
  label: a,
2747
2747
  onChange: R,
2748
2748
  value: D,
2749
- required: s,
2749
+ required: d,
2750
2750
  size: "compact",
2751
2751
  status: f,
2752
2752
  message: u
@@ -2764,8 +2764,8 @@ const ro = T.div`
2764
2764
  visibleConditions: o,
2765
2765
  normalizedDecision: a,
2766
2766
  handleToggleNoneChange: l,
2767
- handleConditionToggleChange: s,
2768
- showConditionsError: d,
2767
+ handleConditionToggleChange: d,
2768
+ showConditionsError: s,
2769
2769
  termStartStatus: c,
2770
2770
  termEndStatus: p
2771
2771
  } = e;
@@ -2812,7 +2812,7 @@ const ro = T.div`
2812
2812
  name: `toggle.${u.conditionName}`,
2813
2813
  labelToggle: u.labelName,
2814
2814
  checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[u.conditionName] !== void 0,
2815
- handleToggleChange: (g) => s(
2815
+ handleToggleChange: (g) => d(
2816
2816
  u.conditionName,
2817
2817
  u.howToSetTheCondition === A.LIST_OF_VALUES_MULTI
2818
2818
  )(g.target.checked),
@@ -2823,7 +2823,7 @@ const ro = T.div`
2823
2823
  ]
2824
2824
  }
2825
2825
  ) }) }),
2826
- t.terms && /* @__PURE__ */ v(Y, { children: [
2826
+ t.terms && /* @__PURE__ */ v(G, { children: [
2827
2827
  /* @__PURE__ */ i(Z, { dashed: !0 }),
2828
2828
  /* @__PURE__ */ i(
2829
2829
  io,
@@ -2846,10 +2846,10 @@ const ro = T.div`
2846
2846
  )
2847
2847
  ] }),
2848
2848
  /* @__PURE__ */ i(Z, {}),
2849
- d && /* @__PURE__ */ i(I, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
2849
+ s && /* @__PURE__ */ i(I, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
2850
2850
  /* @__PURE__ */ v(w, { direction: "row", justifyContent: "end", gap: "16px", children: [
2851
- /* @__PURE__ */ i(j, { appearance: "gray", onClick: r, children: t.cancel }),
2852
- /* @__PURE__ */ i(j, { type: "submit", children: t.confirm })
2851
+ /* @__PURE__ */ i(B, { appearance: "gray", onClick: r, children: t.cancel }),
2852
+ /* @__PURE__ */ i(B, { type: "submit", children: t.confirm })
2853
2853
  ] })
2854
2854
  ] }) });
2855
2855
  }, so = (e) => {
@@ -2858,13 +2858,13 @@ const ro = T.div`
2858
2858
  decision: n,
2859
2859
  onSubmitEvent: t,
2860
2860
  textValues: r
2861
- }), s = {
2861
+ }), d = {
2862
2862
  ruleName: n.ruleName,
2863
2863
  labelName: n.labelName,
2864
2864
  howToSetTheCondition: n.howToSetTheDecision,
2865
2865
  decisionDataType: n.decisionDataType,
2866
2866
  listOfPossibleValues: n.listOfPossibleValues
2867
- }, d = ((f = n.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
2867
+ }, s = ((f = n.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
2868
2868
  (b) => !b.hidden
2869
2869
  )) || [], c = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, p = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, u = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
2870
2870
  return /* @__PURE__ */ i(
@@ -2874,8 +2874,8 @@ const ro = T.div`
2874
2874
  onCancel: o,
2875
2875
  textValues: r,
2876
2876
  decision: n,
2877
- visibleConditions: d,
2878
- normalizedDecision: s,
2877
+ visibleConditions: s,
2878
+ normalizedDecision: d,
2879
2879
  handleToggleNoneChange: l,
2880
2880
  handleConditionToggleChange: (b, x) => (m) => {
2881
2881
  if (!m)
@@ -2900,7 +2900,7 @@ const ro = T.div`
2900
2900
  termEndStatus: u
2901
2901
  }
2902
2902
  );
2903
- }, si = (e) => {
2903
+ }, bi = (e) => {
2904
2904
  var o;
2905
2905
  const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
2906
2906
  (a) => a.switchPlaces
@@ -2916,7 +2916,7 @@ const ro = T.div`
2916
2916
  (a) => a.conditionName === r.conditionName ? { ...a, hidden: !0 } : a
2917
2917
  )
2918
2918
  } : t;
2919
- }, ci = (e) => {
2919
+ }, vi = (e) => {
2920
2920
  const { decisions: n } = e;
2921
2921
  return n == null ? void 0 : n.map((t) => {
2922
2922
  var o;
@@ -2935,7 +2935,7 @@ const ro = T.div`
2935
2935
  )
2936
2936
  } : t;
2937
2937
  });
2938
- }, de = {
2938
+ }, se = {
2939
2939
  item: {
2940
2940
  background: {
2941
2941
  active: S.palette.blue.B50,
@@ -2957,7 +2957,7 @@ const ro = T.div`
2957
2957
  border: 1px solid
2958
2958
  ${({ theme: e, $active: n }) => {
2959
2959
  var t, r, o, a;
2960
- return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || de.border.expanded.color : ((a = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : a.color) || de.border.contracted.color;
2960
+ return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || se.border.expanded.color : ((a = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : a.color) || se.border.contracted.color;
2961
2961
  }};
2962
2962
  }
2963
2963
  &:hover {
@@ -2965,10 +2965,10 @@ const ro = T.div`
2965
2965
  background-color: ${({ theme: e, $disabled: n }) => {
2966
2966
  var t, r, o;
2967
2967
  if (!n)
2968
- 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) || de.item.background.hover;
2968
+ 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) || se.item.background.hover;
2969
2969
  }};
2970
2970
  }
2971
- `, In = T.div`
2971
+ `, An = T.div`
2972
2972
  display: flex;
2973
2973
  align-items: center;
2974
2974
  gap: 12px;
@@ -2980,11 +2980,11 @@ const ro = T.div`
2980
2980
  align-items: center;
2981
2981
  outline: none;
2982
2982
  cursor: pointer;
2983
- `, po = T(Gn)`
2983
+ `, po = T(Xn)`
2984
2984
  display: flex;
2985
2985
  align-items: center;
2986
2986
  text-decoration: none;
2987
- `, go = T(Gn)`
2987
+ `, go = T(Xn)`
2988
2988
  display: block;
2989
2989
  text-decoration: none;
2990
2990
  color: inherit;
@@ -2993,7 +2993,7 @@ const ro = T.div`
2993
2993
  border-bottom: 1px solid
2994
2994
  ${({ theme: e, $active: n }) => {
2995
2995
  var t, r, o, a;
2996
- return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || de.border.expanded.color : ((a = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : a.color) || de.border.contracted.color;
2996
+ return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || se.border.expanded.color : ((a = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : a.color) || se.border.contracted.color;
2997
2997
  }};
2998
2998
  border-radius: 8px 8px 0 0;
2999
2999
  }
@@ -3001,8 +3001,8 @@ const ro = T.div`
3001
3001
  display: block;
3002
3002
  text-decoration: none;
3003
3003
  background-color: ${({ theme: e, $active: n }) => {
3004
- var t, r, o, a, l, s;
3005
- return n ? ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.active) || de.item.background.active : ((s = (l = (a = e == null ? void 0 : e.menu) == null ? void 0 : a.item) == null ? void 0 : l.background) == null ? void 0 : s.inactive) || de.item.background.inactive;
3004
+ var t, r, o, a, l, d;
3005
+ return n ? ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.active) || se.item.background.active : ((d = (l = (a = e == null ? void 0 : e.menu) == null ? void 0 : a.item) == null ? void 0 : l.background) == null ? void 0 : d.inactive) || se.item.background.inactive;
3006
3006
  }};
3007
3007
  &:last-child {
3008
3008
  border-radius: 0 0 8px 8px;
@@ -3012,7 +3012,7 @@ const ro = T.div`
3012
3012
  background-color: ${({ $active: e, theme: n, $disabled: t }) => {
3013
3013
  var r, o, a;
3014
3014
  if (!t && !e)
3015
- return ((a = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : a.hover) || de.item.background.hover;
3015
+ return ((a = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : a.hover) || se.item.background.hover;
3016
3016
  }};
3017
3017
  }
3018
3018
  `, ho = T.div`
@@ -3023,14 +3023,14 @@ const ro = T.div`
3023
3023
  border-radius: 0 0 8px 8px;
3024
3024
  }
3025
3025
  `, mo = (e) => {
3026
- const { isOpen: n, links: t, onClick: r, title: o, activeId: a, headerPath: l, headerActive: s } = e, d = (b) => {
3026
+ const { isOpen: n, links: t, onClick: r, title: o, activeId: a, headerPath: l, headerActive: d } = e, s = (b) => {
3027
3027
  (b.key === "Enter" || b.key === " ") && (b.preventDefault(), r());
3028
3028
  }, c = (b) => {
3029
3029
  b.preventDefault(), b.stopPropagation(), r();
3030
3030
  }, p = (b) => {
3031
3031
  (b.key === "Enter" || b.key === " ") && (b.preventDefault(), b.stopPropagation(), r());
3032
- }, u = n || s ? "primary" : "dark", g = n || s ? "bold" : "normal", f = H.useId();
3033
- return /* @__PURE__ */ i(co, { $active: n, children: /* @__PURE__ */ v(K, { border: !0, borderRadius: "8px", width: "100%", children: [
3032
+ }, u = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f = H.useId();
3033
+ return /* @__PURE__ */ i(co, { $active: n, children: /* @__PURE__ */ v(Q, { border: !0, borderRadius: "8px", width: "100%", children: [
3034
3034
  /* @__PURE__ */ i(
3035
3035
  fo,
3036
3036
  {
@@ -3040,7 +3040,7 @@ const ro = T.div`
3040
3040
  onClick: c,
3041
3041
  onKeyDown: p,
3042
3042
  children: l ? /* @__PURE__ */ i(po, { to: l, children: /* @__PURE__ */ v(
3043
- K,
3043
+ Q,
3044
3044
  {
3045
3045
  alignItems: "center",
3046
3046
  borderRadius: "8px",
@@ -3056,7 +3056,7 @@ const ro = T.div`
3056
3056
  icon: n && t.length > 0 ? /* @__PURE__ */ i(an, {}) : /* @__PURE__ */ i(Dn, {})
3057
3057
  }
3058
3058
  ),
3059
- /* @__PURE__ */ i(In, { children: /* @__PURE__ */ i(
3059
+ /* @__PURE__ */ i(An, { children: /* @__PURE__ */ i(
3060
3060
  I,
3061
3061
  {
3062
3062
  appearance: u,
@@ -3070,7 +3070,7 @@ const ro = T.div`
3070
3070
  ]
3071
3071
  }
3072
3072
  ) }) : /* @__PURE__ */ v(
3073
- K,
3073
+ Q,
3074
3074
  {
3075
3075
  alignItems: "center",
3076
3076
  borderRadius: "8px",
@@ -3086,13 +3086,13 @@ const ro = T.div`
3086
3086
  icon: n && t.length > 0 ? /* @__PURE__ */ i(an, {}) : /* @__PURE__ */ i(Dn, {})
3087
3087
  }
3088
3088
  ),
3089
- /* @__PURE__ */ i(In, { children: /* @__PURE__ */ i(
3089
+ /* @__PURE__ */ i(An, { children: /* @__PURE__ */ i(
3090
3090
  uo,
3091
3091
  {
3092
3092
  "aria-controls": f,
3093
3093
  "aria-expanded": n,
3094
3094
  onClick: r,
3095
- onKeyDown: d,
3095
+ onKeyDown: s,
3096
3096
  children: /* @__PURE__ */ i(
3097
3097
  I,
3098
3098
  {
@@ -3145,27 +3145,27 @@ const ro = T.div`
3145
3145
  }};
3146
3146
  }
3147
3147
  height: 90vh;
3148
- `, ui = (e) => {
3149
- const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, [o, a] = H.useState(t), l = Pt();
3148
+ `, yi = (e) => {
3149
+ const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, [o, a] = H.useState(t), l = Lt();
3150
3150
  H.useEffect(() => {
3151
3151
  n && a(null);
3152
3152
  }, [n, l.pathname]);
3153
- const s = H.useCallback(
3153
+ const d = H.useCallback(
3154
3154
  (c) => {
3155
3155
  var p;
3156
3156
  return (p = c.find((u) => u.path === l.pathname)) == null ? void 0 : p.id;
3157
3157
  },
3158
3158
  [l.pathname]
3159
- ), d = H.useCallback(
3159
+ ), s = H.useCallback(
3160
3160
  (c) => c ? l.pathname === c || l.pathname.startsWith(c + "/") : !1,
3161
3161
  [l.pathname]
3162
3162
  );
3163
3163
  return /* @__PURE__ */ i(bo, { $background: !0, children: /* @__PURE__ */ i(w, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((c) => /* @__PURE__ */ i(
3164
3164
  mo,
3165
3165
  {
3166
- activeId: s(c.links),
3166
+ activeId: d(c.links),
3167
3167
  headerPath: c.path,
3168
- headerActive: d(c.path),
3168
+ headerActive: s(c.path),
3169
3169
  isOpen: o === c.id,
3170
3170
  links: c.links,
3171
3171
  onClick: () => a((p) => p === c.id ? null : c.id),
@@ -3221,7 +3221,7 @@ function ke(e) {
3221
3221
  return { x: e.clientX, y: e.clientY };
3222
3222
  }
3223
3223
  Array();
3224
- var wn = typeof window < "u", B = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap();
3224
+ var wn = typeof window < "u", j = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap();
3225
3225
  function it() {
3226
3226
  if (!wn) return !1;
3227
3227
  if ("userAgentData" in navigator)
@@ -3263,7 +3263,7 @@ var yo = {
3263
3263
  scrollDebounceTimeout: void 0,
3264
3264
  frameIdX: void 0,
3265
3265
  frameIdY: void 0
3266
- }, h = yo, ce = !1, An, rn;
3266
+ }, h = yo, ce = !1, In, rn;
3267
3267
  function xo() {
3268
3268
  h.scrollDebounceTimeout && clearTimeout(h.scrollDebounceTimeout), h.longPressTimeout && clearTimeout(h.longPressTimeout), h.frameIdX !== void 0 && cancelAnimationFrame(h.frameIdX), h.frameIdY !== void 0 && cancelAnimationFrame(h.frameIdY), h = { ...{
3269
3269
  affectedNodes: [],
@@ -3331,7 +3331,7 @@ function So(e) {
3331
3331
  const { x: n, y: t } = ke(e);
3332
3332
  _(h) && Ze({ x: n, y: t }, e, h);
3333
3333
  }
3334
- function No(e) {
3334
+ function Eo(e) {
3335
3335
  if (!h.pointerDown || !h.pointerDown.validated) return;
3336
3336
  const n = h.pointerDown.parent.data.config;
3337
3337
  if (!(e.pointerType === "mouse" && !it()))
@@ -3355,29 +3355,29 @@ function No(e) {
3355
3355
  Rn(e, o, !0);
3356
3356
  }
3357
3357
  }
3358
- function Eo({
3358
+ function No({
3359
3359
  parent: e,
3360
3360
  getValues: n,
3361
3361
  setValues: t,
3362
3362
  config: r = {}
3363
3363
  }) {
3364
- var d, c, p;
3364
+ var s, c, p;
3365
3365
  if (!wn) return;
3366
- An || (An = Ye(document, {
3366
+ In || (In = Ge(document, {
3367
3367
  dragover: So,
3368
3368
  pointerdown: wo,
3369
3369
  pointerup: Do,
3370
3370
  keydown: Co,
3371
3371
  drop: To,
3372
- pointermove: No,
3373
- pointercancel: X(r.handlePointercancel),
3372
+ pointermove: Eo,
3373
+ pointercancel: Y(r.handlePointercancel),
3374
3374
  touchmove: (u) => {
3375
3375
  _(h) && u.cancelable && U(u);
3376
3376
  },
3377
3377
  contextmenu: (u) => {
3378
3378
  W(h) && U(u);
3379
3379
  }
3380
- })), st(e);
3380
+ })), dt(e);
3381
3381
  const [o, a] = tt(), l = {
3382
3382
  getValues: n,
3383
3383
  setValues: t,
@@ -3386,35 +3386,35 @@ function Eo({
3386
3386
  dragEffectAllowed: r.dragEffectAllowed ?? "move",
3387
3387
  draggedNodes: Ho,
3388
3388
  dragstartClasses: _o,
3389
- handleNodeKeydown: Yo,
3390
- handleDragstart: jo,
3389
+ handleNodeKeydown: Go,
3390
+ handleDragstart: Bo,
3391
3391
  handleNodeDragover: ra,
3392
3392
  handleParentDragover: oa,
3393
- handleNodeDrop: Go,
3393
+ handleNodeDrop: Xo,
3394
3394
  handleNodeFocus: Wo,
3395
- handleNodeBlur: Ko,
3395
+ handleNodeBlur: Qo,
3396
3396
  handlePointercancel: Zo,
3397
3397
  handleEnd: Jo,
3398
- handleDragend: Qo,
3398
+ handleDragend: Ko,
3399
3399
  handleParentFocus: $o,
3400
3400
  handleNodePointerup: ea,
3401
- handleNodePointerover: Xo,
3401
+ handleNodePointerover: Yo,
3402
3402
  handleParentPointerover: aa,
3403
- handleParentScroll: Bo,
3403
+ handleParentScroll: jo,
3404
3404
  handleNodePointerdown: Uo,
3405
3405
  handleNodeDragenter: la,
3406
- handleNodeDragleave: da,
3407
- handleParentDrop: Ao,
3406
+ handleNodeDragleave: sa,
3407
+ handleParentDrop: Io,
3408
3408
  multiDrag: r.multiDrag ?? !1,
3409
3409
  nativeDrag: r.nativeDrag ?? !0,
3410
3410
  performSort: ko,
3411
- performTransfer: Io,
3411
+ performTransfer: Ao,
3412
3412
  root: r.root ?? document,
3413
3413
  setupNode: Fo,
3414
3414
  setupNodeRemap: ct,
3415
- reapplyDragClasses: Po,
3415
+ reapplyDragClasses: Lo,
3416
3416
  tearDownNode: Oo,
3417
- tearDownNodeRemap: Lo,
3417
+ tearDownNodeRemap: Po,
3418
3418
  remapFinished: zo,
3419
3419
  threshold: {
3420
3420
  horizontal: 0,
@@ -3428,7 +3428,7 @@ function Eo({
3428
3428
  on: a,
3429
3429
  emit: o
3430
3430
  };
3431
- new MutationObserver(Mo).observe(e, { childList: !0 }), B.set(e, l), (d = r.plugins) == null || d.forEach((u) => {
3431
+ new MutationObserver(Mo).observe(e, { childList: !0 }), j.set(e, l), (s = r.plugins) == null || s.forEach((u) => {
3432
3432
  var g, f;
3433
3433
  (f = (g = u(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
3434
3434
  }), (c = r.plugins) == null || c.forEach((u) => {
@@ -3437,17 +3437,17 @@ function Eo({
3437
3437
  }), (p = r.plugins) == null || p.forEach((u) => {
3438
3438
  var g, f;
3439
3439
  (f = (g = u(e)) == null ? void 0 : g.setup) == null || f.call(g);
3440
- }), Ro(e, l), Ke(e, !0);
3440
+ }), Ro(e, l), Qe(e, !0);
3441
3441
  }
3442
- function dt(e, n, t, r, o, a) {
3443
- const { x: l, y: s } = ke(t), d = e.el.getBoundingClientRect();
3442
+ function st(e, n, t, r, o, a) {
3443
+ const { x: l, y: d } = ke(t), s = e.el.getBoundingClientRect();
3444
3444
  return {
3445
3445
  affectedNodes: [],
3446
3446
  ascendingDirection: !1,
3447
3447
  clonedDraggedEls: [],
3448
3448
  coordinates: {
3449
3449
  x: l,
3450
- y: s
3450
+ y: d
3451
3451
  },
3452
3452
  draggedNode: {
3453
3453
  el: e.el,
@@ -3468,8 +3468,8 @@ function dt(e, n, t, r, o, a) {
3468
3468
  longPressTimeout: void 0,
3469
3469
  currentTargetValue: e.data.value,
3470
3470
  scrollEls: [],
3471
- startLeft: o || l - ((d == null ? void 0 : d.left) ?? 0),
3472
- startTop: a || s - ((d == null ? void 0 : d.top) ?? 0),
3471
+ startLeft: o || l - ((s == null ? void 0 : s.left) ?? 0),
3472
+ startTop: a || d - ((s == null ? void 0 : s.top) ?? 0),
3473
3473
  targetIndex: e.data.index,
3474
3474
  transferred: !1
3475
3475
  };
@@ -3479,11 +3479,11 @@ function ko({
3479
3479
  draggedNodes: n,
3480
3480
  targetNodes: t
3481
3481
  }) {
3482
- Ke(e.el);
3483
- const r = n.map((d) => d.data.value), o = Ne(e.el, e.data), a = n[0].data.index, l = [...e.data.enabledNodes], s = [
3484
- ...o.filter((d) => !r.some((c) => Me(d, c)))
3482
+ Qe(e.el);
3483
+ const r = n.map((s) => s.data.value), o = Ee(e.el, e.data), a = n[0].data.index, l = [...e.data.enabledNodes], d = [
3484
+ ...o.filter((s) => !r.some((c) => Me(s, c)))
3485
3485
  ];
3486
- s.splice(t[0].data.index, 0, ...r), "draggedNode" in h && (h.currentTargetValue = t[0].data.value), cn(e.el, e.data, [...s]), e.data.config.onSort && e.data.config.onSort({
3486
+ d.splice(t[0].data.index, 0, ...r), "draggedNode" in h && (h.currentTargetValue = t[0].data.value), cn(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
3487
3487
  parent: {
3488
3488
  el: e.el,
3489
3489
  data: e.data
@@ -3491,7 +3491,7 @@ function ko({
3491
3491
  previousValues: [...o],
3492
3492
  previousNodes: [...l],
3493
3493
  nodes: [...e.data.enabledNodes],
3494
- values: [...s],
3494
+ values: [...d],
3495
3495
  draggedNodes: n,
3496
3496
  previousPosition: a,
3497
3497
  position: t[0].data.index,
@@ -3513,13 +3513,13 @@ function be(e, n, t) {
3513
3513
  const r = n.data.config.selectedClass;
3514
3514
  if (!t.selectedState) return;
3515
3515
  const o = Array.from(e);
3516
- se(
3516
+ de(
3517
3517
  e.map((a) => a.el),
3518
3518
  r
3519
3519
  );
3520
3520
  for (const a of o) {
3521
3521
  a.el.setAttribute("aria-selected", "false");
3522
- const l = t.selectedState.nodes.findIndex((s) => s.el === a.el);
3522
+ const l = t.selectedState.nodes.findIndex((d) => d.el === a.el);
3523
3523
  l !== -1 && t.selectedState.nodes.splice(l, 1);
3524
3524
  }
3525
3525
  }
@@ -3536,7 +3536,7 @@ function $o(e, n) {
3536
3536
  const t = e.targetData.parent.data.enabledNodes[0];
3537
3537
  t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? ye(e.targetData.parent, t, n) : n.selectedState || ye(e.targetData.parent, t, n));
3538
3538
  }
3539
- function Io({
3539
+ function Ao({
3540
3540
  currentParent: e,
3541
3541
  targetParent: n,
3542
3542
  initialParent: t,
@@ -3545,14 +3545,14 @@ function Io({
3545
3545
  targetNodes: a,
3546
3546
  state: l
3547
3547
  }) {
3548
- Ke(t.el);
3549
- const s = r.map((g) => g.data.value), d = [
3550
- ...Ne(e.el, e.data).filter(
3551
- (g) => !s.some((f) => Me(g, f))
3548
+ Qe(t.el);
3549
+ const d = r.map((g) => g.data.value), s = [
3550
+ ...Ee(e.el, e.data).filter(
3551
+ (g) => !d.some((f) => Me(g, f))
3552
3552
  )
3553
- ], c = Ne(n.el, n.data), p = t.el === n.el && n.data.config.sortable === !1;
3553
+ ], c = Ee(n.el, n.data), p = t.el === n.el && n.data.config.sortable === !1;
3554
3554
  let u;
3555
- a.length ? (p ? u = o : n.data.config.sortable === !1 ? u = n.data.enabledNodes.length : u = a[0].data.index, c.splice(u, 0, ...s)) : (u = p ? o : n.data.enabledNodes.length, c.splice(u, 0, ...s)), cn(e.el, e.data, d), cn(n.el, n.data, c), n.data.config.onTransfer && n.data.config.onTransfer({
3555
+ a.length ? (p ? u = o : n.data.config.sortable === !1 ? u = n.data.enabledNodes.length : u = a[0].data.index, c.splice(u, 0, ...d)) : (u = p ? o : n.data.enabledNodes.length, c.splice(u, 0, ...d)), cn(e.el, e.data, s), cn(n.el, n.data, c), n.data.config.onTransfer && n.data.config.onTransfer({
3556
3556
  sourceParent: e,
3557
3557
  targetParent: n,
3558
3558
  initialParent: t,
@@ -3570,19 +3570,19 @@ function Io({
3570
3570
  targetNodes: a || []
3571
3571
  });
3572
3572
  }
3573
- function Ne(e, n) {
3573
+ function Ee(e, n) {
3574
3574
  return [...n.getValues(e)];
3575
3575
  }
3576
3576
  function cn(e, n, t) {
3577
3577
  n.setValues(t, e);
3578
3578
  }
3579
- function Ao(e, n) {
3579
+ function Io(e, n) {
3580
3580
  ue(e.e), ce = !0;
3581
3581
  const t = n.initialParent.data.config.handleEnd;
3582
3582
  t(n);
3583
3583
  }
3584
- function st(e) {
3585
- const n = B.get(e);
3584
+ function dt(e) {
3585
+ const n = j.get(e);
3586
3586
  n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
3587
3587
  }
3588
3588
  function _(e) {
@@ -3592,17 +3592,17 @@ function W(e) {
3592
3592
  return "synthDragging" in e && !!e.synthDragging;
3593
3593
  }
3594
3594
  function Ro(e, n) {
3595
- n.abortControllers.mainParent = Ye(e, {
3596
- dragover: Be(n.config.handleParentDragover),
3595
+ n.abortControllers.mainParent = Ge(e, {
3596
+ dragover: je(n.config.handleParentDragover),
3597
3597
  handleParentPointerover: n.config.handleParentPointerover,
3598
- scroll: Be(n.config.handleParentScroll),
3599
- drop: Be(n.config.handleParentDrop),
3598
+ scroll: je(n.config.handleParentScroll),
3599
+ drop: je(n.config.handleParentDrop),
3600
3600
  hasNestedParent: (t) => {
3601
- const r = B.get(t.target);
3601
+ const r = j.get(t.target);
3602
3602
  r && (r.nestedParent = t.detail.parent);
3603
3603
  },
3604
- focus: Be(n.config.handleParentFocus)
3605
- }), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = Ye(
3604
+ focus: je(n.config.handleParentFocus)
3605
+ }), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = Ge(
3606
3606
  n.config.externalDragHandle.el,
3607
3607
  {
3608
3608
  pointerdown: (t) => {
@@ -3619,7 +3619,7 @@ function Ro(e, n) {
3619
3619
  if (!o) return;
3620
3620
  const a = r.parentNode;
3621
3621
  if (!(a instanceof HTMLElement)) return;
3622
- const l = B.get(a);
3622
+ const l = j.get(a);
3623
3623
  l && (h.pointerDown = {
3624
3624
  parent: {
3625
3625
  el: a,
@@ -3638,19 +3638,19 @@ function Ro(e, n) {
3638
3638
  function Fo(e) {
3639
3639
  var t;
3640
3640
  const n = e.parent.data.config;
3641
- e.node.data.abortControllers.mainNode = Ye(e.node.el, {
3642
- keydown: X(n.handleNodeKeydown),
3643
- dragstart: X(n.handleDragstart),
3644
- dragover: X(n.handleNodeDragover),
3645
- dragenter: X(n.handleNodeDragenter),
3646
- dragleave: X(n.handleNodeDragleave),
3647
- dragend: X(n.handleDragend),
3648
- drop: X(n.handleNodeDrop),
3649
- focus: X(n.handleNodeFocus),
3650
- blur: X(n.handleNodeBlur),
3651
- pointerup: X(n.handleNodePointerup),
3652
- pointercancel: X(n.handlePointercancel),
3653
- pointerdown: X(n.handleNodePointerdown),
3641
+ e.node.data.abortControllers.mainNode = Ge(e.node.el, {
3642
+ keydown: Y(n.handleNodeKeydown),
3643
+ dragstart: Y(n.handleDragstart),
3644
+ dragover: Y(n.handleNodeDragover),
3645
+ dragenter: Y(n.handleNodeDragenter),
3646
+ dragleave: Y(n.handleNodeDragleave),
3647
+ dragend: Y(n.handleDragend),
3648
+ drop: Y(n.handleNodeDrop),
3649
+ focus: Y(n.handleNodeFocus),
3650
+ blur: Y(n.handleNodeBlur),
3651
+ pointerup: Y(n.handleNodePointerup),
3652
+ pointercancel: Y(n.handlePointercancel),
3653
+ pointerdown: Y(n.handleNodePointerdown),
3654
3654
  handleNodePointerover: n.handleNodePointerover,
3655
3655
  touchmove: (r) => {
3656
3656
  _(h) && r.cancelable && U(r);
@@ -3670,12 +3670,12 @@ function ct(e) {
3670
3670
  (o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
3671
3671
  });
3672
3672
  }
3673
- function Po(e, n) {
3673
+ function Lo(e, n) {
3674
3674
  if (!_(h)) return;
3675
3675
  const t = W(h) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
3676
3676
  h.draggedNode.el === e && Te([e], t, !0);
3677
3677
  }
3678
- function Lo(e) {
3678
+ function Po(e) {
3679
3679
  var n;
3680
3680
  (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
3681
3681
  var r, o;
@@ -3685,24 +3685,24 @@ function Lo(e) {
3685
3685
  function Oo(e) {
3686
3686
  var n, t, r, o, a;
3687
3687
  (n = e.parent.data.config.plugins) == null || n.forEach((l) => {
3688
- var s, d;
3689
- (d = (s = l(e.parent.el)) == null ? void 0 : s.tearDownNode) == null || d.call(s, e);
3688
+ var d, s;
3689
+ (s = (d = l(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || s.call(d, e);
3690
3690
  }), e.node.el.draggable = !1, (r = (t = e.node.data) == null ? void 0 : t.abortControllers) != null && r.mainNode && ((a = (o = e.node.data) == null ? void 0 : o.abortControllers) == null || a.mainNode.abort());
3691
3691
  }
3692
3692
  function Mo(e) {
3693
3693
  if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
3694
3694
  return;
3695
3695
  const n = e[0].target;
3696
- !(n instanceof HTMLElement) || !B.get(n) || Ke(n);
3696
+ !(n instanceof HTMLElement) || !j.get(n) || Qe(n);
3697
3697
  }
3698
- function Ke(e, n) {
3699
- var s;
3700
- const t = B.get(e);
3698
+ function Qe(e, n) {
3699
+ var d;
3700
+ const t = j.get(e);
3701
3701
  if (!t) return;
3702
3702
  t.privateClasses = Array.from(e.classList);
3703
3703
  const r = [], o = t.config;
3704
- for (let d = 0; d < e.children.length; d++) {
3705
- const c = e.children[d];
3704
+ for (let s = 0; s < e.children.length; s++) {
3705
+ const c = e.children[s];
3706
3706
  if (!Je(c) || c.id === "dnd-dragged-node-clone") continue;
3707
3707
  const p = ne.get(c);
3708
3708
  (n || !p) && o.tearDownNode({
@@ -3723,17 +3723,17 @@ function Ke(e, n) {
3723
3723
  return;
3724
3724
  }
3725
3725
  const a = t.getValues(e), l = [];
3726
- for (let d = 0; d < r.length; d++) {
3727
- const c = r[d], p = ne.get(c);
3728
- if (o.draggableValue && !o.draggableValue(a[d])) continue;
3726
+ for (let s = 0; s < r.length; s++) {
3727
+ const c = r[s], p = ne.get(c);
3728
+ if (o.draggableValue && !o.draggableValue(a[s])) continue;
3729
3729
  const u = Object.assign(
3730
3730
  p ?? {
3731
3731
  privateClasses: [],
3732
3732
  abortControllers: {}
3733
3733
  },
3734
3734
  {
3735
- value: a[d],
3736
- index: d
3735
+ value: a[s],
3736
+ index: s
3737
3737
  }
3738
3738
  );
3739
3739
  if (!_(h) && h.activeState && Me(h.activeState.node.data.value, u.value) && ye(
@@ -3776,9 +3776,9 @@ function Ke(e, n) {
3776
3776
  }
3777
3777
  });
3778
3778
  }
3779
- B.set(e, { ...t, enabledNodes: l }), o.remapFinished(t), (s = t.config.plugins) == null || s.forEach((d) => {
3779
+ j.set(e, { ...t, enabledNodes: l }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((s) => {
3780
3780
  var c, p;
3781
- (p = (c = d(e)) == null ? void 0 : c.remapFinished) == null || p.call(c);
3781
+ (p = (c = s(e)) == null ? void 0 : c.remapFinished) == null || p.call(c);
3782
3782
  });
3783
3783
  }
3784
3784
  function zo() {
@@ -3800,12 +3800,12 @@ function Ho(e) {
3800
3800
  } else return [e.node];
3801
3801
  return [];
3802
3802
  }
3803
- function Bo(e) {
3803
+ function jo(e) {
3804
3804
  _(h) && (h.emit("scrollStarted", h), !W(h) && (h.preventEnter = !0, rn && clearTimeout(rn), rn = setTimeout(() => {
3805
3805
  h.preventEnter = !1, h.emit("scrollEnded", h);
3806
3806
  }, 100)));
3807
3807
  }
3808
- function jo(e, n) {
3808
+ function Bo(e, n) {
3809
3809
  const t = e.targetData.parent.data.config;
3810
3810
  if (!t.nativeDrag || !Vo(e) || !ut({
3811
3811
  x: e.e.clientX,
@@ -3825,7 +3825,7 @@ function jo(e, n) {
3825
3825
  if (t.onDragstart) {
3826
3826
  const a = {
3827
3827
  parent: e.targetData.parent,
3828
- values: Ne(
3828
+ values: Ee(
3829
3829
  e.targetData.parent.el,
3830
3830
  e.targetData.parent.data
3831
3831
  ),
@@ -3838,7 +3838,7 @@ function jo(e, n) {
3838
3838
  }
3839
3839
  }
3840
3840
  function Uo(e, n) {
3841
- var s, d;
3841
+ var d, s;
3842
3842
  if (ue(e.e), n.pointerDown = {
3843
3843
  parent: e.targetData.parent,
3844
3844
  node: e.targetData.node,
@@ -3897,7 +3897,7 @@ function Uo(e, n) {
3897
3897
  );
3898
3898
  return;
3899
3899
  }
3900
- (d = (s = n.selectedState) == null ? void 0 : s.nodes) != null && d.length ? n.selectedState.nodes.findIndex(
3900
+ (s = (d = n.selectedState) == null ? void 0 : d.nodes) != null && s.length ? n.selectedState.nodes.findIndex(
3901
3901
  (p) => p.el === e.targetData.node.el
3902
3902
  ) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? be(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && it() ? r.push(...n.selectedState.nodes) : be(n.selectedState.nodes, e.targetData.parent, n), He(
3903
3903
  e.targetData.parent,
@@ -3918,7 +3918,7 @@ function _o(e, n, t, r = !1) {
3918
3918
  n.map((o) => o.el),
3919
3919
  r ? t.synthDraggingClass : t.draggingClass
3920
3920
  ), setTimeout(() => {
3921
- se(
3921
+ de(
3922
3922
  n.map((o) => o.el),
3923
3923
  r ? t.synthDraggingClass : t.draggingClass
3924
3924
  ), Te(
@@ -3927,7 +3927,7 @@ function _o(e, n, t, r = !1) {
3927
3927
  ), Te(
3928
3928
  n.map((o) => o.el),
3929
3929
  r ? t.synthDropZoneClass : t.dropZoneClass
3930
- ), se(
3930
+ ), de(
3931
3931
  n.map((o) => o.el),
3932
3932
  t.selectedClass
3933
3933
  );
@@ -3936,7 +3936,7 @@ function _o(e, n, t, r = !1) {
3936
3936
  function qo(e, n) {
3937
3937
  ue(e.e);
3938
3938
  const t = lt(
3939
- dt(
3939
+ st(
3940
3940
  e.targetData.node,
3941
3941
  e.targetData.parent,
3942
3942
  e.e,
@@ -3959,9 +3959,9 @@ function qo(e, n) {
3959
3959
  {
3960
3960
  const a = document.createElement("div");
3961
3961
  a.setAttribute("id", "dnd-dragged-node-clone"), a.setAttribute("popover", "manual");
3962
- for (const s of n) {
3963
- const d = s.el.cloneNode(!0);
3964
- d.id = s.el.id + "-clone", d.style.pointerEvents = "none", a.appendChild(d);
3962
+ for (const d of n) {
3963
+ const s = d.el.cloneNode(!0);
3964
+ s.id = d.el.id + "-clone", s.style.pointerEvents = "none", a.appendChild(s);
3965
3965
  }
3966
3966
  const { width: l } = n[0].el.getBoundingClientRect();
3967
3967
  Object.assign(a.style, {
@@ -4004,22 +4004,22 @@ function ut({
4004
4004
  if (a === l || l.contains(a)) return !0;
4005
4005
  return !1;
4006
4006
  }
4007
- function Yo(e) {
4007
+ function Go(e) {
4008
4008
  }
4009
- function Xo(e) {
4010
- e.detail.targetData.parent.el === e.detail.state.currentParent.el ? gt(e.detail, e.detail.state) : Qe(e.detail, e.detail.state);
4009
+ function Yo(e) {
4010
+ e.detail.targetData.parent.el === e.detail.state.currentParent.el ? gt(e.detail, e.detail.state) : Ke(e.detail, e.detail.state);
4011
4011
  }
4012
- function Go(e, n) {
4012
+ function Xo(e, n) {
4013
4013
  const t = e.targetData.parent.data.config;
4014
4014
  t.nativeDrag && (ue(e.e), ce = !0, t.handleEnd(n));
4015
4015
  }
4016
4016
  function Wo(e) {
4017
4017
  e.e.target !== e.e.currentTarget && h.pointerDown && (h.pointerDown.node.el.draggable = !1);
4018
4018
  }
4019
- function Ko(e) {
4019
+ function Qo(e) {
4020
4020
  e.e.target !== e.e.currentTarget && h.pointerDown && (h.pointerDown.node.el.draggable = !0);
4021
4021
  }
4022
- function Qo(e, n) {
4022
+ function Ko(e, n) {
4023
4023
  const t = e.targetData.parent.data.config;
4024
4024
  if (t.nativeDrag) {
4025
4025
  if (U(e.e), ue(e.e), ce) {
@@ -4036,10 +4036,10 @@ function Zo(e, n) {
4036
4036
  ce = !1;
4037
4037
  return;
4038
4038
  }
4039
- const t = (r = B.get(n.initialParent.el)) == null ? void 0 : r.config;
4039
+ const t = (r = j.get(n.initialParent.el)) == null ? void 0 : r.config;
4040
4040
  t != null && t.onDragend && t.onDragend({
4041
4041
  parent: n.currentParent,
4042
- values: Ne(n.currentParent.el, n.currentParent.data),
4042
+ values: Ee(n.currentParent.el, n.currentParent.data),
4043
4043
  draggedNode: n.draggedNode,
4044
4044
  draggedNodes: n.draggedNodes,
4045
4045
  state: n
@@ -4048,14 +4048,14 @@ function Zo(e, n) {
4048
4048
  function Jo(e) {
4049
4049
  var p, u, g, f, b;
4050
4050
  e.draggedNode && (e.draggedNode.el.draggable = !0);
4051
- const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = W(e), o = (p = B.get(e.initialParent.el)) == null ? void 0 : p.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, l = (u = t == null ? void 0 : t.config) == null ? void 0 : u.longPressClass, s = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (f = t == null ? void 0 : t.config) == null ? void 0 : f.dragPlaceholderClass, d = e.originalZIndex;
4052
- W(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), un(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), d !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = d), requestAnimationFrame(() => {
4053
- se(n, a), se(n, l), se(n, s);
4051
+ const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = W(e), o = (p = j.get(e.initialParent.el)) == null ? void 0 : p.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, l = (u = t == null ? void 0 : t.config) == null ? void 0 : u.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (f = t == null ? void 0 : t.config) == null ? void 0 : f.dragPlaceholderClass, s = e.originalZIndex;
4052
+ W(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), un(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), s !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = s), requestAnimationFrame(() => {
4053
+ de(n, a), de(n, l), de(n, d);
4054
4054
  }), be(e.draggedNodes, e.currentParent, e), ye(e.currentParent, void 0, e);
4055
4055
  const c = { ...e };
4056
4056
  (b = o == null ? void 0 : o.onDragend) == null || b.call(o, {
4057
4057
  parent: c.currentParent,
4058
- values: Ne(
4058
+ values: Ee(
4059
4059
  c.currentParent.el,
4060
4060
  c.currentParent.data
4061
4061
  ),
@@ -4067,7 +4067,7 @@ function Jo(e) {
4067
4067
  function ea(e, n) {
4068
4068
  ue(e.e), !n.pointerSelection && n.selectedState && be(n.selectedState.nodes, e.targetData.parent, n);
4069
4069
  const t = e.targetData.parent.data.config;
4070
- n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, se(
4070
+ n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, de(
4071
4071
  e.targetData.parent.data.enabledNodes.map((r) => r.el),
4072
4072
  t.longPressClass
4073
4073
  ), _(n) && t.handleEnd(n);
@@ -4075,7 +4075,7 @@ function ea(e, n) {
4075
4075
  function na(e, n, t, r, o, a) {
4076
4076
  var b, x;
4077
4077
  const l = n.data.config;
4078
- let s, d;
4078
+ let d, s;
4079
4079
  const c = [
4080
4080
  "display",
4081
4081
  "flexDirection",
@@ -4124,33 +4124,33 @@ function na(e, n, t, r, o, a) {
4124
4124
  });
4125
4125
  };
4126
4126
  if (l.synthDragImage)
4127
- d = l.synthDragImage(e, n, t, o), s = d.dragImage, s.setAttribute("popover", "manual"), u(s);
4127
+ s = l.synthDragImage(e, n, t, o), d = s.dragImage, d.setAttribute("popover", "manual"), u(d);
4128
4128
  else if (!l.multiDrag || o.length === 1)
4129
- s = e.el.cloneNode(!0), p(e.el, s), s.setAttribute("popover", "manual"), u(s);
4129
+ d = e.el.cloneNode(!0), p(e.el, d), d.setAttribute("popover", "manual"), u(d);
4130
4130
  else {
4131
4131
  const m = document.createElement("div");
4132
4132
  m.setAttribute("popover", "manual"), o.forEach((y) => {
4133
4133
  const D = y.el.cloneNode(!0);
4134
4134
  p(y.el, D), D.style.pointerEvents = "none", D.style.margin = "0", m.append(D);
4135
- }), m.style.display = "flex", m.style.flexDirection = "column", m.style.padding = "0", m.style.margin = "0", m.style.position = "absolute", m.style.zIndex = "9999", m.style.pointerEvents = "none", s = m;
4135
+ }), m.style.display = "flex", m.style.flexDirection = "column", m.style.padding = "0", m.style.margin = "0", m.style.position = "absolute", m.style.zIndex = "9999", m.style.pointerEvents = "none", d = m;
4136
4136
  }
4137
- s.id = "dnd-dragged-node-clone", n.el.appendChild(s), s.showPopover();
4137
+ d.id = "dnd-dragged-node-clone", n.el.appendChild(d), d.showPopover();
4138
4138
  const g = {
4139
4139
  clonedDraggedEls: [],
4140
- clonedDraggedNode: s,
4140
+ clonedDraggedNode: d,
4141
4141
  synthDragScrolling: !1,
4142
4142
  synthDragging: !0,
4143
4143
  rootScrollWidth: (b = document.scrollingElement) == null ? void 0 : b.scrollWidth,
4144
4144
  rootScrollHeight: (x = document.scrollingElement) == null ? void 0 : x.scrollHeight
4145
4145
  };
4146
4146
  return lt({
4147
- ...dt(
4147
+ ...st(
4148
4148
  e,
4149
4149
  n,
4150
4150
  t,
4151
4151
  o,
4152
- d == null ? void 0 : d.offsetX,
4153
- d == null ? void 0 : d.offsetY
4152
+ s == null ? void 0 : s.offsetX,
4153
+ s == null ? void 0 : s.offsetY
4154
4154
  ),
4155
4155
  ...g
4156
4156
  });
@@ -4166,8 +4166,8 @@ function un(e, n = !0, t = !0) {
4166
4166
  }
4167
4167
  function pt(e, n = !1) {
4168
4168
  var p;
4169
- const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, a = e.startTop ?? 0, l = window.scrollX ?? 0, s = window.scrollY ?? 0, d = t - o + l, c = r - a + s;
4170
- e.clonedDraggedNode.style.transform = `translate3d(${d}px, ${c}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", se(
4169
+ const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, a = e.startTop ?? 0, l = window.scrollX ?? 0, d = window.scrollY ?? 0, s = t - o + l, c = r - a + d;
4170
+ e.clonedDraggedNode.style.transform = `translate3d(${s}px, ${c}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", de(
4171
4171
  e.draggedNodes.map((u) => u.el),
4172
4172
  (p = e.initialParent.data.config) == null ? void 0 : p.longPressClass
4173
4173
  ));
@@ -4208,16 +4208,16 @@ function ra(e, n) {
4208
4208
  var a;
4209
4209
  if (!e.targetData.parent.data.config.nativeDrag) return;
4210
4210
  const { x: r, y: o } = ke(e.e);
4211
- n.coordinates.y = o, n.coordinates.x = r, U(e.e), ue(e.e), _(n) && Ze({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ? gt(e, n) : Qe(e, n);
4211
+ n.coordinates.y = o, n.coordinates.x = r, U(e.e), ue(e.e), _(n) && Ze({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ? gt(e, n) : Ke(e, n);
4212
4212
  }
4213
4213
  function oa(e, n) {
4214
4214
  if (!e.targetData.parent.data.config.nativeDrag) return;
4215
4215
  U(e.e), ue(e.e);
4216
4216
  const { x: r, y: o } = ke(e.e);
4217
- _(n) && Ze({ x: r, y: o }, e.e, n), Qe(e, n);
4217
+ _(n) && Ze({ x: r, y: o }, e.e, n), Ke(e, n);
4218
4218
  }
4219
4219
  function aa(e) {
4220
- e.detail.targetData.parent.el !== e.detail.state.currentParent.el && Qe(e.detail, e.detail.state);
4220
+ e.detail.targetData.parent.el !== e.detail.state.currentParent.el && Ke(e.detail, e.detail.state);
4221
4221
  }
4222
4222
  function ia({
4223
4223
  currentParent: e,
@@ -4240,10 +4240,10 @@ function ia({
4240
4240
  function la(e, n) {
4241
4241
  U(e.e);
4242
4242
  }
4243
- function da(e, n) {
4243
+ function sa(e, n) {
4244
4244
  U(e.e);
4245
4245
  }
4246
- function sa(e, n, t, r) {
4246
+ function da(e, n, t, r) {
4247
4247
  var p;
4248
4248
  if (n.affectedNodes.map((u) => u.data.value).includes(e.targetData.node.data.value))
4249
4249
  return !1;
@@ -4253,11 +4253,11 @@ function sa(e, n, t, r) {
4253
4253
  if (n.draggedNodes.map((u) => u.el).includes(e.targetData.node.el))
4254
4254
  return n.currentTargetValue = void 0, !1;
4255
4255
  if (e.targetData.node.data.value === n.currentTargetValue || e.targetData.parent.el !== ((p = n.currentParent) == null ? void 0 : p.el) || e.targetData.parent.data.config.sortable === !1 || e.targetData.node.el.contains(n.draggedNodes[0].el)) return !1;
4256
- const o = e.targetData.node.el.getBoundingClientRect(), a = n.draggedNode.el.getBoundingClientRect(), l = o.y - a.y, s = o.x - a.x;
4257
- let d;
4258
- Math.abs(l) > Math.abs(s) ? d = l > 0 ? "above" : "below" : d = s > 0 ? "left" : "right";
4256
+ const o = e.targetData.node.el.getBoundingClientRect(), a = n.draggedNode.el.getBoundingClientRect(), l = o.y - a.y, d = o.x - a.x;
4257
+ let s;
4258
+ Math.abs(l) > Math.abs(d) ? s = l > 0 ? "above" : "below" : s = d > 0 ? "left" : "right";
4259
4259
  const c = n.currentParent.data.config.threshold;
4260
- switch (d) {
4260
+ switch (s) {
4261
4261
  case "left":
4262
4262
  if (t > o.x + o.width * c.horizontal)
4263
4263
  return n.incomingDirection = "left", !0;
@@ -4279,7 +4279,7 @@ function sa(e, n, t, r) {
4279
4279
  }
4280
4280
  function gt(e, n) {
4281
4281
  const { x: t, y: r } = ke(e.e);
4282
- if (!sa(e, n, t, r))
4282
+ if (!da(e, n, t, r))
4283
4283
  return;
4284
4284
  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];
4285
4285
  n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
@@ -4290,11 +4290,11 @@ function gt(e, n) {
4290
4290
  targetNodes: [e.targetData.node]
4291
4291
  });
4292
4292
  }
4293
- function X(e) {
4293
+ function Y(e) {
4294
4294
  function n(t) {
4295
4295
  const r = ne.get(t);
4296
4296
  if (!r) return;
4297
- const o = B.get(t.parentNode);
4297
+ const o = j.get(t.parentNode);
4298
4298
  if (o)
4299
4299
  return {
4300
4300
  node: {
@@ -4319,7 +4319,7 @@ function X(e) {
4319
4319
  );
4320
4320
  };
4321
4321
  }
4322
- function Qe(e, n) {
4322
+ function Ke(e, n) {
4323
4323
  U(e.e), ia({
4324
4324
  currentParent: n.currentParent,
4325
4325
  targetParent: e.targetData.parent,
@@ -4336,9 +4336,9 @@ function Qe(e, n) {
4336
4336
  targetNodes: "node" in e.targetData ? [e.targetData.node] : []
4337
4337
  }), n.currentParent = e.targetData.parent, n.transferred = !0);
4338
4338
  }
4339
- function Be(e) {
4339
+ function je(e) {
4340
4340
  function n(t) {
4341
- const r = B.get(t);
4341
+ const r = j.get(t);
4342
4342
  if (r)
4343
4343
  return {
4344
4344
  parent: {
@@ -4385,7 +4385,7 @@ function ca(e, n, t, r = !1) {
4385
4385
  ) : e.classList.add(l);
4386
4386
  return t.privateClasses = a, t;
4387
4387
  }
4388
- function se(e, n) {
4388
+ function de(e, n) {
4389
4389
  if (!n) return;
4390
4390
  const t = at(n);
4391
4391
  if (t.length)
@@ -4394,16 +4394,16 @@ function se(e, n) {
4394
4394
  r.classList.remove(...t);
4395
4395
  continue;
4396
4396
  }
4397
- const o = ne.get(r) || B.get(r);
4397
+ const o = ne.get(r) || j.get(r);
4398
4398
  if (o)
4399
4399
  for (const a of t)
4400
4400
  o.privateClasses.includes(a) || r.classList.remove(a);
4401
4401
  }
4402
4402
  }
4403
4403
  function Fn(e, n, t, r, o) {
4404
- const l = o.axis === "x", s = e === document.scrollingElement, d = l ? "scrollLeft" : "scrollTop", c = l ? "clientWidth" : "clientHeight", p = l ? "offsetWidth" : "offsetHeight", u = l ? "scrollWidth" : "scrollHeight", g = l ? n.clientX : n.clientY, f = l ? r.left : r.top, b = l ? t.overflowX : t.overflowY;
4405
- if (s) {
4406
- const x = e[d], m = e[c], y = x > 0, D = x + m < (l ? o.state.rootScrollWidth || 0 : e[u]);
4404
+ const l = o.axis === "x", d = e === document.scrollingElement, s = l ? "scrollLeft" : "scrollTop", c = l ? "clientWidth" : "clientHeight", p = l ? "offsetWidth" : "offsetHeight", u = l ? "scrollWidth" : "scrollHeight", g = l ? n.clientX : n.clientY, f = l ? r.left : r.top, b = l ? t.overflowX : t.overflowY;
4405
+ if (d) {
4406
+ const x = e[s], m = e[c], y = x > 0, D = x + m < (l ? o.state.rootScrollWidth || 0 : e[u]);
4407
4407
  return l ? {
4408
4408
  left: y && g < m * 0.075,
4409
4409
  right: D && g > m * (1 - 0.075)
@@ -4413,7 +4413,7 @@ function Fn(e, n, t, r, o) {
4413
4413
  };
4414
4414
  }
4415
4415
  if ((b === "auto" || b === "scroll") && e !== document.body && e !== document.documentElement) {
4416
- const x = e[u], m = e[p], y = e[d], D = y > 0, C = y < x - m;
4416
+ const x = e[u], m = e[p], y = e[s], D = y > 0, C = y < x - m;
4417
4417
  return l ? {
4418
4418
  left: D && g < f + m * 0.075,
4419
4419
  right: C && g > f + m * (1 - 0.075)
@@ -4428,23 +4428,23 @@ function ua(e, n, t, r) {
4428
4428
  if (!_(t) || !t.draggedNode)
4429
4429
  return;
4430
4430
  t.preventEnter = !0;
4431
- const o = r.axis === "x", a = r.direction === "positive" ? 1 : -1, l = 20, s = o ? "lastScrollDirectionX" : "lastScrollDirectionY", d = o ? "frameIdX" : "frameIdY";
4432
- t[d] !== void 0 && (cancelAnimationFrame(t[d]), t[d] = void 0), t[s] = r.direction;
4431
+ const o = r.axis === "x", a = r.direction === "positive" ? 1 : -1, l = 20, d = o ? "lastScrollDirectionX" : "lastScrollDirectionY", s = o ? "frameIdX" : "frameIdY";
4432
+ t[s] !== void 0 && (cancelAnimationFrame(t[s]), t[s] = void 0), t[d] = r.direction;
4433
4433
  const c = () => {
4434
4434
  if (!_(t) || !t.draggedNode) {
4435
- t[d] !== void 0 && (cancelAnimationFrame(t[d]), t[d] = void 0);
4435
+ t[s] !== void 0 && (cancelAnimationFrame(t[s]), t[s] = void 0);
4436
4436
  return;
4437
4437
  }
4438
4438
  const p = o ? "scrollLeft" : "scrollTop", u = o ? "clientWidth" : "clientHeight", g = o ? "scrollWidth" : "scrollHeight", f = e[p], b = e[u], x = e[g];
4439
4439
  if (!(a > 0 ? f + b < x : f > 0)) {
4440
- t[d] = void 0, t[s] = void 0;
4440
+ t[s] = void 0, t[d] = void 0;
4441
4441
  return;
4442
4442
  }
4443
- e[p] += l * a, W(t) && pt(t), t[d] = requestAnimationFrame(c);
4443
+ e[p] += l * a, W(t) && pt(t), t[s] = requestAnimationFrame(c);
4444
4444
  };
4445
- t[d] = requestAnimationFrame(c);
4445
+ t[s] = requestAnimationFrame(c);
4446
4446
  }
4447
- function Pn(e, n, t) {
4447
+ function Ln(e, n, t) {
4448
4448
  const r = e.getBoundingClientRect();
4449
4449
  return n >= r.left && n <= r.right && t >= r.top && t <= r.bottom;
4450
4450
  }
@@ -4454,23 +4454,23 @@ function Ze(e, n, t) {
4454
4454
  un(t);
4455
4455
  const { x: r, y: o } = e;
4456
4456
  let a = !1;
4457
- const l = (d, c, p) => {
4458
- ua(p, n, t, { axis: d, direction: c }), a = !0;
4459
- }, s = (d) => {
4460
- const c = window.getComputedStyle(d), p = d.getBoundingClientRect(), u = Fn(d, n, c, p, {
4457
+ const l = (s, c, p) => {
4458
+ ua(p, n, t, { axis: s, direction: c }), a = !0;
4459
+ }, d = (s) => {
4460
+ const c = window.getComputedStyle(s), p = s.getBoundingClientRect(), u = Fn(s, n, c, p, {
4461
4461
  axis: "x",
4462
4462
  state: t
4463
- }), g = Fn(d, n, c, p, { axis: "y" });
4464
- (u.left || u.right) && (t.lastScrollContainerX = d, l("x", u.right ? "positive" : "negative", d)), (g.up || g.down) && (t.lastScrollContainerY = d, l("y", g.down ? "positive" : "negative", d));
4463
+ }), g = Fn(s, n, c, p, { axis: "y" });
4464
+ (u.left || u.right) && (t.lastScrollContainerX = s, l("x", u.right ? "positive" : "negative", s)), (g.up || g.down) && (t.lastScrollContainerY = s, l("y", g.down ? "positive" : "negative", s));
4465
4465
  };
4466
- if (t.lastScrollContainerX && Pn(t.lastScrollContainerX, r, o) && s(t.lastScrollContainerX), !a && t.lastScrollContainerY && Pn(t.lastScrollContainerY, r, o) && s(t.lastScrollContainerY), !a) {
4467
- let d = document.elementFromPoint(r, o);
4468
- for (; d && !(a && t.lastScrollContainerX && t.lastScrollContainerY); )
4469
- d instanceof HTMLElement && s(d), d = d.parentElement;
4466
+ if (t.lastScrollContainerX && Ln(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !a && t.lastScrollContainerY && Ln(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !a) {
4467
+ let s = document.elementFromPoint(r, o);
4468
+ for (; s && !(a && t.lastScrollContainerX && t.lastScrollContainerY); )
4469
+ s instanceof HTMLElement && d(s), s = s.parentElement;
4470
4470
  }
4471
4471
  if (!a) {
4472
- const d = document.scrollingElement;
4473
- d instanceof HTMLElement && s(d);
4472
+ const s = document.scrollingElement;
4473
+ s instanceof HTMLElement && d(s);
4474
4474
  }
4475
4475
  a || un(t);
4476
4476
  }
@@ -4479,14 +4479,14 @@ function pa(e) {
4479
4479
  if (!Je(n)) return;
4480
4480
  let t, r = !0;
4481
4481
  for (; n && r; ) {
4482
- if (ne.has(n) || B.has(n)) {
4483
- r = !1, t = B.has(n);
4482
+ if (ne.has(n) || j.has(n)) {
4483
+ r = !1, t = j.has(n);
4484
4484
  break;
4485
4485
  }
4486
4486
  n = n.parentNode;
4487
4487
  }
4488
4488
  if (t) {
4489
- const o = B.get(n);
4489
+ const o = j.get(n);
4490
4490
  return o ? {
4491
4491
  parent: {
4492
4492
  el: n,
@@ -4496,7 +4496,7 @@ function pa(e) {
4496
4496
  } else {
4497
4497
  const o = ne.get(n);
4498
4498
  if (!o) return;
4499
- const a = B.get(n.parentNode);
4499
+ const a = j.get(n.parentNode);
4500
4500
  return a ? {
4501
4501
  node: {
4502
4502
  el: n,
@@ -4512,7 +4512,7 @@ function pa(e) {
4512
4512
  function Je(e) {
4513
4513
  return e instanceof HTMLElement && e.parentNode instanceof HTMLElement;
4514
4514
  }
4515
- function Ye(e, n) {
4515
+ function Ge(e, n) {
4516
4516
  const t = new AbortController();
4517
4517
  for (const r in n) {
4518
4518
  const o = n[r];
@@ -4534,21 +4534,21 @@ function fa(e, n) {
4534
4534
  const t = ga(e);
4535
4535
  t && n(t);
4536
4536
  }
4537
- var Xe = /* @__PURE__ */ new WeakMap();
4537
+ var Ye = /* @__PURE__ */ new WeakMap();
4538
4538
  function ha(e) {
4539
- const n = Xe.get(e);
4539
+ const n = Ye.get(e);
4540
4540
  return n ? n[0] : (console.warn("No values found for parent element"), []);
4541
4541
  }
4542
4542
  function ma(e, n) {
4543
- const t = Xe.get(n);
4544
- t && t[1](e), Xe.set(n, [e, t[1]]);
4543
+ const t = Ye.get(n);
4544
+ t && t[1](e), Ye.set(n, [e, t[1]]);
4545
4545
  }
4546
4546
  function ba(e, n) {
4547
4547
  return (t) => {
4548
- Xe.set(t, n), Eo({ parent: t, getValues: ha, setValues: ma, config: e });
4548
+ Ye.set(t, n), No({ parent: t, getValues: ha, setValues: ma, config: e });
4549
4549
  };
4550
4550
  }
4551
- function Ln(e) {
4551
+ function Pn(e) {
4552
4552
  wn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
4553
4553
  const { parent: t, state: r, ...o } = n;
4554
4554
  fa(t, ba(o, r));
@@ -4557,12 +4557,12 @@ function Ln(e) {
4557
4557
  function va(e, n = {}) {
4558
4558
  const t = Ce(null), [r, o] = M(e);
4559
4559
  function a(l = {}) {
4560
- Ln({ parent: t, state: [r, o], ...l });
4560
+ Pn({ parent: t, state: [r, o], ...l });
4561
4561
  }
4562
4562
  return ve(() => {
4563
- Ln({ parent: t, state: [r, o], ...n });
4563
+ Pn({ parent: t, state: [r, o], ...n });
4564
4564
  }, [r]), ve(() => () => {
4565
- t.current && st(t.current);
4565
+ t.current && dt(t.current);
4566
4566
  }, []), [t, r, o, a];
4567
4567
  }
4568
4568
  const On = {
@@ -4599,8 +4599,8 @@ const On = {
4599
4599
  legend: o,
4600
4600
  initialItems: a,
4601
4601
  highlightFirst: l,
4602
- onMove: s
4603
- } = e, [d, c] = va(
4602
+ onMove: d
4603
+ } = e, [s, c] = va(
4604
4604
  a,
4605
4605
  { group: r }
4606
4606
  ), [p, u] = H.useState(
@@ -4618,8 +4618,8 @@ const On = {
4618
4618
  new CustomEvent(on, { detail: y })
4619
4619
  );
4620
4620
  }, []), b = (y) => {
4621
- var N;
4622
- const D = y.target, C = (N = D == null ? void 0 : D.closest) == null ? void 0 : N.call(D, "li.dnd-item"), k = (C == null ? void 0 : C.getAttribute("data-label")) || null;
4621
+ var E;
4622
+ const D = y.target, C = (E = D == null ? void 0 : D.closest) == null ? void 0 : E.call(D, "li.dnd-item"), k = (C == null ? void 0 : C.getAttribute("data-label")) || null;
4623
4623
  k && (u(k), f(k));
4624
4624
  }, x = H.useCallback(() => {
4625
4625
  u(null), f(null);
@@ -4635,14 +4635,14 @@ const On = {
4635
4635
  const D = new Set(y), C = c.find((k) => !D.has(k)) || null;
4636
4636
  if (C) {
4637
4637
  const k = t === "left" ? "right" : "left";
4638
- s == null || s({ item: C, from: k, to: t });
4638
+ d == null || d({ item: C, from: k, to: t });
4639
4639
  }
4640
4640
  }
4641
4641
  g.current = c;
4642
- }, [c, t, s]);
4642
+ }, [c, t, d]);
4643
4643
  const m = c.length === 0;
4644
4644
  return /* @__PURE__ */ i(
4645
- Pe,
4645
+ Le,
4646
4646
  {
4647
4647
  legend: o,
4648
4648
  width: "100%",
@@ -4651,13 +4651,13 @@ const On = {
4651
4651
  children: /* @__PURE__ */ i(
4652
4652
  ya,
4653
4653
  {
4654
- ref: d,
4654
+ ref: s,
4655
4655
  onPointerDownCapture: b,
4656
4656
  onPointerUpCapture: x,
4657
4657
  onPointerCancelCapture: x,
4658
4658
  $isEmpty: m,
4659
4659
  children: m ? /* @__PURE__ */ i(
4660
- K,
4660
+ Q,
4661
4661
  {
4662
4662
  background: !0,
4663
4663
  borderRadius: "8px",
@@ -4675,7 +4675,7 @@ const On = {
4675
4675
  "data-label": y,
4676
4676
  "data-first": !!(l && D === 0) || void 0,
4677
4677
  $active: C,
4678
- children: /* @__PURE__ */ i(K, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
4678
+ children: /* @__PURE__ */ i(Q, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
4679
4679
  I,
4680
4680
  {
4681
4681
  type: "title",
@@ -4694,7 +4694,7 @@ const On = {
4694
4694
  )
4695
4695
  }
4696
4696
  );
4697
- }, pi = (e) => {
4697
+ }, xi = (e) => {
4698
4698
  const { group: n = "clients", left: t, right: r, onMove: o } = e, a = (l) => {
4699
4699
  o == null || o(l);
4700
4700
  };
@@ -4751,7 +4751,7 @@ const On = {
4751
4751
  }
4752
4752
  }
4753
4753
  }
4754
- `, gi = (e) => /* @__PURE__ */ i(wa, { children: /* @__PURE__ */ i(j, { ...e }) }), Da = T.div`
4754
+ `, wi = (e) => /* @__PURE__ */ i(wa, { children: /* @__PURE__ */ i(B, { ...e }) }), Da = T.div`
4755
4755
  display: flex;
4756
4756
  justify-content: space-between;
4757
4757
  align-items: center;
@@ -4780,11 +4780,11 @@ const On = {
4780
4780
  }
4781
4781
  }
4782
4782
  }
4783
- `, fi = (e) => {
4783
+ `, Di = (e) => {
4784
4784
  const { handleBack: n, handleNext: t, textValues: r } = e;
4785
4785
  return /* @__PURE__ */ v(Da, { children: [
4786
4786
  /* @__PURE__ */ i(
4787
- j,
4787
+ B,
4788
4788
  {
4789
4789
  ...e,
4790
4790
  iconBefore: /* @__PURE__ */ i(wt, {}),
@@ -4794,7 +4794,7 @@ const On = {
4794
4794
  }
4795
4795
  ),
4796
4796
  /* @__PURE__ */ i(
4797
- j,
4797
+ B,
4798
4798
  {
4799
4799
  ...e,
4800
4800
  iconBefore: /* @__PURE__ */ i(Dt, {}),
@@ -4898,15 +4898,15 @@ const On = {
4898
4898
  try {
4899
4899
  if (l.target.closest('input[type="checkbox"]'))
4900
4900
  return;
4901
- const d = r == null ? void 0 : r.find(
4901
+ const s = r == null ? void 0 : r.find(
4902
4902
  (c) => {
4903
4903
  var p;
4904
4904
  return c.id === l.target.id || c.id === ((p = l.target.parentElement) == null ? void 0 : p.id);
4905
4905
  }
4906
4906
  );
4907
- d && t && t(d.value);
4908
- } catch (s) {
4909
- console.error(`Error trying to process onOptionClick. ${s}`);
4907
+ s && t && t(s.value);
4908
+ } catch (d) {
4909
+ console.error(`Error trying to process onOptionClick. ${d}`);
4910
4910
  }
4911
4911
  };
4912
4912
  return /* @__PURE__ */ i(
@@ -4922,13 +4922,13 @@ const On = {
4922
4922
  cursor: ${({ $disabled: e }) => e && "not-allowed"};
4923
4923
  width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
4924
4924
  position: relative;
4925
- `, Na = T.div`
4925
+ `, Ea = T.div`
4926
4926
  display: flex;
4927
4927
  align-items: center;
4928
4928
  margin-bottom: 4px;
4929
4929
  gap: 4px;
4930
4930
  pointer-events: ${({ $disabled: e }) => e && "none"};
4931
- `, Ea = T.div`
4931
+ `, Na = T.div`
4932
4932
  display: grid;
4933
4933
  height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
4934
4934
  padding: 0px 16px;
@@ -4941,8 +4941,8 @@ const On = {
4941
4941
  grid-template-columns: 1fr auto;
4942
4942
  cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
4943
4943
  background-color: ${({ $disabled: e, theme: n }) => {
4944
- var t, r, o, a, l, s;
4945
- 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) || ee.background.color.disabled : ((s = (l = (a = n == null ? void 0 : n.input) == null ? void 0 : a.background) == null ? void 0 : l.color) == null ? void 0 : s.regular) || ee.background.color.regular;
4944
+ var t, r, o, a, l, d;
4945
+ 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) || ee.background.color.disabled : ((d = (l = (a = n == null ? void 0 : n.input) == null ? void 0 : a.background) == null ? void 0 : l.color) == null ? void 0 : d.regular) || ee.background.color.regular;
4946
4946
  }};
4947
4947
 
4948
4948
  border: 1px solid
@@ -4982,8 +4982,8 @@ const On = {
4982
4982
  return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.weight) || "400";
4983
4983
  }};
4984
4984
  color: ${({ $disabled: e, theme: n }) => {
4985
- var t, r, o, a, l, s;
4986
- 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) || ee.content.color.disabled : ((s = (l = (a = n == null ? void 0 : n.input) == null ? void 0 : a.content) == null ? void 0 : l.color) == null ? void 0 : s.regular) || ee.content.color.regular;
4985
+ var t, r, o, a, l, d;
4986
+ 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) || ee.content.color.disabled : ((d = (l = (a = n == null ? void 0 : n.input) == null ? void 0 : a.content) == null ? void 0 : l.color) == null ? void 0 : d.regular) || ee.content.color.regular;
4987
4987
  }};
4988
4988
 
4989
4989
  ::placeholder {
@@ -5015,12 +5015,12 @@ const On = {
5015
5015
  transition: ease;
5016
5016
  transition-duration: 500ms;
5017
5017
  transform: ${({ $displayList: e }) => e ? "rotate(-90deg)" : "rotate(90deg)"};
5018
- `, Ia = (e) => e === "compact" ? "medium" : "large";
5018
+ `, Aa = (e) => e === "compact" ? "medium" : "large";
5019
5019
  function zn(e, n) {
5020
5020
  const t = e.find((r) => r.value === n);
5021
5021
  return t ? t.label : n;
5022
5022
  }
5023
- const Aa = (e) => {
5023
+ const Ia = (e) => {
5024
5024
  var o, a;
5025
5025
  const { message: n } = e, t = vn(mn), r = ((a = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : a.appearance) || ee.message.appearance;
5026
5026
  return /* @__PURE__ */ v(w, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
@@ -5044,15 +5044,15 @@ const Aa = (e) => {
5044
5044
  )
5045
5045
  ] });
5046
5046
  }, Ra = Rt((e, n) => {
5047
- var ae, Ae;
5047
+ var ae, Ie;
5048
5048
  const {
5049
5049
  displayList: t,
5050
5050
  disabled: r,
5051
5051
  focused: o,
5052
5052
  fullwidth: a,
5053
5053
  id: l,
5054
- invalid: s,
5055
- label: d,
5054
+ invalid: d,
5055
+ label: s,
5056
5056
  maxItems: c,
5057
5057
  message: p,
5058
5058
  name: u,
@@ -5065,41 +5065,41 @@ const Aa = (e) => {
5065
5065
  showChevron: D,
5066
5066
  checkedItems: C,
5067
5067
  editable: k = !1,
5068
- clearable: N,
5068
+ clearable: E,
5069
5069
  onKeyUp: R,
5070
- onBlur: P,
5070
+ onBlur: L,
5071
5071
  onChange: $,
5072
5072
  onClick: z,
5073
5073
  onFocus: oe,
5074
5074
  onOptionClick: xe,
5075
5075
  onCheckboxChange: we,
5076
5076
  handleClear: pe
5077
- } = e, J = vn(mn), $e = ((Ae = (ae = J == null ? void 0 : J.input) == null ? void 0 : ae.required) == null ? void 0 : Ae.appearance) || ee.required.appearance, De = b && !r, ge = y || m === "" ? "" : zn(g, m), fe = Yn(
5078
- () => g.filter((L) => C.includes(L.id)),
5077
+ } = e, J = vn(mn), $e = ((Ie = (ae = J == null ? void 0 : J.input) == null ? void 0 : ae.required) == null ? void 0 : Ie.appearance) || ee.required.appearance, De = b && !r, ge = y || m === "" ? "" : zn(g, m), fe = Gn(
5078
+ () => g.filter((P) => C.includes(P.id)),
5079
5079
  [g, C]
5080
- ), Ie = (L, F) => {
5081
- L.stopPropagation(), we({
5080
+ ), Ae = (P, F) => {
5081
+ P.stopPropagation(), we({
5082
5082
  target: { checked: !1, value: F }
5083
5083
  });
5084
5084
  };
5085
5085
  return /* @__PURE__ */ v(Sa, { $fullwidth: a, $disabled: r, ref: n, children: [
5086
- d && /* @__PURE__ */ v(
5087
- Na,
5086
+ s && /* @__PURE__ */ v(
5087
+ Ea,
5088
5088
  {
5089
5089
  $alignItems: "center",
5090
5090
  $disabled: r,
5091
5091
  $wrap: "wrap",
5092
5092
  children: [
5093
5093
  /* @__PURE__ */ i(
5094
- It,
5094
+ At,
5095
5095
  {
5096
5096
  htmlFor: l,
5097
5097
  focused: o,
5098
- invalid: s,
5098
+ invalid: d,
5099
5099
  margin: "0px 0px 0px 16px",
5100
- size: Ia(x),
5100
+ size: Aa(x),
5101
5101
  disabled: r,
5102
- children: d
5102
+ children: s
5103
5103
  }
5104
5104
  ),
5105
5105
  De && /* @__PURE__ */ i(I, { appearance: $e, size: "small", type: "body", children: "(Requerido)" })
@@ -5107,11 +5107,11 @@ const Aa = (e) => {
5107
5107
  }
5108
5108
  ),
5109
5109
  /* @__PURE__ */ v(
5110
- Ea,
5110
+ Na,
5111
5111
  {
5112
5112
  $disabled: r,
5113
5113
  $focused: o,
5114
- $invalid: s,
5114
+ $invalid: d,
5115
5115
  onClick: k ? void 0 : z,
5116
5116
  $value: m,
5117
5117
  $size: x,
@@ -5132,23 +5132,23 @@ const Aa = (e) => {
5132
5132
  $focused: o,
5133
5133
  readOnly: !k,
5134
5134
  onFocus: oe,
5135
- onBlur: P,
5136
- onChange: (L) => $(u, L.target.value),
5135
+ onBlur: L,
5136
+ onChange: (P) => $(u, P.target.value),
5137
5137
  onClick: k ? z : void 0,
5138
5138
  onKeyUp: R
5139
5139
  }
5140
5140
  ),
5141
5141
  /* @__PURE__ */ v(w, { direction: "row", gap: "8px", alignItems: "center", children: [
5142
- N && !r && (y ? fe.map((L) => /* @__PURE__ */ i(
5142
+ E && !r && (y ? fe.map((P) => /* @__PURE__ */ i(
5143
5143
  me,
5144
5144
  {
5145
5145
  appearance: "gray",
5146
- label: L.label,
5146
+ label: P.label,
5147
5147
  removable: !0,
5148
5148
  displayIcon: !1,
5149
- onClose: (F) => Ie(F, L.id)
5149
+ onClose: (F) => Ae(F, P.id)
5150
5150
  },
5151
- L.id
5151
+ P.id
5152
5152
  )) : (m ?? "") !== "" && /* @__PURE__ */ i(
5153
5153
  me,
5154
5154
  {
@@ -5156,8 +5156,8 @@ const Aa = (e) => {
5156
5156
  label: zn(g, m),
5157
5157
  removable: !0,
5158
5158
  displayIcon: !1,
5159
- onClose: (L) => {
5160
- L.stopPropagation(), pe();
5159
+ onClose: (P) => {
5160
+ P.stopPropagation(), pe();
5161
5161
  }
5162
5162
  }
5163
5163
  )),
@@ -5174,23 +5174,23 @@ const Aa = (e) => {
5174
5174
  ]
5175
5175
  }
5176
5176
  ),
5177
- s && /* @__PURE__ */ i(Aa, { message: p }),
5177
+ d && /* @__PURE__ */ i(Ia, { message: p }),
5178
5178
  t && !r && /* @__PURE__ */ i(
5179
5179
  Ta,
5180
5180
  {
5181
5181
  maxItems: c,
5182
5182
  onOptionClick: xe,
5183
5183
  options: g,
5184
- children: g.map((L) => /* @__PURE__ */ i(
5185
- At,
5184
+ children: g.map((P) => /* @__PURE__ */ i(
5185
+ It,
5186
5186
  {
5187
- id: L.id,
5188
- label: L.label,
5189
- checked: C.includes(L.id),
5187
+ id: P.id,
5188
+ label: P.label,
5189
+ checked: C.includes(P.id),
5190
5190
  onCheckboxChange: we,
5191
5191
  picker: y
5192
5192
  },
5193
- L.id
5193
+ P.id
5194
5194
  ))
5195
5195
  }
5196
5196
  )
@@ -5203,8 +5203,8 @@ const Aa = (e) => {
5203
5203
  invalid: o = !1,
5204
5204
  label: a,
5205
5205
  maxItems: l = 5,
5206
- message: s,
5207
- name: d,
5206
+ message: d,
5207
+ name: s,
5208
5208
  onBlur: c,
5209
5209
  onChange: p,
5210
5210
  onClick: u,
@@ -5217,9 +5217,9 @@ const Aa = (e) => {
5217
5217
  value: D,
5218
5218
  showOptions: C = !1,
5219
5219
  picker: k = !1,
5220
- showChevron: N = !0,
5220
+ showChevron: E = !0,
5221
5221
  editable: R = !1,
5222
- clearable: P = !0
5222
+ clearable: L = !0
5223
5223
  } = e, [$, z] = M(!1), [oe, xe] = M(!1), [we, pe] = M([]), J = Ce(null);
5224
5224
  ve(() => {
5225
5225
  if (k) {
@@ -5228,7 +5228,7 @@ const Aa = (e) => {
5228
5228
  }
5229
5229
  }, [D, k]);
5230
5230
  function $e() {
5231
- p(d, ""), pe([]), z(!1);
5231
+ p(s, ""), pe([]), z(!1);
5232
5232
  }
5233
5233
  function De(F) {
5234
5234
  if (!n) {
@@ -5250,10 +5250,10 @@ const Aa = (e) => {
5250
5250
  console.error(`Error executing focus/blur callback. ${q}`);
5251
5251
  }
5252
5252
  }
5253
- function Ie(F) {
5253
+ function Ae(F) {
5254
5254
  z(!1);
5255
5255
  try {
5256
- p && p(d, F);
5256
+ p && p(s, F);
5257
5257
  } catch (q) {
5258
5258
  console.error(`Error when changing value using callback. ${q}`);
5259
5259
  }
@@ -5266,17 +5266,17 @@ const Aa = (e) => {
5266
5266
  console.error(`Error when clicking over select. ${q}`);
5267
5267
  }
5268
5268
  }
5269
- function Ae(F) {
5269
+ function Ie(F) {
5270
5270
  const { value: q, checked: ze } = F.target;
5271
- pe((E) => {
5272
- const V = ze ? [...E, q] : E.filter((Q) => Q !== q);
5273
- return p(d, V.join(",")), V;
5271
+ pe((N) => {
5272
+ const V = ze ? [...N, q] : N.filter((K) => K !== q);
5273
+ return p(s, V.join(",")), V;
5274
5274
  });
5275
5275
  }
5276
5276
  ve(() => (document.addEventListener("click", ge), () => {
5277
5277
  document.removeEventListener("click", ge);
5278
5278
  }), [ge]);
5279
- const L = Yn(() => P || k ? b : [{ id: "empty-option", label: "", value: "" }, ...b], [b, P, k]);
5279
+ const P = Gn(() => L || k ? b : [{ id: "empty-option", label: "", value: "" }, ...b], [b, L, k]);
5280
5280
  return /* @__PURE__ */ i(
5281
5281
  Ra,
5282
5282
  {
@@ -5289,29 +5289,29 @@ const Aa = (e) => {
5289
5289
  invalid: o,
5290
5290
  label: a,
5291
5291
  maxItems: l,
5292
- message: s,
5293
- name: d,
5294
- options: L,
5292
+ message: d,
5293
+ name: s,
5294
+ options: P,
5295
5295
  placeholder: x,
5296
5296
  required: m,
5297
5297
  size: y,
5298
5298
  value: D,
5299
5299
  picker: k,
5300
- showChevron: N,
5300
+ showChevron: E,
5301
5301
  checkedItems: we,
5302
5302
  editable: R,
5303
- clearable: P,
5303
+ clearable: L,
5304
5304
  handleClear: $e,
5305
5305
  onBlur: fe,
5306
5306
  onChange: p,
5307
5307
  onClick: De,
5308
5308
  onFocus: fe,
5309
- onOptionClick: Ie,
5309
+ onOptionClick: Ae,
5310
5310
  onKeyUp: ae,
5311
- onCheckboxChange: Ae
5311
+ onCheckboxChange: Ie
5312
5312
  }
5313
5313
  );
5314
- }, hi = (e) => {
5314
+ }, Ci = (e) => {
5315
5315
  const {
5316
5316
  disabled: n = !1,
5317
5317
  fullwidth: t = !1,
@@ -5319,8 +5319,8 @@ const Aa = (e) => {
5319
5319
  invalid: o = !1,
5320
5320
  label: a,
5321
5321
  maxItems: l = 5,
5322
- message: s,
5323
- name: d,
5322
+ message: d,
5323
+ name: s,
5324
5324
  onChange: c,
5325
5325
  options: p,
5326
5326
  placeholder: u,
@@ -5337,8 +5337,8 @@ const Aa = (e) => {
5337
5337
  invalid: o,
5338
5338
  label: a,
5339
5339
  maxItems: l,
5340
- message: s,
5341
- name: d,
5340
+ message: d,
5341
+ name: s,
5342
5342
  onChange: c,
5343
5343
  options: p,
5344
5344
  placeholder: u,
@@ -5348,16 +5348,73 @@ const Aa = (e) => {
5348
5348
  picker: !0
5349
5349
  }
5350
5350
  );
5351
- }, Fe = /* @__PURE__ */ new Map(), Pa = (e, n) => Fe.get(`${n}:${e}`), La = (e, n, t) => {
5351
+ }, Ti = (e) => {
5352
+ const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Oa(n), a = Pa(o), l = r ? "Que" : "Y que", d = a ? o : `${Ma(o)} ${o}`, s = ja(t);
5353
+ return `${l} ${d} ${s}`;
5354
+ }, La = /^(el|la|los|las)\s/i;
5355
+ function Pa(e) {
5356
+ return La.test(e);
5357
+ }
5358
+ function Oa(e) {
5359
+ return e.replace(/\s+/g, " ").trim();
5360
+ }
5361
+ function Ma(e) {
5362
+ const n = za(e).toLowerCase(), t = /\b(s|es)\b/.test(Va(e).toLowerCase()) && !n.endsWith("és");
5363
+ return ({
5364
+ mano: "f",
5365
+ día: "m",
5366
+ mapa: "m",
5367
+ sofá: "m",
5368
+ idioma: "m",
5369
+ tema: "m",
5370
+ clima: "m",
5371
+ antigüedad: "f",
5372
+ antiguedad: "f",
5373
+ puntaje: "m"
5374
+ }[n] ?? Ha(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
5375
+ }
5376
+ function za(e) {
5377
+ return (e.toLowerCase().split(
5378
+ /\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
5379
+ )[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
5380
+ }
5381
+ function Va(e) {
5382
+ const n = e.trim().split(/\s+/);
5383
+ return n[n.length - 1] || "";
5384
+ }
5385
+ function Ha(e) {
5386
+ 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";
5387
+ }
5388
+ function ja(e) {
5389
+ switch (e) {
5390
+ case A.EQUAL:
5391
+ case A.GREATER_THAN:
5392
+ case A.LESS_THAN:
5393
+ return "sea";
5394
+ case A.RANGE:
5395
+ return "esté entre";
5396
+ case A.LIST_OF_VALUES:
5397
+ case A.LIST_OF_VALUES_MULTI:
5398
+ return "esté en";
5399
+ default:
5400
+ return "sea";
5401
+ }
5402
+ }
5403
+ const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
5404
+ Object.entries(e).map(([t, r]) => [
5405
+ t,
5406
+ r.map((o, a, l) => n(o, a, l, t))
5407
+ ])
5408
+ ), Fe = /* @__PURE__ */ new Map(), Ba = (e, n) => Fe.get(`${n}:${e}`), Ua = (e, n, t) => {
5352
5409
  const r = `${n}:${e}`;
5353
5410
  if (Fe.set(r, t), Fe.size > 1e3) {
5354
5411
  const o = Fe.keys().next().value;
5355
5412
  o !== void 0 && Fe.delete(o);
5356
5413
  }
5357
- }, Vn = /* @__PURE__ */ new Map(), Oa = 1e3, Ma = (e) => {
5414
+ }, Vn = /* @__PURE__ */ new Map(), _a = 1e3, qa = (e) => {
5358
5415
  const n = Date.now(), t = Vn.get(e) || 0;
5359
- return n - t < Oa ? !0 : (Vn.set(e, n), !1);
5360
- }, za = (e) => {
5416
+ return n - t < _a ? !0 : (Vn.set(e, n), !1);
5417
+ }, Ga = (e) => {
5361
5418
  const n = Ot(e);
5362
5419
  return {
5363
5420
  spa: "es",
@@ -5367,14 +5424,14 @@ const Aa = (e) => {
5367
5424
  ita: "it",
5368
5425
  por: "pt"
5369
5426
  }[n] || "en";
5370
- }, Va = async (e, n, { url: t, apiKey: r }) => {
5371
- const o = `${n}:${e}`, a = Pa(e, n);
5427
+ }, Ya = async (e, n, { url: t, apiKey: r }) => {
5428
+ const o = `${n}:${e}`, a = Ba(e, n);
5372
5429
  if (a) return a;
5373
- if (Ma(o))
5430
+ if (qa(o))
5374
5431
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
5375
- const l = za(e);
5432
+ const l = Ga(e);
5376
5433
  try {
5377
- const { data: s } = await Lt.post(
5434
+ const { data: d } = await Pt.post(
5378
5435
  t,
5379
5436
  {
5380
5437
  q: e,
@@ -5387,21 +5444,21 @@ const Aa = (e) => {
5387
5444
  "Content-Type": "application/json"
5388
5445
  }
5389
5446
  }
5390
- ), d = (s == null ? void 0 : s.translatedText) || e;
5391
- return La(e, n, d), d;
5392
- } catch (s) {
5393
- return console.warn(`[Translation] Failed for: "${e}"`, s), e;
5447
+ ), s = (d == null ? void 0 : d.translatedText) || e;
5448
+ return Ua(e, n, s), s;
5449
+ } catch (d) {
5450
+ return console.warn(`[Translation] Failed for: "${e}"`, d), e;
5394
5451
  }
5395
- }, Ha = (e) => typeof e == "string" && e.trim().length > 0, Hn = async (e, n, t) => {
5452
+ }, Xa = (e) => typeof e == "string" && e.trim().length > 0, Hn = async (e, n, t) => {
5396
5453
  const r = await Promise.all(
5397
5454
  Object.entries(e).map(async ([o, a]) => {
5398
- if (Ha(a)) {
5399
- const l = await Va(a, n, t);
5455
+ if (Xa(a)) {
5456
+ const l = await Ya(a, n, t);
5400
5457
  return [o, l];
5401
5458
  } else if (Array.isArray(a)) {
5402
5459
  const l = await Promise.all(
5403
5460
  a.map(
5404
- async (s) => typeof s == "object" && s !== null ? await Hn(s, n, t) : s
5461
+ async (d) => typeof d == "object" && d !== null ? await Hn(d, n, t) : d
5405
5462
  )
5406
5463
  );
5407
5464
  return [o, l];
@@ -5415,31 +5472,37 @@ const Aa = (e) => {
5415
5472
  return Object.fromEntries(r);
5416
5473
  };
5417
5474
  export {
5418
- fi as BackAndNextButton,
5475
+ Di as BackAndNextButton,
5419
5476
  yn as BusinessRuleCard,
5420
- Qn as BusinessRuleCardNew,
5477
+ Kn as BusinessRuleCardNew,
5421
5478
  Wn as BusinessRuleView,
5422
5479
  Jn as BusinessRuleViewNew,
5423
- ei as BusinessRules,
5424
- ni as BusinessRulesNew,
5425
- hi as Checkpicker,
5426
- pi as DragAndDropBoxes,
5480
+ si as BusinessRules,
5481
+ di as BusinessRulesNew,
5482
+ Ci as Checkpicker,
5483
+ xi as DragAndDropBoxes,
5427
5484
  Mn as DraggableList,
5428
5485
  mo as DropdownMenu,
5429
- ui as DropdownMenuContainer,
5430
- ti as Filter,
5431
- ri as FilterModal,
5432
- oi as FormFilter,
5433
- Kn as ModalRules,
5486
+ yi as DropdownMenuContainer,
5487
+ et as EValueHowToSetUp,
5488
+ ci as Filter,
5489
+ ui as FilterModal,
5490
+ pi as FormFilter,
5491
+ Qn as ModalRules,
5434
5492
  so as RulesForm,
5435
- gi as SendButton,
5436
- Kr as convertRangeToString,
5437
- ai as formatDecisionForBackend,
5438
- ii as parseRangeFromString,
5439
- li as revertSortedDataSampleSwitchPlaces,
5440
- di as revertSortedDataSwitchPlaces,
5441
- si as sortDisplayDataSampleSwitchPlaces,
5442
- ci as sortDisplayDataSwitchPlaces,
5493
+ wi as SendButton,
5494
+ Ti as buildEsConditionSentence,
5495
+ Qr as convertRangeToString,
5496
+ Zn as filterByGroup,
5497
+ Si as flatFromGroups,
5498
+ gi as formatDecisionForBackend,
5499
+ qe as getConditionsByGroup,
5500
+ Ei as mapByGroup,
5501
+ fi as parseRangeFromString,
5502
+ hi as revertSortedDataSampleSwitchPlaces,
5503
+ mi as revertSortedDataSwitchPlaces,
5504
+ bi as sortDisplayDataSampleSwitchPlaces,
5505
+ vi as sortDisplayDataSwitchPlaces,
5443
5506
  Hn as translateObject,
5444
- Va as translateText
5507
+ Ya as translateText
5445
5508
  };