@isettingkit/business-rules 1.0.19 → 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.d.ts +95 -9
- package/dist/index.es.js +2198 -803
- package/package.json +13 -15
package/dist/index.es.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { MdOutlineDelete as
|
|
3
|
-
import { inube as
|
|
4
|
-
import
|
|
5
|
-
import { ValueDataType as
|
|
6
|
-
import { DecisionViewConditionRenderer as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import Re from "
|
|
12
|
-
import
|
|
13
|
-
|
|
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
18
|
var t, n;
|
|
18
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
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 Me = x.div`
|
|
|
26
27
|
height: 100%;
|
|
27
28
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
28
29
|
`;
|
|
29
|
-
|
|
30
|
+
N.div`
|
|
30
31
|
width: 100%;
|
|
31
32
|
height: 100%;
|
|
32
33
|
overflow-y: auto;
|
|
@@ -45,36 +46,51 @@ x.div`
|
|
|
45
46
|
border-radius: 8px;
|
|
46
47
|
}
|
|
47
48
|
`;
|
|
48
|
-
const
|
|
49
|
-
const { children: t, controls: n = !0, handleDelete:
|
|
50
|
-
return /* @__PURE__ */
|
|
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: [
|
|
51
52
|
t,
|
|
52
|
-
n && /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
53
|
+
n && /* @__PURE__ */ g(O, { children: [
|
|
54
|
+
/* @__PURE__ */ i(L, {}),
|
|
55
|
+
/* @__PURE__ */ i(b, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
|
|
55
56
|
M,
|
|
56
57
|
{
|
|
57
58
|
cursorHover: !0,
|
|
58
59
|
appearance: "danger",
|
|
59
60
|
size: "24px",
|
|
60
|
-
icon: /* @__PURE__ */
|
|
61
|
+
icon: /* @__PURE__ */ i(Je, {}),
|
|
61
62
|
onClick: () => {
|
|
62
|
-
|
|
63
|
+
r(a);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
) })
|
|
66
67
|
] })
|
|
67
68
|
] }) });
|
|
68
|
-
},
|
|
69
|
+
}, Pt = (e) => e.value, Bt = (e) => e.value, jt = (e) => e.value, zt = (e) => ({
|
|
70
|
+
from: e.from ?? "",
|
|
71
|
+
to: e.to ?? ""
|
|
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`
|
|
69
85
|
& > div {
|
|
70
86
|
border-radius: 8px;
|
|
71
87
|
border: 1px solid
|
|
72
88
|
${({ theme: e }) => {
|
|
73
89
|
var t, n;
|
|
74
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
90
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
|
|
75
91
|
}};
|
|
76
92
|
}
|
|
77
|
-
`,
|
|
93
|
+
`, je = N.div`
|
|
78
94
|
width: 100%;
|
|
79
95
|
height: 100%;
|
|
80
96
|
overflow-y: auto;
|
|
@@ -92,182 +108,167 @@ const ee = (e) => {
|
|
|
92
108
|
background-color: #ebecf0;
|
|
93
109
|
border-radius: 8px;
|
|
94
110
|
}
|
|
95
|
-
`,
|
|
96
|
-
from: e.from ?? "",
|
|
97
|
-
to: e.to ?? ""
|
|
98
|
-
}), _e = (e) => e.value, Ue = (e) => e.value, Be = (e) => e.value;
|
|
99
|
-
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 || {});
|
|
100
|
-
const qe = {
|
|
101
|
-
[D.LIST_OF_VALUES]: ze,
|
|
102
|
-
[D.LIST_OF_VALUES_MULTI]: Ve,
|
|
103
|
-
[D.RANGE]: je,
|
|
104
|
-
[D.GREATER_THAN]: _e,
|
|
105
|
-
[D.LESS_THAN]: Ue,
|
|
106
|
-
[D.EQUAL]: Be
|
|
107
|
-
}, U = (e) => {
|
|
108
|
-
const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), o = qe[e == null ? void 0 : e.howToSetTheDecision] || Le;
|
|
109
|
-
return n && o(t) || t || void 0;
|
|
110
|
-
}, He = (e) => {
|
|
111
|
+
`, Kt = (e) => {
|
|
111
112
|
const {
|
|
112
113
|
conditionsAlignment: t,
|
|
113
114
|
decision: n,
|
|
114
|
-
decisionDateElement:
|
|
115
|
-
decisionMapper:
|
|
116
|
-
loading:
|
|
117
|
-
skeleton:
|
|
115
|
+
decisionDateElement: r,
|
|
116
|
+
decisionMapper: a,
|
|
117
|
+
loading: o,
|
|
118
|
+
skeleton: c,
|
|
118
119
|
terms: l,
|
|
119
|
-
textValues:
|
|
120
|
+
textValues: s,
|
|
120
121
|
visibleConditions: d
|
|
121
122
|
} = e;
|
|
122
|
-
return
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
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:
|
|
127
|
-
valueData:
|
|
128
|
-
|
|
127
|
+
element: a,
|
|
128
|
+
valueData: Z(
|
|
129
|
+
a
|
|
129
130
|
),
|
|
130
131
|
type: "decision"
|
|
131
132
|
}
|
|
132
133
|
) }, n.ruleName),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
|
|
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
140
|
justifyContent: t,
|
|
140
141
|
height: "203px",
|
|
141
142
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
|
|
143
|
+
/* @__PURE__ */ i(
|
|
144
|
+
k,
|
|
144
145
|
{
|
|
145
146
|
type: "label",
|
|
146
147
|
size: "large",
|
|
147
148
|
appearance: "dark",
|
|
148
149
|
weight: "bold",
|
|
149
150
|
textAlign: "center",
|
|
150
|
-
children:
|
|
151
|
+
children: s.factsThatConditionIt
|
|
151
152
|
}
|
|
152
153
|
),
|
|
153
|
-
d.map((
|
|
154
|
-
|
|
154
|
+
d.map((p) => /* @__PURE__ */ i(Be, { children: /* @__PURE__ */ i(b, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
155
|
+
be,
|
|
155
156
|
{
|
|
156
|
-
element: { ...
|
|
157
|
-
valueData:
|
|
158
|
-
|
|
157
|
+
element: { ...p, value: p.value },
|
|
158
|
+
valueData: Z(
|
|
159
|
+
p
|
|
159
160
|
)
|
|
160
161
|
}
|
|
161
|
-
) }) },
|
|
162
|
-
l && /* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
|
|
165
|
-
|
|
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:
|
|
168
|
-
valueData:
|
|
168
|
+
element: r.element,
|
|
169
|
+
valueData: r.valueData,
|
|
169
170
|
type: "decision"
|
|
170
171
|
},
|
|
171
|
-
|
|
172
|
+
s.terms
|
|
172
173
|
)
|
|
173
174
|
] })
|
|
174
175
|
]
|
|
175
176
|
}
|
|
176
177
|
) })
|
|
177
|
-
] }) : /* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
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__ */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
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__ */
|
|
187
|
-
|
|
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:
|
|
194
|
-
|
|
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__ */
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ i(j, { animated: !0, width: "180px" }),
|
|
203
|
+
/* @__PURE__ */ i(j, { animated: !0, width: "85px" })
|
|
203
204
|
]
|
|
204
205
|
}
|
|
205
|
-
) }, `condition-${
|
|
206
|
+
) }, `condition-${u}`))
|
|
206
207
|
}
|
|
207
208
|
) })
|
|
208
209
|
] });
|
|
209
|
-
},
|
|
210
|
-
var
|
|
211
|
-
const { decision: t, loading: n = !1, textValues:
|
|
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:
|
|
214
|
+
labelName: r == null ? void 0 : r.terms,
|
|
214
215
|
value: String(t.effectiveFrom),
|
|
215
|
-
howToSetTheDecision:
|
|
216
|
-
decisionDataType:
|
|
216
|
+
howToSetTheDecision: z.RANGE,
|
|
217
|
+
decisionDataType: U.DATE
|
|
217
218
|
},
|
|
218
|
-
valueData:
|
|
219
|
-
labelName:
|
|
219
|
+
valueData: Z({
|
|
220
|
+
labelName: r == null ? void 0 : r.terms,
|
|
220
221
|
value: {
|
|
221
222
|
from: String(t.effectiveFrom),
|
|
222
223
|
to: String(t.validUntil)
|
|
223
224
|
},
|
|
224
|
-
howToSetTheDecision:
|
|
225
|
-
decisionDataType:
|
|
225
|
+
howToSetTheDecision: z.RANGE,
|
|
226
|
+
decisionDataType: U.DATE
|
|
226
227
|
})
|
|
227
|
-
} :
|
|
228
|
+
} : a && !o ? {
|
|
228
229
|
element: {
|
|
229
|
-
labelName:
|
|
230
|
+
labelName: r == null ? void 0 : r.terms,
|
|
230
231
|
value: String(t.effectiveFrom),
|
|
231
|
-
howToSetTheDecision:
|
|
232
|
-
decisionDataType:
|
|
232
|
+
howToSetTheDecision: z.EQUAL,
|
|
233
|
+
decisionDataType: U.DATE
|
|
233
234
|
},
|
|
234
|
-
valueData:
|
|
235
|
-
labelName:
|
|
235
|
+
valueData: Z({
|
|
236
|
+
labelName: r == null ? void 0 : r.terms,
|
|
236
237
|
value: String(t.effectiveFrom),
|
|
237
|
-
howToSetTheDecision:
|
|
238
|
-
decisionDataType:
|
|
238
|
+
howToSetTheDecision: z.EQUAL,
|
|
239
|
+
decisionDataType: U.DATE
|
|
239
240
|
})
|
|
240
241
|
} : null, l = t ? {
|
|
241
242
|
labelName: t.labelName || "",
|
|
242
243
|
decisionDataType: t.decisionDataType || "alphabetical",
|
|
243
|
-
value:
|
|
244
|
+
value: Z(t),
|
|
244
245
|
howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
|
|
245
|
-
} : null,
|
|
246
|
-
(
|
|
247
|
-
)) || [], d = Array.from({ length: 5 }),
|
|
248
|
-
return /* @__PURE__ */
|
|
249
|
-
|
|
246
|
+
} : null, s = ((h = t == null ? void 0 : t.conditionsThatEstablishesTheDecision) == null ? void 0 : h.filter(
|
|
247
|
+
(m) => !m.hidden
|
|
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:
|
|
252
|
+
conditionsAlignment: u,
|
|
252
253
|
decision: t,
|
|
253
|
-
decisionDateElement:
|
|
254
|
+
decisionDateElement: c,
|
|
254
255
|
decisionMapper: l,
|
|
255
|
-
loading:
|
|
256
|
+
loading: p,
|
|
256
257
|
skeleton: d,
|
|
257
|
-
terms: !!(
|
|
258
|
-
textValues:
|
|
259
|
-
visibleConditions:
|
|
258
|
+
terms: !!(r != null && r.terms),
|
|
259
|
+
textValues: r,
|
|
260
|
+
visibleConditions: s
|
|
260
261
|
}
|
|
261
262
|
);
|
|
262
|
-
},
|
|
263
|
+
}, Qt = N.div`
|
|
263
264
|
position: relative;
|
|
264
265
|
& > div {
|
|
265
266
|
padding: 24px 16px;
|
|
266
267
|
}
|
|
267
|
-
`,
|
|
268
|
+
`, Jt = N.div`
|
|
268
269
|
background-color: ${({ theme: e }) => {
|
|
269
270
|
var t, n;
|
|
270
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) ||
|
|
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 qe = {
|
|
|
295
296
|
background-color: #ebecf0;
|
|
296
297
|
border-radius: 8px;
|
|
297
298
|
}
|
|
298
|
-
`,
|
|
299
|
-
const { children: t, portalId: n, onCloseModal:
|
|
300
|
-
if (!
|
|
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
|
|
305
|
-
return
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
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
312
|
t
|
|
312
313
|
] }) }) }) }),
|
|
313
|
-
|
|
314
|
+
o
|
|
314
315
|
);
|
|
315
|
-
},
|
|
316
|
+
}, Yt = rt`
|
|
316
317
|
from {
|
|
317
318
|
opacity: 0;
|
|
318
319
|
transform: translateY(20px);
|
|
@@ -322,12 +323,12 @@ const qe = {
|
|
|
322
323
|
transform: translateY(0);
|
|
323
324
|
}
|
|
324
325
|
`;
|
|
325
|
-
|
|
326
|
+
N.div`
|
|
326
327
|
border-radius: 8px;
|
|
327
328
|
border: 1px solid
|
|
328
329
|
${({ theme: e }) => {
|
|
329
330
|
var t, n;
|
|
330
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
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,41 +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
|
-
|
|
340
|
+
N.div`
|
|
340
341
|
& > div {
|
|
341
342
|
border-radius: 8px;
|
|
342
343
|
border: 1px solid
|
|
343
344
|
${({ theme: e }) => {
|
|
344
345
|
var t, n;
|
|
345
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
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
|
|
350
|
+
const st = N.div`
|
|
350
351
|
& > div {
|
|
351
|
-
|
|
352
|
+
box-shadow: 0px 2px 3px 0px
|
|
353
|
+
${({ theme: e }) => {
|
|
352
354
|
var t, n;
|
|
353
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.
|
|
355
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutralAlpha) == null ? void 0 : n.N700A) || C.palette.neutralAlpha.N30A;
|
|
354
356
|
}};
|
|
355
|
-
|
|
357
|
+
cursor: pointer;
|
|
356
358
|
}
|
|
357
|
-
|
|
358
|
-
width: 100%;
|
|
359
|
-
height: 100%;
|
|
360
|
-
padding-bottom: 12px;
|
|
361
|
-
cursor: pointer;
|
|
362
|
-
`, we = x.div`
|
|
359
|
+
`, ge = N.div`
|
|
363
360
|
width: 100%;
|
|
364
361
|
height: 100%;
|
|
365
362
|
& > div {
|
|
366
|
-
animation: ${
|
|
363
|
+
animation: ${Yt} 600ms ease-out;
|
|
367
364
|
}
|
|
368
|
-
`,
|
|
365
|
+
`, Xt = N.div`
|
|
369
366
|
& > div > div {
|
|
370
367
|
border-radius: 8px;
|
|
371
368
|
box-sizing: border-box;
|
|
372
369
|
}
|
|
373
|
-
`,
|
|
370
|
+
`, Zt = N.div`
|
|
374
371
|
& > div {
|
|
375
372
|
width: 100%;
|
|
376
373
|
height: 100%;
|
|
@@ -390,149 +387,145 @@ const Ye = x.div`
|
|
|
390
387
|
border-radius: 8px;
|
|
391
388
|
}
|
|
392
389
|
}
|
|
393
|
-
|
|
394
|
-
function Xe(e) {
|
|
390
|
+
`, en = (e) => {
|
|
395
391
|
const { index: t, handleOpenModal: n } = e;
|
|
396
|
-
return /* @__PURE__ */
|
|
397
|
-
|
|
392
|
+
return /* @__PURE__ */ i(
|
|
393
|
+
Ae,
|
|
398
394
|
{
|
|
399
395
|
id: `loading-card-${t}`,
|
|
400
396
|
handleDelete: () => {
|
|
401
397
|
},
|
|
402
398
|
handleView: () => n ? n() : null,
|
|
403
399
|
controls: !1,
|
|
404
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ i(ot, { loading: !0 })
|
|
405
401
|
},
|
|
406
402
|
`loading-card-${t}`
|
|
407
403
|
);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
|
|
414
|
-
ee,
|
|
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,
|
|
415
410
|
{
|
|
416
411
|
id: t.decisionId,
|
|
417
|
-
handleDelete: () =>
|
|
418
|
-
handleView: () =>
|
|
412
|
+
handleDelete: () => a ? a(t.decisionId) : null,
|
|
413
|
+
handleView: () => r ? r(t) : null,
|
|
419
414
|
controls: n,
|
|
420
|
-
children: /* @__PURE__ */
|
|
415
|
+
children: /* @__PURE__ */ i(ot, { decision: t, textValues: o })
|
|
421
416
|
}
|
|
422
417
|
)
|
|
423
418
|
] }) }, t.decisionId) : null;
|
|
424
|
-
}
|
|
425
|
-
function et(e) {
|
|
419
|
+
}, nn = (e) => {
|
|
426
420
|
const {
|
|
427
421
|
customTitleContentAddCard: t,
|
|
428
422
|
index: n,
|
|
429
|
-
handleOpenModal:
|
|
430
|
-
shouldRenderEmptyMessage:
|
|
431
|
-
} = e,
|
|
432
|
-
return /* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
|
|
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,
|
|
436
430
|
{
|
|
437
|
-
onClick: () =>
|
|
438
|
-
children: /* @__PURE__ */
|
|
439
|
-
|
|
431
|
+
onClick: () => r ? r() : null,
|
|
432
|
+
children: /* @__PURE__ */ i(
|
|
433
|
+
Ae,
|
|
440
434
|
{
|
|
441
435
|
id: `add-decision-${n}`,
|
|
442
436
|
handleDelete: () => {
|
|
443
437
|
},
|
|
444
|
-
handleView: () =>
|
|
438
|
+
handleView: () => r ? r() : null,
|
|
445
439
|
controls: !1,
|
|
446
|
-
children: /* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */
|
|
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 })
|
|
449
443
|
] })
|
|
450
444
|
}
|
|
451
445
|
)
|
|
452
446
|
}
|
|
453
447
|
)
|
|
454
448
|
] }) }, `add-decision-${n}`);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
const { type: t } = e, n = tt[t];
|
|
449
|
+
}, rn = {
|
|
450
|
+
loading: en,
|
|
451
|
+
decision: tn,
|
|
452
|
+
add: nn
|
|
453
|
+
}, Te = (e) => {
|
|
454
|
+
const { type: t } = e, n = rn[t];
|
|
462
455
|
return n ? n(e) : null;
|
|
463
|
-
},
|
|
456
|
+
}, an = (e) => {
|
|
464
457
|
const {
|
|
465
458
|
controls: t,
|
|
466
459
|
customTitleContentAddCard: n,
|
|
467
|
-
decisions:
|
|
468
|
-
loading:
|
|
469
|
-
handleOpenModal:
|
|
470
|
-
handleDelete:
|
|
460
|
+
decisions: r,
|
|
461
|
+
loading: a,
|
|
462
|
+
handleOpenModal: o,
|
|
463
|
+
handleDelete: c,
|
|
471
464
|
textValues: l
|
|
472
|
-
} = e,
|
|
473
|
-
(
|
|
465
|
+
} = e, s = a ? Array.from({ length: 3 }).map(
|
|
466
|
+
(p, u) => Te({
|
|
474
467
|
type: "loading",
|
|
475
|
-
index:
|
|
468
|
+
index: u,
|
|
476
469
|
controls: t,
|
|
477
470
|
customTitleContentAddCard: n,
|
|
478
|
-
loading:
|
|
479
|
-
handleOpenModal:
|
|
480
|
-
handleDelete:
|
|
471
|
+
loading: a,
|
|
472
|
+
handleOpenModal: o,
|
|
473
|
+
handleDelete: c,
|
|
481
474
|
textValues: l
|
|
482
475
|
})
|
|
483
|
-
) :
|
|
484
|
-
(
|
|
476
|
+
) : r == null ? void 0 : r.map(
|
|
477
|
+
(p) => Te({
|
|
485
478
|
type: "decision",
|
|
486
|
-
decision:
|
|
479
|
+
decision: p,
|
|
487
480
|
controls: t,
|
|
488
481
|
customTitleContentAddCard: n,
|
|
489
|
-
loading:
|
|
490
|
-
handleOpenModal:
|
|
491
|
-
handleDelete:
|
|
482
|
+
loading: a,
|
|
483
|
+
handleOpenModal: o,
|
|
484
|
+
handleDelete: c,
|
|
492
485
|
textValues: l
|
|
493
486
|
})
|
|
494
|
-
), d = ((
|
|
495
|
-
return { renderedCards:
|
|
496
|
-
},
|
|
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) => {
|
|
497
490
|
const {
|
|
498
491
|
controls: t = !0,
|
|
499
492
|
customTitleContentAddCard: n,
|
|
500
|
-
customMessageEmptyDecisions:
|
|
501
|
-
decisions:
|
|
502
|
-
textValues:
|
|
503
|
-
decisionTemplate:
|
|
493
|
+
customMessageEmptyDecisions: r,
|
|
494
|
+
decisions: a,
|
|
495
|
+
textValues: o,
|
|
496
|
+
decisionTemplate: c,
|
|
504
497
|
isModalOpen: l,
|
|
505
|
-
selectedDecision:
|
|
498
|
+
selectedDecision: s,
|
|
506
499
|
loading: d,
|
|
507
|
-
handleOpenModal:
|
|
508
|
-
handleCloseModal:
|
|
509
|
-
handleSubmitForm:
|
|
510
|
-
handleDelete:
|
|
511
|
-
terms:
|
|
512
|
-
} = e,
|
|
500
|
+
handleOpenModal: p,
|
|
501
|
+
handleCloseModal: u,
|
|
502
|
+
handleSubmitForm: h,
|
|
503
|
+
handleDelete: m,
|
|
504
|
+
terms: f = !0
|
|
505
|
+
} = e, w = H("(max-width: 681px)"), D = H("(max-width: 400px)"), { renderedCards: E, shouldRenderAddCard: x } = an({
|
|
513
506
|
controls: t,
|
|
514
507
|
customTitleContentAddCard: n,
|
|
515
|
-
decisions:
|
|
508
|
+
decisions: a,
|
|
516
509
|
loading: d,
|
|
517
|
-
handleOpenModal:
|
|
518
|
-
handleDelete:
|
|
519
|
-
textValues:
|
|
520
|
-
}),
|
|
521
|
-
return /* @__PURE__ */
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
|
|
510
|
+
handleOpenModal: p,
|
|
511
|
+
handleDelete: m,
|
|
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,
|
|
524
517
|
{
|
|
525
518
|
direction: "column",
|
|
526
519
|
gap: "28px",
|
|
527
520
|
width: "100%",
|
|
528
|
-
height:
|
|
521
|
+
height: w ? "auto" : "435px",
|
|
529
522
|
justifyContent: "center",
|
|
530
523
|
alignItems: "center",
|
|
531
524
|
children: [
|
|
532
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ i(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ g(O, { children: [
|
|
533
526
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
534
|
-
/* @__PURE__ */
|
|
535
|
-
|
|
527
|
+
/* @__PURE__ */ g(
|
|
528
|
+
k,
|
|
536
529
|
{
|
|
537
530
|
as: "span",
|
|
538
531
|
type: "label",
|
|
@@ -548,20 +541,20 @@ const tt = {
|
|
|
548
541
|
),
|
|
549
542
|
"para empezar."
|
|
550
543
|
] }) }),
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
|
|
544
|
+
/* @__PURE__ */ i(
|
|
545
|
+
P,
|
|
553
546
|
{
|
|
554
|
-
iconBefore: /* @__PURE__ */
|
|
555
|
-
onClick: () =>
|
|
547
|
+
iconBefore: /* @__PURE__ */ i(pe, {}),
|
|
548
|
+
onClick: () => p ? p() : null,
|
|
556
549
|
children: n || "Agregar decisión"
|
|
557
550
|
}
|
|
558
551
|
)
|
|
559
552
|
]
|
|
560
553
|
}
|
|
561
|
-
) : /* @__PURE__ */
|
|
562
|
-
|
|
554
|
+
) : /* @__PURE__ */ g(
|
|
555
|
+
he,
|
|
563
556
|
{
|
|
564
|
-
templateColumns:
|
|
557
|
+
templateColumns: D ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
565
558
|
autoFlow: "row dense",
|
|
566
559
|
gap: "24px",
|
|
567
560
|
alignItems: "start",
|
|
@@ -569,45 +562,77 @@ const tt = {
|
|
|
569
562
|
autoRows: "1fr",
|
|
570
563
|
justifyItems: "center",
|
|
571
564
|
padding: "6px",
|
|
572
|
-
height:
|
|
565
|
+
height: w ? "auto" : "484px",
|
|
573
566
|
children: [
|
|
574
|
-
|
|
575
|
-
|
|
567
|
+
E,
|
|
568
|
+
x && Te({
|
|
576
569
|
type: "add",
|
|
577
|
-
index:
|
|
570
|
+
index: a == null ? void 0 : a.length,
|
|
578
571
|
controls: t,
|
|
579
572
|
customTitleContentAddCard: n,
|
|
580
|
-
customMessageEmptyDecisions:
|
|
573
|
+
customMessageEmptyDecisions: r,
|
|
581
574
|
loading: d,
|
|
582
|
-
handleOpenModal:
|
|
583
|
-
handleDelete:
|
|
584
|
-
textValues:
|
|
585
|
-
shouldRenderEmptyMessage:
|
|
586
|
-
terms:
|
|
575
|
+
handleOpenModal: p,
|
|
576
|
+
handleDelete: m,
|
|
577
|
+
textValues: o,
|
|
578
|
+
shouldRenderEmptyMessage: S,
|
|
579
|
+
terms: f
|
|
587
580
|
})
|
|
588
581
|
]
|
|
589
582
|
}
|
|
590
583
|
) }) }) }),
|
|
591
|
-
l && /* @__PURE__ */
|
|
592
|
-
|
|
584
|
+
l && /* @__PURE__ */ i(
|
|
585
|
+
lt,
|
|
593
586
|
{
|
|
594
587
|
portalId: "modal-portal",
|
|
595
|
-
onCloseModal:
|
|
596
|
-
title:
|
|
597
|
-
children: /* @__PURE__ */
|
|
598
|
-
|
|
588
|
+
onCloseModal: u,
|
|
589
|
+
title: s ? "Editar Decisión" : "Nueva decisión",
|
|
590
|
+
children: /* @__PURE__ */ i(
|
|
591
|
+
ut,
|
|
599
592
|
{
|
|
600
|
-
decision:
|
|
601
|
-
onSubmitEvent:
|
|
602
|
-
textValues:
|
|
603
|
-
onCancel: () =>
|
|
593
|
+
decision: s || c,
|
|
594
|
+
onSubmitEvent: h,
|
|
595
|
+
textValues: o,
|
|
596
|
+
onCancel: () => u ? u() : () => {
|
|
604
597
|
}
|
|
605
598
|
}
|
|
606
599
|
)
|
|
607
600
|
}
|
|
608
601
|
)
|
|
609
602
|
] });
|
|
610
|
-
},
|
|
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,
|
|
609
|
+
{
|
|
610
|
+
cursorHover: !0,
|
|
611
|
+
appearance: "danger",
|
|
612
|
+
spacing: "compact",
|
|
613
|
+
variant: "outlined",
|
|
614
|
+
iconBefore: /* @__PURE__ */ i(Je, {}),
|
|
615
|
+
onClick: () => {
|
|
616
|
+
r(a);
|
|
617
|
+
},
|
|
618
|
+
children: "Eliminar"
|
|
619
|
+
}
|
|
620
|
+
) }) })
|
|
621
|
+
] });
|
|
622
|
+
}, on = (e) => e.value, ln = (e) => e.value, sn = (e) => e.value, cn = (e) => ({
|
|
623
|
+
from: e.from ?? "",
|
|
624
|
+
to: e.to ?? ""
|
|
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`
|
|
611
636
|
display: flex;
|
|
612
637
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
613
638
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -620,71 +645,602 @@ const tt = {
|
|
|
620
645
|
margin: ${({ $margin: e }) => e};
|
|
621
646
|
padding: ${({ $padding: e }) => e};
|
|
622
647
|
background: ${({ $background: e, theme: t }) => {
|
|
623
|
-
var n,
|
|
624
|
-
return e ? `${((
|
|
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}`;
|
|
625
650
|
}};
|
|
626
651
|
border: ${({ $border: e, theme: t }) => {
|
|
627
|
-
var n,
|
|
628
|
-
return e ? `1px solid ${((
|
|
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";
|
|
629
654
|
}};
|
|
630
655
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
631
656
|
box-sizing: ${({ $boxSizing: e }) => e};
|
|
632
657
|
overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
|
|
633
|
-
`,
|
|
658
|
+
`, _ = oe.forwardRef(
|
|
634
659
|
(e, t) => {
|
|
635
660
|
const {
|
|
636
661
|
children: n,
|
|
637
|
-
wrap:
|
|
638
|
-
direction:
|
|
639
|
-
justifyContent:
|
|
640
|
-
alignItems:
|
|
662
|
+
wrap: r,
|
|
663
|
+
direction: a = "column",
|
|
664
|
+
justifyContent: o,
|
|
665
|
+
alignItems: c,
|
|
641
666
|
alignContent: l,
|
|
642
|
-
height:
|
|
667
|
+
height: s,
|
|
643
668
|
width: d,
|
|
644
|
-
gap:
|
|
645
|
-
background:
|
|
646
|
-
borderRadius:
|
|
647
|
-
border:
|
|
648
|
-
margin:
|
|
649
|
-
padding:
|
|
650
|
-
boxSizing:
|
|
651
|
-
scroll:
|
|
669
|
+
gap: p,
|
|
670
|
+
background: u,
|
|
671
|
+
borderRadius: h,
|
|
672
|
+
border: m,
|
|
673
|
+
margin: f = "0px",
|
|
674
|
+
padding: w = "0px",
|
|
675
|
+
boxSizing: D,
|
|
676
|
+
scroll: E = !1
|
|
652
677
|
} = e;
|
|
653
|
-
return /* @__PURE__ */
|
|
654
|
-
|
|
678
|
+
return /* @__PURE__ */ i(
|
|
679
|
+
gn,
|
|
655
680
|
{
|
|
656
681
|
ref: t,
|
|
657
|
-
direction:
|
|
658
|
-
$justifyContent:
|
|
659
|
-
$alignItems:
|
|
682
|
+
direction: a,
|
|
683
|
+
$justifyContent: o,
|
|
684
|
+
$alignItems: c,
|
|
660
685
|
$alignContent: l,
|
|
661
|
-
height:
|
|
686
|
+
height: s,
|
|
662
687
|
width: d,
|
|
663
|
-
wrap:
|
|
664
|
-
$gap:
|
|
665
|
-
$background:
|
|
666
|
-
$border:
|
|
667
|
-
$margin:
|
|
668
|
-
$padding:
|
|
669
|
-
$borderRadius:
|
|
670
|
-
$boxSizing:
|
|
671
|
-
$scroll:
|
|
688
|
+
wrap: r,
|
|
689
|
+
$gap: p,
|
|
690
|
+
$background: u,
|
|
691
|
+
$border: m,
|
|
692
|
+
$margin: f,
|
|
693
|
+
$padding: w,
|
|
694
|
+
$borderRadius: h,
|
|
695
|
+
$boxSizing: D,
|
|
696
|
+
$scroll: E,
|
|
672
697
|
children: n
|
|
673
698
|
}
|
|
674
699
|
);
|
|
675
700
|
}
|
|
676
701
|
);
|
|
677
|
-
|
|
678
|
-
const
|
|
702
|
+
_.displayName = "BorderStack";
|
|
703
|
+
const fn = (e) => {
|
|
704
|
+
const {
|
|
705
|
+
conditionsAlignment: t,
|
|
706
|
+
decision: n,
|
|
707
|
+
decisionMapper: r,
|
|
708
|
+
loading: a,
|
|
709
|
+
textValues: o,
|
|
710
|
+
visibleConditions: c,
|
|
711
|
+
tagLabel: l,
|
|
712
|
+
isOpen: s,
|
|
713
|
+
onToggle: d,
|
|
714
|
+
hasEffectiveFrom: p,
|
|
715
|
+
hasValidUntil: u,
|
|
716
|
+
effectiveFromRenderer: h,
|
|
717
|
+
validUntilRenderer: m
|
|
718
|
+
} = e;
|
|
719
|
+
return a ? /* @__PURE__ */ g(b, { direction: "column", gap: "16px", children: [
|
|
720
|
+
/* @__PURE__ */ g(
|
|
721
|
+
b,
|
|
722
|
+
{
|
|
723
|
+
alignItems: "start",
|
|
724
|
+
justifyContent: "space-between",
|
|
725
|
+
children: [
|
|
726
|
+
/* @__PURE__ */ i(
|
|
727
|
+
ae,
|
|
728
|
+
{
|
|
729
|
+
element: r,
|
|
730
|
+
valueData: ee(
|
|
731
|
+
r
|
|
732
|
+
),
|
|
733
|
+
type: "decision"
|
|
734
|
+
}
|
|
735
|
+
),
|
|
736
|
+
/* @__PURE__ */ g(b, { gap: "8px", children: [
|
|
737
|
+
/* @__PURE__ */ i(X, { appearance: "gray", label: l, displayIcon: !1 }),
|
|
738
|
+
/* @__PURE__ */ i(
|
|
739
|
+
M,
|
|
740
|
+
{
|
|
741
|
+
appearance: "dark",
|
|
742
|
+
icon: s ? /* @__PURE__ */ i(Et, {}) : /* @__PURE__ */ i(Xe, {}),
|
|
743
|
+
onClick: d,
|
|
744
|
+
size: "24px",
|
|
745
|
+
cursorHover: !0
|
|
746
|
+
}
|
|
747
|
+
)
|
|
748
|
+
] })
|
|
749
|
+
]
|
|
750
|
+
},
|
|
751
|
+
n.ruleName
|
|
752
|
+
),
|
|
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,
|
|
758
|
+
{
|
|
759
|
+
type: "label",
|
|
760
|
+
size: "large",
|
|
761
|
+
appearance: "dark",
|
|
762
|
+
weight: "bold",
|
|
763
|
+
textAlign: "start",
|
|
764
|
+
padding: "0 12px",
|
|
765
|
+
children: o.factsThatConditionIt
|
|
766
|
+
}
|
|
767
|
+
),
|
|
768
|
+
/* @__PURE__ */ g(
|
|
769
|
+
b,
|
|
770
|
+
{
|
|
771
|
+
direction: "column",
|
|
772
|
+
gap: "8px",
|
|
773
|
+
justifyContent: t,
|
|
774
|
+
children: [
|
|
775
|
+
c.map((f) => /* @__PURE__ */ i(
|
|
776
|
+
_,
|
|
777
|
+
{
|
|
778
|
+
direction: "column",
|
|
779
|
+
padding: "6px 12px",
|
|
780
|
+
borderRadius: "8px",
|
|
781
|
+
background: !0,
|
|
782
|
+
children: /* @__PURE__ */ i(
|
|
783
|
+
ae,
|
|
784
|
+
{
|
|
785
|
+
element: { ...f, value: f.value },
|
|
786
|
+
valueData: ee(
|
|
787
|
+
f
|
|
788
|
+
)
|
|
789
|
+
}
|
|
790
|
+
)
|
|
791
|
+
},
|
|
792
|
+
f.conditionName
|
|
793
|
+
)),
|
|
794
|
+
p && h && /* @__PURE__ */ i(
|
|
795
|
+
_,
|
|
796
|
+
{
|
|
797
|
+
direction: "column",
|
|
798
|
+
padding: "6px 12px",
|
|
799
|
+
borderRadius: "8px",
|
|
800
|
+
background: !0,
|
|
801
|
+
children: /* @__PURE__ */ i(
|
|
802
|
+
ae,
|
|
803
|
+
{
|
|
804
|
+
element: h.element,
|
|
805
|
+
valueData: h.valueData
|
|
806
|
+
},
|
|
807
|
+
"effectiveFrom"
|
|
808
|
+
)
|
|
809
|
+
}
|
|
810
|
+
),
|
|
811
|
+
u && m && /* @__PURE__ */ i(
|
|
812
|
+
_,
|
|
813
|
+
{
|
|
814
|
+
direction: "column",
|
|
815
|
+
padding: "6px 12px",
|
|
816
|
+
borderRadius: "8px",
|
|
817
|
+
background: !0,
|
|
818
|
+
children: /* @__PURE__ */ i(
|
|
819
|
+
ae,
|
|
820
|
+
{
|
|
821
|
+
element: m.element,
|
|
822
|
+
valueData: m.valueData
|
|
823
|
+
},
|
|
824
|
+
"validUntil"
|
|
825
|
+
)
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
]
|
|
829
|
+
}
|
|
830
|
+
)
|
|
831
|
+
] })
|
|
832
|
+
] })
|
|
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" })
|
|
837
|
+
] }),
|
|
838
|
+
/* @__PURE__ */ g(b, { alignItems: "center", gap: "8px", children: [
|
|
839
|
+
/* @__PURE__ */ i(j, { animated: !0, width: "50px" }),
|
|
840
|
+
/* @__PURE__ */ i(At, { animated: !0 })
|
|
841
|
+
] })
|
|
842
|
+
] });
|
|
843
|
+
}, dt = (e) => {
|
|
844
|
+
var E;
|
|
845
|
+
const {
|
|
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 ? {
|
|
853
|
+
element: {
|
|
854
|
+
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
855
|
+
value: String(t.effectiveFrom),
|
|
856
|
+
howToSetTheDecision: z.EQUAL,
|
|
857
|
+
decisionDataType: U.DATE
|
|
858
|
+
},
|
|
859
|
+
valueData: ee({
|
|
860
|
+
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
861
|
+
value: String(t.effectiveFrom),
|
|
862
|
+
howToSetTheDecision: z.EQUAL,
|
|
863
|
+
decisionDataType: U.DATE
|
|
864
|
+
})
|
|
865
|
+
} : null, p = s ? {
|
|
866
|
+
element: {
|
|
867
|
+
labelName: r == null ? void 0 : r.validUntil,
|
|
868
|
+
value: String(t.validUntil),
|
|
869
|
+
howToSetTheDecision: z.EQUAL,
|
|
870
|
+
decisionDataType: U.DATE
|
|
871
|
+
},
|
|
872
|
+
valueData: ee({
|
|
873
|
+
labelName: r == null ? void 0 : r.validUntil,
|
|
874
|
+
value: String(t.validUntil),
|
|
875
|
+
howToSetTheDecision: z.EQUAL,
|
|
876
|
+
decisionDataType: U.DATE
|
|
877
|
+
})
|
|
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,
|
|
888
|
+
{
|
|
889
|
+
conditionsAlignment: w,
|
|
890
|
+
decision: t,
|
|
891
|
+
decisionMapper: u,
|
|
892
|
+
loading: f,
|
|
893
|
+
skeleton: m,
|
|
894
|
+
textValues: r,
|
|
895
|
+
visibleConditions: h,
|
|
896
|
+
tagLabel: D,
|
|
897
|
+
isOpen: o,
|
|
898
|
+
onToggle: c,
|
|
899
|
+
hasEffectiveFrom: l,
|
|
900
|
+
hasValidUntil: s,
|
|
901
|
+
effectiveFromRenderer: d,
|
|
902
|
+
validUntilRenderer: p
|
|
903
|
+
}
|
|
904
|
+
);
|
|
905
|
+
}, mn = rt`
|
|
906
|
+
from {
|
|
907
|
+
opacity: 0;
|
|
908
|
+
transform: translateY(20px);
|
|
909
|
+
}
|
|
910
|
+
to {
|
|
911
|
+
opacity: 1;
|
|
912
|
+
transform: translateY(0);
|
|
913
|
+
}
|
|
914
|
+
`;
|
|
915
|
+
N.div`
|
|
916
|
+
border-radius: 8px;
|
|
917
|
+
border: 1px solid
|
|
918
|
+
${({ theme: e }) => {
|
|
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;
|
|
921
|
+
}};
|
|
922
|
+
box-sizing: border-box;
|
|
923
|
+
display: flex;
|
|
924
|
+
flex-direction: column;
|
|
925
|
+
width: 100%;
|
|
926
|
+
height: 100%;
|
|
927
|
+
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
928
|
+
`;
|
|
929
|
+
N.div`
|
|
930
|
+
& > div {
|
|
931
|
+
border-radius: 8px;
|
|
932
|
+
border: 1px solid
|
|
933
|
+
${({ theme: e }) => {
|
|
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;
|
|
936
|
+
}};
|
|
937
|
+
}
|
|
938
|
+
`;
|
|
939
|
+
N.div`
|
|
940
|
+
& > div {
|
|
941
|
+
background-color: ${({ theme: e }) => {
|
|
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;
|
|
944
|
+
}};
|
|
945
|
+
justify-content: center;
|
|
946
|
+
}
|
|
947
|
+
min-height: 350px;
|
|
948
|
+
width: 100%;
|
|
949
|
+
height: 100%;
|
|
950
|
+
padding-bottom: 12px;
|
|
951
|
+
cursor: pointer;
|
|
952
|
+
`;
|
|
953
|
+
N.div`
|
|
954
|
+
width: 100%;
|
|
955
|
+
height: 100%;
|
|
956
|
+
& > div {
|
|
957
|
+
animation: ${mn} 600ms ease-out;
|
|
958
|
+
}
|
|
959
|
+
`;
|
|
960
|
+
const bn = N.div`
|
|
961
|
+
& > div > div {
|
|
962
|
+
border-radius: 8px;
|
|
963
|
+
box-sizing: border-box;
|
|
964
|
+
}
|
|
965
|
+
`, vn = N.div`
|
|
966
|
+
& > div {
|
|
967
|
+
width: 100%;
|
|
968
|
+
height: 100%;
|
|
969
|
+
overflow-y: auto;
|
|
970
|
+
|
|
971
|
+
&::-webkit-scrollbar {
|
|
972
|
+
width: 8px;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
&::-webkit-scrollbar-thumb {
|
|
976
|
+
background-color: #c1c7d0;
|
|
977
|
+
border-radius: 8px;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
&::-webkit-scrollbar-track {
|
|
981
|
+
background-color: #ebecf0;
|
|
982
|
+
border-radius: 8px;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
`, yn = (e) => {
|
|
986
|
+
const { index: t, handleOpenModal: n } = e;
|
|
987
|
+
return /* @__PURE__ */ i(
|
|
988
|
+
ct,
|
|
989
|
+
{
|
|
990
|
+
id: `loading-card-${t}`,
|
|
991
|
+
handleDelete: () => {
|
|
992
|
+
},
|
|
993
|
+
handleView: () => n ? n() : null,
|
|
994
|
+
controls: !1,
|
|
995
|
+
children: /* @__PURE__ */ i(dt, { loading: !0 })
|
|
996
|
+
},
|
|
997
|
+
`loading-card-${t}`
|
|
998
|
+
);
|
|
999
|
+
}, xn = (e) => {
|
|
1000
|
+
const {
|
|
1001
|
+
decision: t,
|
|
1002
|
+
controls: n,
|
|
1003
|
+
handleOpenModal: r,
|
|
1004
|
+
handleDelete: a,
|
|
1005
|
+
textValues: o,
|
|
1006
|
+
index: c,
|
|
1007
|
+
isOpen: l,
|
|
1008
|
+
onToggle: s
|
|
1009
|
+
} = e;
|
|
1010
|
+
return t ? /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(b, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
|
|
1011
|
+
ct,
|
|
1012
|
+
{
|
|
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,
|
|
1019
|
+
{
|
|
1020
|
+
decision: t,
|
|
1021
|
+
textValues: o,
|
|
1022
|
+
position: c,
|
|
1023
|
+
isOpen: !!l,
|
|
1024
|
+
onToggle: () => s == null ? void 0 : s(!l)
|
|
1025
|
+
}
|
|
1026
|
+
)
|
|
1027
|
+
}
|
|
1028
|
+
) }) }, t.decisionId) : null;
|
|
1029
|
+
}, wn = (e) => {
|
|
1030
|
+
const {
|
|
1031
|
+
customTitleContentAddCard: t,
|
|
1032
|
+
index: n,
|
|
1033
|
+
handleOpenModal: r,
|
|
1034
|
+
shouldRenderEmptyMessage: a
|
|
1035
|
+
} = e;
|
|
1036
|
+
return /* @__PURE__ */ i(ge, { children: a ? null : /* @__PURE__ */ i(
|
|
1037
|
+
st,
|
|
1038
|
+
{
|
|
1039
|
+
onClick: () => r ? r() : null,
|
|
1040
|
+
children: /* @__PURE__ */ i(
|
|
1041
|
+
_,
|
|
1042
|
+
{
|
|
1043
|
+
direction: "column",
|
|
1044
|
+
gap: "4px",
|
|
1045
|
+
width: "100%",
|
|
1046
|
+
height: "100%",
|
|
1047
|
+
background: !0,
|
|
1048
|
+
borderRadius: "8px",
|
|
1049
|
+
children: /* @__PURE__ */ g(
|
|
1050
|
+
b,
|
|
1051
|
+
{
|
|
1052
|
+
justifyContent: "space-between",
|
|
1053
|
+
alignItems: "center",
|
|
1054
|
+
padding: "16px",
|
|
1055
|
+
children: [
|
|
1056
|
+
/* @__PURE__ */ i(k, { appearance: "gray", type: "label", size: "large", weight: "bold", children: t || "Agregar decisión" }),
|
|
1057
|
+
/* @__PURE__ */ i(
|
|
1058
|
+
M,
|
|
1059
|
+
{
|
|
1060
|
+
appearance: "gray",
|
|
1061
|
+
icon: /* @__PURE__ */ i(pe, {}),
|
|
1062
|
+
size: "24px",
|
|
1063
|
+
cursorHover: !0
|
|
1064
|
+
}
|
|
1065
|
+
)
|
|
1066
|
+
]
|
|
1067
|
+
}
|
|
1068
|
+
)
|
|
1069
|
+
}
|
|
1070
|
+
)
|
|
1071
|
+
}
|
|
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) => {
|
|
1081
|
+
const {
|
|
1082
|
+
controls: t,
|
|
1083
|
+
customTitleContentAddCard: n,
|
|
1084
|
+
decisions: r,
|
|
1085
|
+
loading: a,
|
|
1086
|
+
handleOpenModal: o,
|
|
1087
|
+
handleDelete: c,
|
|
1088
|
+
textValues: l,
|
|
1089
|
+
isOpenFor: s,
|
|
1090
|
+
toggleAt: d
|
|
1091
|
+
} = e, p = a ? Array.from({ length: 3 }).map(
|
|
1092
|
+
(h, m) => Ce({
|
|
1093
|
+
type: "loading",
|
|
1094
|
+
index: m,
|
|
1095
|
+
controls: t,
|
|
1096
|
+
customTitleContentAddCard: n,
|
|
1097
|
+
loading: a,
|
|
1098
|
+
handleOpenModal: o,
|
|
1099
|
+
handleDelete: c,
|
|
1100
|
+
textValues: l
|
|
1101
|
+
})
|
|
1102
|
+
) : r == null ? void 0 : r.map(
|
|
1103
|
+
(h, m) => Ce({
|
|
1104
|
+
type: "decision",
|
|
1105
|
+
decision: h,
|
|
1106
|
+
controls: s ? s(m) : !1,
|
|
1107
|
+
customTitleContentAddCard: n,
|
|
1108
|
+
loading: a,
|
|
1109
|
+
handleOpenModal: o,
|
|
1110
|
+
handleDelete: c,
|
|
1111
|
+
textValues: l,
|
|
1112
|
+
index: m,
|
|
1113
|
+
isOpen: s ? s(m) : !1,
|
|
1114
|
+
onToggle: d ? () => d(m) : void 0
|
|
1115
|
+
})
|
|
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) => {
|
|
1119
|
+
const {
|
|
1120
|
+
controls: t = !0,
|
|
1121
|
+
customTitleContentAddCard: n,
|
|
1122
|
+
customMessageEmptyDecisions: r,
|
|
1123
|
+
decisions: a,
|
|
1124
|
+
textValues: o,
|
|
1125
|
+
decisionTemplate: c,
|
|
1126
|
+
isModalOpen: l,
|
|
1127
|
+
selectedDecision: s,
|
|
1128
|
+
loading: d,
|
|
1129
|
+
handleOpenModal: p,
|
|
1130
|
+
handleCloseModal: u,
|
|
1131
|
+
handleSubmitForm: h,
|
|
1132
|
+
handleDelete: m,
|
|
1133
|
+
terms: f = !0
|
|
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,
|
|
1140
|
+
handleDelete: m,
|
|
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,
|
|
1148
|
+
{
|
|
1149
|
+
direction: "column",
|
|
1150
|
+
gap: "28px",
|
|
1151
|
+
width: "100%",
|
|
1152
|
+
height: E ? "auto" : "435px",
|
|
1153
|
+
justifyContent: "center",
|
|
1154
|
+
alignItems: "center",
|
|
1155
|
+
children: [
|
|
1156
|
+
/* @__PURE__ */ i(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ g(O, { children: [
|
|
1157
|
+
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1158
|
+
/* @__PURE__ */ g(
|
|
1159
|
+
k,
|
|
1160
|
+
{
|
|
1161
|
+
as: "span",
|
|
1162
|
+
type: "label",
|
|
1163
|
+
size: "large",
|
|
1164
|
+
appearance: "gray",
|
|
1165
|
+
weight: "bold",
|
|
1166
|
+
children: [
|
|
1167
|
+
"“",
|
|
1168
|
+
n || "+ Agregar decisión",
|
|
1169
|
+
"”"
|
|
1170
|
+
]
|
|
1171
|
+
}
|
|
1172
|
+
),
|
|
1173
|
+
"para empezar."
|
|
1174
|
+
] }) }),
|
|
1175
|
+
/* @__PURE__ */ i(
|
|
1176
|
+
P,
|
|
1177
|
+
{
|
|
1178
|
+
iconBefore: /* @__PURE__ */ i(pe, {}),
|
|
1179
|
+
onClick: () => p ? p() : null,
|
|
1180
|
+
children: n || "Agregar decisión"
|
|
1181
|
+
}
|
|
1182
|
+
)
|
|
1183
|
+
]
|
|
1184
|
+
}
|
|
1185
|
+
) : /* @__PURE__ */ g(
|
|
1186
|
+
he,
|
|
1187
|
+
{
|
|
1188
|
+
templateColumns: "1fr",
|
|
1189
|
+
autoFlow: "row dense",
|
|
1190
|
+
gap: "16px",
|
|
1191
|
+
alignItems: "start",
|
|
1192
|
+
justifyContent: "center",
|
|
1193
|
+
autoRows: "auto",
|
|
1194
|
+
justifyItems: "center",
|
|
1195
|
+
padding: "6px",
|
|
1196
|
+
height: E ? "auto" : "484px",
|
|
1197
|
+
children: [
|
|
1198
|
+
x,
|
|
1199
|
+
S && Ce({
|
|
1200
|
+
type: "add",
|
|
1201
|
+
index: a == null ? void 0 : a.length,
|
|
1202
|
+
controls: t,
|
|
1203
|
+
customTitleContentAddCard: n,
|
|
1204
|
+
customMessageEmptyDecisions: r,
|
|
1205
|
+
loading: d,
|
|
1206
|
+
handleOpenModal: p,
|
|
1207
|
+
handleDelete: m,
|
|
1208
|
+
textValues: o,
|
|
1209
|
+
shouldRenderEmptyMessage: T,
|
|
1210
|
+
terms: f
|
|
1211
|
+
})
|
|
1212
|
+
]
|
|
1213
|
+
}
|
|
1214
|
+
) }) }) }),
|
|
1215
|
+
l && /* @__PURE__ */ i(
|
|
1216
|
+
lt,
|
|
1217
|
+
{
|
|
1218
|
+
portalId: "modal-portal",
|
|
1219
|
+
onCloseModal: u,
|
|
1220
|
+
title: s ? "Editar Decisión" : "Nueva decisión",
|
|
1221
|
+
children: /* @__PURE__ */ i(
|
|
1222
|
+
ut,
|
|
1223
|
+
{
|
|
1224
|
+
decision: s || c,
|
|
1225
|
+
onSubmitEvent: h,
|
|
1226
|
+
textValues: o,
|
|
1227
|
+
onCancel: () => u ? u() : () => {
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
)
|
|
1231
|
+
}
|
|
1232
|
+
)
|
|
1233
|
+
] });
|
|
1234
|
+
}, Nn = {
|
|
679
1235
|
border: {
|
|
680
|
-
color:
|
|
1236
|
+
color: C.palette.neutral.N40
|
|
681
1237
|
}
|
|
682
|
-
},
|
|
1238
|
+
}, En = N.div`
|
|
683
1239
|
border-width: 1px;
|
|
684
1240
|
border-style: solid;
|
|
685
1241
|
border-color: ${({ theme: e }) => {
|
|
686
1242
|
var t, n;
|
|
687
|
-
return ((n = (t = e == null ? void 0 : e.box) == null ? void 0 : t.border) == null ? void 0 : n.color) ||
|
|
1243
|
+
return ((n = (t = e == null ? void 0 : e.box) == null ? void 0 : t.border) == null ? void 0 : n.color) || Nn.border.color;
|
|
688
1244
|
}};
|
|
689
1245
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
690
1246
|
margin: ${({ $margin: e }) => e};
|
|
@@ -693,92 +1249,92 @@ const at = {
|
|
|
693
1249
|
height: ${({ $height: e }) => e};
|
|
694
1250
|
box-sizing: border-box;
|
|
695
1251
|
`;
|
|
696
|
-
function
|
|
1252
|
+
function Sn(e) {
|
|
697
1253
|
const {
|
|
698
1254
|
children: t,
|
|
699
1255
|
padding: n = "16px",
|
|
700
|
-
margin:
|
|
701
|
-
borderRadius:
|
|
702
|
-
width:
|
|
703
|
-
height:
|
|
1256
|
+
margin: r,
|
|
1257
|
+
borderRadius: a = "8px",
|
|
1258
|
+
width: o,
|
|
1259
|
+
height: c
|
|
704
1260
|
} = e;
|
|
705
|
-
return /* @__PURE__ */
|
|
706
|
-
|
|
1261
|
+
return /* @__PURE__ */ i(
|
|
1262
|
+
En,
|
|
707
1263
|
{
|
|
708
1264
|
$padding: n,
|
|
709
|
-
$margin:
|
|
710
|
-
$borderRadius:
|
|
711
|
-
$width:
|
|
712
|
-
$height:
|
|
1265
|
+
$margin: r,
|
|
1266
|
+
$borderRadius: a,
|
|
1267
|
+
$width: o,
|
|
1268
|
+
$height: c,
|
|
713
1269
|
children: t
|
|
714
1270
|
}
|
|
715
1271
|
);
|
|
716
1272
|
}
|
|
717
|
-
const
|
|
718
|
-
const [n,
|
|
719
|
-
return
|
|
720
|
-
if (!e.current || !
|
|
721
|
-
const d = e.current,
|
|
722
|
-
var
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
),
|
|
726
|
-
let
|
|
727
|
-
const
|
|
728
|
-
for (let
|
|
729
|
-
const
|
|
730
|
-
|
|
1273
|
+
const Dn = (e, t) => {
|
|
1274
|
+
const [n, r] = V([]), [a, o] = V([]), [c, l] = V(!1), s = le(null);
|
|
1275
|
+
return ke(() => {
|
|
1276
|
+
if (!e.current || !s.current) return;
|
|
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]);
|
|
731
1287
|
}
|
|
732
|
-
|
|
733
|
-
},
|
|
734
|
-
requestAnimationFrame(
|
|
1288
|
+
r(E), o(x), l(x.length > 0);
|
|
1289
|
+
}, h = new ResizeObserver(() => {
|
|
1290
|
+
requestAnimationFrame(u);
|
|
735
1291
|
});
|
|
736
|
-
return
|
|
737
|
-
}, [t, e]), { visible: n, hidden:
|
|
1292
|
+
return h.observe(d), () => h.disconnect();
|
|
1293
|
+
}, [t, e]), { visible: n, hidden: a, showOverflowIndicator: c, measurementRef: s };
|
|
738
1294
|
};
|
|
739
|
-
|
|
1295
|
+
N.div`
|
|
740
1296
|
& > div {
|
|
741
1297
|
width: 100%;
|
|
742
1298
|
}
|
|
743
1299
|
`;
|
|
744
|
-
const
|
|
1300
|
+
const kn = N.div`
|
|
745
1301
|
position: absolute;
|
|
746
1302
|
top: calc(100% + 4px);
|
|
747
1303
|
right: 0;
|
|
748
1304
|
z-index: 1000;
|
|
749
1305
|
width: 170px;
|
|
750
|
-
`,
|
|
1306
|
+
`, Rn = N.div`
|
|
751
1307
|
position: absolute;
|
|
752
1308
|
visibility: hidden;
|
|
753
1309
|
pointer-events: none;
|
|
754
1310
|
height: 0;
|
|
755
1311
|
overflow: hidden;
|
|
756
|
-
`,
|
|
1312
|
+
`, An = N.div`
|
|
757
1313
|
cursor: pointer;
|
|
758
|
-
`,
|
|
1314
|
+
`, Ne = {
|
|
759
1315
|
border: {
|
|
760
1316
|
color: {
|
|
761
|
-
regular:
|
|
762
|
-
disabled:
|
|
763
|
-
focus:
|
|
764
|
-
invalid:
|
|
1317
|
+
regular: C.palette.neutral.N40,
|
|
1318
|
+
disabled: C.palette.neutral.N40,
|
|
1319
|
+
focus: C.palette.blue.B300,
|
|
1320
|
+
invalid: C.palette.red.R400
|
|
765
1321
|
}
|
|
766
1322
|
},
|
|
767
1323
|
background: {
|
|
768
1324
|
color: {
|
|
769
|
-
regular:
|
|
770
|
-
disabled:
|
|
1325
|
+
regular: C.palette.neutral.N0,
|
|
1326
|
+
disabled: C.palette.neutral.N10
|
|
771
1327
|
}
|
|
772
1328
|
},
|
|
773
1329
|
content: {
|
|
774
1330
|
color: {
|
|
775
|
-
regular:
|
|
776
|
-
disabled:
|
|
1331
|
+
regular: C.palette.neutral.N900,
|
|
1332
|
+
disabled: C.palette.neutral.N70
|
|
777
1333
|
}
|
|
778
1334
|
},
|
|
779
1335
|
placeholder: {
|
|
780
1336
|
color: {
|
|
781
|
-
regular:
|
|
1337
|
+
regular: C.palette.neutral.N300
|
|
782
1338
|
}
|
|
783
1339
|
},
|
|
784
1340
|
option: {
|
|
@@ -787,11 +1343,11 @@ const st = x.div`
|
|
|
787
1343
|
hover: "primary"
|
|
788
1344
|
},
|
|
789
1345
|
background: {
|
|
790
|
-
regular:
|
|
791
|
-
hover:
|
|
1346
|
+
regular: C.palette.neutral.N0,
|
|
1347
|
+
hover: C.palette.neutral.N30
|
|
792
1348
|
}
|
|
793
1349
|
}
|
|
794
|
-
},
|
|
1350
|
+
}, $n = N.li`
|
|
795
1351
|
display: flex;
|
|
796
1352
|
align-items: center;
|
|
797
1353
|
align-self: stretch;
|
|
@@ -805,56 +1361,56 @@ const st = x.div`
|
|
|
805
1361
|
|
|
806
1362
|
&:hover {
|
|
807
1363
|
background-color: ${({ theme: e }) => {
|
|
808
|
-
var t, n,
|
|
809
|
-
return ((
|
|
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;
|
|
810
1366
|
}};
|
|
811
1367
|
}
|
|
812
|
-
`,
|
|
813
|
-
var
|
|
814
|
-
const { id: t, label: n, leadingIcon:
|
|
815
|
-
return /* @__PURE__ */
|
|
816
|
-
|
|
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,
|
|
817
1373
|
{
|
|
818
1374
|
id: t,
|
|
819
1375
|
onMouseEnter: l,
|
|
820
|
-
onMouseLeave:
|
|
821
|
-
onClick: (
|
|
822
|
-
|
|
1376
|
+
onMouseLeave: s,
|
|
1377
|
+
onClick: (x) => {
|
|
1378
|
+
x.stopPropagation();
|
|
823
1379
|
},
|
|
824
|
-
children: /* @__PURE__ */
|
|
825
|
-
|
|
1380
|
+
children: /* @__PURE__ */ g(
|
|
1381
|
+
he,
|
|
826
1382
|
{
|
|
827
1383
|
alignItems: "center",
|
|
828
1384
|
gap: "8px",
|
|
829
1385
|
templateColumns: "auto 1fr auto",
|
|
830
1386
|
width: "100%",
|
|
831
1387
|
children: [
|
|
832
|
-
|
|
1388
|
+
r && /* @__PURE__ */ i(
|
|
833
1389
|
M,
|
|
834
1390
|
{
|
|
835
|
-
icon:
|
|
1391
|
+
icon: r,
|
|
836
1392
|
size: "medium",
|
|
837
|
-
appearance:
|
|
1393
|
+
appearance: o ? p : u
|
|
838
1394
|
}
|
|
839
1395
|
),
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
|
|
1396
|
+
/* @__PURE__ */ i(
|
|
1397
|
+
k,
|
|
842
1398
|
{
|
|
843
1399
|
textAlign: "start",
|
|
844
1400
|
size: "medium",
|
|
845
|
-
appearance:
|
|
1401
|
+
appearance: o ? p : u,
|
|
846
1402
|
children: n
|
|
847
1403
|
}
|
|
848
1404
|
),
|
|
849
|
-
/* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ i(
|
|
850
1406
|
M,
|
|
851
1407
|
{
|
|
852
|
-
icon: /* @__PURE__ */
|
|
1408
|
+
icon: /* @__PURE__ */ i(St, {}),
|
|
853
1409
|
size: "small",
|
|
854
|
-
onClick: (
|
|
855
|
-
|
|
1410
|
+
onClick: (x) => {
|
|
1411
|
+
x.stopPropagation(), a == null || a();
|
|
856
1412
|
},
|
|
857
|
-
appearance:
|
|
1413
|
+
appearance: o ? p : u,
|
|
858
1414
|
cursorHover: !0
|
|
859
1415
|
}
|
|
860
1416
|
)
|
|
@@ -863,54 +1419,54 @@ const st = x.div`
|
|
|
863
1419
|
)
|
|
864
1420
|
}
|
|
865
1421
|
);
|
|
866
|
-
},
|
|
1422
|
+
}, aa = (e) => {
|
|
867
1423
|
const {
|
|
868
1424
|
appliedFilters: t = [],
|
|
869
1425
|
onClear: n,
|
|
870
|
-
onClick:
|
|
871
|
-
noFiltersLabel:
|
|
872
|
-
titleClearFilter:
|
|
873
|
-
titleFilter:
|
|
874
|
-
} = e, l =
|
|
875
|
-
visible:
|
|
876
|
-
hidden:
|
|
877
|
-
showOverflowIndicator:
|
|
878
|
-
measurementRef:
|
|
879
|
-
} =
|
|
880
|
-
|
|
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,
|
|
1434
|
+
measurementRef: m
|
|
1435
|
+
} = Dn(l, t), [f, w] = V(!1), D = (y) => {
|
|
1436
|
+
y.stopPropagation(), w((R) => !R);
|
|
881
1437
|
};
|
|
882
|
-
|
|
883
|
-
const
|
|
884
|
-
var
|
|
885
|
-
const
|
|
886
|
-
!((
|
|
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);
|
|
887
1443
|
};
|
|
888
|
-
return
|
|
889
|
-
}, [
|
|
890
|
-
const
|
|
891
|
-
id:
|
|
892
|
-
value:
|
|
893
|
-
label:
|
|
894
|
-
icon:
|
|
895
|
-
})),
|
|
896
|
-
var
|
|
897
|
-
(
|
|
1444
|
+
return f && window.addEventListener("mousedown", y), () => window.removeEventListener("mousedown", y);
|
|
1445
|
+
}, [f]);
|
|
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);
|
|
898
1454
|
};
|
|
899
|
-
return /* @__PURE__ */
|
|
900
|
-
/* @__PURE__ */
|
|
901
|
-
|
|
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,
|
|
902
1458
|
{
|
|
903
1459
|
appearance: "primary",
|
|
904
1460
|
displayIcon: !0,
|
|
905
1461
|
removable: !0,
|
|
906
|
-
icon:
|
|
907
|
-
label:
|
|
908
|
-
onClose:
|
|
1462
|
+
icon: y.icon,
|
|
1463
|
+
label: y.label,
|
|
1464
|
+
onClose: y.onClose
|
|
909
1465
|
}
|
|
910
|
-
) },
|
|
911
|
-
/* @__PURE__ */
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
|
|
1466
|
+
) }, y.label)) }),
|
|
1467
|
+
/* @__PURE__ */ g(he, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
1468
|
+
/* @__PURE__ */ i(
|
|
1469
|
+
_,
|
|
914
1470
|
{
|
|
915
1471
|
ref: l,
|
|
916
1472
|
background: !0,
|
|
@@ -921,50 +1477,50 @@ const st = x.div`
|
|
|
921
1477
|
alignItems: "center",
|
|
922
1478
|
padding: "0px 8px",
|
|
923
1479
|
border: !0,
|
|
924
|
-
children:
|
|
925
|
-
|
|
926
|
-
|
|
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,
|
|
927
1483
|
{
|
|
928
1484
|
"data-filter-tag": "true",
|
|
929
1485
|
appearance: "primary",
|
|
930
1486
|
displayIcon: !0,
|
|
931
1487
|
removable: !0,
|
|
932
|
-
icon:
|
|
933
|
-
label:
|
|
934
|
-
onClose:
|
|
1488
|
+
icon: y.icon,
|
|
1489
|
+
label: y.label,
|
|
1490
|
+
onClose: y.onClose
|
|
935
1491
|
},
|
|
936
|
-
|
|
1492
|
+
y.label
|
|
937
1493
|
)),
|
|
938
|
-
|
|
1494
|
+
h && /* @__PURE__ */ g(
|
|
939
1495
|
"div",
|
|
940
1496
|
{
|
|
941
1497
|
ref: d,
|
|
942
1498
|
style: { position: "relative", display: "inline-block" },
|
|
943
1499
|
children: [
|
|
944
|
-
/* @__PURE__ */
|
|
945
|
-
|
|
1500
|
+
/* @__PURE__ */ i(An, { onClick: D, children: /* @__PURE__ */ i(
|
|
1501
|
+
X,
|
|
946
1502
|
{
|
|
947
1503
|
appearance: "primary",
|
|
948
|
-
label: `+${
|
|
1504
|
+
label: `+${u.length}`
|
|
949
1505
|
}
|
|
950
1506
|
) }),
|
|
951
|
-
|
|
952
|
-
|
|
1507
|
+
x && /* @__PURE__ */ i(kn, { ref: s, children: /* @__PURE__ */ i(
|
|
1508
|
+
$t,
|
|
953
1509
|
{
|
|
954
|
-
options:
|
|
955
|
-
onOptionClick:
|
|
956
|
-
children:
|
|
957
|
-
|
|
1510
|
+
options: S,
|
|
1511
|
+
onOptionClick: T,
|
|
1512
|
+
children: u.map((y) => /* @__PURE__ */ i(
|
|
1513
|
+
On,
|
|
958
1514
|
{
|
|
959
|
-
id:
|
|
960
|
-
label:
|
|
961
|
-
leadingIcon:
|
|
1515
|
+
id: y.label,
|
|
1516
|
+
label: y.label,
|
|
1517
|
+
leadingIcon: y.icon,
|
|
962
1518
|
onClose: () => {
|
|
963
|
-
var
|
|
964
|
-
(
|
|
1519
|
+
var R;
|
|
1520
|
+
(R = y.onClose) == null || R.call(y), w(!1);
|
|
965
1521
|
}
|
|
966
1522
|
},
|
|
967
|
-
|
|
1523
|
+
y.label
|
|
968
1524
|
))
|
|
969
1525
|
}
|
|
970
1526
|
) })
|
|
@@ -974,35 +1530,35 @@ const st = x.div`
|
|
|
974
1530
|
] })
|
|
975
1531
|
}
|
|
976
1532
|
),
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
|
|
1533
|
+
/* @__PURE__ */ i(
|
|
1534
|
+
P,
|
|
979
1535
|
{
|
|
980
1536
|
cursorHover: !0,
|
|
981
|
-
disabled:
|
|
982
|
-
iconBefore: /* @__PURE__ */
|
|
1537
|
+
disabled: E,
|
|
1538
|
+
iconBefore: /* @__PURE__ */ i(Ze, {}),
|
|
983
1539
|
onClick: n,
|
|
984
1540
|
variant: "outlined",
|
|
985
|
-
children:
|
|
1541
|
+
children: o
|
|
986
1542
|
}
|
|
987
1543
|
),
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
|
|
1544
|
+
/* @__PURE__ */ i(
|
|
1545
|
+
P,
|
|
990
1546
|
{
|
|
991
1547
|
cursorHover: !0,
|
|
992
|
-
iconBefore: /* @__PURE__ */
|
|
993
|
-
onClick:
|
|
1548
|
+
iconBefore: /* @__PURE__ */ i(et, {}),
|
|
1549
|
+
onClick: r,
|
|
994
1550
|
variant: "outlined",
|
|
995
|
-
children:
|
|
1551
|
+
children: c
|
|
996
1552
|
}
|
|
997
1553
|
)
|
|
998
1554
|
] })
|
|
999
1555
|
] });
|
|
1000
|
-
},
|
|
1556
|
+
}, Fn = N.div`
|
|
1001
1557
|
display: flex;
|
|
1002
1558
|
flex-direction: column;
|
|
1003
1559
|
background-color: ${({ theme: e }) => {
|
|
1004
1560
|
var t, n;
|
|
1005
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) ||
|
|
1561
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || C.palette.neutral.N0;
|
|
1006
1562
|
}};
|
|
1007
1563
|
width: ${({ $smallScreen: e }) => e ? "auto" : "450px"};
|
|
1008
1564
|
height: auto;
|
|
@@ -1010,60 +1566,60 @@ const st = x.div`
|
|
|
1010
1566
|
padding: 24px;
|
|
1011
1567
|
gap: 24px;
|
|
1012
1568
|
box-sizing: border-box;
|
|
1013
|
-
`,
|
|
1569
|
+
`, ia = (e) => {
|
|
1014
1570
|
const {
|
|
1015
1571
|
actionButtonLabel: t,
|
|
1016
1572
|
cancelButtonLabel: n,
|
|
1017
|
-
children:
|
|
1018
|
-
loading:
|
|
1019
|
-
onClick:
|
|
1020
|
-
onCloseModal:
|
|
1573
|
+
children: r,
|
|
1574
|
+
loading: a,
|
|
1575
|
+
onClick: o,
|
|
1576
|
+
onCloseModal: c,
|
|
1021
1577
|
portalId: l,
|
|
1022
|
-
title:
|
|
1023
|
-
} = e, d =
|
|
1024
|
-
if (!
|
|
1578
|
+
title: s
|
|
1579
|
+
} = e, d = H("(max-width: 768px)"), p = document.getElementById(l);
|
|
1580
|
+
if (!p)
|
|
1025
1581
|
throw new Error(
|
|
1026
1582
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
1027
1583
|
);
|
|
1028
|
-
return
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
1031
|
-
/* @__PURE__ */
|
|
1032
|
-
/* @__PURE__ */
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */
|
|
1035
|
-
/* @__PURE__ */
|
|
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(
|
|
1036
1592
|
M,
|
|
1037
1593
|
{
|
|
1038
1594
|
appearance: "dark",
|
|
1039
|
-
icon: /* @__PURE__ */
|
|
1040
|
-
onClick:
|
|
1595
|
+
icon: /* @__PURE__ */ i(Ye, {}),
|
|
1596
|
+
onClick: c,
|
|
1041
1597
|
cursorHover: !0
|
|
1042
1598
|
}
|
|
1043
1599
|
)
|
|
1044
1600
|
] })
|
|
1045
1601
|
] }),
|
|
1046
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ i(L, {})
|
|
1047
1603
|
] }),
|
|
1048
|
-
|
|
1049
|
-
/* @__PURE__ */
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
|
|
1604
|
+
r,
|
|
1605
|
+
/* @__PURE__ */ g(b, { gap: "20px", justifyContent: "flex-end", children: [
|
|
1606
|
+
/* @__PURE__ */ i(
|
|
1607
|
+
P,
|
|
1052
1608
|
{
|
|
1053
1609
|
appearance: "gray",
|
|
1054
|
-
onClick:
|
|
1055
|
-
iconBefore: /* @__PURE__ */
|
|
1610
|
+
onClick: c,
|
|
1611
|
+
iconBefore: /* @__PURE__ */ i(Ze, {}),
|
|
1056
1612
|
spacing: "wide",
|
|
1057
1613
|
variant: "outlined",
|
|
1058
1614
|
children: n
|
|
1059
1615
|
}
|
|
1060
1616
|
),
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
|
|
1617
|
+
/* @__PURE__ */ i(
|
|
1618
|
+
P,
|
|
1063
1619
|
{
|
|
1064
1620
|
appearance: "primary",
|
|
1065
|
-
loading:
|
|
1066
|
-
onClick:
|
|
1621
|
+
loading: a,
|
|
1622
|
+
onClick: o,
|
|
1067
1623
|
spacing: "wide",
|
|
1068
1624
|
variant: "filled",
|
|
1069
1625
|
children: t
|
|
@@ -1071,16 +1627,16 @@ const st = x.div`
|
|
|
1071
1627
|
)
|
|
1072
1628
|
] })
|
|
1073
1629
|
] }) }),
|
|
1074
|
-
|
|
1630
|
+
p
|
|
1075
1631
|
);
|
|
1076
|
-
},
|
|
1077
|
-
const { appliedFilters: t, fields: n, onChange:
|
|
1078
|
-
return /* @__PURE__ */
|
|
1079
|
-
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1083
|
-
|
|
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
|
+
_,
|
|
1084
1640
|
{
|
|
1085
1641
|
background: !0,
|
|
1086
1642
|
borderRadius: "8px",
|
|
@@ -1091,8 +1647,8 @@ const st = x.div`
|
|
|
1091
1647
|
border: !0,
|
|
1092
1648
|
width: "100%",
|
|
1093
1649
|
height: "36px",
|
|
1094
|
-
children:
|
|
1095
|
-
|
|
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,
|
|
1096
1652
|
{
|
|
1097
1653
|
appearance: "primary",
|
|
1098
1654
|
displayIcon: !0,
|
|
@@ -1106,19 +1662,19 @@ const st = x.div`
|
|
|
1106
1662
|
}
|
|
1107
1663
|
)
|
|
1108
1664
|
] }),
|
|
1109
|
-
/* @__PURE__ */
|
|
1665
|
+
/* @__PURE__ */ i(L, { dashed: !0 })
|
|
1110
1666
|
] }),
|
|
1111
|
-
n.map((l) => /* @__PURE__ */
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
-
|
|
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,
|
|
1115
1671
|
{
|
|
1116
1672
|
disabled: l.disabled,
|
|
1117
1673
|
invalid: l.invalid,
|
|
1118
1674
|
label: l.label,
|
|
1119
1675
|
message: l.message,
|
|
1120
1676
|
name: l.name,
|
|
1121
|
-
onChange:
|
|
1677
|
+
onChange: r,
|
|
1122
1678
|
options: l.options,
|
|
1123
1679
|
placeholder: l.placeholder,
|
|
1124
1680
|
required: l.required,
|
|
@@ -1129,41 +1685,41 @@ const st = x.div`
|
|
|
1129
1685
|
)
|
|
1130
1686
|
] }, l.name))
|
|
1131
1687
|
] });
|
|
1132
|
-
},
|
|
1688
|
+
}, In = (e) => {
|
|
1133
1689
|
const t = [];
|
|
1134
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(";");
|
|
1135
|
-
},
|
|
1136
|
-
var
|
|
1137
|
-
const { decision: t, fallbackId: n, template:
|
|
1138
|
-
var
|
|
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;
|
|
1139
1695
|
const d = l == null ? void 0 : l.value;
|
|
1140
1696
|
return d == null || typeof d == "string" && d.trim() === "" || Array.isArray(d) && d.length === 0 ? null : {
|
|
1141
|
-
...(
|
|
1697
|
+
...(u = r.conditionsThatEstablishesTheDecision) == null ? void 0 : u[s],
|
|
1142
1698
|
...l,
|
|
1143
|
-
value:
|
|
1699
|
+
value: a(d)
|
|
1144
1700
|
};
|
|
1145
1701
|
}).filter(Boolean)) ?? [];
|
|
1146
1702
|
return {
|
|
1147
|
-
...
|
|
1703
|
+
...r,
|
|
1148
1704
|
...t,
|
|
1149
1705
|
decisionId: n,
|
|
1150
|
-
value:
|
|
1151
|
-
conditionsThatEstablishesTheDecision:
|
|
1706
|
+
value: a(t.value),
|
|
1707
|
+
conditionsThatEstablishesTheDecision: o
|
|
1152
1708
|
};
|
|
1153
|
-
},
|
|
1709
|
+
}, sa = (e) => {
|
|
1154
1710
|
if (typeof e != "string") return e;
|
|
1155
|
-
const t = e.split(";").map((
|
|
1156
|
-
for (const
|
|
1157
|
-
if (
|
|
1158
|
-
const
|
|
1159
|
-
isNaN(
|
|
1160
|
-
} else if (
|
|
1161
|
-
const
|
|
1162
|
-
isNaN(
|
|
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);
|
|
1163
1719
|
}
|
|
1164
1720
|
return n.from !== void 0 || n.to !== void 0 ? n : e;
|
|
1165
|
-
},
|
|
1166
|
-
const { dataDecision: t, originalDecision: n } = e,
|
|
1721
|
+
}, ca = (e) => {
|
|
1722
|
+
const { dataDecision: t, originalDecision: n } = e, r = {
|
|
1167
1723
|
conditionName: t.ruleName || "",
|
|
1168
1724
|
labelName: t.labelName || "",
|
|
1169
1725
|
conditionDataType: t.decisionDataType || "alphabetical",
|
|
@@ -1175,17 +1731,17 @@ const st = x.div`
|
|
|
1175
1731
|
return {
|
|
1176
1732
|
...n,
|
|
1177
1733
|
conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
|
|
1178
|
-
(
|
|
1734
|
+
(a) => a.hidden ? { ...r } : a
|
|
1179
1735
|
)
|
|
1180
1736
|
};
|
|
1181
|
-
},
|
|
1737
|
+
}, da = (e) => {
|
|
1182
1738
|
const { decisions: t } = e;
|
|
1183
1739
|
return t == null ? void 0 : t.map((n) => {
|
|
1184
|
-
var
|
|
1185
|
-
const
|
|
1186
|
-
(
|
|
1740
|
+
var a;
|
|
1741
|
+
const r = (a = n.conditionsThatEstablishesTheDecision) == null ? void 0 : a.find(
|
|
1742
|
+
(o) => o.hidden
|
|
1187
1743
|
);
|
|
1188
|
-
return
|
|
1744
|
+
return r ? {
|
|
1189
1745
|
...n,
|
|
1190
1746
|
ruleName: n.ruleName,
|
|
1191
1747
|
labelName: n.labelName,
|
|
@@ -1193,19 +1749,19 @@ const st = x.div`
|
|
|
1193
1749
|
value: n.value,
|
|
1194
1750
|
howToSetTheDecision: n.howToSetTheDecision,
|
|
1195
1751
|
conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
|
|
1196
|
-
(
|
|
1752
|
+
(o) => o.hidden ? { ...r, hidden: !1 } : o
|
|
1197
1753
|
)
|
|
1198
1754
|
} : n;
|
|
1199
1755
|
});
|
|
1200
|
-
},
|
|
1201
|
-
schema:
|
|
1756
|
+
}, Ln = (e) => ({
|
|
1757
|
+
schema: Re().required("Required").test(
|
|
1202
1758
|
"non-empty",
|
|
1203
1759
|
"Value cannot be empty",
|
|
1204
1760
|
(t) => t != null && t.trim() !== ""
|
|
1205
1761
|
),
|
|
1206
1762
|
value: e
|
|
1207
|
-
}),
|
|
1208
|
-
schema:
|
|
1763
|
+
}), Mn = (e) => ({
|
|
1764
|
+
schema: it().test(
|
|
1209
1765
|
"isArrayOrString",
|
|
1210
1766
|
"Must be an array of strings/numbers or a single string",
|
|
1211
1767
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -1213,8 +1769,8 @@ const st = x.div`
|
|
|
1213
1769
|
) : typeof t == "string"
|
|
1214
1770
|
),
|
|
1215
1771
|
value: e
|
|
1216
|
-
}),
|
|
1217
|
-
schema:
|
|
1772
|
+
}), Un = (e) => ({
|
|
1773
|
+
schema: it().test(
|
|
1218
1774
|
"isArrayOrString",
|
|
1219
1775
|
"Must be an array of strings/numbers or a single string",
|
|
1220
1776
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -1222,44 +1778,44 @@ const st = x.div`
|
|
|
1222
1778
|
) : typeof t == "string"
|
|
1223
1779
|
),
|
|
1224
1780
|
value: e
|
|
1225
|
-
}),
|
|
1781
|
+
}), Vn = (e) => {
|
|
1226
1782
|
const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
|
|
1227
1783
|
return {
|
|
1228
|
-
schema:
|
|
1229
|
-
from:
|
|
1230
|
-
to:
|
|
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(
|
|
1231
1787
|
"is-greater",
|
|
1232
1788
|
"To value must be greater than From value",
|
|
1233
|
-
function(
|
|
1234
|
-
const { from:
|
|
1235
|
-
return
|
|
1789
|
+
function(r) {
|
|
1790
|
+
const { from: a } = this.parent;
|
|
1791
|
+
return r > a;
|
|
1236
1792
|
}
|
|
1237
1793
|
)
|
|
1238
1794
|
}),
|
|
1239
1795
|
value: { from: t, to: n }
|
|
1240
1796
|
};
|
|
1241
|
-
},
|
|
1242
|
-
schema:
|
|
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"),
|
|
1243
1799
|
value: e
|
|
1244
1800
|
} : {
|
|
1245
|
-
schema:
|
|
1801
|
+
schema: Re().required("Required"),
|
|
1246
1802
|
value: e
|
|
1247
|
-
},
|
|
1248
|
-
[
|
|
1249
|
-
[
|
|
1250
|
-
[
|
|
1251
|
-
[
|
|
1252
|
-
[
|
|
1253
|
-
[
|
|
1254
|
-
},
|
|
1255
|
-
function
|
|
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({
|
|
1256
1812
|
decision: e,
|
|
1257
1813
|
onSubmitEvent: t,
|
|
1258
1814
|
textValues: n
|
|
1259
1815
|
}) {
|
|
1260
|
-
const
|
|
1816
|
+
const r = {
|
|
1261
1817
|
ruleName: e.ruleName || "",
|
|
1262
|
-
decisionDataType: e.decisionDataType ||
|
|
1818
|
+
decisionDataType: e.decisionDataType || U.ALPHABETICAL,
|
|
1263
1819
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
1264
1820
|
value: e.value || "",
|
|
1265
1821
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -1269,108 +1825,108 @@ function xt({
|
|
|
1269
1825
|
checkClosed: !1,
|
|
1270
1826
|
terms: !0
|
|
1271
1827
|
};
|
|
1272
|
-
let
|
|
1273
|
-
const
|
|
1274
|
-
ruleName:
|
|
1275
|
-
value:
|
|
1276
|
-
|
|
1828
|
+
let a;
|
|
1829
|
+
const o = {
|
|
1830
|
+
ruleName: Re().required("Name is required"),
|
|
1831
|
+
value: _e(() => ze(
|
|
1832
|
+
a.values.howToSetTheDecision
|
|
1277
1833
|
)(
|
|
1278
|
-
|
|
1279
|
-
|
|
1834
|
+
a.values.value,
|
|
1835
|
+
a.values.decisionDataType
|
|
1280
1836
|
).schema),
|
|
1281
|
-
conditionsThatEstablishesTheDecision:
|
|
1282
|
-
var
|
|
1283
|
-
if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionsThatEstablishesTheDecision || {}).length > 0) return
|
|
1284
|
-
const
|
|
1285
|
-
(
|
|
1286
|
-
if (
|
|
1287
|
-
const
|
|
1288
|
-
|
|
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(
|
|
1841
|
+
(m, f) => {
|
|
1842
|
+
if (a.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
|
|
1843
|
+
const D = ze(
|
|
1844
|
+
f.howToSetTheCondition
|
|
1289
1845
|
);
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1846
|
+
m[f.conditionName] = D(
|
|
1847
|
+
f.value,
|
|
1848
|
+
f.conditionDataType
|
|
1293
1849
|
).schema;
|
|
1294
1850
|
}
|
|
1295
|
-
return
|
|
1851
|
+
return m;
|
|
1296
1852
|
},
|
|
1297
1853
|
{}
|
|
1298
1854
|
);
|
|
1299
|
-
return
|
|
1855
|
+
return se(u).test(
|
|
1300
1856
|
"at-least-one-condition",
|
|
1301
1857
|
"It must be at least one condition in order for the decision to be validated correctly.",
|
|
1302
|
-
(
|
|
1303
|
-
(
|
|
1858
|
+
(m) => m ? Object.values(m).some(
|
|
1859
|
+
(f) => f != null && f !== ""
|
|
1304
1860
|
) : !1
|
|
1305
1861
|
);
|
|
1306
1862
|
})
|
|
1307
1863
|
};
|
|
1308
|
-
n.terms && (
|
|
1864
|
+
n.terms && (o.effectiveFrom = Pe().required(
|
|
1309
1865
|
"effective From date is required"
|
|
1310
|
-
),
|
|
1866
|
+
), o.validUntil = Pe().when(
|
|
1311
1867
|
"checkClosed",
|
|
1312
|
-
(
|
|
1868
|
+
(s, d, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? d.required("valid Until date is required").test(
|
|
1313
1869
|
"is-after-startDate",
|
|
1314
1870
|
"valid Until date must be greater than or equal to Start date",
|
|
1315
|
-
function(
|
|
1316
|
-
const
|
|
1317
|
-
return !
|
|
1871
|
+
function(h) {
|
|
1872
|
+
const m = this.parent.effectiveFrom;
|
|
1873
|
+
return !m || !h ? !0 : new Date(h) >= new Date(m);
|
|
1318
1874
|
}
|
|
1319
1875
|
) : d.notRequired()
|
|
1320
1876
|
));
|
|
1321
|
-
const
|
|
1322
|
-
return
|
|
1323
|
-
initialValues:
|
|
1324
|
-
validationSchema:
|
|
1877
|
+
const c = se(o);
|
|
1878
|
+
return a = Mt({
|
|
1879
|
+
initialValues: r,
|
|
1880
|
+
validationSchema: c,
|
|
1325
1881
|
validateOnBlur: !0,
|
|
1326
|
-
onSubmit: (
|
|
1327
|
-
var
|
|
1882
|
+
onSubmit: (s) => {
|
|
1883
|
+
var p;
|
|
1328
1884
|
const d = {
|
|
1329
1885
|
...e,
|
|
1330
|
-
ruleName:
|
|
1331
|
-
decisionDataType:
|
|
1332
|
-
howToSetTheDecision:
|
|
1333
|
-
value:
|
|
1334
|
-
effectiveFrom:
|
|
1335
|
-
validUntil:
|
|
1336
|
-
conditionsThatEstablishesTheDecision: (
|
|
1337
|
-
const
|
|
1338
|
-
return
|
|
1339
|
-
}).map((
|
|
1340
|
-
...
|
|
1341
|
-
value:
|
|
1886
|
+
ruleName: s.ruleName,
|
|
1887
|
+
decisionDataType: s.decisionDataType,
|
|
1888
|
+
howToSetTheDecision: s.howToSetTheDecision,
|
|
1889
|
+
value: s.value,
|
|
1890
|
+
effectiveFrom: s.effectiveFrom,
|
|
1891
|
+
validUntil: s.validUntil,
|
|
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]
|
|
1342
1898
|
}))
|
|
1343
1899
|
};
|
|
1344
1900
|
t(d);
|
|
1345
1901
|
}
|
|
1346
|
-
}), { formik:
|
|
1902
|
+
}), { formik: a, handleToggleNoneChange: (s) => {
|
|
1347
1903
|
var d;
|
|
1348
|
-
|
|
1349
|
-
if (
|
|
1350
|
-
|
|
1351
|
-
`conditionsThatEstablishesTheDecision.${
|
|
1904
|
+
a.setFieldValue("toggleNone", s), (d = e.conditionsThatEstablishesTheDecision) == null || d.forEach((p) => {
|
|
1905
|
+
if (s)
|
|
1906
|
+
a.setFieldValue(
|
|
1907
|
+
`conditionsThatEstablishesTheDecision.${p.conditionName}`,
|
|
1352
1908
|
void 0
|
|
1353
1909
|
);
|
|
1354
1910
|
else {
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1357
|
-
`conditionsThatEstablishesTheDecision.${
|
|
1358
|
-
|
|
1911
|
+
const u = p.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
|
|
1912
|
+
a.setFieldValue(
|
|
1913
|
+
`conditionsThatEstablishesTheDecision.${p.conditionName}`,
|
|
1914
|
+
u
|
|
1359
1915
|
);
|
|
1360
1916
|
}
|
|
1361
1917
|
});
|
|
1362
1918
|
} };
|
|
1363
1919
|
}
|
|
1364
|
-
const
|
|
1920
|
+
const Bn = N.div`
|
|
1365
1921
|
& > div {
|
|
1366
1922
|
border-radius: 8px;
|
|
1367
1923
|
border: 1px solid
|
|
1368
1924
|
${({ theme: e }) => {
|
|
1369
1925
|
var t, n;
|
|
1370
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
1926
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
|
|
1371
1927
|
}};
|
|
1372
1928
|
}
|
|
1373
|
-
`,
|
|
1929
|
+
`, jn = N.div`
|
|
1374
1930
|
width: 100%;
|
|
1375
1931
|
height: 100%;
|
|
1376
1932
|
overflow-y: auto;
|
|
@@ -1387,61 +1943,61 @@ const vt = x.div`
|
|
|
1387
1943
|
background-color: #ebecf0;
|
|
1388
1944
|
border-radius: 8px;
|
|
1389
1945
|
}
|
|
1390
|
-
`,
|
|
1946
|
+
`, zn = (e) => {
|
|
1391
1947
|
const {
|
|
1392
1948
|
checked: t,
|
|
1393
1949
|
children: n,
|
|
1394
|
-
handleToggleChange:
|
|
1395
|
-
id:
|
|
1396
|
-
labelToggle:
|
|
1397
|
-
name:
|
|
1950
|
+
handleToggleChange: r,
|
|
1951
|
+
id: a,
|
|
1952
|
+
labelToggle: o,
|
|
1953
|
+
name: c,
|
|
1398
1954
|
valueToggle: l = ""
|
|
1399
|
-
} = e, [
|
|
1400
|
-
d(
|
|
1955
|
+
} = e, [s, d] = V(t), p = (u) => {
|
|
1956
|
+
d(u.target.checked), r(u);
|
|
1401
1957
|
};
|
|
1402
|
-
return
|
|
1958
|
+
return ke(() => {
|
|
1403
1959
|
d(t);
|
|
1404
|
-
}, [t]), /* @__PURE__ */
|
|
1405
|
-
/* @__PURE__ */
|
|
1406
|
-
|
|
1960
|
+
}, [t]), /* @__PURE__ */ g(O, { children: [
|
|
1961
|
+
/* @__PURE__ */ i(b, { children: /* @__PURE__ */ i(
|
|
1962
|
+
nt,
|
|
1407
1963
|
{
|
|
1408
|
-
checked:
|
|
1409
|
-
id:
|
|
1410
|
-
name:
|
|
1411
|
-
onChange:
|
|
1964
|
+
checked: s,
|
|
1965
|
+
id: a,
|
|
1966
|
+
name: c,
|
|
1967
|
+
onChange: p,
|
|
1412
1968
|
size: "small",
|
|
1413
1969
|
value: l,
|
|
1414
|
-
children: /* @__PURE__ */
|
|
1970
|
+
children: /* @__PURE__ */ i(k, { size: "medium", type: "label", weight: "bold", children: o })
|
|
1415
1971
|
}
|
|
1416
1972
|
) }),
|
|
1417
|
-
|
|
1973
|
+
s && /* @__PURE__ */ i(O, { children: n })
|
|
1418
1974
|
] });
|
|
1419
|
-
},
|
|
1975
|
+
}, Hn = (e) => {
|
|
1420
1976
|
const {
|
|
1421
1977
|
onHandleStartChange: t,
|
|
1422
1978
|
onHandleEndChange: n,
|
|
1423
|
-
onCheckClosedChange:
|
|
1424
|
-
labelStart:
|
|
1425
|
-
labelEnd:
|
|
1426
|
-
checkedClosed:
|
|
1979
|
+
onCheckClosedChange: r,
|
|
1980
|
+
labelStart: a,
|
|
1981
|
+
labelEnd: o,
|
|
1982
|
+
checkedClosed: c = !1,
|
|
1427
1983
|
required: l = !1,
|
|
1428
|
-
valueStart:
|
|
1984
|
+
valueStart: s = "",
|
|
1429
1985
|
valueEnd: d = "",
|
|
1430
|
-
messageStart:
|
|
1431
|
-
messageEnd:
|
|
1432
|
-
statusStart:
|
|
1433
|
-
statusEnd:
|
|
1434
|
-
} = e, [
|
|
1435
|
-
|
|
1436
|
-
},
|
|
1437
|
-
|
|
1438
|
-
},
|
|
1439
|
-
F
|
|
1440
|
-
},
|
|
1441
|
-
return /* @__PURE__ */
|
|
1442
|
-
/* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
|
|
1986
|
+
messageStart: p = "",
|
|
1987
|
+
messageEnd: u = "",
|
|
1988
|
+
statusStart: h = "pending",
|
|
1989
|
+
statusEnd: m = "pending"
|
|
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,
|
|
1445
2001
|
{
|
|
1446
2002
|
appearance: "gray",
|
|
1447
2003
|
margin: "10px 0",
|
|
@@ -1451,133 +2007,133 @@ const vt = x.div`
|
|
|
1451
2007
|
children: "Vigencia"
|
|
1452
2008
|
}
|
|
1453
2009
|
),
|
|
1454
|
-
/* @__PURE__ */
|
|
1455
|
-
|
|
2010
|
+
/* @__PURE__ */ i(
|
|
2011
|
+
b,
|
|
1456
2012
|
{
|
|
1457
2013
|
alignContent: "center",
|
|
1458
2014
|
justifyContent: "center",
|
|
1459
2015
|
wrap: "wrap",
|
|
1460
2016
|
gap: "4px",
|
|
1461
|
-
children: /* @__PURE__ */
|
|
1462
|
-
|
|
2017
|
+
children: /* @__PURE__ */ i(
|
|
2018
|
+
Ft,
|
|
1463
2019
|
{
|
|
1464
2020
|
label: "Cerrada",
|
|
1465
|
-
onChange:
|
|
1466
|
-
checked:
|
|
2021
|
+
onChange: T,
|
|
2022
|
+
checked: f,
|
|
1467
2023
|
value: ""
|
|
1468
2024
|
}
|
|
1469
2025
|
)
|
|
1470
2026
|
}
|
|
1471
2027
|
)
|
|
1472
2028
|
] }),
|
|
1473
|
-
/* @__PURE__ */
|
|
1474
|
-
|
|
2029
|
+
/* @__PURE__ */ g(
|
|
2030
|
+
b,
|
|
1475
2031
|
{
|
|
1476
|
-
direction:
|
|
2032
|
+
direction: I ? "column" : "row",
|
|
1477
2033
|
justifyContent: "space-between",
|
|
1478
2034
|
gap: "24px",
|
|
1479
2035
|
children: [
|
|
1480
|
-
/* @__PURE__ */
|
|
1481
|
-
|
|
2036
|
+
/* @__PURE__ */ i(
|
|
2037
|
+
Ue,
|
|
1482
2038
|
{
|
|
1483
2039
|
id: "dateStart",
|
|
1484
|
-
label:
|
|
1485
|
-
onChange:
|
|
1486
|
-
value:
|
|
2040
|
+
label: a,
|
|
2041
|
+
onChange: y,
|
|
2042
|
+
value: D,
|
|
1487
2043
|
required: l,
|
|
1488
2044
|
size: "compact",
|
|
1489
|
-
status:
|
|
1490
|
-
message:
|
|
2045
|
+
status: h,
|
|
2046
|
+
message: p
|
|
1491
2047
|
}
|
|
1492
2048
|
),
|
|
1493
|
-
|
|
1494
|
-
|
|
2049
|
+
f && /* @__PURE__ */ i(
|
|
2050
|
+
Ue,
|
|
1495
2051
|
{
|
|
1496
2052
|
id: "dateEnd",
|
|
1497
|
-
label:
|
|
1498
|
-
onChange:
|
|
1499
|
-
value:
|
|
2053
|
+
label: o,
|
|
2054
|
+
onChange: R,
|
|
2055
|
+
value: x,
|
|
1500
2056
|
required: l,
|
|
1501
2057
|
size: "compact",
|
|
1502
|
-
status:
|
|
1503
|
-
message:
|
|
2058
|
+
status: m,
|
|
2059
|
+
message: u
|
|
1504
2060
|
}
|
|
1505
2061
|
)
|
|
1506
2062
|
]
|
|
1507
2063
|
}
|
|
1508
2064
|
)
|
|
1509
2065
|
] });
|
|
1510
|
-
},
|
|
2066
|
+
}, qn = (e) => {
|
|
1511
2067
|
const {
|
|
1512
2068
|
formik: t,
|
|
1513
2069
|
textValues: n,
|
|
1514
|
-
onCancel:
|
|
1515
|
-
visibleConditions:
|
|
1516
|
-
normalizedDecision:
|
|
1517
|
-
handleToggleNoneChange:
|
|
2070
|
+
onCancel: r,
|
|
2071
|
+
visibleConditions: a,
|
|
2072
|
+
normalizedDecision: o,
|
|
2073
|
+
handleToggleNoneChange: c,
|
|
1518
2074
|
handleConditionToggleChange: l,
|
|
1519
|
-
showConditionsError:
|
|
2075
|
+
showConditionsError: s,
|
|
1520
2076
|
termStartStatus: d,
|
|
1521
|
-
termEndStatus:
|
|
2077
|
+
termEndStatus: p
|
|
1522
2078
|
} = e;
|
|
1523
|
-
return /* @__PURE__ */
|
|
1524
|
-
|
|
1525
|
-
condition:
|
|
2079
|
+
return /* @__PURE__ */ i("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ g(b, { direction: "column", gap: "24px", children: [
|
|
2080
|
+
Ve({
|
|
2081
|
+
condition: o,
|
|
1526
2082
|
formik: t,
|
|
1527
2083
|
isDecision: !0
|
|
1528
2084
|
}),
|
|
1529
|
-
/* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */
|
|
1531
|
-
|
|
2085
|
+
/* @__PURE__ */ i(L, { dashed: !0 }),
|
|
2086
|
+
/* @__PURE__ */ i(Bn, { children: /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ g(
|
|
2087
|
+
b,
|
|
1532
2088
|
{
|
|
1533
2089
|
direction: "column",
|
|
1534
2090
|
padding: "6px 12px",
|
|
1535
2091
|
gap: "16px",
|
|
1536
2092
|
height: "272px",
|
|
1537
2093
|
children: [
|
|
1538
|
-
/* @__PURE__ */
|
|
1539
|
-
|
|
2094
|
+
/* @__PURE__ */ g(
|
|
2095
|
+
b,
|
|
1540
2096
|
{
|
|
1541
2097
|
justifyContent: "space-between",
|
|
1542
2098
|
alignItems: "center",
|
|
1543
2099
|
gap: "64px",
|
|
1544
2100
|
children: [
|
|
1545
|
-
/* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
|
|
2101
|
+
/* @__PURE__ */ i(k, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
|
|
2102
|
+
/* @__PURE__ */ i(
|
|
2103
|
+
nt,
|
|
1548
2104
|
{
|
|
1549
2105
|
id: "toggleNone",
|
|
1550
|
-
onChange: () =>
|
|
2106
|
+
onChange: () => c(!t.values.toggleNone),
|
|
1551
2107
|
checked: t.values.toggleNone,
|
|
1552
2108
|
size: "small",
|
|
1553
|
-
children: /* @__PURE__ */
|
|
2109
|
+
children: /* @__PURE__ */ i(k, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
|
|
1554
2110
|
}
|
|
1555
2111
|
)
|
|
1556
2112
|
]
|
|
1557
2113
|
}
|
|
1558
2114
|
),
|
|
1559
|
-
/* @__PURE__ */
|
|
1560
|
-
|
|
2115
|
+
/* @__PURE__ */ i(b, { direction: "column", gap: "20px", children: a == null ? void 0 : a.map((u) => /* @__PURE__ */ i(
|
|
2116
|
+
zn,
|
|
1561
2117
|
{
|
|
1562
|
-
id: `toggle-${
|
|
1563
|
-
name: `toggle.${
|
|
1564
|
-
labelToggle:
|
|
1565
|
-
checked: !t.values.toggleNone && t.values.conditionsThatEstablishesTheDecision[
|
|
1566
|
-
handleToggleChange: (
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
)(
|
|
1570
|
-
children:
|
|
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 })
|
|
1571
2127
|
},
|
|
1572
|
-
|
|
2128
|
+
u.conditionName
|
|
1573
2129
|
)) })
|
|
1574
2130
|
]
|
|
1575
2131
|
}
|
|
1576
2132
|
) }) }),
|
|
1577
|
-
n.terms && /* @__PURE__ */
|
|
1578
|
-
/* @__PURE__ */
|
|
1579
|
-
/* @__PURE__ */
|
|
1580
|
-
|
|
2133
|
+
n.terms && /* @__PURE__ */ g(O, { children: [
|
|
2134
|
+
/* @__PURE__ */ i(L, { dashed: !0 }),
|
|
2135
|
+
/* @__PURE__ */ i(
|
|
2136
|
+
Hn,
|
|
1581
2137
|
{
|
|
1582
2138
|
labelStart: n.termStart,
|
|
1583
2139
|
labelEnd: n.termEnd,
|
|
@@ -1586,117 +2142,951 @@ const vt = x.div`
|
|
|
1586
2142
|
messageStart: t.errors.effectiveFrom,
|
|
1587
2143
|
messageEnd: t.errors.validUntil,
|
|
1588
2144
|
statusStart: d,
|
|
1589
|
-
statusEnd:
|
|
1590
|
-
onHandleStartChange: (
|
|
1591
|
-
onHandleEndChange: (
|
|
1592
|
-
onCheckClosedChange: (
|
|
1593
|
-
t.setFieldValue("checkClosed",
|
|
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", "");
|
|
1594
2150
|
},
|
|
1595
2151
|
checkedClosed: t.values.checkClosed
|
|
1596
2152
|
}
|
|
1597
2153
|
)
|
|
1598
2154
|
] }),
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
/* @__PURE__ */
|
|
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 })
|
|
1604
2160
|
] })
|
|
1605
2161
|
] }) });
|
|
1606
|
-
},
|
|
1607
|
-
var
|
|
1608
|
-
const { decision: t, onSubmitEvent: n, textValues:
|
|
2162
|
+
}, ut = (e) => {
|
|
2163
|
+
var m;
|
|
2164
|
+
const { decision: t, onSubmitEvent: n, textValues: r, onCancel: a } = e, { formik: o, handleToggleNoneChange: c } = Pn({
|
|
1609
2165
|
decision: t,
|
|
1610
2166
|
onSubmitEvent: n,
|
|
1611
|
-
textValues:
|
|
2167
|
+
textValues: r
|
|
1612
2168
|
}), l = {
|
|
1613
2169
|
ruleName: t.ruleName,
|
|
1614
2170
|
labelName: t.labelName,
|
|
1615
2171
|
howToSetTheCondition: t.howToSetTheDecision,
|
|
1616
2172
|
decisionDataType: t.decisionDataType,
|
|
1617
2173
|
listOfPossibleValues: t.listOfPossibleValues
|
|
1618
|
-
},
|
|
1619
|
-
(
|
|
1620
|
-
)) || [], d = !!
|
|
1621
|
-
return /* @__PURE__ */
|
|
1622
|
-
|
|
2174
|
+
}, s = ((m = t.conditionsThatEstablishesTheDecision) == null ? void 0 : m.filter(
|
|
2175
|
+
(f) => !f.hidden
|
|
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,
|
|
1623
2179
|
{
|
|
1624
|
-
formik:
|
|
1625
|
-
onCancel:
|
|
1626
|
-
textValues:
|
|
2180
|
+
formik: o,
|
|
2181
|
+
onCancel: a,
|
|
2182
|
+
textValues: r,
|
|
1627
2183
|
decision: t,
|
|
1628
|
-
visibleConditions:
|
|
2184
|
+
visibleConditions: s,
|
|
1629
2185
|
normalizedDecision: l,
|
|
1630
|
-
handleToggleNoneChange:
|
|
1631
|
-
handleConditionToggleChange: (
|
|
1632
|
-
if (!
|
|
1633
|
-
|
|
1634
|
-
`conditionsThatEstablishesTheDecision.${
|
|
2186
|
+
handleToggleNoneChange: c,
|
|
2187
|
+
handleConditionToggleChange: (f, w) => (D) => {
|
|
2188
|
+
if (!D)
|
|
2189
|
+
o.setFieldValue(
|
|
2190
|
+
`conditionsThatEstablishesTheDecision.${f}`,
|
|
1635
2191
|
void 0
|
|
1636
|
-
),
|
|
1637
|
-
`conditionsThatEstablishesTheDecision.${
|
|
2192
|
+
), o.setFieldTouched(
|
|
2193
|
+
`conditionsThatEstablishesTheDecision.${f}`,
|
|
1638
2194
|
!1,
|
|
1639
2195
|
!1
|
|
1640
2196
|
);
|
|
1641
2197
|
else {
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
`conditionsThatEstablishesTheDecision.${
|
|
1645
|
-
|
|
2198
|
+
const E = w ? [] : "";
|
|
2199
|
+
o.setFieldValue(
|
|
2200
|
+
`conditionsThatEstablishesTheDecision.${f}`,
|
|
2201
|
+
E
|
|
1646
2202
|
);
|
|
1647
2203
|
}
|
|
1648
2204
|
},
|
|
1649
2205
|
showConditionsError: d,
|
|
1650
|
-
termStartStatus:
|
|
1651
|
-
termEndStatus:
|
|
2206
|
+
termStartStatus: p,
|
|
2207
|
+
termEndStatus: u
|
|
1652
2208
|
}
|
|
1653
2209
|
);
|
|
1654
|
-
},
|
|
1655
|
-
var
|
|
1656
|
-
const { decisionTemplate: t } = e, n = { ...t },
|
|
1657
|
-
(
|
|
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
|
|
1658
2214
|
);
|
|
1659
|
-
return
|
|
2215
|
+
return r ? {
|
|
1660
2216
|
...n,
|
|
1661
|
-
ruleName:
|
|
1662
|
-
labelName:
|
|
1663
|
-
decisionDataType:
|
|
1664
|
-
value:
|
|
1665
|
-
howToSetTheDecision:
|
|
2217
|
+
ruleName: r.conditionName,
|
|
2218
|
+
labelName: r.labelName,
|
|
2219
|
+
decisionDataType: r.conditionDataType,
|
|
2220
|
+
value: r.value,
|
|
2221
|
+
howToSetTheDecision: r.howToSetTheCondition,
|
|
1666
2222
|
conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
|
|
1667
|
-
(
|
|
2223
|
+
(o) => o.conditionName === r.conditionName ? { ...o, hidden: !0 } : o
|
|
1668
2224
|
)
|
|
1669
2225
|
} : n;
|
|
1670
|
-
},
|
|
2226
|
+
}, pa = (e) => {
|
|
1671
2227
|
const { decisions: t } = e;
|
|
1672
2228
|
return t == null ? void 0 : t.map((n) => {
|
|
1673
|
-
var
|
|
1674
|
-
const
|
|
1675
|
-
(
|
|
2229
|
+
var a;
|
|
2230
|
+
const r = (a = n.conditionsThatEstablishesTheDecision) == null ? void 0 : a.find(
|
|
2231
|
+
(o) => o.switchPlaces
|
|
1676
2232
|
);
|
|
1677
|
-
return
|
|
2233
|
+
return r ? {
|
|
1678
2234
|
...n,
|
|
1679
|
-
ruleName:
|
|
1680
|
-
labelName:
|
|
1681
|
-
decisionDataType:
|
|
1682
|
-
value:
|
|
1683
|
-
howToSetTheDecision:
|
|
2235
|
+
ruleName: r.conditionName,
|
|
2236
|
+
labelName: r.labelName,
|
|
2237
|
+
decisionDataType: r.conditionDataType,
|
|
2238
|
+
value: r.value,
|
|
2239
|
+
howToSetTheDecision: r.howToSetTheCondition,
|
|
1684
2240
|
conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
|
|
1685
|
-
(
|
|
2241
|
+
(o) => o.conditionName === r.conditionName ? { ...o, hidden: !0 } : o
|
|
1686
2242
|
)
|
|
1687
2243
|
} : n;
|
|
1688
2244
|
});
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
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
|
+
}
|
|
2281
|
+
}
|
|
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);
|
|
1694
3084
|
}
|
|
1695
|
-
},
|
|
1696
|
-
const t = Date.now(), n =
|
|
1697
|
-
return t - n <
|
|
1698
|
-
},
|
|
1699
|
-
const t =
|
|
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);
|
|
1700
3090
|
return {
|
|
1701
3091
|
spa: "es",
|
|
1702
3092
|
eng: "en",
|
|
@@ -1705,69 +3095,74 @@ const vt = x.div`
|
|
|
1705
3095
|
ita: "it",
|
|
1706
3096
|
por: "pt"
|
|
1707
3097
|
}[t] || "en";
|
|
1708
|
-
},
|
|
1709
|
-
const
|
|
1710
|
-
if (
|
|
1711
|
-
if (
|
|
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))
|
|
1712
3102
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
1713
|
-
const
|
|
3103
|
+
const c = Br(e);
|
|
1714
3104
|
try {
|
|
1715
|
-
const { data: l } = await
|
|
3105
|
+
const { data: l } = await Ut.post(
|
|
1716
3106
|
n,
|
|
1717
3107
|
{
|
|
1718
3108
|
q: e,
|
|
1719
|
-
source:
|
|
3109
|
+
source: c,
|
|
1720
3110
|
target: t,
|
|
1721
|
-
api_key:
|
|
3111
|
+
api_key: r
|
|
1722
3112
|
},
|
|
1723
3113
|
{
|
|
1724
3114
|
headers: {
|
|
1725
3115
|
"Content-Type": "application/json"
|
|
1726
3116
|
}
|
|
1727
3117
|
}
|
|
1728
|
-
),
|
|
1729
|
-
return
|
|
3118
|
+
), s = (l == null ? void 0 : l.translatedText) || e;
|
|
3119
|
+
return Vr(e, t, s), s;
|
|
1730
3120
|
} catch (l) {
|
|
1731
3121
|
return console.warn(`[Translation] Failed for: "${e}"`, l), e;
|
|
1732
3122
|
}
|
|
1733
|
-
},
|
|
1734
|
-
const
|
|
1735
|
-
Object.entries(e).map(async ([
|
|
1736
|
-
if (
|
|
1737
|
-
const
|
|
1738
|
-
return [
|
|
1739
|
-
} else if (Array.isArray(
|
|
1740
|
-
const
|
|
1741
|
-
|
|
1742
|
-
async (l) => typeof l == "object" && l !== null ? await
|
|
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
|
|
1743
3133
|
)
|
|
1744
3134
|
);
|
|
1745
|
-
return [
|
|
1746
|
-
} else if (typeof
|
|
1747
|
-
const
|
|
1748
|
-
return [
|
|
3135
|
+
return [a, c];
|
|
3136
|
+
} else if (typeof o == "object" && o !== null) {
|
|
3137
|
+
const c = await Qe(o, t, n);
|
|
3138
|
+
return [a, c];
|
|
1749
3139
|
} else
|
|
1750
|
-
return [
|
|
3140
|
+
return [a, o];
|
|
1751
3141
|
})
|
|
1752
3142
|
);
|
|
1753
|
-
return Object.fromEntries(
|
|
3143
|
+
return Object.fromEntries(r);
|
|
1754
3144
|
};
|
|
1755
3145
|
export {
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
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
|
|
1773
3168
|
};
|