@isettingkit/business-rules 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.es.js +484 -470
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -5,7 +5,7 @@ import T, { keyframes as qn, ThemeContext as mn } from "styled-components";
5
5
  import { ValueDataType as X, ValueHowToSetUp as te, DecisionConditionRenderNew as Cn, DecisionConditionRender as Tn } from "@isettingkit/input";
6
6
  import { DecisionViewConditionRenderer as en, DecisionViewConditionRendererNew as Ve } from "@isettingkit/view";
7
7
  import { createPortal as bn } from "react-dom";
8
- import H, { useState as M, useRef as Ce, useEffect as ve, useContext as vn, forwardRef as Rt, useMemo as Gn, useCallback as Ft } from "react";
8
+ import M, { useState as z, useRef as Ce, useEffect as ve, useContext as vn, forwardRef as Rt, useMemo as Gn, useCallback as Ft } from "react";
9
9
  import { useFormik as Yn } from "formik";
10
10
  import { string as Ne, mixed as We, object as le, number as Se, lazy as Ue, date as _e } from "yup";
11
11
  import { Link as Xn, useLocation as Lt } from "react-router-dom";
@@ -118,7 +118,7 @@ const qt = {
118
118
  skeleton: l,
119
119
  terms: d,
120
120
  textValues: s,
121
- visibleConditions: c
121
+ visibleConditions: p
122
122
  } = e;
