@isettingkit/business-rules 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,21 +1,22 @@
1
- import { jsx as o, jsxs as h, Fragment as k } from "react/jsx-runtime";
2
- import { MdOutlineDelete as Te, MdClear as xe, MdAdd as Y, MdExpandLess as Re, MdExpandMore as Oe, MdClose as Me, MdOutlineFilterAltOff as ve, MdOutlineFilterAlt as ye } from "react-icons/md";
3
- import { inube as v, Stack as g, Divider as R, Icon as L, Text as S, SkeletonLine as z, useMediaQuery as B, Blanket as we, Button as U, Grid as K, Box as Le, Tag as H, SkeletonIcon as Ue, OptionList as ze, Checkpicker as Ve, Toggle as Ce, Checkbox as je, Date as de } from "@inubekit/inubekit";
4
- import x, { keyframes as De, ThemeContext as Be } from "styled-components";
5
- import { ValueDataType as I, ValueHowToSetUp as V, DecisionConditionRender as ce } from "@isettingkit/input";
6
- import { DecisionViewConditionRenderer as X, DecisionViewConditionRendererNew as G } from "@isettingkit/view";
7
- import { createPortal as Se } from "react-dom";
8
- import _e, { useState as O, useRef as Q, useEffect as oe, useContext as He } from "react";
9
- import { useFormik as qe } from "formik";
10
- import { string as ie, mixed as Ne, object as W, number as ee, lazy as ue, date as pe } from "yup";
11
- import Pe from "axios";
12
- import { franc as Ge } from "franc-min";
13
- const Qe = x.div`
1
+ import { jsx as i, jsxs as g, Fragment as O } from "react/jsx-runtime";
2
+ import { MdOutlineDelete as Je, MdClear as Ye, MdAdd as pe, MdExpandLess as Et, MdExpandMore as Xe, MdClose as St, MdOutlineFilterAltOff as Ze, MdOutlineFilterAlt as et, MdChevronRight as Dt, MdArrowRight as kt } from "react-icons/md";
3
+ import { inube as C, Stack as b, Divider as L, Icon as M, Text as k, SkeletonLine as j, useMediaQuery as H, Blanket as tt, Button as P, Grid as he, Box as Rt, Tag as X, SkeletonIcon as At, OptionList as $t, Checkpicker as Ot, Toggle as nt, Checkbox as Ft, Date as Ue } from "@inubekit/inubekit";
4
+ import N, { keyframes as rt, ThemeContext as It } from "styled-components";
5
+ import { ValueDataType as U, ValueHowToSetUp as z, DecisionConditionRender as Ve } from "@isettingkit/input";
6
+ import { DecisionViewConditionRenderer as be, DecisionViewConditionRendererNew as ae } from "@isettingkit/view";
7
+ import { createPortal as at } from "react-dom";
8
+ import * as v from "react";
9
+ import oe, { useState as V, useRef as le, useEffect as ke, useContext as Lt } from "react";
10
+ import { useFormik as Mt } from "formik";
11
+ import { string as Re, mixed as it, object as se, number as we, lazy as _e, date as Pe } from "yup";
12
+ import Ut from "axios";
13
+ import { franc as Vt } from "franc-min";
14
+ const _t = N.div`
14
15
  border-radius: 8px;
15
16
  border: 1px solid
16
17
  ${({ theme: e }) => {
17
- var n, t;
18
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || v.palette.neutral.N30;
18
+ var t, n;
19
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
19
20
  }};
20
21
  box-sizing: border-box;
21
22
  display: flex;
@@ -26,7 +27,7 @@ const Qe = x.div`
26
27
  height: 100%;
27
28
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
28
29
  `;
29
- x.div`
30
+ N.div`
30
31
  width: 100%;
31
32
  height: 100%;
32
33
  overflow-y: auto;
@@ -45,51 +46,51 @@ x.div`
45
46
  border-radius: 8px;
46
47
  }
47
48
  `;
