@isettingkit/business-rules 2.1.10 → 2.1.12

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,22 +1,22 @@
1
- import { jsx as a, jsxs as m, Fragment as O } from "react/jsx-runtime";
2
- import { MdOutlineDelete as an, MdClear as ln, MdAdd as Ye, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as Tn, MdInfo as Ot, MdCached as Pt, MdOutlineInfo as Mt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as jt, MdOutlineArrowCircleRight as Ut, MdOutlineChevronRight as _t, MdOutlineError as Ht } from "react-icons/md";
3
- import { inube as E, Stack as v, Divider as B, Icon as M, Text as $, SkeletonLine as J, useMediaQuery as te, Blanket as sn, Button as q, Grid as We, Toggle as dn, Checkbox as kn, Date as Fe, Box as qt, Tag as De, Tabs as st, SkeletonIcon as Bt, Fieldset as je, OptionList as Gt, Checkpicker as Yt, Label as Wt, OptionItem as Xt } from "@inubekit/inubekit";
4
- import w, { keyframes as An, ThemeContext as $n } from "styled-components";
5
- import { ValueDataType as j, ValueHowToSetUp as ee, DecisionConditionRender as tn, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
6
- import { DecisionViewConditionRenderer as $e, DecisionViewConditionRendererNew as Ke } from "@isettingkit/view";
7
- import { createPortal as cn } from "react-dom";
1
+ import { jsx as a, jsxs as m, Fragment as z } from "react/jsx-runtime";
2
+ import { MdOutlineDelete as ln, MdClear as sn, MdAdd as Ye, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as Tn, MdInfo as Ot, MdCached as Pt, MdOutlineInfo as Mt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as jt, MdOutlineArrowCircleRight as Ut, MdOutlineChevronRight as _t, MdOutlineError as Ht } from "react-icons/md";
3
+ import { inube as S, Stack as v, Divider as G, Icon as j, Text as $, SkeletonLine as J, useMediaQuery as te, Blanket as dn, Button as B, Grid as We, Toggle as cn, Checkbox as kn, Date as Fe, Box as qt, Tag as Ee, Tabs as st, SkeletonIcon as Bt, Fieldset as Ue, OptionList as Gt, Checkpicker as Yt, Label as Wt, OptionItem as Xt } from "@inubekit/inubekit";
4
+ import C, { keyframes as An, ThemeContext as $n } from "styled-components";
5
+ import { ValueDataType as _, ValueHowToSetUp as ee, DecisionConditionRender as rn, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
6
+ import { DecisionViewConditionRenderer as $e, DecisionViewConditionRendererNew as Ze } from "@isettingkit/view";
7
+ import { createPortal as un } from "react-dom";
8
8
  import { useFormik as In } from "formik";
9
- import { string as le, mixed as Pe, object as ne, number as se, lazy as qe, date as Le } from "yup";
10
- import V, { useState as z, useRef as Ie, useEffect as Ee, useContext as Rn, forwardRef as Qt, useMemo as dt, useCallback as Zt } from "react";
11
- import { Link as ct, useLocation as Kt } from "react-router-dom";
9
+ import { string as ie, mixed as Me, object as ne, number as le, lazy as Be, date as Le } from "yup";
10
+ import V, { useState as U, useRef as Ie, useEffect as ke, useContext as Rn, forwardRef as Qt, useMemo as dt, useCallback as Kt } from "react";
11
+ import { Link as ct, useLocation as Zt } from "react-router-dom";
12
12
  import Jt from "axios";
13
13
  import { franc as er } from "franc-min";
14
- const nr = w.div`
14
+ const nr = C.div`
15
15
  border-radius: 8px;
16
16
  border: 1px solid
17
17
  ${({ theme: e }) => {
18
18
  var n, t;
19
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
19
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
20
20
  }};
21
21
  box-sizing: border-box;
22
22
  display: flex;
@@ -27,7 +27,7 @@ const nr = w.div`
27
27
  height: 100%;
28
28
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
29
29
  `;
30
- w.div`
30
+ C.div`
31
31
  width: 100%;
32
32
  height: 100%;
33
33
  overflow-y: auto;
@@ -50,15 +50,15 @@ const Xe = (e) => {
50
50
  const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
51
51
  return /* @__PURE__ */ a(nr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
52
52
  n,
53
- t && /* @__PURE__ */ m(O, { children: [
54
- /* @__PURE__ */ a(B, {}),
53
+ t && /* @__PURE__ */ m(z, { children: [
54
+ /* @__PURE__ */ a(G, {}),
55
55
  /* @__PURE__ */ a(v, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
56
- M,
56
+ j,
57
57
  {
58
58
  cursorHover: !0,
59
59
  appearance: "danger",
60
60
  size: "24px",
61
- icon: /* @__PURE__ */ a(an, {}),
61
+ icon: /* @__PURE__ */ a(ln, {}),
62
62
  onClick: () => {
63
63
  r(o);
64
64
  }
@@ -78,19 +78,19 @@ const dr = {
78
78
  [A.GREATER_THAN]: ir,
79
79
  [A.LESS_THAN]: lr,
80
80
  [A.EQUAL]: sr
81
- }, Ue = (e) => {
81
+ }, _e = (e) => {
82
82
  const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = dr[e == null ? void 0 : e.howToSetTheDecision] || tr;
83
83
  return t && r(n) || n || void 0;
84
- }, jn = w.div`
84
+ }, jn = C.div`
85
85
  & > div {
86
86
  border-radius: 8px;
87
87
  border: 1px solid
88
88
  ${({ theme: e }) => {
89
89
  var n, t;
90
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
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
- `, Un = w.div`
93
+ `, Un = C.div`
94
94
  width: 100%;
95
95
  height: 100%;
96
96
  overflow-y: auto;
@@ -125,13 +125,13 @@ const dr = {
125
125
  $e,
126
126
  {
127
127
  element: o,
128
- valueData: Ue(
128
+ valueData: _e(
129
129
  o
130
130
  ),
131
131
  type: "decision"
132
132
  }
133
133
  ) }, t.ruleName),
134
- /* @__PURE__ */ a(B, { dashed: !0 }),
134
+ /* @__PURE__ */ a(G, { dashed: !0 }),
135
135
  /* @__PURE__ */ a(Un, { children: /* @__PURE__ */ m(
136
136
  v,
137
137
  {
@@ -155,13 +155,13 @@ const dr = {
155
155
  $e,
156
156
  {
157
157
  element: { ...u, value: u.value },
158
- valueData: Ue(
158
+ valueData: _e(
159
159
  u
160
160
  )
161
161
  }
162
162
  ) }) }, u.conditionName)),
163
- p.length > 0 && /* @__PURE__ */ a(B, { dashed: !0 }),
164
- d && /* @__PURE__ */ a(O, { children: r && /* @__PURE__ */ a(
163
+ p.length > 0 && /* @__PURE__ */ a(G, { dashed: !0 }),
164
+ d && /* @__PURE__ */ a(z, { children: r && /* @__PURE__ */ a(
165
165
  $e,
166
166
  {
167
167
  element: r.element,
@@ -179,7 +179,7 @@ const dr = {
179
179
  /* @__PURE__ */ a(J, { animated: !0, width: "85px" })
180
180
  ] }, "loading"),
181
181
  /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
182
- /* @__PURE__ */ a(B, { dashed: !0 }),
182
+ /* @__PURE__ */ a(G, { dashed: !0 }),
183
183
  /* @__PURE__ */ a(J, { animated: !0, width: "150px" })
184
184
  ] }),
185
185
  /* @__PURE__ */ a(Un, { children: /* @__PURE__ */ a(
@@ -212,34 +212,34 @@ const dr = {
212
212
  labelName: r == null ? void 0 : r.terms,
213
213
  value: String(n.effectiveFrom),
214
214
  howToSetTheDecision: ee.RANGE,
215
- decisionDataType: j.DATE
215
+ decisionDataType: _.DATE
216
216
  },
217
- valueData: Ue({
217
+ valueData: _e({
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: ee.RANGE,
224
- decisionDataType: j.DATE
224
+ decisionDataType: _.DATE
225
225
  })
226
226
  } : o && !i ? {
227
227
  element: {
228
228
  labelName: r == null ? void 0 : r.terms,
229
229
  value: String(n.effectiveFrom),
230
230
  howToSetTheDecision: ee.EQUAL,
231
- decisionDataType: j.DATE
231
+ decisionDataType: _.DATE
232
232
  },
233
- valueData: Ue({
233
+ valueData: _e({
234
234
  labelName: r == null ? void 0 : r.terms,
235
235
  value: String(n.effectiveFrom),
236
236
  howToSetTheDecision: ee.EQUAL,
237
- decisionDataType: j.DATE
237
+ decisionDataType: _.DATE
238
238
  })
239
239
  } : null, d = n ? {
240
240
  labelName: n.labelName || "",
241
241
  decisionDataType: n.decisionDataType || "alphabetical",
242
- value: Ue(n),
242
+ value: _e(n),
243
243
  howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
244
244
  } : null, l = ((g = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter(
245
245
  (h) => !h.hidden
@@ -258,15 +258,15 @@ const dr = {
258
258
  visibleConditions: l
259
259
  }
260
260
  );
261
- }, ur = w.div`
261
+ }, ur = C.div`
262
262
  position: relative;
263
263
  & > div {
264
264
  padding: 24px 16px;
265
265
  }
266
- `, pr = w.div`
266
+ `, pr = C.div`
267
267
  background-color: ${({ theme: e }) => {
268
268
  var n, t;
269
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
269
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || S.palette.neutral.N0;
270
270
  }};
271
271
  max-width: 450px;
272
272
  max-height: 90vh;
@@ -301,11 +301,11 @@ const dr = {
301
301
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
302
302
  );
303
303
  const s = te("(max-width: 400px)");
304
- return cn(
305
- /* @__PURE__ */ a(ur, { smallScreen: s, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
304
+ return un(
305
+ /* @__PURE__ */ a(ur, { smallScreen: s, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
306
306
  /* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
307
307
  /* @__PURE__ */ a($, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
308
- /* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: r })
308
+ /* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: r })
309
309
  ] }) }),
310
310
  n
311
311
  ] }) }) }) }),
@@ -321,12 +321,12 @@ const dr = {
321
321
  transform: translateY(0);
322
322
  }
323
323
  `;
324
- w.div`
324
+ C.div`
325
325
  border-radius: 8px;
326
326
  border: 1px solid
327
327
  ${({ theme: e }) => {
328
328
  var n, t;
329
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
329
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
330
330
  }};
331
331
  box-sizing: border-box;
332
332
  display: flex;
@@ -335,21 +335,21 @@ w.div`
335
335
  height: 100%;
336
336
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
337
337
  `;
338
- w.div`
338
+ C.div`
339
339
  & > div {
340
340
  border-radius: 8px;
341
341
  border: 1px solid
342
342
  ${({ theme: e }) => {
343
343
  var n, t;
344
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
344
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
345
345
  }};
346
346
  }
347
347
  `;
348
- const pt = w.div`
348
+ const pt = C.div`
349
349
  & > div {
350
350
  background-color: ${({ theme: e }) => {
351
351
  var n, t;
352
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N10) || E.palette.neutral.N10;
352
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N10) || S.palette.neutral.N10;
353
353
  }};
354
354
  justify-content: center;
355
355
  }
@@ -358,18 +358,18 @@ const pt = w.div`
358
358
  height: 100%;
359
359
  padding-bottom: 12px;
360
360
  cursor: pointer;
361
- `, Qe = w.div`
361
+ `, Qe = C.div`
362
362
  width: 100%;
363
363
  height: 100%;
364
364
  & > div {
365
365
  animation: ${gr} 600ms ease-out;
366
366
  }
367
- `, hr = w.div`
367
+ `, hr = C.div`
368
368
  & > div > div {
369
369
  border-radius: 8px;
370
370
  box-sizing: border-box;
371
371
  }
372
- `, fr = w.div`
372
+ `, fr = C.div`
373
373
  & > div {
374
374
  width: 100%;
375
375
  height: 100%;
@@ -440,7 +440,7 @@ const pt = w.div`
440
440
  handleView: () => r ? r() : null,
441
441
  controls: !1,
442
442
  children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
443
- /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(Ye, {}), size: "35px" }),
443
+ /* @__PURE__ */ a(j, { appearance: "gray", icon: /* @__PURE__ */ a(Ye, {}), size: "35px" }),
444
444
  /* @__PURE__ */ a($, { appearance: "gray", type: "body", size: "large", children: i })
445
445
  ] })
446
446
  }
@@ -488,7 +488,7 @@ const pt = w.div`
488
488
  })
489
489
  ), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
490
490
  return { renderedCards: l, shouldRenderAddCard: p };
491
- }, gl = (e) => {
491
+ }, hl = (e) => {
492
492
  const {
493
493
  controls: n = !0,
494
494
  customTitleContentAddCard: t,
@@ -504,7 +504,7 @@ const pt = w.div`
504
504
  handleSubmitForm: g,
505
505
  handleDelete: h,
506
506
  terms: f = !0
507
- } = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = xr({
507
+ } = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: w, shouldRenderAddCard: T } = xr({
508
508
  controls: n,
509
509
  customTitleContentAddCard: t,
510
510
  decisions: o,
@@ -512,9 +512,9 @@ const pt = w.div`
512
512
  handleOpenModal: u,
513
513
  handleDelete: h,
514
514
  textValues: i
515
- }), S = (o == null ? void 0 : o.length) === 0 && !p;
516
- return /* @__PURE__ */ m(O, { children: [
517
- /* @__PURE__ */ a(hr, { children: /* @__PURE__ */ a(fr, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
515
+ }), E = (o == null ? void 0 : o.length) === 0 && !p;
516
+ return /* @__PURE__ */ m(z, { children: [
517
+ /* @__PURE__ */ a(hr, { children: /* @__PURE__ */ a(fr, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: E ? /* @__PURE__ */ m(
518
518
  v,
519
519
  {
520
520
  direction: "column",
@@ -524,7 +524,7 @@ const pt = w.div`
524
524
  justifyContent: "center",
525
525
  alignItems: "center",
526
526
  children: [
527
- /* @__PURE__ */ a($, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
527
+ /* @__PURE__ */ a($, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(z, { children: [
528
528
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
529
529
  /* @__PURE__ */ m(
530
530
  $,
@@ -544,7 +544,7 @@ const pt = w.div`
544
544
  "para empezar."
545
545
  ] }) }),
546
546
  /* @__PURE__ */ a(
547
- q,
547
+ B,
548
548
  {
549
549
  iconBefore: /* @__PURE__ */ a(Ye, {}),
550
550
  onClick: () => u ? u() : null,
@@ -566,7 +566,7 @@ const pt = w.div`
566
566
  padding: "6px",
567
567
  height: x ? "auto" : "484px",
568
568
  children: [
569
- D,
569
+ w,
570
570
  T && wn({
571
571
  type: "add",
572
572
  index: o == null ? void 0 : o.length,
@@ -577,7 +577,7 @@ const pt = w.div`
577
577
  handleOpenModal: u,
578
578
  handleDelete: h,
579
579
  textValues: i,
580
- shouldRenderEmptyMessage: S,
580
+ shouldRenderEmptyMessage: E,
581
581
  terms: f
582
582
  })
583
583
  ]
@@ -602,15 +602,15 @@ const pt = w.div`
602
602
  }
603
603
  )
604
604
  ] });
605
- }, Tr = w.div`
605
+ }, Tr = C.div`
606
606
  position: relative;
607
607
  & > div {
608
608
  padding: 24px 16px;
609
609
  }
610
- `, wr = w.div`
610
+ `, wr = C.div`
611
611
  background-color: ${({ theme: e }) => {
612
612
  var n, t;
613
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
613
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || S.palette.neutral.N0;
614
614
  }};
615
615
  max-width: 450px;
616
616
  max-height: 90vh;
@@ -645,11 +645,11 @@ const pt = w.div`
645
645
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
646
646
  );
647
647
  const s = te("(max-width: 400px)");
648
- return cn(
649
- /* @__PURE__ */ a(Tr, { $smallScreen: s, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a(wr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
648
+ return un(
649
+ /* @__PURE__ */ a(Tr, { $smallScreen: s, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(wr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
650
650
  /* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
651
651
  /* @__PURE__ */ a($, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
652
- /* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: r })
652
+ /* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: r })
653
653
  ] }) }),
654
654
  n
655
655
  ] }) }) }) }),
@@ -665,12 +665,12 @@ const pt = w.div`
665
665
  transform: translateY(0);
666
666
  }
667
667
  `;
668
- w.div`
668
+ C.div`
669
669
  border-radius: 8px;
670
670
  border: 1px solid
671
671
  ${({ theme: e }) => {
672
672
  var n, t;
673
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
673
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
674
674
  }};
675
675
  box-sizing: border-box;
676
676
  display: flex;
@@ -679,21 +679,21 @@ w.div`
679
679
  height: 100%;
680
680
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
681
681
  `;
682
- w.div`
682
+ C.div`
683
683
  & > div {
684
684
  border-radius: 8px;
685
685
  border: 1px solid
686
686
  ${({ theme: e }) => {
687
687
  var n, t;
688
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
688
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
689
689
  }};
690
690
  }
691
691
  `;
692
- w.div`
692
+ C.div`
693
693
  & > div {
694
694
  background-color: ${({ theme: e }) => {
695
695
  var n, t;
696
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N10) || E.palette.neutral.N10;
696
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N10) || S.palette.neutral.N10;
697
697
  }};
698
698
  justify-content: center;
699
699
  }
@@ -703,19 +703,19 @@ w.div`
703
703
  padding-bottom: 12px;
704
704
  cursor: pointer;
705
705
  `;
706
- w.div`
706
+ C.div`
707
707
  width: 100%;
708
708
  height: 100%;
709
709
  & > div {
710
710
  animation: ${Dr} 600ms ease-out;
711
711
  }
712
712
  `;
713
- const Sr = w.div`
713
+ const Sr = C.div`
714
714
  & > div > div {
715
715
  border-radius: 8px;
716
716
  box-sizing: border-box;
717
717
  }
718
- `, Er = w.div`
718
+ `, Er = C.div`
719
719
  & > div {
720
720
  width: 100%;
721
721
  height: 100%;
@@ -759,19 +759,19 @@ const Sr = w.div`
759
759
  [A.GREATER_THAN]: Rr,
760
760
  [A.LESS_THAN]: Fr,
761
761
  [A.EQUAL]: Lr
762
- }, _e = (e) => {
762
+ }, He = (e) => {
763
763
  const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = Or[e == null ? void 0 : e.howToSetTheDecision] || kr;
764
764
  return t && r(n) || n || void 0;
765
- }, _n = w.div`
765
+ }, _n = C.div`
766
766
  & > div {
767
767
  border-radius: 8px;
768
768
  border: 1px solid
769
769
  ${({ theme: e }) => {
770
770
  var n, t;
771
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
771
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
772
772
  }};
773
773
  }
774
- `, Hn = w.div`
774
+ `, Hn = C.div`
775
775
  width: 100%;
776
776
  height: 100%;
777
777
  overflow-y: auto;
@@ -806,13 +806,13 @@ const Sr = w.div`
806
806
  $e,
807
807
  {
808
808
  element: o,
809
- valueData: _e(
809
+ valueData: He(
810
810
  o
811
811
  ),
812
812
  type: "decision"
813
813
  }
814
814
  ) }, t.ruleName),
815
- /* @__PURE__ */ a(B, { dashed: !0 }),
815
+ /* @__PURE__ */ a(G, { dashed: !0 }),
816
816
  /* @__PURE__ */ a(Hn, { children: /* @__PURE__ */ m(
817
817
  v,
818
818
  {
@@ -836,13 +836,13 @@ const Sr = w.div`
836
836
  $e,
837
837
  {
838
838
  element: { ...u, value: u.value },
839
- valueData: _e(
839
+ valueData: He(
840
840
  u
841
841
  )
842
842
  }
843
843
  ) }) }, u.conditionName)),
844
- p.length > 0 && /* @__PURE__ */ a(B, { dashed: !0 }),
845
- d && /* @__PURE__ */ a(O, { children: r && /* @__PURE__ */ a(
844
+ p.length > 0 && /* @__PURE__ */ a(G, { dashed: !0 }),
845
+ d && /* @__PURE__ */ a(z, { children: r && /* @__PURE__ */ a(
846
846
  $e,
847
847
  {
848
848
  element: r.element,
@@ -860,7 +860,7 @@ const Sr = w.div`
860
860
  /* @__PURE__ */ a(J, { animated: !0, width: "85px" })
861
861
  ] }, "loading"),
862
862
  /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
863
- /* @__PURE__ */ a(B, { dashed: !0 }),
863
+ /* @__PURE__ */ a(G, { dashed: !0 }),
864
864
  /* @__PURE__ */ a(J, { animated: !0, width: "150px" })
865
865
  ] }),
866
866
  /* @__PURE__ */ a(Hn, { children: /* @__PURE__ */ a(
@@ -895,34 +895,34 @@ const Sr = w.div`
895
895
  labelName: r == null ? void 0 : r.terms,
896
896
  value: String(n.effectiveFrom),
897
897
  howToSetTheDecision: ee.RANGE,
898
- decisionDataType: j.DATE
898
+ decisionDataType: _.DATE
899
899
  },
900
- valueData: _e({
900
+ valueData: He({
901
901
  labelName: r == null ? void 0 : r.terms,
902
902
  value: {
903
903
  from: String(n.effectiveFrom),
904
904
  to: String(n.validUntil)
905
905
  },
906
906
  howToSetTheDecision: ee.RANGE,
907
- decisionDataType: j.DATE
907
+ decisionDataType: _.DATE
908
908
  })
909
909
  } : o && !i ? {
910
910
  element: {
911
911
  labelName: r == null ? void 0 : r.terms,
912
912
  value: String(n.effectiveFrom),
913
913
  howToSetTheDecision: ee.EQUAL,
914
- decisionDataType: j.DATE
914
+ decisionDataType: _.DATE
915
915
  },
916
- valueData: _e({
916
+ valueData: He({
917
917
  labelName: r == null ? void 0 : r.terms,
918
918
  value: String(n.effectiveFrom),
919
919
  howToSetTheDecision: ee.EQUAL,
920
- decisionDataType: j.DATE
920
+ decisionDataType: _.DATE
921
921
  })
922
922
  } : null, d = n ? {
923
923
  labelName: n.labelName || "",
924
924
  decisionDataType: n.decisionDataType || "alphabetical",
925
- value: _e(n),
925
+ value: He(n),
926
926
  howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
927
927
  } : null, l = zr(n).filter((g) => !(g != null && g.hidden)), p = Array.from({ length: 5 }), u = !!(!t && n && r && d), c = l.length < 2 ? "start" : "space-between";
928
928
  return /* @__PURE__ */ a(
@@ -939,12 +939,12 @@ const Sr = w.div`
939
939
  visibleConditions: l
940
940
  }
941
941
  );
942
- }, jr = w.div`
942
+ }, jr = C.div`
943
943
  border-radius: 8px;
944
944
  border: 1px solid
945
945
  ${({ theme: e }) => {
946
946
  var n, t;
947
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
947
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
948
948
  }};
949
949
  box-sizing: border-box;
950
950
  display: flex;
@@ -955,7 +955,7 @@ const Sr = w.div`
955
955
  height: 100%;
956
956
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
957
957
  `;
958
- w.div`
958
+ C.div`
959
959
  width: 100%;
960
960
  height: 100%;
961
961
  overflow-y: auto;
@@ -978,15 +978,15 @@ const Ur = (e) => {
978
978
  const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
979
979
  return /* @__PURE__ */ a(jr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
980
980
  n,
981
- t && /* @__PURE__ */ m(O, { children: [
982
- /* @__PURE__ */ a(B, {}),
981
+ t && /* @__PURE__ */ m(z, { children: [
982
+ /* @__PURE__ */ a(G, {}),
983
983
  /* @__PURE__ */ a(v, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
984
- M,
984
+ j,
985
985
  {
986
986
  cursorHover: !0,
987
987
  appearance: "danger",
988
988
  size: "24px",
989
- icon: /* @__PURE__ */ a(an, {}),
989
+ icon: /* @__PURE__ */ a(ln, {}),
990
990
  onClick: () => {
991
991
  r(o);
992
992
  }
@@ -1037,7 +1037,7 @@ const Ur = (e) => {
1037
1037
  handleView: () => r ? r() : null,
1038
1038
  controls: !1,
1039
1039
  children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
1040
- /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(Ye, {}), size: "35px" }),
1040
+ /* @__PURE__ */ a(j, { appearance: "gray", icon: /* @__PURE__ */ a(Ye, {}), size: "35px" }),
1041
1041
  /* @__PURE__ */ a($, { appearance: "gray", type: "body", size: "large", children: i })
1042
1042
  ] })
1043
1043
  }
@@ -1053,14 +1053,14 @@ const Ur = (e) => {
1053
1053
  const { type: n } = e, t = qr[n];
1054
1054
  return t ? t(e) : null;
1055
1055
  }, Br = (e) => ({
1056
- schema: le().required("Requerido").test(
1056
+ schema: ie().required("Requerido").test(
1057
1057
  "non-empty",
1058
1058
  "El valor no puede estar vacío",
1059
1059
  (n) => n != null && n.trim() !== ""
1060
1060
  ),
1061
1061
  value: e
1062
1062
  }), Gr = (e) => ({
1063
- schema: Pe().test(
1063
+ schema: Me().test(
1064
1064
  "isArrayOrString",
1065
1065
  "Debe ser un array de strings/numbers o un solo string",
1066
1066
  (n) => Array.isArray(n) ? n.every(
@@ -1069,7 +1069,7 @@ const Ur = (e) => {
1069
1069
  ),
1070
1070
  value: e
1071
1071
  }), Yr = (e) => ({
1072
- schema: Pe().test(
1072
+ schema: Me().test(
1073
1073
  "isArrayOrString",
1074
1074
  "Debe ser un array de strings/numbers o un solo string ",
1075
1075
  (n) => Array.isArray(n) ? n.every(
@@ -1081,8 +1081,8 @@ const Ur = (e) => {
1081
1081
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
1082
1082
  return {
1083
1083
  schema: ne({
1084
- from: se().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
1085
- to: se().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
1084
+ from: le().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
1085
+ to: le().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
1086
1086
  "is-greater",
1087
1087
  "El campo 'Rango hasta' debe ser mayor que 'Rango desde'",
1088
1088
  function(r) {
@@ -1093,22 +1093,22 @@ const Ur = (e) => {
1093
1093
  }),
1094
1094
  value: { from: n, to: t }
1095
1095
  };
1096
- }, fn = (e, n) => n === j.PERCENTAGE ? {
1097
- 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"),
1096
+ }, mn = (e, n) => n === _.PERCENTAGE ? {
1097
+ schema: le().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
1098
1098
  value: e
1099
1099
  } : {
1100
- schema: le().required("Requerido"),
1100
+ schema: ie().required("Requerido"),
1101
1101
  value: e
1102
1102
  }, Xr = {
1103
1103
  [A.LIST_OF_VALUES]: Gr,
1104
1104
  [A.LIST_OF_VALUES_MULTI]: Yr,
1105
1105
  [A.RANGE]: Wr,
1106
- [A.GREATER_THAN]: fn,
1107
- [A.LESS_THAN]: fn,
1108
- [A.EQUAL]: fn
1106
+ [A.GREATER_THAN]: mn,
1107
+ [A.LESS_THAN]: mn,
1108
+ [A.EQUAL]: mn
1109
1109
  }, Qr = (e) => Xr[e] || Br;
1110
1110
  var Ln = /* @__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))(Ln || {});
1111
- const nn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Zr = (e, n) => {
1111
+ const nn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Kr = (e, n) => {
1112
1112
  var d;
1113
1113
  const t = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) => nn(l)).map(([l, p]) => ({ conditionName: l, value: p }));
1114
1114
  let r = [];
@@ -1127,7 +1127,7 @@ const nn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Ar
1127
1127
  };
1128
1128
  });
1129
1129
  };
1130
- function Kr({
1130
+ function Zr({
1131
1131
  decision: e,
1132
1132
  onSubmitEvent: n,
1133
1133
  textValues: t
@@ -1135,7 +1135,7 @@ function Kr({
1135
1135
  var c, g;
1136
1136
  const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((h, f) => (nn(f.value) && (h[f.conditionName] = f.value), h), {}), i = Object.keys(o).length > 0, s = {
1137
1137
  ruleName: e.ruleName || "",
1138
- decisionDataType: e.decisionDataType || j.ALPHABETICAL,
1138
+ decisionDataType: e.decisionDataType || _.ALPHABETICAL,
1139
1139
  howToSetTheDecision: e.howToSetTheDecision || "",
1140
1140
  value: e.value ?? "",
1141
1141
  effectiveFrom: e.effectiveFrom || "",
@@ -1151,8 +1151,8 @@ function Kr({
1151
1151
  };
1152
1152
  let d;
1153
1153
  const l = {
1154
- ruleName: le().required("El nombre de la regla es requerido"),
1155
- value: qe(() => Qr(
1154
+ ruleName: ie().required("El nombre de la regla es requerido"),
1155
+ value: Be(() => Qr(
1156
1156
  d.values.howToSetTheDecision
1157
1157
  )(
1158
1158
  d.values.value,
@@ -1165,9 +1165,9 @@ function Kr({
1165
1165
  (h, f, { parent: x }) => (x == null ? void 0 : x.checkClosed) ? f.required("La fecha de finalización es requerida").test(
1166
1166
  "is-after-startDate",
1167
1167
  "La fecha de finalización debe ser mayor o igual a la fecha de inicio",
1168
- function(D) {
1168
+ function(w) {
1169
1169
  const T = this.parent.effectiveFrom;
1170
- return !T || !D ? !0 : new Date(D) >= new Date(T);
1170
+ return !T || !w ? !0 : new Date(w) >= new Date(T);
1171
1171
  }
1172
1172
  ) : f.notRequired()
1173
1173
  ));
@@ -1177,8 +1177,8 @@ function Kr({
1177
1177
  validationSchema: p,
1178
1178
  validateOnBlur: !0,
1179
1179
  onSubmit: (h) => {
1180
- var D;
1181
- const f = ((D = e.conditionGroups) == null ? void 0 : D.ConditionGroupId) ?? "group-primary", x = h.toggleNone ? [] : Zr(h, r), y = {
1180
+ var w;
1181
+ const f = ((w = e.conditionGroups) == null ? void 0 : w.ConditionGroupId) ?? "group-primary", x = h.toggleNone ? [] : Kr(h, r), y = {
1182
1182
  ...e,
1183
1183
  ruleName: h.ruleName,
1184
1184
  decisionDataType: h.decisionDataType,
@@ -1210,16 +1210,16 @@ function Kr({
1210
1210
  });
1211
1211
  } };
1212
1212
  }
1213
- const Jr = w.div`
1213
+ const Jr = C.div`
1214
1214
  & > div {
1215
1215
  border-radius: 8px;
1216
1216
  border: 1px solid
1217
1217
  ${({ theme: e }) => {
1218
1218
  var n, t;
1219
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
1219
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
1220
1220
  }};
1221
1221
  }
1222
- `, eo = w.div`
1222
+ `, eo = C.div`
1223
1223
  width: 100%;
1224
1224
  height: 100%;
1225
1225
  overflow-y: auto;
@@ -1245,10 +1245,10 @@ const Jr = w.div`
1245
1245
  labelToggle: i,
1246
1246
  name: s,
1247
1247
  valueToggle: d = ""
1248
- } = e, [l, p] = z(n);
1249
- return /* @__PURE__ */ m(O, { children: [
1248
+ } = e, [l, p] = U(n);
1249
+ return /* @__PURE__ */ m(z, { children: [
1250
1250
  /* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(
1251
- dn,
1251
+ cn,
1252
1252
  {
1253
1253
  checked: l,
1254
1254
  id: o,
@@ -1261,7 +1261,7 @@ const Jr = w.div`
1261
1261
  children: /* @__PURE__ */ a($, { size: "medium", type: "label", weight: "bold", as: "span", children: i })
1262
1262
  }
1263
1263
  ) }),
1264
- l && /* @__PURE__ */ a(O, { children: t })
1264
+ l && /* @__PURE__ */ a(z, { children: t })
1265
1265
  ] });
1266
1266
  }, to = (e) => {
1267
1267
  const {
@@ -1278,14 +1278,14 @@ const Jr = w.div`
1278
1278
  messageEnd: c = "",
1279
1279
  statusStart: g = "pending",
1280
1280
  statusEnd: h = "pending"
1281
- } = e, [f, x] = z(s), [y, D] = z(l), [T, S] = z(p), N = ({ target: k }) => {
1281
+ } = e, [f, x] = U(s), [y, w] = U(l), [T, E] = U(p), N = ({ target: k }) => {
1282
1282
  x(k.checked), r && r(k.checked);
1283
- }, C = (k) => {
1284
- D(k.target.value), n(k);
1283
+ }, D = (k) => {
1284
+ w(k.target.value), n(k);
1285
1285
  }, I = (k) => {
1286
- S(k.target.value), t(k);
1286
+ E(k.target.value), t(k);
1287
1287
  }, F = te("(max-width: 400px)");
1288
- return /* @__PURE__ */ m(O, { children: [
1288
+ return /* @__PURE__ */ m(z, { children: [
1289
1289
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1290
1290
  /* @__PURE__ */ a(
1291
1291
  $,
@@ -1329,7 +1329,7 @@ const Jr = w.div`
1329
1329
  {
1330
1330
  id: "dateStart",
1331
1331
  label: o,
1332
- onChange: C,
1332
+ onChange: D,
1333
1333
  value: y,
1334
1334
  required: d,
1335
1335
  size: "compact",
@@ -1368,12 +1368,12 @@ const Jr = w.div`
1368
1368
  termEndStatus: u
1369
1369
  } = e;
1370
1370
  return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
1371
- tn({
1371
+ rn({
1372
1372
  condition: i,
1373
1373
  formik: n,
1374
1374
  isDecision: !0
1375
1375
  }),
1376
- /* @__PURE__ */ a(B, { dashed: !0 }),
1376
+ /* @__PURE__ */ a(G, { dashed: !0 }),
1377
1377
  /* @__PURE__ */ a(Jr, { children: /* @__PURE__ */ a(eo, { children: /* @__PURE__ */ m(
1378
1378
  v,
1379
1379
  {
@@ -1391,7 +1391,7 @@ const Jr = w.div`
1391
1391
  children: [
1392
1392
  /* @__PURE__ */ a($, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
1393
1393
  /* @__PURE__ */ a(
1394
- dn,
1394
+ cn,
1395
1395
  {
1396
1396
  id: "toggleNone",
1397
1397
  onChange: () => s(!n.values.toggleNone),
@@ -1416,7 +1416,7 @@ const Jr = w.div`
1416
1416
  c.conditionName,
1417
1417
  c.howToSetTheCondition === Ln.LIST_OF_VALUES_MULTI
1418
1418
  )(h.target.checked),
1419
- children: tn({ condition: c, formik: n })
1419
+ children: rn({ condition: c, formik: n })
1420
1420
  },
1421
1421
  c.conditionName
1422
1422
  );
@@ -1424,8 +1424,8 @@ const Jr = w.div`
1424
1424
  ]
1425
1425
  }
1426
1426
  ) }) }),
1427
- t.terms && /* @__PURE__ */ m(O, { children: [
1428
- /* @__PURE__ */ a(B, { dashed: !0 }),
1427
+ t.terms && /* @__PURE__ */ m(z, { children: [
1428
+ /* @__PURE__ */ a(G, { dashed: !0 }),
1429
1429
  /* @__PURE__ */ a(
1430
1430
  to,
1431
1431
  {
@@ -1446,16 +1446,16 @@ const Jr = w.div`
1446
1446
  }
1447
1447
  )
1448
1448
  ] }),
1449
- /* @__PURE__ */ a(B, {}),
1449
+ /* @__PURE__ */ a(G, {}),
1450
1450
  l && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
1451
1451
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
1452
- /* @__PURE__ */ a(q, { appearance: "gray", onClick: r, children: t.cancel }),
1453
- /* @__PURE__ */ a(q, { type: "submit", children: t.confirm })
1452
+ /* @__PURE__ */ a(B, { appearance: "gray", onClick: r, children: t.cancel }),
1453
+ /* @__PURE__ */ a(B, { type: "submit", children: t.confirm })
1454
1454
  ] })
1455
1455
  ] }) });
1456
1456
  }, oo = (e) => {
1457
1457
  var h, f;
1458
- const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = Kr({
1458
+ const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = Zr({
1459
1459
  decision: n,
1460
1460
  onSubmitEvent: t,
1461
1461
  textValues: r
@@ -1478,8 +1478,8 @@ const Jr = w.div`
1478
1478
  visibleConditions: l,
1479
1479
  normalizedDecision: d,
1480
1480
  handleToggleNoneChange: s,
1481
- handleConditionToggleChange: (x, y) => (D) => {
1482
- if (!D)
1481
+ handleConditionToggleChange: (x, y) => (w) => {
1482
+ if (!w)
1483
1483
  i.setFieldValue(
1484
1484
  `conditionsThatEstablishesTheDecision.${x}`,
1485
1485
  void 0
@@ -1487,7 +1487,7 @@ const Jr = w.div`
1487
1487
  `conditionsThatEstablishesTheDecision.${x}`,
1488
1488
  !1,
1489
1489
  !1
1490
- ), Object.keys(i.touched).filter((S) => S.startsWith("conditionsThatEstablishesTheDecision.")).some((S) => i.touched[S] === !0) || s(!0);
1490
+ ), Object.keys(i.touched).filter((E) => E.startsWith("conditionsThatEstablishesTheDecision.")).some((E) => i.touched[E] === !0) || s(!0);
1491
1491
  else {
1492
1492
  const T = y ? [] : "";
1493
1493
  s(!1), i.setFieldValue(
@@ -1534,7 +1534,7 @@ const Jr = w.div`
1534
1534
  })
1535
1535
  ), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
1536
1536
  return { renderedCards: l, shouldRenderAddCard: p };
1537
- }, hl = (e) => {
1537
+ }, fl = (e) => {
1538
1538
  const {
1539
1539
  controls: n = !0,
1540
1540
  customTitleContentAddCard: t,
@@ -1550,7 +1550,7 @@ const Jr = w.div`
1550
1550
  handleSubmitForm: g,
1551
1551
  handleDelete: h,
1552
1552
  terms: f = !0
1553
- } = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = ao({
1553
+ } = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: w, shouldRenderAddCard: T } = ao({
1554
1554
  controls: n,
1555
1555
  customTitleContentAddCard: t,
1556
1556
  decisions: o,
@@ -1558,9 +1558,9 @@ const Jr = w.div`
1558
1558
  handleOpenModal: u,
1559
1559
  handleDelete: h,
1560
1560
  textValues: i
1561
- }), S = (o == null ? void 0 : o.length) === 0 && !p;
1562
- return /* @__PURE__ */ m(O, { children: [
1563
- /* @__PURE__ */ a(Sr, { children: /* @__PURE__ */ a(Er, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
1561
+ }), E = (o == null ? void 0 : o.length) === 0 && !p;
1562
+ return /* @__PURE__ */ m(z, { children: [
1563
+ /* @__PURE__ */ a(Sr, { children: /* @__PURE__ */ a(Er, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: E ? /* @__PURE__ */ m(
1564
1564
  v,
1565
1565
  {
1566
1566
  direction: "column",
@@ -1570,7 +1570,7 @@ const Jr = w.div`
1570
1570
  justifyContent: "center",
1571
1571
  alignItems: "center",
1572
1572
  children: [
1573
- /* @__PURE__ */ a($, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
1573
+ /* @__PURE__ */ a($, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(z, { children: [
1574
1574
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
1575
1575
  /* @__PURE__ */ m(
1576
1576
  $,
@@ -1590,7 +1590,7 @@ const Jr = w.div`
1590
1590
  "para empezar."
1591
1591
  ] }) }),
1592
1592
  /* @__PURE__ */ a(
1593
- q,
1593
+ B,
1594
1594
  {
1595
1595
  iconBefore: /* @__PURE__ */ a(Ye, {}),
1596
1596
  onClick: () => u ? u() : null,
@@ -1612,7 +1612,7 @@ const Jr = w.div`
1612
1612
  padding: "6px",
1613
1613
  height: x ? "auto" : "484px",
1614
1614
  children: [
1615
- D,
1615
+ w,
1616
1616
  T && Cn({
1617
1617
  type: "add",
1618
1618
  index: o == null ? void 0 : o.length,
@@ -1623,7 +1623,7 @@ const Jr = w.div`
1623
1623
  handleOpenModal: u,
1624
1624
  handleDelete: h,
1625
1625
  textValues: i,
1626
- shouldRenderEmptyMessage: S,
1626
+ shouldRenderEmptyMessage: E,
1627
1627
  terms: f
1628
1628
  })
1629
1629
  ]
@@ -1661,7 +1661,7 @@ const Jr = w.div`
1661
1661
  [A.GREATER_THAN]: uo,
1662
1662
  [A.LESS_THAN]: po,
1663
1663
  [A.EQUAL]: go
1664
- }, He = (e) => {
1664
+ }, qe = (e) => {
1665
1665
  const n = e == null ? void 0 : e.value;
1666
1666
  if (typeof n == "string" && n.includes(" a ")) {
1667
1667
  const t = [
@@ -1679,7 +1679,7 @@ const Jr = w.div`
1679
1679
  return n;
1680
1680
  }
1681
1681
  return typeof n == "object" && n !== null && !Array.isArray(n) ? (ho[e == null ? void 0 : e.howToSetTheDecision] || io)(n) : n || void 0;
1682
- }, fo = w.div`
1682
+ }, fo = C.div`
1683
1683
  display: flex;
1684
1684
  justify-content: ${({ $justifyContent: e }) => e};
1685
1685
  align-items: ${({ $alignItems: e }) => e};
@@ -1693,11 +1693,11 @@ const Jr = w.div`
1693
1693
  padding: ${({ $padding: e }) => e};
1694
1694
  background: ${({ $background: e, theme: n }) => {
1695
1695
  var t, r, o, i;
1696
- return e ? `${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N10) || E.palette.neutral.N10}` : `${((i = (o = n == null ? void 0 : n.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || E.palette.neutral.N0}`;
1696
+ return e ? `${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N10) || S.palette.neutral.N10}` : `${((i = (o = n == null ? void 0 : n.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || S.palette.neutral.N0}`;
1697
1697
  }};
1698
1698
  border: ${({ $border: e, theme: n }) => {
1699
1699
  var t, r;
1700
- return e ? `1px solid ${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N40) || E.palette.neutral.N40}` : "none";
1700
+ return e ? `1px solid ${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N40) || S.palette.neutral.N40}` : "none";
1701
1701
  }};
1702
1702
  border-radius: ${({ $borderRadius: e }) => e};
1703
1703
  box-sizing: ${({ $boxSizing: e }) => e};
@@ -1720,7 +1720,7 @@ const Jr = w.div`
1720
1720
  margin: f = "0px",
1721
1721
  padding: x = "0px",
1722
1722
  boxSizing: y,
1723
- scroll: D = !1
1723
+ scroll: w = !1
1724
1724
  } = e;
1725
1725
  return /* @__PURE__ */ a(
1726
1726
  fo,
@@ -1740,24 +1740,24 @@ const Jr = w.div`
1740
1740
  $padding: x,
1741
1741
  $borderRadius: g,
1742
1742
  $boxSizing: y,
1743
- $scroll: D,
1743
+ $scroll: w,
1744
1744
  children: t
1745
1745
  }
1746
1746
  );
1747
1747
  }
1748
1748
  );
1749
1749
  oe.displayName = "BorderStack";
1750
- w.div`
1750
+ C.div`
1751
1751
  & > div {
1752
1752
  border-radius: 8px;
1753
1753
  border: 1px solid
1754
1754
  ${({ theme: e }) => {
1755
1755
  var n, t;
1756
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
1756
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
1757
1757
  }};
1758
1758
  }
1759
1759
  `;
1760
- w.div`
1760
+ C.div`
1761
1761
  width: 100%;
1762
1762
  height: 100%;
1763
1763
  overflow-y: auto;
@@ -1776,13 +1776,13 @@ w.div`
1776
1776
  border-radius: 8px;
1777
1777
  }
1778
1778
  `;
1779
- const mo = w.div`
1779
+ const mo = C.div`
1780
1780
  cursor: pointer;
1781
- `, bo = w.div`
1781
+ `, bo = C.div`
1782
1782
  & > div > div > div > p {
1783
1783
  text-wrap-mode: nowrap;
1784
1784
  }
1785
- `, vo = w.div`
1785
+ `, vo = C.div`
1786
1786
  & > div {
1787
1787
  justify-content: auto;
1788
1788
  gap: 8px;
@@ -1805,9 +1805,9 @@ const mo = w.div`
1805
1805
  onEdit: f,
1806
1806
  onDelete: x,
1807
1807
  tabs: y,
1808
- selectedTab: D,
1808
+ selectedTab: w,
1809
1809
  onTabChange: T,
1810
- currentConditions: S,
1810
+ currentConditions: E,
1811
1811
  hasMultipleGroups: N
1812
1812
  } = e;
1813
1813
  return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
@@ -1819,7 +1819,7 @@ const mo = w.div`
1819
1819
  children: [
1820
1820
  /* @__PURE__ */ m(v, { gap: "12px", children: [
1821
1821
  /* @__PURE__ */ a(bo, { children: /* @__PURE__ */ a(
1822
- De,
1822
+ Ee,
1823
1823
  {
1824
1824
  id: "tag",
1825
1825
  appearance: "gray",
@@ -1828,10 +1828,10 @@ const mo = w.div`
1828
1828
  }
1829
1829
  ) }),
1830
1830
  /* @__PURE__ */ a(vo, { children: /* @__PURE__ */ a(
1831
- Ke,
1831
+ Ze,
1832
1832
  {
1833
1833
  element: o,
1834
- valueData: He(
1834
+ valueData: qe(
1835
1835
  o
1836
1836
  ),
1837
1837
  type: "decision"
@@ -1839,34 +1839,34 @@ const mo = w.div`
1839
1839
  ) })
1840
1840
  ] }),
1841
1841
  /* @__PURE__ */ m(v, { gap: "12px", children: [
1842
- n && /* @__PURE__ */ m(O, { children: [
1842
+ n && /* @__PURE__ */ m(z, { children: [
1843
1843
  /* @__PURE__ */ a(
1844
- M,
1844
+ j,
1845
1845
  {
1846
1846
  appearance: "primary",
1847
1847
  icon: /* @__PURE__ */ a(Ft, {}),
1848
1848
  size: "24px",
1849
1849
  cursorHover: !0,
1850
- onClick: (C) => {
1851
- C.stopPropagation(), f == null || f();
1850
+ onClick: (D) => {
1851
+ D.stopPropagation(), f == null || f();
1852
1852
  }
1853
1853
  }
1854
1854
  ),
1855
1855
  /* @__PURE__ */ a(
1856
- M,
1856
+ j,
1857
1857
  {
1858
1858
  appearance: "danger",
1859
- icon: /* @__PURE__ */ a(an, {}),
1859
+ icon: /* @__PURE__ */ a(ln, {}),
1860
1860
  size: "24px",
1861
1861
  cursorHover: !0,
1862
- onClick: (C) => {
1863
- C.stopPropagation(), x == null || x();
1862
+ onClick: (D) => {
1863
+ D.stopPropagation(), x == null || x();
1864
1864
  }
1865
1865
  }
1866
1866
  )
1867
1867
  ] }),
1868
1868
  /* @__PURE__ */ a(
1869
- M,
1869
+ j,
1870
1870
  {
1871
1871
  appearance: "dark",
1872
1872
  icon: l ? /* @__PURE__ */ a(Lt, {}) : /* @__PURE__ */ a(Tn, {}),
@@ -1879,9 +1879,9 @@ const mo = w.div`
1879
1879
  },
1880
1880
  r.ruleName
1881
1881
  ) }),
1882
- l && /* @__PURE__ */ m(O, { children: [
1883
- /* @__PURE__ */ a(B, { dashed: !0 }),
1884
- N ? /* @__PURE__ */ a(st, { tabs: y, selectedTab: D, onChange: T }) : /* @__PURE__ */ a(
1882
+ l && /* @__PURE__ */ m(z, { children: [
1883
+ /* @__PURE__ */ a(G, { dashed: !0 }),
1884
+ N ? /* @__PURE__ */ a(st, { tabs: y, selectedTab: w, onChange: T }) : /* @__PURE__ */ a(
1885
1885
  $,
1886
1886
  {
1887
1887
  type: "label",
@@ -1900,7 +1900,7 @@ const mo = w.div`
1900
1900
  gap: "8px",
1901
1901
  justifyContent: t,
1902
1902
  children: [
1903
- S.map((C) => /* @__PURE__ */ a(
1903
+ E.map((D) => /* @__PURE__ */ a(
1904
1904
  oe,
1905
1905
  {
1906
1906
  direction: "column",
@@ -1908,16 +1908,16 @@ const mo = w.div`
1908
1908
  borderRadius: "8px",
1909
1909
  background: !0,
1910
1910
  children: /* @__PURE__ */ a(
1911
- Ke,
1911
+ Ze,
1912
1912
  {
1913
- element: { ...C, value: C.value },
1914
- valueData: He(
1915
- C
1913
+ element: { ...D, value: D.value },
1914
+ valueData: qe(
1915
+ D
1916
1916
  )
1917
1917
  }
1918
1918
  )
1919
1919
  },
1920
- C.conditionName
1920
+ D.conditionName
1921
1921
  )),
1922
1922
  u && g && /* @__PURE__ */ a(
1923
1923
  oe,
@@ -1927,7 +1927,7 @@ const mo = w.div`
1927
1927
  borderRadius: "8px",
1928
1928
  background: !0,
1929
1929
  children: /* @__PURE__ */ a(
1930
- Ke,
1930
+ Ze,
1931
1931
  {
1932
1932
  element: g.element,
1933
1933
  valueData: g.valueData
@@ -1944,7 +1944,7 @@ const mo = w.div`
1944
1944
  borderRadius: "8px",
1945
1945
  background: !0,
1946
1946
  children: /* @__PURE__ */ a(
1947
- Ke,
1947
+ Ze,
1948
1948
  {
1949
1949
  element: h.element,
1950
1950
  valueData: h.valueData
@@ -1967,19 +1967,19 @@ const mo = w.div`
1967
1967
  /* @__PURE__ */ a(Bt, { animated: !0 })
1968
1968
  ] })
1969
1969
  ] });
1970
- }, qn = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Object.values(e).every(Array.isArray), mn = (e) => {
1970
+ }, qn = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Object.values(e).every(Array.isArray), tn = (e) => {
1971
1971
  const n = /* @__PURE__ */ new Set(), t = [];
1972
1972
  for (const r of e) {
1973
1973
  const o = String((r == null ? void 0 : r.conditionName) ?? "");
1974
1974
  n.has(o) || (n.add(o), t.push(r));
1975
1975
  }
1976
1976
  return t;
1977
- }, Be = (e) => {
1977
+ }, Oe = (e) => {
1978
1978
  if (!e) return {};
1979
1979
  if (Array.isArray(e.conditionGroups)) {
1980
1980
  const n = e.conditionGroups.map((t) => [
1981
1981
  t.ConditionGroupId,
1982
- mn(
1982
+ tn(
1983
1983
  Array.isArray(t.conditionsThatEstablishesTheDecision) ? t.conditionsThatEstablishesTheDecision : []
1984
1984
  )
1985
1985
  ]);
@@ -1988,16 +1988,16 @@ const mo = w.div`
1988
1988
  if (qn(e.conditionsThatEstablishesTheDecision)) {
1989
1989
  const n = e.conditionsThatEstablishesTheDecision;
1990
1990
  return Object.fromEntries(
1991
- Object.entries(n).map(([t, r]) => [t, mn(r)])
1991
+ Object.entries(n).map(([t, r]) => [t, tn(r)])
1992
1992
  );
1993
1993
  }
1994
1994
  return qn(e) ? Object.fromEntries(
1995
- Object.entries(e).map(([n, t]) => [n, mn(t)])
1995
+ Object.entries(e).map(([n, t]) => [n, tn(t)])
1996
1996
  ) : {};
1997
1997
  }, ht = (e, n) => Object.fromEntries(
1998
1998
  Object.entries(e).map(([t, r]) => [t, r.filter(n)])
1999
1999
  ), Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ft = (e) => {
2000
- var be;
2000
+ var he, fe, me;
2001
2001
  const {
2002
2002
  decision: n,
2003
2003
  loading: t = !1,
@@ -2013,58 +2013,68 @@ const mo = w.div`
2013
2013
  labelName: r == null ? void 0 : r.effectiveFrom,
2014
2014
  value: String(n.effectiveFrom),
2015
2015
  howToSetTheDecision: ee.EQUAL,
2016
- decisionDataType: j.DATE
2016
+ decisionDataType: _.DATE
2017
2017
  },
2018
- valueData: He({
2018
+ valueData: qe({
2019
2019
  labelName: r == null ? void 0 : r.effectiveFrom,
2020
2020
  value: String(n.effectiveFrom),
2021
2021
  howToSetTheDecision: ee.EQUAL,
2022
- decisionDataType: j.DATE
2022
+ decisionDataType: _.DATE
2023
2023
  })
2024
2024
  } : null, h = c ? {
2025
2025
  element: {
2026
2026
  labelName: r == null ? void 0 : r.validUntil,
2027
2027
  value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
2028
2028
  howToSetTheDecision: ee.EQUAL,
2029
- decisionDataType: j.DATE
2029
+ decisionDataType: _.DATE
2030
2030
  },
2031
- valueData: He({
2031
+ valueData: qe({
2032
2032
  labelName: r == null ? void 0 : r.validUntil,
2033
2033
  value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
2034
2034
  howToSetTheDecision: ee.EQUAL,
2035
- decisionDataType: j.DATE
2035
+ decisionDataType: _.DATE
2036
2036
  })
2037
2037
  } : null, f = n ? {
2038
2038
  labelName: n.labelName || "",
2039
- decisionDataType: n.decisionDataType || j.ALPHABETICAL,
2040
- value: He(n),
2039
+ decisionDataType: n.decisionDataType || _.ALPHABETICAL,
2040
+ value: qe(n),
2041
2041
  howToSetTheDecision: n.howToSetTheDecision || ee.EQUAL
2042
- } : null, x = n ? Be(n) : {}, y = ht(x, (P) => !P.hidden), D = Object.keys(y), T = [
2043
- ...D.filter((P) => P === "group-primary"),
2044
- ...D.filter((P) => P !== "group-primary")
2045
- ], S = {};
2046
- let N = 1;
2047
- const C = T.map((P) => {
2048
- const de = P === "group-primary" ? "mainCondition" : `alternateCondition-${N++}`;
2049
- return S[de] = P, {
2050
- id: de,
2051
- label: P === "group-primary" ? Bn(P, 0) : Bn(P, Number(de.split("-").at(-1))),
2042
+ } : null, x = n ? Oe(n) : {}, y = ((fe = (he = n == null ? void 0 : n.conditionGroups) == null ? void 0 : he.map(
2043
+ (L) => L == null ? void 0 : L.ConditionGroupId
2044
+ )) == null ? void 0 : fe.filter(Boolean)) || Object.keys(x), w = y[0] || "group-primary", T = V.useMemo(() => {
2045
+ const L = {}, O = x[w] || [], M = x["group-primary"] || [];
2046
+ L["group-primary"] = w === "group-primary" ? M : [...O, ...M];
2047
+ for (const P of y)
2048
+ !P || P === w || P !== "group-primary" && x[P] && (L[P] = x[P]);
2049
+ for (const P of Object.keys(x))
2050
+ P === "group-primary" || P === w || P in L || (L[P] = x[P]);
2051
+ return L;
2052
+ }, [x, w, y]), E = ht(T, (L) => !L.hidden), N = V.useMemo(() => {
2053
+ const L = ["group-primary", ...Object.keys(T).filter((O) => O !== "group-primary")];
2054
+ return Array.from(new Set(L));
2055
+ }, [T]), D = {};
2056
+ let I = 1;
2057
+ const F = N.map((L) => {
2058
+ const O = L === "group-primary" ? "mainCondition" : `alternateCondition-${I++}`;
2059
+ return D[O] = L, {
2060
+ id: O,
2061
+ label: L === "group-primary" ? Bn(L, 0) : Bn(L, Number(O.split("-").at(-1))),
2052
2062
  isDisabled: !1
2053
2063
  };
2054
- }), [I, F] = V.useState(
2055
- ((be = C[0]) == null ? void 0 : be.id) ?? "mainCondition"
2056
- ), k = (P) => F(P), _ = S[I] ?? "group-primary", ae = y[_] ?? [], he = T.length > 1, fe = Array.from({ length: 5 }), pe = !!(!t && n && r && f), ie = ae.length < 2 ? "start" : "space-between", me = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
2064
+ }), [k, H] = V.useState(
2065
+ ((me = F[0]) == null ? void 0 : me.id) ?? "mainCondition"
2066
+ ), se = (L) => H(L), ve = D[k] ?? "group-primary", pe = E[ve] ?? [], ge = N.length > 1, ae = Array.from({ length: 5 }), ye = !!(!t && n && r && f), Se = pe.length < 2 ? "start" : "space-between", de = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
2057
2067
  return /* @__PURE__ */ a(
2058
2068
  yo,
2059
2069
  {
2060
- conditionsAlignment: ie,
2070
+ conditionsAlignment: Se,
2061
2071
  controls: p,
2062
2072
  decision: n,
2063
2073
  decisionMapper: f,
2064
- loading: pe,
2065
- skeleton: fe,
2074
+ loading: ye,
2075
+ skeleton: ae,
2066
2076
  textValues: r,
2067
- tagLabel: me,
2077
+ tagLabel: de,
2068
2078
  isOpen: i,
2069
2079
  onToggle: s,
2070
2080
  hasEffectiveFrom: u,
@@ -2073,11 +2083,11 @@ const mo = w.div`
2073
2083
  validUntilRenderer: h,
2074
2084
  onEdit: d,
2075
2085
  onDelete: l,
2076
- tabs: C,
2077
- selectedTab: I,
2078
- onTabChange: k,
2079
- currentConditions: ae,
2080
- hasMultipleGroups: he
2086
+ tabs: F,
2087
+ selectedTab: k,
2088
+ onTabChange: se,
2089
+ currentConditions: pe,
2090
+ hasMultipleGroups: ge
2081
2091
  }
2082
2092
  );
2083
2093
  }, xo = An`
@@ -2090,12 +2100,12 @@ const mo = w.div`
2090
2100
  transform: translateY(0);
2091
2101
  }
2092
2102
  `;
2093
- w.div`
2103
+ C.div`
2094
2104
  border-radius: 8px;
2095
2105
  border: 1px solid
2096
2106
  ${({ theme: e }) => {
2097
2107
  var n, t;
2098
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
2108
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
2099
2109
  }};
2100
2110
  box-sizing: border-box;
2101
2111
  display: flex;
@@ -2104,37 +2114,37 @@ w.div`
2104
2114
  height: 100%;
2105
2115
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
2106
2116
  `;
2107
- w.div`
2117
+ C.div`
2108
2118
  & > div {
2109
2119
  border-radius: 8px;
2110
2120
  border: 1px solid
2111
2121
  ${({ theme: e }) => {
2112
2122
  var n, t;
2113
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
2123
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
2114
2124
  }};
2115
2125
  }
2116
2126
  `;
2117
- const To = w.div`
2127
+ const To = C.div`
2118
2128
  & > div {
2119
2129
  box-shadow: 0px 2px 3px 0px
2120
2130
  ${({ theme: e }) => {
2121
2131
  var n, t;
2122
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutralAlpha) == null ? void 0 : t.N30A) || E.palette.neutralAlpha.N30A;
2132
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutralAlpha) == null ? void 0 : t.N30A) || S.palette.neutralAlpha.N30A;
2123
2133
  }};
2124
2134
  cursor: pointer;
2125
2135
  }
2126
- `, wo = w.div`
2136
+ `, wo = C.div`
2127
2137
  width: 100%;
2128
2138
  height: 100%;
2129
2139
  & > div {
2130
2140
  animation: ${xo} 600ms ease-out;
2131
2141
  }
2132
- `, Co = w.div`
2142
+ `, Co = C.div`
2133
2143
  & > div > div {
2134
2144
  border-radius: 8px;
2135
2145
  box-sizing: border-box;
2136
2146
  }
2137
- `, Do = w.div`
2147
+ `, Do = C.div`
2138
2148
  & > div {
2139
2149
  width: 100%;
2140
2150
  height: 100%;
@@ -2229,7 +2239,7 @@ const To = w.div`
2229
2239
  children: [
2230
2240
  /* @__PURE__ */ a($, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
2231
2241
  /* @__PURE__ */ a(
2232
- M,
2242
+ j,
2233
2243
  {
2234
2244
  appearance: "gray",
2235
2245
  icon: /* @__PURE__ */ a(Ye, {}),
@@ -2289,16 +2299,16 @@ const To = w.div`
2289
2299
  })
2290
2300
  ), c = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
2291
2301
  return { renderedCards: u, shouldRenderAddCard: c };
2292
- }, $o = w.div`
2302
+ }, $o = C.div`
2293
2303
  position: relative;
2294
2304
  & > div {
2295
2305
  padding: 24px 16px;
2296
2306
  place-items: unset;
2297
2307
  }
2298
- `, Io = w.div`
2308
+ `, Io = C.div`
2299
2309
  background-color: ${({ theme: e }) => {
2300
2310
  var n, t;
2301
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
2311
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || S.palette.neutral.N0;
2302
2312
  }};
2303
2313
  max-height: 90vh;
2304
2314
  width: 100%;
@@ -2334,8 +2344,8 @@ const To = w.div`
2334
2344
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
2335
2345
  );
2336
2346
  const d = te("(max-width: 400px)");
2337
- return cn(
2338
- /* @__PURE__ */ a($o, { smallScreen: d, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a(Io, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
2347
+ return un(
2348
+ /* @__PURE__ */ a($o, { smallScreen: d, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(Io, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
2339
2349
  /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
2340
2350
  /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
2341
2351
  /* @__PURE__ */ m(v, { direction: "column", gap: "8px", children: [
@@ -2351,23 +2361,23 @@ const To = w.div`
2351
2361
  ),
2352
2362
  /* @__PURE__ */ a($, { size: "medium", appearance: "gray", children: t })
2353
2363
  ] }),
2354
- /* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: o })
2364
+ /* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: o })
2355
2365
  ] }),
2356
- /* @__PURE__ */ a(B, { dashed: !0 })
2366
+ /* @__PURE__ */ a(G, { dashed: !0 })
2357
2367
  ] }),
2358
2368
  n
2359
2369
  ] }) }) }) }),
2360
2370
  s
2361
2371
  );
2362
2372
  }, Fo = (e) => ({
2363
- schema: le().required("Requerido").test(
2373
+ schema: ie().required("Requerido").test(
2364
2374
  "non-empty",
2365
2375
  "El valor no puede estar vacío",
2366
2376
  (n) => n != null && n.trim() !== ""
2367
2377
  ),
2368
2378
  value: e
2369
2379
  }), Lo = (e) => ({
2370
- schema: Pe().test(
2380
+ schema: Me().test(
2371
2381
  "isArrayOrString",
2372
2382
  "Por favor selecciona una opcion",
2373
2383
  (n) => Array.isArray(n) ? n.every(
@@ -2376,7 +2386,7 @@ const To = w.div`
2376
2386
  ),
2377
2387
  value: e
2378
2388
  }), Oo = (e) => ({
2379
- schema: Pe().test(
2389
+ schema: Me().test(
2380
2390
  "isArrayOrString",
2381
2391
  "Por favor selecciona al menos una opcion",
2382
2392
  (n) => Array.isArray(n) ? n.every(
@@ -2388,8 +2398,8 @@ const To = w.div`
2388
2398
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
2389
2399
  return {
2390
2400
  schema: ne({
2391
- from: se().required("El campo de tipo rango es requerido").max(t, "El rango desde no puede ser mayor al rango hasta").min(0, "El rango desde no puede ser menor a 0"),
2392
- to: se().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
2401
+ from: le().required("El campo de tipo rango es requerido").max(t, "El rango desde no puede ser mayor al rango hasta").min(0, "El rango desde no puede ser menor a 0"),
2402
+ to: le().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
2393
2403
  "is-greater",
2394
2404
  "El rengo hasta debe ser mayor a el rango desde",
2395
2405
  function(r) {
@@ -2403,25 +2413,25 @@ const To = w.div`
2403
2413
  }, bn = (e, n) => {
2404
2414
  if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
2405
2415
  const t = e;
2406
- return n === j.PERCENTAGE ? {
2416
+ return n === _.PERCENTAGE ? {
2407
2417
  schema: ne({
2408
- from: se().required("El campo desde es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2409
- to: se().required("El campo hasta es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100")
2418
+ from: le().required("El campo desde es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2419
+ to: le().required("El campo hasta es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100")
2410
2420
  }),
2411
2421
  value: t
2412
2422
  } : {
2413
2423
  schema: ne({
2414
- from: le().required("Requerido"),
2415
- to: le().required("Requerido")
2424
+ from: ie().required("Requerido"),
2425
+ to: ie().required("Requerido")
2416
2426
  }),
2417
2427
  value: t
2418
2428
  };
2419
2429
  }
2420
- return n === j.PERCENTAGE ? {
2421
- 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"),
2430
+ return n === _.PERCENTAGE ? {
2431
+ schema: le().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"),
2422
2432
  value: e
2423
2433
  } : {
2424
- schema: le().required("Requerido"),
2434
+ schema: ie().required("Requerido"),
2425
2435
  value: e
2426
2436
  };
2427
2437
  }, Mo = {
@@ -2432,44 +2442,43 @@ const To = w.div`
2432
2442
  [A.LESS_THAN]: bn,
2433
2443
  [A.EQUAL]: bn
2434
2444
  }, Gn = (e) => Mo[e] || Fo;
2435
- var ge = /* @__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))(ge || {});
2445
+ var be = /* @__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))(be || {});
2436
2446
  function zo({
2437
2447
  decision: e,
2438
2448
  onSubmitEvent: n,
2439
2449
  textValues: t
2440
2450
  }) {
2441
- const r = Be(e) || {}, o = () => Object.values(r).flat(), i = {
2451
+ const r = Oe(e) || {}, o = () => Object.values(r).flat(), i = {
2442
2452
  ruleName: e.ruleName || "",
2443
- decisionDataType: e.decisionDataType || j.ALPHABETICAL,
2453
+ decisionDataType: e.decisionDataType || _.ALPHABETICAL,
2444
2454
  howToSetTheDecision: e.howToSetTheDecision || "",
2445
2455
  value: e.value || "",
2446
2456
  effectiveFrom: e.effectiveFrom || "",
2447
2457
  validUntil: e.validUntil || "",
2448
2458
  toggleNone: !0,
2449
- // form stores condition values in a flat dictionary by conditionName
2450
2459
  conditionsThatEstablishesTheDecision: {},
2451
2460
  checkClosed: !1,
2452
2461
  terms: !0
2453
2462
  };
2454
2463
  let s;
2455
2464
  const d = {
2456
- ruleName: le().required("El nombre de la decision es requerido"),
2457
- value: qe(() => Gn(
2465
+ ruleName: ie().required("El nombre de la decision es requerido"),
2466
+ value: Be(() => Gn(
2458
2467
  s.values.howToSetTheDecision
2459
2468
  )(
2460
2469
  s.values.value,
2461
2470
  s.values.decisionDataType
2462
2471
  ).schema),
2463
- conditionsThatEstablishesTheDecision: qe((u, { parent: c }) => {
2472
+ conditionsThatEstablishesTheDecision: Be((u, { parent: c }) => {
2464
2473
  if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return ne().shape({});
2465
2474
  const f = o().reduce(
2466
2475
  (x, y) => {
2467
2476
  var T;
2468
2477
  if (((T = s.values.conditionsThatEstablishesTheDecision) == null ? void 0 : T[y.conditionName]) !== void 0) {
2469
- const S = Gn(
2478
+ const E = Gn(
2470
2479
  y.howToSetTheCondition
2471
2480
  );
2472
- x[y.conditionName] = S(
2481
+ x[y.conditionName] = E(
2473
2482
  y.value,
2474
2483
  y.conditionDataType
2475
2484
  ).schema;
@@ -2508,15 +2517,15 @@ function zo({
2508
2517
  onSubmit: (u) => {
2509
2518
  const c = Object.fromEntries(
2510
2519
  Object.entries(r).map(([h, f]) => {
2511
- const y = f.filter((D) => {
2512
- var S;
2513
- const T = (S = u.conditionsThatEstablishesTheDecision) == null ? void 0 : S[D.conditionName];
2520
+ const y = f.filter((w) => {
2521
+ var E;
2522
+ const T = (E = u.conditionsThatEstablishesTheDecision) == null ? void 0 : E[w.conditionName];
2514
2523
  return T != null && T !== "";
2515
- }).map((D) => {
2524
+ }).map((w) => {
2516
2525
  var T;
2517
2526
  return {
2518
- ...D,
2519
- value: (T = u.conditionsThatEstablishesTheDecision) == null ? void 0 : T[D.conditionName]
2527
+ ...w,
2528
+ value: (T = u.conditionsThatEstablishesTheDecision) == null ? void 0 : T[w.conditionName]
2520
2529
  };
2521
2530
  });
2522
2531
  return [h, y];
@@ -2541,7 +2550,7 @@ function zo({
2541
2550
  void 0
2542
2551
  );
2543
2552
  else {
2544
- const h = g.howToSetTheCondition === ge.LIST_OF_VALUES_MULTI ? [] : "";
2553
+ const h = g.howToSetTheCondition === be.LIST_OF_VALUES_MULTI ? [] : "";
2545
2554
  s.setFieldValue(
2546
2555
  `conditionsThatEstablishesTheDecision.${g.conditionName}`,
2547
2556
  h
@@ -2550,17 +2559,17 @@ function zo({
2550
2559
  });
2551
2560
  } };
2552
2561
  }
2553
- w.div`
2562
+ C.div`
2554
2563
  & > div {
2555
2564
  border-radius: 8px;
2556
2565
  border: 1px solid
2557
2566
  ${({ theme: e }) => {
2558
2567
  var n, t;
2559
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
2568
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
2560
2569
  }};
2561
2570
  }
2562
2571
  `;
2563
- w.div`
2572
+ C.div`
2564
2573
  width: 100%;
2565
2574
  height: 100%;
2566
2575
  overflow-y: auto;
@@ -2578,7 +2587,7 @@ w.div`
2578
2587
  border-radius: 8px;
2579
2588
  }
2580
2589
  `;
2581
- const Vo = w.div`
2590
+ const Vo = C.div`
2582
2591
  display: flex;
2583
2592
  width: -webkit-fill-available;
2584
2593
  & > div {
@@ -2602,12 +2611,12 @@ const Vo = w.div`
2602
2611
  messageEnd: c = "",
2603
2612
  statusStart: g = "pending",
2604
2613
  statusEnd: h = "pending"
2605
- } = e, [f, x] = z(s), [y, D] = z(l), [T, S] = z(p), N = ({ target: k }) => {
2614
+ } = e, [f, x] = U(s), [y, w] = U(l), [T, E] = U(p), N = ({ target: k }) => {
2606
2615
  x(k.checked), r && r(k.checked);
2607
- }, C = (k) => {
2608
- D(k.target.value), n(k);
2616
+ }, D = (k) => {
2617
+ w(k.target.value), n(k);
2609
2618
  }, I = (k) => {
2610
- S(k.target.value), t(k);
2619
+ E(k.target.value), t(k);
2611
2620
  }, F = te("(max-width: 400px)");
2612
2621
  return /* @__PURE__ */ m(v, { direction: "column", width: "100%", gap: "20px", children: [
2613
2622
  /* @__PURE__ */ m(v, { justifyContent: "space-between", children: [
@@ -2634,7 +2643,7 @@ const Vo = w.div`
2634
2643
  {
2635
2644
  id: "dateStart",
2636
2645
  label: o,
2637
- onChange: C,
2646
+ onChange: D,
2638
2647
  value: y,
2639
2648
  required: d,
2640
2649
  size: "compact",
@@ -2679,17 +2688,17 @@ const Vo = w.div`
2679
2688
  portalId: f,
2680
2689
  showRedefineConfirm: x,
2681
2690
  onOpenRedefineConfirm: y,
2682
- onCloseRedefineConfirm: D,
2691
+ onCloseRedefineConfirm: w,
2683
2692
  onConfirmRedefine: T
2684
2693
  } = e;
2685
- return /* @__PURE__ */ m(O, { children: [
2694
+ return /* @__PURE__ */ m(z, { children: [
2686
2695
  /* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", width: "100%", children: [
2687
- /* @__PURE__ */ a(je, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ a(v, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
2696
+ /* @__PURE__ */ a(Ue, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ a(v, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
2688
2697
  condition: i,
2689
2698
  formik: o,
2690
2699
  isDecision: !0
2691
2700
  }) }) }),
2692
- /* @__PURE__ */ a(je, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(v, { direction: "column", gap: "20px", width: "100%", children: [
2701
+ /* @__PURE__ */ a(Ue, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(v, { direction: "column", gap: "20px", width: "100%", children: [
2693
2702
  /* @__PURE__ */ a(
2694
2703
  st,
2695
2704
  {
@@ -2700,7 +2709,7 @@ const Vo = w.div`
2700
2709
  ),
2701
2710
  /* @__PURE__ */ m(v, { justifyContent: "flex-end", alignItems: "center", children: [
2702
2711
  /* @__PURE__ */ a(
2703
- M,
2712
+ j,
2704
2713
  {
2705
2714
  icon: /* @__PURE__ */ a(Ot, {}),
2706
2715
  appearance: "help",
@@ -2709,7 +2718,7 @@ const Vo = w.div`
2709
2718
  }
2710
2719
  ),
2711
2720
  /* @__PURE__ */ a(
2712
- q,
2721
+ B,
2713
2722
  {
2714
2723
  type: "button",
2715
2724
  iconBefore: /* @__PURE__ */ a(Pt, {}),
@@ -2721,7 +2730,7 @@ const Vo = w.div`
2721
2730
  }
2722
2731
  )
2723
2732
  ] }),
2724
- /* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: r == null ? void 0 : r.map((S) => /* @__PURE__ */ m(
2733
+ /* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: r == null ? void 0 : r.map((E) => /* @__PURE__ */ m(
2725
2734
  v,
2726
2735
  {
2727
2736
  gap: "16px",
@@ -2730,26 +2739,26 @@ const Vo = w.div`
2730
2739
  /* @__PURE__ */ a(Vo, { children: /* @__PURE__ */ a(
2731
2740
  Vn,
2732
2741
  {
2733
- condition: S,
2742
+ condition: E,
2734
2743
  formik: o
2735
2744
  }
2736
2745
  ) }),
2737
2746
  /* @__PURE__ */ a(
2738
- M,
2747
+ j,
2739
2748
  {
2740
- icon: /* @__PURE__ */ a(an, {}),
2749
+ icon: /* @__PURE__ */ a(ln, {}),
2741
2750
  appearance: "danger",
2742
2751
  cursorHover: !0,
2743
- onClick: () => d(S.conditionName)
2752
+ onClick: () => d(E.conditionName)
2744
2753
  }
2745
2754
  )
2746
2755
  ]
2747
2756
  },
2748
- S.conditionName
2757
+ E.conditionName
2749
2758
  )) }),
2750
2759
  p && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
2751
2760
  ] }) }),
2752
- /* @__PURE__ */ a(je, { legend: "Vigencia", spacing: "wide", children: h.terms && /* @__PURE__ */ a(
2761
+ /* @__PURE__ */ a(Ue, { legend: "Vigencia", spacing: "wide", children: h.terms && /* @__PURE__ */ a(
2753
2762
  jo,
2754
2763
  {
2755
2764
  labelStart: h.termStart,
@@ -2760,17 +2769,17 @@ const Vo = w.div`
2760
2769
  messageEnd: o.errors.validUntil,
2761
2770
  statusStart: g,
2762
2771
  statusEnd: c,
2763
- onHandleStartChange: (S) => o.setFieldValue("effectiveFrom", S.target.value),
2764
- onHandleEndChange: (S) => o.setFieldValue("validUntil", S.target.value),
2765
- onCheckClosedChange: (S) => {
2766
- o.setFieldValue("checkClosed", S), S && o.setFieldValue("validUntil", "");
2772
+ onHandleStartChange: (E) => o.setFieldValue("effectiveFrom", E.target.value),
2773
+ onHandleEndChange: (E) => o.setFieldValue("validUntil", E.target.value),
2774
+ onCheckClosedChange: (E) => {
2775
+ o.setFieldValue("checkClosed", E), E && o.setFieldValue("validUntil", "");
2767
2776
  },
2768
2777
  checkedClosed: o.values.checkClosed
2769
2778
  }
2770
2779
  ) }),
2771
2780
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
2772
- /* @__PURE__ */ a(q, { appearance: "gray", onClick: s, variant: "outlined", children: h.cancel }),
2773
- /* @__PURE__ */ a(q, { type: "submit", children: h.confirm })
2781
+ /* @__PURE__ */ a(B, { appearance: "gray", onClick: s, variant: "outlined", children: h.cancel }),
2782
+ /* @__PURE__ */ a(B, { type: "submit", children: h.confirm })
2774
2783
  ] })
2775
2784
  ] }) }),
2776
2785
  x && f && /* @__PURE__ */ a(
@@ -2778,22 +2787,22 @@ const Vo = w.div`
2778
2787
  {
2779
2788
  portalId: f,
2780
2789
  title: "Redefinir la condición",
2781
- onCloseModal: D,
2790
+ onCloseModal: w,
2782
2791
  children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
2783
2792
  /* @__PURE__ */ a($, { 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 ." }),
2784
2793
  /* @__PURE__ */ m(v, { justifyContent: "end", gap: "12px", children: [
2785
2794
  /* @__PURE__ */ a(
2786
- q,
2795
+ B,
2787
2796
  {
2788
2797
  type: "button",
2789
2798
  appearance: "gray",
2790
2799
  variant: "outlined",
2791
- onClick: D,
2800
+ onClick: w,
2792
2801
  cursorHover: !0,
2793
2802
  children: "Cancelar"
2794
2803
  }
2795
2804
  ),
2796
- /* @__PURE__ */ a(q, { type: "button", onClick: T, cursorHover: !0, children: "Confirmar" })
2805
+ /* @__PURE__ */ a(B, { type: "button", onClick: T, cursorHover: !0, children: "Confirmar" })
2797
2806
  ] })
2798
2807
  ] })
2799
2808
  }
@@ -2851,20 +2860,20 @@ function Qo(e) {
2851
2860
  return "sea";
2852
2861
  }
2853
2862
  }
2854
- const Zo = (e) => {
2863
+ const Ko = (e) => {
2855
2864
  if (typeof e == "string") {
2856
2865
  const n = e.toLowerCase();
2857
- if (n.includes("equal")) return ge.EQUAL;
2858
- if (n.includes("greater")) return ge.GREATER_THAN;
2859
- if (n.includes("less")) return ge.LESS_THAN;
2860
- if (n.includes("range") || n.includes("between")) return ge.RANGE;
2861
- if (n.includes("multi")) return ge.LIST_OF_VALUES_MULTI;
2866
+ if (n.includes("equal")) return be.EQUAL;
2867
+ if (n.includes("greater")) return be.GREATER_THAN;
2868
+ if (n.includes("less")) return be.LESS_THAN;
2869
+ if (n.includes("range") || n.includes("between")) return be.RANGE;
2870
+ if (n.includes("multi")) return be.LIST_OF_VALUES_MULTI;
2862
2871
  if (n.includes("list_of_values") || n.includes("among") || n.includes("in"))
2863
- return ge.LIST_OF_VALUES;
2872
+ return be.LIST_OF_VALUES;
2864
2873
  }
2865
- return e ?? ge.EQUAL;
2866
- }, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Ko = (e) => {
2867
- var ze;
2874
+ return e ?? be.EQUAL;
2875
+ }, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Zo = (e) => {
2876
+ var Ve;
2868
2877
  const {
2869
2878
  decision: n,
2870
2879
  onSubmitEvent: t,
@@ -2877,122 +2886,122 @@ const Zo = (e) => {
2877
2886
  decision: n,
2878
2887
  onSubmitEvent: t,
2879
2888
  textValues: r
2880
- }), c = Be(d ?? n), g = Be(n), h = ht(
2889
+ }), c = Oe(d ?? n), g = Oe(n), h = ht(
2881
2890
  g,
2882
2891
  (R) => !R.hidden
2883
2892
  ), f = Object.keys(h), x = [
2884
2893
  ...f.filter((R) => R === "group-primary"),
2885
2894
  ...f.filter((R) => R !== "group-primary")
2886
2895
  ], y = {};
2887
- let D = 1;
2896
+ let w = 1;
2888
2897
  const T = x.map((R) => {
2889
- const H = R === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
2890
- return y[H] = R, {
2891
- id: H,
2892
- label: R === "group-primary" ? Yn(R, 0) : Yn(R, Number(H.split("-").at(-1))),
2898
+ const q = R === "group-primary" ? "mainCondition" : `alternateCondition-${w++}`;
2899
+ return y[q] = R, {
2900
+ id: q,
2901
+ label: R === "group-primary" ? Yn(R, 0) : Yn(R, Number(q.split("-").at(-1))),
2893
2902
  isDisabled: !1
2894
2903
  };
2895
- }), [S, N] = V.useState(
2896
- ((ze = T[0]) == null ? void 0 : ze.id) ?? "mainCondition"
2897
- ), C = (R) => N(R), I = y[S] ?? "group-primary", F = V.useMemo(() => {
2904
+ }), [E, N] = V.useState(
2905
+ ((Ve = T[0]) == null ? void 0 : Ve.id) ?? "mainCondition"
2906
+ ), D = (R) => N(R), I = y[E] ?? "group-primary", F = V.useMemo(() => {
2898
2907
  const R = [
2899
- ...Object.keys(h).filter((Z) => Z === "group-primary"),
2900
- ...Object.keys(h).filter((Z) => Z !== "group-primary")
2908
+ ...Object.keys(h).filter((K) => K === "group-primary"),
2909
+ ...Object.keys(h).filter((K) => K !== "group-primary")
2901
2910
  ];
2902
- let H = !1;
2903
- const Q = R.map((Z) => {
2904
- const At = (h[Z] ?? []).map((Ze, $t) => {
2905
- const Mn = !H && Z === "group-primary" && $t === 0;
2906
- Mn && (H = !0);
2907
- const It = Zo(Ze.howToSetTheCondition ?? Ze.valueUse), Rt = _o({
2908
- label: Ze.labelName || "",
2911
+ let q = !1;
2912
+ const Q = R.map((K) => {
2913
+ const At = (h[K] ?? []).map((Ke, $t) => {
2914
+ const Mn = !q && K === "group-primary" && $t === 0;
2915
+ Mn && (q = !0);
2916
+ const It = Ko(Ke.howToSetTheCondition ?? Ke.valueUse), Rt = _o({
2917
+ label: Ke.labelName || "",
2909
2918
  howToSet: It,
2910
2919
  isFirst: Mn
2911
2920
  });
2912
- return { ...Ze, labelName: Rt };
2921
+ return { ...Ke, labelName: Rt };
2913
2922
  });
2914
- return [Z, At];
2923
+ return [K, At];
2915
2924
  });
2916
2925
  return Object.fromEntries(Q);
2917
- }, [h]), k = F[I] ?? [], _ = F["group-primary"] ?? [], ae = {
2926
+ }, [h]), k = F[I] ?? [], H = F["group-primary"] ?? [], se = {
2918
2927
  decisionDataType: n.decisionDataType,
2919
2928
  howToSetTheCondition: n.howToSetTheDecision,
2920
2929
  labelName: n.labelName,
2921
2930
  listOfPossibleValues: n.listOfPossibleValues,
2922
2931
  ruleName: n.ruleName
2923
- }, he = l.submitCount > 0 || !!l.touched.effectiveFrom, fe = l.submitCount > 0 || !!l.touched.validUntil, pe = he ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, ie = fe ? l.errors.validUntil ? "invalid" : "valid" : void 0, me = V.useMemo(() => {
2932
+ }, ve = l.submitCount > 0 || !!l.touched.effectiveFrom, pe = l.submitCount > 0 || !!l.touched.validUntil, ge = ve ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, ae = pe ? l.errors.validUntil ? "invalid" : "valid" : void 0, ye = V.useMemo(() => {
2924
2933
  const R = l.errors.conditionsThatEstablishesTheDecision;
2925
2934
  if (!R) return;
2926
2935
  if (typeof R == "string") return R;
2927
- const H = (Q) => {
2936
+ const q = (Q) => {
2928
2937
  if (Q) {
2929
2938
  if (typeof Q == "string") return Q;
2930
2939
  if (Array.isArray(Q))
2931
- for (const Z of Q) {
2932
- const ye = H(Z);
2933
- if (ye) return ye;
2940
+ for (const K of Q) {
2941
+ const xe = q(K);
2942
+ if (xe) return xe;
2934
2943
  }
2935
2944
  else if (typeof Q == "object")
2936
- for (const Z of Object.values(Q)) {
2937
- const ye = H(Z);
2938
- if (ye) return ye;
2945
+ for (const K of Object.values(Q)) {
2946
+ const xe = q(K);
2947
+ if (xe) return xe;
2939
2948
  }
2940
2949
  }
2941
2950
  };
2942
- return H(R);
2943
- }, [l.errors.conditionsThatEstablishesTheDecision]), be = l.submitCount > 0 && !!me, P = (R) => R != null && R.isMulti || R != null && R.multiple || (R == null ? void 0 : R.valueUse) === "Among" ? [] : "", de = (R) => {
2944
- const Q = Object.values(c).flat().find((ye) => ye.conditionName === R), Z = P(Q);
2951
+ return q(R);
2952
+ }, [l.errors.conditionsThatEstablishesTheDecision]), Se = l.submitCount > 0 && !!ye, de = (R) => R != null && R.isMulti || R != null && R.multiple || (R == null ? void 0 : R.valueUse) === "Among" ? [] : "", he = (R) => {
2953
+ const Q = Object.values(c).flat().find((xe) => xe.conditionName === R), K = de(Q);
2945
2954
  l.setFieldValue(
2946
2955
  `conditionsThatEstablishesTheDecision.${R}`,
2947
- Z
2956
+ K
2948
2957
  ), l.setFieldTouched(
2949
2958
  `conditionsThatEstablishesTheDecision.${R}`,
2950
2959
  !1,
2951
2960
  !1
2952
2961
  );
2953
- }, ke = () => {
2954
- (c[I] ?? []).forEach((H) => {
2955
- const Q = `conditionsThatEstablishesTheDecision.${H.conditionName}`;
2956
- l.setFieldValue(Q, P(H)), l.setFieldTouched(Q, !1, !1);
2962
+ }, fe = () => {
2963
+ (c[I] ?? []).forEach((q) => {
2964
+ const Q = `conditionsThatEstablishesTheDecision.${q.conditionName}`;
2965
+ l.setFieldValue(Q, de(q)), l.setFieldTouched(Q, !1, !1);
2957
2966
  });
2958
- }, [Ae, ve] = V.useState(!1);
2967
+ }, [me, L] = V.useState(!1);
2959
2968
  return /* @__PURE__ */ a(
2960
2969
  Uo,
2961
2970
  {
2962
- activeTab: S,
2963
- conditionsErrorText: me,
2971
+ activeTab: E,
2972
+ conditionsErrorText: ye,
2964
2973
  currentConditions: k,
2965
2974
  decision: n,
2966
2975
  formik: l,
2967
- normalizedDecision: ae,
2976
+ normalizedDecision: se,
2968
2977
  onCancel: o,
2969
- onRedefineCurrentTab: ke,
2970
- onTabChange: C,
2978
+ onRedefineCurrentTab: fe,
2979
+ onTabChange: D,
2971
2980
  onClearCondition: (R) => {
2972
- de(R), i == null || i(R);
2981
+ he(R), i == null || i(R);
2973
2982
  },
2974
- showConditionsError: be,
2983
+ showConditionsError: Se,
2975
2984
  tabs: T,
2976
- termEndStatus: ie,
2977
- termStartStatus: pe,
2985
+ termEndStatus: ae,
2986
+ termStartStatus: ge,
2978
2987
  textValues: r,
2979
- visibleConditions: _,
2988
+ visibleConditions: H,
2980
2989
  visibleConditionsByGroup: F,
2981
2990
  handleToggleNoneChange: p,
2982
2991
  portalId: "redefine-confirm-portal",
2983
- showRedefineConfirm: Ae,
2984
- onOpenRedefineConfirm: () => ve(!0),
2985
- onCloseRedefineConfirm: () => ve(!1),
2992
+ showRedefineConfirm: me,
2993
+ onOpenRedefineConfirm: () => L(!0),
2994
+ onCloseRedefineConfirm: () => L(!1),
2986
2995
  onConfirmRedefine: () => {
2987
- ke();
2996
+ fe();
2988
2997
  const R = (c[I] ?? []).map(
2989
- (H) => H.conditionName
2998
+ (q) => q.conditionName
2990
2999
  );
2991
- s == null || s(R), ve(!1);
3000
+ s == null || s(R), L(!1);
2992
3001
  }
2993
3002
  }
2994
3003
  );
2995
- }, fl = (e) => {
3004
+ }, ml = (e) => {
2996
3005
  const {
2997
3006
  controls: n = !0,
2998
3007
  customTitleContentAddCard: t,
@@ -3010,8 +3019,8 @@ const Zo = (e) => {
3010
3019
  terms: f = !0,
3011
3020
  onRemoveCondition: x,
3012
3021
  onRestoreConditions: y,
3013
- baseDecisionTemplate: D
3014
- } = e, [T, S] = z(null), N = te("(max-width: 681px)"), { renderedCards: C, shouldRenderAddCard: I } = Ao({
3022
+ baseDecisionTemplate: w
3023
+ } = e, [T, E] = U(null), N = te("(max-width: 681px)"), { renderedCards: D, shouldRenderAddCard: I } = Ao({
3015
3024
  controls: n,
3016
3025
  customTitleContentAddCard: t,
3017
3026
  decisions: o,
@@ -3020,10 +3029,10 @@ const Zo = (e) => {
3020
3029
  handleDelete: h,
3021
3030
  textValues: i,
3022
3031
  isOpenFor: (k) => T === k,
3023
- toggleAt: (k) => S((_) => _ === k ? null : k)
3032
+ toggleAt: (k) => E((H) => H === k ? null : k)
3024
3033
  }), F = (o == null ? void 0 : o.length) === 0 && !p;
3025
- return /* @__PURE__ */ m(O, { children: [
3026
- /* @__PURE__ */ a(Co, { children: /* @__PURE__ */ a(Do, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: F ? /* @__PURE__ */ a(je, { legend: "Decisiones", children: /* @__PURE__ */ m(
3034
+ return /* @__PURE__ */ m(z, { children: [
3035
+ /* @__PURE__ */ a(Co, { children: /* @__PURE__ */ a(Do, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: F ? /* @__PURE__ */ a(Ue, { legend: "Decisiones", children: /* @__PURE__ */ m(
3027
3036
  v,
3028
3037
  {
3029
3038
  direction: "column",
@@ -3033,7 +3042,7 @@ const Zo = (e) => {
3033
3042
  alignItems: "center",
3034
3043
  children: [
3035
3044
  /* @__PURE__ */ a(
3036
- M,
3045
+ j,
3037
3046
  {
3038
3047
  appearance: "help",
3039
3048
  icon: /* @__PURE__ */ a(Mt, {}),
@@ -3050,7 +3059,7 @@ const Zo = (e) => {
3050
3059
  children: "Sin decisiones"
3051
3060
  }
3052
3061
  ),
3053
- /* @__PURE__ */ a($, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
3062
+ /* @__PURE__ */ a($, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ m(z, { children: [
3054
3063
  "Aun no tienes decisiones definidas, para empezar haz clic en",
3055
3064
  t || ' "Agregar decisión"'
3056
3065
  ] }) })
@@ -3069,7 +3078,7 @@ const Zo = (e) => {
3069
3078
  padding: "6px",
3070
3079
  height: N ? "auto" : "484px",
3071
3080
  children: [
3072
- C,
3081
+ D,
3073
3082
  I && Dn({
3074
3083
  type: "add",
3075
3084
  index: o == null ? void 0 : o.length,
@@ -3094,10 +3103,10 @@ const Zo = (e) => {
3094
3103
  title: l ? "Editar Decisión" : "Configurar Decisión",
3095
3104
  description: "Diligencia los campos para configurar tu decisión.",
3096
3105
  children: /* @__PURE__ */ a(
3097
- Ko,
3106
+ Zo,
3098
3107
  {
3099
3108
  decision: l || s,
3100
- fullTemplate: D ?? s,
3109
+ fullTemplate: w ?? s,
3101
3110
  onSubmitEvent: g,
3102
3111
  textValues: i,
3103
3112
  onCancel: () => c ? c() : () => {
@@ -3111,9 +3120,9 @@ const Zo = (e) => {
3111
3120
  ] });
3112
3121
  }, Jo = {
3113
3122
  border: {
3114
- color: E.palette.neutral.N40
3123
+ color: S.palette.neutral.N40
3115
3124
  }
3116
- }, ea = w.div`
3125
+ }, ea = C.div`
3117
3126
  border-width: 1px;
3118
3127
  border-style: solid;
3119
3128
  border-color: ${({ theme: e }) => {
@@ -3149,70 +3158,70 @@ function na(e) {
3149
3158
  );
3150
3159
  }
3151
3160
  const ta = (e, n) => {
3152
- const [t, r] = z([]), [o, i] = z([]), [s, d] = z(!1), l = Ie(null);
3153
- return Ee(() => {
3161
+ const [t, r] = U([]), [o, i] = U([]), [s, d] = U(!1), l = Ie(null);
3162
+ return ke(() => {
3154
3163
  if (!e.current || !l.current) return;
3155
3164
  const p = e.current, u = l.current, c = () => {
3156
- var S;
3165
+ var E;
3157
3166
  const h = p.clientWidth, f = Array.from(
3158
3167
  u.querySelectorAll('[data-filter-tag="true"]')
3159
3168
  ), x = 48;
3160
3169
  let y = 0;
3161
- const D = [], T = [];
3170
+ const w = [], T = [];
3162
3171
  for (let N = 0; N < n.length; N++) {
3163
- const C = ((S = f[N]) == null ? void 0 : S.offsetWidth) ?? 0;
3164
- y + C + x <= h ? (D.push(n[N]), y += C) : T.push(n[N]);
3172
+ const D = ((E = f[N]) == null ? void 0 : E.offsetWidth) ?? 0;
3173
+ y + D + x <= h ? (w.push(n[N]), y += D) : T.push(n[N]);
3165
3174
  }
3166
- r(D), i(T), d(T.length > 0);
3175
+ r(w), i(T), d(T.length > 0);
3167
3176
  }, g = new ResizeObserver(() => {
3168
3177
  requestAnimationFrame(c);
3169
3178
  });
3170
3179
  return g.observe(p), () => g.disconnect();
3171
3180
  }, [n, e]), { visible: t, hidden: o, showOverflowIndicator: s, measurementRef: l };
3172
3181
  };
3173
- w.div`
3182
+ C.div`
3174
3183
  & > div {
3175
3184
  width: 100%;
3176
3185
  }
3177
3186
  `;
3178
- const ra = w.div`
3187
+ const ra = C.div`
3179
3188
  position: absolute;
3180
3189
  top: calc(100% + 4px);
3181
3190
  right: 0;
3182
3191
  z-index: 1000;
3183
3192
  width: 170px;
3184
- `, oa = w.div`
3193
+ `, oa = C.div`
3185
3194
  position: absolute;
3186
3195
  visibility: hidden;
3187
3196
  pointer-events: none;
3188
3197
  height: 0;
3189
3198
  overflow: hidden;
3190
- `, aa = w.div`
3199
+ `, aa = C.div`
3191
3200
  cursor: pointer;
3192
3201
  `, Sn = {
3193
3202
  border: {
3194
3203
  color: {
3195
- regular: E.palette.neutral.N40,
3196
- disabled: E.palette.neutral.N40,
3197
- focus: E.palette.blue.B300,
3198
- invalid: E.palette.red.R400
3204
+ regular: S.palette.neutral.N40,
3205
+ disabled: S.palette.neutral.N40,
3206
+ focus: S.palette.blue.B300,
3207
+ invalid: S.palette.red.R400
3199
3208
  }
3200
3209
  },
3201
3210
  background: {
3202
3211
  color: {
3203
- regular: E.palette.neutral.N0,
3204
- disabled: E.palette.neutral.N10
3212
+ regular: S.palette.neutral.N0,
3213
+ disabled: S.palette.neutral.N10
3205
3214
  }
3206
3215
  },
3207
3216
  content: {
3208
3217
  color: {
3209
- regular: E.palette.neutral.N900,
3210
- disabled: E.palette.neutral.N70
3218
+ regular: S.palette.neutral.N900,
3219
+ disabled: S.palette.neutral.N70
3211
3220
  }
3212
3221
  },
3213
3222
  placeholder: {
3214
3223
  color: {
3215
- regular: E.palette.neutral.N300
3224
+ regular: S.palette.neutral.N300
3216
3225
  }
3217
3226
  },
3218
3227
  option: {
@@ -3221,11 +3230,11 @@ const ra = w.div`
3221
3230
  hover: "primary"
3222
3231
  },
3223
3232
  background: {
3224
- regular: E.palette.neutral.N0,
3225
- hover: E.palette.neutral.N30
3233
+ regular: S.palette.neutral.N0,
3234
+ hover: S.palette.neutral.N30
3226
3235
  }
3227
3236
  }
3228
- }, ia = w.li`
3237
+ }, ia = C.li`
3229
3238
  display: flex;
3230
3239
  align-items: center;
3231
3240
  align-self: stretch;
@@ -3244,8 +3253,8 @@ const ra = w.div`
3244
3253
  }};
3245
3254
  }
3246
3255
  `, la = (e) => {
3247
- var g, h, f, x, y, D;
3248
- const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = z(!1), d = () => s(!0), l = () => s(!1), p = Rn($n), u = ((f = (h = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Sn.option.appearance.hover, c = ((D = (y = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : y.appearance) == null ? void 0 : D.regular) ?? Sn.option.appearance.regular;
3256
+ var g, h, f, x, y, w;
3257
+ const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = U(!1), d = () => s(!0), l = () => s(!1), p = Rn($n), u = ((f = (h = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Sn.option.appearance.hover, c = ((w = (y = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : y.appearance) == null ? void 0 : w.regular) ?? Sn.option.appearance.regular;
3249
3258
  return /* @__PURE__ */ a(
3250
3259
  ia,
3251
3260
  {
@@ -3264,7 +3273,7 @@ const ra = w.div`
3264
3273
  width: "100%",
3265
3274
  children: [
3266
3275
  r && /* @__PURE__ */ a(
3267
- M,
3276
+ j,
3268
3277
  {
3269
3278
  icon: r,
3270
3279
  size: "medium",
@@ -3281,7 +3290,7 @@ const ra = w.div`
3281
3290
  }
3282
3291
  ),
3283
3292
  /* @__PURE__ */ a(
3284
- M,
3293
+ j,
3285
3294
  {
3286
3295
  icon: /* @__PURE__ */ a(zt, {}),
3287
3296
  size: "small",
@@ -3297,7 +3306,7 @@ const ra = w.div`
3297
3306
  )
3298
3307
  }
3299
3308
  );
3300
- }, ml = (e) => {
3309
+ }, bl = (e) => {
3301
3310
  const {
3302
3311
  appliedFilters: n = [],
3303
3312
  onClear: t,
@@ -3310,38 +3319,38 @@ const ra = w.div`
3310
3319
  hidden: c,
3311
3320
  showOverflowIndicator: g,
3312
3321
  measurementRef: h
3313
- } = ta(d, n), [f, x] = z(!1), y = (C) => {
3314
- C.stopPropagation(), x((I) => !I);
3322
+ } = ta(d, n), [f, x] = U(!1), y = (D) => {
3323
+ D.stopPropagation(), x((I) => !I);
3315
3324
  };
3316
- Ee(() => {
3317
- const C = (I) => {
3318
- var _, ae;
3325
+ ke(() => {
3326
+ const D = (I) => {
3327
+ var H, se;
3319
3328
  const F = I.target;
3320
- !((_ = l.current) != null && _.contains(F)) && !((ae = p.current) != null && ae.contains(F)) && x(!1);
3329
+ !((H = l.current) != null && H.contains(F)) && !((se = p.current) != null && se.contains(F)) && x(!1);
3321
3330
  };
3322
- return f && window.addEventListener("mousedown", C), () => window.removeEventListener("mousedown", C);
3331
+ return f && window.addEventListener("mousedown", D), () => window.removeEventListener("mousedown", D);
3323
3332
  }, [f]);
3324
- const D = n.length === 0, T = f && c.length > 0, S = c.map((C) => ({
3325
- id: C.label,
3326
- value: C.label,
3327
- label: C.label,
3328
- icon: C.icon
3329
- })), N = (C) => {
3333
+ const w = n.length === 0, T = f && c.length > 0, E = c.map((D) => ({
3334
+ id: D.label,
3335
+ value: D.label,
3336
+ label: D.label,
3337
+ icon: D.icon
3338
+ })), N = (D) => {
3330
3339
  var I, F;
3331
- (F = (I = c.find((k) => k.label === C)) == null ? void 0 : I.onClose) == null || F.call(I), x(!1);
3340
+ (F = (I = c.find((k) => k.label === D)) == null ? void 0 : I.onClose) == null || F.call(I), x(!1);
3332
3341
  };
3333
3342
  return /* @__PURE__ */ m(na, { borderRadius: "8px", width: "100%", children: [
3334
- /* @__PURE__ */ a(oa, { ref: h, children: n.map((C) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
3335
- De,
3343
+ /* @__PURE__ */ a(oa, { ref: h, children: n.map((D) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
3344
+ Ee,
3336
3345
  {
3337
3346
  appearance: "primary",
3338
3347
  displayIcon: !0,
3339
3348
  removable: !0,
3340
- icon: C.icon,
3341
- label: C.label,
3342
- onClose: C.onClose
3349
+ icon: D.icon,
3350
+ label: D.label,
3351
+ onClose: D.onClose
3343
3352
  }
3344
- ) }, C.label)) }),
3353
+ ) }, D.label)) }),
3345
3354
  /* @__PURE__ */ m(We, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
3346
3355
  /* @__PURE__ */ a(
3347
3356
  oe,
@@ -3355,19 +3364,19 @@ const ra = w.div`
3355
3364
  alignItems: "center",
3356
3365
  padding: "0px 8px",
3357
3366
  border: !0,
3358
- children: D ? /* @__PURE__ */ a($, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(O, { children: [
3359
- u.map((C) => /* @__PURE__ */ a(
3360
- De,
3367
+ children: w ? /* @__PURE__ */ a($, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(z, { children: [
3368
+ u.map((D) => /* @__PURE__ */ a(
3369
+ Ee,
3361
3370
  {
3362
3371
  "data-filter-tag": "true",
3363
3372
  appearance: "primary",
3364
3373
  displayIcon: !0,
3365
3374
  removable: !0,
3366
- icon: C.icon,
3367
- label: C.label,
3368
- onClose: C.onClose
3375
+ icon: D.icon,
3376
+ label: D.label,
3377
+ onClose: D.onClose
3369
3378
  },
3370
- C.label
3379
+ D.label
3371
3380
  )),
3372
3381
  g && /* @__PURE__ */ m(
3373
3382
  "div",
@@ -3376,7 +3385,7 @@ const ra = w.div`
3376
3385
  style: { position: "relative", display: "inline-block" },
3377
3386
  children: [
3378
3387
  /* @__PURE__ */ a(aa, { onClick: y, children: /* @__PURE__ */ a(
3379
- De,
3388
+ Ee,
3380
3389
  {
3381
3390
  appearance: "primary",
3382
3391
  label: `+${c.length}`
@@ -3385,20 +3394,20 @@ const ra = w.div`
3385
3394
  T && /* @__PURE__ */ a(ra, { ref: l, children: /* @__PURE__ */ a(
3386
3395
  Gt,
3387
3396
  {
3388
- options: S,
3397
+ options: E,
3389
3398
  onOptionClick: N,
3390
- children: c.map((C) => /* @__PURE__ */ a(
3399
+ children: c.map((D) => /* @__PURE__ */ a(
3391
3400
  la,
3392
3401
  {
3393
- id: C.label,
3394
- label: C.label,
3395
- leadingIcon: C.icon,
3402
+ id: D.label,
3403
+ label: D.label,
3404
+ leadingIcon: D.icon,
3396
3405
  onClose: () => {
3397
3406
  var I;
3398
- (I = C.onClose) == null || I.call(C), x(!1);
3407
+ (I = D.onClose) == null || I.call(D), x(!1);
3399
3408
  }
3400
3409
  },
3401
- C.label
3410
+ D.label
3402
3411
  ))
3403
3412
  }
3404
3413
  ) })
@@ -3409,10 +3418,10 @@ const ra = w.div`
3409
3418
  }
3410
3419
  ),
3411
3420
  /* @__PURE__ */ a(
3412
- q,
3421
+ B,
3413
3422
  {
3414
3423
  cursorHover: !0,
3415
- disabled: D,
3424
+ disabled: w,
3416
3425
  iconBefore: /* @__PURE__ */ a(it, {}),
3417
3426
  onClick: t,
3418
3427
  variant: "outlined",
@@ -3420,7 +3429,7 @@ const ra = w.div`
3420
3429
  }
3421
3430
  ),
3422
3431
  /* @__PURE__ */ a(
3423
- q,
3432
+ B,
3424
3433
  {
3425
3434
  cursorHover: !0,
3426
3435
  iconBefore: /* @__PURE__ */ a(lt, {}),
@@ -3431,12 +3440,12 @@ const ra = w.div`
3431
3440
  )
3432
3441
  ] })
3433
3442
  ] });
3434
- }, sa = w.div`
3443
+ }, sa = C.div`
3435
3444
  display: flex;
3436
3445
  flex-direction: column;
3437
3446
  background-color: ${({ theme: e }) => {
3438
3447
  var n, t;
3439
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
3448
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || S.palette.neutral.N0;
3440
3449
  }};
3441
3450
  width: ${({ $smallScreen: e }) => e ? "auto" : "450px"};
3442
3451
  height: auto;
@@ -3444,7 +3453,7 @@ const ra = w.div`
3444
3453
  padding: 24px;
3445
3454
  gap: 24px;
3446
3455
  box-sizing: border-box;
3447
- `, bl = (e) => {
3456
+ `, vl = (e) => {
3448
3457
  const {
3449
3458
  actionButtonLabel: n,
3450
3459
  cancelButtonLabel: t,
@@ -3459,30 +3468,30 @@ const ra = w.div`
3459
3468
  throw new Error(
3460
3469
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
3461
3470
  );
3462
- return cn(
3463
- /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ m(sa, { $smallScreen: p, children: [
3471
+ return un(
3472
+ /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ m(sa, { $smallScreen: p, children: [
3464
3473
  /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
3465
3474
  /* @__PURE__ */ m(v, { alignContent: "center", justifyContent: "space-between", children: [
3466
3475
  /* @__PURE__ */ a($, { appearance: "dark", size: "small", type: "headline", children: l }),
3467
3476
  /* @__PURE__ */ m(v, { alignItems: "center", children: [
3468
3477
  /* @__PURE__ */ a($, { children: "Cerrar" }),
3469
3478
  /* @__PURE__ */ a(
3470
- M,
3479
+ j,
3471
3480
  {
3472
3481
  appearance: "dark",
3473
- icon: /* @__PURE__ */ a(ln, {}),
3482
+ icon: /* @__PURE__ */ a(sn, {}),
3474
3483
  onClick: s,
3475
3484
  cursorHover: !0
3476
3485
  }
3477
3486
  )
3478
3487
  ] })
3479
3488
  ] }),
3480
- /* @__PURE__ */ a(B, {})
3489
+ /* @__PURE__ */ a(G, {})
3481
3490
  ] }),
3482
3491
  r,
3483
3492
  /* @__PURE__ */ m(v, { gap: "20px", justifyContent: "flex-end", children: [
3484
3493
  /* @__PURE__ */ a(
3485
- q,
3494
+ B,
3486
3495
  {
3487
3496
  appearance: "gray",
3488
3497
  onClick: s,
@@ -3493,7 +3502,7 @@ const ra = w.div`
3493
3502
  }
3494
3503
  ),
3495
3504
  /* @__PURE__ */ a(
3496
- q,
3505
+ B,
3497
3506
  {
3498
3507
  appearance: "primary",
3499
3508
  loading: o,
@@ -3507,12 +3516,12 @@ const ra = w.div`
3507
3516
  ] }) }),
3508
3517
  u
3509
3518
  );
3510
- }, vl = (e) => {
3519
+ }, yl = (e) => {
3511
3520
  const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, i = te("(max-width: 768px)"), s = !n || n.length === 0;
3512
3521
  return /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
3513
- i && /* @__PURE__ */ m(O, { children: [
3522
+ i && /* @__PURE__ */ m(z, { children: [
3514
3523
  /* @__PURE__ */ m(v, { gap: "6px", width: "100%", alignItems: "center", children: [
3515
- /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(lt, {}) }),
3524
+ /* @__PURE__ */ a(j, { appearance: "gray", icon: /* @__PURE__ */ a(lt, {}) }),
3516
3525
  /* @__PURE__ */ a(
3517
3526
  oe,
3518
3527
  {
@@ -3526,7 +3535,7 @@ const ra = w.div`
3526
3535
  width: "100%",
3527
3536
  height: "36px",
3528
3537
  children: s ? /* @__PURE__ */ a($, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ a(
3529
- De,
3538
+ Ee,
3530
3539
  {
3531
3540
  appearance: "primary",
3532
3541
  displayIcon: !0,
@@ -3540,10 +3549,10 @@ const ra = w.div`
3540
3549
  }
3541
3550
  )
3542
3551
  ] }),
3543
- /* @__PURE__ */ a(B, { dashed: !0 })
3552
+ /* @__PURE__ */ a(G, { dashed: !0 })
3544
3553
  ] }),
3545
3554
  t.map((d) => /* @__PURE__ */ m(v, { gap: "6px", alignItems: "center", children: [
3546
- /* @__PURE__ */ a(v, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(M, { appearance: "primary", icon: d.icon }) }),
3555
+ /* @__PURE__ */ a(v, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(j, { appearance: "primary", icon: d.icon }) }),
3547
3556
  /* @__PURE__ */ a(
3548
3557
  Yt,
3549
3558
  {
@@ -3566,7 +3575,7 @@ const ra = w.div`
3566
3575
  }, da = (e) => {
3567
3576
  const n = [];
3568
3577
  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(";");
3569
- }, yl = (e) => {
3578
+ }, xl = (e) => {
3570
3579
  var s;
3571
3580
  const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? da(d) : d, i = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
3572
3581
  var c;
@@ -3584,7 +3593,7 @@ const ra = w.div`
3584
3593
  value: o(n.value),
3585
3594
  conditionsThatEstablishesTheDecision: i
3586
3595
  };
3587
- }, xl = (e) => {
3596
+ }, Tl = (e) => {
3588
3597
  if (typeof e != "string") return e;
3589
3598
  const n = e.split(";").map((r) => r.trim()), t = {};
3590
3599
  for (const r of n)
@@ -3596,7 +3605,7 @@ const ra = w.div`
3596
3605
  isNaN(o) || (t.to = o);
3597
3606
  }
3598
3607
  return t.from !== void 0 || t.to !== void 0 ? t : e;
3599
- }, Tl = (e) => {
3608
+ }, wl = (e) => {
3600
3609
  const { dataDecision: n, originalDecision: t } = e, r = {
3601
3610
  conditionName: n.ruleName || "",
3602
3611
  labelName: n.labelName || "",
@@ -3612,7 +3621,7 @@ const ra = w.div`
3612
3621
  (o) => o.hidden ? { ...r } : o
3613
3622
  )
3614
3623
  };
3615
- }, wl = (e) => {
3624
+ }, Cl = (e) => {
3616
3625
  const { decisions: n } = e;
3617
3626
  return n == null ? void 0 : n.map((t) => {
3618
3627
  var o;
@@ -3632,14 +3641,14 @@ const ra = w.div`
3632
3641
  } : t;
3633
3642
  });
3634
3643
  }, ca = (e) => ({
3635
- schema: le().required("Requerido").test(
3644
+ schema: ie().required("Requerido").test(
3636
3645
  "non-empty",
3637
3646
  "El valor no puede estar vacío",
3638
3647
  (n) => n != null && n.trim() !== ""
3639
3648
  ),
3640
3649
  value: e
3641
3650
  }), ua = (e) => ({
3642
- schema: Pe().test(
3651
+ schema: Me().test(
3643
3652
  "isArrayOrString",
3644
3653
  "Debe ser un array de strings/numbers o un solo string",
3645
3654
  (n) => Array.isArray(n) ? n.every(
@@ -3648,7 +3657,7 @@ const ra = w.div`
3648
3657
  ),
3649
3658
  value: e
3650
3659
  }), pa = (e) => ({
3651
- schema: Pe().test(
3660
+ schema: Me().test(
3652
3661
  "isArrayOrString",
3653
3662
  "Debe ser un array de strings/numbers o un solo string ",
3654
3663
  (n) => Array.isArray(n) ? n.every(
@@ -3660,8 +3669,8 @@ const ra = w.div`
3660
3669
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
3661
3670
  return {
3662
3671
  schema: ne({
3663
- from: se().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
3664
- to: se().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
3672
+ from: le().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
3673
+ to: le().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
3665
3674
  "is-greater",
3666
3675
  "El campo 'Rango hasta' debe ser mayor que 'Rango desde'",
3667
3676
  function(r) {
@@ -3672,11 +3681,11 @@ const ra = w.div`
3672
3681
  }),
3673
3682
  value: { from: n, to: t }
3674
3683
  };
3675
- }, vn = (e, n) => n === j.PERCENTAGE ? {
3676
- 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"),
3684
+ }, vn = (e, n) => n === _.PERCENTAGE ? {
3685
+ schema: le().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"),
3677
3686
  value: e
3678
3687
  } : {
3679
- schema: le().required("Requerido"),
3688
+ schema: ie().required("Requerido"),
3680
3689
  value: e
3681
3690
  }, ha = {
3682
3691
  [A.LIST_OF_VALUES]: ua,
@@ -3693,7 +3702,7 @@ function fa({
3693
3702
  }) {
3694
3703
  const r = {
3695
3704
  ruleName: e.ruleName || "",
3696
- decisionDataType: e.decisionDataType || j.ALPHABETICAL,
3705
+ decisionDataType: e.decisionDataType || _.ALPHABETICAL,
3697
3706
  howToSetTheDecision: e.howToSetTheDecision || "",
3698
3707
  value: e.value || "",
3699
3708
  effectiveFrom: e.effectiveFrom || "",
@@ -3705,8 +3714,8 @@ function fa({
3705
3714
  };
3706
3715
  let o;
3707
3716
  const i = {
3708
- ruleName: le().required("El nombre de la regla es requerido"),
3709
- value: qe(() => Wn(
3717
+ ruleName: ie().required("El nombre de la regla es requerido"),
3718
+ value: Be(() => Wn(
3710
3719
  o.values.howToSetTheDecision
3711
3720
  )(
3712
3721
  o.values.value,
@@ -3749,7 +3758,7 @@ function fa({
3749
3758
  // },
3750
3759
  // );
3751
3760
  // }),
3752
- conditionsThatEstablishesTheDecision: qe((l, { parent: p }) => {
3761
+ conditionsThatEstablishesTheDecision: Be((l, { parent: p }) => {
3753
3762
  var g;
3754
3763
  if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return ne().shape({});
3755
3764
  const c = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
@@ -3826,16 +3835,16 @@ function fa({
3826
3835
  });
3827
3836
  } };
3828
3837
  }
3829
- const ma = w.div`
3838
+ const ma = C.div`
3830
3839
  & > div {
3831
3840
  border-radius: 8px;
3832
3841
  border: 1px solid
3833
3842
  ${({ theme: e }) => {
3834
3843
  var n, t;
3835
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
3844
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || S.palette.neutral.N30;
3836
3845
  }};
3837
3846
  }
3838
- `, ba = w.div`
3847
+ `, ba = C.div`
3839
3848
  width: 100%;
3840
3849
  height: 100%;
3841
3850
  overflow-y: auto;
@@ -3861,14 +3870,14 @@ const ma = w.div`
3861
3870
  labelToggle: i,
3862
3871
  name: s,
3863
3872
  valueToggle: d = ""
3864
- } = e, [l, p] = z(n), u = (c) => {
3873
+ } = e, [l, p] = U(n), u = (c) => {
3865
3874
  p(c.target.checked), r(c);
3866
3875
  };
3867
- return Ee(() => {
3876
+ return ke(() => {
3868
3877
  p(n);
3869
- }, [n]), /* @__PURE__ */ m(O, { children: [
3878
+ }, [n]), /* @__PURE__ */ m(z, { children: [
3870
3879
  /* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(
3871
- dn,
3880
+ cn,
3872
3881
  {
3873
3882
  checked: l,
3874
3883
  id: o,
@@ -3879,7 +3888,7 @@ const ma = w.div`
3879
3888
  children: /* @__PURE__ */ a($, { size: "medium", type: "label", weight: "bold", children: i })
3880
3889
  }
3881
3890
  ) }),
3882
- l && /* @__PURE__ */ a(O, { children: t })
3891
+ l && /* @__PURE__ */ a(z, { children: t })
3883
3892
  ] });
3884
3893
  }, ya = (e) => {
3885
3894
  const {
@@ -3896,14 +3905,14 @@ const ma = w.div`
3896
3905
  messageEnd: c = "",
3897
3906
  statusStart: g = "pending",
3898
3907
  statusEnd: h = "pending"
3899
- } = e, [f, x] = z(s), [y, D] = z(l), [T, S] = z(p), N = ({ target: k }) => {
3908
+ } = e, [f, x] = U(s), [y, w] = U(l), [T, E] = U(p), N = ({ target: k }) => {
3900
3909
  x(k.checked), r && r(k.checked);
3901
- }, C = (k) => {
3902
- D(k.target.value), n(k);
3910
+ }, D = (k) => {
3911
+ w(k.target.value), n(k);
3903
3912
  }, I = (k) => {
3904
- S(k.target.value), t(k);
3913
+ E(k.target.value), t(k);
3905
3914
  }, F = te("(max-width: 400px)");
3906
- return /* @__PURE__ */ m(O, { children: [
3915
+ return /* @__PURE__ */ m(z, { children: [
3907
3916
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
3908
3917
  /* @__PURE__ */ a(
3909
3918
  $,
@@ -3947,7 +3956,7 @@ const ma = w.div`
3947
3956
  {
3948
3957
  id: "dateStart",
3949
3958
  label: o,
3950
- onChange: C,
3959
+ onChange: D,
3951
3960
  value: y,
3952
3961
  required: d,
3953
3962
  size: "compact",
@@ -3986,12 +3995,12 @@ const ma = w.div`
3986
3995
  termEndStatus: u
3987
3996
  } = e;
3988
3997
  return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
3989
- tn({
3998
+ rn({
3990
3999
  condition: i,
3991
4000
  formik: n,
3992
4001
  isDecision: !0
3993
4002
  }),
3994
- /* @__PURE__ */ a(B, { dashed: !0 }),
4003
+ /* @__PURE__ */ a(G, { dashed: !0 }),
3995
4004
  /* @__PURE__ */ a(ma, { children: /* @__PURE__ */ a(ba, { children: /* @__PURE__ */ m(
3996
4005
  v,
3997
4006
  {
@@ -4009,7 +4018,7 @@ const ma = w.div`
4009
4018
  children: [
4010
4019
  /* @__PURE__ */ a($, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
4011
4020
  /* @__PURE__ */ a(
4012
- dn,
4021
+ cn,
4013
4022
  {
4014
4023
  id: "toggleNone",
4015
4024
  onChange: () => s(!n.values.toggleNone),
@@ -4032,15 +4041,15 @@ const ma = w.div`
4032
4041
  c.conditionName,
4033
4042
  c.howToSetTheCondition === A.LIST_OF_VALUES_MULTI
4034
4043
  )(g.target.checked),
4035
- children: tn({ condition: c, formik: n })
4044
+ children: rn({ condition: c, formik: n })
4036
4045
  },
4037
4046
  c.conditionName
4038
4047
  )) })
4039
4048
  ]
4040
4049
  }
4041
4050
  ) }) }),
4042
- t.terms && /* @__PURE__ */ m(O, { children: [
4043
- /* @__PURE__ */ a(B, { dashed: !0 }),
4051
+ t.terms && /* @__PURE__ */ m(z, { children: [
4052
+ /* @__PURE__ */ a(G, { dashed: !0 }),
4044
4053
  /* @__PURE__ */ a(
4045
4054
  ya,
4046
4055
  {
@@ -4061,11 +4070,11 @@ const ma = w.div`
4061
4070
  }
4062
4071
  )
4063
4072
  ] }),
4064
- /* @__PURE__ */ a(B, {}),
4073
+ /* @__PURE__ */ a(G, {}),
4065
4074
  l && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
4066
4075
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
4067
- /* @__PURE__ */ a(q, { appearance: "gray", onClick: r, children: t.cancel }),
4068
- /* @__PURE__ */ a(q, { type: "submit", children: t.confirm })
4076
+ /* @__PURE__ */ a(B, { appearance: "gray", onClick: r, children: t.cancel }),
4077
+ /* @__PURE__ */ a(B, { type: "submit", children: t.confirm })
4069
4078
  ] })
4070
4079
  ] }) });
4071
4080
  }, Ta = (e) => {
@@ -4104,10 +4113,10 @@ const ma = w.div`
4104
4113
  !1
4105
4114
  );
4106
4115
  else {
4107
- const D = x ? [] : "";
4116
+ const w = x ? [] : "";
4108
4117
  i.setFieldValue(
4109
4118
  `conditionsThatEstablishesTheDecision.${f}`,
4110
- D
4119
+ w
4111
4120
  );
4112
4121
  }
4113
4122
  },
@@ -4116,7 +4125,7 @@ const ma = w.div`
4116
4125
  termEndStatus: c
4117
4126
  }
4118
4127
  );
4119
- }, Cl = (e) => {
4128
+ }, Dl = (e) => {
4120
4129
  var o;
4121
4130
  const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
4122
4131
  (i) => i.switchPlaces
@@ -4132,7 +4141,7 @@ const ma = w.div`
4132
4141
  (i) => i.conditionName === r.conditionName ? { ...i, hidden: !0 } : i
4133
4142
  )
4134
4143
  } : t;
4135
- }, Dl = (e) => {
4144
+ }, Sl = (e) => {
4136
4145
  const { decisions: n } = e;
4137
4146
  return n == null ? void 0 : n.map((t) => {
4138
4147
  var o;
@@ -4151,29 +4160,29 @@ const ma = w.div`
4151
4160
  )
4152
4161
  } : t;
4153
4162
  });
4154
- }, xe = {
4163
+ }, Te = {
4155
4164
  item: {
4156
4165
  background: {
4157
- active: E.palette.blue.B50,
4158
- inactive: E.palette.neutral.N0,
4159
- hover: E.palette.neutral.N20,
4160
- disabled: E.palette.neutral.N20
4166
+ active: S.palette.blue.B50,
4167
+ inactive: S.palette.neutral.N0,
4168
+ hover: S.palette.neutral.N20,
4169
+ disabled: S.palette.neutral.N20
4161
4170
  }
4162
4171
  },
4163
4172
  border: {
4164
4173
  expanded: {
4165
- color: E.palette.blue.B400
4174
+ color: S.palette.blue.B400
4166
4175
  },
4167
4176
  contracted: {
4168
- color: E.palette.neutral.N0
4177
+ color: S.palette.neutral.N0
4169
4178
  }
4170
4179
  }
4171
- }, wa = w.div`
4180
+ }, wa = C.div`
4172
4181
  & > div {
4173
4182
  border: 1px solid
4174
4183
  ${({ theme: e, $active: n }) => {
4175
4184
  var t, r, o, i;
4176
- return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || xe.border.expanded.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : i.color) || xe.border.contracted.color;
4185
+ return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || Te.border.expanded.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : i.color) || Te.border.contracted.color;
4177
4186
  }};
4178
4187
  }
4179
4188
  &:hover {
@@ -4181,44 +4190,44 @@ const ma = w.div`
4181
4190
  background-color: ${({ theme: e, $disabled: n }) => {
4182
4191
  var t, r, o;
4183
4192
  if (!n)
4184
- 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) || xe.item.background.hover;
4193
+ 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) || Te.item.background.hover;
4185
4194
  }};
4186
4195
  }
4187
- `, Xn = w.div`
4196
+ `, Xn = C.div`
4188
4197
  display: flex;
4189
4198
  align-items: center;
4190
4199
  gap: 12px;
4191
4200
  width: 100%;
4192
4201
  outline: none;
4193
4202
  cursor: pointer;
4194
- `, Ca = w.div`
4203
+ `, Ca = C.div`
4195
4204
  display: flex;
4196
4205
  align-items: center;
4197
4206
  outline: none;
4198
4207
  cursor: pointer;
4199
- `, Da = w(ct)`
4208
+ `, Da = C(ct)`
4200
4209
  display: flex;
4201
4210
  align-items: center;
4202
4211
  text-decoration: none;
4203
- `, Sa = w(ct)`
4212
+ `, Sa = C(ct)`
4204
4213
  display: block;
4205
4214
  text-decoration: none;
4206
4215
  color: inherit;
4207
- `, Ea = w.div`
4216
+ `, Ea = C.div`
4208
4217
  & > div {
4209
4218
  border-bottom: 1px solid
4210
4219
  ${({ theme: e, $active: n }) => {
4211
4220
  var t, r, o, i;
4212
- return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || xe.border.expanded.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : i.color) || xe.border.contracted.color;
4221
+ return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || Te.border.expanded.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : i.color) || Te.border.contracted.color;
4213
4222
  }};
4214
4223
  border-radius: 8px 8px 0 0;
4215
4224
  }
4216
- `, mt = w.div`
4225
+ `, mt = C.div`
4217
4226
  display: block;
4218
4227
  text-decoration: none;
4219
4228
  background-color: ${({ theme: e, $active: n }) => {
4220
4229
  var t, r, o, i, s, d;
4221
- 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) || xe.item.background.active : ((d = (s = (i = e == null ? void 0 : e.menu) == null ? void 0 : i.item) == null ? void 0 : s.background) == null ? void 0 : d.inactive) || xe.item.background.inactive;
4230
+ 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) || Te.item.background.active : ((d = (s = (i = e == null ? void 0 : e.menu) == null ? void 0 : i.item) == null ? void 0 : s.background) == null ? void 0 : d.inactive) || Te.item.background.inactive;
4222
4231
  }};
4223
4232
  &:last-child {
4224
4233
  border-radius: 0 0 8px 8px;
@@ -4228,10 +4237,10 @@ const ma = w.div`
4228
4237
  background-color: ${({ $active: e, theme: n, $disabled: t }) => {
4229
4238
  var r, o, i;
4230
4239
  if (!t && !e)
4231
- return ((i = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : i.hover) || xe.item.background.hover;
4240
+ return ((i = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : i.hover) || Te.item.background.hover;
4232
4241
  }};
4233
4242
  }
4234
- `, Na = w.div`
4243
+ `, Na = C.div`
4235
4244
  display: flex;
4236
4245
  flex-direction: column;
4237
4246
 
@@ -4265,7 +4274,7 @@ const ma = w.div`
4265
4274
  padding: "12px 8px",
4266
4275
  children: [
4267
4276
  /* @__PURE__ */ a(
4268
- M,
4277
+ j,
4269
4278
  {
4270
4279
  appearance: c,
4271
4280
  cursorHover: !0,
@@ -4295,7 +4304,7 @@ const ma = w.div`
4295
4304
  padding: "12px 8px",
4296
4305
  children: [
4297
4306
  /* @__PURE__ */ a(
4298
- M,
4307
+ j,
4299
4308
  {
4300
4309
  appearance: c,
4301
4310
  cursorHover: !0,
@@ -4338,7 +4347,7 @@ const ma = w.div`
4338
4347
  gap: "8px",
4339
4348
  padding: x ? "8px 4px" : "8px 32px",
4340
4349
  children: [
4341
- x && /* @__PURE__ */ a(M, { appearance: "primary", icon: /* @__PURE__ */ a(Vt, {}) }),
4350
+ x && /* @__PURE__ */ a(j, { appearance: "primary", icon: /* @__PURE__ */ a(Vt, {}) }),
4342
4351
  /* @__PURE__ */ a(
4343
4352
  $,
4344
4353
  {
@@ -4354,11 +4363,11 @@ const ma = w.div`
4354
4363
  ) }) }, f.id);
4355
4364
  }) })
4356
4365
  ] }) });
4357
- }, Aa = w.div`
4366
+ }, Aa = C.div`
4358
4367
  & > div {
4359
4368
  background: ${({ $background: e, theme: n }) => {
4360
4369
  var t, r, o, i;
4361
- return e ? `${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N20) || E.palette.neutral.N20}` : `${((i = (o = n == null ? void 0 : n.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || E.palette.neutral.N0}`;
4370
+ return e ? `${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N20) || S.palette.neutral.N20}` : `${((i = (o = n == null ? void 0 : n.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || S.palette.neutral.N0}`;
4362
4371
  }};
4363
4372
  }
4364
4373
  height: 90vh;
@@ -4367,8 +4376,8 @@ const ma = w.div`
4367
4376
  for (const r of n)
4368
4377
  if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
4369
4378
  return null;
4370
- }, Sl = (e) => {
4371
- const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [i, s] = V.useState(t), d = V.useRef(o.pathname), l = V.useCallback(
4379
+ }, El = (e) => {
4380
+ const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Zt(), [i, s] = V.useState(t), d = V.useRef(o.pathname), l = V.useCallback(
4372
4381
  (u) => {
4373
4382
  var c;
4374
4383
  return (c = u.find((g) => g.path === o.pathname)) == null ? void 0 : c.id;
@@ -4404,10 +4413,10 @@ const ma = w.div`
4404
4413
  u.id
4405
4414
  )) }) });
4406
4415
  };
4407
- function Y(e) {
4416
+ function W(e) {
4408
4417
  e.preventDefault();
4409
4418
  }
4410
- function Ce(e) {
4419
+ function De(e) {
4411
4420
  e.stopPropagation();
4412
4421
  }
4413
4422
  function bt() {
@@ -4447,11 +4456,11 @@ function Ge(e, n, t = !0, r = ["__key"]) {
4447
4456
  function xt(e) {
4448
4457
  return e.split(" ").filter((n) => n);
4449
4458
  }
4450
- function Me(e) {
4459
+ function ze(e) {
4451
4460
  return { x: e.clientX, y: e.clientY };
4452
4461
  }
4453
4462
  Array();
4454
- var On = typeof window < "u", G = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap();
4463
+ var On = typeof window < "u", Y = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap();
4455
4464
  function Tt() {
4456
4465
  if (!On) return !1;
4457
4466
  if ("userAgentData" in navigator)
@@ -4493,7 +4502,7 @@ var Ra = {
4493
4502
  scrollDebounceTimeout: void 0,
4494
4503
  frameIdX: void 0,
4495
4504
  frameIdY: void 0
4496
- }, b = Ra, we = !1, Qn, yn;
4505
+ }, b = Ra, Ce = !1, Qn, yn;
4497
4506
  function Fa() {
4498
4507
  b.scrollDebounceTimeout && clearTimeout(b.scrollDebounceTimeout), b.longPressTimeout && clearTimeout(b.longPressTimeout), b.frameIdX !== void 0 && cancelAnimationFrame(b.frameIdX), b.frameIdY !== void 0 && cancelAnimationFrame(b.frameIdY), b = { ...{
4499
4508
  affectedNodes: [],
@@ -4536,10 +4545,10 @@ function Fa() {
4536
4545
  } };
4537
4546
  }
4538
4547
  function wt(e) {
4539
- return Object.assign(b, e), e.initialParent.data.emit("dragStarted", b), we = !1, b.emit("dragStarted", b), b;
4548
+ return Object.assign(b, e), e.initialParent.data.emit("dragStarted", b), Ce = !1, b.emit("dragStarted", b), b;
4540
4549
  }
4541
4550
  function La() {
4542
- b.activeState && Ne(b.activeState.parent, void 0, b), b.selectedState && Se(b.selectedState.nodes, b.selectedState.parent, b), b.selectedState = b.activeState = void 0;
4551
+ b.activeState && Ae(b.activeState.parent, void 0, b), b.selectedState && Ne(b.selectedState.nodes, b.selectedState.parent, b), b.selectedState = b.activeState = void 0;
4543
4552
  }
4544
4553
  function Oa() {
4545
4554
  if (b.pointerDown && (b.pointerDown.node.el.draggable = !0), b.pointerDown = void 0, !re(b)) return;
@@ -4547,28 +4556,28 @@ function Oa() {
4547
4556
  re(b) && e.handleEnd(b);
4548
4557
  }
4549
4558
  function Pa(e) {
4550
- e.key === "Escape" && (b.selectedState && Se(b.selectedState.nodes, b.selectedState.parent, b), b.activeState && Ne(b.activeState.parent, void 0, b), b.selectedState = b.activeState = void 0);
4559
+ e.key === "Escape" && (b.selectedState && Ne(b.selectedState.nodes, b.selectedState.parent, b), b.activeState && Ae(b.activeState.parent, void 0, b), b.selectedState = b.activeState = void 0);
4551
4560
  }
4552
4561
  function Ma(e) {
4553
- if (!W(b)) return;
4554
- we = !0;
4562
+ if (!X(b)) return;
4563
+ Ce = !0;
4555
4564
  const n = b.initialParent.data.config.handleEnd;
4556
4565
  n(b);
4557
4566
  }
4558
4567
  function za(e) {
4559
- if (!W(b)) return;
4560
- Y(e);
4561
- const { x: n, y: t } = Me(e);
4562
- W(b) && gn({ x: n, y: t }, e, b);
4568
+ if (!X(b)) return;
4569
+ W(e);
4570
+ const { x: n, y: t } = ze(e);
4571
+ X(b) && hn({ x: n, y: t }, e, b);
4563
4572
  }
4564
4573
  function Va(e) {
4565
4574
  if (!b.pointerDown || !b.pointerDown.validated) return;
4566
4575
  const n = b.pointerDown.parent.data.config;
4567
4576
  if (!(e.pointerType === "mouse" && !Tt()))
4568
4577
  if (re(b))
4569
- re(b) && Zn(e, b);
4578
+ re(b) && Kn(e, b);
4570
4579
  else {
4571
- if (Y(e), n.longPress && !b.longPress) {
4580
+ if (W(e), n.longPress && !b.longPress) {
4572
4581
  clearTimeout(b.longPressTimeout), b.longPress = !1;
4573
4582
  return;
4574
4583
  }
@@ -4582,7 +4591,7 @@ function Va(e) {
4582
4591
  t,
4583
4592
  r
4584
4593
  );
4585
- Zn(e, o, !0);
4594
+ Kn(e, o, !0);
4586
4595
  }
4587
4596
  }
4588
4597
  function ja({
@@ -4593,19 +4602,19 @@ function ja({
4593
4602
  }) {
4594
4603
  var l, p, u;
4595
4604
  if (!On) return;
4596
- Qn || (Qn = rn(document, {
4605
+ Qn || (Qn = on(document, {
4597
4606
  dragover: za,
4598
4607
  pointerdown: La,
4599
4608
  pointerup: Oa,
4600
4609
  keydown: Pa,
4601
4610
  drop: Ma,
4602
4611
  pointermove: Va,
4603
- pointercancel: K(r.handlePointercancel),
4612
+ pointercancel: Z(r.handlePointercancel),
4604
4613
  touchmove: (c) => {
4605
- W(b) && c.cancelable && Y(c);
4614
+ X(b) && c.cancelable && W(c);
4606
4615
  },
4607
4616
  contextmenu: (c) => {
4608
- re(b) && Y(c);
4617
+ re(b) && W(c);
4609
4618
  }
4610
4619
  })), Dt(e);
4611
4620
  const [o, i] = bt(), s = {
@@ -4645,7 +4654,7 @@ function ja({
4645
4654
  reapplyDragClasses: Ya,
4646
4655
  tearDownNode: Xa,
4647
4656
  tearDownNodeRemap: Wa,
4648
- remapFinished: Za,
4657
+ remapFinished: Ka,
4649
4658
  threshold: {
4650
4659
  horizontal: 0,
4651
4660
  vertical: 0
@@ -4658,7 +4667,7 @@ function ja({
4658
4667
  on: i,
4659
4668
  emit: o
4660
4669
  };
4661
- new MutationObserver(Qa).observe(e, { childList: !0 }), G.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
4670
+ new MutationObserver(Qa).observe(e, { childList: !0 }), Y.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
4662
4671
  var g, h;
4663
4672
  (h = (g = c(e)) == null ? void 0 : g.tearDown) == null || h.call(g);
4664
4673
  }), (p = r.plugins) == null || p.forEach((c) => {
@@ -4667,10 +4676,10 @@ function ja({
4667
4676
  }), (u = r.plugins) == null || u.forEach((c) => {
4668
4677
  var g, h;
4669
4678
  (h = (g = c(e)) == null ? void 0 : g.setup) == null || h.call(g);
4670
- }), Ba(e, s), un(e, !0);
4679
+ }), Ba(e, s), pn(e, !0);
4671
4680
  }
4672
4681
  function Ct(e, n, t, r, o, i) {
4673
- const { x: s, y: d } = Me(t), l = e.el.getBoundingClientRect();
4682
+ const { x: s, y: d } = ze(t), l = e.el.getBoundingClientRect();
4674
4683
  return {
4675
4684
  affectedNodes: [],
4676
4685
  ascendingDirection: !1,
@@ -4709,8 +4718,8 @@ function Ua({
4709
4718
  draggedNodes: n,
4710
4719
  targetNodes: t
4711
4720
  }) {
4712
- un(e.el);
4713
- const r = n.map((l) => l.data.value), o = Oe(e.el, e.data), i = n[0].data.index, s = [...e.data.enabledNodes], d = [
4721
+ pn(e.el);
4722
+ const r = n.map((l) => l.data.value), o = Pe(e.el, e.data), i = n[0].data.index, s = [...e.data.enabledNodes], d = [
4714
4723
  ...o.filter((l) => !r.some((p) => Ge(l, p)))
4715
4724
  ];
4716
4725
  d.splice(t[0].data.index, 0, ...r), "draggedNode" in b && (b.currentTargetValue = t[0].data.value), En(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
@@ -4729,7 +4738,7 @@ function Ua({
4729
4738
  state: b
4730
4739
  });
4731
4740
  }
4732
- function Ne(e, n, t) {
4741
+ function Ae(e, n, t) {
4733
4742
  if (!n) {
4734
4743
  t.activeState = void 0;
4735
4744
  return;
@@ -4739,11 +4748,11 @@ function Ne(e, n, t) {
4739
4748
  parent: e
4740
4749
  };
4741
4750
  }
4742
- function Se(e, n, t) {
4751
+ function Ne(e, n, t) {
4743
4752
  const r = n.data.config.selectedClass;
4744
4753
  if (!t.selectedState) return;
4745
4754
  const o = Array.from(e);
4746
- Te(
4755
+ we(
4747
4756
  e.map((i) => i.el),
4748
4757
  r
4749
4758
  );
@@ -4760,11 +4769,11 @@ function Je(e, n, t, r, o = !1) {
4760
4769
  r.selectedState = {
4761
4770
  nodes: n,
4762
4771
  parent: e
4763
- }, Ne(e, t, r);
4772
+ }, Ae(e, t, r);
4764
4773
  }
4765
4774
  function _a(e, n) {
4766
4775
  const t = e.targetData.parent.data.enabledNodes[0];
4767
- t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? Ne(e.targetData.parent, t, n) : n.selectedState || Ne(e.targetData.parent, t, n));
4776
+ t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? Ae(e.targetData.parent, t, n) : n.selectedState || Ae(e.targetData.parent, t, n));
4768
4777
  }
4769
4778
  function Ha({
4770
4779
  currentParent: e,
@@ -4775,12 +4784,12 @@ function Ha({
4775
4784
  targetNodes: i,
4776
4785
  state: s
4777
4786
  }) {
4778
- un(t.el);
4787
+ pn(t.el);
4779
4788
  const d = r.map((g) => g.data.value), l = [
4780
- ...Oe(e.el, e.data).filter(
4789
+ ...Pe(e.el, e.data).filter(
4781
4790
  (g) => !d.some((h) => Ge(g, h))
4782
4791
  )
4783
- ], p = Oe(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
4792
+ ], p = Pe(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
4784
4793
  let c;
4785
4794
  i.length ? (u ? c = o : n.data.config.sortable === !1 ? c = n.data.enabledNodes.length : c = i[0].data.index, p.splice(c, 0, ...d)) : (c = u ? o : n.data.enabledNodes.length, p.splice(c, 0, ...d)), En(e.el, e.data, l), En(n.el, n.data, p), n.data.config.onTransfer && n.data.config.onTransfer({
4786
4795
  sourceParent: e,
@@ -4800,46 +4809,46 @@ function Ha({
4800
4809
  targetNodes: i || []
4801
4810
  });
4802
4811
  }
4803
- function Oe(e, n) {
4812
+ function Pe(e, n) {
4804
4813
  return [...n.getValues(e)];
4805
4814
  }
4806
4815
  function En(e, n, t) {
4807
4816
  n.setValues(t, e);
4808
4817
  }
4809
4818
  function qa(e, n) {
4810
- Ce(e.e), we = !0;
4819
+ De(e.e), Ce = !0;
4811
4820
  const t = n.initialParent.data.config.handleEnd;
4812
4821
  t(n);
4813
4822
  }
4814
4823
  function Dt(e) {
4815
- const n = G.get(e);
4824
+ const n = Y.get(e);
4816
4825
  n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
4817
4826
  }
4818
- function W(e) {
4827
+ function X(e) {
4819
4828
  return "draggedNode" in e && !!e.draggedNode;
4820
4829
  }
4821
4830
  function re(e) {
4822
4831
  return "synthDragging" in e && !!e.synthDragging;
4823
4832
  }
4824
4833
  function Ba(e, n) {
4825
- n.abortControllers.mainParent = rn(e, {
4834
+ n.abortControllers.mainParent = on(e, {
4826
4835
  dragover: en(n.config.handleParentDragover),
4827
4836
  handleParentPointerover: n.config.handleParentPointerover,
4828
4837
  scroll: en(n.config.handleParentScroll),
4829
4838
  drop: en(n.config.handleParentDrop),
4830
4839
  hasNestedParent: (t) => {
4831
- const r = G.get(t.target);
4840
+ const r = Y.get(t.target);
4832
4841
  r && (r.nestedParent = t.detail.parent);
4833
4842
  },
4834
4843
  focus: en(n.config.handleParentFocus)
4835
- }), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = rn(
4844
+ }), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = on(
4836
4845
  n.config.externalDragHandle.el,
4837
4846
  {
4838
4847
  pointerdown: (t) => {
4839
4848
  if (!n.config.externalDragHandle || !n.config.externalDragHandle.callback)
4840
4849
  return;
4841
4850
  const r = n.config.externalDragHandle.callback();
4842
- if (!hn(r)) {
4851
+ if (!fn(r)) {
4843
4852
  console.warn(
4844
4853
  "No draggable item found from external drag handle callback"
4845
4854
  );
@@ -4849,7 +4858,7 @@ function Ba(e, n) {
4849
4858
  if (!o) return;
4850
4859
  const i = r.parentNode;
4851
4860
  if (!(i instanceof HTMLElement)) return;
4852
- const s = G.get(i);
4861
+ const s = Y.get(i);
4853
4862
  s && (b.pointerDown = {
4854
4863
  parent: {
4855
4864
  el: i,
@@ -4868,25 +4877,25 @@ function Ba(e, n) {
4868
4877
  function Ga(e) {
4869
4878
  var t;
4870
4879
  const n = e.parent.data.config;
4871
- e.node.data.abortControllers.mainNode = rn(e.node.el, {
4872
- keydown: K(n.handleNodeKeydown),
4873
- dragstart: K(n.handleDragstart),
4874
- dragover: K(n.handleNodeDragover),
4875
- dragenter: K(n.handleNodeDragenter),
4876
- dragleave: K(n.handleNodeDragleave),
4877
- dragend: K(n.handleDragend),
4878
- drop: K(n.handleNodeDrop),
4879
- focus: K(n.handleNodeFocus),
4880
- blur: K(n.handleNodeBlur),
4881
- pointerup: K(n.handleNodePointerup),
4882
- pointercancel: K(n.handlePointercancel),
4883
- pointerdown: K(n.handleNodePointerdown),
4880
+ e.node.data.abortControllers.mainNode = on(e.node.el, {
4881
+ keydown: Z(n.handleNodeKeydown),
4882
+ dragstart: Z(n.handleDragstart),
4883
+ dragover: Z(n.handleNodeDragover),
4884
+ dragenter: Z(n.handleNodeDragenter),
4885
+ dragleave: Z(n.handleNodeDragleave),
4886
+ dragend: Z(n.handleDragend),
4887
+ drop: Z(n.handleNodeDrop),
4888
+ focus: Z(n.handleNodeFocus),
4889
+ blur: Z(n.handleNodeBlur),
4890
+ pointerup: Z(n.handleNodePointerup),
4891
+ pointercancel: Z(n.handlePointercancel),
4892
+ pointerdown: Z(n.handleNodePointerdown),
4884
4893
  handleNodePointerover: n.handleNodePointerover,
4885
4894
  touchmove: (r) => {
4886
- W(b) && r.cancelable && Y(r);
4895
+ X(b) && r.cancelable && W(r);
4887
4896
  },
4888
4897
  contextmenu: (r) => {
4889
- re(b) && Y(r);
4898
+ re(b) && W(r);
4890
4899
  }
4891
4900
  }), e.node.el.draggable = !0, n.reapplyDragClasses(e.node.el, e.parent.data), (t = e.parent.data.config.plugins) == null || t.forEach((r) => {
4892
4901
  var o, i;
@@ -4901,7 +4910,7 @@ function St(e) {
4901
4910
  });
4902
4911
  }
4903
4912
  function Ya(e, n) {
4904
- if (!W(b)) return;
4913
+ if (!X(b)) return;
4905
4914
  const t = re(b) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
4906
4915
  b.draggedNode.el === e && Re([e], t, !0);
4907
4916
  }
@@ -4923,17 +4932,17 @@ function Qa(e) {
4923
4932
  if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
4924
4933
  return;
4925
4934
  const n = e[0].target;
4926
- !(n instanceof HTMLElement) || !G.get(n) || un(n);
4935
+ !(n instanceof HTMLElement) || !Y.get(n) || pn(n);
4927
4936
  }
4928
- function un(e, n) {
4937
+ function pn(e, n) {
4929
4938
  var d;
4930
- const t = G.get(e);
4939
+ const t = Y.get(e);
4931
4940
  if (!t) return;
4932
4941
  t.privateClasses = Array.from(e.classList);
4933
4942
  const r = [], o = t.config;
4934
4943
  for (let l = 0; l < e.children.length; l++) {
4935
4944
  const p = e.children[l];
4936
- if (!hn(p) || p.id === "dnd-dragged-node-clone") continue;
4945
+ if (!fn(p) || p.id === "dnd-dragged-node-clone") continue;
4937
4946
  const u = ue.get(p);
4938
4947
  (n || !u) && o.tearDownNode({
4939
4948
  parent: {
@@ -4966,7 +4975,7 @@ function un(e, n) {
4966
4975
  index: l
4967
4976
  }
4968
4977
  );
4969
- if (!W(b) && b.activeState && Ge(b.activeState.node.data.value, c.value) && Ne(
4978
+ if (!X(b) && b.activeState && Ge(b.activeState.node.data.value, c.value) && Ae(
4970
4979
  {
4971
4980
  data: t,
4972
4981
  el: e
@@ -4976,7 +4985,7 @@ function un(e, n) {
4976
4985
  data: c
4977
4986
  },
4978
4987
  b
4979
- ), W(b) && Ge(b.draggedNode.data.value, c.value)) {
4988
+ ), X(b) && Ge(b.draggedNode.data.value, c.value)) {
4980
4989
  b.draggedNode.data = c, b.draggedNode.el = p;
4981
4990
  const g = b.draggedNodes.find(
4982
4991
  (h) => h.data.value === c.value
@@ -5006,15 +5015,15 @@ function un(e, n) {
5006
5015
  }
5007
5016
  });
5008
5017
  }
5009
- G.set(e, { ...t, enabledNodes: s }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((l) => {
5018
+ Y.set(e, { ...t, enabledNodes: s }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((l) => {
5010
5019
  var p, u;
5011
5020
  (u = (p = l(e)) == null ? void 0 : p.remapFinished) == null || u.call(p);
5012
5021
  });
5013
5022
  }
5014
- function Za() {
5023
+ function Ka() {
5015
5024
  b.remapJustFinished = !0, "draggedNode" in b && (b.affectedNodes = []);
5016
5025
  }
5017
- function Ka(e) {
5026
+ function Za(e) {
5018
5027
  return !!e.targetData.parent.data.config.nativeDrag;
5019
5028
  }
5020
5029
  function Ja(e) {
@@ -5031,19 +5040,19 @@ function Ja(e) {
5031
5040
  return [];
5032
5041
  }
5033
5042
  function ei(e) {
5034
- W(b) && (b.emit("scrollStarted", b), !re(b) && (b.preventEnter = !0, yn && clearTimeout(yn), yn = setTimeout(() => {
5043
+ X(b) && (b.emit("scrollStarted", b), !re(b) && (b.preventEnter = !0, yn && clearTimeout(yn), yn = setTimeout(() => {
5035
5044
  b.preventEnter = !1, b.emit("scrollEnded", b);
5036
5045
  }, 100)));
5037
5046
  }
5038
5047
  function ni(e, n) {
5039
5048
  const t = e.targetData.parent.data.config;
5040
- if (!t.nativeDrag || !Ka(e) || !Et({
5049
+ if (!t.nativeDrag || !Za(e) || !Et({
5041
5050
  x: e.e.clientX,
5042
5051
  y: e.e.clientY,
5043
5052
  node: e.targetData.node,
5044
5053
  config: t
5045
5054
  })) {
5046
- Y(e.e);
5055
+ W(e.e);
5047
5056
  return;
5048
5057
  }
5049
5058
  let r = t.draggedNodes({
@@ -5055,7 +5064,7 @@ function ni(e, n) {
5055
5064
  if (t.onDragstart) {
5056
5065
  const i = {
5057
5066
  parent: e.targetData.parent,
5058
- values: Oe(
5067
+ values: Pe(
5059
5068
  e.targetData.parent.el,
5060
5069
  e.targetData.parent.data
5061
5070
  ),
@@ -5069,7 +5078,7 @@ function ni(e, n) {
5069
5078
  }
5070
5079
  function ti(e, n) {
5071
5080
  var d, l;
5072
- if (Ce(e.e), n.pointerDown = {
5081
+ if (De(e.e), n.pointerDown = {
5073
5082
  parent: e.targetData.parent,
5074
5083
  node: e.targetData.node,
5075
5084
  validated: !1
@@ -5102,7 +5111,7 @@ function ti(e, n) {
5102
5111
  const p = e.targetData.parent.data.enabledNodes;
5103
5112
  if (n.selectedState && n.activeState)
5104
5113
  if (n.selectedState.parent.el !== e.targetData.parent.el) {
5105
- Se(n.selectedState.nodes, n.selectedState.parent, n), n.selectedState = void 0;
5114
+ Ne(n.selectedState.nodes, n.selectedState.parent, n), n.selectedState = void 0;
5106
5115
  for (let u = 0; u <= s.data.index; u++)
5107
5116
  r.push(p[u]);
5108
5117
  } else {
@@ -5129,7 +5138,7 @@ function ti(e, n) {
5129
5138
  }
5130
5139
  (l = (d = n.selectedState) == null ? void 0 : d.nodes) != null && l.length ? n.selectedState.nodes.findIndex(
5131
5140
  (u) => u.el === e.targetData.node.el
5132
- ) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? Se(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && Tt() ? r.push(...n.selectedState.nodes) : Se(n.selectedState.nodes, e.targetData.parent, n), Je(
5141
+ ) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? Ne(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && Tt() ? r.push(...n.selectedState.nodes) : Ne(n.selectedState.nodes, e.targetData.parent, n), Je(
5133
5142
  e.targetData.parent,
5134
5143
  r,
5135
5144
  e.targetData.node,
@@ -5148,7 +5157,7 @@ function ri(e, n, t, r = !1) {
5148
5157
  n.map((o) => o.el),
5149
5158
  r ? t.synthDraggingClass : t.draggingClass
5150
5159
  ), setTimeout(() => {
5151
- Te(
5160
+ we(
5152
5161
  n.map((o) => o.el),
5153
5162
  r ? t.synthDraggingClass : t.draggingClass
5154
5163
  ), Re(
@@ -5157,14 +5166,14 @@ function ri(e, n, t, r = !1) {
5157
5166
  ), Re(
5158
5167
  n.map((o) => o.el),
5159
5168
  r ? t.synthDropZoneClass : t.dropZoneClass
5160
- ), Te(
5169
+ ), we(
5161
5170
  n.map((o) => o.el),
5162
5171
  t.selectedClass
5163
5172
  );
5164
5173
  });
5165
5174
  }
5166
5175
  function oi(e, n) {
5167
- Ce(e.e);
5176
+ De(e.e);
5168
5177
  const t = wt(
5169
5178
  Ct(
5170
5179
  e.targetData.node,
@@ -5237,11 +5246,11 @@ function Et({
5237
5246
  function ai(e) {
5238
5247
  }
5239
5248
  function ii(e) {
5240
- e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : pn(e.detail, e.detail.state);
5249
+ e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : gn(e.detail, e.detail.state);
5241
5250
  }
5242
5251
  function li(e, n) {
5243
5252
  const t = e.targetData.parent.data.config;
5244
- t.nativeDrag && (Ce(e.e), we = !0, t.handleEnd(n));
5253
+ t.nativeDrag && (De(e.e), Ce = !0, t.handleEnd(n));
5245
5254
  }
5246
5255
  function si(e) {
5247
5256
  e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !1);
@@ -5252,8 +5261,8 @@ function di(e) {
5252
5261
  function ci(e, n) {
5253
5262
  const t = e.targetData.parent.data.config;
5254
5263
  if (t.nativeDrag) {
5255
- if (Y(e.e), Ce(e.e), we) {
5256
- we = !1;
5264
+ if (W(e.e), De(e.e), Ce) {
5265
+ Ce = !1;
5257
5266
  return;
5258
5267
  }
5259
5268
  t.handleEnd(n);
@@ -5262,14 +5271,14 @@ function ci(e, n) {
5262
5271
  function ui(e, n) {
5263
5272
  var r;
5264
5273
  if (!re(n)) return;
5265
- if (Y(e.e), we) {
5266
- we = !1;
5274
+ if (W(e.e), Ce) {
5275
+ Ce = !1;
5267
5276
  return;
5268
5277
  }
5269
- const t = (r = G.get(n.initialParent.el)) == null ? void 0 : r.config;
5278
+ const t = (r = Y.get(n.initialParent.el)) == null ? void 0 : r.config;
5270
5279
  t != null && t.onDragend && t.onDragend({
5271
5280
  parent: n.currentParent,
5272
- values: Oe(n.currentParent.el, n.currentParent.data),
5281
+ values: Pe(n.currentParent.el, n.currentParent.data),
5273
5282
  draggedNode: n.draggedNode,
5274
5283
  draggedNodes: n.draggedNodes,
5275
5284
  state: n
@@ -5278,14 +5287,14 @@ function ui(e, n) {
5278
5287
  function pi(e) {
5279
5288
  var u, c, g, h, f;
5280
5289
  e.draggedNode && (e.draggedNode.el.draggable = !0);
5281
- const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = re(e), o = (u = G.get(e.initialParent.el)) == null ? void 0 : u.config, i = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, s = (c = t == null ? void 0 : t.config) == null ? void 0 : c.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = t == null ? void 0 : t.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
5290
+ const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = re(e), o = (u = Y.get(e.initialParent.el)) == null ? void 0 : u.config, i = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, s = (c = t == null ? void 0 : t.config) == null ? void 0 : c.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = t == null ? void 0 : t.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
5282
5291
  re(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Nn(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), l !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = l), requestAnimationFrame(() => {
5283
- Te(n, i), Te(n, s), Te(n, d);
5284
- }), Se(e.draggedNodes, e.currentParent, e), Ne(e.currentParent, void 0, e);
5292
+ we(n, i), we(n, s), we(n, d);
5293
+ }), Ne(e.draggedNodes, e.currentParent, e), Ae(e.currentParent, void 0, e);
5285
5294
  const p = { ...e };
5286
5295
  (f = o == null ? void 0 : o.onDragend) == null || f.call(o, {
5287
5296
  parent: p.currentParent,
5288
- values: Oe(
5297
+ values: Pe(
5289
5298
  p.currentParent.el,
5290
5299
  p.currentParent.data
5291
5300
  ),
@@ -5295,12 +5304,12 @@ function pi(e) {
5295
5304
  }), e.emit("dragEnded", p), Fa();
5296
5305
  }
5297
5306
  function gi(e, n) {
5298
- Ce(e.e), !n.pointerSelection && n.selectedState && Se(n.selectedState.nodes, e.targetData.parent, n);
5307
+ De(e.e), !n.pointerSelection && n.selectedState && Ne(n.selectedState.nodes, e.targetData.parent, n);
5299
5308
  const t = e.targetData.parent.data.config;
5300
- n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, Te(
5309
+ n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, we(
5301
5310
  e.targetData.parent.data.enabledNodes.map((r) => r.el),
5302
5311
  t.longPressClass
5303
- ), W(n) && t.handleEnd(n);
5312
+ ), X(n) && t.handleEnd(n);
5304
5313
  }
5305
5314
  function hi(e, n, t, r, o, i) {
5306
5315
  var f, x;
@@ -5334,12 +5343,12 @@ function hi(e, n, t, r, o, i) {
5334
5343
  "height",
5335
5344
  "boxSizing",
5336
5345
  "overflow"
5337
- ], u = (y, D) => {
5346
+ ], u = (y, w) => {
5338
5347
  const T = window.getComputedStyle(y);
5339
- p.forEach((S) => {
5340
- D.style[S] = T[S];
5348
+ p.forEach((E) => {
5349
+ w.style[E] = T[E];
5341
5350
  });
5342
- }, c = (y, D = {}) => {
5351
+ }, c = (y, w = {}) => {
5343
5352
  Object.assign(y.style, {
5344
5353
  position: "absolute",
5345
5354
  zIndex: "9999",
@@ -5350,7 +5359,7 @@ function hi(e, n, t, r, o, i) {
5350
5359
  overflow: "hidden",
5351
5360
  width: `${i.width}px`,
5352
5361
  height: `${i.height}px`,
5353
- ...D
5362
+ ...w
5354
5363
  });
5355
5364
  };
5356
5365
  if (s.synthDragImage)
@@ -5359,9 +5368,9 @@ function hi(e, n, t, r, o, i) {
5359
5368
  d = e.el.cloneNode(!0), u(e.el, d), d.setAttribute("popover", "manual"), c(d);
5360
5369
  else {
5361
5370
  const y = document.createElement("div");
5362
- y.setAttribute("popover", "manual"), o.forEach((D) => {
5363
- const T = D.el.cloneNode(!0);
5364
- u(D.el, T), T.style.pointerEvents = "none", T.style.margin = "0", y.append(T);
5371
+ y.setAttribute("popover", "manual"), o.forEach((w) => {
5372
+ const T = w.el.cloneNode(!0);
5373
+ u(w.el, T), T.style.pointerEvents = "none", T.style.margin = "0", y.append(T);
5365
5374
  }), y.style.display = "flex", y.style.flexDirection = "column", y.style.padding = "0", y.style.margin = "0", y.style.position = "absolute", y.style.zIndex = "9999", y.style.pointerEvents = "none", d = y;
5366
5375
  }
5367
5376
  d.id = "dnd-dragged-node-clone", n.el.appendChild(d), d.showPopover();
@@ -5388,7 +5397,7 @@ function hi(e, n, t, r, o, i) {
5388
5397
  function fi(e, n, t) {
5389
5398
  const r = e.targetData.parent.data.config;
5390
5399
  n.longPressTimeout = setTimeout(() => {
5391
- n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Re([t.el], r.longPressClass), Y(e.e));
5400
+ n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Re([t.el], r.longPressClass), W(e.e));
5392
5401
  }, r.longPressDuration || 1e3);
5393
5402
  }
5394
5403
  function Nn(e, n = !0, t = !0) {
@@ -5397,15 +5406,15 @@ function Nn(e, n = !0, t = !0) {
5397
5406
  function Nt(e, n = !1) {
5398
5407
  var u;
5399
5408
  const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, i = e.startTop ?? 0, s = window.scrollX ?? 0, d = window.scrollY ?? 0, l = t - o + s, p = r - i + d;
5400
- e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", Te(
5409
+ e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", we(
5401
5410
  e.draggedNodes.map((c) => c.el),
5402
5411
  (u = e.initialParent.data.config) == null ? void 0 : u.longPressClass
5403
5412
  ));
5404
5413
  }
5405
- function Zn(e, n, t = !1) {
5406
- const r = Me(e);
5414
+ function Kn(e, n, t = !1) {
5415
+ const r = ze(e);
5407
5416
  n.coordinates.x = r.x, n.coordinates.y = r.y, Nt(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
5408
- re(n) && gn(n.coordinates, e, n);
5417
+ re(n) && hn(n.coordinates, e, n);
5409
5418
  }, 16);
5410
5419
  const o = Si(r);
5411
5420
  if (!o) {
@@ -5437,17 +5446,17 @@ function Zn(e, n, t = !1) {
5437
5446
  function mi(e, n) {
5438
5447
  var i;
5439
5448
  if (!e.targetData.parent.data.config.nativeDrag) return;
5440
- const { x: r, y: o } = Me(e.e);
5441
- n.coordinates.y = o, n.coordinates.x = r, Y(e.e), Ce(e.e), W(n) && gn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((i = n.currentParent) == null ? void 0 : i.el) ? kt(e, n) : pn(e, n);
5449
+ const { x: r, y: o } = ze(e.e);
5450
+ n.coordinates.y = o, n.coordinates.x = r, W(e.e), De(e.e), X(n) && hn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((i = n.currentParent) == null ? void 0 : i.el) ? kt(e, n) : gn(e, n);
5442
5451
  }
5443
5452
  function bi(e, n) {
5444
5453
  if (!e.targetData.parent.data.config.nativeDrag) return;
5445
- Y(e.e), Ce(e.e);
5446
- const { x: r, y: o } = Me(e.e);
5447
- W(n) && gn({ x: r, y: o }, e.e, n), pn(e, n);
5454
+ W(e.e), De(e.e);
5455
+ const { x: r, y: o } = ze(e.e);
5456
+ X(n) && hn({ x: r, y: o }, e.e, n), gn(e, n);
5448
5457
  }
5449
5458
  function vi(e) {
5450
- e.detail.targetData.parent.el !== e.detail.state.currentParent.el && pn(e.detail, e.detail.state);
5459
+ e.detail.targetData.parent.el !== e.detail.state.currentParent.el && gn(e.detail, e.detail.state);
5451
5460
  }
5452
5461
  function yi({
5453
5462
  currentParent: e,
@@ -5468,10 +5477,10 @@ function yi({
5468
5477
  ) : !(!i.group || i.group !== s.group);
5469
5478
  }
5470
5479
  function xi(e, n) {
5471
- Y(e.e);
5480
+ W(e.e);
5472
5481
  }
5473
5482
  function Ti(e, n) {
5474
- Y(e.e);
5483
+ W(e.e);
5475
5484
  }
5476
5485
  function wi(e, n, t, r) {
5477
5486
  var u;
@@ -5508,7 +5517,7 @@ function wi(e, n, t, r) {
5508
5517
  return !1;
5509
5518
  }
5510
5519
  function kt(e, n) {
5511
- const { x: t, y: r } = Me(e.e);
5520
+ const { x: t, y: r } = ze(e.e);
5512
5521
  if (!wi(e, n, t, r))
5513
5522
  return;
5514
5523
  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];
@@ -5520,11 +5529,11 @@ function kt(e, n) {
5520
5529
  targetNodes: [e.targetData.node]
5521
5530
  });
5522
5531
  }
5523
- function K(e) {
5532
+ function Z(e) {
5524
5533
  function n(t) {
5525
5534
  const r = ue.get(t);
5526
5535
  if (!r) return;
5527
- const o = G.get(t.parentNode);
5536
+ const o = Y.get(t.parentNode);
5528
5537
  if (o)
5529
5538
  return {
5530
5539
  node: {
@@ -5549,8 +5558,8 @@ function K(e) {
5549
5558
  );
5550
5559
  };
5551
5560
  }
5552
- function pn(e, n) {
5553
- Y(e.e), yi({
5561
+ function gn(e, n) {
5562
+ W(e.e), yi({
5554
5563
  currentParent: n.currentParent,
5555
5564
  targetParent: e.targetData.parent,
5556
5565
  initialParent: n.initialParent,
@@ -5568,7 +5577,7 @@ function pn(e, n) {
5568
5577
  }
5569
5578
  function en(e) {
5570
5579
  function n(t) {
5571
- const r = G.get(t);
5580
+ const r = Y.get(t);
5572
5581
  if (r)
5573
5582
  return {
5574
5583
  parent: {
@@ -5615,53 +5624,53 @@ function Ci(e, n, t, r = !1) {
5615
5624
  ) : e.classList.add(s);
5616
5625
  return t.privateClasses = i, t;
5617
5626
  }
5618
- function Te(e, n) {
5627
+ function we(e, n) {
5619
5628
  if (!n) return;
5620
5629
  const t = xt(n);
5621
5630
  if (t.length)
5622
5631
  for (const r of e) {
5623
- if (!hn(r)) {
5632
+ if (!fn(r)) {
5624
5633
  r.classList.remove(...t);
5625
5634
  continue;
5626
5635
  }
5627
- const o = ue.get(r) || G.get(r);
5636
+ const o = ue.get(r) || Y.get(r);
5628
5637
  if (o)
5629
5638
  for (const i of t)
5630
5639
  o.privateClasses.includes(i) || r.classList.remove(i);
5631
5640
  }
5632
5641
  }
5633
- function Kn(e, n, t, r, o) {
5642
+ function Zn(e, n, t, r, o) {
5634
5643
  const s = o.axis === "x", d = e === document.scrollingElement, l = s ? "scrollLeft" : "scrollTop", p = s ? "clientWidth" : "clientHeight", u = s ? "offsetWidth" : "offsetHeight", c = s ? "scrollWidth" : "scrollHeight", g = s ? n.clientX : n.clientY, h = s ? r.left : r.top, f = s ? t.overflowX : t.overflowY;
5635
5644
  if (d) {
5636
- const x = e[l], y = e[p], D = x > 0, T = x + y < (s ? o.state.rootScrollWidth || 0 : e[c]);
5645
+ const x = e[l], y = e[p], w = x > 0, T = x + y < (s ? o.state.rootScrollWidth || 0 : e[c]);
5637
5646
  return s ? {
5638
- left: D && g < y * 0.075,
5647
+ left: w && g < y * 0.075,
5639
5648
  right: T && g > y * (1 - 0.075)
5640
5649
  } : {
5641
- up: D && g < y * 0.075,
5650
+ up: w && g < y * 0.075,
5642
5651
  down: T && g > y * (1 - 0.075)
5643
5652
  };
5644
5653
  }
5645
5654
  if ((f === "auto" || f === "scroll") && e !== document.body && e !== document.documentElement) {
5646
- const x = e[c], y = e[u], D = e[l], T = D > 0, S = D < x - y;
5655
+ const x = e[c], y = e[u], w = e[l], T = w > 0, E = w < x - y;
5647
5656
  return s ? {
5648
5657
  left: T && g < h + y * 0.075,
5649
- right: S && g > h + y * (1 - 0.075)
5658
+ right: E && g > h + y * (1 - 0.075)
5650
5659
  } : {
5651
5660
  up: T && g < h + y * 0.075,
5652
- down: S && g > h + y * (1 - 0.075)
5661
+ down: E && g > h + y * (1 - 0.075)
5653
5662
  };
5654
5663
  }
5655
5664
  return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
5656
5665
  }
5657
5666
  function Di(e, n, t, r) {
5658
- if (!W(t) || !t.draggedNode)
5667
+ if (!X(t) || !t.draggedNode)
5659
5668
  return;
5660
5669
  t.preventEnter = !0;
5661
5670
  const o = r.axis === "x", i = r.direction === "positive" ? 1 : -1, s = 20, d = o ? "lastScrollDirectionX" : "lastScrollDirectionY", l = o ? "frameIdX" : "frameIdY";
5662
5671
  t[l] !== void 0 && (cancelAnimationFrame(t[l]), t[l] = void 0), t[d] = r.direction;
5663
5672
  const p = () => {
5664
- if (!W(t) || !t.draggedNode) {
5673
+ if (!X(t) || !t.draggedNode) {
5665
5674
  t[l] !== void 0 && (cancelAnimationFrame(t[l]), t[l] = void 0);
5666
5675
  return;
5667
5676
  }
@@ -5678,8 +5687,8 @@ function Jn(e, n, t) {
5678
5687
  const r = e.getBoundingClientRect();
5679
5688
  return n >= r.left && n <= r.right && t >= r.top && t <= r.bottom;
5680
5689
  }
5681
- function gn(e, n, t) {
5682
- if (!W(t) || !t.draggedNode)
5690
+ function hn(e, n, t) {
5691
+ if (!X(t) || !t.draggedNode)
5683
5692
  return;
5684
5693
  Nn(t);
5685
5694
  const { x: r, y: o } = e;
@@ -5687,10 +5696,10 @@ function gn(e, n, t) {
5687
5696
  const s = (l, p, u) => {
5688
5697
  Di(u, n, t, { axis: l, direction: p }), i = !0;
5689
5698
  }, d = (l) => {
5690
- const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Kn(l, n, p, u, {
5699
+ const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Zn(l, n, p, u, {
5691
5700
  axis: "x",
5692
5701
  state: t
5693
- }), g = Kn(l, n, p, u, { axis: "y" });
5702
+ }), g = Zn(l, n, p, u, { axis: "y" });
5694
5703
  (c.left || c.right) && (t.lastScrollContainerX = l, s("x", c.right ? "positive" : "negative", l)), (g.up || g.down) && (t.lastScrollContainerY = l, s("y", g.down ? "positive" : "negative", l));
5695
5704
  };
5696
5705
  if (t.lastScrollContainerX && Jn(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !i && t.lastScrollContainerY && Jn(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !i) {
@@ -5706,17 +5715,17 @@ function gn(e, n, t) {
5706
5715
  }
5707
5716
  function Si(e) {
5708
5717
  let n = document.elementFromPoint(e.x, e.y);
5709
- if (!hn(n)) return;
5718
+ if (!fn(n)) return;
5710
5719
  let t, r = !0;
5711
5720
  for (; n && r; ) {
5712
- if (ue.has(n) || G.has(n)) {
5713
- r = !1, t = G.has(n);
5721
+ if (ue.has(n) || Y.has(n)) {
5722
+ r = !1, t = Y.has(n);
5714
5723
  break;
5715
5724
  }
5716
5725
  n = n.parentNode;
5717
5726
  }
5718
5727
  if (t) {
5719
- const o = G.get(n);
5728
+ const o = Y.get(n);
5720
5729
  return o ? {
5721
5730
  parent: {
5722
5731
  el: n,
@@ -5726,7 +5735,7 @@ function Si(e) {
5726
5735
  } else {
5727
5736
  const o = ue.get(n);
5728
5737
  if (!o) return;
5729
- const i = G.get(n.parentNode);
5738
+ const i = Y.get(n.parentNode);
5730
5739
  return i ? {
5731
5740
  node: {
5732
5741
  el: n,
@@ -5739,10 +5748,10 @@ function Si(e) {
5739
5748
  } : void 0;
5740
5749
  }
5741
5750
  }
5742
- function hn(e) {
5751
+ function fn(e) {
5743
5752
  return e instanceof HTMLElement && e.parentNode instanceof HTMLElement;
5744
5753
  }
5745
- function rn(e, n) {
5754
+ function on(e, n) {
5746
5755
  const t = new AbortController();
5747
5756
  for (const r in n) {
5748
5757
  const o = n[r];
@@ -5764,18 +5773,18 @@ function Ni(e, n) {
5764
5773
  const t = Ei(e);
5765
5774
  t && n(t);
5766
5775
  }
5767
- var on = /* @__PURE__ */ new WeakMap();
5776
+ var an = /* @__PURE__ */ new WeakMap();
5768
5777
  function ki(e) {
5769
- const n = on.get(e);
5778
+ const n = an.get(e);
5770
5779
  return n ? n[0] : (console.warn("No values found for parent element"), []);
5771
5780
  }
5772
5781
  function Ai(e, n) {
5773
- const t = on.get(n);
5774
- t && t[1](e), on.set(n, [e, t[1]]);
5782
+ const t = an.get(n);
5783
+ t && t[1](e), an.set(n, [e, t[1]]);
5775
5784
  }
5776
5785
  function $i(e, n) {
5777
5786
  return (t) => {
5778
- on.set(t, n), ja({ parent: t, getValues: ki, setValues: Ai, config: e });
5787
+ an.set(t, n), ja({ parent: t, getValues: ki, setValues: Ai, config: e });
5779
5788
  };
5780
5789
  }
5781
5790
  function et(e) {
@@ -5785,26 +5794,26 @@ function et(e) {
5785
5794
  }));
5786
5795
  }
5787
5796
  function Ii(e, n = {}) {
5788
- const t = Ie(null), [r, o] = z(e);
5797
+ const t = Ie(null), [r, o] = U(e);
5789
5798
  function i(s = {}) {
5790
5799
  et({ parent: t, state: [r, o], ...s });
5791
5800
  }
5792
- return Ee(() => {
5801
+ return ke(() => {
5793
5802
  et({ parent: t, state: [r, o], ...n });
5794
- }, [r]), Ee(() => () => {
5803
+ }, [r]), ke(() => () => {
5795
5804
  t.current && Dt(t.current);
5796
5805
  }, []), [t, r, o, i];
5797
5806
  }
5798
5807
  const nt = {
5799
5808
  border: {
5800
5809
  selected: {
5801
- color: E.palette.blue.B400
5810
+ color: S.palette.blue.B400
5802
5811
  },
5803
5812
  clear: {
5804
- color: E.palette.neutral.N40
5813
+ color: S.palette.neutral.N40
5805
5814
  }
5806
5815
  }
5807
- }, Ri = w.ul`
5816
+ }, Ri = C.ul`
5808
5817
  list-style: none;
5809
5818
  padding: 0;
5810
5819
  margin: 0;
@@ -5813,7 +5822,7 @@ const nt = {
5813
5822
  gap: 12px;
5814
5823
  width: 100%;
5815
5824
  justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
5816
- `, Fi = w.li`
5825
+ `, Fi = C.li`
5817
5826
  & > div {
5818
5827
  border: 1px solid
5819
5828
  ${({ theme: e, $active: n }) => {
@@ -5836,8 +5845,8 @@ const nt = {
5836
5845
  ), x = V.useRef(i);
5837
5846
  V.useEffect(() => {
5838
5847
  if (l) return;
5839
- const N = (C) => {
5840
- const I = C.detail ?? null;
5848
+ const N = (D) => {
5849
+ const I = D.detail ?? null;
5841
5850
  f(I);
5842
5851
  };
5843
5852
  return window.addEventListener(xn, N), () => window.removeEventListener(xn, N);
@@ -5846,10 +5855,10 @@ const nt = {
5846
5855
  l || window.dispatchEvent(
5847
5856
  new CustomEvent(xn, { detail: N })
5848
5857
  );
5849
- }, [l]), D = (N) => {
5858
+ }, [l]), w = (N) => {
5850
5859
  var k;
5851
5860
  if (l) return;
5852
- const C = N.target, I = (k = C == null ? void 0 : C.closest) == null ? void 0 : k.call(C, "li.dnd-item"), F = (I == null ? void 0 : I.getAttribute("data-label")) || null;
5861
+ const D = N.target, I = (k = D == null ? void 0 : D.closest) == null ? void 0 : k.call(D, "li.dnd-item"), F = (I == null ? void 0 : I.getAttribute("data-label")) || null;
5853
5862
  F && (f(F), y(F));
5854
5863
  }, T = V.useCallback(() => {
5855
5864
  l || (f(null), y(null));
@@ -5864,7 +5873,7 @@ const nt = {
5864
5873
  if (l) return;
5865
5874
  const N = x.current;
5866
5875
  if (g.length !== N.length && g.length === N.length + 1) {
5867
- const C = new Set(N), I = g.find((F) => !C.has(F)) || null;
5876
+ const D = new Set(N), I = g.find((F) => !D.has(F)) || null;
5868
5877
  if (I) {
5869
5878
  const F = t === "left" ? "right" : "left";
5870
5879
  d == null || d({ item: I, from: F, to: t });
@@ -5872,9 +5881,9 @@ const nt = {
5872
5881
  }
5873
5882
  x.current = g;
5874
5883
  }, [g, t, d, l]);
5875
- const S = g.length === 0;
5884
+ const E = g.length === 0;
5876
5885
  return /* @__PURE__ */ a(
5877
- je,
5886
+ Ue,
5878
5887
  {
5879
5888
  legend: o,
5880
5889
  width: "100%",
@@ -5884,14 +5893,14 @@ const nt = {
5884
5893
  Ri,
5885
5894
  {
5886
5895
  ref: c,
5887
- onPointerDownCapture: l ? void 0 : D,
5896
+ onPointerDownCapture: l ? void 0 : w,
5888
5897
  onPointerUpCapture: l ? void 0 : T,
5889
5898
  onPointerCancelCapture: l ? void 0 : T,
5890
- $isEmpty: S,
5899
+ $isEmpty: E,
5891
5900
  $locked: l,
5892
5901
  "aria-disabled": l,
5893
5902
  "data-locked": l || void 0,
5894
- children: S ? /* @__PURE__ */ a(
5903
+ children: E ? /* @__PURE__ */ a(
5895
5904
  oe,
5896
5905
  {
5897
5906
  background: !0,
@@ -5901,14 +5910,14 @@ const nt = {
5901
5910
  justifyContent: "center",
5902
5911
  children: /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
5903
5912
  }
5904
- ) : g.map((N, C) => {
5913
+ ) : g.map((N, D) => {
5905
5914
  const I = !l && h === N;
5906
5915
  return /* @__PURE__ */ a(
5907
5916
  Fi,
5908
5917
  {
5909
5918
  className: `dnd-item${I ? " is-dragging" : ""}`,
5910
5919
  "data-label": N,
5911
- "data-first": !!(s && C === 0) || void 0,
5920
+ "data-first": !!(s && D === 0) || void 0,
5912
5921
  $active: I,
5913
5922
  children: /* @__PURE__ */ a(oe, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
5914
5923
  $,
@@ -5929,7 +5938,7 @@ const nt = {
5929
5938
  )
5930
5939
  }
5931
5940
  );
5932
- }, El = (e) => {
5941
+ }, Nl = (e) => {
5933
5942
  const { group: n = "clients", left: t, right: r, onMove: o, locked: i = !1 } = e, s = (d) => {
5934
5943
  i || o == null || o(d);
5935
5944
  };
@@ -5970,7 +5979,7 @@ const nt = {
5970
5979
  ]
5971
5980
  }
5972
5981
  );
5973
- }, Li = w.div`
5982
+ }, Li = C.div`
5974
5983
  & > button {
5975
5984
  height: 66px;
5976
5985
  min-width: 66px;
@@ -5988,7 +5997,7 @@ const nt = {
5988
5997
  }
5989
5998
  }
5990
5999
  }
5991
- `, Nl = (e) => /* @__PURE__ */ a(Li, { children: /* @__PURE__ */ a(q, { ...e }) }), Oi = w.div`
6000
+ `, kl = (e) => /* @__PURE__ */ a(Li, { children: /* @__PURE__ */ a(B, { ...e }) }), Oi = C.div`
5992
6001
  display: flex;
5993
6002
  justify-content: space-between;
5994
6003
  align-items: center;
@@ -6017,11 +6026,11 @@ const nt = {
6017
6026
  }
6018
6027
  }
6019
6028
  }
6020
- `, kl = (e) => {
6029
+ `, Al = (e) => {
6021
6030
  const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: i } = e;
6022
6031
  return /* @__PURE__ */ m(Oi, { children: [
6023
6032
  /* @__PURE__ */ a(
6024
- q,
6033
+ B,
6025
6034
  {
6026
6035
  ...e,
6027
6036
  iconBefore: /* @__PURE__ */ a(jt, {}),
@@ -6032,7 +6041,7 @@ const nt = {
6032
6041
  }
6033
6042
  ),
6034
6043
  /* @__PURE__ */ a(
6035
- q,
6044
+ B,
6036
6045
  {
6037
6046
  ...e,
6038
6047
  iconBefore: /* @__PURE__ */ a(Ut, {}),
@@ -6046,27 +6055,27 @@ const nt = {
6046
6055
  }, ce = {
6047
6056
  border: {
6048
6057
  color: {
6049
- regular: E.palette.neutral.N40,
6050
- disabled: E.palette.neutral.N40,
6051
- focus: E.palette.blue.B300,
6052
- invalid: E.palette.red.R400
6058
+ regular: S.palette.neutral.N40,
6059
+ disabled: S.palette.neutral.N40,
6060
+ focus: S.palette.blue.B300,
6061
+ invalid: S.palette.red.R400
6053
6062
  }
6054
6063
  },
6055
6064
  background: {
6056
6065
  color: {
6057
- regular: E.palette.neutral.N0,
6058
- disabled: E.palette.neutral.N10
6066
+ regular: S.palette.neutral.N0,
6067
+ disabled: S.palette.neutral.N10
6059
6068
  }
6060
6069
  },
6061
6070
  content: {
6062
6071
  color: {
6063
- regular: E.palette.neutral.N900,
6064
- disabled: E.palette.neutral.N70
6072
+ regular: S.palette.neutral.N900,
6073
+ disabled: S.palette.neutral.N70
6065
6074
  }
6066
6075
  },
6067
6076
  placeholder: {
6068
6077
  color: {
6069
- regular: E.palette.neutral.N300
6078
+ regular: S.palette.neutral.N300
6070
6079
  }
6071
6080
  },
6072
6081
  message: {
@@ -6077,11 +6086,11 @@ const nt = {
6077
6086
  },
6078
6087
  option: {
6079
6088
  background: {
6080
- regular: E.palette.neutral.N0,
6081
- hover: E.palette.neutral.N30
6089
+ regular: S.palette.neutral.N0,
6090
+ hover: S.palette.neutral.N30
6082
6091
  }
6083
6092
  }
6084
- }, Pi = w.ul`
6093
+ }, Pi = C.ul`
6085
6094
  display: flex;
6086
6095
  flex-direction: column;
6087
6096
  padding: 4px 0px;
@@ -6157,17 +6166,17 @@ const nt = {
6157
6166
  children: n
6158
6167
  }
6159
6168
  );
6160
- }, zi = w.div`
6169
+ }, zi = C.div`
6161
6170
  cursor: ${({ $disabled: e }) => e && "not-allowed"};
6162
6171
  width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
6163
6172
  position: relative;
6164
- `, Vi = w.div`
6173
+ `, Vi = C.div`
6165
6174
  display: flex;
6166
6175
  align-items: center;
6167
6176
  margin-bottom: 4px;
6168
6177
  gap: 4px;
6169
6178
  pointer-events: ${({ $disabled: e }) => e && "none"};
6170
- `, ji = w.div`
6179
+ `, ji = C.div`
6171
6180
  display: grid;
6172
6181
  height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
6173
6182
  padding: 8px 16px;
@@ -6191,7 +6200,7 @@ const nt = {
6191
6200
  const o = ((s = (i = r == null ? void 0 : r.input) == null ? void 0 : i.border) == null ? void 0 : s.color) || ce.border.color;
6192
6201
  return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
6193
6202
  }};
6194
- `, Ui = w.input`
6203
+ `, Ui = C.input`
6195
6204
  display: ${({ $inputWithData: e }) => e ? "none" : "block"};
6196
6205
  outline: none;
6197
6206
  padding: 0;
@@ -6203,19 +6212,19 @@ const nt = {
6203
6212
  cursor: ${({ readOnly: e, $disabled: n }) => n ? "not-allowed" : e ? "pointer" : "text"};
6204
6213
  font-family: ${({ theme: e }) => {
6205
6214
  var n, t, r;
6206
- return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.font) || E.typography.body.large.font;
6215
+ return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.font) || S.typography.body.large.font;
6207
6216
  }};
6208
6217
  font-size: ${({ theme: e }) => {
6209
6218
  var n, t, r;
6210
- return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.size) || E.typography.body.large.size;
6219
+ return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.size) || S.typography.body.large.size;
6211
6220
  }};
6212
6221
  line-height: ${({ theme: e }) => {
6213
6222
  var n, t, r;
6214
- return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.lineHeight) || E.typography.body.large.lineHeight;
6223
+ return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.lineHeight) || S.typography.body.large.lineHeight;
6215
6224
  }};
6216
6225
  letter-spacing: ${({ theme: e }) => {
6217
6226
  var n, t, r;
6218
- return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.tracking) || E.typography.body.large.tracking;
6227
+ return ((r = (t = (n = e == null ? void 0 : e.typography) == null ? void 0 : n.body) == null ? void 0 : t.large) == null ? void 0 : r.tracking) || S.typography.body.large.tracking;
6219
6228
  }};
6220
6229
  font-weight: ${({ theme: e }) => {
6221
6230
  var n, t, r;
@@ -6249,7 +6258,7 @@ const nt = {
6249
6258
  &:-webkit-autofill {
6250
6259
  -webkit-background-clip: text;
6251
6260
  }
6252
- `, _i = w.div`
6261
+ `, _i = C.div`
6253
6262
  display: flex;
6254
6263
  justify-content: flex-end;
6255
6264
  transition: ease;
@@ -6265,7 +6274,7 @@ const qi = (e) => {
6265
6274
  const { message: n } = e, t = Rn($n), r = ((i = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : i.appearance) || ce.message.appearance;
6266
6275
  return /* @__PURE__ */ m(v, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
6267
6276
  /* @__PURE__ */ a(
6268
- M,
6277
+ j,
6269
6278
  {
6270
6279
  appearance: r,
6271
6280
  icon: /* @__PURE__ */ a(Ht, {}),
@@ -6284,7 +6293,7 @@ const qi = (e) => {
6284
6293
  )
6285
6294
  ] });
6286
6295
  }, Bi = Qt((e, n) => {
6287
- var Ae, ve;
6296
+ var me, L;
6288
6297
  const {
6289
6298
  displayList: t,
6290
6299
  disabled: r,
@@ -6301,25 +6310,25 @@ const qi = (e) => {
6301
6310
  required: f,
6302
6311
  size: x,
6303
6312
  value: y,
6304
- picker: D,
6313
+ picker: w,
6305
6314
  showChevron: T,
6306
- checkedItems: S,
6315
+ checkedItems: E,
6307
6316
  editable: N = !1,
6308
- clearable: C,
6317
+ clearable: D,
6309
6318
  onKeyUp: I,
6310
6319
  onBlur: F,
6311
6320
  onChange: k,
6312
- onClick: _,
6313
- onFocus: ae,
6314
- onOptionClick: he,
6315
- onCheckboxChange: fe,
6316
- handleClear: pe
6317
- } = e, ie = Rn($n), me = ((ve = (Ae = ie == null ? void 0 : ie.input) == null ? void 0 : Ae.required) == null ? void 0 : ve.appearance) || ce.required.appearance, be = f && !r, P = D || y === "" ? "" : rt(g, y), de = dt(
6318
- () => g.filter((U) => S.includes(U.id)),
6319
- [g, S]
6320
- ), ke = (U, L) => {
6321
- U.stopPropagation(), fe({
6322
- target: { checked: !1, value: L }
6321
+ onClick: H,
6322
+ onFocus: se,
6323
+ onOptionClick: ve,
6324
+ onCheckboxChange: pe,
6325
+ handleClear: ge
6326
+ } = e, ae = Rn($n), ye = ((L = (me = ae == null ? void 0 : ae.input) == null ? void 0 : me.required) == null ? void 0 : L.appearance) || ce.required.appearance, Se = f && !r, de = w || y === "" ? "" : rt(g, y), he = dt(
6327
+ () => g.filter((O) => E.includes(O.id)),
6328
+ [g, E]
6329
+ ), fe = (O, M) => {
6330
+ O.stopPropagation(), pe({
6331
+ target: { checked: !1, value: M }
6323
6332
  });
6324
6333
  };
6325
6334
  return /* @__PURE__ */ m(zi, { $fullwidth: i, $disabled: r, ref: n, children: [
@@ -6342,7 +6351,7 @@ const qi = (e) => {
6342
6351
  children: l
6343
6352
  }
6344
6353
  ),
6345
- be && /* @__PURE__ */ a($, { appearance: me, size: "small", type: "body", children: "(Requerido)" })
6354
+ Se && /* @__PURE__ */ a($, { appearance: ye, size: "small", type: "body", children: "(Requerido)" })
6346
6355
  ]
6347
6356
  }
6348
6357
  ),
@@ -6352,7 +6361,7 @@ const qi = (e) => {
6352
6361
  $disabled: r,
6353
6362
  $focused: o,
6354
6363
  $invalid: d,
6355
- onClick: N ? void 0 : _,
6364
+ onClick: N ? void 0 : H,
6356
6365
  $value: y,
6357
6366
  $size: x,
6358
6367
  children: [
@@ -6361,7 +6370,7 @@ const qi = (e) => {
6361
6370
  {
6362
6371
  $inputWithData: !!y,
6363
6372
  autoComplete: "off",
6364
- value: P,
6373
+ value: de,
6365
6374
  name: c,
6366
6375
  id: s,
6367
6376
  placeholder: h,
@@ -6371,10 +6380,10 @@ const qi = (e) => {
6371
6380
  $fullwidth: i,
6372
6381
  $focused: o,
6373
6382
  readOnly: !N,
6374
- onFocus: ae,
6383
+ onFocus: se,
6375
6384
  onBlur: F,
6376
- onChange: (U) => k(c, U.target.value),
6377
- onClick: N ? _ : void 0,
6385
+ onChange: (O) => k(c, O.target.value),
6386
+ onClick: N ? H : void 0,
6378
6387
  onKeyUp: I
6379
6388
  }
6380
6389
  ),
@@ -6386,30 +6395,30 @@ const qi = (e) => {
6386
6395
  alignItems: "center",
6387
6396
  justifyContent: "space-between",
6388
6397
  children: [
6389
- /* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: C && !r && (D ? de.map((U) => /* @__PURE__ */ a(
6390
- De,
6398
+ /* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: D && !r && (w ? he.map((O) => /* @__PURE__ */ a(
6399
+ Ee,
6391
6400
  {
6392
6401
  appearance: "gray",
6393
- label: U.label,
6402
+ label: O.label,
6394
6403
  removable: !0,
6395
6404
  displayIcon: !1,
6396
- onClose: (L) => ke(L, U.id)
6405
+ onClose: (M) => fe(M, O.id)
6397
6406
  },
6398
- U.id
6407
+ O.id
6399
6408
  )) : (y ?? "") !== "" && /* @__PURE__ */ a(
6400
- De,
6409
+ Ee,
6401
6410
  {
6402
6411
  appearance: "gray",
6403
6412
  label: rt(g, y),
6404
6413
  removable: !0,
6405
6414
  displayIcon: !1,
6406
- onClose: (U) => {
6407
- U.stopPropagation(), pe();
6415
+ onClose: (O) => {
6416
+ O.stopPropagation(), ge();
6408
6417
  }
6409
6418
  }
6410
6419
  )) }),
6411
6420
  T && /* @__PURE__ */ a(_i, { $displayList: t, children: /* @__PURE__ */ a(
6412
- M,
6421
+ j,
6413
6422
  {
6414
6423
  appearance: "dark",
6415
6424
  icon: /* @__PURE__ */ a(_t, {}),
@@ -6428,18 +6437,18 @@ const qi = (e) => {
6428
6437
  Mi,
6429
6438
  {
6430
6439
  maxItems: p,
6431
- onOptionClick: he,
6440
+ onOptionClick: ve,
6432
6441
  options: g,
6433
- children: g.map((U) => /* @__PURE__ */ a(
6442
+ children: g.map((O) => /* @__PURE__ */ a(
6434
6443
  Xt,
6435
6444
  {
6436
- id: U.id,
6437
- label: U.label,
6438
- checked: S.includes(U.id),
6439
- onCheckboxChange: fe,
6440
- picker: D
6445
+ id: O.id,
6446
+ label: O.label,
6447
+ checked: E.includes(O.id),
6448
+ onCheckboxChange: pe,
6449
+ picker: w
6441
6450
  },
6442
- U.id
6451
+ O.id
6443
6452
  ))
6444
6453
  }
6445
6454
  )
@@ -6462,77 +6471,77 @@ const qi = (e) => {
6462
6471
  options: f,
6463
6472
  placeholder: x,
6464
6473
  required: y = !1,
6465
- size: D = "wide",
6474
+ size: w = "wide",
6466
6475
  value: T,
6467
- showOptions: S = !1,
6476
+ showOptions: E = !1,
6468
6477
  picker: N = !1,
6469
- showChevron: C = !0,
6478
+ showChevron: D = !0,
6470
6479
  editable: I = !1,
6471
6480
  clearable: F = !0
6472
- } = e, [k, _] = z(!1), [ae, he] = z(!1), [fe, pe] = z([]), ie = Ie(null);
6473
- Ee(() => {
6481
+ } = e, [k, H] = U(!1), [se, ve] = U(!1), [pe, ge] = U([]), ae = Ie(null);
6482
+ ke(() => {
6474
6483
  if (N) {
6475
- const L = T ? T.split(",").map((X) => X.trim()) : [];
6476
- pe(L);
6484
+ const M = T ? T.split(",").map((P) => P.trim()) : [];
6485
+ ge(M);
6477
6486
  }
6478
6487
  }, [T, N]);
6479
- function me() {
6480
- u(l, ""), pe([]), _(!1);
6488
+ function ye() {
6489
+ u(l, ""), ge([]), H(!1);
6481
6490
  }
6482
- function be(L) {
6491
+ function Se(M) {
6483
6492
  if (!n) {
6484
- _(!k);
6493
+ H(!k);
6485
6494
  try {
6486
- c && c(L);
6487
- } catch (X) {
6488
- console.error(`Error when clicking over select. ${X}`);
6495
+ c && c(M);
6496
+ } catch (P) {
6497
+ console.error(`Error when clicking over select. ${P}`);
6489
6498
  }
6490
6499
  }
6491
6500
  }
6492
- const P = Zt((L) => {
6493
- ie.current && L.target && !ie.current.contains(L.target) && _(!1);
6501
+ const de = Kt((M) => {
6502
+ ae.current && M.target && !ae.current.contains(M.target) && H(!1);
6494
6503
  }, []);
6495
- function de(L) {
6504
+ function he(M) {
6496
6505
  try {
6497
- L.type === "focus" && (he(!0), g && g(L)), L.type === "blur" && (he(!1), p && p(L));
6498
- } catch (X) {
6499
- console.error(`Error executing focus/blur callback. ${X}`);
6506
+ M.type === "focus" && (ve(!0), g && g(M)), M.type === "blur" && (ve(!1), p && p(M));
6507
+ } catch (P) {
6508
+ console.error(`Error executing focus/blur callback. ${P}`);
6500
6509
  }
6501
6510
  }
6502
- function ke(L) {
6503
- _(!1);
6511
+ function fe(M) {
6512
+ H(!1);
6504
6513
  try {
6505
- u && u(l, L);
6506
- } catch (X) {
6507
- console.error(`Error when changing value using callback. ${X}`);
6514
+ u && u(l, M);
6515
+ } catch (P) {
6516
+ console.error(`Error when changing value using callback. ${P}`);
6508
6517
  }
6509
6518
  }
6510
- function Ae(L) {
6511
- L.key === "Escape" && _(!1), _(!k);
6519
+ function me(M) {
6520
+ M.key === "Escape" && H(!1), H(!k);
6512
6521
  try {
6513
- h && h(L);
6514
- } catch (X) {
6515
- console.error(`Error when clicking over select. ${X}`);
6522
+ h && h(M);
6523
+ } catch (P) {
6524
+ console.error(`Error when clicking over select. ${P}`);
6516
6525
  }
6517
6526
  }
6518
- function ve(L) {
6519
- const { value: X, checked: Pn } = L.target;
6520
- pe((ze) => {
6521
- const R = Pn ? [...ze, X] : ze.filter((H) => H !== X);
6527
+ function L(M) {
6528
+ const { value: P, checked: Pn } = M.target;
6529
+ ge((Ve) => {
6530
+ const R = Pn ? [...Ve, P] : Ve.filter((q) => q !== P);
6522
6531
  return u(l, R.join(",")), R;
6523
6532
  });
6524
6533
  }
6525
- Ee(() => (document.addEventListener("click", P), () => {
6526
- document.removeEventListener("click", P);
6527
- }), [P]);
6528
- const U = dt(() => F || N ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, F, N]);
6534
+ ke(() => (document.addEventListener("click", de), () => {
6535
+ document.removeEventListener("click", de);
6536
+ }), [de]);
6537
+ const O = dt(() => F || N ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, F, N]);
6529
6538
  return /* @__PURE__ */ a(
6530
6539
  Bi,
6531
6540
  {
6532
- ref: ie,
6541
+ ref: ae,
6533
6542
  disabled: n,
6534
- displayList: k || S,
6535
- focused: ae,
6543
+ displayList: k || E,
6544
+ focused: se,
6536
6545
  fullwidth: t,
6537
6546
  id: r,
6538
6547
  invalid: o,
@@ -6540,27 +6549,27 @@ const qi = (e) => {
6540
6549
  maxItems: s,
6541
6550
  message: d,
6542
6551
  name: l,
6543
- options: U,
6552
+ options: O,
6544
6553
  placeholder: x,
6545
6554
  required: y,
6546
- size: D,
6555
+ size: w,
6547
6556
  value: T,
6548
6557
  picker: N,
6549
- showChevron: C,
6550
- checkedItems: fe,
6558
+ showChevron: D,
6559
+ checkedItems: pe,
6551
6560
  editable: I,
6552
6561
  clearable: F,
6553
- handleClear: me,
6554
- onBlur: de,
6562
+ handleClear: ye,
6563
+ onBlur: he,
6555
6564
  onChange: u,
6556
- onClick: be,
6557
- onFocus: de,
6558
- onOptionClick: ke,
6559
- onKeyUp: Ae,
6560
- onCheckboxChange: ve
6565
+ onClick: Se,
6566
+ onFocus: he,
6567
+ onOptionClick: fe,
6568
+ onKeyUp: me,
6569
+ onCheckboxChange: L
6561
6570
  }
6562
6571
  );
6563
- }, Al = (e) => {
6572
+ }, $l = (e) => {
6564
6573
  const {
6565
6574
  disabled: n = !1,
6566
6575
  fullwidth: t = !1,
@@ -6597,20 +6606,29 @@ const qi = (e) => {
6597
6606
  picker: !0
6598
6607
  }
6599
6608
  );
6600
- }, $l = (e) => Object.values(e).flat(), Il = (e, n) => {
6601
- const t = Be(e);
6609
+ }, Il = (e) => Object.values(e).flat(), Rl = (e, n) => {
6610
+ const t = Oe(e);
6602
6611
  return Object.fromEntries(
6603
6612
  Object.entries(t).map(([r, o]) => [r, o.map(n)])
6604
6613
  );
6605
- }, Ve = /* @__PURE__ */ new Map(), Yi = (e, n) => Ve.get(`${n}:${e}`), Wi = (e, n, t) => {
6614
+ }, Yi = (e) => Object.entries(e).map(([n, t]) => ({
6615
+ ConditionGroupId: n,
6616
+ conditionsThatEstablishesTheDecision: tn(t)
6617
+ })), Fl = (e) => {
6618
+ const n = Oe(e), t = {
6619
+ ...e,
6620
+ conditionGroups: Yi(n)
6621
+ };
6622
+ return delete t.conditionsThatEstablishesTheDecision, t;
6623
+ }, je = /* @__PURE__ */ new Map(), Wi = (e, n) => je.get(`${n}:${e}`), Xi = (e, n, t) => {
6606
6624
  const r = `${n}:${e}`;
6607
- if (Ve.set(r, t), Ve.size > 1e3) {
6608
- const o = Ve.keys().next().value;
6609
- o !== void 0 && Ve.delete(o);
6625
+ if (je.set(r, t), je.size > 1e3) {
6626
+ const o = je.keys().next().value;
6627
+ o !== void 0 && je.delete(o);
6610
6628
  }
6611
- }, ot = /* @__PURE__ */ new Map(), Xi = 1e3, Qi = (e) => {
6629
+ }, ot = /* @__PURE__ */ new Map(), Qi = 1e3, Ki = (e) => {
6612
6630
  const n = Date.now(), t = ot.get(e) || 0;
6613
- return n - t < Xi ? !0 : (ot.set(e, n), !1);
6631
+ return n - t < Qi ? !0 : (ot.set(e, n), !1);
6614
6632
  }, Zi = (e) => {
6615
6633
  const n = er(e);
6616
6634
  return {
@@ -6621,10 +6639,10 @@ const qi = (e) => {
6621
6639
  ita: "it",
6622
6640
  por: "pt"
6623
6641
  }[n] || "en";
6624
- }, Ki = async (e, n, { url: t, apiKey: r }) => {
6625
- const o = `${n}:${e}`, i = Yi(e, n);
6642
+ }, Ji = async (e, n, { url: t, apiKey: r }) => {
6643
+ const o = `${n}:${e}`, i = Wi(e, n);
6626
6644
  if (i) return i;
6627
- if (Qi(o))
6645
+ if (Ki(o))
6628
6646
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
6629
6647
  const s = Zi(e);
6630
6648
  try {
@@ -6642,15 +6660,15 @@ const qi = (e) => {
6642
6660
  }
6643
6661
  }
6644
6662
  ), l = (d == null ? void 0 : d.translatedText) || e;
6645
- return Wi(e, n, l), l;
6663
+ return Xi(e, n, l), l;
6646
6664
  } catch (d) {
6647
6665
  return console.warn(`[Translation] Failed for: "${e}"`, d), e;
6648
6666
  }
6649
- }, Ji = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
6667
+ }, el = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
6650
6668
  const r = await Promise.all(
6651
6669
  Object.entries(e).map(async ([o, i]) => {
6652
- if (Ji(i)) {
6653
- const s = await Ki(i, n, t);
6670
+ if (el(i)) {
6671
+ const s = await Ji(i, n, t);
6654
6672
  return [o, s];
6655
6673
  } else if (Array.isArray(i)) {
6656
6674
  const s = await Promise.all(
@@ -6669,38 +6687,40 @@ const qi = (e) => {
6669
6687
  return Object.fromEntries(r);
6670
6688
  };
6671
6689
  export {
6672
- kl as BackAndNextButton,
6690
+ Al as BackAndNextButton,
6673
6691
  Xe as BusinessRuleCard,
6674
6692
  gt as BusinessRuleCardNew,
6675
6693
  Fn as BusinessRuleView,
6676
6694
  ft as BusinessRuleViewNew,
6677
- gl as BusinessRules,
6678
- fl as BusinessRulesNew,
6679
- hl as BusinessRulesWithGroup,
6680
- Al as Checkpicker,
6681
- El as DragAndDropBoxes,
6695
+ hl as BusinessRules,
6696
+ ml as BusinessRulesNew,
6697
+ fl as BusinessRulesWithGroup,
6698
+ $l as Checkpicker,
6699
+ Nl as DragAndDropBoxes,
6682
6700
  tt as DraggableList,
6683
6701
  ka as DropdownMenu,
6684
- Sl as DropdownMenuContainer,
6685
- ge as EValueHowToSetUp,
6686
- ml as Filter,
6687
- bl as FilterModal,
6688
- vl as FormFilter,
6702
+ El as DropdownMenuContainer,
6703
+ be as EValueHowToSetUp,
6704
+ bl as Filter,
6705
+ vl as FilterModal,
6706
+ yl as FormFilter,
6689
6707
  ut as ModalRules,
6690
6708
  Ta as RulesForm,
6691
- Nl as SendButton,
6709
+ kl as SendButton,
6692
6710
  _o as buildEsConditionSentence,
6693
6711
  da as convertRangeToString,
6694
6712
  ht as filterByGroup,
6695
- $l as flatFromGroups,
6696
- yl as formatDecisionForBackend,
6697
- Be as getConditionsByGroup,
6698
- Il as mapByGroup,
6699
- xl as parseRangeFromString,
6700
- Tl as revertSortedDataSampleSwitchPlaces,
6701
- wl as revertSortedDataSwitchPlaces,
6702
- Cl as sortDisplayDataSampleSwitchPlaces,
6703
- Dl as sortDisplayDataSwitchPlaces,
6713
+ Il as flatFromGroups,
6714
+ xl as formatDecisionForBackend,
6715
+ Oe as getConditionsByGroupNew,
6716
+ Yi as groupsRecordToArrayNew,
6717
+ Rl as mapByGroupNew,
6718
+ Fl as normalizeDecisionToNewShape,
6719
+ Tl as parseRangeFromString,
6720
+ wl as revertSortedDataSampleSwitchPlaces,
6721
+ Cl as revertSortedDataSwitchPlaces,
6722
+ Dl as sortDisplayDataSampleSwitchPlaces,
6723
+ Sl as sortDisplayDataSwitchPlaces,
6704
6724
  at as translateObject,
6705
- Ki as translateText
6725
+ Ji as translateText
6706
6726
  };