@mx-cartographer/experiences 7.2.14-alpha.san6 → 7.2.14-alpha.san8
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/{FinstrongStore-1MFI6RcM.mjs → FinstrongStore-BbnA6Crl.mjs} +21 -22
- package/dist/common/index.es.js +1 -1
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +1 -4
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +0 -1
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +0 -1
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +1 -4
- package/dist/finstrong/index.es.js +435 -448
- package/package.json +1 -1
|
@@ -5,14 +5,14 @@ import { useTheme as E, alpha as fe } from "@mui/material/styles";
|
|
|
5
5
|
import { PieChart as _n, BarPlot as hn } from "@mui/x-charts";
|
|
6
6
|
import { TrendingUp as gt, ArrowRightAlt as mn, TrendingDown as gn, AccountBalance as yt, ChevronRight as Z, MultilineChart as bt, CreditCard as Ke, CheckCircle as yn, Cancel as bn, Savings as fn, ContentCopy as xn, Add as ft, Cardiology as Sn, Payments as Cn, CalendarMonth as vn, ExpandMore as wn } from "@mxenabled/mx-icons";
|
|
7
7
|
import { P as k, H3 as N, Text as I, InstitutionLogo as xt, H2 as Pe, MerchantLogo as kn, Icon as Mn } from "@mxenabled/mxui";
|
|
8
|
-
import { g as Dn, a as In, r as rt, b as An, c as je, d as St, C as ve, e as we, f as Tn, h as On, i as Rn, j as Ct, k as at, l as Fn, m as it, n as Pn, o as vt, p as Bn, q as wt, s as Te, t as Ln, u as Wn, v as $n, w as zn, A as ee, x as En, P as Gn } from "../FinstrongStore-
|
|
9
|
-
import { y as Gi, F as Hi } from "../FinstrongStore-
|
|
8
|
+
import { g as Dn, a as In, r as rt, b as An, c as je, d as St, C as ve, e as we, f as Tn, h as On, i as Rn, j as Ct, k as at, l as Fn, m as it, n as Pn, o as vt, p as Bn, q as wt, s as Te, t as Ln, u as Wn, v as $n, w as zn, A as ee, x as En, P as Gn } from "../FinstrongStore-BbnA6Crl.mjs";
|
|
9
|
+
import { y as Gi, F as Hi } from "../FinstrongStore-BbnA6Crl.mjs";
|
|
10
10
|
import * as st from "d3";
|
|
11
11
|
import { observer as S } from "mobx-react-lite";
|
|
12
12
|
import { u as v, b as j, p as Q, z as F, q as Hn, a as kt, d as Me, m as Ye, g as Nn, f as Kn, j as Ve, h as jn, i as Yn } from "../hooks-C41HAxM5.mjs";
|
|
13
13
|
import { L as J } from "../Loader-DUaFpDGv.mjs";
|
|
14
14
|
import m from "react";
|
|
15
|
-
import
|
|
15
|
+
import $ from "@mui/material/Button";
|
|
16
16
|
import K from "@mui/material/Card";
|
|
17
17
|
import { L as Xe } from "../LineChart-Ct9DNmhS.mjs";
|
|
18
18
|
import { C as Mt } from "../ConnectionsDrawer-Bz4uwdFE.mjs";
|
|
@@ -77,14 +77,14 @@ const zo = ({
|
|
|
77
77
|
dataIndex: r,
|
|
78
78
|
arcColor: n,
|
|
79
79
|
arcStartAngle: o,
|
|
80
|
-
totalAngularSpan:
|
|
80
|
+
totalAngularSpan: c,
|
|
81
81
|
centerX: a,
|
|
82
82
|
centerY: s,
|
|
83
|
-
arcRadius:
|
|
84
|
-
innerArcRadius:
|
|
85
|
-
outterArcRadius:
|
|
86
|
-
progressEndAngle:
|
|
87
|
-
unitsPerSegment:
|
|
83
|
+
arcRadius: d,
|
|
84
|
+
innerArcRadius: l,
|
|
85
|
+
outterArcRadius: p,
|
|
86
|
+
progressEndAngle: h,
|
|
87
|
+
unitsPerSegment: _,
|
|
88
88
|
isFinacialStrengthGraph: b
|
|
89
89
|
}) => {
|
|
90
90
|
const f = E(), w = [
|
|
@@ -94,16 +94,16 @@ const zo = ({
|
|
|
94
94
|
{ offset: "83.46%", color: f.palette.chartMono.chartMono5 }
|
|
95
95
|
], [y, D] = Dn(
|
|
96
96
|
t,
|
|
97
|
-
|
|
97
|
+
c,
|
|
98
98
|
o,
|
|
99
99
|
r
|
|
100
100
|
), [g, x] = In(
|
|
101
101
|
y,
|
|
102
102
|
D,
|
|
103
103
|
r,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
), M = st.arc().innerRadius(
|
|
104
|
+
_,
|
|
105
|
+
h
|
|
106
|
+
), M = st.arc().innerRadius(l).outerRadius(p).startAngle(y).endAngle(D).padAngle(0.02).cornerRadius(8), W = st.arc().innerRadius(l).outerRadius(p).startAngle(g).endAngle(x).padAngle(0.02).cornerRadius(8);
|
|
107
107
|
return /* @__PURE__ */ i(z, { children: [
|
|
108
108
|
/* @__PURE__ */ e(
|
|
109
109
|
"path",
|
|
@@ -112,17 +112,17 @@ const zo = ({
|
|
|
112
112
|
fill: b ? f.palette.divider : n
|
|
113
113
|
}
|
|
114
114
|
),
|
|
115
|
-
b && /* @__PURE__ */ e("path", { d:
|
|
115
|
+
b && /* @__PURE__ */ e("path", { d: W({}), fill: "url(#arcGradient)" }),
|
|
116
116
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
|
|
117
117
|
"linearGradient",
|
|
118
118
|
{
|
|
119
119
|
gradientTransform: `rotate(5, ${a}, ${s})`,
|
|
120
120
|
gradientUnits: "userSpaceOnUse",
|
|
121
121
|
id: "arcGradient",
|
|
122
|
-
x1: a +
|
|
123
|
-
x2: a -
|
|
124
|
-
y1: s +
|
|
125
|
-
y2: s -
|
|
122
|
+
x1: a + d * 0.8 * Math.cos(Math.PI / 1.35),
|
|
123
|
+
x2: a - d * 0.8 * Math.cos(Math.PI / 1.35),
|
|
124
|
+
y1: s + d * 0.8 * Math.sin(Math.PI / 1.35),
|
|
125
|
+
y2: s - d * 0.8 * Math.sin(Math.PI / 1.35),
|
|
126
126
|
children: w.map((G, H) => /* @__PURE__ */ e("stop", { offset: G.offset, stopColor: G.color }, H))
|
|
127
127
|
}
|
|
128
128
|
) })
|
|
@@ -132,20 +132,20 @@ const zo = ({
|
|
|
132
132
|
healthScore: r,
|
|
133
133
|
size: n = "L",
|
|
134
134
|
dialScoreData: o,
|
|
135
|
-
minValue:
|
|
135
|
+
minValue: c = 0,
|
|
136
136
|
maxValue: a = 100,
|
|
137
137
|
markerColor: s,
|
|
138
|
-
healthScoreStatus:
|
|
139
|
-
footerCenterContent:
|
|
140
|
-
footerLeftContent:
|
|
141
|
-
footerRightContent:
|
|
142
|
-
isFinacialStrengthGraph:
|
|
138
|
+
healthScoreStatus: d,
|
|
139
|
+
footerCenterContent: l,
|
|
140
|
+
footerLeftContent: p,
|
|
141
|
+
footerRightContent: h,
|
|
142
|
+
isFinacialStrengthGraph: _ = !1
|
|
143
143
|
}) => {
|
|
144
|
-
const b = E(), f = -Math.PI / 1.35, w = Math.PI / 1.35, y = w - f, D = y / (a -
|
|
144
|
+
const b = E(), f = -Math.PI / 1.35, w = Math.PI / 1.35, y = w - f, D = y / (a - c), g = (r - c) * D, x = f + g + 0.02, M = n !== "SM" ? 0.1 : 0.12, W = t, G = t * (1 - M), H = W * 2.5, T = H / 2, V = H / 2, re = (G + W) / 2, ae = r !== 25 && r !== 50 && r !== 75 && r !== 100 ? 0 : 0.12, [Ce, ie] = An(re, x, ae), X = r / 25, se = {
|
|
145
145
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
|
146
146
|
M: { markerSize: 10, healthScoreFontSize: 48 },
|
|
147
147
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
|
148
|
-
}, ce =
|
|
148
|
+
}, ce = l === 0 ? mn : gn;
|
|
149
149
|
return /* @__PURE__ */ i(
|
|
150
150
|
u,
|
|
151
151
|
{
|
|
@@ -165,7 +165,7 @@ const zo = ({
|
|
|
165
165
|
{
|
|
166
166
|
data: o,
|
|
167
167
|
innerRadius: G,
|
|
168
|
-
outerRadius:
|
|
168
|
+
outerRadius: W,
|
|
169
169
|
startAngle: Math.round(rt(f)),
|
|
170
170
|
// Use Math.degrees to convert
|
|
171
171
|
endAngle: Math.round(rt(w))
|
|
@@ -188,8 +188,8 @@ const zo = ({
|
|
|
188
188
|
dataIndex: he.dataIndex,
|
|
189
189
|
dialScoreData: o,
|
|
190
190
|
innerArcRadius: G,
|
|
191
|
-
isFinacialStrengthGraph:
|
|
192
|
-
outterArcRadius:
|
|
191
|
+
isFinacialStrengthGraph: _,
|
|
192
|
+
outterArcRadius: W,
|
|
193
193
|
progressEndAngle: x,
|
|
194
194
|
totalAngularSpan: y,
|
|
195
195
|
unitsPerSegment: X
|
|
@@ -202,14 +202,14 @@ const zo = ({
|
|
|
202
202
|
}
|
|
203
203
|
},
|
|
204
204
|
width: H,
|
|
205
|
-
children: r >=
|
|
205
|
+
children: r >= c && r <= a && /* @__PURE__ */ e(
|
|
206
206
|
"circle",
|
|
207
207
|
{
|
|
208
208
|
cx: T + Ce,
|
|
209
209
|
cy: V + ie,
|
|
210
210
|
fill: b.palette.common.white,
|
|
211
211
|
r: se[n].markerSize,
|
|
212
|
-
stroke:
|
|
212
|
+
stroke: _ ? "url(#arcGradient)" : s,
|
|
213
213
|
strokeWidth: n !== "SM" ? 3 : 1
|
|
214
214
|
}
|
|
215
215
|
)
|
|
@@ -242,13 +242,13 @@ const zo = ({
|
|
|
242
242
|
children: r
|
|
243
243
|
}
|
|
244
244
|
),
|
|
245
|
-
n !== "SM" && /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: n === "L" ? "body1" : "body2", children:
|
|
245
|
+
n !== "SM" && /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: n === "L" ? "body1" : "body2", children: d })
|
|
246
246
|
]
|
|
247
247
|
}
|
|
248
248
|
)
|
|
249
249
|
}
|
|
250
250
|
),
|
|
251
|
-
|
|
251
|
+
l !== void 0 && /* @__PURE__ */ e(
|
|
252
252
|
C,
|
|
253
253
|
{
|
|
254
254
|
sx: {
|
|
@@ -258,23 +258,23 @@ const zo = ({
|
|
|
258
258
|
transform: "translate(-50%, -50%)",
|
|
259
259
|
textAlign: "center"
|
|
260
260
|
},
|
|
261
|
-
children: typeof
|
|
262
|
-
|
|
261
|
+
children: typeof l == "number" ? /* @__PURE__ */ i(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
262
|
+
l > 0 ? /* @__PURE__ */ e(gt, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(ce, { size: 16, sx: { color: "text.secondary" } }),
|
|
263
263
|
/* @__PURE__ */ e(
|
|
264
264
|
k,
|
|
265
265
|
{
|
|
266
266
|
sx: {
|
|
267
267
|
fontWeight: 600,
|
|
268
|
-
color:
|
|
268
|
+
color: l > 0 ? "success.main" : "text.secondary"
|
|
269
269
|
},
|
|
270
270
|
variant: "body1",
|
|
271
|
-
children:
|
|
271
|
+
children: l
|
|
272
272
|
}
|
|
273
273
|
)
|
|
274
|
-
] }) : /* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle2", children:
|
|
274
|
+
] }) : /* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle2", children: l })
|
|
275
275
|
}
|
|
276
276
|
),
|
|
277
|
-
|
|
277
|
+
p !== void 0 && /* @__PURE__ */ e(
|
|
278
278
|
C,
|
|
279
279
|
{
|
|
280
280
|
sx: {
|
|
@@ -285,10 +285,10 @@ const zo = ({
|
|
|
285
285
|
transform: "translate(-50%, -50%)",
|
|
286
286
|
textAlign: "left"
|
|
287
287
|
},
|
|
288
|
-
children: /* @__PURE__ */ e(k, { variant: "body1", children:
|
|
288
|
+
children: /* @__PURE__ */ e(k, { variant: "body1", children: p })
|
|
289
289
|
}
|
|
290
290
|
),
|
|
291
|
-
|
|
291
|
+
h !== void 0 && /* @__PURE__ */ e(
|
|
292
292
|
C,
|
|
293
293
|
{
|
|
294
294
|
sx: {
|
|
@@ -298,7 +298,7 @@ const zo = ({
|
|
|
298
298
|
transform: "translate(-50%, -50%)",
|
|
299
299
|
textAlign: "right"
|
|
300
300
|
},
|
|
301
|
-
children: /* @__PURE__ */ e(k, { variant: "body1", children:
|
|
301
|
+
children: /* @__PURE__ */ e(k, { variant: "body1", children: h })
|
|
302
302
|
}
|
|
303
303
|
)
|
|
304
304
|
]
|
|
@@ -306,7 +306,7 @@ const zo = ({
|
|
|
306
306
|
);
|
|
307
307
|
}, Et = S(
|
|
308
308
|
({ arcRadius: t, size: r = "L", healthScore: n, footerCenterContent: o }) => {
|
|
309
|
-
const
|
|
309
|
+
const c = [
|
|
310
310
|
{ id: 1, label: "Group A", value: 25 },
|
|
311
311
|
{ id: 2, label: "Group B", value: 25 },
|
|
312
312
|
{ id: 3, label: "Group C", value: 25 },
|
|
@@ -316,7 +316,7 @@ const zo = ({
|
|
|
316
316
|
zt,
|
|
317
317
|
{
|
|
318
318
|
arcRadius: t,
|
|
319
|
-
dialScoreData:
|
|
319
|
+
dialScoreData: c,
|
|
320
320
|
footerCenterContent: r === "L" ? a.footer_center_content_updated_just_now : o,
|
|
321
321
|
healthScore: n,
|
|
322
322
|
healthScoreStatus: s.status,
|
|
@@ -331,60 +331,60 @@ const zo = ({
|
|
|
331
331
|
size: r = "L",
|
|
332
332
|
healthScore: n,
|
|
333
333
|
maxValue: o = 850,
|
|
334
|
-
minValue:
|
|
334
|
+
minValue: c = 300,
|
|
335
335
|
footerCenterContent: a
|
|
336
336
|
}) => {
|
|
337
|
-
const
|
|
337
|
+
const d = E().palette.mode === "dark", l = [
|
|
338
338
|
{
|
|
339
339
|
id: 1,
|
|
340
340
|
label: "Poor",
|
|
341
341
|
value: 29,
|
|
342
|
-
color:
|
|
342
|
+
color: d ? ve.POOR : we.POOR
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
id: 2,
|
|
346
346
|
label: "Fair",
|
|
347
347
|
value: 25,
|
|
348
|
-
color:
|
|
348
|
+
color: d ? ve.FAIR : we.FAIR
|
|
349
349
|
},
|
|
350
350
|
{
|
|
351
351
|
id: 3,
|
|
352
352
|
label: "Good",
|
|
353
353
|
value: 17,
|
|
354
|
-
color:
|
|
354
|
+
color: d ? ve.GOOD : we.GOOD
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
id: 4,
|
|
358
358
|
label: "Very Good",
|
|
359
359
|
value: 17,
|
|
360
|
-
color:
|
|
360
|
+
color: d ? ve.VERY_GOOD : we.VERY_GOOD
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
363
|
id: 5,
|
|
364
364
|
label: "Exceptional",
|
|
365
365
|
value: 12,
|
|
366
|
-
color:
|
|
366
|
+
color: d ? ve.EXCEPTIONAL : we.EXCEPTIONAL
|
|
367
367
|
}
|
|
368
|
-
], { finstrong:
|
|
369
|
-
if (!
|
|
370
|
-
const { status:
|
|
368
|
+
], { finstrong: p } = v(), { isCopyLoaded: h } = j();
|
|
369
|
+
if (!h) return /* @__PURE__ */ e(J, {});
|
|
370
|
+
const { status: _, color: b = "none" } = St(
|
|
371
371
|
n,
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
d,
|
|
373
|
+
p.credit_score_status
|
|
374
374
|
);
|
|
375
375
|
return /* @__PURE__ */ e(
|
|
376
376
|
zt,
|
|
377
377
|
{
|
|
378
378
|
arcRadius: t,
|
|
379
|
-
dialScoreData:
|
|
379
|
+
dialScoreData: l,
|
|
380
380
|
footerCenterContent: a,
|
|
381
|
-
footerLeftContent:
|
|
381
|
+
footerLeftContent: c,
|
|
382
382
|
footerRightContent: o,
|
|
383
383
|
healthScore: n,
|
|
384
|
-
healthScoreStatus:
|
|
384
|
+
healthScoreStatus: _,
|
|
385
385
|
markerColor: b,
|
|
386
386
|
maxValue: o,
|
|
387
|
-
minValue:
|
|
387
|
+
minValue: c,
|
|
388
388
|
size: r
|
|
389
389
|
}
|
|
390
390
|
);
|
|
@@ -394,12 +394,12 @@ const zo = ({
|
|
|
394
394
|
isDashboard: r = !1,
|
|
395
395
|
hasIcon: n = !0,
|
|
396
396
|
buttonText: o,
|
|
397
|
-
title:
|
|
397
|
+
title: c,
|
|
398
398
|
titleDrawer: a,
|
|
399
399
|
description: s,
|
|
400
|
-
sx:
|
|
400
|
+
sx: d
|
|
401
401
|
}) => {
|
|
402
|
-
const [
|
|
402
|
+
const [l, p] = m.useState(!1), { connect: h, finstrong: _ } = v();
|
|
403
403
|
return t ? /* @__PURE__ */ i(
|
|
404
404
|
K,
|
|
405
405
|
{
|
|
@@ -408,7 +408,7 @@ const zo = ({
|
|
|
408
408
|
pt: 18,
|
|
409
409
|
px: 24,
|
|
410
410
|
width: "100%",
|
|
411
|
-
...
|
|
411
|
+
...d
|
|
412
412
|
},
|
|
413
413
|
children: [
|
|
414
414
|
/* @__PURE__ */ i(
|
|
@@ -420,7 +420,7 @@ const zo = ({
|
|
|
420
420
|
},
|
|
421
421
|
children: [
|
|
422
422
|
n && /* @__PURE__ */ e(yt, { sx: { height: 20, width: 20 } }),
|
|
423
|
-
/* @__PURE__ */ e(N, { className: "connect-more-accounts-title", sx: { ...r && { fontSize: 15 } }, children:
|
|
423
|
+
/* @__PURE__ */ e(N, { className: "connect-more-accounts-title", sx: { ...r && { fontSize: 15 } }, children: c || _.connect_more_accounts_title })
|
|
424
424
|
]
|
|
425
425
|
}
|
|
426
426
|
),
|
|
@@ -430,33 +430,33 @@ const zo = ({
|
|
|
430
430
|
className: "connect-more-accounts-description",
|
|
431
431
|
sx: { color: "text.secondary", mt: 8 },
|
|
432
432
|
variant: "subtitle1",
|
|
433
|
-
children: s ||
|
|
433
|
+
children: s || _.connect_more_accounts_description
|
|
434
434
|
}
|
|
435
435
|
),
|
|
436
436
|
/* @__PURE__ */ e(
|
|
437
|
-
|
|
437
|
+
$,
|
|
438
438
|
{
|
|
439
439
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
440
|
-
onClick: () =>
|
|
440
|
+
onClick: () => p(!0),
|
|
441
441
|
size: "small",
|
|
442
442
|
sx: { p: 0, mt: 8, "&:hover": { backgroundColor: "transparent" } },
|
|
443
|
-
children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: o ||
|
|
443
|
+
children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: o || _.connect_more_accounts_button })
|
|
444
444
|
}
|
|
445
445
|
),
|
|
446
446
|
t === "connectDrawer" && /* @__PURE__ */ e(
|
|
447
447
|
oe,
|
|
448
448
|
{
|
|
449
|
-
onClose: () =>
|
|
450
|
-
showConnectWidget:
|
|
451
|
-
title: a ||
|
|
449
|
+
onClose: () => p(!1),
|
|
450
|
+
showConnectWidget: l,
|
|
451
|
+
title: a || h.mini_title
|
|
452
452
|
}
|
|
453
453
|
),
|
|
454
454
|
t === "connectionsDrawer" && /* @__PURE__ */ e(
|
|
455
455
|
Mt,
|
|
456
456
|
{
|
|
457
|
-
onClose: () =>
|
|
458
|
-
showConnectionsWidget:
|
|
459
|
-
title: a ||
|
|
457
|
+
onClose: () => p(!1),
|
|
458
|
+
showConnectionsWidget: l,
|
|
459
|
+
title: a || h.mini_title
|
|
460
460
|
}
|
|
461
461
|
)
|
|
462
462
|
]
|
|
@@ -465,45 +465,45 @@ const zo = ({
|
|
|
465
465
|
};
|
|
466
466
|
var _e = /* @__PURE__ */ ((t) => (t.SpendLessThanYouMake = "spendLessThanYouMake", t.PayBillsOnTime = "payBillsOnTime", t.SaveEnoughToLiveOn = "saveEnoughToLiveOn", t.MaintainEmergencySavings = "maintainEmergencySavings", t.HaveManageableDebt = "haveManageableDebt", t.HaveAGoodCreditScore = "haveAGoodCreditScore", t))(_e || {});
|
|
467
467
|
const Go = ({ isOpen: t, onClose: r }) => {
|
|
468
|
-
const { common: n, finstrong: o } = v(), { isMobile:
|
|
469
|
-
r(), setTimeout(() =>
|
|
470
|
-
},
|
|
471
|
-
!
|
|
468
|
+
const { common: n, finstrong: o } = v(), { isMobile: c } = Ue(), { updateUser: a, user: s } = Q(), [d, l] = m.useState(s.credit_score || 0), p = !isNaN(d), h = () => {
|
|
469
|
+
r(), setTimeout(() => l(s.credit_score || 0), 300);
|
|
470
|
+
}, _ = () => {
|
|
471
|
+
!d || d === s.credit_score || a({ ...s, credit_score: d });
|
|
472
472
|
};
|
|
473
473
|
return /* @__PURE__ */ e(
|
|
474
474
|
Vn,
|
|
475
475
|
{
|
|
476
476
|
copy: { close_aria: n.close_aria, title: o.edit_credit_score },
|
|
477
|
-
disablePrimaryButton: !
|
|
477
|
+
disablePrimaryButton: !d || !p,
|
|
478
478
|
isOpen: t,
|
|
479
479
|
maxWidth: "xs",
|
|
480
|
-
onClose:
|
|
481
|
-
onPrimaryAction:
|
|
480
|
+
onClose: h,
|
|
481
|
+
onPrimaryAction: _,
|
|
482
482
|
primaryColor: "primary",
|
|
483
483
|
primaryText: n.save_button,
|
|
484
484
|
sx: {
|
|
485
485
|
"& .MuiDialog-paper": {
|
|
486
|
-
minWidth:
|
|
486
|
+
minWidth: c ? "100%" : 400
|
|
487
487
|
}
|
|
488
488
|
},
|
|
489
489
|
children: /* @__PURE__ */ e(
|
|
490
490
|
"form",
|
|
491
491
|
{
|
|
492
492
|
onSubmit: (b) => {
|
|
493
|
-
b.preventDefault(),
|
|
493
|
+
b.preventDefault(), _(), h();
|
|
494
494
|
},
|
|
495
495
|
children: /* @__PURE__ */ e(
|
|
496
496
|
Oe,
|
|
497
497
|
{
|
|
498
|
-
error: !
|
|
498
|
+
error: !p,
|
|
499
499
|
fullWidth: !0,
|
|
500
500
|
inputMode: "numeric",
|
|
501
501
|
inputProps: {
|
|
502
502
|
noValidate: !0,
|
|
503
503
|
pattern: "[0-9]*"
|
|
504
504
|
},
|
|
505
|
-
onChange: (b) =>
|
|
506
|
-
value:
|
|
505
|
+
onChange: (b) => l(Number(b.target.value)),
|
|
506
|
+
value: p ? d : ""
|
|
507
507
|
}
|
|
508
508
|
)
|
|
509
509
|
}
|
|
@@ -514,7 +514,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
514
514
|
credit_over_time_title: "Your Credit Over Time",
|
|
515
515
|
credit_over_time_zero_state_desc: "Add your credit score to start building a full picture of your credit health."
|
|
516
516
|
}, Ho = ({ chartFor: t }) => {
|
|
517
|
-
const r = E(), n = r.palette.mode === "dark", { monthlySummaries: o } = F(), { user:
|
|
517
|
+
const r = E(), n = r.palette.mode === "dark", { monthlySummaries: o } = F(), { user: c } = Q(), { finstrong: a } = v(), [s, { width: d }] = It(), l = {
|
|
518
518
|
savingsOverTime: {
|
|
519
519
|
icon: /* @__PURE__ */ e(gt, { size: 48, sx: { marginBottom: 8 } }),
|
|
520
520
|
title: a.key_indicators_save.zero_state_title,
|
|
@@ -530,7 +530,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
530
530
|
title: ze.credit_over_time_title,
|
|
531
531
|
description: ze.credit_over_time_zero_state_desc
|
|
532
532
|
}
|
|
533
|
-
}[t],
|
|
533
|
+
}[t], h = {
|
|
534
534
|
savingsOverTime: {
|
|
535
535
|
title: a.key_indicators_save.savings_over_time,
|
|
536
536
|
valueKey: "available_cash"
|
|
@@ -543,17 +543,17 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
543
543
|
title: ze.credit_over_time_title,
|
|
544
544
|
valueKey: "credit_score"
|
|
545
545
|
}
|
|
546
|
-
}[t],
|
|
546
|
+
}[t], _ = Tn(o, h.valueKey), b = Math.max(...o.map((M) => M[h.valueKey])), f = () => b >= 1e6 ? { formatter: "0.000a", leftMargin: 55 } : b >= 1e3 ? { formatter: "0a", leftMargin: 35 } : { formatter: "0a", leftMargin: 30 }, { formatter: w, leftMargin: y } = f(), D = h.title, g = t === "creditOverTime";
|
|
547
547
|
let x;
|
|
548
548
|
if (g) {
|
|
549
549
|
const { color: M } = St(
|
|
550
|
-
|
|
550
|
+
c?.credit_score ?? 0,
|
|
551
551
|
n,
|
|
552
552
|
a.credit_score_status
|
|
553
553
|
);
|
|
554
554
|
x = M;
|
|
555
555
|
}
|
|
556
|
-
return /* @__PURE__ */ e(K, { ref: s, sx: { backgroundColor: "background.paper" }, children:
|
|
556
|
+
return /* @__PURE__ */ e(K, { ref: s, sx: { backgroundColor: "background.paper" }, children: _.length >= 1 ? /* @__PURE__ */ i(u, { gap: 8, sx: { pl: 18 }, children: [
|
|
557
557
|
/* @__PURE__ */ e(k, { sx: { pb: 8, pt: 16 }, variant: "h3", children: D }),
|
|
558
558
|
/* @__PURE__ */ e(
|
|
559
559
|
Xe,
|
|
@@ -564,7 +564,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
564
564
|
chartFor: t,
|
|
565
565
|
colors: [r.palette.primary.main],
|
|
566
566
|
curveType: g ? "linear" : "natural",
|
|
567
|
-
datasets:
|
|
567
|
+
datasets: _ ? [_] : [],
|
|
568
568
|
height: 244,
|
|
569
569
|
labelFontColor: g ? "text.primary" : "",
|
|
570
570
|
labelFontSize: g ? 13 : void 0,
|
|
@@ -573,7 +573,7 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
573
573
|
markStyles: (M) => g ? {
|
|
574
574
|
markLabelStyles: {
|
|
575
575
|
marginLeft: 16,
|
|
576
|
-
transform: M ===
|
|
576
|
+
transform: M === _.length - 1 ? "translateX(-16px)" : "translateX(16px)",
|
|
577
577
|
fontWeight: 600
|
|
578
578
|
}
|
|
579
579
|
} : {},
|
|
@@ -588,18 +588,18 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
588
588
|
showYAxisTicks: g,
|
|
589
589
|
useCustomMark: !0,
|
|
590
590
|
valueFormatterString: g ? void 0 : w,
|
|
591
|
-
width:
|
|
591
|
+
width: d < 342 ? d - 48 : 342
|
|
592
592
|
}
|
|
593
593
|
)
|
|
594
594
|
] }) : /* @__PURE__ */ i(u, { gap: 8, sx: { alignItems: "center", p: 24, pb: 48 }, children: [
|
|
595
|
-
|
|
596
|
-
/* @__PURE__ */ e(k, { fontWeight: 600, variant: "body1", children:
|
|
597
|
-
/* @__PURE__ */ e(k, { align: "center", variant: "subtitle1", children:
|
|
595
|
+
l.icon,
|
|
596
|
+
/* @__PURE__ */ e(k, { fontWeight: 600, variant: "body1", children: l.title }),
|
|
597
|
+
/* @__PURE__ */ e(k, { align: "center", variant: "subtitle1", children: l.description })
|
|
598
598
|
] }) });
|
|
599
599
|
}, Qe = S(Ho), No = {
|
|
600
600
|
updated_score: "Updated Score"
|
|
601
601
|
}, Ko = () => {
|
|
602
|
-
const { healthScoreChange: t } = F(), { user: r } = Q(), { availableWidth: n } = Hn(), { isSmallMobile: o } = Ue(n), [
|
|
602
|
+
const { healthScoreChange: t } = F(), { user: r } = Q(), { availableWidth: n } = Hn(), { isSmallMobile: o } = Ue(n), [c, a] = m.useState(!1);
|
|
603
603
|
return /* @__PURE__ */ i(u, { sx: { gap: 28 }, children: [
|
|
604
604
|
/* @__PURE__ */ e(
|
|
605
605
|
Eo,
|
|
@@ -610,8 +610,8 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
610
610
|
size: o ? "M" : "L"
|
|
611
611
|
}
|
|
612
612
|
),
|
|
613
|
-
/* @__PURE__ */ e(
|
|
614
|
-
/* @__PURE__ */ e(Gt, { isOpen:
|
|
613
|
+
/* @__PURE__ */ e($, { onClick: () => a(!0), variant: "contained", children: No.updated_score }),
|
|
614
|
+
/* @__PURE__ */ e(Gt, { isOpen: c, onClose: () => a(!1) }),
|
|
615
615
|
/* @__PURE__ */ e(Qe, { chartFor: "creditOverTime" })
|
|
616
616
|
] });
|
|
617
617
|
}, jo = S(Ko), Le = ({ status: t }) => {
|
|
@@ -655,18 +655,18 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
655
655
|
connectTitle: r,
|
|
656
656
|
connectDescription: n,
|
|
657
657
|
children: o,
|
|
658
|
-
description:
|
|
658
|
+
description: c,
|
|
659
659
|
drawerTitle: a,
|
|
660
660
|
isOpen: s,
|
|
661
|
-
loadConnectAccountsCard:
|
|
662
|
-
onClose:
|
|
663
|
-
stickyComponent:
|
|
664
|
-
title:
|
|
665
|
-
drawerType:
|
|
661
|
+
loadConnectAccountsCard: d = !0,
|
|
662
|
+
onClose: l,
|
|
663
|
+
stickyComponent: p,
|
|
664
|
+
title: h,
|
|
665
|
+
drawerType: _
|
|
666
666
|
}) => {
|
|
667
667
|
const { finstrong: b } = v(), { isCopyLoaded: f } = j();
|
|
668
|
-
return f ? /* @__PURE__ */ i(te, { isOpen: s, onClose:
|
|
669
|
-
(
|
|
668
|
+
return f ? /* @__PURE__ */ i(te, { isOpen: s, onClose: l, title: a || b.key_indicators, children: [
|
|
669
|
+
(h || c) && /* @__PURE__ */ i(
|
|
670
670
|
u,
|
|
671
671
|
{
|
|
672
672
|
sx: {
|
|
@@ -675,12 +675,12 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
675
675
|
p: 24
|
|
676
676
|
},
|
|
677
677
|
children: [
|
|
678
|
-
|
|
679
|
-
|
|
678
|
+
h && typeof h == "string" ? /* @__PURE__ */ e(N, { children: h }) : h,
|
|
679
|
+
c && /* @__PURE__ */ e(k, { sx: { lineHeight: "24px" }, children: c })
|
|
680
680
|
]
|
|
681
681
|
}
|
|
682
682
|
),
|
|
683
|
-
|
|
683
|
+
p && /* @__PURE__ */ e(
|
|
684
684
|
C,
|
|
685
685
|
{
|
|
686
686
|
sx: {
|
|
@@ -688,17 +688,17 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
688
688
|
top: 0,
|
|
689
689
|
zIndex: 1
|
|
690
690
|
},
|
|
691
|
-
children:
|
|
691
|
+
children: p
|
|
692
692
|
}
|
|
693
693
|
),
|
|
694
694
|
t && /* @__PURE__ */ e(C, { children: t }),
|
|
695
695
|
/* @__PURE__ */ i(u, { sx: { p: 24, gap: 24 }, children: [
|
|
696
696
|
o,
|
|
697
|
-
|
|
697
|
+
d && /* @__PURE__ */ e(
|
|
698
698
|
Be,
|
|
699
699
|
{
|
|
700
700
|
description: n,
|
|
701
|
-
drawerType:
|
|
701
|
+
drawerType: _,
|
|
702
702
|
isDashboard: !0,
|
|
703
703
|
sx: { backgroundColor: "background.paper" },
|
|
704
704
|
title: r
|
|
@@ -711,62 +711,62 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
711
711
|
shouldShowBalance: r = !0,
|
|
712
712
|
loadAccounts: n
|
|
713
713
|
}) => {
|
|
714
|
-
const { config: o } = kt(), { accounts:
|
|
715
|
-
(
|
|
716
|
-
t?.(
|
|
714
|
+
const { config: o } = kt(), { accounts: c } = v(), { selectedAccounts: a } = j(), s = m.useCallback(
|
|
715
|
+
(l) => {
|
|
716
|
+
t?.(l);
|
|
717
717
|
},
|
|
718
718
|
[t]
|
|
719
|
-
),
|
|
720
|
-
() => Array.from(new Set(a.map((
|
|
721
|
-
(
|
|
719
|
+
), d = m.useMemo(
|
|
720
|
+
() => Array.from(new Set(a.map((l) => l.account_type))).filter(
|
|
721
|
+
(l) => n ? n.includes(l) : !0
|
|
722
722
|
),
|
|
723
723
|
[a, n]
|
|
724
724
|
);
|
|
725
|
-
return a.length ? /* @__PURE__ */ e(m.Fragment, { children:
|
|
726
|
-
const { accountsForType:
|
|
727
|
-
(
|
|
725
|
+
return a.length ? /* @__PURE__ */ e(m.Fragment, { children: d.map((l) => {
|
|
726
|
+
const { accountsForType: p, totalBalanceForType: h } = a.reduce(
|
|
727
|
+
(_, b) => (b.account_type === l && (_.accountsForType.push(b), _.totalBalanceForType += b.balance || 0), _),
|
|
728
728
|
{ accountsForType: [], totalBalanceForType: 0 }
|
|
729
729
|
);
|
|
730
730
|
return /* @__PURE__ */ i(
|
|
731
731
|
Re,
|
|
732
732
|
{
|
|
733
733
|
subheader: /* @__PURE__ */ e(Qn, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */ i(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
734
|
-
/* @__PURE__ */ e(I, { bold: !0, variant: "caption", children:
|
|
735
|
-
r && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: L(
|
|
734
|
+
/* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: c.account_types[l] }),
|
|
735
|
+
r && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: L(h, "0,0.00") })
|
|
736
736
|
] }) }),
|
|
737
737
|
sx: { bgcolor: "background.paper" },
|
|
738
738
|
children: [
|
|
739
|
-
|
|
740
|
-
const { firstValue: f } = Tt(
|
|
739
|
+
p.map((_, b) => {
|
|
740
|
+
const { firstValue: f } = Tt(_, c), w = Dt(_, {
|
|
741
741
|
allowNickname: o?.show_account_nicknames_in_master
|
|
742
742
|
}), y = /* @__PURE__ */ i(z, { children: [
|
|
743
|
-
/* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid:
|
|
743
|
+
/* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(xt, { alt: "MX", institutionGuid: _.institution_guid ?? "" }) }),
|
|
744
744
|
/* @__PURE__ */ e(
|
|
745
745
|
be,
|
|
746
746
|
{
|
|
747
|
-
primary: `${w}${
|
|
747
|
+
primary: `${w}${_.account_number ? ` *${_.account_number}` : ""}`,
|
|
748
748
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
749
749
|
}
|
|
750
750
|
),
|
|
751
751
|
r && /* @__PURE__ */ e(k, { bold: !0, variant: "body2", children: L(f ?? 0, "0,0.00") })
|
|
752
752
|
] });
|
|
753
753
|
return /* @__PURE__ */ i(m.Fragment, { children: [
|
|
754
|
-
/* @__PURE__ */ e(ye, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Zn, { onClick: () => s(
|
|
755
|
-
b !==
|
|
756
|
-
] },
|
|
754
|
+
/* @__PURE__ */ e(ye, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Zn, { onClick: () => s(_), children: y }) : y }),
|
|
755
|
+
b !== p.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
|
|
756
|
+
] }, _.guid);
|
|
757
757
|
}),
|
|
758
758
|
/* @__PURE__ */ e(ne, {})
|
|
759
759
|
]
|
|
760
760
|
},
|
|
761
|
-
|
|
761
|
+
l
|
|
762
762
|
);
|
|
763
763
|
}) }) : null;
|
|
764
764
|
}, Nt = S(Uo), Zo = ({ loadAccounts: t, loadMoreLabel: r }) => {
|
|
765
|
-
const n = E(), { config: o } = kt(), { connect:
|
|
766
|
-
() =>
|
|
765
|
+
const n = E(), { config: o } = kt(), { connect: c, finstrong: a } = v(), { accounts: s } = v(), { selectedAccounts: d } = j(), [l, p] = m.useState(!1), [h, _] = m.useState(!1), b = m.useMemo(
|
|
766
|
+
() => d.filter(
|
|
767
767
|
(y) => t ? t.includes(y.account_type) : !0
|
|
768
768
|
),
|
|
769
|
-
[
|
|
769
|
+
[d, t]
|
|
770
770
|
), f = m.useMemo(() => b.slice(0, 3), [b]), w = (y) => {
|
|
771
771
|
const { firstValue: D } = Tt(y, s);
|
|
772
772
|
return D;
|
|
@@ -791,10 +791,10 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
791
791
|
] }, y.guid)) }),
|
|
792
792
|
b.length > 3 && /* @__PURE__ */ i(z, { children: [
|
|
793
793
|
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
794
|
-
|
|
794
|
+
$,
|
|
795
795
|
{
|
|
796
796
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
797
|
-
onClick: () =>
|
|
797
|
+
onClick: () => p(!0),
|
|
798
798
|
size: "small",
|
|
799
799
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
800
800
|
children: /* @__PURE__ */ i(I, { bold: !0, variant: "body1", children: [
|
|
@@ -804,13 +804,13 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
804
804
|
] })
|
|
805
805
|
}
|
|
806
806
|
) }),
|
|
807
|
-
/* @__PURE__ */ e(te, { isOpen:
|
|
807
|
+
/* @__PURE__ */ e(te, { isOpen: l, onClose: () => p(!1), title: a.accounts, children: /* @__PURE__ */ e(Nt, { loadAccounts: t }) })
|
|
808
808
|
] })
|
|
809
809
|
] }) : /* @__PURE__ */ i(z, { children: [
|
|
810
810
|
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
811
|
-
|
|
811
|
+
$,
|
|
812
812
|
{
|
|
813
|
-
onClick: () =>
|
|
813
|
+
onClick: () => _(!0),
|
|
814
814
|
size: "small",
|
|
815
815
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
816
816
|
variant: "contained",
|
|
@@ -820,9 +820,9 @@ const Go = ({ isOpen: t, onClose: r }) => {
|
|
|
820
820
|
/* @__PURE__ */ e(
|
|
821
821
|
oe,
|
|
822
822
|
{
|
|
823
|
-
onClose: () =>
|
|
824
|
-
showConnectWidget:
|
|
825
|
-
title:
|
|
823
|
+
onClose: () => _(!1),
|
|
824
|
+
showConnectWidget: h,
|
|
825
|
+
title: c.mini_title
|
|
826
826
|
}
|
|
827
827
|
)
|
|
828
828
|
] });
|
|
@@ -879,15 +879,15 @@ const B = {
|
|
|
879
879
|
{ id: ke.Years, label: B.years },
|
|
880
880
|
{ id: ke.Days, label: B.days }
|
|
881
881
|
], tr = ({ total: t }) => {
|
|
882
|
-
const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = m.useState(0), [
|
|
882
|
+
const r = Math.ceil((t + 1) / 1e3) * 1e3, [n, o] = m.useState(0), [c, a] = m.useState(at(t)), [s, d] = m.useState(
|
|
883
883
|
at(t)
|
|
884
|
-
), [
|
|
884
|
+
), [l, p] = m.useState(r), [h, _] = m.useState(Fn(t)), [b, f] = m.useState(ke.Months);
|
|
885
885
|
m.useEffect(() => {
|
|
886
886
|
o(
|
|
887
887
|
it({
|
|
888
888
|
contribution: s,
|
|
889
|
-
goalAmount:
|
|
890
|
-
goalPeriod:
|
|
889
|
+
goalAmount: l,
|
|
890
|
+
goalPeriod: h,
|
|
891
891
|
targetPeriod: b,
|
|
892
892
|
totalSaved: t
|
|
893
893
|
})
|
|
@@ -897,8 +897,8 @@ const B = {
|
|
|
897
897
|
y.preventDefault(), o(
|
|
898
898
|
it({
|
|
899
899
|
contribution: s,
|
|
900
|
-
goalAmount:
|
|
901
|
-
goalPeriod:
|
|
900
|
+
goalAmount: l,
|
|
901
|
+
goalPeriod: h,
|
|
902
902
|
targetPeriod: b,
|
|
903
903
|
totalSaved: t
|
|
904
904
|
})
|
|
@@ -912,7 +912,7 @@ const B = {
|
|
|
912
912
|
/* @__PURE__ */ e(I, { variant: "h2", children: L(n, "0,0") }),
|
|
913
913
|
/* @__PURE__ */ i(I, { sx: { alignSelf: "end", height: 24 }, variant: "subtitle2", children: [
|
|
914
914
|
"/",
|
|
915
|
-
Jo[
|
|
915
|
+
Jo[c]
|
|
916
916
|
] })
|
|
917
917
|
] }),
|
|
918
918
|
title: B.estimated_contribution
|
|
@@ -929,16 +929,16 @@ const B = {
|
|
|
929
929
|
},
|
|
930
930
|
label: B.savings_goal,
|
|
931
931
|
onChange: (y) => {
|
|
932
|
-
y.target.value &&
|
|
932
|
+
y.target.value && p(Number(y.target.value.replace(/[^0-9]/g, "")));
|
|
933
933
|
},
|
|
934
|
-
value:
|
|
934
|
+
value: l ? L(l, "0,0") : ""
|
|
935
935
|
}
|
|
936
936
|
),
|
|
937
937
|
/* @__PURE__ */ e(
|
|
938
938
|
ct,
|
|
939
939
|
{
|
|
940
940
|
label: B.how_often_contribute,
|
|
941
|
-
onChange:
|
|
941
|
+
onChange: d,
|
|
942
942
|
options: Qo,
|
|
943
943
|
required: !0,
|
|
944
944
|
value: s
|
|
@@ -955,7 +955,7 @@ const B = {
|
|
|
955
955
|
pattern: "[0-9]*"
|
|
956
956
|
},
|
|
957
957
|
label: B.meet_your_goal_within,
|
|
958
|
-
onChange: (y) =>
|
|
958
|
+
onChange: (y) => _(Number(y.target.value)),
|
|
959
959
|
sx: {
|
|
960
960
|
"& .MuiInputBase-root": {
|
|
961
961
|
borderBottomRightRadius: 0,
|
|
@@ -965,7 +965,7 @@ const B = {
|
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
},
|
|
968
|
-
value:
|
|
968
|
+
value: h
|
|
969
969
|
}
|
|
970
970
|
),
|
|
971
971
|
/* @__PURE__ */ e(
|
|
@@ -984,7 +984,7 @@ const B = {
|
|
|
984
984
|
}
|
|
985
985
|
)
|
|
986
986
|
] }),
|
|
987
|
-
/* @__PURE__ */ e(
|
|
987
|
+
/* @__PURE__ */ e($, { fullWidth: !0, onClick: w, type: "submit", variant: "contained", children: B.calculate })
|
|
988
988
|
] }) }) });
|
|
989
989
|
}, nr = S(tr), Ae = {
|
|
990
990
|
connect_accounts: "Connect Accounts",
|
|
@@ -992,7 +992,7 @@ const B = {
|
|
|
992
992
|
your_savings: "Your Savings"
|
|
993
993
|
}, or = () => {
|
|
994
994
|
const { savingsAccounts: t } = Me(), [r, n] = m.useState(!1), o = m.useMemo(
|
|
995
|
-
() => t.reduce((
|
|
995
|
+
() => t.reduce((c, a) => c + (a.balance ?? 0), 0),
|
|
996
996
|
[t]
|
|
997
997
|
);
|
|
998
998
|
return /* @__PURE__ */ i(u, { sx: { gap: 24 }, children: [
|
|
@@ -1011,7 +1011,7 @@ const B = {
|
|
|
1011
1011
|
)
|
|
1012
1012
|
] });
|
|
1013
1013
|
}, rr = S(or), We = S(
|
|
1014
|
-
({ label: t, value: r, status: n, bottomComponent: o, statusBarData:
|
|
1014
|
+
({ label: t, value: r, status: n, bottomComponent: o, statusBarData: c = [] }) => {
|
|
1015
1015
|
const a = {
|
|
1016
1016
|
GOOD: {
|
|
1017
1017
|
progressBarColor: "primary.main"
|
|
@@ -1025,12 +1025,12 @@ const B = {
|
|
|
1025
1025
|
MISSING: {
|
|
1026
1026
|
progressBarColor: "text.secondary"
|
|
1027
1027
|
}
|
|
1028
|
-
}[n], s =
|
|
1029
|
-
color:
|
|
1030
|
-
percentage:
|
|
1028
|
+
}[n], s = c.map((d, l) => c.length === 2 ? {
|
|
1029
|
+
color: l === 0 ? "primary.main" : d.color || a?.progressBarColor,
|
|
1030
|
+
percentage: d.percentage
|
|
1031
1031
|
} : {
|
|
1032
|
-
color:
|
|
1033
|
-
percentage:
|
|
1032
|
+
color: d.color || a?.progressBarColor,
|
|
1033
|
+
percentage: d.percentage
|
|
1034
1034
|
});
|
|
1035
1035
|
return /* @__PURE__ */ i(
|
|
1036
1036
|
u,
|
|
@@ -1077,7 +1077,7 @@ const B = {
|
|
|
1077
1077
|
return /* @__PURE__ */ e(
|
|
1078
1078
|
We,
|
|
1079
1079
|
{
|
|
1080
|
-
bottomComponent: /* @__PURE__ */ e(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: ir.map((
|
|
1080
|
+
bottomComponent: /* @__PURE__ */ e(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: ir.map((c) => /* @__PURE__ */ i(u, { sx: { alignItems: "center", height: 24, width: 30 }, children: [
|
|
1081
1081
|
/* @__PURE__ */ e(
|
|
1082
1082
|
ne,
|
|
1083
1083
|
{
|
|
@@ -1089,8 +1089,8 @@ const B = {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
1091
|
),
|
|
1092
|
-
/* @__PURE__ */ e(I, { variant: "caption", children:
|
|
1093
|
-
] },
|
|
1092
|
+
/* @__PURE__ */ e(I, { variant: "caption", children: c })
|
|
1093
|
+
] }, c)) }),
|
|
1094
1094
|
label: ar.sticky_label,
|
|
1095
1095
|
status: o,
|
|
1096
1096
|
statusBarData: [
|
|
@@ -1106,29 +1106,29 @@ const B = {
|
|
|
1106
1106
|
bgcolor: r,
|
|
1107
1107
|
height: n = "calc(100dvh - 36px)",
|
|
1108
1108
|
loader: o = /* @__PURE__ */ e(J, { label: "Loading", size: 40 }),
|
|
1109
|
-
onClick:
|
|
1109
|
+
onClick: c,
|
|
1110
1110
|
showInsights: a = !1,
|
|
1111
1111
|
showLoader: s = !1,
|
|
1112
|
-
width:
|
|
1113
|
-
zeroState:
|
|
1112
|
+
width: d = "100%",
|
|
1113
|
+
zeroState: l = /* @__PURE__ */ e(ro, {})
|
|
1114
1114
|
}) => {
|
|
1115
|
-
const { getCategoryName:
|
|
1116
|
-
const M = t.find((
|
|
1115
|
+
const { getCategoryName: p } = Ye(), { onEvent: h } = Nn(), { categories: _ } = v(), { clearExpandedSplits: b, setShowInsights: f, toggleSplit: w } = oo(), y = (x) => {
|
|
1116
|
+
const M = t.find((W) => W.guid === x);
|
|
1117
1117
|
if (M?.has_been_split) {
|
|
1118
1118
|
w(M.guid);
|
|
1119
1119
|
return;
|
|
1120
1120
|
}
|
|
1121
|
-
|
|
1121
|
+
h(ao.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
1122
1122
|
account_guid: M?.account_guid,
|
|
1123
1123
|
transaction_guid: x
|
|
1124
|
-
}),
|
|
1124
|
+
}), c?.(x);
|
|
1125
1125
|
}, D = m.useRef(null), g = no({
|
|
1126
1126
|
count: t.length,
|
|
1127
1127
|
getScrollElement: () => D.current,
|
|
1128
1128
|
estimateSize: (x) => ut + (Ne(x, t) ? _t : 0),
|
|
1129
1129
|
overscan: 5
|
|
1130
1130
|
});
|
|
1131
|
-
return m.useEffect(() => g.measure(), [t]), m.useEffect(() => f(a), [a]), m.useEffect(() => () => b(), []), /* @__PURE__ */ e(Re, { sx: { width:
|
|
1131
|
+
return m.useEffect(() => g.measure(), [t]), m.useEffect(() => f(a), [a]), m.useEffect(() => () => b(), []), /* @__PURE__ */ e(Re, { sx: { width: d }, children: /* @__PURE__ */ e(C, { height: n, overflow: "auto", ref: D, width: d, children: /* @__PURE__ */ i(
|
|
1132
1132
|
C,
|
|
1133
1133
|
{
|
|
1134
1134
|
height: (
|
|
@@ -1139,9 +1139,9 @@ const B = {
|
|
|
1139
1139
|
width: "100%",
|
|
1140
1140
|
children: [
|
|
1141
1141
|
s && o,
|
|
1142
|
-
!s && g.getVirtualItems().length === 0 &&
|
|
1142
|
+
!s && g.getVirtualItems().length === 0 && l,
|
|
1143
1143
|
!s && g.getVirtualItems().length > 0 && g.getVirtualItems().map((x) => {
|
|
1144
|
-
const M = t[x.index],
|
|
1144
|
+
const M = t[x.index], W = Ne(x.index, t), G = Ft(x.index, t), H = ut + (W ? _t : 0);
|
|
1145
1145
|
return /* @__PURE__ */ i(
|
|
1146
1146
|
C,
|
|
1147
1147
|
{
|
|
@@ -1152,17 +1152,17 @@ const B = {
|
|
|
1152
1152
|
width: "100%"
|
|
1153
1153
|
},
|
|
1154
1154
|
children: [
|
|
1155
|
-
|
|
1155
|
+
W && /* @__PURE__ */ e(Pt, { bgcolor: r, children: Ze(M.date) }),
|
|
1156
1156
|
/* @__PURE__ */ e(
|
|
1157
1157
|
Bt,
|
|
1158
1158
|
{
|
|
1159
|
-
...
|
|
1159
|
+
...c && { onClick: y },
|
|
1160
1160
|
transaction: {
|
|
1161
1161
|
...M,
|
|
1162
|
-
category:
|
|
1162
|
+
category: _.default_categories[M.top_level_category_guid]?.replace(
|
|
1163
1163
|
/&/g,
|
|
1164
1164
|
"&"
|
|
1165
|
-
) ??
|
|
1165
|
+
) ?? p(M.top_level_category_guid)
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
1168
|
),
|
|
@@ -1180,25 +1180,25 @@ const B = {
|
|
|
1180
1180
|
amountColor: r = "success.main",
|
|
1181
1181
|
amountPosition: n = "center",
|
|
1182
1182
|
formatDate: o = Ze,
|
|
1183
|
-
secondaryIcon:
|
|
1183
|
+
secondaryIcon: c
|
|
1184
1184
|
}) => {
|
|
1185
|
-
const a = E(), { connect: s, finstrong:
|
|
1185
|
+
const a = E(), { connect: s, finstrong: d } = v(), [l, p] = m.useState(!1), [h, _] = m.useState(!1), b = 3, f = t.length > b, w = t.length - b;
|
|
1186
1186
|
return !t || t.length === 0 ? /* @__PURE__ */ i(z, { children: [
|
|
1187
1187
|
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
1188
|
-
|
|
1188
|
+
$,
|
|
1189
1189
|
{
|
|
1190
|
-
onClick: () =>
|
|
1190
|
+
onClick: () => _(!0),
|
|
1191
1191
|
size: "small",
|
|
1192
1192
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1193
1193
|
variant: "contained",
|
|
1194
|
-
children: /* @__PURE__ */ e(I, { bold: !0, variant: "body1", children:
|
|
1194
|
+
children: /* @__PURE__ */ e(I, { bold: !0, variant: "body1", children: d.connect_more_accounts_button })
|
|
1195
1195
|
}
|
|
1196
1196
|
) }),
|
|
1197
1197
|
/* @__PURE__ */ e(
|
|
1198
1198
|
oe,
|
|
1199
1199
|
{
|
|
1200
|
-
onClose: () =>
|
|
1201
|
-
showConnectWidget:
|
|
1200
|
+
onClose: () => _(!1),
|
|
1201
|
+
showConnectWidget: h,
|
|
1202
1202
|
title: s.mini_title
|
|
1203
1203
|
}
|
|
1204
1204
|
)
|
|
@@ -1241,7 +1241,7 @@ const B = {
|
|
|
1241
1241
|
/* @__PURE__ */ i(u, { sx: { gap: 4 }, children: [
|
|
1242
1242
|
/* @__PURE__ */ e(k, { bold: !0, variant: "body1", children: y.description }),
|
|
1243
1243
|
/* @__PURE__ */ i(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
1244
|
-
!!
|
|
1244
|
+
!!c && c,
|
|
1245
1245
|
/* @__PURE__ */ e(I, { variant: "caption", children: o(y.date) })
|
|
1246
1246
|
] })
|
|
1247
1247
|
] }),
|
|
@@ -1256,25 +1256,25 @@ const B = {
|
|
|
1256
1256
|
)) }),
|
|
1257
1257
|
f && /* @__PURE__ */ i(z, { children: [
|
|
1258
1258
|
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
1259
|
-
|
|
1259
|
+
$,
|
|
1260
1260
|
{
|
|
1261
1261
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
1262
|
-
onClick: () =>
|
|
1262
|
+
onClick: () => p(!0),
|
|
1263
1263
|
size: "small",
|
|
1264
1264
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1265
1265
|
children: /* @__PURE__ */ i(I, { bold: !0, variant: "body1", children: [
|
|
1266
1266
|
w,
|
|
1267
1267
|
" ",
|
|
1268
|
-
|
|
1268
|
+
d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_more_transactions
|
|
1269
1269
|
] })
|
|
1270
1270
|
}
|
|
1271
1271
|
) }),
|
|
1272
1272
|
/* @__PURE__ */ e(
|
|
1273
1273
|
te,
|
|
1274
1274
|
{
|
|
1275
|
-
isOpen:
|
|
1276
|
-
onClose: () =>
|
|
1277
|
-
title:
|
|
1275
|
+
isOpen: l,
|
|
1276
|
+
onClose: () => p(!1),
|
|
1277
|
+
title: d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_transactions,
|
|
1278
1278
|
children: /* @__PURE__ */ e(dr, { transactions: t })
|
|
1279
1279
|
}
|
|
1280
1280
|
)
|
|
@@ -1331,7 +1331,7 @@ const B = {
|
|
|
1331
1331
|
}
|
|
1332
1332
|
) });
|
|
1333
1333
|
}, ur = S(pr), _r = () => {
|
|
1334
|
-
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_spend: n } = r, { pay_bills_on_time_drawer: o } = n,
|
|
1334
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_spend: n } = r, { pay_bills_on_time_drawer: o } = n, c = Bn(t.spending_fee_transaction_count);
|
|
1335
1335
|
return /* @__PURE__ */ i(
|
|
1336
1336
|
u,
|
|
1337
1337
|
{
|
|
@@ -1349,7 +1349,7 @@ const B = {
|
|
|
1349
1349
|
" ",
|
|
1350
1350
|
o.pay_bills_on_time_sticky_fee_count
|
|
1351
1351
|
] }),
|
|
1352
|
-
/* @__PURE__ */ e(Le, { status:
|
|
1352
|
+
/* @__PURE__ */ e(Le, { status: c })
|
|
1353
1353
|
] })
|
|
1354
1354
|
]
|
|
1355
1355
|
}
|
|
@@ -1373,13 +1373,13 @@ const B = {
|
|
|
1373
1373
|
)
|
|
1374
1374
|
] });
|
|
1375
1375
|
}, gr = S(mr), yr = () => {
|
|
1376
|
-
const { finstrong: t } = v(), { healthScore: r, allTransactions: n, loadSpendTransactions: o, loadDebtSpend:
|
|
1376
|
+
const { finstrong: t } = v(), { healthScore: r, allTransactions: n, loadSpendTransactions: o, loadDebtSpend: c } = F(), { isInitialized: a } = j();
|
|
1377
1377
|
m.useEffect(() => {
|
|
1378
|
-
a && (o().finally(),
|
|
1378
|
+
a && (o().finally(), c().finally());
|
|
1379
1379
|
}, [a]);
|
|
1380
1380
|
const s = m.useMemo(() => {
|
|
1381
|
-
const
|
|
1382
|
-
return [...
|
|
1381
|
+
const d = n.spend.map((p) => p.transaction), l = n.debtSpend.map((p) => p.transaction);
|
|
1382
|
+
return [...d, ...l];
|
|
1383
1383
|
}, [n.spend, n.debtSpend]);
|
|
1384
1384
|
return a ? /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1385
1385
|
/* @__PURE__ */ e(
|
|
@@ -1400,7 +1400,7 @@ const B = {
|
|
|
1400
1400
|
{
|
|
1401
1401
|
"aria-label": n.key_indicators_save.drawer_title,
|
|
1402
1402
|
centered: !0,
|
|
1403
|
-
onChange: (o,
|
|
1403
|
+
onChange: (o, c) => r(c),
|
|
1404
1404
|
sx: { mb: 0 },
|
|
1405
1405
|
value: t,
|
|
1406
1406
|
variant: "fullWidth",
|
|
@@ -1430,7 +1430,7 @@ const B = {
|
|
|
1430
1430
|
/* @__PURE__ */ e(Qe, { chartFor: "savingsOverTime" })
|
|
1431
1431
|
] });
|
|
1432
1432
|
}, xr = S(fr), Sr = () => {
|
|
1433
|
-
const { finstrong: t } = v(), { healthScore: r } = F(), n = r.months_of_cash_on_hand, o = wt(n ? n * 30 : null),
|
|
1433
|
+
const { finstrong: t } = v(), { healthScore: r } = F(), n = r.months_of_cash_on_hand, o = wt(n ? n * 30 : null), c = 183 / 6, a = Math.floor(n), s = Math.round((n - a) * c), d = n / 6 * 100;
|
|
1434
1434
|
return /* @__PURE__ */ e(
|
|
1435
1435
|
We,
|
|
1436
1436
|
{
|
|
@@ -1444,7 +1444,7 @@ const B = {
|
|
|
1444
1444
|
mt: 2,
|
|
1445
1445
|
px: 1
|
|
1446
1446
|
},
|
|
1447
|
-
children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((
|
|
1447
|
+
children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((p) => /* @__PURE__ */ i(
|
|
1448
1448
|
u,
|
|
1449
1449
|
{
|
|
1450
1450
|
sx: {
|
|
@@ -1462,10 +1462,10 @@ const B = {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
1464
|
),
|
|
1465
|
-
/* @__PURE__ */ e(I, { variant: "XSmall", children:
|
|
1465
|
+
/* @__PURE__ */ e(I, { variant: "XSmall", children: p })
|
|
1466
1466
|
]
|
|
1467
1467
|
},
|
|
1468
|
-
|
|
1468
|
+
p
|
|
1469
1469
|
))
|
|
1470
1470
|
}
|
|
1471
1471
|
),
|
|
@@ -1473,7 +1473,7 @@ const B = {
|
|
|
1473
1473
|
status: o,
|
|
1474
1474
|
statusBarData: [
|
|
1475
1475
|
{
|
|
1476
|
-
percentage: `${
|
|
1476
|
+
percentage: `${d}%`
|
|
1477
1477
|
}
|
|
1478
1478
|
],
|
|
1479
1479
|
value: Y(t.key_indicators_save.drawer_progress_bar_value, a, s)
|
|
@@ -1560,7 +1560,7 @@ const B = {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
);
|
|
1562
1562
|
}, wr = S(vr), kr = () => {
|
|
1563
|
-
const { healthScore: t, allTransactions: r } = F(), { connect: n, finstrong: o } = v(), [
|
|
1563
|
+
const { healthScore: t, allTransactions: r } = F(), { connect: n, finstrong: o } = v(), [c, a] = m.useState(!1);
|
|
1564
1564
|
return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1565
1565
|
/* @__PURE__ */ e(
|
|
1566
1566
|
Se,
|
|
@@ -1574,7 +1574,7 @@ const B = {
|
|
|
1574
1574
|
// TODO: Need to add More Transactions functionality
|
|
1575
1575
|
/* @__PURE__ */ e($e, { transactions: r.income.map((s) => s.transaction) })
|
|
1576
1576
|
) : /* @__PURE__ */ e(
|
|
1577
|
-
|
|
1577
|
+
$,
|
|
1578
1578
|
{
|
|
1579
1579
|
onClick: () => {
|
|
1580
1580
|
a(!0);
|
|
@@ -1587,13 +1587,13 @@ const B = {
|
|
|
1587
1587
|
oe,
|
|
1588
1588
|
{
|
|
1589
1589
|
onClose: () => a(!1),
|
|
1590
|
-
showConnectWidget:
|
|
1590
|
+
showConnectWidget: c,
|
|
1591
1591
|
title: n.mini_title
|
|
1592
1592
|
}
|
|
1593
1593
|
)
|
|
1594
1594
|
] });
|
|
1595
1595
|
}, Mr = S(kr), Dr = () => {
|
|
1596
|
-
const { allTransactions: t, healthScore: r } = F(), { connect: n, finstrong: o } = v(), [
|
|
1596
|
+
const { allTransactions: t, healthScore: r } = F(), { connect: n, finstrong: o } = v(), [c, a] = m.useState(!1);
|
|
1597
1597
|
return /* @__PURE__ */ i(u, { gap: 16, sx: { p: 16 }, children: [
|
|
1598
1598
|
/* @__PURE__ */ e(
|
|
1599
1599
|
Se,
|
|
@@ -1613,7 +1613,7 @@ const B = {
|
|
|
1613
1613
|
}
|
|
1614
1614
|
)
|
|
1615
1615
|
) : /* @__PURE__ */ e(
|
|
1616
|
-
|
|
1616
|
+
$,
|
|
1617
1617
|
{
|
|
1618
1618
|
onClick: () => {
|
|
1619
1619
|
a(!0);
|
|
@@ -1626,7 +1626,7 @@ const B = {
|
|
|
1626
1626
|
oe,
|
|
1627
1627
|
{
|
|
1628
1628
|
onClose: () => a(!1),
|
|
1629
|
-
showConnectWidget:
|
|
1629
|
+
showConnectWidget: c,
|
|
1630
1630
|
title: n.mini_title
|
|
1631
1631
|
}
|
|
1632
1632
|
)
|
|
@@ -1636,13 +1636,13 @@ const B = {
|
|
|
1636
1636
|
data: r,
|
|
1637
1637
|
series: n,
|
|
1638
1638
|
style: o,
|
|
1639
|
-
...
|
|
1639
|
+
...c
|
|
1640
1640
|
}) => {
|
|
1641
|
-
const a = E(), s = m.useRef(null), { width:
|
|
1641
|
+
const a = E(), s = m.useRef(null), { width: d } = uo({
|
|
1642
1642
|
width: o.width
|
|
1643
1643
|
});
|
|
1644
1644
|
m.useLayoutEffect(() => {
|
|
1645
|
-
const
|
|
1645
|
+
const _ = new ResizeObserver(() => {
|
|
1646
1646
|
window.requestAnimationFrame(() => {
|
|
1647
1647
|
if (s.current) {
|
|
1648
1648
|
const { width: b } = s.current.getBoundingClientRect(), f = b / 2, w = s.current.querySelector("text");
|
|
@@ -1650,13 +1650,13 @@ const B = {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
});
|
|
1652
1652
|
});
|
|
1653
|
-
return s.current &&
|
|
1654
|
-
s.current &&
|
|
1653
|
+
return s.current && _.observe(s.current), () => {
|
|
1654
|
+
s.current && _.unobserve(s.current);
|
|
1655
1655
|
};
|
|
1656
1656
|
}, []);
|
|
1657
|
-
const { formattedComparison:
|
|
1657
|
+
const { formattedComparison: l, formattedMain: p } = r[n.index], h = n.type === 0 ? p : l;
|
|
1658
1658
|
return /* @__PURE__ */ i("g", { children: [
|
|
1659
|
-
/* @__PURE__ */ e(lt.rect, { ...
|
|
1659
|
+
/* @__PURE__ */ e(lt.rect, { ...c, fill: t, ref: s, rx: 2, style: o }),
|
|
1660
1660
|
/* @__PURE__ */ e(
|
|
1661
1661
|
lt.text,
|
|
1662
1662
|
{
|
|
@@ -1664,10 +1664,10 @@ const B = {
|
|
|
1664
1664
|
fontSize: 9,
|
|
1665
1665
|
fontWeight: 400,
|
|
1666
1666
|
textAnchor: "middle",
|
|
1667
|
-
transform:
|
|
1667
|
+
transform: d.to((_) => `translate(${_ / 2}, -5)`),
|
|
1668
1668
|
x: o.x,
|
|
1669
1669
|
y: o.y,
|
|
1670
|
-
children:
|
|
1670
|
+
children: h
|
|
1671
1671
|
}
|
|
1672
1672
|
)
|
|
1673
1673
|
] });
|
|
@@ -1676,13 +1676,13 @@ const B = {
|
|
|
1676
1676
|
data: r,
|
|
1677
1677
|
title: n,
|
|
1678
1678
|
buttonLabel: o,
|
|
1679
|
-
onClick:
|
|
1679
|
+
onClick: c,
|
|
1680
1680
|
legendLabelMain: a,
|
|
1681
1681
|
legendLabelComparison: s,
|
|
1682
|
-
totalComparison:
|
|
1683
|
-
totalMain:
|
|
1682
|
+
totalComparison: d,
|
|
1683
|
+
totalMain: l
|
|
1684
1684
|
}) => {
|
|
1685
|
-
const
|
|
1685
|
+
const p = E(), h = so(p.breakpoints.down("xs")), _ = m.useMemo(
|
|
1686
1686
|
() => r.sort((g, x) => g.month - x.month).map((g) => {
|
|
1687
1687
|
const x = Ln(g.month), M = {
|
|
1688
1688
|
spending_vs_income: {
|
|
@@ -1707,7 +1707,7 @@ const B = {
|
|
|
1707
1707
|
), b = {
|
|
1708
1708
|
dataKey: "label",
|
|
1709
1709
|
scaleType: "band"
|
|
1710
|
-
}, f = Math.max(...
|
|
1710
|
+
}, f = Math.max(..._.map((g) => Math.max(g.main, g.comparison))), w = Math.ceil(f * 1.2 / 1e3) * 1e3, y = w / 3, D = {
|
|
1711
1711
|
scaleType: "linear",
|
|
1712
1712
|
min: 0,
|
|
1713
1713
|
max: w,
|
|
@@ -1736,10 +1736,10 @@ const B = {
|
|
|
1736
1736
|
children: [
|
|
1737
1737
|
/* @__PURE__ */ e(N, { children: n }),
|
|
1738
1738
|
o && /* @__PURE__ */ e(
|
|
1739
|
-
|
|
1739
|
+
$,
|
|
1740
1740
|
{
|
|
1741
1741
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
1742
|
-
onClick:
|
|
1742
|
+
onClick: c,
|
|
1743
1743
|
size: "small",
|
|
1744
1744
|
sx: {
|
|
1745
1745
|
pl: 8,
|
|
@@ -1770,7 +1770,7 @@ const B = {
|
|
|
1770
1770
|
a,
|
|
1771
1771
|
" "
|
|
1772
1772
|
] }),
|
|
1773
|
-
!
|
|
1773
|
+
!h && l && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: l })
|
|
1774
1774
|
] })
|
|
1775
1775
|
] }),
|
|
1776
1776
|
/* @__PURE__ */ i(u, { alignItems: "center", direction: "row", spacing: 8, children: [
|
|
@@ -1790,15 +1790,15 @@ const B = {
|
|
|
1790
1790
|
s,
|
|
1791
1791
|
" "
|
|
1792
1792
|
] }),
|
|
1793
|
-
!
|
|
1793
|
+
!h && d && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: d })
|
|
1794
1794
|
] })
|
|
1795
1795
|
] })
|
|
1796
1796
|
] }),
|
|
1797
1797
|
/* @__PURE__ */ i(
|
|
1798
1798
|
po,
|
|
1799
1799
|
{
|
|
1800
|
-
colors: [`${
|
|
1801
|
-
dataset:
|
|
1800
|
+
colors: [`${p.palette.chartMono.chartMono3}`, `${p.palette.chartMono.chartMono5}`],
|
|
1801
|
+
dataset: _,
|
|
1802
1802
|
height: 240,
|
|
1803
1803
|
margin: { top: 20, bottom: 30, right: 10, left: 42 },
|
|
1804
1804
|
series: [
|
|
@@ -1813,13 +1813,13 @@ const B = {
|
|
|
1813
1813
|
{
|
|
1814
1814
|
slots: {
|
|
1815
1815
|
bar: (g) => {
|
|
1816
|
-
const { ownerState: x, style: M,
|
|
1816
|
+
const { ownerState: x, style: M, ...W } = g;
|
|
1817
1817
|
return /* @__PURE__ */ e(
|
|
1818
1818
|
Ar,
|
|
1819
1819
|
{
|
|
1820
|
-
|
|
1820
|
+
...W,
|
|
1821
1821
|
color: x.color,
|
|
1822
|
-
data:
|
|
1822
|
+
data: _,
|
|
1823
1823
|
series: {
|
|
1824
1824
|
index: x.dataIndex,
|
|
1825
1825
|
type: Number(x.id.toString().split("-").pop())
|
|
@@ -1836,10 +1836,10 @@ const B = {
|
|
|
1836
1836
|
{
|
|
1837
1837
|
sx: () => ({
|
|
1838
1838
|
".MuiChartsAxis-line": {
|
|
1839
|
-
stroke:
|
|
1839
|
+
stroke: p.palette.divider
|
|
1840
1840
|
},
|
|
1841
1841
|
".MuiChartsAxis-tick": {
|
|
1842
|
-
stroke:
|
|
1842
|
+
stroke: p.palette.divider
|
|
1843
1843
|
},
|
|
1844
1844
|
".MuiChartsAxis-tickLabel": {
|
|
1845
1845
|
transform: "translateY(10px)"
|
|
@@ -1856,10 +1856,10 @@ const B = {
|
|
|
1856
1856
|
{
|
|
1857
1857
|
sx: () => ({
|
|
1858
1858
|
".MuiChartsAxis-line": {
|
|
1859
|
-
stroke:
|
|
1859
|
+
stroke: p.palette.divider
|
|
1860
1860
|
},
|
|
1861
1861
|
".MuiChartsAxis-tick": {
|
|
1862
|
-
stroke:
|
|
1862
|
+
stroke: p.palette.divider
|
|
1863
1863
|
},
|
|
1864
1864
|
".MuiChartsAxis-tickLabel": {
|
|
1865
1865
|
transform: "translateX(-8px)"
|
|
@@ -1878,7 +1878,7 @@ const B = {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
);
|
|
1880
1880
|
}, Tr = () => {
|
|
1881
|
-
const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } = F(), { isInitialized: o } = j(), [
|
|
1881
|
+
const { loadDebtSpend: t, loadIncome: r, monthlySummaries: n } = F(), { isInitialized: o } = j(), [c, a] = m.useState(0), { finstrong: s } = v();
|
|
1882
1882
|
return m.useEffect(() => {
|
|
1883
1883
|
o && (t().finally(), r().finally());
|
|
1884
1884
|
}, [o]), /* @__PURE__ */ i(z, { children: [
|
|
@@ -1888,9 +1888,9 @@ const B = {
|
|
|
1888
1888
|
{
|
|
1889
1889
|
"aria-label": s.key_indicators_save.drawer_title,
|
|
1890
1890
|
centered: !0,
|
|
1891
|
-
onChange: (
|
|
1891
|
+
onChange: (d, l) => a(l),
|
|
1892
1892
|
sx: { mb: 0 },
|
|
1893
|
-
value:
|
|
1893
|
+
value: c,
|
|
1894
1894
|
variant: "fullWidth",
|
|
1895
1895
|
children: [
|
|
1896
1896
|
/* @__PURE__ */ e(
|
|
@@ -1920,7 +1920,7 @@ const B = {
|
|
|
1920
1920
|
"aria-labelledby": "income-details-tab-0",
|
|
1921
1921
|
index: 0,
|
|
1922
1922
|
name: "income-details",
|
|
1923
|
-
value:
|
|
1923
|
+
value: c,
|
|
1924
1924
|
children: /* @__PURE__ */ e(Mr, {})
|
|
1925
1925
|
}
|
|
1926
1926
|
),
|
|
@@ -1930,7 +1930,7 @@ const B = {
|
|
|
1930
1930
|
"aria-labelledby": "debt-payment-details-tab-1",
|
|
1931
1931
|
index: 1,
|
|
1932
1932
|
name: "debt-payment-details",
|
|
1933
|
-
value:
|
|
1933
|
+
value: c,
|
|
1934
1934
|
children: /* @__PURE__ */ e(Ir, {})
|
|
1935
1935
|
}
|
|
1936
1936
|
)
|
|
@@ -1983,7 +1983,7 @@ const B = {
|
|
|
1983
1983
|
] })
|
|
1984
1984
|
] });
|
|
1985
1985
|
}, Or = S(Tr), Rr = () => {
|
|
1986
|
-
const { healthScore: t } = F(), { finstrong: r } = v(), n = Te(t.spend_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, a = ((
|
|
1986
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), n = Te(t.spend_to_income_ratio) ?? 0, o = Object.keys(t).length === 0, a = ((d) => o ? "MISSING" : d < 100 ? "GOOD" : d >= 100 && d <= 109 ? "FAIR" : d >= 110 ? "OFF_TRACK" : "MISSING")(n), s = {
|
|
1987
1987
|
GOOD: [{ percentage: `${n}%` }],
|
|
1988
1988
|
FAIR: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
|
|
1989
1989
|
OFF_TRACK: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
|
|
@@ -2022,19 +2022,19 @@ const B = {
|
|
|
2022
2022
|
}
|
|
2023
2023
|
);
|
|
2024
2024
|
}, Fr = S(Rr), Pr = () => {
|
|
2025
|
-
const t = E(), { monthlySummaries: r, handleFinstrongWidgetPrimaryCtaClick: n } = F(), { finstrong: o, goals:
|
|
2025
|
+
const t = E(), { monthlySummaries: r, handleFinstrongWidgetPrimaryCtaClick: n } = F(), { finstrong: o, goals: c, spending: a } = v(), { selectedAccounts: s } = j(), { categories: d, dateRangeCategoryTotals: l, loadDateRangeCategoryTotals: p } = Ye(), { appDataStore: h } = Kn(), [_, b] = m.useState("");
|
|
2026
2026
|
m.useEffect(() => {
|
|
2027
|
-
|
|
2027
|
+
p(
|
|
2028
2028
|
s,
|
|
2029
2029
|
Lt(/* @__PURE__ */ new Date()),
|
|
2030
2030
|
Wt(/* @__PURE__ */ new Date())
|
|
2031
2031
|
).finally();
|
|
2032
2032
|
}, [s]);
|
|
2033
2033
|
const f = m.useMemo(
|
|
2034
|
-
() => _o(
|
|
2035
|
-
[
|
|
2034
|
+
() => _o(d, c, t, l),
|
|
2035
|
+
[d, l]
|
|
2036
2036
|
), w = (g) => {
|
|
2037
|
-
b(
|
|
2037
|
+
b(_ === g ? "" : g);
|
|
2038
2038
|
}, { totalSpending: y, totalIncome: D } = m.useMemo(() => r?.reduce(
|
|
2039
2039
|
(g, { standard_spend: x = 0, income: M = 0 }) => ({
|
|
2040
2040
|
totalSpending: g.totalSpending + x,
|
|
@@ -2046,7 +2046,7 @@ const B = {
|
|
|
2046
2046
|
r.length ? /* @__PURE__ */ e(
|
|
2047
2047
|
jt,
|
|
2048
2048
|
{
|
|
2049
|
-
...
|
|
2049
|
+
...h.appData.client_profile?.allow_trends_widget && {
|
|
2050
2050
|
buttonLabel: o.key_indicators_spend.spend_less_than_you_make_drawer.view_more
|
|
2051
2051
|
},
|
|
2052
2052
|
chartFor: "spending_vs_income",
|
|
@@ -2099,8 +2099,8 @@ const B = {
|
|
|
2099
2099
|
},
|
|
2100
2100
|
children: [
|
|
2101
2101
|
/* @__PURE__ */ e(N, { children: o.key_indicators_spend.spend_less_than_you_make_drawer.spending }),
|
|
2102
|
-
|
|
2103
|
-
|
|
2102
|
+
h.appData.client_profile?.allow_spending_widget && /* @__PURE__ */ e(
|
|
2103
|
+
$,
|
|
2104
2104
|
{
|
|
2105
2105
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
2106
2106
|
onClick: () => n("Spending")(),
|
|
@@ -2122,7 +2122,7 @@ const B = {
|
|
|
2122
2122
|
{
|
|
2123
2123
|
data: f,
|
|
2124
2124
|
onSelected: w,
|
|
2125
|
-
selectedId:
|
|
2125
|
+
selectedId: _,
|
|
2126
2126
|
totalLabel: a.total_spending
|
|
2127
2127
|
}
|
|
2128
2128
|
),
|
|
@@ -2131,7 +2131,7 @@ const B = {
|
|
|
2131
2131
|
{
|
|
2132
2132
|
data: f,
|
|
2133
2133
|
onSelected: w,
|
|
2134
|
-
selectedId:
|
|
2134
|
+
selectedId: _
|
|
2135
2135
|
}
|
|
2136
2136
|
)
|
|
2137
2137
|
] })
|
|
@@ -2241,15 +2241,14 @@ const B = {
|
|
|
2241
2241
|
drawerFor: t,
|
|
2242
2242
|
title: r,
|
|
2243
2243
|
description: n,
|
|
2244
|
-
cardState: o = "MISSING"
|
|
2245
|
-
onPrimaryCtaClick: l
|
|
2244
|
+
cardState: o = "MISSING"
|
|
2246
2245
|
}) => {
|
|
2247
|
-
const [
|
|
2246
|
+
const [c, a] = m.useState(!1);
|
|
2248
2247
|
return /* @__PURE__ */ i(z, { children: [
|
|
2249
2248
|
/* @__PURE__ */ i(
|
|
2250
2249
|
u,
|
|
2251
2250
|
{
|
|
2252
|
-
onClick: () =>
|
|
2251
|
+
onClick: () => a(!0),
|
|
2253
2252
|
sx: {
|
|
2254
2253
|
alignItems: "center",
|
|
2255
2254
|
flexDirection: "row",
|
|
@@ -2277,90 +2276,88 @@ const B = {
|
|
|
2277
2276
|
Wr,
|
|
2278
2277
|
{
|
|
2279
2278
|
drawerFor: t,
|
|
2280
|
-
isOpen:
|
|
2281
|
-
onClose: () =>
|
|
2282
|
-
onPrimaryCtaClick: l
|
|
2279
|
+
isOpen: c,
|
|
2280
|
+
onClose: () => a(!1)
|
|
2283
2281
|
}
|
|
2284
2282
|
)
|
|
2285
2283
|
] });
|
|
2286
|
-
}, $r = (
|
|
2287
|
-
const { finstrong:
|
|
2288
|
-
const
|
|
2289
|
-
GOOD:
|
|
2290
|
-
FAIR:
|
|
2291
|
-
OFF_TRACK:
|
|
2292
|
-
MISSING:
|
|
2293
|
-
},
|
|
2284
|
+
}, $r = () => {
|
|
2285
|
+
const { finstrong: t } = v(), { key_indicators_spend: r } = t, { healthScore: n } = F(), o = (s) => {
|
|
2286
|
+
const d = $n(s), l = {
|
|
2287
|
+
GOOD: r.ratio_good_description,
|
|
2288
|
+
FAIR: r.ratio_fair_description,
|
|
2289
|
+
OFF_TRACK: r.ratio_off_track_description,
|
|
2290
|
+
MISSING: r.ratio_missing_description
|
|
2291
|
+
}, p = d === "MISSING" ? l[d] : Y(l[d], s);
|
|
2294
2292
|
return {
|
|
2295
|
-
cardState:
|
|
2296
|
-
description:
|
|
2297
|
-
title:
|
|
2293
|
+
cardState: d,
|
|
2294
|
+
description: p,
|
|
2295
|
+
title: r.ratio_card_title
|
|
2298
2296
|
};
|
|
2299
|
-
}, { spendToIncomeRatio:
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2302
|
-
|
|
2297
|
+
}, { spendToIncomeRatio: c, spendFeeCount: a } = m.useMemo(() => {
|
|
2298
|
+
const s = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, d = o(s), l = Wn(
|
|
2299
|
+
n.spending_fee_transaction_count,
|
|
2300
|
+
r
|
|
2303
2301
|
);
|
|
2304
|
-
return { spendToIncomeRatio:
|
|
2302
|
+
return { spendToIncomeRatio: d, spendFeeCount: l };
|
|
2305
2303
|
}, [
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2304
|
+
n.spend_to_income_ratio,
|
|
2305
|
+
n.spending_fee_transaction_count,
|
|
2306
|
+
r,
|
|
2307
|
+
t
|
|
2310
2308
|
]);
|
|
2311
2309
|
return /* @__PURE__ */ i(u, { sx: { gap: 24, p: 8, pt: 24 }, children: [
|
|
2312
2310
|
/* @__PURE__ */ e(
|
|
2313
2311
|
xe,
|
|
2314
2312
|
{
|
|
2315
|
-
cardState:
|
|
2316
|
-
description:
|
|
2313
|
+
cardState: c.cardState,
|
|
2314
|
+
description: c.description,
|
|
2317
2315
|
drawerFor: _e.SpendLessThanYouMake,
|
|
2318
|
-
|
|
2319
|
-
title: a.title
|
|
2316
|
+
title: c.title
|
|
2320
2317
|
}
|
|
2321
2318
|
),
|
|
2322
2319
|
/* @__PURE__ */ e(
|
|
2323
2320
|
xe,
|
|
2324
2321
|
{
|
|
2325
|
-
cardState:
|
|
2326
|
-
description:
|
|
2322
|
+
cardState: a.cardState,
|
|
2323
|
+
description: a.description,
|
|
2327
2324
|
drawerFor: _e.PayBillsOnTime,
|
|
2328
|
-
title:
|
|
2325
|
+
title: a.title
|
|
2329
2326
|
}
|
|
2330
2327
|
)
|
|
2331
2328
|
] });
|
|
2332
2329
|
}, zr = S($r), Er = () => {
|
|
2333
|
-
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_save: n } = r, o = (
|
|
2334
|
-
const
|
|
2330
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_save: n } = r, o = (d) => {
|
|
2331
|
+
const l = wt(d), p = {
|
|
2335
2332
|
GOOD: n.days_of_cash_good_description,
|
|
2336
2333
|
FAIR: n.days_of_cash_fair_description,
|
|
2337
2334
|
OFF_TRACK: n.days_of_cash_off_track_description,
|
|
2338
2335
|
MISSING: n.days_of_cash_missing_description
|
|
2339
|
-
},
|
|
2336
|
+
}, h = l === "MISSING" ? p[l] : Y(p[l], d);
|
|
2340
2337
|
return {
|
|
2341
|
-
cardState:
|
|
2342
|
-
description:
|
|
2338
|
+
cardState: l,
|
|
2339
|
+
description: h,
|
|
2343
2340
|
title: n.days_of_cash_title
|
|
2344
2341
|
};
|
|
2345
|
-
},
|
|
2346
|
-
const
|
|
2342
|
+
}, c = (d) => {
|
|
2343
|
+
const l = vt(d), p = {
|
|
2347
2344
|
GOOD: n.emergency_savings_good_description,
|
|
2348
2345
|
FAIR: n.emergency_savings_fair_description,
|
|
2349
2346
|
OFF_TRACK: n.emergency_savings_off_track_description,
|
|
2350
2347
|
MISSING: n.emergency_savings_missing_description
|
|
2351
2348
|
};
|
|
2352
|
-
let
|
|
2353
|
-
return
|
|
2354
|
-
|
|
2355
|
-
L(
|
|
2356
|
-
) :
|
|
2357
|
-
cardState:
|
|
2358
|
-
description:
|
|
2349
|
+
let h;
|
|
2350
|
+
return l === "FAIR" && d !== null ? h = Y(
|
|
2351
|
+
p[l],
|
|
2352
|
+
L(d, "0,0.00")
|
|
2353
|
+
) : h = p[l], {
|
|
2354
|
+
cardState: l,
|
|
2355
|
+
description: h,
|
|
2359
2356
|
title: n.emergency_savings_title
|
|
2360
2357
|
};
|
|
2361
2358
|
}, { daysOfCashOnHand: a, emergencySavings: s } = m.useMemo(() => {
|
|
2362
|
-
const
|
|
2363
|
-
return { daysOfCashOnHand:
|
|
2359
|
+
const d = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null, l = o(d), p = t.emergency_savings_on_hand !== null ? Math.round(t.emergency_savings_on_hand) : null, h = c(p);
|
|
2360
|
+
return { daysOfCashOnHand: l, emergencySavings: h };
|
|
2364
2361
|
}, [
|
|
2365
2362
|
t.months_of_cash_on_hand,
|
|
2366
2363
|
t.emergency_savings_on_hand,
|
|
@@ -2388,35 +2385,35 @@ const B = {
|
|
|
2388
2385
|
)
|
|
2389
2386
|
] });
|
|
2390
2387
|
}, Gr = S(Er), Hr = () => {
|
|
2391
|
-
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_borrow: n } = r, { user: o } = Q(),
|
|
2392
|
-
const
|
|
2388
|
+
const { healthScore: t } = F(), { finstrong: r } = v(), { key_indicators_borrow: n } = r, { user: o } = Q(), c = (l) => {
|
|
2389
|
+
const p = zn(l), h = {
|
|
2393
2390
|
GOOD: n.manage_debit_good_description,
|
|
2394
2391
|
FAIR: n.manage_debit_fair_description,
|
|
2395
2392
|
OFF_TRACK: n.manage_debit_off_track_description,
|
|
2396
2393
|
MISSING: n.manage_debit_missing_description
|
|
2397
|
-
},
|
|
2394
|
+
}, _ = p === "FAIR" || p === "OFF_TRACK" ? Y(h[p], l) : h[p];
|
|
2398
2395
|
return {
|
|
2399
|
-
cardState:
|
|
2400
|
-
description:
|
|
2396
|
+
cardState: p,
|
|
2397
|
+
description: _,
|
|
2401
2398
|
title: n.manage_debit_title
|
|
2402
2399
|
};
|
|
2403
|
-
}, a = (
|
|
2404
|
-
const
|
|
2400
|
+
}, a = (l) => {
|
|
2401
|
+
const p = Ct(l), h = {
|
|
2405
2402
|
GOOD: n.credit_score_good_description,
|
|
2406
2403
|
FAIR: n.credit_score_fair_description,
|
|
2407
2404
|
OFF_TRACK: n.credit_score_off_track_description,
|
|
2408
2405
|
MISSING: n.credit_score_missing_description
|
|
2409
|
-
},
|
|
2406
|
+
}, _ = p === "MISSING" ? h[p] : Y(h[p], l);
|
|
2410
2407
|
return {
|
|
2411
|
-
cardState:
|
|
2412
|
-
description:
|
|
2408
|
+
cardState: p,
|
|
2409
|
+
description: _,
|
|
2413
2410
|
title: n.credit_score_title
|
|
2414
2411
|
};
|
|
2415
|
-
}, { manageDebtStatus: s, creditScoreStatus:
|
|
2416
|
-
const
|
|
2412
|
+
}, { manageDebtStatus: s, creditScoreStatus: d } = m.useMemo(() => {
|
|
2413
|
+
const l = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, p = c(l), h = a(o.credit_score || null);
|
|
2417
2414
|
return {
|
|
2418
|
-
manageDebtStatus:
|
|
2419
|
-
creditScoreStatus:
|
|
2415
|
+
manageDebtStatus: p,
|
|
2416
|
+
creditScoreStatus: h
|
|
2420
2417
|
};
|
|
2421
2418
|
}, [t.debt_to_income_ratio, o.credit_score, n, r]);
|
|
2422
2419
|
return /* @__PURE__ */ i(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
@@ -2432,22 +2429,22 @@ const B = {
|
|
|
2432
2429
|
/* @__PURE__ */ e(
|
|
2433
2430
|
xe,
|
|
2434
2431
|
{
|
|
2435
|
-
cardState:
|
|
2436
|
-
description:
|
|
2432
|
+
cardState: d.cardState,
|
|
2433
|
+
description: d.description,
|
|
2437
2434
|
drawerFor: _e.HaveAGoodCreditScore,
|
|
2438
|
-
title:
|
|
2435
|
+
title: d.title
|
|
2439
2436
|
}
|
|
2440
2437
|
)
|
|
2441
2438
|
] });
|
|
2442
|
-
}, Nr = S(Hr), Kr = (
|
|
2443
|
-
const [
|
|
2439
|
+
}, Nr = S(Hr), Kr = () => {
|
|
2440
|
+
const [t, r] = m.useState(0), { finstrong: n } = v();
|
|
2444
2441
|
return /* @__PURE__ */ i(z, { children: [
|
|
2445
2442
|
/* @__PURE__ */ i(
|
|
2446
2443
|
qe,
|
|
2447
2444
|
{
|
|
2448
2445
|
"aria-label": "Key Indicators",
|
|
2449
2446
|
centered: !0,
|
|
2450
|
-
onChange: (
|
|
2447
|
+
onChange: (o, c) => r(c),
|
|
2451
2448
|
sx: {
|
|
2452
2449
|
mb: 0,
|
|
2453
2450
|
"& .MuiTab-root": {
|
|
@@ -2455,7 +2452,7 @@ const B = {
|
|
|
2455
2452
|
}
|
|
2456
2453
|
},
|
|
2457
2454
|
textColor: "primary",
|
|
2458
|
-
value:
|
|
2455
|
+
value: t,
|
|
2459
2456
|
variant: "fullWidth",
|
|
2460
2457
|
children: [
|
|
2461
2458
|
/* @__PURE__ */ e(
|
|
@@ -2465,7 +2462,7 @@ const B = {
|
|
|
2465
2462
|
icon: /* @__PURE__ */ e(Ke, { sx: { mr: 8 } }),
|
|
2466
2463
|
iconPosition: "start",
|
|
2467
2464
|
id: "spend-details-tab-0",
|
|
2468
|
-
label:
|
|
2465
|
+
label: n.key_indicators_spend.title,
|
|
2469
2466
|
sx: { minHeight: 44 }
|
|
2470
2467
|
}
|
|
2471
2468
|
),
|
|
@@ -2476,7 +2473,7 @@ const B = {
|
|
|
2476
2473
|
icon: /* @__PURE__ */ e(fn, { sx: { mr: 8 } }),
|
|
2477
2474
|
iconPosition: "start",
|
|
2478
2475
|
id: "save-details-tab-1",
|
|
2479
|
-
label:
|
|
2476
|
+
label: n.key_indicators_save.title,
|
|
2480
2477
|
sx: { minHeight: 44 }
|
|
2481
2478
|
}
|
|
2482
2479
|
),
|
|
@@ -2487,16 +2484,16 @@ const B = {
|
|
|
2487
2484
|
icon: /* @__PURE__ */ e(xn, { sx: { mr: 8 } }),
|
|
2488
2485
|
iconPosition: "start",
|
|
2489
2486
|
id: "borrow-details-tab-2",
|
|
2490
|
-
label:
|
|
2487
|
+
label: n.key_indicators_borrow.title,
|
|
2491
2488
|
sx: { minHeight: 44 }
|
|
2492
2489
|
}
|
|
2493
2490
|
)
|
|
2494
2491
|
]
|
|
2495
2492
|
}
|
|
2496
2493
|
),
|
|
2497
|
-
/* @__PURE__ */ e(ue, { index: 0, name: "spend-details", value:
|
|
2498
|
-
/* @__PURE__ */ e(ue, { index: 1, name: "save-details", value:
|
|
2499
|
-
/* @__PURE__ */ e(ue, { index: 2, name: "borrow-details", value:
|
|
2494
|
+
/* @__PURE__ */ e(ue, { index: 0, name: "spend-details", value: t, children: /* @__PURE__ */ e(zr, {}) }),
|
|
2495
|
+
/* @__PURE__ */ e(ue, { index: 1, name: "save-details", value: t, children: /* @__PURE__ */ e(Gr, {}) }),
|
|
2496
|
+
/* @__PURE__ */ e(ue, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(Nr, {}) })
|
|
2500
2497
|
] });
|
|
2501
2498
|
}, jr = S(Kr), Yr = ({ onClick: t }) => {
|
|
2502
2499
|
const { finstrong: r } = v(), { isCopyLoaded: n } = j();
|
|
@@ -2507,7 +2504,7 @@ const B = {
|
|
|
2507
2504
|
/* @__PURE__ */ e(k, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: r.missing_data_description })
|
|
2508
2505
|
] }),
|
|
2509
2506
|
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
2510
|
-
|
|
2507
|
+
$,
|
|
2511
2508
|
{
|
|
2512
2509
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
2513
2510
|
onClick: t,
|
|
@@ -2530,23 +2527,23 @@ const B = {
|
|
|
2530
2527
|
frequency: r,
|
|
2531
2528
|
secondDay: n,
|
|
2532
2529
|
incomeTransactions: o,
|
|
2533
|
-
setCurrentStep:
|
|
2530
|
+
setCurrentStep: c,
|
|
2534
2531
|
setFirstDay: a,
|
|
2535
2532
|
setFrequency: s,
|
|
2536
|
-
setSecondDay:
|
|
2537
|
-
transaction:
|
|
2533
|
+
setSecondDay: d,
|
|
2534
|
+
transaction: l
|
|
2538
2535
|
}) => /* @__PURE__ */ i(m.Fragment, { children: [
|
|
2539
2536
|
/* @__PURE__ */ i(u, { children: [
|
|
2540
|
-
!!o.length && /* @__PURE__ */ e(C, { sx: { pb: 24 }, children: o.reduce((
|
|
2541
|
-
if (
|
|
2542
|
-
const b = Ne(
|
|
2543
|
-
return
|
|
2537
|
+
!!o.length && /* @__PURE__ */ e(C, { sx: { pb: 24 }, children: o.reduce((p, h, _) => {
|
|
2538
|
+
if (h.guid === l.guid) return p;
|
|
2539
|
+
const b = Ne(_, o), f = Ft(_, o);
|
|
2540
|
+
return p.push(
|
|
2544
2541
|
/* @__PURE__ */ i(m.Fragment, { children: [
|
|
2545
|
-
b && /* @__PURE__ */ e(Pt, { children: Ze(
|
|
2546
|
-
/* @__PURE__ */ e(Bt, { transaction:
|
|
2542
|
+
b && /* @__PURE__ */ e(Pt, { children: Ze(h.date) }),
|
|
2543
|
+
/* @__PURE__ */ e(Bt, { transaction: h }),
|
|
2547
2544
|
/* @__PURE__ */ e(ne, { sx: { ml: f ? 44 : 0 } })
|
|
2548
|
-
] },
|
|
2549
|
-
),
|
|
2545
|
+
] }, h.guid)
|
|
2546
|
+
), p;
|
|
2550
2547
|
}, []) }),
|
|
2551
2548
|
/* @__PURE__ */ e(
|
|
2552
2549
|
fo,
|
|
@@ -2555,17 +2552,17 @@ const B = {
|
|
|
2555
2552
|
frequency: r,
|
|
2556
2553
|
onFirstDayChange: a,
|
|
2557
2554
|
onFrequencyChange: s,
|
|
2558
|
-
onSecondDayChange:
|
|
2555
|
+
onSecondDayChange: d,
|
|
2559
2556
|
secondDay: n,
|
|
2560
|
-
transaction:
|
|
2557
|
+
transaction: l
|
|
2561
2558
|
}
|
|
2562
2559
|
)
|
|
2563
2560
|
] }),
|
|
2564
2561
|
/* @__PURE__ */ e(C, { sx: { px: 24 }, children: /* @__PURE__ */ e(
|
|
2565
|
-
|
|
2562
|
+
$,
|
|
2566
2563
|
{
|
|
2567
2564
|
fullWidth: !0,
|
|
2568
|
-
onClick: () =>
|
|
2565
|
+
onClick: () => c({ step: O.MonthlyIncome, type: "main" }),
|
|
2569
2566
|
startIcon: /* @__PURE__ */ e(ft, {}),
|
|
2570
2567
|
children: Xr.add_more_income
|
|
2571
2568
|
}
|
|
@@ -2573,8 +2570,8 @@ const B = {
|
|
|
2573
2570
|
] }), Ur = S(qr), Zr = {
|
|
2574
2571
|
select_date: "Select Date"
|
|
2575
2572
|
}, Qr = ({ selectedDate: t, setSelectedDate: r }) => {
|
|
2576
|
-
const n = E(), o = (
|
|
2577
|
-
r(Math.floor(new Date(
|
|
2573
|
+
const n = E(), o = (c) => {
|
|
2574
|
+
r(Math.floor(new Date(c).getTime() / 1e3));
|
|
2578
2575
|
};
|
|
2579
2576
|
return /* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(Co, { dateAdapter: $t, children: /* @__PURE__ */ e(
|
|
2580
2577
|
vo,
|
|
@@ -2676,13 +2673,13 @@ const B = {
|
|
|
2676
2673
|
do_it_later: "Do It Later",
|
|
2677
2674
|
next: "Next"
|
|
2678
2675
|
}, ra = ({ isOpen: t, onClose: r }) => {
|
|
2679
|
-
const { visibleAccounts: n } = Me(), { calculateHealthScore: o } = F(), { finstrong:
|
|
2676
|
+
const { visibleAccounts: n } = Me(), { calculateHealthScore: o } = F(), { finstrong: c } = v(), { setSelectedAccounts: a } = j(), { addRepeatingTransaction: s, setDateRange: d } = Ve(), { filter: l, setFilter: p, transactions: h } = jn(), { user: _, userProfile: b, updateUser: f, updateUserProfile: w } = Q(), [y, D] = m.useState(_.credit_score || 0), [g, x] = m.useState(
|
|
2680
2677
|
ht
|
|
2681
|
-
), [M,
|
|
2678
|
+
), [M, W] = m.useState(1), [G, H] = m.useState(Ot.EveryMonth), [T, V] = m.useState([]), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(_.birthday), [ce, he] = m.useState(15), [q, Je] = m.useState("");
|
|
2682
2679
|
m.useEffect(() => {
|
|
2683
|
-
|
|
2680
|
+
d({ start: Lt(dt()), end: Wt(dt()) });
|
|
2684
2681
|
}, []), m.useEffect(() => {
|
|
2685
|
-
|
|
2682
|
+
p({
|
|
2686
2683
|
accounts: n.map((A) => A.guid),
|
|
2687
2684
|
dateRange: {
|
|
2688
2685
|
start: bo(/* @__PURE__ */ new Date(), 90),
|
|
@@ -2692,20 +2689,20 @@ const B = {
|
|
|
2692
2689
|
}), a(n);
|
|
2693
2690
|
}, [n]);
|
|
2694
2691
|
const et = m.useMemo(
|
|
2695
|
-
() =>
|
|
2696
|
-
[q,
|
|
2692
|
+
() => h.find((A) => A.guid === q),
|
|
2693
|
+
[q, h]
|
|
2697
2694
|
), Vt = m.useMemo(() => ({
|
|
2698
2695
|
[O.ConnectAccounts]: !0,
|
|
2699
2696
|
[O.MonthlyIncome]: !!q,
|
|
2700
|
-
[O.Birthday]: !!
|
|
2701
|
-
[O.CreditScore]: !!
|
|
2702
|
-
})[g.step], [y, g, X, q,
|
|
2697
|
+
[O.Birthday]: !!_.birthday || !!X,
|
|
2698
|
+
[O.CreditScore]: !!_.credit_score || !!y
|
|
2699
|
+
})[g.step], [y, g, X, q, _]), le = n.length > 0, Xt = m.useMemo(() => {
|
|
2703
2700
|
const { step: A } = g;
|
|
2704
2701
|
let R = 0;
|
|
2705
|
-
return A >= O.MonthlyIncome && le && R++, A >= O.Birthday && T.length && R++, A >= O.CreditScore && (
|
|
2706
|
-
}, [g.step, le, T.length,
|
|
2707
|
-
|
|
2708
|
-
...
|
|
2702
|
+
return A >= O.MonthlyIncome && le && R++, A >= O.Birthday && T.length && R++, A >= O.CreditScore && (_.birthday || _.credit_score) && R++, R;
|
|
2703
|
+
}, [g.step, le, T.length, _.birthday, _.credit_score]), qt = (A) => {
|
|
2704
|
+
p({
|
|
2705
|
+
...l,
|
|
2709
2706
|
custom: (R) => A ? So(R, A) : pt(R)
|
|
2710
2707
|
});
|
|
2711
2708
|
}, Ut = {
|
|
@@ -2726,11 +2723,11 @@ const B = {
|
|
|
2726
2723
|
setCurrentStep: (A) => {
|
|
2727
2724
|
x(A), V((R) => {
|
|
2728
2725
|
if (R.some((de) => de.guid === q)) return R.filter((de) => de.guid !== q);
|
|
2729
|
-
const Ie =
|
|
2726
|
+
const Ie = h.find((de) => de.guid === q);
|
|
2730
2727
|
return Ie ? [...R, { ...Ie, firstDay: M, frequency: G, secondDay: ce }] : R;
|
|
2731
2728
|
});
|
|
2732
2729
|
},
|
|
2733
|
-
setFirstDay:
|
|
2730
|
+
setFirstDay: W,
|
|
2734
2731
|
setFrequency: H,
|
|
2735
2732
|
setSecondDay: he,
|
|
2736
2733
|
transaction: et
|
|
@@ -2776,10 +2773,10 @@ const B = {
|
|
|
2776
2773
|
const { step: A } = g, R = A + 1;
|
|
2777
2774
|
switch (A) {
|
|
2778
2775
|
case O.Birthday:
|
|
2779
|
-
X && X !==
|
|
2776
|
+
X && X !== _.birthday && f({ ..._, birthday: X });
|
|
2780
2777
|
break;
|
|
2781
2778
|
case O.CreditScore:
|
|
2782
|
-
y && y !==
|
|
2779
|
+
y && y !== _.credit_score && f({ ..._, credit_score: y }), nt();
|
|
2783
2780
|
return;
|
|
2784
2781
|
case O.MonthlyIncome:
|
|
2785
2782
|
q && T.findIndex(({ guid: ge }) => ge === q) === -1 && V((ge) => [
|
|
@@ -2832,7 +2829,7 @@ const B = {
|
|
|
2832
2829
|
repeating_transaction_type: Rt.Income,
|
|
2833
2830
|
second_recurrence_day: sn,
|
|
2834
2831
|
transaction_type: dn,
|
|
2835
|
-
user_guid:
|
|
2832
|
+
user_guid: _.guid
|
|
2836
2833
|
};
|
|
2837
2834
|
await s(un, R);
|
|
2838
2835
|
}
|
|
@@ -2854,7 +2851,7 @@ const B = {
|
|
|
2854
2851
|
primaryText: me?.mainActionContent,
|
|
2855
2852
|
secondaryColor: "primary",
|
|
2856
2853
|
secondaryText: P.back,
|
|
2857
|
-
title:
|
|
2854
|
+
title: c.title,
|
|
2858
2855
|
...!re && { onPrimaryAction: Qt },
|
|
2859
2856
|
children: [
|
|
2860
2857
|
re && /* @__PURE__ */ i(u, { sx: { alignItems: "center", gap: 24, position: "relative", px: 16, top: 126 }, children: [
|
|
@@ -2865,7 +2862,7 @@ const B = {
|
|
|
2865
2862
|
/* @__PURE__ */ e(
|
|
2866
2863
|
oa,
|
|
2867
2864
|
{
|
|
2868
|
-
completeCopy:
|
|
2865
|
+
completeCopy: c.complete,
|
|
2869
2866
|
primaryText: me.primaryText,
|
|
2870
2867
|
secondaryText: me.secondaryText,
|
|
2871
2868
|
value: Xt
|
|
@@ -2873,7 +2870,7 @@ const B = {
|
|
|
2873
2870
|
),
|
|
2874
2871
|
g.type === "main" && /* @__PURE__ */ i(C, { children: [
|
|
2875
2872
|
me.main,
|
|
2876
|
-
nn && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e(
|
|
2873
|
+
nn && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e($, { fullWidth: !0, onClick: Zt, children: P.do_it_later }) })
|
|
2877
2874
|
] }),
|
|
2878
2875
|
g.type === "detail" && me.detail
|
|
2879
2876
|
] })
|
|
@@ -2914,15 +2911,15 @@ const B = {
|
|
|
2914
2911
|
/* @__PURE__ */ e(k, { sx: { color: "text.secondary" }, variant: "subtitle1", children: Ge.onboarding_subtitle })
|
|
2915
2912
|
] })
|
|
2916
2913
|
] }),
|
|
2917
|
-
/* @__PURE__ */ e(
|
|
2914
|
+
/* @__PURE__ */ e($, { onClick: () => r(!0), variant: "contained", children: Ge.get_started })
|
|
2918
2915
|
]
|
|
2919
2916
|
}
|
|
2920
2917
|
),
|
|
2921
2918
|
/* @__PURE__ */ e(aa, { isOpen: t, onClose: () => r(!1) })
|
|
2922
2919
|
] });
|
|
2923
2920
|
}, sa = ({ isOpen: t, onClose: r }) => {
|
|
2924
|
-
const { finstrong: n } = v(), o = E(), { updateUser:
|
|
2925
|
-
|
|
2921
|
+
const { finstrong: n } = v(), o = E(), { updateUser: c, user: a } = Q(), [s, d] = m.useState(a.birthday), l = (h) => {
|
|
2922
|
+
d(Math.floor(new Date(h).getTime() / 1e3));
|
|
2926
2923
|
};
|
|
2927
2924
|
return /* @__PURE__ */ e(
|
|
2928
2925
|
te,
|
|
@@ -2930,7 +2927,7 @@ const B = {
|
|
|
2930
2927
|
isOpen: t,
|
|
2931
2928
|
onClose: r,
|
|
2932
2929
|
onPrimaryAction: () => {
|
|
2933
|
-
!s || s === a.birthday || (
|
|
2930
|
+
!s || s === a.birthday || (c({ ...a, birthday: s }), r());
|
|
2934
2931
|
},
|
|
2935
2932
|
onSecondaryAction: r,
|
|
2936
2933
|
title: n.date_of_birth,
|
|
@@ -2938,7 +2935,7 @@ const B = {
|
|
|
2938
2935
|
wo,
|
|
2939
2936
|
{
|
|
2940
2937
|
disableFuture: !0,
|
|
2941
|
-
onChange:
|
|
2938
|
+
onChange: l,
|
|
2942
2939
|
slotProps: {
|
|
2943
2940
|
nextIconButton: {
|
|
2944
2941
|
sx: {
|
|
@@ -2972,19 +2969,19 @@ const B = {
|
|
|
2972
2969
|
}, ca = S(sa), la = ({ isOpen: t, onClose: r }) => {
|
|
2973
2970
|
const { visibleFinstrongAccounts: n } = Me(), {
|
|
2974
2971
|
accounts: o,
|
|
2975
|
-
common:
|
|
2972
|
+
common: c,
|
|
2976
2973
|
finstrong: a
|
|
2977
|
-
} = v(), { repeatingTransactions: s } = Ve(), { user:
|
|
2974
|
+
} = v(), { repeatingTransactions: s } = Ve(), { user: d } = Q(), l = s.reduce((f, w) => {
|
|
2978
2975
|
const { repeating_transaction_type: y, transactions: D, recurrence_type: g, amount: x } = w;
|
|
2979
2976
|
return y === Rt.Income && (D.length > 0 || g === Ot.EveryYear) ? f + x : f;
|
|
2980
|
-
}, 0), [
|
|
2977
|
+
}, 0), [p, h] = m.useState(null), b = [
|
|
2981
2978
|
{
|
|
2982
2979
|
dynamicCopy: a.add_profile_item,
|
|
2983
2980
|
fallbackLabel: a.monthly_income,
|
|
2984
2981
|
icon: /* @__PURE__ */ e(Cn, {}),
|
|
2985
2982
|
key: ee.MonthlyIncome,
|
|
2986
2983
|
label: a.monthly_income,
|
|
2987
|
-
value:
|
|
2984
|
+
value: l
|
|
2988
2985
|
},
|
|
2989
2986
|
{
|
|
2990
2987
|
dynamicCopy: a.add_profile_item,
|
|
@@ -2992,7 +2989,7 @@ const B = {
|
|
|
2992
2989
|
icon: /* @__PURE__ */ e(vn, {}),
|
|
2993
2990
|
key: ee.DateOfBirth,
|
|
2994
2991
|
label: a.date_of_birth,
|
|
2995
|
-
value:
|
|
2992
|
+
value: d.birthday
|
|
2996
2993
|
},
|
|
2997
2994
|
{
|
|
2998
2995
|
dynamicCopy: a.add_profile_item,
|
|
@@ -3000,7 +2997,7 @@ const B = {
|
|
|
3000
2997
|
icon: /* @__PURE__ */ e(Ke, {}),
|
|
3001
2998
|
key: ee.CreditScore,
|
|
3002
2999
|
label: a.credit_score,
|
|
3003
|
-
value:
|
|
3000
|
+
value: d.credit_score
|
|
3004
3001
|
},
|
|
3005
3002
|
{
|
|
3006
3003
|
fallbackLabel: a.connect_your_accounts,
|
|
@@ -3028,7 +3025,7 @@ const B = {
|
|
|
3028
3025
|
}
|
|
3029
3026
|
)
|
|
3030
3027
|
] }),
|
|
3031
|
-
/* @__PURE__ */ e(Gn, { list: b, onClickItem:
|
|
3028
|
+
/* @__PURE__ */ e(Gn, { list: b, onClickItem: h }),
|
|
3032
3029
|
/* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
3033
3030
|
Be,
|
|
3034
3031
|
{
|
|
@@ -3036,25 +3033,25 @@ const B = {
|
|
|
3036
3033
|
drawerType: "connectDrawer",
|
|
3037
3034
|
isDashboard: !0,
|
|
3038
3035
|
title: a.dont_see_all_your_accounts,
|
|
3039
|
-
titleDrawer:
|
|
3036
|
+
titleDrawer: c.add_accounts
|
|
3040
3037
|
}
|
|
3041
3038
|
) }),
|
|
3042
3039
|
/* @__PURE__ */ e(
|
|
3043
3040
|
te,
|
|
3044
3041
|
{
|
|
3045
|
-
isOpen:
|
|
3046
|
-
onClose: () =>
|
|
3047
|
-
title:
|
|
3042
|
+
isOpen: p === ee.MonthlyIncome,
|
|
3043
|
+
onClose: () => h(null),
|
|
3044
|
+
title: c.settings,
|
|
3048
3045
|
children: /* @__PURE__ */ e(ko, {})
|
|
3049
3046
|
}
|
|
3050
3047
|
),
|
|
3051
|
-
/* @__PURE__ */ e(ca, { isOpen:
|
|
3052
|
-
/* @__PURE__ */ e(Gt, { isOpen:
|
|
3048
|
+
/* @__PURE__ */ e(ca, { isOpen: p === ee.DateOfBirth, onClose: () => h(null) }),
|
|
3049
|
+
/* @__PURE__ */ e(Gt, { isOpen: p === ee.CreditScore, onClose: () => h(null) }),
|
|
3053
3050
|
/* @__PURE__ */ e(
|
|
3054
3051
|
Mt,
|
|
3055
3052
|
{
|
|
3056
|
-
onClose: () =>
|
|
3057
|
-
showConnectionsWidget:
|
|
3053
|
+
onClose: () => h(null),
|
|
3054
|
+
showConnectionsWidget: p === ee.Connections,
|
|
3058
3055
|
title: o.manage_connections
|
|
3059
3056
|
}
|
|
3060
3057
|
)
|
|
@@ -3071,16 +3068,16 @@ const B = {
|
|
|
3071
3068
|
] }), pa = ({ report: t }) => {
|
|
3072
3069
|
const { finstrong: r } = v(), { score_history_drawer_timeline: n } = r, {
|
|
3073
3070
|
health_score_point_difference: o,
|
|
3074
|
-
newer_credit_score:
|
|
3071
|
+
newer_credit_score: c,
|
|
3075
3072
|
older_credit_score: a,
|
|
3076
3073
|
older_spend_to_income_ratio: s,
|
|
3077
|
-
newer_spend_to_income_ratio:
|
|
3078
|
-
older_health_score:
|
|
3079
|
-
newer_health_score:
|
|
3080
|
-
newer_score_calculated_at:
|
|
3081
|
-
} = t,
|
|
3074
|
+
newer_spend_to_income_ratio: d,
|
|
3075
|
+
older_health_score: l,
|
|
3076
|
+
newer_health_score: p,
|
|
3077
|
+
newer_score_calculated_at: h
|
|
3078
|
+
} = t, _ = Do(new Date(h), "MMM d"), b = () => o === 0 ? "info.lighter" : o > 0 ? "success.lighter" : "error.lighter", f = () => o === 0 ? Y(n.stayed_at, l) : o > 0 ? n.less_spending : n.more_spending, w = () => {
|
|
3082
3079
|
if (o === 0) return null;
|
|
3083
|
-
const y = o > 0 ? n.up_from : n.down_from, D = Y(y,
|
|
3080
|
+
const y = o > 0 ? n.up_from : n.down_from, D = Y(y, l, p);
|
|
3084
3081
|
return /* @__PURE__ */ i(z, { children: [
|
|
3085
3082
|
/* @__PURE__ */ e(
|
|
3086
3083
|
Mn,
|
|
@@ -3117,7 +3114,7 @@ const B = {
|
|
|
3117
3114
|
/* @__PURE__ */ i(u, { sx: { gap: 2, width: "80%" }, children: [
|
|
3118
3115
|
/* @__PURE__ */ e(I, { fontWeight: 600, variant: "Body", children: f() }),
|
|
3119
3116
|
/* @__PURE__ */ i(I, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
|
|
3120
|
-
|
|
3117
|
+
_,
|
|
3121
3118
|
" ",
|
|
3122
3119
|
w()
|
|
3123
3120
|
] })
|
|
@@ -3143,7 +3140,7 @@ const B = {
|
|
|
3143
3140
|
content: Y(
|
|
3144
3141
|
n.spend_to_income_description,
|
|
3145
3142
|
Te(s),
|
|
3146
|
-
Te(
|
|
3143
|
+
Te(d)
|
|
3147
3144
|
)
|
|
3148
3145
|
}
|
|
3149
3146
|
),
|
|
@@ -3153,7 +3150,7 @@ const B = {
|
|
|
3153
3150
|
content: Y(
|
|
3154
3151
|
n.credit_score_description,
|
|
3155
3152
|
a,
|
|
3156
|
-
|
|
3153
|
+
c
|
|
3157
3154
|
),
|
|
3158
3155
|
islast: !0
|
|
3159
3156
|
}
|
|
@@ -3163,9 +3160,9 @@ const B = {
|
|
|
3163
3160
|
) })
|
|
3164
3161
|
] }) });
|
|
3165
3162
|
}, ua = S(pa), _a = ({ isOpen: t, onClose: r }) => {
|
|
3166
|
-
const n = E(), { finstrong: o } = v(), { isCopyLoaded:
|
|
3167
|
-
if (!
|
|
3168
|
-
const
|
|
3163
|
+
const n = E(), { finstrong: o } = v(), { isCopyLoaded: c, isInitialized: a } = j(), { healthScore: s, healthScoreChangeReports: d, augmentedChartData: l } = F();
|
|
3164
|
+
if (!c || !a) return /* @__PURE__ */ e(J, {});
|
|
3165
|
+
const p = je(s.health_score || 0, o), h = d.slice().reverse();
|
|
3169
3166
|
return /* @__PURE__ */ e(
|
|
3170
3167
|
Ht,
|
|
3171
3168
|
{
|
|
@@ -3176,7 +3173,7 @@ const B = {
|
|
|
3176
3173
|
baseline: "min",
|
|
3177
3174
|
colors: [n.palette.primary.main],
|
|
3178
3175
|
curveType: "natural",
|
|
3179
|
-
datasets: [
|
|
3176
|
+
datasets: [l],
|
|
3180
3177
|
height: 160,
|
|
3181
3178
|
labels: [o.key_indicators_label],
|
|
3182
3179
|
margin: { top: 12, left: 24 },
|
|
@@ -3205,13 +3202,13 @@ const B = {
|
|
|
3205
3202
|
}
|
|
3206
3203
|
) }),
|
|
3207
3204
|
/* @__PURE__ */ i(C, { children: [
|
|
3208
|
-
/* @__PURE__ */ e(k, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children:
|
|
3209
|
-
/* @__PURE__ */ e(k, { variant: "caption", children:
|
|
3205
|
+
/* @__PURE__ */ e(k, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children: p.status }),
|
|
3206
|
+
/* @__PURE__ */ e(k, { variant: "caption", children: p.description })
|
|
3210
3207
|
] })
|
|
3211
3208
|
]
|
|
3212
3209
|
}
|
|
3213
3210
|
),
|
|
3214
|
-
children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children:
|
|
3211
|
+
children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: h.map((_, b) => /* @__PURE__ */ e(ua, { report: _ }, b)) })
|
|
3215
3212
|
}
|
|
3216
3213
|
);
|
|
3217
3214
|
}, ha = S(_a), ma = ({ copy: t }) => {
|
|
@@ -3227,9 +3224,9 @@ const B = {
|
|
|
3227
3224
|
{ color: "chartMono.chartMono3", text: t.building, value: "26-50" },
|
|
3228
3225
|
{ color: "chartMono.chartMono4", text: t.stable, value: "51-75" },
|
|
3229
3226
|
{ color: "chartMono.chartMono5", text: t.strong, value: "76-100" }
|
|
3230
|
-
].map(({ color: o, text:
|
|
3227
|
+
].map(({ color: o, text: c, value: a }) => /* @__PURE__ */ i(u, { sx: { gap: 4, textAlign: "center", width: "100%" }, children: [
|
|
3231
3228
|
/* @__PURE__ */ i(C, { children: [
|
|
3232
|
-
/* @__PURE__ */ e(k, { sx: { fontWeight: 700, textTransform: "uppercase" }, variant: "caption", children:
|
|
3229
|
+
/* @__PURE__ */ e(k, { sx: { fontWeight: 700, textTransform: "uppercase" }, variant: "caption", children: c }),
|
|
3233
3230
|
/* @__PURE__ */ i(I, { sx: { color: "text.secondary" }, variant: "caption", children: [
|
|
3234
3231
|
"(",
|
|
3235
3232
|
a,
|
|
@@ -3237,7 +3234,7 @@ const B = {
|
|
|
3237
3234
|
] })
|
|
3238
3235
|
] }),
|
|
3239
3236
|
/* @__PURE__ */ e(C, { sx: { border: "2px solid", borderColor: o, borderRadius: "3px" } })
|
|
3240
|
-
] },
|
|
3237
|
+
] }, c)) }),
|
|
3241
3238
|
/* @__PURE__ */ i(C, { children: [
|
|
3242
3239
|
/* @__PURE__ */ e(
|
|
3243
3240
|
C,
|
|
@@ -3355,13 +3352,13 @@ const B = {
|
|
|
3355
3352
|
] })
|
|
3356
3353
|
] }) }) : /* @__PURE__ */ e(J, {});
|
|
3357
3354
|
}, ya = S(ga), ba = S(() => {
|
|
3358
|
-
const [t, r] = m.useState(!1), n = E(), [o, { width:
|
|
3359
|
-
return !s || !
|
|
3355
|
+
const [t, r] = m.useState(!1), n = E(), [o, { width: c }] = It(), { finstrong: a } = v(), { isCopyLoaded: s, isInitialized: d } = j(), { healthScore: l, healthScoreChange: p } = F(), h = n.palette.mode === "dark", _ = je(l?.health_score, a);
|
|
3356
|
+
return !s || !d ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ i(K, { ref: o, sx: { p: 16 }, children: [
|
|
3360
3357
|
/* @__PURE__ */ e(
|
|
3361
3358
|
$o,
|
|
3362
3359
|
{
|
|
3363
3360
|
action: /* @__PURE__ */ e(
|
|
3364
|
-
|
|
3361
|
+
$,
|
|
3365
3362
|
{
|
|
3366
3363
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
3367
3364
|
onClick: () => r(!0),
|
|
@@ -3387,18 +3384,18 @@ const B = {
|
|
|
3387
3384
|
/* @__PURE__ */ e(u, { sx: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(
|
|
3388
3385
|
Et,
|
|
3389
3386
|
{
|
|
3390
|
-
arcRadius:
|
|
3391
|
-
footerCenterContent:
|
|
3392
|
-
healthScore:
|
|
3393
|
-
size:
|
|
3387
|
+
arcRadius: c <= 323 ? 73 : 154,
|
|
3388
|
+
footerCenterContent: p,
|
|
3389
|
+
healthScore: l?.health_score || 0,
|
|
3390
|
+
size: c <= 323 ? "M" : "L"
|
|
3394
3391
|
}
|
|
3395
3392
|
) }),
|
|
3396
|
-
|
|
3393
|
+
l?.health_score ? /* @__PURE__ */ i(
|
|
3397
3394
|
Bo,
|
|
3398
3395
|
{
|
|
3399
3396
|
sx: {
|
|
3400
3397
|
px: 16,
|
|
3401
|
-
backgroundColor:
|
|
3398
|
+
backgroundColor: h ? "grey.800" : "grey.50",
|
|
3402
3399
|
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3403
3400
|
"&.Mui-expanded": {
|
|
3404
3401
|
m: 0
|
|
@@ -3422,7 +3419,7 @@ const B = {
|
|
|
3422
3419
|
children: /* @__PURE__ */ e(k, { sx: { fontWeight: 600 }, variant: "body1", children: a.accordion_title_text })
|
|
3423
3420
|
}
|
|
3424
3421
|
),
|
|
3425
|
-
/* @__PURE__ */ e(Lo, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(k, { variant: "subtitle1", children:
|
|
3422
|
+
/* @__PURE__ */ e(Lo, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(k, { variant: "subtitle1", children: _.scoreContent }) })
|
|
3426
3423
|
]
|
|
3427
3424
|
}
|
|
3428
3425
|
) : /* @__PURE__ */ e(
|
|
@@ -3434,7 +3431,7 @@ const B = {
|
|
|
3434
3431
|
hasIcon: !1,
|
|
3435
3432
|
isDashboard: !0,
|
|
3436
3433
|
sx: {
|
|
3437
|
-
backgroundColor:
|
|
3434
|
+
backgroundColor: h ? "grey.800" : "grey.50",
|
|
3438
3435
|
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3439
3436
|
".connect-more-accounts-title": {
|
|
3440
3437
|
fontWeight: 600,
|
|
@@ -3455,22 +3452,22 @@ const B = {
|
|
|
3455
3452
|
)
|
|
3456
3453
|
] });
|
|
3457
3454
|
}), fa = ({ onBackClick: t, sx: r, onPrimaryCtaClick: n }) => {
|
|
3458
|
-
const { visibleAccounts: o } = Me(), { dateRange:
|
|
3459
|
-
augmentedChartData:
|
|
3460
|
-
calculateHealthScore:
|
|
3455
|
+
const { visibleAccounts: o } = Me(), { dateRange: c, isDataLoaded: a, loadBudgetData: s, setTheme: d } = Yn(), { reloadCategoryTotals: l } = Ye(), p = F(), {
|
|
3456
|
+
augmentedChartData: h,
|
|
3457
|
+
calculateHealthScore: _,
|
|
3461
3458
|
healthScore: b,
|
|
3462
3459
|
loadAugmentedChartData: f,
|
|
3463
3460
|
loadMonthlySummaries: w
|
|
3464
|
-
} =
|
|
3461
|
+
} = p, { finstrong: y, connect: D } = v(), { isCopyLoaded: g, isInitialized: x, selectedAccounts: M, setSelectedAccounts: W } = j(), { loadRepeatingTransactions: G } = Ve(), { isMobile: H } = Ue(), T = E(), { userProfile: V } = Q(), [re, ae] = m.useState(!1), [Ce, ie] = m.useState(!1), [X, se] = m.useState(!1);
|
|
3465
3462
|
if (m.useEffect(() => {
|
|
3466
|
-
|
|
3463
|
+
d(T);
|
|
3467
3464
|
}, []), m.useEffect(() => {
|
|
3468
|
-
n && (
|
|
3469
|
-
}, [n,
|
|
3470
|
-
x && (
|
|
3465
|
+
n && (p.handleFinstrongWidgetPrimaryCtaClick = n);
|
|
3466
|
+
}, [n, p]), m.useEffect(() => W(o), [o]), m.useEffect(() => {
|
|
3467
|
+
x && (_().finally(), f().finally(), w().finally());
|
|
3471
3468
|
}, [x]), m.useEffect(() => {
|
|
3472
|
-
x && (
|
|
3473
|
-
}, [
|
|
3469
|
+
x && (l(M, c.start, c.end), a || (s(), G().finally()));
|
|
3470
|
+
}, [c, a, x, M]), !g || !x) return /* @__PURE__ */ e(J, {});
|
|
3474
3471
|
const ce = () => {
|
|
3475
3472
|
}, he = () => ae(!0);
|
|
3476
3473
|
return /* @__PURE__ */ i(
|
|
@@ -3516,7 +3513,7 @@ const B = {
|
|
|
3516
3513
|
/* @__PURE__ */ i(u, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
|
3517
3514
|
/* @__PURE__ */ e(N, { children: y.key_indicators }),
|
|
3518
3515
|
/* @__PURE__ */ e(
|
|
3519
|
-
|
|
3516
|
+
$,
|
|
3520
3517
|
{
|
|
3521
3518
|
endIcon: /* @__PURE__ */ e(Z, {}),
|
|
3522
3519
|
onClick: () => ie(!0),
|
|
@@ -3528,7 +3525,7 @@ const B = {
|
|
|
3528
3525
|
}
|
|
3529
3526
|
)
|
|
3530
3527
|
] }),
|
|
3531
|
-
|
|
3528
|
+
h.length ? /* @__PURE__ */ e(
|
|
3532
3529
|
Xe,
|
|
3533
3530
|
{
|
|
3534
3531
|
axisColor: T.palette.divider,
|
|
@@ -3536,7 +3533,7 @@ const B = {
|
|
|
3536
3533
|
colors: [T.palette.primary.main],
|
|
3537
3534
|
curveType: "natural",
|
|
3538
3535
|
customLegendVariant: "XSmall",
|
|
3539
|
-
datasets: [
|
|
3536
|
+
datasets: [h],
|
|
3540
3537
|
height: 300,
|
|
3541
3538
|
isGraphClippingXAxis: !0,
|
|
3542
3539
|
labelBackgroundColor: T.palette.border.dark,
|
|
@@ -3554,17 +3551,7 @@ const B = {
|
|
|
3554
3551
|
}
|
|
3555
3552
|
) : /* @__PURE__ */ e(Vr, { onClick: () => se(!0) }),
|
|
3556
3553
|
b.health_score !== null && /* @__PURE__ */ e(jr, {})
|
|
3557
|
-
] }) })
|
|
3558
|
-
/* @__PURE__ */ e(
|
|
3559
|
-
W,
|
|
3560
|
-
{
|
|
3561
|
-
sx: { background: "red", width: 100 },
|
|
3562
|
-
onClick: () => {
|
|
3563
|
-
console.log("test"), d.handleFinstrongWidgetPrimaryCtaClick("trends")();
|
|
3564
|
-
},
|
|
3565
|
-
children: "test"
|
|
3566
|
-
}
|
|
3567
|
-
)
|
|
3554
|
+
] }) })
|
|
3568
3555
|
]
|
|
3569
3556
|
}
|
|
3570
3557
|
) : /* @__PURE__ */ e(ia, {}),
|