48
- const re = (e) => {
49
- const { children: n, controls: t = !0, handleDelete: a, id: i } = e;
50
- return /* @__PURE__ */ o(Qe, { children: /* @__PURE__ */ h(g, { direction: "column", gap: "16px", padding: "12px 16px", children: [
51
- n,
52
- t && /* @__PURE__ */ h(k, { children: [
53
- /* @__PURE__ */ o(R, {}),
54
- /* @__PURE__ */ o(g, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ o(
55
- L,
49
+ const Ae = (e) => {
50
+ const { children: t, controls: n = !0, handleDelete: r, id: a } = e;
51
+ return /* @__PURE__ */ i(_t, { children: /* @__PURE__ */ g(b, { direction: "column", gap: "16px", padding: "12px 16px", children: [
52
+ t,
53
+ n && /* @__PURE__ */ g(O, { children: [
54
+ /* @__PURE__ */ i(L, {}),
55
+ /* @__PURE__ */ i(b, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
56
+ M,
56
57
  {
57
58
  cursorHover: !0,
58
59
  appearance: "danger",
59
60
  size: "24px",
60
- icon: /* @__PURE__ */ o(Te, {}),
61
+ icon: /* @__PURE__ */ i(Je, {}),
61
62
  onClick: () => {
62
- a(i);
63
+ r(a);
63
64
  }
64
65
  }
65
66
  ) })
66
67
  ] })
67
68
  ] }) });
68
- }, We = (e) => e.value, Ye = (e) => e.value, Ke = (e) => e.value, Je = (e) => ({
69
+ }, Pt = (e) => e.value, Bt = (e) => e.value, jt = (e) => e.value, zt = (e) => ({
69
70
  from: e.from ?? "",
70
71
  to: e.to ?? ""
71
- }), Xe = (e) => e.value, Ze = (e) => e.value, en = (e) => e.value;
72
- var D = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(D || {});
73
- const nn = {
74
- [D.LIST_OF_VALUES]: Ye,
75
- [D.LIST_OF_VALUES_MULTI]: Ke,
76
- [D.RANGE]: Je,
77
- [D.GREATER_THAN]: Xe,
78
- [D.LESS_THAN]: Ze,
79
- [D.EQUAL]: en
80
- }, q = (e) => {
81
- const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), a = nn[e == null ? void 0 : e.howToSetTheDecision] || We;
82
- return t && a(n) || n || void 0;
83
- }, he = x.div`
72
+ }), Ht = (e) => e.value, qt = (e) => e.value, Wt = (e) => e.value;
73
+ var A = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(A || {});
74
+ const Gt = {
75
+ [A.LIST_OF_VALUES]: Bt,
76
+ [A.LIST_OF_VALUES_MULTI]: jt,
77
+ [A.RANGE]: zt,
78
+ [A.GREATER_THAN]: Ht,
79
+ [A.LESS_THAN]: qt,
80
+ [A.EQUAL]: Wt
81
+ }, Z = (e) => {
82
+ const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = Gt[e == null ? void 0 : e.howToSetTheDecision] || Pt;
83
+ return n && r(t) || t || void 0;
84
+ }, Be = N.div`
84
85
  & > div {
85
86
  border-radius: 8px;
86
87
  border: 1px solid
87
88
  ${({ theme: e }) => {
88
- var n, t;
89
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || v.palette.neutral.N30;
89
+ var t, n;
90
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
90
91
  }};
91
92
  }
92
- `, ge = x.div`
93
+ `, je = N.div`
93
94
  width: 100%;
94
95
  height: 100%;
95
96
  overflow-y: auto;
@@ -107,40 +108,40 @@ const nn = {
107
108
  background-color: #ebecf0;
108
109
  border-radius: 8px;
109
110
  }
110
- `, tn = (e) => {
111
+ `, Kt = (e) => {
111
112
  const {
112
- conditionsAlignment: n,
113
- decision: t,
114
- decisionDateElement: a,
115
- decisionMapper: i,
116
- loading: r,
117
- skeleton: p,
113
+ conditionsAlignment: t,
114
+ decision: n,
115
+ decisionDateElement: r,
116
+ decisionMapper: a,
117
+ loading: o,
118
+ skeleton: c,
118
119
  terms: l,
119
120
  textValues: s,
120
- visibleConditions: c
121
+ visibleConditions: d
121
122
  } = e;
122
- return r ? /* @__PURE__ */ h(g, { direction: "column", gap: "12px", children: [
123
- /* @__PURE__ */ o(g, { direction: "column", alignItems: "center", children: /* @__PURE__ */ o(
124
- X,
123
+ return o ? /* @__PURE__ */ g(b, { direction: "column", gap: "12px", children: [
124
+ /* @__PURE__ */ i(b, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
125
+ be,
125
126
  {
126
- element: i,
127
- valueData: q(
128
- i
127
+ element: a,
128
+ valueData: Z(
129
+ a
129
130
  ),
130
131
  type: "decision"
131
132
  }
132
- ) }, t.ruleName),
133
- /* @__PURE__ */ o(R, { dashed: !0 }),
134
- /* @__PURE__ */ o(ge, { children: /* @__PURE__ */ h(
135
- g,
133
+ ) }, n.ruleName),
134
+ /* @__PURE__ */ i(L, { dashed: !0 }),
135
+ /* @__PURE__ */ i(je, { children: /* @__PURE__ */ g(
136
+ b,
136
137
  {
137
138
  direction: "column",
138
139
  gap: "12px",
139
- justifyContent: n,
140
+ justifyContent: t,
140
141
  height: "203px",
141
142
  children: [
142
- /* @__PURE__ */ o(
143
- S,
143
+ /* @__PURE__ */ i(
144
+ k,
144
145
  {
145
146
  type: "label",
146
147
  size: "large",
@@ -150,22 +151,22 @@ const nn = {
150
151
  children: s.factsThatConditionIt
151
152
  }
152
153
  ),
153
- c.map((u) => /* @__PURE__ */ o(he, { children: /* @__PURE__ */ o(g, { direction: "column", padding: "8px", children: /* @__PURE__ */ o(
154
- X,
154
+ d.map((p) => /* @__PURE__ */ i(Be, { children: /* @__PURE__ */ i(b, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
155
+ be,
155
156
  {
156
- element: { ...u, value: u.value },
157
- valueData: q(
158
- u
157
+ element: { ...p, value: p.value },
158
+ valueData: Z(
159
+ p
159
160
  )
160
161
  }
161
- ) }) }, u.conditionName)),
162
- l && /* @__PURE__ */ h(k, { children: [
163
- /* @__PURE__ */ o(R, { dashed: !0 }),
164
- a && /* @__PURE__ */ o(
165
- X,
162
+ ) }) }, p.conditionName)),
163
+ l && /* @__PURE__ */ g(O, { children: [
164
+ /* @__PURE__ */ i(L, { dashed: !0 }),
165
+ r && /* @__PURE__ */ i(
166
+ be,
166
167
  {
167
- element: a.element,
168
- valueData: a.valueData,
168
+ element: r.element,
169
+ valueData: r.valueData,
169
170
  type: "decision"
170
171
  },
171
172
  s.terms
@@ -174,100 +175,100 @@ const nn = {
174
175
  ]
175
176
  }
176
177
  ) })
177
- ] }) : /* @__PURE__ */ h(g, { direction: "column", gap: "12px", children: [
178
- /* @__PURE__ */ h(g, { direction: "column", alignItems: "center", gap: "4px", children: [
179
- /* @__PURE__ */ o(z, { animated: !0, width: "180px" }),
180
- /* @__PURE__ */ o(z, { animated: !0, width: "85px" })
178
+ ] }) : /* @__PURE__ */ g(b, { direction: "column", gap: "12px", children: [
179
+ /* @__PURE__ */ g(b, { direction: "column", alignItems: "center", gap: "4px", children: [
180
+ /* @__PURE__ */ i(j, { animated: !0, width: "180px" }),
181
+ /* @__PURE__ */ i(j, { animated: !0, width: "85px" })
181
182
  ] }, "loading"),
182
- /* @__PURE__ */ h(g, { direction: "column", gap: "12px", alignItems: "center", children: [
183
- /* @__PURE__ */ o(R, { dashed: !0 }),
184
- /* @__PURE__ */ o(z, { animated: !0, width: "150px" })
183
+ /* @__PURE__ */ g(b, { direction: "column", gap: "12px", alignItems: "center", children: [
184
+ /* @__PURE__ */ i(L, { dashed: !0 }),
185
+ /* @__PURE__ */ i(j, { animated: !0, width: "150px" })
185
186
  ] }),
186
- /* @__PURE__ */ o(ge, { children: /* @__PURE__ */ o(
187
- g,
187
+ /* @__PURE__ */ i(je, { children: /* @__PURE__ */ i(
188
+ b,
188
189
  {
189
190
  direction: "column",
190
191
  gap: "12px",
191
192
  justifyContent: "space-between",
192
193
  height: "203px",
193
- children: p.map((u, d) => /* @__PURE__ */ o(he, { children: /* @__PURE__ */ h(
194
- g,
194
+ children: c.map((p, u) => /* @__PURE__ */ i(Be, { children: /* @__PURE__ */ g(
195
+ b,
195
196
  {
196
197
  direction: "column",
197
198
  gap: "12px",
198
199
  alignItems: "start",
199
200
  padding: "8px",
200
201
  children: [
201
- /* @__PURE__ */ o(z, { animated: !0, width: "180px" }),
202
- /* @__PURE__ */ o(z, { animated: !0, width: "85px" })
202
+ /* @__PURE__ */ i(j, { animated: !0, width: "180px" }),
203
+ /* @__PURE__ */ i(j, { animated: !0, width: "85px" })
203
204
  ]
204
205
  }
205
- ) }, `condition-${d}`))
206
+ ) }, `condition-${u}`))
206
207
  }
207
208
  ) })
208
209
  ] });
209
- }, Ee = (e) => {
210
- var b;
211
- const { decision: n, loading: t = !1, textValues: a } = e, i = !!(n != null && n.effectiveFrom), r = !!(n != null && n.validUntil), p = i && r ? {
210
+ }, ot = (e) => {
211
+ var h;
212
+ const { decision: t, loading: n = !1, textValues: r } = e, a = !!(t != null && t.effectiveFrom), o = !!(t != null && t.validUntil), c = a && o ? {
212
213
  element: {
213
- labelName: a == null ? void 0 : a.terms,
214
- value: String(n.effectiveFrom),
215
- howToSetTheDecision: V.RANGE,
216
- decisionDataType: I.DATE
214
+ labelName: r == null ? void 0 : r.terms,
215
+ value: String(t.effectiveFrom),
216
+ howToSetTheDecision: z.RANGE,
217
+ decisionDataType: U.DATE
217
218
  },
218
- valueData: q({
219
- labelName: a == null ? void 0 : a.terms,
219
+ valueData: Z({
220
+ labelName: r == null ? void 0 : r.terms,
220
221
  value: {
221
- from: String(n.effectiveFrom),
222
- to: String(n.validUntil)
222
+ from: String(t.effectiveFrom),
223
+ to: String(t.validUntil)
223
224
  },
224
- howToSetTheDecision: V.RANGE,
225
- decisionDataType: I.DATE
225
+ howToSetTheDecision: z.RANGE,
226
+ decisionDataType: U.DATE
226
227
  })
227
- } : i && !r ? {
228
+ } : a && !o ? {
228
229
  element: {
229
- labelName: a == null ? void 0 : a.terms,
230
- value: String(n.effectiveFrom),
231
- howToSetTheDecision: V.EQUAL,
232
- decisionDataType: I.DATE
230
+ labelName: r == null ? void 0 : r.terms,
231
+ value: String(t.effectiveFrom),
232
+ howToSetTheDecision: z.EQUAL,
233
+ decisionDataType: U.DATE
233
234
  },
234
- valueData: q({
235
- labelName: a == null ? void 0 : a.terms,
236
- value: String(n.effectiveFrom),
237
- howToSetTheDecision: V.EQUAL,
238
- decisionDataType: I.DATE
235
+ valueData: Z({
236
+ labelName: r == null ? void 0 : r.terms,
237
+ value: String(t.effectiveFrom),
238
+ howToSetTheDecision: z.EQUAL,
239
+ decisionDataType: U.DATE
239
240
  })
240
- } : null, l = n ? {
241
- labelName: n.labelName || "",
242
- decisionDataType: n.decisionDataType || "alphabetical",
243
- value: q(n),
244
- howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
245
- } : null, s = ((b = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : b.filter(
241
+ } : null, l = t ? {
242
+ labelName: t.labelName || "",
243
+ decisionDataType: t.decisionDataType || "alphabetical",
244
+ value: Z(t),
245
+ howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
246
+ } : null, s = ((h = t == null ? void 0 : t.conditionsThatEstablishesTheDecision) == null ? void 0 : h.filter(
246
247
  (m) => !m.hidden
247
- )) || [], c = Array.from({ length: 5 }), u = !!(!t && n && a && l), d = s.length < 2 ? "start" : "space-between";
248
- return /* @__PURE__ */ o(
249
- tn,
248
+ )) || [], d = Array.from({ length: 5 }), p = !!(!n && t && r && l), u = s.length < 2 ? "start" : "space-between";
249
+ return /* @__PURE__ */ i(
250
+ Kt,
250
251
  {
251
- conditionsAlignment: d,
252
- decision: n,
253
- decisionDateElement: p,
252
+ conditionsAlignment: u,
253
+ decision: t,
254
+ decisionDateElement: c,
254
255
  decisionMapper: l,
255
- loading: u,
256
- skeleton: c,
257
- terms: !!(a != null && a.terms),
258
- textValues: a,
256
+ loading: p,
257
+ skeleton: d,
258
+ terms: !!(r != null && r.terms),
259
+ textValues: r,
259
260
  visibleConditions: s
260
261
  }
261
262
  );
262
- }, an = x.div`
263
+ }, Qt = N.div`
263
264
  position: relative;
264
265
  & > div {
265
266
  padding: 24px 16px;
266
267
  }
267
- `, on = x.div`
268
+ `, Jt = N.div`
268
269
  background-color: ${({ theme: e }) => {
269
- var n, t;
270
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || v.palette.neutral.N0;
270
+ var t, n;
271
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || C.palette.neutral.N0;
271
272
  }};
272
273
  max-width: 450px;
273
274
  max-height: 90vh;
@@ -295,24 +296,24 @@ const nn = {
295
296
  background-color: #ebecf0;
296
297
  border-radius: 8px;
297
298
  }
298
- `, ke = (e) => {
299
- const { children: n, portalId: t, onCloseModal: a, title: i } = e, r = document.getElementById(t);
300
- if (!r)
299
+ `, lt = (e) => {
300
+ const { children: t, portalId: n, onCloseModal: r, title: a } = e, o = document.getElementById(n);
301
+ if (!o)
301
302
  throw new Error(
302
303
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
303
304
  );
304
- const p = B("(max-width: 400px)");
305
- return Se(
306
- /* @__PURE__ */ o(an, { smallScreen: p, children: /* @__PURE__ */ o(we, { children: /* @__PURE__ */ o(on, { children: /* @__PURE__ */ h(g, { direction: "column", gap: "24px", children: [
307
- /* @__PURE__ */ o(g, { direction: "column", gap: "24px", children: /* @__PURE__ */ h(g, { alignItems: "center", justifyContent: "space-between", children: [
308
- /* @__PURE__ */ o(S, { type: "title", size: "large", appearance: "dark", weight: "bold", children: i }),
309
- /* @__PURE__ */ o(xe, { size: "24px", cursor: "pointer", onClick: a })
305
+ const c = H("(max-width: 400px)");
306
+ return at(
307
+ /* @__PURE__ */ i(Qt, { smallScreen: c, children: /* @__PURE__ */ i(tt, { children: /* @__PURE__ */ i(Jt, { children: /* @__PURE__ */ g(b, { direction: "column", gap: "24px", children: [
308
+ /* @__PURE__ */ i(b, { direction: "column", gap: "24px", children: /* @__PURE__ */ g(b, { alignItems: "center", justifyContent: "space-between", children: [
309
+ /* @__PURE__ */ i(k, { type: "title", size: "large", appearance: "dark", weight: "bold", children: a }),
310
+ /* @__PURE__ */ i(Ye, { size: "24px", cursor: "pointer", onClick: r })
310
311
  ] }) }),
311
- n
312
+ t
312
313
  ] }) }) }) }),
313
- r
314
+ o
314
315
  );
315
- }, rn = De`
316
+ }, Yt = rt`
316
317
  from {
317
318
  opacity: 0;
318
319
  transform: translateY(20px);
@@ -322,12 +323,12 @@ const nn = {
322
323
  transform: translateY(0);
323
324
  }
324
325
  `;
325
- x.div`
326
+ N.div`
326
327
  border-radius: 8px;
327
328
  border: 1px solid
328
329
  ${({ theme: e }) => {
329
- var n, t;
330
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || v.palette.neutral.N30;
330
+ var t, n;
331
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
331
332
  }};
332
333
  box-sizing: border-box;
333
334
  display: flex;
@@ -336,37 +337,37 @@ x.div`
336
337
  height: 100%;
337
338
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
338
339
  `;
339
- x.div`
340
+ N.div`
340
341
  & > div {
341
342
  border-radius: 8px;
342
343
  border: 1px solid
343
344
  ${({ theme: e }) => {
344
- var n, t;
345
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || v.palette.neutral.N30;
345
+ var t, n;
346
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
346
347
  }};
347
348
  }
348
349
  `;
349
- const Ae = x.div`
350
+ const st = N.div`
350
351
  & > div {
351
352
  box-shadow: 0px 2px 3px 0px
352
353
  ${({ theme: e }) => {
353
- var n, t;
354
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutralAlpha) == null ? void 0 : t.N700A) || v.palette.neutralAlpha.N30A;
354
+ var t, n;
355
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutralAlpha) == null ? void 0 : n.N700A) || C.palette.neutralAlpha.N30A;
355
356
  }};
356
357
  cursor: pointer;
357
358
  }
358
- `, J = x.div`
359
+ `, ge = N.div`
359
360
  width: 100%;
360
361
  height: 100%;
361
362
  & > div {
362
- animation: ${rn} 600ms ease-out;
363
+ animation: ${Yt} 600ms ease-out;
363
364
  }
364
- `, ln = x.div`
365
+ `, Xt = N.div`
365
366
  & > div > div {
366
367
  border-radius: 8px;
367
368
  box-sizing: border-box;
368
369
  }
369
- `, sn = x.div`
370
+ `, Zt = N.div`
370
371
  & > div {
371
372
  width: 100%;
372
373
  height: 100%;
@@ -386,145 +387,145 @@ const Ae = x.div`
386
387
  border-radius: 8px;
387
388
  }
388
389
  }
389
- `, dn = (e) => {
390
- const { index: n, handleOpenModal: t } = e;
391
- return /* @__PURE__ */ o(
392
- re,
390
+ `, en = (e) => {
391
+ const { index: t, handleOpenModal: n } = e;
392
+ return /* @__PURE__ */ i(
393
+ Ae,
393
394
  {
394
- id: `loading-card-${n}`,
395
+ id: `loading-card-${t}`,
395
396
  handleDelete: () => {
396
397
  },
397
- handleView: () => t ? t() : null,
398
+ handleView: () => n ? n() : null,
398
399
  controls: !1,
399
- children: /* @__PURE__ */ o(Ee, { loading: !0 })
400
+ children: /* @__PURE__ */ i(ot, { loading: !0 })
400
401
  },
401
- `loading-card-${n}`
402
+ `loading-card-${t}`
402
403
  );
403
- }, cn = (e) => {
404
- const { decision: n, controls: t, handleOpenModal: a, handleDelete: i, textValues: r } = e;
405
- return n ? /* @__PURE__ */ o(J, { children: /* @__PURE__ */ h(g, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
406
- /* @__PURE__ */ o(S, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
407
- /* @__PURE__ */ o(
408
- re,
404
+ }, tn = (e) => {
405
+ const { decision: t, controls: n, handleOpenModal: r, handleDelete: a, textValues: o } = e;
406
+ return t ? /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ g(b, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
407
+ /* @__PURE__ */ i(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
408
+ /* @__PURE__ */ i(
409
+ Ae,
409
410
  {
410
- id: n.decisionId,
411
- handleDelete: () => i ? i(n.decisionId) : null,
412
- handleView: () => a ? a(n) : null,
413
- controls: t,
414
- children: /* @__PURE__ */ o(Ee, { decision: n, textValues: r })
411
+ id: t.decisionId,
412
+ handleDelete: () => a ? a(t.decisionId) : null,
413
+ handleView: () => r ? r(t) : null,
414
+ controls: n,
415
+ children: /* @__PURE__ */ i(ot, { decision: t, textValues: o })
415
416
  }
416
417
  )
417
- ] }) }, n.decisionId) : null;
418
- }, un = (e) => {
418
+ ] }) }, t.decisionId) : null;
419
+ }, nn = (e) => {
419
420
  const {
420
- customTitleContentAddCard: n,
421
- index: t,
422
- handleOpenModal: a,
423
- shouldRenderEmptyMessage: i
424
- } = e, r = n || "Agregar decisión";
425
- return /* @__PURE__ */ o(J, { children: i ? null : /* @__PURE__ */ h(g, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
426
- /* @__PURE__ */ o(S, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
427
- /* @__PURE__ */ o(
428
- Ae,
421
+ customTitleContentAddCard: t,
422
+ index: n,
423
+ handleOpenModal: r,
424
+ shouldRenderEmptyMessage: a
425
+ } = e, o = t || "Agregar decisión";
426
+ return /* @__PURE__ */ i(ge, { children: a ? null : /* @__PURE__ */ g(b, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
427
+ /* @__PURE__ */ i(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
428
+ /* @__PURE__ */ i(
429
+ st,
429
430
  {
430
- onClick: () => a ? a() : null,
431
- children: /* @__PURE__ */ o(
432
- re,
431
+ onClick: () => r ? r() : null,
432
+ children: /* @__PURE__ */ i(
433
+ Ae,
433
434
  {
434
- id: `add-decision-${t}`,
435
+ id: `add-decision-${n}`,
435
436
  handleDelete: () => {
436
437
  },
437
- handleView: () => a ? a() : null,
438
+ handleView: () => r ? r() : null,
438
439
  controls: !1,
439
- children: /* @__PURE__ */ h(g, { direction: "column", gap: "12px", alignItems: "center", children: [
440
- /* @__PURE__ */ o(L, { appearance: "gray", icon: /* @__PURE__ */ o(Y, {}), size: "35px" }),
441
- /* @__PURE__ */ o(S, { appearance: "gray", type: "body", size: "large", children: r })
440
+ children: /* @__PURE__ */ g(b, { direction: "column", gap: "12px", alignItems: "center", children: [
441
+ /* @__PURE__ */ i(M, { appearance: "gray", icon: /* @__PURE__ */ i(pe, {}), size: "35px" }),
442
+ /* @__PURE__ */ i(k, { appearance: "gray", type: "body", size: "large", children: o })
442
443
  ] })
443
444
  }
444
445
  )
445
446
  }
446
447
  )
447
- ] }) }, `add-decision-${t}`);
448
- }, pn = {
449
- loading: dn,
450
- decision: cn,
451
- add: un
452
- }, ne = (e) => {
453
- const { type: n } = e, t = pn[n];
454
- return t ? t(e) : null;
455
- }, hn = (e) => {
448
+ ] }) }, `add-decision-${n}`);
449
+ }, rn = {
450
+ loading: en,
451
+ decision: tn,
452
+ add: nn
453
+ }, Te = (e) => {
454
+ const { type: t } = e, n = rn[t];
455
+ return n ? n(e) : null;
456
+ }, an = (e) => {
456
457
  const {
457
- controls: n,
458
- customTitleContentAddCard: t,
459
- decisions: a,
460
- loading: i,
461
- handleOpenModal: r,
462
- handleDelete: p,
458
+ controls: t,
459
+ customTitleContentAddCard: n,
460
+ decisions: r,
461
+ loading: a,
462
+ handleOpenModal: o,
463
+ handleDelete: c,
463
464
  textValues: l
464
- } = e, s = i ? Array.from({ length: 3 }).map(
465
- (u, d) => ne({
465
+ } = e, s = a ? Array.from({ length: 3 }).map(
466
+ (p, u) => Te({
466
467
  type: "loading",
467
- index: d,
468
- controls: n,
469
- customTitleContentAddCard: t,
470
- loading: i,
471
- handleOpenModal: r,
472
- handleDelete: p,
468
+ index: u,
469
+ controls: t,
470
+ customTitleContentAddCard: n,
471
+ loading: a,
472
+ handleOpenModal: o,
473
+ handleDelete: c,
473
474
  textValues: l
474
475
  })
475
- ) : a == null ? void 0 : a.map(
476
- (u) => ne({
476
+ ) : r == null ? void 0 : r.map(
477
+ (p) => Te({
477
478
  type: "decision",
478
- decision: u,
479
- controls: n,
480
- customTitleContentAddCard: t,
481
- loading: i,
482
- handleOpenModal: r,
483
- handleDelete: p,
479
+ decision: p,
480
+ controls: t,
481
+ customTitleContentAddCard: n,
482
+ loading: a,
483
+ handleOpenModal: o,
484
+ handleDelete: c,
484
485
  textValues: l
485
486
  })
486
- ), c = ((a == null ? void 0 : a.length) === 0 || a.length < Math.floor(window.innerWidth / 300)) && !i && n;
487
- return { renderedCards: s, shouldRenderAddCard: c };
488
- }, xt = (e) => {
487
+ ), d = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !a && t;
488
+ return { renderedCards: s, shouldRenderAddCard: d };
489
+ }, na = (e) => {
489
490
  const {
490
- controls: n = !0,
491
- customTitleContentAddCard: t,
492
- customMessageEmptyDecisions: a,
493
- decisions: i,
494
- textValues: r,
495
- decisionTemplate: p,
491
+ controls: t = !0,
492
+ customTitleContentAddCard: n,
493
+ customMessageEmptyDecisions: r,
494
+ decisions: a,
495
+ textValues: o,
496
+ decisionTemplate: c,
496
497
  isModalOpen: l,
497
498
  selectedDecision: s,
498
- loading: c,
499
- handleOpenModal: u,
500
- handleCloseModal: d,
501
- handleSubmitForm: b,
499
+ loading: d,
500
+ handleOpenModal: p,
501
+ handleCloseModal: u,
502
+ handleSubmitForm: h,
502
503
  handleDelete: m,
503
504
  terms: f = !0
504
- } = e, y = B("(max-width: 681px)"), C = B("(max-width: 400px)"), { renderedCards: w, shouldRenderAddCard: E } = hn({
505
- controls: n,
506
- customTitleContentAddCard: t,
507
- decisions: i,
508
- loading: c,
509
- handleOpenModal: u,
505
+ } = e, w = H("(max-width: 681px)"), D = H("(max-width: 400px)"), { renderedCards: E, shouldRenderAddCard: x } = an({
506
+ controls: t,
507
+ customTitleContentAddCard: n,
508
+ decisions: a,
509
+ loading: d,
510
+ handleOpenModal: p,
510
511
  handleDelete: m,
511
- textValues: r
512
- }), $ = (i == null ? void 0 : i.length) === 0 && !c;
513
- return /* @__PURE__ */ h(k, { children: [
514
- /* @__PURE__ */ o(ln, { children: /* @__PURE__ */ o(sn, { children: /* @__PURE__ */ o(g, { direction: "column", gap: "16px", padding: "6px", children: $ ? /* @__PURE__ */ h(
515
- g,
512
+ textValues: o
513
+ }), S = (a == null ? void 0 : a.length) === 0 && !d;
514
+ return /* @__PURE__ */ g(O, { children: [
515
+ /* @__PURE__ */ i(Xt, { children: /* @__PURE__ */ i(Zt, { children: /* @__PURE__ */ i(b, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ g(
516
+ b,
516
517
  {
517
518
  direction: "column",
518
519
  gap: "28px",
519
520
  width: "100%",
520
- height: y ? "auto" : "435px",
521
+ height: w ? "auto" : "435px",
521
522
  justifyContent: "center",
522
523
  alignItems: "center",
523
524
  children: [
524
- /* @__PURE__ */ o(S, { as: "span", type: "label", size: "large", appearance: "gray", children: a || /* @__PURE__ */ h(k, { children: [
525
+ /* @__PURE__ */ i(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ g(O, { children: [
525
526
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
526
- /* @__PURE__ */ h(
527
- S,
527
+ /* @__PURE__ */ g(
528
+ k,
528
529
  {
529
530
  as: "span",
530
531
  type: "label",
@@ -533,27 +534,27 @@ const Ae = x.div`
533
534
  weight: "bold",
534
535
  children: [
535
536
  "“",
536
- t || "+ Agregar decisión",
537
+ n || "+ Agregar decisión",
537
538
  "”"
538
539
  ]
539
540
  }
540
541
  ),
541
542
  "para empezar."
542
543
  ] }) }),
543
- /* @__PURE__ */ o(
544
- U,
544
+ /* @__PURE__ */ i(
545
+ P,
545
546
  {
546
- iconBefore: /* @__PURE__ */ o(Y, {}),
547
- onClick: () => u ? u() : null,
548
- children: t || "Agregar decisión"
547
+ iconBefore: /* @__PURE__ */ i(pe, {}),
548
+ onClick: () => p ? p() : null,
549
+ children: n || "Agregar decisión"
549
550
  }
550
551
  )
551
552
  ]
552
553
  }
553
- ) : /* @__PURE__ */ h(
554
- K,
554
+ ) : /* @__PURE__ */ g(
555
+ he,
555
556
  {
556
- templateColumns: C ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
557
+ templateColumns: D ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
557
558
  autoFlow: "row dense",
558
559
  gap: "24px",
559
560
  alignItems: "start",
@@ -561,77 +562,77 @@ const Ae = x.div`
561
562
  autoRows: "1fr",
562
563
  justifyItems: "center",
563
564
  padding: "6px",
564
- height: y ? "auto" : "484px",
565
+ height: w ? "auto" : "484px",
565
566
  children: [
566
- w,
567
- E && ne({
567
+ E,
568
+ x && Te({
568
569
  type: "add",
569
- index: i == null ? void 0 : i.length,
570
- controls: n,
571
- customTitleContentAddCard: t,
572
- customMessageEmptyDecisions: a,
573
- loading: c,
574
- handleOpenModal: u,
570
+ index: a == null ? void 0 : a.length,
571
+ controls: t,
572
+ customTitleContentAddCard: n,
573
+ customMessageEmptyDecisions: r,
574
+ loading: d,
575
+ handleOpenModal: p,
575
576
  handleDelete: m,
576
- textValues: r,
577
- shouldRenderEmptyMessage: $,
577
+ textValues: o,
578
+ shouldRenderEmptyMessage: S,
578
579
  terms: f
579
580
  })
580
581
  ]
581
582
  }
582
583
  ) }) }) }),
583
- l && /* @__PURE__ */ o(
584
- ke,
584
+ l && /* @__PURE__ */ i(
585
+ lt,
585
586
  {
586
587
  portalId: "modal-portal",
587
- onCloseModal: d,
588
+ onCloseModal: u,
588
589
  title: s ? "Editar Decisión" : "Nueva decisión",
589
- children: /* @__PURE__ */ o(
590
- Ie,
590
+ children: /* @__PURE__ */ i(
591
+ ut,
591
592
  {
592
- decision: s || p,
593
- onSubmitEvent: b,
594
- textValues: r,
595
- onCancel: () => d ? d() : () => {
593
+ decision: s || c,
594
+ onSubmitEvent: h,
595
+ textValues: o,
596
+ onCancel: () => u ? u() : () => {
596
597
  }
597
598
  }
598
599
  )
599
600
  }
600
601
  )
601
602
  ] });
602
- }, $e = (e) => {
603
- const { children: n, controls: t = !0, handleDelete: a, id: i } = e;
604
- return /* @__PURE__ */ h(Le, { width: "100%", children: [
605
- n,
606
- t && /* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(g, { gap: "16px", justifyContent: "end", margin: "16px 0 0 0", children: /* @__PURE__ */ o(
607
- U,
603
+ }, ct = (e) => {
604
+ const { children: t, controls: n = !0, handleDelete: r, id: a } = e;
605
+ return /* @__PURE__ */ g(Rt, { width: "100%", children: [
606
+ t,
607
+ n && /* @__PURE__ */ i(O, { children: /* @__PURE__ */ i(b, { gap: "16px", justifyContent: "end", margin: "16px 0 0 0", children: /* @__PURE__ */ i(
608
+ P,
608
609
  {
609
610
  cursorHover: !0,
610
611
  appearance: "danger",
611
612
  spacing: "compact",
612
613
  variant: "outlined",
613
- iconBefore: /* @__PURE__ */ o(Te, {}),
614
+ iconBefore: /* @__PURE__ */ i(Je, {}),
614
615
  onClick: () => {
615
- a(i);
616
+ r(a);
616
617
  },
617
618
  children: "Eliminar"
618
619
  }
619
620
  ) }) })
620
621
  ] });
621
- }, gn = (e) => e.value, mn = (e) => e.value, bn = (e) => e.value, fn = (e) => ({
622
+ }, on = (e) => e.value, ln = (e) => e.value, sn = (e) => e.value, cn = (e) => ({
622
623
  from: e.from ?? "",
623
624
  to: e.to ?? ""
624
- }), Tn = (e) => e.value, xn = (e) => e.value, vn = (e) => e.value, yn = {
625
- [D.LIST_OF_VALUES]: mn,
626
- [D.LIST_OF_VALUES_MULTI]: bn,
627
- [D.RANGE]: fn,
628
- [D.GREATER_THAN]: Tn,
629
- [D.LESS_THAN]: xn,
630
- [D.EQUAL]: vn
631
- }, P = (e) => {
632
- const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), a = yn[e == null ? void 0 : e.howToSetTheDecision] || gn;
633
- return t && a(n) || n || void 0;
634
- }, wn = x.div`
625
+ }), dn = (e) => e.value, un = (e) => e.value, pn = (e) => e.value, hn = {
626
+ [A.LIST_OF_VALUES]: ln,
627
+ [A.LIST_OF_VALUES_MULTI]: sn,
628
+ [A.RANGE]: cn,
629
+ [A.GREATER_THAN]: dn,
630
+ [A.LESS_THAN]: un,
631
+ [A.EQUAL]: pn
632
+ }, ee = (e) => {
633
+ const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = hn[e == null ? void 0 : e.howToSetTheDecision] || on;
634
+ return n && r(t) || t || void 0;
635
+ }, gn = N.div`
635
636
  display: flex;
636
637
  justify-content: ${({ $justifyContent: e }) => e};
637
638
  align-items: ${({ $alignItems: e }) => e};
@@ -643,103 +644,103 @@ const Ae = x.div`
643
644
  gap: ${({ $gap: e }) => e};
644
645
  margin: ${({ $margin: e }) => e};
645
646
  padding: ${({ $padding: e }) => e};
646
- background: ${({ $background: e, theme: n }) => {
647
- var t, a, i, r;
648
- return e ? `${((a = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : a.N10) || v.palette.neutral.N10}` : `${((r = (i = n == null ? void 0 : n.palette) == null ? void 0 : i.neutral) == null ? void 0 : r.N0) || v.palette.neutral.N0}`;
647
+ background: ${({ $background: e, theme: t }) => {
648
+ var n, r, a, o;
649
+ return e ? `${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N10) || C.palette.neutral.N10}` : `${((o = (a = t == null ? void 0 : t.palette) == null ? void 0 : a.neutral) == null ? void 0 : o.N0) || C.palette.neutral.N0}`;
649
650
  }};
650
- border: ${({ $border: e, theme: n }) => {
651
- var t, a;
652
- return e ? `1px solid ${((a = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : a.N40) || v.palette.neutral.N40}` : "none";
651
+ border: ${({ $border: e, theme: t }) => {
652
+ var n, r;
653
+ return e ? `1px solid ${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N40) || C.palette.neutral.N40}` : "none";
653
654
  }};
654
655
  border-radius: ${({ $borderRadius: e }) => e};
655
656
  box-sizing: ${({ $boxSizing: e }) => e};
656
657
  overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
657
- `, j = _e.forwardRef(
658
- (e, n) => {
658
+ `, _ = oe.forwardRef(
659
+ (e, t) => {
659
660
  const {
660
- children: t,
661
- wrap: a,
662
- direction: i = "column",
663
- justifyContent: r,
664
- alignItems: p,
661
+ children: n,
662
+ wrap: r,
663
+ direction: a = "column",
664
+ justifyContent: o,
665
+ alignItems: c,
665
666
  alignContent: l,
666
667
  height: s,
667
- width: c,
668
- gap: u,
669
- background: d,
670
- borderRadius: b,
668
+ width: d,
669
+ gap: p,
670
+ background: u,
671
+ borderRadius: h,
671
672
  border: m,
672
673
  margin: f = "0px",
673
- padding: y = "0px",
674
- boxSizing: C,
675
- scroll: w = !1
674
+ padding: w = "0px",
675
+ boxSizing: D,
676
+ scroll: E = !1
676
677
  } = e;
677
- return /* @__PURE__ */ o(
678
- wn,
678
+ return /* @__PURE__ */ i(
679
+ gn,
679
680
  {
680
- ref: n,
681
- direction: i,
682
- $justifyContent: r,
683
- $alignItems: p,
681
+ ref: t,
682
+ direction: a,
683
+ $justifyContent: o,
684
+ $alignItems: c,
684
685
  $alignContent: l,
685
686
  height: s,
686
- width: c,
687
- wrap: a,
688
- $gap: u,
689
- $background: d,
687
+ width: d,
688
+ wrap: r,
689
+ $gap: p,
690
+ $background: u,
690
691
  $border: m,
691
692
  $margin: f,
692
- $padding: y,
693
- $borderRadius: b,
694
- $boxSizing: C,
695
- $scroll: w,
696
- children: t
693
+ $padding: w,
694
+ $borderRadius: h,
695
+ $boxSizing: D,
696
+ $scroll: E,
697
+ children: n
697
698
  }
698
699
  );
699
700
  }
700
701
  );
701
- j.displayName = "BorderStack";
702
- const Cn = (e) => {
702
+ _.displayName = "BorderStack";
703
+ const fn = (e) => {
703
704
  const {
704
- conditionsAlignment: n,
705
- decision: t,
706
- decisionMapper: a,
707
- loading: i,
708
- textValues: r,
709
- visibleConditions: p,
705
+ conditionsAlignment: t,
706
+ decision: n,
707
+ decisionMapper: r,
708
+ loading: a,
709
+ textValues: o,
710
+ visibleConditions: c,
710
711
  tagLabel: l,
711
712
  isOpen: s,
712
- onToggle: c,
713
- hasEffectiveFrom: u,
714
- hasValidUntil: d,
715
- effectiveFromRenderer: b,
713
+ onToggle: d,
714
+ hasEffectiveFrom: p,
715
+ hasValidUntil: u,
716
+ effectiveFromRenderer: h,
716
717
  validUntilRenderer: m
717
718
  } = e;
718
- return i ? /* @__PURE__ */ h(g, { direction: "column", gap: "16px", children: [
719
- /* @__PURE__ */ h(
720
- g,
719
+ return a ? /* @__PURE__ */ g(b, { direction: "column", gap: "16px", children: [
720
+ /* @__PURE__ */ g(
721
+ b,
721
722
  {
722
723
  alignItems: "start",
723
724
  justifyContent: "space-between",
724
725
  children: [
725
- /* @__PURE__ */ o(
726
- G,
726
+ /* @__PURE__ */ i(
727
+ ae,
727
728
  {
728
- element: a,
729
- valueData: P(
730
- a
729
+ element: r,
730
+ valueData: ee(
731
+ r
731
732
  ),
732
733
  type: "decision"
733
734
  }
734
735
  ),
735
- /* @__PURE__ */ h(g, { gap: "8px", children: [
736
- /* @__PURE__ */ o(H, { appearance: "gray", label: l, displayIcon: !1 }),
737
- /* @__PURE__ */ o(
738
- L,
736
+ /* @__PURE__ */ g(b, { gap: "8px", children: [
737
+ /* @__PURE__ */ i(X, { appearance: "gray", label: l, displayIcon: !1 }),
738
+ /* @__PURE__ */ i(
739
+ M,
739
740
  {
740
741
  appearance: "dark",
741
- icon: s ? /* @__PURE__ */ o(Re, {}) : /* @__PURE__ */ o(Oe, {}),
742
- onClick: c,
742
+ icon: s ? /* @__PURE__ */ i(Et, {}) : /* @__PURE__ */ i(Xe, {}),
743
+ onClick: d,
743
744
  size: "24px",
744
745
  cursorHover: !0
745
746
  }
@@ -747,13 +748,13 @@ const Cn = (e) => {
747
748
  ] })
748
749
  ]
749
750
  },
750
- t.ruleName
751
+ n.ruleName
751
752
  ),
752
- s && /* @__PURE__ */ h(k, { children: [
753
- /* @__PURE__ */ o(R, { dashed: !0 }),
754
- /* @__PURE__ */ h(g, { direction: "column", gap: "12px", children: [
755
- /* @__PURE__ */ o(
756
- S,
753
+ s && /* @__PURE__ */ g(O, { children: [
754
+ /* @__PURE__ */ i(L, { dashed: !0 }),
755
+ /* @__PURE__ */ g(b, { direction: "column", gap: "12px", children: [
756
+ /* @__PURE__ */ i(
757
+ k,
757
758
  {
758
759
  type: "label",
759
760
  size: "large",
@@ -761,28 +762,28 @@ const Cn = (e) => {
761
762
  weight: "bold",
762
763
  textAlign: "start",
763
764
  padding: "0 12px",
764
- children: r.factsThatConditionIt
765
+ children: o.factsThatConditionIt
765
766
  }
766
767
  ),
767
- /* @__PURE__ */ h(
768
- g,
768
+ /* @__PURE__ */ g(
769
+ b,
769
770
  {
770
771
  direction: "column",
771
772
  gap: "8px",
772
- justifyContent: n,
773
+ justifyContent: t,
773
774
  children: [
774
- p.map((f) => /* @__PURE__ */ o(
775
- j,
775
+ c.map((f) => /* @__PURE__ */ i(
776
+ _,
776
777
  {
777
778
  direction: "column",
778
779
  padding: "6px 12px",
779
780
  borderRadius: "8px",
780
781
  background: !0,
781
- children: /* @__PURE__ */ o(
782
- G,
782
+ children: /* @__PURE__ */ i(
783
+ ae,
783
784
  {
784
785
  element: { ...f, value: f.value },
785
- valueData: P(
786
+ valueData: ee(
786
787
  f
787
788
  )
788
789
  }
@@ -790,32 +791,32 @@ const Cn = (e) => {
790
791
  },
791
792
  f.conditionName
792
793
  )),
793
- u && b && /* @__PURE__ */ o(
794
- j,
794
+ p && h && /* @__PURE__ */ i(
795
+ _,
795
796
  {
796
797
  direction: "column",
797
798
  padding: "6px 12px",
798
799
  borderRadius: "8px",
799
800
  background: !0,
800
- children: /* @__PURE__ */ o(
801
- G,
801
+ children: /* @__PURE__ */ i(
802
+ ae,
802
803
  {
803
- element: b.element,
804
- valueData: b.valueData
804
+ element: h.element,
805
+ valueData: h.valueData
805
806
  },
806
807
  "effectiveFrom"
807
808
  )
808
809
  }
809
810
  ),
810
- d && m && /* @__PURE__ */ o(
811
- j,
811
+ u && m && /* @__PURE__ */ i(
812
+ _,
812
813
  {
813
814
  direction: "column",
814
815
  padding: "6px 12px",
815
816
  borderRadius: "8px",
816
817
  background: !0,
817
- children: /* @__PURE__ */ o(
818
- G,
818
+ children: /* @__PURE__ */ i(
819
+ ae,
819
820
  {
820
821
  element: m.element,
821
822
  valueData: m.valueData
@@ -829,79 +830,79 @@ const Cn = (e) => {
829
830
  )
830
831
  ] })
831
832
  ] })
832
- ] }) : /* @__PURE__ */ h(g, { justifyContent: "space-between", children: [
833
- /* @__PURE__ */ h(g, { alignItems: "center", gap: "8px", children: [
834
- /* @__PURE__ */ o(z, { animated: !0, width: "150px" }),
835
- /* @__PURE__ */ o(z, { animated: !0, width: "70px" })
833
+ ] }) : /* @__PURE__ */ g(b, { justifyContent: "space-between", children: [
834
+ /* @__PURE__ */ g(b, { alignItems: "center", gap: "8px", children: [
835
+ /* @__PURE__ */ i(j, { animated: !0, width: "150px" }),
836
+ /* @__PURE__ */ i(j, { animated: !0, width: "70px" })
836
837
  ] }),
837
- /* @__PURE__ */ h(g, { alignItems: "center", gap: "8px", children: [
838
- /* @__PURE__ */ o(z, { animated: !0, width: "50px" }),
839
- /* @__PURE__ */ o(Ue, { animated: !0 })
838
+ /* @__PURE__ */ g(b, { alignItems: "center", gap: "8px", children: [
839
+ /* @__PURE__ */ i(j, { animated: !0, width: "50px" }),
840
+ /* @__PURE__ */ i(At, { animated: !0 })
840
841
  ] })
841
842
  ] });
842
- }, Fe = (e) => {
843
- var w;
843
+ }, dt = (e) => {
844
+ var E;
844
845
  const {
845
- decision: n,
846
- loading: t = !1,
847
- textValues: a,
848
- position: i,
849
- isOpen: r = !1,
850
- onToggle: p
851
- } = e, l = !!(n != null && n.effectiveFrom), s = !!(n != null && n.validUntil), c = l ? {
846
+ decision: t,
847
+ loading: n = !1,
848
+ textValues: r,
849
+ position: a,
850
+ isOpen: o = !1,
851
+ onToggle: c
852
+ } = e, l = !!(t != null && t.effectiveFrom), s = !!(t != null && t.validUntil), d = l ? {
852
853
  element: {
853
- labelName: a == null ? void 0 : a.effectiveFrom,
854
- value: String(n.effectiveFrom),
855
- howToSetTheDecision: V.EQUAL,
856
- decisionDataType: I.DATE
854
+ labelName: r == null ? void 0 : r.effectiveFrom,
855
+ value: String(t.effectiveFrom),
856
+ howToSetTheDecision: z.EQUAL,
857
+ decisionDataType: U.DATE
857
858
  },
858
- valueData: P({
859
- labelName: a == null ? void 0 : a.effectiveFrom,
860
- value: String(n.effectiveFrom),
861
- howToSetTheDecision: V.EQUAL,
862
- decisionDataType: I.DATE
859
+ valueData: ee({
860
+ labelName: r == null ? void 0 : r.effectiveFrom,
861
+ value: String(t.effectiveFrom),
862
+ howToSetTheDecision: z.EQUAL,
863
+ decisionDataType: U.DATE
863
864
  })
864
- } : null, u = s ? {
865
+ } : null, p = s ? {
865
866
  element: {
866
- labelName: a == null ? void 0 : a.validUntil,
867
- value: String(n.validUntil),
868
- howToSetTheDecision: V.EQUAL,
869
- decisionDataType: I.DATE
867
+ labelName: r == null ? void 0 : r.validUntil,
868
+ value: String(t.validUntil),
869
+ howToSetTheDecision: z.EQUAL,
870
+ decisionDataType: U.DATE
870
871
  },
871
- valueData: P({
872
- labelName: a == null ? void 0 : a.validUntil,
873
- value: String(n.validUntil),
874
- howToSetTheDecision: V.EQUAL,
875
- decisionDataType: I.DATE
872
+ valueData: ee({
873
+ labelName: r == null ? void 0 : r.validUntil,
874
+ value: String(t.validUntil),
875
+ howToSetTheDecision: z.EQUAL,
876
+ decisionDataType: U.DATE
876
877
  })
877
- } : null, d = n ? {
878
- labelName: n.labelName || "",
879
- decisionDataType: n.decisionDataType || "alphabetical",
880
- value: P(n),
881
- howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
882
- } : null, b = ((w = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : w.filter(
883
- (E) => !E.hidden
884
- )) || [], m = Array.from({ length: 5 }), f = !!(!t && n && a && d), y = b.length < 2 ? "start" : "space-between", C = `N° ${String((i ?? 0) + 1).padStart(2, "0")}`;
885
- return /* @__PURE__ */ o(
886
- Cn,
878
+ } : null, u = t ? {
879
+ labelName: t.labelName || "",
880
+ decisionDataType: t.decisionDataType || "alphabetical",
881
+ value: ee(t),
882
+ howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
883
+ } : null, h = ((E = t == null ? void 0 : t.conditionsThatEstablishesTheDecision) == null ? void 0 : E.filter(
884
+ (x) => !x.hidden
885
+ )) || [], m = Array.from({ length: 5 }), f = !!(!n && t && r && u), w = h.length < 2 ? "start" : "space-between", D = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
886
+ return /* @__PURE__ */ i(
887
+ fn,
887
888
  {
888
- conditionsAlignment: y,
889
- decision: n,
890
- decisionMapper: d,
889
+ conditionsAlignment: w,
890
+ decision: t,
891
+ decisionMapper: u,
891
892
  loading: f,
892
893
  skeleton: m,
893
- textValues: a,
894
- visibleConditions: b,
895
- tagLabel: C,
896
- isOpen: r,
897
- onToggle: p,
894
+ textValues: r,
895
+ visibleConditions: h,
896
+ tagLabel: D,
897
+ isOpen: o,
898
+ onToggle: c,
898
899
  hasEffectiveFrom: l,
899
900
  hasValidUntil: s,
900
- effectiveFromRenderer: c,
901
- validUntilRenderer: u
901
+ effectiveFromRenderer: d,
902
+ validUntilRenderer: p
902
903
  }
903
904
  );
904
- }, Dn = De`
905
+ }, mn = rt`
905
906
  from {
906
907
  opacity: 0;
907
908
  transform: translateY(20px);
@@ -911,12 +912,12 @@ const Cn = (e) => {
911
912
  transform: translateY(0);
912
913
  }
913
914
  `;
914
- x.div`
915
+ N.div`
915
916
  border-radius: 8px;
916
917
  border: 1px solid
917
918
  ${({ theme: e }) => {
918
- var n, t;
919
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || v.palette.neutral.N30;
919
+ var t, n;
920
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
920
921
  }};
921
922
  box-sizing: border-box;
922
923
  display: flex;
@@ -925,21 +926,21 @@ x.div`
925
926
  height: 100%;
926
927
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
927
928
  `;
928
- x.div`
929
+ N.div`
929
930
  & > div {
930
931
  border-radius: 8px;
931
932
  border: 1px solid
932
933
  ${({ theme: e }) => {
933
- var n, t;
934
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || v.palette.neutral.N30;
934
+ var t, n;
935
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
935
936
  }};
936
937
  }
937
938
  `;
938
- x.div`
939
+ N.div`
939
940
  & > div {
940
941
  background-color: ${({ theme: e }) => {
941
- var n, t;
942
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N10) || v.palette.neutral.N10;
942
+ var t, n;
943
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N10) || C.palette.neutral.N10;
943
944
  }};
944
945
  justify-content: center;
945
946
  }
@@ -949,19 +950,19 @@ x.div`
949
950
  padding-bottom: 12px;
950
951
  cursor: pointer;
951
952
  `;
952
- x.div`
953
+ N.div`
953
954
  width: 100%;
954
955
  height: 100%;
955
956
  & > div {
956
- animation: ${Dn} 600ms ease-out;
957
+ animation: ${mn} 600ms ease-out;
957
958
  }
958
959
  `;
959
- const Sn = x.div`
960
+ const bn = N.div`
960
961
  & > div > div {
961
962
  border-radius: 8px;
962
963
  box-sizing: border-box;
963
964
  }
964
- `, Nn = x.div`
965
+ `, vn = N.div`
965
966
  & > div {
966
967
  width: 100%;
967
968
  height: 100%;
@@ -981,63 +982,63 @@ const Sn = x.div`
981
982
  border-radius: 8px;
982
983
  }
983
984
  }
984
- `, En = (e) => {
985
- const { index: n, handleOpenModal: t } = e;
986
- return /* @__PURE__ */ o(
987
- $e,
985
+ `, yn = (e) => {
986
+ const { index: t, handleOpenModal: n } = e;
987
+ return /* @__PURE__ */ i(
988
+ ct,
988
989
  {
989
- id: `loading-card-${n}`,
990
+ id: `loading-card-${t}`,
990
991
  handleDelete: () => {
991
992
  },
992
- handleView: () => t ? t() : null,
993
+ handleView: () => n ? n() : null,
993
994
  controls: !1,
994
- children: /* @__PURE__ */ o(Fe, { loading: !0 })
995
+ children: /* @__PURE__ */ i(dt, { loading: !0 })
995
996
  },
996
- `loading-card-${n}`
997
+ `loading-card-${t}`
997
998
  );
998
- }, kn = (e) => {
999
+ }, xn = (e) => {
999
1000
  const {
1000
- decision: n,
1001
- controls: t,
1002
- handleOpenModal: a,
1003
- handleDelete: i,
1004
- textValues: r,
1005
- index: p,
1001
+ decision: t,
1002
+ controls: n,
1003
+ handleOpenModal: r,
1004
+ handleDelete: a,
1005
+ textValues: o,
1006
+ index: c,
1006
1007
  isOpen: l,
1007
1008
  onToggle: s
1008
1009
  } = e;
1009
- return n ? /* @__PURE__ */ o(J, { children: /* @__PURE__ */ o(g, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ o(
1010
- $e,
1010
+ return t ? /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(b, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
1011
+ ct,
1011
1012
  {
1012
- id: n.decisionId,
1013
- handleDelete: () => i ? i(n.decisionId) : null,
1014
- handleView: () => a ? a(n) : null,
1015
- controls: t,
1016
- children: /* @__PURE__ */ o(
1017
- Fe,
1013
+ id: t.decisionId,
1014
+ handleDelete: () => a ? a(t.decisionId) : null,
1015
+ handleView: () => r ? r(t) : null,
1016
+ controls: n,
1017
+ children: /* @__PURE__ */ i(
1018
+ dt,
1018
1019
  {
1019
- decision: n,
1020
- textValues: r,
1021
- position: p,
1020
+ decision: t,
1021
+ textValues: o,
1022
+ position: c,
1022
1023
  isOpen: !!l,
1023
1024
  onToggle: () => s == null ? void 0 : s(!l)
1024
1025
  }
1025
1026
  )
1026
1027
  }
1027
- ) }) }, n.decisionId) : null;
1028
- }, An = (e) => {
1028
+ ) }) }, t.decisionId) : null;
1029
+ }, wn = (e) => {
1029
1030
  const {
1030
- customTitleContentAddCard: n,
1031
- index: t,
1032
- handleOpenModal: a,
1033
- shouldRenderEmptyMessage: i
1031
+ customTitleContentAddCard: t,
1032
+ index: n,
1033
+ handleOpenModal: r,
1034
+ shouldRenderEmptyMessage: a
1034
1035
  } = e;
1035
- return /* @__PURE__ */ o(J, { children: i ? null : /* @__PURE__ */ o(
1036
- Ae,
1036
+ return /* @__PURE__ */ i(ge, { children: a ? null : /* @__PURE__ */ i(
1037
+ st,
1037
1038
  {
1038
- onClick: () => a ? a() : null,
1039
- children: /* @__PURE__ */ o(
1040
- j,
1039
+ onClick: () => r ? r() : null,
1040
+ children: /* @__PURE__ */ i(
1041
+ _,
1041
1042
  {
1042
1043
  direction: "column",
1043
1044
  gap: "4px",
@@ -1045,19 +1046,19 @@ const Sn = x.div`
1045
1046
  height: "100%",
1046
1047
  background: !0,
1047
1048
  borderRadius: "8px",
1048
- children: /* @__PURE__ */ h(
1049
- g,
1049
+ children: /* @__PURE__ */ g(
1050
+ b,
1050
1051
  {
1051
1052
  justifyContent: "space-between",
1052
1053
  alignItems: "center",
1053
1054
  padding: "16px",
1054
1055
  children: [
1055
- /* @__PURE__ */ o(S, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
1056
- /* @__PURE__ */ o(
1057
- L,
1056
+ /* @__PURE__ */ i(k, { appearance: "gray", type: "label", size: "large", weight: "bold", children: t || "Agregar decisión" }),
1057
+ /* @__PURE__ */ i(
1058
+ M,
1058
1059
  {
1059
1060
  appearance: "gray",
1060
- icon: /* @__PURE__ */ o(Y, {}),
1061
+ icon: /* @__PURE__ */ i(pe, {}),
1061
1062
  size: "24px",
1062
1063
  cursorHover: !0
1063
1064
  }
@@ -1068,94 +1069,94 @@ const Sn = x.div`
1068
1069
  }
1069
1070
  )
1070
1071
  }
1071
- ) }, `add-decision-${t}`);
1072
- }, $n = {
1073
- loading: En,
1074
- decision: kn,
1075
- add: An
1076
- }, te = (e) => {
1077
- const { type: n } = e, t = $n[n];
1078
- return t ? t(e) : null;
1079
- }, Fn = (e) => {
1072
+ ) }, `add-decision-${n}`);
1073
+ }, Tn = {
1074
+ loading: yn,
1075
+ decision: xn,
1076
+ add: wn
1077
+ }, Ce = (e) => {
1078
+ const { type: t } = e, n = Tn[t];
1079
+ return n ? n(e) : null;
1080
+ }, Cn = (e) => {
1080
1081
  const {
1081
- controls: n,
1082
- customTitleContentAddCard: t,
1083
- decisions: a,
1084
- loading: i,
1085
- handleOpenModal: r,
1086
- handleDelete: p,
1082
+ controls: t,
1083
+ customTitleContentAddCard: n,
1084
+ decisions: r,
1085
+ loading: a,
1086
+ handleOpenModal: o,
1087
+ handleDelete: c,
1087
1088
  textValues: l,
1088
1089
  isOpenFor: s,
1089
- toggleAt: c
1090
- } = e, u = i ? Array.from({ length: 3 }).map(
1091
- (b, m) => te({
1090
+ toggleAt: d
1091
+ } = e, p = a ? Array.from({ length: 3 }).map(
1092
+ (h, m) => Ce({
1092
1093
  type: "loading",
1093
1094
  index: m,
1094
- controls: n,
1095
- customTitleContentAddCard: t,
1096
- loading: i,
1097
- handleOpenModal: r,
1098
- handleDelete: p,
1095
+ controls: t,
1096
+ customTitleContentAddCard: n,
1097
+ loading: a,
1098
+ handleOpenModal: o,
1099
+ handleDelete: c,
1099
1100
  textValues: l
1100
1101
  })
1101
- ) : a == null ? void 0 : a.map(
1102
- (b, m) => te({
1102
+ ) : r == null ? void 0 : r.map(
1103
+ (h, m) => Ce({
1103
1104
  type: "decision",
1104
- decision: b,
1105
+ decision: h,
1105
1106
  controls: s ? s(m) : !1,
1106
- customTitleContentAddCard: t,
1107
- loading: i,
1108
- handleOpenModal: r,
1109
- handleDelete: p,
1107
+ customTitleContentAddCard: n,
1108
+ loading: a,
1109
+ handleOpenModal: o,
1110
+ handleDelete: c,
1110
1111
  textValues: l,
1111
1112
  index: m,
1112
1113
  isOpen: s ? s(m) : !1,
1113
- onToggle: c ? () => c(m) : void 0
1114
+ onToggle: d ? () => d(m) : void 0
1114
1115
  })
1115
- ), d = ((a == null ? void 0 : a.length) === 0 || a.length < Math.floor(window.innerWidth / 300)) && !i && n;
1116
- return { renderedCards: u, shouldRenderAddCard: d };
1117
- }, vt = (e) => {
1116
+ ), u = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !a && t;
1117
+ return { renderedCards: p, shouldRenderAddCard: u };
1118
+ }, ra = (e) => {
1118
1119
  const {
1119
- controls: n = !0,
1120
- customTitleContentAddCard: t,
1121
- customMessageEmptyDecisions: a,
1122
- decisions: i,
1123
- textValues: r,
1124
- decisionTemplate: p,
1120
+ controls: t = !0,
1121
+ customTitleContentAddCard: n,
1122
+ customMessageEmptyDecisions: r,
1123
+ decisions: a,
1124
+ textValues: o,
1125
+ decisionTemplate: c,
1125
1126
  isModalOpen: l,
1126
1127
  selectedDecision: s,
1127
- loading: c,
1128
- handleOpenModal: u,
1129
- handleCloseModal: d,
1130
- handleSubmitForm: b,
1128
+ loading: d,
1129
+ handleOpenModal: p,
1130
+ handleCloseModal: u,
1131
+ handleSubmitForm: h,
1131
1132
  handleDelete: m,
1132
1133
  terms: f = !0
1133
- } = e, [y, C] = O(null), w = B("(max-width: 681px)"), { renderedCards: E, shouldRenderAddCard: $ } = Fn({
1134
- controls: n,
1135
- customTitleContentAddCard: t,
1136
- decisions: i,
1137
- loading: c,
1138
- handleOpenModal: u,
1134
+ } = e, [w, D] = V(null), E = H("(max-width: 681px)"), { renderedCards: x, shouldRenderAddCard: S } = Cn({
1135
+ controls: t,
1136
+ customTitleContentAddCard: n,
1137
+ decisions: a,
1138
+ loading: d,
1139
+ handleOpenModal: p,
1139
1140
  handleDelete: m,
1140
- textValues: r,
1141
- isOpenFor: (N) => y === N,
1142
- toggleAt: (N) => C((M) => M === N ? null : N)
1143
- }), A = (i == null ? void 0 : i.length) === 0 && !c;
1144
- return /* @__PURE__ */ h(k, { children: [
1145
- /* @__PURE__ */ o(Sn, { children: /* @__PURE__ */ o(Nn, { children: /* @__PURE__ */ o(g, { direction: "column", gap: "16px", padding: "6px", children: A ? /* @__PURE__ */ h(
1146
- g,
1141
+ textValues: o,
1142
+ isOpenFor: (R) => w === R,
1143
+ toggleAt: (R) => D((I) => I === R ? null : R)
1144
+ }), T = (a == null ? void 0 : a.length) === 0 && !d;
1145
+ return /* @__PURE__ */ g(O, { children: [
1146
+ /* @__PURE__ */ i(bn, { children: /* @__PURE__ */ i(vn, { children: /* @__PURE__ */ i(b, { direction: "column", gap: "16px", padding: "6px", children: T ? /* @__PURE__ */ g(
1147
+ b,
1147
1148
  {
1148
1149
  direction: "column",
1149
1150
  gap: "28px",
1150
1151
  width: "100%",
1151
- height: w ? "auto" : "435px",
1152
+ height: E ? "auto" : "435px",
1152
1153
  justifyContent: "center",
1153
1154
  alignItems: "center",
1154
1155
  children: [
1155
- /* @__PURE__ */ o(S, { as: "span", type: "label", size: "large", appearance: "gray", children: a || /* @__PURE__ */ h(k, { children: [
1156
+ /* @__PURE__ */ i(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ g(O, { children: [
1156
1157
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
1157
- /* @__PURE__ */ h(
1158
- S,
1158
+ /* @__PURE__ */ g(
1159
+ k,
1159
1160
  {
1160
1161
  as: "span",
1161
1162
  type: "label",
@@ -1164,25 +1165,25 @@ const Sn = x.div`
1164
1165
  weight: "bold",
1165
1166
  children: [
1166
1167
  "“",
1167
- t || "+ Agregar decisión",
1168
+ n || "+ Agregar decisión",
1168
1169
  "”"
1169
1170
  ]
1170
1171
  }
1171
1172
  ),
1172
1173
  "para empezar."
1173
1174
  ] }) }),
1174
- /* @__PURE__ */ o(
1175
- U,
1175
+ /* @__PURE__ */ i(
1176
+ P,
1176
1177
  {
1177
- iconBefore: /* @__PURE__ */ o(Y, {}),
1178
- onClick: () => u ? u() : null,
1179
- children: t || "Agregar decisión"
1178
+ iconBefore: /* @__PURE__ */ i(pe, {}),
1179
+ onClick: () => p ? p() : null,
1180
+ children: n || "Agregar decisión"
1180
1181
  }
1181
1182
  )
1182
1183
  ]
1183
1184
  }
1184
- ) : /* @__PURE__ */ h(
1185
- K,
1185
+ ) : /* @__PURE__ */ g(
1186
+ he,
1186
1187
  {
1187
1188
  templateColumns: "1fr",
1188
1189
  autoFlow: "row dense",
@@ -1192,54 +1193,54 @@ const Sn = x.div`
1192
1193
  autoRows: "auto",
1193
1194
  justifyItems: "center",
1194
1195
  padding: "6px",
1195
- height: w ? "auto" : "484px",
1196
+ height: E ? "auto" : "484px",
1196
1197
  children: [
1197
- E,
1198
- $ && te({
1198
+ x,
1199
+ S && Ce({
1199
1200
  type: "add",
1200
- index: i == null ? void 0 : i.length,
1201
- controls: n,
1202
- customTitleContentAddCard: t,
1203
- customMessageEmptyDecisions: a,
1204
- loading: c,
1205
- handleOpenModal: u,
1201
+ index: a == null ? void 0 : a.length,
1202
+ controls: t,
1203
+ customTitleContentAddCard: n,
1204
+ customMessageEmptyDecisions: r,
1205
+ loading: d,
1206
+ handleOpenModal: p,
1206
1207
  handleDelete: m,
1207
- textValues: r,
1208
- shouldRenderEmptyMessage: A,
1208
+ textValues: o,
1209
+ shouldRenderEmptyMessage: T,
1209
1210
  terms: f
1210
1211
  })
1211
1212
  ]
1212
1213
  }
1213
1214
  ) }) }) }),
1214
- l && /* @__PURE__ */ o(
1215
- ke,
1215
+ l && /* @__PURE__ */ i(
1216
+ lt,
1216
1217
  {
1217
1218
  portalId: "modal-portal",
1218
- onCloseModal: d,
1219
+ onCloseModal: u,
1219
1220
  title: s ? "Editar Decisión" : "Nueva decisión",
1220
- children: /* @__PURE__ */ o(
1221
- Ie,
1221
+ children: /* @__PURE__ */ i(
1222
+ ut,
1222
1223
  {
1223
- decision: s || p,
1224
- onSubmitEvent: b,
1225
- textValues: r,
1226
- onCancel: () => d ? d() : () => {
1224
+ decision: s || c,
1225
+ onSubmitEvent: h,
1226
+ textValues: o,
1227
+ onCancel: () => u ? u() : () => {
1227
1228
  }
1228
1229
  }
1229
1230
  )
1230
1231
  }
1231
1232
  )
1232
1233
  ] });
1233
- }, In = {
1234
+ }, Nn = {
1234
1235
  border: {
1235
- color: v.palette.neutral.N40
1236
+ color: C.palette.neutral.N40
1236
1237
  }
1237
- }, Rn = x.div`
1238
+ }, En = N.div`
1238
1239
  border-width: 1px;
1239
1240
  border-style: solid;
1240
1241
  border-color: ${({ theme: e }) => {
1241
- var n, t;
1242
- return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || In.border.color;
1242
+ var t, n;
1243
+ return ((n = (t = e == null ? void 0 : e.box) == null ? void 0 : t.border) == null ? void 0 : n.color) || Nn.border.color;
1243
1244
  }};
1244
1245
  border-radius: ${({ $borderRadius: e }) => e};
1245
1246
  margin: ${({ $margin: e }) => e};
@@ -1248,92 +1249,92 @@ const Sn = x.div`
1248
1249
  height: ${({ $height: e }) => e};
1249
1250
  box-sizing: border-box;
1250
1251
  `;
1251
- function On(e) {
1252
+ function Sn(e) {
1252
1253
  const {
1253
- children: n,
1254
- padding: t = "16px",
1255
- margin: a,
1256
- borderRadius: i = "8px",
1257
- width: r,
1258
- height: p
1254
+ children: t,
1255
+ padding: n = "16px",
1256
+ margin: r,
1257
+ borderRadius: a = "8px",
1258
+ width: o,
1259
+ height: c
1259
1260
  } = e;
1260
- return /* @__PURE__ */ o(
1261
- Rn,
1261
+ return /* @__PURE__ */ i(
1262
+ En,
1262
1263
  {
1263
- $padding: t,
1264
- $margin: a,
1265
- $borderRadius: i,
1266
- $width: r,
1267
- $height: p,
1268
- children: n
1264
+ $padding: n,
1265
+ $margin: r,
1266
+ $borderRadius: a,
1267
+ $width: o,
1268
+ $height: c,
1269
+ children: t
1269
1270
  }
1270
1271
  );
1271
1272
  }
1272
- const Mn = (e, n) => {
1273
- const [t, a] = O([]), [i, r] = O([]), [p, l] = O(!1), s = Q(null);
1274
- return oe(() => {
1273
+ const Dn = (e, t) => {
1274
+ const [n, r] = V([]), [a, o] = V([]), [c, l] = V(!1), s = le(null);
1275
+ return ke(() => {
1275
1276
  if (!e.current || !s.current) return;
1276
- const c = e.current, u = s.current, d = () => {
1277
- var $;
1278
- const m = c.clientWidth, f = Array.from(
1279
- u.querySelectorAll('[data-filter-tag="true"]')
1280
- ), y = 48;
1281
- let C = 0;
1282
- const w = [], E = [];
1283
- for (let A = 0; A < n.length; A++) {
1284
- const T = (($ = f[A]) == null ? void 0 : $.offsetWidth) ?? 0;
1285
- C + T + y <= m ? (w.push(n[A]), C += T) : E.push(n[A]);
1277
+ const d = e.current, p = s.current, u = () => {
1278
+ var S;
1279
+ const m = d.clientWidth, f = Array.from(
1280
+ p.querySelectorAll('[data-filter-tag="true"]')
1281
+ ), w = 48;
1282
+ let D = 0;
1283
+ const E = [], x = [];
1284
+ for (let T = 0; T < t.length; T++) {
1285
+ const y = ((S = f[T]) == null ? void 0 : S.offsetWidth) ?? 0;
1286
+ D + y + w <= m ? (E.push(t[T]), D += y) : x.push(t[T]);
1286
1287
  }
1287
- a(w), r(E), l(E.length > 0);
1288
- }, b = new ResizeObserver(() => {
1289
- requestAnimationFrame(d);
1288
+ r(E), o(x), l(x.length > 0);
1289
+ }, h = new ResizeObserver(() => {
1290
+ requestAnimationFrame(u);
1290
1291
  });
1291
- return b.observe(c), () => b.disconnect();
1292
- }, [n, e]), { visible: t, hidden: i, showOverflowIndicator: p, measurementRef: s };
1292
+ return h.observe(d), () => h.disconnect();
1293
+ }, [t, e]), { visible: n, hidden: a, showOverflowIndicator: c, measurementRef: s };
1293
1294
  };
1294
- x.div`
1295
+ N.div`
1295
1296
  & > div {
1296
1297
  width: 100%;
1297
1298
  }
1298
1299
  `;
1299
- const Ln = x.div`
1300
+ const kn = N.div`
1300
1301
  position: absolute;
1301
1302
  top: calc(100% + 4px);
1302
1303
  right: 0;
1303
1304
  z-index: 1000;
1304
1305
  width: 170px;
1305
- `, Un = x.div`
1306
+ `, Rn = N.div`
1306
1307
  position: absolute;
1307
1308
  visibility: hidden;
1308
1309
  pointer-events: none;
1309
1310
  height: 0;
1310
1311
  overflow: hidden;
1311
- `, zn = x.div`
1312
+ `, An = N.div`
1312
1313
  cursor: pointer;
1313
- `, ae = {
1314
+ `, Ne = {
1314
1315
  border: {
1315
1316
  color: {
1316
- regular: v.palette.neutral.N40,
1317
- disabled: v.palette.neutral.N40,
1318
- focus: v.palette.blue.B300,
1319
- invalid: v.palette.red.R400
1317
+ regular: C.palette.neutral.N40,
1318
+ disabled: C.palette.neutral.N40,
1319
+ focus: C.palette.blue.B300,
1320
+ invalid: C.palette.red.R400
1320
1321
  }
1321
1322
  },
1322
1323
  background: {
1323
1324
  color: {
1324
- regular: v.palette.neutral.N0,
1325
- disabled: v.palette.neutral.N10
1325
+ regular: C.palette.neutral.N0,
1326
+ disabled: C.palette.neutral.N10
1326
1327
  }
1327
1328
  },
1328
1329
  content: {
1329
1330
  color: {
1330
- regular: v.palette.neutral.N900,
1331
- disabled: v.palette.neutral.N70
1331
+ regular: C.palette.neutral.N900,
1332
+ disabled: C.palette.neutral.N70
1332
1333
  }
1333
1334
  },
1334
1335
  placeholder: {
1335
1336
  color: {
1336
- regular: v.palette.neutral.N300
1337
+ regular: C.palette.neutral.N300
1337
1338
  }
1338
1339
  },
1339
1340
  option: {
@@ -1342,11 +1343,11 @@ const Ln = x.div`
1342
1343
  hover: "primary"
1343
1344
  },
1344
1345
  background: {
1345
- regular: v.palette.neutral.N0,
1346
- hover: v.palette.neutral.N30
1346
+ regular: C.palette.neutral.N0,
1347
+ hover: C.palette.neutral.N30
1347
1348
  }
1348
1349
  }
1349
- }, Vn = x.li`
1350
+ }, $n = N.li`
1350
1351
  display: flex;
1351
1352
  align-items: center;
1352
1353
  align-self: stretch;
@@ -1360,56 +1361,56 @@ const Ln = x.div`
1360
1361
 
1361
1362
  &:hover {
1362
1363
  background-color: ${({ theme: e }) => {
1363
- var n, t, a;
1364
- return ((a = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : a.regular) || ae.background.color.regular;
1364
+ var t, n, r;
1365
+ return ((r = (n = (t = e == null ? void 0 : e.input) == null ? void 0 : t.background) == null ? void 0 : n.color) == null ? void 0 : r.regular) || Ne.background.color.regular;
1365
1366
  }};
1366
1367
  }
1367
- `, jn = (e) => {
1368
- var b, m, f, y, C, w;
1369
- const { id: n, label: t, leadingIcon: a, onClose: i } = e, [r, p] = O(!1), l = () => p(!0), s = () => p(!1), c = He(Be), u = ((f = (m = (b = c == null ? void 0 : c.input) == null ? void 0 : b.option) == null ? void 0 : m.appearance) == null ? void 0 : f.hover) ?? ae.option.appearance.hover, d = ((w = (C = (y = c == null ? void 0 : c.input) == null ? void 0 : y.option) == null ? void 0 : C.appearance) == null ? void 0 : w.regular) ?? ae.option.appearance.regular;
1370
- return /* @__PURE__ */ o(
1371
- Vn,
1368
+ `, On = (e) => {
1369
+ var h, m, f, w, D, E;
1370
+ const { id: t, label: n, leadingIcon: r, onClose: a } = e, [o, c] = V(!1), l = () => c(!0), s = () => c(!1), d = Lt(It), p = ((f = (m = (h = d == null ? void 0 : d.input) == null ? void 0 : h.option) == null ? void 0 : m.appearance) == null ? void 0 : f.hover) ?? Ne.option.appearance.hover, u = ((E = (D = (w = d == null ? void 0 : d.input) == null ? void 0 : w.option) == null ? void 0 : D.appearance) == null ? void 0 : E.regular) ?? Ne.option.appearance.regular;
1371
+ return /* @__PURE__ */ i(
1372
+ $n,
1372
1373
  {
1373
- id: n,
1374
+ id: t,
1374
1375
  onMouseEnter: l,
1375
1376
  onMouseLeave: s,
1376
- onClick: (E) => {
1377
- E.stopPropagation();
1377
+ onClick: (x) => {
1378
+ x.stopPropagation();
1378
1379
  },
1379
- children: /* @__PURE__ */ h(
1380
- K,
1380
+ children: /* @__PURE__ */ g(
1381
+ he,
1381
1382
  {
1382
1383
  alignItems: "center",
1383
1384
  gap: "8px",
1384
1385
  templateColumns: "auto 1fr auto",
1385
1386
  width: "100%",
1386
1387
  children: [
1387
- a && /* @__PURE__ */ o(
1388
- L,
1388
+ r && /* @__PURE__ */ i(
1389
+ M,
1389
1390
  {
1390
- icon: a,
1391
+ icon: r,
1391
1392
  size: "medium",
1392
- appearance: r ? u : d
1393
+ appearance: o ? p : u
1393
1394
  }
1394
1395
  ),
1395
- /* @__PURE__ */ o(
1396
- S,
1396
+ /* @__PURE__ */ i(
1397
+ k,
1397
1398
  {
1398
1399
  textAlign: "start",
1399
1400
  size: "medium",
1400
- appearance: r ? u : d,
1401
- children: t
1401
+ appearance: o ? p : u,
1402
+ children: n
1402
1403
  }
1403
1404
  ),
1404
- /* @__PURE__ */ o(
1405
- L,
1405
+ /* @__PURE__ */ i(
1406
+ M,
1406
1407
  {
1407
- icon: /* @__PURE__ */ o(Me, {}),
1408
+ icon: /* @__PURE__ */ i(St, {}),
1408
1409
  size: "small",
1409
- onClick: (E) => {
1410
- E.stopPropagation(), i == null || i();
1410
+ onClick: (x) => {
1411
+ x.stopPropagation(), a == null || a();
1411
1412
  },
1412
- appearance: r ? u : d,
1413
+ appearance: o ? p : u,
1413
1414
  cursorHover: !0
1414
1415
  }
1415
1416
  )
@@ -1418,54 +1419,54 @@ const Ln = x.div`
1418
1419
  )
1419
1420
  }
1420
1421
  );
1421
- }, yt = (e) => {
1422
+ }, aa = (e) => {
1422
1423
  const {
1423
- appliedFilters: n = [],
1424
- onClear: t,
1425
- onClick: a,
1426
- noFiltersLabel: i,
1427
- titleClearFilter: r,
1428
- titleFilter: p
1429
- } = e, l = Q(null), s = Q(null), c = Q(null), {
1430
- visible: u,
1431
- hidden: d,
1432
- showOverflowIndicator: b,
1424
+ appliedFilters: t = [],
1425
+ onClear: n,
1426
+ onClick: r,
1427
+ noFiltersLabel: a,
1428
+ titleClearFilter: o,
1429
+ titleFilter: c
1430
+ } = e, l = le(null), s = le(null), d = le(null), {
1431
+ visible: p,
1432
+ hidden: u,
1433
+ showOverflowIndicator: h,
1433
1434
  measurementRef: m
1434
- } = Mn(l, n), [f, y] = O(!1), C = (T) => {
1435
- T.stopPropagation(), y((N) => !N);
1435
+ } = Dn(l, t), [f, w] = V(!1), D = (y) => {
1436
+ y.stopPropagation(), w((R) => !R);
1436
1437
  };
1437
- oe(() => {
1438
- const T = (N) => {
1439
- var le, se;
1440
- const M = N.target;
1441
- !((le = s.current) != null && le.contains(M)) && !((se = c.current) != null && se.contains(M)) && y(!1);
1438
+ ke(() => {
1439
+ const y = (R) => {
1440
+ var re, q;
1441
+ const I = R.target;
1442
+ !((re = s.current) != null && re.contains(I)) && !((q = d.current) != null && q.contains(I)) && w(!1);
1442
1443
  };
1443
- return f && window.addEventListener("mousedown", T), () => window.removeEventListener("mousedown", T);
1444
+ return f && window.addEventListener("mousedown", y), () => window.removeEventListener("mousedown", y);
1444
1445
  }, [f]);
1445
- const w = n.length === 0, E = f && d.length > 0, $ = d.map((T) => ({
1446
- id: T.label,
1447
- value: T.label,
1448
- label: T.label,
1449
- icon: T.icon
1450
- })), A = (T) => {
1451
- var N, M;
1452
- (M = (N = d.find((F) => F.label === T)) == null ? void 0 : N.onClose) == null || M.call(N), y(!1);
1446
+ const E = t.length === 0, x = f && u.length > 0, S = u.map((y) => ({
1447
+ id: y.label,
1448
+ value: y.label,
1449
+ label: y.label,
1450
+ icon: y.icon
1451
+ })), T = (y) => {
1452
+ var R, I;
1453
+ (I = (R = u.find((F) => F.label === y)) == null ? void 0 : R.onClose) == null || I.call(R), w(!1);
1453
1454
  };
1454
- return /* @__PURE__ */ h(On, { borderRadius: "8px", width: "100%", children: [
1455
- /* @__PURE__ */ o(Un, { ref: m, children: n.map((T) => /* @__PURE__ */ o("div", { "data-filter-tag": "true", children: /* @__PURE__ */ o(
1456
- H,
1455
+ return /* @__PURE__ */ g(Sn, { borderRadius: "8px", width: "100%", children: [
1456
+ /* @__PURE__ */ i(Rn, { ref: m, children: t.map((y) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
1457
+ X,
1457
1458
  {
1458
1459
  appearance: "primary",
1459
1460
  displayIcon: !0,
1460
1461
  removable: !0,
1461
- icon: T.icon,
1462
- label: T.label,
1463
- onClose: T.onClose
1462
+ icon: y.icon,
1463
+ label: y.label,
1464
+ onClose: y.onClose
1464
1465
  }
1465
- ) }, T.label)) }),
1466
- /* @__PURE__ */ h(K, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
1467
- /* @__PURE__ */ o(
1468
- j,
1466
+ ) }, y.label)) }),
1467
+ /* @__PURE__ */ g(he, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
1468
+ /* @__PURE__ */ i(
1469
+ _,
1469
1470
  {
1470
1471
  ref: l,
1471
1472
  background: !0,
@@ -1476,50 +1477,50 @@ const Ln = x.div`
1476
1477
  alignItems: "center",
1477
1478
  padding: "0px 8px",
1478
1479
  border: !0,
1479
- children: w ? /* @__PURE__ */ o(S, { size: "small", type: "label", appearance: "gray", children: i }) : /* @__PURE__ */ h(k, { children: [
1480
- u.map((T) => /* @__PURE__ */ o(
1481
- H,
1480
+ children: E ? /* @__PURE__ */ i(k, { size: "small", type: "label", appearance: "gray", children: a }) : /* @__PURE__ */ g(O, { children: [
1481
+ p.map((y) => /* @__PURE__ */ i(
1482
+ X,
1482
1483
  {
1483
1484
  "data-filter-tag": "true",
1484
1485
  appearance: "primary",
1485
1486
  displayIcon: !0,
1486
1487
  removable: !0,
1487
- icon: T.icon,
1488
- label: T.label,
1489
- onClose: T.onClose
1488
+ icon: y.icon,
1489
+ label: y.label,
1490
+ onClose: y.onClose
1490
1491
  },
1491
- T.label
1492
+ y.label
1492
1493
  )),
1493
- b && /* @__PURE__ */ h(
1494
+ h && /* @__PURE__ */ g(
1494
1495
  "div",
1495
1496
  {
1496
- ref: c,
1497
+ ref: d,
1497
1498
  style: { position: "relative", display: "inline-block" },
1498
1499
  children: [
1499
- /* @__PURE__ */ o(zn, { onClick: C, children: /* @__PURE__ */ o(
1500
- H,
1500
+ /* @__PURE__ */ i(An, { onClick: D, children: /* @__PURE__ */ i(
1501
+ X,
1501
1502
  {
1502
1503
  appearance: "primary",
1503
- label: `+${d.length}`
1504
+ label: `+${u.length}`
1504
1505
  }
1505
1506
  ) }),
1506
- E && /* @__PURE__ */ o(Ln, { ref: s, children: /* @__PURE__ */ o(
1507
- ze,
1507
+ x && /* @__PURE__ */ i(kn, { ref: s, children: /* @__PURE__ */ i(
1508
+ $t,
1508
1509
  {
1509
- options: $,
1510
- onOptionClick: A,
1511
- children: d.map((T) => /* @__PURE__ */ o(
1512
- jn,
1510
+ options: S,
1511
+ onOptionClick: T,
1512
+ children: u.map((y) => /* @__PURE__ */ i(
1513
+ On,
1513
1514
  {
1514
- id: T.label,
1515
- label: T.label,
1516
- leadingIcon: T.icon,
1515
+ id: y.label,
1516
+ label: y.label,
1517
+ leadingIcon: y.icon,
1517
1518
  onClose: () => {
1518
- var N;
1519
- (N = T.onClose) == null || N.call(T), y(!1);
1519
+ var R;
1520
+ (R = y.onClose) == null || R.call(y), w(!1);
1520
1521
  }
1521
1522
  },
1522
- T.label
1523
+ y.label
1523
1524
  ))
1524
1525
  }
1525
1526
  ) })
@@ -1529,35 +1530,35 @@ const Ln = x.div`
1529
1530
  ] })
1530
1531
  }
1531
1532
  ),
1532
- /* @__PURE__ */ o(
1533
- U,
1533
+ /* @__PURE__ */ i(
1534
+ P,
1534
1535
  {
1535
1536
  cursorHover: !0,
1536
- disabled: w,
1537
- iconBefore: /* @__PURE__ */ o(ve, {}),
1538
- onClick: t,
1537
+ disabled: E,
1538
+ iconBefore: /* @__PURE__ */ i(Ze, {}),
1539
+ onClick: n,
1539
1540
  variant: "outlined",
1540
- children: r
1541
+ children: o
1541
1542
  }
1542
1543
  ),
1543
- /* @__PURE__ */ o(
1544
- U,
1544
+ /* @__PURE__ */ i(
1545
+ P,
1545
1546
  {
1546
1547
  cursorHover: !0,
1547
- iconBefore: /* @__PURE__ */ o(ye, {}),
1548
- onClick: a,
1548
+ iconBefore: /* @__PURE__ */ i(et, {}),
1549
+ onClick: r,
1549
1550
  variant: "outlined",
1550
- children: p
1551
+ children: c
1551
1552
  }
1552
1553
  )
1553
1554
  ] })
1554
1555
  ] });
1555
- }, Bn = x.div`
1556
+ }, Fn = N.div`
1556
1557
  display: flex;
1557
1558
  flex-direction: column;
1558
1559
  background-color: ${({ theme: e }) => {
1559
- var n, t;
1560
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || v.palette.neutral.N0;
1560
+ var t, n;
1561
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || C.palette.neutral.N0;
1561
1562
  }};
1562
1563
  width: ${({ $smallScreen: e }) => e ? "auto" : "450px"};
1563
1564
  height: auto;
@@ -1565,77 +1566,77 @@ const Ln = x.div`
1565
1566
  padding: 24px;
1566
1567
  gap: 24px;
1567
1568
  box-sizing: border-box;
1568
- `, wt = (e) => {
1569
+ `, ia = (e) => {
1569
1570
  const {
1570
- actionButtonLabel: n,
1571
- cancelButtonLabel: t,
1572
- children: a,
1573
- loading: i,
1574
- onClick: r,
1575
- onCloseModal: p,
1571
+ actionButtonLabel: t,
1572
+ cancelButtonLabel: n,
1573
+ children: r,
1574
+ loading: a,
1575
+ onClick: o,
1576
+ onCloseModal: c,
1576
1577
  portalId: l,
1577
1578
  title: s
1578
- } = e, c = B("(max-width: 768px)"), u = document.getElementById(l);
1579
- if (!u)
1579
+ } = e, d = H("(max-width: 768px)"), p = document.getElementById(l);
1580
+ if (!p)
1580
1581
  throw new Error(
1581
1582
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
1582
1583
  );
1583
- return Se(
1584
- /* @__PURE__ */ o(we, { children: /* @__PURE__ */ h(Bn, { $smallScreen: c, children: [
1585
- /* @__PURE__ */ h(g, { direction: "column", gap: "16px", children: [
1586
- /* @__PURE__ */ h(g, { alignContent: "center", justifyContent: "space-between", children: [
1587
- /* @__PURE__ */ o(S, { appearance: "dark", size: "small", type: "headline", children: s }),
1588
- /* @__PURE__ */ h(g, { alignItems: "center", children: [
1589
- /* @__PURE__ */ o(S, { children: "Cerrar" }),
1590
- /* @__PURE__ */ o(
1591
- L,
1584
+ return at(
1585
+ /* @__PURE__ */ i(tt, { children: /* @__PURE__ */ g(Fn, { $smallScreen: d, children: [
1586
+ /* @__PURE__ */ g(b, { direction: "column", gap: "16px", children: [
1587
+ /* @__PURE__ */ g(b, { alignContent: "center", justifyContent: "space-between", children: [
1588
+ /* @__PURE__ */ i(k, { appearance: "dark", size: "small", type: "headline", children: s }),
1589
+ /* @__PURE__ */ g(b, { alignItems: "center", children: [
1590
+ /* @__PURE__ */ i(k, { children: "Cerrar" }),
1591
+ /* @__PURE__ */ i(
1592
+ M,
1592
1593
  {
1593
1594
  appearance: "dark",
1594
- icon: /* @__PURE__ */ o(xe, {}),
1595
- onClick: p,
1595
+ icon: /* @__PURE__ */ i(Ye, {}),
1596
+ onClick: c,
1596
1597
  cursorHover: !0
1597
1598
  }
1598
1599
  )
1599
1600
  ] })
1600
1601
  ] }),
1601
- /* @__PURE__ */ o(R, {})
1602
+ /* @__PURE__ */ i(L, {})
1602
1603
  ] }),
1603
- a,
1604
- /* @__PURE__ */ h(g, { gap: "20px", justifyContent: "flex-end", children: [
1605
- /* @__PURE__ */ o(
1606
- U,
1604
+ r,
1605
+ /* @__PURE__ */ g(b, { gap: "20px", justifyContent: "flex-end", children: [
1606
+ /* @__PURE__ */ i(
1607
+ P,
1607
1608
  {
1608
1609
  appearance: "gray",
1609
- onClick: p,
1610
- iconBefore: /* @__PURE__ */ o(ve, {}),
1610
+ onClick: c,
1611
+ iconBefore: /* @__PURE__ */ i(Ze, {}),
1611
1612
  spacing: "wide",
1612
1613
  variant: "outlined",
1613
- children: t
1614
+ children: n
1614
1615
  }
1615
1616
  ),
1616
- /* @__PURE__ */ o(
1617
- U,
1617
+ /* @__PURE__ */ i(
1618
+ P,
1618
1619
  {
1619
1620
  appearance: "primary",
1620
- loading: i,
1621
- onClick: r,
1621
+ loading: a,
1622
+ onClick: o,
1622
1623
  spacing: "wide",
1623
1624
  variant: "filled",
1624
- children: n
1625
+ children: t
1625
1626
  }
1626
1627
  )
1627
1628
  ] })
1628
1629
  ] }) }),
1629
- u
1630
+ p
1630
1631
  );
1631
- }, Ct = (e) => {
1632
- const { appliedFilters: n, fields: t, onChange: a, noFiltersLabel: i } = e, r = B("(max-width: 768px)"), p = !n || n.length === 0;
1633
- return /* @__PURE__ */ h(g, { direction: "column", gap: "16px", children: [
1634
- r && /* @__PURE__ */ h(k, { children: [
1635
- /* @__PURE__ */ h(g, { gap: "6px", width: "100%", alignItems: "center", children: [
1636
- /* @__PURE__ */ o(L, { appearance: "gray", icon: /* @__PURE__ */ o(ye, {}) }),
1637
- /* @__PURE__ */ o(
1638
- j,
1632
+ }, oa = (e) => {
1633
+ const { appliedFilters: t, fields: n, onChange: r, noFiltersLabel: a } = e, o = H("(max-width: 768px)"), c = !t || t.length === 0;
1634
+ return /* @__PURE__ */ g(b, { direction: "column", gap: "16px", children: [
1635
+ o && /* @__PURE__ */ g(O, { children: [
1636
+ /* @__PURE__ */ g(b, { gap: "6px", width: "100%", alignItems: "center", children: [
1637
+ /* @__PURE__ */ i(M, { appearance: "gray", icon: /* @__PURE__ */ i(et, {}) }),
1638
+ /* @__PURE__ */ i(
1639
+ _,
1639
1640
  {
1640
1641
  background: !0,
1641
1642
  borderRadius: "8px",
@@ -1646,8 +1647,8 @@ const Ln = x.div`
1646
1647
  border: !0,
1647
1648
  width: "100%",
1648
1649
  height: "36px",
1649
- children: p ? /* @__PURE__ */ o(S, { size: "small", type: "label", appearance: "gray", children: i }) : n == null ? void 0 : n.map((l) => /* @__PURE__ */ o(
1650
- H,
1650
+ children: c ? /* @__PURE__ */ i(k, { size: "small", type: "label", appearance: "gray", children: a }) : t == null ? void 0 : t.map((l) => /* @__PURE__ */ i(
1651
+ X,
1651
1652
  {
1652
1653
  appearance: "primary",
1653
1654
  displayIcon: !0,
@@ -1661,19 +1662,19 @@ const Ln = x.div`
1661
1662
  }
1662
1663
  )
1663
1664
  ] }),
1664
- /* @__PURE__ */ o(R, { dashed: !0 })
1665
+ /* @__PURE__ */ i(L, { dashed: !0 })
1665
1666
  ] }),
1666
- t.map((l) => /* @__PURE__ */ h(g, { gap: "6px", alignItems: "center", children: [
1667
- /* @__PURE__ */ o(g, { padding: "22px 0 0 0", children: /* @__PURE__ */ o(L, { appearance: "primary", icon: l.icon }) }),
1668
- /* @__PURE__ */ o(
1669
- Ve,
1667
+ n.map((l) => /* @__PURE__ */ g(b, { gap: "6px", alignItems: "center", children: [
1668
+ /* @__PURE__ */ i(b, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(M, { appearance: "primary", icon: l.icon }) }),
1669
+ /* @__PURE__ */ i(
1670
+ Ot,
1670
1671
  {
1671
1672
  disabled: l.disabled,
1672
1673
  invalid: l.invalid,
1673
1674
  label: l.label,
1674
1675
  message: l.message,
1675
1676
  name: l.name,
1676
- onChange: a,
1677
+ onChange: r,
1677
1678
  options: l.options,
1678
1679
  placeholder: l.placeholder,
1679
1680
  required: l.required,
@@ -1684,137 +1685,137 @@ const Ln = x.div`
1684
1685
  )
1685
1686
  ] }, l.name))
1686
1687
  ] });
1687
- }, _n = (e) => {
1688
- const n = [];
1689
- 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(";");
1690
- }, Dt = (e) => {
1691
- var p;
1692
- const { decision: n, fallbackId: t, template: a } = e, i = (l) => typeof l == "object" && l !== null && "from" in l && "to" in l ? _n(l) : l, r = ((p = n.conditionsThatEstablishesTheDecision) == null ? void 0 : p.map((l, s) => {
1693
- var d;
1694
- const c = l == null ? void 0 : l.value;
1695
- return c == null || typeof c == "string" && c.trim() === "" || Array.isArray(c) && c.length === 0 ? null : {
1696
- ...(d = a.conditionsThatEstablishesTheDecision) == null ? void 0 : d[s],
1688
+ }, In = (e) => {
1689
+ const t = [];
1690
+ return e.from !== void 0 && e.from !== null && t.push(`>${e.from}`), e.to !== void 0 && e.to !== null && t.push(`<${e.to}`), t.join(";");
1691
+ }, la = (e) => {
1692
+ var c;
1693
+ const { decision: t, fallbackId: n, template: r } = e, a = (l) => typeof l == "object" && l !== null && "from" in l && "to" in l ? In(l) : l, o = ((c = t.conditionsThatEstablishesTheDecision) == null ? void 0 : c.map((l, s) => {
1694
+ var u;
1695
+ const d = l == null ? void 0 : l.value;
1696
+ return d == null || typeof d == "string" && d.trim() === "" || Array.isArray(d) && d.length === 0 ? null : {
1697
+ ...(u = r.conditionsThatEstablishesTheDecision) == null ? void 0 : u[s],
1697
1698
  ...l,
1698
- value: i(c)
1699
+ value: a(d)
1699
1700
  };
1700
1701
  }).filter(Boolean)) ?? [];
1701
1702
  return {
1702
- ...a,
1703
- ...n,
1704
- decisionId: t,
1705
- value: i(n.value),
1706
- conditionsThatEstablishesTheDecision: r
1703
+ ...r,
1704
+ ...t,
1705
+ decisionId: n,
1706
+ value: a(t.value),
1707
+ conditionsThatEstablishesTheDecision: o
1707
1708
  };
1708
- }, St = (e) => {
1709
+ }, sa = (e) => {
1709
1710
  if (typeof e != "string") return e;
1710
- const n = e.split(";").map((a) => a.trim()), t = {};
1711
- for (const a of n)
1712
- if (a.startsWith(">")) {
1713
- const i = parseFloat(a.slice(1));
1714
- isNaN(i) || (t.from = i);
1715
- } else if (a.startsWith("<")) {
1716
- const i = parseFloat(a.slice(1));
1717
- isNaN(i) || (t.to = i);
1711
+ const t = e.split(";").map((r) => r.trim()), n = {};
1712
+ for (const r of t)
1713
+ if (r.startsWith(">")) {
1714
+ const a = parseFloat(r.slice(1));
1715
+ isNaN(a) || (n.from = a);
1716
+ } else if (r.startsWith("<")) {
1717
+ const a = parseFloat(r.slice(1));
1718
+ isNaN(a) || (n.to = a);
1718
1719
  }
1719
- return t.from !== void 0 || t.to !== void 0 ? t : e;
1720
- }, Nt = (e) => {
1721
- const { dataDecision: n, originalDecision: t } = e, a = {
1722
- conditionName: n.ruleName || "",
1723
- labelName: n.labelName || "",
1724
- conditionDataType: n.decisionDataType || "alphabetical",
1725
- value: n.value || "",
1726
- howToSetTheCondition: n.howToSetTheDecision || "EqualTo",
1720
+ return n.from !== void 0 || n.to !== void 0 ? n : e;
1721
+ }, ca = (e) => {
1722
+ const { dataDecision: t, originalDecision: n } = e, r = {
1723
+ conditionName: t.ruleName || "",
1724
+ labelName: t.labelName || "",
1725
+ conditionDataType: t.decisionDataType || "alphabetical",
1726
+ value: t.value || "",
1727
+ howToSetTheCondition: t.howToSetTheDecision || "EqualTo",
1727
1728
  switchPlaces: !0,
1728
1729
  hidden: !1
1729
1730
  };
1730
1731
  return {
1731
- ...t,
1732
- conditionsThatEstablishesTheDecision: t.conditionsThatEstablishesTheDecision.map(
1733
- (i) => i.hidden ? { ...a } : i
1732
+ ...n,
1733
+ conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
1734
+ (a) => a.hidden ? { ...r } : a
1734
1735
  )
1735
1736
  };
1736
- }, Et = (e) => {
1737
- const { decisions: n } = e;
1738
- return n == null ? void 0 : n.map((t) => {
1739
- var i;
1740
- const a = (i = t.conditionsThatEstablishesTheDecision) == null ? void 0 : i.find(
1741
- (r) => r.hidden
1737
+ }, da = (e) => {
1738
+ const { decisions: t } = e;
1739
+ return t == null ? void 0 : t.map((n) => {
1740
+ var a;
1741
+ const r = (a = n.conditionsThatEstablishesTheDecision) == null ? void 0 : a.find(
1742
+ (o) => o.hidden
1742
1743
  );
1743
- return a ? {
1744
- ...t,
1745
- ruleName: t.ruleName,
1746
- labelName: t.labelName,
1747
- decisionDataType: t.decisionDataType,
1748
- value: t.value,
1749
- howToSetTheDecision: t.howToSetTheDecision,
1750
- conditionsThatEstablishesTheDecision: t.conditionsThatEstablishesTheDecision.map(
1751
- (r) => r.hidden ? { ...a, hidden: !1 } : r
1744
+ return r ? {
1745
+ ...n,
1746
+ ruleName: n.ruleName,
1747
+ labelName: n.labelName,
1748
+ decisionDataType: n.decisionDataType,
1749
+ value: n.value,
1750
+ howToSetTheDecision: n.howToSetTheDecision,
1751
+ conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
1752
+ (o) => o.hidden ? { ...r, hidden: !1 } : o
1752
1753
  )
1753
- } : t;
1754
+ } : n;
1754
1755
  });
1755
- }, Hn = (e) => ({
1756
- schema: ie().required("Required").test(
1756
+ }, Ln = (e) => ({
1757
+ schema: Re().required("Required").test(
1757
1758
  "non-empty",
1758
1759
  "Value cannot be empty",
1759
- (n) => n != null && n.trim() !== ""
1760
+ (t) => t != null && t.trim() !== ""
1760
1761
  ),
1761
1762
  value: e
1762
- }), qn = (e) => ({
1763
- schema: Ne().test(
1763
+ }), Mn = (e) => ({
1764
+ schema: it().test(
1764
1765
  "isArrayOrString",
1765
1766
  "Must be an array of strings/numbers or a single string",
1766
- (n) => Array.isArray(n) ? n.every(
1767
- (t) => typeof t == "string" || typeof t == "number"
1768
- ) : typeof n == "string"
1767
+ (t) => Array.isArray(t) ? t.every(
1768
+ (n) => typeof n == "string" || typeof n == "number"
1769
+ ) : typeof t == "string"
1769
1770
  ),
1770
1771
  value: e
1771
- }), Pn = (e) => ({
1772
- schema: Ne().test(
1772
+ }), Un = (e) => ({
1773
+ schema: it().test(
1773
1774
  "isArrayOrString",
1774
1775
  "Must be an array of strings/numbers or a single string",
1775
- (n) => Array.isArray(n) ? n.every(
1776
- (t) => typeof t == "string" || typeof t == "number"
1777
- ) : typeof n == "string"
1776
+ (t) => Array.isArray(t) ? t.every(
1777
+ (n) => typeof n == "string" || typeof n == "number"
1778
+ ) : typeof t == "string"
1778
1779
  ),
1779
1780
  value: e
1780
- }), Gn = (e) => {
1781
- const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
1781
+ }), Vn = (e) => {
1782
+ const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
1782
1783
  return {
1783
- schema: W({
1784
- from: ee().required("Range From is required").max(t, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
1785
- to: ee().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
1784
+ schema: se({
1785
+ from: we().required("Range From is required").max(n, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
1786
+ to: we().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
1786
1787
  "is-greater",
1787
1788
  "To value must be greater than From value",
1788
- function(a) {
1789
- const { from: i } = this.parent;
1790
- return a > i;
1789
+ function(r) {
1790
+ const { from: a } = this.parent;
1791
+ return r > a;
1791
1792
  }
1792
1793
  )
1793
1794
  }),
1794
- value: { from: n, to: t }
1795
+ value: { from: t, to: n }
1795
1796
  };
1796
- }, Z = (e, n) => n === I.PERCENTAGE ? {
1797
- schema: ee().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
1797
+ }, ve = (e, t) => t === U.PERCENTAGE ? {
1798
+ schema: we().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
1798
1799
  value: e
1799
1800
  } : {
1800
- schema: ie().required("Required"),
1801
+ schema: Re().required("Required"),
1801
1802
  value: e
1802
- }, Qn = {
1803
- [D.LIST_OF_VALUES]: qn,
1804
- [D.LIST_OF_VALUES_MULTI]: Pn,
1805
- [D.RANGE]: Gn,
1806
- [D.GREATER_THAN]: Z,
1807
- [D.LESS_THAN]: Z,
1808
- [D.EQUAL]: Z
1809
- }, me = (e) => Qn[e] || Hn;
1810
- function Wn({
1803
+ }, _n = {
1804
+ [A.LIST_OF_VALUES]: Mn,
1805
+ [A.LIST_OF_VALUES_MULTI]: Un,
1806
+ [A.RANGE]: Vn,
1807
+ [A.GREATER_THAN]: ve,
1808
+ [A.LESS_THAN]: ve,
1809
+ [A.EQUAL]: ve
1810
+ }, ze = (e) => _n[e] || Ln;
1811
+ function Pn({
1811
1812
  decision: e,
1812
- onSubmitEvent: n,
1813
- textValues: t
1813
+ onSubmitEvent: t,
1814
+ textValues: n
1814
1815
  }) {
1815
- const a = {
1816
+ const r = {
1816
1817
  ruleName: e.ruleName || "",
1817
- decisionDataType: e.decisionDataType || I.ALPHABETICAL,
1818
+ decisionDataType: e.decisionDataType || U.ALPHABETICAL,
1818
1819
  howToSetTheDecision: e.howToSetTheDecision || "",
1819
1820
  value: e.value || "",
1820
1821
  effectiveFrom: e.effectiveFrom || "",
@@ -1824,25 +1825,25 @@ function Wn({
1824
1825
  checkClosed: !1,
1825
1826
  terms: !0
1826
1827
  };
1827
- let i;
1828
- const r = {
1829
- ruleName: ie().required("Name is required"),
1830
- value: ue(() => me(
1831
- i.values.howToSetTheDecision
1828
+ let a;
1829
+ const o = {
1830
+ ruleName: Re().required("Name is required"),
1831
+ value: _e(() => ze(
1832
+ a.values.howToSetTheDecision
1832
1833
  )(
1833
- i.values.value,
1834
- i.values.decisionDataType
1834
+ a.values.value,
1835
+ a.values.decisionDataType
1835
1836
  ).schema),
1836
- conditionsThatEstablishesTheDecision: ue((s, { parent: c }) => {
1837
- var b;
1838
- if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return W().shape({});
1839
- const d = (b = e.conditionsThatEstablishesTheDecision) == null ? void 0 : b.reduce(
1837
+ conditionsThatEstablishesTheDecision: _e((s, { parent: d }) => {
1838
+ var h;
1839
+ if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionsThatEstablishesTheDecision || {}).length > 0) return se().shape({});
1840
+ const u = (h = e.conditionsThatEstablishesTheDecision) == null ? void 0 : h.reduce(
1840
1841
  (m, f) => {
1841
- if (i.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
1842
- const C = me(
1842
+ if (a.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
1843
+ const D = ze(
1843
1844
  f.howToSetTheCondition
1844
1845
  );
1845
- m[f.conditionName] = C(
1846
+ m[f.conditionName] = D(
1846
1847
  f.value,
1847
1848
  f.conditionDataType
1848
1849
  ).schema;
@@ -1851,7 +1852,7 @@ function Wn({
1851
1852
  },
1852
1853
  {}
1853
1854
  );
1854
- return W(d).test(
1855
+ return se(u).test(
1855
1856
  "at-least-one-condition",
1856
1857
  "It must be at least one condition in order for the decision to be validated correctly.",
1857
1858
  (m) => m ? Object.values(m).some(
@@ -1860,27 +1861,27 @@ function Wn({
1860
1861
  );
1861
1862
  })
1862
1863
  };
1863
- t.terms && (r.effectiveFrom = pe().required(
1864
+ n.terms && (o.effectiveFrom = Pe().required(
1864
1865
  "effective From date is required"
1865
- ), r.validUntil = pe().when(
1866
+ ), o.validUntil = Pe().when(
1866
1867
  "checkClosed",
1867
- (s, c, { parent: u }) => (u == null ? void 0 : u.checkClosed) ? c.required("valid Until date is required").test(
1868
+ (s, d, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? d.required("valid Until date is required").test(
1868
1869
  "is-after-startDate",
1869
1870
  "valid Until date must be greater than or equal to Start date",
1870
- function(b) {
1871
+ function(h) {
1871
1872
  const m = this.parent.effectiveFrom;
1872
- return !m || !b ? !0 : new Date(b) >= new Date(m);
1873
+ return !m || !h ? !0 : new Date(h) >= new Date(m);
1873
1874
  }
1874
- ) : c.notRequired()
1875
+ ) : d.notRequired()
1875
1876
  ));
1876
- const p = W(r);
1877
- return i = qe({
1878
- initialValues: a,
1879
- validationSchema: p,
1877
+ const c = se(o);
1878
+ return a = Mt({
1879
+ initialValues: r,
1880
+ validationSchema: c,
1880
1881
  validateOnBlur: !0,
1881
1882
  onSubmit: (s) => {
1882
- var u;
1883
- const c = {
1883
+ var p;
1884
+ const d = {
1884
1885
  ...e,
1885
1886
  ruleName: s.ruleName,
1886
1887
  decisionDataType: s.decisionDataType,
@@ -1888,44 +1889,44 @@ function Wn({
1888
1889
  value: s.value,
1889
1890
  effectiveFrom: s.effectiveFrom,
1890
1891
  validUntil: s.validUntil,
1891
- conditionsThatEstablishesTheDecision: (u = e.conditionsThatEstablishesTheDecision) == null ? void 0 : u.filter((d) => {
1892
- const b = s.conditionsThatEstablishesTheDecision[d.conditionName];
1893
- return b != null && b !== "";
1894
- }).map((d) => ({
1895
- ...d,
1896
- value: s.conditionsThatEstablishesTheDecision[d.conditionName]
1892
+ conditionsThatEstablishesTheDecision: (p = e.conditionsThatEstablishesTheDecision) == null ? void 0 : p.filter((u) => {
1893
+ const h = s.conditionsThatEstablishesTheDecision[u.conditionName];
1894
+ return h != null && h !== "";
1895
+ }).map((u) => ({
1896
+ ...u,
1897
+ value: s.conditionsThatEstablishesTheDecision[u.conditionName]
1897
1898
  }))
1898
1899
  };
1899
- n(c);
1900
+ t(d);
1900
1901
  }
1901
- }), { formik: i, handleToggleNoneChange: (s) => {
1902
- var c;
1903
- i.setFieldValue("toggleNone", s), (c = e.conditionsThatEstablishesTheDecision) == null || c.forEach((u) => {
1902
+ }), { formik: a, handleToggleNoneChange: (s) => {
1903
+ var d;
1904
+ a.setFieldValue("toggleNone", s), (d = e.conditionsThatEstablishesTheDecision) == null || d.forEach((p) => {
1904
1905
  if (s)
1905
- i.setFieldValue(
1906
- `conditionsThatEstablishesTheDecision.${u.conditionName}`,
1906
+ a.setFieldValue(
1907
+ `conditionsThatEstablishesTheDecision.${p.conditionName}`,
1907
1908
  void 0
1908
1909
  );
1909
1910
  else {
1910
- const d = u.howToSetTheCondition === D.LIST_OF_VALUES_MULTI ? [] : "";
1911
- i.setFieldValue(
1912
- `conditionsThatEstablishesTheDecision.${u.conditionName}`,
1913
- d
1911
+ const u = p.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
1912
+ a.setFieldValue(
1913
+ `conditionsThatEstablishesTheDecision.${p.conditionName}`,
1914
+ u
1914
1915
  );
1915
1916
  }
1916
1917
  });
1917
1918
  } };
1918
1919
  }
1919
- const Yn = x.div`
1920
+ const Bn = N.div`
1920
1921
  & > div {
1921
1922
  border-radius: 8px;
1922
1923
  border: 1px solid
1923
1924
  ${({ theme: e }) => {
1924
- var n, t;
1925
- return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || v.palette.neutral.N30;
1925
+ var t, n;
1926
+ return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
1926
1927
  }};
1927
1928
  }
1928
- `, Kn = x.div`
1929
+ `, jn = N.div`
1929
1930
  width: 100%;
1930
1931
  height: 100%;
1931
1932
  overflow-y: auto;
@@ -1942,61 +1943,61 @@ const Yn = x.div`
1942
1943
  background-color: #ebecf0;
1943
1944
  border-radius: 8px;
1944
1945
  }
1945
- `, Jn = (e) => {
1946
+ `, zn = (e) => {
1946
1947
  const {
1947
- checked: n,
1948
- children: t,
1949
- handleToggleChange: a,
1950
- id: i,
1951
- labelToggle: r,
1952
- name: p,
1948
+ checked: t,
1949
+ children: n,
1950
+ handleToggleChange: r,
1951
+ id: a,
1952
+ labelToggle: o,
1953
+ name: c,
1953
1954
  valueToggle: l = ""
1954
- } = e, [s, c] = O(n), u = (d) => {
1955
- c(d.target.checked), a(d);
1955
+ } = e, [s, d] = V(t), p = (u) => {
1956
+ d(u.target.checked), r(u);
1956
1957
  };
1957
- return oe(() => {
1958
- c(n);
1959
- }, [n]), /* @__PURE__ */ h(k, { children: [
1960
- /* @__PURE__ */ o(g, { children: /* @__PURE__ */ o(
1961
- Ce,
1958
+ return ke(() => {
1959
+ d(t);
1960
+ }, [t]), /* @__PURE__ */ g(O, { children: [
1961
+ /* @__PURE__ */ i(b, { children: /* @__PURE__ */ i(
1962
+ nt,
1962
1963
  {
1963
1964
  checked: s,
1964
- id: i,
1965
- name: p,
1966
- onChange: u,
1965
+ id: a,
1966
+ name: c,
1967
+ onChange: p,
1967
1968
  size: "small",
1968
1969
  value: l,
1969
- children: /* @__PURE__ */ o(S, { size: "medium", type: "label", weight: "bold", children: r })
1970
+ children: /* @__PURE__ */ i(k, { size: "medium", type: "label", weight: "bold", children: o })
1970
1971
  }
1971
1972
  ) }),
1972
- s && /* @__PURE__ */ o(k, { children: t })
1973
+ s && /* @__PURE__ */ i(O, { children: n })
1973
1974
  ] });
1974
- }, Xn = (e) => {
1975
+ }, Hn = (e) => {
1975
1976
  const {
1976
- onHandleStartChange: n,
1977
- onHandleEndChange: t,
1978
- onCheckClosedChange: a,
1979
- labelStart: i,
1980
- labelEnd: r,
1981
- checkedClosed: p = !1,
1977
+ onHandleStartChange: t,
1978
+ onHandleEndChange: n,
1979
+ onCheckClosedChange: r,
1980
+ labelStart: a,
1981
+ labelEnd: o,
1982
+ checkedClosed: c = !1,
1982
1983
  required: l = !1,
1983
1984
  valueStart: s = "",
1984
- valueEnd: c = "",
1985
- messageStart: u = "",
1986
- messageEnd: d = "",
1987
- statusStart: b = "pending",
1985
+ valueEnd: d = "",
1986
+ messageStart: p = "",
1987
+ messageEnd: u = "",
1988
+ statusStart: h = "pending",
1988
1989
  statusEnd: m = "pending"
1989
- } = e, [f, y] = O(p), [C, w] = O(s), [E, $] = O(c), A = ({ target: F }) => {
1990
- y(F.checked), a && a(F.checked);
1991
- }, T = (F) => {
1992
- w(F.target.value), n(F);
1993
- }, N = (F) => {
1994
- $(F.target.value), t(F);
1995
- }, M = B("(max-width: 400px)");
1996
- return /* @__PURE__ */ h(k, { children: [
1997
- /* @__PURE__ */ h(g, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1998
- /* @__PURE__ */ o(
1999
- S,
1990
+ } = e, [f, w] = V(c), [D, E] = V(s), [x, S] = V(d), T = ({ target: F }) => {
1991
+ w(F.checked), r && r(F.checked);
1992
+ }, y = (F) => {
1993
+ E(F.target.value), t(F);
1994
+ }, R = (F) => {
1995
+ S(F.target.value), n(F);
1996
+ }, I = H("(max-width: 400px)");
1997
+ return /* @__PURE__ */ g(O, { children: [
1998
+ /* @__PURE__ */ g(b, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1999
+ /* @__PURE__ */ i(
2000
+ k,
2000
2001
  {
2001
2002
  appearance: "gray",
2002
2003
  margin: "10px 0",
@@ -2006,18 +2007,18 @@ const Yn = x.div`
2006
2007
  children: "Vigencia"
2007
2008
  }
2008
2009
  ),
2009
- /* @__PURE__ */ o(
2010
- g,
2010
+ /* @__PURE__ */ i(
2011
+ b,
2011
2012
  {
2012
2013
  alignContent: "center",
2013
2014
  justifyContent: "center",
2014
2015
  wrap: "wrap",
2015
2016
  gap: "4px",
2016
- children: /* @__PURE__ */ o(
2017
- je,
2017
+ children: /* @__PURE__ */ i(
2018
+ Ft,
2018
2019
  {
2019
2020
  label: "Cerrada",
2020
- onChange: A,
2021
+ onChange: T,
2021
2022
  checked: f,
2022
2023
  value: ""
2023
2024
  }
@@ -2025,233 +2026,1067 @@ const Yn = x.div`
2025
2026
  }
2026
2027
  )
2027
2028
  ] }),
2028
- /* @__PURE__ */ h(
2029
- g,
2029
+ /* @__PURE__ */ g(
2030
+ b,
2030
2031
  {
2031
- direction: M ? "column" : "row",
2032
+ direction: I ? "column" : "row",
2032
2033
  justifyContent: "space-between",
2033
2034
  gap: "24px",
2034
2035
  children: [
2035
- /* @__PURE__ */ o(
2036
- de,
2036
+ /* @__PURE__ */ i(
2037
+ Ue,
2037
2038
  {
2038
2039
  id: "dateStart",
2039
- label: i,
2040
- onChange: T,
2041
- value: C,
2040
+ label: a,
2041
+ onChange: y,
2042
+ value: D,
2042
2043
  required: l,
2043
2044
  size: "compact",
2044
- status: b,
2045
- message: u
2045
+ status: h,
2046
+ message: p
2046
2047
  }
2047
2048
  ),
2048
- f && /* @__PURE__ */ o(
2049
- de,
2049
+ f && /* @__PURE__ */ i(
2050
+ Ue,
2050
2051
  {
2051
2052
  id: "dateEnd",
2052
- label: r,
2053
- onChange: N,
2054
- value: E,
2053
+ label: o,
2054
+ onChange: R,
2055
+ value: x,
2055
2056
  required: l,
2056
2057
  size: "compact",
2057
2058
  status: m,
2058
- message: d
2059
+ message: u
2059
2060
  }
2060
2061
  )
2061
2062
  ]
2062
2063
  }
2063
2064
  )
2064
2065
  ] });
2065
- }, Zn = (e) => {
2066
+ }, qn = (e) => {
2066
2067
  const {
2067
- formik: n,
2068
- textValues: t,
2069
- onCancel: a,
2070
- visibleConditions: i,
2071
- normalizedDecision: r,
2072
- handleToggleNoneChange: p,
2068
+ formik: t,
2069
+ textValues: n,
2070
+ onCancel: r,
2071
+ visibleConditions: a,
2072
+ normalizedDecision: o,
2073
+ handleToggleNoneChange: c,
2073
2074
  handleConditionToggleChange: l,
2074
2075
  showConditionsError: s,
2075
- termStartStatus: c,
2076
- termEndStatus: u
2076
+ termStartStatus: d,
2077
+ termEndStatus: p
2077
2078
  } = e;
2078
- return /* @__PURE__ */ o("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ h(g, { direction: "column", gap: "24px", children: [
2079
- ce({
2080
- condition: r,
2081
- formik: n,
2079
+ return /* @__PURE__ */ i("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ g(b, { direction: "column", gap: "24px", children: [
2080
+ Ve({
2081
+ condition: o,
2082
+ formik: t,
2082
2083
  isDecision: !0
2083
2084
  }),
2084
- /* @__PURE__ */ o(R, { dashed: !0 }),
2085
- /* @__PURE__ */ o(Yn, { children: /* @__PURE__ */ o(Kn, { children: /* @__PURE__ */ h(
2086
- g,
2085
+ /* @__PURE__ */ i(L, { dashed: !0 }),
2086
+ /* @__PURE__ */ i(Bn, { children: /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ g(
2087
+ b,
2087
2088
  {
2088
2089
  direction: "column",
2089
2090
  padding: "6px 12px",
2090
2091
  gap: "16px",
2091
2092
  height: "272px",
2092
2093
  children: [
2093
- /* @__PURE__ */ h(
2094
- g,
2094
+ /* @__PURE__ */ g(
2095
+ b,
2095
2096
  {
2096
2097
  justifyContent: "space-between",
2097
2098
  alignItems: "center",
2098
2099
  gap: "64px",
2099
2100
  children: [
2100
- /* @__PURE__ */ o(S, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
2101
- /* @__PURE__ */ o(
2102
- Ce,
2101
+ /* @__PURE__ */ i(k, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
2102
+ /* @__PURE__ */ i(
2103
+ nt,
2103
2104
  {
2104
2105
  id: "toggleNone",
2105
- onChange: () => p(!n.values.toggleNone),
2106
- checked: n.values.toggleNone,
2106
+ onChange: () => c(!t.values.toggleNone),
2107
+ checked: t.values.toggleNone,
2107
2108
  size: "small",
2108
- children: /* @__PURE__ */ o(S, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
2109
+ children: /* @__PURE__ */ i(k, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
2109
2110
  }
2110
2111
  )
2111
2112
  ]
2112
2113
  }
2113
2114
  ),
2114
- /* @__PURE__ */ o(g, { direction: "column", gap: "20px", children: i == null ? void 0 : i.map((d) => /* @__PURE__ */ o(
2115
- Jn,
2115
+ /* @__PURE__ */ i(b, { direction: "column", gap: "20px", children: a == null ? void 0 : a.map((u) => /* @__PURE__ */ i(
2116
+ zn,
2116
2117
  {
2117
- id: `toggle-${d.conditionName}`,
2118
- name: `toggle.${d.conditionName}`,
2119
- labelToggle: d.labelName,
2120
- checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[d.conditionName] !== void 0,
2121
- handleToggleChange: (b) => l(
2122
- d.conditionName,
2123
- d.howToSetTheCondition === D.LIST_OF_VALUES_MULTI
2124
- )(b.target.checked),
2125
- children: ce({ condition: d, formik: n })
2118
+ id: `toggle-${u.conditionName}`,
2119
+ name: `toggle.${u.conditionName}`,
2120
+ labelToggle: u.labelName,
2121
+ checked: !t.values.toggleNone && t.values.conditionsThatEstablishesTheDecision[u.conditionName] !== void 0,
2122
+ handleToggleChange: (h) => l(
2123
+ u.conditionName,
2124
+ u.howToSetTheCondition === A.LIST_OF_VALUES_MULTI
2125
+ )(h.target.checked),
2126
+ children: Ve({ condition: u, formik: t })
2126
2127
  },
2127
- d.conditionName
2128
+ u.conditionName
2128
2129
  )) })
2129
2130
  ]
2130
2131
  }
2131
2132
  ) }) }),
2132
- t.terms && /* @__PURE__ */ h(k, { children: [
2133
- /* @__PURE__ */ o(R, { dashed: !0 }),
2134
- /* @__PURE__ */ o(
2135
- Xn,
2133
+ n.terms && /* @__PURE__ */ g(O, { children: [
2134
+ /* @__PURE__ */ i(L, { dashed: !0 }),
2135
+ /* @__PURE__ */ i(
2136
+ Hn,
2136
2137
  {
2137
- labelStart: t.termStart,
2138
- labelEnd: t.termEnd,
2139
- valueStart: n.values.effectiveFrom,
2140
- valueEnd: n.values.validUntil,
2141
- messageStart: n.errors.effectiveFrom,
2142
- messageEnd: n.errors.validUntil,
2143
- statusStart: c,
2144
- statusEnd: u,
2145
- onHandleStartChange: (d) => n.setFieldValue("effectiveFrom", d.target.value),
2146
- onHandleEndChange: (d) => n.setFieldValue("validUntil", d.target.value),
2147
- onCheckClosedChange: (d) => {
2148
- n.setFieldValue("checkClosed", d), d && n.setFieldValue("validUntil", "");
2138
+ labelStart: n.termStart,
2139
+ labelEnd: n.termEnd,
2140
+ valueStart: t.values.effectiveFrom,
2141
+ valueEnd: t.values.validUntil,
2142
+ messageStart: t.errors.effectiveFrom,
2143
+ messageEnd: t.errors.validUntil,
2144
+ statusStart: d,
2145
+ statusEnd: p,
2146
+ onHandleStartChange: (u) => t.setFieldValue("effectiveFrom", u.target.value),
2147
+ onHandleEndChange: (u) => t.setFieldValue("validUntil", u.target.value),
2148
+ onCheckClosedChange: (u) => {
2149
+ t.setFieldValue("checkClosed", u), u && t.setFieldValue("validUntil", "");
2149
2150
  },
2150
- checkedClosed: n.values.checkClosed
2151
+ checkedClosed: t.values.checkClosed
2151
2152
  }
2152
2153
  )
2153
2154
  ] }),
2154
- /* @__PURE__ */ o(R, {}),
2155
- s && /* @__PURE__ */ o(S, { type: "label", size: "medium", appearance: "danger", children: String(n.errors.conditionsThatEstablishesTheDecision) }),
2156
- /* @__PURE__ */ h(g, { direction: "row", justifyContent: "end", gap: "16px", children: [
2157
- /* @__PURE__ */ o(U, { appearance: "gray", onClick: a, children: t.cancel }),
2158
- /* @__PURE__ */ o(U, { type: "submit", children: t.confirm })
2155
+ /* @__PURE__ */ i(L, {}),
2156
+ s && /* @__PURE__ */ i(k, { type: "label", size: "medium", appearance: "danger", children: String(t.errors.conditionsThatEstablishesTheDecision) }),
2157
+ /* @__PURE__ */ g(b, { direction: "row", justifyContent: "end", gap: "16px", children: [
2158
+ /* @__PURE__ */ i(P, { appearance: "gray", onClick: r, children: n.cancel }),
2159
+ /* @__PURE__ */ i(P, { type: "submit", children: n.confirm })
2159
2160
  ] })
2160
2161
  ] }) });
2161
- }, Ie = (e) => {
2162
+ }, ut = (e) => {
2162
2163
  var m;
2163
- const { decision: n, onSubmitEvent: t, textValues: a, onCancel: i } = e, { formik: r, handleToggleNoneChange: p } = Wn({
2164
- decision: n,
2165
- onSubmitEvent: t,
2166
- textValues: a
2164
+ const { decision: t, onSubmitEvent: n, textValues: r, onCancel: a } = e, { formik: o, handleToggleNoneChange: c } = Pn({
2165
+ decision: t,
2166
+ onSubmitEvent: n,
2167
+ textValues: r
2167
2168
  }), l = {
2168
- ruleName: n.ruleName,
2169
- labelName: n.labelName,
2170
- howToSetTheCondition: n.howToSetTheDecision,
2171
- decisionDataType: n.decisionDataType,
2172
- listOfPossibleValues: n.listOfPossibleValues
2173
- }, s = ((m = n.conditionsThatEstablishesTheDecision) == null ? void 0 : m.filter(
2169
+ ruleName: t.ruleName,
2170
+ labelName: t.labelName,
2171
+ howToSetTheCondition: t.howToSetTheDecision,
2172
+ decisionDataType: t.decisionDataType,
2173
+ listOfPossibleValues: t.listOfPossibleValues
2174
+ }, s = ((m = t.conditionsThatEstablishesTheDecision) == null ? void 0 : m.filter(
2174
2175
  (f) => !f.hidden
2175
- )) || [], c = !!r.errors.conditionsThatEstablishesTheDecision && r.submitCount > 0, u = r.touched.effectiveFrom ? r.errors.effectiveFrom ? "invalid" : "valid" : void 0, d = r.touched.validUntil ? r.errors.validUntil ? "invalid" : "valid" : void 0;
2176
- return /* @__PURE__ */ o(
2177
- Zn,
2176
+ )) || [], d = !!o.errors.conditionsThatEstablishesTheDecision && o.submitCount > 0, p = o.touched.effectiveFrom ? o.errors.effectiveFrom ? "invalid" : "valid" : void 0, u = o.touched.validUntil ? o.errors.validUntil ? "invalid" : "valid" : void 0;
2177
+ return /* @__PURE__ */ i(
2178
+ qn,
2178
2179
  {
2179
- formik: r,
2180
- onCancel: i,
2181
- textValues: a,
2182
- decision: n,
2180
+ formik: o,
2181
+ onCancel: a,
2182
+ textValues: r,
2183
+ decision: t,
2183
2184
  visibleConditions: s,
2184
2185
  normalizedDecision: l,
2185
- handleToggleNoneChange: p,
2186
- handleConditionToggleChange: (f, y) => (C) => {
2187
- if (!C)
2188
- r.setFieldValue(
2186
+ handleToggleNoneChange: c,
2187
+ handleConditionToggleChange: (f, w) => (D) => {
2188
+ if (!D)
2189
+ o.setFieldValue(
2189
2190
  `conditionsThatEstablishesTheDecision.${f}`,
2190
2191
  void 0
2191
- ), r.setFieldTouched(
2192
+ ), o.setFieldTouched(
2192
2193
  `conditionsThatEstablishesTheDecision.${f}`,
2193
2194
  !1,
2194
2195
  !1
2195
2196
  );
2196
2197
  else {
2197
- const w = y ? [] : "";
2198
- r.setFieldValue(
2198
+ const E = w ? [] : "";
2199
+ o.setFieldValue(
2199
2200
  `conditionsThatEstablishesTheDecision.${f}`,
2200
- w
2201
+ E
2201
2202
  );
2202
2203
  }
2203
2204
  },
2204
- showConditionsError: c,
2205
- termStartStatus: u,
2206
- termEndStatus: d
2205
+ showConditionsError: d,
2206
+ termStartStatus: p,
2207
+ termEndStatus: u
2207
2208
  }
2208
2209
  );
2209
- }, kt = (e) => {
2210
- var i;
2211
- const { decisionTemplate: n } = e, t = { ...n }, a = (i = t.conditionsThatEstablishesTheDecision) == null ? void 0 : i.find(
2212
- (r) => r.switchPlaces
2210
+ }, ua = (e) => {
2211
+ var a;
2212
+ const { decisionTemplate: t } = e, n = { ...t }, r = (a = n.conditionsThatEstablishesTheDecision) == null ? void 0 : a.find(
2213
+ (o) => o.switchPlaces
2213
2214
  );
2214
- return a ? {
2215
- ...t,
2216
- ruleName: a.conditionName,
2217
- labelName: a.labelName,
2218
- decisionDataType: a.conditionDataType,
2219
- value: a.value,
2220
- howToSetTheDecision: a.howToSetTheCondition,
2221
- conditionsThatEstablishesTheDecision: t.conditionsThatEstablishesTheDecision.map(
2222
- (r) => r.conditionName === a.conditionName ? { ...r, hidden: !0 } : r
2215
+ return r ? {
2216
+ ...n,
2217
+ ruleName: r.conditionName,
2218
+ labelName: r.labelName,
2219
+ decisionDataType: r.conditionDataType,
2220
+ value: r.value,
2221
+ howToSetTheDecision: r.howToSetTheCondition,
2222
+ conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
2223
+ (o) => o.conditionName === r.conditionName ? { ...o, hidden: !0 } : o
2223
2224
  )
2224
- } : t;
2225
- }, At = (e) => {
2226
- const { decisions: n } = e;
2227
- return n == null ? void 0 : n.map((t) => {
2228
- var i;
2229
- const a = (i = t.conditionsThatEstablishesTheDecision) == null ? void 0 : i.find(
2230
- (r) => r.switchPlaces
2225
+ } : n;
2226
+ }, pa = (e) => {
2227
+ const { decisions: t } = e;
2228
+ return t == null ? void 0 : t.map((n) => {
2229
+ var a;
2230
+ const r = (a = n.conditionsThatEstablishesTheDecision) == null ? void 0 : a.find(
2231
+ (o) => o.switchPlaces
2231
2232
  );
2232
- return a ? {
2233
- ...t,
2234
- ruleName: a.conditionName,
2235
- labelName: a.labelName,
2236
- decisionDataType: a.conditionDataType,
2237
- value: a.value,
2238
- howToSetTheDecision: a.howToSetTheCondition,
2239
- conditionsThatEstablishesTheDecision: t.conditionsThatEstablishesTheDecision.map(
2240
- (r) => r.conditionName === a.conditionName ? { ...r, hidden: !0 } : r
2233
+ return r ? {
2234
+ ...n,
2235
+ ruleName: r.conditionName,
2236
+ labelName: r.labelName,
2237
+ decisionDataType: r.conditionDataType,
2238
+ value: r.value,
2239
+ howToSetTheDecision: r.howToSetTheCondition,
2240
+ conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
2241
+ (o) => o.conditionName === r.conditionName ? { ...o, hidden: !0 } : o
2241
2242
  )
2242
- } : t;
2243
+ } : n;
2243
2244
  });
2244
- }, _ = /* @__PURE__ */ new Map(), et = (e, n) => _.get(`${n}:${e}`), nt = (e, n, t) => {
2245
- const a = `${n}:${e}`;
2246
- if (_.set(a, t), _.size > 1e3) {
2247
- const i = _.keys().next().value;
2248
- i !== void 0 && _.delete(i);
2245
+ };
2246
+ /**
2247
+ * @remix-run/router v1.23.0
2248
+ *
2249
+ * Copyright (c) Remix Software Inc.
2250
+ *
2251
+ * This source code is licensed under the MIT license found in the
2252
+ * LICENSE.md file in the root directory of this source tree.
2253
+ *
2254
+ * @license MIT
2255
+ */
2256
+ function Ee() {
2257
+ return Ee = Object.assign ? Object.assign.bind() : function(e) {
2258
+ for (var t = 1; t < arguments.length; t++) {
2259
+ var n = arguments[t];
2260
+ for (var r in n)
2261
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2262
+ }
2263
+ return e;
2264
+ }, Ee.apply(this, arguments);
2265
+ }
2266
+ var He;
2267
+ (function(e) {
2268
+ e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
2269
+ })(He || (He = {}));
2270
+ function $(e, t) {
2271
+ if (e === !1 || e === null || typeof e > "u")
2272
+ throw new Error(t);
2273
+ }
2274
+ function te(e, t) {
2275
+ if (!e) {
2276
+ typeof console < "u" && console.warn(t);
2277
+ try {
2278
+ throw new Error(t);
2279
+ } catch {
2280
+ }
2249
2281
  }
2250
- }, be = /* @__PURE__ */ new Map(), tt = 1e3, at = (e) => {
2251
- const n = Date.now(), t = be.get(e) || 0;
2252
- return n - t < tt ? !0 : (be.set(e, n), !1);
2253
- }, ot = (e) => {
2254
- const n = Ge(e);
2282
+ }
2283
+ function Se(e) {
2284
+ let {
2285
+ pathname: t = "/",
2286
+ search: n = "",
2287
+ hash: r = ""
2288
+ } = e;
2289
+ return n && n !== "?" && (t += n.charAt(0) === "?" ? n : "?" + n), r && r !== "#" && (t += r.charAt(0) === "#" ? r : "#" + r), t;
2290
+ }
2291
+ function pt(e) {
2292
+ let t = {};
2293
+ if (e) {
2294
+ let n = e.indexOf("#");
2295
+ n >= 0 && (t.hash = e.substr(n), e = e.substr(0, n));
2296
+ let r = e.indexOf("?");
2297
+ r >= 0 && (t.search = e.substr(r), e = e.substr(0, r)), e && (t.pathname = e);
2298
+ }
2299
+ return t;
2300
+ }
2301
+ var qe;
2302
+ (function(e) {
2303
+ e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
2304
+ })(qe || (qe = {}));
2305
+ function We(e, t) {
2306
+ typeof e == "string" && (e = {
2307
+ path: e,
2308
+ caseSensitive: !1,
2309
+ end: !0
2310
+ });
2311
+ let [n, r] = Wn(e.path, e.caseSensitive, e.end), a = t.match(n);
2312
+ if (!a) return null;
2313
+ let o = a[0], c = o.replace(/(.)\/+$/, "$1"), l = a.slice(1);
2314
+ return {
2315
+ params: r.reduce((d, p, u) => {
2316
+ let {
2317
+ paramName: h,
2318
+ isOptional: m
2319
+ } = p;
2320
+ if (h === "*") {
2321
+ let w = l[u] || "";
2322
+ c = o.slice(0, o.length - w.length).replace(/(.)\/+$/, "$1");
2323
+ }
2324
+ const f = l[u];
2325
+ return m && !f ? d[h] = void 0 : d[h] = (f || "").replace(/%2F/g, "/"), d;
2326
+ }, {}),
2327
+ pathname: o,
2328
+ pathnameBase: c,
2329
+ pattern: e
2330
+ };
2331
+ }
2332
+ function Wn(e, t, n) {
2333
+ t === void 0 && (t = !1), n === void 0 && (n = !0), te(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
2334
+ let r = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (c, l, s) => (r.push({
2335
+ paramName: l,
2336
+ isOptional: s != null
2337
+ }), s ? "/?([^\\/]+)?" : "/([^\\/]+)"));
2338
+ return e.endsWith("*") ? (r.push({
2339
+ paramName: "*"
2340
+ }), a += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? a += "\\/*$" : e !== "" && e !== "/" && (a += "(?:(?=\\/|$))"), [new RegExp(a, t ? void 0 : "i"), r];
2341
+ }
2342
+ function G(e, t) {
2343
+ if (t === "/") return e;
2344
+ if (!e.toLowerCase().startsWith(t.toLowerCase()))
2345
+ return null;
2346
+ let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
2347
+ return r && r !== "/" ? null : e.slice(n) || "/";
2348
+ }
2349
+ function Gn(e, t) {
2350
+ t === void 0 && (t = "/");
2351
+ let {
2352
+ pathname: n,
2353
+ search: r = "",
2354
+ hash: a = ""
2355
+ } = typeof e == "string" ? pt(e) : e;
2356
+ return {
2357
+ pathname: n ? n.startsWith("/") ? n : Kn(n, t) : t,
2358
+ search: Jn(r),
2359
+ hash: Yn(a)
2360
+ };
2361
+ }
2362
+ function Kn(e, t) {
2363
+ let n = t.replace(/\/+$/, "").split("/");
2364
+ return e.split("/").forEach((a) => {
2365
+ a === ".." ? n.length > 1 && n.pop() : a !== "." && n.push(a);
2366
+ }), n.length > 1 ? n.join("/") : "/";
2367
+ }
2368
+ function ye(e, t, n, r) {
2369
+ return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + t + "` field [" + JSON.stringify(r) + "]. Please separate it out to the ") + ("`to." + n + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
2370
+ }
2371
+ function Qn(e) {
2372
+ return e.filter((t, n) => n === 0 || t.route.path && t.route.path.length > 0);
2373
+ }
2374
+ function ht(e, t) {
2375
+ let n = Qn(e);
2376
+ return t ? n.map((r, a) => a === n.length - 1 ? r.pathname : r.pathnameBase) : n.map((r) => r.pathnameBase);
2377
+ }
2378
+ function gt(e, t, n, r) {
2379
+ r === void 0 && (r = !1);
2380
+ let a;
2381
+ typeof e == "string" ? a = pt(e) : (a = Ee({}, e), $(!a.pathname || !a.pathname.includes("?"), ye("?", "pathname", "search", a)), $(!a.pathname || !a.pathname.includes("#"), ye("#", "pathname", "hash", a)), $(!a.search || !a.search.includes("#"), ye("#", "search", "hash", a)));
2382
+ let o = e === "" || a.pathname === "", c = o ? "/" : a.pathname, l;
2383
+ if (c == null)
2384
+ l = n;
2385
+ else {
2386
+ let u = t.length - 1;
2387
+ if (!r && c.startsWith("..")) {
2388
+ let h = c.split("/");
2389
+ for (; h[0] === ".."; )
2390
+ h.shift(), u -= 1;
2391
+ a.pathname = h.join("/");
2392
+ }
2393
+ l = u >= 0 ? t[u] : "/";
2394
+ }
2395
+ let s = Gn(a, l), d = c && c !== "/" && c.endsWith("/"), p = (o || c === ".") && n.endsWith("/");
2396
+ return !s.pathname.endsWith("/") && (d || p) && (s.pathname += "/"), s;
2397
+ }
2398
+ const $e = (e) => e.join("/").replace(/\/\/+/g, "/"), Jn = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Yn = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ft = ["post", "put", "patch", "delete"];
2399
+ new Set(ft);
2400
+ const Xn = ["get", ...ft];
2401
+ new Set(Xn);
2402
+ /**
2403
+ * React Router v6.30.1
2404
+ *
2405
+ * Copyright (c) Remix Software Inc.
2406
+ *
2407
+ * This source code is licensed under the MIT license found in the
2408
+ * LICENSE.md file in the root directory of this source tree.
2409
+ *
2410
+ * @license MIT
2411
+ */
2412
+ function De() {
2413
+ return De = Object.assign ? Object.assign.bind() : function(e) {
2414
+ for (var t = 1; t < arguments.length; t++) {
2415
+ var n = arguments[t];
2416
+ for (var r in n)
2417
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2418
+ }
2419
+ return e;
2420
+ }, De.apply(this, arguments);
2421
+ }
2422
+ const fe = /* @__PURE__ */ v.createContext(null);
2423
+ process.env.NODE_ENV !== "production" && (fe.displayName = "DataRouter");
2424
+ const mt = /* @__PURE__ */ v.createContext(null);
2425
+ process.env.NODE_ENV !== "production" && (mt.displayName = "DataRouterState");
2426
+ const Zn = /* @__PURE__ */ v.createContext(null);
2427
+ process.env.NODE_ENV !== "production" && (Zn.displayName = "Await");
2428
+ const B = /* @__PURE__ */ v.createContext(null);
2429
+ process.env.NODE_ENV !== "production" && (B.displayName = "Navigation");
2430
+ const Oe = /* @__PURE__ */ v.createContext(null);
2431
+ process.env.NODE_ENV !== "production" && (Oe.displayName = "Location");
2432
+ const Q = /* @__PURE__ */ v.createContext({
2433
+ outlet: null,
2434
+ matches: [],
2435
+ isDataRoute: !1
2436
+ });
2437
+ process.env.NODE_ENV !== "production" && (Q.displayName = "Route");
2438
+ const er = /* @__PURE__ */ v.createContext(null);
2439
+ process.env.NODE_ENV !== "production" && (er.displayName = "RouteError");
2440
+ function tr(e, t) {
2441
+ let {
2442
+ relative: n
2443
+ } = t === void 0 ? {} : t;
2444
+ Fe() || (process.env.NODE_ENV !== "production" ? $(
2445
+ !1,
2446
+ // TODO: This error is probably because they somehow have 2 versions of the
2447
+ // router loaded. We can help them understand how to avoid that.
2448
+ "useHref() may be used only in the context of a <Router> component."
2449
+ ) : $(!1));
2450
+ let {
2451
+ basename: r,
2452
+ navigator: a
2453
+ } = v.useContext(B), {
2454
+ hash: o,
2455
+ pathname: c,
2456
+ search: l
2457
+ } = ne(e, {
2458
+ relative: n
2459
+ }), s = c;
2460
+ return r !== "/" && (s = c === "/" ? r : $e([r, c])), a.createHref({
2461
+ pathname: s,
2462
+ search: l,
2463
+ hash: o
2464
+ });
2465
+ }
2466
+ function Fe() {
2467
+ return v.useContext(Oe) != null;
2468
+ }
2469
+ function J() {
2470
+ return Fe() || (process.env.NODE_ENV !== "production" ? $(
2471
+ !1,
2472
+ // TODO: This error is probably because they somehow have 2 versions of the
2473
+ // router loaded. We can help them understand how to avoid that.
2474
+ "useLocation() may be used only in the context of a <Router> component."
2475
+ ) : $(!1)), v.useContext(Oe).location;
2476
+ }
2477
+ const bt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
2478
+ function vt(e) {
2479
+ v.useContext(B).static || v.useLayoutEffect(e);
2480
+ }
2481
+ function nr() {
2482
+ let {
2483
+ isDataRoute: e
2484
+ } = v.useContext(Q);
2485
+ return e ? lr() : rr();
2486
+ }
2487
+ function rr() {
2488
+ Fe() || (process.env.NODE_ENV !== "production" ? $(
2489
+ !1,
2490
+ // TODO: This error is probably because they somehow have 2 versions of the
2491
+ // router loaded. We can help them understand how to avoid that.
2492
+ "useNavigate() may be used only in the context of a <Router> component."
2493
+ ) : $(!1));
2494
+ let e = v.useContext(fe), {
2495
+ basename: t,
2496
+ future: n,
2497
+ navigator: r
2498
+ } = v.useContext(B), {
2499
+ matches: a
2500
+ } = v.useContext(Q), {
2501
+ pathname: o
2502
+ } = J(), c = JSON.stringify(ht(a, n.v7_relativeSplatPath)), l = v.useRef(!1);
2503
+ return vt(() => {
2504
+ l.current = !0;
2505
+ }), v.useCallback(function(d, p) {
2506
+ if (p === void 0 && (p = {}), process.env.NODE_ENV !== "production" && te(l.current, bt), !l.current) return;
2507
+ if (typeof d == "number") {
2508
+ r.go(d);
2509
+ return;
2510
+ }
2511
+ let u = gt(d, JSON.parse(c), o, p.relative === "path");
2512
+ e == null && t !== "/" && (u.pathname = u.pathname === "/" ? t : $e([t, u.pathname])), (p.replace ? r.replace : r.push)(u, p.state, p);
2513
+ }, [t, r, c, o, e]);
2514
+ }
2515
+ function ne(e, t) {
2516
+ let {
2517
+ relative: n
2518
+ } = t === void 0 ? {} : t, {
2519
+ future: r
2520
+ } = v.useContext(B), {
2521
+ matches: a
2522
+ } = v.useContext(Q), {
2523
+ pathname: o
2524
+ } = J(), c = JSON.stringify(ht(a, r.v7_relativeSplatPath));
2525
+ return v.useMemo(() => gt(e, JSON.parse(c), o, n === "path"), [e, c, o, n]);
2526
+ }
2527
+ var yt = /* @__PURE__ */ function(e) {
2528
+ return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
2529
+ }(yt || {}), Ie = /* @__PURE__ */ function(e) {
2530
+ return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
2531
+ }(Ie || {});
2532
+ function xt(e) {
2533
+ return e + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
2534
+ }
2535
+ function ar(e) {
2536
+ let t = v.useContext(fe);
2537
+ return t || (process.env.NODE_ENV !== "production" ? $(!1, xt(e)) : $(!1)), t;
2538
+ }
2539
+ function ir(e) {
2540
+ let t = v.useContext(Q);
2541
+ return t || (process.env.NODE_ENV !== "production" ? $(!1, xt(e)) : $(!1)), t;
2542
+ }
2543
+ function wt(e) {
2544
+ let t = ir(e), n = t.matches[t.matches.length - 1];
2545
+ return n.route.id || (process.env.NODE_ENV !== "production" ? $(!1, e + ' can only be used on routes that contain a unique "id"') : $(!1)), n.route.id;
2546
+ }
2547
+ function or() {
2548
+ return wt(Ie.UseRouteId);
2549
+ }
2550
+ function lr() {
2551
+ let {
2552
+ router: e
2553
+ } = ar(yt.UseNavigateStable), t = wt(Ie.UseNavigateStable), n = v.useRef(!1);
2554
+ return vt(() => {
2555
+ n.current = !0;
2556
+ }), v.useCallback(function(a, o) {
2557
+ o === void 0 && (o = {}), process.env.NODE_ENV !== "production" && te(n.current, bt), n.current && (typeof a == "number" ? e.navigate(a) : e.navigate(a, De({
2558
+ fromRouteId: t
2559
+ }, o)));
2560
+ }, [e, t]);
2561
+ }
2562
+ new Promise(() => {
2563
+ });
2564
+ /**
2565
+ * React Router DOM v6.30.1
2566
+ *
2567
+ * Copyright (c) Remix Software Inc.
2568
+ *
2569
+ * This source code is licensed under the MIT license found in the
2570
+ * LICENSE.md file in the root directory of this source tree.
2571
+ *
2572
+ * @license MIT
2573
+ */
2574
+ function K() {
2575
+ return K = Object.assign ? Object.assign.bind() : function(e) {
2576
+ for (var t = 1; t < arguments.length; t++) {
2577
+ var n = arguments[t];
2578
+ for (var r in n)
2579
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2580
+ }
2581
+ return e;
2582
+ }, K.apply(this, arguments);
2583
+ }
2584
+ function Le(e, t) {
2585
+ if (e == null) return {};
2586
+ var n = {}, r = Object.keys(e), a, o;
2587
+ for (o = 0; o < r.length; o++)
2588
+ a = r[o], !(t.indexOf(a) >= 0) && (n[a] = e[a]);
2589
+ return n;
2590
+ }
2591
+ const ce = "get", de = "application/x-www-form-urlencoded";
2592
+ function me(e) {
2593
+ return e != null && typeof e.tagName == "string";
2594
+ }
2595
+ function sr(e) {
2596
+ return me(e) && e.tagName.toLowerCase() === "button";
2597
+ }
2598
+ function cr(e) {
2599
+ return me(e) && e.tagName.toLowerCase() === "form";
2600
+ }
2601
+ function dr(e) {
2602
+ return me(e) && e.tagName.toLowerCase() === "input";
2603
+ }
2604
+ function ur(e) {
2605
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
2606
+ }
2607
+ function pr(e, t) {
2608
+ return e.button === 0 && // Ignore everything but left clicks
2609
+ (!t || t === "_self") && // Let browser handle "target=_blank" etc.
2610
+ !ur(e);
2611
+ }
2612
+ let ie = null;
2613
+ function hr() {
2614
+ if (ie === null)
2615
+ try {
2616
+ new FormData(
2617
+ document.createElement("form"),
2618
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
2619
+ 0
2620
+ ), ie = !1;
2621
+ } catch {
2622
+ ie = !0;
2623
+ }
2624
+ return ie;
2625
+ }
2626
+ const gr = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
2627
+ function xe(e) {
2628
+ return e != null && !gr.has(e) ? (process.env.NODE_ENV !== "production" && te(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + de + '"')), null) : e;
2629
+ }
2630
+ function fr(e, t) {
2631
+ let n, r, a, o, c;
2632
+ if (cr(e)) {
2633
+ let l = e.getAttribute("action");
2634
+ r = l ? G(l, t) : null, n = e.getAttribute("method") || ce, a = xe(e.getAttribute("enctype")) || de, o = new FormData(e);
2635
+ } else if (sr(e) || dr(e) && (e.type === "submit" || e.type === "image")) {
2636
+ let l = e.form;
2637
+ if (l == null)
2638
+ throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
2639
+ let s = e.getAttribute("formaction") || l.getAttribute("action");
2640
+ if (r = s ? G(s, t) : null, n = e.getAttribute("formmethod") || l.getAttribute("method") || ce, a = xe(e.getAttribute("formenctype")) || xe(l.getAttribute("enctype")) || de, o = new FormData(l, e), !hr()) {
2641
+ let {
2642
+ name: d,
2643
+ type: p,
2644
+ value: u
2645
+ } = e;
2646
+ if (p === "image") {
2647
+ let h = d ? d + "." : "";
2648
+ o.append(h + "x", "0"), o.append(h + "y", "0");
2649
+ } else d && o.append(d, u);
2650
+ }
2651
+ } else {
2652
+ if (me(e))
2653
+ throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
2654
+ n = ce, r = null, a = de, c = e;
2655
+ }
2656
+ return o && a === "text/plain" && (c = o, o = void 0), {
2657
+ action: r,
2658
+ method: n.toLowerCase(),
2659
+ encType: a,
2660
+ formData: o,
2661
+ body: c
2662
+ };
2663
+ }
2664
+ const mr = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], br = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], vr = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"], yr = "6";
2665
+ try {
2666
+ window.__reactRouterVersion = yr;
2667
+ } catch {
2668
+ }
2669
+ const Tt = /* @__PURE__ */ v.createContext({
2670
+ isTransitioning: !1
2671
+ });
2672
+ process.env.NODE_ENV !== "production" && (Tt.displayName = "ViewTransition");
2673
+ const xr = /* @__PURE__ */ v.createContext(/* @__PURE__ */ new Map());
2674
+ process.env.NODE_ENV !== "production" && (xr.displayName = "Fetchers");
2675
+ process.env.NODE_ENV;
2676
+ const wr = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Tr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Me = /* @__PURE__ */ v.forwardRef(function(t, n) {
2677
+ let {
2678
+ onClick: r,
2679
+ relative: a,
2680
+ reloadDocument: o,
2681
+ replace: c,
2682
+ state: l,
2683
+ target: s,
2684
+ to: d,
2685
+ preventScrollReset: p,
2686
+ viewTransition: u
2687
+ } = t, h = Le(t, mr), {
2688
+ basename: m
2689
+ } = v.useContext(B), f, w = !1;
2690
+ if (typeof d == "string" && Tr.test(d) && (f = d, wr))
2691
+ try {
2692
+ let S = new URL(window.location.href), T = d.startsWith("//") ? new URL(S.protocol + d) : new URL(d), y = G(T.pathname, m);
2693
+ T.origin === S.origin && y != null ? d = y + T.search + T.hash : w = !0;
2694
+ } catch {
2695
+ process.env.NODE_ENV !== "production" && te(!1, '<Link to="' + d + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
2696
+ }
2697
+ let D = tr(d, {
2698
+ relative: a
2699
+ }), E = Sr(d, {
2700
+ replace: c,
2701
+ state: l,
2702
+ target: s,
2703
+ preventScrollReset: p,
2704
+ relative: a,
2705
+ viewTransition: u
2706
+ });
2707
+ function x(S) {
2708
+ r && r(S), S.defaultPrevented || E(S);
2709
+ }
2710
+ return (
2711
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
2712
+ /* @__PURE__ */ v.createElement("a", K({}, h, {
2713
+ href: f || D,
2714
+ onClick: w || o ? r : x,
2715
+ ref: n,
2716
+ target: s
2717
+ }))
2718
+ );
2719
+ });
2720
+ process.env.NODE_ENV !== "production" && (Me.displayName = "Link");
2721
+ const Cr = /* @__PURE__ */ v.forwardRef(function(t, n) {
2722
+ let {
2723
+ "aria-current": r = "page",
2724
+ caseSensitive: a = !1,
2725
+ className: o = "",
2726
+ end: c = !1,
2727
+ style: l,
2728
+ to: s,
2729
+ viewTransition: d,
2730
+ children: p
2731
+ } = t, u = Le(t, br), h = ne(s, {
2732
+ relative: u.relative
2733
+ }), m = J(), f = v.useContext(mt), {
2734
+ navigator: w,
2735
+ basename: D
2736
+ } = v.useContext(B), E = f != null && // Conditional usage is OK here because the usage of a data router is static
2737
+ // eslint-disable-next-line react-hooks/rules-of-hooks
2738
+ Or(h) && d === !0, x = w.encodeLocation ? w.encodeLocation(h).pathname : h.pathname, S = m.pathname, T = f && f.navigation && f.navigation.location ? f.navigation.location.pathname : null;
2739
+ a || (S = S.toLowerCase(), T = T ? T.toLowerCase() : null, x = x.toLowerCase()), T && D && (T = G(T, D) || T);
2740
+ const y = x !== "/" && x.endsWith("/") ? x.length - 1 : x.length;
2741
+ let R = S === x || !c && S.startsWith(x) && S.charAt(y) === "/", I = T != null && (T === x || !c && T.startsWith(x) && T.charAt(x.length) === "/"), F = {
2742
+ isActive: R,
2743
+ isPending: I,
2744
+ isTransitioning: E
2745
+ }, re = R ? r : void 0, q;
2746
+ typeof o == "function" ? q = o(F) : q = [o, R ? "active" : null, I ? "pending" : null, E ? "transitioning" : null].filter(Boolean).join(" ");
2747
+ let Nt = typeof l == "function" ? l(F) : l;
2748
+ return /* @__PURE__ */ v.createElement(Me, K({}, u, {
2749
+ "aria-current": re,
2750
+ className: q,
2751
+ ref: n,
2752
+ style: Nt,
2753
+ to: s,
2754
+ viewTransition: d
2755
+ }), typeof p == "function" ? p(F) : p);
2756
+ });
2757
+ process.env.NODE_ENV !== "production" && (Cr.displayName = "NavLink");
2758
+ const Nr = /* @__PURE__ */ v.forwardRef((e, t) => {
2759
+ let {
2760
+ fetcherKey: n,
2761
+ navigate: r,
2762
+ reloadDocument: a,
2763
+ replace: o,
2764
+ state: c,
2765
+ method: l = ce,
2766
+ action: s,
2767
+ onSubmit: d,
2768
+ relative: p,
2769
+ preventScrollReset: u,
2770
+ viewTransition: h
2771
+ } = e, m = Le(e, vr), f = Ar(), w = $r(s, {
2772
+ relative: p
2773
+ }), D = l.toLowerCase() === "get" ? "get" : "post", E = (x) => {
2774
+ if (d && d(x), x.defaultPrevented) return;
2775
+ x.preventDefault();
2776
+ let S = x.nativeEvent.submitter, T = (S == null ? void 0 : S.getAttribute("formmethod")) || l;
2777
+ f(S || x.currentTarget, {
2778
+ fetcherKey: n,
2779
+ method: T,
2780
+ navigate: r,
2781
+ replace: o,
2782
+ state: c,
2783
+ relative: p,
2784
+ preventScrollReset: u,
2785
+ viewTransition: h
2786
+ });
2787
+ };
2788
+ return /* @__PURE__ */ v.createElement("form", K({
2789
+ ref: t,
2790
+ method: D,
2791
+ action: w,
2792
+ onSubmit: a ? d : E
2793
+ }, m));
2794
+ });
2795
+ process.env.NODE_ENV !== "production" && (Nr.displayName = "Form");
2796
+ process.env.NODE_ENV;
2797
+ var ue;
2798
+ (function(e) {
2799
+ e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
2800
+ })(ue || (ue = {}));
2801
+ var Ge;
2802
+ (function(e) {
2803
+ e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
2804
+ })(Ge || (Ge = {}));
2805
+ function Er(e) {
2806
+ return e + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
2807
+ }
2808
+ function Ct(e) {
2809
+ let t = v.useContext(fe);
2810
+ return t || (process.env.NODE_ENV !== "production" ? $(!1, Er(e)) : $(!1)), t;
2811
+ }
2812
+ function Sr(e, t) {
2813
+ let {
2814
+ target: n,
2815
+ replace: r,
2816
+ state: a,
2817
+ preventScrollReset: o,
2818
+ relative: c,
2819
+ viewTransition: l
2820
+ } = t === void 0 ? {} : t, s = nr(), d = J(), p = ne(e, {
2821
+ relative: c
2822
+ });
2823
+ return v.useCallback((u) => {
2824
+ if (pr(u, n)) {
2825
+ u.preventDefault();
2826
+ let h = r !== void 0 ? r : Se(d) === Se(p);
2827
+ s(e, {
2828
+ replace: h,
2829
+ state: a,
2830
+ preventScrollReset: o,
2831
+ relative: c,
2832
+ viewTransition: l
2833
+ });
2834
+ }
2835
+ }, [d, s, p, r, a, n, e, o, c, l]);
2836
+ }
2837
+ function Dr() {
2838
+ if (typeof document > "u")
2839
+ throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
2840
+ }
2841
+ let kr = 0, Rr = () => "__" + String(++kr) + "__";
2842
+ function Ar() {
2843
+ let {
2844
+ router: e
2845
+ } = Ct(ue.UseSubmit), {
2846
+ basename: t
2847
+ } = v.useContext(B), n = or();
2848
+ return v.useCallback(function(r, a) {
2849
+ a === void 0 && (a = {}), Dr();
2850
+ let {
2851
+ action: o,
2852
+ method: c,
2853
+ encType: l,
2854
+ formData: s,
2855
+ body: d
2856
+ } = fr(r, t);
2857
+ if (a.navigate === !1) {
2858
+ let p = a.fetcherKey || Rr();
2859
+ e.fetch(p, n, a.action || o, {
2860
+ preventScrollReset: a.preventScrollReset,
2861
+ formData: s,
2862
+ body: d,
2863
+ formMethod: a.method || c,
2864
+ formEncType: a.encType || l,
2865
+ flushSync: a.flushSync
2866
+ });
2867
+ } else
2868
+ e.navigate(a.action || o, {
2869
+ preventScrollReset: a.preventScrollReset,
2870
+ formData: s,
2871
+ body: d,
2872
+ formMethod: a.method || c,
2873
+ formEncType: a.encType || l,
2874
+ replace: a.replace,
2875
+ state: a.state,
2876
+ fromRouteId: n,
2877
+ flushSync: a.flushSync,
2878
+ viewTransition: a.viewTransition
2879
+ });
2880
+ }, [e, t, n]);
2881
+ }
2882
+ function $r(e, t) {
2883
+ let {
2884
+ relative: n
2885
+ } = t === void 0 ? {} : t, {
2886
+ basename: r
2887
+ } = v.useContext(B), a = v.useContext(Q);
2888
+ a || (process.env.NODE_ENV !== "production" ? $(!1, "useFormAction must be used inside a RouteContext") : $(!1));
2889
+ let [o] = a.matches.slice(-1), c = K({}, ne(e || ".", {
2890
+ relative: n
2891
+ })), l = J();
2892
+ if (e == null) {
2893
+ c.search = l.search;
2894
+ let s = new URLSearchParams(c.search), d = s.getAll("index");
2895
+ if (d.some((u) => u === "")) {
2896
+ s.delete("index"), d.filter((h) => h).forEach((h) => s.append("index", h));
2897
+ let u = s.toString();
2898
+ c.search = u ? "?" + u : "";
2899
+ }
2900
+ }
2901
+ return (!e || e === ".") && o.route.index && (c.search = c.search ? c.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (c.pathname = c.pathname === "/" ? r : $e([r, c.pathname])), Se(c);
2902
+ }
2903
+ function Or(e, t) {
2904
+ t === void 0 && (t = {});
2905
+ let n = v.useContext(Tt);
2906
+ n == null && (process.env.NODE_ENV !== "production" ? $(!1, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : $(!1));
2907
+ let {
2908
+ basename: r
2909
+ } = Ct(ue.useViewTransitionState), a = ne(e, {
2910
+ relative: t.relative
2911
+ });
2912
+ if (!n.isTransitioning)
2913
+ return !1;
2914
+ let o = G(n.currentLocation.pathname, r) || n.currentLocation.pathname, c = G(n.nextLocation.pathname, r) || n.nextLocation.pathname;
2915
+ return We(a.pathname, c) != null || We(a.pathname, o) != null;
2916
+ }
2917
+ const W = {
2918
+ item: {
2919
+ background: {
2920
+ active: C.palette.blue.B50,
2921
+ inactive: C.palette.neutral.N0,
2922
+ hover: C.palette.neutral.N20,
2923
+ disabled: C.palette.neutral.N20
2924
+ }
2925
+ },
2926
+ border: {
2927
+ expanded: {
2928
+ color: C.palette.blue.B400
2929
+ },
2930
+ contracted: {
2931
+ color: C.palette.neutral.N0
2932
+ }
2933
+ }
2934
+ }, Fr = N.div`
2935
+ & > div {
2936
+ border: 1px solid
2937
+ ${({ theme: e, $active: t }) => {
2938
+ var n, r, a, o;
2939
+ return t ? ((r = (n = e == null ? void 0 : e.border) == null ? void 0 : n.expanded) == null ? void 0 : r.color) || W.border.expanded.color : ((o = (a = e == null ? void 0 : e.border) == null ? void 0 : a.contracted) == null ? void 0 : o.color) || W.border.contracted.color;
2940
+ }};
2941
+ }
2942
+ &:hover {
2943
+ cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
2944
+ background-color: ${({ theme: e, $disabled: t }) => {
2945
+ var n, r, a;
2946
+ if (!t)
2947
+ return ((a = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : a.hover) || W.item.background.hover;
2948
+ }};
2949
+ }
2950
+ `, Ir = N.div`
2951
+ display: block;
2952
+ text-decoration: none;
2953
+ background-color: ${({ theme: e, $active: t }) => {
2954
+ var n, r, a, o, c, l;
2955
+ return t ? ((a = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : a.active) || W.item.background.active : ((l = (c = (o = e == null ? void 0 : e.menu) == null ? void 0 : o.item) == null ? void 0 : c.background) == null ? void 0 : l.inactive) || W.item.background.inactive;
2956
+ }};
2957
+ &:hover {
2958
+ cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
2959
+ background-color: ${({ $active: e, theme: t, $disabled: n }) => {
2960
+ var r, a, o;
2961
+ if (!n && !e)
2962
+ return ((o = (a = (r = t == null ? void 0 : t.menu) == null ? void 0 : r.item) == null ? void 0 : a.background) == null ? void 0 : o.hover) || W.item.background.hover;
2963
+ }};
2964
+ }
2965
+ `, Lr = N.div`
2966
+ display: flex;
2967
+ align-items: center;
2968
+ gap: 12px;
2969
+ width: 100%;
2970
+ outline: none;
2971
+ cursor: pointer;
2972
+ `, Mr = (e) => {
2973
+ const { isOpen: t, links: n, onClick: r, title: a, activeId: o } = e;
2974
+ return /* @__PURE__ */ i(Fr, { $active: t, children: /* @__PURE__ */ g(_, { border: !0, borderRadius: "8px", width: "100%", children: [
2975
+ /* @__PURE__ */ i(
2976
+ _,
2977
+ {
2978
+ alignItems: "center",
2979
+ borderRadius: "8px",
2980
+ direction: "row",
2981
+ gap: "12px",
2982
+ padding: "12px 8px",
2983
+ children: /* @__PURE__ */ g(
2984
+ Lr,
2985
+ {
2986
+ onClick: r,
2987
+ onKeyDown: (l) => {
2988
+ (l.key === "Enter" || l.key === " ") && (l.preventDefault(), r());
2989
+ },
2990
+ role: "button",
2991
+ tabIndex: 0,
2992
+ "aria-expanded": t,
2993
+ "aria-controls": "dropdown-links",
2994
+ children: [
2995
+ /* @__PURE__ */ i(
2996
+ M,
2997
+ {
2998
+ appearance: t ? "primary" : "dark",
2999
+ cursorHover: !0,
3000
+ icon: t ? /* @__PURE__ */ i(Xe, {}) : /* @__PURE__ */ i(Dt, {})
3001
+ }
3002
+ ),
3003
+ /* @__PURE__ */ i(
3004
+ k,
3005
+ {
3006
+ appearance: t ? "primary" : "dark",
3007
+ cursorHover: !0,
3008
+ size: "small",
3009
+ type: "title",
3010
+ weight: t ? "bold" : "normal",
3011
+ children: a
3012
+ }
3013
+ )
3014
+ ]
3015
+ }
3016
+ )
3017
+ }
3018
+ ),
3019
+ t && /* @__PURE__ */ g(O, { children: [
3020
+ /* @__PURE__ */ i(L, {}),
3021
+ /* @__PURE__ */ i(b, { direction: "column", children: n.map((l) => {
3022
+ const s = l.id === o;
3023
+ return /* @__PURE__ */ i(
3024
+ Me,
3025
+ {
3026
+ to: l.path,
3027
+ style: { textDecoration: "none" },
3028
+ children: /* @__PURE__ */ i(Ir, { $active: s, children: /* @__PURE__ */ g(
3029
+ b,
3030
+ {
3031
+ alignItems: "center",
3032
+ direction: "row",
3033
+ gap: "8px",
3034
+ padding: s ? "8px 4px" : "8px 32px",
3035
+ children: [
3036
+ s && /* @__PURE__ */ i(M, { appearance: "primary", icon: /* @__PURE__ */ i(kt, {}) }),
3037
+ /* @__PURE__ */ i(
3038
+ k,
3039
+ {
3040
+ appearance: s ? "primary" : "dark",
3041
+ size: "small",
3042
+ type: "title",
3043
+ weight: s ? "bold" : "normal",
3044
+ children: l.label
3045
+ }
3046
+ )
3047
+ ]
3048
+ }
3049
+ ) })
3050
+ },
3051
+ l.id
3052
+ );
3053
+ }) })
3054
+ ] })
3055
+ ] }) });
3056
+ }, ha = (e) => {
3057
+ const { collapseOnNavigate: t = !1, defaultOpenId: n = null, groups: r } = e, [a, o] = oe.useState(n), c = J();
3058
+ oe.useEffect(() => {
3059
+ t && o(null);
3060
+ }, [t, c.pathname]);
3061
+ const l = oe.useCallback(
3062
+ (s) => {
3063
+ var d;
3064
+ return (d = s.find((p) => p.path === c.pathname)) == null ? void 0 : d.id;
3065
+ },
3066
+ [c.pathname]
3067
+ );
3068
+ return /* @__PURE__ */ i(O, { children: r.map((s) => /* @__PURE__ */ i(
3069
+ Mr,
3070
+ {
3071
+ activeId: l(s.links),
3072
+ isOpen: a === s.id,
3073
+ links: s.links,
3074
+ onClick: () => o((d) => d === s.id ? null : s.id),
3075
+ title: s.title
3076
+ },
3077
+ s.id
3078
+ )) });
3079
+ }, Y = /* @__PURE__ */ new Map(), Ur = (e, t) => Y.get(`${t}:${e}`), Vr = (e, t, n) => {
3080
+ const r = `${t}:${e}`;
3081
+ if (Y.set(r, n), Y.size > 1e3) {
3082
+ const a = Y.keys().next().value;
3083
+ a !== void 0 && Y.delete(a);
3084
+ }
3085
+ }, Ke = /* @__PURE__ */ new Map(), _r = 1e3, Pr = (e) => {
3086
+ const t = Date.now(), n = Ke.get(e) || 0;
3087
+ return t - n < _r ? !0 : (Ke.set(e, t), !1);
3088
+ }, Br = (e) => {
3089
+ const t = Vt(e);
2255
3090
  return {
2256
3091
  spa: "es",
2257
3092
  eng: "en",
@@ -2259,21 +3094,21 @@ const Yn = x.div`
2259
3094
  fra: "fr",
2260
3095
  ita: "it",
2261
3096
  por: "pt"
2262
- }[n] || "en";
2263
- }, it = async (e, n, { url: t, apiKey: a }) => {
2264
- const i = `${n}:${e}`, r = et(e, n);
2265
- if (r) return r;
2266
- if (at(i))
3097
+ }[t] || "en";
3098
+ }, jr = async (e, t, { url: n, apiKey: r }) => {
3099
+ const a = `${t}:${e}`, o = Ur(e, t);
3100
+ if (o) return o;
3101
+ if (Pr(a))
2267
3102
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
2268
- const p = ot(e);
3103
+ const c = Br(e);
2269
3104
  try {
2270
- const { data: l } = await Pe.post(
2271
- t,
3105
+ const { data: l } = await Ut.post(
3106
+ n,
2272
3107
  {
2273
3108
  q: e,
2274
- source: p,
2275
- target: n,
2276
- api_key: a
3109
+ source: c,
3110
+ target: t,
3111
+ api_key: r
2277
3112
  },
2278
3113
  {
2279
3114
  headers: {
@@ -2281,51 +3116,53 @@ const Yn = x.div`
2281
3116
  }
2282
3117
  }
2283
3118
  ), s = (l == null ? void 0 : l.translatedText) || e;
2284
- return nt(e, n, s), s;
3119
+ return Vr(e, t, s), s;
2285
3120
  } catch (l) {
2286
3121
  return console.warn(`[Translation] Failed for: "${e}"`, l), e;
2287
3122
  }
2288
- }, rt = (e) => typeof e == "string" && e.trim().length > 0, fe = async (e, n, t) => {
2289
- const a = await Promise.all(
2290
- Object.entries(e).map(async ([i, r]) => {
2291
- if (rt(r)) {
2292
- const p = await it(r, n, t);
2293
- return [i, p];
2294
- } else if (Array.isArray(r)) {
2295
- const p = await Promise.all(
2296
- r.map(
2297
- async (l) => typeof l == "object" && l !== null ? await fe(l, n, t) : l
3123
+ }, zr = (e) => typeof e == "string" && e.trim().length > 0, Qe = async (e, t, n) => {
3124
+ const r = await Promise.all(
3125
+ Object.entries(e).map(async ([a, o]) => {
3126
+ if (zr(o)) {
3127
+ const c = await jr(o, t, n);
3128
+ return [a, c];
3129
+ } else if (Array.isArray(o)) {
3130
+ const c = await Promise.all(
3131
+ o.map(
3132
+ async (l) => typeof l == "object" && l !== null ? await Qe(l, t, n) : l
2298
3133
  )
2299
3134
  );
2300
- return [i, p];
2301
- } else if (typeof r == "object" && r !== null) {
2302
- const p = await fe(r, n, t);
2303
- return [i, p];
3135
+ return [a, c];
3136
+ } else if (typeof o == "object" && o !== null) {
3137
+ const c = await Qe(o, t, n);
3138
+ return [a, c];
2304
3139
  } else
2305
- return [i, r];
3140
+ return [a, o];
2306
3141
  })
2307
3142
  );
2308
- return Object.fromEntries(a);
3143
+ return Object.fromEntries(r);
2309
3144
  };
2310
3145
  export {
2311
- re as BusinessRuleCard,
2312
- $e as BusinessRuleCardNew,
2313
- Ee as BusinessRuleView,
2314
- Fe as BusinessRuleViewNew,
2315
- xt as BusinessRules,
2316
- vt as BusinessRulesNew,
2317
- yt as Filter,
2318
- wt as FilterModal,
2319
- Ct as FormFilter,
2320
- ke as ModalRules,
2321
- Ie as RulesForm,
2322
- _n as convertRangeToString,
2323
- Dt as formatDecisionForBackend,
2324
- St as parseRangeFromString,
2325
- Nt as revertSortedDataSampleSwitchPlaces,
2326
- Et as revertSortedDataSwitchPlaces,
2327
- kt as sortDisplayDataSampleSwitchPlaces,
2328
- At as sortDisplayDataSwitchPlaces,
2329
- fe as translateObject,
2330
- it as translateText
3146
+ Ae as BusinessRuleCard,
3147
+ ct as BusinessRuleCardNew,
3148
+ ot as BusinessRuleView,
3149
+ dt as BusinessRuleViewNew,
3150
+ na as BusinessRules,
3151
+ ra as BusinessRulesNew,
3152
+ Mr as DropdownMenu,
3153
+ ha as DropdownMenuContainer,
3154
+ aa as Filter,
3155
+ ia as FilterModal,
3156
+ oa as FormFilter,
3157
+ lt as ModalRules,
3158
+ ut as RulesForm,
3159
+ In as convertRangeToString,
3160
+ la as formatDecisionForBackend,
3161
+ sa as parseRangeFromString,
3162
+ ca as revertSortedDataSampleSwitchPlaces,
3163
+ da as revertSortedDataSwitchPlaces,
3164
+ ua as sortDisplayDataSampleSwitchPlaces,
3165
+ pa as sortDisplayDataSwitchPlaces,
3166
+ Qe as translateObject,
3167
+ jr as translateText
2331
3168
  };