123
123
  return a ? /* @__PURE__ */ v(w, { direction: "column", gap: "12px", children: [
124
124
  /* @__PURE__ */ i(w, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
@@ -140,7 +140,7 @@ const qt = {
140
140
  justifyContent: n,
141
141
  height: "203px",
142
142
  children: [
143
- c.length > 0 && /* @__PURE__ */ i(
143
+ p.length > 0 && /* @__PURE__ */ i(
144
144
  I,
145
145
  {
146
146
  type: "label",
@@ -151,16 +151,16 @@ const qt = {
151
151
  children: s.factsThatConditionIt
152
152
  }
153
153
  ),
154
- c.length > 0 && c.map((p) => /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ i(w, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
154
+ p.length > 0 && p.map((c) => /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ i(w, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
155
155
  en,
156
156
  {
157
- element: { ...p, value: p.value },
157
+ element: { ...c, value: c.value },
158
158
  valueData: Pe(
159
- p
159
+ c
160
160
  )
161
161
  }
162
- ) }) }, p.conditionName)),
163
- c.length > 0 && /* @__PURE__ */ i(Z, { dashed: !0 }),
162
+ ) }) }, c.conditionName)),
163
+ p.length > 0 && /* @__PURE__ */ i(Z, { dashed: !0 }),
164
164
  d && /* @__PURE__ */ i(G, { children: r && /* @__PURE__ */ i(
165
165
  en,
166
166
  {
@@ -189,7 +189,7 @@ const qt = {
189
189
  gap: "12px",
190
190
  justifyContent: "space-between",
191
191
  height: "203px",
192
- children: l.map((p, u) => /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ v(
192
+ children: l.map((c, u) => /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ v(
193
193
  w,
194
194
  {
195
195
  direction: "column",
@@ -243,7 +243,7 @@ const qt = {
243
243
  howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
244
244
  } : null, s = ((g = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter(
245
245
  (f) => !f.hidden
246
- )) || [], c = Array.from({ length: 5 }), p = !!(!t && n && r && d), u = s.length < 2 ? "start" : "space-between";
246
+ )) || [], p = Array.from({ length: 5 }), c = !!(!t && n && r && d), u = s.length < 2 ? "start" : "space-between";
247
247
  return /* @__PURE__ */ i(
248
248
  Gt,
249
249
  {
@@ -251,8 +251,8 @@ const qt = {
251
251
  decision: n,
252
252
  decisionDateElement: l,
253
253
  decisionMapper: d,
254
- loading: p,
255
- skeleton: c,
254
+ loading: c,
255
+ skeleton: p,
256
256
  terms: !!(r != null && r.terms),
257
257
  textValues: r,
258
258
  visibleConditions: s
@@ -465,7 +465,7 @@ const Qt = T.div`
465
465
  handleDelete: l,
466
466
  textValues: d
467
467
  } = e, s = o ? Array.from({ length: 3 }).map(
468
- (p, u) => ln({
468
+ (c, u) => ln({
469
469
  type: "loading",
470
470
  index: u,
471
471
  controls: n,
@@ -476,9 +476,9 @@ const Qt = T.div`
476
476
  textValues: d
477
477
  })
478
478
  ) : r == null ? void 0 : r.map(
479
- (p) => ln({
479
+ (c) => ln({
480
480
  type: "decision",
481
- decision: p,
481
+ decision: c,
482
482
  controls: n,
483
483
  customTitleContentAddCard: t,
484
484
  loading: o,
@@ -486,9 +486,9 @@ const Qt = T.div`
486
486
  handleDelete: l,
487
487
  textValues: d
488
488
  })
489
- ), c = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
490
- return { renderedCards: s, shouldRenderAddCard: c };
491
- }, si = (e) => {
489
+ ), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
490
+ return { renderedCards: s, shouldRenderAddCard: p };
491
+ }, di = (e) => {
492
492
  const {
493
493
  controls: n = !0,
494
494
  customTitleContentAddCard: t,
@@ -498,8 +498,8 @@ const Qt = T.div`
498
498
  decisionTemplate: l,
499
499
  isModalOpen: d,
500
500
  selectedDecision: s,
501
- loading: c,
502
- handleOpenModal: p,
501
+ loading: p,
502
+ handleOpenModal: c,
503
503
  handleCloseModal: u,
504
504
  handleSubmitForm: g,
505
505
  handleDelete: f,
@@ -508,11 +508,11 @@ const Qt = T.div`
508
508
  controls: n,
509
509
  customTitleContentAddCard: t,
510
510
  decisions: o,
511
- loading: c,
512
- handleOpenModal: p,
511
+ loading: p,
512
+ handleOpenModal: c,
513
513
  handleDelete: f,
514
514
  textValues: a
515
- }), C = (o == null ? void 0 : o.length) === 0 && !c;
515
+ }), C = (o == null ? void 0 : o.length) === 0 && !p;
516
516
  return /* @__PURE__ */ v(G, { children: [
517
517
  /* @__PURE__ */ i(Kt, { children: /* @__PURE__ */ i(Zt, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ v(
518
518
  w,
@@ -547,7 +547,7 @@ const Qt = T.div`
547
547
  B,
548
548
  {
549
549
  iconBefore: /* @__PURE__ */ i(fn, {}),
550
- onClick: () => p ? p() : null,
550
+ onClick: () => c ? c() : null,
551
551
  children: t || "Agregar decisión"
552
552
  }
553
553
  )
@@ -573,8 +573,8 @@ const Qt = T.div`
573
573
  controls: n,
574
574
  customTitleContentAddCard: t,
575
575
  customMessageEmptyDecisions: r,
576
- loading: c,
577
- handleOpenModal: p,
576
+ loading: p,
577
+ handleOpenModal: c,
578
578
  handleDelete: f,
579
579
  textValues: a,
580
580
  shouldRenderEmptyMessage: C,
@@ -641,7 +641,7 @@ const Qt = T.div`
641
641
  border-radius: ${({ $borderRadius: e }) => e};
642
642
  box-sizing: ${({ $boxSizing: e }) => e};
643
643
  overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
644
- `, Q = H.forwardRef(
644
+ `, Q = M.forwardRef(
645
645
  (e, n) => {
646
646
  const {
647
647
  children: t,
@@ -651,8 +651,8 @@ const Qt = T.div`
651
651
  alignItems: l,
652
652
  alignContent: d,
653
653
  height: s,
654
- width: c,
655
- gap: p,
654
+ width: p,
655
+ gap: c,
656
656
  background: u,
657
657
  borderRadius: g,
658
658
  border: f,
@@ -670,9 +670,9 @@ const Qt = T.div`
670
670
  $alignItems: l,
671
671
  $alignContent: d,
672
672
  height: s,
673
- width: c,
673
+ width: p,
674
674
  wrap: r,
675
- $gap: p,
675
+ $gap: c,
676
676
  $background: u,
677
677
  $border: f,
678
678
  $margin: b,
@@ -736,8 +736,8 @@ const gr = T.div`
736
736
  visibleConditions: l,
737
737
  tagLabel: d,
738
738
  isOpen: s,
739
- onToggle: c,
740
- hasEffectiveFrom: p,
739
+ onToggle: p,
740
+ hasEffectiveFrom: c,
741
741
  hasValidUntil: u,
742
742
  effectiveFromRenderer: g,
743
743
  validUntilRenderer: f,
@@ -745,7 +745,7 @@ const gr = T.div`
745
745
  onDelete: x
746
746
  } = e;
747
747
  return o ? /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
748
- /* @__PURE__ */ i(gr, { onClick: c, children: /* @__PURE__ */ v(
748
+ /* @__PURE__ */ i(gr, { onClick: p, children: /* @__PURE__ */ v(
749
749
  w,
750
750
  {
751
751
  alignItems: "start",
@@ -852,7 +852,7 @@ const gr = T.div`
852
852
  },
853
853
  m.conditionName
854
854
  )),
855
- p && g && /* @__PURE__ */ i(
855
+ c && g && /* @__PURE__ */ i(
856
856
  Q,
857
857
  {
858
858
  direction: "column",
@@ -913,7 +913,7 @@ const gr = T.div`
913
913
  onToggle: l,
914
914
  onEdit: d,
915
915
  onDelete: s
916
- } = e, c = !!(n != null && n.effectiveFrom), p = !!(n != null && n.validUntil), u = c ? {
916
+ } = e, p = !!(n != null && n.effectiveFrom), c = !!(n != null && n.validUntil), u = p ? {
917
917
  element: {
918
918
  labelName: r == null ? void 0 : r.effectiveFrom,
919
919
  value: String(n.effectiveFrom),
@@ -926,7 +926,7 @@ const gr = T.div`
926
926
  howToSetTheDecision: te.EQUAL,
927
927
  decisionDataType: X.DATE
928
928
  })
929
- } : null, g = p ? {
929
+ } : null, g = c ? {
930
930
  element: {
931
931
  labelName: r == null ? void 0 : r.validUntil,
932
932
  value: String(n.validUntil),
@@ -958,8 +958,8 @@ const gr = T.div`
958
958
  tagLabel: k,
959
959
  isOpen: a,
960
960
  onToggle: l,
961
- hasEffectiveFrom: c,
962
- hasValidUntil: p,
961
+ hasEffectiveFrom: p,
962
+ hasValidUntil: c,
963
963
  effectiveFromRenderer: u,
964
964
  validUntilRenderer: g,
965
965
  onEdit: d,
@@ -1147,8 +1147,8 @@ const vr = T.div`
1147
1147
  handleDelete: l,
1148
1148
  textValues: d,
1149
1149
  isOpenFor: s,
1150
- toggleAt: c
1151
- } = e, p = o ? Array.from({ length: 3 }).map(
1150
+ toggleAt: p
1151
+ } = e, c = o ? Array.from({ length: 3 }).map(
1152
1152
  (g, f) => sn({
1153
1153
  type: "loading",
1154
1154
  index: f,
@@ -1171,10 +1171,10 @@ const vr = T.div`
1171
1171
  textValues: d,
1172
1172
  index: f,
1173
1173
  isOpen: s ? s(f) : !1,
1174
- onToggle: c ? () => c(f) : void 0
1174
+ onToggle: p ? () => p(f) : void 0
1175
1175
  })
1176
1176
  ), u = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
1177
- return { renderedCards: p, shouldRenderAddCard: u };
1177
+ return { renderedCards: c, shouldRenderAddCard: u };
1178
1178
  }, Nr = T.div`
1179
1179
  position: relative;
1180
1180
  & > div {
@@ -1328,7 +1328,7 @@ function Pr({
1328
1328
  l.values.value,
1329
1329
  l.values.decisionDataType
1330
1330
  ).schema),
1331
- conditionsThatEstablishesTheDecision: Ue((p, { parent: u }) => {
1331
+ conditionsThatEstablishesTheDecision: Ue((c, { parent: u }) => {
1332
1332
  if ((u == null ? void 0 : u.toggleNone) && Object.keys(u.conditionsThatEstablishesTheDecision || {}).length > 0) return le().shape({});
1333
1333
  const b = o().reduce(
1334
1334
  (x, m) => {
@@ -1359,7 +1359,7 @@ function Pr({
1359
1359
  "Se requiere la fecha de vigencia desde"
1360
1360
  ), d.validUntil = _e().when(
1361
1361
  "checkClosed",
1362
- (p, u, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? u.required("Se requiere la fecha de vigencia hasta").test(
1362
+ (c, u, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? u.required("Se requiere la fecha de vigencia hasta").test(
1363
1363
  "is-after-startDate",
1364
1364
  "La fecha válida para la vigencia hasta debe ser mayor o igual a la fecha de inicio",
1365
1365
  function(b) {
@@ -1373,37 +1373,37 @@ function Pr({
1373
1373
  initialValues: a,
1374
1374
  validationSchema: s,
1375
1375
  validateOnBlur: !0,
1376
- onSubmit: (p) => {
1376
+ onSubmit: (c) => {
1377
1377
  const u = Object.fromEntries(
1378
1378
  Object.entries(r).map(([f, b]) => {
1379
1379
  const m = b.filter((y) => {
1380
1380
  var C;
1381
- const D = (C = p.conditionsThatEstablishesTheDecision) == null ? void 0 : C[y.conditionName];
1381
+ const D = (C = c.conditionsThatEstablishesTheDecision) == null ? void 0 : C[y.conditionName];
1382
1382
  return D != null && D !== "";
1383
1383
  }).map((y) => {
1384
1384
  var D;
1385
1385
  return {
1386
1386
  ...y,
1387
- value: (D = p.conditionsThatEstablishesTheDecision) == null ? void 0 : D[y.conditionName]
1387
+ value: (D = c.conditionsThatEstablishesTheDecision) == null ? void 0 : D[y.conditionName]
1388
1388
  };
1389
1389
  });
1390
1390
  return [f, m];
1391
1391
  })
1392
1392
  ), g = {
1393
1393
  ...e,
1394
- ruleName: p.ruleName,
1395
- decisionDataType: p.decisionDataType,
1396
- howToSetTheDecision: p.howToSetTheDecision,
1397
- value: p.value,
1398
- effectiveFrom: p.effectiveFrom,
1399
- validUntil: p.validUntil,
1394
+ ruleName: c.ruleName,
1395
+ decisionDataType: c.decisionDataType,
1396
+ howToSetTheDecision: c.howToSetTheDecision,
1397
+ value: c.value,
1398
+ effectiveFrom: c.effectiveFrom,
1399
+ validUntil: c.validUntil,
1400
1400
  conditionsThatEstablishesTheDecision: u
1401
1401
  };
1402
1402
  n(g);
1403
1403
  }
1404
- }), { formik: l, handleToggleNoneChange: (p) => {
1405
- l.setFieldValue("toggleNone", p), o().forEach((g) => {
1406
- if (p)
1404
+ }), { formik: l, handleToggleNoneChange: (c) => {
1405
+ l.setFieldValue("toggleNone", c), o().forEach((g) => {
1406
+ if (c)
1407
1407
  l.setFieldValue(
1408
1408
  `conditionsThatEstablishesTheDecision.${g.conditionName}`,
1409
1409
  void 0
@@ -1465,12 +1465,12 @@ const Or = T.div`
1465
1465
  checkedClosed: l = !1,
1466
1466
  required: d = !1,
1467
1467
  valueStart: s = "",
1468
- valueEnd: c = "",
1469
- messageStart: p = "",
1468
+ valueEnd: p = "",
1469
+ messageStart: c = "",
1470
1470
  messageEnd: u = "",
1471
1471
  statusStart: g = "pending",
1472
1472
  statusEnd: f = "pending"
1473
- } = e, [b, x] = M(l), [m, y] = M(s), [D, C] = M(c), k = ({ target: $ }) => {
1473
+ } = e, [b, x] = z(l), [m, y] = z(s), [D, C] = z(p), k = ({ target: $ }) => {
1474
1474
  x($.checked), r && r($.checked);
1475
1475
  }, E = ($) => {
1476
1476
  y($.target.value), n($);
@@ -1507,7 +1507,7 @@ const Or = T.div`
1507
1507
  required: d,
1508
1508
  size: "compact",
1509
1509
  status: g,
1510
- message: p,
1510
+ message: c,
1511
1511
  fullwidth: !0
1512
1512
  }
1513
1513
  ),
@@ -1539,8 +1539,8 @@ const Or = T.div`
1539
1539
  onCancel: l,
1540
1540
  onClearCondition: d,
1541
1541
  onTabChange: s,
1542
- showConditionsError: c,
1543
- tabs: p,
1542
+ showConditionsError: p,
1543
+ tabs: c,
1544
1544
  termEndStatus: u,
1545
1545
  termStartStatus: g,
1546
1546
  textValues: f,
@@ -1562,7 +1562,7 @@ const Or = T.div`
1562
1562
  Nt,
1563
1563
  {
1564
1564
  onChange: s,
1565
- tabs: p,
1565
+ tabs: c,
1566
1566
  selectedTab: n
1567
1567
  }
1568
1568
  ),
@@ -1615,7 +1615,7 @@ const Or = T.div`
1615
1615
  },
1616
1616
  C.conditionName
1617
1617
  )) }),
1618
- c && /* @__PURE__ */ i(I, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
1618
+ p && /* @__PURE__ */ i(I, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
1619
1619
  ] }) }),
1620
1620
  /* @__PURE__ */ i(Le, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
1621
1621
  Mr,
@@ -1677,7 +1677,7 @@ const Or = T.div`
1677
1677
  onRemoveCondition: a,
1678
1678
  onRestoreConditions: l,
1679
1679
  fullTemplate: d
1680
- } = e, { formik: s, handleToggleNoneChange: c } = Pr({
1680
+ } = e, { formik: s, handleToggleNoneChange: p } = Pr({
1681
1681
  decision: n,
1682
1682
  onSubmitEvent: t,
1683
1683
  textValues: r
@@ -1690,40 +1690,40 @@ const Or = T.div`
1690
1690
  ], m = {};
1691
1691
  let y = 1;
1692
1692
  const D = x.map((N) => {
1693
- const V = N === "group-primary" ? "mainCondition" : `alternateCondition-${y++}`;
1694
- return m[V] = N, {
1695
- id: V,
1696
- label: N === "group-primary" ? kn(N, 0) : kn(N, Number(V.split("-").at(-1))),
1693
+ const H = N === "group-primary" ? "mainCondition" : `alternateCondition-${y++}`;
1694
+ return m[H] = N, {
1695
+ id: H,
1696
+ label: N === "group-primary" ? kn(N, 0) : kn(N, Number(H.split("-").at(-1))),
1697
1697
  isDisabled: !1
1698
1698
  };
1699
- }), [C, k] = H.useState(
1699
+ }), [C, k] = M.useState(
1700
1700
  ((ze = D[0]) == null ? void 0 : ze.id) ?? "mainCondition"
1701
- ), E = (N) => k(N), R = m[C] ?? "group-primary", L = f[R] ?? [], $ = f["group-primary"] ?? [], z = {
1701
+ ), E = (N) => k(N), R = m[C] ?? "group-primary", L = f[R] ?? [], $ = f["group-primary"] ?? [], V = {
1702
1702
  decisionDataType: n.decisionDataType,
1703
1703
  howToSetTheCondition: n.howToSetTheDecision,
1704
1704
  labelName: n.labelName,
1705
1705
  listOfPossibleValues: n.listOfPossibleValues,
1706
1706
  ruleName: n.ruleName
1707
- }, oe = s.submitCount > 0 || !!s.touched.effectiveFrom, xe = s.submitCount > 0 || !!s.touched.validUntil, we = oe ? s.errors.effectiveFrom ? "invalid" : "valid" : void 0, pe = xe ? s.errors.validUntil ? "invalid" : "valid" : void 0, J = H.useMemo(() => {
1707
+ }, oe = s.submitCount > 0 || !!s.touched.effectiveFrom, xe = s.submitCount > 0 || !!s.touched.validUntil, we = oe ? s.errors.effectiveFrom ? "invalid" : "valid" : void 0, pe = xe ? s.errors.validUntil ? "invalid" : "valid" : void 0, J = M.useMemo(() => {
1708
1708
  const N = s.errors.conditionsThatEstablishesTheDecision;
1709
1709
  if (!N) return;
1710
1710
  if (typeof N == "string") return N;
1711
- const V = (K) => {
1711
+ const H = (K) => {
1712
1712
  if (K) {
1713
1713
  if (typeof K == "string") return K;
1714
1714
  if (Array.isArray(K))
1715
1715
  for (const Re of K) {
1716
- const he = V(Re);
1716
+ const he = H(Re);
1717
1717
  if (he) return he;
1718
1718
  }
1719
1719
  else if (typeof K == "object")
1720
1720
  for (const Re of Object.values(K)) {
1721
- const he = V(Re);
1721
+ const he = H(Re);
1722
1722
  if (he) return he;
1723
1723
  }
1724
1724
  }
1725
1725
  };
1726
- return V(N);
1726
+ return H(N);
1727
1727
  }, [s.errors.conditionsThatEstablishesTheDecision]), $e = s.submitCount > 0 && !!J, De = (N) => N != null && N.isMulti || N != null && N.multiple || (N == null ? void 0 : N.valueUse) === "Among" ? [] : "", ge = (N) => {
1728
1728
  const K = Object.values(u).flat().find((he) => he.conditionName === N), Re = De(K);
1729
1729
  s.setFieldValue(
@@ -1736,10 +1736,10 @@ const Or = T.div`
1736
1736
  );
1737
1737
  }, fe = () => {
1738
1738
  L.forEach((N) => {
1739
- const V = `conditionsThatEstablishesTheDecision.${N.conditionName}`;
1740
- s.setFieldValue(V, De(N)), s.setFieldTouched(V, !1, !1);
1739
+ const H = `conditionsThatEstablishesTheDecision.${N.conditionName}`;
1740
+ s.setFieldValue(H, De(N)), s.setFieldTouched(H, !1, !1);
1741
1741
  });
1742
- }, [Ae, ae] = H.useState(!1);
1742
+ }, [Ae, ae] = M.useState(!1);
1743
1743
  return /* @__PURE__ */ i(
1744
1744
  zr,
1745
1745
  {
@@ -1748,7 +1748,7 @@ const Or = T.div`
1748
1748
  currentConditions: L,
1749
1749
  decision: n,
1750
1750
  formik: s,
1751
- normalizedDecision: z,
1751
+ normalizedDecision: V,
1752
1752
  onCancel: o,
1753
1753
  onRedefineCurrentTab: fe,
1754
1754
  onTabChange: E,
@@ -1762,7 +1762,7 @@ const Or = T.div`
1762
1762
  textValues: r,
1763
1763
  visibleConditions: $,
1764
1764
  visibleConditionsByGroup: f,
1765
- handleToggleNoneChange: c,
1765
+ handleToggleNoneChange: p,
1766
1766
  portalId: "redefine-confirm-portal",
1767
1767
  showRedefineConfirm: Ae,
1768
1768
  onOpenRedefineConfirm: () => ae(!0),
@@ -1770,13 +1770,13 @@ const Or = T.div`
1770
1770
  onConfirmRedefine: () => {
1771
1771
  fe();
1772
1772
  const N = (u[R] ?? []).map(
1773
- (V) => V.conditionName
1773
+ (H) => H.conditionName
1774
1774
  );
1775
1775
  l == null || l(N), ae(!1);
1776
1776
  }
1777
1777
  }
1778
1778
  );
1779
- }, di = (e) => {
1779
+ }, ci = (e) => {
1780
1780
  const {
1781
1781
  controls: n = !0,
1782
1782
  customTitleContentAddCard: t,
@@ -1786,8 +1786,8 @@ const Or = T.div`
1786
1786
  decisionTemplate: l,
1787
1787
  isModalOpen: d,
1788
1788
  selectedDecision: s,
1789
- loading: c,
1790
- handleOpenModal: p,
1789
+ loading: p,
1790
+ handleOpenModal: c,
1791
1791
  handleCloseModal: u,
1792
1792
  handleSubmitForm: g,
1793
1793
  handleDelete: f,
@@ -1795,17 +1795,17 @@ const Or = T.div`
1795
1795
  onRemoveCondition: x,
1796
1796
  onRestoreConditions: m,
1797
1797
  baseDecisionTemplate: y
1798
- } = e, [D, C] = M(null), k = re("(max-width: 681px)"), { renderedCards: E, shouldRenderAddCard: R } = Er({
1798
+ } = e, [D, C] = z(null), k = re("(max-width: 681px)"), { renderedCards: E, shouldRenderAddCard: R } = Er({
1799
1799
  controls: n,
1800
1800
  customTitleContentAddCard: t,
1801
1801
  decisions: o,
1802
- loading: c,
1803
- handleOpenModal: p,
1802
+ loading: p,
1803
+ handleOpenModal: c,
1804
1804
  handleDelete: f,
1805
1805
  textValues: a,
1806
1806
  isOpenFor: ($) => D === $,
1807
- toggleAt: ($) => C((z) => z === $ ? null : $)
1808
- }), L = (o == null ? void 0 : o.length) === 0 && !c;
1807
+ toggleAt: ($) => C((V) => V === $ ? null : $)
1808
+ }), L = (o == null ? void 0 : o.length) === 0 && !p;
1809
1809
  return /* @__PURE__ */ v(G, { children: [
1810
1810
  /* @__PURE__ */ i(xr, { children: /* @__PURE__ */ i(wr, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: L ? /* @__PURE__ */ i(Le, { legend: "Decisiones", children: /* @__PURE__ */ v(
1811
1811
  w,
@@ -1860,8 +1860,8 @@ const Or = T.div`
1860
1860
  controls: n,
1861
1861
  customTitleContentAddCard: t,
1862
1862
  customMessageEmptyDecisions: r,
1863
- loading: c,
1864
- handleOpenModal: p,
1863
+ loading: p,
1864
+ handleOpenModal: c,
1865
1865
  handleDelete: f,
1866
1866
  textValues: a,
1867
1867
  shouldRenderEmptyMessage: L,
@@ -1933,13 +1933,13 @@ function Br(e) {
1933
1933
  );
1934
1934
  }
1935
1935
  const Ur = (e, n) => {
1936
- const [t, r] = M([]), [o, a] = M([]), [l, d] = M(!1), s = Ce(null);
1936
+ const [t, r] = z([]), [o, a] = z([]), [l, d] = z(!1), s = Ce(null);
1937
1937
  return ve(() => {
1938
1938
  if (!e.current || !s.current) return;
1939
- const c = e.current, p = s.current, u = () => {
1939
+ const p = e.current, c = s.current, u = () => {
1940
1940
  var C;
1941
- const f = c.clientWidth, b = Array.from(
1942
- p.querySelectorAll('[data-filter-tag="true"]')
1941
+ const f = p.clientWidth, b = Array.from(
1942
+ c.querySelectorAll('[data-filter-tag="true"]')
1943
1943
  ), x = 48;
1944
1944
  let m = 0;
1945
1945
  const y = [], D = [];
@@ -1951,7 +1951,7 @@ const Ur = (e, n) => {
1951
1951
  }, g = new ResizeObserver(() => {
1952
1952
  requestAnimationFrame(u);
1953
1953
  });
1954
- return g.observe(c), () => g.disconnect();
1954
+ return g.observe(p), () => g.disconnect();
1955
1955
  }, [n, e]), { visible: t, hidden: o, showOverflowIndicator: l, measurementRef: s };
1956
1956
  };
1957
1957
  T.div`
@@ -2029,7 +2029,7 @@ const _r = T.div`
2029
2029
  }
2030
2030
  `, Xr = (e) => {
2031
2031
  var g, f, b, x, m, y;
2032
- const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, l] = M(!1), d = () => l(!0), s = () => l(!1), c = vn(mn), p = ((b = (f = (g = c == null ? void 0 : c.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : b.hover) ?? dn.option.appearance.hover, u = ((y = (m = (x = c == null ? void 0 : c.input) == null ? void 0 : x.option) == null ? void 0 : m.appearance) == null ? void 0 : y.regular) ?? dn.option.appearance.regular;
2032
+ const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, l] = z(!1), d = () => l(!0), s = () => l(!1), p = vn(mn), c = ((b = (f = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : b.hover) ?? dn.option.appearance.hover, u = ((y = (m = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : m.appearance) == null ? void 0 : y.regular) ?? dn.option.appearance.regular;
2033
2033
  return /* @__PURE__ */ i(
2034
2034
  Yr,
2035
2035
  {
@@ -2052,7 +2052,7 @@ const _r = T.div`
2052
2052
  {
2053
2053
  icon: r,
2054
2054
  size: "medium",
2055
- appearance: a ? p : u
2055
+ appearance: a ? c : u
2056
2056
  }
2057
2057
  ),
2058
2058
  /* @__PURE__ */ i(
@@ -2060,7 +2060,7 @@ const _r = T.div`
2060
2060
  {
2061
2061
  textAlign: "start",
2062
2062
  size: "medium",
2063
- appearance: a ? p : u,
2063
+ appearance: a ? c : u,
2064
2064
  children: t
2065
2065
  }
2066
2066
  ),
@@ -2072,7 +2072,7 @@ const _r = T.div`
2072
2072
  onClick: (D) => {
2073
2073
  D.stopPropagation(), o == null || o();
2074
2074
  },
2075
- appearance: a ? p : u,
2075
+ appearance: a ? c : u,
2076
2076
  cursorHover: !0
2077
2077
  }
2078
2078
  )
@@ -2081,7 +2081,7 @@ const _r = T.div`
2081
2081
  )
2082
2082
  }
2083
2083
  );
2084
- }, ci = (e) => {
2084
+ }, ui = (e) => {
2085
2085
  const {
2086
2086
  appliedFilters: n = [],
2087
2087
  onClear: t,
@@ -2089,19 +2089,19 @@ const _r = T.div`
2089
2089
  noFiltersLabel: o,
2090
2090
  titleClearFilter: a,
2091
2091
  titleFilter: l
2092
- } = e, d = Ce(null), s = Ce(null), c = Ce(null), {
2093
- visible: p,
2092
+ } = e, d = Ce(null), s = Ce(null), p = Ce(null), {
2093
+ visible: c,
2094
2094
  hidden: u,
2095
2095
  showOverflowIndicator: g,
2096
2096
  measurementRef: f
2097
- } = Ur(d, n), [b, x] = M(!1), m = (E) => {
2097
+ } = Ur(d, n), [b, x] = z(!1), m = (E) => {
2098
2098
  E.stopPropagation(), x((R) => !R);
2099
2099
  };
2100
2100
  ve(() => {
2101
2101
  const E = (R) => {
2102
- var z, oe;
2102
+ var V, oe;
2103
2103
  const L = R.target;
2104
- !((z = s.current) != null && z.contains(L)) && !((oe = c.current) != null && oe.contains(L)) && x(!1);
2104
+ !((V = s.current) != null && V.contains(L)) && !((oe = p.current) != null && oe.contains(L)) && x(!1);
2105
2105
  };
2106
2106
  return b && window.addEventListener("mousedown", E), () => window.removeEventListener("mousedown", E);
2107
2107
  }, [b]);
@@ -2140,7 +2140,7 @@ const _r = T.div`
2140
2140
  padding: "0px 8px",
2141
2141
  border: !0,
2142
2142
  children: y ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ v(G, { children: [
2143
- p.map((E) => /* @__PURE__ */ i(
2143
+ c.map((E) => /* @__PURE__ */ i(
2144
2144
  me,
2145
2145
  {
2146
2146
  "data-filter-tag": "true",
@@ -2156,7 +2156,7 @@ const _r = T.div`
2156
2156
  g && /* @__PURE__ */ v(
2157
2157
  "div",
2158
2158
  {
2159
- ref: c,
2159
+ ref: p,
2160
2160
  style: { position: "relative", display: "inline-block" },
2161
2161
  children: [
2162
2162
  /* @__PURE__ */ i(Gr, { onClick: m, children: /* @__PURE__ */ i(
@@ -2228,7 +2228,7 @@ const _r = T.div`
2228
2228
  padding: 24px;
2229
2229
  gap: 24px;
2230
2230
  box-sizing: border-box;
2231
- `, ui = (e) => {
2231
+ `, pi = (e) => {
2232
2232
  const {
2233
2233
  actionButtonLabel: n,
2234
2234
  cancelButtonLabel: t,
@@ -2238,13 +2238,13 @@ const _r = T.div`
2238
2238
  onCloseModal: l,
2239
2239
  portalId: d,
2240
2240
  title: s
2241
- } = e, c = re("(max-width: 768px)"), p = document.getElementById(d);
2242
- if (!p)
2241
+ } = e, p = re("(max-width: 768px)"), c = document.getElementById(d);
2242
+ if (!c)
2243
2243
  throw new Error(
2244
2244
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
2245
2245
  );
2246
2246
  return bn(
2247
- /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ v(Wr, { $smallScreen: c, children: [
2247
+ /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ v(Wr, { $smallScreen: p, children: [
2248
2248
  /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
2249
2249
  /* @__PURE__ */ v(w, { alignContent: "center", justifyContent: "space-between", children: [
2250
2250
  /* @__PURE__ */ i(I, { appearance: "dark", size: "small", type: "headline", children: s }),
@@ -2289,9 +2289,9 @@ const _r = T.div`
2289
2289
  )
2290
2290
  ] })
2291
2291
  ] }) }),
2292
- p
2292
+ c
2293
2293
  );
2294
- }, pi = (e) => {
2294
+ }, gi = (e) => {
2295
2295
  const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = re("(max-width: 768px)"), l = !n || n.length === 0;
2296
2296
  return /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
2297
2297
  a && /* @__PURE__ */ v(G, { children: [
@@ -2350,15 +2350,15 @@ const _r = T.div`
2350
2350
  }, Qr = (e) => {
2351
2351
  const n = [];
2352
2352
  return e.from !== void 0 && e.from !== null && n.push(`>${e.from}`), e.to !== void 0 && e.to !== null && n.push(`<${e.to}`), n.join(";");
2353
- }, gi = (e) => {
2353
+ }, fi = (e) => {
2354
2354
  var l;
2355
2355
  const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? Qr(d) : d, a = ((l = n.conditionsThatEstablishesTheDecision) == null ? void 0 : l.map((d, s) => {
2356
2356
  var u;
2357
- const c = d == null ? void 0 : d.value;
2358
- return c == null || typeof c == "string" && c.trim() === "" || Array.isArray(c) && c.length === 0 ? null : {
2357
+ const p = d == null ? void 0 : d.value;
2358
+ return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
2359
2359
  ...(u = r.conditionsThatEstablishesTheDecision) == null ? void 0 : u[s],
2360
2360
  ...d,
2361
- value: o(c)
2361
+ value: o(p)
2362
2362
  };
2363
2363
  }).filter(Boolean)) ?? [];
2364
2364
  return {
@@ -2368,7 +2368,7 @@ const _r = T.div`
2368
2368
  value: o(n.value),
2369
2369
  conditionsThatEstablishesTheDecision: a
2370
2370
  };
2371
- }, fi = (e) => {
2371
+ }, hi = (e) => {
2372
2372
  if (typeof e != "string") return e;
2373
2373
  const n = e.split(";").map((r) => r.trim()), t = {};
2374
2374
  for (const r of n)
@@ -2380,7 +2380,7 @@ const _r = T.div`
2380
2380
  isNaN(o) || (t.to = o);
2381
2381
  }
2382
2382
  return t.from !== void 0 || t.to !== void 0 ? t : e;
2383
- }, hi = (e) => {
2383
+ }, mi = (e) => {
2384
2384
  const { dataDecision: n, originalDecision: t } = e, r = {
2385
2385
  conditionName: n.ruleName || "",
2386
2386
  labelName: n.labelName || "",
@@ -2396,7 +2396,7 @@ const _r = T.div`
2396
2396
  (o) => o.hidden ? { ...r } : o
2397
2397
  )
2398
2398
  };
2399
- }, mi = (e) => {
2399
+ }, bi = (e) => {
2400
2400
  const { decisions: n } = e;
2401
2401
  return n == null ? void 0 : n.map((t) => {
2402
2402
  var o;
@@ -2533,9 +2533,9 @@ function to({
2533
2533
  // },
2534
2534
  // );
2535
2535
  // }),
2536
- conditionsThatEstablishesTheDecision: Ue((s, { parent: c }) => {
2536
+ conditionsThatEstablishesTheDecision: Ue((s, { parent: p }) => {
2537
2537
  var g;
2538
- if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return le().shape({});
2538
+ if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return le().shape({});
2539
2539
  const u = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
2540
2540
  (f, b) => {
2541
2541
  if (o.values.conditionsThatEstablishesTheDecision[b.conditionName] !== void 0) {
@@ -2558,14 +2558,14 @@ function to({
2558
2558
  "La fecha de inicio es requerida"
2559
2559
  ), a.validUntil = _e().when(
2560
2560
  "checkClosed",
2561
- (s, c, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? c.required("La fecha de finalización es requerida").test(
2561
+ (s, p, { parent: c }) => (c == null ? void 0 : c.checkClosed) ? p.required("La fecha de finalización es requerida").test(
2562
2562
  "is-after-startDate",
2563
2563
  "La fecha de finalización debe ser mayor o igual a la fecha de inicio",
2564
2564
  function(g) {
2565
2565
  const f = this.parent.effectiveFrom;
2566
2566
  return !f || !g ? !0 : new Date(g) >= new Date(f);
2567
2567
  }
2568
- ) : c.notRequired()
2568
+ ) : p.notRequired()
2569
2569
  ));
2570
2570
  const l = le(a);
2571
2571
  return o = Yn({
@@ -2573,8 +2573,8 @@ function to({
2573
2573
  validationSchema: l,
2574
2574
  validateOnBlur: !0,
2575
2575
  onSubmit: (s) => {
2576
- var p;
2577
- const c = {
2576
+ var c;
2577
+ const p = {
2578
2578
  ...e,
2579
2579
  ruleName: s.ruleName,
2580
2580
  decisionDataType: s.decisionDataType,
@@ -2582,7 +2582,7 @@ function to({
2582
2582
  value: s.value,
2583
2583
  effectiveFrom: s.effectiveFrom,
2584
2584
  validUntil: s.validUntil,
2585
- conditionsThatEstablishesTheDecision: (p = e.conditionsThatEstablishesTheDecision) == null ? void 0 : p.filter((u) => {
2585
+ conditionsThatEstablishesTheDecision: (c = e.conditionsThatEstablishesTheDecision) == null ? void 0 : c.filter((u) => {
2586
2586
  const g = s.conditionsThatEstablishesTheDecision[u.conditionName];
2587
2587
  return g != null && g !== "";
2588
2588
  }).map((u) => ({
@@ -2590,20 +2590,20 @@ function to({
2590
2590
  value: s.conditionsThatEstablishesTheDecision[u.conditionName]
2591
2591
  }))
2592
2592
  };
2593
- n(c);
2593
+ n(p);
2594
2594
  }
2595
2595
  }), { formik: o, handleToggleNoneChange: (s) => {
2596
- var c;
2597
- o.setFieldValue("toggleNone", s), (c = e.conditionsThatEstablishesTheDecision) == null || c.forEach((p) => {
2596
+ var p;
2597
+ o.setFieldValue("toggleNone", s), (p = e.conditionsThatEstablishesTheDecision) == null || p.forEach((c) => {
2598
2598
  if (s)
2599
2599
  o.setFieldValue(
2600
- `conditionsThatEstablishesTheDecision.${p.conditionName}`,
2600
+ `conditionsThatEstablishesTheDecision.${c.conditionName}`,
2601
2601
  void 0
2602
2602
  );
2603
2603
  else {
2604
- const u = p.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
2604
+ const u = c.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
2605
2605
  o.setFieldValue(
2606
- `conditionsThatEstablishesTheDecision.${p.conditionName}`,
2606
+ `conditionsThatEstablishesTheDecision.${c.conditionName}`,
2607
2607
  u
2608
2608
  );
2609
2609
  }
@@ -2645,11 +2645,11 @@ const ro = T.div`
2645
2645
  labelToggle: a,
2646
2646
  name: l,
2647
2647
  valueToggle: d = ""
2648
- } = e, [s, c] = M(n), p = (u) => {
2649
- c(u.target.checked), r(u);
2648
+ } = e, [s, p] = z(n), c = (u) => {
2649
+ p(u.target.checked), r(u);
2650
2650
  };
2651
2651
  return ve(() => {
2652
- c(n);
2652
+ p(n);
2653
2653
  }, [n]), /* @__PURE__ */ v(G, { children: [
2654
2654
  /* @__PURE__ */ i(w, { children: /* @__PURE__ */ i(
2655
2655
  _n,
@@ -2657,7 +2657,7 @@ const ro = T.div`
2657
2657
  checked: s,
2658
2658
  id: o,
2659
2659
  name: l,
2660
- onChange: p,
2660
+ onChange: c,
2661
2661
  size: "small",
2662
2662
  value: d,
2663
2663
  children: /* @__PURE__ */ i(I, { size: "medium", type: "label", weight: "bold", children: a })
@@ -2675,12 +2675,12 @@ const ro = T.div`
2675
2675
  checkedClosed: l = !1,
2676
2676
  required: d = !1,
2677
2677
  valueStart: s = "",
2678
- valueEnd: c = "",
2679
- messageStart: p = "",
2678
+ valueEnd: p = "",
2679
+ messageStart: c = "",
2680
2680
  messageEnd: u = "",
2681
2681
  statusStart: g = "pending",
2682
2682
  statusEnd: f = "pending"
2683
- } = e, [b, x] = M(l), [m, y] = M(s), [D, C] = M(c), k = ({ target: $ }) => {
2683
+ } = e, [b, x] = z(l), [m, y] = z(s), [D, C] = z(p), k = ({ target: $ }) => {
2684
2684
  x($.checked), r && r($.checked);
2685
2685
  }, E = ($) => {
2686
2686
  y($.target.value), n($);
@@ -2736,7 +2736,7 @@ const ro = T.div`
2736
2736
  required: d,
2737
2737
  size: "compact",
2738
2738
  status: g,
2739
- message: p
2739
+ message: c
2740
2740
  }
2741
2741
  ),
2742
2742
  b && /* @__PURE__ */ i(
@@ -2766,8 +2766,8 @@ const ro = T.div`
2766
2766
  handleToggleNoneChange: l,
2767
2767
  handleConditionToggleChange: d,
2768
2768
  showConditionsError: s,
2769
- termStartStatus: c,
2770
- termEndStatus: p
2769
+ termStartStatus: p,
2770
+ termEndStatus: c
2771
2771
  } = e;
2772
2772
  return /* @__PURE__ */ i("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
2773
2773
  Tn({
@@ -2834,8 +2834,8 @@ const ro = T.div`
2834
2834
  valueEnd: n.values.validUntil,
2835
2835
  messageStart: n.errors.effectiveFrom,
2836
2836
  messageEnd: n.errors.validUntil,
2837
- statusStart: c,
2838
- statusEnd: p,
2837
+ statusStart: p,
2838
+ statusEnd: c,
2839
2839
  onHandleStartChange: (u) => n.setFieldValue("effectiveFrom", u.target.value),
2840
2840
  onHandleEndChange: (u) => n.setFieldValue("validUntil", u.target.value),
2841
2841
  onCheckClosedChange: (u) => {
@@ -2866,7 +2866,7 @@ const ro = T.div`
2866
2866
  listOfPossibleValues: n.listOfPossibleValues
2867
2867
  }, s = ((f = n.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
2868
2868
  (b) => !b.hidden
2869
- )) || [], c = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, p = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, u = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
2869
+ )) || [], p = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, c = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, u = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
2870
2870
  return /* @__PURE__ */ i(
2871
2871
  lo,
2872
2872
  {
@@ -2895,12 +2895,12 @@ const ro = T.div`
2895
2895
  );
2896
2896
  }
2897
2897
  },
2898
- showConditionsError: c,
2899
- termStartStatus: p,
2898
+ showConditionsError: p,
2899
+ termStartStatus: c,
2900
2900
  termEndStatus: u
2901
2901
  }
2902
2902
  );
2903
- }, bi = (e) => {
2903
+ }, vi = (e) => {
2904
2904
  var o;
2905
2905
  const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
2906
2906
  (a) => a.switchPlaces
@@ -2916,7 +2916,7 @@ const ro = T.div`
2916
2916
  (a) => a.conditionName === r.conditionName ? { ...a, hidden: !0 } : a
2917
2917
  )
2918
2918
  } : t;
2919
- }, vi = (e) => {
2919
+ }, yi = (e) => {
2920
2920
  const { decisions: n } = e;
2921
2921
  return n == null ? void 0 : n.map((t) => {
2922
2922
  var o;
@@ -3025,11 +3025,11 @@ const ro = T.div`
3025
3025
  `, mo = (e) => {
3026
3026
  const { isOpen: n, links: t, onClick: r, title: o, activeId: a, headerPath: l, headerActive: d } = e, s = (b) => {
3027
3027
  (b.key === "Enter" || b.key === " ") && (b.preventDefault(), r());
3028
- }, c = (b) => {
3029
- b.preventDefault(), b.stopPropagation(), r();
3030
3028
  }, p = (b) => {
3029
+ b.preventDefault(), b.stopPropagation(), r();
3030
+ }, c = (b) => {
3031
3031
  (b.key === "Enter" || b.key === " ") && (b.preventDefault(), b.stopPropagation(), r());
3032
- }, u = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f = H.useId();
3032
+ }, u = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f = M.useId();
3033
3033
  return /* @__PURE__ */ i(co, { $active: n, children: /* @__PURE__ */ v(Q, { border: !0, borderRadius: "8px", width: "100%", children: [
3034
3034
  /* @__PURE__ */ i(
3035
3035
  fo,
@@ -3037,8 +3037,8 @@ const ro = T.div`
3037
3037
  $active: n && t.length > 0,
3038
3038
  "aria-controls": f,
3039
3039
  "aria-expanded": n,
3040
- onClick: c,
3041
- onKeyDown: p,
3040
+ onClick: p,
3041
+ onKeyDown: c,
3042
3042
  children: l ? /* @__PURE__ */ i(po, { to: l, children: /* @__PURE__ */ v(
3043
3043
  Q,
3044
3044
  {
@@ -3101,6 +3101,7 @@ const ro = T.div`
3101
3101
  size: "small",
3102
3102
  type: "title",
3103
3103
  weight: g,
3104
+ onClick: r,
3104
3105
  children: o
3105
3106
  }
3106
3107
  )
@@ -3145,30 +3146,43 @@ const ro = T.div`
3145
3146
  }};
3146
3147
  }
3147
3148
  height: 90vh;
3148
- `, yi = (e) => {
3149
- const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, [o, a] = H.useState(t), l = Lt();
3150
- H.useEffect(() => {
3151
- n && a(null);
3152
- }, [n, l.pathname]);
3153
- const d = H.useCallback(
3149
+ `, vo = (e, n) => {
3150
+ var t;
3151
+ for (const r of n)
3152
+ if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
3153
+ return null;
3154
+ }, xi = (e) => {
3155
+ const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Lt(), [a, l] = M.useState(t), d = M.useRef(o.pathname), s = M.useCallback(
3154
3156
  (c) => {
3155
- var p;
3156
- return (p = c.find((u) => u.path === l.pathname)) == null ? void 0 : p.id;
3157
+ var u;
3158
+ return (u = c.find((g) => g.path === o.pathname)) == null ? void 0 : u.id;
3157
3159
  },
3158
- [l.pathname]
3159
- ), s = H.useCallback(
3160
- (c) => c ? l.pathname === c || l.pathname.startsWith(c + "/") : !1,
3161
- [l.pathname]
3160
+ [o.pathname]
3161
+ ), p = M.useCallback(
3162
+ (c) => !!c && (o.pathname === c || o.pathname.startsWith(c + "/")),
3163
+ [o.pathname]
3162
3164
  );
3163
- return /* @__PURE__ */ i(bo, { $background: !0, children: /* @__PURE__ */ i(w, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((c) => /* @__PURE__ */ i(
3165
+ return M.useEffect(() => {
3166
+ if (!(d.current !== o.pathname)) return;
3167
+ if (d.current = o.pathname, n) {
3168
+ l(null);
3169
+ return;
3170
+ }
3171
+ const u = vo(o.pathname, r);
3172
+ if (u) {
3173
+ l(u);
3174
+ return;
3175
+ }
3176
+ t && l(t);
3177
+ }, [n, t, r, o.pathname]), /* @__PURE__ */ i(bo, { $background: !0, children: /* @__PURE__ */ i(w, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((c) => /* @__PURE__ */ i(
3164
3178
  mo,
3165
3179
  {
3166
- activeId: d(c.links),
3180
+ activeId: s(c.links),
3167
3181
  headerPath: c.path,
3168
- headerActive: s(c.path),
3169
- isOpen: o === c.id,
3182
+ headerActive: p(c.path),
3183
+ isOpen: a === c.id,
3170
3184
  links: c.links,
3171
- onClick: () => a((p) => p === c.id ? null : c.id),
3185
+ onClick: () => l((u) => u === c.id ? null : c.id),
3172
3186
  title: c.title
3173
3187
  },
3174
3188
  c.id
@@ -3192,7 +3206,7 @@ function tt() {
3192
3206
  }];
3193
3207
  }
3194
3208
  var [rt, ot] = tt();
3195
- function vo(e, n) {
3209
+ function yo(e, n) {
3196
3210
  return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
3197
3211
  }
3198
3212
  function Me(e, n, t = !0, r = ["__key"]) {
@@ -3202,7 +3216,7 @@ function Me(e, n, t = !0, r = ["__key"]) {
3202
3216
  if (e instanceof Date && n instanceof Date)
3203
3217
  return e.getTime() === n.getTime();
3204
3218
  if (e instanceof RegExp && n instanceof RegExp)
3205
- return vo(e, n);
3219
+ return yo(e, n);
3206
3220
  if (e === null || n === null) return !1;
3207
3221
  const o = e, a = n;
3208
3222
  if (Object.keys(o).length !== Object.keys(a).length) return !1;
@@ -3229,7 +3243,7 @@ function it() {
3229
3243
  const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
3230
3244
  return n || t;
3231
3245
  }
3232
- var yo = {
3246
+ var xo = {
3233
3247
  affectedNodes: [],
3234
3248
  coordinates: {
3235
3249
  x: 0,
@@ -3263,8 +3277,8 @@ var yo = {
3263
3277
  scrollDebounceTimeout: void 0,
3264
3278
  frameIdX: void 0,
3265
3279
  frameIdY: void 0
3266
- }, h = yo, ce = !1, In, rn;
3267
- function xo() {
3280
+ }, h = xo, ce = !1, In, rn;
3281
+ function wo() {
3268
3282
  h.scrollDebounceTimeout && clearTimeout(h.scrollDebounceTimeout), h.longPressTimeout && clearTimeout(h.longPressTimeout), h.frameIdX !== void 0 && cancelAnimationFrame(h.frameIdX), h.frameIdY !== void 0 && cancelAnimationFrame(h.frameIdY), h = { ...{
3269
3283
  affectedNodes: [],
3270
3284
  coordinates: {
@@ -3308,30 +3322,30 @@ function xo() {
3308
3322
  function lt(e) {
3309
3323
  return Object.assign(h, e), e.initialParent.data.emit("dragStarted", h), ce = !1, h.emit("dragStarted", h), h;
3310
3324
  }
3311
- function wo() {
3325
+ function Do() {
3312
3326
  h.activeState && ye(h.activeState.parent, void 0, h), h.selectedState && be(h.selectedState.nodes, h.selectedState.parent, h), h.selectedState = h.activeState = void 0;
3313
3327
  }
3314
- function Do() {
3328
+ function Co() {
3315
3329
  if (h.pointerDown && (h.pointerDown.node.el.draggable = !0), h.pointerDown = void 0, !W(h)) return;
3316
3330
  const e = h.currentParent.data.config;
3317
3331
  W(h) && e.handleEnd(h);
3318
3332
  }
3319
- function Co(e) {
3333
+ function To(e) {
3320
3334
  e.key === "Escape" && (h.selectedState && be(h.selectedState.nodes, h.selectedState.parent, h), h.activeState && ye(h.activeState.parent, void 0, h), h.selectedState = h.activeState = void 0);
3321
3335
  }
3322
- function To(e) {
3336
+ function So(e) {
3323
3337
  if (!_(h)) return;
3324
3338
  ce = !0;
3325
3339
  const n = h.initialParent.data.config.handleEnd;
3326
3340
  n(h);
3327
3341
  }
3328
- function So(e) {
3342
+ function Eo(e) {
3329
3343
  if (!_(h)) return;
3330
3344
  U(e);
3331
3345
  const { x: n, y: t } = ke(e);
3332
3346
  _(h) && Ze({ x: n, y: t }, e, h);
3333
3347
  }
3334
- function Eo(e) {
3348
+ function No(e) {
3335
3349
  if (!h.pointerDown || !h.pointerDown.validated) return;
3336
3350
  const n = h.pointerDown.parent.data.config;
3337
3351
  if (!(e.pointerType === "mouse" && !it()))
@@ -3344,7 +3358,7 @@ function Eo(e) {
3344
3358
  }
3345
3359
  const t = n.draggedNodes(h.pointerDown);
3346
3360
  n.dragstartClasses(h.pointerDown.node, t, n, !0);
3347
- const r = h.pointerDown.node.el.getBoundingClientRect(), o = na(
3361
+ const r = h.pointerDown.node.el.getBoundingClientRect(), o = ta(
3348
3362
  h.pointerDown.node,
3349
3363
  h.pointerDown.parent,
3350
3364
  e,
@@ -3355,21 +3369,21 @@ function Eo(e) {
3355
3369
  Rn(e, o, !0);
3356
3370
  }
3357
3371
  }
3358
- function No({
3372
+ function ko({
3359
3373
  parent: e,
3360
3374
  getValues: n,
3361
3375
  setValues: t,
3362
3376
  config: r = {}
3363
3377
  }) {
3364
- var s, c, p;
3378
+ var s, p, c;
3365
3379
  if (!wn) return;
3366
3380
  In || (In = Ge(document, {
3367
- dragover: So,
3368
- pointerdown: wo,
3369
- pointerup: Do,
3370
- keydown: Co,
3371
- drop: To,
3372
- pointermove: Eo,
3381
+ dragover: Eo,
3382
+ pointerdown: Do,
3383
+ pointerup: Co,
3384
+ keydown: To,
3385
+ drop: So,
3386
+ pointermove: No,
3373
3387
  pointercancel: Y(r.handlePointercancel),
3374
3388
  touchmove: (u) => {
3375
3389
  _(h) && u.cancelable && U(u);
@@ -3384,38 +3398,38 @@ function No({
3384
3398
  config: {
3385
3399
  dragDropEffect: r.dragDropEffect ?? "move",
3386
3400
  dragEffectAllowed: r.dragEffectAllowed ?? "move",
3387
- draggedNodes: Ho,
3388
- dragstartClasses: _o,
3389
- handleNodeKeydown: Go,
3390
- handleDragstart: Bo,
3391
- handleNodeDragover: ra,
3392
- handleParentDragover: oa,
3393
- handleNodeDrop: Xo,
3394
- handleNodeFocus: Wo,
3395
- handleNodeBlur: Qo,
3396
- handlePointercancel: Zo,
3397
- handleEnd: Jo,
3398
- handleDragend: Ko,
3399
- handleParentFocus: $o,
3400
- handleNodePointerup: ea,
3401
- handleNodePointerover: Yo,
3402
- handleParentPointerover: aa,
3403
- handleParentScroll: jo,
3404
- handleNodePointerdown: Uo,
3405
- handleNodeDragenter: la,
3406
- handleNodeDragleave: sa,
3407
- handleParentDrop: Io,
3401
+ draggedNodes: jo,
3402
+ dragstartClasses: qo,
3403
+ handleNodeKeydown: Yo,
3404
+ handleDragstart: Uo,
3405
+ handleNodeDragover: oa,
3406
+ handleParentDragover: aa,
3407
+ handleNodeDrop: Wo,
3408
+ handleNodeFocus: Qo,
3409
+ handleNodeBlur: Ko,
3410
+ handlePointercancel: Jo,
3411
+ handleEnd: ea,
3412
+ handleDragend: Zo,
3413
+ handleParentFocus: Ao,
3414
+ handleNodePointerup: na,
3415
+ handleNodePointerover: Xo,
3416
+ handleParentPointerover: ia,
3417
+ handleParentScroll: Bo,
3418
+ handleNodePointerdown: _o,
3419
+ handleNodeDragenter: sa,
3420
+ handleNodeDragleave: da,
3421
+ handleParentDrop: Ro,
3408
3422
  multiDrag: r.multiDrag ?? !1,
3409
3423
  nativeDrag: r.nativeDrag ?? !0,
3410
- performSort: ko,
3411
- performTransfer: Ao,
3424
+ performSort: $o,
3425
+ performTransfer: Io,
3412
3426
  root: r.root ?? document,
3413
- setupNode: Fo,
3427
+ setupNode: Lo,
3414
3428
  setupNodeRemap: ct,
3415
- reapplyDragClasses: Lo,
3416
- tearDownNode: Oo,
3417
- tearDownNodeRemap: Po,
3418
- remapFinished: zo,
3429
+ reapplyDragClasses: Po,
3430
+ tearDownNode: Mo,
3431
+ tearDownNodeRemap: Oo,
3432
+ remapFinished: Vo,
3419
3433
  threshold: {
3420
3434
  horizontal: 0,
3421
3435
  vertical: 0
@@ -3428,16 +3442,16 @@ function No({
3428
3442
  on: a,
3429
3443
  emit: o
3430
3444
  };
3431
- new MutationObserver(Mo).observe(e, { childList: !0 }), j.set(e, l), (s = r.plugins) == null || s.forEach((u) => {
3445
+ new MutationObserver(zo).observe(e, { childList: !0 }), j.set(e, l), (s = r.plugins) == null || s.forEach((u) => {
3432
3446
  var g, f;
3433
3447
  (f = (g = u(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
3434
- }), (c = r.plugins) == null || c.forEach((u) => {
3448
+ }), (p = r.plugins) == null || p.forEach((u) => {
3435
3449
  var g, f;
3436
3450
  (f = (g = u(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
3437
- }), (p = r.plugins) == null || p.forEach((u) => {
3451
+ }), (c = r.plugins) == null || c.forEach((u) => {
3438
3452
  var g, f;
3439
3453
  (f = (g = u(e)) == null ? void 0 : g.setup) == null || f.call(g);
3440
- }), Ro(e, l), Qe(e, !0);
3454
+ }), Fo(e, l), Qe(e, !0);
3441
3455
  }
3442
3456
  function st(e, n, t, r, o, a) {
3443
3457
  const { x: l, y: d } = ke(t), s = e.el.getBoundingClientRect();
@@ -3474,14 +3488,14 @@ function st(e, n, t, r, o, a) {
3474
3488
  transferred: !1
3475
3489
  };
3476
3490
  }
3477
- function ko({
3491
+ function $o({
3478
3492
  parent: e,
3479
3493
  draggedNodes: n,
3480
3494
  targetNodes: t
3481
3495
  }) {
3482
3496
  Qe(e.el);
3483
3497
  const r = n.map((s) => s.data.value), o = Ee(e.el, e.data), a = n[0].data.index, l = [...e.data.enabledNodes], d = [
3484
- ...o.filter((s) => !r.some((c) => Me(s, c)))
3498
+ ...o.filter((s) => !r.some((p) => Me(s, p)))
3485
3499
  ];
3486
3500
  d.splice(t[0].data.index, 0, ...r), "draggedNode" in h && (h.currentTargetValue = t[0].data.value), cn(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
3487
3501
  parent: {
@@ -3532,11 +3546,11 @@ function He(e, n, t, r, o = !1) {
3532
3546
  parent: e
3533
3547
  }, ye(e, t, r);
3534
3548
  }
3535
- function $o(e, n) {
3549
+ function Ao(e, n) {
3536
3550
  const t = e.targetData.parent.data.enabledNodes[0];
3537
3551
  t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? ye(e.targetData.parent, t, n) : n.selectedState || ye(e.targetData.parent, t, n));
3538
3552
  }
3539
- function Ao({
3553
+ function Io({
3540
3554
  currentParent: e,
3541
3555
  targetParent: n,
3542
3556
  initialParent: t,
@@ -3550,9 +3564,9 @@ function Ao({
3550
3564
  ...Ee(e.el, e.data).filter(
3551
3565
  (g) => !d.some((f) => Me(g, f))
3552
3566
  )
3553
- ], c = Ee(n.el, n.data), p = t.el === n.el && n.data.config.sortable === !1;
3567
+ ], p = Ee(n.el, n.data), c = t.el === n.el && n.data.config.sortable === !1;
3554
3568
  let u;
3555
- a.length ? (p ? u = o : n.data.config.sortable === !1 ? u = n.data.enabledNodes.length : u = a[0].data.index, c.splice(u, 0, ...d)) : (u = p ? o : n.data.enabledNodes.length, c.splice(u, 0, ...d)), cn(e.el, e.data, s), cn(n.el, n.data, c), n.data.config.onTransfer && n.data.config.onTransfer({
3569
+ a.length ? (c ? u = o : n.data.config.sortable === !1 ? u = n.data.enabledNodes.length : u = a[0].data.index, p.splice(u, 0, ...d)) : (u = c ? o : n.data.enabledNodes.length, p.splice(u, 0, ...d)), cn(e.el, e.data, s), cn(n.el, n.data, p), n.data.config.onTransfer && n.data.config.onTransfer({
3556
3570
  sourceParent: e,
3557
3571
  targetParent: n,
3558
3572
  initialParent: t,
@@ -3576,7 +3590,7 @@ function Ee(e, n) {
3576
3590
  function cn(e, n, t) {
3577
3591
  n.setValues(t, e);
3578
3592
  }
3579
- function Io(e, n) {
3593
+ function Ro(e, n) {
3580
3594
  ue(e.e), ce = !0;
3581
3595
  const t = n.initialParent.data.config.handleEnd;
3582
3596
  t(n);
@@ -3591,7 +3605,7 @@ function _(e) {
3591
3605
  function W(e) {
3592
3606
  return "synthDragging" in e && !!e.synthDragging;
3593
3607
  }
3594
- function Ro(e, n) {
3608
+ function Fo(e, n) {
3595
3609
  n.abortControllers.mainParent = Ge(e, {
3596
3610
  dragover: je(n.config.handleParentDragover),
3597
3611
  handleParentPointerover: n.config.handleParentPointerover,
@@ -3635,7 +3649,7 @@ function Ro(e, n) {
3635
3649
  }
3636
3650
  ));
3637
3651
  }
3638
- function Fo(e) {
3652
+ function Lo(e) {
3639
3653
  var t;
3640
3654
  const n = e.parent.data.config;
3641
3655
  e.node.data.abortControllers.mainNode = Ge(e.node.el, {
@@ -3670,26 +3684,26 @@ function ct(e) {
3670
3684
  (o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
3671
3685
  });
3672
3686
  }
3673
- function Lo(e, n) {
3687
+ function Po(e, n) {
3674
3688
  if (!_(h)) return;
3675
3689
  const t = W(h) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
3676
3690
  h.draggedNode.el === e && Te([e], t, !0);
3677
3691
  }
3678
- function Po(e) {
3692
+ function Oo(e) {
3679
3693
  var n;
3680
3694
  (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
3681
3695
  var r, o;
3682
3696
  (o = (r = t(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
3683
3697
  });
3684
3698
  }
3685
- function Oo(e) {
3699
+ function Mo(e) {
3686
3700
  var n, t, r, o, a;
3687
3701
  (n = e.parent.data.config.plugins) == null || n.forEach((l) => {
3688
3702
  var d, s;
3689
3703
  (s = (d = l(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || s.call(d, e);
3690
3704
  }), e.node.el.draggable = !1, (r = (t = e.node.data) == null ? void 0 : t.abortControllers) != null && r.mainNode && ((a = (o = e.node.data) == null ? void 0 : o.abortControllers) == null || a.mainNode.abort());
3691
3705
  }
3692
- function Mo(e) {
3706
+ function zo(e) {
3693
3707
  if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
3694
3708
  return;
3695
3709
  const n = e[0].target;
@@ -3702,19 +3716,19 @@ function Qe(e, n) {
3702
3716
  t.privateClasses = Array.from(e.classList);
3703
3717
  const r = [], o = t.config;
3704
3718
  for (let s = 0; s < e.children.length; s++) {
3705
- const c = e.children[s];
3706
- if (!Je(c) || c.id === "dnd-dragged-node-clone") continue;
3707
- const p = ne.get(c);
3708
- (n || !p) && o.tearDownNode({
3719
+ const p = e.children[s];
3720
+ if (!Je(p) || p.id === "dnd-dragged-node-clone") continue;
3721
+ const c = ne.get(p);
3722
+ (n || !c) && o.tearDownNode({
3709
3723
  parent: {
3710
3724
  el: e,
3711
3725
  data: t
3712
3726
  },
3713
3727
  node: {
3714
- el: c,
3715
- data: p
3728
+ el: p,
3729
+ data: c
3716
3730
  }
3717
- }), !o.disabled && (!o.draggable || o.draggable && o.draggable(c)) && r.push(c);
3731
+ }), !o.disabled && (!o.draggable || o.draggable && o.draggable(p)) && r.push(p);
3718
3732
  }
3719
3733
  if (r.length !== t.getValues(e).length && !o.disabled) {
3720
3734
  console.warn(
@@ -3724,10 +3738,10 @@ function Qe(e, n) {
3724
3738
  }
3725
3739
  const a = t.getValues(e), l = [];
3726
3740
  for (let s = 0; s < r.length; s++) {
3727
- const c = r[s], p = ne.get(c);
3741
+ const p = r[s], c = ne.get(p);
3728
3742
  if (o.draggableValue && !o.draggableValue(a[s])) continue;
3729
3743
  const u = Object.assign(
3730
- p ?? {
3744
+ c ?? {
3731
3745
  privateClasses: [],
3732
3746
  abortControllers: {}
3733
3747
  },
@@ -3742,27 +3756,27 @@ function Qe(e, n) {
3742
3756
  el: e
3743
3757
  },
3744
3758
  {
3745
- el: c,
3759
+ el: p,
3746
3760
  data: u
3747
3761
  },
3748
3762
  h
3749
3763
  ), _(h) && Me(h.draggedNode.data.value, u.value)) {
3750
- h.draggedNode.data = u, h.draggedNode.el = c;
3764
+ h.draggedNode.data = u, h.draggedNode.el = p;
3751
3765
  const g = h.draggedNodes.find(
3752
3766
  (f) => f.data.value === u.value
3753
3767
  );
3754
- g && (g.el = c);
3768
+ g && (g.el = p);
3755
3769
  }
3756
3770
  l.push({
3757
- el: c,
3771
+ el: p,
3758
3772
  data: u
3759
- }), (n || !p) && o.setupNode({
3773
+ }), (n || !c) && o.setupNode({
3760
3774
  parent: {
3761
3775
  el: e,
3762
3776
  data: t
3763
3777
  },
3764
3778
  node: {
3765
- el: c,
3779
+ el: p,
3766
3780
  data: u
3767
3781
  }
3768
3782
  }), ct({
@@ -3771,23 +3785,23 @@ function Qe(e, n) {
3771
3785
  data: t
3772
3786
  },
3773
3787
  node: {
3774
- el: c,
3788
+ el: p,
3775
3789
  data: u
3776
3790
  }
3777
3791
  });
3778
3792
  }
3779
3793
  j.set(e, { ...t, enabledNodes: l }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((s) => {
3780
- var c, p;
3781
- (p = (c = s(e)) == null ? void 0 : c.remapFinished) == null || p.call(c);
3794
+ var p, c;
3795
+ (c = (p = s(e)) == null ? void 0 : p.remapFinished) == null || c.call(p);
3782
3796
  });
3783
3797
  }
3784
- function zo() {
3798
+ function Vo() {
3785
3799
  h.remapJustFinished = !0, "draggedNode" in h && (h.affectedNodes = []);
3786
3800
  }
3787
- function Vo(e) {
3801
+ function Ho(e) {
3788
3802
  return !!e.targetData.parent.data.config.nativeDrag;
3789
3803
  }
3790
- function Ho(e) {
3804
+ function jo(e) {
3791
3805
  var n;
3792
3806
  if (e.parent.data.config.multiDrag) {
3793
3807
  if (h.selectedState)
@@ -3800,14 +3814,14 @@ function Ho(e) {
3800
3814
  } else return [e.node];
3801
3815
  return [];
3802
3816
  }
3803
- function jo(e) {
3817
+ function Bo(e) {
3804
3818
  _(h) && (h.emit("scrollStarted", h), !W(h) && (h.preventEnter = !0, rn && clearTimeout(rn), rn = setTimeout(() => {
3805
3819
  h.preventEnter = !1, h.emit("scrollEnded", h);
3806
3820
  }, 100)));
3807
3821
  }
3808
- function Bo(e, n) {
3822
+ function Uo(e, n) {
3809
3823
  const t = e.targetData.parent.data.config;
3810
- if (!t.nativeDrag || !Vo(e) || !ut({
3824
+ if (!t.nativeDrag || !Ho(e) || !ut({
3811
3825
  x: e.e.clientX,
3812
3826
  y: e.e.clientY,
3813
3827
  node: e.targetData.node,
@@ -3821,7 +3835,7 @@ function Bo(e, n) {
3821
3835
  node: e.targetData.node
3822
3836
  });
3823
3837
  r.length === 0 && (r = [e.targetData.node]), t.dragstartClasses(e.targetData.node, r, t);
3824
- const o = qo(e, r);
3838
+ const o = Go(e, r);
3825
3839
  if (t.onDragstart) {
3826
3840
  const a = {
3827
3841
  parent: e.targetData.parent,
@@ -3837,7 +3851,7 @@ function Bo(e, n) {
3837
3851
  t.onDragstart(a);
3838
3852
  }
3839
3853
  }
3840
- function Uo(e, n) {
3854
+ function _o(e, n) {
3841
3855
  var d, s;
3842
3856
  if (ue(e.e), n.pointerDown = {
3843
3857
  parent: e.targetData.parent,
@@ -3850,15 +3864,15 @@ function Uo(e, n) {
3850
3864
  config: e.targetData.parent.data.config
3851
3865
  }))
3852
3866
  return;
3853
- n.pointerDown.validated = !0, ta(e, n, e.targetData.node);
3867
+ n.pointerDown.validated = !0, ra(e, n, e.targetData.node);
3854
3868
  const t = e.targetData.parent.data;
3855
3869
  let r = [e.targetData.node];
3856
3870
  const o = e.e.ctrlKey || e.e.metaKey, a = e.e.shiftKey, l = e.targetData.node;
3857
3871
  if (o && t.config.multiDrag) {
3858
3872
  n.selectedState ? n.selectedState.nodes.findIndex(
3859
- (p) => p.el === l.el
3873
+ (c) => c.el === l.el
3860
3874
  ) === -1 ? r = [...n.selectedState.nodes, l] : r = n.selectedState.nodes.filter(
3861
- (p) => p.el !== l.el
3875
+ (c) => c.el !== l.el
3862
3876
  ) : r = [l], He(
3863
3877
  e.targetData.parent,
3864
3878
  r,
@@ -3869,25 +3883,25 @@ function Uo(e, n) {
3869
3883
  return;
3870
3884
  }
3871
3885
  if (a && t.config.multiDrag) {
3872
- const c = e.targetData.parent.data.enabledNodes;
3886
+ const p = e.targetData.parent.data.enabledNodes;
3873
3887
  if (n.selectedState && n.activeState)
3874
3888
  if (n.selectedState.parent.el !== e.targetData.parent.el) {
3875
3889
  be(n.selectedState.nodes, n.selectedState.parent, n), n.selectedState = void 0;
3876
- for (let p = 0; p <= l.data.index; p++)
3877
- r.push(c[p]);
3890
+ for (let c = 0; c <= l.data.index; c++)
3891
+ r.push(p[c]);
3878
3892
  } else {
3879
- const [p, u] = n.activeState.node.data.index < e.targetData.node.data.index ? [
3893
+ const [c, u] = n.activeState.node.data.index < e.targetData.node.data.index ? [
3880
3894
  n.activeState.node.data.index,
3881
3895
  e.targetData.node.data.index
3882
3896
  ] : [
3883
3897
  e.targetData.node.data.index,
3884
3898
  n.activeState.node.data.index
3885
3899
  ];
3886
- r = c.slice(p, u + 1);
3900
+ r = p.slice(c, u + 1);
3887
3901
  }
3888
3902
  else
3889
- for (let p = 0; p <= l.data.index; p++)
3890
- r.push(c[p]);
3903
+ for (let c = 0; c <= l.data.index; c++)
3904
+ r.push(p[c]);
3891
3905
  He(
3892
3906
  e.targetData.parent,
3893
3907
  r,
@@ -3898,7 +3912,7 @@ function Uo(e, n) {
3898
3912
  return;
3899
3913
  }
3900
3914
  (s = (d = n.selectedState) == null ? void 0 : d.nodes) != null && s.length ? n.selectedState.nodes.findIndex(
3901
- (p) => p.el === e.targetData.node.el
3915
+ (c) => c.el === e.targetData.node.el
3902
3916
  ) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? be(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && it() ? r.push(...n.selectedState.nodes) : be(n.selectedState.nodes, e.targetData.parent, n), He(
3903
3917
  e.targetData.parent,
3904
3918
  r,
@@ -3913,7 +3927,7 @@ function Uo(e, n) {
3913
3927
  !0
3914
3928
  );
3915
3929
  }
3916
- function _o(e, n, t, r = !1) {
3930
+ function qo(e, n, t, r = !1) {
3917
3931
  Te(
3918
3932
  n.map((o) => o.el),
3919
3933
  r ? t.synthDraggingClass : t.draggingClass
@@ -3933,7 +3947,7 @@ function _o(e, n, t, r = !1) {
3933
3947
  );
3934
3948
  });
3935
3949
  }
3936
- function qo(e, n) {
3950
+ function Go(e, n) {
3937
3951
  ue(e.e);
3938
3952
  const t = lt(
3939
3953
  st(
@@ -4004,22 +4018,22 @@ function ut({
4004
4018
  if (a === l || l.contains(a)) return !0;
4005
4019
  return !1;
4006
4020
  }
4007
- function Go(e) {
4008
- }
4009
4021
  function Yo(e) {
4022
+ }
4023
+ function Xo(e) {
4010
4024
  e.detail.targetData.parent.el === e.detail.state.currentParent.el ? gt(e.detail, e.detail.state) : Ke(e.detail, e.detail.state);
4011
4025
  }
4012
- function Xo(e, n) {
4026
+ function Wo(e, n) {
4013
4027
  const t = e.targetData.parent.data.config;
4014
4028
  t.nativeDrag && (ue(e.e), ce = !0, t.handleEnd(n));
4015
4029
  }
4016
- function Wo(e) {
4030
+ function Qo(e) {
4017
4031
  e.e.target !== e.e.currentTarget && h.pointerDown && (h.pointerDown.node.el.draggable = !1);
4018
4032
  }
4019
- function Qo(e) {
4033
+ function Ko(e) {
4020
4034
  e.e.target !== e.e.currentTarget && h.pointerDown && (h.pointerDown.node.el.draggable = !0);
4021
4035
  }
4022
- function Ko(e, n) {
4036
+ function Zo(e, n) {
4023
4037
  const t = e.targetData.parent.data.config;
4024
4038
  if (t.nativeDrag) {
4025
4039
  if (U(e.e), ue(e.e), ce) {
@@ -4029,7 +4043,7 @@ function Ko(e, n) {
4029
4043
  t.handleEnd(n);
4030
4044
  }
4031
4045
  }
4032
- function Zo(e, n) {
4046
+ function Jo(e, n) {
4033
4047
  var r;
4034
4048
  if (!W(n)) return;
4035
4049
  if (U(e.e), ce) {
@@ -4045,26 +4059,26 @@ function Zo(e, n) {
4045
4059
  state: n
4046
4060
  }), t == null || t.handleEnd(n);
4047
4061
  }
4048
- function Jo(e) {
4049
- var p, u, g, f, b;
4062
+ function ea(e) {
4063
+ var c, u, g, f, b;
4050
4064
  e.draggedNode && (e.draggedNode.el.draggable = !0);
4051
- const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = W(e), o = (p = j.get(e.initialParent.el)) == null ? void 0 : p.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, l = (u = t == null ? void 0 : t.config) == null ? void 0 : u.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (f = t == null ? void 0 : t.config) == null ? void 0 : f.dragPlaceholderClass, s = e.originalZIndex;
4065
+ const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = W(e), o = (c = j.get(e.initialParent.el)) == null ? void 0 : c.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, l = (u = t == null ? void 0 : t.config) == null ? void 0 : u.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (f = t == null ? void 0 : t.config) == null ? void 0 : f.dragPlaceholderClass, s = e.originalZIndex;
4052
4066
  W(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), un(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), s !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = s), requestAnimationFrame(() => {
4053
4067
  de(n, a), de(n, l), de(n, d);
4054
4068
  }), be(e.draggedNodes, e.currentParent, e), ye(e.currentParent, void 0, e);
4055
- const c = { ...e };
4069
+ const p = { ...e };
4056
4070
  (b = o == null ? void 0 : o.onDragend) == null || b.call(o, {
4057
- parent: c.currentParent,
4071
+ parent: p.currentParent,
4058
4072
  values: Ee(
4059
- c.currentParent.el,
4060
- c.currentParent.data
4073
+ p.currentParent.el,
4074
+ p.currentParent.data
4061
4075
  ),
4062
- draggedNode: c.draggedNode,
4063
- draggedNodes: c.draggedNodes,
4064
- state: c
4065
- }), e.emit("dragEnded", c), xo();
4076
+ draggedNode: p.draggedNode,
4077
+ draggedNodes: p.draggedNodes,
4078
+ state: p
4079
+ }), e.emit("dragEnded", p), wo();
4066
4080
  }
4067
- function ea(e, n) {
4081
+ function na(e, n) {
4068
4082
  ue(e.e), !n.pointerSelection && n.selectedState && be(n.selectedState.nodes, e.targetData.parent, n);
4069
4083
  const t = e.targetData.parent.data.config;
4070
4084
  n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, de(
@@ -4072,11 +4086,11 @@ function ea(e, n) {
4072
4086
  t.longPressClass
4073
4087
  ), _(n) && t.handleEnd(n);
4074
4088
  }
4075
- function na(e, n, t, r, o, a) {
4089
+ function ta(e, n, t, r, o, a) {
4076
4090
  var b, x;
4077
4091
  const l = n.data.config;
4078
4092
  let d, s;
4079
- const c = [
4093
+ const p = [
4080
4094
  "display",
4081
4095
  "flexDirection",
4082
4096
  "alignItems",
@@ -4104,9 +4118,9 @@ function na(e, n, t, r, o, a) {
4104
4118
  "height",
4105
4119
  "boxSizing",
4106
4120
  "overflow"
4107
- ], p = (m, y) => {
4121
+ ], c = (m, y) => {
4108
4122
  const D = window.getComputedStyle(m);
4109
- c.forEach((C) => {
4123
+ p.forEach((C) => {
4110
4124
  y.style[C] = D[C];
4111
4125
  });
4112
4126
  }, u = (m, y = {}) => {
@@ -4126,12 +4140,12 @@ function na(e, n, t, r, o, a) {
4126
4140
  if (l.synthDragImage)
4127
4141
  s = l.synthDragImage(e, n, t, o), d = s.dragImage, d.setAttribute("popover", "manual"), u(d);
4128
4142
  else if (!l.multiDrag || o.length === 1)
4129
- d = e.el.cloneNode(!0), p(e.el, d), d.setAttribute("popover", "manual"), u(d);
4143
+ d = e.el.cloneNode(!0), c(e.el, d), d.setAttribute("popover", "manual"), u(d);
4130
4144
  else {
4131
4145
  const m = document.createElement("div");
4132
4146
  m.setAttribute("popover", "manual"), o.forEach((y) => {
4133
4147
  const D = y.el.cloneNode(!0);
4134
- p(y.el, D), D.style.pointerEvents = "none", D.style.margin = "0", m.append(D);
4148
+ c(y.el, D), D.style.pointerEvents = "none", D.style.margin = "0", m.append(D);
4135
4149
  }), m.style.display = "flex", m.style.flexDirection = "column", m.style.padding = "0", m.style.margin = "0", m.style.position = "absolute", m.style.zIndex = "9999", m.style.pointerEvents = "none", d = m;
4136
4150
  }
4137
4151
  d.id = "dnd-dragged-node-clone", n.el.appendChild(d), d.showPopover();
@@ -4155,7 +4169,7 @@ function na(e, n, t, r, o, a) {
4155
4169
  ...g
4156
4170
  });
4157
4171
  }
4158
- function ta(e, n, t) {
4172
+ function ra(e, n, t) {
4159
4173
  const r = e.targetData.parent.data.config;
4160
4174
  n.longPressTimeout = setTimeout(() => {
4161
4175
  n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Te([t.el], r.longPressClass), U(e.e));
@@ -4165,11 +4179,11 @@ function un(e, n = !0, t = !0) {
4165
4179
  n && (e.frameIdX !== void 0 && (cancelAnimationFrame(e.frameIdX), e.frameIdX = void 0), e.lastScrollDirectionX = void 0), t && (e.frameIdY !== void 0 && (cancelAnimationFrame(e.frameIdY), e.frameIdY = void 0), e.lastScrollDirectionY = void 0), !e.frameIdX && !e.frameIdY && (e.preventEnter = !1);
4166
4180
  }
4167
4181
  function pt(e, n = !1) {
4168
- var p;
4169
- const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, a = e.startTop ?? 0, l = window.scrollX ?? 0, d = window.scrollY ?? 0, s = t - o + l, c = r - a + d;
4170
- e.clonedDraggedNode.style.transform = `translate3d(${s}px, ${c}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", de(
4182
+ var c;
4183
+ const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, a = e.startTop ?? 0, l = window.scrollX ?? 0, d = window.scrollY ?? 0, s = t - o + l, p = r - a + d;
4184
+ e.clonedDraggedNode.style.transform = `translate3d(${s}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", de(
4171
4185
  e.draggedNodes.map((u) => u.el),
4172
- (p = e.initialParent.data.config) == null ? void 0 : p.longPressClass
4186
+ (c = e.initialParent.data.config) == null ? void 0 : c.longPressClass
4173
4187
  ));
4174
4188
  }
4175
4189
  function Rn(e, n, t = !1) {
@@ -4177,7 +4191,7 @@ function Rn(e, n, t = !1) {
4177
4191
  n.coordinates.x = r.x, n.coordinates.y = r.y, pt(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
4178
4192
  W(n) && Ze(n.coordinates, e, n);
4179
4193
  }, 16);
4180
- const o = pa(r);
4194
+ const o = ga(r);
4181
4195
  if (!o) {
4182
4196
  document.dispatchEvent(
4183
4197
  new CustomEvent("handleRootPointerover", {
@@ -4204,22 +4218,22 @@ function Rn(e, n, t = !1) {
4204
4218
  })
4205
4219
  );
4206
4220
  }
4207
- function ra(e, n) {
4221
+ function oa(e, n) {
4208
4222
  var a;
4209
4223
  if (!e.targetData.parent.data.config.nativeDrag) return;
4210
4224
  const { x: r, y: o } = ke(e.e);
4211
4225
  n.coordinates.y = o, n.coordinates.x = r, U(e.e), ue(e.e), _(n) && Ze({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ? gt(e, n) : Ke(e, n);
4212
4226
  }
4213
- function oa(e, n) {
4227
+ function aa(e, n) {
4214
4228
  if (!e.targetData.parent.data.config.nativeDrag) return;
4215
4229
  U(e.e), ue(e.e);
4216
4230
  const { x: r, y: o } = ke(e.e);
4217
4231
  _(n) && Ze({ x: r, y: o }, e.e, n), Ke(e, n);
4218
4232
  }
4219
- function aa(e) {
4233
+ function ia(e) {
4220
4234
  e.detail.targetData.parent.el !== e.detail.state.currentParent.el && Ke(e.detail, e.detail.state);
4221
4235
  }
4222
- function ia({
4236
+ function la({
4223
4237
  currentParent: e,
4224
4238
  targetParent: n,
4225
4239
  initialParent: t,
@@ -4237,14 +4251,14 @@ function ia({
4237
4251
  o
4238
4252
  ) : !(!a.group || a.group !== l.group);
4239
4253
  }
4240
- function la(e, n) {
4254
+ function sa(e, n) {
4241
4255
  U(e.e);
4242
4256
  }
4243
- function sa(e, n) {
4257
+ function da(e, n) {
4244
4258
  U(e.e);
4245
4259
  }
4246
- function da(e, n, t, r) {
4247
- var p;
4260
+ function ca(e, n, t, r) {
4261
+ var c;
4248
4262
  if (n.affectedNodes.map((u) => u.data.value).includes(e.targetData.node.data.value))
4249
4263
  return !1;
4250
4264
  if (n.remapJustFinished)
@@ -4252,26 +4266,26 @@ function da(e, n, t, r) {
4252
4266
  if (n.preventEnter) return !1;
4253
4267
  if (n.draggedNodes.map((u) => u.el).includes(e.targetData.node.el))
4254
4268
  return n.currentTargetValue = void 0, !1;
4255
- if (e.targetData.node.data.value === n.currentTargetValue || e.targetData.parent.el !== ((p = n.currentParent) == null ? void 0 : p.el) || e.targetData.parent.data.config.sortable === !1 || e.targetData.node.el.contains(n.draggedNodes[0].el)) return !1;
4269
+ if (e.targetData.node.data.value === n.currentTargetValue || e.targetData.parent.el !== ((c = n.currentParent) == null ? void 0 : c.el) || e.targetData.parent.data.config.sortable === !1 || e.targetData.node.el.contains(n.draggedNodes[0].el)) return !1;
4256
4270
  const o = e.targetData.node.el.getBoundingClientRect(), a = n.draggedNode.el.getBoundingClientRect(), l = o.y - a.y, d = o.x - a.x;
4257
4271
  let s;
4258
4272
  Math.abs(l) > Math.abs(d) ? s = l > 0 ? "above" : "below" : s = d > 0 ? "left" : "right";
4259
- const c = n.currentParent.data.config.threshold;
4273
+ const p = n.currentParent.data.config.threshold;
4260
4274
  switch (s) {
4261
4275
  case "left":
4262
- if (t > o.x + o.width * c.horizontal)
4276
+ if (t > o.x + o.width * p.horizontal)
4263
4277
  return n.incomingDirection = "left", !0;
4264
4278
  break;
4265
4279
  case "right":
4266
- if (t < o.x + o.width * (1 - c.horizontal))
4280
+ if (t < o.x + o.width * (1 - p.horizontal))
4267
4281
  return n.incomingDirection = "right", !0;
4268
4282
  break;
4269
4283
  case "above":
4270
- if (r > o.y + o.height * c.vertical)
4284
+ if (r > o.y + o.height * p.vertical)
4271
4285
  return n.incomingDirection = "above", !0;
4272
4286
  break;
4273
4287
  case "below":
4274
- if (r < o.y + o.height * (1 - c.vertical))
4288
+ if (r < o.y + o.height * (1 - p.vertical))
4275
4289
  return n.incomingDirection = "below", !0;
4276
4290
  break;
4277
4291
  }
@@ -4279,7 +4293,7 @@ function da(e, n, t, r) {
4279
4293
  }
4280
4294
  function gt(e, n) {
4281
4295
  const { x: t, y: r } = ke(e.e);
4282
- if (!da(e, n, t, r))
4296
+ if (!ca(e, n, t, r))
4283
4297
  return;
4284
4298
  const o = n.draggedNode.data.index > e.targetData.node.data.index ? [e.targetData.node.data.index, n.draggedNode.data.index] : [n.draggedNode.data.index, e.targetData.node.data.index];
4285
4299
  n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
@@ -4320,7 +4334,7 @@ function Y(e) {
4320
4334
  };
4321
4335
  }
4322
4336
  function Ke(e, n) {
4323
- U(e.e), ia({
4337
+ U(e.e), la({
4324
4338
  currentParent: n.currentParent,
4325
4339
  targetParent: e.targetData.parent,
4326
4340
  initialParent: n.initialParent,
@@ -4364,11 +4378,11 @@ function Te(e, n, t = !1) {
4364
4378
  ne.set(o, a);
4365
4379
  }
4366
4380
  for (const o of e) {
4367
- const a = ne.get(o), l = ca(o, n, a, t);
4381
+ const a = ne.get(o), l = ua(o, n, a, t);
4368
4382
  l && r(o, l);
4369
4383
  }
4370
4384
  }
4371
- function ca(e, n, t, r = !1) {
4385
+ function ua(e, n, t, r = !1) {
4372
4386
  if (!n) return;
4373
4387
  const o = at(n);
4374
4388
  if (!o.length) return;
@@ -4401,9 +4415,9 @@ function de(e, n) {
4401
4415
  }
4402
4416
  }
4403
4417
  function Fn(e, n, t, r, o) {
4404
- const l = o.axis === "x", d = e === document.scrollingElement, s = l ? "scrollLeft" : "scrollTop", c = l ? "clientWidth" : "clientHeight", p = l ? "offsetWidth" : "offsetHeight", u = l ? "scrollWidth" : "scrollHeight", g = l ? n.clientX : n.clientY, f = l ? r.left : r.top, b = l ? t.overflowX : t.overflowY;
4418
+ const l = o.axis === "x", d = e === document.scrollingElement, s = l ? "scrollLeft" : "scrollTop", p = l ? "clientWidth" : "clientHeight", c = l ? "offsetWidth" : "offsetHeight", u = l ? "scrollWidth" : "scrollHeight", g = l ? n.clientX : n.clientY, f = l ? r.left : r.top, b = l ? t.overflowX : t.overflowY;
4405
4419
  if (d) {
4406
- const x = e[s], m = e[c], y = x > 0, D = x + m < (l ? o.state.rootScrollWidth || 0 : e[u]);
4420
+ const x = e[s], m = e[p], y = x > 0, D = x + m < (l ? o.state.rootScrollWidth || 0 : e[u]);
4407
4421
  return l ? {
4408
4422
  left: y && g < m * 0.075,
4409
4423
  right: D && g > m * (1 - 0.075)
@@ -4413,7 +4427,7 @@ function Fn(e, n, t, r, o) {
4413
4427
  };
4414
4428
  }
4415
4429
  if ((b === "auto" || b === "scroll") && e !== document.body && e !== document.documentElement) {
4416
- const x = e[u], m = e[p], y = e[s], D = y > 0, C = y < x - m;
4430
+ const x = e[u], m = e[c], y = e[s], D = y > 0, C = y < x - m;
4417
4431
  return l ? {
4418
4432
  left: D && g < f + m * 0.075,
4419
4433
  right: C && g > f + m * (1 - 0.075)
@@ -4424,25 +4438,25 @@ function Fn(e, n, t, r, o) {
4424
4438
  }
4425
4439
  return l ? { left: !1, right: !1 } : { up: !1, down: !1 };
4426
4440
  }
4427
- function ua(e, n, t, r) {
4441
+ function pa(e, n, t, r) {
4428
4442
  if (!_(t) || !t.draggedNode)
4429
4443
  return;
4430
4444
  t.preventEnter = !0;
4431
4445
  const o = r.axis === "x", a = r.direction === "positive" ? 1 : -1, l = 20, d = o ? "lastScrollDirectionX" : "lastScrollDirectionY", s = o ? "frameIdX" : "frameIdY";
4432
4446
  t[s] !== void 0 && (cancelAnimationFrame(t[s]), t[s] = void 0), t[d] = r.direction;
4433
- const c = () => {
4447
+ const p = () => {
4434
4448
  if (!_(t) || !t.draggedNode) {
4435
4449
  t[s] !== void 0 && (cancelAnimationFrame(t[s]), t[s] = void 0);
4436
4450
  return;
4437
4451
  }
4438
- const p = o ? "scrollLeft" : "scrollTop", u = o ? "clientWidth" : "clientHeight", g = o ? "scrollWidth" : "scrollHeight", f = e[p], b = e[u], x = e[g];
4452
+ const c = o ? "scrollLeft" : "scrollTop", u = o ? "clientWidth" : "clientHeight", g = o ? "scrollWidth" : "scrollHeight", f = e[c], b = e[u], x = e[g];
4439
4453
  if (!(a > 0 ? f + b < x : f > 0)) {
4440
4454
  t[s] = void 0, t[d] = void 0;
4441
4455
  return;
4442
4456
  }
4443
- e[p] += l * a, W(t) && pt(t), t[s] = requestAnimationFrame(c);
4457
+ e[c] += l * a, W(t) && pt(t), t[s] = requestAnimationFrame(p);
4444
4458
  };
4445
- t[s] = requestAnimationFrame(c);
4459
+ t[s] = requestAnimationFrame(p);
4446
4460
  }
4447
4461
  function Ln(e, n, t) {
4448
4462
  const r = e.getBoundingClientRect();
@@ -4454,13 +4468,13 @@ function Ze(e, n, t) {
4454
4468
  un(t);
4455
4469
  const { x: r, y: o } = e;
4456
4470
  let a = !1;
4457
- const l = (s, c, p) => {
4458
- ua(p, n, t, { axis: s, direction: c }), a = !0;
4471
+ const l = (s, p, c) => {
4472
+ pa(c, n, t, { axis: s, direction: p }), a = !0;
4459
4473
  }, d = (s) => {
4460
- const c = window.getComputedStyle(s), p = s.getBoundingClientRect(), u = Fn(s, n, c, p, {
4474
+ const p = window.getComputedStyle(s), c = s.getBoundingClientRect(), u = Fn(s, n, p, c, {
4461
4475
  axis: "x",
4462
4476
  state: t
4463
- }), g = Fn(s, n, c, p, { axis: "y" });
4477
+ }), g = Fn(s, n, p, c, { axis: "y" });
4464
4478
  (u.left || u.right) && (t.lastScrollContainerX = s, l("x", u.right ? "positive" : "negative", s)), (g.up || g.down) && (t.lastScrollContainerY = s, l("y", g.down ? "positive" : "negative", s));
4465
4479
  };
4466
4480
  if (t.lastScrollContainerX && Ln(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !a && t.lastScrollContainerY && Ln(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !a) {
@@ -4474,7 +4488,7 @@ function Ze(e, n, t) {
4474
4488
  }
4475
4489
  a || un(t);
4476
4490
  }
4477
- function pa(e) {
4491
+ function ga(e) {
4478
4492
  let n = document.elementFromPoint(e.x, e.y);
4479
4493
  if (!Je(n)) return;
4480
4494
  let t, r = !0;
@@ -4524,38 +4538,38 @@ function Ge(e, n) {
4524
4538
  }
4525
4539
  return t;
4526
4540
  }
4527
- function ga(e) {
4541
+ function fa(e) {
4528
4542
  if (e instanceof HTMLElement) return e;
4529
4543
  if ("current" in e && e.current instanceof HTMLElement)
4530
4544
  return e.current;
4531
4545
  console.warn("Invalid parent element", e);
4532
4546
  }
4533
- function fa(e, n) {
4534
- const t = ga(e);
4547
+ function ha(e, n) {
4548
+ const t = fa(e);
4535
4549
  t && n(t);
4536
4550
  }
4537
4551
  var Ye = /* @__PURE__ */ new WeakMap();
4538
- function ha(e) {
4552
+ function ma(e) {
4539
4553
  const n = Ye.get(e);
4540
4554
  return n ? n[0] : (console.warn("No values found for parent element"), []);
4541
4555
  }
4542
- function ma(e, n) {
4556
+ function ba(e, n) {
4543
4557
  const t = Ye.get(n);
4544
4558
  t && t[1](e), Ye.set(n, [e, t[1]]);
4545
4559
  }
4546
- function ba(e, n) {
4560
+ function va(e, n) {
4547
4561
  return (t) => {
4548
- Ye.set(t, n), No({ parent: t, getValues: ha, setValues: ma, config: e });
4562
+ Ye.set(t, n), ko({ parent: t, getValues: ma, setValues: ba, config: e });
4549
4563
  };
4550
4564
  }
4551
4565
  function Pn(e) {
4552
4566
  wn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
4553
4567
  const { parent: t, state: r, ...o } = n;
4554
- fa(t, ba(o, r));
4568
+ ha(t, va(o, r));
4555
4569
  }));
4556
4570
  }
4557
- function va(e, n = {}) {
4558
- const t = Ce(null), [r, o] = M(e);
4571
+ function ya(e, n = {}) {
4572
+ const t = Ce(null), [r, o] = z(e);
4559
4573
  function a(l = {}) {
4560
4574
  Pn({ parent: t, state: [r, o], ...l });
4561
4575
  }
@@ -4574,7 +4588,7 @@ const On = {
4574
4588
  color: S.palette.neutral.N40
4575
4589
  }
4576
4590
  }
4577
- }, ya = T.ul`
4591
+ }, xa = T.ul`
4578
4592
  list-style: none;
4579
4593
  padding: 0;
4580
4594
  margin: 0;
@@ -4583,7 +4597,7 @@ const On = {
4583
4597
  gap: 12px;
4584
4598
  width: 100%;
4585
4599
  justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
4586
- `, xa = T.li`
4600
+ `, wa = T.li`
4587
4601
  & > div {
4588
4602
  border: 1px solid
4589
4603
  ${({ theme: e, $active: n }) => {
@@ -4600,20 +4614,20 @@ const On = {
4600
4614
  initialItems: a,
4601
4615
  highlightFirst: l,
4602
4616
  onMove: d
4603
- } = e, [s, c] = va(
4617
+ } = e, [s, p] = ya(
4604
4618
  a,
4605
4619
  { group: r }
4606
- ), [p, u] = H.useState(
4620
+ ), [c, u] = M.useState(
4607
4621
  null
4608
- ), g = H.useRef(a);
4609
- H.useEffect(() => {
4622
+ ), g = M.useRef(a);
4623
+ M.useEffect(() => {
4610
4624
  const y = (D) => {
4611
4625
  const C = D.detail ?? null;
4612
4626
  u(C);
4613
4627
  };
4614
4628
  return window.addEventListener(on, y), () => window.removeEventListener(on, y);
4615
4629
  }, []);
4616
- const f = H.useCallback((y) => {
4630
+ const f = M.useCallback((y) => {
4617
4631
  window.dispatchEvent(
4618
4632
  new CustomEvent(on, { detail: y })
4619
4633
  );
@@ -4621,26 +4635,26 @@ const On = {
4621
4635
  var E;
4622
4636
  const D = y.target, C = (E = D == null ? void 0 : D.closest) == null ? void 0 : E.call(D, "li.dnd-item"), k = (C == null ? void 0 : C.getAttribute("data-label")) || null;
4623
4637
  k && (u(k), f(k));
4624
- }, x = H.useCallback(() => {
4638
+ }, x = M.useCallback(() => {
4625
4639
  u(null), f(null);
4626
4640
  }, [f]);
4627
- H.useEffect(() => {
4641
+ M.useEffect(() => {
4628
4642
  const y = () => x();
4629
4643
  return window.addEventListener("pointerup", y), window.addEventListener("blur", y), () => {
4630
4644
  window.removeEventListener("pointerup", y), window.removeEventListener("blur", y);
4631
4645
  };
4632
- }, [x]), H.useEffect(() => {
4646
+ }, [x]), M.useEffect(() => {
4633
4647
  const y = g.current;
4634
- if (c.length !== y.length && c.length === y.length + 1) {
4635
- const D = new Set(y), C = c.find((k) => !D.has(k)) || null;
4648
+ if (p.length !== y.length && p.length === y.length + 1) {
4649
+ const D = new Set(y), C = p.find((k) => !D.has(k)) || null;
4636
4650
  if (C) {
4637
4651
  const k = t === "left" ? "right" : "left";
4638
4652
  d == null || d({ item: C, from: k, to: t });
4639
4653
  }
4640
4654
  }
4641
- g.current = c;
4642
- }, [c, t, d]);
4643
- const m = c.length === 0;
4655
+ g.current = p;
4656
+ }, [p, t, d]);
4657
+ const m = p.length === 0;
4644
4658
  return /* @__PURE__ */ i(
4645
4659
  Le,
4646
4660
  {
@@ -4649,7 +4663,7 @@ const On = {
4649
4663
  height: "-webkit-fill-available",
4650
4664
  spacing: "wide",
4651
4665
  children: /* @__PURE__ */ i(
4652
- ya,
4666
+ xa,
4653
4667
  {
4654
4668
  ref: s,
4655
4669
  onPointerDownCapture: b,
@@ -4666,10 +4680,10 @@ const On = {
4666
4680
  justifyContent: "center",
4667
4681
  children: /* @__PURE__ */ i(I, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
4668
4682
  }
4669
- ) : c.map((y, D) => {
4670
- const C = p === y;
4683
+ ) : p.map((y, D) => {
4684
+ const C = c === y;
4671
4685
  return /* @__PURE__ */ i(
4672
- xa,
4686
+ wa,
4673
4687
  {
4674
4688
  className: `dnd-item${C ? " is-dragging" : ""}`,
4675
4689
  "data-label": y,
@@ -4694,7 +4708,7 @@ const On = {
4694
4708
  )
4695
4709
  }
4696
4710
  );
4697
- }, xi = (e) => {
4711
+ }, wi = (e) => {
4698
4712
  const { group: n = "clients", left: t, right: r, onMove: o } = e, a = (l) => {
4699
4713
  o == null || o(l);
4700
4714
  };
@@ -4733,7 +4747,7 @@ const On = {
4733
4747
  ]
4734
4748
  }
4735
4749
  );
4736
- }, wa = T.div`
4750
+ }, Da = T.div`
4737
4751
  & > button {
4738
4752
  height: 66px;
4739
4753
  min-width: 66px;
@@ -4751,7 +4765,7 @@ const On = {
4751
4765
  }
4752
4766
  }
4753
4767
  }
4754
- `, wi = (e) => /* @__PURE__ */ i(wa, { children: /* @__PURE__ */ i(B, { ...e }) }), Da = T.div`
4768
+ `, Di = (e) => /* @__PURE__ */ i(Da, { children: /* @__PURE__ */ i(B, { ...e }) }), Ca = T.div`
4755
4769
  display: flex;
4756
4770
  justify-content: space-between;
4757
4771
  align-items: center;
@@ -4780,9 +4794,9 @@ const On = {
4780
4794
  }
4781
4795
  }
4782
4796
  }
4783
- `, Di = (e) => {
4797
+ `, Ci = (e) => {
4784
4798
  const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: a } = e;
4785
- return /* @__PURE__ */ v(Da, { children: [
4799
+ return /* @__PURE__ */ v(Ca, { children: [
4786
4800
  /* @__PURE__ */ i(
4787
4801
  B,
4788
4802
  {
@@ -4844,7 +4858,7 @@ const On = {
4844
4858
  hover: S.palette.neutral.N30
4845
4859
  }
4846
4860
  }
4847
- }, Ca = T.ul`
4861
+ }, Ta = T.ul`
4848
4862
  display: flex;
4849
4863
  flex-direction: column;
4850
4864
  padding: 4px 0px;
@@ -4895,15 +4909,15 @@ const On = {
4895
4909
  return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.hover) || ee.option.background.hover;
4896
4910
  }};
4897
4911
  }
4898
- `, Ta = (e) => {
4912
+ `, Sa = (e) => {
4899
4913
  const { children: n, onOptionClick: t, options: r, maxItems: o } = e, a = (l) => {
4900
4914
  try {
4901
4915
  if (l.target.closest('input[type="checkbox"]'))
4902
4916
  return;
4903
4917
  const s = r == null ? void 0 : r.find(
4904
- (c) => {
4905
- var p;
4906
- return c.id === l.target.id || c.id === ((p = l.target.parentElement) == null ? void 0 : p.id);
4918
+ (p) => {
4919
+ var c;
4920
+ return p.id === l.target.id || p.id === ((c = l.target.parentElement) == null ? void 0 : c.id);
4907
4921
  }
4908
4922
  );
4909
4923
  s && t && t(s.value);
@@ -4912,7 +4926,7 @@ const On = {
4912
4926
  }
4913
4927
  };
4914
4928
  return /* @__PURE__ */ i(
4915
- Ca,
4929
+ Ta,
4916
4930
  {
4917
4931
  $maxItems: o,
4918
4932
  $totalOptions: r == null ? void 0 : r.length,
@@ -4920,17 +4934,17 @@ const On = {
4920
4934
  children: n
4921
4935
  }
4922
4936
  );
4923
- }, Sa = T.div`
4937
+ }, Ea = T.div`
4924
4938
  cursor: ${({ $disabled: e }) => e && "not-allowed"};
4925
4939
  width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
4926
4940
  position: relative;
4927
- `, Ea = T.div`
4941
+ `, Na = T.div`
4928
4942
  display: flex;
4929
4943
  align-items: center;
4930
4944
  margin-bottom: 4px;
4931
4945
  gap: 4px;
4932
4946
  pointer-events: ${({ $disabled: e }) => e && "none"};
4933
- `, Na = T.div`
4947
+ `, ka = T.div`
4934
4948
  display: grid;
4935
4949
  height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
4936
4950
  padding: 0px 16px;
@@ -4953,7 +4967,7 @@ const On = {
4953
4967
  const o = ((l = (a = r == null ? void 0 : r.input) == null ? void 0 : a.border) == null ? void 0 : l.color) || ee.border.color;
4954
4968
  return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
4955
4969
  }};
4956
- `, ka = T.input`
4970
+ `, $a = T.input`
4957
4971
  display: ${({ $inputWithData: e }) => e ? "none" : "block"};
4958
4972
  outline: none;
4959
4973
  padding: 0;
@@ -5011,18 +5025,18 @@ const On = {
5011
5025
  &:-webkit-autofill {
5012
5026
  -webkit-background-clip: text;
5013
5027
  }
5014
- `, $a = T.div`
5028
+ `, Aa = T.div`
5015
5029
  display: flex;
5016
5030
  justify-content: flex-end;
5017
5031
  transition: ease;
5018
5032
  transition-duration: 500ms;
5019
5033
  transform: ${({ $displayList: e }) => e ? "rotate(-90deg)" : "rotate(90deg)"};
5020
- `, Aa = (e) => e === "compact" ? "medium" : "large";
5034
+ `, Ia = (e) => e === "compact" ? "medium" : "large";
5021
5035
  function zn(e, n) {
5022
5036
  const t = e.find((r) => r.value === n);
5023
5037
  return t ? t.label : n;
5024
5038
  }
5025
- const Ia = (e) => {
5039
+ const Ra = (e) => {
5026
5040
  var o, a;
5027
5041
  const { message: n } = e, t = vn(mn), r = ((a = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : a.appearance) || ee.message.appearance;
5028
5042
  return /* @__PURE__ */ v(w, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
@@ -5045,7 +5059,7 @@ const Ia = (e) => {
5045
5059
  }
5046
5060
  )
5047
5061
  ] });
5048
- }, Ra = Rt((e, n) => {
5062
+ }, Fa = Rt((e, n) => {
5049
5063
  var ae, Ie;
5050
5064
  const {
5051
5065
  displayList: t,
@@ -5055,8 +5069,8 @@ const Ia = (e) => {
5055
5069
  id: l,
5056
5070
  invalid: d,
5057
5071
  label: s,
5058
- maxItems: c,
5059
- message: p,
5072
+ maxItems: p,
5073
+ message: c,
5060
5074
  name: u,
5061
5075
  options: g,
5062
5076
  placeholder: f,
@@ -5071,7 +5085,7 @@ const Ia = (e) => {
5071
5085
  onKeyUp: R,
5072
5086
  onBlur: L,
5073
5087
  onChange: $,
5074
- onClick: z,
5088
+ onClick: V,
5075
5089
  onFocus: oe,
5076
5090
  onOptionClick: xe,
5077
5091
  onCheckboxChange: we,
@@ -5084,9 +5098,9 @@ const Ia = (e) => {
5084
5098
  target: { checked: !1, value: F }
5085
5099
  });
5086
5100
  };
5087
- return /* @__PURE__ */ v(Sa, { $fullwidth: a, $disabled: r, ref: n, children: [
5101
+ return /* @__PURE__ */ v(Ea, { $fullwidth: a, $disabled: r, ref: n, children: [
5088
5102
  s && /* @__PURE__ */ v(
5089
- Ea,
5103
+ Na,
5090
5104
  {
5091
5105
  $alignItems: "center",
5092
5106
  $disabled: r,
@@ -5099,7 +5113,7 @@ const Ia = (e) => {
5099
5113
  focused: o,
5100
5114
  invalid: d,
5101
5115
  margin: "0px 0px 0px 16px",
5102
- size: Aa(x),
5116
+ size: Ia(x),
5103
5117
  disabled: r,
5104
5118
  children: s
5105
5119
  }
@@ -5109,17 +5123,17 @@ const Ia = (e) => {
5109
5123
  }
5110
5124
  ),
5111
5125
  /* @__PURE__ */ v(
5112
- Na,
5126
+ ka,
5113
5127
  {
5114
5128
  $disabled: r,
5115
5129
  $focused: o,
5116
5130
  $invalid: d,
5117
- onClick: k ? void 0 : z,
5131
+ onClick: k ? void 0 : V,
5118
5132
  $value: m,
5119
5133
  $size: x,
5120
5134
  children: [
5121
5135
  /* @__PURE__ */ i(
5122
- ka,
5136
+ $a,
5123
5137
  {
5124
5138
  $inputWithData: !!m,
5125
5139
  autoComplete: "off",
@@ -5136,7 +5150,7 @@ const Ia = (e) => {
5136
5150
  onFocus: oe,
5137
5151
  onBlur: L,
5138
5152
  onChange: (P) => $(u, P.target.value),
5139
- onClick: k ? z : void 0,
5153
+ onClick: k ? V : void 0,
5140
5154
  onKeyUp: R
5141
5155
  }
5142
5156
  ),
@@ -5163,7 +5177,7 @@ const Ia = (e) => {
5163
5177
  }
5164
5178
  }
5165
5179
  )),
5166
- D && /* @__PURE__ */ i($a, { $displayList: t, children: /* @__PURE__ */ i(
5180
+ D && /* @__PURE__ */ i(Aa, { $displayList: t, children: /* @__PURE__ */ i(
5167
5181
  O,
5168
5182
  {
5169
5183
  appearance: "dark",
@@ -5176,11 +5190,11 @@ const Ia = (e) => {
5176
5190
  ]
5177
5191
  }
5178
5192
  ),
5179
- d && /* @__PURE__ */ i(Ia, { message: p }),
5193
+ d && /* @__PURE__ */ i(Ra, { message: c }),
5180
5194
  t && !r && /* @__PURE__ */ i(
5181
- Ta,
5195
+ Sa,
5182
5196
  {
5183
- maxItems: c,
5197
+ maxItems: p,
5184
5198
  onOptionClick: xe,
5185
5199
  options: g,
5186
5200
  children: g.map((P) => /* @__PURE__ */ i(
@@ -5197,7 +5211,7 @@ const Ia = (e) => {
5197
5211
  }
5198
5212
  )
5199
5213
  ] });
5200
- }), Fa = (e) => {
5214
+ }), La = (e) => {
5201
5215
  const {
5202
5216
  disabled: n = !1,
5203
5217
  fullwidth: t = !1,
@@ -5207,8 +5221,8 @@ const Ia = (e) => {
5207
5221
  maxItems: l = 5,
5208
5222
  message: d,
5209
5223
  name: s,
5210
- onBlur: c,
5211
- onChange: p,
5224
+ onBlur: p,
5225
+ onChange: c,
5212
5226
  onClick: u,
5213
5227
  onFocus: g,
5214
5228
  onKeyUp: f,
@@ -5222,7 +5236,7 @@ const Ia = (e) => {
5222
5236
  showChevron: E = !0,
5223
5237
  editable: R = !1,
5224
5238
  clearable: L = !0
5225
- } = e, [$, z] = M(!1), [oe, xe] = M(!1), [we, pe] = M([]), J = Ce(null);
5239
+ } = e, [$, V] = z(!1), [oe, xe] = z(!1), [we, pe] = z([]), J = Ce(null);
5226
5240
  ve(() => {
5227
5241
  if (k) {
5228
5242
  const F = D ? D.split(",").map((q) => q.trim()) : [];
@@ -5230,11 +5244,11 @@ const Ia = (e) => {
5230
5244
  }
5231
5245
  }, [D, k]);
5232
5246
  function $e() {
5233
- p(s, ""), pe([]), z(!1);
5247
+ c(s, ""), pe([]), V(!1);
5234
5248
  }
5235
5249
  function De(F) {
5236
5250
  if (!n) {
5237
- z(!$);
5251
+ V(!$);
5238
5252
  try {
5239
5253
  u && u(F);
5240
5254
  } catch (q) {
@@ -5243,25 +5257,25 @@ const Ia = (e) => {
5243
5257
  }
5244
5258
  }
5245
5259
  const ge = Ft((F) => {
5246
- J.current && F.target && !J.current.contains(F.target) && z(!1);
5260
+ J.current && F.target && !J.current.contains(F.target) && V(!1);
5247
5261
  }, []);
5248
5262
  function fe(F) {
5249
5263
  try {
5250
- F.type === "focus" && (xe(!0), g && g(F)), F.type === "blur" && (xe(!1), c && c(F));
5264
+ F.type === "focus" && (xe(!0), g && g(F)), F.type === "blur" && (xe(!1), p && p(F));
5251
5265
  } catch (q) {
5252
5266
  console.error(`Error executing focus/blur callback. ${q}`);
5253
5267
  }
5254
5268
  }
5255
5269
  function Ae(F) {
5256
- z(!1);
5270
+ V(!1);
5257
5271
  try {
5258
- p && p(s, F);
5272
+ c && c(s, F);
5259
5273
  } catch (q) {
5260
5274
  console.error(`Error when changing value using callback. ${q}`);
5261
5275
  }
5262
5276
  }
5263
5277
  function ae(F) {
5264
- F.key === "Escape" && z(!1), z(!$);
5278
+ F.key === "Escape" && V(!1), V(!$);
5265
5279
  try {
5266
5280
  f && f(F);
5267
5281
  } catch (q) {
@@ -5271,8 +5285,8 @@ const Ia = (e) => {
5271
5285
  function Ie(F) {
5272
5286
  const { value: q, checked: ze } = F.target;
5273
5287
  pe((N) => {
5274
- const V = ze ? [...N, q] : N.filter((K) => K !== q);
5275
- return p(s, V.join(",")), V;
5288
+ const H = ze ? [...N, q] : N.filter((K) => K !== q);
5289
+ return c(s, H.join(",")), H;
5276
5290
  });
5277
5291
  }
5278
5292
  ve(() => (document.addEventListener("click", ge), () => {
@@ -5280,7 +5294,7 @@ const Ia = (e) => {
5280
5294
  }), [ge]);
5281
5295
  const P = Gn(() => L || k ? b : [{ id: "empty-option", label: "", value: "" }, ...b], [b, L, k]);
5282
5296
  return /* @__PURE__ */ i(
5283
- Ra,
5297
+ Fa,
5284
5298
  {
5285
5299
  ref: J,
5286
5300
  disabled: n,
@@ -5305,7 +5319,7 @@ const Ia = (e) => {
5305
5319
  clearable: L,
5306
5320
  handleClear: $e,
5307
5321
  onBlur: fe,
5308
- onChange: p,
5322
+ onChange: c,
5309
5323
  onClick: De,
5310
5324
  onFocus: fe,
5311
5325
  onOptionClick: Ae,
@@ -5313,7 +5327,7 @@ const Ia = (e) => {
5313
5327
  onCheckboxChange: Ie
5314
5328
  }
5315
5329
  );
5316
- }, Ci = (e) => {
5330
+ }, Ti = (e) => {
5317
5331
  const {
5318
5332
  disabled: n = !1,
5319
5333
  fullwidth: t = !1,
@@ -5323,15 +5337,15 @@ const Ia = (e) => {
5323
5337
  maxItems: l = 5,
5324
5338
  message: d,
5325
5339
  name: s,
5326
- onChange: c,
5327
- options: p,
5340
+ onChange: p,
5341
+ options: c,
5328
5342
  placeholder: u,
5329
5343
  required: g = !1,
5330
5344
  size: f = "wide",
5331
5345
  values: b
5332
5346
  } = e;
5333
5347
  return /* @__PURE__ */ i(
5334
- Fa,
5348
+ La,
5335
5349
  {
5336
5350
  disabled: n,
5337
5351
  fullwidth: t,
@@ -5341,8 +5355,8 @@ const Ia = (e) => {
5341
5355
  maxItems: l,
5342
5356
  message: d,
5343
5357
  name: s,
5344
- onChange: c,
5345
- options: p,
5358
+ onChange: p,
5359
+ options: c,
5346
5360
  placeholder: u,
5347
5361
  required: g,
5348
5362
  size: f,
@@ -5350,18 +5364,18 @@ const Ia = (e) => {
5350
5364
  picker: !0
5351
5365
  }
5352
5366
  );
5353
- }, Ti = (e) => {
5354
- const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Oa(n), a = Pa(o), l = r ? "Que" : "Y que", d = a ? o : `${Ma(o)} ${o}`, s = ja(t);
5367
+ }, Si = (e) => {
5368
+ const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Ma(n), a = Oa(o), l = r ? "Que" : "Y que", d = a ? o : `${za(o)} ${o}`, s = Ba(t);
5355
5369
  return `${l} ${d} ${s}`;
5356
- }, La = /^(el|la|los|las)\s/i;
5357
- function Pa(e) {
5358
- return La.test(e);
5359
- }
5370
+ }, Pa = /^(el|la|los|las)\s/i;
5360
5371
  function Oa(e) {
5361
- return e.replace(/\s+/g, " ").trim();
5372
+ return Pa.test(e);
5362
5373
  }
5363
5374
  function Ma(e) {
5364
- const n = za(e).toLowerCase(), t = /\b(s|es)\b/.test(Va(e).toLowerCase()) && !n.endsWith("és");
5375
+ return e.replace(/\s+/g, " ").trim();
5376
+ }
5377
+ function za(e) {
5378
+ const n = Va(e).toLowerCase(), t = /\b(s|es)\b/.test(Ha(e).toLowerCase()) && !n.endsWith("és");
5365
5379
  return ({
5366
5380
  mano: "f",
5367
5381
  día: "m",
@@ -5373,21 +5387,21 @@ function Ma(e) {
5373
5387
  antigüedad: "f",
5374
5388
  antiguedad: "f",
5375
5389
  puntaje: "m"
5376
- }[n] ?? Ha(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
5390
+ }[n] ?? ja(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
5377
5391
  }
5378
- function za(e) {
5392
+ function Va(e) {
5379
5393
  return (e.toLowerCase().split(
5380
5394
  /\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
5381
5395
  )[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
5382
5396
  }
5383
- function Va(e) {
5397
+ function Ha(e) {
5384
5398
  const n = e.trim().split(/\s+/);
5385
5399
  return n[n.length - 1] || "";
5386
5400
  }
5387
- function Ha(e) {
5401
+ function ja(e) {
5388
5402
  return /(?:dad|tad|tud|umbre|ción|sión|ie|sis|itis)$/.test(e) || e.endsWith("ez") || e.endsWith("eza") ? "f" : /(?:aje|or|án|ambre)$/.test(e) ? "m" : e.endsWith("a") ? "f" : "m";
5389
5403
  }
5390
- function ja(e) {
5404
+ function Ba(e) {
5391
5405
  switch (e) {
5392
5406
  case A.EQUAL:
5393
5407
  case A.GREATER_THAN:
@@ -5402,21 +5416,21 @@ function ja(e) {
5402
5416
  return "sea";
5403
5417
  }
5404
5418
  }
5405
- const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
5419
+ const Ei = (e) => Object.values(e).flat(), Ni = (e, n) => Object.fromEntries(
5406
5420
  Object.entries(e).map(([t, r]) => [
5407
5421
  t,
5408
5422
  r.map((o, a, l) => n(o, a, l, t))
5409
5423
  ])
5410
- ), Fe = /* @__PURE__ */ new Map(), Ba = (e, n) => Fe.get(`${n}:${e}`), Ua = (e, n, t) => {
5424
+ ), Fe = /* @__PURE__ */ new Map(), Ua = (e, n) => Fe.get(`${n}:${e}`), _a = (e, n, t) => {
5411
5425
  const r = `${n}:${e}`;
5412
5426
  if (Fe.set(r, t), Fe.size > 1e3) {
5413
5427
  const o = Fe.keys().next().value;
5414
5428
  o !== void 0 && Fe.delete(o);
5415
5429
  }
5416
- }, Vn = /* @__PURE__ */ new Map(), _a = 1e3, qa = (e) => {
5430
+ }, Vn = /* @__PURE__ */ new Map(), qa = 1e3, Ga = (e) => {
5417
5431
  const n = Date.now(), t = Vn.get(e) || 0;
5418
- return n - t < _a ? !0 : (Vn.set(e, n), !1);
5419
- }, Ga = (e) => {
5432
+ return n - t < qa ? !0 : (Vn.set(e, n), !1);
5433
+ }, Ya = (e) => {
5420
5434
  const n = Ot(e);
5421
5435
  return {
5422
5436
  spa: "es",
@@ -5426,12 +5440,12 @@ const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
5426
5440
  ita: "it",
5427
5441
  por: "pt"
5428
5442
  }[n] || "en";
5429
- }, Ya = async (e, n, { url: t, apiKey: r }) => {
5430
- const o = `${n}:${e}`, a = Ba(e, n);
5443
+ }, Xa = async (e, n, { url: t, apiKey: r }) => {
5444
+ const o = `${n}:${e}`, a = Ua(e, n);
5431
5445
  if (a) return a;
5432
- if (qa(o))
5446
+ if (Ga(o))
5433
5447
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
5434
- const l = Ga(e);
5448
+ const l = Ya(e);
5435
5449
  try {
5436
5450
  const { data: d } = await Pt.post(
5437
5451
  t,
@@ -5447,15 +5461,15 @@ const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
5447
5461
  }
5448
5462
  }
5449
5463
  ), s = (d == null ? void 0 : d.translatedText) || e;
5450
- return Ua(e, n, s), s;
5464
+ return _a(e, n, s), s;
5451
5465
  } catch (d) {
5452
5466
  return console.warn(`[Translation] Failed for: "${e}"`, d), e;
5453
5467
  }
5454
- }, Xa = (e) => typeof e == "string" && e.trim().length > 0, Hn = async (e, n, t) => {
5468
+ }, Wa = (e) => typeof e == "string" && e.trim().length > 0, Hn = async (e, n, t) => {
5455
5469
  const r = await Promise.all(
5456
5470
  Object.entries(e).map(async ([o, a]) => {
5457
- if (Xa(a)) {
5458
- const l = await Ya(a, n, t);
5471
+ if (Wa(a)) {
5472
+ const l = await Xa(a, n, t);
5459
5473
  return [o, l];
5460
5474
  } else if (Array.isArray(a)) {
5461
5475
  const l = await Promise.all(
@@ -5474,37 +5488,37 @@ const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
5474
5488
  return Object.fromEntries(r);
5475
5489
  };
5476
5490
  export {
5477
- Di as BackAndNextButton,
5491
+ Ci as BackAndNextButton,
5478
5492
  yn as BusinessRuleCard,
5479
5493
  Kn as BusinessRuleCardNew,
5480
5494
  Wn as BusinessRuleView,
5481
5495
  Jn as BusinessRuleViewNew,
5482
- si as BusinessRules,
5483
- di as BusinessRulesNew,
5484
- Ci as Checkpicker,
5485
- xi as DragAndDropBoxes,
5496
+ di as BusinessRules,
5497
+ ci as BusinessRulesNew,
5498
+ Ti as Checkpicker,
5499
+ wi as DragAndDropBoxes,
5486
5500
  Mn as DraggableList,
5487
5501
  mo as DropdownMenu,
5488
- yi as DropdownMenuContainer,
5502
+ xi as DropdownMenuContainer,
5489
5503
  et as EValueHowToSetUp,
5490
- ci as Filter,
5491
- ui as FilterModal,
5492
- pi as FormFilter,
5504
+ ui as Filter,
5505
+ pi as FilterModal,
5506
+ gi as FormFilter,
5493
5507
  Qn as ModalRules,
5494
5508
  so as RulesForm,
5495
- wi as SendButton,
5496
- Ti as buildEsConditionSentence,
5509
+ Di as SendButton,
5510
+ Si as buildEsConditionSentence,
5497
5511
  Qr as convertRangeToString,
5498
5512
  Zn as filterByGroup,
5499
- Si as flatFromGroups,
5500
- gi as formatDecisionForBackend,
5513
+ Ei as flatFromGroups,
5514
+ fi as formatDecisionForBackend,
5501
5515
  qe as getConditionsByGroup,
5502
- Ei as mapByGroup,
5503
- fi as parseRangeFromString,
5504
- hi as revertSortedDataSampleSwitchPlaces,
5505
- mi as revertSortedDataSwitchPlaces,
5506
- bi as sortDisplayDataSampleSwitchPlaces,
5507
- vi as sortDisplayDataSwitchPlaces,
5516
+ Ni as mapByGroup,
5517
+ hi as parseRangeFromString,
5518
+ mi as revertSortedDataSampleSwitchPlaces,
5519
+ bi as revertSortedDataSwitchPlaces,
5520
+ vi as sortDisplayDataSampleSwitchPlaces,
5521
+ yi as sortDisplayDataSwitchPlaces,
5508
5522
  Hn as translateObject,
5509
- Ya as translateText
5523
+ Xa as translateText
5510
5524
  };