@mx-cartographer/experiences 7.0.17 → 7.0.19
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/CHANGELOG.md +8 -0
- package/dist/{DebtsStore-Dp-CraCD.mjs → DebtsStore-VkyMADzd.mjs} +18 -15
- package/dist/{NotificationSettings-aZFVTc8B.mjs → NotificationSettings-Dhf_u5o-.mjs} +45 -45
- package/dist/common/index.es.js +1 -1
- package/dist/common/types/localization/DebtsCopy.d.ts +1 -0
- package/dist/debts/constants/index.d.ts +7 -4
- package/dist/debts/index.es.js +524 -457
- package/dist/debts/store/DebtsUiStore.d.ts +3 -3
- package/dist/debts/utils/DebtsWidget.d.ts +2 -2
- package/dist/debts/utils/SnowballCard.d.ts +2 -2
- package/dist/debts/utils/shared.d.ts +11 -2
- package/dist/notifications/index.es.js +1 -1
- package/dist/settings/index.es.js +2 -2
- package/package.json +1 -1
package/dist/debts/index.es.js
CHANGED
|
@@ -1,105 +1,167 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as L } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import x from "react";
|
|
3
3
|
import { observer as S } from "mobx-react-lite";
|
|
4
|
-
import
|
|
5
|
-
import { useTheme as j, Card as
|
|
6
|
-
import { Text as
|
|
7
|
-
import { intervalToDuration as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import g from "@mui/material/Stack";
|
|
5
|
+
import { useTheme as j, Card as be, Stack as _, Box as O } from "@mui/material";
|
|
6
|
+
import { Text as l, H3 as De, InstitutionLogo as ve, Icon as ee } from "@mxenabled/mxui";
|
|
7
|
+
import { intervalToDuration as Te, formatDuration as Ae } from "date-fns";
|
|
8
|
+
import { addMonths as le } from "date-fns/addMonths";
|
|
9
|
+
import { fromUnixTime as se } from "date-fns/fromUnixTime";
|
|
10
|
+
import { getUnixTime as ce } from "date-fns/getUnixTime";
|
|
11
|
+
import { D as M, M as Ee, I as Ie } from "../DebtsStore-VkyMADzd.mjs";
|
|
12
|
+
import { a as Nr } from "../DebtsStore-VkyMADzd.mjs";
|
|
13
|
+
import { f as P, a as Be } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
11
14
|
import { f as K, D as U } from "../Dialog-CWW597AF.mjs";
|
|
12
|
-
import { G as
|
|
15
|
+
import { G as Me, x as q, u as C, j as z, e as k, c as Z, a as Pe } from "../hooks-DkUqN6JE.mjs";
|
|
13
16
|
import { u as X } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
17
|
import { D as te } from "../Drawer-kEE73B87.mjs";
|
|
15
|
-
import { b as
|
|
16
|
-
import { A as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { LineChart as
|
|
18
|
+
import { b as A } from "../Localization-2MODESHW.mjs";
|
|
19
|
+
import { A as ke, u as Fe } from "../AccountDetailsHeader-Eb3WvBGm.mjs";
|
|
20
|
+
import Ne from "@mui/material/Card";
|
|
21
|
+
import Re from "@mui/material/CardContent";
|
|
22
|
+
import Le from "@mui/material/CardHeader";
|
|
23
|
+
import { LineChart as $e } from "@mui/x-charts";
|
|
21
24
|
import re from "@mui/material/Box";
|
|
22
|
-
import { useTheme as
|
|
23
|
-
import { A as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
25
|
+
import { useTheme as He } from "@mui/material/styles";
|
|
26
|
+
import { A as T, W as Oe } from "../WidgetContainer-CdBs9WOZ.mjs";
|
|
27
|
+
import de from "@mui/material/Tab";
|
|
28
|
+
import We from "@mui/material/Tabs";
|
|
29
|
+
import _e from "@mui/material/List";
|
|
27
30
|
import W from "@mui/material/Divider";
|
|
28
|
-
import { M as
|
|
29
|
-
import
|
|
31
|
+
import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-DepsKiJz.mjs";
|
|
32
|
+
import Xe from "@mui/material/TextField";
|
|
30
33
|
import { L as J } from "../ListItemAction-DNZZ5fSa.mjs";
|
|
31
34
|
import { C as ae } from "../CurrencyInput-bEx2Mbd0.mjs";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import { Error as
|
|
36
|
-
import { T as
|
|
37
|
-
import { DataGridPro as
|
|
35
|
+
import pe from "@mui/material/Alert";
|
|
36
|
+
import me from "@mui/material/AlertTitle";
|
|
37
|
+
import he from "@mui/material/Paper";
|
|
38
|
+
import { Error as Ve, CheckCircle as ye } from "@mxenabled/mx-icons";
|
|
39
|
+
import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
|
|
40
|
+
import { DataGridPro as Ye } from "@mui/x-data-grid-pro";
|
|
38
41
|
import { H as G } from "../HeaderCell-DjuifqHJ.mjs";
|
|
39
|
-
import { f as
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import { L as
|
|
45
|
-
const
|
|
46
|
-
|
|
42
|
+
import { f as Ke } from "../ConnectDrawer-phFH6OHt.mjs";
|
|
43
|
+
import fe from "@mui/material/Button";
|
|
44
|
+
import Ue from "@mui/material/IconButton";
|
|
45
|
+
import qe from "@mui/material/ListItem";
|
|
46
|
+
import Ze from "@mui/material/Popover";
|
|
47
|
+
import { L as Je } from "../Loader-DUaFpDGv.mjs";
|
|
48
|
+
const Qe = (a, o = 0, n = 0) => {
|
|
49
|
+
if (n === 0) return 0;
|
|
50
|
+
const r = o / (Ee * Ie);
|
|
51
|
+
return Math.ceil(
|
|
52
|
+
r === 0 ? a / n : -Math.log(1 - r * a / n) / Math.log(1 + r)
|
|
53
|
+
);
|
|
54
|
+
}, et = (a, o, n, r, t) => {
|
|
55
|
+
const i = [];
|
|
56
|
+
if (n === 0) {
|
|
57
|
+
for (let p = 0; p < a; p++) {
|
|
58
|
+
const d = o - r * (p + 1), h = o - r * p, m = d >= 0 ? r : h;
|
|
59
|
+
i.push({
|
|
60
|
+
balance: d >= 0 ? d : 0,
|
|
61
|
+
interest: n,
|
|
62
|
+
payment: m,
|
|
63
|
+
principal: m,
|
|
64
|
+
timestamp: ce(
|
|
65
|
+
le(
|
|
66
|
+
se(t),
|
|
67
|
+
// convert seconds → Date
|
|
68
|
+
p + 1
|
|
69
|
+
// add (index + 1) months
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return i;
|
|
75
|
+
}
|
|
76
|
+
const c = n / 1200;
|
|
77
|
+
for (let p = 0; p < a; p++) {
|
|
78
|
+
const d = ce(le(se(t), p + 1)), h = Math.pow(1 + c, p), m = o * h - r * ((h - 1) / c), y = Math.pow(1 + c, p + 1), f = o * y - r * ((y - 1) / c), D = r + Math.min(f, 0), E = m * c;
|
|
79
|
+
i.push({
|
|
80
|
+
balance: Math.max(0, f),
|
|
81
|
+
interest: E,
|
|
82
|
+
payment: D,
|
|
83
|
+
principal: D - E,
|
|
84
|
+
timestamp: d
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return i;
|
|
88
|
+
}, tt = (a) => (a[a.length - 1] || {}).timestamp, rt = (a) => {
|
|
89
|
+
const { monthly_payment: o, interest_rate: n, balance: r, payment_due_date: t } = a, i = Qe(r, n ?? 0, o ?? 0), c = et(
|
|
90
|
+
i,
|
|
91
|
+
r,
|
|
92
|
+
n ?? 0,
|
|
93
|
+
o ?? 0,
|
|
94
|
+
t
|
|
95
|
+
), p = tt(c);
|
|
96
|
+
return {
|
|
97
|
+
...a,
|
|
98
|
+
minimumFinalPayment: p,
|
|
99
|
+
minimumPayments: c
|
|
100
|
+
};
|
|
101
|
+
}, xe = (a, o) => {
|
|
102
|
+
const [n, r] = a.reduce(
|
|
103
|
+
([t, i], c) => (c.is_paid_off || c.is_impossible ? i.push({ ...c, minimumPayments: [] }) : t.push(rt(c)), [t, i]),
|
|
104
|
+
[[], []]
|
|
105
|
+
);
|
|
47
106
|
switch (o) {
|
|
48
|
-
case
|
|
49
|
-
n.sort((t,
|
|
107
|
+
case M.FASTEST_PAYOFF_FIRST:
|
|
108
|
+
n.sort((t, i) => (t.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
|
|
109
|
+
break;
|
|
110
|
+
case M.HIGHEST_INTEREST:
|
|
111
|
+
n.sort((t, i) => (i.interest_rate ?? 0) - (t.interest_rate ?? 0));
|
|
50
112
|
break;
|
|
51
|
-
case
|
|
52
|
-
n.sort((t,
|
|
113
|
+
case M.LOWEST_BALANCE:
|
|
114
|
+
n.sort((t, i) => t.balance - i.balance);
|
|
53
115
|
break;
|
|
54
|
-
case
|
|
55
|
-
n.sort((t,
|
|
116
|
+
case M.HIGHEST_BALANCE:
|
|
117
|
+
n.sort((t, i) => i.balance - t.balance);
|
|
56
118
|
break;
|
|
57
119
|
default:
|
|
58
|
-
n.sort((t,
|
|
120
|
+
n.sort((t, i) => t.balance - i.balance);
|
|
59
121
|
}
|
|
60
122
|
a.splice(0, a.length, ...n, ...r);
|
|
61
123
|
};
|
|
62
|
-
function
|
|
63
|
-
const r = a.map((
|
|
64
|
-
(
|
|
124
|
+
function at(a, o, n = 0) {
|
|
125
|
+
const r = a.map((m) => ({ ...m })).filter(
|
|
126
|
+
(m) => m.interest_rate !== void 0 && m.monthly_payment !== void 0 && !m.is_paid_off
|
|
65
127
|
);
|
|
66
|
-
|
|
67
|
-
let t = 0,
|
|
68
|
-
const
|
|
69
|
-
for (; r.some((
|
|
70
|
-
let
|
|
71
|
-
for (const [
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
let u =
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
|
|
128
|
+
xe(r, o);
|
|
129
|
+
let t = 0, i = 0;
|
|
130
|
+
const c = /* @__PURE__ */ new Date(), p = /* @__PURE__ */ new Date();
|
|
131
|
+
for (; r.some((m) => m.balance >= 0.01 && !m.is_impossible); ) {
|
|
132
|
+
let m = !1;
|
|
133
|
+
for (const [y, f] of r.entries()) {
|
|
134
|
+
if (f.balance <= 0.01 || f.is_impossible) continue;
|
|
135
|
+
const E = (f.interest_rate ?? 0) / 100 / 12, v = f.balance * E;
|
|
136
|
+
let u = f.monthly_payment ?? 0;
|
|
137
|
+
y === 0 && n && (u += n), f.balance += v;
|
|
138
|
+
const I = Math.min(f.balance, u + i);
|
|
139
|
+
if (I <= v) {
|
|
140
|
+
f.is_impossible = !0;
|
|
79
141
|
continue;
|
|
80
142
|
}
|
|
81
|
-
|
|
143
|
+
f.balance -= I, f.balance = f.balance < 0.01 ? 0 : f.balance, t += v, f.balance <= 0 && (i += u), I > 0 && (m = !0);
|
|
82
144
|
}
|
|
83
|
-
|
|
145
|
+
m && p.setMonth(p.getMonth() + 1);
|
|
84
146
|
}
|
|
85
|
-
const
|
|
147
|
+
const d = r.some((m) => m.is_impossible && m.balance > 0), h = Te({ start: c, end: p });
|
|
86
148
|
return {
|
|
87
|
-
payoffSavings:
|
|
88
|
-
payoffDate:
|
|
89
|
-
payoffDuration:
|
|
149
|
+
payoffSavings: d ? "N/A" : P(t, "0,0.00"),
|
|
150
|
+
payoffDate: d ? "Never" : K(p, U.MONTH_YEAR),
|
|
151
|
+
payoffDuration: d ? "Stagnant" : Ae(h, { format: ["years", "months"] }) || "0 months"
|
|
90
152
|
};
|
|
91
153
|
}
|
|
92
154
|
const R = () => {
|
|
93
|
-
if (!
|
|
155
|
+
if (!x.useContext(Me))
|
|
94
156
|
throw new Error("useCateUiStore() must be used within the GlobalDataContext");
|
|
95
157
|
return q().uiStore;
|
|
96
|
-
},
|
|
97
|
-
const r = j(), { isMobile: t } = X(), { debts:
|
|
98
|
-
const
|
|
99
|
-
return
|
|
100
|
-
}, [a,
|
|
158
|
+
}, ot = ({ debts: a, onClickCta: o, sx: n }) => {
|
|
159
|
+
const r = j(), { isMobile: t } = X(), { debts: i } = C(), { selectedDebtPriority: c } = R(), { monthlyCashFlowProfile: p } = z(), { payoffDate: d, payoffSavings: h, payoffDuration: m } = x.useMemo(() => {
|
|
160
|
+
const y = p?.extra_payment ?? 0;
|
|
161
|
+
return at(a, c, y);
|
|
162
|
+
}, [a, c, p]);
|
|
101
163
|
return /* @__PURE__ */ e(
|
|
102
|
-
|
|
164
|
+
be,
|
|
103
165
|
{
|
|
104
166
|
sx: {
|
|
105
167
|
boxShadow: r.shadows[2],
|
|
@@ -118,35 +180,35 @@ const R = () => {
|
|
|
118
180
|
pb: "8px"
|
|
119
181
|
},
|
|
120
182
|
children: [
|
|
121
|
-
/* @__PURE__ */ e(
|
|
122
|
-
/* @__PURE__ */ e(
|
|
183
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_date_description }),
|
|
184
|
+
/* @__PURE__ */ e(l, { bold: !0, color: r.palette.primary.main, variant: "Small", children: d })
|
|
123
185
|
]
|
|
124
186
|
}
|
|
125
187
|
),
|
|
126
188
|
/* @__PURE__ */ s(_, { gap: t ? "4px" : "0", children: [
|
|
127
|
-
/* @__PURE__ */ e(
|
|
128
|
-
/* @__PURE__ */ e(
|
|
189
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: h }),
|
|
190
|
+
/* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: i.snowball_card_amount_description })
|
|
129
191
|
] }),
|
|
130
192
|
/* @__PURE__ */ s(_, { gap: t ? "4px" : "0", children: [
|
|
131
|
-
/* @__PURE__ */ e(
|
|
132
|
-
/* @__PURE__ */ e(
|
|
193
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: m }),
|
|
194
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_duration_description })
|
|
133
195
|
] }),
|
|
134
196
|
/* @__PURE__ */ e(
|
|
135
|
-
|
|
197
|
+
l,
|
|
136
198
|
{
|
|
137
199
|
bold: !0,
|
|
138
200
|
color: r.palette.primary.main,
|
|
139
201
|
onClick: o,
|
|
140
202
|
sx: { cursor: "pointer" },
|
|
141
203
|
variant: "Small",
|
|
142
|
-
children:
|
|
204
|
+
children: i.snowball_card_cta
|
|
143
205
|
}
|
|
144
206
|
)
|
|
145
207
|
] })
|
|
146
208
|
}
|
|
147
209
|
);
|
|
148
|
-
},
|
|
149
|
-
const r = j(), { debts: t } = C(), [
|
|
210
|
+
}, nt = S(ot), it = ({ isOpen: a, onClose: o, sx: n }) => {
|
|
211
|
+
const r = j(), { debts: t } = C(), [i, c] = x.useState(!1);
|
|
150
212
|
return /* @__PURE__ */ e(
|
|
151
213
|
te,
|
|
152
214
|
{
|
|
@@ -158,39 +220,39 @@ const R = () => {
|
|
|
158
220
|
children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
|
|
159
221
|
/* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
|
|
160
222
|
/* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
|
|
161
|
-
/* @__PURE__ */ e(
|
|
162
|
-
/* @__PURE__ */ e(
|
|
163
|
-
/* @__PURE__ */ e(
|
|
164
|
-
/* @__PURE__ */ e(
|
|
223
|
+
/* @__PURE__ */ e(l, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
|
|
224
|
+
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
|
|
225
|
+
/* @__PURE__ */ e(l, { variant: "H1", children: t.snowball_drawer_savings }),
|
|
226
|
+
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
|
|
165
227
|
] }),
|
|
166
|
-
/* @__PURE__ */ s(
|
|
167
|
-
/* @__PURE__ */ e(
|
|
228
|
+
/* @__PURE__ */ s(be, { sx: { display: "grid", py: 16, px: 24 }, children: [
|
|
229
|
+
/* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
|
|
168
230
|
/* @__PURE__ */ e(
|
|
169
|
-
|
|
231
|
+
l,
|
|
170
232
|
{
|
|
171
233
|
color: r.palette.secondary.main,
|
|
172
234
|
mb: 8,
|
|
173
|
-
sx: { whiteSpace:
|
|
235
|
+
sx: { whiteSpace: i ? "normal" : "nowrap" },
|
|
174
236
|
variant: "ParagraphSmall",
|
|
175
237
|
children: t.snowball_drawer_answer
|
|
176
238
|
}
|
|
177
239
|
),
|
|
178
240
|
/* @__PURE__ */ e(
|
|
179
|
-
|
|
241
|
+
l,
|
|
180
242
|
{
|
|
181
243
|
bold: !0,
|
|
182
244
|
color: r.palette.primary.main,
|
|
183
|
-
onClick: () =>
|
|
245
|
+
onClick: () => c(!i),
|
|
184
246
|
sx: { cursor: "pointer" },
|
|
185
247
|
variant: "Small",
|
|
186
|
-
children:
|
|
248
|
+
children: i ? t.snowball_drawer_less : t.snowball_drawer_more
|
|
187
249
|
}
|
|
188
250
|
)
|
|
189
251
|
] })
|
|
190
252
|
] }),
|
|
191
253
|
/* @__PURE__ */ s(_, { children: [
|
|
192
254
|
/* @__PURE__ */ e(
|
|
193
|
-
|
|
255
|
+
l,
|
|
194
256
|
{
|
|
195
257
|
color: r.palette.secondary.main,
|
|
196
258
|
px: 24,
|
|
@@ -200,8 +262,8 @@ const R = () => {
|
|
|
200
262
|
}
|
|
201
263
|
),
|
|
202
264
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
203
|
-
/* @__PURE__ */ e(
|
|
204
|
-
/* @__PURE__ */ e(
|
|
265
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 1) }),
|
|
266
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
205
267
|
] }),
|
|
206
268
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
207
269
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -218,7 +280,7 @@ const R = () => {
|
|
|
218
280
|
backgroundColor: r.palette.success.main,
|
|
219
281
|
marginRight: 12
|
|
220
282
|
},
|
|
221
|
-
children: /* @__PURE__ */ e(
|
|
283
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
222
284
|
}
|
|
223
285
|
),
|
|
224
286
|
/* @__PURE__ */ s(
|
|
@@ -233,20 +295,20 @@ const R = () => {
|
|
|
233
295
|
},
|
|
234
296
|
children: [
|
|
235
297
|
/* @__PURE__ */ s(_, { flexGrow: 1, children: [
|
|
236
|
-
/* @__PURE__ */ e(
|
|
237
|
-
/* @__PURE__ */ s(
|
|
238
|
-
|
|
298
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "A") }),
|
|
299
|
+
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
|
|
300
|
+
A(
|
|
239
301
|
t.snowball_drawer_rollover_explainer_pt1,
|
|
240
302
|
"$100"
|
|
241
303
|
),
|
|
242
|
-
/* @__PURE__ */ e("strong", { children:
|
|
304
|
+
/* @__PURE__ */ e("strong", { children: A(t.snowball_drawer_debt_label, "B") }),
|
|
243
305
|
t.snowball_drawer_rollover_explainer_pt2
|
|
244
306
|
] })
|
|
245
307
|
] }),
|
|
246
308
|
/* @__PURE__ */ s(_, { children: [
|
|
247
|
-
/* @__PURE__ */ e(
|
|
309
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$100.00" }),
|
|
248
310
|
/* @__PURE__ */ e(
|
|
249
|
-
|
|
311
|
+
l,
|
|
250
312
|
{
|
|
251
313
|
bold: !0,
|
|
252
314
|
color: r.palette.success.main,
|
|
@@ -284,8 +346,8 @@ const R = () => {
|
|
|
284
346
|
pr: 24
|
|
285
347
|
},
|
|
286
348
|
children: [
|
|
287
|
-
/* @__PURE__ */ e(
|
|
288
|
-
/* @__PURE__ */ e(
|
|
349
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "B") }),
|
|
350
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$400.00" })
|
|
289
351
|
]
|
|
290
352
|
}
|
|
291
353
|
)
|
|
@@ -304,8 +366,8 @@ const R = () => {
|
|
|
304
366
|
}
|
|
305
367
|
),
|
|
306
368
|
/* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
|
|
307
|
-
/* @__PURE__ */ e(
|
|
308
|
-
/* @__PURE__ */ e(
|
|
369
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }),
|
|
370
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
|
|
309
371
|
] })
|
|
310
372
|
] }),
|
|
311
373
|
/* @__PURE__ */ s(
|
|
@@ -320,15 +382,15 @@ const R = () => {
|
|
|
320
382
|
borderBottom: `1px solid ${r.palette.border.light}`
|
|
321
383
|
},
|
|
322
384
|
children: [
|
|
323
|
-
/* @__PURE__ */ e(
|
|
324
|
-
/* @__PURE__ */ e(
|
|
385
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
386
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
325
387
|
]
|
|
326
388
|
}
|
|
327
389
|
)
|
|
328
390
|
] }),
|
|
329
391
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
330
|
-
/* @__PURE__ */ e(
|
|
331
|
-
/* @__PURE__ */ e(
|
|
392
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 2) }),
|
|
393
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
332
394
|
] }),
|
|
333
395
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
334
396
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -345,7 +407,7 @@ const R = () => {
|
|
|
345
407
|
backgroundColor: r.palette.success.main,
|
|
346
408
|
marginRight: 12
|
|
347
409
|
},
|
|
348
|
-
children: /* @__PURE__ */ e(
|
|
410
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
349
411
|
}
|
|
350
412
|
),
|
|
351
413
|
/* @__PURE__ */ s(
|
|
@@ -360,20 +422,20 @@ const R = () => {
|
|
|
360
422
|
},
|
|
361
423
|
children: [
|
|
362
424
|
/* @__PURE__ */ s(_, { flexGrow: 1, children: [
|
|
363
|
-
/* @__PURE__ */ e(
|
|
364
|
-
/* @__PURE__ */ s(
|
|
365
|
-
|
|
425
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "B") }),
|
|
426
|
+
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
|
|
427
|
+
A(
|
|
366
428
|
t.snowball_drawer_rollover_explainer_pt1,
|
|
367
429
|
"$500"
|
|
368
430
|
),
|
|
369
|
-
/* @__PURE__ */ e("strong", { children:
|
|
431
|
+
/* @__PURE__ */ e("strong", { children: A(t.snowball_drawer_debt_label, "C") }),
|
|
370
432
|
t.snowball_drawer_rollover_explainer_pt2
|
|
371
433
|
] })
|
|
372
434
|
] }),
|
|
373
435
|
/* @__PURE__ */ s(_, { children: [
|
|
374
|
-
/* @__PURE__ */ e(
|
|
436
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$500.00" }),
|
|
375
437
|
/* @__PURE__ */ e(
|
|
376
|
-
|
|
438
|
+
l,
|
|
377
439
|
{
|
|
378
440
|
bold: !0,
|
|
379
441
|
color: r.palette.success.main,
|
|
@@ -410,8 +472,8 @@ const R = () => {
|
|
|
410
472
|
pr: 24
|
|
411
473
|
},
|
|
412
474
|
children: [
|
|
413
|
-
/* @__PURE__ */ e(
|
|
414
|
-
/* @__PURE__ */ e(
|
|
475
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }),
|
|
476
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
|
|
415
477
|
]
|
|
416
478
|
}
|
|
417
479
|
)
|
|
@@ -428,15 +490,15 @@ const R = () => {
|
|
|
428
490
|
borderBottom: `1px solid ${r.palette.border.light}`
|
|
429
491
|
},
|
|
430
492
|
children: [
|
|
431
|
-
/* @__PURE__ */ e(
|
|
432
|
-
/* @__PURE__ */ e(
|
|
493
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
494
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
433
495
|
]
|
|
434
496
|
}
|
|
435
497
|
)
|
|
436
498
|
] }),
|
|
437
499
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
438
|
-
/* @__PURE__ */ e(
|
|
439
|
-
/* @__PURE__ */ e(
|
|
500
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 3) }),
|
|
501
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
440
502
|
] }),
|
|
441
503
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
442
504
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -453,7 +515,7 @@ const R = () => {
|
|
|
453
515
|
backgroundColor: r.palette.success.main,
|
|
454
516
|
marginRight: 12
|
|
455
517
|
},
|
|
456
|
-
children: /* @__PURE__ */ e(
|
|
518
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
457
519
|
}
|
|
458
520
|
),
|
|
459
521
|
/* @__PURE__ */ s(
|
|
@@ -467,11 +529,11 @@ const R = () => {
|
|
|
467
529
|
pr: 24
|
|
468
530
|
},
|
|
469
531
|
children: [
|
|
470
|
-
/* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(
|
|
532
|
+
/* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }) }),
|
|
471
533
|
/* @__PURE__ */ s(_, { children: [
|
|
472
|
-
/* @__PURE__ */ e(
|
|
534
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,500.00" }),
|
|
473
535
|
/* @__PURE__ */ e(
|
|
474
|
-
|
|
536
|
+
l,
|
|
475
537
|
{
|
|
476
538
|
bold: !0,
|
|
477
539
|
color: r.palette.success.main,
|
|
@@ -497,8 +559,8 @@ const R = () => {
|
|
|
497
559
|
borderBottom: `1px solid ${r.palette.border.light}`
|
|
498
560
|
},
|
|
499
561
|
children: [
|
|
500
|
-
/* @__PURE__ */ e(
|
|
501
|
-
/* @__PURE__ */ e(
|
|
562
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
563
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
502
564
|
]
|
|
503
565
|
}
|
|
504
566
|
)
|
|
@@ -507,50 +569,50 @@ const R = () => {
|
|
|
507
569
|
] })
|
|
508
570
|
}
|
|
509
571
|
);
|
|
510
|
-
},
|
|
511
|
-
function
|
|
512
|
-
const [n, r, t] = a.replace(/^#/, "").match(/.{1,2}/g).map((
|
|
572
|
+
}, lt = S(it), st = "#FF7B08";
|
|
573
|
+
function ct(a, o) {
|
|
574
|
+
const [n, r, t] = a.replace(/^#/, "").match(/.{1,2}/g).map((c) => parseInt(c, 16)), i = [
|
|
513
575
|
Math.max(0, Math.min(255, Math.round(n * o))),
|
|
514
576
|
Math.max(0, Math.min(255, Math.round(r * o))),
|
|
515
577
|
Math.max(0, Math.min(255, Math.round(t * o)))
|
|
516
578
|
];
|
|
517
|
-
return `rgb(${
|
|
579
|
+
return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
|
|
518
580
|
}
|
|
519
|
-
const
|
|
581
|
+
const ge = ({
|
|
520
582
|
sx: a,
|
|
521
583
|
height: o = 500,
|
|
522
584
|
width: n,
|
|
523
585
|
debts: r,
|
|
524
586
|
hoveredDebtGuid: t,
|
|
525
|
-
onClickArea:
|
|
526
|
-
onHoverArea:
|
|
587
|
+
onClickArea: i,
|
|
588
|
+
onHoverArea: c
|
|
527
589
|
}) => {
|
|
528
|
-
const
|
|
590
|
+
const p = He(), { onEvent: d } = k(), h = r.filter((b) => !b.is_impossible), m = [
|
|
529
591
|
...new Set(
|
|
530
592
|
h.flatMap((b) => b.dataset.map((w) => new Date(w.x).getTime()))
|
|
531
593
|
)
|
|
532
|
-
].sort((b, w) => b - w).map((b) => new Date(b)),
|
|
594
|
+
].sort((b, w) => b - w).map((b) => new Date(b)), y = h.map((b) => {
|
|
533
595
|
const w = new Map(b.dataset.map((N) => [new Date(N.x).getTime(), N.y]));
|
|
534
|
-
let
|
|
535
|
-
const
|
|
536
|
-
const
|
|
537
|
-
return
|
|
596
|
+
let B = w.get(m[0].getTime()) ?? 0;
|
|
597
|
+
const F = m.map((N) => {
|
|
598
|
+
const $ = w.get(N.getTime()) ?? B;
|
|
599
|
+
return B = $, { x: N, y: $ };
|
|
538
600
|
});
|
|
539
|
-
return { ...b, dataset:
|
|
540
|
-
}),
|
|
601
|
+
return { ...b, dataset: F };
|
|
602
|
+
}), f = y.reduce(
|
|
541
603
|
(b, w) => b + (w.dataset[0]?.y ?? 0),
|
|
542
604
|
0
|
|
543
|
-
),
|
|
544
|
-
const
|
|
545
|
-
return { x: b, y:
|
|
546
|
-
}),
|
|
547
|
-
const
|
|
605
|
+
), D = m.map((b, w) => {
|
|
606
|
+
const B = w / (m.length - 1), F = f * (1 - B);
|
|
607
|
+
return { x: b, y: F };
|
|
608
|
+
}), E = Math.ceil(f / 100) * 100, v = m, u = y.map((b, w) => {
|
|
609
|
+
const B = 1 - w / y.length * 0.5, F = ct(st, B);
|
|
548
610
|
return {
|
|
549
611
|
id: `debt-${w}`,
|
|
550
612
|
guid: b.guid,
|
|
551
613
|
label: b.name,
|
|
552
614
|
data: b.dataset.map((N) => N.y),
|
|
553
|
-
color:
|
|
615
|
+
color: F,
|
|
554
616
|
curve: "linear",
|
|
555
617
|
type: "line",
|
|
556
618
|
area: !0,
|
|
@@ -561,15 +623,15 @@ const ye = ({
|
|
|
561
623
|
u.push({
|
|
562
624
|
id: "payoff-line",
|
|
563
625
|
label: "Payoff Line",
|
|
564
|
-
data:
|
|
565
|
-
color:
|
|
626
|
+
data: D.map((b) => b.y),
|
|
627
|
+
color: p.palette.grey[700],
|
|
566
628
|
curve: "linear",
|
|
567
629
|
type: "line",
|
|
568
630
|
stack: void 0,
|
|
569
631
|
showMark: !1,
|
|
570
632
|
disableHighlight: !0
|
|
571
633
|
});
|
|
572
|
-
const
|
|
634
|
+
const I = (b) => u.findIndex((w) => w?.guid === b);
|
|
573
635
|
return /* @__PURE__ */ e(
|
|
574
636
|
re,
|
|
575
637
|
{
|
|
@@ -586,19 +648,19 @@ const ye = ({
|
|
|
586
648
|
}
|
|
587
649
|
},
|
|
588
650
|
children: /* @__PURE__ */ e(
|
|
589
|
-
|
|
651
|
+
$e,
|
|
590
652
|
{
|
|
591
653
|
axisHighlight: { x: "none" },
|
|
592
654
|
disableLineItemHighlight: !0,
|
|
593
655
|
height: o,
|
|
594
656
|
onAreaClick: (b, w) => {
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
|
|
657
|
+
i?.();
|
|
658
|
+
const B = u.find((F) => F.id === w.seriesId);
|
|
659
|
+
d(T.DEBTS_CLICK_CHART_AREA, { account_guid: B?.guid });
|
|
598
660
|
},
|
|
599
661
|
onHighlightChange: (b) => {
|
|
600
|
-
const w = u.find((
|
|
601
|
-
|
|
662
|
+
const w = u.find((B) => B.id === b?.seriesId)?.guid;
|
|
663
|
+
c?.(w ?? "");
|
|
602
664
|
},
|
|
603
665
|
series: u,
|
|
604
666
|
skipAnimation: !0,
|
|
@@ -624,10 +686,10 @@ const ye = ({
|
|
|
624
686
|
strokeDasharray: "10 5",
|
|
625
687
|
strokeWidth: 1
|
|
626
688
|
},
|
|
627
|
-
[`& .MuiLineElement-series-debt-${
|
|
689
|
+
[`& .MuiLineElement-series-debt-${I(t ?? "0")}`]: {
|
|
628
690
|
opacity: 1
|
|
629
691
|
},
|
|
630
|
-
[`& .MuiAreaElement-series-debt-${
|
|
692
|
+
[`& .MuiAreaElement-series-debt-${I(t ?? "0")}`]: {
|
|
631
693
|
opacity: 1
|
|
632
694
|
},
|
|
633
695
|
...a
|
|
@@ -636,9 +698,9 @@ const ye = ({
|
|
|
636
698
|
width: n,
|
|
637
699
|
xAxis: [
|
|
638
700
|
{
|
|
639
|
-
data:
|
|
701
|
+
data: v,
|
|
640
702
|
scaleType: "time",
|
|
641
|
-
min:
|
|
703
|
+
min: m[0],
|
|
642
704
|
disableTicks: !0,
|
|
643
705
|
valueFormatter: (b) => K(b, U.MONTH_SHORT_YEAR)
|
|
644
706
|
}
|
|
@@ -646,20 +708,20 @@ const ye = ({
|
|
|
646
708
|
yAxis: [
|
|
647
709
|
{
|
|
648
710
|
min: 0,
|
|
649
|
-
max:
|
|
711
|
+
max: E,
|
|
650
712
|
disableTicks: !0,
|
|
651
|
-
valueFormatter: (b) =>
|
|
713
|
+
valueFormatter: (b) => P(b, "0a")
|
|
652
714
|
}
|
|
653
715
|
]
|
|
654
716
|
}
|
|
655
717
|
)
|
|
656
718
|
}
|
|
657
719
|
);
|
|
658
|
-
},
|
|
720
|
+
}, dt = () => {
|
|
659
721
|
const a = j(), { debts: o } = C(), { selectedDebtChartData: n } = R();
|
|
660
722
|
return /* @__PURE__ */ s(L, { children: [
|
|
661
723
|
/* @__PURE__ */ s(
|
|
662
|
-
|
|
724
|
+
Ne,
|
|
663
725
|
{
|
|
664
726
|
sx: {
|
|
665
727
|
"& .MuiCardContent-root:last-child": {
|
|
@@ -667,13 +729,13 @@ const ye = ({
|
|
|
667
729
|
}
|
|
668
730
|
},
|
|
669
731
|
children: [
|
|
670
|
-
/* @__PURE__ */ e(
|
|
671
|
-
/* @__PURE__ */ e(
|
|
732
|
+
/* @__PURE__ */ e(Le, { sx: { pb: 0 }, title: /* @__PURE__ */ e(De, { sx: { pb: 4 }, children: o.details_chart_title }) }),
|
|
733
|
+
/* @__PURE__ */ e(Re, { sx: { p: 0 }, children: /* @__PURE__ */ e(ge, { debts: [n], height: 250 }) })
|
|
672
734
|
]
|
|
673
735
|
}
|
|
674
736
|
),
|
|
675
737
|
/* @__PURE__ */ e(
|
|
676
|
-
|
|
738
|
+
l,
|
|
677
739
|
{
|
|
678
740
|
color: a.palette.text.secondary,
|
|
679
741
|
sx: { whiteSpace: "normal", textAlign: "center", px: 8, py: 12 },
|
|
@@ -682,24 +744,24 @@ const ye = ({
|
|
|
682
744
|
}
|
|
683
745
|
)
|
|
684
746
|
] });
|
|
685
|
-
},
|
|
686
|
-
const a = j(), { onEvent: o } =
|
|
687
|
-
return
|
|
688
|
-
|
|
747
|
+
}, pt = S(dt), mt = () => {
|
|
748
|
+
const a = j(), { onEvent: o } = k(), { debts: n } = C(), { selectedDebtChartData: r, showCompleted: t, showError: i } = R();
|
|
749
|
+
return x.useEffect(() => o(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(_e, { children: i || t ? /* @__PURE__ */ e(
|
|
750
|
+
l,
|
|
689
751
|
{
|
|
690
752
|
color: a.palette.secondary.main,
|
|
691
753
|
component: "div",
|
|
692
754
|
sx: { p: 32, textAlign: "center", whiteSpace: "normal" },
|
|
693
755
|
variant: "Small",
|
|
694
|
-
children:
|
|
756
|
+
children: i ? n.schedule_error_message : n.schedule_complete_message
|
|
695
757
|
}
|
|
696
758
|
) : /* @__PURE__ */ s(L, { children: [
|
|
697
|
-
/* @__PURE__ */ s(
|
|
698
|
-
/* @__PURE__ */ e(
|
|
699
|
-
/* @__PURE__ */ e(
|
|
759
|
+
/* @__PURE__ */ s(g, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
760
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: n.schedule_month_heading }),
|
|
761
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: n.schedule_amount_heading })
|
|
700
762
|
] }),
|
|
701
|
-
r.dataset.slice(1).map(({ x:
|
|
702
|
-
|
|
763
|
+
r.dataset.slice(1).map(({ x: c, y: p, payment: d }) => /* @__PURE__ */ e(g, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(g, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
|
|
764
|
+
g,
|
|
703
765
|
{
|
|
704
766
|
sx: {
|
|
705
767
|
borderBottom: `1px solid ${a.palette.border.light}`,
|
|
@@ -709,28 +771,28 @@ const ye = ({
|
|
|
709
771
|
pr: 24
|
|
710
772
|
},
|
|
711
773
|
children: [
|
|
712
|
-
/* @__PURE__ */ s(
|
|
713
|
-
/* @__PURE__ */ e(
|
|
714
|
-
/* @__PURE__ */ e(
|
|
774
|
+
/* @__PURE__ */ s(g, { flexGrow: 1, children: [
|
|
775
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: K(c, U.MONTH_YEAR) }),
|
|
776
|
+
/* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: n.schedule_month_label })
|
|
715
777
|
] }),
|
|
716
|
-
/* @__PURE__ */ s(
|
|
717
|
-
/* @__PURE__ */ e(
|
|
778
|
+
/* @__PURE__ */ s(g, { children: [
|
|
779
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: P(p, "0,0.00") }),
|
|
718
780
|
/* @__PURE__ */ e(
|
|
719
|
-
|
|
781
|
+
l,
|
|
720
782
|
{
|
|
721
783
|
bold: !0,
|
|
722
784
|
color: a.palette.success.main,
|
|
723
785
|
textAlign: "end",
|
|
724
786
|
variant: "Tiny",
|
|
725
|
-
children: `+${
|
|
787
|
+
children: `+${P(d, "0,0")}`
|
|
726
788
|
}
|
|
727
789
|
)
|
|
728
790
|
] })
|
|
729
791
|
]
|
|
730
792
|
}
|
|
731
|
-
) }) }, String(
|
|
732
|
-
/* @__PURE__ */ e(
|
|
733
|
-
|
|
793
|
+
) }) }, String(c))),
|
|
794
|
+
/* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
|
|
795
|
+
g,
|
|
734
796
|
{
|
|
735
797
|
sx: {
|
|
736
798
|
alignItems: "center",
|
|
@@ -740,135 +802,135 @@ const ye = ({
|
|
|
740
802
|
px: 24
|
|
741
803
|
},
|
|
742
804
|
children: [
|
|
743
|
-
/* @__PURE__ */ e(
|
|
744
|
-
/* @__PURE__ */ e(
|
|
805
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: n.schedule_payoff_label }),
|
|
806
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "-" })
|
|
745
807
|
]
|
|
746
808
|
}
|
|
747
809
|
) })
|
|
748
810
|
] }) });
|
|
749
|
-
},
|
|
750
|
-
const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } =
|
|
751
|
-
await n({ ...a.account, interest_rate: t }), a.interest_rate = t, r(
|
|
752
|
-
},
|
|
811
|
+
}, ht = S(mt), ut = S(({ debt: a }) => {
|
|
812
|
+
const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.interest_rate ?? 0), c = t < 0, p = async () => {
|
|
813
|
+
await n({ ...a.account, interest_rate: t }), a.interest_rate = t, r(T.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
|
|
814
|
+
}, d = () => {
|
|
753
815
|
setTimeout(() => {
|
|
754
|
-
|
|
816
|
+
i(a.interest_rate ?? 0);
|
|
755
817
|
}, 250);
|
|
756
818
|
};
|
|
757
819
|
return /* @__PURE__ */ e(
|
|
758
820
|
J,
|
|
759
821
|
{
|
|
760
|
-
isSaveDisabled:
|
|
822
|
+
isSaveDisabled: c,
|
|
761
823
|
label: `${o.details_interest_rate} (%)`,
|
|
762
|
-
onCancel:
|
|
763
|
-
onSave:
|
|
824
|
+
onCancel: d,
|
|
825
|
+
onSave: p,
|
|
764
826
|
primaryText: o.details_interest_rate,
|
|
765
|
-
secondaryText:
|
|
827
|
+
secondaryText: Be(Number(a.interest_rate) / 100),
|
|
766
828
|
zeroStateText: a.interest_rate ? void 0 : o.add_interest_rate,
|
|
767
829
|
children: /* @__PURE__ */ e(
|
|
768
|
-
|
|
830
|
+
Xe,
|
|
769
831
|
{
|
|
770
|
-
error:
|
|
832
|
+
error: c,
|
|
771
833
|
fullWidth: !0,
|
|
772
|
-
onChange: (h) =>
|
|
834
|
+
onChange: (h) => i(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
|
|
773
835
|
type: "number",
|
|
774
836
|
value: t
|
|
775
837
|
}
|
|
776
838
|
)
|
|
777
839
|
}
|
|
778
840
|
);
|
|
779
|
-
}),
|
|
780
|
-
const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } =
|
|
781
|
-
await n({ ...a.account, minimum_payment: t }), a.monthly_payment = t, r(
|
|
782
|
-
},
|
|
841
|
+
}), bt = S(({ debt: a }) => {
|
|
842
|
+
const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.monthly_payment ?? 0), c = t < 0 || t > 9999999999e-2, p = async () => {
|
|
843
|
+
await n({ ...a.account, minimum_payment: t }), a.monthly_payment = t, r(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
|
|
844
|
+
}, d = () => {
|
|
783
845
|
setTimeout(() => {
|
|
784
|
-
|
|
846
|
+
i(a.monthly_payment ?? 0);
|
|
785
847
|
}, 250);
|
|
786
848
|
};
|
|
787
849
|
return /* @__PURE__ */ e(
|
|
788
850
|
J,
|
|
789
851
|
{
|
|
790
|
-
isSaveDisabled:
|
|
852
|
+
isSaveDisabled: c,
|
|
791
853
|
label: o.details_monthly_payment,
|
|
792
|
-
onCancel:
|
|
793
|
-
onSave:
|
|
854
|
+
onCancel: d,
|
|
855
|
+
onSave: p,
|
|
794
856
|
primaryText: o.details_monthly_payment,
|
|
795
|
-
secondaryText:
|
|
857
|
+
secondaryText: P(a.monthly_payment, "0,0"),
|
|
796
858
|
zeroStateText: a.monthly_payment ? void 0 : o.add_monthly_payment,
|
|
797
859
|
children: /* @__PURE__ */ e(
|
|
798
860
|
ae,
|
|
799
861
|
{
|
|
800
862
|
amount: t,
|
|
801
863
|
autoFocus: !0,
|
|
802
|
-
error:
|
|
864
|
+
error: c,
|
|
803
865
|
fullWidth: !0,
|
|
804
866
|
minAmount: 0,
|
|
805
|
-
setAmount: (h) =>
|
|
867
|
+
setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
|
|
806
868
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
807
869
|
}
|
|
808
870
|
)
|
|
809
871
|
}
|
|
810
872
|
);
|
|
811
|
-
}),
|
|
812
|
-
const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } =
|
|
813
|
-
await n({ ...a.account, original_balance: t }), a.original_balance = t, r(
|
|
814
|
-
},
|
|
873
|
+
}), _t = S(({ debt: a }) => {
|
|
874
|
+
const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.original_balance ?? 0), c = t < 0 || t > 9999999999e-2, p = async () => {
|
|
875
|
+
await n({ ...a.account, original_balance: t }), a.original_balance = t, r(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
|
|
876
|
+
}, d = () => {
|
|
815
877
|
setTimeout(() => {
|
|
816
|
-
|
|
878
|
+
i(a.original_balance ?? 0);
|
|
817
879
|
}, 250);
|
|
818
880
|
};
|
|
819
881
|
return /* @__PURE__ */ e(
|
|
820
882
|
J,
|
|
821
883
|
{
|
|
822
|
-
isSaveDisabled:
|
|
884
|
+
isSaveDisabled: c,
|
|
823
885
|
label: o.details_original_balance,
|
|
824
|
-
onCancel:
|
|
825
|
-
onSave:
|
|
886
|
+
onCancel: d,
|
|
887
|
+
onSave: p,
|
|
826
888
|
primaryText: o.details_original_balance,
|
|
827
|
-
secondaryText:
|
|
889
|
+
secondaryText: P(a.original_balance, "0,0"),
|
|
828
890
|
zeroStateText: a.original_balance ? void 0 : o.add_original_balance,
|
|
829
891
|
children: /* @__PURE__ */ e(
|
|
830
892
|
ae,
|
|
831
893
|
{
|
|
832
894
|
amount: t,
|
|
833
895
|
autoFocus: !0,
|
|
834
|
-
error:
|
|
896
|
+
error: c,
|
|
835
897
|
fullWidth: !0,
|
|
836
898
|
minAmount: 0,
|
|
837
|
-
setAmount: (h) =>
|
|
899
|
+
setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
|
|
838
900
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
839
901
|
}
|
|
840
902
|
)
|
|
841
903
|
}
|
|
842
904
|
);
|
|
843
|
-
}),
|
|
844
|
-
const { onEvent: a } =
|
|
845
|
-
return
|
|
905
|
+
}), yt = () => {
|
|
906
|
+
const { onEvent: a } = k(), { selectedDebtChartData: o } = R();
|
|
907
|
+
return x.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(g, { bgcolor: "background.paper", children: [
|
|
846
908
|
o?.goal && /* @__PURE__ */ s(L, { children: [
|
|
847
|
-
/* @__PURE__ */ e(
|
|
909
|
+
/* @__PURE__ */ e(Ge, { goal: o.goal }),
|
|
848
910
|
/* @__PURE__ */ e(W, {}),
|
|
849
|
-
/* @__PURE__ */ e(
|
|
911
|
+
/* @__PURE__ */ e(je, { goal: o.goal }),
|
|
850
912
|
/* @__PURE__ */ e(W, {}),
|
|
851
|
-
/* @__PURE__ */ e(
|
|
913
|
+
/* @__PURE__ */ e(ze, { goal: o.goal }),
|
|
852
914
|
/* @__PURE__ */ e(W, {})
|
|
853
915
|
] }),
|
|
854
916
|
!o?.goal && o?.account && /* @__PURE__ */ s(L, { children: [
|
|
855
|
-
/* @__PURE__ */ e(
|
|
917
|
+
/* @__PURE__ */ e(bt, { debt: o }),
|
|
856
918
|
/* @__PURE__ */ e(W, {}),
|
|
857
|
-
/* @__PURE__ */ e(
|
|
919
|
+
/* @__PURE__ */ e(ut, { debt: o }),
|
|
858
920
|
/* @__PURE__ */ e(W, {}),
|
|
859
|
-
/* @__PURE__ */ e(
|
|
921
|
+
/* @__PURE__ */ e(_t, { debt: o }),
|
|
860
922
|
/* @__PURE__ */ e(W, {})
|
|
861
923
|
] })
|
|
862
924
|
] });
|
|
863
|
-
},
|
|
925
|
+
}, ft = S(yt), xt = ({ setTabValue: a, sx: o }) => {
|
|
864
926
|
const { debts: n } = C(), { showError: r, showCompleted: t } = R();
|
|
865
|
-
return
|
|
927
|
+
return x.useEffect(() => {
|
|
866
928
|
r && a(1);
|
|
867
|
-
}, [r]), !r && !t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ s(
|
|
868
|
-
/* @__PURE__ */ e(
|
|
869
|
-
|
|
929
|
+
}, [r]), !r && !t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ s(g, { gap: 16, children: [
|
|
930
|
+
/* @__PURE__ */ e(he, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
|
|
931
|
+
pe,
|
|
870
932
|
{
|
|
871
|
-
icon: r ? /* @__PURE__ */ e(
|
|
933
|
+
icon: r ? /* @__PURE__ */ e(Ve, { filled: !0 }) : /* @__PURE__ */ e(ye, { color: "success", filled: !0 }),
|
|
872
934
|
severity: "error",
|
|
873
935
|
sx: {
|
|
874
936
|
alignItems: "start",
|
|
@@ -881,13 +943,13 @@ const ye = ({
|
|
|
881
943
|
}
|
|
882
944
|
},
|
|
883
945
|
children: [
|
|
884
|
-
/* @__PURE__ */ e(
|
|
885
|
-
/* @__PURE__ */ e(
|
|
946
|
+
/* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r ? n.status_error_title : n.status_complete_title }),
|
|
947
|
+
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r ? n.status_error_description : n.status_complete_description })
|
|
886
948
|
]
|
|
887
949
|
}
|
|
888
950
|
) }),
|
|
889
|
-
r && /* @__PURE__ */ e(
|
|
890
|
-
|
|
951
|
+
r && /* @__PURE__ */ e(he, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
|
|
952
|
+
pe,
|
|
891
953
|
{
|
|
892
954
|
icon: /* @__PURE__ */ e(L, {}),
|
|
893
955
|
severity: "error",
|
|
@@ -899,28 +961,28 @@ const ye = ({
|
|
|
899
961
|
}
|
|
900
962
|
},
|
|
901
963
|
children: [
|
|
902
|
-
/* @__PURE__ */ e(
|
|
903
|
-
/* @__PURE__ */ e(
|
|
964
|
+
/* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: n.status_info_title }),
|
|
965
|
+
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: n.status_info_description })
|
|
904
966
|
]
|
|
905
967
|
}
|
|
906
968
|
) })
|
|
907
969
|
] });
|
|
908
|
-
},
|
|
909
|
-
const { debts: a } = C(), { showError: o, showCompleted: n } = R(), [r, t] =
|
|
970
|
+
}, gt = S(xt), wt = () => {
|
|
971
|
+
const { debts: a } = C(), { showError: o, showCompleted: n } = R(), [r, t] = x.useState(0);
|
|
910
972
|
return /* @__PURE__ */ s(L, { children: [
|
|
911
|
-
(o || n) && /* @__PURE__ */ e(
|
|
973
|
+
(o || n) && /* @__PURE__ */ e(gt, { setTabValue: t, sx: { mt: -24 } }),
|
|
912
974
|
/* @__PURE__ */ s(
|
|
913
|
-
|
|
975
|
+
We,
|
|
914
976
|
{
|
|
915
977
|
"aria-label": a.details_tabs_aria_label,
|
|
916
978
|
centered: !0,
|
|
917
|
-
onChange: (
|
|
979
|
+
onChange: (i, c) => t(c),
|
|
918
980
|
textColor: "primary",
|
|
919
981
|
value: r,
|
|
920
982
|
variant: "fullWidth",
|
|
921
983
|
children: [
|
|
922
984
|
/* @__PURE__ */ e(
|
|
923
|
-
|
|
985
|
+
de,
|
|
924
986
|
{
|
|
925
987
|
"aria-controls": "debt-schedule-tabpanel-0",
|
|
926
988
|
id: "debt-schedule-tab-0",
|
|
@@ -928,7 +990,7 @@ const ye = ({
|
|
|
928
990
|
}
|
|
929
991
|
),
|
|
930
992
|
/* @__PURE__ */ e(
|
|
931
|
-
|
|
993
|
+
de,
|
|
932
994
|
{
|
|
933
995
|
"aria-controls": "debt-details-tabpanel-1",
|
|
934
996
|
id: "debt-details-tab-1",
|
|
@@ -938,11 +1000,11 @@ const ye = ({
|
|
|
938
1000
|
]
|
|
939
1001
|
}
|
|
940
1002
|
),
|
|
941
|
-
/* @__PURE__ */ e(
|
|
942
|
-
/* @__PURE__ */ e(
|
|
1003
|
+
/* @__PURE__ */ e(ue, { index: 0, name: "debt-schedule", value: r, children: /* @__PURE__ */ e(ht, {}) }),
|
|
1004
|
+
/* @__PURE__ */ e(ue, { index: 1, name: "debt-details", value: r, children: /* @__PURE__ */ e(ft, {}) })
|
|
943
1005
|
] });
|
|
944
|
-
},
|
|
945
|
-
const { debts: r } = C(), { showError: t, showCompleted:
|
|
1006
|
+
}, Ct = S(wt), St = ({ isOpen: a, onClose: o, sx: n }) => {
|
|
1007
|
+
const { debts: r } = C(), { showError: t, showCompleted: i } = R(), c = t || i ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(pt, {});
|
|
946
1008
|
return /* @__PURE__ */ e(
|
|
947
1009
|
te,
|
|
948
1010
|
{
|
|
@@ -951,67 +1013,67 @@ const ye = ({
|
|
|
951
1013
|
onClose: o,
|
|
952
1014
|
sx: { ...n },
|
|
953
1015
|
title: r.details_title,
|
|
954
|
-
children: /* @__PURE__ */ s(
|
|
955
|
-
/* @__PURE__ */ e(
|
|
956
|
-
/* @__PURE__ */ e(
|
|
1016
|
+
children: /* @__PURE__ */ s(g, { bgcolor: "background.default", children: [
|
|
1017
|
+
/* @__PURE__ */ e(ke, { customDetailsChart: c }),
|
|
1018
|
+
/* @__PURE__ */ e(Ct, {})
|
|
957
1019
|
] })
|
|
958
1020
|
}
|
|
959
1021
|
);
|
|
960
|
-
},
|
|
961
|
-
const { debts: a } = C(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: n } = z(), { onEvent: r } =
|
|
962
|
-
o && (await n({ ...o, extra_payment: t }), o.extra_payment = t, r(
|
|
1022
|
+
}, Dt = S(() => {
|
|
1023
|
+
const { debts: a } = C(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: n } = z(), { onEvent: r } = k(), [t, i] = x.useState(o?.extra_payment ?? 0), c = t < 0 || t > 9999999999e-2, p = async () => {
|
|
1024
|
+
o && (await n({ ...o, extra_payment: t }), o.extra_payment = t, r(T.DEBTS_SAVE_PAYDOWN_ACTION, {
|
|
963
1025
|
user_guid: o?.user_guid
|
|
964
1026
|
}));
|
|
965
|
-
},
|
|
1027
|
+
}, d = () => {
|
|
966
1028
|
setTimeout(() => {
|
|
967
|
-
|
|
1029
|
+
i(o?.extra_payment ?? 0);
|
|
968
1030
|
}, 250);
|
|
969
1031
|
};
|
|
970
1032
|
return /* @__PURE__ */ e(
|
|
971
1033
|
J,
|
|
972
1034
|
{
|
|
973
|
-
isSaveDisabled:
|
|
1035
|
+
isSaveDisabled: c,
|
|
974
1036
|
label: a.paydown_drawer_extra_payment,
|
|
975
|
-
onCancel:
|
|
976
|
-
onSave:
|
|
1037
|
+
onCancel: d,
|
|
1038
|
+
onSave: p,
|
|
977
1039
|
primaryText: a.paydown_drawer_extra_payment,
|
|
978
|
-
secondaryText:
|
|
1040
|
+
secondaryText: P(o?.extra_payment, "0,0"),
|
|
979
1041
|
zeroStateText: o?.extra_payment ? void 0 : a.add_extra_payment,
|
|
980
1042
|
children: /* @__PURE__ */ e(
|
|
981
1043
|
ae,
|
|
982
1044
|
{
|
|
983
1045
|
amount: t,
|
|
984
1046
|
autoFocus: !0,
|
|
985
|
-
error:
|
|
1047
|
+
error: c,
|
|
986
1048
|
fullWidth: !0,
|
|
987
1049
|
minAmount: 0,
|
|
988
|
-
setAmount: (h) =>
|
|
1050
|
+
setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
|
|
989
1051
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
990
1052
|
}
|
|
991
1053
|
)
|
|
992
1054
|
}
|
|
993
1055
|
);
|
|
994
|
-
}),
|
|
1056
|
+
}), vt = () => {
|
|
995
1057
|
const { debts: a } = C(), { totalMonthlyPayments: o } = q(), { monthlyCashFlowProfile: n } = z(), r = o + Number(n?.extra_payment);
|
|
996
|
-
return /* @__PURE__ */ s(
|
|
997
|
-
/* @__PURE__ */ s(
|
|
998
|
-
/* @__PURE__ */ s(
|
|
999
|
-
/* @__PURE__ */ e(
|
|
1000
|
-
/* @__PURE__ */ e(
|
|
1001
|
-
/* @__PURE__ */ e(
|
|
1058
|
+
return /* @__PURE__ */ s(g, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
1059
|
+
/* @__PURE__ */ s(g, { p: 24, children: [
|
|
1060
|
+
/* @__PURE__ */ s(g, { alignItems: "center", gap: 4, mb: 24, children: [
|
|
1061
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
|
|
1062
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "H1", children: P(o, "0,0") }),
|
|
1063
|
+
/* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
|
|
1002
1064
|
] }),
|
|
1003
|
-
/* @__PURE__ */ s(
|
|
1004
|
-
/* @__PURE__ */ e(
|
|
1005
|
-
/* @__PURE__ */ e(
|
|
1065
|
+
/* @__PURE__ */ s(g, { children: [
|
|
1066
|
+
/* @__PURE__ */ e(l, { variant: "H3", children: a.paydown_drawer_subtitle }),
|
|
1067
|
+
/* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
|
|
1006
1068
|
] })
|
|
1007
1069
|
] }),
|
|
1008
|
-
/* @__PURE__ */ e(
|
|
1009
|
-
/* @__PURE__ */ e(
|
|
1010
|
-
/* @__PURE__ */ e(
|
|
1011
|
-
/* @__PURE__ */ e(
|
|
1070
|
+
/* @__PURE__ */ e(g, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Dt, {}) }),
|
|
1071
|
+
/* @__PURE__ */ e(g, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(g, { gap: 4, children: [
|
|
1072
|
+
/* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
|
|
1073
|
+
/* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: P(r, "0,0") })
|
|
1012
1074
|
] }) })
|
|
1013
1075
|
] });
|
|
1014
|
-
},
|
|
1076
|
+
}, Tt = S(vt), At = ({ isOpen: a, onClose: o, sx: n }) => {
|
|
1015
1077
|
const { debts: r } = C();
|
|
1016
1078
|
return /* @__PURE__ */ e(
|
|
1017
1079
|
te,
|
|
@@ -1021,11 +1083,11 @@ const ye = ({
|
|
|
1021
1083
|
onClose: o,
|
|
1022
1084
|
sx: { ...n },
|
|
1023
1085
|
title: r.paydown_drawer_title,
|
|
1024
|
-
children: /* @__PURE__ */ e(
|
|
1086
|
+
children: /* @__PURE__ */ e(Tt, {})
|
|
1025
1087
|
}
|
|
1026
1088
|
);
|
|
1027
1089
|
};
|
|
1028
|
-
function
|
|
1090
|
+
function Et(a, o) {
|
|
1029
1091
|
const n = (r) => {
|
|
1030
1092
|
if (typeof r == "number") return r;
|
|
1031
1093
|
if (r === "!" || r === "✓") return 1 / 0;
|
|
@@ -1033,17 +1095,17 @@ function gt(a, o) {
|
|
|
1033
1095
|
};
|
|
1034
1096
|
return n(a) - n(o);
|
|
1035
1097
|
}
|
|
1036
|
-
function
|
|
1098
|
+
function It(a) {
|
|
1037
1099
|
return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
|
|
1038
1100
|
}
|
|
1039
|
-
const
|
|
1101
|
+
const Bt = (a) => {
|
|
1040
1102
|
const o = {
|
|
1041
1103
|
text: "#121417",
|
|
1042
1104
|
background: "#FFB252"
|
|
1043
1105
|
};
|
|
1044
1106
|
return a === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), a === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
|
|
1045
|
-
},
|
|
1046
|
-
const o = String(a.formattedValue), n =
|
|
1107
|
+
}, Mt = (a) => {
|
|
1108
|
+
const o = String(a.formattedValue), n = Bt(o);
|
|
1047
1109
|
return /* @__PURE__ */ e(
|
|
1048
1110
|
re,
|
|
1049
1111
|
{
|
|
@@ -1058,80 +1120,80 @@ const wt = (a) => {
|
|
|
1058
1120
|
backgroundColor: n.background,
|
|
1059
1121
|
marginLeft: "10px"
|
|
1060
1122
|
},
|
|
1061
|
-
children: /* @__PURE__ */ e(
|
|
1123
|
+
children: /* @__PURE__ */ e(l, { color: n.text, fontWeight: 700, variant: "Small", children: o })
|
|
1062
1124
|
}
|
|
1063
1125
|
);
|
|
1064
|
-
},
|
|
1065
|
-
const o = a.row.account, n =
|
|
1066
|
-
return /* @__PURE__ */ s(
|
|
1126
|
+
}, Pt = (a) => {
|
|
1127
|
+
const o = a.row.account, n = Ke[o.account_type];
|
|
1128
|
+
return /* @__PURE__ */ s(g, { alignItems: "center", flexDirection: "row", children: [
|
|
1067
1129
|
/* @__PURE__ */ e(
|
|
1068
|
-
|
|
1130
|
+
ve,
|
|
1069
1131
|
{
|
|
1070
1132
|
alt: `${o.institutionName}`,
|
|
1071
1133
|
institutionGuid: o.institution_guid || ""
|
|
1072
1134
|
}
|
|
1073
1135
|
),
|
|
1074
|
-
/* @__PURE__ */ s(
|
|
1075
|
-
/* @__PURE__ */ e(
|
|
1076
|
-
/* @__PURE__ */ e(
|
|
1136
|
+
/* @__PURE__ */ s(g, { ml: 12, children: [
|
|
1137
|
+
/* @__PURE__ */ e(l, { variant: "Small", children: o.name }),
|
|
1138
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: n })
|
|
1077
1139
|
] })
|
|
1078
1140
|
] });
|
|
1079
|
-
},
|
|
1141
|
+
}, kt = ({
|
|
1080
1142
|
sx: a = {},
|
|
1081
1143
|
debts: o,
|
|
1082
1144
|
hoveredDebtGuid: n,
|
|
1083
1145
|
onHoverRow: r,
|
|
1084
1146
|
onClickRow: t
|
|
1085
1147
|
}) => {
|
|
1086
|
-
const
|
|
1148
|
+
const i = j(), { onEvent: c } = k(), { isMobile: p } = X(), { debts: d } = C(), [h, m] = x.useState([
|
|
1087
1149
|
{ field: "priority", sort: "asc" }
|
|
1088
|
-
]),
|
|
1150
|
+
]), y = [
|
|
1089
1151
|
{
|
|
1090
1152
|
field: "priority",
|
|
1091
|
-
headerName:
|
|
1153
|
+
headerName: d.table_column_priority,
|
|
1092
1154
|
renderHeader: G,
|
|
1093
|
-
renderCell:
|
|
1094
|
-
sortComparator:
|
|
1155
|
+
renderCell: Mt,
|
|
1156
|
+
sortComparator: Et,
|
|
1095
1157
|
sortable: !0,
|
|
1096
1158
|
hideSortIcons: !0,
|
|
1097
1159
|
type: "custom",
|
|
1098
1160
|
align: "left",
|
|
1099
1161
|
headerAlign: "left",
|
|
1100
|
-
minWidth:
|
|
1101
|
-
flex:
|
|
1162
|
+
minWidth: p ? 67 : 72,
|
|
1163
|
+
flex: p ? 0.2 : 0.4
|
|
1102
1164
|
},
|
|
1103
1165
|
{
|
|
1104
1166
|
field: "account",
|
|
1105
|
-
headerName:
|
|
1167
|
+
headerName: d.table_column_account,
|
|
1106
1168
|
renderHeader: G,
|
|
1107
|
-
renderCell:
|
|
1169
|
+
renderCell: Pt,
|
|
1108
1170
|
sortable: !1,
|
|
1109
1171
|
type: "custom",
|
|
1110
1172
|
align: "left",
|
|
1111
1173
|
headerAlign: "left",
|
|
1112
|
-
minWidth:
|
|
1174
|
+
minWidth: p ? 180 : 225,
|
|
1113
1175
|
flex: 1
|
|
1114
1176
|
},
|
|
1115
1177
|
{
|
|
1116
1178
|
field: "balance",
|
|
1117
|
-
headerName:
|
|
1179
|
+
headerName: d.table_column_balance,
|
|
1118
1180
|
renderHeader: G,
|
|
1119
|
-
valueFormatter: (u) =>
|
|
1181
|
+
valueFormatter: (u) => P(u, "0,0"),
|
|
1120
1182
|
sortable: !0,
|
|
1121
|
-
hideSortIcons:
|
|
1183
|
+
hideSortIcons: p,
|
|
1122
1184
|
type: "number",
|
|
1123
|
-
align:
|
|
1124
|
-
headerAlign:
|
|
1125
|
-
minWidth:
|
|
1126
|
-
flex:
|
|
1185
|
+
align: p ? "right" : "left",
|
|
1186
|
+
headerAlign: p ? "right" : "left",
|
|
1187
|
+
minWidth: p ? 70 : 122,
|
|
1188
|
+
flex: p ? 0.4 : 0.6
|
|
1127
1189
|
},
|
|
1128
1190
|
{
|
|
1129
1191
|
field: "interest_rate",
|
|
1130
|
-
headerName:
|
|
1192
|
+
headerName: d.table_column_interest_rate,
|
|
1131
1193
|
renderHeader: G,
|
|
1132
1194
|
valueFormatter: (u) => isNaN(u) ? "---" : `${Number(u).toFixed(2)}%`,
|
|
1133
1195
|
sortable: !0,
|
|
1134
|
-
hideSortIcons:
|
|
1196
|
+
hideSortIcons: p,
|
|
1135
1197
|
type: "number",
|
|
1136
1198
|
align: "left",
|
|
1137
1199
|
headerAlign: "left",
|
|
@@ -1140,11 +1202,11 @@ const wt = (a) => {
|
|
|
1140
1202
|
},
|
|
1141
1203
|
{
|
|
1142
1204
|
field: "projected_payoff_date",
|
|
1143
|
-
headerName:
|
|
1205
|
+
headerName: d.table_column_payoff_date,
|
|
1144
1206
|
renderHeader: G,
|
|
1145
1207
|
valueFormatter: (u) => u ? K(u, U.MONTH_SHORT_YEAR) : "---",
|
|
1146
1208
|
sortable: !0,
|
|
1147
|
-
hideSortIcons:
|
|
1209
|
+
hideSortIcons: p,
|
|
1148
1210
|
type: "number",
|
|
1149
1211
|
align: "left",
|
|
1150
1212
|
headerAlign: "left",
|
|
@@ -1153,19 +1215,19 @@ const wt = (a) => {
|
|
|
1153
1215
|
},
|
|
1154
1216
|
{
|
|
1155
1217
|
field: "monthly_payment",
|
|
1156
|
-
headerName:
|
|
1218
|
+
headerName: d.table_column_amount_due,
|
|
1157
1219
|
renderHeader: G,
|
|
1158
|
-
valueFormatter: (u) => typeof u == "number" ?
|
|
1220
|
+
valueFormatter: (u) => typeof u == "number" ? P(u, "0,0") : "---",
|
|
1159
1221
|
sortable: !0,
|
|
1160
|
-
hideSortIcons:
|
|
1222
|
+
hideSortIcons: p,
|
|
1161
1223
|
type: "number",
|
|
1162
1224
|
align: "left",
|
|
1163
1225
|
headerAlign: "left",
|
|
1164
1226
|
minWidth: 122,
|
|
1165
1227
|
flex: 0.6
|
|
1166
1228
|
}
|
|
1167
|
-
],
|
|
1168
|
-
...
|
|
1229
|
+
], f = [
|
|
1230
|
+
...y.slice(0, 3),
|
|
1169
1231
|
{
|
|
1170
1232
|
field: "chevron",
|
|
1171
1233
|
headerName: "",
|
|
@@ -1178,14 +1240,14 @@ const wt = (a) => {
|
|
|
1178
1240
|
headerAlign: "right",
|
|
1179
1241
|
width: 20
|
|
1180
1242
|
}
|
|
1181
|
-
],
|
|
1243
|
+
], D = x.useMemo(() => o.map((u, I) => ({
|
|
1182
1244
|
...u,
|
|
1183
|
-
id:
|
|
1184
|
-
priority:
|
|
1185
|
-
})), [o]),
|
|
1245
|
+
id: I,
|
|
1246
|
+
priority: It(u)
|
|
1247
|
+
})), [o]), E = (u) => {
|
|
1186
1248
|
const Y = u.target.closest("[data-id]")?.getAttribute("data-id"), b = o[Number(Y)];
|
|
1187
1249
|
r?.(b?.guid ?? "");
|
|
1188
|
-
},
|
|
1250
|
+
}, v = (u) => D.find((I) => I.guid === u)?.id;
|
|
1189
1251
|
return /* @__PURE__ */ e(
|
|
1190
1252
|
re,
|
|
1191
1253
|
{
|
|
@@ -1198,32 +1260,32 @@ const wt = (a) => {
|
|
|
1198
1260
|
...a
|
|
1199
1261
|
},
|
|
1200
1262
|
children: /* @__PURE__ */ e(
|
|
1201
|
-
|
|
1263
|
+
Ye,
|
|
1202
1264
|
{
|
|
1203
|
-
columns:
|
|
1265
|
+
columns: p ? f : y,
|
|
1204
1266
|
disableColumnFilter: !0,
|
|
1205
1267
|
disableColumnMenu: !0,
|
|
1206
1268
|
hideFooter: !0,
|
|
1207
1269
|
initialState: { sorting: { sortModel: h } },
|
|
1208
1270
|
onRowClick: (u) => {
|
|
1209
|
-
t(),
|
|
1271
|
+
t(), c(T.DEBTS_CLICK_TABLE_ROW, { account_guid: u.row.guid });
|
|
1210
1272
|
},
|
|
1211
1273
|
onSortModelChange: (u) => {
|
|
1212
|
-
|
|
1274
|
+
m(u), c(T.DEBTS_CLICK_TABLE_SORT);
|
|
1213
1275
|
},
|
|
1214
|
-
rows:
|
|
1276
|
+
rows: D,
|
|
1215
1277
|
slotProps: {
|
|
1216
1278
|
baseIconButton: { color: "secondary", sx: { ml: 8 } },
|
|
1217
1279
|
row: {
|
|
1218
|
-
onMouseEnter:
|
|
1280
|
+
onMouseEnter: E,
|
|
1219
1281
|
onMouseLeave: () => r?.("")
|
|
1220
1282
|
}
|
|
1221
1283
|
},
|
|
1222
1284
|
sortModel: h,
|
|
1223
1285
|
sortingOrder: ["asc", "desc"],
|
|
1224
1286
|
sx: {
|
|
1225
|
-
[`& .MuiDataGrid-row[data-id="${
|
|
1226
|
-
backgroundColor:
|
|
1287
|
+
[`& .MuiDataGrid-row[data-id="${v(n)}"]`]: {
|
|
1288
|
+
backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
|
|
1227
1289
|
filter: "brightness(98%)"
|
|
1228
1290
|
}
|
|
1229
1291
|
}
|
|
@@ -1231,50 +1293,54 @@ const wt = (a) => {
|
|
|
1231
1293
|
)
|
|
1232
1294
|
}
|
|
1233
1295
|
);
|
|
1234
|
-
},
|
|
1235
|
-
const { isDesktop: r, isTablet: t } = X(),
|
|
1296
|
+
}, Ft = ({ buttonText: a, isOpen: o, onClick: n }) => {
|
|
1297
|
+
const { isDesktop: r, isTablet: t } = X(), i = o ? "unfold_less" : "unfold_more";
|
|
1236
1298
|
return r || t ? /* @__PURE__ */ e(
|
|
1237
|
-
|
|
1299
|
+
fe,
|
|
1238
1300
|
{
|
|
1239
1301
|
"aria-controls": "prioritize-debts",
|
|
1240
1302
|
"aria-describedby": "prioritize-debts",
|
|
1241
1303
|
"aria-haspopup": !0,
|
|
1242
1304
|
"aria-label": "prioritize-debts",
|
|
1243
1305
|
onClick: n,
|
|
1244
|
-
startIcon: /* @__PURE__ */ e(ee, { name:
|
|
1306
|
+
startIcon: /* @__PURE__ */ e(ee, { name: i }),
|
|
1245
1307
|
sx: { justifyContent: "start", minWidth: 214, mx: 4 },
|
|
1246
1308
|
children: a
|
|
1247
1309
|
}
|
|
1248
1310
|
) : /* @__PURE__ */ e(
|
|
1249
|
-
|
|
1311
|
+
Ue,
|
|
1250
1312
|
{
|
|
1251
1313
|
"aria-controls": "prioritize-debts",
|
|
1252
1314
|
"aria-describedby": "prioritize-debts",
|
|
1253
1315
|
"aria-haspopup": !0,
|
|
1254
1316
|
"aria-label": "prioritize-debts",
|
|
1255
1317
|
onClick: n,
|
|
1256
|
-
children: /* @__PURE__ */ e(ee, { name:
|
|
1318
|
+
children: /* @__PURE__ */ e(ee, { name: i })
|
|
1257
1319
|
}
|
|
1258
1320
|
);
|
|
1259
|
-
},
|
|
1260
|
-
const { onEvent: n } =
|
|
1321
|
+
}, Nt = S(({ buttonEl: a, onClose: o }) => {
|
|
1322
|
+
const { onEvent: n } = k(), { debts: r } = C(), { selectedDebtPriority: t, setSelectedDebtPriority: i } = R(), c = !!a, p = [
|
|
1323
|
+
{
|
|
1324
|
+
priority: M.FASTEST_PAYOFF_FIRST,
|
|
1325
|
+
text: r.priority_sort_fastest_payoff
|
|
1326
|
+
},
|
|
1261
1327
|
{
|
|
1262
|
-
priority:
|
|
1328
|
+
priority: M.HIGHEST_INTEREST,
|
|
1263
1329
|
text: r.priority_sort_highest_interest
|
|
1264
1330
|
},
|
|
1265
1331
|
{
|
|
1266
|
-
priority:
|
|
1332
|
+
priority: M.LOWEST_BALANCE,
|
|
1267
1333
|
text: r.priority_sort_lowest_balance
|
|
1268
1334
|
},
|
|
1269
1335
|
{
|
|
1270
|
-
priority:
|
|
1336
|
+
priority: M.HIGHEST_BALANCE,
|
|
1271
1337
|
text: r.priority_sort_highest_balance
|
|
1272
1338
|
}
|
|
1273
|
-
],
|
|
1274
|
-
|
|
1339
|
+
], d = (h) => {
|
|
1340
|
+
i(h), n(T.DEBTS_CLICK_PRIORITY, { debts_priority: h });
|
|
1275
1341
|
};
|
|
1276
1342
|
return /* @__PURE__ */ e(
|
|
1277
|
-
|
|
1343
|
+
Ze,
|
|
1278
1344
|
{
|
|
1279
1345
|
anchorEl: a,
|
|
1280
1346
|
anchorOrigin: {
|
|
@@ -1283,15 +1349,15 @@ const wt = (a) => {
|
|
|
1283
1349
|
},
|
|
1284
1350
|
id: "prioritize-debts",
|
|
1285
1351
|
onClose: o,
|
|
1286
|
-
open:
|
|
1352
|
+
open: c,
|
|
1287
1353
|
transformOrigin: {
|
|
1288
1354
|
vertical: "top",
|
|
1289
1355
|
horizontal: "left"
|
|
1290
1356
|
},
|
|
1291
|
-
children: /* @__PURE__ */ e(
|
|
1292
|
-
|
|
1357
|
+
children: /* @__PURE__ */ e(_e, { children: p.map(({ priority: h, text: m }) => /* @__PURE__ */ s(
|
|
1358
|
+
qe,
|
|
1293
1359
|
{
|
|
1294
|
-
onClick: () =>
|
|
1360
|
+
onClick: () => d(h),
|
|
1295
1361
|
sx: {
|
|
1296
1362
|
bgcolor: t === h ? "primary.main" : void 0,
|
|
1297
1363
|
color: t === h ? "#fff" : void 0,
|
|
@@ -1307,69 +1373,70 @@ const wt = (a) => {
|
|
|
1307
1373
|
}
|
|
1308
1374
|
},
|
|
1309
1375
|
children: [
|
|
1310
|
-
/* @__PURE__ */ e(
|
|
1311
|
-
t === h && /* @__PURE__ */ e(
|
|
1376
|
+
/* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: m }),
|
|
1377
|
+
t === h && /* @__PURE__ */ e(ye, { color: "inherit", filled: !0, fontSize: "small" })
|
|
1312
1378
|
]
|
|
1313
1379
|
},
|
|
1314
1380
|
h
|
|
1315
1381
|
)) })
|
|
1316
1382
|
}
|
|
1317
1383
|
);
|
|
1318
|
-
}),
|
|
1319
|
-
const { onEvent: a } =
|
|
1320
|
-
t(h.currentTarget), a(
|
|
1321
|
-
},
|
|
1384
|
+
}), Rt = S(() => {
|
|
1385
|
+
const { onEvent: a } = k(), { debts: o } = C(), { selectedDebtPriority: n } = R(), [r, t] = x.useState(null), i = (h) => {
|
|
1386
|
+
t(h.currentTarget), a(T.DEBTS_CLICK_PRIORITIZE);
|
|
1387
|
+
}, c = () => {
|
|
1322
1388
|
t(null);
|
|
1323
|
-
},
|
|
1324
|
-
[
|
|
1325
|
-
[
|
|
1326
|
-
[
|
|
1389
|
+
}, p = !!r, d = x.useMemo(() => ({
|
|
1390
|
+
[M.FASTEST_PAYOFF_FIRST]: o.priority_sort_fastest_payoff,
|
|
1391
|
+
[M.HIGHEST_INTEREST]: o.priority_sort_highest_interest,
|
|
1392
|
+
[M.HIGHEST_BALANCE]: o.priority_sort_highest_balance,
|
|
1393
|
+
[M.LOWEST_BALANCE]: o.priority_sort_lowest_balance
|
|
1327
1394
|
})[n] ?? o.priority_sort_lowest_balance, [n]);
|
|
1328
1395
|
return /* @__PURE__ */ s(_, { children: [
|
|
1329
|
-
/* @__PURE__ */ e(
|
|
1330
|
-
/* @__PURE__ */ e(
|
|
1396
|
+
/* @__PURE__ */ e(Ft, { buttonText: d, isOpen: p, onClick: i }),
|
|
1397
|
+
/* @__PURE__ */ e(Nt, { buttonEl: r, onClose: c })
|
|
1331
1398
|
] });
|
|
1332
|
-
}),
|
|
1333
|
-
const r = a.map((
|
|
1334
|
-
|
|
1335
|
-
const t = /* @__PURE__ */ new Date(),
|
|
1336
|
-
let
|
|
1337
|
-
for (const
|
|
1338
|
-
|
|
1339
|
-
...
|
|
1399
|
+
}), Lt = (a, o, n = 0) => {
|
|
1400
|
+
const r = a.map((d) => ({ ...d }));
|
|
1401
|
+
xe(r, o);
|
|
1402
|
+
const t = /* @__PURE__ */ new Date(), i = [];
|
|
1403
|
+
let c = 0, p = 1;
|
|
1404
|
+
for (const d of r)
|
|
1405
|
+
i.push({
|
|
1406
|
+
...d,
|
|
1340
1407
|
// Start with the initial balance
|
|
1341
|
-
dataset: [{ x: new Date(t), y:
|
|
1408
|
+
dataset: [{ x: new Date(t), y: d.balance }]
|
|
1342
1409
|
});
|
|
1343
|
-
for (; r.some((
|
|
1344
|
-
let
|
|
1345
|
-
for (const [h,
|
|
1346
|
-
if (
|
|
1347
|
-
const
|
|
1348
|
-
let
|
|
1349
|
-
h === 0 && (
|
|
1350
|
-
const u = Math.min(
|
|
1351
|
-
if (u <=
|
|
1352
|
-
|
|
1410
|
+
for (; r.some((d) => d.balance >= 0.01 && !d.is_impossible); ) {
|
|
1411
|
+
let d = !1;
|
|
1412
|
+
for (const [h, m] of r.entries()) {
|
|
1413
|
+
if (m.balance <= 0.01) continue;
|
|
1414
|
+
const y = i[h].dataset, D = (m.interest_rate ?? 0) / 100 / 12, E = m.balance * D;
|
|
1415
|
+
let v = m.monthly_payment ?? 0;
|
|
1416
|
+
h === 0 && (v += n), m.balance += E;
|
|
1417
|
+
const u = Math.min(m.balance, v + c);
|
|
1418
|
+
if (u <= E) {
|
|
1419
|
+
m.is_impossible = !0, i[h].is_impossible = !0, i[h].priority = void 0, y.push({ x: new Date(t), y: m.balance });
|
|
1353
1420
|
continue;
|
|
1354
1421
|
}
|
|
1355
|
-
|
|
1422
|
+
m.balance -= u, m.balance = m.balance < 0.01 ? 0 : m.balance, y.push({
|
|
1356
1423
|
x: new Date(t),
|
|
1357
|
-
y: Math.max(0,
|
|
1424
|
+
y: Math.max(0, m.balance),
|
|
1358
1425
|
payment: u,
|
|
1359
|
-
extra:
|
|
1360
|
-
}),
|
|
1426
|
+
extra: c
|
|
1427
|
+
}), m.balance <= 0 && (c += v, i[h].projected_payoff_date = new Date(t)), u > 0 && (d = !0);
|
|
1361
1428
|
}
|
|
1362
|
-
|
|
1429
|
+
d && t.setMonth(t.getMonth() + 1);
|
|
1363
1430
|
}
|
|
1364
|
-
return
|
|
1365
|
-
(
|
|
1366
|
-
}),
|
|
1367
|
-
|
|
1368
|
-
}),
|
|
1369
|
-
},
|
|
1370
|
-
const { debts: o } = C(), { isDesktop: n } = X(), { totalMonthlyPayments: r } = q(), { monthlyCashFlowProfile: t } = z(),
|
|
1431
|
+
return i.forEach((d) => {
|
|
1432
|
+
(d.interest_rate === void 0 || d.interest_rate === void 0) && (d.projected_payoff_date = void 0);
|
|
1433
|
+
}), i.forEach((d) => {
|
|
1434
|
+
d.priority = !d.is_paid_off && !d.is_impossible ? p++ : void 0;
|
|
1435
|
+
}), i;
|
|
1436
|
+
}, $t = S(({ onClick: a }) => {
|
|
1437
|
+
const { debts: o } = C(), { isDesktop: n } = X(), { totalMonthlyPayments: r } = q(), { monthlyCashFlowProfile: t } = z(), i = r + Number(t?.extra_payment), c = n ? o.paydown_button_long : o.paydown_button_short;
|
|
1371
1438
|
return /* @__PURE__ */ e(
|
|
1372
|
-
|
|
1439
|
+
fe,
|
|
1373
1440
|
{
|
|
1374
1441
|
"aria-controls": "extra-paydown",
|
|
1375
1442
|
"aria-describedby": "extra-paydown",
|
|
@@ -1377,100 +1444,100 @@ const wt = (a) => {
|
|
|
1377
1444
|
"aria-label": "extra-paydown",
|
|
1378
1445
|
onClick: a,
|
|
1379
1446
|
sx: { justifyContent: "start", minWidth: 100, mx: 4 },
|
|
1380
|
-
children:
|
|
1447
|
+
children: A(c, P(i, "0,0"))
|
|
1381
1448
|
}
|
|
1382
1449
|
);
|
|
1383
|
-
}),
|
|
1384
|
-
const [n, r] =
|
|
1385
|
-
const
|
|
1386
|
-
return
|
|
1387
|
-
}, [N, V,
|
|
1388
|
-
|
|
1389
|
-
u(b),
|
|
1390
|
-
}, []),
|
|
1450
|
+
}), Ht = ({ onBackClick: a, sx: o }) => {
|
|
1451
|
+
const [n, r] = x.useState(!1), [t, i] = x.useState(!1), [c, p] = x.useState(!1), [d, h] = x.useState(""), { isDesktop: m, isMobile: y } = X(), { debts: f } = C(), { onEvent: D } = k(), { isCopyLoaded: E, isInitialized: v, setSelectedAccounts: u } = Pe(), { setSelectedAccount: I } = Fe(), { selectedDebtPriority: V, setSelectedDebtChartData: Y } = R(), { visibleDebtAccounts: b } = Z(), { goalsLoaded: w, loadGoals: B, monthlyCashFlowProfile: F } = z(), { debts: N } = q(), $ = x.useMemo(() => {
|
|
1452
|
+
const H = F?.extra_payment ?? 0;
|
|
1453
|
+
return Lt(N, V, H);
|
|
1454
|
+
}, [N, V, F]);
|
|
1455
|
+
x.useEffect(() => {
|
|
1456
|
+
u(b), D(T.DEBTS_VIEW);
|
|
1457
|
+
}, []), x.useEffect(() => {
|
|
1391
1458
|
u(b);
|
|
1392
|
-
}, [b]),
|
|
1393
|
-
|
|
1394
|
-
}, [
|
|
1395
|
-
const oe = (
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
},
|
|
1399
|
-
|
|
1400
|
-
},
|
|
1401
|
-
|
|
1459
|
+
}, [b]), x.useEffect(() => {
|
|
1460
|
+
v && B().finally();
|
|
1461
|
+
}, [v]);
|
|
1462
|
+
const oe = (H) => h(H), ne = () => {
|
|
1463
|
+
const H = b.find((Q) => Q.guid === d), ie = $.find((Q) => Q.guid === d);
|
|
1464
|
+
H && I(H), ie && Y(ie), r(!0);
|
|
1465
|
+
}, we = () => D(T.DEBTS_CLICK_FILTER), Ce = () => {
|
|
1466
|
+
p(!0), D(T.DEBTS_CLICK_SNOWBALL_CTA);
|
|
1467
|
+
}, Se = () => {
|
|
1468
|
+
i(!0), D(T.DEBTS_CLICK_PAYDOWN);
|
|
1402
1469
|
};
|
|
1403
|
-
return !w || !
|
|
1404
|
-
|
|
1470
|
+
return !w || !E || !v ? /* @__PURE__ */ e(Je, {}) : /* @__PURE__ */ s(
|
|
1471
|
+
Oe,
|
|
1405
1472
|
{
|
|
1406
1473
|
accountOptions: b,
|
|
1407
1474
|
actions: [
|
|
1408
|
-
/* @__PURE__ */ e(
|
|
1409
|
-
/* @__PURE__ */ e(
|
|
1475
|
+
/* @__PURE__ */ e(Rt, {}, "prioritize-debts"),
|
|
1476
|
+
/* @__PURE__ */ e($t, { onClick: Se }, "extra-paydown")
|
|
1410
1477
|
],
|
|
1411
|
-
onAccountsFilterClick:
|
|
1478
|
+
onAccountsFilterClick: we,
|
|
1412
1479
|
onBackClick: a,
|
|
1413
1480
|
sx: o,
|
|
1414
|
-
title:
|
|
1481
|
+
title: f.title,
|
|
1415
1482
|
children: [
|
|
1416
|
-
/* @__PURE__ */ s(
|
|
1483
|
+
/* @__PURE__ */ s(g, { sx: { px: m ? "48px" : "24px" }, children: [
|
|
1417
1484
|
/* @__PURE__ */ s(
|
|
1418
|
-
|
|
1485
|
+
g,
|
|
1419
1486
|
{
|
|
1420
1487
|
sx: {
|
|
1421
|
-
alignItems:
|
|
1422
|
-
flexDirection:
|
|
1423
|
-
mx:
|
|
1488
|
+
alignItems: y ? "flex-start" : "flex-end",
|
|
1489
|
+
flexDirection: y ? "column" : "row",
|
|
1490
|
+
mx: y ? "-12px" : 0
|
|
1424
1491
|
},
|
|
1425
1492
|
children: [
|
|
1426
1493
|
/* @__PURE__ */ e(
|
|
1427
|
-
|
|
1494
|
+
ge,
|
|
1428
1495
|
{
|
|
1429
|
-
debts:
|
|
1430
|
-
height:
|
|
1431
|
-
hoveredDebtGuid:
|
|
1496
|
+
debts: $,
|
|
1497
|
+
height: y ? 250 : void 0,
|
|
1498
|
+
hoveredDebtGuid: d,
|
|
1432
1499
|
onClickArea: ne,
|
|
1433
1500
|
onHoverArea: oe,
|
|
1434
|
-
sx: { mr:
|
|
1501
|
+
sx: { mr: y ? "4px" : "-48px" }
|
|
1435
1502
|
}
|
|
1436
1503
|
),
|
|
1437
1504
|
/* @__PURE__ */ e(
|
|
1438
|
-
|
|
1505
|
+
nt,
|
|
1439
1506
|
{
|
|
1440
|
-
debts:
|
|
1441
|
-
onClickCta:
|
|
1442
|
-
sx: { mb:
|
|
1507
|
+
debts: $,
|
|
1508
|
+
onClickCta: Ce,
|
|
1509
|
+
sx: { mb: y ? "0px" : "64px" }
|
|
1443
1510
|
}
|
|
1444
1511
|
)
|
|
1445
1512
|
]
|
|
1446
1513
|
}
|
|
1447
1514
|
),
|
|
1448
|
-
/* @__PURE__ */ e(
|
|
1449
|
-
|
|
1515
|
+
/* @__PURE__ */ e(g, { sx: { mx: y ? "-24px" : 0 }, children: /* @__PURE__ */ e(
|
|
1516
|
+
kt,
|
|
1450
1517
|
{
|
|
1451
|
-
debts:
|
|
1452
|
-
hoveredDebtGuid:
|
|
1518
|
+
debts: $,
|
|
1519
|
+
hoveredDebtGuid: d,
|
|
1453
1520
|
onClickRow: ne,
|
|
1454
1521
|
onHoverRow: oe
|
|
1455
1522
|
}
|
|
1456
1523
|
) })
|
|
1457
1524
|
] }),
|
|
1458
1525
|
/* @__PURE__ */ e(
|
|
1459
|
-
|
|
1526
|
+
lt,
|
|
1460
1527
|
{
|
|
1461
|
-
isOpen:
|
|
1462
|
-
onClose: () =>
|
|
1528
|
+
isOpen: c,
|
|
1529
|
+
onClose: () => p(!1)
|
|
1463
1530
|
}
|
|
1464
1531
|
),
|
|
1465
|
-
/* @__PURE__ */ e(
|
|
1466
|
-
/* @__PURE__ */ e(
|
|
1532
|
+
/* @__PURE__ */ e(St, { isOpen: n, onClose: () => r(!1) }),
|
|
1533
|
+
/* @__PURE__ */ e(At, { isOpen: t, onClose: () => i(!1) })
|
|
1467
1534
|
]
|
|
1468
1535
|
}
|
|
1469
1536
|
);
|
|
1470
|
-
},
|
|
1537
|
+
}, Pr = S(Ht);
|
|
1471
1538
|
export {
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1539
|
+
ge as DebtsChart,
|
|
1540
|
+
Nr as DebtsStore,
|
|
1541
|
+
kt as DebtsTable,
|
|
1542
|
+
Pr as DebtsWidget
|
|
1476
1543
|
};
|